@proyecto-viviana/solidaria 0.4.0 → 0.4.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 (480) hide show
  1. package/dist/_chunk/DragManager.js +627 -0
  2. package/dist/_chunk/DragManager.js.map +1 -0
  3. package/dist/_chunk/DragManager.jsx +627 -0
  4. package/dist/_chunk/DragManager.jsx.map +1 -0
  5. package/dist/_chunk/FocusScope.js +400 -0
  6. package/dist/_chunk/FocusScope.js.map +1 -0
  7. package/dist/_chunk/FocusScope.jsx +375 -0
  8. package/dist/_chunk/FocusScope.jsx.map +1 -0
  9. package/dist/_chunk/actiongroup.js +13 -79
  10. package/dist/_chunk/actiongroup.js.map +1 -1
  11. package/dist/_chunk/actiongroup.jsx +13 -79
  12. package/dist/_chunk/actiongroup.jsx.map +1 -1
  13. package/dist/_chunk/{live-announcer.js → announce.js} +1 -1
  14. package/dist/_chunk/announce.js.map +1 -0
  15. package/dist/_chunk/{live-announcer.jsx → announce.jsx} +1 -1
  16. package/dist/_chunk/announce.jsx.map +1 -0
  17. package/dist/_chunk/autocomplete.js +56 -8
  18. package/dist/_chunk/autocomplete.js.map +1 -1
  19. package/dist/_chunk/autocomplete.jsx +56 -8
  20. package/dist/_chunk/autocomplete.jsx.map +1 -1
  21. package/dist/_chunk/breadcrumbs.js +6 -4
  22. package/dist/_chunk/breadcrumbs.js.map +1 -1
  23. package/dist/_chunk/breadcrumbs.jsx +6 -4
  24. package/dist/_chunk/breadcrumbs.jsx.map +1 -1
  25. package/dist/_chunk/button.js +8 -9
  26. package/dist/_chunk/button.js.map +1 -1
  27. package/dist/_chunk/button.jsx +8 -9
  28. package/dist/_chunk/button.jsx.map +1 -1
  29. package/dist/_chunk/calendar.js +27 -26
  30. package/dist/_chunk/calendar.js.map +1 -1
  31. package/dist/_chunk/calendar.jsx +27 -26
  32. package/dist/_chunk/calendar.jsx.map +1 -1
  33. package/dist/_chunk/checkbox.js +5 -4
  34. package/dist/_chunk/checkbox.js.map +1 -1
  35. package/dist/_chunk/checkbox.jsx +5 -4
  36. package/dist/_chunk/checkbox.jsx.map +1 -1
  37. package/dist/_chunk/color.js +302 -18
  38. package/dist/_chunk/color.js.map +1 -1
  39. package/dist/_chunk/color.jsx +302 -18
  40. package/dist/_chunk/color.jsx.map +1 -1
  41. package/dist/_chunk/combobox.js +638 -12
  42. package/dist/_chunk/combobox.js.map +1 -1
  43. package/dist/_chunk/combobox.jsx +638 -12
  44. package/dist/_chunk/combobox.jsx.map +1 -1
  45. package/dist/_chunk/constants.js +19 -0
  46. package/dist/_chunk/constants.js.map +1 -0
  47. package/dist/_chunk/constants.jsx +19 -0
  48. package/dist/_chunk/constants.jsx.map +1 -0
  49. package/dist/_chunk/createCollator.js +3 -171
  50. package/dist/_chunk/createCollator.js.map +1 -1
  51. package/dist/_chunk/createCollator.jsx +3 -165
  52. package/dist/_chunk/createCollator.jsx.map +1 -1
  53. package/dist/_chunk/createField.js +2 -1
  54. package/dist/_chunk/createField.js.map +1 -1
  55. package/dist/_chunk/createField.jsx +2 -1
  56. package/dist/_chunk/createField.jsx.map +1 -1
  57. package/dist/_chunk/createFocus.js +12 -8
  58. package/dist/_chunk/createFocus.js.map +1 -1
  59. package/dist/_chunk/createFocus.jsx +12 -8
  60. package/dist/_chunk/createFocus.jsx.map +1 -1
  61. package/dist/_chunk/createFocusWithin.js +12 -13
  62. package/dist/_chunk/createFocusWithin.js.map +1 -1
  63. package/dist/_chunk/createFocusWithin.jsx +12 -13
  64. package/dist/_chunk/createFocusWithin.jsx.map +1 -1
  65. package/dist/_chunk/createFocusable.js +3 -3
  66. package/dist/_chunk/createFocusable.js.map +1 -1
  67. package/dist/_chunk/createFocusable.jsx +3 -3
  68. package/dist/_chunk/createFocusable.jsx.map +1 -1
  69. package/dist/_chunk/{form.js → createFormReset.js} +1 -1
  70. package/dist/_chunk/createFormReset.js.map +1 -0
  71. package/dist/_chunk/{form.jsx → createFormReset.jsx} +1 -1
  72. package/dist/_chunk/createFormReset.jsx.map +1 -0
  73. package/dist/_chunk/createHover.js +2 -1
  74. package/dist/_chunk/createHover.js.map +1 -1
  75. package/dist/_chunk/createHover.jsx +2 -1
  76. package/dist/_chunk/createHover.jsx.map +1 -1
  77. package/dist/_chunk/createInteractionModality.js +2 -3
  78. package/dist/_chunk/createInteractionModality.js.map +1 -1
  79. package/dist/_chunk/createInteractionModality.jsx +2 -3
  80. package/dist/_chunk/createInteractionModality.jsx.map +1 -1
  81. package/dist/_chunk/createLabel.js +2 -1
  82. package/dist/_chunk/createLabel.js.map +1 -1
  83. package/dist/_chunk/createLabel.jsx +2 -1
  84. package/dist/_chunk/createLabel.jsx.map +1 -1
  85. package/dist/_chunk/createLabels.js +3 -2
  86. package/dist/_chunk/createLabels.js.map +1 -1
  87. package/dist/_chunk/createLabels.jsx +3 -2
  88. package/dist/_chunk/createLabels.jsx.map +1 -1
  89. package/dist/_chunk/createLandmark.js +1 -1
  90. package/dist/_chunk/createLandmark.jsx +1 -1
  91. package/dist/_chunk/createProgressBar.js +2 -1
  92. package/dist/_chunk/createProgressBar.js.map +1 -1
  93. package/dist/_chunk/createProgressBar.jsx +2 -1
  94. package/dist/_chunk/createProgressBar.jsx.map +1 -1
  95. package/dist/_chunk/createSelectableItem.js +7 -3
  96. package/dist/_chunk/createSelectableItem.js.map +1 -1
  97. package/dist/_chunk/createSelectableItem.jsx +7 -3
  98. package/dist/_chunk/createSelectableItem.jsx.map +1 -1
  99. package/dist/_chunk/createStringFormatter.js +61 -0
  100. package/dist/_chunk/createStringFormatter.js.map +1 -0
  101. package/dist/_chunk/createStringFormatter.jsx +61 -0
  102. package/dist/_chunk/createStringFormatter.jsx.map +1 -0
  103. package/dist/_chunk/createToggle.js +5 -4
  104. package/dist/_chunk/createToggle.js.map +1 -1
  105. package/dist/_chunk/createToggle.jsx +5 -4
  106. package/dist/_chunk/createToggle.jsx.map +1 -1
  107. package/dist/_chunk/datepicker.js +1413 -1100
  108. package/dist/_chunk/datepicker.js.map +1 -1
  109. package/dist/_chunk/datepicker.jsx +1413 -1100
  110. package/dist/_chunk/datepicker.jsx.map +1 -1
  111. package/dist/_chunk/disclosure.js +2 -2
  112. package/dist/_chunk/disclosure.js.map +1 -1
  113. package/dist/_chunk/disclosure.jsx +2 -2
  114. package/dist/_chunk/disclosure.jsx.map +1 -1
  115. package/dist/_chunk/dnd.js +1586 -495
  116. package/dist/_chunk/dnd.js.map +1 -1
  117. package/dist/_chunk/dnd.jsx +1586 -495
  118. package/dist/_chunk/dnd.jsx.map +1 -1
  119. package/dist/_chunk/env.js +1 -19
  120. package/dist/_chunk/env.js.map +1 -1
  121. package/dist/_chunk/env.jsx +1 -19
  122. package/dist/_chunk/env.jsx.map +1 -1
  123. package/dist/_chunk/focus.js +1 -1
  124. package/dist/_chunk/focus.js.map +1 -1
  125. package/dist/_chunk/focus.jsx +1 -1
  126. package/dist/_chunk/focus.jsx.map +1 -1
  127. package/dist/_chunk/focus2.js +54 -318
  128. package/dist/_chunk/focus2.js.map +1 -1
  129. package/dist/_chunk/focus2.jsx +53 -292
  130. package/dist/_chunk/focus2.jsx.map +1 -1
  131. package/dist/_chunk/grid.js +1 -1
  132. package/dist/_chunk/grid.jsx +1 -1
  133. package/dist/_chunk/gridlist.js +14 -9
  134. package/dist/_chunk/gridlist.js.map +1 -1
  135. package/dist/_chunk/gridlist.jsx +14 -9
  136. package/dist/_chunk/gridlist.jsx.map +1 -1
  137. package/dist/_chunk/i18n.js +3 -58
  138. package/dist/_chunk/i18n.js.map +1 -1
  139. package/dist/_chunk/i18n.jsx +3 -58
  140. package/dist/_chunk/i18n.jsx.map +1 -1
  141. package/dist/_chunk/interactions.js +99 -9
  142. package/dist/_chunk/interactions.js.map +1 -1
  143. package/dist/_chunk/interactions.jsx +97 -9
  144. package/dist/_chunk/interactions.jsx.map +1 -1
  145. package/dist/_chunk/link.js +2 -1
  146. package/dist/_chunk/link.js.map +1 -1
  147. package/dist/_chunk/link.jsx +2 -1
  148. package/dist/_chunk/link.jsx.map +1 -1
  149. package/dist/_chunk/listbox.js +42 -10
  150. package/dist/_chunk/listbox.js.map +1 -1
  151. package/dist/_chunk/listbox.jsx +42 -10
  152. package/dist/_chunk/listbox.jsx.map +1 -1
  153. package/dist/_chunk/locale.js +173 -0
  154. package/dist/_chunk/locale.js.map +1 -0
  155. package/dist/_chunk/locale.jsx +167 -0
  156. package/dist/_chunk/locale.jsx.map +1 -0
  157. package/dist/_chunk/menu.js +5 -4
  158. package/dist/_chunk/menu.js.map +1 -1
  159. package/dist/_chunk/menu.jsx +5 -4
  160. package/dist/_chunk/menu.jsx.map +1 -1
  161. package/dist/_chunk/numberfield.js +3 -2
  162. package/dist/_chunk/numberfield.js.map +1 -1
  163. package/dist/_chunk/numberfield.jsx +3 -2
  164. package/dist/_chunk/numberfield.jsx.map +1 -1
  165. package/dist/_chunk/overlays.js +1 -1
  166. package/dist/_chunk/overlays.jsx +1 -1
  167. package/dist/_chunk/popover.js +3 -3
  168. package/dist/_chunk/popover.js.map +1 -1
  169. package/dist/_chunk/popover.jsx +3 -3
  170. package/dist/_chunk/popover.jsx.map +1 -1
  171. package/dist/_chunk/radio.js +7 -6
  172. package/dist/_chunk/radio.js.map +1 -1
  173. package/dist/_chunk/radio.jsx +7 -6
  174. package/dist/_chunk/radio.jsx.map +1 -1
  175. package/dist/_chunk/reactivity.js +21 -0
  176. package/dist/_chunk/reactivity.js.map +1 -0
  177. package/dist/_chunk/reactivity.jsx +21 -0
  178. package/dist/_chunk/reactivity.jsx.map +1 -0
  179. package/dist/_chunk/searchfield.js +2 -1
  180. package/dist/_chunk/searchfield.js.map +1 -1
  181. package/dist/_chunk/searchfield.jsx +2 -1
  182. package/dist/_chunk/searchfield.jsx.map +1 -1
  183. package/dist/_chunk/select.js +8 -5
  184. package/dist/_chunk/select.js.map +1 -1
  185. package/dist/_chunk/select.jsx +8 -5
  186. package/dist/_chunk/select.jsx.map +1 -1
  187. package/dist/_chunk/selection.js +8 -21
  188. package/dist/_chunk/selection.js.map +1 -1
  189. package/dist/_chunk/selection.jsx +8 -21
  190. package/dist/_chunk/selection.jsx.map +1 -1
  191. package/dist/_chunk/separator.js +1 -1
  192. package/dist/_chunk/separator.jsx +1 -1
  193. package/dist/_chunk/slider.js +5 -4
  194. package/dist/_chunk/slider.js.map +1 -1
  195. package/dist/_chunk/slider.jsx +5 -4
  196. package/dist/_chunk/slider.jsx.map +1 -1
  197. package/dist/_chunk/spinbutton.js +153 -0
  198. package/dist/_chunk/spinbutton.js.map +1 -0
  199. package/dist/_chunk/spinbutton.jsx +153 -0
  200. package/dist/_chunk/spinbutton.jsx.map +1 -0
  201. package/dist/_chunk/table.js +45 -8
  202. package/dist/_chunk/table.js.map +1 -1
  203. package/dist/_chunk/table.jsx +45 -8
  204. package/dist/_chunk/table.jsx.map +1 -1
  205. package/dist/_chunk/tabs.js +11 -8
  206. package/dist/_chunk/tabs.js.map +1 -1
  207. package/dist/_chunk/tabs.jsx +11 -8
  208. package/dist/_chunk/tabs.jsx.map +1 -1
  209. package/dist/_chunk/tag.js +54 -18
  210. package/dist/_chunk/tag.js.map +1 -1
  211. package/dist/_chunk/tag.jsx +54 -18
  212. package/dist/_chunk/tag.jsx.map +1 -1
  213. package/dist/_chunk/textfield.js +2 -1
  214. package/dist/_chunk/textfield.js.map +1 -1
  215. package/dist/_chunk/textfield.jsx +2 -1
  216. package/dist/_chunk/textfield.jsx.map +1 -1
  217. package/dist/_chunk/toolbar.js +4 -36
  218. package/dist/_chunk/toolbar.js.map +1 -1
  219. package/dist/_chunk/toolbar.jsx +4 -36
  220. package/dist/_chunk/toolbar.jsx.map +1 -1
  221. package/dist/_chunk/tooltip.js +2 -2
  222. package/dist/_chunk/tooltip.js.map +1 -1
  223. package/dist/_chunk/tooltip.jsx +2 -2
  224. package/dist/_chunk/tooltip.jsx.map +1 -1
  225. package/dist/_chunk/tree.js +42 -14
  226. package/dist/_chunk/tree.js.map +1 -1
  227. package/dist/_chunk/tree.jsx +42 -14
  228. package/dist/_chunk/tree.jsx.map +1 -1
  229. package/dist/_chunk/utils.js +59 -19
  230. package/dist/_chunk/utils.js.map +1 -1
  231. package/dist/_chunk/utils.jsx +59 -19
  232. package/dist/_chunk/utils.jsx.map +1 -1
  233. package/dist/_chunk/visually-hidden.js +3 -2
  234. package/dist/_chunk/visually-hidden.js.map +1 -1
  235. package/dist/_chunk/visually-hidden.jsx +3 -2
  236. package/dist/_chunk/visually-hidden.jsx.map +1 -1
  237. package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
  238. package/dist/autocomplete/createAutocomplete.d.ts +10 -7
  239. package/dist/autocomplete/createAutocomplete.d.ts.map +1 -1
  240. package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -1
  241. package/dist/button/createToggleButtonGroup.d.ts.map +1 -1
  242. package/dist/calendar/createCalendar.d.ts.map +1 -1
  243. package/dist/calendar/createCalendarCell.d.ts.map +1 -1
  244. package/dist/calendar/createCalendarGrid.d.ts.map +1 -1
  245. package/dist/calendar/createRangeCalendar.d.ts.map +1 -1
  246. package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -1
  247. package/dist/calendar/intl/index.d.ts +1 -1
  248. package/dist/calendar/intl/index.d.ts.map +1 -1
  249. package/dist/collections/index.js +1 -1
  250. package/dist/collections/index.jsx +1 -1
  251. package/dist/color/createColorArea.d.ts.map +1 -1
  252. package/dist/color/createColorField.d.ts.map +1 -1
  253. package/dist/color/createColorSlider.d.ts.map +1 -1
  254. package/dist/color/createColorSwatch.d.ts.map +1 -1
  255. package/dist/color/createColorWheel.d.ts.map +1 -1
  256. package/dist/color/intl/index.d.ts +30 -0
  257. package/dist/color/intl/index.d.ts.map +1 -0
  258. package/dist/combobox/createComboBox.d.ts.map +1 -1
  259. package/dist/combobox/intl/generated-locales.d.ts +16 -0
  260. package/dist/combobox/intl/generated-locales.d.ts.map +1 -0
  261. package/dist/combobox/intl/index.d.ts +2 -2
  262. package/dist/combobox/intl/index.d.ts.map +1 -1
  263. package/dist/datepicker/createDateField.d.ts +45 -23
  264. package/dist/datepicker/createDateField.d.ts.map +1 -1
  265. package/dist/datepicker/createDatePicker.d.ts +34 -6
  266. package/dist/datepicker/createDatePicker.d.ts.map +1 -1
  267. package/dist/datepicker/createDatePickerGroup.d.ts +13 -13
  268. package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -1
  269. package/dist/datepicker/createDateRangePicker.d.ts +55 -7
  270. package/dist/datepicker/createDateRangePicker.d.ts.map +1 -1
  271. package/dist/datepicker/createDateSegment.d.ts +6 -15
  272. package/dist/datepicker/createDateSegment.d.ts.map +1 -1
  273. package/dist/datepicker/createDisplayNames.d.ts +17 -0
  274. package/dist/datepicker/createDisplayNames.d.ts.map +1 -0
  275. package/dist/datepicker/createTimeField.d.ts +12 -49
  276. package/dist/datepicker/createTimeField.d.ts.map +1 -1
  277. package/dist/datepicker/index.d.ts +3 -3
  278. package/dist/datepicker/index.d.ts.map +1 -1
  279. package/dist/datepicker/index.js +2 -2
  280. package/dist/datepicker/index.jsx +2 -2
  281. package/dist/datepicker/intl.d.ts +12 -0
  282. package/dist/datepicker/intl.d.ts.map +1 -0
  283. package/dist/dnd/DragManager.d.ts +86 -0
  284. package/dist/dnd/DragManager.d.ts.map +1 -0
  285. package/dist/dnd/DropTargetKeyboardNavigation.d.ts +42 -0
  286. package/dist/dnd/DropTargetKeyboardNavigation.d.ts.map +1 -0
  287. package/dist/dnd/createDrag.d.ts.map +1 -1
  288. package/dist/dnd/createDraggableCollection.d.ts.map +1 -1
  289. package/dist/dnd/createDraggableItem.d.ts +12 -7
  290. package/dist/dnd/createDraggableItem.d.ts.map +1 -1
  291. package/dist/dnd/createDroppableCollection.d.ts +7 -15
  292. package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
  293. package/dist/dnd/index.d.ts +5 -1
  294. package/dist/dnd/index.d.ts.map +1 -1
  295. package/dist/dnd/index.js +3 -2
  296. package/dist/dnd/index.jsx +3 -2
  297. package/dist/dnd/intl/index.d.ts +39 -0
  298. package/dist/dnd/intl/index.d.ts.map +1 -0
  299. package/dist/dnd/utils.d.ts +5 -0
  300. package/dist/dnd/utils.d.ts.map +1 -1
  301. package/dist/focus/FocusScope.d.ts +7 -0
  302. package/dist/focus/FocusScope.d.ts.map +1 -1
  303. package/dist/focus/index.d.ts +2 -1
  304. package/dist/focus/index.d.ts.map +1 -1
  305. package/dist/focus/index.js +3 -2
  306. package/dist/focus/index.jsx +3 -2
  307. package/dist/focus/virtualFocus.d.ts +26 -0
  308. package/dist/focus/virtualFocus.d.ts.map +1 -0
  309. package/dist/form/index.js +1 -1
  310. package/dist/form/index.jsx +1 -1
  311. package/dist/gridlist/createGridList.d.ts.map +1 -1
  312. package/dist/i18n/index.js +4 -2
  313. package/dist/i18n/index.jsx +4 -2
  314. package/dist/index.d.ts +3 -3
  315. package/dist/index.d.ts.map +1 -1
  316. package/dist/index.js +18 -12
  317. package/dist/index.jsx +18 -12
  318. package/dist/interactions/FocusableProvider.d.ts.map +1 -1
  319. package/dist/interactions/createFocus.d.ts.map +1 -1
  320. package/dist/interactions/createFocusWithin.d.ts.map +1 -1
  321. package/dist/interactions/createInteractionModality.d.ts.map +1 -1
  322. package/dist/interactions/index.js +1 -2
  323. package/dist/interactions/index.jsx +1 -2
  324. package/dist/label/createLabels.d.ts.map +1 -1
  325. package/dist/listbox/createListBox.d.ts.map +1 -1
  326. package/dist/listbox/createOption.d.ts +1 -1
  327. package/dist/listbox/createOption.d.ts.map +1 -1
  328. package/dist/live-announcer/index.js +1 -1
  329. package/dist/live-announcer/index.jsx +1 -1
  330. package/dist/select/createSelect.d.ts +2 -0
  331. package/dist/select/createSelect.d.ts.map +1 -1
  332. package/dist/selection/createSelectableItem.d.ts.map +1 -1
  333. package/dist/selection/index.js +2 -1
  334. package/dist/selection/index.jsx +2 -1
  335. package/dist/spinbutton/createSpinButton.d.ts +41 -0
  336. package/dist/spinbutton/createSpinButton.d.ts.map +1 -0
  337. package/dist/spinbutton/index.d.ts +3 -0
  338. package/dist/spinbutton/index.d.ts.map +1 -0
  339. package/dist/spinbutton/index.js +2 -0
  340. package/dist/spinbutton/index.jsx +2 -0
  341. package/dist/spinbutton/intl.d.ts +5 -0
  342. package/dist/spinbutton/intl.d.ts.map +1 -0
  343. package/dist/table/createTable.d.ts.map +1 -1
  344. package/dist/table/createTableColumnHeader.d.ts.map +1 -1
  345. package/dist/table/createTableRow.d.ts.map +1 -1
  346. package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -1
  347. package/dist/table/types.d.ts +8 -0
  348. package/dist/table/types.d.ts.map +1 -1
  349. package/dist/table/utils.d.ts +15 -0
  350. package/dist/table/utils.d.ts.map +1 -0
  351. package/dist/tabs/createTabs.d.ts +1 -0
  352. package/dist/tabs/createTabs.d.ts.map +1 -1
  353. package/dist/tag/createTag.d.ts.map +1 -1
  354. package/dist/tag/createTagGroup.d.ts +7 -0
  355. package/dist/tag/createTagGroup.d.ts.map +1 -1
  356. package/dist/toolbar/createToolbar.d.ts.map +1 -1
  357. package/dist/tree/createTree.d.ts.map +1 -1
  358. package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -1
  359. package/dist/utils/animation.d.ts.map +1 -1
  360. package/dist/utils/dom.d.ts +1 -0
  361. package/dist/utils/dom.d.ts.map +1 -1
  362. package/dist/utils/index.d.ts +1 -1
  363. package/dist/utils/index.d.ts.map +1 -1
  364. package/dist/utils/index.js +4 -3
  365. package/dist/utils/index.jsx +4 -3
  366. package/package.json +2 -2
  367. package/src/actiongroup/createActionGroup.ts +26 -109
  368. package/src/autocomplete/createAutocomplete.ts +136 -15
  369. package/src/breadcrumbs/createBreadcrumbs.ts +12 -4
  370. package/src/button/createToggleButtonGroup.ts +19 -14
  371. package/src/calendar/createCalendar.ts +3 -4
  372. package/src/calendar/createCalendarCell.ts +17 -3
  373. package/src/calendar/createCalendarGrid.ts +5 -4
  374. package/src/calendar/createRangeCalendar.ts +27 -17
  375. package/src/calendar/createRangeCalendarCell.ts +17 -3
  376. package/src/calendar/intl/index.ts +8 -0
  377. package/src/color/createColorArea.ts +17 -10
  378. package/src/color/createColorField.ts +8 -1
  379. package/src/color/createColorSlider.ts +1 -2
  380. package/src/color/createColorSwatch.ts +4 -2
  381. package/src/color/createColorWheel.ts +0 -6
  382. package/src/color/intl/index.ts +316 -0
  383. package/src/combobox/createComboBox.ts +35 -4
  384. package/src/combobox/intl/generated-locales.ts +635 -0
  385. package/src/combobox/intl/index.ts +8 -2
  386. package/src/datepicker/createDateField.ts +228 -213
  387. package/src/datepicker/createDatePicker.ts +157 -146
  388. package/src/datepicker/createDatePickerGroup.ts +88 -82
  389. package/src/datepicker/createDateRangePicker.ts +230 -179
  390. package/src/datepicker/createDateSegment.ts +386 -389
  391. package/src/datepicker/createDisplayNames.ts +45 -0
  392. package/src/datepicker/createTimeField.ts +36 -129
  393. package/src/datepicker/index.ts +13 -14
  394. package/src/datepicker/intl.ts +633 -0
  395. package/src/dnd/DragManager.ts +693 -0
  396. package/src/dnd/DropTargetKeyboardNavigation.ts +337 -0
  397. package/src/dnd/createDrag.ts +31 -5
  398. package/src/dnd/createDraggableCollection.ts +33 -15
  399. package/src/dnd/createDraggableItem.ts +92 -5
  400. package/src/dnd/createDroppableCollection.ts +487 -373
  401. package/src/dnd/index.ts +11 -0
  402. package/src/dnd/intl/ar-AE.json +29 -0
  403. package/src/dnd/intl/bg-BG.json +29 -0
  404. package/src/dnd/intl/cs-CZ.json +29 -0
  405. package/src/dnd/intl/da-DK.json +29 -0
  406. package/src/dnd/intl/de-DE.json +29 -0
  407. package/src/dnd/intl/el-GR.json +29 -0
  408. package/src/dnd/intl/en-US.json +29 -0
  409. package/src/dnd/intl/es-ES.json +29 -0
  410. package/src/dnd/intl/et-EE.json +29 -0
  411. package/src/dnd/intl/fi-FI.json +29 -0
  412. package/src/dnd/intl/fr-FR.json +29 -0
  413. package/src/dnd/intl/he-IL.json +29 -0
  414. package/src/dnd/intl/hr-HR.json +29 -0
  415. package/src/dnd/intl/hu-HU.json +29 -0
  416. package/src/dnd/intl/index.ts +139 -0
  417. package/src/dnd/intl/it-IT.json +29 -0
  418. package/src/dnd/intl/ja-JP.json +29 -0
  419. package/src/dnd/intl/ko-KR.json +29 -0
  420. package/src/dnd/intl/lt-LT.json +29 -0
  421. package/src/dnd/intl/lv-LV.json +29 -0
  422. package/src/dnd/intl/nb-NO.json +29 -0
  423. package/src/dnd/intl/nl-NL.json +29 -0
  424. package/src/dnd/intl/pl-PL.json +29 -0
  425. package/src/dnd/intl/pt-BR.json +29 -0
  426. package/src/dnd/intl/pt-PT.json +29 -0
  427. package/src/dnd/intl/ro-RO.json +29 -0
  428. package/src/dnd/intl/ru-RU.json +29 -0
  429. package/src/dnd/intl/sk-SK.json +29 -0
  430. package/src/dnd/intl/sl-SI.json +29 -0
  431. package/src/dnd/intl/sr-SP.json +29 -0
  432. package/src/dnd/intl/sv-SE.json +29 -0
  433. package/src/dnd/intl/tr-TR.json +29 -0
  434. package/src/dnd/intl/uk-UA.json +29 -0
  435. package/src/dnd/intl/zh-CN.json +29 -0
  436. package/src/dnd/intl/zh-TW.json +29 -0
  437. package/src/dnd/utils.ts +36 -0
  438. package/src/focus/FocusScope.tsx +120 -12
  439. package/src/focus/index.ts +8 -0
  440. package/src/focus/virtualFocus.ts +55 -0
  441. package/src/gridlist/createGridList.ts +52 -16
  442. package/src/index.ts +11 -3
  443. package/src/interactions/FocusableProvider.tsx +11 -6
  444. package/src/interactions/createFocus.ts +26 -21
  445. package/src/interactions/createFocusWithin.ts +23 -24
  446. package/src/interactions/createInteractionModality.ts +5 -3
  447. package/src/label/createLabels.ts +7 -4
  448. package/src/listbox/createListBox.ts +74 -2
  449. package/src/listbox/createOption.ts +16 -1
  450. package/src/select/createSelect.ts +23 -2
  451. package/src/selection/createSelectableItem.ts +14 -0
  452. package/src/spinbutton/createSpinButton.ts +163 -0
  453. package/src/spinbutton/index.ts +10 -0
  454. package/src/spinbutton/intl.ts +115 -0
  455. package/src/table/createTable.ts +26 -1
  456. package/src/table/createTableColumnHeader.ts +10 -0
  457. package/src/table/createTableRow.ts +10 -0
  458. package/src/table/createTableSelectionCheckbox.ts +24 -1
  459. package/src/table/types.ts +8 -0
  460. package/src/table/utils.ts +41 -0
  461. package/src/tabs/createTabs.ts +53 -12
  462. package/src/tag/createTag.ts +21 -32
  463. package/src/tag/createTagGroup.ts +92 -0
  464. package/src/toolbar/createToolbar.ts +6 -58
  465. package/src/tree/createTree.ts +69 -14
  466. package/src/tree/createTreeSelectionCheckbox.ts +14 -1
  467. package/src/utils/animation.ts +119 -27
  468. package/src/utils/dom.ts +3 -2
  469. package/src/utils/index.ts +2 -0
  470. package/dist/_chunk/createLongPress.js +0 -91
  471. package/dist/_chunk/createLongPress.js.map +0 -1
  472. package/dist/_chunk/createLongPress.jsx +0 -91
  473. package/dist/_chunk/createLongPress.jsx.map +0 -1
  474. package/dist/_chunk/form.js.map +0 -1
  475. package/dist/_chunk/form.jsx.map +0 -1
  476. package/dist/_chunk/live-announcer.js.map +0 -1
  477. package/dist/_chunk/live-announcer.jsx.map +0 -1
  478. package/dist/datepicker/createTimeSegment.d.ts +0 -29
  479. package/dist/datepicker/createTimeSegment.d.ts.map +0 -1
  480. package/src/datepicker/createTimeSegment.ts +0 -352
@@ -1,17 +1,48 @@
1
1
  /**
2
2
  * createDateField hook for Solidaria
3
3
  *
4
- * Provides the behavior and accessibility implementation for a date field component.
5
- * Based on @react-aria/datepicker useDateField
4
+ * Provides the behavior and accessibility implementation for a date field — a
5
+ * segmented spinbutton text input (NOT a calendar grid). Faithful port of
6
+ * @react-aria/datepicker `useDateField`: `fieldProps` IS the labelled
7
+ * `role="group"` that wraps the segments, `inputProps` describes a hidden native
8
+ * `<input>` for form submission, and segment labels/description/focus manager are
9
+ * published to each segment through the shared `hookData` WeakMap.
6
10
  */
7
11
 
8
- import { createMemo } from "solid-js";
9
- import { createId } from "../ssr";
10
- import { createLabel } from "../label/createLabel";
12
+ import { createMemo, onMount } from "solid-js";
11
13
  import { access, type MaybeAccessor } from "../utils/reactivity";
12
14
  import { mergeProps } from "../utils/mergeProps";
13
- import { useLocale } from "../i18n";
14
- import type { DateFieldState, DateSegment } from "@proyecto-viviana/solid-stately";
15
+ import { filterDOMProps } from "../utils/filterDOMProps";
16
+ import { createField } from "../label/createField";
17
+ import { createDescription } from "../utils/createDescription";
18
+ import { createFocusWithin } from "../interactions/createFocusWithin";
19
+ import { createFocusManager, type FocusManager } from "../focus/FocusScope";
20
+ import { createStringFormatter } from "../i18n";
21
+ import { createFormValidation } from "../form/createFormValidation";
22
+ import { createFormReset } from "../form/createFormReset";
23
+ import { datePickerStrings } from "./intl";
24
+ import { createDatePickerGroup } from "./createDatePickerGroup";
25
+ import type { DateFieldState } from "@proyecto-viviana/solid-stately";
26
+
27
+ // Shared channel between the field and its segments. Unlike upstream (which stores
28
+ // plain strings and re-runs the hook every render), `ariaDescribedBy` is stored as
29
+ // an accessor so segments pick up the description id once `createDescription`'s
30
+ // deferred effect has appended its hidden node.
31
+ export const hookData = new WeakMap<
32
+ object,
33
+ {
34
+ ariaLabel?: string;
35
+ ariaLabelledBy?: string;
36
+ ariaDescribedBy?: () => string | undefined;
37
+ focusManager: FocusManager;
38
+ }
39
+ >();
40
+
41
+ // Symbols used by DatePicker/DateRangePicker to make a nested date field
42
+ // role="presentation" and to inject a shared focus manager. Standalone fields
43
+ // never receive them.
44
+ export const roleSymbol = "__role_" + Date.now();
45
+ export const focusManagerSymbol = "__focusManager_" + Date.now();
15
46
 
16
47
  export interface AriaDateFieldProps {
17
48
  /** An ID for the date field. */
@@ -24,6 +55,10 @@ export interface AriaDateFieldProps {
24
55
  "aria-labelledby"?: string;
25
56
  /** The ID of an element that describes the date field. */
26
57
  "aria-describedby"?: string;
58
+ /** Description text. */
59
+ description?: string;
60
+ /** Error message. */
61
+ errorMessage?: string | string[];
27
62
  /** Whether the date field is disabled. */
28
63
  isDisabled?: boolean;
29
64
  /** Whether the date field is read-only. */
@@ -32,261 +67,235 @@ export interface AriaDateFieldProps {
32
67
  isRequired?: boolean;
33
68
  /** Whether the date field is invalid. */
34
69
  isInvalid?: boolean;
35
- /** Description text. */
36
- description?: string;
37
- /** Error message. */
38
- errorMessage?: string;
39
70
  /** Whether the element should receive focus on mount. */
40
71
  autoFocus?: boolean;
41
- }
42
-
43
- export interface DatePickerOverlayState {
44
- /** Whether the calendar overlay is open. */
45
- isOpen: boolean;
46
- /** Open the calendar overlay. */
47
- open: () => void;
48
- /** Close the calendar overlay. */
49
- close: () => void;
50
- /** Toggle the calendar overlay. */
51
- toggle: () => void;
72
+ /** The name of the hidden input used for form submission. */
73
+ name?: string;
74
+ /** The `<form>` the hidden input is associated with. */
75
+ form?: string;
76
+ /** Ref to the hidden input element, for form reset/validation. */
77
+ inputRef?: () => HTMLInputElement | undefined;
78
+ /** Whether HTML form validation is used. */
79
+ validationBehavior?: "aria" | "native";
80
+ onFocus?: (e: FocusEvent) => void;
81
+ onBlur?: (e: FocusEvent) => void;
82
+ onFocusChange?: (isFocused: boolean) => void;
83
+ onKeyDown?: (e: KeyboardEvent) => void;
84
+ onKeyUp?: (e: KeyboardEvent) => void;
85
+ /** @internal presentation-role marker (set by DatePicker). */
86
+ [key: string]: unknown;
52
87
  }
53
88
 
54
89
  export interface DateFieldAria {
55
90
  /** Props for the label element. */
56
91
  labelProps: Record<string, unknown>;
57
- /** Props for the field container element. */
92
+ /** Props for the field group element (wraps the segments). */
58
93
  fieldProps: Record<string, unknown>;
59
- /** Props for the input container (holds segments). */
94
+ /** Props for the hidden native input element. */
60
95
  inputProps: Record<string, unknown>;
61
96
  /** Props for the description element. */
62
97
  descriptionProps: Record<string, unknown>;
63
98
  /** Props for the error message element. */
64
99
  errorMessageProps: Record<string, unknown>;
65
- /** The segments to render. */
66
- segments: DateSegment[];
100
+ /** Whether the field is currently invalid. */
101
+ isInvalid: boolean;
102
+ /** The current error messages for the field, if invalid. */
103
+ validationErrors: string[];
104
+ /** The native validity state for the field. */
105
+ validationDetails: ValidityState;
67
106
  }
68
107
 
69
108
  /**
70
- * Provides the behavior and accessibility implementation for a date field component.
109
+ * Provides the behavior and accessibility implementation for a date field.
71
110
  */
72
111
  export function createDateField<T extends DateFieldState>(
73
112
  props: MaybeAccessor<AriaDateFieldProps>,
74
113
  state: T,
75
- _ref?: () => HTMLElement | null,
76
- overlayState?: DatePickerOverlayState,
114
+ ref: () => HTMLElement | null,
77
115
  ): DateFieldAria {
78
116
  const getProps = () => access(props);
79
- const id = createId(getProps().id);
80
- const descriptionId = createId();
81
- const errorMessageId = createId();
82
- const locale = useLocale();
83
117
 
84
- // Create label handling
85
- const { labelProps, fieldProps: labelFieldProps } = createLabel({
86
- get label() {
87
- return getProps().label;
118
+ const isPresentation = () => getProps()[roleSymbol] === "presentation";
119
+
120
+ const field = createField(() => {
121
+ const p = getProps();
122
+ const dv = state.displayValidation();
123
+ return {
124
+ id: p.id,
125
+ label: p.label,
126
+ "aria-label": p["aria-label"],
127
+ "aria-labelledby": p["aria-labelledby"],
128
+ "aria-describedby": p["aria-describedby"],
129
+ description: p.description,
130
+ labelElementType: "span",
131
+ isInvalid: dv.isInvalid,
132
+ errorMessage: p.errorMessage || dv.validationErrors,
133
+ };
134
+ });
135
+
136
+ // Track the value on focus so we only commit validation when it actually changed.
137
+ let valueOnFocus: unknown = null;
138
+ const { focusWithinProps } = createFocusWithin({
139
+ get isDisabled() {
140
+ return getProps().isDisabled;
141
+ },
142
+ onFocusWithin(e) {
143
+ valueOnFocus = state.value();
144
+ getProps().onFocus?.(e);
88
145
  },
89
- get "aria-label"() {
90
- return getProps()["aria-label"];
146
+ onBlurWithin(e) {
147
+ state.confirmPlaceholder();
148
+ if (state.value() !== valueOnFocus) {
149
+ state.commitValidation();
150
+ }
151
+ getProps().onBlur?.(e);
91
152
  },
92
- get "aria-labelledby"() {
93
- return getProps()["aria-labelledby"];
153
+ onFocusWithinChange(isFocused) {
154
+ getProps().onFocusChange?.(isFocused);
94
155
  },
95
- labelElementType: "span",
96
156
  });
97
157
 
98
- // Build aria-describedby
99
- const getAriaDescribedBy = () => {
100
- const p = getProps();
101
- const ids: string[] = [];
102
- if (p["aria-describedby"]) {
103
- ids.push(p["aria-describedby"]);
104
- }
105
- if (p.description) {
106
- ids.push(descriptionId);
158
+ const stringFormatter = createStringFormatter(datePickerStrings, "@react-aria/datepicker");
159
+ const description = createMemo(() => {
160
+ const value = state.value();
161
+ if (!value) {
162
+ return "";
107
163
  }
108
- if ((p.isInvalid || state.isInvalid()) && p.errorMessage) {
109
- ids.push(errorMessageId);
164
+ const message =
165
+ state.maxGranularity === "hour" ? "selectedTimeDescription" : "selectedDateDescription";
166
+ const fieldKey = state.maxGranularity === "hour" ? "time" : "date";
167
+ return stringFormatter().format(message, {
168
+ [fieldKey]: state.formatValue({ month: "long" }),
169
+ });
170
+ });
171
+ const descProps = createDescription(description);
172
+
173
+ // Within a date picker the field is role="presentation" and inherits the
174
+ // picker's own describedby; standalone it appends its own value description.
175
+ const describedBy = (): string | undefined => {
176
+ const fp = field.fieldProps as Record<string, string | undefined>;
177
+ if (isPresentation()) {
178
+ return fp["aria-describedby"];
110
179
  }
111
- return ids.length > 0 ? ids.join(" ") : undefined;
112
- };
113
-
114
- // Segments from state
115
- const segments = createMemo(() => state.segments());
116
-
117
- // Label ID for linking input to label
118
- const getLabelId = () => (labelProps as Record<string, string | undefined>).id;
119
-
120
- // Localized role description
121
- const getRoleDescription = () => {
122
- const language = locale().locale.toLowerCase().split("-")[0] ?? "en";
123
- return language === "es" ? "Campo de fecha" : "Date field";
180
+ return [descProps["aria-describedby"], fp["aria-describedby"]].filter(Boolean).join(" ") || undefined;
124
181
  };
125
182
 
126
- // Focus management helpers for segment navigation
127
- const focusSegment = (target: "first" | "last" | "prev" | "next", container: HTMLElement) => {
128
- const spinbuttons = Array.from(container.querySelectorAll<HTMLElement>('[role="spinbutton"]'));
129
- if (spinbuttons.length === 0) return;
130
-
131
- const active = document.activeElement as HTMLElement | null;
132
- const currentIndex = active ? spinbuttons.indexOf(active) : -1;
133
-
134
- if (target === "first") {
135
- spinbuttons[0]?.focus();
136
- return;
137
- }
183
+ const propsFocusManager = getProps()[focusManagerSymbol] as FocusManager | undefined;
184
+ const focusManager = propsFocusManager || createFocusManager(ref);
185
+
186
+ const groupProps = createDatePickerGroup(
187
+ state as unknown as { setOpen?: (isOpen: boolean) => void },
188
+ ref,
189
+ isPresentation(),
190
+ );
191
+
192
+ // Publish labels and the focus manager to the segments.
193
+ const labelId = (field.labelProps as Record<string, string | undefined>).id;
194
+ hookData.set(state as unknown as object, {
195
+ ariaLabel: getProps()["aria-label"],
196
+ ariaLabelledBy: [labelId, getProps()["aria-labelledby"]].filter(Boolean).join(" ") || undefined,
197
+ ariaDescribedBy: describedBy,
198
+ focusManager,
199
+ });
138
200
 
139
- if (target === "last") {
140
- spinbuttons[spinbuttons.length - 1]?.focus();
141
- return;
201
+ // Auto focus the first segment on mount when requested.
202
+ onMount(() => {
203
+ if (getProps().autoFocus) {
204
+ focusManager.focusFirst();
142
205
  }
206
+ });
143
207
 
144
- let nextIndex: number;
145
- if (currentIndex < 0) {
146
- nextIndex = target === "next" ? 0 : spinbuttons.length - 1;
147
- } else {
148
- nextIndex = target === "next" ? currentIndex + 1 : currentIndex - 1;
149
- }
208
+ // Form reset + native validation wiring.
209
+ if (props && typeof props === "object") {
210
+ createFormReset(
211
+ () => getProps().inputRef?.(),
212
+ state.defaultValue,
213
+ state.setValue as (value: unknown) => void,
214
+ );
215
+ createFormValidation(
216
+ {
217
+ get validationBehavior() {
218
+ return getProps().validationBehavior;
219
+ },
220
+ focus() {
221
+ focusManager.focusFirst();
222
+ },
223
+ },
224
+ state as unknown as Parameters<typeof createFormValidation>[1],
225
+ () => getProps().inputRef?.() as unknown as undefined,
226
+ );
227
+ }
150
228
 
151
- if (nextIndex >= 0 && nextIndex < spinbuttons.length) {
152
- spinbuttons[nextIndex]?.focus();
229
+ const fieldDOMProps = createMemo(() => {
230
+ if (isPresentation()) {
231
+ return { role: "presentation" };
153
232
  }
154
- };
233
+ return mergeProps(field.fieldProps as Record<string, unknown>, {
234
+ role: "group",
235
+ "aria-disabled": getProps().isDisabled || undefined,
236
+ "aria-describedby": describedBy(),
237
+ });
238
+ });
155
239
 
156
- // Field container props
157
240
  const fieldProps = createMemo(() => {
158
241
  const p = getProps();
159
-
160
- const baseProps: Record<string, unknown> = mergeProps(
161
- labelFieldProps as Record<string, unknown>,
242
+ const domProps = filterDOMProps(p as Record<string, unknown>);
243
+ return mergeProps(
244
+ domProps as Record<string, unknown>,
245
+ fieldDOMProps(),
246
+ groupProps(),
247
+ // In Solid, onFocus/onBlur do not bubble, so the group (which only ever
248
+ // receives focus from its segment descendants) must listen via the
249
+ // bubbling onFocusIn/onFocusOut events instead.
250
+ {
251
+ onFocusIn: focusWithinProps.onFocus,
252
+ onFocusOut: focusWithinProps.onBlur,
253
+ },
162
254
  {
163
- id,
164
- role: "group",
165
- "aria-disabled": p.isDisabled || state.isDisabled() || undefined,
166
- "aria-readonly": p.isReadOnly || state.isReadOnly() || undefined,
167
- "aria-required": p.isRequired || state.isRequired() || undefined,
168
- "aria-invalid": p.isInvalid || state.isInvalid() || undefined,
169
- "aria-describedby": getAriaDescribedBy(),
255
+ onKeyDown(e: KeyboardEvent) {
256
+ getProps().onKeyDown?.(e);
257
+ },
258
+ onKeyUp(e: KeyboardEvent) {
259
+ getProps().onKeyUp?.(e);
260
+ },
261
+ style: { unicodeBidi: "isolate" as const },
170
262
  },
171
263
  );
172
-
173
- // Integrate with date picker overlay when available
174
- if (overlayState) {
175
- const existingOnKeyDown = baseProps.onKeyDown as ((e: KeyboardEvent) => void) | undefined;
176
-
177
- baseProps.onKeyDown = (e: KeyboardEvent) => {
178
- existingOnKeyDown?.(e);
179
- if (e.altKey && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
180
- e.preventDefault();
181
- e.stopPropagation();
182
- overlayState.open();
183
- }
184
- };
185
- }
186
-
187
- return baseProps;
188
264
  });
189
265
 
190
- // Input container props
191
266
  const inputProps = createMemo(() => {
192
267
  const p = getProps();
193
- const labelId = getLabelId();
194
- const ariaLabelledBy = labelId
195
- ? p["aria-labelledby"]
196
- ? `${labelId} ${p["aria-labelledby"]}`
197
- : labelId
198
- : p["aria-labelledby"];
199
-
200
- const isDisabled = p.isDisabled || state.isDisabled();
201
- const isReadOnly = p.isReadOnly || state.isReadOnly();
202
- const isRequired = p.isRequired || state.isRequired();
203
- const isInvalid = p.isInvalid || state.isInvalid();
204
- const hasValue = state.value() != null;
205
-
206
- return {
207
- role: "presentation",
208
- "aria-labelledby": ariaLabelledBy,
209
- "aria-describedby": getAriaDescribedBy(),
210
- "aria-disabled": isDisabled || undefined,
211
- "aria-readonly": isReadOnly || undefined,
212
- "aria-required": isRequired || undefined,
213
- "aria-invalid": isInvalid || undefined,
214
- "aria-roledescription": getRoleDescription(),
215
- autoFocus: p.autoFocus,
216
- contentEditable: true,
217
- suppressContentEditableWarning: true,
218
- spellCheck: false,
219
- autoCorrect: "off",
220
- enterKeyHint: "next",
221
- inputMode: "numeric" as const,
222
- style: { caretColor: "transparent" },
223
- "data-placeholder": !hasValue ? "true" : undefined,
224
- onKeyDown: (e: KeyboardEvent) => {
225
- const target = e.target as HTMLElement;
226
- const currentTarget = e.currentTarget as HTMLElement;
227
-
228
- // Only handle at the container level, not when a segment is focused
229
- if (target !== currentTarget) return;
230
-
231
- const dir = locale().direction;
232
- const rtl = dir === "rtl";
233
-
234
- switch (e.key) {
235
- case "ArrowRight":
236
- e.preventDefault();
237
- focusSegment(rtl ? "prev" : "next", currentTarget);
238
- break;
239
- case "ArrowLeft":
240
- e.preventDefault();
241
- focusSegment(rtl ? "next" : "prev", currentTarget);
242
- break;
243
- case "Home":
244
- e.preventDefault();
245
- focusSegment("first", currentTarget);
246
- break;
247
- case "End":
248
- e.preventDefault();
249
- focusSegment("last", currentTarget);
250
- break;
251
- }
252
- },
253
- onFocus: () => {
254
- // Focus state is tracked by the component layer
255
- },
256
- onBlur: () => {
257
- state.confirmPlaceholder();
258
- },
259
- onClick: (e: MouseEvent) => {
260
- const target = e.target as HTMLElement;
261
- const currentTarget = e.currentTarget as HTMLElement;
262
-
263
- // Only handle when clicking the container itself (empty area between segments)
264
- if (target !== currentTarget) return;
265
-
266
- const spinbuttons = Array.from(
267
- currentTarget.querySelectorAll<HTMLElement>('[role="spinbutton"]'),
268
- );
269
- if (spinbuttons.length > 0) {
270
- spinbuttons[0].focus();
271
- }
272
- },
268
+ const value = state.value();
269
+ const base: Record<string, unknown> = {
270
+ type: "hidden",
271
+ name: p.name,
272
+ form: p.form,
273
+ value: value?.toString() || "",
274
+ disabled: p.isDisabled,
273
275
  };
276
+ if (p.validationBehavior === "native") {
277
+ // Use a hidden <input type="text"> rather than <input type="hidden"> so
278
+ // that an empty value blocks HTML form submission when the field is
279
+ // required. Mirrors @react-aria/datepicker useDateField.
280
+ base.type = "text";
281
+ base.hidden = true;
282
+ base.required = p.isRequired;
283
+ // Ignore the controlled-without-onChange warning.
284
+ base.onChange = () => {};
285
+ }
286
+ return base;
274
287
  });
275
288
 
276
- // Description props
277
- const descriptionProps = createMemo(() => ({
278
- id: descriptionId,
279
- }));
280
-
281
- // Error message props
282
- const errorMessageProps = createMemo(() => ({
283
- id: errorMessageId,
284
- role: "alert",
285
- }));
289
+ const displayValidation = () => state.displayValidation();
286
290
 
287
291
  return {
288
292
  get labelProps() {
289
- return labelProps as Record<string, unknown>;
293
+ return {
294
+ ...(field.labelProps as Record<string, unknown>),
295
+ onClick: () => {
296
+ focusManager.focusFirst();
297
+ },
298
+ };
290
299
  },
291
300
  get fieldProps() {
292
301
  return fieldProps();
@@ -295,13 +304,19 @@ export function createDateField<T extends DateFieldState>(
295
304
  return inputProps();
296
305
  },
297
306
  get descriptionProps() {
298
- return descriptionProps();
307
+ return field.descriptionProps as Record<string, unknown>;
299
308
  },
300
309
  get errorMessageProps() {
301
- return errorMessageProps();
310
+ return field.errorMessageProps as Record<string, unknown>;
311
+ },
312
+ get isInvalid() {
313
+ return displayValidation().isInvalid;
314
+ },
315
+ get validationErrors() {
316
+ return displayValidation().validationErrors;
302
317
  },
303
- get segments() {
304
- return segments();
318
+ get validationDetails() {
319
+ return displayValidation().validationDetails;
305
320
  },
306
321
  };
307
322
  }