@mekari/pixel3-styled-system 0.0.7 → 0.0.8
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/CHANGELOG.md +14 -0
- package/css/conditions.mjs +1 -1
- package/css/css.d.ts +15 -2
- package/css/css.mjs +2 -1
- package/css/cva.d.ts +1 -1
- package/css/cva.mjs +3 -1
- package/css/sva.mjs +8 -2
- package/helpers.mjs +44 -48
- package/jsx/aspect-ratio.mjs +1 -1
- package/jsx/bleed.mjs +1 -1
- package/jsx/box.mjs +1 -1
- package/jsx/center.mjs +1 -1
- package/jsx/circle.mjs +1 -1
- package/jsx/container.mjs +1 -1
- package/jsx/cq.mjs +1 -1
- package/jsx/divider.mjs +1 -1
- package/jsx/factory.mjs +46 -18
- package/jsx/flex.mjs +1 -1
- package/jsx/float.mjs +1 -1
- package/jsx/grid-item.mjs +1 -1
- package/jsx/grid.mjs +1 -1
- package/jsx/hstack.mjs +1 -1
- package/jsx/index.d.ts +0 -1
- package/jsx/index.mjs +0 -1
- package/jsx/is-valid-prop.d.ts +1 -2
- package/jsx/is-valid-prop.mjs +2 -2
- package/jsx/link-overlay.mjs +1 -1
- package/jsx/spacer.mjs +1 -1
- package/jsx/square.mjs +1 -1
- package/jsx/stack.mjs +1 -1
- package/jsx/visually-hidden.mjs +1 -1
- package/jsx/vstack.mjs +1 -1
- package/jsx/wrap.mjs +1 -1
- package/package.json +1 -1
- package/patterns/aspect-ratio.d.ts +1 -1
- package/patterns/bleed.d.ts +3 -3
- package/patterns/box.d.ts +1 -1
- package/patterns/center.d.ts +1 -1
- package/patterns/circle.d.ts +2 -2
- package/patterns/container.d.ts +1 -1
- package/patterns/cq.d.ts +2 -2
- package/patterns/divider.d.ts +1 -1
- package/patterns/flex.d.ts +8 -8
- package/patterns/float.d.ts +1 -1
- package/patterns/grid-item.d.ts +1 -1
- package/patterns/grid.d.ts +4 -4
- package/patterns/hstack.d.ts +3 -3
- package/patterns/index.d.ts +0 -1
- package/patterns/index.mjs +0 -1
- package/patterns/link-overlay.d.ts +1 -1
- package/patterns/link-overlay.mjs +0 -3
- package/patterns/spacer.d.ts +1 -1
- package/patterns/square.d.ts +2 -2
- package/patterns/stack.d.ts +5 -5
- package/patterns/visually-hidden.d.ts +1 -1
- package/patterns/vstack.d.ts +3 -3
- package/patterns/wrap.d.ts +6 -6
- package/recipes/accordion.d.ts +1 -0
- package/recipes/accordion.mjs +4 -2
- package/recipes/avatar-group-slot-recipe.d.ts +1 -0
- package/recipes/avatar-group-slot-recipe.mjs +4 -2
- package/recipes/avatar-slot-recipe.d.ts +1 -0
- package/recipes/avatar-slot-recipe.mjs +4 -2
- package/recipes/badge-recipe.d.ts +1 -0
- package/recipes/badge-recipe.mjs +3 -1
- package/recipes/banner-close-button-recipe.d.ts +1 -0
- package/recipes/banner-close-button-recipe.mjs +3 -1
- package/recipes/banner-description-recipe.d.ts +1 -0
- package/recipes/banner-description-recipe.mjs +3 -1
- package/recipes/banner-icon-slot-recipe.d.ts +1 -0
- package/recipes/banner-icon-slot-recipe.mjs +4 -2
- package/recipes/banner-link-recipe.d.ts +1 -0
- package/recipes/banner-link-recipe.mjs +3 -1
- package/recipes/banner-slot-recipe.d.ts +1 -0
- package/recipes/banner-slot-recipe.mjs +4 -2
- package/recipes/banner-title-recipe.d.ts +1 -0
- package/recipes/banner-title-recipe.mjs +3 -1
- package/recipes/broadcast-slot-recipe.d.ts +1 -0
- package/recipes/broadcast-slot-recipe.mjs +4 -2
- package/recipes/button-group-recipe.d.ts +1 -0
- package/recipes/button-group-recipe.mjs +3 -1
- package/recipes/button-recipe.d.ts +1 -0
- package/recipes/button-recipe.mjs +3 -1
- package/recipes/calendar-panel-range-recipe.d.ts +1 -0
- package/recipes/calendar-panel-range-recipe.mjs +3 -1
- package/recipes/carousel-slot-recipe.d.ts +1 -0
- package/recipes/carousel-slot-recipe.mjs +4 -2
- package/recipes/chart-slot-recipe.d.ts +28 -0
- package/recipes/chart-slot-recipe.mjs +80 -0
- package/recipes/checkbox-slot-recipe.d.ts +1 -0
- package/recipes/checkbox-slot-recipe.mjs +4 -2
- package/recipes/create-recipe.mjs +8 -5
- package/recipes/date-item-recipe.d.ts +1 -0
- package/recipes/date-item-recipe.mjs +3 -1
- package/recipes/date-picker-slot-recipe.d.ts +1 -0
- package/recipes/date-picker-slot-recipe.mjs +4 -2
- package/recipes/day-item-recipe.d.ts +1 -0
- package/recipes/day-item-recipe.mjs +3 -1
- package/recipes/divider-recipe.d.ts +1 -0
- package/recipes/divider-recipe.mjs +3 -1
- package/recipes/dropzone-slot-recipe.d.ts +1 -0
- package/recipes/dropzone-slot-recipe.mjs +4 -2
- package/recipes/form-control-slot-recipe.d.ts +1 -0
- package/recipes/form-control-slot-recipe.mjs +4 -2
- package/recipes/icon-recipe.d.ts +1 -0
- package/recipes/icon-recipe.mjs +3 -1
- package/recipes/index.d.ts +2 -1
- package/recipes/index.mjs +2 -1
- package/recipes/input-addon-slot-recipe.d.ts +1 -0
- package/recipes/input-addon-slot-recipe.mjs +4 -2
- package/recipes/input-group-slot-recipe.d.ts +1 -0
- package/recipes/input-group-slot-recipe.mjs +4 -2
- package/recipes/input-slot-recipe.d.ts +1 -0
- package/recipes/input-slot-recipe.mjs +4 -2
- package/recipes/input-tag-slot-recipe.d.ts +1 -0
- package/recipes/input-tag-slot-recipe.mjs +4 -2
- package/recipes/modal-slot-recipe.d.ts +6 -1
- package/recipes/modal-slot-recipe.mjs +4 -2
- package/recipes/month-item-recipe.d.ts +1 -0
- package/recipes/month-item-recipe.mjs +3 -1
- package/recipes/pinbar-slot-recipe.d.ts +1 -0
- package/recipes/pinbar-slot-recipe.mjs +4 -2
- package/recipes/popover-content-recipe.d.ts +1 -0
- package/recipes/popover-content-recipe.mjs +3 -1
- package/recipes/popover-list-item-recipe.d.ts +1 -0
- package/recipes/popover-list-item-recipe.mjs +3 -1
- package/recipes/popover-list-recipe.d.ts +1 -0
- package/recipes/popover-list-recipe.mjs +3 -1
- package/recipes/progress-slot-recipe.d.ts +1 -0
- package/recipes/progress-slot-recipe.mjs +4 -2
- package/recipes/radio-slot-recipe.d.ts +1 -0
- package/recipes/radio-slot-recipe.mjs +4 -2
- package/recipes/rich-text-editor-slot-recipe.d.ts +1 -0
- package/recipes/rich-text-editor-slot-recipe.mjs +4 -2
- package/recipes/rtestyle-provider-recipe.d.ts +1 -0
- package/recipes/rtestyle-provider-recipe.mjs +3 -1
- package/recipes/segmented-control-slot-recipe.d.ts +1 -0
- package/recipes/segmented-control-slot-recipe.mjs +4 -2
- package/recipes/select-slot-recipe.d.ts +1 -0
- package/recipes/select-slot-recipe.mjs +4 -2
- package/recipes/selected-border-recipe.d.ts +1 -0
- package/recipes/selected-border-recipe.mjs +3 -1
- package/recipes/shared-slot-recipe.d.ts +1 -0
- package/recipes/shared-slot-recipe.mjs +4 -2
- package/recipes/spinner-recipe.d.ts +1 -0
- package/recipes/spinner-recipe.mjs +3 -1
- package/recipes/tab-list-recipe.d.ts +1 -0
- package/recipes/tab-list-recipe.mjs +3 -1
- package/recipes/tab-recipe.d.ts +1 -0
- package/recipes/tab-recipe.mjs +3 -1
- package/recipes/table-container-recipe.d.ts +1 -0
- package/recipes/table-container-recipe.mjs +3 -1
- package/recipes/table-date-slot-recipe.d.ts +1 -0
- package/recipes/table-date-slot-recipe.mjs +4 -2
- package/recipes/table-month-slot-recipe.d.ts +1 -0
- package/recipes/table-month-slot-recipe.mjs +4 -2
- package/recipes/table-recipe.d.ts +1 -0
- package/recipes/table-recipe.mjs +3 -1
- package/recipes/table-year-slot-recipe.d.ts +1 -0
- package/recipes/table-year-slot-recipe.mjs +4 -2
- package/recipes/tag-slot-recipe.d.ts +1 -0
- package/recipes/tag-slot-recipe.mjs +4 -2
- package/recipes/text-recipe.d.ts +1 -0
- package/recipes/text-recipe.mjs +3 -1
- package/recipes/textarea-recipe.d.ts +1 -0
- package/recipes/textarea-recipe.mjs +3 -1
- package/recipes/toast-slot-recipe.d.ts +1 -0
- package/recipes/toast-slot-recipe.mjs +4 -2
- package/recipes/toggle-slot-recipe.d.ts +1 -0
- package/recipes/toggle-slot-recipe.mjs +4 -2
- package/recipes/tooltip-recipe.d.ts +1 -0
- package/recipes/tooltip-recipe.mjs +3 -1
- package/recipes/upload-list-slot-recipe.d.ts +1 -0
- package/recipes/upload-list-slot-recipe.mjs +4 -2
- package/recipes/upload-slot-recipe.d.ts +1 -0
- package/recipes/upload-slot-recipe.mjs +4 -2
- package/recipes/year-item-recipe.d.ts +1 -0
- package/recipes/year-item-recipe.mjs +3 -1
- package/tokens/tokens.d.ts +0 -3
- package/types/composition.d.ts +39 -12
- package/types/conditions.d.ts +24 -26
- package/types/pattern.d.ts +4 -0
- package/types/prop-type.d.ts +51 -223
- package/types/recipe.d.ts +33 -10
- package/types/static-css.d.ts +4 -0
- package/types/style-props.d.ts +7458 -644
- package/types/system-types.d.ts +3 -8
|
@@ -21,6 +21,7 @@ export interface BannerLinkRecipeRecipe {
|
|
|
21
21
|
variantMap: BannerLinkRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof BannerLinkRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends BannerLinkRecipeVariantProps>(props: Props): [BannerLinkRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof BannerLinkRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: BannerLinkRecipeVariantProps) => BannerLinkRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -7,9 +7,10 @@ const bannerLinkRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const bannerLinkRecipeVariantKeys = Object.keys(bannerLinkRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const bannerLinkRecipe = /* @__PURE__ */ Object.assign(memo(bannerLinkRecipeFn), {
|
|
10
|
+
export const bannerLinkRecipe = /* @__PURE__ */ Object.assign(memo(bannerLinkRecipeFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'bannerLinkRecipe',
|
|
13
|
+
__getCompoundVariantCss__: bannerLinkRecipeFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: bannerLinkRecipeVariantKeys,
|
|
15
16
|
variantMap: bannerLinkRecipeVariantMap,
|
|
@@ -19,4 +20,5 @@ export const bannerLinkRecipe = /* @__PURE__ */ Object.assign(memo(bannerLinkRec
|
|
|
19
20
|
splitVariantProps(props) {
|
|
20
21
|
return splitProps(props, bannerLinkRecipeVariantKeys)
|
|
21
22
|
},
|
|
23
|
+
getVariantProps: bannerLinkRecipeFn.getVariantProps,
|
|
22
24
|
})
|
|
@@ -21,6 +21,7 @@ export interface BannerSlotRecipeRecipe {
|
|
|
21
21
|
variantMap: BannerSlotRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof BannerSlotRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends BannerSlotRecipeVariantProps>(props: Props): [BannerSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof BannerSlotRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: BannerSlotRecipeVariantProps) => BannerSlotRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const bannerSlotRecipeDefaultVariants = {
|
|
@@ -19,12 +19,13 @@ const bannerSlotRecipeSlotNames = [
|
|
|
19
19
|
const bannerSlotRecipeSlotFns = /* @__PURE__ */ bannerSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, bannerSlotRecipeDefaultVariants, getSlotCompoundVariant(bannerSlotRecipeCompoundVariants, slotName))])
|
|
20
20
|
|
|
21
21
|
const bannerSlotRecipeFn = memo((props = {}) => {
|
|
22
|
-
return Object.fromEntries(bannerSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
22
|
+
return Object.fromEntries(bannerSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
23
23
|
})
|
|
24
24
|
|
|
25
25
|
const bannerSlotRecipeVariantKeys = [
|
|
26
26
|
"variant"
|
|
27
27
|
]
|
|
28
|
+
const getVariantProps = (variants) => ({ ...bannerSlotRecipeDefaultVariants, ...compact(variants) })
|
|
28
29
|
|
|
29
30
|
export const bannerSlotRecipe = /* @__PURE__ */ Object.assign(bannerSlotRecipeFn, {
|
|
30
31
|
__recipe__: false,
|
|
@@ -42,4 +43,5 @@ export const bannerSlotRecipe = /* @__PURE__ */ Object.assign(bannerSlotRecipeFn
|
|
|
42
43
|
splitVariantProps(props) {
|
|
43
44
|
return splitProps(props, bannerSlotRecipeVariantKeys)
|
|
44
45
|
},
|
|
46
|
+
getVariantProps
|
|
45
47
|
})
|
|
@@ -21,6 +21,7 @@ export interface BannerTitleRecipeRecipe {
|
|
|
21
21
|
variantMap: BannerTitleRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof BannerTitleRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends BannerTitleRecipeVariantProps>(props: Props): [BannerTitleRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof BannerTitleRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: BannerTitleRecipeVariantProps) => BannerTitleRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -7,9 +7,10 @@ const bannerTitleRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const bannerTitleRecipeVariantKeys = Object.keys(bannerTitleRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const bannerTitleRecipe = /* @__PURE__ */ Object.assign(memo(bannerTitleRecipeFn), {
|
|
10
|
+
export const bannerTitleRecipe = /* @__PURE__ */ Object.assign(memo(bannerTitleRecipeFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'bannerTitleRecipe',
|
|
13
|
+
__getCompoundVariantCss__: bannerTitleRecipeFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: bannerTitleRecipeVariantKeys,
|
|
15
16
|
variantMap: bannerTitleRecipeVariantMap,
|
|
@@ -19,4 +20,5 @@ export const bannerTitleRecipe = /* @__PURE__ */ Object.assign(memo(bannerTitleR
|
|
|
19
20
|
splitVariantProps(props) {
|
|
20
21
|
return splitProps(props, bannerTitleRecipeVariantKeys)
|
|
21
22
|
},
|
|
23
|
+
getVariantProps: bannerTitleRecipeFn.getVariantProps,
|
|
22
24
|
})
|
|
@@ -21,6 +21,7 @@ export interface BroadcastSlotRecipeRecipe {
|
|
|
21
21
|
variantMap: BroadcastSlotRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof BroadcastSlotRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends BroadcastSlotRecipeVariantProps>(props: Props): [BroadcastSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof BroadcastSlotRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: BroadcastSlotRecipeVariantProps) => BroadcastSlotRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const broadcastSlotRecipeDefaultVariants = {
|
|
@@ -43,12 +43,13 @@ const broadcastSlotRecipeSlotNames = [
|
|
|
43
43
|
const broadcastSlotRecipeSlotFns = /* @__PURE__ */ broadcastSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, broadcastSlotRecipeDefaultVariants, getSlotCompoundVariant(broadcastSlotRecipeCompoundVariants, slotName))])
|
|
44
44
|
|
|
45
45
|
const broadcastSlotRecipeFn = memo((props = {}) => {
|
|
46
|
-
return Object.fromEntries(broadcastSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
46
|
+
return Object.fromEntries(broadcastSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
47
47
|
})
|
|
48
48
|
|
|
49
49
|
const broadcastSlotRecipeVariantKeys = [
|
|
50
50
|
"variant"
|
|
51
51
|
]
|
|
52
|
+
const getVariantProps = (variants) => ({ ...broadcastSlotRecipeDefaultVariants, ...compact(variants) })
|
|
52
53
|
|
|
53
54
|
export const broadcastSlotRecipe = /* @__PURE__ */ Object.assign(broadcastSlotRecipeFn, {
|
|
54
55
|
__recipe__: false,
|
|
@@ -65,4 +66,5 @@ export const broadcastSlotRecipe = /* @__PURE__ */ Object.assign(broadcastSlotRe
|
|
|
65
66
|
splitVariantProps(props) {
|
|
66
67
|
return splitProps(props, broadcastSlotRecipeVariantKeys)
|
|
67
68
|
},
|
|
69
|
+
getVariantProps
|
|
68
70
|
})
|
|
@@ -21,6 +21,7 @@ export interface ButtonGroupRecipeRecipe {
|
|
|
21
21
|
variantMap: ButtonGroupRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof ButtonGroupRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends ButtonGroupRecipeVariantProps>(props: Props): [ButtonGroupRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof ButtonGroupRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: ButtonGroupRecipeVariantProps) => ButtonGroupRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -7,9 +7,10 @@ const buttonGroupRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const buttonGroupRecipeVariantKeys = Object.keys(buttonGroupRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const buttonGroupRecipe = /* @__PURE__ */ Object.assign(memo(buttonGroupRecipeFn), {
|
|
10
|
+
export const buttonGroupRecipe = /* @__PURE__ */ Object.assign(memo(buttonGroupRecipeFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'buttonGroupRecipe',
|
|
13
|
+
__getCompoundVariantCss__: buttonGroupRecipeFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: buttonGroupRecipeVariantKeys,
|
|
15
16
|
variantMap: buttonGroupRecipeVariantMap,
|
|
@@ -19,4 +20,5 @@ export const buttonGroupRecipe = /* @__PURE__ */ Object.assign(memo(buttonGroupR
|
|
|
19
20
|
splitVariantProps(props) {
|
|
20
21
|
return splitProps(props, buttonGroupRecipeVariantKeys)
|
|
21
22
|
},
|
|
23
|
+
getVariantProps: buttonGroupRecipeFn.getVariantProps,
|
|
22
24
|
})
|
|
@@ -22,6 +22,7 @@ export interface ButtonRecipeRecipe {
|
|
|
22
22
|
variantMap: ButtonRecipeVariantMap
|
|
23
23
|
variantKeys: Array<keyof ButtonRecipeVariant>
|
|
24
24
|
splitVariantProps<Props extends ButtonRecipeVariantProps>(props: Props): [ButtonRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof ButtonRecipeVariantProps>>]
|
|
25
|
+
getVariantProps: (props?: ButtonRecipeVariantProps) => ButtonRecipeVariantProps
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
|
|
@@ -77,9 +77,10 @@ const buttonRecipeVariantMap = {
|
|
|
77
77
|
|
|
78
78
|
const buttonRecipeVariantKeys = Object.keys(buttonRecipeVariantMap)
|
|
79
79
|
|
|
80
|
-
export const buttonRecipe = /* @__PURE__ */ Object.assign(memo(buttonRecipeFn), {
|
|
80
|
+
export const buttonRecipe = /* @__PURE__ */ Object.assign(memo(buttonRecipeFn.recipeFn), {
|
|
81
81
|
__recipe__: true,
|
|
82
82
|
__name__: 'buttonRecipe',
|
|
83
|
+
__getCompoundVariantCss__: buttonRecipeFn.__getCompoundVariantCss__,
|
|
83
84
|
raw: (props) => props,
|
|
84
85
|
variantKeys: buttonRecipeVariantKeys,
|
|
85
86
|
variantMap: buttonRecipeVariantMap,
|
|
@@ -89,4 +90,5 @@ export const buttonRecipe = /* @__PURE__ */ Object.assign(memo(buttonRecipeFn),
|
|
|
89
90
|
splitVariantProps(props) {
|
|
90
91
|
return splitProps(props, buttonRecipeVariantKeys)
|
|
91
92
|
},
|
|
93
|
+
getVariantProps: buttonRecipeFn.getVariantProps,
|
|
92
94
|
})
|
|
@@ -21,6 +21,7 @@ export interface CalendarPanelRangeRecipeRecipe {
|
|
|
21
21
|
variantMap: CalendarPanelRangeRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof CalendarPanelRangeRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends CalendarPanelRangeRecipeVariantProps>(props: Props): [CalendarPanelRangeRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof CalendarPanelRangeRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CalendarPanelRangeRecipeVariantProps) => CalendarPanelRangeRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -7,9 +7,10 @@ const calendarPanelRangeRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const calendarPanelRangeRecipeVariantKeys = Object.keys(calendarPanelRangeRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const calendarPanelRangeRecipe = /* @__PURE__ */ Object.assign(memo(calendarPanelRangeRecipeFn), {
|
|
10
|
+
export const calendarPanelRangeRecipe = /* @__PURE__ */ Object.assign(memo(calendarPanelRangeRecipeFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'calendarPanelRangeRecipe',
|
|
13
|
+
__getCompoundVariantCss__: calendarPanelRangeRecipeFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: calendarPanelRangeRecipeVariantKeys,
|
|
15
16
|
variantMap: calendarPanelRangeRecipeVariantMap,
|
|
@@ -19,4 +20,5 @@ export const calendarPanelRangeRecipe = /* @__PURE__ */ Object.assign(memo(calen
|
|
|
19
20
|
splitVariantProps(props) {
|
|
20
21
|
return splitProps(props, calendarPanelRangeRecipeVariantKeys)
|
|
21
22
|
},
|
|
23
|
+
getVariantProps: calendarPanelRangeRecipeFn.getVariantProps,
|
|
22
24
|
})
|
|
@@ -21,6 +21,7 @@ export interface CarouselSlotRecipeRecipe {
|
|
|
21
21
|
variantMap: CarouselSlotRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof CarouselSlotRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends CarouselSlotRecipeVariantProps>(props: Props): [CarouselSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof CarouselSlotRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CarouselSlotRecipeVariantProps) => CarouselSlotRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const carouselSlotRecipeDefaultVariants = {}
|
|
@@ -21,10 +21,11 @@ const carouselSlotRecipeSlotNames = [
|
|
|
21
21
|
const carouselSlotRecipeSlotFns = /* @__PURE__ */ carouselSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, carouselSlotRecipeDefaultVariants, getSlotCompoundVariant(carouselSlotRecipeCompoundVariants, slotName))])
|
|
22
22
|
|
|
23
23
|
const carouselSlotRecipeFn = memo((props = {}) => {
|
|
24
|
-
return Object.fromEntries(carouselSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
24
|
+
return Object.fromEntries(carouselSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
25
25
|
})
|
|
26
26
|
|
|
27
27
|
const carouselSlotRecipeVariantKeys = []
|
|
28
|
+
const getVariantProps = (variants) => ({ ...carouselSlotRecipeDefaultVariants, ...compact(variants) })
|
|
28
29
|
|
|
29
30
|
export const carouselSlotRecipe = /* @__PURE__ */ Object.assign(carouselSlotRecipeFn, {
|
|
30
31
|
__recipe__: false,
|
|
@@ -35,4 +36,5 @@ export const carouselSlotRecipe = /* @__PURE__ */ Object.assign(carouselSlotReci
|
|
|
35
36
|
splitVariantProps(props) {
|
|
36
37
|
return splitProps(props, carouselSlotRecipeVariantKeys)
|
|
37
38
|
},
|
|
39
|
+
getVariantProps
|
|
38
40
|
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface ChartSlotRecipeVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type ChartSlotRecipeVariantMap = {
|
|
10
|
+
[key in keyof ChartSlotRecipeVariant]: Array<ChartSlotRecipeVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type ChartSlotRecipeVariantProps = {
|
|
14
|
+
[key in keyof ChartSlotRecipeVariant]?: ConditionalValue<ChartSlotRecipeVariant[key]> | undefined
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ChartSlotRecipeRecipe {
|
|
18
|
+
__type: ChartSlotRecipeVariantProps
|
|
19
|
+
(props?: ChartSlotRecipeVariantProps): Pretty<Record<"root" | "chartHeader" | "chartWrapper" | "chartContainer" | "canvasContainer" | "chartLegend" | "legendWrapper" | "legendBox" | "chartTooltip" | "tooltipWrapper" | "tooltipRow" | "tooltipItem" | "tooltipBox", string>>
|
|
20
|
+
raw: (props?: ChartSlotRecipeVariantProps) => ChartSlotRecipeVariantProps
|
|
21
|
+
variantMap: ChartSlotRecipeVariantMap
|
|
22
|
+
variantKeys: Array<keyof ChartSlotRecipeVariant>
|
|
23
|
+
splitVariantProps<Props extends ChartSlotRecipeVariantProps>(props: Props): [ChartSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof ChartSlotRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: ChartSlotRecipeVariantProps) => ChartSlotRecipeVariantProps
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export declare const chartSlotRecipe: ChartSlotRecipeRecipe
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const chartSlotRecipeDefaultVariants = {}
|
|
5
|
+
const chartSlotRecipeCompoundVariants = []
|
|
6
|
+
|
|
7
|
+
const chartSlotRecipeSlotNames = [
|
|
8
|
+
[
|
|
9
|
+
"root",
|
|
10
|
+
"chart__root"
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"chartHeader",
|
|
14
|
+
"chart__chartHeader"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"chartWrapper",
|
|
18
|
+
"chart__chartWrapper"
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"chartContainer",
|
|
22
|
+
"chart__chartContainer"
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
"canvasContainer",
|
|
26
|
+
"chart__canvasContainer"
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"chartLegend",
|
|
30
|
+
"chart__chartLegend"
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
"legendWrapper",
|
|
34
|
+
"chart__legendWrapper"
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
"legendBox",
|
|
38
|
+
"chart__legendBox"
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"chartTooltip",
|
|
42
|
+
"chart__chartTooltip"
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
"tooltipWrapper",
|
|
46
|
+
"chart__tooltipWrapper"
|
|
47
|
+
],
|
|
48
|
+
[
|
|
49
|
+
"tooltipRow",
|
|
50
|
+
"chart__tooltipRow"
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"tooltipItem",
|
|
54
|
+
"chart__tooltipItem"
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
"tooltipBox",
|
|
58
|
+
"chart__tooltipBox"
|
|
59
|
+
]
|
|
60
|
+
]
|
|
61
|
+
const chartSlotRecipeSlotFns = /* @__PURE__ */ chartSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, chartSlotRecipeDefaultVariants, getSlotCompoundVariant(chartSlotRecipeCompoundVariants, slotName))])
|
|
62
|
+
|
|
63
|
+
const chartSlotRecipeFn = memo((props = {}) => {
|
|
64
|
+
return Object.fromEntries(chartSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const chartSlotRecipeVariantKeys = []
|
|
68
|
+
const getVariantProps = (variants) => ({ ...chartSlotRecipeDefaultVariants, ...compact(variants) })
|
|
69
|
+
|
|
70
|
+
export const chartSlotRecipe = /* @__PURE__ */ Object.assign(chartSlotRecipeFn, {
|
|
71
|
+
__recipe__: false,
|
|
72
|
+
__name__: 'chartSlotRecipe',
|
|
73
|
+
raw: (props) => props,
|
|
74
|
+
variantKeys: chartSlotRecipeVariantKeys,
|
|
75
|
+
variantMap: {},
|
|
76
|
+
splitVariantProps(props) {
|
|
77
|
+
return splitProps(props, chartSlotRecipeVariantKeys)
|
|
78
|
+
},
|
|
79
|
+
getVariantProps
|
|
80
|
+
})
|
|
@@ -21,6 +21,7 @@ export interface CheckboxSlotRecipeRecipe {
|
|
|
21
21
|
variantMap: CheckboxSlotRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof CheckboxSlotRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends CheckboxSlotRecipeVariantProps>(props: Props): [CheckboxSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof CheckboxSlotRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CheckboxSlotRecipeVariantProps) => CheckboxSlotRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const checkboxSlotRecipeDefaultVariants = {}
|
|
@@ -21,10 +21,11 @@ const checkboxSlotRecipeSlotNames = [
|
|
|
21
21
|
const checkboxSlotRecipeSlotFns = /* @__PURE__ */ checkboxSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, checkboxSlotRecipeDefaultVariants, getSlotCompoundVariant(checkboxSlotRecipeCompoundVariants, slotName))])
|
|
22
22
|
|
|
23
23
|
const checkboxSlotRecipeFn = memo((props = {}) => {
|
|
24
|
-
return Object.fromEntries(checkboxSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
24
|
+
return Object.fromEntries(checkboxSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
25
25
|
})
|
|
26
26
|
|
|
27
27
|
const checkboxSlotRecipeVariantKeys = []
|
|
28
|
+
const getVariantProps = (variants) => ({ ...checkboxSlotRecipeDefaultVariants, ...compact(variants) })
|
|
28
29
|
|
|
29
30
|
export const checkboxSlotRecipe = /* @__PURE__ */ Object.assign(checkboxSlotRecipeFn, {
|
|
30
31
|
__recipe__: false,
|
|
@@ -35,4 +36,5 @@ export const checkboxSlotRecipe = /* @__PURE__ */ Object.assign(checkboxSlotReci
|
|
|
35
36
|
splitVariantProps(props) {
|
|
36
37
|
return splitProps(props, checkboxSlotRecipeVariantKeys)
|
|
37
38
|
},
|
|
39
|
+
getVariantProps
|
|
38
40
|
})
|
|
@@ -5,7 +5,7 @@ import { cx } from '../css/cx.mjs';
|
|
|
5
5
|
import { compact, createCss, splitProps, uniq, withoutSpace } from '../helpers.mjs';
|
|
6
6
|
|
|
7
7
|
export const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
8
|
-
const
|
|
8
|
+
const getVariantProps = (variants) => {
|
|
9
9
|
return {
|
|
10
10
|
[name]: '__ignore__',
|
|
11
11
|
...defaultVariants,
|
|
@@ -34,11 +34,12 @@ export const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
|
34
34
|
},
|
|
35
35
|
utility: {
|
|
36
36
|
prefix: "mp",
|
|
37
|
+
toHash: (path, hashFn) => hashFn(path.join(":")),
|
|
37
38
|
transform,
|
|
38
39
|
}
|
|
39
40
|
})
|
|
40
41
|
|
|
41
|
-
const recipeStyles =
|
|
42
|
+
const recipeStyles = getVariantProps(variants)
|
|
42
43
|
|
|
43
44
|
if (withCompoundVariants) {
|
|
44
45
|
const compoundVariantStyles = getCompoundVariantCss(compoundVariants, recipeStyles)
|
|
@@ -48,11 +49,13 @@ export const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
|
48
49
|
return recipeCss(recipeStyles)
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
return
|
|
52
|
+
return {
|
|
53
|
+
recipeFn,
|
|
54
|
+
getVariantProps,
|
|
52
55
|
__getCompoundVariantCss__: (variants) => {
|
|
53
|
-
return getCompoundVariantCss(compoundVariants,
|
|
56
|
+
return getCompoundVariantCss(compoundVariants, getVariantProps(variants));
|
|
54
57
|
},
|
|
55
|
-
}
|
|
58
|
+
}
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
export const mergeRecipes = (recipeA, recipeB) => {
|
|
@@ -21,6 +21,7 @@ export interface DateItemRecipeRecipe {
|
|
|
21
21
|
variantMap: DateItemRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof DateItemRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends DateItemRecipeVariantProps>(props: Props): [DateItemRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DateItemRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: DateItemRecipeVariantProps) => DateItemRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -22,9 +22,10 @@ const dateItemRecipeVariantMap = {
|
|
|
22
22
|
|
|
23
23
|
const dateItemRecipeVariantKeys = Object.keys(dateItemRecipeVariantMap)
|
|
24
24
|
|
|
25
|
-
export const dateItemRecipe = /* @__PURE__ */ Object.assign(memo(dateItemRecipeFn), {
|
|
25
|
+
export const dateItemRecipe = /* @__PURE__ */ Object.assign(memo(dateItemRecipeFn.recipeFn), {
|
|
26
26
|
__recipe__: true,
|
|
27
27
|
__name__: 'dateItemRecipe',
|
|
28
|
+
__getCompoundVariantCss__: dateItemRecipeFn.__getCompoundVariantCss__,
|
|
28
29
|
raw: (props) => props,
|
|
29
30
|
variantKeys: dateItemRecipeVariantKeys,
|
|
30
31
|
variantMap: dateItemRecipeVariantMap,
|
|
@@ -34,4 +35,5 @@ export const dateItemRecipe = /* @__PURE__ */ Object.assign(memo(dateItemRecipeF
|
|
|
34
35
|
splitVariantProps(props) {
|
|
35
36
|
return splitProps(props, dateItemRecipeVariantKeys)
|
|
36
37
|
},
|
|
38
|
+
getVariantProps: dateItemRecipeFn.getVariantProps,
|
|
37
39
|
})
|
|
@@ -21,6 +21,7 @@ export interface DatePickerSlotRecipeRecipe {
|
|
|
21
21
|
variantMap: DatePickerSlotRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof DatePickerSlotRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends DatePickerSlotRecipeVariantProps>(props: Props): [DatePickerSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DatePickerSlotRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: DatePickerSlotRecipeVariantProps) => DatePickerSlotRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const datePickerSlotRecipeDefaultVariants = {}
|
|
@@ -17,10 +17,11 @@ const datePickerSlotRecipeSlotNames = [
|
|
|
17
17
|
const datePickerSlotRecipeSlotFns = /* @__PURE__ */ datePickerSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, datePickerSlotRecipeDefaultVariants, getSlotCompoundVariant(datePickerSlotRecipeCompoundVariants, slotName))])
|
|
18
18
|
|
|
19
19
|
const datePickerSlotRecipeFn = memo((props = {}) => {
|
|
20
|
-
return Object.fromEntries(datePickerSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
20
|
+
return Object.fromEntries(datePickerSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
21
21
|
})
|
|
22
22
|
|
|
23
23
|
const datePickerSlotRecipeVariantKeys = []
|
|
24
|
+
const getVariantProps = (variants) => ({ ...datePickerSlotRecipeDefaultVariants, ...compact(variants) })
|
|
24
25
|
|
|
25
26
|
export const datePickerSlotRecipe = /* @__PURE__ */ Object.assign(datePickerSlotRecipeFn, {
|
|
26
27
|
__recipe__: false,
|
|
@@ -31,4 +32,5 @@ export const datePickerSlotRecipe = /* @__PURE__ */ Object.assign(datePickerSlot
|
|
|
31
32
|
splitVariantProps(props) {
|
|
32
33
|
return splitProps(props, datePickerSlotRecipeVariantKeys)
|
|
33
34
|
},
|
|
35
|
+
getVariantProps
|
|
34
36
|
})
|
|
@@ -21,6 +21,7 @@ export interface DayItemRecipeRecipe {
|
|
|
21
21
|
variantMap: DayItemRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof DayItemRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends DayItemRecipeVariantProps>(props: Props): [DayItemRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DayItemRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: DayItemRecipeVariantProps) => DayItemRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -7,9 +7,10 @@ const dayItemRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const dayItemRecipeVariantKeys = Object.keys(dayItemRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const dayItemRecipe = /* @__PURE__ */ Object.assign(memo(dayItemRecipeFn), {
|
|
10
|
+
export const dayItemRecipe = /* @__PURE__ */ Object.assign(memo(dayItemRecipeFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'dayItemRecipe',
|
|
13
|
+
__getCompoundVariantCss__: dayItemRecipeFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: dayItemRecipeVariantKeys,
|
|
15
16
|
variantMap: dayItemRecipeVariantMap,
|
|
@@ -19,4 +20,5 @@ export const dayItemRecipe = /* @__PURE__ */ Object.assign(memo(dayItemRecipeFn)
|
|
|
19
20
|
splitVariantProps(props) {
|
|
20
21
|
return splitProps(props, dayItemRecipeVariantKeys)
|
|
21
22
|
},
|
|
23
|
+
getVariantProps: dayItemRecipeFn.getVariantProps,
|
|
22
24
|
})
|
|
@@ -21,6 +21,7 @@ export interface DividerRecipeRecipe {
|
|
|
21
21
|
variantMap: DividerRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof DividerRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends DividerRecipeVariantProps>(props: Props): [DividerRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DividerRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: DividerRecipeVariantProps) => DividerRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -14,9 +14,10 @@ const dividerRecipeVariantMap = {
|
|
|
14
14
|
|
|
15
15
|
const dividerRecipeVariantKeys = Object.keys(dividerRecipeVariantMap)
|
|
16
16
|
|
|
17
|
-
export const dividerRecipe = /* @__PURE__ */ Object.assign(memo(dividerRecipeFn), {
|
|
17
|
+
export const dividerRecipe = /* @__PURE__ */ Object.assign(memo(dividerRecipeFn.recipeFn), {
|
|
18
18
|
__recipe__: true,
|
|
19
19
|
__name__: 'dividerRecipe',
|
|
20
|
+
__getCompoundVariantCss__: dividerRecipeFn.__getCompoundVariantCss__,
|
|
20
21
|
raw: (props) => props,
|
|
21
22
|
variantKeys: dividerRecipeVariantKeys,
|
|
22
23
|
variantMap: dividerRecipeVariantMap,
|
|
@@ -26,4 +27,5 @@ export const dividerRecipe = /* @__PURE__ */ Object.assign(memo(dividerRecipeFn)
|
|
|
26
27
|
splitVariantProps(props) {
|
|
27
28
|
return splitProps(props, dividerRecipeVariantKeys)
|
|
28
29
|
},
|
|
30
|
+
getVariantProps: dividerRecipeFn.getVariantProps,
|
|
29
31
|
})
|
|
@@ -21,6 +21,7 @@ export interface DropzoneSlotRecipeRecipe {
|
|
|
21
21
|
variantMap: DropzoneSlotRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof DropzoneSlotRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends DropzoneSlotRecipeVariantProps>(props: Props): [DropzoneSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DropzoneSlotRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: DropzoneSlotRecipeVariantProps) => DropzoneSlotRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const dropzoneSlotRecipeDefaultVariants = {}
|
|
@@ -53,10 +53,11 @@ const dropzoneSlotRecipeSlotNames = [
|
|
|
53
53
|
const dropzoneSlotRecipeSlotFns = /* @__PURE__ */ dropzoneSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, dropzoneSlotRecipeDefaultVariants, getSlotCompoundVariant(dropzoneSlotRecipeCompoundVariants, slotName))])
|
|
54
54
|
|
|
55
55
|
const dropzoneSlotRecipeFn = memo((props = {}) => {
|
|
56
|
-
return Object.fromEntries(dropzoneSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
56
|
+
return Object.fromEntries(dropzoneSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
57
57
|
})
|
|
58
58
|
|
|
59
59
|
const dropzoneSlotRecipeVariantKeys = []
|
|
60
|
+
const getVariantProps = (variants) => ({ ...dropzoneSlotRecipeDefaultVariants, ...compact(variants) })
|
|
60
61
|
|
|
61
62
|
export const dropzoneSlotRecipe = /* @__PURE__ */ Object.assign(dropzoneSlotRecipeFn, {
|
|
62
63
|
__recipe__: false,
|
|
@@ -67,4 +68,5 @@ export const dropzoneSlotRecipe = /* @__PURE__ */ Object.assign(dropzoneSlotReci
|
|
|
67
68
|
splitVariantProps(props) {
|
|
68
69
|
return splitProps(props, dropzoneSlotRecipeVariantKeys)
|
|
69
70
|
},
|
|
71
|
+
getVariantProps
|
|
70
72
|
})
|
|
@@ -21,6 +21,7 @@ export interface FormControlSlotRecipeRecipe {
|
|
|
21
21
|
variantMap: FormControlSlotRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof FormControlSlotRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends FormControlSlotRecipeVariantProps>(props: Props): [FormControlSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof FormControlSlotRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: FormControlSlotRecipeVariantProps) => FormControlSlotRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const formControlSlotRecipeDefaultVariants = {}
|
|
@@ -29,10 +29,11 @@ const formControlSlotRecipeSlotNames = [
|
|
|
29
29
|
const formControlSlotRecipeSlotFns = /* @__PURE__ */ formControlSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, formControlSlotRecipeDefaultVariants, getSlotCompoundVariant(formControlSlotRecipeCompoundVariants, slotName))])
|
|
30
30
|
|
|
31
31
|
const formControlSlotRecipeFn = memo((props = {}) => {
|
|
32
|
-
return Object.fromEntries(formControlSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
32
|
+
return Object.fromEntries(formControlSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
const formControlSlotRecipeVariantKeys = []
|
|
36
|
+
const getVariantProps = (variants) => ({ ...formControlSlotRecipeDefaultVariants, ...compact(variants) })
|
|
36
37
|
|
|
37
38
|
export const formControlSlotRecipe = /* @__PURE__ */ Object.assign(formControlSlotRecipeFn, {
|
|
38
39
|
__recipe__: false,
|
|
@@ -43,4 +44,5 @@ export const formControlSlotRecipe = /* @__PURE__ */ Object.assign(formControlSl
|
|
|
43
44
|
splitVariantProps(props) {
|
|
44
45
|
return splitProps(props, formControlSlotRecipeVariantKeys)
|
|
45
46
|
},
|
|
47
|
+
getVariantProps
|
|
46
48
|
})
|
package/recipes/icon-recipe.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export interface IconRecipeRecipe {
|
|
|
21
21
|
variantMap: IconRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof IconRecipeVariant>
|
|
23
23
|
splitVariantProps<Props extends IconRecipeVariantProps>(props: Props): [IconRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof IconRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: IconRecipeVariantProps) => IconRecipeVariantProps
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
package/recipes/icon-recipe.mjs
CHANGED
|
@@ -14,9 +14,10 @@ const iconRecipeVariantMap = {
|
|
|
14
14
|
|
|
15
15
|
const iconRecipeVariantKeys = Object.keys(iconRecipeVariantMap)
|
|
16
16
|
|
|
17
|
-
export const iconRecipe = /* @__PURE__ */ Object.assign(memo(iconRecipeFn), {
|
|
17
|
+
export const iconRecipe = /* @__PURE__ */ Object.assign(memo(iconRecipeFn.recipeFn), {
|
|
18
18
|
__recipe__: true,
|
|
19
19
|
__name__: 'iconRecipe',
|
|
20
|
+
__getCompoundVariantCss__: iconRecipeFn.__getCompoundVariantCss__,
|
|
20
21
|
raw: (props) => props,
|
|
21
22
|
variantKeys: iconRecipeVariantKeys,
|
|
22
23
|
variantMap: iconRecipeVariantMap,
|
|
@@ -26,4 +27,5 @@ export const iconRecipe = /* @__PURE__ */ Object.assign(memo(iconRecipeFn), {
|
|
|
26
27
|
splitVariantProps(props) {
|
|
27
28
|
return splitProps(props, iconRecipeVariantKeys)
|
|
28
29
|
},
|
|
30
|
+
getVariantProps: iconRecipeFn.getVariantProps,
|
|
29
31
|
})
|