@proyecto-viviana/solidaria 0.2.8 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (976) hide show
  1. package/README.md +31 -236
  2. package/dist/_chunk/actiongroup.js +207 -0
  3. package/dist/_chunk/actiongroup.js.map +1 -0
  4. package/dist/_chunk/actiongroup.jsx +207 -0
  5. package/dist/_chunk/actiongroup.jsx.map +1 -0
  6. package/dist/_chunk/ariaHideOutside.js +122 -0
  7. package/dist/_chunk/ariaHideOutside.js.map +1 -0
  8. package/dist/_chunk/ariaHideOutside.jsx +122 -0
  9. package/dist/_chunk/ariaHideOutside.jsx.map +1 -0
  10. package/dist/_chunk/autocomplete.js +196 -0
  11. package/dist/_chunk/autocomplete.js.map +1 -0
  12. package/dist/_chunk/autocomplete.jsx +196 -0
  13. package/dist/_chunk/autocomplete.jsx.map +1 -0
  14. package/dist/_chunk/breadcrumbs.js +119 -0
  15. package/dist/_chunk/breadcrumbs.js.map +1 -0
  16. package/dist/_chunk/breadcrumbs.jsx +119 -0
  17. package/dist/_chunk/breadcrumbs.jsx.map +1 -0
  18. package/dist/_chunk/button.js +276 -0
  19. package/dist/_chunk/button.js.map +1 -0
  20. package/dist/_chunk/button.jsx +276 -0
  21. package/dist/_chunk/button.jsx.map +1 -0
  22. package/dist/_chunk/calendar.js +1036 -0
  23. package/dist/_chunk/calendar.js.map +1 -0
  24. package/dist/_chunk/calendar.jsx +1036 -0
  25. package/dist/_chunk/calendar.jsx.map +1 -0
  26. package/dist/_chunk/checkbox.js +234 -0
  27. package/dist/_chunk/checkbox.js.map +1 -0
  28. package/dist/_chunk/checkbox.jsx +234 -0
  29. package/dist/_chunk/checkbox.jsx.map +1 -0
  30. package/dist/_chunk/color.js +1174 -0
  31. package/dist/_chunk/color.js.map +1 -0
  32. package/dist/_chunk/color.jsx +1174 -0
  33. package/dist/_chunk/color.jsx.map +1 -0
  34. package/dist/_chunk/combobox.js +436 -0
  35. package/dist/_chunk/combobox.js.map +1 -0
  36. package/dist/_chunk/combobox.jsx +436 -0
  37. package/dist/_chunk/combobox.jsx.map +1 -0
  38. package/dist/_chunk/createCollator.js +229 -0
  39. package/dist/_chunk/createCollator.js.map +1 -0
  40. package/dist/_chunk/createCollator.jsx +223 -0
  41. package/dist/_chunk/createCollator.jsx.map +1 -0
  42. package/dist/_chunk/createCollectionRowInteraction.js +133 -0
  43. package/dist/_chunk/createCollectionRowInteraction.js.map +1 -0
  44. package/dist/_chunk/createCollectionRowInteraction.jsx +133 -0
  45. package/dist/_chunk/createCollectionRowInteraction.jsx.map +1 -0
  46. package/dist/_chunk/createField.js +54 -0
  47. package/dist/_chunk/createField.js.map +1 -0
  48. package/dist/_chunk/createField.jsx +54 -0
  49. package/dist/_chunk/createField.jsx.map +1 -0
  50. package/dist/_chunk/createFocus.js +101 -0
  51. package/dist/_chunk/createFocus.js.map +1 -0
  52. package/dist/_chunk/createFocus.jsx +101 -0
  53. package/dist/_chunk/createFocus.jsx.map +1 -0
  54. package/dist/_chunk/createFocusRing.js +54 -0
  55. package/dist/_chunk/createFocusRing.js.map +1 -0
  56. package/dist/_chunk/createFocusRing.jsx +54 -0
  57. package/dist/_chunk/createFocusRing.jsx.map +1 -0
  58. package/dist/_chunk/createFocusWithin.js +121 -0
  59. package/dist/_chunk/createFocusWithin.js.map +1 -0
  60. package/dist/_chunk/createFocusWithin.jsx +121 -0
  61. package/dist/_chunk/createFocusWithin.jsx.map +1 -0
  62. package/dist/_chunk/createFocusable.js +131 -0
  63. package/dist/_chunk/createFocusable.js.map +1 -0
  64. package/dist/_chunk/createFocusable.jsx +131 -0
  65. package/dist/_chunk/createFocusable.jsx.map +1 -0
  66. package/dist/_chunk/createFormValidation.js +135 -0
  67. package/dist/_chunk/createFormValidation.js.map +1 -0
  68. package/dist/_chunk/createFormValidation.jsx +135 -0
  69. package/dist/_chunk/createFormValidation.jsx.map +1 -0
  70. package/dist/_chunk/createHover.js +130 -0
  71. package/dist/_chunk/createHover.js.map +1 -0
  72. package/dist/_chunk/createHover.jsx +130 -0
  73. package/dist/_chunk/createHover.jsx.map +1 -0
  74. package/dist/_chunk/createInteractionModality.js +269 -0
  75. package/dist/_chunk/createInteractionModality.js.map +1 -0
  76. package/dist/_chunk/createInteractionModality.jsx +269 -0
  77. package/dist/_chunk/createInteractionModality.jsx.map +1 -0
  78. package/dist/_chunk/createLabel.js +46 -0
  79. package/dist/_chunk/createLabel.js.map +1 -0
  80. package/dist/_chunk/createLabel.jsx +46 -0
  81. package/dist/_chunk/createLabel.jsx.map +1 -0
  82. package/dist/_chunk/createLabels.js +31 -0
  83. package/dist/_chunk/createLabels.js.map +1 -0
  84. package/dist/_chunk/createLabels.jsx +31 -0
  85. package/dist/_chunk/createLabels.jsx.map +1 -0
  86. package/dist/_chunk/createLandmark.js +198 -0
  87. package/dist/_chunk/createLandmark.js.map +1 -0
  88. package/dist/_chunk/createLandmark.jsx +198 -0
  89. package/dist/_chunk/createLandmark.jsx.map +1 -0
  90. package/dist/_chunk/createLongPress.js +91 -0
  91. package/dist/_chunk/createLongPress.js.map +1 -0
  92. package/dist/_chunk/createLongPress.jsx +91 -0
  93. package/dist/_chunk/createLongPress.jsx.map +1 -0
  94. package/dist/_chunk/createOverlay.js +327 -0
  95. package/dist/_chunk/createOverlay.js.map +1 -0
  96. package/dist/_chunk/createOverlay.jsx +327 -0
  97. package/dist/_chunk/createOverlay.jsx.map +1 -0
  98. package/dist/_chunk/createPress.js +526 -0
  99. package/dist/_chunk/createPress.js.map +1 -0
  100. package/dist/_chunk/createPress.jsx +526 -0
  101. package/dist/_chunk/createPress.jsx.map +1 -0
  102. package/dist/_chunk/createProgressBar.js +81 -0
  103. package/dist/_chunk/createProgressBar.js.map +1 -0
  104. package/dist/_chunk/createProgressBar.jsx +81 -0
  105. package/dist/_chunk/createProgressBar.jsx.map +1 -0
  106. package/dist/_chunk/createSelectableItem.js +298 -0
  107. package/dist/_chunk/createSelectableItem.js.map +1 -0
  108. package/dist/_chunk/createSelectableItem.jsx +298 -0
  109. package/dist/_chunk/createSelectableItem.jsx.map +1 -0
  110. package/dist/_chunk/createToggle.js +158 -0
  111. package/dist/_chunk/createToggle.js.map +1 -0
  112. package/dist/_chunk/createToggle.jsx +158 -0
  113. package/dist/_chunk/createToggle.jsx.map +1 -0
  114. package/dist/_chunk/createTypeSelect.js +125 -0
  115. package/dist/_chunk/createTypeSelect.js.map +1 -0
  116. package/dist/_chunk/createTypeSelect.jsx +125 -0
  117. package/dist/_chunk/createTypeSelect.jsx.map +1 -0
  118. package/dist/_chunk/datepicker.js +1393 -0
  119. package/dist/_chunk/datepicker.js.map +1 -0
  120. package/dist/_chunk/datepicker.jsx +1393 -0
  121. package/dist/_chunk/datepicker.jsx.map +1 -0
  122. package/dist/_chunk/dialog.js +62 -0
  123. package/dist/_chunk/dialog.js.map +1 -0
  124. package/dist/_chunk/dialog.jsx +62 -0
  125. package/dist/_chunk/dialog.jsx.map +1 -0
  126. package/dist/_chunk/disclosure.js +185 -0
  127. package/dist/_chunk/disclosure.js.map +1 -0
  128. package/dist/_chunk/disclosure.jsx +185 -0
  129. package/dist/_chunk/disclosure.jsx.map +1 -0
  130. package/dist/_chunk/dnd.js +1304 -0
  131. package/dist/_chunk/dnd.js.map +1 -0
  132. package/dist/_chunk/dnd.jsx +1304 -0
  133. package/dist/_chunk/dnd.jsx.map +1 -0
  134. package/dist/_chunk/env.js +105 -0
  135. package/dist/_chunk/env.js.map +1 -0
  136. package/dist/_chunk/env.jsx +105 -0
  137. package/dist/_chunk/env.jsx.map +1 -0
  138. package/dist/_chunk/filterDOMProps.js +82 -0
  139. package/dist/_chunk/filterDOMProps.js.map +1 -0
  140. package/dist/_chunk/filterDOMProps.jsx +82 -0
  141. package/dist/_chunk/filterDOMProps.jsx.map +1 -0
  142. package/dist/_chunk/focus.js +399 -0
  143. package/dist/_chunk/focus.js.map +1 -0
  144. package/dist/_chunk/focus.jsx +399 -0
  145. package/dist/_chunk/focus.jsx.map +1 -0
  146. package/dist/_chunk/focus2.js +895 -0
  147. package/dist/_chunk/focus2.js.map +1 -0
  148. package/dist/_chunk/focus2.jsx +870 -0
  149. package/dist/_chunk/focus2.jsx.map +1 -0
  150. package/dist/_chunk/form.js +39 -0
  151. package/dist/_chunk/form.js.map +1 -0
  152. package/dist/_chunk/form.jsx +39 -0
  153. package/dist/_chunk/form.jsx.map +1 -0
  154. package/dist/_chunk/grid.js +623 -0
  155. package/dist/_chunk/grid.js.map +1 -0
  156. package/dist/_chunk/grid.jsx +623 -0
  157. package/dist/_chunk/grid.jsx.map +1 -0
  158. package/dist/_chunk/gridlist.js +364 -0
  159. package/dist/_chunk/gridlist.js.map +1 -0
  160. package/dist/_chunk/gridlist.jsx +364 -0
  161. package/dist/_chunk/gridlist.jsx.map +1 -0
  162. package/dist/_chunk/i18n.js +254 -0
  163. package/dist/_chunk/i18n.js.map +1 -0
  164. package/dist/_chunk/i18n.jsx +254 -0
  165. package/dist/_chunk/i18n.jsx.map +1 -0
  166. package/dist/_chunk/interactions.js +241 -0
  167. package/dist/_chunk/interactions.js.map +1 -0
  168. package/dist/_chunk/interactions.jsx +237 -0
  169. package/dist/_chunk/interactions.jsx.map +1 -0
  170. package/dist/_chunk/link.js +96 -0
  171. package/dist/_chunk/link.js.map +1 -0
  172. package/dist/_chunk/link.jsx +96 -0
  173. package/dist/_chunk/link.jsx.map +1 -0
  174. package/dist/_chunk/listbox.js +324 -0
  175. package/dist/_chunk/listbox.js.map +1 -0
  176. package/dist/_chunk/listbox.jsx +324 -0
  177. package/dist/_chunk/listbox.jsx.map +1 -0
  178. package/dist/_chunk/live-announcer.js +207 -0
  179. package/dist/_chunk/live-announcer.js.map +1 -0
  180. package/dist/_chunk/live-announcer.jsx +207 -0
  181. package/dist/_chunk/live-announcer.jsx.map +1 -0
  182. package/dist/_chunk/menu.js +518 -0
  183. package/dist/_chunk/menu.js.map +1 -0
  184. package/dist/_chunk/menu.jsx +518 -0
  185. package/dist/_chunk/menu.jsx.map +1 -0
  186. package/dist/_chunk/meter.js +33 -0
  187. package/dist/_chunk/meter.js.map +1 -0
  188. package/dist/_chunk/meter.jsx +33 -0
  189. package/dist/_chunk/meter.jsx.map +1 -0
  190. package/dist/_chunk/numberfield.js +258 -0
  191. package/dist/_chunk/numberfield.js.map +1 -0
  192. package/dist/_chunk/numberfield.jsx +258 -0
  193. package/dist/_chunk/numberfield.jsx.map +1 -0
  194. package/dist/_chunk/overlays.js +186 -0
  195. package/dist/_chunk/overlays.js.map +1 -0
  196. package/dist/_chunk/overlays.jsx +162 -0
  197. package/dist/_chunk/overlays.jsx.map +1 -0
  198. package/dist/_chunk/popover.js +574 -0
  199. package/dist/_chunk/popover.js.map +1 -0
  200. package/dist/_chunk/popover.jsx +574 -0
  201. package/dist/_chunk/popover.jsx.map +1 -0
  202. package/dist/_chunk/radio.js +319 -0
  203. package/dist/_chunk/radio.js.map +1 -0
  204. package/dist/_chunk/radio.jsx +319 -0
  205. package/dist/_chunk/radio.jsx.map +1 -0
  206. package/dist/_chunk/searchfield.js +209 -0
  207. package/dist/_chunk/searchfield.js.map +1 -0
  208. package/dist/_chunk/searchfield.jsx +209 -0
  209. package/dist/_chunk/searchfield.jsx.map +1 -0
  210. package/dist/_chunk/select.js +403 -0
  211. package/dist/_chunk/select.js.map +1 -0
  212. package/dist/_chunk/select.jsx +394 -0
  213. package/dist/_chunk/select.jsx.map +1 -0
  214. package/dist/_chunk/selection.js +679 -0
  215. package/dist/_chunk/selection.js.map +1 -0
  216. package/dist/_chunk/selection.jsx +679 -0
  217. package/dist/_chunk/selection.jsx.map +1 -0
  218. package/dist/_chunk/separator.js +29 -0
  219. package/dist/_chunk/separator.js.map +1 -0
  220. package/dist/_chunk/separator.jsx +29 -0
  221. package/dist/_chunk/separator.jsx.map +1 -0
  222. package/dist/_chunk/slider.js +255 -0
  223. package/dist/_chunk/slider.js.map +1 -0
  224. package/dist/_chunk/slider.jsx +255 -0
  225. package/dist/_chunk/slider.jsx.map +1 -0
  226. package/dist/_chunk/steplist.js +66 -0
  227. package/dist/_chunk/steplist.js.map +1 -0
  228. package/dist/_chunk/steplist.jsx +66 -0
  229. package/dist/_chunk/steplist.jsx.map +1 -0
  230. package/dist/_chunk/switch.js +34 -0
  231. package/dist/_chunk/switch.js.map +1 -0
  232. package/dist/_chunk/switch.jsx +34 -0
  233. package/dist/_chunk/switch.jsx.map +1 -0
  234. package/dist/_chunk/table.js +1051 -0
  235. package/dist/_chunk/table.js.map +1 -0
  236. package/dist/_chunk/table.jsx +1051 -0
  237. package/dist/_chunk/table.jsx.map +1 -0
  238. package/dist/_chunk/tabs.js +260 -0
  239. package/dist/_chunk/tabs.js.map +1 -0
  240. package/dist/_chunk/tabs.jsx +260 -0
  241. package/dist/_chunk/tabs.jsx.map +1 -0
  242. package/dist/_chunk/tag.js +286 -0
  243. package/dist/_chunk/tag.js.map +1 -0
  244. package/dist/_chunk/tag.jsx +286 -0
  245. package/dist/_chunk/tag.jsx.map +1 -0
  246. package/dist/_chunk/textfield.js +109 -0
  247. package/dist/_chunk/textfield.js.map +1 -0
  248. package/dist/_chunk/textfield.jsx +109 -0
  249. package/dist/_chunk/textfield.jsx.map +1 -0
  250. package/dist/_chunk/toast.js +250 -0
  251. package/dist/_chunk/toast.js.map +1 -0
  252. package/dist/_chunk/toast.jsx +250 -0
  253. package/dist/_chunk/toast.jsx.map +1 -0
  254. package/dist/_chunk/toolbar.js +258 -0
  255. package/dist/_chunk/toolbar.js.map +1 -0
  256. package/dist/_chunk/toolbar.jsx +258 -0
  257. package/dist/_chunk/toolbar.jsx.map +1 -0
  258. package/dist/_chunk/tooltip.js +185 -0
  259. package/dist/_chunk/tooltip.js.map +1 -0
  260. package/dist/_chunk/tooltip.jsx +185 -0
  261. package/dist/_chunk/tooltip.jsx.map +1 -0
  262. package/dist/_chunk/tree.js +424 -0
  263. package/dist/_chunk/tree.js.map +1 -0
  264. package/dist/_chunk/tree.jsx +424 -0
  265. package/dist/_chunk/tree.jsx.map +1 -0
  266. package/dist/_chunk/utils.js +665 -0
  267. package/dist/_chunk/utils.js.map +1 -0
  268. package/dist/_chunk/utils.jsx +665 -0
  269. package/dist/_chunk/utils.jsx.map +1 -0
  270. package/dist/_chunk/visually-hidden.js +92 -0
  271. package/dist/_chunk/visually-hidden.js.map +1 -0
  272. package/dist/_chunk/visually-hidden.jsx +92 -0
  273. package/dist/_chunk/visually-hidden.jsx.map +1 -0
  274. package/dist/actiongroup/createActionGroup.d.ts +5 -5
  275. package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
  276. package/dist/actiongroup/index.d.ts +1 -1
  277. package/dist/actiongroup/index.js +2 -0
  278. package/dist/actiongroup/index.jsx +2 -0
  279. package/dist/autocomplete/createAutocomplete.d.ts +12 -10
  280. package/dist/autocomplete/createAutocomplete.d.ts.map +1 -1
  281. package/dist/autocomplete/index.d.ts +1 -1
  282. package/dist/autocomplete/index.d.ts.map +1 -1
  283. package/dist/autocomplete/index.js +2 -0
  284. package/dist/autocomplete/index.jsx +2 -0
  285. package/dist/breadcrumbs/createBreadcrumbs.d.ts +9 -7
  286. package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -1
  287. package/dist/breadcrumbs/index.d.ts +1 -1
  288. package/dist/breadcrumbs/index.js +2 -0
  289. package/dist/breadcrumbs/index.jsx +2 -0
  290. package/dist/button/createButton.d.ts +1 -1
  291. package/dist/button/createButton.d.ts.map +1 -1
  292. package/dist/button/createToggleButton.d.ts +3 -3
  293. package/dist/button/createToggleButtonGroup.d.ts +7 -7
  294. package/dist/button/createToggleButtonGroup.d.ts.map +1 -1
  295. package/dist/button/index.d.ts +6 -6
  296. package/dist/button/index.d.ts.map +1 -1
  297. package/dist/button/index.js +2 -0
  298. package/dist/button/index.jsx +2 -0
  299. package/dist/button/types.d.ts +18 -12
  300. package/dist/button/types.d.ts.map +1 -1
  301. package/dist/calendar/createCalendar.d.ts +15 -5
  302. package/dist/calendar/createCalendar.d.ts.map +1 -1
  303. package/dist/calendar/createCalendarCell.d.ts +6 -2
  304. package/dist/calendar/createCalendarCell.d.ts.map +1 -1
  305. package/dist/calendar/createCalendarGrid.d.ts +4 -4
  306. package/dist/calendar/createCalendarGrid.d.ts.map +1 -1
  307. package/dist/calendar/createCalendarMonthPicker.d.ts +41 -0
  308. package/dist/calendar/createCalendarMonthPicker.d.ts.map +1 -0
  309. package/dist/calendar/createCalendarYearPicker.d.ts +49 -0
  310. package/dist/calendar/createCalendarYearPicker.d.ts.map +1 -0
  311. package/dist/calendar/createRangeCalendar.d.ts +15 -5
  312. package/dist/calendar/createRangeCalendar.d.ts.map +1 -1
  313. package/dist/calendar/createRangeCalendarCell.d.ts +4 -2
  314. package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -1
  315. package/dist/calendar/index.d.ts +7 -5
  316. package/dist/calendar/index.d.ts.map +1 -1
  317. package/dist/calendar/index.js +2 -0
  318. package/dist/calendar/index.jsx +2 -0
  319. package/dist/calendar/intl/index.d.ts +12 -0
  320. package/dist/calendar/intl/index.d.ts.map +1 -0
  321. package/dist/calendar/utils.d.ts +16 -0
  322. package/dist/calendar/utils.d.ts.map +1 -0
  323. package/dist/checkbox/createCheckbox.d.ts +10 -6
  324. package/dist/checkbox/createCheckbox.d.ts.map +1 -1
  325. package/dist/checkbox/createCheckboxGroup.d.ts +7 -7
  326. package/dist/checkbox/createCheckboxGroup.d.ts.map +1 -1
  327. package/dist/checkbox/createCheckboxGroupItem.d.ts +4 -4
  328. package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -1
  329. package/dist/checkbox/createCheckboxGroupState.d.ts +2 -2
  330. package/dist/checkbox/createCheckboxGroupState.d.ts.map +1 -1
  331. package/dist/checkbox/index.d.ts +8 -8
  332. package/dist/checkbox/index.d.ts.map +1 -1
  333. package/dist/checkbox/index.js +2 -0
  334. package/dist/checkbox/index.jsx +2 -0
  335. package/dist/collections/index.d.ts +3 -3
  336. package/dist/collections/index.d.ts.map +1 -1
  337. package/dist/collections/index.js +160 -0
  338. package/dist/collections/index.js.map +1 -0
  339. package/dist/collections/index.jsx +160 -0
  340. package/dist/collections/index.jsx.map +1 -0
  341. package/dist/color/createColorArea.d.ts +3 -3
  342. package/dist/color/createColorArea.d.ts.map +1 -1
  343. package/dist/color/createColorField.d.ts +4 -4
  344. package/dist/color/createColorField.d.ts.map +1 -1
  345. package/dist/color/createColorSlider.d.ts +4 -4
  346. package/dist/color/createColorSlider.d.ts.map +1 -1
  347. package/dist/color/createColorSwatch.d.ts +2 -2
  348. package/dist/color/createColorSwatch.d.ts.map +1 -1
  349. package/dist/color/createColorWheel.d.ts +3 -3
  350. package/dist/color/createColorWheel.d.ts.map +1 -1
  351. package/dist/color/index.d.ts +6 -6
  352. package/dist/color/index.js +2 -0
  353. package/dist/color/index.jsx +2 -0
  354. package/dist/color/types.d.ts +98 -16
  355. package/dist/color/types.d.ts.map +1 -1
  356. package/dist/combobox/createComboBox.d.ts +10 -7
  357. package/dist/combobox/createComboBox.d.ts.map +1 -1
  358. package/dist/combobox/index.d.ts +1 -1
  359. package/dist/combobox/index.js +2 -0
  360. package/dist/combobox/index.jsx +2 -0
  361. package/dist/combobox/intl/index.d.ts +1 -1
  362. package/dist/datepicker/createDateField.d.ts +18 -6
  363. package/dist/datepicker/createDateField.d.ts.map +1 -1
  364. package/dist/datepicker/createDatePicker.d.ts +51 -5
  365. package/dist/datepicker/createDatePicker.d.ts.map +1 -1
  366. package/dist/datepicker/createDatePickerGroup.d.ts +19 -0
  367. package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -0
  368. package/dist/datepicker/createDateRangePicker.d.ts +8 -6
  369. package/dist/datepicker/createDateRangePicker.d.ts.map +1 -1
  370. package/dist/datepicker/createDateSegment.d.ts +10 -2
  371. package/dist/datepicker/createDateSegment.d.ts.map +1 -1
  372. package/dist/datepicker/createTimeField.d.ts +11 -5
  373. package/dist/datepicker/createTimeField.d.ts.map +1 -1
  374. package/dist/datepicker/createTimeSegment.d.ts +2 -2
  375. package/dist/datepicker/createTimeSegment.d.ts.map +1 -1
  376. package/dist/datepicker/index.d.ts +7 -6
  377. package/dist/datepicker/index.d.ts.map +1 -1
  378. package/dist/datepicker/index.js +2 -0
  379. package/dist/datepicker/index.jsx +2 -0
  380. package/dist/dialog/createDialog.d.ts +5 -5
  381. package/dist/dialog/createDialog.d.ts.map +1 -1
  382. package/dist/dialog/index.d.ts +2 -2
  383. package/dist/dialog/index.d.ts.map +1 -1
  384. package/dist/dialog/index.js +2 -0
  385. package/dist/dialog/index.jsx +2 -0
  386. package/dist/dialog/types.d.ts +4 -4
  387. package/dist/disclosure/createDisclosure.d.ts +5 -2
  388. package/dist/disclosure/createDisclosure.d.ts.map +1 -1
  389. package/dist/disclosure/createDisclosureGroup.d.ts +4 -4
  390. package/dist/disclosure/createDisclosureGroup.d.ts.map +1 -1
  391. package/dist/disclosure/index.d.ts +2 -2
  392. package/dist/disclosure/index.js +2 -0
  393. package/dist/disclosure/index.jsx +2 -0
  394. package/dist/dnd/createDrag.d.ts +2 -2
  395. package/dist/dnd/createDrag.d.ts.map +1 -1
  396. package/dist/dnd/createDraggableCollection.d.ts +2 -2
  397. package/dist/dnd/createDraggableItem.d.ts +3 -3
  398. package/dist/dnd/createDraggableItem.d.ts.map +1 -1
  399. package/dist/dnd/createDrop.d.ts +2 -2
  400. package/dist/dnd/createDrop.d.ts.map +1 -1
  401. package/dist/dnd/createDroppableCollection.d.ts +26 -6
  402. package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
  403. package/dist/dnd/createDroppableItem.d.ts +3 -3
  404. package/dist/dnd/index.d.ts +12 -12
  405. package/dist/dnd/index.d.ts.map +1 -1
  406. package/dist/dnd/index.js +2 -0
  407. package/dist/dnd/index.jsx +2 -0
  408. package/dist/dnd/types.d.ts +2 -2
  409. package/dist/dnd/types.d.ts.map +1 -1
  410. package/dist/dnd/utils.d.ts +2 -2
  411. package/dist/dnd/utils.d.ts.map +1 -1
  412. package/dist/focus/FocusScope.d.ts +1 -1
  413. package/dist/focus/FocusScope.d.ts.map +1 -1
  414. package/dist/focus/createAutoFocus.d.ts.map +1 -1
  415. package/dist/focus/createFocusRestore.d.ts.map +1 -1
  416. package/dist/focus/createVirtualFocus.d.ts +4 -4
  417. package/dist/focus/createVirtualFocus.d.ts.map +1 -1
  418. package/dist/focus/index.d.ts +4 -4
  419. package/dist/focus/index.d.ts.map +1 -1
  420. package/dist/focus/index.js +2 -0
  421. package/dist/focus/index.jsx +2 -0
  422. package/dist/form/createFormReset.d.ts +1 -1
  423. package/dist/form/createFormValidation.d.ts +3 -3
  424. package/dist/form/createFormValidation.d.ts.map +1 -1
  425. package/dist/form/index.d.ts +2 -2
  426. package/dist/form/index.d.ts.map +1 -1
  427. package/dist/form/index.js +3 -0
  428. package/dist/form/index.jsx +3 -0
  429. package/dist/grid/GridKeyboardDelegate.d.ts +5 -5
  430. package/dist/grid/createGrid.d.ts +3 -3
  431. package/dist/grid/createGridCell.d.ts +3 -3
  432. package/dist/grid/createGridRow.d.ts +3 -3
  433. package/dist/grid/index.d.ts +5 -5
  434. package/dist/grid/index.js +2 -0
  435. package/dist/grid/index.jsx +2 -0
  436. package/dist/grid/types.d.ts +8 -8
  437. package/dist/gridlist/createGridList.d.ts +12 -4
  438. package/dist/gridlist/createGridList.d.ts.map +1 -1
  439. package/dist/gridlist/createGridListItem.d.ts +4 -4
  440. package/dist/gridlist/createGridListItem.d.ts.map +1 -1
  441. package/dist/gridlist/createGridListSection.d.ts +15 -0
  442. package/dist/gridlist/createGridListSection.d.ts.map +1 -0
  443. package/dist/gridlist/createGridListSelectionCheckbox.d.ts +3 -3
  444. package/dist/gridlist/createGridListSelectionCheckbox.d.ts.map +1 -1
  445. package/dist/gridlist/index.d.ts +5 -4
  446. package/dist/gridlist/index.d.ts.map +1 -1
  447. package/dist/gridlist/index.js +2 -0
  448. package/dist/gridlist/index.jsx +2 -0
  449. package/dist/gridlist/types.d.ts +61 -7
  450. package/dist/gridlist/types.d.ts.map +1 -1
  451. package/dist/i18n/createCollator.d.ts.map +1 -1
  452. package/dist/i18n/createDateFormatter.d.ts.map +1 -1
  453. package/dist/i18n/createFilter.d.ts.map +1 -1
  454. package/dist/i18n/createNumberFormatter.d.ts +1 -1
  455. package/dist/i18n/createNumberFormatter.d.ts.map +1 -1
  456. package/dist/i18n/createStringFormatter.d.ts +2 -2
  457. package/dist/i18n/createStringFormatter.d.ts.map +1 -1
  458. package/dist/i18n/index.d.ts +8 -8
  459. package/dist/i18n/index.d.ts.map +1 -1
  460. package/dist/i18n/index.js +3 -0
  461. package/dist/i18n/index.jsx +3 -0
  462. package/dist/i18n/locale.d.ts +2 -2
  463. package/dist/i18n/locale.d.ts.map +1 -1
  464. package/dist/i18n/utils.d.ts.map +1 -1
  465. package/dist/index.d.ts +56 -51
  466. package/dist/index.d.ts.map +1 -1
  467. package/dist/index.js +71 -17119
  468. package/dist/index.jsx +71 -0
  469. package/dist/interactions/FocusableProvider.d.ts +2 -2
  470. package/dist/interactions/FocusableProvider.d.ts.map +1 -1
  471. package/dist/interactions/PressEvent.d.ts +13 -2
  472. package/dist/interactions/PressEvent.d.ts.map +1 -1
  473. package/dist/interactions/createFocus.d.ts +1 -1
  474. package/dist/interactions/createFocus.d.ts.map +1 -1
  475. package/dist/interactions/createFocusRing.d.ts +1 -1
  476. package/dist/interactions/createFocusRing.d.ts.map +1 -1
  477. package/dist/interactions/createFocusWithin.d.ts +1 -1
  478. package/dist/interactions/createFocusWithin.d.ts.map +1 -1
  479. package/dist/interactions/createFocusable.d.ts +3 -3
  480. package/dist/interactions/createFocusable.d.ts.map +1 -1
  481. package/dist/interactions/createHover.d.ts +5 -5
  482. package/dist/interactions/createHover.d.ts.map +1 -1
  483. package/dist/interactions/createInteractionModality.d.ts +3 -4
  484. package/dist/interactions/createInteractionModality.d.ts.map +1 -1
  485. package/dist/interactions/createKeyboard.d.ts +1 -1
  486. package/dist/interactions/createKeyboard.d.ts.map +1 -1
  487. package/dist/interactions/createLongPress.d.ts +5 -5
  488. package/dist/interactions/createMove.d.ts +5 -5
  489. package/dist/interactions/createMove.d.ts.map +1 -1
  490. package/dist/interactions/createPress.d.ts +4 -4
  491. package/dist/interactions/createPress.d.ts.map +1 -1
  492. package/dist/interactions/index.d.ts +12 -12
  493. package/dist/interactions/index.d.ts.map +1 -1
  494. package/dist/interactions/index.js +10 -0
  495. package/dist/interactions/index.jsx +10 -0
  496. package/dist/label/createField.d.ts +4 -4
  497. package/dist/label/createField.d.ts.map +1 -1
  498. package/dist/label/createLabel.d.ts +7 -7
  499. package/dist/label/createLabel.d.ts.map +1 -1
  500. package/dist/label/createLabels.d.ts +1 -1
  501. package/dist/label/createLabels.d.ts.map +1 -1
  502. package/dist/label/index.d.ts +5 -5
  503. package/dist/label/index.js +4 -0
  504. package/dist/label/index.jsx +4 -0
  505. package/dist/landmark/createLandmark.d.ts +5 -5
  506. package/dist/landmark/createLandmark.d.ts.map +1 -1
  507. package/dist/landmark/index.d.ts +1 -1
  508. package/dist/landmark/index.js +2 -0
  509. package/dist/landmark/index.jsx +2 -0
  510. package/dist/link/createLink.d.ts +14 -8
  511. package/dist/link/createLink.d.ts.map +1 -1
  512. package/dist/link/index.d.ts +1 -1
  513. package/dist/link/index.js +2 -0
  514. package/dist/link/index.jsx +2 -0
  515. package/dist/listbox/createListBox.d.ts +48 -6
  516. package/dist/listbox/createListBox.d.ts.map +1 -1
  517. package/dist/listbox/createOption.d.ts +27 -4
  518. package/dist/listbox/createOption.d.ts.map +1 -1
  519. package/dist/listbox/index.d.ts +2 -2
  520. package/dist/listbox/index.d.ts.map +1 -1
  521. package/dist/listbox/index.js +2 -0
  522. package/dist/listbox/index.jsx +2 -0
  523. package/dist/live-announcer/announce.d.ts +2 -2
  524. package/dist/live-announcer/announce.d.ts.map +1 -1
  525. package/dist/live-announcer/index.d.ts +1 -1
  526. package/dist/live-announcer/index.js +2 -0
  527. package/dist/live-announcer/index.jsx +2 -0
  528. package/dist/menu/createMenu.d.ts +14 -11
  529. package/dist/menu/createMenu.d.ts.map +1 -1
  530. package/dist/menu/createMenuItem.d.ts +25 -5
  531. package/dist/menu/createMenuItem.d.ts.map +1 -1
  532. package/dist/menu/createMenuTrigger.d.ts +4 -4
  533. package/dist/menu/index.d.ts +3 -3
  534. package/dist/menu/index.d.ts.map +1 -1
  535. package/dist/menu/index.js +2 -0
  536. package/dist/menu/index.jsx +2 -0
  537. package/dist/meter/createMeter.d.ts +6 -6
  538. package/dist/meter/createMeter.d.ts.map +1 -1
  539. package/dist/meter/index.d.ts +1 -1
  540. package/dist/meter/index.js +2 -0
  541. package/dist/meter/index.jsx +2 -0
  542. package/dist/numberfield/createNumberField.d.ts +9 -8
  543. package/dist/numberfield/createNumberField.d.ts.map +1 -1
  544. package/dist/numberfield/index.d.ts +1 -1
  545. package/dist/numberfield/index.js +2 -0
  546. package/dist/numberfield/index.jsx +2 -0
  547. package/dist/overlays/ariaHideOutside.d.ts.map +1 -1
  548. package/dist/overlays/createModal.d.ts +3 -3
  549. package/dist/overlays/createModal.d.ts.map +1 -1
  550. package/dist/overlays/createOverlay.d.ts +1 -1
  551. package/dist/overlays/createOverlay.d.ts.map +1 -1
  552. package/dist/overlays/createOverlayTrigger.d.ts +6 -6
  553. package/dist/overlays/index.d.ts +6 -6
  554. package/dist/overlays/index.d.ts.map +1 -1
  555. package/dist/overlays/index.js +4 -0
  556. package/dist/overlays/index.jsx +4 -0
  557. package/dist/popover/calculatePosition.d.ts +6 -4
  558. package/dist/popover/calculatePosition.d.ts.map +1 -1
  559. package/dist/popover/createOverlayPosition.d.ts +11 -3
  560. package/dist/popover/createOverlayPosition.d.ts.map +1 -1
  561. package/dist/popover/createPopover.d.ts +4 -4
  562. package/dist/popover/createPopover.d.ts.map +1 -1
  563. package/dist/popover/index.d.ts +3 -3
  564. package/dist/popover/index.js +2 -0
  565. package/dist/popover/index.jsx +2 -0
  566. package/dist/progress/createProgressBar.d.ts +7 -5
  567. package/dist/progress/createProgressBar.d.ts.map +1 -1
  568. package/dist/progress/index.d.ts +1 -1
  569. package/dist/progress/index.js +2 -0
  570. package/dist/progress/index.jsx +2 -0
  571. package/dist/radio/createRadio.d.ts +9 -7
  572. package/dist/radio/createRadio.d.ts.map +1 -1
  573. package/dist/radio/createRadioGroup.d.ts +10 -10
  574. package/dist/radio/createRadioGroup.d.ts.map +1 -1
  575. package/dist/radio/createRadioGroupState.d.ts +3 -3
  576. package/dist/radio/createRadioGroupState.d.ts.map +1 -1
  577. package/dist/radio/index.d.ts +3 -3
  578. package/dist/radio/index.d.ts.map +1 -1
  579. package/dist/radio/index.js +2 -0
  580. package/dist/radio/index.jsx +2 -0
  581. package/dist/searchfield/createSearchField.d.ts +7 -7
  582. package/dist/searchfield/createSearchField.d.ts.map +1 -1
  583. package/dist/searchfield/index.d.ts +2 -2
  584. package/dist/searchfield/index.js +2 -0
  585. package/dist/searchfield/index.jsx +2 -0
  586. package/dist/select/createHiddenSelect.d.ts +4 -4
  587. package/dist/select/createHiddenSelect.d.ts.map +1 -1
  588. package/dist/select/createSelect.d.ts +14 -6
  589. package/dist/select/createSelect.d.ts.map +1 -1
  590. package/dist/select/index.d.ts +2 -2
  591. package/dist/select/index.d.ts.map +1 -1
  592. package/dist/select/index.js +2 -0
  593. package/dist/select/index.jsx +2 -0
  594. package/dist/selection/DOMLayoutDelegate.d.ts +58 -0
  595. package/dist/selection/DOMLayoutDelegate.d.ts.map +1 -0
  596. package/dist/selection/ListKeyboardDelegate.d.ts +95 -0
  597. package/dist/selection/ListKeyboardDelegate.d.ts.map +1 -0
  598. package/dist/selection/constants.d.ts +15 -0
  599. package/dist/selection/constants.d.ts.map +1 -0
  600. package/dist/selection/createCollectionRowInteraction.d.ts +13 -0
  601. package/dist/selection/createCollectionRowInteraction.d.ts.map +1 -0
  602. package/dist/selection/createScrollIntoViewOnFocus.d.ts +31 -0
  603. package/dist/selection/createScrollIntoViewOnFocus.d.ts.map +1 -0
  604. package/dist/selection/createSelectableCollection.d.ts +69 -0
  605. package/dist/selection/createSelectableCollection.d.ts.map +1 -0
  606. package/dist/selection/createSelectableItem.d.ts +154 -0
  607. package/dist/selection/createSelectableItem.d.ts.map +1 -0
  608. package/dist/selection/createSelectableList.d.ts +43 -0
  609. package/dist/selection/createSelectableList.d.ts.map +1 -0
  610. package/dist/selection/createTypeSelect.d.ts +2 -2
  611. package/dist/selection/createTypeSelect.d.ts.map +1 -1
  612. package/dist/selection/index.d.ts +10 -1
  613. package/dist/selection/index.d.ts.map +1 -1
  614. package/dist/selection/index.js +4 -0
  615. package/dist/selection/index.jsx +4 -0
  616. package/dist/selection/selectItem.d.ts +29 -0
  617. package/dist/selection/selectItem.d.ts.map +1 -0
  618. package/dist/selection/utils.d.ts +40 -0
  619. package/dist/selection/utils.d.ts.map +1 -0
  620. package/dist/separator/createSeparator.d.ts +9 -5
  621. package/dist/separator/createSeparator.d.ts.map +1 -1
  622. package/dist/separator/index.d.ts +1 -1
  623. package/dist/separator/index.js +2 -0
  624. package/dist/separator/index.jsx +2 -0
  625. package/dist/slider/createSlider.d.ts +11 -7
  626. package/dist/slider/createSlider.d.ts.map +1 -1
  627. package/dist/slider/index.d.ts +2 -2
  628. package/dist/slider/index.js +2 -0
  629. package/dist/slider/index.jsx +2 -0
  630. package/dist/ssr/index.d.ts +18 -1
  631. package/dist/ssr/index.d.ts.map +1 -1
  632. package/dist/ssr/index.js +299 -0
  633. package/dist/ssr/index.js.map +1 -0
  634. package/dist/ssr/index.jsx +292 -0
  635. package/dist/ssr/index.jsx.map +1 -0
  636. package/dist/steplist/createStepList.d.ts +36 -0
  637. package/dist/steplist/createStepList.d.ts.map +1 -0
  638. package/dist/steplist/index.d.ts +2 -0
  639. package/dist/steplist/index.d.ts.map +1 -0
  640. package/dist/steplist/index.js +2 -0
  641. package/dist/steplist/index.jsx +2 -0
  642. package/dist/switch/createSwitch.d.ts +10 -4
  643. package/dist/switch/createSwitch.d.ts.map +1 -1
  644. package/dist/switch/index.d.ts +1 -1
  645. package/dist/switch/index.js +2 -0
  646. package/dist/switch/index.jsx +2 -0
  647. package/dist/table/createTable.d.ts +3 -3
  648. package/dist/table/createTable.d.ts.map +1 -1
  649. package/dist/table/createTableCell.d.ts +3 -3
  650. package/dist/table/createTableCell.d.ts.map +1 -1
  651. package/dist/table/createTableColumnHeader.d.ts +3 -3
  652. package/dist/table/createTableColumnHeader.d.ts.map +1 -1
  653. package/dist/table/createTableColumnResize.d.ts +41 -0
  654. package/dist/table/createTableColumnResize.d.ts.map +1 -0
  655. package/dist/table/createTableHeaderRow.d.ts +3 -3
  656. package/dist/table/createTableRow.d.ts +4 -4
  657. package/dist/table/createTableRow.d.ts.map +1 -1
  658. package/dist/table/createTableRowGroup.d.ts +2 -2
  659. package/dist/table/createTableRowGroup.d.ts.map +1 -1
  660. package/dist/table/createTableSelectAllCheckbox.d.ts +3 -3
  661. package/dist/table/createTableSelectionCheckbox.d.ts +3 -3
  662. package/dist/table/index.d.ts +11 -9
  663. package/dist/table/index.d.ts.map +1 -1
  664. package/dist/table/index.js +2 -0
  665. package/dist/table/index.jsx +2 -0
  666. package/dist/table/types.d.ts +41 -7
  667. package/dist/table/types.d.ts.map +1 -1
  668. package/dist/tabs/createTabs.d.ts +32 -28
  669. package/dist/tabs/createTabs.d.ts.map +1 -1
  670. package/dist/tabs/index.d.ts +1 -1
  671. package/dist/tabs/index.js +2 -0
  672. package/dist/tabs/index.jsx +2 -0
  673. package/dist/tag/createTag.d.ts +4 -2
  674. package/dist/tag/createTag.d.ts.map +1 -1
  675. package/dist/tag/createTagGroup.d.ts +5 -5
  676. package/dist/tag/createTagGroup.d.ts.map +1 -1
  677. package/dist/tag/index.d.ts +2 -2
  678. package/dist/tag/index.d.ts.map +1 -1
  679. package/dist/tag/index.js +2 -0
  680. package/dist/tag/index.jsx +2 -0
  681. package/dist/textfield/createTextField.d.ts +17 -11
  682. package/dist/textfield/createTextField.d.ts.map +1 -1
  683. package/dist/textfield/index.d.ts +1 -1
  684. package/dist/textfield/index.d.ts.map +1 -1
  685. package/dist/textfield/index.js +2 -0
  686. package/dist/textfield/index.jsx +2 -0
  687. package/dist/toast/createToast.d.ts +2 -2
  688. package/dist/toast/createToast.d.ts.map +1 -1
  689. package/dist/toast/createToastRegion.d.ts +5 -3
  690. package/dist/toast/createToastRegion.d.ts.map +1 -1
  691. package/dist/toast/index.d.ts +2 -2
  692. package/dist/toast/index.d.ts.map +1 -1
  693. package/dist/toast/index.js +2 -0
  694. package/dist/toast/index.jsx +2 -0
  695. package/dist/toggle/createToggle.d.ts +13 -9
  696. package/dist/toggle/createToggle.d.ts.map +1 -1
  697. package/dist/toggle/createToggleState.d.ts +2 -2
  698. package/dist/toggle/createToggleState.d.ts.map +1 -1
  699. package/dist/toggle/index.d.ts +4 -4
  700. package/dist/toggle/index.d.ts.map +1 -1
  701. package/dist/toggle/index.js +3 -0
  702. package/dist/toggle/index.jsx +3 -0
  703. package/dist/toolbar/createToolbar.d.ts +9 -9
  704. package/dist/toolbar/createToolbar.d.ts.map +1 -1
  705. package/dist/toolbar/index.d.ts +1 -1
  706. package/dist/toolbar/index.d.ts.map +1 -1
  707. package/dist/toolbar/index.js +2 -0
  708. package/dist/toolbar/index.jsx +2 -0
  709. package/dist/tooltip/createTooltip.d.ts +5 -5
  710. package/dist/tooltip/createTooltip.d.ts.map +1 -1
  711. package/dist/tooltip/createTooltipTrigger.d.ts +10 -5
  712. package/dist/tooltip/createTooltipTrigger.d.ts.map +1 -1
  713. package/dist/tooltip/index.d.ts +2 -2
  714. package/dist/tooltip/index.js +2 -0
  715. package/dist/tooltip/index.jsx +2 -0
  716. package/dist/tree/createTree.d.ts +8 -4
  717. package/dist/tree/createTree.d.ts.map +1 -1
  718. package/dist/tree/createTreeItem.d.ts +4 -4
  719. package/dist/tree/createTreeItem.d.ts.map +1 -1
  720. package/dist/tree/createTreeSelectionCheckbox.d.ts +3 -3
  721. package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -1
  722. package/dist/tree/index.d.ts +4 -4
  723. package/dist/tree/index.js +2 -0
  724. package/dist/tree/index.jsx +2 -0
  725. package/dist/tree/types.d.ts +20 -6
  726. package/dist/tree/types.d.ts.map +1 -1
  727. package/dist/utils/animation.d.ts +60 -0
  728. package/dist/utils/animation.d.ts.map +1 -0
  729. package/dist/utils/createDescription.d.ts +2 -2
  730. package/dist/utils/createDescription.d.ts.map +1 -1
  731. package/dist/utils/dom.d.ts +48 -2
  732. package/dist/utils/dom.d.ts.map +1 -1
  733. package/dist/utils/env.d.ts.map +1 -1
  734. package/dist/utils/focus.d.ts +1 -1
  735. package/dist/utils/focus.d.ts.map +1 -1
  736. package/dist/utils/geometry.d.ts.map +1 -1
  737. package/dist/utils/index.d.ts +15 -12
  738. package/dist/utils/index.d.ts.map +1 -1
  739. package/dist/utils/index.js +5 -0
  740. package/dist/utils/index.jsx +5 -0
  741. package/dist/utils/keyboard.d.ts +17 -0
  742. package/dist/utils/keyboard.d.ts.map +1 -0
  743. package/dist/utils/mergeProps.d.ts.map +1 -1
  744. package/dist/utils/reactivity.d.ts +1 -1
  745. package/dist/utils/scrollIntoView.d.ts +30 -0
  746. package/dist/utils/scrollIntoView.d.ts.map +1 -0
  747. package/dist/visually-hidden/createVisuallyHidden.d.ts +2 -2
  748. package/dist/visually-hidden/createVisuallyHidden.d.ts.map +1 -1
  749. package/dist/visually-hidden/index.d.ts +1 -1
  750. package/dist/visually-hidden/index.js +2 -0
  751. package/dist/visually-hidden/index.jsx +2 -0
  752. package/package.json +334 -33
  753. package/src/actiongroup/createActionGroup.ts +101 -91
  754. package/src/actiongroup/index.ts +1 -1
  755. package/src/autocomplete/createAutocomplete.ts +177 -148
  756. package/src/autocomplete/index.ts +1 -1
  757. package/src/breadcrumbs/createBreadcrumbs.ts +33 -42
  758. package/src/breadcrumbs/index.ts +1 -1
  759. package/src/button/createButton.ts +102 -73
  760. package/src/button/createToggleButton.ts +10 -10
  761. package/src/button/createToggleButtonGroup.ts +25 -32
  762. package/src/button/index.ts +6 -9
  763. package/src/button/types.ts +18 -12
  764. package/src/calendar/createCalendar.ts +64 -29
  765. package/src/calendar/createCalendarCell.ts +115 -46
  766. package/src/calendar/createCalendarGrid.ts +97 -41
  767. package/src/calendar/createCalendarMonthPicker.ts +105 -0
  768. package/src/calendar/createCalendarYearPicker.ts +144 -0
  769. package/src/calendar/createRangeCalendar.ts +68 -31
  770. package/src/calendar/createRangeCalendarCell.ts +92 -31
  771. package/src/calendar/index.ts +21 -8
  772. package/src/calendar/intl/index.ts +210 -0
  773. package/src/calendar/utils.ts +231 -0
  774. package/src/checkbox/createCheckbox.ts +23 -21
  775. package/src/checkbox/createCheckboxGroup.ts +68 -44
  776. package/src/checkbox/createCheckboxGroupItem.ts +26 -41
  777. package/src/checkbox/createCheckboxGroupState.ts +3 -22
  778. package/src/checkbox/index.ts +8 -10
  779. package/src/collections/index.ts +33 -29
  780. package/src/color/createColorArea.ts +232 -154
  781. package/src/color/createColorField.ts +107 -58
  782. package/src/color/createColorSlider.ts +231 -73
  783. package/src/color/createColorSwatch.ts +38 -13
  784. package/src/color/createColorWheel.ts +208 -83
  785. package/src/color/index.ts +6 -6
  786. package/src/color/types.ts +98 -16
  787. package/src/combobox/createComboBox.ts +157 -100
  788. package/src/combobox/index.ts +1 -1
  789. package/src/combobox/intl/index.ts +5 -5
  790. package/src/datepicker/createDateField.ts +192 -39
  791. package/src/datepicker/createDatePicker.ts +260 -67
  792. package/src/datepicker/createDatePickerGroup.ts +149 -0
  793. package/src/datepicker/createDateRangePicker.ts +105 -57
  794. package/src/datepicker/createDateSegment.ts +188 -96
  795. package/src/datepicker/createTimeField.ts +38 -34
  796. package/src/datepicker/createTimeSegment.ts +67 -85
  797. package/src/datepicker/index.ts +13 -14
  798. package/src/dialog/createDialog.ts +45 -38
  799. package/src/dialog/index.ts +2 -2
  800. package/src/dialog/types.ts +4 -4
  801. package/src/disclosure/createDisclosure.ts +138 -33
  802. package/src/disclosure/createDisclosureGroup.ts +8 -21
  803. package/src/disclosure/index.ts +2 -2
  804. package/src/dnd/createDrag.ts +19 -25
  805. package/src/dnd/createDraggableCollection.ts +4 -4
  806. package/src/dnd/createDraggableItem.ts +20 -19
  807. package/src/dnd/createDrop.ts +42 -51
  808. package/src/dnd/createDroppableCollection.ts +293 -173
  809. package/src/dnd/createDroppableItem.ts +34 -34
  810. package/src/dnd/index.ts +23 -12
  811. package/src/dnd/types.ts +4 -7
  812. package/src/dnd/utils.ts +58 -47
  813. package/src/focus/FocusScope.tsx +301 -176
  814. package/src/focus/createAutoFocus.ts +4 -20
  815. package/src/focus/createFocusRestore.ts +15 -28
  816. package/src/focus/createVirtualFocus.ts +20 -36
  817. package/src/focus/index.ts +4 -8
  818. package/src/form/createFormReset.ts +4 -4
  819. package/src/form/createFormValidation.ts +23 -39
  820. package/src/form/index.ts +2 -5
  821. package/src/grid/GridKeyboardDelegate.ts +30 -30
  822. package/src/grid/createGrid.ts +36 -36
  823. package/src/grid/createGridCell.ts +18 -18
  824. package/src/grid/createGridRow.ts +14 -14
  825. package/src/grid/index.ts +5 -5
  826. package/src/grid/types.ts +8 -8
  827. package/src/gridlist/createGridList.ts +172 -64
  828. package/src/gridlist/createGridListItem.ts +98 -121
  829. package/src/gridlist/createGridListSection.ts +54 -0
  830. package/src/gridlist/createGridListSelectionCheckbox.ts +12 -9
  831. package/src/gridlist/index.ts +7 -4
  832. package/src/gridlist/types.ts +58 -7
  833. package/src/i18n/createCollator.ts +5 -18
  834. package/src/i18n/createDateFormatter.ts +5 -13
  835. package/src/i18n/createFilter.ts +11 -24
  836. package/src/i18n/createNumberFormatter.ts +4 -6
  837. package/src/i18n/createStringFormatter.ts +19 -15
  838. package/src/i18n/index.ts +8 -11
  839. package/src/i18n/locale.tsx +15 -40
  840. package/src/i18n/utils.ts +35 -39
  841. package/src/index.ts +111 -172
  842. package/src/interactions/FocusableProvider.tsx +3 -7
  843. package/src/interactions/PressEvent.ts +18 -4
  844. package/src/interactions/createFocus.ts +12 -8
  845. package/src/interactions/createFocusRing.ts +21 -19
  846. package/src/interactions/createFocusWithin.ts +20 -13
  847. package/src/interactions/createFocusable.ts +15 -16
  848. package/src/interactions/createHover.ts +70 -55
  849. package/src/interactions/createInteractionModality.ts +96 -94
  850. package/src/interactions/createKeyboard.ts +12 -2
  851. package/src/interactions/createLongPress.ts +23 -23
  852. package/src/interactions/createMove.ts +72 -62
  853. package/src/interactions/createPress.ts +192 -92
  854. package/src/interactions/index.ts +24 -16
  855. package/src/label/createField.ts +18 -19
  856. package/src/label/createLabel.ts +18 -30
  857. package/src/label/createLabels.ts +8 -12
  858. package/src/label/index.ts +5 -5
  859. package/src/landmark/createLandmark.ts +30 -51
  860. package/src/landmark/index.ts +1 -1
  861. package/src/link/createLink.ts +83 -56
  862. package/src/link/index.ts +1 -1
  863. package/src/listbox/createListBox.ts +198 -66
  864. package/src/listbox/createOption.ts +112 -71
  865. package/src/listbox/index.ts +2 -6
  866. package/src/live-announcer/announce.ts +44 -71
  867. package/src/live-announcer/index.ts +1 -1
  868. package/src/menu/createMenu.ts +171 -65
  869. package/src/menu/createMenuItem.ts +315 -51
  870. package/src/menu/createMenuTrigger.ts +15 -15
  871. package/src/menu/index.ts +3 -12
  872. package/src/meter/createMeter.ts +7 -15
  873. package/src/meter/index.ts +1 -1
  874. package/src/numberfield/createNumberField.ts +205 -80
  875. package/src/numberfield/index.ts +1 -1
  876. package/src/overlays/ariaHideOutside.ts +14 -10
  877. package/src/overlays/createInteractOutside.ts +21 -18
  878. package/src/overlays/createModal.tsx +17 -17
  879. package/src/overlays/createOverlay.ts +38 -8
  880. package/src/overlays/createOverlayTrigger.ts +16 -16
  881. package/src/overlays/createPreventScroll.ts +46 -24
  882. package/src/overlays/index.ts +6 -17
  883. package/src/popover/calculatePosition.ts +134 -124
  884. package/src/popover/createOverlayPosition.ts +55 -40
  885. package/src/popover/createPopover.ts +42 -17
  886. package/src/popover/index.ts +3 -3
  887. package/src/progress/createProgressBar.ts +31 -32
  888. package/src/progress/index.ts +1 -1
  889. package/src/radio/createRadio.ts +114 -75
  890. package/src/radio/createRadioGroup.ts +83 -77
  891. package/src/radio/createRadioGroupState.ts +7 -31
  892. package/src/radio/index.ts +3 -8
  893. package/src/searchfield/createSearchField.ts +57 -29
  894. package/src/searchfield/index.ts +2 -2
  895. package/src/select/createHiddenSelect.tsx +57 -44
  896. package/src/select/createSelect.ts +146 -73
  897. package/src/select/index.ts +2 -7
  898. package/src/selection/DOMLayoutDelegate.ts +102 -0
  899. package/src/selection/ListKeyboardDelegate.ts +398 -0
  900. package/src/selection/constants.ts +16 -0
  901. package/src/selection/createCollectionRowInteraction.ts +209 -0
  902. package/src/selection/createScrollIntoViewOnFocus.ts +65 -0
  903. package/src/selection/createSelectableCollection.ts +645 -0
  904. package/src/selection/createSelectableItem.ts +498 -0
  905. package/src/selection/createSelectableList.ts +93 -0
  906. package/src/selection/createTypeSelect.ts +120 -59
  907. package/src/selection/index.ts +32 -1
  908. package/src/selection/selectItem.ts +80 -0
  909. package/src/selection/utils.ts +82 -0
  910. package/src/separator/createSeparator.ts +20 -25
  911. package/src/separator/index.ts +1 -1
  912. package/src/slider/createSlider.ts +128 -112
  913. package/src/slider/index.ts +2 -2
  914. package/src/ssr/index.tsx +38 -46
  915. package/src/steplist/createStepList.ts +106 -0
  916. package/src/steplist/index.ts +8 -0
  917. package/src/switch/createSwitch.ts +19 -14
  918. package/src/switch/index.ts +1 -1
  919. package/src/table/createTable.ts +192 -95
  920. package/src/table/createTableCell.ts +17 -16
  921. package/src/table/createTableColumnHeader.ts +67 -20
  922. package/src/table/createTableColumnResize.ts +256 -0
  923. package/src/table/createTableHeaderRow.ts +7 -7
  924. package/src/table/createTableRow.ts +206 -91
  925. package/src/table/createTableRowGroup.ts +5 -7
  926. package/src/table/createTableSelectAllCheckbox.ts +14 -14
  927. package/src/table/createTableSelectionCheckbox.ts +8 -8
  928. package/src/table/index.ts +14 -9
  929. package/src/table/types.ts +43 -7
  930. package/src/tabs/createTabs.ts +123 -111
  931. package/src/tabs/index.ts +1 -1
  932. package/src/tag/createTag.ts +57 -50
  933. package/src/tag/createTagGroup.ts +47 -41
  934. package/src/tag/index.ts +2 -6
  935. package/src/textfield/createTextField.ts +67 -35
  936. package/src/textfield/index.ts +1 -5
  937. package/src/toast/createToast.ts +29 -26
  938. package/src/toast/createToastRegion.ts +169 -26
  939. package/src/toast/index.ts +2 -6
  940. package/src/toggle/createToggle.ts +115 -53
  941. package/src/toggle/createToggleState.ts +2 -10
  942. package/src/toggle/index.ts +4 -5
  943. package/src/toolbar/createToolbar.ts +214 -230
  944. package/src/toolbar/index.ts +1 -1
  945. package/src/tooltip/createTooltip.ts +11 -24
  946. package/src/tooltip/createTooltipTrigger.ts +61 -49
  947. package/src/tooltip/index.ts +2 -2
  948. package/src/tree/createTree.ts +128 -72
  949. package/src/tree/createTreeItem.ts +120 -135
  950. package/src/tree/createTreeSelectionCheckbox.ts +11 -8
  951. package/src/tree/index.ts +4 -4
  952. package/src/tree/types.ts +20 -6
  953. package/src/utils/animation.ts +151 -0
  954. package/src/utils/createDescription.ts +6 -23
  955. package/src/utils/dom.ts +265 -68
  956. package/src/utils/env.ts +9 -11
  957. package/src/utils/events.ts +7 -7
  958. package/src/utils/filterDOMProps.ts +49 -49
  959. package/src/utils/focus.ts +60 -68
  960. package/src/utils/geometry.ts +1 -4
  961. package/src/utils/globalListeners.ts +9 -9
  962. package/src/utils/index.ts +20 -22
  963. package/src/utils/keyboard.ts +25 -0
  964. package/src/utils/mergeProps.ts +49 -15
  965. package/src/utils/platform.ts +2 -2
  966. package/src/utils/reactivity.ts +3 -3
  967. package/src/utils/scrollIntoView.ts +181 -0
  968. package/src/utils/textSelection.ts +16 -16
  969. package/src/visually-hidden/createVisuallyHidden.ts +16 -28
  970. package/src/visually-hidden/index.ts +1 -1
  971. package/dist/i18n/NumberFormatter.d.ts +0 -43
  972. package/dist/i18n/NumberFormatter.d.ts.map +0 -1
  973. package/dist/index.js.map +0 -1
  974. package/dist/index.ssr.js +0 -17082
  975. package/dist/index.ssr.js.map +0 -1
  976. package/src/i18n/NumberFormatter.ts +0 -266
@@ -0,0 +1,196 @@
1
+ import { createId, getOwnerDocument } from "../ssr/index.js";
2
+ import { createEffect, createSignal, onCleanup } from "solid-js";
3
+ //#region src/autocomplete/createAutocomplete.ts
4
+ /**
5
+ * createAutocomplete - Accessibility hook for autocomplete components
6
+ *
7
+ * Provides keyboard navigation, virtual focus via aria-activedescendant,
8
+ * and filtering capabilities for autocomplete inputs.
9
+ *
10
+ * Based on @react-aria/autocomplete useAutocomplete.
11
+ */
12
+ function toKeyboardEventInit(e) {
13
+ return {
14
+ key: e.key,
15
+ code: e.code,
16
+ location: e.location,
17
+ repeat: e.repeat,
18
+ isComposing: e.isComposing,
19
+ ctrlKey: e.ctrlKey,
20
+ shiftKey: e.shiftKey,
21
+ altKey: e.altKey,
22
+ metaKey: e.metaKey,
23
+ bubbles: e.bubbles,
24
+ cancelable: e.cancelable
25
+ };
26
+ }
27
+ const AUTOCOMPLETE_FOCUS_EVENT = "autocomplete:focus";
28
+ const AUTOCOMPLETE_CLEAR_FOCUS_EVENT = "autocomplete:clearfocus";
29
+ /**
30
+ * Provides the behavior and accessibility implementation for an autocomplete component.
31
+ * An autocomplete combines a text input with a collection, allowing users to filter
32
+ * the collection's contents to match a query.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * const state = createAutocompleteState({ defaultInputValue: '' });
37
+ * let inputRef, collectionRef;
38
+ *
39
+ * const { inputProps, collectionProps, filter } = createAutocomplete({
40
+ * inputRef: () => inputRef,
41
+ * collectionRef: () => collectionRef,
42
+ * filter: (textValue, inputValue) =>
43
+ * textValue.toLowerCase().includes(inputValue.toLowerCase()),
44
+ * }, state);
45
+ *
46
+ * return (
47
+ * <div>
48
+ * <input ref={inputRef} {...inputProps} />
49
+ * <ul ref={collectionRef} {...collectionProps}>
50
+ * {items.filter(item => filter?.(item.name) ?? true).map(item => (
51
+ * <li key={item.id}>{item.name}</li>
52
+ * ))}
53
+ * </ul>
54
+ * </div>
55
+ * );
56
+ * ```
57
+ */
58
+ function createAutocomplete(props, state) {
59
+ const { inputRef, collectionRef, filter, collectionId: collectionIdProp, collectionAriaLabel, disableAutoFocusFirst = false, disableVirtualFocus = false } = props;
60
+ const collectionId = collectionIdProp ?? createId();
61
+ const [shouldUseVirtualFocus] = createSignal(!disableVirtualFocus);
62
+ const [autoFocusOnMount, setAutoFocusOnMount] = createSignal(false);
63
+ let lastInputType = "";
64
+ const handleBeforeInput = (e) => {
65
+ lastInputType = e.inputType || "";
66
+ };
67
+ createEffect(() => {
68
+ const input = inputRef();
69
+ if (input) {
70
+ input.addEventListener("beforeinput", handleBeforeInput);
71
+ onCleanup(() => {
72
+ input.removeEventListener("beforeinput", handleBeforeInput);
73
+ });
74
+ }
75
+ });
76
+ const focusFirstItem = () => {
77
+ const collection = collectionRef();
78
+ if (!collection) {
79
+ setAutoFocusOnMount(true);
80
+ return;
81
+ }
82
+ collection.dispatchEvent(new CustomEvent(AUTOCOMPLETE_FOCUS_EVENT, {
83
+ cancelable: true,
84
+ bubbles: true,
85
+ detail: { focusStrategy: "first" }
86
+ }));
87
+ };
88
+ const clearVirtualFocus = (clearFocusKey = false) => {
89
+ setAutoFocusOnMount(false);
90
+ state.setFocusedNodeId(null);
91
+ const collection = collectionRef();
92
+ if (collection) collection.dispatchEvent(new CustomEvent(AUTOCOMPLETE_CLEAR_FOCUS_EVENT, {
93
+ cancelable: true,
94
+ bubbles: true,
95
+ detail: { clearFocusKey }
96
+ }));
97
+ };
98
+ const onChange = (value) => {
99
+ if ((lastInputType === "insertText" || lastInputType === "insertCompositionText" || lastInputType === "insertFromComposition") && !disableAutoFocusFirst) focusFirstItem();
100
+ else if (lastInputType && (lastInputType.includes("insert") || lastInputType.includes("delete") || lastInputType.includes("history"))) clearVirtualFocus(true);
101
+ state.setInputValue(value);
102
+ };
103
+ const onKeyDown = (e) => {
104
+ if ("isComposing" in e && e.isComposing) return;
105
+ const focusedNodeId = state.focusedNodeId();
106
+ const collection = collectionRef();
107
+ const ownerDocument = getOwnerDocument(inputRef() ?? collection);
108
+ switch (e.key) {
109
+ case "Escape":
110
+ if (e.defaultPrevented) return;
111
+ break;
112
+ case " ": return;
113
+ case "Tab": return;
114
+ case "ArrowUp":
115
+ case "ArrowDown":
116
+ case "Home":
117
+ case "End":
118
+ case "PageUp":
119
+ case "PageDown":
120
+ e.preventDefault();
121
+ if (collection) collection.dispatchEvent(new CustomEvent(AUTOCOMPLETE_FOCUS_EVENT, {
122
+ cancelable: true,
123
+ bubbles: true
124
+ }));
125
+ break;
126
+ case "ArrowLeft":
127
+ case "ArrowRight":
128
+ if (!focusedNodeId) {
129
+ e.stopPropagation();
130
+ return;
131
+ }
132
+ break;
133
+ case "Enter":
134
+ if (focusedNodeId) {
135
+ const item = ownerDocument?.getElementById(focusedNodeId);
136
+ if (item) {
137
+ item.click();
138
+ e.preventDefault();
139
+ }
140
+ }
141
+ return;
142
+ }
143
+ if (!e.defaultPrevented && collection) {
144
+ e.stopPropagation();
145
+ let shouldPerformDefaultAction = true;
146
+ if (focusedNodeId) {
147
+ const item = ownerDocument?.getElementById(focusedNodeId);
148
+ if (item) shouldPerformDefaultAction = item.dispatchEvent(new KeyboardEvent(e.type, toKeyboardEventInit(e)));
149
+ } else shouldPerformDefaultAction = collection.dispatchEvent(new KeyboardEvent(e.type, toKeyboardEventInit(e)));
150
+ if (shouldPerformDefaultAction && (e.key === "ArrowLeft" || e.key === "ArrowRight")) clearVirtualFocus();
151
+ }
152
+ };
153
+ const onFocus = (e) => {
154
+ if (!e.isTrusted) return;
155
+ const focusedNodeId = state.focusedNodeId();
156
+ if (focusedNodeId) {
157
+ if (document.getElementById(focusedNodeId)) {}
158
+ }
159
+ };
160
+ const onBlur = (e) => {
161
+ if (!e.isTrusted) return;
162
+ };
163
+ const filterFn = filter ? (textValue) => filter(textValue, state.inputValue()) : void 0;
164
+ return {
165
+ inputProps: {
166
+ value: state.inputValue,
167
+ onChange,
168
+ onKeyDown,
169
+ onFocus,
170
+ onBlur,
171
+ get "aria-activedescendant"() {
172
+ return () => shouldUseVirtualFocus() ? state.focusedNodeId() ?? void 0 : void 0;
173
+ },
174
+ "aria-controls": collectionId,
175
+ "aria-autocomplete": "list",
176
+ enterKeyHint: "go",
177
+ autoCorrect: "off",
178
+ spellCheck: "false",
179
+ autoComplete: "off"
180
+ },
181
+ collectionProps: {
182
+ id: collectionId,
183
+ "aria-label": collectionAriaLabel,
184
+ shouldUseVirtualFocus: shouldUseVirtualFocus(),
185
+ disallowTypeAhead: shouldUseVirtualFocus(),
186
+ get autoFocus() {
187
+ return autoFocusOnMount() ? "first" : false;
188
+ }
189
+ },
190
+ filter: filterFn
191
+ };
192
+ }
193
+ //#endregion
194
+ export { AUTOCOMPLETE_FOCUS_EVENT as n, createAutocomplete as r, AUTOCOMPLETE_CLEAR_FOCUS_EVENT as t };
195
+
196
+ //# sourceMappingURL=autocomplete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete.js","names":["inputEvent"],"sources":["../../src/autocomplete/createAutocomplete.ts"],"sourcesContent":["/**\n * createAutocomplete - Accessibility hook for autocomplete components\n *\n * Provides keyboard navigation, virtual focus via aria-activedescendant,\n * and filtering capabilities for autocomplete inputs.\n *\n * Based on @react-aria/autocomplete useAutocomplete.\n */\n\nimport { createSignal, createEffect, onCleanup, type Accessor } from \"solid-js\";\nimport { createId, getOwnerDocument } from \"../ssr\";\nimport { type AutocompleteState } from \"@proyecto-viviana/solid-stately\";\n\nexport interface CollectionOptions {\n /** The id of the collection element. */\n id?: string;\n /** Accessible label for the collection. */\n \"aria-label\"?: string;\n /** Whether the collection items should use virtual focus instead of being focused directly. */\n shouldUseVirtualFocus: boolean;\n /** Whether typeahead is disabled. */\n disallowTypeAhead: boolean;\n /** Whether and where to focus an item when the collection mounts. */\n autoFocus?: boolean | \"first\" | \"last\";\n}\n\nexport interface AutocompleteInputProps {\n /** Current input value. */\n value: Accessor<string>;\n /** Handler for input value changes. */\n onChange: (value: string) => void;\n /** Handler for key events. */\n onKeyDown: (e: KeyboardEvent) => void;\n /** Handler for focus events. */\n onFocus: (e: FocusEvent) => void;\n /** Handler for blur events. */\n onBlur: (e: FocusEvent) => void;\n /** The id of the currently focused item for aria-activedescendant. */\n \"aria-activedescendant\": Accessor<string | undefined>;\n /** The id of the controlled collection. */\n \"aria-controls\": string;\n /** Autocomplete type. */\n \"aria-autocomplete\": \"list\" | \"none\" | \"inline\" | \"both\";\n /** Enter key hint for mobile keyboards. */\n enterKeyHint: \"go\";\n /** Disable autocorrect. */\n autoCorrect: \"off\";\n /** Disable spell check. */\n spellCheck: \"false\";\n /** Disable browser autocomplete. */\n autoComplete: \"off\";\n}\n\nexport interface AriaAutocompleteOptions<_T = unknown> {\n /** Ref accessor for the input element. */\n inputRef: Accessor<HTMLInputElement | undefined>;\n /** Ref accessor for the collection element. */\n collectionRef: Accessor<HTMLElement | undefined>;\n /** Optional id override for the controlled collection element. */\n collectionId?: string;\n /** Optional accessible name for the controlled collection element. */\n collectionAriaLabel?: string;\n /**\n * An optional filter function used to determine if an option should be included.\n * @param textValue - The text value of the item\n * @param inputValue - The current input value\n */\n filter?: (textValue: string, inputValue: string) => boolean;\n /**\n * Whether to focus the first item after filtering.\n * @default false\n */\n disableAutoFocusFirst?: boolean;\n /**\n * Whether to disable virtual focus (aria-activedescendant).\n * @default false\n */\n disableVirtualFocus?: boolean;\n}\n\nexport interface AutocompleteAria<_T = unknown> {\n /** Props for the autocomplete input element. */\n inputProps: AutocompleteInputProps;\n /** Props for the collection (ListBox/Menu). */\n collectionProps: CollectionOptions;\n /** A filter function that returns if the item should be shown. */\n filter?: (textValue: string) => boolean;\n}\n\nfunction toKeyboardEventInit(e: KeyboardEvent): KeyboardEventInit {\n return {\n key: e.key,\n code: e.code,\n location: e.location,\n repeat: e.repeat,\n isComposing: e.isComposing,\n ctrlKey: e.ctrlKey,\n shiftKey: e.shiftKey,\n altKey: e.altKey,\n metaKey: e.metaKey,\n bubbles: e.bubbles,\n cancelable: e.cancelable,\n };\n}\n\n// Custom event names for collection communication\nexport const AUTOCOMPLETE_FOCUS_EVENT = \"autocomplete:focus\";\nexport const AUTOCOMPLETE_CLEAR_FOCUS_EVENT = \"autocomplete:clearfocus\";\n\n/**\n * Provides the behavior and accessibility implementation for an autocomplete component.\n * An autocomplete combines a text input with a collection, allowing users to filter\n * the collection's contents to match a query.\n *\n * @example\n * ```tsx\n * const state = createAutocompleteState({ defaultInputValue: '' });\n * let inputRef, collectionRef;\n *\n * const { inputProps, collectionProps, filter } = createAutocomplete({\n * inputRef: () => inputRef,\n * collectionRef: () => collectionRef,\n * filter: (textValue, inputValue) =>\n * textValue.toLowerCase().includes(inputValue.toLowerCase()),\n * }, state);\n *\n * return (\n * <div>\n * <input ref={inputRef} {...inputProps} />\n * <ul ref={collectionRef} {...collectionProps}>\n * {items.filter(item => filter?.(item.name) ?? true).map(item => (\n * <li key={item.id}>{item.name}</li>\n * ))}\n * </ul>\n * </div>\n * );\n * ```\n */\nexport function createAutocomplete<T = unknown>(\n props: AriaAutocompleteOptions<T>,\n state: AutocompleteState,\n): AutocompleteAria<T> {\n const {\n inputRef,\n collectionRef,\n filter,\n collectionId: collectionIdProp,\n collectionAriaLabel,\n disableAutoFocusFirst = false,\n disableVirtualFocus = false,\n } = props;\n\n const collectionId = collectionIdProp ?? createId();\n const [shouldUseVirtualFocus] = createSignal(!disableVirtualFocus);\n // When the first item should be focused but the collection hasn't mounted yet,\n // defer it by threading autoFocus through collectionProps so the collection\n // focuses on mount (mirrors upstream's autoFocusOnMount state).\n const [autoFocusOnMount, setAutoFocusOnMount] = createSignal(false);\n let lastInputType = \"\";\n\n // Track the input type for determining focus behavior. We listen to\n // `beforeinput` (not `input`) so `lastInputType` is set before the input's\n // `onChange` runs, mirroring @react-aria/autocomplete.\n const handleBeforeInput = (e: Event) => {\n const inputEvent = e as InputEvent;\n lastInputType = inputEvent.inputType || \"\";\n };\n\n // Set up beforeinput event listener\n createEffect(() => {\n const input = inputRef();\n if (input) {\n input.addEventListener(\"beforeinput\", handleBeforeInput);\n onCleanup(() => {\n input.removeEventListener(\"beforeinput\", handleBeforeInput);\n });\n }\n });\n\n // Focus first item in collection\n const focusFirstItem = () => {\n const collection = collectionRef();\n if (!collection) {\n // Collection isn't mounted yet — defer focusing the first item to mount\n // time via collectionProps.autoFocus instead of firing a focus event into\n // a not-yet-rendered collection.\n setAutoFocusOnMount(true);\n return;\n }\n collection.dispatchEvent(\n new CustomEvent(AUTOCOMPLETE_FOCUS_EVENT, {\n cancelable: true,\n bubbles: true,\n detail: { focusStrategy: \"first\" },\n }),\n );\n };\n\n // Clear virtual focus\n const clearVirtualFocus = (clearFocusKey = false) => {\n setAutoFocusOnMount(false);\n state.setFocusedNodeId(null);\n const collection = collectionRef();\n if (collection) {\n collection.dispatchEvent(\n new CustomEvent(AUTOCOMPLETE_CLEAR_FOCUS_EVENT, {\n cancelable: true,\n bubbles: true,\n detail: { clearFocusKey },\n }),\n );\n }\n };\n\n // Handle input value changes\n const onChange = (value: string) => {\n // Focus first item when typing forward, clear when backspacing/pasting.\n // IME composition (e.g. CJK input) reports 'insertCompositionText'/\n // 'insertFromComposition' instead of 'insertText'; treat those as forward\n // typing so the first item still gets virtual focus.\n if (\n (lastInputType === \"insertText\" ||\n lastInputType === \"insertCompositionText\" ||\n lastInputType === \"insertFromComposition\") &&\n !disableAutoFocusFirst\n ) {\n focusFirstItem();\n } else if (\n lastInputType &&\n (lastInputType.includes(\"insert\") ||\n lastInputType.includes(\"delete\") ||\n lastInputType.includes(\"history\"))\n ) {\n clearVirtualFocus(true);\n }\n\n state.setInputValue(value);\n };\n\n // Handle keyboard navigation\n const onKeyDown = (e: KeyboardEvent) => {\n if (\"isComposing\" in e && e.isComposing) {\n return;\n }\n\n const focusedNodeId = state.focusedNodeId();\n const collection = collectionRef();\n const ownerDocument = getOwnerDocument(inputRef() ?? collection);\n\n switch (e.key) {\n case \"Escape\":\n // Let the input handle Escape (e.g., clear value)\n if (e.defaultPrevented) {\n return;\n }\n break;\n\n case \" \":\n // Space shouldn't trigger item action\n return;\n\n case \"Tab\":\n // Let Tab propagate normally for focus management\n return;\n\n case \"ArrowUp\":\n case \"ArrowDown\":\n case \"Home\":\n case \"End\":\n case \"PageUp\":\n case \"PageDown\": {\n // Prevent cursor movement in input\n e.preventDefault();\n\n // Dispatch focus event to collection\n if (collection) {\n collection.dispatchEvent(\n new CustomEvent(AUTOCOMPLETE_FOCUS_EVENT, {\n cancelable: true,\n bubbles: true,\n }),\n );\n }\n break;\n }\n\n case \"ArrowLeft\":\n case \"ArrowRight\":\n // With no virtual focus, just let the arrow move the text cursor; stop\n // propagation so it doesn't leak into the collection. With virtual focus,\n // fall through to dispatch the key to the focused item below, then clear\n // the active descendant only after the item has seen it.\n if (!focusedNodeId) {\n e.stopPropagation();\n return;\n }\n break;\n\n case \"Enter\":\n // Trigger click on focused item\n if (focusedNodeId) {\n const item = ownerDocument?.getElementById(focusedNodeId);\n if (item) {\n item.click();\n e.preventDefault();\n }\n }\n return;\n }\n\n // Forward keyboard events to the focused item (or the collection when there\n // is no virtual focus) so the collection can act on them, e.g. onAction.\n if (!e.defaultPrevented && collection) {\n e.stopPropagation();\n\n let shouldPerformDefaultAction = true;\n if (focusedNodeId) {\n const item = ownerDocument?.getElementById(focusedNodeId);\n if (item) {\n shouldPerformDefaultAction = item.dispatchEvent(\n new KeyboardEvent(e.type, toKeyboardEventInit(e)),\n );\n }\n } else {\n shouldPerformDefaultAction = collection.dispatchEvent(\n new KeyboardEvent(e.type, toKeyboardEventInit(e)),\n );\n }\n\n // After the focused item has seen ArrowLeft/ArrowRight, clear the active\n // descendant so SR announcements aren't interrupted, but retain the\n // collection's focused key so navigation restarts where it left off. If\n // the item consumed the key (e.g. an expandable row collapsing), it\n // cancels the event and we keep virtual focus.\n if (shouldPerformDefaultAction && (e.key === \"ArrowLeft\" || e.key === \"ArrowRight\")) {\n clearVirtualFocus();\n }\n }\n };\n\n // Handle focus events\n const onFocus = (e: FocusEvent) => {\n if (!e.isTrusted) return;\n\n // Restore virtual focus when refocusing input\n const focusedNodeId = state.focusedNodeId();\n if (focusedNodeId) {\n const item = document.getElementById(focusedNodeId);\n if (item) {\n // Item still exists, keep focus on it\n }\n }\n };\n\n const onBlur = (e: FocusEvent) => {\n if (!e.isTrusted) return;\n // Virtual focus blur handling would go here\n };\n\n // Create filter function\n const filterFn = filter\n ? (textValue: string) => filter(textValue, state.inputValue())\n : undefined;\n\n return {\n inputProps: {\n value: state.inputValue,\n onChange,\n onKeyDown,\n onFocus,\n onBlur,\n get \"aria-activedescendant\"() {\n return () => (shouldUseVirtualFocus() ? (state.focusedNodeId() ?? undefined) : undefined);\n },\n \"aria-controls\": collectionId,\n \"aria-autocomplete\": \"list\",\n enterKeyHint: \"go\",\n autoCorrect: \"off\",\n spellCheck: \"false\",\n autoComplete: \"off\",\n },\n collectionProps: {\n id: collectionId,\n \"aria-label\": collectionAriaLabel,\n shouldUseVirtualFocus: shouldUseVirtualFocus(),\n disallowTypeAhead: shouldUseVirtualFocus(),\n get autoFocus() {\n return autoFocusOnMount() ? \"first\" : false;\n },\n },\n filter: filterFn,\n };\n}\n"],"mappings":"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"}
@@ -0,0 +1,196 @@
1
+ import { createId, getOwnerDocument } from "../ssr/index.jsx";
2
+ import { createEffect, createSignal, onCleanup } from "solid-js";
3
+ //#region src/autocomplete/createAutocomplete.ts
4
+ /**
5
+ * createAutocomplete - Accessibility hook for autocomplete components
6
+ *
7
+ * Provides keyboard navigation, virtual focus via aria-activedescendant,
8
+ * and filtering capabilities for autocomplete inputs.
9
+ *
10
+ * Based on @react-aria/autocomplete useAutocomplete.
11
+ */
12
+ function toKeyboardEventInit(e) {
13
+ return {
14
+ key: e.key,
15
+ code: e.code,
16
+ location: e.location,
17
+ repeat: e.repeat,
18
+ isComposing: e.isComposing,
19
+ ctrlKey: e.ctrlKey,
20
+ shiftKey: e.shiftKey,
21
+ altKey: e.altKey,
22
+ metaKey: e.metaKey,
23
+ bubbles: e.bubbles,
24
+ cancelable: e.cancelable
25
+ };
26
+ }
27
+ const AUTOCOMPLETE_FOCUS_EVENT = "autocomplete:focus";
28
+ const AUTOCOMPLETE_CLEAR_FOCUS_EVENT = "autocomplete:clearfocus";
29
+ /**
30
+ * Provides the behavior and accessibility implementation for an autocomplete component.
31
+ * An autocomplete combines a text input with a collection, allowing users to filter
32
+ * the collection's contents to match a query.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * const state = createAutocompleteState({ defaultInputValue: '' });
37
+ * let inputRef, collectionRef;
38
+ *
39
+ * const { inputProps, collectionProps, filter } = createAutocomplete({
40
+ * inputRef: () => inputRef,
41
+ * collectionRef: () => collectionRef,
42
+ * filter: (textValue, inputValue) =>
43
+ * textValue.toLowerCase().includes(inputValue.toLowerCase()),
44
+ * }, state);
45
+ *
46
+ * return (
47
+ * <div>
48
+ * <input ref={inputRef} {...inputProps} />
49
+ * <ul ref={collectionRef} {...collectionProps}>
50
+ * {items.filter(item => filter?.(item.name) ?? true).map(item => (
51
+ * <li key={item.id}>{item.name}</li>
52
+ * ))}
53
+ * </ul>
54
+ * </div>
55
+ * );
56
+ * ```
57
+ */
58
+ function createAutocomplete(props, state) {
59
+ const { inputRef, collectionRef, filter, collectionId: collectionIdProp, collectionAriaLabel, disableAutoFocusFirst = false, disableVirtualFocus = false } = props;
60
+ const collectionId = collectionIdProp ?? createId();
61
+ const [shouldUseVirtualFocus] = createSignal(!disableVirtualFocus);
62
+ const [autoFocusOnMount, setAutoFocusOnMount] = createSignal(false);
63
+ let lastInputType = "";
64
+ const handleBeforeInput = (e) => {
65
+ lastInputType = e.inputType || "";
66
+ };
67
+ createEffect(() => {
68
+ const input = inputRef();
69
+ if (input) {
70
+ input.addEventListener("beforeinput", handleBeforeInput);
71
+ onCleanup(() => {
72
+ input.removeEventListener("beforeinput", handleBeforeInput);
73
+ });
74
+ }
75
+ });
76
+ const focusFirstItem = () => {
77
+ const collection = collectionRef();
78
+ if (!collection) {
79
+ setAutoFocusOnMount(true);
80
+ return;
81
+ }
82
+ collection.dispatchEvent(new CustomEvent(AUTOCOMPLETE_FOCUS_EVENT, {
83
+ cancelable: true,
84
+ bubbles: true,
85
+ detail: { focusStrategy: "first" }
86
+ }));
87
+ };
88
+ const clearVirtualFocus = (clearFocusKey = false) => {
89
+ setAutoFocusOnMount(false);
90
+ state.setFocusedNodeId(null);
91
+ const collection = collectionRef();
92
+ if (collection) collection.dispatchEvent(new CustomEvent(AUTOCOMPLETE_CLEAR_FOCUS_EVENT, {
93
+ cancelable: true,
94
+ bubbles: true,
95
+ detail: { clearFocusKey }
96
+ }));
97
+ };
98
+ const onChange = (value) => {
99
+ if ((lastInputType === "insertText" || lastInputType === "insertCompositionText" || lastInputType === "insertFromComposition") && !disableAutoFocusFirst) focusFirstItem();
100
+ else if (lastInputType && (lastInputType.includes("insert") || lastInputType.includes("delete") || lastInputType.includes("history"))) clearVirtualFocus(true);
101
+ state.setInputValue(value);
102
+ };
103
+ const onKeyDown = (e) => {
104
+ if ("isComposing" in e && e.isComposing) return;
105
+ const focusedNodeId = state.focusedNodeId();
106
+ const collection = collectionRef();
107
+ const ownerDocument = getOwnerDocument(inputRef() ?? collection);
108
+ switch (e.key) {
109
+ case "Escape":
110
+ if (e.defaultPrevented) return;
111
+ break;
112
+ case " ": return;
113
+ case "Tab": return;
114
+ case "ArrowUp":
115
+ case "ArrowDown":
116
+ case "Home":
117
+ case "End":
118
+ case "PageUp":
119
+ case "PageDown":
120
+ e.preventDefault();
121
+ if (collection) collection.dispatchEvent(new CustomEvent(AUTOCOMPLETE_FOCUS_EVENT, {
122
+ cancelable: true,
123
+ bubbles: true
124
+ }));
125
+ break;
126
+ case "ArrowLeft":
127
+ case "ArrowRight":
128
+ if (!focusedNodeId) {
129
+ e.stopPropagation();
130
+ return;
131
+ }
132
+ break;
133
+ case "Enter":
134
+ if (focusedNodeId) {
135
+ const item = ownerDocument?.getElementById(focusedNodeId);
136
+ if (item) {
137
+ item.click();
138
+ e.preventDefault();
139
+ }
140
+ }
141
+ return;
142
+ }
143
+ if (!e.defaultPrevented && collection) {
144
+ e.stopPropagation();
145
+ let shouldPerformDefaultAction = true;
146
+ if (focusedNodeId) {
147
+ const item = ownerDocument?.getElementById(focusedNodeId);
148
+ if (item) shouldPerformDefaultAction = item.dispatchEvent(new KeyboardEvent(e.type, toKeyboardEventInit(e)));
149
+ } else shouldPerformDefaultAction = collection.dispatchEvent(new KeyboardEvent(e.type, toKeyboardEventInit(e)));
150
+ if (shouldPerformDefaultAction && (e.key === "ArrowLeft" || e.key === "ArrowRight")) clearVirtualFocus();
151
+ }
152
+ };
153
+ const onFocus = (e) => {
154
+ if (!e.isTrusted) return;
155
+ const focusedNodeId = state.focusedNodeId();
156
+ if (focusedNodeId) {
157
+ if (document.getElementById(focusedNodeId)) {}
158
+ }
159
+ };
160
+ const onBlur = (e) => {
161
+ if (!e.isTrusted) return;
162
+ };
163
+ const filterFn = filter ? (textValue) => filter(textValue, state.inputValue()) : void 0;
164
+ return {
165
+ inputProps: {
166
+ value: state.inputValue,
167
+ onChange,
168
+ onKeyDown,
169
+ onFocus,
170
+ onBlur,
171
+ get "aria-activedescendant"() {
172
+ return () => shouldUseVirtualFocus() ? state.focusedNodeId() ?? void 0 : void 0;
173
+ },
174
+ "aria-controls": collectionId,
175
+ "aria-autocomplete": "list",
176
+ enterKeyHint: "go",
177
+ autoCorrect: "off",
178
+ spellCheck: "false",
179
+ autoComplete: "off"
180
+ },
181
+ collectionProps: {
182
+ id: collectionId,
183
+ "aria-label": collectionAriaLabel,
184
+ shouldUseVirtualFocus: shouldUseVirtualFocus(),
185
+ disallowTypeAhead: shouldUseVirtualFocus(),
186
+ get autoFocus() {
187
+ return autoFocusOnMount() ? "first" : false;
188
+ }
189
+ },
190
+ filter: filterFn
191
+ };
192
+ }
193
+ //#endregion
194
+ export { AUTOCOMPLETE_FOCUS_EVENT as n, createAutocomplete as r, AUTOCOMPLETE_CLEAR_FOCUS_EVENT as t };
195
+
196
+ //# sourceMappingURL=autocomplete.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete.jsx","names":["inputEvent"],"sources":["../../src/autocomplete/createAutocomplete.ts"],"sourcesContent":["/**\n * createAutocomplete - Accessibility hook for autocomplete components\n *\n * Provides keyboard navigation, virtual focus via aria-activedescendant,\n * and filtering capabilities for autocomplete inputs.\n *\n * Based on @react-aria/autocomplete useAutocomplete.\n */\n\nimport { createSignal, createEffect, onCleanup, type Accessor } from \"solid-js\";\nimport { createId, getOwnerDocument } from \"../ssr\";\nimport { type AutocompleteState } from \"@proyecto-viviana/solid-stately\";\n\nexport interface CollectionOptions {\n /** The id of the collection element. */\n id?: string;\n /** Accessible label for the collection. */\n \"aria-label\"?: string;\n /** Whether the collection items should use virtual focus instead of being focused directly. */\n shouldUseVirtualFocus: boolean;\n /** Whether typeahead is disabled. */\n disallowTypeAhead: boolean;\n /** Whether and where to focus an item when the collection mounts. */\n autoFocus?: boolean | \"first\" | \"last\";\n}\n\nexport interface AutocompleteInputProps {\n /** Current input value. */\n value: Accessor<string>;\n /** Handler for input value changes. */\n onChange: (value: string) => void;\n /** Handler for key events. */\n onKeyDown: (e: KeyboardEvent) => void;\n /** Handler for focus events. */\n onFocus: (e: FocusEvent) => void;\n /** Handler for blur events. */\n onBlur: (e: FocusEvent) => void;\n /** The id of the currently focused item for aria-activedescendant. */\n \"aria-activedescendant\": Accessor<string | undefined>;\n /** The id of the controlled collection. */\n \"aria-controls\": string;\n /** Autocomplete type. */\n \"aria-autocomplete\": \"list\" | \"none\" | \"inline\" | \"both\";\n /** Enter key hint for mobile keyboards. */\n enterKeyHint: \"go\";\n /** Disable autocorrect. */\n autoCorrect: \"off\";\n /** Disable spell check. */\n spellCheck: \"false\";\n /** Disable browser autocomplete. */\n autoComplete: \"off\";\n}\n\nexport interface AriaAutocompleteOptions<_T = unknown> {\n /** Ref accessor for the input element. */\n inputRef: Accessor<HTMLInputElement | undefined>;\n /** Ref accessor for the collection element. */\n collectionRef: Accessor<HTMLElement | undefined>;\n /** Optional id override for the controlled collection element. */\n collectionId?: string;\n /** Optional accessible name for the controlled collection element. */\n collectionAriaLabel?: string;\n /**\n * An optional filter function used to determine if an option should be included.\n * @param textValue - The text value of the item\n * @param inputValue - The current input value\n */\n filter?: (textValue: string, inputValue: string) => boolean;\n /**\n * Whether to focus the first item after filtering.\n * @default false\n */\n disableAutoFocusFirst?: boolean;\n /**\n * Whether to disable virtual focus (aria-activedescendant).\n * @default false\n */\n disableVirtualFocus?: boolean;\n}\n\nexport interface AutocompleteAria<_T = unknown> {\n /** Props for the autocomplete input element. */\n inputProps: AutocompleteInputProps;\n /** Props for the collection (ListBox/Menu). */\n collectionProps: CollectionOptions;\n /** A filter function that returns if the item should be shown. */\n filter?: (textValue: string) => boolean;\n}\n\nfunction toKeyboardEventInit(e: KeyboardEvent): KeyboardEventInit {\n return {\n key: e.key,\n code: e.code,\n location: e.location,\n repeat: e.repeat,\n isComposing: e.isComposing,\n ctrlKey: e.ctrlKey,\n shiftKey: e.shiftKey,\n altKey: e.altKey,\n metaKey: e.metaKey,\n bubbles: e.bubbles,\n cancelable: e.cancelable,\n };\n}\n\n// Custom event names for collection communication\nexport const AUTOCOMPLETE_FOCUS_EVENT = \"autocomplete:focus\";\nexport const AUTOCOMPLETE_CLEAR_FOCUS_EVENT = \"autocomplete:clearfocus\";\n\n/**\n * Provides the behavior and accessibility implementation for an autocomplete component.\n * An autocomplete combines a text input with a collection, allowing users to filter\n * the collection's contents to match a query.\n *\n * @example\n * ```tsx\n * const state = createAutocompleteState({ defaultInputValue: '' });\n * let inputRef, collectionRef;\n *\n * const { inputProps, collectionProps, filter } = createAutocomplete({\n * inputRef: () => inputRef,\n * collectionRef: () => collectionRef,\n * filter: (textValue, inputValue) =>\n * textValue.toLowerCase().includes(inputValue.toLowerCase()),\n * }, state);\n *\n * return (\n * <div>\n * <input ref={inputRef} {...inputProps} />\n * <ul ref={collectionRef} {...collectionProps}>\n * {items.filter(item => filter?.(item.name) ?? true).map(item => (\n * <li key={item.id}>{item.name}</li>\n * ))}\n * </ul>\n * </div>\n * );\n * ```\n */\nexport function createAutocomplete<T = unknown>(\n props: AriaAutocompleteOptions<T>,\n state: AutocompleteState,\n): AutocompleteAria<T> {\n const {\n inputRef,\n collectionRef,\n filter,\n collectionId: collectionIdProp,\n collectionAriaLabel,\n disableAutoFocusFirst = false,\n disableVirtualFocus = false,\n } = props;\n\n const collectionId = collectionIdProp ?? createId();\n const [shouldUseVirtualFocus] = createSignal(!disableVirtualFocus);\n // When the first item should be focused but the collection hasn't mounted yet,\n // defer it by threading autoFocus through collectionProps so the collection\n // focuses on mount (mirrors upstream's autoFocusOnMount state).\n const [autoFocusOnMount, setAutoFocusOnMount] = createSignal(false);\n let lastInputType = \"\";\n\n // Track the input type for determining focus behavior. We listen to\n // `beforeinput` (not `input`) so `lastInputType` is set before the input's\n // `onChange` runs, mirroring @react-aria/autocomplete.\n const handleBeforeInput = (e: Event) => {\n const inputEvent = e as InputEvent;\n lastInputType = inputEvent.inputType || \"\";\n };\n\n // Set up beforeinput event listener\n createEffect(() => {\n const input = inputRef();\n if (input) {\n input.addEventListener(\"beforeinput\", handleBeforeInput);\n onCleanup(() => {\n input.removeEventListener(\"beforeinput\", handleBeforeInput);\n });\n }\n });\n\n // Focus first item in collection\n const focusFirstItem = () => {\n const collection = collectionRef();\n if (!collection) {\n // Collection isn't mounted yet — defer focusing the first item to mount\n // time via collectionProps.autoFocus instead of firing a focus event into\n // a not-yet-rendered collection.\n setAutoFocusOnMount(true);\n return;\n }\n collection.dispatchEvent(\n new CustomEvent(AUTOCOMPLETE_FOCUS_EVENT, {\n cancelable: true,\n bubbles: true,\n detail: { focusStrategy: \"first\" },\n }),\n );\n };\n\n // Clear virtual focus\n const clearVirtualFocus = (clearFocusKey = false) => {\n setAutoFocusOnMount(false);\n state.setFocusedNodeId(null);\n const collection = collectionRef();\n if (collection) {\n collection.dispatchEvent(\n new CustomEvent(AUTOCOMPLETE_CLEAR_FOCUS_EVENT, {\n cancelable: true,\n bubbles: true,\n detail: { clearFocusKey },\n }),\n );\n }\n };\n\n // Handle input value changes\n const onChange = (value: string) => {\n // Focus first item when typing forward, clear when backspacing/pasting.\n // IME composition (e.g. CJK input) reports 'insertCompositionText'/\n // 'insertFromComposition' instead of 'insertText'; treat those as forward\n // typing so the first item still gets virtual focus.\n if (\n (lastInputType === \"insertText\" ||\n lastInputType === \"insertCompositionText\" ||\n lastInputType === \"insertFromComposition\") &&\n !disableAutoFocusFirst\n ) {\n focusFirstItem();\n } else if (\n lastInputType &&\n (lastInputType.includes(\"insert\") ||\n lastInputType.includes(\"delete\") ||\n lastInputType.includes(\"history\"))\n ) {\n clearVirtualFocus(true);\n }\n\n state.setInputValue(value);\n };\n\n // Handle keyboard navigation\n const onKeyDown = (e: KeyboardEvent) => {\n if (\"isComposing\" in e && e.isComposing) {\n return;\n }\n\n const focusedNodeId = state.focusedNodeId();\n const collection = collectionRef();\n const ownerDocument = getOwnerDocument(inputRef() ?? collection);\n\n switch (e.key) {\n case \"Escape\":\n // Let the input handle Escape (e.g., clear value)\n if (e.defaultPrevented) {\n return;\n }\n break;\n\n case \" \":\n // Space shouldn't trigger item action\n return;\n\n case \"Tab\":\n // Let Tab propagate normally for focus management\n return;\n\n case \"ArrowUp\":\n case \"ArrowDown\":\n case \"Home\":\n case \"End\":\n case \"PageUp\":\n case \"PageDown\": {\n // Prevent cursor movement in input\n e.preventDefault();\n\n // Dispatch focus event to collection\n if (collection) {\n collection.dispatchEvent(\n new CustomEvent(AUTOCOMPLETE_FOCUS_EVENT, {\n cancelable: true,\n bubbles: true,\n }),\n );\n }\n break;\n }\n\n case \"ArrowLeft\":\n case \"ArrowRight\":\n // With no virtual focus, just let the arrow move the text cursor; stop\n // propagation so it doesn't leak into the collection. With virtual focus,\n // fall through to dispatch the key to the focused item below, then clear\n // the active descendant only after the item has seen it.\n if (!focusedNodeId) {\n e.stopPropagation();\n return;\n }\n break;\n\n case \"Enter\":\n // Trigger click on focused item\n if (focusedNodeId) {\n const item = ownerDocument?.getElementById(focusedNodeId);\n if (item) {\n item.click();\n e.preventDefault();\n }\n }\n return;\n }\n\n // Forward keyboard events to the focused item (or the collection when there\n // is no virtual focus) so the collection can act on them, e.g. onAction.\n if (!e.defaultPrevented && collection) {\n e.stopPropagation();\n\n let shouldPerformDefaultAction = true;\n if (focusedNodeId) {\n const item = ownerDocument?.getElementById(focusedNodeId);\n if (item) {\n shouldPerformDefaultAction = item.dispatchEvent(\n new KeyboardEvent(e.type, toKeyboardEventInit(e)),\n );\n }\n } else {\n shouldPerformDefaultAction = collection.dispatchEvent(\n new KeyboardEvent(e.type, toKeyboardEventInit(e)),\n );\n }\n\n // After the focused item has seen ArrowLeft/ArrowRight, clear the active\n // descendant so SR announcements aren't interrupted, but retain the\n // collection's focused key so navigation restarts where it left off. If\n // the item consumed the key (e.g. an expandable row collapsing), it\n // cancels the event and we keep virtual focus.\n if (shouldPerformDefaultAction && (e.key === \"ArrowLeft\" || e.key === \"ArrowRight\")) {\n clearVirtualFocus();\n }\n }\n };\n\n // Handle focus events\n const onFocus = (e: FocusEvent) => {\n if (!e.isTrusted) return;\n\n // Restore virtual focus when refocusing input\n const focusedNodeId = state.focusedNodeId();\n if (focusedNodeId) {\n const item = document.getElementById(focusedNodeId);\n if (item) {\n // Item still exists, keep focus on it\n }\n }\n };\n\n const onBlur = (e: FocusEvent) => {\n if (!e.isTrusted) return;\n // Virtual focus blur handling would go here\n };\n\n // Create filter function\n const filterFn = filter\n ? (textValue: string) => filter(textValue, state.inputValue())\n : undefined;\n\n return {\n inputProps: {\n value: state.inputValue,\n onChange,\n onKeyDown,\n onFocus,\n onBlur,\n get \"aria-activedescendant\"() {\n return () => (shouldUseVirtualFocus() ? (state.focusedNodeId() ?? undefined) : undefined);\n },\n \"aria-controls\": collectionId,\n \"aria-autocomplete\": \"list\",\n enterKeyHint: \"go\",\n autoCorrect: \"off\",\n spellCheck: \"false\",\n autoComplete: \"off\",\n },\n collectionProps: {\n id: collectionId,\n \"aria-label\": collectionAriaLabel,\n shouldUseVirtualFocus: shouldUseVirtualFocus(),\n disallowTypeAhead: shouldUseVirtualFocus(),\n get autoFocus() {\n return autoFocusOnMount() ? \"first\" : false;\n },\n },\n filter: filterFn,\n };\n}\n"],"mappings":"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"}
@@ -0,0 +1,119 @@
1
+ import { i as access, o as mergeProps } from "./env.js";
2
+ import { t as filterDOMProps } from "./filterDOMProps.js";
3
+ import { t as createLink } from "./link.js";
4
+ //#region src/breadcrumbs/createBreadcrumbs.ts
5
+ /**
6
+ * Breadcrumbs hooks for Solidaria
7
+ *
8
+ * Provides accessibility implementation for breadcrumb navigation.
9
+ * Port of @react-aria/breadcrumbs.
10
+ */
11
+ /**
12
+ * Provides accessibility implementation for the breadcrumbs navigation container.
13
+ */
14
+ function createBreadcrumbs(props = {}) {
15
+ const getProps = () => access(props);
16
+ const getNavProps = () => {
17
+ const p = getProps();
18
+ const ariaLabel = p["aria-label"] ?? (p["aria-labelledby"] ? void 0 : "Breadcrumbs");
19
+ return mergeProps(filterDOMProps(p, { labelable: true }), {
20
+ "aria-label": ariaLabel,
21
+ "aria-details": p["aria-details"]
22
+ });
23
+ };
24
+ return { get navProps() {
25
+ return getNavProps();
26
+ } };
27
+ }
28
+ /**
29
+ * Provides accessibility implementation for an individual breadcrumb item.
30
+ */
31
+ function createBreadcrumbItem(props = {}) {
32
+ const getProps = () => access(props);
33
+ const isCurrent = () => getProps().isCurrent ?? false;
34
+ const isDisabled = () => getProps().isDisabled ?? false;
35
+ const elementType = () => getProps().elementType ?? "a";
36
+ const { linkProps, isPressed } = createLink({
37
+ get isDisabled() {
38
+ return isDisabled() || isCurrent();
39
+ },
40
+ get elementType() {
41
+ return elementType();
42
+ },
43
+ get href() {
44
+ return isCurrent() ? void 0 : getProps().href;
45
+ },
46
+ get target() {
47
+ return getProps().target;
48
+ },
49
+ get rel() {
50
+ return getProps().rel;
51
+ },
52
+ get onPress() {
53
+ return getProps().onPress;
54
+ },
55
+ get onPressStart() {
56
+ return getProps().onPressStart;
57
+ },
58
+ get onPressEnd() {
59
+ return getProps().onPressEnd;
60
+ },
61
+ get onClick() {
62
+ return getProps().onClick;
63
+ },
64
+ get onFocus() {
65
+ return getProps().onFocus;
66
+ },
67
+ get onBlur() {
68
+ return getProps().onBlur;
69
+ },
70
+ get onFocusChange() {
71
+ return getProps().onFocusChange;
72
+ },
73
+ get onKeyDown() {
74
+ return getProps().onKeyDown;
75
+ },
76
+ get onKeyUp() {
77
+ return getProps().onKeyUp;
78
+ },
79
+ get autoFocus() {
80
+ return getProps().autoFocus;
81
+ },
82
+ get "aria-label"() {
83
+ return getProps()["aria-label"];
84
+ },
85
+ get "aria-labelledby"() {
86
+ return getProps()["aria-labelledby"];
87
+ },
88
+ get "aria-describedby"() {
89
+ return getProps()["aria-describedby"];
90
+ },
91
+ get "aria-details"() {
92
+ return getProps()["aria-details"];
93
+ }
94
+ });
95
+ const getItemProps = () => {
96
+ const p = getProps();
97
+ const current = isCurrent();
98
+ let baseProps = p.id ? mergeProps(linkProps, { id: p.id }) : linkProps;
99
+ if (current) {
100
+ const ariaCurrent = p["aria-current"] ?? "page";
101
+ baseProps = mergeProps(baseProps, { "aria-current": ariaCurrent });
102
+ }
103
+ if (isDisabled()) baseProps = mergeProps(baseProps, { "aria-disabled": true });
104
+ return baseProps;
105
+ };
106
+ return {
107
+ get itemProps() {
108
+ return getItemProps();
109
+ },
110
+ get linkProps() {
111
+ return linkProps;
112
+ },
113
+ isPressed
114
+ };
115
+ }
116
+ //#endregion
117
+ export { createBreadcrumbs as n, createBreadcrumbItem as t };
118
+
119
+ //# sourceMappingURL=breadcrumbs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.js","names":[],"sources":["../../src/breadcrumbs/createBreadcrumbs.ts"],"sourcesContent":["/**\n * Breadcrumbs hooks for Solidaria\n *\n * Provides accessibility implementation for breadcrumb navigation.\n * Port of @react-aria/breadcrumbs.\n */\n\nimport { createLink, type AriaLinkProps, type LinkAria } from \"../link\";\nimport { filterDOMProps } from \"../utils/filterDOMProps\";\nimport { mergeProps } from \"../utils/mergeProps\";\nimport { type MaybeAccessor, access } from \"../utils/reactivity\";\n\nexport interface AriaBreadcrumbsProps {\n /** Provides a label for the breadcrumbs navigation. */\n \"aria-label\"?: string;\n /** Identifies the element (or elements) that labels the breadcrumbs. */\n \"aria-labelledby\"?: string;\n /** Identifies the element (or elements) that describes the breadcrumbs. */\n \"aria-describedby\"?: string;\n /** Identifies the element (or elements) that provide a detailed description. */\n \"aria-details\"?: string;\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean;\n}\n\nexport interface BreadcrumbsAria {\n /** Props for the breadcrumbs nav element. */\n navProps: Record<string, unknown>;\n}\n\nexport interface AriaBreadcrumbItemProps extends Omit<AriaLinkProps, \"aria-current\"> {\n /** The DOM id for the breadcrumb item. */\n id?: string;\n /** Whether this is the current/last item in the breadcrumb trail. */\n isCurrent?: boolean;\n /** The type of current location for aria-current. @default 'page' */\n \"aria-current\"?: \"page\" | \"step\" | \"location\" | \"date\" | \"time\" | boolean;\n /** The HTML element type. @default 'a' */\n elementType?: string;\n}\n\nexport interface BreadcrumbItemAria extends LinkAria {\n /** Props for the breadcrumb item element. */\n itemProps: Record<string, unknown>;\n}\n\n/**\n * Provides accessibility implementation for the breadcrumbs navigation container.\n */\nexport function createBreadcrumbs(\n props: MaybeAccessor<AriaBreadcrumbsProps> = {},\n): BreadcrumbsAria {\n const getProps = () => access(props);\n\n const getNavProps = (): Record<string, unknown> => {\n const p = getProps();\n\n // Only apply a default label when no other label source exists.\n const ariaLabel = p[\"aria-label\"] ?? (p[\"aria-labelledby\"] ? undefined : \"Breadcrumbs\");\n\n return mergeProps(filterDOMProps(p as Record<string, unknown>, { labelable: true }), {\n \"aria-label\": ariaLabel,\n \"aria-details\": p[\"aria-details\"],\n });\n };\n\n return {\n get navProps() {\n return getNavProps();\n },\n };\n}\n\n/**\n * Provides accessibility implementation for an individual breadcrumb item.\n */\nexport function createBreadcrumbItem(\n props: MaybeAccessor<AriaBreadcrumbItemProps> = {},\n): BreadcrumbItemAria {\n const getProps = () => access(props);\n\n const isCurrent = () => getProps().isCurrent ?? false;\n const isDisabled = () => getProps().isDisabled ?? false;\n const elementType = () => getProps().elementType ?? \"a\";\n\n // Use createLink for base link behavior\n // Current items are treated as disabled (can't navigate to current page)\n const { linkProps, isPressed } = createLink({\n get isDisabled() {\n return isDisabled() || isCurrent();\n },\n get elementType() {\n return elementType();\n },\n get href() {\n return isCurrent() ? undefined : getProps().href;\n },\n get target() {\n return getProps().target;\n },\n get rel() {\n return getProps().rel;\n },\n get onPress() {\n return getProps().onPress;\n },\n get onPressStart() {\n return getProps().onPressStart;\n },\n get onPressEnd() {\n return getProps().onPressEnd;\n },\n get onClick() {\n return getProps().onClick;\n },\n get onFocus() {\n return getProps().onFocus;\n },\n get onBlur() {\n return getProps().onBlur;\n },\n get onFocusChange() {\n return getProps().onFocusChange;\n },\n get onKeyDown() {\n return getProps().onKeyDown;\n },\n get onKeyUp() {\n return getProps().onKeyUp;\n },\n get autoFocus() {\n return getProps().autoFocus;\n },\n get \"aria-label\"() {\n return getProps()[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return getProps()[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return getProps()[\"aria-describedby\"];\n },\n get \"aria-details\"() {\n return getProps()[\"aria-details\"];\n },\n });\n\n const getItemProps = (): Record<string, unknown> => {\n const p = getProps();\n const current = isCurrent();\n\n // Start with link props, forwarding id if provided\n let baseProps: Record<string, unknown> = p.id ? mergeProps(linkProps, { id: p.id }) : linkProps;\n\n // Add aria-current for current page\n if (current) {\n const ariaCurrent = p[\"aria-current\"] ?? \"page\";\n baseProps = mergeProps(baseProps, {\n \"aria-current\": ariaCurrent,\n });\n }\n\n // Add aria-disabled for disabled items\n if (isDisabled()) {\n baseProps = mergeProps(baseProps, {\n \"aria-disabled\": true,\n });\n }\n\n return baseProps;\n };\n\n return {\n get itemProps() {\n return getItemProps();\n },\n get linkProps() {\n return linkProps;\n },\n isPressed,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAiDA,SAAgB,kBACd,QAA6C,CAAC,GAC7B;CACjB,MAAM,iBAAiB,OAAO,KAAK;CAEnC,MAAM,oBAA6C;EACjD,MAAM,IAAI,SAAS;EAGnB,MAAM,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,KAAA,IAAY;EAEzE,OAAO,WAAW,eAAe,GAA8B,EAAE,WAAW,KAAK,CAAC,GAAG;GACnF,cAAc;GACd,gBAAgB,EAAE;EACpB,CAAC;CACH;CAEA,OAAO,EACL,IAAI,WAAW;EACb,OAAO,YAAY;CACrB,EACF;AACF;;;;AAKA,SAAgB,qBACd,QAAgD,CAAC,GAC7B;CACpB,MAAM,iBAAiB,OAAO,KAAK;CAEnC,MAAM,kBAAkB,SAAS,CAAC,CAAC,aAAa;CAChD,MAAM,mBAAmB,SAAS,CAAC,CAAC,cAAc;CAClD,MAAM,oBAAoB,SAAS,CAAC,CAAC,eAAe;CAIpD,MAAM,EAAE,WAAW,cAAc,WAAW;EAC1C,IAAI,aAAa;GACf,OAAO,WAAW,KAAK,UAAU;EACnC;EACA,IAAI,cAAc;GAChB,OAAO,YAAY;EACrB;EACA,IAAI,OAAO;GACT,OAAO,UAAU,IAAI,KAAA,IAAY,SAAS,CAAC,CAAC;EAC9C;EACA,IAAI,SAAS;GACX,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,MAAM;GACR,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,UAAU;GACZ,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,eAAe;GACjB,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,aAAa;GACf,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,UAAU;GACZ,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,UAAU;GACZ,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,SAAS;GACX,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,gBAAgB;GAClB,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,YAAY;GACd,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,UAAU;GACZ,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,YAAY;GACd,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,eAAe;GACjB,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,oBAAoB;GACtB,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,qBAAqB;GACvB,OAAO,SAAS,CAAC,CAAC;EACpB;EACA,IAAI,iBAAiB;GACnB,OAAO,SAAS,CAAC,CAAC;EACpB;CACF,CAAC;CAED,MAAM,qBAA8C;EAClD,MAAM,IAAI,SAAS;EACnB,MAAM,UAAU,UAAU;EAG1B,IAAI,YAAqC,EAAE,KAAK,WAAW,WAAW,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI;EAGtF,IAAI,SAAS;GACX,MAAM,cAAc,EAAE,mBAAmB;GACzC,YAAY,WAAW,WAAW,EAChC,gBAAgB,YAClB,CAAC;EACH;EAGA,IAAI,WAAW,GACb,YAAY,WAAW,WAAW,EAChC,iBAAiB,KACnB,CAAC;EAGH,OAAO;CACT;CAEA,OAAO;EACL,IAAI,YAAY;GACd,OAAO,aAAa;EACtB;EACA,IAAI,YAAY;GACd,OAAO;EACT;EACA;CACF;AACF"}