react-aria 3.49.0 → 3.51.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 (1301) hide show
  1. package/dist/exports/index.cjs +15 -0
  2. package/dist/exports/index.cjs.map +1 -1
  3. package/dist/exports/index.js +9 -1
  4. package/dist/exports/index.js.map +1 -1
  5. package/dist/exports/index.mjs +9 -1
  6. package/dist/exports/index.mjs.map +1 -1
  7. package/dist/exports/private/utils/domHelpers.cjs +1 -0
  8. package/dist/exports/private/utils/domHelpers.cjs.map +1 -1
  9. package/dist/exports/private/utils/domHelpers.js +2 -2
  10. package/dist/exports/private/utils/domHelpers.js.map +1 -1
  11. package/dist/exports/private/utils/domHelpers.mjs +2 -2
  12. package/dist/exports/private/utils/domHelpers.mjs.map +1 -1
  13. package/dist/exports/private/utils/platform.cjs +1 -0
  14. package/dist/exports/private/utils/platform.cjs.map +1 -1
  15. package/dist/exports/private/utils/platform.js +2 -2
  16. package/dist/exports/private/utils/platform.js.map +1 -1
  17. package/dist/exports/private/utils/platform.mjs +2 -2
  18. package/dist/exports/private/utils/platform.mjs.map +1 -1
  19. package/dist/exports/private/utils/shadowdom/DOMFunctions.cjs +1 -0
  20. package/dist/exports/private/utils/shadowdom/DOMFunctions.cjs.map +1 -1
  21. package/dist/exports/private/utils/shadowdom/DOMFunctions.js +2 -2
  22. package/dist/exports/private/utils/shadowdom/DOMFunctions.js.map +1 -1
  23. package/dist/exports/private/utils/shadowdom/DOMFunctions.mjs +2 -2
  24. package/dist/exports/private/utils/shadowdom/DOMFunctions.mjs.map +1 -1
  25. package/dist/exports/useContextMenu.cjs +22 -0
  26. package/dist/exports/useContextMenu.cjs.map +1 -0
  27. package/dist/exports/useContextMenu.js +17 -0
  28. package/dist/exports/useContextMenu.js.map +1 -0
  29. package/dist/exports/useContextMenu.mjs +17 -0
  30. package/dist/exports/useContextMenu.mjs.map +1 -0
  31. package/dist/exports/usePreviewTrigger.cjs +22 -0
  32. package/dist/exports/usePreviewTrigger.cjs.map +1 -0
  33. package/dist/exports/usePreviewTrigger.js +17 -0
  34. package/dist/exports/usePreviewTrigger.js.map +1 -0
  35. package/dist/exports/usePreviewTrigger.mjs +17 -0
  36. package/dist/exports/usePreviewTrigger.mjs.map +1 -0
  37. package/dist/exports/useTokenField.cjs +27 -0
  38. package/dist/exports/useTokenField.cjs.map +1 -0
  39. package/dist/exports/useTokenField.js +19 -0
  40. package/dist/exports/useTokenField.js.map +1 -0
  41. package/dist/exports/useTokenField.mjs +19 -0
  42. package/dist/exports/useTokenField.mjs.map +1 -0
  43. package/dist/private/actiongroup/useActionGroup.cjs +24 -19
  44. package/dist/private/actiongroup/useActionGroup.cjs.map +1 -1
  45. package/dist/private/actiongroup/useActionGroup.js +24 -19
  46. package/dist/private/actiongroup/useActionGroup.js.map +1 -1
  47. package/dist/private/actiongroup/useActionGroup.mjs +24 -19
  48. package/dist/private/actiongroup/useActionGroup.mjs.map +1 -1
  49. package/dist/private/autocomplete/useAutocomplete.cjs +18 -8
  50. package/dist/private/autocomplete/useAutocomplete.cjs.map +1 -1
  51. package/dist/private/autocomplete/useAutocomplete.js +18 -8
  52. package/dist/private/autocomplete/useAutocomplete.js.map +1 -1
  53. package/dist/private/autocomplete/useAutocomplete.mjs +18 -8
  54. package/dist/private/autocomplete/useAutocomplete.mjs.map +1 -1
  55. package/dist/private/breadcrumbs/useBreadcrumbItem.cjs +2 -0
  56. package/dist/private/breadcrumbs/useBreadcrumbItem.cjs.map +1 -1
  57. package/dist/private/breadcrumbs/useBreadcrumbItem.js +2 -0
  58. package/dist/private/breadcrumbs/useBreadcrumbItem.js.map +1 -1
  59. package/dist/private/breadcrumbs/useBreadcrumbItem.mjs +2 -0
  60. package/dist/private/breadcrumbs/useBreadcrumbItem.mjs.map +1 -1
  61. package/dist/private/breadcrumbs/useBreadcrumbs.cjs.map +1 -1
  62. package/dist/private/breadcrumbs/useBreadcrumbs.js.map +1 -1
  63. package/dist/private/breadcrumbs/useBreadcrumbs.mjs.map +1 -1
  64. package/dist/private/button/useButton.cjs +2 -1
  65. package/dist/private/button/useButton.cjs.map +1 -1
  66. package/dist/private/button/useButton.js +2 -1
  67. package/dist/private/button/useButton.js.map +1 -1
  68. package/dist/private/button/useButton.mjs +2 -1
  69. package/dist/private/button/useButton.mjs.map +1 -1
  70. package/dist/private/button/useToggleButtonGroup.cjs +3 -0
  71. package/dist/private/button/useToggleButtonGroup.cjs.map +1 -1
  72. package/dist/private/button/useToggleButtonGroup.js +3 -0
  73. package/dist/private/button/useToggleButtonGroup.js.map +1 -1
  74. package/dist/private/button/useToggleButtonGroup.mjs +3 -0
  75. package/dist/private/button/useToggleButtonGroup.mjs.map +1 -1
  76. package/dist/private/calendar/useCalendarBase.cjs.map +1 -1
  77. package/dist/private/calendar/useCalendarBase.js.map +1 -1
  78. package/dist/private/calendar/useCalendarBase.mjs.map +1 -1
  79. package/dist/private/calendar/useCalendarCell.cjs +3 -0
  80. package/dist/private/calendar/useCalendarCell.cjs.map +1 -1
  81. package/dist/private/calendar/useCalendarCell.js +3 -0
  82. package/dist/private/calendar/useCalendarCell.js.map +1 -1
  83. package/dist/private/calendar/useCalendarCell.mjs +3 -0
  84. package/dist/private/calendar/useCalendarCell.mjs.map +1 -1
  85. package/dist/private/calendar/useCalendarGrid.cjs +47 -52
  86. package/dist/private/calendar/useCalendarGrid.cjs.map +1 -1
  87. package/dist/private/calendar/useCalendarGrid.js +47 -52
  88. package/dist/private/calendar/useCalendarGrid.js.map +1 -1
  89. package/dist/private/calendar/useCalendarGrid.mjs +47 -52
  90. package/dist/private/calendar/useCalendarGrid.mjs.map +1 -1
  91. package/dist/private/calendar/useCalendarYearPicker.cjs +4 -4
  92. package/dist/private/calendar/useCalendarYearPicker.cjs.map +1 -1
  93. package/dist/private/calendar/useCalendarYearPicker.js +4 -4
  94. package/dist/private/calendar/useCalendarYearPicker.js.map +1 -1
  95. package/dist/private/calendar/useCalendarYearPicker.mjs +4 -4
  96. package/dist/private/calendar/useCalendarYearPicker.mjs.map +1 -1
  97. package/dist/private/calendar/useRangeCalendar.cjs +1 -0
  98. package/dist/private/calendar/useRangeCalendar.cjs.map +1 -1
  99. package/dist/private/calendar/useRangeCalendar.js +1 -0
  100. package/dist/private/calendar/useRangeCalendar.js.map +1 -1
  101. package/dist/private/calendar/useRangeCalendar.mjs +1 -0
  102. package/dist/private/calendar/useRangeCalendar.mjs.map +1 -1
  103. package/dist/private/calendar/utils.cjs.map +1 -1
  104. package/dist/private/calendar/utils.js.map +1 -1
  105. package/dist/private/calendar/utils.mjs.map +1 -1
  106. package/dist/private/collections/CollectionBuilder.cjs +8 -3
  107. package/dist/private/collections/CollectionBuilder.cjs.map +1 -1
  108. package/dist/private/collections/CollectionBuilder.js +8 -3
  109. package/dist/private/collections/CollectionBuilder.js.map +1 -1
  110. package/dist/private/collections/CollectionBuilder.mjs +8 -3
  111. package/dist/private/collections/CollectionBuilder.mjs.map +1 -1
  112. package/dist/private/collections/Document.cjs +4 -0
  113. package/dist/private/collections/Document.cjs.map +1 -1
  114. package/dist/private/collections/Document.js +4 -0
  115. package/dist/private/collections/Document.js.map +1 -1
  116. package/dist/private/collections/Document.mjs +4 -0
  117. package/dist/private/collections/Document.mjs.map +1 -1
  118. package/dist/private/collections/Hidden.cjs +1 -0
  119. package/dist/private/collections/Hidden.cjs.map +1 -1
  120. package/dist/private/collections/Hidden.js +1 -0
  121. package/dist/private/collections/Hidden.js.map +1 -1
  122. package/dist/private/collections/Hidden.mjs +1 -0
  123. package/dist/private/collections/Hidden.mjs.map +1 -1
  124. package/dist/private/collections/useCachedChildren.cjs +1 -0
  125. package/dist/private/collections/useCachedChildren.cjs.map +1 -1
  126. package/dist/private/collections/useCachedChildren.js +1 -0
  127. package/dist/private/collections/useCachedChildren.js.map +1 -1
  128. package/dist/private/collections/useCachedChildren.mjs +1 -0
  129. package/dist/private/collections/useCachedChildren.mjs.map +1 -1
  130. package/dist/private/color/useColorArea.cjs +31 -34
  131. package/dist/private/color/useColorArea.cjs.map +1 -1
  132. package/dist/private/color/useColorArea.js +31 -34
  133. package/dist/private/color/useColorArea.js.map +1 -1
  134. package/dist/private/color/useColorArea.mjs +31 -34
  135. package/dist/private/color/useColorArea.mjs.map +1 -1
  136. package/dist/private/color/useColorSlider.cjs +4 -2
  137. package/dist/private/color/useColorSlider.cjs.map +1 -1
  138. package/dist/private/color/useColorSlider.js +4 -2
  139. package/dist/private/color/useColorSlider.js.map +1 -1
  140. package/dist/private/color/useColorSlider.mjs +4 -2
  141. package/dist/private/color/useColorSlider.mjs.map +1 -1
  142. package/dist/private/color/useColorSwatch.cjs.map +1 -1
  143. package/dist/private/color/useColorSwatch.js.map +1 -1
  144. package/dist/private/color/useColorSwatch.mjs.map +1 -1
  145. package/dist/private/color/useColorWheel.cjs +16 -23
  146. package/dist/private/color/useColorWheel.cjs.map +1 -1
  147. package/dist/private/color/useColorWheel.js +16 -23
  148. package/dist/private/color/useColorWheel.js.map +1 -1
  149. package/dist/private/color/useColorWheel.mjs +16 -23
  150. package/dist/private/color/useColorWheel.mjs.map +1 -1
  151. package/dist/private/combobox/useComboBox.cjs +93 -28
  152. package/dist/private/combobox/useComboBox.cjs.map +1 -1
  153. package/dist/private/combobox/useComboBox.js +94 -28
  154. package/dist/private/combobox/useComboBox.js.map +1 -1
  155. package/dist/private/combobox/useComboBox.mjs +93 -28
  156. package/dist/private/combobox/useComboBox.mjs.map +1 -1
  157. package/dist/private/datepicker/useDateField.cjs +3 -6
  158. package/dist/private/datepicker/useDateField.cjs.map +1 -1
  159. package/dist/private/datepicker/useDateField.js +3 -6
  160. package/dist/private/datepicker/useDateField.js.map +1 -1
  161. package/dist/private/datepicker/useDateField.mjs +3 -6
  162. package/dist/private/datepicker/useDateField.mjs.map +1 -1
  163. package/dist/private/datepicker/useDatePicker.cjs.map +1 -1
  164. package/dist/private/datepicker/useDatePicker.js.map +1 -1
  165. package/dist/private/datepicker/useDatePicker.mjs.map +1 -1
  166. package/dist/private/datepicker/useDatePickerGroup.cjs +48 -27
  167. package/dist/private/datepicker/useDatePickerGroup.cjs.map +1 -1
  168. package/dist/private/datepicker/useDatePickerGroup.js +49 -28
  169. package/dist/private/datepicker/useDatePickerGroup.js.map +1 -1
  170. package/dist/private/datepicker/useDatePickerGroup.mjs +49 -28
  171. package/dist/private/datepicker/useDatePickerGroup.mjs.map +1 -1
  172. package/dist/private/datepicker/useDateRangePicker.cjs.map +1 -1
  173. package/dist/private/datepicker/useDateRangePicker.js.map +1 -1
  174. package/dist/private/datepicker/useDateRangePicker.mjs.map +1 -1
  175. package/dist/private/datepicker/useDateSegment.cjs +21 -16
  176. package/dist/private/datepicker/useDateSegment.cjs.map +1 -1
  177. package/dist/private/datepicker/useDateSegment.js +22 -17
  178. package/dist/private/datepicker/useDateSegment.js.map +1 -1
  179. package/dist/private/datepicker/useDateSegment.mjs +22 -17
  180. package/dist/private/datepicker/useDateSegment.mjs.map +1 -1
  181. package/dist/private/datepicker/useDisplayNames.cjs +1 -2
  182. package/dist/private/datepicker/useDisplayNames.cjs.map +1 -1
  183. package/dist/private/datepicker/useDisplayNames.js +1 -2
  184. package/dist/private/datepicker/useDisplayNames.js.map +1 -1
  185. package/dist/private/datepicker/useDisplayNames.mjs +1 -2
  186. package/dist/private/datepicker/useDisplayNames.mjs.map +1 -1
  187. package/dist/private/dialog/useDialog.cjs +8 -1
  188. package/dist/private/dialog/useDialog.cjs.map +1 -1
  189. package/dist/private/dialog/useDialog.js +10 -1
  190. package/dist/private/dialog/useDialog.js.map +1 -1
  191. package/dist/private/dialog/useDialog.mjs +8 -1
  192. package/dist/private/dialog/useDialog.mjs.map +1 -1
  193. package/dist/private/dnd/DragManager.cjs +7 -2
  194. package/dist/private/dnd/DragManager.cjs.map +1 -1
  195. package/dist/private/dnd/DragManager.js +7 -2
  196. package/dist/private/dnd/DragManager.js.map +1 -1
  197. package/dist/private/dnd/DragManager.mjs +7 -2
  198. package/dist/private/dnd/DragManager.mjs.map +1 -1
  199. package/dist/private/dnd/useAutoScroll.cjs +3 -1
  200. package/dist/private/dnd/useAutoScroll.cjs.map +1 -1
  201. package/dist/private/dnd/useAutoScroll.js +3 -1
  202. package/dist/private/dnd/useAutoScroll.js.map +1 -1
  203. package/dist/private/dnd/useAutoScroll.mjs +3 -1
  204. package/dist/private/dnd/useAutoScroll.mjs.map +1 -1
  205. package/dist/private/dnd/useDrag.cjs +4 -1
  206. package/dist/private/dnd/useDrag.cjs.map +1 -1
  207. package/dist/private/dnd/useDrag.js +4 -1
  208. package/dist/private/dnd/useDrag.js.map +1 -1
  209. package/dist/private/dnd/useDrag.mjs +4 -1
  210. package/dist/private/dnd/useDrag.mjs.map +1 -1
  211. package/dist/private/dnd/useDraggableItem.cjs +4 -0
  212. package/dist/private/dnd/useDraggableItem.cjs.map +1 -1
  213. package/dist/private/dnd/useDraggableItem.js +4 -0
  214. package/dist/private/dnd/useDraggableItem.js.map +1 -1
  215. package/dist/private/dnd/useDraggableItem.mjs +4 -0
  216. package/dist/private/dnd/useDraggableItem.mjs.map +1 -1
  217. package/dist/private/dnd/useDropIndicator.cjs.map +1 -1
  218. package/dist/private/dnd/useDropIndicator.js.map +1 -1
  219. package/dist/private/dnd/useDropIndicator.mjs.map +1 -1
  220. package/dist/private/dnd/useDroppableCollection.cjs +4 -0
  221. package/dist/private/dnd/useDroppableCollection.cjs.map +1 -1
  222. package/dist/private/dnd/useDroppableCollection.js +4 -0
  223. package/dist/private/dnd/useDroppableCollection.js.map +1 -1
  224. package/dist/private/dnd/useDroppableCollection.mjs +4 -0
  225. package/dist/private/dnd/useDroppableCollection.mjs.map +1 -1
  226. package/dist/private/dnd/useVirtualDrop.cjs.map +1 -1
  227. package/dist/private/dnd/useVirtualDrop.js.map +1 -1
  228. package/dist/private/dnd/useVirtualDrop.mjs.map +1 -1
  229. package/dist/private/dnd/utils.cjs +13 -3
  230. package/dist/private/dnd/utils.cjs.map +1 -1
  231. package/dist/private/dnd/utils.js +13 -3
  232. package/dist/private/dnd/utils.js.map +1 -1
  233. package/dist/private/dnd/utils.mjs +13 -3
  234. package/dist/private/dnd/utils.mjs.map +1 -1
  235. package/dist/private/focus/FocusScope.cjs +5 -3
  236. package/dist/private/focus/FocusScope.cjs.map +1 -1
  237. package/dist/private/focus/FocusScope.js +5 -4
  238. package/dist/private/focus/FocusScope.js.map +1 -1
  239. package/dist/private/focus/FocusScope.mjs +5 -3
  240. package/dist/private/focus/FocusScope.mjs.map +1 -1
  241. package/dist/private/focus/useFocusRing.cjs +2 -1
  242. package/dist/private/focus/useFocusRing.cjs.map +1 -1
  243. package/dist/private/focus/useFocusRing.js +2 -1
  244. package/dist/private/focus/useFocusRing.js.map +1 -1
  245. package/dist/private/focus/useFocusRing.mjs +2 -1
  246. package/dist/private/focus/useFocusRing.mjs.map +1 -1
  247. package/dist/private/form/useFormValidation.cjs +7 -1
  248. package/dist/private/form/useFormValidation.cjs.map +1 -1
  249. package/dist/private/form/useFormValidation.js +7 -1
  250. package/dist/private/form/useFormValidation.js.map +1 -1
  251. package/dist/private/form/useFormValidation.mjs +7 -1
  252. package/dist/private/form/useFormValidation.mjs.map +1 -1
  253. package/dist/private/grid/useGrid.cjs +3 -2
  254. package/dist/private/grid/useGrid.cjs.map +1 -1
  255. package/dist/private/grid/useGrid.js +3 -2
  256. package/dist/private/grid/useGrid.js.map +1 -1
  257. package/dist/private/grid/useGrid.mjs +3 -2
  258. package/dist/private/grid/useGrid.mjs.map +1 -1
  259. package/dist/private/grid/useGridCell.cjs +44 -8
  260. package/dist/private/grid/useGridCell.cjs.map +1 -1
  261. package/dist/private/grid/useGridCell.js +44 -8
  262. package/dist/private/grid/useGridCell.js.map +1 -1
  263. package/dist/private/grid/useGridCell.mjs +44 -8
  264. package/dist/private/grid/useGridCell.mjs.map +1 -1
  265. package/dist/private/grid/useGridSelectionAnnouncement.cjs.map +1 -1
  266. package/dist/private/grid/useGridSelectionAnnouncement.js.map +1 -1
  267. package/dist/private/grid/useGridSelectionAnnouncement.mjs.map +1 -1
  268. package/dist/private/grid/useGridSelectionCheckbox.cjs.map +1 -1
  269. package/dist/private/grid/useGridSelectionCheckbox.js.map +1 -1
  270. package/dist/private/grid/useGridSelectionCheckbox.mjs.map +1 -1
  271. package/dist/private/grid/useHighlightSelectionDescription.cjs.map +1 -1
  272. package/dist/private/grid/useHighlightSelectionDescription.js.map +1 -1
  273. package/dist/private/grid/useHighlightSelectionDescription.mjs.map +1 -1
  274. package/dist/private/grid/utils.cjs.map +1 -1
  275. package/dist/private/grid/utils.js.map +1 -1
  276. package/dist/private/grid/utils.mjs.map +1 -1
  277. package/dist/private/gridlist/useGridList.cjs +2 -1
  278. package/dist/private/gridlist/useGridList.cjs.map +1 -1
  279. package/dist/private/gridlist/useGridList.js +2 -1
  280. package/dist/private/gridlist/useGridList.js.map +1 -1
  281. package/dist/private/gridlist/useGridList.mjs +2 -1
  282. package/dist/private/gridlist/useGridList.mjs.map +1 -1
  283. package/dist/private/gridlist/useGridListItem.cjs +74 -25
  284. package/dist/private/gridlist/useGridListItem.cjs.map +1 -1
  285. package/dist/private/gridlist/useGridListItem.js +75 -26
  286. package/dist/private/gridlist/useGridListItem.js.map +1 -1
  287. package/dist/private/gridlist/useGridListItem.mjs +74 -25
  288. package/dist/private/gridlist/useGridListItem.mjs.map +1 -1
  289. package/dist/private/interactions/PressResponder.cjs +1 -0
  290. package/dist/private/interactions/PressResponder.cjs.map +1 -1
  291. package/dist/private/interactions/PressResponder.js +1 -0
  292. package/dist/private/interactions/PressResponder.js.map +1 -1
  293. package/dist/private/interactions/PressResponder.mjs +1 -0
  294. package/dist/private/interactions/PressResponder.mjs.map +1 -1
  295. package/dist/private/interactions/Pressable.cjs +1 -0
  296. package/dist/private/interactions/Pressable.cjs.map +1 -1
  297. package/dist/private/interactions/Pressable.js +1 -0
  298. package/dist/private/interactions/Pressable.js.map +1 -1
  299. package/dist/private/interactions/Pressable.mjs +1 -0
  300. package/dist/private/interactions/Pressable.mjs.map +1 -1
  301. package/dist/private/interactions/createEventHandler.cjs +6 -2
  302. package/dist/private/interactions/createEventHandler.cjs.map +1 -1
  303. package/dist/private/interactions/createEventHandler.js +6 -2
  304. package/dist/private/interactions/createEventHandler.js.map +1 -1
  305. package/dist/private/interactions/createEventHandler.mjs +6 -2
  306. package/dist/private/interactions/createEventHandler.mjs.map +1 -1
  307. package/dist/private/interactions/createKeyboardShortcutHandler.cjs +130 -0
  308. package/dist/private/interactions/createKeyboardShortcutHandler.cjs.map +1 -0
  309. package/dist/private/interactions/createKeyboardShortcutHandler.js +125 -0
  310. package/dist/private/interactions/createKeyboardShortcutHandler.js.map +1 -0
  311. package/dist/private/interactions/createKeyboardShortcutHandler.mjs +125 -0
  312. package/dist/private/interactions/createKeyboardShortcutHandler.mjs.map +1 -0
  313. package/dist/private/interactions/textSelection.cjs +2 -2
  314. package/dist/private/interactions/textSelection.cjs.map +1 -1
  315. package/dist/private/interactions/textSelection.js +3 -3
  316. package/dist/private/interactions/textSelection.js.map +1 -1
  317. package/dist/private/interactions/textSelection.mjs +3 -3
  318. package/dist/private/interactions/textSelection.mjs.map +1 -1
  319. package/dist/private/interactions/useContextMenu.cjs +104 -0
  320. package/dist/private/interactions/useContextMenu.cjs.map +1 -0
  321. package/dist/private/interactions/useContextMenu.js +99 -0
  322. package/dist/private/interactions/useContextMenu.js.map +1 -0
  323. package/dist/private/interactions/useContextMenu.mjs +99 -0
  324. package/dist/private/interactions/useContextMenu.mjs.map +1 -0
  325. package/dist/private/interactions/useFocusVisible.cjs +18 -7
  326. package/dist/private/interactions/useFocusVisible.cjs.map +1 -1
  327. package/dist/private/interactions/useFocusVisible.js +18 -7
  328. package/dist/private/interactions/useFocusVisible.js.map +1 -1
  329. package/dist/private/interactions/useFocusVisible.mjs +18 -7
  330. package/dist/private/interactions/useFocusVisible.mjs.map +1 -1
  331. package/dist/private/interactions/useFocusable.cjs +1 -0
  332. package/dist/private/interactions/useFocusable.cjs.map +1 -1
  333. package/dist/private/interactions/useFocusable.js +1 -0
  334. package/dist/private/interactions/useFocusable.js.map +1 -1
  335. package/dist/private/interactions/useFocusable.mjs +1 -0
  336. package/dist/private/interactions/useFocusable.mjs.map +1 -1
  337. package/dist/private/interactions/useHover.cjs +2 -1
  338. package/dist/private/interactions/useHover.cjs.map +1 -1
  339. package/dist/private/interactions/useHover.js +2 -1
  340. package/dist/private/interactions/useHover.js.map +1 -1
  341. package/dist/private/interactions/useHover.mjs +2 -1
  342. package/dist/private/interactions/useHover.mjs.map +1 -1
  343. package/dist/private/interactions/useKeyboard.cjs +46 -2
  344. package/dist/private/interactions/useKeyboard.cjs.map +1 -1
  345. package/dist/private/interactions/useKeyboard.js +48 -2
  346. package/dist/private/interactions/useKeyboard.js.map +1 -1
  347. package/dist/private/interactions/useKeyboard.mjs +46 -2
  348. package/dist/private/interactions/useKeyboard.mjs.map +1 -1
  349. package/dist/private/interactions/useLongPress.cjs +22 -22
  350. package/dist/private/interactions/useLongPress.cjs.map +1 -1
  351. package/dist/private/interactions/useLongPress.js +22 -22
  352. package/dist/private/interactions/useLongPress.js.map +1 -1
  353. package/dist/private/interactions/useLongPress.mjs +22 -22
  354. package/dist/private/interactions/useLongPress.mjs.map +1 -1
  355. package/dist/private/interactions/useMove.cjs +1 -8
  356. package/dist/private/interactions/useMove.cjs.map +1 -1
  357. package/dist/private/interactions/useMove.js +1 -8
  358. package/dist/private/interactions/useMove.js.map +1 -1
  359. package/dist/private/interactions/useMove.mjs +1 -8
  360. package/dist/private/interactions/useMove.mjs.map +1 -1
  361. package/dist/private/interactions/usePress.cjs +18 -33
  362. package/dist/private/interactions/usePress.cjs.map +1 -1
  363. package/dist/private/interactions/usePress.js +18 -33
  364. package/dist/private/interactions/usePress.js.map +1 -1
  365. package/dist/private/interactions/usePress.mjs +18 -33
  366. package/dist/private/interactions/usePress.mjs.map +1 -1
  367. package/dist/private/interactions/utils.cjs +10 -10
  368. package/dist/private/interactions/utils.cjs.map +1 -1
  369. package/dist/private/interactions/utils.js +10 -10
  370. package/dist/private/interactions/utils.js.map +1 -1
  371. package/dist/private/interactions/utils.mjs +10 -10
  372. package/dist/private/interactions/utils.mjs.map +1 -1
  373. package/dist/private/intl/combobox/fi-FI.cjs +5 -5
  374. package/dist/private/intl/combobox/fi-FI.cjs.map +1 -1
  375. package/dist/private/intl/combobox/fi-FI.js +5 -5
  376. package/dist/private/intl/combobox/fi-FI.js.map +1 -1
  377. package/dist/private/intl/combobox/fi-FI.mjs +5 -5
  378. package/dist/private/intl/combobox/fi-FI.mjs.map +1 -1
  379. package/dist/private/intl/previewtrigger/ar-AE.cjs +6 -0
  380. package/dist/private/intl/previewtrigger/ar-AE.cjs.map +1 -0
  381. package/dist/private/intl/previewtrigger/ar-AE.js +8 -0
  382. package/dist/private/intl/previewtrigger/ar-AE.js.map +1 -0
  383. package/dist/private/intl/previewtrigger/ar-AE.mjs +8 -0
  384. package/dist/private/intl/previewtrigger/ar-AE.mjs.map +1 -0
  385. package/dist/private/intl/previewtrigger/bg-BG.cjs +6 -0
  386. package/dist/private/intl/previewtrigger/bg-BG.cjs.map +1 -0
  387. package/dist/private/intl/previewtrigger/bg-BG.js +8 -0
  388. package/dist/private/intl/previewtrigger/bg-BG.js.map +1 -0
  389. package/dist/private/intl/previewtrigger/bg-BG.mjs +8 -0
  390. package/dist/private/intl/previewtrigger/bg-BG.mjs.map +1 -0
  391. package/dist/private/intl/previewtrigger/cs-CZ.cjs +6 -0
  392. package/dist/private/intl/previewtrigger/cs-CZ.cjs.map +1 -0
  393. package/dist/private/intl/previewtrigger/cs-CZ.js +8 -0
  394. package/dist/private/intl/previewtrigger/cs-CZ.js.map +1 -0
  395. package/dist/private/intl/previewtrigger/cs-CZ.mjs +8 -0
  396. package/dist/private/intl/previewtrigger/cs-CZ.mjs.map +1 -0
  397. package/dist/private/intl/previewtrigger/da-DK.cjs +6 -0
  398. package/dist/private/intl/previewtrigger/da-DK.cjs.map +1 -0
  399. package/dist/private/intl/previewtrigger/da-DK.js +8 -0
  400. package/dist/private/intl/previewtrigger/da-DK.js.map +1 -0
  401. package/dist/private/intl/previewtrigger/da-DK.mjs +8 -0
  402. package/dist/private/intl/previewtrigger/da-DK.mjs.map +1 -0
  403. package/dist/private/intl/previewtrigger/de-DE.cjs +6 -0
  404. package/dist/private/intl/previewtrigger/de-DE.cjs.map +1 -0
  405. package/dist/private/intl/previewtrigger/de-DE.js +8 -0
  406. package/dist/private/intl/previewtrigger/de-DE.js.map +1 -0
  407. package/dist/private/intl/previewtrigger/de-DE.mjs +8 -0
  408. package/dist/private/intl/previewtrigger/de-DE.mjs.map +1 -0
  409. package/dist/private/intl/previewtrigger/el-GR.cjs +6 -0
  410. package/dist/private/intl/previewtrigger/el-GR.cjs.map +1 -0
  411. package/dist/private/intl/previewtrigger/el-GR.js +8 -0
  412. package/dist/private/intl/previewtrigger/el-GR.js.map +1 -0
  413. package/dist/private/intl/previewtrigger/el-GR.mjs +8 -0
  414. package/dist/private/intl/previewtrigger/el-GR.mjs.map +1 -0
  415. package/dist/private/intl/previewtrigger/en-US.cjs +6 -0
  416. package/dist/private/intl/previewtrigger/en-US.cjs.map +1 -0
  417. package/dist/private/intl/previewtrigger/en-US.js +8 -0
  418. package/dist/private/intl/previewtrigger/en-US.js.map +1 -0
  419. package/dist/private/intl/previewtrigger/en-US.mjs +8 -0
  420. package/dist/private/intl/previewtrigger/en-US.mjs.map +1 -0
  421. package/dist/private/intl/previewtrigger/es-ES.cjs +6 -0
  422. package/dist/private/intl/previewtrigger/es-ES.cjs.map +1 -0
  423. package/dist/private/intl/previewtrigger/es-ES.js +8 -0
  424. package/dist/private/intl/previewtrigger/es-ES.js.map +1 -0
  425. package/dist/private/intl/previewtrigger/es-ES.mjs +8 -0
  426. package/dist/private/intl/previewtrigger/es-ES.mjs.map +1 -0
  427. package/dist/private/intl/previewtrigger/et-EE.cjs +6 -0
  428. package/dist/private/intl/previewtrigger/et-EE.cjs.map +1 -0
  429. package/dist/private/intl/previewtrigger/et-EE.js +8 -0
  430. package/dist/private/intl/previewtrigger/et-EE.js.map +1 -0
  431. package/dist/private/intl/previewtrigger/et-EE.mjs +8 -0
  432. package/dist/private/intl/previewtrigger/et-EE.mjs.map +1 -0
  433. package/dist/private/intl/previewtrigger/fi-FI.cjs +6 -0
  434. package/dist/private/intl/previewtrigger/fi-FI.cjs.map +1 -0
  435. package/dist/private/intl/previewtrigger/fi-FI.js +8 -0
  436. package/dist/private/intl/previewtrigger/fi-FI.js.map +1 -0
  437. package/dist/private/intl/previewtrigger/fi-FI.mjs +8 -0
  438. package/dist/private/intl/previewtrigger/fi-FI.mjs.map +1 -0
  439. package/dist/private/intl/previewtrigger/fr-FR.cjs +6 -0
  440. package/dist/private/intl/previewtrigger/fr-FR.cjs.map +1 -0
  441. package/dist/private/intl/previewtrigger/fr-FR.js +8 -0
  442. package/dist/private/intl/previewtrigger/fr-FR.js.map +1 -0
  443. package/dist/private/intl/previewtrigger/fr-FR.mjs +8 -0
  444. package/dist/private/intl/previewtrigger/fr-FR.mjs.map +1 -0
  445. package/dist/private/intl/previewtrigger/he-IL.cjs +6 -0
  446. package/dist/private/intl/previewtrigger/he-IL.cjs.map +1 -0
  447. package/dist/private/intl/previewtrigger/he-IL.js +8 -0
  448. package/dist/private/intl/previewtrigger/he-IL.js.map +1 -0
  449. package/dist/private/intl/previewtrigger/he-IL.mjs +8 -0
  450. package/dist/private/intl/previewtrigger/he-IL.mjs.map +1 -0
  451. package/dist/private/intl/previewtrigger/hr-HR.cjs +6 -0
  452. package/dist/private/intl/previewtrigger/hr-HR.cjs.map +1 -0
  453. package/dist/private/intl/previewtrigger/hr-HR.js +8 -0
  454. package/dist/private/intl/previewtrigger/hr-HR.js.map +1 -0
  455. package/dist/private/intl/previewtrigger/hr-HR.mjs +8 -0
  456. package/dist/private/intl/previewtrigger/hr-HR.mjs.map +1 -0
  457. package/dist/private/intl/previewtrigger/hu-HU.cjs +6 -0
  458. package/dist/private/intl/previewtrigger/hu-HU.cjs.map +1 -0
  459. package/dist/private/intl/previewtrigger/hu-HU.js +8 -0
  460. package/dist/private/intl/previewtrigger/hu-HU.js.map +1 -0
  461. package/dist/private/intl/previewtrigger/hu-HU.mjs +8 -0
  462. package/dist/private/intl/previewtrigger/hu-HU.mjs.map +1 -0
  463. package/dist/private/intl/previewtrigger/it-IT.cjs +6 -0
  464. package/dist/private/intl/previewtrigger/it-IT.cjs.map +1 -0
  465. package/dist/private/intl/previewtrigger/it-IT.js +8 -0
  466. package/dist/private/intl/previewtrigger/it-IT.js.map +1 -0
  467. package/dist/private/intl/previewtrigger/it-IT.mjs +8 -0
  468. package/dist/private/intl/previewtrigger/it-IT.mjs.map +1 -0
  469. package/dist/private/intl/previewtrigger/ja-JP.cjs +6 -0
  470. package/dist/private/intl/previewtrigger/ja-JP.cjs.map +1 -0
  471. package/dist/private/intl/previewtrigger/ja-JP.js +8 -0
  472. package/dist/private/intl/previewtrigger/ja-JP.js.map +1 -0
  473. package/dist/private/intl/previewtrigger/ja-JP.mjs +8 -0
  474. package/dist/private/intl/previewtrigger/ja-JP.mjs.map +1 -0
  475. package/dist/private/intl/previewtrigger/ko-KR.cjs +6 -0
  476. package/dist/private/intl/previewtrigger/ko-KR.cjs.map +1 -0
  477. package/dist/private/intl/previewtrigger/ko-KR.js +8 -0
  478. package/dist/private/intl/previewtrigger/ko-KR.js.map +1 -0
  479. package/dist/private/intl/previewtrigger/ko-KR.mjs +8 -0
  480. package/dist/private/intl/previewtrigger/ko-KR.mjs.map +1 -0
  481. package/dist/private/intl/previewtrigger/lt-LT.cjs +6 -0
  482. package/dist/private/intl/previewtrigger/lt-LT.cjs.map +1 -0
  483. package/dist/private/intl/previewtrigger/lt-LT.js +8 -0
  484. package/dist/private/intl/previewtrigger/lt-LT.js.map +1 -0
  485. package/dist/private/intl/previewtrigger/lt-LT.mjs +8 -0
  486. package/dist/private/intl/previewtrigger/lt-LT.mjs.map +1 -0
  487. package/dist/private/intl/previewtrigger/lv-LV.cjs +6 -0
  488. package/dist/private/intl/previewtrigger/lv-LV.cjs.map +1 -0
  489. package/dist/private/intl/previewtrigger/lv-LV.js +8 -0
  490. package/dist/private/intl/previewtrigger/lv-LV.js.map +1 -0
  491. package/dist/private/intl/previewtrigger/lv-LV.mjs +8 -0
  492. package/dist/private/intl/previewtrigger/lv-LV.mjs.map +1 -0
  493. package/dist/private/intl/previewtrigger/nb-NO.cjs +6 -0
  494. package/dist/private/intl/previewtrigger/nb-NO.cjs.map +1 -0
  495. package/dist/private/intl/previewtrigger/nb-NO.js +8 -0
  496. package/dist/private/intl/previewtrigger/nb-NO.js.map +1 -0
  497. package/dist/private/intl/previewtrigger/nb-NO.mjs +8 -0
  498. package/dist/private/intl/previewtrigger/nb-NO.mjs.map +1 -0
  499. package/dist/private/intl/previewtrigger/nl-NL.cjs +6 -0
  500. package/dist/private/intl/previewtrigger/nl-NL.cjs.map +1 -0
  501. package/dist/private/intl/previewtrigger/nl-NL.js +8 -0
  502. package/dist/private/intl/previewtrigger/nl-NL.js.map +1 -0
  503. package/dist/private/intl/previewtrigger/nl-NL.mjs +8 -0
  504. package/dist/private/intl/previewtrigger/nl-NL.mjs.map +1 -0
  505. package/dist/private/intl/previewtrigger/pl-PL.cjs +6 -0
  506. package/dist/private/intl/previewtrigger/pl-PL.cjs.map +1 -0
  507. package/dist/private/intl/previewtrigger/pl-PL.js +8 -0
  508. package/dist/private/intl/previewtrigger/pl-PL.js.map +1 -0
  509. package/dist/private/intl/previewtrigger/pl-PL.mjs +8 -0
  510. package/dist/private/intl/previewtrigger/pl-PL.mjs.map +1 -0
  511. package/dist/private/intl/previewtrigger/pt-BR.cjs +6 -0
  512. package/dist/private/intl/previewtrigger/pt-BR.cjs.map +1 -0
  513. package/dist/private/intl/previewtrigger/pt-BR.js +8 -0
  514. package/dist/private/intl/previewtrigger/pt-BR.js.map +1 -0
  515. package/dist/private/intl/previewtrigger/pt-BR.mjs +8 -0
  516. package/dist/private/intl/previewtrigger/pt-BR.mjs.map +1 -0
  517. package/dist/private/intl/previewtrigger/pt-PT.cjs +6 -0
  518. package/dist/private/intl/previewtrigger/pt-PT.cjs.map +1 -0
  519. package/dist/private/intl/previewtrigger/pt-PT.js +8 -0
  520. package/dist/private/intl/previewtrigger/pt-PT.js.map +1 -0
  521. package/dist/private/intl/previewtrigger/pt-PT.mjs +8 -0
  522. package/dist/private/intl/previewtrigger/pt-PT.mjs.map +1 -0
  523. package/dist/private/intl/previewtrigger/ro-RO.cjs +6 -0
  524. package/dist/private/intl/previewtrigger/ro-RO.cjs.map +1 -0
  525. package/dist/private/intl/previewtrigger/ro-RO.js +8 -0
  526. package/dist/private/intl/previewtrigger/ro-RO.js.map +1 -0
  527. package/dist/private/intl/previewtrigger/ro-RO.mjs +8 -0
  528. package/dist/private/intl/previewtrigger/ro-RO.mjs.map +1 -0
  529. package/dist/private/intl/previewtrigger/ru-RU.cjs +6 -0
  530. package/dist/private/intl/previewtrigger/ru-RU.cjs.map +1 -0
  531. package/dist/private/intl/previewtrigger/ru-RU.js +8 -0
  532. package/dist/private/intl/previewtrigger/ru-RU.js.map +1 -0
  533. package/dist/private/intl/previewtrigger/ru-RU.mjs +8 -0
  534. package/dist/private/intl/previewtrigger/ru-RU.mjs.map +1 -0
  535. package/dist/private/intl/previewtrigger/sk-SK.cjs +6 -0
  536. package/dist/private/intl/previewtrigger/sk-SK.cjs.map +1 -0
  537. package/dist/private/intl/previewtrigger/sk-SK.js +8 -0
  538. package/dist/private/intl/previewtrigger/sk-SK.js.map +1 -0
  539. package/dist/private/intl/previewtrigger/sk-SK.mjs +8 -0
  540. package/dist/private/intl/previewtrigger/sk-SK.mjs.map +1 -0
  541. package/dist/private/intl/previewtrigger/sl-SI.cjs +6 -0
  542. package/dist/private/intl/previewtrigger/sl-SI.cjs.map +1 -0
  543. package/dist/private/intl/previewtrigger/sl-SI.js +8 -0
  544. package/dist/private/intl/previewtrigger/sl-SI.js.map +1 -0
  545. package/dist/private/intl/previewtrigger/sl-SI.mjs +8 -0
  546. package/dist/private/intl/previewtrigger/sl-SI.mjs.map +1 -0
  547. package/dist/private/intl/previewtrigger/sr-SP.cjs +6 -0
  548. package/dist/private/intl/previewtrigger/sr-SP.cjs.map +1 -0
  549. package/dist/private/intl/previewtrigger/sr-SP.js +8 -0
  550. package/dist/private/intl/previewtrigger/sr-SP.js.map +1 -0
  551. package/dist/private/intl/previewtrigger/sr-SP.mjs +8 -0
  552. package/dist/private/intl/previewtrigger/sr-SP.mjs.map +1 -0
  553. package/dist/private/intl/previewtrigger/sv-SE.cjs +6 -0
  554. package/dist/private/intl/previewtrigger/sv-SE.cjs.map +1 -0
  555. package/dist/private/intl/previewtrigger/sv-SE.js +8 -0
  556. package/dist/private/intl/previewtrigger/sv-SE.js.map +1 -0
  557. package/dist/private/intl/previewtrigger/sv-SE.mjs +8 -0
  558. package/dist/private/intl/previewtrigger/sv-SE.mjs.map +1 -0
  559. package/dist/private/intl/previewtrigger/tr-TR.cjs +6 -0
  560. package/dist/private/intl/previewtrigger/tr-TR.cjs.map +1 -0
  561. package/dist/private/intl/previewtrigger/tr-TR.js +8 -0
  562. package/dist/private/intl/previewtrigger/tr-TR.js.map +1 -0
  563. package/dist/private/intl/previewtrigger/tr-TR.mjs +8 -0
  564. package/dist/private/intl/previewtrigger/tr-TR.mjs.map +1 -0
  565. package/dist/private/intl/previewtrigger/uk-UA.cjs +6 -0
  566. package/dist/private/intl/previewtrigger/uk-UA.cjs.map +1 -0
  567. package/dist/private/intl/previewtrigger/uk-UA.js +8 -0
  568. package/dist/private/intl/previewtrigger/uk-UA.js.map +1 -0
  569. package/dist/private/intl/previewtrigger/uk-UA.mjs +8 -0
  570. package/dist/private/intl/previewtrigger/uk-UA.mjs.map +1 -0
  571. package/dist/private/intl/previewtrigger/zh-CN.cjs +6 -0
  572. package/dist/private/intl/previewtrigger/zh-CN.cjs.map +1 -0
  573. package/dist/private/intl/previewtrigger/zh-CN.js +8 -0
  574. package/dist/private/intl/previewtrigger/zh-CN.js.map +1 -0
  575. package/dist/private/intl/previewtrigger/zh-CN.mjs +8 -0
  576. package/dist/private/intl/previewtrigger/zh-CN.mjs.map +1 -0
  577. package/dist/private/intl/previewtrigger/zh-TW.cjs +6 -0
  578. package/dist/private/intl/previewtrigger/zh-TW.cjs.map +1 -0
  579. package/dist/private/intl/previewtrigger/zh-TW.js +8 -0
  580. package/dist/private/intl/previewtrigger/zh-TW.js.map +1 -0
  581. package/dist/private/intl/previewtrigger/zh-TW.mjs +8 -0
  582. package/dist/private/intl/previewtrigger/zh-TW.mjs.map +1 -0
  583. package/dist/private/intl/table/ar-AE.cjs +3 -3
  584. package/dist/private/intl/table/ar-AE.cjs.map +1 -1
  585. package/dist/private/intl/table/ar-AE.js +3 -3
  586. package/dist/private/intl/table/ar-AE.js.map +1 -1
  587. package/dist/private/intl/table/ar-AE.mjs +3 -3
  588. package/dist/private/intl/table/ar-AE.mjs.map +1 -1
  589. package/dist/private/intl/table/bg-BG.cjs +3 -3
  590. package/dist/private/intl/table/bg-BG.cjs.map +1 -1
  591. package/dist/private/intl/table/bg-BG.js +3 -3
  592. package/dist/private/intl/table/bg-BG.js.map +1 -1
  593. package/dist/private/intl/table/bg-BG.mjs +3 -3
  594. package/dist/private/intl/table/bg-BG.mjs.map +1 -1
  595. package/dist/private/intl/table/cs-CZ.cjs +3 -3
  596. package/dist/private/intl/table/cs-CZ.cjs.map +1 -1
  597. package/dist/private/intl/table/cs-CZ.js +3 -3
  598. package/dist/private/intl/table/cs-CZ.js.map +1 -1
  599. package/dist/private/intl/table/cs-CZ.mjs +3 -3
  600. package/dist/private/intl/table/cs-CZ.mjs.map +1 -1
  601. package/dist/private/intl/table/da-DK.cjs +3 -3
  602. package/dist/private/intl/table/da-DK.cjs.map +1 -1
  603. package/dist/private/intl/table/da-DK.js +3 -3
  604. package/dist/private/intl/table/da-DK.js.map +1 -1
  605. package/dist/private/intl/table/da-DK.mjs +3 -3
  606. package/dist/private/intl/table/da-DK.mjs.map +1 -1
  607. package/dist/private/intl/table/de-DE.cjs +3 -3
  608. package/dist/private/intl/table/de-DE.cjs.map +1 -1
  609. package/dist/private/intl/table/de-DE.js +3 -3
  610. package/dist/private/intl/table/de-DE.js.map +1 -1
  611. package/dist/private/intl/table/de-DE.mjs +3 -3
  612. package/dist/private/intl/table/de-DE.mjs.map +1 -1
  613. package/dist/private/intl/table/el-GR.cjs +3 -3
  614. package/dist/private/intl/table/el-GR.cjs.map +1 -1
  615. package/dist/private/intl/table/el-GR.js +3 -3
  616. package/dist/private/intl/table/el-GR.js.map +1 -1
  617. package/dist/private/intl/table/el-GR.mjs +3 -3
  618. package/dist/private/intl/table/el-GR.mjs.map +1 -1
  619. package/dist/private/intl/table/es-ES.cjs +3 -3
  620. package/dist/private/intl/table/es-ES.cjs.map +1 -1
  621. package/dist/private/intl/table/es-ES.js +3 -3
  622. package/dist/private/intl/table/es-ES.js.map +1 -1
  623. package/dist/private/intl/table/es-ES.mjs +3 -3
  624. package/dist/private/intl/table/es-ES.mjs.map +1 -1
  625. package/dist/private/intl/table/et-EE.cjs +3 -3
  626. package/dist/private/intl/table/et-EE.cjs.map +1 -1
  627. package/dist/private/intl/table/et-EE.js +3 -3
  628. package/dist/private/intl/table/et-EE.js.map +1 -1
  629. package/dist/private/intl/table/et-EE.mjs +3 -3
  630. package/dist/private/intl/table/et-EE.mjs.map +1 -1
  631. package/dist/private/intl/table/fi-FI.cjs +3 -3
  632. package/dist/private/intl/table/fi-FI.cjs.map +1 -1
  633. package/dist/private/intl/table/fi-FI.js +3 -3
  634. package/dist/private/intl/table/fi-FI.js.map +1 -1
  635. package/dist/private/intl/table/fi-FI.mjs +3 -3
  636. package/dist/private/intl/table/fi-FI.mjs.map +1 -1
  637. package/dist/private/intl/table/fr-FR.cjs +3 -3
  638. package/dist/private/intl/table/fr-FR.cjs.map +1 -1
  639. package/dist/private/intl/table/fr-FR.js +3 -3
  640. package/dist/private/intl/table/fr-FR.js.map +1 -1
  641. package/dist/private/intl/table/fr-FR.mjs +3 -3
  642. package/dist/private/intl/table/fr-FR.mjs.map +1 -1
  643. package/dist/private/intl/table/he-IL.cjs +3 -3
  644. package/dist/private/intl/table/he-IL.cjs.map +1 -1
  645. package/dist/private/intl/table/he-IL.js +3 -3
  646. package/dist/private/intl/table/he-IL.js.map +1 -1
  647. package/dist/private/intl/table/he-IL.mjs +3 -3
  648. package/dist/private/intl/table/he-IL.mjs.map +1 -1
  649. package/dist/private/intl/table/hr-HR.cjs +3 -3
  650. package/dist/private/intl/table/hr-HR.cjs.map +1 -1
  651. package/dist/private/intl/table/hr-HR.js +3 -3
  652. package/dist/private/intl/table/hr-HR.js.map +1 -1
  653. package/dist/private/intl/table/hr-HR.mjs +3 -3
  654. package/dist/private/intl/table/hr-HR.mjs.map +1 -1
  655. package/dist/private/intl/table/hu-HU.cjs +3 -3
  656. package/dist/private/intl/table/hu-HU.cjs.map +1 -1
  657. package/dist/private/intl/table/hu-HU.js +3 -3
  658. package/dist/private/intl/table/hu-HU.js.map +1 -1
  659. package/dist/private/intl/table/hu-HU.mjs +3 -3
  660. package/dist/private/intl/table/hu-HU.mjs.map +1 -1
  661. package/dist/private/intl/table/it-IT.cjs +3 -3
  662. package/dist/private/intl/table/it-IT.cjs.map +1 -1
  663. package/dist/private/intl/table/it-IT.js +3 -3
  664. package/dist/private/intl/table/it-IT.js.map +1 -1
  665. package/dist/private/intl/table/it-IT.mjs +3 -3
  666. package/dist/private/intl/table/it-IT.mjs.map +1 -1
  667. package/dist/private/intl/table/ja-JP.cjs +3 -3
  668. package/dist/private/intl/table/ja-JP.cjs.map +1 -1
  669. package/dist/private/intl/table/ja-JP.js +3 -3
  670. package/dist/private/intl/table/ja-JP.js.map +1 -1
  671. package/dist/private/intl/table/ja-JP.mjs +3 -3
  672. package/dist/private/intl/table/ja-JP.mjs.map +1 -1
  673. package/dist/private/intl/table/ko-KR.cjs +3 -3
  674. package/dist/private/intl/table/ko-KR.cjs.map +1 -1
  675. package/dist/private/intl/table/ko-KR.js +3 -3
  676. package/dist/private/intl/table/ko-KR.js.map +1 -1
  677. package/dist/private/intl/table/ko-KR.mjs +3 -3
  678. package/dist/private/intl/table/ko-KR.mjs.map +1 -1
  679. package/dist/private/intl/table/lt-LT.cjs +3 -3
  680. package/dist/private/intl/table/lt-LT.cjs.map +1 -1
  681. package/dist/private/intl/table/lt-LT.js +3 -3
  682. package/dist/private/intl/table/lt-LT.js.map +1 -1
  683. package/dist/private/intl/table/lt-LT.mjs +3 -3
  684. package/dist/private/intl/table/lt-LT.mjs.map +1 -1
  685. package/dist/private/intl/table/lv-LV.cjs +3 -3
  686. package/dist/private/intl/table/lv-LV.cjs.map +1 -1
  687. package/dist/private/intl/table/lv-LV.js +3 -3
  688. package/dist/private/intl/table/lv-LV.js.map +1 -1
  689. package/dist/private/intl/table/lv-LV.mjs +3 -3
  690. package/dist/private/intl/table/lv-LV.mjs.map +1 -1
  691. package/dist/private/intl/table/nb-NO.cjs +3 -3
  692. package/dist/private/intl/table/nb-NO.cjs.map +1 -1
  693. package/dist/private/intl/table/nb-NO.js +3 -3
  694. package/dist/private/intl/table/nb-NO.js.map +1 -1
  695. package/dist/private/intl/table/nb-NO.mjs +3 -3
  696. package/dist/private/intl/table/nb-NO.mjs.map +1 -1
  697. package/dist/private/intl/table/nl-NL.cjs +3 -3
  698. package/dist/private/intl/table/nl-NL.cjs.map +1 -1
  699. package/dist/private/intl/table/nl-NL.js +3 -3
  700. package/dist/private/intl/table/nl-NL.js.map +1 -1
  701. package/dist/private/intl/table/nl-NL.mjs +3 -3
  702. package/dist/private/intl/table/nl-NL.mjs.map +1 -1
  703. package/dist/private/intl/table/pl-PL.cjs +3 -3
  704. package/dist/private/intl/table/pl-PL.cjs.map +1 -1
  705. package/dist/private/intl/table/pl-PL.js +3 -3
  706. package/dist/private/intl/table/pl-PL.js.map +1 -1
  707. package/dist/private/intl/table/pl-PL.mjs +3 -3
  708. package/dist/private/intl/table/pl-PL.mjs.map +1 -1
  709. package/dist/private/intl/table/pt-BR.cjs +3 -3
  710. package/dist/private/intl/table/pt-BR.cjs.map +1 -1
  711. package/dist/private/intl/table/pt-BR.js +3 -3
  712. package/dist/private/intl/table/pt-BR.js.map +1 -1
  713. package/dist/private/intl/table/pt-BR.mjs +3 -3
  714. package/dist/private/intl/table/pt-BR.mjs.map +1 -1
  715. package/dist/private/intl/table/pt-PT.cjs +3 -3
  716. package/dist/private/intl/table/pt-PT.cjs.map +1 -1
  717. package/dist/private/intl/table/pt-PT.js +3 -3
  718. package/dist/private/intl/table/pt-PT.js.map +1 -1
  719. package/dist/private/intl/table/pt-PT.mjs +3 -3
  720. package/dist/private/intl/table/pt-PT.mjs.map +1 -1
  721. package/dist/private/intl/table/ro-RO.cjs +3 -3
  722. package/dist/private/intl/table/ro-RO.cjs.map +1 -1
  723. package/dist/private/intl/table/ro-RO.js +3 -3
  724. package/dist/private/intl/table/ro-RO.js.map +1 -1
  725. package/dist/private/intl/table/ro-RO.mjs +3 -3
  726. package/dist/private/intl/table/ro-RO.mjs.map +1 -1
  727. package/dist/private/intl/table/ru-RU.cjs +3 -3
  728. package/dist/private/intl/table/ru-RU.cjs.map +1 -1
  729. package/dist/private/intl/table/ru-RU.js +3 -3
  730. package/dist/private/intl/table/ru-RU.js.map +1 -1
  731. package/dist/private/intl/table/ru-RU.mjs +3 -3
  732. package/dist/private/intl/table/ru-RU.mjs.map +1 -1
  733. package/dist/private/intl/table/sk-SK.cjs +3 -3
  734. package/dist/private/intl/table/sk-SK.cjs.map +1 -1
  735. package/dist/private/intl/table/sk-SK.js +3 -3
  736. package/dist/private/intl/table/sk-SK.js.map +1 -1
  737. package/dist/private/intl/table/sk-SK.mjs +3 -3
  738. package/dist/private/intl/table/sk-SK.mjs.map +1 -1
  739. package/dist/private/intl/table/sl-SI.cjs +3 -3
  740. package/dist/private/intl/table/sl-SI.cjs.map +1 -1
  741. package/dist/private/intl/table/sl-SI.js +3 -3
  742. package/dist/private/intl/table/sl-SI.js.map +1 -1
  743. package/dist/private/intl/table/sl-SI.mjs +3 -3
  744. package/dist/private/intl/table/sl-SI.mjs.map +1 -1
  745. package/dist/private/intl/table/sr-SP.cjs +3 -3
  746. package/dist/private/intl/table/sr-SP.cjs.map +1 -1
  747. package/dist/private/intl/table/sr-SP.js +3 -3
  748. package/dist/private/intl/table/sr-SP.js.map +1 -1
  749. package/dist/private/intl/table/sr-SP.mjs +3 -3
  750. package/dist/private/intl/table/sr-SP.mjs.map +1 -1
  751. package/dist/private/intl/table/sv-SE.cjs +3 -3
  752. package/dist/private/intl/table/sv-SE.cjs.map +1 -1
  753. package/dist/private/intl/table/sv-SE.js +3 -3
  754. package/dist/private/intl/table/sv-SE.js.map +1 -1
  755. package/dist/private/intl/table/sv-SE.mjs +3 -3
  756. package/dist/private/intl/table/sv-SE.mjs.map +1 -1
  757. package/dist/private/intl/table/tr-TR.cjs +3 -3
  758. package/dist/private/intl/table/tr-TR.cjs.map +1 -1
  759. package/dist/private/intl/table/tr-TR.js +3 -3
  760. package/dist/private/intl/table/tr-TR.js.map +1 -1
  761. package/dist/private/intl/table/tr-TR.mjs +3 -3
  762. package/dist/private/intl/table/tr-TR.mjs.map +1 -1
  763. package/dist/private/intl/table/uk-UA.cjs +3 -3
  764. package/dist/private/intl/table/uk-UA.cjs.map +1 -1
  765. package/dist/private/intl/table/uk-UA.js +3 -3
  766. package/dist/private/intl/table/uk-UA.js.map +1 -1
  767. package/dist/private/intl/table/uk-UA.mjs +3 -3
  768. package/dist/private/intl/table/uk-UA.mjs.map +1 -1
  769. package/dist/private/intl/table/zh-CN.cjs +4 -4
  770. package/dist/private/intl/table/zh-CN.cjs.map +1 -1
  771. package/dist/private/intl/table/zh-CN.js +4 -4
  772. package/dist/private/intl/table/zh-CN.js.map +1 -1
  773. package/dist/private/intl/table/zh-CN.mjs +4 -4
  774. package/dist/private/intl/table/zh-CN.mjs.map +1 -1
  775. package/dist/private/intl/table/zh-TW.cjs +3 -3
  776. package/dist/private/intl/table/zh-TW.cjs.map +1 -1
  777. package/dist/private/intl/table/zh-TW.js +3 -3
  778. package/dist/private/intl/table/zh-TW.js.map +1 -1
  779. package/dist/private/intl/table/zh-TW.mjs +3 -3
  780. package/dist/private/intl/table/zh-TW.mjs.map +1 -1
  781. package/dist/private/intl/tree/es-ES.cjs +1 -1
  782. package/dist/private/intl/tree/es-ES.cjs.map +1 -1
  783. package/dist/private/intl/tree/es-ES.js +1 -1
  784. package/dist/private/intl/tree/es-ES.js.map +1 -1
  785. package/dist/private/intl/tree/es-ES.mjs +1 -1
  786. package/dist/private/intl/tree/es-ES.mjs.map +1 -1
  787. package/dist/private/link/useLink.cjs +2 -1
  788. package/dist/private/link/useLink.cjs.map +1 -1
  789. package/dist/private/link/useLink.js +2 -1
  790. package/dist/private/link/useLink.js.map +1 -1
  791. package/dist/private/link/useLink.mjs +2 -1
  792. package/dist/private/link/useLink.mjs.map +1 -1
  793. package/dist/private/menu/useMenu.cjs.map +1 -1
  794. package/dist/private/menu/useMenu.js.map +1 -1
  795. package/dist/private/menu/useMenu.mjs.map +1 -1
  796. package/dist/private/menu/useMenuItem.cjs +34 -34
  797. package/dist/private/menu/useMenuItem.cjs.map +1 -1
  798. package/dist/private/menu/useMenuItem.js +34 -34
  799. package/dist/private/menu/useMenuItem.js.map +1 -1
  800. package/dist/private/menu/useMenuItem.mjs +34 -34
  801. package/dist/private/menu/useMenuItem.mjs.map +1 -1
  802. package/dist/private/menu/useMenuTrigger.cjs +96 -30
  803. package/dist/private/menu/useMenuTrigger.cjs.map +1 -1
  804. package/dist/private/menu/useMenuTrigger.js +96 -30
  805. package/dist/private/menu/useMenuTrigger.js.map +1 -1
  806. package/dist/private/menu/useMenuTrigger.mjs +96 -30
  807. package/dist/private/menu/useMenuTrigger.mjs.map +1 -1
  808. package/dist/private/menu/useSubmenuTrigger.cjs +44 -36
  809. package/dist/private/menu/useSubmenuTrigger.cjs.map +1 -1
  810. package/dist/private/menu/useSubmenuTrigger.js +44 -36
  811. package/dist/private/menu/useSubmenuTrigger.js.map +1 -1
  812. package/dist/private/menu/useSubmenuTrigger.mjs +44 -36
  813. package/dist/private/menu/useSubmenuTrigger.mjs.map +1 -1
  814. package/dist/private/menu/utils.cjs.map +1 -1
  815. package/dist/private/menu/utils.js.map +1 -1
  816. package/dist/private/menu/utils.mjs.map +1 -1
  817. package/dist/private/numberfield/useNumberField.cjs +24 -19
  818. package/dist/private/numberfield/useNumberField.cjs.map +1 -1
  819. package/dist/private/numberfield/useNumberField.js +24 -19
  820. package/dist/private/numberfield/useNumberField.js.map +1 -1
  821. package/dist/private/numberfield/useNumberField.mjs +24 -19
  822. package/dist/private/numberfield/useNumberField.mjs.map +1 -1
  823. package/dist/private/overlays/DismissButton.cjs.map +1 -1
  824. package/dist/private/overlays/DismissButton.js.map +1 -1
  825. package/dist/private/overlays/DismissButton.mjs.map +1 -1
  826. package/dist/private/overlays/Overlay.cjs +5 -1
  827. package/dist/private/overlays/Overlay.cjs.map +1 -1
  828. package/dist/private/overlays/Overlay.js +5 -1
  829. package/dist/private/overlays/Overlay.js.map +1 -1
  830. package/dist/private/overlays/Overlay.mjs +5 -1
  831. package/dist/private/overlays/Overlay.mjs.map +1 -1
  832. package/dist/private/overlays/ariaHideOutside.cjs +12 -8
  833. package/dist/private/overlays/ariaHideOutside.cjs.map +1 -1
  834. package/dist/private/overlays/ariaHideOutside.js +13 -9
  835. package/dist/private/overlays/ariaHideOutside.js.map +1 -1
  836. package/dist/private/overlays/ariaHideOutside.mjs +13 -9
  837. package/dist/private/overlays/ariaHideOutside.mjs.map +1 -1
  838. package/dist/private/overlays/calculatePosition.cjs +7 -7
  839. package/dist/private/overlays/calculatePosition.cjs.map +1 -1
  840. package/dist/private/overlays/calculatePosition.js +7 -7
  841. package/dist/private/overlays/calculatePosition.js.map +1 -1
  842. package/dist/private/overlays/calculatePosition.mjs +7 -7
  843. package/dist/private/overlays/calculatePosition.mjs.map +1 -1
  844. package/dist/private/overlays/useCloseOnScroll.cjs +3 -4
  845. package/dist/private/overlays/useCloseOnScroll.cjs.map +1 -1
  846. package/dist/private/overlays/useCloseOnScroll.js +4 -5
  847. package/dist/private/overlays/useCloseOnScroll.js.map +1 -1
  848. package/dist/private/overlays/useCloseOnScroll.mjs +4 -5
  849. package/dist/private/overlays/useCloseOnScroll.mjs.map +1 -1
  850. package/dist/private/overlays/useOverlay.cjs +13 -7
  851. package/dist/private/overlays/useOverlay.cjs.map +1 -1
  852. package/dist/private/overlays/useOverlay.js +13 -7
  853. package/dist/private/overlays/useOverlay.js.map +1 -1
  854. package/dist/private/overlays/useOverlay.mjs +13 -7
  855. package/dist/private/overlays/useOverlay.mjs.map +1 -1
  856. package/dist/private/overlays/useOverlayPosition.cjs +9 -2
  857. package/dist/private/overlays/useOverlayPosition.cjs.map +1 -1
  858. package/dist/private/overlays/useOverlayPosition.js +9 -2
  859. package/dist/private/overlays/useOverlayPosition.js.map +1 -1
  860. package/dist/private/overlays/useOverlayPosition.mjs +9 -2
  861. package/dist/private/overlays/useOverlayPosition.mjs.map +1 -1
  862. package/dist/private/overlays/usePopover.cjs +6 -2
  863. package/dist/private/overlays/usePopover.cjs.map +1 -1
  864. package/dist/private/overlays/usePopover.js +7 -2
  865. package/dist/private/overlays/usePopover.js.map +1 -1
  866. package/dist/private/overlays/usePopover.mjs +6 -2
  867. package/dist/private/overlays/usePopover.mjs.map +1 -1
  868. package/dist/private/overlays/usePreventScroll.cjs +2 -5
  869. package/dist/private/overlays/usePreventScroll.cjs.map +1 -1
  870. package/dist/private/overlays/usePreventScroll.js +3 -6
  871. package/dist/private/overlays/usePreventScroll.js.map +1 -1
  872. package/dist/private/overlays/usePreventScroll.mjs +3 -6
  873. package/dist/private/overlays/usePreventScroll.mjs.map +1 -1
  874. package/dist/private/progress/useProgressBar.cjs +2 -1
  875. package/dist/private/progress/useProgressBar.cjs.map +1 -1
  876. package/dist/private/progress/useProgressBar.js +2 -1
  877. package/dist/private/progress/useProgressBar.js.map +1 -1
  878. package/dist/private/progress/useProgressBar.mjs +2 -1
  879. package/dist/private/progress/useProgressBar.mjs.map +1 -1
  880. package/dist/private/radio/useRadioGroup.cjs +26 -23
  881. package/dist/private/radio/useRadioGroup.cjs.map +1 -1
  882. package/dist/private/radio/useRadioGroup.js +26 -23
  883. package/dist/private/radio/useRadioGroup.js.map +1 -1
  884. package/dist/private/radio/useRadioGroup.mjs +26 -23
  885. package/dist/private/radio/useRadioGroup.mjs.map +1 -1
  886. package/dist/private/searchfield/useSearchField.cjs +28 -22
  887. package/dist/private/searchfield/useSearchField.cjs.map +1 -1
  888. package/dist/private/searchfield/useSearchField.js +28 -22
  889. package/dist/private/searchfield/useSearchField.js.map +1 -1
  890. package/dist/private/searchfield/useSearchField.mjs +28 -22
  891. package/dist/private/searchfield/useSearchField.mjs.map +1 -1
  892. package/dist/private/select/useSelect.cjs +22 -25
  893. package/dist/private/select/useSelect.cjs.map +1 -1
  894. package/dist/private/select/useSelect.js +24 -27
  895. package/dist/private/select/useSelect.js.map +1 -1
  896. package/dist/private/select/useSelect.mjs +22 -25
  897. package/dist/private/select/useSelect.mjs.map +1 -1
  898. package/dist/private/selection/ListKeyboardDelegate.cjs +31 -3
  899. package/dist/private/selection/ListKeyboardDelegate.cjs.map +1 -1
  900. package/dist/private/selection/ListKeyboardDelegate.js +31 -3
  901. package/dist/private/selection/ListKeyboardDelegate.js.map +1 -1
  902. package/dist/private/selection/ListKeyboardDelegate.mjs +31 -3
  903. package/dist/private/selection/ListKeyboardDelegate.mjs.map +1 -1
  904. package/dist/private/selection/useSelectableCollection.cjs +222 -159
  905. package/dist/private/selection/useSelectableCollection.cjs.map +1 -1
  906. package/dist/private/selection/useSelectableCollection.js +232 -168
  907. package/dist/private/selection/useSelectableCollection.js.map +1 -1
  908. package/dist/private/selection/useSelectableCollection.mjs +222 -159
  909. package/dist/private/selection/useSelectableCollection.mjs.map +1 -1
  910. package/dist/private/selection/useSelectableItem.cjs +58 -13
  911. package/dist/private/selection/useSelectableItem.cjs.map +1 -1
  912. package/dist/private/selection/useSelectableItem.js +58 -13
  913. package/dist/private/selection/useSelectableItem.js.map +1 -1
  914. package/dist/private/selection/useSelectableItem.mjs +58 -13
  915. package/dist/private/selection/useSelectableItem.mjs.map +1 -1
  916. package/dist/private/selection/useTypeSelect.cjs +50 -18
  917. package/dist/private/selection/useTypeSelect.cjs.map +1 -1
  918. package/dist/private/selection/useTypeSelect.js +51 -19
  919. package/dist/private/selection/useTypeSelect.js.map +1 -1
  920. package/dist/private/selection/useTypeSelect.mjs +51 -19
  921. package/dist/private/selection/useTypeSelect.mjs.map +1 -1
  922. package/dist/private/slider/useSlider.cjs.map +1 -1
  923. package/dist/private/slider/useSlider.js.map +1 -1
  924. package/dist/private/slider/useSlider.mjs.map +1 -1
  925. package/dist/private/slider/useSliderThumb.cjs +28 -26
  926. package/dist/private/slider/useSliderThumb.cjs.map +1 -1
  927. package/dist/private/slider/useSliderThumb.js +28 -26
  928. package/dist/private/slider/useSliderThumb.js.map +1 -1
  929. package/dist/private/slider/useSliderThumb.mjs +28 -26
  930. package/dist/private/slider/useSliderThumb.mjs.map +1 -1
  931. package/dist/private/spinbutton/useSpinButton.cjs +49 -34
  932. package/dist/private/spinbutton/useSpinButton.cjs.map +1 -1
  933. package/dist/private/spinbutton/useSpinButton.js +49 -34
  934. package/dist/private/spinbutton/useSpinButton.js.map +1 -1
  935. package/dist/private/spinbutton/useSpinButton.mjs +49 -34
  936. package/dist/private/spinbutton/useSpinButton.mjs.map +1 -1
  937. package/dist/private/ssr/SSRProvider.cjs +12 -3
  938. package/dist/private/ssr/SSRProvider.cjs.map +1 -1
  939. package/dist/private/ssr/SSRProvider.js +12 -3
  940. package/dist/private/ssr/SSRProvider.js.map +1 -1
  941. package/dist/private/ssr/SSRProvider.mjs +12 -3
  942. package/dist/private/ssr/SSRProvider.mjs.map +1 -1
  943. package/dist/private/steplist/useStepList.cjs.map +1 -1
  944. package/dist/private/steplist/useStepList.js.map +1 -1
  945. package/dist/private/steplist/useStepList.mjs.map +1 -1
  946. package/dist/private/steplist/useStepListItem.cjs +0 -9
  947. package/dist/private/steplist/useStepListItem.cjs.map +1 -1
  948. package/dist/private/steplist/useStepListItem.js +0 -10
  949. package/dist/private/steplist/useStepListItem.js.map +1 -1
  950. package/dist/private/steplist/useStepListItem.mjs +0 -9
  951. package/dist/private/steplist/useStepListItem.mjs.map +1 -1
  952. package/dist/private/table/useTable.cjs +4 -2
  953. package/dist/private/table/useTable.cjs.map +1 -1
  954. package/dist/private/table/useTable.js +4 -2
  955. package/dist/private/table/useTable.js.map +1 -1
  956. package/dist/private/table/useTable.mjs +4 -2
  957. package/dist/private/table/useTable.mjs.map +1 -1
  958. package/dist/private/table/useTableCell.cjs +2 -0
  959. package/dist/private/table/useTableCell.cjs.map +1 -1
  960. package/dist/private/table/useTableCell.js +2 -0
  961. package/dist/private/table/useTableCell.js.map +1 -1
  962. package/dist/private/table/useTableCell.mjs +2 -0
  963. package/dist/private/table/useTableCell.mjs.map +1 -1
  964. package/dist/private/table/useTableColumnHeader.cjs +2 -3
  965. package/dist/private/table/useTableColumnHeader.cjs.map +1 -1
  966. package/dist/private/table/useTableColumnHeader.js +2 -3
  967. package/dist/private/table/useTableColumnHeader.js.map +1 -1
  968. package/dist/private/table/useTableColumnHeader.mjs +2 -3
  969. package/dist/private/table/useTableColumnHeader.mjs.map +1 -1
  970. package/dist/private/table/useTableColumnResize.cjs +32 -14
  971. package/dist/private/table/useTableColumnResize.cjs.map +1 -1
  972. package/dist/private/table/useTableColumnResize.js +33 -15
  973. package/dist/private/table/useTableColumnResize.js.map +1 -1
  974. package/dist/private/table/useTableColumnResize.mjs +33 -15
  975. package/dist/private/table/useTableColumnResize.mjs.map +1 -1
  976. package/dist/private/table/useTableRow.cjs +4 -2
  977. package/dist/private/table/useTableRow.cjs.map +1 -1
  978. package/dist/private/table/useTableRow.js +4 -2
  979. package/dist/private/table/useTableRow.js.map +1 -1
  980. package/dist/private/table/useTableRow.mjs +4 -2
  981. package/dist/private/table/useTableRow.mjs.map +1 -1
  982. package/dist/private/table/useTableSelectionCheckbox.cjs.map +1 -1
  983. package/dist/private/table/useTableSelectionCheckbox.js.map +1 -1
  984. package/dist/private/table/useTableSelectionCheckbox.mjs.map +1 -1
  985. package/dist/private/tabs/TabsKeyboardDelegate.cjs +2 -2
  986. package/dist/private/tabs/TabsKeyboardDelegate.cjs.map +1 -1
  987. package/dist/private/tabs/TabsKeyboardDelegate.js +2 -2
  988. package/dist/private/tabs/TabsKeyboardDelegate.js.map +1 -1
  989. package/dist/private/tabs/TabsKeyboardDelegate.mjs +2 -2
  990. package/dist/private/tabs/TabsKeyboardDelegate.mjs.map +1 -1
  991. package/dist/private/tag/useTag.cjs +21 -11
  992. package/dist/private/tag/useTag.cjs.map +1 -1
  993. package/dist/private/tag/useTag.js +21 -11
  994. package/dist/private/tag/useTag.js.map +1 -1
  995. package/dist/private/tag/useTag.mjs +21 -11
  996. package/dist/private/tag/useTag.mjs.map +1 -1
  997. package/dist/private/textfield/useFormattedTextField.cjs +1 -0
  998. package/dist/private/textfield/useFormattedTextField.cjs.map +1 -1
  999. package/dist/private/textfield/useFormattedTextField.js +1 -0
  1000. package/dist/private/textfield/useFormattedTextField.js.map +1 -1
  1001. package/dist/private/textfield/useFormattedTextField.mjs +1 -0
  1002. package/dist/private/textfield/useFormattedTextField.mjs.map +1 -1
  1003. package/dist/private/toast/useToast.cjs.map +1 -1
  1004. package/dist/private/toast/useToast.js.map +1 -1
  1005. package/dist/private/toast/useToast.mjs.map +1 -1
  1006. package/dist/private/toast/useToastRegion.cjs +5 -0
  1007. package/dist/private/toast/useToastRegion.cjs.map +1 -1
  1008. package/dist/private/toast/useToastRegion.js +5 -0
  1009. package/dist/private/toast/useToastRegion.js.map +1 -1
  1010. package/dist/private/toast/useToastRegion.mjs +5 -0
  1011. package/dist/private/toast/useToastRegion.mjs.map +1 -1
  1012. package/dist/private/toggle/useToggle.cjs +1 -0
  1013. package/dist/private/toggle/useToggle.cjs.map +1 -1
  1014. package/dist/private/toggle/useToggle.js +1 -0
  1015. package/dist/private/toggle/useToggle.js.map +1 -1
  1016. package/dist/private/toggle/useToggle.mjs +1 -0
  1017. package/dist/private/toggle/useToggle.mjs.map +1 -1
  1018. package/dist/private/tokenfield/useToken.cjs +46 -0
  1019. package/dist/private/tokenfield/useToken.cjs.map +1 -0
  1020. package/dist/private/tokenfield/useToken.js +41 -0
  1021. package/dist/private/tokenfield/useToken.js.map +1 -0
  1022. package/dist/private/tokenfield/useToken.mjs +41 -0
  1023. package/dist/private/tokenfield/useToken.mjs.map +1 -0
  1024. package/dist/private/tokenfield/useTokenField.cjs +587 -0
  1025. package/dist/private/tokenfield/useTokenField.cjs.map +1 -0
  1026. package/dist/private/tokenfield/useTokenField.js +590 -0
  1027. package/dist/private/tokenfield/useTokenField.js.map +1 -0
  1028. package/dist/private/tokenfield/useTokenField.mjs +579 -0
  1029. package/dist/private/tokenfield/useTokenField.mjs.map +1 -0
  1030. package/dist/private/toolbar/useToolbar.cjs +1 -1
  1031. package/dist/private/toolbar/useToolbar.cjs.map +1 -1
  1032. package/dist/private/toolbar/useToolbar.js +1 -1
  1033. package/dist/private/toolbar/useToolbar.js.map +1 -1
  1034. package/dist/private/toolbar/useToolbar.mjs +1 -1
  1035. package/dist/private/toolbar/useToolbar.mjs.map +1 -1
  1036. package/dist/private/tooltip/intlStrings.cjs +108 -0
  1037. package/dist/private/tooltip/intlStrings.cjs.map +1 -0
  1038. package/dist/private/tooltip/intlStrings.js +110 -0
  1039. package/dist/private/tooltip/intlStrings.js.map +1 -0
  1040. package/dist/private/tooltip/intlStrings.mjs +110 -0
  1041. package/dist/private/tooltip/intlStrings.mjs.map +1 -0
  1042. package/dist/private/tooltip/usePreviewTrigger.cjs +212 -0
  1043. package/dist/private/tooltip/usePreviewTrigger.cjs.map +1 -0
  1044. package/dist/private/tooltip/usePreviewTrigger.js +208 -0
  1045. package/dist/private/tooltip/usePreviewTrigger.js.map +1 -0
  1046. package/dist/private/tooltip/usePreviewTrigger.mjs +207 -0
  1047. package/dist/private/tooltip/usePreviewTrigger.mjs.map +1 -0
  1048. package/dist/private/tooltip/useSafeArea.cjs +134 -0
  1049. package/dist/private/tooltip/useSafeArea.cjs.map +1 -0
  1050. package/dist/private/tooltip/useSafeArea.js +130 -0
  1051. package/dist/private/tooltip/useSafeArea.js.map +1 -0
  1052. package/dist/private/tooltip/useSafeArea.mjs +129 -0
  1053. package/dist/private/tooltip/useSafeArea.mjs.map +1 -0
  1054. package/dist/private/tooltip/useTooltipTrigger.cjs +1 -0
  1055. package/dist/private/tooltip/useTooltipTrigger.cjs.map +1 -1
  1056. package/dist/private/tooltip/useTooltipTrigger.js +1 -0
  1057. package/dist/private/tooltip/useTooltipTrigger.js.map +1 -1
  1058. package/dist/private/tooltip/useTooltipTrigger.mjs +1 -0
  1059. package/dist/private/tooltip/useTooltipTrigger.mjs.map +1 -1
  1060. package/dist/private/tree/useTree.cjs +1 -0
  1061. package/dist/private/tree/useTree.cjs.map +1 -1
  1062. package/dist/private/tree/useTree.js +1 -0
  1063. package/dist/private/tree/useTree.js.map +1 -1
  1064. package/dist/private/tree/useTree.mjs +1 -0
  1065. package/dist/private/tree/useTree.mjs.map +1 -1
  1066. package/dist/private/tree/useTreeItem.cjs.map +1 -1
  1067. package/dist/private/tree/useTreeItem.js.map +1 -1
  1068. package/dist/private/tree/useTreeItem.mjs.map +1 -1
  1069. package/dist/private/utils/domHelpers.cjs +43 -12
  1070. package/dist/private/utils/domHelpers.cjs.map +1 -1
  1071. package/dist/private/utils/domHelpers.js +45 -14
  1072. package/dist/private/utils/domHelpers.js.map +1 -1
  1073. package/dist/private/utils/domHelpers.mjs +43 -13
  1074. package/dist/private/utils/domHelpers.mjs.map +1 -1
  1075. package/dist/private/utils/isElementVisible.cjs +1 -1
  1076. package/dist/private/utils/isElementVisible.cjs.map +1 -1
  1077. package/dist/private/utils/isElementVisible.js +1 -1
  1078. package/dist/private/utils/isElementVisible.js.map +1 -1
  1079. package/dist/private/utils/isElementVisible.mjs +1 -1
  1080. package/dist/private/utils/isElementVisible.mjs.map +1 -1
  1081. package/dist/private/utils/isFocusable.cjs +3 -1
  1082. package/dist/private/utils/isFocusable.cjs.map +1 -1
  1083. package/dist/private/utils/isFocusable.js +3 -1
  1084. package/dist/private/utils/isFocusable.js.map +1 -1
  1085. package/dist/private/utils/isFocusable.mjs +3 -1
  1086. package/dist/private/utils/isFocusable.mjs.map +1 -1
  1087. package/dist/private/utils/isVirtualEvent.cjs +1 -1
  1088. package/dist/private/utils/isVirtualEvent.cjs.map +1 -1
  1089. package/dist/private/utils/isVirtualEvent.js +1 -1
  1090. package/dist/private/utils/isVirtualEvent.js.map +1 -1
  1091. package/dist/private/utils/isVirtualEvent.mjs +1 -1
  1092. package/dist/private/utils/isVirtualEvent.mjs.map +1 -1
  1093. package/dist/private/utils/openLink.cjs +4 -2
  1094. package/dist/private/utils/openLink.cjs.map +1 -1
  1095. package/dist/private/utils/openLink.js +4 -2
  1096. package/dist/private/utils/openLink.js.map +1 -1
  1097. package/dist/private/utils/openLink.mjs +4 -2
  1098. package/dist/private/utils/openLink.mjs.map +1 -1
  1099. package/dist/private/utils/platform.cjs +8 -4
  1100. package/dist/private/utils/platform.cjs.map +1 -1
  1101. package/dist/private/utils/platform.js +7 -4
  1102. package/dist/private/utils/platform.js.map +1 -1
  1103. package/dist/private/utils/platform.mjs +7 -4
  1104. package/dist/private/utils/platform.mjs.map +1 -1
  1105. package/dist/private/utils/scrollIntoView.cjs +3 -3
  1106. package/dist/private/utils/scrollIntoView.cjs.map +1 -1
  1107. package/dist/private/utils/scrollIntoView.js +4 -4
  1108. package/dist/private/utils/scrollIntoView.js.map +1 -1
  1109. package/dist/private/utils/scrollIntoView.mjs +4 -4
  1110. package/dist/private/utils/scrollIntoView.mjs.map +1 -1
  1111. package/dist/private/utils/shadowdom/DOMFunctions.cjs +28 -1
  1112. package/dist/private/utils/shadowdom/DOMFunctions.cjs.map +1 -1
  1113. package/dist/private/utils/shadowdom/DOMFunctions.js +30 -2
  1114. package/dist/private/utils/shadowdom/DOMFunctions.js.map +1 -1
  1115. package/dist/private/utils/shadowdom/DOMFunctions.mjs +28 -2
  1116. package/dist/private/utils/shadowdom/DOMFunctions.mjs.map +1 -1
  1117. package/dist/private/utils/useDeepMemo.cjs +4 -1
  1118. package/dist/private/utils/useDeepMemo.cjs.map +1 -1
  1119. package/dist/private/utils/useDeepMemo.js +4 -1
  1120. package/dist/private/utils/useDeepMemo.js.map +1 -1
  1121. package/dist/private/utils/useDeepMemo.mjs +4 -1
  1122. package/dist/private/utils/useDeepMemo.mjs.map +1 -1
  1123. package/dist/private/utils/useDrag1D.cjs +2 -0
  1124. package/dist/private/utils/useDrag1D.cjs.map +1 -1
  1125. package/dist/private/utils/useDrag1D.js +2 -0
  1126. package/dist/private/utils/useDrag1D.js.map +1 -1
  1127. package/dist/private/utils/useDrag1D.mjs +2 -0
  1128. package/dist/private/utils/useDrag1D.mjs.map +1 -1
  1129. package/dist/private/utils/useFormReset.cjs +4 -0
  1130. package/dist/private/utils/useFormReset.cjs.map +1 -1
  1131. package/dist/private/utils/useFormReset.js +4 -0
  1132. package/dist/private/utils/useFormReset.js.map +1 -1
  1133. package/dist/private/utils/useFormReset.mjs +4 -0
  1134. package/dist/private/utils/useFormReset.mjs.map +1 -1
  1135. package/dist/private/utils/useId.cjs +23 -4
  1136. package/dist/private/utils/useId.cjs.map +1 -1
  1137. package/dist/private/utils/useId.js +23 -4
  1138. package/dist/private/utils/useId.js.map +1 -1
  1139. package/dist/private/utils/useId.mjs +23 -4
  1140. package/dist/private/utils/useId.mjs.map +1 -1
  1141. package/dist/private/utils/useLoadMoreSentinel.cjs +7 -3
  1142. package/dist/private/utils/useLoadMoreSentinel.cjs.map +1 -1
  1143. package/dist/private/utils/useLoadMoreSentinel.js +7 -3
  1144. package/dist/private/utils/useLoadMoreSentinel.js.map +1 -1
  1145. package/dist/private/utils/useLoadMoreSentinel.mjs +7 -3
  1146. package/dist/private/utils/useLoadMoreSentinel.mjs.map +1 -1
  1147. package/dist/private/utils/useObjectRef.cjs +3 -1
  1148. package/dist/private/utils/useObjectRef.cjs.map +1 -1
  1149. package/dist/private/utils/useObjectRef.js +3 -1
  1150. package/dist/private/utils/useObjectRef.js.map +1 -1
  1151. package/dist/private/utils/useObjectRef.mjs +3 -1
  1152. package/dist/private/utils/useObjectRef.mjs.map +1 -1
  1153. package/dist/private/utils/useSyncRef.cjs +2 -0
  1154. package/dist/private/utils/useSyncRef.cjs.map +1 -1
  1155. package/dist/private/utils/useSyncRef.js +2 -0
  1156. package/dist/private/utils/useSyncRef.js.map +1 -1
  1157. package/dist/private/utils/useSyncRef.mjs +2 -0
  1158. package/dist/private/utils/useSyncRef.mjs.map +1 -1
  1159. package/dist/private/utils/useViewportSize.cjs +3 -3
  1160. package/dist/private/utils/useViewportSize.cjs.map +1 -1
  1161. package/dist/private/utils/useViewportSize.js +4 -4
  1162. package/dist/private/utils/useViewportSize.js.map +1 -1
  1163. package/dist/private/utils/useViewportSize.mjs +4 -4
  1164. package/dist/private/utils/useViewportSize.mjs.map +1 -1
  1165. package/dist/private/virtualizer/ScrollView.cjs +7 -4
  1166. package/dist/private/virtualizer/ScrollView.cjs.map +1 -1
  1167. package/dist/private/virtualizer/ScrollView.js +8 -5
  1168. package/dist/private/virtualizer/ScrollView.js.map +1 -1
  1169. package/dist/private/virtualizer/ScrollView.mjs +8 -5
  1170. package/dist/private/virtualizer/ScrollView.mjs.map +1 -1
  1171. package/dist/private/virtualizer/VirtualizerItem.cjs +3 -2
  1172. package/dist/private/virtualizer/VirtualizerItem.cjs.map +1 -1
  1173. package/dist/private/virtualizer/VirtualizerItem.js +3 -2
  1174. package/dist/private/virtualizer/VirtualizerItem.js.map +1 -1
  1175. package/dist/private/virtualizer/VirtualizerItem.mjs +3 -2
  1176. package/dist/private/virtualizer/VirtualizerItem.mjs.map +1 -1
  1177. package/dist/private/virtualizer/useVirtualizerItem.cjs +35 -2
  1178. package/dist/private/virtualizer/useVirtualizerItem.cjs.map +1 -1
  1179. package/dist/private/virtualizer/useVirtualizerItem.js +36 -3
  1180. package/dist/private/virtualizer/useVirtualizerItem.js.map +1 -1
  1181. package/dist/private/virtualizer/useVirtualizerItem.mjs +36 -3
  1182. package/dist/private/virtualizer/useVirtualizerItem.mjs.map +1 -1
  1183. package/dist/private/visually-hidden/VisuallyHidden.cjs +2 -1
  1184. package/dist/private/visually-hidden/VisuallyHidden.cjs.map +1 -1
  1185. package/dist/private/visually-hidden/VisuallyHidden.js +2 -1
  1186. package/dist/private/visually-hidden/VisuallyHidden.js.map +1 -1
  1187. package/dist/private/visually-hidden/VisuallyHidden.mjs +2 -1
  1188. package/dist/private/visually-hidden/VisuallyHidden.mjs.map +1 -1
  1189. package/dist/types/exports/index.d.ts +9 -0
  1190. package/dist/types/exports/private/utils/domHelpers.d.ts +1 -1
  1191. package/dist/types/exports/private/utils/platform.d.ts +1 -1
  1192. package/dist/types/exports/private/utils/shadowdom/DOMFunctions.d.ts +1 -1
  1193. package/dist/types/exports/useContextMenu.d.ts +2 -0
  1194. package/dist/types/exports/usePreviewTrigger.d.ts +2 -0
  1195. package/dist/types/exports/useTokenField.d.ts +4 -0
  1196. package/dist/types/src/button/useToggleButtonGroup.d.ts +8 -0
  1197. package/dist/types/src/combobox/useComboBox.d.ts +7 -1
  1198. package/dist/types/src/dialog/useDialog.d.ts +2 -0
  1199. package/dist/types/src/dnd/utils.d.ts +2 -2
  1200. package/dist/types/src/grid/useGrid.d.ts +7 -0
  1201. package/dist/types/src/grid/useGridCell.d.ts +8 -1
  1202. package/dist/types/src/grid/utils.d.ts +1 -0
  1203. package/dist/types/src/gridlist/useGridList.d.ts +7 -0
  1204. package/dist/types/src/gridlist/useGridListItem.d.ts +13 -0
  1205. package/dist/types/src/interactions/createKeyboardShortcutHandler.d.ts +56 -0
  1206. package/dist/types/src/interactions/useContextMenu.d.ts +21 -0
  1207. package/dist/types/src/interactions/useKeyboard.d.ts +7 -0
  1208. package/dist/types/src/interactions/useLongPress.d.ts +2 -0
  1209. package/dist/types/src/menu/useMenu.d.ts +1 -1
  1210. package/dist/types/src/menu/utils.d.ts +1 -1
  1211. package/dist/types/src/overlays/calculatePosition.d.ts +1 -0
  1212. package/dist/types/src/overlays/useOverlayPosition.d.ts +8 -0
  1213. package/dist/types/src/overlays/usePopover.d.ts +2 -1
  1214. package/dist/types/src/selection/ListKeyboardDelegate.d.ts +1 -0
  1215. package/dist/types/src/selection/useSelectableCollection.d.ts +7 -0
  1216. package/dist/types/src/table/useTableCell.d.ts +12 -0
  1217. package/dist/types/src/table/useTableColumnHeader.d.ts +12 -0
  1218. package/dist/types/src/table/useTableColumnResize.d.ts +5 -0
  1219. package/dist/types/src/tokenfield/useToken.d.ts +14 -0
  1220. package/dist/types/src/tokenfield/useTokenField.d.ts +57 -0
  1221. package/dist/types/src/tooltip/usePreviewTrigger.d.ts +27 -0
  1222. package/dist/types/src/tooltip/useSafeArea.d.ts +26 -0
  1223. package/dist/types/src/tree/useTree.d.ts +1 -1
  1224. package/dist/types/src/utils/domHelpers.d.ts +20 -5
  1225. package/dist/types/src/utils/platform.d.ts +1 -0
  1226. package/dist/types/src/utils/shadowdom/DOMFunctions.d.ts +11 -0
  1227. package/dist/types/src/utils/useLoadMoreSentinel.d.ts +7 -0
  1228. package/dist/types/src/virtualizer/VirtualizerItem.d.ts +1 -0
  1229. package/dist/types/src/virtualizer/useVirtualizerItem.d.ts +1 -0
  1230. package/i18n/ar-AE.js +1 -1
  1231. package/i18n/ar-AE.mjs +1 -1
  1232. package/i18n/bg-BG.js +1 -1
  1233. package/i18n/bg-BG.mjs +1 -1
  1234. package/i18n/cs-CZ.js +1 -1
  1235. package/i18n/cs-CZ.mjs +1 -1
  1236. package/i18n/da-DK.js +1 -1
  1237. package/i18n/da-DK.mjs +1 -1
  1238. package/i18n/de-DE.js +1 -1
  1239. package/i18n/de-DE.mjs +1 -1
  1240. package/i18n/el-GR.js +1 -1
  1241. package/i18n/el-GR.mjs +1 -1
  1242. package/i18n/en-US.js +1 -1
  1243. package/i18n/en-US.mjs +1 -1
  1244. package/i18n/es-ES.js +1 -1
  1245. package/i18n/es-ES.mjs +1 -1
  1246. package/i18n/et-EE.js +1 -1
  1247. package/i18n/et-EE.mjs +1 -1
  1248. package/i18n/fi-FI.js +1 -1
  1249. package/i18n/fi-FI.mjs +1 -1
  1250. package/i18n/fr-FR.js +1 -1
  1251. package/i18n/fr-FR.mjs +1 -1
  1252. package/i18n/he-IL.js +1 -1
  1253. package/i18n/he-IL.mjs +1 -1
  1254. package/i18n/hr-HR.js +1 -1
  1255. package/i18n/hr-HR.mjs +1 -1
  1256. package/i18n/hu-HU.js +1 -1
  1257. package/i18n/hu-HU.mjs +1 -1
  1258. package/i18n/it-IT.js +1 -1
  1259. package/i18n/it-IT.mjs +1 -1
  1260. package/i18n/ja-JP.js +1 -1
  1261. package/i18n/ja-JP.mjs +1 -1
  1262. package/i18n/ko-KR.js +1 -1
  1263. package/i18n/ko-KR.mjs +1 -1
  1264. package/i18n/lt-LT.js +1 -1
  1265. package/i18n/lt-LT.mjs +1 -1
  1266. package/i18n/lv-LV.js +1 -1
  1267. package/i18n/lv-LV.mjs +1 -1
  1268. package/i18n/nb-NO.js +1 -1
  1269. package/i18n/nb-NO.mjs +1 -1
  1270. package/i18n/nl-NL.js +1 -1
  1271. package/i18n/nl-NL.mjs +1 -1
  1272. package/i18n/pl-PL.js +1 -1
  1273. package/i18n/pl-PL.mjs +1 -1
  1274. package/i18n/pt-BR.js +1 -1
  1275. package/i18n/pt-BR.mjs +1 -1
  1276. package/i18n/pt-PT.js +1 -1
  1277. package/i18n/pt-PT.mjs +1 -1
  1278. package/i18n/ro-RO.js +1 -1
  1279. package/i18n/ro-RO.mjs +1 -1
  1280. package/i18n/ru-RU.js +1 -1
  1281. package/i18n/ru-RU.mjs +1 -1
  1282. package/i18n/sk-SK.js +1 -1
  1283. package/i18n/sk-SK.mjs +1 -1
  1284. package/i18n/sl-SI.js +1 -1
  1285. package/i18n/sl-SI.mjs +1 -1
  1286. package/i18n/sr-SP.js +1 -1
  1287. package/i18n/sr-SP.mjs +1 -1
  1288. package/i18n/sv-SE.js +1 -1
  1289. package/i18n/sv-SE.mjs +1 -1
  1290. package/i18n/tr-TR.js +1 -1
  1291. package/i18n/tr-TR.mjs +1 -1
  1292. package/i18n/uk-UA.js +1 -1
  1293. package/i18n/uk-UA.mjs +1 -1
  1294. package/i18n/zh-CN.js +1 -1
  1295. package/i18n/zh-CN.mjs +1 -1
  1296. package/i18n/zh-TW.js +1 -1
  1297. package/i18n/zh-TW.mjs +1 -1
  1298. package/package.json +6 -6
  1299. package/useContextMenu/package.json +5 -0
  1300. package/usePreviewTrigger/package.json +5 -0
  1301. package/useTokenField/package.json +5 -0
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAmBM,SAAS,0CAAe,KAA2B;IACxD,IAAI,EAAC,cAAc,SAAS,EAAE,GAAG,YAAW,GAAG;IAE/C,IAAI,UAAU,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IACxD,OAAO;QACL,UAAU;YACR,GAAG,CAAA,GAAA,yCAAa,EAAE,YAAY;gBAAC,WAAW;YAAI,EAAE;YAChD,cAAc,aAAa,QAAQ,MAAM,CAAC;QAC5C;IACF;AACF","sources":["packages/react-aria/src/breadcrumbs/useBreadcrumbs.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\n// @ts-ignore\nimport intlMessages from '../../intl/breadcrumbs/*.json';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\n\nexport interface AriaBreadcrumbsProps extends DOMProps, AriaLabelingProps {}\n\nexport interface BreadcrumbsAria {\n /** Props for the breadcrumbs navigation element. */\n navProps: DOMAttributes;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a breadcrumbs component.\n * Breadcrumbs display a hierarchy of links to the current page or resource in an application.\n */\nexport function useBreadcrumbs(props: AriaBreadcrumbsProps): BreadcrumbsAria {\n let {'aria-label': ariaLabel, ...otherProps} = props;\n\n let strings = useLocalizedStringFormatter(intlMessages, '@react-aria/breadcrumbs');\n return {\n navProps: {\n ...filterDOMProps(otherProps, {labelable: true}),\n 'aria-label': ariaLabel || strings.format('breadcrumbs')\n }\n };\n}\n"],"names":[],"version":3,"file":"useBreadcrumbs.js.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAkBM,SAAS,0CAAe,KAA2B;IACxD,IAAI,EAAC,cAAc,SAAS,EAAE,GAAG,YAAW,GAAG;IAE/C,IAAI,UAAU,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IACxD,OAAO;QACL,UAAU;YACR,GAAG,CAAA,GAAA,yCAAa,EAAE,YAAY;gBAAC,WAAW;YAAI,EAAE;YAChD,cAAc,aAAa,QAAQ,MAAM,CAAC;QAC5C;IACF;AACF","sources":["packages/react-aria/src/breadcrumbs/useBreadcrumbs.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport intlMessages from '../../intl/breadcrumbs/*.json';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\n\nexport interface AriaBreadcrumbsProps extends DOMProps, AriaLabelingProps {}\n\nexport interface BreadcrumbsAria {\n /** Props for the breadcrumbs navigation element. */\n navProps: DOMAttributes;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a breadcrumbs component.\n * Breadcrumbs display a hierarchy of links to the current page or resource in an application.\n */\nexport function useBreadcrumbs(props: AriaBreadcrumbsProps): BreadcrumbsAria {\n let {'aria-label': ariaLabel, ...otherProps} = props;\n\n let strings = useLocalizedStringFormatter(intlMessages, '@react-aria/breadcrumbs');\n return {\n navProps: {\n ...filterDOMProps(otherProps, {labelable: true}),\n 'aria-label': ariaLabel || strings.format('breadcrumbs')\n }\n };\n}\n"],"names":[],"version":3,"file":"useBreadcrumbs.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAmBM,SAAS,0CAAe,KAA2B;IACxD,IAAI,EAAC,cAAc,SAAS,EAAE,GAAG,YAAW,GAAG;IAE/C,IAAI,UAAU,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IACxD,OAAO;QACL,UAAU;YACR,GAAG,CAAA,GAAA,yCAAa,EAAE,YAAY;gBAAC,WAAW;YAAI,EAAE;YAChD,cAAc,aAAa,QAAQ,MAAM,CAAC;QAC5C;IACF;AACF","sources":["packages/react-aria/src/breadcrumbs/useBreadcrumbs.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\n// @ts-ignore\nimport intlMessages from '../../intl/breadcrumbs/*.json';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\n\nexport interface AriaBreadcrumbsProps extends DOMProps, AriaLabelingProps {}\n\nexport interface BreadcrumbsAria {\n /** Props for the breadcrumbs navigation element. */\n navProps: DOMAttributes;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a breadcrumbs component.\n * Breadcrumbs display a hierarchy of links to the current page or resource in an application.\n */\nexport function useBreadcrumbs(props: AriaBreadcrumbsProps): BreadcrumbsAria {\n let {'aria-label': ariaLabel, ...otherProps} = props;\n\n let strings = useLocalizedStringFormatter(intlMessages, '@react-aria/breadcrumbs');\n return {\n navProps: {\n ...filterDOMProps(otherProps, {labelable: true}),\n 'aria-label': ariaLabel || strings.format('breadcrumbs')\n }\n };\n}\n"],"names":[],"version":3,"file":"useBreadcrumbs.mjs.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAkBM,SAAS,0CAAe,KAA2B;IACxD,IAAI,EAAC,cAAc,SAAS,EAAE,GAAG,YAAW,GAAG;IAE/C,IAAI,UAAU,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IACxD,OAAO;QACL,UAAU;YACR,GAAG,CAAA,GAAA,yCAAa,EAAE,YAAY;gBAAC,WAAW;YAAI,EAAE;YAChD,cAAc,aAAa,QAAQ,MAAM,CAAC;QAC5C;IACF;AACF","sources":["packages/react-aria/src/breadcrumbs/useBreadcrumbs.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport intlMessages from '../../intl/breadcrumbs/*.json';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\n\nexport interface AriaBreadcrumbsProps extends DOMProps, AriaLabelingProps {}\n\nexport interface BreadcrumbsAria {\n /** Props for the breadcrumbs navigation element. */\n navProps: DOMAttributes;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a breadcrumbs component.\n * Breadcrumbs display a hierarchy of links to the current page or resource in an application.\n */\nexport function useBreadcrumbs(props: AriaBreadcrumbsProps): BreadcrumbsAria {\n let {'aria-label': ariaLabel, ...otherProps} = props;\n\n let strings = useLocalizedStringFormatter(intlMessages, '@react-aria/breadcrumbs');\n return {\n navProps: {\n ...filterDOMProps(otherProps, {labelable: true}),\n 'aria-label': ariaLabel || strings.format('breadcrumbs')\n }\n };\n}\n"],"names":[],"version":3,"file":"useBreadcrumbs.mjs.map"}
@@ -60,7 +60,8 @@ function $7e841a1975525fba$export$ea18c227d4417cc3(props, ref) {
60
60
  ref: ref
61
61
  });
62
62
  let { focusableProps: focusableProps } = (0, $cfe896014413cb8c$exports.useFocusable)(props, ref);
63
- if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
63
+ if (allowFocusWhenDisabled) // oxlint-disable-next-line react/react-compiler
64
+ focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
64
65
  let buttonProps = (0, $89b39774f3b79dbb$exports.mergeProps)(focusableProps, pressProps, (0, $b97366b6eabbb2cc$exports.filterDOMProps)(props, {
65
66
  labelable: true
66
67
  }));
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAsKM,SAAS,0CACd,KAAqC,EACrC,GAAmB;IAEnB,IAAI,eACF,cAAc,sBACd,UAAU,WACV,OAAO,gBACP,YAAY,cACZ,UAAU,aACV,SAAS,iBACT,aAAa,uBACb,mBAAmB,0BACnB,4BAA4B;IAC5B,sBAAsB,WACtB,OAAO,QACP,IAAI,UACJ,MAAM,OACN,GAAG,QACH,OAAO,UACR,GAAG;IACJ,IAAI;IACJ,IAAI,gBAAgB,UAClB,kBAAkB;cAChB;QACA,UAAU;QACV,MAAM,MAAM,IAAI;QAChB,YAAY,MAAM,UAAU;QAC5B,aAAa,MAAM,WAAW;QAC9B,YAAY,MAAM,UAAU;QAC5B,gBAAgB,MAAM,cAAc;QACpC,YAAY,MAAM,UAAU;QAC5B,MAAM,MAAM,IAAI;QAChB,OAAO,MAAM,KAAK;IACpB;SAEA,kBAAkB;QAChB,MAAM;QACN,MAAM,gBAAgB,OAAO,CAAC,aAAa,OAAO;QAClD,QAAQ,gBAAgB,MAAM,SAAS;QACvC,MAAM,gBAAgB,UAAU,OAAO;QACvC,UAAU,gBAAgB,UAAU,aAAa;QACjD,iBAAiB,CAAC,cAAc,gBAAgB,UAAU,YAAY;QACtE,KAAK,gBAAgB,MAAM,MAAM;IACnC;IAGF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,kCAAO,EAAE;sBACrC;oBACA;uBACA;iBACA;mBACA;iBACA;oBACA;6BACA;aACA;IACF;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC3C,IAAI,wBACF,eAAe,QAAQ,GAAG,aAAa,KAAK,eAAe,QAAQ;IAErE,IAAI,cAAc,CAAA,GAAA,oCAAS,EACzB,gBACA,YACA,CAAA,GAAA,wCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAGxC,OAAO;mBACL;QACA,aAAa,CAAA,GAAA,oCAAS,EAAE,iBAAiB,aAAa;YACpD,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,gBAAgB,KAAK,CAAC,eAAe;YACrC,gBAAgB,KAAK,CAAC,eAAe;YACrC,iBAAiB,KAAK,CAAC,gBAAgB;QACzC;IACF;AACF","sources":["packages/react-aria/src/button/useButton.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes,\n JSXElementConstructor,\n ReactNode,\n RefObject\n} from 'react';\nimport {\n AriaLabelingProps,\n DOMAttributes,\n FocusableDOMProps,\n FocusableProps,\n PressEvents\n} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {mergeProps} from '../utils/mergeProps';\nimport {useFocusable} from '../interactions/useFocusable';\nimport {usePress} from '../interactions/usePress';\n\nexport interface ButtonProps extends PressEvents, FocusableProps {\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n /** The content to display in the button. */\n children?: ReactNode;\n}\n\nexport interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {\n /** Indicates whether the element is disabled to users of assistive technology. */\n 'aria-disabled'?: boolean | 'true' | 'false';\n /**\n * Indicates whether the element, or another grouping element it controls, is currently expanded\n * or collapsed.\n */\n 'aria-expanded'?: boolean | 'true' | 'false';\n /**\n * Indicates the availability and type of interactive popup element, such as menu or dialog, that\n * can be triggered by an element.\n */\n 'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false';\n /**\n * Identifies the element (or elements) whose contents or presence are controlled by the current\n * element.\n */\n 'aria-controls'?: string;\n /** Indicates the current \"pressed\" state of toggle buttons. */\n 'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';\n /**\n * Indicates whether this element represents the current item within a container or set of related\n * elements.\n */\n 'aria-current'?: boolean | 'true' | 'false' | 'page' | 'step' | 'location' | 'date' | 'time';\n /**\n * The behavior of the button when used in an HTML form.\n *\n * @default 'button'\n */\n type?: 'button' | 'submit' | 'reset';\n /**\n * Whether to prevent focus from moving to the button when pressing it.\n *\n * Caution, this can make the button inaccessible and should only be used when alternative\n * keyboard interaction is provided, such as ComboBox's MenuTrigger or a NumberField's\n * increment/decrement control.\n */\n preventFocusOnPress?: boolean;\n /**\n * The `<form>` element to associate the button with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form).\n */\n form?: string;\n /**\n * The URL that processes the information submitted by the button.\n * Overrides the action attribute of the button's form owner.\n */\n formAction?: ButtonHTMLAttributes<HTMLButtonElement>['formAction'];\n /** Indicates how to encode the form data that is submitted. */\n formEncType?: string;\n /** Indicates the HTTP method used to submit the form. */\n formMethod?: string;\n /** Indicates that the form is not to be validated when it is submitted. */\n formNoValidate?: boolean;\n /** Overrides the target attribute of the button's form owner. */\n formTarget?: string;\n /** Submitted as a pair with the button's value as part of the form data. */\n name?: string;\n /** The value associated with the button's name when it's submitted with the form data. */\n value?: string;\n}\n\nexport interface AriaButtonElementTypeProps<T extends ElementType = 'button'> {\n /**\n * The HTML element or React element used to render the button, e.g. 'div', 'a', or `RouterLink`.\n *\n * @default 'button'\n */\n elementType?: T | JSXElementConstructor<any>;\n}\n\nexport interface LinkButtonProps<\n T extends ElementType = 'button'\n> extends AriaButtonElementTypeProps<T> {\n /** A URL to link to if elementType=\"a\". */\n href?: string;\n /** The target window for the link. */\n target?: string;\n /**\n * The relationship between the linked resource and the current page. See\n * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).\n */\n rel?: string;\n}\n\nexport interface AriaButtonProps<T extends ElementType = 'button'>\n extends ButtonProps, LinkButtonProps<T>, AriaBaseButtonProps {}\n\nexport interface AriaButtonOptions<E extends ElementType> extends Omit<\n AriaButtonProps<E>,\n 'children'\n> {}\n\nexport interface ButtonAria<T> {\n /** Props for the button element. */\n buttonProps: T;\n /** Whether the button is currently pressed. */\n isPressed: boolean;\n}\n\n// Order with overrides is important: 'button' should be default\nexport function useButton(\n props: AriaButtonOptions<'button'>,\n ref: RefObject<HTMLButtonElement | null>\n): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useButton(\n props: AriaButtonOptions<'a'>,\n ref: RefObject<HTMLAnchorElement | null>\n): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useButton(\n props: AriaButtonOptions<'div'>,\n ref: RefObject<HTMLDivElement | null>\n): ButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useButton(\n props: AriaButtonOptions<'input'>,\n ref: RefObject<HTMLInputElement | null>\n): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useButton(\n props: AriaButtonOptions<'span'>,\n ref: RefObject<HTMLSpanElement | null>\n): ButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<Element | null>\n): ButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a button component. Handles mouse,\n * keyboard, and touch interactions, focus behavior, and ARIA props for both native button elements\n * and custom element types.\n *\n * @param props - Props to be applied to the button.\n * @param ref - A ref to a DOM element for the button.\n */\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<any>\n): ButtonAria<HTMLAttributes<any>> {\n let {\n elementType = 'button',\n isDisabled,\n onPress,\n onPressStart,\n onPressEnd,\n onPressUp,\n onPressChange,\n preventFocusOnPress,\n // @ts-ignore - undocumented\n allowFocusWhenDisabled,\n onClick,\n href,\n target,\n rel,\n type = 'button'\n } = props;\n let additionalProps;\n if (elementType === 'button') {\n additionalProps = {\n type,\n disabled: isDisabled,\n form: props.form,\n formAction: props.formAction,\n formEncType: props.formEncType,\n formMethod: props.formMethod,\n formNoValidate: props.formNoValidate,\n formTarget: props.formTarget,\n name: props.name,\n value: props.value\n };\n } else {\n additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n }\n\n let {pressProps, isPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick,\n isDisabled,\n preventFocusOnPress,\n ref\n });\n\n let {focusableProps} = useFocusable(props, ref);\n if (allowFocusWhenDisabled) {\n focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n }\n let buttonProps = mergeProps(\n focusableProps,\n pressProps,\n filterDOMProps(props, {labelable: true})\n );\n\n return {\n isPressed, // Used to indicate press state for visual\n buttonProps: mergeProps(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current'],\n 'aria-disabled': props['aria-disabled']\n })\n };\n}\n"],"names":[],"version":3,"file":"useButton.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAsKM,SAAS,0CACd,KAAqC,EACrC,GAAmB;IAEnB,IAAI,eACF,cAAc,sBACd,UAAU,WACV,OAAO,gBACP,YAAY,cACZ,UAAU,aACV,SAAS,iBACT,aAAa,uBACb,mBAAmB,0BACnB,4BAA4B;IAC5B,sBAAsB,WACtB,OAAO,QACP,IAAI,UACJ,MAAM,OACN,GAAG,QACH,OAAO,UACR,GAAG;IACJ,IAAI;IACJ,IAAI,gBAAgB,UAClB,kBAAkB;cAChB;QACA,UAAU;QACV,MAAM,MAAM,IAAI;QAChB,YAAY,MAAM,UAAU;QAC5B,aAAa,MAAM,WAAW;QAC9B,YAAY,MAAM,UAAU;QAC5B,gBAAgB,MAAM,cAAc;QACpC,YAAY,MAAM,UAAU;QAC5B,MAAM,MAAM,IAAI;QAChB,OAAO,MAAM,KAAK;IACpB;SAEA,kBAAkB;QAChB,MAAM;QACN,MAAM,gBAAgB,OAAO,CAAC,aAAa,OAAO;QAClD,QAAQ,gBAAgB,MAAM,SAAS;QACvC,MAAM,gBAAgB,UAAU,OAAO;QACvC,UAAU,gBAAgB,UAAU,aAAa;QACjD,iBAAiB,CAAC,cAAc,gBAAgB,UAAU,YAAY;QACtE,KAAK,gBAAgB,MAAM,MAAM;IACnC;IAGF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,kCAAO,EAAE;sBACrC;oBACA;uBACA;iBACA;mBACA;iBACA;oBACA;6BACA;aACA;IACF;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC3C,IAAI,wBACF,gDAAgD;IAChD,eAAe,QAAQ,GAAG,aAAa,KAAK,eAAe,QAAQ;IAErE,IAAI,cAAc,CAAA,GAAA,oCAAS,EACzB,gBACA,YACA,CAAA,GAAA,wCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAGxC,OAAO;mBACL;QACA,aAAa,CAAA,GAAA,oCAAS,EAAE,iBAAiB,aAAa;YACpD,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,gBAAgB,KAAK,CAAC,eAAe;YACrC,gBAAgB,KAAK,CAAC,eAAe;YACrC,iBAAiB,KAAK,CAAC,gBAAgB;QACzC;IACF;AACF","sources":["packages/react-aria/src/button/useButton.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes,\n JSXElementConstructor,\n ReactNode,\n RefObject\n} from 'react';\nimport {\n AriaLabelingProps,\n DOMAttributes,\n FocusableDOMProps,\n FocusableProps,\n PressEvents\n} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {mergeProps} from '../utils/mergeProps';\nimport {useFocusable} from '../interactions/useFocusable';\nimport {usePress} from '../interactions/usePress';\n\nexport interface ButtonProps extends PressEvents, FocusableProps {\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n /** The content to display in the button. */\n children?: ReactNode;\n}\n\nexport interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {\n /** Indicates whether the element is disabled to users of assistive technology. */\n 'aria-disabled'?: boolean | 'true' | 'false';\n /**\n * Indicates whether the element, or another grouping element it controls, is currently expanded\n * or collapsed.\n */\n 'aria-expanded'?: boolean | 'true' | 'false';\n /**\n * Indicates the availability and type of interactive popup element, such as menu or dialog, that\n * can be triggered by an element.\n */\n 'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false';\n /**\n * Identifies the element (or elements) whose contents or presence are controlled by the current\n * element.\n */\n 'aria-controls'?: string;\n /** Indicates the current \"pressed\" state of toggle buttons. */\n 'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';\n /**\n * Indicates whether this element represents the current item within a container or set of related\n * elements.\n */\n 'aria-current'?: boolean | 'true' | 'false' | 'page' | 'step' | 'location' | 'date' | 'time';\n /**\n * The behavior of the button when used in an HTML form.\n *\n * @default 'button'\n */\n type?: 'button' | 'submit' | 'reset';\n /**\n * Whether to prevent focus from moving to the button when pressing it.\n *\n * Caution, this can make the button inaccessible and should only be used when alternative\n * keyboard interaction is provided, such as ComboBox's MenuTrigger or a NumberField's\n * increment/decrement control.\n */\n preventFocusOnPress?: boolean;\n /**\n * The `<form>` element to associate the button with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form).\n */\n form?: string;\n /**\n * The URL that processes the information submitted by the button.\n * Overrides the action attribute of the button's form owner.\n */\n formAction?: ButtonHTMLAttributes<HTMLButtonElement>['formAction'];\n /** Indicates how to encode the form data that is submitted. */\n formEncType?: string;\n /** Indicates the HTTP method used to submit the form. */\n formMethod?: string;\n /** Indicates that the form is not to be validated when it is submitted. */\n formNoValidate?: boolean;\n /** Overrides the target attribute of the button's form owner. */\n formTarget?: string;\n /** Submitted as a pair with the button's value as part of the form data. */\n name?: string;\n /** The value associated with the button's name when it's submitted with the form data. */\n value?: string;\n}\n\nexport interface AriaButtonElementTypeProps<T extends ElementType = 'button'> {\n /**\n * The HTML element or React element used to render the button, e.g. 'div', 'a', or `RouterLink`.\n *\n * @default 'button'\n */\n elementType?: T | JSXElementConstructor<any>;\n}\n\nexport interface LinkButtonProps<\n T extends ElementType = 'button'\n> extends AriaButtonElementTypeProps<T> {\n /** A URL to link to if elementType=\"a\". */\n href?: string;\n /** The target window for the link. */\n target?: string;\n /**\n * The relationship between the linked resource and the current page. See\n * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).\n */\n rel?: string;\n}\n\nexport interface AriaButtonProps<T extends ElementType = 'button'>\n extends ButtonProps, LinkButtonProps<T>, AriaBaseButtonProps {}\n\nexport interface AriaButtonOptions<E extends ElementType> extends Omit<\n AriaButtonProps<E>,\n 'children'\n> {}\n\nexport interface ButtonAria<T> {\n /** Props for the button element. */\n buttonProps: T;\n /** Whether the button is currently pressed. */\n isPressed: boolean;\n}\n\n// Order with overrides is important: 'button' should be default\nexport function useButton(\n props: AriaButtonOptions<'button'>,\n ref: RefObject<HTMLButtonElement | null>\n): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useButton(\n props: AriaButtonOptions<'a'>,\n ref: RefObject<HTMLAnchorElement | null>\n): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useButton(\n props: AriaButtonOptions<'div'>,\n ref: RefObject<HTMLDivElement | null>\n): ButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useButton(\n props: AriaButtonOptions<'input'>,\n ref: RefObject<HTMLInputElement | null>\n): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useButton(\n props: AriaButtonOptions<'span'>,\n ref: RefObject<HTMLSpanElement | null>\n): ButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<Element | null>\n): ButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a button component. Handles mouse,\n * keyboard, and touch interactions, focus behavior, and ARIA props for both native button elements\n * and custom element types.\n *\n * @param props - Props to be applied to the button.\n * @param ref - A ref to a DOM element for the button.\n */\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<any>\n): ButtonAria<HTMLAttributes<any>> {\n let {\n elementType = 'button',\n isDisabled,\n onPress,\n onPressStart,\n onPressEnd,\n onPressUp,\n onPressChange,\n preventFocusOnPress,\n // @ts-ignore - undocumented\n allowFocusWhenDisabled,\n onClick,\n href,\n target,\n rel,\n type = 'button'\n } = props;\n let additionalProps;\n if (elementType === 'button') {\n additionalProps = {\n type,\n disabled: isDisabled,\n form: props.form,\n formAction: props.formAction,\n formEncType: props.formEncType,\n formMethod: props.formMethod,\n formNoValidate: props.formNoValidate,\n formTarget: props.formTarget,\n name: props.name,\n value: props.value\n };\n } else {\n additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n }\n\n let {pressProps, isPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick,\n isDisabled,\n preventFocusOnPress,\n ref\n });\n\n let {focusableProps} = useFocusable(props, ref);\n if (allowFocusWhenDisabled) {\n // oxlint-disable-next-line react/react-compiler\n focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n }\n let buttonProps = mergeProps(\n focusableProps,\n pressProps,\n filterDOMProps(props, {labelable: true})\n );\n\n return {\n isPressed, // Used to indicate press state for visual\n buttonProps: mergeProps(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current'],\n 'aria-disabled': props['aria-disabled']\n })\n };\n}\n"],"names":[],"version":3,"file":"useButton.cjs.map"}
@@ -54,7 +54,8 @@ function $3f0ac64f7a0a47af$export$ea18c227d4417cc3(props, ref) {
54
54
  ref: ref
55
55
  });
56
56
  let { focusableProps: focusableProps } = (0, $088f27a386bc4a8f$export$4c014de7c8940b4c)(props, ref);
57
- if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
57
+ if (allowFocusWhenDisabled) // oxlint-disable-next-line react/react-compiler
58
+ focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
58
59
  let buttonProps = (0, $64c36edd757dfa16$export$9d1611c77c2fe928)(focusableProps, pressProps, (0, $6a28a4717b9a4e1c$export$457c3d6518dd4c6f)(props, {
59
60
  labelable: true
60
61
  }));
@@ -1 +1 @@
1
- {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAsKM,SAAS,0CACd,KAAqC,EACrC,GAAmB;IAEnB,IAAI,eACF,cAAc,sBACd,UAAU,WACV,OAAO,gBACP,YAAY,cACZ,UAAU,aACV,SAAS,iBACT,aAAa,uBACb,mBAAmB,0BACnB,4BAA4B;IAC5B,sBAAsB,WACtB,OAAO,QACP,IAAI,UACJ,MAAM,OACN,GAAG,QACH,OAAO,UACR,GAAG;IACJ,IAAI;IACJ,IAAI,gBAAgB,UAClB,kBAAkB;cAChB;QACA,UAAU;QACV,MAAM,MAAM,IAAI;QAChB,YAAY,MAAM,UAAU;QAC5B,aAAa,MAAM,WAAW;QAC9B,YAAY,MAAM,UAAU;QAC5B,gBAAgB,MAAM,cAAc;QACpC,YAAY,MAAM,UAAU;QAC5B,MAAM,MAAM,IAAI;QAChB,OAAO,MAAM,KAAK;IACpB;SAEA,kBAAkB;QAChB,MAAM;QACN,MAAM,gBAAgB,OAAO,CAAC,aAAa,OAAO;QAClD,QAAQ,gBAAgB,MAAM,SAAS;QACvC,MAAM,gBAAgB,UAAU,OAAO;QACvC,UAAU,gBAAgB,UAAU,aAAa;QACjD,iBAAiB,CAAC,cAAc,gBAAgB,UAAU,YAAY;QACtE,KAAK,gBAAgB,MAAM,MAAM;IACnC;IAGF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yCAAO,EAAE;sBACrC;oBACA;uBACA;iBACA;mBACA;iBACA;oBACA;6BACA;aACA;IACF;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE,OAAO;IAC3C,IAAI,wBACF,eAAe,QAAQ,GAAG,aAAa,KAAK,eAAe,QAAQ;IAErE,IAAI,cAAc,CAAA,GAAA,yCAAS,EACzB,gBACA,YACA,CAAA,GAAA,yCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAGxC,OAAO;mBACL;QACA,aAAa,CAAA,GAAA,yCAAS,EAAE,iBAAiB,aAAa;YACpD,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,gBAAgB,KAAK,CAAC,eAAe;YACrC,gBAAgB,KAAK,CAAC,eAAe;YACrC,iBAAiB,KAAK,CAAC,gBAAgB;QACzC;IACF;AACF","sources":["packages/react-aria/src/button/useButton.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes,\n JSXElementConstructor,\n ReactNode,\n RefObject\n} from 'react';\nimport {\n AriaLabelingProps,\n DOMAttributes,\n FocusableDOMProps,\n FocusableProps,\n PressEvents\n} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {mergeProps} from '../utils/mergeProps';\nimport {useFocusable} from '../interactions/useFocusable';\nimport {usePress} from '../interactions/usePress';\n\nexport interface ButtonProps extends PressEvents, FocusableProps {\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n /** The content to display in the button. */\n children?: ReactNode;\n}\n\nexport interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {\n /** Indicates whether the element is disabled to users of assistive technology. */\n 'aria-disabled'?: boolean | 'true' | 'false';\n /**\n * Indicates whether the element, or another grouping element it controls, is currently expanded\n * or collapsed.\n */\n 'aria-expanded'?: boolean | 'true' | 'false';\n /**\n * Indicates the availability and type of interactive popup element, such as menu or dialog, that\n * can be triggered by an element.\n */\n 'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false';\n /**\n * Identifies the element (or elements) whose contents or presence are controlled by the current\n * element.\n */\n 'aria-controls'?: string;\n /** Indicates the current \"pressed\" state of toggle buttons. */\n 'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';\n /**\n * Indicates whether this element represents the current item within a container or set of related\n * elements.\n */\n 'aria-current'?: boolean | 'true' | 'false' | 'page' | 'step' | 'location' | 'date' | 'time';\n /**\n * The behavior of the button when used in an HTML form.\n *\n * @default 'button'\n */\n type?: 'button' | 'submit' | 'reset';\n /**\n * Whether to prevent focus from moving to the button when pressing it.\n *\n * Caution, this can make the button inaccessible and should only be used when alternative\n * keyboard interaction is provided, such as ComboBox's MenuTrigger or a NumberField's\n * increment/decrement control.\n */\n preventFocusOnPress?: boolean;\n /**\n * The `<form>` element to associate the button with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form).\n */\n form?: string;\n /**\n * The URL that processes the information submitted by the button.\n * Overrides the action attribute of the button's form owner.\n */\n formAction?: ButtonHTMLAttributes<HTMLButtonElement>['formAction'];\n /** Indicates how to encode the form data that is submitted. */\n formEncType?: string;\n /** Indicates the HTTP method used to submit the form. */\n formMethod?: string;\n /** Indicates that the form is not to be validated when it is submitted. */\n formNoValidate?: boolean;\n /** Overrides the target attribute of the button's form owner. */\n formTarget?: string;\n /** Submitted as a pair with the button's value as part of the form data. */\n name?: string;\n /** The value associated with the button's name when it's submitted with the form data. */\n value?: string;\n}\n\nexport interface AriaButtonElementTypeProps<T extends ElementType = 'button'> {\n /**\n * The HTML element or React element used to render the button, e.g. 'div', 'a', or `RouterLink`.\n *\n * @default 'button'\n */\n elementType?: T | JSXElementConstructor<any>;\n}\n\nexport interface LinkButtonProps<\n T extends ElementType = 'button'\n> extends AriaButtonElementTypeProps<T> {\n /** A URL to link to if elementType=\"a\". */\n href?: string;\n /** The target window for the link. */\n target?: string;\n /**\n * The relationship between the linked resource and the current page. See\n * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).\n */\n rel?: string;\n}\n\nexport interface AriaButtonProps<T extends ElementType = 'button'>\n extends ButtonProps, LinkButtonProps<T>, AriaBaseButtonProps {}\n\nexport interface AriaButtonOptions<E extends ElementType> extends Omit<\n AriaButtonProps<E>,\n 'children'\n> {}\n\nexport interface ButtonAria<T> {\n /** Props for the button element. */\n buttonProps: T;\n /** Whether the button is currently pressed. */\n isPressed: boolean;\n}\n\n// Order with overrides is important: 'button' should be default\nexport function useButton(\n props: AriaButtonOptions<'button'>,\n ref: RefObject<HTMLButtonElement | null>\n): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useButton(\n props: AriaButtonOptions<'a'>,\n ref: RefObject<HTMLAnchorElement | null>\n): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useButton(\n props: AriaButtonOptions<'div'>,\n ref: RefObject<HTMLDivElement | null>\n): ButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useButton(\n props: AriaButtonOptions<'input'>,\n ref: RefObject<HTMLInputElement | null>\n): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useButton(\n props: AriaButtonOptions<'span'>,\n ref: RefObject<HTMLSpanElement | null>\n): ButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<Element | null>\n): ButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a button component. Handles mouse,\n * keyboard, and touch interactions, focus behavior, and ARIA props for both native button elements\n * and custom element types.\n *\n * @param props - Props to be applied to the button.\n * @param ref - A ref to a DOM element for the button.\n */\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<any>\n): ButtonAria<HTMLAttributes<any>> {\n let {\n elementType = 'button',\n isDisabled,\n onPress,\n onPressStart,\n onPressEnd,\n onPressUp,\n onPressChange,\n preventFocusOnPress,\n // @ts-ignore - undocumented\n allowFocusWhenDisabled,\n onClick,\n href,\n target,\n rel,\n type = 'button'\n } = props;\n let additionalProps;\n if (elementType === 'button') {\n additionalProps = {\n type,\n disabled: isDisabled,\n form: props.form,\n formAction: props.formAction,\n formEncType: props.formEncType,\n formMethod: props.formMethod,\n formNoValidate: props.formNoValidate,\n formTarget: props.formTarget,\n name: props.name,\n value: props.value\n };\n } else {\n additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n }\n\n let {pressProps, isPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick,\n isDisabled,\n preventFocusOnPress,\n ref\n });\n\n let {focusableProps} = useFocusable(props, ref);\n if (allowFocusWhenDisabled) {\n focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n }\n let buttonProps = mergeProps(\n focusableProps,\n pressProps,\n filterDOMProps(props, {labelable: true})\n );\n\n return {\n isPressed, // Used to indicate press state for visual\n buttonProps: mergeProps(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current'],\n 'aria-disabled': props['aria-disabled']\n })\n };\n}\n"],"names":[],"version":3,"file":"useButton.js.map"}
1
+ {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAsKM,SAAS,0CACd,KAAqC,EACrC,GAAmB;IAEnB,IAAI,eACF,cAAc,sBACd,UAAU,WACV,OAAO,gBACP,YAAY,cACZ,UAAU,aACV,SAAS,iBACT,aAAa,uBACb,mBAAmB,0BACnB,4BAA4B;IAC5B,sBAAsB,WACtB,OAAO,QACP,IAAI,UACJ,MAAM,OACN,GAAG,QACH,OAAO,UACR,GAAG;IACJ,IAAI;IACJ,IAAI,gBAAgB,UAClB,kBAAkB;cAChB;QACA,UAAU;QACV,MAAM,MAAM,IAAI;QAChB,YAAY,MAAM,UAAU;QAC5B,aAAa,MAAM,WAAW;QAC9B,YAAY,MAAM,UAAU;QAC5B,gBAAgB,MAAM,cAAc;QACpC,YAAY,MAAM,UAAU;QAC5B,MAAM,MAAM,IAAI;QAChB,OAAO,MAAM,KAAK;IACpB;SAEA,kBAAkB;QAChB,MAAM;QACN,MAAM,gBAAgB,OAAO,CAAC,aAAa,OAAO;QAClD,QAAQ,gBAAgB,MAAM,SAAS;QACvC,MAAM,gBAAgB,UAAU,OAAO;QACvC,UAAU,gBAAgB,UAAU,aAAa;QACjD,iBAAiB,CAAC,cAAc,gBAAgB,UAAU,YAAY;QACtE,KAAK,gBAAgB,MAAM,MAAM;IACnC;IAGF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yCAAO,EAAE;sBACrC;oBACA;uBACA;iBACA;mBACA;iBACA;oBACA;6BACA;aACA;IACF;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE,OAAO;IAC3C,IAAI,wBACF,gDAAgD;IAChD,eAAe,QAAQ,GAAG,aAAa,KAAK,eAAe,QAAQ;IAErE,IAAI,cAAc,CAAA,GAAA,yCAAS,EACzB,gBACA,YACA,CAAA,GAAA,yCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAGxC,OAAO;mBACL;QACA,aAAa,CAAA,GAAA,yCAAS,EAAE,iBAAiB,aAAa;YACpD,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,gBAAgB,KAAK,CAAC,eAAe;YACrC,gBAAgB,KAAK,CAAC,eAAe;YACrC,iBAAiB,KAAK,CAAC,gBAAgB;QACzC;IACF;AACF","sources":["packages/react-aria/src/button/useButton.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes,\n JSXElementConstructor,\n ReactNode,\n RefObject\n} from 'react';\nimport {\n AriaLabelingProps,\n DOMAttributes,\n FocusableDOMProps,\n FocusableProps,\n PressEvents\n} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {mergeProps} from '../utils/mergeProps';\nimport {useFocusable} from '../interactions/useFocusable';\nimport {usePress} from '../interactions/usePress';\n\nexport interface ButtonProps extends PressEvents, FocusableProps {\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n /** The content to display in the button. */\n children?: ReactNode;\n}\n\nexport interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {\n /** Indicates whether the element is disabled to users of assistive technology. */\n 'aria-disabled'?: boolean | 'true' | 'false';\n /**\n * Indicates whether the element, or another grouping element it controls, is currently expanded\n * or collapsed.\n */\n 'aria-expanded'?: boolean | 'true' | 'false';\n /**\n * Indicates the availability and type of interactive popup element, such as menu or dialog, that\n * can be triggered by an element.\n */\n 'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false';\n /**\n * Identifies the element (or elements) whose contents or presence are controlled by the current\n * element.\n */\n 'aria-controls'?: string;\n /** Indicates the current \"pressed\" state of toggle buttons. */\n 'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';\n /**\n * Indicates whether this element represents the current item within a container or set of related\n * elements.\n */\n 'aria-current'?: boolean | 'true' | 'false' | 'page' | 'step' | 'location' | 'date' | 'time';\n /**\n * The behavior of the button when used in an HTML form.\n *\n * @default 'button'\n */\n type?: 'button' | 'submit' | 'reset';\n /**\n * Whether to prevent focus from moving to the button when pressing it.\n *\n * Caution, this can make the button inaccessible and should only be used when alternative\n * keyboard interaction is provided, such as ComboBox's MenuTrigger or a NumberField's\n * increment/decrement control.\n */\n preventFocusOnPress?: boolean;\n /**\n * The `<form>` element to associate the button with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form).\n */\n form?: string;\n /**\n * The URL that processes the information submitted by the button.\n * Overrides the action attribute of the button's form owner.\n */\n formAction?: ButtonHTMLAttributes<HTMLButtonElement>['formAction'];\n /** Indicates how to encode the form data that is submitted. */\n formEncType?: string;\n /** Indicates the HTTP method used to submit the form. */\n formMethod?: string;\n /** Indicates that the form is not to be validated when it is submitted. */\n formNoValidate?: boolean;\n /** Overrides the target attribute of the button's form owner. */\n formTarget?: string;\n /** Submitted as a pair with the button's value as part of the form data. */\n name?: string;\n /** The value associated with the button's name when it's submitted with the form data. */\n value?: string;\n}\n\nexport interface AriaButtonElementTypeProps<T extends ElementType = 'button'> {\n /**\n * The HTML element or React element used to render the button, e.g. 'div', 'a', or `RouterLink`.\n *\n * @default 'button'\n */\n elementType?: T | JSXElementConstructor<any>;\n}\n\nexport interface LinkButtonProps<\n T extends ElementType = 'button'\n> extends AriaButtonElementTypeProps<T> {\n /** A URL to link to if elementType=\"a\". */\n href?: string;\n /** The target window for the link. */\n target?: string;\n /**\n * The relationship between the linked resource and the current page. See\n * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).\n */\n rel?: string;\n}\n\nexport interface AriaButtonProps<T extends ElementType = 'button'>\n extends ButtonProps, LinkButtonProps<T>, AriaBaseButtonProps {}\n\nexport interface AriaButtonOptions<E extends ElementType> extends Omit<\n AriaButtonProps<E>,\n 'children'\n> {}\n\nexport interface ButtonAria<T> {\n /** Props for the button element. */\n buttonProps: T;\n /** Whether the button is currently pressed. */\n isPressed: boolean;\n}\n\n// Order with overrides is important: 'button' should be default\nexport function useButton(\n props: AriaButtonOptions<'button'>,\n ref: RefObject<HTMLButtonElement | null>\n): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useButton(\n props: AriaButtonOptions<'a'>,\n ref: RefObject<HTMLAnchorElement | null>\n): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useButton(\n props: AriaButtonOptions<'div'>,\n ref: RefObject<HTMLDivElement | null>\n): ButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useButton(\n props: AriaButtonOptions<'input'>,\n ref: RefObject<HTMLInputElement | null>\n): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useButton(\n props: AriaButtonOptions<'span'>,\n ref: RefObject<HTMLSpanElement | null>\n): ButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<Element | null>\n): ButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a button component. Handles mouse,\n * keyboard, and touch interactions, focus behavior, and ARIA props for both native button elements\n * and custom element types.\n *\n * @param props - Props to be applied to the button.\n * @param ref - A ref to a DOM element for the button.\n */\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<any>\n): ButtonAria<HTMLAttributes<any>> {\n let {\n elementType = 'button',\n isDisabled,\n onPress,\n onPressStart,\n onPressEnd,\n onPressUp,\n onPressChange,\n preventFocusOnPress,\n // @ts-ignore - undocumented\n allowFocusWhenDisabled,\n onClick,\n href,\n target,\n rel,\n type = 'button'\n } = props;\n let additionalProps;\n if (elementType === 'button') {\n additionalProps = {\n type,\n disabled: isDisabled,\n form: props.form,\n formAction: props.formAction,\n formEncType: props.formEncType,\n formMethod: props.formMethod,\n formNoValidate: props.formNoValidate,\n formTarget: props.formTarget,\n name: props.name,\n value: props.value\n };\n } else {\n additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n }\n\n let {pressProps, isPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick,\n isDisabled,\n preventFocusOnPress,\n ref\n });\n\n let {focusableProps} = useFocusable(props, ref);\n if (allowFocusWhenDisabled) {\n // oxlint-disable-next-line react/react-compiler\n focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n }\n let buttonProps = mergeProps(\n focusableProps,\n pressProps,\n filterDOMProps(props, {labelable: true})\n );\n\n return {\n isPressed, // Used to indicate press state for visual\n buttonProps: mergeProps(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current'],\n 'aria-disabled': props['aria-disabled']\n })\n };\n}\n"],"names":[],"version":3,"file":"useButton.js.map"}
@@ -54,7 +54,8 @@ function $ac4318a9c075bb9f$export$ea18c227d4417cc3(props, ref) {
54
54
  ref: ref
55
55
  });
56
56
  let { focusableProps: focusableProps } = (0, $d1116acdf220c2da$export$4c014de7c8940b4c)(props, ref);
57
- if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
57
+ if (allowFocusWhenDisabled) // oxlint-disable-next-line react/react-compiler
58
+ focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
58
59
  let buttonProps = (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(focusableProps, pressProps, (0, $8e9d2fae0ecb9001$export$457c3d6518dd4c6f)(props, {
59
60
  labelable: true
60
61
  }));
@@ -1 +1 @@
1
- {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAsKM,SAAS,0CACd,KAAqC,EACrC,GAAmB;IAEnB,IAAI,eACF,cAAc,sBACd,UAAU,WACV,OAAO,gBACP,YAAY,cACZ,UAAU,aACV,SAAS,iBACT,aAAa,uBACb,mBAAmB,0BACnB,4BAA4B;IAC5B,sBAAsB,WACtB,OAAO,QACP,IAAI,UACJ,MAAM,OACN,GAAG,QACH,OAAO,UACR,GAAG;IACJ,IAAI;IACJ,IAAI,gBAAgB,UAClB,kBAAkB;cAChB;QACA,UAAU;QACV,MAAM,MAAM,IAAI;QAChB,YAAY,MAAM,UAAU;QAC5B,aAAa,MAAM,WAAW;QAC9B,YAAY,MAAM,UAAU;QAC5B,gBAAgB,MAAM,cAAc;QACpC,YAAY,MAAM,UAAU;QAC5B,MAAM,MAAM,IAAI;QAChB,OAAO,MAAM,KAAK;IACpB;SAEA,kBAAkB;QAChB,MAAM;QACN,MAAM,gBAAgB,OAAO,CAAC,aAAa,OAAO;QAClD,QAAQ,gBAAgB,MAAM,SAAS;QACvC,MAAM,gBAAgB,UAAU,OAAO;QACvC,UAAU,gBAAgB,UAAU,aAAa;QACjD,iBAAiB,CAAC,cAAc,gBAAgB,UAAU,YAAY;QACtE,KAAK,gBAAgB,MAAM,MAAM;IACnC;IAGF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yCAAO,EAAE;sBACrC;oBACA;uBACA;iBACA;mBACA;iBACA;oBACA;6BACA;aACA;IACF;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE,OAAO;IAC3C,IAAI,wBACF,eAAe,QAAQ,GAAG,aAAa,KAAK,eAAe,QAAQ;IAErE,IAAI,cAAc,CAAA,GAAA,yCAAS,EACzB,gBACA,YACA,CAAA,GAAA,yCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAGxC,OAAO;mBACL;QACA,aAAa,CAAA,GAAA,yCAAS,EAAE,iBAAiB,aAAa;YACpD,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,gBAAgB,KAAK,CAAC,eAAe;YACrC,gBAAgB,KAAK,CAAC,eAAe;YACrC,iBAAiB,KAAK,CAAC,gBAAgB;QACzC;IACF;AACF","sources":["packages/react-aria/src/button/useButton.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes,\n JSXElementConstructor,\n ReactNode,\n RefObject\n} from 'react';\nimport {\n AriaLabelingProps,\n DOMAttributes,\n FocusableDOMProps,\n FocusableProps,\n PressEvents\n} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {mergeProps} from '../utils/mergeProps';\nimport {useFocusable} from '../interactions/useFocusable';\nimport {usePress} from '../interactions/usePress';\n\nexport interface ButtonProps extends PressEvents, FocusableProps {\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n /** The content to display in the button. */\n children?: ReactNode;\n}\n\nexport interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {\n /** Indicates whether the element is disabled to users of assistive technology. */\n 'aria-disabled'?: boolean | 'true' | 'false';\n /**\n * Indicates whether the element, or another grouping element it controls, is currently expanded\n * or collapsed.\n */\n 'aria-expanded'?: boolean | 'true' | 'false';\n /**\n * Indicates the availability and type of interactive popup element, such as menu or dialog, that\n * can be triggered by an element.\n */\n 'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false';\n /**\n * Identifies the element (or elements) whose contents or presence are controlled by the current\n * element.\n */\n 'aria-controls'?: string;\n /** Indicates the current \"pressed\" state of toggle buttons. */\n 'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';\n /**\n * Indicates whether this element represents the current item within a container or set of related\n * elements.\n */\n 'aria-current'?: boolean | 'true' | 'false' | 'page' | 'step' | 'location' | 'date' | 'time';\n /**\n * The behavior of the button when used in an HTML form.\n *\n * @default 'button'\n */\n type?: 'button' | 'submit' | 'reset';\n /**\n * Whether to prevent focus from moving to the button when pressing it.\n *\n * Caution, this can make the button inaccessible and should only be used when alternative\n * keyboard interaction is provided, such as ComboBox's MenuTrigger or a NumberField's\n * increment/decrement control.\n */\n preventFocusOnPress?: boolean;\n /**\n * The `<form>` element to associate the button with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form).\n */\n form?: string;\n /**\n * The URL that processes the information submitted by the button.\n * Overrides the action attribute of the button's form owner.\n */\n formAction?: ButtonHTMLAttributes<HTMLButtonElement>['formAction'];\n /** Indicates how to encode the form data that is submitted. */\n formEncType?: string;\n /** Indicates the HTTP method used to submit the form. */\n formMethod?: string;\n /** Indicates that the form is not to be validated when it is submitted. */\n formNoValidate?: boolean;\n /** Overrides the target attribute of the button's form owner. */\n formTarget?: string;\n /** Submitted as a pair with the button's value as part of the form data. */\n name?: string;\n /** The value associated with the button's name when it's submitted with the form data. */\n value?: string;\n}\n\nexport interface AriaButtonElementTypeProps<T extends ElementType = 'button'> {\n /**\n * The HTML element or React element used to render the button, e.g. 'div', 'a', or `RouterLink`.\n *\n * @default 'button'\n */\n elementType?: T | JSXElementConstructor<any>;\n}\n\nexport interface LinkButtonProps<\n T extends ElementType = 'button'\n> extends AriaButtonElementTypeProps<T> {\n /** A URL to link to if elementType=\"a\". */\n href?: string;\n /** The target window for the link. */\n target?: string;\n /**\n * The relationship between the linked resource and the current page. See\n * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).\n */\n rel?: string;\n}\n\nexport interface AriaButtonProps<T extends ElementType = 'button'>\n extends ButtonProps, LinkButtonProps<T>, AriaBaseButtonProps {}\n\nexport interface AriaButtonOptions<E extends ElementType> extends Omit<\n AriaButtonProps<E>,\n 'children'\n> {}\n\nexport interface ButtonAria<T> {\n /** Props for the button element. */\n buttonProps: T;\n /** Whether the button is currently pressed. */\n isPressed: boolean;\n}\n\n// Order with overrides is important: 'button' should be default\nexport function useButton(\n props: AriaButtonOptions<'button'>,\n ref: RefObject<HTMLButtonElement | null>\n): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useButton(\n props: AriaButtonOptions<'a'>,\n ref: RefObject<HTMLAnchorElement | null>\n): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useButton(\n props: AriaButtonOptions<'div'>,\n ref: RefObject<HTMLDivElement | null>\n): ButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useButton(\n props: AriaButtonOptions<'input'>,\n ref: RefObject<HTMLInputElement | null>\n): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useButton(\n props: AriaButtonOptions<'span'>,\n ref: RefObject<HTMLSpanElement | null>\n): ButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<Element | null>\n): ButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a button component. Handles mouse,\n * keyboard, and touch interactions, focus behavior, and ARIA props for both native button elements\n * and custom element types.\n *\n * @param props - Props to be applied to the button.\n * @param ref - A ref to a DOM element for the button.\n */\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<any>\n): ButtonAria<HTMLAttributes<any>> {\n let {\n elementType = 'button',\n isDisabled,\n onPress,\n onPressStart,\n onPressEnd,\n onPressUp,\n onPressChange,\n preventFocusOnPress,\n // @ts-ignore - undocumented\n allowFocusWhenDisabled,\n onClick,\n href,\n target,\n rel,\n type = 'button'\n } = props;\n let additionalProps;\n if (elementType === 'button') {\n additionalProps = {\n type,\n disabled: isDisabled,\n form: props.form,\n formAction: props.formAction,\n formEncType: props.formEncType,\n formMethod: props.formMethod,\n formNoValidate: props.formNoValidate,\n formTarget: props.formTarget,\n name: props.name,\n value: props.value\n };\n } else {\n additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n }\n\n let {pressProps, isPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick,\n isDisabled,\n preventFocusOnPress,\n ref\n });\n\n let {focusableProps} = useFocusable(props, ref);\n if (allowFocusWhenDisabled) {\n focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n }\n let buttonProps = mergeProps(\n focusableProps,\n pressProps,\n filterDOMProps(props, {labelable: true})\n );\n\n return {\n isPressed, // Used to indicate press state for visual\n buttonProps: mergeProps(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current'],\n 'aria-disabled': props['aria-disabled']\n })\n };\n}\n"],"names":[],"version":3,"file":"useButton.mjs.map"}
1
+ {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAsKM,SAAS,0CACd,KAAqC,EACrC,GAAmB;IAEnB,IAAI,eACF,cAAc,sBACd,UAAU,WACV,OAAO,gBACP,YAAY,cACZ,UAAU,aACV,SAAS,iBACT,aAAa,uBACb,mBAAmB,0BACnB,4BAA4B;IAC5B,sBAAsB,WACtB,OAAO,QACP,IAAI,UACJ,MAAM,OACN,GAAG,QACH,OAAO,UACR,GAAG;IACJ,IAAI;IACJ,IAAI,gBAAgB,UAClB,kBAAkB;cAChB;QACA,UAAU;QACV,MAAM,MAAM,IAAI;QAChB,YAAY,MAAM,UAAU;QAC5B,aAAa,MAAM,WAAW;QAC9B,YAAY,MAAM,UAAU;QAC5B,gBAAgB,MAAM,cAAc;QACpC,YAAY,MAAM,UAAU;QAC5B,MAAM,MAAM,IAAI;QAChB,OAAO,MAAM,KAAK;IACpB;SAEA,kBAAkB;QAChB,MAAM;QACN,MAAM,gBAAgB,OAAO,CAAC,aAAa,OAAO;QAClD,QAAQ,gBAAgB,MAAM,SAAS;QACvC,MAAM,gBAAgB,UAAU,OAAO;QACvC,UAAU,gBAAgB,UAAU,aAAa;QACjD,iBAAiB,CAAC,cAAc,gBAAgB,UAAU,YAAY;QACtE,KAAK,gBAAgB,MAAM,MAAM;IACnC;IAGF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yCAAO,EAAE;sBACrC;oBACA;uBACA;iBACA;mBACA;iBACA;oBACA;6BACA;aACA;IACF;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE,OAAO;IAC3C,IAAI,wBACF,gDAAgD;IAChD,eAAe,QAAQ,GAAG,aAAa,KAAK,eAAe,QAAQ;IAErE,IAAI,cAAc,CAAA,GAAA,yCAAS,EACzB,gBACA,YACA,CAAA,GAAA,yCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAGxC,OAAO;mBACL;QACA,aAAa,CAAA,GAAA,yCAAS,EAAE,iBAAiB,aAAa;YACpD,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,gBAAgB,KAAK,CAAC,eAAe;YACrC,gBAAgB,KAAK,CAAC,eAAe;YACrC,iBAAiB,KAAK,CAAC,gBAAgB;QACzC;IACF;AACF","sources":["packages/react-aria/src/button/useButton.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes,\n JSXElementConstructor,\n ReactNode,\n RefObject\n} from 'react';\nimport {\n AriaLabelingProps,\n DOMAttributes,\n FocusableDOMProps,\n FocusableProps,\n PressEvents\n} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {mergeProps} from '../utils/mergeProps';\nimport {useFocusable} from '../interactions/useFocusable';\nimport {usePress} from '../interactions/usePress';\n\nexport interface ButtonProps extends PressEvents, FocusableProps {\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n /** The content to display in the button. */\n children?: ReactNode;\n}\n\nexport interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {\n /** Indicates whether the element is disabled to users of assistive technology. */\n 'aria-disabled'?: boolean | 'true' | 'false';\n /**\n * Indicates whether the element, or another grouping element it controls, is currently expanded\n * or collapsed.\n */\n 'aria-expanded'?: boolean | 'true' | 'false';\n /**\n * Indicates the availability and type of interactive popup element, such as menu or dialog, that\n * can be triggered by an element.\n */\n 'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false';\n /**\n * Identifies the element (or elements) whose contents or presence are controlled by the current\n * element.\n */\n 'aria-controls'?: string;\n /** Indicates the current \"pressed\" state of toggle buttons. */\n 'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';\n /**\n * Indicates whether this element represents the current item within a container or set of related\n * elements.\n */\n 'aria-current'?: boolean | 'true' | 'false' | 'page' | 'step' | 'location' | 'date' | 'time';\n /**\n * The behavior of the button when used in an HTML form.\n *\n * @default 'button'\n */\n type?: 'button' | 'submit' | 'reset';\n /**\n * Whether to prevent focus from moving to the button when pressing it.\n *\n * Caution, this can make the button inaccessible and should only be used when alternative\n * keyboard interaction is provided, such as ComboBox's MenuTrigger or a NumberField's\n * increment/decrement control.\n */\n preventFocusOnPress?: boolean;\n /**\n * The `<form>` element to associate the button with.\n * The value of this attribute must be the id of a `<form>` in the same document.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form).\n */\n form?: string;\n /**\n * The URL that processes the information submitted by the button.\n * Overrides the action attribute of the button's form owner.\n */\n formAction?: ButtonHTMLAttributes<HTMLButtonElement>['formAction'];\n /** Indicates how to encode the form data that is submitted. */\n formEncType?: string;\n /** Indicates the HTTP method used to submit the form. */\n formMethod?: string;\n /** Indicates that the form is not to be validated when it is submitted. */\n formNoValidate?: boolean;\n /** Overrides the target attribute of the button's form owner. */\n formTarget?: string;\n /** Submitted as a pair with the button's value as part of the form data. */\n name?: string;\n /** The value associated with the button's name when it's submitted with the form data. */\n value?: string;\n}\n\nexport interface AriaButtonElementTypeProps<T extends ElementType = 'button'> {\n /**\n * The HTML element or React element used to render the button, e.g. 'div', 'a', or `RouterLink`.\n *\n * @default 'button'\n */\n elementType?: T | JSXElementConstructor<any>;\n}\n\nexport interface LinkButtonProps<\n T extends ElementType = 'button'\n> extends AriaButtonElementTypeProps<T> {\n /** A URL to link to if elementType=\"a\". */\n href?: string;\n /** The target window for the link. */\n target?: string;\n /**\n * The relationship between the linked resource and the current page. See\n * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).\n */\n rel?: string;\n}\n\nexport interface AriaButtonProps<T extends ElementType = 'button'>\n extends ButtonProps, LinkButtonProps<T>, AriaBaseButtonProps {}\n\nexport interface AriaButtonOptions<E extends ElementType> extends Omit<\n AriaButtonProps<E>,\n 'children'\n> {}\n\nexport interface ButtonAria<T> {\n /** Props for the button element. */\n buttonProps: T;\n /** Whether the button is currently pressed. */\n isPressed: boolean;\n}\n\n// Order with overrides is important: 'button' should be default\nexport function useButton(\n props: AriaButtonOptions<'button'>,\n ref: RefObject<HTMLButtonElement | null>\n): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useButton(\n props: AriaButtonOptions<'a'>,\n ref: RefObject<HTMLAnchorElement | null>\n): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useButton(\n props: AriaButtonOptions<'div'>,\n ref: RefObject<HTMLDivElement | null>\n): ButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useButton(\n props: AriaButtonOptions<'input'>,\n ref: RefObject<HTMLInputElement | null>\n): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useButton(\n props: AriaButtonOptions<'span'>,\n ref: RefObject<HTMLSpanElement | null>\n): ButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<Element | null>\n): ButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a button component. Handles mouse,\n * keyboard, and touch interactions, focus behavior, and ARIA props for both native button elements\n * and custom element types.\n *\n * @param props - Props to be applied to the button.\n * @param ref - A ref to a DOM element for the button.\n */\nexport function useButton(\n props: AriaButtonOptions<ElementType>,\n ref: RefObject<any>\n): ButtonAria<HTMLAttributes<any>> {\n let {\n elementType = 'button',\n isDisabled,\n onPress,\n onPressStart,\n onPressEnd,\n onPressUp,\n onPressChange,\n preventFocusOnPress,\n // @ts-ignore - undocumented\n allowFocusWhenDisabled,\n onClick,\n href,\n target,\n rel,\n type = 'button'\n } = props;\n let additionalProps;\n if (elementType === 'button') {\n additionalProps = {\n type,\n disabled: isDisabled,\n form: props.form,\n formAction: props.formAction,\n formEncType: props.formEncType,\n formMethod: props.formMethod,\n formNoValidate: props.formNoValidate,\n formTarget: props.formTarget,\n name: props.name,\n value: props.value\n };\n } else {\n additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n }\n\n let {pressProps, isPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick,\n isDisabled,\n preventFocusOnPress,\n ref\n });\n\n let {focusableProps} = useFocusable(props, ref);\n if (allowFocusWhenDisabled) {\n // oxlint-disable-next-line react/react-compiler\n focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n }\n let buttonProps = mergeProps(\n focusableProps,\n pressProps,\n filterDOMProps(props, {labelable: true})\n );\n\n return {\n isPressed, // Used to indicate press state for visual\n buttonProps: mergeProps(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current'],\n 'aria-disabled': props['aria-disabled']\n })\n };\n}\n"],"names":[],"version":3,"file":"useButton.mjs.map"}
@@ -48,8 +48,11 @@ function $0e7820611588913f$export$bc53712daae3d6e6(props, state, ref) {
48
48
  isDisabled: props.isDisabled || state.isDisabled
49
49
  }, toggleState, ref);
50
50
  if (state.selectionMode === 'single') {
51
+ // oxlint-disable-next-line react/react-compiler
51
52
  buttonProps.role = 'radio';
53
+ // oxlint-disable-next-line react/react-compiler
52
54
  buttonProps['aria-checked'] = toggleState.isSelected;
55
+ // oxlint-disable-next-line react/react-compiler
53
56
  delete buttonProps['aria-pressed'];
54
57
  }
55
58
  return {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AA+BM,SAAS,0CACd,KAAiC,EACjC,KAAuB,EACvB,GAAkC;IAElC,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,oCAAS,EAAE,OAAO;IAEvC,OAAO;QACL,YAAY;YACV,GAAG,YAAY;YACf,MAAM,MAAM,aAAa,KAAK,WAAW,eAAe,aAAa,IAAI;YACzE,iBAAiB;QACnB;IACF;AACF;AAmDO,SAAS,0CACd,KAAoD,EACpD,KAAuB,EACvB,GAAmB;IAEnB,IAAI,cAA2B;QAC7B,YAAY,MAAM,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;QAC3C,iBAAiB;QACjB,aAAY,UAAU;YACpB,MAAM,WAAW,CAAC,MAAM,EAAE,EAAE;QAC9B;QACA;YACE,MAAM,SAAS,CAAC,MAAM,EAAE;QAC1B;IACF;IAEA,IAAI,aAAC,SAAS,cAAE,UAAU,cAAE,UAAU,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,yCAAc,EACnE;QACE,GAAG,KAAK;QACR,IAAI;QACJ,YAAY,MAAM,UAAU,IAAI,MAAM,UAAU;IAClD,GACA,aACA;IAEF,IAAI,MAAM,aAAa,KAAK,UAAU;QACpC,YAAY,IAAI,GAAG;QACnB,WAAW,CAAC,eAAe,GAAG,YAAY,UAAU;QACpD,OAAO,WAAW,CAAC,eAAe;IACpC;IAEA,OAAO;mBACL;oBACA;oBACA;qBACA;IACF;AACF","sources":["packages/react-aria/src/button/useToggleButtonGroup.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes\n} from 'react';\nimport {AriaLabelingProps, DOMAttributes, Key, Orientation, RefObject} from '@react-types/shared';\nimport {AriaToggleButtonProps, ToggleButtonAria, useToggleButton} from './useToggleButton';\nimport {ToggleGroupProps, ToggleGroupState} from 'react-stately/useToggleGroupState';\nimport {ToggleState} from 'react-stately/useToggleState';\nimport {useToolbar} from '../toolbar/useToolbar';\n\nexport interface AriaToggleButtonGroupProps extends ToggleGroupProps, AriaLabelingProps {\n /**\n * The orientation of the the toggle button group.\n *\n * @default 'horizontal'\n */\n orientation?: Orientation;\n}\n\nexport interface ToggleButtonGroupAria {\n /**\n * Props for the toggle button group container.\n */\n groupProps: DOMAttributes;\n}\n\nexport function useToggleButtonGroup(\n props: AriaToggleButtonGroupProps,\n state: ToggleGroupState,\n ref: RefObject<HTMLElement | null>\n): ToggleButtonGroupAria {\n let {isDisabled} = props;\n let {toolbarProps} = useToolbar(props, ref);\n\n return {\n groupProps: {\n ...toolbarProps,\n role: state.selectionMode === 'single' ? 'radiogroup' : toolbarProps.role,\n 'aria-disabled': isDisabled\n }\n };\n}\n\nexport interface AriaToggleButtonGroupItemProps<E extends ElementType = 'button'> extends Omit<\n AriaToggleButtonProps<E>,\n 'id' | 'isSelected' | 'defaultSelected' | 'onChange'\n> {\n /** An identifier for the item in the `selectedKeys` of a ToggleButtonGroup. */\n id: Key;\n}\n\nexport interface AriaToggleButtonGroupItemOptions<E extends ElementType> extends Omit<\n AriaToggleButtonGroupItemProps<E>,\n 'children'\n> {}\n\n// Order with overrides is important: 'button' should be default\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'button'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLButtonElement | null>\n): ToggleButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'a'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLAnchorElement | null>\n): ToggleButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'div'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLDivElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'input'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLInputElement | null>\n): ToggleButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'span'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLSpanElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<Element | null>\n): ToggleButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a toggle button component.\n * ToggleButtons allow users to toggle a selection on or off, for example switching between two\n * states or modes.\n */\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<any>\n): ToggleButtonAria<HTMLAttributes<any>> {\n let toggleState: ToggleState = {\n isSelected: state.selectedKeys.has(props.id),\n defaultSelected: false,\n setSelected(isSelected) {\n state.setSelected(props.id, isSelected);\n },\n toggle() {\n state.toggleKey(props.id);\n }\n };\n\n let {isPressed, isSelected, isDisabled, buttonProps} = useToggleButton(\n {\n ...props,\n id: undefined,\n isDisabled: props.isDisabled || state.isDisabled\n },\n toggleState,\n ref\n );\n if (state.selectionMode === 'single') {\n buttonProps.role = 'radio';\n buttonProps['aria-checked'] = toggleState.isSelected;\n delete buttonProps['aria-pressed'];\n }\n\n return {\n isPressed,\n isSelected,\n isDisabled,\n buttonProps\n };\n}\n"],"names":[],"version":3,"file":"useToggleButtonGroup.cjs.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAuCM,SAAS,0CACd,KAAiC,EACjC,KAAuB,EACvB,GAAkC;IAElC,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,oCAAS,EAAE,OAAO;IAEvC,OAAO;QACL,YAAY;YACV,GAAG,YAAY;YACf,MAAM,MAAM,aAAa,KAAK,WAAW,eAAe,aAAa,IAAI;YACzE,iBAAiB;QACnB;IACF;AACF;AAmDO,SAAS,0CACd,KAAoD,EACpD,KAAuB,EACvB,GAAmB;IAEnB,IAAI,cAA2B;QAC7B,YAAY,MAAM,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;QAC3C,iBAAiB;QACjB,aAAY,UAAU;YACpB,MAAM,WAAW,CAAC,MAAM,EAAE,EAAE;QAC9B;QACA;YACE,MAAM,SAAS,CAAC,MAAM,EAAE;QAC1B;IACF;IAEA,IAAI,aAAC,SAAS,cAAE,UAAU,cAAE,UAAU,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,yCAAc,EACnE;QACE,GAAG,KAAK;QACR,IAAI;QACJ,YAAY,MAAM,UAAU,IAAI,MAAM,UAAU;IAClD,GACA,aACA;IAEF,IAAI,MAAM,aAAa,KAAK,UAAU;QACpC,gDAAgD;QAChD,YAAY,IAAI,GAAG;QACnB,gDAAgD;QAChD,WAAW,CAAC,eAAe,GAAG,YAAY,UAAU;QACpD,gDAAgD;QAChD,OAAO,WAAW,CAAC,eAAe;IACpC;IAEA,OAAO;mBACL;oBACA;oBACA;qBACA;IACF;AACF","sources":["packages/react-aria/src/button/useToggleButtonGroup.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes\n} from 'react';\nimport {AriaLabelingProps, DOMAttributes, Key, Orientation, RefObject} from '@react-types/shared';\nimport {AriaToggleButtonProps, ToggleButtonAria, useToggleButton} from './useToggleButton';\nimport {ToggleGroupProps, ToggleGroupState} from 'react-stately/useToggleGroupState';\nimport {ToggleState} from 'react-stately/useToggleState';\nimport {useToolbar} from '../toolbar/useToolbar';\n\nexport interface AriaToggleButtonGroupProps extends ToggleGroupProps, AriaLabelingProps {\n /**\n * The orientation of the the toggle button group.\n *\n * @default 'horizontal'\n */\n orientation?: Orientation;\n}\n\nexport interface ToggleButtonGroupAria {\n /**\n * Props for the toggle button group container.\n */\n groupProps: DOMAttributes;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toggle button group component.\n * Toggle button groups allow users to select one or more options from a group.\n *\n * @param props - Props for the toggle button group.\n * @param state - State for the toggle button group, as returned by `useToggleGroupState`.\n * @param ref - A ref to the toggle button group element.\n */\nexport function useToggleButtonGroup(\n props: AriaToggleButtonGroupProps,\n state: ToggleGroupState,\n ref: RefObject<HTMLElement | null>\n): ToggleButtonGroupAria {\n let {isDisabled} = props;\n let {toolbarProps} = useToolbar(props, ref);\n\n return {\n groupProps: {\n ...toolbarProps,\n role: state.selectionMode === 'single' ? 'radiogroup' : toolbarProps.role,\n 'aria-disabled': isDisabled\n }\n };\n}\n\nexport interface AriaToggleButtonGroupItemProps<E extends ElementType = 'button'> extends Omit<\n AriaToggleButtonProps<E>,\n 'id' | 'isSelected' | 'defaultSelected' | 'onChange'\n> {\n /** An identifier for the item in the `selectedKeys` of a ToggleButtonGroup. */\n id: Key;\n}\n\nexport interface AriaToggleButtonGroupItemOptions<E extends ElementType> extends Omit<\n AriaToggleButtonGroupItemProps<E>,\n 'children'\n> {}\n\n// Order with overrides is important: 'button' should be default\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'button'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLButtonElement | null>\n): ToggleButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'a'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLAnchorElement | null>\n): ToggleButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'div'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLDivElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'input'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLInputElement | null>\n): ToggleButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'span'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLSpanElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<Element | null>\n): ToggleButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a toggle button component.\n * ToggleButtons allow users to toggle a selection on or off, for example switching between two\n * states or modes.\n */\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<any>\n): ToggleButtonAria<HTMLAttributes<any>> {\n let toggleState: ToggleState = {\n isSelected: state.selectedKeys.has(props.id),\n defaultSelected: false,\n setSelected(isSelected) {\n state.setSelected(props.id, isSelected);\n },\n toggle() {\n state.toggleKey(props.id);\n }\n };\n\n let {isPressed, isSelected, isDisabled, buttonProps} = useToggleButton(\n {\n ...props,\n id: undefined,\n isDisabled: props.isDisabled || state.isDisabled\n },\n toggleState,\n ref\n );\n if (state.selectionMode === 'single') {\n // oxlint-disable-next-line react/react-compiler\n buttonProps.role = 'radio';\n // oxlint-disable-next-line react/react-compiler\n buttonProps['aria-checked'] = toggleState.isSelected;\n // oxlint-disable-next-line react/react-compiler\n delete buttonProps['aria-pressed'];\n }\n\n return {\n isPressed,\n isSelected,\n isDisabled,\n buttonProps\n };\n}\n"],"names":[],"version":3,"file":"useToggleButtonGroup.cjs.map"}
@@ -41,8 +41,11 @@ function $af904b43ffd869e9$export$bc53712daae3d6e6(props, state, ref) {
41
41
  isDisabled: props.isDisabled || state.isDisabled
42
42
  }, toggleState, ref);
43
43
  if (state.selectionMode === 'single') {
44
+ // oxlint-disable-next-line react/react-compiler
44
45
  buttonProps.role = 'radio';
46
+ // oxlint-disable-next-line react/react-compiler
45
47
  buttonProps['aria-checked'] = toggleState.isSelected;
48
+ // oxlint-disable-next-line react/react-compiler
46
49
  delete buttonProps['aria-pressed'];
47
50
  }
48
51
  return {
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AA+BM,SAAS,0CACd,KAAiC,EACjC,KAAuB,EACvB,GAAkC;IAElC,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,wCAAS,EAAE,OAAO;IAEvC,OAAO;QACL,YAAY;YACV,GAAG,YAAY;YACf,MAAM,MAAM,aAAa,KAAK,WAAW,eAAe,aAAa,IAAI;YACzE,iBAAiB;QACnB;IACF;AACF;AAmDO,SAAS,0CACd,KAAoD,EACpD,KAAuB,EACvB,GAAmB;IAEnB,IAAI,cAA2B;QAC7B,YAAY,MAAM,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;QAC3C,iBAAiB;QACjB,aAAY,UAAU;YACpB,MAAM,WAAW,CAAC,MAAM,EAAE,EAAE;QAC9B;QACA;YACE,MAAM,SAAS,CAAC,MAAM,EAAE;QAC1B;IACF;IAEA,IAAI,aAAC,SAAS,cAAE,UAAU,cAAE,UAAU,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,yCAAc,EACnE;QACE,GAAG,KAAK;QACR,IAAI;QACJ,YAAY,MAAM,UAAU,IAAI,MAAM,UAAU;IAClD,GACA,aACA;IAEF,IAAI,MAAM,aAAa,KAAK,UAAU;QACpC,YAAY,IAAI,GAAG;QACnB,WAAW,CAAC,eAAe,GAAG,YAAY,UAAU;QACpD,OAAO,WAAW,CAAC,eAAe;IACpC;IAEA,OAAO;mBACL;oBACA;oBACA;qBACA;IACF;AACF","sources":["packages/react-aria/src/button/useToggleButtonGroup.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes\n} from 'react';\nimport {AriaLabelingProps, DOMAttributes, Key, Orientation, RefObject} from '@react-types/shared';\nimport {AriaToggleButtonProps, ToggleButtonAria, useToggleButton} from './useToggleButton';\nimport {ToggleGroupProps, ToggleGroupState} from 'react-stately/useToggleGroupState';\nimport {ToggleState} from 'react-stately/useToggleState';\nimport {useToolbar} from '../toolbar/useToolbar';\n\nexport interface AriaToggleButtonGroupProps extends ToggleGroupProps, AriaLabelingProps {\n /**\n * The orientation of the the toggle button group.\n *\n * @default 'horizontal'\n */\n orientation?: Orientation;\n}\n\nexport interface ToggleButtonGroupAria {\n /**\n * Props for the toggle button group container.\n */\n groupProps: DOMAttributes;\n}\n\nexport function useToggleButtonGroup(\n props: AriaToggleButtonGroupProps,\n state: ToggleGroupState,\n ref: RefObject<HTMLElement | null>\n): ToggleButtonGroupAria {\n let {isDisabled} = props;\n let {toolbarProps} = useToolbar(props, ref);\n\n return {\n groupProps: {\n ...toolbarProps,\n role: state.selectionMode === 'single' ? 'radiogroup' : toolbarProps.role,\n 'aria-disabled': isDisabled\n }\n };\n}\n\nexport interface AriaToggleButtonGroupItemProps<E extends ElementType = 'button'> extends Omit<\n AriaToggleButtonProps<E>,\n 'id' | 'isSelected' | 'defaultSelected' | 'onChange'\n> {\n /** An identifier for the item in the `selectedKeys` of a ToggleButtonGroup. */\n id: Key;\n}\n\nexport interface AriaToggleButtonGroupItemOptions<E extends ElementType> extends Omit<\n AriaToggleButtonGroupItemProps<E>,\n 'children'\n> {}\n\n// Order with overrides is important: 'button' should be default\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'button'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLButtonElement | null>\n): ToggleButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'a'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLAnchorElement | null>\n): ToggleButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'div'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLDivElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'input'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLInputElement | null>\n): ToggleButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'span'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLSpanElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<Element | null>\n): ToggleButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a toggle button component.\n * ToggleButtons allow users to toggle a selection on or off, for example switching between two\n * states or modes.\n */\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<any>\n): ToggleButtonAria<HTMLAttributes<any>> {\n let toggleState: ToggleState = {\n isSelected: state.selectedKeys.has(props.id),\n defaultSelected: false,\n setSelected(isSelected) {\n state.setSelected(props.id, isSelected);\n },\n toggle() {\n state.toggleKey(props.id);\n }\n };\n\n let {isPressed, isSelected, isDisabled, buttonProps} = useToggleButton(\n {\n ...props,\n id: undefined,\n isDisabled: props.isDisabled || state.isDisabled\n },\n toggleState,\n ref\n );\n if (state.selectionMode === 'single') {\n buttonProps.role = 'radio';\n buttonProps['aria-checked'] = toggleState.isSelected;\n delete buttonProps['aria-pressed'];\n }\n\n return {\n isPressed,\n isSelected,\n isDisabled,\n buttonProps\n };\n}\n"],"names":[],"version":3,"file":"useToggleButtonGroup.js.map"}
1
+ {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAuCM,SAAS,0CACd,KAAiC,EACjC,KAAuB,EACvB,GAAkC;IAElC,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,wCAAS,EAAE,OAAO;IAEvC,OAAO;QACL,YAAY;YACV,GAAG,YAAY;YACf,MAAM,MAAM,aAAa,KAAK,WAAW,eAAe,aAAa,IAAI;YACzE,iBAAiB;QACnB;IACF;AACF;AAmDO,SAAS,0CACd,KAAoD,EACpD,KAAuB,EACvB,GAAmB;IAEnB,IAAI,cAA2B;QAC7B,YAAY,MAAM,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;QAC3C,iBAAiB;QACjB,aAAY,UAAU;YACpB,MAAM,WAAW,CAAC,MAAM,EAAE,EAAE;QAC9B;QACA;YACE,MAAM,SAAS,CAAC,MAAM,EAAE;QAC1B;IACF;IAEA,IAAI,aAAC,SAAS,cAAE,UAAU,cAAE,UAAU,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,yCAAc,EACnE;QACE,GAAG,KAAK;QACR,IAAI;QACJ,YAAY,MAAM,UAAU,IAAI,MAAM,UAAU;IAClD,GACA,aACA;IAEF,IAAI,MAAM,aAAa,KAAK,UAAU;QACpC,gDAAgD;QAChD,YAAY,IAAI,GAAG;QACnB,gDAAgD;QAChD,WAAW,CAAC,eAAe,GAAG,YAAY,UAAU;QACpD,gDAAgD;QAChD,OAAO,WAAW,CAAC,eAAe;IACpC;IAEA,OAAO;mBACL;oBACA;oBACA;qBACA;IACF;AACF","sources":["packages/react-aria/src/button/useToggleButtonGroup.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes\n} from 'react';\nimport {AriaLabelingProps, DOMAttributes, Key, Orientation, RefObject} from '@react-types/shared';\nimport {AriaToggleButtonProps, ToggleButtonAria, useToggleButton} from './useToggleButton';\nimport {ToggleGroupProps, ToggleGroupState} from 'react-stately/useToggleGroupState';\nimport {ToggleState} from 'react-stately/useToggleState';\nimport {useToolbar} from '../toolbar/useToolbar';\n\nexport interface AriaToggleButtonGroupProps extends ToggleGroupProps, AriaLabelingProps {\n /**\n * The orientation of the the toggle button group.\n *\n * @default 'horizontal'\n */\n orientation?: Orientation;\n}\n\nexport interface ToggleButtonGroupAria {\n /**\n * Props for the toggle button group container.\n */\n groupProps: DOMAttributes;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toggle button group component.\n * Toggle button groups allow users to select one or more options from a group.\n *\n * @param props - Props for the toggle button group.\n * @param state - State for the toggle button group, as returned by `useToggleGroupState`.\n * @param ref - A ref to the toggle button group element.\n */\nexport function useToggleButtonGroup(\n props: AriaToggleButtonGroupProps,\n state: ToggleGroupState,\n ref: RefObject<HTMLElement | null>\n): ToggleButtonGroupAria {\n let {isDisabled} = props;\n let {toolbarProps} = useToolbar(props, ref);\n\n return {\n groupProps: {\n ...toolbarProps,\n role: state.selectionMode === 'single' ? 'radiogroup' : toolbarProps.role,\n 'aria-disabled': isDisabled\n }\n };\n}\n\nexport interface AriaToggleButtonGroupItemProps<E extends ElementType = 'button'> extends Omit<\n AriaToggleButtonProps<E>,\n 'id' | 'isSelected' | 'defaultSelected' | 'onChange'\n> {\n /** An identifier for the item in the `selectedKeys` of a ToggleButtonGroup. */\n id: Key;\n}\n\nexport interface AriaToggleButtonGroupItemOptions<E extends ElementType> extends Omit<\n AriaToggleButtonGroupItemProps<E>,\n 'children'\n> {}\n\n// Order with overrides is important: 'button' should be default\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'button'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLButtonElement | null>\n): ToggleButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'a'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLAnchorElement | null>\n): ToggleButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'div'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLDivElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'input'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLInputElement | null>\n): ToggleButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'span'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLSpanElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<Element | null>\n): ToggleButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a toggle button component.\n * ToggleButtons allow users to toggle a selection on or off, for example switching between two\n * states or modes.\n */\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<any>\n): ToggleButtonAria<HTMLAttributes<any>> {\n let toggleState: ToggleState = {\n isSelected: state.selectedKeys.has(props.id),\n defaultSelected: false,\n setSelected(isSelected) {\n state.setSelected(props.id, isSelected);\n },\n toggle() {\n state.toggleKey(props.id);\n }\n };\n\n let {isPressed, isSelected, isDisabled, buttonProps} = useToggleButton(\n {\n ...props,\n id: undefined,\n isDisabled: props.isDisabled || state.isDisabled\n },\n toggleState,\n ref\n );\n if (state.selectionMode === 'single') {\n // oxlint-disable-next-line react/react-compiler\n buttonProps.role = 'radio';\n // oxlint-disable-next-line react/react-compiler\n buttonProps['aria-checked'] = toggleState.isSelected;\n // oxlint-disable-next-line react/react-compiler\n delete buttonProps['aria-pressed'];\n }\n\n return {\n isPressed,\n isSelected,\n isDisabled,\n buttonProps\n };\n}\n"],"names":[],"version":3,"file":"useToggleButtonGroup.js.map"}
@@ -41,8 +41,11 @@ function $162557ba4d6f08dd$export$bc53712daae3d6e6(props, state, ref) {
41
41
  isDisabled: props.isDisabled || state.isDisabled
42
42
  }, toggleState, ref);
43
43
  if (state.selectionMode === 'single') {
44
+ // oxlint-disable-next-line react/react-compiler
44
45
  buttonProps.role = 'radio';
46
+ // oxlint-disable-next-line react/react-compiler
45
47
  buttonProps['aria-checked'] = toggleState.isSelected;
48
+ // oxlint-disable-next-line react/react-compiler
46
49
  delete buttonProps['aria-pressed'];
47
50
  }
48
51
  return {
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AA+BM,SAAS,0CACd,KAAiC,EACjC,KAAuB,EACvB,GAAkC;IAElC,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,wCAAS,EAAE,OAAO;IAEvC,OAAO;QACL,YAAY;YACV,GAAG,YAAY;YACf,MAAM,MAAM,aAAa,KAAK,WAAW,eAAe,aAAa,IAAI;YACzE,iBAAiB;QACnB;IACF;AACF;AAmDO,SAAS,0CACd,KAAoD,EACpD,KAAuB,EACvB,GAAmB;IAEnB,IAAI,cAA2B;QAC7B,YAAY,MAAM,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;QAC3C,iBAAiB;QACjB,aAAY,UAAU;YACpB,MAAM,WAAW,CAAC,MAAM,EAAE,EAAE;QAC9B;QACA;YACE,MAAM,SAAS,CAAC,MAAM,EAAE;QAC1B;IACF;IAEA,IAAI,aAAC,SAAS,cAAE,UAAU,cAAE,UAAU,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,yCAAc,EACnE;QACE,GAAG,KAAK;QACR,IAAI;QACJ,YAAY,MAAM,UAAU,IAAI,MAAM,UAAU;IAClD,GACA,aACA;IAEF,IAAI,MAAM,aAAa,KAAK,UAAU;QACpC,YAAY,IAAI,GAAG;QACnB,WAAW,CAAC,eAAe,GAAG,YAAY,UAAU;QACpD,OAAO,WAAW,CAAC,eAAe;IACpC;IAEA,OAAO;mBACL;oBACA;oBACA;qBACA;IACF;AACF","sources":["packages/react-aria/src/button/useToggleButtonGroup.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes\n} from 'react';\nimport {AriaLabelingProps, DOMAttributes, Key, Orientation, RefObject} from '@react-types/shared';\nimport {AriaToggleButtonProps, ToggleButtonAria, useToggleButton} from './useToggleButton';\nimport {ToggleGroupProps, ToggleGroupState} from 'react-stately/useToggleGroupState';\nimport {ToggleState} from 'react-stately/useToggleState';\nimport {useToolbar} from '../toolbar/useToolbar';\n\nexport interface AriaToggleButtonGroupProps extends ToggleGroupProps, AriaLabelingProps {\n /**\n * The orientation of the the toggle button group.\n *\n * @default 'horizontal'\n */\n orientation?: Orientation;\n}\n\nexport interface ToggleButtonGroupAria {\n /**\n * Props for the toggle button group container.\n */\n groupProps: DOMAttributes;\n}\n\nexport function useToggleButtonGroup(\n props: AriaToggleButtonGroupProps,\n state: ToggleGroupState,\n ref: RefObject<HTMLElement | null>\n): ToggleButtonGroupAria {\n let {isDisabled} = props;\n let {toolbarProps} = useToolbar(props, ref);\n\n return {\n groupProps: {\n ...toolbarProps,\n role: state.selectionMode === 'single' ? 'radiogroup' : toolbarProps.role,\n 'aria-disabled': isDisabled\n }\n };\n}\n\nexport interface AriaToggleButtonGroupItemProps<E extends ElementType = 'button'> extends Omit<\n AriaToggleButtonProps<E>,\n 'id' | 'isSelected' | 'defaultSelected' | 'onChange'\n> {\n /** An identifier for the item in the `selectedKeys` of a ToggleButtonGroup. */\n id: Key;\n}\n\nexport interface AriaToggleButtonGroupItemOptions<E extends ElementType> extends Omit<\n AriaToggleButtonGroupItemProps<E>,\n 'children'\n> {}\n\n// Order with overrides is important: 'button' should be default\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'button'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLButtonElement | null>\n): ToggleButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'a'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLAnchorElement | null>\n): ToggleButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'div'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLDivElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'input'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLInputElement | null>\n): ToggleButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'span'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLSpanElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<Element | null>\n): ToggleButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a toggle button component.\n * ToggleButtons allow users to toggle a selection on or off, for example switching between two\n * states or modes.\n */\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<any>\n): ToggleButtonAria<HTMLAttributes<any>> {\n let toggleState: ToggleState = {\n isSelected: state.selectedKeys.has(props.id),\n defaultSelected: false,\n setSelected(isSelected) {\n state.setSelected(props.id, isSelected);\n },\n toggle() {\n state.toggleKey(props.id);\n }\n };\n\n let {isPressed, isSelected, isDisabled, buttonProps} = useToggleButton(\n {\n ...props,\n id: undefined,\n isDisabled: props.isDisabled || state.isDisabled\n },\n toggleState,\n ref\n );\n if (state.selectionMode === 'single') {\n buttonProps.role = 'radio';\n buttonProps['aria-checked'] = toggleState.isSelected;\n delete buttonProps['aria-pressed'];\n }\n\n return {\n isPressed,\n isSelected,\n isDisabled,\n buttonProps\n };\n}\n"],"names":[],"version":3,"file":"useToggleButtonGroup.mjs.map"}
1
+ {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAuCM,SAAS,0CACd,KAAiC,EACjC,KAAuB,EACvB,GAAkC;IAElC,IAAI,cAAC,UAAU,EAAC,GAAG;IACnB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,wCAAS,EAAE,OAAO;IAEvC,OAAO;QACL,YAAY;YACV,GAAG,YAAY;YACf,MAAM,MAAM,aAAa,KAAK,WAAW,eAAe,aAAa,IAAI;YACzE,iBAAiB;QACnB;IACF;AACF;AAmDO,SAAS,0CACd,KAAoD,EACpD,KAAuB,EACvB,GAAmB;IAEnB,IAAI,cAA2B;QAC7B,YAAY,MAAM,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;QAC3C,iBAAiB;QACjB,aAAY,UAAU;YACpB,MAAM,WAAW,CAAC,MAAM,EAAE,EAAE;QAC9B;QACA;YACE,MAAM,SAAS,CAAC,MAAM,EAAE;QAC1B;IACF;IAEA,IAAI,aAAC,SAAS,cAAE,UAAU,cAAE,UAAU,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,yCAAc,EACnE;QACE,GAAG,KAAK;QACR,IAAI;QACJ,YAAY,MAAM,UAAU,IAAI,MAAM,UAAU;IAClD,GACA,aACA;IAEF,IAAI,MAAM,aAAa,KAAK,UAAU;QACpC,gDAAgD;QAChD,YAAY,IAAI,GAAG;QACnB,gDAAgD;QAChD,WAAW,CAAC,eAAe,GAAG,YAAY,UAAU;QACpD,gDAAgD;QAChD,OAAO,WAAW,CAAC,eAAe;IACpC;IAEA,OAAO;mBACL;oBACA;oBACA;qBACA;IACF;AACF","sources":["packages/react-aria/src/button/useToggleButtonGroup.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes\n} from 'react';\nimport {AriaLabelingProps, DOMAttributes, Key, Orientation, RefObject} from '@react-types/shared';\nimport {AriaToggleButtonProps, ToggleButtonAria, useToggleButton} from './useToggleButton';\nimport {ToggleGroupProps, ToggleGroupState} from 'react-stately/useToggleGroupState';\nimport {ToggleState} from 'react-stately/useToggleState';\nimport {useToolbar} from '../toolbar/useToolbar';\n\nexport interface AriaToggleButtonGroupProps extends ToggleGroupProps, AriaLabelingProps {\n /**\n * The orientation of the the toggle button group.\n *\n * @default 'horizontal'\n */\n orientation?: Orientation;\n}\n\nexport interface ToggleButtonGroupAria {\n /**\n * Props for the toggle button group container.\n */\n groupProps: DOMAttributes;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toggle button group component.\n * Toggle button groups allow users to select one or more options from a group.\n *\n * @param props - Props for the toggle button group.\n * @param state - State for the toggle button group, as returned by `useToggleGroupState`.\n * @param ref - A ref to the toggle button group element.\n */\nexport function useToggleButtonGroup(\n props: AriaToggleButtonGroupProps,\n state: ToggleGroupState,\n ref: RefObject<HTMLElement | null>\n): ToggleButtonGroupAria {\n let {isDisabled} = props;\n let {toolbarProps} = useToolbar(props, ref);\n\n return {\n groupProps: {\n ...toolbarProps,\n role: state.selectionMode === 'single' ? 'radiogroup' : toolbarProps.role,\n 'aria-disabled': isDisabled\n }\n };\n}\n\nexport interface AriaToggleButtonGroupItemProps<E extends ElementType = 'button'> extends Omit<\n AriaToggleButtonProps<E>,\n 'id' | 'isSelected' | 'defaultSelected' | 'onChange'\n> {\n /** An identifier for the item in the `selectedKeys` of a ToggleButtonGroup. */\n id: Key;\n}\n\nexport interface AriaToggleButtonGroupItemOptions<E extends ElementType> extends Omit<\n AriaToggleButtonGroupItemProps<E>,\n 'children'\n> {}\n\n// Order with overrides is important: 'button' should be default\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'button'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLButtonElement | null>\n): ToggleButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'a'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLAnchorElement | null>\n): ToggleButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'div'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLDivElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'input'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLInputElement | null>\n): ToggleButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<'span'>,\n state: ToggleGroupState,\n ref: RefObject<HTMLSpanElement | null>\n): ToggleButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<Element | null>\n): ToggleButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a toggle button component.\n * ToggleButtons allow users to toggle a selection on or off, for example switching between two\n * states or modes.\n */\nexport function useToggleButtonGroupItem(\n props: AriaToggleButtonGroupItemOptions<ElementType>,\n state: ToggleGroupState,\n ref: RefObject<any>\n): ToggleButtonAria<HTMLAttributes<any>> {\n let toggleState: ToggleState = {\n isSelected: state.selectedKeys.has(props.id),\n defaultSelected: false,\n setSelected(isSelected) {\n state.setSelected(props.id, isSelected);\n },\n toggle() {\n state.toggleKey(props.id);\n }\n };\n\n let {isPressed, isSelected, isDisabled, buttonProps} = useToggleButton(\n {\n ...props,\n id: undefined,\n isDisabled: props.isDisabled || state.isDisabled\n },\n toggleState,\n ref\n );\n if (state.selectionMode === 'single') {\n // oxlint-disable-next-line react/react-compiler\n buttonProps.role = 'radio';\n // oxlint-disable-next-line react/react-compiler\n buttonProps['aria-checked'] = toggleState.isSelected;\n // oxlint-disable-next-line react/react-compiler\n delete buttonProps['aria-pressed'];\n }\n\n return {\n isPressed,\n isSelected,\n isDisabled,\n buttonProps\n };\n}\n"],"names":[],"version":3,"file":"useToggleButtonGroup.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAmCM,SAAS,0CACd,KAAuD,EACvD,KAAgE;IAEhE,IAAI,kBAAkB,CAAA,GAAA,qDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,wCAAa,EAAE;IAE9B,IAAI,QAAQ,CAAA,GAAA,oDAAyB,EACnC,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAEF,IAAI,0BAA0B,CAAA,GAAA,oDAAyB,EACrD,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAGF,+CAA+C;IAC/C,CAAA,GAAA,yCAAc,EAAE;QACd,iDAAiD;QACjD,IAAI,CAAC,MAAM,SAAS,EAClB,CAAA,GAAA,kCAAO,EAAE;IAEb,GAAG;QAAC;KAAwB;IAE5B,2CAA2C;IAC3C,IAAI,0BAA0B,CAAA,GAAA,oDAAyB,EAAE;IACzD,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,yBACF,CAAA,GAAA,kCAAO,EAAE,yBAAyB,UAAU;IAE9C,yGAAyG;IAC3G,GAAG;QAAC;KAAwB;IAE5B,IAAI,iBAAiB,CAAA,GAAA,mCAAQ,EAAE;QAC7B,QAAQ,MAAM,YAAY;QAC1B,MAAM,SAAS;QACf,MAAM,eAAe;KACtB;IAED,6CAA6C;IAC7C,CAAA,GAAA,kCAAO,EAAE,GAAG,CAAC,OAAO;QAClB,WAAW,KAAK,CAAC,aAAa;QAC9B,gBAAgB,KAAK,CAAC,kBAAkB;wBACxC;iCACA;IACF;IAEA,2GAA2G;IAC3G,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,qBAAO,EAAE;IAC7C,IAAI,eAAe,MAAM,UAAU,IAAI,MAAM,yBAAyB;IACtE,IAAI,gBAAgB,aAAa;QAC/B,eAAe;QACf,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,CAAC,iBAAiB,mBAAmB,GAAG,CAAA,GAAA,qBAAO,EAAE;IACrD,IAAI,mBAAmB,MAAM,UAAU,IAAI,MAAM,6BAA6B;IAC9E,IAAI,oBAAoB,iBAAiB;QACvC,mBAAmB;QACnB,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,aAAa,CAAA,GAAA,mCAAQ,EAAE;QACzB,IAAI,KAAK,CAAC,KAAK;QACf,cAAc;YAAC,KAAK,CAAC,aAAa;YAAE;SAAwB,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC;QAClF,mBAAmB,KAAK,CAAC,kBAAkB;IAC7C;IAEA,OAAO;QACL,eAAe,CAAA,GAAA,oCAAS,EAAE,UAAU,YAAY;YAC9C,MAAM;YACN,gBAAgB,KAAK,CAAC,eAAe,IAAI;YACzC,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;QACnD;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,aAAa;YAClC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,iBAAiB;YACtC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,mBAAmB;YACjB,IAAI;QACN;eACA;IACF;AACF","sources":["packages/react-aria/src/calendar/useCalendarBase.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce} from '../live-announcer/LiveAnnouncer';\nimport {AriaButtonProps} from '../button/useButton';\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {\n CalendarPropsBase,\n CalendarSelectionMode,\n CalendarState\n} from 'react-stately/useCalendarState';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {hookData, useSelectedDateDescription, useVisibleRangeDescription} from './utils';\n// @ts-ignore\nimport intlMessages from '../../intl/calendar/*.json';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {useLabels} from '../utils/useLabels';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\nimport {useSlotId} from '../utils/useId';\nimport {useState} from 'react';\nimport {useUpdateEffect} from '../utils/useUpdateEffect';\n\nexport interface CalendarAria {\n /** Props for the calendar grouping element. */\n calendarProps: DOMAttributes;\n /** Props for the next button. */\n nextButtonProps: AriaButtonProps;\n /** Props for the previous button. */\n prevButtonProps: AriaButtonProps;\n /** Props for the error message element, if any. */\n errorMessageProps: DOMAttributes;\n /** A description of the visible date range, for use in the calendar title. */\n title: string;\n}\n\nexport function useCalendarBase(\n props: CalendarPropsBase & DOMProps & AriaLabelingProps,\n state: CalendarState<CalendarSelectionMode> | RangeCalendarState\n): CalendarAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/calendar');\n let domProps = filterDOMProps(props);\n\n let title = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n false\n );\n let visibleRangeDescription = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n true\n );\n\n // Announce when the visible date range changes\n useUpdateEffect(() => {\n // only when pressing the Previous or Next button\n if (!state.isFocused) {\n announce(visibleRangeDescription);\n }\n }, [visibleRangeDescription]);\n\n // Announce when the selected value changes\n let selectedDateDescription = useSelectedDateDescription(state);\n useUpdateEffect(() => {\n if (selectedDateDescription) {\n announce(selectedDateDescription, 'polite', 4000);\n }\n // handle an update to the caption that describes the currently selected range, to announce the new value\n }, [selectedDateDescription]);\n\n let errorMessageId = useSlotId([\n Boolean(props.errorMessage),\n props.isInvalid,\n props.validationState\n ]);\n\n // Pass the label to the child grid elements.\n hookData.set(state, {\n ariaLabel: props['aria-label'],\n ariaLabelledBy: props['aria-labelledby'],\n errorMessageId,\n selectedDateDescription\n });\n\n // If the next or previous buttons become disabled while they are focused, move focus to the calendar body.\n let [nextFocused, setNextFocused] = useState(false);\n let nextDisabled = props.isDisabled || state.isNextVisibleRangeInvalid();\n if (nextDisabled && nextFocused) {\n setNextFocused(false);\n state.setFocused(true);\n }\n\n let [previousFocused, setPreviousFocused] = useState(false);\n let previousDisabled = props.isDisabled || state.isPreviousVisibleRangeInvalid();\n if (previousDisabled && previousFocused) {\n setPreviousFocused(false);\n state.setFocused(true);\n }\n\n let labelProps = useLabels({\n id: props['id'],\n 'aria-label': [props['aria-label'], visibleRangeDescription].filter(Boolean).join(', '),\n 'aria-labelledby': props['aria-labelledby']\n });\n\n return {\n calendarProps: mergeProps(domProps, labelProps, {\n role: 'application',\n 'aria-details': props['aria-details'] || undefined,\n 'aria-describedby': props['aria-describedby'] || undefined\n }),\n nextButtonProps: {\n onPress: () => state.focusNextPage(),\n 'aria-label': stringFormatter.format('next'),\n isDisabled: nextDisabled,\n onFocusChange: setNextFocused\n },\n prevButtonProps: {\n onPress: () => state.focusPreviousPage(),\n 'aria-label': stringFormatter.format('previous'),\n isDisabled: previousDisabled,\n onFocusChange: setPreviousFocused\n },\n errorMessageProps: {\n id: errorMessageId\n },\n title\n };\n}\n"],"names":[],"version":3,"file":"useCalendarBase.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAkCM,SAAS,0CACd,KAAuD,EACvD,KAAgE;IAEhE,IAAI,kBAAkB,CAAA,GAAA,qDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,wCAAa,EAAE;IAE9B,IAAI,QAAQ,CAAA,GAAA,oDAAyB,EACnC,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAEF,IAAI,0BAA0B,CAAA,GAAA,oDAAyB,EACrD,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAGF,+CAA+C;IAC/C,CAAA,GAAA,yCAAc,EAAE;QACd,iDAAiD;QACjD,IAAI,CAAC,MAAM,SAAS,EAClB,CAAA,GAAA,kCAAO,EAAE;IAEb,GAAG;QAAC;KAAwB;IAE5B,2CAA2C;IAC3C,IAAI,0BAA0B,CAAA,GAAA,oDAAyB,EAAE;IACzD,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,yBACF,CAAA,GAAA,kCAAO,EAAE,yBAAyB,UAAU;IAE9C,yGAAyG;IAC3G,GAAG;QAAC;KAAwB;IAE5B,IAAI,iBAAiB,CAAA,GAAA,mCAAQ,EAAE;QAC7B,QAAQ,MAAM,YAAY;QAC1B,MAAM,SAAS;QACf,MAAM,eAAe;KACtB;IAED,6CAA6C;IAC7C,CAAA,GAAA,kCAAO,EAAE,GAAG,CAAC,OAAO;QAClB,WAAW,KAAK,CAAC,aAAa;QAC9B,gBAAgB,KAAK,CAAC,kBAAkB;wBACxC;iCACA;IACF;IAEA,2GAA2G;IAC3G,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,qBAAO,EAAE;IAC7C,IAAI,eAAe,MAAM,UAAU,IAAI,MAAM,yBAAyB;IACtE,IAAI,gBAAgB,aAAa;QAC/B,eAAe;QACf,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,CAAC,iBAAiB,mBAAmB,GAAG,CAAA,GAAA,qBAAO,EAAE;IACrD,IAAI,mBAAmB,MAAM,UAAU,IAAI,MAAM,6BAA6B;IAC9E,IAAI,oBAAoB,iBAAiB;QACvC,mBAAmB;QACnB,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,aAAa,CAAA,GAAA,mCAAQ,EAAE;QACzB,IAAI,KAAK,CAAC,KAAK;QACf,cAAc;YAAC,KAAK,CAAC,aAAa;YAAE;SAAwB,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC;QAClF,mBAAmB,KAAK,CAAC,kBAAkB;IAC7C;IAEA,OAAO;QACL,eAAe,CAAA,GAAA,oCAAS,EAAE,UAAU,YAAY;YAC9C,MAAM;YACN,gBAAgB,KAAK,CAAC,eAAe,IAAI;YACzC,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;QACnD;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,aAAa;YAClC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,iBAAiB;YACtC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,mBAAmB;YACjB,IAAI;QACN;eACA;IACF;AACF","sources":["packages/react-aria/src/calendar/useCalendarBase.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce} from '../live-announcer/LiveAnnouncer';\nimport {AriaButtonProps} from '../button/useButton';\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {\n CalendarPropsBase,\n CalendarSelectionMode,\n CalendarState\n} from 'react-stately/useCalendarState';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {hookData, useSelectedDateDescription, useVisibleRangeDescription} from './utils';\nimport intlMessages from '../../intl/calendar/*.json';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {useLabels} from '../utils/useLabels';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\nimport {useSlotId} from '../utils/useId';\nimport {useState} from 'react';\nimport {useUpdateEffect} from '../utils/useUpdateEffect';\n\nexport interface CalendarAria {\n /** Props for the calendar grouping element. */\n calendarProps: DOMAttributes;\n /** Props for the next button. */\n nextButtonProps: AriaButtonProps;\n /** Props for the previous button. */\n prevButtonProps: AriaButtonProps;\n /** Props for the error message element, if any. */\n errorMessageProps: DOMAttributes;\n /** A description of the visible date range, for use in the calendar title. */\n title: string;\n}\n\nexport function useCalendarBase(\n props: CalendarPropsBase & DOMProps & AriaLabelingProps,\n state: CalendarState<CalendarSelectionMode> | RangeCalendarState\n): CalendarAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/calendar');\n let domProps = filterDOMProps(props);\n\n let title = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n false\n );\n let visibleRangeDescription = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n true\n );\n\n // Announce when the visible date range changes\n useUpdateEffect(() => {\n // only when pressing the Previous or Next button\n if (!state.isFocused) {\n announce(visibleRangeDescription);\n }\n }, [visibleRangeDescription]);\n\n // Announce when the selected value changes\n let selectedDateDescription = useSelectedDateDescription(state);\n useUpdateEffect(() => {\n if (selectedDateDescription) {\n announce(selectedDateDescription, 'polite', 4000);\n }\n // handle an update to the caption that describes the currently selected range, to announce the new value\n }, [selectedDateDescription]);\n\n let errorMessageId = useSlotId([\n Boolean(props.errorMessage),\n props.isInvalid,\n props.validationState\n ]);\n\n // Pass the label to the child grid elements.\n hookData.set(state, {\n ariaLabel: props['aria-label'],\n ariaLabelledBy: props['aria-labelledby'],\n errorMessageId,\n selectedDateDescription\n });\n\n // If the next or previous buttons become disabled while they are focused, move focus to the calendar body.\n let [nextFocused, setNextFocused] = useState(false);\n let nextDisabled = props.isDisabled || state.isNextVisibleRangeInvalid();\n if (nextDisabled && nextFocused) {\n setNextFocused(false);\n state.setFocused(true);\n }\n\n let [previousFocused, setPreviousFocused] = useState(false);\n let previousDisabled = props.isDisabled || state.isPreviousVisibleRangeInvalid();\n if (previousDisabled && previousFocused) {\n setPreviousFocused(false);\n state.setFocused(true);\n }\n\n let labelProps = useLabels({\n id: props['id'],\n 'aria-label': [props['aria-label'], visibleRangeDescription].filter(Boolean).join(', '),\n 'aria-labelledby': props['aria-labelledby']\n });\n\n return {\n calendarProps: mergeProps(domProps, labelProps, {\n role: 'application',\n 'aria-details': props['aria-details'] || undefined,\n 'aria-describedby': props['aria-describedby'] || undefined\n }),\n nextButtonProps: {\n onPress: () => state.focusNextPage(),\n 'aria-label': stringFormatter.format('next'),\n isDisabled: nextDisabled,\n onFocusChange: setNextFocused\n },\n prevButtonProps: {\n onPress: () => state.focusPreviousPage(),\n 'aria-label': stringFormatter.format('previous'),\n isDisabled: previousDisabled,\n onFocusChange: setPreviousFocused\n },\n errorMessageProps: {\n id: errorMessageId\n },\n title\n };\n}\n"],"names":[],"version":3,"file":"useCalendarBase.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAmCM,SAAS,0CACd,KAAuD,EACvD,KAAgE;IAEhE,IAAI,kBAAkB,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,yCAAa,EAAE;IAE9B,IAAI,QAAQ,CAAA,GAAA,wCAAyB,EACnC,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAEF,IAAI,0BAA0B,CAAA,GAAA,wCAAyB,EACrD,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAGF,+CAA+C;IAC/C,CAAA,GAAA,yCAAc,EAAE;QACd,iDAAiD;QACjD,IAAI,CAAC,MAAM,SAAS,EAClB,CAAA,GAAA,yCAAO,EAAE;IAEb,GAAG;QAAC;KAAwB;IAE5B,2CAA2C;IAC3C,IAAI,0BAA0B,CAAA,GAAA,yCAAyB,EAAE;IACzD,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,yBACF,CAAA,GAAA,yCAAO,EAAE,yBAAyB,UAAU;IAE9C,yGAAyG;IAC3G,GAAG;QAAC;KAAwB;IAE5B,IAAI,iBAAiB,CAAA,GAAA,yCAAQ,EAAE;QAC7B,QAAQ,MAAM,YAAY;QAC1B,MAAM,SAAS;QACf,MAAM,eAAe;KACtB;IAED,6CAA6C;IAC7C,CAAA,GAAA,yCAAO,EAAE,GAAG,CAAC,OAAO;QAClB,WAAW,KAAK,CAAC,aAAa;QAC9B,gBAAgB,KAAK,CAAC,kBAAkB;wBACxC;iCACA;IACF;IAEA,2GAA2G;IAC3G,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,eAAO,EAAE;IAC7C,IAAI,eAAe,MAAM,UAAU,IAAI,MAAM,yBAAyB;IACtE,IAAI,gBAAgB,aAAa;QAC/B,eAAe;QACf,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,CAAC,iBAAiB,mBAAmB,GAAG,CAAA,GAAA,eAAO,EAAE;IACrD,IAAI,mBAAmB,MAAM,UAAU,IAAI,MAAM,6BAA6B;IAC9E,IAAI,oBAAoB,iBAAiB;QACvC,mBAAmB;QACnB,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,aAAa,CAAA,GAAA,yCAAQ,EAAE;QACzB,IAAI,KAAK,CAAC,KAAK;QACf,cAAc;YAAC,KAAK,CAAC,aAAa;YAAE;SAAwB,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC;QAClF,mBAAmB,KAAK,CAAC,kBAAkB;IAC7C;IAEA,OAAO;QACL,eAAe,CAAA,GAAA,yCAAS,EAAE,UAAU,YAAY;YAC9C,MAAM;YACN,gBAAgB,KAAK,CAAC,eAAe,IAAI;YACzC,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;QACnD;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,aAAa;YAClC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,iBAAiB;YACtC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,mBAAmB;YACjB,IAAI;QACN;eACA;IACF;AACF","sources":["packages/react-aria/src/calendar/useCalendarBase.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce} from '../live-announcer/LiveAnnouncer';\nimport {AriaButtonProps} from '../button/useButton';\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {\n CalendarPropsBase,\n CalendarSelectionMode,\n CalendarState\n} from 'react-stately/useCalendarState';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {hookData, useSelectedDateDescription, useVisibleRangeDescription} from './utils';\n// @ts-ignore\nimport intlMessages from '../../intl/calendar/*.json';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {useLabels} from '../utils/useLabels';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\nimport {useSlotId} from '../utils/useId';\nimport {useState} from 'react';\nimport {useUpdateEffect} from '../utils/useUpdateEffect';\n\nexport interface CalendarAria {\n /** Props for the calendar grouping element. */\n calendarProps: DOMAttributes;\n /** Props for the next button. */\n nextButtonProps: AriaButtonProps;\n /** Props for the previous button. */\n prevButtonProps: AriaButtonProps;\n /** Props for the error message element, if any. */\n errorMessageProps: DOMAttributes;\n /** A description of the visible date range, for use in the calendar title. */\n title: string;\n}\n\nexport function useCalendarBase(\n props: CalendarPropsBase & DOMProps & AriaLabelingProps,\n state: CalendarState<CalendarSelectionMode> | RangeCalendarState\n): CalendarAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/calendar');\n let domProps = filterDOMProps(props);\n\n let title = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n false\n );\n let visibleRangeDescription = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n true\n );\n\n // Announce when the visible date range changes\n useUpdateEffect(() => {\n // only when pressing the Previous or Next button\n if (!state.isFocused) {\n announce(visibleRangeDescription);\n }\n }, [visibleRangeDescription]);\n\n // Announce when the selected value changes\n let selectedDateDescription = useSelectedDateDescription(state);\n useUpdateEffect(() => {\n if (selectedDateDescription) {\n announce(selectedDateDescription, 'polite', 4000);\n }\n // handle an update to the caption that describes the currently selected range, to announce the new value\n }, [selectedDateDescription]);\n\n let errorMessageId = useSlotId([\n Boolean(props.errorMessage),\n props.isInvalid,\n props.validationState\n ]);\n\n // Pass the label to the child grid elements.\n hookData.set(state, {\n ariaLabel: props['aria-label'],\n ariaLabelledBy: props['aria-labelledby'],\n errorMessageId,\n selectedDateDescription\n });\n\n // If the next or previous buttons become disabled while they are focused, move focus to the calendar body.\n let [nextFocused, setNextFocused] = useState(false);\n let nextDisabled = props.isDisabled || state.isNextVisibleRangeInvalid();\n if (nextDisabled && nextFocused) {\n setNextFocused(false);\n state.setFocused(true);\n }\n\n let [previousFocused, setPreviousFocused] = useState(false);\n let previousDisabled = props.isDisabled || state.isPreviousVisibleRangeInvalid();\n if (previousDisabled && previousFocused) {\n setPreviousFocused(false);\n state.setFocused(true);\n }\n\n let labelProps = useLabels({\n id: props['id'],\n 'aria-label': [props['aria-label'], visibleRangeDescription].filter(Boolean).join(', '),\n 'aria-labelledby': props['aria-labelledby']\n });\n\n return {\n calendarProps: mergeProps(domProps, labelProps, {\n role: 'application',\n 'aria-details': props['aria-details'] || undefined,\n 'aria-describedby': props['aria-describedby'] || undefined\n }),\n nextButtonProps: {\n onPress: () => state.focusNextPage(),\n 'aria-label': stringFormatter.format('next'),\n isDisabled: nextDisabled,\n onFocusChange: setNextFocused\n },\n prevButtonProps: {\n onPress: () => state.focusPreviousPage(),\n 'aria-label': stringFormatter.format('previous'),\n isDisabled: previousDisabled,\n onFocusChange: setPreviousFocused\n },\n errorMessageProps: {\n id: errorMessageId\n },\n title\n };\n}\n"],"names":[],"version":3,"file":"useCalendarBase.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAkCM,SAAS,0CACd,KAAuD,EACvD,KAAgE;IAEhE,IAAI,kBAAkB,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,yCAAa,EAAE;IAE9B,IAAI,QAAQ,CAAA,GAAA,wCAAyB,EACnC,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAEF,IAAI,0BAA0B,CAAA,GAAA,wCAAyB,EACrD,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAGF,+CAA+C;IAC/C,CAAA,GAAA,yCAAc,EAAE;QACd,iDAAiD;QACjD,IAAI,CAAC,MAAM,SAAS,EAClB,CAAA,GAAA,yCAAO,EAAE;IAEb,GAAG;QAAC;KAAwB;IAE5B,2CAA2C;IAC3C,IAAI,0BAA0B,CAAA,GAAA,yCAAyB,EAAE;IACzD,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,yBACF,CAAA,GAAA,yCAAO,EAAE,yBAAyB,UAAU;IAE9C,yGAAyG;IAC3G,GAAG;QAAC;KAAwB;IAE5B,IAAI,iBAAiB,CAAA,GAAA,yCAAQ,EAAE;QAC7B,QAAQ,MAAM,YAAY;QAC1B,MAAM,SAAS;QACf,MAAM,eAAe;KACtB;IAED,6CAA6C;IAC7C,CAAA,GAAA,yCAAO,EAAE,GAAG,CAAC,OAAO;QAClB,WAAW,KAAK,CAAC,aAAa;QAC9B,gBAAgB,KAAK,CAAC,kBAAkB;wBACxC;iCACA;IACF;IAEA,2GAA2G;IAC3G,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,eAAO,EAAE;IAC7C,IAAI,eAAe,MAAM,UAAU,IAAI,MAAM,yBAAyB;IACtE,IAAI,gBAAgB,aAAa;QAC/B,eAAe;QACf,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,CAAC,iBAAiB,mBAAmB,GAAG,CAAA,GAAA,eAAO,EAAE;IACrD,IAAI,mBAAmB,MAAM,UAAU,IAAI,MAAM,6BAA6B;IAC9E,IAAI,oBAAoB,iBAAiB;QACvC,mBAAmB;QACnB,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,aAAa,CAAA,GAAA,yCAAQ,EAAE;QACzB,IAAI,KAAK,CAAC,KAAK;QACf,cAAc;YAAC,KAAK,CAAC,aAAa;YAAE;SAAwB,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC;QAClF,mBAAmB,KAAK,CAAC,kBAAkB;IAC7C;IAEA,OAAO;QACL,eAAe,CAAA,GAAA,yCAAS,EAAE,UAAU,YAAY;YAC9C,MAAM;YACN,gBAAgB,KAAK,CAAC,eAAe,IAAI;YACzC,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;QACnD;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,aAAa;YAClC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,iBAAiB;YACtC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,mBAAmB;YACjB,IAAI;QACN;eACA;IACF;AACF","sources":["packages/react-aria/src/calendar/useCalendarBase.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce} from '../live-announcer/LiveAnnouncer';\nimport {AriaButtonProps} from '../button/useButton';\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {\n CalendarPropsBase,\n CalendarSelectionMode,\n CalendarState\n} from 'react-stately/useCalendarState';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {hookData, useSelectedDateDescription, useVisibleRangeDescription} from './utils';\nimport intlMessages from '../../intl/calendar/*.json';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {useLabels} from '../utils/useLabels';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\nimport {useSlotId} from '../utils/useId';\nimport {useState} from 'react';\nimport {useUpdateEffect} from '../utils/useUpdateEffect';\n\nexport interface CalendarAria {\n /** Props for the calendar grouping element. */\n calendarProps: DOMAttributes;\n /** Props for the next button. */\n nextButtonProps: AriaButtonProps;\n /** Props for the previous button. */\n prevButtonProps: AriaButtonProps;\n /** Props for the error message element, if any. */\n errorMessageProps: DOMAttributes;\n /** A description of the visible date range, for use in the calendar title. */\n title: string;\n}\n\nexport function useCalendarBase(\n props: CalendarPropsBase & DOMProps & AriaLabelingProps,\n state: CalendarState<CalendarSelectionMode> | RangeCalendarState\n): CalendarAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/calendar');\n let domProps = filterDOMProps(props);\n\n let title = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n false\n );\n let visibleRangeDescription = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n true\n );\n\n // Announce when the visible date range changes\n useUpdateEffect(() => {\n // only when pressing the Previous or Next button\n if (!state.isFocused) {\n announce(visibleRangeDescription);\n }\n }, [visibleRangeDescription]);\n\n // Announce when the selected value changes\n let selectedDateDescription = useSelectedDateDescription(state);\n useUpdateEffect(() => {\n if (selectedDateDescription) {\n announce(selectedDateDescription, 'polite', 4000);\n }\n // handle an update to the caption that describes the currently selected range, to announce the new value\n }, [selectedDateDescription]);\n\n let errorMessageId = useSlotId([\n Boolean(props.errorMessage),\n props.isInvalid,\n props.validationState\n ]);\n\n // Pass the label to the child grid elements.\n hookData.set(state, {\n ariaLabel: props['aria-label'],\n ariaLabelledBy: props['aria-labelledby'],\n errorMessageId,\n selectedDateDescription\n });\n\n // If the next or previous buttons become disabled while they are focused, move focus to the calendar body.\n let [nextFocused, setNextFocused] = useState(false);\n let nextDisabled = props.isDisabled || state.isNextVisibleRangeInvalid();\n if (nextDisabled && nextFocused) {\n setNextFocused(false);\n state.setFocused(true);\n }\n\n let [previousFocused, setPreviousFocused] = useState(false);\n let previousDisabled = props.isDisabled || state.isPreviousVisibleRangeInvalid();\n if (previousDisabled && previousFocused) {\n setPreviousFocused(false);\n state.setFocused(true);\n }\n\n let labelProps = useLabels({\n id: props['id'],\n 'aria-label': [props['aria-label'], visibleRangeDescription].filter(Boolean).join(', '),\n 'aria-labelledby': props['aria-labelledby']\n });\n\n return {\n calendarProps: mergeProps(domProps, labelProps, {\n role: 'application',\n 'aria-details': props['aria-details'] || undefined,\n 'aria-describedby': props['aria-describedby'] || undefined\n }),\n nextButtonProps: {\n onPress: () => state.focusNextPage(),\n 'aria-label': stringFormatter.format('next'),\n isDisabled: nextDisabled,\n onFocusChange: setNextFocused\n },\n prevButtonProps: {\n onPress: () => state.focusPreviousPage(),\n 'aria-label': stringFormatter.format('previous'),\n isDisabled: previousDisabled,\n onFocusChange: setPreviousFocused\n },\n errorMessageProps: {\n id: errorMessageId\n },\n title\n };\n}\n"],"names":[],"version":3,"file":"useCalendarBase.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAmCM,SAAS,0CACd,KAAuD,EACvD,KAAgE;IAEhE,IAAI,kBAAkB,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,yCAAa,EAAE;IAE9B,IAAI,QAAQ,CAAA,GAAA,wCAAyB,EACnC,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAEF,IAAI,0BAA0B,CAAA,GAAA,wCAAyB,EACrD,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAGF,+CAA+C;IAC/C,CAAA,GAAA,yCAAc,EAAE;QACd,iDAAiD;QACjD,IAAI,CAAC,MAAM,SAAS,EAClB,CAAA,GAAA,yCAAO,EAAE;IAEb,GAAG;QAAC;KAAwB;IAE5B,2CAA2C;IAC3C,IAAI,0BAA0B,CAAA,GAAA,yCAAyB,EAAE;IACzD,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,yBACF,CAAA,GAAA,yCAAO,EAAE,yBAAyB,UAAU;IAE9C,yGAAyG;IAC3G,GAAG;QAAC;KAAwB;IAE5B,IAAI,iBAAiB,CAAA,GAAA,yCAAQ,EAAE;QAC7B,QAAQ,MAAM,YAAY;QAC1B,MAAM,SAAS;QACf,MAAM,eAAe;KACtB;IAED,6CAA6C;IAC7C,CAAA,GAAA,yCAAO,EAAE,GAAG,CAAC,OAAO;QAClB,WAAW,KAAK,CAAC,aAAa;QAC9B,gBAAgB,KAAK,CAAC,kBAAkB;wBACxC;iCACA;IACF;IAEA,2GAA2G;IAC3G,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,eAAO,EAAE;IAC7C,IAAI,eAAe,MAAM,UAAU,IAAI,MAAM,yBAAyB;IACtE,IAAI,gBAAgB,aAAa;QAC/B,eAAe;QACf,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,CAAC,iBAAiB,mBAAmB,GAAG,CAAA,GAAA,eAAO,EAAE;IACrD,IAAI,mBAAmB,MAAM,UAAU,IAAI,MAAM,6BAA6B;IAC9E,IAAI,oBAAoB,iBAAiB;QACvC,mBAAmB;QACnB,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,aAAa,CAAA,GAAA,yCAAQ,EAAE;QACzB,IAAI,KAAK,CAAC,KAAK;QACf,cAAc;YAAC,KAAK,CAAC,aAAa;YAAE;SAAwB,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC;QAClF,mBAAmB,KAAK,CAAC,kBAAkB;IAC7C;IAEA,OAAO;QACL,eAAe,CAAA,GAAA,yCAAS,EAAE,UAAU,YAAY;YAC9C,MAAM;YACN,gBAAgB,KAAK,CAAC,eAAe,IAAI;YACzC,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;QACnD;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,aAAa;YAClC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,iBAAiB;YACtC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,mBAAmB;YACjB,IAAI;QACN;eACA;IACF;AACF","sources":["packages/react-aria/src/calendar/useCalendarBase.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce} from '../live-announcer/LiveAnnouncer';\nimport {AriaButtonProps} from '../button/useButton';\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {\n CalendarPropsBase,\n CalendarSelectionMode,\n CalendarState\n} from 'react-stately/useCalendarState';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {hookData, useSelectedDateDescription, useVisibleRangeDescription} from './utils';\n// @ts-ignore\nimport intlMessages from '../../intl/calendar/*.json';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {useLabels} from '../utils/useLabels';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\nimport {useSlotId} from '../utils/useId';\nimport {useState} from 'react';\nimport {useUpdateEffect} from '../utils/useUpdateEffect';\n\nexport interface CalendarAria {\n /** Props for the calendar grouping element. */\n calendarProps: DOMAttributes;\n /** Props for the next button. */\n nextButtonProps: AriaButtonProps;\n /** Props for the previous button. */\n prevButtonProps: AriaButtonProps;\n /** Props for the error message element, if any. */\n errorMessageProps: DOMAttributes;\n /** A description of the visible date range, for use in the calendar title. */\n title: string;\n}\n\nexport function useCalendarBase(\n props: CalendarPropsBase & DOMProps & AriaLabelingProps,\n state: CalendarState<CalendarSelectionMode> | RangeCalendarState\n): CalendarAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/calendar');\n let domProps = filterDOMProps(props);\n\n let title = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n false\n );\n let visibleRangeDescription = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n true\n );\n\n // Announce when the visible date range changes\n useUpdateEffect(() => {\n // only when pressing the Previous or Next button\n if (!state.isFocused) {\n announce(visibleRangeDescription);\n }\n }, [visibleRangeDescription]);\n\n // Announce when the selected value changes\n let selectedDateDescription = useSelectedDateDescription(state);\n useUpdateEffect(() => {\n if (selectedDateDescription) {\n announce(selectedDateDescription, 'polite', 4000);\n }\n // handle an update to the caption that describes the currently selected range, to announce the new value\n }, [selectedDateDescription]);\n\n let errorMessageId = useSlotId([\n Boolean(props.errorMessage),\n props.isInvalid,\n props.validationState\n ]);\n\n // Pass the label to the child grid elements.\n hookData.set(state, {\n ariaLabel: props['aria-label'],\n ariaLabelledBy: props['aria-labelledby'],\n errorMessageId,\n selectedDateDescription\n });\n\n // If the next or previous buttons become disabled while they are focused, move focus to the calendar body.\n let [nextFocused, setNextFocused] = useState(false);\n let nextDisabled = props.isDisabled || state.isNextVisibleRangeInvalid();\n if (nextDisabled && nextFocused) {\n setNextFocused(false);\n state.setFocused(true);\n }\n\n let [previousFocused, setPreviousFocused] = useState(false);\n let previousDisabled = props.isDisabled || state.isPreviousVisibleRangeInvalid();\n if (previousDisabled && previousFocused) {\n setPreviousFocused(false);\n state.setFocused(true);\n }\n\n let labelProps = useLabels({\n id: props['id'],\n 'aria-label': [props['aria-label'], visibleRangeDescription].filter(Boolean).join(', '),\n 'aria-labelledby': props['aria-labelledby']\n });\n\n return {\n calendarProps: mergeProps(domProps, labelProps, {\n role: 'application',\n 'aria-details': props['aria-details'] || undefined,\n 'aria-describedby': props['aria-describedby'] || undefined\n }),\n nextButtonProps: {\n onPress: () => state.focusNextPage(),\n 'aria-label': stringFormatter.format('next'),\n isDisabled: nextDisabled,\n onFocusChange: setNextFocused\n },\n prevButtonProps: {\n onPress: () => state.focusPreviousPage(),\n 'aria-label': stringFormatter.format('previous'),\n isDisabled: previousDisabled,\n onFocusChange: setPreviousFocused\n },\n errorMessageProps: {\n id: errorMessageId\n },\n title\n };\n}\n"],"names":[],"version":3,"file":"useCalendarBase.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAkCM,SAAS,0CACd,KAAuD,EACvD,KAAgE;IAEhE,IAAI,kBAAkB,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,yCAAa,EAAE;IAE9B,IAAI,QAAQ,CAAA,GAAA,wCAAyB,EACnC,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAEF,IAAI,0BAA0B,CAAA,GAAA,wCAAyB,EACrD,MAAM,YAAY,CAAC,KAAK,EACxB,MAAM,YAAY,CAAC,GAAG,EACtB,MAAM,QAAQ,EACd;IAGF,+CAA+C;IAC/C,CAAA,GAAA,yCAAc,EAAE;QACd,iDAAiD;QACjD,IAAI,CAAC,MAAM,SAAS,EAClB,CAAA,GAAA,yCAAO,EAAE;IAEb,GAAG;QAAC;KAAwB;IAE5B,2CAA2C;IAC3C,IAAI,0BAA0B,CAAA,GAAA,yCAAyB,EAAE;IACzD,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,yBACF,CAAA,GAAA,yCAAO,EAAE,yBAAyB,UAAU;IAE9C,yGAAyG;IAC3G,GAAG;QAAC;KAAwB;IAE5B,IAAI,iBAAiB,CAAA,GAAA,yCAAQ,EAAE;QAC7B,QAAQ,MAAM,YAAY;QAC1B,MAAM,SAAS;QACf,MAAM,eAAe;KACtB;IAED,6CAA6C;IAC7C,CAAA,GAAA,yCAAO,EAAE,GAAG,CAAC,OAAO;QAClB,WAAW,KAAK,CAAC,aAAa;QAC9B,gBAAgB,KAAK,CAAC,kBAAkB;wBACxC;iCACA;IACF;IAEA,2GAA2G;IAC3G,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,eAAO,EAAE;IAC7C,IAAI,eAAe,MAAM,UAAU,IAAI,MAAM,yBAAyB;IACtE,IAAI,gBAAgB,aAAa;QAC/B,eAAe;QACf,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,CAAC,iBAAiB,mBAAmB,GAAG,CAAA,GAAA,eAAO,EAAE;IACrD,IAAI,mBAAmB,MAAM,UAAU,IAAI,MAAM,6BAA6B;IAC9E,IAAI,oBAAoB,iBAAiB;QACvC,mBAAmB;QACnB,MAAM,UAAU,CAAC;IACnB;IAEA,IAAI,aAAa,CAAA,GAAA,yCAAQ,EAAE;QACzB,IAAI,KAAK,CAAC,KAAK;QACf,cAAc;YAAC,KAAK,CAAC,aAAa;YAAE;SAAwB,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC;QAClF,mBAAmB,KAAK,CAAC,kBAAkB;IAC7C;IAEA,OAAO;QACL,eAAe,CAAA,GAAA,yCAAS,EAAE,UAAU,YAAY;YAC9C,MAAM;YACN,gBAAgB,KAAK,CAAC,eAAe,IAAI;YACzC,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;QACnD;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,aAAa;YAClC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,iBAAiB;YACf,SAAS,IAAM,MAAM,iBAAiB;YACtC,cAAc,gBAAgB,MAAM,CAAC;YACrC,YAAY;YACZ,eAAe;QACjB;QACA,mBAAmB;YACjB,IAAI;QACN;eACA;IACF;AACF","sources":["packages/react-aria/src/calendar/useCalendarBase.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {announce} from '../live-announcer/LiveAnnouncer';\nimport {AriaButtonProps} from '../button/useButton';\nimport {AriaLabelingProps, DOMAttributes, DOMProps} from '@react-types/shared';\nimport {\n CalendarPropsBase,\n CalendarSelectionMode,\n CalendarState\n} from 'react-stately/useCalendarState';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {hookData, useSelectedDateDescription, useVisibleRangeDescription} from './utils';\nimport intlMessages from '../../intl/calendar/*.json';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {useLabels} from '../utils/useLabels';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\nimport {useSlotId} from '../utils/useId';\nimport {useState} from 'react';\nimport {useUpdateEffect} from '../utils/useUpdateEffect';\n\nexport interface CalendarAria {\n /** Props for the calendar grouping element. */\n calendarProps: DOMAttributes;\n /** Props for the next button. */\n nextButtonProps: AriaButtonProps;\n /** Props for the previous button. */\n prevButtonProps: AriaButtonProps;\n /** Props for the error message element, if any. */\n errorMessageProps: DOMAttributes;\n /** A description of the visible date range, for use in the calendar title. */\n title: string;\n}\n\nexport function useCalendarBase(\n props: CalendarPropsBase & DOMProps & AriaLabelingProps,\n state: CalendarState<CalendarSelectionMode> | RangeCalendarState\n): CalendarAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/calendar');\n let domProps = filterDOMProps(props);\n\n let title = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n false\n );\n let visibleRangeDescription = useVisibleRangeDescription(\n state.visibleRange.start,\n state.visibleRange.end,\n state.timeZone,\n true\n );\n\n // Announce when the visible date range changes\n useUpdateEffect(() => {\n // only when pressing the Previous or Next button\n if (!state.isFocused) {\n announce(visibleRangeDescription);\n }\n }, [visibleRangeDescription]);\n\n // Announce when the selected value changes\n let selectedDateDescription = useSelectedDateDescription(state);\n useUpdateEffect(() => {\n if (selectedDateDescription) {\n announce(selectedDateDescription, 'polite', 4000);\n }\n // handle an update to the caption that describes the currently selected range, to announce the new value\n }, [selectedDateDescription]);\n\n let errorMessageId = useSlotId([\n Boolean(props.errorMessage),\n props.isInvalid,\n props.validationState\n ]);\n\n // Pass the label to the child grid elements.\n hookData.set(state, {\n ariaLabel: props['aria-label'],\n ariaLabelledBy: props['aria-labelledby'],\n errorMessageId,\n selectedDateDescription\n });\n\n // If the next or previous buttons become disabled while they are focused, move focus to the calendar body.\n let [nextFocused, setNextFocused] = useState(false);\n let nextDisabled = props.isDisabled || state.isNextVisibleRangeInvalid();\n if (nextDisabled && nextFocused) {\n setNextFocused(false);\n state.setFocused(true);\n }\n\n let [previousFocused, setPreviousFocused] = useState(false);\n let previousDisabled = props.isDisabled || state.isPreviousVisibleRangeInvalid();\n if (previousDisabled && previousFocused) {\n setPreviousFocused(false);\n state.setFocused(true);\n }\n\n let labelProps = useLabels({\n id: props['id'],\n 'aria-label': [props['aria-label'], visibleRangeDescription].filter(Boolean).join(', '),\n 'aria-labelledby': props['aria-labelledby']\n });\n\n return {\n calendarProps: mergeProps(domProps, labelProps, {\n role: 'application',\n 'aria-details': props['aria-details'] || undefined,\n 'aria-describedby': props['aria-describedby'] || undefined\n }),\n nextButtonProps: {\n onPress: () => state.focusNextPage(),\n 'aria-label': stringFormatter.format('next'),\n isDisabled: nextDisabled,\n onFocusChange: setNextFocused\n },\n prevButtonProps: {\n onPress: () => state.focusPreviousPage(),\n 'aria-label': stringFormatter.format('previous'),\n isDisabled: previousDisabled,\n onFocusChange: setPreviousFocused\n },\n errorMessageProps: {\n id: errorMessageId\n },\n title\n };\n}\n"],"names":[],"version":3,"file":"useCalendarBase.mjs.map"}
@@ -76,6 +76,7 @@ function $14e7b9c4780fca1b$export$136073280381448e(props, state, ref) {
76
76
  // For performance, reuse the same date object as before if the new date prop is the same.
77
77
  // This allows subsequent useMemo results to be reused.
78
78
  date = (0, $a6926d440356cac7$exports.useDeepMemo)(date, (0, $9XoUG$internationalizeddate.isEqualDay));
79
+ // oxlint-disable-next-line react/react-compiler
79
80
  let nativeDate = (0, $9XoUG$react.useMemo)(()=>date.toDate(state.timeZone), [
80
81
  date,
81
82
  state.timeZone
@@ -103,8 +104,10 @@ function $14e7b9c4780fca1b$export$136073280381448e(props, state, ref) {
103
104
  dateFormatter,
104
105
  nativeDate,
105
106
  stringFormatter,
107
+ // oxlint-disable-next-line react/react-compiler
106
108
  isSelected,
107
109
  isDateToday,
110
+ // oxlint-disable-next-line react/react-compiler
108
111
  date,
109
112
  state,
110
113
  selectedDateDescription