@stokelp/styled-system 2.127.0 → 3.0.1
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 -61
- 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
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const checkboxGroupFn = /* @__PURE__ */ createRecipe('checkbox-group', {}, [])
|
|
5
|
-
|
|
6
|
-
const checkboxGroupVariantMap = {}
|
|
7
|
-
|
|
8
|
-
const checkboxGroupVariantKeys = Object.keys(checkboxGroupVariantMap)
|
|
9
|
-
|
|
10
|
-
export const checkboxGroup = /* @__PURE__ */ Object.assign(memo(checkboxGroupFn.recipeFn), {
|
|
11
|
-
__recipe__: true,
|
|
12
|
-
__name__: 'checkboxGroup',
|
|
13
|
-
__getCompoundVariantCss__: checkboxGroupFn.__getCompoundVariantCss__,
|
|
14
|
-
raw: (props) => props,
|
|
15
|
-
variantKeys: checkboxGroupVariantKeys,
|
|
16
|
-
variantMap: checkboxGroupVariantMap,
|
|
17
|
-
merge(recipe) {
|
|
18
|
-
return mergeRecipes(this, recipe)
|
|
19
|
-
},
|
|
20
|
-
splitVariantProps(props) {
|
|
21
|
-
return splitProps(props, checkboxGroupVariantKeys)
|
|
22
|
-
},
|
|
23
|
-
getVariantProps: checkboxGroupFn.getVariantProps,
|
|
24
|
-
})
|
package/recipes/checkbox.mjs
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const checkboxDefaultVariants = {
|
|
5
|
-
"size": "md"
|
|
6
|
-
}
|
|
7
|
-
const checkboxCompoundVariants = []
|
|
8
|
-
|
|
9
|
-
const checkboxSlotNames = [
|
|
10
|
-
[
|
|
11
|
-
"root",
|
|
12
|
-
"checkbox__root"
|
|
13
|
-
],
|
|
14
|
-
[
|
|
15
|
-
"label",
|
|
16
|
-
"checkbox__label"
|
|
17
|
-
],
|
|
18
|
-
[
|
|
19
|
-
"control",
|
|
20
|
-
"checkbox__control"
|
|
21
|
-
],
|
|
22
|
-
[
|
|
23
|
-
"indicator",
|
|
24
|
-
"checkbox__indicator"
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
"group",
|
|
28
|
-
"checkbox__group"
|
|
29
|
-
]
|
|
30
|
-
]
|
|
31
|
-
const checkboxSlotFns = /* @__PURE__ */ checkboxSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, checkboxDefaultVariants, getSlotCompoundVariant(checkboxCompoundVariants, slotName))])
|
|
32
|
-
|
|
33
|
-
const checkboxFn = memo((props = {}) => {
|
|
34
|
-
return Object.fromEntries(checkboxSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
const checkboxVariantKeys = [
|
|
38
|
-
"size"
|
|
39
|
-
]
|
|
40
|
-
const getVariantProps = (variants) => ({ ...checkboxDefaultVariants, ...compact(variants) })
|
|
41
|
-
|
|
42
|
-
export const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
|
|
43
|
-
__recipe__: false,
|
|
44
|
-
__name__: 'checkbox',
|
|
45
|
-
raw: (props) => props,
|
|
46
|
-
classNameMap: {},
|
|
47
|
-
variantKeys: checkboxVariantKeys,
|
|
48
|
-
variantMap: {
|
|
49
|
-
"size": [
|
|
50
|
-
"md"
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
splitVariantProps(props) {
|
|
54
|
-
return splitProps(props, checkboxVariantKeys)
|
|
55
|
-
},
|
|
56
|
-
getVariantProps
|
|
57
|
-
})
|
package/recipes/chip.mjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const chipDefaultVariants = {
|
|
5
|
-
"size": "md",
|
|
6
|
-
"colorScheme": "secondary"
|
|
7
|
-
}
|
|
8
|
-
const chipCompoundVariants = []
|
|
9
|
-
|
|
10
|
-
const chipSlotNames = [
|
|
11
|
-
[
|
|
12
|
-
"root",
|
|
13
|
-
"chip__root"
|
|
14
|
-
],
|
|
15
|
-
[
|
|
16
|
-
"avatar",
|
|
17
|
-
"chip__avatar"
|
|
18
|
-
],
|
|
19
|
-
[
|
|
20
|
-
"body",
|
|
21
|
-
"chip__body"
|
|
22
|
-
],
|
|
23
|
-
[
|
|
24
|
-
"clearTrigger",
|
|
25
|
-
"chip__clearTrigger"
|
|
26
|
-
]
|
|
27
|
-
]
|
|
28
|
-
const chipSlotFns = /* @__PURE__ */ chipSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, chipDefaultVariants, getSlotCompoundVariant(chipCompoundVariants, slotName))])
|
|
29
|
-
|
|
30
|
-
const chipFn = memo((props = {}) => {
|
|
31
|
-
return Object.fromEntries(chipSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
const chipVariantKeys = [
|
|
35
|
-
"size",
|
|
36
|
-
"colorScheme"
|
|
37
|
-
]
|
|
38
|
-
const getVariantProps = (variants) => ({ ...chipDefaultVariants, ...compact(variants) })
|
|
39
|
-
|
|
40
|
-
export const chip = /* @__PURE__ */ Object.assign(chipFn, {
|
|
41
|
-
__recipe__: false,
|
|
42
|
-
__name__: 'chip',
|
|
43
|
-
raw: (props) => props,
|
|
44
|
-
classNameMap: {},
|
|
45
|
-
variantKeys: chipVariantKeys,
|
|
46
|
-
variantMap: {
|
|
47
|
-
"size": [
|
|
48
|
-
"lg",
|
|
49
|
-
"md",
|
|
50
|
-
"sm"
|
|
51
|
-
],
|
|
52
|
-
"colorScheme": [
|
|
53
|
-
"secondary",
|
|
54
|
-
"grey",
|
|
55
|
-
"red",
|
|
56
|
-
"yellow",
|
|
57
|
-
"green",
|
|
58
|
-
"blue",
|
|
59
|
-
"purple",
|
|
60
|
-
"brown",
|
|
61
|
-
"error",
|
|
62
|
-
"warning",
|
|
63
|
-
"fish",
|
|
64
|
-
"meat",
|
|
65
|
-
"fruit",
|
|
66
|
-
"vegetable",
|
|
67
|
-
"cereal",
|
|
68
|
-
"oil",
|
|
69
|
-
"aromatic"
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
splitVariantProps(props) {
|
|
73
|
-
return splitProps(props, chipVariantKeys)
|
|
74
|
-
},
|
|
75
|
-
getVariantProps
|
|
76
|
-
})
|
package/recipes/collapsible.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const collapsibleDefaultVariants = {}
|
|
5
|
-
const collapsibleCompoundVariants = []
|
|
6
|
-
|
|
7
|
-
const collapsibleSlotNames = [
|
|
8
|
-
[
|
|
9
|
-
"root",
|
|
10
|
-
"collapsible__root"
|
|
11
|
-
],
|
|
12
|
-
[
|
|
13
|
-
"trigger",
|
|
14
|
-
"collapsible__trigger"
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"content",
|
|
18
|
-
"collapsible__content"
|
|
19
|
-
],
|
|
20
|
-
[
|
|
21
|
-
"indicator",
|
|
22
|
-
"collapsible__indicator"
|
|
23
|
-
]
|
|
24
|
-
]
|
|
25
|
-
const collapsibleSlotFns = /* @__PURE__ */ collapsibleSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, collapsibleDefaultVariants, getSlotCompoundVariant(collapsibleCompoundVariants, slotName))])
|
|
26
|
-
|
|
27
|
-
const collapsibleFn = memo((props = {}) => {
|
|
28
|
-
return Object.fromEntries(collapsibleSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
const collapsibleVariantKeys = []
|
|
32
|
-
const getVariantProps = (variants) => ({ ...collapsibleDefaultVariants, ...compact(variants) })
|
|
33
|
-
|
|
34
|
-
export const collapsible = /* @__PURE__ */ Object.assign(collapsibleFn, {
|
|
35
|
-
__recipe__: false,
|
|
36
|
-
__name__: 'collapsible',
|
|
37
|
-
raw: (props) => props,
|
|
38
|
-
classNameMap: {},
|
|
39
|
-
variantKeys: collapsibleVariantKeys,
|
|
40
|
-
variantMap: {},
|
|
41
|
-
splitVariantProps(props) {
|
|
42
|
-
return splitProps(props, collapsibleVariantKeys)
|
|
43
|
-
},
|
|
44
|
-
getVariantProps
|
|
45
|
-
})
|
package/recipes/combobox.mjs
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const comboboxDefaultVariants = {
|
|
5
|
-
"size": "md"
|
|
6
|
-
}
|
|
7
|
-
const comboboxCompoundVariants = []
|
|
8
|
-
|
|
9
|
-
const comboboxSlotNames = [
|
|
10
|
-
[
|
|
11
|
-
"root",
|
|
12
|
-
"combobox__root"
|
|
13
|
-
],
|
|
14
|
-
[
|
|
15
|
-
"clearTrigger",
|
|
16
|
-
"combobox__clearTrigger"
|
|
17
|
-
],
|
|
18
|
-
[
|
|
19
|
-
"content",
|
|
20
|
-
"combobox__content"
|
|
21
|
-
],
|
|
22
|
-
[
|
|
23
|
-
"control",
|
|
24
|
-
"combobox__control"
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
"input",
|
|
28
|
-
"combobox__input"
|
|
29
|
-
],
|
|
30
|
-
[
|
|
31
|
-
"item",
|
|
32
|
-
"combobox__item"
|
|
33
|
-
],
|
|
34
|
-
[
|
|
35
|
-
"itemGroup",
|
|
36
|
-
"combobox__itemGroup"
|
|
37
|
-
],
|
|
38
|
-
[
|
|
39
|
-
"itemGroupLabel",
|
|
40
|
-
"combobox__itemGroupLabel"
|
|
41
|
-
],
|
|
42
|
-
[
|
|
43
|
-
"itemIndicator",
|
|
44
|
-
"combobox__itemIndicator"
|
|
45
|
-
],
|
|
46
|
-
[
|
|
47
|
-
"itemText",
|
|
48
|
-
"combobox__itemText"
|
|
49
|
-
],
|
|
50
|
-
[
|
|
51
|
-
"label",
|
|
52
|
-
"combobox__label"
|
|
53
|
-
],
|
|
54
|
-
[
|
|
55
|
-
"list",
|
|
56
|
-
"combobox__list"
|
|
57
|
-
],
|
|
58
|
-
[
|
|
59
|
-
"positioner",
|
|
60
|
-
"combobox__positioner"
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
"trigger",
|
|
64
|
-
"combobox__trigger"
|
|
65
|
-
],
|
|
66
|
-
[
|
|
67
|
-
"empty",
|
|
68
|
-
"combobox__empty"
|
|
69
|
-
]
|
|
70
|
-
]
|
|
71
|
-
const comboboxSlotFns = /* @__PURE__ */ comboboxSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, comboboxDefaultVariants, getSlotCompoundVariant(comboboxCompoundVariants, slotName))])
|
|
72
|
-
|
|
73
|
-
const comboboxFn = memo((props = {}) => {
|
|
74
|
-
return Object.fromEntries(comboboxSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
const comboboxVariantKeys = [
|
|
78
|
-
"hideClearTrigger",
|
|
79
|
-
"size"
|
|
80
|
-
]
|
|
81
|
-
const getVariantProps = (variants) => ({ ...comboboxDefaultVariants, ...compact(variants) })
|
|
82
|
-
|
|
83
|
-
export const combobox = /* @__PURE__ */ Object.assign(comboboxFn, {
|
|
84
|
-
__recipe__: false,
|
|
85
|
-
__name__: 'combobox',
|
|
86
|
-
raw: (props) => props,
|
|
87
|
-
classNameMap: {},
|
|
88
|
-
variantKeys: comboboxVariantKeys,
|
|
89
|
-
variantMap: {
|
|
90
|
-
"hideClearTrigger": [
|
|
91
|
-
"true"
|
|
92
|
-
],
|
|
93
|
-
"size": [
|
|
94
|
-
"md"
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
splitVariantProps(props) {
|
|
98
|
-
return splitProps(props, comboboxVariantKeys)
|
|
99
|
-
},
|
|
100
|
-
getVariantProps
|
|
101
|
-
})
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { finalizeConditions, sortConditions } from '../css/conditions.mjs';
|
|
2
|
-
import { css } from '../css/css.mjs';
|
|
3
|
-
import { assertCompoundVariant, getCompoundVariantCss } from '../css/cva.mjs';
|
|
4
|
-
import { cx } from '../css/cx.mjs';
|
|
5
|
-
import { compact, createCss, splitProps, uniq, withoutSpace } from '../helpers.mjs';
|
|
6
|
-
|
|
7
|
-
export const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
8
|
-
const getVariantProps = (variants) => {
|
|
9
|
-
return {
|
|
10
|
-
[name]: '__ignore__',
|
|
11
|
-
...defaultVariants,
|
|
12
|
-
...compact(variants),
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const recipeFn = (variants, withCompoundVariants = true) => {
|
|
17
|
-
const transform = (prop, value) => {
|
|
18
|
-
assertCompoundVariant(name, compoundVariants, variants, prop)
|
|
19
|
-
|
|
20
|
-
if (value === '__ignore__') {
|
|
21
|
-
return { className: name }
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
value = withoutSpace(value)
|
|
25
|
-
return { className: `${name}--${prop}_${value}` }
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const recipeCss = createCss({
|
|
29
|
-
|
|
30
|
-
conditions: {
|
|
31
|
-
shift: sortConditions,
|
|
32
|
-
finalize: finalizeConditions,
|
|
33
|
-
breakpoints: { keys: ["base","sm","md","lg","xl"] }
|
|
34
|
-
},
|
|
35
|
-
utility: {
|
|
36
|
-
|
|
37
|
-
toHash: (path, hashFn) => hashFn(path.join(":")),
|
|
38
|
-
transform,
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
const recipeStyles = getVariantProps(variants)
|
|
43
|
-
|
|
44
|
-
if (withCompoundVariants) {
|
|
45
|
-
const compoundVariantStyles = getCompoundVariantCss(compoundVariants, recipeStyles)
|
|
46
|
-
return cx(recipeCss(recipeStyles), css(compoundVariantStyles))
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return recipeCss(recipeStyles)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
recipeFn,
|
|
54
|
-
getVariantProps,
|
|
55
|
-
__getCompoundVariantCss__: (variants) => {
|
|
56
|
-
return getCompoundVariantCss(compoundVariants, getVariantProps(variants));
|
|
57
|
-
},
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export const mergeRecipes = (recipeA, recipeB) => {
|
|
62
|
-
if (recipeA && !recipeB) return recipeA
|
|
63
|
-
if (!recipeA && recipeB) return recipeB
|
|
64
|
-
|
|
65
|
-
const recipeFn = (...args) => cx(recipeA(...args), recipeB(...args))
|
|
66
|
-
const variantKeys = uniq(recipeA.variantKeys, recipeB.variantKeys)
|
|
67
|
-
const variantMap = variantKeys.reduce((acc, key) => {
|
|
68
|
-
acc[key] = uniq(recipeA.variantMap[key], recipeB.variantMap[key])
|
|
69
|
-
return acc
|
|
70
|
-
}, {})
|
|
71
|
-
|
|
72
|
-
return Object.assign(recipeFn, {
|
|
73
|
-
__recipe__: true,
|
|
74
|
-
__name__: `${recipeA.__name__} ${recipeB.__name__}`,
|
|
75
|
-
raw: (props) => props,
|
|
76
|
-
variantKeys,
|
|
77
|
-
variantMap,
|
|
78
|
-
splitVariantProps(props) {
|
|
79
|
-
return splitProps(props, variantKeys)
|
|
80
|
-
},
|
|
81
|
-
})
|
|
82
|
-
}
|
package/recipes/datepicker.mjs
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const datepickerDefaultVariants = {}
|
|
5
|
-
const datepickerCompoundVariants = []
|
|
6
|
-
|
|
7
|
-
const datepickerSlotNames = [
|
|
8
|
-
[
|
|
9
|
-
"clearTrigger",
|
|
10
|
-
"datepicker__clearTrigger"
|
|
11
|
-
],
|
|
12
|
-
[
|
|
13
|
-
"content",
|
|
14
|
-
"datepicker__content"
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"control",
|
|
18
|
-
"datepicker__control"
|
|
19
|
-
],
|
|
20
|
-
[
|
|
21
|
-
"input",
|
|
22
|
-
"datepicker__input"
|
|
23
|
-
],
|
|
24
|
-
[
|
|
25
|
-
"label",
|
|
26
|
-
"datepicker__label"
|
|
27
|
-
],
|
|
28
|
-
[
|
|
29
|
-
"monthSelect",
|
|
30
|
-
"datepicker__monthSelect"
|
|
31
|
-
],
|
|
32
|
-
[
|
|
33
|
-
"nextTrigger",
|
|
34
|
-
"datepicker__nextTrigger"
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
"positioner",
|
|
38
|
-
"datepicker__positioner"
|
|
39
|
-
],
|
|
40
|
-
[
|
|
41
|
-
"presetTrigger",
|
|
42
|
-
"datepicker__presetTrigger"
|
|
43
|
-
],
|
|
44
|
-
[
|
|
45
|
-
"prevTrigger",
|
|
46
|
-
"datepicker__prevTrigger"
|
|
47
|
-
],
|
|
48
|
-
[
|
|
49
|
-
"rangeText",
|
|
50
|
-
"datepicker__rangeText"
|
|
51
|
-
],
|
|
52
|
-
[
|
|
53
|
-
"root",
|
|
54
|
-
"datepicker__root"
|
|
55
|
-
],
|
|
56
|
-
[
|
|
57
|
-
"table",
|
|
58
|
-
"datepicker__table"
|
|
59
|
-
],
|
|
60
|
-
[
|
|
61
|
-
"tableBody",
|
|
62
|
-
"datepicker__tableBody"
|
|
63
|
-
],
|
|
64
|
-
[
|
|
65
|
-
"tableCell",
|
|
66
|
-
"datepicker__tableCell"
|
|
67
|
-
],
|
|
68
|
-
[
|
|
69
|
-
"tableCellTrigger",
|
|
70
|
-
"datepicker__tableCellTrigger"
|
|
71
|
-
],
|
|
72
|
-
[
|
|
73
|
-
"tableHead",
|
|
74
|
-
"datepicker__tableHead"
|
|
75
|
-
],
|
|
76
|
-
[
|
|
77
|
-
"tableHeader",
|
|
78
|
-
"datepicker__tableHeader"
|
|
79
|
-
],
|
|
80
|
-
[
|
|
81
|
-
"tableRow",
|
|
82
|
-
"datepicker__tableRow"
|
|
83
|
-
],
|
|
84
|
-
[
|
|
85
|
-
"trigger",
|
|
86
|
-
"datepicker__trigger"
|
|
87
|
-
],
|
|
88
|
-
[
|
|
89
|
-
"view",
|
|
90
|
-
"datepicker__view"
|
|
91
|
-
],
|
|
92
|
-
[
|
|
93
|
-
"viewControl",
|
|
94
|
-
"datepicker__viewControl"
|
|
95
|
-
],
|
|
96
|
-
[
|
|
97
|
-
"viewTrigger",
|
|
98
|
-
"datepicker__viewTrigger"
|
|
99
|
-
],
|
|
100
|
-
[
|
|
101
|
-
"yearSelect",
|
|
102
|
-
"datepicker__yearSelect"
|
|
103
|
-
],
|
|
104
|
-
[
|
|
105
|
-
"view",
|
|
106
|
-
"datepicker__view"
|
|
107
|
-
],
|
|
108
|
-
[
|
|
109
|
-
"valueText",
|
|
110
|
-
"datepicker__valueText"
|
|
111
|
-
]
|
|
112
|
-
]
|
|
113
|
-
const datepickerSlotFns = /* @__PURE__ */ datepickerSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, datepickerDefaultVariants, getSlotCompoundVariant(datepickerCompoundVariants, slotName))])
|
|
114
|
-
|
|
115
|
-
const datepickerFn = memo((props = {}) => {
|
|
116
|
-
return Object.fromEntries(datepickerSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
const datepickerVariantKeys = []
|
|
120
|
-
const getVariantProps = (variants) => ({ ...datepickerDefaultVariants, ...compact(variants) })
|
|
121
|
-
|
|
122
|
-
export const datepicker = /* @__PURE__ */ Object.assign(datepickerFn, {
|
|
123
|
-
__recipe__: false,
|
|
124
|
-
__name__: 'datepicker',
|
|
125
|
-
raw: (props) => props,
|
|
126
|
-
classNameMap: {},
|
|
127
|
-
variantKeys: datepickerVariantKeys,
|
|
128
|
-
variantMap: {},
|
|
129
|
-
splitVariantProps(props) {
|
|
130
|
-
return splitProps(props, datepickerVariantKeys)
|
|
131
|
-
},
|
|
132
|
-
getVariantProps
|
|
133
|
-
})
|
package/recipes/dialog.mjs
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const dialogDefaultVariants = {}
|
|
5
|
-
const dialogCompoundVariants = []
|
|
6
|
-
|
|
7
|
-
const dialogSlotNames = [
|
|
8
|
-
[
|
|
9
|
-
"trigger",
|
|
10
|
-
"dialog__trigger"
|
|
11
|
-
],
|
|
12
|
-
[
|
|
13
|
-
"backdrop",
|
|
14
|
-
"dialog__backdrop"
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"positioner",
|
|
18
|
-
"dialog__positioner"
|
|
19
|
-
],
|
|
20
|
-
[
|
|
21
|
-
"content",
|
|
22
|
-
"dialog__content"
|
|
23
|
-
],
|
|
24
|
-
[
|
|
25
|
-
"title",
|
|
26
|
-
"dialog__title"
|
|
27
|
-
],
|
|
28
|
-
[
|
|
29
|
-
"description",
|
|
30
|
-
"dialog__description"
|
|
31
|
-
],
|
|
32
|
-
[
|
|
33
|
-
"closeTrigger",
|
|
34
|
-
"dialog__closeTrigger"
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
"header",
|
|
38
|
-
"dialog__header"
|
|
39
|
-
],
|
|
40
|
-
[
|
|
41
|
-
"body",
|
|
42
|
-
"dialog__body"
|
|
43
|
-
],
|
|
44
|
-
[
|
|
45
|
-
"footer",
|
|
46
|
-
"dialog__footer"
|
|
47
|
-
]
|
|
48
|
-
]
|
|
49
|
-
const dialogSlotFns = /* @__PURE__ */ dialogSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, dialogDefaultVariants, getSlotCompoundVariant(dialogCompoundVariants, slotName))])
|
|
50
|
-
|
|
51
|
-
const dialogFn = memo((props = {}) => {
|
|
52
|
-
return Object.fromEntries(dialogSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
const dialogVariantKeys = []
|
|
56
|
-
const getVariantProps = (variants) => ({ ...dialogDefaultVariants, ...compact(variants) })
|
|
57
|
-
|
|
58
|
-
export const dialog = /* @__PURE__ */ Object.assign(dialogFn, {
|
|
59
|
-
__recipe__: false,
|
|
60
|
-
__name__: 'dialog',
|
|
61
|
-
raw: (props) => props,
|
|
62
|
-
classNameMap: {},
|
|
63
|
-
variantKeys: dialogVariantKeys,
|
|
64
|
-
variantMap: {},
|
|
65
|
-
splitVariantProps(props) {
|
|
66
|
-
return splitProps(props, dialogVariantKeys)
|
|
67
|
-
},
|
|
68
|
-
getVariantProps
|
|
69
|
-
})
|
package/recipes/drawer.mjs
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const drawerDefaultVariants = {
|
|
5
|
-
"variant": "right"
|
|
6
|
-
}
|
|
7
|
-
const drawerCompoundVariants = []
|
|
8
|
-
|
|
9
|
-
const drawerSlotNames = [
|
|
10
|
-
[
|
|
11
|
-
"trigger",
|
|
12
|
-
"drawer__trigger"
|
|
13
|
-
],
|
|
14
|
-
[
|
|
15
|
-
"backdrop",
|
|
16
|
-
"drawer__backdrop"
|
|
17
|
-
],
|
|
18
|
-
[
|
|
19
|
-
"positioner",
|
|
20
|
-
"drawer__positioner"
|
|
21
|
-
],
|
|
22
|
-
[
|
|
23
|
-
"content",
|
|
24
|
-
"drawer__content"
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
"title",
|
|
28
|
-
"drawer__title"
|
|
29
|
-
],
|
|
30
|
-
[
|
|
31
|
-
"description",
|
|
32
|
-
"drawer__description"
|
|
33
|
-
],
|
|
34
|
-
[
|
|
35
|
-
"closeTrigger",
|
|
36
|
-
"drawer__closeTrigger"
|
|
37
|
-
],
|
|
38
|
-
[
|
|
39
|
-
"header",
|
|
40
|
-
"drawer__header"
|
|
41
|
-
],
|
|
42
|
-
[
|
|
43
|
-
"body",
|
|
44
|
-
"drawer__body"
|
|
45
|
-
],
|
|
46
|
-
[
|
|
47
|
-
"footer",
|
|
48
|
-
"drawer__footer"
|
|
49
|
-
]
|
|
50
|
-
]
|
|
51
|
-
const drawerSlotFns = /* @__PURE__ */ drawerSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, drawerDefaultVariants, getSlotCompoundVariant(drawerCompoundVariants, slotName))])
|
|
52
|
-
|
|
53
|
-
const drawerFn = memo((props = {}) => {
|
|
54
|
-
return Object.fromEntries(drawerSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
const drawerVariantKeys = [
|
|
58
|
-
"variant"
|
|
59
|
-
]
|
|
60
|
-
const getVariantProps = (variants) => ({ ...drawerDefaultVariants, ...compact(variants) })
|
|
61
|
-
|
|
62
|
-
export const drawer = /* @__PURE__ */ Object.assign(drawerFn, {
|
|
63
|
-
__recipe__: false,
|
|
64
|
-
__name__: 'drawer',
|
|
65
|
-
raw: (props) => props,
|
|
66
|
-
classNameMap: {},
|
|
67
|
-
variantKeys: drawerVariantKeys,
|
|
68
|
-
variantMap: {
|
|
69
|
-
"variant": [
|
|
70
|
-
"left",
|
|
71
|
-
"right"
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
splitVariantProps(props) {
|
|
75
|
-
return splitProps(props, drawerVariantKeys)
|
|
76
|
-
},
|
|
77
|
-
getVariantProps
|
|
78
|
-
})
|
package/recipes/flag.mjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
-
|
|
4
|
-
const flagFn = /* @__PURE__ */ createRecipe('flag', {
|
|
5
|
-
"shape": "rounded"
|
|
6
|
-
}, [])
|
|
7
|
-
|
|
8
|
-
const flagVariantMap = {
|
|
9
|
-
"shape": [
|
|
10
|
-
"rectangle",
|
|
11
|
-
"rounded",
|
|
12
|
-
"circle",
|
|
13
|
-
"square"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const flagVariantKeys = Object.keys(flagVariantMap)
|
|
18
|
-
|
|
19
|
-
export const flag = /* @__PURE__ */ Object.assign(memo(flagFn.recipeFn), {
|
|
20
|
-
__recipe__: true,
|
|
21
|
-
__name__: 'flag',
|
|
22
|
-
__getCompoundVariantCss__: flagFn.__getCompoundVariantCss__,
|
|
23
|
-
raw: (props) => props,
|
|
24
|
-
variantKeys: flagVariantKeys,
|
|
25
|
-
variantMap: flagVariantMap,
|
|
26
|
-
merge(recipe) {
|
|
27
|
-
return mergeRecipes(this, recipe)
|
|
28
|
-
},
|
|
29
|
-
splitVariantProps(props) {
|
|
30
|
-
return splitProps(props, flagVariantKeys)
|
|
31
|
-
},
|
|
32
|
-
getVariantProps: flagFn.getVariantProps,
|
|
33
|
-
})
|