@protonradio/proton-ui 0.11.11 → 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.
- package/dist/components/ActionMenu/ActionMenu.cjs.js +1 -1
- package/dist/components/Banner/Banner.cjs.js +1 -1
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js +1 -1
- package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js +13 -13
- package/dist/components/DataTable/DataTable.cjs.js +1 -1
- package/dist/components/Dialog/Dialog.cjs.js +1 -1
- package/dist/components/Input/BaseInput/Input.cjs.js +1 -1
- package/dist/components/Input/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/Input/SearchInput/SearchInput.cjs.js.map +1 -1
- package/dist/components/Input/SearchInput/SearchInput.es.js +1 -1
- package/dist/components/Input/SearchInput/SearchInput.es.js.map +1 -1
- package/dist/components/Menu/MenuTrigger.cjs.js +1 -1
- package/dist/components/Modal/Modal.cjs.js +1 -1
- package/dist/components/Switch/Switch.cjs.js +1 -1
- package/dist/components/Table/Collection/collectionParser.cjs.js +1 -1
- package/dist/components/Table/Collection/useTableCollection.cjs.js +1 -1
- package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js +1 -1
- package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js.map +1 -1
- package/dist/components/Text/TextEmphasis/TextEmphasis.es.js +15 -15
- package/dist/components/Text/TextEmphasis/TextEmphasis.es.js.map +1 -1
- package/dist/components/ThemeProvider.cjs.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.es.js +71 -56
- package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
- package/dist/components/Waveform/Waveform.cjs.js +1 -1
- package/dist/hooks/useBreakpoint.cjs.js +1 -1
- package/dist/hooks/useIsClosing.cjs.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +52 -25
- package/dist/index.es.js +6 -6
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.cjs.js +1 -1
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.cjs.js +1 -1
- package/dist/node_modules/@react-aria/i18n/dist/context.cjs.js +1 -1
- package/dist/node_modules/@react-aria/i18n/dist/context.es.js +3 -3
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs.js +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js +20 -30
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js +2 -2
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js +1 -1
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.es.js.map +1 -1
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.cjs.js +1 -1
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.cjs.js +1 -1
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.cjs.js +1 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +5 -5
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +14 -14
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js +0 -2
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js +0 -37
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js +0 -2
- package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/Tooltip.es.js +0 -98
- package/dist/node_modules/react-aria-components/dist/Tooltip.es.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/utils.cjs.js +0 -2
- package/dist/node_modules/react-aria-components/dist/utils.cjs.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/utils.es.js +0 -89
- package/dist/node_modules/react-aria-components/dist/utils.es.js.map +0 -1
|
@@ -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$
|
|
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
|
|
2
|
-
import { useFocus as
|
|
3
|
-
import { useKeyboard as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
let
|
|
7
|
-
function
|
|
8
|
-
let t =
|
|
9
|
-
|
|
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
|
-
|
|
14
|
-
let {
|
|
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
|
-
|
|
16
|
+
f.current && t.current && d(t.current), f.current = !1;
|
|
26
17
|
}, [
|
|
27
18
|
t
|
|
28
19
|
]);
|
|
29
|
-
let
|
|
30
|
-
return e.isDisabled && (
|
|
31
|
-
focusableProps:
|
|
32
|
-
...
|
|
33
|
-
tabIndex:
|
|
34
|
-
},
|
|
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
|
-
|
|
39
|
-
|
|
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$
|
|
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)},[
|
|
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"),
|
|
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
|
|
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),
|
|
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
|
|
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
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/var ye;function ur(){return ye||(ye=1,process.env.NODE_ENV!=="production"&&function(){var Ee=or,x=Symbol.for("react.element"),Re=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),q=Symbol.for("react.provider"),G=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),_e=Symbol.for("react.offscreen"),J=Symbol.iterator,me="@@iterator";function Te(e){if(e===null||typeof e!="object")return null;var r=J&&e[J]||e[me];return typeof r=="function"?r:null}var h=Ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Se("error",e,t)}}function Se(e,r,t){{var n=h.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var we=!1,Ce=!1,Oe=!1,Pe=!1,je=!1,z;z=Symbol.for("react.module.reference");function ke(e){return!!(typeof e=="string"||typeof e=="function"||e===S||e===N||je||e===K||e===F||e===A||Pe||e===_e||we||Ce||Oe||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===C||e.$$typeof===q||e.$$typeof===G||e.$$typeof===w||e.$$typeof===z||e.getModuleId!==void 0))}function xe(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function X(e){return e.displayName||"Context"}function p(e){if(e==null)return null;if(typeof e.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case Re:return"Portal";case N:return"Profiler";case K:return"StrictMode";case F:return"Suspense";case A:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case G:var r=e;return X(r)+".Consumer";case q:var t=e;return X(t._context)+".Provider";case w:return xe(e,e.render,"ForwardRef");case C:var n=e.displayName||null;return n!==null?n:p(e.type)||"Memo";case D:{var o=e,u=o._payload,i=o._init;try{return p(i(u))}catch{return null}}}return null}var g=Object.assign,R=0,H,Z,Q,ee,re,te,ne;function ae(){}ae.__reactDisabledLog=!0;function Fe(){{if(R===0){H=console.log,Z=console.info,Q=console.warn,ee=console.error,re=console.group,te=console.groupCollapsed,ne=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ae,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}R++}}function Ae(){{if(R--,R===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:g({},e,{value:H}),info:g({},e,{value:Z}),warn:g({},e,{value:Q}),error:g({},e,{value:ee}),group:g({},e,{value:re}),groupCollapsed:g({},e,{value:te}),groupEnd:g({},e,{value:ne})})}R<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=h.ReactCurrentDispatcher,W;function O(e,r,t){{if(W===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);W=n&&n[1]||""}return`
|
|
10
|
-
`+W+e}}var $=!1,P;{var De=typeof WeakMap=="function"?WeakMap:Map;P=new De}function ie(e,r){if(!e||$)return"";{var t=P.get(e);if(t!==void 0)return t}var n;$=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=I.current,I.current=null,Fe();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(
|
|
10
|
+
`+W+e}}var $=!1,P;{var De=typeof WeakMap=="function"?WeakMap:Map;P=new De}function ie(e,r){if(!e||$)return"";{var t=P.get(e);if(t!==void 0)return t}var n;$=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=I.current,I.current=null,Fe();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(v){n=v}Reflect.construct(e,[],i)}else{try{i.call()}catch(v){n=v}e.call(i.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
|
|
11
11
|
`),c=n.stack.split(`
|
|
12
|
-
`),s=a.length-1,l=c.length-1;s>=1&&l>=0&&a[s]!==c[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==c[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==c[l]){var
|
|
13
|
-
`+a[s].replace(" at new "," at ");return e.displayName&&
|
|
12
|
+
`),s=a.length-1,l=c.length-1;s>=1&&l>=0&&a[s]!==c[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==c[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==c[l]){var d=`
|
|
13
|
+
`+a[s].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),typeof e=="function"&&P.set(e,d),d}while(s>=1&&l>=0);break}}}finally{$=!1,I.current=u,Ae(),Error.prepareStackTrace=o}var E=e?e.displayName||e.name:"",b=E?O(E):"";return typeof e=="function"&&P.set(e,b),b}function Ie(e,r,t){return ie(e,!1)}function We(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function j(e,r,t){if(e==null)return"";if(typeof e=="function")return ie(e,We(e));if(typeof e=="string")return O(e);switch(e){case F:return O("Suspense");case A:return O("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case w:return Ie(e.render);case C:return j(e.type);case D:{var n=e,o=n._payload,u=n._init;try{return j(u(o))}catch{}}}return""}var _=Object.prototype.hasOwnProperty,oe={},ue=h.ReactDebugCurrentFrame;function k(e){if(e){var r=j(e.type);ue.setExtraStackFrame(r)}else ue.setExtraStackFrame(null)}function $e(e,r,t,n,o){{var u=Function.call.bind(_);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var c=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(k(o),f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),k(null)),a instanceof Error&&!(a.message in oe)&&(oe[a.message]=!0,k(o),f("Failed %s type: %s",t,a.message),k(null))}}}var Ye=Array.isArray;function Y(e){return Ye(e)}function Me(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ve(e){try{return!1}catch{return!0}}function Le(e){return""+e}function se(e){if(Ve())return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Me(e)),Le(e)}var m=h.ReactCurrentOwner,Ue={key:!0,ref:!0,__self:!0,__source:!0},le,fe,M;M={};function Be(e){if(_.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ke(e){if(_.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ne(e,r){if(typeof e.ref=="string"&&m.current&&r&&m.current.stateNode!==r){var t=p(m.current.type);M[t]||(f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',p(m.current.type),e.ref),M[t]=!0)}}function qe(e,r){{var t=function(){le||(le=!0,f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Ge(e,r){{var t=function(){fe||(fe=!0,f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Je=function(e,r,t,n,o,u,i){var a={$$typeof:x,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ze(e,r,t,n,o){{var u,i={},a=null,c=null;t!==void 0&&(se(t),a=""+t),Ke(r)&&(se(r.key),a=""+r.key),Be(r)&&(c=r.ref,Ne(r,o));for(u in r)_.call(r,u)&&!Ue.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)i[u]===void 0&&(i[u]=s[u])}if(a||c){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&qe(i,l),c&&Ge(i,l)}return Je(e,a,c,o,n,m.current,i)}}var V=h.ReactCurrentOwner,ce=h.ReactDebugCurrentFrame;function y(e){if(e){var r=j(e.type);ce.setExtraStackFrame(r)}else ce.setExtraStackFrame(null)}var L;L=!1;function U(e){return typeof e=="object"&&e!==null&&e.$$typeof===x}function ve(){{if(V.current){var e=p(V.current.type);if(e)return`
|
|
14
14
|
|
|
15
|
-
Check the render method of \``+e+"`."}return""}}function Xe(e){return""}var
|
|
15
|
+
Check the render method of \``+e+"`."}return""}}function Xe(e){return""}var de={};function He(e){{var r=ve();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
16
16
|
|
|
17
|
-
Check the top-level render call using <`+t+">.")}return r}}function pe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=He(r);if(
|
|
17
|
+
Check the top-level render call using <`+t+">.")}return r}}function pe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=He(r);if(de[t])return;de[t]=!0;var n="";e&&e._owner&&e._owner!==V.current&&(n=" It was passed a child from "+p(e._owner.type)+"."),y(e),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),y(null)}}function ge(e,r){{if(typeof e!="object")return;if(Y(e))for(var t=0;t<e.length;t++){var n=e[t];U(n)&&pe(n,r)}else if(U(e))e._store&&(e._store.validated=!0);else if(e){var o=Te(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)U(i.value)&&pe(i.value,r)}}}function Ze(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===w||r.$$typeof===C))t=r.propTypes;else return;if(t){var n=p(r);$e(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!L){L=!0;var o=p(r);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Qe(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){y(e),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),y(null);break}}e.ref!==null&&(y(e),f("Invalid attribute `ref` supplied to `React.Fragment`."),y(null))}}var be={};function he(e,r,t,n,o,u){{var i=ke(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var c=Xe();c?a+=c:a+=ve();var s;e===null?s="null":Y(e)?s="array":e!==void 0&&e.$$typeof===x?(s="<"+(p(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var l=ze(e,r,t,o,u);if(l==null)return l;if(i){var d=r.children;if(d!==void 0)if(n)if(Y(d)){for(var E=0;E<d.length;E++)ge(d[E],e);Object.freeze&&Object.freeze(d)}else f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ge(d,e)}if(_.call(r,"key")){var b=p(e),v=Object.keys(r).filter(function(ir){return ir!=="key"}),B=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!be[b+B]){var ar=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
@@ -12,7 +12,7 @@ import or from "react";
|
|
|
12
12
|
var ye;
|
|
13
13
|
function lr() {
|
|
14
14
|
return ye ? T : (ye = 1, process.env.NODE_ENV !== "production" && function() {
|
|
15
|
-
var Ee = or, x = Symbol.for("react.element"), Re = Symbol.for("react.portal"),
|
|
15
|
+
var Ee = or, x = Symbol.for("react.element"), Re = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), K = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), G = Symbol.for("react.provider"), J = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), me = Symbol.for("react.offscreen"), q = Symbol.iterator, _e = "@@iterator";
|
|
16
16
|
function Te(e) {
|
|
17
17
|
if (e === null || typeof e != "object")
|
|
18
18
|
return null;
|
|
@@ -24,10 +24,10 @@ function lr() {
|
|
|
24
24
|
{
|
|
25
25
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
26
26
|
t[n - 1] = arguments[n];
|
|
27
|
-
|
|
27
|
+
we("error", e, t);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function we(e, r, t) {
|
|
31
31
|
{
|
|
32
32
|
var n = h.ReactDebugCurrentFrame, o = n.getStackAddendum();
|
|
33
33
|
o !== "" && (r += "%s", t = t.concat([o]));
|
|
@@ -37,10 +37,10 @@ function lr() {
|
|
|
37
37
|
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
var
|
|
40
|
+
var Ce = !1, Se = !1, Oe = !1, Pe = !1, je = !1, z;
|
|
41
41
|
z = Symbol.for("react.module.reference");
|
|
42
42
|
function ke(e) {
|
|
43
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
43
|
+
return !!(typeof e == "string" || typeof e == "function" || e === w || e === N || je || e === K || e === F || e === A || Pe || e === me || Ce || Se || Oe || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === S || e.$$typeof === G || e.$$typeof === J || e.$$typeof === C || // This needs to include all possible module reference object
|
|
44
44
|
// types supported by any Flight configuration anywhere since
|
|
45
45
|
// we don't know which Flight build this will end up being used
|
|
46
46
|
// with.
|
|
@@ -64,7 +64,7 @@ function lr() {
|
|
|
64
64
|
if (typeof e == "string")
|
|
65
65
|
return e;
|
|
66
66
|
switch (e) {
|
|
67
|
-
case
|
|
67
|
+
case w:
|
|
68
68
|
return "Fragment";
|
|
69
69
|
case Re:
|
|
70
70
|
return "Portal";
|
|
@@ -85,9 +85,9 @@ function lr() {
|
|
|
85
85
|
case G:
|
|
86
86
|
var t = e;
|
|
87
87
|
return X(t._context) + ".Provider";
|
|
88
|
-
case w:
|
|
89
|
-
return xe(e, e.render, "ForwardRef");
|
|
90
88
|
case C:
|
|
89
|
+
return xe(e, e.render, "ForwardRef");
|
|
90
|
+
case S:
|
|
91
91
|
var n = e.displayName || null;
|
|
92
92
|
return n !== null ? n : p(e.type) || "Memo";
|
|
93
93
|
case D: {
|
|
@@ -275,9 +275,9 @@ function lr() {
|
|
|
275
275
|
}
|
|
276
276
|
if (typeof e == "object")
|
|
277
277
|
switch (e.$$typeof) {
|
|
278
|
-
case w:
|
|
279
|
-
return Ie(e.render);
|
|
280
278
|
case C:
|
|
279
|
+
return Ie(e.render);
|
|
280
|
+
case S:
|
|
281
281
|
return j(e.type);
|
|
282
282
|
case D: {
|
|
283
283
|
var n = e, o = n._payload, u = n._init;
|
|
@@ -519,9 +519,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
519
519
|
var t;
|
|
520
520
|
if (typeof r == "function")
|
|
521
521
|
t = r.propTypes;
|
|
522
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
522
|
+
else if (typeof r == "object" && (r.$$typeof === C || // Note: Memo only checks outer props here.
|
|
523
523
|
// Inner props are checked in the reconciler.
|
|
524
|
-
r.$$typeof ===
|
|
524
|
+
r.$$typeof === S))
|
|
525
525
|
t = r.propTypes;
|
|
526
526
|
else
|
|
527
527
|
return;
|
|
@@ -590,7 +590,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
590
590
|
<%s key={someKey} {...props} />`, B, b, ar, b), be[b + B] = !0;
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
return e ===
|
|
593
|
+
return e === w ? Qe(l) : Ze(l), l;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
function er(e, r, t) {
|
|
@@ -600,7 +600,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
600
600
|
return he(e, r, t, !1);
|
|
601
601
|
}
|
|
602
602
|
var tr = rr, nr = er;
|
|
603
|
-
T.Fragment =
|
|
603
|
+
T.Fragment = w, T.jsx = tr, T.jsxs = nr;
|
|
604
604
|
}(), T);
|
|
605
605
|
}
|
|
606
606
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exports as t } from "../../../_virtual/react-jsx-runtime.production.min.es.js";
|
|
2
|
-
import
|
|
2
|
+
import y from "react";
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -13,7 +13,7 @@ var p;
|
|
|
13
13
|
function v() {
|
|
14
14
|
if (p) return t;
|
|
15
15
|
p = 1;
|
|
16
|
-
var s =
|
|
16
|
+
var s = y, m = Symbol.for("react.element"), c = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, a = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
17
|
function i(o, r, u) {
|
|
18
18
|
var e, n = {}, _ = null, f = null;
|
|
19
19
|
u !== void 0 && (_ = "" + u), r.key !== void 0 && (_ = "" + r.key), r.ref !== void 0 && (f = r.ref);
|