@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,21 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, forwardRef } from 'react';
3
+ import { Provider } from 'react-aria-components';
4
+ import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
5
+ import { MergeProvider } from '../merge-provider/merge-provider.js';
6
+
7
+ const ElementContext = createContext(null);
8
+ const Element = forwardRef(function Element2(props, ref) {
9
+ [props, ref] = useContextProps(props, ref, ElementContext);
10
+ const { as: El = "div", values, mergeValues, ...rest } = props;
11
+ let children = jsx(El, { ...rest, ref });
12
+ if (mergeValues) {
13
+ children = jsx(MergeProvider, { values: mergeValues, children });
14
+ }
15
+ if (values) {
16
+ children = jsx(Provider, { values, children });
17
+ }
18
+ return children;
19
+ });
20
+
21
+ export { Element, ElementContext };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.js","sources":["../../../src/components/element/element.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { createContext, forwardRef, type ForwardedRef } from 'react';\nimport { type ContextValue, Provider } from 'react-aria-components';\nimport { useContextProps } from '../../hooks';\nimport { MergeProvider } from '../merge-provider';\nimport type { ElementProps } from './types';\n\nexport const ElementContext =\n createContext<\n ContextValue<\n ElementProps<any, any, any, any, any, any, any, any, any, any, any>,\n HTMLElement\n >\n >(null);\n\n/**\n * This generic component serves as any easy way for more complex components\n * to establish stylable content areas within their layout with optional\n * targetted contexts for any subcomponents\n *\n * See Dialog & Drawer as examples\n */\nexport const Element = forwardRef(function Element<\n A,\n B,\n C,\n D,\n E,\n F,\n G,\n H,\n I,\n J,\n K,\n>(\n props: ElementProps<A, B, C, D, E, F, G, H, I, J, K>,\n ref: ForwardedRef<HTMLElement>,\n) {\n [props, ref] = useContextProps(props, ref, ElementContext);\n\n const { as: El = 'div', values, mergeValues, ...rest } = props;\n\n // @ts-expect-error Can't narrow props type to match element or ref, making this less dynamic runs into union complexity and performance issues\n let children = <El {...rest} ref={ref} />;\n\n if (mergeValues) {\n children = <MergeProvider values={mergeValues}>{children}</MergeProvider>;\n }\n\n if (values) {\n children = <Provider values={values}>{children}</Provider>;\n }\n\n return children;\n});\n"],"names":["Element"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOa,MAAA,cAAA,GACX,cAKE,IAAI,EAAA;AASD,MAAM,OAAU,GAAA,UAAA,CAAW,SAASA,QAAAA,CAazC,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,cAAc,CAAA,CAAA;AAEzD,EAAM,MAAA,EAAE,IAAI,EAAK,GAAA,KAAA,EAAO,QAAQ,WAAa,EAAA,GAAG,MAAS,GAAA,KAAA,CAAA;AAGzD,EAAA,IAAI,QAAW,mBAAA,GAAA,CAAC,EAAI,EAAA,EAAA,GAAG,MAAM,GAAU,EAAA,CAAA,CAAA;AAEvC,EAAA,IAAI,WAAa,EAAA;AACf,IAAA,QAAA,mBAAY,GAAA,CAAA,aAAA,EAAA,EAAc,MAAQ,EAAA,WAAA,EAAc,QAAS,EAAA,CAAA,CAAA;AAAA,GAC3D;AAEA,EAAA,IAAI,MAAQ,EAAA;AACV,IAAW,QAAA,mBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,MAAA,EAAiB,QAAS,EAAA,CAAA,CAAA;AAAA,GACjD;AAEA,EAAO,OAAA,QAAA,CAAA;AACT,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ export { Element, ElementContext } from './element';
2
+ export { type ElementProps } from './types';
@@ -0,0 +1,21 @@
1
+ import type { ReactHTML, JSX } from 'react';
2
+ import type { SlotProps } from 'react-aria-components';
3
+ import type { ProviderValues } from '../../types';
4
+ export type ElementProps<A = any, B = any, C = any, D = any, E = any, F = any, G = any, H = any, I = any, J = any, K = any> = /**
5
+ * Initially tried to make these props generic and constrain props to element
6
+ * passed into generic, but ran into major performance issues with enormous
7
+ * type unions of all possible HTML elements props. It breaks all of TS
8
+ */ JSX.IntrinsicElements[keyof ReactHTML] & SlotProps & {
9
+ /**
10
+ * The HTML element to be rendered
11
+ */
12
+ as?: keyof ReactHTML;
13
+ /**
14
+ * Values passed to Provider, overrides parent contexts
15
+ */
16
+ values?: ProviderValues<A, B, C, D, E, F, G, H, I, J, K>;
17
+ /**
18
+ * Values passed to MergeProvider, merges with parent contexts
19
+ */
20
+ mergeValues?: ProviderValues<A, B, C, D, E, F, G, H, I, J, K>;
21
+ };
@@ -0,0 +1,14 @@
1
+ import type { GroupClassNames } from './types';
2
+ export declare const groupContainer: string;
3
+ export declare const groupSpaceVars: {
4
+ gap: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
5
+ x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
6
+ y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
7
+ };
8
+ export declare const groupStateVars: {
9
+ count: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
10
+ orientation: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
11
+ reverse: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12
+ type: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
13
+ };
14
+ export declare const groupClassNames: GroupClassNames;
@@ -0,0 +1,10 @@
1
+ import { type ReactElement } from 'react';
2
+ import type { ContextValue } from 'react-aria-components';
3
+ import type { GroupProps } from './types';
4
+ export declare const GroupContext: import("react").Context<ContextValue<GroupProps<any, Element>, HTMLDivElement>>;
5
+ /**
6
+ * This generic component allows for collective prop distribution to a collection of components of the same type
7
+ *
8
+ * @example A list of <Button />s and you want to control their size instead of passing the same props to each
9
+ */
10
+ export declare const Group: <T, E extends Element>(props: import("./types").BaseGroupProps<T, E> & import("react-aria-components").SlotProps & import("react").RefAttributes<HTMLDivElement>) => ReactElement | null;
@@ -0,0 +1,44 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, forwardRef, useMemo, Children } from 'react';
3
+ import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
4
+ import { inlineVars } from '../../utils/css.js';
5
+ import { mergeClassNames } from '../../utils/props.js';
6
+ import { useTheme } from '../../hooks/use-theme/use-theme.js';
7
+ import { MergeProvider } from '../merge-provider/merge-provider.js';
8
+ import { groupClassNames, groupStateVars } from './group.vanilla.js';
9
+
10
+ const GroupContext = (
11
+ // Unforunately, using "unknown" or "object" here creates complex type issues with <Provider />
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
+ createContext(null)
14
+ );
15
+ const Group = forwardRef(function Group2(props, ref) {
16
+ [props, ref] = useContextProps(props, ref, GroupContext);
17
+ const { children: childrenProp, classNames: classNamesProp, context, orientation = "horizontal", reverse = false, values: valuesProp } = props;
18
+ const theme = useTheme();
19
+ const classNames = useMemo(() => mergeClassNames(groupClassNames, theme.Group, classNamesProp), [theme.Group, classNamesProp]);
20
+ const style = useMemo(() => {
21
+ const types = Children.toArray(childrenProp).reduce((acc, child) => {
22
+ if (child && typeof child !== "boolean" && typeof child !== "number" && typeof child !== "string") {
23
+ const type2 = child.type;
24
+ const name = typeof type2 !== "string" ? type2.render?.name : type2;
25
+ if (name) {
26
+ acc.add(name);
27
+ }
28
+ }
29
+ return acc;
30
+ }, /* @__PURE__ */ new Set());
31
+ const type = { 0: "Empty", 1: [...types].at(0) }[types.size] ?? "Mixed";
32
+ return inlineVars(groupStateVars, {
33
+ count: Children.count(childrenProp),
34
+ orientation,
35
+ reverse,
36
+ type
37
+ });
38
+ }, [childrenProp, orientation, reverse]);
39
+ const values = useMemo(() => [[context, valuesProp]], [context, valuesProp]);
40
+ const children = useMemo(() => jsx("div", { ref, className: classNames?.container, style, children: jsx("div", { className: classNames?.group, children: childrenProp }) }), [ref, classNames?.container, classNames?.group, style, childrenProp]);
41
+ return context && valuesProp ? jsx(MergeProvider, { values, children }) : children;
42
+ });
43
+
44
+ export { Group, GroupContext };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.js","sources":["../../../src/components/group/group.tsx"],"sourcesContent":["import {\n Children,\n createContext,\n forwardRef,\n useMemo,\n type ForwardedRef,\n type ReactElement,\n} from 'react';\nimport type { ContextValue } from 'react-aria-components';\nimport { useContextProps, useTheme } from '../../hooks';\nimport { inlineVars, mergeClassNames } from '../../utils';\nimport { MergeProvider } from '../merge-provider';\nimport { groupClassNames, groupStateVars } from './group.css';\nimport type { GroupProps } from './types';\n\nexport const GroupContext =\n // Unforunately, using \"unknown\" or \"object\" here creates complex type issues with <Provider />\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n createContext<ContextValue<GroupProps<any, Element>, HTMLDivElement>>(null);\n\n/**\n * This generic component allows for collective prop distribution to a collection of components of the same type\n *\n * @example A list of <Button />s and you want to control their size instead of passing the same props to each\n */\nexport const Group = forwardRef(function Group<T, E extends Element>(\n props: GroupProps<T, E>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, GroupContext);\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n context,\n orientation = 'horizontal',\n reverse = false,\n values: valuesProp,\n } = props;\n\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(groupClassNames, theme.Group, classNamesProp),\n [theme.Group, classNamesProp],\n );\n\n const style = useMemo(() => {\n const types = Children.toArray(childrenProp).reduce<Set<string>>(\n (acc, child) => {\n if (\n child &&\n typeof child !== 'boolean' &&\n typeof child !== 'number' &&\n typeof child !== 'string'\n ) {\n const type = (child as ReactElement).type;\n // @ts-expect-error TS doesn't know about \"render\" type\n const name = typeof type !== 'string' ? type.render?.name : type;\n\n if (name) {\n acc.add(name);\n }\n }\n\n return acc;\n },\n new Set<string>(),\n );\n\n const type = { 0: 'Empty', 1: [...types].at(0) }[types.size] ?? 'Mixed';\n\n return inlineVars(groupStateVars, {\n count: Children.count(childrenProp),\n orientation,\n reverse,\n type,\n });\n }, [childrenProp, orientation, reverse]);\n\n const values = useMemo<\n [[Exclude<typeof context, undefined>, ContextValue<T, E>]]\n >(() => [[context!, valuesProp]], [context, valuesProp]);\n\n const children = useMemo(\n () => (\n <div ref={ref} className={classNames?.container} style={style}>\n <div className={classNames?.group}>{childrenProp}</div>\n </div>\n ),\n [ref, classNames?.container, classNames?.group, style, childrenProp],\n );\n\n return context && valuesProp ? (\n <MergeProvider values={values}>{children}</MergeProvider>\n ) : (\n children\n );\n});\n"],"names":["Group","type"],"mappings":";;;;;;;;;;;;;;;;AAea,MAAA,YAAA;AAAA;AAAA;AAAA,EAGX,cAAsE,IAAI,CAAA;AAAA,EAAA;AAOrE,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;AAEvD,EAAM,MAAA;AAAA,IACJ,QAAU,EAAA,YAAA;AAAA,IACV,UAAY,EAAA,cAAA;AAAA,IACZ,OAAA;AAAA,IACA,WAAc,GAAA,YAAA;AAAA,IACd,OAAU,GAAA,KAAA;AAAA,IACV,MAAQ,EAAA,UAAA;AAAA,GACN,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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AEvD,EAAA,MAAM,QAAW,GAAA,OAAA;AAAA,IACf,sBACE,GAAA,CAAC,KAAI,EAAA,EAAA,GAAA,EAAU,WAAW,UAAY,EAAA,SAAA,EAAW,KAC/C,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,UAAY,EAAA,KAAA,EAAQ,wBAAa,CACnD,EAAA,CAAA;AAAA,IAEF,CAAC,GAAK,EAAA,UAAA,EAAY,WAAW,UAAY,EAAA,KAAA,EAAO,OAAO,YAAY,CAAA;AAAA,GACrE,CAAA;AAEA,EAAA,OAAO,WAAW,UAChB,mBAAA,GAAA,CAAC,aAAc,EAAA,EAAA,MAAA,EAAiB,UAAS,CAEzC,GAAA,QAAA,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,7 @@
1
+
2
+ var groupClassNames = { container: "group_groupClassNames_container__eq8x6h8", group: "group_groupClassNames_group__eq8x6h9" };
3
+ var groupContainer = "group_groupContainer__eq8x6h0";
4
+ var groupSpaceVars = { gap: "var(--gap__eq8x6h1)", x: "var(--x__eq8x6h2)", y: "var(--y__eq8x6h3)" };
5
+ var groupStateVars = { count: "var(--count__eq8x6h4)", orientation: "var(--orientation__eq8x6h5)", reverse: "var(--reverse__eq8x6h6)", type: "var(--type__eq8x6h7)" };
6
+
7
+ export { groupClassNames, groupContainer, groupSpaceVars, groupStateVars };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ export { Group, GroupContext } from './group';
2
+ export { groupClassNames, groupContainer, groupSpaceVars, groupStateVars, } from './group.css';
3
+ export { type GroupClassNames, type GroupProps, type GroupState, } from './types';
@@ -0,0 +1,35 @@
1
+ import type { Context, ReactElement } from 'react';
2
+ import type { Orientation } from 'react-aria';
3
+ import type { ContextValue, SlotProps } from 'react-aria-components';
4
+ export type GroupClassNames = Partial<{
5
+ container: string;
6
+ group: string;
7
+ }>;
8
+ export type BaseGroupProps<T, E extends Element> = {
9
+ children?: (ReactElement | boolean | null)[];
10
+ classNames?: GroupClassNames;
11
+ context?: Context<ContextValue<T, E>>;
12
+ orientation?: Orientation;
13
+ reverse?: boolean;
14
+ values?: ContextValue<T, E>;
15
+ };
16
+ export type GroupState = {
17
+ /**
18
+ * The number of children rendered
19
+ */
20
+ count: number;
21
+ orientation: Orientation;
22
+ /**
23
+ * Whether to flip the order of the children, visually
24
+ */
25
+ reverse: boolean;
26
+ /**
27
+ * This is based off of the children types
28
+ *
29
+ * Possible values: Empty, Mixed, {component type}
30
+ *
31
+ * @example If all children are <Button />, then "type" will be `Button`
32
+ */
33
+ type: string;
34
+ };
35
+ export type GroupProps<T, E extends Element> = BaseGroupProps<T, E> & SlotProps;
@@ -0,0 +1,18 @@
1
+ import type { IconClassNames } from './types';
2
+ export declare const iconContainer: string;
3
+ export declare const iconColorVars: {
4
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
5
+ fill: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
6
+ stroke: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
7
+ };
8
+ export declare const iconSpaceVars: {
9
+ width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
10
+ height: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
11
+ };
12
+ export declare const iconStateVars: {
13
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
14
+ fill: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
15
+ size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16
+ stroke: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
17
+ };
18
+ export declare const iconClassNames: IconClassNames;
@@ -0,0 +1,12 @@
1
+ import type { ContextValue } from 'react-aria-components';
2
+ import type { IconProps } from './types';
3
+ export declare const IconContext: import("react").Context<ContextValue<IconProps, HTMLDivElement>>;
4
+ export declare const Icon: (props: Pick<import("react").CSSProperties, "fill" | "color" | "stroke"> & {
5
+ classNames?: Partial<{
6
+ container: string;
7
+ icon: string;
8
+ }> | undefined;
9
+ size?: import("./types").IconSizes;
10
+ } & import("react-aria-components").SlotProps & {
11
+ children?: import("react").ReactNode | undefined;
12
+ } & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
@@ -0,0 +1,26 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, forwardRef, useMemo } from 'react';
3
+ import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
4
+ import { useDefaultProps } from '../../hooks/use-defaults/use-defaults.js';
5
+ import { inlineVars } from '../../utils/css.js';
6
+ import { mergeClassNames } from '../../utils/props.js';
7
+ import { useTheme } from '../../hooks/use-theme/use-theme.js';
8
+ import { iconClassNames, iconStateVars } from './icon.vanilla.js';
9
+
10
+ const IconContext = createContext(null);
11
+ const Icon = forwardRef(function Icon2(props, ref) {
12
+ [props, ref] = useContextProps(props, ref, IconContext);
13
+ props = useDefaultProps(props, "Icon");
14
+ const { children, classNames: classNamesProp, color, fill, size = "relative", stroke } = props;
15
+ const theme = useTheme();
16
+ const classNames = useMemo(() => mergeClassNames(iconClassNames, theme.Icon, classNamesProp), [theme.Icon, classNamesProp]);
17
+ const style = useMemo(() => inlineVars(iconStateVars, {
18
+ color,
19
+ fill,
20
+ size,
21
+ stroke
22
+ }), [color, fill, size, stroke]);
23
+ return jsx("div", { ref, className: classNames?.container, style, children: jsx("div", { className: classNames?.icon, children }) });
24
+ });
25
+
26
+ export { Icon, IconContext };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sources":["../../../src/components/icon/icon.tsx"],"sourcesContent":["import { type ForwardedRef, createContext, forwardRef, useMemo } from 'react';\nimport type { ContextValue } from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { inlineVars, mergeClassNames } from '../../utils';\nimport { iconClassNames, iconStateVars } from './icon.css';\nimport type { IconProps } from './types';\n\nexport const IconContext =\n createContext<ContextValue<IconProps, HTMLDivElement>>(null);\n\nexport const Icon = forwardRef(function Icon(\n props: IconProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, IconContext);\n\n props = useDefaultProps(props, 'Icon');\n\n const {\n children,\n classNames: classNamesProp,\n color,\n fill,\n size = 'relative',\n stroke,\n } = props;\n\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(iconClassNames, theme.Icon, classNamesProp),\n [theme.Icon, classNamesProp],\n );\n\n const style = useMemo(\n () =>\n inlineVars(iconStateVars, {\n color,\n fill,\n size,\n stroke,\n }),\n [color, fill, size, stroke],\n );\n\n return (\n <div ref={ref} className={classNames?.container} style={style}>\n <div className={classNames?.icon}>{children}</div>\n </div>\n );\n});\n"],"names":["Icon"],"mappings":";;;;;;;;;;;;;;;AAOa,MAAA,WAAA,GACX,cAAuD,IAAI,EAAA;AAEtD,MAAM,IAAO,GAAA,UAAA,CAAW,SAASA,KAAAA,CACtC,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,WAAW,CAAA,CAAA;AAEtD,EAAQ,KAAA,GAAA,eAAA,CAAgB,OAAO,MAAM,CAAA,CAAA;AAErC,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,UAAY,EAAA,cAAA;AAAA,IACZ,KAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAO,GAAA,UAAA;AAAA,IACP,MAAA;AAAA,GACE,GAAA,KAAA,CAAA;AAEJ,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,EAAA,MAAM,UAAa,GAAA,OAAA;AAAA,IACjB,MAAM,eAAA,CAAgB,cAAgB,EAAA,KAAA,CAAM,MAAM,cAAc,CAAA;AAAA,IAChE,CAAC,KAAM,CAAA,IAAA,EAAM,cAAc,CAAA;AAAA,GAC7B,CAAA;AAEA,EAAA,MAAM,KAAQ,GAAA,OAAA;AAAA,IACZ,MACE,WAAW,aAAe,EAAA;AAAA,MACxB,KAAA;AAAA,MACA,IAAA;AAAA,MACA,IAAA;AAAA,MACA,MAAA;AAAA,KACD,CAAA;AAAA,IACH,CAAC,KAAA,EAAO,IAAM,EAAA,IAAA,EAAM,MAAM,CAAA;AAAA,GAC5B,CAAA;AAEA,EAAA,uBACG,GAAA,CAAA,KAAA,EAAA,EAAI,GAAU,EAAA,SAAA,EAAW,UAAY,EAAA,SAAA,EAAW,KAC/C,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,UAAY,EAAA,IAAA,EAAO,UAAS,CAC9C,EAAA,CAAA,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,8 @@
1
+
2
+ var iconClassNames = { container: "icon_iconClassNames_container__oeqjzpa", icon: "icon_iconClassNames_icon__oeqjzpb" };
3
+ var iconColorVars = { color: "var(--color__oeqjzp1)", fill: "var(--fill__oeqjzp2)", stroke: "var(--stroke__oeqjzp3)" };
4
+ var iconContainer = "icon_iconContainer__oeqjzp0";
5
+ var iconSpaceVars = { width: "var(--width__oeqjzp4)", height: "var(--height__oeqjzp5)" };
6
+ var iconStateVars = { color: "var(--color__oeqjzp6)", fill: "var(--fill__oeqjzp7)", size: "var(--size__oeqjzp8)", stroke: "var(--stroke__oeqjzp9)" };
7
+
8
+ export { iconClassNames, iconColorVars, iconContainer, iconSpaceVars, iconStateVars };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ export { Icon, IconContext } from './icon';
2
+ export { iconClassNames, iconColorVars, iconContainer, iconSpaceVars, iconStateVars, } from './icon.css';
3
+ export { type IconClassNames, type IconProps, type IconSizes, type IconState, } from './types';
@@ -0,0 +1,13 @@
1
+ import type { CSSProperties, PropsWithChildren } from 'react';
2
+ import type { SlotProps } from 'react-aria-components';
3
+ export type IconClassNames = Partial<{
4
+ container: string;
5
+ icon: string;
6
+ }>;
7
+ export type IconSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'relative';
8
+ export type BaseIconProps = Pick<CSSProperties, 'color' | 'fill' | 'stroke'> & {
9
+ classNames?: IconClassNames;
10
+ size?: IconSizes;
11
+ };
12
+ export type IconState = Required<Omit<BaseIconProps, 'classNames'>>;
13
+ export type IconProps = PropsWithChildren<BaseIconProps & SlotProps>;
@@ -0,0 +1,26 @@
1
+ export { AriaFieldError, AriaFieldErrorContext, AriaGroup, AriaGroupContext, AriaHeader, AriaHeaderContext, AriaHeading, AriaHeadingContext, AriaKeyboard, AriaKeyboardContext, AriaLabel, AriaLabelContext, AriaSection, AriaSectionContext, AriaSelectValue, AriaSelectValueContext, AriaSeparator, AriaSeparatorContext, AriaText, AriaTextContext, } from './aria';
2
+ export { Button, ButtonContext, LinkButton, LinkButtonContext, ToggleButton, ToggleButtonContext, buttonClassNames, buttonColorVars, buttonContainer, buttonSpaceVars, buttonStateVars, type ButtonClassNames, type ButtonColors, type ButtonMapping, type ButtonProps, type ButtonRenderProps, type ButtonSizes, type ButtonState, type LinkButtonProps, type ToggleButtonProps, } from './button';
3
+ export { Checkbox, CheckboxContext, CheckboxGroup, CheckboxGroupContext, checkboxClassNames, checkboxColorVars, checkboxContainer, checkboxGroupStateVars, checkboxSpaceVars, checkboxStateVars, type CheckboxAlignment, type CheckboxClassNames, type CheckboxGroupProps, type CheckboxGroupRenderProps, type CheckboxGroupState, type CheckboxProps, type CheckboxRenderProps, type CheckboxState, } from './checkbox';
4
+ export { Chip, ChipContext, ChipGroup, ChipGroupContext, ChipItem, ChipList, chipClassNames, chipColorVars, chipContainer, chipSpaceVars, chipStateVars, type ChipClassNames, type ChipColors, type ChipGroupProps, type ChipItemProps, type ChipListProps, type ChipMapping, type ChipProps, type ChipRenderProps, type ChipSizes, type ChipState, } from './chip';
5
+ export { createCollectionRenderer } from './collection';
6
+ export { ComboBox, ComboBoxContext, comboBoxClassNames, comboBoxColorVars, comboBoxContainer, comboBoxSpaceVars, comboBoxStateVars, type ComboBoxClassNames, type ComboBoxMapping, type ComboBoxProps, type ComboBoxRenderProps, type ComboBoxSizes, type ComboBoxState, } from './combo-box';
7
+ export { Dialog, DialogContext, dialogClassNames, dialogColorVars, dialogContainer, dialogSpaceVars, dialogStateVars, type DialogClassNames, type DialogMapping, type DialogProps, type DialogRenderProps, type DialogSizes, type DialogState, } from './dialog';
8
+ export { Drawer, DrawerDialog, DrawerTab, DrawerTabList, drawerAnimationVars, drawerClassNames, drawerColorVars, drawerContainer, drawerDialogStateVars, drawerSpaceVars, drawerStateVars, type DrawerAnchor, type DrawerClassNames, type DrawerDialogProps, type DrawerDialogState, type DrawerMapping, type DrawerProps, type DrawerRenderProps, type DrawerState, type DrawerTabListProps, type DrawerTabProps, type DrawerTabRenderProps, } from './drawer';
9
+ export { Element, ElementContext, type ElementProps } from './element';
10
+ export { Group, GroupContext, groupClassNames, groupContainer, groupSpaceVars, groupStateVars, type GroupClassNames, type GroupProps, type GroupState, } from './group';
11
+ export { Icon, IconContext, iconClassNames, iconColorVars, iconContainer, iconSpaceVars, iconStateVars, type IconClassNames, type IconProps, type IconSizes, type IconState, } from './icon';
12
+ export { Input, InputContext, inputClassNames, inputColorVars, inputContainer, inputSpaceVars, inputStateVars, type InputClassNames, type InputMapping, type InputProps, type InputRenderProps, type InputState, type InputType, } from './input';
13
+ export { Menu, MenuContext, MenuItem, MenuItemContext, MenuList, MenuListContext, menuColorVars, menuItemStateVars, menuSpaceVars, menuStateVars, type MenuClassNames, type MenuItemProps, type MenuItemRenderProps, type MenuItemState, type MenuListProps, type MenuMapping, type MenuProps, type MenuSizes, type MenuState, } from './menu';
14
+ export { MergeProvider, type MergeProviderProps } from './merge-provider';
15
+ export { Options, OptionsContext, OptionsItem, OptionsItemContext, OptionsList, OptionsListContext, optionsClassNames, optionsColorVars, optionsContainers, optionsItemStateVars, optionsListStateVars, optionsSpaceVars, optionsStateVars, type OptionsClassNames, type OptionsItemProps, type OptionsItemState, type OptionsListProps, type OptionsListState, type OptionsMapping, type OptionsProps, type OptionsSizes, type OptionsState, } from './options';
16
+ export { Picker, PickerContext, PickerItem, PickerItemContext, pickerClassNames, pickerContainers, pickerItemColorVars, pickerItemStateVars, pickerSpaceVars, pickerStateVars, type PickerClassNames, type PickerItemProps, type PickerItemRenderProps, type PickerItemState, type PickerProps, type PickerState, } from './picker';
17
+ export { Popover, PopoverContext, popoverClassNames, popoverColorVars, popoverSpaceVars, popoverStateVars, type PopoverClassNames, type PopoverProps, type PopoverState, } from './popover';
18
+ export { pressToMouseEvent, QueryBuilder, QueryBuilderContext, type QueryBuilderClassNames, type QueryBuilderContextValue, type QueryBuilderGroupState, type QueryBuilderMapping, type QueryBuilderProps, type QueryBuilderRuleState, type QueryBuilderSizes, type QueryBuilderState, type QueryBuilderValueEditors, queryBuilderClassNames, queryBuilderColorVars, queryBuilderContainers, queryBuilderGroupStateVars, queryBuilderRuleStateVars, queryBuilderSpaceVars, queryBuilderStateVars, } from './query-builder';
19
+ export { Radio, RadioContext, RadioGroup, RadioGroupContext, radioClassNames, radioColorVars, radioGroupStateVars, radioSpaceVars, radioStateVars, type RadioAlignment, type RadioClassNames, type RadioGroupProps, type RadioGroupState, type RadioProps, type RadioState, } from './radio';
20
+ export { SearchField, SearchFieldContext, searchFieldClassNames, searchFieldContainer, searchFieldSpaceVars, searchFieldStateVars, type SearchFieldClassNames, type SearchFieldMapping, type SearchFieldProps, type SearchFieldRenderProps, type SearchFieldState, } from './search-field';
21
+ export { Select, SelectContext, selectClassNames, selectColorVars, selectContainer, selectSpaceVars, selectStateVars, type SelectClassNames, type SelectMapping, type SelectProps, type SelectRenderProps, type SelectState, } from './select';
22
+ export { Switch, SwitchContext, switchClassNames, switchColorVars, switchContainer, switchSpaceVars, switchStateVars, type SwitchAlignment, type SwitchClassNames, type SwitchProps, type SwitchRenderProps, type SwitchState, } from './switch';
23
+ export { Tab, TabContext, TabList, TabListContext, TabPanel, TabPanelContext, TabPanels, TabPanelsContext, Tabs, TabsContext, tabColorVars, tabListStateVars, tabPanelStateVars, tabPanelsStateVars, tabSpaceVars, tabStateVars, tabsClassNames, tabsContainers, type TabListAlignment, type TabListAnchor, 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 './tabs';
24
+ export { TextArea, TextAreaContext, textAreaClassNames, textAreaColorVars, textAreaContainer, textAreaSpaceVars, textAreaStateVars, type TextAreaClassNames, type TextAreaProps, type TextAreaRenderProps, type TextAreaState, } from './textarea';
25
+ export { Tooltip, TooltipContext, TooltipTarget, TooltipTargetContext, tooltipClassNames, tooltipContainers, tooltipSpaceVars, tooltipStateVars, tooltipTargetStateVars, type TooltipClassNames, type TooltipMapping, type TooltipProps, type TooltipRenderProps, type TooltipState, type TooltipTargetProps, type TooltipTargetState, } from './tooltip';
26
+ export { Tree, TreeGroup, TreeItem, TreeStateContext, treeClassNames, treeColorVars, treeContainers, treeGroupStateVars, treeIndicatorStateVars, treeItemStateVars, treeSpaceVars, treeStateVars, type TreeClassNames, type TreeGroupProps, type TreeGroupRenderProps, type TreeGroupState, type TreeIndicatorRenderProps, type TreeIndicatorState, type TreeItemProps, type TreeItemRenderProps, type TreeItemState, type TreeMapping, type TreeProps, type TreeRenderProps, type TreeSizes, type TreeState, type TreeStateContextValue, } from './tree';
@@ -0,0 +1,3 @@
1
+ export { Input, InputContext } from './input';
2
+ export { inputClassNames, inputContainer, inputColorVars, inputSpaceVars, inputStateVars, } from './input.css';
3
+ export { type InputClassNames, type InputMapping, type InputProps, type InputRenderProps, type InputState, type InputSize, type InputType, } from './types';
@@ -0,0 +1,29 @@
1
+ import type { InputClassNames } from './types';
2
+ export declare const inputContainer: string;
3
+ export declare const inputColorVars: {
4
+ background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
5
+ border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
6
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
7
+ };
8
+ export declare const inputSpaceVars: {
9
+ minWidth: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
10
+ width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
11
+ maxWidth: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12
+ x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
13
+ y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
14
+ };
15
+ export declare const inputStateVars: {
16
+ length: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
17
+ size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
18
+ type: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
19
+ isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
20
+ isEmpty: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
21
+ isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
22
+ isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
23
+ isHovered: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
24
+ isInvalid: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
25
+ isPlaceholder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
26
+ isReadOnly: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
27
+ isRequired: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
28
+ };
29
+ export declare const inputClassNames: InputClassNames;
@@ -0,0 +1,8 @@
1
+ import { type ContextValue, type InputProps as RACInputProps } from 'react-aria-components';
2
+ import type { InputProps } from './types';
3
+ export declare const InputContext: import("react").Context<ContextValue<InputProps, HTMLInputElement>>;
4
+ /**
5
+ * Only intended for generic text-like inputs, see types in props for list
6
+ * Other more specific inputs should be handled by other components
7
+ */
8
+ export declare const Input: (props: Omit<RACInputProps, "children" | "className" | "style" | "size" | "type"> & import("./types").BaseInputProps & import("react").RefAttributes<HTMLInputElement>) => import("react").ReactElement | null;
@@ -0,0 +1,93 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useControlledState } from '@react-stately/utils';
3
+ import { createContext, forwardRef, useMemo, useCallback } from 'react';
4
+ import { useFocusRing, useHover } from 'react-aria';
5
+ import { InputContext as InputContext$1 } from 'react-aria-components';
6
+ import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
7
+ import { useDefaultProps } from '../../hooks/use-defaults/use-defaults.js';
8
+ import { inlineVars } from '../../utils/css.js';
9
+ import { mergeClassNames, mergeProps } from '../../utils/props.js';
10
+ import { useTheme } from '../../hooks/use-theme/use-theme.js';
11
+ import { inputs } from '../../styles/typography.vanilla.js';
12
+ import { inputClassNames, inputStateVars } from './input.vanilla.js';
13
+
14
+ const defaultMapping = {
15
+ sizer: {
16
+ sm: inputs.sm,
17
+ lg: inputs.lg
18
+ },
19
+ input: {
20
+ sm: inputs.sm,
21
+ lg: inputs.lg
22
+ }
23
+ };
24
+ const InputContext = createContext(null);
25
+ const Input = forwardRef(function Input2(props, ref) {
26
+ [props, ref] = useContextProps(props, ref, InputContext$1);
27
+ delete props.className;
28
+ delete props.style;
29
+ [props, ref] = useContextProps(props, ref, InputContext);
30
+ props = useDefaultProps(props, "Input");
31
+ const { classNames: classNamesProp, defaultValue = "", disabled: isDisabled = false, mapping: mappingProp, placeholder, readOnly: isReadOnly = false, required: isRequired = false, size = "lg", type = "text", value: valueProp, onChange, onHoverStart, onHoverChange, onHoverEnd, "aria-invalid": ariaInvalid, ...rest } = props;
32
+ const [value, setValue] = useControlledState(valueProp, defaultValue);
33
+ const length = (`${value ?? ""}`.length || placeholder?.length) ?? 0;
34
+ const isInvalid = !!ariaInvalid && ariaInvalid !== "false";
35
+ const isPlaceholder = !!placeholder && !value;
36
+ const isEmpty = !value;
37
+ const { isFocused, isFocusVisible, focusProps } = useFocusRing({
38
+ autoFocus: props.autoFocus,
39
+ isTextInput: true
40
+ });
41
+ const { hoverProps, isHovered } = useHover({
42
+ isDisabled,
43
+ onHoverStart,
44
+ onHoverChange,
45
+ onHoverEnd
46
+ });
47
+ const theme = useTheme();
48
+ const mapping = useMemo(() => ({
49
+ ...defaultMapping,
50
+ ...mappingProp
51
+ }), [mappingProp]);
52
+ const classNames = useMemo(() => mergeClassNames(inputClassNames, theme.Input, classNamesProp, {
53
+ sizer: mapping.sizer[size],
54
+ input: mapping.input[size]
55
+ }), [theme.Input, classNamesProp, mapping, size]);
56
+ const mergedProps = useMemo(() => mergeProps(rest, focusProps, hoverProps), [focusProps, hoverProps, rest]);
57
+ const style = useMemo(() => inlineVars(inputStateVars, {
58
+ length,
59
+ size,
60
+ type,
61
+ isDisabled,
62
+ isEmpty,
63
+ isFocused,
64
+ isFocusVisible,
65
+ isHovered,
66
+ isInvalid,
67
+ isPlaceholder,
68
+ isReadOnly,
69
+ isRequired
70
+ }), [
71
+ length,
72
+ size,
73
+ type,
74
+ isDisabled,
75
+ isEmpty,
76
+ isFocused,
77
+ isFocusVisible,
78
+ isHovered,
79
+ isInvalid,
80
+ isPlaceholder,
81
+ isReadOnly,
82
+ isRequired
83
+ ]);
84
+ const handleChange = useCallback((event) => {
85
+ onChange?.(event);
86
+ if (!event.defaultPrevented) {
87
+ setValue(event.target.value);
88
+ }
89
+ }, [onChange, setValue]);
90
+ return jsx("div", { className: classNames?.container, style, children: jsx("div", { className: classNames?.sizer, children: jsx("input", { ...mergedProps, ref, className: classNames?.input, disabled: isDisabled, placeholder, readOnly: isReadOnly, required: isRequired, type, value, onChange: handleChange, "aria-invalid": ariaInvalid }) }) });
91
+ });
92
+
93
+ export { Input, InputContext };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sources":["../../../src/components/input/input.tsx"],"sourcesContent":["import { useControlledState } from '@react-stately/utils';\nimport {\n type ChangeEvent,\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n} from 'react';\nimport { useFocusRing, useHover } from 'react-aria';\nimport {\n type ContextValue,\n InputContext as RACInputContext,\n type InputProps as RACInputProps,\n} from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { inputs } from '../../styles';\nimport { inlineVars, mergeClassNames, mergeProps } from '../../utils';\nimport { inputClassNames, inputStateVars } from './input.css';\nimport type { InputMapping, InputProps } from './types';\n\nconst defaultMapping: InputMapping = {\n sizer: {\n sm: inputs.sm,\n lg: inputs.lg,\n },\n input: {\n sm: inputs.sm,\n lg: inputs.lg,\n },\n};\n\nexport const InputContext =\n createContext<ContextValue<InputProps, HTMLInputElement>>(null);\n\n/**\n * Only intended for generic text-like inputs, see types in props for list\n * Other more specific inputs should be handled by other components\n */\nexport const Input = forwardRef(function Input(\n props: InputProps,\n ref: ForwardedRef<HTMLInputElement>,\n) {\n [props, ref] = useContextProps(props, ref, RACInputContext);\n\n // Disallow props possibly provided by React Aria context\n // could be render props functions we don't want to support\n delete (props as RACInputProps).className;\n delete (props as RACInputProps).style;\n\n // Duplicate context prop merging to support React Aria's context\n // and our own which establishes a superset type for the props\n [props, ref] = useContextProps(props, ref, InputContext);\n\n props = useDefaultProps(props, 'Input');\n\n const {\n classNames: classNamesProp,\n defaultValue = '',\n disabled: isDisabled = false,\n mapping: mappingProp,\n placeholder,\n readOnly: isReadOnly = false,\n required: isRequired = false,\n size = 'lg',\n type = 'text',\n value: valueProp,\n onChange,\n onHoverStart,\n onHoverChange,\n onHoverEnd,\n 'aria-invalid': ariaInvalid,\n ...rest\n } = props;\n\n const [value, setValue] = useControlledState(valueProp, defaultValue);\n const length = (`${value ?? ''}`.length || placeholder?.length) ?? 0;\n const isInvalid = !!ariaInvalid && ariaInvalid !== 'false';\n const isPlaceholder = !!placeholder && !value;\n const isEmpty = !value;\n\n const { isFocused, isFocusVisible, focusProps } = useFocusRing({\n autoFocus: props.autoFocus,\n isTextInput: true,\n });\n\n const { hoverProps, isHovered } = useHover({\n isDisabled,\n onHoverStart,\n onHoverChange,\n onHoverEnd,\n });\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(inputClassNames, theme.Input, classNamesProp, {\n sizer: mapping.sizer[size],\n input: mapping.input[size],\n }),\n [theme.Input, classNamesProp, mapping, size],\n );\n\n const mergedProps = useMemo(\n () => mergeProps(rest, focusProps, hoverProps),\n [focusProps, hoverProps, rest],\n );\n\n const style = useMemo(\n () =>\n inlineVars(inputStateVars, {\n length,\n size,\n type,\n isDisabled,\n isEmpty,\n isFocused,\n isFocusVisible,\n isHovered,\n isInvalid,\n isPlaceholder,\n isReadOnly,\n isRequired,\n }),\n [\n length,\n size,\n type,\n isDisabled,\n isEmpty,\n isFocused,\n isFocusVisible,\n isHovered,\n isInvalid,\n isPlaceholder,\n isReadOnly,\n isRequired,\n ],\n );\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n onChange?.(event);\n\n if (!event.defaultPrevented) {\n setValue(event.target.value);\n }\n },\n [onChange, setValue],\n );\n\n return (\n <div className={classNames?.container} style={style}>\n <div className={classNames?.sizer}>\n <input\n {...mergedProps}\n ref={ref}\n className={classNames?.input}\n disabled={isDisabled}\n placeholder={placeholder}\n readOnly={isReadOnly}\n required={isRequired}\n type={type}\n value={value}\n onChange={handleChange}\n aria-invalid={ariaInvalid}\n />\n </div>\n </div>\n );\n});\n"],"names":["Input","RACInputContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,cAA+B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A;AAAA,MACA,WAAW,UAAY,EAAA,KAAA;AAAA,MACvB,QAAU,EAAA,UAAA;AAAA,MACV,WAAA;AAAA,MACA,QAAU,EAAA,UAAA;AAAA,MACV,QAAU,EAAA,UAAA;AAAA,MACV,IAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAU,EAAA,YAAA;AAAA,MACV,cAAc,EAAA,WAAA;AAAA,KAAA;AAAA,KAElB,CACF,EAAA,CAAA,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,8 @@
1
+
2
+ var inputClassNames = { container: "input_inputClassNames_container__6yc0ril", sizer: "input_inputClassNames_sizer__6yc0rim", input: "input_inputClassNames_input__6yc0rin" };
3
+ var inputColorVars = { background: "var(--background__6yc0ri1)", border: "var(--border__6yc0ri2)", color: "var(--color__6yc0ri3)" };
4
+ var inputContainer = "input_inputContainer__6yc0ri0";
5
+ var inputSpaceVars = { minWidth: "var(--minWidth__6yc0ri4)", width: "var(--width__6yc0ri5)", maxWidth: "var(--maxWidth__6yc0ri6)", x: "var(--x__6yc0ri7)", y: "var(--y__6yc0ri8)" };
6
+ var inputStateVars = { length: "var(--length__6yc0ri9)", size: "var(--size__6yc0ria)", type: "var(--type__6yc0rib)", isDisabled: "var(--isDisabled__6yc0ric)", isEmpty: "var(--isEmpty__6yc0rid)", isFocused: "var(--isFocused__6yc0rie)", isFocusVisible: "var(--isFocusVisible__6yc0rif)", isHovered: "var(--isHovered__6yc0rig)", isInvalid: "var(--isInvalid__6yc0rih)", isPlaceholder: "var(--isPlaceholder__6yc0rii)", isReadOnly: "var(--isReadOnly__6yc0rij)", isRequired: "var(--isRequired__6yc0rik)" };
7
+
8
+ export { inputClassNames, inputColorVars, inputContainer, inputSpaceVars, inputStateVars };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -0,0 +1,44 @@
1
+ import type { AsType } from '../../types';
2
+ import type { InputRenderProps as RACInputRenderProps, InputProps as RACInputProps } from 'react-aria-components';
3
+ export type InputClassNames = Partial<{
4
+ container: string;
5
+ sizer: string;
6
+ input: string;
7
+ }>;
8
+ export type InputRenderProps = AsType<RACInputRenderProps> & {
9
+ /**
10
+ * If value is undefined or empty
11
+ */
12
+ isEmpty: boolean;
13
+ /**
14
+ * If placeholder is provided and value is undefined or empty
15
+ */
16
+ isPlaceholder: boolean;
17
+ /**
18
+ * If read only
19
+ */
20
+ isReadOnly: boolean;
21
+ /**
22
+ * If required
23
+ */
24
+ isRequired: boolean;
25
+ };
26
+ export type InputSize = 'sm' | 'lg';
27
+ export type InputMapping = {
28
+ sizer: Partial<Record<InputSize, string>>;
29
+ input: Partial<Record<InputSize, string>>;
30
+ };
31
+ export type InputType = 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url';
32
+ export type BaseInputProps = {
33
+ classNames?: InputClassNames;
34
+ mapping?: Partial<InputMapping>;
35
+ size?: InputSize;
36
+ type?: InputType;
37
+ };
38
+ export type InputState = InputRenderProps & Required<Pick<BaseInputProps, 'size' | 'type'>> & {
39
+ /**
40
+ * The length of the input value or placeholder (whichever is currently rendered)
41
+ */
42
+ length: string;
43
+ };
44
+ export type InputProps = Omit<RACInputProps, 'children' | 'className' | 'size' | 'style' | 'type'> & BaseInputProps;
@@ -0,0 +1,3 @@
1
+ export { Menu, MenuContext, MenuList, MenuListContext, MenuItem, MenuItemContext, } from './menu';
2
+ export { type MenuClassNames, type MenuItemProps, type MenuItemRenderProps, type MenuItemState, type MenuListProps, type MenuMapping, type MenuProps, type MenuRenderProps, type MenuSizes, type MenuState, } from './types';
3
+ export { menuColorVars, menuItemStateVars, menuSpaceVars, menuStateVars, } from './menu.css';