@react-spectrum/accordion 3.0.16 → 3.1.0

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/import.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import {Accordion as $2a5a5b7faca81754$export$a766cd26d0d69044, Disclosure as $2a5a5b7faca81754$export$74a362b31437ec83, DisclosurePanel as $2a5a5b7faca81754$export$feabaa331e1d464c, DisclosureTitle as $2a5a5b7faca81754$export$7843c6a5b3e340a2} from "./Accordion.mjs";
1
+ import {Disclosure as $0c4714b968264404$re_export$Disclosure, Accordion as $0c4714b968264404$re_export$Accordion, DisclosureTitle as $0c4714b968264404$re_export$DisclosureTitle, DisclosurePanel as $0c4714b968264404$re_export$DisclosurePanel} from "@adobe/react-spectrum/Accordion";
2
2
 
3
3
  /*
4
4
  * Copyright 2020 Adobe. All rights reserved.
@@ -14,5 +14,5 @@ import {Accordion as $2a5a5b7faca81754$export$a766cd26d0d69044, Disclosure as $2
14
14
 
15
15
 
16
16
 
17
- export {$2a5a5b7faca81754$export$74a362b31437ec83 as Disclosure, $2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion, $2a5a5b7faca81754$export$7843c6a5b3e340a2 as DisclosureTitle, $2a5a5b7faca81754$export$feabaa331e1d464c as DisclosurePanel};
17
+ export {$0c4714b968264404$re_export$Disclosure as Disclosure, $0c4714b968264404$re_export$Accordion as Accordion, $0c4714b968264404$re_export$DisclosureTitle as DisclosureTitle, $0c4714b968264404$re_export$DisclosurePanel as DisclosurePanel};
18
18
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,14 +1,14 @@
1
- var $d8f45715b3ce327a$exports = require("./Accordion.main.js");
1
+ var $kkjcm$adobereactspectrumAccordion = require("@adobe/react-spectrum/Accordion");
2
2
 
3
3
 
4
4
  function $parcel$export(e, n, v, s) {
5
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
6
  }
7
7
 
8
- $parcel$export(module.exports, "Disclosure", () => $d8f45715b3ce327a$exports.Disclosure);
9
- $parcel$export(module.exports, "Accordion", () => $d8f45715b3ce327a$exports.Accordion);
10
- $parcel$export(module.exports, "DisclosureTitle", () => $d8f45715b3ce327a$exports.DisclosureTitle);
11
- $parcel$export(module.exports, "DisclosurePanel", () => $d8f45715b3ce327a$exports.DisclosurePanel);
8
+ $parcel$export(module.exports, "Disclosure", function () { return $kkjcm$adobereactspectrumAccordion.Disclosure; });
9
+ $parcel$export(module.exports, "Accordion", function () { return $kkjcm$adobereactspectrumAccordion.Accordion; });
10
+ $parcel$export(module.exports, "DisclosureTitle", function () { return $kkjcm$adobereactspectrumAccordion.DisclosureTitle; });
11
+ $parcel$export(module.exports, "DisclosurePanel", function () { return $kkjcm$adobereactspectrumAccordion.DisclosurePanel; });
12
12
  /*
13
13
  * Copyright 2020 Adobe. All rights reserved.
14
14
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/accordion/src/index.ts"],"sourcesContent":["/*\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/// <reference types=\"css-module-types\" />\nexport {Disclosure, Accordion, DisclosureTitle, DisclosurePanel} from './Accordion';\nexport type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps} from './Accordion';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/accordion/src/index.ts"],"sourcesContent":["/*\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/// <reference types=\"css-module-types\" />\nexport {Disclosure, Accordion, DisclosureTitle, DisclosurePanel} from '@adobe/react-spectrum/Accordion';\n\nexport type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps} from '@adobe/react-spectrum/Accordion';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,4 +1,4 @@
1
- import {Accordion as $2a5a5b7faca81754$export$a766cd26d0d69044, Disclosure as $2a5a5b7faca81754$export$74a362b31437ec83, DisclosurePanel as $2a5a5b7faca81754$export$feabaa331e1d464c, DisclosureTitle as $2a5a5b7faca81754$export$7843c6a5b3e340a2} from "./Accordion.module.js";
1
+ import {Disclosure as $0c4714b968264404$re_export$Disclosure, Accordion as $0c4714b968264404$re_export$Accordion, DisclosureTitle as $0c4714b968264404$re_export$DisclosureTitle, DisclosurePanel as $0c4714b968264404$re_export$DisclosurePanel} from "@adobe/react-spectrum/Accordion";
2
2
 
3
3
  /*
4
4
  * Copyright 2020 Adobe. All rights reserved.
@@ -14,5 +14,5 @@ import {Accordion as $2a5a5b7faca81754$export$a766cd26d0d69044, Disclosure as $2
14
14
 
15
15
 
16
16
 
17
- export {$2a5a5b7faca81754$export$74a362b31437ec83 as Disclosure, $2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion, $2a5a5b7faca81754$export$7843c6a5b3e340a2 as DisclosureTitle, $2a5a5b7faca81754$export$feabaa331e1d464c as DisclosurePanel};
17
+ export {$0c4714b968264404$re_export$Disclosure as Disclosure, $0c4714b968264404$re_export$Accordion as Accordion, $0c4714b968264404$re_export$DisclosureTitle as DisclosureTitle, $0c4714b968264404$re_export$DisclosurePanel as DisclosurePanel};
18
18
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/accordion/src/index.ts"],"sourcesContent":["/*\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/// <reference types=\"css-module-types\" />\nexport {Disclosure, Accordion, DisclosureTitle, DisclosurePanel} from './Accordion';\nexport type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps} from './Accordion';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/accordion/src/index.ts"],"sourcesContent":["/*\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/// <reference types=\"css-module-types\" />\nexport {Disclosure, Accordion, DisclosureTitle, DisclosurePanel} from '@adobe/react-spectrum/Accordion';\n\nexport type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps} from '@adobe/react-spectrum/Accordion';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,2 @@
1
+ export { Disclosure, Accordion, DisclosureTitle, DisclosurePanel } from '@adobe/react-spectrum/Accordion';
2
+ export type { SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps } from '@adobe/react-spectrum/Accordion';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@react-spectrum/accordion",
3
- "version": "3.0.16",
3
+ "version": "3.1.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
8
  "exports": {
9
- "source": "./src/index.ts",
10
- "types": [
11
- "./dist/types.d.ts",
12
- "./src/index.ts"
13
- ],
14
- "import": "./dist/import.mjs",
15
- "require": "./dist/main.js"
9
+ ".": {
10
+ "source": "./src/index.ts",
11
+ "types": "./dist/types/src/index.d.ts",
12
+ "import": "./dist/import.mjs",
13
+ "require": "./dist/main.js"
14
+ },
15
+ "./package.json": "./package.json"
16
16
  },
17
- "types": "dist/types.d.ts",
17
+ "types": "dist/types/src/index.d.ts",
18
18
  "source": "src/index.ts",
19
19
  "files": [
20
20
  "dist",
@@ -24,39 +24,22 @@
24
24
  "*.css"
25
25
  ],
26
26
  "targets": {
27
- "main": {
28
- "includeNodeModules": [
29
- "@adobe/spectrum-css-temp"
30
- ]
31
- },
32
- "module": {
33
- "includeNodeModules": [
34
- "@adobe/spectrum-css-temp"
35
- ]
36
- }
27
+ "types": false
37
28
  },
38
29
  "repository": {
39
30
  "type": "git",
40
31
  "url": "https://github.com/adobe/react-spectrum"
41
32
  },
42
33
  "dependencies": {
43
- "@react-aria/i18n": "^3.12.16",
44
- "@react-spectrum/utils": "^3.12.12",
45
- "@react-types/shared": "^3.33.1",
46
- "@spectrum-icons/ui": "^3.6.23",
47
- "@swc/helpers": "^0.5.0",
48
- "react-aria-components": "^1.16.0"
49
- },
50
- "devDependencies": {
51
- "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
34
+ "@adobe/react-spectrum": "3.47.0",
35
+ "@swc/helpers": "^0.5.0"
52
36
  },
53
37
  "peerDependencies": {
54
- "@react-spectrum/provider": "^3.0.0",
55
38
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
56
39
  "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
57
40
  },
58
41
  "publishConfig": {
59
42
  "access": "public"
60
43
  },
61
- "gitHead": "8df187370053aa35f553cb388ad670f65e1ab371"
44
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
62
45
  }
package/src/index.ts CHANGED
@@ -10,5 +10,6 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
  /// <reference types="css-module-types" />
13
- export {Disclosure, Accordion, DisclosureTitle, DisclosurePanel} from './Accordion';
14
- export type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps} from './Accordion';
13
+ export {Disclosure, Accordion, DisclosureTitle, DisclosurePanel} from '@adobe/react-spectrum/Accordion';
14
+
15
+ export type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps} from '@adobe/react-spectrum/Accordion';
@@ -1,115 +0,0 @@
1
- require("./accordion.b7c92819.css");
2
- var $5ab573b23bc1d039$exports = require("./accordion_vars_css.main.js");
3
- var $52xbb$reactariacomponents = require("react-aria-components");
4
- var $52xbb$spectrumiconsuiChevronLeftMedium = require("@spectrum-icons/ui/ChevronLeftMedium");
5
- var $52xbb$spectrumiconsuiChevronRightMedium = require("@spectrum-icons/ui/ChevronRightMedium");
6
- var $52xbb$reactspectrumutils = require("@react-spectrum/utils");
7
- var $52xbb$react = require("react");
8
- var $52xbb$reactariai18n = require("@react-aria/i18n");
9
- var $52xbb$reactspectrumprovider = require("@react-spectrum/provider");
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
-
16
- function $parcel$export(e, n, v, s) {
17
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
18
- }
19
-
20
- $parcel$export(module.exports, "Accordion", () => $d8f45715b3ce327a$export$a766cd26d0d69044);
21
- $parcel$export(module.exports, "Disclosure", () => $d8f45715b3ce327a$export$74a362b31437ec83);
22
- $parcel$export(module.exports, "DisclosurePanel", () => $d8f45715b3ce327a$export$feabaa331e1d464c);
23
- $parcel$export(module.exports, "DisclosureTitle", () => $d8f45715b3ce327a$export$7843c6a5b3e340a2);
24
- /*
25
- * Copyright 2020 Adobe. All rights reserved.
26
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
27
- * you may not use this file except in compliance with the License. You may obtain a copy
28
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
29
- *
30
- * Unless required by applicable law or agreed to in writing, software distributed under
31
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
32
- * OF ANY KIND, either express or implied. See the License for the specific language
33
- * governing permissions and limitations under the License.
34
- */
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
- const $d8f45715b3ce327a$var$InternalAccordionContext = /*#__PURE__*/ (0, $52xbb$react.createContext)(null);
43
- const $d8f45715b3ce327a$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $52xbb$react.forwardRef)(function Accordion(props, ref) {
44
- props = (0, $52xbb$reactspectrumprovider.useProviderProps)(props);
45
- let { styleProps: styleProps } = (0, $52xbb$reactspectrumutils.useStyleProps)(props);
46
- let domRef = (0, $52xbb$reactspectrumutils.useDOMRef)(ref);
47
- return /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement($d8f45715b3ce327a$var$InternalAccordionContext.Provider, {
48
- value: {
49
- isQuiet: props.isQuiet || false
50
- }
51
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, $52xbb$reactariacomponents.DisclosureGroup), {
52
- ...props,
53
- ...styleProps,
54
- ref: domRef,
55
- className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion', styleProps.className)
56
- }, props.children));
57
- });
58
- const $d8f45715b3ce327a$export$74a362b31437ec83 = /*#__PURE__*/ (0, $52xbb$react.forwardRef)(function Disclosure(props, ref) {
59
- props = (0, $52xbb$reactspectrumprovider.useProviderProps)(props);
60
- let { styleProps: styleProps } = (0, $52xbb$reactspectrumutils.useStyleProps)(props);
61
- let domRef = (0, $52xbb$reactspectrumutils.useDOMRef)(ref);
62
- let accordionContext = (0, ($parcel$interopDefault($52xbb$react))).useContext($d8f45715b3ce327a$var$InternalAccordionContext);
63
- return /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, $52xbb$reactariacomponents.Disclosure), {
64
- ...props,
65
- ...styleProps,
66
- ref: domRef,
67
- className: ({ isExpanded: isExpanded, isDisabled: isDisabled })=>{
68
- var _accordionContext_isQuiet;
69
- return (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-item', {
70
- 'spectrum-Accordion-item--quiet': (_accordionContext_isQuiet = accordionContext === null || accordionContext === void 0 ? void 0 : accordionContext.isQuiet) !== null && _accordionContext_isQuiet !== void 0 ? _accordionContext_isQuiet : props.isQuiet,
71
- 'is-expanded': isExpanded,
72
- 'is-disabled': isDisabled,
73
- 'in-accordion': accordionContext != null
74
- }, styleProps.className);
75
- }
76
- }, props.children);
77
- });
78
- const $d8f45715b3ce327a$export$feabaa331e1d464c = /*#__PURE__*/ (0, $52xbb$react.forwardRef)(function DisclosurePanel(props, ref) {
79
- let { styleProps: styleProps } = (0, $52xbb$reactspectrumutils.useStyleProps)(props);
80
- let domRef = (0, $52xbb$reactspectrumutils.useDOMRef)(ref);
81
- return /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, $52xbb$reactariacomponents.DisclosurePanel), {
82
- ref: domRef,
83
- ...styleProps,
84
- className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemContent', styleProps.className),
85
- ...props
86
- }, props.children);
87
- });
88
- const $d8f45715b3ce327a$export$7843c6a5b3e340a2 = /*#__PURE__*/ (0, $52xbb$react.forwardRef)(function DisclosureTitle(props, ref) {
89
- let { styleProps: styleProps } = (0, $52xbb$reactspectrumutils.useStyleProps)(props);
90
- let { level: level = 3 } = props;
91
- let { direction: direction } = (0, $52xbb$reactariai18n.useLocale)();
92
- let domRef = (0, $52xbb$reactspectrumutils.useDOMRef)(ref);
93
- return /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, $52xbb$reactariacomponents.Heading), {
94
- ref: domRef,
95
- level: level,
96
- ...styleProps,
97
- className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemHeading', styleProps.className)
98
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, $52xbb$reactariacomponents.Button), {
99
- slot: "trigger",
100
- className: ({ isHovered: isHovered, isFocusVisible: isFocusVisible, isPressed: isPressed })=>(0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemHeader', {
101
- 'is-hovered': isHovered,
102
- 'is-pressed': isPressed,
103
- 'focus-ring': isFocusVisible
104
- })
105
- }, direction === 'ltr' ? /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, ($parcel$interopDefault($52xbb$spectrumiconsuiChevronRightMedium))), {
106
- "aria-hidden": "true",
107
- UNSAFE_className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemIndicator')
108
- }) : /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, ($parcel$interopDefault($52xbb$spectrumiconsuiChevronLeftMedium))), {
109
- "aria-hidden": "true",
110
- UNSAFE_className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemIndicator')
111
- }), props.children));
112
- });
113
-
114
-
115
- //# sourceMappingURL=Accordion.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"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","sources":["packages/@react-spectrum/accordion/src/Accordion.tsx"],"sourcesContent":["/*\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\nimport {AriaLabelingProps, DOMProps, DOMRef, forwardRefType, StyleProps} from '@react-types/shared';\nimport {Button, DisclosureGroup, DisclosureGroupProps, DisclosurePanelProps, DisclosureProps, Heading, Disclosure as RACDisclosure, DisclosurePanel as RACDisclosurePanel} from 'react-aria-components';\nimport ChevronLeftMedium from '@spectrum-icons/ui/ChevronLeftMedium';\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport React, {createContext, forwardRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/accordion/vars.css';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nexport interface SpectrumAccordionProps extends Omit<DisclosureGroupProps, 'className' | 'style' | 'render' | 'children'>, StyleProps, DOMProps {\n /** Whether the Accordion should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** The disclosures within the accordion group. */\n children: React.ReactNode\n}\n\nconst InternalAccordionContext = createContext<{isQuiet: boolean} | null>(null);\n\n/** A group of disclosures that can be expanded and collapsed. */\nexport const Accordion = /*#__PURE__*/(forwardRef as forwardRefType)(function Accordion(props: SpectrumAccordionProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n return (\n <InternalAccordionContext.Provider value={{isQuiet: props.isQuiet || false}}>\n <DisclosureGroup\n {...props}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Accordion', styleProps.className)}>\n {props.children}\n </DisclosureGroup>\n </InternalAccordionContext.Provider>\n );\n});\n\nexport interface SpectrumDisclosureProps extends Omit<DisclosureProps, 'className' | 'style' | 'render' | 'children'>, AriaLabelingProps, StyleProps {\n /** Whether the Disclosure should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** The contents of the disclosure. The first child should be the header, and the second child should be the panel. */\n children: React.ReactNode\n}\n\n/** A collapsible section of content composed of a heading that expands and collapses a panel. */\nexport const Disclosure = /*#__PURE__*/(forwardRef as forwardRefType)(function Disclosure(props: SpectrumDisclosureProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n let accordionContext = React.useContext(InternalAccordionContext)!;\n return (\n <RACDisclosure\n {...props}\n {...styleProps}\n ref={domRef}\n className={({isExpanded, isDisabled}) => classNames(styles, 'spectrum-Accordion-item', {\n 'spectrum-Accordion-item--quiet': accordionContext?.isQuiet ?? props.isQuiet,\n 'is-expanded': isExpanded,\n 'is-disabled': isDisabled,\n 'in-accordion': accordionContext != null\n }, styleProps.className)}>\n {props.children}\n </RACDisclosure>\n );\n});\n\nexport interface SpectrumDisclosurePanelProps extends Omit<DisclosurePanelProps, 'className' | 'style' | 'render' | 'children'>, DOMProps, AriaLabelingProps, StyleProps {\n /** The contents of the accordion panel. */\n children: React.ReactNode\n}\n\n/** The panel that contains the content of the disclosure. */\nexport const DisclosurePanel = /*#__PURE__*/(forwardRef as forwardRefType)(function DisclosurePanel(props: SpectrumDisclosurePanelProps, ref: DOMRef<HTMLDivElement>) {\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n return (\n <RACDisclosurePanel\n ref={domRef}\n {...styleProps as Omit<React.HTMLAttributes<HTMLElement>, 'role'>}\n className={classNames(styles, 'spectrum-Accordion-itemContent', styleProps.className)} \n {...props}>\n {props.children}\n </RACDisclosurePanel>\n );\n});\n\nexport interface SpectrumDisclosureTitleProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * The heading level of the disclosure header.\n * @default 3\n */\n level?: number,\n /** The contents of the disclosure header. */\n children: React.ReactNode\n}\n\n/** The heading of the disclosure. */\nexport const DisclosureTitle = /*#__PURE__*/(forwardRef as forwardRefType)(function DisclosureTitle(props: SpectrumDisclosureTitleProps, ref: DOMRef<HTMLHeadingElement>) {\n let {styleProps} = useStyleProps(props);\n let {level = 3} = props;\n let {direction} = useLocale();\n let domRef = useDOMRef(ref);\n return (\n <Heading ref={domRef} level={level} {...styleProps} className={classNames(styles, 'spectrum-Accordion-itemHeading', styleProps.className)}>\n <Button\n slot=\"trigger\"\n className={({isHovered, isFocusVisible, isPressed}) => classNames(styles, 'spectrum-Accordion-itemHeader', {\n 'is-hovered': isHovered,\n 'is-pressed': isPressed,\n 'focus-ring': isFocusVisible\n })}>\n {direction === 'ltr' ? (\n <ChevronRightMedium\n aria-hidden=\"true\"\n UNSAFE_className={classNames(styles, 'spectrum-Accordion-itemIndicator')} />\n ) : (\n <ChevronLeftMedium\n aria-hidden=\"true\"\n UNSAFE_className={classNames(styles, 'spectrum-Accordion-itemIndicator')} />\n )}\n {props.children}\n </Button>\n </Heading>\n );\n});\n"],"names":[],"version":3,"file":"Accordion.main.js.map"}
@@ -1,107 +0,0 @@
1
- import "./accordion.b7c92819.css";
2
- import $aMy5K$accordion_vars_cssmodulejs from "./accordion_vars_css.mjs";
3
- import {DisclosureGroup as $aMy5K$DisclosureGroup, Disclosure as $aMy5K$Disclosure, DisclosurePanel as $aMy5K$DisclosurePanel, Heading as $aMy5K$Heading, Button as $aMy5K$Button} from "react-aria-components";
4
- import $aMy5K$spectrumiconsuiChevronLeftMedium from "@spectrum-icons/ui/ChevronLeftMedium";
5
- import $aMy5K$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
6
- import {useStyleProps as $aMy5K$useStyleProps, useDOMRef as $aMy5K$useDOMRef, classNames as $aMy5K$classNames} from "@react-spectrum/utils";
7
- import $aMy5K$react, {createContext as $aMy5K$createContext, forwardRef as $aMy5K$forwardRef} from "react";
8
- import {useLocale as $aMy5K$useLocale} from "@react-aria/i18n";
9
- import {useProviderProps as $aMy5K$useProviderProps} from "@react-spectrum/provider";
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
- /*
16
- * Copyright 2020 Adobe. All rights reserved.
17
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License. You may obtain a copy
19
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software distributed under
22
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
- * OF ANY KIND, either express or implied. See the License for the specific language
24
- * governing permissions and limitations under the License.
25
- */
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
- const $2a5a5b7faca81754$var$InternalAccordionContext = /*#__PURE__*/ (0, $aMy5K$createContext)(null);
34
- const $2a5a5b7faca81754$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $aMy5K$forwardRef)(function Accordion(props, ref) {
35
- props = (0, $aMy5K$useProviderProps)(props);
36
- let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
37
- let domRef = (0, $aMy5K$useDOMRef)(ref);
38
- return /*#__PURE__*/ (0, $aMy5K$react).createElement($2a5a5b7faca81754$var$InternalAccordionContext.Provider, {
39
- value: {
40
- isQuiet: props.isQuiet || false
41
- }
42
- }, /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$DisclosureGroup), {
43
- ...props,
44
- ...styleProps,
45
- ref: domRef,
46
- className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion', styleProps.className)
47
- }, props.children));
48
- });
49
- const $2a5a5b7faca81754$export$74a362b31437ec83 = /*#__PURE__*/ (0, $aMy5K$forwardRef)(function Disclosure(props, ref) {
50
- props = (0, $aMy5K$useProviderProps)(props);
51
- let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
52
- let domRef = (0, $aMy5K$useDOMRef)(ref);
53
- let accordionContext = (0, $aMy5K$react).useContext($2a5a5b7faca81754$var$InternalAccordionContext);
54
- return /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$Disclosure), {
55
- ...props,
56
- ...styleProps,
57
- ref: domRef,
58
- className: ({ isExpanded: isExpanded, isDisabled: isDisabled })=>{
59
- var _accordionContext_isQuiet;
60
- return (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-item', {
61
- 'spectrum-Accordion-item--quiet': (_accordionContext_isQuiet = accordionContext === null || accordionContext === void 0 ? void 0 : accordionContext.isQuiet) !== null && _accordionContext_isQuiet !== void 0 ? _accordionContext_isQuiet : props.isQuiet,
62
- 'is-expanded': isExpanded,
63
- 'is-disabled': isDisabled,
64
- 'in-accordion': accordionContext != null
65
- }, styleProps.className);
66
- }
67
- }, props.children);
68
- });
69
- const $2a5a5b7faca81754$export$feabaa331e1d464c = /*#__PURE__*/ (0, $aMy5K$forwardRef)(function DisclosurePanel(props, ref) {
70
- let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
71
- let domRef = (0, $aMy5K$useDOMRef)(ref);
72
- return /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$DisclosurePanel), {
73
- ref: domRef,
74
- ...styleProps,
75
- className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemContent', styleProps.className),
76
- ...props
77
- }, props.children);
78
- });
79
- const $2a5a5b7faca81754$export$7843c6a5b3e340a2 = /*#__PURE__*/ (0, $aMy5K$forwardRef)(function DisclosureTitle(props, ref) {
80
- let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
81
- let { level: level = 3 } = props;
82
- let { direction: direction } = (0, $aMy5K$useLocale)();
83
- let domRef = (0, $aMy5K$useDOMRef)(ref);
84
- return /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$Heading), {
85
- ref: domRef,
86
- level: level,
87
- ...styleProps,
88
- className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemHeading', styleProps.className)
89
- }, /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$Button), {
90
- slot: "trigger",
91
- className: ({ isHovered: isHovered, isFocusVisible: isFocusVisible, isPressed: isPressed })=>(0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemHeader', {
92
- 'is-hovered': isHovered,
93
- 'is-pressed': isPressed,
94
- 'focus-ring': isFocusVisible
95
- })
96
- }, direction === 'ltr' ? /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$spectrumiconsuiChevronRightMedium), {
97
- "aria-hidden": "true",
98
- UNSAFE_className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemIndicator')
99
- }) : /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$spectrumiconsuiChevronLeftMedium), {
100
- "aria-hidden": "true",
101
- UNSAFE_className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemIndicator')
102
- }), props.children));
103
- });
104
-
105
-
106
- export {$2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion, $2a5a5b7faca81754$export$74a362b31437ec83 as Disclosure, $2a5a5b7faca81754$export$feabaa331e1d464c as DisclosurePanel, $2a5a5b7faca81754$export$7843c6a5b3e340a2 as DisclosureTitle};
107
- //# sourceMappingURL=Accordion.module.js.map
@@ -1,107 +0,0 @@
1
- import "./accordion.b7c92819.css";
2
- import $aMy5K$accordion_vars_cssmodulejs from "./accordion_vars_css.module.js";
3
- import {DisclosureGroup as $aMy5K$DisclosureGroup, Disclosure as $aMy5K$Disclosure, DisclosurePanel as $aMy5K$DisclosurePanel, Heading as $aMy5K$Heading, Button as $aMy5K$Button} from "react-aria-components";
4
- import $aMy5K$spectrumiconsuiChevronLeftMedium from "@spectrum-icons/ui/ChevronLeftMedium";
5
- import $aMy5K$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
6
- import {useStyleProps as $aMy5K$useStyleProps, useDOMRef as $aMy5K$useDOMRef, classNames as $aMy5K$classNames} from "@react-spectrum/utils";
7
- import $aMy5K$react, {createContext as $aMy5K$createContext, forwardRef as $aMy5K$forwardRef} from "react";
8
- import {useLocale as $aMy5K$useLocale} from "@react-aria/i18n";
9
- import {useProviderProps as $aMy5K$useProviderProps} from "@react-spectrum/provider";
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
- /*
16
- * Copyright 2020 Adobe. All rights reserved.
17
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License. You may obtain a copy
19
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software distributed under
22
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
- * OF ANY KIND, either express or implied. See the License for the specific language
24
- * governing permissions and limitations under the License.
25
- */
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
- const $2a5a5b7faca81754$var$InternalAccordionContext = /*#__PURE__*/ (0, $aMy5K$createContext)(null);
34
- const $2a5a5b7faca81754$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $aMy5K$forwardRef)(function Accordion(props, ref) {
35
- props = (0, $aMy5K$useProviderProps)(props);
36
- let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
37
- let domRef = (0, $aMy5K$useDOMRef)(ref);
38
- return /*#__PURE__*/ (0, $aMy5K$react).createElement($2a5a5b7faca81754$var$InternalAccordionContext.Provider, {
39
- value: {
40
- isQuiet: props.isQuiet || false
41
- }
42
- }, /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$DisclosureGroup), {
43
- ...props,
44
- ...styleProps,
45
- ref: domRef,
46
- className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion', styleProps.className)
47
- }, props.children));
48
- });
49
- const $2a5a5b7faca81754$export$74a362b31437ec83 = /*#__PURE__*/ (0, $aMy5K$forwardRef)(function Disclosure(props, ref) {
50
- props = (0, $aMy5K$useProviderProps)(props);
51
- let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
52
- let domRef = (0, $aMy5K$useDOMRef)(ref);
53
- let accordionContext = (0, $aMy5K$react).useContext($2a5a5b7faca81754$var$InternalAccordionContext);
54
- return /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$Disclosure), {
55
- ...props,
56
- ...styleProps,
57
- ref: domRef,
58
- className: ({ isExpanded: isExpanded, isDisabled: isDisabled })=>{
59
- var _accordionContext_isQuiet;
60
- return (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-item', {
61
- 'spectrum-Accordion-item--quiet': (_accordionContext_isQuiet = accordionContext === null || accordionContext === void 0 ? void 0 : accordionContext.isQuiet) !== null && _accordionContext_isQuiet !== void 0 ? _accordionContext_isQuiet : props.isQuiet,
62
- 'is-expanded': isExpanded,
63
- 'is-disabled': isDisabled,
64
- 'in-accordion': accordionContext != null
65
- }, styleProps.className);
66
- }
67
- }, props.children);
68
- });
69
- const $2a5a5b7faca81754$export$feabaa331e1d464c = /*#__PURE__*/ (0, $aMy5K$forwardRef)(function DisclosurePanel(props, ref) {
70
- let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
71
- let domRef = (0, $aMy5K$useDOMRef)(ref);
72
- return /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$DisclosurePanel), {
73
- ref: domRef,
74
- ...styleProps,
75
- className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemContent', styleProps.className),
76
- ...props
77
- }, props.children);
78
- });
79
- const $2a5a5b7faca81754$export$7843c6a5b3e340a2 = /*#__PURE__*/ (0, $aMy5K$forwardRef)(function DisclosureTitle(props, ref) {
80
- let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
81
- let { level: level = 3 } = props;
82
- let { direction: direction } = (0, $aMy5K$useLocale)();
83
- let domRef = (0, $aMy5K$useDOMRef)(ref);
84
- return /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$Heading), {
85
- ref: domRef,
86
- level: level,
87
- ...styleProps,
88
- className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemHeading', styleProps.className)
89
- }, /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$Button), {
90
- slot: "trigger",
91
- className: ({ isHovered: isHovered, isFocusVisible: isFocusVisible, isPressed: isPressed })=>(0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemHeader', {
92
- 'is-hovered': isHovered,
93
- 'is-pressed': isPressed,
94
- 'focus-ring': isFocusVisible
95
- })
96
- }, direction === 'ltr' ? /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$spectrumiconsuiChevronRightMedium), {
97
- "aria-hidden": "true",
98
- UNSAFE_className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemIndicator')
99
- }) : /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$spectrumiconsuiChevronLeftMedium), {
100
- "aria-hidden": "true",
101
- UNSAFE_className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemIndicator')
102
- }), props.children));
103
- });
104
-
105
-
106
- export {$2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion, $2a5a5b7faca81754$export$74a362b31437ec83 as Disclosure, $2a5a5b7faca81754$export$feabaa331e1d464c as DisclosurePanel, $2a5a5b7faca81754$export$7843c6a5b3e340a2 as DisclosureTitle};
107
- //# sourceMappingURL=Accordion.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAmBD,MAAM,+DAA2B,CAAA,GAAA,oBAAY,EAA6B;AAGnE,MAAM,4CAAyB,AAAb,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAqB,SAAS,UAAU,KAA6B,EAAE,GAA2B;IAChJ,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,qBACE,gCAAC,+CAAyB,QAAQ;QAAC,OAAO;YAAC,SAAS,MAAM,OAAO,IAAI;QAAK;qBACxE,gCAAC,CAAA,GAAA,sBAAc;QACZ,GAAG,KAAK;QACR,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG,sBAAsB,WAAW,SAAS;OACvE,MAAM,QAAQ;AAIvB;AAUO,MAAM,4CAA0B,AAAb,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAqB,SAAS,WAAW,KAA8B,EAAE,GAA2B;IACnJ,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,mBAAmB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;IACxC,qBACE,gCAAC,CAAA,GAAA,iBAAY;QACV,GAAG,KAAK;QACR,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAC,cAAC,UAAU,cAAE,UAAU,EAAC;gBACA;mBADK,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG,2BAA2B;gBACrF,kCAAkC,CAAA,4BAAA,6BAAA,uCAAA,iBAAkB,OAAO,cAAzB,uCAAA,4BAA6B,MAAM,OAAO;gBAC5E,eAAe;gBACf,eAAe;gBACf,gBAAgB,oBAAoB;YACtC,GAAG,WAAW,SAAS;;OACtB,MAAM,QAAQ;AAGrB;AAQO,MAAM,4CAA+B,AAAb,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAqB,SAAS,gBAAgB,KAAmC,EAAE,GAA2B;IAClK,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,qBACE,gCAAC,CAAA,GAAA,sBAAiB;QAChB,KAAK;QACJ,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG,kCAAkC,WAAW,SAAS;QACnF,GAAG,KAAK;OACR,MAAM,QAAQ;AAGrB;AAaO,MAAM,4CAA+B,AAAb,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAqB,SAAS,gBAAgB,KAAmC,EAAE,GAA+B;IACtK,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAC,QAAQ,GAAE,GAAG;IAClB,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,qBACE,gCAAC,CAAA,GAAA,cAAM;QAAE,KAAK;QAAQ,OAAO;QAAQ,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG,kCAAkC,WAAW,SAAS;qBACtI,gCAAC,CAAA,GAAA,aAAK;QACJ,MAAK;QACL,WAAW,CAAC,aAAC,SAAS,kBAAE,cAAc,aAAE,SAAS,EAAC,GAAK,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG,iCAAiC;gBACzG,cAAc;gBACd,cAAc;gBACd,cAAc;YAChB;OACC,cAAc,sBACb,gCAAC,CAAA,GAAA,wCAAiB;QAChB,eAAY;QACZ,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;uBAEjC,gCAAC,CAAA,GAAA,uCAAgB;QACf,eAAY;QACZ,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;QAE9C,MAAM,QAAQ;AAIvB","sources":["packages/@react-spectrum/accordion/src/Accordion.tsx"],"sourcesContent":["/*\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\nimport {AriaLabelingProps, DOMProps, DOMRef, forwardRefType, StyleProps} from '@react-types/shared';\nimport {Button, DisclosureGroup, DisclosureGroupProps, DisclosurePanelProps, DisclosureProps, Heading, Disclosure as RACDisclosure, DisclosurePanel as RACDisclosurePanel} from 'react-aria-components';\nimport ChevronLeftMedium from '@spectrum-icons/ui/ChevronLeftMedium';\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport React, {createContext, forwardRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/accordion/vars.css';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nexport interface SpectrumAccordionProps extends Omit<DisclosureGroupProps, 'className' | 'style' | 'render' | 'children'>, StyleProps, DOMProps {\n /** Whether the Accordion should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** The disclosures within the accordion group. */\n children: React.ReactNode\n}\n\nconst InternalAccordionContext = createContext<{isQuiet: boolean} | null>(null);\n\n/** A group of disclosures that can be expanded and collapsed. */\nexport const Accordion = /*#__PURE__*/(forwardRef as forwardRefType)(function Accordion(props: SpectrumAccordionProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n return (\n <InternalAccordionContext.Provider value={{isQuiet: props.isQuiet || false}}>\n <DisclosureGroup\n {...props}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Accordion', styleProps.className)}>\n {props.children}\n </DisclosureGroup>\n </InternalAccordionContext.Provider>\n );\n});\n\nexport interface SpectrumDisclosureProps extends Omit<DisclosureProps, 'className' | 'style' | 'render' | 'children'>, AriaLabelingProps, StyleProps {\n /** Whether the Disclosure should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** The contents of the disclosure. The first child should be the header, and the second child should be the panel. */\n children: React.ReactNode\n}\n\n/** A collapsible section of content composed of a heading that expands and collapses a panel. */\nexport const Disclosure = /*#__PURE__*/(forwardRef as forwardRefType)(function Disclosure(props: SpectrumDisclosureProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n let accordionContext = React.useContext(InternalAccordionContext)!;\n return (\n <RACDisclosure\n {...props}\n {...styleProps}\n ref={domRef}\n className={({isExpanded, isDisabled}) => classNames(styles, 'spectrum-Accordion-item', {\n 'spectrum-Accordion-item--quiet': accordionContext?.isQuiet ?? props.isQuiet,\n 'is-expanded': isExpanded,\n 'is-disabled': isDisabled,\n 'in-accordion': accordionContext != null\n }, styleProps.className)}>\n {props.children}\n </RACDisclosure>\n );\n});\n\nexport interface SpectrumDisclosurePanelProps extends Omit<DisclosurePanelProps, 'className' | 'style' | 'render' | 'children'>, DOMProps, AriaLabelingProps, StyleProps {\n /** The contents of the accordion panel. */\n children: React.ReactNode\n}\n\n/** The panel that contains the content of the disclosure. */\nexport const DisclosurePanel = /*#__PURE__*/(forwardRef as forwardRefType)(function DisclosurePanel(props: SpectrumDisclosurePanelProps, ref: DOMRef<HTMLDivElement>) {\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n return (\n <RACDisclosurePanel\n ref={domRef}\n {...styleProps as Omit<React.HTMLAttributes<HTMLElement>, 'role'>}\n className={classNames(styles, 'spectrum-Accordion-itemContent', styleProps.className)} \n {...props}>\n {props.children}\n </RACDisclosurePanel>\n );\n});\n\nexport interface SpectrumDisclosureTitleProps extends DOMProps, AriaLabelingProps, StyleProps {\n /**\n * The heading level of the disclosure header.\n * @default 3\n */\n level?: number,\n /** The contents of the disclosure header. */\n children: React.ReactNode\n}\n\n/** The heading of the disclosure. */\nexport const DisclosureTitle = /*#__PURE__*/(forwardRef as forwardRefType)(function DisclosureTitle(props: SpectrumDisclosureTitleProps, ref: DOMRef<HTMLHeadingElement>) {\n let {styleProps} = useStyleProps(props);\n let {level = 3} = props;\n let {direction} = useLocale();\n let domRef = useDOMRef(ref);\n return (\n <Heading ref={domRef} level={level} {...styleProps} className={classNames(styles, 'spectrum-Accordion-itemHeading', styleProps.className)}>\n <Button\n slot=\"trigger\"\n className={({isHovered, isFocusVisible, isPressed}) => classNames(styles, 'spectrum-Accordion-itemHeader', {\n 'is-hovered': isHovered,\n 'is-pressed': isPressed,\n 'focus-ring': isFocusVisible\n })}>\n {direction === 'ltr' ? (\n <ChevronRightMedium\n aria-hidden=\"true\"\n UNSAFE_className={classNames(styles, 'spectrum-Accordion-itemIndicator')} />\n ) : (\n <ChevronLeftMedium\n aria-hidden=\"true\"\n UNSAFE_className={classNames(styles, 'spectrum-Accordion-itemIndicator')} />\n )}\n {props.children}\n </Button>\n </Heading>\n );\n});\n"],"names":[],"version":3,"file":"Accordion.module.js.map"}
@@ -1,133 +0,0 @@
1
- .TBaMlq_spectrum-Accordion {
2
- margin: 0;
3
- padding: 0;
4
- list-style: none;
5
- display: block;
6
- }
7
-
8
- .TBaMlq_spectrum-Accordion-itemIndicator {
9
- transition: transform ease var(--spectrum-global-animation-duration-100, .13s);
10
- box-sizing: content-box;
11
- flex-shrink: 0;
12
- padding-inline-start: var(--spectrum-accordion-icon-gap, var(--spectrum-global-dimension-size-100));
13
- padding-inline-end: var(--spectrum-accordion-icon-gap, var(--spectrum-global-dimension-size-100));
14
- display: block;
15
- }
16
-
17
- .TBaMlq_spectrum-Accordion-item {
18
- z-index: inherit;
19
- border-bottom: var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)) solid var(--spectrum-accordion-border-color, var(--spectrum-global-color-gray-300));
20
- border-top: var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)) solid var(--spectrum-accordion-border-color, var(--spectrum-global-color-gray-300));
21
- margin: 0;
22
- list-style: none;
23
- display: list-item;
24
- position: relative;
25
- }
26
-
27
- .TBaMlq_spectrum-Accordion-item.TBaMlq_in-accordion:not(:first-of-type) {
28
- border-top-width: 0;
29
- }
30
-
31
- .TBaMlq_spectrum-Accordion-item.TBaMlq_spectrum-Accordion-item--quiet {
32
- border-top-width: 0;
33
- border-bottom-width: 0;
34
- }
35
-
36
- .TBaMlq_spectrum-Accordion-item.TBaMlq_spectrum-Accordion-item--quiet:first-of-type {
37
- border-top-width: 0;
38
- }
39
-
40
- .TBaMlq_spectrum-Accordion-itemHeading {
41
- margin: 0;
42
- }
43
-
44
- .TBaMlq_spectrum-Accordion-itemHeader {
45
- box-sizing: border-box;
46
- padding-block: var(--spectrum-global-dimension-size-150);
47
- min-height: calc(var(--spectrum-accordion-item-height, 40px) - var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)));
48
- font-size: var(--spectrum-global-dimension-font-size-300);
49
- text-overflow: ellipsis;
50
- cursor: default;
51
- line-height: 1.3;
52
- font-weight: var(--spectrum-global-font-weight-bold, 700);
53
- -webkit-appearance: none;
54
- appearance: none;
55
- background-color: inherit;
56
- text-align: start;
57
- width: 100%;
58
- border-style: solid;
59
- border-color: #0000;
60
- outline: none;
61
- justify-content: flex-start;
62
- align-items: center;
63
- margin: 0;
64
- padding-inline-start: var(--spectrum-accordion-icon-gap, var(--spectrum-global-dimension-size-100));
65
- padding-inline-end: var(--spectrum-accordion-item-padding, 16px);
66
- font-family: inherit;
67
- display: flex;
68
- position: relative;
69
- }
70
-
71
- .TBaMlq_spectrum-Accordion-itemHeader.TBaMlq_focus-ring {
72
- border-radius: var(--spectrum-global-dimension-static-size-100, 8px);
73
- outline: solid 2px var(--spectrum-alias-focus-color, var(--spectrum-global-color-blue-400));
74
- outline-offset: -2px;
75
- }
76
-
77
- .TBaMlq_spectrum-Accordion-item.TBaMlq_is-expanded .TBaMlq_spectrum-Accordion-itemContent {
78
- padding: 8px 9px 16px;
79
- }
80
-
81
- [dir="ltr"] :is(.TBaMlq_spectrum-Accordion-item.TBaMlq_is-expanded > .TBaMlq_spectrum-Accordion-itemHeading > .TBaMlq_spectrum-Accordion-itemHeader > .TBaMlq_spectrum-Accordion-itemIndicator) {
82
- transform: rotate(90deg);
83
- }
84
-
85
- [dir="rtl"] :is(.TBaMlq_spectrum-Accordion-item.TBaMlq_is-expanded > .TBaMlq_spectrum-Accordion-itemHeading > .TBaMlq_spectrum-Accordion-itemHeader > .TBaMlq_spectrum-Accordion-itemIndicator) {
86
- transform: rotate(-90deg);
87
- }
88
-
89
- .TBaMlq_spectrum-Accordion-item.TBaMlq_is-expanded > .TBaMlq_spectrum-Accordion-itemHeader:after {
90
- height: calc(var(--spectrum-accordion-item-height, 40px) - var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)));
91
- }
92
-
93
- .TBaMlq_spectrum-Accordion-item.TBaMlq_is-expanded > .TBaMlq_spectrum-Accordion-itemContent {
94
- display: block;
95
- }
96
-
97
- .TBaMlq_spectrum-Accordion-item.TBaMlq_is-disabled .TBaMlq_spectrum-Accordion-itemHeader {
98
- cursor: default;
99
- }
100
-
101
- .TBaMlq_spectrum-Accordion-itemHeader {
102
- color: var(--spectrum-alias-text-color, var(--spectrum-global-color-gray-800));
103
- }
104
-
105
- .TBaMlq_spectrum-Accordion-itemHeader.TBaMlq_is-hovered, .TBaMlq_spectrum-Accordion-itemHeader.TBaMlq_focus-ring {
106
- color: var(--spectrum-alias-text-color-hover, var(--spectrum-global-color-gray-900));
107
- background-color: var(--spectrum-accordion-background-color-hover, var(--spectrum-global-color-gray-200));
108
- }
109
-
110
- .TBaMlq_spectrum-Accordion-itemHeader.TBaMlq_is-pressed {
111
- color: var(--spectrum-accordion-text-color-down, var(--spectrum-global-color-gray-900));
112
- background-color: var(--spectrum-global-color-gray-300);
113
- }
114
-
115
- .TBaMlq_spectrum-Accordion-item.TBaMlq_is-disabled .TBaMlq_spectrum-Accordion-itemHeader, .TBaMlq_spectrum-Accordion-item.TBaMlq_is-disabled .TBaMlq_spectrum-Accordion-itemHeader.TBaMlq_is-hovered, .TBaMlq_spectrum-Accordion-item.TBaMlq_is-disabled .TBaMlq_spectrum-Accordion-itemHeader.TBaMlq_focus-ring {
116
- color: var(--spectrum-alias-text-color-disabled, var(--spectrum-global-color-gray-500));
117
- background-color: #0000;
118
- }
119
-
120
- @media (forced-colors: active) {
121
- .TBaMlq_spectrum-Accordion-itemHeader {
122
- border: none;
123
- }
124
-
125
- .TBaMlq_spectrum-Accordion-itemHeader.TBaMlq_focus-ring {
126
- outline: 2px solid canvastext;
127
- }
128
-
129
- .TBaMlq_spectrum-Accordion-item.TBaMlq_spectrum-Accordion-item--quiet {
130
- border: none;
131
- }
132
- }
133
- /*# sourceMappingURL=accordion.b7c92819.css.map */
@@ -1 +0,0 @@
1
- {"mappings":"AAwBA;;;;;;;AAOA;;;;;;;;;AAWA;;;;;;;;;;AAWE;;;;AAIA;;;;;AAIE;;;;AAMJ;;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCE;;;;;;AAQA;;;;AAUQ;;;;AAGA;;;;AAON;;;;AAKA;;;;AAMA;;;;AAkBJ;;;;AAGE;;;;;AAKA;;;;;AAQE;;;;;AASJ;EACE;;;;EAEE;;;;EAKF","sources":["packages/@adobe/spectrum-css-temp/components/accordion/vars.css"],"sourcesContent":["/*\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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"accordion.b7c92819.css.map"}
@@ -1,47 +0,0 @@
1
-
2
- function $parcel$export(e, n, v, s) {
3
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
- }
5
-
6
- $parcel$export(module.exports, "focus-ring", () => $5ab573b23bc1d039$export$f39a09f249340e2a, (v) => $5ab573b23bc1d039$export$f39a09f249340e2a = v);
7
- $parcel$export(module.exports, "in-accordion", () => $5ab573b23bc1d039$export$3751b3d197266426, (v) => $5ab573b23bc1d039$export$3751b3d197266426 = v);
8
- $parcel$export(module.exports, "is-disabled", () => $5ab573b23bc1d039$export$d35bc1e505d1ebbf, (v) => $5ab573b23bc1d039$export$d35bc1e505d1ebbf = v);
9
- $parcel$export(module.exports, "is-expanded", () => $5ab573b23bc1d039$export$911ebb89bba4b634, (v) => $5ab573b23bc1d039$export$911ebb89bba4b634 = v);
10
- $parcel$export(module.exports, "is-hovered", () => $5ab573b23bc1d039$export$b8813cd5d7824ce7, (v) => $5ab573b23bc1d039$export$b8813cd5d7824ce7 = v);
11
- $parcel$export(module.exports, "is-pressed", () => $5ab573b23bc1d039$export$15b73a232798b8d3, (v) => $5ab573b23bc1d039$export$15b73a232798b8d3 = v);
12
- $parcel$export(module.exports, "spectrum-Accordion", () => $5ab573b23bc1d039$export$bed6cbae852b32f0, (v) => $5ab573b23bc1d039$export$bed6cbae852b32f0 = v);
13
- $parcel$export(module.exports, "spectrum-Accordion-item", () => $5ab573b23bc1d039$export$a1947cb8adf67515, (v) => $5ab573b23bc1d039$export$a1947cb8adf67515 = v);
14
- $parcel$export(module.exports, "spectrum-Accordion-item--quiet", () => $5ab573b23bc1d039$export$834b47eea3b7caa7, (v) => $5ab573b23bc1d039$export$834b47eea3b7caa7 = v);
15
- $parcel$export(module.exports, "spectrum-Accordion-itemContent", () => $5ab573b23bc1d039$export$951cb9dc63743241, (v) => $5ab573b23bc1d039$export$951cb9dc63743241 = v);
16
- $parcel$export(module.exports, "spectrum-Accordion-itemHeader", () => $5ab573b23bc1d039$export$4da8efb546c03356, (v) => $5ab573b23bc1d039$export$4da8efb546c03356 = v);
17
- $parcel$export(module.exports, "spectrum-Accordion-itemHeading", () => $5ab573b23bc1d039$export$36876b8193439034, (v) => $5ab573b23bc1d039$export$36876b8193439034 = v);
18
- $parcel$export(module.exports, "spectrum-Accordion-itemIndicator", () => $5ab573b23bc1d039$export$35196e2132b47abd, (v) => $5ab573b23bc1d039$export$35196e2132b47abd = v);
19
- var $5ab573b23bc1d039$export$f39a09f249340e2a;
20
- var $5ab573b23bc1d039$export$3751b3d197266426;
21
- var $5ab573b23bc1d039$export$d35bc1e505d1ebbf;
22
- var $5ab573b23bc1d039$export$911ebb89bba4b634;
23
- var $5ab573b23bc1d039$export$b8813cd5d7824ce7;
24
- var $5ab573b23bc1d039$export$15b73a232798b8d3;
25
- var $5ab573b23bc1d039$export$bed6cbae852b32f0;
26
- var $5ab573b23bc1d039$export$a1947cb8adf67515;
27
- var $5ab573b23bc1d039$export$834b47eea3b7caa7;
28
- var $5ab573b23bc1d039$export$951cb9dc63743241;
29
- var $5ab573b23bc1d039$export$4da8efb546c03356;
30
- var $5ab573b23bc1d039$export$36876b8193439034;
31
- var $5ab573b23bc1d039$export$35196e2132b47abd;
32
- $5ab573b23bc1d039$export$f39a09f249340e2a = `TBaMlq_focus-ring`;
33
- $5ab573b23bc1d039$export$3751b3d197266426 = `TBaMlq_in-accordion`;
34
- $5ab573b23bc1d039$export$d35bc1e505d1ebbf = `TBaMlq_is-disabled`;
35
- $5ab573b23bc1d039$export$911ebb89bba4b634 = `TBaMlq_is-expanded`;
36
- $5ab573b23bc1d039$export$b8813cd5d7824ce7 = `TBaMlq_is-hovered`;
37
- $5ab573b23bc1d039$export$15b73a232798b8d3 = `TBaMlq_is-pressed`;
38
- $5ab573b23bc1d039$export$bed6cbae852b32f0 = `TBaMlq_spectrum-Accordion`;
39
- $5ab573b23bc1d039$export$a1947cb8adf67515 = `TBaMlq_spectrum-Accordion-item`;
40
- $5ab573b23bc1d039$export$834b47eea3b7caa7 = `TBaMlq_spectrum-Accordion-item--quiet`;
41
- $5ab573b23bc1d039$export$951cb9dc63743241 = `TBaMlq_spectrum-Accordion-itemContent`;
42
- $5ab573b23bc1d039$export$4da8efb546c03356 = `TBaMlq_spectrum-Accordion-itemHeader`;
43
- $5ab573b23bc1d039$export$36876b8193439034 = `TBaMlq_spectrum-Accordion-itemHeading`;
44
- $5ab573b23bc1d039$export$35196e2132b47abd = `TBaMlq_spectrum-Accordion-itemIndicator`;
45
-
46
-
47
- //# sourceMappingURL=accordion_vars_css.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAZA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAuC,CAAC,yBAAyB,CAAC;AAClE,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAAkD,CAAC,oCAAoC,CAAC;AACxF,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAAqD,CAAC,uCAAuC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/accordion/vars.css"],"sourcesContent":["/*\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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"accordion_vars_css.main.js.map"}
@@ -1,49 +0,0 @@
1
-
2
- function $parcel$export(e, n, v, s) {
3
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
- }
5
- var $cd9bb50514faf076$exports = {};
6
-
7
- $parcel$export($cd9bb50514faf076$exports, "focus-ring", () => $cd9bb50514faf076$export$f39a09f249340e2a, (v) => $cd9bb50514faf076$export$f39a09f249340e2a = v);
8
- $parcel$export($cd9bb50514faf076$exports, "in-accordion", () => $cd9bb50514faf076$export$3751b3d197266426, (v) => $cd9bb50514faf076$export$3751b3d197266426 = v);
9
- $parcel$export($cd9bb50514faf076$exports, "is-disabled", () => $cd9bb50514faf076$export$d35bc1e505d1ebbf, (v) => $cd9bb50514faf076$export$d35bc1e505d1ebbf = v);
10
- $parcel$export($cd9bb50514faf076$exports, "is-expanded", () => $cd9bb50514faf076$export$911ebb89bba4b634, (v) => $cd9bb50514faf076$export$911ebb89bba4b634 = v);
11
- $parcel$export($cd9bb50514faf076$exports, "is-hovered", () => $cd9bb50514faf076$export$b8813cd5d7824ce7, (v) => $cd9bb50514faf076$export$b8813cd5d7824ce7 = v);
12
- $parcel$export($cd9bb50514faf076$exports, "is-pressed", () => $cd9bb50514faf076$export$15b73a232798b8d3, (v) => $cd9bb50514faf076$export$15b73a232798b8d3 = v);
13
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion", () => $cd9bb50514faf076$export$bed6cbae852b32f0, (v) => $cd9bb50514faf076$export$bed6cbae852b32f0 = v);
14
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-item", () => $cd9bb50514faf076$export$a1947cb8adf67515, (v) => $cd9bb50514faf076$export$a1947cb8adf67515 = v);
15
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-item--quiet", () => $cd9bb50514faf076$export$834b47eea3b7caa7, (v) => $cd9bb50514faf076$export$834b47eea3b7caa7 = v);
16
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemContent", () => $cd9bb50514faf076$export$951cb9dc63743241, (v) => $cd9bb50514faf076$export$951cb9dc63743241 = v);
17
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeader", () => $cd9bb50514faf076$export$4da8efb546c03356, (v) => $cd9bb50514faf076$export$4da8efb546c03356 = v);
18
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeading", () => $cd9bb50514faf076$export$36876b8193439034, (v) => $cd9bb50514faf076$export$36876b8193439034 = v);
19
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemIndicator", () => $cd9bb50514faf076$export$35196e2132b47abd, (v) => $cd9bb50514faf076$export$35196e2132b47abd = v);
20
- var $cd9bb50514faf076$export$f39a09f249340e2a;
21
- var $cd9bb50514faf076$export$3751b3d197266426;
22
- var $cd9bb50514faf076$export$d35bc1e505d1ebbf;
23
- var $cd9bb50514faf076$export$911ebb89bba4b634;
24
- var $cd9bb50514faf076$export$b8813cd5d7824ce7;
25
- var $cd9bb50514faf076$export$15b73a232798b8d3;
26
- var $cd9bb50514faf076$export$bed6cbae852b32f0;
27
- var $cd9bb50514faf076$export$a1947cb8adf67515;
28
- var $cd9bb50514faf076$export$834b47eea3b7caa7;
29
- var $cd9bb50514faf076$export$951cb9dc63743241;
30
- var $cd9bb50514faf076$export$4da8efb546c03356;
31
- var $cd9bb50514faf076$export$36876b8193439034;
32
- var $cd9bb50514faf076$export$35196e2132b47abd;
33
- $cd9bb50514faf076$export$f39a09f249340e2a = `TBaMlq_focus-ring`;
34
- $cd9bb50514faf076$export$3751b3d197266426 = `TBaMlq_in-accordion`;
35
- $cd9bb50514faf076$export$d35bc1e505d1ebbf = `TBaMlq_is-disabled`;
36
- $cd9bb50514faf076$export$911ebb89bba4b634 = `TBaMlq_is-expanded`;
37
- $cd9bb50514faf076$export$b8813cd5d7824ce7 = `TBaMlq_is-hovered`;
38
- $cd9bb50514faf076$export$15b73a232798b8d3 = `TBaMlq_is-pressed`;
39
- $cd9bb50514faf076$export$bed6cbae852b32f0 = `TBaMlq_spectrum-Accordion`;
40
- $cd9bb50514faf076$export$a1947cb8adf67515 = `TBaMlq_spectrum-Accordion-item`;
41
- $cd9bb50514faf076$export$834b47eea3b7caa7 = `TBaMlq_spectrum-Accordion-item--quiet`;
42
- $cd9bb50514faf076$export$951cb9dc63743241 = `TBaMlq_spectrum-Accordion-itemContent`;
43
- $cd9bb50514faf076$export$4da8efb546c03356 = `TBaMlq_spectrum-Accordion-itemHeader`;
44
- $cd9bb50514faf076$export$36876b8193439034 = `TBaMlq_spectrum-Accordion-itemHeading`;
45
- $cd9bb50514faf076$export$35196e2132b47abd = `TBaMlq_spectrum-Accordion-itemIndicator`;
46
-
47
-
48
- export {$cd9bb50514faf076$exports as default};
49
- //# sourceMappingURL=accordion_vars_css.module.js.map
@@ -1,49 +0,0 @@
1
-
2
- function $parcel$export(e, n, v, s) {
3
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
- }
5
- var $cd9bb50514faf076$exports = {};
6
-
7
- $parcel$export($cd9bb50514faf076$exports, "focus-ring", () => $cd9bb50514faf076$export$f39a09f249340e2a, (v) => $cd9bb50514faf076$export$f39a09f249340e2a = v);
8
- $parcel$export($cd9bb50514faf076$exports, "in-accordion", () => $cd9bb50514faf076$export$3751b3d197266426, (v) => $cd9bb50514faf076$export$3751b3d197266426 = v);
9
- $parcel$export($cd9bb50514faf076$exports, "is-disabled", () => $cd9bb50514faf076$export$d35bc1e505d1ebbf, (v) => $cd9bb50514faf076$export$d35bc1e505d1ebbf = v);
10
- $parcel$export($cd9bb50514faf076$exports, "is-expanded", () => $cd9bb50514faf076$export$911ebb89bba4b634, (v) => $cd9bb50514faf076$export$911ebb89bba4b634 = v);
11
- $parcel$export($cd9bb50514faf076$exports, "is-hovered", () => $cd9bb50514faf076$export$b8813cd5d7824ce7, (v) => $cd9bb50514faf076$export$b8813cd5d7824ce7 = v);
12
- $parcel$export($cd9bb50514faf076$exports, "is-pressed", () => $cd9bb50514faf076$export$15b73a232798b8d3, (v) => $cd9bb50514faf076$export$15b73a232798b8d3 = v);
13
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion", () => $cd9bb50514faf076$export$bed6cbae852b32f0, (v) => $cd9bb50514faf076$export$bed6cbae852b32f0 = v);
14
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-item", () => $cd9bb50514faf076$export$a1947cb8adf67515, (v) => $cd9bb50514faf076$export$a1947cb8adf67515 = v);
15
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-item--quiet", () => $cd9bb50514faf076$export$834b47eea3b7caa7, (v) => $cd9bb50514faf076$export$834b47eea3b7caa7 = v);
16
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemContent", () => $cd9bb50514faf076$export$951cb9dc63743241, (v) => $cd9bb50514faf076$export$951cb9dc63743241 = v);
17
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeader", () => $cd9bb50514faf076$export$4da8efb546c03356, (v) => $cd9bb50514faf076$export$4da8efb546c03356 = v);
18
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeading", () => $cd9bb50514faf076$export$36876b8193439034, (v) => $cd9bb50514faf076$export$36876b8193439034 = v);
19
- $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemIndicator", () => $cd9bb50514faf076$export$35196e2132b47abd, (v) => $cd9bb50514faf076$export$35196e2132b47abd = v);
20
- var $cd9bb50514faf076$export$f39a09f249340e2a;
21
- var $cd9bb50514faf076$export$3751b3d197266426;
22
- var $cd9bb50514faf076$export$d35bc1e505d1ebbf;
23
- var $cd9bb50514faf076$export$911ebb89bba4b634;
24
- var $cd9bb50514faf076$export$b8813cd5d7824ce7;
25
- var $cd9bb50514faf076$export$15b73a232798b8d3;
26
- var $cd9bb50514faf076$export$bed6cbae852b32f0;
27
- var $cd9bb50514faf076$export$a1947cb8adf67515;
28
- var $cd9bb50514faf076$export$834b47eea3b7caa7;
29
- var $cd9bb50514faf076$export$951cb9dc63743241;
30
- var $cd9bb50514faf076$export$4da8efb546c03356;
31
- var $cd9bb50514faf076$export$36876b8193439034;
32
- var $cd9bb50514faf076$export$35196e2132b47abd;
33
- $cd9bb50514faf076$export$f39a09f249340e2a = `TBaMlq_focus-ring`;
34
- $cd9bb50514faf076$export$3751b3d197266426 = `TBaMlq_in-accordion`;
35
- $cd9bb50514faf076$export$d35bc1e505d1ebbf = `TBaMlq_is-disabled`;
36
- $cd9bb50514faf076$export$911ebb89bba4b634 = `TBaMlq_is-expanded`;
37
- $cd9bb50514faf076$export$b8813cd5d7824ce7 = `TBaMlq_is-hovered`;
38
- $cd9bb50514faf076$export$15b73a232798b8d3 = `TBaMlq_is-pressed`;
39
- $cd9bb50514faf076$export$bed6cbae852b32f0 = `TBaMlq_spectrum-Accordion`;
40
- $cd9bb50514faf076$export$a1947cb8adf67515 = `TBaMlq_spectrum-Accordion-item`;
41
- $cd9bb50514faf076$export$834b47eea3b7caa7 = `TBaMlq_spectrum-Accordion-item--quiet`;
42
- $cd9bb50514faf076$export$951cb9dc63743241 = `TBaMlq_spectrum-Accordion-itemContent`;
43
- $cd9bb50514faf076$export$4da8efb546c03356 = `TBaMlq_spectrum-Accordion-itemHeader`;
44
- $cd9bb50514faf076$export$36876b8193439034 = `TBaMlq_spectrum-Accordion-itemHeading`;
45
- $cd9bb50514faf076$export$35196e2132b47abd = `TBaMlq_spectrum-Accordion-itemIndicator`;
46
-
47
-
48
- export {$cd9bb50514faf076$exports as default};
49
- //# sourceMappingURL=accordion_vars_css.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAZA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAuC,CAAC,yBAAyB,CAAC;AAClE,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAAkD,CAAC,oCAAoC,CAAC;AACxF,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAAqD,CAAC,uCAAuC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/accordion/vars.css"],"sourcesContent":["/*\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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"accordion_vars_css.module.js.map"}
package/dist/types.d.ts DELETED
@@ -1,38 +0,0 @@
1
- import { AriaLabelingProps, DOMProps, StyleProps, DOMRefValue } from "@react-types/shared";
2
- import { DisclosureGroupProps, DisclosurePanelProps, DisclosureProps } from "react-aria-components";
3
- import React from "react";
4
- export interface SpectrumAccordionProps extends Omit<DisclosureGroupProps, 'className' | 'style' | 'render' | 'children'>, StyleProps, DOMProps {
5
- /** Whether the Accordion should be displayed with a quiet style. */
6
- isQuiet?: boolean;
7
- /** The disclosures within the accordion group. */
8
- children: React.ReactNode;
9
- }
10
- /** A group of disclosures that can be expanded and collapsed. */
11
- export const Accordion: (props: SpectrumAccordionProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>) => React.ReactElement | null;
12
- export interface SpectrumDisclosureProps extends Omit<DisclosureProps, 'className' | 'style' | 'render' | 'children'>, AriaLabelingProps, StyleProps {
13
- /** Whether the Disclosure should be displayed with a quiet style. */
14
- isQuiet?: boolean;
15
- /** The contents of the disclosure. The first child should be the header, and the second child should be the panel. */
16
- children: React.ReactNode;
17
- }
18
- /** A collapsible section of content composed of a heading that expands and collapses a panel. */
19
- export const Disclosure: (props: SpectrumDisclosureProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>) => React.ReactElement | null;
20
- export interface SpectrumDisclosurePanelProps extends Omit<DisclosurePanelProps, 'className' | 'style' | 'render' | 'children'>, DOMProps, AriaLabelingProps, StyleProps {
21
- /** The contents of the accordion panel. */
22
- children: React.ReactNode;
23
- }
24
- /** The panel that contains the content of the disclosure. */
25
- export const DisclosurePanel: (props: SpectrumDisclosurePanelProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>) => React.ReactElement | null;
26
- export interface SpectrumDisclosureTitleProps extends DOMProps, AriaLabelingProps, StyleProps {
27
- /**
28
- * The heading level of the disclosure header.
29
- * @default 3
30
- */
31
- level?: number;
32
- /** The contents of the disclosure header. */
33
- children: React.ReactNode;
34
- }
35
- /** The heading of the disclosure. */
36
- export const DisclosureTitle: (props: SpectrumDisclosureTitleProps & React.RefAttributes<DOMRefValue<HTMLHeadingElement>>) => React.ReactElement | null;
37
-
38
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"mappings":";;;AAsBA,uCAAwC,SAAQ,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC,EAAE,UAAU,EAAE,QAAQ;IAC7I,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,MAAM,SAAS,CAAA;CAC1B;AAID,iEAAiE;AACjE,OAAO,MAAM,0HAeX,CAAC;AAEH,wCAAyC,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC,EAAE,iBAAiB,EAAE,UAAU;IAClJ,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sHAAsH;IACtH,QAAQ,EAAE,MAAM,SAAS,CAAA;CAC1B;AAED,iGAAiG;AACjG,OAAO,MAAM,4HAmBX,CAAC;AAEH,6CAA8C,SAAQ,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU;IACtK,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,SAAS,CAAA;CAC1B;AAED,6DAA6D;AAC7D,OAAO,MAAM,sIAYX,CAAC;AAEH,6CAA8C,SAAQ,QAAQ,EAAE,iBAAiB,EAAE,UAAU;IAC3F;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,SAAS,CAAA;CAC1B;AAED,qCAAqC;AACrC,OAAO,MAAM,0IA2BX,CAAC","sources":["packages/@react-spectrum/accordion/src/packages/@react-spectrum/accordion/src/Accordion.tsx","packages/@react-spectrum/accordion/src/packages/@react-spectrum/accordion/src/index.ts","packages/@react-spectrum/accordion/src/index.ts"],"sourcesContent":[null,null,"/*\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/// <reference types=\"css-module-types\" />\nexport {Disclosure, Accordion, DisclosureTitle, DisclosurePanel} from './Accordion';\nexport type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps} from './Accordion';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/src/Accordion.tsx DELETED
@@ -1,137 +0,0 @@
1
- /*
2
- * Copyright 2020 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import {AriaLabelingProps, DOMProps, DOMRef, forwardRefType, StyleProps} from '@react-types/shared';
14
- import {Button, DisclosureGroup, DisclosureGroupProps, DisclosurePanelProps, DisclosureProps, Heading, Disclosure as RACDisclosure, DisclosurePanel as RACDisclosurePanel} from 'react-aria-components';
15
- import ChevronLeftMedium from '@spectrum-icons/ui/ChevronLeftMedium';
16
- import ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';
17
- import {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';
18
- import React, {createContext, forwardRef} from 'react';
19
- import styles from '@adobe/spectrum-css-temp/components/accordion/vars.css';
20
- import {useLocale} from '@react-aria/i18n';
21
- import {useProviderProps} from '@react-spectrum/provider';
22
-
23
- export interface SpectrumAccordionProps extends Omit<DisclosureGroupProps, 'className' | 'style' | 'render' | 'children'>, StyleProps, DOMProps {
24
- /** Whether the Accordion should be displayed with a quiet style. */
25
- isQuiet?: boolean,
26
- /** The disclosures within the accordion group. */
27
- children: React.ReactNode
28
- }
29
-
30
- const InternalAccordionContext = createContext<{isQuiet: boolean} | null>(null);
31
-
32
- /** A group of disclosures that can be expanded and collapsed. */
33
- export const Accordion = /*#__PURE__*/(forwardRef as forwardRefType)(function Accordion(props: SpectrumAccordionProps, ref: DOMRef<HTMLDivElement>) {
34
- props = useProviderProps(props);
35
- let {styleProps} = useStyleProps(props);
36
- let domRef = useDOMRef(ref);
37
- return (
38
- <InternalAccordionContext.Provider value={{isQuiet: props.isQuiet || false}}>
39
- <DisclosureGroup
40
- {...props}
41
- {...styleProps}
42
- ref={domRef}
43
- className={classNames(styles, 'spectrum-Accordion', styleProps.className)}>
44
- {props.children}
45
- </DisclosureGroup>
46
- </InternalAccordionContext.Provider>
47
- );
48
- });
49
-
50
- export interface SpectrumDisclosureProps extends Omit<DisclosureProps, 'className' | 'style' | 'render' | 'children'>, AriaLabelingProps, StyleProps {
51
- /** Whether the Disclosure should be displayed with a quiet style. */
52
- isQuiet?: boolean,
53
- /** The contents of the disclosure. The first child should be the header, and the second child should be the panel. */
54
- children: React.ReactNode
55
- }
56
-
57
- /** A collapsible section of content composed of a heading that expands and collapses a panel. */
58
- export const Disclosure = /*#__PURE__*/(forwardRef as forwardRefType)(function Disclosure(props: SpectrumDisclosureProps, ref: DOMRef<HTMLDivElement>) {
59
- props = useProviderProps(props);
60
- let {styleProps} = useStyleProps(props);
61
- let domRef = useDOMRef(ref);
62
- let accordionContext = React.useContext(InternalAccordionContext)!;
63
- return (
64
- <RACDisclosure
65
- {...props}
66
- {...styleProps}
67
- ref={domRef}
68
- className={({isExpanded, isDisabled}) => classNames(styles, 'spectrum-Accordion-item', {
69
- 'spectrum-Accordion-item--quiet': accordionContext?.isQuiet ?? props.isQuiet,
70
- 'is-expanded': isExpanded,
71
- 'is-disabled': isDisabled,
72
- 'in-accordion': accordionContext != null
73
- }, styleProps.className)}>
74
- {props.children}
75
- </RACDisclosure>
76
- );
77
- });
78
-
79
- export interface SpectrumDisclosurePanelProps extends Omit<DisclosurePanelProps, 'className' | 'style' | 'render' | 'children'>, DOMProps, AriaLabelingProps, StyleProps {
80
- /** The contents of the accordion panel. */
81
- children: React.ReactNode
82
- }
83
-
84
- /** The panel that contains the content of the disclosure. */
85
- export const DisclosurePanel = /*#__PURE__*/(forwardRef as forwardRefType)(function DisclosurePanel(props: SpectrumDisclosurePanelProps, ref: DOMRef<HTMLDivElement>) {
86
- let {styleProps} = useStyleProps(props);
87
- let domRef = useDOMRef(ref);
88
- return (
89
- <RACDisclosurePanel
90
- ref={domRef}
91
- {...styleProps as Omit<React.HTMLAttributes<HTMLElement>, 'role'>}
92
- className={classNames(styles, 'spectrum-Accordion-itemContent', styleProps.className)}
93
- {...props}>
94
- {props.children}
95
- </RACDisclosurePanel>
96
- );
97
- });
98
-
99
- export interface SpectrumDisclosureTitleProps extends DOMProps, AriaLabelingProps, StyleProps {
100
- /**
101
- * The heading level of the disclosure header.
102
- * @default 3
103
- */
104
- level?: number,
105
- /** The contents of the disclosure header. */
106
- children: React.ReactNode
107
- }
108
-
109
- /** The heading of the disclosure. */
110
- export const DisclosureTitle = /*#__PURE__*/(forwardRef as forwardRefType)(function DisclosureTitle(props: SpectrumDisclosureTitleProps, ref: DOMRef<HTMLHeadingElement>) {
111
- let {styleProps} = useStyleProps(props);
112
- let {level = 3} = props;
113
- let {direction} = useLocale();
114
- let domRef = useDOMRef(ref);
115
- return (
116
- <Heading ref={domRef} level={level} {...styleProps} className={classNames(styles, 'spectrum-Accordion-itemHeading', styleProps.className)}>
117
- <Button
118
- slot="trigger"
119
- className={({isHovered, isFocusVisible, isPressed}) => classNames(styles, 'spectrum-Accordion-itemHeader', {
120
- 'is-hovered': isHovered,
121
- 'is-pressed': isPressed,
122
- 'focus-ring': isFocusVisible
123
- })}>
124
- {direction === 'ltr' ? (
125
- <ChevronRightMedium
126
- aria-hidden="true"
127
- UNSAFE_className={classNames(styles, 'spectrum-Accordion-itemIndicator')} />
128
- ) : (
129
- <ChevronLeftMedium
130
- aria-hidden="true"
131
- UNSAFE_className={classNames(styles, 'spectrum-Accordion-itemIndicator')} />
132
- )}
133
- {props.children}
134
- </Button>
135
- </Heading>
136
- );
137
- });