@protonradio/proton-ui 0.11.12 → 0.11.13-beta.1

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 (162) hide show
  1. package/README.md +148 -148
  2. package/dist/components/ActionMenu/ActionMenu.cjs.js +1 -1
  3. package/dist/components/ActionMenu/ActionMenu.cjs.js.map +1 -1
  4. package/dist/components/ActionMenu/ActionMenu.es.js.map +1 -1
  5. package/dist/components/Badge/Badge.cjs.js.map +1 -1
  6. package/dist/components/Badge/Badge.es.js.map +1 -1
  7. package/dist/components/Banner/Banner.cjs.js +1 -1
  8. package/dist/components/Banner/Banner.cjs.js.map +1 -1
  9. package/dist/components/Banner/Banner.es.js.map +1 -1
  10. package/dist/components/Button/Button.cjs.js +1 -1
  11. package/dist/components/Button/Button.cjs.js.map +1 -1
  12. package/dist/components/Button/Button.es.js.map +1 -1
  13. package/dist/components/ButtonGroup/ButtonGroup.cjs.js +1 -1
  14. package/dist/components/ButtonGroup/ButtonGroup.cjs.js.map +1 -1
  15. package/dist/components/ButtonGroup/ButtonGroup.es.js.map +1 -1
  16. package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js.map +1 -1
  17. package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js +13 -13
  18. package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js.map +1 -1
  19. package/dist/components/DataTable/DataTable.cjs.js +1 -1
  20. package/dist/components/DataTable/DataTable.cjs.js.map +1 -1
  21. package/dist/components/DataTable/DataTable.es.js.map +1 -1
  22. package/dist/components/Dialog/Dialog.cjs.js +1 -1
  23. package/dist/components/Dialog/Dialog.cjs.js.map +1 -1
  24. package/dist/components/Dialog/Dialog.es.js.map +1 -1
  25. package/dist/components/Elevation/Elevation.cjs.js.map +1 -1
  26. package/dist/components/Elevation/Elevation.es.js.map +1 -1
  27. package/dist/components/Icon/Icon.cjs.js.map +1 -1
  28. package/dist/components/Icon/Icon.es.js.map +1 -1
  29. package/dist/components/ImageBackground/ImageBackground.cjs.js.map +1 -1
  30. package/dist/components/ImageBackground/ImageBackground.es.js.map +1 -1
  31. package/dist/components/Input/BaseInput/Input.cjs.js +1 -1
  32. package/dist/components/Input/BaseInput/Input.cjs.js.map +1 -1
  33. package/dist/components/Input/BaseInput/Input.es.js.map +1 -1
  34. package/dist/components/Input/CopyInput/CopyInput.cjs.js.map +1 -1
  35. package/dist/components/Input/CopyInput/CopyInput.es.js.map +1 -1
  36. package/dist/components/Input/SearchInput/SearchInput.cjs.js +1 -1
  37. package/dist/components/Input/SearchInput/SearchInput.cjs.js.map +1 -1
  38. package/dist/components/Input/SearchInput/SearchInput.es.js +1 -1
  39. package/dist/components/Input/SearchInput/SearchInput.es.js.map +1 -1
  40. package/dist/components/Menu/MenuTrigger.cjs.js +1 -1
  41. package/dist/components/Menu/MenuTrigger.cjs.js.map +1 -1
  42. package/dist/components/Menu/MenuTrigger.es.js.map +1 -1
  43. package/dist/components/Menu/PopoverMenu.cjs.js.map +1 -1
  44. package/dist/components/Menu/PopoverMenu.es.js.map +1 -1
  45. package/dist/components/Modal/Modal.cjs.js +1 -1
  46. package/dist/components/Modal/Modal.cjs.js.map +1 -1
  47. package/dist/components/Modal/Modal.es.js.map +1 -1
  48. package/dist/components/Popover/Popover.cjs.js.map +1 -1
  49. package/dist/components/Popover/Popover.es.js.map +1 -1
  50. package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js.map +1 -1
  51. package/dist/components/ScreenOverlay/ScreenOverlay.es.js.map +1 -1
  52. package/dist/components/Select/Select.cjs.js.map +1 -1
  53. package/dist/components/Select/Select.es.js.map +1 -1
  54. package/dist/components/Switch/Switch.cjs.js +1 -1
  55. package/dist/components/Switch/Switch.cjs.js.map +1 -1
  56. package/dist/components/Switch/Switch.es.js.map +1 -1
  57. package/dist/components/Table/Collection/CompoundComponents.cjs.js.map +1 -1
  58. package/dist/components/Table/Collection/CompoundComponents.es.js.map +1 -1
  59. package/dist/components/Table/Collection/collectionParser.cjs.js +1 -1
  60. package/dist/components/Table/Collection/collectionParser.cjs.js.map +1 -1
  61. package/dist/components/Table/Collection/collectionParser.es.js.map +1 -1
  62. package/dist/components/Table/Collection/useTableCollection.cjs.js +1 -1
  63. package/dist/components/Table/Collection/useTableCollection.cjs.js.map +1 -1
  64. package/dist/components/Table/Collection/useTableCollection.es.js.map +1 -1
  65. package/dist/components/Table/Table.cjs.js.map +1 -1
  66. package/dist/components/Table/Table.es.js.map +1 -1
  67. package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
  68. package/dist/components/Text/TextEllipsis/TextEllipsis.es.js.map +1 -1
  69. package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js +1 -1
  70. package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js.map +1 -1
  71. package/dist/components/Text/TextEmphasis/TextEmphasis.es.js +15 -15
  72. package/dist/components/Text/TextEmphasis/TextEmphasis.es.js.map +1 -1
  73. package/dist/components/ThemeProvider.cjs.js +1 -1
  74. package/dist/components/ThemeProvider.cjs.js.map +1 -1
  75. package/dist/components/ThemeProvider.es.js.map +1 -1
  76. package/dist/components/Tombstone/Tombstone.cjs.js.map +1 -1
  77. package/dist/components/Tombstone/Tombstone.es.js.map +1 -1
  78. package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
  79. package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
  80. package/dist/components/Tooltip/Tooltip.es.js +71 -56
  81. package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
  82. package/dist/components/Waveform/Waveform.cjs.js +1 -1
  83. package/dist/components/Waveform/Waveform.cjs.js.map +1 -1
  84. package/dist/components/Waveform/Waveform.es.js.map +1 -1
  85. package/dist/components/Waveform/WaveformBar.cjs.js.map +1 -1
  86. package/dist/components/Waveform/WaveformBar.es.js.map +1 -1
  87. package/dist/constants/breakpoint.cjs.js.map +1 -1
  88. package/dist/constants/breakpoint.es.js.map +1 -1
  89. package/dist/constants/placement.cjs.js.map +1 -1
  90. package/dist/constants/placement.es.js.map +1 -1
  91. package/dist/design/colors.cjs.js.map +1 -1
  92. package/dist/design/colors.es.js.map +1 -1
  93. package/dist/design/darkTheme/colors.cjs.js.map +1 -1
  94. package/dist/design/darkTheme/colors.es.js.map +1 -1
  95. package/dist/design/darkTheme/stylesheet.cjs.js.map +1 -1
  96. package/dist/design/darkTheme/stylesheet.es.js.map +1 -1
  97. package/dist/design/generateStylesheet.cjs.js.map +1 -1
  98. package/dist/design/generateStylesheet.es.js.map +1 -1
  99. package/dist/design/lightTheme/colors.cjs.js.map +1 -1
  100. package/dist/design/lightTheme/colors.es.js.map +1 -1
  101. package/dist/design/lightTheme/stylesheet.cjs.js.map +1 -1
  102. package/dist/design/lightTheme/stylesheet.es.js.map +1 -1
  103. package/dist/design/theme.cjs.js.map +1 -1
  104. package/dist/design/theme.es.js.map +1 -1
  105. package/dist/hooks/useBreakpoint.cjs.js +1 -1
  106. package/dist/hooks/useBreakpoint.cjs.js.map +1 -1
  107. package/dist/hooks/useBreakpoint.es.js.map +1 -1
  108. package/dist/hooks/useIsClosing.cjs.js +1 -1
  109. package/dist/hooks/useIsClosing.cjs.js.map +1 -1
  110. package/dist/hooks/useIsClosing.es.js.map +1 -1
  111. package/dist/hooks/useLockBodyScroll.cjs.js.map +1 -1
  112. package/dist/hooks/useLockBodyScroll.es.js.map +1 -1
  113. package/dist/hooks/usePalette.cjs.js.map +1 -1
  114. package/dist/hooks/usePalette.es.js.map +1 -1
  115. package/dist/icons.svg +10 -10
  116. package/dist/index.cjs.js +1 -1
  117. package/dist/index.d.ts +52 -25
  118. package/dist/index.es.js +6 -6
  119. package/dist/node_modules/@react-aria/focus/dist/FocusScope.cjs.js +1 -1
  120. package/dist/node_modules/@react-aria/form/dist/useFormValidation.cjs.js +1 -1
  121. package/dist/node_modules/@react-aria/i18n/dist/context.cjs.js +1 -1
  122. package/dist/node_modules/@react-aria/i18n/dist/context.es.js +3 -3
  123. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs.js +1 -1
  124. package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js +1 -1
  125. package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js.map +1 -1
  126. package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js +20 -30
  127. package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js.map +1 -1
  128. package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js +2 -2
  129. package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js +1 -1
  130. package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.es.js.map +1 -1
  131. package/dist/node_modules/@react-stately/form/dist/useFormValidationState.cjs.js +1 -1
  132. package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.cjs.js +1 -1
  133. package/dist/node_modules/@react-stately/utils/dist/useControlledState.cjs.js +1 -1
  134. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +5 -5
  135. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +14 -14
  136. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +2 -2
  137. package/dist/style.css +1 -1
  138. package/dist/utils/color2k.cjs.js.map +1 -1
  139. package/dist/utils/color2k.es.js.map +1 -1
  140. package/dist/utils/copy.cjs.js.map +1 -1
  141. package/dist/utils/copy.es.js.map +1 -1
  142. package/dist/utils/image.cjs.js.map +1 -1
  143. package/dist/utils/image.es.js.map +1 -1
  144. package/dist/utils/navigation.cjs.js.map +1 -1
  145. package/dist/utils/navigation.es.js.map +1 -1
  146. package/dist/utils/palette.cjs.js.map +1 -1
  147. package/dist/utils/palette.es.js.map +1 -1
  148. package/dist/utils/string.cjs.js.map +1 -1
  149. package/dist/utils/string.es.js.map +1 -1
  150. package/package.json +140 -140
  151. package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js +0 -2
  152. package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js.map +0 -1
  153. package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js +0 -37
  154. package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js.map +0 -1
  155. package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js +0 -2
  156. package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js.map +0 -1
  157. package/dist/node_modules/react-aria-components/dist/Tooltip.es.js +0 -98
  158. package/dist/node_modules/react-aria-components/dist/Tooltip.es.js.map +0 -1
  159. package/dist/node_modules/react-aria-components/dist/utils.cjs.js +0 -2
  160. package/dist/node_modules/react-aria-components/dist/utils.cjs.js.map +0 -1
  161. package/dist/node_modules/react-aria-components/dist/utils.es.js +0 -89
  162. package/dist/node_modules/react-aria-components/dist/utils.es.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -8,8 +8,6 @@ import { ReactElement } from 'react';
8
8
  import { ReactNode } from 'react';
9
9
  import { RefAttributes } from 'react';
10
10
  import { Selection as Selection_2 } from '@react-types/shared';
11
- import { TooltipProps as TooltipProps_2 } from 'react-aria-components';
12
- import { TooltipTriggerComponentProps } from 'react-aria-components';
13
11
 
14
12
  /**
15
13
  * A controlled ActionMenu to display a menu of actions.
@@ -1149,11 +1147,10 @@ declare interface TextEllipsisProps {
1149
1147
  *
1150
1148
  * API:
1151
1149
  * - {@link TextEmphasisProps}
1152
- * - extends {@link React.HTMLAttributes}
1153
1150
  */
1154
1151
  export declare const TextEmphasis: ({ to, children, tooltipProps, "data-testid": testId, }: TextEmphasisProps) => JSX_2.Element;
1155
1152
 
1156
- declare interface TextEmphasisProps extends React.HTMLAttributes<HTMLSpanElement> {
1153
+ declare interface TextEmphasisProps {
1157
1154
  /**
1158
1155
  * The URL that the text emphasis should link to. Turns the element into an `a` tag.
1159
1156
  */
@@ -1165,7 +1162,7 @@ declare interface TextEmphasisProps extends React.HTMLAttributes<HTMLSpanElement
1165
1162
  /**
1166
1163
  * Props to pass to the tooltip trigger. When provided, the text emphasis will be wrapped in a tooltip trigger.
1167
1164
  */
1168
- tooltipProps?: Omit<TooltipTriggerProps, "children">;
1165
+ tooltipProps?: Omit<TooltipProps, "children">;
1169
1166
  /**
1170
1167
  * A test ID.
1171
1168
  */
@@ -1219,43 +1216,73 @@ declare interface TombstoneProps {
1219
1216
  width?: string;
1220
1217
  }
1221
1218
 
1222
- export declare interface TooltipProps extends Omit<TooltipProps_2, "children"> {
1223
- children: React.ReactNode;
1224
- arrow?: boolean;
1225
- }
1226
-
1227
1219
  /**
1228
- * Proton's TooltipTrigger component deviates from the Aria TooltipTrigger in that on mobile,
1229
- * the trigger also opens the tooltip on click as well as hover & focus. This is to improve
1230
- * accessibility and usability on mobile.
1231
- *
1232
- * If you wish to disable the trigger click feature, you can set the `disableTriggerClick` prop.
1233
- * This is useful when using an info only Tooltip that might wrap a clickable element.
1234
- *
1220
+ * A component that displays a tooltip when the user hovers over the trigger.
1221
+ * For mobile, use Popover instead.
1235
1222
  * API:
1236
1223
  * - {@link TooltipTriggerProps}
1237
- * - extends {@link TooltipProps}
1238
- * - extends {@link TooltipTriggerComponentProps}
1239
1224
  *
1240
1225
  * @example
1241
1226
  * ```tsx
1242
- <TooltipTrigger content={...} placement="top" arrow isDisabled={disabled}>
1227
+ <Tooltipcontent={...} placement="top" arrow isDisabled={disabled}>
1243
1228
  {children}
1244
- </TooltipTrigger>
1229
+ </Tooltip>
1245
1230
  * ```
1246
1231
  */
1247
- export declare function TooltipTrigger({ children, delay, closeDelay, isDisabled, defaultOpen, onOpenChange, disableTriggerClick, content, ...tooltipProps }: TooltipTriggerProps): JSX_2.Element;
1232
+ export declare function Tooltip({ arrow, children, content, delay, placement, isDisabled, defaultOpen, onOpenChange, disableTriggerClick, "data-testid": testId, }: TooltipProps): JSX_2.Element;
1248
1233
 
1249
- export declare interface TooltipTriggerProps extends TooltipProps, TooltipTriggerComponentProps {
1250
- children: React.ReactNode;
1234
+ export declare namespace Tooltip {
1235
+ var displayName: string;
1236
+ }
1237
+
1238
+ export declare type TooltipPlacement = "top" | "bottom" | "left" | "right";
1239
+
1240
+ declare interface TooltipProps {
1241
+ /**
1242
+ * Whether to show an arrow pointing to the tooltip.
1243
+ * @default true
1244
+ */
1245
+ arrow?: boolean;
1246
+ /**
1247
+ * The children to display in the tooltip.
1248
+ */
1249
+ children: default_2.ReactNode;
1251
1250
  /**
1252
1251
  * The content to display in the tooltip. Zero-length titles string are never displayed.
1253
1252
  */
1254
- content: string | React.ReactNode;
1253
+ content: string | default_2.ReactNode;
1254
+ /**
1255
+ * A test ID.
1256
+ */
1257
+ "data-testid"?: string;
1258
+ /**
1259
+ * The placement of the tooltip.
1260
+ * @default "bottom"
1261
+ */
1262
+ placement?: TooltipPlacement;
1255
1263
  /**
1256
1264
  * Whether to disable the trigger click feature.
1265
+ * This is useful when using an info only Tooltip that might wrap a clickable element.
1257
1266
  */
1258
1267
  disableTriggerClick?: boolean;
1268
+ /**
1269
+ * Whether the tooltip is disabled.
1270
+ */
1271
+ isDisabled?: boolean;
1272
+ /**
1273
+ * Delay before showing the tooltip (in milliseconds).
1274
+ * @default 100
1275
+ */
1276
+ delay?: number;
1277
+ /**
1278
+ * Whether the tooltip is open by default.
1279
+ * @default false
1280
+ */
1281
+ defaultOpen?: boolean;
1282
+ /**
1283
+ * The callback function to call when the tooltip is opened or closed.
1284
+ */
1285
+ onOpenChange?: (open: boolean) => void;
1259
1286
  }
1260
1287
 
1261
1288
  export declare const useTheme: () => ThemeContextType;
package/dist/index.es.js CHANGED
@@ -2,8 +2,8 @@ import { ActionMenu as e } from "./components/ActionMenu/ActionMenu.es.js";
2
2
  import { Badge as p, BadgeVariants as m } from "./components/Badge/Badge.es.js";
3
3
  import { BANNER_ICONS as f, BANNER_VARIANTS as a, Banner as n } from "./components/Banner/Banner.es.js";
4
4
  import { Button as u, ButtonSizes as l, ButtonVariants as B } from "./components/Button/Button.es.js";
5
- import { ButtonGroup as g } from "./components/ButtonGroup/ButtonGroup.es.js";
6
- import { ButtonWithSelect as c } from "./components/ButtonWithSelect/ButtonWithSelect.es.js";
5
+ import { ButtonGroup as s } from "./components/ButtonGroup/ButtonGroup.es.js";
6
+ import { ButtonWithSelect as S } from "./components/ButtonWithSelect/ButtonWithSelect.es.js";
7
7
  import { DataTable as I } from "./components/DataTable/DataTable.es.js";
8
8
  import { Dialog as N } from "./components/Dialog/Dialog.es.js";
9
9
  import { Elevation as v } from "./components/Elevation/Elevation.es.js";
@@ -23,7 +23,7 @@ import { TextEllipsis as U } from "./components/Text/TextEllipsis/TextEllipsis.e
23
23
  import { TextEmphasis as Y } from "./components/Text/TextEmphasis/TextEmphasis.es.js";
24
24
  import { ThemeProvider as $, useTheme as oo } from "./components/ThemeProvider.es.js";
25
25
  import { Tombstone as eo } from "./components/Tombstone/Tombstone.es.js";
26
- import { TooltipTrigger as po } from "./components/Tooltip/Tooltip.es.js";
26
+ import { Tooltip as po } from "./components/Tooltip/Tooltip.es.js";
27
27
  import { Waveform as xo } from "./components/Waveform/Waveform.es.js";
28
28
  export {
29
29
  e as ActionMenu,
@@ -33,10 +33,10 @@ export {
33
33
  m as BadgeVariants,
34
34
  n as Banner,
35
35
  u as Button,
36
- g as ButtonGroup,
36
+ s as ButtonGroup,
37
37
  l as ButtonSizes,
38
38
  B as ButtonVariants,
39
- c as ButtonWithSelect,
39
+ S as ButtonWithSelect,
40
40
  C as CopyInput,
41
41
  I as DataTable,
42
42
  N as Dialog,
@@ -56,7 +56,7 @@ export {
56
56
  Y as TextEmphasis,
57
57
  $ as ThemeProvider,
58
58
  eo as Tombstone,
59
- po as TooltipTrigger,
59
+ po as Tooltip,
60
60
  xo as Waveform,
61
61
  oo as useTheme
62
62
  };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@react-aria/utils"),I=require("../../interactions/dist/useFocusVisible.cjs.js"),K=require("../../interactions/dist/focusSafely.cjs.js"),N=require("react"),D=N.createContext(null),R="react-aria-focus-scope-restore";let v=null;function P(e){let{children:t,contain:r,restoreFocus:u,autoFocus:n}=e,i=N.useRef(null),a=N.useRef(null),o=N.useRef([]),{parentNode:E}=N.useContext(D)||{},l=N.useMemo(()=>new x({scopeRef:o}),[o]);d.useLayoutEffect(()=>{let f=E||m.root;if(m.getTreeNode(f.scopeRef)&&v&&!L(v,f.scopeRef)){let s=m.getTreeNode(v);s&&(f=s)}f.addChild(l),m.addNode(l)},[l,E]),d.useLayoutEffect(()=>{let f=m.getTreeNode(o);f&&(f.contain=!!r)},[r]),d.useLayoutEffect(()=>{var f;let s=(f=i.current)===null||f===void 0?void 0:f.nextSibling,p=[],y=F=>F.stopPropagation();for(;s&&s!==a.current;)p.push(s),s.addEventListener(R,y),s=s.nextSibling;return o.current=p,()=>{for(let F of p)F.removeEventListener(R,y)}},[t]),V(o,u,r),J(o,r),j(o,u,r),W(o,n),N.useEffect(()=>{const f=d.getActiveElement(d.getOwnerDocument(o.current?o.current[0]:void 0));let s=null;if(g(f,o.current)){for(let p of m.traverse())p.scopeRef&&g(f,p.scopeRef.current)&&(s=p);s===m.getTreeNode(o)&&(v=s.scopeRef)}},[o]),d.useLayoutEffect(()=>()=>{var f,s,p;let y=(p=(s=m.getTreeNode(o))===null||s===void 0||(f=s.parent)===null||f===void 0?void 0:f.scopeRef)!==null&&p!==void 0?p:null;(o===v||L(o,v))&&(!y||m.getTreeNode(y))&&(v=y),m.removeTreeNode(o)},[o]);let b=N.useMemo(()=>q(o),[]),c=N.useMemo(()=>({focusManager:b,parentNode:l}),[l,b]);return N.createElement(D.Provider,{value:c},N.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,N.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function q(e){return{focusNext(t={}){let r=e.current,{from:u,tabbable:n,wrap:i,accept:a}=t;var o;let E=u||d.getActiveElement(d.getOwnerDocument((o=r[0])!==null&&o!==void 0?o:void 0)),l=r[0].previousElementSibling,b=w(r),c=h(b,{tabbable:n,accept:a},r);c.currentNode=g(E,r)?E:l;let f=c.nextNode();return!f&&i&&(c.currentNode=l,f=c.nextNode()),f&&T(f,!0),f},focusPrevious(t={}){let r=e.current,{from:u,tabbable:n,wrap:i,accept:a}=t;var o;let E=u||d.getActiveElement(d.getOwnerDocument((o=r[0])!==null&&o!==void 0?o:void 0)),l=r[r.length-1].nextElementSibling,b=w(r),c=h(b,{tabbable:n,accept:a},r);c.currentNode=g(E,r)?E:l;let f=c.previousNode();return!f&&i&&(c.currentNode=l,f=c.previousNode()),f&&T(f,!0),f},focusFirst(t={}){let r=e.current,{tabbable:u,accept:n}=t,i=w(r),a=h(i,{tabbable:u,accept:n},r);a.currentNode=r[0].previousElementSibling;let o=a.nextNode();return o&&T(o,!0),o},focusLast(t={}){let r=e.current,{tabbable:u,accept:n}=t,i=w(r),a=h(i,{tabbable:u,accept:n},r);a.currentNode=r[r.length-1].nextElementSibling;let o=a.previousNode();return o&&T(o,!0),o}}}function w(e){return e[0].parentElement}function S(e){let t=m.getTreeNode(v);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function z(e){if(e.checked)return!0;let t=[];if(!e.form)t=[...d.getOwnerDocument(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)].filter(i=>!i.form);else{var r,u;let i=(u=e.form)===null||u===void 0||(r=u.elements)===null||r===void 0?void 0:r.namedItem(e.name);t=[...i??[]]}return t?!t.some(i=>i.checked):!1}function J(e,t){let r=N.useRef(void 0),u=N.useRef(void 0);d.useLayoutEffect(()=>{let n=e.current;if(!t){u.current&&(cancelAnimationFrame(u.current),u.current=void 0);return}const i=d.getOwnerDocument(n?n[0]:void 0);let a=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!S(e)||l.isComposing)return;let b=d.getActiveElement(i),c=e.current;if(!c||!g(b,c))return;let f=w(c),s=h(f,{tabbable:!0},c);if(!b)return;s.currentNode=b;let p=l.shiftKey?s.previousNode():s.nextNode();p||(s.currentNode=l.shiftKey?c[c.length-1].nextElementSibling:c[0].previousElementSibling,p=l.shiftKey?s.previousNode():s.nextNode()),l.preventDefault(),p&&T(p,!0)},o=l=>{(!v||L(v,e))&&g(d.getEventTarget(l),e.current)?(v=e,r.current=d.getEventTarget(l)):S(e)&&!$(d.getEventTarget(l),e)?r.current?r.current.focus():v&&v.current&&C(v.current):S(e)&&(r.current=d.getEventTarget(l))},E=l=>{u.current&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let b=I.getInteractionModality(),c=(b==="virtual"||b===null)&&d.isAndroid()&&d.isChrome(),f=d.getActiveElement(i);if(!c&&f&&S(e)&&!$(f,e)){v=e;let p=d.getEventTarget(l);if(p&&p.isConnected){var s;r.current=p,(s=r.current)===null||s===void 0||s.focus()}else v.current&&C(v.current)}})};return i.addEventListener("keydown",a,!1),i.addEventListener("focusin",o,!1),n==null||n.forEach(l=>l.addEventListener("focusin",o,!1)),n==null||n.forEach(l=>l.addEventListener("focusout",E,!1)),()=>{i.removeEventListener("keydown",a,!1),i.removeEventListener("focusin",o,!1),n==null||n.forEach(l=>l.removeEventListener("focusin",o,!1)),n==null||n.forEach(l=>l.removeEventListener("focusout",E,!1))}},[e,t]),d.useLayoutEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[u])}function _(e){return $(e)}function g(e,t){return!e||!t?!1:t.some(r=>r.contains(e))}function $(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of m.traverse(m.getTreeNode(t)))if(r&&g(e,r.current))return!0;return!1}function U(e){return $(e,v)}function L(e,t){var r;let u=(r=m.getTreeNode(t))===null||r===void 0?void 0:r.parent;for(;u;){if(u.scopeRef===e)return!0;u=u.parent}return!1}function T(e,t=!1){if(e!=null&&!t)try{K.focusSafely(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function O(e,t=!0){let r=e[0].previousElementSibling,u=w(e),n=h(u,{tabbable:t},e);n.currentNode=r;let i=n.nextNode();return t&&!i&&(u=w(e),n=h(u,{tabbable:!1},e),n.currentNode=r,i=n.nextNode()),i}function C(e,t=!0){T(O(e,t))}function W(e,t){const r=N.useRef(t);N.useEffect(()=>{if(r.current){v=e;const u=d.getOwnerDocument(e.current?e.current[0]:void 0);!g(d.getActiveElement(u),v.current)&&e.current&&C(e.current)}r.current=!1},[e])}function V(e,t,r){d.useLayoutEffect(()=>{if(t||r)return;let u=e.current;const n=d.getOwnerDocument(u?u[0]:void 0);let i=a=>{let o=d.getEventTarget(a);g(o,e.current)?v=e:_(o)||(v=null)};return n.addEventListener("focusin",i,!1),u==null||u.forEach(a=>a.addEventListener("focusin",i,!1)),()=>{n.removeEventListener("focusin",i,!1),u==null||u.forEach(a=>a.removeEventListener("focusin",i,!1))}},[e,t,r])}function k(e){let t=m.getTreeNode(v);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function j(e,t,r){const u=N.useRef(typeof document<"u"?d.getActiveElement(d.getOwnerDocument(e.current?e.current[0]:void 0)):null);d.useLayoutEffect(()=>{let n=e.current;const i=d.getOwnerDocument(n?n[0]:void 0);if(!t||r)return;let a=()=>{(!v||L(v,e))&&g(d.getActiveElement(i),e.current)&&(v=e)};return i.addEventListener("focusin",a,!1),n==null||n.forEach(o=>o.addEventListener("focusin",a,!1)),()=>{i.removeEventListener("focusin",a,!1),n==null||n.forEach(o=>o.removeEventListener("focusin",a,!1))}},[e,r]),d.useLayoutEffect(()=>{const n=d.getOwnerDocument(e.current?e.current[0]:void 0);if(!t)return;let i=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!S(e)||a.isComposing)return;let o=n.activeElement;if(!$(o,e)||!k(e))return;let E=m.getTreeNode(e);if(!E)return;let l=E.nodeToRestore,b=h(n.body,{tabbable:!0});b.currentNode=o;let c=a.shiftKey?b.previousNode():b.nextNode();if((!l||!l.isConnected||l===n.body)&&(l=void 0,E.nodeToRestore=void 0),(!c||!$(c,e))&&l){b.currentNode=l;do c=a.shiftKey?b.previousNode():b.nextNode();while($(c,e));a.preventDefault(),a.stopPropagation(),c?T(c,!0):_(l)?T(l,!0):o.blur()}};return r||n.addEventListener("keydown",i,!0),()=>{r||n.removeEventListener("keydown",i,!0)}},[e,t,r]),d.useLayoutEffect(()=>{const n=d.getOwnerDocument(e.current?e.current[0]:void 0);if(!t)return;let i=m.getTreeNode(e);if(i){var a;return i.nodeToRestore=(a=u.current)!==null&&a!==void 0?a:void 0,()=>{let o=m.getTreeNode(e);if(!o)return;let E=o.nodeToRestore,l=d.getActiveElement(n);if(t&&E&&(l&&$(l,e)||l===n.body&&k(e))){let b=m.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let c=b.getTreeNode(e);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){M(c.nodeToRestore);return}c=c.parent}for(c=b.getTreeNode(e);c;){if(c.scopeRef&&c.scopeRef.current&&m.getTreeNode(c.scopeRef)){let f=O(c.scopeRef.current,!0);M(f);return}c=c.parent}}})}}}},[e,t])}function M(e){e.dispatchEvent(new CustomEvent(R,{bubbles:!0,cancelable:!0}))&&T(e)}function h(e,t,r){let u=t!=null&&t.tabbable?d.isTabbable:d.isFocusable,n=(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null,i=d.getOwnerDocument(n),a=d.createShadowTreeWalker(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var E;return!(t==null||(E=t.from)===null||E===void 0)&&E.contains(o)||t!=null&&t.tabbable&&o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(!z(o)||a.currentNode.tagName==="INPUT"&&a.currentNode.type==="radio"&&a.currentNode.name===o.name)?NodeFilter.FILTER_REJECT:u(o)&&(!r||g(o,r))&&(!(t!=null&&t.accept)||t.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class A{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,r,u){let n=this.fastMap.get(r??null);if(!n)return;let i=new x({scopeRef:t});n.addChild(i),i.parent=n,this.fastMap.set(t,i),u&&(i.nodeToRestore=u)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let r=this.fastMap.get(t);if(!r)return;let u=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&g(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let n=r.children;u&&(u.removeChild(r),n.size>0&&n.forEach(i=>u&&u.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let r of t.children)yield*this.traverse(r)}clone(){var t;let r=new A;var u;for(let n of this.traverse())r.addTreeNode(n.scopeRef,(u=(t=n.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&u!==void 0?u:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new x({scopeRef:null}),this.fastMap.set(null,this.root)}}class x{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let m=new A;exports.FocusScope=P;exports.focusScopeTree=m;exports.getFocusableTreeWalker=h;exports.isElementInChildOfActiveScope=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@react-aria/utils"),I=require("../../interactions/dist/useFocusVisible.cjs.js"),K=require("../../interactions/dist/focusSafely.cjs.js"),N=require("react"),D=N.createContext(null),R="react-aria-focus-scope-restore";let v=null;function P(e){let{children:t,contain:r,restoreFocus:u,autoFocus:n}=e,i=N.useRef(null),a=N.useRef(null),o=N.useRef([]),{parentNode:E}=N.useContext(D)||{},l=N.useMemo(()=>new x({scopeRef:o}),[o]);d.useLayoutEffect(()=>{let f=E||m.root;if(m.getTreeNode(f.scopeRef)&&v&&!L(v,f.scopeRef)){let s=m.getTreeNode(v);s&&(f=s)}f.addChild(l),m.addNode(l)},[l,E]),d.useLayoutEffect(()=>{let f=m.getTreeNode(o);f&&(f.contain=!!r)},[r]),d.useLayoutEffect(()=>{var f;let s=(f=i.current)===null||f===void 0?void 0:f.nextSibling,p=[],y=F=>F.stopPropagation();for(;s&&s!==a.current;)p.push(s),s.addEventListener(R,y),s=s.nextSibling;return o.current=p,()=>{for(let F of p)F.removeEventListener(R,y)}},[t]),B(o,u,r),J(o,r),V(o,u,r),W(o,n),N.useEffect(()=>{const f=d.getActiveElement(d.getOwnerDocument(o.current?o.current[0]:void 0));let s=null;if(g(f,o.current)){for(let p of m.traverse())p.scopeRef&&g(f,p.scopeRef.current)&&(s=p);s===m.getTreeNode(o)&&(v=s.scopeRef)}},[o]),d.useLayoutEffect(()=>()=>{var f,s,p;let y=(p=(s=m.getTreeNode(o))===null||s===void 0||(f=s.parent)===null||f===void 0?void 0:f.scopeRef)!==null&&p!==void 0?p:null;(o===v||L(o,v))&&(!y||m.getTreeNode(y))&&(v=y),m.removeTreeNode(o)},[o]);let b=N.useMemo(()=>q(o),[]),c=N.useMemo(()=>({focusManager:b,parentNode:l}),[l,b]);return N.createElement(D.Provider,{value:c},N.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,N.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function q(e){return{focusNext(t={}){let r=e.current,{from:u,tabbable:n,wrap:i,accept:a}=t;var o;let E=u||d.getActiveElement(d.getOwnerDocument((o=r[0])!==null&&o!==void 0?o:void 0)),l=r[0].previousElementSibling,b=w(r),c=h(b,{tabbable:n,accept:a},r);c.currentNode=g(E,r)?E:l;let f=c.nextNode();return!f&&i&&(c.currentNode=l,f=c.nextNode()),f&&T(f,!0),f},focusPrevious(t={}){let r=e.current,{from:u,tabbable:n,wrap:i,accept:a}=t;var o;let E=u||d.getActiveElement(d.getOwnerDocument((o=r[0])!==null&&o!==void 0?o:void 0)),l=r[r.length-1].nextElementSibling,b=w(r),c=h(b,{tabbable:n,accept:a},r);c.currentNode=g(E,r)?E:l;let f=c.previousNode();return!f&&i&&(c.currentNode=l,f=c.previousNode()),f&&T(f,!0),f},focusFirst(t={}){let r=e.current,{tabbable:u,accept:n}=t,i=w(r),a=h(i,{tabbable:u,accept:n},r);a.currentNode=r[0].previousElementSibling;let o=a.nextNode();return o&&T(o,!0),o},focusLast(t={}){let r=e.current,{tabbable:u,accept:n}=t,i=w(r),a=h(i,{tabbable:u,accept:n},r);a.currentNode=r[r.length-1].nextElementSibling;let o=a.previousNode();return o&&T(o,!0),o}}}function w(e){return e[0].parentElement}function S(e){let t=m.getTreeNode(v);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function z(e){if(e.checked)return!0;let t=[];if(!e.form)t=[...d.getOwnerDocument(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)].filter(i=>!i.form);else{var r,u;let i=(u=e.form)===null||u===void 0||(r=u.elements)===null||r===void 0?void 0:r.namedItem(e.name);t=[...i??[]]}return t?!t.some(i=>i.checked):!1}function J(e,t){let r=N.useRef(void 0),u=N.useRef(void 0);d.useLayoutEffect(()=>{let n=e.current;if(!t){u.current&&(cancelAnimationFrame(u.current),u.current=void 0);return}const i=d.getOwnerDocument(n?n[0]:void 0);let a=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!S(e)||l.isComposing)return;let b=d.getActiveElement(i),c=e.current;if(!c||!g(b,c))return;let f=w(c),s=h(f,{tabbable:!0},c);if(!b)return;s.currentNode=b;let p=l.shiftKey?s.previousNode():s.nextNode();p||(s.currentNode=l.shiftKey?c[c.length-1].nextElementSibling:c[0].previousElementSibling,p=l.shiftKey?s.previousNode():s.nextNode()),l.preventDefault(),p&&T(p,!0)},o=l=>{(!v||L(v,e))&&g(d.getEventTarget(l),e.current)?(v=e,r.current=d.getEventTarget(l)):S(e)&&!$(d.getEventTarget(l),e)?r.current?r.current.focus():v&&v.current&&C(v.current):S(e)&&(r.current=d.getEventTarget(l))},E=l=>{u.current&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let b=I.getInteractionModality(),c=(b==="virtual"||b===null)&&d.isAndroid()&&d.isChrome(),f=d.getActiveElement(i);if(!c&&f&&S(e)&&!$(f,e)){v=e;let p=d.getEventTarget(l);if(p&&p.isConnected){var s;r.current=p,(s=r.current)===null||s===void 0||s.focus()}else v.current&&C(v.current)}})};return i.addEventListener("keydown",a,!1),i.addEventListener("focusin",o,!1),n==null||n.forEach(l=>l.addEventListener("focusin",o,!1)),n==null||n.forEach(l=>l.addEventListener("focusout",E,!1)),()=>{i.removeEventListener("keydown",a,!1),i.removeEventListener("focusin",o,!1),n==null||n.forEach(l=>l.removeEventListener("focusin",o,!1)),n==null||n.forEach(l=>l.removeEventListener("focusout",E,!1))}},[e,t]),d.useLayoutEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[u])}function _(e){return $(e)}function g(e,t){return!e||!t?!1:t.some(r=>r.contains(e))}function $(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of m.traverse(m.getTreeNode(t)))if(r&&g(e,r.current))return!0;return!1}function U(e){return $(e,v)}function L(e,t){var r;let u=(r=m.getTreeNode(t))===null||r===void 0?void 0:r.parent;for(;u;){if(u.scopeRef===e)return!0;u=u.parent}return!1}function T(e,t=!1){if(e!=null&&!t)try{K.focusSafely(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function O(e,t=!0){let r=e[0].previousElementSibling,u=w(e),n=h(u,{tabbable:t},e);n.currentNode=r;let i=n.nextNode();return t&&!i&&(u=w(e),n=h(u,{tabbable:!1},e),n.currentNode=r,i=n.nextNode()),i}function C(e,t=!0){T(O(e,t))}function W(e,t){const r=N.useRef(t);N.useEffect(()=>{if(r.current){v=e;const u=d.getOwnerDocument(e.current?e.current[0]:void 0);!g(d.getActiveElement(u),v.current)&&e.current&&C(e.current)}r.current=!1},[e])}function B(e,t,r){d.useLayoutEffect(()=>{if(t||r)return;let u=e.current;const n=d.getOwnerDocument(u?u[0]:void 0);let i=a=>{let o=d.getEventTarget(a);g(o,e.current)?v=e:_(o)||(v=null)};return n.addEventListener("focusin",i,!1),u==null||u.forEach(a=>a.addEventListener("focusin",i,!1)),()=>{n.removeEventListener("focusin",i,!1),u==null||u.forEach(a=>a.removeEventListener("focusin",i,!1))}},[e,t,r])}function k(e){let t=m.getTreeNode(v);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function V(e,t,r){const u=N.useRef(typeof document<"u"?d.getActiveElement(d.getOwnerDocument(e.current?e.current[0]:void 0)):null);d.useLayoutEffect(()=>{let n=e.current;const i=d.getOwnerDocument(n?n[0]:void 0);if(!t||r)return;let a=()=>{(!v||L(v,e))&&g(d.getActiveElement(i),e.current)&&(v=e)};return i.addEventListener("focusin",a,!1),n==null||n.forEach(o=>o.addEventListener("focusin",a,!1)),()=>{i.removeEventListener("focusin",a,!1),n==null||n.forEach(o=>o.removeEventListener("focusin",a,!1))}},[e,r]),d.useLayoutEffect(()=>{const n=d.getOwnerDocument(e.current?e.current[0]:void 0);if(!t)return;let i=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!S(e)||a.isComposing)return;let o=n.activeElement;if(!$(o,e)||!k(e))return;let E=m.getTreeNode(e);if(!E)return;let l=E.nodeToRestore,b=h(n.body,{tabbable:!0});b.currentNode=o;let c=a.shiftKey?b.previousNode():b.nextNode();if((!l||!l.isConnected||l===n.body)&&(l=void 0,E.nodeToRestore=void 0),(!c||!$(c,e))&&l){b.currentNode=l;do c=a.shiftKey?b.previousNode():b.nextNode();while($(c,e));a.preventDefault(),a.stopPropagation(),c?T(c,!0):_(l)?T(l,!0):o.blur()}};return r||n.addEventListener("keydown",i,!0),()=>{r||n.removeEventListener("keydown",i,!0)}},[e,t,r]),d.useLayoutEffect(()=>{const n=d.getOwnerDocument(e.current?e.current[0]:void 0);if(!t)return;let i=m.getTreeNode(e);if(i){var a;return i.nodeToRestore=(a=u.current)!==null&&a!==void 0?a:void 0,()=>{let o=m.getTreeNode(e);if(!o)return;let E=o.nodeToRestore,l=d.getActiveElement(n);if(t&&E&&(l&&$(l,e)||l===n.body&&k(e))){let b=m.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let c=b.getTreeNode(e);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){M(c.nodeToRestore);return}c=c.parent}for(c=b.getTreeNode(e);c;){if(c.scopeRef&&c.scopeRef.current&&m.getTreeNode(c.scopeRef)){let f=O(c.scopeRef.current,!0);M(f);return}c=c.parent}}})}}}},[e,t])}function M(e){e.dispatchEvent(new CustomEvent(R,{bubbles:!0,cancelable:!0}))&&T(e)}function h(e,t,r){let u=t!=null&&t.tabbable?d.isTabbable:d.isFocusable,n=(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null,i=d.getOwnerDocument(n),a=d.createShadowTreeWalker(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var E;return!(t==null||(E=t.from)===null||E===void 0)&&E.contains(o)||t!=null&&t.tabbable&&o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(!z(o)||a.currentNode.tagName==="INPUT"&&a.currentNode.type==="radio"&&a.currentNode.name===o.name)?NodeFilter.FILTER_REJECT:u(o)&&(!r||g(o,r))&&(!(t!=null&&t.accept)||t.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class A{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,r,u){let n=this.fastMap.get(r??null);if(!n)return;let i=new x({scopeRef:t});n.addChild(i),i.parent=n,this.fastMap.set(t,i),u&&(i.nodeToRestore=u)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let r=this.fastMap.get(t);if(!r)return;let u=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&g(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let n=r.children;u&&(u.removeChild(r),n.size>0&&n.forEach(i=>u&&u.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let r of t.children)yield*this.traverse(r)}clone(){var t;let r=new A;var u;for(let n of this.traverse())r.addTreeNode(n.scopeRef,(u=(t=n.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&u!==void 0?u:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new x({scopeRef:null}),this.fastMap.set(null,this.root)}}class x{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let m=new A;exports.FocusScope=P;exports.focusScopeTree=m;exports.getFocusableTreeWalker=h;exports.isElementInChildOfActiveScope=U;
2
2
  //# sourceMappingURL=FocusScope.cjs.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../interactions/dist/useFocusVisible.cjs.js"),f=require("react"),o=require("@react-aria/utils");function E(n,e,t){let{validationBehavior:c,focus:m}=n;o.useLayoutEffect(()=>{if(c==="native"&&(t!=null&&t.current)&&!t.current.disabled){let a=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(a),t.current.hasAttribute("title")||(t.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(h(t.current))}});let r=f.useRef(!1),d=o.useEffectEvent(()=>{r.current||e.resetValidation()}),v=o.useEffectEvent(a=>{var i;e.displayValidation.isInvalid||e.commitValidation();let l=t==null||(i=t.current)===null||i===void 0?void 0:i.form;if(!a.defaultPrevented&&t&&l&&b(l)===t.current){var u;m?m():(u=t.current)===null||u===void 0||u.focus(),g.setInteractionModality("keyboard")}a.preventDefault()}),s=o.useEffectEvent(()=>{e.commitValidation()});f.useEffect(()=>{let a=t==null?void 0:t.current;if(!a)return;let i=a.form,l=i==null?void 0:i.reset;return i&&(i.reset=()=>{r.current=!window.event||window.event.type==="message"&&window.event.target instanceof MessagePort,l==null||l.call(i),r.current=!1}),a.addEventListener("invalid",v),a.addEventListener("change",s),i==null||i.addEventListener("reset",d),()=>{a.removeEventListener("invalid",v),a.removeEventListener("change",s),i==null||i.removeEventListener("reset",d),i&&(i.reset=l)}},[t,v,s,d,c])}function y(n){let e=n.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function h(n){return{isInvalid:!n.validity.valid,validationDetails:y(n),validationErrors:n.validationMessage?[n.validationMessage]:[]}}function b(n){for(let e=0;e<n.elements.length;e++){let t=n.elements[e];if(!t.validity.valid)return t}return null}exports.useFormValidation=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../interactions/dist/useFocusVisible.cjs.js"),f=require("react"),o=require("@react-aria/utils");function E(n,e,t){let{validationBehavior:c,focus:m}=n;o.useLayoutEffect(()=>{if(c==="native"&&(t!=null&&t.current)&&!t.current.disabled){let a=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(a),t.current.hasAttribute("title")||(t.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(h(t.current))}});let r=f.useRef(!1),d=o.useEffectEvent(()=>{r.current||e.resetValidation()}),v=o.useEffectEvent(a=>{var i;e.displayValidation.isInvalid||e.commitValidation();let l=t==null||(i=t.current)===null||i===void 0?void 0:i.form;if(!a.defaultPrevented&&t&&l&&M(l)===t.current){var u;m?m():(u=t.current)===null||u===void 0||u.focus(),g.setInteractionModality("keyboard")}a.preventDefault()}),s=o.useEffectEvent(()=>{e.commitValidation()});f.useEffect(()=>{let a=t==null?void 0:t.current;if(!a)return;let i=a.form,l=i==null?void 0:i.reset;return i&&(i.reset=()=>{r.current=!window.event||window.event.type==="message"&&window.event.target instanceof MessagePort,l==null||l.call(i),r.current=!1}),a.addEventListener("invalid",v),a.addEventListener("change",s),i==null||i.addEventListener("reset",d),()=>{a.removeEventListener("invalid",v),a.removeEventListener("change",s),i==null||i.removeEventListener("reset",d),i&&(i.reset=l)}},[t,v,s,d,c])}function y(n){let e=n.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function h(n){return{isInvalid:!n.validity.valid,validationDetails:y(n),validationErrors:n.validationMessage?[n.validationMessage]:[]}}function M(n){for(let e=0;e<n.elements.length;e++){let t=n.elements[e];if(!t.validity.valid)return t}return null}exports.useFormValidation=E;
2
2
  //# sourceMappingURL=useFormValidation.cjs.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./useDefaultLocale.cjs.js"),e=require("react"),a=e.createContext(null);function c(){let t=o.useDefaultLocale();return e.useContext(a)||t}exports.useLocale=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./useDefaultLocale.cjs.js"),e=require("react"),c=e.createContext(null);function f(){let t=o.useDefaultLocale();return e.useContext(c)||t}exports.useLocale=f;
2
2
  //# sourceMappingURL=context.cjs.js.map
@@ -1,9 +1,9 @@
1
1
  import { useDefaultLocale as t } from "./useDefaultLocale.es.js";
2
- import a, { useContext as f } from "react";
3
- const o = /* @__PURE__ */ a.createContext(null);
2
+ import f, { useContext as o } from "react";
3
+ const a = /* @__PURE__ */ f.createContext(null);
4
4
  function $() {
5
5
  let e = t();
6
- return f(o) || e;
6
+ return o(a) || e;
7
7
  }
8
8
  export {
9
9
  $ as useLocale
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./utils.cjs.js"),a=require("react"),r=require("@react-aria/utils");function m(b){let{isDisabled:v,onBlurWithin:u,onFocusWithin:s,onFocusWithinChange:t}=b,n=a.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:f}=r.useGlobalListeners(),i=a.useCallback(e=>{e.currentTarget.contains(e.target)&&n.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(n.current.isFocusWithin=!1,f(),u&&u(e),t&&t(!1))},[u,t,n,f]),g=c.useSyntheticBlurEvent(i),W=a.useCallback(e=>{if(!e.currentTarget.contains(e.target))return;const o=r.getOwnerDocument(e.target),T=r.getActiveElement(o);if(!n.current.isFocusWithin&&T===r.getEventTarget(e.nativeEvent)){s&&s(e),t&&t(!0),n.current.isFocusWithin=!0,g(e);let h=e.currentTarget;l(o,"focus",d=>{if(n.current.isFocusWithin&&!r.nodeContains(h,d.target)){let F=new o.defaultView.FocusEvent("blur",{relatedTarget:d.target});c.setEventTarget(F,h);let E=c.createSyntheticEvent(F);i(E)}},{capture:!0})}},[s,t,g,l,i]);return v?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:W,onBlur:i}}}exports.useFocusWithin=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./utils.cjs.js"),a=require("react"),r=require("@react-aria/utils");function m(v){let{isDisabled:W,onBlurWithin:u,onFocusWithin:s,onFocusWithinChange:t}=v,n=a.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:f}=r.useGlobalListeners(),i=a.useCallback(e=>{e.currentTarget.contains(e.target)&&n.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(n.current.isFocusWithin=!1,f(),u&&u(e),t&&t(!1))},[u,t,n,f]),g=c.useSyntheticBlurEvent(i),b=a.useCallback(e=>{if(!e.currentTarget.contains(e.target))return;const o=r.getOwnerDocument(e.target),T=r.getActiveElement(o);if(!n.current.isFocusWithin&&T===r.getEventTarget(e.nativeEvent)){s&&s(e),t&&t(!0),n.current.isFocusWithin=!0,g(e);let h=e.currentTarget;l(o,"focus",d=>{if(n.current.isFocusWithin&&!r.nodeContains(h,d.target)){let F=new o.defaultView.FocusEvent("blur",{relatedTarget:d.target});c.setEventTarget(F,h);let E=c.createSyntheticEvent(F);i(E)}},{capture:!0})}},[s,t,g,l,i]);return W?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:b,onBlur:i}}}exports.useFocusWithin=m;
2
2
  //# sourceMappingURL=useFocusWithin.cjs.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./focusSafely.cjs.js"),d=require("./useFocus.cjs.js"),P=require("./useKeyboard.cjs.js"),c=require("@react-aria/utils"),r=require("react");let a=r.createContext(null);function $(e){let t=r.useContext(a)||{};c.useSyncRef(t,e);let{ref:u,...o}=t;return o}const x=r.forwardRef(function(t,u){let{children:o,...s}=t,n=c.useObjectRef(u),f={...s,ref:n};return r.createElement(a.Provider,{value:f},o)});function F(e,t){let{focusProps:u}=d.useFocus(e),{keyboardProps:o}=P.useKeyboard(e),s=c.mergeProps(u,o),n=$(t),f=e.isDisabled?{}:n,l=r.useRef(e.autoFocus);r.useEffect(()=>{l.current&&t.current&&b.focusSafely(t.current),l.current=!1},[t]);let i=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(i=void 0),{focusableProps:c.mergeProps({...s,tabIndex:i},f)}}exports.FocusableContext=a;exports.FocusableProvider=x;exports.useFocusable=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./focusSafely.cjs.js"),d=require("./useFocus.cjs.js"),P=require("./useKeyboard.cjs.js"),o=require("@react-aria/utils"),r=require("react");let a=r.createContext(null);function $(e){let t=r.useContext(a)||{};o.useSyncRef(t,e);let{ref:s,...u}=t;return u}function x(e,t){let{focusProps:s}=d.useFocus(e),{keyboardProps:u}=P.useKeyboard(e),f=o.mergeProps(s,u),l=$(t),i=e.isDisabled?{}:l,c=r.useRef(e.autoFocus);r.useEffect(()=>{c.current&&t.current&&b.focusSafely(t.current),c.current=!1},[t]);let n=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(n=void 0),{focusableProps:o.mergeProps({...f,tabIndex:n},i)}}exports.FocusableContext=a;exports.useFocusable=x;
2
2
  //# sourceMappingURL=useFocusable.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusable.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusable.mjs"],"sourcesContent":["import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {useFocus as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6} from \"./useFocus.mjs\";\nimport {useKeyboard as $46d819fcbaf35654$export$8f71654801c2f7cd} from \"./useKeyboard.mjs\";\nimport {useSyncRef as $fcPuG$useSyncRef, useObjectRef as $fcPuG$useObjectRef, mergeProps as $fcPuG$mergeProps, getOwnerWindow as $fcPuG$getOwnerWindow, isFocusable as $fcPuG$isFocusable, mergeRefs as $fcPuG$mergeRefs} from \"@react-aria/utils\";\nimport $fcPuG$react, {useContext as $fcPuG$useContext, useRef as $fcPuG$useRef, useEffect as $fcPuG$useEffect, forwardRef as $fcPuG$forwardRef} from \"react\";\n\n/*\n * Copyright 2020 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\n\n\n\nlet $f645667febf57a63$export$f9762fab77588ecb = /*#__PURE__*/ (0, $fcPuG$react).createContext(null);\nfunction $f645667febf57a63$var$useFocusableContext(ref) {\n let context = (0, $fcPuG$useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};\n (0, $fcPuG$useSyncRef)(context, ref);\n // eslint-disable-next-line\n let { ref: _, ...otherProps } = context;\n return otherProps;\n}\nconst $f645667febf57a63$export$13f3202a3e5ddd5 = /*#__PURE__*/ (0, $fcPuG$react).forwardRef(function FocusableProvider(props, ref) {\n let { children: children, ...otherProps } = props;\n let objRef = (0, $fcPuG$useObjectRef)(ref);\n let context = {\n ...otherProps,\n ref: objRef\n };\n return /*#__PURE__*/ (0, $fcPuG$react).createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {\n value: context\n }, children);\n});\nfunction $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {\n let { focusProps: focusProps } = (0, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);\n let { keyboardProps: keyboardProps } = (0, $46d819fcbaf35654$export$8f71654801c2f7cd)(props);\n let interactions = (0, $fcPuG$mergeProps)(focusProps, keyboardProps);\n let domProps = $f645667febf57a63$var$useFocusableContext(domRef);\n let interactionProps = props.isDisabled ? {} : domProps;\n let autoFocusRef = (0, $fcPuG$useRef)(props.autoFocus);\n (0, $fcPuG$useEffect)(()=>{\n if (autoFocusRef.current && domRef.current) (0, $3ad3f6e1647bc98d$export$80f3e147d781571c)(domRef.current);\n autoFocusRef.current = false;\n }, [\n domRef\n ]);\n // Always set a tabIndex so that Safari allows focusing native buttons and inputs.\n let tabIndex = props.excludeFromTabOrder ? -1 : 0;\n if (props.isDisabled) tabIndex = undefined;\n return {\n focusableProps: (0, $fcPuG$mergeProps)({\n ...interactions,\n tabIndex: tabIndex\n }, interactionProps)\n };\n}\nconst $f645667febf57a63$export$35a3bebf7ef2d934 = /*#__PURE__*/ (0, $fcPuG$forwardRef)(({ children: children, ...props }, ref)=>{\n ref = (0, $fcPuG$useObjectRef)(ref);\n let { focusableProps: focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);\n let child = (0, $fcPuG$react).Children.only(children);\n (0, $fcPuG$useEffect)(()=>{\n if (process.env.NODE_ENV === 'production') return;\n let el = ref.current;\n if (!el || !(el instanceof (0, $fcPuG$getOwnerWindow)(el).Element)) {\n console.error('<Focusable> child must forward its ref to a DOM element.');\n return;\n }\n if (!props.isDisabled && !(0, $fcPuG$isFocusable)(el)) {\n console.warn('<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.');\n return;\n }\n if (el.localName !== 'button' && el.localName !== 'input' && el.localName !== 'select' && el.localName !== 'textarea' && el.localName !== 'a' && el.localName !== 'area' && el.localName !== 'summary' && el.localName !== 'img' && el.localName !== 'svg') {\n let role = el.getAttribute('role');\n if (!role) console.warn('<Focusable> child must have an interactive ARIA role.');\n else if (// https://w3c.github.io/aria/#widget_roles\n role !== 'application' && role !== 'button' && role !== 'checkbox' && role !== 'combobox' && role !== 'gridcell' && role !== 'link' && role !== 'menuitem' && role !== 'menuitemcheckbox' && role !== 'menuitemradio' && role !== 'option' && role !== 'radio' && role !== 'searchbox' && role !== 'separator' && role !== 'slider' && role !== 'spinbutton' && role !== 'switch' && role !== 'tab' && role !== 'tabpanel' && role !== 'textbox' && role !== 'treeitem' && // aria-describedby is also announced on these roles\n role !== 'img' && role !== 'meter' && role !== 'progressbar') console.warn(`<Focusable> child must have an interactive ARIA role. Got \"${role}\".`);\n }\n }, [\n ref,\n props.isDisabled\n ]);\n // @ts-ignore\n let childRef = parseInt((0, $fcPuG$react).version, 10) < 19 ? child.ref : child.props.ref;\n return /*#__PURE__*/ (0, $fcPuG$react).cloneElement(child, {\n ...(0, $fcPuG$mergeProps)(focusableProps, child.props),\n // @ts-ignore\n ref: (0, $fcPuG$mergeRefs)(childRef, ref)\n });\n});\n\n\nexport {$f645667febf57a63$export$f9762fab77588ecb as FocusableContext, $f645667febf57a63$export$13f3202a3e5ddd5 as FocusableProvider, $f645667febf57a63$export$4c014de7c8940b4c as useFocusable, $f645667febf57a63$export$35a3bebf7ef2d934 as Focusable};\n//# sourceMappingURL=useFocusable.module.js.map\n"],"names":["$f645667febf57a63$export$f9762fab77588ecb","$fcPuG$react","$f645667febf57a63$var$useFocusableContext","ref","context","$fcPuG$useContext","$fcPuG$useSyncRef","_","otherProps","$f645667febf57a63$export$13f3202a3e5ddd5","props","children","objRef","$fcPuG$useObjectRef","$f645667febf57a63$export$4c014de7c8940b4c","domRef","focusProps","$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","keyboardProps","$46d819fcbaf35654$export$8f71654801c2f7cd","interactions","$fcPuG$mergeProps","domProps","interactionProps","autoFocusRef","$fcPuG$useRef","$fcPuG$useEffect","$3ad3f6e1647bc98d$export$80f3e147d781571c","tabIndex"],"mappings":"2OAqBG,IAACA,EAA8DC,EAAc,cAAc,IAAI,EAClG,SAASC,EAA0CC,EAAK,CACpD,IAAIC,EAAcC,EAAAA,WAAmBL,CAAyC,GAAK,CAAA,EAC/EM,EAAiB,WAAEF,EAASD,CAAG,EAEnC,GAAI,CAAE,IAAKI,EAAG,GAAGC,CAAU,EAAKJ,EAChC,OAAOI,CACX,CACK,MAACC,EAA6DR,EAAc,WAAW,SAA2BS,EAAOP,EAAK,CAC/H,GAAI,CAAE,SAAUQ,EAAU,GAAGH,CAAU,EAAKE,EACxCE,EAAaC,eAAqBV,CAAG,EACrCC,EAAU,CACV,GAAGI,EACH,IAAKI,CACb,EACI,OAAyBX,EAAc,cAAcD,EAA0C,SAAU,CACrG,MAAOI,CACV,EAAEO,CAAQ,CACf,CAAC,EACD,SAASG,EAA0CJ,EAAOK,EAAQ,CAC9D,GAAI,CAAE,WAAYC,CAAU,EAASC,EAAyC,SAAEP,CAAK,EACjF,CAAE,cAAeQ,CAAa,EAASC,EAAyC,YAAET,CAAK,EACvFU,EAAmBC,EAAAA,WAAmBL,EAAYE,CAAa,EAC/DI,EAAWpB,EAA0Ca,CAAM,EAC3DQ,EAAmBb,EAAM,WAAa,CAAA,EAAKY,EAC3CE,EAAmBC,EAAAA,OAAef,EAAM,SAAS,EACjDgB,EAAgB,UAAE,IAAI,CAClBF,EAAa,SAAWT,EAAO,SAAaY,cAA2CZ,EAAO,OAAO,EACzGS,EAAa,QAAU,EAC/B,EAAO,CACCT,CACR,CAAK,EAED,IAAIa,EAAWlB,EAAM,oBAAsB,GAAK,EAChD,OAAIA,EAAM,aAAYkB,EAAW,QAC1B,CACH,eAAoBP,EAAAA,WAAmB,CACnC,GAAGD,EACH,SAAUQ,CACb,EAAEL,CAAgB,CAC3B,CACA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocusable.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusable.mjs"],"sourcesContent":["import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {useFocus as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6} from \"./useFocus.mjs\";\nimport {useKeyboard as $46d819fcbaf35654$export$8f71654801c2f7cd} from \"./useKeyboard.mjs\";\nimport {useSyncRef as $fcPuG$useSyncRef, useObjectRef as $fcPuG$useObjectRef, mergeProps as $fcPuG$mergeProps, getOwnerWindow as $fcPuG$getOwnerWindow, isFocusable as $fcPuG$isFocusable, mergeRefs as $fcPuG$mergeRefs} from \"@react-aria/utils\";\nimport $fcPuG$react, {useContext as $fcPuG$useContext, useRef as $fcPuG$useRef, useEffect as $fcPuG$useEffect, forwardRef as $fcPuG$forwardRef} from \"react\";\n\n/*\n * Copyright 2020 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\n\n\n\nlet $f645667febf57a63$export$f9762fab77588ecb = /*#__PURE__*/ (0, $fcPuG$react).createContext(null);\nfunction $f645667febf57a63$var$useFocusableContext(ref) {\n let context = (0, $fcPuG$useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};\n (0, $fcPuG$useSyncRef)(context, ref);\n // eslint-disable-next-line\n let { ref: _, ...otherProps } = context;\n return otherProps;\n}\nconst $f645667febf57a63$export$13f3202a3e5ddd5 = /*#__PURE__*/ (0, $fcPuG$react).forwardRef(function FocusableProvider(props, ref) {\n let { children: children, ...otherProps } = props;\n let objRef = (0, $fcPuG$useObjectRef)(ref);\n let context = {\n ...otherProps,\n ref: objRef\n };\n return /*#__PURE__*/ (0, $fcPuG$react).createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {\n value: context\n }, children);\n});\nfunction $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {\n let { focusProps: focusProps } = (0, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);\n let { keyboardProps: keyboardProps } = (0, $46d819fcbaf35654$export$8f71654801c2f7cd)(props);\n let interactions = (0, $fcPuG$mergeProps)(focusProps, keyboardProps);\n let domProps = $f645667febf57a63$var$useFocusableContext(domRef);\n let interactionProps = props.isDisabled ? {} : domProps;\n let autoFocusRef = (0, $fcPuG$useRef)(props.autoFocus);\n (0, $fcPuG$useEffect)(()=>{\n if (autoFocusRef.current && domRef.current) (0, $3ad3f6e1647bc98d$export$80f3e147d781571c)(domRef.current);\n autoFocusRef.current = false;\n }, [\n domRef\n ]);\n // Always set a tabIndex so that Safari allows focusing native buttons and inputs.\n let tabIndex = props.excludeFromTabOrder ? -1 : 0;\n if (props.isDisabled) tabIndex = undefined;\n return {\n focusableProps: (0, $fcPuG$mergeProps)({\n ...interactions,\n tabIndex: tabIndex\n }, interactionProps)\n };\n}\nconst $f645667febf57a63$export$35a3bebf7ef2d934 = /*#__PURE__*/ (0, $fcPuG$forwardRef)(({ children: children, ...props }, ref)=>{\n ref = (0, $fcPuG$useObjectRef)(ref);\n let { focusableProps: focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);\n let child = (0, $fcPuG$react).Children.only(children);\n (0, $fcPuG$useEffect)(()=>{\n if (process.env.NODE_ENV === 'production') return;\n let el = ref.current;\n if (!el || !(el instanceof (0, $fcPuG$getOwnerWindow)(el).Element)) {\n console.error('<Focusable> child must forward its ref to a DOM element.');\n return;\n }\n if (!props.isDisabled && !(0, $fcPuG$isFocusable)(el)) {\n console.warn('<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.');\n return;\n }\n if (el.localName !== 'button' && el.localName !== 'input' && el.localName !== 'select' && el.localName !== 'textarea' && el.localName !== 'a' && el.localName !== 'area' && el.localName !== 'summary' && el.localName !== 'img' && el.localName !== 'svg') {\n let role = el.getAttribute('role');\n if (!role) console.warn('<Focusable> child must have an interactive ARIA role.');\n else if (// https://w3c.github.io/aria/#widget_roles\n role !== 'application' && role !== 'button' && role !== 'checkbox' && role !== 'combobox' && role !== 'gridcell' && role !== 'link' && role !== 'menuitem' && role !== 'menuitemcheckbox' && role !== 'menuitemradio' && role !== 'option' && role !== 'radio' && role !== 'searchbox' && role !== 'separator' && role !== 'slider' && role !== 'spinbutton' && role !== 'switch' && role !== 'tab' && role !== 'tabpanel' && role !== 'textbox' && role !== 'treeitem' && // aria-describedby is also announced on these roles\n role !== 'img' && role !== 'meter' && role !== 'progressbar') console.warn(`<Focusable> child must have an interactive ARIA role. Got \"${role}\".`);\n }\n }, [\n ref,\n props.isDisabled\n ]);\n // @ts-ignore\n let childRef = parseInt((0, $fcPuG$react).version, 10) < 19 ? child.ref : child.props.ref;\n return /*#__PURE__*/ (0, $fcPuG$react).cloneElement(child, {\n ...(0, $fcPuG$mergeProps)(focusableProps, child.props),\n // @ts-ignore\n ref: (0, $fcPuG$mergeRefs)(childRef, ref)\n });\n});\n\n\nexport {$f645667febf57a63$export$f9762fab77588ecb as FocusableContext, $f645667febf57a63$export$13f3202a3e5ddd5 as FocusableProvider, $f645667febf57a63$export$4c014de7c8940b4c as useFocusable, $f645667febf57a63$export$35a3bebf7ef2d934 as Focusable};\n//# sourceMappingURL=useFocusable.module.js.map\n"],"names":["$f645667febf57a63$export$f9762fab77588ecb","$fcPuG$react","$f645667febf57a63$var$useFocusableContext","ref","context","$fcPuG$useContext","$fcPuG$useSyncRef","_","otherProps","$f645667febf57a63$export$4c014de7c8940b4c","props","domRef","focusProps","$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","keyboardProps","$46d819fcbaf35654$export$8f71654801c2f7cd","interactions","$fcPuG$mergeProps","domProps","interactionProps","autoFocusRef","$fcPuG$useRef","$fcPuG$useEffect","$3ad3f6e1647bc98d$export$80f3e147d781571c","tabIndex"],"mappings":"2OAqBG,IAACA,EAA8DC,EAAc,cAAc,IAAI,EAClG,SAASC,EAA0CC,EAAK,CACpD,IAAIC,EAAcC,EAAAA,WAAmBL,CAAyC,GAAK,CAAA,EAC/EM,EAAiB,WAAEF,EAASD,CAAG,EAEnC,GAAI,CAAE,IAAKI,EAAG,GAAGC,CAAU,EAAKJ,EAChC,OAAOI,CACX,CAYA,SAASC,EAA0CC,EAAOC,EAAQ,CAC9D,GAAI,CAAE,WAAYC,CAAU,EAASC,EAAyC,SAAEH,CAAK,EACjF,CAAE,cAAeI,CAAa,EAASC,EAAyC,YAAEL,CAAK,EACvFM,EAAmBC,EAAAA,WAAmBL,EAAYE,CAAa,EAC/DI,EAAWhB,EAA0CS,CAAM,EAC3DQ,EAAmBT,EAAM,WAAa,CAAA,EAAKQ,EAC3CE,EAAmBC,EAAAA,OAAeX,EAAM,SAAS,EACjDY,EAAgB,UAAE,IAAI,CAClBF,EAAa,SAAWT,EAAO,SAAaY,cAA2CZ,EAAO,OAAO,EACzGS,EAAa,QAAU,EAC/B,EAAO,CACCT,CACR,CAAK,EAED,IAAIa,EAAWd,EAAM,oBAAsB,GAAK,EAChD,OAAIA,EAAM,aAAYc,EAAW,QAC1B,CACH,eAAoBP,EAAAA,WAAmB,CACnC,GAAGD,EACH,SAAUQ,CACb,EAAEL,CAAgB,CAC3B,CACA","x_google_ignoreList":[0]}
@@ -1,42 +1,32 @@
1
- import { focusSafely as b } from "./focusSafely.es.js";
2
- import { useFocus as i } from "./useFocus.es.js";
3
- import { useKeyboard as $ } from "./useKeyboard.es.js";
4
- import { useObjectRef as x, mergeProps as d, useSyncRef as P } from "@react-aria/utils";
5
- import s, { useRef as p, useEffect as m, useContext as F } from "react";
6
- let l = /* @__PURE__ */ s.createContext(null);
7
- function v(e) {
8
- let t = F(l) || {};
9
- P(t, e);
1
+ import { focusSafely as d } from "./focusSafely.es.js";
2
+ import { useFocus as l } from "./useFocus.es.js";
3
+ import { useKeyboard as b } from "./useKeyboard.es.js";
4
+ import { mergeProps as c, useSyncRef as $ } from "@react-aria/utils";
5
+ import i, { useRef as x, useEffect as m, useContext as p } from "react";
6
+ let P = /* @__PURE__ */ i.createContext(null);
7
+ function F(e) {
8
+ let t = p(P) || {};
9
+ $(t, e);
10
10
  let { ref: o, ...r } = t;
11
11
  return r;
12
12
  }
13
- const j = /* @__PURE__ */ s.forwardRef(function(t, o) {
14
- let { children: r, ...f } = t, a = x(o), c = {
15
- ...f,
16
- ref: a
17
- };
18
- return /* @__PURE__ */ s.createElement(l.Provider, {
19
- value: c
20
- }, r);
21
- });
22
- function k(e, t) {
23
- let { focusProps: o } = i(e), { keyboardProps: r } = $(e), f = d(o, r), a = v(t), c = e.isDisabled ? {} : a, u = p(e.autoFocus);
13
+ function I(e, t) {
14
+ let { focusProps: o } = l(e), { keyboardProps: r } = b(e), s = c(o, r), u = F(t), n = e.isDisabled ? {} : u, f = x(e.autoFocus);
24
15
  m(() => {
25
- u.current && t.current && b(t.current), u.current = !1;
16
+ f.current && t.current && d(t.current), f.current = !1;
26
17
  }, [
27
18
  t
28
19
  ]);
29
- let n = e.excludeFromTabOrder ? -1 : 0;
30
- return e.isDisabled && (n = void 0), {
31
- focusableProps: d({
32
- ...f,
33
- tabIndex: n
34
- }, c)
20
+ let a = e.excludeFromTabOrder ? -1 : 0;
21
+ return e.isDisabled && (a = void 0), {
22
+ focusableProps: c({
23
+ ...s,
24
+ tabIndex: a
25
+ }, n)
35
26
  };
36
27
  }
37
28
  export {
38
- l as FocusableContext,
39
- j as FocusableProvider,
40
- k as useFocusable
29
+ P as FocusableContext,
30
+ I as useFocusable
41
31
  };
42
32
  //# sourceMappingURL=useFocusable.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusable.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusable.mjs"],"sourcesContent":["import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {useFocus as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6} from \"./useFocus.mjs\";\nimport {useKeyboard as $46d819fcbaf35654$export$8f71654801c2f7cd} from \"./useKeyboard.mjs\";\nimport {useSyncRef as $fcPuG$useSyncRef, useObjectRef as $fcPuG$useObjectRef, mergeProps as $fcPuG$mergeProps, getOwnerWindow as $fcPuG$getOwnerWindow, isFocusable as $fcPuG$isFocusable, mergeRefs as $fcPuG$mergeRefs} from \"@react-aria/utils\";\nimport $fcPuG$react, {useContext as $fcPuG$useContext, useRef as $fcPuG$useRef, useEffect as $fcPuG$useEffect, forwardRef as $fcPuG$forwardRef} from \"react\";\n\n/*\n * Copyright 2020 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\n\n\n\nlet $f645667febf57a63$export$f9762fab77588ecb = /*#__PURE__*/ (0, $fcPuG$react).createContext(null);\nfunction $f645667febf57a63$var$useFocusableContext(ref) {\n let context = (0, $fcPuG$useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};\n (0, $fcPuG$useSyncRef)(context, ref);\n // eslint-disable-next-line\n let { ref: _, ...otherProps } = context;\n return otherProps;\n}\nconst $f645667febf57a63$export$13f3202a3e5ddd5 = /*#__PURE__*/ (0, $fcPuG$react).forwardRef(function FocusableProvider(props, ref) {\n let { children: children, ...otherProps } = props;\n let objRef = (0, $fcPuG$useObjectRef)(ref);\n let context = {\n ...otherProps,\n ref: objRef\n };\n return /*#__PURE__*/ (0, $fcPuG$react).createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {\n value: context\n }, children);\n});\nfunction $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {\n let { focusProps: focusProps } = (0, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);\n let { keyboardProps: keyboardProps } = (0, $46d819fcbaf35654$export$8f71654801c2f7cd)(props);\n let interactions = (0, $fcPuG$mergeProps)(focusProps, keyboardProps);\n let domProps = $f645667febf57a63$var$useFocusableContext(domRef);\n let interactionProps = props.isDisabled ? {} : domProps;\n let autoFocusRef = (0, $fcPuG$useRef)(props.autoFocus);\n (0, $fcPuG$useEffect)(()=>{\n if (autoFocusRef.current && domRef.current) (0, $3ad3f6e1647bc98d$export$80f3e147d781571c)(domRef.current);\n autoFocusRef.current = false;\n }, [\n domRef\n ]);\n // Always set a tabIndex so that Safari allows focusing native buttons and inputs.\n let tabIndex = props.excludeFromTabOrder ? -1 : 0;\n if (props.isDisabled) tabIndex = undefined;\n return {\n focusableProps: (0, $fcPuG$mergeProps)({\n ...interactions,\n tabIndex: tabIndex\n }, interactionProps)\n };\n}\nconst $f645667febf57a63$export$35a3bebf7ef2d934 = /*#__PURE__*/ (0, $fcPuG$forwardRef)(({ children: children, ...props }, ref)=>{\n ref = (0, $fcPuG$useObjectRef)(ref);\n let { focusableProps: focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);\n let child = (0, $fcPuG$react).Children.only(children);\n (0, $fcPuG$useEffect)(()=>{\n if (process.env.NODE_ENV === 'production') return;\n let el = ref.current;\n if (!el || !(el instanceof (0, $fcPuG$getOwnerWindow)(el).Element)) {\n console.error('<Focusable> child must forward its ref to a DOM element.');\n return;\n }\n if (!props.isDisabled && !(0, $fcPuG$isFocusable)(el)) {\n console.warn('<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.');\n return;\n }\n if (el.localName !== 'button' && el.localName !== 'input' && el.localName !== 'select' && el.localName !== 'textarea' && el.localName !== 'a' && el.localName !== 'area' && el.localName !== 'summary' && el.localName !== 'img' && el.localName !== 'svg') {\n let role = el.getAttribute('role');\n if (!role) console.warn('<Focusable> child must have an interactive ARIA role.');\n else if (// https://w3c.github.io/aria/#widget_roles\n role !== 'application' && role !== 'button' && role !== 'checkbox' && role !== 'combobox' && role !== 'gridcell' && role !== 'link' && role !== 'menuitem' && role !== 'menuitemcheckbox' && role !== 'menuitemradio' && role !== 'option' && role !== 'radio' && role !== 'searchbox' && role !== 'separator' && role !== 'slider' && role !== 'spinbutton' && role !== 'switch' && role !== 'tab' && role !== 'tabpanel' && role !== 'textbox' && role !== 'treeitem' && // aria-describedby is also announced on these roles\n role !== 'img' && role !== 'meter' && role !== 'progressbar') console.warn(`<Focusable> child must have an interactive ARIA role. Got \"${role}\".`);\n }\n }, [\n ref,\n props.isDisabled\n ]);\n // @ts-ignore\n let childRef = parseInt((0, $fcPuG$react).version, 10) < 19 ? child.ref : child.props.ref;\n return /*#__PURE__*/ (0, $fcPuG$react).cloneElement(child, {\n ...(0, $fcPuG$mergeProps)(focusableProps, child.props),\n // @ts-ignore\n ref: (0, $fcPuG$mergeRefs)(childRef, ref)\n });\n});\n\n\nexport {$f645667febf57a63$export$f9762fab77588ecb as FocusableContext, $f645667febf57a63$export$13f3202a3e5ddd5 as FocusableProvider, $f645667febf57a63$export$4c014de7c8940b4c as useFocusable, $f645667febf57a63$export$35a3bebf7ef2d934 as Focusable};\n//# sourceMappingURL=useFocusable.module.js.map\n"],"names":["$f645667febf57a63$export$f9762fab77588ecb","$fcPuG$react","$f645667febf57a63$var$useFocusableContext","ref","context","$fcPuG$useContext","$fcPuG$useSyncRef","_","otherProps","$f645667febf57a63$export$13f3202a3e5ddd5","props","children","objRef","$fcPuG$useObjectRef","$f645667febf57a63$export$4c014de7c8940b4c","domRef","focusProps","$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","keyboardProps","$46d819fcbaf35654$export$8f71654801c2f7cd","interactions","$fcPuG$mergeProps","domProps","interactionProps","autoFocusRef","$fcPuG$useRef","$fcPuG$useEffect","$3ad3f6e1647bc98d$export$80f3e147d781571c","tabIndex"],"mappings":";;;;;AAqBG,IAACA,IAA8DC,gBAAAA,EAAc,cAAc,IAAI;AAClG,SAASC,EAA0CC,GAAK;AACpD,MAAIC,IAAcC,EAAmBL,CAAyC,KAAK,CAAA;AACnF,EAAIM,EAAmBF,GAASD,CAAG;AAEnC,MAAI,EAAE,KAAKI,GAAG,GAAGC,EAAU,IAAKJ;AAChC,SAAOI;AACX;AACK,MAACC,IAA6DR,gBAAAA,EAAc,WAAW,SAA2BS,GAAOP,GAAK;AAC/H,MAAI,EAAE,UAAUQ,GAAU,GAAGH,EAAU,IAAKE,GACxCE,IAAaC,EAAqBV,CAAG,GACrCC,IAAU;AAAA,IACV,GAAGI;AAAA,IACH,KAAKI;AAAA,EACb;AACI,SAAyBX,gBAAAA,EAAc,cAAcD,EAA0C,UAAU;AAAA,IACrG,OAAOI;AAAA,EACV,GAAEO,CAAQ;AACf,CAAC;AACD,SAASG,EAA0CJ,GAAOK,GAAQ;AAC9D,MAAI,EAAE,YAAYC,EAAU,IAASC,EAA2CP,CAAK,GACjF,EAAE,eAAeQ,EAAa,IAASC,EAA2CT,CAAK,GACvFU,IAAmBC,EAAmBL,GAAYE,CAAa,GAC/DI,IAAWpB,EAA0Ca,CAAM,GAC3DQ,IAAmBb,EAAM,aAAa,CAAA,IAAKY,GAC3CE,IAAmBC,EAAef,EAAM,SAAS;AACrD,EAAIgB,EAAkB,MAAI;AACtB,IAAIF,EAAa,WAAWT,EAAO,WAAaY,EAA2CZ,EAAO,OAAO,GACzGS,EAAa,UAAU;AAAA,EAC/B,GAAO;AAAA,IACCT;AAAA,EACR,CAAK;AAED,MAAIa,IAAWlB,EAAM,sBAAsB,KAAK;AAChD,SAAIA,EAAM,eAAYkB,IAAW,SAC1B;AAAA,IACH,gBAAoBP,EAAmB;AAAA,MACnC,GAAGD;AAAA,MACH,UAAUQ;AAAA,IACb,GAAEL,CAAgB;AAAA,EAC3B;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocusable.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusable.mjs"],"sourcesContent":["import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {useFocus as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6} from \"./useFocus.mjs\";\nimport {useKeyboard as $46d819fcbaf35654$export$8f71654801c2f7cd} from \"./useKeyboard.mjs\";\nimport {useSyncRef as $fcPuG$useSyncRef, useObjectRef as $fcPuG$useObjectRef, mergeProps as $fcPuG$mergeProps, getOwnerWindow as $fcPuG$getOwnerWindow, isFocusable as $fcPuG$isFocusable, mergeRefs as $fcPuG$mergeRefs} from \"@react-aria/utils\";\nimport $fcPuG$react, {useContext as $fcPuG$useContext, useRef as $fcPuG$useRef, useEffect as $fcPuG$useEffect, forwardRef as $fcPuG$forwardRef} from \"react\";\n\n/*\n * Copyright 2020 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\n\n\n\nlet $f645667febf57a63$export$f9762fab77588ecb = /*#__PURE__*/ (0, $fcPuG$react).createContext(null);\nfunction $f645667febf57a63$var$useFocusableContext(ref) {\n let context = (0, $fcPuG$useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};\n (0, $fcPuG$useSyncRef)(context, ref);\n // eslint-disable-next-line\n let { ref: _, ...otherProps } = context;\n return otherProps;\n}\nconst $f645667febf57a63$export$13f3202a3e5ddd5 = /*#__PURE__*/ (0, $fcPuG$react).forwardRef(function FocusableProvider(props, ref) {\n let { children: children, ...otherProps } = props;\n let objRef = (0, $fcPuG$useObjectRef)(ref);\n let context = {\n ...otherProps,\n ref: objRef\n };\n return /*#__PURE__*/ (0, $fcPuG$react).createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {\n value: context\n }, children);\n});\nfunction $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {\n let { focusProps: focusProps } = (0, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);\n let { keyboardProps: keyboardProps } = (0, $46d819fcbaf35654$export$8f71654801c2f7cd)(props);\n let interactions = (0, $fcPuG$mergeProps)(focusProps, keyboardProps);\n let domProps = $f645667febf57a63$var$useFocusableContext(domRef);\n let interactionProps = props.isDisabled ? {} : domProps;\n let autoFocusRef = (0, $fcPuG$useRef)(props.autoFocus);\n (0, $fcPuG$useEffect)(()=>{\n if (autoFocusRef.current && domRef.current) (0, $3ad3f6e1647bc98d$export$80f3e147d781571c)(domRef.current);\n autoFocusRef.current = false;\n }, [\n domRef\n ]);\n // Always set a tabIndex so that Safari allows focusing native buttons and inputs.\n let tabIndex = props.excludeFromTabOrder ? -1 : 0;\n if (props.isDisabled) tabIndex = undefined;\n return {\n focusableProps: (0, $fcPuG$mergeProps)({\n ...interactions,\n tabIndex: tabIndex\n }, interactionProps)\n };\n}\nconst $f645667febf57a63$export$35a3bebf7ef2d934 = /*#__PURE__*/ (0, $fcPuG$forwardRef)(({ children: children, ...props }, ref)=>{\n ref = (0, $fcPuG$useObjectRef)(ref);\n let { focusableProps: focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);\n let child = (0, $fcPuG$react).Children.only(children);\n (0, $fcPuG$useEffect)(()=>{\n if (process.env.NODE_ENV === 'production') return;\n let el = ref.current;\n if (!el || !(el instanceof (0, $fcPuG$getOwnerWindow)(el).Element)) {\n console.error('<Focusable> child must forward its ref to a DOM element.');\n return;\n }\n if (!props.isDisabled && !(0, $fcPuG$isFocusable)(el)) {\n console.warn('<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.');\n return;\n }\n if (el.localName !== 'button' && el.localName !== 'input' && el.localName !== 'select' && el.localName !== 'textarea' && el.localName !== 'a' && el.localName !== 'area' && el.localName !== 'summary' && el.localName !== 'img' && el.localName !== 'svg') {\n let role = el.getAttribute('role');\n if (!role) console.warn('<Focusable> child must have an interactive ARIA role.');\n else if (// https://w3c.github.io/aria/#widget_roles\n role !== 'application' && role !== 'button' && role !== 'checkbox' && role !== 'combobox' && role !== 'gridcell' && role !== 'link' && role !== 'menuitem' && role !== 'menuitemcheckbox' && role !== 'menuitemradio' && role !== 'option' && role !== 'radio' && role !== 'searchbox' && role !== 'separator' && role !== 'slider' && role !== 'spinbutton' && role !== 'switch' && role !== 'tab' && role !== 'tabpanel' && role !== 'textbox' && role !== 'treeitem' && // aria-describedby is also announced on these roles\n role !== 'img' && role !== 'meter' && role !== 'progressbar') console.warn(`<Focusable> child must have an interactive ARIA role. Got \"${role}\".`);\n }\n }, [\n ref,\n props.isDisabled\n ]);\n // @ts-ignore\n let childRef = parseInt((0, $fcPuG$react).version, 10) < 19 ? child.ref : child.props.ref;\n return /*#__PURE__*/ (0, $fcPuG$react).cloneElement(child, {\n ...(0, $fcPuG$mergeProps)(focusableProps, child.props),\n // @ts-ignore\n ref: (0, $fcPuG$mergeRefs)(childRef, ref)\n });\n});\n\n\nexport {$f645667febf57a63$export$f9762fab77588ecb as FocusableContext, $f645667febf57a63$export$13f3202a3e5ddd5 as FocusableProvider, $f645667febf57a63$export$4c014de7c8940b4c as useFocusable, $f645667febf57a63$export$35a3bebf7ef2d934 as Focusable};\n//# sourceMappingURL=useFocusable.module.js.map\n"],"names":["$f645667febf57a63$export$f9762fab77588ecb","$fcPuG$react","$f645667febf57a63$var$useFocusableContext","ref","context","$fcPuG$useContext","$fcPuG$useSyncRef","_","otherProps","$f645667febf57a63$export$4c014de7c8940b4c","props","domRef","focusProps","$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","keyboardProps","$46d819fcbaf35654$export$8f71654801c2f7cd","interactions","$fcPuG$mergeProps","domProps","interactionProps","autoFocusRef","$fcPuG$useRef","$fcPuG$useEffect","$3ad3f6e1647bc98d$export$80f3e147d781571c","tabIndex"],"mappings":";;;;;AAqBG,IAACA,IAA8DC,gBAAAA,EAAc,cAAc,IAAI;AAClG,SAASC,EAA0CC,GAAK;AACpD,MAAIC,IAAcC,EAAmBL,CAAyC,KAAK,CAAA;AACnF,EAAIM,EAAmBF,GAASD,CAAG;AAEnC,MAAI,EAAE,KAAKI,GAAG,GAAGC,EAAU,IAAKJ;AAChC,SAAOI;AACX;AAYA,SAASC,EAA0CC,GAAOC,GAAQ;AAC9D,MAAI,EAAE,YAAYC,EAAU,IAASC,EAA2CH,CAAK,GACjF,EAAE,eAAeI,EAAa,IAASC,EAA2CL,CAAK,GACvFM,IAAmBC,EAAmBL,GAAYE,CAAa,GAC/DI,IAAWhB,EAA0CS,CAAM,GAC3DQ,IAAmBT,EAAM,aAAa,CAAA,IAAKQ,GAC3CE,IAAmBC,EAAeX,EAAM,SAAS;AACrD,EAAIY,EAAkB,MAAI;AACtB,IAAIF,EAAa,WAAWT,EAAO,WAAaY,EAA2CZ,EAAO,OAAO,GACzGS,EAAa,UAAU;AAAA,EAC/B,GAAO;AAAA,IACCT;AAAA,EACR,CAAK;AAED,MAAIa,IAAWd,EAAM,sBAAsB,KAAK;AAChD,SAAIA,EAAM,eAAYc,IAAW,SAC1B;AAAA,IACH,gBAAoBP,EAAmB;AAAA,MACnC,GAAGD;AAAA,MACH,UAAUQ;AAAA,IACb,GAAEL,CAAgB;AAAA,EAC3B;AACA;","x_google_ignoreList":[0]}
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./utils.cjs.js"),_=require("./textSelection.cjs.js"),ee=require("./context.cjs.js"),te=require("../../../@swc/helpers/esm/_class_private_field_get.cjs.js"),re=require("../../../@swc/helpers/esm/_class_private_field_init.cjs.js"),B=require("../../../@swc/helpers/esm/_class_private_field_set.cjs.js"),r=require("@react-aria/utils"),ne=require("react-dom"),k=require("react");function ie(i){let s=k.useContext(ee.PressResponderContext);if(s){let{register:l,...u}=s;i=r.mergeProps(u,i),l()}return r.useSyncRef(s,i.ref),i}var L=new WeakMap;class Y{continuePropagation(){B._class_private_field_set(this,L,!1)}get shouldStopPropagation(){return te._class_private_field_get(this,L)}constructor(s,l,u,g){re._class_private_field_init(this,L,{writable:!0,value:void 0}),B._class_private_field_set(this,L,!0);var P;let y=(P=g==null?void 0:g.target)!==null&&P!==void 0?P:u.currentTarget;const d=y==null?void 0:y.getBoundingClientRect();let M,S=0,w,v=null;u.clientX!=null&&u.clientY!=null&&(w=u.clientX,v=u.clientY),d&&(w!=null&&v!=null?(M=w-d.left,S=v-d.top):(M=d.width/2,S=d.height/2)),this.type=s,this.pointerType=l,this.target=u.currentTarget,this.shiftKey=u.shiftKey,this.metaKey=u.metaKey,this.ctrlKey=u.ctrlKey,this.altKey=u.altKey,this.x=M,this.y=S}}const H=Symbol("linkClicked"),V="react-aria-pressable-style",N="data-react-aria-pressable";function se(i){let{onPress:s,onPressChange:l,onPressStart:u,onPressEnd:g,onPressUp:P,onClick:y,isDisabled:d,isPressed:M,preventFocusOnPress:S,shouldCancelOnPointerExit:w,allowTextSelectionOnPress:v,ref:R,...J}=ie(i),[Q,q]=k.useState(!1),K=k.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:b,removeAllGlobalListeners:x}=r.useGlobalListeners(),h=r.useEffectEvent((e,a)=>{let p=K.current;if(d||p.didFirePressStart)return!1;let n=!0;if(p.isTriggeringEvent=!0,u){let f=new Y("pressstart",a,e);u(f),n=f.shouldStopPropagation}return l&&l(!0),p.isTriggeringEvent=!1,p.didFirePressStart=!0,q(!0),n}),E=r.useEffectEvent((e,a,p=!0)=>{let n=K.current;if(!n.didFirePressStart)return!1;n.didFirePressStart=!1,n.isTriggeringEvent=!0;let f=!0;if(g){let t=new Y("pressend",a,e);g(t),f=t.shouldStopPropagation}if(l&&l(!1),q(!1),s&&p&&!d){let t=new Y("press",a,e);s(t),f&&(f=t.shouldStopPropagation)}return n.isTriggeringEvent=!1,f}),C=r.useEffectEvent((e,a)=>{let p=K.current;if(d)return!1;if(P){p.isTriggeringEvent=!0;let n=new Y("pressup",a,e);return P(n),p.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),T=r.useEffectEvent(e=>{let a=K.current;if(a.isPressed&&a.target){a.didFirePressStart&&a.pointerType!=null&&E(O(a.target,e),a.pointerType,!1),a.isPressed=!1,a.isOverTarget=!1,a.activePointerId=null,a.pointerType=null,x(),v||_.restoreTextSelection(a.target);for(let p of a.disposables)p();a.disposables=[]}}),I=r.useEffectEvent(e=>{w&&T(e)}),X=r.useEffectEvent(e=>{y==null||y(e)}),U=r.useEffectEvent((e,a)=>{if(y){let p=new MouseEvent("click",e);D.setEventTarget(p,a),y(D.createSyntheticEvent(p))}}),Z=k.useMemo(()=>{let e=K.current,a={onKeyDown(n){if(F(n.nativeEvent,n.currentTarget)&&r.nodeContains(n.currentTarget,r.getEventTarget(n.nativeEvent))){var f;z(r.getEventTarget(n.nativeEvent),n.key)&&n.preventDefault();let t=!0;if(!e.isPressed&&!n.repeat){e.target=n.currentTarget,e.isPressed=!0,e.pointerType="keyboard",t=h(n,"keyboard");let o=n.currentTarget,c=$=>{F($,o)&&!$.repeat&&r.nodeContains(o,r.getEventTarget($))&&e.target&&C(O(e.target,$),"keyboard")};b(r.getOwnerDocument(n.currentTarget),"keyup",r.chain(c,p),!0)}t&&n.stopPropagation(),n.metaKey&&r.isMac()&&((f=e.metaKeyEvents)===null||f===void 0||f.set(n.key,n.nativeEvent))}else n.key==="Meta"&&(e.metaKeyEvents=new Map)},onClick(n){if(!(n&&!r.nodeContains(n.currentTarget,r.getEventTarget(n.nativeEvent)))&&n&&n.button===0&&!e.isTriggeringEvent&&!r.openLink.isOpening){let f=!0;if(d&&n.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType==="virtual"||r.isVirtualClick(n.nativeEvent))){let t=h(n,"virtual"),o=C(n,"virtual"),c=E(n,"virtual");X(n),f=t&&o&&c}else if(e.isPressed&&e.pointerType!=="keyboard"){let t=e.pointerType||n.nativeEvent.pointerType||"virtual",o=C(O(n.currentTarget,n),t),c=E(O(n.currentTarget,n),t,!0);f=o&&c,e.isOverTarget=!1,X(n),T(n)}e.ignoreEmulatedMouseEvents=!1,f&&n.stopPropagation()}}},p=n=>{var f;if(e.isPressed&&e.target&&F(n,e.target)){var t;z(r.getEventTarget(n),n.key)&&n.preventDefault();let c=r.getEventTarget(n),$=r.nodeContains(e.target,r.getEventTarget(n));E(O(e.target,n),"keyboard",$),$&&U(n,e.target),x(),n.key!=="Enter"&&A(e.target)&&r.nodeContains(e.target,c)&&!n[H]&&(n[H]=!0,r.openLink(e.target,n,!1)),e.isPressed=!1,(t=e.metaKeyEvents)===null||t===void 0||t.delete(n.key)}else if(n.key==="Meta"&&(!((f=e.metaKeyEvents)===null||f===void 0)&&f.size)){var o;let c=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let $ of c.values())(o=e.target)===null||o===void 0||o.dispatchEvent(new KeyboardEvent("keyup",$))}};if(typeof PointerEvent<"u"){a.onPointerDown=t=>{if(t.button!==0||!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;if(r.isVirtualPointerEvent(t.nativeEvent)){e.pointerType="virtual";return}e.pointerType=t.pointerType;let o=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,v||_.disableTextSelection(e.target),o=h(t,e.pointerType);let c=r.getEventTarget(t.nativeEvent);"releasePointerCapture"in c&&c.releasePointerCapture(t.pointerId),b(r.getOwnerDocument(t.currentTarget),"pointerup",n,!1),b(r.getOwnerDocument(t.currentTarget),"pointercancel",f,!1)}o&&t.stopPropagation()},a.onMouseDown=t=>{if(r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&t.button===0){if(S){let o=D.preventFocus(t.target);o&&e.disposables.push(o)}t.stopPropagation()}},a.onPointerUp=t=>{!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))||e.pointerType==="virtual"||t.button===0&&!e.isPressed&&C(t,e.pointerType||t.pointerType)},a.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,h(O(e.target,t),e.pointerType))},a.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,E(O(e.target,t),e.pointerType,!1),I(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target){if(r.nodeContains(e.target,r.getEventTarget(t))&&e.pointerType!=null){let o=!1,c=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(o?T(t):(r.focusWithoutScrolling(e.target),e.target.click()))},80);b(t.currentTarget,"click",()=>o=!0,!0),e.disposables.push(()=>clearTimeout(c))}else T(t);e.isOverTarget=!1}},f=t=>{T(t)};a.onDragStart=t=>{r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&T(t)}}else if(process.env.NODE_ENV==="test"){a.onMouseDown=t=>{if(t.button!==0||!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;if(e.ignoreEmulatedMouseEvents){t.stopPropagation();return}if(e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=r.isVirtualClick(t.nativeEvent)?"virtual":"mouse",ne.flushSync(()=>h(t,e.pointerType))&&t.stopPropagation(),S){let c=D.preventFocus(t.target);c&&e.disposables.push(c)}b(r.getOwnerDocument(t.currentTarget),"mouseup",n,!1)},a.onMouseEnter=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;let o=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!0,o=h(t,e.pointerType)),o&&t.stopPropagation()},a.onMouseLeave=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;let o=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!1,o=E(t,e.pointerType,!1),I(t)),o&&t.stopPropagation()},a.onMouseUp=t=>{r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&!e.ignoreEmulatedMouseEvents&&t.button===0&&!e.isPressed&&C(t,e.pointerType||"mouse")};let n=t=>{if(t.button===0){if(e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=!1;return}e.target&&e.target.contains(t.target)&&e.pointerType!=null||T(t),e.isOverTarget=!1}};a.onTouchStart=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;let o=ae(t.nativeEvent);if(!o)return;e.activePointerId=o.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType="touch",v||_.disableTextSelection(e.target),h(m(e.target,t),e.pointerType)&&t.stopPropagation(),b(r.getOwnerWindow(t.currentTarget),"scroll",f,!0)},a.onTouchMove=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;if(!e.isPressed){t.stopPropagation();return}let o=G(t.nativeEvent,e.activePointerId),c=!0;o&&W(o,t.currentTarget)?!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,c=h(m(e.target,t),e.pointerType)):e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,c=E(m(e.target,t),e.pointerType,!1),I(m(e.target,t))),c&&t.stopPropagation()},a.onTouchEnd=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;if(!e.isPressed){t.stopPropagation();return}let o=G(t.nativeEvent,e.activePointerId),c=!0;o&&W(o,t.currentTarget)&&e.pointerType!=null?(C(m(e.target,t),e.pointerType),c=E(m(e.target,t),e.pointerType),U(t.nativeEvent,e.target)):e.isOverTarget&&e.pointerType!=null&&(c=E(m(e.target,t),e.pointerType,!1)),c&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!v&&_.restoreTextSelection(e.target),x()},a.onTouchCancel=t=>{r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&(t.stopPropagation(),e.isPressed&&T(m(e.target,t)))};let f=t=>{e.isPressed&&r.nodeContains(r.getEventTarget(t),e.target)&&T({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};a.onDragStart=t=>{r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&T(t)}}return a},[b,d,S,x,v,T,I,E,h,C,X,U]);return k.useEffect(()=>{if(!R||process.env.NODE_ENV==="test")return;const e=r.getOwnerDocument(R.current);if(!e||!e.head||e.getElementById(V))return;const a=e.createElement("style");a.id=V,a.textContent=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./utils.cjs.js"),_=require("./textSelection.cjs.js"),ee=require("./context.cjs.js"),te=require("../../../@swc/helpers/esm/_class_private_field_get.cjs.js"),re=require("../../../@swc/helpers/esm/_class_private_field_init.cjs.js"),B=require("../../../@swc/helpers/esm/_class_private_field_set.cjs.js"),r=require("@react-aria/utils"),ne=require("react-dom"),k=require("react");function ie(i){let s=k.useContext(ee.PressResponderContext);if(s){let{register:l,...u}=s;i=r.mergeProps(u,i),l()}return r.useSyncRef(s,i.ref),i}var L=new WeakMap;class Y{continuePropagation(){B._class_private_field_set(this,L,!1)}get shouldStopPropagation(){return te._class_private_field_get(this,L)}constructor(s,l,u,g){re._class_private_field_init(this,L,{writable:!0,value:void 0}),B._class_private_field_set(this,L,!0);var P;let y=(P=g==null?void 0:g.target)!==null&&P!==void 0?P:u.currentTarget;const d=y==null?void 0:y.getBoundingClientRect();let M,S=0,w,v=null;u.clientX!=null&&u.clientY!=null&&(w=u.clientX,v=u.clientY),d&&(w!=null&&v!=null?(M=w-d.left,S=v-d.top):(M=d.width/2,S=d.height/2)),this.type=s,this.pointerType=l,this.target=u.currentTarget,this.shiftKey=u.shiftKey,this.metaKey=u.metaKey,this.ctrlKey=u.ctrlKey,this.altKey=u.altKey,this.x=M,this.y=S}}const H=Symbol("linkClicked"),V="react-aria-pressable-style",N="data-react-aria-pressable";function se(i){let{onPress:s,onPressChange:l,onPressStart:u,onPressEnd:g,onPressUp:P,onClick:y,isDisabled:d,isPressed:M,preventFocusOnPress:S,shouldCancelOnPointerExit:w,allowTextSelectionOnPress:v,ref:X,...J}=ie(i),[Q,q]=k.useState(!1),K=k.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:b,removeAllGlobalListeners:x}=r.useGlobalListeners(),h=r.useEffectEvent((e,a)=>{let p=K.current;if(d||p.didFirePressStart)return!1;let n=!0;if(p.isTriggeringEvent=!0,u){let f=new Y("pressstart",a,e);u(f),n=f.shouldStopPropagation}return l&&l(!0),p.isTriggeringEvent=!1,p.didFirePressStart=!0,q(!0),n}),E=r.useEffectEvent((e,a,p=!0)=>{let n=K.current;if(!n.didFirePressStart)return!1;n.didFirePressStart=!1,n.isTriggeringEvent=!0;let f=!0;if(g){let t=new Y("pressend",a,e);g(t),f=t.shouldStopPropagation}if(l&&l(!1),q(!1),s&&p&&!d){let t=new Y("press",a,e);s(t),f&&(f=t.shouldStopPropagation)}return n.isTriggeringEvent=!1,f}),C=r.useEffectEvent((e,a)=>{let p=K.current;if(d)return!1;if(P){p.isTriggeringEvent=!0;let n=new Y("pressup",a,e);return P(n),p.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),T=r.useEffectEvent(e=>{let a=K.current;if(a.isPressed&&a.target){a.didFirePressStart&&a.pointerType!=null&&E(O(a.target,e),a.pointerType,!1),a.isPressed=!1,a.isOverTarget=!1,a.activePointerId=null,a.pointerType=null,x(),v||_.restoreTextSelection(a.target);for(let p of a.disposables)p();a.disposables=[]}}),I=r.useEffectEvent(e=>{w&&T(e)}),R=r.useEffectEvent(e=>{y==null||y(e)}),U=r.useEffectEvent((e,a)=>{if(y){let p=new MouseEvent("click",e);D.setEventTarget(p,a),y(D.createSyntheticEvent(p))}}),Z=k.useMemo(()=>{let e=K.current,a={onKeyDown(n){if(F(n.nativeEvent,n.currentTarget)&&r.nodeContains(n.currentTarget,r.getEventTarget(n.nativeEvent))){var f;z(r.getEventTarget(n.nativeEvent),n.key)&&n.preventDefault();let t=!0;if(!e.isPressed&&!n.repeat){e.target=n.currentTarget,e.isPressed=!0,e.pointerType="keyboard",t=h(n,"keyboard");let o=n.currentTarget,c=$=>{F($,o)&&!$.repeat&&r.nodeContains(o,r.getEventTarget($))&&e.target&&C(O(e.target,$),"keyboard")};b(r.getOwnerDocument(n.currentTarget),"keyup",r.chain(c,p),!0)}t&&n.stopPropagation(),n.metaKey&&r.isMac()&&((f=e.metaKeyEvents)===null||f===void 0||f.set(n.key,n.nativeEvent))}else n.key==="Meta"&&(e.metaKeyEvents=new Map)},onClick(n){if(!(n&&!r.nodeContains(n.currentTarget,r.getEventTarget(n.nativeEvent)))&&n&&n.button===0&&!e.isTriggeringEvent&&!r.openLink.isOpening){let f=!0;if(d&&n.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType==="virtual"||r.isVirtualClick(n.nativeEvent))){let t=h(n,"virtual"),o=C(n,"virtual"),c=E(n,"virtual");R(n),f=t&&o&&c}else if(e.isPressed&&e.pointerType!=="keyboard"){let t=e.pointerType||n.nativeEvent.pointerType||"virtual",o=C(O(n.currentTarget,n),t),c=E(O(n.currentTarget,n),t,!0);f=o&&c,e.isOverTarget=!1,R(n),T(n)}e.ignoreEmulatedMouseEvents=!1,f&&n.stopPropagation()}}},p=n=>{var f;if(e.isPressed&&e.target&&F(n,e.target)){var t;z(r.getEventTarget(n),n.key)&&n.preventDefault();let c=r.getEventTarget(n),$=r.nodeContains(e.target,r.getEventTarget(n));E(O(e.target,n),"keyboard",$),$&&U(n,e.target),x(),n.key!=="Enter"&&A(e.target)&&r.nodeContains(e.target,c)&&!n[H]&&(n[H]=!0,r.openLink(e.target,n,!1)),e.isPressed=!1,(t=e.metaKeyEvents)===null||t===void 0||t.delete(n.key)}else if(n.key==="Meta"&&(!((f=e.metaKeyEvents)===null||f===void 0)&&f.size)){var o;let c=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let $ of c.values())(o=e.target)===null||o===void 0||o.dispatchEvent(new KeyboardEvent("keyup",$))}};if(typeof PointerEvent<"u"){a.onPointerDown=t=>{if(t.button!==0||!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;if(r.isVirtualPointerEvent(t.nativeEvent)){e.pointerType="virtual";return}e.pointerType=t.pointerType;let o=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,v||_.disableTextSelection(e.target),o=h(t,e.pointerType);let c=r.getEventTarget(t.nativeEvent);"releasePointerCapture"in c&&c.releasePointerCapture(t.pointerId),b(r.getOwnerDocument(t.currentTarget),"pointerup",n,!1),b(r.getOwnerDocument(t.currentTarget),"pointercancel",f,!1)}o&&t.stopPropagation()},a.onMouseDown=t=>{if(r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&t.button===0){if(S){let o=D.preventFocus(t.target);o&&e.disposables.push(o)}t.stopPropagation()}},a.onPointerUp=t=>{!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))||e.pointerType==="virtual"||t.button===0&&!e.isPressed&&C(t,e.pointerType||t.pointerType)},a.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,h(O(e.target,t),e.pointerType))},a.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,E(O(e.target,t),e.pointerType,!1),I(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target){if(r.nodeContains(e.target,r.getEventTarget(t))&&e.pointerType!=null){let o=!1,c=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(o?T(t):(r.focusWithoutScrolling(e.target),e.target.click()))},80);b(t.currentTarget,"click",()=>o=!0,!0),e.disposables.push(()=>clearTimeout(c))}else T(t);e.isOverTarget=!1}},f=t=>{T(t)};a.onDragStart=t=>{r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&T(t)}}else if(process.env.NODE_ENV==="test"){a.onMouseDown=t=>{if(t.button!==0||!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;if(e.ignoreEmulatedMouseEvents){t.stopPropagation();return}if(e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=r.isVirtualClick(t.nativeEvent)?"virtual":"mouse",ne.flushSync(()=>h(t,e.pointerType))&&t.stopPropagation(),S){let c=D.preventFocus(t.target);c&&e.disposables.push(c)}b(r.getOwnerDocument(t.currentTarget),"mouseup",n,!1)},a.onMouseEnter=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;let o=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!0,o=h(t,e.pointerType)),o&&t.stopPropagation()},a.onMouseLeave=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;let o=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!1,o=E(t,e.pointerType,!1),I(t)),o&&t.stopPropagation()},a.onMouseUp=t=>{r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&!e.ignoreEmulatedMouseEvents&&t.button===0&&!e.isPressed&&C(t,e.pointerType||"mouse")};let n=t=>{if(t.button===0){if(e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=!1;return}e.target&&e.target.contains(t.target)&&e.pointerType!=null||T(t),e.isOverTarget=!1}};a.onTouchStart=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;let o=ae(t.nativeEvent);if(!o)return;e.activePointerId=o.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType="touch",v||_.disableTextSelection(e.target),h(m(e.target,t),e.pointerType)&&t.stopPropagation(),b(r.getOwnerWindow(t.currentTarget),"scroll",f,!0)},a.onTouchMove=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;if(!e.isPressed){t.stopPropagation();return}let o=G(t.nativeEvent,e.activePointerId),c=!0;o&&W(o,t.currentTarget)?!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,c=h(m(e.target,t),e.pointerType)):e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,c=E(m(e.target,t),e.pointerType,!1),I(m(e.target,t))),c&&t.stopPropagation()},a.onTouchEnd=t=>{if(!r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent)))return;if(!e.isPressed){t.stopPropagation();return}let o=G(t.nativeEvent,e.activePointerId),c=!0;o&&W(o,t.currentTarget)&&e.pointerType!=null?(C(m(e.target,t),e.pointerType),c=E(m(e.target,t),e.pointerType),U(t.nativeEvent,e.target)):e.isOverTarget&&e.pointerType!=null&&(c=E(m(e.target,t),e.pointerType,!1)),c&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!v&&_.restoreTextSelection(e.target),x()},a.onTouchCancel=t=>{r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&(t.stopPropagation(),e.isPressed&&T(m(e.target,t)))};let f=t=>{e.isPressed&&r.nodeContains(r.getEventTarget(t),e.target)&&T({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};a.onDragStart=t=>{r.nodeContains(t.currentTarget,r.getEventTarget(t.nativeEvent))&&T(t)}}return a},[b,d,S,x,v,T,I,E,h,C,R,U]);return k.useEffect(()=>{if(!X||process.env.NODE_ENV==="test")return;const e=r.getOwnerDocument(X.current);if(!e||!e.head||e.getElementById(V))return;const a=e.createElement("style");a.id=V,a.textContent=`
2
2
  @layer {
3
3
  [${N}] {
4
4
  touch-action: pan-x pan-y pinch-zoom;
5
5
  }
6
6
  }
7
- `.trim(),e.head.prepend(a)},[R]),k.useEffect(()=>{let e=K.current;return()=>{var a;v||_.restoreTextSelection((a=e.target)!==null&&a!==void 0?a:void 0);for(let p of e.disposables)p();e.disposables=[]}},[v]),{isPressed:M||Q,pressProps:r.mergeProps(J,Z,{[N]:!0})}}function A(i){return i.tagName==="A"&&i.hasAttribute("href")}function F(i,s){const{key:l,code:u}=i,g=s,P=g.getAttribute("role");return(l==="Enter"||l===" "||l==="Spacebar"||u==="Space")&&!(g instanceof r.getOwnerWindow(g).HTMLInputElement&&!j(g,l)||g instanceof r.getOwnerWindow(g).HTMLTextAreaElement||g.isContentEditable)&&!((P==="link"||!P&&A(g))&&l!=="Enter")}function ae(i){const{targetTouches:s}=i;return s.length>0?s[0]:null}function G(i,s){const l=i.changedTouches;for(let u=0;u<l.length;u++){const g=l[u];if(g.identifier===s)return g}return null}function m(i,s){let l=0,u=0;return s.targetTouches&&s.targetTouches.length===1&&(l=s.targetTouches[0].clientX,u=s.targetTouches[0].clientY),{currentTarget:i,shiftKey:s.shiftKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,altKey:s.altKey,clientX:l,clientY:u}}function O(i,s){let l=s.clientX,u=s.clientY;return{currentTarget:i,shiftKey:s.shiftKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,altKey:s.altKey,clientX:l,clientY:u}}function oe(i){let s=0,l=0;return i.width!==void 0?s=i.width/2:i.radiusX!==void 0&&(s=i.radiusX),i.height!==void 0?l=i.height/2:i.radiusY!==void 0&&(l=i.radiusY),{top:i.clientY-l,right:i.clientX+s,bottom:i.clientY+l,left:i.clientX-s}}function le(i,s){return!(i.left>s.right||s.left>i.right||i.top>s.bottom||s.top>i.bottom)}function W(i,s){let l=s.getBoundingClientRect(),u=oe(i);return le(l,u)}function ue(i){return i instanceof HTMLInputElement?!1:i instanceof HTMLButtonElement?i.type!=="submit"&&i.type!=="reset":!A(i)}function z(i,s){return i instanceof HTMLInputElement?!j(i,s):ue(i)}const ce=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function j(i,s){return i.type==="checkbox"||i.type==="radio"?s===" ":ce.has(i.type)}exports.usePress=se;
7
+ `.trim(),e.head.prepend(a)},[X]),k.useEffect(()=>{let e=K.current;return()=>{var a;v||_.restoreTextSelection((a=e.target)!==null&&a!==void 0?a:void 0);for(let p of e.disposables)p();e.disposables=[]}},[v]),{isPressed:M||Q,pressProps:r.mergeProps(J,Z,{[N]:!0})}}function A(i){return i.tagName==="A"&&i.hasAttribute("href")}function F(i,s){const{key:l,code:u}=i,g=s,P=g.getAttribute("role");return(l==="Enter"||l===" "||l==="Spacebar"||u==="Space")&&!(g instanceof r.getOwnerWindow(g).HTMLInputElement&&!j(g,l)||g instanceof r.getOwnerWindow(g).HTMLTextAreaElement||g.isContentEditable)&&!((P==="link"||!P&&A(g))&&l!=="Enter")}function ae(i){const{targetTouches:s}=i;return s.length>0?s[0]:null}function G(i,s){const l=i.changedTouches;for(let u=0;u<l.length;u++){const g=l[u];if(g.identifier===s)return g}return null}function m(i,s){let l=0,u=0;return s.targetTouches&&s.targetTouches.length===1&&(l=s.targetTouches[0].clientX,u=s.targetTouches[0].clientY),{currentTarget:i,shiftKey:s.shiftKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,altKey:s.altKey,clientX:l,clientY:u}}function O(i,s){let l=s.clientX,u=s.clientY;return{currentTarget:i,shiftKey:s.shiftKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,altKey:s.altKey,clientX:l,clientY:u}}function oe(i){let s=0,l=0;return i.width!==void 0?s=i.width/2:i.radiusX!==void 0&&(s=i.radiusX),i.height!==void 0?l=i.height/2:i.radiusY!==void 0&&(l=i.radiusY),{top:i.clientY-l,right:i.clientX+s,bottom:i.clientY+l,left:i.clientX-s}}function le(i,s){return!(i.left>s.right||s.left>i.right||i.top>s.bottom||s.top>i.bottom)}function W(i,s){let l=s.getBoundingClientRect(),u=oe(i);return le(l,u)}function ue(i){return i instanceof HTMLInputElement?!1:i instanceof HTMLButtonElement?i.type!=="submit"&&i.type!=="reset":!A(i)}function z(i,s){return i instanceof HTMLInputElement?!j(i,s):ue(i)}const ce=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function j(i,s){return i.type==="checkbox"||i.type==="radio"?s===" ":ce.has(i.type)}exports.usePress=se;
8
8
  //# sourceMappingURL=usePress.cjs.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),a=require("@react-aria/utils"),n=o.createContext(null);function u(){let e=o.useContext(n),t=e==null?void 0:e.setContain;a.useLayoutEffect(()=>{t==null||t(!0)},[t])}exports.OverlayContext=n;exports.useOverlayFocusContain=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),u=require("@react-aria/utils"),n=o.createContext(null);function a(){let e=o.useContext(n),t=e==null?void 0:e.setContain;u.useLayoutEffect(()=>{t==null||t(!0)},[t])}exports.OverlayContext=n;exports.useOverlayFocusContain=a;
2
2
  //# sourceMappingURL=Overlay.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SSRProvider.es.js","sources":["../../../../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs"],"sourcesContent":["import $670gB$react, {useContext as $670gB$useContext, useState as $670gB$useState, useMemo as $670gB$useMemo, useLayoutEffect as $670gB$useLayoutEffect, useRef as $670gB$useRef} from \"react\";\n\n/*\n * Copyright 2020 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 */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $670gB$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $670gB$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $670gB$useState)(true);\n let value = (0, $670gB$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $670gB$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $670gB$react)['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'production' && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement((0, $670gB$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $670gB$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $670gB$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && process.env.NODE_ENV !== 'production') console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n let id = (0, $670gB$react).useId();\n let [didSSR] = (0, $670gB$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $670gB$react)['useId'] === 'function' ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $670gB$react)['useSyncExternalStore'] === 'function') return (0, $670gB$react)['useSyncExternalStore']($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $670gB$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId};\n//# sourceMappingURL=SSRProvider.module.js.map\n"],"names":["$b5e257d569688ac6$var$IsSSRContext","$670gB$react","$b5e257d569688ac6$var$getSnapshot","$b5e257d569688ac6$var$getServerSnapshot","$b5e257d569688ac6$var$subscribe","onStoreChange","$b5e257d569688ac6$export$535bd6ca7f90a273","$670gB$useContext"],"mappings":";AA0BA,MAAMA,IAAuDC,gBAAAA,EAAc,cAAc,EAAK;AAgG9F,SAASC,IAAoC;AACzC,SAAO;AACX;AACA,SAASC,IAA0C;AAC/C,SAAO;AACX;AAEA,SAASC,EAAgCC,GAAe;AAEpD,SAAO,MAAI;AAAA,EAAA;AACf;AACA,SAASC,IAA4C;AAEjD,SAAI,OAAWL,EAAc,wBAA4B,aAAuBA,EAAc,qBAAwBG,GAAiCF,GAAmCC,CAAuC,IAEtNI,EAAmBP,CAAkC;AACpE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"SSRProvider.es.js","sources":["../../../../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs"],"sourcesContent":["import $670gB$react, {useContext as $670gB$useContext, useState as $670gB$useState, useMemo as $670gB$useMemo, useLayoutEffect as $670gB$useLayoutEffect, useRef as $670gB$useRef} from \"react\";\n\n/*\n * Copyright 2020 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 */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $670gB$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $670gB$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $670gB$useState)(true);\n let value = (0, $670gB$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $670gB$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $670gB$react)['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'production' && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement((0, $670gB$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $670gB$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $670gB$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && process.env.NODE_ENV !== 'production') console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n let id = (0, $670gB$react).useId();\n let [didSSR] = (0, $670gB$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $670gB$react)['useId'] === 'function' ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $670gB$react)['useSyncExternalStore'] === 'function') return (0, $670gB$react)['useSyncExternalStore']($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $670gB$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId};\n//# sourceMappingURL=SSRProvider.module.js.map\n"],"names":["$b5e257d569688ac6$var$IsSSRContext","$670gB$react","$b5e257d569688ac6$var$getSnapshot","$b5e257d569688ac6$var$getServerSnapshot","$b5e257d569688ac6$var$subscribe","onStoreChange","$b5e257d569688ac6$export$535bd6ca7f90a273","$670gB$useContext"],"mappings":";AA0BA,MAAMA,IAAuD,gBAAAC,EAAc,cAAc,EAAK;AAgG9F,SAASC,IAAoC;AACzC,SAAO;AACX;AACA,SAASC,IAA0C;AAC/C,SAAO;AACX;AAEA,SAASC,EAAgCC,GAAe;AAEpD,SAAO,MAAI;AAAA,EAAA;AACf;AACA,SAASC,IAA4C;AAEjD,SAAI,OAAWL,EAAc,wBAA4B,aAAuBA,EAAc,qBAAwBG,GAAiCF,GAAmCC,CAAuC,IAEtNI,EAAmBP,CAAkC;AACpE;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),A={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},h={...A,customError:!0,valid:!1},s={isInvalid:!1,validationDetails:A,validationErrors:[]},x=r.createContext({}),y="__formValidationState"+Date.now();function R(e){if(e[y]){let{realtimeValidation:a,displayValidation:i,updateValidation:l,resetValidation:d,commitValidation:n}=e[y];return{realtimeValidation:a,displayValidation:i,updateValidation:l,resetValidation:d,commitValidation:n}}return F(e)}function F(e){let{isInvalid:a,validationState:i,name:l,value:d,builtinValidation:n,validate:f,validationBehavior:u="aria"}=e;i&&(a||(a=i==="invalid"));let v=a!==void 0?{isInvalid:a,validationErrors:[],validationDetails:h}:null,V=r.useMemo(()=>{if(!f||d==null)return null;let t=U(f,d);return T(t)},[f,d]);n!=null&&n.validationDetails.valid&&(n=void 0);let o=r.useContext(x),D=r.useMemo(()=>l?Array.isArray(l)?l.flatMap(t=>I(o[t])):I(o[l]):[],[o,l]),[C,L]=r.useState(o),[g,m]=r.useState(!1);o!==C&&(L(o),m(!1));let $=r.useMemo(()=>T(g?[]:D),[g,D]),M=r.useRef(s),[b,E]=r.useState(s),c=r.useRef(s),_=()=>{if(!O)return;p(!1);let t=V||n||M.current;S(t,c.current)||(c.current=t,E(t))},[O,p]=r.useState(!1);return r.useEffect(_),{realtimeValidation:v||$||V||n||s,displayValidation:u==="native"?v||$||b:v||$||V||n||b,updateValidation(t){u==="aria"&&!S(b,t)?E(t):M.current=t},resetValidation(){let t=s;S(t,c.current)||(c.current=t,E(t)),u==="native"&&p(!1),m(!0)},commitValidation(){u==="native"&&p(!0),m(!0)}}}function I(e){return e?Array.isArray(e)?e:[e]:[]}function U(e,a){if(typeof e=="function"){let i=e(a);if(i&&typeof i!="boolean")return I(i)}return[]}function T(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:h}:null}function S(e,a){return e===a?!0:!!e&&!!a&&e.isInvalid===a.isInvalid&&e.validationErrors.length===a.validationErrors.length&&e.validationErrors.every((i,l)=>i===a.validationErrors[l])&&Object.entries(e.validationDetails).every(([i,l])=>a.validationDetails[i]===l)}exports.DEFAULT_VALIDATION_RESULT=s;exports.FormValidationContext=x;exports.VALID_VALIDITY_STATE=A;exports.privateValidationStateProp=y;exports.useFormValidationState=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),A={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},h={...A,customError:!0,valid:!1},s={isInvalid:!1,validationDetails:A,validationErrors:[]},x=r.createContext({}),y="__formValidationState"+Date.now();function F(e){if(e[y]){let{realtimeValidation:a,displayValidation:i,updateValidation:l,resetValidation:d,commitValidation:n}=e[y];return{realtimeValidation:a,displayValidation:i,updateValidation:l,resetValidation:d,commitValidation:n}}return R(e)}function R(e){let{isInvalid:a,validationState:i,name:l,value:d,builtinValidation:n,validate:f,validationBehavior:u="aria"}=e;i&&(a||(a=i==="invalid"));let v=a!==void 0?{isInvalid:a,validationErrors:[],validationDetails:h}:null,V=r.useMemo(()=>{if(!f||d==null)return null;let t=U(f,d);return T(t)},[f,d]);n!=null&&n.validationDetails.valid&&(n=void 0);let o=r.useContext(x),g=r.useMemo(()=>l?Array.isArray(l)?l.flatMap(t=>I(o[t])):I(o[l]):[],[o,l]),[C,L]=r.useState(o),[D,m]=r.useState(!1);o!==C&&(L(o),m(!1));let $=r.useMemo(()=>T(D?[]:g),[D,g]),M=r.useRef(s),[b,E]=r.useState(s),c=r.useRef(s),_=()=>{if(!O)return;p(!1);let t=V||n||M.current;S(t,c.current)||(c.current=t,E(t))},[O,p]=r.useState(!1);return r.useEffect(_),{realtimeValidation:v||$||V||n||s,displayValidation:u==="native"?v||$||b:v||$||V||n||b,updateValidation(t){u==="aria"&&!S(b,t)?E(t):M.current=t},resetValidation(){let t=s;S(t,c.current)||(c.current=t,E(t)),u==="native"&&p(!1),m(!0)},commitValidation(){u==="native"&&p(!0),m(!0)}}}function I(e){return e?Array.isArray(e)?e:[e]:[]}function U(e,a){if(typeof e=="function"){let i=e(a);if(i&&typeof i!="boolean")return I(i)}return[]}function T(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:h}:null}function S(e,a){return e===a?!0:!!e&&!!a&&e.isInvalid===a.isInvalid&&e.validationErrors.length===a.validationErrors.length&&e.validationErrors.every((i,l)=>i===a.validationErrors[l])&&Object.entries(e.validationDetails).every(([i,l])=>a.validationDetails[i]===l)}exports.DEFAULT_VALIDATION_RESULT=s;exports.FormValidationContext=x;exports.VALID_VALIDITY_STATE=A;exports.privateValidationStateProp=y;exports.useFormValidationState=F;
2
2
  //# sourceMappingURL=useFormValidationState.cjs.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../../form/dist/useFormValidationState.cjs.js"),f=require("../../utils/dist/useControlledState.cjs.js"),u=require("react");let $=Math.round(Math.random()*1e10),b=0;function m(e){let n=u.useMemo(()=>e.name||`radio-group-${$}-${++b}`,[e.name]);var a;let[l,s]=f.useControlledState(e.value,(a=e.defaultValue)!==null&&a!==void 0?a:null,e.onChange),[c]=u.useState(l),[o,r]=u.useState(null),t=S.useFormValidationState({...e,value:l}),V=v=>{!e.isReadOnly&&!e.isDisabled&&(s(v),t.commitValidation())},d=t.displayValidation.isInvalid;var i;return{...t,name:n,selectedValue:l,defaultSelectedValue:e.value!==void 0?c:(i=e.defaultValue)!==null&&i!==void 0?i:null,setSelectedValue:V,lastFocusedValue:o,setLastFocusedValue:r,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(d?"invalid":null),isInvalid:d}}exports.useRadioGroupState=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../../form/dist/useFormValidationState.cjs.js"),f=require("../../utils/dist/useControlledState.cjs.js"),u=require("react");let $=Math.round(Math.random()*1e10),m=0;function b(e){let n=u.useMemo(()=>e.name||`radio-group-${$}-${++m}`,[e.name]);var a;let[l,s]=f.useControlledState(e.value,(a=e.defaultValue)!==null&&a!==void 0?a:null,e.onChange),[c]=u.useState(l),[o,r]=u.useState(null),t=S.useFormValidationState({...e,value:l}),V=v=>{!e.isReadOnly&&!e.isDisabled&&(s(v),t.commitValidation())},d=t.displayValidation.isInvalid;var i;return{...t,name:n,selectedValue:l,defaultSelectedValue:e.value!==void 0?c:(i=e.defaultValue)!==null&&i!==void 0?i:null,setSelectedValue:V,lastFocusedValue:o,setLastFocusedValue:r,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(d?"invalid":null),isInvalid:d}}exports.useRadioGroupState=b;
2
2
  //# sourceMappingURL=useRadioGroupState.cjs.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function V(o,p,s){let[b,u]=l.useState(o||p),i=l.useRef(o!==void 0),e=o!==void 0;l.useEffect(()=>{let t=i.current;t!==e&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${t?"controlled":"uncontrolled"} to ${e?"controlled":"uncontrolled"}.`),i.current=e},[e]);let n=e?o:b,S=l.useCallback((t,...f)=>{let d=(r,...c)=>{s&&(Object.is(n,r)||s(r,...c)),e||(n=r)};typeof t=="function"?(process.env.NODE_ENV!=="production"&&console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),u((c,...$)=>{let a=t(e?n:c,...$);return d(a,...f),e?c:a})):(e||u(t),d(t,...f))},[e,n,s]);return[n,S]}exports.useControlledState=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function V(o,p,s){let[b,u]=l.useState(o||p),i=l.useRef(o!==void 0),e=o!==void 0;l.useEffect(()=>{let t=i.current;t!==e&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${t?"controlled":"uncontrolled"} to ${e?"controlled":"uncontrolled"}.`),i.current=e},[e]);let n=e?o:b,$=l.useCallback((t,...f)=>{let d=(r,...c)=>{s&&(Object.is(n,r)||s(r,...c)),e||(n=r)};typeof t=="function"?(process.env.NODE_ENV!=="production"&&console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),u((c,...S)=>{let a=t(e?n:c,...S);return d(a,...f),e?c:a})):(e||u(t),d(t,...f))},[e,n,s]);return[n,$]}exports.useControlledState=V;
2
2
  //# sourceMappingURL=useControlledState.cjs.js.map