@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.
Files changed (89) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/css/css.mjs +1 -1
  3. package/css/cva.mjs +2 -2
  4. package/css/sva.mjs +2 -2
  5. package/helpers.mjs +50 -20
  6. package/jsx/cq.d.ts +10 -0
  7. package/jsx/cq.mjs +18 -0
  8. package/jsx/index.d.ts +1 -0
  9. package/jsx/index.mjs +2 -1
  10. package/jsx/is-valid-prop.d.ts +8 -1
  11. package/jsx/is-valid-prop.mjs +2 -2
  12. package/package.json +1 -1
  13. package/patterns/aspect-ratio.mjs +5 -2
  14. package/patterns/bleed.mjs +12 -7
  15. package/patterns/box.mjs +5 -2
  16. package/patterns/center.mjs +5 -2
  17. package/patterns/circle.mjs +5 -2
  18. package/patterns/container.mjs +5 -2
  19. package/patterns/cq.d.ts +22 -0
  20. package/patterns/cq.mjs +21 -0
  21. package/patterns/divider.mjs +8 -4
  22. package/patterns/flex.mjs +5 -2
  23. package/patterns/float.mjs +10 -3
  24. package/patterns/grid-item.mjs +5 -2
  25. package/patterns/grid.mjs +11 -6
  26. package/patterns/hstack.mjs +8 -4
  27. package/patterns/index.d.ts +2 -1
  28. package/patterns/index.mjs +2 -1
  29. package/patterns/link-box.mjs +5 -2
  30. package/patterns/link-overlay.mjs +5 -2
  31. package/patterns/spacer.mjs +5 -2
  32. package/patterns/square.mjs +5 -2
  33. package/patterns/stack.mjs +8 -4
  34. package/patterns/visually-hidden.mjs +5 -2
  35. package/patterns/vstack.mjs +8 -4
  36. package/patterns/wrap.mjs +5 -2
  37. package/recipes/accordion.mjs +3 -3
  38. package/recipes/avatar-group-slot-recipe.mjs +3 -3
  39. package/recipes/avatar-slot-recipe.mjs +3 -3
  40. package/recipes/badge-recipe.mjs +2 -2
  41. package/recipes/banner-close-button-recipe.mjs +2 -2
  42. package/recipes/banner-description-recipe.mjs +2 -2
  43. package/recipes/banner-icon-slot-recipe.mjs +3 -3
  44. package/recipes/banner-link-recipe.mjs +2 -2
  45. package/recipes/banner-slot-recipe.mjs +3 -3
  46. package/recipes/banner-title-recipe.mjs +2 -2
  47. package/recipes/broadcast-slot-recipe.d.ts +1 -1
  48. package/recipes/broadcast-slot-recipe.mjs +5 -5
  49. package/recipes/button-group-recipe.mjs +2 -2
  50. package/recipes/button-recipe.mjs +2 -2
  51. package/recipes/checkbox-slot-recipe.mjs +3 -3
  52. package/recipes/divider-recipe.mjs +2 -2
  53. package/recipes/dropzone-slot-recipe.mjs +3 -3
  54. package/recipes/form-control-slot-recipe.mjs +3 -3
  55. package/recipes/icon-recipe.mjs +2 -2
  56. package/recipes/input-addon-slot-recipe.mjs +3 -3
  57. package/recipes/input-group-slot-recipe.mjs +3 -3
  58. package/recipes/input-slot-recipe.mjs +3 -3
  59. package/recipes/input-tag-slot-recipe.mjs +3 -3
  60. package/recipes/modal-slot-recipe.mjs +3 -3
  61. package/recipes/popover-content-recipe.mjs +2 -2
  62. package/recipes/popover-list-item-recipe.mjs +2 -2
  63. package/recipes/popover-list-recipe.mjs +2 -2
  64. package/recipes/progress-slot-recipe.mjs +3 -3
  65. package/recipes/radio-slot-recipe.mjs +3 -3
  66. package/recipes/segmented-control-slot-recipe.mjs +3 -3
  67. package/recipes/select-slot-recipe.mjs +3 -3
  68. package/recipes/selected-border-recipe.mjs +2 -2
  69. package/recipes/shared-slot-recipe.mjs +3 -3
  70. package/recipes/spinner-recipe.mjs +2 -2
  71. package/recipes/tab-list-recipe.mjs +2 -2
  72. package/recipes/tab-recipe.mjs +2 -2
  73. package/recipes/table-container-recipe.mjs +2 -2
  74. package/recipes/table-recipe.mjs +2 -2
  75. package/recipes/tag-slot-recipe.mjs +3 -3
  76. package/recipes/text-recipe.mjs +2 -2
  77. package/recipes/textarea-recipe.mjs +2 -2
  78. package/recipes/toast-slot-recipe.mjs +3 -3
  79. package/recipes/toggle-slot-recipe.mjs +3 -3
  80. package/recipes/tooltip-recipe.mjs +2 -2
  81. package/recipes/upload-list-slot-recipe.mjs +3 -3
  82. package/recipes/upload-slot-recipe.mjs +3 -3
  83. package/tokens/index.mjs +0 -20
  84. package/tokens/tokens.d.ts +4 -4
  85. package/types/conditions.d.ts +2 -2
  86. package/types/pattern.d.ts +13 -2
  87. package/types/prop-type.d.ts +96 -13
  88. package/types/recipe.d.ts +5 -2
  89. package/types/static-css.d.ts +5 -3
@@ -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 popoverContentRecipeFn = /* @__PURE__ */ createRecipe('popover', {
@@ -19,7 +19,7 @@ const popoverContentRecipeVariantMap = {
19
19
 
20
20
  const popoverContentRecipeVariantKeys = Object.keys(popoverContentRecipeVariantMap)
21
21
 
22
- export const popoverContentRecipe = /* @__PURE__ */ Object.assign(popoverContentRecipeFn, {
22
+ export const popoverContentRecipe = /* @__PURE__ */ Object.assign(memo(popoverContentRecipeFn), {
23
23
  __recipe__: true,
24
24
  __name__: 'popoverContentRecipe',
25
25
  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 popoverListItemRecipeFn = /* @__PURE__ */ createRecipe('popover-list-item', {}, [])
@@ -7,7 +7,7 @@ const popoverListItemRecipeVariantMap = {}
7
7
 
8
8
  const popoverListItemRecipeVariantKeys = Object.keys(popoverListItemRecipeVariantMap)
9
9
 
10
- export const popoverListItemRecipe = /* @__PURE__ */ Object.assign(popoverListItemRecipeFn, {
10
+ export const popoverListItemRecipe = /* @__PURE__ */ Object.assign(memo(popoverListItemRecipeFn), {
11
11
  __recipe__: true,
12
12
  __name__: 'popoverListItemRecipe',
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 popoverListRecipeFn = /* @__PURE__ */ createRecipe('popover-list', {}, [])
@@ -7,7 +7,7 @@ const popoverListRecipeVariantMap = {}
7
7
 
8
8
  const popoverListRecipeVariantKeys = Object.keys(popoverListRecipeVariantMap)
9
9
 
10
- export const popoverListRecipe = /* @__PURE__ */ Object.assign(popoverListRecipeFn, {
10
+ export const popoverListRecipe = /* @__PURE__ */ Object.assign(memo(popoverListRecipeFn), {
11
11
  __recipe__: true,
12
12
  __name__: 'popoverListRecipe',
13
13
  raw: (props) => props,
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const progressSlotRecipeDefaultVariants = {
@@ -27,9 +27,9 @@ const progressSlotRecipeSlotNames = [
27
27
  ]
28
28
  const progressSlotRecipeSlotFns = /* @__PURE__ */ progressSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, progressSlotRecipeDefaultVariants, getSlotCompoundVariant(progressSlotRecipeCompoundVariants, slotName))])
29
29
 
30
- const progressSlotRecipeFn = (props = {}) => {
30
+ const progressSlotRecipeFn = memo((props = {}) => {
31
31
  return Object.fromEntries(progressSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
32
- }
32
+ })
33
33
 
34
34
  const progressSlotRecipeVariantKeys = [
35
35
  "size",
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const radioSlotRecipeDefaultVariants = {}
@@ -20,9 +20,9 @@ const radioSlotRecipeSlotNames = [
20
20
  ]
21
21
  const radioSlotRecipeSlotFns = /* @__PURE__ */ radioSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, radioSlotRecipeDefaultVariants, getSlotCompoundVariant(radioSlotRecipeCompoundVariants, slotName))])
22
22
 
23
- const radioSlotRecipeFn = (props = {}) => {
23
+ const radioSlotRecipeFn = memo((props = {}) => {
24
24
  return Object.fromEntries(radioSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
25
- }
25
+ })
26
26
 
27
27
  const radioSlotRecipeVariantKeys = []
28
28
 
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const segmentedControlSlotRecipeDefaultVariants = {}
@@ -32,9 +32,9 @@ const segmentedControlSlotRecipeSlotNames = [
32
32
  ]
33
33
  const segmentedControlSlotRecipeSlotFns = /* @__PURE__ */ segmentedControlSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, segmentedControlSlotRecipeDefaultVariants, getSlotCompoundVariant(segmentedControlSlotRecipeCompoundVariants, slotName))])
34
34
 
35
- const segmentedControlSlotRecipeFn = (props = {}) => {
35
+ const segmentedControlSlotRecipeFn = memo((props = {}) => {
36
36
  return Object.fromEntries(segmentedControlSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
37
- }
37
+ })
38
38
 
39
39
  const segmentedControlSlotRecipeVariantKeys = []
40
40
 
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const selectSlotRecipeDefaultVariants = {
@@ -26,9 +26,9 @@ const selectSlotRecipeSlotNames = [
26
26
  ]
27
27
  const selectSlotRecipeSlotFns = /* @__PURE__ */ selectSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, selectSlotRecipeDefaultVariants, getSlotCompoundVariant(selectSlotRecipeCompoundVariants, slotName))])
28
28
 
29
- const selectSlotRecipeFn = (props = {}) => {
29
+ const selectSlotRecipeFn = memo((props = {}) => {
30
30
  return Object.fromEntries(selectSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
31
- }
31
+ })
32
32
 
33
33
  const selectSlotRecipeVariantKeys = [
34
34
  "size"
@@ -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 selectedBorderRecipeFn = /* @__PURE__ */ createRecipe('selected-border', {
@@ -73,7 +73,7 @@ const selectedBorderRecipeVariantMap = {
73
73
 
74
74
  const selectedBorderRecipeVariantKeys = Object.keys(selectedBorderRecipeVariantMap)
75
75
 
76
- export const selectedBorderRecipe = /* @__PURE__ */ Object.assign(selectedBorderRecipeFn, {
76
+ export const selectedBorderRecipe = /* @__PURE__ */ Object.assign(memo(selectedBorderRecipeFn), {
77
77
  __recipe__: true,
78
78
  __name__: 'selectedBorderRecipe',
79
79
  raw: (props) => props,
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const sharedSlotRecipeDefaultVariants = {}
@@ -12,9 +12,9 @@ const sharedSlotRecipeSlotNames = [
12
12
  ]
13
13
  const sharedSlotRecipeSlotFns = /* @__PURE__ */ sharedSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, sharedSlotRecipeDefaultVariants, getSlotCompoundVariant(sharedSlotRecipeCompoundVariants, slotName))])
14
14
 
15
- const sharedSlotRecipeFn = (props = {}) => {
15
+ const sharedSlotRecipeFn = memo((props = {}) => {
16
16
  return Object.fromEntries(sharedSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
17
- }
17
+ })
18
18
 
19
19
  const sharedSlotRecipeVariantKeys = []
20
20
 
@@ -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 spinnerRecipeFn = /* @__PURE__ */ createRecipe('spinner', {
@@ -14,7 +14,7 @@ const spinnerRecipeVariantMap = {
14
14
 
15
15
  const spinnerRecipeVariantKeys = Object.keys(spinnerRecipeVariantMap)
16
16
 
17
- export const spinnerRecipe = /* @__PURE__ */ Object.assign(spinnerRecipeFn, {
17
+ export const spinnerRecipe = /* @__PURE__ */ Object.assign(memo(spinnerRecipeFn), {
18
18
  __recipe__: true,
19
19
  __name__: 'spinnerRecipe',
20
20
  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 tabListRecipeFn = /* @__PURE__ */ createRecipe('tab-list', {}, [])
@@ -7,7 +7,7 @@ const tabListRecipeVariantMap = {}
7
7
 
8
8
  const tabListRecipeVariantKeys = Object.keys(tabListRecipeVariantMap)
9
9
 
10
- export const tabListRecipe = /* @__PURE__ */ Object.assign(tabListRecipeFn, {
10
+ export const tabListRecipe = /* @__PURE__ */ Object.assign(memo(tabListRecipeFn), {
11
11
  __recipe__: true,
12
12
  __name__: 'tabListRecipe',
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 tabRecipeFn = /* @__PURE__ */ createRecipe('tab', {
@@ -72,7 +72,7 @@ const tabRecipeVariantMap = {
72
72
 
73
73
  const tabRecipeVariantKeys = Object.keys(tabRecipeVariantMap)
74
74
 
75
- export const tabRecipe = /* @__PURE__ */ Object.assign(tabRecipeFn, {
75
+ export const tabRecipe = /* @__PURE__ */ Object.assign(memo(tabRecipeFn), {
76
76
  __recipe__: true,
77
77
  __name__: 'tabRecipe',
78
78
  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 tableContainerRecipeFn = /* @__PURE__ */ createRecipe('table-container', {}, [])
@@ -7,7 +7,7 @@ const tableContainerRecipeVariantMap = {}
7
7
 
8
8
  const tableContainerRecipeVariantKeys = Object.keys(tableContainerRecipeVariantMap)
9
9
 
10
- export const tableContainerRecipe = /* @__PURE__ */ Object.assign(tableContainerRecipeFn, {
10
+ export const tableContainerRecipe = /* @__PURE__ */ Object.assign(memo(tableContainerRecipeFn), {
11
11
  __recipe__: true,
12
12
  __name__: 'tableContainerRecipe',
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 tableRecipeFn = /* @__PURE__ */ createRecipe('table', {}, [])
@@ -7,7 +7,7 @@ const tableRecipeVariantMap = {}
7
7
 
8
8
  const tableRecipeVariantKeys = Object.keys(tableRecipeVariantMap)
9
9
 
10
- export const tableRecipe = /* @__PURE__ */ Object.assign(tableRecipeFn, {
10
+ export const tableRecipe = /* @__PURE__ */ Object.assign(memo(tableRecipeFn), {
11
11
  __recipe__: true,
12
12
  __name__: 'tableRecipe',
13
13
  raw: (props) => props,
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const tagSlotRecipeDefaultVariants = {
@@ -44,9 +44,9 @@ const tagSlotRecipeSlotNames = [
44
44
  ]
45
45
  const tagSlotRecipeSlotFns = /* @__PURE__ */ tagSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, tagSlotRecipeDefaultVariants, getSlotCompoundVariant(tagSlotRecipeCompoundVariants, slotName))])
46
46
 
47
- const tagSlotRecipeFn = (props = {}) => {
47
+ const tagSlotRecipeFn = memo((props = {}) => {
48
48
  return Object.fromEntries(tagSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
49
- }
49
+ })
50
50
 
51
51
  const tagSlotRecipeVariantKeys = [
52
52
  "size",
@@ -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 textRecipeFn = /* @__PURE__ */ createRecipe('text', {
@@ -25,7 +25,7 @@ const textRecipeVariantMap = {
25
25
 
26
26
  const textRecipeVariantKeys = Object.keys(textRecipeVariantMap)
27
27
 
28
- export const textRecipe = /* @__PURE__ */ Object.assign(textRecipeFn, {
28
+ export const textRecipe = /* @__PURE__ */ Object.assign(memo(textRecipeFn), {
29
29
  __recipe__: true,
30
30
  __name__: 'textRecipe',
31
31
  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 textareaRecipeFn = /* @__PURE__ */ createRecipe('textarea', {}, [])
@@ -11,7 +11,7 @@ const textareaRecipeVariantMap = {
11
11
 
12
12
  const textareaRecipeVariantKeys = Object.keys(textareaRecipeVariantMap)
13
13
 
14
- export const textareaRecipe = /* @__PURE__ */ Object.assign(textareaRecipeFn, {
14
+ export const textareaRecipe = /* @__PURE__ */ Object.assign(memo(textareaRecipeFn), {
15
15
  __recipe__: true,
16
16
  __name__: 'textareaRecipe',
17
17
  raw: (props) => props,
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const toastSlotRecipeDefaultVariants = {
@@ -39,9 +39,9 @@ const toastSlotRecipeSlotNames = [
39
39
  ]
40
40
  const toastSlotRecipeSlotFns = /* @__PURE__ */ toastSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, toastSlotRecipeDefaultVariants, getSlotCompoundVariant(toastSlotRecipeCompoundVariants, slotName))])
41
41
 
42
- const toastSlotRecipeFn = (props = {}) => {
42
+ const toastSlotRecipeFn = memo((props = {}) => {
43
43
  return Object.fromEntries(toastSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
44
- }
44
+ })
45
45
 
46
46
  const toastSlotRecipeVariantKeys = [
47
47
  "variant"
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const toggleSlotRecipeDefaultVariants = {}
@@ -20,9 +20,9 @@ const toggleSlotRecipeSlotNames = [
20
20
  ]
21
21
  const toggleSlotRecipeSlotFns = /* @__PURE__ */ toggleSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, toggleSlotRecipeDefaultVariants, getSlotCompoundVariant(toggleSlotRecipeCompoundVariants, slotName))])
22
22
 
23
- const toggleSlotRecipeFn = (props = {}) => {
23
+ const toggleSlotRecipeFn = memo((props = {}) => {
24
24
  return Object.fromEntries(toggleSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
25
- }
25
+ })
26
26
 
27
27
  const toggleSlotRecipeVariantKeys = []
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 tooltipRecipeFn = /* @__PURE__ */ createRecipe('tooltip', {}, [])
@@ -7,7 +7,7 @@ const tooltipRecipeVariantMap = {}
7
7
 
8
8
  const tooltipRecipeVariantKeys = Object.keys(tooltipRecipeVariantMap)
9
9
 
10
- export const tooltipRecipe = /* @__PURE__ */ Object.assign(tooltipRecipeFn, {
10
+ export const tooltipRecipe = /* @__PURE__ */ Object.assign(memo(tooltipRecipeFn), {
11
11
  __recipe__: true,
12
12
  __name__: 'tooltipRecipe',
13
13
  raw: (props) => props,
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const uploadListSlotRecipeDefaultVariants = {}
@@ -20,9 +20,9 @@ const uploadListSlotRecipeSlotNames = [
20
20
  ]
21
21
  const uploadListSlotRecipeSlotFns = /* @__PURE__ */ uploadListSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, uploadListSlotRecipeDefaultVariants, getSlotCompoundVariant(uploadListSlotRecipeCompoundVariants, slotName))])
22
22
 
23
- const uploadListSlotRecipeFn = (props = {}) => {
23
+ const uploadListSlotRecipeFn = memo((props = {}) => {
24
24
  return Object.fromEntries(uploadListSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
25
- }
25
+ })
26
26
 
27
27
  const uploadListSlotRecipeVariantKeys = []
28
28
 
@@ -1,4 +1,4 @@
1
- import { splitProps, getSlotCompoundVariant } from '../helpers.mjs';
1
+ import { getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
2
  import { createRecipe } from './create-recipe.mjs';
3
3
 
4
4
  const uploadSlotRecipeDefaultVariants = {}
@@ -16,9 +16,9 @@ const uploadSlotRecipeSlotNames = [
16
16
  ]
17
17
  const uploadSlotRecipeSlotFns = /* @__PURE__ */ uploadSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, uploadSlotRecipeDefaultVariants, getSlotCompoundVariant(uploadSlotRecipeCompoundVariants, slotName))])
18
18
 
19
- const uploadSlotRecipeFn = (props = {}) => {
19
+ const uploadSlotRecipeFn = memo((props = {}) => {
20
20
  return Object.fromEntries(uploadSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
21
- }
21
+ })
22
22
 
23
23
  const uploadSlotRecipeVariantKeys = []
24
24
 
package/tokens/index.mjs CHANGED
@@ -631,10 +631,6 @@ const tokens = {
631
631
  "value": "0.125rem",
632
632
  "variable": "var(--mp-sizes-0\\.5)"
633
633
  },
634
- "sizes.1.5": {
635
- "value": "0.375rem",
636
- "variable": "var(--mp-sizes-1\\.5)"
637
- },
638
634
  "sizes.2.5": {
639
635
  "value": "0.625rem",
640
636
  "variable": "var(--mp-sizes-2\\.5)"
@@ -731,10 +727,6 @@ const tokens = {
731
727
  "value": "16rem",
732
728
  "variable": "var(--mp-spacing-64)"
733
729
  },
734
- "spacing.0.25": {
735
- "value": "0.0625rem",
736
- "variable": "var(--mp-spacing-0\\.25)"
737
- },
738
730
  "spacing.0.5": {
739
731
  "value": "0.125rem",
740
732
  "variable": "var(--mp-spacing-0\\.5)"
@@ -743,10 +735,6 @@ const tokens = {
743
735
  "value": "0.375rem",
744
736
  "variable": "var(--mp-spacing-1\\.5)"
745
737
  },
746
- "spacing.2.5": {
747
- "value": "0.625rem",
748
- "variable": "var(--mp-spacing-2\\.5)"
749
- },
750
738
  "zIndex.hide": {
751
739
  "value": -1,
752
740
  "variable": "var(--mp-z-index-hide)"
@@ -855,10 +843,6 @@ const tokens = {
855
843
  "value": "calc(var(--mp-spacing-64) * -1)",
856
844
  "variable": "var(--mp-spacing-64)"
857
845
  },
858
- "spacing.-0.25": {
859
- "value": "calc(var(--mp-spacing-0\\.25) * -1)",
860
- "variable": "var(--mp-spacing-0\\.25)"
861
- },
862
846
  "spacing.-0.5": {
863
847
  "value": "calc(var(--mp-spacing-0\\.5) * -1)",
864
848
  "variable": "var(--mp-spacing-0\\.5)"
@@ -867,10 +851,6 @@ const tokens = {
867
851
  "value": "calc(var(--mp-spacing-1\\.5) * -1)",
868
852
  "variable": "var(--mp-spacing-1\\.5)"
869
853
  },
870
- "spacing.-2.5": {
871
- "value": "calc(var(--mp-spacing-2\\.5) * -1)",
872
- "variable": "var(--mp-spacing-2\\.5)"
873
- },
874
854
  "colors.colorPalette": {
875
855
  "value": "var(--mp-colors-color-palette)",
876
856
  "variable": "var(--mp-colors-color-palette)"
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- export type Token = "borders.none" | "borders.sm" | "borders.md" | "borders.lg" | "colors.currentcolor" | "colors.dark" | "colors.white" | "colors.background" | "colors.overlay" | "colors.brand.capital" | "colors.brand.esign" | "colors.brand.expense" | "colors.brand.flex" | "colors.brand.jurnal" | "colors.brand.klikpajak" | "colors.brand.mekari" | "colors.brand.qontak" | "colors.brand.talenta" | "colors.brand.university" | "colors.whiteAlpha.50" | "colors.whiteAlpha.100" | "colors.whiteAlpha.200" | "colors.whiteAlpha.300" | "colors.whiteAlpha.400" | "colors.whiteAlpha.500" | "colors.whiteAlpha.600" | "colors.whiteAlpha.700" | "colors.whiteAlpha.800" | "colors.whiteAlpha.900" | "colors.blackAlpha.50" | "colors.blackAlpha.100" | "colors.blackAlpha.200" | "colors.blackAlpha.300" | "colors.blackAlpha.400" | "colors.blackAlpha.500" | "colors.blackAlpha.600" | "colors.blackAlpha.700" | "colors.blackAlpha.800" | "colors.blackAlpha.900" | "colors.gray.25" | "colors.gray.50" | "colors.gray.100" | "colors.gray.400" | "colors.gray.600" | "colors.blue.50" | "colors.blue.100" | "colors.blue.400" | "colors.blue.500" | "colors.blue.700" | "colors.red.50" | "colors.red.400" | "colors.red.500" | "colors.red.700" | "colors.green.50" | "colors.green.400" | "colors.green.500" | "colors.green.700" | "colors.orange.50" | "colors.orange.400" | "colors.orange.500" | "colors.orange.700" | "colors.sky.100" | "colors.sky.400" | "colors.teal.100" | "colors.teal.400" | "colors.violet.100" | "colors.violet.400" | "colors.amber.100" | "colors.amber.400" | "colors.rose.100" | "colors.rose.400" | "colors.stone.100" | "colors.stone.400" | "colors.lime.100" | "colors.lime.400" | "colors.pink.100" | "colors.pink.400" | "colors.apricot.100" | "colors.apricot.400" | "colors.aqua.100" | "colors.aqua.400" | "colors.leaf.100" | "colors.leaf.400" | "colors.fuchsia.100" | "colors.fuchsia.400" | "colors.ice.50" | "colors.ice.100" | "colors.ash.100" | "durations.slow" | "durations.normal" | "durations.fast" | "fonts.body" | "fonts.mono" | "fontSizes.xs" | "fontSizes.sm" | "fontSizes.md" | "fontSizes.lg" | "fontSizes.xl" | "fontSizes.2xl" | "fontWeights.regular" | "fontWeights.semiBold" | "fontWeights.bold" | "lineHeights.xs" | "lineHeights.sm" | "lineHeights.md" | "lineHeights.lg" | "lineHeights.xl" | "lineHeights.2xl" | "lineHeights.3xl" | "letterSpacings.tighter" | "letterSpacings.tight" | "letterSpacings.normal" | "letterSpacings.wide" | "letterSpacings.wider" | "letterSpacings.widest" | "opacity.0" | "opacity.40" | "opacity.60" | "opacity.100" | "radii.none" | "radii.xs" | "radii.sm" | "radii.md" | "radii.lg" | "radii.xl" | "radii.full" | "shadows.xs" | "shadows.sm" | "shadows.md" | "shadows.lg" | "shadows.focus" | "shadows.xl" | "shadows.2xl" | "shadows.outline" | "shadows.outline-tab" | "shadows.outer" | "shadows.inner" | "shadows.none" | "sizes.0" | "sizes.1" | "sizes.2" | "sizes.3" | "sizes.4" | "sizes.5" | "sizes.6" | "sizes.7" | "sizes.8" | "sizes.9" | "sizes.10" | "sizes.11" | "sizes.12" | "sizes.16" | "sizes.20" | "sizes.22" | "sizes.56" | "sizes.65" | "sizes.0.25" | "sizes.0.5" | "sizes.1.5" | "sizes.2.5" | "sizes.7.5" | "sizes.9.5" | "sizes.full" | "sizes.sm" | "sizes.breakpoint-sm" | "sizes.breakpoint-md" | "sizes.breakpoint-lg" | "sizes.breakpoint-xl" | "spacing.0" | "spacing.1" | "spacing.2" | "spacing.3" | "spacing.4" | "spacing.5" | "spacing.6" | "spacing.8" | "spacing.12" | "spacing.16" | "spacing.20" | "spacing.24" | "spacing.32" | "spacing.40" | "spacing.64" | "spacing.0.25" | "spacing.0.5" | "spacing.1.5" | "spacing.2.5" | "zIndex.hide" | "zIndex.base" | "zIndex.docked" | "zIndex.sticky" | "zIndex.overlay" | "zIndex.modal" | "zIndex.popover" | "zIndex.tooltip" | "breakpoints.sm" | "breakpoints.md" | "breakpoints.lg" | "breakpoints.xl" | "spacing.-0" | "spacing.-1" | "spacing.-2" | "spacing.-3" | "spacing.-4" | "spacing.-5" | "spacing.-6" | "spacing.-8" | "spacing.-12" | "spacing.-16" | "spacing.-20" | "spacing.-24" | "spacing.-32" | "spacing.-40" | "spacing.-64" | "spacing.-0.25" | "spacing.-0.5" | "spacing.-1.5" | "spacing.-2.5" | "colors.colorPalette" | "colors.colorPalette.capital" | "colors.colorPalette.esign" | "colors.colorPalette.expense" | "colors.colorPalette.flex" | "colors.colorPalette.jurnal" | "colors.colorPalette.klikpajak" | "colors.colorPalette.mekari" | "colors.colorPalette.qontak" | "colors.colorPalette.talenta" | "colors.colorPalette.university" | "colors.colorPalette.50" | "colors.colorPalette.100" | "colors.colorPalette.200" | "colors.colorPalette.300" | "colors.colorPalette.400" | "colors.colorPalette.500" | "colors.colorPalette.600" | "colors.colorPalette.700" | "colors.colorPalette.800" | "colors.colorPalette.900" | "colors.colorPalette.25"
2
+ export type Token = "borders.none" | "borders.sm" | "borders.md" | "borders.lg" | "colors.currentcolor" | "colors.dark" | "colors.white" | "colors.background" | "colors.overlay" | "colors.brand.capital" | "colors.brand.esign" | "colors.brand.expense" | "colors.brand.flex" | "colors.brand.jurnal" | "colors.brand.klikpajak" | "colors.brand.mekari" | "colors.brand.qontak" | "colors.brand.talenta" | "colors.brand.university" | "colors.whiteAlpha.50" | "colors.whiteAlpha.100" | "colors.whiteAlpha.200" | "colors.whiteAlpha.300" | "colors.whiteAlpha.400" | "colors.whiteAlpha.500" | "colors.whiteAlpha.600" | "colors.whiteAlpha.700" | "colors.whiteAlpha.800" | "colors.whiteAlpha.900" | "colors.blackAlpha.50" | "colors.blackAlpha.100" | "colors.blackAlpha.200" | "colors.blackAlpha.300" | "colors.blackAlpha.400" | "colors.blackAlpha.500" | "colors.blackAlpha.600" | "colors.blackAlpha.700" | "colors.blackAlpha.800" | "colors.blackAlpha.900" | "colors.gray.25" | "colors.gray.50" | "colors.gray.100" | "colors.gray.400" | "colors.gray.600" | "colors.blue.50" | "colors.blue.100" | "colors.blue.400" | "colors.blue.500" | "colors.blue.700" | "colors.red.50" | "colors.red.400" | "colors.red.500" | "colors.red.700" | "colors.green.50" | "colors.green.400" | "colors.green.500" | "colors.green.700" | "colors.orange.50" | "colors.orange.400" | "colors.orange.500" | "colors.orange.700" | "colors.sky.100" | "colors.sky.400" | "colors.teal.100" | "colors.teal.400" | "colors.violet.100" | "colors.violet.400" | "colors.amber.100" | "colors.amber.400" | "colors.rose.100" | "colors.rose.400" | "colors.stone.100" | "colors.stone.400" | "colors.lime.100" | "colors.lime.400" | "colors.pink.100" | "colors.pink.400" | "colors.apricot.100" | "colors.apricot.400" | "colors.aqua.100" | "colors.aqua.400" | "colors.leaf.100" | "colors.leaf.400" | "colors.fuchsia.100" | "colors.fuchsia.400" | "colors.ice.50" | "colors.ice.100" | "colors.ash.100" | "durations.slow" | "durations.normal" | "durations.fast" | "fonts.body" | "fonts.mono" | "fontSizes.xs" | "fontSizes.sm" | "fontSizes.md" | "fontSizes.lg" | "fontSizes.xl" | "fontSizes.2xl" | "fontWeights.regular" | "fontWeights.semiBold" | "fontWeights.bold" | "lineHeights.xs" | "lineHeights.sm" | "lineHeights.md" | "lineHeights.lg" | "lineHeights.xl" | "lineHeights.2xl" | "lineHeights.3xl" | "letterSpacings.tighter" | "letterSpacings.tight" | "letterSpacings.normal" | "letterSpacings.wide" | "letterSpacings.wider" | "letterSpacings.widest" | "opacity.0" | "opacity.40" | "opacity.60" | "opacity.100" | "radii.none" | "radii.xs" | "radii.sm" | "radii.md" | "radii.lg" | "radii.xl" | "radii.full" | "shadows.xs" | "shadows.sm" | "shadows.md" | "shadows.lg" | "shadows.focus" | "shadows.xl" | "shadows.2xl" | "shadows.outline" | "shadows.outline-tab" | "shadows.outer" | "shadows.inner" | "shadows.none" | "sizes.0" | "sizes.1" | "sizes.2" | "sizes.3" | "sizes.4" | "sizes.5" | "sizes.6" | "sizes.7" | "sizes.8" | "sizes.9" | "sizes.10" | "sizes.11" | "sizes.12" | "sizes.16" | "sizes.20" | "sizes.22" | "sizes.56" | "sizes.65" | "sizes.0.25" | "sizes.0.5" | "sizes.2.5" | "sizes.7.5" | "sizes.9.5" | "sizes.full" | "sizes.sm" | "sizes.breakpoint-sm" | "sizes.breakpoint-md" | "sizes.breakpoint-lg" | "sizes.breakpoint-xl" | "spacing.0" | "spacing.1" | "spacing.2" | "spacing.3" | "spacing.4" | "spacing.5" | "spacing.6" | "spacing.8" | "spacing.12" | "spacing.16" | "spacing.20" | "spacing.24" | "spacing.32" | "spacing.40" | "spacing.64" | "spacing.0.5" | "spacing.1.5" | "zIndex.hide" | "zIndex.base" | "zIndex.docked" | "zIndex.sticky" | "zIndex.overlay" | "zIndex.modal" | "zIndex.popover" | "zIndex.tooltip" | "breakpoints.sm" | "breakpoints.md" | "breakpoints.lg" | "breakpoints.xl" | "spacing.-0" | "spacing.-1" | "spacing.-2" | "spacing.-3" | "spacing.-4" | "spacing.-5" | "spacing.-6" | "spacing.-8" | "spacing.-12" | "spacing.-16" | "spacing.-20" | "spacing.-24" | "spacing.-32" | "spacing.-40" | "spacing.-64" | "spacing.-0.5" | "spacing.-1.5" | "colors.colorPalette" | "colors.colorPalette.capital" | "colors.colorPalette.esign" | "colors.colorPalette.expense" | "colors.colorPalette.flex" | "colors.colorPalette.jurnal" | "colors.colorPalette.klikpajak" | "colors.colorPalette.mekari" | "colors.colorPalette.qontak" | "colors.colorPalette.talenta" | "colors.colorPalette.university" | "colors.colorPalette.50" | "colors.colorPalette.100" | "colors.colorPalette.200" | "colors.colorPalette.300" | "colors.colorPalette.400" | "colors.colorPalette.500" | "colors.colorPalette.600" | "colors.colorPalette.700" | "colors.colorPalette.800" | "colors.colorPalette.900" | "colors.colorPalette.25"
3
3
 
4
4
  export type ColorPalette = "currentcolor" | "dark" | "white" | "background" | "overlay" | "brand" | "whiteAlpha" | "blackAlpha" | "gray" | "blue" | "red" | "green" | "orange" | "sky" | "teal" | "violet" | "amber" | "rose" | "stone" | "lime" | "pink" | "apricot" | "aqua" | "leaf" | "fuchsia" | "ice" | "ash"
5
5
 
@@ -25,9 +25,9 @@ export type RadiusToken = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full"
25
25
 
26
26
  export type ShadowToken = "xs" | "sm" | "md" | "lg" | "focus" | "xl" | "2xl" | "outline" | "outline-tab" | "outer" | "inner" | "none"
27
27
 
28
- export type SizeToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "16" | "20" | "22" | "56" | "65" | "0.25" | "0.5" | "1.5" | "2.5" | "7.5" | "9.5" | "full" | "sm" | "breakpoint-sm" | "breakpoint-md" | "breakpoint-lg" | "breakpoint-xl"
28
+ export type SizeToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "16" | "20" | "22" | "56" | "65" | "0.25" | "0.5" | "2.5" | "7.5" | "9.5" | "full" | "sm" | "breakpoint-sm" | "breakpoint-md" | "breakpoint-lg" | "breakpoint-xl"
29
29
 
30
- export type SpacingToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "8" | "12" | "16" | "20" | "24" | "32" | "40" | "64" | "0.25" | "0.5" | "1.5" | "2.5" | "-0" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-8" | "-12" | "-16" | "-20" | "-24" | "-32" | "-40" | "-64" | "-0.25" | "-0.5" | "-1.5" | "-2.5"
30
+ export type SpacingToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "8" | "12" | "16" | "20" | "24" | "32" | "40" | "64" | "0.5" | "1.5" | "-0" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-8" | "-12" | "-16" | "-20" | "-24" | "-32" | "-40" | "-64" | "-0.5" | "-1.5"
31
31
 
32
32
  export type ZIndexToken = "hide" | "base" | "docked" | "sticky" | "overlay" | "modal" | "popover" | "tooltip"
33
33
 
@@ -54,4 +54,4 @@ export type Tokens = {
54
54
  animationName: AnimationName
55
55
  } & { [token: string]: never }
56
56
 
57
- export type TokenCategory = "zIndex" | "opacity" | "colors" | "fonts" | "fontSizes" | "fontWeights" | "lineHeights" | "letterSpacings" | "sizes" | "shadows" | "spacing" | "radii" | "borders" | "durations" | "easings" | "animations" | "blurs" | "gradients" | "breakpoints" | "assets"
57
+ export type TokenCategory = "aspectRatios" | "zIndex" | "opacity" | "colors" | "fonts" | "fontSizes" | "fontWeights" | "lineHeights" | "letterSpacings" | "sizes" | "shadows" | "spacing" | "radii" | "borders" | "borderWidths" | "durations" | "easings" | "animations" | "blurs" | "gradients" | "breakpoints" | "assets"
@@ -116,9 +116,9 @@ export interface Conditions {
116
116
  "_inRange": string
117
117
  /** `&:out-of-range` */
118
118
  "_outOfRange": string
119
- /** `&::placeholder` */
119
+ /** `&::placeholder, &[data-placeholder]` */
120
120
  "_placeholder": string
121
- /** `&:placeholder-shown` */
121
+ /** `&:is(:placeholder-shown, [data-placeholder-shown])` */
122
122
  "_placeholderShown": string
123
123
  /** `&:is([aria-pressed=true], [data-pressed])` */
124
124
  "_pressed": string
@@ -13,13 +13,20 @@ export type PatternProperty =
13
13
 
14
14
  export interface PatternHelpers {
15
15
  map: (value: any, fn: (value: string) => string | undefined) => any
16
+ isCssUnit: (value: any) => boolean
17
+ isCssVar: (value: any) => boolean
18
+ isCssFunction: (value: any) => boolean
16
19
  }
17
20
 
18
21
  export interface PatternProperties {
19
22
  [key: string]: PatternProperty
20
23
  }
21
24
 
22
- type Props<T> = Record<LiteralUnion<keyof T>, any>
25
+ type InferProps<T> = Record<LiteralUnion<keyof T>, any>
26
+
27
+ export type PatternDefaultValue<T> = Partial<InferProps<T>>
28
+
29
+ export type PatternDefaultValueFn<T> = (props: InferProps<T>) => PatternDefaultValue<T>
23
30
 
24
31
  export interface PatternConfig<T extends PatternProperties = PatternProperties> {
25
32
  /**
@@ -35,10 +42,14 @@ export interface PatternConfig<T extends PatternProperties = PatternProperties>
35
42
  * The properties of the pattern.
36
43
  */
37
44
  properties?: T
45
+ /**
46
+ * The default values of the pattern.
47
+ */
48
+ defaultValues?: PatternDefaultValue<T> | PatternDefaultValueFn<T>
38
49
  /**
39
50
  * The css object this pattern will generate.
40
51
  */
41
- transform?: (props: Props<T>, helpers: PatternHelpers) => SystemStyleObject
52
+ transform?: (props: InferProps<T>, helpers: PatternHelpers) => SystemStyleObject
42
53
  /**
43
54
  * The jsx element name this pattern will generate.
44
55
  */