@pandacss/studio 0.22.1 → 0.24.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/dist/studio.d.mts +1 -1
- package/dist/studio.d.ts +1 -1
- package/dist/studio.mjs +1 -1
- package/package.json +14 -8
- 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/static-css.d.ts +23 -17
- package/index.ts +0 -1
package/dist/studio.d.mts
CHANGED
package/dist/studio.d.ts
CHANGED
package/dist/studio.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/tsup@
|
|
1
|
+
// ../../node_modules/.pnpm/tsup@8.0.1_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
|
|
2
2
|
import { fileURLToPath } from "url";
|
|
3
3
|
import path from "path";
|
|
4
4
|
var getFilename = () => fileURLToPath(import.meta.url);
|
package/package.json
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/studio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "The automated token documentation for Panda CSS",
|
|
5
5
|
"main": "dist/studio.js",
|
|
6
6
|
"module": "dist/studio.mjs",
|
|
7
7
|
"types": "dist/studio.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
|
+
"homepage": "https://panda-css.com",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/chakra-ui/panda.git",
|
|
13
|
+
"directory": "packages/studio"
|
|
14
|
+
},
|
|
9
15
|
"publishConfig": {
|
|
10
16
|
"access": "public"
|
|
11
17
|
},
|
|
@@ -37,16 +43,16 @@
|
|
|
37
43
|
"license": "MIT",
|
|
38
44
|
"dependencies": {
|
|
39
45
|
"@astrojs/react": "2.3.2",
|
|
40
|
-
"astro": "4.0.
|
|
46
|
+
"astro": "4.0.6",
|
|
41
47
|
"react": "18.2.0",
|
|
42
48
|
"react-dom": "18.2.0",
|
|
43
49
|
"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.
|
|
50
|
+
"@pandacss/config": "0.24.0",
|
|
51
|
+
"@pandacss/logger": "0.24.0",
|
|
52
|
+
"@pandacss/shared": "0.24.0",
|
|
53
|
+
"@pandacss/token-dictionary": "0.24.0",
|
|
54
|
+
"@pandacss/types": "0.24.0",
|
|
55
|
+
"@pandacss/astro-plugin-studio": "0.24.0"
|
|
50
56
|
},
|
|
51
57
|
"devDependencies": {
|
|
52
58
|
"@types/react": "18.2.42",
|
|
@@ -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
|
+
})
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
interface
|
|
2
|
+
interface WithConditions {
|
|
3
3
|
/**
|
|
4
|
-
* The css
|
|
5
|
-
* @example ['margin', 'padding']
|
|
6
|
-
*/
|
|
7
|
-
properties: {
|
|
8
|
-
[property: string]: string[]
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The css conditions to generate utilities for.
|
|
4
|
+
* The css conditions to generate for the rule.
|
|
12
5
|
* @example ['hover', 'focus']
|
|
13
6
|
*/
|
|
14
7
|
conditions?: string[]
|
|
8
|
+
responsive?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface CssRule extends WithConditions {
|
|
15
12
|
/**
|
|
16
|
-
*
|
|
13
|
+
* The css properties to generate utilities for.
|
|
14
|
+
* @example ['margin', 'padding']
|
|
17
15
|
*/
|
|
18
|
-
|
|
16
|
+
properties: {
|
|
17
|
+
[property: string]: Array<string | number>
|
|
18
|
+
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
interface RecipeRuleVariants {
|
|
22
|
+
[variant: string]: boolean | string[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type RecipeRule = '*' | (RecipeRuleVariants & WithConditions)
|
|
26
|
+
export type PatternRule = '*' | CssRule
|
|
27
27
|
|
|
28
28
|
export interface StaticCssOptions {
|
|
29
29
|
/**
|
|
@@ -36,4 +36,10 @@ export interface StaticCssOptions {
|
|
|
36
36
|
recipes?: {
|
|
37
37
|
[recipe: string]: RecipeRule[]
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* The css patterns to generate.
|
|
41
|
+
*/
|
|
42
|
+
patterns?: {
|
|
43
|
+
[pattern: string]: PatternRule[]
|
|
44
|
+
}
|
|
39
45
|
}
|
package/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './scripts/studio'
|