@pyck/styled-system 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/dist/css/conditions.mjs +36 -0
  2. package/dist/css/css.d.ts +22 -0
  3. package/dist/css/css.mjs +45 -0
  4. package/dist/css/cva.d.ts +6 -0
  5. package/dist/css/cva.mjs +87 -0
  6. package/dist/css/cx.d.ts +5 -0
  7. package/dist/css/cx.mjs +15 -0
  8. package/dist/css/index.d.ts +5 -0
  9. package/dist/css/index.mjs +4 -0
  10. package/dist/css/sva.d.ts +4 -0
  11. package/dist/css/sva.mjs +46 -0
  12. package/dist/helpers.mjs +328 -0
  13. package/dist/jsx/aspect-ratio.d.ts +10 -0
  14. package/dist/jsx/aspect-ratio.mjs +14 -0
  15. package/dist/jsx/bleed.d.ts +10 -0
  16. package/dist/jsx/bleed.mjs +14 -0
  17. package/dist/jsx/box.d.ts +10 -0
  18. package/dist/jsx/box.mjs +14 -0
  19. package/dist/jsx/center.d.ts +10 -0
  20. package/dist/jsx/center.mjs +14 -0
  21. package/dist/jsx/circle.d.ts +10 -0
  22. package/dist/jsx/circle.mjs +14 -0
  23. package/dist/jsx/container.d.ts +10 -0
  24. package/dist/jsx/container.mjs +14 -0
  25. package/dist/jsx/cq.d.ts +10 -0
  26. package/dist/jsx/cq.mjs +14 -0
  27. package/dist/jsx/create-style-context.d.ts +54 -0
  28. package/dist/jsx/create-style-context.mjs +118 -0
  29. package/dist/jsx/divider.d.ts +10 -0
  30. package/dist/jsx/divider.mjs +14 -0
  31. package/dist/jsx/factory-helper.mjs +22 -0
  32. package/dist/jsx/factory.d.ts +3 -0
  33. package/dist/jsx/factory.mjs +89 -0
  34. package/dist/jsx/flex.d.ts +10 -0
  35. package/dist/jsx/flex.mjs +14 -0
  36. package/dist/jsx/float.d.ts +10 -0
  37. package/dist/jsx/float.mjs +14 -0
  38. package/dist/jsx/grid-item.d.ts +10 -0
  39. package/dist/jsx/grid-item.mjs +14 -0
  40. package/dist/jsx/grid.d.ts +10 -0
  41. package/dist/jsx/grid.mjs +14 -0
  42. package/dist/jsx/hstack.d.ts +10 -0
  43. package/dist/jsx/hstack.mjs +14 -0
  44. package/dist/jsx/index.d.ts +25 -0
  45. package/dist/jsx/index.mjs +23 -0
  46. package/dist/jsx/is-valid-prop.d.ts +11 -0
  47. package/dist/jsx/is-valid-prop.mjs +17 -0
  48. package/dist/jsx/link-overlay.d.ts +10 -0
  49. package/dist/jsx/link-overlay.mjs +14 -0
  50. package/dist/jsx/spacer.d.ts +10 -0
  51. package/dist/jsx/spacer.mjs +14 -0
  52. package/dist/jsx/square.d.ts +10 -0
  53. package/dist/jsx/square.mjs +14 -0
  54. package/dist/jsx/stack.d.ts +10 -0
  55. package/dist/jsx/stack.mjs +14 -0
  56. package/dist/jsx/visually-hidden.d.ts +10 -0
  57. package/dist/jsx/visually-hidden.mjs +14 -0
  58. package/dist/jsx/vstack.d.ts +10 -0
  59. package/dist/jsx/vstack.mjs +14 -0
  60. package/dist/jsx/wrap.d.ts +10 -0
  61. package/dist/jsx/wrap.mjs +14 -0
  62. package/dist/patterns/aspect-ratio.d.ts +20 -0
  63. package/dist/patterns/aspect-ratio.mjs +38 -0
  64. package/dist/patterns/bleed.d.ts +21 -0
  65. package/dist/patterns/bleed.mjs +24 -0
  66. package/dist/patterns/box.d.ts +20 -0
  67. package/dist/patterns/box.mjs +15 -0
  68. package/dist/patterns/center.d.ts +20 -0
  69. package/dist/patterns/center.mjs +21 -0
  70. package/dist/patterns/circle.d.ts +20 -0
  71. package/dist/patterns/circle.mjs +25 -0
  72. package/dist/patterns/container.d.ts +20 -0
  73. package/dist/patterns/container.mjs +22 -0
  74. package/dist/patterns/cq.d.ts +21 -0
  75. package/dist/patterns/cq.mjs +21 -0
  76. package/dist/patterns/divider.d.ts +22 -0
  77. package/dist/patterns/divider.mjs +25 -0
  78. package/dist/patterns/flex.d.ts +26 -0
  79. package/dist/patterns/flex.mjs +26 -0
  80. package/dist/patterns/float.d.ts +23 -0
  81. package/dist/patterns/float.mjs +52 -0
  82. package/dist/patterns/grid-item.d.ts +25 -0
  83. package/dist/patterns/grid-item.mjs +25 -0
  84. package/dist/patterns/grid.d.ts +24 -0
  85. package/dist/patterns/grid.mjs +25 -0
  86. package/dist/patterns/hstack.d.ts +21 -0
  87. package/dist/patterns/hstack.mjs +24 -0
  88. package/dist/patterns/index.d.ts +21 -0
  89. package/dist/patterns/index.mjs +20 -0
  90. package/dist/patterns/link-overlay.d.ts +20 -0
  91. package/dist/patterns/link-overlay.mjs +24 -0
  92. package/dist/patterns/spacer.d.ts +20 -0
  93. package/dist/patterns/spacer.mjs +21 -0
  94. package/dist/patterns/square.d.ts +20 -0
  95. package/dist/patterns/square.mjs +24 -0
  96. package/dist/patterns/stack.d.ts +23 -0
  97. package/dist/patterns/stack.mjs +24 -0
  98. package/dist/patterns/visually-hidden.d.ts +20 -0
  99. package/dist/patterns/visually-hidden.mjs +18 -0
  100. package/dist/patterns/vstack.d.ts +21 -0
  101. package/dist/patterns/vstack.mjs +24 -0
  102. package/dist/patterns/wrap.d.ts +24 -0
  103. package/dist/patterns/wrap.mjs +25 -0
  104. package/dist/recipes/absolute-center.d.ts +34 -0
  105. package/dist/recipes/absolute-center.mjs +32 -0
  106. package/dist/recipes/action-bar.d.ts +31 -0
  107. package/dist/recipes/action-bar.mjs +49 -0
  108. package/dist/recipes/avatar.d.ts +43 -0
  109. package/dist/recipes/avatar.mjs +75 -0
  110. package/dist/recipes/badge.d.ts +38 -0
  111. package/dist/recipes/badge.mjs +40 -0
  112. package/dist/recipes/breadcrumb.d.ts +38 -0
  113. package/dist/recipes/breadcrumb.mjs +70 -0
  114. package/dist/recipes/button.d.ts +38 -0
  115. package/dist/recipes/button.mjs +44 -0
  116. package/dist/recipes/card.d.ts +34 -0
  117. package/dist/recipes/card.mjs +63 -0
  118. package/dist/recipes/carousel.d.ts +35 -0
  119. package/dist/recipes/carousel.mjs +93 -0
  120. package/dist/recipes/checkbox.d.ts +38 -0
  121. package/dist/recipes/checkbox.mjs +67 -0
  122. package/dist/recipes/checkmark.d.ts +38 -0
  123. package/dist/recipes/checkmark.mjs +39 -0
  124. package/dist/recipes/clipboard.d.ts +31 -0
  125. package/dist/recipes/clipboard.mjs +53 -0
  126. package/dist/recipes/collapsible.d.ts +34 -0
  127. package/dist/recipes/collapsible.mjs +54 -0
  128. package/dist/recipes/combobox.d.ts +38 -0
  129. package/dist/recipes/combobox.mjs +112 -0
  130. package/dist/recipes/create-recipe.mjs +82 -0
  131. package/dist/recipes/data-list.d.ts +31 -0
  132. package/dist/recipes/data-list.mjs +53 -0
  133. package/dist/recipes/date-picker.d.ts +31 -0
  134. package/dist/recipes/date-picker.mjs +133 -0
  135. package/dist/recipes/dialog.d.ts +46 -0
  136. package/dist/recipes/dialog.mjs +106 -0
  137. package/dist/recipes/drawer.d.ts +38 -0
  138. package/dist/recipes/drawer.mjs +90 -0
  139. package/dist/recipes/drilldown-menu.d.ts +31 -0
  140. package/dist/recipes/drilldown-menu.mjs +53 -0
  141. package/dist/recipes/field.d.ts +31 -0
  142. package/dist/recipes/field.mjs +61 -0
  143. package/dist/recipes/fieldset.d.ts +31 -0
  144. package/dist/recipes/fieldset.mjs +73 -0
  145. package/dist/recipes/floating-panel.d.ts +31 -0
  146. package/dist/recipes/floating-panel.mjs +73 -0
  147. package/dist/recipes/form.d.ts +31 -0
  148. package/dist/recipes/form.mjs +24 -0
  149. package/dist/recipes/group.d.ts +36 -0
  150. package/dist/recipes/group.mjs +72 -0
  151. package/dist/recipes/heading.d.ts +31 -0
  152. package/dist/recipes/heading.mjs +38 -0
  153. package/dist/recipes/icon.d.ts +34 -0
  154. package/dist/recipes/icon.mjs +36 -0
  155. package/dist/recipes/index.d.ts +58 -0
  156. package/dist/recipes/index.mjs +57 -0
  157. package/dist/recipes/input-addon.d.ts +38 -0
  158. package/dist/recipes/input-addon.mjs +39 -0
  159. package/dist/recipes/input-group.d.ts +34 -0
  160. package/dist/recipes/input-group.mjs +49 -0
  161. package/dist/recipes/input.d.ts +38 -0
  162. package/dist/recipes/input.mjs +42 -0
  163. package/dist/recipes/kbd.d.ts +38 -0
  164. package/dist/recipes/kbd.mjs +42 -0
  165. package/dist/recipes/link.d.ts +34 -0
  166. package/dist/recipes/link.mjs +30 -0
  167. package/dist/recipes/mark.d.ts +34 -0
  168. package/dist/recipes/mark.mjs +32 -0
  169. package/dist/recipes/menu.d.ts +34 -0
  170. package/dist/recipes/menu.mjs +97 -0
  171. package/dist/recipes/number-input.d.ts +38 -0
  172. package/dist/recipes/number-input.mjs +78 -0
  173. package/dist/recipes/pagination.d.ts +31 -0
  174. package/dist/recipes/pagination.mjs +57 -0
  175. package/dist/recipes/popover.d.ts +31 -0
  176. package/dist/recipes/popover.mjs +81 -0
  177. package/dist/recipes/progress-circle.d.ts +34 -0
  178. package/dist/recipes/progress-circle.mjs +75 -0
  179. package/dist/recipes/progress.d.ts +44 -0
  180. package/dist/recipes/progress.mjs +98 -0
  181. package/dist/recipes/radio-card-group.d.ts +38 -0
  182. package/dist/recipes/radio-card-group.mjs +69 -0
  183. package/dist/recipes/radio-group.d.ts +38 -0
  184. package/dist/recipes/radio-group.mjs +68 -0
  185. package/dist/recipes/scroll-area.d.ts +38 -0
  186. package/dist/recipes/scroll-area.mjs +70 -0
  187. package/dist/recipes/segment-group.d.ts +35 -0
  188. package/dist/recipes/segment-group.mjs +69 -0
  189. package/dist/recipes/select.d.ts +38 -0
  190. package/dist/recipes/select.mjs +111 -0
  191. package/dist/recipes/skeleton.d.ts +39 -0
  192. package/dist/recipes/skeleton.mjs +40 -0
  193. package/dist/recipes/slider.d.ts +42 -0
  194. package/dist/recipes/slider.mjs +94 -0
  195. package/dist/recipes/spinner.d.ts +34 -0
  196. package/dist/recipes/spinner.mjs +36 -0
  197. package/dist/recipes/stat.d.ts +31 -0
  198. package/dist/recipes/stat.mjs +41 -0
  199. package/dist/recipes/steps.d.ts +42 -0
  200. package/dist/recipes/steps.mjs +97 -0
  201. package/dist/recipes/switch-recipe.d.ts +38 -0
  202. package/dist/recipes/switch-recipe.mjs +65 -0
  203. package/dist/recipes/table.d.ts +40 -0
  204. package/dist/recipes/table.mjs +83 -0
  205. package/dist/recipes/tabs.d.ts +39 -0
  206. package/dist/recipes/tabs.mjs +72 -0
  207. package/dist/recipes/tags-input.d.ts +38 -0
  208. package/dist/recipes/tags-input.mjs +86 -0
  209. package/dist/recipes/text.d.ts +31 -0
  210. package/dist/recipes/text.mjs +38 -0
  211. package/dist/recipes/textarea.d.ts +38 -0
  212. package/dist/recipes/textarea.mjs +41 -0
  213. package/dist/recipes/toast.d.ts +31 -0
  214. package/dist/recipes/toast.mjs +53 -0
  215. package/dist/recipes/toggle-group.d.ts +31 -0
  216. package/dist/recipes/toggle-group.mjs +44 -0
  217. package/dist/recipes/tooltip.d.ts +34 -0
  218. package/dist/recipes/tooltip.mjs +57 -0
  219. package/dist/recipes/tree-view.d.ts +34 -0
  220. package/dist/recipes/tree-view.mjs +97 -0
  221. package/dist/tokens/index.d.ts +9 -0
  222. package/dist/tokens/index.mjs +3060 -0
  223. package/dist/tokens/tokens.d.ts +63 -0
  224. package/dist/types/composition.d.ts +227 -0
  225. package/dist/types/conditions.d.ts +314 -0
  226. package/dist/types/csstype.d.ts +22570 -0
  227. package/dist/types/global.d.ts +20 -0
  228. package/dist/types/index.d.ts +8 -0
  229. package/dist/types/jsx.d.ts +69 -0
  230. package/dist/types/parts.d.ts +8 -0
  231. package/dist/types/pattern.d.ts +78 -0
  232. package/dist/types/prop-type.d.ts +253 -0
  233. package/dist/types/recipe.d.ts +181 -0
  234. package/dist/types/selectors.d.ts +59 -0
  235. package/dist/types/static-css.d.ts +56 -0
  236. package/dist/types/style-props.d.ts +8091 -0
  237. package/dist/types/system-types.d.ts +151 -0
  238. package/package.json +76 -0
@@ -0,0 +1,36 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const spinnerFn = /* @__PURE__ */ createRecipe('spinner', {
5
+ "size": "md"
6
+ }, [])
7
+
8
+ const spinnerVariantMap = {
9
+ "size": [
10
+ "inherit",
11
+ "xs",
12
+ "sm",
13
+ "md",
14
+ "lg",
15
+ "xl",
16
+ "2xl"
17
+ ]
18
+ }
19
+
20
+ const spinnerVariantKeys = Object.keys(spinnerVariantMap)
21
+
22
+ export const spinner = /* @__PURE__ */ Object.assign(memo(spinnerFn.recipeFn), {
23
+ __recipe__: true,
24
+ __name__: 'spinner',
25
+ __getCompoundVariantCss__: spinnerFn.__getCompoundVariantCss__,
26
+ raw: (props) => props,
27
+ variantKeys: spinnerVariantKeys,
28
+ variantMap: spinnerVariantMap,
29
+ merge(recipe) {
30
+ return mergeRecipes(this, recipe)
31
+ },
32
+ splitVariantProps(props) {
33
+ return splitProps(props, spinnerVariantKeys)
34
+ },
35
+ getVariantProps: spinnerFn.getVariantProps,
36
+ })
@@ -0,0 +1,31 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface StatVariant {
6
+
7
+ }
8
+
9
+ type StatVariantMap = {
10
+ [key in keyof StatVariant]: Array<StatVariant[key]>
11
+ }
12
+
13
+ type StatSlot = "root" | "label" | "valueText"
14
+
15
+ export type StatVariantProps = {
16
+ [key in keyof StatVariant]?: ConditionalValue<StatVariant[key]> | undefined
17
+ }
18
+
19
+ export interface StatRecipe {
20
+ __slot: StatSlot
21
+ __type: StatVariantProps
22
+ (props?: StatVariantProps): Pretty<Record<StatSlot, string>>
23
+ raw: (props?: StatVariantProps) => StatVariantProps
24
+ variantMap: StatVariantMap
25
+ variantKeys: Array<keyof StatVariant>
26
+ splitVariantProps<Props extends StatVariantProps>(props: Props): [StatVariantProps, Pretty<DistributiveOmit<Props, keyof StatVariantProps>>]
27
+ getVariantProps: (props?: StatVariantProps) => StatVariantProps
28
+ }
29
+
30
+
31
+ export declare const stat: StatRecipe
@@ -0,0 +1,41 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const statDefaultVariants = {}
5
+ const statCompoundVariants = []
6
+
7
+ const statSlotNames = [
8
+ [
9
+ "root",
10
+ "stat__root"
11
+ ],
12
+ [
13
+ "label",
14
+ "stat__label"
15
+ ],
16
+ [
17
+ "valueText",
18
+ "stat__valueText"
19
+ ]
20
+ ]
21
+ const statSlotFns = /* @__PURE__ */ statSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, statDefaultVariants, getSlotCompoundVariant(statCompoundVariants, slotName))])
22
+
23
+ const statFn = memo((props = {}) => {
24
+ return Object.fromEntries(statSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
25
+ })
26
+
27
+ const statVariantKeys = []
28
+ const getVariantProps = (variants) => ({ ...statDefaultVariants, ...compact(variants) })
29
+
30
+ export const stat = /* @__PURE__ */ Object.assign(statFn, {
31
+ __recipe__: false,
32
+ __name__: 'stat',
33
+ raw: (props) => props,
34
+ classNameMap: {},
35
+ variantKeys: statVariantKeys,
36
+ variantMap: {},
37
+ splitVariantProps(props) {
38
+ return splitProps(props, statVariantKeys)
39
+ },
40
+ getVariantProps
41
+ })
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface StepsVariant {
6
+ /**
7
+ * @default "md"
8
+ */
9
+ size: "sm" | "md"
10
+ /**
11
+ * @default "solid"
12
+ */
13
+ variant: "solid"
14
+ /**
15
+ * @default "horizontal"
16
+ */
17
+ orientation: "horizontal" | "vertical"
18
+ }
19
+
20
+ type StepsVariantMap = {
21
+ [key in keyof StepsVariant]: Array<StepsVariant[key]>
22
+ }
23
+
24
+ type StepsSlot = "root" | "list" | "item" | "trigger" | "indicator" | "separator" | "content" | "nextTrigger" | "prevTrigger" | "progress" | "title" | "description"
25
+
26
+ export type StepsVariantProps = {
27
+ [key in keyof StepsVariant]?: ConditionalValue<StepsVariant[key]> | undefined
28
+ }
29
+
30
+ export interface StepsRecipe {
31
+ __slot: StepsSlot
32
+ __type: StepsVariantProps
33
+ (props?: StepsVariantProps): Pretty<Record<StepsSlot, string>>
34
+ raw: (props?: StepsVariantProps) => StepsVariantProps
35
+ variantMap: StepsVariantMap
36
+ variantKeys: Array<keyof StepsVariant>
37
+ splitVariantProps<Props extends StepsVariantProps>(props: Props): [StepsVariantProps, Pretty<DistributiveOmit<Props, keyof StepsVariantProps>>]
38
+ getVariantProps: (props?: StepsVariantProps) => StepsVariantProps
39
+ }
40
+
41
+
42
+ export declare const steps: StepsRecipe
@@ -0,0 +1,97 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const stepsDefaultVariants = {
5
+ "variant": "solid",
6
+ "size": "md",
7
+ "orientation": "horizontal"
8
+ }
9
+ const stepsCompoundVariants = []
10
+
11
+ const stepsSlotNames = [
12
+ [
13
+ "root",
14
+ "steps__root"
15
+ ],
16
+ [
17
+ "list",
18
+ "steps__list"
19
+ ],
20
+ [
21
+ "item",
22
+ "steps__item"
23
+ ],
24
+ [
25
+ "trigger",
26
+ "steps__trigger"
27
+ ],
28
+ [
29
+ "indicator",
30
+ "steps__indicator"
31
+ ],
32
+ [
33
+ "separator",
34
+ "steps__separator"
35
+ ],
36
+ [
37
+ "content",
38
+ "steps__content"
39
+ ],
40
+ [
41
+ "nextTrigger",
42
+ "steps__nextTrigger"
43
+ ],
44
+ [
45
+ "prevTrigger",
46
+ "steps__prevTrigger"
47
+ ],
48
+ [
49
+ "progress",
50
+ "steps__progress"
51
+ ],
52
+ [
53
+ "title",
54
+ "steps__title"
55
+ ],
56
+ [
57
+ "description",
58
+ "steps__description"
59
+ ]
60
+ ]
61
+ const stepsSlotFns = /* @__PURE__ */ stepsSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, stepsDefaultVariants, getSlotCompoundVariant(stepsCompoundVariants, slotName))])
62
+
63
+ const stepsFn = memo((props = {}) => {
64
+ return Object.fromEntries(stepsSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
65
+ })
66
+
67
+ const stepsVariantKeys = [
68
+ "size",
69
+ "variant",
70
+ "orientation"
71
+ ]
72
+ const getVariantProps = (variants) => ({ ...stepsDefaultVariants, ...compact(variants) })
73
+
74
+ export const steps = /* @__PURE__ */ Object.assign(stepsFn, {
75
+ __recipe__: false,
76
+ __name__: 'steps',
77
+ raw: (props) => props,
78
+ classNameMap: {},
79
+ variantKeys: stepsVariantKeys,
80
+ variantMap: {
81
+ "size": [
82
+ "sm",
83
+ "md"
84
+ ],
85
+ "variant": [
86
+ "solid"
87
+ ],
88
+ "orientation": [
89
+ "horizontal",
90
+ "vertical"
91
+ ]
92
+ },
93
+ splitVariantProps(props) {
94
+ return splitProps(props, stepsVariantKeys)
95
+ },
96
+ getVariantProps
97
+ })
@@ -0,0 +1,38 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface SwitchRecipeVariant {
6
+ /**
7
+ * @default "solid"
8
+ */
9
+ variant: "solid"
10
+ /**
11
+ * @default "md"
12
+ */
13
+ size: "xs" | "sm" | "md" | "lg"
14
+ }
15
+
16
+ type SwitchRecipeVariantMap = {
17
+ [key in keyof SwitchRecipeVariant]: Array<SwitchRecipeVariant[key]>
18
+ }
19
+
20
+ type SwitchRecipeSlot = "root" | "label" | "control" | "thumb" | "indicator"
21
+
22
+ export type SwitchRecipeVariantProps = {
23
+ [key in keyof SwitchRecipeVariant]?: ConditionalValue<SwitchRecipeVariant[key]> | undefined
24
+ }
25
+
26
+ export interface SwitchRecipeRecipe {
27
+ __slot: SwitchRecipeSlot
28
+ __type: SwitchRecipeVariantProps
29
+ (props?: SwitchRecipeVariantProps): Pretty<Record<SwitchRecipeSlot, string>>
30
+ raw: (props?: SwitchRecipeVariantProps) => SwitchRecipeVariantProps
31
+ variantMap: SwitchRecipeVariantMap
32
+ variantKeys: Array<keyof SwitchRecipeVariant>
33
+ splitVariantProps<Props extends SwitchRecipeVariantProps>(props: Props): [SwitchRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof SwitchRecipeVariantProps>>]
34
+ getVariantProps: (props?: SwitchRecipeVariantProps) => SwitchRecipeVariantProps
35
+ }
36
+
37
+
38
+ export declare const switchRecipe: SwitchRecipeRecipe
@@ -0,0 +1,65 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const switchRecipeDefaultVariants = {
5
+ "variant": "solid",
6
+ "size": "md"
7
+ }
8
+ const switchRecipeCompoundVariants = []
9
+
10
+ const switchRecipeSlotNames = [
11
+ [
12
+ "root",
13
+ "switch__root"
14
+ ],
15
+ [
16
+ "label",
17
+ "switch__label"
18
+ ],
19
+ [
20
+ "control",
21
+ "switch__control"
22
+ ],
23
+ [
24
+ "thumb",
25
+ "switch__thumb"
26
+ ],
27
+ [
28
+ "indicator",
29
+ "switch__indicator"
30
+ ]
31
+ ]
32
+ const switchRecipeSlotFns = /* @__PURE__ */ switchRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, switchRecipeDefaultVariants, getSlotCompoundVariant(switchRecipeCompoundVariants, slotName))])
33
+
34
+ const switchRecipeFn = memo((props = {}) => {
35
+ return Object.fromEntries(switchRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
36
+ })
37
+
38
+ const switchRecipeVariantKeys = [
39
+ "variant",
40
+ "size"
41
+ ]
42
+ const getVariantProps = (variants) => ({ ...switchRecipeDefaultVariants, ...compact(variants) })
43
+
44
+ export const switchRecipe = /* @__PURE__ */ Object.assign(switchRecipeFn, {
45
+ __recipe__: false,
46
+ __name__: 'switchRecipe',
47
+ raw: (props) => props,
48
+ classNameMap: {},
49
+ variantKeys: switchRecipeVariantKeys,
50
+ variantMap: {
51
+ "variant": [
52
+ "solid"
53
+ ],
54
+ "size": [
55
+ "xs",
56
+ "sm",
57
+ "md",
58
+ "lg"
59
+ ]
60
+ },
61
+ splitVariantProps(props) {
62
+ return splitProps(props, switchRecipeVariantKeys)
63
+ },
64
+ getVariantProps
65
+ })
@@ -0,0 +1,40 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface TableVariant {
6
+ /**
7
+ * @default "plain"
8
+ */
9
+ variant: "outline" | "plain"
10
+ interactive: boolean
11
+ stickyHeader: boolean
12
+ /**
13
+ * @default "md"
14
+ */
15
+ size: "md"
16
+ }
17
+
18
+ type TableVariantMap = {
19
+ [key in keyof TableVariant]: Array<TableVariant[key]>
20
+ }
21
+
22
+ type TableSlot = "root" | "body" | "cell" | "foot" | "head" | "header" | "row" | "caption"
23
+
24
+ export type TableVariantProps = {
25
+ [key in keyof TableVariant]?: ConditionalValue<TableVariant[key]> | undefined
26
+ }
27
+
28
+ export interface TableRecipe {
29
+ __slot: TableSlot
30
+ __type: TableVariantProps
31
+ (props?: TableVariantProps): Pretty<Record<TableSlot, string>>
32
+ raw: (props?: TableVariantProps) => TableVariantProps
33
+ variantMap: TableVariantMap
34
+ variantKeys: Array<keyof TableVariant>
35
+ splitVariantProps<Props extends TableVariantProps>(props: Props): [TableVariantProps, Pretty<DistributiveOmit<Props, keyof TableVariantProps>>]
36
+ getVariantProps: (props?: TableVariantProps) => TableVariantProps
37
+ }
38
+
39
+
40
+ export declare const table: TableRecipe
@@ -0,0 +1,83 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const tableDefaultVariants = {
5
+ "size": "md",
6
+ "variant": "plain"
7
+ }
8
+ const tableCompoundVariants = []
9
+
10
+ const tableSlotNames = [
11
+ [
12
+ "root",
13
+ "table__root"
14
+ ],
15
+ [
16
+ "body",
17
+ "table__body"
18
+ ],
19
+ [
20
+ "cell",
21
+ "table__cell"
22
+ ],
23
+ [
24
+ "foot",
25
+ "table__foot"
26
+ ],
27
+ [
28
+ "head",
29
+ "table__head"
30
+ ],
31
+ [
32
+ "header",
33
+ "table__header"
34
+ ],
35
+ [
36
+ "row",
37
+ "table__row"
38
+ ],
39
+ [
40
+ "caption",
41
+ "table__caption"
42
+ ]
43
+ ]
44
+ const tableSlotFns = /* @__PURE__ */ tableSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, tableDefaultVariants, getSlotCompoundVariant(tableCompoundVariants, slotName))])
45
+
46
+ const tableFn = memo((props = {}) => {
47
+ return Object.fromEntries(tableSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
48
+ })
49
+
50
+ const tableVariantKeys = [
51
+ "variant",
52
+ "interactive",
53
+ "stickyHeader",
54
+ "size"
55
+ ]
56
+ const getVariantProps = (variants) => ({ ...tableDefaultVariants, ...compact(variants) })
57
+
58
+ export const table = /* @__PURE__ */ Object.assign(tableFn, {
59
+ __recipe__: false,
60
+ __name__: 'table',
61
+ raw: (props) => props,
62
+ classNameMap: {},
63
+ variantKeys: tableVariantKeys,
64
+ variantMap: {
65
+ "variant": [
66
+ "outline",
67
+ "plain"
68
+ ],
69
+ "interactive": [
70
+ "true"
71
+ ],
72
+ "stickyHeader": [
73
+ "true"
74
+ ],
75
+ "size": [
76
+ "md"
77
+ ]
78
+ },
79
+ splitVariantProps(props) {
80
+ return splitProps(props, tableVariantKeys)
81
+ },
82
+ getVariantProps
83
+ })
@@ -0,0 +1,39 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface TabsVariant {
6
+ /**
7
+ * @default "md"
8
+ */
9
+ size: "xs" | "sm" | "md" | "lg"
10
+ /**
11
+ * @default "line"
12
+ */
13
+ variant: "line" | "subtle" | "enclosed" | "outline"
14
+ fitted: boolean
15
+ }
16
+
17
+ type TabsVariantMap = {
18
+ [key in keyof TabsVariant]: Array<TabsVariant[key]>
19
+ }
20
+
21
+ type TabsSlot = "root" | "list" | "trigger" | "content" | "indicator"
22
+
23
+ export type TabsVariantProps = {
24
+ [key in keyof TabsVariant]?: ConditionalValue<TabsVariant[key]> | undefined
25
+ }
26
+
27
+ export interface TabsRecipe {
28
+ __slot: TabsSlot
29
+ __type: TabsVariantProps
30
+ (props?: TabsVariantProps): Pretty<Record<TabsSlot, string>>
31
+ raw: (props?: TabsVariantProps) => TabsVariantProps
32
+ variantMap: TabsVariantMap
33
+ variantKeys: Array<keyof TabsVariant>
34
+ splitVariantProps<Props extends TabsVariantProps>(props: Props): [TabsVariantProps, Pretty<DistributiveOmit<Props, keyof TabsVariantProps>>]
35
+ getVariantProps: (props?: TabsVariantProps) => TabsVariantProps
36
+ }
37
+
38
+
39
+ export declare const tabs: TabsRecipe
@@ -0,0 +1,72 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const tabsDefaultVariants = {
5
+ "size": "md",
6
+ "variant": "line"
7
+ }
8
+ const tabsCompoundVariants = []
9
+
10
+ const tabsSlotNames = [
11
+ [
12
+ "root",
13
+ "tabs__root"
14
+ ],
15
+ [
16
+ "list",
17
+ "tabs__list"
18
+ ],
19
+ [
20
+ "trigger",
21
+ "tabs__trigger"
22
+ ],
23
+ [
24
+ "content",
25
+ "tabs__content"
26
+ ],
27
+ [
28
+ "indicator",
29
+ "tabs__indicator"
30
+ ]
31
+ ]
32
+ const tabsSlotFns = /* @__PURE__ */ tabsSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, tabsDefaultVariants, getSlotCompoundVariant(tabsCompoundVariants, slotName))])
33
+
34
+ const tabsFn = memo((props = {}) => {
35
+ return Object.fromEntries(tabsSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
36
+ })
37
+
38
+ const tabsVariantKeys = [
39
+ "size",
40
+ "variant",
41
+ "fitted"
42
+ ]
43
+ const getVariantProps = (variants) => ({ ...tabsDefaultVariants, ...compact(variants) })
44
+
45
+ export const tabs = /* @__PURE__ */ Object.assign(tabsFn, {
46
+ __recipe__: false,
47
+ __name__: 'tabs',
48
+ raw: (props) => props,
49
+ classNameMap: {},
50
+ variantKeys: tabsVariantKeys,
51
+ variantMap: {
52
+ "size": [
53
+ "xs",
54
+ "sm",
55
+ "md",
56
+ "lg"
57
+ ],
58
+ "variant": [
59
+ "line",
60
+ "subtle",
61
+ "enclosed",
62
+ "outline"
63
+ ],
64
+ "fitted": [
65
+ "true"
66
+ ]
67
+ },
68
+ splitVariantProps(props) {
69
+ return splitProps(props, tabsVariantKeys)
70
+ },
71
+ getVariantProps
72
+ })
@@ -0,0 +1,38 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface TagsInputVariant {
6
+ /**
7
+ * @default "surface"
8
+ */
9
+ variant: "outline" | "surface"
10
+ /**
11
+ * @default "md"
12
+ */
13
+ size: "xs" | "sm" | "md" | "lg"
14
+ }
15
+
16
+ type TagsInputVariantMap = {
17
+ [key in keyof TagsInputVariant]: Array<TagsInputVariant[key]>
18
+ }
19
+
20
+ type TagsInputSlot = "root" | "label" | "control" | "input" | "clearTrigger" | "item" | "itemPreview" | "itemInput" | "itemText" | "itemDeleteTrigger"
21
+
22
+ export type TagsInputVariantProps = {
23
+ [key in keyof TagsInputVariant]?: ConditionalValue<TagsInputVariant[key]> | undefined
24
+ }
25
+
26
+ export interface TagsInputRecipe {
27
+ __slot: TagsInputSlot
28
+ __type: TagsInputVariantProps
29
+ (props?: TagsInputVariantProps): Pretty<Record<TagsInputSlot, string>>
30
+ raw: (props?: TagsInputVariantProps) => TagsInputVariantProps
31
+ variantMap: TagsInputVariantMap
32
+ variantKeys: Array<keyof TagsInputVariant>
33
+ splitVariantProps<Props extends TagsInputVariantProps>(props: Props): [TagsInputVariantProps, Pretty<DistributiveOmit<Props, keyof TagsInputVariantProps>>]
34
+ getVariantProps: (props?: TagsInputVariantProps) => TagsInputVariantProps
35
+ }
36
+
37
+
38
+ export declare const tagsInput: TagsInputRecipe