@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,167 +1,877 @@
1
1
  import { t as createPress } from "./createPress.js";
2
- import { i as access, o as mergeProps } from "./env.js";
3
- import { S as scrollIntoViewport } from "./utils.js";
4
- import { a as getEventTarget, l as getScrollParent, t as focusSafely, y as nodeContains } from "./focus.js";
5
- import { a as useLocale } from "./createCollator.js";
2
+ import { i as mergeProps$1 } from "./env.js";
3
+ import { t as filterDOMProps } from "./filterDOMProps.js";
4
+ import { t as access } from "./reactivity.js";
5
+ import { A as isMac, D as isIOS, S as scrollIntoViewport, i as createDescription } from "./utils.js";
6
+ import { a as getEventTarget, l as getScrollParent, o as getFocusableTreeWalker, y as nodeContains } from "./focus.js";
7
+ import { t as createFocusWithin } from "./createFocusWithin.js";
8
+ import { i as useLocale } from "./locale.js";
9
+ import { n as createFilter, r as createDateFormatter } from "./i18n.js";
10
+ import { n as createStringFormatter } from "./createStringFormatter.js";
6
11
  import { createId } from "../ssr/index.js";
7
- import { t as createLabel } from "./createLabel.js";
8
- import { createMemo, createSignal, onCleanup } from "solid-js";
9
- import { DateFormatter, getLocalTimeZone } from "@internationalized/date";
12
+ import { t as createLabels } from "./createLabels.js";
13
+ import { t as createField } from "./createField.js";
14
+ import { t as createFormValidation } from "./createFormValidation.js";
15
+ import { n as createFocusManager } from "./FocusScope.js";
16
+ import { t as createFormReset } from "./createFormReset.js";
17
+ import { t as createSpinButton } from "./spinbutton.js";
18
+ import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
19
+ import { NumberParser } from "@internationalized/number";
20
+ import { LocalizedStringDictionary } from "@internationalized/string";
21
+ import { CalendarDate, toCalendar } from "@internationalized/date";
22
+ //#region src/datepicker/intl.ts
23
+ const datePickerStrings = {
24
+ "ar-AE": {
25
+ "calendar": `\u{627}\u{644}\u{62A}\u{642}\u{648}\u{64A}\u{645}`,
26
+ "day": `\u{64A}\u{648}\u{645}`,
27
+ "dayPeriod": `\u{635}/\u{645}`,
28
+ "endDate": `\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{627}\u{646}\u{62A}\u{647}\u{627}\u{621}`,
29
+ "era": `\u{627}\u{644}\u{639}\u{635}\u{631}`,
30
+ "hour": `\u{627}\u{644}\u{633}\u{627}\u{639}\u{627}\u{62A}`,
31
+ "minute": `\u{627}\u{644}\u{62F}\u{642}\u{627}\u{626}\u{642}`,
32
+ "month": `\u{627}\u{644}\u{634}\u{647}\u{631}`,
33
+ "second": `\u{627}\u{644}\u{62B}\u{648}\u{627}\u{646}\u{64A}`,
34
+ "selectedDateDescription": (args) => `\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${args?.date}`,
35
+ "selectedRangeDescription": (args) => `\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${args?.startDate} \u{625}\u{644}\u{649} ${args?.endDate}`,
36
+ "selectedTimeDescription": (args) => `\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${args?.time}`,
37
+ "startDate": `\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{628}\u{62F}\u{621}`,
38
+ "timeZoneName": `\u{627}\u{644}\u{62A}\u{648}\u{642}\u{64A}\u{62A}`,
39
+ "weekday": `\u{627}\u{644}\u{64A}\u{648}\u{645}`,
40
+ "year": `\u{627}\u{644}\u{633}\u{646}\u{629}`
41
+ },
42
+ "bg-BG": {
43
+ "calendar": `\u{41A}\u{430}\u{43B}\u{435}\u{43D}\u{434}\u{430}\u{440}`,
44
+ "day": `\u{434}\u{435}\u{43D}`,
45
+ "dayPeriod": `\u{43F}\u{440}.\u{43E}\u{431}./\u{441}\u{43B}.\u{43E}\u{431}.`,
46
+ "endDate": `\u{41A}\u{440}\u{430}\u{439}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,
47
+ "era": `\u{435}\u{440}\u{430}`,
48
+ "hour": `\u{447}\u{430}\u{441}`,
49
+ "minute": `\u{43C}\u{438}\u{43D}\u{443}\u{442}\u{430}`,
50
+ "month": `\u{43C}\u{435}\u{441}\u{435}\u{446}`,
51
+ "second": `\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}\u{430}`,
52
+ "selectedDateDescription": (args) => `\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${args?.date}`,
53
+ "selectedRangeDescription": (args) => `\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${args?.startDate} \u{434}\u{43E} ${args?.endDate}`,
54
+ "selectedTimeDescription": (args) => `\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${args?.time}`,
55
+ "startDate": `\u{41D}\u{430}\u{447}\u{430}\u{43B}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}`,
56
+ "timeZoneName": `\u{447}\u{430}\u{441}\u{43E}\u{432}\u{430} \u{437}\u{43E}\u{43D}\u{430}`,
57
+ "weekday": `\u{434}\u{435}\u{43D} \u{43E}\u{442} \u{441}\u{435}\u{434}\u{43C}\u{438}\u{446}\u{430}\u{442}\u{430}`,
58
+ "year": `\u{433}\u{43E}\u{434}\u{438}\u{43D}\u{430}`
59
+ },
60
+ "cs-CZ": {
61
+ "calendar": `Kalend\xe1\u{159}`,
62
+ "day": `den`,
63
+ "dayPeriod": `\u{10D}\xe1st dne`,
64
+ "endDate": `Kone\u{10D}n\xe9 datum`,
65
+ "era": `letopo\u{10D}et`,
66
+ "hour": `hodina`,
67
+ "minute": `minuta`,
68
+ "month": `m\u{11B}s\xedc`,
69
+ "second": `sekunda`,
70
+ "selectedDateDescription": (args) => `Vybran\xe9 datum: ${args?.date}`,
71
+ "selectedRangeDescription": (args) => `Vybran\xe9 obdob\xed: ${args?.startDate} a\u{17E} ${args?.endDate}`,
72
+ "selectedTimeDescription": (args) => `Vybran\xfd \u{10D}as: ${args?.time}`,
73
+ "startDate": `Po\u{10D}\xe1te\u{10D}n\xed datum`,
74
+ "timeZoneName": `\u{10D}asov\xe9 p\xe1smo`,
75
+ "weekday": `den v t\xfddnu`,
76
+ "year": `rok`
77
+ },
78
+ "da-DK": {
79
+ "calendar": `Kalender`,
80
+ "day": `dag`,
81
+ "dayPeriod": `AM/PM`,
82
+ "endDate": `Slutdato`,
83
+ "era": `\xe6ra`,
84
+ "hour": `time`,
85
+ "minute": `minut`,
86
+ "month": `m\xe5ned`,
87
+ "second": `sekund`,
88
+ "selectedDateDescription": (args) => `Valgt dato: ${args?.date}`,
89
+ "selectedRangeDescription": (args) => `Valgt interval: ${args?.startDate} til ${args?.endDate}`,
90
+ "selectedTimeDescription": (args) => `Valgt tidspunkt: ${args?.time}`,
91
+ "startDate": `Startdato`,
92
+ "timeZoneName": `tidszone`,
93
+ "weekday": `ugedag`,
94
+ "year": `\xe5r`
95
+ },
96
+ "de-DE": {
97
+ "calendar": `Kalender`,
98
+ "day": `Tag`,
99
+ "dayPeriod": `Tagesh\xe4lfte`,
100
+ "endDate": `Enddatum`,
101
+ "era": `Epoche`,
102
+ "hour": `Stunde`,
103
+ "minute": `Minute`,
104
+ "month": `Monat`,
105
+ "second": `Sekunde`,
106
+ "selectedDateDescription": (args) => `Ausgew\xe4hltes Datum: ${args?.date}`,
107
+ "selectedRangeDescription": (args) => `Ausgew\xe4hlter Bereich: ${args?.startDate} bis ${args?.endDate}`,
108
+ "selectedTimeDescription": (args) => `Ausgew\xe4hlte Zeit: ${args?.time}`,
109
+ "startDate": `Startdatum`,
110
+ "timeZoneName": `Zeitzone`,
111
+ "weekday": `Wochentag`,
112
+ "year": `Jahr`
113
+ },
114
+ "el-GR": {
115
+ "calendar": `\u{397}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BB}\u{3CC}\u{3B3}\u{3B9}\u{3BF}`,
116
+ "day": `\u{3B7}\u{3BC}\u{3AD}\u{3C1}\u{3B1}`,
117
+ "dayPeriod": `\u{3C0}.\u{3BC}./\u{3BC}.\u{3BC}.`,
118
+ "endDate": `\u{397}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3BB}\u{3AE}\u{3BE}\u{3B7}\u{3C2}`,
119
+ "era": `\u{3C0}\u{3B5}\u{3C1}\u{3AF}\u{3BF}\u{3B4}\u{3BF}\u{3C2}`,
120
+ "hour": `\u{3CE}\u{3C1}\u{3B1}`,
121
+ "minute": `\u{3BB}\u{3B5}\u{3C0}\u{3C4}\u{3CC}`,
122
+ "month": `\u{3BC}\u{3AE}\u{3BD}\u{3B1}\u{3C2}`,
123
+ "second": `\u{3B4}\u{3B5}\u{3C5}\u{3C4}\u{3B5}\u{3C1}\u{3CC}\u{3BB}\u{3B5}\u{3C0}\u{3C4}\u{3BF}`,
124
+ "selectedDateDescription": (args) => `\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${args?.date}`,
125
+ "selectedRangeDescription": (args) => `\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${args?.startDate} \u{3AD}\u{3C9}\u{3C2} ${args?.endDate}`,
126
+ "selectedTimeDescription": (args) => `\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${args?.time}`,
127
+ "startDate": `\u{397}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3AD}\u{3BD}\u{3B1}\u{3C1}\u{3BE}\u{3B7}\u{3C2}`,
128
+ "timeZoneName": `\u{3B6}\u{3CE}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}\u{3C2}`,
129
+ "weekday": `\u{3BA}\u{3B1}\u{3B8}\u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3B9}\u{3BD}\u{3AE}`,
130
+ "year": `\u{3AD}\u{3C4}\u{3BF}\u{3C2}`
131
+ },
132
+ "en-US": {
133
+ "era": `era`,
134
+ "year": `year`,
135
+ "month": `month`,
136
+ "day": `day`,
137
+ "hour": `hour`,
138
+ "minute": `minute`,
139
+ "second": `second`,
140
+ "dayPeriod": `AM/PM`,
141
+ "calendar": `Calendar`,
142
+ "startDate": `Start Date`,
143
+ "endDate": `End Date`,
144
+ "weekday": `day of the week`,
145
+ "timeZoneName": `time zone`,
146
+ "selectedDateDescription": (args) => `Selected Date: ${args?.date}`,
147
+ "selectedRangeDescription": (args) => `Selected Range: ${args?.startDate} to ${args?.endDate}`,
148
+ "selectedTimeDescription": (args) => `Selected Time: ${args?.time}`
149
+ },
150
+ "es-ES": {
151
+ "calendar": `Calendario`,
152
+ "day": `d\xeda`,
153
+ "dayPeriod": `a.\xa0m./p.\xa0m.`,
154
+ "endDate": `Fecha final`,
155
+ "era": `era`,
156
+ "hour": `hora`,
157
+ "minute": `minuto`,
158
+ "month": `mes`,
159
+ "second": `segundo`,
160
+ "selectedDateDescription": (args) => `Fecha seleccionada: ${args?.date}`,
161
+ "selectedRangeDescription": (args) => `Rango seleccionado: ${args?.startDate} a ${args?.endDate}`,
162
+ "selectedTimeDescription": (args) => `Hora seleccionada: ${args?.time}`,
163
+ "startDate": `Fecha de inicio`,
164
+ "timeZoneName": `zona horaria`,
165
+ "weekday": `d\xeda de la semana`,
166
+ "year": `a\xf1o`
167
+ },
168
+ "et-EE": {
169
+ "calendar": `Kalender`,
170
+ "day": `p\xe4ev`,
171
+ "dayPeriod": `enne/p\xe4rast l\xf5unat`,
172
+ "endDate": `L\xf5ppkuup\xe4ev`,
173
+ "era": `ajastu`,
174
+ "hour": `tund`,
175
+ "minute": `minut`,
176
+ "month": `kuu`,
177
+ "second": `sekund`,
178
+ "selectedDateDescription": (args) => `Valitud kuup\xe4ev: ${args?.date}`,
179
+ "selectedRangeDescription": (args) => `Valitud vahemik: ${args?.startDate} kuni ${args?.endDate}`,
180
+ "selectedTimeDescription": (args) => `Valitud aeg: ${args?.time}`,
181
+ "startDate": `Alguskuup\xe4ev`,
182
+ "timeZoneName": `ajav\xf6\xf6nd`,
183
+ "weekday": `n\xe4dalap\xe4ev`,
184
+ "year": `aasta`
185
+ },
186
+ "fi-FI": {
187
+ "calendar": `Kalenteri`,
188
+ "day": `p\xe4iv\xe4`,
189
+ "dayPeriod": `vuorokaudenaika`,
190
+ "endDate": `P\xe4\xe4ttymisp\xe4iv\xe4`,
191
+ "era": `aikakausi`,
192
+ "hour": `tunti`,
193
+ "minute": `minuutti`,
194
+ "month": `kuukausi`,
195
+ "second": `sekunti`,
196
+ "selectedDateDescription": (args) => `Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${args?.date}`,
197
+ "selectedRangeDescription": (args) => `Valittu aikav\xe4li: ${args?.startDate} \u{2013} ${args?.endDate}`,
198
+ "selectedTimeDescription": (args) => `Valittu aika: ${args?.time}`,
199
+ "startDate": `Alkamisp\xe4iv\xe4`,
200
+ "timeZoneName": `aikavy\xf6hyke`,
201
+ "weekday": `viikonp\xe4iv\xe4`,
202
+ "year": `vuosi`
203
+ },
204
+ "fr-FR": {
205
+ "calendar": `Calendrier`,
206
+ "day": `jour`,
207
+ "dayPeriod": `cadran`,
208
+ "endDate": `Date de fin`,
209
+ "era": `\xe8re`,
210
+ "hour": `heure`,
211
+ "minute": `minute`,
212
+ "month": `mois`,
213
+ "second": `seconde`,
214
+ "selectedDateDescription": (args) => `Date s\xe9lectionn\xe9e\xa0: ${args?.date}`,
215
+ "selectedRangeDescription": (args) => `Plage s\xe9lectionn\xe9e\xa0: ${args?.startDate} au ${args?.endDate}`,
216
+ "selectedTimeDescription": (args) => `Heure choisie\xa0: ${args?.time}`,
217
+ "startDate": `Date de d\xe9but`,
218
+ "timeZoneName": `fuseau horaire`,
219
+ "weekday": `jour de la semaine`,
220
+ "year": `ann\xe9e`
221
+ },
222
+ "he-IL": {
223
+ "calendar": `\u{5DC}\u{5D5}\u{5D7} \u{5E9}\u{5E0}\u{5D4}`,
224
+ "day": `\u{5D9}\u{5D5}\u{5DD}`,
225
+ "dayPeriod": `\u{5DC}\u{5E4}\u{5E0}\u{5D4}\u{5F4}\u{5E6}/\u{5D0}\u{5D7}\u{5D4}\u{5F4}\u{5E6}`,
226
+ "endDate": `\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E1}\u{5D9}\u{5D5}\u{5DD}`,
227
+ "era": `\u{5EA}\u{5E7}\u{5D5}\u{5E4}\u{5D4}`,
228
+ "hour": `\u{5E9}\u{5E2}\u{5D4}`,
229
+ "minute": `\u{5D3}\u{5E7}\u{5D4}`,
230
+ "month": `\u{5D7}\u{5D5}\u{5D3}\u{5E9}`,
231
+ "second": `\u{5E9}\u{5E0}\u{5D9}\u{5D9}\u{5D4}`,
232
+ "selectedDateDescription": (args) => `\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${args?.date}`,
233
+ "selectedRangeDescription": (args) => `\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${args?.startDate} \u{5E2}\u{5D3} ${args?.endDate}`,
234
+ "selectedTimeDescription": (args) => `\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${args?.time}`,
235
+ "startDate": `\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5EA}\u{5D7}\u{5DC}\u{5D4}`,
236
+ "timeZoneName": `\u{5D0}\u{5D6}\u{5D5}\u{5E8} \u{5D6}\u{5DE}\u{5DF}`,
237
+ "weekday": `\u{5D9}\u{5D5}\u{5DD} \u{5D1}\u{5E9}\u{5D1}\u{5D5}\u{5E2}`,
238
+ "year": `\u{5E9}\u{5E0}\u{5D4}`
239
+ },
240
+ "hr-HR": {
241
+ "calendar": `Kalendar`,
242
+ "day": `dan`,
243
+ "dayPeriod": `AM/PM`,
244
+ "endDate": `Datum zavr\u{161}etka`,
245
+ "era": `era`,
246
+ "hour": `sat`,
247
+ "minute": `minuta`,
248
+ "month": `mjesec`,
249
+ "second": `sekunda`,
250
+ "selectedDateDescription": (args) => `Odabrani datum: ${args?.date}`,
251
+ "selectedRangeDescription": (args) => `Odabrani raspon: ${args?.startDate} do ${args?.endDate}`,
252
+ "selectedTimeDescription": (args) => `Odabrano vrijeme: ${args?.time}`,
253
+ "startDate": `Datum po\u{10D}etka`,
254
+ "timeZoneName": `vremenska zona`,
255
+ "weekday": `dan u tjednu`,
256
+ "year": `godina`
257
+ },
258
+ "hu-HU": {
259
+ "calendar": `Napt\xe1r`,
260
+ "day": `nap`,
261
+ "dayPeriod": `napszak`,
262
+ "endDate": `Befejez\u{151} d\xe1tum`,
263
+ "era": `\xe9ra`,
264
+ "hour": `\xf3ra`,
265
+ "minute": `perc`,
266
+ "month": `h\xf3nap`,
267
+ "second": `m\xe1sodperc`,
268
+ "selectedDateDescription": (args) => `Kijel\xf6lt d\xe1tum: ${args?.date}`,
269
+ "selectedRangeDescription": (args) => `Kijel\xf6lt tartom\xe1ny: ${args?.startDate}\u{2013}${args?.endDate}`,
270
+ "selectedTimeDescription": (args) => `Kijel\xf6lt id\u{151}: ${args?.time}`,
271
+ "startDate": `Kezd\u{151} d\xe1tum`,
272
+ "timeZoneName": `id\u{151}z\xf3na`,
273
+ "weekday": `h\xe9t napja`,
274
+ "year": `\xe9v`
275
+ },
276
+ "it-IT": {
277
+ "calendar": `Calendario`,
278
+ "day": `giorno`,
279
+ "dayPeriod": `AM/PM`,
280
+ "endDate": `Data finale`,
281
+ "era": `era`,
282
+ "hour": `ora`,
283
+ "minute": `minuto`,
284
+ "month": `mese`,
285
+ "second": `secondo`,
286
+ "selectedDateDescription": (args) => `Data selezionata: ${args?.date}`,
287
+ "selectedRangeDescription": (args) => `Intervallo selezionato: da ${args?.startDate} a ${args?.endDate}`,
288
+ "selectedTimeDescription": (args) => `Ora selezionata: ${args?.time}`,
289
+ "startDate": `Data iniziale`,
290
+ "timeZoneName": `fuso orario`,
291
+ "weekday": `giorno della settimana`,
292
+ "year": `anno`
293
+ },
294
+ "ja-JP": {
295
+ "calendar": `\u{30AB}\u{30EC}\u{30F3}\u{30C0}\u{30FC}`,
296
+ "day": `\u{65E5}`,
297
+ "dayPeriod": `\u{5348}\u{524D}/\u{5348}\u{5F8C}`,
298
+ "endDate": `\u{7D42}\u{4E86}\u{65E5}`,
299
+ "era": `\u{6642}\u{4EE3}`,
300
+ "hour": `\u{6642}`,
301
+ "minute": `\u{5206}`,
302
+ "month": `\u{6708}`,
303
+ "second": `\u{79D2}`,
304
+ "selectedDateDescription": (args) => `\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${args?.date}`,
305
+ "selectedRangeDescription": (args) => `\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${args?.startDate} \u{304B}\u{3089} ${args?.endDate}`,
306
+ "selectedTimeDescription": (args) => `\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${args?.time}`,
307
+ "startDate": `\u{958B}\u{59CB}\u{65E5}`,
308
+ "timeZoneName": `\u{30BF}\u{30A4}\u{30E0}\u{30BE}\u{30FC}\u{30F3}`,
309
+ "weekday": `\u{66DC}\u{65E5}`,
310
+ "year": `\u{5E74}`
311
+ },
312
+ "ko-KR": {
313
+ "calendar": `\u{B2EC}\u{B825}`,
314
+ "day": `\u{C77C}`,
315
+ "dayPeriod": `\u{C624}\u{C804}/\u{C624}\u{D6C4}`,
316
+ "endDate": `\u{C885}\u{B8CC}\u{C77C}`,
317
+ "era": `\u{C5F0}\u{D638}`,
318
+ "hour": `\u{C2DC}`,
319
+ "minute": `\u{BD84}`,
320
+ "month": `\u{C6D4}`,
321
+ "second": `\u{CD08}`,
322
+ "selectedDateDescription": (args) => `\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${args?.date}`,
323
+ "selectedRangeDescription": (args) => `\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${args?.startDate} ~ ${args?.endDate}`,
324
+ "selectedTimeDescription": (args) => `\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${args?.time}`,
325
+ "startDate": `\u{C2DC}\u{C791}\u{C77C}`,
326
+ "timeZoneName": `\u{C2DC}\u{AC04}\u{B300}`,
327
+ "weekday": `\u{C694}\u{C77C}`,
328
+ "year": `\u{B144}`
329
+ },
330
+ "lt-LT": {
331
+ "calendar": `Kalendorius`,
332
+ "day": `diena`,
333
+ "dayPeriod": `iki piet\u{173} / po piet\u{173}`,
334
+ "endDate": `Pabaigos data`,
335
+ "era": `era`,
336
+ "hour": `valanda`,
337
+ "minute": `minut\u{117}`,
338
+ "month": `m\u{117}nuo`,
339
+ "second": `sekund\u{117}`,
340
+ "selectedDateDescription": (args) => `Pasirinkta data: ${args?.date}`,
341
+ "selectedRangeDescription": (args) => `Pasirinktas intervalas: nuo ${args?.startDate} iki ${args?.endDate}`,
342
+ "selectedTimeDescription": (args) => `Pasirinktas laikas: ${args?.time}`,
343
+ "startDate": `Prad\u{17E}ios data`,
344
+ "timeZoneName": `laiko juosta`,
345
+ "weekday": `savait\u{117}s diena`,
346
+ "year": `metai`
347
+ },
348
+ "lv-LV": {
349
+ "calendar": `Kalend\u{101}rs`,
350
+ "day": `diena`,
351
+ "dayPeriod": `priek\u{161}pusdien\u{101}/p\u{113}cpusdien\u{101}`,
352
+ "endDate": `Beigu datums`,
353
+ "era": `\u{113}ra`,
354
+ "hour": `stundas`,
355
+ "minute": `min\u{16B}tes`,
356
+ "month": `m\u{113}nesis`,
357
+ "second": `sekundes`,
358
+ "selectedDateDescription": (args) => `Atlas\u{12B}tais datums: ${args?.date}`,
359
+ "selectedRangeDescription": (args) => `Atlas\u{12B}tais diapazons: no ${args?.startDate} l\u{12B}dz ${args?.endDate}`,
360
+ "selectedTimeDescription": (args) => `Atlas\u{12B}tais laiks: ${args?.time}`,
361
+ "startDate": `S\u{101}kuma datums`,
362
+ "timeZoneName": `laika josla`,
363
+ "weekday": `ned\u{113}\u{13C}as diena`,
364
+ "year": `gads`
365
+ },
366
+ "nb-NO": {
367
+ "calendar": `Kalender`,
368
+ "day": `dag`,
369
+ "dayPeriod": `a.m./p.m.`,
370
+ "endDate": `Sluttdato`,
371
+ "era": `tidsalder`,
372
+ "hour": `time`,
373
+ "minute": `minutt`,
374
+ "month": `m\xe5ned`,
375
+ "second": `sekund`,
376
+ "selectedDateDescription": (args) => `Valgt dato: ${args?.date}`,
377
+ "selectedRangeDescription": (args) => `Valgt omr\xe5de: ${args?.startDate} til ${args?.endDate}`,
378
+ "selectedTimeDescription": (args) => `Valgt tid: ${args?.time}`,
379
+ "startDate": `Startdato`,
380
+ "timeZoneName": `tidssone`,
381
+ "weekday": `ukedag`,
382
+ "year": `\xe5r`
383
+ },
384
+ "nl-NL": {
385
+ "calendar": `Kalender`,
386
+ "day": `dag`,
387
+ "dayPeriod": `a.m./p.m.`,
388
+ "endDate": `Einddatum`,
389
+ "era": `tijdperk`,
390
+ "hour": `uur`,
391
+ "minute": `minuut`,
392
+ "month": `maand`,
393
+ "second": `seconde`,
394
+ "selectedDateDescription": (args) => `Geselecteerde datum: ${args?.date}`,
395
+ "selectedRangeDescription": (args) => `Geselecteerd bereik: ${args?.startDate} tot ${args?.endDate}`,
396
+ "selectedTimeDescription": (args) => `Geselecteerde tijd: ${args?.time}`,
397
+ "startDate": `Startdatum`,
398
+ "timeZoneName": `tijdzone`,
399
+ "weekday": `dag van de week`,
400
+ "year": `jaar`
401
+ },
402
+ "pl-PL": {
403
+ "calendar": `Kalendarz`,
404
+ "day": `dzie\u{144}`,
405
+ "dayPeriod": `rano / po po\u{142}udniu / wieczorem`,
406
+ "endDate": `Data ko\u{144}cowa`,
407
+ "era": `era`,
408
+ "hour": `godzina`,
409
+ "minute": `minuta`,
410
+ "month": `miesi\u{105}c`,
411
+ "second": `sekunda`,
412
+ "selectedDateDescription": (args) => `Wybrana data: ${args?.date}`,
413
+ "selectedRangeDescription": (args) => `Wybrany zakres: ${args?.startDate} do ${args?.endDate}`,
414
+ "selectedTimeDescription": (args) => `Wybrany czas: ${args?.time}`,
415
+ "startDate": `Data pocz\u{105}tkowa`,
416
+ "timeZoneName": `strefa czasowa`,
417
+ "weekday": `dzie\u{144} tygodnia`,
418
+ "year": `rok`
419
+ },
420
+ "pt-BR": {
421
+ "calendar": `Calend\xe1rio`,
422
+ "day": `dia`,
423
+ "dayPeriod": `AM/PM`,
424
+ "endDate": `Data final`,
425
+ "era": `era`,
426
+ "hour": `hora`,
427
+ "minute": `minuto`,
428
+ "month": `m\xeas`,
429
+ "second": `segundo`,
430
+ "selectedDateDescription": (args) => `Data selecionada: ${args?.date}`,
431
+ "selectedRangeDescription": (args) => `Intervalo selecionado: ${args?.startDate} a ${args?.endDate}`,
432
+ "selectedTimeDescription": (args) => `Hora selecionada: ${args?.time}`,
433
+ "startDate": `Data inicial`,
434
+ "timeZoneName": `fuso hor\xe1rio`,
435
+ "weekday": `dia da semana`,
436
+ "year": `ano`
437
+ },
438
+ "pt-PT": {
439
+ "calendar": `Calend\xe1rio`,
440
+ "day": `dia`,
441
+ "dayPeriod": `am/pm`,
442
+ "endDate": `Data de T\xe9rmino`,
443
+ "era": `era`,
444
+ "hour": `hora`,
445
+ "minute": `minuto`,
446
+ "month": `m\xeas`,
447
+ "second": `segundo`,
448
+ "selectedDateDescription": (args) => `Data selecionada: ${args?.date}`,
449
+ "selectedRangeDescription": (args) => `Intervalo selecionado: ${args?.startDate} a ${args?.endDate}`,
450
+ "selectedTimeDescription": (args) => `Hora selecionada: ${args?.time}`,
451
+ "startDate": `Data de In\xedcio`,
452
+ "timeZoneName": `fuso hor\xe1rio`,
453
+ "weekday": `dia da semana`,
454
+ "year": `ano`
455
+ },
456
+ "ro-RO": {
457
+ "calendar": `Calendar`,
458
+ "day": `zi`,
459
+ "dayPeriod": `a.m/p.m.`,
460
+ "endDate": `Dat\u{103} final`,
461
+ "era": `er\u{103}`,
462
+ "hour": `or\u{103}`,
463
+ "minute": `minut`,
464
+ "month": `lun\u{103}`,
465
+ "second": `secund\u{103}`,
466
+ "selectedDateDescription": (args) => `Dat\u{103} selectat\u{103}: ${args?.date}`,
467
+ "selectedRangeDescription": (args) => `Interval selectat: de la ${args?.startDate} p\xe2n\u{103} la ${args?.endDate}`,
468
+ "selectedTimeDescription": (args) => `Ora selectat\u{103}: ${args?.time}`,
469
+ "startDate": `Dat\u{103} \xeenceput`,
470
+ "timeZoneName": `fus orar`,
471
+ "weekday": `ziua din s\u{103}pt\u{103}m\xe2n\u{103}`,
472
+ "year": `an`
473
+ },
474
+ "ru-RU": {
475
+ "calendar": `\u{41A}\u{430}\u{43B}\u{435}\u{43D}\u{434}\u{430}\u{440}\u{44C}`,
476
+ "day": `\u{434}\u{435}\u{43D}\u{44C}`,
477
+ "dayPeriod": `AM/PM`,
478
+ "endDate": `\u{414}\u{430}\u{442}\u{430} \u{43E}\u{43A}\u{43E}\u{43D}\u{447}\u{430}\u{43D}\u{438}\u{44F}`,
479
+ "era": `\u{44D}\u{440}\u{430}`,
480
+ "hour": `\u{447}\u{430}\u{441}`,
481
+ "minute": `\u{43C}\u{438}\u{43D}\u{443}\u{442}\u{430}`,
482
+ "month": `\u{43C}\u{435}\u{441}\u{44F}\u{446}`,
483
+ "second": `\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}\u{430}`,
484
+ "selectedDateDescription": (args) => `\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${args?.date}`,
485
+ "selectedRangeDescription": (args) => `\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${args?.startDate} \u{43F}\u{43E} ${args?.endDate}`,
486
+ "selectedTimeDescription": (args) => `\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${args?.time}`,
487
+ "startDate": `\u{414}\u{430}\u{442}\u{430} \u{43D}\u{430}\u{447}\u{430}\u{43B}\u{430}`,
488
+ "timeZoneName": `\u{447}\u{430}\u{441}\u{43E}\u{432}\u{43E}\u{439} \u{43F}\u{43E}\u{44F}\u{441}`,
489
+ "weekday": `\u{434}\u{435}\u{43D}\u{44C} \u{43D}\u{435}\u{434}\u{435}\u{43B}\u{438}`,
490
+ "year": `\u{433}\u{43E}\u{434}`
491
+ },
492
+ "sk-SK": {
493
+ "calendar": `Kalend\xe1r`,
494
+ "day": `de\u{148}`,
495
+ "dayPeriod": `AM/PM`,
496
+ "endDate": `D\xe1tum ukon\u{10D}enia`,
497
+ "era": `letopo\u{10D}et`,
498
+ "hour": `hodina`,
499
+ "minute": `min\xfata`,
500
+ "month": `mesiac`,
501
+ "second": `sekunda`,
502
+ "selectedDateDescription": (args) => `Vybrat\xfd d\xe1tum: ${args?.date}`,
503
+ "selectedRangeDescription": (args) => `Vybrat\xfd rozsah: od ${args?.startDate} do ${args?.endDate}`,
504
+ "selectedTimeDescription": (args) => `Vybrat\xfd \u{10D}as: ${args?.time}`,
505
+ "startDate": `D\xe1tum za\u{10D}atia`,
506
+ "timeZoneName": `\u{10D}asov\xe9 p\xe1smo`,
507
+ "weekday": `de\u{148} t\xfd\u{17E}d\u{148}a`,
508
+ "year": `rok`
509
+ },
510
+ "sl-SI": {
511
+ "calendar": `Koledar`,
512
+ "day": `dan`,
513
+ "dayPeriod": `dop/pop`,
514
+ "endDate": `Datum konca`,
515
+ "era": `doba`,
516
+ "hour": `ura`,
517
+ "minute": `minuta`,
518
+ "month": `mesec`,
519
+ "second": `sekunda`,
520
+ "selectedDateDescription": (args) => `Izbrani datum: ${args?.date}`,
521
+ "selectedRangeDescription": (args) => `Izbrano obmo\u{10D}je: ${args?.startDate} do ${args?.endDate}`,
522
+ "selectedTimeDescription": (args) => `Izbrani \u{10D}as: ${args?.time}`,
523
+ "startDate": `Datum za\u{10D}etka`,
524
+ "timeZoneName": `\u{10D}asovni pas`,
525
+ "weekday": `dan v tednu`,
526
+ "year": `leto`
527
+ },
528
+ "sr-SP": {
529
+ "calendar": `Kalendar`,
530
+ "day": `\u{434}\u{430}\u{43D}`,
531
+ "dayPeriod": `\u{43F}\u{440}\u{435} \u{43F}\u{43E}\u{434}\u{43D}\u{435}/\u{43F}\u{43E} \u{43F}\u{43E}\u{434}\u{43D}\u{435}`,
532
+ "endDate": `Datum zavr\u{161}etka`,
533
+ "era": `\u{435}\u{440}\u{430}`,
534
+ "hour": `\u{441}\u{430}\u{442}`,
535
+ "minute": `\u{43C}\u{438}\u{43D}\u{443}\u{442}`,
536
+ "month": `\u{43C}\u{435}\u{441}\u{435}\u{446}`,
537
+ "second": `\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}`,
538
+ "selectedDateDescription": (args) => `Izabrani datum: ${args?.date}`,
539
+ "selectedRangeDescription": (args) => `Izabrani opseg: od ${args?.startDate} do ${args?.endDate}`,
540
+ "selectedTimeDescription": (args) => `Izabrano vreme: ${args?.time}`,
541
+ "startDate": `Datum po\u{10D}etka`,
542
+ "timeZoneName": `\u{432}\u{440}\u{435}\u{43C}\u{435}\u{43D}\u{441}\u{43A}\u{430} \u{437}\u{43E}\u{43D}\u{430}`,
543
+ "weekday": `\u{434}\u{430}\u{43D} \u{443} \u{43D}\u{435}\u{434}\u{435}\u{459}\u{438}`,
544
+ "year": `\u{433}\u{43E}\u{434}\u{438}\u{43D}\u{430}`
545
+ },
546
+ "sv-SE": {
547
+ "calendar": `Kalender`,
548
+ "day": `dag`,
549
+ "dayPeriod": `fm/em`,
550
+ "endDate": `Slutdatum`,
551
+ "era": `era`,
552
+ "hour": `timme`,
553
+ "minute": `minut`,
554
+ "month": `m\xe5nad`,
555
+ "second": `sekund`,
556
+ "selectedDateDescription": (args) => `Valt datum: ${args?.date}`,
557
+ "selectedRangeDescription": (args) => `Valt intervall: ${args?.startDate} till ${args?.endDate}`,
558
+ "selectedTimeDescription": (args) => `Vald tid: ${args?.time}`,
559
+ "startDate": `Startdatum`,
560
+ "timeZoneName": `tidszon`,
561
+ "weekday": `veckodag`,
562
+ "year": `\xe5r`
563
+ },
564
+ "tr-TR": {
565
+ "calendar": `Takvim`,
566
+ "day": `g\xfcn`,
567
+ "dayPeriod": `\xd6\xd6/\xd6S`,
568
+ "endDate": `Biti\u{15F} Tarihi`,
569
+ "era": `\xe7a\u{11F}`,
570
+ "hour": `saat`,
571
+ "minute": `dakika`,
572
+ "month": `ay`,
573
+ "second": `saniye`,
574
+ "selectedDateDescription": (args) => `Se\xe7ilen Tarih: ${args?.date}`,
575
+ "selectedRangeDescription": (args) => `Se\xe7ilen Aral\u{131}k: ${args?.startDate} - ${args?.endDate}`,
576
+ "selectedTimeDescription": (args) => `Se\xe7ilen Zaman: ${args?.time}`,
577
+ "startDate": `Ba\u{15F}lang\u{131}\xe7 Tarihi`,
578
+ "timeZoneName": `saat dilimi`,
579
+ "weekday": `haftan\u{131}n g\xfcn\xfc`,
580
+ "year": `y\u{131}l`
581
+ },
582
+ "uk-UA": {
583
+ "calendar": `\u{41A}\u{430}\u{43B}\u{435}\u{43D}\u{434}\u{430}\u{440}`,
584
+ "day": `\u{434}\u{435}\u{43D}\u{44C}`,
585
+ "dayPeriod": `\u{434}\u{43F}/\u{43F}\u{43F}`,
586
+ "endDate": `\u{414}\u{430}\u{442}\u{430} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{435}\u{43D}\u{43D}\u{44F}`,
587
+ "era": `\u{435}\u{440}\u{430}`,
588
+ "hour": `\u{433}\u{43E}\u{434}\u{438}\u{43D}\u{430}`,
589
+ "minute": `\u{445}\u{432}\u{438}\u{43B}\u{438}\u{43D}\u{430}`,
590
+ "month": `\u{43C}\u{456}\u{441}\u{44F}\u{446}\u{44C}`,
591
+ "second": `\u{441}\u{435}\u{43A}\u{443}\u{43D}\u{434}\u{430}`,
592
+ "selectedDateDescription": (args) => `\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${args?.date}`,
593
+ "selectedRangeDescription": (args) => `\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${args?.startDate} \u{2014} ${args?.endDate}`,
594
+ "selectedTimeDescription": (args) => `\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${args?.time}`,
595
+ "startDate": `\u{414}\u{430}\u{442}\u{430} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{43A}\u{443}`,
596
+ "timeZoneName": `\u{447}\u{430}\u{441}\u{43E}\u{432}\u{438}\u{439} \u{43F}\u{43E}\u{44F}\u{441}`,
597
+ "weekday": `\u{434}\u{435}\u{43D}\u{44C} \u{442}\u{438}\u{436}\u{43D}\u{44F}`,
598
+ "year": `\u{440}\u{456}\u{43A}`
599
+ },
600
+ "zh-CN": {
601
+ "calendar": `\u{65E5}\u{5386}`,
602
+ "day": `\u{65E5}`,
603
+ "dayPeriod": `\u{4E0A}\u{5348}/\u{4E0B}\u{5348}`,
604
+ "endDate": `\u{7ED3}\u{675F}\u{65E5}\u{671F}`,
605
+ "era": `\u{7EAA}\u{5143}`,
606
+ "hour": `\u{5C0F}\u{65F6}`,
607
+ "minute": `\u{5206}\u{949F}`,
608
+ "month": `\u{6708}`,
609
+ "second": `\u{79D2}`,
610
+ "selectedDateDescription": (args) => `\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${args?.date}`,
611
+ "selectedRangeDescription": (args) => `\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${args?.startDate} \u{81F3} ${args?.endDate}`,
612
+ "selectedTimeDescription": (args) => `\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${args?.time}`,
613
+ "startDate": `\u{5F00}\u{59CB}\u{65E5}\u{671F}`,
614
+ "timeZoneName": `\u{65F6}\u{533A}`,
615
+ "weekday": `\u{5DE5}\u{4F5C}\u{65E5}`,
616
+ "year": `\u{5E74}`
617
+ },
618
+ "zh-TW": {
619
+ "calendar": `\u{65E5}\u{66C6}`,
620
+ "day": `\u{65E5}`,
621
+ "dayPeriod": `\u{4E0A}\u{5348}/\u{4E0B}\u{5348}`,
622
+ "endDate": `\u{7D50}\u{675F}\u{65E5}\u{671F}`,
623
+ "era": `\u{7EAA}\u{5143}`,
624
+ "hour": `\u{5C0F}\u{65F6}`,
625
+ "minute": `\u{5206}\u{949F}`,
626
+ "month": `\u{6708}`,
627
+ "second": `\u{79D2}`,
628
+ "selectedDateDescription": (args) => `\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${args?.date}`,
629
+ "selectedRangeDescription": (args) => `\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${args?.startDate} \u{81F3} ${args?.endDate}`,
630
+ "selectedTimeDescription": (args) => `\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${args?.time}`,
631
+ "startDate": `\u{958B}\u{59CB}\u{65E5}\u{671F}`,
632
+ "timeZoneName": `\u{65F6}\u{533A}`,
633
+ "weekday": `\u{5DE5}\u{4F5C}\u{65E5}`,
634
+ "year": `\u{5E74}`
635
+ }
636
+ };
637
+ const datePickerDictionary = new LocalizedStringDictionary(datePickerStrings);
638
+ //#endregion
639
+ //#region src/datepicker/createDatePickerGroup.ts
640
+ /**
641
+ * createDatePickerGroup hook for Solidaria
642
+ *
643
+ * Provides keyboard (arrow navigation between segments) and pointer (focus the
644
+ * last non-placeholder segment on press) behavior for the date field group.
645
+ * Faithful port of @react-aria/datepicker `useDatePickerGroup`: LTR arrow
646
+ * navigation goes through the focus manager, RTL uses geometric segment lookup,
647
+ * and alt+ArrowDown/Up opens the popover only when the state exposes `setOpen`
648
+ * (i.e. a date picker, never a standalone field).
649
+ */
650
+ /**
651
+ * Provides keyboard and pointer behavior for the date field/picker segment group.
652
+ */
653
+ function createDatePickerGroup(state, ref, disableArrowNavigation) {
654
+ const localeInfo = useLocale();
655
+ const focusManager = createFocusManager(ref);
656
+ const findNextSegment = (group, fromX, direction) => {
657
+ const walker = getFocusableTreeWalker(group, { tabbable: true });
658
+ let node = walker.nextNode();
659
+ let closest = null;
660
+ let closestDistance = Infinity;
661
+ while (node) {
662
+ const distance = node.getBoundingClientRect().left - fromX;
663
+ const absoluteDistance = Math.abs(distance);
664
+ if (Math.sign(distance) === direction && absoluteDistance < closestDistance) {
665
+ closest = node;
666
+ closestDistance = absoluteDistance;
667
+ }
668
+ node = walker.nextNode();
669
+ }
670
+ return closest;
671
+ };
672
+ const onKeyDown = (e) => {
673
+ if (!nodeContains(e.currentTarget, getEventTarget(e))) return;
674
+ if (e.altKey && (e.key === "ArrowDown" || e.key === "ArrowUp") && "setOpen" in state) {
675
+ e.preventDefault();
676
+ e.stopPropagation();
677
+ state.setOpen?.(true);
678
+ }
679
+ if (disableArrowNavigation) return;
680
+ const direction = localeInfo().direction;
681
+ switch (e.key) {
682
+ case "ArrowLeft": {
683
+ e.preventDefault();
684
+ e.stopPropagation();
685
+ const root = ref();
686
+ if (direction === "rtl") {
687
+ if (root) findNextSegment(root, getEventTarget(e).getBoundingClientRect().left, -1)?.focus();
688
+ } else focusManager.focusPrevious();
689
+ break;
690
+ }
691
+ case "ArrowRight": {
692
+ e.preventDefault();
693
+ e.stopPropagation();
694
+ const root = ref();
695
+ if (direction === "rtl") {
696
+ if (root) findNextSegment(root, getEventTarget(e).getBoundingClientRect().left, 1)?.focus();
697
+ } else focusManager.focusNext();
698
+ break;
699
+ }
700
+ }
701
+ };
702
+ const focusLast = () => {
703
+ const root = ref();
704
+ if (!root) return;
705
+ let target = typeof window !== "undefined" ? window.event?.target : null;
706
+ const walker = getFocusableTreeWalker(root, { tabbable: true });
707
+ if (target) {
708
+ walker.currentNode = target;
709
+ target = walker.previousNode();
710
+ }
711
+ if (!target) {
712
+ let last;
713
+ do {
714
+ last = walker.lastChild();
715
+ if (last) target = last;
716
+ } while (last);
717
+ }
718
+ while (target?.hasAttribute("data-placeholder")) {
719
+ const prev = walker.previousNode();
720
+ if (prev && prev.hasAttribute("data-placeholder")) target = prev;
721
+ else break;
722
+ }
723
+ target?.focus();
724
+ };
725
+ const { pressProps } = createPress({
726
+ preventFocusOnPress: true,
727
+ allowTextSelectionOnPress: true,
728
+ onPressStart(e) {
729
+ if (e.pointerType === "mouse") focusLast();
730
+ },
731
+ onPress(e) {
732
+ if (e.pointerType === "touch" || e.pointerType === "pen") focusLast();
733
+ }
734
+ });
735
+ return createMemo(() => mergeProps$1(pressProps, { onKeyDown }));
736
+ }
737
+ //#endregion
10
738
  //#region src/datepicker/createDateField.ts
11
739
  /**
12
740
  * createDateField hook for Solidaria
13
741
  *
14
- * Provides the behavior and accessibility implementation for a date field component.
15
- * Based on @react-aria/datepicker useDateField
742
+ * Provides the behavior and accessibility implementation for a date field — a
743
+ * segmented spinbutton text input (NOT a calendar grid). Faithful port of
744
+ * @react-aria/datepicker `useDateField`: `fieldProps` IS the labelled
745
+ * `role="group"` that wraps the segments, `inputProps` describes a hidden native
746
+ * `<input>` for form submission, and segment labels/description/focus manager are
747
+ * published to each segment through the shared `hookData` WeakMap.
16
748
  */
749
+ const hookData = /* @__PURE__ */ new WeakMap();
750
+ const roleSymbol = "__role_" + Date.now();
751
+ const focusManagerSymbol = "__focusManager_" + Date.now();
17
752
  /**
18
- * Provides the behavior and accessibility implementation for a date field component.
753
+ * Provides the behavior and accessibility implementation for a date field.
19
754
  */
20
- function createDateField(props, state, _ref, overlayState) {
755
+ function createDateField(props, state, ref) {
21
756
  const getProps = () => access(props);
22
- const id = createId(getProps().id);
23
- const descriptionId = createId();
24
- const errorMessageId = createId();
25
- const locale = useLocale();
26
- const { labelProps, fieldProps: labelFieldProps } = createLabel({
27
- get label() {
28
- return getProps().label;
757
+ const isPresentation = () => getProps()[roleSymbol] === "presentation";
758
+ const field = createField(() => {
759
+ const p = getProps();
760
+ const dv = state.displayValidation();
761
+ return {
762
+ id: p.id,
763
+ label: p.label,
764
+ "aria-label": p["aria-label"],
765
+ "aria-labelledby": p["aria-labelledby"],
766
+ "aria-describedby": p["aria-describedby"],
767
+ description: p.description,
768
+ labelElementType: "span",
769
+ isInvalid: dv.isInvalid,
770
+ errorMessage: p.errorMessage || dv.validationErrors
771
+ };
772
+ });
773
+ let valueOnFocus = null;
774
+ const { focusWithinProps } = createFocusWithin({
775
+ get isDisabled() {
776
+ return getProps().isDisabled;
29
777
  },
30
- get "aria-label"() {
31
- return getProps()["aria-label"];
778
+ onFocusWithin(e) {
779
+ valueOnFocus = state.value();
780
+ getProps().onFocus?.(e);
32
781
  },
33
- get "aria-labelledby"() {
34
- return getProps()["aria-labelledby"];
782
+ onBlurWithin(e) {
783
+ state.confirmPlaceholder();
784
+ if (state.value() !== valueOnFocus) state.commitValidation();
785
+ getProps().onBlur?.(e);
35
786
  },
36
- labelElementType: "span"
37
- });
38
- const getAriaDescribedBy = () => {
39
- const p = getProps();
40
- const ids = [];
41
- if (p["aria-describedby"]) ids.push(p["aria-describedby"]);
42
- if (p.description) ids.push(descriptionId);
43
- if ((p.isInvalid || state.isInvalid()) && p.errorMessage) ids.push(errorMessageId);
44
- return ids.length > 0 ? ids.join(" ") : void 0;
45
- };
46
- const segments = createMemo(() => state.segments());
47
- const getLabelId = () => labelProps.id;
48
- const getRoleDescription = () => {
49
- return (locale().locale.toLowerCase().split("-")[0] ?? "en") === "es" ? "Campo de fecha" : "Date field";
50
- };
51
- const focusSegment = (target, container) => {
52
- const spinbuttons = Array.from(container.querySelectorAll("[role=\"spinbutton\"]"));
53
- if (spinbuttons.length === 0) return;
54
- const active = document.activeElement;
55
- const currentIndex = active ? spinbuttons.indexOf(active) : -1;
56
- if (target === "first") {
57
- spinbuttons[0]?.focus();
58
- return;
787
+ onFocusWithinChange(isFocused) {
788
+ getProps().onFocusChange?.(isFocused);
59
789
  }
60
- if (target === "last") {
61
- spinbuttons[spinbuttons.length - 1]?.focus();
62
- return;
63
- }
64
- let nextIndex;
65
- if (currentIndex < 0) nextIndex = target === "next" ? 0 : spinbuttons.length - 1;
66
- else nextIndex = target === "next" ? currentIndex + 1 : currentIndex - 1;
67
- if (nextIndex >= 0 && nextIndex < spinbuttons.length) spinbuttons[nextIndex]?.focus();
790
+ });
791
+ const stringFormatter = createStringFormatter(datePickerStrings, "@react-aria/datepicker");
792
+ const descProps = createDescription(createMemo(() => {
793
+ if (!state.value()) return "";
794
+ const message = state.maxGranularity === "hour" ? "selectedTimeDescription" : "selectedDateDescription";
795
+ const fieldKey = state.maxGranularity === "hour" ? "time" : "date";
796
+ return stringFormatter().format(message, { [fieldKey]: state.formatValue({ month: "long" }) });
797
+ }));
798
+ const describedBy = () => {
799
+ const fp = field.fieldProps;
800
+ if (isPresentation()) return fp["aria-describedby"];
801
+ return [descProps["aria-describedby"], fp["aria-describedby"]].filter(Boolean).join(" ") || void 0;
68
802
  };
69
- const fieldProps = createMemo(() => {
70
- const p = getProps();
71
- const baseProps = mergeProps(labelFieldProps, {
72
- id,
803
+ const focusManager = getProps()[focusManagerSymbol] || createFocusManager(ref);
804
+ const groupProps = createDatePickerGroup(state, ref, isPresentation());
805
+ const labelId = field.labelProps.id;
806
+ hookData.set(state, {
807
+ ariaLabel: getProps()["aria-label"],
808
+ ariaLabelledBy: [labelId, getProps()["aria-labelledby"]].filter(Boolean).join(" ") || void 0,
809
+ ariaDescribedBy: describedBy,
810
+ focusManager
811
+ });
812
+ onMount(() => {
813
+ if (getProps().autoFocus) focusManager.focusFirst();
814
+ });
815
+ if (props && typeof props === "object") {
816
+ createFormReset(() => getProps().inputRef?.(), state.defaultValue, state.setValue);
817
+ createFormValidation({
818
+ get validationBehavior() {
819
+ return getProps().validationBehavior;
820
+ },
821
+ focus() {
822
+ focusManager.focusFirst();
823
+ }
824
+ }, state, () => getProps().inputRef?.());
825
+ }
826
+ const fieldDOMProps = createMemo(() => {
827
+ if (isPresentation()) return { role: "presentation" };
828
+ return mergeProps$1(field.fieldProps, {
73
829
  role: "group",
74
- "aria-disabled": p.isDisabled || state.isDisabled() || void 0,
75
- "aria-readonly": p.isReadOnly || state.isReadOnly() || void 0,
76
- "aria-required": p.isRequired || state.isRequired() || void 0,
77
- "aria-invalid": p.isInvalid || state.isInvalid() || void 0,
78
- "aria-describedby": getAriaDescribedBy()
830
+ "aria-disabled": getProps().isDisabled || void 0,
831
+ "aria-describedby": describedBy()
79
832
  });
80
- if (overlayState) {
81
- const existingOnKeyDown = baseProps.onKeyDown;
82
- baseProps.onKeyDown = (e) => {
83
- existingOnKeyDown?.(e);
84
- if (e.altKey && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
85
- e.preventDefault();
86
- e.stopPropagation();
87
- overlayState.open();
88
- }
89
- };
90
- }
91
- return baseProps;
92
833
  });
93
- const inputProps = createMemo(() => {
94
- const p = getProps();
95
- const labelId = getLabelId();
96
- const ariaLabelledBy = labelId ? p["aria-labelledby"] ? `${labelId} ${p["aria-labelledby"]}` : labelId : p["aria-labelledby"];
97
- const isDisabled = p.isDisabled || state.isDisabled();
98
- const isReadOnly = p.isReadOnly || state.isReadOnly();
99
- const isRequired = p.isRequired || state.isRequired();
100
- const isInvalid = p.isInvalid || state.isInvalid();
101
- const hasValue = state.value() != null;
102
- return {
103
- role: "presentation",
104
- "aria-labelledby": ariaLabelledBy,
105
- "aria-describedby": getAriaDescribedBy(),
106
- "aria-disabled": isDisabled || void 0,
107
- "aria-readonly": isReadOnly || void 0,
108
- "aria-required": isRequired || void 0,
109
- "aria-invalid": isInvalid || void 0,
110
- "aria-roledescription": getRoleDescription(),
111
- autoFocus: p.autoFocus,
112
- contentEditable: true,
113
- suppressContentEditableWarning: true,
114
- spellCheck: false,
115
- autoCorrect: "off",
116
- enterKeyHint: "next",
117
- inputMode: "numeric",
118
- style: { caretColor: "transparent" },
119
- "data-placeholder": !hasValue ? "true" : void 0,
120
- onKeyDown: (e) => {
121
- const target = e.target;
122
- const currentTarget = e.currentTarget;
123
- if (target !== currentTarget) return;
124
- const rtl = locale().direction === "rtl";
125
- switch (e.key) {
126
- case "ArrowRight":
127
- e.preventDefault();
128
- focusSegment(rtl ? "prev" : "next", currentTarget);
129
- break;
130
- case "ArrowLeft":
131
- e.preventDefault();
132
- focusSegment(rtl ? "next" : "prev", currentTarget);
133
- break;
134
- case "Home":
135
- e.preventDefault();
136
- focusSegment("first", currentTarget);
137
- break;
138
- case "End":
139
- e.preventDefault();
140
- focusSegment("last", currentTarget);
141
- break;
142
- }
834
+ const fieldProps = createMemo(() => {
835
+ return mergeProps$1(filterDOMProps(getProps()), fieldDOMProps(), groupProps(), {
836
+ onFocusIn: focusWithinProps.onFocus,
837
+ onFocusOut: focusWithinProps.onBlur
838
+ }, {
839
+ onKeyDown(e) {
840
+ getProps().onKeyDown?.(e);
143
841
  },
144
- onFocus: () => {},
145
- onBlur: () => {
146
- state.confirmPlaceholder();
842
+ onKeyUp(e) {
843
+ getProps().onKeyUp?.(e);
147
844
  },
148
- onClick: (e) => {
149
- const target = e.target;
150
- const currentTarget = e.currentTarget;
151
- if (target !== currentTarget) return;
152
- const spinbuttons = Array.from(currentTarget.querySelectorAll("[role=\"spinbutton\"]"));
153
- if (spinbuttons.length > 0) spinbuttons[0].focus();
154
- }
845
+ style: { unicodeBidi: "isolate" }
846
+ });
847
+ });
848
+ const inputProps = createMemo(() => {
849
+ const p = getProps();
850
+ const value = state.value();
851
+ const base = {
852
+ type: "hidden",
853
+ name: p.name,
854
+ form: p.form,
855
+ value: value?.toString() || "",
856
+ disabled: p.isDisabled
155
857
  };
858
+ if (p.validationBehavior === "native") {
859
+ base.type = "text";
860
+ base.hidden = true;
861
+ base.required = p.isRequired;
862
+ base.onChange = () => {};
863
+ }
864
+ return base;
156
865
  });
157
- const descriptionProps = createMemo(() => ({ id: descriptionId }));
158
- const errorMessageProps = createMemo(() => ({
159
- id: errorMessageId,
160
- role: "alert"
161
- }));
866
+ const displayValidation = () => state.displayValidation();
162
867
  return {
163
868
  get labelProps() {
164
- return labelProps;
869
+ return {
870
+ ...field.labelProps,
871
+ onClick: () => {
872
+ focusManager.focusFirst();
873
+ }
874
+ };
165
875
  },
166
876
  get fieldProps() {
167
877
  return fieldProps();
@@ -170,744 +880,483 @@ function createDateField(props, state, _ref, overlayState) {
170
880
  return inputProps();
171
881
  },
172
882
  get descriptionProps() {
173
- return descriptionProps();
883
+ return field.descriptionProps;
174
884
  },
175
885
  get errorMessageProps() {
176
- return errorMessageProps();
886
+ return field.errorMessageProps;
887
+ },
888
+ get isInvalid() {
889
+ return displayValidation().isInvalid;
177
890
  },
178
- get segments() {
179
- return segments();
891
+ get validationErrors() {
892
+ return displayValidation().validationErrors;
893
+ },
894
+ get validationDetails() {
895
+ return displayValidation().validationDetails;
180
896
  }
181
897
  };
182
898
  }
183
899
  //#endregion
900
+ //#region src/datepicker/createDisplayNames.ts
901
+ /**
902
+ * createDisplayNames hook for Solidaria
903
+ *
904
+ * Returns an `Intl.DisplayNames`-compatible object for the `dateTimeField` type,
905
+ * falling back to a dictionary-backed polyfill in engines that support
906
+ * `Intl.DisplayNames` but not the v2 `dateTimeField` type. Port of
907
+ * @react-aria/datepicker `useDisplayNames`.
908
+ */
909
+ var DisplayNamesPolyfill = class {
910
+ locale;
911
+ dictionary;
912
+ constructor(locale, dictionary) {
913
+ this.locale = locale;
914
+ this.dictionary = dictionary;
915
+ }
916
+ of(field) {
917
+ return this.dictionary.getStringForLocale(field, this.locale);
918
+ }
919
+ };
920
+ /**
921
+ * Returns an accessor to a localized `DisplayNames` instance for date field names.
922
+ */
923
+ function createDisplayNames() {
924
+ const localeAccessor = useLocale();
925
+ return createMemo(() => {
926
+ const locale = localeAccessor().locale;
927
+ try {
928
+ return new Intl.DisplayNames(locale, { type: "dateTimeField" });
929
+ } catch {
930
+ return new DisplayNamesPolyfill(locale, datePickerDictionary);
931
+ }
932
+ });
933
+ }
934
+ //#endregion
184
935
  //#region src/datepicker/createDateSegment.ts
185
936
  /**
186
937
  * createDateSegment hook for Solidaria
187
938
  *
188
- * Provides the behavior and accessibility implementation for a date segment.
189
- * Based on @react-aria/datepicker useDateSegment
939
+ * Provides the behavior and accessibility implementation for a single editable
940
+ * date segment. Faithful port of @react-aria/datepicker `useDateSegment` — the
941
+ * spinbutton wiring (value stepping + live announcements) is delegated to
942
+ * `createSpinButton`, numeric text entry flows through native `beforeinput`
943
+ * events, and segment focus recovery on unmount mirrors upstream's layout effect.
190
944
  */
945
+ function commonPrefixLength(strings) {
946
+ strings.sort();
947
+ const first = strings[0];
948
+ const last = strings[strings.length - 1];
949
+ for (let i = 0; i < first.length; i++) if (first[i] !== last[i]) return i;
950
+ return 0;
951
+ }
191
952
  /**
192
953
  * Provides the behavior and accessibility implementation for a date segment.
193
954
  */
194
955
  function createDateSegment(props, state, ref) {
195
956
  const getProps = () => access(props);
196
- const [isFocused, setIsFocused] = createSignal(false);
197
- const [isFocusVisible, setIsFocusVisible] = createSignal(false);
198
- const [isHovered, setIsHovered] = createSignal(false);
199
- const [enteredKeys, setEnteredKeys] = createSignal("");
200
- const [isComposing, setIsComposing] = createSignal(false);
201
- const locale = useLocale();
202
- const segment = createMemo(() => getProps().segment);
203
- const isEditable = createMemo(() => {
204
- return segment().isEditable && !state.isDisabled() && !state.isReadOnly();
957
+ const segment = () => getProps().segment;
958
+ let enteredKeys = "";
959
+ const localeInfo = useLocale();
960
+ const locale = () => localeInfo().locale;
961
+ const direction = () => localeInfo().direction;
962
+ const displayNames = createDisplayNames();
963
+ const hd = hookData.get(state);
964
+ const focusManager = hd?.focusManager;
965
+ const segmentId = createId();
966
+ const resolvedOptions = state.dateFormatter.resolvedOptions();
967
+ const monthDateFormatter = createDateFormatter({
968
+ month: "long",
969
+ timeZone: resolvedOptions.timeZone
205
970
  });
206
- let longPressTimeout = null;
207
- let longPressInterval = null;
208
- let hadPointerDown = false;
209
- const clearLongPress = () => {
210
- if (longPressTimeout) {
211
- clearTimeout(longPressTimeout);
212
- longPressTimeout = null;
213
- }
214
- if (longPressInterval) {
215
- clearInterval(longPressInterval);
216
- longPressInterval = null;
217
- }
218
- };
219
- const startLongPress = (action) => {
220
- clearLongPress();
221
- longPressTimeout = setTimeout(() => {
222
- action();
223
- longPressInterval = setInterval(() => {
224
- action();
225
- }, 100);
226
- }, 300);
227
- };
228
- onCleanup(() => {
229
- clearLongPress();
971
+ const hourDateFormatter = createDateFormatter({
972
+ hour: "numeric",
973
+ hour12: resolvedOptions.hour12,
974
+ timeZone: resolvedOptions.timeZone
230
975
  });
231
- const focusSegment = (target) => {
232
- const el = ref?.();
233
- if (!el) return;
234
- const container = el.parentElement;
235
- if (!container) return;
236
- const segments = Array.from(container.querySelectorAll("[role=\"spinbutton\"]"));
237
- if (segments.length === 0) return;
238
- if (target === "first") {
239
- segments[0]?.focus();
240
- return;
241
- }
242
- if (target === "last") {
243
- segments[segments.length - 1]?.focus();
244
- return;
245
- }
246
- const currentIndex = segments.indexOf(el);
247
- if (currentIndex < 0) return;
248
- const nextIndex = target === "next" ? currentIndex + 1 : currentIndex - 1;
249
- if (nextIndex >= 0 && nextIndex < segments.length) segments[nextIndex]?.focus();
250
- };
251
- const clearCurrentSegment = (type) => {
252
- state.clearSegment(type);
253
- setEnteredKeys("");
254
- };
255
- const handleKeyDown = (e) => {
256
- if (!isEditable()) return;
257
- if (isComposing()) return;
976
+ const textValue = createMemo(() => {
977
+ const seg = segment();
978
+ let value = seg.isPlaceholder ? "" : seg.text;
979
+ if (seg.type === "month" && !seg.isPlaceholder) {
980
+ const monthTextValue = monthDateFormatter().format(state.dateValue());
981
+ value = monthTextValue !== value ? `${value} \u{2013} ${monthTextValue}` : monthTextValue;
982
+ } else if (seg.type === "hour" && !seg.isPlaceholder) value = hourDateFormatter().format(state.dateValue());
983
+ return value;
984
+ });
985
+ const spinButton = createSpinButton(() => {
986
+ const seg = segment();
987
+ return {
988
+ value: seg.value ?? void 0,
989
+ textValue: textValue(),
990
+ minValue: seg.minValue,
991
+ maxValue: seg.maxValue,
992
+ isDisabled: state.isDisabled(),
993
+ isReadOnly: state.isReadOnly() || !seg.isEditable,
994
+ isRequired: state.isRequired(),
995
+ onIncrement: () => {
996
+ enteredKeys = "";
997
+ state.increment(seg.type);
998
+ },
999
+ onDecrement: () => {
1000
+ enteredKeys = "";
1001
+ state.decrement(seg.type);
1002
+ },
1003
+ onIncrementPage: () => {
1004
+ enteredKeys = "";
1005
+ state.incrementPage(seg.type);
1006
+ },
1007
+ onDecrementPage: () => {
1008
+ enteredKeys = "";
1009
+ state.decrementPage(seg.type);
1010
+ },
1011
+ onIncrementToMax: () => {
1012
+ enteredKeys = "";
1013
+ state.incrementToMax(seg.type);
1014
+ },
1015
+ onDecrementToMin: () => {
1016
+ enteredKeys = "";
1017
+ state.decrementToMin(seg.type);
1018
+ }
1019
+ };
1020
+ });
1021
+ const parser = createMemo(() => new NumberParser(locale(), { maximumFractionDigits: 0 }));
1022
+ const backspace = () => {
258
1023
  const seg = segment();
259
- const type = seg.type;
260
- if (type === "literal") return;
261
- setIsFocusVisible(true);
1024
+ if (seg.text === seg.placeholder) focusManager?.focusPrevious();
1025
+ if (parser().isValidPartialNumber(seg.text) && !state.isReadOnly() && !seg.isPlaceholder) {
1026
+ let newValue = seg.text.slice(0, -1);
1027
+ const parsed = parser().parse(newValue);
1028
+ newValue = parsed === 0 ? "" : newValue;
1029
+ if (newValue.length === 0 || parsed === 0) state.clearSegment(seg.type);
1030
+ else state.setSegment(seg.type, parsed);
1031
+ enteredKeys = newValue;
1032
+ } else if (seg.type === "dayPeriod" || seg.type === "era") state.clearSegment(seg.type);
1033
+ };
1034
+ const onKeyDown = (e) => {
1035
+ if (e.key === "a" && (isMac() ? e.metaKey : e.ctrlKey)) e.preventDefault();
1036
+ if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
262
1037
  switch (e.key) {
263
- case "ArrowRight":
264
- e.preventDefault();
265
- focusSegment(locale().direction === "rtl" ? "prev" : "next");
266
- break;
267
- case "ArrowLeft":
268
- e.preventDefault();
269
- focusSegment(locale().direction === "rtl" ? "next" : "prev");
270
- break;
271
- case "ArrowUp":
272
- e.preventDefault();
273
- state.incrementSegment(type);
274
- if (!e.repeat) startLongPress(() => state.incrementSegment(type));
275
- break;
276
- case "ArrowDown":
277
- e.preventDefault();
278
- state.decrementSegment(type);
279
- if (!e.repeat) startLongPress(() => state.decrementSegment(type));
280
- break;
281
- case "Home":
282
- e.preventDefault();
283
- focusSegment("first");
284
- break;
285
- case "End":
286
- e.preventDefault();
287
- focusSegment("last");
288
- break;
289
1038
  case "Backspace":
290
- e.preventDefault();
291
- if (seg.isPlaceholder) focusSegment("prev");
292
- else clearCurrentSegment(type);
293
- break;
294
1039
  case "Delete":
295
1040
  e.preventDefault();
296
- clearCurrentSegment(type);
297
- break;
298
- default:
299
- const normalizedDigit = normalizeDigit$1(e.key);
300
- if (normalizedDigit) {
301
- e.preventDefault();
302
- handleNumericInput(normalizedDigit, type, seg);
303
- }
1041
+ e.stopPropagation();
1042
+ backspace();
304
1043
  break;
305
1044
  }
306
1045
  };
307
- const handleKeyUp = () => {
308
- clearLongPress();
309
- };
310
- const handleNumericInput = (key, type, seg) => {
311
- const newKeys = enteredKeys() + key;
312
- const numValue = parseInt(newKeys, 10);
313
- const maxValue = seg.maxValue ?? 99;
314
- const minValue = seg.minValue ?? 0;
315
- const maxDigits = String(maxValue).length;
316
- if (numValue <= maxValue) {
317
- state.setSegment(type, numValue);
318
- if (parseInt(newKeys + "0", 10) > maxValue || newKeys.length >= maxDigits) {
319
- setEnteredKeys("");
320
- focusSegment("next");
321
- } else setEnteredKeys(newKeys);
322
- } else {
323
- const singleValue = parseInt(key, 10);
324
- if (singleValue >= minValue && singleValue <= maxValue) {
325
- state.setSegment(type, singleValue);
326
- if (parseInt(key + "0", 10) > maxValue || key.length >= maxDigits) {
327
- setEnteredKeys("");
328
- focusSegment("next");
329
- } else setEnteredKeys(key);
330
- } else setEnteredKeys("");
331
- }
332
- };
333
- const handleBeforeInput = (e) => {
334
- if (!isEditable()) return;
335
- if (isComposing()) return;
1046
+ const { startsWith } = createFilter({ sensitivity: "base" })();
1047
+ const amPmFormatter = createDateFormatter({
1048
+ hour: "numeric",
1049
+ hour12: true
1050
+ });
1051
+ const am = createMemo(() => {
1052
+ const date = /* @__PURE__ */ new Date();
1053
+ date.setHours(0);
1054
+ return amPmFormatter().formatToParts(date).find((part) => part.type === "dayPeriod")?.value ?? "";
1055
+ });
1056
+ const pm = createMemo(() => {
1057
+ const date = /* @__PURE__ */ new Date();
1058
+ date.setHours(12);
1059
+ return amPmFormatter().formatToParts(date).find((part) => part.type === "dayPeriod")?.value ?? "";
1060
+ });
1061
+ const eraFormatter = createDateFormatter({
1062
+ year: "numeric",
1063
+ era: "narrow",
1064
+ timeZone: "UTC"
1065
+ });
1066
+ const eras = createMemo(() => {
1067
+ if (segment().type !== "era") return [];
1068
+ const date = toCalendar(new CalendarDate(1, 1, 1), state.calendar);
1069
+ const list = state.calendar.getEras().map((era) => {
1070
+ const eraDate = date.set({
1071
+ year: 1,
1072
+ month: 1,
1073
+ day: 1,
1074
+ era
1075
+ }).toDate("UTC");
1076
+ return {
1077
+ era,
1078
+ formatted: eraFormatter().formatToParts(eraDate).find((p) => p.type === "era")?.value ?? ""
1079
+ };
1080
+ });
1081
+ const prefixLength = commonPrefixLength(list.map((era) => era.formatted));
1082
+ if (prefixLength) for (const era of list) era.formatted = era.formatted.slice(prefixLength);
1083
+ return list;
1084
+ });
1085
+ const onInput = (key) => {
336
1086
  const seg = segment();
337
- if (seg.type === "literal") return;
338
- if (e.inputType === "deleteContentBackward" || e.inputType === "deleteContentForward") {
339
- e.preventDefault();
340
- clearCurrentSegment(seg.type);
341
- return;
342
- }
343
- if (e.inputType === "insertText" && e.data) {
344
- const normalizedDigit = normalizeDigit$1(e.data);
345
- if (!normalizedDigit) return;
346
- e.preventDefault();
347
- handleNumericInput(normalizedDigit, seg.type, seg);
1087
+ if (state.isDisabled() || state.isReadOnly()) return;
1088
+ const newValue = enteredKeys + key;
1089
+ switch (seg.type) {
1090
+ case "dayPeriod":
1091
+ if (startsWith(am(), key)) state.setSegment("dayPeriod", 0);
1092
+ else if (startsWith(pm(), key)) state.setSegment("dayPeriod", 1);
1093
+ else break;
1094
+ focusManager?.focusNext();
1095
+ break;
1096
+ case "era": {
1097
+ const matched = eras().find((e) => startsWith(e.formatted, key));
1098
+ if (matched) {
1099
+ state.setSegment("era", matched.era);
1100
+ focusManager?.focusNext();
1101
+ }
1102
+ break;
1103
+ }
1104
+ case "day":
1105
+ case "hour":
1106
+ case "minute":
1107
+ case "second":
1108
+ case "month":
1109
+ case "year": {
1110
+ if (!parser().isValidPartialNumber(newValue)) return;
1111
+ const numberValue = parser().parse(newValue);
1112
+ let segmentValue = numberValue;
1113
+ if (seg.maxValue !== void 0 && numberValue > seg.maxValue) segmentValue = parser().parse(key);
1114
+ if (isNaN(numberValue)) return;
1115
+ state.setSegment(seg.type, segmentValue);
1116
+ if (seg.maxValue !== void 0 && (Number(numberValue + "0") > seg.maxValue || newValue.length >= String(seg.maxValue).length)) {
1117
+ enteredKeys = "";
1118
+ focusManager?.focusNext();
1119
+ } else enteredKeys = newValue;
1120
+ break;
1121
+ }
348
1122
  }
349
1123
  };
350
- const handleCompositionStart = () => {
351
- if (!isEditable()) return;
352
- setIsComposing(true);
353
- setEnteredKeys("");
354
- };
355
- const handleCompositionEnd = (e) => {
356
- if (!isEditable()) return;
357
- setIsComposing(false);
358
- const seg = segment();
359
- if (seg.type === "literal") return;
360
- const digits = extractNormalizedDigits$1(e.data ?? "");
361
- if (digits.length === 0) return;
362
- for (const digit of digits) handleNumericInput(digit, seg.type, seg);
1124
+ const onFocus = () => {
1125
+ enteredKeys = "";
1126
+ const el = ref();
1127
+ if (el) {
1128
+ scrollIntoViewport(el, { containingElement: getScrollParent(el) });
1129
+ window.getSelection()?.collapse(el);
1130
+ }
363
1131
  };
364
- const handleFocus = () => {
365
- setIsFocused(true);
366
- setEnteredKeys("");
367
- if (!hadPointerDown) setIsFocusVisible(true);
368
- hadPointerDown = false;
369
- const el = ref?.();
370
- if (el) scrollIntoViewport(el, { containingElement: getScrollParent(el) });
371
- if (el && typeof window !== "undefined") {
1132
+ createEffect(() => {
1133
+ if (typeof document === "undefined") return;
1134
+ const handler = () => {
372
1135
  const selection = window.getSelection();
373
- if (selection) {
374
- const range = new Range();
375
- range.selectNodeContents(el);
376
- selection.removeAllRanges();
377
- selection.addRange(range);
1136
+ if (selection?.anchorNode && nodeContains(ref(), selection.anchorNode)) selection.collapse(ref());
1137
+ };
1138
+ document.addEventListener("selectionchange", handler);
1139
+ onCleanup(() => document.removeEventListener("selectionchange", handler));
1140
+ });
1141
+ let compositionValue = "";
1142
+ createEffect(() => {
1143
+ const el = ref();
1144
+ if (!el) return;
1145
+ const onBeforeInput = (e) => {
1146
+ if (!ref()) return;
1147
+ e.preventDefault();
1148
+ switch (e.inputType) {
1149
+ case "deleteContentBackward":
1150
+ case "deleteContentForward":
1151
+ if (parser().isValidPartialNumber(segment().text) && !state.isReadOnly()) backspace();
1152
+ break;
1153
+ case "insertCompositionText":
1154
+ compositionValue = el.textContent ?? "";
1155
+ el.textContent = el.textContent;
1156
+ break;
1157
+ default:
1158
+ if (e.data != null) onInput(e.data);
1159
+ break;
1160
+ }
1161
+ };
1162
+ const onInputEvent = (e) => {
1163
+ const { inputType, data } = e;
1164
+ switch (inputType) {
1165
+ case "insertCompositionText":
1166
+ if (ref()) el.textContent = compositionValue;
1167
+ if (data != null && (startsWith(am(), data) || startsWith(pm(), data))) onInput(data);
1168
+ break;
378
1169
  }
1170
+ };
1171
+ el.addEventListener("beforeinput", onBeforeInput);
1172
+ el.addEventListener("input", onInputEvent);
1173
+ onCleanup(() => {
1174
+ el.removeEventListener("beforeinput", onBeforeInput);
1175
+ el.removeEventListener("input", onInputEvent);
1176
+ });
1177
+ });
1178
+ let focusedElement = null;
1179
+ createEffect(() => {
1180
+ focusedElement = ref();
1181
+ });
1182
+ onCleanup(() => {
1183
+ if (typeof document !== "undefined" && document.activeElement === focusedElement) {
1184
+ if (!focusManager?.focusPrevious()) focusManager?.focusNext();
379
1185
  }
380
- };
381
- const handleBlur = () => {
382
- setIsFocused(false);
383
- setIsFocusVisible(false);
384
- setEnteredKeys("");
385
- clearLongPress();
386
- state.confirmPlaceholder();
387
- };
388
- const handleMouseEnter = () => {
389
- setIsHovered(true);
390
- };
391
- const handleMouseLeave = () => {
392
- setIsHovered(false);
393
- };
1186
+ });
394
1187
  const segmentProps = createMemo(() => {
395
1188
  const seg = segment();
396
- const type = seg.type;
397
1189
  const p = getProps();
398
- if (type === "literal") return { "aria-hidden": true };
399
- return {
400
- role: "spinbutton",
401
- tabIndex: isEditable() ? 0 : -1,
402
- "aria-label": getSegmentLabel$1(type, locale().locale),
403
- "aria-valuenow": seg.value,
404
- "aria-valuemin": seg.minValue,
405
- "aria-valuemax": seg.maxValue,
406
- "aria-valuetext": seg.isPlaceholder ? "" : seg.text,
407
- "aria-readonly": state.isReadOnly() || void 0,
408
- "aria-disabled": state.isDisabled() || void 0,
409
- "aria-invalid": state.isInvalid() || void 0,
1190
+ const touchPropOverrides = isIOS() || seg.type === "timeZoneName" ? {
1191
+ role: "textbox",
1192
+ "aria-valuemax": null,
1193
+ "aria-valuemin": null,
1194
+ "aria-valuetext": null,
1195
+ "aria-valuenow": null
1196
+ } : {};
1197
+ let ariaDescribedBy = hd?.ariaDescribedBy?.();
1198
+ const firstEditable = state.segments().find((s) => s.isEditable);
1199
+ if (firstEditable && firstEditable.type !== seg.type && !state.isInvalid()) ariaDescribedBy = void 0;
1200
+ ariaDescribedBy = [p["aria-describedby"], ariaDescribedBy].filter(Boolean).join(" ") || void 0;
1201
+ const isEditable = !state.isDisabled() && !state.isReadOnly() && seg.isEditable;
1202
+ const name = seg.type === "literal" ? "" : displayNames().of(seg.type);
1203
+ const ariaLabel = hd?.ariaLabel;
1204
+ const ariaLabelledBy = hd?.ariaLabelledBy;
1205
+ const labelProps = createLabels({
1206
+ id: segmentId,
1207
+ "aria-label": `${name}${ariaLabel ? `, ${ariaLabel}` : ""}${ariaLabelledBy ? ", " : ""}`,
1208
+ "aria-labelledby": ariaLabelledBy
1209
+ });
1210
+ if (seg.type === "literal") return { "aria-hidden": true };
1211
+ const segmentStyle = { "caret-color": "transparent" };
1212
+ if (direction() === "rtl") {
1213
+ segmentStyle["unicode-bidi"] = "embed";
1214
+ const format = resolvedOptions[seg.type];
1215
+ if (format === "numeric" || format === "2-digit") segmentStyle.direction = "ltr";
1216
+ }
1217
+ return mergeProps$1(spinButton.spinButtonProps, labelProps, {
1218
+ id: segmentId,
1219
+ ...touchPropOverrides,
1220
+ "aria-invalid": state.isInvalid() ? "true" : void 0,
1221
+ "aria-describedby": ariaDescribedBy,
1222
+ "aria-readonly": state.isReadOnly() || !seg.isEditable ? "true" : void 0,
410
1223
  "aria-controls": p["aria-controls"] || void 0,
411
- "aria-describedby": p["aria-describedby"] || void 0,
412
- contentEditable: isEditable(),
413
- suppressContentEditableWarning: true,
414
- inputMode: "numeric",
415
- autoCorrect: "off",
416
- enterKeyHint: "next",
417
- spellCheck: false,
418
- "data-placeholder": seg.isPlaceholder ? "true" : void 0,
419
- "data-readonly": state.isReadOnly() || void 0,
420
- "data-disabled": state.isDisabled() || void 0,
421
- "data-invalid": state.isInvalid() || void 0,
422
- "data-type": seg.type,
423
- "data-hovered": isHovered() || void 0,
424
- "data-focused": isFocused() || void 0,
425
- "data-focus-visible": isFocusVisible() || void 0,
426
- onKeyDown: handleKeyDown,
427
- onKeyUp: handleKeyUp,
428
- onFocus: handleFocus,
429
- onBlur: handleBlur,
430
- onBeforeInput: handleBeforeInput,
431
- onCompositionStart: handleCompositionStart,
432
- onCompositionEnd: handleCompositionEnd,
433
- onMouseEnter: handleMouseEnter,
434
- onMouseLeave: handleMouseLeave,
435
- onPointerDown: (e) => {
436
- e.preventDefault();
437
- hadPointerDown = true;
438
- setIsFocusVisible(false);
1224
+ "data-placeholder": seg.isPlaceholder || void 0,
1225
+ contentEditable: isEditable,
1226
+ suppressContentEditableWarning: isEditable,
1227
+ spellCheck: isEditable ? "false" : void 0,
1228
+ autoCorrect: isEditable ? "off" : void 0,
1229
+ enterKeyHint: isEditable ? "next" : void 0,
1230
+ inputMode: state.isDisabled() || seg.type === "dayPeriod" || seg.type === "era" || !isEditable ? void 0 : "numeric",
1231
+ tabIndex: state.isDisabled() ? void 0 : 0,
1232
+ onKeyDown,
1233
+ onFocus,
1234
+ style: segmentStyle,
1235
+ onPointerDown(e) {
1236
+ e.stopPropagation();
439
1237
  },
440
- onPointerUp: () => {
441
- clearLongPress();
1238
+ onMouseDown(e) {
1239
+ e.stopPropagation();
442
1240
  }
443
- };
444
- });
445
- const text = createMemo(() => {
446
- const seg = segment();
447
- return seg.isPlaceholder ? seg.placeholder : seg.text;
1241
+ });
448
1242
  });
449
- return {
450
- get segmentProps() {
451
- return segmentProps();
452
- },
453
- get isFocused() {
454
- return isFocused();
455
- },
456
- get isEditable() {
457
- return isEditable();
458
- },
459
- get isPlaceholder() {
460
- return segment().isPlaceholder;
461
- },
462
- get text() {
463
- return text();
464
- },
465
- get isHovered() {
466
- return isHovered();
467
- },
468
- get isFocusVisible() {
469
- return isFocusVisible();
470
- }
471
- };
472
- }
473
- const SEGMENT_LABELS$1 = {
474
- en: {
475
- year: "Year",
476
- month: "Month",
477
- day: "Day",
478
- hour: "Hour",
479
- minute: "Minute",
480
- second: "Second",
481
- dayPeriod: "AM/PM",
482
- era: "Era",
483
- timeZoneName: "Time zone"
484
- },
485
- es: {
486
- year: "Año",
487
- month: "Mes",
488
- day: "Día",
489
- hour: "Hora",
490
- minute: "Minuto",
491
- second: "Segundo",
492
- dayPeriod: "AM/PM",
493
- era: "Era",
494
- timeZoneName: "Zona horaria"
495
- }
496
- };
497
- function getSegmentLabel$1(type, locale) {
498
- if (type === "literal") return "";
499
- return (SEGMENT_LABELS$1[locale.toLowerCase().split("-")[0] ?? "en"] ?? SEGMENT_LABELS$1.en)[type];
500
- }
501
- function normalizeDigit$1(input) {
502
- if (/^[0-9]$/.test(input)) return input;
503
- const codePoint = input.codePointAt(0);
504
- if (codePoint == null) return null;
505
- if (codePoint >= 65296 && codePoint <= 65305) return String(codePoint - 65296);
506
- return null;
507
- }
508
- function extractNormalizedDigits$1(value) {
509
- const digits = [];
510
- for (const char of value) {
511
- const normalized = normalizeDigit$1(char);
512
- if (normalized) digits.push(normalized);
513
- }
514
- return digits;
1243
+ return { get segmentProps() {
1244
+ return segmentProps();
1245
+ } };
515
1246
  }
516
1247
  //#endregion
517
1248
  //#region src/datepicker/createTimeField.ts
518
1249
  /**
519
- * createTimeField hook for Solidaria
520
- *
521
- * Provides the behavior and accessibility implementation for a time field component.
522
- * Based on @react-aria/datepicker useTimeField
523
- */
524
- /**
525
- * Provides the behavior and accessibility implementation for a time field component.
1250
+ * Provides the behavior and accessibility implementation for a time field.
526
1251
  */
527
- function createTimeField(props, state, _ref) {
528
- const getProps = () => access(props);
529
- const id = createId(getProps().id);
530
- const descriptionId = createId();
531
- const errorMessageId = createId();
532
- const { labelProps, fieldProps: labelFieldProps } = createLabel({
533
- get label() {
534
- return getProps().label;
535
- },
536
- get "aria-label"() {
537
- return getProps()["aria-label"];
538
- },
539
- get "aria-labelledby"() {
540
- return getProps()["aria-labelledby"];
541
- },
542
- labelElementType: "span"
543
- });
544
- const getAriaDescribedBy = () => {
545
- const p = getProps();
546
- const ids = [];
547
- if (p["aria-describedby"]) ids.push(p["aria-describedby"]);
548
- if (p.description) ids.push(descriptionId);
549
- if ((p.isInvalid || state.isInvalid()) && p.errorMessage) ids.push(errorMessageId);
550
- return ids.length > 0 ? ids.join(" ") : void 0;
551
- };
552
- const segments = createMemo(() => state.segments());
553
- const fieldProps = createMemo(() => {
554
- const p = getProps();
555
- return mergeProps(labelFieldProps, {
556
- id,
557
- role: "group",
558
- "aria-disabled": p.isDisabled || state.isDisabled() || void 0,
559
- "aria-readonly": p.isReadOnly || state.isReadOnly() || void 0,
560
- "aria-required": p.isRequired || state.isRequired() || void 0,
561
- "aria-invalid": p.isInvalid || state.isInvalid() || void 0,
562
- "aria-describedby": getAriaDescribedBy()
563
- });
564
- });
565
- const inputProps = createMemo(() => ({ role: "presentation" }));
566
- const descriptionProps = createMemo(() => ({ id: descriptionId }));
567
- const errorMessageProps = createMemo(() => ({
568
- id: errorMessageId,
569
- role: "alert"
570
- }));
1252
+ function createTimeField(props, state, ref) {
1253
+ const res = createDateField(props, state, ref);
571
1254
  return {
572
1255
  get labelProps() {
573
- return labelProps;
1256
+ return res.labelProps;
574
1257
  },
575
1258
  get fieldProps() {
576
- return fieldProps();
1259
+ return res.fieldProps;
577
1260
  },
578
1261
  get inputProps() {
579
- return inputProps();
1262
+ return {
1263
+ ...res.inputProps,
1264
+ value: state.timeValue()?.toString() || ""
1265
+ };
580
1266
  },
581
1267
  get descriptionProps() {
582
- return descriptionProps();
1268
+ return res.descriptionProps;
583
1269
  },
584
1270
  get errorMessageProps() {
585
- return errorMessageProps();
1271
+ return res.errorMessageProps;
586
1272
  },
587
- get segments() {
588
- return segments();
589
- }
590
- };
591
- }
592
- //#endregion
593
- //#region src/datepicker/createTimeSegment.ts
594
- /**
595
- * createTimeSegment hook for Solidaria
596
- *
597
- * Provides the behavior and accessibility implementation for a time segment.
598
- * Based on @react-aria/datepicker useDateSegment semantics (time-field scope).
599
- */
600
- /**
601
- * Provides the behavior and accessibility implementation for a time segment.
602
- */
603
- function createTimeSegment(props, state, ref) {
604
- const getProps = () => access(props);
605
- const [isFocused, setIsFocused] = createSignal(false);
606
- const [enteredKeys, setEnteredKeys] = createSignal("");
607
- const [isComposing, setIsComposing] = createSignal(false);
608
- const locale = useLocale();
609
- const segment = createMemo(() => getProps().segment);
610
- const isEditable = createMemo(() => {
611
- return segment().isEditable && !state.isDisabled() && !state.isReadOnly();
612
- });
613
- const focusSegment = (target) => {
614
- const el = ref?.();
615
- if (!el) return;
616
- const container = el.parentElement;
617
- if (!container) return;
618
- const segments = Array.from(container.querySelectorAll("[role=\"spinbutton\"]"));
619
- if (segments.length === 0) return;
620
- if (target === "first") {
621
- segments[0]?.focus();
622
- return;
623
- }
624
- if (target === "last") {
625
- segments[segments.length - 1]?.focus();
626
- return;
627
- }
628
- const currentIndex = segments.indexOf(el);
629
- if (currentIndex < 0) return;
630
- const nextIndex = target === "next" ? currentIndex + 1 : currentIndex - 1;
631
- if (nextIndex >= 0 && nextIndex < segments.length) segments[nextIndex]?.focus();
632
- };
633
- const clearCurrentSegment = (type) => {
634
- state.clearSegment(type);
635
- setEnteredKeys("");
636
- };
637
- const handleNumericInput = (key, type, seg) => {
638
- const newKeys = enteredKeys() + key;
639
- const numValue = parseInt(newKeys, 10);
640
- const maxValue = seg.maxValue ?? 99;
641
- const minValue = seg.minValue ?? 0;
642
- const maxDigits = String(maxValue).length;
643
- if (numValue <= maxValue) {
644
- state.setSegment(type, numValue);
645
- if (parseInt(newKeys + "0", 10) > maxValue || newKeys.length >= maxDigits) {
646
- setEnteredKeys("");
647
- focusSegment("next");
648
- } else setEnteredKeys(newKeys);
649
- } else {
650
- const singleValue = parseInt(key, 10);
651
- if (singleValue >= minValue && singleValue <= maxValue) {
652
- state.setSegment(type, singleValue);
653
- if (parseInt(key + "0", 10) > maxValue || key.length >= maxDigits) {
654
- setEnteredKeys("");
655
- focusSegment("next");
656
- } else setEnteredKeys(key);
657
- } else setEnteredKeys("");
658
- }
659
- };
660
- const handleKeyDown = (e) => {
661
- if (!isEditable()) return;
662
- if (isComposing()) return;
663
- const seg = segment();
664
- const type = seg.type;
665
- if (type === "literal") return;
666
- switch (e.key) {
667
- case "ArrowRight":
668
- e.preventDefault();
669
- focusSegment(locale().direction === "rtl" ? "prev" : "next");
670
- break;
671
- case "ArrowLeft":
672
- e.preventDefault();
673
- focusSegment(locale().direction === "rtl" ? "next" : "prev");
674
- break;
675
- case "ArrowUp":
676
- e.preventDefault();
677
- state.incrementSegment(type);
678
- break;
679
- case "ArrowDown":
680
- e.preventDefault();
681
- state.decrementSegment(type);
682
- break;
683
- case "Home":
684
- e.preventDefault();
685
- focusSegment("first");
686
- break;
687
- case "End":
688
- e.preventDefault();
689
- focusSegment("last");
690
- break;
691
- case "Backspace":
692
- e.preventDefault();
693
- if (seg.isPlaceholder) focusSegment("prev");
694
- else clearCurrentSegment(type);
695
- break;
696
- case "Delete":
697
- e.preventDefault();
698
- clearCurrentSegment(type);
699
- break;
700
- default:
701
- const normalizedDigit = normalizeDigit(e.key);
702
- if (normalizedDigit) {
703
- e.preventDefault();
704
- handleNumericInput(normalizedDigit, type, seg);
705
- }
706
- break;
707
- }
708
- };
709
- const handleBeforeInput = (e) => {
710
- if (!isEditable()) return;
711
- if (isComposing()) return;
712
- const seg = segment();
713
- if (seg.type === "literal") return;
714
- if (e.inputType === "deleteContentBackward" || e.inputType === "deleteContentForward") {
715
- e.preventDefault();
716
- clearCurrentSegment(seg.type);
717
- return;
718
- }
719
- if (e.inputType === "insertText" && e.data) {
720
- const normalizedDigit = normalizeDigit(e.data);
721
- if (!normalizedDigit) return;
722
- e.preventDefault();
723
- handleNumericInput(normalizedDigit, seg.type, seg);
724
- }
725
- };
726
- const handleCompositionStart = () => {
727
- if (!isEditable()) return;
728
- setIsComposing(true);
729
- setEnteredKeys("");
730
- };
731
- const handleCompositionEnd = (e) => {
732
- if (!isEditable()) return;
733
- setIsComposing(false);
734
- const seg = segment();
735
- if (seg.type === "literal") return;
736
- const digits = extractNormalizedDigits(e.data ?? "");
737
- if (digits.length === 0) return;
738
- for (const digit of digits) handleNumericInput(digit, seg.type, seg);
739
- };
740
- const handleFocus = () => {
741
- setIsFocused(true);
742
- setEnteredKeys("");
743
- };
744
- const handleBlur = () => {
745
- setIsFocused(false);
746
- setEnteredKeys("");
747
- state.confirmPlaceholder?.();
748
- };
749
- const segmentProps = createMemo(() => {
750
- const seg = segment();
751
- const type = seg.type;
752
- if (type === "literal") return { "aria-hidden": true };
753
- return {
754
- role: "spinbutton",
755
- tabIndex: isEditable() ? 0 : -1,
756
- "aria-label": getSegmentLabel(type, locale().locale),
757
- "aria-valuenow": seg.value,
758
- "aria-valuemin": seg.minValue,
759
- "aria-valuemax": seg.maxValue,
760
- "aria-valuetext": seg.isPlaceholder ? seg.placeholder : seg.text,
761
- "aria-readonly": state.isReadOnly() || void 0,
762
- "aria-disabled": state.isDisabled() || void 0,
763
- "aria-invalid": state.isInvalid() || void 0,
764
- contentEditable: isEditable(),
765
- suppressContentEditableWarning: true,
766
- inputMode: "numeric",
767
- autoCorrect: "off",
768
- enterKeyHint: "next",
769
- spellCheck: false,
770
- onKeyDown: handleKeyDown,
771
- onFocus: handleFocus,
772
- onBlur: handleBlur,
773
- onBeforeInput: handleBeforeInput,
774
- onCompositionStart: handleCompositionStart,
775
- onCompositionEnd: handleCompositionEnd,
776
- onMouseDown: (e) => {
777
- e.preventDefault();
778
- }
779
- };
780
- });
781
- const text = createMemo(() => {
782
- const seg = segment();
783
- return seg.isPlaceholder ? seg.placeholder : seg.text;
784
- });
785
- return {
786
- get segmentProps() {
787
- return segmentProps();
788
- },
789
- get isFocused() {
790
- return isFocused();
791
- },
792
- get isEditable() {
793
- return isEditable();
1273
+ get isInvalid() {
1274
+ return res.isInvalid;
794
1275
  },
795
- get isPlaceholder() {
796
- return segment().isPlaceholder;
1276
+ get validationErrors() {
1277
+ return res.validationErrors;
797
1278
  },
798
- get text() {
799
- return text();
1279
+ get validationDetails() {
1280
+ return res.validationDetails;
800
1281
  }
801
1282
  };
802
1283
  }
803
- const SEGMENT_LABELS = {
804
- en: {
805
- hour: "Hour",
806
- minute: "Minute",
807
- second: "Second",
808
- dayPeriod: "AM/PM"
809
- },
810
- es: {
811
- hour: "Hora",
812
- minute: "Minuto",
813
- second: "Segundo",
814
- dayPeriod: "AM/PM"
815
- }
816
- };
817
- function getSegmentLabel(type, locale) {
818
- if (type === "literal") return "";
819
- return (SEGMENT_LABELS[locale.toLowerCase().split("-")[0] ?? "en"] ?? SEGMENT_LABELS.en)[type];
820
- }
821
- function normalizeDigit(input) {
822
- if (/^[0-9]$/.test(input)) return input;
823
- const code = input.codePointAt(0);
824
- if (code === void 0) return null;
825
- if (code >= 1632 && code <= 1641) return String(code - 1632);
826
- if (code >= 1776 && code <= 1785) return String(code - 1776);
827
- if (code >= 65296 && code <= 65305) return String(code - 65296);
828
- return null;
829
- }
830
- function extractNormalizedDigits(input) {
831
- const digits = [];
832
- for (const char of input) {
833
- const normalized = normalizeDigit(char);
834
- if (normalized) digits.push(normalized);
835
- }
836
- return digits;
837
- }
838
1284
  //#endregion
839
1285
  //#region src/datepicker/createDatePicker.ts
840
1286
  /**
841
1287
  * createDatePicker hook for Solidaria
842
1288
  *
843
- * Provides the behavior and accessibility implementation for a date picker component.
844
- * Based on @react-aria/datepicker useDatePicker
1289
+ * Provides the behavior and accessibility implementation for a date picker
1290
+ * component. Faithful port of @react-aria/datepicker `useDatePicker`.
1291
+ *
1292
+ * The composed picker does NOT re-implement the segmented field; it hands its
1293
+ * `fieldProps` (stamped `[roleSymbol]="presentation"`) to `createDateField`,
1294
+ * which is what actually names the segments and publishes the value description
1295
+ * through the shared `hookData` WeakMap. Here we only provide:
1296
+ * - `groupProps`: a ROLELESS wrapper carrying the outer arrow-navigation
1297
+ * (`createDatePickerGroup` with arrow-nav ENABLED — the inner presentation
1298
+ * field disables its own and lets the key event bubble up to this handler).
1299
+ * - `fieldProps`: the presentation marker + labelledby/describedby + value model.
1300
+ * - `buttonProps` / `dialogProps` / `calendarProps` for the trigger + popover.
845
1301
  */
846
1302
  /**
847
1303
  * Provides the behavior and accessibility implementation for a date picker component.
848
1304
  */
849
- function createDatePicker(props, state, overlayState, _calendarState) {
1305
+ function createDatePicker(props, state, overlayState, _calendarState, ref = () => null) {
850
1306
  const locale = useLocale();
851
1307
  const getProps = () => access(props);
852
- const id = createId(getProps().id);
853
- const descriptionId = createId();
854
- const errorMessageId = createId();
855
1308
  const dialogId = createId();
856
1309
  const buttonId = createId();
857
1310
  const fieldId = createId();
858
- const { labelProps, fieldProps: labelFieldProps } = createLabel({
859
- get label() {
860
- return getProps().label;
861
- },
862
- get "aria-label"() {
863
- return getProps()["aria-label"];
864
- },
865
- get "aria-labelledby"() {
866
- return getProps()["aria-labelledby"];
867
- },
868
- labelElementType: "span"
869
- });
870
- const getAriaDescribedBy = () => {
1311
+ const field = createField(() => {
871
1312
  const p = getProps();
872
- const ids = [];
873
- if (p["aria-describedby"]) ids.push(p["aria-describedby"]);
874
- if (valueDescription()) ids.push(valueDescriptionId);
875
- if (p.description) ids.push(descriptionId);
876
- if ((p.isInvalid || state.isInvalid()) && p.errorMessage) ids.push(errorMessageId);
877
- return ids.length > 0 ? ids.join(" ") : void 0;
878
- };
879
- const valueDescriptionId = createId();
880
- const valueDescription = createMemo(() => {
881
- const v = state.value?.();
882
- if (!v) return "";
883
- return new DateFormatter(locale().locale, {
884
- year: "numeric",
885
- month: "long",
886
- day: "numeric"
887
- }).format(v.toDate(getLocalTimeZone()));
888
- });
889
- const groupProps = createMemo(() => {
890
- const p = getProps();
891
- const isInvalid = p.isInvalid || state.isInvalid();
892
- const describedBy = getAriaDescribedBy();
893
- const labelField = labelFieldProps;
1313
+ const dv = state.displayValidation();
894
1314
  return {
895
- id,
896
- role: "group",
897
- "aria-label": labelField["aria-label"] || void 0,
898
- "aria-labelledby": labelField["aria-labelledby"] || void 0,
899
- "aria-disabled": p.isDisabled || state.isDisabled() || void 0,
900
- "aria-readonly": p.isReadOnly || state.isReadOnly() || void 0,
901
- "aria-required": p.isRequired || state.isRequired() || void 0,
902
- "aria-invalid": isInvalid || void 0,
903
- "aria-describedby": describedBy
1315
+ id: p.id,
1316
+ label: p.label,
1317
+ "aria-label": p["aria-label"],
1318
+ "aria-labelledby": p["aria-labelledby"],
1319
+ "aria-describedby": p["aria-describedby"],
1320
+ description: p.description,
1321
+ labelElementType: "span",
1322
+ isInvalid: p.isInvalid || dv.isInvalid,
1323
+ errorMessage: p.errorMessage || dv.validationErrors
904
1324
  };
905
1325
  });
1326
+ const labelledBy = () => {
1327
+ const fp = field.fieldProps;
1328
+ return fp["aria-labelledby"] || fp.id;
1329
+ };
1330
+ const stringFormatter = createStringFormatter(datePickerStrings, "@react-aria/datepicker");
1331
+ const descProps = createDescription(createMemo(() => {
1332
+ if (!state.value?.()) return "";
1333
+ const date = state.formatValue({ month: "long" });
1334
+ return date ? stringFormatter().format("selectedDateDescription", { date }) : "";
1335
+ }));
1336
+ const ariaDescribedBy = () => {
1337
+ const fp = field.fieldProps;
1338
+ return [descProps["aria-describedby"], fp["aria-describedby"]].filter(Boolean).join(" ") || void 0;
1339
+ };
1340
+ const outerGroup = createDatePickerGroup({ setOpen: (isOpen) => isOpen ? overlayState.open() : overlayState.close() }, ref, false);
1341
+ const groupProps = createMemo(() => mergeProps$1(outerGroup(), {
1342
+ role: "group",
1343
+ "aria-disabled": getProps().isDisabled || void 0,
1344
+ "aria-labelledby": labelledBy(),
1345
+ "aria-describedby": ariaDescribedBy(),
1346
+ onKeyDown(e) {
1347
+ if (!overlayState.isOpen) getProps().onKeyDown?.(e);
1348
+ },
1349
+ onKeyUp(e) {
1350
+ if (!overlayState.isOpen) getProps().onKeyUp?.(e);
1351
+ }
1352
+ }));
906
1353
  const fieldProps = createMemo(() => {
907
1354
  const p = getProps();
908
- return {
1355
+ return mergeProps$1(field.fieldProps, {
909
1356
  id: fieldId,
910
- "aria-describedby": getAriaDescribedBy(),
1357
+ [roleSymbol]: "presentation",
1358
+ "aria-labelledby": labelledBy(),
1359
+ "aria-describedby": ariaDescribedBy(),
911
1360
  value: state.value?.(),
912
1361
  defaultValue: state.defaultValue,
913
1362
  onChange: (value) => {
@@ -921,14 +1370,19 @@ function createDatePicker(props, state, overlayState, _calendarState) {
921
1370
  isDisabled: p.isDisabled || state.isDisabled(),
922
1371
  isReadOnly: p.isReadOnly || state.isReadOnly(),
923
1372
  isRequired: p.isRequired || state.isRequired(),
1373
+ validationBehavior: p.validationBehavior,
924
1374
  autoFocus: p.autoFocus,
925
1375
  name: p.name,
926
1376
  form: p.form
927
- };
1377
+ });
928
1378
  });
1379
+ const isButtonDisabled = () => {
1380
+ const p = getProps();
1381
+ return p.isDisabled || state.isDisabled() || p.isReadOnly || state.isReadOnly();
1382
+ };
929
1383
  const buttonPress = createPress({
930
1384
  get isDisabled() {
931
- return getProps().isDisabled || state.isDisabled();
1385
+ return isButtonDisabled();
932
1386
  },
933
1387
  onPress: () => {
934
1388
  overlayState.open();
@@ -936,36 +1390,23 @@ function createDatePicker(props, state, overlayState, _calendarState) {
936
1390
  });
937
1391
  const buttonProps = createMemo(() => {
938
1392
  const p = getProps();
939
- const isDisabled = p.isDisabled || state.isDisabled();
940
- const defaults = getDatePickerLabelDefaults(locale().locale);
941
- const labelId = labelProps["id"];
942
- const labelledBy = labelId ? `${buttonId} ${labelId}` : buttonId;
943
- const describedBy = getAriaDescribedBy();
944
- return mergeProps(buttonPress.pressProps, {
1393
+ return mergeProps$1(buttonPress.pressProps, {
945
1394
  id: buttonId,
946
1395
  type: "button",
947
- "aria-label": p.buttonAriaLabel ?? defaults.button,
948
- "aria-labelledby": labelledBy,
949
1396
  "aria-haspopup": "dialog",
1397
+ "aria-label": p.buttonAriaLabel ?? stringFormatter().format("calendar"),
1398
+ "aria-labelledby": `${buttonId} ${labelledBy()}`,
1399
+ "aria-describedby": ariaDescribedBy(),
950
1400
  "aria-expanded": overlayState.isOpen,
951
- "aria-controls": overlayState.isOpen ? dialogId : void 0,
952
- "aria-describedby": describedBy,
953
- "aria-disabled": isDisabled || void 0,
1401
+ "aria-disabled": isButtonDisabled() || void 0,
954
1402
  tabIndex: 0
955
1403
  });
956
1404
  });
957
- const dialogProps = createMemo(() => {
958
- const p = getProps();
959
- const defaults = getDatePickerLabelDefaults(locale().locale);
960
- const labelId = labelProps["id"];
961
- return {
962
- id: dialogId,
963
- role: "dialog",
964
- "aria-modal": true,
965
- "aria-labelledby": labelId ? `${buttonId} ${labelId}` : buttonId,
966
- "aria-label": p.dialogAriaLabel ?? defaults.dialog
967
- };
968
- });
1405
+ const dialogProps = createMemo(() => ({
1406
+ id: dialogId,
1407
+ role: "dialog",
1408
+ "aria-labelledby": `${buttonId} ${labelledBy()}`
1409
+ }));
969
1410
  const calendarProps = createMemo(() => {
970
1411
  const p = getProps();
971
1412
  const defaults = getDatePickerLabelDefaults(locale().locale);
@@ -989,33 +1430,17 @@ function createDatePicker(props, state, overlayState, _calendarState) {
989
1430
  "aria-label": p.calendarAriaLabel ?? p.dialogAriaLabel ?? defaults.calendar
990
1431
  };
991
1432
  });
992
- const descriptionProps = createMemo(() => ({ id: descriptionId }));
993
- createMemo(() => ({
994
- id: valueDescriptionId,
995
- "aria-hidden": true
996
- }));
997
- const errorMessageProps = createMemo(() => ({
998
- id: errorMessageId,
999
- role: "alert"
1433
+ const labelFocusManager = createFocusManager(ref);
1434
+ const enhancedLabelProps = createMemo(() => ({
1435
+ ...field.labelProps,
1436
+ onClick: () => {
1437
+ labelFocusManager.focusFirst();
1438
+ }
1000
1439
  }));
1001
- let focusFirstSegment;
1002
- let focusLastSegment;
1003
- const enhancedLabelProps = createMemo(() => {
1004
- return {
1005
- ...labelProps,
1006
- onClick: () => {
1007
- focusFirstSegment?.();
1008
- }
1009
- };
1010
- });
1011
1440
  const isInvalid = createMemo(() => {
1012
1441
  return getProps().isInvalid || state.isInvalid();
1013
1442
  });
1014
- const validationErrors = createMemo(() => {
1015
- const p = getProps();
1016
- if (p.isInvalid && typeof p.errorMessage === "string") return [p.errorMessage];
1017
- return [];
1018
- });
1443
+ const validationErrors = createMemo(() => state.displayValidation().validationErrors);
1019
1444
  const validationDetails = createMemo(() => {
1020
1445
  const p = getProps();
1021
1446
  return {
@@ -1038,6 +1463,8 @@ function createDatePicker(props, state, overlayState, _calendarState) {
1038
1463
  get buttonProps() {
1039
1464
  return buttonProps();
1040
1465
  },
1466
+ isButtonPressed: () => buttonPress.isPressed(),
1467
+ isButtonDisabled: () => isButtonDisabled(),
1041
1468
  get dialogProps() {
1042
1469
  return dialogProps();
1043
1470
  },
@@ -1045,10 +1472,10 @@ function createDatePicker(props, state, overlayState, _calendarState) {
1045
1472
  return calendarProps();
1046
1473
  },
1047
1474
  get descriptionProps() {
1048
- return descriptionProps();
1475
+ return field.descriptionProps;
1049
1476
  },
1050
1477
  get errorMessageProps() {
1051
- return errorMessageProps();
1478
+ return field.errorMessageProps;
1052
1479
  },
1053
1480
  get isInvalid() {
1054
1481
  return isInvalid();
@@ -1060,13 +1487,8 @@ function createDatePicker(props, state, overlayState, _calendarState) {
1060
1487
  return validationDetails();
1061
1488
  },
1062
1489
  focusManager: {
1063
- focusFirst: () => focusFirstSegment?.(),
1064
- focusLast: () => focusLastSegment?.(),
1065
- /** @internal Wires the actual focus implementations from the component layer */
1066
- _register: (first, last) => {
1067
- focusFirstSegment = first;
1068
- focusLastSegment = last;
1069
- }
1490
+ focusFirst: () => labelFocusManager.focusFirst(),
1491
+ focusLast: () => labelFocusManager.focusLast()
1070
1492
  }
1071
1493
  };
1072
1494
  }
@@ -1083,264 +1505,168 @@ function getDatePickerLabelDefaults(locale) {
1083
1505
  };
1084
1506
  }
1085
1507
  //#endregion
1086
- //#region src/datepicker/createDatePickerGroup.ts
1087
- /**
1088
- * createDatePickerGroup hook for Solidaria
1089
- *
1090
- * Provides keyboard and pointer behavior for the date picker field group.
1091
- * Based on @react-aria/datepicker useDatePickerGroup
1092
- */
1093
- function createDatePickerGroup(props, state, ref, disableArrowNavigation) {
1094
- const locale = useLocale();
1095
- const resolvedProps = createMemo(() => access(props));
1096
- const onKeyDown = (e) => {
1097
- if (!nodeContains(e.currentTarget, getEventTarget(e))) return;
1098
- if (e.altKey && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
1099
- e.preventDefault();
1100
- e.stopPropagation();
1101
- state.setOpen(true);
1102
- return;
1103
- }
1104
- if (disableArrowNavigation) return;
1105
- const root = ref();
1106
- if (!root) return;
1107
- const segments = Array.from(root.querySelectorAll("[role=\"spinbutton\"]"));
1108
- if (segments.length === 0) return;
1109
- const activeElement = root.ownerDocument.activeElement;
1110
- let currentIndex = -1;
1111
- if (activeElement) currentIndex = segments.indexOf(activeElement);
1112
- const direction = locale().direction;
1113
- switch (e.key) {
1114
- case "ArrowLeft":
1115
- e.preventDefault();
1116
- e.stopPropagation();
1117
- if (direction === "rtl") {
1118
- const nextIndex = currentIndex >= 0 ? currentIndex + 1 : 0;
1119
- if (nextIndex < segments.length) focusSafely(segments[nextIndex]);
1120
- } else {
1121
- const prevIndex = currentIndex >= 0 ? currentIndex - 1 : segments.length - 1;
1122
- if (prevIndex >= 0) focusSafely(segments[prevIndex]);
1123
- }
1124
- break;
1125
- case "ArrowRight":
1126
- e.preventDefault();
1127
- e.stopPropagation();
1128
- if (direction === "rtl") {
1129
- const prevIndex = currentIndex >= 0 ? currentIndex - 1 : segments.length - 1;
1130
- if (prevIndex >= 0) focusSafely(segments[prevIndex]);
1131
- } else {
1132
- const nextIndex = currentIndex >= 0 ? currentIndex + 1 : 0;
1133
- if (nextIndex < segments.length) focusSafely(segments[nextIndex]);
1134
- }
1135
- break;
1136
- }
1137
- };
1138
- const focusLast = (event) => {
1139
- const root = ref();
1140
- if (!root) return;
1141
- const target = event ? getEventTarget(event) : null;
1142
- const segments = Array.from(root.querySelectorAll("[role=\"spinbutton\"]"));
1143
- if (segments.length === 0) return;
1144
- let startIndex = segments.length - 1;
1145
- if (target) {
1146
- const targetIndex = segments.indexOf(target);
1147
- if (targetIndex >= 0) startIndex = targetIndex;
1148
- }
1149
- for (let i = startIndex; i >= 0; i--) {
1150
- const segment = segments[i];
1151
- if (segment.getAttribute("data-placeholder") !== "true") {
1152
- focusSafely(segment);
1153
- return;
1154
- }
1155
- }
1156
- };
1157
- const { pressProps } = createPress({
1158
- isDisabled: () => resolvedProps().isDisabled || state.isDisabled(),
1159
- preventFocusOnPress: true,
1160
- allowTextSelectionOnPress: true,
1161
- onPressStart(e) {
1162
- if (e.pointerType === "mouse") focusLast(e);
1163
- },
1164
- onPress(e) {
1165
- if (e.pointerType === "touch" || e.pointerType === "pen") focusLast(e);
1166
- }
1167
- });
1168
- return { get groupProps() {
1169
- return mergeProps(pressProps, { onKeyDown });
1170
- } };
1171
- }
1172
- //#endregion
1173
1508
  //#region src/datepicker/createDateRangePicker.ts
1174
1509
  /**
1175
1510
  * createDateRangePicker hook for Solidaria
1176
1511
  *
1177
- * Provides behavior and accessibility wiring for range date pickers.
1178
- * Compatibility target: @react-aria/datepicker useDateRangePicker.
1512
+ * Provides behavior and accessibility wiring for range date pickers. Faithful
1513
+ * port of @react-aria/datepicker `useDateRangePicker`.
1514
+ *
1515
+ * Mirrors the composed `createDatePicker`: the range picker does NOT re-implement
1516
+ * the two segmented fields. It hands each field its own field props (stamped
1517
+ * `[roleSymbol]="presentation"` + a SHARED `[focusManagerSymbol]` so arrow keys
1518
+ * and auto-advance walk across BOTH fields) to `createDateField`, which is what
1519
+ * names the segments ("month, Start Date" / "month, End Date") and publishes them
1520
+ * through the shared `hookData` WeakMap. Here we only provide:
1521
+ * - `groupProps`: the labelled `role="group"` shell carrying the OUTER
1522
+ * arrow-navigation (`createDatePickerGroup` with arrow-nav ENABLED — each inner
1523
+ * presentation field disables its own and lets the key event bubble up here).
1524
+ * The styled S2 layer overrides this to `role="presentation"`; the roleless
1525
+ * root stays bare.
1526
+ * - `startFieldProps` / `endFieldProps`: the presentation markers + shared focus
1527
+ * manager + start/end labels, handed to `createDateField`.
1528
+ * - `buttonProps` / `dialogProps` / `calendarProps` for the trigger + popover.
1179
1529
  */
1180
- function createDateRangePicker(props, state, overlayState) {
1181
- const locale = useLocale();
1530
+ function createDateRangePicker(props, state, overlayState, ref = () => null) {
1182
1531
  const getProps = () => access(props);
1183
- const id = createId(getProps().id);
1532
+ const buttonId = createId();
1533
+ const dialogId = createId();
1184
1534
  const startFieldId = createId();
1185
1535
  const endFieldId = createId();
1186
- const descriptionId = createId();
1187
- const errorMessageId = createId();
1188
- const dialogId = createId();
1189
- const { labelProps, fieldProps: labelFieldProps } = createLabel({
1190
- get label() {
1191
- return getProps().label;
1192
- },
1193
- get "aria-label"() {
1194
- return getProps()["aria-label"];
1195
- },
1196
- get "aria-labelledby"() {
1197
- return getProps()["aria-labelledby"];
1198
- },
1199
- labelElementType: "span"
1200
- });
1201
- const getAriaDescribedBy = () => {
1202
- const p = getProps();
1203
- const ids = [];
1204
- if (p["aria-describedby"]) ids.push(p["aria-describedby"]);
1205
- if (p.description) ids.push(descriptionId);
1206
- if (p.isInvalid && p.errorMessage) ids.push(errorMessageId);
1207
- return ids.length > 0 ? ids.join(" ") : void 0;
1208
- };
1209
- const groupProps = createMemo(() => {
1210
- const p = getProps();
1211
- const isInvalid = p.isInvalid;
1212
- return mergeProps(labelFieldProps, {
1213
- id,
1214
- role: "group",
1215
- "aria-disabled": p.isDisabled || state.isDisabled() || void 0,
1216
- "aria-readonly": p.isReadOnly || state.isReadOnly() || void 0,
1217
- "aria-required": p.isRequired || void 0,
1218
- "aria-invalid": isInvalid || void 0,
1219
- "aria-describedby": getAriaDescribedBy()
1220
- });
1221
- });
1222
- const startFieldProps = createMemo(() => {
1536
+ const stringFormatter = createStringFormatter(datePickerStrings, "@react-aria/datepicker");
1537
+ const locale = useLocale();
1538
+ const field = createField(() => {
1223
1539
  const p = getProps();
1224
- const defaults = getDateRangePickerLabelDefaults(locale().locale);
1225
- const isDisabled = p.isDisabled || state.isDisabled();
1226
- const isReadOnly = p.isReadOnly || state.isReadOnly();
1227
- const isInvalid = p.isInvalid;
1228
1540
  return {
1229
- id: startFieldId,
1230
- "aria-label": p.startFieldAriaLabel ?? defaults.startField,
1231
- "aria-describedby": getAriaDescribedBy(),
1232
- "aria-disabled": isDisabled || void 0,
1233
- "aria-readonly": isReadOnly || void 0,
1234
- "aria-invalid": isInvalid || void 0,
1235
- tabIndex: isDisabled ? -1 : 0,
1236
- onClick: () => {
1237
- if (!isDisabled) overlayState.open();
1238
- },
1239
- onKeyDown: (event) => {
1240
- if (isDisabled) return;
1241
- if (event.key === "Enter" || event.key === " " || event.key === "ArrowDown") {
1242
- event.preventDefault();
1243
- overlayState.open();
1244
- }
1245
- }
1541
+ id: p.id,
1542
+ label: p.label,
1543
+ "aria-label": p["aria-label"],
1544
+ "aria-labelledby": p["aria-labelledby"],
1545
+ "aria-describedby": p["aria-describedby"],
1546
+ description: p.description,
1547
+ labelElementType: "span",
1548
+ isInvalid: p.isInvalid,
1549
+ errorMessage: p.errorMessage
1246
1550
  };
1247
1551
  });
1248
- const endFieldProps = createMemo(() => {
1552
+ const labelledBy = () => {
1553
+ const fp = field.fieldProps;
1554
+ return fp["aria-labelledby"] || fp.id;
1555
+ };
1556
+ const descProps = createDescription(createMemo(() => {
1557
+ const range = state.formatValue(locale().locale, { month: "long" });
1558
+ return range ? stringFormatter().format("selectedRangeDescription", {
1559
+ startDate: range.start,
1560
+ endDate: range.end
1561
+ }) : "";
1562
+ }));
1563
+ const ariaDescribedBy = () => {
1564
+ const fp = field.fieldProps;
1565
+ return [descProps["aria-describedby"], fp["aria-describedby"]].filter(Boolean).join(" ") || void 0;
1566
+ };
1567
+ const sharedFocusManager = createFocusManager(ref);
1568
+ const outerGroup = createDatePickerGroup({ setOpen: (isOpen) => isOpen ? overlayState.open() : overlayState.close() }, ref, false);
1569
+ const groupProps = createMemo(() => mergeProps$1(outerGroup(), {
1570
+ role: "group",
1571
+ "aria-disabled": getProps().isDisabled || void 0,
1572
+ "aria-labelledby": labelledBy(),
1573
+ "aria-describedby": ariaDescribedBy(),
1574
+ onKeyDown(e) {
1575
+ if (!overlayState.isOpen) getProps().onKeyDown?.(e);
1576
+ },
1577
+ onKeyUp(e) {
1578
+ if (!overlayState.isOpen) getProps().onKeyUp?.(e);
1579
+ }
1580
+ }));
1581
+ const commonFieldProps = () => {
1249
1582
  const p = getProps();
1250
- const defaults = getDateRangePickerLabelDefaults(locale().locale);
1251
- const isDisabled = p.isDisabled || state.isDisabled();
1252
- const isReadOnly = p.isReadOnly || state.isReadOnly();
1253
- const isInvalid = p.isInvalid;
1254
1583
  return {
1255
- id: endFieldId,
1256
- "aria-label": p.endFieldAriaLabel ?? defaults.endField,
1257
- "aria-describedby": getAriaDescribedBy(),
1258
- "aria-disabled": isDisabled || void 0,
1259
- "aria-readonly": isReadOnly || void 0,
1260
- "aria-invalid": isInvalid || void 0,
1261
- tabIndex: isDisabled ? -1 : 0,
1262
- onClick: () => {
1263
- if (!isDisabled) overlayState.open();
1264
- },
1265
- onKeyDown: (event) => {
1266
- if (isDisabled) return;
1267
- if (event.key === "Enter" || event.key === " " || event.key === "ArrowDown") {
1268
- event.preventDefault();
1269
- overlayState.open();
1270
- }
1271
- }
1584
+ [roleSymbol]: "presentation",
1585
+ [focusManagerSymbol]: sharedFocusManager,
1586
+ "aria-labelledby": labelledBy(),
1587
+ "aria-describedby": ariaDescribedBy(),
1588
+ isDisabled: p.isDisabled || state.isDisabled(),
1589
+ isReadOnly: p.isReadOnly || state.isReadOnly(),
1590
+ isRequired: p.isRequired,
1591
+ validationBehavior: p.validationBehavior,
1592
+ form: p.form
1272
1593
  };
1273
- });
1274
- const startInputProps = createMemo(() => {
1594
+ };
1595
+ const startFieldProps = createMemo(() => {
1275
1596
  const p = getProps();
1276
- const defaults = getDateRangePickerLabelDefaults(locale().locale);
1277
- const isDisabled = p.isDisabled || state.isDisabled();
1278
- const isReadOnly = p.isReadOnly || state.isReadOnly();
1279
- const isInvalid = p.isInvalid;
1280
- return {
1597
+ return mergeProps$1(commonFieldProps(), {
1281
1598
  id: startFieldId,
1282
- "aria-label": p.startFieldAriaLabel ?? defaults.startField,
1283
- "aria-describedby": getAriaDescribedBy(),
1284
- "aria-disabled": isDisabled || void 0,
1285
- "aria-readonly": isReadOnly || void 0,
1286
- "aria-invalid": isInvalid || void 0
1287
- };
1599
+ "aria-label": stringFormatter().format("startDate"),
1600
+ autoFocus: p.autoFocus,
1601
+ name: p.startName
1602
+ });
1288
1603
  });
1289
- const endInputProps = createMemo(() => {
1604
+ const endFieldProps = createMemo(() => {
1290
1605
  const p = getProps();
1291
- const defaults = getDateRangePickerLabelDefaults(locale().locale);
1292
- const isDisabled = p.isDisabled || state.isDisabled();
1293
- const isReadOnly = p.isReadOnly || state.isReadOnly();
1294
- const isInvalid = p.isInvalid;
1295
- return {
1606
+ return mergeProps$1(commonFieldProps(), {
1296
1607
  id: endFieldId,
1297
- "aria-label": p.endFieldAriaLabel ?? defaults.endField,
1298
- "aria-describedby": getAriaDescribedBy(),
1299
- "aria-disabled": isDisabled || void 0,
1300
- "aria-readonly": isReadOnly || void 0,
1301
- "aria-invalid": isInvalid || void 0
1302
- };
1608
+ "aria-label": stringFormatter().format("endDate"),
1609
+ name: p.endName
1610
+ });
1611
+ });
1612
+ const isButtonDisabled = () => {
1613
+ const p = getProps();
1614
+ return p.isDisabled || state.isDisabled() || p.isReadOnly || state.isReadOnly();
1615
+ };
1616
+ const buttonPress = createPress({
1617
+ get isDisabled() {
1618
+ return isButtonDisabled();
1619
+ },
1620
+ onPress: () => {
1621
+ overlayState.open();
1622
+ }
1303
1623
  });
1304
1624
  const buttonProps = createMemo(() => {
1305
1625
  const p = getProps();
1306
- const defaults = getDateRangePickerLabelDefaults(locale().locale);
1307
- const isDisabled = p.isDisabled || state.isDisabled();
1308
- return {
1309
- "aria-label": p.buttonAriaLabel ?? defaults.button,
1626
+ return mergeProps$1(buttonPress.pressProps, {
1627
+ id: buttonId,
1628
+ type: "button",
1310
1629
  "aria-haspopup": "dialog",
1630
+ "aria-label": p.buttonAriaLabel ?? stringFormatter().format("calendar"),
1631
+ "aria-labelledby": `${buttonId} ${labelledBy()}`,
1632
+ "aria-describedby": ariaDescribedBy(),
1311
1633
  "aria-expanded": overlayState.isOpen,
1312
- "aria-controls": overlayState.isOpen ? dialogId : void 0,
1313
- disabled: isDisabled,
1314
- tabIndex: 0,
1315
- onClick: () => {
1316
- if (!isDisabled) overlayState.toggle();
1317
- }
1318
- };
1634
+ "aria-disabled": isButtonDisabled() || void 0,
1635
+ tabIndex: 0
1636
+ });
1319
1637
  });
1320
- const dialogProps = createMemo(() => {
1321
- const defaults = getDateRangePickerLabelDefaults(locale().locale);
1638
+ const dialogProps = createMemo(() => ({
1639
+ id: dialogId,
1640
+ role: "dialog",
1641
+ "aria-labelledby": `${buttonId} ${labelledBy()}`
1642
+ }));
1643
+ const calendarProps = createMemo(() => {
1644
+ const p = getProps();
1645
+ const label = p.calendarAriaLabel ?? p.dialogAriaLabel;
1322
1646
  return {
1323
- id: dialogId,
1324
- role: "dialog",
1325
- "aria-modal": true,
1326
- "aria-label": getProps().dialogAriaLabel ?? defaults.dialog
1647
+ autoFocus: true,
1648
+ value: state.value(),
1649
+ minValue: void 0,
1650
+ maxValue: void 0,
1651
+ isDisabled: p.isDisabled || state.isDisabled(),
1652
+ isReadOnly: p.isReadOnly || state.isReadOnly(),
1653
+ isInvalid: p.isInvalid,
1654
+ ...label ? { "aria-label": label } : {}
1327
1655
  };
1328
1656
  });
1329
- const calendarProps = createMemo(() => {
1330
- const defaults = getDateRangePickerLabelDefaults(locale().locale);
1331
- return { "aria-label": getProps().calendarAriaLabel ?? getProps().dialogAriaLabel ?? defaults.calendar };
1332
- });
1333
- const descriptionProps = createMemo(() => ({ id: descriptionId }));
1334
- const errorMessageProps = createMemo(() => ({
1335
- id: errorMessageId,
1336
- role: "alert"
1657
+ const enhancedLabelProps = createMemo(() => ({
1658
+ ...field.labelProps,
1659
+ onClick: () => {
1660
+ sharedFocusManager.focusFirst();
1661
+ }
1337
1662
  }));
1663
+ const isInvalid = createMemo(() => Boolean(getProps().isInvalid));
1338
1664
  return {
1339
1665
  get groupProps() {
1340
1666
  return groupProps();
1341
1667
  },
1342
1668
  get labelProps() {
1343
- return labelProps;
1669
+ return enhancedLabelProps();
1344
1670
  },
1345
1671
  get startFieldProps() {
1346
1672
  return startFieldProps();
@@ -1348,15 +1674,11 @@ function createDateRangePicker(props, state, overlayState) {
1348
1674
  get endFieldProps() {
1349
1675
  return endFieldProps();
1350
1676
  },
1351
- get startInputProps() {
1352
- return startInputProps();
1353
- },
1354
- get endInputProps() {
1355
- return endInputProps();
1356
- },
1357
1677
  get buttonProps() {
1358
1678
  return buttonProps();
1359
1679
  },
1680
+ isButtonPressed: () => buttonPress.isPressed(),
1681
+ isButtonDisabled: () => isButtonDisabled(),
1360
1682
  get dialogProps() {
1361
1683
  return dialogProps();
1362
1684
  },
@@ -1364,30 +1686,21 @@ function createDateRangePicker(props, state, overlayState) {
1364
1686
  return calendarProps();
1365
1687
  },
1366
1688
  get descriptionProps() {
1367
- return descriptionProps();
1689
+ return field.descriptionProps;
1368
1690
  },
1369
1691
  get errorMessageProps() {
1370
- return errorMessageProps();
1692
+ return field.errorMessageProps;
1693
+ },
1694
+ get isInvalid() {
1695
+ return isInvalid();
1696
+ },
1697
+ focusManager: {
1698
+ focusFirst: () => sharedFocusManager.focusFirst(),
1699
+ focusLast: () => sharedFocusManager.focusLast()
1371
1700
  }
1372
1701
  };
1373
1702
  }
1374
- function getDateRangePickerLabelDefaults(locale) {
1375
- if ((locale.toLowerCase().split("-")[0] ?? "en") === "es") return {
1376
- button: "Abrir calendario de rango",
1377
- dialog: "Calendario de rango",
1378
- calendar: "Calendario de rango",
1379
- startField: "Fecha de inicio",
1380
- endField: "Fecha de fin"
1381
- };
1382
- return {
1383
- button: "Open range calendar",
1384
- dialog: "Range calendar",
1385
- calendar: "Range calendar",
1386
- startField: "Start date",
1387
- endField: "End date"
1388
- };
1389
- }
1390
1703
  //#endregion
1391
- export { createTimeField as a, createTimeSegment as i, createDatePickerGroup as n, createDateSegment as o, createDatePicker as r, createDateField as s, createDateRangePicker as t };
1704
+ export { createDisplayNames as a, hookData as c, createDateSegment as i, roleSymbol as l, createDatePicker as n, createDateField as o, createTimeField as r, focusManagerSymbol as s, createDateRangePicker as t, createDatePickerGroup as u };
1392
1705
 
1393
1706
  //# sourceMappingURL=datepicker.js.map