@react-spectrum/accordion 3.0.0-alpha.2 → 3.0.0-alpha.20

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,152 @@
1
+ import "./main.css";
2
+ import {Item as $8ae4d4d1aa0c5e03$re_export$Item} from "@react-stately/collections";
3
+ import $3Uu4R$spectrumiconsuiChevronLeftMedium from "@spectrum-icons/ui/ChevronLeftMedium";
4
+ import $3Uu4R$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
5
+ import {useStyleProps as $3Uu4R$useStyleProps, useDOMRef as $3Uu4R$useDOMRef, classNames as $3Uu4R$classNames} from "@react-spectrum/utils";
6
+ import {filterDOMProps as $3Uu4R$filterDOMProps, mergeProps as $3Uu4R$mergeProps} from "@react-aria/utils";
7
+ import {FocusRing as $3Uu4R$FocusRing} from "@react-aria/focus";
8
+ import $3Uu4R$react, {useRef as $3Uu4R$useRef, forwardRef as $3Uu4R$forwardRef} from "react";
9
+ import {useTreeState as $3Uu4R$useTreeState} from "@react-stately/tree";
10
+ import {useAccordion as $3Uu4R$useAccordion, useAccordionItem as $3Uu4R$useAccordionItem} from "@react-aria/accordion";
11
+ import {useHover as $3Uu4R$useHover} from "@react-aria/interactions";
12
+ import {useLocale as $3Uu4R$useLocale} from "@react-aria/i18n";
13
+ import {useProviderProps as $3Uu4R$useProviderProps} from "@react-spectrum/provider";
14
+
15
+ function $parcel$interopDefault(a) {
16
+ return a && a.__esModule ? a.default : a;
17
+ }
18
+ function $parcel$export(e, n, v, s) {
19
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
20
+ }
21
+ /*
22
+ * Copyright 2020 Adobe. All rights reserved.
23
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License. You may obtain a copy
25
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
+ *
27
+ * Unless required by applicable law or agreed to in writing, software distributed under
28
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
+ * OF ANY KIND, either express or implied. See the License for the specific language
30
+ * governing permissions and limitations under the License.
31
+ */ /// <reference types="css-module-types" />
32
+ /*
33
+ * Copyright 2020 Adobe. All rights reserved.
34
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
35
+ * you may not use this file except in compliance with the License. You may obtain a copy
36
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
37
+ *
38
+ * Unless required by applicable law or agreed to in writing, software distributed under
39
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
40
+ * OF ANY KIND, either express or implied. See the License for the specific language
41
+ * governing permissions and limitations under the License.
42
+ */
43
+
44
+
45
+
46
+
47
+
48
+ var $cd9bb50514faf076$exports = {};
49
+
50
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion", () => $cd9bb50514faf076$export$bed6cbae852b32f0, (v) => $cd9bb50514faf076$export$bed6cbae852b32f0 = v);
51
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemIndicator", () => $cd9bb50514faf076$export$35196e2132b47abd, (v) => $cd9bb50514faf076$export$35196e2132b47abd = v);
52
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-item", () => $cd9bb50514faf076$export$a1947cb8adf67515, (v) => $cd9bb50514faf076$export$a1947cb8adf67515 = v);
53
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeading", () => $cd9bb50514faf076$export$36876b8193439034, (v) => $cd9bb50514faf076$export$36876b8193439034 = v);
54
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeader", () => $cd9bb50514faf076$export$4da8efb546c03356, (v) => $cd9bb50514faf076$export$4da8efb546c03356 = v);
55
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemContent", () => $cd9bb50514faf076$export$951cb9dc63743241, (v) => $cd9bb50514faf076$export$951cb9dc63743241 = v);
56
+ $parcel$export($cd9bb50514faf076$exports, "is-open", () => $cd9bb50514faf076$export$a9781837241c946d, (v) => $cd9bb50514faf076$export$a9781837241c946d = v);
57
+ $parcel$export($cd9bb50514faf076$exports, "is-disabled", () => $cd9bb50514faf076$export$d35bc1e505d1ebbf, (v) => $cd9bb50514faf076$export$d35bc1e505d1ebbf = v);
58
+ $parcel$export($cd9bb50514faf076$exports, "is-hovered", () => $cd9bb50514faf076$export$b8813cd5d7824ce7, (v) => $cd9bb50514faf076$export$b8813cd5d7824ce7 = v);
59
+ $parcel$export($cd9bb50514faf076$exports, "focus-ring", () => $cd9bb50514faf076$export$f39a09f249340e2a, (v) => $cd9bb50514faf076$export$f39a09f249340e2a = v);
60
+ var $cd9bb50514faf076$export$bed6cbae852b32f0;
61
+ var $cd9bb50514faf076$export$35196e2132b47abd;
62
+ var $cd9bb50514faf076$export$a1947cb8adf67515;
63
+ var $cd9bb50514faf076$export$36876b8193439034;
64
+ var $cd9bb50514faf076$export$4da8efb546c03356;
65
+ var $cd9bb50514faf076$export$951cb9dc63743241;
66
+ var $cd9bb50514faf076$export$a9781837241c946d;
67
+ var $cd9bb50514faf076$export$d35bc1e505d1ebbf;
68
+ var $cd9bb50514faf076$export$b8813cd5d7824ce7;
69
+ var $cd9bb50514faf076$export$f39a09f249340e2a;
70
+ $cd9bb50514faf076$export$bed6cbae852b32f0 = "spectrum-Accordion_b4e47f";
71
+ $cd9bb50514faf076$export$35196e2132b47abd = "spectrum-Accordion-itemIndicator_b4e47f";
72
+ $cd9bb50514faf076$export$a1947cb8adf67515 = "spectrum-Accordion-item_b4e47f";
73
+ $cd9bb50514faf076$export$36876b8193439034 = "spectrum-Accordion-itemHeading_b4e47f";
74
+ $cd9bb50514faf076$export$4da8efb546c03356 = "spectrum-Accordion-itemHeader_b4e47f";
75
+ $cd9bb50514faf076$export$951cb9dc63743241 = "spectrum-Accordion-itemContent_b4e47f";
76
+ $cd9bb50514faf076$export$a9781837241c946d = "is-open_b4e47f";
77
+ $cd9bb50514faf076$export$d35bc1e505d1ebbf = "is-disabled_b4e47f";
78
+ $cd9bb50514faf076$export$b8813cd5d7824ce7 = "is-hovered_b4e47f";
79
+ $cd9bb50514faf076$export$f39a09f249340e2a = "focus-ring_b4e47f";
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+ function $2a5a5b7faca81754$var$Accordion(props, ref) {
88
+ props = (0, $3Uu4R$useProviderProps)(props);
89
+ let state = (0, $3Uu4R$useTreeState)(props);
90
+ let { styleProps: styleProps } = (0, $3Uu4R$useStyleProps)(props);
91
+ let domRef = (0, $3Uu4R$useDOMRef)(ref);
92
+ let { accordionProps: accordionProps } = (0, $3Uu4R$useAccordion)(props, state, domRef);
93
+ return /*#__PURE__*/ (0, $3Uu4R$react).createElement("div", {
94
+ ...(0, $3Uu4R$filterDOMProps)(props),
95
+ ...accordionProps,
96
+ ...styleProps,
97
+ ref: domRef,
98
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion", styleProps.className)
99
+ }, [
100
+ ...state.collection
101
+ ].map((item)=>/*#__PURE__*/ (0, $3Uu4R$react).createElement($2a5a5b7faca81754$var$AccordionItem, {
102
+ key: item.key,
103
+ item: item,
104
+ state: state
105
+ })));
106
+ }
107
+ function $2a5a5b7faca81754$var$AccordionItem(props) {
108
+ props = (0, $3Uu4R$useProviderProps)(props);
109
+ let ref = (0, $3Uu4R$useRef)(null);
110
+ let { state: state , item: item } = props;
111
+ let { buttonProps: buttonProps , regionProps: regionProps } = (0, $3Uu4R$useAccordionItem)(props, state, ref);
112
+ let isOpen = state.expandedKeys.has(item.key);
113
+ let isDisabled = state.disabledKeys.has(item.key);
114
+ let { isHovered: isHovered , hoverProps: hoverProps } = (0, $3Uu4R$useHover)({
115
+ isDisabled: isDisabled
116
+ });
117
+ let { direction: direction } = (0, $3Uu4R$useLocale)();
118
+ return /*#__PURE__*/ (0, $3Uu4R$react).createElement("div", {
119
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-item", {
120
+ "is-open": isOpen,
121
+ "is-disabled": isDisabled
122
+ })
123
+ }, /*#__PURE__*/ (0, $3Uu4R$react).createElement("h3", {
124
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemHeading")
125
+ }, /*#__PURE__*/ (0, $3Uu4R$react).createElement((0, $3Uu4R$FocusRing), {
126
+ within: true,
127
+ focusRingClass: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "focus-ring")
128
+ }, /*#__PURE__*/ (0, $3Uu4R$react).createElement("button", {
129
+ ...(0, $3Uu4R$mergeProps)(buttonProps, hoverProps),
130
+ ref: ref,
131
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemHeader", {
132
+ "is-hovered": isHovered
133
+ })
134
+ }, direction === "ltr" ? /*#__PURE__*/ (0, $3Uu4R$react).createElement((0, $3Uu4R$spectrumiconsuiChevronRightMedium), {
135
+ "aria-hidden": "true",
136
+ UNSAFE_className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemIndicator")
137
+ }) : /*#__PURE__*/ (0, $3Uu4R$react).createElement((0, $3Uu4R$spectrumiconsuiChevronLeftMedium), {
138
+ "aria-hidden": "true",
139
+ UNSAFE_className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemIndicator")
140
+ }), item.props.title))), /*#__PURE__*/ (0, $3Uu4R$react).createElement("div", {
141
+ ...regionProps,
142
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemContent")
143
+ }, item.props.children));
144
+ }
145
+ const $2a5a5b7faca81754$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $3Uu4R$forwardRef)($2a5a5b7faca81754$var$Accordion);
146
+
147
+
148
+
149
+
150
+
151
+ export {$2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion, $8ae4d4d1aa0c5e03$re_export$Item as Item};
152
+ //# sourceMappingURL=module.js.map
package/dist/main.css CHANGED
@@ -1,2 +1 @@
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 */
1
+ .spectrum-Accordion_b4e47f{margin:0;padding:0;list-style:none;display:block}[dir=ltr] .spectrum-Accordion-itemIndicator_b4e47f{padding-left:var(--spectrum-accordion-icon-spacing,16px)}[dir=rtl] .spectrum-Accordion-itemIndicator_b4e47f{padding-right:var(--spectrum-accordion-icon-spacing,16px)}[dir=ltr] .spectrum-Accordion-itemIndicator_b4e47f{padding-right:var(--spectrum-accordion-icon-gap,var(--spectrum-global-dimension-size-100))}[dir=rtl] .spectrum-Accordion-itemIndicator_b4e47f{padding-left:var(--spectrum-accordion-icon-gap,var(--spectrum-global-dimension-size-100))}.spectrum-Accordion-itemIndicator_b4e47f{transition:transform ease var(--spectrum-global-animation-duration-100,.13s);display:block}.spectrum-Accordion-item_b4e47f{z-index:inherit;border-bottom:var(--spectrum-accordion-item-border-size,var(--spectrum-alias-border-size-thin))solid transparent;margin:0;display:list-item;position:relative}.spectrum-Accordion-item_b4e47f:first-of-type{border-top:var(--spectrum-accordion-item-border-size,var(--spectrum-alias-border-size-thin))solid transparent}.spectrum-Accordion-itemHeading_b4e47f{margin:0}[dir=ltr] .spectrum-Accordion-itemHeader_b4e47f{padding-left:2px}[dir=rtl] .spectrum-Accordion-itemHeader_b4e47f{padding-right:2px}[dir=ltr] .spectrum-Accordion-itemHeader_b4e47f{padding-right:var(--spectrum-accordion-item-padding,16px)}[dir=rtl] .spectrum-Accordion-itemHeader_b4e47f{padding-left:var(--spectrum-accordion-item-padding,16px)}[dir=ltr] .spectrum-Accordion-itemHeader_b4e47f{text-align:left}[dir=rtl] .spectrum-Accordion-itemHeader_b4e47f{text-align:right}.spectrum-Accordion-itemHeader_b4e47f{box-sizing:border-box;padding-top:var(--spectrum-global-dimension-size-150);padding-bottom:var(--spectrum-global-dimension-size-150);min-height:calc(var(--spectrum-accordion-item-height,40px) - var(--spectrum-accordion-item-border-size,var(--spectrum-alias-border-size-thin)));font-size:var(--spectrum-global-dimension-font-size-300);text-overflow:ellipsis;cursor:default;line-height:1.3;font-weight:var(--spectrum-global-font-weight-bold,700);-webkit-appearance:none;appearance:none;background-color:inherit;width:100%;border:0;justify-content:flex-start;align-items:center;margin:0;font-family:inherit;display:flex;position:relative}.spectrum-Accordion-itemHeader_b4e47f:focus{outline:none}[dir=ltr] .spectrum-Accordion-itemHeader_b4e47f:focus:after{left:0}[dir=rtl] .spectrum-Accordion-itemHeader_b4e47f:focus:after{right:0}.spectrum-Accordion-itemHeader_b4e47f:focus:after{content:"";top:calc(var(--spectrum-accordion-item-border-size,var(--spectrum-alias-border-size-thin))*-1);bottom:calc(var(--spectrum-accordion-item-border-size,var(--spectrum-alias-border-size-thin))*-1);width:var(--spectrum-accordion-item-border-size-key-focus,2px);position:absolute}.spectrum-Accordion-itemContent_b4e47f{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));display:none}[dir=ltr] .spectrum-Accordion-item_b4e47f.is-open_b4e47f>.spectrum-Accordion-itemHeading_b4e47f>.spectrum-Accordion-itemHeader_b4e47f>.spectrum-Accordion-itemIndicator_b4e47f{transform:rotate(90deg)}[dir=rtl] .spectrum-Accordion-item_b4e47f.is-open_b4e47f>.spectrum-Accordion-itemHeading_b4e47f>.spectrum-Accordion-itemHeader_b4e47f>.spectrum-Accordion-itemIndicator_b4e47f{transform:rotate(-90deg)}.spectrum-Accordion-item_b4e47f.is-open_b4e47f>.spectrum-Accordion-itemHeader_b4e47f:after{height:calc(var(--spectrum-accordion-item-height,40px) - var(--spectrum-accordion-item-border-size,var(--spectrum-alias-border-size-thin)))}.spectrum-Accordion-item_b4e47f.is-open_b4e47f>.spectrum-Accordion-itemContent_b4e47f{display:block}.spectrum-Accordion-item_b4e47f.is-disabled_b4e47f .spectrum-Accordion-itemHeader_b4e47f{cursor:default}.spectrum-Accordion-item_b4e47f{border-color:var(--spectrum-accordion-border-color,var(--spectrum-global-color-gray-300))}.spectrum-Accordion-item_b4e47f:first-of-type{border-top-color:var(--spectrum-accordion-border-color,var(--spectrum-global-color-gray-300))}.spectrum-Accordion-itemHeader_b4e47f{color:var(--spectrum-alias-text-color,var(--spectrum-global-color-gray-800))}.spectrum-Accordion-itemHeader_b4e47f.is-hovered_b4e47f{color:var(--spectrum-alias-text-color-hover,var(--spectrum-global-color-gray-900));background-color:var(--spectrum-accordion-background-color-hover,var(--spectrum-global-color-gray-200))}.spectrum-Accordion-itemHeader_b4e47f.focus-ring_b4e47f:after{background-color:var(--spectrum-accordion-border-left-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Accordion-item_b4e47f.is-open_b4e47f .spectrum-Accordion-itemHeader_b4e47f.is-hovered_b4e47f{background-color:#0000}.spectrum-Accordion-item_b4e47f.is-disabled_b4e47f .spectrum-Accordion-itemHeader_b4e47f,.spectrum-Accordion-item_b4e47f.is-disabled_b4e47f .spectrum-Accordion-itemHeader_b4e47f.is-hovered_b4e47f,.spectrum-Accordion-item_b4e47f.is-disabled_b4e47f .spectrum-Accordion-itemHeader_b4e47f.focus-ring_b4e47f{color:var(--spectrum-alias-text-color-disabled,var(--spectrum-global-color-gray-500));background-color:#0000}@media (forced-colors:active){.spectrum-Accordion-itemHeader_b4e47f.focus-ring_b4e47f{outline:3px solid CanvasText}}
package/dist/main.js CHANGED
@@ -1,150 +1,154 @@
1
- var {
2
- useProviderProps
3
- } = require("@react-spectrum/provider");
4
-
5
- var {
6
- useLocale
7
- } = require("@react-aria/i18n");
8
-
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
- useRef
28
- } = _react2;
29
-
30
- var {
31
- FocusRing
32
- } = require("@react-aria/focus");
33
-
34
- var {
35
- filterDOMProps,
36
- mergeProps
37
- } = require("@react-aria/utils");
38
-
39
- var {
40
- classNames,
41
- useDOMRef,
42
- useStyleProps
43
- } = require("@react-spectrum/utils");
44
-
45
- var _spectrumIconsUiChevronRightMedium = $parcel$interopDefault(require("@spectrum-icons/ui/ChevronRightMedium"));
46
-
47
- var _spectrumIconsUiChevronLeftMedium = $parcel$interopDefault(require("@spectrum-icons/ui/ChevronLeftMedium"));
48
-
49
- var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
50
-
51
- var {
52
- Item
53
- } = require("@react-stately/collections");
54
-
55
- exports.Item = Item;
56
-
57
1
  require("./main.css");
58
-
2
+ var $6boyC$reactstatelycollections = require("@react-stately/collections");
3
+ var $6boyC$spectrumiconsuiChevronLeftMedium = require("@spectrum-icons/ui/ChevronLeftMedium");
4
+ var $6boyC$spectrumiconsuiChevronRightMedium = require("@spectrum-icons/ui/ChevronRightMedium");
5
+ var $6boyC$reactspectrumutils = require("@react-spectrum/utils");
6
+ var $6boyC$reactariautils = require("@react-aria/utils");
7
+ var $6boyC$reactariafocus = require("@react-aria/focus");
8
+ var $6boyC$react = require("react");
9
+ var $6boyC$reactstatelytree = require("@react-stately/tree");
10
+ var $6boyC$reactariaaccordion = require("@react-aria/accordion");
11
+ var $6boyC$reactariainteractions = require("@react-aria/interactions");
12
+ var $6boyC$reactariai18n = require("@react-aria/i18n");
13
+ var $6boyC$reactspectrumprovider = require("@react-spectrum/provider");
14
+
15
+ function $parcel$export(e, n, v, s) {
16
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
17
+ }
59
18
  function $parcel$interopDefault(a) {
60
19
  return a && a.__esModule ? a.default : a;
61
20
  }
62
21
 
63
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/accordion/vars.css
64
- var $f985675dcc9276961ef0f83a88faafff$exports = {};
65
- $f985675dcc9276961ef0f83a88faafff$exports = {
66
- "spectrum-Accordion": "_spectrum-Accordion_961bc",
67
- "spectrum-Accordion-itemIndicator": "_spectrum-Accordion-itemIndicator_961bc",
68
- "spectrum-Accordion-item": "_spectrum-Accordion-item_961bc",
69
- "spectrum-Accordion-itemHeading": "_spectrum-Accordion-itemHeading_961bc",
70
- "spectrum-Accordion-itemHeader": "_spectrum-Accordion-itemHeader_961bc",
71
- "spectrum-Accordion-itemContent": "_spectrum-Accordion-itemContent_961bc",
72
- "is-open": "_is-open_961bc",
73
- "is-disabled": "_is-disabled_961bc",
74
- "is-hovered": "_is-hovered_961bc",
75
- "focus-ring": "_focus-ring_961bc"
76
- };
77
- var $f985675dcc9276961ef0f83a88faafff$$interop$default = $parcel$interopDefault($f985675dcc9276961ef0f83a88faafff$exports);
78
-
79
- function $be7b8672a8bbdf8d3fdb2b9fe3226e$var$Accordion(props, ref) {
80
- props = useProviderProps(props);
81
- let state = useTreeState(props);
82
- let {
83
- styleProps
84
- } = useStyleProps(props);
85
- let domRef = useDOMRef(ref);
86
- let {
87
- accordionProps
88
- } = useAccordion(props, state, domRef);
89
- return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({}, filterDOMProps(props), accordionProps, styleProps, {
90
- ref: domRef,
91
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion', styleProps.className)
92
- }), [...state.collection].map(item => /*#__PURE__*/_react.createElement($be7b8672a8bbdf8d3fdb2b9fe3226e$var$AccordionItem, {
93
- key: item.key,
94
- item: item,
95
- state: state
96
- })));
22
+ $parcel$export(module.exports, "Accordion", () => $d8f45715b3ce327a$export$a766cd26d0d69044);
23
+ $parcel$export(module.exports, "Item", () => $6boyC$reactstatelycollections.Item);
24
+ /*
25
+ * Copyright 2020 Adobe. All rights reserved.
26
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
27
+ * you may not use this file except in compliance with the License. You may obtain a copy
28
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
29
+ *
30
+ * Unless required by applicable law or agreed to in writing, software distributed under
31
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
32
+ * OF ANY KIND, either express or implied. See the License for the specific language
33
+ * governing permissions and limitations under the License.
34
+ */ /// <reference types="css-module-types" />
35
+ /*
36
+ * Copyright 2020 Adobe. All rights reserved.
37
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
38
+ * you may not use this file except in compliance with the License. You may obtain a copy
39
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
40
+ *
41
+ * Unless required by applicable law or agreed to in writing, software distributed under
42
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
43
+ * OF ANY KIND, either express or implied. See the License for the specific language
44
+ * governing permissions and limitations under the License.
45
+ */
46
+
47
+
48
+
49
+
50
+
51
+ var $5ab573b23bc1d039$exports = {};
52
+
53
+ $parcel$export($5ab573b23bc1d039$exports, "spectrum-Accordion", () => $5ab573b23bc1d039$export$bed6cbae852b32f0, (v) => $5ab573b23bc1d039$export$bed6cbae852b32f0 = v);
54
+ $parcel$export($5ab573b23bc1d039$exports, "spectrum-Accordion-itemIndicator", () => $5ab573b23bc1d039$export$35196e2132b47abd, (v) => $5ab573b23bc1d039$export$35196e2132b47abd = v);
55
+ $parcel$export($5ab573b23bc1d039$exports, "spectrum-Accordion-item", () => $5ab573b23bc1d039$export$a1947cb8adf67515, (v) => $5ab573b23bc1d039$export$a1947cb8adf67515 = v);
56
+ $parcel$export($5ab573b23bc1d039$exports, "spectrum-Accordion-itemHeading", () => $5ab573b23bc1d039$export$36876b8193439034, (v) => $5ab573b23bc1d039$export$36876b8193439034 = v);
57
+ $parcel$export($5ab573b23bc1d039$exports, "spectrum-Accordion-itemHeader", () => $5ab573b23bc1d039$export$4da8efb546c03356, (v) => $5ab573b23bc1d039$export$4da8efb546c03356 = v);
58
+ $parcel$export($5ab573b23bc1d039$exports, "spectrum-Accordion-itemContent", () => $5ab573b23bc1d039$export$951cb9dc63743241, (v) => $5ab573b23bc1d039$export$951cb9dc63743241 = v);
59
+ $parcel$export($5ab573b23bc1d039$exports, "is-open", () => $5ab573b23bc1d039$export$a9781837241c946d, (v) => $5ab573b23bc1d039$export$a9781837241c946d = v);
60
+ $parcel$export($5ab573b23bc1d039$exports, "is-disabled", () => $5ab573b23bc1d039$export$d35bc1e505d1ebbf, (v) => $5ab573b23bc1d039$export$d35bc1e505d1ebbf = v);
61
+ $parcel$export($5ab573b23bc1d039$exports, "is-hovered", () => $5ab573b23bc1d039$export$b8813cd5d7824ce7, (v) => $5ab573b23bc1d039$export$b8813cd5d7824ce7 = v);
62
+ $parcel$export($5ab573b23bc1d039$exports, "focus-ring", () => $5ab573b23bc1d039$export$f39a09f249340e2a, (v) => $5ab573b23bc1d039$export$f39a09f249340e2a = v);
63
+ var $5ab573b23bc1d039$export$bed6cbae852b32f0;
64
+ var $5ab573b23bc1d039$export$35196e2132b47abd;
65
+ var $5ab573b23bc1d039$export$a1947cb8adf67515;
66
+ var $5ab573b23bc1d039$export$36876b8193439034;
67
+ var $5ab573b23bc1d039$export$4da8efb546c03356;
68
+ var $5ab573b23bc1d039$export$951cb9dc63743241;
69
+ var $5ab573b23bc1d039$export$a9781837241c946d;
70
+ var $5ab573b23bc1d039$export$d35bc1e505d1ebbf;
71
+ var $5ab573b23bc1d039$export$b8813cd5d7824ce7;
72
+ var $5ab573b23bc1d039$export$f39a09f249340e2a;
73
+ $5ab573b23bc1d039$export$bed6cbae852b32f0 = "spectrum-Accordion_b4e47f";
74
+ $5ab573b23bc1d039$export$35196e2132b47abd = "spectrum-Accordion-itemIndicator_b4e47f";
75
+ $5ab573b23bc1d039$export$a1947cb8adf67515 = "spectrum-Accordion-item_b4e47f";
76
+ $5ab573b23bc1d039$export$36876b8193439034 = "spectrum-Accordion-itemHeading_b4e47f";
77
+ $5ab573b23bc1d039$export$4da8efb546c03356 = "spectrum-Accordion-itemHeader_b4e47f";
78
+ $5ab573b23bc1d039$export$951cb9dc63743241 = "spectrum-Accordion-itemContent_b4e47f";
79
+ $5ab573b23bc1d039$export$a9781837241c946d = "is-open_b4e47f";
80
+ $5ab573b23bc1d039$export$d35bc1e505d1ebbf = "is-disabled_b4e47f";
81
+ $5ab573b23bc1d039$export$b8813cd5d7824ce7 = "is-hovered_b4e47f";
82
+ $5ab573b23bc1d039$export$f39a09f249340e2a = "focus-ring_b4e47f";
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ function $d8f45715b3ce327a$var$Accordion(props, ref) {
91
+ props = (0, $6boyC$reactspectrumprovider.useProviderProps)(props);
92
+ let state = (0, $6boyC$reactstatelytree.useTreeState)(props);
93
+ let { styleProps: styleProps } = (0, $6boyC$reactspectrumutils.useStyleProps)(props);
94
+ let domRef = (0, $6boyC$reactspectrumutils.useDOMRef)(ref);
95
+ let { accordionProps: accordionProps } = (0, $6boyC$reactariaaccordion.useAccordion)(props, state, domRef);
96
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($6boyC$react))).createElement("div", {
97
+ ...(0, $6boyC$reactariautils.filterDOMProps)(props),
98
+ ...accordionProps,
99
+ ...styleProps,
100
+ ref: domRef,
101
+ className: (0, $6boyC$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ab573b23bc1d039$exports))), "spectrum-Accordion", styleProps.className)
102
+ }, [
103
+ ...state.collection
104
+ ].map((item)=>/*#__PURE__*/ (0, ($parcel$interopDefault($6boyC$react))).createElement($d8f45715b3ce327a$var$AccordionItem, {
105
+ key: item.key,
106
+ item: item,
107
+ state: state
108
+ })));
97
109
  }
98
-
99
- function $be7b8672a8bbdf8d3fdb2b9fe3226e$var$AccordionItem(props) {
100
- props = useProviderProps(props);
101
- let ref = useRef();
102
- let {
103
- state,
104
- item
105
- } = props;
106
- let {
107
- buttonProps,
108
- regionProps
109
- } = useAccordionItem(props, state, ref);
110
- let isOpen = state.expandedKeys.has(item.key);
111
- let isDisabled = state.disabledKeys.has(item.key);
112
- let {
113
- isHovered,
114
- hoverProps
115
- } = useHover({
116
- isDisabled
117
- });
118
- let {
119
- direction
120
- } = useLocale();
121
- return /*#__PURE__*/_react.createElement("div", {
122
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-item', {
123
- 'is-open': isOpen,
124
- 'is-disabled': isDisabled
125
- })
126
- }, /*#__PURE__*/_react.createElement("h3", {
127
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemHeading')
128
- }, /*#__PURE__*/_react.createElement(FocusRing, {
129
- within: true,
130
- focusRingClass: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'focus-ring')
131
- }, /*#__PURE__*/_react.createElement("button", _babelRuntimeHelpersExtends({}, mergeProps(buttonProps, hoverProps), {
132
- ref: ref,
133
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemHeader', {
134
- 'is-hovered': isHovered
135
- })
136
- }), direction === 'ltr' ? /*#__PURE__*/_react.createElement(_spectrumIconsUiChevronRightMedium, {
137
- "aria-hidden": "true",
138
- UNSAFE_className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemIndicator')
139
- }) : /*#__PURE__*/_react.createElement(_spectrumIconsUiChevronLeftMedium, {
140
- "aria-hidden": "true",
141
- UNSAFE_className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemIndicator')
142
- }), item.props.title))), /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({}, regionProps, {
143
- className: classNames($f985675dcc9276961ef0f83a88faafff$$interop$default, 'spectrum-Accordion-itemContent')
144
- }), item.props.children));
110
+ function $d8f45715b3ce327a$var$AccordionItem(props) {
111
+ props = (0, $6boyC$reactspectrumprovider.useProviderProps)(props);
112
+ let ref = (0, $6boyC$react.useRef)(null);
113
+ let { state: state , item: item } = props;
114
+ let { buttonProps: buttonProps , regionProps: regionProps } = (0, $6boyC$reactariaaccordion.useAccordionItem)(props, state, ref);
115
+ let isOpen = state.expandedKeys.has(item.key);
116
+ let isDisabled = state.disabledKeys.has(item.key);
117
+ let { isHovered: isHovered , hoverProps: hoverProps } = (0, $6boyC$reactariainteractions.useHover)({
118
+ isDisabled: isDisabled
119
+ });
120
+ let { direction: direction } = (0, $6boyC$reactariai18n.useLocale)();
121
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($6boyC$react))).createElement("div", {
122
+ className: (0, $6boyC$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ab573b23bc1d039$exports))), "spectrum-Accordion-item", {
123
+ "is-open": isOpen,
124
+ "is-disabled": isDisabled
125
+ })
126
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($6boyC$react))).createElement("h3", {
127
+ className: (0, $6boyC$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ab573b23bc1d039$exports))), "spectrum-Accordion-itemHeading")
128
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($6boyC$react))).createElement((0, $6boyC$reactariafocus.FocusRing), {
129
+ within: true,
130
+ focusRingClass: (0, $6boyC$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ab573b23bc1d039$exports))), "focus-ring")
131
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($6boyC$react))).createElement("button", {
132
+ ...(0, $6boyC$reactariautils.mergeProps)(buttonProps, hoverProps),
133
+ ref: ref,
134
+ className: (0, $6boyC$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ab573b23bc1d039$exports))), "spectrum-Accordion-itemHeader", {
135
+ "is-hovered": isHovered
136
+ })
137
+ }, direction === "ltr" ? /*#__PURE__*/ (0, ($parcel$interopDefault($6boyC$react))).createElement((0, ($parcel$interopDefault($6boyC$spectrumiconsuiChevronRightMedium))), {
138
+ "aria-hidden": "true",
139
+ UNSAFE_className: (0, $6boyC$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ab573b23bc1d039$exports))), "spectrum-Accordion-itemIndicator")
140
+ }) : /*#__PURE__*/ (0, ($parcel$interopDefault($6boyC$react))).createElement((0, ($parcel$interopDefault($6boyC$spectrumiconsuiChevronLeftMedium))), {
141
+ "aria-hidden": "true",
142
+ UNSAFE_className: (0, $6boyC$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ab573b23bc1d039$exports))), "spectrum-Accordion-itemIndicator")
143
+ }), item.props.title))), /*#__PURE__*/ (0, ($parcel$interopDefault($6boyC$react))).createElement("div", {
144
+ ...regionProps,
145
+ className: (0, $6boyC$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5ab573b23bc1d039$exports))), "spectrum-Accordion-itemContent")
146
+ }, item.props.children));
145
147
  }
148
+ const $d8f45715b3ce327a$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $6boyC$react.forwardRef)($d8f45715b3ce327a$var$Accordion);
149
+
150
+
151
+
146
152
 
147
- const Accordion = /*#__PURE__*/_react.forwardRef($be7b8672a8bbdf8d3fdb2b9fe3226e$var$Accordion);
148
153
 
149
- exports.Accordion = Accordion;
150
154
  //# 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, {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 = React.forwardRef(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","React","forwardRef"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C;ACX1C;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AATA,4CAAuC;AACvC,4CAAqD;AACrD,4CAA4C;AAC5C,4CAAmD;AACnD,4CAAkD;AAClD,4CAAmD;AACnD,4CAA4B;AAC5B,4CAAgC;AAChC,4CAA+B;AAC/B,4CAA+B;;;;;;;;ADmB/B,SAAS,gCAA4B,KAAgC,EAAE,GAA2B,EAAE;IAClG,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,QAAQ,CAAA,GAAA,oCAAW,EAAK;IAC5B,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAa,AAAD,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,kBAAC,eAAc,EAAC,GAAG,CAAA,GAAA,sCAAY,AAAD,EAAE,OAAO,OAAO;IAElD,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAc,AAAD,EAAE,MAAM;QACxB,GAAG,cAAc;QACjB,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,yDAAM,OAAD,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,EAAE;IACtD,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAqB,IAAI;IACxC,IAAI,SAAC,MAAK,QAAE,KAAI,EAAC,GAAG;IACpB,IAAI,eAAC,YAAW,eAAE,YAAW,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,UAAS,cAAE,WAAU,EAAC,GAAG,CAAA,GAAA,qCAAQ,AAAD,EAAE;oBAAC;IAAU;IAClD,IAAI,aAAC,UAAS,EAAC,GAAG,CAAA,GAAA,8BAAS,AAAD;IAE1B,qBACE,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,yDAAM,OAAD,GAAG,2BAA2B;YACvD,WAAW;YACX,eAAe;QACjB;qBACA,0DAAC;QAAG,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;qBAChC,0DAAC,CAAA,GAAA,+BAAQ;QAAE,QAAA,IAAM;QAAC,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;qBACnD,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAU,AAAD,EAAE,aAAa,WAAW;QACvC,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,yDAAM,OAAD,GAAG,iCAAiC;YAC7D,cAAc;QAChB;OACC,cAAc,sBACb,0DAAC,CAAA,GAAA,kEAAkB,AAAD;QAChB,eAAY;QACZ,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;uBAErC,0DAAC,CAAA,GAAA,yDAAiB,QAAD;QACf,eAAY;QACZ,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;MACxC,EACF,KAAK,KAAK,CAAC,KAAK,mBAIvB,0DAAC;QAAK,GAAG,WAAW;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACjD,KAAK,KAAK,CAAC,QAAQ;AAI5B;AAEA,MAAM,0DAAa,CAAA,GAAA,uBAAS,EAAE;;ADtF9B","sources":["packages/@react-spectrum/accordion/src/index.ts","packages/@react-spectrum/accordion/src/Accordion.tsx","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/// <reference types=\"css-module-types\" />\nexport {Accordion} from './Accordion';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumAccordionProps} from '@react-types/accordion';\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>(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","/*\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":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,106 +1,152 @@
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, { 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
1
  import "./main.css";
2
+ import {Item as $8ae4d4d1aa0c5e03$re_export$Item} from "@react-stately/collections";
3
+ import $3Uu4R$spectrumiconsuiChevronLeftMedium from "@spectrum-icons/ui/ChevronLeftMedium";
4
+ import $3Uu4R$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
5
+ import {useStyleProps as $3Uu4R$useStyleProps, useDOMRef as $3Uu4R$useDOMRef, classNames as $3Uu4R$classNames} from "@react-spectrum/utils";
6
+ import {filterDOMProps as $3Uu4R$filterDOMProps, mergeProps as $3Uu4R$mergeProps} from "@react-aria/utils";
7
+ import {FocusRing as $3Uu4R$FocusRing} from "@react-aria/focus";
8
+ import $3Uu4R$react, {useRef as $3Uu4R$useRef, forwardRef as $3Uu4R$forwardRef} from "react";
9
+ import {useTreeState as $3Uu4R$useTreeState} from "@react-stately/tree";
10
+ import {useAccordion as $3Uu4R$useAccordion, useAccordionItem as $3Uu4R$useAccordionItem} from "@react-aria/accordion";
11
+ import {useHover as $3Uu4R$useHover} from "@react-aria/interactions";
12
+ import {useLocale as $3Uu4R$useLocale} from "@react-aria/i18n";
13
+ import {useProviderProps as $3Uu4R$useProviderProps} from "@react-spectrum/provider";
16
14
 
17
15
  function $parcel$interopDefault(a) {
18
16
  return a && a.__esModule ? a.default : a;
19
17
  }
20
-
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
-
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
- })));
18
+ function $parcel$export(e, n, v, s) {
19
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
55
20
  }
21
+ /*
22
+ * Copyright 2020 Adobe. All rights reserved.
23
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License. You may obtain a copy
25
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
+ *
27
+ * Unless required by applicable law or agreed to in writing, software distributed under
28
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
+ * OF ANY KIND, either express or implied. See the License for the specific language
30
+ * governing permissions and limitations under the License.
31
+ */ /// <reference types="css-module-types" />
32
+ /*
33
+ * Copyright 2020 Adobe. All rights reserved.
34
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
35
+ * you may not use this file except in compliance with the License. You may obtain a copy
36
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
37
+ *
38
+ * Unless required by applicable law or agreed to in writing, software distributed under
39
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
40
+ * OF ANY KIND, either express or implied. See the License for the specific language
41
+ * governing permissions and limitations under the License.
42
+ */
43
+
44
+
45
+
46
+
47
+
48
+ var $cd9bb50514faf076$exports = {};
49
+
50
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion", () => $cd9bb50514faf076$export$bed6cbae852b32f0, (v) => $cd9bb50514faf076$export$bed6cbae852b32f0 = v);
51
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemIndicator", () => $cd9bb50514faf076$export$35196e2132b47abd, (v) => $cd9bb50514faf076$export$35196e2132b47abd = v);
52
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-item", () => $cd9bb50514faf076$export$a1947cb8adf67515, (v) => $cd9bb50514faf076$export$a1947cb8adf67515 = v);
53
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeading", () => $cd9bb50514faf076$export$36876b8193439034, (v) => $cd9bb50514faf076$export$36876b8193439034 = v);
54
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemHeader", () => $cd9bb50514faf076$export$4da8efb546c03356, (v) => $cd9bb50514faf076$export$4da8efb546c03356 = v);
55
+ $parcel$export($cd9bb50514faf076$exports, "spectrum-Accordion-itemContent", () => $cd9bb50514faf076$export$951cb9dc63743241, (v) => $cd9bb50514faf076$export$951cb9dc63743241 = v);
56
+ $parcel$export($cd9bb50514faf076$exports, "is-open", () => $cd9bb50514faf076$export$a9781837241c946d, (v) => $cd9bb50514faf076$export$a9781837241c946d = v);
57
+ $parcel$export($cd9bb50514faf076$exports, "is-disabled", () => $cd9bb50514faf076$export$d35bc1e505d1ebbf, (v) => $cd9bb50514faf076$export$d35bc1e505d1ebbf = v);
58
+ $parcel$export($cd9bb50514faf076$exports, "is-hovered", () => $cd9bb50514faf076$export$b8813cd5d7824ce7, (v) => $cd9bb50514faf076$export$b8813cd5d7824ce7 = v);
59
+ $parcel$export($cd9bb50514faf076$exports, "focus-ring", () => $cd9bb50514faf076$export$f39a09f249340e2a, (v) => $cd9bb50514faf076$export$f39a09f249340e2a = v);
60
+ var $cd9bb50514faf076$export$bed6cbae852b32f0;
61
+ var $cd9bb50514faf076$export$35196e2132b47abd;
62
+ var $cd9bb50514faf076$export$a1947cb8adf67515;
63
+ var $cd9bb50514faf076$export$36876b8193439034;
64
+ var $cd9bb50514faf076$export$4da8efb546c03356;
65
+ var $cd9bb50514faf076$export$951cb9dc63743241;
66
+ var $cd9bb50514faf076$export$a9781837241c946d;
67
+ var $cd9bb50514faf076$export$d35bc1e505d1ebbf;
68
+ var $cd9bb50514faf076$export$b8813cd5d7824ce7;
69
+ var $cd9bb50514faf076$export$f39a09f249340e2a;
70
+ $cd9bb50514faf076$export$bed6cbae852b32f0 = "spectrum-Accordion_b4e47f";
71
+ $cd9bb50514faf076$export$35196e2132b47abd = "spectrum-Accordion-itemIndicator_b4e47f";
72
+ $cd9bb50514faf076$export$a1947cb8adf67515 = "spectrum-Accordion-item_b4e47f";
73
+ $cd9bb50514faf076$export$36876b8193439034 = "spectrum-Accordion-itemHeading_b4e47f";
74
+ $cd9bb50514faf076$export$4da8efb546c03356 = "spectrum-Accordion-itemHeader_b4e47f";
75
+ $cd9bb50514faf076$export$951cb9dc63743241 = "spectrum-Accordion-itemContent_b4e47f";
76
+ $cd9bb50514faf076$export$a9781837241c946d = "is-open_b4e47f";
77
+ $cd9bb50514faf076$export$d35bc1e505d1ebbf = "is-disabled_b4e47f";
78
+ $cd9bb50514faf076$export$b8813cd5d7824ce7 = "is-hovered_b4e47f";
79
+ $cd9bb50514faf076$export$f39a09f249340e2a = "focus-ring_b4e47f";
80
+
81
+
56
82
 
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));
83
+
84
+
85
+
86
+
87
+ function $2a5a5b7faca81754$var$Accordion(props, ref) {
88
+ props = (0, $3Uu4R$useProviderProps)(props);
89
+ let state = (0, $3Uu4R$useTreeState)(props);
90
+ let { styleProps: styleProps } = (0, $3Uu4R$useStyleProps)(props);
91
+ let domRef = (0, $3Uu4R$useDOMRef)(ref);
92
+ let { accordionProps: accordionProps } = (0, $3Uu4R$useAccordion)(props, state, domRef);
93
+ return /*#__PURE__*/ (0, $3Uu4R$react).createElement("div", {
94
+ ...(0, $3Uu4R$filterDOMProps)(props),
95
+ ...accordionProps,
96
+ ...styleProps,
97
+ ref: domRef,
98
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion", styleProps.className)
99
+ }, [
100
+ ...state.collection
101
+ ].map((item)=>/*#__PURE__*/ (0, $3Uu4R$react).createElement($2a5a5b7faca81754$var$AccordionItem, {
102
+ key: item.key,
103
+ item: item,
104
+ state: state
105
+ })));
106
+ }
107
+ function $2a5a5b7faca81754$var$AccordionItem(props) {
108
+ props = (0, $3Uu4R$useProviderProps)(props);
109
+ let ref = (0, $3Uu4R$useRef)(null);
110
+ let { state: state , item: item } = props;
111
+ let { buttonProps: buttonProps , regionProps: regionProps } = (0, $3Uu4R$useAccordionItem)(props, state, ref);
112
+ let isOpen = state.expandedKeys.has(item.key);
113
+ let isDisabled = state.disabledKeys.has(item.key);
114
+ let { isHovered: isHovered , hoverProps: hoverProps } = (0, $3Uu4R$useHover)({
115
+ isDisabled: isDisabled
116
+ });
117
+ let { direction: direction } = (0, $3Uu4R$useLocale)();
118
+ return /*#__PURE__*/ (0, $3Uu4R$react).createElement("div", {
119
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-item", {
120
+ "is-open": isOpen,
121
+ "is-disabled": isDisabled
122
+ })
123
+ }, /*#__PURE__*/ (0, $3Uu4R$react).createElement("h3", {
124
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemHeading")
125
+ }, /*#__PURE__*/ (0, $3Uu4R$react).createElement((0, $3Uu4R$FocusRing), {
126
+ within: true,
127
+ focusRingClass: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "focus-ring")
128
+ }, /*#__PURE__*/ (0, $3Uu4R$react).createElement("button", {
129
+ ...(0, $3Uu4R$mergeProps)(buttonProps, hoverProps),
130
+ ref: ref,
131
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemHeader", {
132
+ "is-hovered": isHovered
133
+ })
134
+ }, direction === "ltr" ? /*#__PURE__*/ (0, $3Uu4R$react).createElement((0, $3Uu4R$spectrumiconsuiChevronRightMedium), {
135
+ "aria-hidden": "true",
136
+ UNSAFE_className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemIndicator")
137
+ }) : /*#__PURE__*/ (0, $3Uu4R$react).createElement((0, $3Uu4R$spectrumiconsuiChevronLeftMedium), {
138
+ "aria-hidden": "true",
139
+ UNSAFE_className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemIndicator")
140
+ }), item.props.title))), /*#__PURE__*/ (0, $3Uu4R$react).createElement("div", {
141
+ ...regionProps,
142
+ className: (0, $3Uu4R$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd9bb50514faf076$exports))), "spectrum-Accordion-itemContent")
143
+ }, item.props.children));
103
144
  }
145
+ const $2a5a5b7faca81754$export$a766cd26d0d69044 = /*#__PURE__*/ (0, $3Uu4R$forwardRef)($2a5a5b7faca81754$var$Accordion);
146
+
147
+
148
+
149
+
104
150
 
105
- export const Accordion = /*#__PURE__*/_react.forwardRef($f180b8b9e9903ea16cbb02a00974$var$Accordion);
151
+ export {$2a5a5b7faca81754$export$a766cd26d0d69044 as Accordion, $8ae4d4d1aa0c5e03$re_export$Item as Item};
106
152
  //# 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, {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 = React.forwardRef(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","React","forwardRef"],"version":3,"file":"module.js.map"}
1
+ {"mappings":"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","sources":["packages/@react-spectrum/accordion/src/index.ts","packages/@react-spectrum/accordion/src/Accordion.tsx","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/// <reference types=\"css-module-types\" />\nexport {Accordion} from './Accordion';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumAccordionProps} from '@react-types/accordion';\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>(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","/*\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":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,6 +1,10 @@
1
- import React from "react";
1
+ import { DOMRef } from "@react-types/shared";
2
2
  import { SpectrumAccordionProps } from "@react-types/accordion";
3
- export const Accordion: React.ForwardRefExoticComponent<SpectrumAccordionProps<object> & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>>;
3
+ export function Accordion<T extends object>(props: SpectrumAccordionProps<T>, ref: DOMRef<HTMLDivElement>): JSX.Element;
4
+ export const Accordion: <T>(props: SpectrumAccordionProps<T> & {
5
+ ref?: DOMRef<HTMLDivElement>;
6
+ }) => ReturnType<typeof Accordion>;
4
7
  export { Item } from '@react-stately/collections';
8
+ export type { SpectrumAccordionProps } from '@react-types/accordion';
5
9
 
6
10
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"mappings":"A;A;AAkGA,OAAA,MAAM,2JAAwC,CAAC;ACnF/C,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,eAmBjG;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"}
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@react-spectrum/accordion",
3
- "version": "3.0.0-alpha.2",
3
+ "version": "3.0.0-alpha.20",
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,28 @@
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.2",
38
- "@react-aria/interactions": "^3.5.1",
39
- "@react-aria/utils": "^3.8.2",
40
- "@react-spectrum/utils": "^3.6.2",
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.8.0",
45
- "@spectrum-icons/ui": "^3.2.1"
39
+ "@react-aria/accordion": "3.0.0-alpha.18",
40
+ "@react-aria/focus": "^3.12.1",
41
+ "@react-aria/i18n": "^3.7.2",
42
+ "@react-aria/interactions": "^3.15.1",
43
+ "@react-aria/utils": "^3.17.0",
44
+ "@react-spectrum/utils": "^3.9.2",
45
+ "@react-stately/collections": "^3.8.0",
46
+ "@react-stately/tree": "^3.6.1",
47
+ "@react-types/accordion": "3.0.0-alpha.14",
48
+ "@react-types/shared": "^3.18.1",
49
+ "@spectrum-icons/ui": "^3.5.2",
50
+ "@swc/helpers": "^0.4.14"
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"
53
58
  },
54
59
  "publishConfig": {
55
60
  "access": "public"
56
61
  },
57
- "gitHead": "9204e1b8cb61dac767e91087fb16203611dc67c5"
62
+ "gitHead": "5911ed21de4b76d66f6254c02302519e02d50e16"
58
63
  }
package/src/Accordion.tsx CHANGED
@@ -16,7 +16,7 @@ import {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';
16
16
  import {DOMRef, Node} from '@react-types/shared';
17
17
  import {filterDOMProps, mergeProps} from '@react-aria/utils';
18
18
  import {FocusRing} from '@react-aria/focus';
19
- import React, {useRef} from 'react';
19
+ import React, {forwardRef, useRef} from 'react';
20
20
  import {SpectrumAccordionProps} from '@react-types/accordion';
21
21
  import styles from '@adobe/spectrum-css-temp/components/accordion/vars.css';
22
22
  import {TreeState, useTreeState} from '@react-stately/tree';
@@ -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);
@@ -96,5 +96,5 @@ function AccordionItem<T>(props: AccordionItemProps<T>) {
96
96
  );
97
97
  }
98
98
 
99
- const _Accordion = React.forwardRef(Accordion);
99
+ const _Accordion = forwardRef(Accordion) as <T>(props: SpectrumAccordionProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReturnType<typeof Accordion>;
100
100
  export {_Accordion as Accordion};
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.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"}