@mekari/pixel3-styled-system 0.0.5-dev.1 → 0.0.5-dev.3
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 +13 -0
- package/css/css.mjs +1 -1
- package/css/cva.mjs +2 -2
- package/css/sva.mjs +2 -2
- package/helpers.mjs +50 -20
- package/jsx/cq.d.ts +10 -0
- package/jsx/cq.mjs +18 -0
- package/jsx/index.d.ts +1 -0
- package/jsx/index.mjs +2 -1
- package/jsx/is-valid-prop.d.ts +8 -1
- package/jsx/is-valid-prop.mjs +2 -2
- package/package.json +1 -1
- package/patterns/aspect-ratio.mjs +5 -2
- package/patterns/bleed.mjs +12 -7
- package/patterns/box.mjs +5 -2
- package/patterns/center.mjs +5 -2
- package/patterns/circle.mjs +5 -2
- package/patterns/container.mjs +5 -2
- package/patterns/cq.d.ts +22 -0
- package/patterns/cq.mjs +21 -0
- package/patterns/divider.mjs +8 -4
- package/patterns/flex.mjs +5 -2
- package/patterns/float.mjs +10 -3
- package/patterns/grid-item.mjs +5 -2
- package/patterns/grid.mjs +11 -6
- package/patterns/hstack.mjs +8 -4
- package/patterns/index.d.ts +2 -1
- package/patterns/index.mjs +2 -1
- package/patterns/link-box.mjs +5 -2
- package/patterns/link-overlay.mjs +5 -2
- package/patterns/spacer.mjs +5 -2
- package/patterns/square.mjs +5 -2
- package/patterns/stack.mjs +8 -4
- package/patterns/visually-hidden.mjs +5 -2
- package/patterns/vstack.mjs +8 -4
- package/patterns/wrap.mjs +5 -2
- package/recipes/accordion.mjs +3 -3
- package/recipes/avatar-group-slot-recipe.mjs +3 -3
- package/recipes/avatar-slot-recipe.mjs +3 -3
- package/recipes/badge-recipe.mjs +2 -2
- package/recipes/banner-close-button-recipe.mjs +2 -2
- package/recipes/banner-description-recipe.mjs +2 -2
- package/recipes/banner-icon-slot-recipe.mjs +3 -3
- package/recipes/banner-link-recipe.mjs +2 -2
- package/recipes/banner-slot-recipe.mjs +3 -3
- package/recipes/banner-title-recipe.mjs +2 -2
- package/recipes/broadcast-slot-recipe.d.ts +1 -1
- package/recipes/broadcast-slot-recipe.mjs +5 -5
- package/recipes/button-group-recipe.mjs +2 -2
- package/recipes/button-recipe.mjs +2 -2
- package/recipes/checkbox-slot-recipe.mjs +3 -3
- package/recipes/divider-recipe.mjs +2 -2
- package/recipes/dropzone-slot-recipe.mjs +3 -3
- package/recipes/form-control-slot-recipe.mjs +3 -3
- package/recipes/icon-recipe.mjs +2 -2
- package/recipes/input-addon-slot-recipe.mjs +3 -3
- package/recipes/input-group-slot-recipe.mjs +3 -3
- package/recipes/input-slot-recipe.mjs +3 -3
- package/recipes/input-tag-slot-recipe.mjs +3 -3
- package/recipes/modal-slot-recipe.mjs +3 -3
- package/recipes/popover-content-recipe.mjs +2 -2
- package/recipes/popover-list-item-recipe.mjs +2 -2
- package/recipes/popover-list-recipe.mjs +2 -2
- package/recipes/progress-slot-recipe.mjs +3 -3
- package/recipes/radio-slot-recipe.mjs +3 -3
- package/recipes/segmented-control-slot-recipe.mjs +3 -3
- package/recipes/select-slot-recipe.mjs +3 -3
- package/recipes/selected-border-recipe.mjs +2 -2
- package/recipes/shared-slot-recipe.mjs +3 -3
- package/recipes/spinner-recipe.mjs +2 -2
- package/recipes/tab-list-recipe.mjs +2 -2
- package/recipes/tab-recipe.mjs +2 -2
- package/recipes/table-container-recipe.mjs +2 -2
- package/recipes/table-recipe.mjs +2 -2
- package/recipes/tag-slot-recipe.mjs +3 -3
- package/recipes/text-recipe.mjs +2 -2
- package/recipes/textarea-recipe.mjs +2 -2
- package/recipes/toast-slot-recipe.mjs +3 -3
- package/recipes/toggle-slot-recipe.mjs +3 -3
- package/recipes/tooltip-recipe.mjs +2 -2
- package/recipes/upload-list-slot-recipe.mjs +3 -3
- package/recipes/upload-slot-recipe.mjs +3 -3
- package/tokens/index.mjs +0 -20
- package/tokens/tokens.d.ts +4 -4
- package/types/conditions.d.ts +2 -2
- package/types/pattern.d.ts +13 -2
- package/types/prop-type.d.ts +96 -13
- package/types/recipe.d.ts +5 -2
- package/types/static-css.d.ts +5 -3
package/patterns/hstack.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const hstackConfig = {
|
|
5
5
|
transform(props) {
|
|
6
|
-
const { justify, gap
|
|
6
|
+
const { justify, gap, ...rest } = props;
|
|
7
7
|
return {
|
|
8
8
|
display: "flex",
|
|
9
9
|
alignItems: "center",
|
|
@@ -12,9 +12,13 @@ transform(props) {
|
|
|
12
12
|
flexDirection: "row",
|
|
13
13
|
...rest
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
defaultValues:{gap:'10px'}}
|
|
16
17
|
|
|
17
|
-
export const getHstackStyle = (styles = {}) =>
|
|
18
|
+
export const getHstackStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(hstackConfig, styles)
|
|
20
|
+
return hstackConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
18
22
|
|
|
19
23
|
export const hstack = (styles) => css(getHstackStyle(styles))
|
|
20
24
|
hstack.raw = getHstackStyle
|
package/patterns/index.d.ts
CHANGED
package/patterns/index.mjs
CHANGED
package/patterns/link-box.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const linkBoxConfig = {
|
|
@@ -13,7 +13,10 @@ transform(props) {
|
|
|
13
13
|
};
|
|
14
14
|
}}
|
|
15
15
|
|
|
16
|
-
export const getLinkBoxStyle = (styles = {}) =>
|
|
16
|
+
export const getLinkBoxStyle = (styles = {}) => {
|
|
17
|
+
const _styles = getPatternStyles(linkBoxConfig, styles)
|
|
18
|
+
return linkBoxConfig.transform(_styles, patternFns)
|
|
19
|
+
}
|
|
17
20
|
|
|
18
21
|
export const linkBox = (styles) => css(getLinkBoxStyle(styles))
|
|
19
22
|
linkBox.raw = getLinkBoxStyle
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const linkOverlayConfig = {
|
|
@@ -18,7 +18,10 @@ transform(props) {
|
|
|
18
18
|
};
|
|
19
19
|
}}
|
|
20
20
|
|
|
21
|
-
export const getLinkOverlayStyle = (styles = {}) =>
|
|
21
|
+
export const getLinkOverlayStyle = (styles = {}) => {
|
|
22
|
+
const _styles = getPatternStyles(linkOverlayConfig, styles)
|
|
23
|
+
return linkOverlayConfig.transform(_styles, patternFns)
|
|
24
|
+
}
|
|
22
25
|
|
|
23
26
|
export const linkOverlay = (styles) => css(getLinkOverlayStyle(styles))
|
|
24
27
|
linkOverlay.raw = getLinkOverlayStyle
|
package/patterns/spacer.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const spacerConfig = {
|
|
@@ -12,7 +12,10 @@ transform(props, { map }) {
|
|
|
12
12
|
};
|
|
13
13
|
}}
|
|
14
14
|
|
|
15
|
-
export const getSpacerStyle = (styles = {}) =>
|
|
15
|
+
export const getSpacerStyle = (styles = {}) => {
|
|
16
|
+
const _styles = getPatternStyles(spacerConfig, styles)
|
|
17
|
+
return spacerConfig.transform(_styles, patternFns)
|
|
18
|
+
}
|
|
16
19
|
|
|
17
20
|
export const spacer = (styles) => css(getSpacerStyle(styles))
|
|
18
21
|
spacer.raw = getSpacerStyle
|
package/patterns/square.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const squareConfig = {
|
|
@@ -15,7 +15,10 @@ transform(props) {
|
|
|
15
15
|
};
|
|
16
16
|
}}
|
|
17
17
|
|
|
18
|
-
export const getSquareStyle = (styles = {}) =>
|
|
18
|
+
export const getSquareStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(squareConfig, styles)
|
|
20
|
+
return squareConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
19
22
|
|
|
20
23
|
export const square = (styles) => css(getSquareStyle(styles))
|
|
21
24
|
square.raw = getSquareStyle
|
package/patterns/stack.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const stackConfig = {
|
|
5
5
|
transform(props) {
|
|
6
|
-
const { align, justify, direction
|
|
6
|
+
const { align, justify, direction, gap, ...rest } = props;
|
|
7
7
|
return {
|
|
8
8
|
display: "flex",
|
|
9
9
|
flexDirection: direction,
|
|
@@ -12,9 +12,13 @@ transform(props) {
|
|
|
12
12
|
gap,
|
|
13
13
|
...rest
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
defaultValues:{direction:'column',gap:'10px'}}
|
|
16
17
|
|
|
17
|
-
export const getStackStyle = (styles = {}) =>
|
|
18
|
+
export const getStackStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(stackConfig, styles)
|
|
20
|
+
return stackConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
18
22
|
|
|
19
23
|
export const stack = (styles) => css(getStackStyle(styles))
|
|
20
24
|
stack.raw = getStackStyle
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const visuallyHiddenConfig = {
|
|
@@ -9,7 +9,10 @@ transform(props) {
|
|
|
9
9
|
};
|
|
10
10
|
}}
|
|
11
11
|
|
|
12
|
-
export const getVisuallyHiddenStyle = (styles = {}) =>
|
|
12
|
+
export const getVisuallyHiddenStyle = (styles = {}) => {
|
|
13
|
+
const _styles = getPatternStyles(visuallyHiddenConfig, styles)
|
|
14
|
+
return visuallyHiddenConfig.transform(_styles, patternFns)
|
|
15
|
+
}
|
|
13
16
|
|
|
14
17
|
export const visuallyHidden = (styles) => css(getVisuallyHiddenStyle(styles))
|
|
15
18
|
visuallyHidden.raw = getVisuallyHiddenStyle
|
package/patterns/vstack.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const vstackConfig = {
|
|
5
5
|
transform(props) {
|
|
6
|
-
const { justify, gap
|
|
6
|
+
const { justify, gap, ...rest } = props;
|
|
7
7
|
return {
|
|
8
8
|
display: "flex",
|
|
9
9
|
alignItems: "center",
|
|
@@ -12,9 +12,13 @@ transform(props) {
|
|
|
12
12
|
flexDirection: "column",
|
|
13
13
|
...rest
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
defaultValues:{gap:'10px'}}
|
|
16
17
|
|
|
17
|
-
export const getVstackStyle = (styles = {}) =>
|
|
18
|
+
export const getVstackStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(vstackConfig, styles)
|
|
20
|
+
return vstackConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
18
22
|
|
|
19
23
|
export const vstack = (styles) => css(getVstackStyle(styles))
|
|
20
24
|
vstack.raw = getVstackStyle
|
package/patterns/wrap.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const wrapConfig = {
|
|
@@ -16,7 +16,10 @@ transform(props) {
|
|
|
16
16
|
};
|
|
17
17
|
}}
|
|
18
18
|
|
|
19
|
-
export const getWrapStyle = (styles = {}) =>
|
|
19
|
+
export const getWrapStyle = (styles = {}) => {
|
|
20
|
+
const _styles = getPatternStyles(wrapConfig, styles)
|
|
21
|
+
return wrapConfig.transform(_styles, patternFns)
|
|
22
|
+
}
|
|
20
23
|
|
|
21
24
|
export const wrap = (styles) => css(getWrapStyle(styles))
|
|
22
25
|
wrap.raw = getWrapStyle
|
package/recipes/accordion.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const accordionDefaultVariants = {
|
|
@@ -26,9 +26,9 @@ const accordionSlotNames = [
|
|
|
26
26
|
]
|
|
27
27
|
const accordionSlotFns = /* @__PURE__ */ accordionSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, accordionDefaultVariants, getSlotCompoundVariant(accordionCompoundVariants, slotName))])
|
|
28
28
|
|
|
29
|
-
const accordionFn = (props = {}) => {
|
|
29
|
+
const accordionFn = memo((props = {}) => {
|
|
30
30
|
return Object.fromEntries(accordionSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
31
|
-
}
|
|
31
|
+
})
|
|
32
32
|
|
|
33
33
|
const accordionVariantKeys = [
|
|
34
34
|
"size"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const avatarGroupSlotRecipeDefaultVariants = {}
|
|
@@ -16,9 +16,9 @@ const avatarGroupSlotRecipeSlotNames = [
|
|
|
16
16
|
]
|
|
17
17
|
const avatarGroupSlotRecipeSlotFns = /* @__PURE__ */ avatarGroupSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, avatarGroupSlotRecipeDefaultVariants, getSlotCompoundVariant(avatarGroupSlotRecipeCompoundVariants, slotName))])
|
|
18
18
|
|
|
19
|
-
const avatarGroupSlotRecipeFn = (props = {}) => {
|
|
19
|
+
const avatarGroupSlotRecipeFn = memo((props = {}) => {
|
|
20
20
|
return Object.fromEntries(avatarGroupSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
21
|
-
}
|
|
21
|
+
})
|
|
22
22
|
|
|
23
23
|
const avatarGroupSlotRecipeVariantKeys = [
|
|
24
24
|
"size"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const avatarSlotRecipeDefaultVariants = {
|
|
@@ -72,9 +72,9 @@ const avatarSlotRecipeSlotNames = [
|
|
|
72
72
|
]
|
|
73
73
|
const avatarSlotRecipeSlotFns = /* @__PURE__ */ avatarSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, avatarSlotRecipeDefaultVariants, getSlotCompoundVariant(avatarSlotRecipeCompoundVariants, slotName))])
|
|
74
74
|
|
|
75
|
-
const avatarSlotRecipeFn = (props = {}) => {
|
|
75
|
+
const avatarSlotRecipeFn = memo((props = {}) => {
|
|
76
76
|
return Object.fromEntries(avatarSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
77
|
-
}
|
|
77
|
+
})
|
|
78
78
|
|
|
79
79
|
const avatarSlotRecipeVariantKeys = [
|
|
80
80
|
"variant",
|
package/recipes/badge-recipe.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const badgeRecipeFn = /* @__PURE__ */ createRecipe('badge', {
|
|
@@ -145,7 +145,7 @@ const badgeRecipeVariantMap = {
|
|
|
145
145
|
|
|
146
146
|
const badgeRecipeVariantKeys = Object.keys(badgeRecipeVariantMap)
|
|
147
147
|
|
|
148
|
-
export const badgeRecipe = /* @__PURE__ */ Object.assign(badgeRecipeFn, {
|
|
148
|
+
export const badgeRecipe = /* @__PURE__ */ Object.assign(memo(badgeRecipeFn), {
|
|
149
149
|
__recipe__: true,
|
|
150
150
|
__name__: 'badgeRecipe',
|
|
151
151
|
raw: (props) => props,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const bannerCloseButtonRecipeFn = /* @__PURE__ */ createRecipe('banner-close-button', {}, [])
|
|
@@ -7,7 +7,7 @@ const bannerCloseButtonRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const bannerCloseButtonRecipeVariantKeys = Object.keys(bannerCloseButtonRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const bannerCloseButtonRecipe = /* @__PURE__ */ Object.assign(bannerCloseButtonRecipeFn, {
|
|
10
|
+
export const bannerCloseButtonRecipe = /* @__PURE__ */ Object.assign(memo(bannerCloseButtonRecipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'bannerCloseButtonRecipe',
|
|
13
13
|
raw: (props) => props,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const bannerDescriptionRecipeFn = /* @__PURE__ */ createRecipe('banner-description', {}, [])
|
|
@@ -7,7 +7,7 @@ const bannerDescriptionRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const bannerDescriptionRecipeVariantKeys = Object.keys(bannerDescriptionRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const bannerDescriptionRecipe = /* @__PURE__ */ Object.assign(bannerDescriptionRecipeFn, {
|
|
10
|
+
export const bannerDescriptionRecipe = /* @__PURE__ */ Object.assign(memo(bannerDescriptionRecipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'bannerDescriptionRecipe',
|
|
13
13
|
raw: (props) => props,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const bannerIconSlotRecipeDefaultVariants = {}
|
|
@@ -16,9 +16,9 @@ const bannerIconSlotRecipeSlotNames = [
|
|
|
16
16
|
]
|
|
17
17
|
const bannerIconSlotRecipeSlotFns = /* @__PURE__ */ bannerIconSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, bannerIconSlotRecipeDefaultVariants, getSlotCompoundVariant(bannerIconSlotRecipeCompoundVariants, slotName))])
|
|
18
18
|
|
|
19
|
-
const bannerIconSlotRecipeFn = (props = {}) => {
|
|
19
|
+
const bannerIconSlotRecipeFn = memo((props = {}) => {
|
|
20
20
|
return Object.fromEntries(bannerIconSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
21
|
-
}
|
|
21
|
+
})
|
|
22
22
|
|
|
23
23
|
const bannerIconSlotRecipeVariantKeys = []
|
|
24
24
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const bannerLinkRecipeFn = /* @__PURE__ */ createRecipe('banner-link', {}, [])
|
|
@@ -7,7 +7,7 @@ const bannerLinkRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const bannerLinkRecipeVariantKeys = Object.keys(bannerLinkRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const bannerLinkRecipe = /* @__PURE__ */ Object.assign(bannerLinkRecipeFn, {
|
|
10
|
+
export const bannerLinkRecipe = /* @__PURE__ */ Object.assign(memo(bannerLinkRecipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'bannerLinkRecipe',
|
|
13
13
|
raw: (props) => props,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const bannerSlotRecipeDefaultVariants = {
|
|
@@ -18,9 +18,9 @@ const bannerSlotRecipeSlotNames = [
|
|
|
18
18
|
]
|
|
19
19
|
const bannerSlotRecipeSlotFns = /* @__PURE__ */ bannerSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, bannerSlotRecipeDefaultVariants, getSlotCompoundVariant(bannerSlotRecipeCompoundVariants, slotName))])
|
|
20
20
|
|
|
21
|
-
const bannerSlotRecipeFn = (props = {}) => {
|
|
21
|
+
const bannerSlotRecipeFn = memo((props = {}) => {
|
|
22
22
|
return Object.fromEntries(bannerSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
23
|
-
}
|
|
23
|
+
})
|
|
24
24
|
|
|
25
25
|
const bannerSlotRecipeVariantKeys = [
|
|
26
26
|
"variant"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const bannerTitleRecipeFn = /* @__PURE__ */ createRecipe('banner-title', {}, [])
|
|
@@ -7,7 +7,7 @@ const bannerTitleRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const bannerTitleRecipeVariantKeys = Object.keys(bannerTitleRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const bannerTitleRecipe = /* @__PURE__ */ Object.assign(bannerTitleRecipeFn, {
|
|
10
|
+
export const bannerTitleRecipe = /* @__PURE__ */ Object.assign(memo(bannerTitleRecipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'bannerTitleRecipe',
|
|
13
13
|
raw: (props) => props,
|
|
@@ -16,7 +16,7 @@ export type BroadcastSlotRecipeVariantProps = {
|
|
|
16
16
|
|
|
17
17
|
export interface BroadcastSlotRecipeRecipe {
|
|
18
18
|
__type: BroadcastSlotRecipeVariantProps
|
|
19
|
-
(props?: BroadcastSlotRecipeVariantProps): Pretty<Record<"root" | "container" | "wrapper" | "icon" | "
|
|
19
|
+
(props?: BroadcastSlotRecipeVariantProps): Pretty<Record<"root" | "container" | "wrapper" | "icon" | "label" | "textLink" | "action" | "close", string>>
|
|
20
20
|
raw: (props?: BroadcastSlotRecipeVariantProps) => BroadcastSlotRecipeVariantProps
|
|
21
21
|
variantMap: BroadcastSlotRecipeVariantMap
|
|
22
22
|
variantKeys: Array<keyof BroadcastSlotRecipeVariant>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const broadcastSlotRecipeDefaultVariants = {
|
|
@@ -24,8 +24,8 @@ const broadcastSlotRecipeSlotNames = [
|
|
|
24
24
|
"broadcast__icon"
|
|
25
25
|
],
|
|
26
26
|
[
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"label",
|
|
28
|
+
"broadcast__label"
|
|
29
29
|
],
|
|
30
30
|
[
|
|
31
31
|
"textLink",
|
|
@@ -42,9 +42,9 @@ const broadcastSlotRecipeSlotNames = [
|
|
|
42
42
|
]
|
|
43
43
|
const broadcastSlotRecipeSlotFns = /* @__PURE__ */ broadcastSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, broadcastSlotRecipeDefaultVariants, getSlotCompoundVariant(broadcastSlotRecipeCompoundVariants, slotName))])
|
|
44
44
|
|
|
45
|
-
const broadcastSlotRecipeFn = (props = {}) => {
|
|
45
|
+
const broadcastSlotRecipeFn = memo((props = {}) => {
|
|
46
46
|
return Object.fromEntries(broadcastSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
47
|
-
}
|
|
47
|
+
})
|
|
48
48
|
|
|
49
49
|
const broadcastSlotRecipeVariantKeys = [
|
|
50
50
|
"variant"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const buttonGroupRecipeFn = /* @__PURE__ */ createRecipe('pixel-button-group', {}, [])
|
|
@@ -7,7 +7,7 @@ const buttonGroupRecipeVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const buttonGroupRecipeVariantKeys = Object.keys(buttonGroupRecipeVariantMap)
|
|
9
9
|
|
|
10
|
-
export const buttonGroupRecipe = /* @__PURE__ */ Object.assign(buttonGroupRecipeFn, {
|
|
10
|
+
export const buttonGroupRecipe = /* @__PURE__ */ Object.assign(memo(buttonGroupRecipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'buttonGroupRecipe',
|
|
13
13
|
raw: (props) => props,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const buttonRecipeFn = /* @__PURE__ */ createRecipe('button', {
|
|
@@ -77,7 +77,7 @@ const buttonRecipeVariantMap = {
|
|
|
77
77
|
|
|
78
78
|
const buttonRecipeVariantKeys = Object.keys(buttonRecipeVariantMap)
|
|
79
79
|
|
|
80
|
-
export const buttonRecipe = /* @__PURE__ */ Object.assign(buttonRecipeFn, {
|
|
80
|
+
export const buttonRecipe = /* @__PURE__ */ Object.assign(memo(buttonRecipeFn), {
|
|
81
81
|
__recipe__: true,
|
|
82
82
|
__name__: 'buttonRecipe',
|
|
83
83
|
raw: (props) => props,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const checkboxSlotRecipeDefaultVariants = {}
|
|
@@ -20,9 +20,9 @@ const checkboxSlotRecipeSlotNames = [
|
|
|
20
20
|
]
|
|
21
21
|
const checkboxSlotRecipeSlotFns = /* @__PURE__ */ checkboxSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, checkboxSlotRecipeDefaultVariants, getSlotCompoundVariant(checkboxSlotRecipeCompoundVariants, slotName))])
|
|
22
22
|
|
|
23
|
-
const checkboxSlotRecipeFn = (props = {}) => {
|
|
23
|
+
const checkboxSlotRecipeFn = memo((props = {}) => {
|
|
24
24
|
return Object.fromEntries(checkboxSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
25
|
-
}
|
|
25
|
+
})
|
|
26
26
|
|
|
27
27
|
const checkboxSlotRecipeVariantKeys = []
|
|
28
28
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const dividerRecipeFn = /* @__PURE__ */ createRecipe('divider', {
|
|
@@ -14,7 +14,7 @@ const dividerRecipeVariantMap = {
|
|
|
14
14
|
|
|
15
15
|
const dividerRecipeVariantKeys = Object.keys(dividerRecipeVariantMap)
|
|
16
16
|
|
|
17
|
-
export const dividerRecipe = /* @__PURE__ */ Object.assign(dividerRecipeFn, {
|
|
17
|
+
export const dividerRecipe = /* @__PURE__ */ Object.assign(memo(dividerRecipeFn), {
|
|
18
18
|
__recipe__: true,
|
|
19
19
|
__name__: 'dividerRecipe',
|
|
20
20
|
raw: (props) => props,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const dropzoneSlotRecipeDefaultVariants = {}
|
|
@@ -52,9 +52,9 @@ const dropzoneSlotRecipeSlotNames = [
|
|
|
52
52
|
]
|
|
53
53
|
const dropzoneSlotRecipeSlotFns = /* @__PURE__ */ dropzoneSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, dropzoneSlotRecipeDefaultVariants, getSlotCompoundVariant(dropzoneSlotRecipeCompoundVariants, slotName))])
|
|
54
54
|
|
|
55
|
-
const dropzoneSlotRecipeFn = (props = {}) => {
|
|
55
|
+
const dropzoneSlotRecipeFn = memo((props = {}) => {
|
|
56
56
|
return Object.fromEntries(dropzoneSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
57
|
-
}
|
|
57
|
+
})
|
|
58
58
|
|
|
59
59
|
const dropzoneSlotRecipeVariantKeys = []
|
|
60
60
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const formControlSlotRecipeDefaultVariants = {}
|
|
@@ -28,9 +28,9 @@ const formControlSlotRecipeSlotNames = [
|
|
|
28
28
|
]
|
|
29
29
|
const formControlSlotRecipeSlotFns = /* @__PURE__ */ formControlSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, formControlSlotRecipeDefaultVariants, getSlotCompoundVariant(formControlSlotRecipeCompoundVariants, slotName))])
|
|
30
30
|
|
|
31
|
-
const formControlSlotRecipeFn = (props = {}) => {
|
|
31
|
+
const formControlSlotRecipeFn = memo((props = {}) => {
|
|
32
32
|
return Object.fromEntries(formControlSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
33
|
-
}
|
|
33
|
+
})
|
|
34
34
|
|
|
35
35
|
const formControlSlotRecipeVariantKeys = []
|
|
36
36
|
|
package/recipes/icon-recipe.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const iconRecipeFn = /* @__PURE__ */ createRecipe('icon', {
|
|
@@ -14,7 +14,7 @@ const iconRecipeVariantMap = {
|
|
|
14
14
|
|
|
15
15
|
const iconRecipeVariantKeys = Object.keys(iconRecipeVariantMap)
|
|
16
16
|
|
|
17
|
-
export const iconRecipe = /* @__PURE__ */ Object.assign(iconRecipeFn, {
|
|
17
|
+
export const iconRecipe = /* @__PURE__ */ Object.assign(memo(iconRecipeFn), {
|
|
18
18
|
__recipe__: true,
|
|
19
19
|
__name__: 'iconRecipe',
|
|
20
20
|
raw: (props) => props,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const inputAddonSlotRecipeDefaultVariants = {
|
|
@@ -15,9 +15,9 @@ const inputAddonSlotRecipeSlotNames = [
|
|
|
15
15
|
]
|
|
16
16
|
const inputAddonSlotRecipeSlotFns = /* @__PURE__ */ inputAddonSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, inputAddonSlotRecipeDefaultVariants, getSlotCompoundVariant(inputAddonSlotRecipeCompoundVariants, slotName))])
|
|
17
17
|
|
|
18
|
-
const inputAddonSlotRecipeFn = (props = {}) => {
|
|
18
|
+
const inputAddonSlotRecipeFn = memo((props = {}) => {
|
|
19
19
|
return Object.fromEntries(inputAddonSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
20
|
-
}
|
|
20
|
+
})
|
|
21
21
|
|
|
22
22
|
const inputAddonSlotRecipeVariantKeys = [
|
|
23
23
|
"placement",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const inputGroupSlotRecipeDefaultVariants = {}
|
|
@@ -12,9 +12,9 @@ const inputGroupSlotRecipeSlotNames = [
|
|
|
12
12
|
]
|
|
13
13
|
const inputGroupSlotRecipeSlotFns = /* @__PURE__ */ inputGroupSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, inputGroupSlotRecipeDefaultVariants, getSlotCompoundVariant(inputGroupSlotRecipeCompoundVariants, slotName))])
|
|
14
14
|
|
|
15
|
-
const inputGroupSlotRecipeFn = (props = {}) => {
|
|
15
|
+
const inputGroupSlotRecipeFn = memo((props = {}) => {
|
|
16
16
|
return Object.fromEntries(inputGroupSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
17
|
-
}
|
|
17
|
+
})
|
|
18
18
|
|
|
19
19
|
const inputGroupSlotRecipeVariantKeys = []
|
|
20
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const inputSlotRecipeDefaultVariants = {
|
|
@@ -23,9 +23,9 @@ const inputSlotRecipeSlotNames = [
|
|
|
23
23
|
]
|
|
24
24
|
const inputSlotRecipeSlotFns = /* @__PURE__ */ inputSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, inputSlotRecipeDefaultVariants, getSlotCompoundVariant(inputSlotRecipeCompoundVariants, slotName))])
|
|
25
25
|
|
|
26
|
-
const inputSlotRecipeFn = (props = {}) => {
|
|
26
|
+
const inputSlotRecipeFn = memo((props = {}) => {
|
|
27
27
|
return Object.fromEntries(inputSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
28
|
-
}
|
|
28
|
+
})
|
|
29
29
|
|
|
30
30
|
const inputSlotRecipeVariantKeys = [
|
|
31
31
|
"variant",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const inputTagSlotRecipeDefaultVariants = {}
|
|
@@ -52,9 +52,9 @@ const inputTagSlotRecipeSlotNames = [
|
|
|
52
52
|
]
|
|
53
53
|
const inputTagSlotRecipeSlotFns = /* @__PURE__ */ inputTagSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, inputTagSlotRecipeDefaultVariants, getSlotCompoundVariant(inputTagSlotRecipeCompoundVariants, slotName))])
|
|
54
54
|
|
|
55
|
-
const inputTagSlotRecipeFn = (props = {}) => {
|
|
55
|
+
const inputTagSlotRecipeFn = memo((props = {}) => {
|
|
56
56
|
return Object.fromEntries(inputTagSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
57
|
-
}
|
|
57
|
+
})
|
|
58
58
|
|
|
59
59
|
const inputTagSlotRecipeVariantKeys = []
|
|
60
60
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const modalSlotRecipeDefaultVariants = {
|
|
@@ -50,9 +50,9 @@ const modalSlotRecipeSlotNames = [
|
|
|
50
50
|
]
|
|
51
51
|
const modalSlotRecipeSlotFns = /* @__PURE__ */ modalSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, modalSlotRecipeDefaultVariants, getSlotCompoundVariant(modalSlotRecipeCompoundVariants, slotName))])
|
|
52
52
|
|
|
53
|
-
const modalSlotRecipeFn = (props = {}) => {
|
|
53
|
+
const modalSlotRecipeFn = memo((props = {}) => {
|
|
54
54
|
return Object.fromEntries(modalSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
55
|
-
}
|
|
55
|
+
})
|
|
56
56
|
|
|
57
57
|
const modalSlotRecipeVariantKeys = [
|
|
58
58
|
"full"
|