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,7 +27,7 @@ $parcel$export(module.exports, "OverlayArrow", () => $ee5958cbdc6becc1$export$74
27
27
  const $ee5958cbdc6becc1$export$2de4954e8ae13b9f = /*#__PURE__*/ (0, $8mMZ2$react.createContext)({
28
28
  placement: 'bottom'
29
29
  });
30
- function $ee5958cbdc6becc1$var$OverlayArrow(props, ref) {
30
+ const $ee5958cbdc6becc1$export$746d02f47f4d381 = /*#__PURE__*/ (0, $8mMZ2$react.forwardRef)(function OverlayArrow(props, ref) {
31
31
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $ee5958cbdc6becc1$export$2de4954e8ae13b9f);
32
32
  let placement = props.placement;
33
33
  let style = {
@@ -55,11 +55,7 @@ function $ee5958cbdc6becc1$var$OverlayArrow(props, ref) {
55
55
  ref: ref,
56
56
  "data-placement": placement
57
57
  });
58
- }
59
- /**
60
- * An OverlayArrow renders a custom arrow element relative to an overlay element
61
- * such as a popover or tooltip such that it aligns with a trigger element.
62
- */ const $ee5958cbdc6becc1$export$746d02f47f4d381 = /*#__PURE__*/ (0, $8mMZ2$react.forwardRef)($ee5958cbdc6becc1$var$OverlayArrow);
58
+ });
63
59
 
64
60
 
65
61
  //# sourceMappingURL=OverlayArrow.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAWM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAA0D;IACvG,WAAW;AACb;AAYA,SAAS,mCAAa,KAAwB,EAAE,GAAiC;IAC/E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,YAAY,AAAC,MAAmC,SAAS;IAC7D,IAAI,QAAuB;QACzB,UAAU;QACV,WAAW,cAAc,SAAS,cAAc,WAAW,qBAAqB;IAClF;IACA,IAAI,aAAa,MACf,KAAK,CAAC,UAAU,GAAG;IAGrB,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;uBACN;QACF;IACF;IACA,0EAA0E;IAC1E,4CAA4C;IAC5C,IAAI,YAAY,KAAK,EACnB,OAAO,IAAI,CAAC,YAAY,KAAK,EAAE,OAAO,CAAC,CAAA,MAAO,YAAY,KAAK,AAAC,CAAC,IAAI,KAAK,aAAa,OAAO,YAAY,KAAK,AAAC,CAAC,IAAI;IAGvH,qBACE,0DAAC;QACE,GAAG,KAAK;QACR,GAAG,WAAW;QACf,OAAO;YACL,GAAG,KAAK;YACR,GAAG,YAAY,KAAK;QACtB;QACA,KAAK;QACL,kBAAgB;;AAEtB;AAEA;;;CAGC,GACD,MAAM,2CAA8B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB","sources":["packages/react-aria-components/src/OverlayArrow.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, RenderProps, useContextProps, useRenderProps} from './utils';\nimport {forwardRefType} from '@react-types/shared';\nimport {PlacementAxis} from 'react-aria';\nimport React, {createContext, CSSProperties, ForwardedRef, forwardRef, HTMLAttributes} from 'react';\n\ninterface OverlayArrowContextValue extends OverlayArrowProps {\n placement: PlacementAxis | null\n}\n\nexport const OverlayArrowContext = createContext<ContextValue<OverlayArrowContextValue, HTMLDivElement>>({\n placement: 'bottom'\n});\n\nexport interface OverlayArrowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'children'>, RenderProps<OverlayArrowRenderProps> {}\n\nexport interface OverlayArrowRenderProps {\n /**\n * The placement of the overlay relative to the trigger.\n * @selector [data-placement=\"left | right | top | bottom\"]\n */\n placement: PlacementAxis | null\n}\n\nfunction OverlayArrow(props: OverlayArrowProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, OverlayArrowContext);\n let placement = (props as OverlayArrowContextValue).placement;\n let style: CSSProperties = {\n position: 'absolute',\n transform: placement === 'top' || placement === 'bottom' ? 'translateX(-50%)' : 'translateY(-50%)'\n };\n if (placement != null) {\n style[placement] = '100%';\n }\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-OverlayArrow',\n values: {\n placement\n }\n });\n // remove undefined values from renderProps.style object so that it can be\n // spread merged with the other style object\n if (renderProps.style) {\n Object.keys(renderProps.style).forEach(key => renderProps.style![key] === undefined && delete renderProps.style![key]);\n }\n\n return (\n <div\n {...props}\n {...renderProps}\n style={{\n ...style,\n ...renderProps.style\n }}\n ref={ref}\n data-placement={placement} />\n );\n}\n\n/**\n * An OverlayArrow renders a custom arrow element relative to an overlay element\n * such as a popover or tooltip such that it aligns with a trigger element.\n */\nconst _OverlayArrow = /*#__PURE__*/ (forwardRef as forwardRefType)(OverlayArrow);\nexport {_OverlayArrow as OverlayArrow};\n"],"names":[],"version":3,"file":"OverlayArrow.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAWM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAA0D;IACvG,WAAW;AACb;AAgBO,MAAM,2CAA6B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,aAAa,KAAwB,EAAE,GAAiC;IACxJ,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,YAAY,AAAC,MAAmC,SAAS;IAC7D,IAAI,QAAuB;QACzB,UAAU;QACV,WAAW,cAAc,SAAS,cAAc,WAAW,qBAAqB;IAClF;IACA,IAAI,aAAa,MACf,KAAK,CAAC,UAAU,GAAG;IAGrB,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;uBACN;QACF;IACF;IACA,0EAA0E;IAC1E,4CAA4C;IAC5C,IAAI,YAAY,KAAK,EACnB,OAAO,IAAI,CAAC,YAAY,KAAK,EAAE,OAAO,CAAC,CAAA,MAAO,YAAY,KAAK,AAAC,CAAC,IAAI,KAAK,aAAa,OAAO,YAAY,KAAK,AAAC,CAAC,IAAI;IAGvH,qBACE,0DAAC;QACE,GAAG,KAAK;QACR,GAAG,WAAW;QACf,OAAO;YACL,GAAG,KAAK;YACR,GAAG,YAAY,KAAK;QACtB;QACA,KAAK;QACL,kBAAgB;;AAEtB","sources":["packages/react-aria-components/src/OverlayArrow.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, RenderProps, useContextProps, useRenderProps} from './utils';\nimport {forwardRefType} from '@react-types/shared';\nimport {PlacementAxis} from 'react-aria';\nimport React, {createContext, CSSProperties, ForwardedRef, forwardRef, HTMLAttributes} from 'react';\n\ninterface OverlayArrowContextValue extends OverlayArrowProps {\n placement: PlacementAxis | null\n}\n\nexport const OverlayArrowContext = createContext<ContextValue<OverlayArrowContextValue, HTMLDivElement>>({\n placement: 'bottom'\n});\n\nexport interface OverlayArrowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'children'>, RenderProps<OverlayArrowRenderProps> {}\n\nexport interface OverlayArrowRenderProps {\n /**\n * The placement of the overlay relative to the trigger.\n * @selector [data-placement=\"left | right | top | bottom\"]\n */\n placement: PlacementAxis | null\n}\n\n/**\n * An OverlayArrow renders a custom arrow element relative to an overlay element\n * such as a popover or tooltip such that it aligns with a trigger element.\n */\nexport const OverlayArrow = /*#__PURE__*/ (forwardRef as forwardRefType)(function OverlayArrow(props: OverlayArrowProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, OverlayArrowContext);\n let placement = (props as OverlayArrowContextValue).placement;\n let style: CSSProperties = {\n position: 'absolute',\n transform: placement === 'top' || placement === 'bottom' ? 'translateX(-50%)' : 'translateY(-50%)'\n };\n if (placement != null) {\n style[placement] = '100%';\n }\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-OverlayArrow',\n values: {\n placement\n }\n });\n // remove undefined values from renderProps.style object so that it can be\n // spread merged with the other style object\n if (renderProps.style) {\n Object.keys(renderProps.style).forEach(key => renderProps.style![key] === undefined && delete renderProps.style![key]);\n }\n\n return (\n <div\n {...props}\n {...renderProps}\n style={{\n ...style,\n ...renderProps.style\n }}\n ref={ref}\n data-placement={placement} />\n );\n});\n"],"names":[],"version":3,"file":"OverlayArrow.main.js.map"}
@@ -16,7 +16,7 @@ import $8wt2Z$react, {createContext as $8wt2Z$createContext, forwardRef as $8wt2
16
16
  const $44f671af83e7d9e0$export$2de4954e8ae13b9f = /*#__PURE__*/ (0, $8wt2Z$createContext)({
17
17
  placement: 'bottom'
18
18
  });
19
- function $44f671af83e7d9e0$var$OverlayArrow(props, ref) {
19
+ const $44f671af83e7d9e0$export$746d02f47f4d381 = /*#__PURE__*/ (0, $8wt2Z$forwardRef)(function OverlayArrow(props, ref) {
20
20
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $44f671af83e7d9e0$export$2de4954e8ae13b9f);
21
21
  let placement = props.placement;
22
22
  let style = {
@@ -44,11 +44,7 @@ function $44f671af83e7d9e0$var$OverlayArrow(props, ref) {
44
44
  ref: ref,
45
45
  "data-placement": placement
46
46
  });
47
- }
48
- /**
49
- * An OverlayArrow renders a custom arrow element relative to an overlay element
50
- * such as a popover or tooltip such that it aligns with a trigger element.
51
- */ const $44f671af83e7d9e0$export$746d02f47f4d381 = /*#__PURE__*/ (0, $8wt2Z$forwardRef)($44f671af83e7d9e0$var$OverlayArrow);
47
+ });
52
48
 
53
49
 
54
50
  export {$44f671af83e7d9e0$export$2de4954e8ae13b9f as OverlayArrowContext, $44f671af83e7d9e0$export$746d02f47f4d381 as OverlayArrow};
@@ -16,7 +16,7 @@ import $8wt2Z$react, {createContext as $8wt2Z$createContext, forwardRef as $8wt2
16
16
  const $44f671af83e7d9e0$export$2de4954e8ae13b9f = /*#__PURE__*/ (0, $8wt2Z$createContext)({
17
17
  placement: 'bottom'
18
18
  });
19
- function $44f671af83e7d9e0$var$OverlayArrow(props, ref) {
19
+ const $44f671af83e7d9e0$export$746d02f47f4d381 = /*#__PURE__*/ (0, $8wt2Z$forwardRef)(function OverlayArrow(props, ref) {
20
20
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $44f671af83e7d9e0$export$2de4954e8ae13b9f);
21
21
  let placement = props.placement;
22
22
  let style = {
@@ -44,11 +44,7 @@ function $44f671af83e7d9e0$var$OverlayArrow(props, ref) {
44
44
  ref: ref,
45
45
  "data-placement": placement
46
46
  });
47
- }
48
- /**
49
- * An OverlayArrow renders a custom arrow element relative to an overlay element
50
- * such as a popover or tooltip such that it aligns with a trigger element.
51
- */ const $44f671af83e7d9e0$export$746d02f47f4d381 = /*#__PURE__*/ (0, $8wt2Z$forwardRef)($44f671af83e7d9e0$var$OverlayArrow);
47
+ });
52
48
 
53
49
 
54
50
  export {$44f671af83e7d9e0$export$2de4954e8ae13b9f as OverlayArrowContext, $44f671af83e7d9e0$export$746d02f47f4d381 as OverlayArrow};
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAWM,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAA0D;IACvG,WAAW;AACb;AAYA,SAAS,mCAAa,KAAwB,EAAE,GAAiC;IAC/E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,YAAY,AAAC,MAAmC,SAAS;IAC7D,IAAI,QAAuB;QACzB,UAAU;QACV,WAAW,cAAc,SAAS,cAAc,WAAW,qBAAqB;IAClF;IACA,IAAI,aAAa,MACf,KAAK,CAAC,UAAU,GAAG;IAGrB,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;uBACN;QACF;IACF;IACA,0EAA0E;IAC1E,4CAA4C;IAC5C,IAAI,YAAY,KAAK,EACnB,OAAO,IAAI,CAAC,YAAY,KAAK,EAAE,OAAO,CAAC,CAAA,MAAO,YAAY,KAAK,AAAC,CAAC,IAAI,KAAK,aAAa,OAAO,YAAY,KAAK,AAAC,CAAC,IAAI;IAGvH,qBACE,gCAAC;QACE,GAAG,KAAK;QACR,GAAG,WAAW;QACf,OAAO;YACL,GAAG,KAAK;YACR,GAAG,YAAY,KAAK;QACtB;QACA,KAAK;QACL,kBAAgB;;AAEtB;AAEA;;;CAGC,GACD,MAAM,2CAA8B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB","sources":["packages/react-aria-components/src/OverlayArrow.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, RenderProps, useContextProps, useRenderProps} from './utils';\nimport {forwardRefType} from '@react-types/shared';\nimport {PlacementAxis} from 'react-aria';\nimport React, {createContext, CSSProperties, ForwardedRef, forwardRef, HTMLAttributes} from 'react';\n\ninterface OverlayArrowContextValue extends OverlayArrowProps {\n placement: PlacementAxis | null\n}\n\nexport const OverlayArrowContext = createContext<ContextValue<OverlayArrowContextValue, HTMLDivElement>>({\n placement: 'bottom'\n});\n\nexport interface OverlayArrowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'children'>, RenderProps<OverlayArrowRenderProps> {}\n\nexport interface OverlayArrowRenderProps {\n /**\n * The placement of the overlay relative to the trigger.\n * @selector [data-placement=\"left | right | top | bottom\"]\n */\n placement: PlacementAxis | null\n}\n\nfunction OverlayArrow(props: OverlayArrowProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, OverlayArrowContext);\n let placement = (props as OverlayArrowContextValue).placement;\n let style: CSSProperties = {\n position: 'absolute',\n transform: placement === 'top' || placement === 'bottom' ? 'translateX(-50%)' : 'translateY(-50%)'\n };\n if (placement != null) {\n style[placement] = '100%';\n }\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-OverlayArrow',\n values: {\n placement\n }\n });\n // remove undefined values from renderProps.style object so that it can be\n // spread merged with the other style object\n if (renderProps.style) {\n Object.keys(renderProps.style).forEach(key => renderProps.style![key] === undefined && delete renderProps.style![key]);\n }\n\n return (\n <div\n {...props}\n {...renderProps}\n style={{\n ...style,\n ...renderProps.style\n }}\n ref={ref}\n data-placement={placement} />\n );\n}\n\n/**\n * An OverlayArrow renders a custom arrow element relative to an overlay element\n * such as a popover or tooltip such that it aligns with a trigger element.\n */\nconst _OverlayArrow = /*#__PURE__*/ (forwardRef as forwardRefType)(OverlayArrow);\nexport {_OverlayArrow as OverlayArrow};\n"],"names":[],"version":3,"file":"OverlayArrow.module.js.map"}
1
+ {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAWM,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAA0D;IACvG,WAAW;AACb;AAgBO,MAAM,2CAA6B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,aAAa,KAAwB,EAAE,GAAiC;IACxJ,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,YAAY,AAAC,MAAmC,SAAS;IAC7D,IAAI,QAAuB;QACzB,UAAU;QACV,WAAW,cAAc,SAAS,cAAc,WAAW,qBAAqB;IAClF;IACA,IAAI,aAAa,MACf,KAAK,CAAC,UAAU,GAAG;IAGrB,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;uBACN;QACF;IACF;IACA,0EAA0E;IAC1E,4CAA4C;IAC5C,IAAI,YAAY,KAAK,EACnB,OAAO,IAAI,CAAC,YAAY,KAAK,EAAE,OAAO,CAAC,CAAA,MAAO,YAAY,KAAK,AAAC,CAAC,IAAI,KAAK,aAAa,OAAO,YAAY,KAAK,AAAC,CAAC,IAAI;IAGvH,qBACE,gCAAC;QACE,GAAG,KAAK;QACR,GAAG,WAAW;QACf,OAAO;YACL,GAAG,KAAK;YACR,GAAG,YAAY,KAAK;QACtB;QACA,KAAK;QACL,kBAAgB;;AAEtB","sources":["packages/react-aria-components/src/OverlayArrow.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, RenderProps, useContextProps, useRenderProps} from './utils';\nimport {forwardRefType} from '@react-types/shared';\nimport {PlacementAxis} from 'react-aria';\nimport React, {createContext, CSSProperties, ForwardedRef, forwardRef, HTMLAttributes} from 'react';\n\ninterface OverlayArrowContextValue extends OverlayArrowProps {\n placement: PlacementAxis | null\n}\n\nexport const OverlayArrowContext = createContext<ContextValue<OverlayArrowContextValue, HTMLDivElement>>({\n placement: 'bottom'\n});\n\nexport interface OverlayArrowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'children'>, RenderProps<OverlayArrowRenderProps> {}\n\nexport interface OverlayArrowRenderProps {\n /**\n * The placement of the overlay relative to the trigger.\n * @selector [data-placement=\"left | right | top | bottom\"]\n */\n placement: PlacementAxis | null\n}\n\n/**\n * An OverlayArrow renders a custom arrow element relative to an overlay element\n * such as a popover or tooltip such that it aligns with a trigger element.\n */\nexport const OverlayArrow = /*#__PURE__*/ (forwardRef as forwardRefType)(function OverlayArrow(props: OverlayArrowProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, OverlayArrowContext);\n let placement = (props as OverlayArrowContextValue).placement;\n let style: CSSProperties = {\n position: 'absolute',\n transform: placement === 'top' || placement === 'bottom' ? 'translateX(-50%)' : 'translateY(-50%)'\n };\n if (placement != null) {\n style[placement] = '100%';\n }\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-OverlayArrow',\n values: {\n placement\n }\n });\n // remove undefined values from renderProps.style object so that it can be\n // spread merged with the other style object\n if (renderProps.style) {\n Object.keys(renderProps.style).forEach(key => renderProps.style![key] === undefined && delete renderProps.style![key]);\n }\n\n return (\n <div\n {...props}\n {...renderProps}\n style={{\n ...style,\n ...renderProps.style\n }}\n ref={ref}\n data-placement={placement} />\n );\n});\n"],"names":[],"version":3,"file":"OverlayArrow.module.js.map"}
@@ -37,7 +37,7 @@ $parcel$export(module.exports, "Popover", () => $61e2b7078adb18bc$export$5b6b194
37
37
 
38
38
 
39
39
  const $61e2b7078adb18bc$export$9b9a0cd73afb7ca4 = /*#__PURE__*/ (0, $4DQW2$react.createContext)(null);
40
- function $61e2b7078adb18bc$var$Popover(props, ref) {
40
+ const $61e2b7078adb18bc$export$5b6b19405a83ff9d = /*#__PURE__*/ (0, $4DQW2$react.forwardRef)(function Popover(props, ref) {
41
41
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $61e2b7078adb18bc$export$9b9a0cd73afb7ca4);
42
42
  let contextState = (0, $4DQW2$react.useContext)((0, $2979ab89b336194b$exports.OverlayTriggerStateContext));
43
43
  let localState = (0, $4DQW2$reactstately.useOverlayTriggerState)(props);
@@ -64,10 +64,7 @@ function $61e2b7078adb18bc$var$Popover(props, ref) {
64
64
  popoverRef: ref,
65
65
  isExiting: isExiting
66
66
  });
67
- }
68
- /**
69
- * A popover is an overlay element positioned relative to a trigger.
70
- */ const $61e2b7078adb18bc$export$5b6b19405a83ff9d = /*#__PURE__*/ (0, $4DQW2$react.forwardRef)($61e2b7078adb18bc$var$Popover);
67
+ });
71
68
  function $61e2b7078adb18bc$var$PopoverInner({ state: state, isExiting: isExiting, UNSTABLE_portalContainer: UNSTABLE_portalContainer, ...props }) {
72
69
  // Calculate the arrow size internally (and remove props.arrowSize from PopoverProps)
73
70
  // Referenced from: packages/@react-spectrum/tooltip/src/TooltipTrigger.tsx
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAsEM,MAAM,0DAAiB,CAAA,GAAA,0BAAY,EAA2C;AAErF,SAAS,8BAAQ,KAAmB,EAAE,GAA8B;IAClE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,eAAe,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,oDAAyB;IACvD,IAAI,aAAa,CAAA,GAA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MAAM,cAAZ,2BAAA,gBAAgB;QACxB,WAAW;IACb,GAAG;IAEH,IAAI,MAAM,MAAM,UAAU;IAC1B,IAAI,aAAa,CAAA,GAAA,2CAAgB,EAAE,KAAK,CAAC,CAAC,cAAc,MAAM,UAAU,IAAI;IAC5E,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;YACN,SAAS,MAAM,OAAO,IAAI;uBAC1B;wBACA;uBACA;QACF;IACF;IAEA,IAAI,QAAQ;QAAC,GAAG,aAAa,KAAK;QAAE,GAAG,YAAY,KAAK;IAAA;IAExD,qBACE,0DAAC,CAAA,GAAA,wBAAM;QAAG,GAAG,KAAK;QAAE,WAAW;QAAW,iBAAiB;OACxD,CAAC,MAAM,UAAU,IAAI,MAAM,MAAM,kBAAI,0DAAC;QAAI,eAAY;QAAY,GAAG,aAAa;QAAE,OAAO;YAAC,UAAU;YAAS,OAAO;QAAC;sBACxH,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,CAAA,GAAA,oCAAa,EAAE,QAAe,aAAa;QACzD,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,OAAO;QACP,gBAAc,MAAM,OAAO;QAC3B,kBAAgB;QAChB,iBAAe,cAAc;QAC7B,gBAAc,aAAa;OAC1B,CAAC,MAAM,UAAU,kBAAI,0DAAC,CAAA,GAAA,8BAAY;QAAE,WAAW,MAAM,KAAK;sBAC3D,0DAAC,CAAA,GAAA,6CAAkB,EAAE,QAAQ;QAAC,OAAO;YAAC,GAAG,UAAU;uBAAE;YAAW,KAAK;QAAQ;OAC1E,YAAY,QAAQ,iBAEvB,0DAAC,CAAA,GAAA,8BAAY;QAAE,WAAW,MAAM,KAAK;;AAI7C","sources":["packages/react-aria-components/src/Popover.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaPopoverProps, DismissButton, Overlay, PlacementAxis, PositionProps, usePopover} from 'react-aria';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useEnterAnimation, useExitAnimation, useRenderProps} from './utils';\nimport {filterDOMProps, mergeProps, useLayoutEffect} from '@react-aria/utils';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {OverlayArrowContext} from './OverlayArrow';\nimport {OverlayTriggerProps, OverlayTriggerState, useOverlayTriggerState} from 'react-stately';\nimport {OverlayTriggerStateContext} from './Dialog';\nimport React, {createContext, ForwardedRef, forwardRef, useContext, useRef, useState} from 'react';\nimport {useIsHidden} from '@react-aria/collections';\n\nexport interface PopoverProps extends Omit<PositionProps, 'isOpen'>, Omit<AriaPopoverProps, 'popoverRef' | 'triggerRef' | 'offset' | 'arrowSize'>, OverlayTriggerProps, RenderProps<PopoverRenderProps>, SlotProps {\n /**\n * The name of the component that triggered the popover. This is reflected on the element\n * as the `data-trigger` attribute, and can be used to provide specific\n * styles for the popover depending on which element triggered it.\n */\n trigger?: string,\n /**\n * The ref for the element which the popover positions itself with respect to.\n *\n * When used within a trigger component such as DialogTrigger, MenuTrigger, Select, etc.,\n * this is set automatically. It is only required when used standalone.\n */\n triggerRef?: RefObject<Element | null>,\n /**\n * Whether the popover is currently performing an entry animation.\n */\n isEntering?: boolean,\n /**\n * Whether the popover is currently performing an exit animation.\n */\n isExiting?: boolean,\n /**\n * The container element in which the overlay portal will be placed. This may have unknown behavior depending on where it is portalled to.\n * @default document.body\n */\n UNSTABLE_portalContainer?: Element,\n /**\n * The additional offset applied along the main axis between the element and its\n * anchor element.\n * @default 8\n */\n offset?: number\n}\n\nexport interface PopoverRenderProps {\n /**\n * The name of the component that triggered the popover, e.g. \"DialogTrigger\" or \"ComboBox\".\n * @selector [data-trigger=\"...\"]\n */\n trigger: string | null,\n /**\n * The placement of the popover relative to the trigger.\n * @selector [data-placement=\"left | right | top | bottom\"]\n */\n placement: PlacementAxis | null,\n /**\n * Whether the popover is currently entering. Use this to apply animations.\n * @selector [data-entering]\n */\n isEntering: boolean,\n /**\n * Whether the popover is currently exiting. Use this to apply animations.\n * @selector [data-exiting]\n */\n isExiting: boolean\n}\n\nexport const PopoverContext = createContext<ContextValue<PopoverProps, HTMLElement>>(null);\n\nfunction Popover(props: PopoverProps, ref: ForwardedRef<HTMLElement>) {\n [props, ref] = useContextProps(props, ref, PopoverContext);\n let contextState = useContext(OverlayTriggerStateContext);\n let localState = useOverlayTriggerState(props);\n let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;\n let isExiting = useExitAnimation(ref, state.isOpen) || props.isExiting || false;\n let isHidden = useIsHidden();\n\n // If we are in a hidden tree, we still need to preserve our children.\n if (isHidden) {\n let children = props.children;\n if (typeof children === 'function') {\n children = children({\n trigger: props.trigger || null,\n placement: 'bottom',\n isEntering: false,\n isExiting: false,\n defaultChildren: null\n });\n }\n\n return <>{children}</>;\n }\n\n if (state && !state.isOpen && !isExiting) {\n return null;\n }\n\n return (\n <PopoverInner\n {...props}\n triggerRef={props.triggerRef!}\n state={state}\n popoverRef={ref}\n isExiting={isExiting} />\n );\n}\n\n/**\n * A popover is an overlay element positioned relative to a trigger.\n */\nconst _Popover = /*#__PURE__*/ (forwardRef as forwardRefType)(Popover);\nexport {_Popover as Popover};\n\ninterface PopoverInnerProps extends AriaPopoverProps, RenderProps<PopoverRenderProps>, SlotProps {\n state: OverlayTriggerState,\n isEntering?: boolean,\n isExiting: boolean,\n UNSTABLE_portalContainer?: Element,\n trigger?: string\n}\n\nfunction PopoverInner({state, isExiting, UNSTABLE_portalContainer, ...props}: PopoverInnerProps) {\n // Calculate the arrow size internally (and remove props.arrowSize from PopoverProps)\n // Referenced from: packages/@react-spectrum/tooltip/src/TooltipTrigger.tsx\n let arrowRef = useRef<HTMLDivElement>(null);\n let [arrowWidth, setArrowWidth] = useState(0);\n useLayoutEffect(() => {\n if (arrowRef.current && state.isOpen) {\n setArrowWidth(arrowRef.current.getBoundingClientRect().width);\n }\n }, [state.isOpen, arrowRef]);\n\n let {popoverProps, underlayProps, arrowProps, placement} = usePopover({\n ...props,\n offset: props.offset ?? 8,\n arrowSize: arrowWidth\n }, state);\n\n let ref = props.popoverRef as RefObject<HTMLDivElement | null>;\n let isEntering = useEnterAnimation(ref, !!placement) || props.isEntering || false;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Popover',\n values: {\n trigger: props.trigger || null,\n placement,\n isEntering,\n isExiting\n }\n });\n\n let style = {...popoverProps.style, ...renderProps.style};\n\n return (\n <Overlay {...props} isExiting={isExiting} portalContainer={UNSTABLE_portalContainer}>\n {!props.isNonModal && state.isOpen && <div data-testid=\"underlay\" {...underlayProps} style={{position: 'fixed', inset: 0}} />}\n <div\n {...mergeProps(filterDOMProps(props as any), popoverProps)}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n style={style}\n data-trigger={props.trigger}\n data-placement={placement}\n data-entering={isEntering || undefined}\n data-exiting={isExiting || undefined}>\n {!props.isNonModal && <DismissButton onDismiss={state.close} />}\n <OverlayArrowContext.Provider value={{...arrowProps, placement, ref: arrowRef}}>\n {renderProps.children}\n </OverlayArrowContext.Provider>\n <DismissButton onDismiss={state.close} />\n </div>\n </Overlay>\n );\n}\n"],"names":[],"version":3,"file":"Popover.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAsEM,MAAM,0DAAiB,CAAA,GAAA,0BAAY,EAA2C;AAK9E,MAAM,4CAAwB,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,QAAQ,KAAmB,EAA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.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaPopoverProps, DismissButton, Overlay, PlacementAxis, PositionProps, usePopover} from 'react-aria';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useEnterAnimation, useExitAnimation, useRenderProps} from './utils';\nimport {filterDOMProps, mergeProps, useLayoutEffect} from '@react-aria/utils';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {OverlayArrowContext} from './OverlayArrow';\nimport {OverlayTriggerProps, OverlayTriggerState, useOverlayTriggerState} from 'react-stately';\nimport {OverlayTriggerStateContext} from './Dialog';\nimport React, {createContext, ForwardedRef, forwardRef, useContext, useRef, useState} from 'react';\nimport {useIsHidden} from '@react-aria/collections';\n\nexport interface PopoverProps extends Omit<PositionProps, 'isOpen'>, Omit<AriaPopoverProps, 'popoverRef' | 'triggerRef' | 'offset' | 'arrowSize'>, OverlayTriggerProps, RenderProps<PopoverRenderProps>, SlotProps {\n /**\n * The name of the component that triggered the popover. This is reflected on the element\n * as the `data-trigger` attribute, and can be used to provide specific\n * styles for the popover depending on which element triggered it.\n */\n trigger?: string,\n /**\n * The ref for the element which the popover positions itself with respect to.\n *\n * When used within a trigger component such as DialogTrigger, MenuTrigger, Select, etc.,\n * this is set automatically. It is only required when used standalone.\n */\n triggerRef?: RefObject<Element | null>,\n /**\n * Whether the popover is currently performing an entry animation.\n */\n isEntering?: boolean,\n /**\n * Whether the popover is currently performing an exit animation.\n */\n isExiting?: boolean,\n /**\n * The container element in which the overlay portal will be placed. This may have unknown behavior depending on where it is portalled to.\n * @default document.body\n */\n UNSTABLE_portalContainer?: Element,\n /**\n * The additional offset applied along the main axis between the element and its\n * anchor element.\n * @default 8\n */\n offset?: number\n}\n\nexport interface PopoverRenderProps {\n /**\n * The name of the component that triggered the popover, e.g. \"DialogTrigger\" or \"ComboBox\".\n * @selector [data-trigger=\"...\"]\n */\n trigger: string | null,\n /**\n * The placement of the popover relative to the trigger.\n * @selector [data-placement=\"left | right | top | bottom\"]\n */\n placement: PlacementAxis | null,\n /**\n * Whether the popover is currently entering. Use this to apply animations.\n * @selector [data-entering]\n */\n isEntering: boolean,\n /**\n * Whether the popover is currently exiting. Use this to apply animations.\n * @selector [data-exiting]\n */\n isExiting: boolean\n}\n\nexport const PopoverContext = createContext<ContextValue<PopoverProps, HTMLElement>>(null);\n\n/**\n * A popover is an overlay element positioned relative to a trigger.\n */\nexport const Popover = /*#__PURE__*/ (forwardRef as forwardRefType)(function Popover(props: PopoverProps, ref: ForwardedRef<HTMLElement>) {\n [props, ref] = useContextProps(props, ref, PopoverContext);\n let contextState = useContext(OverlayTriggerStateContext);\n let localState = useOverlayTriggerState(props);\n let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;\n let isExiting = useExitAnimation(ref, state.isOpen) || props.isExiting || false;\n let isHidden = useIsHidden();\n\n // If we are in a hidden tree, we still need to preserve our children.\n if (isHidden) {\n let children = props.children;\n if (typeof children === 'function') {\n children = children({\n trigger: props.trigger || null,\n placement: 'bottom',\n isEntering: false,\n isExiting: false,\n defaultChildren: null\n });\n }\n\n return <>{children}</>;\n }\n\n if (state && !state.isOpen && !isExiting) {\n return null;\n }\n\n return (\n <PopoverInner\n {...props}\n triggerRef={props.triggerRef!}\n state={state}\n popoverRef={ref}\n isExiting={isExiting} />\n );\n});\n\ninterface PopoverInnerProps extends AriaPopoverProps, RenderProps<PopoverRenderProps>, SlotProps {\n state: OverlayTriggerState,\n isEntering?: boolean,\n isExiting: boolean,\n UNSTABLE_portalContainer?: Element,\n trigger?: string\n}\n\nfunction PopoverInner({state, isExiting, UNSTABLE_portalContainer, ...props}: PopoverInnerProps) {\n // Calculate the arrow size internally (and remove props.arrowSize from PopoverProps)\n // Referenced from: packages/@react-spectrum/tooltip/src/TooltipTrigger.tsx\n let arrowRef = useRef<HTMLDivElement>(null);\n let [arrowWidth, setArrowWidth] = useState(0);\n useLayoutEffect(() => {\n if (arrowRef.current && state.isOpen) {\n setArrowWidth(arrowRef.current.getBoundingClientRect().width);\n }\n }, [state.isOpen, arrowRef]);\n\n let {popoverProps, underlayProps, arrowProps, placement} = usePopover({\n ...props,\n offset: props.offset ?? 8,\n arrowSize: arrowWidth\n }, state);\n\n let ref = props.popoverRef as RefObject<HTMLDivElement | null>;\n let isEntering = useEnterAnimation(ref, !!placement) || props.isEntering || false;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Popover',\n values: {\n trigger: props.trigger || null,\n placement,\n isEntering,\n isExiting\n }\n });\n\n let style = {...popoverProps.style, ...renderProps.style};\n\n return (\n <Overlay {...props} isExiting={isExiting} portalContainer={UNSTABLE_portalContainer}>\n {!props.isNonModal && state.isOpen && <div data-testid=\"underlay\" {...underlayProps} style={{position: 'fixed', inset: 0}} />}\n <div\n {...mergeProps(filterDOMProps(props as any), popoverProps)}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n style={style}\n data-trigger={props.trigger}\n data-placement={placement}\n data-entering={isEntering || undefined}\n data-exiting={isExiting || undefined}>\n {!props.isNonModal && <DismissButton onDismiss={state.close} />}\n <OverlayArrowContext.Provider value={{...arrowProps, placement, ref: arrowRef}}>\n {renderProps.children}\n </OverlayArrowContext.Provider>\n <DismissButton onDismiss={state.close} />\n </div>\n </Overlay>\n );\n}\n"],"names":[],"version":3,"file":"Popover.main.js.map"}
package/dist/Popover.mjs CHANGED
@@ -4,7 +4,7 @@ import {OverlayTriggerStateContext as $de32f1b87079253c$export$d2f961adcb0afbe}
4
4
  import {usePopover as $ehFet$usePopover, Overlay as $ehFet$Overlay, DismissButton as $ehFet$DismissButton} from "react-aria";
5
5
  import {useLayoutEffect as $ehFet$useLayoutEffect, mergeProps as $ehFet$mergeProps, filterDOMProps as $ehFet$filterDOMProps} from "@react-aria/utils";
6
6
  import {useOverlayTriggerState as $ehFet$useOverlayTriggerState} from "react-stately";
7
- import $ehFet$react, {createContext as $ehFet$createContext, useContext as $ehFet$useContext, forwardRef as $ehFet$forwardRef, useRef as $ehFet$useRef, useState as $ehFet$useState} from "react";
7
+ import $ehFet$react, {createContext as $ehFet$createContext, forwardRef as $ehFet$forwardRef, useContext as $ehFet$useContext, useRef as $ehFet$useRef, useState as $ehFet$useState} from "react";
8
8
  import {useIsHidden as $ehFet$useIsHidden} from "@react-aria/collections";
9
9
 
10
10
  /*
@@ -26,7 +26,7 @@ import {useIsHidden as $ehFet$useIsHidden} from "@react-aria/collections";
26
26
 
27
27
 
28
28
  const $07b14b47974efb58$export$9b9a0cd73afb7ca4 = /*#__PURE__*/ (0, $ehFet$createContext)(null);
29
- function $07b14b47974efb58$var$Popover(props, ref) {
29
+ const $07b14b47974efb58$export$5b6b19405a83ff9d = /*#__PURE__*/ (0, $ehFet$forwardRef)(function Popover(props, ref) {
30
30
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $07b14b47974efb58$export$9b9a0cd73afb7ca4);
31
31
  let contextState = (0, $ehFet$useContext)((0, $de32f1b87079253c$export$d2f961adcb0afbe));
32
32
  let localState = (0, $ehFet$useOverlayTriggerState)(props);
@@ -53,10 +53,7 @@ function $07b14b47974efb58$var$Popover(props, ref) {
53
53
  popoverRef: ref,
54
54
  isExiting: isExiting
55
55
  });
56
- }
57
- /**
58
- * A popover is an overlay element positioned relative to a trigger.
59
- */ const $07b14b47974efb58$export$5b6b19405a83ff9d = /*#__PURE__*/ (0, $ehFet$forwardRef)($07b14b47974efb58$var$Popover);
56
+ });
60
57
  function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting, UNSTABLE_portalContainer: UNSTABLE_portalContainer, ...props }) {
61
58
  // Calculate the arrow size internally (and remove props.arrowSize from PopoverProps)
62
59
  // Referenced from: packages/@react-spectrum/tooltip/src/TooltipTrigger.tsx
@@ -4,7 +4,7 @@ import {OverlayTriggerStateContext as $de32f1b87079253c$export$d2f961adcb0afbe}
4
4
  import {usePopover as $ehFet$usePopover, Overlay as $ehFet$Overlay, DismissButton as $ehFet$DismissButton} from "react-aria";
5
5
  import {useLayoutEffect as $ehFet$useLayoutEffect, mergeProps as $ehFet$mergeProps, filterDOMProps as $ehFet$filterDOMProps} from "@react-aria/utils";
6
6
  import {useOverlayTriggerState as $ehFet$useOverlayTriggerState} from "react-stately";
7
- import $ehFet$react, {createContext as $ehFet$createContext, useContext as $ehFet$useContext, forwardRef as $ehFet$forwardRef, useRef as $ehFet$useRef, useState as $ehFet$useState} from "react";
7
+ import $ehFet$react, {createContext as $ehFet$createContext, forwardRef as $ehFet$forwardRef, useContext as $ehFet$useContext, useRef as $ehFet$useRef, useState as $ehFet$useState} from "react";
8
8
  import {useIsHidden as $ehFet$useIsHidden} from "@react-aria/collections";
9
9
 
10
10
  /*
@@ -26,7 +26,7 @@ import {useIsHidden as $ehFet$useIsHidden} from "@react-aria/collections";
26
26
 
27
27
 
28
28
  const $07b14b47974efb58$export$9b9a0cd73afb7ca4 = /*#__PURE__*/ (0, $ehFet$createContext)(null);
29
- function $07b14b47974efb58$var$Popover(props, ref) {
29
+ const $07b14b47974efb58$export$5b6b19405a83ff9d = /*#__PURE__*/ (0, $ehFet$forwardRef)(function Popover(props, ref) {
30
30
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $07b14b47974efb58$export$9b9a0cd73afb7ca4);
31
31
  let contextState = (0, $ehFet$useContext)((0, $de32f1b87079253c$export$d2f961adcb0afbe));
32
32
  let localState = (0, $ehFet$useOverlayTriggerState)(props);
@@ -53,10 +53,7 @@ function $07b14b47974efb58$var$Popover(props, ref) {
53
53
  popoverRef: ref,
54
54
  isExiting: isExiting
55
55
  });
56
- }
57
- /**
58
- * A popover is an overlay element positioned relative to a trigger.
59
- */ const $07b14b47974efb58$export$5b6b19405a83ff9d = /*#__PURE__*/ (0, $ehFet$forwardRef)($07b14b47974efb58$var$Popover);
56
+ });
60
57
  function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting, UNSTABLE_portalContainer: UNSTABLE_portalContainer, ...props }) {
61
58
  // Calculate the arrow size internally (and remove props.arrowSize from PopoverProps)
62
59
  // Referenced from: packages/@react-spectrum/tooltip/src/TooltipTrigger.tsx
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAsEM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAA2C;AAErF,SAAS,8BAAQ,KAAmB,EAAE,GAA8B;IAClE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,eAAe,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,wCAAyB;IACvD,IAAI,aAAa,CAAA,GAAA,6BAAqB,EAAE;IACxC,IAAI,QAAQ,MAAM,MAAM,IAAI,QAAQ,MAAM,WAAW,IAAI,QAAQ,CAAC,eAAe,aAAa;IAC9F,IAAI,YAAY,CAAA,GAAA,yCAAe,EAAE,KAAK,MAAM,MAAM,KAAK,MAAM,SAAS,IAAI;IAC1E,IAAI,WAAW,CAAA,GAAA,kBAAU;IAEzB,sEAAsE;IACtE,IAAI,UAAU;QACZ,IAAI,WAAW,MAAM,QAAQ;QAC7B,IAAI,OAAO,aAAa,YACtB,WAAW,SAAS;YAClB,SAAS,MAAM,OAAO,IAAI;YAC1B,WAAW;YACX,YAAY;YACZ,WAAW;YACX,iBAAiB;QACnB;QAGF,qBAAO,kEAAG;IACZ;IAEA,IAAI,SAAS,CAAC,MAAM,MAAM,IAAI,CAAC,WAC7B,OAAO;IAGT,qBACE,gCAAC;QACE,GAAG,KAAK;QACT,YAAY,MAAM,UAAU;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YAAC,UAAU;YAAS,OAAO;QAAC;sBACxH,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,qBAAa,EAAE,QAAe,aAAa;QACzD,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,OAAO;QACP,gBAAc,MAAM,OAAO;QAC3B,kBAAgB;QAChB,iBAAe,cAAc;QAC7B,gBAAc,aAAa;OAC1B,CAAC,MAAM,UAAU,kBAAI,gCAAC,CAAA,GAAA,oBAAY;QAAE,WAAW,MAAM,KAAK;sBAC3D,gCAAC,CAAA,GAAA,yCAAkB,EAAE,QAAQ;QAAC,OAAO;YAAC,GAAG,UAAU;uBAAE;YAAW,KAAK;QAAQ;OAC1E,YAAY,QAAQ,iBAEvB,gCAAC,CAAA,GAAA,oBAAY;QAAE,WAAW,MAAM,KAAK;;AAI7C","sources":["packages/react-aria-components/src/Popover.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaPopoverProps, DismissButton, Overlay, PlacementAxis, PositionProps, usePopover} from 'react-aria';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useEnterAnimation, useExitAnimation, useRenderProps} from './utils';\nimport {filterDOMProps, mergeProps, useLayoutEffect} from '@react-aria/utils';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {OverlayArrowContext} from './OverlayArrow';\nimport {OverlayTriggerProps, OverlayTriggerState, useOverlayTriggerState} from 'react-stately';\nimport {OverlayTriggerStateContext} from './Dialog';\nimport React, {createContext, ForwardedRef, forwardRef, useContext, useRef, useState} from 'react';\nimport {useIsHidden} from '@react-aria/collections';\n\nexport interface PopoverProps extends Omit<PositionProps, 'isOpen'>, Omit<AriaPopoverProps, 'popoverRef' | 'triggerRef' | 'offset' | 'arrowSize'>, OverlayTriggerProps, RenderProps<PopoverRenderProps>, SlotProps {\n /**\n * The name of the component that triggered the popover. This is reflected on the element\n * as the `data-trigger` attribute, and can be used to provide specific\n * styles for the popover depending on which element triggered it.\n */\n trigger?: string,\n /**\n * The ref for the element which the popover positions itself with respect to.\n *\n * When used within a trigger component such as DialogTrigger, MenuTrigger, Select, etc.,\n * this is set automatically. It is only required when used standalone.\n */\n triggerRef?: RefObject<Element | null>,\n /**\n * Whether the popover is currently performing an entry animation.\n */\n isEntering?: boolean,\n /**\n * Whether the popover is currently performing an exit animation.\n */\n isExiting?: boolean,\n /**\n * The container element in which the overlay portal will be placed. This may have unknown behavior depending on where it is portalled to.\n * @default document.body\n */\n UNSTABLE_portalContainer?: Element,\n /**\n * The additional offset applied along the main axis between the element and its\n * anchor element.\n * @default 8\n */\n offset?: number\n}\n\nexport interface PopoverRenderProps {\n /**\n * The name of the component that triggered the popover, e.g. \"DialogTrigger\" or \"ComboBox\".\n * @selector [data-trigger=\"...\"]\n */\n trigger: string | null,\n /**\n * The placement of the popover relative to the trigger.\n * @selector [data-placement=\"left | right | top | bottom\"]\n */\n placement: PlacementAxis | null,\n /**\n * Whether the popover is currently entering. Use this to apply animations.\n * @selector [data-entering]\n */\n isEntering: boolean,\n /**\n * Whether the popover is currently exiting. Use this to apply animations.\n * @selector [data-exiting]\n */\n isExiting: boolean\n}\n\nexport const PopoverContext = createContext<ContextValue<PopoverProps, HTMLElement>>(null);\n\nfunction Popover(props: PopoverProps, ref: ForwardedRef<HTMLElement>) {\n [props, ref] = useContextProps(props, ref, PopoverContext);\n let contextState = useContext(OverlayTriggerStateContext);\n let localState = useOverlayTriggerState(props);\n let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;\n let isExiting = useExitAnimation(ref, state.isOpen) || props.isExiting || false;\n let isHidden = useIsHidden();\n\n // If we are in a hidden tree, we still need to preserve our children.\n if (isHidden) {\n let children = props.children;\n if (typeof children === 'function') {\n children = children({\n trigger: props.trigger || null,\n placement: 'bottom',\n isEntering: false,\n isExiting: false,\n defaultChildren: null\n });\n }\n\n return <>{children}</>;\n }\n\n if (state && !state.isOpen && !isExiting) {\n return null;\n }\n\n return (\n <PopoverInner\n {...props}\n triggerRef={props.triggerRef!}\n state={state}\n popoverRef={ref}\n isExiting={isExiting} />\n );\n}\n\n/**\n * A popover is an overlay element positioned relative to a trigger.\n */\nconst _Popover = /*#__PURE__*/ (forwardRef as forwardRefType)(Popover);\nexport {_Popover as Popover};\n\ninterface PopoverInnerProps extends AriaPopoverProps, RenderProps<PopoverRenderProps>, SlotProps {\n state: OverlayTriggerState,\n isEntering?: boolean,\n isExiting: boolean,\n UNSTABLE_portalContainer?: Element,\n trigger?: string\n}\n\nfunction PopoverInner({state, isExiting, UNSTABLE_portalContainer, ...props}: PopoverInnerProps) {\n // Calculate the arrow size internally (and remove props.arrowSize from PopoverProps)\n // Referenced from: packages/@react-spectrum/tooltip/src/TooltipTrigger.tsx\n let arrowRef = useRef<HTMLDivElement>(null);\n let [arrowWidth, setArrowWidth] = useState(0);\n useLayoutEffect(() => {\n if (arrowRef.current && state.isOpen) {\n setArrowWidth(arrowRef.current.getBoundingClientRect().width);\n }\n }, [state.isOpen, arrowRef]);\n\n let {popoverProps, underlayProps, arrowProps, placement} = usePopover({\n ...props,\n offset: props.offset ?? 8,\n arrowSize: arrowWidth\n }, state);\n\n let ref = props.popoverRef as RefObject<HTMLDivElement | null>;\n let isEntering = useEnterAnimation(ref, !!placement) || props.isEntering || false;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Popover',\n values: {\n trigger: props.trigger || null,\n placement,\n isEntering,\n isExiting\n }\n });\n\n let style = {...popoverProps.style, ...renderProps.style};\n\n return (\n <Overlay {...props} isExiting={isExiting} portalContainer={UNSTABLE_portalContainer}>\n {!props.isNonModal && state.isOpen && <div data-testid=\"underlay\" {...underlayProps} style={{position: 'fixed', inset: 0}} />}\n <div\n {...mergeProps(filterDOMProps(props as any), popoverProps)}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n style={style}\n data-trigger={props.trigger}\n data-placement={placement}\n data-entering={isEntering || undefined}\n data-exiting={isExiting || undefined}>\n {!props.isNonModal && <DismissButton onDismiss={state.close} />}\n <OverlayArrowContext.Provider value={{...arrowProps, placement, ref: arrowRef}}>\n {renderProps.children}\n </OverlayArrowContext.Provider>\n <DismissButton onDismiss={state.close} />\n </div>\n </Overlay>\n );\n}\n"],"names":[],"version":3,"file":"Popover.module.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAsEM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAA2C;AAK9E,MAAM,4CAAwB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,QAAQ,KAAmB,EAAE,GAA8B;IACtI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,eAAe,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,wCAAyB;IACvD,IAAI,aAAa,CAAA,GAAA,6BAAqB,EAAE;IACxC,IAAI,QAAQ,MAAM,MAAM,IAAI,QAAQ,MAAM,WAAW,IAAI,QAAQ,CAAC,eAAe,aAAa;IAC9F,IAAI,YAAY,CAAA,GAAA,yCAAe,EAAE,KAAK,MAAM,MAAM,KAAK,MAAM,SAAS,IAAI;IAC1E,IAAI,WAAW,CAAA,GAAA,kBAAU;IAEzB,sEAAsE;IACtE,IAAI,UAAU;QACZ,IAAI,WAAW,MAAM,QAAQ;QAC7B,IAAI,OAAO,aAAa,YACtB,WAAW,SAAS;YAClB,SAAS,MAAM,OAAO,IAAI;YAC1B,WAAW;YACX,YAAY;YACZ,WAAW;YACX,iBAAiB;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IAAI,MAAM,MAAM,kBAAI,gCAAC;QAAI,eAAY;QAAY,GAAG,aAAa;QAAE,OAAO;YAAC,UAAU;YAAS,OAAO;QAAC;sBACxH,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,qBAAa,EAAE,QAAe,aAAa;QACzD,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,OAAO;QACP,gBAAc,MAAM,OAAO;QAC3B,kBAAgB;QAChB,iBAAe,cAAc;QAC7B,gBAAc,aAAa;OAC1B,CAAC,MAAM,UAAU,kBAAI,gCAAC,CAAA,GAAA,oBAAY;QAAE,WAAW,MAAM,KAAK;sBAC3D,gCAAC,CAAA,GAAA,yCAAkB,EAAE,QAAQ;QAAC,OAAO;YAAC,GAAG,UAAU;uBAAE;YAAW,KAAK;QAAQ;OAC1E,YAAY,QAAQ,iBAEvB,gCAAC,CAAA,GAAA,oBAAY;QAAE,WAAW,MAAM,KAAK;;AAI7C","sources":["packages/react-aria-components/src/Popover.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaPopoverProps, DismissButton, Overlay, PlacementAxis, PositionProps, usePopover} from 'react-aria';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useEnterAnimation, useExitAnimation, useRenderProps} from './utils';\nimport {filterDOMProps, mergeProps, useLayoutEffect} from '@react-aria/utils';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {OverlayArrowContext} from './OverlayArrow';\nimport {OverlayTriggerProps, OverlayTriggerState, useOverlayTriggerState} from 'react-stately';\nimport {OverlayTriggerStateContext} from './Dialog';\nimport React, {createContext, ForwardedRef, forwardRef, useContext, useRef, useState} from 'react';\nimport {useIsHidden} from '@react-aria/collections';\n\nexport interface PopoverProps extends Omit<PositionProps, 'isOpen'>, Omit<AriaPopoverProps, 'popoverRef' | 'triggerRef' | 'offset' | 'arrowSize'>, OverlayTriggerProps, RenderProps<PopoverRenderProps>, SlotProps {\n /**\n * The name of the component that triggered the popover. This is reflected on the element\n * as the `data-trigger` attribute, and can be used to provide specific\n * styles for the popover depending on which element triggered it.\n */\n trigger?: string,\n /**\n * The ref for the element which the popover positions itself with respect to.\n *\n * When used within a trigger component such as DialogTrigger, MenuTrigger, Select, etc.,\n * this is set automatically. It is only required when used standalone.\n */\n triggerRef?: RefObject<Element | null>,\n /**\n * Whether the popover is currently performing an entry animation.\n */\n isEntering?: boolean,\n /**\n * Whether the popover is currently performing an exit animation.\n */\n isExiting?: boolean,\n /**\n * The container element in which the overlay portal will be placed. This may have unknown behavior depending on where it is portalled to.\n * @default document.body\n */\n UNSTABLE_portalContainer?: Element,\n /**\n * The additional offset applied along the main axis between the element and its\n * anchor element.\n * @default 8\n */\n offset?: number\n}\n\nexport interface PopoverRenderProps {\n /**\n * The name of the component that triggered the popover, e.g. \"DialogTrigger\" or \"ComboBox\".\n * @selector [data-trigger=\"...\"]\n */\n trigger: string | null,\n /**\n * The placement of the popover relative to the trigger.\n * @selector [data-placement=\"left | right | top | bottom\"]\n */\n placement: PlacementAxis | null,\n /**\n * Whether the popover is currently entering. Use this to apply animations.\n * @selector [data-entering]\n */\n isEntering: boolean,\n /**\n * Whether the popover is currently exiting. Use this to apply animations.\n * @selector [data-exiting]\n */\n isExiting: boolean\n}\n\nexport const PopoverContext = createContext<ContextValue<PopoverProps, HTMLElement>>(null);\n\n/**\n * A popover is an overlay element positioned relative to a trigger.\n */\nexport const Popover = /*#__PURE__*/ (forwardRef as forwardRefType)(function Popover(props: PopoverProps, ref: ForwardedRef<HTMLElement>) {\n [props, ref] = useContextProps(props, ref, PopoverContext);\n let contextState = useContext(OverlayTriggerStateContext);\n let localState = useOverlayTriggerState(props);\n let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;\n let isExiting = useExitAnimation(ref, state.isOpen) || props.isExiting || false;\n let isHidden = useIsHidden();\n\n // If we are in a hidden tree, we still need to preserve our children.\n if (isHidden) {\n let children = props.children;\n if (typeof children === 'function') {\n children = children({\n trigger: props.trigger || null,\n placement: 'bottom',\n isEntering: false,\n isExiting: false,\n defaultChildren: null\n });\n }\n\n return <>{children}</>;\n }\n\n if (state && !state.isOpen && !isExiting) {\n return null;\n }\n\n return (\n <PopoverInner\n {...props}\n triggerRef={props.triggerRef!}\n state={state}\n popoverRef={ref}\n isExiting={isExiting} />\n );\n});\n\ninterface PopoverInnerProps extends AriaPopoverProps, RenderProps<PopoverRenderProps>, SlotProps {\n state: OverlayTriggerState,\n isEntering?: boolean,\n isExiting: boolean,\n UNSTABLE_portalContainer?: Element,\n trigger?: string\n}\n\nfunction PopoverInner({state, isExiting, UNSTABLE_portalContainer, ...props}: PopoverInnerProps) {\n // Calculate the arrow size internally (and remove props.arrowSize from PopoverProps)\n // Referenced from: packages/@react-spectrum/tooltip/src/TooltipTrigger.tsx\n let arrowRef = useRef<HTMLDivElement>(null);\n let [arrowWidth, setArrowWidth] = useState(0);\n useLayoutEffect(() => {\n if (arrowRef.current && state.isOpen) {\n setArrowWidth(arrowRef.current.getBoundingClientRect().width);\n }\n }, [state.isOpen, arrowRef]);\n\n let {popoverProps, underlayProps, arrowProps, placement} = usePopover({\n ...props,\n offset: props.offset ?? 8,\n arrowSize: arrowWidth\n }, state);\n\n let ref = props.popoverRef as RefObject<HTMLDivElement | null>;\n let isEntering = useEnterAnimation(ref, !!placement) || props.isEntering || false;\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Popover',\n values: {\n trigger: props.trigger || null,\n placement,\n isEntering,\n isExiting\n }\n });\n\n let style = {...popoverProps.style, ...renderProps.style};\n\n return (\n <Overlay {...props} isExiting={isExiting} portalContainer={UNSTABLE_portalContainer}>\n {!props.isNonModal && state.isOpen && <div data-testid=\"underlay\" {...underlayProps} style={{position: 'fixed', inset: 0}} />}\n <div\n {...mergeProps(filterDOMProps(props as any), popoverProps)}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n style={style}\n data-trigger={props.trigger}\n data-placement={placement}\n data-entering={isEntering || undefined}\n data-exiting={isExiting || undefined}>\n {!props.isNonModal && <DismissButton onDismiss={state.close} />}\n <OverlayArrowContext.Provider value={{...arrowProps, placement, ref: arrowRef}}>\n {renderProps.children}\n </OverlayArrowContext.Provider>\n <DismissButton onDismiss={state.close} />\n </div>\n </Overlay>\n );\n}\n"],"names":[],"version":3,"file":"Popover.module.js.map"}
@@ -31,7 +31,7 @@ $parcel$export(module.exports, "ProgressBar", () => $0d6436f6a1b0b001$export$c17
31
31
 
32
32
 
33
33
  const $0d6436f6a1b0b001$export$e9f3bf65a26ce129 = /*#__PURE__*/ (0, $av4IL$react.createContext)(null);
34
- function $0d6436f6a1b0b001$var$ProgressBar(props, ref) {
34
+ const $0d6436f6a1b0b001$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $av4IL$react.forwardRef)(function ProgressBar(props, ref) {
35
35
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $0d6436f6a1b0b001$export$e9f3bf65a26ce129);
36
36
  let { value: value = 0, minValue: minValue = 0, maxValue: maxValue = 100, isIndeterminate: isIndeterminate = false } = props;
37
37
  value = (0, $av4IL$reactstatelyutils.clamp)(value, minValue, maxValue);
@@ -63,11 +63,7 @@ function $0d6436f6a1b0b001$var$ProgressBar(props, ref) {
63
63
  elementType: 'span'
64
64
  }
65
65
  }, renderProps.children));
66
- }
67
- /**
68
- * Progress bars show either determinate or indeterminate progress of an operation
69
- * over time.
70
- */ const $0d6436f6a1b0b001$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $av4IL$react.forwardRef)($0d6436f6a1b0b001$var$ProgressBar);
66
+ });
71
67
 
72
68
 
73
69
  //# sourceMappingURL=ProgressBar.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA2BM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAkD;AAEhG,SAAS,kCAAY,KAAuB,EAAE,GAAiC;IAC7E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,SACF,QAAQ,aACR,WAAW,aACX,WAAW,sBACX,kBAAkB,OACnB,GAAG;IACJ,QAAQ,CAAA,GAAA,8BAAI,EAAE,OAAO,UAAU;IAE/B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM;IAC9B,IAAI,oBACF,gBAAgB,cAChB,UAAU,EACX,GAAG,CAAA,GAAA,+BAAa,EAAE;QAAC,GAAG,KAAK;eAAE;IAAK;IAEnC,0DAA0D;IAC1D,IAAI,aAAa,kBAAkB,YAAY,AAAC,CAAA,QAAQ,QAAO,IAAM,CAAA,WAAW,QAAO,IAAK;IAE5F,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;YACA,WAAW,gBAAgB,CAAC,iBAAiB;6BAC7C;QACF;IACF;IAEA,qBACE,0DAAC;QAAK,GAAG,gBAAgB;QAAG,GAAG,WAAW;QAAE,KAAK;QAAK,MAAM,MAAM,IAAI,IAAI;qBACxE,0DAAC,CAAA,GAAA,sCAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,GAAG,UAAU;YAAE,KAAK;YAAU,aAAa;QAAM;OAC7E,YAAY,QAAQ;AAI7B;AAEA;;;CAGC,GACD,MAAM,0DAAe,CAAA,GAAA,uBAAS,EAAE","sources":["packages/react-aria-components/src/ProgressBar.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaProgressBarProps, useProgressBar} from 'react-aria';\nimport {clamp} from '@react-stately/utils';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ProgressBarProps extends Omit<AriaProgressBarProps, 'label'>, RenderProps<ProgressBarRenderProps>, SlotProps {}\n\nexport interface ProgressBarRenderProps {\n /**\n * The value as a percentage between the minimum and maximum.\n */\n percentage?: number,\n /**\n * A formatted version of the value.\n * @selector [aria-valuetext]\n */\n valueText: string | undefined,\n /**\n * Whether the progress bar is indeterminate.\n * @selector :not([aria-valuenow])\n */\n isIndeterminate: boolean\n}\n\nexport const ProgressBarContext = createContext<ContextValue<ProgressBarProps, HTMLDivElement>>(null);\n\nfunction ProgressBar(props: ProgressBarProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ProgressBarContext);\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n isIndeterminate = false\n } = props;\n value = clamp(value, minValue, maxValue);\n\n let [labelRef, label] = useSlot();\n let {\n progressBarProps,\n labelProps\n } = useProgressBar({...props, label});\n\n // Calculate the width of the progress bar as a percentage\n let percentage = isIndeterminate ? undefined : (value - minValue) / (maxValue - minValue) * 100;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ProgressBar',\n values: {\n percentage,\n valueText: progressBarProps['aria-valuetext'],\n isIndeterminate\n }\n });\n\n return (\n <div {...progressBarProps} {...renderProps} ref={ref} slot={props.slot || undefined}>\n <LabelContext.Provider value={{...labelProps, ref: labelRef, elementType: 'span'}}>\n {renderProps.children}\n </LabelContext.Provider>\n </div>\n );\n}\n\n/**\n * Progress bars show either determinate or indeterminate progress of an operation\n * over time.\n */\nconst _ProgressBar = forwardRef(ProgressBar);\nexport {_ProgressBar as ProgressBar};\n"],"names":[],"version":3,"file":"ProgressBar.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA2BM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAkD;AAMzF,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,SACF,QAAQ,aACR,WAAW,aACX,WAAW,sBACX,kBAAkB,OACnB,GAAG;IACJ,QAAQ,CAAA,GAAA,8BAAI,EAAE,OAAO,UAAU;IAE/B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM;IAC9B,IAAI,oBACF,gBAAgB,cAChB,UAAU,EACX,GAAG,CAAA,GAAA,+BAAa,EAAE;QAAC,GAAG,KAAK;eAAE;IAAK;IAEnC,0DAA0D;IAC1D,IAAI,aAAa,kBAAkB,YAAY,AAAC,CAAA,QAAQ,QAAO,IAAM,CAAA,WAAW,QAAO,IAAK;IAE5F,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;YACA,WAAW,gBAAgB,CAAC,iBAAiB;6BAC7C;QACF;IACF;IAEA,qBACE,0DAAC;QAAK,GAAG,gBAAgB;QAAG,GAAG,WAAW;QAAE,KAAK;QAAK,MAAM,MAAM,IAAI,IAAI;qBACxE,0DAAC,CAAA,GAAA,sCAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,GAAG,UAAU;YAAE,KAAK;YAAU,aAAa;QAAM;OAC7E,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ProgressBar.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaProgressBarProps, useProgressBar} from 'react-aria';\nimport {clamp} from '@react-stately/utils';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ProgressBarProps extends Omit<AriaProgressBarProps, 'label'>, RenderProps<ProgressBarRenderProps>, SlotProps {}\n\nexport interface ProgressBarRenderProps {\n /**\n * The value as a percentage between the minimum and maximum.\n */\n percentage?: number,\n /**\n * A formatted version of the value.\n * @selector [aria-valuetext]\n */\n valueText: string | undefined,\n /**\n * Whether the progress bar is indeterminate.\n * @selector :not([aria-valuenow])\n */\n isIndeterminate: boolean\n}\n\nexport const ProgressBarContext = createContext<ContextValue<ProgressBarProps, HTMLDivElement>>(null);\n\n/**\n * Progress bars show either determinate or indeterminate progress of an operation\n * over time.\n */\nexport const ProgressBar = forwardRef(function ProgressBar(props: ProgressBarProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ProgressBarContext);\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n isIndeterminate = false\n } = props;\n value = clamp(value, minValue, maxValue);\n\n let [labelRef, label] = useSlot();\n let {\n progressBarProps,\n labelProps\n } = useProgressBar({...props, label});\n\n // Calculate the width of the progress bar as a percentage\n let percentage = isIndeterminate ? undefined : (value - minValue) / (maxValue - minValue) * 100;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ProgressBar',\n values: {\n percentage,\n valueText: progressBarProps['aria-valuetext'],\n isIndeterminate\n }\n });\n\n return (\n <div {...progressBarProps} {...renderProps} ref={ref} slot={props.slot || undefined}>\n <LabelContext.Provider value={{...labelProps, ref: labelRef, elementType: 'span'}}>\n {renderProps.children}\n </LabelContext.Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ProgressBar.main.js.map"}
@@ -20,7 +20,7 @@ import $hU2kz$react, {createContext as $hU2kz$createContext, forwardRef as $hU2k
20
20
 
21
21
 
22
22
  const $0393f8ab869a0f1a$export$e9f3bf65a26ce129 = /*#__PURE__*/ (0, $hU2kz$createContext)(null);
23
- function $0393f8ab869a0f1a$var$ProgressBar(props, ref) {
23
+ const $0393f8ab869a0f1a$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $hU2kz$forwardRef)(function ProgressBar(props, ref) {
24
24
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $0393f8ab869a0f1a$export$e9f3bf65a26ce129);
25
25
  let { value: value = 0, minValue: minValue = 0, maxValue: maxValue = 100, isIndeterminate: isIndeterminate = false } = props;
26
26
  value = (0, $hU2kz$clamp)(value, minValue, maxValue);
@@ -52,11 +52,7 @@ function $0393f8ab869a0f1a$var$ProgressBar(props, ref) {
52
52
  elementType: 'span'
53
53
  }
54
54
  }, renderProps.children));
55
- }
56
- /**
57
- * Progress bars show either determinate or indeterminate progress of an operation
58
- * over time.
59
- */ const $0393f8ab869a0f1a$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $hU2kz$forwardRef)($0393f8ab869a0f1a$var$ProgressBar);
55
+ });
60
56
 
61
57
 
62
58
  export {$0393f8ab869a0f1a$export$e9f3bf65a26ce129 as ProgressBarContext, $0393f8ab869a0f1a$export$c17561cb55d4db30 as ProgressBar};
@@ -20,7 +20,7 @@ import $hU2kz$react, {createContext as $hU2kz$createContext, forwardRef as $hU2k
20
20
 
21
21
 
22
22
  const $0393f8ab869a0f1a$export$e9f3bf65a26ce129 = /*#__PURE__*/ (0, $hU2kz$createContext)(null);
23
- function $0393f8ab869a0f1a$var$ProgressBar(props, ref) {
23
+ const $0393f8ab869a0f1a$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $hU2kz$forwardRef)(function ProgressBar(props, ref) {
24
24
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $0393f8ab869a0f1a$export$e9f3bf65a26ce129);
25
25
  let { value: value = 0, minValue: minValue = 0, maxValue: maxValue = 100, isIndeterminate: isIndeterminate = false } = props;
26
26
  value = (0, $hU2kz$clamp)(value, minValue, maxValue);
@@ -52,11 +52,7 @@ function $0393f8ab869a0f1a$var$ProgressBar(props, ref) {
52
52
  elementType: 'span'
53
53
  }
54
54
  }, renderProps.children));
55
- }
56
- /**
57
- * Progress bars show either determinate or indeterminate progress of an operation
58
- * over time.
59
- */ const $0393f8ab869a0f1a$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $hU2kz$forwardRef)($0393f8ab869a0f1a$var$ProgressBar);
55
+ });
60
56
 
61
57
 
62
58
  export {$0393f8ab869a0f1a$export$e9f3bf65a26ce129 as ProgressBarContext, $0393f8ab869a0f1a$export$c17561cb55d4db30 as ProgressBar};
@@ -1 +1 @@
1
- {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA2BM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAkD;AAEhG,SAAS,kCAAY,KAAuB,EAAE,GAAiC;IAC7E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,SACF,QAAQ,aACR,WAAW,aACX,WAAW,sBACX,kBAAkB,OACnB,GAAG;IACJ,QAAQ,CAAA,GAAA,YAAI,EAAE,OAAO,UAAU;IAE/B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM;IAC9B,IAAI,oBACF,gBAAgB,cAChB,UAAU,EACX,GAAG,CAAA,GAAA,qBAAa,EAAE;QAAC,GAAG,KAAK;eAAE;IAAK;IAEnC,0DAA0D;IAC1D,IAAI,aAAa,kBAAkB,YAAY,AAAC,CAAA,QAAQ,QAAO,IAAM,CAAA,WAAW,QAAO,IAAK;IAE5F,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;YACA,WAAW,gBAAgB,CAAC,iBAAiB;6BAC7C;QACF;IACF;IAEA,qBACE,gCAAC;QAAK,GAAG,gBAAgB;QAAG,GAAG,WAAW;QAAE,KAAK;QAAK,MAAM,MAAM,IAAI,IAAI;qBACxE,gCAAC,CAAA,GAAA,yCAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,GAAG,UAAU;YAAE,KAAK;YAAU,aAAa;QAAM;OAC7E,YAAY,QAAQ;AAI7B;AAEA;;;CAGC,GACD,MAAM,0DAAe,CAAA,GAAA,iBAAS,EAAE","sources":["packages/react-aria-components/src/ProgressBar.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaProgressBarProps, useProgressBar} from 'react-aria';\nimport {clamp} from '@react-stately/utils';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ProgressBarProps extends Omit<AriaProgressBarProps, 'label'>, RenderProps<ProgressBarRenderProps>, SlotProps {}\n\nexport interface ProgressBarRenderProps {\n /**\n * The value as a percentage between the minimum and maximum.\n */\n percentage?: number,\n /**\n * A formatted version of the value.\n * @selector [aria-valuetext]\n */\n valueText: string | undefined,\n /**\n * Whether the progress bar is indeterminate.\n * @selector :not([aria-valuenow])\n */\n isIndeterminate: boolean\n}\n\nexport const ProgressBarContext = createContext<ContextValue<ProgressBarProps, HTMLDivElement>>(null);\n\nfunction ProgressBar(props: ProgressBarProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ProgressBarContext);\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n isIndeterminate = false\n } = props;\n value = clamp(value, minValue, maxValue);\n\n let [labelRef, label] = useSlot();\n let {\n progressBarProps,\n labelProps\n } = useProgressBar({...props, label});\n\n // Calculate the width of the progress bar as a percentage\n let percentage = isIndeterminate ? undefined : (value - minValue) / (maxValue - minValue) * 100;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ProgressBar',\n values: {\n percentage,\n valueText: progressBarProps['aria-valuetext'],\n isIndeterminate\n }\n });\n\n return (\n <div {...progressBarProps} {...renderProps} ref={ref} slot={props.slot || undefined}>\n <LabelContext.Provider value={{...labelProps, ref: labelRef, elementType: 'span'}}>\n {renderProps.children}\n </LabelContext.Provider>\n </div>\n );\n}\n\n/**\n * Progress bars show either determinate or indeterminate progress of an operation\n * over time.\n */\nconst _ProgressBar = forwardRef(ProgressBar);\nexport {_ProgressBar as ProgressBar};\n"],"names":[],"version":3,"file":"ProgressBar.module.js.map"}
1
+ {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA2BM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAkD;AAMzF,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAiC;IACnH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,SACF,QAAQ,aACR,WAAW,aACX,WAAW,sBACX,kBAAkB,OACnB,GAAG;IACJ,QAAQ,CAAA,GAAA,YAAI,EAAE,OAAO,UAAU;IAE/B,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,yCAAM;IAC9B,IAAI,oBACF,gBAAgB,cAChB,UAAU,EACX,GAAG,CAAA,GAAA,qBAAa,EAAE;QAAC,GAAG,KAAK;eAAE;IAAK;IAEnC,0DAA0D;IAC1D,IAAI,aAAa,kBAAkB,YAAY,AAAC,CAAA,QAAQ,QAAO,IAAM,CAAA,WAAW,QAAO,IAAK;IAE5F,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;YACA,WAAW,gBAAgB,CAAC,iBAAiB;6BAC7C;QACF;IACF;IAEA,qBACE,gCAAC;QAAK,GAAG,gBAAgB;QAAG,GAAG,WAAW;QAAE,KAAK;QAAK,MAAM,MAAM,IAAI,IAAI;qBACxE,gCAAC,CAAA,GAAA,yCAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,GAAG,UAAU;YAAE,KAAK;YAAU,aAAa;QAAM;OAC7E,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/ProgressBar.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaProgressBarProps, useProgressBar} from 'react-aria';\nimport {clamp} from '@react-stately/utils';\nimport {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';\nimport {LabelContext} from './Label';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ProgressBarProps extends Omit<AriaProgressBarProps, 'label'>, RenderProps<ProgressBarRenderProps>, SlotProps {}\n\nexport interface ProgressBarRenderProps {\n /**\n * The value as a percentage between the minimum and maximum.\n */\n percentage?: number,\n /**\n * A formatted version of the value.\n * @selector [aria-valuetext]\n */\n valueText: string | undefined,\n /**\n * Whether the progress bar is indeterminate.\n * @selector :not([aria-valuenow])\n */\n isIndeterminate: boolean\n}\n\nexport const ProgressBarContext = createContext<ContextValue<ProgressBarProps, HTMLDivElement>>(null);\n\n/**\n * Progress bars show either determinate or indeterminate progress of an operation\n * over time.\n */\nexport const ProgressBar = forwardRef(function ProgressBar(props: ProgressBarProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ProgressBarContext);\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n isIndeterminate = false\n } = props;\n value = clamp(value, minValue, maxValue);\n\n let [labelRef, label] = useSlot();\n let {\n progressBarProps,\n labelProps\n } = useProgressBar({...props, label});\n\n // Calculate the width of the progress bar as a percentage\n let percentage = isIndeterminate ? undefined : (value - minValue) / (maxValue - minValue) * 100;\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-ProgressBar',\n values: {\n percentage,\n valueText: progressBarProps['aria-valuetext'],\n isIndeterminate\n }\n });\n\n return (\n <div {...progressBarProps} {...renderProps} ref={ref} slot={props.slot || undefined}>\n <LabelContext.Provider value={{...labelProps, ref: labelRef, elementType: 'span'}}>\n {renderProps.children}\n </LabelContext.Provider>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"ProgressBar.module.js.map"}
@@ -44,7 +44,7 @@ $parcel$export(module.exports, "Radio", () => $1456b76f687bd4ed$export$d7b12c410
44
44
  const $1456b76f687bd4ed$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $g9Qo8$react.createContext)(null);
45
45
  const $1456b76f687bd4ed$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $g9Qo8$react.createContext)(null);
46
46
  const $1456b76f687bd4ed$export$29d84393af70866c = /*#__PURE__*/ (0, $g9Qo8$react.createContext)(null);
47
- function $1456b76f687bd4ed$var$RadioGroup(props, ref) {
47
+ const $1456b76f687bd4ed$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $g9Qo8$react.forwardRef)(function RadioGroup(props, ref) {
48
48
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $1456b76f687bd4ed$export$a79eda4ff50e30b6);
49
49
  let { validationBehavior: formValidationBehavior } = (0, $c5ccf687772c0422$exports.useSlottedContext)((0, $35157657e549736b$exports.FormContext)) || {};
50
50
  var _props_validationBehavior, _ref;
@@ -110,8 +110,8 @@ function $1456b76f687bd4ed$var$RadioGroup(props, ref) {
110
110
  ]
111
111
  ]
112
112
  }, renderProps.children));
113
- }
114
- function $1456b76f687bd4ed$var$Radio(props, ref) {
113
+ });
114
+ const $1456b76f687bd4ed$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $g9Qo8$react.forwardRef)(function Radio(props, ref) {
115
115
  let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
116
116
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(otherProps, ref, $1456b76f687bd4ed$export$b118023277d4a5c3);
117
117
  let state = (0, ($parcel$interopDefault($g9Qo8$react))).useContext($1456b76f687bd4ed$export$29d84393af70866c);
@@ -162,13 +162,7 @@ function $1456b76f687bd4ed$var$Radio(props, ref) {
162
162
  ...(0, $g9Qo8$reactariautils.mergeProps)(inputProps, focusProps),
163
163
  ref: inputRef
164
164
  })), renderProps.children);
165
- }
166
- /**
167
- * A radio group allows a user to select a single item from a list of mutually exclusive options.
168
- */ const $1456b76f687bd4ed$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $g9Qo8$react.forwardRef)($1456b76f687bd4ed$var$RadioGroup);
169
- /**
170
- * A radio represents an individual option within a radio group.
171
- */ const $1456b76f687bd4ed$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $g9Qo8$react.forwardRef)($1456b76f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Ac,MAAM,UAAU;IAExD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yBAAO,EAAE;QACrC,GAAG,KAAK;QACR,YAAY;IACd;IAEA,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,kBAAkB;QAClB,QAAQ;wBACN;uBACA;uBACA;uBACA;4BACA;wBACA;YACA,YAAY,MAAM,UAAU;YAC5B,WAAW,MAAM,SAAS;YAC1B,YAAY,MAAM,UAAU;QAC9B;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO,SAAS,EAAE;IAElB,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,YAAY,YAAY,YAAY;QAC7D,KAAK;QACL,iBAAe,cAAc;QAC7B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,iBAAe,cAAc;QAC7B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,MAAM,SAAS,IAAI;QACjC,iBAAe,MAAM,UAAU,IAAI;qBACnC,0DAAC,CAAA,GAAA,+BAAa;QAAE,aAAY;qBAC1B,0DAAC;QAAO,GAAG,CAAA,GAAA,gCAAS,EAAE,YAAY,WAAW;QAAE,KAAK;SAErD,YAAY,QAAQ;AAG3B;AAEA;;CAEC,GACD,MAAM,4CAA4B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB;AAEjE;;CAEC,GACD,MAAM,4CAAuB,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB","sources":["packages/react-aria-components/src/RadioGroup.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaRadioGroupProps, AriaRadioProps, HoverEvents, Orientation, useFocusRing, useHover, useRadio, useRadioGroup, VisuallyHidden} from 'react-aria';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, mergeProps, mergeRefs, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {RadioGroupState, useRadioGroupState} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<RadioGroupRenderProps>, SlotProps {}\nexport interface RadioProps extends Omit<AriaRadioProps, 'children'>, HoverEvents, RenderProps<RadioRenderProps>, SlotProps {\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\nexport interface RadioGroupRenderProps {\n /**\n * The orientation of the radio group.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the radio group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the radio group is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the radio group is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * Whether the radio group is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * State of the radio group.\n */\n state: RadioGroupState\n}\n\nexport interface RadioRenderProps {\n /**\n * Whether the radio is selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the radio is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the radio is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the radio is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the radio is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the radio is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the radio is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the radio is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the checkbox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport const RadioGroupContext = createContext<ContextValue<RadioGroupProps, HTMLDivElement>>(null);\nexport const RadioContext = createContext<ContextValue<Partial<RadioProps>, HTMLLabelElement>>(null);\nexport const RadioGroupStateContext = createContext<RadioGroupState | null>(null);\n\nfunction RadioGroup(props: RadioGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, RadioGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useRadioGroupState({\n ...props,\n validationBehavior\n });\n\n let [labelRef, label] = useSlot();\n let {radioGroupProps, labelProps, descriptionProps, errorMessageProps, ...validation} = useRadioGroup({\n ...props,\n label,\n validationBehavior\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: props.orientation || 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-RadioGroup'\n });\n\n return (\n <div\n {...radioGroupProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'vertical'}\n data-invalid={state.isInvalid || undefined}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={state.isRequired || undefined}>\n <Provider\n values={[\n [RadioGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n}\n\nfunction Radio(props: RadioProps, ref: ForwardedRef<HTMLLabelElement>) {\n let {\n inputRef: userProvidedInputRef = null,\n ...otherProps\n } = props;\n [props, ref] = useContextProps(otherProps, ref, RadioContext);\n let state = React.useContext(RadioGroupStateContext)!;\n let inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null));\n let {labelProps, inputProps, isSelected, isDisabled, isPressed} = useRadio({\n ...removeDataAttributes<RadioProps>(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, state, inputRef);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let interactionDisabled = isDisabled || state.isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: interactionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Radio',\n values: {\n isSelected,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n {renderProps.children}\n </label>\n );\n}\n\n/**\n * A radio group allows a user to select a single item from a list of mutually exclusive options.\n */\nconst _RadioGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(RadioGroup);\n\n/**\n * A radio represents an individual option within a radio group.\n */\nconst _Radio = /*#__PURE__*/ (forwardRef as forwardRefType)(Radio);\n\nexport {_RadioGroup as RadioGroup, _Radio as Radio};\n"],"names":[],"version":3,"file":"RadioGroup.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAqGM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAAiD;AACvF,MAAM,0DAAe,CAAA,GAAA,0BAAY,EAAuD;AACxF,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA0B;AAKrE,MAAM,4CAA2B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,WAAW,KAAsB,EAAE,GAAiC;IAClJ,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE,CAAA,GAAA,qCAAU,MAAM,CAAC;QAC7D,2BAAA;IAAzB,IAAI,qBAAqB,CAAA,OAAA,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B,oCAA5B,kBAAA,OAAsD;IAC/E,IAAI,QAAQ,CAAA,GAAA,sCAAiB,EAAE;QAC7B,GAAG,KAAK;4BACR;IACF;IAEA,IAAI,CAAC,UAAU,MAAM,GAAG,CAAA,GAAA,iCAAM;IAC9B,IAAI,mBAAC,eAAe,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAE,GAAG,YAAW,GAAG,CAAA,GAAA,8BAAY,EAAE;QACpG,GAAG,KAAK;eACR;4BACA;IACF,GAAG;IA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ria-components/src/RadioGroup.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaRadioGroupProps, AriaRadioProps, HoverEvents, Orientation, useFocusRing, useHover, useRadio, useRadioGroup, VisuallyHidden} from 'react-aria';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, mergeProps, mergeRefs, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {LabelContext} from './Label';\nimport {RadioGroupState, useRadioGroupState} from 'react-stately';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<RadioGroupRenderProps>, SlotProps {}\nexport interface RadioProps extends Omit<AriaRadioProps, 'children'>, HoverEvents, RenderProps<RadioRenderProps>, SlotProps {\n /**\n * A ref for the HTML input element.\n */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\nexport interface RadioGroupRenderProps {\n /**\n * The orientation of the radio group.\n * @selector [data-orientation=\"horizontal | vertical\"]\n */\n orientation: Orientation,\n /**\n * Whether the radio group is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the radio group is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the radio group is required.\n * @selector [data-required]\n */\n isRequired: boolean,\n /**\n * Whether the radio group is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * State of the radio group.\n */\n state: RadioGroupState\n}\n\nexport interface RadioRenderProps {\n /**\n * Whether the radio is selected.\n * @selector [data-selected]\n */\n isSelected: boolean,\n /**\n * Whether the radio is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the radio is currently in a pressed state.\n * @selector [data-pressed]\n */\n isPressed: boolean,\n /**\n * Whether the radio is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the radio is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the radio is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the radio is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the radio is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the checkbox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport const RadioGroupContext = createContext<ContextValue<RadioGroupProps, HTMLDivElement>>(null);\nexport const RadioContext = createContext<ContextValue<Partial<RadioProps>, HTMLLabelElement>>(null);\nexport const RadioGroupStateContext = createContext<RadioGroupState | null>(null);\n\n/**\n * A radio group allows a user to select a single item from a list of mutually exclusive options.\n */\nexport const RadioGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function RadioGroup(props: RadioGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, RadioGroupContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useRadioGroupState({\n ...props,\n validationBehavior\n });\n\n let [labelRef, label] = useSlot();\n let {radioGroupProps, labelProps, descriptionProps, errorMessageProps, ...validation} = useRadioGroup({\n ...props,\n label,\n validationBehavior\n }, state);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n orientation: props.orientation || 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: state.isInvalid,\n state\n },\n defaultClassName: 'react-aria-RadioGroup'\n });\n\n return (\n <div\n {...radioGroupProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-orientation={props.orientation || 'vertical'}\n data-invalid={state.isInvalid || undefined}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={state.isRequired || undefined}>\n <Provider\n values={[\n [RadioGroupStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n );\n});\n\n/**\n * A radio represents an individual option within a radio group.\n */\nexport const Radio = /*#__PURE__*/ (forwardRef as forwardRefType)(function Radio(props: RadioProps, ref: ForwardedRef<HTMLLabelElement>) {\n let {\n inputRef: userProvidedInputRef = null,\n ...otherProps\n } = props;\n [props, ref] = useContextProps(otherProps, ref, RadioContext);\n let state = React.useContext(RadioGroupStateContext)!;\n let inputRef = useObjectRef(mergeRefs(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null));\n let {labelProps, inputProps, isSelected, isDisabled, isPressed} = useRadio({\n ...removeDataAttributes<RadioProps>(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, state, inputRef);\n let {isFocused, isFocusVisible, focusProps} = useFocusRing();\n let interactionDisabled = isDisabled || state.isReadOnly;\n\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled: interactionDisabled\n });\n\n let renderProps = useRenderProps({\n ...props,\n defaultClassName: 'react-aria-Radio',\n values: {\n isSelected,\n isPressed,\n isHovered,\n isFocused,\n isFocusVisible,\n isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <label\n {...mergeProps(DOMProps, labelProps, hoverProps, renderProps)}\n ref={ref}\n data-selected={isSelected || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}>\n <VisuallyHidden elementType=\"span\">\n <input {...mergeProps(inputProps, focusProps)} ref={inputRef} />\n </VisuallyHidden>\n {renderProps.children}\n </label>\n );\n});\n"],"names":[],"version":3,"file":"RadioGroup.main.js.map"}
@@ -30,7 +30,7 @@ import $3sixo$react, {createContext as $3sixo$createContext, forwardRef as $3six
30
30
  const $b6c3ddc6086f204d$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $3sixo$createContext)(null);
31
31
  const $b6c3ddc6086f204d$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $3sixo$createContext)(null);
32
32
  const $b6c3ddc6086f204d$export$29d84393af70866c = /*#__PURE__*/ (0, $3sixo$createContext)(null);
33
- function $b6c3ddc6086f204d$var$RadioGroup(props, ref) {
33
+ const $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $3sixo$forwardRef)(function RadioGroup(props, ref) {
34
34
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $b6c3ddc6086f204d$export$a79eda4ff50e30b6);
35
35
  let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
36
36
  var _props_validationBehavior, _ref;
@@ -96,8 +96,8 @@ function $b6c3ddc6086f204d$var$RadioGroup(props, ref) {
96
96
  ]
97
97
  ]
98
98
  }, renderProps.children));
99
- }
100
- function $b6c3ddc6086f204d$var$Radio(props, ref) {
99
+ });
100
+ const $b6c3ddc6086f204d$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $3sixo$forwardRef)(function Radio(props, ref) {
101
101
  let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
102
102
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(otherProps, ref, $b6c3ddc6086f204d$export$b118023277d4a5c3);
103
103
  let state = (0, $3sixo$react).useContext($b6c3ddc6086f204d$export$29d84393af70866c);
@@ -148,13 +148,7 @@ function $b6c3ddc6086f204d$var$Radio(props, ref) {
148
148
  ...(0, $3sixo$mergeProps)(inputProps, focusProps),
149
149
  ref: inputRef
150
150
  })), renderProps.children);
151
- }
152
- /**
153
- * A radio group allows a user to select a single item from a list of mutually exclusive options.
154
- */ const $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $3sixo$forwardRef)($b6c3ddc6086f204d$var$RadioGroup);
155
- /**
156
- * A radio represents an individual option within a radio group.
157
- */ const $b6c3ddc6086f204d$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $3sixo$forwardRef)($b6c3ddc6086f204d$var$Radio);
151
+ });
158
152
 
159
153
 
160
154
  export {$b6c3ddc6086f204d$export$a79eda4ff50e30b6 as RadioGroupContext, $b6c3ddc6086f204d$export$b118023277d4a5c3 as RadioContext, $b6c3ddc6086f204d$export$29d84393af70866c as RadioGroupStateContext, $b6c3ddc6086f204d$export$a98f0dcb43a68a25 as RadioGroup, $b6c3ddc6086f204d$export$d7b12c4107be0d61 as Radio};
@@ -30,7 +30,7 @@ import $3sixo$react, {createContext as $3sixo$createContext, forwardRef as $3six
30
30
  const $b6c3ddc6086f204d$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $3sixo$createContext)(null);
31
31
  const $b6c3ddc6086f204d$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $3sixo$createContext)(null);
32
32
  const $b6c3ddc6086f204d$export$29d84393af70866c = /*#__PURE__*/ (0, $3sixo$createContext)(null);
33
- function $b6c3ddc6086f204d$var$RadioGroup(props, ref) {
33
+ const $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $3sixo$forwardRef)(function RadioGroup(props, ref) {
34
34
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $b6c3ddc6086f204d$export$a79eda4ff50e30b6);
35
35
  let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
36
36
  var _props_validationBehavior, _ref;
@@ -96,8 +96,8 @@ function $b6c3ddc6086f204d$var$RadioGroup(props, ref) {
96
96
  ]
97
97
  ]
98
98
  }, renderProps.children));
99
- }
100
- function $b6c3ddc6086f204d$var$Radio(props, ref) {
99
+ });
100
+ const $b6c3ddc6086f204d$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $3sixo$forwardRef)(function Radio(props, ref) {
101
101
  let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
102
102
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(otherProps, ref, $b6c3ddc6086f204d$export$b118023277d4a5c3);
103
103
  let state = (0, $3sixo$react).useContext($b6c3ddc6086f204d$export$29d84393af70866c);
@@ -148,13 +148,7 @@ function $b6c3ddc6086f204d$var$Radio(props, ref) {
148
148
  ...(0, $3sixo$mergeProps)(inputProps, focusProps),
149
149
  ref: inputRef
150
150
  })), renderProps.children);
151
- }
152
- /**
153
- * A radio group allows a user to select a single item from a list of mutually exclusive options.
154
- */ const $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $3sixo$forwardRef)($b6c3ddc6086f204d$var$RadioGroup);
155
- /**
156
- * A radio represents an individual option within a radio group.
157
- */ const $b6c3ddc6086f204d$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $3sixo$forwardRef)($b6c3ddc6086f204d$var$Radio);
151
+ });
158
152
 
159
153
 
160
154
  export {$b6c3ddc6086f204d$export$a79eda4ff50e30b6 as RadioGroupContext, $b6c3ddc6086f204d$export$b118023277d4a5c3 as RadioContext, $b6c3ddc6086f204d$export$29d84393af70866c as RadioGroupStateContext, $b6c3ddc6086f204d$export$a98f0dcb43a68a25 as RadioGroup, $b6c3ddc6086f204d$export$d7b12c4107be0d61 as Radio};