@react-spectrum/accordion 3.0.0-alpha.3 → 3.0.0-alpha.31

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,108 @@
1
+ require("./vars.1361683a.css");
2
+ var $5ab573b23bc1d039$exports = require("./accordion_vars_css.main.js");
3
+ var $52xbb$spectrumiconsuiChevronLeftMedium = require("@spectrum-icons/ui/ChevronLeftMedium");
4
+ var $52xbb$spectrumiconsuiChevronRightMedium = require("@spectrum-icons/ui/ChevronRightMedium");
5
+ var $52xbb$reactspectrumutils = require("@react-spectrum/utils");
6
+ var $52xbb$reactariautils = require("@react-aria/utils");
7
+ var $52xbb$reactariafocus = require("@react-aria/focus");
8
+ var $52xbb$react = require("react");
9
+ var $52xbb$reactstatelytree = require("@react-stately/tree");
10
+ var $52xbb$reactariaaccordion = require("@react-aria/accordion");
11
+ var $52xbb$reactariainteractions = require("@react-aria/interactions");
12
+ var $52xbb$reactariai18n = require("@react-aria/i18n");
13
+ var $52xbb$reactspectrumprovider = require("@react-spectrum/provider");
14
+
15
+
16
+ function $parcel$interopDefault(a) {
17
+ return a && a.__esModule ? a.default : a;
18
+ }
19
+
20
+ function $parcel$export(e, n, v, s) {
21
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
22
+ }
23
+
24
+ $parcel$export(module.exports, "Accordion", () => $d8f45715b3ce327a$export$a766cd26d0d69044);
25
+ /*
26
+ * Copyright 2020 Adobe. All rights reserved.
27
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
28
+ * you may not use this file except in compliance with the License. You may obtain a copy
29
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
30
+ *
31
+ * Unless required by applicable law or agreed to in writing, software distributed under
32
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
33
+ * OF ANY KIND, either express or implied. See the License for the specific language
34
+ * governing permissions and limitations under the License.
35
+ */
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+ function $d8f45715b3ce327a$var$Accordion(props, ref) {
48
+ props = (0, $52xbb$reactspectrumprovider.useProviderProps)(props);
49
+ let state = (0, $52xbb$reactstatelytree.useTreeState)(props);
50
+ let { styleProps: styleProps } = (0, $52xbb$reactspectrumutils.useStyleProps)(props);
51
+ let domRef = (0, $52xbb$reactspectrumutils.useDOMRef)(ref);
52
+ let { accordionProps: accordionProps } = (0, $52xbb$reactariaaccordion.useAccordion)(props, state, domRef);
53
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement("div", {
54
+ ...(0, $52xbb$reactariautils.filterDOMProps)(props),
55
+ ...accordionProps,
56
+ ...styleProps,
57
+ ref: domRef,
58
+ className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion', styleProps.className)
59
+ }, [
60
+ ...state.collection
61
+ ].map((item)=>/*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement($d8f45715b3ce327a$var$AccordionItem, {
62
+ key: item.key,
63
+ item: item,
64
+ state: state
65
+ })));
66
+ }
67
+ function $d8f45715b3ce327a$var$AccordionItem(props) {
68
+ props = (0, $52xbb$reactspectrumprovider.useProviderProps)(props);
69
+ let ref = (0, $52xbb$react.useRef)(null);
70
+ let { state: state, item: item } = props;
71
+ let { buttonProps: buttonProps, regionProps: regionProps } = (0, $52xbb$reactariaaccordion.useAccordionItem)(props, state, ref);
72
+ let isOpen = state.expandedKeys.has(item.key);
73
+ let isDisabled = state.disabledKeys.has(item.key);
74
+ let { isHovered: isHovered, hoverProps: hoverProps } = (0, $52xbb$reactariainteractions.useHover)({
75
+ isDisabled: isDisabled
76
+ });
77
+ let { direction: direction } = (0, $52xbb$reactariai18n.useLocale)();
78
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement("div", {
79
+ className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-item', {
80
+ 'is-open': isOpen,
81
+ 'is-disabled': isDisabled
82
+ })
83
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement("h3", {
84
+ className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemHeading')
85
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, $52xbb$reactariafocus.FocusRing), {
86
+ within: true,
87
+ focusRingClass: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'focus-ring')
88
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement("button", {
89
+ ...(0, $52xbb$reactariautils.mergeProps)(buttonProps, hoverProps),
90
+ ref: ref,
91
+ className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemHeader', {
92
+ 'is-hovered': isHovered
93
+ })
94
+ }, direction === 'ltr' ? /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, ($parcel$interopDefault($52xbb$spectrumiconsuiChevronRightMedium))), {
95
+ "aria-hidden": "true",
96
+ UNSAFE_className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemIndicator')
97
+ }) : /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement((0, ($parcel$interopDefault($52xbb$spectrumiconsuiChevronLeftMedium))), {
98
+ "aria-hidden": "true",
99
+ UNSAFE_className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemIndicator')
100
+ }), item.props.title))), /*#__PURE__*/ (0, ($parcel$interopDefault($52xbb$react))).createElement("div", {
101
+ ...regionProps,
102
+ className: (0, $52xbb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($5ab573b23bc1d039$exports))), 'spectrum-Accordion-itemContent')
103
+ }, item.props.children));
104
+ }
105
+ const $d8f45715b3ce327a$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $52xbb$react.forwardRef)($d8f45715b3ce327a$var$Accordion);
106
+
107
+
108
+ //# sourceMappingURL=Accordion.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;AAkBD,SAAS,gCAA4B,KAAgC,EAAE,GAA2B;IAChG,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,QAAQ,CAAA,GAAA,oCAAW,EAAK;IAC5B,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,sCAAW,EAAE,OAAO,OAAO;IAElD,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,MAAM;QACxB,GAAG,cAAc;QACjB,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,sBAAsB,WAAW,SAAS;OACvE;WAAI,MAAM,UAAU;KAAC,CAAC,GAAG,CAAC,CAAA,qBACzB,0DAAC;YAAiB,KAAK,KAAK,GAAG;YAAE,MAAM;YAAM,OAAO;;AAI5D;AAOA,SAAS,oCAAiB,KAA4B;IACpD,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAqB;IACpC,IAAI,SAAC,KAAK,QAAE,IAAI,EAAC,GAAG;IACpB,IAAI,eAAC,WAAW,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,0CAAe,EAAK,OAAO,OAAO;IACnE,IAAI,SAAS,MAAM,YAAY,CAAC,GAAG,CAAC,KAAK,GAAG;IAC5C,IAAI,aAAa,MAAM,YAAY,CAAC,GAAG,CAAC,KAAK,GAAG;IAChD,IAAI,aAAC,SAAS,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;oBAAC;IAAU;IAClD,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAE1B,qBACE,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,2BAA2B;YACvD,WAAW;YACX,eAAe;QACjB;qBACA,0DAAC;QAAG,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBAChC,0DAAC,CAAA,GAAA,+BAAQ;QAAE,QAAA;QAAO,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACnD,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,aAAa,WAAW;QACvC,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,iCAAiC;YAC7D,cAAc;QAChB;OACC,cAAc,sBACb,0DAAC,CAAA,GAAA,kEAAiB;QAChB,eAAY;QACZ,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;uBAErC,0DAAC,CAAA,GAAA,iEAAgB;QACf,eAAY;QACZ,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAE1C,KAAK,KAAK,CAAC,KAAK,mBAIvB,0DAAC;QAAK,GAAG,WAAW;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACjD,KAAK,KAAK,CAAC,QAAQ;AAI5B;AAEA,MAAM,0DAAa,CAAA,GAAA,uBAAS,EAAE","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 ChevronLeftMedium from '@spectrum-icons/ui/ChevronLeftMedium';\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, Node} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumAccordionProps} from '@react-types/accordion';\nimport styles from '@adobe/spectrum-css-temp/components/accordion/vars.css';\nimport {TreeState, useTreeState} from '@react-stately/tree';\nimport {useAccordion, useAccordionItem} from '@react-aria/accordion';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\nfunction Accordion<T extends object>(props: SpectrumAccordionProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let state = useTreeState<T>(props);\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n let {accordionProps} = useAccordion(props, state, domRef);\n\n return (\n <div\n {...filterDOMProps(props)}\n {...accordionProps}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Accordion', styleProps.className)}>\n {[...state.collection].map(item => (\n <AccordionItem<T> key={item.key} item={item} state={state} />\n ))}\n </div>\n );\n}\n\ninterface AccordionItemProps<T> {\n item: Node<T>,\n state: TreeState<T>\n}\n\nfunction AccordionItem<T>(props: AccordionItemProps<T>) {\n props = useProviderProps(props);\n let ref = useRef<HTMLButtonElement>(null);\n let {state, item} = props;\n let {buttonProps, regionProps} = useAccordionItem<T>(props, state, ref);\n let isOpen = state.expandedKeys.has(item.key);\n let isDisabled = state.disabledKeys.has(item.key);\n let {isHovered, hoverProps} = useHover({isDisabled});\n let {direction} = useLocale();\n\n return (\n <div\n className={classNames(styles, 'spectrum-Accordion-item', {\n 'is-open': isOpen,\n 'is-disabled': isDisabled\n })}>\n <h3 className={classNames(styles, 'spectrum-Accordion-itemHeading')}>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <button\n {...mergeProps(buttonProps, hoverProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Accordion-itemHeader', {\n 'is-hovered': isHovered\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 {item.props.title}\n </button>\n </FocusRing>\n </h3>\n <div {...regionProps} className={classNames(styles, 'spectrum-Accordion-itemContent')}>\n {item.props.children}\n </div>\n </div>\n );\n}\n\nconst _Accordion = forwardRef(Accordion) as <T>(props: SpectrumAccordionProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReturnType<typeof Accordion>;\nexport {_Accordion as Accordion};\n"],"names":[],"version":3,"file":"Accordion.main.js.map"}
@@ -0,0 +1,103 @@
1
+ import "./vars.1361683a.css";
2
+ import $aMy5K$accordion_vars_cssmodulejs from "./accordion_vars_css.mjs";
3
+ import $aMy5K$spectrumiconsuiChevronLeftMedium from "@spectrum-icons/ui/ChevronLeftMedium";
4
+ import $aMy5K$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
5
+ import {useStyleProps as $aMy5K$useStyleProps, useDOMRef as $aMy5K$useDOMRef, classNames as $aMy5K$classNames} from "@react-spectrum/utils";
6
+ import {filterDOMProps as $aMy5K$filterDOMProps, mergeProps as $aMy5K$mergeProps} from "@react-aria/utils";
7
+ import {FocusRing as $aMy5K$FocusRing} from "@react-aria/focus";
8
+ import $aMy5K$react, {useRef as $aMy5K$useRef, forwardRef as $aMy5K$forwardRef} from "react";
9
+ import {useTreeState as $aMy5K$useTreeState} from "@react-stately/tree";
10
+ import {useAccordion as $aMy5K$useAccordion, useAccordionItem as $aMy5K$useAccordionItem} from "@react-aria/accordion";
11
+ import {useHover as $aMy5K$useHover} from "@react-aria/interactions";
12
+ import {useLocale as $aMy5K$useLocale} from "@react-aria/i18n";
13
+ import {useProviderProps as $aMy5K$useProviderProps} from "@react-spectrum/provider";
14
+
15
+
16
+ function $parcel$interopDefault(a) {
17
+ return a && a.__esModule ? a.default : a;
18
+ }
19
+ /*
20
+ * Copyright 2020 Adobe. All rights reserved.
21
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
22
+ * you may not use this file except in compliance with the License. You may obtain a copy
23
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
24
+ *
25
+ * Unless required by applicable law or agreed to in writing, software distributed under
26
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
27
+ * OF ANY KIND, either express or implied. See the License for the specific language
28
+ * governing permissions and limitations under the License.
29
+ */
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ function $2a5a5b7faca81754$var$Accordion(props, ref) {
42
+ props = (0, $aMy5K$useProviderProps)(props);
43
+ let state = (0, $aMy5K$useTreeState)(props);
44
+ let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
45
+ let domRef = (0, $aMy5K$useDOMRef)(ref);
46
+ let { accordionProps: accordionProps } = (0, $aMy5K$useAccordion)(props, state, domRef);
47
+ return /*#__PURE__*/ (0, $aMy5K$react).createElement("div", {
48
+ ...(0, $aMy5K$filterDOMProps)(props),
49
+ ...accordionProps,
50
+ ...styleProps,
51
+ ref: domRef,
52
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion', styleProps.className)
53
+ }, [
54
+ ...state.collection
55
+ ].map((item)=>/*#__PURE__*/ (0, $aMy5K$react).createElement($2a5a5b7faca81754$var$AccordionItem, {
56
+ key: item.key,
57
+ item: item,
58
+ state: state
59
+ })));
60
+ }
61
+ function $2a5a5b7faca81754$var$AccordionItem(props) {
62
+ props = (0, $aMy5K$useProviderProps)(props);
63
+ let ref = (0, $aMy5K$useRef)(null);
64
+ let { state: state, item: item } = props;
65
+ let { buttonProps: buttonProps, regionProps: regionProps } = (0, $aMy5K$useAccordionItem)(props, state, ref);
66
+ let isOpen = state.expandedKeys.has(item.key);
67
+ let isDisabled = state.disabledKeys.has(item.key);
68
+ let { isHovered: isHovered, hoverProps: hoverProps } = (0, $aMy5K$useHover)({
69
+ isDisabled: isDisabled
70
+ });
71
+ let { direction: direction } = (0, $aMy5K$useLocale)();
72
+ return /*#__PURE__*/ (0, $aMy5K$react).createElement("div", {
73
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-item', {
74
+ 'is-open': isOpen,
75
+ 'is-disabled': isDisabled
76
+ })
77
+ }, /*#__PURE__*/ (0, $aMy5K$react).createElement("h3", {
78
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemHeading')
79
+ }, /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$FocusRing), {
80
+ within: true,
81
+ focusRingClass: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'focus-ring')
82
+ }, /*#__PURE__*/ (0, $aMy5K$react).createElement("button", {
83
+ ...(0, $aMy5K$mergeProps)(buttonProps, hoverProps),
84
+ ref: ref,
85
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemHeader', {
86
+ 'is-hovered': isHovered
87
+ })
88
+ }, direction === 'ltr' ? /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$spectrumiconsuiChevronRightMedium), {
89
+ "aria-hidden": "true",
90
+ UNSAFE_className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemIndicator')
91
+ }) : /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$spectrumiconsuiChevronLeftMedium), {
92
+ "aria-hidden": "true",
93
+ UNSAFE_className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemIndicator')
94
+ }), item.props.title))), /*#__PURE__*/ (0, $aMy5K$react).createElement("div", {
95
+ ...regionProps,
96
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemContent')
97
+ }, item.props.children));
98
+ }
99
+ const $2a5a5b7faca81754$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $aMy5K$forwardRef)($2a5a5b7faca81754$var$Accordion);
100
+
101
+
102
+ export {$2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion};
103
+ //# sourceMappingURL=Accordion.module.js.map
@@ -0,0 +1,103 @@
1
+ import "./vars.1361683a.css";
2
+ import $aMy5K$accordion_vars_cssmodulejs from "./accordion_vars_css.module.js";
3
+ import $aMy5K$spectrumiconsuiChevronLeftMedium from "@spectrum-icons/ui/ChevronLeftMedium";
4
+ import $aMy5K$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
5
+ import {useStyleProps as $aMy5K$useStyleProps, useDOMRef as $aMy5K$useDOMRef, classNames as $aMy5K$classNames} from "@react-spectrum/utils";
6
+ import {filterDOMProps as $aMy5K$filterDOMProps, mergeProps as $aMy5K$mergeProps} from "@react-aria/utils";
7
+ import {FocusRing as $aMy5K$FocusRing} from "@react-aria/focus";
8
+ import $aMy5K$react, {useRef as $aMy5K$useRef, forwardRef as $aMy5K$forwardRef} from "react";
9
+ import {useTreeState as $aMy5K$useTreeState} from "@react-stately/tree";
10
+ import {useAccordion as $aMy5K$useAccordion, useAccordionItem as $aMy5K$useAccordionItem} from "@react-aria/accordion";
11
+ import {useHover as $aMy5K$useHover} from "@react-aria/interactions";
12
+ import {useLocale as $aMy5K$useLocale} from "@react-aria/i18n";
13
+ import {useProviderProps as $aMy5K$useProviderProps} from "@react-spectrum/provider";
14
+
15
+
16
+ function $parcel$interopDefault(a) {
17
+ return a && a.__esModule ? a.default : a;
18
+ }
19
+ /*
20
+ * Copyright 2020 Adobe. All rights reserved.
21
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
22
+ * you may not use this file except in compliance with the License. You may obtain a copy
23
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
24
+ *
25
+ * Unless required by applicable law or agreed to in writing, software distributed under
26
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
27
+ * OF ANY KIND, either express or implied. See the License for the specific language
28
+ * governing permissions and limitations under the License.
29
+ */
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ function $2a5a5b7faca81754$var$Accordion(props, ref) {
42
+ props = (0, $aMy5K$useProviderProps)(props);
43
+ let state = (0, $aMy5K$useTreeState)(props);
44
+ let { styleProps: styleProps } = (0, $aMy5K$useStyleProps)(props);
45
+ let domRef = (0, $aMy5K$useDOMRef)(ref);
46
+ let { accordionProps: accordionProps } = (0, $aMy5K$useAccordion)(props, state, domRef);
47
+ return /*#__PURE__*/ (0, $aMy5K$react).createElement("div", {
48
+ ...(0, $aMy5K$filterDOMProps)(props),
49
+ ...accordionProps,
50
+ ...styleProps,
51
+ ref: domRef,
52
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion', styleProps.className)
53
+ }, [
54
+ ...state.collection
55
+ ].map((item)=>/*#__PURE__*/ (0, $aMy5K$react).createElement($2a5a5b7faca81754$var$AccordionItem, {
56
+ key: item.key,
57
+ item: item,
58
+ state: state
59
+ })));
60
+ }
61
+ function $2a5a5b7faca81754$var$AccordionItem(props) {
62
+ props = (0, $aMy5K$useProviderProps)(props);
63
+ let ref = (0, $aMy5K$useRef)(null);
64
+ let { state: state, item: item } = props;
65
+ let { buttonProps: buttonProps, regionProps: regionProps } = (0, $aMy5K$useAccordionItem)(props, state, ref);
66
+ let isOpen = state.expandedKeys.has(item.key);
67
+ let isDisabled = state.disabledKeys.has(item.key);
68
+ let { isHovered: isHovered, hoverProps: hoverProps } = (0, $aMy5K$useHover)({
69
+ isDisabled: isDisabled
70
+ });
71
+ let { direction: direction } = (0, $aMy5K$useLocale)();
72
+ return /*#__PURE__*/ (0, $aMy5K$react).createElement("div", {
73
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-item', {
74
+ 'is-open': isOpen,
75
+ 'is-disabled': isDisabled
76
+ })
77
+ }, /*#__PURE__*/ (0, $aMy5K$react).createElement("h3", {
78
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemHeading')
79
+ }, /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$FocusRing), {
80
+ within: true,
81
+ focusRingClass: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'focus-ring')
82
+ }, /*#__PURE__*/ (0, $aMy5K$react).createElement("button", {
83
+ ...(0, $aMy5K$mergeProps)(buttonProps, hoverProps),
84
+ ref: ref,
85
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemHeader', {
86
+ 'is-hovered': isHovered
87
+ })
88
+ }, direction === 'ltr' ? /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$spectrumiconsuiChevronRightMedium), {
89
+ "aria-hidden": "true",
90
+ UNSAFE_className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemIndicator')
91
+ }) : /*#__PURE__*/ (0, $aMy5K$react).createElement((0, $aMy5K$spectrumiconsuiChevronLeftMedium), {
92
+ "aria-hidden": "true",
93
+ UNSAFE_className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemIndicator')
94
+ }), item.props.title))), /*#__PURE__*/ (0, $aMy5K$react).createElement("div", {
95
+ ...regionProps,
96
+ className: (0, $aMy5K$classNames)((0, ($parcel$interopDefault($aMy5K$accordion_vars_cssmodulejs))), 'spectrum-Accordion-itemContent')
97
+ }, item.props.children));
98
+ }
99
+ const $2a5a5b7faca81754$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $aMy5K$forwardRef)($2a5a5b7faca81754$var$Accordion);
100
+
101
+
102
+ export {$2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion};
103
+ //# sourceMappingURL=Accordion.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;AAkBD,SAAS,gCAA4B,KAAgC,EAAE,GAA2B;IAChG,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,QAAQ,CAAA,GAAA,mBAAW,EAAK;IAC5B,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE,OAAO,OAAO;IAElD,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,MAAM;QACxB,GAAG,cAAc;QACjB,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG,sBAAsB,WAAW,SAAS;OACvE;WAAI,MAAM,UAAU;KAAC,CAAC,GAAG,CAAC,CAAA,qBACzB,gCAAC;YAAiB,KAAK,KAAK,GAAG;YAAE,MAAM;YAAM,OAAO;;AAI5D;AAOA,SAAS,oCAAiB,KAA4B;IACpD,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,MAAM,CAAA,GAAA,aAAK,EAAqB;IACpC,IAAI,SAAC,KAAK,QAAE,IAAI,EAAC,GAAG;IACpB,IAAI,eAAC,WAAW,eAAE,WAAW,EAAC,GAAG,CAAA,GAAA,uBAAe,EAAK,OAAO,OAAO;IACnE,IAAI,SAAS,MAAM,YAAY,CAAC,GAAG,CAAC,KAAK,GAAG;IAC5C,IAAI,aAAa,MAAM,YAAY,CAAC,GAAG,CAAC,KAAK,GAAG;IAChD,IAAI,aAAC,SAAS,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;oBAAC;IAAU;IAClD,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAE1B,qBACE,gCAAC;QACC,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG,2BAA2B;YACvD,WAAW;YACX,eAAe;QACjB;qBACA,gCAAC;QAAG,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;qBAChC,gCAAC,CAAA,GAAA,gBAAQ;QAAE,QAAA;QAAO,gBAAgB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;qBACnD,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,WAAW;QACvC,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG,iCAAiC;YAC7D,cAAc;QAChB;OACC,cAAc,sBACb,gCAAC,CAAA,GAAA,wCAAiB;QAChB,eAAY;QACZ,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;uBAErC,gCAAC,CAAA,GAAA,uCAAgB;QACf,eAAY;QACZ,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;QAE1C,KAAK,KAAK,CAAC,KAAK,mBAIvB,gCAAC;QAAK,GAAG,WAAW;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;OACjD,KAAK,KAAK,CAAC,QAAQ;AAI5B;AAEA,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE","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 ChevronLeftMedium from '@spectrum-icons/ui/ChevronLeftMedium';\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, Node} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumAccordionProps} from '@react-types/accordion';\nimport styles from '@adobe/spectrum-css-temp/components/accordion/vars.css';\nimport {TreeState, useTreeState} from '@react-stately/tree';\nimport {useAccordion, useAccordionItem} from '@react-aria/accordion';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\nfunction Accordion<T extends object>(props: SpectrumAccordionProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let state = useTreeState<T>(props);\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n let {accordionProps} = useAccordion(props, state, domRef);\n\n return (\n <div\n {...filterDOMProps(props)}\n {...accordionProps}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Accordion', styleProps.className)}>\n {[...state.collection].map(item => (\n <AccordionItem<T> key={item.key} item={item} state={state} />\n ))}\n </div>\n );\n}\n\ninterface AccordionItemProps<T> {\n item: Node<T>,\n state: TreeState<T>\n}\n\nfunction AccordionItem<T>(props: AccordionItemProps<T>) {\n props = useProviderProps(props);\n let ref = useRef<HTMLButtonElement>(null);\n let {state, item} = props;\n let {buttonProps, regionProps} = useAccordionItem<T>(props, state, ref);\n let isOpen = state.expandedKeys.has(item.key);\n let isDisabled = state.disabledKeys.has(item.key);\n let {isHovered, hoverProps} = useHover({isDisabled});\n let {direction} = useLocale();\n\n return (\n <div\n className={classNames(styles, 'spectrum-Accordion-item', {\n 'is-open': isOpen,\n 'is-disabled': isDisabled\n })}>\n <h3 className={classNames(styles, 'spectrum-Accordion-itemHeading')}>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <button\n {...mergeProps(buttonProps, hoverProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Accordion-itemHeader', {\n 'is-hovered': isHovered\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 {item.props.title}\n </button>\n </FocusRing>\n </h3>\n <div {...regionProps} className={classNames(styles, 'spectrum-Accordion-itemContent')}>\n {item.props.children}\n </div>\n </div>\n );\n}\n\nconst _Accordion = forwardRef(Accordion) as <T>(props: SpectrumAccordionProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReturnType<typeof Accordion>;\nexport {_Accordion as Accordion};\n"],"names":[],"version":3,"file":"Accordion.module.js.map"}
@@ -0,0 +1,38 @@
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, "is-disabled", () => $5ab573b23bc1d039$export$d35bc1e505d1ebbf, (v) => $5ab573b23bc1d039$export$d35bc1e505d1ebbf = v);
8
+ $parcel$export(module.exports, "is-hovered", () => $5ab573b23bc1d039$export$b8813cd5d7824ce7, (v) => $5ab573b23bc1d039$export$b8813cd5d7824ce7 = v);
9
+ $parcel$export(module.exports, "is-open", () => $5ab573b23bc1d039$export$a9781837241c946d, (v) => $5ab573b23bc1d039$export$a9781837241c946d = v);
10
+ $parcel$export(module.exports, "spectrum-Accordion", () => $5ab573b23bc1d039$export$bed6cbae852b32f0, (v) => $5ab573b23bc1d039$export$bed6cbae852b32f0 = v);
11
+ $parcel$export(module.exports, "spectrum-Accordion-item", () => $5ab573b23bc1d039$export$a1947cb8adf67515, (v) => $5ab573b23bc1d039$export$a1947cb8adf67515 = v);
12
+ $parcel$export(module.exports, "spectrum-Accordion-itemContent", () => $5ab573b23bc1d039$export$951cb9dc63743241, (v) => $5ab573b23bc1d039$export$951cb9dc63743241 = v);
13
+ $parcel$export(module.exports, "spectrum-Accordion-itemHeader", () => $5ab573b23bc1d039$export$4da8efb546c03356, (v) => $5ab573b23bc1d039$export$4da8efb546c03356 = v);
14
+ $parcel$export(module.exports, "spectrum-Accordion-itemHeading", () => $5ab573b23bc1d039$export$36876b8193439034, (v) => $5ab573b23bc1d039$export$36876b8193439034 = v);
15
+ $parcel$export(module.exports, "spectrum-Accordion-itemIndicator", () => $5ab573b23bc1d039$export$35196e2132b47abd, (v) => $5ab573b23bc1d039$export$35196e2132b47abd = v);
16
+ var $5ab573b23bc1d039$export$f39a09f249340e2a;
17
+ var $5ab573b23bc1d039$export$d35bc1e505d1ebbf;
18
+ var $5ab573b23bc1d039$export$b8813cd5d7824ce7;
19
+ var $5ab573b23bc1d039$export$a9781837241c946d;
20
+ var $5ab573b23bc1d039$export$bed6cbae852b32f0;
21
+ var $5ab573b23bc1d039$export$a1947cb8adf67515;
22
+ var $5ab573b23bc1d039$export$951cb9dc63743241;
23
+ var $5ab573b23bc1d039$export$4da8efb546c03356;
24
+ var $5ab573b23bc1d039$export$36876b8193439034;
25
+ var $5ab573b23bc1d039$export$35196e2132b47abd;
26
+ $5ab573b23bc1d039$export$f39a09f249340e2a = `_7gO6Sq_focus-ring`;
27
+ $5ab573b23bc1d039$export$d35bc1e505d1ebbf = `_7gO6Sq_is-disabled`;
28
+ $5ab573b23bc1d039$export$b8813cd5d7824ce7 = `_7gO6Sq_is-hovered`;
29
+ $5ab573b23bc1d039$export$a9781837241c946d = `_7gO6Sq_is-open`;
30
+ $5ab573b23bc1d039$export$bed6cbae852b32f0 = `_7gO6Sq_spectrum-Accordion`;
31
+ $5ab573b23bc1d039$export$a1947cb8adf67515 = `_7gO6Sq_spectrum-Accordion-item`;
32
+ $5ab573b23bc1d039$export$951cb9dc63743241 = `_7gO6Sq_spectrum-Accordion-itemContent`;
33
+ $5ab573b23bc1d039$export$4da8efb546c03356 = `_7gO6Sq_spectrum-Accordion-itemHeader`;
34
+ $5ab573b23bc1d039$export$36876b8193439034 = `_7gO6Sq_spectrum-Accordion-itemHeading`;
35
+ $5ab573b23bc1d039$export$35196e2132b47abd = `_7gO6Sq_spectrum-Accordion-itemIndicator`;
36
+
37
+
38
+ //# sourceMappingURL=accordion_vars_css.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AATA,4CAA+B,CAAC,kBAAkB,CAAC;AACnD,4CAAgC,CAAC,mBAAmB,CAAC;AACrD,4CAA+B,CAAC,kBAAkB,CAAC;AACnD,4CAA4B,CAAC,eAAe,CAAC;AAC7C,4CAAuC,CAAC,0BAA0B,CAAC;AACnE,4CAA4C,CAAC,+BAA+B,CAAC;AAC7E,4CAAmD,CAAC,sCAAsC,CAAC;AAC3F,4CAAkD,CAAC,qCAAqC,CAAC;AACzF,4CAAmD,CAAC,sCAAsC,CAAC;AAC3F,4CAAqD,CAAC,wCAAwC,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"}
@@ -0,0 +1,40 @@
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, "is-disabled", () => $cd9bb50514faf076$export$d35bc1e505d1ebbf, (v) => $cd9bb50514faf076$export$d35bc1e505d1ebbf = v);
9
+ $parcel$export($cd9bb50514faf076$exports, "is-hovered", () => $cd9bb50514faf076$export$b8813cd5d7824ce7, (v) => $cd9bb50514faf076$export$b8813cd5d7824ce7 = v);
10
+ $parcel$export($cd9bb50514faf076$exports, "is-open", () => $cd9bb50514faf076$export$a9781837241c946d, (v) => $cd9bb50514faf076$export$a9781837241c946d = v);
11
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion", () => $cd9bb50514faf076$export$bed6cbae852b32f0, (v) => $cd9bb50514faf076$export$bed6cbae852b32f0 = v);
12
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-item", () => $cd9bb50514faf076$export$a1947cb8adf67515, (v) => $cd9bb50514faf076$export$a1947cb8adf67515 = v);
13
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemContent", () => $cd9bb50514faf076$export$951cb9dc63743241, (v) => $cd9bb50514faf076$export$951cb9dc63743241 = v);
14
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeader", () => $cd9bb50514faf076$export$4da8efb546c03356, (v) => $cd9bb50514faf076$export$4da8efb546c03356 = v);
15
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeading", () => $cd9bb50514faf076$export$36876b8193439034, (v) => $cd9bb50514faf076$export$36876b8193439034 = v);
16
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemIndicator", () => $cd9bb50514faf076$export$35196e2132b47abd, (v) => $cd9bb50514faf076$export$35196e2132b47abd = v);
17
+ var $cd9bb50514faf076$export$f39a09f249340e2a;
18
+ var $cd9bb50514faf076$export$d35bc1e505d1ebbf;
19
+ var $cd9bb50514faf076$export$b8813cd5d7824ce7;
20
+ var $cd9bb50514faf076$export$a9781837241c946d;
21
+ var $cd9bb50514faf076$export$bed6cbae852b32f0;
22
+ var $cd9bb50514faf076$export$a1947cb8adf67515;
23
+ var $cd9bb50514faf076$export$951cb9dc63743241;
24
+ var $cd9bb50514faf076$export$4da8efb546c03356;
25
+ var $cd9bb50514faf076$export$36876b8193439034;
26
+ var $cd9bb50514faf076$export$35196e2132b47abd;
27
+ $cd9bb50514faf076$export$f39a09f249340e2a = `_7gO6Sq_focus-ring`;
28
+ $cd9bb50514faf076$export$d35bc1e505d1ebbf = `_7gO6Sq_is-disabled`;
29
+ $cd9bb50514faf076$export$b8813cd5d7824ce7 = `_7gO6Sq_is-hovered`;
30
+ $cd9bb50514faf076$export$a9781837241c946d = `_7gO6Sq_is-open`;
31
+ $cd9bb50514faf076$export$bed6cbae852b32f0 = `_7gO6Sq_spectrum-Accordion`;
32
+ $cd9bb50514faf076$export$a1947cb8adf67515 = `_7gO6Sq_spectrum-Accordion-item`;
33
+ $cd9bb50514faf076$export$951cb9dc63743241 = `_7gO6Sq_spectrum-Accordion-itemContent`;
34
+ $cd9bb50514faf076$export$4da8efb546c03356 = `_7gO6Sq_spectrum-Accordion-itemHeader`;
35
+ $cd9bb50514faf076$export$36876b8193439034 = `_7gO6Sq_spectrum-Accordion-itemHeading`;
36
+ $cd9bb50514faf076$export$35196e2132b47abd = `_7gO6Sq_spectrum-Accordion-itemIndicator`;
37
+
38
+
39
+ export {$cd9bb50514faf076$exports as default};
40
+ //# sourceMappingURL=accordion_vars_css.module.js.map
@@ -0,0 +1,40 @@
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, "is-disabled", () => $cd9bb50514faf076$export$d35bc1e505d1ebbf, (v) => $cd9bb50514faf076$export$d35bc1e505d1ebbf = v);
9
+ $parcel$export($cd9bb50514faf076$exports, "is-hovered", () => $cd9bb50514faf076$export$b8813cd5d7824ce7, (v) => $cd9bb50514faf076$export$b8813cd5d7824ce7 = v);
10
+ $parcel$export($cd9bb50514faf076$exports, "is-open", () => $cd9bb50514faf076$export$a9781837241c946d, (v) => $cd9bb50514faf076$export$a9781837241c946d = v);
11
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion", () => $cd9bb50514faf076$export$bed6cbae852b32f0, (v) => $cd9bb50514faf076$export$bed6cbae852b32f0 = v);
12
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-item", () => $cd9bb50514faf076$export$a1947cb8adf67515, (v) => $cd9bb50514faf076$export$a1947cb8adf67515 = v);
13
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemContent", () => $cd9bb50514faf076$export$951cb9dc63743241, (v) => $cd9bb50514faf076$export$951cb9dc63743241 = v);
14
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeader", () => $cd9bb50514faf076$export$4da8efb546c03356, (v) => $cd9bb50514faf076$export$4da8efb546c03356 = v);
15
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeading", () => $cd9bb50514faf076$export$36876b8193439034, (v) => $cd9bb50514faf076$export$36876b8193439034 = v);
16
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemIndicator", () => $cd9bb50514faf076$export$35196e2132b47abd, (v) => $cd9bb50514faf076$export$35196e2132b47abd = v);
17
+ var $cd9bb50514faf076$export$f39a09f249340e2a;
18
+ var $cd9bb50514faf076$export$d35bc1e505d1ebbf;
19
+ var $cd9bb50514faf076$export$b8813cd5d7824ce7;
20
+ var $cd9bb50514faf076$export$a9781837241c946d;
21
+ var $cd9bb50514faf076$export$bed6cbae852b32f0;
22
+ var $cd9bb50514faf076$export$a1947cb8adf67515;
23
+ var $cd9bb50514faf076$export$951cb9dc63743241;
24
+ var $cd9bb50514faf076$export$4da8efb546c03356;
25
+ var $cd9bb50514faf076$export$36876b8193439034;
26
+ var $cd9bb50514faf076$export$35196e2132b47abd;
27
+ $cd9bb50514faf076$export$f39a09f249340e2a = `_7gO6Sq_focus-ring`;
28
+ $cd9bb50514faf076$export$d35bc1e505d1ebbf = `_7gO6Sq_is-disabled`;
29
+ $cd9bb50514faf076$export$b8813cd5d7824ce7 = `_7gO6Sq_is-hovered`;
30
+ $cd9bb50514faf076$export$a9781837241c946d = `_7gO6Sq_is-open`;
31
+ $cd9bb50514faf076$export$bed6cbae852b32f0 = `_7gO6Sq_spectrum-Accordion`;
32
+ $cd9bb50514faf076$export$a1947cb8adf67515 = `_7gO6Sq_spectrum-Accordion-item`;
33
+ $cd9bb50514faf076$export$951cb9dc63743241 = `_7gO6Sq_spectrum-Accordion-itemContent`;
34
+ $cd9bb50514faf076$export$4da8efb546c03356 = `_7gO6Sq_spectrum-Accordion-itemHeader`;
35
+ $cd9bb50514faf076$export$36876b8193439034 = `_7gO6Sq_spectrum-Accordion-itemHeading`;
36
+ $cd9bb50514faf076$export$35196e2132b47abd = `_7gO6Sq_spectrum-Accordion-itemIndicator`;
37
+
38
+
39
+ export {$cd9bb50514faf076$exports as default};
40
+ //# sourceMappingURL=accordion_vars_css.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AATA,4CAA+B,CAAC,kBAAkB,CAAC;AACnD,4CAAgC,CAAC,mBAAmB,CAAC;AACrD,4CAA+B,CAAC,kBAAkB,CAAC;AACnD,4CAA4B,CAAC,eAAe,CAAC;AAC7C,4CAAuC,CAAC,0BAA0B,CAAC;AACnE,4CAA4C,CAAC,+BAA+B,CAAC;AAC7E,4CAAmD,CAAC,sCAAsC,CAAC;AAC3F,4CAAkD,CAAC,qCAAqC,CAAC;AACzF,4CAAmD,CAAC,sCAAsC,CAAC;AAC3F,4CAAqD,CAAC,wCAAwC,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"}
@@ -0,0 +1,20 @@
1
+ import {Accordion as $2a5a5b7faca81754$export$a766cd26d0d69044} from "./Accordion.mjs";
2
+ import {Item as $8ae4d4d1aa0c5e03$re_export$Item} from "@react-stately/collections";
3
+
4
+ /*
5
+ * Copyright 2020 Adobe. All rights reserved.
6
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License. You may obtain a copy
8
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
12
+ * OF ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ */ /// <reference types="css-module-types" />
15
+
16
+
17
+
18
+
19
+ export {$2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion, $8ae4d4d1aa0c5e03$re_export$Item as Item};
20
+ //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,150 +1,26 @@
1
- var {
2
- useProviderProps
3
- } = require("@react-spectrum/provider");
1
+ var $d8f45715b3ce327a$exports = require("./Accordion.main.js");
2
+ var $6boyC$reactstatelycollections = require("@react-stately/collections");
4
3
 
5
- var {
6
- useLocale
7
- } = require("@react-aria/i18n");
8
4
 
9
- var {
10
- useHover
11
- } = require("@react-aria/interactions");
12
-
13
- var {
14
- useAccordion,
15
- useAccordionItem
16
- } = require("@react-aria/accordion");
17
-
18
- var {
19
- useTreeState
20
- } = require("@react-stately/tree");
21
-
22
- var _react2 = require("react");
23
-
24
- var _react = $parcel$interopDefault(_react2);
25
-
26
- var {
27
- forwardRef,
28
- useRef
29
- } = _react2;
30
-
31
- var {
32
- FocusRing
33
- } = require("@react-aria/focus");
34
-
35
- var {
36
- filterDOMProps,
37
- mergeProps
38
- } = require("@react-aria/utils");
39
-
40
- var {
41
- classNames,
42
- useDOMRef,
43
- useStyleProps
44
- } = require("@react-spectrum/utils");
45
-
46
- var _spectrumIconsUiChevronRightMedium = $parcel$interopDefault(require("@spectrum-icons/ui/ChevronRightMedium"));
47
-
48
- var _spectrumIconsUiChevronLeftMedium = $parcel$interopDefault(require("@spectrum-icons/ui/ChevronLeftMedium"));
49
-
50
- var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
51
-
52
- var {
53
- Item
54
- } = require("@react-stately/collections");
55
-
56
- exports.Item = Item;
57
-
58
- require("./main.css");
59
-
60
- function $parcel$interopDefault(a) {
61
- return a && a.__esModule ? a.default : a;
5
+ function $parcel$export(e, n, v, s) {
6
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
62
7
  }
63
8
 
64
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/accordion/vars.css
65
- var $f985675dcc9276961ef0f83a88faafff$exports = {};
66
- $f985675dcc9276961ef0f83a88faafff$exports = {
67
- "spectrum-Accordion": "_spectrum-Accordion_961bc",
68
- "spectrum-Accordion-itemIndicator": "_spectrum-Accordion-itemIndicator_961bc",
69
- "spectrum-Accordion-item": "_spectrum-Accordion-item_961bc",
70
- "spectrum-Accordion-itemHeading": "_spectrum-Accordion-itemHeading_961bc",
71
- "spectrum-Accordion-itemHeader": "_spectrum-Accordion-itemHeader_961bc",
72
- "spectrum-Accordion-itemContent": "_spectrum-Accordion-itemContent_961bc",
73
- "is-open": "_is-open_961bc",
74
- "is-disabled": "_is-disabled_961bc",
75
- "is-hovered": "_is-hovered_961bc",
76
- "focus-ring": "_focus-ring_961bc"
77
- };
78
- var $f985675dcc9276961ef0f83a88faafff$$interop$default = $parcel$interopDefault($f985675dcc9276961ef0f83a88faafff$exports);
9
+ $parcel$export(module.exports, "Accordion", () => $d8f45715b3ce327a$exports.Accordion);
10
+ $parcel$export(module.exports, "Item", () => $6boyC$reactstatelycollections.Item);
11
+ /*
12
+ * Copyright 2020 Adobe. All rights reserved.
13
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14
+ * you may not use this file except in compliance with the License. You may obtain a copy
15
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software distributed under
18
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
19
+ * OF ANY KIND, either express or implied. See the License for the specific language
20
+ * governing permissions and limitations under the License.
21
+ */ /// <reference types="css-module-types" />
22
+
79
23
 
80
- function $be7b8672a8bbdf8d3fdb2b9fe3226e$var$Accordion(props, ref) {
81
- props = useProviderProps(props);
82
- let state = useTreeState(props);
83
- let {
84
- styleProps
85
- } = useStyleProps(props);
86
- let domRef = useDOMRef(ref);
87
- let {
88
- accordionProps
89
- } = useAccordion(props, state, domRef);
90
- return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({}, filterDOMProps(props), accordionProps, styleProps, {
91
- ref: domRef,
92
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion', styleProps.className)
93
- }), [...state.collection].map(item => /*#__PURE__*/_react.createElement($be7b8672a8bbdf8d3fdb2b9fe3226e$var$AccordionItem, {
94
- key: item.key,
95
- item: item,
96
- state: state
97
- })));
98
- }
99
24
 
100
- function $be7b8672a8bbdf8d3fdb2b9fe3226e$var$AccordionItem(props) {
101
- props = useProviderProps(props);
102
- let ref = useRef();
103
- let {
104
- state,
105
- item
106
- } = props;
107
- let {
108
- buttonProps,
109
- regionProps
110
- } = useAccordionItem(props, state, ref);
111
- let isOpen = state.expandedKeys.has(item.key);
112
- let isDisabled = state.disabledKeys.has(item.key);
113
- let {
114
- isHovered,
115
- hoverProps
116
- } = useHover({
117
- isDisabled
118
- });
119
- let {
120
- direction
121
- } = useLocale();
122
- return /*#__PURE__*/_react.createElement("div", {
123
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-item', {
124
- 'is-open': isOpen,
125
- 'is-disabled': isDisabled
126
- })
127
- }, /*#__PURE__*/_react.createElement("h3", {
128
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemHeading')
129
- }, /*#__PURE__*/_react.createElement(FocusRing, {
130
- within: true,
131
- focusRingClass: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'focus-ring')
132
- }, /*#__PURE__*/_react.createElement("button", _babelRuntimeHelpersExtends({}, mergeProps(buttonProps, hoverProps), {
133
- ref: ref,
134
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemHeader', {
135
- 'is-hovered': isHovered
136
- })
137
- }), direction === 'ltr' ? /*#__PURE__*/_react.createElement(_spectrumIconsUiChevronRightMedium, {
138
- "aria-hidden": "true",
139
- UNSAFE_className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemIndicator')
140
- }) : /*#__PURE__*/_react.createElement(_spectrumIconsUiChevronLeftMedium, {
141
- "aria-hidden": "true",
142
- UNSAFE_className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemIndicator')
143
- }), item.props.title))), /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({}, regionProps, {
144
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemContent')
145
- }), item.props.children));
146
- }
147
25
 
148
- const Accordion = /*#__PURE__*/forwardRef($be7b8672a8bbdf8d3fdb2b9fe3226e$var$Accordion);
149
- exports.Accordion = Accordion;
150
26
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":"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","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/accordion/vars.css","./packages/@react-spectrum/accordion/src/Accordion.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport ChevronLeftMedium from '@spectrum-icons/ui/ChevronLeftMedium';\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, Node} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumAccordionProps} from '@react-types/accordion';\nimport styles from '@adobe/spectrum-css-temp/components/accordion/vars.css';\nimport {TreeState, useTreeState} from '@react-stately/tree';\nimport {useAccordion, useAccordionItem} from '@react-aria/accordion';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\nfunction Accordion<T extends object>(props: SpectrumAccordionProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let state = useTreeState<T>(props);\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n let {accordionProps} = useAccordion(props, state, domRef);\n\n return (\n <div\n {...filterDOMProps(props)}\n {...accordionProps}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Accordion', styleProps.className)}>\n {[...state.collection].map(item => (\n <AccordionItem<T> key={item.key} item={item} state={state} />\n ))}\n </div>\n );\n}\n\ninterface AccordionItemProps<T> {\n item: Node<T>,\n state: TreeState<T>\n}\n\nfunction AccordionItem<T>(props: AccordionItemProps<T>) {\n props = useProviderProps(props);\n let ref = useRef<HTMLButtonElement>();\n let {state, item} = props;\n let {buttonProps, regionProps} = useAccordionItem<T>(props, state, ref);\n let isOpen = state.expandedKeys.has(item.key);\n let isDisabled = state.disabledKeys.has(item.key);\n let {isHovered, hoverProps} = useHover({isDisabled});\n let {direction} = useLocale();\n\n return (\n <div\n className={classNames(styles, 'spectrum-Accordion-item', {\n 'is-open': isOpen,\n 'is-disabled': isDisabled\n })}>\n <h3 className={classNames(styles, 'spectrum-Accordion-itemHeading')}>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <button\n {...mergeProps(buttonProps, hoverProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Accordion-itemHeader', {\n 'is-hovered': isHovered\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 {item.props.title}\n </button>\n </FocusRing>\n </h3>\n <div {...regionProps} className={classNames(styles, 'spectrum-Accordion-itemContent')}>\n {item.props.children}\n </div>\n </div>\n );\n}\n\nconst _Accordion = forwardRef(Accordion) as <T>(props: SpectrumAccordionProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReturnType<typeof Accordion>;\nexport {_Accordion as Accordion};\n"],"names":["$parcel$interopDefault","a","__esModule","default","Accordion","props","ref","useProviderProps","state","useTreeState","styleProps","useStyleProps","domRef","useDOMRef","accordionProps","useAccordion","filterDOMProps","classNames","className","collection","map","item","key","AccordionItem","useRef","buttonProps","regionProps","useAccordionItem","isOpen","expandedKeys","has","isDisabled","disabledKeys","isHovered","hoverProps","useHover","direction","useLocale","mergeProps","title","children","_Accordion","forwardRef"],"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 {Accordion} from './Accordion';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumAccordionProps} from '@react-types/accordion';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,106 +1,20 @@
1
- import { useProviderProps } from "@react-spectrum/provider";
2
- import { useLocale } from "@react-aria/i18n";
3
- import { useHover } from "@react-aria/interactions";
4
- import { useAccordion, useAccordionItem } from "@react-aria/accordion";
5
- import { useTreeState } from "@react-stately/tree";
6
- import _react, { forwardRef, useRef } from "react";
7
- import { FocusRing } from "@react-aria/focus";
8
- import { filterDOMProps, mergeProps } from "@react-aria/utils";
9
- import { classNames, useDOMRef, useStyleProps } from "@react-spectrum/utils";
10
- import _spectrumIconsUiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
11
- import _spectrumIconsUiChevronLeftMedium from "@spectrum-icons/ui/ChevronLeftMedium";
12
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
13
- import { Item } from "@react-stately/collections";
14
- export { Item };
15
- import "./main.css";
1
+ import {Accordion as $2a5a5b7faca81754$export$a766cd26d0d69044} from "./Accordion.module.js";
2
+ import {Item as $8ae4d4d1aa0c5e03$re_export$Item} from "@react-stately/collections";
16
3
 
17
- function $parcel$interopDefault(a) {
18
- return a && a.__esModule ? a.default : a;
19
- }
4
+ /*
5
+ * Copyright 2020 Adobe. All rights reserved.
6
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License. You may obtain a copy
8
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
12
+ * OF ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ */ /// <reference types="css-module-types" />
20
15
 
21
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/accordion/vars.css
22
- var $b2b88515c73a4a81ed128f007b5431f$exports = {};
23
- $b2b88515c73a4a81ed128f007b5431f$exports = {
24
- "spectrum-Accordion": "_spectrum-Accordion_961bc",
25
- "spectrum-Accordion-itemIndicator": "_spectrum-Accordion-itemIndicator_961bc",
26
- "spectrum-Accordion-item": "_spectrum-Accordion-item_961bc",
27
- "spectrum-Accordion-itemHeading": "_spectrum-Accordion-itemHeading_961bc",
28
- "spectrum-Accordion-itemHeader": "_spectrum-Accordion-itemHeader_961bc",
29
- "spectrum-Accordion-itemContent": "_spectrum-Accordion-itemContent_961bc",
30
- "is-open": "_is-open_961bc",
31
- "is-disabled": "_is-disabled_961bc",
32
- "is-hovered": "_is-hovered_961bc",
33
- "focus-ring": "_focus-ring_961bc"
34
- };
35
- var $b2b88515c73a4a81ed128f007b5431f$$interop$default = $parcel$interopDefault($b2b88515c73a4a81ed128f007b5431f$exports);
36
16
 
37
- function $f180b8b9e9903ea16cbb02a00974$var$Accordion(props, ref) {
38
- props = useProviderProps(props);
39
- let state = useTreeState(props);
40
- let {
41
- styleProps
42
- } = useStyleProps(props);
43
- let domRef = useDOMRef(ref);
44
- let {
45
- accordionProps
46
- } = useAccordion(props, state, domRef);
47
- return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(props), accordionProps, styleProps, {
48
- ref: domRef,
49
- className: classNames($b2b88515c73a4a81ed128f007b5431f$$interop$default, 'spectrum-Accordion', styleProps.className)
50
- }), [...state.collection].map(item => /*#__PURE__*/_react.createElement($f180b8b9e9903ea16cbb02a00974$var$AccordionItem, {
51
- key: item.key,
52
- item: item,
53
- state: state
54
- })));
55
- }
56
17
 
57
- function $f180b8b9e9903ea16cbb02a00974$var$AccordionItem(props) {
58
- props = useProviderProps(props);
59
- let ref = useRef();
60
- let {
61
- state,
62
- item
63
- } = props;
64
- let {
65
- buttonProps,
66
- regionProps
67
- } = useAccordionItem(props, state, ref);
68
- let isOpen = state.expandedKeys.has(item.key);
69
- let isDisabled = state.disabledKeys.has(item.key);
70
- let {
71
- isHovered,
72
- hoverProps
73
- } = useHover({
74
- isDisabled
75
- });
76
- let {
77
- direction
78
- } = useLocale();
79
- return /*#__PURE__*/_react.createElement("div", {
80
- className: classNames($b2b88515c73a4a81ed128f007b5431f$$interop$default, 'spectrum-Accordion-item', {
81
- 'is-open': isOpen,
82
- 'is-disabled': isDisabled
83
- })
84
- }, /*#__PURE__*/_react.createElement("h3", {
85
- className: classNames($b2b88515c73a4a81ed128f007b5431f$$interop$default, 'spectrum-Accordion-itemHeading')
86
- }, /*#__PURE__*/_react.createElement(FocusRing, {
87
- within: true,
88
- focusRingClass: classNames($b2b88515c73a4a81ed128f007b5431f$$interop$default, 'focus-ring')
89
- }, /*#__PURE__*/_react.createElement("button", _babelRuntimeHelpersEsmExtends({}, mergeProps(buttonProps, hoverProps), {
90
- ref: ref,
91
- className: classNames($b2b88515c73a4a81ed128f007b5431f$$interop$default, 'spectrum-Accordion-itemHeader', {
92
- 'is-hovered': isHovered
93
- })
94
- }), direction === 'ltr' ? /*#__PURE__*/_react.createElement(_spectrumIconsUiChevronRightMedium, {
95
- "aria-hidden": "true",
96
- UNSAFE_className: classNames($b2b88515c73a4a81ed128f007b5431f$$interop$default, 'spectrum-Accordion-itemIndicator')
97
- }) : /*#__PURE__*/_react.createElement(_spectrumIconsUiChevronLeftMedium, {
98
- "aria-hidden": "true",
99
- UNSAFE_className: classNames($b2b88515c73a4a81ed128f007b5431f$$interop$default, 'spectrum-Accordion-itemIndicator')
100
- }), item.props.title))), /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, regionProps, {
101
- className: classNames($b2b88515c73a4a81ed128f007b5431f$$interop$default, 'spectrum-Accordion-itemContent')
102
- }), item.props.children));
103
- }
104
18
 
105
- export const Accordion = /*#__PURE__*/forwardRef($f180b8b9e9903ea16cbb02a00974$var$Accordion);
19
+ export {$2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion, $8ae4d4d1aa0c5e03$re_export$Item as Item};
106
20
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":"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","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/accordion/vars.css","./packages/@react-spectrum/accordion/src/Accordion.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport ChevronLeftMedium from '@spectrum-icons/ui/ChevronLeftMedium';\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, Node} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumAccordionProps} from '@react-types/accordion';\nimport styles from '@adobe/spectrum-css-temp/components/accordion/vars.css';\nimport {TreeState, useTreeState} from '@react-stately/tree';\nimport {useAccordion, useAccordionItem} from '@react-aria/accordion';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\nfunction Accordion<T extends object>(props: SpectrumAccordionProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let state = useTreeState<T>(props);\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n let {accordionProps} = useAccordion(props, state, domRef);\n\n return (\n <div\n {...filterDOMProps(props)}\n {...accordionProps}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Accordion', styleProps.className)}>\n {[...state.collection].map(item => (\n <AccordionItem<T> key={item.key} item={item} state={state} />\n ))}\n </div>\n );\n}\n\ninterface AccordionItemProps<T> {\n item: Node<T>,\n state: TreeState<T>\n}\n\nfunction AccordionItem<T>(props: AccordionItemProps<T>) {\n props = useProviderProps(props);\n let ref = useRef<HTMLButtonElement>();\n let {state, item} = props;\n let {buttonProps, regionProps} = useAccordionItem<T>(props, state, ref);\n let isOpen = state.expandedKeys.has(item.key);\n let isDisabled = state.disabledKeys.has(item.key);\n let {isHovered, hoverProps} = useHover({isDisabled});\n let {direction} = useLocale();\n\n return (\n <div\n className={classNames(styles, 'spectrum-Accordion-item', {\n 'is-open': isOpen,\n 'is-disabled': isDisabled\n })}>\n <h3 className={classNames(styles, 'spectrum-Accordion-itemHeading')}>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <button\n {...mergeProps(buttonProps, hoverProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Accordion-itemHeader', {\n 'is-hovered': isHovered\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 {item.props.title}\n </button>\n </FocusRing>\n </h3>\n <div {...regionProps} className={classNames(styles, 'spectrum-Accordion-itemContent')}>\n {item.props.children}\n </div>\n </div>\n );\n}\n\nconst _Accordion = forwardRef(Accordion) as <T>(props: SpectrumAccordionProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReturnType<typeof Accordion>;\nexport {_Accordion as Accordion};\n"],"names":["$parcel$interopDefault","a","__esModule","default","Accordion","props","ref","useProviderProps","state","useTreeState","styleProps","useStyleProps","domRef","useDOMRef","accordionProps","useAccordion","filterDOMProps","classNames","className","collection","map","item","key","AccordionItem","useRef","buttonProps","regionProps","useAccordionItem","isOpen","expandedKeys","has","isDisabled","disabledKeys","isHovered","hoverProps","useHover","direction","useLocale","mergeProps","title","children","_Accordion","forwardRef"],"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 {Accordion} from './Accordion';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumAccordionProps} from '@react-types/accordion';\n"],"names":[],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,8 +1,11 @@
1
+ import { DOMRef } from "@react-types/shared";
1
2
  import React from "react";
2
3
  import { SpectrumAccordionProps } from "@react-types/accordion";
4
+ export function Accordion<T extends object>(props: SpectrumAccordionProps<T>, ref: DOMRef<HTMLDivElement>): React.JSX.Element;
3
5
  export const Accordion: <T>(props: SpectrumAccordionProps<T> & {
4
- ref?: React.Ref<import("@react-types/shared").DOMRefValue<HTMLDivElement>>;
5
- }) => JSX.Element;
6
+ ref?: DOMRef<HTMLDivElement>;
7
+ }) => ReturnType<typeof Accordion>;
6
8
  export { Item } from '@react-stately/collections';
9
+ export type { SpectrumAccordionProps } from '@react-types/accordion';
7
10
 
8
11
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"mappings":"A;A;AAkGA,OAAA,MAAM;A;iBAA4I,CAAC;ACnFnJ,OAAO,EAAC,IAAI,EAAC,MAAM,4BAA4B,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"],"sourcesContent":[null,null],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AA4BA,0BAAmB,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,uBAAuB,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,cAAc,CAAC,qBAmBjG;AAmDD,OAAA,MAAM;UAAoF,OAAO,cAAc,CAAC;MAAM,WAAW,gBAAgB,CAAC,CAAC;ACrFnJ,OAAO,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAChD,YAAY,EAAC,sBAAsB,EAAC,MAAM,wBAAwB,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 {Accordion} from './Accordion';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumAccordionProps} from '@react-types/accordion';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1,144 @@
1
+ ._7gO6Sq_spectrum-Accordion {
2
+ margin: 0;
3
+ padding: 0;
4
+ list-style: none;
5
+ display: block;
6
+ }
7
+
8
+ ._7gO6Sq_spectrum-Accordion-itemIndicator {
9
+ transition: transform ease var(--spectrum-global-animation-duration-100, .13s);
10
+ padding-inline-start: var(--spectrum-accordion-icon-spacing, 16px);
11
+ padding-inline-end: var(--spectrum-accordion-icon-gap, var(--spectrum-global-dimension-size-100));
12
+ display: block;
13
+ }
14
+
15
+ ._7gO6Sq_spectrum-Accordion-item {
16
+ z-index: inherit;
17
+ border-bottom: var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)) solid transparent;
18
+ margin: 0;
19
+ display: list-item;
20
+ position: relative;
21
+ }
22
+
23
+ ._7gO6Sq_spectrum-Accordion-item:first-of-type {
24
+ border-top: var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)) solid transparent;
25
+ }
26
+
27
+ ._7gO6Sq_spectrum-Accordion-itemHeading {
28
+ margin: 0;
29
+ }
30
+
31
+ ._7gO6Sq_spectrum-Accordion-itemHeader {
32
+ box-sizing: border-box;
33
+ padding-block: var(--spectrum-global-dimension-size-150);
34
+ min-height: calc(var(--spectrum-accordion-item-height, 40px) - var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)));
35
+ font-size: var(--spectrum-global-dimension-font-size-300);
36
+ text-overflow: ellipsis;
37
+ cursor: default;
38
+ line-height: 1.3;
39
+ font-weight: var(--spectrum-global-font-weight-bold, 700);
40
+ -webkit-appearance: none;
41
+ appearance: none;
42
+ background-color: inherit;
43
+ text-align: start;
44
+ border: 0;
45
+ justify-content: flex-start;
46
+ align-items: center;
47
+ width: 100%;
48
+ margin: 0;
49
+ padding-inline-start: 2px;
50
+ padding-inline-end: var(--spectrum-accordion-item-padding, 16px);
51
+ font-family: inherit;
52
+ display: flex;
53
+ position: relative;
54
+ }
55
+
56
+ ._7gO6Sq_spectrum-Accordion-itemHeader:focus {
57
+ outline: none;
58
+ }
59
+
60
+ ._7gO6Sq_spectrum-Accordion-itemHeader:focus:after {
61
+ content: "";
62
+ top: calc(var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)) * -1);
63
+ bottom: calc(var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)) * -1);
64
+ width: var(--spectrum-accordion-item-border-size-key-focus, 2px);
65
+ position: absolute;
66
+ }
67
+
68
+ ._7gO6Sq_spectrum-Accordion-itemHeader:focus:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):after {
69
+ left: 0;
70
+ }
71
+
72
+ ._7gO6Sq_spectrum-Accordion-itemHeader:focus:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):after {
73
+ left: 0;
74
+ }
75
+
76
+ ._7gO6Sq_spectrum-Accordion-itemHeader:focus:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)):after {
77
+ right: 0;
78
+ }
79
+
80
+ ._7gO6Sq_spectrum-Accordion-itemHeader:focus:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)):after {
81
+ right: 0;
82
+ }
83
+
84
+ ._7gO6Sq_spectrum-Accordion-itemContent {
85
+ padding: 0 var(--spectrum-accordion-item-content-padding, var(--spectrum-global-dimension-size-200)) var(--spectrum-accordion-item-content-padding, var(--spectrum-global-dimension-size-200)) var(--spectrum-accordion-item-content-padding, var(--spectrum-global-dimension-size-200));
86
+ display: none;
87
+ }
88
+
89
+ [dir="ltr"] :is(._7gO6Sq_spectrum-Accordion-item._7gO6Sq_is-open > ._7gO6Sq_spectrum-Accordion-itemHeading > ._7gO6Sq_spectrum-Accordion-itemHeader > ._7gO6Sq_spectrum-Accordion-itemIndicator) {
90
+ transform: rotate(90deg);
91
+ }
92
+
93
+ [dir="rtl"] :is(._7gO6Sq_spectrum-Accordion-item._7gO6Sq_is-open > ._7gO6Sq_spectrum-Accordion-itemHeading > ._7gO6Sq_spectrum-Accordion-itemHeader > ._7gO6Sq_spectrum-Accordion-itemIndicator) {
94
+ transform: rotate(-90deg);
95
+ }
96
+
97
+ ._7gO6Sq_spectrum-Accordion-item._7gO6Sq_is-open > ._7gO6Sq_spectrum-Accordion-itemHeader:after {
98
+ height: calc(var(--spectrum-accordion-item-height, 40px) - var(--spectrum-accordion-item-border-size, var(--spectrum-alias-border-size-thin)));
99
+ }
100
+
101
+ ._7gO6Sq_spectrum-Accordion-item._7gO6Sq_is-open > ._7gO6Sq_spectrum-Accordion-itemContent {
102
+ display: block;
103
+ }
104
+
105
+ ._7gO6Sq_spectrum-Accordion-item._7gO6Sq_is-disabled ._7gO6Sq_spectrum-Accordion-itemHeader {
106
+ cursor: default;
107
+ }
108
+
109
+ ._7gO6Sq_spectrum-Accordion-item {
110
+ border-color: var(--spectrum-accordion-border-color, var(--spectrum-global-color-gray-300));
111
+ }
112
+
113
+ ._7gO6Sq_spectrum-Accordion-item:first-of-type {
114
+ border-top-color: var(--spectrum-accordion-border-color, var(--spectrum-global-color-gray-300));
115
+ }
116
+
117
+ ._7gO6Sq_spectrum-Accordion-itemHeader {
118
+ color: var(--spectrum-alias-text-color, var(--spectrum-global-color-gray-800));
119
+ }
120
+
121
+ ._7gO6Sq_spectrum-Accordion-itemHeader._7gO6Sq_is-hovered {
122
+ color: var(--spectrum-alias-text-color-hover, var(--spectrum-global-color-gray-900));
123
+ background-color: var(--spectrum-accordion-background-color-hover, var(--spectrum-global-color-gray-200));
124
+ }
125
+
126
+ ._7gO6Sq_spectrum-Accordion-itemHeader._7gO6Sq_focus-ring:after {
127
+ background-color: var(--spectrum-accordion-border-left-color-key-focus, var(--spectrum-alias-border-color-focus));
128
+ }
129
+
130
+ ._7gO6Sq_spectrum-Accordion-item._7gO6Sq_is-open ._7gO6Sq_spectrum-Accordion-itemHeader._7gO6Sq_is-hovered {
131
+ background-color: #0000;
132
+ }
133
+
134
+ ._7gO6Sq_spectrum-Accordion-item._7gO6Sq_is-disabled ._7gO6Sq_spectrum-Accordion-itemHeader, ._7gO6Sq_spectrum-Accordion-item._7gO6Sq_is-disabled ._7gO6Sq_spectrum-Accordion-itemHeader._7gO6Sq_is-hovered, ._7gO6Sq_spectrum-Accordion-item._7gO6Sq_is-disabled ._7gO6Sq_spectrum-Accordion-itemHeader._7gO6Sq_focus-ring {
135
+ color: var(--spectrum-alias-text-color-disabled, var(--spectrum-global-color-gray-500));
136
+ background-color: #0000;
137
+ }
138
+
139
+ @media (forced-colors: active) {
140
+ ._7gO6Sq_spectrum-Accordion-itemHeader._7gO6Sq_focus-ring {
141
+ outline: 3px solid canvastext;
142
+ }
143
+ }
144
+ /*# sourceMappingURL=vars.1361683a.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"AAwBA;;;;;;;AAOA;;;;;;;AASA;;;;;;;;AASE;;;;AAKF;;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;AAiCE;;;;AAGE;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAaJ;;;;;AAUU;;;;AAGA;;;;AAON;;;;AAKA;;;;AAMA;;;;AAkBJ;;;;AAGE;;;;AAKF;;;;AAGE;;;;;AAOE;;;;AASE;;;;AASF;;;;;AASJ;EAEI","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":"vars.1361683a.css.map"}
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@react-spectrum/accordion",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.31",
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
+ "exports": {
9
+ "types": "./dist/types.d.ts",
10
+ "import": "./dist/import.mjs",
11
+ "require": "./dist/main.js"
12
+ },
8
13
  "types": "dist/types.d.ts",
9
14
  "source": "src/index.ts",
10
15
  "files": [
@@ -31,28 +36,29 @@
31
36
  "url": "https://github.com/adobe/react-spectrum"
32
37
  },
33
38
  "dependencies": {
34
- "@babel/runtime": "^7.6.2",
35
- "@react-aria/accordion": "3.0.0-alpha.2",
36
- "@react-aria/focus": "^3.4.1",
37
- "@react-aria/i18n": "^3.3.3",
38
- "@react-aria/interactions": "^3.7.0",
39
- "@react-aria/utils": "^3.10.0",
40
- "@react-spectrum/utils": "^3.6.3",
41
- "@react-stately/collections": "^3.3.3",
42
- "@react-stately/tree": "^3.2.0",
43
- "@react-types/accordion": "3.0.0-alpha.1",
44
- "@react-types/shared": "^3.10.0",
45
- "@spectrum-icons/ui": "^3.2.1"
39
+ "@react-aria/accordion": "3.0.0-alpha.29",
40
+ "@react-aria/focus": "^3.17.1",
41
+ "@react-aria/i18n": "^3.11.1",
42
+ "@react-aria/interactions": "^3.21.3",
43
+ "@react-aria/utils": "^3.24.1",
44
+ "@react-spectrum/utils": "^3.11.7",
45
+ "@react-stately/collections": "^3.10.7",
46
+ "@react-stately/tree": "^3.8.1",
47
+ "@react-types/accordion": "3.0.0-alpha.21",
48
+ "@react-types/shared": "^3.23.1",
49
+ "@spectrum-icons/ui": "^3.6.7",
50
+ "@swc/helpers": "^0.5.0"
46
51
  },
47
52
  "devDependencies": {
48
53
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
49
54
  },
50
55
  "peerDependencies": {
51
56
  "@react-spectrum/provider": "^3.0.0",
52
- "react": "^16.8.0 || ^17.0.0-rc.1"
57
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0",
58
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
53
59
  },
54
60
  "publishConfig": {
55
61
  "access": "public"
56
62
  },
57
- "gitHead": "896eabe5521a0349a675c4773ed7629addd4b8c4"
63
+ "gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
58
64
  }
package/src/Accordion.tsx CHANGED
@@ -54,7 +54,7 @@ interface AccordionItemProps<T> {
54
54
 
55
55
  function AccordionItem<T>(props: AccordionItemProps<T>) {
56
56
  props = useProviderProps(props);
57
- let ref = useRef<HTMLButtonElement>();
57
+ let ref = useRef<HTMLButtonElement>(null);
58
58
  let {state, item} = props;
59
59
  let {buttonProps, regionProps} = useAccordionItem<T>(props, state, ref);
60
60
  let isOpen = state.expandedKeys.has(item.key);
package/src/index.ts CHANGED
@@ -9,8 +9,7 @@
9
9
  * OF ANY KIND, either express or implied. See the License for the specific language
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
-
13
12
  /// <reference types="css-module-types" />
14
-
15
- export * from './Accordion';
13
+ export {Accordion} from './Accordion';
16
14
  export {Item} from '@react-stately/collections';
15
+ export type {SpectrumAccordionProps} from '@react-types/accordion';
package/dist/main.css DELETED
@@ -1,2 +0,0 @@
1
- ._spectrum-Accordion_961bc{display:block;list-style:none;padding:0;margin:0}[dir=ltr] ._spectrum-Accordion-itemIndicator_961bc{left:16px}[dir=rtl] ._spectrum-Accordion-itemIndicator_961bc{right:16px}._spectrum-Accordion-itemIndicator_961bc{display:block;position:absolute;top:calc((40px - var(--spectrum-alias-border-size-thin, var(--spectrum-global-dimension-static-size-10))) / 2 - 5px);transition:transform .13s ease}._spectrum-Accordion-item_961bc{z-index:inherit;position:relative;display:list-item;margin:0;border-bottom:var(--spectrum-alias-border-size-thin,var(--spectrum-global-dimension-static-size-10)) solid transparent}._spectrum-Accordion-item_961bc:first-of-type{border-top:var(--spectrum-alias-border-size-thin,var(--spectrum-global-dimension-static-size-10)) solid transparent}._spectrum-Accordion-itemHeading_961bc{margin:0}[dir=ltr] ._spectrum-Accordion-itemHeader_961bc{padding-left:34px}[dir=rtl] ._spectrum-Accordion-itemHeader_961bc{padding-right:34px}[dir=ltr] ._spectrum-Accordion-itemHeader_961bc{padding-right:16px}[dir=rtl] ._spectrum-Accordion-itemHeader_961bc{padding-left:16px}[dir=ltr] ._spectrum-Accordion-itemHeader_961bc{text-align:left}[dir=rtl] ._spectrum-Accordion-itemHeader_961bc{text-align:right}._spectrum-Accordion-itemHeader_961bc{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;box-sizing:border-box;padding-top:var(--spectrum-global-dimension-size-150);padding-bottom:var(--spectrum-global-dimension-size-150);margin:0;min-height:calc(40px - var(--spectrum-alias-border-size-thin, var(--spectrum-global-dimension-static-size-10)));font-size:var(--spectrum-global-dimension-font-size-50);line-height:1.3;text-transform:uppercase;letter-spacing:calc(var(--spectrum-global-font-letter-spacing-medium, .06em) / 100);text-overflow:ellipsis;cursor:default;font-weight:500;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:inherit;border:0;font-family:inherit;width:100%}._spectrum-Accordion-itemHeader_961bc:focus{outline:none}[dir=ltr] ._spectrum-Accordion-itemHeader_961bc:focus:after{left:0}[dir=rtl] ._spectrum-Accordion-itemHeader_961bc:focus:after{right:0}._spectrum-Accordion-itemHeader_961bc:focus:after{content:"";position:absolute;top:calc(var(--spectrum-alias-border-size-thin, var(--spectrum-global-dimension-static-size-10)) * -1);bottom:calc(var(--spectrum-alias-border-size-thin, var(--spectrum-global-dimension-static-size-10)) * -1);width:2px}._spectrum-Accordion-itemContent_961bc{padding:0 var(--spectrum-global-dimension-size-200) var(--spectrum-global-dimension-size-200) var(--spectrum-global-dimension-size-200);display:none}[dir=ltr] ._spectrum-Accordion-item_961bc._is-open_961bc>._spectrum-Accordion-itemHeading_961bc>._spectrum-Accordion-itemHeader_961bc>._spectrum-Accordion-itemIndicator_961bc{transform:rotate(90deg)}[dir=rtl] ._spectrum-Accordion-item_961bc._is-open_961bc>._spectrum-Accordion-itemHeading_961bc>._spectrum-Accordion-itemHeader_961bc>._spectrum-Accordion-itemIndicator_961bc{transform:rotate(-90deg)}._spectrum-Accordion-item_961bc._is-open_961bc>._spectrum-Accordion-itemHeader_961bc:after{height:calc(40px - var(--spectrum-alias-border-size-thin, var(--spectrum-global-dimension-static-size-10)))}._spectrum-Accordion-item_961bc._is-open_961bc>._spectrum-Accordion-itemContent_961bc{display:block}._spectrum-Accordion-item_961bc._is-disabled_961bc ._spectrum-Accordion-itemHeader_961bc{cursor:default}._spectrum-Accordion-item_961bc{border-color:var(--spectrum-global-color-gray-300)}._spectrum-Accordion-itemIndicator_961bc{color:var(--spectrum-global-color-gray-600)}._spectrum-Accordion-itemHeader_961bc{color:var(--spectrum-global-color-gray-700)}._spectrum-Accordion-itemHeader_961bc._is-hovered_961bc{color:var(--spectrum-global-color-gray-900);background-color:var(--spectrum-global-color-gray-200)}._spectrum-Accordion-itemHeader_961bc._is-hovered_961bc+._spectrum-Accordion-itemIndicator_961bc{color:var(--spectrum-global-color-gray-800)}._spectrum-Accordion-itemHeader_961bc._focus-ring_961bc:after{background-color:var(--spectrum-alias-border-color-focus,var(--spectrum-global-color-blue-400))}._spectrum-Accordion-item_961bc._is-open_961bc ._spectrum-Accordion-itemHeader_961bc._is-hovered_961bc{background-color:initial}._spectrum-Accordion-item_961bc._is-disabled_961bc ._spectrum-Accordion-itemHeader_961bc,._spectrum-Accordion-item_961bc._is-disabled_961bc ._spectrum-Accordion-itemHeader_961bc._focus-ring_961bc,._spectrum-Accordion-item_961bc._is-disabled_961bc ._spectrum-Accordion-itemHeader_961bc._is-hovered_961bc{color:var(--spectrum-global-color-gray-500);background-color:initial}._spectrum-Accordion-item_961bc._is-disabled_961bc ._spectrum-Accordion-itemHeader_961bc+._spectrum-Accordion-itemIndicator_961bc{color:var(--spectrum-global-color-gray-400)}
2
- /*# sourceMappingURL=main.css.map */
package/dist/main.css.map DELETED
@@ -1 +0,0 @@
1
- {"mappings":"AAwBA,2BACE,aAAc,CACd,eAAgB,CAChB,SAAU,CACV,QACF,CAEA,mDAIE,SAIF,CARA,mDAIE,UAIF,CARA,yCACE,aAAc,CAEd,iBAAkB,CAElB,oHAAqH,CAErH,8BACF,CAEA,gCACE,eAAgB,CAChB,iBAAkB,CAElB,iBAAkB,CAClB,QAAS,CAET,sHAKF,CAHE,8CACE,mHACF,CAGF,uCACE,QACF,CAEA,gDAUE,iBAuCF,CAjDA,gDAUE,kBAuCF,CAjDA,gDAWE,kBAsCF,CAjDA,gDAWE,iBAsCF,CAjDA,gDAgCE,eAiBF,CAjDA,gDAgCE,gBAiBF,CAjDA,sCACE,iBAAkB,CAElB,mBAAa,CAAb,YAAa,CACb,qBAAmB,CAAnB,kBAAmB,CACnB,mBAA2B,CAA3B,0BAA2B,CAE3B,qBAAsB,CAEtB,qDAA6D,CAA7D,wDAA6D,CAG7D,QAAS,CAET,+GAAwD,CAExD,uDAAyD,CACzD,eAAuD,CACvD,wBAAyB,CACzB,mFAAoE,CAEpE,sBAAuB,CACvB,cAAe,CACf,eAAgB,CAGhB,uBAAwB,CACxB,oBAAqB,CACrB,eAAgB,CAChB,wBAAyB,CACzB,QAAS,CACT,mBAAoB,CAEpB,UAgBF,CAdE,4CACE,YAYF,CAVE,4DAIE,MAKF,CATA,4DAIE,OAKF,CATA,kDACE,UAAW,CAEX,iBAAkB,CAElB,sGAA0D,CAC1D,yGAA6D,CAE7D,SACF,CAIJ,uCACE,uIAAuJ,CACvJ,YACF,CAOU,+KACE,uBACF,CACA,+KACE,wBACF,CAKN,2FAEE,2GACF,CAEA,sFACE,aACF,CAIA,yFACE,cACF,CCnIJ,gCACE,kDACF,CAEA,yCACE,2CACF,CAEA,sCACE,2CAiBF,CAfE,wDACE,2CAAiD,CAEjD,sDAKF,CAHE,iGACE,2CACF,CAIA,8DACE,+FACF,CAOE,uGACE,wBACF,CAOF,+SAGE,2CAAoD,CACpD,wBACF,CAEA,kIACE,2CACF","sources":["./node_modules/@adobe/spectrum-css-temp/components/accordion/index.css","./node_modules/@adobe/spectrum-css-temp/components/accordion/skin.css"],"sourcesContent":["/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n:root {\n --spectrum-accordion-icon-width: 6px;\n --spectrum-accordion-icon-height: 10px;\n\n /* Subtract the size of the border since it's on the item itself */\n --spectrum-accordion-item-height-actual: calc(var(--spectrum-accordion-item-height) - var(--spectrum-accordion-item-border-size));\n --spectrum-accordion-item-title-tracking-actual: calc(var(--spectrum-accordion-item-title-tracking) / 100);\n\n --spectrum-accordion-item-title-padding-y: var(--spectrum-global-dimension-size-150);\n --spectrum-accordion-item-line-height: 1.3;\n}\n\n.spectrum-Accordion {\n display: block;\n list-style: none;\n padding: 0;\n margin: 0;\n}\n\n.spectrum-Accordion-itemIndicator {\n display: block;\n\n position: absolute;\n inset-inline-start: var(--spectrum-accordion-icon-spacing);\n inset-block-start: calc(var(--spectrum-accordion-item-height-actual) / 2 - var(--spectrum-accordion-icon-height) / 2);\n\n transition: transform ease var(--spectrum-global-animation-duration-100);\n}\n\n.spectrum-Accordion-item {\n z-index: inherit;\n position: relative;\n\n display: list-item;\n margin: 0;\n\n border-bottom: var(--spectrum-accordion-item-border-size) solid transparent;\n\n &:first-of-type {\n border-top: var(--spectrum-accordion-item-border-size) solid transparent;\n }\n}\n\n.spectrum-Accordion-itemHeading {\n margin: 0;\n}\n\n.spectrum-Accordion-itemHeader {\n position: relative;\n\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n box-sizing: border-box;\n /* left padding takes into account the icon's size as well as the focus state's left border */\n padding-block: var(--spectrum-accordion-item-title-padding-y);\n padding-inline-start: calc(calc(var(--spectrum-accordion-item-padding) * 2) + 2px);\n padding-inline-end: var(--spectrum-accordion-item-padding);\n margin: 0;\n\n min-height: var(--spectrum-accordion-item-height-actual);\n\n font-size: var(--spectrum-accordion-item-title-text-size);\n line-height: var(--spectrum-accordion-item-line-height);\n text-transform: uppercase;\n letter-spacing: var(--spectrum-accordion-item-title-tracking-actual);\n\n text-overflow: ellipsis;\n cursor: default;\n font-weight: 500;\n\n /* reset styling if button element is used */\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background-color: inherit;\n border: 0;\n font-family: inherit;\n text-align: start;\n width: 100%;\n\n &:focus {\n outline: none;\n\n &::after {\n content: '';\n\n position: absolute;\n inset-inline-start: 0;\n top: calc(var(--spectrum-accordion-item-border-size) * -1);\n bottom: calc(var(--spectrum-accordion-item-border-size) * -1);\n\n width: var(--spectrum-accordion-item-border-size-key-focus);\n }\n }\n}\n\n.spectrum-Accordion-itemContent {\n padding: 0 var(--spectrum-accordion-item-content-padding) var(--spectrum-accordion-item-content-padding) var(--spectrum-accordion-item-content-padding);\n display: none;\n}\n\n.spectrum-Accordion-item {\n &.is-open {\n > .spectrum-Accordion-itemHeading {\n > .spectrum-Accordion-itemHeader {\n > .spectrum-Accordion-itemIndicator {\n [dir='ltr'] & {\n transform: rotate(90deg);\n }\n [dir='rtl'] & {\n transform: rotate(-90deg);\n }\n }\n }\n }\n\n > .spectrum-Accordion-itemHeader::after {\n /* No bottom border when open, so be less tall */\n height: var(--spectrum-accordion-item-height-actual);\n }\n\n > .spectrum-Accordion-itemContent {\n display: block;\n }\n }\n\n &.is-disabled {\n .spectrum-Accordion-itemHeader {\n cursor: default;\n }\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n.spectrum-Accordion-item {\n border-color: var(--spectrum-accordion-border-color);\n}\n\n.spectrum-Accordion-itemIndicator {\n color: var(--spectrum-accordion-icon-color);\n}\n\n.spectrum-Accordion-itemHeader {\n color: var(--spectrum-accordion-text-color);\n\n &:hover {\n color: var(--spectrum-accordion-text-color-hover);\n\n background-color: var(--spectrum-accordion-background-color-hover);\n\n + .spectrum-Accordion-itemIndicator {\n color: var(--spectrum-accordion-icon-color-hover);\n }\n }\n\n &:focus-ring {\n &:after {\n background-color: var(--spectrum-accordion-border-left-color-key-focus);\n }\n }\n}\n\n.spectrum-Accordion-item {\n &.is-open {\n .spectrum-Accordion-itemHeader {\n &:hover {\n background-color: transparent;\n }\n }\n }\n}\n\n.spectrum-Accordion-item.is-disabled {\n .spectrum-Accordion-itemHeader {\n &,\n &:hover,\n &:focus-ring {\n color: var(--spectrum-accordion-text-color-disabled);\n background-color: transparent;\n }\n\n + .spectrum-Accordion-itemIndicator {\n color: var(--spectrum-accordion-icon-color-disabled);\n }\n }\n}\n"],"names":[],"version":3,"file":"main.css.map"}