@stokelp/styled-system 2.126.1 → 3.0.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/css/conditions.d.ts +7 -0
- package/css/conditions.js +32 -0
- package/css/css.d.ts +6 -6
- package/css/css.js +63 -0
- package/css/cva.d.ts +3 -4
- package/css/cva.js +51 -0
- package/css/cx.d.ts +5 -4
- package/css/{cx.mjs → cx.js} +5 -4
- package/css/first-that-works.d.ts +22 -0
- package/css/first-that-works.js +1 -0
- package/css/index.d.ts +8 -5
- package/css/index.js +8 -0
- package/css/keyframes.d.ts +5 -0
- package/css/keyframes.js +8 -0
- package/css/position-try.d.ts +5 -0
- package/css/position-try.js +11 -0
- package/css/sva.d.ts +2 -3
- package/css/sva.js +49 -0
- package/css/view-transition.d.ts +7 -0
- package/css/view-transition.js +18 -0
- package/dist/panda/buildinfo.json +20580 -0
- package/dist/panda/lib.json +15 -0
- package/dist/panda/preset.mjs +9505 -0
- package/helpers.d.ts +67 -0
- package/helpers.js +624 -0
- package/jsx/aspect-ratio.d.ts +5 -8
- package/jsx/aspect-ratio.js +11 -0
- package/jsx/bleed.d.ts +6 -9
- package/jsx/bleed.js +11 -0
- package/jsx/box.d.ts +6 -9
- package/jsx/box.js +11 -0
- package/jsx/center.d.ts +6 -9
- package/jsx/center.js +11 -0
- package/jsx/circle.d.ts +6 -9
- package/jsx/circle.js +11 -0
- package/jsx/container.d.ts +6 -9
- package/jsx/container.js +11 -0
- package/jsx/cq.d.ts +6 -9
- package/jsx/cq.js +11 -0
- package/jsx/create-recipe-context.d.ts +31 -0
- package/jsx/create-recipe-context.js +38 -0
- package/jsx/create-slot-recipe-context.d.ts +49 -0
- package/jsx/create-slot-recipe-context.js +124 -0
- package/jsx/divider.d.ts +6 -9
- package/jsx/divider.js +11 -0
- package/jsx/factory.d.ts +3 -3
- package/jsx/factory.js +91 -0
- package/jsx/flex.d.ts +6 -9
- package/jsx/flex.js +11 -0
- package/jsx/float.d.ts +6 -9
- package/jsx/float.js +11 -0
- package/jsx/grid-item.d.ts +6 -9
- package/jsx/grid-item.js +11 -0
- package/jsx/grid.d.ts +6 -9
- package/jsx/grid.js +11 -0
- package/jsx/helper.d.ts +34 -0
- package/jsx/helper.js +92 -0
- package/jsx/hstack.d.ts +6 -9
- package/jsx/hstack.js +11 -0
- package/jsx/index.d.ts +25 -25
- package/jsx/index.js +24 -0
- package/jsx/is-valid-prop.d.ts +5 -10
- package/jsx/is-valid-prop.js +12 -0
- package/jsx/link-overlay.d.ts +6 -9
- package/jsx/link-overlay.js +11 -0
- package/jsx/spacer.d.ts +6 -9
- package/jsx/spacer.js +11 -0
- package/jsx/square.d.ts +6 -9
- package/jsx/square.js +11 -0
- package/jsx/stack.d.ts +6 -9
- package/jsx/stack.js +11 -0
- package/jsx/visually-hidden.d.ts +6 -9
- package/jsx/visually-hidden.js +11 -0
- package/jsx/vstack.d.ts +6 -9
- package/jsx/vstack.js +11 -0
- package/jsx/wrap.d.ts +6 -9
- package/jsx/wrap.js +11 -0
- package/package.json +32 -18
- package/patterns/aspect-ratio.d.ts +8 -9
- package/patterns/aspect-ratio.js +37 -0
- package/patterns/bleed.d.ts +9 -10
- package/patterns/bleed.js +30 -0
- package/patterns/box.d.ts +8 -11
- package/patterns/box.js +16 -0
- package/patterns/center.d.ts +8 -9
- package/patterns/center.js +22 -0
- package/patterns/circle.d.ts +8 -9
- package/patterns/circle.js +26 -0
- package/patterns/container.d.ts +8 -11
- package/patterns/container.js +26 -0
- package/patterns/cq.d.ts +10 -10
- package/patterns/cq.js +24 -0
- package/patterns/divider.d.ts +11 -11
- package/patterns/divider.js +31 -0
- package/patterns/flex.d.ts +14 -15
- package/patterns/flex.js +27 -0
- package/patterns/float.d.ts +12 -12
- package/patterns/float.js +78 -0
- package/patterns/grid-item.d.ts +13 -14
- package/patterns/grid-item.js +26 -0
- package/patterns/grid.d.ts +13 -13
- package/patterns/grid.js +30 -0
- package/patterns/hstack.d.ts +9 -10
- package/patterns/hstack.js +27 -0
- package/patterns/index.d.ts +20 -21
- package/patterns/index.js +20 -0
- package/patterns/link-overlay.d.ts +8 -11
- package/patterns/link-overlay.js +25 -0
- package/patterns/runtime.js +25 -0
- package/patterns/spacer.d.ts +9 -9
- package/patterns/spacer.js +25 -0
- package/patterns/square.d.ts +8 -9
- package/patterns/square.js +25 -0
- package/patterns/stack.d.ts +11 -12
- package/patterns/stack.js +30 -0
- package/patterns/visually-hidden.d.ts +8 -11
- package/patterns/visually-hidden.js +19 -0
- package/patterns/vstack.d.ts +9 -10
- package/patterns/vstack.js +27 -0
- package/patterns/wrap.d.ts +12 -13
- package/patterns/wrap.js +26 -0
- package/recipes/accordion.d.ts +10 -26
- package/recipes/accordion.js +5 -0
- package/recipes/action-card.d.ts +9 -26
- package/recipes/action-card.js +5 -0
- package/recipes/alert.d.ts +10 -28
- package/recipes/alert.js +5 -0
- package/recipes/app-navigation-language-select.d.ts +12 -34
- package/recipes/app-navigation-language-select.js +5 -0
- package/recipes/app-navigation.d.ts +10 -28
- package/recipes/app-navigation.js +5 -0
- package/recipes/avatar-group.d.ts +8 -26
- package/recipes/avatar-group.js +5 -0
- package/recipes/avatar.d.ts +11 -30
- package/recipes/avatar.js +5 -0
- package/recipes/breadcrumb.d.ts +9 -24
- package/recipes/breadcrumb.js +5 -0
- package/recipes/button-filter.d.ts +8 -27
- package/recipes/button-filter.js +5 -0
- package/recipes/button.d.ts +10 -37
- package/recipes/button.js +5 -0
- package/recipes/chat-document-message.d.ts +8 -27
- package/recipes/chat-document-message.js +5 -0
- package/recipes/chat-message.d.ts +10 -33
- package/recipes/chat-message.js +5 -0
- package/recipes/chat-profile-avatar.d.ts +9 -29
- package/recipes/chat-profile-avatar.js +5 -0
- package/recipes/chat-text-input.d.ts +8 -27
- package/recipes/chat-text-input.js +5 -0
- package/recipes/chat.d.ts +9 -26
- package/recipes/chat.js +5 -0
- package/recipes/checkbox-card.d.ts +10 -26
- package/recipes/checkbox-card.js +5 -0
- package/recipes/checkbox-group.d.ts +7 -24
- package/recipes/checkbox-group.js +5 -0
- package/recipes/checkbox.d.ts +10 -26
- package/recipes/checkbox.js +5 -0
- package/recipes/chip.d.ts +11 -32
- package/recipes/chip.js +5 -0
- package/recipes/collapsible.d.ts +9 -24
- package/recipes/collapsible.js +5 -0
- package/recipes/combobox.d.ts +11 -27
- package/recipes/combobox.js +5 -0
- package/recipes/datepicker.d.ts +9 -24
- package/recipes/datepicker.js +5 -0
- package/recipes/dialog.d.ts +9 -24
- package/recipes/dialog.js +5 -0
- package/recipes/drawer.d.ts +10 -26
- package/recipes/drawer.js +5 -0
- package/recipes/flag.d.ts +8 -26
- package/recipes/flag.js +5 -0
- package/recipes/form-control.d.ts +8 -27
- package/recipes/form-control.js +5 -0
- package/recipes/form-helper-text.d.ts +8 -27
- package/recipes/form-helper-text.js +5 -0
- package/recipes/form-label.d.ts +10 -28
- package/recipes/form-label.js +5 -0
- package/recipes/heading.d.ts +10 -28
- package/recipes/heading.js +5 -0
- package/recipes/highlighted-input.d.ts +9 -26
- package/recipes/highlighted-input.js +5 -0
- package/recipes/icon-button.d.ts +10 -37
- package/recipes/icon-button.js +5 -0
- package/recipes/icon.d.ts +8 -26
- package/recipes/icon.js +5 -0
- package/recipes/illustration.d.ts +9 -29
- package/recipes/illustration.js +5 -0
- package/recipes/index.d.ts +62 -63
- package/recipes/index.js +62 -0
- package/recipes/input-addon.d.ts +8 -27
- package/recipes/input-addon.js +5 -0
- package/recipes/input-group.d.ts +8 -27
- package/recipes/input-group.js +5 -0
- package/recipes/input.d.ts +9 -29
- package/recipes/input.js +5 -0
- package/recipes/menu.d.ts +10 -26
- package/recipes/menu.js +5 -0
- package/recipes/mobile-navigation.d.ts +10 -28
- package/recipes/mobile-navigation.js +5 -0
- package/recipes/pagination.d.ts +9 -26
- package/recipes/pagination.js +5 -0
- package/recipes/phone-number-input.d.ts +9 -29
- package/recipes/phone-number-input.js +5 -0
- package/recipes/popover.d.ts +9 -24
- package/recipes/popover.js +5 -0
- package/recipes/price-tag.d.ts +10 -26
- package/recipes/price-tag.js +5 -0
- package/recipes/product-card-catalog.d.ts +9 -26
- package/recipes/product-card-catalog.js +5 -0
- package/recipes/radio-button-group.d.ts +10 -26
- package/recipes/radio-button-group.js +5 -0
- package/recipes/radio-card-group.d.ts +10 -26
- package/recipes/radio-card-group.js +5 -0
- package/recipes/radio-group.d.ts +10 -26
- package/recipes/radio-group.js +5 -0
- package/recipes/runtime.js +133 -0
- package/recipes/select-language.d.ts +10 -26
- package/recipes/select-language.js +5 -0
- package/recipes/select.d.ts +11 -27
- package/recipes/select.js +5 -0
- package/recipes/status-tag-select.d.ts +11 -30
- package/recipes/status-tag-select.js +5 -0
- package/recipes/steps.d.ts +9 -24
- package/recipes/steps.js +5 -0
- package/recipes/switch-card.d.ts +10 -26
- package/recipes/switch-card.js +5 -0
- package/recipes/switch-recipe.d.ts +10 -26
- package/recipes/switch-recipe.js +5 -0
- package/recipes/table-container.d.ts +7 -24
- package/recipes/table-container.js +5 -0
- package/recipes/table-empty-row.d.ts +7 -24
- package/recipes/table-empty-row.js +5 -0
- package/recipes/table-group-title.d.ts +8 -26
- package/recipes/table-group-title.js +5 -0
- package/recipes/table.d.ts +9 -24
- package/recipes/table.js +5 -0
- package/recipes/tabs-chip.d.ts +9 -29
- package/recipes/tabs-chip.js +5 -0
- package/recipes/tabs.d.ts +11 -30
- package/recipes/tabs.js +5 -0
- package/recipes/tag.d.ts +11 -32
- package/recipes/tag.js +5 -0
- package/recipes/text.d.ts +12 -30
- package/recipes/text.js +5 -0
- package/recipes/textarea.d.ts +7 -24
- package/recipes/textarea.js +5 -0
- package/recipes/tooltip.d.ts +9 -24
- package/recipes/tooltip.js +5 -0
- package/tokens/index.d.ts +4 -5
- package/tokens/index.js +18 -0
- package/types/index.d.ts +6 -8
- package/types/jsx.d.ts +37 -28
- package/types/pattern.d.ts +18 -70
- package/types/recipe.d.ts +58 -150
- package/types/register.d.ts +40 -0
- package/types/system.d.ts +1816 -0
- package/types/tokens.d.ts +72 -0
- package/css/conditions.mjs +0 -36
- package/css/css.mjs +0 -45
- package/css/cva.mjs +0 -87
- package/css/index.mjs +0 -4
- package/css/sva.mjs +0 -46
- package/helpers.mjs +0 -328
- package/jsx/aspect-ratio.mjs +0 -14
- package/jsx/bleed.mjs +0 -14
- package/jsx/box.mjs +0 -14
- package/jsx/center.mjs +0 -14
- package/jsx/circle.mjs +0 -14
- package/jsx/container.mjs +0 -14
- package/jsx/cq.mjs +0 -14
- package/jsx/create-style-context.d.ts +0 -54
- package/jsx/create-style-context.mjs +0 -118
- package/jsx/divider.mjs +0 -14
- package/jsx/factory-helper.mjs +0 -22
- package/jsx/factory.mjs +0 -89
- package/jsx/flex.mjs +0 -14
- package/jsx/float.mjs +0 -14
- package/jsx/grid-item.mjs +0 -14
- package/jsx/grid.mjs +0 -14
- package/jsx/hstack.mjs +0 -14
- package/jsx/index.mjs +0 -23
- package/jsx/is-valid-prop.mjs +0 -17
- package/jsx/link-overlay.mjs +0 -14
- package/jsx/spacer.mjs +0 -14
- package/jsx/square.mjs +0 -14
- package/jsx/stack.mjs +0 -14
- package/jsx/visually-hidden.mjs +0 -14
- package/jsx/vstack.mjs +0 -14
- package/jsx/wrap.mjs +0 -14
- package/panda.buildinfo.json +0 -471
- package/patterns/aspect-ratio.mjs +0 -38
- package/patterns/bleed.mjs +0 -24
- package/patterns/box.mjs +0 -15
- package/patterns/center.mjs +0 -21
- package/patterns/circle.mjs +0 -25
- package/patterns/container.mjs +0 -21
- package/patterns/cq.mjs +0 -21
- package/patterns/divider.mjs +0 -25
- package/patterns/flex.mjs +0 -26
- package/patterns/float.mjs +0 -52
- package/patterns/grid-item.mjs +0 -25
- package/patterns/grid.mjs +0 -27
- package/patterns/hstack.mjs +0 -24
- package/patterns/index.mjs +0 -20
- package/patterns/link-overlay.mjs +0 -24
- package/patterns/spacer.mjs +0 -25
- package/patterns/square.mjs +0 -24
- package/patterns/stack.mjs +0 -24
- package/patterns/visually-hidden.mjs +0 -18
- package/patterns/vstack.mjs +0 -24
- package/patterns/wrap.mjs +0 -25
- package/recipes/accordion.mjs +0 -57
- package/recipes/action-card.mjs +0 -45
- package/recipes/alert.mjs +0 -57
- package/recipes/app-navigation-language-select.mjs +0 -109
- package/recipes/app-navigation.mjs +0 -84
- package/recipes/avatar-group.mjs +0 -32
- package/recipes/avatar.mjs +0 -57
- package/recipes/breadcrumb.mjs +0 -45
- package/recipes/button-filter.mjs +0 -24
- package/recipes/button.mjs +0 -212
- package/recipes/chat-document-message.mjs +0 -24
- package/recipes/chat-message.mjs +0 -36
- package/recipes/chat-profile-avatar.mjs +0 -31
- package/recipes/chat-text-input.mjs +0 -24
- package/recipes/chat.mjs +0 -45
- package/recipes/checkbox-card.mjs +0 -73
- package/recipes/checkbox-group.mjs +0 -24
- package/recipes/checkbox.mjs +0 -57
- package/recipes/chip.mjs +0 -76
- package/recipes/collapsible.mjs +0 -45
- package/recipes/combobox.mjs +0 -101
- package/recipes/create-recipe.mjs +0 -82
- package/recipes/datepicker.mjs +0 -133
- package/recipes/dialog.mjs +0 -69
- package/recipes/drawer.mjs +0 -78
- package/recipes/flag.mjs +0 -33
- package/recipes/form-control.mjs +0 -24
- package/recipes/form-helper-text.mjs +0 -24
- package/recipes/form-label.mjs +0 -50
- package/recipes/heading.mjs +0 -41
- package/recipes/highlighted-input.mjs +0 -45
- package/recipes/icon-button.mjs +0 -233
- package/recipes/icon.mjs +0 -34
- package/recipes/illustration.mjs +0 -37
- package/recipes/index.mjs +0 -62
- package/recipes/input-addon.mjs +0 -24
- package/recipes/input-group.mjs +0 -24
- package/recipes/input.mjs +0 -30
- package/recipes/menu.mjs +0 -93
- package/recipes/mobile-navigation.mjs +0 -56
- package/recipes/pagination.mjs +0 -41
- package/recipes/phone-number-input.mjs +0 -30
- package/recipes/popover.mjs +0 -69
- package/recipes/price-tag.mjs +0 -51
- package/recipes/product-card-catalog.mjs +0 -73
- package/recipes/radio-button-group.mjs +0 -62
- package/recipes/radio-card-group.mjs +0 -77
- package/recipes/radio-group.mjs +0 -61
- package/recipes/select-language.mjs +0 -98
- package/recipes/select.mjs +0 -101
- package/recipes/status-tag-select.mjs +0 -108
- package/recipes/steps.mjs +0 -69
- package/recipes/switch-card.mjs +0 -69
- package/recipes/switch-recipe.mjs +0 -53
- package/recipes/table-container.mjs +0 -24
- package/recipes/table-empty-row.mjs +0 -24
- package/recipes/table-group-title.mjs +0 -32
- package/recipes/table.mjs +0 -61
- package/recipes/tabs-chip.mjs +0 -35
- package/recipes/tabs.mjs +0 -63
- package/recipes/tag.mjs +0 -57
- package/recipes/text.mjs +0 -41
- package/recipes/textarea.mjs +0 -24
- package/recipes/tooltip.mjs +0 -49
- package/tokens/index.mjs +0 -1728
- package/tokens/tokens.d.ts +0 -63
- package/types/composition.d.ts +0 -227
- package/types/conditions.d.ts +0 -300
- package/types/csstype.d.ts +0 -22570
- package/types/global.d.ts +0 -20
- package/types/parts.d.ts +0 -8
- package/types/prop-type.d.ts +0 -251
- package/types/selectors.d.ts +0 -59
- package/types/static-css.d.ts +0 -56
- package/types/style-props.d.ts +0 -8089
- package/types/system-types.d.ts +0 -151
package/jsx/bleed.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getBleedStyle } from '../patterns/bleed.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Bleed = /* @__PURE__ */ forwardRef(function Bleed(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["inline","block"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getBleedStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/box.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getBoxStyle } from '../patterns/box.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Box = /* @__PURE__ */ forwardRef(function Box(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
-
|
|
10
|
-
const styleProps = getBoxStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/center.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getCenterStyle } from '../patterns/center.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Center = /* @__PURE__ */ forwardRef(function Center(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["inline"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getCenterStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/circle.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getCircleStyle } from '../patterns/circle.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Circle = /* @__PURE__ */ forwardRef(function Circle(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getCircleStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/container.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getContainerStyle } from '../patterns/container.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Container = /* @__PURE__ */ forwardRef(function Container(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
-
|
|
10
|
-
const styleProps = getContainerStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/cq.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getCqStyle } from '../patterns/cq.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Cq = /* @__PURE__ */ forwardRef(function Cq(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["name","type"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getCqStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import type { SlotRecipeRuntimeFn, RecipeVariantProps } from '../types/recipe';
|
|
3
|
-
import type { JsxHTMLProps, JsxStyleProps, Assign } from '../types/system-types';
|
|
4
|
-
import type { JsxFactoryOptions, ComponentProps, DataAttrs, AsProps } from '../types/jsx';
|
|
5
|
-
import type { ComponentType, ElementType } from 'react'
|
|
6
|
-
|
|
7
|
-
interface UnstyledProps {
|
|
8
|
-
unstyled?: boolean | undefined
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
type SvaFn<S extends string = any> = SlotRecipeRuntimeFn<S, any>
|
|
12
|
-
interface SlotRecipeFn {
|
|
13
|
-
__type: any
|
|
14
|
-
__slot: string
|
|
15
|
-
(props?: any): any
|
|
16
|
-
}
|
|
17
|
-
type SlotRecipe = SvaFn | SlotRecipeFn
|
|
18
|
-
|
|
19
|
-
type InferSlot<R extends SlotRecipe> = R extends SlotRecipeFn ? R['__slot'] : R extends SvaFn<infer S> ? S : never
|
|
20
|
-
|
|
21
|
-
interface WithProviderOptions<P = {}> {
|
|
22
|
-
defaultProps?: (Partial<P> & DataAttrs) | undefined
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
26
|
-
JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<RecipeVariantProps<R>, JsxStyleProps>>
|
|
27
|
-
>
|
|
28
|
-
|
|
29
|
-
type StyleContextRootProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
30
|
-
ComponentProps<T> & UnstyledProps & RecipeVariantProps<R>
|
|
31
|
-
>
|
|
32
|
-
|
|
33
|
-
type StyleContextConsumer<T extends ElementType> = ComponentType<
|
|
34
|
-
JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
35
|
-
>
|
|
36
|
-
|
|
37
|
-
export interface StyleContext<R extends SlotRecipe> {
|
|
38
|
-
withRootProvider: <T extends ElementType>(
|
|
39
|
-
Component: T,
|
|
40
|
-
options?: WithProviderOptions<ComponentProps<T>> | undefined
|
|
41
|
-
) => StyleContextRootProvider<T, R>
|
|
42
|
-
withProvider: <T extends ElementType>(
|
|
43
|
-
Component: T,
|
|
44
|
-
slot: InferSlot<R>,
|
|
45
|
-
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
46
|
-
) => StyleContextProvider<T, R>
|
|
47
|
-
withContext: <T extends ElementType>(
|
|
48
|
-
Component: T,
|
|
49
|
-
slot: InferSlot<R>,
|
|
50
|
-
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
51
|
-
) => StyleContextConsumer<T>
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export declare function createStyleContext<R extends SlotRecipe>(recipe: R): StyleContext<R>
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { cx, css, sva } from '../css/index.mjs';
|
|
4
|
-
import { styled } from './factory.mjs';
|
|
5
|
-
import { getDisplayName } from './factory-helper.mjs';
|
|
6
|
-
import { createContext, useContext, createElement, forwardRef } from 'react'
|
|
7
|
-
|
|
8
|
-
function createSafeContext(contextName) {
|
|
9
|
-
const Context = createContext(undefined)
|
|
10
|
-
const useStyleContext = (componentName, slot) => {
|
|
11
|
-
const context = useContext(Context)
|
|
12
|
-
if (context === undefined) {
|
|
13
|
-
const componentInfo = componentName ? `Component "${componentName}"` : 'A component'
|
|
14
|
-
const slotInfo = slot ? ` (slot: "${slot}")` : ''
|
|
15
|
-
|
|
16
|
-
throw new Error(
|
|
17
|
-
`${componentInfo}${slotInfo} cannot access ${contextName} because it's missing its Provider.`
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
return context
|
|
21
|
-
}
|
|
22
|
-
return [Context, useStyleContext]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function createStyleContext(recipe) {
|
|
26
|
-
const isConfigRecipe = '__recipe__' in recipe
|
|
27
|
-
const recipeName = isConfigRecipe && recipe.__name__ ? recipe.__name__ : undefined
|
|
28
|
-
const contextName = recipeName ? `createStyleContext("${recipeName}")` : 'createStyleContext'
|
|
29
|
-
|
|
30
|
-
const [StyleContext, useStyleContext] = createSafeContext(contextName)
|
|
31
|
-
const svaFn = isConfigRecipe ? recipe : sva(recipe.config)
|
|
32
|
-
|
|
33
|
-
const getResolvedProps = (props, slotStyles) => {
|
|
34
|
-
const { unstyled, ...restProps } = props
|
|
35
|
-
if (unstyled) return restProps
|
|
36
|
-
if (isConfigRecipe) {
|
|
37
|
-
return { ...restProps, className: cx(slotStyles, restProps.className) }
|
|
38
|
-
}
|
|
39
|
-
return { ...slotStyles, ...restProps }
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const withRootProvider = (Component, options) => {
|
|
43
|
-
const WithRootProvider = (props) => {
|
|
44
|
-
const [variantProps, otherProps] = svaFn.splitVariantProps(props)
|
|
45
|
-
|
|
46
|
-
const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
|
|
47
|
-
slotStyles._classNameMap = svaFn.classNameMap
|
|
48
|
-
|
|
49
|
-
const mergedProps = options?.defaultProps
|
|
50
|
-
? { ...options.defaultProps, ...otherProps }
|
|
51
|
-
: otherProps
|
|
52
|
-
|
|
53
|
-
return createElement(StyleContext.Provider, {
|
|
54
|
-
value: slotStyles,
|
|
55
|
-
children: createElement(Component, mergedProps)
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const componentName = getDisplayName(Component)
|
|
60
|
-
WithRootProvider.displayName = `withRootProvider(${componentName})`
|
|
61
|
-
|
|
62
|
-
return WithRootProvider
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const withProvider = (Component, slot, options) => {
|
|
66
|
-
const StyledComponent = styled(Component, {}, options)
|
|
67
|
-
|
|
68
|
-
const WithProvider = forwardRef((props, ref) => {
|
|
69
|
-
const [variantProps, restProps] = svaFn.splitVariantProps(props)
|
|
70
|
-
|
|
71
|
-
const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
|
|
72
|
-
slotStyles._classNameMap = svaFn.classNameMap
|
|
73
|
-
|
|
74
|
-
const propsWithClass = { ...restProps, className: restProps.className ?? options?.defaultProps?.className }
|
|
75
|
-
const resolvedProps = getResolvedProps(propsWithClass, slotStyles[slot])
|
|
76
|
-
return createElement(StyleContext.Provider, {
|
|
77
|
-
value: slotStyles,
|
|
78
|
-
children: createElement(StyledComponent, {
|
|
79
|
-
...resolvedProps,
|
|
80
|
-
className: cx(resolvedProps.className, slotStyles._classNameMap[slot]),
|
|
81
|
-
ref,
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
const componentName = getDisplayName(Component)
|
|
87
|
-
WithProvider.displayName = `withProvider(${componentName})`
|
|
88
|
-
|
|
89
|
-
return WithProvider
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const withContext = (Component, slot, options) => {
|
|
93
|
-
const StyledComponent = styled(Component, {}, options)
|
|
94
|
-
const componentName = getDisplayName(Component)
|
|
95
|
-
|
|
96
|
-
const WithContext = forwardRef((props, ref) => {
|
|
97
|
-
const slotStyles = useStyleContext(componentName, slot)
|
|
98
|
-
|
|
99
|
-
const propsWithClass = { ...props, className: props.className ?? options?.defaultProps?.className }
|
|
100
|
-
const resolvedProps = getResolvedProps(propsWithClass, slotStyles[slot])
|
|
101
|
-
return createElement(StyledComponent, {
|
|
102
|
-
...resolvedProps,
|
|
103
|
-
className: cx(resolvedProps.className, slotStyles._classNameMap[slot]),
|
|
104
|
-
ref,
|
|
105
|
-
})
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
WithContext.displayName = `withContext(${componentName})`
|
|
109
|
-
|
|
110
|
-
return WithContext
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return {
|
|
114
|
-
withRootProvider,
|
|
115
|
-
withProvider,
|
|
116
|
-
withContext,
|
|
117
|
-
}
|
|
118
|
-
}
|
package/jsx/divider.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getDividerStyle } from '../patterns/divider.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Divider = /* @__PURE__ */ forwardRef(function Divider(props, ref) {
|
|
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(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/factory-helper.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { isCssProperty } from './is-valid-prop.mjs';
|
|
2
|
-
|
|
3
|
-
export const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop)
|
|
4
|
-
|
|
5
|
-
export const composeShouldForwardProps = (tag, shouldForwardProp) =>
|
|
6
|
-
tag.__shouldForwardProps__ && shouldForwardProp
|
|
7
|
-
? (propName) => tag.__shouldForwardProps__(propName) && shouldForwardProp(propName)
|
|
8
|
-
: shouldForwardProp
|
|
9
|
-
|
|
10
|
-
export const composeCvaFn = (cvaA, cvaB) => {
|
|
11
|
-
if (cvaA && !cvaB) return cvaA
|
|
12
|
-
if (!cvaA && cvaB) return cvaB
|
|
13
|
-
if ((cvaA.__cva__ && cvaB.__cva__) || (cvaA.__recipe__ && cvaB.__recipe__)) return cvaA.merge(cvaB)
|
|
14
|
-
const error = new TypeError('Cannot merge cva with recipe. Please use either cva or recipe.')
|
|
15
|
-
TypeError.captureStackTrace?.(error)
|
|
16
|
-
throw error
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const getDisplayName = (Component) => {
|
|
20
|
-
if (typeof Component === 'string') return Component
|
|
21
|
-
return Component?.displayName || Component?.name || 'Component'
|
|
22
|
-
}
|
package/jsx/factory.mjs
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef, useMemo } from 'react'
|
|
2
|
-
import { css, cx, cva } from '../css/index.mjs';
|
|
3
|
-
import { defaultShouldForwardProp, composeShouldForwardProps, composeCvaFn, getDisplayName } from './factory-helper.mjs';
|
|
4
|
-
import { splitProps, normalizeHTMLProps } from '../helpers.mjs';
|
|
5
|
-
import { isCssProperty } from './is-valid-prop.mjs';
|
|
6
|
-
|
|
7
|
-
function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
8
|
-
const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva)
|
|
9
|
-
|
|
10
|
-
const forwardFn = options.shouldForwardProp || defaultShouldForwardProp
|
|
11
|
-
const shouldForwardProp = (prop) => {
|
|
12
|
-
if (options.forwardProps?.includes(prop)) return true
|
|
13
|
-
return forwardFn(prop, cvaFn.variantKeys)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const defaultProps = Object.assign(
|
|
17
|
-
options.dataAttr && configOrCva.__name__ ? { 'data-recipe': configOrCva.__name__ } : {},
|
|
18
|
-
options.defaultProps,
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
const __cvaFn__ = composeCvaFn(Dynamic.__cva__, cvaFn)
|
|
22
|
-
const __shouldForwardProps__ = composeShouldForwardProps(Dynamic, shouldForwardProp)
|
|
23
|
-
const __base__ = Dynamic.__base__ || Dynamic
|
|
24
|
-
|
|
25
|
-
const StyledComponent = /* @__PURE__ */ forwardRef(function StyledComponent(props, ref) {
|
|
26
|
-
const { as: Element = __base__, unstyled, children, ...restProps } = props
|
|
27
|
-
|
|
28
|
-
const combinedProps = useMemo(() => Object.assign({}, defaultProps, restProps), [restProps])
|
|
29
|
-
|
|
30
|
-
const [htmlProps, forwardedProps, variantProps, styleProps, elementProps] = useMemo(() => {
|
|
31
|
-
return splitProps(combinedProps, normalizeHTMLProps.keys, __shouldForwardProps__, __cvaFn__.variantKeys, isCssProperty)
|
|
32
|
-
}, [combinedProps])
|
|
33
|
-
|
|
34
|
-
function recipeClass() {
|
|
35
|
-
const { css: cssStyles, ...propStyles } = styleProps
|
|
36
|
-
const compoundVariantStyles = __cvaFn__.__getCompoundVariantCss__?.(variantProps)
|
|
37
|
-
return cx(__cvaFn__(variantProps, false), css(compoundVariantStyles, propStyles, cssStyles), combinedProps.className)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function cvaClass() {
|
|
41
|
-
const { css: cssStyles, ...propStyles } = styleProps
|
|
42
|
-
const cvaStyles = __cvaFn__.raw(variantProps)
|
|
43
|
-
return cx(css(cvaStyles, propStyles, cssStyles), combinedProps.className)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const classes = () => {
|
|
47
|
-
if (unstyled) {
|
|
48
|
-
const { css: cssStyles, ...propStyles } = styleProps
|
|
49
|
-
return cx(css(propStyles, cssStyles), combinedProps.className)
|
|
50
|
-
}
|
|
51
|
-
return configOrCva.__recipe__ ? recipeClass() : cvaClass()
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return createElement(Element, {
|
|
55
|
-
ref,
|
|
56
|
-
...forwardedProps,
|
|
57
|
-
...elementProps,
|
|
58
|
-
...normalizeHTMLProps(htmlProps),
|
|
59
|
-
className: classes(),
|
|
60
|
-
}, children ?? combinedProps.children)
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
const name = getDisplayName(__base__)
|
|
64
|
-
|
|
65
|
-
StyledComponent.displayName = `styled.${name}`
|
|
66
|
-
StyledComponent.__cva__ = __cvaFn__
|
|
67
|
-
StyledComponent.__base__ = __base__
|
|
68
|
-
StyledComponent.__shouldForwardProps__ = shouldForwardProp
|
|
69
|
-
|
|
70
|
-
return StyledComponent
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function createJsxFactory() {
|
|
74
|
-
const cache = new Map()
|
|
75
|
-
|
|
76
|
-
return new Proxy(styledFn, {
|
|
77
|
-
apply(_, __, args) {
|
|
78
|
-
return styledFn(...args)
|
|
79
|
-
},
|
|
80
|
-
get(_, el) {
|
|
81
|
-
if (!cache.has(el)) {
|
|
82
|
-
cache.set(el, styledFn(el))
|
|
83
|
-
}
|
|
84
|
-
return cache.get(el)
|
|
85
|
-
},
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export const styled = /* @__PURE__ */ createJsxFactory()
|
package/jsx/flex.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getFlexStyle } from '../patterns/flex.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Flex = /* @__PURE__ */ forwardRef(function Flex(props, ref) {
|
|
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(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/float.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getFloatStyle } from '../patterns/float.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Float = /* @__PURE__ */ forwardRef(function Float(props, ref) {
|
|
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(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/grid-item.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getGridItemStyle } from '../patterns/grid-item.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const GridItem = /* @__PURE__ */ forwardRef(function GridItem(props, ref) {
|
|
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(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/grid.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getGridStyle } from '../patterns/grid.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Grid = /* @__PURE__ */ forwardRef(function Grid(props, ref) {
|
|
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(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/hstack.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getHstackStyle } from '../patterns/hstack.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const HStack = /* @__PURE__ */ forwardRef(function HStack(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["justify","gap"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getHstackStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/index.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export * from './factory.mjs';
|
|
2
|
-
export * from './is-valid-prop.mjs';
|
|
3
|
-
export * from './create-style-context.mjs';
|
|
4
|
-
export * from './box.mjs';
|
|
5
|
-
export * from './flex.mjs';
|
|
6
|
-
export * from './stack.mjs';
|
|
7
|
-
export * from './vstack.mjs';
|
|
8
|
-
export * from './hstack.mjs';
|
|
9
|
-
export * from './spacer.mjs';
|
|
10
|
-
export * from './square.mjs';
|
|
11
|
-
export * from './circle.mjs';
|
|
12
|
-
export * from './center.mjs';
|
|
13
|
-
export * from './link-overlay.mjs';
|
|
14
|
-
export * from './aspect-ratio.mjs';
|
|
15
|
-
export * from './grid.mjs';
|
|
16
|
-
export * from './grid-item.mjs';
|
|
17
|
-
export * from './wrap.mjs';
|
|
18
|
-
export * from './container.mjs';
|
|
19
|
-
export * from './divider.mjs';
|
|
20
|
-
export * from './float.mjs';
|
|
21
|
-
export * from './bleed.mjs';
|
|
22
|
-
export * from './visually-hidden.mjs';
|
|
23
|
-
export * from './cq.mjs';
|
package/jsx/is-valid-prop.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
2
|
-
import { memo } from '../helpers.mjs';
|
|
3
|
-
// src/index.ts
|
|
4
|
-
var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,WebkitTextFillColor,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_liveQuoteTheme,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_collapsed,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,@/lg,@/md,@/sm,@/xl,@/xs,textStyle"
|
|
5
|
-
var userGenerated = userGeneratedStr.split(",");
|
|
6
|
-
var cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,cornerShape,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical";
|
|
7
|
-
var allCssProperties = cssPropertiesStr.split(",").concat(userGenerated);
|
|
8
|
-
var properties = new Map(allCssProperties.map((prop) => [prop, true]));
|
|
9
|
-
var cssPropertySelectorRegex = /&|@/;
|
|
10
|
-
var isCssProperty = /* @__PURE__ */ memo((prop) => {
|
|
11
|
-
return properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop);
|
|
12
|
-
});
|
|
13
|
-
export {
|
|
14
|
-
allCssProperties,
|
|
15
|
-
isCssProperty
|
|
16
|
-
};
|
|
17
|
-
export const splitCssProps = (props) => splitProps(props, isCssProperty)
|
package/jsx/link-overlay.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getLinkOverlayStyle } from '../patterns/link-overlay.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const LinkOverlay = /* @__PURE__ */ forwardRef(function LinkOverlay(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
-
|
|
10
|
-
const styleProps = getLinkOverlayStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.a, mergedProps)
|
|
14
|
-
})
|
package/jsx/spacer.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getSpacerStyle } from '../patterns/spacer.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Spacer = /* @__PURE__ */ forwardRef(function Spacer(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getSpacerStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/square.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getSquareStyle } from '../patterns/square.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Square = /* @__PURE__ */ forwardRef(function Square(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getSquareStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/stack.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getStackStyle } from '../patterns/stack.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Stack = /* @__PURE__ */ forwardRef(function Stack(props, ref) {
|
|
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(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/visually-hidden.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getVisuallyHiddenStyle } from '../patterns/visually-hidden.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
-
|
|
10
|
-
const styleProps = getVisuallyHiddenStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/vstack.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getVstackStyle } from '../patterns/vstack.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const VStack = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["justify","gap"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getVstackStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
package/jsx/wrap.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getWrapStyle } from '../patterns/wrap.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Wrap = /* @__PURE__ */ forwardRef(function Wrap(props, ref) {
|
|
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(styled.div, mergedProps)
|
|
14
|
-
})
|