react-aria-components 1.17.0 → 1.19.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 (478) hide show
  1. package/dist/exports/Autocomplete.cjs.map +1 -1
  2. package/dist/exports/Autocomplete.js.map +1 -1
  3. package/dist/exports/Autocomplete.mjs.map +1 -1
  4. package/dist/exports/Calendar.cjs +3 -0
  5. package/dist/exports/Calendar.cjs.map +1 -1
  6. package/dist/exports/Calendar.js +2 -2
  7. package/dist/exports/Calendar.js.map +1 -1
  8. package/dist/exports/Calendar.mjs +2 -2
  9. package/dist/exports/Calendar.mjs.map +1 -1
  10. package/dist/exports/Checkbox.cjs +8 -0
  11. package/dist/exports/Checkbox.cjs.map +1 -1
  12. package/dist/exports/Checkbox.js +6 -2
  13. package/dist/exports/Checkbox.js.map +1 -1
  14. package/dist/exports/Checkbox.mjs +6 -2
  15. package/dist/exports/Checkbox.mjs.map +1 -1
  16. package/dist/exports/CheckboxGroup.cjs.map +1 -1
  17. package/dist/exports/CheckboxGroup.js.map +1 -1
  18. package/dist/exports/CheckboxGroup.mjs.map +1 -1
  19. package/dist/exports/CollectionBuilder.cjs.map +1 -1
  20. package/dist/exports/CollectionBuilder.js.map +1 -1
  21. package/dist/exports/CollectionBuilder.mjs.map +1 -1
  22. package/dist/exports/ColorArea.cjs.map +1 -1
  23. package/dist/exports/ColorArea.js.map +1 -1
  24. package/dist/exports/ColorArea.mjs.map +1 -1
  25. package/dist/exports/ColorField.cjs.map +1 -1
  26. package/dist/exports/ColorField.js.map +1 -1
  27. package/dist/exports/ColorField.mjs.map +1 -1
  28. package/dist/exports/ColorPicker.cjs.map +1 -1
  29. package/dist/exports/ColorPicker.js.map +1 -1
  30. package/dist/exports/ColorPicker.mjs.map +1 -1
  31. package/dist/exports/ColorSlider.cjs.map +1 -1
  32. package/dist/exports/ColorSlider.js.map +1 -1
  33. package/dist/exports/ColorSlider.mjs.map +1 -1
  34. package/dist/exports/ColorSwatch.cjs.map +1 -1
  35. package/dist/exports/ColorSwatch.js.map +1 -1
  36. package/dist/exports/ColorSwatch.mjs.map +1 -1
  37. package/dist/exports/ColorSwatchPicker.cjs.map +1 -1
  38. package/dist/exports/ColorSwatchPicker.js.map +1 -1
  39. package/dist/exports/ColorSwatchPicker.mjs.map +1 -1
  40. package/dist/exports/ColorThumb.cjs.map +1 -1
  41. package/dist/exports/ColorThumb.js.map +1 -1
  42. package/dist/exports/ColorThumb.mjs.map +1 -1
  43. package/dist/exports/ColorWheel.cjs.map +1 -1
  44. package/dist/exports/ColorWheel.js.map +1 -1
  45. package/dist/exports/ColorWheel.mjs.map +1 -1
  46. package/dist/exports/ComboBox.cjs.map +1 -1
  47. package/dist/exports/ComboBox.js.map +1 -1
  48. package/dist/exports/ComboBox.mjs.map +1 -1
  49. package/dist/exports/DateField.cjs.map +1 -1
  50. package/dist/exports/DateField.js.map +1 -1
  51. package/dist/exports/DateField.mjs.map +1 -1
  52. package/dist/exports/DatePicker.cjs.map +1 -1
  53. package/dist/exports/DatePicker.js.map +1 -1
  54. package/dist/exports/DatePicker.mjs.map +1 -1
  55. package/dist/exports/DateRangePicker.cjs.map +1 -1
  56. package/dist/exports/DateRangePicker.js.map +1 -1
  57. package/dist/exports/DateRangePicker.mjs.map +1 -1
  58. package/dist/exports/Disclosure.cjs.map +1 -1
  59. package/dist/exports/Disclosure.js.map +1 -1
  60. package/dist/exports/Disclosure.mjs.map +1 -1
  61. package/dist/exports/DisclosureGroup.cjs.map +1 -1
  62. package/dist/exports/DisclosureGroup.js.map +1 -1
  63. package/dist/exports/DisclosureGroup.mjs.map +1 -1
  64. package/dist/exports/GridList.cjs.map +1 -1
  65. package/dist/exports/GridList.js.map +1 -1
  66. package/dist/exports/GridList.mjs.map +1 -1
  67. package/dist/exports/ListBox.cjs.map +1 -1
  68. package/dist/exports/ListBox.js.map +1 -1
  69. package/dist/exports/ListBox.mjs.map +1 -1
  70. package/dist/exports/Menu.cjs.map +1 -1
  71. package/dist/exports/Menu.js.map +1 -1
  72. package/dist/exports/Menu.mjs.map +1 -1
  73. package/dist/exports/RadioGroup.cjs +3 -0
  74. package/dist/exports/RadioGroup.cjs.map +1 -1
  75. package/dist/exports/RadioGroup.js +2 -2
  76. package/dist/exports/RadioGroup.js.map +1 -1
  77. package/dist/exports/RadioGroup.mjs +2 -2
  78. package/dist/exports/RadioGroup.mjs.map +1 -1
  79. package/dist/exports/RangeCalendar.cjs +3 -0
  80. package/dist/exports/RangeCalendar.cjs.map +1 -1
  81. package/dist/exports/RangeCalendar.js +2 -2
  82. package/dist/exports/RangeCalendar.js.map +1 -1
  83. package/dist/exports/RangeCalendar.mjs +2 -2
  84. package/dist/exports/RangeCalendar.mjs.map +1 -1
  85. package/dist/exports/Select.cjs.map +1 -1
  86. package/dist/exports/Select.js.map +1 -1
  87. package/dist/exports/Select.mjs.map +1 -1
  88. package/dist/exports/SharedElementTransition.cjs.map +1 -1
  89. package/dist/exports/SharedElementTransition.js.map +1 -1
  90. package/dist/exports/SharedElementTransition.mjs.map +1 -1
  91. package/dist/exports/Slider.cjs +2 -0
  92. package/dist/exports/Slider.cjs.map +1 -1
  93. package/dist/exports/Slider.js +2 -2
  94. package/dist/exports/Slider.js.map +1 -1
  95. package/dist/exports/Slider.mjs +2 -2
  96. package/dist/exports/Slider.mjs.map +1 -1
  97. package/dist/exports/Switch.cjs +8 -0
  98. package/dist/exports/Switch.cjs.map +1 -1
  99. package/dist/exports/Switch.js +6 -2
  100. package/dist/exports/Switch.js.map +1 -1
  101. package/dist/exports/Switch.mjs +6 -2
  102. package/dist/exports/Switch.mjs.map +1 -1
  103. package/dist/exports/Table.cjs +1 -0
  104. package/dist/exports/Table.cjs.map +1 -1
  105. package/dist/exports/Table.js +2 -2
  106. package/dist/exports/Table.js.map +1 -1
  107. package/dist/exports/Table.mjs +2 -2
  108. package/dist/exports/Table.mjs.map +1 -1
  109. package/dist/exports/Tabs.cjs.map +1 -1
  110. package/dist/exports/Tabs.js.map +1 -1
  111. package/dist/exports/Tabs.mjs.map +1 -1
  112. package/dist/exports/TagGroup.cjs.map +1 -1
  113. package/dist/exports/TagGroup.js.map +1 -1
  114. package/dist/exports/TagGroup.mjs.map +1 -1
  115. package/dist/exports/TimeField.cjs.map +1 -1
  116. package/dist/exports/TimeField.js.map +1 -1
  117. package/dist/exports/TimeField.mjs.map +1 -1
  118. package/dist/exports/Toast.cjs.map +1 -1
  119. package/dist/exports/Toast.js.map +1 -1
  120. package/dist/exports/Toast.mjs.map +1 -1
  121. package/dist/exports/ToggleButtonGroup.cjs.map +1 -1
  122. package/dist/exports/ToggleButtonGroup.js.map +1 -1
  123. package/dist/exports/ToggleButtonGroup.mjs.map +1 -1
  124. package/dist/exports/Tree.cjs.map +1 -1
  125. package/dist/exports/Tree.js.map +1 -1
  126. package/dist/exports/Tree.mjs.map +1 -1
  127. package/dist/exports/Virtualizer.cjs.map +1 -1
  128. package/dist/exports/Virtualizer.js.map +1 -1
  129. package/dist/exports/Virtualizer.mjs.map +1 -1
  130. package/dist/exports/index.cjs +19 -1
  131. package/dist/exports/index.cjs.map +1 -1
  132. package/dist/exports/index.js +11 -8
  133. package/dist/exports/index.js.map +1 -1
  134. package/dist/exports/index.mjs +11 -8
  135. package/dist/exports/index.mjs.map +1 -1
  136. package/dist/exports/useAsyncList.cjs.map +1 -1
  137. package/dist/exports/useAsyncList.js.map +1 -1
  138. package/dist/exports/useAsyncList.mjs.map +1 -1
  139. package/dist/exports/useDragAndDrop.cjs.map +1 -1
  140. package/dist/exports/useDragAndDrop.js.map +1 -1
  141. package/dist/exports/useDragAndDrop.mjs.map +1 -1
  142. package/dist/exports/useDrop.cjs.map +1 -1
  143. package/dist/exports/useDrop.js.map +1 -1
  144. package/dist/exports/useDrop.mjs.map +1 -1
  145. package/dist/private/Autocomplete.cjs.map +1 -1
  146. package/dist/private/Autocomplete.js.map +1 -1
  147. package/dist/private/Autocomplete.mjs.map +1 -1
  148. package/dist/private/Breadcrumbs.cjs.map +1 -1
  149. package/dist/private/Breadcrumbs.js.map +1 -1
  150. package/dist/private/Breadcrumbs.mjs.map +1 -1
  151. package/dist/private/Button.cjs.map +1 -1
  152. package/dist/private/Button.js.map +1 -1
  153. package/dist/private/Button.mjs.map +1 -1
  154. package/dist/private/Calendar.cjs +34 -2
  155. package/dist/private/Calendar.cjs.map +1 -1
  156. package/dist/private/Calendar.js +34 -5
  157. package/dist/private/Calendar.js.map +1 -1
  158. package/dist/private/Calendar.mjs +34 -5
  159. package/dist/private/Calendar.mjs.map +1 -1
  160. package/dist/private/Checkbox.cjs +104 -17
  161. package/dist/private/Checkbox.cjs.map +1 -1
  162. package/dist/private/Checkbox.js +102 -18
  163. package/dist/private/Checkbox.js.map +1 -1
  164. package/dist/private/Checkbox.mjs +102 -18
  165. package/dist/private/Checkbox.mjs.map +1 -1
  166. package/dist/private/Collection.cjs.map +1 -1
  167. package/dist/private/Collection.js.map +1 -1
  168. package/dist/private/Collection.mjs.map +1 -1
  169. package/dist/private/ColorArea.cjs.map +1 -1
  170. package/dist/private/ColorArea.js.map +1 -1
  171. package/dist/private/ColorArea.mjs.map +1 -1
  172. package/dist/private/ColorField.cjs.map +1 -1
  173. package/dist/private/ColorField.js.map +1 -1
  174. package/dist/private/ColorField.mjs.map +1 -1
  175. package/dist/private/ColorPicker.cjs.map +1 -1
  176. package/dist/private/ColorPicker.js.map +1 -1
  177. package/dist/private/ColorPicker.mjs.map +1 -1
  178. package/dist/private/ColorSlider.cjs.map +1 -1
  179. package/dist/private/ColorSlider.js.map +1 -1
  180. package/dist/private/ColorSlider.mjs.map +1 -1
  181. package/dist/private/ColorSwatch.cjs.map +1 -1
  182. package/dist/private/ColorSwatch.js.map +1 -1
  183. package/dist/private/ColorSwatch.mjs.map +1 -1
  184. package/dist/private/ColorSwatchPicker.cjs.map +1 -1
  185. package/dist/private/ColorSwatchPicker.js.map +1 -1
  186. package/dist/private/ColorSwatchPicker.mjs.map +1 -1
  187. package/dist/private/ColorThumb.cjs.map +1 -1
  188. package/dist/private/ColorThumb.js.map +1 -1
  189. package/dist/private/ColorThumb.mjs.map +1 -1
  190. package/dist/private/ColorWheel.cjs.map +1 -1
  191. package/dist/private/ColorWheel.js.map +1 -1
  192. package/dist/private/ColorWheel.mjs.map +1 -1
  193. package/dist/private/ComboBox.cjs +15 -3
  194. package/dist/private/ComboBox.cjs.map +1 -1
  195. package/dist/private/ComboBox.js +16 -4
  196. package/dist/private/ComboBox.js.map +1 -1
  197. package/dist/private/ComboBox.mjs +16 -4
  198. package/dist/private/ComboBox.mjs.map +1 -1
  199. package/dist/private/DateField.cjs.map +1 -1
  200. package/dist/private/DateField.js.map +1 -1
  201. package/dist/private/DateField.mjs.map +1 -1
  202. package/dist/private/DatePicker.cjs +0 -26
  203. package/dist/private/DatePicker.cjs.map +1 -1
  204. package/dist/private/DatePicker.js +1 -27
  205. package/dist/private/DatePicker.js.map +1 -1
  206. package/dist/private/DatePicker.mjs +1 -27
  207. package/dist/private/DatePicker.mjs.map +1 -1
  208. package/dist/private/Dialog.cjs +1 -17
  209. package/dist/private/Dialog.cjs.map +1 -1
  210. package/dist/private/Dialog.js +2 -18
  211. package/dist/private/Dialog.js.map +1 -1
  212. package/dist/private/Dialog.mjs +2 -18
  213. package/dist/private/Dialog.mjs.map +1 -1
  214. package/dist/private/Disclosure.cjs.map +1 -1
  215. package/dist/private/Disclosure.js.map +1 -1
  216. package/dist/private/Disclosure.mjs.map +1 -1
  217. package/dist/private/DragAndDrop.cjs +3 -3
  218. package/dist/private/DragAndDrop.cjs.map +1 -1
  219. package/dist/private/DragAndDrop.js +3 -3
  220. package/dist/private/DragAndDrop.js.map +1 -1
  221. package/dist/private/DragAndDrop.mjs +3 -3
  222. package/dist/private/DragAndDrop.mjs.map +1 -1
  223. package/dist/private/DropZone.cjs.map +1 -1
  224. package/dist/private/DropZone.js.map +1 -1
  225. package/dist/private/DropZone.mjs.map +1 -1
  226. package/dist/private/FieldError.cjs.map +1 -1
  227. package/dist/private/FieldError.js.map +1 -1
  228. package/dist/private/FieldError.mjs.map +1 -1
  229. package/dist/private/FileTrigger.cjs.map +1 -1
  230. package/dist/private/FileTrigger.js.map +1 -1
  231. package/dist/private/FileTrigger.mjs.map +1 -1
  232. package/dist/private/Form.cjs.map +1 -1
  233. package/dist/private/Form.js.map +1 -1
  234. package/dist/private/Form.mjs.map +1 -1
  235. package/dist/private/GridLayout.cjs +37 -0
  236. package/dist/private/GridLayout.cjs.map +1 -0
  237. package/dist/private/GridLayout.js +32 -0
  238. package/dist/private/GridLayout.js.map +1 -0
  239. package/dist/private/GridLayout.mjs +32 -0
  240. package/dist/private/GridLayout.mjs.map +1 -0
  241. package/dist/private/GridList.cjs +23 -5
  242. package/dist/private/GridList.cjs.map +1 -1
  243. package/dist/private/GridList.js +24 -6
  244. package/dist/private/GridList.js.map +1 -1
  245. package/dist/private/GridList.mjs +24 -6
  246. package/dist/private/GridList.mjs.map +1 -1
  247. package/dist/private/Group.cjs.map +1 -1
  248. package/dist/private/Group.js.map +1 -1
  249. package/dist/private/Group.mjs.map +1 -1
  250. package/dist/private/Header.cjs.map +1 -1
  251. package/dist/private/Header.js.map +1 -1
  252. package/dist/private/Header.mjs.map +1 -1
  253. package/dist/private/Heading.cjs.map +1 -1
  254. package/dist/private/Heading.js.map +1 -1
  255. package/dist/private/Heading.mjs.map +1 -1
  256. package/dist/private/HiddenDateInput.cjs +3 -3
  257. package/dist/private/HiddenDateInput.cjs.map +1 -1
  258. package/dist/private/HiddenDateInput.js +3 -3
  259. package/dist/private/HiddenDateInput.js.map +1 -1
  260. package/dist/private/HiddenDateInput.mjs +3 -3
  261. package/dist/private/HiddenDateInput.mjs.map +1 -1
  262. package/dist/private/Input.cjs.map +1 -1
  263. package/dist/private/Input.js.map +1 -1
  264. package/dist/private/Input.mjs.map +1 -1
  265. package/dist/private/Keyboard.cjs.map +1 -1
  266. package/dist/private/Keyboard.js.map +1 -1
  267. package/dist/private/Keyboard.mjs.map +1 -1
  268. package/dist/private/Label.cjs.map +1 -1
  269. package/dist/private/Label.js.map +1 -1
  270. package/dist/private/Label.mjs.map +1 -1
  271. package/dist/private/Link.cjs.map +1 -1
  272. package/dist/private/Link.js.map +1 -1
  273. package/dist/private/Link.mjs.map +1 -1
  274. package/dist/private/ListBox.cjs +6 -5
  275. package/dist/private/ListBox.cjs.map +1 -1
  276. package/dist/private/ListBox.js +6 -5
  277. package/dist/private/ListBox.js.map +1 -1
  278. package/dist/private/ListBox.mjs +6 -5
  279. package/dist/private/ListBox.mjs.map +1 -1
  280. package/dist/private/Menu.cjs +5 -15
  281. package/dist/private/Menu.cjs.map +1 -1
  282. package/dist/private/Menu.js +6 -16
  283. package/dist/private/Menu.js.map +1 -1
  284. package/dist/private/Menu.mjs +6 -16
  285. package/dist/private/Menu.mjs.map +1 -1
  286. package/dist/private/Meter.cjs.map +1 -1
  287. package/dist/private/Meter.js.map +1 -1
  288. package/dist/private/Meter.mjs.map +1 -1
  289. package/dist/private/Modal.cjs.map +1 -1
  290. package/dist/private/Modal.js.map +1 -1
  291. package/dist/private/Modal.mjs.map +1 -1
  292. package/dist/private/NumberField.cjs.map +1 -1
  293. package/dist/private/NumberField.js.map +1 -1
  294. package/dist/private/NumberField.mjs.map +1 -1
  295. package/dist/private/OverlayArrow.cjs.map +1 -1
  296. package/dist/private/OverlayArrow.js.map +1 -1
  297. package/dist/private/OverlayArrow.mjs.map +1 -1
  298. package/dist/private/Popover.cjs +17 -1
  299. package/dist/private/Popover.cjs.map +1 -1
  300. package/dist/private/Popover.js +19 -2
  301. package/dist/private/Popover.js.map +1 -1
  302. package/dist/private/Popover.mjs +18 -2
  303. package/dist/private/Popover.mjs.map +1 -1
  304. package/dist/private/ProgressBar.cjs.map +1 -1
  305. package/dist/private/ProgressBar.js.map +1 -1
  306. package/dist/private/ProgressBar.mjs.map +1 -1
  307. package/dist/private/RadioGroup.cjs +87 -7
  308. package/dist/private/RadioGroup.cjs.map +1 -1
  309. package/dist/private/RadioGroup.js +86 -9
  310. package/dist/private/RadioGroup.js.map +1 -1
  311. package/dist/private/RadioGroup.mjs +86 -9
  312. package/dist/private/RadioGroup.mjs.map +1 -1
  313. package/dist/private/SearchField.cjs.map +1 -1
  314. package/dist/private/SearchField.js.map +1 -1
  315. package/dist/private/SearchField.mjs.map +1 -1
  316. package/dist/private/Select.cjs +1 -17
  317. package/dist/private/Select.cjs.map +1 -1
  318. package/dist/private/Select.js +2 -18
  319. package/dist/private/Select.js.map +1 -1
  320. package/dist/private/Select.mjs +2 -18
  321. package/dist/private/Select.mjs.map +1 -1
  322. package/dist/private/SelectionIndicator.cjs.map +1 -1
  323. package/dist/private/SelectionIndicator.js.map +1 -1
  324. package/dist/private/SelectionIndicator.mjs.map +1 -1
  325. package/dist/private/Separator.cjs.map +1 -1
  326. package/dist/private/Separator.js.map +1 -1
  327. package/dist/private/Separator.mjs.map +1 -1
  328. package/dist/private/SharedElementTransition.cjs.map +1 -1
  329. package/dist/private/SharedElementTransition.js.map +1 -1
  330. package/dist/private/SharedElementTransition.mjs.map +1 -1
  331. package/dist/private/Slider.cjs +51 -1
  332. package/dist/private/Slider.cjs.map +1 -1
  333. package/dist/private/Slider.js +50 -2
  334. package/dist/private/Slider.js.map +1 -1
  335. package/dist/private/Slider.mjs +50 -2
  336. package/dist/private/Slider.mjs.map +1 -1
  337. package/dist/private/Switch.cjs +118 -4
  338. package/dist/private/Switch.cjs.map +1 -1
  339. package/dist/private/Switch.js +119 -7
  340. package/dist/private/Switch.js.map +1 -1
  341. package/dist/private/Switch.mjs +118 -7
  342. package/dist/private/Switch.mjs.map +1 -1
  343. package/dist/private/Table.cjs +115 -24
  344. package/dist/private/Table.cjs.map +1 -1
  345. package/dist/private/Table.js +116 -26
  346. package/dist/private/Table.js.map +1 -1
  347. package/dist/private/Table.mjs +116 -26
  348. package/dist/private/Table.mjs.map +1 -1
  349. package/dist/private/TableLayout.cjs.map +1 -1
  350. package/dist/private/TableLayout.js.map +1 -1
  351. package/dist/private/TableLayout.mjs.map +1 -1
  352. package/dist/private/Tabs.cjs +4 -3
  353. package/dist/private/Tabs.cjs.map +1 -1
  354. package/dist/private/Tabs.js +4 -3
  355. package/dist/private/Tabs.js.map +1 -1
  356. package/dist/private/Tabs.mjs +4 -3
  357. package/dist/private/Tabs.mjs.map +1 -1
  358. package/dist/private/TagGroup.cjs.map +1 -1
  359. package/dist/private/TagGroup.js.map +1 -1
  360. package/dist/private/TagGroup.mjs.map +1 -1
  361. package/dist/private/Text.cjs.map +1 -1
  362. package/dist/private/Text.js.map +1 -1
  363. package/dist/private/Text.mjs.map +1 -1
  364. package/dist/private/TextArea.cjs.map +1 -1
  365. package/dist/private/TextArea.js.map +1 -1
  366. package/dist/private/TextArea.mjs.map +1 -1
  367. package/dist/private/TextField.cjs.map +1 -1
  368. package/dist/private/TextField.js.map +1 -1
  369. package/dist/private/TextField.mjs.map +1 -1
  370. package/dist/private/Toast.cjs +2 -1
  371. package/dist/private/Toast.cjs.map +1 -1
  372. package/dist/private/Toast.js +2 -1
  373. package/dist/private/Toast.js.map +1 -1
  374. package/dist/private/Toast.mjs +2 -1
  375. package/dist/private/Toast.mjs.map +1 -1
  376. package/dist/private/ToggleButton.cjs.map +1 -1
  377. package/dist/private/ToggleButton.js.map +1 -1
  378. package/dist/private/ToggleButton.mjs.map +1 -1
  379. package/dist/private/ToggleButtonGroup.cjs.map +1 -1
  380. package/dist/private/ToggleButtonGroup.js.map +1 -1
  381. package/dist/private/ToggleButtonGroup.mjs.map +1 -1
  382. package/dist/private/Toolbar.cjs.map +1 -1
  383. package/dist/private/Toolbar.js.map +1 -1
  384. package/dist/private/Toolbar.mjs.map +1 -1
  385. package/dist/private/Tooltip.cjs.map +1 -1
  386. package/dist/private/Tooltip.js.map +1 -1
  387. package/dist/private/Tooltip.mjs.map +1 -1
  388. package/dist/private/Tree.cjs +18 -6
  389. package/dist/private/Tree.cjs.map +1 -1
  390. package/dist/private/Tree.js +19 -7
  391. package/dist/private/Tree.js.map +1 -1
  392. package/dist/private/Tree.mjs +19 -7
  393. package/dist/private/Tree.mjs.map +1 -1
  394. package/dist/private/TreeDropTargetDelegate.cjs +9 -4
  395. package/dist/private/TreeDropTargetDelegate.cjs.map +1 -1
  396. package/dist/private/TreeDropTargetDelegate.js +10 -4
  397. package/dist/private/TreeDropTargetDelegate.js.map +1 -1
  398. package/dist/private/TreeDropTargetDelegate.mjs +9 -4
  399. package/dist/private/TreeDropTargetDelegate.mjs.map +1 -1
  400. package/dist/private/Virtualizer.cjs.map +1 -1
  401. package/dist/private/Virtualizer.js.map +1 -1
  402. package/dist/private/Virtualizer.mjs.map +1 -1
  403. package/dist/private/useDragAndDrop.cjs.map +1 -1
  404. package/dist/private/useDragAndDrop.js.map +1 -1
  405. package/dist/private/useDragAndDrop.mjs.map +1 -1
  406. package/dist/private/utils.cjs.map +1 -1
  407. package/dist/private/utils.js.map +1 -1
  408. package/dist/private/utils.mjs.map +1 -1
  409. package/dist/types/exports/Calendar.d.ts +4 -3
  410. package/dist/types/exports/Checkbox.d.ts +7 -2
  411. package/dist/types/exports/RadioGroup.d.ts +2 -2
  412. package/dist/types/exports/RangeCalendar.d.ts +3 -2
  413. package/dist/types/exports/Slider.d.ts +2 -2
  414. package/dist/types/exports/Switch.d.ts +7 -2
  415. package/dist/types/exports/Table.d.ts +2 -2
  416. package/dist/types/exports/index.d.ts +15 -13
  417. package/dist/types/exports/useDragAndDrop.d.ts +1 -1
  418. package/dist/types/src/Autocomplete.d.ts +1 -1
  419. package/dist/types/src/Breadcrumbs.d.ts +13 -4
  420. package/dist/types/src/Button.d.ts +9 -1
  421. package/dist/types/src/Calendar.d.ts +93 -33
  422. package/dist/types/src/Checkbox.d.ts +93 -2
  423. package/dist/types/src/Collection.d.ts +17 -4
  424. package/dist/types/src/ColorArea.d.ts +6 -2
  425. package/dist/types/src/ColorField.d.ts +8 -1
  426. package/dist/types/src/ColorPicker.d.ts +4 -1
  427. package/dist/types/src/ColorSlider.d.ts +5 -1
  428. package/dist/types/src/ColorSwatch.d.ts +3 -1
  429. package/dist/types/src/ColorSwatchPicker.d.ts +7 -2
  430. package/dist/types/src/ColorThumb.d.ts +10 -2
  431. package/dist/types/src/ColorWheel.d.ts +7 -2
  432. package/dist/types/src/ComboBox.d.ts +24 -11
  433. package/dist/types/src/DateField.d.ts +29 -4
  434. package/dist/types/src/DatePicker.d.ts +15 -3
  435. package/dist/types/src/Dialog.d.ts +3 -1
  436. package/dist/types/src/Disclosure.d.ts +21 -5
  437. package/dist/types/src/DragAndDrop.d.ts +6 -2
  438. package/dist/types/src/DropZone.d.ts +8 -1
  439. package/dist/types/src/FieldError.d.ts +4 -1
  440. package/dist/types/src/FileTrigger.d.ts +2 -1
  441. package/dist/types/src/Form.d.ts +4 -1
  442. package/dist/types/src/GridLayout.d.ts +5 -0
  443. package/dist/types/src/GridList.d.ts +51 -13
  444. package/dist/types/src/Group.d.ts +9 -1
  445. package/dist/types/src/Heading.d.ts +12 -0
  446. package/dist/types/src/HiddenDateInput.d.ts +2 -1
  447. package/dist/types/src/Input.d.ts +8 -1
  448. package/dist/types/src/Link.d.ts +9 -1
  449. package/dist/types/src/ListBox.d.ts +35 -12
  450. package/dist/types/src/Menu.d.ts +22 -10
  451. package/dist/types/src/Meter.d.ts +4 -1
  452. package/dist/types/src/Modal.d.ts +9 -3
  453. package/dist/types/src/NumberField.d.ts +9 -2
  454. package/dist/types/src/OverlayArrow.d.ts +4 -1
  455. package/dist/types/src/Popover.d.ts +12 -3
  456. package/dist/types/src/ProgressBar.d.ts +5 -1
  457. package/dist/types/src/RadioGroup.d.ts +88 -2
  458. package/dist/types/src/SearchField.d.ts +8 -1
  459. package/dist/types/src/Select.d.ts +19 -6
  460. package/dist/types/src/SelectionIndicator.d.ts +7 -2
  461. package/dist/types/src/Separator.d.ts +5 -2
  462. package/dist/types/src/SharedElementTransition.d.ts +2 -0
  463. package/dist/types/src/Slider.d.ts +48 -4
  464. package/dist/types/src/Switch.d.ts +100 -3
  465. package/dist/types/src/Table.d.ts +138 -31
  466. package/dist/types/src/Tabs.d.ts +37 -12
  467. package/dist/types/src/TagGroup.d.ts +18 -7
  468. package/dist/types/src/TextArea.d.ts +3 -1
  469. package/dist/types/src/TextField.d.ts +7 -1
  470. package/dist/types/src/Toast.d.ts +13 -3
  471. package/dist/types/src/ToggleButton.d.ts +10 -3
  472. package/dist/types/src/ToggleButtonGroup.d.ts +7 -2
  473. package/dist/types/src/Toolbar.d.ts +6 -3
  474. package/dist/types/src/Tooltip.d.ts +13 -4
  475. package/dist/types/src/Tree.d.ts +52 -16
  476. package/dist/types/src/useDragAndDrop.d.ts +10 -4
  477. package/dist/types/src/utils.d.ts +109 -17
  478. package/package.json +9 -7
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAsCM,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,6CAAa,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;QAAM,WAAW;IAAI;IAEnE,qBACE,0DAAC,CAAA,GAAA,mDAAgB;QAAE,uBAAS,0DAAC,CAAA,GAAA,qCAAS,GAAM;OACzC,CAAA,2BACC,0DAAC,CAAA,GAAA,6BAAE,EAAE,EAAE;YACL,QAAQ,MAAM,MAAM;YACpB,KAAK;YACJ,GAAG,CAAA,GAAA,qCAAS,EAAE,UAAU,SAAS;YAClC,MAAM,MAAM,IAAI,IAAI;YACpB,OAAO,MAAM,KAAK;YAClB,WAAW,MAAM,SAAS,IAAI;yBAC9B,0DAAC,0CAAmB,QAAQ;YAAC,OAAO;yBAClC,0DAAC;YAAe,YAAY;;AAMxC;AAyBA,MAAM,6CAAuB,CAAA,GAAA,+DAAa;;aACxB,OAAO;;AACzB;AAKO,MAAM,4CAAa,WAAW,GAAG,CAAA,GAAA,qDAAkB,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,2CAAgB,EAAE;IAC/C,IAAI,YAAY;QACd,gBAAgB,YAAY,SAAS;QACrC,YAAY,cAAc;QAC1B,SAAS,IAAM,WAAW,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,6CAAa,EAAE,OAAc;QAAC,QAAQ;QAAM,WAAW;IAAI;IAC1E,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,EAAE;QACJ,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/useBreadcrumbs';\n\nimport {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n DOMRenderProps,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {CollectionBuilder, createLeafComponent} from 'react-aria/CollectionBuilder';\nimport {CollectionNode} from 'react-aria/private/collections/BaseCollection';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {LinkContext} from './Link';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {Node} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, AriaLabelingProps, DOMRenderProps<'ol', undefined>, 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 <dom.ol\n render={props.render}\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 </dom.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, 'li'>, 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 <dom.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 </dom.li>\n );\n});\n"],"names":[],"version":3,"file":"Breadcrumbs.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAgDM,MAAM,0DACX,CAAA,GAAA,0BAAY,EAAyD;AAKhE,MAAM,2CAA4B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,YAC/E,KAA0B,EAC1B,GAAmC;IAEnC,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,6CAAa,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;QAAM,WAAW;IAAI;IAEnE,qBACE,0DAAC,CAAA,GAAA,mDAAgB;QAAE,uBAAS,0DAAC,CAAA,GAAA,qCAAS,GAAM;OACzC,CAAA,2BACC,0DAAC,CAAA,GAAA,6BAAE,EAAE,EAAE;YACL,QAAQ,MAAM,MAAM;YACpB,KAAK;YACJ,GAAG,CAAA,GAAA,qCAAS,EAAE,UAAU,SAAS;YAClC,MAAM,MAAM,IAAI,IAAI;YACpB,OAAO,MAAM,KAAK;YAClB,WAAW,MAAM,SAAS,IAAI;yBAC9B,0DAAC,0CAAmB,QAAQ;YAAC,OAAO;yBAClC,0DAAC;YAAe,YAAY;;AAMxC;AAoCA,MAAM,6CAAuB,CAAA,GAAA,+DAAa;;aACxB,OAAO;;AACzB;AAKO,MAAM,4CAAa,WAAW,GAAG,CAAA,GAAA,qDAAkB,EACxD,sCACA,SAAS,WACP,KAAsB,EACtB,GAAgC,EAChC,IAAmB;IAEnB,sGAAsG;IACtG,IAAI,YAAY,KAAK,OAAO,IAAI;IAChC,IAAI,cAAC,UAAU,YAAE,QAAQ,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;IAC/C,IAAI,YAAY;QACd,gBAAgB,YAAY,SAAS;QACrC,YAAY,cAAc;QAC1B,SAAS,IAAM,WAAW,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,6CAAa,EAAE,OAAc;QAAC,QAAQ;QAAM,WAAW;IAAI;IAC1E,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,EAAE;QACJ,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,cAAc,aAAa;QAC1C,gBAAc,aAAa;qBAC3B,0DAAC,CAAA,GAAA,qCAAU,EAAE,QAAQ;QAAC,OAAO;OAAY,YAAY,QAAQ;AAGnE","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/useBreadcrumbs';\n\nimport {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n DOMRenderProps,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {CollectionBuilder, createLeafComponent} from 'react-aria/CollectionBuilder';\nimport {CollectionNode} from 'react-aria/private/collections/BaseCollection';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {LinkContext} from './Link';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {Node} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T>\n extends\n Omit<CollectionProps<T>, 'disabledKeys'>,\n AriaBreadcrumbsProps,\n StyleProps,\n SlotProps,\n AriaLabelingProps,\n DOMRenderProps<'ol', undefined>,\n GlobalDOMAttributes<HTMLOListElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\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 =\n 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>(\n props: BreadcrumbsProps<T>,\n ref: ForwardedRef<HTMLOListElement>\n) {\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 <dom.ol\n render={props.render}\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 </dom.ol>\n )}\n </CollectionBuilder>\n );\n});\n\nexport interface BreadcrumbRenderProps {\n /**\n * Whether the breadcrumb is for the current page.\n *\n * @selector [data-current]\n */\n isCurrent: boolean;\n /**\n * Whether the breadcrumb is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n}\n\nexport interface BreadcrumbProps\n extends\n RenderProps<BreadcrumbRenderProps, 'li'>,\n AriaLabelingProps,\n GlobalDOMAttributes<HTMLLIElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Breadcrumb'\n */\n className?: ClassNameOrFunction<BreadcrumbRenderProps>;\n /**\n * A unique id for the breadcrumb, which will be passed to `onAction` when the breadcrumb is\n * pressed.\n */\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(\n BreadcrumbNode,\n function Breadcrumb(\n props: BreadcrumbProps,\n ref: ForwardedRef<HTMLLIElement>,\n node: Node<unknown>\n ) {\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 <dom.li\n {...DOMProps}\n {...renderProps}\n ref={ref}\n data-disabled={isDisabled || isCurrent || undefined}\n data-current={isCurrent || undefined}>\n <LinkContext.Provider value={linkProps}>{renderProps.children}</LinkContext.Provider>\n </dom.li>\n );\n }\n);\n"],"names":[],"version":3,"file":"Breadcrumbs.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAsCM,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;YAOc;6BANb,gCAAC,CAAA,GAAA,yCAAE,EAAE,EAAE;YACL,QAAQ,MAAM,MAAM;YACpB,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,CAAA,GAAA,yCAAE,EAAE,EAAE;QACJ,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/useBreadcrumbs';\n\nimport {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n DOMRenderProps,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {CollectionBuilder, createLeafComponent} from 'react-aria/CollectionBuilder';\nimport {CollectionNode} from 'react-aria/private/collections/BaseCollection';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {LinkContext} from './Link';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {Node} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, AriaLabelingProps, DOMRenderProps<'ol', undefined>, 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 <dom.ol\n render={props.render}\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 </dom.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, 'li'>, 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 <dom.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 </dom.li>\n );\n});\n"],"names":[],"version":3,"file":"Breadcrumbs.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAgDM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAyD;AAKhE,MAAM,2CAA4B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,YAC/E,KAA0B,EAC1B,GAAmC;IAEnC,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;YAOc;6BANb,gCAAC,CAAA,GAAA,yCAAE,EAAE,EAAE;YACL,QAAQ,MAAM,MAAM;YACpB,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;AAoCA,MAAM,6CAAuB,CAAA,GAAA,qBAAa;AAE1C;AAFM,qCACY,OAAO;AAMlB,MAAM,4CAAa,WAAW,GAAG,CAAA,GAAA,0BAAkB,EACxD,sCACA,SAAS,WACP,KAAsB,EACtB,GAAgC,EAChC,IAAmB;IAEnB,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,CAAA,GAAA,yCAAE,EAAE,EAAE;QACJ,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,cAAc,aAAa;QAC1C,gBAAc,aAAa;qBAC3B,gCAAC,CAAA,GAAA,yCAAU,EAAE,QAAQ;QAAC,OAAO;OAAY,YAAY,QAAQ;AAGnE","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/useBreadcrumbs';\n\nimport {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n DOMRenderProps,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {CollectionBuilder, createLeafComponent} from 'react-aria/CollectionBuilder';\nimport {CollectionNode} from 'react-aria/private/collections/BaseCollection';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {LinkContext} from './Link';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {Node} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T>\n extends\n Omit<CollectionProps<T>, 'disabledKeys'>,\n AriaBreadcrumbsProps,\n StyleProps,\n SlotProps,\n AriaLabelingProps,\n DOMRenderProps<'ol', undefined>,\n GlobalDOMAttributes<HTMLOListElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\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 =\n 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>(\n props: BreadcrumbsProps<T>,\n ref: ForwardedRef<HTMLOListElement>\n) {\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 <dom.ol\n render={props.render}\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 </dom.ol>\n )}\n </CollectionBuilder>\n );\n});\n\nexport interface BreadcrumbRenderProps {\n /**\n * Whether the breadcrumb is for the current page.\n *\n * @selector [data-current]\n */\n isCurrent: boolean;\n /**\n * Whether the breadcrumb is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n}\n\nexport interface BreadcrumbProps\n extends\n RenderProps<BreadcrumbRenderProps, 'li'>,\n AriaLabelingProps,\n GlobalDOMAttributes<HTMLLIElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Breadcrumb'\n */\n className?: ClassNameOrFunction<BreadcrumbRenderProps>;\n /**\n * A unique id for the breadcrumb, which will be passed to `onAction` when the breadcrumb is\n * pressed.\n */\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(\n BreadcrumbNode,\n function Breadcrumb(\n props: BreadcrumbProps,\n ref: ForwardedRef<HTMLLIElement>,\n node: Node<unknown>\n ) {\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 <dom.li\n {...DOMProps}\n {...renderProps}\n ref={ref}\n data-disabled={isDisabled || isCurrent || undefined}\n data-current={isCurrent || undefined}>\n <LinkContext.Provider value={linkProps}>{renderProps.children}</LinkContext.Provider>\n </dom.li>\n );\n }\n);\n"],"names":[],"version":3,"file":"Breadcrumbs.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAsCM,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,2BACC,gCAAC,CAAA,GAAA,yCAAE,EAAE,EAAE;YACL,QAAQ,MAAM,MAAM;YACpB,KAAK;YACJ,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,SAAS;YAClC,MAAM,MAAM,IAAI,IAAI;YACpB,OAAO,MAAM,KAAK;YAClB,WAAW,MAAM,SAAS,IAAI;yBAC9B,gCAAC,0CAAmB,QAAQ;YAAC,OAAO;yBAClC,gCAAC;YAAe,YAAY;;AAMxC;AAyBA,MAAM,6CAAuB,CAAA,GAAA,qBAAa;;aACxB,OAAO;;AACzB;AAKO,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,WAAW,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,CAAA,GAAA,yCAAE,EAAE,EAAE;QACJ,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/useBreadcrumbs';\n\nimport {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n DOMRenderProps,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {CollectionBuilder, createLeafComponent} from 'react-aria/CollectionBuilder';\nimport {CollectionNode} from 'react-aria/private/collections/BaseCollection';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {LinkContext} from './Link';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {Node} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, AriaLabelingProps, DOMRenderProps<'ol', undefined>, 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 <dom.ol\n render={props.render}\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 </dom.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, 'li'>, 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 <dom.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 </dom.li>\n );\n});\n"],"names":[],"version":3,"file":"Breadcrumbs.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAgDM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAyD;AAKhE,MAAM,2CAA4B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,YAC/E,KAA0B,EAC1B,GAAmC;IAEnC,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,2BACC,gCAAC,CAAA,GAAA,yCAAE,EAAE,EAAE;YACL,QAAQ,MAAM,MAAM;YACpB,KAAK;YACJ,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,SAAS;YAClC,MAAM,MAAM,IAAI,IAAI;YACpB,OAAO,MAAM,KAAK;YAClB,WAAW,MAAM,SAAS,IAAI;yBAC9B,gCAAC,0CAAmB,QAAQ;YAAC,OAAO;yBAClC,gCAAC;YAAe,YAAY;;AAMxC;AAoCA,MAAM,6CAAuB,CAAA,GAAA,qBAAa;;aACxB,OAAO;;AACzB;AAKO,MAAM,4CAAa,WAAW,GAAG,CAAA,GAAA,0BAAkB,EACxD,sCACA,SAAS,WACP,KAAsB,EACtB,GAAgC,EAChC,IAAmB;IAEnB,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,WAAW,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,CAAA,GAAA,yCAAE,EAAE,EAAE;QACJ,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,cAAc,aAAa;QAC1C,gBAAc,aAAa;qBAC3B,gCAAC,CAAA,GAAA,yCAAU,EAAE,QAAQ;QAAC,OAAO;OAAY,YAAY,QAAQ;AAGnE","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/useBreadcrumbs';\n\nimport {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n DOMRenderProps,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {CollectionBuilder, createLeafComponent} from 'react-aria/CollectionBuilder';\nimport {CollectionNode} from 'react-aria/private/collections/BaseCollection';\nimport {CollectionProps, CollectionRendererContext} from './Collection';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {LinkContext} from './Link';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {Node} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\n\nexport interface BreadcrumbsProps<T>\n extends\n Omit<CollectionProps<T>, 'disabledKeys'>,\n AriaBreadcrumbsProps,\n StyleProps,\n SlotProps,\n AriaLabelingProps,\n DOMRenderProps<'ol', undefined>,\n GlobalDOMAttributes<HTMLOListElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\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 =\n 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>(\n props: BreadcrumbsProps<T>,\n ref: ForwardedRef<HTMLOListElement>\n) {\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 <dom.ol\n render={props.render}\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 </dom.ol>\n )}\n </CollectionBuilder>\n );\n});\n\nexport interface BreadcrumbRenderProps {\n /**\n * Whether the breadcrumb is for the current page.\n *\n * @selector [data-current]\n */\n isCurrent: boolean;\n /**\n * Whether the breadcrumb is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n}\n\nexport interface BreadcrumbProps\n extends\n RenderProps<BreadcrumbRenderProps, 'li'>,\n AriaLabelingProps,\n GlobalDOMAttributes<HTMLLIElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Breadcrumb'\n */\n className?: ClassNameOrFunction<BreadcrumbRenderProps>;\n /**\n * A unique id for the breadcrumb, which will be passed to `onAction` when the breadcrumb is\n * pressed.\n */\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(\n BreadcrumbNode,\n function Breadcrumb(\n props: BreadcrumbProps,\n ref: ForwardedRef<HTMLLIElement>,\n node: Node<unknown>\n ) {\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 <dom.li\n {...DOMProps}\n {...renderProps}\n ref={ref}\n data-disabled={isDisabled || isCurrent || undefined}\n data-current={isCurrent || undefined}>\n <LinkContext.Provider value={linkProps}>{renderProps.children}</LinkContext.Provider>\n </dom.li>\n );\n }\n);\n"],"names":[],"version":3,"file":"Breadcrumbs.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AA2EM,MAAM,0DAAgB,CAAA,GAAA,0BAAY,EAAuD,CAAC;AAK1F,MAAM,4CAAS,WAAW,GAAG,CAAA,GAAA,gEAAsB,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,mCAAQ,EAAE,OAAO;IAChD,cAAc,6CAAuB,aAAa;IAClD,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE;IAC3D,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,iCAAO,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,aAAa;IAC1B;IAEA,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;QACR,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,2BAAI,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AAE,QAAQ;QAAC,OAAO;YAAC,IAAI;QAAU;OAChD,YAAY,QAAQ;AAI7B;AAEA,8EAA8E;AAC9E,MAAM,gDAA0B;AAEhC,SAAS,6CAAuB,KAAK,EAAE,SAAS;IAC9C,IAAI,WAAW;QACb,IAAK,MAAM,OAAO,MAChB,IAAI,IAAI,UAAU,CAAC,SAAS,CAAC,8CAAwB,IAAI,CAAC,MACxD,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/private/live-announcer/LiveAnnouncer';\n\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {HoverEvents} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\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, 'button'>, 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 <dom.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 </dom.button>\n );\n});\n\n// Events to preserve when isPending is true (for tooltips and other overlays)\nconst PRESERVED_EVENT_PATTERN = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;\n\nfunction useDisableInteractions(props, isPending) {\n if (isPending) {\n for (const key in props) {\n if (key.startsWith('on') && !PRESERVED_EVENT_PATTERN.test(key)) {\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.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAyFM,MAAM,0DAAgB,CAAA,GAAA,0BAAY,EAAuD,CAAC;AAK1F,MAAM,4CAAS,WAAW,GAAG,CAAA,GAAA,gEAAsB,EAAE,SAAS,OACnE,KAAkB,EAClB,GAAoC;IAEpC,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,mCAAQ,EAAE,OAAO;IAChD,cAAc,6CAAuB,aAAa;IAClD,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE;IAC3D,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,iCAAO,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,aAAa;IAC1B;IAEA,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;QACR,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAAA,GAAA,2BAAI,EAAE,YAAY,EAAE;IACnC,IAAI,aAAa,CAAA,GAAA,2BAAI;IAErB,IAAI,iBAAiB,WAAW,CAAC,kBAAkB;IACnD,IAAI,WAAW;QACb,uCAAuC;QACvC,uDAA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AS;IAC9C,IAAI,WAAW;QACb,IAAK,MAAM,OAAO,MAChB,IAAI,IAAI,UAAU,CAAC,SAAS,CAAC,8CAAwB,IAAI,CAAC,MACxD,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/private/live-announcer/LiveAnnouncer';\n\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {HoverEvents} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\n\nexport interface ButtonRenderProps {\n /**\n * Whether the button is currently hovered with a mouse.\n *\n * @selector [data-hovered]\n */\n isHovered: boolean;\n /**\n * Whether the button is currently in a pressed state.\n *\n * @selector [data-pressed]\n */\n isPressed: boolean;\n /**\n * Whether the button is focused, either via a mouse or keyboard.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the button is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the button is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the button is currently in a pending state.\n *\n * @selector [data-pending]\n */\n isPending: boolean;\n}\n\nexport interface ButtonProps\n extends\n Omit<AriaButtonProps, 'children' | 'href' | 'target' | 'rel' | 'elementType'>,\n HoverEvents,\n SlotProps,\n RenderProps<ButtonRenderProps, 'button'>,\n Omit<GlobalDOMAttributes<HTMLButtonElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\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(\n props: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement>\n) {\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 <dom.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 </dom.button>\n );\n});\n\n// Events to preserve when isPending is true (for tooltips and other overlays)\nconst PRESERVED_EVENT_PATTERN =\n /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;\n\nfunction useDisableInteractions(props, isPending) {\n if (isPending) {\n for (const key in props) {\n if (key.startsWith('on') && !PRESERVED_EVENT_PATTERN.test(key)) {\n props[key] = undefined;\n }\n }\n props.href = undefined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SAAS,CAAC,8CAAwB,IAAI,CAAC,MACxD,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/private/live-announcer/LiveAnnouncer';\n\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {HoverEvents} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\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, 'button'>, 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 <dom.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 </dom.button>\n );\n});\n\n// Events to preserve when isPending is true (for tooltips and other overlays)\nconst PRESERVED_EVENT_PATTERN = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;\n\nfunction useDisableInteractions(props, isPending) {\n if (isPending) {\n for (const key in props) {\n if (key.startsWith('on') && !PRESERVED_EVENT_PATTERN.test(key)) {\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.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAyFM,MAAM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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/private/live-announcer/LiveAnnouncer';\n\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {HoverEvents} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\n\nexport interface ButtonRenderProps {\n /**\n * Whether the button is currently hovered with a mouse.\n *\n * @selector [data-hovered]\n */\n isHovered: boolean;\n /**\n * Whether the button is currently in a pressed state.\n *\n * @selector [data-pressed]\n */\n isPressed: boolean;\n /**\n * Whether the button is focused, either via a mouse or keyboard.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the button is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the button is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the button is currently in a pending state.\n *\n * @selector [data-pending]\n */\n isPending: boolean;\n}\n\nexport interface ButtonProps\n extends\n Omit<AriaButtonProps, 'children' | 'href' | 'target' | 'rel' | 'elementType'>,\n HoverEvents,\n SlotProps,\n RenderProps<ButtonRenderProps, 'button'>,\n Omit<GlobalDOMAttributes<HTMLButtonElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\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(\n props: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement>\n) {\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 <dom.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 </dom.button>\n );\n});\n\n// Events to preserve when isPending is true (for tooltips and other overlays)\nconst PRESERVED_EVENT_PATTERN =\n /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;\n\nfunction useDisableInteractions(props, isPending) {\n if (isPending) {\n for (const key in props) {\n if (key.startsWith('on') && !PRESERVED_EVENT_PATTERN.test(key)) {\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.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AA2EM,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAAuD,CAAC;AAK1F,MAAM,4CAAS,WAAW,GAAG,CAAA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AA,GAAA,eAAO,EAAE,SAAS;aACb,IAAI,WAAW,OAAO,IAAI,aAAa,CAAC,WAC7C,CAAA,GAAA,eAAO,EAAE,SAAS;QAEpB,WAAW,OAAO,GAAG;IACvB,GAAG;QAAC;QAAW;QAAW;QAAgB;KAAS;IAEnD,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,OAAO;IAEvB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,MAAM;QACR,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,8EAA8E;AAC9E,MAAM,gDAA0B;AAEhC,SAAS,6CAAuB,KAAK,EAAE,SAAS;IAC9C,IAAI,WAAW;QACb,IAAK,MAAM,OAAO,MAChB,IAAI,IAAI,UAAU,CAAC,SAAS,CAAC,8CAAwB,IAAI,CAAC,MACxD,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/private/live-announcer/LiveAnnouncer';\n\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {HoverEvents} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\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, 'button'>, 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 <dom.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 </dom.button>\n );\n});\n\n// Events to preserve when isPending is true (for tooltips and other overlays)\nconst PRESERVED_EVENT_PATTERN = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;\n\nfunction useDisableInteractions(props, isPending) {\n if (isPending) {\n for (const key in props) {\n if (key.startsWith('on') && !PRESERVED_EVENT_PATTERN.test(key)) {\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.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAyFM,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAAuD,CAAC;AAK1F,MAAM,4CAAS,WAAW,GAAG,CAAA,GAAA,8BAAsB,EAAE,SAAS,OACnE,KAAkB,EAClB,GAAoC;IAEpC,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,MAAM;IACV,IAAI,aAAC,S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W;QAAgB;KAAS;IAEnD,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,OAAO;IAEvB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,MAAM;QACR,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,8EAA8E;AAC9E,MAAM,gDACJ;AAEF,SAAS,6CAAuB,KAAK,EAAE,SAAS;IAC9C,IAAI,WAAW;QACb,IAAK,MAAM,OAAO,MAChB,IAAI,IAAI,UAAU,CAAC,SAAS,CAAC,8CAAwB,IAAI,CAAC,MACxD,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/private/live-announcer/LiveAnnouncer';\n\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {HoverEvents} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressBarContext} from './ProgressBar';\nimport React, {createContext, ForwardedRef, useEffect, useRef} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\n\nexport interface ButtonRenderProps {\n /**\n * Whether the button is currently hovered with a mouse.\n *\n * @selector [data-hovered]\n */\n isHovered: boolean;\n /**\n * Whether the button is currently in a pressed state.\n *\n * @selector [data-pressed]\n */\n isPressed: boolean;\n /**\n * Whether the button is focused, either via a mouse or keyboard.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the button is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the button is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the button is currently in a pending state.\n *\n * @selector [data-pending]\n */\n isPending: boolean;\n}\n\nexport interface ButtonProps\n extends\n Omit<AriaButtonProps, 'children' | 'href' | 'target' | 'rel' | 'elementType'>,\n HoverEvents,\n SlotProps,\n RenderProps<ButtonRenderProps, 'button'>,\n Omit<GlobalDOMAttributes<HTMLButtonElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\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(\n props: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement>\n) {\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 <dom.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 </dom.button>\n );\n});\n\n// Events to preserve when isPending is true (for tooltips and other overlays)\nconst PRESERVED_EVENT_PATTERN =\n /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;\n\nfunction useDisableInteractions(props, isPending) {\n if (isPending) {\n for (const key in props) {\n if (key.startsWith('on') && !PRESERVED_EVENT_PATTERN.test(key)) {\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.mjs.map"}
@@ -35,6 +35,9 @@ $parcel$export(module.exports, "CalendarGridHeader", function () { return $27a81
35
35
  $parcel$export(module.exports, "CalendarHeaderCell", function () { return $27a812393b1f8a86$export$ad2135cac3a11b3d; });
36
36
  $parcel$export(module.exports, "CalendarGridBody", function () { return $27a812393b1f8a86$export$e11f8ba65d857bff; });
37
37
  $parcel$export(module.exports, "CalendarCell", function () { return $27a812393b1f8a86$export$5d847498420df57b; });
38
+ $parcel$export(module.exports, "CalendarYearPicker", function () { return $27a812393b1f8a86$export$f0ed7ae5d49afb95; });
39
+ $parcel$export(module.exports, "CalendarMonthPicker", function () { return $27a812393b1f8a86$export$76806186243e9de6; });
40
+ $parcel$export(module.exports, "CalendarHeading", function () { return $27a812393b1f8a86$export$77af08ed164baa7; });
38
41
  /*
39
42
  * Copyright 2022 Adobe. All rights reserved.
40
43
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -310,7 +313,7 @@ const $27a812393b1f8a86$export$5d847498420df57b = /*#__PURE__*/ (0, $ewi3q$react
310
313
  let { startDate: currentMonth } = (0, $ewi3q$react.useContext)($27a812393b1f8a86$var$InternalCalendarGridContext) ?? {
311
314
  startDate: state.visibleRange.start
312
315
  };
313
- let isOutsideMonth = !(0, $ewi3q$internationalizeddate.isSameMonth)(currentMonth, date);
316
+ let isOutsideMonth = state.visibleDuration.days || state.visibleDuration.weeks ? false : !(0, $ewi3q$internationalizeddate.isSameMonth)(currentMonth, date);
314
317
  let istoday = (0, $ewi3q$internationalizeddate.isToday)(date, state.timeZone);
315
318
  let buttonRef = (0, $ewi3q$react.useRef)(null);
316
319
  let { cellProps: cellProps, buttonProps: buttonProps, ...states } = (0, $ewi3q$reactariauseCalendar.useCalendarCell)({
@@ -319,7 +322,7 @@ const $27a812393b1f8a86$export$5d847498420df57b = /*#__PURE__*/ (0, $ewi3q$react
319
322
  }, state, buttonRef);
320
323
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $ewi3q$reactariauseHover.useHover)({
321
324
  ...otherProps,
322
- isDisabled: states.isDisabled
325
+ isDisabled: states.isDisabled || states.isUnavailable
323
326
  });
324
327
  let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $ewi3q$reactariauseFocusRing.useFocusRing)();
325
328
  isFocusVisible &&= states.isFocused;
@@ -370,6 +373,35 @@ const $27a812393b1f8a86$export$5d847498420df57b = /*#__PURE__*/ (0, $ewi3q$react
370
373
  ref: buttonRef
371
374
  }));
372
375
  });
376
+ function $27a812393b1f8a86$export$f0ed7ae5d49afb95(props) {
377
+ let calendarState = (0, ($parcel$interopDefault($ewi3q$react))).useContext($27a812393b1f8a86$export$9e31dcedda1dadc7);
378
+ let rangeCalendarState = (0, ($parcel$interopDefault($ewi3q$react))).useContext($27a812393b1f8a86$export$5e0fc348c00f87a0);
379
+ let state = calendarState || rangeCalendarState;
380
+ let aria = (0, $ewi3q$reactariauseCalendar.useCalendarYearPicker)(props, state);
381
+ return props.children(aria);
382
+ }
383
+ function $27a812393b1f8a86$export$76806186243e9de6(props) {
384
+ let calendarState = (0, ($parcel$interopDefault($ewi3q$react))).useContext($27a812393b1f8a86$export$9e31dcedda1dadc7);
385
+ let rangeCalendarState = (0, ($parcel$interopDefault($ewi3q$react))).useContext($27a812393b1f8a86$export$5e0fc348c00f87a0);
386
+ let state = calendarState || rangeCalendarState;
387
+ let aria = (0, $ewi3q$reactariauseCalendar.useCalendarMonthPicker)(props, state);
388
+ return props.children(aria);
389
+ }
390
+ const $27a812393b1f8a86$export$77af08ed164baa7 = /*#__PURE__*/ (0, $ewi3q$react.forwardRef)(function CalendarHeading(props, ref) {
391
+ let { offset: offset, format: format, className: className = 'react-aria-CalendarHeading', ...headingProps } = props;
392
+ let calendarState = (0, ($parcel$interopDefault($ewi3q$react))).useContext($27a812393b1f8a86$export$9e31dcedda1dadc7);
393
+ let rangeCalendarState = (0, ($parcel$interopDefault($ewi3q$react))).useContext($27a812393b1f8a86$export$5e0fc348c00f87a0);
394
+ let state = calendarState || rangeCalendarState;
395
+ let aria = (0, $ewi3q$reactariauseCalendar.useCalendarHeading)({
396
+ offset: offset,
397
+ format: format
398
+ }, state);
399
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($ewi3q$react))).createElement((0, $03e8b4fd5e44cde9$exports.Heading), {
400
+ ...headingProps,
401
+ className: className,
402
+ ref: ref
403
+ }, aria);
404
+ });
373
405
 
374
406
 
375
407
  //# sourceMappingURL=Calendar.cjs.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAiGM,MAAM,0DAAkB,CAAA,GAAA,0BAA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A,wCAAa,EAAE;QAC/B,GAAG,UAAU;QACb,iBAAiB,OAAO,aAAa;QACrC,kBAAkB;QAClB,QAAQ;kBACN;uBACA;4BACA;4BACA;8BACA;4BACA;YACA,SAAS;YACT,GAAG,MAAM;QACX;IACF;IAEA,IAAI,YAAY;QACd,gBAAgB,OAAO,SAAS,IAAI;QACpC,gBAAgB,aAAa;QAC7B,gBAAgB,OAAO,SAAS,IAAI;QACpC,oBAAoB,OAAO,aAAa,IAAI;QAC5C,iBAAiB,OAAO,UAAU,IAAI;QACtC,sBAAsB,kBAAkB;QACxC,8BAA8B,OAAO,qBAAqB,IAAI;QAC9D,sBAAsB,kBAAkB;QACxC,iBAAiB,OAAO,UAAU,IAAI;QACtC,wBAAwB,oBAAoB;QAC5C,sBAAsB,kBAAkB;QACxC,gBAAgB,OAAO,SAAS,IAAI;QACpC,cAAc,WAAW;IAC3B;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,YAAY;QAAC,QAAQ;IAAI;IAEvD,qBACE,0DAAC;QAAI,GAAG,SAAS;QAAE,KAAK;qBACtB,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QAAE,GAAG,CAAA,GAAA,qCAAS,EAAE,UAAU,aAAa,YAAY,YAAY,WAAW,YAAY;QAAE,KAAK;;AAG3G","sources":["packages/react-aria-components/src/Calendar.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 {AriaCalendarProps, useCalendar, useCalendarCell, useCalendarGrid} from 'react-aria/useCalendar';\n\nimport {AriaRangeCalendarProps, useRangeCalendar} from 'react-aria/useRangeCalendar';\nimport {ButtonContext} from './Button';\nimport {CalendarDate, CalendarIdentifier, createCalendar, DateDuration, endOfMonth, Calendar as ICalendar, isSameDay, isSameMonth, isToday} from '@internationalized/date';\nimport {CalendarState} from 'react-stately/useCalendarState';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {DateValue, useRangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {DOMAttributes, FocusableElement, forwardRefType, GlobalDOMAttributes, HoverEvents} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {HeadingContext} from './Heading';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport React, {createContext, ForwardedRef, forwardRef, ReactElement, useContext, useRef} from 'react';\nimport {TextContext} from './Text';\nimport {useCalendarState} from 'react-stately/useCalendarState';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {VisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface CalendarRenderProps {\n /**\n * Whether the calendar is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the calendar.\n */\n state: CalendarState,\n /**\n * Whether the calendar is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean\n}\n\nexport interface RangeCalendarRenderProps extends Omit<CalendarRenderProps, 'state'> {\n /**\n * State of the range calendar.\n */\n state: RangeCalendarState\n}\n\nexport interface CalendarProps<T extends DateValue> extends Omit<AriaCalendarProps<T>, 'errorMessage' | 'validationState'>, RenderProps<CalendarRenderProps, 'div'>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\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-Calendar'\n */\n className?: ClassNameOrFunction<CalendarRenderProps>,\n /**\n * The amount of days that will be displayed at once. This affects how pagination works.\n * @default {months: 1}\n */\n visibleDuration?: DateDuration,\n /**\n * A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html)\n * object for a given calendar identifier. If not provided, the `createCalendar` function\n * from `@internationalized/date` will be used.\n */\n createCalendar?: (identifier: CalendarIdentifier) => ICalendar\n}\n\nexport interface RangeCalendarProps<T extends DateValue> extends Omit<AriaRangeCalendarProps<T>, 'errorMessage' | 'validationState'>, RenderProps<RangeCalendarRenderProps, 'div'>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\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-RangeCalendar'\n */\n className?: ClassNameOrFunction<RangeCalendarRenderProps>,\n /**\n * The amount of days that will be displayed at once. This affects how pagination works.\n * @default {months: 1}\n */\n visibleDuration?: DateDuration,\n /**\n * A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html)\n * object for a given calendar identifier. If not provided, the `createCalendar` function\n * from `@internationalized/date` will be used.\n */\n createCalendar?: (identifier: CalendarIdentifier) => ICalendar\n}\n\nexport const CalendarContext = createContext<ContextValue<CalendarProps<any>, HTMLDivElement>>(null);\nexport const RangeCalendarContext = createContext<ContextValue<RangeCalendarProps<any>, HTMLDivElement>>(null);\nexport const CalendarStateContext = createContext<CalendarState | null>(null);\nexport const RangeCalendarStateContext = createContext<RangeCalendarState | null>(null);\n\n/**\n * A calendar displays one or more date grids and allows users to select a single date.\n */\nexport const Calendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function Calendar<T extends DateValue>(props: CalendarProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, CalendarContext);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n createCalendar: props.createCalendar || createCalendar\n });\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps, title} = useCalendar(props, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false,\n isInvalid: state.isValueInvalid\n },\n defaultClassName: 'react-aria-Calendar'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, calendarProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={state.isValueInvalid || undefined}>\n <Provider\n values={[\n [ButtonContext, {\n slots: {\n previous: prevButtonProps,\n next: nextButtonProps\n }\n }],\n [HeadingContext, {'aria-hidden': true, level: 2, children: title}],\n [CalendarStateContext, state],\n [CalendarContext, props as CalendarProps<any>],\n [TextContext, {\n slots: {\n errorMessage: errorMessageProps\n }\n }]\n ]}>\n {/* Add a screen reader only description of the entire visible range rather than\n * a separate heading above each month grid. This is placed first in the DOM order\n * so that it is the first thing a touch screen reader user encounters.\n * In addition, VoiceOver on iOS does not announce the aria-label of the grid\n * elements, so the aria-label of the Calendar is included here as well. */}\n <VisuallyHidden>\n <h2>{calendarProps['aria-label']}</h2>\n </VisuallyHidden>\n {renderProps.children}\n {/* For touch screen readers, add a visually hidden next button after the month grid\n * so it's easy to navigate after reaching the end without going all the way\n * back to the start of the month. */}\n <VisuallyHidden>\n <button\n aria-label={nextButtonProps['aria-label']}\n disabled={nextButtonProps.isDisabled}\n onClick={() => state.focusNextPage()}\n tabIndex={-1} />\n </VisuallyHidden>\n </Provider>\n </dom.div>\n );\n});\n\n/**\n * A range calendar displays one or more date grids and allows users to select a contiguous range of dates.\n */\nexport const RangeCalendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function RangeCalendar<T extends DateValue>(props: RangeCalendarProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, RangeCalendarContext);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n createCalendar: props.createCalendar || createCalendar\n });\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps, title} = useRangeCalendar(\n props,\n state,\n ref\n );\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false,\n isInvalid: state.isValueInvalid\n },\n defaultClassName: 'react-aria-RangeCalendar'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(renderProps, DOMProps, calendarProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={state.isValueInvalid || undefined}>\n <Provider\n values={[\n [ButtonContext, {\n slots: {\n previous: prevButtonProps,\n next: nextButtonProps\n }\n }],\n [HeadingContext, {'aria-hidden': true, level: 2, children: title}],\n [RangeCalendarStateContext, state],\n [RangeCalendarContext, props as RangeCalendarProps<any>],\n [TextContext, {\n slots: {\n errorMessage: errorMessageProps\n }\n }]\n ]}>\n {/* Add a screen reader only description of the entire visible range rather than\n * a separate heading above each month grid. This is placed first in the DOM order\n * so that it is the first thing a touch screen reader user encounters.\n * In addition, VoiceOver on iOS does not announce the aria-label of the grid\n * elements, so the aria-label of the Calendar is included here as well. */}\n <VisuallyHidden>\n <h2>{calendarProps['aria-label']}</h2>\n </VisuallyHidden>\n {renderProps.children}\n {/* For touch screen readers, add a visually hidden next button after the month grid\n * so it's easy to navigate after reaching the end without going all the way\n * back to the start of the month. */}\n <VisuallyHidden>\n <button\n aria-label={nextButtonProps['aria-label']}\n disabled={nextButtonProps.isDisabled}\n onClick={() => state.focusNextPage()}\n tabIndex={-1} />\n </VisuallyHidden>\n </Provider>\n </dom.div>\n );\n});\n\nexport interface CalendarCellRenderProps {\n /** The date that the cell represents. */\n date: CalendarDate,\n /** The day number formatted according to the current locale. */\n formattedDate: string,\n /**\n * Whether the cell is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the cell is currently being pressed.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the cell is selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the cell is the first date in a range selection.\n * @selector [data-selection-start]\n */\n isSelectionStart: boolean,\n /**\n * Whether the cell is the last date in a range selection.\n * @selector [data-selection-end]\n */\n isSelectionEnd: boolean,\n /**\n * Whether the cell is focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the cell is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the cell is disabled, according to the calendar's `minValue`, `maxValue`, and `isDisabled` props.\n * Disabled dates are not focusable, and cannot be selected by the user. They are typically\n * displayed with a dimmed appearance.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the cell is outside the visible range of the calendar.\n * For example, dates before the first day of a month in the same week.\n * @selector [data-outside-visible-range]\n */\n isOutsideVisibleRange: boolean,\n /**\n * Whether the cell is outside the current month.\n * @selector [data-outside-month]\n */\n isOutsideMonth: boolean,\n /**\n * Whether the cell is unavailable, according to the calendar's `isDateUnavailable` prop. Unavailable dates remain\n * focusable, but cannot be selected by the user. They should be displayed with a visual affordance to indicate they\n * are unavailable, such as a different color or a strikethrough.\n *\n * Note that because they are focusable, unavailable dates must meet a 4.5:1 color contrast ratio,\n * [as defined by WCAG](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html).\n *\n * @selector [data-unavailable]\n */\n isUnavailable: boolean,\n /**\n * Whether the cell is part of an invalid selection.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the cell is today.\n * @selector [data-today]\n */\n isToday: boolean\n}\n\nexport interface CalendarGridProps extends StyleProps, DOMRenderProps<'table', undefined>, GlobalDOMAttributes<HTMLTableElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-CalendarGrid'\n */\n className?: string,\n /**\n * Either a function to render calendar cells for each date in the month,\n * or children containing a `<CalendarGridHeader>`` and `<CalendarGridBody>`\n * when additional customization is needed.\n */\n children?: ReactElement | ReactElement[] | ((date: CalendarDate) => ReactElement),\n /**\n * An offset from the beginning of the visible date range that this\n * CalendarGrid should display. Useful when displaying more than one\n * month at a time.\n */\n offset?: DateDuration,\n /**\n * The style of weekday names to display in the calendar grid header,\n * e.g. single letter, abbreviation, or full day name.\n * @default \"narrow\"\n */\n weekdayStyle?: 'narrow' | 'short' | 'long'\n}\n\ninterface InternalCalendarGridContextValue {\n headerProps: DOMAttributes<FocusableElement>,\n weekDays: string[],\n startDate: CalendarDate,\n weeksInMonth: number\n}\n\nconst InternalCalendarGridContext = createContext<InternalCalendarGridContextValue | null>(null);\n\n/**\n * A calendar grid displays a single grid of days within a calendar or range calendar which\n * can be keyboard navigated and selected by the user.\n */\nexport const CalendarGrid = /*#__PURE__*/ (forwardRef as forwardRefType)(function CalendarGrid(props: CalendarGridProps, ref: ForwardedRef<HTMLTableElement>) {\n let calendarState = useContext(CalendarStateContext);\n let rangeCalendarState = useContext(RangeCalendarStateContext);\n let calenderProps = useSlottedContext(CalendarContext)!;\n let rangeCalenderProps = useSlottedContext(RangeCalendarContext)!;\n let state = calendarState ?? rangeCalendarState!;\n let startDate = state.visibleRange.start;\n if (props.offset) {\n startDate = startDate.add(props.offset);\n }\n\n let firstDayOfWeek = calenderProps?.firstDayOfWeek ?? rangeCalenderProps?.firstDayOfWeek;\n\n let {gridProps, headerProps, weekDays, weeksInMonth} = useCalendarGrid({\n startDate,\n endDate: endOfMonth(startDate),\n weekdayStyle: props.weekdayStyle,\n firstDayOfWeek\n }, state);\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <InternalCalendarGridContext.Provider value={{headerProps, weekDays, startDate, weeksInMonth}}>\n <dom.table\n render={props.render}\n {...mergeProps(DOMProps, gridProps)}\n ref={ref}\n style={props.style}\n cellPadding={0}\n className={props.className ?? 'react-aria-CalendarGrid'}>\n {typeof props.children !== 'function'\n ? props.children\n : (<>\n <CalendarGridHeaderForwardRef>\n {day => <CalendarHeaderCellForwardRef>{day}</CalendarHeaderCellForwardRef>}\n </CalendarGridHeaderForwardRef>\n <CalendarGridBodyForwardRef>\n {props.children}\n </CalendarGridBodyForwardRef>\n </>)\n }\n </dom.table>\n </InternalCalendarGridContext.Provider>\n );\n});\n\nexport interface CalendarGridHeaderProps extends StyleProps, DOMRenderProps<'thead', undefined>, GlobalDOMAttributes<HTMLTableSectionElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-CalendarGridHeader'\n */\n className?: string,\n /** A function to render a `<CalendarHeaderCell>` for a weekday name. */\n children: (day: string) => ReactElement\n}\n\nfunction CalendarGridHeader(props: CalendarGridHeaderProps, ref: ForwardedRef<HTMLTableSectionElement>) {\n let {children, style, className} = props;\n let {headerProps, weekDays} = useContext(InternalCalendarGridContext)!;\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.thead\n render={props.render}\n {...mergeProps(DOMProps, headerProps)}\n ref={ref}\n style={style}\n className={className ?? 'react-aria-CalendarGridHeader'}>\n <tr>\n {weekDays.map((day, key) => React.cloneElement(children(day), {key}))}\n </tr>\n </dom.thead>\n );\n}\n\n/**\n * A calendar grid header displays a row of week day names at the top of a month.\n */\nconst CalendarGridHeaderForwardRef = /*#__PURE__*/ (forwardRef as forwardRefType)(CalendarGridHeader);\nexport {CalendarGridHeaderForwardRef as CalendarGridHeader};\n\nexport interface CalendarHeaderCellProps extends DOMProps, DOMRenderProps<'th', undefined>, GlobalDOMAttributes<HTMLTableHeaderCellElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-CalendarHeaderCell'\n */\n className?: string\n}\n\nfunction CalendarHeaderCell(props: CalendarHeaderCellProps, ref: ForwardedRef<HTMLTableCellElement>) {\n let {children, style, className} = props;\n let DOMProps = filterDOMProps(props, {global: true});\n return (\n <dom.th\n render={props.render}\n {...DOMProps}\n ref={ref}\n style={style}\n className={className || 'react-aria-CalendarHeaderCell'}>\n {children}\n </dom.th>\n );\n}\n\n/**\n * A calendar header cell displays a week day name at the top of a column within a calendar.\n */\nconst CalendarHeaderCellForwardRef = forwardRef(CalendarHeaderCell);\nexport {CalendarHeaderCellForwardRef as CalendarHeaderCell};\n\nexport interface CalendarGridBodyProps extends StyleProps, DOMRenderProps<'tbody', undefined>, GlobalDOMAttributes<HTMLTableSectionElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-CalendarGridBody'\n */\n className?: string,\n /** A function to render a `<CalendarCell>` for a given date. */\n children: (date: CalendarDate) => ReactElement\n}\n\nfunction CalendarGridBody(props: CalendarGridBodyProps, ref: ForwardedRef<HTMLTableSectionElement>) {\n let {children, style, className} = props;\n let calendarState = useContext(CalendarStateContext);\n let rangeCalendarState = useContext(RangeCalendarStateContext);\n let state = calendarState ?? rangeCalendarState!;\n let {startDate, weeksInMonth} = useContext(InternalCalendarGridContext)!;\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.tbody\n render={props.render}\n {...DOMProps}\n ref={ref}\n style={style}\n className={className ?? 'react-aria-CalendarGridBody'}>\n {[...new Array(weeksInMonth).keys()].map((weekIndex) => (\n <tr key={weekIndex}>\n {state.getDatesInWeek(weekIndex, startDate).map((date, i) => (\n date\n ? React.cloneElement(children(date), {key: i})\n : <td key={i} />\n ))}\n </tr>\n ))}\n </dom.tbody>\n );\n}\n\n/**\n * A calendar grid body displays a grid of calendar cells within a month.\n */\nconst CalendarGridBodyForwardRef = /*#__PURE__*/ (forwardRef as forwardRefType)(CalendarGridBody);\nexport {CalendarGridBodyForwardRef as CalendarGridBody};\n\nexport interface CalendarCellProps extends RenderProps<CalendarCellRenderProps, 'div'>, HoverEvents, GlobalDOMAttributes<HTMLTableCellElement> {\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-CalendarCell'\n */\n className?: ClassNameOrFunction<CalendarCellRenderProps>,\n /** The date to render in the cell. */\n date: CalendarDate\n}\n\n/**\n * A calendar cell displays a date cell within a calendar grid which can be selected by the user.\n */\nexport const CalendarCell = /*#__PURE__*/ (forwardRef as forwardRefType)(function CalendarCell({date, ...otherProps}: CalendarCellProps, ref: ForwardedRef<HTMLTableCellElement>) {\n let calendarState = useContext(CalendarStateContext);\n let rangeCalendarState = useContext(RangeCalendarStateContext);\n let state = calendarState ?? rangeCalendarState!;\n let {startDate: currentMonth} = useContext(InternalCalendarGridContext) ?? {startDate: state.visibleRange.start};\n let isOutsideMonth = !isSameMonth(currentMonth, date);\n let istoday = isToday(date, state.timeZone);\n\n let buttonRef = useRef<HTMLDivElement>(null);\n let {cellProps, buttonProps, ...states} = useCalendarCell(\n {date, isOutsideMonth},\n state,\n buttonRef\n );\n\n let {hoverProps, isHovered} = useHover({...otherProps, isDisabled: states.isDisabled});\n let {focusProps, isFocusVisible} = useFocusRing();\n isFocusVisible &&= states.isFocused;\n let isSelectionStart = false;\n let isSelectionEnd = false;\n if ('highlightedRange' in state && state.highlightedRange) {\n isSelectionStart = isSameDay(date, state.highlightedRange.start);\n isSelectionEnd = isSameDay(date, state.highlightedRange.end);\n }\n\n let renderProps = useRenderProps({\n ...otherProps,\n defaultChildren: states.formattedDate,\n defaultClassName: 'react-aria-CalendarCell',\n values: {\n date,\n isHovered,\n isOutsideMonth,\n isFocusVisible,\n isSelectionStart,\n isSelectionEnd,\n isToday: istoday,\n ...states\n }\n });\n\n let dataAttrs = {\n 'data-focused': states.isFocused || undefined,\n 'data-hovered': isHovered || undefined,\n 'data-pressed': states.isPressed || undefined,\n 'data-unavailable': states.isUnavailable || undefined,\n 'data-disabled': states.isDisabled || undefined,\n 'data-focus-visible': isFocusVisible || undefined,\n 'data-outside-visible-range': states.isOutsideVisibleRange || undefined,\n 'data-outside-month': isOutsideMonth || undefined,\n 'data-selected': states.isSelected || undefined,\n 'data-selection-start': isSelectionStart || undefined,\n 'data-selection-end': isSelectionEnd || undefined,\n 'data-invalid': states.isInvalid || undefined,\n 'data-today': istoday || undefined\n };\n\n let DOMProps = filterDOMProps(otherProps, {global: true});\n\n return (\n <td {...cellProps} ref={ref}>\n <dom.div {...mergeProps(DOMProps, buttonProps, focusProps, hoverProps, dataAttrs, renderProps)} ref={buttonRef} />\n </td>\n );\n});\n"],"names":[],"version":3,"file":"Calendar.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAyJM,MAAM,0DACX,CAAA,GAAA,0BAAY,EAA2E;AAClF,MAAM,0DACX,CAAA,GAAA,0BAAY,EAAyD;AAChE,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAC9C;AAEK,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAA6B;AAK3E,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,SAG5E,KAA0B,EAAE,GAAiC;IAC7D,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,sCAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,oDAAe,EAAE;QAC3B,GAAG,KAAK;gBACR;QACA,gBAAgB,MAAM,cAAc,IAAI,CAAA,GAAA,2CAAa;IACvD;IAEA,IAAI,iBAAC,aAAa,mBAAE,eAAe,mBAAE,eAAe,qBAAE,iBAAiB,SAAE,KAAK,EAAC,GAAG,CAAA,GAAA,uCAAU,EAC1F,OACA;IAGF,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;mBACN;YACA,YAAY,MAAM,UAAU,IAAI;YAChC,WAAW,MAAM,cAAc;QACjC;QACA,kBAAkB;IACpB;IAEA,IAAI,WAAW,CAA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A,qCAAS,EAAE,UAAU,aAAa,YAAY,YAAY,WAAW,YAAY;QACrF,KAAK;;AAIb;AASO,SAAS,0CAAmB,KAA8B;IAC/D,IAAI,gBAAgB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;IACrC,IAAI,qBAAqB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;IAC1C,IAAI,QAAQ,iBAAiB;IAC7B,IAAI,OAAO,CAAA,GAAA,iDAAoB,EAAE,OAAO;IACxC,OAAO,MAAM,QAAQ,CAAC;AACxB;AASO,SAAS,0CAAoB,KAA+B;IACjE,IAAI,gBAAgB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;IACrC,IAAI,qBAAqB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;IAC1C,IAAI,QAAQ,iBAAiB;IAC7B,IAAI,OAAO,CAAA,GAAA,kDAAqB,EAAE,OAAO;IACzC,OAAO,MAAM,QAAQ,CAAC;AACxB;AAYO,MAAM,yDAAkB,CAAA,GAAA,uBAAS,EAAE,SAAS,gBACjD,KAA2B,EAC3B,GAAqC;IAErC,IAAI,UAAC,MAAM,UAAE,MAAM,aAAE,YAAY,8BAA8B,GAAG,cAAa,GAAG;IAClF,IAAI,gBAAgB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;IACrC,IAAI,qBAAqB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;IAC1C,IAAI,QAAQ,iBAAiB;IAC7B,IAAI,OAAO,CAAA,GAAA,8CAAiB,EAAE;gBAAC;gBAAQ;IAAM,GAAG;IAEhD,qBACE,0DAAC,CAAA,GAAA,iCAAM;QAAG,GAAG,YAAY;QAAE,WAAW;QAAW,KAAK;OACnD;AAGP","sources":["packages/react-aria-components/src/Calendar.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 {\n CalendarHeadingProps as AriaCalendarHeadingProps,\n CalendarMonthPickerProps as AriaCalendarMonthPickerProps,\n AriaCalendarProps,\n CalendarYearPickerProps as AriaCalendarYearPickerProps,\n CalendarMonthPickerAria,\n CalendarYearPickerAria,\n useCalendar,\n useCalendarCell,\n useCalendarGrid,\n useCalendarHeading,\n useCalendarMonthPicker,\n useCalendarYearPicker\n} from 'react-aria/useCalendar';\nimport {AriaRangeCalendarProps, useRangeCalendar} from 'react-aria/useRangeCalendar';\nimport {ButtonContext} from './Button';\nimport {\n CalendarDate,\n CalendarIdentifier,\n createCalendar,\n DateDuration,\n endOfMonth,\n Calendar as ICalendar,\n isSameDay,\n isSameMonth,\n isToday\n} from '@internationalized/date';\nimport {CalendarSelectionMode, CalendarState} from 'react-stately/useCalendarState';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n useContextProps,\n useRenderProps,\n useSlottedContext\n} from './utils';\nimport {DateValue, useRangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport {\n DOMAttributes,\n FocusableElement,\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents\n} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {Heading, HeadingContext, HeadingProps} from './Heading';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n JSX,\n ReactElement,\n useContext,\n useRef\n} from 'react';\nimport {TextContext} from './Text';\nimport {useCalendarState} from 'react-stately/useCalendarState';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {VisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface CalendarRenderProps<M extends CalendarSelectionMode = 'single'> {\n /**\n * Whether the calendar is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * State of the calendar.\n */\n state: CalendarState<M>;\n /**\n * Whether the calendar is invalid.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n}\n\nexport interface RangeCalendarRenderProps extends Omit<CalendarRenderProps, 'state'> {\n /**\n * State of the range calendar.\n */\n state: RangeCalendarState;\n}\n\nexport interface CalendarProps<T extends DateValue, M extends CalendarSelectionMode = 'single'>\n extends\n Omit<AriaCalendarProps<T, M>, 'errorMessage' | 'validationState'>,\n RenderProps<CalendarRenderProps<M>, 'div'>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Calendar'\n */\n className?: ClassNameOrFunction<CalendarRenderProps<M>>;\n /**\n * The amount of days that will be displayed at once. This affects how pagination works.\n *\n * @default { months: 1 }\n */\n visibleDuration?: DateDuration;\n /**\n * A function to create a new\n * [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html) object for a\n * given calendar identifier. If not provided, the `createCalendar` function from\n * `@internationalized/date` will be used.\n */\n createCalendar?: (identifier: CalendarIdentifier) => ICalendar;\n}\n\nexport interface RangeCalendarProps<T extends DateValue>\n extends\n Omit<AriaRangeCalendarProps<T>, 'errorMessage' | 'validationState'>,\n RenderProps<RangeCalendarRenderProps, 'div'>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-RangeCalendar'\n */\n className?: ClassNameOrFunction<RangeCalendarRenderProps>;\n /**\n * The amount of days that will be displayed at once. This affects how pagination works.\n *\n * @default { months: 1 }\n */\n visibleDuration?: DateDuration;\n /**\n * A function to create a new\n * [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html) object for a\n * given calendar identifier. If not provided, the `createCalendar` function from\n * `@internationalized/date` will be used.\n */\n createCalendar?: (identifier: CalendarIdentifier) => ICalendar;\n}\n\nexport const CalendarContext =\n createContext<ContextValue<CalendarProps<any, CalendarSelectionMode>, HTMLDivElement>>(null);\nexport const RangeCalendarContext =\n createContext<ContextValue<RangeCalendarProps<any>, HTMLDivElement>>(null);\nexport const CalendarStateContext = createContext<CalendarState<CalendarSelectionMode> | null>(\n null\n);\nexport const RangeCalendarStateContext = createContext<RangeCalendarState | null>(null);\n\n/**\n * A calendar displays one or more date grids and allows users to select a single date.\n */\nexport const Calendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function Calendar<\n T extends DateValue,\n M extends CalendarSelectionMode = 'single'\n>(props: CalendarProps<T, M>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, CalendarContext);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n createCalendar: props.createCalendar || createCalendar\n });\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps, title} = useCalendar(\n props,\n state\n );\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false,\n isInvalid: state.isValueInvalid\n },\n defaultClassName: 'react-aria-Calendar'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, calendarProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={state.isValueInvalid || undefined}>\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: {\n previous: prevButtonProps,\n next: nextButtonProps\n }\n }\n ],\n [HeadingContext, {'aria-hidden': true, level: 2, children: title}],\n [CalendarStateContext, state],\n [CalendarContext, props as any],\n [\n TextContext,\n {\n slots: {\n errorMessage: errorMessageProps\n }\n }\n ]\n ]}>\n {/* Add a screen reader only description of the entire visible range rather than\n * a separate heading above each month grid. This is placed first in the DOM order\n * so that it is the first thing a touch screen reader user encounters.\n * In addition, VoiceOver on iOS does not announce the aria-label of the grid\n * elements, so the aria-label of the Calendar is included here as well. */}\n <VisuallyHidden>\n <h2>{calendarProps['aria-label']}</h2>\n </VisuallyHidden>\n {renderProps.children}\n {/* For touch screen readers, add a visually hidden next button after the month grid\n * so it's easy to navigate after reaching the end without going all the way\n * back to the start of the month. */}\n <VisuallyHidden>\n <button\n aria-label={nextButtonProps['aria-label']}\n disabled={nextButtonProps.isDisabled}\n onClick={() => state.focusNextPage()}\n tabIndex={-1}\n />\n </VisuallyHidden>\n </Provider>\n </dom.div>\n );\n});\n\n/**\n * A range calendar displays one or more date grids and allows users to select a contiguous range of\n * dates.\n */\nexport const RangeCalendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function RangeCalendar<\n T extends DateValue\n>(props: RangeCalendarProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, RangeCalendarContext);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n createCalendar: props.createCalendar || createCalendar\n });\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps, title} =\n useRangeCalendar(props, state, ref);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isDisabled: props.isDisabled || false,\n isInvalid: state.isValueInvalid\n },\n defaultClassName: 'react-aria-RangeCalendar'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...mergeProps(renderProps, DOMProps, calendarProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={state.isValueInvalid || undefined}>\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: {\n previous: prevButtonProps,\n next: nextButtonProps\n }\n }\n ],\n [HeadingContext, {'aria-hidden': true, level: 2, children: title}],\n [RangeCalendarStateContext, state],\n [RangeCalendarContext, props as RangeCalendarProps<any>],\n [\n TextContext,\n {\n slots: {\n errorMessage: errorMessageProps\n }\n }\n ]\n ]}>\n {/* Add a screen reader only description of the entire visible range rather than\n * a separate heading above each month grid. This is placed first in the DOM order\n * so that it is the first thing a touch screen reader user encounters.\n * In addition, VoiceOver on iOS does not announce the aria-label of the grid\n * elements, so the aria-label of the Calendar is included here as well. */}\n <VisuallyHidden>\n <h2>{calendarProps['aria-label']}</h2>\n </VisuallyHidden>\n {renderProps.children}\n {/* For touch screen readers, add a visually hidden next button after the month grid\n * so it's easy to navigate after reaching the end without going all the way\n * back to the start of the month. */}\n <VisuallyHidden>\n <button\n aria-label={nextButtonProps['aria-label']}\n disabled={nextButtonProps.isDisabled}\n onClick={() => state.focusNextPage()}\n tabIndex={-1}\n />\n </VisuallyHidden>\n </Provider>\n </dom.div>\n );\n});\n\nexport interface CalendarCellRenderProps {\n /** The date that the cell represents. */\n date: CalendarDate;\n /** The day number formatted according to the current locale. */\n formattedDate: string;\n /**\n * Whether the cell is currently hovered with a mouse.\n *\n * @selector [data-hovered]\n */\n isHovered: boolean;\n /**\n * Whether the cell is currently being pressed.\n *\n * @selector [data-pressed]\n */\n isPressed: boolean;\n /**\n * Whether the cell is selected.\n *\n * @selector [data-selected]\n */\n isSelected: boolean;\n /**\n * Whether the cell is the first date in a range selection.\n *\n * @selector [data-selection-start]\n */\n isSelectionStart: boolean;\n /**\n * Whether the cell is the last date in a range selection.\n *\n * @selector [data-selection-end]\n */\n isSelectionEnd: boolean;\n /**\n * Whether the cell is focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the cell is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the cell is disabled, according to the calendar's `minValue`, `maxValue`, and\n * `isDisabled` props. Disabled dates are not focusable, and cannot be selected by the user. They\n * are typically displayed with a dimmed appearance.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the cell is outside the visible range of the calendar.\n * For example, dates before the first day of a month in the same week.\n *\n * @selector [data-outside-visible-range]\n */\n isOutsideVisibleRange: boolean;\n /**\n * Whether the cell is outside the current month.\n *\n * @selector [data-outside-month]\n */\n isOutsideMonth: boolean;\n /**\n * Whether the cell is unavailable, according to the calendar's `isDateUnavailable` prop.\n * Unavailable dates remain focusable, but cannot be selected by the user. They should be\n * displayed with a visual affordance to indicate they are unavailable, such as a different color\n * or a strikethrough.\n *\n * Note that because they are focusable, unavailable dates must meet a 4.5:1 color contrast ratio,\n * [as defined by WCAG](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html).\n *\n * @selector [data-unavailable]\n */\n isUnavailable: boolean;\n /**\n * Whether the cell is part of an invalid selection.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n /**\n * Whether the cell is today.\n *\n * @selector [data-today]\n */\n isToday: boolean;\n}\n\nexport interface CalendarGridProps\n extends StyleProps, DOMRenderProps<'table', undefined>, GlobalDOMAttributes<HTMLTableElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-CalendarGrid'\n */\n className?: string;\n /**\n * Either a function to render calendar cells for each date in the month,\n * or children containing a `<CalendarGridHeader>`` and `<CalendarGridBody>`\n * when additional customization is needed.\n */\n children?: ReactElement | ReactElement[] | ((date: CalendarDate) => ReactElement);\n /**\n * An offset from the beginning of the visible date range that this\n * CalendarGrid should display. Useful when displaying more than one\n * month at a time.\n */\n offset?: DateDuration;\n /**\n * The style of weekday names to display in the calendar grid header,\n * e.g. single letter, abbreviation, or full day name.\n *\n * @default 'narrow'\n */\n weekdayStyle?: 'narrow' | 'short' | 'long';\n}\n\ninterface InternalCalendarGridContextValue {\n headerProps: DOMAttributes<FocusableElement>;\n weekDays: string[];\n startDate: CalendarDate;\n weeksInMonth: number;\n}\n\nconst InternalCalendarGridContext = createContext<InternalCalendarGridContextValue | null>(null);\n\n/**\n * A calendar grid displays a single grid of days within a calendar or range calendar which\n * can be keyboard navigated and selected by the user.\n */\nexport const CalendarGrid = /*#__PURE__*/ (forwardRef as forwardRefType)(function CalendarGrid(\n props: CalendarGridProps,\n ref: ForwardedRef<HTMLTableElement>\n) {\n let calendarState = useContext(CalendarStateContext);\n let rangeCalendarState = useContext(RangeCalendarStateContext);\n let calenderProps = useSlottedContext(CalendarContext)!;\n let rangeCalenderProps = useSlottedContext(RangeCalendarContext)!;\n let state = calendarState ?? rangeCalendarState!;\n let startDate = state.visibleRange.start;\n if (props.offset) {\n startDate = startDate.add(props.offset);\n }\n\n let firstDayOfWeek = calenderProps?.firstDayOfWeek ?? rangeCalenderProps?.firstDayOfWeek;\n\n let {gridProps, headerProps, weekDays, weeksInMonth} = useCalendarGrid(\n {\n startDate,\n endDate: endOfMonth(startDate),\n weekdayStyle: props.weekdayStyle,\n firstDayOfWeek\n },\n state\n );\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <InternalCalendarGridContext.Provider value={{headerProps, weekDays, startDate, weeksInMonth}}>\n <dom.table\n render={props.render}\n {...mergeProps(DOMProps, gridProps)}\n ref={ref}\n style={props.style}\n cellPadding={0}\n className={props.className ?? 'react-aria-CalendarGrid'}>\n {typeof props.children !== 'function' ? (\n props.children\n ) : (\n <>\n <CalendarGridHeaderForwardRef>\n {day => <CalendarHeaderCellForwardRef>{day}</CalendarHeaderCellForwardRef>}\n </CalendarGridHeaderForwardRef>\n <CalendarGridBodyForwardRef>{props.children}</CalendarGridBodyForwardRef>\n </>\n )}\n </dom.table>\n </InternalCalendarGridContext.Provider>\n );\n});\n\nexport interface CalendarGridHeaderProps\n extends\n StyleProps,\n DOMRenderProps<'thead', undefined>,\n GlobalDOMAttributes<HTMLTableSectionElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-CalendarGridHeader'\n */\n className?: string;\n /** A function to render a `<CalendarHeaderCell>` for a weekday name. */\n children: (day: string) => ReactElement;\n}\n\nfunction CalendarGridHeader(\n props: CalendarGridHeaderProps,\n ref: ForwardedRef<HTMLTableSectionElement>\n) {\n let {children, style, className} = props;\n let {headerProps, weekDays} = useContext(InternalCalendarGridContext)!;\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.thead\n render={props.render}\n {...mergeProps(DOMProps, headerProps)}\n ref={ref}\n style={style}\n className={className ?? 'react-aria-CalendarGridHeader'}>\n <tr>{weekDays.map((day, key) => React.cloneElement(children(day), {key}))}</tr>\n </dom.thead>\n );\n}\n\n/**\n * A calendar grid header displays a row of week day names at the top of a month.\n */\nconst CalendarGridHeaderForwardRef = /*#__PURE__*/ (forwardRef as forwardRefType)(\n CalendarGridHeader\n);\nexport {CalendarGridHeaderForwardRef as CalendarGridHeader};\n\nexport interface CalendarHeaderCellProps\n extends\n DOMProps,\n DOMRenderProps<'th', undefined>,\n GlobalDOMAttributes<HTMLTableHeaderCellElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-CalendarHeaderCell'\n */\n className?: string;\n}\n\nfunction CalendarHeaderCell(\n props: CalendarHeaderCellProps,\n ref: ForwardedRef<HTMLTableCellElement>\n) {\n let {children, style, className} = props;\n let DOMProps = filterDOMProps(props, {global: true});\n return (\n <dom.th\n render={props.render}\n {...DOMProps}\n ref={ref}\n style={style}\n className={className || 'react-aria-CalendarHeaderCell'}>\n {children}\n </dom.th>\n );\n}\n\n/**\n * A calendar header cell displays a week day name at the top of a column within a calendar.\n */\nconst CalendarHeaderCellForwardRef = forwardRef(CalendarHeaderCell);\nexport {CalendarHeaderCellForwardRef as CalendarHeaderCell};\n\nexport interface CalendarGridBodyProps\n extends\n StyleProps,\n DOMRenderProps<'tbody', undefined>,\n GlobalDOMAttributes<HTMLTableSectionElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-CalendarGridBody'\n */\n className?: string;\n /** A function to render a `<CalendarCell>` for a given date. */\n children: (date: CalendarDate) => ReactElement;\n}\n\nfunction CalendarGridBody(\n props: CalendarGridBodyProps,\n ref: ForwardedRef<HTMLTableSectionElement>\n) {\n let {children, style, className} = props;\n let calendarState = useContext(CalendarStateContext);\n let rangeCalendarState = useContext(RangeCalendarStateContext);\n let state = calendarState ?? rangeCalendarState!;\n let {startDate, weeksInMonth} = useContext(InternalCalendarGridContext)!;\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.tbody\n render={props.render}\n {...DOMProps}\n ref={ref}\n style={style}\n className={className ?? 'react-aria-CalendarGridBody'}>\n {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n <tr key={weekIndex}>\n {state\n .getDatesInWeek(weekIndex, startDate)\n .map((date, i) =>\n date ? React.cloneElement(children(date), {key: i}) : <td key={i} />\n )}\n </tr>\n ))}\n </dom.tbody>\n );\n}\n\n/**\n * A calendar grid body displays a grid of calendar cells within a month.\n */\nconst CalendarGridBodyForwardRef = /*#__PURE__*/ (forwardRef as forwardRefType)(CalendarGridBody);\nexport {CalendarGridBodyForwardRef as CalendarGridBody};\n\nexport interface CalendarCellProps\n extends\n RenderProps<CalendarCellRenderProps, 'div'>,\n HoverEvents,\n GlobalDOMAttributes<HTMLTableCellElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-CalendarCell'\n */\n className?: ClassNameOrFunction<CalendarCellRenderProps>;\n /** The date to render in the cell. */\n date: CalendarDate;\n}\n\n/**\n * A calendar cell displays a date cell within a calendar grid which can be selected by the user.\n */\nexport const CalendarCell = /*#__PURE__*/ (forwardRef as forwardRefType)(function CalendarCell(\n {date, ...otherProps}: CalendarCellProps,\n ref: ForwardedRef<HTMLTableCellElement>\n) {\n let calendarState = useContext(CalendarStateContext);\n let rangeCalendarState = useContext(RangeCalendarStateContext);\n let state = calendarState ?? rangeCalendarState!;\n let {startDate: currentMonth} = useContext(InternalCalendarGridContext) ?? {\n startDate: state.visibleRange.start\n };\n let isOutsideMonth =\n state.visibleDuration.days || state.visibleDuration.weeks\n ? false\n : !isSameMonth(currentMonth, date);\n let istoday = isToday(date, state.timeZone);\n\n let buttonRef = useRef<HTMLDivElement>(null);\n let {cellProps, buttonProps, ...states} = useCalendarCell(\n {date, isOutsideMonth},\n state,\n buttonRef\n );\n\n let {hoverProps, isHovered} = useHover({\n ...otherProps,\n isDisabled: states.isDisabled || states.isUnavailable\n });\n let {focusProps, isFocusVisible} = useFocusRing();\n isFocusVisible &&= states.isFocused;\n let isSelectionStart = false;\n let isSelectionEnd = false;\n if ('highlightedRange' in state && state.highlightedRange) {\n isSelectionStart = isSameDay(date, state.highlightedRange.start);\n isSelectionEnd = isSameDay(date, state.highlightedRange.end);\n }\n\n let renderProps = useRenderProps({\n ...otherProps,\n defaultChildren: states.formattedDate,\n defaultClassName: 'react-aria-CalendarCell',\n values: {\n date,\n isHovered,\n isOutsideMonth,\n isFocusVisible,\n isSelectionStart,\n isSelectionEnd,\n isToday: istoday,\n ...states\n }\n });\n\n let dataAttrs = {\n 'data-focused': states.isFocused || undefined,\n 'data-hovered': isHovered || undefined,\n 'data-pressed': states.isPressed || undefined,\n 'data-unavailable': states.isUnavailable || undefined,\n 'data-disabled': states.isDisabled || undefined,\n 'data-focus-visible': isFocusVisible || undefined,\n 'data-outside-visible-range': states.isOutsideVisibleRange || undefined,\n 'data-outside-month': isOutsideMonth || undefined,\n 'data-selected': states.isSelected || undefined,\n 'data-selection-start': isSelectionStart || undefined,\n 'data-selection-end': isSelectionEnd || undefined,\n 'data-invalid': states.isInvalid || undefined,\n 'data-today': istoday || undefined\n };\n\n let DOMProps = filterDOMProps(otherProps, {global: true});\n\n return (\n <td {...cellProps} ref={ref}>\n <dom.div\n {...mergeProps(DOMProps, buttonProps, focusProps, hoverProps, dataAttrs, renderProps)}\n ref={buttonRef}\n />\n </td>\n );\n});\n\nexport interface CalendarYearPickerProps extends AriaCalendarYearPickerProps {\n /**\n * A function to render the year picker.\n */\n children: (renderProps: CalendarYearPickerAria) => JSX.Element;\n}\n\nexport function CalendarYearPicker(props: CalendarYearPickerProps): JSX.Element {\n let calendarState = React.useContext(CalendarStateContext);\n let rangeCalendarState = React.useContext(RangeCalendarStateContext);\n let state = calendarState || rangeCalendarState!;\n let aria = useCalendarYearPicker(props, state);\n return props.children(aria);\n}\n\nexport interface CalendarMonthPickerProps extends AriaCalendarMonthPickerProps {\n /**\n * A function to render the month picker.\n */\n children: (renderProps: CalendarMonthPickerAria) => JSX.Element;\n}\n\nexport function CalendarMonthPicker(props: CalendarMonthPickerProps): JSX.Element {\n let calendarState = React.useContext(CalendarStateContext);\n let rangeCalendarState = React.useContext(RangeCalendarStateContext);\n let state = calendarState || rangeCalendarState!;\n let aria = useCalendarMonthPicker(props, state);\n return props.children(aria);\n}\n\nexport interface CalendarHeadingProps extends AriaCalendarHeadingProps, HeadingProps {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-CalendarHeading'\n */\n className?: string;\n}\n\nexport const CalendarHeading = forwardRef(function CalendarHeading(\n props: CalendarHeadingProps,\n ref: ForwardedRef<HTMLHeadingElement>\n) {\n let {offset, format, className = 'react-aria-CalendarHeading', ...headingProps} = props;\n let calendarState = React.useContext(CalendarStateContext);\n let rangeCalendarState = React.useContext(RangeCalendarStateContext);\n let state = calendarState || rangeCalendarState!;\n let aria = useCalendarHeading({offset, format}, state);\n\n return (\n <Heading {...headingProps} className={className} ref={ref}>\n {aria}\n </Heading>\n );\n});\n"],"names":[],"version":3,"file":"Calendar.cjs.map"}
@@ -1,8 +1,8 @@
1
1
  import {ButtonContext as $fc203795b9b363cd$export$24d547caef80ccd1} from "./Button.js";
2
2
  import {dom as $b7b7a92703138c9b$export$df3a06d6289f983e, Provider as $b7b7a92703138c9b$export$2881499e37b75b9a, useContextProps as $b7b7a92703138c9b$export$29f1550f4b0d4415, useRenderProps as $b7b7a92703138c9b$export$4d86445c2cf5e3, useSlottedContext as $b7b7a92703138c9b$export$fabf2dc03a41866e} from "./utils.js";
3
- import {HeadingContext as $cd487658cd83358d$export$d688439359537581} from "./Heading.js";
3
+ import {Heading as $cd487658cd83358d$export$a8a3e93435678ff9, HeadingContext as $cd487658cd83358d$export$d688439359537581} from "./Heading.js";
4
4
  import {TextContext as $20d769b1e2b13352$export$9afb8bc826b033ea} from "./Text.js";
5
- import {useCalendar as $T9PfW$useCalendar, useCalendarGrid as $T9PfW$useCalendarGrid, useCalendarCell as $T9PfW$useCalendarCell} from "react-aria/useCalendar";
5
+ import {useCalendar as $T9PfW$useCalendar, useCalendarGrid as $T9PfW$useCalendarGrid, useCalendarCell as $T9PfW$useCalendarCell, useCalendarYearPicker as $T9PfW$useCalendarYearPicker, useCalendarMonthPicker as $T9PfW$useCalendarMonthPicker, useCalendarHeading as $T9PfW$useCalendarHeading} from "react-aria/useCalendar";
6
6
  import {useRangeCalendar as $T9PfW$useRangeCalendar} from "react-aria/useRangeCalendar";
7
7
  import {createCalendar as $T9PfW$createCalendar, endOfMonth as $T9PfW$endOfMonth, isSameMonth as $T9PfW$isSameMonth, isToday as $T9PfW$isToday, isSameDay as $T9PfW$isSameDay} from "@internationalized/date";
8
8
  import {useRangeCalendarState as $T9PfW$useRangeCalendarState} from "react-stately/useRangeCalendarState";
@@ -293,7 +293,7 @@ const $62acebab8283d780$export$5d847498420df57b = /*#__PURE__*/ (0, $T9PfW$forwa
293
293
  let { startDate: currentMonth } = (_useContext = (0, $T9PfW$useContext)($62acebab8283d780$var$InternalCalendarGridContext)) !== null && _useContext !== void 0 ? _useContext : {
294
294
  startDate: state.visibleRange.start
295
295
  };
296
- let isOutsideMonth = !(0, $T9PfW$isSameMonth)(currentMonth, date);
296
+ let isOutsideMonth = state.visibleDuration.days || state.visibleDuration.weeks ? false : !(0, $T9PfW$isSameMonth)(currentMonth, date);
297
297
  let istoday = (0, $T9PfW$isToday)(date, state.timeZone);
298
298
  let buttonRef = (0, $T9PfW$useRef)(null);
299
299
  let { cellProps: cellProps, buttonProps: buttonProps, ...states } = (0, $T9PfW$useCalendarCell)({
@@ -302,7 +302,7 @@ const $62acebab8283d780$export$5d847498420df57b = /*#__PURE__*/ (0, $T9PfW$forwa
302
302
  }, state, buttonRef);
303
303
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $T9PfW$useHover)({
304
304
  ...otherProps,
305
- isDisabled: states.isDisabled
305
+ isDisabled: states.isDisabled || states.isUnavailable
306
306
  });
307
307
  let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $T9PfW$useFocusRing)();
308
308
  isFocusVisible && (isFocusVisible = states.isFocused);
@@ -353,7 +353,36 @@ const $62acebab8283d780$export$5d847498420df57b = /*#__PURE__*/ (0, $T9PfW$forwa
353
353
  ref: buttonRef
354
354
  }));
355
355
  });
356
+ function $62acebab8283d780$export$f0ed7ae5d49afb95(props) {
357
+ let calendarState = (0, $T9PfW$react).useContext($62acebab8283d780$export$9e31dcedda1dadc7);
358
+ let rangeCalendarState = (0, $T9PfW$react).useContext($62acebab8283d780$export$5e0fc348c00f87a0);
359
+ let state = calendarState || rangeCalendarState;
360
+ let aria = (0, $T9PfW$useCalendarYearPicker)(props, state);
361
+ return props.children(aria);
362
+ }
363
+ function $62acebab8283d780$export$76806186243e9de6(props) {
364
+ let calendarState = (0, $T9PfW$react).useContext($62acebab8283d780$export$9e31dcedda1dadc7);
365
+ let rangeCalendarState = (0, $T9PfW$react).useContext($62acebab8283d780$export$5e0fc348c00f87a0);
366
+ let state = calendarState || rangeCalendarState;
367
+ let aria = (0, $T9PfW$useCalendarMonthPicker)(props, state);
368
+ return props.children(aria);
369
+ }
370
+ const $62acebab8283d780$export$77af08ed164baa7 = /*#__PURE__*/ (0, $T9PfW$forwardRef)(function CalendarHeading(props, ref) {
371
+ let { offset: offset, format: format, className: className = 'react-aria-CalendarHeading', ...headingProps } = props;
372
+ let calendarState = (0, $T9PfW$react).useContext($62acebab8283d780$export$9e31dcedda1dadc7);
373
+ let rangeCalendarState = (0, $T9PfW$react).useContext($62acebab8283d780$export$5e0fc348c00f87a0);
374
+ let state = calendarState || rangeCalendarState;
375
+ let aria = (0, $T9PfW$useCalendarHeading)({
376
+ offset: offset,
377
+ format: format
378
+ }, state);
379
+ return /*#__PURE__*/ (0, $T9PfW$react).createElement((0, $cd487658cd83358d$export$a8a3e93435678ff9), {
380
+ ...headingProps,
381
+ className: className,
382
+ ref: ref
383
+ }, aria);
384
+ });
356
385
 
357
386
 
358
- export {$62acebab8283d780$export$3b805cea1f178355 as CalendarContext, $62acebab8283d780$export$233dd9682e1ad64b as RangeCalendarContext, $62acebab8283d780$export$9e31dcedda1dadc7 as CalendarStateContext, $62acebab8283d780$export$5e0fc348c00f87a0 as RangeCalendarStateContext, $62acebab8283d780$export$e1aef45b828286de as Calendar, $62acebab8283d780$export$a4f5c8b89d277a8d as RangeCalendar, $62acebab8283d780$export$5bd780d491cfc46c as CalendarGrid, $62acebab8283d780$export$22e2d15eaa4d2377 as CalendarGridHeader, $62acebab8283d780$export$ad2135cac3a11b3d as CalendarHeaderCell, $62acebab8283d780$export$e11f8ba65d857bff as CalendarGridBody, $62acebab8283d780$export$5d847498420df57b as CalendarCell};
387
+ export {$62acebab8283d780$export$3b805cea1f178355 as CalendarContext, $62acebab8283d780$export$233dd9682e1ad64b as RangeCalendarContext, $62acebab8283d780$export$9e31dcedda1dadc7 as CalendarStateContext, $62acebab8283d780$export$5e0fc348c00f87a0 as RangeCalendarStateContext, $62acebab8283d780$export$e1aef45b828286de as Calendar, $62acebab8283d780$export$a4f5c8b89d277a8d as RangeCalendar, $62acebab8283d780$export$5bd780d491cfc46c as CalendarGrid, $62acebab8283d780$export$22e2d15eaa4d2377 as CalendarGridHeader, $62acebab8283d780$export$ad2135cac3a11b3d as CalendarHeaderCell, $62acebab8283d780$export$e11f8ba65d857bff as CalendarGridBody, $62acebab8283d780$export$5d847498420df57b as CalendarCell, $62acebab8283d780$export$f0ed7ae5d49afb95 as CalendarYearPicker, $62acebab8283d780$export$76806186243e9de6 as CalendarMonthPicker, $62acebab8283d780$export$77af08ed164baa7 as CalendarHeading};
359
388
  //# sourceMappingURL=Calendar.js.map