@pandacss/studio 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/styled-system/helpers.mjs +2 -2
- package/styled-system/jsx/aspect-ratio.mjs +10 -5
- package/styled-system/jsx/bleed.mjs +10 -5
- package/styled-system/jsx/box.mjs +10 -4
- package/styled-system/jsx/center.mjs +10 -5
- package/styled-system/jsx/circle.mjs +10 -5
- package/styled-system/jsx/container.mjs +10 -4
- package/styled-system/jsx/divider.mjs +10 -5
- package/styled-system/jsx/flex.mjs +10 -5
- package/styled-system/jsx/float.mjs +10 -5
- package/styled-system/jsx/grid-item.mjs +10 -5
- package/styled-system/jsx/grid.mjs +10 -5
- package/styled-system/jsx/hstack.mjs +10 -5
- package/styled-system/jsx/link-box.mjs +10 -4
- package/styled-system/jsx/link-overlay.mjs +10 -4
- package/styled-system/jsx/spacer.mjs +10 -5
- package/styled-system/jsx/square.mjs +10 -5
- package/styled-system/jsx/stack.mjs +10 -5
- package/styled-system/jsx/styled-link.mjs +10 -4
- package/styled-system/jsx/visually-hidden.mjs +10 -4
- package/styled-system/jsx/vstack.mjs +10 -5
- package/styled-system/jsx/wrap.mjs +10 -5
- package/styled-system/types/recipe.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/studio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "The automated token documentation for Panda CSS",
|
|
5
5
|
"main": "dist/studio.js",
|
|
6
6
|
"module": "dist/studio.mjs",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@astrojs/react": "2.3.2",
|
|
40
|
-
"astro": "4.0.
|
|
40
|
+
"astro": "4.0.6",
|
|
41
41
|
"react": "18.2.0",
|
|
42
42
|
"react-dom": "18.2.0",
|
|
43
43
|
"vite": "5.0.7",
|
|
44
|
-
"@pandacss/config": "0.
|
|
45
|
-
"@pandacss/logger": "0.
|
|
46
|
-
"@pandacss/shared": "0.
|
|
47
|
-
"@pandacss/token-dictionary": "0.
|
|
48
|
-
"@pandacss/types": "0.
|
|
49
|
-
"@pandacss/astro-plugin-studio": "0.
|
|
44
|
+
"@pandacss/config": "0.23.0",
|
|
45
|
+
"@pandacss/logger": "0.23.0",
|
|
46
|
+
"@pandacss/shared": "0.23.0",
|
|
47
|
+
"@pandacss/token-dictionary": "0.23.0",
|
|
48
|
+
"@pandacss/types": "0.23.0",
|
|
49
|
+
"@pandacss/astro-plugin-studio": "0.23.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/react": "18.2.42",
|
|
@@ -15,7 +15,7 @@ function filterBaseConditions(c) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
// src/css-important.ts
|
|
18
|
-
var importantRegex = /!(important)
|
|
18
|
+
var importantRegex = /!(important)?/;
|
|
19
19
|
function isImportant(value) {
|
|
20
20
|
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
21
21
|
}
|
|
@@ -90,7 +90,7 @@ function walkObject(target, predicate, options = {}) {
|
|
|
90
90
|
}
|
|
91
91
|
function mapObject(obj, fn) {
|
|
92
92
|
if (Array.isArray(obj))
|
|
93
|
-
return obj.map(fn);
|
|
93
|
+
return obj.map((value) => fn(value));
|
|
94
94
|
if (!isObject(obj))
|
|
95
95
|
return fn(obj);
|
|
96
96
|
return walkObject(obj, (value) => fn(value));
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getAspectRatioStyle } from '../patterns/aspect-ratio.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const AspectRatio = /* @__PURE__ */ forwardRef(function AspectRatio(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["ratio"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getAspectRatioStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getBleedStyle } from '../patterns/bleed.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Bleed = /* @__PURE__ */ forwardRef(function Bleed(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["inline","block"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getBleedStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getBoxStyle } from '../patterns/box.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Box = /* @__PURE__ */ forwardRef(function Box(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getBoxStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getCenterStyle } from '../patterns/center.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Center = /* @__PURE__ */ forwardRef(function Center(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["inline"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getCenterStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getCircleStyle } from '../patterns/circle.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Circle = /* @__PURE__ */ forwardRef(function Circle(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getCircleStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getContainerStyle } from '../patterns/container.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Container = /* @__PURE__ */ forwardRef(function Container(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getContainerStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getDividerStyle } from '../patterns/divider.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Divider = /* @__PURE__ */ forwardRef(function Divider(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["orientation","thickness","color"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getDividerStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getFlexStyle } from '../patterns/flex.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Flex = /* @__PURE__ */ forwardRef(function Flex(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["align","justify","direction","wrap","basis","grow","shrink"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getFlexStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getFloatStyle } from '../patterns/float.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Float = /* @__PURE__ */ forwardRef(function Float(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["offsetX","offsetY","offset","placement"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getFloatStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getGridItemStyle } from '../patterns/grid-item.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const GridItem = /* @__PURE__ */ forwardRef(function GridItem(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["colSpan","rowSpan","colStart","rowStart","colEnd","rowEnd"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getGridItemStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getGridStyle } from '../patterns/grid.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Grid = /* @__PURE__ */ forwardRef(function Grid(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["gap","columnGap","rowGap","columns","minChildWidth"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getGridStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getHstackStyle } from '../patterns/hstack.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const HStack = /* @__PURE__ */ forwardRef(function HStack(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["justify","gap"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getHstackStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getLinkBoxStyle } from '../patterns/link-box.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const LinkBox = /* @__PURE__ */ forwardRef(function LinkBox(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getLinkBoxStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getLinkOverlayStyle } from '../patterns/link-overlay.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const LinkOverlay = /* @__PURE__ */ forwardRef(function LinkOverlay(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getLinkOverlayStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.a, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getSpacerStyle } from '../patterns/spacer.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Spacer = /* @__PURE__ */ forwardRef(function Spacer(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getSpacerStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getSquareStyle } from '../patterns/square.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Square = /* @__PURE__ */ forwardRef(function Square(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getSquareStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getStackStyle } from '../patterns/stack.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Stack = /* @__PURE__ */ forwardRef(function Stack(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["align","justify","direction","gap"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getStackStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getStyledLinkStyle } from '../patterns/styled-link.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const StyledLink = /* @__PURE__ */ forwardRef(function StyledLink(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getStyledLinkStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getVisuallyHiddenStyle } from '../patterns/visually-hidden.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getVisuallyHiddenStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getVstackStyle } from '../patterns/vstack.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const VStack = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["justify","gap"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getVstackStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
3
4
|
import { getWrapStyle } from '../patterns/wrap.mjs';
|
|
5
|
+
import { panda } from './factory.mjs';
|
|
4
6
|
|
|
5
7
|
export const Wrap = /* @__PURE__ */ forwardRef(function Wrap(props, ref) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["gap","rowGap","columnGap","align","justify"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getWrapStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(panda.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -139,6 +139,10 @@ export interface SlotRecipeDefinition<S extends string, T extends SlotRecipeVari
|
|
|
139
139
|
* The styles to apply when a combination of variants is selected.
|
|
140
140
|
*/
|
|
141
141
|
compoundVariants?: Pretty<SlotRecipeCompoundVariant<S, RecipeCompoundSelection<T>>>[]
|
|
142
|
+
/**
|
|
143
|
+
* Variants to pre-generate, will be include in the final `config.staticCss`
|
|
144
|
+
*/
|
|
145
|
+
staticCss?: RecipeRule[]
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
export type SlotRecipeCreatorFn = <S extends string, T extends SlotRecipeVariantRecord<S>>(
|