@accelint/design-system 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/dist/assets/components/button/button.css +55 -0
  2. package/dist/assets/components/checkbox/checkbox.css +73 -0
  3. package/dist/assets/components/chip/chip.css +62 -0
  4. package/dist/assets/components/combo-box/combo-box.css +66 -0
  5. package/dist/assets/components/dialog/dialog.css +51 -0
  6. package/dist/assets/components/drawer/drawer.css +135 -0
  7. package/dist/assets/components/group/group.css +33 -0
  8. package/dist/assets/components/icon/icon.css +19 -0
  9. package/dist/assets/components/input/input.css +29 -0
  10. package/dist/assets/components/menu/menu.css +83 -0
  11. package/dist/assets/components/options/options.css +80 -0
  12. package/dist/assets/components/picker/picker.css +47 -0
  13. package/dist/assets/components/popover/popover.css +26 -0
  14. package/dist/assets/components/query-builder/query-builder.css +129 -0
  15. package/dist/assets/components/radio/radio.css +67 -0
  16. package/dist/assets/components/search-field/search-field.css +62 -0
  17. package/dist/assets/components/select/select.css +33 -0
  18. package/dist/assets/components/switch/switch.css +62 -0
  19. package/dist/assets/components/tabs/tabs.css +144 -0
  20. package/dist/assets/components/textarea/textarea.css +32 -0
  21. package/dist/assets/components/tooltip/tooltip.css +54 -0
  22. package/dist/assets/components/tree/tree.css +157 -0
  23. package/dist/assets/hooks/use-theme/use-theme.css +6 -0
  24. package/dist/assets/src/components/button/button.css.ts.vanilla-9uttMYGm.css +55 -0
  25. package/dist/assets/src/components/checkbox/checkbox.css.ts.vanilla-Bewmypyn.css +73 -0
  26. package/dist/assets/src/components/chip/chip.css.ts.vanilla-CsGhxrlu.css +62 -0
  27. package/dist/assets/src/components/combo-box/combo-box.css.ts.vanilla-BNEPKjPm.css +66 -0
  28. package/dist/assets/src/components/dialog/dialog.css.ts.vanilla-CG0m-NJD.css +51 -0
  29. package/dist/assets/src/components/drawer/drawer.css.ts.vanilla-DEfHnoNS.css +135 -0
  30. package/dist/assets/src/components/group/group.css.ts.vanilla-DR69xgQy.css +33 -0
  31. package/dist/assets/src/components/icon/icon.css.ts.vanilla-CoUAfp2F.css +19 -0
  32. package/dist/assets/src/components/input/input.css.ts.vanilla-DoK5h9SX.css +29 -0
  33. package/dist/assets/src/components/menu/menu.css.ts.vanilla-CSnDqc5E.css +83 -0
  34. package/dist/assets/src/components/options/options.css.ts.vanilla-ngVt12W4.css +80 -0
  35. package/dist/assets/src/components/picker/picker.css.ts.vanilla-Fe0YXv-c.css +47 -0
  36. package/dist/assets/src/components/popover/popover.css.ts.vanilla-C5YGwwVD.css +26 -0
  37. package/dist/assets/src/components/query-builder/query-builder.css.ts.vanilla-B3P9cbCv.css +129 -0
  38. package/dist/assets/src/components/radio/radio.css.ts.vanilla-gi-KedQc.css +67 -0
  39. package/dist/assets/src/components/search-field/search-field.css.ts.vanilla-B_JL53f8.css +62 -0
  40. package/dist/assets/src/components/select/select.css.ts.vanilla-C94A60jf.css +33 -0
  41. package/dist/assets/src/components/switch/switch.css.ts.vanilla-DkQwtRa6.css +62 -0
  42. package/dist/assets/src/components/tabs/tabs.css.ts.vanilla-BygIflpl.css +144 -0
  43. package/dist/assets/src/components/textarea/textarea.css.ts.vanilla-Ba6E5HFc.css +32 -0
  44. package/dist/assets/src/components/tooltip/tooltip.css.ts.vanilla-BntxAlwN.css +54 -0
  45. package/dist/assets/src/components/tree/tree.css.ts.vanilla-SLmhk0zZ.css +157 -0
  46. package/dist/assets/src/hooks/use-theme/use-theme.css.ts.vanilla-zkVHnGkP.css +6 -0
  47. package/dist/assets/src/styles/layers.css.ts.vanilla-B2GUgnOF.css +21 -0
  48. package/dist/assets/src/styles/reset.css.ts.vanilla-C8PShXm0.css +31 -0
  49. package/dist/assets/src/styles/space.css.ts.vanilla-Md6Whc4G.css +18 -0
  50. package/dist/assets/src/styles/surfaces.css.ts.vanilla-Ckztx7VT.css +24 -0
  51. package/dist/assets/src/styles/theme.css.ts.vanilla-aDPSIzBK.css +208 -0
  52. package/dist/assets/src/styles/typography.css.ts.vanilla-DRT9H7rd.css +150 -0
  53. package/dist/assets/styles/layers.css +21 -0
  54. package/dist/assets/styles/reset.css +31 -0
  55. package/dist/assets/styles/space.css +18 -0
  56. package/dist/assets/styles/surfaces.css +24 -0
  57. package/dist/assets/styles/theme.css +208 -0
  58. package/dist/assets/styles/typography.css +150 -0
  59. package/dist/components/aria/aria.d.ts +19 -0
  60. package/dist/components/aria/aria.js +36 -0
  61. package/dist/components/aria/aria.js.map +1 -0
  62. package/dist/components/aria/index.d.ts +1 -0
  63. package/dist/components/button/button.css.d.ts +33 -0
  64. package/dist/components/button/button.d.ts +39 -0
  65. package/dist/components/button/button.js +71 -0
  66. package/dist/components/button/button.js.map +1 -0
  67. package/dist/components/button/button.vanilla.js +8 -0
  68. package/dist/components/button/button.vanilla.js.map +1 -0
  69. package/dist/components/button/index.d.ts +3 -0
  70. package/dist/components/button/types.d.ts +28 -0
  71. package/dist/components/checkbox/checkbox.css.d.ts +35 -0
  72. package/dist/components/checkbox/checkbox.d.ts +21 -0
  73. package/dist/components/checkbox/checkbox.js +68 -0
  74. package/dist/components/checkbox/checkbox.js.map +1 -0
  75. package/dist/components/checkbox/checkbox.vanilla.js +9 -0
  76. package/dist/components/checkbox/checkbox.vanilla.js.map +1 -0
  77. package/dist/components/checkbox/index.d.ts +3 -0
  78. package/dist/components/checkbox/types.d.ts +38 -0
  79. package/dist/components/chip/chip.css.d.ts +31 -0
  80. package/dist/components/chip/chip.d.ts +30 -0
  81. package/dist/components/chip/chip.js +106 -0
  82. package/dist/components/chip/chip.js.map +1 -0
  83. package/dist/components/chip/chip.vanilla.js +8 -0
  84. package/dist/components/chip/chip.vanilla.js.map +1 -0
  85. package/dist/components/chip/index.d.ts +3 -0
  86. package/dist/components/chip/types.d.ts +31 -0
  87. package/dist/components/collection/collection.d.ts +13 -0
  88. package/dist/components/collection/collection.js +15 -0
  89. package/dist/components/collection/collection.js.map +1 -0
  90. package/dist/components/collection/index.d.ts +1 -0
  91. package/dist/components/combo-box/combo-box.css.d.ts +22 -0
  92. package/dist/components/combo-box/combo-box.d.ts +8 -0
  93. package/dist/components/combo-box/combo-box.js +87 -0
  94. package/dist/components/combo-box/combo-box.js.map +1 -0
  95. package/dist/components/combo-box/combo-box.vanilla.js +8 -0
  96. package/dist/components/combo-box/combo-box.vanilla.js.map +1 -0
  97. package/dist/components/combo-box/index.d.ts +3 -0
  98. package/dist/components/combo-box/types.d.ts +32 -0
  99. package/dist/components/dialog/dialog.css.d.ts +34 -0
  100. package/dist/components/dialog/dialog.d.ts +18 -0
  101. package/dist/components/dialog/dialog.js +146 -0
  102. package/dist/components/dialog/dialog.js.map +1 -0
  103. package/dist/components/dialog/dialog.vanilla.js +8 -0
  104. package/dist/components/dialog/dialog.vanilla.js.map +1 -0
  105. package/dist/components/dialog/index.d.ts +3 -0
  106. package/dist/components/dialog/types.d.ts +48 -0
  107. package/dist/components/drawer/drawer.css.d.ts +33 -0
  108. package/dist/components/drawer/drawer.d.ts +13 -0
  109. package/dist/components/drawer/drawer.js +199 -0
  110. package/dist/components/drawer/drawer.js.map +1 -0
  111. package/dist/components/drawer/drawer.vanilla.js +10 -0
  112. package/dist/components/drawer/drawer.vanilla.js.map +1 -0
  113. package/dist/components/drawer/index.d.ts +3 -0
  114. package/dist/components/drawer/types.d.ts +71 -0
  115. package/dist/components/element/element.d.ts +11 -0
  116. package/dist/components/element/element.js +21 -0
  117. package/dist/components/element/element.js.map +1 -0
  118. package/dist/components/element/index.d.ts +2 -0
  119. package/dist/components/element/types.d.ts +21 -0
  120. package/dist/components/group/group.css.d.ts +14 -0
  121. package/dist/components/group/group.d.ts +10 -0
  122. package/dist/components/group/group.js +44 -0
  123. package/dist/components/group/group.js.map +1 -0
  124. package/dist/components/group/group.vanilla.js +7 -0
  125. package/dist/components/group/group.vanilla.js.map +1 -0
  126. package/dist/components/group/index.d.ts +3 -0
  127. package/dist/components/group/types.d.ts +35 -0
  128. package/dist/components/icon/icon.css.d.ts +18 -0
  129. package/dist/components/icon/icon.d.ts +12 -0
  130. package/dist/components/icon/icon.js +26 -0
  131. package/dist/components/icon/icon.js.map +1 -0
  132. package/dist/components/icon/icon.vanilla.js +8 -0
  133. package/dist/components/icon/icon.vanilla.js.map +1 -0
  134. package/dist/components/icon/index.d.ts +3 -0
  135. package/dist/components/icon/types.d.ts +13 -0
  136. package/dist/components/index.d.ts +26 -0
  137. package/dist/components/input/index.d.ts +3 -0
  138. package/dist/components/input/input.css.d.ts +29 -0
  139. package/dist/components/input/input.d.ts +8 -0
  140. package/dist/components/input/input.js +93 -0
  141. package/dist/components/input/input.js.map +1 -0
  142. package/dist/components/input/input.vanilla.js +8 -0
  143. package/dist/components/input/input.vanilla.js.map +1 -0
  144. package/dist/components/input/types.d.ts +44 -0
  145. package/dist/components/menu/index.d.ts +3 -0
  146. package/dist/components/menu/menu.css.d.ts +71 -0
  147. package/dist/components/menu/menu.d.ts +24 -0
  148. package/dist/components/menu/menu.js +155 -0
  149. package/dist/components/menu/menu.js.map +1 -0
  150. package/dist/components/menu/menu.vanilla.js +8 -0
  151. package/dist/components/menu/menu.vanilla.js.map +1 -0
  152. package/dist/components/menu/types.d.ts +48 -0
  153. package/dist/components/merge-provider/index.d.ts +2 -0
  154. package/dist/components/merge-provider/merge-provider.d.ts +14 -0
  155. package/dist/components/merge-provider/merge-provider.js +40 -0
  156. package/dist/components/merge-provider/merge-provider.js.map +1 -0
  157. package/dist/components/merge-provider/types.d.ts +5 -0
  158. package/dist/components/options/index.d.ts +3 -0
  159. package/dist/components/options/options.css.d.ts +75 -0
  160. package/dist/components/options/options.d.ts +20 -0
  161. package/dist/components/options/options.js +152 -0
  162. package/dist/components/options/options.js.map +1 -0
  163. package/dist/components/options/options.vanilla.js +10 -0
  164. package/dist/components/options/options.vanilla.js.map +1 -0
  165. package/dist/components/options/types.d.ts +49 -0
  166. package/dist/components/picker/index.d.ts +3 -0
  167. package/dist/components/picker/picker.css.d.ts +32 -0
  168. package/dist/components/picker/picker.d.ts +18 -0
  169. package/dist/components/picker/picker.js +46 -0
  170. package/dist/components/picker/picker.js.map +1 -0
  171. package/dist/components/picker/picker.stories.css.d.ts +3 -0
  172. package/dist/components/picker/picker.vanilla.js +9 -0
  173. package/dist/components/picker/picker.vanilla.js.map +1 -0
  174. package/dist/components/picker/types.d.ts +28 -0
  175. package/dist/components/popover/index.d.ts +3 -0
  176. package/dist/components/popover/popover.css.d.ts +31 -0
  177. package/dist/components/popover/popover.d.ts +8 -0
  178. package/dist/components/popover/popover.js +110 -0
  179. package/dist/components/popover/popover.js.map +1 -0
  180. package/dist/components/popover/popover.vanilla.js +7 -0
  181. package/dist/components/popover/popover.vanilla.js.map +1 -0
  182. package/dist/components/popover/types.d.ts +32 -0
  183. package/dist/components/query-builder/action-element.d.ts +2 -0
  184. package/dist/components/query-builder/action-element.js +12 -0
  185. package/dist/components/query-builder/action-element.js.map +1 -0
  186. package/dist/components/query-builder/constants.d.ts +4 -0
  187. package/dist/components/query-builder/constants.js +20 -0
  188. package/dist/components/query-builder/constants.js.map +1 -0
  189. package/dist/components/query-builder/dataset-sample.d.ts +91 -0
  190. package/dist/components/query-builder/group.d.ts +5 -0
  191. package/dist/components/query-builder/group.js +87 -0
  192. package/dist/components/query-builder/group.js.map +1 -0
  193. package/dist/components/query-builder/index.d.ts +5 -0
  194. package/dist/components/query-builder/query-builder.css.d.ts +91 -0
  195. package/dist/components/query-builder/query-builder.d.ts +2 -0
  196. package/dist/components/query-builder/query-builder.js +129 -0
  197. package/dist/components/query-builder/query-builder.js.map +1 -0
  198. package/dist/components/query-builder/query-builder.vanilla.js +10 -0
  199. package/dist/components/query-builder/query-builder.vanilla.js.map +1 -0
  200. package/dist/components/query-builder/rule.d.ts +3 -0
  201. package/dist/components/query-builder/rule.js +112 -0
  202. package/dist/components/query-builder/rule.js.map +1 -0
  203. package/dist/components/query-builder/types.d.ts +128 -0
  204. package/dist/components/query-builder/utils.d.ts +29 -0
  205. package/dist/components/query-builder/utils.js +22 -0
  206. package/dist/components/query-builder/utils.js.map +1 -0
  207. package/dist/components/query-builder/value-editor.d.ts +4 -0
  208. package/dist/components/query-builder/value-editor.js +74 -0
  209. package/dist/components/query-builder/value-editor.js.map +1 -0
  210. package/dist/components/query-builder/value-selector.d.ts +2 -0
  211. package/dist/components/query-builder/value-selector.js +28 -0
  212. package/dist/components/query-builder/value-selector.js.map +1 -0
  213. package/dist/components/radio/index.d.ts +3 -0
  214. package/dist/components/radio/radio.css.d.ts +34 -0
  215. package/dist/components/radio/radio.d.ts +16 -0
  216. package/dist/components/radio/radio.js +63 -0
  217. package/dist/components/radio/radio.js.map +1 -0
  218. package/dist/components/radio/radio.vanilla.js +8 -0
  219. package/dist/components/radio/radio.vanilla.js.map +1 -0
  220. package/dist/components/radio/types.d.ts +29 -0
  221. package/dist/components/search-field/index.d.ts +3 -0
  222. package/dist/components/search-field/search-field.css.d.ts +16 -0
  223. package/dist/components/search-field/search-field.d.ts +9 -0
  224. package/dist/components/search-field/search-field.js +60 -0
  225. package/dist/components/search-field/search-field.js.map +1 -0
  226. package/dist/components/search-field/search-field.vanilla.js +7 -0
  227. package/dist/components/search-field/search-field.vanilla.js.map +1 -0
  228. package/dist/components/search-field/types.d.ts +29 -0
  229. package/dist/components/select/index.d.ts +3 -0
  230. package/dist/components/select/select.css.d.ts +25 -0
  231. package/dist/components/select/select.d.ts +8 -0
  232. package/dist/components/select/select.js +80 -0
  233. package/dist/components/select/select.js.map +1 -0
  234. package/dist/components/select/select.vanilla.js +8 -0
  235. package/dist/components/select/select.vanilla.js.map +1 -0
  236. package/dist/components/select/types.d.ts +30 -0
  237. package/dist/components/switch/index.d.ts +3 -0
  238. package/dist/components/switch/switch.css.d.ts +25 -0
  239. package/dist/components/switch/switch.d.ts +4 -0
  240. package/dist/components/switch/switch.js +34 -0
  241. package/dist/components/switch/switch.js.map +1 -0
  242. package/dist/components/switch/switch.vanilla.js +8 -0
  243. package/dist/components/switch/switch.vanilla.js.map +1 -0
  244. package/dist/components/switch/types.d.ts +17 -0
  245. package/dist/components/tabs/index.d.ts +3 -0
  246. package/dist/components/tabs/tabs.css.d.ts +49 -0
  247. package/dist/components/tabs/tabs.d.ts +68 -0
  248. package/dist/components/tabs/tabs.js +108 -0
  249. package/dist/components/tabs/tabs.js.map +1 -0
  250. package/dist/components/tabs/tabs.vanilla.js +11 -0
  251. package/dist/components/tabs/tabs.vanilla.js.map +1 -0
  252. package/dist/components/tabs/types.d.ts +82 -0
  253. package/dist/components/textarea/index.d.ts +3 -0
  254. package/dist/components/textarea/textarea.css.d.ts +31 -0
  255. package/dist/components/textarea/textarea.d.ts +14 -0
  256. package/dist/components/textarea/textarea.js +86 -0
  257. package/dist/components/textarea/textarea.js.map +1 -0
  258. package/dist/components/textarea/textarea.vanilla.js +8 -0
  259. package/dist/components/textarea/textarea.vanilla.js.map +1 -0
  260. package/dist/components/textarea/types.d.ts +39 -0
  261. package/dist/components/tooltip/index.d.ts +3 -0
  262. package/dist/components/tooltip/tooltip.css.d.ts +23 -0
  263. package/dist/components/tooltip/tooltip.d.ts +23 -0
  264. package/dist/components/tooltip/tooltip.js +69 -0
  265. package/dist/components/tooltip/tooltip.js.map +1 -0
  266. package/dist/components/tooltip/tooltip.vanilla.js +8 -0
  267. package/dist/components/tooltip/tooltip.vanilla.js.map +1 -0
  268. package/dist/components/tooltip/types.d.ts +39 -0
  269. package/dist/components/tree/index.d.ts +3 -0
  270. package/dist/components/tree/tree.css.d.ts +73 -0
  271. package/dist/components/tree/tree.d.ts +5 -0
  272. package/dist/components/tree/tree.js +337 -0
  273. package/dist/components/tree/tree.js.map +1 -0
  274. package/dist/components/tree/tree.vanilla.js +11 -0
  275. package/dist/components/tree/tree.vanilla.js.map +1 -0
  276. package/dist/components/tree/types.d.ts +114 -0
  277. package/dist/components/tree/utils.d.ts +8 -0
  278. package/dist/components/tree/utils.js +75 -0
  279. package/dist/components/tree/utils.js.map +1 -0
  280. package/dist/hooks/index.d.ts +8 -0
  281. package/dist/hooks/use-collection-render/index.d.ts +1 -0
  282. package/dist/hooks/use-collection-render/use-collection-render.d.ts +9 -0
  283. package/dist/hooks/use-collection-render/use-collection-render.js +20 -0
  284. package/dist/hooks/use-collection-render/use-collection-render.js.map +1 -0
  285. package/dist/hooks/use-context-props/index.d.ts +1 -0
  286. package/dist/hooks/use-context-props/use-context-props.d.ts +7 -0
  287. package/dist/hooks/use-context-props/use-context-props.js +15 -0
  288. package/dist/hooks/use-context-props/use-context-props.js.map +1 -0
  289. package/dist/hooks/use-defaults/index.d.ts +2 -0
  290. package/dist/hooks/use-defaults/types.d.ts +67 -0
  291. package/dist/hooks/use-defaults/use-defaults.d.ts +56 -0
  292. package/dist/hooks/use-defaults/use-defaults.js +21 -0
  293. package/dist/hooks/use-defaults/use-defaults.js.map +1 -0
  294. package/dist/hooks/use-propagating-press/index.d.ts +1 -0
  295. package/dist/hooks/use-propagating-press/use-propagating-press.d.ts +9 -0
  296. package/dist/hooks/use-propagating-press/use-propagating-press.js +14 -0
  297. package/dist/hooks/use-propagating-press/use-propagating-press.js.map +1 -0
  298. package/dist/hooks/use-slot/index.d.ts +1 -0
  299. package/dist/hooks/use-slot/use-slot.d.ts +13 -0
  300. package/dist/hooks/use-slot/use-slot.js +18 -0
  301. package/dist/hooks/use-slot/use-slot.js.map +1 -0
  302. package/dist/hooks/use-theme/index.d.ts +2 -0
  303. package/dist/hooks/use-theme/types.d.ts +86 -0
  304. package/dist/hooks/use-theme/use-theme.css.d.ts +1 -0
  305. package/dist/hooks/use-theme/use-theme.d.ts +13 -0
  306. package/dist/hooks/use-theme/use-theme.js +64 -0
  307. package/dist/hooks/use-theme/use-theme.js.map +1 -0
  308. package/dist/hooks/use-theme/use-theme.vanilla.js +4 -0
  309. package/dist/hooks/use-theme/use-theme.vanilla.js.map +1 -0
  310. package/dist/hooks/use-tree/index.d.ts +1 -0
  311. package/dist/hooks/use-tree/use-tree.d.ts +2 -0
  312. package/dist/hooks/use-tree/use-tree.js +217 -0
  313. package/dist/hooks/use-tree/use-tree.js.map +1 -0
  314. package/dist/hooks/use-tree/utils.d.ts +6 -0
  315. package/dist/hooks/use-tree/utils.js +77 -0
  316. package/dist/hooks/use-tree/utils.js.map +1 -0
  317. package/dist/hooks/use-update-effect/index.d.ts +1 -0
  318. package/dist/hooks/use-update-effect/use-update-effect.d.ts +1 -0
  319. package/dist/hooks/use-update-effect/use-update-effect.js +20 -0
  320. package/dist/hooks/use-update-effect/use-update-effect.js.map +1 -0
  321. package/dist/index.d.ts +10 -0
  322. package/dist/index.js +66 -0
  323. package/dist/index.js.map +1 -0
  324. package/dist/ladle/actions.d.ts +1 -0
  325. package/dist/ladle/index.d.ts +1 -0
  326. package/dist/styles/index.d.ts +6 -0
  327. package/dist/styles/layers.css.d.ts +16 -0
  328. package/dist/styles/layers.vanilla.js +4 -0
  329. package/dist/styles/layers.vanilla.js.map +1 -0
  330. package/dist/styles/reset.css.d.ts +1 -0
  331. package/dist/styles/space.css.d.ts +1 -0
  332. package/dist/styles/surfaces.css.d.ts +4 -0
  333. package/dist/styles/surfaces.vanilla.js +4 -0
  334. package/dist/styles/surfaces.vanilla.js.map +1 -0
  335. package/dist/styles/theme.css.d.ts +334 -0
  336. package/dist/styles/theme.vanilla.js +31 -0
  337. package/dist/styles/theme.vanilla.js.map +1 -0
  338. package/dist/styles/typography.css.d.ts +17 -0
  339. package/dist/styles/typography.vanilla.js +8 -0
  340. package/dist/styles/typography.vanilla.js.map +1 -0
  341. package/dist/styles.css +2014 -0
  342. package/dist/test/setup.d.ts +1 -0
  343. package/dist/types/deckgl.d.ts +1 -0
  344. package/dist/types/generic.d.ts +3 -0
  345. package/dist/types/index.d.ts +6 -0
  346. package/dist/types/props.d.ts +4 -0
  347. package/dist/types/react-aria.d.ts +91 -0
  348. package/dist/types/use-tree.d.ts +52 -0
  349. package/dist/types/vanilla-extract.d.ts +15 -0
  350. package/dist/utils/css.d.ts +139 -0
  351. package/dist/utils/css.js +145 -0
  352. package/dist/utils/css.js.map +1 -0
  353. package/dist/utils/events.d.ts +10 -0
  354. package/dist/utils/events.js +5 -0
  355. package/dist/utils/events.js.map +1 -0
  356. package/dist/utils/index.d.ts +4 -0
  357. package/dist/utils/props.d.ts +29 -0
  358. package/dist/utils/props.js +108 -0
  359. package/dist/utils/props.js.map +1 -0
  360. package/dist/utils/validators.d.ts +49 -0
  361. package/dist/utils/validators.js +37 -0
  362. package/dist/utils/validators.js.map +1 -0
  363. package/dist/vanilla.d.ts +27 -0
  364. package/dist/vanilla.js +27 -0
  365. package/package.json +5 -5
@@ -0,0 +1,63 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, forwardRef, useMemo, useCallback } from 'react';
3
+ import { Radio as Radio$1, Provider, RadioGroup as RadioGroup$1 } from 'react-aria-components';
4
+ import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
5
+ import { useDefaultProps } from '../../hooks/use-defaults/use-defaults.js';
6
+ import { inlineVars } from '../../utils/css.js';
7
+ import { mergeClassNames, callRenderProps } from '../../utils/props.js';
8
+ import { useTheme } from '../../hooks/use-theme/use-theme.js';
9
+ import { AriaLabelContext } from '../aria/aria.js';
10
+ import { radioClassNames, radioStateVars, radioGroupStateVars } from './radio.vanilla.js';
11
+
12
+ const RadioContext = createContext(null);
13
+ const Radio = forwardRef(function Radio2(props, ref) {
14
+ [props, ref] = useContextProps(props, ref, RadioContext);
15
+ props = useDefaultProps(props, "Radio");
16
+ const { children: childrenProp, classNames: classNamesProp, alignInput = "end", ...rest } = props;
17
+ const theme = useTheme();
18
+ const classNames = useMemo(() => mergeClassNames(radioClassNames, theme.Radio, classNamesProp), [classNamesProp, theme.Radio]);
19
+ const style = useCallback((renderProps) => inlineVars(radioStateVars, {
20
+ ...renderProps,
21
+ alignInput
22
+ }), [alignInput]);
23
+ const children = useCallback((renderProps) => jsx("span", { className: classNames?.radio?.radio, children: callRenderProps(childrenProp, {
24
+ ...renderProps,
25
+ defaultChildren: null
26
+ }) }), [childrenProp, classNames?.radio]);
27
+ return jsx(Radio$1, { ...rest, ref, style, className: classNames?.radio?.container, children });
28
+ });
29
+ const RadioGroupContext = createContext(null);
30
+ const RadioGroup = forwardRef(function RadioGroup2(props, ref) {
31
+ [props, ref] = useContextProps(props, ref, RadioGroupContext);
32
+ props = useDefaultProps(props, "RadioGroup");
33
+ const theme = useTheme();
34
+ const { children: childrenProp, classNames: classNamesProp, alignInput = "end", orientation = "vertical", ...rest } = props;
35
+ const classNames = useMemo(() => mergeClassNames(radioClassNames, theme.Radio, classNamesProp), [classNamesProp, theme.Radio]);
36
+ const style = useCallback((renderProps) => inlineVars(radioGroupStateVars, {
37
+ ...renderProps,
38
+ alignInput,
39
+ orientation
40
+ }), [alignInput, orientation]);
41
+ const values = useMemo(() => [
42
+ [
43
+ RadioContext,
44
+ {
45
+ classNames,
46
+ alignInput
47
+ }
48
+ ],
49
+ [
50
+ AriaLabelContext,
51
+ {
52
+ className: classNames?.label
53
+ }
54
+ ]
55
+ ], [alignInput, classNames]);
56
+ const children = useCallback((renderProps) => jsx(Provider, { values, children: jsx("div", { className: classNames?.group?.group, children: callRenderProps(childrenProp, {
57
+ ...renderProps,
58
+ defaultChildren: null
59
+ }) }) }), [childrenProp, classNames?.group, values]);
60
+ return jsx(RadioGroup$1, { ...rest, ref, className: classNames?.group?.container, style, orientation, children });
61
+ });
62
+
63
+ export { Radio, RadioContext, RadioGroup, RadioGroupContext };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.js","sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import {\n createContext,\n type ForwardedRef,\n forwardRef,\n useMemo,\n useCallback,\n} from 'react';\nimport {\n RadioGroup as RACRadioGroup,\n Radio as RACRadio,\n type ContextValue,\n Provider,\n type LabelProps,\n} from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { callRenderProps, inlineVars, mergeClassNames } from '../../utils';\nimport { AriaLabelContext } from '../aria';\nimport {\n radioClassNames,\n radioGroupStateVars,\n radioStateVars,\n} from './radio.css';\nimport type {\n RadioGroupRenderProps,\n RadioGroupProps,\n RadioProps,\n RadioRenderProps,\n RadioContextProps,\n} from './types';\n\nexport const RadioContext =\n createContext<ContextValue<RadioContextProps, HTMLLabelElement>>(null);\n\nexport const Radio = forwardRef(function Radio(\n props: RadioProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n [props, ref] = useContextProps(props, ref, RadioContext);\n props = useDefaultProps(props, 'Radio');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n alignInput = 'end',\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(radioClassNames, theme.Radio, classNamesProp),\n [classNamesProp, theme.Radio],\n );\n\n const style = useCallback(\n (renderProps: RadioRenderProps) =>\n inlineVars(radioStateVars, {\n ...renderProps,\n alignInput,\n }),\n [alignInput],\n );\n\n const children = useCallback(\n (renderProps: RadioRenderProps) => (\n <span className={classNames?.radio?.radio}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n defaultChildren: null,\n })}\n </span>\n ),\n [childrenProp, classNames?.radio],\n );\n\n return (\n <RACRadio\n {...rest}\n ref={ref}\n style={style}\n className={classNames?.radio?.container}\n >\n {children}\n </RACRadio>\n );\n});\n\nexport const RadioGroupContext =\n createContext<ContextValue<RadioGroupProps, HTMLDivElement>>(null);\n\nexport const RadioGroup = forwardRef(function RadioGroup(\n props: RadioGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, RadioGroupContext);\n\n props = useDefaultProps(props, 'RadioGroup');\n\n const theme = useTheme();\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n alignInput = 'end',\n orientation = 'vertical',\n ...rest\n } = props;\n\n const classNames = useMemo(\n () => mergeClassNames(radioClassNames, theme.Radio, classNamesProp),\n [classNamesProp, theme.Radio],\n );\n\n const style = useCallback(\n (renderProps: RadioGroupRenderProps) =>\n inlineVars(radioGroupStateVars, {\n ...renderProps,\n alignInput,\n orientation,\n }),\n [alignInput, orientation],\n );\n\n const values = useMemo<\n [\n [typeof RadioContext, ContextValue<RadioContextProps, HTMLLabelElement>],\n [typeof AriaLabelContext, ContextValue<LabelProps, HTMLLabelElement>],\n ]\n >(\n () => [\n [\n RadioContext,\n {\n classNames,\n alignInput,\n },\n ],\n [\n AriaLabelContext,\n {\n className: classNames?.label,\n },\n ],\n ],\n [alignInput, classNames],\n );\n\n const children = useCallback(\n (renderProps: RadioGroupRenderProps) => (\n <Provider values={values}>\n <div className={classNames?.group?.group}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n defaultChildren: null,\n })}\n </div>\n </Provider>\n ),\n [childrenProp, classNames?.group, values],\n );\n\n return (\n <RACRadioGroup\n {...rest}\n ref={ref}\n className={classNames?.group?.container}\n style={style}\n orientation={orientation}\n >\n {children}\n </RACRadioGroup>\n );\n});\n"],"names":["Radio","RACRadio","RadioGroup","RACRadioGroup"],"mappings":";;;;;;;;;;;;;;;;;AA8Ba,MAAA,YAAA,GACX,cAAiE,IAAI,EAAA;AAEhE,MAAM,KAAQ,GAAA,UAAA,CAAW,SAASA,MAAAA,CACvC,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,YAAY,CAAA,CAAA;AACvD,EAAQ,KAAA,GAAA,eAAA,CAAgB,OAAO,OAAO,CAAA,CAAA;AAEtC,EAAM,MAAA;AAAA,IACJ,QAAU,EAAA,YAAA;AAAA,IACV,UAAY,EAAA,cAAA;AAAA,IACZ,UAAa,GAAA,KAAA;AAAA,IACb,GAAG,IAAA;AAAA,GACD,GAAA,KAAA,CAAA;AAEJ,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,EAAA,MAAM,UAAa,GAAA,OAAA;AAAA,IACjB,MAAM,eAAA,CAAgB,eAAiB,EAAA,KAAA,CAAM,OAAO,cAAc,CAAA;AAAA,IAClE,CAAC,cAAgB,EAAA,KAAA,CAAM,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A;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MACA,SAAA,EAAW,YAAY,KAAO,EAAA,SAAA;AAAA,MAC9B,KAAA;AAAA,MACA,WAAA;AAAA,MAEC,QAAA;AAAA,KAAA;AAAA,GACH,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,8 @@
1
+
2
+ var radioClassNames = { radio: { container: "radio_radioClassNames_radio_container__hweo8bo", radio: "radio_radioClassNames_radio_radio__hweo8bp" }, group: { container: "radio_radioClassNames_group_container__hweo8bq", group: "radio_radioClassNames_group_group__hweo8br" }, label: "typography_label__j8fgabg" };
3
+ var radioColorVars = { border: "var(--border__hweo8b2)", background: "var(--background__hweo8b3)", color: "var(--color__hweo8b4)" };
4
+ var radioGroupStateVars = { alignInput: "var(--alignInput__hweo8bi)", orientation: "var(--orientation__hweo8bj)", isDisabled: "var(--isDisabled__hweo8bk)", isReadOnly: "var(--isReadOnly__hweo8bl)", isInvalid: "var(--isInvalid__hweo8bm)", isRequired: "var(--isRequired__hweo8bn)" };
5
+ var radioSpaceVars = { diameter: "var(--diameter__hweo8b5)", gap: "var(--gap__hweo8b6)", elementGap: "var(--elementGap__hweo8b7)" };
6
+ var radioStateVars = { alignInput: "var(--alignInput__hweo8b8)", isDisabled: "var(--isDisabled__hweo8b9)", isFocused: "var(--isFocused__hweo8ba)", isFocusVisible: "var(--isFocusVisible__hweo8bb)", isHovered: "var(--isHovered__hweo8bc)", isPressed: "var(--isPressed__hweo8bd)", isReadOnly: "var(--isReadOnly__hweo8be)", isSelected: "var(--isSelected__hweo8bf)", isInvalid: "var(--isInvalid__hweo8bg)", isRequired: "var(--isRequired__hweo8bh)" };
7
+
8
+ export { radioClassNames, radioColorVars, radioGroupStateVars, radioSpaceVars, radioStateVars };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ import type { RadioGroupProps as RACRadioGroupProps, RadioGroupRenderProps as RACRadioGroupRenderProps, RadioProps as RACRadioProps, RadioRenderProps as RACRadioRenderProps } from 'react-aria-components';
2
+ import type { PartialDeep } from 'type-fest';
3
+ import type { RenderPropsChildren } from '../../types';
4
+ export type RadioAlignment = 'start' | 'end';
5
+ export type RadioClassNames = PartialDeep<{
6
+ group: {
7
+ container: string;
8
+ group: string;
9
+ };
10
+ radio: {
11
+ container: string;
12
+ radio: string;
13
+ };
14
+ label: string;
15
+ }>;
16
+ export type RadioGroupRenderProps = RACRadioGroupRenderProps;
17
+ export type RadioGroupProps = Omit<RACRadioGroupProps, 'className' | 'style'> & Pick<BaseRadioProps, 'alignInput' | 'classNames' | 'label'>;
18
+ export type RadioGroupState = Omit<RadioGroupRenderProps, 'state'>;
19
+ export type RadioRenderProps = Omit<RACRadioRenderProps, 'state'>;
20
+ type BaseRadioProps = {
21
+ children?: RenderPropsChildren<RadioRenderProps>;
22
+ label?: string;
23
+ classNames?: RadioClassNames;
24
+ alignInput?: RadioAlignment;
25
+ };
26
+ export type RadioProps = Omit<RACRadioProps, 'children' | 'className' | 'style'> & BaseRadioProps;
27
+ export type RadioContextProps = Omit<RadioProps, 'value'>;
28
+ export type RadioState = RadioRenderProps & Pick<BaseRadioProps, 'alignInput'>;
29
+ export {};
@@ -0,0 +1,3 @@
1
+ export { SearchField, SearchFieldContext } from './search-field';
2
+ export { searchFieldClassNames, searchFieldContainer, searchFieldSpaceVars, searchFieldStateVars, } from './search-field.css';
3
+ export { type SearchFieldClassNames, type SearchFieldMapping, type SearchFieldProps, type SearchFieldRenderProps, type SearchFieldState, } from './types';
@@ -0,0 +1,16 @@
1
+ import type { SearchFieldClassNames } from './types';
2
+ export declare const searchFieldContainer: string;
3
+ export declare const searchFieldSpaceVars: {
4
+ x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
5
+ y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
6
+ };
7
+ export declare const searchFieldStateVars: {
8
+ size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
9
+ variant: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
10
+ isEmpty: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
11
+ isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12
+ isInvalid: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
13
+ isReadOnly: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
14
+ isRequired: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
15
+ };
16
+ export declare const searchFieldClassNames: SearchFieldClassNames;
@@ -0,0 +1,9 @@
1
+ import { type ContextValue } from 'react-aria-components';
2
+ import type { SearchFieldMapping, SearchFieldProps } from './types';
3
+ export declare const SearchFieldContext: import("react").Context<ContextValue<SearchFieldProps, HTMLDivElement>>;
4
+ export declare const SearchField: (props: Omit<import("react-aria-components").SearchFieldProps, "className" | "style" | "type"> & {
5
+ classNames?: import("./types").SearchFieldClassNames;
6
+ mapping?: Partial<SearchFieldMapping>;
7
+ size?: import("../input").InputSize;
8
+ variant?: import("./types").SearchFieldVariants;
9
+ } & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
@@ -0,0 +1,60 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, forwardRef, useMemo, useCallback } from 'react';
3
+ import { Provider, SearchField as SearchField$1 } from 'react-aria-components';
4
+ import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
5
+ import { useDefaultProps } from '../../hooks/use-defaults/use-defaults.js';
6
+ import { inlineVars } from '../../utils/css.js';
7
+ import { mergeClassNames, callRenderProps } from '../../utils/props.js';
8
+ import { useTheme } from '../../hooks/use-theme/use-theme.js';
9
+ import { AriaGroupContext } from '../aria/aria.js';
10
+ import { ButtonContext } from '../button/button.js';
11
+ import { IconContext } from '../icon/icon.js';
12
+ import { InputContext } from '../input/input.js';
13
+ import { searchFieldClassNames, searchFieldStateVars } from './search-field.vanilla.js';
14
+
15
+ const defaultMapping = {
16
+ icon: {
17
+ sm: { size: "xs" },
18
+ lg: { size: "sm" }
19
+ },
20
+ clear: {
21
+ sm: { size: "xs", variant: "icon" },
22
+ lg: { size: "sm", variant: "icon" }
23
+ }
24
+ };
25
+ const SearchFieldContext = createContext(null);
26
+ const SearchField = forwardRef(function SearchField2(props, ref) {
27
+ [props, ref] = useContextProps(props, ref, SearchFieldContext);
28
+ props = useDefaultProps(props, "SearchField");
29
+ const { children: childrenProp, classNames: classNamesProp, mapping: mappingProp, size = "lg", variant = "solid", isDisabled, isReadOnly } = props;
30
+ const theme = useTheme();
31
+ const mapping = useMemo(() => ({
32
+ ...defaultMapping,
33
+ ...mappingProp
34
+ }), [mappingProp]);
35
+ const classNames = useMemo(() => mergeClassNames(searchFieldClassNames, theme.SearchField, classNamesProp), [theme.SearchField, classNamesProp]);
36
+ const values = useMemo(() => [
37
+ [AriaGroupContext, { className: classNames?.group }],
38
+ [IconContext, { ...mapping.icon[size], classNames: classNames?.icon }],
39
+ [InputContext, { classNames: classNames?.input, size }],
40
+ [
41
+ ButtonContext,
42
+ {
43
+ ...mapping.clear[size],
44
+ classNames: classNames?.clear,
45
+ isDisabled: isDisabled ?? isReadOnly
46
+ }
47
+ ]
48
+ ], [classNames, mapping, isDisabled, isReadOnly, size]);
49
+ const style = useCallback(({ state, ...renderProps }) => inlineVars(searchFieldStateVars, {
50
+ ...renderProps,
51
+ variant
52
+ }), [variant]);
53
+ const children = useCallback((renderProps) => jsx(Provider, { values, children: callRenderProps(childrenProp, {
54
+ ...renderProps,
55
+ defaultChildren: null
56
+ }) }), [childrenProp, values]);
57
+ return jsx(SearchField$1, { ...props, ref, className: classNames?.container, style, children });
58
+ });
59
+
60
+ export { SearchField, SearchFieldContext };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-field.js","sources":["../../../src/components/search-field/search-field.tsx"],"sourcesContent":["import {\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n} from 'react';\nimport {\n type ContextValue,\n Provider,\n type GroupProps as RACGroupProps,\n SearchField as RACSearchField,\n type SearchFieldRenderProps,\n} from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { callRenderProps, inlineVars, mergeClassNames } from '../../utils';\nimport { AriaGroupContext } from '../aria';\nimport { ButtonContext, type ButtonProps } from '../button';\nimport { IconContext, type IconProps } from '../icon';\nimport { InputContext, type InputProps } from '../input';\nimport {\n searchFieldClassNames,\n searchFieldStateVars,\n} from './search-field.css';\nimport type { SearchFieldMapping, SearchFieldProps } from './types';\n\nconst defaultMapping: SearchFieldMapping = {\n icon: {\n sm: { size: 'xs' },\n lg: { size: 'sm' },\n },\n clear: {\n sm: { size: 'xs', variant: 'icon' },\n lg: { size: 'sm', variant: 'icon' },\n },\n};\n\nexport const SearchFieldContext =\n createContext<ContextValue<SearchFieldProps, HTMLDivElement>>(null);\n\nexport const SearchField = forwardRef(function SearchField(\n props: SearchFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, SearchFieldContext);\n props = useDefaultProps(props, 'SearchField');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n mapping: mappingProp,\n size = 'lg',\n variant = 'solid',\n isDisabled,\n isReadOnly,\n } = props;\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(searchFieldClassNames, theme.SearchField, classNamesProp),\n [theme.SearchField, classNamesProp],\n );\n\n const values = useMemo<\n [\n [typeof AriaGroupContext, ContextValue<RACGroupProps, HTMLDivElement>],\n [typeof IconContext, ContextValue<IconProps, HTMLDivElement>],\n [typeof InputContext, ContextValue<InputProps, HTMLInputElement>],\n [typeof ButtonContext, ContextValue<ButtonProps, HTMLButtonElement>],\n ]\n >(\n () => [\n [AriaGroupContext, { className: classNames?.group }],\n [IconContext, { ...mapping.icon[size], classNames: classNames?.icon }],\n [InputContext, { classNames: classNames?.input, size }],\n [\n ButtonContext,\n {\n ...mapping.clear[size],\n classNames: classNames?.clear,\n isDisabled: isDisabled ?? isReadOnly,\n },\n ],\n ],\n [classNames, mapping, isDisabled, isReadOnly, size],\n );\n\n const style = useCallback(\n ({ state, ...renderProps }: SearchFieldRenderProps) =>\n inlineVars(searchFieldStateVars, {\n ...renderProps,\n variant,\n }),\n [variant],\n );\n\n const children = useCallback(\n (renderProps: SearchFieldRenderProps) => (\n <Provider values={values}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n defaultChildren: null,\n })}\n </Provider>\n ),\n [childrenProp, values],\n );\n\n return (\n <RACSearchField\n {...props}\n ref={ref}\n className={classNames?.container}\n style={style}\n >\n {children}\n </RACSearchField>\n );\n});\n"],"names":["SearchField","RACSearchField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,cAAqC,GAAA;AAAA,EACzC,IAAM,EAAA;AAAA,IACJ,EAAA,EAAI,EAAE,IAAA,EAAM,IAAK,EAAA;AAAA,IACjB,EAAA,EAAI,EAAE,IAAA,EAAM,IAAK,EAAA;AAAA,GACnB;AAAA,EACA,KAAO,EAAA;AAAA,IACL,EAAI,EAAA,EAAE,IAAM,EAAA,IAAA,EAAM,SAAS,MAAO,EAAA;AAAA,IAClC,EAAI,EAAA,EAAE,IAAM,EAAA,IAAA,EAAM,SAAS,MAAO,EAAA;AAAA,GACpC;AACF,CAAA,CAAA;AAEa,MAAA,kBAAA,GACX,cAA8D,IAAI,EAAA;AAE7D,MAAM,WAAc,GAAA,UAAA,CAAW,SAASA,YAAAA,CAC7C,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,kBAAkB,CAAA,CAAA;AAC7D,EAAQ,KAAA,GAAA,eAA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AA,EAAY,YAAY,IAAI,CAAA;AAAA,GACpD,CAAA;AAEA,EAAA,MAAM,KAAQ,GAAA,WAAA;AAAA,IACZ,CAAC,EAAE,KAAA,EAAO,GAAG,WAAY,EAAA,KACvB,WAAW,oBAAsB,EAAA;AAAA,MAC/B,GAAG,WAAA;AAAA,MACH,OAAA;AAAA,KACD,CAAA;AAAA,IACH,CAAC,OAAO,CAAA;AAAA,GACV,CAAA;AAEA,EAAA,MAAM,QAAW,GAAA,WAAA;AAAA,IACf,CAAC,WACC,qBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,MAAA,EACP,0BAAgB,YAAc,EAAA;AAAA,MAC7B,GAAG,WAAA;AAAA,MACH,eAAiB,EAAA,IAAA;AAAA,KAClB,CACH,EAAA,CAAA;AAAA,IAEF,CAAC,cAAc,MAAM,CAAA;AAAA,GACvB,CAAA;AAEA,EACE,uBAAA,GAAA;AAAA,IAACC,aAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,GAAA;AAAA,MACA,WAAW,UAAY,EAAA,SAAA;AAAA,MACvB,KAAA;AAAA,MAEC,QAAA;AAAA,KAAA;AAAA,GACH,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,7 @@
1
+
2
+ var searchFieldClassNames = { container: "search-field_searchFieldClassNames_container__1exq9w6a", group: "search-field_searchFieldClassNames_group__1exq9w6b", icon: { icon: "search-field_searchFieldClassNames_icon_icon__1exq9w6c" }, input: { sizer: "search-field_searchFieldClassNames_input_sizer__1exq9w6d", input: "search-field_searchFieldClassNames_input_input__1exq9w6e" }, clear: { button: "search-field_searchFieldClassNames_clear_button__1exq9w6f" } };
3
+ var searchFieldContainer = "search-field_searchFieldContainer__1exq9w60";
4
+ var searchFieldSpaceVars = { x: "var(--x__1exq9w61)", y: "var(--y__1exq9w62)" };
5
+ var searchFieldStateVars = { size: "var(--size__1exq9w63)", variant: "var(--variant__1exq9w64)", isEmpty: "var(--isEmpty__1exq9w65)", isDisabled: "var(--isDisabled__1exq9w66)", isInvalid: "var(--isInvalid__1exq9w67)", isReadOnly: "var(--isReadOnly__1exq9w68)", isRequired: "var(--isRequired__1exq9w69)" };
6
+
7
+ export { searchFieldClassNames, searchFieldContainer, searchFieldSpaceVars, searchFieldStateVars };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-field.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ import type { SearchFieldProps as RACSearchFieldProps, SearchFieldRenderProps as RACSearchFieldRenderProps } from 'react-aria-components';
2
+ import type { PartialDeep } from 'type-fest';
3
+ import type { AsType, OmitProtectedProps } from '../../types';
4
+ import type { ButtonClassNames, ButtonProps } from '../button/types';
5
+ import type { IconClassNames, IconProps } from '../icon/types';
6
+ import type { InputClassNames, InputSize } from '../input/types';
7
+ export type SearchFieldClassNames = PartialDeep<{
8
+ container: string;
9
+ group: string;
10
+ icon: IconClassNames;
11
+ input: InputClassNames;
12
+ clear: ButtonClassNames;
13
+ }>;
14
+ export type SearchFieldSizes = 'sm' | 'lg';
15
+ export type SearchFieldVariants = 'solid' | 'hollow';
16
+ export type SearchFieldMapping = {
17
+ icon: Partial<Record<SearchFieldSizes, OmitProtectedProps<IconProps>>>;
18
+ clear: Partial<Record<SearchFieldSizes, OmitProtectedProps<ButtonProps>>>;
19
+ };
20
+ type BaseSearchFieldProps = {
21
+ classNames?: SearchFieldClassNames;
22
+ mapping?: Partial<SearchFieldMapping>;
23
+ size?: InputSize;
24
+ variant?: SearchFieldVariants;
25
+ };
26
+ export type SearchFieldRenderProps = AsType<RACSearchFieldRenderProps>;
27
+ export type SearchFieldState = Omit<SearchFieldRenderProps, 'state'> & Required<Pick<BaseSearchFieldProps, 'variant' | 'size'>>;
28
+ export type SearchFieldProps = Omit<RACSearchFieldProps, 'className' | 'style' | 'type'> & BaseSearchFieldProps;
29
+ export {};
@@ -0,0 +1,3 @@
1
+ export { Select, SelectContext } from './select';
2
+ export { selectClassNames, selectColorVars, selectContainer, selectSpaceVars, selectStateVars, } from './select.css';
3
+ export { type SelectClassNames, type SelectMapping, type SelectProps, type SelectRenderProps, type SelectSizes, type SelectState, } from './types';
@@ -0,0 +1,25 @@
1
+ import type { SelectClassNames } from './types';
2
+ export declare const selectContainer: string;
3
+ export declare const selectColorVars: {
4
+ description: {
5
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
6
+ };
7
+ error: {
8
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
9
+ };
10
+ };
11
+ export declare const selectSpaceVars: {
12
+ width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
13
+ x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
14
+ y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
15
+ };
16
+ export declare const selectStateVars: {
17
+ size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
18
+ isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
19
+ isInvalid: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
20
+ isOpen: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
21
+ isRequired: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
22
+ isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
23
+ isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
24
+ };
25
+ export declare const selectClassNames: SelectClassNames;
@@ -0,0 +1,8 @@
1
+ import { type ContextValue } from 'react-aria-components';
2
+ import type { SelectMapping, SelectProps } from './types';
3
+ export declare const SelectContext: import("react").Context<ContextValue<SelectProps<object>, HTMLDivElement>>;
4
+ export declare const Select: <T extends object>(props: Omit<import("react-aria-components").SelectProps<T>, "className" | "style"> & {
5
+ classNames?: import("./types").SelectClassNames;
6
+ mapping?: Partial<SelectMapping>;
7
+ size?: import("./types").SelectSizes;
8
+ } & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
@@ -0,0 +1,80 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, forwardRef, useMemo, useCallback } from 'react';
3
+ import { Provider, Select as Select$1 } from 'react-aria-components';
4
+ import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
5
+ import { useDefaultProps } from '../../hooks/use-defaults/use-defaults.js';
6
+ import { inlineVars } from '../../utils/css.js';
7
+ import { mergeClassNames, callRenderProps } from '../../utils/props.js';
8
+ import { useTheme } from '../../hooks/use-theme/use-theme.js';
9
+ import { bodies } from '../../styles/typography.vanilla.js';
10
+ import { AriaLabelContext, AriaSelectValueContext, AriaTextContext, AriaFieldErrorContext } from '../aria/aria.js';
11
+ import { ButtonContext } from '../button/button.js';
12
+ import { OptionsContext } from '../options/options.js';
13
+ import { selectClassNames, selectStateVars } from './select.vanilla.js';
14
+
15
+ const defaultMapping = {
16
+ description: {
17
+ sm: bodies.xs,
18
+ lg: bodies.xs
19
+ },
20
+ error: {
21
+ sm: bodies.xs,
22
+ lg: bodies.xs
23
+ },
24
+ toggle: {
25
+ sm: { size: "sm", variant: "hollow" },
26
+ lg: { size: "md", variant: "hollow" }
27
+ }
28
+ };
29
+ const SelectContext = createContext(null);
30
+ const Select = forwardRef(function Select2(props, ref) {
31
+ [props, ref] = useContextProps(props, ref, SelectContext);
32
+ props = useDefaultProps(props, "Select");
33
+ const { children: childrenProp, classNames: classNamesProp, mapping: mappingProp, size = "lg" } = props;
34
+ const theme = useTheme();
35
+ const mapping = useMemo(() => ({
36
+ ...defaultMapping,
37
+ ...mappingProp
38
+ }), [mappingProp]);
39
+ const classNames = useMemo(() => mergeClassNames(selectClassNames, theme.Select, classNamesProp, {
40
+ description: mapping.description[size],
41
+ error: mapping.error[size]
42
+ }), [classNamesProp, theme.Select, mapping, size]);
43
+ const values = useMemo(() => [
44
+ [AriaLabelContext, { className: classNames?.label }],
45
+ [
46
+ ButtonContext,
47
+ {
48
+ ...mapping.toggle[size],
49
+ classNames: classNames?.toggle
50
+ }
51
+ ],
52
+ [
53
+ AriaSelectValueContext,
54
+ {
55
+ className: classNames?.value
56
+ }
57
+ ],
58
+ [
59
+ AriaTextContext,
60
+ {
61
+ slots: {
62
+ description: { className: classNames?.description }
63
+ }
64
+ }
65
+ ],
66
+ [AriaFieldErrorContext, { className: classNames?.error }],
67
+ [OptionsContext, { classNames: classNames?.options, size }]
68
+ ], [classNames, mapping, size]);
69
+ const style = useCallback((renderProps) => inlineVars(selectStateVars, {
70
+ ...renderProps,
71
+ size
72
+ }), [size]);
73
+ const children = useCallback((renderProps) => jsx("div", { className: classNames?.select, children: jsx(Provider, { values, children: callRenderProps(childrenProp, {
74
+ ...renderProps,
75
+ defaultChildren: null
76
+ }) }) }), [childrenProp, values, classNames?.select]);
77
+ return jsx(Select$1, { ...props, ref, className: classNames?.container, style, children });
78
+ });
79
+
80
+ export { Select, SelectContext };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sources":["../../../src/components/select/select.tsx"],"sourcesContent":["import {\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n type ForwardedRef,\n} from 'react';\nimport {\n Select as AriaSelect,\n Provider,\n type ContextValue,\n type FieldErrorProps,\n type LabelProps,\n type SelectRenderProps as RACSelectRenderProps,\n type SelectValueProps,\n type TextProps,\n} from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { bodies } from '../../styles';\nimport { callRenderProps, inlineVars, mergeClassNames } from '../../utils';\nimport {\n AriaFieldErrorContext,\n AriaLabelContext,\n AriaSelectValueContext,\n AriaTextContext,\n} from '../aria';\nimport { ButtonContext, type ButtonProps } from '../button';\nimport { OptionsContext, type OptionsProps } from '../options';\nimport { selectClassNames, selectStateVars } from './select.css';\nimport type { SelectMapping, SelectProps } from './types';\n\nconst defaultMapping: SelectMapping = {\n description: {\n sm: bodies.xs,\n lg: bodies.xs,\n },\n error: {\n sm: bodies.xs,\n lg: bodies.xs,\n },\n toggle: {\n sm: { size: 'sm', variant: 'hollow' },\n lg: { size: 'md', variant: 'hollow' },\n },\n};\n\nexport const SelectContext =\n createContext<ContextValue<SelectProps<object>, HTMLDivElement>>(null);\n\nexport const Select = forwardRef(function Select<T extends object>(\n props: SelectProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, SelectContext);\n props = useDefaultProps(props, 'Select');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n mapping: mappingProp,\n size = 'lg',\n } = props;\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(selectClassNames, theme.Select, classNamesProp, {\n description: mapping.description[size],\n error: mapping.error[size],\n }),\n [classNamesProp, theme.Select, mapping, size],\n );\n\n const values = useMemo<\n [\n [typeof AriaLabelContext, ContextValue<LabelProps, HTMLLabelElement>],\n [typeof ButtonContext, ContextValue<ButtonProps, HTMLButtonElement>],\n [\n typeof AriaSelectValueContext,\n ContextValue<SelectValueProps<object>, HTMLSpanElement>,\n ],\n [typeof AriaTextContext, ContextValue<TextProps, HTMLElement>],\n [\n typeof AriaFieldErrorContext,\n ContextValue<FieldErrorProps, HTMLElement>,\n ],\n [typeof OptionsContext, ContextValue<OptionsProps, HTMLElement>],\n ]\n >(\n () => [\n [AriaLabelContext, { className: classNames?.label }],\n [\n ButtonContext,\n {\n ...mapping.toggle[size],\n classNames: classNames?.toggle,\n },\n ],\n [\n AriaSelectValueContext,\n {\n className: classNames?.value,\n },\n ],\n [\n AriaTextContext,\n {\n slots: {\n description: { className: classNames?.description },\n },\n },\n ],\n [AriaFieldErrorContext, { className: classNames?.error }],\n [OptionsContext, { classNames: classNames?.options, size }],\n ],\n [classNames, mapping, size],\n );\n\n const style = useCallback(\n (renderProps: RACSelectRenderProps) =>\n inlineVars(selectStateVars, {\n ...renderProps,\n size,\n }),\n [size],\n );\n\n const children = useCallback(\n (renderProps: RACSelectRenderProps) => (\n <div className={classNames?.select}>\n <Provider values={values}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n defaultChildren: null,\n })}\n </Provider>\n </div>\n ),\n [childrenProp, values, classNames?.select],\n );\n\n return (\n <AriaSelect\n {...props}\n ref={ref}\n className={classNames?.container}\n style={style}\n >\n {children}\n </AriaSelect>\n );\n});\n"],"names":["Select","AriaSelect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,cAAgC,GAAA;AAAA,EACpC,WAAa,EAAA;AAAA,IACX,IAAI,MAAO,CAAA,EAAA;AAAA,IACX,IAAI,MAAO,CAAA,EAAA;AAAA,GACb;AAAA,EACA,KAAO,EAAA;AAAA,IACL,IAAI,MAAO,CAAA,EAAA;AAAA,IACX,IAAI,MAAO,CAAA,EAAA;AAAA,GACb;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,EAAI,EAAA,EAAE,IAAM,EAAA,IAAA,EAAM,SAAS,QAAS,EAAA;AAAA,IACpC,EAAI,EAAA,EAAE,IAAM,EAAA,IAAA,EAAM,SAAS,QAAS,EAAA;AAAA,GACtC;AACF,CAAA,CAAA;AAEa,MAAA,aAAA,GACX,cAAiE,IAAI,EAAA;AAEhE,MAAM,MAAS,GAAA,UAAA,CAAW,SAASA,OAAAA,CACxC,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,aAAa,CAAA,CAAA;AACxD,EAAQ,KAAA,GAAA,eAAA,CAAgB,OAAO,QAAQ,CAAA,CAAA;AAEvC,EAAM,MAAA;AAAA,IACJ,QAAU,EAAA,YAAA;AAAA,IACV,UAAY,EAAA,cAAA;AAAA,IACZ,OAAS,EAAA,WAAA;AAAA,IACT,IAAO,GAAA,IAAA;AAAA,GACL,GAAA,KAAA,CAAA;AAEJ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MAAM,CAAA;AAAA,KAC5D;AAAA,IACA,CAAC,UAAY,EAAA,OAAA,EAAS,IAAI,CAAA;AAAA,GAC5B,CAAA;AAEA,EAAA,MAAM,KAAQ,GAAA,WAAA;AAAA,IACZ,CAAC,WACC,KAAA,UAAA,CAAW,eAAiB,EAAA;AAAA,MAC1B,GAAG,WAAA;AAAA,MACH,IAAA;AAAA,KACD,CAAA;AAAA,IACH,CAAC,IAAI,CAAA;AAAA,GACP,CAAA;AAEA,EAAA,MAAM,QAAW,GAAA,WAAA;AAAA,IACf,CAAC,WACC,qBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,UAAY,EAAA,MAAA,EAC1B,QAAC,kBAAA,GAAA,CAAA,QAAA,EAAA,EAAS,MACP,EAAA,QAAA,EAAA,eAAA,CAAgB,YAAc,EAAA;AAAA,MAC7B,GAAG,WAAA;AAAA,MACH,eAAiB,EAAA,IAAA;AAAA,KAClB,GACH,CACF,EAAA,CAAA;AAAA,IAEF,CAAC,YAAA,EAAc,MAAQ,EAAA,UAAA,EAAY,MAAM,CAAA;AAAA,GAC3C,CAAA;AAEA,EACE,uBAAA,GAAA;AAAA,IAACC,QAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,GAAA;AAAA,MACA,WAAW,UAAY,EAAA,SAAA;AAAA,MACvB,KAAA;AAAA,MAEC,QAAA;AAAA,KAAA;AAAA,GACH,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,8 @@
1
+
2
+ var selectClassNames = { container: "select_selectClassNames_container__1j26mgud", select: "select_selectClassNames_select__1j26mgue", label: "select_selectClassNames_label__1j26mguf typography_label__j8fgabg", toggle: { button: "select_selectClassNames_toggle_button__1j26mgug" }, description: "select_selectClassNames_description__1j26mguh", error: "select_selectClassNames_error__1j26mgui", value: "select_selectClassNames_value__1j26mguj" };
3
+ var selectColorVars = { description: { color: "var(--description-color__1j26mgu1)" }, error: { color: "var(--error-color__1j26mgu2)" } };
4
+ var selectContainer = "select_selectContainer__1j26mgu0";
5
+ var selectSpaceVars = { width: "var(--width__1j26mgu3)", x: "var(--x__1j26mgu4)", y: "var(--y__1j26mgu5)" };
6
+ var selectStateVars = { size: "var(--size__1j26mgu6)", isDisabled: "var(--isDisabled__1j26mgu7)", isInvalid: "var(--isInvalid__1j26mgu8)", isOpen: "var(--isOpen__1j26mgu9)", isRequired: "var(--isRequired__1j26mgua)", isFocused: "var(--isFocused__1j26mgub)", isFocusVisible: "var(--isFocusVisible__1j26mguc)" };
7
+
8
+ export { selectClassNames, selectColorVars, selectContainer, selectSpaceVars, selectStateVars };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
@@ -0,0 +1,30 @@
1
+ import type { SelectProps as RACSelectProps, SelectRenderProps as RACSelectRenderProps } from 'react-aria-components';
2
+ import type { PartialDeep } from 'type-fest';
3
+ import type { AsType, OmitProtectedProps } from '../../types';
4
+ import type { ButtonClassNames, ButtonProps } from '../button/types';
5
+ import type { OptionsClassNames } from '../options/types';
6
+ export type SelectClassNames = PartialDeep<{
7
+ container: string;
8
+ select: string;
9
+ label: string;
10
+ toggle: ButtonClassNames;
11
+ value: string;
12
+ description: string;
13
+ error: string;
14
+ options: OptionsClassNames;
15
+ }>;
16
+ export type SelectSizes = 'sm' | 'lg';
17
+ export type SelectMapping = {
18
+ description: Partial<Record<SelectSizes, string>>;
19
+ error: Partial<Record<SelectSizes, string>>;
20
+ toggle: Partial<Record<SelectSizes, OmitProtectedProps<ButtonProps>>>;
21
+ };
22
+ type BaseSelectProps = {
23
+ classNames?: SelectClassNames;
24
+ mapping?: Partial<SelectMapping>;
25
+ size?: SelectSizes;
26
+ };
27
+ export type SelectRenderProps = AsType<RACSelectRenderProps>;
28
+ export type SelectState = SelectRenderProps & Required<Pick<BaseSelectProps, 'size'>>;
29
+ export type SelectProps<T extends object> = Omit<RACSelectProps<T>, 'className' | 'style'> & BaseSelectProps;
30
+ export {};
@@ -0,0 +1,3 @@
1
+ export { Switch, SwitchContext } from './switch';
2
+ export { switchClassNames, switchColorVars, switchContainer, switchSpaceVars, switchStateVars, } from './switch.css';
3
+ export { type SwitchClassNames, type SwitchAlignment, type SwitchProps, type SwitchRenderProps, type SwitchState, } from './types';
@@ -0,0 +1,25 @@
1
+ import type { SwitchClassNames } from './types';
2
+ export declare const switchContainer: string;
3
+ export declare const switchColorVars: {
4
+ border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
5
+ background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
6
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
7
+ indicator: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
8
+ };
9
+ export declare const switchSpaceVars: {
10
+ diameter: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
11
+ gutter: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12
+ gap: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
13
+ travel: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
14
+ };
15
+ export declare const switchStateVars: {
16
+ alignInput: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
17
+ isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
18
+ isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
19
+ isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
20
+ isHovered: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
21
+ isPressed: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
22
+ isReadOnly: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
23
+ isSelected: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
24
+ };
25
+ export declare const switchClassNames: SwitchClassNames;
@@ -0,0 +1,4 @@
1
+ import { type ContextValue } from 'react-aria-components';
2
+ import type { SwitchProps } from './types';
3
+ export declare const SwitchContext: import("react").Context<ContextValue<SwitchProps, HTMLLabelElement>>;
4
+ export declare const Switch: (props: Omit<import("react-aria-components").SwitchProps, "children" | "className" | "style"> & import("./types").BaseSwitchProps & import("react").RefAttributes<HTMLLabelElement>) => import("react").ReactElement | null;
@@ -0,0 +1,34 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { createContext, forwardRef, useMemo, useCallback } from 'react';
3
+ import { Switch as Switch$1 } from 'react-aria-components';
4
+ import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
5
+ import { useDefaultProps } from '../../hooks/use-defaults/use-defaults.js';
6
+ import { inlineVars } from '../../utils/css.js';
7
+ import { mergeClassNames, callRenderProps } from '../../utils/props.js';
8
+ import { useTheme } from '../../hooks/use-theme/use-theme.js';
9
+ import { switchClassNames, switchStateVars } from './switch.vanilla.js';
10
+
11
+ const SwitchContext = createContext(null);
12
+ const Switch = forwardRef(function Switch2(props, ref) {
13
+ [props, ref] = useContextProps(props, ref, SwitchContext);
14
+ props = useDefaultProps(props, "Switch");
15
+ const { children: childrenProp, classNames: classNamesProp, alignInput, ...rest } = props;
16
+ const theme = useTheme();
17
+ const classNames = useMemo(() => mergeClassNames(switchClassNames, theme.Switch, classNamesProp), [theme.Switch, classNamesProp]);
18
+ const style = useCallback(({ state, ...renderProps }) => inlineVars(switchStateVars, {
19
+ ...renderProps,
20
+ alignInput
21
+ }), [alignInput]);
22
+ const children = useCallback((renderProps) => {
23
+ const child = callRenderProps(childrenProp, renderProps);
24
+ return jsxs("span", { className: classNames?.switch, children: [child && jsx("span", { className: classNames?.label, children: child }), jsx("span", { className: classNames?.indicator })] });
25
+ }, [
26
+ childrenProp,
27
+ classNames?.switch,
28
+ classNames?.label,
29
+ classNames?.indicator
30
+ ]);
31
+ return jsx(Switch$1, { ...rest, ref, className: classNames?.container, style, children });
32
+ });
33
+
34
+ export { Switch, SwitchContext };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.js","sources":["../../../src/components/switch/switch.tsx"],"sourcesContent":["import {\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n} from 'react';\nimport { type ContextValue, Switch as RACSwitch } from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { callRenderProps, inlineVars, mergeClassNames } from '../../utils';\nimport { switchClassNames, switchStateVars } from './switch.css';\nimport type { SwitchProps, SwitchRenderProps } from './types';\n\nexport const SwitchContext =\n createContext<ContextValue<SwitchProps, HTMLLabelElement>>(null);\n\nexport const Switch = forwardRef(function Switch(\n props: SwitchProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n [props, ref] = useContextProps(props, ref, SwitchContext);\n\n props = useDefaultProps(props, 'Switch');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n alignInput,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(switchClassNames, theme.Switch, classNamesProp),\n [theme.Switch, classNamesProp],\n );\n\n const style = useCallback(\n ({ state, ...renderProps }: SwitchRenderProps) =>\n inlineVars(switchStateVars, {\n ...renderProps,\n alignInput,\n }),\n [alignInput],\n );\n\n const children = useCallback(\n (renderProps: SwitchRenderProps) => {\n const child = callRenderProps(childrenProp, renderProps);\n\n return (\n <span className={classNames?.switch}>\n {child && <span className={classNames?.label}>{child}</span>}\n <span className={classNames?.indicator} />\n </span>\n );\n },\n [\n childrenProp,\n classNames?.switch,\n classNames?.label,\n classNames?.indicator,\n ],\n );\n\n return (\n <RACSwitch\n {...rest}\n ref={ref}\n className={classNames?.container}\n style={style}\n >\n {children}\n </RACSwitch>\n );\n});\n"],"names":["Switch","RACSwitch"],"mappings":";;;;;;;;;;;;;;;;AAaa,MAAA,aAAA,GACX,cAA2D,IAAI,EAAA;AAE1D,MAA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AA,EAAY,SAAW,EAAA,CAAA;AAAA,OAC1C,EAAA,CAAA,CAAA;AAAA,KAEJ;AAAA,IACA;AAAA,MACE,YAAA;AAAA,MACA,UAAY,EAAA,MAAA;AAAA,MACZ,UAAY,EAAA,KAAA;AAAA,MACZ,UAAY,EAAA,SAAA;AAAA,KACd;AAAA,GACF,CAAA;AAEA,EACE,uBAAA,GAAA;AAAA,IAACC,QAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MACA,WAAW,UAAY,EAAA,SAAA;AAAA,MACvB,KAAA;AAAA,MAEC,QAAA;AAAA,KAAA;AAAA,GACH,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,8 @@
1
+
2
+ var switchClassNames = { container: "switch_switchClassNames_container__1j8i4wgh", "switch": "switch_switchClassNames_switch__1j8i4wgi", label: "typography_label__j8fgabg", indicator: "switch_switchClassNames_indicator__1j8i4wgk" };
3
+ var switchColorVars = { border: "var(--border__1j8i4wg1)", background: "var(--background__1j8i4wg2)", color: "var(--color__1j8i4wg3)", indicator: "var(--indicator__1j8i4wg4)" };
4
+ var switchContainer = "switch_switchContainer__1j8i4wg0";
5
+ var switchSpaceVars = { diameter: "var(--diameter__1j8i4wg5)", gutter: "var(--gutter__1j8i4wg6)", gap: "var(--gap__1j8i4wg7)", travel: "var(--travel__1j8i4wg8)" };
6
+ var switchStateVars = { alignInput: "var(--alignInput__1j8i4wg9)", isDisabled: "var(--isDisabled__1j8i4wga)", isFocused: "var(--isFocused__1j8i4wgb)", isFocusVisible: "var(--isFocusVisible__1j8i4wgc)", isHovered: "var(--isHovered__1j8i4wgd)", isPressed: "var(--isPressed__1j8i4wge)", isReadOnly: "var(--isReadOnly__1j8i4wgf)", isSelected: "var(--isSelected__1j8i4wgg)" };
7
+
8
+ export { switchClassNames, switchColorVars, switchContainer, switchSpaceVars, switchStateVars };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -0,0 +1,17 @@
1
+ import type { SwitchProps as RACSwitchProps, SwitchRenderProps as RACSwitchRenderProps } from 'react-aria-components';
2
+ import type { RenderPropsChildren } from '../../types';
3
+ export type SwitchClassNames = Partial<{
4
+ container: string;
5
+ switch: string;
6
+ label: string;
7
+ indicator: string;
8
+ }>;
9
+ export type SwitchAlignment = 'start' | 'end';
10
+ export type SwitchRenderProps = RACSwitchRenderProps;
11
+ export type BaseSwitchProps = {
12
+ children?: RenderPropsChildren<SwitchRenderProps>;
13
+ classNames?: SwitchClassNames;
14
+ alignInput?: SwitchAlignment;
15
+ };
16
+ export type SwitchState = Omit<SwitchRenderProps, 'state'> & Required<Pick<BaseSwitchProps, 'alignInput'>>;
17
+ export type SwitchProps = Omit<RACSwitchProps, 'children' | 'className' | 'style'> & BaseSwitchProps;
@@ -0,0 +1,3 @@
1
+ export { Tab, TabContext, TabList, TabListContext, TabPanel, TabPanelContext, TabPanels, TabPanelsContext, Tabs, TabsContext, } from './tabs';
2
+ export { tabColorVars, tabListStateVars, tabPanelStateVars, tabPanelsStateVars, tabSpaceVars, tabStateVars, tabsClassNames, tabsContainers, } from './tabs.css';
3
+ export { type TabListAnchor, type TabListAlignment, type TabListProps, type TabListState, type TabListVariants, type TabPanelProps, type TabPanelRenderProps, type TabPanelState, type TabPanelsProps, type TabPanelsState, type TabProps, type TabRenderProps, type TabState, type TabsClassNames, type TabsProps, } from './types';