@proyecto-viviana/solidaria 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (743) hide show
  1. package/dist/_chunk/DragManager.js +627 -0
  2. package/dist/_chunk/DragManager.js.map +1 -0
  3. package/dist/_chunk/DragManager.jsx +627 -0
  4. package/dist/_chunk/DragManager.jsx.map +1 -0
  5. package/dist/_chunk/FocusScope.js +400 -0
  6. package/dist/_chunk/FocusScope.js.map +1 -0
  7. package/dist/_chunk/FocusScope.jsx +375 -0
  8. package/dist/_chunk/FocusScope.jsx.map +1 -0
  9. package/dist/_chunk/actiongroup.js +141 -0
  10. package/dist/_chunk/actiongroup.js.map +1 -0
  11. package/dist/_chunk/actiongroup.jsx +141 -0
  12. package/dist/_chunk/actiongroup.jsx.map +1 -0
  13. package/dist/_chunk/announce.js +207 -0
  14. package/dist/_chunk/announce.js.map +1 -0
  15. package/dist/_chunk/announce.jsx +207 -0
  16. package/dist/_chunk/announce.jsx.map +1 -0
  17. package/dist/_chunk/ariaHideOutside.js +122 -0
  18. package/dist/_chunk/ariaHideOutside.js.map +1 -0
  19. package/dist/_chunk/ariaHideOutside.jsx +122 -0
  20. package/dist/_chunk/ariaHideOutside.jsx.map +1 -0
  21. package/dist/_chunk/autocomplete.js +244 -0
  22. package/dist/_chunk/autocomplete.js.map +1 -0
  23. package/dist/_chunk/autocomplete.jsx +244 -0
  24. package/dist/_chunk/autocomplete.jsx.map +1 -0
  25. package/dist/_chunk/breadcrumbs.js +121 -0
  26. package/dist/_chunk/breadcrumbs.js.map +1 -0
  27. package/dist/_chunk/breadcrumbs.jsx +121 -0
  28. package/dist/_chunk/breadcrumbs.jsx.map +1 -0
  29. package/dist/_chunk/button.js +275 -0
  30. package/dist/_chunk/button.js.map +1 -0
  31. package/dist/_chunk/button.jsx +275 -0
  32. package/dist/_chunk/button.jsx.map +1 -0
  33. package/dist/_chunk/calendar.js +1037 -0
  34. package/dist/_chunk/calendar.js.map +1 -0
  35. package/dist/_chunk/calendar.jsx +1037 -0
  36. package/dist/_chunk/calendar.jsx.map +1 -0
  37. package/dist/_chunk/checkbox.js +235 -0
  38. package/dist/_chunk/checkbox.js.map +1 -0
  39. package/dist/_chunk/checkbox.jsx +235 -0
  40. package/dist/_chunk/checkbox.jsx.map +1 -0
  41. package/dist/_chunk/color.js +1458 -0
  42. package/dist/_chunk/color.js.map +1 -0
  43. package/dist/_chunk/color.jsx +1458 -0
  44. package/dist/_chunk/color.jsx.map +1 -0
  45. package/dist/_chunk/combobox.js +1062 -0
  46. package/dist/_chunk/combobox.js.map +1 -0
  47. package/dist/_chunk/combobox.jsx +1062 -0
  48. package/dist/_chunk/combobox.jsx.map +1 -0
  49. package/dist/_chunk/constants.js +19 -0
  50. package/dist/_chunk/constants.js.map +1 -0
  51. package/dist/_chunk/constants.jsx +19 -0
  52. package/dist/_chunk/constants.jsx.map +1 -0
  53. package/dist/_chunk/createCollator.js +61 -0
  54. package/dist/_chunk/createCollator.js.map +1 -0
  55. package/dist/_chunk/createCollator.jsx +61 -0
  56. package/dist/_chunk/createCollator.jsx.map +1 -0
  57. package/dist/_chunk/createCollectionRowInteraction.js +133 -0
  58. package/dist/_chunk/createCollectionRowInteraction.js.map +1 -0
  59. package/dist/_chunk/createCollectionRowInteraction.jsx +133 -0
  60. package/dist/_chunk/createCollectionRowInteraction.jsx.map +1 -0
  61. package/dist/_chunk/createField.js +55 -0
  62. package/dist/_chunk/createField.js.map +1 -0
  63. package/dist/_chunk/createField.jsx +55 -0
  64. package/dist/_chunk/createField.jsx.map +1 -0
  65. package/dist/_chunk/createFocus.js +105 -0
  66. package/dist/_chunk/createFocus.js.map +1 -0
  67. package/dist/_chunk/createFocus.jsx +105 -0
  68. package/dist/_chunk/createFocus.jsx.map +1 -0
  69. package/dist/_chunk/createFocusRing.js +54 -0
  70. package/dist/_chunk/createFocusRing.js.map +1 -0
  71. package/dist/_chunk/createFocusRing.jsx +54 -0
  72. package/dist/_chunk/createFocusRing.jsx.map +1 -0
  73. package/dist/_chunk/createFocusWithin.js +120 -0
  74. package/dist/_chunk/createFocusWithin.js.map +1 -0
  75. package/dist/_chunk/createFocusWithin.jsx +120 -0
  76. package/dist/_chunk/createFocusWithin.jsx.map +1 -0
  77. package/dist/_chunk/createFocusable.js +131 -0
  78. package/dist/_chunk/createFocusable.js.map +1 -0
  79. package/dist/_chunk/createFocusable.jsx +131 -0
  80. package/dist/_chunk/createFocusable.jsx.map +1 -0
  81. package/dist/_chunk/createFormReset.js +39 -0
  82. package/dist/_chunk/createFormReset.js.map +1 -0
  83. package/dist/_chunk/createFormReset.jsx +39 -0
  84. package/dist/_chunk/createFormReset.jsx.map +1 -0
  85. package/dist/_chunk/createFormValidation.js +135 -0
  86. package/dist/_chunk/createFormValidation.js.map +1 -0
  87. package/dist/_chunk/createFormValidation.jsx +135 -0
  88. package/dist/_chunk/createFormValidation.jsx.map +1 -0
  89. package/dist/_chunk/createHover.js +131 -0
  90. package/dist/_chunk/createHover.js.map +1 -0
  91. package/dist/_chunk/createHover.jsx +131 -0
  92. package/dist/_chunk/createHover.jsx.map +1 -0
  93. package/dist/_chunk/createInteractionModality.js +268 -0
  94. package/dist/_chunk/createInteractionModality.js.map +1 -0
  95. package/dist/_chunk/createInteractionModality.jsx +268 -0
  96. package/dist/_chunk/createInteractionModality.jsx.map +1 -0
  97. package/dist/_chunk/createLabel.js +47 -0
  98. package/dist/_chunk/createLabel.js.map +1 -0
  99. package/dist/_chunk/createLabel.jsx +47 -0
  100. package/dist/_chunk/createLabel.jsx.map +1 -0
  101. package/dist/_chunk/createLabels.js +32 -0
  102. package/dist/_chunk/createLabels.js.map +1 -0
  103. package/dist/_chunk/createLabels.jsx +32 -0
  104. package/dist/_chunk/createLabels.jsx.map +1 -0
  105. package/dist/_chunk/createLandmark.js +198 -0
  106. package/dist/_chunk/createLandmark.js.map +1 -0
  107. package/dist/_chunk/createLandmark.jsx +198 -0
  108. package/dist/_chunk/createLandmark.jsx.map +1 -0
  109. package/dist/_chunk/createOverlay.js +327 -0
  110. package/dist/_chunk/createOverlay.js.map +1 -0
  111. package/dist/_chunk/createOverlay.jsx +327 -0
  112. package/dist/_chunk/createOverlay.jsx.map +1 -0
  113. package/dist/_chunk/createPress.js +526 -0
  114. package/dist/_chunk/createPress.js.map +1 -0
  115. package/dist/_chunk/createPress.jsx +526 -0
  116. package/dist/_chunk/createPress.jsx.map +1 -0
  117. package/dist/_chunk/createProgressBar.js +82 -0
  118. package/dist/_chunk/createProgressBar.js.map +1 -0
  119. package/dist/_chunk/createProgressBar.jsx +82 -0
  120. package/dist/_chunk/createProgressBar.jsx.map +1 -0
  121. package/dist/_chunk/createSelectableItem.js +302 -0
  122. package/dist/_chunk/createSelectableItem.js.map +1 -0
  123. package/dist/_chunk/createSelectableItem.jsx +302 -0
  124. package/dist/_chunk/createSelectableItem.jsx.map +1 -0
  125. package/dist/_chunk/createStringFormatter.js +61 -0
  126. package/dist/_chunk/createStringFormatter.js.map +1 -0
  127. package/dist/_chunk/createStringFormatter.jsx +61 -0
  128. package/dist/_chunk/createStringFormatter.jsx.map +1 -0
  129. package/dist/_chunk/createToggle.js +159 -0
  130. package/dist/_chunk/createToggle.js.map +1 -0
  131. package/dist/_chunk/createToggle.jsx +159 -0
  132. package/dist/_chunk/createToggle.jsx.map +1 -0
  133. package/dist/_chunk/createTypeSelect.js +125 -0
  134. package/dist/_chunk/createTypeSelect.js.map +1 -0
  135. package/dist/_chunk/createTypeSelect.jsx +125 -0
  136. package/dist/_chunk/createTypeSelect.jsx.map +1 -0
  137. package/dist/_chunk/datepicker.js +1706 -0
  138. package/dist/_chunk/datepicker.js.map +1 -0
  139. package/dist/_chunk/datepicker.jsx +1706 -0
  140. package/dist/_chunk/datepicker.jsx.map +1 -0
  141. package/dist/_chunk/dialog.js +62 -0
  142. package/dist/_chunk/dialog.js.map +1 -0
  143. package/dist/_chunk/dialog.jsx +62 -0
  144. package/dist/_chunk/dialog.jsx.map +1 -0
  145. package/dist/_chunk/disclosure.js +185 -0
  146. package/dist/_chunk/disclosure.js.map +1 -0
  147. package/dist/_chunk/disclosure.jsx +185 -0
  148. package/dist/_chunk/disclosure.jsx.map +1 -0
  149. package/dist/_chunk/dnd.js +2395 -0
  150. package/dist/_chunk/dnd.js.map +1 -0
  151. package/dist/_chunk/dnd.jsx +2395 -0
  152. package/dist/_chunk/dnd.jsx.map +1 -0
  153. package/dist/_chunk/env.js +87 -0
  154. package/dist/_chunk/env.js.map +1 -0
  155. package/dist/_chunk/env.jsx +87 -0
  156. package/dist/_chunk/env.jsx.map +1 -0
  157. package/dist/_chunk/filterDOMProps.js +82 -0
  158. package/dist/_chunk/filterDOMProps.js.map +1 -0
  159. package/dist/_chunk/filterDOMProps.jsx +82 -0
  160. package/dist/_chunk/filterDOMProps.jsx.map +1 -0
  161. package/dist/_chunk/focus.js +399 -0
  162. package/dist/_chunk/focus.js.map +1 -0
  163. package/dist/_chunk/focus.jsx +399 -0
  164. package/dist/_chunk/focus.jsx.map +1 -0
  165. package/dist/_chunk/focus2.js +631 -0
  166. package/dist/_chunk/focus2.js.map +1 -0
  167. package/dist/_chunk/focus2.jsx +631 -0
  168. package/dist/_chunk/focus2.jsx.map +1 -0
  169. package/dist/_chunk/grid.js +623 -0
  170. package/dist/_chunk/grid.js.map +1 -0
  171. package/dist/_chunk/grid.jsx +623 -0
  172. package/dist/_chunk/grid.jsx.map +1 -0
  173. package/dist/_chunk/gridlist.js +369 -0
  174. package/dist/_chunk/gridlist.js.map +1 -0
  175. package/dist/_chunk/gridlist.jsx +369 -0
  176. package/dist/_chunk/gridlist.jsx.map +1 -0
  177. package/dist/_chunk/i18n.js +199 -0
  178. package/dist/_chunk/i18n.js.map +1 -0
  179. package/dist/_chunk/i18n.jsx +199 -0
  180. package/dist/_chunk/i18n.jsx.map +1 -0
  181. package/dist/_chunk/interactions.js +331 -0
  182. package/dist/_chunk/interactions.js.map +1 -0
  183. package/dist/_chunk/interactions.jsx +325 -0
  184. package/dist/_chunk/interactions.jsx.map +1 -0
  185. package/dist/_chunk/link.js +97 -0
  186. package/dist/_chunk/link.js.map +1 -0
  187. package/dist/_chunk/link.jsx +97 -0
  188. package/dist/_chunk/link.jsx.map +1 -0
  189. package/dist/_chunk/listbox.js +356 -0
  190. package/dist/_chunk/listbox.js.map +1 -0
  191. package/dist/_chunk/listbox.jsx +356 -0
  192. package/dist/_chunk/listbox.jsx.map +1 -0
  193. package/dist/_chunk/locale.js +173 -0
  194. package/dist/_chunk/locale.js.map +1 -0
  195. package/dist/_chunk/locale.jsx +167 -0
  196. package/dist/_chunk/locale.jsx.map +1 -0
  197. package/dist/_chunk/menu.js +519 -0
  198. package/dist/_chunk/menu.js.map +1 -0
  199. package/dist/_chunk/menu.jsx +519 -0
  200. package/dist/_chunk/menu.jsx.map +1 -0
  201. package/dist/_chunk/meter.js +33 -0
  202. package/dist/_chunk/meter.js.map +1 -0
  203. package/dist/_chunk/meter.jsx +33 -0
  204. package/dist/_chunk/meter.jsx.map +1 -0
  205. package/dist/_chunk/numberfield.js +259 -0
  206. package/dist/_chunk/numberfield.js.map +1 -0
  207. package/dist/_chunk/numberfield.jsx +259 -0
  208. package/dist/_chunk/numberfield.jsx.map +1 -0
  209. package/dist/_chunk/overlays.js +186 -0
  210. package/dist/_chunk/overlays.js.map +1 -0
  211. package/dist/_chunk/overlays.jsx +162 -0
  212. package/dist/_chunk/overlays.jsx.map +1 -0
  213. package/dist/_chunk/popover.js +574 -0
  214. package/dist/_chunk/popover.js.map +1 -0
  215. package/dist/_chunk/popover.jsx +574 -0
  216. package/dist/_chunk/popover.jsx.map +1 -0
  217. package/dist/_chunk/radio.js +320 -0
  218. package/dist/_chunk/radio.js.map +1 -0
  219. package/dist/_chunk/radio.jsx +320 -0
  220. package/dist/_chunk/radio.jsx.map +1 -0
  221. package/dist/_chunk/reactivity.js +21 -0
  222. package/dist/_chunk/reactivity.js.map +1 -0
  223. package/dist/_chunk/reactivity.jsx +21 -0
  224. package/dist/_chunk/reactivity.jsx.map +1 -0
  225. package/dist/_chunk/searchfield.js +210 -0
  226. package/dist/_chunk/searchfield.js.map +1 -0
  227. package/dist/_chunk/searchfield.jsx +210 -0
  228. package/dist/_chunk/searchfield.jsx.map +1 -0
  229. package/dist/_chunk/select.js +406 -0
  230. package/dist/_chunk/select.js.map +1 -0
  231. package/dist/_chunk/select.jsx +397 -0
  232. package/dist/_chunk/select.jsx.map +1 -0
  233. package/dist/_chunk/selection.js +666 -0
  234. package/dist/_chunk/selection.js.map +1 -0
  235. package/dist/_chunk/selection.jsx +666 -0
  236. package/dist/_chunk/selection.jsx.map +1 -0
  237. package/dist/_chunk/separator.js +29 -0
  238. package/dist/_chunk/separator.js.map +1 -0
  239. package/dist/_chunk/separator.jsx +29 -0
  240. package/dist/_chunk/separator.jsx.map +1 -0
  241. package/dist/_chunk/slider.js +256 -0
  242. package/dist/_chunk/slider.js.map +1 -0
  243. package/dist/_chunk/slider.jsx +256 -0
  244. package/dist/_chunk/slider.jsx.map +1 -0
  245. package/dist/_chunk/spinbutton.js +153 -0
  246. package/dist/_chunk/spinbutton.js.map +1 -0
  247. package/dist/_chunk/spinbutton.jsx +153 -0
  248. package/dist/_chunk/spinbutton.jsx.map +1 -0
  249. package/dist/_chunk/steplist.js +66 -0
  250. package/dist/_chunk/steplist.js.map +1 -0
  251. package/dist/_chunk/steplist.jsx +66 -0
  252. package/dist/_chunk/steplist.jsx.map +1 -0
  253. package/dist/_chunk/switch.js +34 -0
  254. package/dist/_chunk/switch.js.map +1 -0
  255. package/dist/_chunk/switch.jsx +34 -0
  256. package/dist/_chunk/switch.jsx.map +1 -0
  257. package/dist/_chunk/table.js +1088 -0
  258. package/dist/_chunk/table.js.map +1 -0
  259. package/dist/_chunk/table.jsx +1088 -0
  260. package/dist/_chunk/table.jsx.map +1 -0
  261. package/dist/_chunk/tabs.js +263 -0
  262. package/dist/_chunk/tabs.js.map +1 -0
  263. package/dist/_chunk/tabs.jsx +263 -0
  264. package/dist/_chunk/tabs.jsx.map +1 -0
  265. package/dist/_chunk/tag.js +322 -0
  266. package/dist/_chunk/tag.js.map +1 -0
  267. package/dist/_chunk/tag.jsx +322 -0
  268. package/dist/_chunk/tag.jsx.map +1 -0
  269. package/dist/_chunk/textfield.js +110 -0
  270. package/dist/_chunk/textfield.js.map +1 -0
  271. package/dist/_chunk/textfield.jsx +110 -0
  272. package/dist/_chunk/textfield.jsx.map +1 -0
  273. package/dist/_chunk/toast.js +250 -0
  274. package/dist/_chunk/toast.js.map +1 -0
  275. package/dist/_chunk/toast.jsx +250 -0
  276. package/dist/_chunk/toast.jsx.map +1 -0
  277. package/dist/_chunk/toolbar.js +226 -0
  278. package/dist/_chunk/toolbar.js.map +1 -0
  279. package/dist/_chunk/toolbar.jsx +226 -0
  280. package/dist/_chunk/toolbar.jsx.map +1 -0
  281. package/dist/_chunk/tooltip.js +185 -0
  282. package/dist/_chunk/tooltip.js.map +1 -0
  283. package/dist/_chunk/tooltip.jsx +185 -0
  284. package/dist/_chunk/tooltip.jsx.map +1 -0
  285. package/dist/_chunk/tree.js +452 -0
  286. package/dist/_chunk/tree.js.map +1 -0
  287. package/dist/_chunk/tree.jsx +452 -0
  288. package/dist/_chunk/tree.jsx.map +1 -0
  289. package/dist/_chunk/utils.js +705 -0
  290. package/dist/_chunk/utils.js.map +1 -0
  291. package/dist/_chunk/utils.jsx +705 -0
  292. package/dist/_chunk/utils.jsx.map +1 -0
  293. package/dist/_chunk/visually-hidden.js +93 -0
  294. package/dist/_chunk/visually-hidden.js.map +1 -0
  295. package/dist/_chunk/visually-hidden.jsx +93 -0
  296. package/dist/_chunk/visually-hidden.jsx.map +1 -0
  297. package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
  298. package/dist/actiongroup/index.js +2 -0
  299. package/dist/actiongroup/index.jsx +2 -0
  300. package/dist/autocomplete/createAutocomplete.d.ts +12 -7
  301. package/dist/autocomplete/createAutocomplete.d.ts.map +1 -1
  302. package/dist/autocomplete/index.js +2 -0
  303. package/dist/autocomplete/index.jsx +2 -0
  304. package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -1
  305. package/dist/breadcrumbs/index.js +2 -0
  306. package/dist/breadcrumbs/index.jsx +2 -0
  307. package/dist/button/createToggleButtonGroup.d.ts.map +1 -1
  308. package/dist/button/index.js +2 -0
  309. package/dist/button/index.jsx +2 -0
  310. package/dist/calendar/createCalendar.d.ts.map +1 -1
  311. package/dist/calendar/createCalendarCell.d.ts.map +1 -1
  312. package/dist/calendar/createCalendarGrid.d.ts.map +1 -1
  313. package/dist/calendar/createCalendarMonthPicker.d.ts +41 -0
  314. package/dist/calendar/createCalendarMonthPicker.d.ts.map +1 -0
  315. package/dist/calendar/createCalendarYearPicker.d.ts +49 -0
  316. package/dist/calendar/createCalendarYearPicker.d.ts.map +1 -0
  317. package/dist/calendar/createRangeCalendar.d.ts.map +1 -1
  318. package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -1
  319. package/dist/calendar/index.d.ts +2 -0
  320. package/dist/calendar/index.d.ts.map +1 -1
  321. package/dist/calendar/index.js +2 -0
  322. package/dist/calendar/index.jsx +2 -0
  323. package/dist/calendar/intl/index.d.ts +1 -1
  324. package/dist/calendar/intl/index.d.ts.map +1 -1
  325. package/dist/calendar/utils.d.ts +4 -0
  326. package/dist/calendar/utils.d.ts.map +1 -1
  327. package/dist/checkbox/createCheckbox.d.ts +4 -0
  328. package/dist/checkbox/createCheckbox.d.ts.map +1 -1
  329. package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -1
  330. package/dist/checkbox/index.js +2 -0
  331. package/dist/checkbox/index.jsx +2 -0
  332. package/dist/collections/index.js +160 -0
  333. package/dist/collections/index.js.map +1 -0
  334. package/dist/collections/index.jsx +160 -0
  335. package/dist/collections/index.jsx.map +1 -0
  336. package/dist/color/createColorArea.d.ts.map +1 -1
  337. package/dist/color/createColorField.d.ts.map +1 -1
  338. package/dist/color/createColorSlider.d.ts.map +1 -1
  339. package/dist/color/createColorSwatch.d.ts.map +1 -1
  340. package/dist/color/createColorWheel.d.ts.map +1 -1
  341. package/dist/color/index.js +2 -0
  342. package/dist/color/index.jsx +2 -0
  343. package/dist/color/intl/index.d.ts +30 -0
  344. package/dist/color/intl/index.d.ts.map +1 -0
  345. package/dist/combobox/createComboBox.d.ts.map +1 -1
  346. package/dist/combobox/index.js +2 -0
  347. package/dist/combobox/index.jsx +2 -0
  348. package/dist/combobox/intl/generated-locales.d.ts +16 -0
  349. package/dist/combobox/intl/generated-locales.d.ts.map +1 -0
  350. package/dist/combobox/intl/index.d.ts +2 -2
  351. package/dist/combobox/intl/index.d.ts.map +1 -1
  352. package/dist/datepicker/createDateField.d.ts +45 -23
  353. package/dist/datepicker/createDateField.d.ts.map +1 -1
  354. package/dist/datepicker/createDatePicker.d.ts +34 -6
  355. package/dist/datepicker/createDatePicker.d.ts.map +1 -1
  356. package/dist/datepicker/createDatePickerGroup.d.ts +13 -13
  357. package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -1
  358. package/dist/datepicker/createDateRangePicker.d.ts +55 -7
  359. package/dist/datepicker/createDateRangePicker.d.ts.map +1 -1
  360. package/dist/datepicker/createDateSegment.d.ts +6 -15
  361. package/dist/datepicker/createDateSegment.d.ts.map +1 -1
  362. package/dist/datepicker/createDisplayNames.d.ts +17 -0
  363. package/dist/datepicker/createDisplayNames.d.ts.map +1 -0
  364. package/dist/datepicker/createTimeField.d.ts +12 -49
  365. package/dist/datepicker/createTimeField.d.ts.map +1 -1
  366. package/dist/datepicker/index.d.ts +3 -3
  367. package/dist/datepicker/index.d.ts.map +1 -1
  368. package/dist/datepicker/index.js +2 -0
  369. package/dist/datepicker/index.jsx +2 -0
  370. package/dist/datepicker/intl.d.ts +12 -0
  371. package/dist/datepicker/intl.d.ts.map +1 -0
  372. package/dist/dialog/index.js +2 -0
  373. package/dist/dialog/index.jsx +2 -0
  374. package/dist/disclosure/index.js +2 -0
  375. package/dist/disclosure/index.jsx +2 -0
  376. package/dist/dnd/DragManager.d.ts +86 -0
  377. package/dist/dnd/DragManager.d.ts.map +1 -0
  378. package/dist/dnd/DropTargetKeyboardNavigation.d.ts +42 -0
  379. package/dist/dnd/DropTargetKeyboardNavigation.d.ts.map +1 -0
  380. package/dist/dnd/createDrag.d.ts.map +1 -1
  381. package/dist/dnd/createDraggableCollection.d.ts.map +1 -1
  382. package/dist/dnd/createDraggableItem.d.ts +12 -7
  383. package/dist/dnd/createDraggableItem.d.ts.map +1 -1
  384. package/dist/dnd/createDroppableCollection.d.ts +7 -15
  385. package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
  386. package/dist/dnd/index.d.ts +5 -1
  387. package/dist/dnd/index.d.ts.map +1 -1
  388. package/dist/dnd/index.js +3 -0
  389. package/dist/dnd/index.jsx +3 -0
  390. package/dist/dnd/intl/index.d.ts +39 -0
  391. package/dist/dnd/intl/index.d.ts.map +1 -0
  392. package/dist/dnd/utils.d.ts +7 -2
  393. package/dist/dnd/utils.d.ts.map +1 -1
  394. package/dist/focus/FocusScope.d.ts +7 -0
  395. package/dist/focus/FocusScope.d.ts.map +1 -1
  396. package/dist/focus/index.d.ts +2 -1
  397. package/dist/focus/index.d.ts.map +1 -1
  398. package/dist/focus/index.js +3 -0
  399. package/dist/focus/index.jsx +3 -0
  400. package/dist/focus/virtualFocus.d.ts +26 -0
  401. package/dist/focus/virtualFocus.d.ts.map +1 -0
  402. package/dist/form/createFormValidation.d.ts.map +1 -1
  403. package/dist/form/index.js +3 -0
  404. package/dist/form/index.jsx +3 -0
  405. package/dist/grid/index.js +2 -0
  406. package/dist/grid/index.jsx +2 -0
  407. package/dist/gridlist/createGridList.d.ts +7 -1
  408. package/dist/gridlist/createGridList.d.ts.map +1 -1
  409. package/dist/gridlist/createGridListItem.d.ts +1 -1
  410. package/dist/gridlist/createGridListItem.d.ts.map +1 -1
  411. package/dist/gridlist/createGridListSection.d.ts +15 -0
  412. package/dist/gridlist/createGridListSection.d.ts.map +1 -0
  413. package/dist/gridlist/index.d.ts +2 -1
  414. package/dist/gridlist/index.d.ts.map +1 -1
  415. package/dist/gridlist/index.js +2 -0
  416. package/dist/gridlist/index.jsx +2 -0
  417. package/dist/gridlist/types.d.ts +50 -0
  418. package/dist/gridlist/types.d.ts.map +1 -1
  419. package/dist/i18n/index.js +5 -0
  420. package/dist/i18n/index.jsx +5 -0
  421. package/dist/index.d.ts +10 -6
  422. package/dist/index.d.ts.map +1 -1
  423. package/dist/index.js +77 -18311
  424. package/dist/index.jsx +77 -18242
  425. package/dist/interactions/FocusableProvider.d.ts.map +1 -1
  426. package/dist/interactions/PressEvent.d.ts +11 -0
  427. package/dist/interactions/PressEvent.d.ts.map +1 -1
  428. package/dist/interactions/createFocus.d.ts.map +1 -1
  429. package/dist/interactions/createFocusWithin.d.ts.map +1 -1
  430. package/dist/interactions/createInteractionModality.d.ts +0 -1
  431. package/dist/interactions/createInteractionModality.d.ts.map +1 -1
  432. package/dist/interactions/createKeyboard.d.ts.map +1 -1
  433. package/dist/interactions/createPress.d.ts.map +1 -1
  434. package/dist/interactions/index.js +9 -0
  435. package/dist/interactions/index.jsx +9 -0
  436. package/dist/label/createLabels.d.ts.map +1 -1
  437. package/dist/label/index.js +4 -0
  438. package/dist/label/index.jsx +4 -0
  439. package/dist/landmark/index.js +2 -0
  440. package/dist/landmark/index.jsx +2 -0
  441. package/dist/link/index.js +2 -0
  442. package/dist/link/index.jsx +2 -0
  443. package/dist/listbox/createListBox.d.ts +37 -0
  444. package/dist/listbox/createListBox.d.ts.map +1 -1
  445. package/dist/listbox/createOption.d.ts +7 -1
  446. package/dist/listbox/createOption.d.ts.map +1 -1
  447. package/dist/listbox/index.js +2 -0
  448. package/dist/listbox/index.jsx +2 -0
  449. package/dist/live-announcer/index.js +2 -0
  450. package/dist/live-announcer/index.jsx +2 -0
  451. package/dist/menu/createMenu.d.ts +7 -4
  452. package/dist/menu/createMenu.d.ts.map +1 -1
  453. package/dist/menu/createMenuItem.d.ts +9 -1
  454. package/dist/menu/createMenuItem.d.ts.map +1 -1
  455. package/dist/menu/index.js +2 -0
  456. package/dist/menu/index.jsx +2 -0
  457. package/dist/meter/index.js +2 -0
  458. package/dist/meter/index.jsx +2 -0
  459. package/dist/numberfield/createNumberField.d.ts.map +1 -1
  460. package/dist/numberfield/index.js +2 -0
  461. package/dist/numberfield/index.jsx +2 -0
  462. package/dist/overlays/index.js +4 -0
  463. package/dist/overlays/index.jsx +4 -0
  464. package/dist/popover/calculatePosition.d.ts +2 -0
  465. package/dist/popover/calculatePosition.d.ts.map +1 -1
  466. package/dist/popover/createOverlayPosition.d.ts +8 -0
  467. package/dist/popover/createOverlayPosition.d.ts.map +1 -1
  468. package/dist/popover/index.js +2 -0
  469. package/dist/popover/index.jsx +2 -0
  470. package/dist/progress/index.js +2 -0
  471. package/dist/progress/index.jsx +2 -0
  472. package/dist/radio/createRadio.d.ts +2 -0
  473. package/dist/radio/createRadio.d.ts.map +1 -1
  474. package/dist/radio/index.js +2 -0
  475. package/dist/radio/index.jsx +2 -0
  476. package/dist/searchfield/index.js +2 -0
  477. package/dist/searchfield/index.jsx +2 -0
  478. package/dist/select/createSelect.d.ts +2 -0
  479. package/dist/select/createSelect.d.ts.map +1 -1
  480. package/dist/select/index.js +2 -0
  481. package/dist/select/index.jsx +2 -0
  482. package/dist/selection/DOMLayoutDelegate.d.ts +58 -0
  483. package/dist/selection/DOMLayoutDelegate.d.ts.map +1 -0
  484. package/dist/selection/ListKeyboardDelegate.d.ts +95 -0
  485. package/dist/selection/ListKeyboardDelegate.d.ts.map +1 -0
  486. package/dist/selection/constants.d.ts +15 -0
  487. package/dist/selection/constants.d.ts.map +1 -0
  488. package/dist/selection/createCollectionRowInteraction.d.ts +13 -0
  489. package/dist/selection/createCollectionRowInteraction.d.ts.map +1 -0
  490. package/dist/selection/createScrollIntoViewOnFocus.d.ts +31 -0
  491. package/dist/selection/createScrollIntoViewOnFocus.d.ts.map +1 -0
  492. package/dist/selection/createSelectableCollection.d.ts +69 -0
  493. package/dist/selection/createSelectableCollection.d.ts.map +1 -0
  494. package/dist/selection/createSelectableItem.d.ts +154 -0
  495. package/dist/selection/createSelectableItem.d.ts.map +1 -0
  496. package/dist/selection/createSelectableList.d.ts +43 -0
  497. package/dist/selection/createSelectableList.d.ts.map +1 -0
  498. package/dist/selection/createTypeSelect.d.ts.map +1 -1
  499. package/dist/selection/index.d.ts +9 -0
  500. package/dist/selection/index.d.ts.map +1 -1
  501. package/dist/selection/index.js +5 -0
  502. package/dist/selection/index.jsx +5 -0
  503. package/dist/selection/selectItem.d.ts +29 -0
  504. package/dist/selection/selectItem.d.ts.map +1 -0
  505. package/dist/selection/utils.d.ts +40 -0
  506. package/dist/selection/utils.d.ts.map +1 -0
  507. package/dist/separator/index.js +2 -0
  508. package/dist/separator/index.jsx +2 -0
  509. package/dist/slider/createSlider.d.ts.map +1 -1
  510. package/dist/slider/index.js +2 -0
  511. package/dist/slider/index.jsx +2 -0
  512. package/dist/spinbutton/createSpinButton.d.ts +41 -0
  513. package/dist/spinbutton/createSpinButton.d.ts.map +1 -0
  514. package/dist/spinbutton/index.d.ts +3 -0
  515. package/dist/spinbutton/index.d.ts.map +1 -0
  516. package/dist/spinbutton/index.js +2 -0
  517. package/dist/spinbutton/index.jsx +2 -0
  518. package/dist/spinbutton/intl.d.ts +5 -0
  519. package/dist/spinbutton/intl.d.ts.map +1 -0
  520. package/dist/ssr/index.d.ts +17 -0
  521. package/dist/ssr/index.d.ts.map +1 -1
  522. package/dist/ssr/index.js +299 -0
  523. package/dist/ssr/index.js.map +1 -0
  524. package/dist/ssr/index.jsx +292 -0
  525. package/dist/ssr/index.jsx.map +1 -0
  526. package/dist/steplist/index.js +2 -0
  527. package/dist/steplist/index.jsx +2 -0
  528. package/dist/switch/createSwitch.d.ts +4 -0
  529. package/dist/switch/createSwitch.d.ts.map +1 -1
  530. package/dist/switch/index.js +2 -0
  531. package/dist/switch/index.jsx +2 -0
  532. package/dist/table/createTable.d.ts.map +1 -1
  533. package/dist/table/createTableColumnHeader.d.ts.map +1 -1
  534. package/dist/table/createTableRow.d.ts +1 -1
  535. package/dist/table/createTableRow.d.ts.map +1 -1
  536. package/dist/table/createTableSelectAllCheckbox.d.ts.map +1 -1
  537. package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -1
  538. package/dist/table/index.js +2 -0
  539. package/dist/table/index.jsx +2 -0
  540. package/dist/table/types.d.ts +35 -1
  541. package/dist/table/types.d.ts.map +1 -1
  542. package/dist/table/utils.d.ts +15 -0
  543. package/dist/table/utils.d.ts.map +1 -0
  544. package/dist/tabs/createTabs.d.ts +5 -3
  545. package/dist/tabs/createTabs.d.ts.map +1 -1
  546. package/dist/tabs/index.js +2 -0
  547. package/dist/tabs/index.jsx +2 -0
  548. package/dist/tag/createTag.d.ts +2 -0
  549. package/dist/tag/createTag.d.ts.map +1 -1
  550. package/dist/tag/createTagGroup.d.ts +7 -0
  551. package/dist/tag/createTagGroup.d.ts.map +1 -1
  552. package/dist/tag/index.js +2 -0
  553. package/dist/tag/index.jsx +2 -0
  554. package/dist/textfield/index.js +2 -0
  555. package/dist/textfield/index.jsx +2 -0
  556. package/dist/toast/createToast.d.ts.map +1 -1
  557. package/dist/toast/index.js +2 -0
  558. package/dist/toast/index.jsx +2 -0
  559. package/dist/toggle/createToggle.d.ts +4 -0
  560. package/dist/toggle/createToggle.d.ts.map +1 -1
  561. package/dist/toggle/index.js +3 -0
  562. package/dist/toggle/index.jsx +3 -0
  563. package/dist/toolbar/createToolbar.d.ts +1 -1
  564. package/dist/toolbar/createToolbar.d.ts.map +1 -1
  565. package/dist/toolbar/index.js +2 -0
  566. package/dist/toolbar/index.jsx +2 -0
  567. package/dist/tooltip/index.js +2 -0
  568. package/dist/tooltip/index.jsx +2 -0
  569. package/dist/tree/createTree.d.ts +5 -1
  570. package/dist/tree/createTree.d.ts.map +1 -1
  571. package/dist/tree/createTreeItem.d.ts +1 -1
  572. package/dist/tree/createTreeItem.d.ts.map +1 -1
  573. package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -1
  574. package/dist/tree/index.js +2 -0
  575. package/dist/tree/index.jsx +2 -0
  576. package/dist/tree/types.d.ts +10 -0
  577. package/dist/tree/types.d.ts.map +1 -1
  578. package/dist/utils/animation.d.ts +60 -0
  579. package/dist/utils/animation.d.ts.map +1 -0
  580. package/dist/utils/dom.d.ts +49 -2
  581. package/dist/utils/dom.d.ts.map +1 -1
  582. package/dist/utils/index.d.ts +4 -1
  583. package/dist/utils/index.d.ts.map +1 -1
  584. package/dist/utils/index.js +6 -0
  585. package/dist/utils/index.jsx +6 -0
  586. package/dist/utils/keyboard.d.ts +17 -0
  587. package/dist/utils/keyboard.d.ts.map +1 -0
  588. package/dist/utils/mergeProps.d.ts.map +1 -1
  589. package/dist/utils/scrollIntoView.d.ts +30 -0
  590. package/dist/utils/scrollIntoView.d.ts.map +1 -0
  591. package/dist/visually-hidden/index.js +2 -0
  592. package/dist/visually-hidden/index.jsx +2 -0
  593. package/package.json +304 -3
  594. package/src/actiongroup/createActionGroup.ts +26 -109
  595. package/src/autocomplete/createAutocomplete.ts +202 -35
  596. package/src/breadcrumbs/createBreadcrumbs.ts +12 -4
  597. package/src/button/createToggleButtonGroup.ts +19 -14
  598. package/src/calendar/createCalendar.ts +5 -4
  599. package/src/calendar/createCalendarCell.ts +36 -5
  600. package/src/calendar/createCalendarGrid.ts +47 -12
  601. package/src/calendar/createCalendarMonthPicker.ts +105 -0
  602. package/src/calendar/createCalendarYearPicker.ts +144 -0
  603. package/src/calendar/createRangeCalendar.ts +27 -15
  604. package/src/calendar/createRangeCalendarCell.ts +17 -3
  605. package/src/calendar/index.ts +17 -0
  606. package/src/calendar/intl/index.ts +8 -0
  607. package/src/calendar/utils.ts +4 -0
  608. package/src/checkbox/createCheckbox.ts +10 -0
  609. package/src/checkbox/createCheckboxGroupItem.ts +12 -16
  610. package/src/color/createColorArea.ts +17 -10
  611. package/src/color/createColorField.ts +8 -1
  612. package/src/color/createColorSlider.ts +1 -2
  613. package/src/color/createColorSwatch.ts +4 -2
  614. package/src/color/createColorWheel.ts +0 -6
  615. package/src/color/intl/index.ts +316 -0
  616. package/src/combobox/createComboBox.ts +35 -4
  617. package/src/combobox/intl/generated-locales.ts +635 -0
  618. package/src/combobox/intl/index.ts +8 -2
  619. package/src/datepicker/createDateField.ts +228 -213
  620. package/src/datepicker/createDatePicker.ts +157 -146
  621. package/src/datepicker/createDatePickerGroup.ts +88 -82
  622. package/src/datepicker/createDateRangePicker.ts +230 -179
  623. package/src/datepicker/createDateSegment.ts +386 -384
  624. package/src/datepicker/createDisplayNames.ts +45 -0
  625. package/src/datepicker/createTimeField.ts +36 -129
  626. package/src/datepicker/index.ts +13 -14
  627. package/src/datepicker/intl.ts +633 -0
  628. package/src/dnd/DragManager.ts +693 -0
  629. package/src/dnd/DropTargetKeyboardNavigation.ts +337 -0
  630. package/src/dnd/createDrag.ts +31 -5
  631. package/src/dnd/createDraggableCollection.ts +33 -15
  632. package/src/dnd/createDraggableItem.ts +92 -5
  633. package/src/dnd/createDroppableCollection.ts +488 -371
  634. package/src/dnd/index.ts +11 -0
  635. package/src/dnd/intl/ar-AE.json +29 -0
  636. package/src/dnd/intl/bg-BG.json +29 -0
  637. package/src/dnd/intl/cs-CZ.json +29 -0
  638. package/src/dnd/intl/da-DK.json +29 -0
  639. package/src/dnd/intl/de-DE.json +29 -0
  640. package/src/dnd/intl/el-GR.json +29 -0
  641. package/src/dnd/intl/en-US.json +29 -0
  642. package/src/dnd/intl/es-ES.json +29 -0
  643. package/src/dnd/intl/et-EE.json +29 -0
  644. package/src/dnd/intl/fi-FI.json +29 -0
  645. package/src/dnd/intl/fr-FR.json +29 -0
  646. package/src/dnd/intl/he-IL.json +29 -0
  647. package/src/dnd/intl/hr-HR.json +29 -0
  648. package/src/dnd/intl/hu-HU.json +29 -0
  649. package/src/dnd/intl/index.ts +139 -0
  650. package/src/dnd/intl/it-IT.json +29 -0
  651. package/src/dnd/intl/ja-JP.json +29 -0
  652. package/src/dnd/intl/ko-KR.json +29 -0
  653. package/src/dnd/intl/lt-LT.json +29 -0
  654. package/src/dnd/intl/lv-LV.json +29 -0
  655. package/src/dnd/intl/nb-NO.json +29 -0
  656. package/src/dnd/intl/nl-NL.json +29 -0
  657. package/src/dnd/intl/pl-PL.json +29 -0
  658. package/src/dnd/intl/pt-BR.json +29 -0
  659. package/src/dnd/intl/pt-PT.json +29 -0
  660. package/src/dnd/intl/ro-RO.json +29 -0
  661. package/src/dnd/intl/ru-RU.json +29 -0
  662. package/src/dnd/intl/sk-SK.json +29 -0
  663. package/src/dnd/intl/sl-SI.json +29 -0
  664. package/src/dnd/intl/sr-SP.json +29 -0
  665. package/src/dnd/intl/sv-SE.json +29 -0
  666. package/src/dnd/intl/tr-TR.json +29 -0
  667. package/src/dnd/intl/uk-UA.json +29 -0
  668. package/src/dnd/intl/zh-CN.json +29 -0
  669. package/src/dnd/intl/zh-TW.json +29 -0
  670. package/src/dnd/utils.ts +63 -3
  671. package/src/focus/FocusScope.tsx +266 -24
  672. package/src/focus/index.ts +8 -0
  673. package/src/focus/virtualFocus.ts +55 -0
  674. package/src/form/createFormValidation.ts +8 -1
  675. package/src/gridlist/createGridList.ts +187 -48
  676. package/src/gridlist/createGridListItem.ts +87 -155
  677. package/src/gridlist/createGridListSection.ts +54 -0
  678. package/src/gridlist/index.ts +3 -0
  679. package/src/gridlist/types.ts +47 -0
  680. package/src/index.ts +51 -3
  681. package/src/interactions/FocusableProvider.tsx +11 -6
  682. package/src/interactions/PressEvent.ts +14 -0
  683. package/src/interactions/createFocus.ts +26 -21
  684. package/src/interactions/createFocusWithin.ts +23 -24
  685. package/src/interactions/createInteractionModality.ts +26 -15
  686. package/src/interactions/createKeyboard.ts +10 -0
  687. package/src/interactions/createPress.ts +29 -6
  688. package/src/label/createLabels.ts +7 -4
  689. package/src/listbox/createListBox.ts +203 -10
  690. package/src/listbox/createOption.ts +84 -74
  691. package/src/menu/createMenu.ts +93 -16
  692. package/src/menu/createMenuItem.ts +253 -41
  693. package/src/numberfield/createNumberField.ts +82 -14
  694. package/src/popover/calculatePosition.ts +19 -7
  695. package/src/popover/createOverlayPosition.ts +9 -0
  696. package/src/radio/createRadio.ts +19 -2
  697. package/src/select/createSelect.ts +41 -4
  698. package/src/selection/DOMLayoutDelegate.ts +102 -0
  699. package/src/selection/ListKeyboardDelegate.ts +398 -0
  700. package/src/selection/constants.ts +16 -0
  701. package/src/selection/createCollectionRowInteraction.ts +209 -0
  702. package/src/selection/createScrollIntoViewOnFocus.ts +65 -0
  703. package/src/selection/createSelectableCollection.ts +645 -0
  704. package/src/selection/createSelectableItem.ts +512 -0
  705. package/src/selection/createSelectableList.ts +93 -0
  706. package/src/selection/createTypeSelect.ts +112 -51
  707. package/src/selection/index.ts +31 -0
  708. package/src/selection/selectItem.ts +80 -0
  709. package/src/selection/utils.ts +82 -0
  710. package/src/slider/createSlider.ts +48 -1
  711. package/src/spinbutton/createSpinButton.ts +163 -0
  712. package/src/spinbutton/index.ts +10 -0
  713. package/src/spinbutton/intl.ts +115 -0
  714. package/src/ssr/index.tsx +31 -0
  715. package/src/switch/createSwitch.ts +10 -0
  716. package/src/table/createTable.ts +82 -27
  717. package/src/table/createTableColumnHeader.ts +10 -0
  718. package/src/table/createTableRow.ts +208 -203
  719. package/src/table/createTableSelectAllCheckbox.ts +3 -4
  720. package/src/table/createTableSelectionCheckbox.ts +24 -1
  721. package/src/table/types.ts +37 -1
  722. package/src/table/utils.ts +41 -0
  723. package/src/tabs/createTabs.ts +95 -24
  724. package/src/tag/createTag.ts +30 -36
  725. package/src/tag/createTagGroup.ts +92 -0
  726. package/src/toast/createToast.ts +1 -0
  727. package/src/toggle/createToggle.ts +20 -0
  728. package/src/toolbar/createToolbar.ts +43 -94
  729. package/src/tree/createTree.ts +165 -52
  730. package/src/tree/createTreeItem.ts +105 -120
  731. package/src/tree/createTreeSelectionCheckbox.ts +14 -1
  732. package/src/tree/types.ts +10 -0
  733. package/src/utils/animation.ts +243 -0
  734. package/src/utils/dom.ts +216 -25
  735. package/src/utils/index.ts +10 -0
  736. package/src/utils/keyboard.ts +25 -0
  737. package/src/utils/mergeProps.ts +8 -1
  738. package/src/utils/scrollIntoView.ts +181 -0
  739. package/dist/datepicker/createTimeSegment.d.ts +0 -29
  740. package/dist/datepicker/createTimeSegment.d.ts.map +0 -1
  741. package/dist/index.js.map +0 -1
  742. package/dist/index.jsx.map +0 -1
  743. package/src/datepicker/createTimeSegment.ts +0 -352
@@ -0,0 +1,1088 @@
1
+ import { i as mergeProps$1 } from "./env.jsx";
2
+ import { S as scrollIntoViewport, i as createDescription } from "./utils.jsx";
3
+ import { o as getInteractionModality } from "./createInteractionModality.jsx";
4
+ import { i as useLocale } from "./locale.jsx";
5
+ import { n as createSelectableItem } from "./createSelectableItem.jsx";
6
+ import { t as announce } from "./announce.jsx";
7
+ import { createEffect, createMemo, createSignal, on } from "solid-js";
8
+ import { createId } from "@proyecto-viviana/solid-stately";
9
+ //#region src/table/createTable.ts
10
+ /**
11
+ * createTable - Provides accessibility for a table component.
12
+ * Based on @react-aria/table/useTable.
13
+ */
14
+ const tableMap = /* @__PURE__ */ new WeakMap();
15
+ /**
16
+ * Get the table metadata for child components.
17
+ */
18
+ function getTableData(state) {
19
+ return tableMap.get(state);
20
+ }
21
+ /**
22
+ * Helper to get cells from a row by iterating children
23
+ */
24
+ function getChildCells(collection, rowKey) {
25
+ return [...collection.getChildren(rowKey)].filter((node) => node.type === "cell" || node.type === "rowheader");
26
+ }
27
+ /**
28
+ * Helper to get cell at specific index in a row
29
+ */
30
+ function getCellAtIndex(collection, rowKey, index) {
31
+ return getChildCells(collection, rowKey)[index] ?? null;
32
+ }
33
+ /**
34
+ * Helper to check if a node is a cell
35
+ */
36
+ function isCell(node) {
37
+ return node?.type === "cell" || node?.type === "rowheader";
38
+ }
39
+ /**
40
+ * Helper to check if a node is a row
41
+ */
42
+ function isRow(node) {
43
+ return node?.type === "item";
44
+ }
45
+ /**
46
+ * Creates accessibility props for a table component.
47
+ */
48
+ function createTable(props, state, ref) {
49
+ const id = createId(props().id);
50
+ const locale = useLocale();
51
+ let prevSortDescriptor = null;
52
+ let isFirstRender = true;
53
+ let typeaheadBuffer = "";
54
+ let typeaheadTimeout;
55
+ const storeTableData = () => {
56
+ const s = state();
57
+ const p = props();
58
+ tableMap.set(s, {
59
+ tableId: id,
60
+ actions: {
61
+ onRowAction: p.onRowAction,
62
+ onCellAction: p.onCellAction
63
+ },
64
+ shouldSelectOnPressUp: p.shouldSelectOnPressUp,
65
+ focusMode: p.focusMode
66
+ });
67
+ };
68
+ createMemo(() => {
69
+ storeTableData();
70
+ });
71
+ createEffect(on(() => state().sortDescriptor, (sortDescriptor) => {
72
+ if (isFirstRender) {
73
+ isFirstRender = false;
74
+ prevSortDescriptor = sortDescriptor;
75
+ return;
76
+ }
77
+ if (sortDescriptor && (sortDescriptor.column !== prevSortDescriptor?.column || sortDescriptor.direction !== prevSortDescriptor?.direction)) announce(`Sorted by ${state().collection.columns.find((c) => c.key === sortDescriptor.column)?.textValue ?? String(sortDescriptor.column)}, ${sortDescriptor.direction === "ascending" ? "ascending" : "descending"}`, "assertive", 500);
78
+ prevSortDescriptor = sortDescriptor;
79
+ }));
80
+ const onKeyDown = (e) => {
81
+ const s = state();
82
+ const collection = s.collection;
83
+ const p = props();
84
+ const focusMode = p.focusMode ?? "row";
85
+ const isRTL = locale().direction === "rtl";
86
+ const setFocusedKey = (key) => {
87
+ s.setFocusedKey(key);
88
+ };
89
+ const runTypeahead = (focusedKey, focusedItem) => {
90
+ if (e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) return false;
91
+ if (e.key === " " && typeaheadBuffer.length === 0) return false;
92
+ typeaheadBuffer += e.key.toLocaleLowerCase();
93
+ if (typeaheadTimeout) clearTimeout(typeaheadTimeout);
94
+ typeaheadTimeout = setTimeout(() => {
95
+ typeaheadBuffer = "";
96
+ typeaheadTimeout = void 0;
97
+ }, 500);
98
+ const rows = Array.from(collection).filter((node) => !s.isDisabled(node.key));
99
+ if (rows.length === 0) return true;
100
+ const currentRowKey = isCell(focusedItem) && focusedItem.parentKey != null ? focusedItem.parentKey : focusedKey;
101
+ const currentIndex = rows.findIndex((node) => node.key === currentRowKey);
102
+ const match = (currentIndex >= 0 ? [...rows.slice(currentIndex + 1), ...rows.slice(0, currentIndex + 1)] : rows).find((node) => collection.getTextValue(node.key).toLocaleLowerCase().startsWith(typeaheadBuffer));
103
+ if (match) {
104
+ e.preventDefault();
105
+ setFocusedKey(match.key);
106
+ }
107
+ return true;
108
+ };
109
+ if (s.isKeyboardNavigationDisabled) return;
110
+ const focusedKey = s.focusedKey;
111
+ if (focusedKey == null) {
112
+ if (e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End") {
113
+ const firstKey = collection.getFirstKey();
114
+ if (firstKey != null) {
115
+ e.preventDefault();
116
+ setFocusedKey(firstKey);
117
+ }
118
+ }
119
+ return;
120
+ }
121
+ const focusedItem = collection.getItem(focusedKey);
122
+ if (!focusedItem) return;
123
+ let nextKey = null;
124
+ switch (e.key) {
125
+ case "ArrowDown":
126
+ e.preventDefault();
127
+ if (isCell(focusedItem) && focusedItem.parentKey != null) {
128
+ const nextRowKey = collection.getKeyAfter(focusedItem.parentKey);
129
+ if (nextRowKey != null) {
130
+ const cellIndex = focusedItem.index;
131
+ nextKey = getCellAtIndex(collection, nextRowKey, cellIndex)?.key ?? nextRowKey;
132
+ }
133
+ } else nextKey = collection.getKeyAfter(focusedKey);
134
+ break;
135
+ case "ArrowUp":
136
+ e.preventDefault();
137
+ if (isCell(focusedItem) && focusedItem.parentKey != null) {
138
+ const prevRowKey = collection.getKeyBefore(focusedItem.parentKey);
139
+ if (prevRowKey != null) {
140
+ const cellIndex = focusedItem.index;
141
+ nextKey = getCellAtIndex(collection, prevRowKey, cellIndex)?.key ?? prevRowKey;
142
+ }
143
+ } else nextKey = collection.getKeyBefore(focusedKey);
144
+ break;
145
+ case "ArrowRight": {
146
+ e.preventDefault();
147
+ const goNext = !isRTL;
148
+ if (isRow(focusedItem)) {
149
+ const cells = getChildCells(collection, focusedKey);
150
+ if (cells.length > 0) nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;
151
+ } else if (isCell(focusedItem) && focusedItem.parentKey != null) {
152
+ const cells = getChildCells(collection, focusedItem.parentKey);
153
+ const currentIndex = focusedItem.index;
154
+ const targetIndex = goNext ? currentIndex + 1 : currentIndex - 1;
155
+ if (targetIndex >= 0 && targetIndex < cells.length) nextKey = cells[targetIndex].key;
156
+ else if (focusMode === "row") nextKey = focusedItem.parentKey;
157
+ else nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;
158
+ }
159
+ break;
160
+ }
161
+ case "ArrowLeft": {
162
+ e.preventDefault();
163
+ const goNext = isRTL;
164
+ if (isRow(focusedItem)) {
165
+ const cells = getChildCells(collection, focusedKey);
166
+ if (cells.length > 0) nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;
167
+ } else if (isCell(focusedItem) && focusedItem.parentKey != null) {
168
+ const cells = getChildCells(collection, focusedItem.parentKey);
169
+ const currentIndex = focusedItem.index;
170
+ const targetIndex = goNext ? currentIndex + 1 : currentIndex - 1;
171
+ if (targetIndex >= 0 && targetIndex < cells.length) nextKey = cells[targetIndex].key;
172
+ else if (focusMode === "row") nextKey = focusedItem.parentKey;
173
+ else nextKey = goNext ? cells[0].key : cells[cells.length - 1].key;
174
+ }
175
+ break;
176
+ }
177
+ case "Home":
178
+ e.preventDefault();
179
+ if (e.ctrlKey) {
180
+ const firstRowKey = collection.getFirstKey();
181
+ if (firstRowKey != null) if (isCell(focusedItem) || focusMode === "cell") nextKey = getChildCells(collection, firstRowKey)[0]?.key ?? firstRowKey;
182
+ else nextKey = firstRowKey;
183
+ } else if (isCell(focusedItem) && focusedItem.parentKey != null) nextKey = getChildCells(collection, focusedItem.parentKey)[0]?.key ?? null;
184
+ else nextKey = collection.getFirstKey();
185
+ break;
186
+ case "End":
187
+ e.preventDefault();
188
+ if (e.ctrlKey) {
189
+ const lastRowKey = collection.getLastKey();
190
+ if (lastRowKey != null) if (isCell(focusedItem) || focusMode === "cell") {
191
+ const cells = getChildCells(collection, lastRowKey);
192
+ nextKey = cells[cells.length - 1]?.key ?? lastRowKey;
193
+ } else nextKey = lastRowKey;
194
+ } else if (isCell(focusedItem) && focusedItem.parentKey != null) {
195
+ const cells = getChildCells(collection, focusedItem.parentKey);
196
+ nextKey = cells[cells.length - 1]?.key ?? null;
197
+ } else nextKey = collection.getLastKey();
198
+ break;
199
+ case "PageDown": {
200
+ e.preventDefault();
201
+ const el = ref();
202
+ if (el && el.clientHeight > 0) {
203
+ const visibleHeight = el.clientHeight;
204
+ let currentKey = focusedKey;
205
+ let traveled = 0;
206
+ if (isCell(focusedItem) && focusedItem.parentKey != null) currentKey = focusedItem.parentKey;
207
+ while (currentKey != null && traveled < visibleHeight) {
208
+ const next = collection.getKeyAfter(currentKey);
209
+ if (next == null) break;
210
+ const rowElement = el.querySelector(`[data-key="${currentKey}"]`);
211
+ traveled += rowElement?.clientHeight ?? 40;
212
+ currentKey = next;
213
+ }
214
+ if (currentKey != null) if (isCell(focusedItem)) {
215
+ const cellIndex = focusedItem.index;
216
+ nextKey = getCellAtIndex(collection, currentKey, cellIndex)?.key ?? currentKey;
217
+ } else nextKey = currentKey;
218
+ } else {
219
+ let count = 10;
220
+ let current = isCell(focusedItem) && focusedItem.parentKey != null ? focusedItem.parentKey : focusedKey;
221
+ while (count > 0 && current != null) {
222
+ const next = collection.getKeyAfter(current);
223
+ if (next == null) break;
224
+ current = next;
225
+ count--;
226
+ }
227
+ if (current != null && isCell(focusedItem)) nextKey = getCellAtIndex(collection, current, focusedItem.index)?.key ?? current;
228
+ else nextKey = current;
229
+ }
230
+ break;
231
+ }
232
+ case "PageUp": {
233
+ e.preventDefault();
234
+ const el = ref();
235
+ if (el && el.clientHeight > 0) {
236
+ const visibleHeight = el.clientHeight;
237
+ let currentKey = focusedKey;
238
+ let traveled = 0;
239
+ if (isCell(focusedItem) && focusedItem.parentKey != null) currentKey = focusedItem.parentKey;
240
+ while (currentKey != null && traveled < visibleHeight) {
241
+ const prev = collection.getKeyBefore(currentKey);
242
+ if (prev == null) break;
243
+ const rowElement = el.querySelector(`[data-key="${currentKey}"]`);
244
+ traveled += rowElement?.clientHeight ?? 40;
245
+ currentKey = prev;
246
+ }
247
+ if (currentKey != null) if (isCell(focusedItem)) {
248
+ const cellIndex = focusedItem.index;
249
+ nextKey = getCellAtIndex(collection, currentKey, cellIndex)?.key ?? currentKey;
250
+ } else nextKey = currentKey;
251
+ } else {
252
+ let count = 10;
253
+ let current = isCell(focusedItem) && focusedItem.parentKey != null ? focusedItem.parentKey : focusedKey;
254
+ while (count > 0 && current != null) {
255
+ const prev = collection.getKeyBefore(current);
256
+ if (prev == null) break;
257
+ current = prev;
258
+ count--;
259
+ }
260
+ if (current != null && isCell(focusedItem)) nextKey = getCellAtIndex(collection, current, focusedItem.index)?.key ?? current;
261
+ else nextKey = current;
262
+ }
263
+ break;
264
+ }
265
+ case "Escape":
266
+ if (p.escapeKeyBehavior !== "none") s.clearSelection();
267
+ return;
268
+ case "a":
269
+ if (e.ctrlKey || e.metaKey) {
270
+ e.preventDefault();
271
+ if (s.selectionMode === "multiple") s.selectAll();
272
+ }
273
+ return;
274
+ default:
275
+ if (runTypeahead(focusedKey, focusedItem)) return;
276
+ return;
277
+ }
278
+ if (nextKey != null) {
279
+ setFocusedKey(nextKey);
280
+ if (e.shiftKey && s.selectionMode === "multiple") {
281
+ const focusedNode = collection.getItem(nextKey);
282
+ const keyToSelect = focusedNode && isCell(focusedNode) && focusedNode.parentKey != null ? focusedNode.parentKey : nextKey;
283
+ s.extendSelection(keyToSelect);
284
+ }
285
+ }
286
+ };
287
+ const onFocus = (e) => {
288
+ const s = state();
289
+ if (!ref()?.contains(e.target)) return;
290
+ if (!s.isFocused) {
291
+ s.setFocused(true);
292
+ if (s.focusedKey == null) {
293
+ const firstKey = s.collection.getFirstKey();
294
+ if (firstKey != null) s.setFocusedKey(firstKey);
295
+ }
296
+ }
297
+ };
298
+ const onBlur = (e) => {
299
+ const s = state();
300
+ const el = ref();
301
+ if (el && !el.contains(e.relatedTarget)) s.setFocused(false);
302
+ };
303
+ createEffect(() => {
304
+ const key = state().focusedKey;
305
+ const el = ref();
306
+ if (!el || key == null) return;
307
+ const active = document.activeElement;
308
+ if (!active || active !== el && !el.contains(active)) return;
309
+ const target = el.querySelector(`[data-key="${key}"]`);
310
+ if (target && target !== active) {
311
+ target.focus();
312
+ if (getInteractionModality() !== "pointer") scrollIntoViewport(target, { containingElement: el });
313
+ }
314
+ });
315
+ createMemo(() => {
316
+ const p = props();
317
+ if (!p["aria-label"] && !p["aria-labelledby"]) console.warn("Table: An aria-label or aria-labelledby prop is required for accessibility.");
318
+ });
319
+ const sortDescription = () => {
320
+ const s = state();
321
+ const descriptor = s.sortDescriptor;
322
+ const column = descriptor?.column;
323
+ const direction = descriptor?.direction;
324
+ if (!direction || column == null) return;
325
+ return `sorted by column ${s.collection.columns.find((c) => c.key === column)?.textValue ?? ""} in ${direction} order`;
326
+ };
327
+ const sortDescriptionProps = createDescription(sortDescription);
328
+ const gridProps = createMemo(() => {
329
+ const p = props();
330
+ const s = state();
331
+ const describedBy = [sortDescriptionProps["aria-describedby"], p["aria-describedby"]].filter(Boolean).join(" ") || void 0;
332
+ const baseProps = {
333
+ role: "grid",
334
+ id,
335
+ "aria-label": p["aria-label"],
336
+ "aria-labelledby": p["aria-labelledby"],
337
+ "aria-describedby": describedBy,
338
+ "aria-multiselectable": s.selectionMode === "multiple" ? "true" : void 0,
339
+ tabIndex: 0,
340
+ onKeyDown,
341
+ onFocus,
342
+ onBlur
343
+ };
344
+ if (p.isVirtualized) {
345
+ baseProps["aria-rowcount"] = s.collection.rowCount;
346
+ baseProps["aria-colcount"] = s.collection.columnCount;
347
+ }
348
+ return baseProps;
349
+ });
350
+ return { get gridProps() {
351
+ return gridProps();
352
+ } };
353
+ }
354
+ //#endregion
355
+ //#region src/table/createTableHeaderRow.ts
356
+ /**
357
+ * createTableHeaderRow - Provides accessibility for a table header row.
358
+ * Based on @react-aria/table/useTableHeaderRow.
359
+ */
360
+ /**
361
+ * Creates accessibility props for a table header row.
362
+ */
363
+ function createTableHeaderRow(props, _state, _ref) {
364
+ const rowProps = createMemo(() => {
365
+ const p = props();
366
+ const node = p.node;
367
+ const baseProps = { role: "row" };
368
+ if (p.isVirtualized && node.rowIndex != null) baseProps["aria-rowindex"] = node.rowIndex + 1;
369
+ return baseProps;
370
+ });
371
+ return { get rowProps() {
372
+ return rowProps();
373
+ } };
374
+ }
375
+ //#endregion
376
+ //#region src/table/createTableColumnHeader.ts
377
+ /**
378
+ * createTableColumnHeader - Provides accessibility for a table column header.
379
+ * Based on @react-aria/table/useTableColumnHeader.
380
+ */
381
+ /**
382
+ * Creates accessibility props for a table column header.
383
+ */
384
+ function createTableColumnHeader(props, state, _ref) {
385
+ const [isPressed, setIsPressed] = createSignal(false);
386
+ let ignoreNextClick = false;
387
+ let ignoreNextClickTimeout;
388
+ const isFocused = createMemo(() => {
389
+ const s = state();
390
+ const p = props();
391
+ return s.focusedKey === p.node.key;
392
+ });
393
+ const sortDescriptionProps = createDescription(() => props().allowsSorting ? "sortable column" : void 0);
394
+ const sortColumn = () => {
395
+ const s = state();
396
+ const p = props();
397
+ if (p.allowsSorting) s.sort(p.node.key);
398
+ };
399
+ const clearPendingClickIgnore = () => {
400
+ if (ignoreNextClickTimeout != null) {
401
+ clearTimeout(ignoreNextClickTimeout);
402
+ ignoreNextClickTimeout = void 0;
403
+ }
404
+ };
405
+ const ignorePointerGeneratedClick = () => {
406
+ clearPendingClickIgnore();
407
+ ignoreNextClick = true;
408
+ ignoreNextClickTimeout = setTimeout(() => {
409
+ ignoreNextClick = false;
410
+ ignoreNextClickTimeout = void 0;
411
+ }, 0);
412
+ };
413
+ const onClick = () => {
414
+ if (ignoreNextClick) {
415
+ ignoreNextClick = false;
416
+ clearPendingClickIgnore();
417
+ return;
418
+ }
419
+ sortColumn();
420
+ };
421
+ const onKeyDown = (e) => {
422
+ if (props().allowsSorting && (e.key === "Enter" || e.key === " " || e.key === "Space" || e.key === "Spacebar")) {
423
+ e.preventDefault();
424
+ sortColumn();
425
+ }
426
+ };
427
+ const onFocus = () => {
428
+ const s = state();
429
+ const p = props();
430
+ s.setFocusedKey(p.node.key);
431
+ };
432
+ const onPointerDown = (e) => {
433
+ if (e.button !== 0) return;
434
+ setIsPressed(true);
435
+ };
436
+ const onPointerUp = () => {
437
+ if (isPressed()) {
438
+ ignorePointerGeneratedClick();
439
+ sortColumn();
440
+ }
441
+ setIsPressed(false);
442
+ };
443
+ const onPointerCancel = () => {
444
+ setIsPressed(false);
445
+ };
446
+ const columnHeaderProps = createMemo(() => {
447
+ const s = state();
448
+ const p = props();
449
+ const node = p.node;
450
+ const tableData = getTableData(s);
451
+ let ariaSort = void 0;
452
+ if (p.allowsSorting) {
453
+ const sortDescriptor = s.sortDescriptor;
454
+ if (sortDescriptor?.column === node.key) ariaSort = sortDescriptor.direction;
455
+ else ariaSort = "none";
456
+ }
457
+ const baseProps = {
458
+ role: "columnheader",
459
+ id: tableData ? `${tableData.tableId}-${node.key}` : void 0,
460
+ "aria-sort": ariaSort,
461
+ "aria-describedby": sortDescriptionProps["aria-describedby"],
462
+ tabIndex: isFocused() ? 0 : -1,
463
+ onFocus
464
+ };
465
+ if (p.allowsSorting) {
466
+ baseProps.onClick = onClick;
467
+ baseProps.onKeyDown = onKeyDown;
468
+ baseProps.onPointerDown = onPointerDown;
469
+ baseProps.onPointerUp = onPointerUp;
470
+ baseProps.onPointerCancel = onPointerCancel;
471
+ baseProps.onPointerLeave = onPointerCancel;
472
+ baseProps.style = { cursor: "pointer" };
473
+ }
474
+ if (p.isVirtualized && node.column != null) baseProps["aria-colindex"] = node.column + 1;
475
+ if (node.colspan != null && node.colspan > 1) {
476
+ baseProps["aria-colspan"] = node.colspan;
477
+ baseProps.colSpan = node.colspan;
478
+ }
479
+ return baseProps;
480
+ });
481
+ return { get columnHeaderProps() {
482
+ return columnHeaderProps();
483
+ } };
484
+ }
485
+ //#endregion
486
+ //#region src/table/utils.ts
487
+ /**
488
+ * A row is labelled by its row-header cells. Mirrors `@react-aria/table`'s
489
+ * `getRowLabelledBy`, which joins `getCellId(state, rowKey, columnKey)` across
490
+ * `collection.rowHeaderColumnKeys`. We resolve the actual rowheader cell node
491
+ * and rebuild the exact id string `createTableCell` puts on the element
492
+ * (`${tableId}-${parentKey}-${cellKey}`) so the reference always matches a real
493
+ * element, regardless of the cell-key scheme.
494
+ */
495
+ function getRowLabelledBy(state, rowKey) {
496
+ const tableId = getTableData(state)?.tableId ?? "table";
497
+ const collection = state.collection;
498
+ return [...collection.rowHeaderColumnKeys].map((columnKey) => {
499
+ const cell = collection.getCell?.(rowKey, columnKey);
500
+ return cell?.parentKey != null ? `${tableId}-${String(cell.parentKey)}-${String(cell.key)}` : null;
501
+ }).filter((id) => id != null).join(" ");
502
+ }
503
+ //#endregion
504
+ //#region src/table/createTableRow.ts
505
+ /**
506
+ * createTableRow - Provides accessibility for a table row.
507
+ * Based on @react-aria/table/useTableRow.
508
+ */
509
+ /**
510
+ * Arrow keys that expand/collapse a tree-grid row, mirroring `@react-aria/table`.
511
+ * Direction is flipped under RTL.
512
+ */
513
+ const EXPANSION_KEYS = {
514
+ expand: {
515
+ ltr: "ArrowRight",
516
+ rtl: "ArrowLeft"
517
+ },
518
+ collapse: {
519
+ ltr: "ArrowLeft",
520
+ rtl: "ArrowRight"
521
+ }
522
+ };
523
+ /**
524
+ * Creates accessibility props for a table row.
525
+ */
526
+ function createTableRow(props, state, ref) {
527
+ const locale = useLocale();
528
+ createMemo(() => state().treeColumn != null);
529
+ const hasChildRows = createMemo(() => props().node.isExpandable ?? false);
530
+ const isExpanded = createMemo(() => {
531
+ const s = state();
532
+ if (s.treeColumn == null) return false;
533
+ return s.expandedKeys === "all" || s.expandedKeys.has(props().node.key);
534
+ });
535
+ const siblingInfo = createMemo(() => {
536
+ const s = state();
537
+ const node = props().node;
538
+ if (node.parentKey != null) {
539
+ const parent = s.collection.getItem(node.parentKey);
540
+ if (parent) {
541
+ const siblings = parent.childNodes.filter((n) => n.type === "item");
542
+ return {
543
+ posinset: node.index + 1,
544
+ setsize: siblings.length
545
+ };
546
+ }
547
+ }
548
+ const rootRows = s.collection.body.childNodes.filter((n) => n.type === "item");
549
+ const rootIndex = rootRows.findIndex((n) => n.key === node.key);
550
+ return {
551
+ posinset: rootIndex >= 0 ? rootIndex + 1 : node.index + 1,
552
+ setsize: rootRows.length
553
+ };
554
+ });
555
+ const isSelected = createMemo(() => {
556
+ const s = state();
557
+ const p = props();
558
+ return s.isSelected(p.node.key);
559
+ });
560
+ const selectableItem = createSelectableItem(() => {
561
+ const s = state();
562
+ const p = props();
563
+ const tableData = getTableData(s);
564
+ const onRowAction = tableData?.actions.onRowAction;
565
+ const hasAction = !!p.onAction || !!onRowAction || !!p.href;
566
+ return {
567
+ key: p.node.key,
568
+ id: `${tableData?.tableId ?? "table"}-row-${String(p.node.key)}`,
569
+ isVirtualized: p.isVirtualized,
570
+ shouldSelectOnPressUp: tableData?.shouldSelectOnPressUp ?? false,
571
+ isDisabled: !!p.isDisabled || s.collection.size === 0,
572
+ onAction: hasAction ? (event) => {
573
+ p.onAction?.();
574
+ onRowAction?.(p.node.key);
575
+ if (p.href) p.onLinkAction?.(event);
576
+ } : void 0
577
+ };
578
+ }, {
579
+ collection: () => state().collection,
580
+ isFocused: () => state().isFocused,
581
+ setFocused: (focused) => state().setFocused(focused),
582
+ focusedKey: () => state().focusedKey,
583
+ childFocusStrategy: () => state().childFocusStrategy,
584
+ setFocusedKey: (key, strategy) => state().setFocusedKey(key, strategy),
585
+ selectionMode: () => state().selectionMode,
586
+ selectionBehavior: () => state().selectionBehavior,
587
+ disallowEmptySelection: () => state().disallowEmptySelection,
588
+ selectedKeys: () => state().selectedKeys,
589
+ disabledKeys: () => state().disabledKeys,
590
+ disabledBehavior: () => state().disabledBehavior,
591
+ isEmpty: () => {
592
+ const keys = state().selectedKeys;
593
+ return keys !== "all" && keys.size === 0;
594
+ },
595
+ isSelectAll: () => state().selectedKeys === "all",
596
+ isSelected: (key) => state().isSelected(key),
597
+ isDisabled: (key) => {
598
+ const s = state();
599
+ const item = s.collection.getItem(key);
600
+ return s.disabledBehavior === "all" && s.isDisabled(key) && item?.props?.disabledBehavior !== "selection";
601
+ },
602
+ canSelectItem: (key) => {
603
+ const s = state();
604
+ return s.selectionMode !== "none" && !s.isDisabled(key);
605
+ },
606
+ setSelectionBehavior: (behavior) => state().setSelectionBehavior(behavior),
607
+ toggleSelection: (key) => state().toggleSelection(key),
608
+ replaceSelection: (key) => state().replaceSelection(key),
609
+ setSelectedKeys: (keys) => state().setSelectedKeys(keys),
610
+ selectAll: () => state().selectAll(),
611
+ clearSelection: () => state().clearSelection(),
612
+ toggleSelectAll: () => state().toggleSelectAll(),
613
+ extendSelection: (toKey, _collection) => state().extendSelection(toKey)
614
+ }, ref);
615
+ const isDisabled = () => selectableItem.isDisabled();
616
+ const onTreeGridKeyDown = (e) => {
617
+ const s = state();
618
+ const p = props();
619
+ if (isDisabled()) return;
620
+ if (s.treeColumn != null) {
621
+ const direction = locale().direction === "rtl" ? "rtl" : "ltr";
622
+ const key = p.node.key;
623
+ const expanded = s.expandedKeys;
624
+ if (e.key === EXPANSION_KEYS.expand[direction] && s.focusedKey === key && hasChildRows() && expanded !== "all" && !expanded.has(key)) {
625
+ s.toggleKey(key);
626
+ e.stopPropagation();
627
+ return;
628
+ } else if (e.key === EXPANSION_KEYS.collapse[direction] && s.focusedKey === key) if (expanded !== "all") {
629
+ if (hasChildRows() && expanded.has(key)) {
630
+ s.toggleKey(key);
631
+ e.stopPropagation();
632
+ return;
633
+ } else if (!expanded.has(key) && p.node.parentKey != null && p.node.level > 0) {
634
+ s.setFocusedKey(p.node.parentKey);
635
+ e.stopPropagation();
636
+ return;
637
+ }
638
+ } else {
639
+ s.toggleKey(key);
640
+ e.stopPropagation();
641
+ return;
642
+ }
643
+ }
644
+ };
645
+ const rowProps = createMemo(() => {
646
+ const s = state();
647
+ const p = props();
648
+ const node = p.node;
649
+ const baseProps = {
650
+ role: "row",
651
+ "aria-selected": s.selectionMode !== "none" ? isSelected() : void 0,
652
+ "aria-disabled": isDisabled() || void 0
653
+ };
654
+ const labelledBy = getRowLabelledBy(s, node.key);
655
+ if (labelledBy) baseProps["aria-labelledby"] = labelledBy;
656
+ if (s.treeColumn != null) {
657
+ const { posinset, setsize } = siblingInfo();
658
+ baseProps["aria-expanded"] = hasChildRows() ? isExpanded() : void 0;
659
+ baseProps["aria-level"] = node.level + 1;
660
+ baseProps["aria-posinset"] = posinset;
661
+ baseProps["aria-setsize"] = setsize;
662
+ baseProps.onKeyDown = onTreeGridKeyDown;
663
+ }
664
+ if (p.isVirtualized && s.treeColumn == null && node.rowIndex != null) baseProps["aria-rowindex"] = node.rowIndex + 1;
665
+ return mergeProps$1(selectableItem.itemProps, baseProps);
666
+ });
667
+ const onExpandPress = () => {
668
+ const s = state();
669
+ const p = props();
670
+ if (isDisabled()) return;
671
+ s.toggleKey(p.node.key);
672
+ s.setFocused(true);
673
+ s.setFocusedKey(p.node.key);
674
+ };
675
+ const expandButtonProps = createMemo(() => ({
676
+ isDisabled: isDisabled(),
677
+ onPress: onExpandPress,
678
+ excludeFromTabOrder: true,
679
+ preventFocusOnPress: true,
680
+ "data-react-aria-prevent-focus": true,
681
+ "aria-label": isExpanded() ? "Collapse" : "Expand"
682
+ }));
683
+ return {
684
+ get rowProps() {
685
+ return rowProps();
686
+ },
687
+ get expandButtonProps() {
688
+ return expandButtonProps();
689
+ },
690
+ get isSelected() {
691
+ return isSelected();
692
+ },
693
+ get isDisabled() {
694
+ return isDisabled();
695
+ },
696
+ get isPressed() {
697
+ return selectableItem.isPressed();
698
+ },
699
+ get isExpanded() {
700
+ return isExpanded();
701
+ },
702
+ get hasChildRows() {
703
+ return hasChildRows();
704
+ }
705
+ };
706
+ }
707
+ //#endregion
708
+ //#region src/table/createTableCell.ts
709
+ /**
710
+ * createTableCell - Provides accessibility for a table cell.
711
+ * Based on @react-aria/table/useTableCell.
712
+ */
713
+ /**
714
+ * Creates accessibility props for a table cell.
715
+ */
716
+ function createTableCell(props, state, _ref) {
717
+ const [isPressed, setIsPressed] = createSignal(false);
718
+ const isDisabled = createMemo(() => {
719
+ const s = state();
720
+ const node = props().node;
721
+ if (node.parentKey != null) return s.isDisabled(node.parentKey);
722
+ return false;
723
+ });
724
+ const isFocused = createMemo(() => {
725
+ const s = state();
726
+ const p = props();
727
+ return s.focusedKey === p.node.key;
728
+ });
729
+ const onClick = () => {
730
+ const s = state();
731
+ const p = props();
732
+ if (isDisabled()) return;
733
+ const onCellAction = getTableData(s)?.actions.onCellAction;
734
+ if (onCellAction) onCellAction(p.node.key);
735
+ if (p.onAction) p.onAction();
736
+ };
737
+ const onKeyDown = (e) => {
738
+ const s = state();
739
+ const p = props();
740
+ if (isDisabled()) return;
741
+ if (e.key === "Enter") {
742
+ const onCellAction = getTableData(s)?.actions.onCellAction;
743
+ if (onCellAction || p.onAction) {
744
+ e.preventDefault();
745
+ if (onCellAction) onCellAction(p.node.key);
746
+ if (p.onAction) p.onAction();
747
+ }
748
+ }
749
+ };
750
+ const onFocus = () => {
751
+ const s = state();
752
+ const p = props();
753
+ s.setFocusedKey(p.node.key);
754
+ };
755
+ const onPointerDown = () => {
756
+ setIsPressed(true);
757
+ };
758
+ const onPointerUp = () => {
759
+ setIsPressed(false);
760
+ };
761
+ const gridCellProps = createMemo(() => {
762
+ const s = state();
763
+ const p = props();
764
+ const node = p.node;
765
+ const tableData = getTableData(s);
766
+ let role = "gridcell";
767
+ if (node.type === "rowheader") role = "rowheader";
768
+ const baseProps = {
769
+ role,
770
+ id: tableData && node.parentKey != null ? `${tableData.tableId}-${node.parentKey}-${node.key}` : void 0,
771
+ "aria-disabled": isDisabled() || void 0,
772
+ tabIndex: isFocused() ? 0 : -1,
773
+ onClick,
774
+ onKeyDown,
775
+ onFocus,
776
+ onPointerDown,
777
+ onPointerUp
778
+ };
779
+ if (p.isVirtualized && node.column != null) baseProps["aria-colindex"] = node.column + 1;
780
+ if (node.colspan != null && node.colspan > 1) {
781
+ baseProps["aria-colspan"] = node.colspan;
782
+ baseProps.colSpan = node.colspan;
783
+ }
784
+ return baseProps;
785
+ });
786
+ return {
787
+ get gridCellProps() {
788
+ return gridCellProps();
789
+ },
790
+ get isPressed() {
791
+ return isPressed();
792
+ }
793
+ };
794
+ }
795
+ //#endregion
796
+ //#region src/table/createTableRowGroup.ts
797
+ /**
798
+ * createTableRowGroup - Provides accessibility for a table row group.
799
+ * Based on @react-aria/grid/useTableRowGroup.
800
+ */
801
+ /**
802
+ * Creates accessibility props for a table row group (thead, tbody, tfoot).
803
+ */
804
+ function createTableRowGroup(props) {
805
+ const rowGroupProps = createMemo(() => {
806
+ props();
807
+ return { role: "rowgroup" };
808
+ });
809
+ return { get rowGroupProps() {
810
+ return rowGroupProps();
811
+ } };
812
+ }
813
+ //#endregion
814
+ //#region src/table/createTableSelectionCheckbox.ts
815
+ /**
816
+ * createTableSelectionCheckbox - Provides accessibility for a table row selection checkbox.
817
+ * Based on @react-aria/table/useTableSelectionCheckbox.
818
+ */
819
+ /**
820
+ * Creates accessibility props for a table row selection checkbox.
821
+ */
822
+ function createTableSelectionCheckbox(props, state) {
823
+ const checkboxId = createId();
824
+ const isSelected = createMemo(() => {
825
+ const s = state();
826
+ const p = props();
827
+ return s.isSelected(p.key);
828
+ });
829
+ const isDisabled = createMemo(() => {
830
+ const s = state();
831
+ const p = props();
832
+ if (s.selectionMode === "none" || s.disabledKeys.has(p.key) || p.isRowDisabled) return true;
833
+ const item = s.collection.getItem(p.key);
834
+ return !item || !!item.isDisabled || !!item.props?.isDisabled;
835
+ });
836
+ const onChange = () => {
837
+ const s = state();
838
+ const p = props();
839
+ if (!isDisabled()) s.toggleSelection(p.key);
840
+ };
841
+ const checkboxProps = createMemo(() => {
842
+ const s = state();
843
+ const p = props();
844
+ return {
845
+ id: checkboxId,
846
+ type: "checkbox",
847
+ checked: isSelected(),
848
+ disabled: isDisabled(),
849
+ onChange,
850
+ "aria-label": "Select",
851
+ "aria-labelledby": `${checkboxId} ${getRowLabelledBy(s, p.key)}`
852
+ };
853
+ });
854
+ return { get checkboxProps() {
855
+ return checkboxProps();
856
+ } };
857
+ }
858
+ //#endregion
859
+ //#region src/table/createTableSelectAllCheckbox.ts
860
+ /**
861
+ * createTableSelectAllCheckbox - Provides accessibility for a table select-all checkbox.
862
+ * Based on @react-aria/table/useTableSelectAllCheckbox.
863
+ */
864
+ /**
865
+ * Creates accessibility props for a table select-all checkbox.
866
+ */
867
+ function createTableSelectAllCheckbox(state) {
868
+ const isSelectAll = createMemo(() => {
869
+ return state().selectedKeys === "all";
870
+ });
871
+ const isEmpty = createMemo(() => {
872
+ return state().collection.size === 0;
873
+ });
874
+ const isIndeterminate = createMemo(() => {
875
+ const s = state();
876
+ const selectedKeys = s.selectedKeys;
877
+ if (selectedKeys === "all") return false;
878
+ if (selectedKeys.size === 0) return false;
879
+ return selectedKeys.size < s.collection.size;
880
+ });
881
+ const isDisabled = createMemo(() => {
882
+ return state().selectionMode !== "multiple" || isEmpty();
883
+ });
884
+ const onChange = () => {
885
+ const s = state();
886
+ if (!isDisabled()) s.toggleSelectAll();
887
+ };
888
+ const checkboxProps = createMemo(() => {
889
+ const s = state();
890
+ const baseProps = {
891
+ type: "checkbox",
892
+ checked: isSelectAll(),
893
+ disabled: isDisabled(),
894
+ onChange,
895
+ "aria-label": s.selectionMode === "single" ? "Select" : "Select All"
896
+ };
897
+ if (isIndeterminate()) baseProps["data-indeterminate"] = "true";
898
+ return baseProps;
899
+ });
900
+ return {
901
+ get checkboxProps() {
902
+ return checkboxProps();
903
+ },
904
+ get isIndeterminate() {
905
+ return isIndeterminate();
906
+ }
907
+ };
908
+ }
909
+ //#endregion
910
+ //#region src/table/createTableColumnResize.ts
911
+ /**
912
+ * ARIA hook for table column resize interactions.
913
+ * Based on @react-aria/table/useTableColumnResize.
914
+ *
915
+ * Provides pointer-drag and keyboard-based column resizing with
916
+ * correct ARIA attributes for screen readers.
917
+ */
918
+ const KEYBOARD_STEP = 10;
919
+ /**
920
+ * Creates ARIA-compliant column resize behavior.
921
+ *
922
+ * Returns props for a visible drag handle (div) and a visually-hidden
923
+ * range input that allows keyboard and screen-reader users to resize columns.
924
+ */
925
+ function createTableColumnResize(props, state) {
926
+ const getProps = () => props();
927
+ const getState = () => state();
928
+ const locale = useLocale();
929
+ const [isPointerDragging, setIsPointerDragging] = createSignal(false);
930
+ const [isKeyboardResizing, setIsKeyboardResizing] = createSignal(false);
931
+ const isResizing = createMemo(() => getState().resizingColumn() === getProps().column.key);
932
+ const isRtl = createMemo(() => {
933
+ return locale()?.direction === "rtl";
934
+ });
935
+ let startX = 0;
936
+ let startWidth = 0;
937
+ const onPointerDown = (e) => {
938
+ if (getProps().isDisabled) return;
939
+ e.preventDefault();
940
+ e.stopPropagation();
941
+ const key = getProps().column.key;
942
+ startX = e.clientX;
943
+ startWidth = getState().getColumnWidth(key);
944
+ getState().startResize(key);
945
+ getProps().onResizeStart?.(getState().columnWidths());
946
+ setIsPointerDragging(true);
947
+ e.currentTarget.setPointerCapture(e.pointerId);
948
+ };
949
+ const onPointerMove = (e) => {
950
+ if (!isPointerDragging()) return;
951
+ e.preventDefault();
952
+ const deltaX = e.clientX - startX;
953
+ const direction = isRtl() ? -1 : 1;
954
+ const newWidth = startWidth + deltaX * direction;
955
+ const key = getProps().column.key;
956
+ const widths = getState().updateResizedColumns(key, newWidth);
957
+ getProps().onResize?.(widths);
958
+ };
959
+ const onPointerUp = (e) => {
960
+ if (!isPointerDragging()) return;
961
+ e.preventDefault();
962
+ setIsPointerDragging(false);
963
+ getState().endResize();
964
+ getProps().onResizeEnd?.(getState().columnWidths());
965
+ };
966
+ const onKeyDown = (e) => {
967
+ if (getProps().isDisabled) return;
968
+ const key = getProps().column.key;
969
+ const rtlMul = isRtl() ? -1 : 1;
970
+ switch (e.key) {
971
+ case "Enter":
972
+ if (isKeyboardResizing()) {
973
+ setIsKeyboardResizing(false);
974
+ getState().endResize();
975
+ getProps().onResizeEnd?.(getState().columnWidths());
976
+ } else {
977
+ setIsKeyboardResizing(true);
978
+ getState().startResize(key);
979
+ getProps().onResizeStart?.(getState().columnWidths());
980
+ }
981
+ e.preventDefault();
982
+ break;
983
+ case "Escape":
984
+ if (isKeyboardResizing()) {
985
+ setIsKeyboardResizing(false);
986
+ getState().endResize();
987
+ getProps().onResizeEnd?.(getState().columnWidths());
988
+ e.preventDefault();
989
+ }
990
+ break;
991
+ case "Tab":
992
+ if (isKeyboardResizing()) {
993
+ setIsKeyboardResizing(false);
994
+ getState().endResize();
995
+ getProps().onResizeEnd?.(getState().columnWidths());
996
+ }
997
+ break;
998
+ case "ArrowRight":
999
+ if (isKeyboardResizing()) {
1000
+ const currentWidth = getState().getColumnWidth(key);
1001
+ const widths = getState().updateResizedColumns(key, currentWidth + KEYBOARD_STEP * rtlMul);
1002
+ getProps().onResize?.(widths);
1003
+ e.preventDefault();
1004
+ }
1005
+ break;
1006
+ case "ArrowLeft":
1007
+ if (isKeyboardResizing()) {
1008
+ const currentWidth = getState().getColumnWidth(key);
1009
+ const widths = getState().updateResizedColumns(key, currentWidth - KEYBOARD_STEP * rtlMul);
1010
+ getProps().onResize?.(widths);
1011
+ e.preventDefault();
1012
+ }
1013
+ break;
1014
+ }
1015
+ };
1016
+ const onInputChange = (e) => {
1017
+ const input = e.target;
1018
+ const newWidth = parseFloat(input.value);
1019
+ if (isNaN(newWidth)) return;
1020
+ const key = getProps().column.key;
1021
+ if (!isResizing()) {
1022
+ getState().startResize(key);
1023
+ getProps().onResizeStart?.(getState().columnWidths());
1024
+ }
1025
+ const widths = getState().updateResizedColumns(key, newWidth);
1026
+ getProps().onResize?.(widths);
1027
+ getState().endResize();
1028
+ getProps().onResizeEnd?.(getState().columnWidths());
1029
+ };
1030
+ return {
1031
+ resizerProps: {
1032
+ role: "presentation",
1033
+ tabIndex: -1,
1034
+ style: {
1035
+ "touch-action": "none",
1036
+ cursor: "col-resize"
1037
+ },
1038
+ onPointerDown,
1039
+ onPointerMove,
1040
+ onPointerUp
1041
+ },
1042
+ inputProps: {
1043
+ get type() {
1044
+ return "range";
1045
+ },
1046
+ get tabIndex() {
1047
+ return getProps().isDisabled ? -1 : 0;
1048
+ },
1049
+ get disabled() {
1050
+ return getProps().isDisabled;
1051
+ },
1052
+ get "aria-label"() {
1053
+ return getProps()["aria-label"];
1054
+ },
1055
+ get "aria-orientation"() {
1056
+ return "horizontal";
1057
+ },
1058
+ get min() {
1059
+ return getState().getColumnMinWidth(getProps().column.key);
1060
+ },
1061
+ get max() {
1062
+ const maxW = getState().getColumnMaxWidth(getProps().column.key);
1063
+ return maxW === Infinity ? 9999 : maxW;
1064
+ },
1065
+ get value() {
1066
+ return getState().getColumnWidth(getProps().column.key);
1067
+ },
1068
+ style: {
1069
+ position: "absolute",
1070
+ width: "1px",
1071
+ height: "1px",
1072
+ padding: "0",
1073
+ margin: "-1px",
1074
+ overflow: "hidden",
1075
+ clip: "rect(0, 0, 0, 0)",
1076
+ "white-space": "nowrap",
1077
+ "border-width": "0"
1078
+ },
1079
+ onKeyDown,
1080
+ onChange: onInputChange
1081
+ },
1082
+ isResizing
1083
+ };
1084
+ }
1085
+ //#endregion
1086
+ export { createTableCell as a, createTableHeaderRow as c, createTableRowGroup as i, createTable as l, createTableSelectAllCheckbox as n, createTableRow as o, createTableSelectionCheckbox as r, createTableColumnHeader as s, createTableColumnResize as t, getTableData as u };
1087
+
1088
+ //# sourceMappingURL=table.jsx.map