@tuuject/koi-react 0.0.0-stage → 0.1.0

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 (254) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +73 -2
  3. package/dist/alert/Alert.d.ts +13 -0
  4. package/dist/alert/Alert.js +16 -0
  5. package/dist/avatar/Avatar.d.ts +7 -0
  6. package/dist/avatar/Avatar.js +10 -0
  7. package/dist/badge/Badge.d.ts +7 -0
  8. package/dist/badge/Badge.js +8 -0
  9. package/dist/button/Button.d.ts +22 -0
  10. package/dist/button/Button.js +28 -0
  11. package/dist/card/Card.d.ts +9 -0
  12. package/dist/card/Card.js +8 -0
  13. package/dist/chat-bubble/ChatBubble.d.ts +7 -0
  14. package/dist/chat-bubble/ChatBubble.js +7 -0
  15. package/dist/checkbox/Checkbox.d.ts +18 -0
  16. package/dist/checkbox/Checkbox.js +25 -0
  17. package/dist/dialog/Dialog.d.ts +13 -0
  18. package/dist/dialog/Dialog.js +38 -0
  19. package/dist/divider/Divider.d.ts +6 -0
  20. package/dist/divider/Divider.js +17 -0
  21. package/dist/field/Field.d.ts +14 -0
  22. package/dist/field/Field.js +19 -0
  23. package/dist/field/context.d.ts +5 -0
  24. package/dist/field/context.js +2 -0
  25. package/dist/icons.d.ts +26 -0
  26. package/dist/icons.js +46 -0
  27. package/dist/index.d.ts +31 -0
  28. package/dist/index.js +30 -0
  29. package/dist/input/Input.d.ts +9 -0
  30. package/dist/input/Input.js +15 -0
  31. package/dist/link/Link.d.ts +11 -0
  32. package/dist/link/Link.js +17 -0
  33. package/dist/pagination/Pagination.d.ts +7 -0
  34. package/dist/pagination/Pagination.js +26 -0
  35. package/dist/panda/buildinfo.json +10442 -0
  36. package/dist/panda/lib.json +18 -0
  37. package/dist/panda/preset.mjs +3907 -0
  38. package/dist/progress/Progress.d.ts +7 -0
  39. package/dist/progress/Progress.js +17 -0
  40. package/dist/prose/Prose.d.ts +10 -0
  41. package/dist/prose/Prose.js +10 -0
  42. package/dist/radio-group/RadioGroup.d.ts +15 -0
  43. package/dist/radio-group/RadioGroup.js +26 -0
  44. package/dist/select/Select.d.ts +11 -0
  45. package/dist/select/Select.js +21 -0
  46. package/dist/select/SelectPanel.d.ts +24 -0
  47. package/dist/select/SelectPanel.js +105 -0
  48. package/dist/shape.d.ts +16 -0
  49. package/dist/shape.js +17 -0
  50. package/dist/skeleton/Skeleton.d.ts +8 -0
  51. package/dist/skeleton/Skeleton.js +8 -0
  52. package/dist/spinner/Spinner.d.ts +7 -0
  53. package/dist/spinner/Spinner.js +13 -0
  54. package/dist/switch/Switch.d.ts +22 -0
  55. package/dist/switch/Switch.js +23 -0
  56. package/dist/table/DataTable.d.ts +12 -0
  57. package/dist/table/DataTable.js +12 -0
  58. package/dist/table/Table.d.ts +38 -0
  59. package/dist/table/Table.js +45 -0
  60. package/dist/tabs/Tabs.d.ts +11 -0
  61. package/dist/tabs/Tabs.js +20 -0
  62. package/dist/tag/Tag.d.ts +6 -0
  63. package/dist/tag/Tag.js +15 -0
  64. package/dist/textarea/Textarea.d.ts +9 -0
  65. package/dist/textarea/Textarea.js +14 -0
  66. package/dist/toast/Toast.d.ts +23 -0
  67. package/dist/toast/Toast.js +80 -0
  68. package/dist/tooltip/Tooltip.d.ts +9 -0
  69. package/dist/tooltip/Tooltip.js +29 -0
  70. package/dist/types.d.ts +11 -0
  71. package/dist/types.js +1 -0
  72. package/package.json +218 -3
  73. package/styled-system/css/conditions.d.ts +7 -0
  74. package/styled-system/css/conditions.js +32 -0
  75. package/styled-system/css/css.d.ts +22 -0
  76. package/styled-system/css/css.js +63 -0
  77. package/styled-system/css/cva.d.ts +5 -0
  78. package/styled-system/css/cva.js +51 -0
  79. package/styled-system/css/cx.d.ts +6 -0
  80. package/styled-system/css/cx.js +16 -0
  81. package/styled-system/css/first-that-works.d.ts +22 -0
  82. package/styled-system/css/first-that-works.js +1 -0
  83. package/styled-system/css/index.d.ts +8 -0
  84. package/styled-system/css/index.js +8 -0
  85. package/styled-system/css/keyframes.d.ts +5 -0
  86. package/styled-system/css/keyframes.js +8 -0
  87. package/styled-system/css/position-try.d.ts +5 -0
  88. package/styled-system/css/position-try.js +11 -0
  89. package/styled-system/css/sva.d.ts +3 -0
  90. package/styled-system/css/sva.js +49 -0
  91. package/styled-system/css/view-transition.d.ts +7 -0
  92. package/styled-system/css/view-transition.js +18 -0
  93. package/styled-system/helpers.d.ts +67 -0
  94. package/styled-system/helpers.js +624 -0
  95. package/styled-system/jsx/aspect-ratio.d.ts +7 -0
  96. package/styled-system/jsx/aspect-ratio.js +11 -0
  97. package/styled-system/jsx/bleed.d.ts +7 -0
  98. package/styled-system/jsx/bleed.js +11 -0
  99. package/styled-system/jsx/box.d.ts +7 -0
  100. package/styled-system/jsx/box.js +11 -0
  101. package/styled-system/jsx/center.d.ts +7 -0
  102. package/styled-system/jsx/center.js +11 -0
  103. package/styled-system/jsx/circle.d.ts +7 -0
  104. package/styled-system/jsx/circle.js +11 -0
  105. package/styled-system/jsx/container.d.ts +7 -0
  106. package/styled-system/jsx/container.js +11 -0
  107. package/styled-system/jsx/cq.d.ts +7 -0
  108. package/styled-system/jsx/cq.js +11 -0
  109. package/styled-system/jsx/create-recipe-context.d.ts +32 -0
  110. package/styled-system/jsx/create-recipe-context.js +38 -0
  111. package/styled-system/jsx/create-slot-recipe-context.d.ts +48 -0
  112. package/styled-system/jsx/create-slot-recipe-context.js +116 -0
  113. package/styled-system/jsx/divider.d.ts +7 -0
  114. package/styled-system/jsx/divider.js +11 -0
  115. package/styled-system/jsx/factory.d.ts +3 -0
  116. package/styled-system/jsx/factory.js +91 -0
  117. package/styled-system/jsx/flex.d.ts +7 -0
  118. package/styled-system/jsx/flex.js +11 -0
  119. package/styled-system/jsx/float.d.ts +7 -0
  120. package/styled-system/jsx/float.js +11 -0
  121. package/styled-system/jsx/grid-item.d.ts +7 -0
  122. package/styled-system/jsx/grid-item.js +11 -0
  123. package/styled-system/jsx/grid.d.ts +7 -0
  124. package/styled-system/jsx/grid.js +11 -0
  125. package/styled-system/jsx/helper.d.ts +34 -0
  126. package/styled-system/jsx/helper.js +83 -0
  127. package/styled-system/jsx/hstack.d.ts +7 -0
  128. package/styled-system/jsx/hstack.js +11 -0
  129. package/styled-system/jsx/index.d.ts +25 -0
  130. package/styled-system/jsx/index.js +24 -0
  131. package/styled-system/jsx/is-valid-prop.d.ts +7 -0
  132. package/styled-system/jsx/is-valid-prop.js +12 -0
  133. package/styled-system/jsx/link-overlay.d.ts +7 -0
  134. package/styled-system/jsx/link-overlay.js +11 -0
  135. package/styled-system/jsx/spacer.d.ts +7 -0
  136. package/styled-system/jsx/spacer.js +11 -0
  137. package/styled-system/jsx/square.d.ts +7 -0
  138. package/styled-system/jsx/square.js +11 -0
  139. package/styled-system/jsx/stack.d.ts +7 -0
  140. package/styled-system/jsx/stack.js +11 -0
  141. package/styled-system/jsx/visually-hidden.d.ts +7 -0
  142. package/styled-system/jsx/visually-hidden.js +11 -0
  143. package/styled-system/jsx/vstack.d.ts +7 -0
  144. package/styled-system/jsx/vstack.js +11 -0
  145. package/styled-system/jsx/wrap.d.ts +7 -0
  146. package/styled-system/jsx/wrap.js +11 -0
  147. package/styled-system/patterns/aspect-ratio.d.ts +19 -0
  148. package/styled-system/patterns/aspect-ratio.js +37 -0
  149. package/styled-system/patterns/bleed.d.ts +20 -0
  150. package/styled-system/patterns/bleed.js +30 -0
  151. package/styled-system/patterns/box.d.ts +17 -0
  152. package/styled-system/patterns/box.js +16 -0
  153. package/styled-system/patterns/center.d.ts +19 -0
  154. package/styled-system/patterns/center.js +22 -0
  155. package/styled-system/patterns/circle.d.ts +19 -0
  156. package/styled-system/patterns/circle.js +26 -0
  157. package/styled-system/patterns/container.d.ts +17 -0
  158. package/styled-system/patterns/container.js +26 -0
  159. package/styled-system/patterns/cq.d.ts +21 -0
  160. package/styled-system/patterns/cq.js +24 -0
  161. package/styled-system/patterns/divider.d.ts +22 -0
  162. package/styled-system/patterns/divider.js +31 -0
  163. package/styled-system/patterns/flex.d.ts +25 -0
  164. package/styled-system/patterns/flex.js +27 -0
  165. package/styled-system/patterns/float.d.ts +23 -0
  166. package/styled-system/patterns/float.js +84 -0
  167. package/styled-system/patterns/grid-item.d.ts +24 -0
  168. package/styled-system/patterns/grid-item.js +26 -0
  169. package/styled-system/patterns/grid.d.ts +24 -0
  170. package/styled-system/patterns/grid.js +30 -0
  171. package/styled-system/patterns/hstack.d.ts +20 -0
  172. package/styled-system/patterns/hstack.js +27 -0
  173. package/styled-system/patterns/index.d.ts +20 -0
  174. package/styled-system/patterns/index.js +20 -0
  175. package/styled-system/patterns/link-overlay.d.ts +17 -0
  176. package/styled-system/patterns/link-overlay.js +25 -0
  177. package/styled-system/patterns/runtime.js +25 -0
  178. package/styled-system/patterns/spacer.d.ts +20 -0
  179. package/styled-system/patterns/spacer.js +26 -0
  180. package/styled-system/patterns/square.d.ts +19 -0
  181. package/styled-system/patterns/square.js +25 -0
  182. package/styled-system/patterns/stack.d.ts +22 -0
  183. package/styled-system/patterns/stack.js +30 -0
  184. package/styled-system/patterns/visually-hidden.d.ts +17 -0
  185. package/styled-system/patterns/visually-hidden.js +19 -0
  186. package/styled-system/patterns/vstack.d.ts +20 -0
  187. package/styled-system/patterns/vstack.js +27 -0
  188. package/styled-system/patterns/wrap.d.ts +23 -0
  189. package/styled-system/patterns/wrap.js +26 -0
  190. package/styled-system/recipes/alert.d.ts +19 -0
  191. package/styled-system/recipes/alert.js +5 -0
  192. package/styled-system/recipes/avatar.d.ts +19 -0
  193. package/styled-system/recipes/avatar.js +5 -0
  194. package/styled-system/recipes/badge.d.ts +18 -0
  195. package/styled-system/recipes/badge.js +5 -0
  196. package/styled-system/recipes/button.d.ts +20 -0
  197. package/styled-system/recipes/button.js +5 -0
  198. package/styled-system/recipes/card.d.ts +19 -0
  199. package/styled-system/recipes/card.js +5 -0
  200. package/styled-system/recipes/chat-bubble.d.ts +16 -0
  201. package/styled-system/recipes/chat-bubble.js +5 -0
  202. package/styled-system/recipes/checkbox.d.ts +16 -0
  203. package/styled-system/recipes/checkbox.js +5 -0
  204. package/styled-system/recipes/dialog.d.ts +18 -0
  205. package/styled-system/recipes/dialog.js +5 -0
  206. package/styled-system/recipes/field.d.ts +16 -0
  207. package/styled-system/recipes/field.js +5 -0
  208. package/styled-system/recipes/index.d.ts +27 -0
  209. package/styled-system/recipes/index.js +27 -0
  210. package/styled-system/recipes/input.d.ts +18 -0
  211. package/styled-system/recipes/input.js +5 -0
  212. package/styled-system/recipes/link.d.ts +18 -0
  213. package/styled-system/recipes/link.js +5 -0
  214. package/styled-system/recipes/pagination.d.ts +19 -0
  215. package/styled-system/recipes/pagination.js +5 -0
  216. package/styled-system/recipes/progress.d.ts +18 -0
  217. package/styled-system/recipes/progress.js +5 -0
  218. package/styled-system/recipes/prose.d.ts +16 -0
  219. package/styled-system/recipes/prose.js +5 -0
  220. package/styled-system/recipes/radio-group.d.ts +18 -0
  221. package/styled-system/recipes/radio-group.js +5 -0
  222. package/styled-system/recipes/runtime.js +133 -0
  223. package/styled-system/recipes/select-panel.d.ts +18 -0
  224. package/styled-system/recipes/select-panel.js +5 -0
  225. package/styled-system/recipes/select.d.ts +18 -0
  226. package/styled-system/recipes/select.js +5 -0
  227. package/styled-system/recipes/separator.d.ts +16 -0
  228. package/styled-system/recipes/separator.js +5 -0
  229. package/styled-system/recipes/skeleton.d.ts +14 -0
  230. package/styled-system/recipes/skeleton.js +5 -0
  231. package/styled-system/recipes/spinner.d.ts +16 -0
  232. package/styled-system/recipes/spinner.js +5 -0
  233. package/styled-system/recipes/switch-recipe.d.ts +16 -0
  234. package/styled-system/recipes/switch-recipe.js +5 -0
  235. package/styled-system/recipes/table.d.ts +20 -0
  236. package/styled-system/recipes/table.js +5 -0
  237. package/styled-system/recipes/tabs.d.ts +18 -0
  238. package/styled-system/recipes/tabs.js +5 -0
  239. package/styled-system/recipes/tag.d.ts +18 -0
  240. package/styled-system/recipes/tag.js +5 -0
  241. package/styled-system/recipes/textarea.d.ts +14 -0
  242. package/styled-system/recipes/textarea.js +5 -0
  243. package/styled-system/recipes/toast.d.ts +20 -0
  244. package/styled-system/recipes/toast.js +5 -0
  245. package/styled-system/recipes/tooltip.d.ts +16 -0
  246. package/styled-system/recipes/tooltip.js +5 -0
  247. package/styled-system/tokens/index.d.ts +8 -0
  248. package/styled-system/tokens/index.js +18 -0
  249. package/styled-system/types/index.d.ts +5 -0
  250. package/styled-system/types/jsx.d.ts +80 -0
  251. package/styled-system/types/pattern.d.ts +26 -0
  252. package/styled-system/types/recipe.d.ts +77 -0
  253. package/styled-system/types/system.d.ts +1645 -0
  254. package/styled-system/types/tokens.d.ts +47 -0
@@ -0,0 +1,3907 @@
1
+ //#region ../../node_modules/.pnpm/@pandacss+dev@2.1.2_@emnapi+core@1.11.3_@emnapi+runtime@1.11.3_postcss@8.5.29/node_modules/@pandacss/dev/dist/chunk-5IG6UNUZ.js
2
+ function defineConfig(config) {
3
+ return Object.assign(config, { name: "__panda.config__" });
4
+ }
5
+ function defineRecipe(config) {
6
+ return config;
7
+ }
8
+ function defineSlotRecipe(config) {
9
+ return config;
10
+ }
11
+ function defineGlobalStyles(definition) {
12
+ return definition;
13
+ }
14
+ function defineStyles(definition) {
15
+ return definition;
16
+ }
17
+ //#endregion
18
+ //#region ../tokens/dist/panda-preset.js
19
+ const koiPreset = {
20
+ "name": "@tuuject/koi-tokens",
21
+ "conditions": { "extend": {
22
+ "dark": "[data-theme=dark] &",
23
+ "light": "[data-theme=light] &",
24
+ "fontChill": "[data-font=chill] &",
25
+ "paletteRose": "[data-palette=rose] &"
26
+ } },
27
+ "theme": { "extend": {
28
+ "tokens": {
29
+ "colors": {
30
+ "secondary": {
31
+ "50": {
32
+ "value": "oklch(98.5% 0.002 247.839)",
33
+ "description": "Neutral secondary, step 50: Tailwind gray-50. 1.0:1 on white, 19.3:1 on `secondary-950`."
34
+ },
35
+ "100": {
36
+ "value": "oklch(96.7% 0.003 264.542)",
37
+ "description": "Neutral secondary, step 100: Tailwind gray-100. 1.1:1 on white, 18.3:1 on `secondary-950`."
38
+ },
39
+ "200": {
40
+ "value": "oklch(92.8% 0.006 264.531)",
41
+ "description": "Neutral secondary, step 200: Tailwind gray-200. 1.2:1 on white, 16.3:1 on `secondary-950`."
42
+ },
43
+ "300": {
44
+ "value": "oklch(87.2% 0.01 258.338)",
45
+ "description": "Neutral secondary, step 300: Tailwind gray-300. 1.5:1 on white, 13.7:1 on `secondary-950`."
46
+ },
47
+ "400": {
48
+ "value": "oklch(70.7% 0.022 261.325)",
49
+ "description": "Neutral secondary, step 400: Tailwind gray-400. 2.6:1 on white, 7.7:1 on `secondary-950`."
50
+ },
51
+ "500": {
52
+ "value": "oklch(55.1% 0.027 264.364)",
53
+ "description": "Neutral secondary, step 500: Tailwind gray-500. 4.8:1 on white, 4.2:1 on `secondary-950`."
54
+ },
55
+ "600": {
56
+ "value": "oklch(44.6% 0.03 256.802)",
57
+ "description": "Neutral secondary, step 600: Tailwind gray-600. 7.6:1 on white, 2.7:1 on `secondary-950`."
58
+ },
59
+ "700": {
60
+ "value": "oklch(37.3% 0.034 259.733)",
61
+ "description": "Neutral secondary, step 700: Tailwind gray-700. 10.3:1 on white, 2.0:1 on `secondary-950`."
62
+ },
63
+ "800": {
64
+ "value": "oklch(27.8% 0.033 256.848)",
65
+ "description": "Neutral secondary, step 800: Tailwind gray-800. 14.7:1 on white, 1.4:1 on `secondary-950`."
66
+ },
67
+ "900": {
68
+ "value": "oklch(21% 0.034 264.665)",
69
+ "description": "Neutral secondary, step 900: Tailwind gray-900. 17.7:1 on white, 1.1:1 on `secondary-950`."
70
+ },
71
+ "950": {
72
+ "value": "oklch(13% 0.028 261.692)",
73
+ "description": "Neutral secondary, step 950: Tailwind gray-950. 20.1:1 on white, 1.0:1 on `secondary-950`. The dark-theme page ground (`page-bg`)."
74
+ }
75
+ },
76
+ "warning": {
77
+ "50": {
78
+ "value": "oklch(98.7% 0.026 102.212)",
79
+ "description": "Warning, step 50: Tailwind yellow-50. 1.0:1 on white, 19.4:1 on `secondary-950`."
80
+ },
81
+ "100": {
82
+ "value": "oklch(97.3% 0.071 103.193)",
83
+ "description": "Warning, step 100: Tailwind yellow-100. 1.1:1 on white, 18.7:1 on `secondary-950`."
84
+ },
85
+ "200": {
86
+ "value": "oklch(94.5% 0.129 101.54)",
87
+ "description": "Warning, step 200: Tailwind yellow-200. 1.2:1 on white, 17.3:1 on `secondary-950`."
88
+ },
89
+ "300": {
90
+ "value": "oklch(90.5% 0.182 98.111)",
91
+ "description": "Warning, step 300: Tailwind yellow-300. 1.3:1 on white, 15.2:1 on `secondary-950`."
92
+ },
93
+ "400": {
94
+ "value": "oklch(85.2% 0.199 91.936)",
95
+ "description": "Warning, step 400: Tailwind yellow-400. 1.6:1 on white, 12.8:1 on `secondary-950`."
96
+ },
97
+ "500": {
98
+ "value": "oklch(79.5% 0.184 86.047)",
99
+ "description": "Warning, step 500: Tailwind yellow-500. 1.9:1 on white, 10.5:1 on `secondary-950`."
100
+ },
101
+ "600": {
102
+ "value": "oklch(68.1% 0.162 75.834)",
103
+ "description": "Warning, step 600: Tailwind yellow-600. 2.9:1 on white, 6.9:1 on `secondary-950`."
104
+ },
105
+ "700": {
106
+ "value": "oklch(55.4% 0.135 66.442)",
107
+ "description": "Warning, step 700: Tailwind yellow-700. 4.9:1 on white, 4.1:1 on `secondary-950`."
108
+ },
109
+ "800": {
110
+ "value": "oklch(47.6% 0.114 61.907)",
111
+ "description": "Warning, step 800: Tailwind yellow-800. 6.9:1 on white, 2.9:1 on `secondary-950`."
112
+ },
113
+ "900": {
114
+ "value": "oklch(42.1% 0.095 57.708)",
115
+ "description": "Warning, step 900: Tailwind yellow-900. 8.7:1 on white, 2.3:1 on `secondary-950`."
116
+ },
117
+ "950": {
118
+ "value": "oklch(28.6% 0.066 53.813)",
119
+ "description": "Warning, step 950: Tailwind yellow-950. 14.6:1 on white, 1.4:1 on `secondary-950`."
120
+ }
121
+ },
122
+ "error": {
123
+ "50": {
124
+ "value": "oklch(97.1% 0.013 17.38)",
125
+ "description": "Error, step 50: Tailwind red-50. 1.1:1 on white, 18.4:1 on `secondary-950`."
126
+ },
127
+ "100": {
128
+ "value": "oklch(93.6% 0.032 17.717)",
129
+ "description": "Error, step 100: Tailwind red-100. 1.2:1 on white, 16.5:1 on `secondary-950`."
130
+ },
131
+ "200": {
132
+ "value": "oklch(88.5% 0.062 18.334)",
133
+ "description": "Error, step 200: Tailwind red-200. 1.4:1 on white, 13.9:1 on `secondary-950`."
134
+ },
135
+ "300": {
136
+ "value": "oklch(80.8% 0.114 19.571)",
137
+ "description": "Error, step 300: Tailwind red-300. 1.9:1 on white, 10.5:1 on `secondary-950`."
138
+ },
139
+ "400": {
140
+ "value": "oklch(70.4% 0.191 22.216)",
141
+ "description": "Error, step 400: Tailwind red-400. 2.9:1 on white, 7.0:1 on `secondary-950`."
142
+ },
143
+ "500": {
144
+ "value": "oklch(63.7% 0.237 25.331)",
145
+ "description": "Error, step 500: Tailwind red-500. 3.8:1 on white, 5.3:1 on `secondary-950`."
146
+ },
147
+ "600": {
148
+ "value": "oklch(57.7% 0.245 27.325)",
149
+ "description": "Error, step 600: Tailwind red-600. 4.8:1 on white, 4.2:1 on `secondary-950`."
150
+ },
151
+ "700": {
152
+ "value": "oklch(50.5% 0.213 27.518)",
153
+ "description": "Error, step 700: Tailwind red-700. 6.4:1 on white, 3.1:1 on `secondary-950`."
154
+ },
155
+ "800": {
156
+ "value": "oklch(44.4% 0.177 26.899)",
157
+ "description": "Error, step 800: Tailwind red-800. 8.4:1 on white, 2.4:1 on `secondary-950`."
158
+ },
159
+ "900": {
160
+ "value": "oklch(39.6% 0.141 25.723)",
161
+ "description": "Error, step 900: Tailwind red-900. 10.1:1 on white, 2.0:1 on `secondary-950`."
162
+ },
163
+ "950": {
164
+ "value": "oklch(25.8% 0.092 26.042)",
165
+ "description": "Error, step 950: Tailwind red-950. 16.1:1 on white, 1.2:1 on `secondary-950`."
166
+ }
167
+ },
168
+ "white": {
169
+ "value": "#ffffff",
170
+ "description": "Light page ground; text in dark theme; text on buttons."
171
+ },
172
+ "black": {
173
+ "value": "#000000",
174
+ "description": "Text in light theme."
175
+ }
176
+ },
177
+ "spacing": {
178
+ "1": {
179
+ "value": "4px",
180
+ "description": "Icon-to-label gap inside badges; Tailwind's unit."
181
+ },
182
+ "2": {
183
+ "value": "8px",
184
+ "description": "Gap between an icon and its label; between a label and its control."
185
+ },
186
+ "3": {
187
+ "value": "12px",
188
+ "description": "Inner padding of compact containers (tooltips, tab track); stack gap in forms' option lists."
189
+ },
190
+ "4": {
191
+ "value": "16px",
192
+ "description": "Gap between fields in a form; Alert padding."
193
+ },
194
+ "5": {
195
+ "value": "20px",
196
+ "description": "Content padding on mobile (the blog's `p-5`)."
197
+ },
198
+ "6": {
199
+ "value": "24px",
200
+ "description": "Card and Dialog padding; content padding from md up (`md:p-6`)."
201
+ },
202
+ "8": {
203
+ "value": "32px",
204
+ "description": "Gap between groups and between cards (the blog's `gap-8`)."
205
+ },
206
+ "10": {
207
+ "value": "40px",
208
+ "description": "Space between list items on mobile (`my-10`)."
209
+ },
210
+ "12": {
211
+ "value": "48px",
212
+ "description": "Space between list items from md up (`md:my-12`)."
213
+ },
214
+ "16": {
215
+ "value": "64px",
216
+ "description": "Gap between page sections."
217
+ }
218
+ },
219
+ "radii": {
220
+ "sm": {
221
+ "value": "6px",
222
+ "description": "Checkbox boxes."
223
+ },
224
+ "lg": {
225
+ "value": "8px",
226
+ "description": "Buttons and icon buttons with `shape=\"rounded\"` (Tailwind `rounded-lg`); tooltips; images inside text."
227
+ },
228
+ "xl": {
229
+ "value": "12px",
230
+ "description": "Inputs, textareas, selects, alerts, square avatars (the blog's friend avatars)."
231
+ },
232
+ "2xl": {
233
+ "value": "16px",
234
+ "description": "Spare step between fields (12px) and panels (24px); not used by the components today."
235
+ },
236
+ "panel": {
237
+ "value": "24px",
238
+ "description": "Cards and toasts (the blog's `.koi-squircle-md`; 48px squircle where `corner-shape: squircle` is supported)."
239
+ },
240
+ "dialog": {
241
+ "value": "32px",
242
+ "description": "Dialog panels: `radius-lg` (8px) of the footer buttons plus `space-6` (24px) padding, so the panel corner and the button corner share a center and read as concentric."
243
+ },
244
+ "bar": {
245
+ "value": "36px",
246
+ "description": "Floating bars: the blog's nav pill (`rounded-[2.25rem]`)."
247
+ },
248
+ "full": {
249
+ "value": "9999px",
250
+ "description": "Buttons, icon buttons, badges, tags, switches, tab tracks, round avatars."
251
+ }
252
+ },
253
+ "sizes": {
254
+ "control-sm": {
255
+ "value": "28px",
256
+ "description": "Small buttons, inputs, tags, avatars."
257
+ },
258
+ "control-md": {
259
+ "value": "36px",
260
+ "description": "Default height of buttons, inputs, selects, tab buttons and NavMenu items."
261
+ },
262
+ "control-lg": {
263
+ "value": "44px",
264
+ "description": "Large buttons (the blog's pagination pills), the tab track, the NavMenu logo box, large avatars."
265
+ },
266
+ "content-max": {
267
+ "value": "56rem",
268
+ "description": "Max width of a reading column (`max-w-4xl`)."
269
+ },
270
+ "icon": {
271
+ "value": "16px",
272
+ "description": "Icons beside 14px text: md/lg controls, alerts, toasts, NavMenu."
273
+ },
274
+ "icon-sm": {
275
+ "value": "14px",
276
+ "description": "Icons in small controls and tags."
277
+ },
278
+ "icon-xs": {
279
+ "value": "12px",
280
+ "description": "Icons beside 12px text: the checkbox tick, a field's error icon."
281
+ },
282
+ "icon-lg": {
283
+ "value": "18px",
284
+ "description": "Icons beside 16px titles: toasts, the dialog's close button."
285
+ }
286
+ },
287
+ "shadows": {
288
+ "raised": {
289
+ "value": "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)",
290
+ "description": "The active tab and switch thumbs (`shadow-sm`). Not used on buttons, which are flat."
291
+ },
292
+ "float": {
293
+ "value": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
294
+ "description": "Things floating over the page: dialogs, toasts, the nav pill (`shadow-2xl`)."
295
+ },
296
+ "float-soft": {
297
+ "value": "0 25px 50px -12px rgba(0, 0, 0, 0.15)",
298
+ "description": "Docked floating chrome (the nav bar once scrolled)."
299
+ }
300
+ },
301
+ "blurs": {
302
+ "panel": {
303
+ "value": "24px",
304
+ "description": "Behind `surface-glass` and `backdrop` (`backdrop-blur-xl`)."
305
+ },
306
+ "float": {
307
+ "value": "40px",
308
+ "description": "Behind `surface-glass-tint` (`backdrop-blur-2xl`)."
309
+ }
310
+ },
311
+ "easings": {
312
+ "spring": { "value": "cubic-bezier(.47,1.64,.41,.8)" },
313
+ "out": { "value": "cubic-bezier(0, 0, .2, 1)" }
314
+ },
315
+ "durations": {
316
+ "fast": { "value": "150ms" },
317
+ "overlay": { "value": "200ms" },
318
+ "check": { "value": "250ms" },
319
+ "dialog": { "value": "300ms" },
320
+ "spring": { "value": "400ms" },
321
+ "shimmer": { "value": "1.6s" },
322
+ "spin": { "value": "800ms" },
323
+ "spin-slow": { "value": "1.6s" },
324
+ "indeterminate": { "value": "1.2s" },
325
+ "pulse": { "value": "2s" },
326
+ "ripple": { "value": "600ms" }
327
+ },
328
+ "zIndex": {
329
+ "dialog": {
330
+ "value": 900,
331
+ "description": "Dialog backdrop and popup."
332
+ },
333
+ "popup": {
334
+ "value": 950,
335
+ "description": "Panels opened from a trigger (SelectPanel), so they work inside a Dialog."
336
+ },
337
+ "toast": {
338
+ "value": 1e3,
339
+ "description": "The toast stack, above everything else."
340
+ },
341
+ "tooltip": {
342
+ "value": 1e3,
343
+ "description": "Tooltips: above dialogs and popups."
344
+ }
345
+ }
346
+ },
347
+ "semanticTokens": {
348
+ "colors": {
349
+ "page-bg": {
350
+ "value": {
351
+ "base": "{colors.white}",
352
+ "_dark": "{colors.secondary.950}"
353
+ },
354
+ "description": "Page background. The blog's body `bg-white` / `dark:bg-gray-950`."
355
+ },
356
+ "surface": {
357
+ "value": {
358
+ "base": "{colors.white}",
359
+ "_dark": "{colors.secondary.900}"
360
+ },
361
+ "description": "Cards, inputs, dialogs, the active tab: anything that sits on `page-bg` as its own object."
362
+ },
363
+ "surface-muted": {
364
+ "value": {
365
+ "base": "{colors.secondary.100}",
366
+ "_dark": "{colors.secondary.800}"
367
+ },
368
+ "description": "Quiet fills: tab track, progress track, ghost-button hover, disabled inputs."
369
+ },
370
+ "surface-glass": {
371
+ "value": {
372
+ "base": "rgba(255, 255, 255, 0.8)",
373
+ "_dark": "color-mix(in oklch, {colors.secondary.950} 70%, transparent)"
374
+ },
375
+ "description": "Koi's frosted panel (`bg-white/80 dark:bg-gray-950/70`), always with `blur-panel`. Use over imagery or color: the glass Card."
376
+ },
377
+ "surface-glass-tint": {
378
+ "value": {
379
+ "base": "rgba(255, 255, 255, 0.8)",
380
+ "_dark": "color-mix(in oklch, {colors.primary.950} 80%, transparent)"
381
+ },
382
+ "description": "Floating chrome: toasts and the blog's nav pill (`dark:bg-primary-950/80`), with `blur-float`."
383
+ },
384
+ "backdrop": {
385
+ "value": {
386
+ "base": "rgba(0, 0, 0, 0.4)",
387
+ "_dark": "rgba(0, 0, 0, 0.6)"
388
+ },
389
+ "description": "Dimmed layer behind a Dialog, with `blur-panel`."
390
+ },
391
+ "tooltip-bg": {
392
+ "value": {
393
+ "base": "{colors.secondary.900}",
394
+ "_dark": "{colors.secondary.100}"
395
+ },
396
+ "description": "Tooltip fill: inverted against the page."
397
+ },
398
+ "tooltip-text": {
399
+ "value": {
400
+ "base": "{colors.white}",
401
+ "_dark": "{colors.black}"
402
+ },
403
+ "description": "Text on `tooltip-bg`."
404
+ },
405
+ "text": {
406
+ "value": {
407
+ "base": "{colors.black}",
408
+ "_dark": "{colors.white}"
409
+ },
410
+ "description": "Body and heading text on `page-bg`, `surface`, `surface-muted` and the glass surfaces."
411
+ },
412
+ "text-muted": {
413
+ "value": {
414
+ "base": "rgba(0, 0, 0, 0.6)",
415
+ "_dark": "rgba(255, 255, 255, 0.6)"
416
+ },
417
+ "description": "Secondary text: help text, dates, descriptions, inactive tabs. The blog's `opacity-60`. Reads on `page-bg`, `surface` and `surface-muted`."
418
+ },
419
+ "text-disabled": {
420
+ "value": {
421
+ "base": "rgba(0, 0, 0, 0.38)",
422
+ "_dark": "rgba(255, 255, 255, 0.38)"
423
+ },
424
+ "description": "Disabled labels and values (exempt from contrast minimums). Never for content."
425
+ },
426
+ "text-brand": {
427
+ "value": {
428
+ "base": "{colors.primary.700}",
429
+ "_dark": "{colors.primary.300}"
430
+ },
431
+ "description": "Brand-colored text and icons: ghost buttons, active page links, tab focus. On `page-bg`, `surface`, `surface-muted`."
432
+ },
433
+ "border": {
434
+ "value": {
435
+ "base": "{colors.secondary.200}",
436
+ "_dark": "{colors.secondary.800}"
437
+ },
438
+ "description": "Decorative edges: card outlines, dividers, tag outlines. Not for control edges (too faint)."
439
+ },
440
+ "border-control": {
441
+ "value": "{colors.secondary.500}",
442
+ "description": "Edges of inputs, selects, checkboxes, radios and the off Switch track. Meets 3:1 on `surface` in both themes."
443
+ },
444
+ "border-control-hover": {
445
+ "value": {
446
+ "base": "{colors.secondary.600}",
447
+ "_dark": "{colors.secondary.400}"
448
+ },
449
+ "description": "Hovered control edge."
450
+ },
451
+ "divider": {
452
+ "value": {
453
+ "base": "rgba(0, 0, 0, 0.1)",
454
+ "_dark": "rgba(255, 255, 255, 0.1)"
455
+ },
456
+ "description": "Hairline separators (the blog's `border-black/10 dark:border-white/10`)."
457
+ },
458
+ "focus-ring": {
459
+ "value": {
460
+ "base": "{colors.primary.600}",
461
+ "_dark": "{colors.primary.400}"
462
+ },
463
+ "description": "2px focus outline on every interactive element, offset 2px (controls: drawn on the edge)."
464
+ },
465
+ "action": {
466
+ "value": "{colors.primary.700}",
467
+ "description": "Primary buttons, current page, checked controls' fill: the blog's pill button (`bg-primary-700`)."
468
+ },
469
+ "action-hover": {
470
+ "value": "{colors.primary.800}",
471
+ "description": "Hovered `action`. Darker than the blog's `primary-500` hover so white text stays readable."
472
+ },
473
+ "on-action": {
474
+ "value": "{colors.white}",
475
+ "description": "Text and icons on `action`, `action-hover`, `control-checked`, `danger`."
476
+ },
477
+ "action-subtle": {
478
+ "value": {
479
+ "base": "{colors.primary.100}",
480
+ "_dark": "{colors.primary.950}"
481
+ },
482
+ "description": "Secondary buttons and avatar fallbacks."
483
+ },
484
+ "action-subtle-hover": {
485
+ "value": {
486
+ "base": "{colors.primary.200}",
487
+ "_dark": "{colors.primary.900}"
488
+ },
489
+ "description": "Hovered `action-subtle`."
490
+ },
491
+ "on-action-subtle": {
492
+ "value": {
493
+ "base": "{colors.primary.800}",
494
+ "_dark": "{colors.primary.200}"
495
+ },
496
+ "description": "Text on `action-subtle`."
497
+ },
498
+ "control-checked": {
499
+ "value": {
500
+ "base": "{colors.primary.700}",
501
+ "_dark": "{colors.primary.600}"
502
+ },
503
+ "description": "Fill of a checked Checkbox, Radio dot and on Switch track; Progress bar."
504
+ },
505
+ "link": {
506
+ "value": {
507
+ "base": "{colors.accent.700}",
508
+ "_dark": "{colors.accent.400}"
509
+ },
510
+ "description": "Inline text links, with a dashed `link-border` underline. One step darker than the blog's `accent-600` so it reads at body size."
511
+ },
512
+ "link-border": {
513
+ "value": {
514
+ "base": "{colors.accent.300}",
515
+ "_dark": "{colors.accent.800}"
516
+ },
517
+ "description": "Dashed underline under `link` (the blog's `prose-a:border-dashed`)."
518
+ },
519
+ "link-hover-bg": {
520
+ "value": {
521
+ "base": "{colors.accent.100}",
522
+ "_dark": "{colors.accent.950}"
523
+ },
524
+ "description": "Tint behind a hovered link (the blog's `.prose a:hover`)."
525
+ },
526
+ "link-hover-border": {
527
+ "value": {
528
+ "base": "{colors.accent.500}",
529
+ "_dark": "{colors.accent.600}"
530
+ },
531
+ "description": "Underline of a hovered link."
532
+ },
533
+ "danger": {
534
+ "value": "{colors.error.600}",
535
+ "description": "Destructive buttons."
536
+ },
537
+ "danger-hover": {
538
+ "value": "{colors.error.700}",
539
+ "description": "Hovered `danger`."
540
+ },
541
+ "info-surface": {
542
+ "value": {
543
+ "base": "{colors.primary.50}",
544
+ "_dark": "{colors.primary.950}"
545
+ },
546
+ "description": "Info Alert fill."
547
+ },
548
+ "info-border": {
549
+ "value": {
550
+ "base": "{colors.primary.200}",
551
+ "_dark": "{colors.primary.800}"
552
+ },
553
+ "description": "Info Alert edge."
554
+ },
555
+ "info-text": {
556
+ "value": {
557
+ "base": "{colors.primary.800}",
558
+ "_dark": "{colors.primary.200}"
559
+ },
560
+ "description": "Text and icon on `info-surface`."
561
+ },
562
+ "warning-surface": {
563
+ "value": {
564
+ "base": "{colors.warning.50}",
565
+ "_dark": "{colors.warning.950}"
566
+ },
567
+ "description": "Warning Alert and Badge fill."
568
+ },
569
+ "warning-border": {
570
+ "value": {
571
+ "base": "{colors.warning.300}",
572
+ "_dark": "{colors.warning.800}"
573
+ },
574
+ "description": "Warning Alert edge."
575
+ },
576
+ "warning-text": {
577
+ "value": {
578
+ "base": "{colors.warning.800}",
579
+ "_dark": "{colors.warning.200}"
580
+ },
581
+ "description": "Text and icon on `warning-surface`."
582
+ },
583
+ "error-surface": {
584
+ "value": {
585
+ "base": "{colors.error.50}",
586
+ "_dark": "{colors.error.950}"
587
+ },
588
+ "description": "Error Alert and Badge fill."
589
+ },
590
+ "error-border": {
591
+ "value": {
592
+ "base": "{colors.error.300}",
593
+ "_dark": "{colors.error.800}"
594
+ },
595
+ "description": "Error Alert edge."
596
+ },
597
+ "error-text": {
598
+ "value": {
599
+ "base": "{colors.error.700}",
600
+ "_dark": "{colors.error.300}"
601
+ },
602
+ "description": "Text and icon on `error-surface`; Field error messages on `page-bg` / `surface`."
603
+ },
604
+ "error-control": {
605
+ "value": {
606
+ "base": "{colors.error.600}",
607
+ "_dark": "{colors.error.400}"
608
+ },
609
+ "description": "Edge of an invalid input."
610
+ },
611
+ "highlight": {
612
+ "value": {
613
+ "base": "{colors.accent.100}",
614
+ "_dark": "{colors.accent.950}"
615
+ },
616
+ "description": "Accent Badge fill: Koi's amber in a small dose."
617
+ },
618
+ "on-highlight": {
619
+ "value": {
620
+ "base": "{colors.accent.800}",
621
+ "_dark": "{colors.accent.200}"
622
+ },
623
+ "description": "Text on `highlight`."
624
+ },
625
+ "nav-item-text": {
626
+ "value": {
627
+ "base": "{colors.secondary.700}",
628
+ "_dark": "{colors.secondary.300}"
629
+ },
630
+ "description": "NavMenu items at rest, on page-bg, surface and the nav hover/active fills."
631
+ },
632
+ "nav-item-hover": {
633
+ "value": {
634
+ "base": "{colors.secondary.50}",
635
+ "_dark": "{colors.secondary.900}"
636
+ },
637
+ "description": "Hovered NavMenu item."
638
+ },
639
+ "table-row-hover": {
640
+ "value": {
641
+ "base": "{colors.secondary.50}",
642
+ "_dark": "color-mix(in oklch, {colors.secondary.800} 50%, transparent)"
643
+ },
644
+ "description": "Hovered table row. A step lighter than `surface-muted`, the ghost-button hover fill, so a hovered button still stands out in a hovered row."
645
+ },
646
+ "nav-item-active": {
647
+ "value": {
648
+ "base": "{colors.secondary.100}",
649
+ "_dark": "{colors.secondary.800}"
650
+ },
651
+ "description": "The current NavMenu item, with bold `text`."
652
+ },
653
+ "skeleton": {
654
+ "value": {
655
+ "base": "{colors.secondary.100}",
656
+ "_dark": "{colors.secondary.800}"
657
+ },
658
+ "description": "Skeleton placeholder fill. Reads on `page-bg` and `surface`."
659
+ },
660
+ "skeleton-highlight": {
661
+ "value": {
662
+ "base": "{colors.secondary.50}",
663
+ "_dark": "{colors.secondary.700}"
664
+ },
665
+ "description": "The shimmer band that sweeps across Skeleton placeholders."
666
+ },
667
+ "prose-text": {
668
+ "value": {
669
+ "base": "{colors.secondary.700}",
670
+ "_dark": "{colors.secondary.300}"
671
+ },
672
+ "description": "Running text inside Prose (the blog's `prose-slate` body, a step softer than `text`). Headings, bold and inline code inside Prose stay `text`."
673
+ },
674
+ "code-block-bg": {
675
+ "value": "{colors.secondary.800}",
676
+ "description": "Code block fill inside Prose: dark in both themes, as in the blog's `prose-slate`. Dark theme lifts it to the 800 step instead of Tailwind's `black / 0.5`, which vanished against `page-bg`."
677
+ },
678
+ "code-block-text": {
679
+ "value": {
680
+ "base": "{colors.secondary.200}",
681
+ "_dark": "{colors.secondary.300}"
682
+ },
683
+ "description": "Text on `code-block-bg`."
684
+ },
685
+ "primary-solid": {
686
+ "value": "{colors.action}",
687
+ "description": "Solid Button fill, color=\"primary\"."
688
+ },
689
+ "primary-solid-hover": {
690
+ "value": "{colors.action-hover}",
691
+ "description": "Hovered solid fill, color=\"primary\"."
692
+ },
693
+ "on-primary-solid": {
694
+ "value": "{colors.on-action}",
695
+ "description": "Text and icons on the solid fill, color=\"primary\"."
696
+ },
697
+ "primary-soft": {
698
+ "value": "{colors.action-subtle}",
699
+ "description": "Soft Button fill; also the hover fill of outline and ghost, color=\"primary\"."
700
+ },
701
+ "primary-soft-hover": {
702
+ "value": "{colors.action-subtle-hover}",
703
+ "description": "Hovered soft fill, color=\"primary\"."
704
+ },
705
+ "on-primary-soft": {
706
+ "value": "{colors.on-action-subtle}",
707
+ "description": "Text on the soft fill, color=\"primary\"."
708
+ },
709
+ "primary-fg": {
710
+ "value": "{colors.text-brand}",
711
+ "description": "Text and icons of outline and ghost Buttons, color=\"primary\"."
712
+ },
713
+ "primary-edge": {
714
+ "value": {
715
+ "base": "{colors.primary.600}",
716
+ "_dark": "{colors.primary.400}"
717
+ },
718
+ "description": "Outline Button edge (3:1+ on page-bg and surface), color=\"primary\"."
719
+ },
720
+ "accent-solid": {
721
+ "value": "{colors.accent.400}",
722
+ "description": "Solid Button fill, color=\"accent\"."
723
+ },
724
+ "accent-solid-hover": {
725
+ "value": "{colors.accent.300}",
726
+ "description": "Hovered solid fill, color=\"accent\"."
727
+ },
728
+ "on-accent-solid": {
729
+ "value": "{colors.accent.950}",
730
+ "description": "Text and icons on the solid fill, color=\"accent\"."
731
+ },
732
+ "accent-soft": {
733
+ "value": {
734
+ "base": "{colors.accent.100}",
735
+ "_dark": "{colors.accent.950}"
736
+ },
737
+ "description": "Soft Button fill; also the hover fill of outline and ghost, color=\"accent\"."
738
+ },
739
+ "accent-soft-hover": {
740
+ "value": {
741
+ "base": "{colors.accent.200}",
742
+ "_dark": "{colors.accent.900}"
743
+ },
744
+ "description": "Hovered soft fill, color=\"accent\"."
745
+ },
746
+ "on-accent-soft": {
747
+ "value": {
748
+ "base": "{colors.accent.800}",
749
+ "_dark": "{colors.accent.200}"
750
+ },
751
+ "description": "Text on the soft fill, color=\"accent\"."
752
+ },
753
+ "accent-fg": {
754
+ "value": {
755
+ "base": "{colors.accent.700}",
756
+ "_dark": "{colors.accent.400}"
757
+ },
758
+ "description": "Text and icons of outline and ghost Buttons, color=\"accent\"."
759
+ },
760
+ "accent-edge": {
761
+ "value": {
762
+ "base": "{colors.accent.600}",
763
+ "_dark": "{colors.accent.500}"
764
+ },
765
+ "description": "Outline Button edge (3:1+ on page-bg and surface), color=\"accent\"."
766
+ },
767
+ "secondary-solid": {
768
+ "value": {
769
+ "base": "{colors.secondary.700}",
770
+ "_dark": "{colors.secondary.200}"
771
+ },
772
+ "description": "Solid Button fill, color=\"secondary\"."
773
+ },
774
+ "secondary-solid-hover": {
775
+ "value": {
776
+ "base": "{colors.secondary.800}",
777
+ "_dark": "{colors.secondary.300}"
778
+ },
779
+ "description": "Hovered solid fill, color=\"secondary\"."
780
+ },
781
+ "on-secondary-solid": {
782
+ "value": {
783
+ "base": "{colors.white}",
784
+ "_dark": "{colors.secondary.950}"
785
+ },
786
+ "description": "Text and icons on the solid fill, color=\"secondary\"."
787
+ },
788
+ "secondary-soft": {
789
+ "value": {
790
+ "base": "{colors.secondary.100}",
791
+ "_dark": "{colors.secondary.800}"
792
+ },
793
+ "description": "Soft Button fill; also the hover fill of outline and ghost, color=\"secondary\"."
794
+ },
795
+ "secondary-soft-hover": {
796
+ "value": {
797
+ "base": "{colors.secondary.200}",
798
+ "_dark": "{colors.secondary.700}"
799
+ },
800
+ "description": "Hovered soft fill, color=\"secondary\"."
801
+ },
802
+ "on-secondary-soft": {
803
+ "value": {
804
+ "base": "{colors.secondary.800}",
805
+ "_dark": "{colors.secondary.100}"
806
+ },
807
+ "description": "Text on the soft fill, color=\"secondary\"."
808
+ },
809
+ "secondary-fg": {
810
+ "value": {
811
+ "base": "{colors.secondary.700}",
812
+ "_dark": "{colors.secondary.300}"
813
+ },
814
+ "description": "Text and icons of outline and ghost Buttons, color=\"secondary\"."
815
+ },
816
+ "secondary-edge": {
817
+ "value": "{colors.secondary.500}",
818
+ "description": "Outline Button edge (3:1+ on page-bg and surface), color=\"secondary\"."
819
+ },
820
+ "warning-solid": {
821
+ "value": "{colors.warning.400}",
822
+ "description": "Solid Button fill, color=\"warning\"."
823
+ },
824
+ "warning-solid-hover": {
825
+ "value": "{colors.warning.300}",
826
+ "description": "Hovered solid fill, color=\"warning\"."
827
+ },
828
+ "on-warning-solid": {
829
+ "value": "{colors.warning.950}",
830
+ "description": "Text and icons on the solid fill, color=\"warning\"."
831
+ },
832
+ "warning-soft": {
833
+ "value": {
834
+ "base": "{colors.warning.100}",
835
+ "_dark": "{colors.warning.950}"
836
+ },
837
+ "description": "Soft Button fill; also the hover fill of outline and ghost, color=\"warning\"."
838
+ },
839
+ "warning-soft-hover": {
840
+ "value": {
841
+ "base": "{colors.warning.200}",
842
+ "_dark": "{colors.warning.900}"
843
+ },
844
+ "description": "Hovered soft fill, color=\"warning\"."
845
+ },
846
+ "on-warning-soft": {
847
+ "value": {
848
+ "base": "{colors.warning.800}",
849
+ "_dark": "{colors.warning.200}"
850
+ },
851
+ "description": "Text on the soft fill, color=\"warning\"."
852
+ },
853
+ "warning-fg": {
854
+ "value": {
855
+ "base": "{colors.warning.700}",
856
+ "_dark": "{colors.warning.400}"
857
+ },
858
+ "description": "Text and icons of outline and ghost Buttons, color=\"warning\"."
859
+ },
860
+ "warning-edge": {
861
+ "value": {
862
+ "base": "{colors.warning.700}",
863
+ "_dark": "{colors.warning.500}"
864
+ },
865
+ "description": "Outline Button edge (3:1+ on page-bg and surface), color=\"warning\"."
866
+ },
867
+ "error-solid": {
868
+ "value": "{colors.danger}",
869
+ "description": "Solid Button fill, color=\"error\"."
870
+ },
871
+ "error-solid-hover": {
872
+ "value": "{colors.danger-hover}",
873
+ "description": "Hovered solid fill, color=\"error\"."
874
+ },
875
+ "on-error-solid": {
876
+ "value": "{colors.on-action}",
877
+ "description": "Text and icons on the solid fill, color=\"error\"."
878
+ },
879
+ "error-soft": {
880
+ "value": {
881
+ "base": "{colors.error.100}",
882
+ "_dark": "{colors.error.950}"
883
+ },
884
+ "description": "Soft Button fill; also the hover fill of outline and ghost, color=\"error\"."
885
+ },
886
+ "error-soft-hover": {
887
+ "value": {
888
+ "base": "{colors.error.200}",
889
+ "_dark": "{colors.error.900}"
890
+ },
891
+ "description": "Hovered soft fill, color=\"error\"."
892
+ },
893
+ "on-error-soft": {
894
+ "value": {
895
+ "base": "{colors.error.800}",
896
+ "_dark": "{colors.error.200}"
897
+ },
898
+ "description": "Text on the soft fill, color=\"error\"."
899
+ },
900
+ "error-fg": {
901
+ "value": {
902
+ "base": "{colors.error.700}",
903
+ "_dark": "{colors.error.400}"
904
+ },
905
+ "description": "Text and icons of outline and ghost Buttons, color=\"error\"."
906
+ },
907
+ "error-edge": {
908
+ "value": {
909
+ "base": "{colors.error.600}",
910
+ "_dark": "{colors.error.400}"
911
+ },
912
+ "description": "Outline Button edge (3:1+ on page-bg and surface), color=\"error\"."
913
+ },
914
+ "primary": {
915
+ "50": {
916
+ "value": {
917
+ "base": "oklch(97.7% 0.013 236.62)",
918
+ "_paletteRose": "#fff1f2"
919
+ },
920
+ "description": "Brand primary, step 50: Tailwind sky-50 (global.css `--color-primary-50: var(--color-sky-50)`)."
921
+ },
922
+ "100": {
923
+ "value": {
924
+ "base": "oklch(95.1% 0.026 236.824)",
925
+ "_paletteRose": "#ffe4e6"
926
+ },
927
+ "description": "Brand primary, step 100: Tailwind sky-100 (global.css `--color-primary-100: var(--color-sky-100)`)."
928
+ },
929
+ "200": {
930
+ "value": {
931
+ "base": "oklch(90.1% 0.058 230.902)",
932
+ "_paletteRose": "#fecdd3"
933
+ },
934
+ "description": "Brand primary, step 200: Tailwind sky-200 (global.css `--color-primary-200: var(--color-sky-200)`)."
935
+ },
936
+ "300": {
937
+ "value": {
938
+ "base": "oklch(82.8% 0.111 230.318)",
939
+ "_paletteRose": "#fda4af"
940
+ },
941
+ "description": "Brand primary, step 300: Tailwind sky-300 (global.css `--color-primary-300: var(--color-sky-300)`)."
942
+ },
943
+ "400": {
944
+ "value": {
945
+ "base": "oklch(74.6% 0.16 232.661)",
946
+ "_paletteRose": "#fb7185"
947
+ },
948
+ "description": "Brand primary, step 400: Tailwind sky-400 (global.css `--color-primary-400: var(--color-sky-400)`)."
949
+ },
950
+ "500": {
951
+ "value": {
952
+ "base": "oklch(68.5% 0.169 237.323)",
953
+ "_paletteRose": "#f43f5e"
954
+ },
955
+ "description": "Brand primary, step 500: Tailwind sky-500 (global.css `--color-primary-500: var(--color-sky-500)`)."
956
+ },
957
+ "600": {
958
+ "value": {
959
+ "base": "oklch(58.8% 0.158 241.966)",
960
+ "_paletteRose": "#e11d48"
961
+ },
962
+ "description": "Brand primary, step 600: Tailwind sky-600 (global.css `--color-primary-600: var(--color-sky-600)`)."
963
+ },
964
+ "700": {
965
+ "value": {
966
+ "base": "oklch(50% 0.134 242.749)",
967
+ "_paletteRose": "#be123c"
968
+ },
969
+ "description": "Brand primary, step 700: Tailwind sky-700 (global.css `--color-primary-700: var(--color-sky-700)`)."
970
+ },
971
+ "800": {
972
+ "value": {
973
+ "base": "oklch(44.3% 0.11 240.79)",
974
+ "_paletteRose": "#9f1239"
975
+ },
976
+ "description": "Brand primary, step 800: Tailwind sky-800 (global.css `--color-primary-800: var(--color-sky-800)`)."
977
+ },
978
+ "900": {
979
+ "value": {
980
+ "base": "oklch(39.1% 0.09 240.876)",
981
+ "_paletteRose": "#881337"
982
+ },
983
+ "description": "Brand primary, step 900: Tailwind sky-900 (global.css `--color-primary-900: var(--color-sky-900)`)."
984
+ },
985
+ "950": {
986
+ "value": {
987
+ "base": "oklch(29.3% 0.066 243.157)",
988
+ "_paletteRose": "#4c0519"
989
+ },
990
+ "description": "Brand primary, step 950: Tailwind sky-950 (global.css `--color-primary-950: var(--color-sky-950)`)."
991
+ }
992
+ },
993
+ "accent": {
994
+ "50": {
995
+ "value": {
996
+ "base": "oklch(98.7% 0.022 95.277)",
997
+ "_paletteRose": "#f5f3ff"
998
+ },
999
+ "description": "Brand accent, step 50: Tailwind amber-50 (global.css `--color-accent-50: var(--color-amber-50)`)."
1000
+ },
1001
+ "100": {
1002
+ "value": {
1003
+ "base": "oklch(96.2% 0.059 95.617)",
1004
+ "_paletteRose": "#ede9fe"
1005
+ },
1006
+ "description": "Brand accent, step 100: Tailwind amber-100 (global.css `--color-accent-100: var(--color-amber-100)`)."
1007
+ },
1008
+ "200": {
1009
+ "value": {
1010
+ "base": "oklch(92.4% 0.12 95.746)",
1011
+ "_paletteRose": "#ddd6fe"
1012
+ },
1013
+ "description": "Brand accent, step 200: Tailwind amber-200 (global.css `--color-accent-200: var(--color-amber-200)`)."
1014
+ },
1015
+ "300": {
1016
+ "value": {
1017
+ "base": "oklch(87.9% 0.169 91.605)",
1018
+ "_paletteRose": "#c4b5fd"
1019
+ },
1020
+ "description": "Brand accent, step 300: Tailwind amber-300 (global.css `--color-accent-300: var(--color-amber-300)`)."
1021
+ },
1022
+ "400": {
1023
+ "value": {
1024
+ "base": "oklch(82.8% 0.189 84.429)",
1025
+ "_paletteRose": "#a78bfa"
1026
+ },
1027
+ "description": "Brand accent, step 400: Tailwind amber-400 (global.css `--color-accent-400: var(--color-amber-400)`)."
1028
+ },
1029
+ "500": {
1030
+ "value": {
1031
+ "base": "oklch(76.9% 0.188 70.08)",
1032
+ "_paletteRose": "#8b5cf6"
1033
+ },
1034
+ "description": "Brand accent, step 500: Tailwind amber-500 (global.css `--color-accent-500: var(--color-amber-500)`)."
1035
+ },
1036
+ "600": {
1037
+ "value": {
1038
+ "base": "oklch(66.6% 0.179 58.318)",
1039
+ "_paletteRose": "#7c3aed"
1040
+ },
1041
+ "description": "Brand accent, step 600: Tailwind amber-600 (global.css `--color-accent-600: var(--color-amber-600)`)."
1042
+ },
1043
+ "700": {
1044
+ "value": {
1045
+ "base": "oklch(55.5% 0.163 48.998)",
1046
+ "_paletteRose": "#6d28d9"
1047
+ },
1048
+ "description": "Brand accent, step 700: Tailwind amber-700 (global.css `--color-accent-700: var(--color-amber-700)`)."
1049
+ },
1050
+ "800": {
1051
+ "value": {
1052
+ "base": "oklch(47.3% 0.137 46.201)",
1053
+ "_paletteRose": "#5b21b6"
1054
+ },
1055
+ "description": "Brand accent, step 800: Tailwind amber-800 (global.css `--color-accent-800: var(--color-amber-800)`)."
1056
+ },
1057
+ "900": {
1058
+ "value": {
1059
+ "base": "oklch(41.4% 0.112 45.904)",
1060
+ "_paletteRose": "#4c1d95"
1061
+ },
1062
+ "description": "Brand accent, step 900: Tailwind amber-900 (global.css `--color-accent-900: var(--color-amber-900)`)."
1063
+ },
1064
+ "950": {
1065
+ "value": {
1066
+ "base": "oklch(27.9% 0.077 45.635)",
1067
+ "_paletteRose": "#2e1065"
1068
+ },
1069
+ "description": "Brand accent, step 950: Tailwind amber-950 (global.css `--color-accent-950: var(--color-amber-950)`)."
1070
+ }
1071
+ }
1072
+ },
1073
+ "fonts": { "sans": { "value": {
1074
+ "base": "-apple-system, BlinkMacSystemFont, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", sans-serif",
1075
+ "_fontChill": "\"ChillRoundF\", -apple-system, BlinkMacSystemFont, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", sans-serif"
1076
+ } } }
1077
+ },
1078
+ "textStyles": {
1079
+ "display": {
1080
+ "description": "One per page at most: hero and site titles.",
1081
+ "value": {
1082
+ "fontFamily": "sans",
1083
+ "fontSize": "30px",
1084
+ "lineHeight": "38px",
1085
+ "fontWeight": "700"
1086
+ }
1087
+ },
1088
+ "heading-1": {
1089
+ "description": "Page titles.",
1090
+ "value": {
1091
+ "fontFamily": "sans",
1092
+ "fontSize": "24px",
1093
+ "lineHeight": "32px",
1094
+ "fontWeight": "700"
1095
+ }
1096
+ },
1097
+ "heading-2": {
1098
+ "description": "Section titles; Dialog titles.",
1099
+ "value": {
1100
+ "fontFamily": "sans",
1101
+ "fontSize": "20px",
1102
+ "lineHeight": "28px",
1103
+ "fontWeight": "700"
1104
+ }
1105
+ },
1106
+ "heading-3": {
1107
+ "description": "Card titles, the NavMenu product name, sub-sections.",
1108
+ "value": {
1109
+ "fontFamily": "sans",
1110
+ "fontSize": "16px",
1111
+ "lineHeight": "24px",
1112
+ "fontWeight": "700"
1113
+ }
1114
+ },
1115
+ "prose": {
1116
+ "description": "Long-form reading text only (articles, docs). Everything else is `body`.",
1117
+ "value": {
1118
+ "fontFamily": "sans",
1119
+ "fontSize": "16px",
1120
+ "lineHeight": "1.75",
1121
+ "fontWeight": "400"
1122
+ }
1123
+ },
1124
+ "body": {
1125
+ "description": "The base size: UI text, inputs, alerts, menus, table cells.",
1126
+ "value": {
1127
+ "fontFamily": "sans",
1128
+ "fontSize": "14px",
1129
+ "lineHeight": "20px",
1130
+ "fontWeight": "400"
1131
+ }
1132
+ },
1133
+ "small": {
1134
+ "description": "Help text, descriptions, tooltips, tags, section labels.",
1135
+ "value": {
1136
+ "fontFamily": "sans",
1137
+ "fontSize": "12px",
1138
+ "lineHeight": "16px",
1139
+ "fontWeight": "400"
1140
+ }
1141
+ },
1142
+ "caption": {
1143
+ "description": "Badges and tiny counters only.",
1144
+ "value": {
1145
+ "fontFamily": "sans",
1146
+ "fontSize": "12px",
1147
+ "lineHeight": "16px",
1148
+ "fontWeight": "700"
1149
+ }
1150
+ },
1151
+ "label": {
1152
+ "description": "Field labels, table headers, Alert and Toast titles.",
1153
+ "value": {
1154
+ "fontFamily": "sans",
1155
+ "fontSize": "14px",
1156
+ "lineHeight": "20px",
1157
+ "fontWeight": "700"
1158
+ }
1159
+ },
1160
+ "button": {
1161
+ "description": "Button labels, md and lg.",
1162
+ "value": {
1163
+ "fontFamily": "sans",
1164
+ "fontSize": "14px",
1165
+ "lineHeight": "20px",
1166
+ "fontWeight": "600"
1167
+ }
1168
+ },
1169
+ "button-sm": {
1170
+ "description": "Small button labels, except in table cells.",
1171
+ "value": {
1172
+ "fontFamily": "sans",
1173
+ "fontSize": "12px",
1174
+ "lineHeight": "16px",
1175
+ "fontWeight": "600"
1176
+ }
1177
+ }
1178
+ },
1179
+ "keyframes": {
1180
+ "koi-fade": { "from": { "opacity": "0" } },
1181
+ "koi-pop": { "from": {
1182
+ "opacity": "0",
1183
+ "transform": "translateY(8px) scale(.97)"
1184
+ } },
1185
+ "koi-rise": { "from": {
1186
+ "opacity": "0",
1187
+ "transform": "translateY(12px) scale(.96)"
1188
+ } },
1189
+ "koi-spin": { "to": { "transform": "rotate(360deg)" } },
1190
+ "koi-shimmer": {
1191
+ "from": { "backgroundPosition": "-150vw 0" },
1192
+ "to": { "backgroundPosition": "50vw 0" }
1193
+ },
1194
+ "koi-indet": {
1195
+ "from": { "translate": "-100%" },
1196
+ "to": { "translate": "250%" }
1197
+ },
1198
+ "koi-pulse": { "50%": { "opacity": ".45" } }
1199
+ }
1200
+ } }
1201
+ };
1202
+ //#endregion
1203
+ //#region src/recipes/headless.ts
1204
+ /** State selectors. Each is a compound selector: write `&${state.checked}`, `${state.popupOpen} > &`, `:not(${state.disabled})`. */
1205
+ const state = {
1206
+ checked: "[data-checked]",
1207
+ unchecked: "[data-unchecked]",
1208
+ /** A Progress with no value. */
1209
+ indeterminate: "[data-indeterminate]",
1210
+ /** Disabled through the library (a Field, a group, or a non-native control). Native elements use `:disabled`. */
1211
+ disabled: "[data-disabled]",
1212
+ /** Inside a Field with an error. */
1213
+ invalid: "[data-invalid]",
1214
+ /** A select trigger showing no value yet. */
1215
+ placeholder: "[data-placeholder]",
1216
+ /** A trigger whose popup is open. */
1217
+ popupOpen: "[data-popup-open]",
1218
+ /** The current tab. */
1219
+ selected: "[data-active]",
1220
+ /** The item a pointer or the arrow keys are on, in a list or menu. */
1221
+ highlighted: "[data-highlighted]",
1222
+ /** The first frame after mounting: transition from here. */
1223
+ entering: "[data-starting-style]",
1224
+ /** Closing: transition to here, then it unmounts. */
1225
+ exiting: "[data-ending-style]",
1226
+ /** A tooltip closed by Esc or a click, which skips its fade. */
1227
+ instantClose: "[data-instant=dismiss]",
1228
+ /** Which way a toast was flung. */
1229
+ swiped: {
1230
+ left: "[data-swipe-direction=left]",
1231
+ right: "[data-swipe-direction=right]",
1232
+ up: "[data-swipe-direction=up]",
1233
+ down: "[data-swipe-direction=down]"
1234
+ }
1235
+ };
1236
+ /** Values the library measures, as `var()` expressions ready to drop into a value or a calc(). */
1237
+ const vars = {
1238
+ anchorWidth: "var(--anchor-width)",
1239
+ availableWidth: "var(--available-width)",
1240
+ availableHeight: "var(--available-height)",
1241
+ transformOrigin: "var(--transform-origin)",
1242
+ toastOffsetY: "var(--toast-offset-y, 0px)",
1243
+ toastIndex: "var(--toast-index, 0)",
1244
+ toastSwipeX: "var(--toast-swipe-movement-x, 0px)",
1245
+ toastSwipeY: "var(--toast-swipe-movement-y, 0px)",
1246
+ activeTabLeft: "var(--active-tab-left)",
1247
+ activeTabTop: "var(--active-tab-top)",
1248
+ activeTabWidth: "var(--active-tab-width)",
1249
+ activeTabHeight: "var(--active-tab-height)"
1250
+ };
1251
+ //#endregion
1252
+ //#region src/global-css.ts
1253
+ const globalCss = defineGlobalStyles({
1254
+ html: {
1255
+ WebkitFontSmoothing: "auto",
1256
+ MozOsxFontSmoothing: "auto"
1257
+ },
1258
+ body: {
1259
+ fontFamily: "sans",
1260
+ textStyle: "body",
1261
+ color: "text",
1262
+ bg: "page-bg",
1263
+ textAutospace: "normal"
1264
+ },
1265
+ "input::-webkit-outer-spin-button, input::-webkit-inner-spin-button": {
1266
+ appearance: "none",
1267
+ margin: 0
1268
+ },
1269
+ "@media (prefers-reduced-motion: reduce)": { [`*:not(.koi-spinner__svg, .koi-progress__indicator${state.indeterminate}), *::before, *::after`]: {
1270
+ animationDuration: "0.01ms !important",
1271
+ transitionDuration: "0.01ms !important"
1272
+ } }
1273
+ });
1274
+ //#endregion
1275
+ //#region ../tokens/dist/dimensions.js
1276
+ const space = {
1277
+ "1": 4,
1278
+ "2": 8,
1279
+ "3": 12,
1280
+ "4": 16,
1281
+ "5": 20,
1282
+ "6": 24,
1283
+ "8": 32,
1284
+ "10": 40,
1285
+ "12": 48,
1286
+ "16": 64
1287
+ };
1288
+ const components = {
1289
+ "focusRing": {
1290
+ "width": 2,
1291
+ "offset": 2
1292
+ },
1293
+ "stroke": {
1294
+ "hairline": 1,
1295
+ "check": 1.5
1296
+ },
1297
+ "spinner": {
1298
+ "sizeSm": 16,
1299
+ "sizeMd": 20,
1300
+ "sizeLg": 32,
1301
+ "stroke": 3
1302
+ },
1303
+ "closeButton": { "size": 24 },
1304
+ "popup": { "offset": 4 },
1305
+ "field": {
1306
+ "lineHeight": 20,
1307
+ "paddingXSm": 10,
1308
+ "paddingXMd": 12,
1309
+ "paddingXLg": 14,
1310
+ "gap": 6,
1311
+ "iconOffset": 2,
1312
+ "chevronInset": 10,
1313
+ "chevronSpace": 36
1314
+ },
1315
+ "textarea": { "minHeight": 80 },
1316
+ "table": { "rowHeight": 48 },
1317
+ "badge": {
1318
+ "height": 22,
1319
+ "paddingX": 10,
1320
+ "dot": 6
1321
+ },
1322
+ "avatar": {
1323
+ "sizeXl": 64,
1324
+ "fontSm": 12,
1325
+ "fontMd": 14,
1326
+ "fontLg": 16,
1327
+ "fontXl": 24
1328
+ },
1329
+ "alert": { "iconOffset": 2 },
1330
+ "dialog": {
1331
+ "widthSm": 400,
1332
+ "widthMd": 520,
1333
+ "widthLg": 720
1334
+ },
1335
+ "checkbox": {
1336
+ "box": 16,
1337
+ "offset": 2
1338
+ },
1339
+ "radio": { "dot": 6 },
1340
+ "switch": {
1341
+ "trackWidth": 36,
1342
+ "trackHeight": 20,
1343
+ "thumb": 14,
1344
+ "thumbInset": 3
1345
+ },
1346
+ "progress": {
1347
+ "trackSm": 4,
1348
+ "trackMd": 8,
1349
+ "trackLg": 12
1350
+ },
1351
+ "pagination": { "gapWidth": 24 },
1352
+ "tag": {
1353
+ "paddingX": 10,
1354
+ "remove": 16,
1355
+ "removeOverhang": 4
1356
+ },
1357
+ "toast": {
1358
+ "width": 360,
1359
+ "iconOffset": 3,
1360
+ "closableInset": 44,
1361
+ "enterOffset": 12
1362
+ },
1363
+ "tooltip": {
1364
+ "maxWidth": 240,
1365
+ "offset": 8
1366
+ },
1367
+ "selectPanel": {
1368
+ "maxHeight": 360,
1369
+ "chevronOverhang": 2
1370
+ },
1371
+ "link": {
1372
+ "underline": 2,
1373
+ "radius": 2,
1374
+ "iconGap": 2
1375
+ },
1376
+ "chatBubble": {
1377
+ "paddingX": 12,
1378
+ "paddingY": 8,
1379
+ "maxWidth": 480
1380
+ },
1381
+ "prose": {
1382
+ "quoteRule": 4,
1383
+ "headRule": 2,
1384
+ "kbdDepth": 3
1385
+ }
1386
+ };
1387
+ //#endregion
1388
+ //#region src/recipes/dimensions.ts
1389
+ /** A dimension number as a Panda arbitrary value: toPx(16) → '[16px]'. */
1390
+ const toPx = (n) => `[${n}px]`;
1391
+ /** The keyboard focus outline every focusable part draws. */
1392
+ const focusRing = {
1393
+ outlineWidth: `${components.focusRing.width}px`,
1394
+ outlineStyle: "solid",
1395
+ outlineColor: "focus-ring",
1396
+ outlineOffset: `${components.focusRing.offset}px`
1397
+ };
1398
+ //#endregion
1399
+ //#region src/recipes/alert.ts
1400
+ const alert = defineSlotRecipe({
1401
+ className: "koi-alert",
1402
+ slots: [
1403
+ "root",
1404
+ "icon",
1405
+ "content",
1406
+ "title",
1407
+ "body",
1408
+ "action",
1409
+ "close"
1410
+ ],
1411
+ base: {
1412
+ root: {
1413
+ position: "relative",
1414
+ display: "flex",
1415
+ gap: "2",
1416
+ p: "3",
1417
+ boxSizing: "border-box",
1418
+ borderWidth: `${components.stroke.hairline}px`,
1419
+ borderStyle: "solid",
1420
+ borderRadius: "xl",
1421
+ fontFamily: "sans",
1422
+ textStyle: "body"
1423
+ },
1424
+ icon: {
1425
+ flex: "none",
1426
+ display: "inline-flex",
1427
+ mt: toPx(components.alert.iconOffset),
1428
+ "& > svg": {
1429
+ width: "icon",
1430
+ height: "icon"
1431
+ }
1432
+ },
1433
+ content: {
1434
+ flex: "1",
1435
+ minWidth: "0",
1436
+ display: "flex",
1437
+ flexDirection: "column",
1438
+ gap: "1"
1439
+ },
1440
+ title: {
1441
+ m: "0",
1442
+ fontWeight: "700"
1443
+ },
1444
+ body: {
1445
+ color: "text",
1446
+ "& p": { m: "0" }
1447
+ },
1448
+ action: {
1449
+ mt: "2",
1450
+ display: "flex",
1451
+ flexWrap: "wrap",
1452
+ gap: "2"
1453
+ },
1454
+ close: {
1455
+ position: "absolute",
1456
+ top: "2",
1457
+ insetInlineEnd: "2",
1458
+ display: "inline-flex",
1459
+ alignItems: "center",
1460
+ justifyContent: "center",
1461
+ width: toPx(components.closeButton.size),
1462
+ height: toPx(components.closeButton.size),
1463
+ p: "0",
1464
+ borderWidth: "0",
1465
+ borderRadius: "full",
1466
+ bg: "transparent",
1467
+ color: "inherit",
1468
+ cursor: "pointer",
1469
+ transitionProperty: "background-color",
1470
+ transitionDuration: "fast",
1471
+ _hover: { bg: "divider" },
1472
+ _focusVisible: focusRing,
1473
+ "& > svg": {
1474
+ width: "icon",
1475
+ height: "icon"
1476
+ }
1477
+ }
1478
+ },
1479
+ variants: {
1480
+ tone: {
1481
+ info: { root: {
1482
+ bg: "info-surface",
1483
+ borderColor: "info-border",
1484
+ color: "info-text"
1485
+ } },
1486
+ warning: { root: {
1487
+ bg: "warning-surface",
1488
+ borderColor: "warning-border",
1489
+ color: "warning-text"
1490
+ } },
1491
+ error: { root: {
1492
+ bg: "error-surface",
1493
+ borderColor: "error-border",
1494
+ color: "error-text"
1495
+ } }
1496
+ },
1497
+ closable: {
1498
+ true: { root: { pe: "10" } },
1499
+ false: {}
1500
+ }
1501
+ },
1502
+ defaultVariants: {
1503
+ tone: "info",
1504
+ closable: false
1505
+ }
1506
+ });
1507
+ //#endregion
1508
+ //#region src/recipes/avatar.ts
1509
+ const avatar = defineSlotRecipe({
1510
+ className: "koi-avatar",
1511
+ slots: [
1512
+ "root",
1513
+ "image",
1514
+ "fallback"
1515
+ ],
1516
+ base: {
1517
+ root: {
1518
+ display: "inline-flex",
1519
+ alignItems: "center",
1520
+ justifyContent: "center",
1521
+ flexShrink: "0",
1522
+ verticalAlign: "middle",
1523
+ overflow: "hidden",
1524
+ boxSizing: "border-box",
1525
+ borderRadius: "full",
1526
+ bg: "action-subtle",
1527
+ color: "on-action-subtle",
1528
+ fontFamily: "sans",
1529
+ fontWeight: "700",
1530
+ lineHeight: "1",
1531
+ userSelect: "none"
1532
+ },
1533
+ image: {
1534
+ display: "block",
1535
+ width: "100%",
1536
+ height: "100%",
1537
+ objectFit: "cover"
1538
+ },
1539
+ fallback: {
1540
+ display: "flex",
1541
+ alignItems: "center",
1542
+ justifyContent: "center",
1543
+ width: "100%",
1544
+ height: "100%",
1545
+ whiteSpace: "nowrap"
1546
+ }
1547
+ },
1548
+ variants: {
1549
+ size: {
1550
+ sm: { root: {
1551
+ width: "control-sm",
1552
+ height: "control-sm",
1553
+ fontSize: toPx(components.avatar.fontSm)
1554
+ } },
1555
+ md: { root: {
1556
+ width: "control-md",
1557
+ height: "control-md",
1558
+ fontSize: toPx(components.avatar.fontMd)
1559
+ } },
1560
+ lg: { root: {
1561
+ width: "control-lg",
1562
+ height: "control-lg",
1563
+ fontSize: toPx(components.avatar.fontLg)
1564
+ } },
1565
+ xl: { root: {
1566
+ width: toPx(components.avatar.sizeXl),
1567
+ height: toPx(components.avatar.sizeXl),
1568
+ fontSize: toPx(components.avatar.fontXl)
1569
+ } }
1570
+ },
1571
+ shape: {
1572
+ circle: {},
1573
+ square: { root: { borderRadius: "xl" } }
1574
+ }
1575
+ },
1576
+ defaultVariants: {
1577
+ size: "md",
1578
+ shape: "circle"
1579
+ }
1580
+ });
1581
+ //#endregion
1582
+ //#region src/recipes/badge.ts
1583
+ const badge = defineSlotRecipe({
1584
+ className: "koi-badge",
1585
+ slots: ["root", "dot"],
1586
+ base: {
1587
+ root: {
1588
+ display: "inline-flex",
1589
+ alignItems: "center",
1590
+ gap: "1",
1591
+ height: toPx(components.badge.height),
1592
+ px: toPx(components.badge.paddingX),
1593
+ boxSizing: "border-box",
1594
+ borderRadius: "full",
1595
+ fontFamily: "sans",
1596
+ textStyle: "caption",
1597
+ whiteSpace: "nowrap"
1598
+ },
1599
+ dot: {
1600
+ flexShrink: "0",
1601
+ width: toPx(components.badge.dot),
1602
+ height: toPx(components.badge.dot),
1603
+ borderRadius: "full",
1604
+ bg: "currentColor"
1605
+ }
1606
+ },
1607
+ variants: { tone: {
1608
+ neutral: { root: {
1609
+ bg: "surface-muted",
1610
+ color: "text"
1611
+ } },
1612
+ primary: { root: {
1613
+ bg: "action-subtle",
1614
+ color: "on-action-subtle"
1615
+ } },
1616
+ accent: { root: {
1617
+ bg: "highlight",
1618
+ color: "on-highlight"
1619
+ } },
1620
+ warning: { root: {
1621
+ bg: "warning-surface",
1622
+ color: "warning-text"
1623
+ } },
1624
+ error: { root: {
1625
+ bg: "error-surface",
1626
+ color: "error-text"
1627
+ } },
1628
+ solid: { root: {
1629
+ bg: "action",
1630
+ color: "on-action"
1631
+ } }
1632
+ } },
1633
+ defaultVariants: { tone: "neutral" }
1634
+ });
1635
+ //#endregion
1636
+ //#region ../core/src/button.ts
1637
+ const BUTTON_COLORS = [
1638
+ "primary",
1639
+ "accent",
1640
+ "secondary",
1641
+ "warning",
1642
+ "error"
1643
+ ];
1644
+ const BUTTON_VARIANTS = [
1645
+ "solid",
1646
+ "soft",
1647
+ "outline",
1648
+ "ghost"
1649
+ ];
1650
+ //#endregion
1651
+ //#region src/recipes/button.ts
1652
+ const HOVER = `&:hover:not(:disabled, ${state.disabled})`;
1653
+ function look(c, v) {
1654
+ switch (v) {
1655
+ case "solid": return {
1656
+ bg: `${c}-solid`,
1657
+ color: `on-${c}-solid`,
1658
+ [HOVER]: { bg: `${c}-solid-hover` }
1659
+ };
1660
+ case "soft": return {
1661
+ bg: `${c}-soft`,
1662
+ color: `on-${c}-soft`,
1663
+ [HOVER]: { bg: `${c}-soft-hover` }
1664
+ };
1665
+ case "outline": return {
1666
+ bg: "transparent",
1667
+ color: `${c}-fg`,
1668
+ borderColor: `${c}-edge`,
1669
+ [HOVER]: { bg: `${c}-soft` }
1670
+ };
1671
+ case "ghost": return {
1672
+ bg: "transparent",
1673
+ color: `${c}-fg`,
1674
+ [HOVER]: { bg: `${c}-soft` }
1675
+ };
1676
+ }
1677
+ }
1678
+ const RIPPLE_REST = "0 0 0 6px color-mix(in oklch, var(--koi-ripple) 0%, transparent)";
1679
+ const RIPPLE_PRESSED = "0 0 0 0 color-mix(in oklch, var(--koi-ripple) 45%, transparent)";
1680
+ const ripple = (c) => ({ "--koi-ripple": `token(colors.${c}-solid)` });
1681
+ const transition = (shadow) => [
1682
+ "background-color",
1683
+ "color",
1684
+ "border-color"
1685
+ ].map((p) => `${p} token(durations.fast)`).concat(`box-shadow ${shadow}`).join(", ");
1686
+ const empty = (keys) => Object.fromEntries(keys.map((k) => [k, {}]));
1687
+ const button = defineRecipe({
1688
+ className: "koi-btn",
1689
+ description: "Button and IconButton. No shadows on any variant: buttons stay flat (the press ripple fades to nothing).",
1690
+ base: {
1691
+ display: "inline-flex",
1692
+ alignItems: "center",
1693
+ justifyContent: "center",
1694
+ gap: "2",
1695
+ borderWidth: `${components.stroke.hairline}px`,
1696
+ borderStyle: "solid",
1697
+ borderColor: "transparent",
1698
+ borderRadius: "full",
1699
+ fontFamily: "sans",
1700
+ fontWeight: "600",
1701
+ whiteSpace: "nowrap",
1702
+ userSelect: "none",
1703
+ cursor: "pointer",
1704
+ textDecoration: "none",
1705
+ boxShadow: RIPPLE_REST,
1706
+ transition: transition("token(durations.ripple) token(easings.out)"),
1707
+ [`&:active:not(:disabled, ${state.disabled})`]: {
1708
+ boxShadow: RIPPLE_PRESSED,
1709
+ transition: transition("0s")
1710
+ },
1711
+ _focusVisible: focusRing,
1712
+ _disabled: {
1713
+ opacity: "0.5",
1714
+ cursor: "not-allowed"
1715
+ },
1716
+ "&[aria-busy=true]:disabled": { cursor: "progress" },
1717
+ "& > svg": {
1718
+ width: "icon",
1719
+ height: "icon",
1720
+ flexShrink: "0"
1721
+ }
1722
+ },
1723
+ variants: {
1724
+ color: {
1725
+ primary: ripple("primary"),
1726
+ accent: ripple("accent"),
1727
+ secondary: ripple("secondary"),
1728
+ warning: ripple("warning"),
1729
+ error: ripple("error")
1730
+ },
1731
+ variant: empty(BUTTON_VARIANTS),
1732
+ size: {
1733
+ sm: {
1734
+ height: "control-sm",
1735
+ px: "3",
1736
+ textStyle: "button-sm",
1737
+ "& > svg": {
1738
+ width: "icon-sm",
1739
+ height: "icon-sm"
1740
+ },
1741
+ "td &": { textStyle: "button" }
1742
+ },
1743
+ md: {
1744
+ height: "control-md",
1745
+ px: "4",
1746
+ textStyle: "button"
1747
+ },
1748
+ lg: {
1749
+ height: "control-lg",
1750
+ px: "5",
1751
+ textStyle: "button"
1752
+ }
1753
+ },
1754
+ shape: {
1755
+ pill: { borderRadius: "full" },
1756
+ rounded: { borderRadius: "lg" }
1757
+ },
1758
+ /** Square, icon-only (IconButton). Width follows the size's height. Styled in compoundVariants below. */
1759
+ iconOnly: {
1760
+ true: {},
1761
+ false: {}
1762
+ },
1763
+ fullWidth: { true: { width: "100%" } }
1764
+ },
1765
+ compoundVariants: [
1766
+ ...BUTTON_COLORS.flatMap((color) => BUTTON_VARIANTS.map((variant) => ({
1767
+ color,
1768
+ variant,
1769
+ css: look(color, variant)
1770
+ }))),
1771
+ {
1772
+ shape: "rounded",
1773
+ size: "sm",
1774
+ iconOnly: false,
1775
+ css: { px: "2" }
1776
+ },
1777
+ {
1778
+ iconOnly: true,
1779
+ css: {
1780
+ px: "0",
1781
+ flex: "none",
1782
+ aspectRatio: "1"
1783
+ }
1784
+ }
1785
+ ],
1786
+ defaultVariants: {
1787
+ color: "primary",
1788
+ variant: "solid",
1789
+ size: "md",
1790
+ shape: "rounded",
1791
+ iconOnly: false
1792
+ }
1793
+ });
1794
+ //#endregion
1795
+ //#region src/recipes/card.ts
1796
+ const card = defineSlotRecipe({
1797
+ className: "koi-card",
1798
+ slots: [
1799
+ "root",
1800
+ "media",
1801
+ "head",
1802
+ "title",
1803
+ "description",
1804
+ "body",
1805
+ "footer"
1806
+ ],
1807
+ base: {
1808
+ root: {
1809
+ display: "flex",
1810
+ flexDirection: "column",
1811
+ gap: "5",
1812
+ p: "5",
1813
+ boxSizing: "border-box",
1814
+ overflow: "hidden",
1815
+ borderRadius: "panel",
1816
+ fontFamily: "sans",
1817
+ color: "text"
1818
+ },
1819
+ media: {
1820
+ mx: "-5",
1821
+ mt: "-5",
1822
+ "& > *": {
1823
+ display: "block",
1824
+ width: "100%"
1825
+ }
1826
+ },
1827
+ head: {
1828
+ display: "flex",
1829
+ flexDirection: "column",
1830
+ gap: "1"
1831
+ },
1832
+ title: {
1833
+ m: "0",
1834
+ textStyle: "heading-3"
1835
+ },
1836
+ description: {
1837
+ m: "0",
1838
+ textStyle: "small",
1839
+ color: "text-muted"
1840
+ },
1841
+ body: { textStyle: "body" },
1842
+ footer: {
1843
+ display: "flex",
1844
+ flexWrap: "wrap",
1845
+ justifyContent: "flex-end",
1846
+ gap: "2"
1847
+ }
1848
+ },
1849
+ variants: {
1850
+ variant: {
1851
+ outlined: { root: {
1852
+ bg: "surface",
1853
+ borderWidth: `${components.stroke.hairline}px`,
1854
+ borderStyle: "solid",
1855
+ borderColor: "border"
1856
+ } },
1857
+ filled: { root: { bg: "surface-muted" } },
1858
+ glass: { root: {
1859
+ bg: "surface-glass",
1860
+ backdropFilter: "blur(var(--blurs-panel))"
1861
+ } }
1862
+ },
1863
+ padding: {
1864
+ default: {},
1865
+ none: {
1866
+ root: { p: "0" },
1867
+ media: { m: "0" }
1868
+ }
1869
+ }
1870
+ },
1871
+ defaultVariants: {
1872
+ variant: "outlined",
1873
+ padding: "default"
1874
+ }
1875
+ });
1876
+ //#endregion
1877
+ //#region src/recipes/chat-bubble.ts
1878
+ const chatBubble = defineRecipe({
1879
+ className: "koi-chat-bubble",
1880
+ base: {
1881
+ display: "inline-block",
1882
+ maxWidth: toPx(components.chatBubble.maxWidth),
1883
+ px: toPx(components.chatBubble.paddingX),
1884
+ py: toPx(components.chatBubble.paddingY),
1885
+ boxSizing: "border-box",
1886
+ fontFamily: "sans",
1887
+ textStyle: "body",
1888
+ borderRadius: "xl",
1889
+ overflowWrap: "break-word"
1890
+ },
1891
+ variants: { side: {
1892
+ received: {
1893
+ bg: "surface-muted",
1894
+ color: "text",
1895
+ borderBottomLeftRadius: "sm"
1896
+ },
1897
+ sent: {
1898
+ bg: "action",
1899
+ color: "on-action",
1900
+ borderBottomRightRadius: "sm"
1901
+ }
1902
+ } },
1903
+ defaultVariants: { side: "received" }
1904
+ });
1905
+ //#endregion
1906
+ //#region src/recipes/checkbox.ts
1907
+ const choiceRow = {
1908
+ root: {
1909
+ display: "inline-flex",
1910
+ alignItems: "flex-start",
1911
+ gap: "2",
1912
+ cursor: "pointer",
1913
+ color: "text",
1914
+ fontFamily: "sans",
1915
+ textStyle: "body",
1916
+ [`&:has(> ${state.disabled})`]: {
1917
+ color: "text-disabled",
1918
+ cursor: "not-allowed"
1919
+ },
1920
+ [`&:hover > ${state.unchecked}:not(${state.disabled}, [aria-invalid=true])`]: { borderColor: "border-control-hover" }
1921
+ },
1922
+ text: {
1923
+ display: "flex",
1924
+ flexDirection: "column"
1925
+ },
1926
+ label: { textStyle: "body" },
1927
+ description: {
1928
+ mt: "1",
1929
+ textStyle: "small",
1930
+ color: "text-muted",
1931
+ [`${state.disabled} ~ * > &`]: { color: "text-disabled" }
1932
+ }
1933
+ };
1934
+ const choiceControl = {
1935
+ display: "inline-flex",
1936
+ alignItems: "center",
1937
+ justifyContent: "center",
1938
+ flex: "none",
1939
+ boxSizing: "border-box",
1940
+ width: toPx(components.checkbox.box),
1941
+ height: toPx(components.checkbox.box),
1942
+ mt: toPx(components.checkbox.offset),
1943
+ borderWidth: toPx(components.stroke.check),
1944
+ borderStyle: "solid",
1945
+ borderColor: "border-control",
1946
+ bg: "surface",
1947
+ color: "on-action",
1948
+ transitionProperty: "background-color, border-color",
1949
+ transitionDuration: "fast",
1950
+ _focusVisible: focusRing,
1951
+ [`&${state.checked}`]: {
1952
+ bg: "control-checked",
1953
+ borderColor: "control-checked"
1954
+ },
1955
+ [`&[aria-invalid=true]:not(${state.checked})`]: { borderColor: "error-control" },
1956
+ [`&${state.disabled}`]: {
1957
+ bg: "surface-muted",
1958
+ borderColor: "border"
1959
+ },
1960
+ [`&${state.checked}${state.disabled}`]: {
1961
+ bg: "control-checked",
1962
+ borderColor: "control-checked",
1963
+ opacity: "0.5"
1964
+ }
1965
+ };
1966
+ const checkbox = defineSlotRecipe({
1967
+ className: "koi-checkbox",
1968
+ slots: [
1969
+ "root",
1970
+ "control",
1971
+ "indicator",
1972
+ "text",
1973
+ "label",
1974
+ "description"
1975
+ ],
1976
+ base: {
1977
+ ...choiceRow,
1978
+ control: {
1979
+ ...choiceControl,
1980
+ borderRadius: "sm"
1981
+ },
1982
+ indicator: {
1983
+ display: "flex",
1984
+ opacity: "0",
1985
+ transform: "scale(.6)",
1986
+ transition: "opacity {durations.fast}, transform {durations.check} {easings.spring}",
1987
+ [`&${state.checked}`]: {
1988
+ opacity: "1",
1989
+ transform: "scale(1)"
1990
+ },
1991
+ "& > svg": {
1992
+ width: "icon-xs",
1993
+ height: "icon-xs"
1994
+ }
1995
+ }
1996
+ }
1997
+ });
1998
+ //#endregion
1999
+ //#region src/recipes/dialog.ts
2000
+ const dialog = defineSlotRecipe({
2001
+ className: "koi-dialog",
2002
+ slots: [
2003
+ "backdrop",
2004
+ "viewport",
2005
+ "popup",
2006
+ "title",
2007
+ "description",
2008
+ "body",
2009
+ "footer",
2010
+ "close"
2011
+ ],
2012
+ base: {
2013
+ backdrop: {
2014
+ position: "fixed",
2015
+ inset: "0",
2016
+ zIndex: "dialog",
2017
+ bg: "backdrop",
2018
+ backdropFilter: "blur(var(--blurs-panel))",
2019
+ transitionProperty: "opacity",
2020
+ transitionDuration: "dialog",
2021
+ [`&${state.entering}, &${state.exiting}`]: { opacity: "0" }
2022
+ },
2023
+ viewport: {
2024
+ position: "fixed",
2025
+ inset: "0",
2026
+ zIndex: "dialog",
2027
+ display: "flex",
2028
+ alignItems: "center",
2029
+ justifyContent: "center",
2030
+ p: "4"
2031
+ },
2032
+ popup: {
2033
+ position: "relative",
2034
+ width: "100%",
2035
+ maxHeight: `calc(100vh - ${2 * space[4]}px)`,
2036
+ overflow: "auto",
2037
+ display: "flex",
2038
+ flexDirection: "column",
2039
+ gap: "2",
2040
+ p: "6",
2041
+ bg: "surface",
2042
+ color: "text",
2043
+ borderRadius: "dialog",
2044
+ boxShadow: "float",
2045
+ outline: "none",
2046
+ transitionProperty: "opacity, transform",
2047
+ transitionDuration: "dialog",
2048
+ transformOrigin: "center",
2049
+ [`&${state.entering}, &${state.exiting}`]: {
2050
+ opacity: "0",
2051
+ transform: "scale(.96)"
2052
+ }
2053
+ },
2054
+ title: {
2055
+ m: "0",
2056
+ pe: "8",
2057
+ textStyle: "heading-2"
2058
+ },
2059
+ description: {
2060
+ m: "0",
2061
+ textStyle: "body",
2062
+ color: "text-muted"
2063
+ },
2064
+ body: {
2065
+ mt: "2",
2066
+ textStyle: "body"
2067
+ },
2068
+ footer: {
2069
+ mt: "4",
2070
+ display: "flex",
2071
+ gap: "2",
2072
+ justifyContent: "flex-end",
2073
+ flexWrap: "wrap"
2074
+ },
2075
+ close: {
2076
+ position: "absolute",
2077
+ top: "4",
2078
+ insetInlineEnd: "4"
2079
+ }
2080
+ },
2081
+ variants: { size: {
2082
+ sm: { popup: { maxWidth: `${components.dialog.widthSm}px` } },
2083
+ md: { popup: { maxWidth: `${components.dialog.widthMd}px` } },
2084
+ lg: { popup: { maxWidth: `${components.dialog.widthLg}px` } }
2085
+ } },
2086
+ defaultVariants: { size: "md" }
2087
+ });
2088
+ //#endregion
2089
+ //#region src/recipes/divider.ts
2090
+ const line = {
2091
+ borderTopWidth: `${components.stroke.hairline}px`,
2092
+ borderTopStyle: "solid",
2093
+ borderTopColor: "divider"
2094
+ };
2095
+ const separator = defineRecipe({
2096
+ className: "koi-divider",
2097
+ base: {
2098
+ flexShrink: "0",
2099
+ borderWidth: "0"
2100
+ },
2101
+ variants: { kind: {
2102
+ line: {
2103
+ ...line,
2104
+ width: "100%",
2105
+ my: "4"
2106
+ },
2107
+ label: {
2108
+ display: "flex",
2109
+ alignItems: "center",
2110
+ gap: "3",
2111
+ width: "100%",
2112
+ my: "4",
2113
+ fontFamily: "sans",
2114
+ textStyle: "small",
2115
+ color: "text-muted",
2116
+ _before: {
2117
+ content: "\"\"",
2118
+ flex: "1",
2119
+ ...line
2120
+ },
2121
+ _after: {
2122
+ content: "\"\"",
2123
+ flex: "1",
2124
+ ...line
2125
+ }
2126
+ },
2127
+ vertical: {
2128
+ display: "inline-block",
2129
+ alignSelf: "stretch",
2130
+ width: `${components.stroke.hairline}px`,
2131
+ minHeight: "1em",
2132
+ mx: "2",
2133
+ bg: "divider"
2134
+ }
2135
+ } },
2136
+ defaultVariants: { kind: "line" }
2137
+ });
2138
+ //#endregion
2139
+ //#region src/recipes/field.ts
2140
+ const field = defineSlotRecipe({
2141
+ className: "koi-field",
2142
+ slots: [
2143
+ "root",
2144
+ "label",
2145
+ "required",
2146
+ "optional",
2147
+ "error",
2148
+ "help"
2149
+ ],
2150
+ base: {
2151
+ root: {
2152
+ display: "flex",
2153
+ flexDirection: "column",
2154
+ gap: toPx(components.field.gap),
2155
+ fontFamily: "sans"
2156
+ },
2157
+ label: {
2158
+ textStyle: "label",
2159
+ color: "text"
2160
+ },
2161
+ required: { color: "error-text" },
2162
+ optional: {
2163
+ fontWeight: "400",
2164
+ color: "text-muted"
2165
+ },
2166
+ error: {
2167
+ m: "0",
2168
+ display: "flex",
2169
+ alignItems: "flex-start",
2170
+ gap: "1",
2171
+ textStyle: "small",
2172
+ color: "error-text",
2173
+ "& > svg": {
2174
+ flex: "none",
2175
+ width: "icon-xs",
2176
+ height: "icon-xs",
2177
+ mt: toPx(components.field.iconOffset)
2178
+ }
2179
+ },
2180
+ help: {
2181
+ m: "0",
2182
+ textStyle: "small",
2183
+ color: "text-muted"
2184
+ }
2185
+ }
2186
+ });
2187
+ //#endregion
2188
+ //#region src/recipes/input.ts
2189
+ const INVALID$1 = "&:has(> input[aria-invalid=true])";
2190
+ const DISABLED$1 = "&:has(> input:disabled)";
2191
+ const input = defineSlotRecipe({
2192
+ className: "koi-input",
2193
+ slots: [
2194
+ "root",
2195
+ "el",
2196
+ "icon"
2197
+ ],
2198
+ base: {
2199
+ root: {
2200
+ position: "relative",
2201
+ display: "flex",
2202
+ alignItems: "center",
2203
+ gap: "2",
2204
+ width: "100%",
2205
+ boxSizing: "border-box",
2206
+ bg: "surface",
2207
+ borderWidth: `${components.stroke.hairline}px`,
2208
+ borderStyle: "solid",
2209
+ borderColor: "border-control",
2210
+ borderRadius: "xl",
2211
+ color: "text",
2212
+ fontFamily: "sans",
2213
+ transitionProperty: "border-color, box-shadow",
2214
+ transitionDuration: "fast",
2215
+ "&:hover:not(:focus-within, :has(> input:disabled, > input[aria-invalid=true]))": { borderColor: "border-control-hover" },
2216
+ "&:focus-within": {
2217
+ borderColor: "focus-ring",
2218
+ boxShadow: `0 0 0 ${components.stroke.hairline}px {colors.focus-ring}`
2219
+ },
2220
+ [INVALID$1]: { borderColor: "error-control" },
2221
+ [`${INVALID$1}:focus-within`]: { boxShadow: `0 0 0 ${components.stroke.hairline}px {colors.error-control}` },
2222
+ [DISABLED$1]: {
2223
+ bg: "surface-muted",
2224
+ color: "text-disabled",
2225
+ borderColor: "border",
2226
+ cursor: "not-allowed",
2227
+ "& > *, & > input::placeholder": { color: "text-disabled" }
2228
+ }
2229
+ },
2230
+ el: {
2231
+ flex: "1",
2232
+ minWidth: "0",
2233
+ height: "100%",
2234
+ m: "0",
2235
+ p: "0",
2236
+ borderWidth: "0",
2237
+ outline: "none",
2238
+ bg: "transparent",
2239
+ color: "inherit",
2240
+ font: "inherit",
2241
+ lineHeight: toPx(components.field.lineHeight),
2242
+ _placeholder: { color: "text-muted" },
2243
+ _disabled: { cursor: "not-allowed" }
2244
+ },
2245
+ icon: {
2246
+ display: "inline-flex",
2247
+ flex: "none",
2248
+ color: "text-muted",
2249
+ "& > svg": {
2250
+ width: "icon",
2251
+ height: "icon"
2252
+ }
2253
+ }
2254
+ },
2255
+ variants: { size: {
2256
+ sm: { root: {
2257
+ height: "control-sm",
2258
+ px: toPx(components.field.paddingXSm),
2259
+ textStyle: "small"
2260
+ } },
2261
+ md: { root: {
2262
+ height: "control-md",
2263
+ px: toPx(components.field.paddingXMd),
2264
+ textStyle: "body"
2265
+ } },
2266
+ lg: { root: {
2267
+ height: "control-lg",
2268
+ px: toPx(components.field.paddingXLg),
2269
+ textStyle: "body"
2270
+ } }
2271
+ } },
2272
+ defaultVariants: { size: "md" }
2273
+ });
2274
+ //#endregion
2275
+ //#region src/recipes/link.ts
2276
+ const linkBase = {
2277
+ textDecoration: "none",
2278
+ cursor: "pointer",
2279
+ transitionProperty: "color, background-color, border-color",
2280
+ transitionDuration: "fast",
2281
+ _focusVisible: focusRing
2282
+ };
2283
+ const linkUnderline = {
2284
+ color: "link",
2285
+ borderBottomWidth: `${components.link.underline}px`,
2286
+ borderBottomStyle: "dashed",
2287
+ borderBottomColor: "link-border",
2288
+ borderRadius: toPx(components.link.radius),
2289
+ _hover: {
2290
+ bg: "link-hover-bg",
2291
+ borderBottomColor: "link-hover-border"
2292
+ }
2293
+ };
2294
+ const linkStyle = {
2295
+ ...linkBase,
2296
+ ...linkUnderline
2297
+ };
2298
+ const link = defineSlotRecipe({
2299
+ className: "koi-link",
2300
+ slots: [
2301
+ "root",
2302
+ "external",
2303
+ "srOnly"
2304
+ ],
2305
+ base: {
2306
+ root: linkBase,
2307
+ external: {
2308
+ display: "inline-flex",
2309
+ verticalAlign: "[-1px]",
2310
+ marginInlineStart: toPx(components.link.iconGap),
2311
+ "& > svg": {
2312
+ width: "[0.85em]",
2313
+ height: "[0.85em]"
2314
+ }
2315
+ },
2316
+ srOnly: { srOnly: true }
2317
+ },
2318
+ variants: { variant: {
2319
+ underline: { root: linkUnderline },
2320
+ plain: { root: {
2321
+ color: "text-muted",
2322
+ _hover: { color: "text-brand" }
2323
+ } }
2324
+ } },
2325
+ defaultVariants: { variant: "underline" }
2326
+ });
2327
+ //#endregion
2328
+ //#region src/recipes/pagination.ts
2329
+ const pagination = defineSlotRecipe({
2330
+ className: "koi-pagination",
2331
+ slots: [
2332
+ "root",
2333
+ "pages",
2334
+ "page",
2335
+ "gap",
2336
+ "count"
2337
+ ],
2338
+ base: {
2339
+ root: {
2340
+ display: "flex",
2341
+ alignItems: "center",
2342
+ justifyContent: "space-between",
2343
+ gap: "3",
2344
+ flexWrap: "wrap",
2345
+ fontFamily: "sans"
2346
+ },
2347
+ pages: {
2348
+ display: "flex",
2349
+ alignItems: "center",
2350
+ gap: "1",
2351
+ m: "0",
2352
+ p: "0",
2353
+ listStyle: "none"
2354
+ },
2355
+ page: {
2356
+ display: "inline-flex",
2357
+ alignItems: "center",
2358
+ justifyContent: "center",
2359
+ minWidth: "control-md",
2360
+ height: "control-md",
2361
+ px: "2",
2362
+ borderWidth: "0",
2363
+ borderRadius: "full",
2364
+ bg: "transparent",
2365
+ color: "text",
2366
+ textStyle: "body",
2367
+ fontVariantNumeric: "tabular-nums",
2368
+ cursor: "pointer",
2369
+ userSelect: "none",
2370
+ transitionProperty: "background-color, color",
2371
+ transitionDuration: "fast",
2372
+ _focusVisible: focusRing,
2373
+ "&:hover:not([aria-current=page])": { bg: "surface-muted" },
2374
+ "&[aria-current=page]": {
2375
+ bg: "action",
2376
+ color: "on-action",
2377
+ fontWeight: "700"
2378
+ }
2379
+ },
2380
+ gap: {
2381
+ minWidth: toPx(components.pagination.gapWidth),
2382
+ textAlign: "center",
2383
+ color: "text-muted",
2384
+ textStyle: "body",
2385
+ userSelect: "none"
2386
+ },
2387
+ count: {
2388
+ color: "text",
2389
+ textStyle: "body",
2390
+ fontVariantNumeric: "tabular-nums"
2391
+ }
2392
+ },
2393
+ variants: {
2394
+ /** Follows the Buttons beside it (ShapeProvider / Button's `shape`). */
2395
+ shape: {
2396
+ pill: {},
2397
+ rounded: { page: { borderRadius: "lg" } }
2398
+ },
2399
+ /** compact keeps prev/next beside the page numbers instead of pushing them to the ends of the row. */
2400
+ compact: {
2401
+ true: { root: {
2402
+ justifyContent: "flex-start",
2403
+ gap: "1"
2404
+ } },
2405
+ false: {}
2406
+ }
2407
+ },
2408
+ defaultVariants: {
2409
+ shape: "rounded",
2410
+ compact: false
2411
+ }
2412
+ });
2413
+ //#endregion
2414
+ //#region src/recipes/progress.ts
2415
+ const progress = defineSlotRecipe({
2416
+ className: "koi-progress",
2417
+ slots: [
2418
+ "root",
2419
+ "head",
2420
+ "label",
2421
+ "value",
2422
+ "track",
2423
+ "indicator"
2424
+ ],
2425
+ base: {
2426
+ root: {
2427
+ display: "flex",
2428
+ flexDirection: "column",
2429
+ gap: "2",
2430
+ width: "100%",
2431
+ fontFamily: "sans"
2432
+ },
2433
+ head: {
2434
+ display: "flex",
2435
+ justifyContent: "space-between",
2436
+ gap: "3",
2437
+ textStyle: "body",
2438
+ color: "text"
2439
+ },
2440
+ label: { minWidth: "0" },
2441
+ value: {
2442
+ marginInlineStart: "auto",
2443
+ color: "text-muted",
2444
+ fontVariantNumeric: "tabular-nums"
2445
+ },
2446
+ track: {
2447
+ position: "relative",
2448
+ overflow: "hidden",
2449
+ height: toPx(components.progress.trackMd),
2450
+ borderRadius: "full",
2451
+ bg: "surface-muted"
2452
+ },
2453
+ indicator: {
2454
+ height: "100%",
2455
+ borderRadius: "inherit",
2456
+ bg: "control-checked",
2457
+ transitionProperty: "width",
2458
+ transitionDuration: "spring",
2459
+ transitionTimingFunction: "spring",
2460
+ [`&${state.indeterminate}`]: {
2461
+ position: "absolute",
2462
+ insetBlock: "0",
2463
+ left: "0",
2464
+ width: "40%",
2465
+ animationName: "koi-indet",
2466
+ animationDuration: "indeterminate",
2467
+ animationTimingFunction: "ease-in-out",
2468
+ animationIterationCount: "infinite",
2469
+ "@media (prefers-reduced-motion: reduce)": {
2470
+ width: "100%",
2471
+ animationName: "koi-pulse",
2472
+ animationDuration: "pulse"
2473
+ }
2474
+ }
2475
+ }
2476
+ },
2477
+ variants: { size: {
2478
+ sm: { track: { height: toPx(components.progress.trackSm) } },
2479
+ md: {},
2480
+ lg: { track: { height: toPx(components.progress.trackLg) } }
2481
+ } },
2482
+ defaultVariants: { size: "md" }
2483
+ });
2484
+ //#endregion
2485
+ //#region src/recipes/prose.ts
2486
+ const ratio = (px, base) => String(Number((px / base).toFixed(7)));
2487
+ const em = (px, base) => `${ratio(px, base)}em`;
2488
+ const NOT_PROSE = ":not(:where(.koi-not-prose *, .koi-not-prose))";
2489
+ const el = (sel, pseudo = "") => `& :where(${sel})${NOT_PROSE}${pseudo}`;
2490
+ const ctx = (...sels) => sels.map((s) => `& ${s}${NOT_PROSE}`).join(", ");
2491
+ const edges = {
2492
+ "& > :first-child": { marginTop: "0" },
2493
+ "& > :last-child": { marginBottom: "0" }
2494
+ };
2495
+ const listTypes = Object.fromEntries([
2496
+ ["A", "upper-alpha"],
2497
+ ["a", "lower-alpha"],
2498
+ ["I", "upper-roman"],
2499
+ ["i", "lower-roman"],
2500
+ ["1", "decimal"]
2501
+ ].map(([type, style]) => [ctx(`ol[type="${type}"]`), { listStyleType: style }]));
2502
+ const prose = defineRecipe({
2503
+ className: "koi-prose",
2504
+ base: {
2505
+ color: "prose-text",
2506
+ fontFamily: "sans",
2507
+ minWidth: "0",
2508
+ [el("p")]: {
2509
+ marginTop: em(20, 16),
2510
+ marginBottom: em(20, 16)
2511
+ },
2512
+ [ctx(".lead")]: {
2513
+ color: "text-muted",
2514
+ fontSize: em(20, 16),
2515
+ lineHeight: ratio(32, 20),
2516
+ marginTop: em(24, 20),
2517
+ marginBottom: em(24, 20)
2518
+ },
2519
+ [el("a")]: {
2520
+ ...linkStyle,
2521
+ fontWeight: "500"
2522
+ },
2523
+ [el("strong")]: {
2524
+ color: "text",
2525
+ fontWeight: "600"
2526
+ },
2527
+ [ctx("a strong", "blockquote strong", "thead th strong")]: { color: "inherit" },
2528
+ [el("h1")]: {
2529
+ color: "text",
2530
+ fontWeight: "800",
2531
+ fontSize: em(36, 16),
2532
+ marginTop: "0",
2533
+ marginBottom: em(32, 36),
2534
+ lineHeight: ratio(40, 36)
2535
+ },
2536
+ [el("h2")]: {
2537
+ color: "text",
2538
+ fontWeight: "700",
2539
+ fontSize: em(24, 16),
2540
+ marginTop: em(48, 24),
2541
+ marginBottom: em(24, 24),
2542
+ lineHeight: ratio(32, 24)
2543
+ },
2544
+ [el("h3")]: {
2545
+ color: "text",
2546
+ fontWeight: "600",
2547
+ fontSize: em(20, 16),
2548
+ marginTop: em(32, 20),
2549
+ marginBottom: em(12, 20),
2550
+ lineHeight: ratio(32, 20)
2551
+ },
2552
+ [el("h4")]: {
2553
+ color: "text",
2554
+ fontWeight: "600",
2555
+ fontSize: "1em",
2556
+ marginTop: em(24, 16),
2557
+ marginBottom: em(8, 16),
2558
+ lineHeight: ratio(24, 16)
2559
+ },
2560
+ [el("h5")]: {
2561
+ color: "text",
2562
+ fontWeight: "600",
2563
+ fontSize: em(14, 16),
2564
+ marginTop: em(24, 14),
2565
+ marginBottom: em(8, 14),
2566
+ lineHeight: ratio(20, 14)
2567
+ },
2568
+ [el("h6")]: {
2569
+ color: "text-muted",
2570
+ fontWeight: "600",
2571
+ fontSize: em(14, 16),
2572
+ marginTop: em(24, 14),
2573
+ marginBottom: em(8, 14),
2574
+ lineHeight: ratio(20, 14)
2575
+ },
2576
+ [ctx("h1 strong")]: {
2577
+ fontWeight: "900",
2578
+ color: "inherit"
2579
+ },
2580
+ [ctx("h2 strong")]: {
2581
+ fontWeight: "800",
2582
+ color: "inherit"
2583
+ },
2584
+ [ctx("h3 strong", "h4 strong", "h5 strong", "h6 strong")]: {
2585
+ fontWeight: "700",
2586
+ color: "inherit"
2587
+ },
2588
+ [ctx("hr + *", "h2 + *", "h3 + *", "h4 + *", "h5 + *", "h6 + *")]: { marginTop: "0" },
2589
+ [el("ol")]: {
2590
+ listStyleType: "decimal",
2591
+ marginTop: em(20, 16),
2592
+ marginBottom: em(20, 16),
2593
+ paddingInlineStart: em(26, 16)
2594
+ },
2595
+ [el("ul")]: {
2596
+ listStyleType: "disc",
2597
+ marginTop: em(20, 16),
2598
+ marginBottom: em(20, 16),
2599
+ paddingInlineStart: em(26, 16)
2600
+ },
2601
+ ...listTypes,
2602
+ [el("li")]: {
2603
+ marginTop: em(2, 16),
2604
+ marginBottom: em(2, 16)
2605
+ },
2606
+ [el("ol > li")]: { paddingInlineStart: em(6, 16) },
2607
+ [el("ul > li")]: { paddingInlineStart: em(6, 16) },
2608
+ [el("ol > li", "::marker")]: {
2609
+ fontWeight: "400",
2610
+ color: "text-muted"
2611
+ },
2612
+ [el("ul > li", "::marker")]: { color: "text-muted" },
2613
+ [ctx("> ul > li p", "> ol > li p")]: {
2614
+ marginTop: em(12, 16),
2615
+ marginBottom: em(12, 16)
2616
+ },
2617
+ [ctx("> ul > li > p:first-child", "> ol > li > p:first-child")]: { marginTop: em(20, 16) },
2618
+ [ctx("> ul > li > p:last-child", "> ol > li > p:last-child")]: { marginBottom: em(20, 16) },
2619
+ [ctx("ul ul", "ul ol", "ol ul", "ol ol")]: {
2620
+ marginTop: em(12, 16),
2621
+ marginBottom: em(12, 16)
2622
+ },
2623
+ [el("dl")]: {
2624
+ marginTop: em(20, 16),
2625
+ marginBottom: em(20, 16)
2626
+ },
2627
+ [el("dt")]: {
2628
+ color: "text",
2629
+ fontWeight: "600",
2630
+ marginTop: em(20, 16)
2631
+ },
2632
+ [el("dd")]: {
2633
+ marginTop: em(8, 16),
2634
+ paddingInlineStart: em(26, 16)
2635
+ },
2636
+ [el("hr")]: {
2637
+ borderColor: "border",
2638
+ borderTopWidth: `${components.stroke.hairline}px`,
2639
+ marginTop: em(48, 16),
2640
+ marginBottom: em(48, 16)
2641
+ },
2642
+ [el("blockquote")]: {
2643
+ fontWeight: "500",
2644
+ fontStyle: "italic",
2645
+ color: "text",
2646
+ borderInlineStartWidth: `${components.prose.quoteRule}px`,
2647
+ borderInlineStartColor: "border",
2648
+ quotes: "\"\\201C\"\"\\201D\"\"\\2018\"\"\\2019\"",
2649
+ marginTop: em(32, 20),
2650
+ marginBottom: em(32, 20),
2651
+ paddingInlineStart: em(20, 20)
2652
+ },
2653
+ [el("blockquote p:first-of-type", "::before")]: { content: "open-quote" },
2654
+ [el("blockquote p:last-of-type", "::after")]: { content: "close-quote" },
2655
+ [el("img")]: {
2656
+ borderRadius: "lg",
2657
+ marginTop: em(32, 16),
2658
+ marginBottom: em(32, 16)
2659
+ },
2660
+ [el("picture")]: {
2661
+ display: "block",
2662
+ marginTop: em(32, 16),
2663
+ marginBottom: em(32, 16)
2664
+ },
2665
+ [ctx("picture > img")]: {
2666
+ marginTop: "0",
2667
+ marginBottom: "0"
2668
+ },
2669
+ [el("video")]: {
2670
+ marginTop: em(32, 16),
2671
+ marginBottom: em(32, 16)
2672
+ },
2673
+ [el("figure")]: {
2674
+ marginTop: em(32, 16),
2675
+ marginBottom: em(32, 16)
2676
+ },
2677
+ [ctx("figure > *")]: {
2678
+ marginTop: "0",
2679
+ marginBottom: "0"
2680
+ },
2681
+ [el("figcaption")]: {
2682
+ color: "text-muted",
2683
+ fontSize: em(14, 16),
2684
+ lineHeight: ratio(20, 14)
2685
+ },
2686
+ [ctx("figure > figcaption")]: { marginTop: em(12, 14) },
2687
+ [el("code")]: {
2688
+ color: "text",
2689
+ fontWeight: "600",
2690
+ fontSize: em(14, 16)
2691
+ },
2692
+ [el("code", "::before")]: { content: "\"`\"" },
2693
+ [el("code", "::after")]: { content: "\"`\"" },
2694
+ [ctx("a code", "h1 code", "h2 code", "h3 code", "h4 code", "h5 code", "h6 code", "blockquote code", "thead th code")]: { color: "inherit" },
2695
+ [ctx("h2 code")]: { fontSize: em(21, 24) },
2696
+ [ctx("h3 code")]: { fontSize: em(18, 20) },
2697
+ [el("kbd")]: {
2698
+ fontWeight: "500",
2699
+ fontFamily: "inherit",
2700
+ color: "text",
2701
+ fontSize: em(14, 16),
2702
+ borderRadius: em(5, 14),
2703
+ boxShadow: `0 0 0 ${components.stroke.hairline}px {colors.divider}, 0 ${components.prose.kbdDepth}px 0 {colors.divider}`,
2704
+ paddingTop: em(3, 16),
2705
+ paddingInlineEnd: em(6, 16),
2706
+ paddingBottom: em(3, 16),
2707
+ paddingInlineStart: em(6, 16),
2708
+ marginInline: em(2, 14)
2709
+ },
2710
+ [ctx("kbd:has(kbd)")]: { padding: em(8, 14) },
2711
+ [el("pre")]: {
2712
+ color: "code-block-text",
2713
+ bg: "code-block-bg",
2714
+ overflowX: "auto",
2715
+ fontWeight: "400",
2716
+ fontSize: em(14, 16),
2717
+ lineHeight: ratio(24, 14),
2718
+ marginTop: em(24, 14),
2719
+ marginBottom: em(24, 14),
2720
+ borderRadius: "sm",
2721
+ paddingTop: em(12, 14),
2722
+ paddingInlineEnd: em(16, 14),
2723
+ paddingBottom: em(12, 14),
2724
+ paddingInlineStart: em(16, 14)
2725
+ },
2726
+ [ctx("pre code")]: {
2727
+ bg: "transparent",
2728
+ borderWidth: "0",
2729
+ borderRadius: "0",
2730
+ padding: "0",
2731
+ fontWeight: "inherit",
2732
+ color: "inherit",
2733
+ fontSize: "inherit",
2734
+ fontFamily: "inherit",
2735
+ lineHeight: "inherit"
2736
+ },
2737
+ [`${ctx("pre code")}::before, ${ctx("pre code")}::after`]: { content: "none" },
2738
+ [el("table")]: {
2739
+ width: "100%",
2740
+ tableLayout: "auto",
2741
+ fontSize: em(14, 16),
2742
+ lineHeight: ratio(24, 14),
2743
+ marginTop: em(32, 16),
2744
+ marginBottom: em(32, 16)
2745
+ },
2746
+ [el("thead")]: {
2747
+ borderBottomWidth: `${components.prose.headRule}px`,
2748
+ borderBottomColor: "border"
2749
+ },
2750
+ [el("th")]: {
2751
+ fontSize: em(16, 14),
2752
+ lineHeight: ratio(32, 16),
2753
+ textAlign: "start"
2754
+ },
2755
+ [el("td")]: {
2756
+ fontSize: em(16, 14),
2757
+ lineHeight: ratio(32, 16),
2758
+ textAlign: "start"
2759
+ },
2760
+ [ctx("thead th")]: {
2761
+ color: "text",
2762
+ fontWeight: "600",
2763
+ verticalAlign: "bottom",
2764
+ paddingInlineEnd: em(8, 14),
2765
+ paddingBottom: em(8, 14),
2766
+ paddingInlineStart: em(8, 14)
2767
+ },
2768
+ [ctx("tbody tr")]: {
2769
+ borderBottomWidth: `${components.stroke.hairline}px`,
2770
+ borderBottomColor: "border"
2771
+ },
2772
+ [ctx("tbody td")]: { verticalAlign: "baseline" },
2773
+ [ctx("tfoot")]: {
2774
+ borderTopWidth: `${components.stroke.hairline}px`,
2775
+ borderTopColor: "border"
2776
+ },
2777
+ [ctx("tfoot td")]: { verticalAlign: "top" },
2778
+ [ctx("tbody td", "tfoot td")]: { padding: em(8, 14) },
2779
+ [ctx("thead th:first-child", "tbody td:first-child", "tfoot td:first-child")]: { paddingInlineStart: "0" },
2780
+ [ctx("thead th:last-child", "tbody td:last-child", "tfoot td:last-child")]: { paddingInlineEnd: "0" },
2781
+ [ctx("tbody tr:last-child")]: { borderBottomWidth: "0" }
2782
+ },
2783
+ variants: { size: {
2784
+ sm: {
2785
+ textStyle: "body",
2786
+ lineHeight: ratio(28, 16),
2787
+ ...edges
2788
+ },
2789
+ md: {
2790
+ textStyle: "prose",
2791
+ ...edges
2792
+ }
2793
+ } },
2794
+ defaultVariants: { size: "md" }
2795
+ });
2796
+ //#endregion
2797
+ //#region src/recipes/radio-group.ts
2798
+ const radioGroup = defineSlotRecipe({
2799
+ className: "koi-radio-group",
2800
+ slots: [
2801
+ "root",
2802
+ "item",
2803
+ "control",
2804
+ "indicator",
2805
+ "text",
2806
+ "label",
2807
+ "description"
2808
+ ],
2809
+ base: {
2810
+ root: {
2811
+ display: "flex",
2812
+ flexDirection: "column",
2813
+ gap: "3"
2814
+ },
2815
+ item: choiceRow.root,
2816
+ text: choiceRow.text,
2817
+ label: choiceRow.label,
2818
+ description: choiceRow.description,
2819
+ control: {
2820
+ ...choiceControl,
2821
+ borderRadius: "full"
2822
+ },
2823
+ indicator: {
2824
+ width: toPx(components.radio.dot),
2825
+ height: toPx(components.radio.dot),
2826
+ borderRadius: "full",
2827
+ bg: "on-action",
2828
+ transform: "scale(0)",
2829
+ transition: "transform {durations.check} {easings.spring}",
2830
+ [`&${state.checked}`]: { transform: "scale(1)" }
2831
+ }
2832
+ },
2833
+ variants: { orientation: {
2834
+ vertical: {},
2835
+ horizontal: { root: {
2836
+ flexDirection: "row",
2837
+ flexWrap: "wrap",
2838
+ gap: "6"
2839
+ } }
2840
+ } },
2841
+ defaultVariants: { orientation: "vertical" }
2842
+ });
2843
+ //#endregion
2844
+ //#region src/recipes/select.ts
2845
+ const INVALID = "&:has(> select[aria-invalid=true])";
2846
+ const DISABLED = "&:has(> select:disabled)";
2847
+ const select = defineSlotRecipe({
2848
+ className: "koi-select",
2849
+ slots: [
2850
+ "root",
2851
+ "el",
2852
+ "chevron"
2853
+ ],
2854
+ base: {
2855
+ root: {
2856
+ position: "relative",
2857
+ display: "flex",
2858
+ alignItems: "center",
2859
+ width: "100%",
2860
+ boxSizing: "border-box",
2861
+ bg: "surface",
2862
+ borderWidth: `${components.stroke.hairline}px`,
2863
+ borderStyle: "solid",
2864
+ borderColor: "border-control",
2865
+ borderRadius: "xl",
2866
+ color: "text",
2867
+ fontFamily: "sans",
2868
+ transitionProperty: "border-color, box-shadow",
2869
+ transitionDuration: "fast",
2870
+ "&:hover:not(:focus-within, :has(> select:disabled, > select[aria-invalid=true]))": { borderColor: "border-control-hover" },
2871
+ "&:focus-within": {
2872
+ borderColor: "focus-ring",
2873
+ boxShadow: `0 0 0 ${components.stroke.hairline}px {colors.focus-ring}`
2874
+ },
2875
+ [INVALID]: { borderColor: "error-control" },
2876
+ [`${INVALID}:focus-within`]: { boxShadow: `0 0 0 ${components.stroke.hairline}px {colors.error-control}` },
2877
+ [DISABLED]: {
2878
+ bg: "surface-muted",
2879
+ color: "text-disabled",
2880
+ borderColor: "border",
2881
+ cursor: "not-allowed"
2882
+ }
2883
+ },
2884
+ el: {
2885
+ flex: "1",
2886
+ minWidth: "0",
2887
+ height: "100%",
2888
+ m: "0",
2889
+ pe: toPx(components.field.chevronSpace),
2890
+ borderWidth: "0",
2891
+ borderRadius: "inherit",
2892
+ outline: "none",
2893
+ bg: "transparent",
2894
+ color: "inherit",
2895
+ font: "inherit",
2896
+ lineHeight: toPx(components.field.lineHeight),
2897
+ appearance: "none",
2898
+ cursor: "pointer",
2899
+ textOverflow: "ellipsis",
2900
+ "&:not(:disabled):has(> option[value=\"\"]:checked)": { color: "text-muted" },
2901
+ "& option": {
2902
+ color: "text",
2903
+ bg: "surface"
2904
+ },
2905
+ _disabled: { cursor: "not-allowed" }
2906
+ },
2907
+ chevron: {
2908
+ position: "absolute",
2909
+ insetInlineEnd: toPx(components.field.chevronInset),
2910
+ display: "inline-flex",
2911
+ pointerEvents: "none",
2912
+ color: "text-muted",
2913
+ "& > svg": {
2914
+ width: "icon",
2915
+ height: "icon"
2916
+ },
2917
+ ":has(> select:disabled) > &": { color: "text-disabled" }
2918
+ }
2919
+ },
2920
+ variants: { size: {
2921
+ sm: {
2922
+ root: {
2923
+ height: "control-sm",
2924
+ textStyle: "small"
2925
+ },
2926
+ el: { ps: toPx(components.field.paddingXSm) }
2927
+ },
2928
+ md: {
2929
+ root: {
2930
+ height: "control-md",
2931
+ textStyle: "body"
2932
+ },
2933
+ el: { ps: toPx(components.field.paddingXMd) }
2934
+ },
2935
+ lg: {
2936
+ root: {
2937
+ height: "control-lg",
2938
+ textStyle: "body"
2939
+ },
2940
+ el: { ps: toPx(components.field.paddingXLg) }
2941
+ }
2942
+ } },
2943
+ defaultVariants: { size: "md" }
2944
+ });
2945
+ const OPEN = `:is(:focus, ${state.popupOpen})`;
2946
+ const BAD = `:is([aria-invalid=true], ${state.invalid}):not(${state.disabled})`;
2947
+ const selectPanel = defineSlotRecipe({
2948
+ className: "koi-select-panel",
2949
+ slots: [
2950
+ "trigger",
2951
+ "value",
2952
+ "icon",
2953
+ "positioner",
2954
+ "popup",
2955
+ "search",
2956
+ "searchInput",
2957
+ "list",
2958
+ "empty",
2959
+ "item",
2960
+ "itemText",
2961
+ "itemIndicator",
2962
+ "group",
2963
+ "groupLabel",
2964
+ "separator"
2965
+ ],
2966
+ base: {
2967
+ trigger: {
2968
+ display: "flex",
2969
+ alignItems: "center",
2970
+ gap: "2",
2971
+ width: "100%",
2972
+ boxSizing: "border-box",
2973
+ m: "0",
2974
+ bg: "surface",
2975
+ borderWidth: `${components.stroke.hairline}px`,
2976
+ borderStyle: "solid",
2977
+ borderColor: "border-control",
2978
+ borderRadius: "xl",
2979
+ color: "text",
2980
+ fontFamily: "sans",
2981
+ textAlign: "start",
2982
+ cursor: "pointer",
2983
+ outline: "none",
2984
+ transitionProperty: "border-color, box-shadow",
2985
+ transitionDuration: "fast",
2986
+ [`&:hover:not(${OPEN}, ${state.disabled}, ${BAD})`]: { borderColor: "border-control-hover" },
2987
+ [`&${OPEN}:not(${BAD})`]: {
2988
+ borderColor: "focus-ring",
2989
+ boxShadow: `0 0 0 ${components.stroke.hairline}px {colors.focus-ring}`
2990
+ },
2991
+ [`&${BAD}`]: { borderColor: "error-control" },
2992
+ [`&${BAD}${OPEN}`]: { boxShadow: `0 0 0 ${components.stroke.hairline}px {colors.error-control}` },
2993
+ [`&${state.disabled}`]: {
2994
+ bg: "surface-muted",
2995
+ color: "text-disabled",
2996
+ borderColor: "border",
2997
+ cursor: "not-allowed"
2998
+ }
2999
+ },
3000
+ value: {
3001
+ flex: "1",
3002
+ minWidth: "0",
3003
+ overflow: "hidden",
3004
+ textOverflow: "ellipsis",
3005
+ whiteSpace: "nowrap",
3006
+ lineHeight: toPx(components.field.lineHeight),
3007
+ [`${state.placeholder}:not(${state.disabled}) > &`]: { color: "text-muted" }
3008
+ },
3009
+ icon: {
3010
+ display: "inline-flex",
3011
+ flex: "none",
3012
+ marginInlineEnd: toPx(-components.selectPanel.chevronOverhang),
3013
+ color: "text-muted",
3014
+ transitionProperty: "transform",
3015
+ transitionDuration: "check",
3016
+ transitionTimingFunction: "spring",
3017
+ "& > svg": {
3018
+ width: "icon",
3019
+ height: "icon"
3020
+ },
3021
+ [`${state.popupOpen} > &`]: { transform: "rotate(180deg)" },
3022
+ [`${state.disabled} > &`]: { color: "text-disabled" }
3023
+ },
3024
+ positioner: {
3025
+ zIndex: "popup",
3026
+ outline: "none"
3027
+ },
3028
+ popup: {
3029
+ boxSizing: "border-box",
3030
+ display: "flex",
3031
+ flexDirection: "column",
3032
+ minWidth: vars.anchorWidth,
3033
+ maxWidth: vars.availableWidth,
3034
+ maxHeight: `min(${components.selectPanel.maxHeight}px, ${vars.availableHeight})`,
3035
+ overflow: "hidden",
3036
+ bg: "surface",
3037
+ borderWidth: `${components.stroke.hairline}px`,
3038
+ borderStyle: "solid",
3039
+ borderColor: "border",
3040
+ borderRadius: "xl",
3041
+ boxShadow: "float",
3042
+ color: "text",
3043
+ fontFamily: "sans",
3044
+ textStyle: "body",
3045
+ outline: "none",
3046
+ transformOrigin: vars.transformOrigin,
3047
+ transition: "opacity {durations.fast} {easings.out}, transform {durations.check} {easings.spring}",
3048
+ [`&${state.entering}, &${state.exiting}`]: {
3049
+ opacity: "0",
3050
+ transform: "scale(.96)"
3051
+ },
3052
+ [`&${state.exiting}`]: { transitionTimingFunction: "out" }
3053
+ },
3054
+ search: {
3055
+ display: "flex",
3056
+ alignItems: "center",
3057
+ gap: "2",
3058
+ flex: "none",
3059
+ height: "control-md",
3060
+ px: "3",
3061
+ borderBottomWidth: `${components.stroke.hairline}px`,
3062
+ borderBottomStyle: "solid",
3063
+ borderBottomColor: "divider",
3064
+ color: "text-muted",
3065
+ "& > svg": {
3066
+ flex: "none",
3067
+ width: "icon",
3068
+ height: "icon"
3069
+ }
3070
+ },
3071
+ searchInput: {
3072
+ flex: "1",
3073
+ minWidth: "0",
3074
+ height: "100%",
3075
+ m: "0",
3076
+ p: "0",
3077
+ borderWidth: "0",
3078
+ outline: "none",
3079
+ bg: "transparent",
3080
+ color: "text",
3081
+ font: "inherit",
3082
+ lineHeight: toPx(components.field.lineHeight),
3083
+ _placeholder: { color: "text-muted" }
3084
+ },
3085
+ list: {
3086
+ flex: "1",
3087
+ minHeight: "0",
3088
+ overflowY: "auto",
3089
+ overscrollBehavior: "contain",
3090
+ p: "1",
3091
+ scrollPaddingBlock: "1",
3092
+ outline: "none",
3093
+ _empty: { display: "none" }
3094
+ },
3095
+ empty: {
3096
+ px: "3",
3097
+ py: "2",
3098
+ color: "text-muted",
3099
+ _empty: { display: "none" }
3100
+ },
3101
+ item: {
3102
+ display: "flex",
3103
+ alignItems: "center",
3104
+ gap: "2",
3105
+ boxSizing: "border-box",
3106
+ minHeight: "control-md",
3107
+ px: "3",
3108
+ py: "2",
3109
+ borderRadius: "lg",
3110
+ color: "text",
3111
+ lineHeight: toPx(components.field.lineHeight),
3112
+ cursor: "pointer",
3113
+ userSelect: "none",
3114
+ outline: "none",
3115
+ scrollMarginBlock: "1",
3116
+ transitionProperty: "background-color",
3117
+ transitionDuration: "fast",
3118
+ [`&${state.highlighted}`]: { bg: "surface-muted" },
3119
+ [`&${state.disabled}`]: {
3120
+ color: "text-disabled",
3121
+ cursor: "not-allowed"
3122
+ }
3123
+ },
3124
+ itemText: {
3125
+ flex: "1",
3126
+ minWidth: "0"
3127
+ },
3128
+ itemIndicator: {
3129
+ display: "inline-flex",
3130
+ flex: "none",
3131
+ color: "text-brand",
3132
+ "& > svg": {
3133
+ width: "icon",
3134
+ height: "icon"
3135
+ }
3136
+ },
3137
+ group: { "& + &": { mt: "1" } },
3138
+ groupLabel: {
3139
+ px: "3",
3140
+ pt: "2",
3141
+ pb: "1",
3142
+ textStyle: "small",
3143
+ color: "text-muted",
3144
+ userSelect: "none"
3145
+ },
3146
+ separator: {
3147
+ height: `${components.stroke.hairline}px`,
3148
+ my: "1",
3149
+ mx: "-1",
3150
+ bg: "divider"
3151
+ }
3152
+ },
3153
+ variants: { size: {
3154
+ sm: { trigger: {
3155
+ height: "control-sm",
3156
+ px: toPx(components.field.paddingXSm),
3157
+ textStyle: "small"
3158
+ } },
3159
+ md: { trigger: {
3160
+ height: "control-md",
3161
+ px: toPx(components.field.paddingXMd),
3162
+ textStyle: "body"
3163
+ } },
3164
+ lg: { trigger: {
3165
+ height: "control-lg",
3166
+ px: toPx(components.field.paddingXLg),
3167
+ textStyle: "body"
3168
+ } }
3169
+ } },
3170
+ defaultVariants: { size: "md" }
3171
+ });
3172
+ //#endregion
3173
+ //#region src/recipes/skeleton.ts
3174
+ const skeleton = defineRecipe({
3175
+ className: "koi-skeleton",
3176
+ base: {
3177
+ backgroundColor: "skeleton",
3178
+ backgroundImage: "linear-gradient(100deg, transparent 40%, token(colors.skeleton-highlight) 50%, transparent 60%)",
3179
+ backgroundSize: "200vw 100%",
3180
+ backgroundRepeat: "no-repeat",
3181
+ backgroundAttachment: "fixed",
3182
+ animationName: "koi-shimmer",
3183
+ animationDuration: "shimmer",
3184
+ animationTimingFunction: "linear",
3185
+ animationIterationCount: "infinite",
3186
+ color: "transparent",
3187
+ "& > *": { visibility: "hidden" },
3188
+ "@media (prefers-reduced-motion: reduce)": {
3189
+ animationName: "none",
3190
+ backgroundImage: "none"
3191
+ }
3192
+ }
3193
+ });
3194
+ //#endregion
3195
+ //#region src/recipes/spinner.ts
3196
+ const spinner = defineSlotRecipe({
3197
+ className: "koi-spinner",
3198
+ slots: ["root", "svg"],
3199
+ base: {
3200
+ root: {
3201
+ display: "inline-flex",
3202
+ flexShrink: "0",
3203
+ color: "inherit"
3204
+ },
3205
+ svg: {
3206
+ animationName: "koi-spin",
3207
+ animationDuration: "spin",
3208
+ animationTimingFunction: "linear",
3209
+ animationIterationCount: "infinite",
3210
+ "@media (prefers-reduced-motion: reduce)": { animationDuration: "spin-slow" }
3211
+ }
3212
+ }
3213
+ });
3214
+ //#endregion
3215
+ //#region src/recipes/switch.ts
3216
+ const switchRecipe = defineSlotRecipe({
3217
+ className: "koi-switch",
3218
+ slots: [
3219
+ "root",
3220
+ "control",
3221
+ "thumb",
3222
+ "label"
3223
+ ],
3224
+ base: {
3225
+ root: choiceRow.root,
3226
+ label: choiceRow.label,
3227
+ control: {
3228
+ position: "relative",
3229
+ flex: "none",
3230
+ boxSizing: "border-box",
3231
+ width: toPx(components.switch.trackWidth),
3232
+ height: toPx(components.switch.trackHeight),
3233
+ p: "0",
3234
+ borderWidth: "0",
3235
+ borderRadius: "full",
3236
+ appearance: "none",
3237
+ bg: "border-control",
3238
+ cursor: "pointer",
3239
+ transitionProperty: "background-color",
3240
+ transitionDuration: "fast",
3241
+ _focusVisible: focusRing,
3242
+ [`&${state.checked}`]: { bg: "control-checked" },
3243
+ [`&${state.disabled}`]: {
3244
+ opacity: "0.5",
3245
+ cursor: "not-allowed"
3246
+ }
3247
+ },
3248
+ thumb: {
3249
+ position: "absolute",
3250
+ top: toPx(components.switch.thumbInset),
3251
+ left: toPx(components.switch.thumbInset),
3252
+ width: toPx(components.switch.thumb),
3253
+ height: toPx(components.switch.thumb),
3254
+ borderRadius: "full",
3255
+ bg: "white",
3256
+ boxShadow: "raised",
3257
+ transition: "transform {durations.spring} {easings.spring}",
3258
+ [`&${state.checked}`]: { transform: `translateX(${components.switch.trackWidth - components.switch.thumb - 2 * components.switch.thumbInset}px)` }
3259
+ }
3260
+ }
3261
+ });
3262
+ //#endregion
3263
+ //#region src/recipes/table.ts
3264
+ const table = defineSlotRecipe({
3265
+ className: "koi-table",
3266
+ slots: [
3267
+ "container",
3268
+ "root",
3269
+ "header",
3270
+ "body",
3271
+ "footer",
3272
+ "row",
3273
+ "headerCell",
3274
+ "cell",
3275
+ "sortButton",
3276
+ "empty",
3277
+ "caption",
3278
+ "skeleton"
3279
+ ],
3280
+ base: {
3281
+ container: {
3282
+ width: "100%",
3283
+ overflowX: "auto"
3284
+ },
3285
+ root: {
3286
+ width: "100%",
3287
+ borderCollapse: "collapse",
3288
+ fontFamily: "sans",
3289
+ textStyle: "body",
3290
+ color: "text",
3291
+ fontVariantNumeric: "tabular-nums"
3292
+ },
3293
+ header: {},
3294
+ body: {},
3295
+ footer: {},
3296
+ row: {
3297
+ transitionProperty: "background-color",
3298
+ transitionDuration: "fast",
3299
+ "tbody > &": { height: toPx(components.table.rowHeight) },
3300
+ "tbody > &:hover": { bg: "table-row-hover" },
3301
+ "tbody > &[data-koi-selected]": { bg: "action-subtle" },
3302
+ "tbody > &[data-koi-selected]:hover": { bg: "action-subtle-hover" }
3303
+ },
3304
+ headerCell: {
3305
+ px: "4",
3306
+ py: "2",
3307
+ borderBottomWidth: `${components.stroke.hairline}px`,
3308
+ borderBottomStyle: "solid",
3309
+ borderBottomColor: "divider",
3310
+ textAlign: "start",
3311
+ verticalAlign: "middle",
3312
+ textStyle: "label",
3313
+ color: "text-muted",
3314
+ whiteSpace: "nowrap"
3315
+ },
3316
+ cell: {
3317
+ px: "4",
3318
+ py: "2",
3319
+ borderBottomWidth: `${components.stroke.hairline}px`,
3320
+ borderBottomStyle: "solid",
3321
+ borderBottomColor: "divider",
3322
+ textAlign: "start",
3323
+ verticalAlign: "middle",
3324
+ whiteSpace: "nowrap"
3325
+ },
3326
+ sortButton: {
3327
+ display: "inline-flex",
3328
+ alignItems: "center",
3329
+ gap: "1",
3330
+ m: "0",
3331
+ p: "0",
3332
+ borderWidth: "0",
3333
+ borderRadius: "sm",
3334
+ bg: "transparent",
3335
+ color: "inherit",
3336
+ font: "inherit",
3337
+ textAlign: "inherit",
3338
+ cursor: "pointer",
3339
+ transitionProperty: "color",
3340
+ transitionDuration: "fast",
3341
+ _hover: { color: "text" },
3342
+ _focusVisible: focusRing,
3343
+ "[aria-sort] > &": { color: "text" },
3344
+ "& > svg": {
3345
+ flex: "none",
3346
+ width: "icon-sm",
3347
+ height: "icon-sm",
3348
+ color: "text-muted"
3349
+ },
3350
+ "[aria-sort] > & > svg": { color: "text" }
3351
+ },
3352
+ empty: {
3353
+ py: "10",
3354
+ px: "4",
3355
+ textAlign: "center",
3356
+ color: "text-muted",
3357
+ whiteSpace: "normal"
3358
+ },
3359
+ caption: { srOnly: true },
3360
+ skeleton: {
3361
+ display: "inline-block",
3362
+ maxWidth: "100%",
3363
+ verticalAlign: "middle",
3364
+ borderRadius: "sm"
3365
+ }
3366
+ },
3367
+ variants: {
3368
+ layout: {
3369
+ auto: {},
3370
+ fixed: { root: {
3371
+ tableLayout: "fixed",
3372
+ "& :is(th, td)": {
3373
+ overflow: "hidden",
3374
+ textOverflow: "ellipsis"
3375
+ }
3376
+ } }
3377
+ },
3378
+ align: {
3379
+ start: {},
3380
+ center: {
3381
+ headerCell: { textAlign: "center" },
3382
+ cell: { textAlign: "center" }
3383
+ },
3384
+ end: {
3385
+ headerCell: { textAlign: "end" },
3386
+ cell: { textAlign: "end" }
3387
+ }
3388
+ },
3389
+ paddingBlock: {
3390
+ default: {},
3391
+ none: {
3392
+ headerCell: { py: "0" },
3393
+ cell: { py: "0" }
3394
+ }
3395
+ }
3396
+ },
3397
+ defaultVariants: {
3398
+ layout: "auto",
3399
+ align: "start",
3400
+ paddingBlock: "default"
3401
+ }
3402
+ });
3403
+ //#endregion
3404
+ //#region src/recipes/tabs.ts
3405
+ const tabs = defineSlotRecipe({
3406
+ className: "koi-tabs",
3407
+ slots: [
3408
+ "root",
3409
+ "list",
3410
+ "tab",
3411
+ "indicator",
3412
+ "panel"
3413
+ ],
3414
+ base: {
3415
+ root: {
3416
+ display: "flex",
3417
+ flexDirection: "column",
3418
+ gap: "4"
3419
+ },
3420
+ list: {
3421
+ position: "relative",
3422
+ isolation: "isolate",
3423
+ display: "inline-flex",
3424
+ alignSelf: "flex-start",
3425
+ gap: "1",
3426
+ p: "1",
3427
+ borderRadius: "full",
3428
+ bg: "surface-muted"
3429
+ },
3430
+ tab: {
3431
+ flex: "none",
3432
+ height: "control-md",
3433
+ px: "4",
3434
+ m: "0",
3435
+ borderWidth: "0",
3436
+ borderRadius: "full",
3437
+ bg: "transparent",
3438
+ fontFamily: "sans",
3439
+ textStyle: "body",
3440
+ fontWeight: "normal",
3441
+ whiteSpace: "nowrap",
3442
+ color: "text-muted",
3443
+ cursor: "pointer",
3444
+ userSelect: "none",
3445
+ transitionProperty: "color",
3446
+ transitionDuration: "fast",
3447
+ _focusVisible: focusRing,
3448
+ [`&${state.selected}:not(${state.disabled})`]: {
3449
+ color: "text",
3450
+ fontWeight: "bold"
3451
+ },
3452
+ [`&:hover:not(${state.selected}, ${state.disabled})`]: { color: "text" },
3453
+ [`&${state.disabled}`]: {
3454
+ color: "text-disabled",
3455
+ cursor: "not-allowed"
3456
+ }
3457
+ },
3458
+ indicator: {
3459
+ position: "absolute",
3460
+ zIndex: "-1",
3461
+ top: "0",
3462
+ left: "0",
3463
+ width: `[${vars.activeTabWidth}]`,
3464
+ height: `[${vars.activeTabHeight}]`,
3465
+ translate: `[${vars.activeTabLeft} ${vars.activeTabTop}]`,
3466
+ borderRadius: "full",
3467
+ bg: "surface",
3468
+ boxShadow: "raised",
3469
+ transitionProperty: "translate, width",
3470
+ transitionDuration: "spring",
3471
+ transitionTimingFunction: "spring"
3472
+ },
3473
+ panel: {
3474
+ textStyle: "body",
3475
+ borderRadius: "lg",
3476
+ _focusVisible: focusRing
3477
+ }
3478
+ },
3479
+ variants: { fullWidth: {
3480
+ true: {
3481
+ list: { alignSelf: "stretch" },
3482
+ tab: { flex: "1" }
3483
+ },
3484
+ false: {}
3485
+ } },
3486
+ defaultVariants: { fullWidth: false }
3487
+ });
3488
+ //#endregion
3489
+ //#region src/recipes/tag.ts
3490
+ const TOGGLE = "> button[aria-pressed]";
3491
+ const tag = defineSlotRecipe({
3492
+ className: "koi-tag",
3493
+ slots: [
3494
+ "root",
3495
+ "toggle",
3496
+ "icon",
3497
+ "label",
3498
+ "remove"
3499
+ ],
3500
+ base: {
3501
+ root: {
3502
+ position: "relative",
3503
+ display: "inline-flex",
3504
+ alignItems: "center",
3505
+ gap: "1",
3506
+ height: "control-sm",
3507
+ px: toPx(components.tag.paddingX),
3508
+ boxSizing: "border-box",
3509
+ borderWidth: `${components.stroke.hairline}px`,
3510
+ borderStyle: "solid",
3511
+ borderRadius: "full",
3512
+ fontFamily: "sans",
3513
+ textStyle: "small",
3514
+ whiteSpace: "nowrap",
3515
+ transitionProperty: "background-color, color, border-color",
3516
+ transitionDuration: "fast",
3517
+ [`&:has(${TOGGLE}:focus-visible)`]: focusRing
3518
+ },
3519
+ toggle: {
3520
+ display: "inline-flex",
3521
+ alignItems: "center",
3522
+ gap: "1",
3523
+ p: "0",
3524
+ borderWidth: "0",
3525
+ bg: "transparent",
3526
+ color: "inherit",
3527
+ font: "inherit",
3528
+ cursor: "pointer",
3529
+ userSelect: "none",
3530
+ outline: "none",
3531
+ _before: {
3532
+ content: "\"\"",
3533
+ position: "absolute",
3534
+ inset: "[-1px]",
3535
+ borderRadius: "full"
3536
+ }
3537
+ },
3538
+ icon: {
3539
+ display: "inline-flex",
3540
+ flexShrink: "0",
3541
+ "& > svg": {
3542
+ width: "icon-sm",
3543
+ height: "icon-sm"
3544
+ }
3545
+ },
3546
+ label: {},
3547
+ remove: {
3548
+ position: "relative",
3549
+ zIndex: "1",
3550
+ flexShrink: "0",
3551
+ display: "inline-flex",
3552
+ alignItems: "center",
3553
+ justifyContent: "center",
3554
+ width: toPx(components.tag.remove),
3555
+ height: toPx(components.tag.remove),
3556
+ me: toPx(-components.tag.removeOverhang),
3557
+ p: "0",
3558
+ borderWidth: "0",
3559
+ borderRadius: "full",
3560
+ bg: "transparent",
3561
+ color: "text-muted",
3562
+ cursor: "pointer",
3563
+ transitionProperty: "background-color, color",
3564
+ transitionDuration: "fast",
3565
+ _after: {
3566
+ content: "\"\"",
3567
+ position: "absolute",
3568
+ inset: "[-4px]",
3569
+ borderRadius: "full"
3570
+ },
3571
+ _hover: {
3572
+ bg: "surface-muted",
3573
+ color: "text"
3574
+ },
3575
+ _focusVisible: focusRing,
3576
+ "& > svg": {
3577
+ width: "icon-sm",
3578
+ height: "icon-sm"
3579
+ }
3580
+ }
3581
+ },
3582
+ variants: { selected: {
3583
+ false: { root: {
3584
+ bg: "surface",
3585
+ borderColor: "border",
3586
+ color: "text",
3587
+ [`&:has(${TOGGLE}:hover)`]: { bg: "surface-muted" }
3588
+ } },
3589
+ true: {
3590
+ root: {
3591
+ bg: "action-subtle",
3592
+ borderColor: "transparent",
3593
+ color: "on-action-subtle",
3594
+ [`&:has(${TOGGLE}:hover)`]: { bg: "action-subtle-hover" }
3595
+ },
3596
+ remove: {
3597
+ color: "on-action-subtle",
3598
+ _hover: {
3599
+ bg: "action-subtle-hover",
3600
+ color: "on-action-subtle"
3601
+ }
3602
+ }
3603
+ }
3604
+ } },
3605
+ defaultVariants: { selected: false }
3606
+ });
3607
+ //#endregion
3608
+ //#region src/recipes/textarea.ts
3609
+ const textarea = defineRecipe({
3610
+ className: "koi-textarea",
3611
+ base: {
3612
+ display: "block",
3613
+ width: "100%",
3614
+ boxSizing: "border-box",
3615
+ minHeight: toPx(components.textarea.minHeight),
3616
+ m: "0",
3617
+ py: "2",
3618
+ px: "3",
3619
+ resize: "vertical",
3620
+ bg: "surface",
3621
+ color: "text",
3622
+ borderWidth: `${components.stroke.hairline}px`,
3623
+ borderStyle: "solid",
3624
+ borderColor: "border-control",
3625
+ borderRadius: "xl",
3626
+ outline: "none",
3627
+ fontFamily: "sans",
3628
+ textStyle: "body",
3629
+ transitionProperty: "border-color, box-shadow",
3630
+ transitionDuration: "fast",
3631
+ _placeholder: { color: "text-muted" },
3632
+ "&:hover:not(:focus, :disabled, [aria-invalid=true])": { borderColor: "border-control-hover" },
3633
+ "&:focus": {
3634
+ borderColor: "focus-ring",
3635
+ boxShadow: `0 0 0 ${components.stroke.hairline}px {colors.focus-ring}`
3636
+ },
3637
+ "&[aria-invalid=true]": { borderColor: "error-control" },
3638
+ "&[aria-invalid=true]:focus": {
3639
+ borderColor: "error-control",
3640
+ boxShadow: `0 0 0 ${components.stroke.hairline}px {colors.error-control}`
3641
+ },
3642
+ "&:disabled": {
3643
+ bg: "surface-muted",
3644
+ color: "text-disabled",
3645
+ borderColor: "border",
3646
+ cursor: "not-allowed",
3647
+ "&::placeholder": { color: "text-disabled" }
3648
+ }
3649
+ }
3650
+ });
3651
+ //#endregion
3652
+ //#region src/recipes/toast.ts
3653
+ const shift = `calc(${vars.toastOffsetY} + ${vars.toastIndex} * token(spacing.2))`;
3654
+ const swipeX = vars.toastSwipeX;
3655
+ const swipeY = vars.toastSwipeY;
3656
+ function stacked(edge) {
3657
+ const y = `calc(${swipeY} ${edge === "bottom" ? "-" : "+"} var(--koi-toast-shift))`;
3658
+ return defineStyles({
3659
+ position: "absolute",
3660
+ ...edge === "bottom" ? { bottom: "0" } : { top: "0" },
3661
+ insetInline: "0",
3662
+ width: "100%",
3663
+ maxWidth: "none",
3664
+ userSelect: "none",
3665
+ "--koi-toast-shift": shift,
3666
+ transform: `translateX(${swipeX}) translateY(${y})`,
3667
+ [`&${state.entering}`]: {
3668
+ opacity: "0",
3669
+ transform: `translateY(${edge === "bottom" ? "" : "-"}${components.toast.enterOffset}px) scale(.96)`
3670
+ },
3671
+ [`&${state.exiting}`]: {
3672
+ opacity: "0",
3673
+ transform: `translateY(${y}) scale(.96)`
3674
+ },
3675
+ [`&${state.exiting}${state.swiped.left}`]: { transform: `translateX(calc(${swipeX} - 150%)) translateY(${y})` },
3676
+ [`&${state.exiting}${state.swiped.right}`]: { transform: `translateX(calc(${swipeX} + 150%)) translateY(${y})` },
3677
+ [`&${state.exiting}${state.swiped.up}`]: { transform: `translateY(calc(${y} - 150%))` },
3678
+ [`&${state.exiting}${state.swiped.down}`]: { transform: `translateY(calc(${y} + 150%))` }
3679
+ });
3680
+ }
3681
+ const toast = defineSlotRecipe({
3682
+ className: "koi-toast",
3683
+ slots: [
3684
+ "viewport",
3685
+ "root",
3686
+ "icon",
3687
+ "content",
3688
+ "title",
3689
+ "description",
3690
+ "action",
3691
+ "close"
3692
+ ],
3693
+ base: {
3694
+ viewport: {
3695
+ position: "fixed",
3696
+ zIndex: "toast",
3697
+ insetInline: "0",
3698
+ mx: "auto",
3699
+ width: toPx(components.toast.width),
3700
+ maxWidth: `calc(100vw - ${2 * space[4]}px)`,
3701
+ outline: "none"
3702
+ },
3703
+ root: {
3704
+ position: "relative",
3705
+ display: "flex",
3706
+ alignItems: "flex-start",
3707
+ gap: "3",
3708
+ boxSizing: "border-box",
3709
+ width: toPx(components.toast.width),
3710
+ maxWidth: `calc(100vw - ${2 * space[4]}px)`,
3711
+ p: "4",
3712
+ bg: "surface-glass-tint",
3713
+ backdropFilter: "blur(var(--blurs-float))",
3714
+ borderRadius: "panel",
3715
+ boxShadow: "float",
3716
+ color: "text",
3717
+ fontFamily: "sans",
3718
+ textStyle: "body",
3719
+ transition: "opacity token(durations.overlay) token(easings.out), transform token(durations.spring) token(easings.spring)",
3720
+ _focusVisible: focusRing,
3721
+ [`&${state.exiting}`]: {
3722
+ transitionDuration: "overlay",
3723
+ transitionTimingFunction: "out"
3724
+ }
3725
+ },
3726
+ icon: {
3727
+ flex: "none",
3728
+ display: "inline-flex",
3729
+ mt: toPx(components.toast.iconOffset),
3730
+ "& > svg": {
3731
+ width: "icon-lg",
3732
+ height: "icon-lg"
3733
+ }
3734
+ },
3735
+ content: {
3736
+ flex: "1",
3737
+ minWidth: "0",
3738
+ display: "flex",
3739
+ flexDirection: "column",
3740
+ gap: "1"
3741
+ },
3742
+ title: {
3743
+ m: "0",
3744
+ textStyle: "heading-3"
3745
+ },
3746
+ description: {
3747
+ m: "0",
3748
+ textStyle: "body",
3749
+ color: "text-muted"
3750
+ },
3751
+ action: {
3752
+ flex: "none",
3753
+ display: "flex",
3754
+ alignSelf: "center",
3755
+ gap: "2"
3756
+ },
3757
+ close: {
3758
+ position: "absolute",
3759
+ top: "4",
3760
+ insetInlineEnd: "3",
3761
+ display: "inline-flex",
3762
+ alignItems: "center",
3763
+ justifyContent: "center",
3764
+ width: toPx(components.closeButton.size),
3765
+ height: toPx(components.closeButton.size),
3766
+ p: "0",
3767
+ borderWidth: "0",
3768
+ borderRadius: "full",
3769
+ bg: "transparent",
3770
+ color: "inherit",
3771
+ cursor: "pointer",
3772
+ transitionProperty: "background-color",
3773
+ transitionDuration: "fast",
3774
+ _hover: { bg: "divider" },
3775
+ _focusVisible: focusRing,
3776
+ "& > svg": {
3777
+ width: "icon",
3778
+ height: "icon"
3779
+ }
3780
+ }
3781
+ },
3782
+ variants: {
3783
+ tone: {
3784
+ info: { icon: { color: "text-brand" } },
3785
+ success: { icon: { color: "text-brand" } },
3786
+ warning: { icon: { color: "warning-text" } },
3787
+ error: { icon: { color: "error-text" } }
3788
+ },
3789
+ closable: {
3790
+ true: { root: { pe: toPx(components.toast.closableInset) } },
3791
+ false: {}
3792
+ },
3793
+ position: {
3794
+ static: {},
3795
+ bottom: {
3796
+ viewport: { bottom: "4" },
3797
+ root: stacked("bottom")
3798
+ },
3799
+ top: {
3800
+ viewport: { top: "4" },
3801
+ root: stacked("top")
3802
+ }
3803
+ }
3804
+ },
3805
+ defaultVariants: {
3806
+ tone: "info",
3807
+ closable: false,
3808
+ position: "static"
3809
+ }
3810
+ });
3811
+ //#endregion
3812
+ //#region src/recipes/tooltip.ts
3813
+ const tooltip = defineSlotRecipe({
3814
+ className: "koi-tooltip",
3815
+ slots: ["positioner", "popup"],
3816
+ base: {
3817
+ positioner: { zIndex: "tooltip" },
3818
+ popup: {
3819
+ boxSizing: "border-box",
3820
+ width: "max-content",
3821
+ maxWidth: toPx(components.tooltip.maxWidth),
3822
+ px: "2",
3823
+ py: "1",
3824
+ borderRadius: "lg",
3825
+ bg: "tooltip-bg",
3826
+ color: "tooltip-text",
3827
+ fontFamily: "sans",
3828
+ textStyle: "small",
3829
+ overflowWrap: "break-word",
3830
+ outline: "none",
3831
+ transitionProperty: "opacity",
3832
+ transitionDuration: "fast",
3833
+ transitionTimingFunction: "out",
3834
+ [`&${state.entering}, &${state.exiting}`]: { opacity: "0" },
3835
+ [`&${state.instantClose}`]: { transitionDuration: "0s" }
3836
+ }
3837
+ }
3838
+ });
3839
+ //#endregion
3840
+ //#region src/recipes/index.ts
3841
+ const recipes = {
3842
+ button,
3843
+ chatBubble,
3844
+ prose,
3845
+ separator,
3846
+ skeleton,
3847
+ textarea
3848
+ };
3849
+ const slotRecipes = {
3850
+ alert,
3851
+ avatar,
3852
+ badge,
3853
+ card,
3854
+ checkbox,
3855
+ dialog,
3856
+ field,
3857
+ input,
3858
+ link,
3859
+ pagination,
3860
+ progress,
3861
+ radioGroup,
3862
+ select,
3863
+ selectPanel,
3864
+ spinner,
3865
+ switchRecipe,
3866
+ table,
3867
+ tabs,
3868
+ tag,
3869
+ toast,
3870
+ tooltip
3871
+ };
3872
+ //#endregion
3873
+ //#region panda.base.ts
3874
+ function koiPandaConfig(options) {
3875
+ return defineConfig({
3876
+ presets: ["@pandacss/preset-base", koiPreset],
3877
+ include: options.include,
3878
+ exclude: [],
3879
+ outdir: options.outdir,
3880
+ importMap: "@tuuject/koi-react/styled-system",
3881
+ jsxFramework: "react",
3882
+ jsxStyleProps: "none",
3883
+ preflight: true,
3884
+ strictTokens: false,
3885
+ theme: { extend: {
3886
+ recipes,
3887
+ slotRecipes,
3888
+ breakpoints: { md: "768px" }
3889
+ } },
3890
+ staticCss: { recipes: "*" },
3891
+ globalCss
3892
+ });
3893
+ }
3894
+ //#endregion
3895
+ //#region \0panda-lib-preset-entry
3896
+ const __panda_lib_resolved = await defineConfig(koiPandaConfig({
3897
+ include: ["./src/**/*.{ts,tsx}"],
3898
+ outdir: "styled-system"
3899
+ }));
3900
+ if (!((value) => {
3901
+ if (!value || typeof value !== "object" || Array.isArray(value)) return false;
3902
+ const proto = Object.getPrototypeOf(value);
3903
+ return proto === Object.prototype || proto === null;
3904
+ })(__panda_lib_resolved)) throw new Error("Config must export or return an object.");
3905
+ const { designSystem, include, exclude, outdir, cwd, watch, clean, gitignore, importMap, ...preset } = __panda_lib_resolved;
3906
+ //#endregion
3907
+ export { preset as default };