react-aria-components 1.12.2 → 1.14.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 (370) hide show
  1. package/dist/Autocomplete.main.js +3 -3
  2. package/dist/Autocomplete.main.js.map +1 -1
  3. package/dist/Autocomplete.mjs +3 -3
  4. package/dist/Autocomplete.module.js +3 -3
  5. package/dist/Autocomplete.module.js.map +1 -1
  6. package/dist/Breadcrumbs.main.js +5 -3
  7. package/dist/Breadcrumbs.main.js.map +1 -1
  8. package/dist/Breadcrumbs.mjs +5 -3
  9. package/dist/Breadcrumbs.module.js +5 -3
  10. package/dist/Breadcrumbs.module.js.map +1 -1
  11. package/dist/Button.main.js +5 -11
  12. package/dist/Button.main.js.map +1 -1
  13. package/dist/Button.mjs +5 -11
  14. package/dist/Button.module.js +5 -11
  15. package/dist/Button.module.js.map +1 -1
  16. package/dist/Calendar.main.js +2 -2
  17. package/dist/Calendar.main.js.map +1 -1
  18. package/dist/Calendar.mjs +2 -2
  19. package/dist/Calendar.module.js +2 -2
  20. package/dist/Calendar.module.js.map +1 -1
  21. package/dist/Checkbox.main.js.map +1 -1
  22. package/dist/Checkbox.module.js.map +1 -1
  23. package/dist/Collection.main.js +1 -1
  24. package/dist/Collection.main.js.map +1 -1
  25. package/dist/Collection.mjs +1 -1
  26. package/dist/Collection.module.js +1 -1
  27. package/dist/Collection.module.js.map +1 -1
  28. package/dist/ColorArea.main.js +1 -1
  29. package/dist/ColorArea.main.js.map +1 -1
  30. package/dist/ColorArea.mjs +1 -1
  31. package/dist/ColorArea.module.js +1 -1
  32. package/dist/ColorArea.module.js.map +1 -1
  33. package/dist/ColorField.main.js +1 -1
  34. package/dist/ColorField.main.js.map +1 -1
  35. package/dist/ColorField.mjs +1 -1
  36. package/dist/ColorField.module.js +1 -1
  37. package/dist/ColorField.module.js.map +1 -1
  38. package/dist/ColorPicker.main.js +1 -1
  39. package/dist/ColorPicker.main.js.map +1 -1
  40. package/dist/ColorPicker.mjs +1 -1
  41. package/dist/ColorPicker.module.js +1 -1
  42. package/dist/ColorPicker.module.js.map +1 -1
  43. package/dist/ColorSlider.main.js +1 -1
  44. package/dist/ColorSlider.main.js.map +1 -1
  45. package/dist/ColorSlider.mjs +1 -1
  46. package/dist/ColorSlider.module.js +1 -1
  47. package/dist/ColorSlider.module.js.map +1 -1
  48. package/dist/ColorSwatch.main.js.map +1 -1
  49. package/dist/ColorSwatch.module.js.map +1 -1
  50. package/dist/ColorSwatchPicker.main.js +1 -1
  51. package/dist/ColorSwatchPicker.main.js.map +1 -1
  52. package/dist/ColorSwatchPicker.mjs +1 -1
  53. package/dist/ColorSwatchPicker.module.js +1 -1
  54. package/dist/ColorSwatchPicker.module.js.map +1 -1
  55. package/dist/ColorThumb.main.js.map +1 -1
  56. package/dist/ColorThumb.module.js.map +1 -1
  57. package/dist/ColorWheel.main.js +1 -1
  58. package/dist/ColorWheel.main.js.map +1 -1
  59. package/dist/ColorWheel.mjs +1 -1
  60. package/dist/ColorWheel.module.js +1 -1
  61. package/dist/ColorWheel.module.js.map +1 -1
  62. package/dist/ComboBox.main.js.map +1 -1
  63. package/dist/ComboBox.module.js.map +1 -1
  64. package/dist/DateField.main.js +15 -9
  65. package/dist/DateField.main.js.map +1 -1
  66. package/dist/DateField.mjs +15 -9
  67. package/dist/DateField.module.js +15 -9
  68. package/dist/DateField.module.js.map +1 -1
  69. package/dist/DatePicker.main.js +6 -2
  70. package/dist/DatePicker.main.js.map +1 -1
  71. package/dist/DatePicker.mjs +6 -2
  72. package/dist/DatePicker.module.js +6 -2
  73. package/dist/DatePicker.module.js.map +1 -1
  74. package/dist/Dialog.main.js.map +1 -1
  75. package/dist/Dialog.module.js.map +1 -1
  76. package/dist/Disclosure.main.js +2 -1
  77. package/dist/Disclosure.main.js.map +1 -1
  78. package/dist/Disclosure.mjs +2 -1
  79. package/dist/Disclosure.module.js +2 -1
  80. package/dist/Disclosure.module.js.map +1 -1
  81. package/dist/DragAndDrop.main.js.map +1 -1
  82. package/dist/DragAndDrop.module.js.map +1 -1
  83. package/dist/DropZone.main.js.map +1 -1
  84. package/dist/DropZone.module.js.map +1 -1
  85. package/dist/FieldError.main.js.map +1 -1
  86. package/dist/FieldError.module.js.map +1 -1
  87. package/dist/FileTrigger.main.js +1 -0
  88. package/dist/FileTrigger.main.js.map +1 -1
  89. package/dist/FileTrigger.mjs +1 -0
  90. package/dist/FileTrigger.module.js +1 -0
  91. package/dist/FileTrigger.module.js.map +1 -1
  92. package/dist/Form.main.js.map +1 -1
  93. package/dist/Form.module.js.map +1 -1
  94. package/dist/GridList.main.js +25 -22
  95. package/dist/GridList.main.js.map +1 -1
  96. package/dist/GridList.mjs +26 -24
  97. package/dist/GridList.module.js +26 -24
  98. package/dist/GridList.module.js.map +1 -1
  99. package/dist/Group.main.js +5 -4
  100. package/dist/Group.main.js.map +1 -1
  101. package/dist/Group.mjs +5 -4
  102. package/dist/Group.module.js +5 -4
  103. package/dist/Group.module.js.map +1 -1
  104. package/dist/HiddenDateInput.main.js +5 -3
  105. package/dist/HiddenDateInput.main.js.map +1 -1
  106. package/dist/HiddenDateInput.mjs +5 -3
  107. package/dist/HiddenDateInput.module.js +5 -3
  108. package/dist/HiddenDateInput.module.js.map +1 -1
  109. package/dist/Input.main.js +4 -1
  110. package/dist/Input.main.js.map +1 -1
  111. package/dist/Input.mjs +4 -1
  112. package/dist/Input.module.js +4 -1
  113. package/dist/Input.module.js.map +1 -1
  114. package/dist/Link.main.js.map +1 -1
  115. package/dist/Link.module.js.map +1 -1
  116. package/dist/ListBox.main.js +20 -7
  117. package/dist/ListBox.main.js.map +1 -1
  118. package/dist/ListBox.mjs +21 -8
  119. package/dist/ListBox.module.js +21 -8
  120. package/dist/ListBox.module.js.map +1 -1
  121. package/dist/Menu.main.js +17 -7
  122. package/dist/Menu.main.js.map +1 -1
  123. package/dist/Menu.mjs +17 -7
  124. package/dist/Menu.module.js +17 -7
  125. package/dist/Menu.module.js.map +1 -1
  126. package/dist/Meter.main.js.map +1 -1
  127. package/dist/Meter.module.js.map +1 -1
  128. package/dist/Modal.main.js +9 -1
  129. package/dist/Modal.main.js.map +1 -1
  130. package/dist/Modal.mjs +10 -2
  131. package/dist/Modal.module.js +10 -2
  132. package/dist/Modal.module.js.map +1 -1
  133. package/dist/NumberField.main.js +2 -1
  134. package/dist/NumberField.main.js.map +1 -1
  135. package/dist/NumberField.mjs +2 -1
  136. package/dist/NumberField.module.js +2 -1
  137. package/dist/NumberField.module.js.map +1 -1
  138. package/dist/OverlayArrow.main.js.map +1 -1
  139. package/dist/OverlayArrow.module.js.map +1 -1
  140. package/dist/Popover.main.js.map +1 -1
  141. package/dist/Popover.module.js.map +1 -1
  142. package/dist/ProgressBar.main.js.map +1 -1
  143. package/dist/ProgressBar.module.js.map +1 -1
  144. package/dist/RSPContexts.main.js +4 -0
  145. package/dist/RSPContexts.main.js.map +1 -1
  146. package/dist/RSPContexts.mjs +3 -1
  147. package/dist/RSPContexts.module.js +3 -1
  148. package/dist/RSPContexts.module.js.map +1 -1
  149. package/dist/RadioGroup.main.js +10 -2
  150. package/dist/RadioGroup.main.js.map +1 -1
  151. package/dist/RadioGroup.mjs +10 -2
  152. package/dist/RadioGroup.module.js +10 -2
  153. package/dist/RadioGroup.module.js.map +1 -1
  154. package/dist/SearchField.main.js +7 -3
  155. package/dist/SearchField.main.js.map +1 -1
  156. package/dist/SearchField.mjs +7 -3
  157. package/dist/SearchField.module.js +7 -3
  158. package/dist/SearchField.module.js.map +1 -1
  159. package/dist/Select.main.js +62 -22
  160. package/dist/Select.main.js.map +1 -1
  161. package/dist/Select.mjs +65 -25
  162. package/dist/Select.module.js +65 -25
  163. package/dist/Select.module.js.map +1 -1
  164. package/dist/SelectionIndicator.main.js +45 -0
  165. package/dist/SelectionIndicator.main.js.map +1 -0
  166. package/dist/SelectionIndicator.mjs +35 -0
  167. package/dist/SelectionIndicator.module.js +35 -0
  168. package/dist/SelectionIndicator.module.js.map +1 -0
  169. package/dist/Separator.main.js.map +1 -1
  170. package/dist/Separator.module.js.map +1 -1
  171. package/dist/SharedElementTransition.main.js +139 -0
  172. package/dist/SharedElementTransition.main.js.map +1 -0
  173. package/dist/SharedElementTransition.mjs +129 -0
  174. package/dist/SharedElementTransition.module.js +129 -0
  175. package/dist/SharedElementTransition.module.js.map +1 -0
  176. package/dist/Slider.main.js.map +1 -1
  177. package/dist/Slider.module.js.map +1 -1
  178. package/dist/Switch.main.js.map +1 -1
  179. package/dist/Switch.module.js.map +1 -1
  180. package/dist/Table.main.js +142 -53
  181. package/dist/Table.main.js.map +1 -1
  182. package/dist/Table.mjs +143 -54
  183. package/dist/Table.module.js +143 -54
  184. package/dist/Table.module.js.map +1 -1
  185. package/dist/Tabs.main.js +86 -9
  186. package/dist/Tabs.main.js.map +1 -1
  187. package/dist/Tabs.mjs +88 -12
  188. package/dist/Tabs.module.js +88 -12
  189. package/dist/Tabs.module.js.map +1 -1
  190. package/dist/TagGroup.main.js +29 -17
  191. package/dist/TagGroup.main.js.map +1 -1
  192. package/dist/TagGroup.mjs +29 -17
  193. package/dist/TagGroup.module.js +29 -17
  194. package/dist/TagGroup.module.js.map +1 -1
  195. package/dist/TextArea.main.js.map +1 -1
  196. package/dist/TextArea.module.js.map +1 -1
  197. package/dist/TextField.main.js +2 -2
  198. package/dist/TextField.main.js.map +1 -1
  199. package/dist/TextField.mjs +2 -2
  200. package/dist/TextField.module.js +2 -2
  201. package/dist/TextField.module.js.map +1 -1
  202. package/dist/Toast.main.js.map +1 -1
  203. package/dist/Toast.module.js.map +1 -1
  204. package/dist/ToggleButton.main.js +7 -1
  205. package/dist/ToggleButton.main.js.map +1 -1
  206. package/dist/ToggleButton.mjs +7 -1
  207. package/dist/ToggleButton.module.js +7 -1
  208. package/dist/ToggleButton.module.js.map +1 -1
  209. package/dist/ToggleButtonGroup.main.js +4 -1
  210. package/dist/ToggleButtonGroup.main.js.map +1 -1
  211. package/dist/ToggleButtonGroup.mjs +4 -1
  212. package/dist/ToggleButtonGroup.module.js +4 -1
  213. package/dist/ToggleButtonGroup.module.js.map +1 -1
  214. package/dist/Toolbar.main.js.map +1 -1
  215. package/dist/Toolbar.module.js.map +1 -1
  216. package/dist/Tooltip.main.js.map +1 -1
  217. package/dist/Tooltip.module.js.map +1 -1
  218. package/dist/Tree.main.js +16 -4
  219. package/dist/Tree.main.js.map +1 -1
  220. package/dist/Tree.mjs +16 -4
  221. package/dist/Tree.module.js +16 -4
  222. package/dist/Tree.module.js.map +1 -1
  223. package/dist/import.mjs +13 -7
  224. package/dist/main.js +23 -3
  225. package/dist/main.js.map +1 -1
  226. package/dist/module.js +13 -7
  227. package/dist/module.js.map +1 -1
  228. package/dist/types.d.ts +663 -58
  229. package/dist/types.d.ts.map +1 -1
  230. package/dist/utils.main.js +0 -1
  231. package/dist/utils.main.js.map +1 -1
  232. package/dist/utils.mjs +0 -1
  233. package/dist/utils.module.js +0 -1
  234. package/dist/utils.module.js.map +1 -1
  235. package/i18n/ar-AE.js +1 -1
  236. package/i18n/ar-AE.mjs +1 -1
  237. package/i18n/bg-BG.js +1 -1
  238. package/i18n/bg-BG.mjs +1 -1
  239. package/i18n/cs-CZ.js +1 -1
  240. package/i18n/cs-CZ.mjs +1 -1
  241. package/i18n/da-DK.js +1 -1
  242. package/i18n/da-DK.mjs +1 -1
  243. package/i18n/de-DE.js +1 -1
  244. package/i18n/de-DE.mjs +1 -1
  245. package/i18n/el-GR.js +1 -1
  246. package/i18n/el-GR.mjs +1 -1
  247. package/i18n/en-US.js +1 -1
  248. package/i18n/en-US.mjs +1 -1
  249. package/i18n/es-ES.js +1 -1
  250. package/i18n/es-ES.mjs +1 -1
  251. package/i18n/et-EE.js +1 -1
  252. package/i18n/et-EE.mjs +1 -1
  253. package/i18n/fi-FI.js +1 -1
  254. package/i18n/fi-FI.mjs +1 -1
  255. package/i18n/fr-FR.js +1 -1
  256. package/i18n/fr-FR.mjs +1 -1
  257. package/i18n/he-IL.js +1 -1
  258. package/i18n/he-IL.mjs +1 -1
  259. package/i18n/hr-HR.js +1 -1
  260. package/i18n/hr-HR.mjs +1 -1
  261. package/i18n/hu-HU.js +1 -1
  262. package/i18n/hu-HU.mjs +1 -1
  263. package/i18n/index.js +67 -67
  264. package/i18n/index.mjs +67 -67
  265. package/i18n/it-IT.js +1 -1
  266. package/i18n/it-IT.mjs +1 -1
  267. package/i18n/ja-JP.js +1 -1
  268. package/i18n/ja-JP.mjs +1 -1
  269. package/i18n/ko-KR.js +1 -1
  270. package/i18n/ko-KR.mjs +1 -1
  271. package/i18n/lt-LT.js +1 -1
  272. package/i18n/lt-LT.mjs +1 -1
  273. package/i18n/lv-LV.js +1 -1
  274. package/i18n/lv-LV.mjs +1 -1
  275. package/i18n/nb-NO.js +1 -1
  276. package/i18n/nb-NO.mjs +1 -1
  277. package/i18n/nl-NL.js +1 -1
  278. package/i18n/nl-NL.mjs +1 -1
  279. package/i18n/pl-PL.js +1 -1
  280. package/i18n/pl-PL.mjs +1 -1
  281. package/i18n/pt-BR.js +1 -1
  282. package/i18n/pt-BR.mjs +1 -1
  283. package/i18n/pt-PT.js +1 -1
  284. package/i18n/pt-PT.mjs +1 -1
  285. package/i18n/ro-RO.js +1 -1
  286. package/i18n/ro-RO.mjs +1 -1
  287. package/i18n/ru-RU.js +1 -1
  288. package/i18n/ru-RU.mjs +1 -1
  289. package/i18n/sk-SK.js +1 -1
  290. package/i18n/sk-SK.mjs +1 -1
  291. package/i18n/sl-SI.js +1 -1
  292. package/i18n/sl-SI.mjs +1 -1
  293. package/i18n/sr-SP.js +1 -1
  294. package/i18n/sr-SP.mjs +1 -1
  295. package/i18n/sv-SE.js +1 -1
  296. package/i18n/sv-SE.mjs +1 -1
  297. package/i18n/tr-TR.js +1 -1
  298. package/i18n/tr-TR.mjs +1 -1
  299. package/i18n/uk-UA.js +1 -1
  300. package/i18n/uk-UA.mjs +1 -1
  301. package/i18n/zh-CN.js +1 -1
  302. package/i18n/zh-CN.mjs +1 -1
  303. package/i18n/zh-TW.js +1 -1
  304. package/i18n/zh-TW.mjs +1 -1
  305. package/package.json +25 -25
  306. package/src/Autocomplete.tsx +2 -2
  307. package/src/Breadcrumbs.tsx +25 -6
  308. package/src/Button.tsx +15 -11
  309. package/src/Calendar.tsx +51 -6
  310. package/src/Checkbox.tsx +25 -2
  311. package/src/Collection.tsx +1 -1
  312. package/src/ColorArea.tsx +15 -2
  313. package/src/ColorField.tsx +16 -1
  314. package/src/ColorPicker.tsx +5 -2
  315. package/src/ColorSlider.tsx +16 -2
  316. package/src/ColorSwatch.tsx +15 -2
  317. package/src/ColorSwatchPicker.tsx +18 -1
  318. package/src/ColorThumb.tsx +8 -2
  319. package/src/ColorWheel.tsx +24 -3
  320. package/src/ComboBox.tsx +18 -1
  321. package/src/DateField.tsx +60 -16
  322. package/src/DatePicker.tsx +38 -5
  323. package/src/Dialog.tsx +5 -0
  324. package/src/Disclosure.tsx +30 -5
  325. package/src/DragAndDrop.tsx +8 -2
  326. package/src/DropZone.tsx +16 -2
  327. package/src/FieldError.tsx +8 -2
  328. package/src/FileTrigger.tsx +1 -0
  329. package/src/Form.tsx +5 -0
  330. package/src/GridList.tsx +66 -35
  331. package/src/Group.tsx +32 -18
  332. package/src/HiddenDateInput.tsx +6 -4
  333. package/src/Input.tsx +23 -3
  334. package/src/Link.tsx +15 -2
  335. package/src/ListBox.tsx +58 -14
  336. package/src/Menu.tsx +41 -8
  337. package/src/Meter.tsx +16 -2
  338. package/src/Modal.tsx +30 -3
  339. package/src/NumberField.tsx +21 -3
  340. package/src/OverlayArrow.tsx +14 -2
  341. package/src/Popover.tsx +13 -1
  342. package/src/ProgressBar.tsx +17 -3
  343. package/src/RSPContexts.ts +19 -0
  344. package/src/RadioGroup.tsx +33 -4
  345. package/src/SearchField.tsx +36 -4
  346. package/src/Select.tsx +100 -36
  347. package/src/SelectionIndicator.tsx +46 -0
  348. package/src/Separator.tsx +10 -1
  349. package/src/SharedElementTransition.tsx +185 -0
  350. package/src/Slider.tsx +35 -3
  351. package/src/Switch.tsx +18 -5
  352. package/src/Table.tsx +204 -83
  353. package/src/Tabs.tsx +158 -15
  354. package/src/TagGroup.tsx +60 -26
  355. package/src/TextArea.tsx +14 -2
  356. package/src/TextField.tsx +20 -2
  357. package/src/Toast.tsx +22 -2
  358. package/src/ToggleButton.tsx +19 -2
  359. package/src/ToggleButtonGroup.tsx +26 -4
  360. package/src/Toolbar.tsx +13 -1
  361. package/src/Tooltip.tsx +13 -1
  362. package/src/Tree.tsx +76 -40
  363. package/src/index.ts +17 -10
  364. package/src/utils.tsx +2 -3
  365. package/dist/context.main.js +0 -25
  366. package/dist/context.main.js.map +0 -1
  367. package/dist/context.mjs +0 -19
  368. package/dist/context.module.js +0 -19
  369. package/dist/context.module.js.map +0 -1
  370. package/src/context.tsx +0 -34
@@ -1,4 +1,4 @@
1
- var $09cb5ee89bb327e1$exports = require("./context.main.js");
1
+ var $525402dfec7da5bc$exports = require("./RSPContexts.main.js");
2
2
  var $c5ccf687772c0422$exports = require("./utils.main.js");
3
3
  var $5lGAV$reactariaautocomplete = require("@react-aria/autocomplete");
4
4
  var $5lGAV$reactstatelyautocomplete = require("@react-stately/autocomplete");
@@ -56,14 +56,14 @@ function $33f48720060787fa$export$2f2b9559550c7bbc(props) {
56
56
  state
57
57
  ],
58
58
  [
59
- (0, $09cb5ee89bb327e1$exports.FieldInputContext),
59
+ (0, $525402dfec7da5bc$exports.FieldInputContext),
60
60
  {
61
61
  ...inputProps,
62
62
  ref: inputRef
63
63
  }
64
64
  ],
65
65
  [
66
- (0, $09cb5ee89bb327e1$exports.SelectableCollectionContext),
66
+ (0, $525402dfec7da5bc$exports.SelectableCollectionContext),
67
67
  {
68
68
  ...collectionProps,
69
69
  filter: filterFn,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAUM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAAwD;AAChG,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAA4B;AAKzE,SAAS,0CAA+B,KAA2B;IACxE,IAAI,MAAM,CAAA,GAAA,2CAAgB,EAAE,2CAAqB,MAAM,IAAI;IAC3D,QAAQ,CAAA,GAAA,gCAAS,EAAE,KAAK;IACxB,IAAI,UAAC,MAAM,yBAAE,qBAAqB,EAAC,GAAG;IACtC,IAAI,QAAQ,CAAA,GAAA,oDAAmB,EAAE;IACjC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAA2B;IAC/C,IAAI,gBAAgB,CAAA,GAAA,mBAAK,EAAe;IACxC,IAAI,cACF,UAAU,mBACV,eAAe,EACf,eAAe,mBAAmB,EAClC,QAAQ,QAAQ,EACjB,GAAG,CAAA,GAAA,4CAAc,EAAE;QAClB,GAAG,CAAA,GAAA,8CAAmB,EAAE,MAAM;gBAC9B;+BACA;kBACA;uBACA;IACF,GAAG;IAEH,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAA0B;aAAM;YACjC;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAClB,GAAG,UAAU;oBACb,KAAK;gBACP;aAAE;YACF;gBAAC,CAAA,GAAA,qDAA0B;gBAAG;oBAC5B,GAAG,eAAe;oBAClB,QAAQ;oBACR,KAAK;gBACP;aAAE;SACH;OACA,MAAM,QAAQ;AAGrB","sources":["packages/react-aria-components/src/Autocomplete.tsx"],"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 {AriaAutocompleteProps, useAutocomplete} from '@react-aria/autocomplete';\nimport {AutocompleteState, useAutocompleteState} from '@react-stately/autocomplete';\nimport {FieldInputContext, SelectableCollectionContext} from './context';\nimport {mergeProps} from '@react-aria/utils';\nimport {Provider, removeDataAttributes, SlotProps, SlottedContextValue, useSlottedContext} from './utils';\nimport React, {createContext, JSX, useRef} from 'react';\n\nexport interface AutocompleteProps<T = object> extends AriaAutocompleteProps<T>, SlotProps {}\nexport const AutocompleteContext = createContext<SlottedContextValue<Partial<AutocompleteProps<any>>>>(null);\nexport const AutocompleteStateContext = createContext<AutocompleteState | null>(null);\n\n/**\n * An autocomplete combines a TextField or SearchField with a Menu or ListBox, allowing users to search or filter a list of suggestions.\n */\nexport function Autocomplete<T extends object>(props: AutocompleteProps<T>): JSX.Element {\n let ctx = useSlottedContext(AutocompleteContext, props.slot);\n props = mergeProps(ctx, props);\n let {filter, disableAutoFocusFirst} = props;\n let state = useAutocompleteState(props);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let collectionRef = useRef<HTMLElement>(null);\n let {\n inputProps,\n collectionProps,\n collectionRef: mergedCollectionRef,\n filter: filterFn\n } = useAutocomplete({\n ...removeDataAttributes(props),\n filter,\n disableAutoFocusFirst,\n inputRef,\n collectionRef\n }, state);\n\n return (\n <Provider\n values={[\n [AutocompleteStateContext, state],\n [FieldInputContext, {\n ...inputProps,\n ref: inputRef\n }],\n [SelectableCollectionContext, {\n ...collectionProps,\n filter: filterFn,\n ref: mergedCollectionRef\n }]\n ]}>\n {props.children}\n </Provider>\n );\n};\n"],"names":[],"version":3,"file":"Autocomplete.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAUM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAAwD;AAChG,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAA4B;AAKzE,SAAS,0CAA+B,KAA2B;IACxE,IAAI,MAAM,CAAA,GAAA,2CAAgB,EAAE,2CAAqB,MAAM,IAAI;IAC3D,QAAQ,CAAA,GAAA,gCAAS,EAAE,KAAK;IACxB,IAAI,UAAC,MAAM,yBAAE,qBAAqB,EAAC,GAAG;IACtC,IAAI,QAAQ,CAAA,GAAA,oDAAmB,EAAE;IACjC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAA2B;IAC/C,IAAI,gBAAgB,CAAA,GAAA,mBAAK,EAAe;IACxC,IAAI,cACF,UAAU,mBACV,eAAe,EACf,eAAe,mBAAmB,EAClC,QAAQ,QAAQ,EACjB,GAAG,CAAA,GAAA,4CAAc,EAAE;QAClB,GAAG,CAAA,GAAA,8CAAmB,EAAE,MAAM;gBAC9B;+BACA;kBACA;uBACA;IACF,GAAG;IAEH,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC;gBAA0B;aAAM;YACjC;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;oBAClB,GAAG,UAAU;oBACb,KAAK;gBACP;aAAE;YACF;gBAAC,CAAA,GAAA,qDAA0B;gBAAG;oBAC5B,GAAG,eAAe;oBAClB,QAAQ;oBACR,KAAK;gBACP;aAAE;SACH;OACA,MAAM,QAAQ;AAGrB","sources":["packages/react-aria-components/src/Autocomplete.tsx"],"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 {AriaAutocompleteProps, useAutocomplete} from '@react-aria/autocomplete';\nimport {AutocompleteState, useAutocompleteState} from '@react-stately/autocomplete';\nimport {FieldInputContext, SelectableCollectionContext} from './RSPContexts';\nimport {mergeProps} from '@react-aria/utils';\nimport {Provider, removeDataAttributes, SlotProps, SlottedContextValue, useSlottedContext} from './utils';\nimport React, {createContext, JSX, useRef} from 'react';\n\nexport interface AutocompleteProps<T = object> extends AriaAutocompleteProps<T>, SlotProps {}\nexport const AutocompleteContext = createContext<SlottedContextValue<Partial<AutocompleteProps<any>>>>(null);\nexport const AutocompleteStateContext = createContext<AutocompleteState | null>(null);\n\n/**\n * An autocomplete allows users to search or filter a list of suggestions.\n */\nexport function Autocomplete<T extends object>(props: AutocompleteProps<T>): JSX.Element {\n let ctx = useSlottedContext(AutocompleteContext, props.slot);\n props = mergeProps(ctx, props);\n let {filter, disableAutoFocusFirst} = props;\n let state = useAutocompleteState(props);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let collectionRef = useRef<HTMLElement>(null);\n let {\n inputProps,\n collectionProps,\n collectionRef: mergedCollectionRef,\n filter: filterFn\n } = useAutocomplete({\n ...removeDataAttributes(props),\n filter,\n disableAutoFocusFirst,\n inputRef,\n collectionRef\n }, state);\n\n return (\n <Provider\n values={[\n [AutocompleteStateContext, state],\n [FieldInputContext, {\n ...inputProps,\n ref: inputRef\n }],\n [SelectableCollectionContext, {\n ...collectionProps,\n filter: filterFn,\n ref: mergedCollectionRef\n }]\n ]}>\n {props.children}\n </Provider>\n );\n};\n"],"names":[],"version":3,"file":"Autocomplete.main.js.map"}
@@ -1,4 +1,4 @@
1
- import {FieldInputContext as $8e6cc465cc68f603$export$698f465ec27e93df, SelectableCollectionContext as $8e6cc465cc68f603$export$b0d3ecf7112093a7} from "./context.mjs";
1
+ import {FieldInputContext as $4e85f108e88277b8$export$698f465ec27e93df, SelectableCollectionContext as $4e85f108e88277b8$export$b0d3ecf7112093a7} from "./RSPContexts.mjs";
2
2
  import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.mjs";
3
3
  import {useAutocomplete as $llkzs$useAutocomplete} from "@react-aria/autocomplete";
4
4
  import {useAutocompleteState as $llkzs$useAutocompleteState} from "@react-stately/autocomplete";
@@ -44,14 +44,14 @@ function $d2f53cda644affe3$export$2f2b9559550c7bbc(props) {
44
44
  state
45
45
  ],
46
46
  [
47
- (0, $8e6cc465cc68f603$export$698f465ec27e93df),
47
+ (0, $4e85f108e88277b8$export$698f465ec27e93df),
48
48
  {
49
49
  ...inputProps,
50
50
  ref: inputRef
51
51
  }
52
52
  ],
53
53
  [
54
- (0, $8e6cc465cc68f603$export$b0d3ecf7112093a7),
54
+ (0, $4e85f108e88277b8$export$b0d3ecf7112093a7),
55
55
  {
56
56
  ...collectionProps,
57
57
  filter: filterFn,
@@ -1,4 +1,4 @@
1
- import {FieldInputContext as $8e6cc465cc68f603$export$698f465ec27e93df, SelectableCollectionContext as $8e6cc465cc68f603$export$b0d3ecf7112093a7} from "./context.module.js";
1
+ import {FieldInputContext as $4e85f108e88277b8$export$698f465ec27e93df, SelectableCollectionContext as $4e85f108e88277b8$export$b0d3ecf7112093a7} from "./RSPContexts.module.js";
2
2
  import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.module.js";
3
3
  import {useAutocomplete as $llkzs$useAutocomplete} from "@react-aria/autocomplete";
4
4
  import {useAutocompleteState as $llkzs$useAutocompleteState} from "@react-stately/autocomplete";
@@ -44,14 +44,14 @@ function $d2f53cda644affe3$export$2f2b9559550c7bbc(props) {
44
44
  state
45
45
  ],
46
46
  [
47
- (0, $8e6cc465cc68f603$export$698f465ec27e93df),
47
+ (0, $4e85f108e88277b8$export$698f465ec27e93df),
48
48
  {
49
49
  ...inputProps,
50
50
  ref: inputRef
51
51
  }
52
52
  ],
53
53
  [
54
- (0, $8e6cc465cc68f603$export$b0d3ecf7112093a7),
54
+ (0, $4e85f108e88277b8$export$b0d3ecf7112093a7),
55
55
  {
56
56
  ...collectionProps,
57
57
  filter: filterFn,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAUM,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAwD;AAChG,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAA4B;AAKzE,SAAS,0CAA+B,KAA2B;IACxE,IAAI,MAAM,CAAA,GAAA,yCAAgB,EAAE,2CAAqB,MAAM,IAAI;IAC3D,QAAQ,CAAA,GAAA,iBAAS,EAAE,KAAK;IACxB,IAAI,UAAC,MAAM,yBAAE,qBAAqB,EAAC,GAAG;IACtC,IAAI,QAAQ,CAAA,GAAA,2BAAmB,EAAE;IACjC,IAAI,WAAW,CAAA,GAAA,aAAK,EAA2B;IAC/C,IAAI,gBAAgB,CAAA,GAAA,aAAK,EAAe;IACxC,IAAI,cACF,UAAU,mBACV,eAAe,EACf,eAAe,mBAAmB,EAClC,QAAQ,QAAQ,EACjB,GAAG,CAAA,GAAA,sBAAc,EAAE;QAClB,GAAG,CAAA,GAAA,yCAAmB,EAAE,MAAM;gBAC9B;+BACA;kBACA;uBACA;IACF,GAAG;IAEH,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAA0B;aAAM;YACjC;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAClB,GAAG,UAAU;oBACb,KAAK;gBACP;aAAE;YACF;gBAAC,CAAA,GAAA,yCAA0B;gBAAG;oBAC5B,GAAG,eAAe;oBAClB,QAAQ;oBACR,KAAK;gBACP;aAAE;SACH;OACA,MAAM,QAAQ;AAGrB","sources":["packages/react-aria-components/src/Autocomplete.tsx"],"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 {AriaAutocompleteProps, useAutocomplete} from '@react-aria/autocomplete';\nimport {AutocompleteState, useAutocompleteState} from '@react-stately/autocomplete';\nimport {FieldInputContext, SelectableCollectionContext} from './context';\nimport {mergeProps} from '@react-aria/utils';\nimport {Provider, removeDataAttributes, SlotProps, SlottedContextValue, useSlottedContext} from './utils';\nimport React, {createContext, JSX, useRef} from 'react';\n\nexport interface AutocompleteProps<T = object> extends AriaAutocompleteProps<T>, SlotProps {}\nexport const AutocompleteContext = createContext<SlottedContextValue<Partial<AutocompleteProps<any>>>>(null);\nexport const AutocompleteStateContext = createContext<AutocompleteState | null>(null);\n\n/**\n * An autocomplete combines a TextField or SearchField with a Menu or ListBox, allowing users to search or filter a list of suggestions.\n */\nexport function Autocomplete<T extends object>(props: AutocompleteProps<T>): JSX.Element {\n let ctx = useSlottedContext(AutocompleteContext, props.slot);\n props = mergeProps(ctx, props);\n let {filter, disableAutoFocusFirst} = props;\n let state = useAutocompleteState(props);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let collectionRef = useRef<HTMLElement>(null);\n let {\n inputProps,\n collectionProps,\n collectionRef: mergedCollectionRef,\n filter: filterFn\n } = useAutocomplete({\n ...removeDataAttributes(props),\n filter,\n disableAutoFocusFirst,\n inputRef,\n collectionRef\n }, state);\n\n return (\n <Provider\n values={[\n [AutocompleteStateContext, state],\n [FieldInputContext, {\n ...inputProps,\n ref: inputRef\n }],\n [SelectableCollectionContext, {\n ...collectionProps,\n filter: filterFn,\n ref: mergedCollectionRef\n }]\n ]}>\n {props.children}\n </Provider>\n );\n};\n"],"names":[],"version":3,"file":"Autocomplete.module.js.map"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAUM,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAwD;AAChG,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAA4B;AAKzE,SAAS,0CAA+B,KAA2B;IACxE,IAAI,MAAM,CAAA,GAAA,yCAAgB,EAAE,2CAAqB,MAAM,IAAI;IAC3D,QAAQ,CAAA,GAAA,iBAAS,EAAE,KAAK;IACxB,IAAI,UAAC,MAAM,yBAAE,qBAAqB,EAAC,GAAG;IACtC,IAAI,QAAQ,CAAA,GAAA,2BAAmB,EAAE;IACjC,IAAI,WAAW,CAAA,GAAA,aAAK,EAA2B;IAC/C,IAAI,gBAAgB,CAAA,GAAA,aAAK,EAAe;IACxC,IAAI,cACF,UAAU,mBACV,eAAe,EACf,eAAe,mBAAmB,EAClC,QAAQ,QAAQ,EACjB,GAAG,CAAA,GAAA,sBAAc,EAAE;QAClB,GAAG,CAAA,GAAA,yCAAmB,EAAE,MAAM;gBAC9B;+BACA;kBACA;uBACA;IACF,GAAG;IAEH,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAA0B;aAAM;YACjC;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;oBAClB,GAAG,UAAU;oBACb,KAAK;gBACP;aAAE;YACF;gBAAC,CAAA,GAAA,yCAA0B;gBAAG;oBAC5B,GAAG,eAAe;oBAClB,QAAQ;oBACR,KAAK;gBACP;aAAE;SACH;OACA,MAAM,QAAQ;AAGrB","sources":["packages/react-aria-components/src/Autocomplete.tsx"],"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 {AriaAutocompleteProps, useAutocomplete} from '@react-aria/autocomplete';\nimport {AutocompleteState, useAutocompleteState} from '@react-stately/autocomplete';\nimport {FieldInputContext, SelectableCollectionContext} from './RSPContexts';\nimport {mergeProps} from '@react-aria/utils';\nimport {Provider, removeDataAttributes, SlotProps, SlottedContextValue, useSlottedContext} from './utils';\nimport React, {createContext, JSX, useRef} from 'react';\n\nexport interface AutocompleteProps<T = object> extends AriaAutocompleteProps<T>, SlotProps {}\nexport const AutocompleteContext = createContext<SlottedContextValue<Partial<AutocompleteProps<any>>>>(null);\nexport const AutocompleteStateContext = createContext<AutocompleteState | null>(null);\n\n/**\n * An autocomplete allows users to search or filter a list of suggestions.\n */\nexport function Autocomplete<T extends object>(props: AutocompleteProps<T>): JSX.Element {\n let ctx = useSlottedContext(AutocompleteContext, props.slot);\n props = mergeProps(ctx, props);\n let {filter, disableAutoFocusFirst} = props;\n let state = useAutocompleteState(props);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let collectionRef = useRef<HTMLElement>(null);\n let {\n inputProps,\n collectionProps,\n collectionRef: mergedCollectionRef,\n filter: filterFn\n } = useAutocomplete({\n ...removeDataAttributes(props),\n filter,\n disableAutoFocusFirst,\n inputRef,\n collectionRef\n }, state);\n\n return (\n <Provider\n values={[\n [AutocompleteStateContext, state],\n [FieldInputContext, {\n ...inputProps,\n ref: inputRef\n }],\n [SelectableCollectionContext, {\n ...collectionProps,\n filter: filterFn,\n ref: mergedCollectionRef\n }]\n ]}>\n {props.children}\n </Provider>\n );\n};\n"],"names":[],"version":3,"file":"Autocomplete.module.js.map"}
@@ -1,5 +1,5 @@
1
- var $3114c2382242bdc0$exports = require("./Collection.main.js");
2
1
  var $c5ccf687772c0422$exports = require("./utils.main.js");
2
+ var $3114c2382242bdc0$exports = require("./Collection.main.js");
3
3
  var $c87397ee936d2bda$exports = require("./Link.main.js");
4
4
  var $l7mU3$reactaria = require("react-aria");
5
5
  var $l7mU3$reactariacollections = require("@react-aria/collections");
@@ -41,7 +41,8 @@ const $afa44b644f65ed30$export$2dc68d50d56fbbd = /*#__PURE__*/ (0, $l7mU3$react.
41
41
  let { CollectionRoot: CollectionRoot } = (0, $l7mU3$react.useContext)((0, $3114c2382242bdc0$exports.CollectionRendererContext));
42
42
  let { navProps: navProps } = (0, $l7mU3$reactaria.useBreadcrumbs)(props);
43
43
  let DOMProps = (0, $l7mU3$reactariautils.filterDOMProps)(props, {
44
- global: true
44
+ global: true,
45
+ labelable: true
45
46
  });
46
47
  return /*#__PURE__*/ (0, ($parcel$interopDefault($l7mU3$react))).createElement((0, $l7mU3$reactariacollections.CollectionBuilder), {
47
48
  content: /*#__PURE__*/ (0, ($parcel$interopDefault($l7mU3$react))).createElement((0, $l7mU3$reactariacollections.Collection), props)
@@ -82,7 +83,8 @@ const $afa44b644f65ed30$export$dabcc1ec9dd9d1cc = /*#__PURE__*/ (0, $l7mU3$react
82
83
  defaultClassName: 'react-aria-Breadcrumb'
83
84
  });
84
85
  let DOMProps = (0, $l7mU3$reactariautils.filterDOMProps)(props, {
85
- global: true
86
+ global: true,
87
+ labelable: true
86
88
  });
87
89
  delete DOMProps.id;
88
90
  return /*#__PURE__*/ (0, ($parcel$interopDefault($l7mU3$react))).createElement("li", {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkBM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAyD;AAKhG,MAAM,2CAA4B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,YAA8B,KAA0B,EAAE,GAAmC;IAC5K,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,mDAAwB;IAC1D,IAAI,YAAC,QAAQ,EAAC,GAAG,CAAA,GAAA,+BAAa,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC,CAAA,GAAA,6CAAgB;QAAE,uBAAS,0DAAC,CAAA,GAAA,sCAAS,GAAM;OACzC,CA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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 */\nimport {AriaBreadcrumbsProps, useBreadcrumbs} from 'react-aria';\nimport {Collection, CollectionBuilder, CollectionNode, createLeafComponent} from '@react-aria/collections';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {ContextValue, RenderProps, SlotProps, StyleProps, useContextProps, useRenderProps, useSlottedContext} from './utils';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {LinkContext} from './Link';\nimport {Node} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, GlobalDOMAttributes<HTMLOListElement> {\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean,\n /** Handler that is called when a breadcrumb is clicked. */\n onAction?: (key: Key) => void\n}\n\nexport const BreadcrumbsContext = createContext<ContextValue<BreadcrumbsProps<any>, HTMLOListElement>>(null);\n\n/**\n * Breadcrumbs display a hierarchy of links to the current page or resource in an application.\n */\nexport const Breadcrumbs = /*#__PURE__*/ (forwardRef as forwardRefType)(function Breadcrumbs<T extends object>(props: BreadcrumbsProps<T>, ref: ForwardedRef<HTMLOListElement>) {\n [props, ref] = useContextProps(props, ref, BreadcrumbsContext);\n let {CollectionRoot} = useContext(CollectionRendererContext);\n let {navProps} = useBreadcrumbs(props);\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => (\n <ol\n ref={ref}\n {...mergeProps(DOMProps, navProps)}\n slot={props.slot || undefined}\n style={props.style}\n className={props.className ?? 'react-aria-Breadcrumbs'}>\n <BreadcrumbsContext.Provider value={props}>\n <CollectionRoot collection={collection} />\n </BreadcrumbsContext.Provider>\n </ol>\n )}\n </CollectionBuilder>\n );\n});\n\nexport interface BreadcrumbRenderProps {\n /**\n * Whether the breadcrumb is for the current page.\n * @selector [data-current]\n */\n isCurrent: boolean,\n /**\n * Whether the breadcrumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface BreadcrumbProps extends RenderProps<BreadcrumbRenderProps>, GlobalDOMAttributes<HTMLLIElement> {\n /** A unique id for the breadcrumb, which will be passed to `onAction` when the breadcrumb is pressed. */\n id?: Key\n}\n\nclass BreadcrumbNode extends CollectionNode<unknown> {\n static readonly type = 'item';\n}\n\n/**\n * A Breadcrumb represents an individual item in a `<Breadcrumbs>` list.\n */\nexport const Breadcrumb = /*#__PURE__*/ createLeafComponent(BreadcrumbNode, function Breadcrumb(props: BreadcrumbProps, ref: ForwardedRef<HTMLLIElement>, node: Node<unknown>) {\n // Recreating useBreadcrumbItem because we want to use composition instead of having the link builtin.\n let isCurrent = node.nextKey == null;\n let {isDisabled, onAction} = useSlottedContext(BreadcrumbsContext)!;\n let linkProps = {\n 'aria-current': isCurrent ? 'page' : null,\n isDisabled: isDisabled || isCurrent,\n onPress: () => onAction?.(node.key)\n };\n\n let renderProps = useRenderProps({\n ...node.props,\n children: node.rendered,\n values: {isDisabled: isDisabled || isCurrent, isCurrent},\n defaultClassName: 'react-aria-Breadcrumb'\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <li\n {...DOMProps}\n {...renderProps}\n ref={ref}\n data-disabled={isDisabled || isCurrent || undefined}\n data-current={isCurrent || undefined}>\n <LinkContext.Provider value={linkProps}>\n {renderProps.children}\n </LinkContext.Provider>\n </li>\n );\n});\n"],"names":[],"version":3,"file":"Breadcrumbs.main.js.map"}
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;QACrC,YAAY,cAAc;QAC1B,SAAS,IAAM,qBAAA,+BAAA,SAAW,KAAK,GAAG;IACpC;IAEA,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK,KAAK;QACb,UAAU,KAAK,QAAQ;QACvB,QAAQ;YAAC,YAAY,cAAc;uBAAW;QAAS;QACvD,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAc;QAAC,QAAQ;QAAM,WAAW;IAAI;IAC1E,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,cAAc,aAAa;QAC1C,gBAAc,aAAa;qBAC3B,0DAAC,CAAA,GAAA,qCAAU,EAAE,QAAQ;QAAC,OAAO;OAC1B,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/Breadcrumbs.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {AriaBreadcrumbsProps, useBreadcrumbs} from 'react-aria';\nimport {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Collection, CollectionBuilder, CollectionNode, createLeafComponent} from '@react-aria/collections';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {LinkContext} from './Link';\nimport {Node} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, AriaLabelingProps, GlobalDOMAttributes<HTMLOListElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-Breadcrumbs'\n */\n className?: string,\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean,\n /** Handler that is called when a breadcrumb is clicked. */\n onAction?: (key: Key) => void\n}\n\nexport const BreadcrumbsContext = createContext<ContextValue<BreadcrumbsProps<any>, HTMLOListElement>>(null);\n\n/**\n * Breadcrumbs display a hierarchy of links to the current page or resource in an application.\n */\nexport const Breadcrumbs = /*#__PURE__*/ (forwardRef as forwardRefType)(function Breadcrumbs<T extends object>(props: BreadcrumbsProps<T>, ref: ForwardedRef<HTMLOListElement>) {\n [props, ref] = useContextProps(props, ref, BreadcrumbsContext);\n let {CollectionRoot} = useContext(CollectionRendererContext);\n let {navProps} = useBreadcrumbs(props);\n let DOMProps = filterDOMProps(props, {global: true, labelable: true});\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => (\n <ol\n ref={ref}\n {...mergeProps(DOMProps, navProps)}\n slot={props.slot || undefined}\n style={props.style}\n className={props.className ?? 'react-aria-Breadcrumbs'}>\n <BreadcrumbsContext.Provider value={props}>\n <CollectionRoot collection={collection} />\n </BreadcrumbsContext.Provider>\n </ol>\n )}\n </CollectionBuilder>\n );\n});\n\nexport interface BreadcrumbRenderProps {\n /**\n * Whether the breadcrumb is for the current page.\n * @selector [data-current]\n */\n isCurrent: boolean,\n /**\n * Whether the breadcrumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface BreadcrumbProps extends RenderProps<BreadcrumbRenderProps>, AriaLabelingProps, GlobalDOMAttributes<HTMLLIElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Breadcrumb'\n */\n className?: ClassNameOrFunction<BreadcrumbRenderProps>,\n /** A unique id for the breadcrumb, which will be passed to `onAction` when the breadcrumb is pressed. */\n id?: Key\n}\n\nclass BreadcrumbNode extends CollectionNode<unknown> {\n static readonly type = 'item';\n}\n\n/**\n * A Breadcrumb represents an individual item in a `<Breadcrumbs>` list.\n */\nexport const Breadcrumb = /*#__PURE__*/ createLeafComponent(BreadcrumbNode, function Breadcrumb(props: BreadcrumbProps, ref: ForwardedRef<HTMLLIElement>, node: Node<unknown>) {\n // Recreating useBreadcrumbItem because we want to use composition instead of having the link builtin.\n let isCurrent = node.nextKey == null;\n let {isDisabled, onAction} = useSlottedContext(BreadcrumbsContext)!;\n let linkProps = {\n 'aria-current': isCurrent ? 'page' : null,\n isDisabled: isDisabled || isCurrent,\n onPress: () => onAction?.(node.key)\n };\n\n let renderProps = useRenderProps({\n ...node.props,\n children: node.rendered,\n values: {isDisabled: isDisabled || isCurrent, isCurrent},\n defaultClassName: 'react-aria-Breadcrumb'\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true, labelable: true});\n delete DOMProps.id;\n\n return (\n <li\n {...DOMProps}\n {...renderProps}\n ref={ref}\n data-disabled={isDisabled || isCurrent || undefined}\n data-current={isCurrent || undefined}>\n <LinkContext.Provider value={linkProps}>\n {renderProps.children}\n </LinkContext.Provider>\n </li>\n );\n});\n"],"names":[],"version":3,"file":"Breadcrumbs.main.js.map"}
@@ -1,5 +1,5 @@
1
- import {CollectionRendererContext as $7135fc7d473fd974$export$4feb769f8ddf26c5} from "./Collection.mjs";
2
1
  import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.mjs";
2
+ import {CollectionRendererContext as $7135fc7d473fd974$export$4feb769f8ddf26c5} from "./Collection.mjs";
3
3
  import {LinkContext as $4f118338184dc1d9$export$e2509388b49734e7} from "./Link.mjs";
4
4
  import {useBreadcrumbs as $c5cc5$useBreadcrumbs} from "react-aria";
5
5
  import {CollectionBuilder as $c5cc5$CollectionBuilder, Collection as $c5cc5$Collection, CollectionNode as $c5cc5$CollectionNode, createLeafComponent as $c5cc5$createLeafComponent} from "@react-aria/collections";
@@ -29,7 +29,8 @@ const $778035c5624f61e7$export$2dc68d50d56fbbd = /*#__PURE__*/ (0, $c5cc5$forwar
29
29
  let { CollectionRoot: CollectionRoot } = (0, $c5cc5$useContext)((0, $7135fc7d473fd974$export$4feb769f8ddf26c5));
30
30
  let { navProps: navProps } = (0, $c5cc5$useBreadcrumbs)(props);
31
31
  let DOMProps = (0, $c5cc5$filterDOMProps)(props, {
32
- global: true
32
+ global: true,
33
+ labelable: true
33
34
  });
34
35
  return /*#__PURE__*/ (0, $c5cc5$react).createElement((0, $c5cc5$CollectionBuilder), {
35
36
  content: /*#__PURE__*/ (0, $c5cc5$react).createElement((0, $c5cc5$Collection), props)
@@ -70,7 +71,8 @@ const $778035c5624f61e7$export$dabcc1ec9dd9d1cc = /*#__PURE__*/ (0, $c5cc5$creat
70
71
  defaultClassName: 'react-aria-Breadcrumb'
71
72
  });
72
73
  let DOMProps = (0, $c5cc5$filterDOMProps)(props, {
73
- global: true
74
+ global: true,
75
+ labelable: true
74
76
  });
75
77
  delete DOMProps.id;
76
78
  return /*#__PURE__*/ (0, $c5cc5$react).createElement("li", {
@@ -1,5 +1,5 @@
1
- import {CollectionRendererContext as $7135fc7d473fd974$export$4feb769f8ddf26c5} from "./Collection.module.js";
2
1
  import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from "./utils.module.js";
2
+ import {CollectionRendererContext as $7135fc7d473fd974$export$4feb769f8ddf26c5} from "./Collection.module.js";
3
3
  import {LinkContext as $4f118338184dc1d9$export$e2509388b49734e7} from "./Link.module.js";
4
4
  import {useBreadcrumbs as $c5cc5$useBreadcrumbs} from "react-aria";
5
5
  import {CollectionBuilder as $c5cc5$CollectionBuilder, Collection as $c5cc5$Collection, CollectionNode as $c5cc5$CollectionNode, createLeafComponent as $c5cc5$createLeafComponent} from "@react-aria/collections";
@@ -29,7 +29,8 @@ const $778035c5624f61e7$export$2dc68d50d56fbbd = /*#__PURE__*/ (0, $c5cc5$forwar
29
29
  let { CollectionRoot: CollectionRoot } = (0, $c5cc5$useContext)((0, $7135fc7d473fd974$export$4feb769f8ddf26c5));
30
30
  let { navProps: navProps } = (0, $c5cc5$useBreadcrumbs)(props);
31
31
  let DOMProps = (0, $c5cc5$filterDOMProps)(props, {
32
- global: true
32
+ global: true,
33
+ labelable: true
33
34
  });
34
35
  return /*#__PURE__*/ (0, $c5cc5$react).createElement((0, $c5cc5$CollectionBuilder), {
35
36
  content: /*#__PURE__*/ (0, $c5cc5$react).createElement((0, $c5cc5$Collection), props)
@@ -70,7 +71,8 @@ const $778035c5624f61e7$export$dabcc1ec9dd9d1cc = /*#__PURE__*/ (0, $c5cc5$creat
70
71
  defaultClassName: 'react-aria-Breadcrumb'
71
72
  });
72
73
  let DOMProps = (0, $c5cc5$filterDOMProps)(props, {
73
- global: true
74
+ global: true,
75
+ labelable: true
74
76
  });
75
77
  delete DOMProps.id;
76
78
  return /*#__PURE__*/ (0, $c5cc5$react).createElement("li", {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkBM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAyD;AAKhG,MAAM,2CAA4B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,YAA8B,KAA0B,EAAE,GAAmC;IAC5K,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAA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C;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,cAAc,aAAa;QAC1C,gBAAc,aAAa;qBAC3B,gCAAC,CAAA,GAAA,yCAAU,EAAE,QAAQ;QAAC,OAAO;OAC1B,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/Breadcrumbs.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {AriaBreadcrumbsProps, useBreadcrumbs} from 'react-aria';\nimport {Collection, CollectionBuilder, CollectionNode, createLeafComponent} from '@react-aria/collections';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {ContextValue, RenderProps, SlotProps, StyleProps, useContextProps, useRenderProps, useSlottedContext} from './utils';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {LinkContext} from './Link';\nimport {Node} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, GlobalDOMAttributes<HTMLOListElement> {\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean,\n /** Handler that is called when a breadcrumb is clicked. */\n onAction?: (key: Key) => void\n}\n\nexport const BreadcrumbsContext = createContext<ContextValue<BreadcrumbsProps<any>, HTMLOListElement>>(null);\n\n/**\n * Breadcrumbs display a hierarchy of links to the current page or resource in an application.\n */\nexport const Breadcrumbs = /*#__PURE__*/ (forwardRef as forwardRefType)(function Breadcrumbs<T extends object>(props: BreadcrumbsProps<T>, ref: ForwardedRef<HTMLOListElement>) {\n [props, ref] = useContextProps(props, ref, BreadcrumbsContext);\n let {CollectionRoot} = useContext(CollectionRendererContext);\n let {navProps} = useBreadcrumbs(props);\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => (\n <ol\n ref={ref}\n {...mergeProps(DOMProps, navProps)}\n slot={props.slot || undefined}\n style={props.style}\n className={props.className ?? 'react-aria-Breadcrumbs'}>\n <BreadcrumbsContext.Provider value={props}>\n <CollectionRoot collection={collection} />\n </BreadcrumbsContext.Provider>\n </ol>\n )}\n </CollectionBuilder>\n );\n});\n\nexport interface BreadcrumbRenderProps {\n /**\n * Whether the breadcrumb is for the current page.\n * @selector [data-current]\n */\n isCurrent: boolean,\n /**\n * Whether the breadcrumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface BreadcrumbProps extends RenderProps<BreadcrumbRenderProps>, GlobalDOMAttributes<HTMLLIElement> {\n /** A unique id for the breadcrumb, which will be passed to `onAction` when the breadcrumb is pressed. */\n id?: Key\n}\n\nclass BreadcrumbNode extends CollectionNode<unknown> {\n static readonly type = 'item';\n}\n\n/**\n * A Breadcrumb represents an individual item in a `<Breadcrumbs>` list.\n */\nexport const Breadcrumb = /*#__PURE__*/ createLeafComponent(BreadcrumbNode, function Breadcrumb(props: BreadcrumbProps, ref: ForwardedRef<HTMLLIElement>, node: Node<unknown>) {\n // Recreating useBreadcrumbItem because we want to use composition instead of having the link builtin.\n let isCurrent = node.nextKey == null;\n let {isDisabled, onAction} = useSlottedContext(BreadcrumbsContext)!;\n let linkProps = {\n 'aria-current': isCurrent ? 'page' : null,\n isDisabled: isDisabled || isCurrent,\n onPress: () => onAction?.(node.key)\n };\n\n let renderProps = useRenderProps({\n ...node.props,\n children: node.rendered,\n values: {isDisabled: isDisabled || isCurrent, isCurrent},\n defaultClassName: 'react-aria-Breadcrumb'\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <li\n {...DOMProps}\n {...renderProps}\n ref={ref}\n data-disabled={isDisabled || isCurrent || undefined}\n data-current={isCurrent || undefined}>\n <LinkContext.Provider value={linkProps}>\n {renderProps.children}\n </LinkContext.Provider>\n </li>\n );\n});\n"],"names":[],"version":3,"file":"Breadcrumbs.module.js.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAgCM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAyD;AAKhG,MAAM,2CAA4B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,YAA8B,KAA0B,EAAE,GAAmC;IAC5K,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAwB;IAC1D,IAAI,YAAC,QAAQ,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;QAAM,WAAW;IAAI;IAEnE,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QAAE,uBAAS,gCAAC,CAAA,GAAA,iBAAS,GAAM;OACzC,CAAA;YAMc;6BALb,gCAAC;YACC,KAAK;YACJ,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,SAAS;YAClC,MAAM,MAAM,IAAI,IAAI;YACpB,OAAO,MAAM,KAAK;YAClB,WAAW,CAAA,mBAAA,MAAM,SAAS,cAAf,8BAAA,mBAAmB;yBAC9B,gCAAC,0CAAmB,QAAQ;YAAC,OAAO;yBAClC,gCAAC;YAAe,YAAY;;;AAMxC;AAyBA,MAAM,6CAAuB,CAAA,GAAA,qBAAa;AAE1C;AAFM,qCACY,OAAO;AAMlB,MAAM,4CAAa,WAAW,GAAG,CAAA,GAAA,0BAAkB,EAAE,sCAAgB,SAAS,WAAW,KAAsB,EAAE,GAAgC,EAAE,IAAmB;IAC3K,sGAAsG;IACtG,IAAI,YAAY,KAAK,OAAO,IAAI;IAChC,IAAI,cAAC,UAAU,YAAE,QAAQ,EAAC,GAAG,CAAA,GAAA,yCAAgB,EAAE;IAC/C,IAAI,YAAY;QACd,gBAAgB,YAAY,SAAS;QACrC,YAAY,cAAc;QAC1B,SAAS,IAAM,qBAAA,+BAAA,SAAW,KAAK,GAAG;IACpC;IAEA,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK,KAAK;QACb,UAAU,KAAK,QAAQ;QACvB,QAAQ;YAAC,YAAY,cAAc;uBAAW;QAAS;QACvD,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAc;QAAC,QAAQ;QAAM,WAAW;IAAI;IAC1E,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,cAAc,aAAa;QAC1C,gBAAc,aAAa;qBAC3B,gCAAC,CAAA,GAAA,yCAAU,EAAE,QAAQ;QAAC,OAAO;OAC1B,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/Breadcrumbs.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {AriaBreadcrumbsProps, useBreadcrumbs} from 'react-aria';\nimport {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Collection, CollectionBuilder, CollectionNode, createLeafComponent} from '@react-aria/collections';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {LinkContext} from './Link';\nimport {Node} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, AriaLabelingProps, GlobalDOMAttributes<HTMLOListElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-Breadcrumbs'\n */\n className?: string,\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean,\n /** Handler that is called when a breadcrumb is clicked. */\n onAction?: (key: Key) => void\n}\n\nexport const BreadcrumbsContext = createContext<ContextValue<BreadcrumbsProps<any>, HTMLOListElement>>(null);\n\n/**\n * Breadcrumbs display a hierarchy of links to the current page or resource in an application.\n */\nexport const Breadcrumbs = /*#__PURE__*/ (forwardRef as forwardRefType)(function Breadcrumbs<T extends object>(props: BreadcrumbsProps<T>, ref: ForwardedRef<HTMLOListElement>) {\n [props, ref] = useContextProps(props, ref, BreadcrumbsContext);\n let {CollectionRoot} = useContext(CollectionRendererContext);\n let {navProps} = useBreadcrumbs(props);\n let DOMProps = filterDOMProps(props, {global: true, labelable: true});\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => (\n <ol\n ref={ref}\n {...mergeProps(DOMProps, navProps)}\n slot={props.slot || undefined}\n style={props.style}\n className={props.className ?? 'react-aria-Breadcrumbs'}>\n <BreadcrumbsContext.Provider value={props}>\n <CollectionRoot collection={collection} />\n </BreadcrumbsContext.Provider>\n </ol>\n )}\n </CollectionBuilder>\n );\n});\n\nexport interface BreadcrumbRenderProps {\n /**\n * Whether the breadcrumb is for the current page.\n * @selector [data-current]\n */\n isCurrent: boolean,\n /**\n * Whether the breadcrumb is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface BreadcrumbProps extends RenderProps<BreadcrumbRenderProps>, AriaLabelingProps, GlobalDOMAttributes<HTMLLIElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Breadcrumb'\n */\n className?: ClassNameOrFunction<BreadcrumbRenderProps>,\n /** A unique id for the breadcrumb, which will be passed to `onAction` when the breadcrumb is pressed. */\n id?: Key\n}\n\nclass BreadcrumbNode extends CollectionNode<unknown> {\n static readonly type = 'item';\n}\n\n/**\n * A Breadcrumb represents an individual item in a `<Breadcrumbs>` list.\n */\nexport const Breadcrumb = /*#__PURE__*/ createLeafComponent(BreadcrumbNode, function Breadcrumb(props: BreadcrumbProps, ref: ForwardedRef<HTMLLIElement>, node: Node<unknown>) {\n // Recreating useBreadcrumbItem because we want to use composition instead of having the link builtin.\n let isCurrent = node.nextKey == null;\n let {isDisabled, onAction} = useSlottedContext(BreadcrumbsContext)!;\n let linkProps = {\n 'aria-current': isCurrent ? 'page' : null,\n isDisabled: isDisabled || isCurrent,\n onPress: () => onAction?.(node.key)\n };\n\n let renderProps = useRenderProps({\n ...node.props,\n children: node.rendered,\n values: {isDisabled: isDisabled || isCurrent, isCurrent},\n defaultClassName: 'react-aria-Breadcrumb'\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true, labelable: true});\n delete DOMProps.id;\n\n return (\n <li\n {...DOMProps}\n {...renderProps}\n ref={ref}\n data-disabled={isDisabled || isCurrent || undefined}\n data-current={isCurrent || undefined}>\n <LinkContext.Provider value={linkProps}>\n {renderProps.children}\n </LinkContext.Provider>\n </li>\n );\n});\n"],"names":[],"version":3,"file":"Breadcrumbs.module.js.map"}
@@ -37,10 +37,10 @@ $parcel$export(module.exports, "Button", () => $b856e6788a7ea5bf$export$353f5b6f
37
37
  const $b856e6788a7ea5bf$export$24d547caef80ccd1 = /*#__PURE__*/ (0, $3vfYa$react.createContext)({});
38
38
  const $b856e6788a7ea5bf$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $3vfYa$reactariacollections.createHideableComponent)(function Button(props, ref) {
39
39
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $b856e6788a7ea5bf$export$24d547caef80ccd1);
40
- props = $b856e6788a7ea5bf$var$disablePendingProps(props);
41
40
  let ctx = props;
42
41
  let { isPending: isPending } = ctx;
43
42
  let { buttonProps: buttonProps, isPressed: isPressed } = (0, $3vfYa$reactaria.useButton)(props, ref);
43
+ buttonProps = $b856e6788a7ea5bf$var$useDisableInteractions(buttonProps, isPending);
44
44
  let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = (0, $3vfYa$reactaria.useFocusRing)(props);
45
45
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $3vfYa$reactaria.useHover)({
46
46
  ...props,
@@ -108,18 +108,12 @@ const $b856e6788a7ea5bf$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $3vfYa$react
108
108
  }
109
109
  }, renderProps.children));
110
110
  });
111
- function $b856e6788a7ea5bf$var$disablePendingProps(props) {
111
+ function $b856e6788a7ea5bf$var$useDisableInteractions(props, isPending) {
112
112
  // Don't allow interaction while isPending is true
113
- if (props.isPending) {
114
- props.onPress = undefined;
115
- props.onPressStart = undefined;
116
- props.onPressEnd = undefined;
117
- props.onPressChange = undefined;
118
- props.onPressUp = undefined;
119
- props.onKeyDown = undefined;
120
- props.onKeyUp = undefined;
121
- props.onClick = undefined;
113
+ if (isPending) {
114
+ for(const key in props)if (key.startsWith('on') && !(key.includes('Focus') || key.includes('Blur'))) props[key] = undefined;
122
115
  props.href = undefined;
116
+ props.target = undefined;
123
117
  }
124
118
  return props;
125
119
  }
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AA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AG;IACf;IACA,OAAO;AACT","sources":["packages/react-aria-components/src/Button.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 '@react-aria/live-announcer';\nimport {\n AriaButtonProps,\n HoverEvents,\n mergeProps,\n useButton,\n useFocusRing,\n useHover,\n useId\n} from 'react-aria';\nimport {\n ContextValue,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from '@react-aria/collections';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\n\nexport interface ButtonRenderProps {\n /**\n * Whether the button is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the button is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the button is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the button is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the button is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the button is currently in a pending state.\n * @selector [data-pending]\n */\n isPending: boolean\n}\n\nexport interface ButtonProps extends Omit<AriaButtonProps, 'children' | 'href' | 'target' | 'rel' | 'elementType'>, HoverEvents, SlotProps, RenderProps<ButtonRenderProps>, Omit<GlobalDOMAttributes<HTMLButtonElement>, 'onClick'> {\n /**\n * Whether the button is in a pending state. This disables press and hover events\n * while retaining focusability, and announces the pending state to screen readers.\n */\n isPending?: boolean\n}\n\ninterface ButtonContextValue extends ButtonProps {\n isPressed?: boolean\n}\n\nexport const ButtonContext = createContext<ContextValue<ButtonContextValue, HTMLButtonElement>>({});\n\n/**\n * A button allows a user to perform an action, with mouse, touch, and keyboard interactions.\n */\nexport const Button = /*#__PURE__*/ createHideableComponent(function Button(props: ButtonProps, ref: ForwardedRef<HTMLButtonElement>) {\n [props, ref] = useContextProps(props, ref, ButtonContext);\n props = disablePendingProps(props);\n let ctx = props as ButtonContextValue;\n let {isPending} = ctx;\n let {buttonProps, isPressed} = useButton(props, ref);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing(props);\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: props.isDisabled || isPending\n });\n let renderValues = {\n isHovered,\n isPressed: (ctx.isPressed || isPressed) && !isPending,\n isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isPending: isPending ?? false\n };\n\n let renderProps = useRenderProps({\n ...props,\n values: renderValues,\n defaultClassName: 'react-aria-Button'\n });\n\n let buttonId = useId(buttonProps.id);\n let progressId = useId();\n\n let ariaLabelledby = buttonProps['aria-labelledby'];\n if (isPending) {\n // aria-labelledby wins over aria-label\n // https://www.w3.org/TR/accname-1.2/#computation-steps\n if (ariaLabelledby) {\n ariaLabelledby = `${ariaLabelledby} ${progressId}`;\n } else if (buttonProps['aria-label']) {\n ariaLabelledby = `${buttonId} ${progressId}`;\n }\n }\n\n let wasPending = useRef(isPending);\n useEffect(() => {\n let message = {'aria-labelledby': ariaLabelledby || buttonId};\n if (!wasPending.current && isFocused && isPending) {\n announce(message, 'assertive');\n } else if (wasPending.current && isFocused && !isPending) {\n announce(message, 'assertive');\n }\n wasPending.current = isPending;\n }, [isPending, isFocused, ariaLabelledby, buttonId]);\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.onClick;\n\n return (\n <button\n {...mergeProps(DOMProps, renderProps, buttonProps, focusProps, hoverProps)}\n // When the button is in a pending state, we want to stop implicit form submission (ie. when the user presses enter on a text input).\n // We do this by changing the button's type to button.\n type={buttonProps.type === 'submit' && isPending ? 'button' : buttonProps.type}\n id={buttonId}\n ref={ref}\n aria-labelledby={ariaLabelledby}\n slot={props.slot || undefined}\n aria-disabled={isPending ? 'true' : buttonProps['aria-disabled']}\n data-disabled={props.isDisabled || undefined}\n data-pressed={renderValues.isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-pending={isPending || undefined}\n data-focus-visible={isFocusVisible || undefined}>\n <ProgressBarContext.Provider value={{id: progressId}}>\n {renderProps.children}\n </ProgressBarContext.Provider>\n </button>\n );\n});\n\nfunction disablePendingProps(props) {\n // Don't allow interaction while isPending is true\n if (props.isPending) {\n props.onPress = undefined;\n props.onPressStart = undefined;\n props.onPressEnd = undefined;\n props.onPressChange = undefined;\n props.onPressUp = undefined;\n props.onKeyDown = undefined;\n props.onKeyUp = undefined;\n props.onClick = undefined;\n props.href = undefined;\n }\n return props;\n}\n"],"names":[],"version":3,"file":"Button.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA4EM,MAAM,0DAAgB,CAAA,GAAA,0BAAY,EAAuD,CAAC;AAK1F,MAAM,4CAAS,WAAW,GAAG,CAAA,GAAA,mDAAsB,EAAE,SAAS,OAAO,KAAkB,EAAE,GAAoC;IAClI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,MAAM;IACV,IAAI,aAAC,SAAS,EAAC,GAAG;IAClB,IAAI,eAAC,WAAW,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,0BAAQ,EAAE,OAAO;IAChD,cAAc,6CAAuB,aAAa;IAClD,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,6BAAW,EAAE;IAC3D,IAAI,cAAC,UAA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QACrI,sDAAsD;QACtD,MAAM,YAAY,IAAI,KAAK,YAAY,YAAY,WAAW,YAAY,IAAI;QAC9E,IAAI;QACJ,KAAK;QACL,mBAAiB;QACjB,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,YAAY,SAAS,WAAW,CAAC,gBAAgB;QAChE,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa,SAAS,IAAI;QACxC,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;qBACtC,0DAAC,CAAA,GAAA,4CAAiB,EAAE,QAAQ;QAAC,OAAO;YAAC,IAAI;QAAU;OAChD,YAAY,QAAQ;AAI7B;AAEA,SAAS,6CAAuB,KAAK,EAAE,SAAS;IAC9C,kDAAkD;IAClD,IAAI,WAAW;QACb,IAAK,MAAM,OAAO,MAChB,IAAI,IAAI,UAAU,CAAC,SAAS,CAAE,CAAA,IAAI,QAAQ,CAAC,YAAY,IAAI,QAAQ,CAAC,OAAM,GACxE,KAAK,CAAC,IAAI,GAAG;QAGjB,MAAM,IAAI,GAAG;QACb,MAAM,MAAM,GAAG;IACjB;IACA,OAAO;AACT","sources":["packages/react-aria-components/src/Button.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 '@react-aria/live-announcer';\nimport {\n AriaButtonProps,\n HoverEvents,\n mergeProps,\n useButton,\n useFocusRing,\n useHover,\n useId\n} from 'react-aria';\nimport {\n ClassNameOrFunction,\n ContextValue,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from '@react-aria/collections';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\n\nexport interface ButtonRenderProps {\n /**\n * Whether the button is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the button is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the button is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the button is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the button is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the button is currently in a pending state.\n * @selector [data-pending]\n */\n isPending: boolean\n}\n\nexport interface ButtonProps extends Omit<AriaButtonProps, 'children' | 'href' | 'target' | 'rel' | 'elementType'>, HoverEvents, SlotProps, RenderProps<ButtonRenderProps>, Omit<GlobalDOMAttributes<HTMLButtonElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Button'\n */\n className?: ClassNameOrFunction<ButtonRenderProps>,\n /**\n * Whether the button is in a pending state. This disables press and hover events\n * while retaining focusability, and announces the pending state to screen readers.\n */\n isPending?: boolean\n}\n\ninterface ButtonContextValue extends ButtonProps {\n isPressed?: boolean\n}\n\nexport const ButtonContext = createContext<ContextValue<ButtonContextValue, HTMLButtonElement>>({});\n\n/**\n * A button allows a user to perform an action, with mouse, touch, and keyboard interactions.\n */\nexport const Button = /*#__PURE__*/ createHideableComponent(function Button(props: ButtonProps, ref: ForwardedRef<HTMLButtonElement>) {\n [props, ref] = useContextProps(props, ref, ButtonContext);\n let ctx = props as ButtonContextValue;\n let {isPending} = ctx;\n let {buttonProps, isPressed} = useButton(props, ref);\n buttonProps = useDisableInteractions(buttonProps, isPending);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing(props);\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: props.isDisabled || isPending\n });\n let renderValues = {\n isHovered,\n isPressed: (ctx.isPressed || isPressed) && !isPending,\n isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isPending: isPending ?? false\n };\n\n let renderProps = useRenderProps({\n ...props,\n values: renderValues,\n defaultClassName: 'react-aria-Button'\n });\n\n let buttonId = useId(buttonProps.id);\n let progressId = useId();\n\n let ariaLabelledby = buttonProps['aria-labelledby'];\n if (isPending) {\n // aria-labelledby wins over aria-label\n // https://www.w3.org/TR/accname-1.2/#computation-steps\n if (ariaLabelledby) {\n ariaLabelledby = `${ariaLabelledby} ${progressId}`;\n } else if (buttonProps['aria-label']) {\n ariaLabelledby = `${buttonId} ${progressId}`;\n }\n }\n\n let wasPending = useRef(isPending);\n useEffect(() => {\n let message = {'aria-labelledby': ariaLabelledby || buttonId};\n if (!wasPending.current && isFocused && isPending) {\n announce(message, 'assertive');\n } else if (wasPending.current && isFocused && !isPending) {\n announce(message, 'assertive');\n }\n wasPending.current = isPending;\n }, [isPending, isFocused, ariaLabelledby, buttonId]);\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.onClick;\n\n return (\n <button\n {...mergeProps(DOMProps, renderProps, buttonProps, focusProps, hoverProps)}\n // When the button is in a pending state, we want to stop implicit form submission (ie. when the user presses enter on a text input).\n // We do this by changing the button's type to button.\n type={buttonProps.type === 'submit' && isPending ? 'button' : buttonProps.type}\n id={buttonId}\n ref={ref}\n aria-labelledby={ariaLabelledby}\n slot={props.slot || undefined}\n aria-disabled={isPending ? 'true' : buttonProps['aria-disabled']}\n data-disabled={props.isDisabled || undefined}\n data-pressed={renderValues.isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-pending={isPending || undefined}\n data-focus-visible={isFocusVisible || undefined}>\n <ProgressBarContext.Provider value={{id: progressId}}>\n {renderProps.children}\n </ProgressBarContext.Provider>\n </button>\n );\n});\n\nfunction useDisableInteractions(props, isPending) {\n // Don't allow interaction while isPending is true\n if (isPending) {\n for (const key in props) {\n if (key.startsWith('on') && !(key.includes('Focus') || key.includes('Blur'))) {\n props[key] = undefined;\n }\n }\n props.href = undefined;\n props.target = undefined;\n }\n return props;\n}\n"],"names":[],"version":3,"file":"Button.main.js.map"}
package/dist/Button.mjs CHANGED
@@ -26,10 +26,10 @@ import $fM325$react, {createContext as $fM325$createContext, useRef as $fM325$us
26
26
  const $d2b4bc8c273e7be6$export$24d547caef80ccd1 = /*#__PURE__*/ (0, $fM325$createContext)({});
27
27
  const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $fM325$createHideableComponent)(function Button(props, ref) {
28
28
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d2b4bc8c273e7be6$export$24d547caef80ccd1);
29
- props = $d2b4bc8c273e7be6$var$disablePendingProps(props);
30
29
  let ctx = props;
31
30
  let { isPending: isPending } = ctx;
32
31
  let { buttonProps: buttonProps, isPressed: isPressed } = (0, $fM325$useButton)(props, ref);
32
+ buttonProps = $d2b4bc8c273e7be6$var$useDisableInteractions(buttonProps, isPending);
33
33
  let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = (0, $fM325$useFocusRing)(props);
34
34
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $fM325$useHover)({
35
35
  ...props,
@@ -97,18 +97,12 @@ const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $fM325$creat
97
97
  }
98
98
  }, renderProps.children));
99
99
  });
100
- function $d2b4bc8c273e7be6$var$disablePendingProps(props) {
100
+ function $d2b4bc8c273e7be6$var$useDisableInteractions(props, isPending) {
101
101
  // Don't allow interaction while isPending is true
102
- if (props.isPending) {
103
- props.onPress = undefined;
104
- props.onPressStart = undefined;
105
- props.onPressEnd = undefined;
106
- props.onPressChange = undefined;
107
- props.onPressUp = undefined;
108
- props.onKeyDown = undefined;
109
- props.onKeyUp = undefined;
110
- props.onClick = undefined;
102
+ if (isPending) {
103
+ for(const key in props)if (key.startsWith('on') && !(key.includes('Focus') || key.includes('Blur'))) props[key] = undefined;
111
104
  props.href = undefined;
105
+ props.target = undefined;
112
106
  }
113
107
  return props;
114
108
  }
@@ -26,10 +26,10 @@ import $fM325$react, {createContext as $fM325$createContext, useRef as $fM325$us
26
26
  const $d2b4bc8c273e7be6$export$24d547caef80ccd1 = /*#__PURE__*/ (0, $fM325$createContext)({});
27
27
  const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $fM325$createHideableComponent)(function Button(props, ref) {
28
28
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d2b4bc8c273e7be6$export$24d547caef80ccd1);
29
- props = $d2b4bc8c273e7be6$var$disablePendingProps(props);
30
29
  let ctx = props;
31
30
  let { isPending: isPending } = ctx;
32
31
  let { buttonProps: buttonProps, isPressed: isPressed } = (0, $fM325$useButton)(props, ref);
32
+ buttonProps = $d2b4bc8c273e7be6$var$useDisableInteractions(buttonProps, isPending);
33
33
  let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = (0, $fM325$useFocusRing)(props);
34
34
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $fM325$useHover)({
35
35
  ...props,
@@ -97,18 +97,12 @@ const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $fM325$creat
97
97
  }
98
98
  }, renderProps.children));
99
99
  });
100
- function $d2b4bc8c273e7be6$var$disablePendingProps(props) {
100
+ function $d2b4bc8c273e7be6$var$useDisableInteractions(props, isPending) {
101
101
  // Don't allow interaction while isPending is true
102
- if (props.isPending) {
103
- props.onPress = undefined;
104
- props.onPressStart = undefined;
105
- props.onPressEnd = undefined;
106
- props.onPressChange = undefined;
107
- props.onPressUp = undefined;
108
- props.onKeyDown = undefined;
109
- props.onKeyUp = undefined;
110
- props.onClick = undefined;
102
+ if (isPending) {
103
+ for(const key in props)if (key.startsWith('on') && !(key.includes('Focus') || key.includes('Blur'))) props[key] = undefined;
111
104
  props.href = undefined;
105
+ props.target = undefined;
112
106
  }
113
107
  return props;
114
108
  }
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAsEM,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAAuD,CAAC;AAK1F,MAAM,4CAAS,WAAW,GAAG,CAAA,GAAA,8BAAsB,EAAE,SAAS,OAAO,KAAkB,EAAE,GAAoC;IAClI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,QAAQ,0CAAoB;IAC5B,IAAI,MAAM;IACV,IAAI,aAAC,SAAS,EAAC,GAAG;IAClB,IAAI,eAAC,WAAW,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE,OAAO;IAChD,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;IAC3D,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;QACrC,GAAG,KAAK;QACR,YAAY,MAAM,UAAU,IAAI;IAClC;IACA,IAAI,eAAe;mBACjB;QACA,WAAW,AAAC,CAAA,IAAI,SAAS,IAAI,SAAQ,KAAM,CAAC;mBAC5C;wBACA;QACA,YAAY,MAAM,UAAU,IAAI;QAChC,WAAW,sBAAA,uBAAA,YAAa;IAC1B;IAEA,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;QACR,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,YAAI,EAAE,YAAY,EAAE;IACnC,IAAI,aAAa,CAAA,GAAA,YAAI;IAErB,IAAI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kDAAkD;IAClD,IAAI,MAAM,SAAS,EAAE;QACnB,MAAM,OAAO,GAAG;QAChB,MAAM,YAAY,GAAG;QACrB,MAAM,UAAU,GAAG;QACnB,MAAM,aAAa,GAAG;QACtB,MAAM,SAAS,GAAG;QAClB,MAAM,SAAS,GAAG;QAClB,MAAM,OAAO,GAAG;QAChB,MAAM,OAAO,GAAG;QAChB,MAAM,IAAI,GAAG;IACf;IACA,OAAO;AACT","sources":["packages/react-aria-components/src/Button.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 '@react-aria/live-announcer';\nimport {\n AriaButtonProps,\n HoverEvents,\n mergeProps,\n useButton,\n useFocusRing,\n useHover,\n useId\n} from 'react-aria';\nimport {\n ContextValue,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from '@react-aria/collections';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\n\nexport interface ButtonRenderProps {\n /**\n * Whether the button is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the button is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the button is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the button is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the button is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the button is currently in a pending state.\n * @selector [data-pending]\n */\n isPending: boolean\n}\n\nexport interface ButtonProps extends Omit<AriaButtonProps, 'children' | 'href' | 'target' | 'rel' | 'elementType'>, HoverEvents, SlotProps, RenderProps<ButtonRenderProps>, Omit<GlobalDOMAttributes<HTMLButtonElement>, 'onClick'> {\n /**\n * Whether the button is in a pending state. This disables press and hover events\n * while retaining focusability, and announces the pending state to screen readers.\n */\n isPending?: boolean\n}\n\ninterface ButtonContextValue extends ButtonProps {\n isPressed?: boolean\n}\n\nexport const ButtonContext = createContext<ContextValue<ButtonContextValue, HTMLButtonElement>>({});\n\n/**\n * A button allows a user to perform an action, with mouse, touch, and keyboard interactions.\n */\nexport const Button = /*#__PURE__*/ createHideableComponent(function Button(props: ButtonProps, ref: ForwardedRef<HTMLButtonElement>) {\n [props, ref] = useContextProps(props, ref, ButtonContext);\n props = disablePendingProps(props);\n let ctx = props as ButtonContextValue;\n let {isPending} = ctx;\n let {buttonProps, isPressed} = useButton(props, ref);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing(props);\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: props.isDisabled || isPending\n });\n let renderValues = {\n isHovered,\n isPressed: (ctx.isPressed || isPressed) && !isPending,\n isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isPending: isPending ?? false\n };\n\n let renderProps = useRenderProps({\n ...props,\n values: renderValues,\n defaultClassName: 'react-aria-Button'\n });\n\n let buttonId = useId(buttonProps.id);\n let progressId = useId();\n\n let ariaLabelledby = buttonProps['aria-labelledby'];\n if (isPending) {\n // aria-labelledby wins over aria-label\n // https://www.w3.org/TR/accname-1.2/#computation-steps\n if (ariaLabelledby) {\n ariaLabelledby = `${ariaLabelledby} ${progressId}`;\n } else if (buttonProps['aria-label']) {\n ariaLabelledby = `${buttonId} ${progressId}`;\n }\n }\n\n let wasPending = useRef(isPending);\n useEffect(() => {\n let message = {'aria-labelledby': ariaLabelledby || buttonId};\n if (!wasPending.current && isFocused && isPending) {\n announce(message, 'assertive');\n } else if (wasPending.current && isFocused && !isPending) {\n announce(message, 'assertive');\n }\n wasPending.current = isPending;\n }, [isPending, isFocused, ariaLabelledby, buttonId]);\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.onClick;\n\n return (\n <button\n {...mergeProps(DOMProps, renderProps, buttonProps, focusProps, hoverProps)}\n // When the button is in a pending state, we want to stop implicit form submission (ie. when the user presses enter on a text input).\n // We do this by changing the button's type to button.\n type={buttonProps.type === 'submit' && isPending ? 'button' : buttonProps.type}\n id={buttonId}\n ref={ref}\n aria-labelledby={ariaLabelledby}\n slot={props.slot || undefined}\n aria-disabled={isPending ? 'true' : buttonProps['aria-disabled']}\n data-disabled={props.isDisabled || undefined}\n data-pressed={renderValues.isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-pending={isPending || undefined}\n data-focus-visible={isFocusVisible || undefined}>\n <ProgressBarContext.Provider value={{id: progressId}}>\n {renderProps.children}\n </ProgressBarContext.Provider>\n </button>\n );\n});\n\nfunction disablePendingProps(props) {\n // Don't allow interaction while isPending is true\n if (props.isPending) {\n props.onPress = undefined;\n props.onPressStart = undefined;\n props.onPressEnd = undefined;\n props.onPressChange = undefined;\n props.onPressUp = undefined;\n props.onKeyDown = undefined;\n props.onKeyUp = undefined;\n props.onClick = undefined;\n props.href = undefined;\n }\n return props;\n}\n"],"names":[],"version":3,"file":"Button.module.js.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA4EM,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAAuD,CAAC;AAK1F,MAAM,4CAAS,WAAW,GAAG,CAAA,GAAA,8BAAsB,EAAE,SAAS,OAAO,KAAkB,EAAE,GAAoC;IAClI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,MAAM;IACV,IAAI,aA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AG;QAAC;QAAW;QAAW;QAAgB;KAAS;IAEnD,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,OAAO;IAEvB,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,aAAa,YAAY,WAAW;QAC1E,qIAAqI;QACrI,sDAAsD;QACtD,MAAM,YAAY,IAAI,KAAK,YAAY,YAAY,WAAW,YAAY,IAAI;QAC9E,IAAI;QACJ,KAAK;QACL,mBAAiB;QACjB,MAAM,MAAM,IAAI,IAAI;QACpB,iBAAe,YAAY,SAAS,WAAW,CAAC,gBAAgB;QAChE,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,aAAa,SAAS,IAAI;QACxC,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;qBACtC,gCAAC,CAAA,GAAA,yCAAiB,EAAE,QAAQ;QAAC,OAAO;YAAC,IAAI;QAAU;OAChD,YAAY,QAAQ;AAI7B;AAEA,SAAS,6CAAuB,KAAK,EAAE,SAAS;IAC9C,kDAAkD;IAClD,IAAI,WAAW;QACb,IAAK,MAAM,OAAO,MAChB,IAAI,IAAI,UAAU,CAAC,SAAS,CAAE,CAAA,IAAI,QAAQ,CAAC,YAAY,IAAI,QAAQ,CAAC,OAAM,GACxE,KAAK,CAAC,IAAI,GAAG;QAGjB,MAAM,IAAI,GAAG;QACb,MAAM,MAAM,GAAG;IACjB;IACA,OAAO;AACT","sources":["packages/react-aria-components/src/Button.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 '@react-aria/live-announcer';\nimport {\n AriaButtonProps,\n HoverEvents,\n mergeProps,\n useButton,\n useFocusRing,\n useHover,\n useId\n} from 'react-aria';\nimport {\n ClassNameOrFunction,\n ContextValue,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from '@react-aria/collections';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\n\nexport interface ButtonRenderProps {\n /**\n * Whether the button is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the button is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the button is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the button is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the button is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the button is currently in a pending state.\n * @selector [data-pending]\n */\n isPending: boolean\n}\n\nexport interface ButtonProps extends Omit<AriaButtonProps, 'children' | 'href' | 'target' | 'rel' | 'elementType'>, HoverEvents, SlotProps, RenderProps<ButtonRenderProps>, Omit<GlobalDOMAttributes<HTMLButtonElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-Button'\n */\n className?: ClassNameOrFunction<ButtonRenderProps>,\n /**\n * Whether the button is in a pending state. This disables press and hover events\n * while retaining focusability, and announces the pending state to screen readers.\n */\n isPending?: boolean\n}\n\ninterface ButtonContextValue extends ButtonProps {\n isPressed?: boolean\n}\n\nexport const ButtonContext = createContext<ContextValue<ButtonContextValue, HTMLButtonElement>>({});\n\n/**\n * A button allows a user to perform an action, with mouse, touch, and keyboard interactions.\n */\nexport const Button = /*#__PURE__*/ createHideableComponent(function Button(props: ButtonProps, ref: ForwardedRef<HTMLButtonElement>) {\n [props, ref] = useContextProps(props, ref, ButtonContext);\n let ctx = props as ButtonContextValue;\n let {isPending} = ctx;\n let {buttonProps, isPressed} = useButton(props, ref);\n buttonProps = useDisableInteractions(buttonProps, isPending);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing(props);\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: props.isDisabled || isPending\n });\n let renderValues = {\n isHovered,\n isPressed: (ctx.isPressed || isPressed) && !isPending,\n isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isPending: isPending ?? false\n };\n\n let renderProps = useRenderProps({\n ...props,\n values: renderValues,\n defaultClassName: 'react-aria-Button'\n });\n\n let buttonId = useId(buttonProps.id);\n let progressId = useId();\n\n let ariaLabelledby = buttonProps['aria-labelledby'];\n if (isPending) {\n // aria-labelledby wins over aria-label\n // https://www.w3.org/TR/accname-1.2/#computation-steps\n if (ariaLabelledby) {\n ariaLabelledby = `${ariaLabelledby} ${progressId}`;\n } else if (buttonProps['aria-label']) {\n ariaLabelledby = `${buttonId} ${progressId}`;\n }\n }\n\n let wasPending = useRef(isPending);\n useEffect(() => {\n let message = {'aria-labelledby': ariaLabelledby || buttonId};\n if (!wasPending.current && isFocused && isPending) {\n announce(message, 'assertive');\n } else if (wasPending.current && isFocused && !isPending) {\n announce(message, 'assertive');\n }\n wasPending.current = isPending;\n }, [isPending, isFocused, ariaLabelledby, buttonId]);\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.onClick;\n\n return (\n <button\n {...mergeProps(DOMProps, renderProps, buttonProps, focusProps, hoverProps)}\n // When the button is in a pending state, we want to stop implicit form submission (ie. when the user presses enter on a text input).\n // We do this by changing the button's type to button.\n type={buttonProps.type === 'submit' && isPending ? 'button' : buttonProps.type}\n id={buttonId}\n ref={ref}\n aria-labelledby={ariaLabelledby}\n slot={props.slot || undefined}\n aria-disabled={isPending ? 'true' : buttonProps['aria-disabled']}\n data-disabled={props.isDisabled || undefined}\n data-pressed={renderValues.isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-pending={isPending || undefined}\n data-focus-visible={isFocusVisible || undefined}>\n <ProgressBarContext.Provider value={{id: progressId}}>\n {renderProps.children}\n </ProgressBarContext.Provider>\n </button>\n );\n});\n\nfunction useDisableInteractions(props, isPending) {\n // Don't allow interaction while isPending is true\n if (isPending) {\n for (const key in props) {\n if (key.startsWith('on') && !(key.includes('Focus') || key.includes('Blur'))) {\n props[key] = undefined;\n }\n }\n props.href = undefined;\n props.target = undefined;\n }\n return props;\n}\n"],"names":[],"version":3,"file":"Button.module.js.map"}
@@ -237,7 +237,7 @@ function $3f539f26b167ddde$var$CalendarGridHeader(props, ref) {
237
237
  ...(0, $iJp6C$reactaria.mergeProps)(DOMProps, headerProps),
238
238
  ref: ref,
239
239
  style: style,
240
- className: className || 'react-aria-CalendarGridHeader'
240
+ className: className !== null && className !== void 0 ? className : 'react-aria-CalendarGridHeader'
241
241
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($iJp6C$react))).createElement("tr", null, weekDays.map((day, key)=>/*#__PURE__*/ (0, ($parcel$interopDefault($iJp6C$react))).cloneElement(children(day), {
242
242
  key: key
243
243
  }))));
@@ -273,7 +273,7 @@ function $3f539f26b167ddde$var$CalendarGridBody(props, ref) {
273
273
  ...DOMProps,
274
274
  ref: ref,
275
275
  style: style,
276
- className: className || 'react-aria-CalendarGridBody'
276
+ className: className !== null && className !== void 0 ? className : 'react-aria-CalendarGridBody'
277
277
  }, [
278
278
  ...new Array(weeksInMonth).keys()
279
279
  ].map((weekIndex)=>/*#__PURE__*/ (0, ($parcel$interopDefault($iJp6C$react))).createElement("tr", {