Skip to content

Commit

Permalink
feat: support newer css properties
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Dec 11, 2023
1 parent fdf7fba commit e83afef
Show file tree
Hide file tree
Showing 26 changed files with 2,599 additions and 1,560 deletions.
5 changes: 5 additions & 0 deletions .changeset/twelve-stingrays-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@pandacss/generator': minor
---

Update csstype to support newer css features

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/aspect-ratio.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getAspectRatioStyle } from '../patterns/aspect-ratio.mjs';
export const AspectRatio = /* @__PURE__ */ forwardRef(function AspectRatio(props, ref) {
const { ratio, ...restProps } = props
const styleProps = getAspectRatioStyle({ratio})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/bleed.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getBleedStyle } from '../patterns/bleed.mjs';
export const Bleed = /* @__PURE__ */ forwardRef(function Bleed(props, ref) {
const { inline, block, ...restProps } = props
const styleProps = getBleedStyle({inline, block})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
10 changes: 3 additions & 7 deletions packages/studio/styled-system/jsx/box.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { panda } from './factory.mjs';
import { getBoxStyle } from '../patterns/box.mjs';

export const Box = /* @__PURE__ */ forwardRef(function Box(props, ref) {
const restProps = props
const styleProps = getBoxStyle()
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
const styleProps = getBoxStyle()
return createElement(panda.div, { ref, ...styleProps, ...props })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/center.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getCenterStyle } from '../patterns/center.mjs';
export const Center = /* @__PURE__ */ forwardRef(function Center(props, ref) {
const { inline, ...restProps } = props
const styleProps = getCenterStyle({inline})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/circle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getCircleStyle } from '../patterns/circle.mjs';
export const Circle = /* @__PURE__ */ forwardRef(function Circle(props, ref) {
const { size, ...restProps } = props
const styleProps = getCircleStyle({size})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
10 changes: 3 additions & 7 deletions packages/studio/styled-system/jsx/container.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { panda } from './factory.mjs';
import { getContainerStyle } from '../patterns/container.mjs';

export const Container = /* @__PURE__ */ forwardRef(function Container(props, ref) {
const restProps = props
const styleProps = getContainerStyle()
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
const styleProps = getContainerStyle()
return createElement(panda.div, { ref, ...styleProps, ...props })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/divider.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getDividerStyle } from '../patterns/divider.mjs';
export const Divider = /* @__PURE__ */ forwardRef(function Divider(props, ref) {
const { orientation, thickness, color, ...restProps } = props
const styleProps = getDividerStyle({orientation, thickness, color})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/flex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getFlexStyle } from '../patterns/flex.mjs';
export const Flex = /* @__PURE__ */ forwardRef(function Flex(props, ref) {
const { align, justify, direction, wrap, basis, grow, shrink, ...restProps } = props
const styleProps = getFlexStyle({align, justify, direction, wrap, basis, grow, shrink})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/float.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getFloatStyle } from '../patterns/float.mjs';
export const Float = /* @__PURE__ */ forwardRef(function Float(props, ref) {
const { offsetX, offsetY, offset, placement, ...restProps } = props
const styleProps = getFloatStyle({offsetX, offsetY, offset, placement})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/grid-item.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getGridItemStyle } from '../patterns/grid-item.mjs';
export const GridItem = /* @__PURE__ */ forwardRef(function GridItem(props, ref) {
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...restProps } = props
const styleProps = getGridItemStyle({colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/grid.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getGridStyle } from '../patterns/grid.mjs';
export const Grid = /* @__PURE__ */ forwardRef(function Grid(props, ref) {
const { gap, columnGap, rowGap, columns, minChildWidth, ...restProps } = props
const styleProps = getGridStyle({gap, columnGap, rowGap, columns, minChildWidth})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/hstack.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getHstackStyle } from '../patterns/hstack.mjs';
export const HStack = /* @__PURE__ */ forwardRef(function HStack(props, ref) {
const { justify, gap, ...restProps } = props
const styleProps = getHstackStyle({justify, gap})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
10 changes: 3 additions & 7 deletions packages/studio/styled-system/jsx/link-box.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { panda } from './factory.mjs';
import { getLinkBoxStyle } from '../patterns/link-box.mjs';

export const LinkBox = /* @__PURE__ */ forwardRef(function LinkBox(props, ref) {
const restProps = props
const styleProps = getLinkBoxStyle()
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
const styleProps = getLinkBoxStyle()
return createElement(panda.div, { ref, ...styleProps, ...props })
})
10 changes: 3 additions & 7 deletions packages/studio/styled-system/jsx/link-overlay.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { panda } from './factory.mjs';
import { getLinkOverlayStyle } from '../patterns/link-overlay.mjs';

export const LinkOverlay = /* @__PURE__ */ forwardRef(function LinkOverlay(props, ref) {
const restProps = props
const styleProps = getLinkOverlayStyle()
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.a, mergedProps)
})
const styleProps = getLinkOverlayStyle()
return createElement(panda.a, { ref, ...styleProps, ...props })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/spacer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getSpacerStyle } from '../patterns/spacer.mjs';
export const Spacer = /* @__PURE__ */ forwardRef(function Spacer(props, ref) {
const { size, ...restProps } = props
const styleProps = getSpacerStyle({size})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/square.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getSquareStyle } from '../patterns/square.mjs';
export const Square = /* @__PURE__ */ forwardRef(function Square(props, ref) {
const { size, ...restProps } = props
const styleProps = getSquareStyle({size})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/stack.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getStackStyle } from '../patterns/stack.mjs';
export const Stack = /* @__PURE__ */ forwardRef(function Stack(props, ref) {
const { align, justify, direction, gap, ...restProps } = props
const styleProps = getStackStyle({align, justify, direction, gap})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
10 changes: 3 additions & 7 deletions packages/studio/styled-system/jsx/styled-link.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { panda } from './factory.mjs';
import { getStyledLinkStyle } from '../patterns/styled-link.mjs';

export const StyledLink = /* @__PURE__ */ forwardRef(function StyledLink(props, ref) {
const restProps = props
const styleProps = getStyledLinkStyle()
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
const styleProps = getStyledLinkStyle()
return createElement(panda.div, { ref, ...styleProps, ...props })
})
10 changes: 3 additions & 7 deletions packages/studio/styled-system/jsx/visually-hidden.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { panda } from './factory.mjs';
import { getVisuallyHiddenStyle } from '../patterns/visually-hidden.mjs';

export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden(props, ref) {
const restProps = props
const styleProps = getVisuallyHiddenStyle()
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
const styleProps = getVisuallyHiddenStyle()
return createElement(panda.div, { ref, ...styleProps, ...props })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/vstack.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getVstackStyle } from '../patterns/vstack.mjs';
export const VStack = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
const { justify, gap, ...restProps } = props
const styleProps = getVstackStyle({justify, gap})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
7 changes: 2 additions & 5 deletions packages/studio/styled-system/jsx/wrap.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ import { getWrapStyle } from '../patterns/wrap.mjs';
export const Wrap = /* @__PURE__ */ forwardRef(function Wrap(props, ref) {
const { gap, rowGap, columnGap, align, justify, ...restProps } = props
const styleProps = getWrapStyle({gap, rowGap, columnGap, align, justify})
const cssProps = styleProps
const mergedProps = { ref, ...cssProps, ...restProps }

return createElement(panda.div, mergedProps)
})
return createElement(panda.div, { ref, ...styleProps, ...restProps })
})
Loading

3 comments on commit e83afef

@vercel
Copy link

@vercel vercel bot commented on e83afef Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on e83afef Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

panda-studio – ./

panda-studio-chakra-ui.vercel.app
panda-studio-git-main-chakra-ui.vercel.app
panda-app.vercel.app

@vercel
Copy link

@vercel vercel bot commented on e83afef Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

panda-docs – ./website

panda-docs-chakra-ui.vercel.app
panda-docs-git-main-chakra-ui.vercel.app
panda-css.com
panda-docs.vercel.app

Please sign in to comment.