@react-spectrum/s2 3.0.0-nightly-6193c40ee-240920 → 3.0.0-nightly-9421c1409-240922

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.
@@ -0,0 +1,74 @@
1
+ require("./Accordion.css");
2
+ var $4e301a98f0cc4e4f$exports = require("./Disclosure.cjs");
3
+ var $ac757a4c2bd72aee$exports = require("./useSpectrumContextProps.cjs");
4
+ var $etdk1$reactjsxruntime = require("react/jsx-runtime");
5
+ var $etdk1$reactariacomponents = require("react-aria-components");
6
+ var $etdk1$reactariautils = require("@react-aria/utils");
7
+ var $etdk1$react = require("react");
8
+ var $etdk1$reactspectrumutils = require("@react-spectrum/utils");
9
+
10
+
11
+ function $parcel$export(e, n, v, s) {
12
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
13
+ }
14
+
15
+ $parcel$export(module.exports, "AccordionContext", () => $152a25dfd79f123a$export$6bd5bb82c987ab74);
16
+ $parcel$export(module.exports, "Accordion", () => $152a25dfd79f123a$export$a766cd26d0d69044);
17
+ /*
18
+ * Copyright 2024 Adobe. All rights reserved.
19
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
20
+ * you may not use this file except in compliance with the License. You may obtain a copy
21
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
22
+ *
23
+ * Unless required by applicable law or agreed to in writing, software distributed under
24
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
25
+ * OF ANY KIND, either express or implied. See the License for the specific language
26
+ * governing permissions and limitations under the License.
27
+ */
28
+
29
+
30
+
31
+
32
+
33
+
34
+ const $152a25dfd79f123a$var$accordion = function anonymous(props, overrides) {
35
+ let rules = " .";
36
+ let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W|l|q|r|k|o|p)[^\s]+/g) || [];
37
+ rules += matches.join('');
38
+ rules += ' _Zd';
39
+ rules += ' _6b';
40
+ return rules;
41
+ };
42
+ const $152a25dfd79f123a$export$6bd5bb82c987ab74 = /*#__PURE__*/ (0, $etdk1$react.createContext)(null);
43
+ function $152a25dfd79f123a$var$Accordion(props, ref) {
44
+ [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $152a25dfd79f123a$export$6bd5bb82c987ab74);
45
+ let domRef = (0, $etdk1$reactspectrumutils.useDOMRef)(ref);
46
+ let { UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className = '', size: size = 'M', density: density = 'regular', isQuiet: isQuiet, isDisabled: isDisabled, ...otherProps } = props;
47
+ const domProps = (0, $etdk1$reactariautils.filterDOMProps)(otherProps);
48
+ return /*#__PURE__*/ (0, $etdk1$reactjsxruntime.jsx)((0, $etdk1$reactariacomponents.Provider), {
49
+ values: [
50
+ [
51
+ (0, $4e301a98f0cc4e4f$exports.DisclosureContext),
52
+ {
53
+ size: size,
54
+ isQuiet: isQuiet,
55
+ density: density,
56
+ isDisabled: isDisabled
57
+ }
58
+ ]
59
+ ],
60
+ children: /*#__PURE__*/ (0, $etdk1$reactjsxruntime.jsx)("div", {
61
+ ...domProps,
62
+ ref: domRef,
63
+ style: UNSAFE_style,
64
+ className: (UNSAFE_className ?? '') + $152a25dfd79f123a$var$accordion(null, props.styles),
65
+ children: props.children
66
+ })
67
+ });
68
+ }
69
+ /**
70
+ * An accordion is a container for multiple disclosures.
71
+ */ let $152a25dfd79f123a$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $etdk1$react.forwardRef)($152a25dfd79f123a$var$Accordion);
72
+
73
+
74
+ //# sourceMappingURL=Accordion.cjs.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAiCD,MAAM;;;;;;;;AAKC,MAAM,0DAAmB,CAAA,GAAA,0BAAY,EAA6D;AAEzG,SAAS,gCAAU,KAAqB,EAAE,GAA2B;IACnE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,gBACF,YAAY,oBACZ,mBAAmB,UACnB,OAAO,cACP,UAAU,oBACV,OAAO,cACP,UAAU,EACV,GAAG,YACJ,GAAG;IACJ,MAAM,WAAW,CAAA,GAAA,oCAAa,EAAE;IAChC,qBACE,gCAAC,CAAA,GAAA,mCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;0BAAC;6BAAM;6BAAS;gCAAS;gBAAU;aAAE;SAC1D;kBACD,cAAA,gCAAC;YACE,GAAG,QAAQ;YACZ,KAAK;YACL,OAAO;YACP,WAAW,AAAC,CAAA,oBAAoB,EAAC,IAAK,gCAAU,MAAM,MAAM,MAAM;sBACjE,MAAM,QAAQ;;;AAIvB;AAEA;;CAEC,GACD,IAAI,4CAA2B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB","sources":["packages/@react-spectrum/s2/src/Accordion.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, Provider, SlotProps} from 'react-aria-components';\nimport {DisclosureContext} from './Disclosure';\nimport {DOMProps, DOMRef, DOMRefValue, forwardRefType} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport React, {createContext, forwardRef} from 'react';\nimport {style} from '../style/spectrum-theme' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AccordionProps extends UnsafeStyles, DOMProps, SlotProps {\n /** The disclosure elements in the accordion. */\n children: React.ReactNode,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /**\n * The size of the accordion.\n * @default \"M\"\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The amount of space between the disclosure items.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular' | 'spacious',\n /** Whether the accordion should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Whether the accordion should be disabled. */\n isDisabled?: boolean\n}\n\nconst accordion = style({\n display: 'flex',\n flexDirection: 'column'\n}, getAllowedOverrides({height: true}));\n\nexport const AccordionContext = createContext<ContextValue<AccordionProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction Accordion(props: AccordionProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AccordionContext);\n let domRef = useDOMRef(ref);\n let {\n UNSAFE_style,\n UNSAFE_className = '',\n size = 'M',\n density = 'regular',\n isQuiet,\n isDisabled,\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density, isDisabled}]\n ]}>\n <div\n {...domProps}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + accordion(null, props.styles)}>\n {props.children}\n </div>\n </Provider>\n );\n}\n\n/**\n * An accordion is a container for multiple disclosures.\n */\nlet _Accordion = /*#__PURE__*/ (forwardRef as forwardRefType)(Accordion);\nexport {_Accordion as Accordion};\n"],"names":[],"version":3,"file":"Accordion.cjs.map"}
@@ -0,0 +1,16 @@
1
+ .\.:not(#a#b) {
2
+ all: revert-layer;
3
+ }
4
+
5
+ @layer _.a {
6
+ ._Zd {
7
+ display: flex;
8
+ }
9
+
10
+ ._6b {
11
+ flex-direction: column;
12
+ }
13
+ }
14
+
15
+ @layer _.b, UNSAFE_overrides;
16
+ /*# sourceMappingURL=Accordion.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"AA2CkB;;;;AAAA;EAAA;;;;EAAA;;;;;AAAA","sources":["packages/@react-spectrum/s2/src/Accordion.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, Provider, SlotProps} from 'react-aria-components';\nimport {DisclosureContext} from './Disclosure';\nimport {DOMProps, DOMRef, DOMRefValue, forwardRefType} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport React, {createContext, forwardRef} from 'react';\nimport {style} from '../style/spectrum-theme' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AccordionProps extends UnsafeStyles, DOMProps, SlotProps {\n /** The disclosure elements in the accordion. */\n children: React.ReactNode,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /**\n * The size of the accordion.\n * @default \"M\"\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The amount of space between the disclosure items.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular' | 'spacious',\n /** Whether the accordion should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Whether the accordion should be disabled. */\n isDisabled?: boolean\n}\n\nconst accordion = style({\n display: 'flex',\n flexDirection: 'column'\n}, getAllowedOverrides({height: true}));\n\nexport const AccordionContext = createContext<ContextValue<AccordionProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction Accordion(props: AccordionProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AccordionContext);\n let domRef = useDOMRef(ref);\n let {\n UNSAFE_style,\n UNSAFE_className = '',\n size = 'M',\n density = 'regular',\n isQuiet,\n isDisabled,\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density, isDisabled}]\n ]}>\n <div\n {...domProps}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + accordion(null, props.styles)}>\n {props.children}\n </div>\n </Provider>\n );\n}\n\n/**\n * An accordion is a container for multiple disclosures.\n */\nlet _Accordion = /*#__PURE__*/ (forwardRef as forwardRefType)(Accordion);\nexport {_Accordion as Accordion};\n"],"names":[],"version":3,"file":"Accordion.css.map"}
@@ -0,0 +1,68 @@
1
+ import "./Accordion.css";
2
+ import {DisclosureContext as $cf1d656285911959$export$d665dd135a51b28a} from "./Disclosure.mjs";
3
+ import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "./useSpectrumContextProps.mjs";
4
+ import {jsx as $cFlas$jsx} from "react/jsx-runtime";
5
+ import {Provider as $cFlas$Provider} from "react-aria-components";
6
+ import {filterDOMProps as $cFlas$filterDOMProps} from "@react-aria/utils";
7
+ import {createContext as $cFlas$createContext, forwardRef as $cFlas$forwardRef} from "react";
8
+ import {useDOMRef as $cFlas$useDOMRef} from "@react-spectrum/utils";
9
+
10
+ /*
11
+ * Copyright 2024 Adobe. All rights reserved.
12
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License. You may obtain a copy
14
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software distributed under
17
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
18
+ * OF ANY KIND, either express or implied. See the License for the specific language
19
+ * governing permissions and limitations under the License.
20
+ */
21
+
22
+
23
+
24
+
25
+
26
+
27
+ const $e0a5d45f488fa6ba$var$accordion = function anonymous(props, overrides) {
28
+ let rules = " .";
29
+ let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W|l|q|r|k|o|p)[^\s]+/g) || [];
30
+ rules += matches.join('');
31
+ rules += ' _Zd';
32
+ rules += ' _6b';
33
+ return rules;
34
+ };
35
+ const $e0a5d45f488fa6ba$export$6bd5bb82c987ab74 = /*#__PURE__*/ (0, $cFlas$createContext)(null);
36
+ function $e0a5d45f488fa6ba$var$Accordion(props, ref) {
37
+ [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $e0a5d45f488fa6ba$export$6bd5bb82c987ab74);
38
+ let domRef = (0, $cFlas$useDOMRef)(ref);
39
+ let { UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className = '', size: size = 'M', density: density = 'regular', isQuiet: isQuiet, isDisabled: isDisabled, ...otherProps } = props;
40
+ const domProps = (0, $cFlas$filterDOMProps)(otherProps);
41
+ return /*#__PURE__*/ (0, $cFlas$jsx)((0, $cFlas$Provider), {
42
+ values: [
43
+ [
44
+ (0, $cf1d656285911959$export$d665dd135a51b28a),
45
+ {
46
+ size: size,
47
+ isQuiet: isQuiet,
48
+ density: density,
49
+ isDisabled: isDisabled
50
+ }
51
+ ]
52
+ ],
53
+ children: /*#__PURE__*/ (0, $cFlas$jsx)("div", {
54
+ ...domProps,
55
+ ref: domRef,
56
+ style: UNSAFE_style,
57
+ className: (UNSAFE_className ?? '') + $e0a5d45f488fa6ba$var$accordion(null, props.styles),
58
+ children: props.children
59
+ })
60
+ });
61
+ }
62
+ /**
63
+ * An accordion is a container for multiple disclosures.
64
+ */ let $e0a5d45f488fa6ba$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $cFlas$forwardRef)($e0a5d45f488fa6ba$var$Accordion);
65
+
66
+
67
+ export {$e0a5d45f488fa6ba$export$6bd5bb82c987ab74 as AccordionContext, $e0a5d45f488fa6ba$export$a766cd26d0d69044 as Accordion};
68
+ //# sourceMappingURL=Accordion.mjs.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAiCD,MAAM;;;;;;;;AAKC,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAA6D;AAEzG,SAAS,gCAAU,KAAqB,EAAE,GAA2B;IACnE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,gBACF,YAAY,oBACZ,mBAAmB,UACnB,OAAO,cACP,UAAU,oBACV,OAAO,cACP,UAAU,EACV,GAAG,YACJ,GAAG;IACJ,MAAM,WAAW,CAAA,GAAA,qBAAa,EAAE;IAChC,qBACE,gBAAC,CAAA,GAAA,eAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;0BAAC;6BAAM;6BAAS;gCAAS;gBAAU;aAAE;SAC1D;kBACD,cAAA,gBAAC;YACE,GAAG,QAAQ;YACZ,KAAK;YACL,OAAO;YACP,WAAW,AAAC,CAAA,oBAAoB,EAAC,IAAK,gCAAU,MAAM,MAAM,MAAM;sBACjE,MAAM,QAAQ;;;AAIvB;AAEA;;CAEC,GACD,IAAI,4CAA2B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB","sources":["packages/@react-spectrum/s2/src/Accordion.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, Provider, SlotProps} from 'react-aria-components';\nimport {DisclosureContext} from './Disclosure';\nimport {DOMProps, DOMRef, DOMRefValue, forwardRefType} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport React, {createContext, forwardRef} from 'react';\nimport {style} from '../style/spectrum-theme' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AccordionProps extends UnsafeStyles, DOMProps, SlotProps {\n /** The disclosure elements in the accordion. */\n children: React.ReactNode,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /**\n * The size of the accordion.\n * @default \"M\"\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The amount of space between the disclosure items.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular' | 'spacious',\n /** Whether the accordion should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Whether the accordion should be disabled. */\n isDisabled?: boolean\n}\n\nconst accordion = style({\n display: 'flex',\n flexDirection: 'column'\n}, getAllowedOverrides({height: true}));\n\nexport const AccordionContext = createContext<ContextValue<AccordionProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction Accordion(props: AccordionProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AccordionContext);\n let domRef = useDOMRef(ref);\n let {\n UNSAFE_style,\n UNSAFE_className = '',\n size = 'M',\n density = 'regular',\n isQuiet,\n isDisabled,\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density, isDisabled}]\n ]}>\n <div\n {...domProps}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + accordion(null, props.styles)}>\n {props.children}\n </div>\n </Provider>\n );\n}\n\n/**\n * An accordion is a container for multiple disclosures.\n */\nlet _Accordion = /*#__PURE__*/ (forwardRef as forwardRefType)(Accordion);\nexport {_Accordion as Accordion};\n"],"names":[],"version":3,"file":"Accordion.mjs.map"}
@@ -0,0 +1,337 @@
1
+ require("./Disclosure.css");
2
+ var $e991cbcdf82ced71$exports = require("./CenterBaseline.cjs");
3
+ var $1df9f1c9262ce5df$exports = require("./Chevron.cjs");
4
+ var $ac757a4c2bd72aee$exports = require("./useSpectrumContextProps.cjs");
5
+ var $5FRIp$reactjsxruntime = require("react/jsx-runtime");
6
+ var $5FRIp$reactariacomponents = require("react-aria-components");
7
+ var $5FRIp$reactariautils = require("@react-aria/utils");
8
+ var $5FRIp$react = require("react");
9
+ var $5FRIp$reactspectrumutils = require("@react-spectrum/utils");
10
+
11
+
12
+ function $parcel$export(e, n, v, s) {
13
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
14
+ }
15
+
16
+ $parcel$export(module.exports, "DisclosureContext", () => $4e301a98f0cc4e4f$export$d665dd135a51b28a);
17
+ $parcel$export(module.exports, "Disclosure", () => $4e301a98f0cc4e4f$export$74a362b31437ec83);
18
+ $parcel$export(module.exports, "DisclosureHeader", () => $4e301a98f0cc4e4f$export$1e037ddd32f5b8ac);
19
+ $parcel$export(module.exports, "DisclosurePanel", () => $4e301a98f0cc4e4f$export$feabaa331e1d464c);
20
+ /*
21
+ * Copyright 2024 Adobe. All rights reserved.
22
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
23
+ * you may not use this file except in compliance with the License. You may obtain a copy
24
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
25
+ *
26
+ * Unless required by applicable law or agreed to in writing, software distributed under
27
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
28
+ * OF ANY KIND, either express or implied. See the License for the specific language
29
+ * governing permissions and limitations under the License.
30
+ */
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+ const $4e301a98f0cc4e4f$export$d665dd135a51b28a = /*#__PURE__*/ (0, $5FRIp$react.createContext)(null);
39
+ const $4e301a98f0cc4e4f$var$disclosure = function anonymous(props, overrides) {
40
+ let rules = " .";
41
+ let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W|l|q|r)[^\s]+/g) || [];
42
+ rules += matches.join('');
43
+ let $q = false;
44
+ for (let p of matches)if (/^\s*q/.test(p)) $q = true;
45
+ rules += ' ao';
46
+ if (props.isQuiet) rules += ' ua';
47
+ else rules += ' ub';
48
+ if (props.isQuiet) rules += ' v-uamghwa';
49
+ else rules += ' v-uamghwb';
50
+ rules += ' va';
51
+ rules += ' sa';
52
+ rules += ' ta';
53
+ rules += ' wa';
54
+ rules += ' ch';
55
+ if (!$q) {
56
+ rules += ' qb-z005a2';
57
+ rules += ' q-ffvo8f';
58
+ }
59
+ return rules;
60
+ };
61
+ function $4e301a98f0cc4e4f$var$Disclosure(props, ref) {
62
+ [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $4e301a98f0cc4e4f$export$d665dd135a51b28a);
63
+ let { size: size = 'M', density: density = 'regular', isQuiet: isQuiet, isDisabled: isDisabled } = props;
64
+ let domRef = (0, $5FRIp$reactspectrumutils.useDOMRef)(ref);
65
+ let { UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className = '', ...otherProps } = props;
66
+ const domProps = (0, $5FRIp$reactariautils.filterDOMProps)(otherProps);
67
+ return /*#__PURE__*/ (0, $5FRIp$reactjsxruntime.jsx)((0, $5FRIp$reactariacomponents.Provider), {
68
+ values: [
69
+ [
70
+ $4e301a98f0cc4e4f$export$d665dd135a51b28a,
71
+ {
72
+ size: size,
73
+ isQuiet: isQuiet,
74
+ density: density,
75
+ isDisabled: isDisabled
76
+ }
77
+ ]
78
+ ],
79
+ children: /*#__PURE__*/ (0, $5FRIp$reactjsxruntime.jsx)((0, $5FRIp$reactariacomponents.Disclosure), {
80
+ ...domProps,
81
+ isDisabled: isDisabled,
82
+ ref: domRef,
83
+ style: UNSAFE_style,
84
+ className: (UNSAFE_className ?? '') + $4e301a98f0cc4e4f$var$disclosure({
85
+ isQuiet: isQuiet
86
+ }, props.styles),
87
+ children: props.children
88
+ })
89
+ });
90
+ }
91
+ /**
92
+ * A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.
93
+ */ let $4e301a98f0cc4e4f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $5FRIp$react.forwardRef)($4e301a98f0cc4e4f$var$Disclosure);
94
+ const $4e301a98f0cc4e4f$var$headingStyle = " . Aa Ba ya za";
95
+ const $4e301a98f0cc4e4f$var$buttonStyles = function anonymous(props) {
96
+ let rules = " .";
97
+ if (props.isFocusVisible) rules += ' _Lb';
98
+ else rules += ' _La';
99
+ rules += ' da_____z';
100
+ rules += ' dx';
101
+ rules += ' _Nc';
102
+ rules += ' _M-3hmpw';
103
+ rules += ' _c-bc1l9oh';
104
+ rules += ' _c-1uotwbwg';
105
+ rules += ' _c-eo0c6sf';
106
+ rules += ' _c-enzzrge';
107
+ rules += ' _c-enzykdd';
108
+ rules += ' _c-enzwzjc';
109
+ rules += ' _c-enzrfpb';
110
+ rules += ' _ca';
111
+ if (props.size === "XL") {
112
+ rules += ' _dbo';
113
+ rules += ' _dn';
114
+ } else if (props.size === "L") {
115
+ rules += ' _dbm';
116
+ rules += ' _dj';
117
+ } else if (props.size === "M") {
118
+ rules += ' _dbj';
119
+ rules += ' _di';
120
+ } else if (props.size === "S") {
121
+ rules += ' _dbh';
122
+ rules += ' _dg';
123
+ }
124
+ rules += ' _ed';
125
+ rules += ' _f-1x99dlob';
126
+ rules += ' _fa';
127
+ if (props.isDisabled) rules += ' aj';
128
+ else {
129
+ if (props.isPressed) rules += ' ao';
130
+ else if (props.isFocusVisible) rules += ' ao';
131
+ else if (props.isHovered) rules += ' ao';
132
+ else rules += ' an';
133
+ }
134
+ rules += ' _Zd';
135
+ rules += ' _1d';
136
+ rules += ' C-10cd9hn';
137
+ rules += ' D-10cd9hn';
138
+ rules += ' E-1dbqcch';
139
+ rules += ' F-1dbqcch';
140
+ rules += ' i-10cd9hn';
141
+ rules += ' j-10cd9hn';
142
+ rules += ' o-375tou';
143
+ rules += ' l4';
144
+ if (props.isHovered) rules += ' b_____k';
145
+ else if (props.isFocusVisible) rules += ' b_____k';
146
+ else rules += ' ba';
147
+ rules += ' u-375tp0';
148
+ rules += ' v-375tp1';
149
+ rules += ' sa';
150
+ rules += ' ta';
151
+ if (props.isQuiet) {
152
+ if (props.isFocusVisible) rules += ' _vh';
153
+ else if (props.isHovered) rules += ' _vh';
154
+ } else if (props.isFocusVisible) rules += ' _vh';
155
+ else rules += ' _va';
156
+ if (props.isQuiet) {
157
+ if (props.isFocusVisible) rules += ' _wh';
158
+ else if (props.isHovered) rules += ' _wh';
159
+ } else if (props.isFocusVisible) rules += ' _wh';
160
+ else rules += ' _wa';
161
+ if (props.isQuiet) {
162
+ if (props.isFocusVisible) rules += ' _xh';
163
+ else if (props.isHovered) rules += ' _xh';
164
+ } else if (props.isFocusVisible) rules += ' _xh';
165
+ else rules += ' _xa';
166
+ if (props.isQuiet) {
167
+ if (props.isFocusVisible) rules += ' _yh';
168
+ else if (props.isHovered) rules += ' _yh';
169
+ } else if (props.isFocusVisible) rules += ' _yh';
170
+ else rules += ' _ya';
171
+ rules += ' _ja';
172
+ rules += ' __R-yksgrp';
173
+ if (props.size === "XL") {
174
+ if (props.density === "spacious") {
175
+ rules += ' -_375tou_o-bC';
176
+ rules += ' -_375tou_o-B';
177
+ } else if (props.density === "regular") {
178
+ rules += ' -_375tou_o-bA';
179
+ rules += ' -_375tou_o-z';
180
+ } else if (props.density === "compact") {
181
+ rules += ' -_375tou_o-by';
182
+ rules += ' -_375tou_o-x';
183
+ }
184
+ } else if (props.size === "L") {
185
+ if (props.density === "spacious") {
186
+ rules += ' -_375tou_o-bA';
187
+ rules += ' -_375tou_o-z';
188
+ } else if (props.density === "regular") {
189
+ rules += ' -_375tou_o-by';
190
+ rules += ' -_375tou_o-x';
191
+ } else if (props.density === "compact") {
192
+ rules += ' -_375tou_o-bu';
193
+ rules += ' -_375tou_o-r';
194
+ }
195
+ } else if (props.size === "M") {
196
+ if (props.density === "spacious") {
197
+ rules += ' -_375tou_o-by';
198
+ rules += ' -_375tou_o-x';
199
+ } else if (props.density === "regular") {
200
+ rules += ' -_375tou_o-bu';
201
+ rules += ' -_375tou_o-r';
202
+ } else if (props.density === "compact") {
203
+ rules += ' -_375tou_o-br';
204
+ rules += ' -_375tou_o-q';
205
+ }
206
+ } else if (props.size === "S") {
207
+ if (props.density === "spacious") {
208
+ rules += ' -_375tou_o-bu';
209
+ rules += ' -_375tou_o-r';
210
+ } else if (props.density === "regular") {
211
+ rules += ' -_375tou_o-br';
212
+ rules += ' -_375tou_o-q';
213
+ } else if (props.density === "compact") {
214
+ rules += ' -_375tou_o-bn';
215
+ rules += ' -_375tou_o-m';
216
+ }
217
+ }
218
+ rules += ' -_375tp0_u-a';
219
+ rules += ' -_375tp1_v-a';
220
+ return rules;
221
+ };
222
+ const $4e301a98f0cc4e4f$var$chevronStyles = function anonymous(props) {
223
+ let rules = " .";
224
+ if (props.isExpanded) rules += ' R-3hn0u';
225
+ else if (props.isRTL) rules += ' R-375xa6';
226
+ rules += ' _Q-37j0s6';
227
+ rules += ' -rwx0fg_e-b';
228
+ rules += ' _8-3t1x';
229
+ return rules;
230
+ };
231
+ function $4e301a98f0cc4e4f$var$DisclosureHeader(props, ref) {
232
+ let { level: level = 3, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className = '', ...otherProps } = props;
233
+ let domRef = (0, $5FRIp$reactspectrumutils.useDOMRef)(ref);
234
+ const domProps = (0, $5FRIp$reactariautils.filterDOMProps)(otherProps);
235
+ let { direction: direction } = (0, $5FRIp$reactariacomponents.useLocale)();
236
+ let { isExpanded: isExpanded } = (0, $5FRIp$react.useContext)((0, $5FRIp$reactariacomponents.DisclosureStateContext));
237
+ let { size: size, density: density, isQuiet: isQuiet } = (0, $5FRIp$reactariacomponents.useSlottedContext)($4e301a98f0cc4e4f$export$d665dd135a51b28a);
238
+ let isRTL = direction === 'rtl';
239
+ return /*#__PURE__*/ (0, $5FRIp$reactjsxruntime.jsx)((0, $5FRIp$reactariacomponents.Heading), {
240
+ ...domProps,
241
+ level: level,
242
+ ref: domRef,
243
+ style: UNSAFE_style,
244
+ className: (UNSAFE_className ?? '') + $4e301a98f0cc4e4f$var$headingStyle,
245
+ children: /*#__PURE__*/ (0, $5FRIp$reactjsxruntime.jsxs)((0, $5FRIp$reactariacomponents.Button), {
246
+ className: ({ isHovered: isHovered, isFocused: isFocused, isFocusVisible: isFocusVisible, isDisabled: isDisabled })=>$4e301a98f0cc4e4f$var$buttonStyles({
247
+ size: size,
248
+ isHovered: isHovered,
249
+ isFocused: isFocused,
250
+ isFocusVisible: isFocusVisible,
251
+ density: density,
252
+ isQuiet: isQuiet,
253
+ isDisabled: isDisabled
254
+ }),
255
+ slot: "trigger",
256
+ children: [
257
+ /*#__PURE__*/ (0, $5FRIp$reactjsxruntime.jsx)((0, $e991cbcdf82ced71$exports.CenterBaseline), {
258
+ children: /*#__PURE__*/ (0, $5FRIp$reactjsxruntime.jsx)((0, $1df9f1c9262ce5df$exports.default), {
259
+ size: size,
260
+ className: $4e301a98f0cc4e4f$var$chevronStyles({
261
+ isExpanded: isExpanded,
262
+ isRTL: isRTL
263
+ }),
264
+ "aria-hidden": "true"
265
+ })
266
+ }),
267
+ props.children
268
+ ]
269
+ })
270
+ });
271
+ }
272
+ /**
273
+ * A header for a disclosure. Contains a heading and a trigger button to expand/collapse the panel.
274
+ */ let $4e301a98f0cc4e4f$export$1e037ddd32f5b8ac = /*#__PURE__*/ (0, $5FRIp$react.forwardRef)($4e301a98f0cc4e4f$var$DisclosureHeader);
275
+ const $4e301a98f0cc4e4f$var$panelStyles = function anonymous(props) {
276
+ let rules = " .";
277
+ rules += ' _c-bc1l9oh';
278
+ rules += ' _c-1uotwbwg';
279
+ rules += ' _c-eo0c6sf';
280
+ rules += ' _c-enzzrge';
281
+ rules += ' _c-enzykdd';
282
+ rules += ' _c-enzwzjc';
283
+ rules += ' _c-enzrfpb';
284
+ rules += ' _ca';
285
+ rules += ' _dbh';
286
+ rules += ' _dg';
287
+ rules += ' _eb';
288
+ rules += ' _f-1x99dloc';
289
+ rules += ' _fb';
290
+ rules += ' an';
291
+ if (props.isExpanded) rules += ' Ed';
292
+ if (props.isExpanded) rules += ' Ff';
293
+ if (props.isExpanded) {
294
+ if (props.size === "XL") {
295
+ rules += ' Cb-yk4pb9';
296
+ rules += ' C-1p15uv3';
297
+ } else if (props.size === "L") rules += ' Ce';
298
+ else if (props.size === "M") {
299
+ rules += ' Cb-1itkwgp';
300
+ rules += ' C-1ch0ogp';
301
+ } else if (props.size === "S") rules += ' Cd';
302
+ }
303
+ if (props.isExpanded) {
304
+ if (props.size === "XL") {
305
+ rules += ' Db-yk4pb9';
306
+ rules += ' D-1p15uv3';
307
+ } else if (props.size === "L") rules += ' De';
308
+ else if (props.size === "M") {
309
+ rules += ' Db-1itkwgp';
310
+ rules += ' D-1ch0ogp';
311
+ } else if (props.size === "S") rules += ' Dd';
312
+ }
313
+ return rules;
314
+ };
315
+ function $4e301a98f0cc4e4f$var$DisclosurePanel(props, ref) {
316
+ let { UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className = '', ...otherProps } = props;
317
+ const domProps = (0, $5FRIp$reactariautils.filterDOMProps)(otherProps);
318
+ let { size: size } = (0, $5FRIp$reactariacomponents.useSlottedContext)($4e301a98f0cc4e4f$export$d665dd135a51b28a);
319
+ let { isExpanded: isExpanded } = (0, $5FRIp$react.useContext)((0, $5FRIp$reactariacomponents.DisclosureStateContext));
320
+ let panelRef = (0, $5FRIp$reactspectrumutils.useDOMRef)(ref);
321
+ return /*#__PURE__*/ (0, $5FRIp$reactjsxruntime.jsx)((0, $5FRIp$reactariacomponents.DisclosurePanel), {
322
+ ...domProps,
323
+ ref: panelRef,
324
+ style: UNSAFE_style,
325
+ className: (UNSAFE_className ?? '') + $4e301a98f0cc4e4f$var$panelStyles({
326
+ size: size,
327
+ isExpanded: isExpanded
328
+ }),
329
+ children: props.children
330
+ });
331
+ }
332
+ /**
333
+ * A disclosure panel is a collapsible section of content that is hidden until the disclosure is expanded.
334
+ */ let $4e301a98f0cc4e4f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $5FRIp$react.forwardRef)($4e301a98f0cc4e4f$var$DisclosurePanel);
335
+
336
+
337
+ //# sourceMappingURL=Disclosure.cjs.map
@@ -0,0 +1 @@
1
+ {"mappings":"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","sources":["packages/@react-spectrum/s2/src/Disclosure.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue, forwardRefType} from '@react-types/shared';\nimport {Button, ContextValue, DisclosureStateContext, Heading, Provider, Disclosure as RACDisclosure, DisclosurePanel as RACDisclosurePanel, DisclosurePanelProps as RACDisclosurePanelProps, DisclosureProps as RACDisclosureProps, useLocale, useSlottedContext} from 'react-aria-components';\nimport {CenterBaseline} from './CenterBaseline';\nimport {centerPadding, focusRing, getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport Chevron from '../ui-icons/Chevron';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {createContext, forwardRef, ReactElement, useContext} from 'react';\nimport {size as sizeValue, style} from '../style/spectrum-theme' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface DisclosureProps extends RACDisclosureProps, StyleProps, DOMProps {\n /**\n * The size of the disclosure.\n * @default \"M\"\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The amount of space between the disclosures.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular' | 'spacious',\n /** Whether the disclosure should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** The contents of the disclosure, consisting of an DisclosureHeader and DisclosurePanel. */\n children: [ReactElement<DisclosureHeaderProps>, ReactElement<DisclosurePanelProps>]\n}\n\nexport const DisclosureContext = createContext<ContextValue<Omit<DisclosureProps, 'children'>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst disclosure = style({\n color: 'heading',\n borderTopWidth: {\n default: 1,\n isQuiet: 0\n },\n borderBottomWidth: {\n default: 0,\n ':last-child': {\n default: 1,\n isQuiet: 0\n }\n },\n borderStartWidth: 0,\n borderEndWidth: 0,\n borderStyle: 'solid',\n borderColor: 'gray-200',\n minWidth: sizeValue(200)\n}, getAllowedOverrides());\n\nfunction Disclosure(props: DisclosureProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, DisclosureContext);\n let {\n size = 'M',\n density = 'regular',\n isQuiet, isDisabled\n } = props;\n let domRef = useDOMRef(ref);\n let {\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density, isDisabled}]\n ]}>\n <RACDisclosure\n {...domProps}\n isDisabled={isDisabled}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + disclosure({isQuiet}, props.styles)}>\n {props.children}\n </RACDisclosure>\n </Provider>\n );\n}\n\n/**\n * A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.\n */\nlet _Disclosure = /*#__PURE__*/ (forwardRef as forwardRefType)(Disclosure);\nexport {_Disclosure as Disclosure};\n\nexport interface DisclosureHeaderProps extends UnsafeStyles, DOMProps {\n /** The heading level of the disclosure header.\n * \n * @default 3\n */\n level?: number,\n children: React.ReactNode\n}\n\nconst headingStyle = style({\n margin: 0\n});\n\nconst buttonStyles = style({\n ...focusRing(),\n outlineOffset: -2,\n font: 'heading',\n color: {\n default: 'neutral',\n isDisabled: 'disabled'\n },\n fontWeight: 'bold',\n fontSize: {\n size: {\n S: 'heading-xs',\n M: 'heading-sm',\n L: 'heading',\n XL: 'heading-lg'\n }\n },\n lineHeight: 'ui',\n display: 'flex',\n alignItems: 'baseline',\n paddingX: '[calc(self(minHeight) * 3/8 - 1px)]',\n paddingY: centerPadding(),\n gap: '[calc(self(minHeight) * 3/8 - 1px)]',\n minHeight: {\n // compact is equivalent to 'control', but other densities have more padding.\n size: {\n S: {\n density: {\n compact: 24,\n regular: 32,\n spacious: 40\n }\n },\n M: {\n density: {\n compact: 32,\n regular: 40,\n spacious: 48\n }\n },\n L: {\n density: {\n compact: 40,\n regular: 48,\n spacious: 56\n }\n },\n XL: {\n density: {\n compact: 48,\n regular: 56,\n spacious: 64\n }\n }\n }\n },\n width: 'full',\n backgroundColor: {\n default: 'transparent',\n isFocusVisible: 'transparent-black-100',\n isHovered: 'transparent-black-100'\n },\n borderWidth: 0,\n borderRadius: {\n // Only rounded for keyboard focus and quiet hover.\n default: 'none',\n isFocusVisible: 'control',\n isQuiet: {\n isHovered: 'control',\n isFocusVisible: 'control'\n }\n },\n textAlign: 'start',\n disableTapHighlight: true\n});\n\nconst chevronStyles = style({\n rotate: {\n isRTL: 180,\n isExpanded: 90\n },\n transitionDuration: '100ms',\n transitionProperty: 'rotate',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n flexShrink: 0\n});\n\nfunction DisclosureHeader(props: DisclosureHeaderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n level = 3,\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n const domProps = filterDOMProps(otherProps);\n let {direction} = useLocale();\n let {isExpanded} = useContext(DisclosureStateContext)!;\n let {size, density, isQuiet} = useSlottedContext(DisclosureContext)!;\n let isRTL = direction === 'rtl';\n return (\n <Heading\n {...domProps}\n level={level}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + headingStyle}>\n <Button className={({isHovered, isFocused, isFocusVisible, isDisabled}) => buttonStyles({size, isHovered, isFocused, isFocusVisible, density, isQuiet, isDisabled})} slot=\"trigger\">\n <CenterBaseline>\n <Chevron size={size} className={chevronStyles({isExpanded, isRTL})} aria-hidden=\"true\" />\n </CenterBaseline>\n {props.children}\n </Button>\n </Heading>\n );\n}\n\n/**\n * A header for a disclosure. Contains a heading and a trigger button to expand/collapse the panel.\n */\nlet _DisclosureHeader = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosureHeader);\nexport {_DisclosureHeader as DisclosureHeader};\n\nexport interface DisclosurePanelProps extends RACDisclosurePanelProps, UnsafeStyles, DOMProps, AriaLabelingProps {\n children: React.ReactNode\n}\n\nconst panelStyles = style({\n font: 'body',\n paddingTop: {\n isExpanded: 8\n },\n paddingBottom: {\n isExpanded: 16\n },\n paddingX: {\n isExpanded: {\n size: {\n S: 8,\n M: sizeValue(9),\n L: 12,\n XL: sizeValue(15)\n }\n }\n }\n});\n\nfunction DisclosurePanel(props: DisclosurePanelProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n let {size} = useSlottedContext(DisclosureContext)!;\n let {isExpanded} = useContext(DisclosureStateContext)!;\n let panelRef = useDOMRef(ref);\n return (\n <RACDisclosurePanel\n {...domProps}\n ref={panelRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + panelStyles({size, isExpanded})}>\n {props.children}\n </RACDisclosurePanel>\n );\n}\n\n/**\n * A disclosure panel is a collapsible section of content that is hidden until the disclosure is expanded.\n */\nlet _DisclosurePanel = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosurePanel);\nexport {_DisclosurePanel as DisclosurePanel};\n\n"],"names":[],"version":3,"file":"Disclosure.cjs.map"}