react-aria-components 1.14.0 → 1.15.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 (333) hide show
  1. package/dist/Breadcrumbs.main.js +3 -2
  2. package/dist/Breadcrumbs.main.js.map +1 -1
  3. package/dist/Breadcrumbs.mjs +4 -3
  4. package/dist/Breadcrumbs.module.js +4 -3
  5. package/dist/Breadcrumbs.module.js.map +1 -1
  6. package/dist/Button.main.js +1 -1
  7. package/dist/Button.main.js.map +1 -1
  8. package/dist/Button.mjs +2 -2
  9. package/dist/Button.module.js +2 -2
  10. package/dist/Button.module.js.map +1 -1
  11. package/dist/Calendar.main.js +11 -7
  12. package/dist/Calendar.main.js.map +1 -1
  13. package/dist/Calendar.mjs +12 -8
  14. package/dist/Calendar.module.js +12 -8
  15. package/dist/Calendar.module.js.map +1 -1
  16. package/dist/Checkbox.main.js +2 -2
  17. package/dist/Checkbox.main.js.map +1 -1
  18. package/dist/Checkbox.mjs +3 -3
  19. package/dist/Checkbox.module.js +3 -3
  20. package/dist/Checkbox.module.js.map +1 -1
  21. package/dist/ColorArea.main.js +1 -1
  22. package/dist/ColorArea.main.js.map +1 -1
  23. package/dist/ColorArea.mjs +2 -2
  24. package/dist/ColorArea.module.js +2 -2
  25. package/dist/ColorArea.module.js.map +1 -1
  26. package/dist/ColorField.main.js +7 -3
  27. package/dist/ColorField.main.js.map +1 -1
  28. package/dist/ColorField.mjs +8 -4
  29. package/dist/ColorField.module.js +8 -4
  30. package/dist/ColorField.module.js.map +1 -1
  31. package/dist/ColorSlider.main.js +1 -1
  32. package/dist/ColorSlider.main.js.map +1 -1
  33. package/dist/ColorSlider.mjs +2 -2
  34. package/dist/ColorSlider.module.js +2 -2
  35. package/dist/ColorSlider.module.js.map +1 -1
  36. package/dist/ColorSwatch.main.js +1 -1
  37. package/dist/ColorSwatch.main.js.map +1 -1
  38. package/dist/ColorSwatch.mjs +2 -2
  39. package/dist/ColorSwatch.module.js +2 -2
  40. package/dist/ColorSwatch.module.js.map +1 -1
  41. package/dist/ColorSwatchPicker.main.js +2 -0
  42. package/dist/ColorSwatchPicker.main.js.map +1 -1
  43. package/dist/ColorSwatchPicker.mjs +2 -0
  44. package/dist/ColorSwatchPicker.module.js +2 -0
  45. package/dist/ColorSwatchPicker.module.js.map +1 -1
  46. package/dist/ColorThumb.main.js +1 -1
  47. package/dist/ColorThumb.main.js.map +1 -1
  48. package/dist/ColorThumb.mjs +2 -2
  49. package/dist/ColorThumb.module.js +2 -2
  50. package/dist/ColorThumb.module.js.map +1 -1
  51. package/dist/ColorWheel.main.js +2 -2
  52. package/dist/ColorWheel.main.js.map +1 -1
  53. package/dist/ColorWheel.mjs +3 -3
  54. package/dist/ColorWheel.module.js +3 -3
  55. package/dist/ColorWheel.module.js.map +1 -1
  56. package/dist/ComboBox.main.js +2 -2
  57. package/dist/ComboBox.main.js.map +1 -1
  58. package/dist/ComboBox.mjs +3 -3
  59. package/dist/ComboBox.module.js +3 -3
  60. package/dist/ComboBox.module.js.map +1 -1
  61. package/dist/DateField.main.js +3 -3
  62. package/dist/DateField.main.js.map +1 -1
  63. package/dist/DateField.mjs +4 -4
  64. package/dist/DateField.module.js +4 -4
  65. package/dist/DateField.module.js.map +1 -1
  66. package/dist/DatePicker.main.js +2 -2
  67. package/dist/DatePicker.main.js.map +1 -1
  68. package/dist/DatePicker.mjs +3 -3
  69. package/dist/DatePicker.module.js +3 -3
  70. package/dist/DatePicker.module.js.map +1 -1
  71. package/dist/Dialog.main.js +2 -1
  72. package/dist/Dialog.main.js.map +1 -1
  73. package/dist/Dialog.mjs +3 -2
  74. package/dist/Dialog.module.js +3 -2
  75. package/dist/Dialog.module.js.map +1 -1
  76. package/dist/Disclosure.main.js +3 -3
  77. package/dist/Disclosure.main.js.map +1 -1
  78. package/dist/Disclosure.mjs +4 -4
  79. package/dist/Disclosure.module.js +4 -4
  80. package/dist/Disclosure.module.js.map +1 -1
  81. package/dist/DropZone.main.js +2 -3
  82. package/dist/DropZone.main.js.map +1 -1
  83. package/dist/DropZone.mjs +4 -5
  84. package/dist/DropZone.module.js +4 -5
  85. package/dist/DropZone.module.js.map +1 -1
  86. package/dist/Form.main.js +1 -1
  87. package/dist/Form.main.js.map +1 -1
  88. package/dist/Form.mjs +2 -2
  89. package/dist/Form.module.js +2 -2
  90. package/dist/Form.module.js.map +1 -1
  91. package/dist/GridList.main.js +16 -13
  92. package/dist/GridList.main.js.map +1 -1
  93. package/dist/GridList.mjs +17 -14
  94. package/dist/GridList.module.js +17 -14
  95. package/dist/GridList.module.js.map +1 -1
  96. package/dist/Group.main.js +1 -1
  97. package/dist/Group.main.js.map +1 -1
  98. package/dist/Group.mjs +2 -2
  99. package/dist/Group.module.js +2 -2
  100. package/dist/Group.module.js.map +1 -1
  101. package/dist/Header.main.js +1 -1
  102. package/dist/Header.main.js.map +1 -1
  103. package/dist/Header.mjs +2 -2
  104. package/dist/Header.module.js +2 -2
  105. package/dist/Header.module.js.map +1 -1
  106. package/dist/Heading.main.js +2 -2
  107. package/dist/Heading.main.js.map +1 -1
  108. package/dist/Heading.mjs +2 -2
  109. package/dist/Heading.module.js +2 -2
  110. package/dist/Heading.module.js.map +1 -1
  111. package/dist/HiddenDateInput.main.js +5 -1
  112. package/dist/HiddenDateInput.main.js.map +1 -1
  113. package/dist/HiddenDateInput.mjs +6 -2
  114. package/dist/HiddenDateInput.module.js +6 -2
  115. package/dist/HiddenDateInput.module.js.map +1 -1
  116. package/dist/Input.main.js +1 -1
  117. package/dist/Input.main.js.map +1 -1
  118. package/dist/Input.mjs +2 -2
  119. package/dist/Input.module.js +2 -2
  120. package/dist/Input.module.js.map +1 -1
  121. package/dist/Keyboard.main.js +1 -1
  122. package/dist/Keyboard.main.js.map +1 -1
  123. package/dist/Keyboard.mjs +2 -2
  124. package/dist/Keyboard.module.js +2 -2
  125. package/dist/Keyboard.module.js.map +1 -1
  126. package/dist/Label.main.js +2 -1
  127. package/dist/Label.main.js.map +1 -1
  128. package/dist/Label.mjs +3 -2
  129. package/dist/Label.module.js +3 -2
  130. package/dist/Label.module.js.map +1 -1
  131. package/dist/Link.main.js +3 -2
  132. package/dist/Link.main.js.map +1 -1
  133. package/dist/Link.mjs +4 -3
  134. package/dist/Link.module.js +4 -3
  135. package/dist/Link.module.js.map +1 -1
  136. package/dist/ListBox.main.js +13 -14
  137. package/dist/ListBox.main.js.map +1 -1
  138. package/dist/ListBox.mjs +14 -15
  139. package/dist/ListBox.module.js +14 -15
  140. package/dist/ListBox.module.js.map +1 -1
  141. package/dist/Menu.main.js +21 -8
  142. package/dist/Menu.main.js.map +1 -1
  143. package/dist/Menu.mjs +22 -9
  144. package/dist/Menu.module.js +22 -9
  145. package/dist/Menu.module.js.map +1 -1
  146. package/dist/Meter.main.js +1 -1
  147. package/dist/Meter.main.js.map +1 -1
  148. package/dist/Meter.mjs +2 -2
  149. package/dist/Meter.module.js +2 -2
  150. package/dist/Meter.module.js.map +1 -1
  151. package/dist/Modal.main.js +2 -2
  152. package/dist/Modal.main.js.map +1 -1
  153. package/dist/Modal.mjs +3 -3
  154. package/dist/Modal.module.js +3 -3
  155. package/dist/Modal.module.js.map +1 -1
  156. package/dist/NumberField.main.js +1 -1
  157. package/dist/NumberField.main.js.map +1 -1
  158. package/dist/NumberField.mjs +2 -2
  159. package/dist/NumberField.module.js +2 -2
  160. package/dist/NumberField.module.js.map +1 -1
  161. package/dist/OverlayArrow.main.js +1 -1
  162. package/dist/OverlayArrow.main.js.map +1 -1
  163. package/dist/OverlayArrow.mjs +2 -2
  164. package/dist/OverlayArrow.module.js +2 -2
  165. package/dist/OverlayArrow.module.js.map +1 -1
  166. package/dist/Popover.main.js +2 -2
  167. package/dist/Popover.main.js.map +1 -1
  168. package/dist/Popover.mjs +4 -4
  169. package/dist/Popover.module.js +4 -4
  170. package/dist/Popover.module.js.map +1 -1
  171. package/dist/ProgressBar.main.js +1 -1
  172. package/dist/ProgressBar.main.js.map +1 -1
  173. package/dist/ProgressBar.mjs +2 -2
  174. package/dist/ProgressBar.module.js +2 -2
  175. package/dist/ProgressBar.module.js.map +1 -1
  176. package/dist/RadioGroup.main.js +2 -2
  177. package/dist/RadioGroup.main.js.map +1 -1
  178. package/dist/RadioGroup.mjs +3 -3
  179. package/dist/RadioGroup.module.js +3 -3
  180. package/dist/RadioGroup.module.js.map +1 -1
  181. package/dist/SearchField.main.js +1 -1
  182. package/dist/SearchField.main.js.map +1 -1
  183. package/dist/SearchField.mjs +2 -2
  184. package/dist/SearchField.module.js +2 -2
  185. package/dist/SearchField.module.js.map +1 -1
  186. package/dist/Select.main.js +2 -2
  187. package/dist/Select.main.js.map +1 -1
  188. package/dist/Select.mjs +3 -3
  189. package/dist/Select.module.js +3 -3
  190. package/dist/Select.module.js.map +1 -1
  191. package/dist/Separator.main.js +3 -1
  192. package/dist/Separator.main.js.map +1 -1
  193. package/dist/Separator.mjs +4 -2
  194. package/dist/Separator.module.js +4 -2
  195. package/dist/Separator.module.js.map +1 -1
  196. package/dist/SharedElementTransition.main.js +3 -2
  197. package/dist/SharedElementTransition.main.js.map +1 -1
  198. package/dist/SharedElementTransition.mjs +4 -3
  199. package/dist/SharedElementTransition.module.js +4 -3
  200. package/dist/SharedElementTransition.module.js.map +1 -1
  201. package/dist/Slider.main.js +6 -5
  202. package/dist/Slider.main.js.map +1 -1
  203. package/dist/Slider.mjs +7 -6
  204. package/dist/Slider.module.js +7 -6
  205. package/dist/Slider.module.js.map +1 -1
  206. package/dist/Switch.main.js +1 -1
  207. package/dist/Switch.main.js.map +1 -1
  208. package/dist/Switch.mjs +2 -2
  209. package/dist/Switch.module.js +2 -2
  210. package/dist/Switch.module.js.map +1 -1
  211. package/dist/Table.main.js +30 -25
  212. package/dist/Table.main.js.map +1 -1
  213. package/dist/Table.mjs +31 -26
  214. package/dist/Table.module.js +31 -26
  215. package/dist/Table.module.js.map +1 -1
  216. package/dist/Tabs.main.js +13 -6
  217. package/dist/Tabs.main.js.map +1 -1
  218. package/dist/Tabs.mjs +14 -7
  219. package/dist/Tabs.module.js +14 -7
  220. package/dist/Tabs.module.js.map +1 -1
  221. package/dist/TagGroup.main.js +6 -5
  222. package/dist/TagGroup.main.js.map +1 -1
  223. package/dist/TagGroup.mjs +7 -6
  224. package/dist/TagGroup.module.js +7 -6
  225. package/dist/TagGroup.module.js.map +1 -1
  226. package/dist/Text.main.js +2 -1
  227. package/dist/Text.main.js.map +1 -1
  228. package/dist/Text.mjs +3 -2
  229. package/dist/Text.module.js +3 -2
  230. package/dist/Text.module.js.map +1 -1
  231. package/dist/TextArea.main.js +1 -1
  232. package/dist/TextArea.main.js.map +1 -1
  233. package/dist/TextArea.mjs +2 -2
  234. package/dist/TextArea.module.js +2 -2
  235. package/dist/TextArea.module.js.map +1 -1
  236. package/dist/TextField.main.js +1 -1
  237. package/dist/TextField.main.js.map +1 -1
  238. package/dist/TextField.mjs +2 -2
  239. package/dist/TextField.module.js +2 -2
  240. package/dist/TextField.module.js.map +1 -1
  241. package/dist/Toast.main.js +6 -4
  242. package/dist/Toast.main.js.map +1 -1
  243. package/dist/Toast.mjs +7 -5
  244. package/dist/Toast.module.js +7 -5
  245. package/dist/Toast.module.js.map +1 -1
  246. package/dist/ToggleButton.main.js +5 -2
  247. package/dist/ToggleButton.main.js.map +1 -1
  248. package/dist/ToggleButton.mjs +6 -3
  249. package/dist/ToggleButton.module.js +6 -3
  250. package/dist/ToggleButton.module.js.map +1 -1
  251. package/dist/ToggleButtonGroup.main.js +1 -1
  252. package/dist/ToggleButtonGroup.main.js.map +1 -1
  253. package/dist/ToggleButtonGroup.mjs +2 -2
  254. package/dist/ToggleButtonGroup.module.js +2 -2
  255. package/dist/ToggleButtonGroup.module.js.map +1 -1
  256. package/dist/Toolbar.main.js +1 -1
  257. package/dist/Toolbar.main.js.map +1 -1
  258. package/dist/Toolbar.mjs +2 -2
  259. package/dist/Toolbar.module.js +2 -2
  260. package/dist/Toolbar.module.js.map +1 -1
  261. package/dist/Tooltip.main.js +1 -1
  262. package/dist/Tooltip.main.js.map +1 -1
  263. package/dist/Tooltip.mjs +2 -2
  264. package/dist/Tooltip.module.js +2 -2
  265. package/dist/Tooltip.module.js.map +1 -1
  266. package/dist/Tree.main.js +6 -6
  267. package/dist/Tree.main.js.map +1 -1
  268. package/dist/Tree.mjs +7 -7
  269. package/dist/Tree.module.js +7 -7
  270. package/dist/Tree.module.js.map +1 -1
  271. package/dist/types.d.ts +122 -63
  272. package/dist/types.d.ts.map +1 -1
  273. package/dist/utils.main.js +41 -3
  274. package/dist/utils.main.js.map +1 -1
  275. package/dist/utils.mjs +42 -5
  276. package/dist/utils.module.js +42 -5
  277. package/dist/utils.module.js.map +1 -1
  278. package/package.json +24 -24
  279. package/src/Breadcrumbs.tsx +9 -6
  280. package/src/Button.tsx +4 -3
  281. package/src/Calendar.tsx +26 -20
  282. package/src/Checkbox.tsx +7 -6
  283. package/src/ColorArea.tsx +3 -2
  284. package/src/ColorField.tsx +18 -3
  285. package/src/ColorSlider.tsx +2 -1
  286. package/src/ColorSwatch.tsx +2 -1
  287. package/src/ColorSwatchPicker.tsx +2 -0
  288. package/src/ColorThumb.tsx +3 -3
  289. package/src/ColorWheel.tsx +4 -3
  290. package/src/ComboBox.tsx +3 -2
  291. package/src/DateField.tsx +5 -4
  292. package/src/DatePicker.tsx +3 -2
  293. package/src/Dialog.tsx +5 -4
  294. package/src/Disclosure.tsx +7 -6
  295. package/src/DropZone.tsx +5 -5
  296. package/src/Form.tsx +4 -4
  297. package/src/GridList.tsx +30 -23
  298. package/src/Group.tsx +10 -9
  299. package/src/Header.tsx +7 -5
  300. package/src/Heading.tsx +4 -4
  301. package/src/HiddenDateInput.tsx +10 -3
  302. package/src/Input.tsx +3 -2
  303. package/src/Keyboard.tsx +4 -2
  304. package/src/Label.tsx +4 -3
  305. package/src/Link.tsx +15 -12
  306. package/src/ListBox.tsx +23 -22
  307. package/src/Menu.tsx +32 -17
  308. package/src/Meter.tsx +3 -2
  309. package/src/Modal.tsx +5 -4
  310. package/src/NumberField.tsx +2 -1
  311. package/src/OverlayArrow.tsx +3 -2
  312. package/src/Popover.tsx +5 -4
  313. package/src/ProgressBar.tsx +3 -2
  314. package/src/RadioGroup.tsx +6 -5
  315. package/src/SearchField.tsx +3 -2
  316. package/src/Select.tsx +6 -5
  317. package/src/Separator.tsx +8 -5
  318. package/src/SharedElementTransition.tsx +4 -3
  319. package/src/Slider.tsx +9 -7
  320. package/src/Switch.tsx +11 -10
  321. package/src/Table.tsx +47 -36
  322. package/src/Tabs.tsx +23 -18
  323. package/src/TagGroup.tsx +16 -13
  324. package/src/Text.tsx +4 -3
  325. package/src/TextArea.tsx +3 -2
  326. package/src/TextField.tsx +4 -3
  327. package/src/Toast.tsx +15 -11
  328. package/src/ToggleButton.tsx +5 -4
  329. package/src/ToggleButtonGroup.tsx +3 -2
  330. package/src/Toolbar.tsx +3 -2
  331. package/src/Tooltip.tsx +3 -2
  332. package/src/Tree.tsx +18 -17
  333. package/src/utils.tsx +97 -11
@@ -1,5 +1,5 @@
1
1
  import {ButtonContext as $d2b4bc8c273e7be6$export$24d547caef80ccd1} from "./Button.mjs";
2
- import {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
2
+ import {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, dom as $64fa3d84918910a7$export$df3a06d6289f983e, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
3
3
  import {useDisclosure as $hI1OT$useDisclosure, useFocusRing as $hI1OT$useFocusRing} from "react-aria";
4
4
  import {useDisclosureGroupState as $hI1OT$useDisclosureGroupState, useDisclosureState as $hI1OT$useDisclosureState} from "react-stately";
5
5
  import {filterDOMProps as $hI1OT$filterDOMProps, useId as $hI1OT$useId, mergeProps as $hI1OT$mergeProps, mergeRefs as $hI1OT$mergeRefs} from "@react-aria/utils";
@@ -35,7 +35,7 @@ const $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (0, $hI1OT$forwa
35
35
  let domProps = (0, $hI1OT$filterDOMProps)(props, {
36
36
  global: true
37
37
  });
38
- return /*#__PURE__*/ (0, $hI1OT$react).createElement("div", {
38
+ return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
39
39
  ...domProps,
40
40
  ...renderProps,
41
41
  ref: ref,
@@ -112,7 +112,7 @@ const $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $hI1OT$forwa
112
112
  state
113
113
  ]
114
114
  ]
115
- }, /*#__PURE__*/ (0, $hI1OT$react).createElement("div", {
115
+ }, /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
116
116
  ...(0, $hI1OT$mergeProps)(domProps, renderProps, focusWithinProps),
117
117
  ref: ref,
118
118
  "data-expanded": state.isExpanded || undefined,
@@ -137,7 +137,7 @@ const $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $hI1OT$forwa
137
137
  global: true,
138
138
  labelable: true
139
139
  });
140
- return /*#__PURE__*/ (0, $hI1OT$react).createElement("div", {
140
+ return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
141
141
  ...(0, $hI1OT$mergeProps)(DOMProps, renderProps, panelProps, focusWithinProps),
142
142
  ref: (0, $hI1OT$mergeRefs)(ref, panelRef),
143
143
  role: role,
@@ -1,5 +1,5 @@
1
1
  import {ButtonContext as $d2b4bc8c273e7be6$export$24d547caef80ccd1} from "./Button.module.js";
2
- import {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
2
+ import {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, dom as $64fa3d84918910a7$export$df3a06d6289f983e, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
3
3
  import {useDisclosure as $hI1OT$useDisclosure, useFocusRing as $hI1OT$useFocusRing} from "react-aria";
4
4
  import {useDisclosureGroupState as $hI1OT$useDisclosureGroupState, useDisclosureState as $hI1OT$useDisclosureState} from "react-stately";
5
5
  import {filterDOMProps as $hI1OT$filterDOMProps, useId as $hI1OT$useId, mergeProps as $hI1OT$mergeProps, mergeRefs as $hI1OT$mergeRefs} from "@react-aria/utils";
@@ -35,7 +35,7 @@ const $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (0, $hI1OT$forwa
35
35
  let domProps = (0, $hI1OT$filterDOMProps)(props, {
36
36
  global: true
37
37
  });
38
- return /*#__PURE__*/ (0, $hI1OT$react).createElement("div", {
38
+ return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
39
39
  ...domProps,
40
40
  ...renderProps,
41
41
  ref: ref,
@@ -112,7 +112,7 @@ const $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $hI1OT$forwa
112
112
  state
113
113
  ]
114
114
  ]
115
- }, /*#__PURE__*/ (0, $hI1OT$react).createElement("div", {
115
+ }, /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
116
116
  ...(0, $hI1OT$mergeProps)(domProps, renderProps, focusWithinProps),
117
117
  ref: ref,
118
118
  "data-expanded": state.isExpanded || undefined,
@@ -137,7 +137,7 @@ const $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $hI1OT$forwa
137
137
  global: true,
138
138
  labelable: true
139
139
  });
140
- return /*#__PURE__*/ (0, $hI1OT$react).createElement("div", {
140
+ return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
141
141
  ...(0, $hI1OT$mergeProps)(DOMProps, renderProps, panelProps, focusWithinProps),
142
142
  ref: (0, $hI1OT$mergeRefs)(ref, panelRef),
143
143
  role: role,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAuCM,MAAM,yDAA8B,CAAA,GAAA,oBAAY,EAA+B;AAM/E,MAAM,0DAAkB,CAAA,GAAA,iBAAS,EAAE,SAAS,gBAAgB,KAA2B,EAAE,GAAiC;IAC/H,IAAI,QAAQ,CAAA,GAAA,8BAAsB,EAAE;IAEpC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,MAAM,UAAU,IAAI;qBACnC,gCAAC,yCAA4B,QAAQ;QAAC,OAAO;OAC1C,YAAY,QAAQ;AAI7B;AAkCO,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAAiD;AACvF,MAAM,0DAAyB,CAAA,GAAA,oBAAY,EAA0B;AAO5E,MAAM,gEAA4B,CAAA,GAAA,oBAAY,EAAyC;AAKhF,MAAM,4CAA2B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAClJ,CAAC,OAAO,IAAI,GAAG,CAA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S;oBACX;gBACF;aAAE;YACF;gBAAC;gBAA2B;gCAAC;8BAAY;gBAAQ;aAAE;YACnD;gBAAC;gBAAwB;aAAM;SAChC;qBACD,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,iBAAiB;QACvD,KAAK;QACL,iBAAe,MAAM,UAAU,IAAI;QACnC,iBAAe,cAAc;QAC7B,6BAA2B,wBAAwB;OAClD,YAAY,QAAQ;AAI7B;AA8BO,MAAM,4CAAgC,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,gBAAgB,KAA2B,EAAE,GAAiC;IACjK,IAAI,QAAC,OAAO,SAAQ,GAAG;IACvB,IAAI,cAAC,UAAU,YAAE,QAAQ,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE;IACxC,IAAI,EACF,gBAAgB,oBAAoB,EACpC,YAAY,gBAAgB,EAC7B,GAAG,CAAA,GAAA,mBAAW,EAAE;QAAC,QAAQ;IAAI;IAC9B,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;kCACN;QACF;IACF;IACA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;QAAM,WAAW;IAAI;IACnE,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,YAAY,iBAAiB;QACnE,KAAK,CAAA,GAAA,gBAAQ,EAAE,KAAK;QACpB,MAAM;QACN,6BAA2B,wBAAwB;qBACnD,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,yCAAY;gBAAG;aAAK;SACtB;OACA,MAAM,QAAQ;AAIvB","sources":["packages/react-aria-components/src/Disclosure.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaDisclosureProps, LabelAriaProps, useDisclosure, useFocusRing} from 'react-aria';\nimport {ButtonContext} from './Button';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {DisclosureGroupState, DisclosureState, DisclosureGroupProps as StatelyDisclosureGroupProps, useDisclosureGroupState, useDisclosureState} from 'react-stately';\nimport {DOMProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, mergeRefs, useId} from '@react-aria/utils';\nimport React, {createContext, DOMAttributes, ForwardedRef, forwardRef, ReactNode, useContext} from 'react';\n\nexport interface DisclosureGroupProps extends StatelyDisclosureGroupProps, RenderProps<DisclosureGroupRenderProps>, DOMProps, 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-DisclosureGroup'\n */\n className?: ClassNameOrFunction<DisclosureGroupRenderProps>\n}\n\nexport interface DisclosureGroupRenderProps {\n /**\n * Whether the disclosure group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the disclosure group.\n */\n state: DisclosureGroupState\n}\n\nexport const DisclosureGroupStateContext = createContext<DisclosureGroupState | null>(null);\n\n/**\n * A DisclosureGroup is a grouping of related disclosures, sometimes called an accordion.\n * It supports both single and multiple expanded items.\n */\nexport const DisclosureGroup = forwardRef(function DisclosureGroup(props: DisclosureGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n let state = useDisclosureGroupState(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-DisclosureGroup',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n let domProps = filterDOMProps(props, {global: true});\n\n return (\n <div\n {...domProps}\n {...renderProps}\n ref={ref}\n data-disabled={props.isDisabled || undefined}>\n <DisclosureGroupStateContext.Provider value={state}>\n {renderProps.children}\n </DisclosureGroupStateContext.Provider>\n </div>\n );\n});\n\nexport interface DisclosureProps extends Omit<AriaDisclosureProps, 'children'>, RenderProps<DisclosureRenderProps>, 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-Disclosure'\n */\n className?: ClassNameOrFunction<DisclosureRenderProps>,\n /** An id for the disclosure when used within a DisclosureGroup, matching the id used in `expandedKeys`. */\n id?: Key\n}\n\nexport interface DisclosureRenderProps {\n /**\n * Whether the disclosure is expanded.\n * @selector [data-expanded]\n */\n isExpanded: boolean,\n /**\n * Whether the disclosure has keyboard focus.\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean,\n /**\n * Whether the disclosure is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the disclosure.\n */\n state: DisclosureState\n}\n\nexport const DisclosureContext = createContext<ContextValue<DisclosureProps, HTMLDivElement>>(null);\nexport const DisclosureStateContext = createContext<DisclosureState | null>(null);\n\ninterface InternalDisclosureContextValue {\n panelProps: DOMAttributes<HTMLElement>,\n panelRef: React.RefObject<HTMLDivElement | null>\n}\n\nconst InternalDisclosureContext = createContext<InternalDisclosureContextValue | null>(null);\n\n/**\n * A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.\n */\nexport const Disclosure = /*#__PURE__*/ (forwardRef as forwardRefType)(function Disclosure(props: DisclosureProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DisclosureContext);\n let groupState = useContext(DisclosureGroupStateContext)!;\n let {id, ...otherProps} = props;\n\n // Generate an id if one wasn't provided.\n // (can't pass id into useId since it can also be a number)\n let defaultId = useId();\n id ||= defaultId;\n\n let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;\n let state = useDisclosureState({\n ...props,\n isExpanded,\n onExpandedChange(isExpanded) {\n if (groupState) {\n groupState.toggleKey(id);\n }\n\n props.onExpandedChange?.(isExpanded);\n }\n });\n\n let panelRef = React.useRef<HTMLDivElement | null>(null);\n let isDisabled = props.isDisabled || groupState?.isDisabled || false;\n let {buttonProps, panelProps} = useDisclosure({\n ...props,\n isExpanded,\n isDisabled\n }, state, panelRef);\n let {\n isFocusVisible: isFocusVisibleWithin,\n focusProps: focusWithinProps\n } = useFocusRing({within: true});\n\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Disclosure',\n values: {\n isExpanded: state.isExpanded,\n isDisabled,\n isFocusVisibleWithin,\n state\n }\n });\n\n let domProps = filterDOMProps(otherProps, {global: true});\n\n return (\n <Provider\n values={[\n [ButtonContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n trigger: buttonProps\n }\n }],\n [InternalDisclosureContext, {panelProps, panelRef}],\n [DisclosureStateContext, state]\n ]}>\n <div\n {...mergeProps(domProps, renderProps, focusWithinProps)}\n ref={ref}\n data-expanded={state.isExpanded || undefined}\n data-disabled={isDisabled || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}>\n {renderProps.children}\n </div>\n </Provider>\n );\n});\n\nexport interface DisclosurePanelRenderProps {\n /**\n * Whether keyboard focus is within the disclosure panel.\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean\n}\n\nexport interface DisclosurePanelProps extends RenderProps<DisclosurePanelRenderProps>, DOMProps, LabelAriaProps, 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-DisclosurePanel'\n */\n className?: ClassNameOrFunction<DisclosurePanelRenderProps>,\n /**\n * The accessibility role for the disclosure's panel.\n * @default 'group'\n */\n role?: 'group' | 'region',\n /**\n * The children of the component.\n */\n children: ReactNode\n}\n\n/**\n * A DisclosurePanel provides the content for a disclosure.\n */\nexport const DisclosurePanel = /*#__PURE__*/ (forwardRef as forwardRefType)(function DisclosurePanel(props: DisclosurePanelProps, ref: ForwardedRef<HTMLDivElement>) {\n let {role = 'group'} = props;\n let {panelProps, panelRef} = useContext(InternalDisclosureContext)!;\n let {\n isFocusVisible: isFocusVisibleWithin,\n focusProps: focusWithinProps\n } = useFocusRing({within: true});\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-DisclosurePanel',\n values: {\n isFocusVisibleWithin\n }\n });\n let DOMProps = filterDOMProps(props, {global: true, labelable: true});\n return (\n <div\n {...mergeProps(DOMProps, renderProps, panelProps, focusWithinProps)}\n ref={mergeRefs(ref, panelRef)}\n role={role}\n data-focus-visible-within={isFocusVisibleWithin || undefined}>\n <Provider\n values={[\n [ButtonContext, null]\n ]}>\n {props.children}\n </Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"Disclosure.module.js.map"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAwCM,MAAM,yDAA8B,CAAA,GAAA,oBAAY,EAA+B;AAM/E,MAAM,0DAAkB,CAAA,GAAA,iBAAS,EAAE,SAAS,gBAAgB,KAA2B,EAAE,GAAiC;IAC/H,IAAI,QAAQ,CAAA,GAAA,8BAAsB,EAAE;IAEpC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,YAAY,MAAM,UAAU;mBAC5B;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WA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AAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,YAAY,iBAAiB;QACnE,KAAK,CAAA,GAAA,gBAAQ,EAAE,KAAK;QACpB,MAAM;QACN,6BAA2B,wBAAwB;qBACnD,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,yCAAY;gBAAG;aAAK;SACtB;OACA,MAAM,QAAQ;AAIvB","sources":["packages/react-aria-components/src/Disclosure.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaDisclosureProps, LabelAriaProps, useDisclosure, useFocusRing} from 'react-aria';\nimport {ButtonContext} from './Button';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {DisclosureGroupState, DisclosureState, DisclosureGroupProps as StatelyDisclosureGroupProps, useDisclosureGroupState, useDisclosureState} from 'react-stately';\nimport {DOMProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, mergeRefs, useId} from '@react-aria/utils';\nimport React, {createContext, DOMAttributes, ForwardedRef, forwardRef, ReactNode, useContext} from 'react';\n\nexport interface DisclosureGroupProps extends StatelyDisclosureGroupProps, RenderProps<DisclosureGroupRenderProps>, DOMProps, 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-DisclosureGroup'\n */\n className?: ClassNameOrFunction<DisclosureGroupRenderProps>\n}\n\nexport interface DisclosureGroupRenderProps {\n /**\n * Whether the disclosure group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the disclosure group.\n */\n state: DisclosureGroupState\n}\n\nexport const DisclosureGroupStateContext = createContext<DisclosureGroupState | null>(null);\n\n/**\n * A DisclosureGroup is a grouping of related disclosures, sometimes called an accordion.\n * It supports both single and multiple expanded items.\n */\nexport const DisclosureGroup = forwardRef(function DisclosureGroup(props: DisclosureGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n let state = useDisclosureGroupState(props);\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-DisclosureGroup',\n values: {\n isDisabled: state.isDisabled,\n state\n }\n });\n\n let domProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.div\n {...domProps}\n {...renderProps}\n ref={ref}\n data-disabled={props.isDisabled || undefined}>\n <DisclosureGroupStateContext.Provider value={state}>\n {renderProps.children}\n </DisclosureGroupStateContext.Provider>\n </dom.div>\n );\n});\n\nexport interface DisclosureProps extends Omit<AriaDisclosureProps, 'children'>, RenderProps<DisclosureRenderProps>, 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-Disclosure'\n */\n className?: ClassNameOrFunction<DisclosureRenderProps>,\n /** An id for the disclosure when used within a DisclosureGroup, matching the id used in `expandedKeys`. */\n id?: Key\n}\n\nexport interface DisclosureRenderProps {\n /**\n * Whether the disclosure is expanded.\n * @selector [data-expanded]\n */\n isExpanded: boolean,\n /**\n * Whether the disclosure has keyboard focus.\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean,\n /**\n * Whether the disclosure is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * State of the disclosure.\n */\n state: DisclosureState\n}\n\nexport const DisclosureContext = createContext<ContextValue<DisclosureProps, HTMLDivElement>>(null);\nexport const DisclosureStateContext = createContext<DisclosureState | null>(null);\n\ninterface InternalDisclosureContextValue {\n panelProps: DOMAttributes<HTMLElement>,\n panelRef: React.RefObject<HTMLDivElement | null>\n}\n\nconst InternalDisclosureContext = createContext<InternalDisclosureContextValue | null>(null);\n\n/**\n * A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.\n */\nexport const Disclosure = /*#__PURE__*/ (forwardRef as forwardRefType)(function Disclosure(props: DisclosureProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DisclosureContext);\n let groupState = useContext(DisclosureGroupStateContext)!;\n let {id, ...otherProps} = props;\n\n // Generate an id if one wasn't provided.\n // (can't pass id into useId since it can also be a number)\n let defaultId = useId();\n id ||= defaultId;\n\n let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;\n let state = useDisclosureState({\n ...props,\n isExpanded,\n onExpandedChange(isExpanded) {\n if (groupState) {\n groupState.toggleKey(id);\n }\n\n props.onExpandedChange?.(isExpanded);\n }\n });\n\n let panelRef = React.useRef<HTMLDivElement | null>(null);\n let isDisabled = props.isDisabled || groupState?.isDisabled || false;\n let {buttonProps, panelProps} = useDisclosure({\n ...props,\n isExpanded,\n isDisabled\n }, state, panelRef);\n let {\n isFocusVisible: isFocusVisibleWithin,\n focusProps: focusWithinProps\n } = useFocusRing({within: true});\n\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Disclosure',\n values: {\n isExpanded: state.isExpanded,\n isDisabled,\n isFocusVisibleWithin,\n state\n }\n });\n\n let domProps = filterDOMProps(otherProps, {global: true});\n\n return (\n <Provider\n values={[\n [ButtonContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n trigger: buttonProps\n }\n }],\n [InternalDisclosureContext, {panelProps, panelRef}],\n [DisclosureStateContext, state]\n ]}>\n <dom.div\n {...mergeProps(domProps, renderProps, focusWithinProps)}\n ref={ref}\n data-expanded={state.isExpanded || undefined}\n data-disabled={isDisabled || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}>\n {renderProps.children}\n </dom.div>\n </Provider>\n );\n});\n\nexport interface DisclosurePanelRenderProps {\n /**\n * Whether keyboard focus is within the disclosure panel.\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean\n}\n\nexport interface DisclosurePanelProps extends RenderProps<DisclosurePanelRenderProps>, DOMProps, LabelAriaProps, 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-DisclosurePanel'\n */\n className?: ClassNameOrFunction<DisclosurePanelRenderProps>,\n /**\n * The accessibility role for the disclosure's panel.\n * @default 'group'\n */\n role?: 'group' | 'region',\n /**\n * The children of the component.\n */\n children: ReactNode\n}\n\n/**\n * A DisclosurePanel provides the content for a disclosure.\n */\nexport const DisclosurePanel = /*#__PURE__*/ (forwardRef as forwardRefType)(function DisclosurePanel(props: DisclosurePanelProps, ref: ForwardedRef<HTMLDivElement>) {\n let {role = 'group'} = props;\n let {panelProps, panelRef} = useContext(InternalDisclosureContext)!;\n let {\n isFocusVisible: isFocusVisibleWithin,\n focusProps: focusWithinProps\n } = useFocusRing({within: true});\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-DisclosurePanel',\n values: {\n isFocusVisibleWithin\n }\n });\n let DOMProps = filterDOMProps(props, {global: true, labelable: true});\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, panelProps, focusWithinProps)}\n ref={mergeRefs(ref, panelRef)}\n role={role}\n data-focus-visible-within={isFocusVisibleWithin || undefined}>\n <Provider\n values={[\n [ButtonContext, null]\n ]}>\n {props.children}\n </Provider>\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"Disclosure.module.js.map"}
@@ -96,14 +96,13 @@ const $80a65baccb138f12$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $iiEmS$react.
96
96
  }
97
97
  ]
98
98
  ]
99
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($iiEmS$react))).createElement("div", {
99
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($iiEmS$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
100
100
  ...(0, $iiEmS$reactaria.mergeProps)(DOMProps, renderProps, dropProps, hoverProps),
101
101
  slot: props.slot || undefined,
102
102
  ref: dropzoneRef,
103
103
  onClick: (e)=>{
104
- var _dropzoneRef_current;
105
104
  let target = e.target;
106
- while(target && ((_dropzoneRef_current = dropzoneRef.current) === null || _dropzoneRef_current === void 0 ? void 0 : _dropzoneRef_current.contains(target))){
105
+ while(target && (0, $iiEmS$reactariautils.nodeContains)(dropzoneRef.current, target)){
107
106
  if ((0, $iiEmS$reactariautils.isFocusable)(target)) break;
108
107
  else if (target === dropzoneRef.current) {
109
108
  var _buttonRef_current;
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAuDM,MAAM,0DAAkB,CAAA,GAAA,0BAAY,EAA+C;AAKnF,MAAM,yDAAW,CAAA,GAAA,uBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAAiC;IAC1G,IAAI,cAAC,aAAa,OAAM,GAAG;IAC3B,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,cAAc,CAAA,GAAA,kCAAW,EAAE;IAC/B,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAqB;IAC1C,IAAI,aAAC,SAAS,mBAAE,eAAe,gBAAE,YAAY,EAAC,GAAG,CAAA,GAAA,wBAAM,EAAE;QAAC,GAAG,KAAK;QAAE,KAAK;QAAW,eAAe;IAAI;IACvG,IAAI,eAAC,WAAW,EAAC,GAAG,CAAA,GAAA,0BAAQ,EAAE,mBAAmB,CAAC,GAAG;I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CAAC;gBAES;YADjB,IAAI,SAAS,EAAE,MAAM;YACrB,MAAO,YAAU,uBAAA,YAAY,OAAO,cAAnB,2CAAA,qBAAqB,QAAQ,CAAC,SAAS;gBACtD,IAAI,CAAA,GAAA,iCAAU,EAAE,SACd;qBACK,IAAI,WAAW,YAAY,OAAO,EAAE;wBACzC;qBAAA,qBAAA,UAAU,OAAO,cAAjB,yCAAA,mBAAmB,KAAK;oBACxB;gBACF;gBAEA,SAAS,OAAO,aAAa;YAC/B;QACF;QACA,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,oBAAkB,gBAAgB;QAClC,iBAAe,cAAc;qBAC7B,0DAAC,CAAA,GAAA,+BAAa,uBACZ,0DAAC;QACE,GAAG,CAAA,GAAA,2BAAS,EAAE,aAAa,YAAY,gBAAgB,WAAW;QACnE,KAAK;SAER,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/DropZone.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, GlobalDOMAttributes, HoverEvents} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {DropOptions, mergeProps, useButton, useClipboard, useDrop, useFocusRing, useHover, useLocalizedStringFormatter, VisuallyHidden} from 'react-aria';\nimport {filterDOMProps, isFocusable, useLabels, useObjectRef, useSlotId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DropZoneRenderProps {\n /**\n * Whether the dropzone is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the dropzone is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the dropzone is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the dropzone is the drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean,\n /**\n * Whether the dropzone is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface DropZoneProps extends Omit<DropOptions, 'getDropOperationForPoint' | 'ref' | 'hasDropButton'>, HoverEvents, RenderProps<DropZoneRenderProps>, SlotProps, AriaLabelingProps, 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-DropZone'\n */\n className?: ClassNameOrFunction<DropZoneRenderProps>\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, HTMLDivElement>>(null);\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = forwardRef(function DropZone(props: DropZoneProps, ref: ForwardedRef<HTMLDivElement>) {\n let {isDisabled = false} = props;\n [props, ref] = useContextProps(props, ref, DropZoneContext);\n let dropzoneRef = useObjectRef(ref);\n let buttonRef = useRef<HTMLButtonElement>(null);\n let {dropProps, dropButtonProps, isDropTarget} = useDrop({...props, ref: buttonRef, hasDropButton: true});\n let {buttonProps} = useButton(dropButtonProps || {}, buttonRef);\n let {hoverProps, isHovered} = useHover(props);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n let textId = useSlotId();\n let ariaLabel = props['aria-label'] || stringFormatter.format('dropzoneLabel');\n let messageId = props['aria-labelledby'];\n let ariaLabelledby = [textId, messageId].filter(Boolean).join(' ');\n let labelProps = useLabels({'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby});\n\n\n let {clipboardProps} = useClipboard({\n isDisabled,\n onPaste: (items) => props.onDrop?.({\n type: 'drop',\n items,\n x: 0,\n y: 0,\n dropOperation: 'copy'\n })\n });\n\n let renderProps = useRenderProps({\n ...props,\n values: {isHovered, isFocused, isFocusVisible, isDropTarget, isDisabled},\n defaultClassName: 'react-aria-DropZone'\n });\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [TextContext, {id: textId, slot: 'label'}]\n ]}>\n {/* eslint-disable-next-line */}\n <div\n {...mergeProps(DOMProps, renderProps, dropProps, hoverProps)}\n slot={props.slot || undefined}\n ref={dropzoneRef}\n onClick={(e) => {\n let target = e.target as HTMLElement | null;\n while (target && dropzoneRef.current?.contains(target)) {\n if (isFocusable(target)) {\n break;\n } else if (target === dropzoneRef.current) {\n buttonRef.current?.focus();\n break;\n }\n\n target = target.parentElement;\n }\n }}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-drop-target={isDropTarget || undefined}\n data-disabled={isDisabled || undefined}>\n <VisuallyHidden>\n <button\n {...mergeProps(buttonProps, focusProps, clipboardProps, labelProps)}\n ref={buttonRef} />\n </VisuallyHidden>\n {renderProps.children}\n </div>\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAwDM,MAAM,0DAAkB,CAAA,GAAA,0BAAY,EAA+C;AAKnF,MAAM,yDAAW,CAAA,GAAA,uBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAAiC;IAC1G,IAAI,cAAC,aAAa,OAAM,GAAG;IAC3B,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK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AAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,qCAAU;gBAAG;oBAAC,IAAI;oBAAQ,MAAM;gBAAO;aAAE;SAC3C;qBACD,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,2BAAS,EAAE,UAAU,aAAa,WAAW,WAAW;QAC5D,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;QACL,SAAS,CAAC;YACR,IAAI,SAAS,EAAE,MAAM;YACrB,MAAO,UAAU,CAAA,GAAA,kCAAW,EAAE,YAAY,OAAO,EAAE,QAAS;gBAC1D,IAAI,CAAA,GAAA,iCAAU,EAAE,SACd;qBACK,IAAI,WAAW,YAAY,OAAO,EAAE;wBACzC;qBAAA,qBAAA,UAAU,OAAO,cAAjB,yCAAA,mBAAmB,KAAK;oBACxB;gBACF;gBAEA,SAAS,OAAO,aAAa;YAC/B;QACF;QACA,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,oBAAkB,gBAAgB;QAClC,iBAAe,cAAc;qBAC7B,0DAAC,CAAA,GAAA,+BAAa,uBACZ,0DAAC;QACE,GAAG,CAAA,GAAA,2BAAS,EAAE,aAAa,YAAY,gBAAgB,WAAW;QACnE,KAAK;SAER,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/DropZone.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, GlobalDOMAttributes, HoverEvents} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {DropOptions, mergeProps, useButton, useClipboard, useDrop, useFocusRing, useHover, useLocalizedStringFormatter, VisuallyHidden} from 'react-aria';\nimport {filterDOMProps, isFocusable, nodeContains, useLabels, useObjectRef, useSlotId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DropZoneRenderProps {\n /**\n * Whether the dropzone is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the dropzone is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the dropzone is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the dropzone is the drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean,\n /**\n * Whether the dropzone is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface DropZoneProps extends Omit<DropOptions, 'getDropOperationForPoint' | 'ref' | 'hasDropButton'>, HoverEvents, RenderProps<DropZoneRenderProps>, SlotProps, AriaLabelingProps, 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-DropZone'\n */\n className?: ClassNameOrFunction<DropZoneRenderProps>\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, HTMLDivElement>>(null);\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = forwardRef(function DropZone(props: DropZoneProps, ref: ForwardedRef<HTMLDivElement>) {\n let {isDisabled = false} = props;\n [props, ref] = useContextProps(props, ref, DropZoneContext);\n let dropzoneRef = useObjectRef(ref);\n let buttonRef = useRef<HTMLButtonElement>(null);\n let {dropProps, dropButtonProps, isDropTarget} = useDrop({...props, ref: buttonRef, hasDropButton: true});\n let {buttonProps} = useButton(dropButtonProps || {}, buttonRef);\n let {hoverProps, isHovered} = useHover(props);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n let textId = useSlotId();\n let ariaLabel = props['aria-label'] || stringFormatter.format('dropzoneLabel');\n let messageId = props['aria-labelledby'];\n let ariaLabelledby = [textId, messageId].filter(Boolean).join(' ');\n let labelProps = useLabels({'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby});\n\n\n let {clipboardProps} = useClipboard({\n isDisabled,\n onPaste: (items) => props.onDrop?.({\n type: 'drop',\n items,\n x: 0,\n y: 0,\n dropOperation: 'copy'\n })\n });\n\n let renderProps = useRenderProps({\n ...props,\n values: {isHovered, isFocused, isFocusVisible, isDropTarget, isDisabled},\n defaultClassName: 'react-aria-DropZone'\n });\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [TextContext, {id: textId, slot: 'label'}]\n ]}>\n <dom.div\n {...mergeProps(DOMProps, renderProps, dropProps, hoverProps)}\n slot={props.slot || undefined}\n ref={dropzoneRef}\n onClick={(e) => {\n let target = e.target as HTMLElement | null;\n while (target && nodeContains(dropzoneRef.current, target)) {\n if (isFocusable(target)) {\n break;\n } else if (target === dropzoneRef.current) {\n buttonRef.current?.focus();\n break;\n }\n\n target = target.parentElement;\n }\n }}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-drop-target={isDropTarget || undefined}\n data-disabled={isDisabled || undefined}>\n <VisuallyHidden>\n <button\n {...mergeProps(buttonProps, focusProps, clipboardProps, labelProps)}\n ref={buttonRef} />\n </VisuallyHidden>\n {renderProps.children}\n </dom.div>\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.main.js.map"}
package/dist/DropZone.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
2
2
  import $dVbUU$intlStringsmodulejs from "./intlStrings.mjs";
3
3
  import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.mjs";
4
4
  import {useDrop as $dVbUU$useDrop, useButton as $dVbUU$useButton, useHover as $dVbUU$useHover, useFocusRing as $dVbUU$useFocusRing, useLocalizedStringFormatter as $dVbUU$useLocalizedStringFormatter, useClipboard as $dVbUU$useClipboard, mergeProps as $dVbUU$mergeProps, VisuallyHidden as $dVbUU$VisuallyHidden} from "react-aria";
5
- import {useObjectRef as $dVbUU$useObjectRef, useSlotId as $dVbUU$useSlotId, useLabels as $dVbUU$useLabels, filterDOMProps as $dVbUU$filterDOMProps, isFocusable as $dVbUU$isFocusable} from "@react-aria/utils";
5
+ import {useObjectRef as $dVbUU$useObjectRef, useSlotId as $dVbUU$useSlotId, useLabels as $dVbUU$useLabels, filterDOMProps as $dVbUU$filterDOMProps, nodeContains as $dVbUU$nodeContains, isFocusable as $dVbUU$isFocusable} from "@react-aria/utils";
6
6
  import $dVbUU$react, {createContext as $dVbUU$createContext, forwardRef as $dVbUU$forwardRef, useRef as $dVbUU$useRef} from "react";
7
7
 
8
8
 
@@ -89,14 +89,13 @@ const $cb088e721efb9218$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $dVbUU$forwar
89
89
  }
90
90
  ]
91
91
  ]
92
- }, /*#__PURE__*/ (0, $dVbUU$react).createElement("div", {
92
+ }, /*#__PURE__*/ (0, $dVbUU$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
93
93
  ...(0, $dVbUU$mergeProps)(DOMProps, renderProps, dropProps, hoverProps),
94
94
  slot: props.slot || undefined,
95
95
  ref: dropzoneRef,
96
96
  onClick: (e)=>{
97
- var _dropzoneRef_current;
98
97
  let target = e.target;
99
- while(target && ((_dropzoneRef_current = dropzoneRef.current) === null || _dropzoneRef_current === void 0 ? void 0 : _dropzoneRef_current.contains(target))){
98
+ while(target && (0, $dVbUU$nodeContains)(dropzoneRef.current, target)){
100
99
  if ((0, $dVbUU$isFocusable)(target)) break;
101
100
  else if (target === dropzoneRef.current) {
102
101
  var _buttonRef_current;
@@ -1,8 +1,8 @@
1
- import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
2
2
  import $dVbUU$intlStringsmodulejs from "./intlStrings.module.js";
3
3
  import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.module.js";
4
4
  import {useDrop as $dVbUU$useDrop, useButton as $dVbUU$useButton, useHover as $dVbUU$useHover, useFocusRing as $dVbUU$useFocusRing, useLocalizedStringFormatter as $dVbUU$useLocalizedStringFormatter, useClipboard as $dVbUU$useClipboard, mergeProps as $dVbUU$mergeProps, VisuallyHidden as $dVbUU$VisuallyHidden} from "react-aria";
5
- import {useObjectRef as $dVbUU$useObjectRef, useSlotId as $dVbUU$useSlotId, useLabels as $dVbUU$useLabels, filterDOMProps as $dVbUU$filterDOMProps, isFocusable as $dVbUU$isFocusable} from "@react-aria/utils";
5
+ import {useObjectRef as $dVbUU$useObjectRef, useSlotId as $dVbUU$useSlotId, useLabels as $dVbUU$useLabels, filterDOMProps as $dVbUU$filterDOMProps, nodeContains as $dVbUU$nodeContains, isFocusable as $dVbUU$isFocusable} from "@react-aria/utils";
6
6
  import $dVbUU$react, {createContext as $dVbUU$createContext, forwardRef as $dVbUU$forwardRef, useRef as $dVbUU$useRef} from "react";
7
7
 
8
8
 
@@ -89,14 +89,13 @@ const $cb088e721efb9218$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $dVbUU$forwar
89
89
  }
90
90
  ]
91
91
  ]
92
- }, /*#__PURE__*/ (0, $dVbUU$react).createElement("div", {
92
+ }, /*#__PURE__*/ (0, $dVbUU$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
93
93
  ...(0, $dVbUU$mergeProps)(DOMProps, renderProps, dropProps, hoverProps),
94
94
  slot: props.slot || undefined,
95
95
  ref: dropzoneRef,
96
96
  onClick: (e)=>{
97
- var _dropzoneRef_current;
98
97
  let target = e.target;
99
- while(target && ((_dropzoneRef_current = dropzoneRef.current) === null || _dropzoneRef_current === void 0 ? void 0 : _dropzoneRef_current.contains(target))){
98
+ while(target && (0, $dVbUU$nodeContains)(dropzoneRef.current, target)){
100
99
  if ((0, $dVbUU$isFocusable)(target)) break;
101
100
  else if (target === dropzoneRef.current) {
102
101
  var _buttonRef_current;
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAuDM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAA+C;AAKnF,MAAM,yDAAW,CAAA,GAAA,iBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAAiC;IAC1G,IAAI,cAAC,aAAa,OAAM,GAAG;IAC3B,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,cAAc,CAAA,GAAA,mBAAW,EAAE;IAC/B,IAAI,YAA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,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBAAC,IAAI;oBAAQ,MAAM;gBAAO;aAAE;SAC3C;qBAED,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,WAAW,WAAW;QAC5D,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;QACL,SAAS,CAAC;gBAES;YADjB,IAAI,SAAS,EAAE,MAAM;YACrB,MAAO,YAAU,uBAAA,YAAY,OAAO,cAAnB,2CAAA,qBAAqB,QAAQ,CAAC,SAAS;gBACtD,IAAI,CAAA,GAAA,kBAAU,EAAE,SACd;qBACK,IAAI,WAAW,YAAY,OAAO,EAAE;wBACzC;qBAAA,qBAAA,UAAU,OAAO,cAAjB,yCAAA,mBAAmB,KAAK;oBACxB;gBACF;gBAEA,SAAS,OAAO,aAAa;YAC/B;QACF;QACA,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,oBAAkB,gBAAgB;QAClC,iBAAe,cAAc;qBAC7B,gCAAC,CAAA,GAAA,qBAAa,uBACZ,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,YAAY,gBAAgB,WAAW;QACnE,KAAK;SAER,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/DropZone.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, GlobalDOMAttributes, HoverEvents} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {DropOptions, mergeProps, useButton, useClipboard, useDrop, useFocusRing, useHover, useLocalizedStringFormatter, VisuallyHidden} from 'react-aria';\nimport {filterDOMProps, isFocusable, useLabels, useObjectRef, useSlotId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DropZoneRenderProps {\n /**\n * Whether the dropzone is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the dropzone is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the dropzone is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the dropzone is the drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean,\n /**\n * Whether the dropzone is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface DropZoneProps extends Omit<DropOptions, 'getDropOperationForPoint' | 'ref' | 'hasDropButton'>, HoverEvents, RenderProps<DropZoneRenderProps>, SlotProps, AriaLabelingProps, 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-DropZone'\n */\n className?: ClassNameOrFunction<DropZoneRenderProps>\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, HTMLDivElement>>(null);\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = forwardRef(function DropZone(props: DropZoneProps, ref: ForwardedRef<HTMLDivElement>) {\n let {isDisabled = false} = props;\n [props, ref] = useContextProps(props, ref, DropZoneContext);\n let dropzoneRef = useObjectRef(ref);\n let buttonRef = useRef<HTMLButtonElement>(null);\n let {dropProps, dropButtonProps, isDropTarget} = useDrop({...props, ref: buttonRef, hasDropButton: true});\n let {buttonProps} = useButton(dropButtonProps || {}, buttonRef);\n let {hoverProps, isHovered} = useHover(props);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n let textId = useSlotId();\n let ariaLabel = props['aria-label'] || stringFormatter.format('dropzoneLabel');\n let messageId = props['aria-labelledby'];\n let ariaLabelledby = [textId, messageId].filter(Boolean).join(' ');\n let labelProps = useLabels({'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby});\n\n\n let {clipboardProps} = useClipboard({\n isDisabled,\n onPaste: (items) => props.onDrop?.({\n type: 'drop',\n items,\n x: 0,\n y: 0,\n dropOperation: 'copy'\n })\n });\n\n let renderProps = useRenderProps({\n ...props,\n values: {isHovered, isFocused, isFocusVisible, isDropTarget, isDisabled},\n defaultClassName: 'react-aria-DropZone'\n });\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [TextContext, {id: textId, slot: 'label'}]\n ]}>\n {/* eslint-disable-next-line */}\n <div\n {...mergeProps(DOMProps, renderProps, dropProps, hoverProps)}\n slot={props.slot || undefined}\n ref={dropzoneRef}\n onClick={(e) => {\n let target = e.target as HTMLElement | null;\n while (target && dropzoneRef.current?.contains(target)) {\n if (isFocusable(target)) {\n break;\n } else if (target === dropzoneRef.current) {\n buttonRef.current?.focus();\n break;\n }\n\n target = target.parentElement;\n }\n }}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-drop-target={isDropTarget || undefined}\n data-disabled={isDisabled || undefined}>\n <VisuallyHidden>\n <button\n {...mergeProps(buttonProps, focusProps, clipboardProps, labelProps)}\n ref={buttonRef} />\n </VisuallyHidden>\n {renderProps.children}\n </div>\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC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BACN;gBACA,GAAG;gBACH,GAAG;gBACH,eAAe;YACjB;;IACF;IAEA,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;uBAAC;uBAAW;4BAAW;0BAAgB;wBAAc;QAAU;QACvE,kBAAkB;IACpB;IACA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBAAC,IAAI;oBAAQ,MAAM;gBAAO;aAAE;SAC3C;qBACD,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,WAAW,WAAW;QAC5D,MAAM,MAAM,IAAI,IAAI;QACpB,KAAK;QACL,SAAS,CAAC;YACR,IAAI,SAAS,EAAE,MAAM;YACrB,MAAO,UAAU,CAAA,GAAA,mBAAW,EAAE,YAAY,OAAO,EAAE,QAAS;gBAC1D,IAAI,CAAA,GAAA,kBAAU,EAAE,SACd;qBACK,IAAI,WAAW,YAAY,OAAO,EAAE;wBACzC;qBAAA,qBAAA,UAAU,OAAO,cAAjB,yCAAA,mBAAmB,KAAK;oBACxB;gBACF;gBAEA,SAAS,OAAO,aAAa;YAC/B;QACF;QACA,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,oBAAkB,gBAAgB;QAClC,iBAAe,cAAc;qBAC7B,gCAAC,CAAA,GAAA,qBAAa,uBACZ,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,YAAY,gBAAgB,WAAW;QACnE,KAAK;SAER,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/DropZone.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, GlobalDOMAttributes, HoverEvents} from '@react-types/shared';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {DropOptions, mergeProps, useButton, useClipboard, useDrop, useFocusRing, useHover, useLocalizedStringFormatter, VisuallyHidden} from 'react-aria';\nimport {filterDOMProps, isFocusable, nodeContains, useLabels, useObjectRef, useSlotId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DropZoneRenderProps {\n /**\n * Whether the dropzone is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the dropzone is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the dropzone is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the dropzone is the drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean,\n /**\n * Whether the dropzone is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\n\nexport interface DropZoneProps extends Omit<DropOptions, 'getDropOperationForPoint' | 'ref' | 'hasDropButton'>, HoverEvents, RenderProps<DropZoneRenderProps>, SlotProps, AriaLabelingProps, 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-DropZone'\n */\n className?: ClassNameOrFunction<DropZoneRenderProps>\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, HTMLDivElement>>(null);\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = forwardRef(function DropZone(props: DropZoneProps, ref: ForwardedRef<HTMLDivElement>) {\n let {isDisabled = false} = props;\n [props, ref] = useContextProps(props, ref, DropZoneContext);\n let dropzoneRef = useObjectRef(ref);\n let buttonRef = useRef<HTMLButtonElement>(null);\n let {dropProps, dropButtonProps, isDropTarget} = useDrop({...props, ref: buttonRef, hasDropButton: true});\n let {buttonProps} = useButton(dropButtonProps || {}, buttonRef);\n let {hoverProps, isHovered} = useHover(props);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n let textId = useSlotId();\n let ariaLabel = props['aria-label'] || stringFormatter.format('dropzoneLabel');\n let messageId = props['aria-labelledby'];\n let ariaLabelledby = [textId, messageId].filter(Boolean).join(' ');\n let labelProps = useLabels({'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby});\n\n\n let {clipboardProps} = useClipboard({\n isDisabled,\n onPaste: (items) => props.onDrop?.({\n type: 'drop',\n items,\n x: 0,\n y: 0,\n dropOperation: 'copy'\n })\n });\n\n let renderProps = useRenderProps({\n ...props,\n values: {isHovered, isFocused, isFocusVisible, isDropTarget, isDisabled},\n defaultClassName: 'react-aria-DropZone'\n });\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [TextContext, {id: textId, slot: 'label'}]\n ]}>\n <dom.div\n {...mergeProps(DOMProps, renderProps, dropProps, hoverProps)}\n slot={props.slot || undefined}\n ref={dropzoneRef}\n onClick={(e) => {\n let target = e.target as HTMLElement | null;\n while (target && nodeContains(dropzoneRef.current, target)) {\n if (isFocusable(target)) {\n break;\n } else if (target === dropzoneRef.current) {\n buttonRef.current?.focus();\n break;\n }\n\n target = target.parentElement;\n }\n }}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-drop-target={isDropTarget || undefined}\n data-disabled={isDisabled || undefined}>\n <VisuallyHidden>\n <button\n {...mergeProps(buttonProps, focusProps, clipboardProps, labelProps)}\n ref={buttonRef} />\n </VisuallyHidden>\n {renderProps.children}\n </dom.div>\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.module.js.map"}
package/dist/Form.main.js CHANGED
@@ -30,7 +30,7 @@ const $35157657e549736b$export$c24727297075ec6a = /*#__PURE__*/ (0, $bpD8E$react
30
30
  const $35157657e549736b$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $bpD8E$react.forwardRef)(function Form(props, ref) {
31
31
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $35157657e549736b$export$c24727297075ec6a);
32
32
  let { validationErrors: validationErrors, validationBehavior: validationBehavior = 'native', children: children, className: className, ...domProps } = props;
33
- return /*#__PURE__*/ (0, ($parcel$interopDefault($bpD8E$react))).createElement("form", {
33
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($bpD8E$react))).createElement((0, $c5ccf687772c0422$exports.dom).form, {
34
34
  noValidate: validationBehavior !== 'native',
35
35
  ...domProps,
36
36
  ref: ref,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAuBM,MAAM,0DAAc,CAAA,GAAA,0BAAY,EAA4C;AAM5E,MAAM,0DAAO,CAAA,GAAA,uBAAS,EAAE,SAAS,KAAK,KAAgB,EAAE,GAAkC;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,sBAAE,qBAAqB,oBAAU,QAAQ,aAAE,SAAS,EAAE,GAAG,UAAS,GAAG;IAC1F,qBACE,0DAAC;QAAK,YAAY,uBAAuB;QAAW,GAAG,QAAQ;QAAE,KAAK;QAAK,WAAW,aAAa;qBACjG,0DAAC,0CAAY,QAAQ;QAAC,OAAO;YAAC,GAAG,KAAK;gCAAE;QAAkB;qBACxD,0DAAC,CAAA,GAAA,yCAAoB,EAAE,QAAQ;QAAC,OAAO,6BAAA,8BAAA,mBAAoB,CAAC;OACzD;AAKX","sources":["packages/react-aria-components/src/Form.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {ContextValue, DOMProps, useContextProps} from './utils';\nimport {FormValidationContext} from 'react-stately';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {FormProps as SharedFormProps} from '@react-types/form';\n\nexport interface FormProps extends SharedFormProps, DOMProps, GlobalDOMAttributes<HTMLFormElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-Form'\n */\n className?: string,\n /**\n * Whether to use native HTML form validation to prevent form submission\n * when a field value is missing or invalid, or mark fields as required\n * or invalid via ARIA.\n * @default 'native'\n */\n validationBehavior?: 'aria' | 'native'\n}\n\nexport const FormContext = createContext<ContextValue<FormProps, HTMLFormElement>>(null);\n\n/**\n * A form is a group of inputs that allows users to submit data to a server,\n * with support for providing field validation errors.\n */\nexport const Form = forwardRef(function Form(props: FormProps, ref: ForwardedRef<HTMLFormElement>) {\n [props, ref] = useContextProps(props, ref, FormContext);\n let {validationErrors, validationBehavior = 'native', children, className, ...domProps} = props;\n return (\n <form noValidate={validationBehavior !== 'native'} {...domProps} ref={ref} className={className || 'react-aria-Form'}>\n <FormContext.Provider value={{...props, validationBehavior}}>\n <FormValidationContext.Provider value={validationErrors ?? {}}>\n {children}\n </FormValidationContext.Provider>\n </FormContext.Provider>\n </form>\n );\n});\n"],"names":[],"version":3,"file":"Form.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAuBM,MAAM,0DAAc,CAAA,GAAA,0BAAY,EAA4C;AAM5E,MAAM,0DAAO,CAAA,GAAA,uBAAS,EAAE,SAAS,KAAK,KAAgB,EAAE,GAAkC;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,sBAAE,qBAAqB,oBAAU,QAAQ,aAAE,SAAS,EAAE,GAAG,UAAS,GAAG;IAC1F,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,IAAI;QAAC,YAAY,uBAAuB;QAAW,GAAG,QAAQ;QAAE,KAAK;QAAK,WAAW,aAAa;qBACrG,0DAAC,0CAAY,QAAQ;QAAC,OAAO;YAAC,GAAG,KAAK;gCAAE;QAAkB;qBACxD,0DAAC,CAAA,GAAA,yCAAoB,EAAE,QAAQ;QAAC,OAAO,6BAAA,8BAAA,mBAAoB,CAAC;OACzD;AAKX","sources":["packages/react-aria-components/src/Form.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {ContextValue, dom, DOMProps, DOMRenderProps, useContextProps} from './utils';\nimport {FormValidationContext} from 'react-stately';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {FormProps as SharedFormProps} from '@react-types/form';\n\nexport interface FormProps extends SharedFormProps, DOMProps, DOMRenderProps<'form', undefined>, GlobalDOMAttributes<HTMLFormElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-Form'\n */\n className?: string,\n /**\n * Whether to use native HTML form validation to prevent form submission\n * when a field value is missing or invalid, or mark fields as required\n * or invalid via ARIA.\n * @default 'native'\n */\n validationBehavior?: 'aria' | 'native'\n}\n\nexport const FormContext = createContext<ContextValue<FormProps, HTMLFormElement>>(null);\n\n/**\n * A form is a group of inputs that allows users to submit data to a server,\n * with support for providing field validation errors.\n */\nexport const Form = forwardRef(function Form(props: FormProps, ref: ForwardedRef<HTMLFormElement>) {\n [props, ref] = useContextProps(props, ref, FormContext);\n let {validationErrors, validationBehavior = 'native', children, className, ...domProps} = props;\n return (\n <dom.form noValidate={validationBehavior !== 'native'} {...domProps} ref={ref} className={className || 'react-aria-Form'}>\n <FormContext.Provider value={{...props, validationBehavior}}>\n <FormValidationContext.Provider value={validationErrors ?? {}}>\n {children}\n </FormValidationContext.Provider>\n </FormContext.Provider>\n </dom.form>\n );\n});\n"],"names":[],"version":3,"file":"Form.main.js.map"}
package/dist/Form.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.mjs";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.mjs";
2
2
  import {FormValidationContext as $j6ya4$FormValidationContext} from "react-stately";
3
3
  import $j6ya4$react, {createContext as $j6ya4$createContext, forwardRef as $j6ya4$forwardRef} from "react";
4
4
 
@@ -19,7 +19,7 @@ const $d3e0e05bdfcf66bd$export$c24727297075ec6a = /*#__PURE__*/ (0, $j6ya4$creat
19
19
  const $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $j6ya4$forwardRef)(function Form(props, ref) {
20
20
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d3e0e05bdfcf66bd$export$c24727297075ec6a);
21
21
  let { validationErrors: validationErrors, validationBehavior: validationBehavior = 'native', children: children, className: className, ...domProps } = props;
22
- return /*#__PURE__*/ (0, $j6ya4$react).createElement("form", {
22
+ return /*#__PURE__*/ (0, $j6ya4$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).form, {
23
23
  noValidate: validationBehavior !== 'native',
24
24
  ...domProps,
25
25
  ref: ref,
@@ -1,4 +1,4 @@
1
- import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.module.js";
1
+ import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.module.js";
2
2
  import {FormValidationContext as $j6ya4$FormValidationContext} from "react-stately";
3
3
  import $j6ya4$react, {createContext as $j6ya4$createContext, forwardRef as $j6ya4$forwardRef} from "react";
4
4
 
@@ -19,7 +19,7 @@ const $d3e0e05bdfcf66bd$export$c24727297075ec6a = /*#__PURE__*/ (0, $j6ya4$creat
19
19
  const $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $j6ya4$forwardRef)(function Form(props, ref) {
20
20
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d3e0e05bdfcf66bd$export$c24727297075ec6a);
21
21
  let { validationErrors: validationErrors, validationBehavior: validationBehavior = 'native', children: children, className: className, ...domProps } = props;
22
- return /*#__PURE__*/ (0, $j6ya4$react).createElement("form", {
22
+ return /*#__PURE__*/ (0, $j6ya4$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).form, {
23
23
  noValidate: validationBehavior !== 'native',
24
24
  ...domProps,
25
25
  ref: ref,
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAuBM,MAAM,0DAAc,CAAA,GAAA,oBAAY,EAA4C;AAM5E,MAAM,0DAAO,CAAA,GAAA,iBAAS,EAAE,SAAS,KAAK,KAAgB,EAAE,GAAkC;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,sBAAE,qBAAqB,oBAAU,QAAQ,aAAE,SAAS,EAAE,GAAG,UAAS,GAAG;IAC1F,qBACE,gCAAC;QAAK,YAAY,uBAAuB;QAAW,GAAG,QAAQ;QAAE,KAAK;QAAK,WAAW,aAAa;qBACjG,gCAAC,0CAAY,QAAQ;QAAC,OAAO;YAAC,GAAG,KAAK;gCAAE;QAAkB;qBACxD,gCAAC,CAAA,GAAA,4BAAoB,EAAE,QAAQ;QAAC,OAAO,6BAAA,8BAAA,mBAAoB,CAAC;OACzD;AAKX","sources":["packages/react-aria-components/src/Form.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {ContextValue, DOMProps, useContextProps} from './utils';\nimport {FormValidationContext} from 'react-stately';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {FormProps as SharedFormProps} from '@react-types/form';\n\nexport interface FormProps extends SharedFormProps, DOMProps, GlobalDOMAttributes<HTMLFormElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-Form'\n */\n className?: string,\n /**\n * Whether to use native HTML form validation to prevent form submission\n * when a field value is missing or invalid, or mark fields as required\n * or invalid via ARIA.\n * @default 'native'\n */\n validationBehavior?: 'aria' | 'native'\n}\n\nexport const FormContext = createContext<ContextValue<FormProps, HTMLFormElement>>(null);\n\n/**\n * A form is a group of inputs that allows users to submit data to a server,\n * with support for providing field validation errors.\n */\nexport const Form = forwardRef(function Form(props: FormProps, ref: ForwardedRef<HTMLFormElement>) {\n [props, ref] = useContextProps(props, ref, FormContext);\n let {validationErrors, validationBehavior = 'native', children, className, ...domProps} = props;\n return (\n <form noValidate={validationBehavior !== 'native'} {...domProps} ref={ref} className={className || 'react-aria-Form'}>\n <FormContext.Provider value={{...props, validationBehavior}}>\n <FormValidationContext.Provider value={validationErrors ?? {}}>\n {children}\n </FormValidationContext.Provider>\n </FormContext.Provider>\n </form>\n );\n});\n"],"names":[],"version":3,"file":"Form.module.js.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAuBM,MAAM,0DAAc,CAAA,GAAA,oBAAY,EAA4C;AAM5E,MAAM,0DAAO,CAAA,GAAA,iBAAS,EAAE,SAAS,KAAK,KAAgB,EAAE,GAAkC;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,sBAAE,qBAAqB,oBAAU,QAAQ,aAAE,SAAS,EAAE,GAAG,UAAS,GAAG;IAC1F,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,IAAI;QAAC,YAAY,uBAAuB;QAAW,GAAG,QAAQ;QAAE,KAAK;QAAK,WAAW,aAAa;qBACrG,gCAAC,0CAAY,QAAQ;QAAC,OAAO;YAAC,GAAG,KAAK;gCAAE;QAAkB;qBACxD,gCAAC,CAAA,GAAA,4BAAoB,EAAE,QAAQ;QAAC,OAAO,6BAAA,8BAAA,mBAAoB,CAAC;OACzD;AAKX","sources":["packages/react-aria-components/src/Form.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {ContextValue, dom, DOMProps, DOMRenderProps, useContextProps} from './utils';\nimport {FormValidationContext} from 'react-stately';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {FormProps as SharedFormProps} from '@react-types/form';\n\nexport interface FormProps extends SharedFormProps, DOMProps, DOMRenderProps<'form', undefined>, GlobalDOMAttributes<HTMLFormElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-Form'\n */\n className?: string,\n /**\n * Whether to use native HTML form validation to prevent form submission\n * when a field value is missing or invalid, or mark fields as required\n * or invalid via ARIA.\n * @default 'native'\n */\n validationBehavior?: 'aria' | 'native'\n}\n\nexport const FormContext = createContext<ContextValue<FormProps, HTMLFormElement>>(null);\n\n/**\n * A form is a group of inputs that allows users to submit data to a server,\n * with support for providing field validation errors.\n */\nexport const Form = forwardRef(function Form(props: FormProps, ref: ForwardedRef<HTMLFormElement>) {\n [props, ref] = useContextProps(props, ref, FormContext);\n let {validationErrors, validationBehavior = 'native', children, className, ...domProps} = props;\n return (\n <dom.form noValidate={validationBehavior !== 'native'} {...domProps} ref={ref} className={className || 'react-aria-Form'}>\n <FormContext.Provider value={{...props, validationBehavior}}>\n <FormValidationContext.Provider value={validationErrors ?? {}}>\n {children}\n </FormValidationContext.Provider>\n </FormContext.Provider>\n </dom.form>\n );\n});\n"],"names":[],"version":3,"file":"Form.module.js.map"}
@@ -109,7 +109,8 @@ function $132cbde493282f82$var$GridListInner({ props: props, collection: collect
109
109
  // Only tab navigation is supported in grid layout.
110
110
  keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,
111
111
  isVirtualized: isVirtualized,
112
- shouldSelectOnPressUp: props.shouldSelectOnPressUp
112
+ shouldSelectOnPressUp: props.shouldSelectOnPressUp,
113
+ disallowTypeAhead: disallowTypeAhead
113
114
  }, filteredState, ref);
114
115
  let selectionManager = filteredState.selectionManager;
115
116
  let isListDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
@@ -176,8 +177,8 @@ function $132cbde493282f82$var$GridListInner({ props: props, collection: collect
176
177
  state: filteredState
177
178
  };
178
179
  let renderProps = (0, $c5ccf687772c0422$exports.useRenderProps)({
179
- className: props.className,
180
- style: props.style,
180
+ ...props,
181
+ children: undefined,
181
182
  defaultClassName: 'react-aria-GridList',
182
183
  values: renderValues
183
184
  });
@@ -201,7 +202,7 @@ function $132cbde493282f82$var$GridListInner({ props: props, collection: collect
201
202
  let DOMProps = (0, $UaDUV$reactariautils.filterDOMProps)(props, {
202
203
  global: true
203
204
  });
204
- return /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement((0, $UaDUV$reactaria.FocusScope), null, /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement("div", {
205
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement((0, $UaDUV$reactaria.FocusScope), null, /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
205
206
  ...(0, $UaDUV$reactaria.mergeProps)(DOMProps, renderProps, gridProps, focusProps, droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps, emptyStatePropOverrides),
206
207
  ref: ref,
207
208
  slot: props.slot || undefined,
@@ -321,7 +322,7 @@ const $132cbde493282f82$export$e96fc9a8407faa6b = /*#__PURE__*/ (0, $UaDUV$react
321
322
  ...visuallyHiddenProps,
322
323
  ...dropIndicator === null || dropIndicator === void 0 ? void 0 : dropIndicator.dropIndicatorProps,
323
324
  ref: dropIndicatorRef
324
- }))), /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement("div", {
325
+ }))), /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
325
326
  ...(0, $UaDUV$reactaria.mergeProps)(DOMProps, renderProps, rowProps, focusProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps),
326
327
  ref: ref,
327
328
  "data-selected": states.isSelected || undefined,
@@ -423,7 +424,7 @@ function $132cbde493282f82$var$GridListDropIndicator(props, ref) {
423
424
  isDropTarget: isDropTarget
424
425
  }
425
426
  });
426
- return /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement("div", {
427
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
427
428
  ...renderProps,
428
429
  role: "row",
429
430
  ref: ref,
@@ -487,7 +488,7 @@ const $132cbde493282f82$export$392b9a0bbc7c7e43 = (0, $UaDUV$reactariacollection
487
488
  id: undefined,
488
489
  children: item.rendered,
489
490
  defaultClassName: 'react-aria-GridListLoadingIndicator',
490
- values: null
491
+ values: undefined
491
492
  });
492
493
  // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable
493
494
  // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the
@@ -507,7 +508,7 @@ const $132cbde493282f82$export$392b9a0bbc7c7e43 = (0, $UaDUV$reactariacollection
507
508
  height: 1,
508
509
  width: 1
509
510
  }
510
- })), isLoading && renderProps.children && /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement("div", {
511
+ })), isLoading && renderProps.children && /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
511
512
  ...renderProps,
512
513
  ...(0, $UaDUV$reactariautils.filterDOMProps)(props, {
513
514
  global: true
@@ -529,16 +530,17 @@ const $132cbde493282f82$export$f696877219115b14 = /*#__PURE__*/ (0, $UaDUV$react
529
530
  'aria-label': (_props_arialabel = props['aria-label']) !== null && _props_arialabel !== void 0 ? _props_arialabel : undefined
530
531
  }, state, ref);
531
532
  let renderProps = (0, $c5ccf687772c0422$exports.useRenderProps)({
533
+ ...props,
534
+ id: undefined,
535
+ children: undefined,
532
536
  defaultClassName: 'react-aria-GridListSection',
533
- className: props.className,
534
- style: props.style,
535
- values: {}
537
+ values: undefined
536
538
  });
537
539
  let DOMProps = (0, $UaDUV$reactariautils.filterDOMProps)(props, {
538
540
  global: true
539
541
  });
540
542
  delete DOMProps.id;
541
- return /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement("div", {
543
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
542
544
  ...(0, $UaDUV$reactaria.mergeProps)(DOMProps, renderProps, rowGroupProps),
543
545
  ref: ref
544
546
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement((0, $c5ccf687772c0422$exports.Provider), {
@@ -567,7 +569,8 @@ const $132cbde493282f82$var$GridListHeaderInnerContext = /*#__PURE__*/ (0, $UaDU
567
569
  const $132cbde493282f82$export$1b574dbdb0075ff6 = /*#__PURE__*/ (0, $UaDUV$reactariacollections.createLeafComponent)((0, $UaDUV$reactariacollections.HeaderNode), function Header(props, ref) {
568
570
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $132cbde493282f82$export$87f5843bfb30d205);
569
571
  let rowHeaderProps = (0, $UaDUV$react.useContext)($132cbde493282f82$var$GridListHeaderInnerContext);
570
- return /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement("div", {
572
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($UaDUV$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
573
+ render: props.render,
571
574
  className: "react-aria-GridListHeader",
572
575
  ref: ref,
573
576
  ...props