react-aria-components 3.0.0-nightly-ab9fd5c68-241125 → 3.0.0-nightly-10a43de88-241127

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 (315) hide show
  1. package/dist/Breadcrumbs.main.js +2 -5
  2. package/dist/Breadcrumbs.main.js.map +1 -1
  3. package/dist/Breadcrumbs.mjs +3 -6
  4. package/dist/Breadcrumbs.module.js +3 -6
  5. package/dist/Breadcrumbs.module.js.map +1 -1
  6. package/dist/Button.main.js +2 -5
  7. package/dist/Button.main.js.map +1 -1
  8. package/dist/Button.mjs +2 -5
  9. package/dist/Button.module.js +2 -5
  10. package/dist/Button.module.js.map +1 -1
  11. package/dist/Calendar.main.js +9 -22
  12. package/dist/Calendar.main.js.map +1 -1
  13. package/dist/Calendar.mjs +9 -22
  14. package/dist/Calendar.module.js +9 -22
  15. package/dist/Calendar.module.js.map +1 -1
  16. package/dist/Checkbox.main.js +5 -12
  17. package/dist/Checkbox.main.js.map +1 -1
  18. package/dist/Checkbox.mjs +6 -13
  19. package/dist/Checkbox.module.js +6 -13
  20. package/dist/Checkbox.module.js.map +1 -1
  21. package/dist/ColorArea.main.js +2 -5
  22. package/dist/ColorArea.main.js.map +1 -1
  23. package/dist/ColorArea.mjs +3 -6
  24. package/dist/ColorArea.module.js +3 -6
  25. package/dist/ColorArea.module.js.map +1 -1
  26. package/dist/ColorField.main.js +2 -5
  27. package/dist/ColorField.main.js.map +1 -1
  28. package/dist/ColorField.mjs +2 -5
  29. package/dist/ColorField.module.js +2 -5
  30. package/dist/ColorField.module.js.map +1 -1
  31. package/dist/ColorSlider.main.js +2 -5
  32. package/dist/ColorSlider.main.js.map +1 -1
  33. package/dist/ColorSlider.mjs +2 -5
  34. package/dist/ColorSlider.module.js +2 -5
  35. package/dist/ColorSlider.module.js.map +1 -1
  36. package/dist/ColorSwatch.main.js +2 -5
  37. package/dist/ColorSwatch.main.js.map +1 -1
  38. package/dist/ColorSwatch.mjs +2 -5
  39. package/dist/ColorSwatch.module.js +2 -5
  40. package/dist/ColorSwatch.module.js.map +1 -1
  41. package/dist/ColorSwatchPicker.main.js +4 -8
  42. package/dist/ColorSwatchPicker.main.js.map +1 -1
  43. package/dist/ColorSwatchPicker.mjs +5 -9
  44. package/dist/ColorSwatchPicker.module.js +5 -9
  45. package/dist/ColorSwatchPicker.module.js.map +1 -1
  46. package/dist/ColorThumb.main.js +2 -5
  47. package/dist/ColorThumb.main.js.map +1 -1
  48. package/dist/ColorThumb.mjs +3 -6
  49. package/dist/ColorThumb.module.js +3 -6
  50. package/dist/ColorThumb.module.js.map +1 -1
  51. package/dist/ColorWheel.main.js +5 -11
  52. package/dist/ColorWheel.main.js.map +1 -1
  53. package/dist/ColorWheel.mjs +6 -12
  54. package/dist/ColorWheel.module.js +6 -12
  55. package/dist/ColorWheel.module.js.map +1 -1
  56. package/dist/ComboBox.main.js +2 -5
  57. package/dist/ComboBox.main.js.map +1 -1
  58. package/dist/ComboBox.mjs +3 -6
  59. package/dist/ComboBox.module.js +3 -6
  60. package/dist/ComboBox.module.js.map +1 -1
  61. package/dist/DateField.main.js +8 -23
  62. package/dist/DateField.main.js.map +1 -1
  63. package/dist/DateField.mjs +9 -24
  64. package/dist/DateField.module.js +9 -24
  65. package/dist/DateField.module.js.map +1 -1
  66. package/dist/DatePicker.main.js +4 -11
  67. package/dist/DatePicker.main.js.map +1 -1
  68. package/dist/DatePicker.mjs +5 -12
  69. package/dist/DatePicker.module.js +5 -12
  70. package/dist/DatePicker.module.js.map +1 -1
  71. package/dist/Dialog.main.js +2 -5
  72. package/dist/Dialog.main.js.map +1 -1
  73. package/dist/Dialog.mjs +3 -6
  74. package/dist/Dialog.module.js +3 -6
  75. package/dist/Dialog.module.js.map +1 -1
  76. package/dist/Disclosure.main.js +6 -16
  77. package/dist/Disclosure.main.js.map +1 -1
  78. package/dist/Disclosure.mjs +6 -16
  79. package/dist/Disclosure.module.js +6 -16
  80. package/dist/Disclosure.module.js.map +1 -1
  81. package/dist/DragAndDrop.main.js +2 -5
  82. package/dist/DragAndDrop.main.js.map +1 -1
  83. package/dist/DragAndDrop.mjs +3 -6
  84. package/dist/DragAndDrop.module.js +3 -6
  85. package/dist/DragAndDrop.module.js.map +1 -1
  86. package/dist/DropZone.main.js +2 -5
  87. package/dist/DropZone.main.js.map +1 -1
  88. package/dist/DropZone.mjs +3 -6
  89. package/dist/DropZone.module.js +3 -6
  90. package/dist/DropZone.module.js.map +1 -1
  91. package/dist/FieldError.main.js +2 -5
  92. package/dist/FieldError.main.js.map +1 -1
  93. package/dist/FieldError.mjs +3 -6
  94. package/dist/FieldError.module.js +3 -6
  95. package/dist/FieldError.module.js.map +1 -1
  96. package/dist/FileTrigger.main.js +2 -5
  97. package/dist/FileTrigger.main.js.map +1 -1
  98. package/dist/FileTrigger.mjs +2 -5
  99. package/dist/FileTrigger.module.js +2 -5
  100. package/dist/FileTrigger.module.js.map +1 -1
  101. package/dist/Form.main.js +2 -6
  102. package/dist/Form.main.js.map +1 -1
  103. package/dist/Form.mjs +2 -6
  104. package/dist/Form.module.js +2 -6
  105. package/dist/Form.module.js.map +1 -1
  106. package/dist/GridList.main.js +2 -6
  107. package/dist/GridList.main.js.map +1 -1
  108. package/dist/GridList.mjs +3 -7
  109. package/dist/GridList.module.js +3 -7
  110. package/dist/GridList.module.js.map +1 -1
  111. package/dist/Group.main.js +2 -5
  112. package/dist/Group.main.js.map +1 -1
  113. package/dist/Group.mjs +2 -5
  114. package/dist/Group.module.js +2 -5
  115. package/dist/Group.module.js.map +1 -1
  116. package/dist/Heading.main.js +2 -3
  117. package/dist/Heading.main.js.map +1 -1
  118. package/dist/Heading.mjs +2 -3
  119. package/dist/Heading.module.js +2 -3
  120. package/dist/Heading.module.js.map +1 -1
  121. package/dist/Input.main.js +2 -5
  122. package/dist/Input.main.js.map +1 -1
  123. package/dist/Input.mjs +2 -5
  124. package/dist/Input.module.js +2 -5
  125. package/dist/Input.module.js.map +1 -1
  126. package/dist/Keyboard.main.js +2 -3
  127. package/dist/Keyboard.main.js.map +1 -1
  128. package/dist/Keyboard.mjs +2 -3
  129. package/dist/Keyboard.module.js +2 -3
  130. package/dist/Keyboard.module.js.map +1 -1
  131. package/dist/Label.main.js +2 -3
  132. package/dist/Label.main.js.map +1 -1
  133. package/dist/Label.mjs +2 -3
  134. package/dist/Label.module.js +2 -3
  135. package/dist/Label.module.js.map +1 -1
  136. package/dist/Link.main.js +2 -6
  137. package/dist/Link.main.js.map +1 -1
  138. package/dist/Link.mjs +2 -6
  139. package/dist/Link.module.js +2 -6
  140. package/dist/Link.module.js.map +1 -1
  141. package/dist/ListBox.main.js +5 -10
  142. package/dist/ListBox.main.js.map +1 -1
  143. package/dist/ListBox.mjs +6 -11
  144. package/dist/ListBox.module.js +6 -11
  145. package/dist/ListBox.module.js.map +1 -1
  146. package/dist/Menu.main.js +5 -10
  147. package/dist/Menu.main.js.map +1 -1
  148. package/dist/Menu.mjs +5 -10
  149. package/dist/Menu.module.js +5 -10
  150. package/dist/Menu.module.js.map +1 -1
  151. package/dist/Meter.main.js +2 -5
  152. package/dist/Meter.main.js.map +1 -1
  153. package/dist/Meter.mjs +2 -5
  154. package/dist/Meter.module.js +2 -5
  155. package/dist/Meter.module.js.map +1 -1
  156. package/dist/Modal.main.js +3 -6
  157. package/dist/Modal.main.js.map +1 -1
  158. package/dist/Modal.mjs +4 -7
  159. package/dist/Modal.module.js +4 -7
  160. package/dist/Modal.module.js.map +1 -1
  161. package/dist/NumberField.main.js +2 -5
  162. package/dist/NumberField.main.js.map +1 -1
  163. package/dist/NumberField.mjs +3 -6
  164. package/dist/NumberField.module.js +3 -6
  165. package/dist/NumberField.module.js.map +1 -1
  166. package/dist/OverlayArrow.main.js +2 -6
  167. package/dist/OverlayArrow.main.js.map +1 -1
  168. package/dist/OverlayArrow.mjs +2 -6
  169. package/dist/OverlayArrow.module.js +2 -6
  170. package/dist/OverlayArrow.module.js.map +1 -1
  171. package/dist/Popover.main.js +2 -5
  172. package/dist/Popover.main.js.map +1 -1
  173. package/dist/Popover.mjs +3 -6
  174. package/dist/Popover.module.js +3 -6
  175. package/dist/Popover.module.js.map +1 -1
  176. package/dist/ProgressBar.main.js +2 -6
  177. package/dist/ProgressBar.main.js.map +1 -1
  178. package/dist/ProgressBar.mjs +2 -6
  179. package/dist/ProgressBar.module.js +2 -6
  180. package/dist/ProgressBar.module.js.map +1 -1
  181. package/dist/RadioGroup.main.js +4 -10
  182. package/dist/RadioGroup.main.js.map +1 -1
  183. package/dist/RadioGroup.mjs +4 -10
  184. package/dist/RadioGroup.module.js +4 -10
  185. package/dist/RadioGroup.module.js.map +1 -1
  186. package/dist/SearchField.main.js +2 -5
  187. package/dist/SearchField.main.js.map +1 -1
  188. package/dist/SearchField.mjs +3 -6
  189. package/dist/SearchField.module.js +3 -6
  190. package/dist/SearchField.module.js.map +1 -1
  191. package/dist/Select.main.js +5 -12
  192. package/dist/Select.main.js.map +1 -1
  193. package/dist/Select.mjs +6 -13
  194. package/dist/Select.module.js +6 -13
  195. package/dist/Select.module.js.map +1 -1
  196. package/dist/Slider.main.js +8 -20
  197. package/dist/Slider.main.js.map +1 -1
  198. package/dist/Slider.mjs +9 -21
  199. package/dist/Slider.module.js +9 -21
  200. package/dist/Slider.module.js.map +1 -1
  201. package/dist/Switch.main.js +2 -5
  202. package/dist/Switch.main.js.map +1 -1
  203. package/dist/Switch.mjs +2 -5
  204. package/dist/Switch.module.js +2 -5
  205. package/dist/Switch.module.js.map +1 -1
  206. package/dist/Table.main.js +6 -12
  207. package/dist/Table.main.js.map +1 -1
  208. package/dist/Table.mjs +7 -13
  209. package/dist/Table.module.js +7 -13
  210. package/dist/Table.module.js.map +1 -1
  211. package/dist/Tabs.main.js +6 -16
  212. package/dist/Tabs.main.js.map +1 -1
  213. package/dist/Tabs.mjs +7 -17
  214. package/dist/Tabs.module.js +7 -17
  215. package/dist/Tabs.module.js.map +1 -1
  216. package/dist/TagGroup.main.js +4 -10
  217. package/dist/TagGroup.main.js.map +1 -1
  218. package/dist/TagGroup.mjs +5 -11
  219. package/dist/TagGroup.module.js +5 -11
  220. package/dist/TagGroup.module.js.map +1 -1
  221. package/dist/Text.main.js +2 -3
  222. package/dist/Text.main.js.map +1 -1
  223. package/dist/Text.mjs +2 -3
  224. package/dist/Text.module.js +2 -3
  225. package/dist/Text.module.js.map +1 -1
  226. package/dist/TextArea.main.js +2 -5
  227. package/dist/TextArea.main.js.map +1 -1
  228. package/dist/TextArea.mjs +2 -5
  229. package/dist/TextArea.module.js +2 -5
  230. package/dist/TextArea.module.js.map +1 -1
  231. package/dist/TextField.main.js +2 -5
  232. package/dist/TextField.main.js.map +1 -1
  233. package/dist/TextField.mjs +3 -6
  234. package/dist/TextField.module.js +3 -6
  235. package/dist/TextField.module.js.map +1 -1
  236. package/dist/ToggleButton.main.js +2 -5
  237. package/dist/ToggleButton.main.js.map +1 -1
  238. package/dist/ToggleButton.mjs +3 -6
  239. package/dist/ToggleButton.module.js +3 -6
  240. package/dist/ToggleButton.module.js.map +1 -1
  241. package/dist/ToggleButtonGroup.main.js +2 -5
  242. package/dist/ToggleButtonGroup.main.js.map +1 -1
  243. package/dist/ToggleButtonGroup.mjs +2 -5
  244. package/dist/ToggleButtonGroup.module.js +2 -5
  245. package/dist/ToggleButtonGroup.module.js.map +1 -1
  246. package/dist/Toolbar.main.js +2 -6
  247. package/dist/Toolbar.main.js.map +1 -1
  248. package/dist/Toolbar.mjs +2 -6
  249. package/dist/Toolbar.module.js +2 -6
  250. package/dist/Toolbar.module.js.map +1 -1
  251. package/dist/Tooltip.main.js +2 -5
  252. package/dist/Tooltip.main.js.map +1 -1
  253. package/dist/Tooltip.mjs +3 -6
  254. package/dist/Tooltip.module.js +3 -6
  255. package/dist/Tooltip.module.js.map +1 -1
  256. package/dist/Tree.main.js +2 -6
  257. package/dist/Tree.main.js.map +1 -1
  258. package/dist/Tree.mjs +3 -7
  259. package/dist/Tree.module.js +3 -7
  260. package/dist/Tree.module.js.map +1 -1
  261. package/dist/types.d.ts +10 -10
  262. package/dist/types.d.ts.map +1 -1
  263. package/package.json +30 -30
  264. package/src/Breadcrumbs.tsx +5 -8
  265. package/src/Button.tsx +5 -8
  266. package/src/Calendar.tsx +19 -31
  267. package/src/Checkbox.tsx +11 -17
  268. package/src/ColorArea.tsx +5 -8
  269. package/src/ColorField.tsx +5 -8
  270. package/src/ColorSlider.tsx +5 -8
  271. package/src/ColorSwatch.tsx +5 -8
  272. package/src/ColorSwatchPicker.tsx +7 -13
  273. package/src/ColorThumb.tsx +5 -8
  274. package/src/ColorWheel.tsx +10 -16
  275. package/src/ComboBox.tsx +5 -8
  276. package/src/DateField.tsx +21 -33
  277. package/src/DatePicker.tsx +9 -15
  278. package/src/Dialog.tsx +5 -8
  279. package/src/Disclosure.tsx +16 -25
  280. package/src/DragAndDrop.tsx +5 -8
  281. package/src/DropZone.tsx +5 -8
  282. package/src/FieldError.tsx +5 -8
  283. package/src/FileTrigger.tsx +5 -8
  284. package/src/Form.tsx +6 -9
  285. package/src/GridList.tsx +6 -9
  286. package/src/Group.tsx +5 -8
  287. package/src/Heading.tsx +2 -5
  288. package/src/Input.tsx +5 -8
  289. package/src/Keyboard.tsx +2 -5
  290. package/src/Label.tsx +2 -5
  291. package/src/Link.tsx +6 -9
  292. package/src/ListBox.tsx +8 -12
  293. package/src/Menu.tsx +8 -12
  294. package/src/Meter.tsx +5 -8
  295. package/src/Modal.tsx +5 -8
  296. package/src/NumberField.tsx +5 -8
  297. package/src/OverlayArrow.tsx +6 -9
  298. package/src/Popover.tsx +5 -8
  299. package/src/ProgressBar.tsx +6 -9
  300. package/src/RadioGroup.tsx +10 -16
  301. package/src/SearchField.tsx +5 -8
  302. package/src/Select.tsx +11 -17
  303. package/src/Slider.tsx +20 -32
  304. package/src/Switch.tsx +5 -8
  305. package/src/Table.tsx +10 -19
  306. package/src/Tabs.tsx +14 -23
  307. package/src/TagGroup.tsx +8 -14
  308. package/src/Text.tsx +2 -5
  309. package/src/TextArea.tsx +5 -7
  310. package/src/TextField.tsx +5 -8
  311. package/src/ToggleButton.tsx +5 -8
  312. package/src/ToggleButtonGroup.tsx +5 -8
  313. package/src/Toolbar.tsx +6 -9
  314. package/src/Tooltip.tsx +5 -8
  315. package/src/Tree.tsx +6 -9
@@ -27,13 +27,10 @@ $parcel$export(module.exports, "useDndPersistedKeys", () => $0c2289d253cb4544$ex
27
27
  */
28
28
  const $0c2289d253cb4544$export$d188a835a7bc5783 = /*#__PURE__*/ (0, $bvSDe$react.createContext)({});
29
29
  const $0c2289d253cb4544$export$f55761759794cf55 = /*#__PURE__*/ (0, $bvSDe$react.createContext)(null);
30
- function $0c2289d253cb4544$var$DropIndicator(props, ref) {
30
+ const $0c2289d253cb4544$export$62ed72bc21f6b8a6 = /*#__PURE__*/ (0, $bvSDe$react.forwardRef)(function DropIndicator(props, ref) {
31
31
  let { render: render } = (0, $bvSDe$react.useContext)($0c2289d253cb4544$export$f55761759794cf55);
32
32
  return /*#__PURE__*/ (0, ($parcel$interopDefault($bvSDe$react))).createElement((0, ($parcel$interopDefault($bvSDe$react))).Fragment, null, render(props, ref));
33
- }
34
- /**
35
- * A DropIndicator is rendered between items in a collection to indicate where dropped data will be inserted.
36
- */ const $0c2289d253cb4544$export$62ed72bc21f6b8a6 = /*#__PURE__*/ (0, $bvSDe$react.forwardRef)($0c2289d253cb4544$var$DropIndicator);
33
+ });
37
34
  function $0c2289d253cb4544$export$971707d8a129a1f7(dragAndDropHooks, dropState) {
38
35
  var _dragAndDropHooks_isVirtualDragging;
39
36
  let renderDropIndicator = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.renderDropIndicator;
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AAaM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAA2B,CAAC;AACnE,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAoC;AAepF,SAAS,oCAAc,KA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BAAM,EAAE;QACb,OAAO,IAAI,IAAI;YAAC;YAAY;SAAc,CAAC,MAAM,CAAC,CAAA,IAAK,KAAK;IAC9D,GAAG;QAAC;QAAY;KAAc;AAChC","sources":["packages/react-aria-components/src/DragAndDrop.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 */\nimport type {DropIndicatorProps as AriaDropIndicatorProps, ItemDropTarget, Key} from 'react-aria';\nimport type {DragAndDropHooks} from './useDragAndDrop';\nimport type {DraggableCollectionState, DroppableCollectionState, MultipleSelectionManager} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, JSX, ReactNode, useCallback, useContext, useMemo} from 'react';\nimport type {RenderProps} from './utils';\n\nexport interface DragAndDropContextValue {\n dragAndDropHooks?: DragAndDropHooks,\n dragState?: DraggableCollectionState,\n dropState?: DroppableCollectionState\n}\n\nexport const DragAndDropContext = createContext<DragAndDropContextValue>({});\nexport const DropIndicatorContext = createContext<DropIndicatorContextValue | null>(null);\n\nexport interface DropIndicatorRenderProps {\n /**\n * Whether the drop indicator is currently the active drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean\n}\n\nexport interface DropIndicatorProps extends AriaDropIndicatorProps, RenderProps<DropIndicatorRenderProps> { }\ninterface DropIndicatorContextValue {\n render: (props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) => ReactNode\n}\n\nfunction DropIndicator(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>): JSX.Element {\n let {render} = useContext(DropIndicatorContext)!;\n return <>{render(props, ref)}</>;\n}\n\n/**\n * A DropIndicator is rendered between items in a collection to indicate where dropped data will be inserted.\n */\nconst _DropIndicator = forwardRef(DropIndicator);\nexport {_DropIndicator as DropIndicator};\n\nexport function useRenderDropIndicator(dragAndDropHooks?: DragAndDropHooks, dropState?: DroppableCollectionState) {\n let renderDropIndicator = dragAndDropHooks?.renderDropIndicator;\n let isVirtualDragging = dragAndDropHooks?.isVirtualDragging?.();\n let fn = useCallback((target: ItemDropTarget) => {\n // Only show drop indicators when virtual dragging or this is the current drop target.\n if (isVirtualDragging || dropState?.isDropTarget(target)) {\n return renderDropIndicator ? renderDropIndicator(target) : <_DropIndicator target={target} />;\n }\n // We invalidate whenever the target changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dropState?.target, isVirtualDragging, renderDropIndicator]);\n return dragAndDropHooks?.useDropIndicator ? fn : undefined;\n}\n\nexport function useDndPersistedKeys(selectionManager: MultipleSelectionManager, dragAndDropHooks?: DragAndDropHooks, dropState?: DroppableCollectionState) {\n // Persist the focused key and the drop target key.\n let focusedKey = selectionManager.focusedKey;\n let dropTargetKey: Key | null | undefined = null;\n if (dragAndDropHooks?.isVirtualDragging?.() && dropState?.target?.type === 'item') {\n dropTargetKey = dropState.target.key;\n if (dropState.target.dropPosition === 'after') {\n // Normalize to the \"before\" drop position since we only render those to the DOM.\n dropTargetKey = dropState.collection.getKeyAfter(dropTargetKey) ?? dropTargetKey;\n }\n }\n\n return useMemo(() => {\n return new Set([focusedKey, dropTargetKey].filter(k => k != null));\n }, [focusedKey, dropTargetKey]);\n}\n"],"names":[],"version":3,"file":"DragAndDrop.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AAaM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAA2B,CAAC;AACnE,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAoC;AAkB7E,MAAM,0DAAgB,CAAA,GAAA,uBAAS,EAAE,SAAS,cAAc,KAAyB,EAAE,GAA8B;IACtH,IAAI,UAAC,MAA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AG;QAAC;QAAY;KAAc;AAChC","sources":["packages/react-aria-components/src/DragAndDrop.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 */\nimport type {DropIndicatorProps as AriaDropIndicatorProps, ItemDropTarget, Key} from 'react-aria';\nimport type {DragAndDropHooks} from './useDragAndDrop';\nimport type {DraggableCollectionState, DroppableCollectionState, MultipleSelectionManager} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, JSX, ReactNode, useCallback, useContext, useMemo} from 'react';\nimport type {RenderProps} from './utils';\n\nexport interface DragAndDropContextValue {\n dragAndDropHooks?: DragAndDropHooks,\n dragState?: DraggableCollectionState,\n dropState?: DroppableCollectionState\n}\n\nexport const DragAndDropContext = createContext<DragAndDropContextValue>({});\nexport const DropIndicatorContext = createContext<DropIndicatorContextValue | null>(null);\n\nexport interface DropIndicatorRenderProps {\n /**\n * Whether the drop indicator is currently the active drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean\n}\n\nexport interface DropIndicatorProps extends AriaDropIndicatorProps, RenderProps<DropIndicatorRenderProps> { }\ninterface DropIndicatorContextValue {\n render: (props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) => ReactNode\n}\n\n/**\n * A DropIndicator is rendered between items in a collection to indicate where dropped data will be inserted.\n */\nexport const DropIndicator = forwardRef(function DropIndicator(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>): JSX.Element {\n let {render} = useContext(DropIndicatorContext)!;\n return <>{render(props, ref)}</>;\n});\n\nexport function useRenderDropIndicator(dragAndDropHooks?: DragAndDropHooks, dropState?: DroppableCollectionState) {\n let renderDropIndicator = dragAndDropHooks?.renderDropIndicator;\n let isVirtualDragging = dragAndDropHooks?.isVirtualDragging?.();\n let fn = useCallback((target: ItemDropTarget) => {\n // Only show drop indicators when virtual dragging or this is the current drop target.\n if (isVirtualDragging || dropState?.isDropTarget(target)) {\n return renderDropIndicator ? renderDropIndicator(target) : <DropIndicator target={target} />;\n }\n // We invalidate whenever the target changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dropState?.target, isVirtualDragging, renderDropIndicator]);\n return dragAndDropHooks?.useDropIndicator ? fn : undefined;\n}\n\nexport function useDndPersistedKeys(selectionManager: MultipleSelectionManager, dragAndDropHooks?: DragAndDropHooks, dropState?: DroppableCollectionState) {\n // Persist the focused key and the drop target key.\n let focusedKey = selectionManager.focusedKey;\n let dropTargetKey: Key | null | undefined = null;\n if (dragAndDropHooks?.isVirtualDragging?.() && dropState?.target?.type === 'item') {\n dropTargetKey = dropState.target.key;\n if (dropState.target.dropPosition === 'after') {\n // Normalize to the \"before\" drop position since we only render those to the DOM.\n dropTargetKey = dropState.collection.getKeyAfter(dropTargetKey) ?? dropTargetKey;\n }\n }\n\n return useMemo(() => {\n return new Set([focusedKey, dropTargetKey].filter(k => k != null));\n }, [focusedKey, dropTargetKey]);\n}\n"],"names":[],"version":3,"file":"DragAndDrop.main.js.map"}
@@ -1,4 +1,4 @@
1
- import $f3JOg$react, {createContext as $f3JOg$createContext, useContext as $f3JOg$useContext, forwardRef as $f3JOg$forwardRef, useCallback as $f3JOg$useCallback, useMemo as $f3JOg$useMemo} from "react";
1
+ import $f3JOg$react, {createContext as $f3JOg$createContext, forwardRef as $f3JOg$forwardRef, useContext as $f3JOg$useContext, useCallback as $f3JOg$useCallback, useMemo as $f3JOg$useMemo} from "react";
2
2
 
3
3
  /*
4
4
  * Copyright 2024 Adobe. All rights reserved.
@@ -13,13 +13,10 @@ import $f3JOg$react, {createContext as $f3JOg$createContext, useContext as $f3JO
13
13
  */
14
14
  const $612b8eb6cb90e02d$export$d188a835a7bc5783 = /*#__PURE__*/ (0, $f3JOg$createContext)({});
15
15
  const $612b8eb6cb90e02d$export$f55761759794cf55 = /*#__PURE__*/ (0, $f3JOg$createContext)(null);
16
- function $612b8eb6cb90e02d$var$DropIndicator(props, ref) {
16
+ const $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 = /*#__PURE__*/ (0, $f3JOg$forwardRef)(function DropIndicator(props, ref) {
17
17
  let { render: render } = (0, $f3JOg$useContext)($612b8eb6cb90e02d$export$f55761759794cf55);
18
18
  return /*#__PURE__*/ (0, $f3JOg$react).createElement((0, $f3JOg$react).Fragment, null, render(props, ref));
19
- }
20
- /**
21
- * A DropIndicator is rendered between items in a collection to indicate where dropped data will be inserted.
22
- */ const $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 = /*#__PURE__*/ (0, $f3JOg$forwardRef)($612b8eb6cb90e02d$var$DropIndicator);
19
+ });
23
20
  function $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState) {
24
21
  var _dragAndDropHooks_isVirtualDragging;
25
22
  let renderDropIndicator = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.renderDropIndicator;
@@ -1,4 +1,4 @@
1
- import $f3JOg$react, {createContext as $f3JOg$createContext, useContext as $f3JOg$useContext, forwardRef as $f3JOg$forwardRef, useCallback as $f3JOg$useCallback, useMemo as $f3JOg$useMemo} from "react";
1
+ import $f3JOg$react, {createContext as $f3JOg$createContext, forwardRef as $f3JOg$forwardRef, useContext as $f3JOg$useContext, useCallback as $f3JOg$useCallback, useMemo as $f3JOg$useMemo} from "react";
2
2
 
3
3
  /*
4
4
  * Copyright 2024 Adobe. All rights reserved.
@@ -13,13 +13,10 @@ import $f3JOg$react, {createContext as $f3JOg$createContext, useContext as $f3JO
13
13
  */
14
14
  const $612b8eb6cb90e02d$export$d188a835a7bc5783 = /*#__PURE__*/ (0, $f3JOg$createContext)({});
15
15
  const $612b8eb6cb90e02d$export$f55761759794cf55 = /*#__PURE__*/ (0, $f3JOg$createContext)(null);
16
- function $612b8eb6cb90e02d$var$DropIndicator(props, ref) {
16
+ const $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 = /*#__PURE__*/ (0, $f3JOg$forwardRef)(function DropIndicator(props, ref) {
17
17
  let { render: render } = (0, $f3JOg$useContext)($612b8eb6cb90e02d$export$f55761759794cf55);
18
18
  return /*#__PURE__*/ (0, $f3JOg$react).createElement((0, $f3JOg$react).Fragment, null, render(props, ref));
19
- }
20
- /**
21
- * A DropIndicator is rendered between items in a collection to indicate where dropped data will be inserted.
22
- */ const $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 = /*#__PURE__*/ (0, $f3JOg$forwardRef)($612b8eb6cb90e02d$var$DropIndicator);
19
+ });
23
20
  function $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState) {
24
21
  var _dragAndDropHooks_isVirtualDragging;
25
22
  let renderDropIndicator = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.renderDropIndicator;
@@ -1 +1 @@
1
- {"mappings":";;AAAA;;;;;;;;;;CAUC;AAaM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA2B,CAAC;AACnE,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAoC;AAepF,SAAS,oCAAc,KAAyB,EAAE,GAA8B;IAC9E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE;IAC1B,qBAAO,kEAAG,OAAO,OAAO;AAC1B;AAEA;;CAEC,GACD,MAAM,0DAAiB,CAAA,GAAA,iBAAS,EAAE;AAG3B,SAAS,0CAAuB,gBAAmC,EAAE,SAAoC;QAEtF;IADxB,IAAI,sBAAsB,6BAAA,uCAAA,iBAAkB,mBAAmB;IAC/D,IAAI,oBAAoB,6BAAA,wCAAA,sCAAA,iBAAkB,iBAAiB,cAAnC,0DAAA,yCAAA;IACxB,IAAI,KAAK,CAAA,GAAA,kBAAU,EAAE,CAAC;QACpB,sFAAsF;QACtF,IAAI,sBAAqB,sBAAA,gCAAA,UAAW,YAAY,CAAC,UAC/C,OAAO,sBAAsB,oBAAoB,wBAAU,gCAAC;YAAe,QAAQ;;IAErF,6CAA6C;IAC7C,uDAAuD;IACzD,GAAG;QAAC,sBAAA,gCAAA,UAAW,MAAM;QAAE;QAAmB;KAAoB;IAC9D,OAAO,CAAA,6BAAA,uCAAA,iBAAkB,gBAAgB,IAAG,KAAK;AACnD;AAEO,SAAS,yCAAoB,gBAA0C,EAAE,gBAAmC,EAAE,SAAoC;QAInJ,qCAA2C;IAH/C,mDAAmD;IACnD,IAAI,aAAa,iBAAiB,UAAU;IAC5C,IAAI,gBAAwC;IAC5C,IAAI,CAAA,6BAAA,wCAAA,sCAAA,iBAAkB,iBAAiB,cAAnC,0DAAA,yCAAA,sBAA2C,CAAA,sBAAA,iCAAA,oBAAA,UAAW,MAAM,cAAjB,wCAAA,kBAAmB,IAAI,MAAK,QAAQ;QACjF,gBAAgB,UAAU,MAAM,CAAC,GAAG;YAGlB;QAFlB,IAAI,UAAU,MAAM,CAAC,YAAY,KAAK,SACpC,iFAAiF;QACjF,gBAAgB,CAAA,oCAAA,UAAU,UAAU,CAAC,WAAW,CAAC,4BAAjC,+CAAA,oCAAmD;IAEvE;IAEA,OAAO,CAAA,GAAA,cAAM,EAAE;QACb,OAAO,IAAI,IAAI;YAAC;YAAY;SAAc,CAAC,MAAM,CAAC,CAAA,IAAK,KAAK;IAC9D,GAAG;QAAC;QAAY;KAAc;AAChC","sources":["packages/react-aria-components/src/DragAndDrop.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 */\nimport type {DropIndicatorProps as AriaDropIndicatorProps, ItemDropTarget, Key} from 'react-aria';\nimport type {DragAndDropHooks} from './useDragAndDrop';\nimport type {DraggableCollectionState, DroppableCollectionState, MultipleSelectionManager} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, JSX, ReactNode, useCallback, useContext, useMemo} from 'react';\nimport type {RenderProps} from './utils';\n\nexport interface DragAndDropContextValue {\n dragAndDropHooks?: DragAndDropHooks,\n dragState?: DraggableCollectionState,\n dropState?: DroppableCollectionState\n}\n\nexport const DragAndDropContext = createContext<DragAndDropContextValue>({});\nexport const DropIndicatorContext = createContext<DropIndicatorContextValue | null>(null);\n\nexport interface DropIndicatorRenderProps {\n /**\n * Whether the drop indicator is currently the active drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean\n}\n\nexport interface DropIndicatorProps extends AriaDropIndicatorProps, RenderProps<DropIndicatorRenderProps> { }\ninterface DropIndicatorContextValue {\n render: (props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) => ReactNode\n}\n\nfunction DropIndicator(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>): JSX.Element {\n let {render} = useContext(DropIndicatorContext)!;\n return <>{render(props, ref)}</>;\n}\n\n/**\n * A DropIndicator is rendered between items in a collection to indicate where dropped data will be inserted.\n */\nconst _DropIndicator = forwardRef(DropIndicator);\nexport {_DropIndicator as DropIndicator};\n\nexport function useRenderDropIndicator(dragAndDropHooks?: DragAndDropHooks, dropState?: DroppableCollectionState) {\n let renderDropIndicator = dragAndDropHooks?.renderDropIndicator;\n let isVirtualDragging = dragAndDropHooks?.isVirtualDragging?.();\n let fn = useCallback((target: ItemDropTarget) => {\n // Only show drop indicators when virtual dragging or this is the current drop target.\n if (isVirtualDragging || dropState?.isDropTarget(target)) {\n return renderDropIndicator ? renderDropIndicator(target) : <_DropIndicator target={target} />;\n }\n // We invalidate whenever the target changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dropState?.target, isVirtualDragging, renderDropIndicator]);\n return dragAndDropHooks?.useDropIndicator ? fn : undefined;\n}\n\nexport function useDndPersistedKeys(selectionManager: MultipleSelectionManager, dragAndDropHooks?: DragAndDropHooks, dropState?: DroppableCollectionState) {\n // Persist the focused key and the drop target key.\n let focusedKey = selectionManager.focusedKey;\n let dropTargetKey: Key | null | undefined = null;\n if (dragAndDropHooks?.isVirtualDragging?.() && dropState?.target?.type === 'item') {\n dropTargetKey = dropState.target.key;\n if (dropState.target.dropPosition === 'after') {\n // Normalize to the \"before\" drop position since we only render those to the DOM.\n dropTargetKey = dropState.collection.getKeyAfter(dropTargetKey) ?? dropTargetKey;\n }\n }\n\n return useMemo(() => {\n return new Set([focusedKey, dropTargetKey].filter(k => k != null));\n }, [focusedKey, dropTargetKey]);\n}\n"],"names":[],"version":3,"file":"DragAndDrop.module.js.map"}
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC;AAaM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA2B,CAAC;AACnE,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAoC;AAkB7E,MAAM,0DAAgB,CAAA,GAAA,iBAAS,EAAE,SAAS,cAAc,KAAyB,EAAE,GAA8B;IACtH,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE;IAC1B,qBAAO,kEAAG,OAAO,OAAO;AAC1B;AAEO,SAAS,0CAAuB,gBAAmC,EAAE,SAAoC;QAEtF;IADxB,IAAI,sBAAsB,6BAAA,uCAAA,iBAAkB,mBAAmB;IAC/D,IAAI,oBAAoB,6BAAA,wCAAA,sCAAA,iBAAkB,iBAAiB,cAAnC,0DAAA,yCAAA;IACxB,IAAI,KAAK,CAAA,GAAA,kBAAU,EAAE,CAAC;QACpB,sFAAsF;QACtF,IAAI,sBAAqB,sBAAA,gCAAA,UAAW,YAAY,CAAC,UAC/C,OAAO,sBAAsB,oBAAoB,wBAAU,gCAAC;YAAc,QAAQ;;IAEpF,6CAA6C;IAC7C,uDAAuD;IACzD,GAAG;QAAC,sBAAA,gCAAA,UAAW,MAAM;QAAE;QAAmB;KAAoB;IAC9D,OAAO,CAAA,6BAAA,uCAAA,iBAAkB,gBAAgB,IAAG,KAAK;AACnD;AAEO,SAAS,yCAAoB,gBAA0C,EAAE,gBAAmC,EAAE,SAAoC;QAInJ,qCAA2C;IAH/C,mDAAmD;IACnD,IAAI,aAAa,iBAAiB,UAAU;IAC5C,IAAI,gBAAwC;IAC5C,IAAI,CAAA,6BAAA,wCAAA,sCAAA,iBAAkB,iBAAiB,cAAnC,0DAAA,yCAAA,sBAA2C,CAAA,sBAAA,iCAAA,oBAAA,UAAW,MAAM,cAAjB,wCAAA,kBAAmB,IAAI,MAAK,QAAQ;QACjF,gBAAgB,UAAU,MAAM,CAAC,GAAG;YAGlB;QAFlB,IAAI,UAAU,MAAM,CAAC,YAAY,KAAK,SACpC,iFAAiF;QACjF,gBAAgB,CAAA,oCAAA,UAAU,UAAU,CAAC,WAAW,CAAC,4BAAjC,+CAAA,oCAAmD;IAEvE;IAEA,OAAO,CAAA,GAAA,cAAM,EAAE;QACb,OAAO,IAAI,IAAI;YAAC;YAAY;SAAc,CAAC,MAAM,CAAC,CAAA,IAAK,KAAK;IAC9D,GAAG;QAAC;QAAY;KAAc;AAChC","sources":["packages/react-aria-components/src/DragAndDrop.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 */\nimport type {DropIndicatorProps as AriaDropIndicatorProps, ItemDropTarget, Key} from 'react-aria';\nimport type {DragAndDropHooks} from './useDragAndDrop';\nimport type {DraggableCollectionState, DroppableCollectionState, MultipleSelectionManager} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef, JSX, ReactNode, useCallback, useContext, useMemo} from 'react';\nimport type {RenderProps} from './utils';\n\nexport interface DragAndDropContextValue {\n dragAndDropHooks?: DragAndDropHooks,\n dragState?: DraggableCollectionState,\n dropState?: DroppableCollectionState\n}\n\nexport const DragAndDropContext = createContext<DragAndDropContextValue>({});\nexport const DropIndicatorContext = createContext<DropIndicatorContextValue | null>(null);\n\nexport interface DropIndicatorRenderProps {\n /**\n * Whether the drop indicator is currently the active drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean\n}\n\nexport interface DropIndicatorProps extends AriaDropIndicatorProps, RenderProps<DropIndicatorRenderProps> { }\ninterface DropIndicatorContextValue {\n render: (props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) => ReactNode\n}\n\n/**\n * A DropIndicator is rendered between items in a collection to indicate where dropped data will be inserted.\n */\nexport const DropIndicator = forwardRef(function DropIndicator(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>): JSX.Element {\n let {render} = useContext(DropIndicatorContext)!;\n return <>{render(props, ref)}</>;\n});\n\nexport function useRenderDropIndicator(dragAndDropHooks?: DragAndDropHooks, dropState?: DroppableCollectionState) {\n let renderDropIndicator = dragAndDropHooks?.renderDropIndicator;\n let isVirtualDragging = dragAndDropHooks?.isVirtualDragging?.();\n let fn = useCallback((target: ItemDropTarget) => {\n // Only show drop indicators when virtual dragging or this is the current drop target.\n if (isVirtualDragging || dropState?.isDropTarget(target)) {\n return renderDropIndicator ? renderDropIndicator(target) : <DropIndicator target={target} />;\n }\n // We invalidate whenever the target changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dropState?.target, isVirtualDragging, renderDropIndicator]);\n return dragAndDropHooks?.useDropIndicator ? fn : undefined;\n}\n\nexport function useDndPersistedKeys(selectionManager: MultipleSelectionManager, dragAndDropHooks?: DragAndDropHooks, dropState?: DroppableCollectionState) {\n // Persist the focused key and the drop target key.\n let focusedKey = selectionManager.focusedKey;\n let dropTargetKey: Key | null | undefined = null;\n if (dragAndDropHooks?.isVirtualDragging?.() && dropState?.target?.type === 'item') {\n dropTargetKey = dropState.target.key;\n if (dropState.target.dropPosition === 'after') {\n // Normalize to the \"before\" drop position since we only render those to the DOM.\n dropTargetKey = dropState.collection.getKeyAfter(dropTargetKey) ?? dropTargetKey;\n }\n }\n\n return useMemo(() => {\n return new Set([focusedKey, dropTargetKey].filter(k => k != null));\n }, [focusedKey, dropTargetKey]);\n}\n"],"names":[],"version":3,"file":"DragAndDrop.module.js.map"}
@@ -35,7 +35,7 @@ $parcel$export(module.exports, "DropZone", () => $80a65baccb138f12$export$3c6489
35
35
 
36
36
 
37
37
  const $80a65baccb138f12$export$14a72053295ff9a6 = /*#__PURE__*/ (0, $iiEmS$react.createContext)(null);
38
- function $80a65baccb138f12$var$DropZone(props, ref) {
38
+ const $80a65baccb138f12$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $iiEmS$react.forwardRef)(function DropZone(props, ref) {
39
39
  let { isDisabled: isDisabled = false } = props;
40
40
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $80a65baccb138f12$export$14a72053295ff9a6);
41
41
  let dropzoneRef = (0, $iiEmS$reactariautils.useObjectRef)(ref);
@@ -123,10 +123,7 @@ function $80a65baccb138f12$var$DropZone(props, ref) {
123
123
  ...(0, $iiEmS$reactaria.mergeProps)(buttonProps, focusProps, clipboardProps, labelProps),
124
124
  ref: buttonRef
125
125
  })), renderProps.children));
126
- }
127
- /**
128
- * A drop zone is an area into which one or multiple objects can be dragged and dropped.
129
- */ const $80a65baccb138f12$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $iiEmS$react.forwardRef)($80a65baccb138f12$var$DropZone);
126
+ });
130
127
 
131
128
 
132
129
  //# sourceMappingURL=DropZone.main.js.map
@@ -1 +1 @@
1
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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, HoverEvents} from '@react-types/shared';\nimport {ContextValue, Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {DropOptions, mergeProps, useButton, useClipboard, useDrop, useFocusRing, useHover, useLocalizedStringFormatter, VisuallyHidden} from 'react-aria';\nimport {filterDOMProps, useLabels, useObjectRef, useSlotId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isFocusable} from '@react-aria/focus';\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 {}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, HTMLDivElement>>(null);\n\nfunction 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);\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(dropProps, hoverProps, DOMProps)}\n {...renderProps}\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\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nconst _DropZone = forwardRef(DropZone);\nexport {_DropZone as DropZone};\n"],"names":[],"version":3,"file":"DropZone.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA0CM,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;IACrD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yBAAO,EAAE;IACvC,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,6BAAW;IACzD,IAAI,kBAAkB,CAAA,GAAA,4CAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,IAAI,SAAS,CAAA,GAAA,+BAAQ;IACrB,IAAI,YAAY,KAAK,CAAC,aAAa,IAAI,gBAAgB,MAAM,CAAC;IAC9D,IAAI,YAAY,KAAK,CAAC,kBAAkB;IACxC,IAAI,iBAAiB;QAAC;QAAQ;KAAU,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC;IAC9D,IAAI,aAAa,CA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,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, HoverEvents} from '@react-types/shared';\nimport {ContextValue, Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {DropOptions, mergeProps, useButton, useClipboard, useDrop, useFocusRing, useHover, useLocalizedStringFormatter, VisuallyHidden} from 'react-aria';\nimport {filterDOMProps, useLabels, useObjectRef, useSlotId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isFocusable} from '@react-aria/focus';\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 {}\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);\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(dropProps, hoverProps, DOMProps)}\n {...renderProps}\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"}
package/dist/DropZone.mjs CHANGED
@@ -4,7 +4,7 @@ import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.m
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
5
  import {useObjectRef as $dVbUU$useObjectRef, useSlotId as $dVbUU$useSlotId, useLabels as $dVbUU$useLabels, filterDOMProps as $dVbUU$filterDOMProps} from "@react-aria/utils";
6
6
  import {isFocusable as $dVbUU$isFocusable} from "@react-aria/focus";
7
- import $dVbUU$react, {createContext as $dVbUU$createContext, useRef as $dVbUU$useRef, forwardRef as $dVbUU$forwardRef} from "react";
7
+ import $dVbUU$react, {createContext as $dVbUU$createContext, forwardRef as $dVbUU$forwardRef, useRef as $dVbUU$useRef} from "react";
8
8
 
9
9
 
10
10
  function $parcel$interopDefault(a) {
@@ -28,7 +28,7 @@ function $parcel$interopDefault(a) {
28
28
 
29
29
 
30
30
  const $cb088e721efb9218$export$14a72053295ff9a6 = /*#__PURE__*/ (0, $dVbUU$createContext)(null);
31
- function $cb088e721efb9218$var$DropZone(props, ref) {
31
+ const $cb088e721efb9218$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $dVbUU$forwardRef)(function DropZone(props, ref) {
32
32
  let { isDisabled: isDisabled = false } = props;
33
33
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $cb088e721efb9218$export$14a72053295ff9a6);
34
34
  let dropzoneRef = (0, $dVbUU$useObjectRef)(ref);
@@ -116,10 +116,7 @@ function $cb088e721efb9218$var$DropZone(props, ref) {
116
116
  ...(0, $dVbUU$mergeProps)(buttonProps, focusProps, clipboardProps, labelProps),
117
117
  ref: buttonRef
118
118
  })), renderProps.children));
119
- }
120
- /**
121
- * A drop zone is an area into which one or multiple objects can be dragged and dropped.
122
- */ const $cb088e721efb9218$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $dVbUU$forwardRef)($cb088e721efb9218$var$DropZone);
119
+ });
123
120
 
124
121
 
125
122
  export {$cb088e721efb9218$export$14a72053295ff9a6 as DropZoneContext, $cb088e721efb9218$export$3c6489d84dc98b6 as DropZone};
@@ -4,7 +4,7 @@ import {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from "./Text.m
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
5
  import {useObjectRef as $dVbUU$useObjectRef, useSlotId as $dVbUU$useSlotId, useLabels as $dVbUU$useLabels, filterDOMProps as $dVbUU$filterDOMProps} from "@react-aria/utils";
6
6
  import {isFocusable as $dVbUU$isFocusable} from "@react-aria/focus";
7
- import $dVbUU$react, {createContext as $dVbUU$createContext, useRef as $dVbUU$useRef, forwardRef as $dVbUU$forwardRef} from "react";
7
+ import $dVbUU$react, {createContext as $dVbUU$createContext, forwardRef as $dVbUU$forwardRef, useRef as $dVbUU$useRef} from "react";
8
8
 
9
9
 
10
10
  function $parcel$interopDefault(a) {
@@ -28,7 +28,7 @@ function $parcel$interopDefault(a) {
28
28
 
29
29
 
30
30
  const $cb088e721efb9218$export$14a72053295ff9a6 = /*#__PURE__*/ (0, $dVbUU$createContext)(null);
31
- function $cb088e721efb9218$var$DropZone(props, ref) {
31
+ const $cb088e721efb9218$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $dVbUU$forwardRef)(function DropZone(props, ref) {
32
32
  let { isDisabled: isDisabled = false } = props;
33
33
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $cb088e721efb9218$export$14a72053295ff9a6);
34
34
  let dropzoneRef = (0, $dVbUU$useObjectRef)(ref);
@@ -116,10 +116,7 @@ function $cb088e721efb9218$var$DropZone(props, ref) {
116
116
  ...(0, $dVbUU$mergeProps)(buttonProps, focusProps, clipboardProps, labelProps),
117
117
  ref: buttonRef
118
118
  })), renderProps.children));
119
- }
120
- /**
121
- * A drop zone is an area into which one or multiple objects can be dragged and dropped.
122
- */ const $cb088e721efb9218$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $dVbUU$forwardRef)($cb088e721efb9218$var$DropZone);
119
+ });
123
120
 
124
121
 
125
122
  export {$cb088e721efb9218$export$14a72053295ff9a6 as DropZoneContext, $cb088e721efb9218$export$3c6489d84dc98b6 as DropZone};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA0CM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAA+C;AAE1F,SAAS,+BAAS,KAAoB,EAAE,GAAiC;IACvE,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,YAAY,CAAA,GAAA,aAAK,EAAqB;IAC1C,IAAI,aAAC,SAAS,mBAAE,eAAe,gBAAE,YAAY,EAAC,GAAG,CAAA,GAAA,cAAM,EAAE;QAAC,GAAG,KAAK;QAAE,KAAK;QAAW,eAAe;IAAI;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AC9C,GAAG,WAAW;QACf,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;AAEA;;CAEC,GACD,MAAM,yDAAY,CAAA,GAAA,iBAAS,EAAE","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, HoverEvents} from '@react-types/shared';\nimport {ContextValue, Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {DropOptions, mergeProps, useButton, useClipboard, useDrop, useFocusRing, useHover, useLocalizedStringFormatter, VisuallyHidden} from 'react-aria';\nimport {filterDOMProps, useLabels, useObjectRef, useSlotId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isFocusable} from '@react-aria/focus';\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 {}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, HTMLDivElement>>(null);\n\nfunction 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);\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(dropProps, hoverProps, DOMProps)}\n {...renderProps}\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\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nconst _DropZone = forwardRef(DropZone);\nexport {_DropZone as DropZone};\n"],"names":[],"version":3,"file":"DropZone.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA0CM,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,mBAA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C,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,WAAW,YAAY,SAAS;QAC9C,GAAG,WAAW;QACf,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, HoverEvents} from '@react-types/shared';\nimport {ContextValue, Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';\nimport {DropOptions, mergeProps, useButton, useClipboard, useDrop, useFocusRing, useHover, useLocalizedStringFormatter, VisuallyHidden} from 'react-aria';\nimport {filterDOMProps, useLabels, useObjectRef, useSlotId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {isFocusable} from '@react-aria/focus';\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 {}\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);\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(dropProps, hoverProps, DOMProps)}\n {...renderProps}\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"}
@@ -29,17 +29,14 @@ $parcel$export(module.exports, "FieldError", () => $846a838139f2ac6b$export$f551
29
29
 
30
30
 
31
31
  const $846a838139f2ac6b$export$ff05c3ac10437e03 = /*#__PURE__*/ (0, $74w6C$react.createContext)(null);
32
- function $846a838139f2ac6b$var$FieldError(props, ref) {
32
+ const $846a838139f2ac6b$export$f551688fc98f2e09 = /*#__PURE__*/ (0, $74w6C$react.forwardRef)(function FieldError(props, ref) {
33
33
  let validation = (0, $74w6C$react.useContext)($846a838139f2ac6b$export$ff05c3ac10437e03);
34
34
  if (!(validation === null || validation === void 0 ? void 0 : validation.isInvalid)) return null;
35
35
  return /*#__PURE__*/ (0, ($parcel$interopDefault($74w6C$react))).createElement($846a838139f2ac6b$var$FieldErrorInner, {
36
36
  ...props,
37
37
  ref: ref
38
38
  });
39
- }
40
- /**
41
- * A FieldError displays validation errors for a form field.
42
- */ const $846a838139f2ac6b$export$f551688fc98f2e09 = /*#__PURE__*/ (0, $74w6C$react.forwardRef)($846a838139f2ac6b$var$FieldError);
39
+ });
43
40
  const $846a838139f2ac6b$var$FieldErrorInner = /*#__PURE__*/ (0, $74w6C$react.forwardRef)((props, ref)=>{
44
41
  let validation = (0, $74w6C$react.useContext)($846a838139f2ac6b$export$ff05c3ac10437e03);
45
42
  let domProps = (0, $74w6C$reactariautils.filterDOMProps)(props);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAQM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAA2B;AAKxE,SAAS,iCAAW,KAAsB,EAAE,GAA8B;IACxE,IAAI,aAAa,CAAA,GAAA,uBAAS,EAAE;IAC5B,IAAI,EAAC,uBAAA,iCAAA,WAAY,SAAS,GACxB,OAAO;IAGT,qBAAO,0DAAC;QAAiB,GAAG,KAAK;QAAE,KAAK;;AAC1C;AAEA;;CAEC,GACD,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE;AAG/B,MAAM,sDAAkB,CAAA,GAAA,uBAAS,EAAE,CAAC,OAAwB;IAC1D,IAAI,aAAa,CAAA,GAAA,uBAAS,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,iBAAiB,WAAW,gBAAgB,CAAC,MAAM,KAAK,IAAI,YAAY,WAAW,gBAAgB,CAAC,IAAI,CAAC;QACzG,QAAQ;IACV;IAEA,IAAI,YAAY,QAAQ,IAAI,MAC1B,OAAO;IAGT,qBAAO,0DAAC,CAAA,GAAA,8BAAG;QAAE,MAAK;QAAgB,GAAG,QAAQ;QAAG,GAAG,WAAW;QAAE,KAAK;;AACvE","sources":["packages/react-aria-components/src/FieldError.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 {DOMProps, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {RenderProps, useRenderProps} from './utils';\nimport {Text} from './Text';\n\nexport const FieldErrorContext = createContext<ValidationResult | null>(null);\n\nexport interface FieldErrorRenderProps extends ValidationResult {}\nexport interface FieldErrorProps extends RenderProps<FieldErrorRenderProps>, DOMProps {}\n\nfunction FieldError(props: FieldErrorProps, ref: ForwardedRef<HTMLElement>) {\n let validation = useContext(FieldErrorContext);\n if (!validation?.isInvalid) {\n return null;\n }\n\n return <FieldErrorInner {...props} ref={ref} />;\n}\n\n/**\n * A FieldError displays validation errors for a form field.\n */\nconst _FieldError = forwardRef(FieldError);\nexport {_FieldError as FieldError};\n\nconst FieldErrorInner = forwardRef((props: FieldErrorProps, ref: ForwardedRef<HTMLElement>) => {\n let validation = useContext(FieldErrorContext)!;\n let domProps = filterDOMProps(props)!;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-FieldError',\n defaultChildren: validation.validationErrors.length === 0 ? undefined : validation.validationErrors.join(' '),\n values: validation\n });\n\n if (renderProps.children == null) {\n return null;\n }\n\n return <Text slot=\"errorMessage\" {...domProps} {...renderProps} ref={ref} />;\n});\n"],"names":[],"version":3,"file":"FieldError.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAQM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAA2B;AAQjE,MAAM,0DAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAA8B;IAC7G,IAAI,aAAa,CAAA,GAAA,uBAAS,EAAE;IAC5B,IAAI,EAAC,uBAAA,iCAAA,WAAY,SAAS,GACxB,OAAO;IAGT,qBAAO,0DAAC;QAAiB,GAAG,KAAK;QAAE,KAAK;;AAC1C;AAEA,MAAM,sDAAkB,CAAA,GAAA,uBAAS,EAAE,CAAC,OAAwB;IAC1D,IAAI,aAAa,CAAA,GAAA,uBAAS,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,iBAAiB,WAAW,gBAAgB,CAAC,MAAM,KAAK,IAAI,YAAY,WAAW,gBAAgB,CAAC,IAAI,CAAC;QACzG,QAAQ;IACV;IAEA,IAAI,YAAY,QAAQ,IAAI,MAC1B,OAAO;IAGT,qBAAO,0DAAC,CAAA,GAAA,8BAAG;QAAE,MAAK;QAAgB,GAAG,QAAQ;QAAG,GAAG,WAAW;QAAE,KAAK;;AACvE","sources":["packages/react-aria-components/src/FieldError.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 {DOMProps, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {RenderProps, useRenderProps} from './utils';\nimport {Text} from './Text';\n\nexport const FieldErrorContext = createContext<ValidationResult | null>(null);\n\nexport interface FieldErrorRenderProps extends ValidationResult {}\nexport interface FieldErrorProps extends RenderProps<FieldErrorRenderProps>, DOMProps {}\n\n/**\n * A FieldError displays validation errors for a form field.\n */\nexport const FieldError = forwardRef(function FieldError(props: FieldErrorProps, ref: ForwardedRef<HTMLElement>) {\n let validation = useContext(FieldErrorContext);\n if (!validation?.isInvalid) {\n return null;\n }\n\n return <FieldErrorInner {...props} ref={ref} />;\n});\n\nconst FieldErrorInner = forwardRef((props: FieldErrorProps, ref: ForwardedRef<HTMLElement>) => {\n let validation = useContext(FieldErrorContext)!;\n let domProps = filterDOMProps(props)!;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-FieldError',\n defaultChildren: validation.validationErrors.length === 0 ? undefined : validation.validationErrors.join(' '),\n values: validation\n });\n\n if (renderProps.children == null) {\n return null;\n }\n\n return <Text slot=\"errorMessage\" {...domProps} {...renderProps} ref={ref} />;\n});\n"],"names":[],"version":3,"file":"FieldError.main.js.map"}
@@ -1,7 +1,7 @@
1
1
  import {useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
2
2
  import {Text as $514c0188e459b4c0$export$5f1af8db9871e1d6} from "./Text.mjs";
3
3
  import {filterDOMProps as $hnYyE$filterDOMProps} from "@react-aria/utils";
4
- import $hnYyE$react, {createContext as $hnYyE$createContext, useContext as $hnYyE$useContext, forwardRef as $hnYyE$forwardRef} from "react";
4
+ import $hnYyE$react, {createContext as $hnYyE$createContext, forwardRef as $hnYyE$forwardRef, useContext as $hnYyE$useContext} from "react";
5
5
 
6
6
  /*
7
7
  * Copyright 2023 Adobe. All rights reserved.
@@ -18,17 +18,14 @@ import $hnYyE$react, {createContext as $hnYyE$createContext, useContext as $hnYy
18
18
 
19
19
 
20
20
  const $ee014567cb39d3f0$export$ff05c3ac10437e03 = /*#__PURE__*/ (0, $hnYyE$createContext)(null);
21
- function $ee014567cb39d3f0$var$FieldError(props, ref) {
21
+ const $ee014567cb39d3f0$export$f551688fc98f2e09 = /*#__PURE__*/ (0, $hnYyE$forwardRef)(function FieldError(props, ref) {
22
22
  let validation = (0, $hnYyE$useContext)($ee014567cb39d3f0$export$ff05c3ac10437e03);
23
23
  if (!(validation === null || validation === void 0 ? void 0 : validation.isInvalid)) return null;
24
24
  return /*#__PURE__*/ (0, $hnYyE$react).createElement($ee014567cb39d3f0$var$FieldErrorInner, {
25
25
  ...props,
26
26
  ref: ref
27
27
  });
28
- }
29
- /**
30
- * A FieldError displays validation errors for a form field.
31
- */ const $ee014567cb39d3f0$export$f551688fc98f2e09 = /*#__PURE__*/ (0, $hnYyE$forwardRef)($ee014567cb39d3f0$var$FieldError);
28
+ });
32
29
  const $ee014567cb39d3f0$var$FieldErrorInner = /*#__PURE__*/ (0, $hnYyE$forwardRef)((props, ref)=>{
33
30
  let validation = (0, $hnYyE$useContext)($ee014567cb39d3f0$export$ff05c3ac10437e03);
34
31
  let domProps = (0, $hnYyE$filterDOMProps)(props);
@@ -1,7 +1,7 @@
1
1
  import {useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.module.js";
2
2
  import {Text as $514c0188e459b4c0$export$5f1af8db9871e1d6} from "./Text.module.js";
3
3
  import {filterDOMProps as $hnYyE$filterDOMProps} from "@react-aria/utils";
4
- import $hnYyE$react, {createContext as $hnYyE$createContext, useContext as $hnYyE$useContext, forwardRef as $hnYyE$forwardRef} from "react";
4
+ import $hnYyE$react, {createContext as $hnYyE$createContext, forwardRef as $hnYyE$forwardRef, useContext as $hnYyE$useContext} from "react";
5
5
 
6
6
  /*
7
7
  * Copyright 2023 Adobe. All rights reserved.
@@ -18,17 +18,14 @@ import $hnYyE$react, {createContext as $hnYyE$createContext, useContext as $hnYy
18
18
 
19
19
 
20
20
  const $ee014567cb39d3f0$export$ff05c3ac10437e03 = /*#__PURE__*/ (0, $hnYyE$createContext)(null);
21
- function $ee014567cb39d3f0$var$FieldError(props, ref) {
21
+ const $ee014567cb39d3f0$export$f551688fc98f2e09 = /*#__PURE__*/ (0, $hnYyE$forwardRef)(function FieldError(props, ref) {
22
22
  let validation = (0, $hnYyE$useContext)($ee014567cb39d3f0$export$ff05c3ac10437e03);
23
23
  if (!(validation === null || validation === void 0 ? void 0 : validation.isInvalid)) return null;
24
24
  return /*#__PURE__*/ (0, $hnYyE$react).createElement($ee014567cb39d3f0$var$FieldErrorInner, {
25
25
  ...props,
26
26
  ref: ref
27
27
  });
28
- }
29
- /**
30
- * A FieldError displays validation errors for a form field.
31
- */ const $ee014567cb39d3f0$export$f551688fc98f2e09 = /*#__PURE__*/ (0, $hnYyE$forwardRef)($ee014567cb39d3f0$var$FieldError);
28
+ });
32
29
  const $ee014567cb39d3f0$var$FieldErrorInner = /*#__PURE__*/ (0, $hnYyE$forwardRef)((props, ref)=>{
33
30
  let validation = (0, $hnYyE$useContext)($ee014567cb39d3f0$export$ff05c3ac10437e03);
34
31
  let domProps = (0, $hnYyE$filterDOMProps)(props);
@@ -1 +1 @@
1
- {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAQM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAA2B;AAKxE,SAAS,iCAAW,KAAsB,EAAE,GAA8B;IACxE,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,EAAC,uBAAA,iCAAA,WAAY,SAAS,GACxB,OAAO;IAGT,qBAAO,gCAAC;QAAiB,GAAG,KAAK;QAAE,KAAK;;AAC1C;AAEA;;CAEC,GACD,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE;AAG/B,MAAM,sDAAkB,CAAA,GAAA,iBAAS,EAAE,CAAC,OAAwB;IAC1D,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,iBAAiB,WAAW,gBAAgB,CAAC,MAAM,KAAK,IAAI,YAAY,WAAW,gBAAgB,CAAC,IAAI,CAAC;QACzG,QAAQ;IACV;IAEA,IAAI,YAAY,QAAQ,IAAI,MAC1B,OAAO;IAGT,qBAAO,gCAAC,CAAA,GAAA,yCAAG;QAAE,MAAK;QAAgB,GAAG,QAAQ;QAAG,GAAG,WAAW;QAAE,KAAK;;AACvE","sources":["packages/react-aria-components/src/FieldError.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 {DOMProps, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {RenderProps, useRenderProps} from './utils';\nimport {Text} from './Text';\n\nexport const FieldErrorContext = createContext<ValidationResult | null>(null);\n\nexport interface FieldErrorRenderProps extends ValidationResult {}\nexport interface FieldErrorProps extends RenderProps<FieldErrorRenderProps>, DOMProps {}\n\nfunction FieldError(props: FieldErrorProps, ref: ForwardedRef<HTMLElement>) {\n let validation = useContext(FieldErrorContext);\n if (!validation?.isInvalid) {\n return null;\n }\n\n return <FieldErrorInner {...props} ref={ref} />;\n}\n\n/**\n * A FieldError displays validation errors for a form field.\n */\nconst _FieldError = forwardRef(FieldError);\nexport {_FieldError as FieldError};\n\nconst FieldErrorInner = forwardRef((props: FieldErrorProps, ref: ForwardedRef<HTMLElement>) => {\n let validation = useContext(FieldErrorContext)!;\n let domProps = filterDOMProps(props)!;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-FieldError',\n defaultChildren: validation.validationErrors.length === 0 ? undefined : validation.validationErrors.join(' '),\n values: validation\n });\n\n if (renderProps.children == null) {\n return null;\n }\n\n return <Text slot=\"errorMessage\" {...domProps} {...renderProps} ref={ref} />;\n});\n"],"names":[],"version":3,"file":"FieldError.module.js.map"}
1
+ {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAQM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAA2B;AAQjE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAA8B;IAC7G,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,EAAC,uBAAA,iCAAA,WAAY,SAAS,GACxB,OAAO;IAGT,qBAAO,gCAAC;QAAiB,GAAG,KAAK;QAAE,KAAK;;AAC1C;AAEA,MAAM,sDAAkB,CAAA,GAAA,iBAAS,EAAE,CAAC,OAAwB;IAC1D,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,iBAAiB,WAAW,gBAAgB,CAAC,MAAM,KAAK,IAAI,YAAY,WAAW,gBAAgB,CAAC,IAAI,CAAC;QACzG,QAAQ;IACV;IAEA,IAAI,YAAY,QAAQ,IAAI,MAC1B,OAAO;IAGT,qBAAO,gCAAC,CAAA,GAAA,yCAAG;QAAE,MAAK;QAAgB,GAAG,QAAQ;QAAG,GAAG,WAAW;QAAE,KAAK;;AACvE","sources":["packages/react-aria-components/src/FieldError.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 {DOMProps, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {RenderProps, useRenderProps} from './utils';\nimport {Text} from './Text';\n\nexport const FieldErrorContext = createContext<ValidationResult | null>(null);\n\nexport interface FieldErrorRenderProps extends ValidationResult {}\nexport interface FieldErrorProps extends RenderProps<FieldErrorRenderProps>, DOMProps {}\n\n/**\n * A FieldError displays validation errors for a form field.\n */\nexport const FieldError = forwardRef(function FieldError(props: FieldErrorProps, ref: ForwardedRef<HTMLElement>) {\n let validation = useContext(FieldErrorContext);\n if (!validation?.isInvalid) {\n return null;\n }\n\n return <FieldErrorInner {...props} ref={ref} />;\n});\n\nconst FieldErrorInner = forwardRef((props: FieldErrorProps, ref: ForwardedRef<HTMLElement>) => {\n let validation = useContext(FieldErrorContext)!;\n let domProps = filterDOMProps(props)!;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-FieldError',\n defaultChildren: validation.validationErrors.length === 0 ? undefined : validation.validationErrors.join(' '),\n values: validation\n });\n\n if (renderProps.children == null) {\n return null;\n }\n\n return <Text slot=\"errorMessage\" {...domProps} {...renderProps} ref={ref} />;\n});\n"],"names":[],"version":3,"file":"FieldError.module.js.map"}
@@ -27,7 +27,7 @@ $parcel$export(module.exports, "FileTrigger", () => $8e055a19745f522c$export$6fb
27
27
 
28
28
 
29
29
 
30
- function $8e055a19745f522c$var$FileTrigger(props, ref) {
30
+ const $8e055a19745f522c$export$6fb4a10d2c950550 = /*#__PURE__*/ (0, $g6L2B$react.forwardRef)(function FileTrigger(props, ref) {
31
31
  let { onSelect: onSelect, acceptedFileTypes: acceptedFileTypes, allowsMultiple: allowsMultiple, defaultCamera: defaultCamera, children: children, acceptDirectory: acceptDirectory, ...rest } = props;
32
32
  let inputRef = (0, $g6L2B$reactariautils.useObjectRef)(ref);
33
33
  let domProps = (0, $g6L2B$reactariautils.filterDOMProps)(rest);
@@ -51,10 +51,7 @@ function $8e055a19745f522c$var$FileTrigger(props, ref) {
51
51
  // @ts-expect-error
52
52
  webkitdirectory: acceptDirectory ? '' : undefined
53
53
  }));
54
- }
55
- /**
56
- * A FileTrigger allows a user to access the file system with any pressable React Aria or React Spectrum component, or custom components built with usePress.
57
- */ const $8e055a19745f522c$export$6fb4a10d2c950550 = /*#__PURE__*/ (0, $g6L2B$react.forwardRef)($8e055a19745f522c$var$FileTrigger);
54
+ });
58
55
 
59
56
 
60
57
  //# sourceMappingURL=FileTrigger.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAkCD,SAAS,kCAAY,KAAuB,EAAE,GAAmC;IAC/E,IAAI,YAAC,QAAQ,qBAAE,iBAAiB,kBAAE,cAAc,iBAAE,aAAa,YAAE,QAAQ,mBAAE,eAAe,EAAE,GAAG,MAAK,GAAG;IACvG,IAAI,WAAW,CAAA,GAAA,kCAAW,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAE9B,qBACE,oIACE,0DAAC,CAAA,GAAA,2CAAa;QACZ,SAAS;gBACH,mBAGJ;YAHA,KAAI,oBAAA,SAAS,OAAO,cAAhB,wCAAA,kBAAkB,KAAK,EACzB,SAAS,OAAO,CAAC,KAAK,GAAG;aAE3B,qBAAA,SAAS,OAAO,cAAhB,yCAAA,mBAAkB,KAAK;QACzB;OACC,yBAEH,0DAAC,CAAA,GAAA,+BAAI;QACF,GAAG,QAAQ;QACZ,MAAK;QACL,KAAK;QACL,OAAO;YAAC,SAAS;QAAM;QACvB,MAAM,EAAE,8BAAA,wCAAA,kBAAmB,QAAQ;QACnC,UAAU,CAAC,IAAM,qBAAA,+BAAA,SAAW,EAAE,MAAM,CAAC,KAAK;QAC1C,SAAS;QACT,UAAU;QACV,mBAAmB;QACnB,iBAAiB,kBAAkB,KAAK;;AAGhD;AAEA;;CAEC,GACD,MAAM,0DAAe,CAAA,GAAA,uBAAS,EAAE","sources":["packages/react-aria-components/src/FileTrigger.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 {filterDOMProps, useObjectRef} from '@react-aria/utils';\nimport {Input} from './Input';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {ForwardedRef, forwardRef, ReactNode} from 'react';\n\nexport interface FileTriggerProps {\n /**\n * Specifies what mime type of files are allowed.\n */\n acceptedFileTypes?: Array<string>,\n /**\n * Whether multiple files can be selected.\n */\n allowsMultiple?: boolean,\n /**\n * Specifies the use of a media capture mechanism to capture the media on the spot.\n */\n defaultCamera?: 'user' | 'environment',\n /**\n * Handler when a user selects a file.\n */\n onSelect?: (files: FileList | null) => void,\n /**\n * The children of the component.\n */\n children?: ReactNode,\n /**\n * Enables the selection of directories instead of individual files.\n */\n acceptDirectory?: boolean\n}\n\nfunction FileTrigger(props: FileTriggerProps, ref: ForwardedRef<HTMLInputElement>) {\n let {onSelect, acceptedFileTypes, allowsMultiple, defaultCamera, children, acceptDirectory, ...rest} = props;\n let inputRef = useObjectRef(ref);\n let domProps = filterDOMProps(rest);\n\n return (\n <>\n <PressResponder\n onPress={() => {\n if (inputRef.current?.value) {\n inputRef.current.value = '';\n }\n inputRef.current?.click();\n }}>\n {children}\n </PressResponder>\n <Input\n {...domProps}\n type=\"file\"\n ref={inputRef}\n style={{display: 'none'}}\n accept={acceptedFileTypes?.toString()}\n onChange={(e) => onSelect?.(e.target.files)}\n capture={defaultCamera}\n multiple={allowsMultiple}\n // @ts-expect-error\n webkitdirectory={acceptDirectory ? '' : undefined} />\n </>\n );\n}\n\n/**\n * A FileTrigger allows a user to access the file system with any pressable React Aria or React Spectrum component, or custom components built with usePress.\n */\nconst _FileTrigger = forwardRef(FileTrigger);\nexport {_FileTrigger as FileTrigger};\n"],"names":[],"version":3,"file":"FileTrigger.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAqCM,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAmC;IACrH,IAAI,YAAC,QAAQ,qBAAE,iBAAiB,kBAAE,cAAc,iBAAE,aAAa,YAAE,QAAQ,mBAAE,eAAe,EAAE,GAAG,MAAK,GAAG;IACvG,IAAI,WAAW,CAAA,GAAA,kCAAW,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAE9B,qBACE,oIACE,0DAAC,CAAA,GAAA,2CAAa;QACZ,SAAS;gBACH,mBAGJ;YAHA,KAAI,oBAAA,SAAS,OAAO,cAAhB,wCAAA,kBAAkB,KAAK,EACzB,SAAS,OAAO,CAAC,KAAK,GAAG;aAE3B,qBAAA,SAAS,OAAO,cAAhB,yCAAA,mBAAkB,KAAK;QACzB;OACC,yBAEH,0DAAC,CAAA,GAAA,+BAAI;QACF,GAAG,QAAQ;QACZ,MAAK;QACL,KAAK;QACL,OAAO;YAAC,SAAS;QAAM;QACvB,MAAM,EAAE,8BAAA,wCAAA,kBAAmB,QAAQ;QACnC,UAAU,CAAC,IAAM,qBAAA,+BAAA,SAAW,EAAE,MAAM,CAAC,KAAK;QAC1C,SAAS;QACT,UAAU;QACV,mBAAmB;QACnB,iBAAiB,kBAAkB,KAAK;;AAGhD","sources":["packages/react-aria-components/src/FileTrigger.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 {filterDOMProps, useObjectRef} from '@react-aria/utils';\nimport {Input} from './Input';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {ForwardedRef, forwardRef, ReactNode} from 'react';\n\nexport interface FileTriggerProps {\n /**\n * Specifies what mime type of files are allowed.\n */\n acceptedFileTypes?: Array<string>,\n /**\n * Whether multiple files can be selected.\n */\n allowsMultiple?: boolean,\n /**\n * Specifies the use of a media capture mechanism to capture the media on the spot.\n */\n defaultCamera?: 'user' | 'environment',\n /**\n * Handler when a user selects a file.\n */\n onSelect?: (files: FileList | null) => void,\n /**\n * The children of the component.\n */\n children?: ReactNode,\n /**\n * Enables the selection of directories instead of individual files.\n */\n acceptDirectory?: boolean\n}\n\n/**\n * A FileTrigger allows a user to access the file system with any pressable React Aria or React Spectrum component, or custom components built with usePress.\n */\nexport const FileTrigger = forwardRef(function FileTrigger(props: FileTriggerProps, ref: ForwardedRef<HTMLInputElement>) {\n let {onSelect, acceptedFileTypes, allowsMultiple, defaultCamera, children, acceptDirectory, ...rest} = props;\n let inputRef = useObjectRef(ref);\n let domProps = filterDOMProps(rest);\n\n return (\n <>\n <PressResponder\n onPress={() => {\n if (inputRef.current?.value) {\n inputRef.current.value = '';\n }\n inputRef.current?.click();\n }}>\n {children}\n </PressResponder>\n <Input\n {...domProps}\n type=\"file\"\n ref={inputRef}\n style={{display: 'none'}}\n accept={acceptedFileTypes?.toString()}\n onChange={(e) => onSelect?.(e.target.files)}\n capture={defaultCamera}\n multiple={allowsMultiple}\n // @ts-expect-error\n webkitdirectory={acceptDirectory ? '' : undefined} />\n </>\n );\n});\n"],"names":[],"version":3,"file":"FileTrigger.main.js.map"}
@@ -17,7 +17,7 @@ import $d1ZE7$react, {forwardRef as $d1ZE7$forwardRef} from "react";
17
17
 
18
18
 
19
19
 
20
- function $1e2864c73f66a4da$var$FileTrigger(props, ref) {
20
+ const $1e2864c73f66a4da$export$6fb4a10d2c950550 = /*#__PURE__*/ (0, $d1ZE7$forwardRef)(function FileTrigger(props, ref) {
21
21
  let { onSelect: onSelect, acceptedFileTypes: acceptedFileTypes, allowsMultiple: allowsMultiple, defaultCamera: defaultCamera, children: children, acceptDirectory: acceptDirectory, ...rest } = props;
22
22
  let inputRef = (0, $d1ZE7$useObjectRef)(ref);
23
23
  let domProps = (0, $d1ZE7$filterDOMProps)(rest);
@@ -41,10 +41,7 @@ function $1e2864c73f66a4da$var$FileTrigger(props, ref) {
41
41
  // @ts-expect-error
42
42
  webkitdirectory: acceptDirectory ? '' : undefined
43
43
  }));
44
- }
45
- /**
46
- * A FileTrigger allows a user to access the file system with any pressable React Aria or React Spectrum component, or custom components built with usePress.
47
- */ const $1e2864c73f66a4da$export$6fb4a10d2c950550 = /*#__PURE__*/ (0, $d1ZE7$forwardRef)($1e2864c73f66a4da$var$FileTrigger);
44
+ });
48
45
 
49
46
 
50
47
  export {$1e2864c73f66a4da$export$6fb4a10d2c950550 as FileTrigger};
@@ -17,7 +17,7 @@ import $d1ZE7$react, {forwardRef as $d1ZE7$forwardRef} from "react";
17
17
 
18
18
 
19
19
 
20
- function $1e2864c73f66a4da$var$FileTrigger(props, ref) {
20
+ const $1e2864c73f66a4da$export$6fb4a10d2c950550 = /*#__PURE__*/ (0, $d1ZE7$forwardRef)(function FileTrigger(props, ref) {
21
21
  let { onSelect: onSelect, acceptedFileTypes: acceptedFileTypes, allowsMultiple: allowsMultiple, defaultCamera: defaultCamera, children: children, acceptDirectory: acceptDirectory, ...rest } = props;
22
22
  let inputRef = (0, $d1ZE7$useObjectRef)(ref);
23
23
  let domProps = (0, $d1ZE7$filterDOMProps)(rest);
@@ -41,10 +41,7 @@ function $1e2864c73f66a4da$var$FileTrigger(props, ref) {
41
41
  // @ts-expect-error
42
42
  webkitdirectory: acceptDirectory ? '' : undefined
43
43
  }));
44
- }
45
- /**
46
- * A FileTrigger allows a user to access the file system with any pressable React Aria or React Spectrum component, or custom components built with usePress.
47
- */ const $1e2864c73f66a4da$export$6fb4a10d2c950550 = /*#__PURE__*/ (0, $d1ZE7$forwardRef)($1e2864c73f66a4da$var$FileTrigger);
44
+ });
48
45
 
49
46
 
50
47
  export {$1e2864c73f66a4da$export$6fb4a10d2c950550 as FileTrigger};
@@ -1 +1 @@
1
- {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAkCD,SAAS,kCAAY,KAAuB,EAAE,GAAmC;IAC/E,IAAI,YAAC,QAAQ,qBAAE,iBAAiB,kBAAE,cAAc,iBAAE,aAAa,YAAE,QAAQ,mBAAE,eAAe,EAAE,GAAG,MAAK,GAAG;IACvG,IAAI,WAAW,CAAA,GAAA,mBAAW,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAE9B,qBACE,gFACE,gCAAC,CAAA,GAAA,qBAAa;QACZ,SAAS;gBACH,mBAGJ;YAHA,KAAI,oBAAA,SAAS,OAAO,cAAhB,wCAAA,kBAAkB,KAAK,EACzB,SAAS,OAAO,CAAC,KAAK,GAAG;aAE3B,qBAAA,SAAS,OAAO,cAAhB,yCAAA,mBAAkB,KAAK;QACzB;OACC,yBAEH,gCAAC,CAAA,GAAA,yCAAI;QACF,GAAG,QAAQ;QACZ,MAAK;QACL,KAAK;QACL,OAAO;YAAC,SAAS;QAAM;QACvB,MAAM,EAAE,8BAAA,wCAAA,kBAAmB,QAAQ;QACnC,UAAU,CAAC,IAAM,qBAAA,+BAAA,SAAW,EAAE,MAAM,CAAC,KAAK;QAC1C,SAAS;QACT,UAAU;QACV,mBAAmB;QACnB,iBAAiB,kBAAkB,KAAK;;AAGhD;AAEA;;CAEC,GACD,MAAM,0DAAe,CAAA,GAAA,iBAAS,EAAE","sources":["packages/react-aria-components/src/FileTrigger.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 {filterDOMProps, useObjectRef} from '@react-aria/utils';\nimport {Input} from './Input';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {ForwardedRef, forwardRef, ReactNode} from 'react';\n\nexport interface FileTriggerProps {\n /**\n * Specifies what mime type of files are allowed.\n */\n acceptedFileTypes?: Array<string>,\n /**\n * Whether multiple files can be selected.\n */\n allowsMultiple?: boolean,\n /**\n * Specifies the use of a media capture mechanism to capture the media on the spot.\n */\n defaultCamera?: 'user' | 'environment',\n /**\n * Handler when a user selects a file.\n */\n onSelect?: (files: FileList | null) => void,\n /**\n * The children of the component.\n */\n children?: ReactNode,\n /**\n * Enables the selection of directories instead of individual files.\n */\n acceptDirectory?: boolean\n}\n\nfunction FileTrigger(props: FileTriggerProps, ref: ForwardedRef<HTMLInputElement>) {\n let {onSelect, acceptedFileTypes, allowsMultiple, defaultCamera, children, acceptDirectory, ...rest} = props;\n let inputRef = useObjectRef(ref);\n let domProps = filterDOMProps(rest);\n\n return (\n <>\n <PressResponder\n onPress={() => {\n if (inputRef.current?.value) {\n inputRef.current.value = '';\n }\n inputRef.current?.click();\n }}>\n {children}\n </PressResponder>\n <Input\n {...domProps}\n type=\"file\"\n ref={inputRef}\n style={{display: 'none'}}\n accept={acceptedFileTypes?.toString()}\n onChange={(e) => onSelect?.(e.target.files)}\n capture={defaultCamera}\n multiple={allowsMultiple}\n // @ts-expect-error\n webkitdirectory={acceptDirectory ? '' : undefined} />\n </>\n );\n}\n\n/**\n * A FileTrigger allows a user to access the file system with any pressable React Aria or React Spectrum component, or custom components built with usePress.\n */\nconst _FileTrigger = forwardRef(FileTrigger);\nexport {_FileTrigger as FileTrigger};\n"],"names":[],"version":3,"file":"FileTrigger.module.js.map"}
1
+ {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAqCM,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAmC;IACrH,IAAI,YAAC,QAAQ,qBAAE,iBAAiB,kBAAE,cAAc,iBAAE,aAAa,YAAE,QAAQ,mBAAE,eAAe,EAAE,GAAG,MAAK,GAAG;IACvG,IAAI,WAAW,CAAA,GAAA,mBAAW,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAE9B,qBACE,gFACE,gCAAC,CAAA,GAAA,qBAAa;QACZ,SAAS;gBACH,mBAGJ;YAHA,KAAI,oBAAA,SAAS,OAAO,cAAhB,wCAAA,kBAAkB,KAAK,EACzB,SAAS,OAAO,CAAC,KAAK,GAAG;aAE3B,qBAAA,SAAS,OAAO,cAAhB,yCAAA,mBAAkB,KAAK;QACzB;OACC,yBAEH,gCAAC,CAAA,GAAA,yCAAI;QACF,GAAG,QAAQ;QACZ,MAAK;QACL,KAAK;QACL,OAAO;YAAC,SAAS;QAAM;QACvB,MAAM,EAAE,8BAAA,wCAAA,kBAAmB,QAAQ;QACnC,UAAU,CAAC,IAAM,qBAAA,+BAAA,SAAW,EAAE,MAAM,CAAC,KAAK;QAC1C,SAAS;QACT,UAAU;QACV,mBAAmB;QACnB,iBAAiB,kBAAkB,KAAK;;AAGhD","sources":["packages/react-aria-components/src/FileTrigger.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 {filterDOMProps, useObjectRef} from '@react-aria/utils';\nimport {Input} from './Input';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {ForwardedRef, forwardRef, ReactNode} from 'react';\n\nexport interface FileTriggerProps {\n /**\n * Specifies what mime type of files are allowed.\n */\n acceptedFileTypes?: Array<string>,\n /**\n * Whether multiple files can be selected.\n */\n allowsMultiple?: boolean,\n /**\n * Specifies the use of a media capture mechanism to capture the media on the spot.\n */\n defaultCamera?: 'user' | 'environment',\n /**\n * Handler when a user selects a file.\n */\n onSelect?: (files: FileList | null) => void,\n /**\n * The children of the component.\n */\n children?: ReactNode,\n /**\n * Enables the selection of directories instead of individual files.\n */\n acceptDirectory?: boolean\n}\n\n/**\n * A FileTrigger allows a user to access the file system with any pressable React Aria or React Spectrum component, or custom components built with usePress.\n */\nexport const FileTrigger = forwardRef(function FileTrigger(props: FileTriggerProps, ref: ForwardedRef<HTMLInputElement>) {\n let {onSelect, acceptedFileTypes, allowsMultiple, defaultCamera, children, acceptDirectory, ...rest} = props;\n let inputRef = useObjectRef(ref);\n let domProps = filterDOMProps(rest);\n\n return (\n <>\n <PressResponder\n onPress={() => {\n if (inputRef.current?.value) {\n inputRef.current.value = '';\n }\n inputRef.current?.click();\n }}>\n {children}\n </PressResponder>\n <Input\n {...domProps}\n type=\"file\"\n ref={inputRef}\n style={{display: 'none'}}\n accept={acceptedFileTypes?.toString()}\n onChange={(e) => onSelect?.(e.target.files)}\n capture={defaultCamera}\n multiple={allowsMultiple}\n // @ts-expect-error\n webkitdirectory={acceptDirectory ? '' : undefined} />\n </>\n );\n});\n"],"names":[],"version":3,"file":"FileTrigger.module.js.map"}
package/dist/Form.main.js CHANGED
@@ -27,7 +27,7 @@ $parcel$export(module.exports, "Form", () => $35157657e549736b$export$a7fed597f4
27
27
 
28
28
 
29
29
  const $35157657e549736b$export$c24727297075ec6a = /*#__PURE__*/ (0, $bpD8E$react.createContext)(null);
30
- function $35157657e549736b$var$Form(props, ref) {
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
33
  return /*#__PURE__*/ (0, ($parcel$interopDefault($bpD8E$react))).createElement("form", {
@@ -43,11 +43,7 @@ function $35157657e549736b$var$Form(props, ref) {
43
43
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($bpD8E$react))).createElement((0, $bpD8E$reactstately.FormValidationContext).Provider, {
44
44
  value: validationErrors !== null && validationErrors !== void 0 ? validationErrors : {}
45
45
  }, children)));
46
- }
47
- /**
48
- * A form is a group of inputs that allows users to submit data to a server,
49
- * with support for providing field validation errors.
50
- */ const $35157657e549736b$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $bpD8E$react.forwardRef)($35157657e549736b$var$Form);
46
+ });
51
47
 
52
48
 
53
49
  //# sourceMappingURL=Form.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAiBM,MAAM,0DAAc,CAAA,GAAA,0BAAY,EAA4C;AAEnF,SAAS,2BAAK,KAAgB,EAAE,GAAkC;IAChE,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;AAEA;;;CAGC,GACD,MAAM,0DAAQ,CAAA,GAAA,uBAAS,EAAE","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 React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {FormProps as SharedFormProps} from '@react-types/form';\n\nexport interface FormProps extends SharedFormProps, DOMProps {\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\nfunction 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\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 */\nconst _Form = forwardRef(Form);\nexport {_Form as Form};\n"],"names":[],"version":3,"file":"Form.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAiBM,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 React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {FormProps as SharedFormProps} from '@react-types/form';\n\nexport interface FormProps extends SharedFormProps, DOMProps {\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"}
package/dist/Form.mjs CHANGED
@@ -16,7 +16,7 @@ import $j6ya4$react, {createContext as $j6ya4$createContext, forwardRef as $j6ya
16
16
 
17
17
 
18
18
  const $d3e0e05bdfcf66bd$export$c24727297075ec6a = /*#__PURE__*/ (0, $j6ya4$createContext)(null);
19
- function $d3e0e05bdfcf66bd$var$Form(props, ref) {
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
22
  return /*#__PURE__*/ (0, $j6ya4$react).createElement("form", {
@@ -32,11 +32,7 @@ function $d3e0e05bdfcf66bd$var$Form(props, ref) {
32
32
  }, /*#__PURE__*/ (0, $j6ya4$react).createElement((0, $j6ya4$FormValidationContext).Provider, {
33
33
  value: validationErrors !== null && validationErrors !== void 0 ? validationErrors : {}
34
34
  }, children)));
35
- }
36
- /**
37
- * A form is a group of inputs that allows users to submit data to a server,
38
- * with support for providing field validation errors.
39
- */ const $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $j6ya4$forwardRef)($d3e0e05bdfcf66bd$var$Form);
35
+ });
40
36
 
41
37
 
42
38
  export {$d3e0e05bdfcf66bd$export$c24727297075ec6a as FormContext, $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 as Form};
@@ -16,7 +16,7 @@ import $j6ya4$react, {createContext as $j6ya4$createContext, forwardRef as $j6ya
16
16
 
17
17
 
18
18
  const $d3e0e05bdfcf66bd$export$c24727297075ec6a = /*#__PURE__*/ (0, $j6ya4$createContext)(null);
19
- function $d3e0e05bdfcf66bd$var$Form(props, ref) {
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
22
  return /*#__PURE__*/ (0, $j6ya4$react).createElement("form", {
@@ -32,11 +32,7 @@ function $d3e0e05bdfcf66bd$var$Form(props, ref) {
32
32
  }, /*#__PURE__*/ (0, $j6ya4$react).createElement((0, $j6ya4$FormValidationContext).Provider, {
33
33
  value: validationErrors !== null && validationErrors !== void 0 ? validationErrors : {}
34
34
  }, children)));
35
- }
36
- /**
37
- * A form is a group of inputs that allows users to submit data to a server,
38
- * with support for providing field validation errors.
39
- */ const $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $j6ya4$forwardRef)($d3e0e05bdfcf66bd$var$Form);
35
+ });
40
36
 
41
37
 
42
38
  export {$d3e0e05bdfcf66bd$export$c24727297075ec6a as FormContext, $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 as Form};