@proyecto-viviana/solidaria-components 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/dist/ActionBar.js +184 -0
  2. package/dist/ActionBar.js.map +1 -0
  3. package/dist/ActionBar.jsx +128 -0
  4. package/dist/ActionBar.jsx.map +1 -0
  5. package/dist/ActionGroup.js +179 -0
  6. package/dist/ActionGroup.js.map +1 -0
  7. package/dist/ActionGroup.jsx +129 -0
  8. package/dist/ActionGroup.jsx.map +1 -0
  9. package/dist/Alert.js +111 -0
  10. package/dist/Alert.js.map +1 -0
  11. package/dist/Alert.jsx +82 -0
  12. package/dist/Alert.jsx.map +1 -0
  13. package/dist/Autocomplete.js +130 -0
  14. package/dist/Autocomplete.js.map +1 -0
  15. package/dist/Autocomplete.jsx +116 -0
  16. package/dist/Autocomplete.jsx.map +1 -0
  17. package/dist/Breadcrumbs.d.ts.map +1 -1
  18. package/dist/Breadcrumbs.js +334 -0
  19. package/dist/Breadcrumbs.js.map +1 -0
  20. package/dist/Breadcrumbs.jsx +266 -0
  21. package/dist/Breadcrumbs.jsx.map +1 -0
  22. package/dist/Button.d.ts.map +1 -1
  23. package/dist/Button.js +348 -0
  24. package/dist/Button.js.map +1 -0
  25. package/dist/Button.jsx +314 -0
  26. package/dist/Button.jsx.map +1 -0
  27. package/dist/Calendar.d.ts +4 -4
  28. package/dist/Calendar.d.ts.map +1 -1
  29. package/dist/Calendar.js +538 -0
  30. package/dist/Calendar.js.map +1 -0
  31. package/dist/Calendar.jsx +333 -0
  32. package/dist/Calendar.jsx.map +1 -0
  33. package/dist/CalendarPicker.d.ts +33 -0
  34. package/dist/CalendarPicker.d.ts.map +1 -0
  35. package/dist/CalendarPicker.js +44 -0
  36. package/dist/CalendarPicker.js.map +1 -0
  37. package/dist/CalendarPicker.jsx +44 -0
  38. package/dist/CalendarPicker.jsx.map +1 -0
  39. package/dist/Checkbox.d.ts +83 -4
  40. package/dist/Checkbox.d.ts.map +1 -1
  41. package/dist/Checkbox.js +923 -0
  42. package/dist/Checkbox.js.map +1 -0
  43. package/dist/Checkbox.jsx +707 -0
  44. package/dist/Checkbox.jsx.map +1 -0
  45. package/dist/Collection.d.ts.map +1 -1
  46. package/dist/Collection.js +202 -0
  47. package/dist/Collection.js.map +1 -0
  48. package/dist/Collection.jsx +152 -0
  49. package/dist/Collection.jsx.map +1 -0
  50. package/dist/Color.d.ts.map +1 -1
  51. package/dist/Color.js +1720 -0
  52. package/dist/Color.js.map +1 -0
  53. package/dist/Color.jsx +1344 -0
  54. package/dist/Color.jsx.map +1 -0
  55. package/dist/ColorEditor.js +208 -0
  56. package/dist/ColorEditor.js.map +1 -0
  57. package/dist/ColorEditor.jsx +120 -0
  58. package/dist/ColorEditor.jsx.map +1 -0
  59. package/dist/ComboBox.d.ts +8 -5
  60. package/dist/ComboBox.d.ts.map +1 -1
  61. package/dist/ComboBox.js +992 -0
  62. package/dist/ComboBox.js.map +1 -0
  63. package/dist/ComboBox.jsx +714 -0
  64. package/dist/ComboBox.jsx.map +1 -0
  65. package/dist/ContextualHelpTrigger.js +146 -0
  66. package/dist/ContextualHelpTrigger.js.map +1 -0
  67. package/dist/ContextualHelpTrigger.jsx +109 -0
  68. package/dist/ContextualHelpTrigger.jsx.map +1 -0
  69. package/dist/DateField.d.ts +3 -3
  70. package/dist/DateField.d.ts.map +1 -1
  71. package/dist/DateField.js +4 -0
  72. package/dist/DateField.jsx +4 -0
  73. package/dist/DateField2.js +499 -0
  74. package/dist/DateField2.js.map +1 -0
  75. package/dist/DateField2.jsx +317 -0
  76. package/dist/DateField2.jsx.map +1 -0
  77. package/dist/DatePicker.d.ts +4 -4
  78. package/dist/DatePicker.d.ts.map +1 -1
  79. package/dist/DatePicker.js +991 -0
  80. package/dist/DatePicker.js.map +1 -0
  81. package/dist/DatePicker.jsx +682 -0
  82. package/dist/DatePicker.jsx.map +1 -0
  83. package/dist/Dialog.d.ts.map +1 -1
  84. package/dist/Dialog.js +337 -0
  85. package/dist/Dialog.js.map +1 -0
  86. package/dist/Dialog.jsx +192 -0
  87. package/dist/Dialog.jsx.map +1 -0
  88. package/dist/Disclosure.d.ts.map +1 -1
  89. package/dist/Disclosure.js +328 -0
  90. package/dist/Disclosure.js.map +1 -0
  91. package/dist/Disclosure.jsx +230 -0
  92. package/dist/Disclosure.jsx.map +1 -0
  93. package/dist/DragAndDrop.d.ts.map +1 -1
  94. package/dist/DragAndDrop.js +176 -0
  95. package/dist/DragAndDrop.js.map +1 -0
  96. package/dist/DragAndDrop.jsx +160 -0
  97. package/dist/DragAndDrop.jsx.map +1 -0
  98. package/dist/DropZone.d.ts.map +1 -1
  99. package/dist/DropZone.js +189 -0
  100. package/dist/DropZone.js.map +1 -0
  101. package/dist/DropZone.jsx +144 -0
  102. package/dist/DropZone.jsx.map +1 -0
  103. package/dist/FieldError.js +66 -0
  104. package/dist/FieldError.js.map +1 -0
  105. package/dist/FieldError.jsx +47 -0
  106. package/dist/FieldError.jsx.map +1 -0
  107. package/dist/FileTrigger.js +79 -0
  108. package/dist/FileTrigger.js.map +1 -0
  109. package/dist/FileTrigger.jsx +49 -0
  110. package/dist/FileTrigger.jsx.map +1 -0
  111. package/dist/Focusable.js +70 -0
  112. package/dist/Focusable.js.map +1 -0
  113. package/dist/Focusable.jsx +69 -0
  114. package/dist/Focusable.jsx.map +1 -0
  115. package/dist/Form.js +99 -0
  116. package/dist/Form.js.map +1 -0
  117. package/dist/Form.jsx +73 -0
  118. package/dist/Form.jsx.map +1 -0
  119. package/dist/GridList.d.ts +34 -2
  120. package/dist/GridList.d.ts.map +1 -1
  121. package/dist/GridList.js +723 -0
  122. package/dist/GridList.js.map +1 -0
  123. package/dist/GridList.jsx +552 -0
  124. package/dist/GridList.jsx.map +1 -0
  125. package/dist/HiddenTimeInput.js +104 -0
  126. package/dist/HiddenTimeInput.js.map +1 -0
  127. package/dist/HiddenTimeInput.jsx +69 -0
  128. package/dist/HiddenTimeInput.jsx.map +1 -0
  129. package/dist/Icon.d.ts.map +1 -1
  130. package/dist/Icon.js +127 -0
  131. package/dist/Icon.js.map +1 -0
  132. package/dist/Icon.jsx +72 -0
  133. package/dist/Icon.jsx.map +1 -0
  134. package/dist/Keyboard.js +30 -0
  135. package/dist/Keyboard.js.map +1 -0
  136. package/dist/Keyboard.jsx +24 -0
  137. package/dist/Keyboard.jsx.map +1 -0
  138. package/dist/Landmark.js +134 -0
  139. package/dist/Landmark.js.map +1 -0
  140. package/dist/Landmark.jsx +118 -0
  141. package/dist/Landmark.jsx.map +1 -0
  142. package/dist/Link.d.ts.map +1 -1
  143. package/dist/Link.js +219 -0
  144. package/dist/Link.js.map +1 -0
  145. package/dist/Link.jsx +189 -0
  146. package/dist/Link.jsx.map +1 -0
  147. package/dist/ListBox.d.ts.map +1 -1
  148. package/dist/ListBox.js +670 -0
  149. package/dist/ListBox.js.map +1 -0
  150. package/dist/ListBox.jsx +508 -0
  151. package/dist/ListBox.jsx.map +1 -0
  152. package/dist/Menu.d.ts +27 -9
  153. package/dist/Menu.d.ts.map +1 -1
  154. package/dist/Menu.js +1254 -0
  155. package/dist/Menu.js.map +1 -0
  156. package/dist/Menu.jsx +1042 -0
  157. package/dist/Menu.jsx.map +1 -0
  158. package/dist/Meter.d.ts.map +1 -1
  159. package/dist/Meter.js +123 -0
  160. package/dist/Meter.js.map +1 -0
  161. package/dist/Meter.jsx +107 -0
  162. package/dist/Meter.jsx.map +1 -0
  163. package/dist/Modal.d.ts.map +1 -1
  164. package/dist/Modal.js +380 -0
  165. package/dist/Modal.js.map +1 -0
  166. package/dist/Modal.jsx +314 -0
  167. package/dist/Modal.jsx.map +1 -0
  168. package/dist/NumberField.d.ts +3 -3
  169. package/dist/NumberField.d.ts.map +1 -1
  170. package/dist/NumberField.js +573 -0
  171. package/dist/NumberField.js.map +1 -0
  172. package/dist/NumberField.jsx +443 -0
  173. package/dist/NumberField.jsx.map +1 -0
  174. package/dist/Popover.d.ts +10 -2
  175. package/dist/Popover.d.ts.map +1 -1
  176. package/dist/Popover.js +464 -0
  177. package/dist/Popover.js.map +1 -0
  178. package/dist/Popover.jsx +333 -0
  179. package/dist/Popover.jsx.map +1 -0
  180. package/dist/Pressable.js +69 -0
  181. package/dist/Pressable.js.map +1 -0
  182. package/dist/Pressable.jsx +68 -0
  183. package/dist/Pressable.jsx.map +1 -0
  184. package/dist/ProgressBar.d.ts.map +1 -1
  185. package/dist/ProgressBar.js +130 -0
  186. package/dist/ProgressBar.js.map +1 -0
  187. package/dist/ProgressBar.jsx +114 -0
  188. package/dist/ProgressBar.jsx.map +1 -0
  189. package/dist/RadioGroup.d.ts +82 -4
  190. package/dist/RadioGroup.d.ts.map +1 -1
  191. package/dist/RadioGroup.js +931 -0
  192. package/dist/RadioGroup.js.map +1 -0
  193. package/dist/RadioGroup.jsx +681 -0
  194. package/dist/RadioGroup.jsx.map +1 -0
  195. package/dist/RangeCalendar.d.ts.map +1 -1
  196. package/dist/RangeCalendar.js +410 -0
  197. package/dist/RangeCalendar.js.map +1 -0
  198. package/dist/RangeCalendar.jsx +253 -0
  199. package/dist/RangeCalendar.jsx.map +1 -0
  200. package/dist/RouterProvider.js +118 -0
  201. package/dist/RouterProvider.js.map +1 -0
  202. package/dist/RouterProvider.jsx +112 -0
  203. package/dist/RouterProvider.jsx.map +1 -0
  204. package/dist/SearchField.d.ts +2 -2
  205. package/dist/SearchField.d.ts.map +1 -1
  206. package/dist/SearchField.js +643 -0
  207. package/dist/SearchField.js.map +1 -0
  208. package/dist/SearchField.jsx +526 -0
  209. package/dist/SearchField.jsx.map +1 -0
  210. package/dist/Select.d.ts.map +1 -1
  211. package/dist/Select.js +1031 -0
  212. package/dist/Select.js.map +1 -0
  213. package/dist/Select.jsx +744 -0
  214. package/dist/Select.jsx.map +1 -0
  215. package/dist/SelectionIndicator.d.ts.map +1 -1
  216. package/dist/SelectionIndicator.js +86 -0
  217. package/dist/SelectionIndicator.js.map +1 -0
  218. package/dist/SelectionIndicator.jsx +50 -0
  219. package/dist/SelectionIndicator.jsx.map +1 -0
  220. package/dist/Separator.js +97 -0
  221. package/dist/Separator.js.map +1 -0
  222. package/dist/Separator.jsx +85 -0
  223. package/dist/Separator.jsx.map +1 -0
  224. package/dist/SharedElementTransition.d.ts.map +1 -1
  225. package/dist/SharedElementTransition.js +165 -0
  226. package/dist/SharedElementTransition.js.map +1 -0
  227. package/dist/SharedElementTransition.jsx +138 -0
  228. package/dist/SharedElementTransition.jsx.map +1 -0
  229. package/dist/Slider.d.ts +33 -1
  230. package/dist/Slider.d.ts.map +1 -1
  231. package/dist/Slider.js +515 -0
  232. package/dist/Slider.js.map +1 -0
  233. package/dist/Slider.jsx +403 -0
  234. package/dist/Slider.jsx.map +1 -0
  235. package/dist/StepList.js +198 -0
  236. package/dist/StepList.js.map +1 -0
  237. package/dist/StepList.jsx +141 -0
  238. package/dist/StepList.jsx.map +1 -0
  239. package/dist/Switch.d.ts +65 -2
  240. package/dist/Switch.d.ts.map +1 -1
  241. package/dist/Switch.js +534 -0
  242. package/dist/Switch.js.map +1 -0
  243. package/dist/Switch.jsx +393 -0
  244. package/dist/Switch.jsx.map +1 -0
  245. package/dist/Table.d.ts +48 -0
  246. package/dist/Table.d.ts.map +1 -1
  247. package/dist/Table.js +1759 -0
  248. package/dist/Table.js.map +1 -0
  249. package/dist/Table.jsx +1348 -0
  250. package/dist/Table.jsx.map +1 -0
  251. package/dist/Tabs.d.ts +0 -4
  252. package/dist/Tabs.d.ts.map +1 -1
  253. package/dist/Tabs.js +595 -0
  254. package/dist/Tabs.js.map +1 -0
  255. package/dist/Tabs.jsx +367 -0
  256. package/dist/Tabs.jsx.map +1 -0
  257. package/dist/TagGroup.d.ts.map +1 -1
  258. package/dist/TagGroup.js +378 -0
  259. package/dist/TagGroup.js.map +1 -0
  260. package/dist/TagGroup.jsx +270 -0
  261. package/dist/TagGroup.jsx.map +1 -0
  262. package/dist/Text.d.ts +18 -6
  263. package/dist/Text.d.ts.map +1 -1
  264. package/dist/Text.js +42 -0
  265. package/dist/Text.js.map +1 -0
  266. package/dist/Text.jsx +35 -0
  267. package/dist/Text.jsx.map +1 -0
  268. package/dist/TextField.d.ts +7 -6
  269. package/dist/TextField.d.ts.map +1 -1
  270. package/dist/TextField.js +436 -0
  271. package/dist/TextField.js.map +1 -0
  272. package/dist/TextField.jsx +403 -0
  273. package/dist/TextField.jsx.map +1 -0
  274. package/dist/TimeField.d.ts +3 -3
  275. package/dist/TimeField.d.ts.map +1 -1
  276. package/dist/TimeField.js +372 -0
  277. package/dist/TimeField.js.map +1 -0
  278. package/dist/TimeField.jsx +224 -0
  279. package/dist/TimeField.jsx.map +1 -0
  280. package/dist/Toast.d.ts +14 -0
  281. package/dist/Toast.d.ts.map +1 -1
  282. package/dist/Toast.js +551 -0
  283. package/dist/Toast.js.map +1 -0
  284. package/dist/Toast.jsx +361 -0
  285. package/dist/Toast.jsx.map +1 -0
  286. package/dist/ToggleButton.d.ts.map +1 -1
  287. package/dist/ToggleButton.js +123 -0
  288. package/dist/ToggleButton.js.map +1 -0
  289. package/dist/ToggleButton.jsx +88 -0
  290. package/dist/ToggleButton.jsx.map +1 -0
  291. package/dist/ToggleButtonGroup.d.ts.map +1 -1
  292. package/dist/ToggleButtonGroup.js +114 -0
  293. package/dist/ToggleButtonGroup.js.map +1 -0
  294. package/dist/ToggleButtonGroup.jsx +85 -0
  295. package/dist/ToggleButtonGroup.jsx.map +1 -0
  296. package/dist/Toolbar.js +112 -0
  297. package/dist/Toolbar.js.map +1 -0
  298. package/dist/Toolbar.jsx +92 -0
  299. package/dist/Toolbar.jsx.map +1 -0
  300. package/dist/Tooltip.d.ts.map +1 -1
  301. package/dist/Tooltip.js +539 -0
  302. package/dist/Tooltip.js.map +1 -0
  303. package/dist/Tooltip.jsx +465 -0
  304. package/dist/Tooltip.jsx.map +1 -0
  305. package/dist/Tree.d.ts +14 -2
  306. package/dist/Tree.d.ts.map +1 -1
  307. package/dist/Tree.js +1424 -0
  308. package/dist/Tree.js.map +1 -0
  309. package/dist/Tree.jsx +1172 -0
  310. package/dist/Tree.jsx.map +1 -0
  311. package/dist/Virtualizer.d.ts +16 -2
  312. package/dist/Virtualizer.d.ts.map +1 -1
  313. package/dist/Virtualizer.js +2 -0
  314. package/dist/Virtualizer.jsx +2 -0
  315. package/dist/Virtualizer2.js +751 -0
  316. package/dist/Virtualizer2.js.map +1 -0
  317. package/dist/Virtualizer2.jsx +730 -0
  318. package/dist/Virtualizer2.jsx.map +1 -0
  319. package/dist/VirtualizerLayouts.d.ts +18 -0
  320. package/dist/VirtualizerLayouts.d.ts.map +1 -1
  321. package/dist/VisuallyHidden.js +42 -0
  322. package/dist/VisuallyHidden.js.map +1 -0
  323. package/dist/VisuallyHidden.jsx +35 -0
  324. package/dist/VisuallyHidden.jsx.map +1 -0
  325. package/dist/contexts.js +33 -0
  326. package/dist/contexts.js.map +1 -0
  327. package/dist/contexts.jsx +33 -0
  328. package/dist/contexts.jsx.map +1 -0
  329. package/dist/index.d.ts +7 -6
  330. package/dist/index.d.ts.map +1 -1
  331. package/dist/index.js +70 -23711
  332. package/dist/index.jsx +70 -18116
  333. package/dist/useDragAndDrop.js +2 -0
  334. package/dist/useDragAndDrop.jsx +2 -0
  335. package/dist/useDragAndDrop2.js +395 -0
  336. package/dist/useDragAndDrop2.js.map +1 -0
  337. package/dist/useDragAndDrop2.jsx +395 -0
  338. package/dist/useDragAndDrop2.jsx.map +1 -0
  339. package/dist/utils.d.ts +83 -11
  340. package/dist/utils.d.ts.map +1 -1
  341. package/dist/utils.js +285 -0
  342. package/dist/utils.js.map +1 -0
  343. package/dist/utils.jsx +277 -0
  344. package/dist/utils.jsx.map +1 -0
  345. package/dist/virtualizer/Layout.js +144 -0
  346. package/dist/virtualizer/Layout.js.map +1 -0
  347. package/dist/virtualizer/Layout.jsx +144 -0
  348. package/dist/virtualizer/Layout.jsx.map +1 -0
  349. package/package.json +401 -4
  350. package/src/Breadcrumbs.tsx +3 -1
  351. package/src/Button.tsx +90 -23
  352. package/src/Calendar.tsx +27 -10
  353. package/src/CalendarPicker.tsx +73 -0
  354. package/src/Checkbox.tsx +539 -3
  355. package/src/Collection.tsx +9 -3
  356. package/src/Color.tsx +42 -14
  357. package/src/ComboBox.tsx +126 -14
  358. package/src/DateField.tsx +20 -2
  359. package/src/DatePicker.tsx +117 -10
  360. package/src/Dialog.tsx +13 -5
  361. package/src/Disclosure.tsx +3 -1
  362. package/src/DragAndDrop.tsx +3 -1
  363. package/src/DropZone.tsx +3 -1
  364. package/src/GridList.tsx +125 -24
  365. package/src/Icon.tsx +3 -1
  366. package/src/Link.tsx +3 -1
  367. package/src/ListBox.tsx +31 -4
  368. package/src/Menu.tsx +298 -131
  369. package/src/Meter.tsx +3 -1
  370. package/src/Modal.tsx +100 -52
  371. package/src/NumberField.tsx +73 -10
  372. package/src/Popover.tsx +49 -11
  373. package/src/ProgressBar.tsx +3 -1
  374. package/src/RadioGroup.tsx +468 -4
  375. package/src/RangeCalendar.tsx +3 -1
  376. package/src/SearchField.tsx +27 -3
  377. package/src/Select.tsx +22 -7
  378. package/src/SelectionIndicator.tsx +3 -1
  379. package/src/SharedElementTransition.tsx +3 -1
  380. package/src/Slider.tsx +159 -13
  381. package/src/Switch.tsx +395 -2
  382. package/src/Table.tsx +409 -95
  383. package/src/Tabs.tsx +16 -45
  384. package/src/TagGroup.tsx +4 -1
  385. package/src/Text.tsx +31 -10
  386. package/src/TextField.tsx +73 -10
  387. package/src/TimeField.tsx +20 -2
  388. package/src/Toast.tsx +79 -14
  389. package/src/ToggleButton.tsx +3 -1
  390. package/src/ToggleButtonGroup.tsx +3 -1
  391. package/src/Tooltip.tsx +55 -8
  392. package/src/Tree.tsx +77 -9
  393. package/src/Virtualizer.tsx +180 -31
  394. package/src/VirtualizerLayouts.ts +45 -10
  395. package/src/index.ts +50 -0
  396. package/src/utils.tsx +243 -27
  397. package/dist/index.js.map +0 -1
  398. package/dist/index.jsx.map +0 -1
package/src/Color.tsx CHANGED
@@ -288,7 +288,9 @@ export function ColorSlider(props: ColorSliderProps): JSX.Element {
288
288
 
289
289
  const renderProps = useRenderProps(
290
290
  {
291
- children: props.children,
291
+ get children() {
292
+ return props.children;
293
+ },
292
294
  class: local.class,
293
295
  style: local.style,
294
296
  defaultClassName: "solidaria-ColorSlider",
@@ -422,7 +424,9 @@ export function ColorSliderTrack(props: ColorSliderTrackProps): JSX.Element {
422
424
 
423
425
  const renderProps = useRenderProps(
424
426
  {
425
- children: props.children,
427
+ get children() {
428
+ return props.children;
429
+ },
426
430
  class: local.class,
427
431
  style: local.style,
428
432
  defaultClassName: "solidaria-ColorSlider-track",
@@ -494,7 +498,9 @@ export function ColorSliderThumb(props: ColorSliderThumbProps): JSX.Element {
494
498
 
495
499
  const renderProps = useRenderProps(
496
500
  {
497
- children: props.children,
501
+ get children() {
502
+ return props.children;
503
+ },
498
504
  class: local.class,
499
505
  style: local.style,
500
506
  defaultClassName: "solidaria-ColorSlider-thumb",
@@ -739,7 +745,9 @@ export function ColorArea(props: ColorAreaProps): JSX.Element {
739
745
 
740
746
  const renderProps = useRenderProps(
741
747
  {
742
- children: props.children,
748
+ get children() {
749
+ return props.children;
750
+ },
743
751
  class: local.class,
744
752
  style: local.style,
745
753
  defaultClassName: "solidaria-ColorArea",
@@ -825,7 +833,9 @@ export function ColorAreaGradient(props: ColorAreaGradientProps): JSX.Element {
825
833
 
826
834
  const renderProps = useRenderProps(
827
835
  {
828
- children: props.children,
836
+ get children() {
837
+ return props.children;
838
+ },
829
839
  class: local.class,
830
840
  style: local.style,
831
841
  defaultClassName: "solidaria-ColorArea-gradient",
@@ -895,7 +905,9 @@ export function ColorAreaThumb(props: ColorAreaThumbProps): JSX.Element {
895
905
 
896
906
  const renderProps = useRenderProps(
897
907
  {
898
- children: props.children,
908
+ get children() {
909
+ return props.children;
910
+ },
899
911
  class: local.class,
900
912
  style: local.style,
901
913
  defaultClassName: "solidaria-ColorArea-thumb",
@@ -1144,7 +1156,9 @@ export function ColorWheel(props: ColorWheelProps): JSX.Element {
1144
1156
 
1145
1157
  const renderProps = useRenderProps(
1146
1158
  {
1147
- children: props.children,
1159
+ get children() {
1160
+ return props.children;
1161
+ },
1148
1162
  class: local.class,
1149
1163
  style: local.style,
1150
1164
  defaultClassName: "solidaria-ColorWheel",
@@ -1211,7 +1225,9 @@ export function ColorWheelTrack(props: ColorWheelTrackProps): JSX.Element {
1211
1225
 
1212
1226
  const renderProps = useRenderProps(
1213
1227
  {
1214
- children: props.children,
1228
+ get children() {
1229
+ return props.children;
1230
+ },
1215
1231
  class: local.class,
1216
1232
  style: local.style,
1217
1233
  defaultClassName: "solidaria-ColorWheel-track",
@@ -1281,7 +1297,9 @@ export function ColorWheelThumb(props: ColorWheelThumbProps): JSX.Element {
1281
1297
 
1282
1298
  const renderProps = useRenderProps(
1283
1299
  {
1284
- children: props.children,
1300
+ get children() {
1301
+ return props.children;
1302
+ },
1285
1303
  class: local.class,
1286
1304
  style: local.style,
1287
1305
  defaultClassName: "solidaria-ColorWheel-thumb",
@@ -1548,7 +1566,9 @@ export function ColorField(props: ColorFieldProps): JSX.Element {
1548
1566
 
1549
1567
  const renderProps = useRenderProps(
1550
1568
  {
1551
- children: props.children,
1569
+ get children() {
1570
+ return props.children;
1571
+ },
1552
1572
  class: local.class,
1553
1573
  style: local.style,
1554
1574
  defaultClassName: "solidaria-ColorField",
@@ -1677,7 +1697,9 @@ export function ColorFieldInput(props: ColorFieldInputProps): JSX.Element {
1677
1697
 
1678
1698
  const renderProps = useRenderProps(
1679
1699
  {
1680
- children: props.children,
1700
+ get children() {
1701
+ return props.children;
1702
+ },
1681
1703
  class: local.class,
1682
1704
  style: local.style,
1683
1705
  defaultClassName: "solidaria-ColorField-input",
@@ -1790,7 +1812,9 @@ export function ColorSwatch(props: ColorSwatchProps): JSX.Element {
1790
1812
 
1791
1813
  const renderProps = useRenderProps(
1792
1814
  {
1793
- children: props.children,
1815
+ get children() {
1816
+ return props.children;
1817
+ },
1794
1818
  class: local.class,
1795
1819
  style: local.style,
1796
1820
  defaultClassName: "solidaria-ColorSwatch",
@@ -1958,7 +1982,9 @@ export function ColorPicker(props: ColorPickerProps): JSX.Element {
1958
1982
 
1959
1983
  const renderProps = useRenderProps(
1960
1984
  {
1961
- children: local.children,
1985
+ get children() {
1986
+ return local.children;
1987
+ },
1962
1988
  class: local.class,
1963
1989
  style: local.style,
1964
1990
  defaultClassName: "solidaria-ColorPicker",
@@ -2381,7 +2407,9 @@ export function ColorSwatchPickerItem(props: ColorSwatchPickerItemProps): JSX.El
2381
2407
 
2382
2408
  const renderProps = useRenderProps(
2383
2409
  {
2384
- children: local.children,
2410
+ get children() {
2411
+ return local.children;
2412
+ },
2385
2413
  class: local.class,
2386
2414
  style: local.style,
2387
2415
  defaultClassName: "solidaria-ColorSwatchPickerItem",
package/src/ComboBox.tsx CHANGED
@@ -8,8 +8,11 @@
8
8
  import {
9
9
  type JSX,
10
10
  type Accessor,
11
+ type Context,
11
12
  createContext,
13
+ createEffect,
12
14
  createMemo,
15
+ createSignal,
13
16
  onCleanup,
14
17
  splitProps,
15
18
  useContext,
@@ -23,6 +26,7 @@ import {
23
26
  getComboBoxData,
24
27
  createHover,
25
28
  createInteractOutside,
29
+ createScrollIntoViewOnFocus,
26
30
  mergeProps,
27
31
  type AriaComboBoxProps,
28
32
  type AriaListBoxProps,
@@ -44,7 +48,9 @@ import {
44
48
  type SlotProps,
45
49
  useRenderProps,
46
50
  filterDOMProps,
51
+ Provider,
47
52
  } from "./utils";
53
+ import { TextContext } from "./Text";
48
54
  import {
49
55
  SelectionIndicatorContext,
50
56
  type SelectionIndicatorContextValue,
@@ -290,6 +296,7 @@ export interface ComboBoxOptionProps<T>
290
296
 
291
297
  interface ComboBoxContextValue<T> {
292
298
  state: ComboBoxState<T>;
299
+ listState: ListState<T>;
293
300
  inputProps: () => JSX.InputHTMLAttributes<HTMLInputElement>;
294
301
  buttonProps: () => JSX.HTMLAttributes<HTMLElement>;
295
302
  listBoxProps: () => JSX.HTMLAttributes<HTMLElement>;
@@ -308,13 +315,31 @@ interface ComboBoxContextValue<T> {
308
315
  setTriggerRef: (el: HTMLElement | null) => void;
309
316
  listBoxRef: () => HTMLElement | null;
310
317
  setListBoxRef: (el: HTMLElement | null) => void;
318
+ registerOptionAction: (key: Key, action: (() => void) | undefined) => void;
319
+ runOptionAction: (key: Key) => void;
311
320
  slots?: Record<string, Partial<ComboBoxProps<T>>>;
312
321
  }
313
322
 
323
+ type InputKeyboardEvent = KeyboardEvent & {
324
+ currentTarget: HTMLInputElement;
325
+ target: Element;
326
+ };
327
+
314
328
  export const ComboBoxContext = createContext<ComboBoxContextValue<unknown> | null>(null);
315
329
  export const ComboBoxStateContext = createContext<ComboBoxState<unknown> | null>(null);
316
330
  export const ComboBoxValueContext = ComboBoxContext;
317
331
 
332
+ function callInputKeyDown(
333
+ handler: JSX.EventHandlerUnion<HTMLInputElement, KeyboardEvent> | undefined,
334
+ event: InputKeyboardEvent,
335
+ ) {
336
+ if (typeof handler === "function") {
337
+ handler(event);
338
+ } else if (handler) {
339
+ handler[0](handler[1], event);
340
+ }
341
+ }
342
+
318
343
  /**
319
344
  * A combobox combines a text input with a listbox, allowing users to filter a list of options.
320
345
  */
@@ -360,6 +385,10 @@ export function ComboBox<T>(props: ComboBoxProps<T>): JSX.Element {
360
385
  let buttonRef: HTMLElement | null = null;
361
386
  let triggerRef: HTMLElement | null = null;
362
387
  let listBoxRef: HTMLElement | null = null;
388
+ const optionActions = new Map<Key, () => void>();
389
+ const runOptionAction = (key: Key) => {
390
+ optionActions.get(key)?.();
391
+ };
363
392
 
364
393
  const state = createComboBoxState<T>({
365
394
  get items() {
@@ -441,6 +470,7 @@ export function ComboBox<T>(props: ComboBoxProps<T>): JSX.Element {
441
470
  return ariaProps.isRequired;
442
471
  },
443
472
  });
473
+ const listState = createComboBoxListStateAdapter(state);
444
474
 
445
475
  const effectiveFormValue = createMemo<"key" | "text">(() => {
446
476
  if (stateProps.allowsCustomValue) {
@@ -472,6 +502,28 @@ export function ComboBox<T>(props: ComboBoxProps<T>): JSX.Element {
472
502
  () => listBoxRef,
473
503
  );
474
504
 
505
+ const getInputProps = () => {
506
+ const inputProps = comboBoxAria.inputProps;
507
+ const originalOnKeyDown = inputProps.onKeyDown;
508
+
509
+ return {
510
+ ...inputProps,
511
+ onKeyDown: (event: InputKeyboardEvent) => {
512
+ const focusedKey = state.focusedKey();
513
+ const shouldRunAction =
514
+ event.key === "Enter" &&
515
+ state.isOpen() &&
516
+ focusedKey != null &&
517
+ !state.isKeyDisabled(focusedKey);
518
+ const optionAction = shouldRunAction ? optionActions.get(focusedKey) : undefined;
519
+
520
+ callInputKeyDown(originalOnKeyDown, event);
521
+
522
+ optionAction?.();
523
+ },
524
+ } as JSX.InputHTMLAttributes<HTMLInputElement>;
525
+ };
526
+
475
527
  const { isHovered, hoverProps } = createHover({
476
528
  get isDisabled() {
477
529
  return ariaProps.isDisabled;
@@ -514,14 +566,34 @@ export function ComboBox<T>(props: ComboBoxProps<T>): JSX.Element {
514
566
  ? (local.children as (values: ComboBoxRenderProps) => JSX.Element)(renderValues())
515
567
  : local.children;
516
568
 
569
+ const textSlots = {
570
+ slots: {
571
+ get description() {
572
+ return comboBoxAria.descriptionProps;
573
+ },
574
+ get errorMessage() {
575
+ return comboBoxAria.errorMessageProps;
576
+ },
577
+ },
578
+ };
579
+
517
580
  return (
518
581
  <ComboBoxContext.Provider
519
582
  value={
520
583
  {
521
584
  state,
522
- inputProps: () => comboBoxAria.inputProps,
585
+ listState,
586
+ inputProps: getInputProps,
523
587
  buttonProps: () => comboBoxAria.buttonProps,
524
- listBoxProps: () => comboBoxAria.listBoxProps,
588
+ listBoxProps: () => ({
589
+ ...comboBoxAria.listBoxProps,
590
+ onAction: undefined,
591
+ shouldUseVirtualFocus: true,
592
+ shouldSelectOnPressUp: true,
593
+ shouldFocusOnHover: true,
594
+ linkBehavior: "selection",
595
+ UNSTABLE_itemBehavior: "action",
596
+ }),
525
597
  labelProps: () => comboBoxAria.labelProps,
526
598
  descriptionProps: () => comboBoxAria.descriptionProps,
527
599
  errorMessageProps: () => comboBoxAria.errorMessageProps,
@@ -545,6 +617,14 @@ export function ComboBox<T>(props: ComboBoxProps<T>): JSX.Element {
545
617
  setListBoxRef: (el) => {
546
618
  listBoxRef = el;
547
619
  },
620
+ registerOptionAction: (key, action) => {
621
+ if (action) {
622
+ optionActions.set(key, action);
623
+ } else {
624
+ optionActions.delete(key);
625
+ }
626
+ },
627
+ runOptionAction,
548
628
  slots: local.slots,
549
629
  } as ComboBoxContextValue<unknown>
550
630
  }
@@ -578,7 +658,9 @@ export function ComboBox<T>(props: ComboBoxProps<T>): JSX.Element {
578
658
  value={state.selectedKey()?.toString() ?? ""}
579
659
  />
580
660
  </Show>
581
- <ComboBoxChildren />
661
+ <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>
662
+ <ComboBoxChildren />
663
+ </Provider>
582
664
  </div>
583
665
  </ComboBoxStateContext.Provider>
584
666
  </ComboBoxContext.Provider>
@@ -683,7 +765,9 @@ export function ComboBoxInput(props: ComboBoxInputProps): JSX.Element {
683
765
 
684
766
  const renderProps = useRenderProps(
685
767
  {
686
- children: local.children,
768
+ get children() {
769
+ return local.children;
770
+ },
687
771
  class: local.class,
688
772
  style: local.style,
689
773
  defaultClassName: "solidaria-ComboBox-input",
@@ -746,7 +830,9 @@ export function ComboBoxValue(props: ComboBoxValueProps): JSX.Element {
746
830
 
747
831
  const renderProps = useRenderProps(
748
832
  {
749
- children: props.children,
833
+ get children() {
834
+ return props.children;
835
+ },
750
836
  class: props.class,
751
837
  style: props.style,
752
838
  defaultClassName: "solidaria-ComboBox-value",
@@ -803,7 +889,9 @@ export function ComboBoxButton(props: ComboBoxButtonProps): JSX.Element {
803
889
 
804
890
  const renderProps = useRenderProps(
805
891
  {
806
- children: local.children,
892
+ get children() {
893
+ return local.children;
894
+ },
807
895
  class: local.class,
808
896
  style: local.style,
809
897
  defaultClassName: "solidaria-ComboBox-button",
@@ -850,11 +938,20 @@ export function ComboBoxListBox<T>(props: ComboBoxListBoxProps<T>): JSX.Element
850
938
  throw new Error("ComboBoxListBox must be used within a ComboBox");
851
939
  }
852
940
  const context = rawContext as ComboBoxContextValue<T>;
853
- const { state: comboBoxState, isOpen, inputRef, buttonRef, setListBoxRef } = context;
941
+ const { state: comboBoxState, listState, isOpen, inputRef, buttonRef, setListBoxRef } = context;
854
942
  const state = comboBoxState;
855
943
 
856
944
  let listBoxRef: HTMLUListElement | undefined;
857
945
 
946
+ // Reveal the activedescendant-focused option on keyboard navigation while the
947
+ // listbox is open. Real DOM focus stays on the input, so the browser won't
948
+ // natively scroll an off-screen focused option into view.
949
+ createScrollIntoViewOnFocus({
950
+ focusedKey: () => state.focusedKey(),
951
+ isActive: () => isOpen(),
952
+ ref: () => listBoxRef ?? null,
953
+ });
954
+
858
955
  createInteractOutside({
859
956
  ref: () => listBoxRef ?? null,
860
957
  onInteractOutside: (e) => {
@@ -880,7 +977,7 @@ export function ComboBoxListBox<T>(props: ComboBoxListBoxProps<T>): JSX.Element
880
977
  // Create listbox aria props using ComboBoxState's ListState-compatible interface
881
978
  const { listBoxProps } = createListBox(
882
979
  context.listBoxProps as unknown as AriaListBoxProps,
883
- createComboBoxListStateAdapter(state),
980
+ listState,
884
981
  );
885
982
 
886
983
  const renderValues = createMemo<ComboBoxListBoxRenderProps>(() => ({
@@ -976,15 +1073,25 @@ export function ComboBoxOption<T>(props: ComboBoxOptionProps<T>): JSX.Element {
976
1073
 
977
1074
  const stateContext = useContext(ComboBoxStateContext);
978
1075
  const comboBoxContext = useContext(ComboBoxContext);
979
- if (!stateContext) {
1076
+ if (!stateContext || !comboBoxContext) {
980
1077
  throw new Error("ComboBoxOption must be used within a ComboBox");
981
1078
  }
982
1079
  const state = stateContext as ComboBoxState<T>;
1080
+ const listState = (comboBoxContext as ComboBoxContextValue<T>).listState;
1081
+ const [ref, setRef] = createSignal<HTMLLIElement | null>(null);
983
1082
  const optionId = () => {
984
1083
  const listBoxId = getComboBoxData(state as ComboBoxState<unknown>)?.listBoxId;
985
1084
  return listBoxId ? `${listBoxId}-option-${local.id}` : String(local.id);
986
1085
  };
987
1086
 
1087
+ createEffect(() => {
1088
+ const key = local.id;
1089
+ comboBoxContext?.registerOptionAction(key, local.onAction);
1090
+ onCleanup(() => {
1091
+ comboBoxContext?.registerOptionAction(key, undefined);
1092
+ });
1093
+ });
1094
+
988
1095
  // Create option aria props using ComboBoxState's ListState-compatible interface
989
1096
  const optionAria = createOption<T>(
990
1097
  {
@@ -998,9 +1105,6 @@ export function ComboBoxOption<T>(props: ComboBoxOptionProps<T>): JSX.Element {
998
1105
  get "aria-label"() {
999
1106
  return ariaProps["aria-label"];
1000
1107
  },
1001
- get onAction() {
1002
- return local.onAction;
1003
- },
1004
1108
  shouldSelectOnPressUp: true,
1005
1109
  shouldFocusOnHover: true,
1006
1110
  shouldUseVirtualFocus: true,
@@ -1014,8 +1118,12 @@ export function ComboBoxOption<T>(props: ComboBoxOptionProps<T>): JSX.Element {
1014
1118
  get onHoverChange() {
1015
1119
  return ariaProps.onHoverChange;
1016
1120
  },
1121
+ get onAction() {
1122
+ return local.onAction;
1123
+ },
1017
1124
  },
1018
- createComboBoxListStateAdapter(state),
1125
+ listState,
1126
+ () => ref(),
1019
1127
  );
1020
1128
 
1021
1129
  const isOptionFocusVisible = () =>
@@ -1033,7 +1141,9 @@ export function ComboBoxOption<T>(props: ComboBoxOptionProps<T>): JSX.Element {
1033
1141
 
1034
1142
  const renderProps = useRenderProps(
1035
1143
  {
1036
- children: props.children,
1144
+ get children() {
1145
+ return props.children;
1146
+ },
1037
1147
  class: local.class,
1038
1148
  style: local.style,
1039
1149
  defaultClassName: "solidaria-ComboBox-option",
@@ -1053,6 +1163,7 @@ export function ComboBoxOption<T>(props: ComboBoxOptionProps<T>): JSX.Element {
1053
1163
  return (
1054
1164
  <SelectionIndicatorContext.Provider value={selectionIndicatorContext()}>
1055
1165
  <li
1166
+ ref={setRef}
1056
1167
  {...cleanOptionProps()}
1057
1168
  class={renderProps.class()}
1058
1169
  style={renderProps.style()}
@@ -1192,6 +1303,7 @@ function createComboBoxListStateAdapter<T>(state: ComboBoxState<T>): ListState<T
1192
1303
 
1193
1304
  return {
1194
1305
  collection: state.collection,
1306
+ selectionManager: state.selectionManager,
1195
1307
  isFocused: state.isFocused,
1196
1308
  setFocused: state.setFocused,
1197
1309
  focusedKey: state.focusedKey,
package/src/DateField.tsx CHANGED
@@ -7,6 +7,7 @@
7
7
 
8
8
  import {
9
9
  type JSX,
10
+ type Context,
10
11
  createContext,
11
12
  createEffect,
12
13
  createMemo,
@@ -39,7 +40,9 @@ import {
39
40
  useRenderProps,
40
41
  dataAttr,
41
42
  useIsHydrated,
43
+ Provider,
42
44
  } from "./utils";
45
+ import { TextContext } from "./Text";
43
46
  import { HiddenDateInput } from "./HiddenDateInput";
44
47
  import { FormContext, type FormProps } from "./Form";
45
48
  import {
@@ -309,6 +312,17 @@ function DateFieldInner<T extends DateValue = CalendarDate>(
309
312
  formContext?.validationBehavior ??
310
313
  "native";
311
314
 
315
+ const textSlots = {
316
+ slots: {
317
+ get description() {
318
+ return fieldAria.descriptionProps;
319
+ },
320
+ get errorMessage() {
321
+ return fieldAria.errorMessageProps;
322
+ },
323
+ },
324
+ };
325
+
312
326
  return (
313
327
  <DateFieldStateContext.Provider value={state as unknown as DateFieldState<DateValue>}>
314
328
  <DateFieldContext.Provider
@@ -332,7 +346,9 @@ function DateFieldInner<T extends DateValue = CalendarDate>(
332
346
  data-required={dataAttr(state.isRequired())}
333
347
  data-invalid={dataAttr(state.isInvalid())}
334
348
  >
335
- {local.children as JSX.Element}
349
+ <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>
350
+ {local.children as JSX.Element}
351
+ </Provider>
336
352
  </div>
337
353
  <Show when={(rest as Record<string, unknown>).name}>
338
354
  <HiddenDateInput
@@ -428,7 +444,9 @@ export function DateSegment(props: DateSegmentProps): JSX.Element {
428
444
 
429
445
  const renderProps = useRenderProps(
430
446
  {
431
- children: props.children,
447
+ get children() {
448
+ return props.children;
449
+ },
432
450
  class: props.class,
433
451
  style: props.style,
434
452
  defaultClassName: "solidaria-DateSegment",