@react-spectrum/steplist 3.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js ADDED
@@ -0,0 +1,287 @@
1
+ require("./main.css");
2
+ var $5XIpf$reactstatelycollections = require("@react-stately/collections");
3
+ var $5XIpf$reactariasteplist = require("@react-aria/steplist");
4
+ var $5XIpf$reactspectrumutils = require("@react-spectrum/utils");
5
+ var $5XIpf$react = require("react");
6
+ var $5XIpf$reactspectrumprovider = require("@react-spectrum/provider");
7
+ var $5XIpf$reactstatelysteplist = require("@react-stately/steplist");
8
+ var $5XIpf$spectrumiconsuiChevronRightMedium = require("@spectrum-icons/ui/ChevronRightMedium");
9
+ var $5XIpf$reactariafocus = require("@react-aria/focus");
10
+ var $5XIpf$reactariautils = require("@react-aria/utils");
11
+ var $5XIpf$reactariainteractions = require("@react-aria/interactions");
12
+ var $5XIpf$reactariai18n = require("@react-aria/i18n");
13
+ var $5XIpf$reactariavisuallyhidden = require("@react-aria/visually-hidden");
14
+
15
+
16
+ function $parcel$export(e, n, v, s) {
17
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
18
+ }
19
+
20
+ function $parcel$interopDefault(a) {
21
+ return a && a.__esModule ? a.default : a;
22
+ }
23
+
24
+ $parcel$export(module.exports, "StepList", () => $a64198f1506264d6$export$ff2e09ca3ba758a9);
25
+ $parcel$export(module.exports, "Item", () => $5XIpf$reactstatelycollections.Item);
26
+ /*
27
+ * Copyright 2023 Adobe. All rights reserved.
28
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
29
+ * you may not use this file except in compliance with the License. You may obtain a copy
30
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
31
+ *
32
+ * Unless required by applicable law or agreed to in writing, software distributed under
33
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
34
+ * OF ANY KIND, either express or implied. See the License for the specific language
35
+ * governing permissions and limitations under the License.
36
+ */ /// <reference types="css-module-types" />
37
+ /*
38
+ * Copyright 2023 Adobe. All rights reserved.
39
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
40
+ * you may not use this file except in compliance with the License. You may obtain a copy
41
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
42
+ *
43
+ * Unless required by applicable law or agreed to in writing, software distributed under
44
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
45
+ * OF ANY KIND, either express or implied. See the License for the specific language
46
+ * governing permissions and limitations under the License.
47
+ */
48
+
49
+
50
+ /*
51
+ * Copyright 202 Adobe. All rights reserved.
52
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
53
+ * you may not use this file except in compliance with the License. You may obtain a copy
54
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
55
+ *
56
+ * Unless required by applicable law or agreed to in writing, software distributed under
57
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
58
+ * OF ANY KIND, either express or implied. See the License for the specific language
59
+ * governing permissions and limitations under the License.
60
+ */
61
+ const $b9b57d2de2195519$export$66136572efa4af6e = (0, ($parcel$interopDefault($5XIpf$react))).createContext(null);
62
+
63
+
64
+ /*
65
+ * Copyright 2023 Adobe. All rights reserved.
66
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
67
+ * you may not use this file except in compliance with the License. You may obtain a copy
68
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
69
+ *
70
+ * Unless required by applicable law or agreed to in writing, software distributed under
71
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
72
+ * OF ANY KIND, either express or implied. See the License for the specific language
73
+ * governing permissions and limitations under the License.
74
+ */
75
+
76
+
77
+ var $17d0d848808abe0b$exports = {};
78
+ $17d0d848808abe0b$exports = {
79
+ "completed": `Completed: `,
80
+ "notCompleted": `Not completed: `,
81
+ "current": `Current: `,
82
+ "steplist": `Step List`
83
+ };
84
+
85
+
86
+ var $fed92386245d94a4$export$2e2bcd8739ae039 = {
87
+ "en-US": (0, (/*@__PURE__*/$parcel$interopDefault($17d0d848808abe0b$exports)))
88
+ };
89
+
90
+
91
+
92
+
93
+
94
+ var $390add5aac6e4d73$exports = {};
95
+
96
+ $parcel$export($390add5aac6e4d73$exports, "chevron", () => $390add5aac6e4d73$export$980c1089c0604ea3, (v) => $390add5aac6e4d73$export$980c1089c0604ea3 = v);
97
+ $parcel$export($390add5aac6e4d73$exports, "focus-ring", () => $390add5aac6e4d73$export$f39a09f249340e2a, (v) => $390add5aac6e4d73$export$f39a09f249340e2a = v);
98
+ $parcel$export($390add5aac6e4d73$exports, "i18nFontFamily", () => $390add5aac6e4d73$export$8c4ee2c50c22c514, (v) => $390add5aac6e4d73$export$8c4ee2c50c22c514 = v);
99
+ $parcel$export($390add5aac6e4d73$exports, "is-completed", () => $390add5aac6e4d73$export$7e62df9ca2e410e4, (v) => $390add5aac6e4d73$export$7e62df9ca2e410e4 = v);
100
+ $parcel$export($390add5aac6e4d73$exports, "is-disabled", () => $390add5aac6e4d73$export$d35bc1e505d1ebbf, (v) => $390add5aac6e4d73$export$d35bc1e505d1ebbf = v);
101
+ $parcel$export($390add5aac6e4d73$exports, "is-emphasized", () => $390add5aac6e4d73$export$ad416fbde92db390, (v) => $390add5aac6e4d73$export$ad416fbde92db390 = v);
102
+ $parcel$export($390add5aac6e4d73$exports, "is-hovered", () => $390add5aac6e4d73$export$b8813cd5d7824ce7, (v) => $390add5aac6e4d73$export$b8813cd5d7824ce7 = v);
103
+ $parcel$export($390add5aac6e4d73$exports, "is-reversed", () => $390add5aac6e4d73$export$a4561bd665abb5db, (v) => $390add5aac6e4d73$export$a4561bd665abb5db = v);
104
+ $parcel$export($390add5aac6e4d73$exports, "is-selected", () => $390add5aac6e4d73$export$1e0fb04f31d3c22a, (v) => $390add5aac6e4d73$export$1e0fb04f31d3c22a = v);
105
+ $parcel$export($390add5aac6e4d73$exports, "label", () => $390add5aac6e4d73$export$1237798dc640739a, (v) => $390add5aac6e4d73$export$1237798dc640739a = v);
106
+ $parcel$export($390add5aac6e4d73$exports, "line", () => $390add5aac6e4d73$export$53f1d5ea8de3d7c, (v) => $390add5aac6e4d73$export$53f1d5ea8de3d7c = v);
107
+ $parcel$export($390add5aac6e4d73$exports, "link", () => $390add5aac6e4d73$export$9c30223ca0a664fb, (v) => $390add5aac6e4d73$export$9c30223ca0a664fb = v);
108
+ $parcel$export($390add5aac6e4d73$exports, "number", () => $390add5aac6e4d73$export$98e628dec113755e, (v) => $390add5aac6e4d73$export$98e628dec113755e = v);
109
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-FocusRing-ring", () => $390add5aac6e4d73$export$4109102f950813a6, (v) => $390add5aac6e4d73$export$4109102f950813a6 = v);
110
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-FocusRing", () => $390add5aac6e4d73$export$24c7f46a6e3605dd, (v) => $390add5aac6e4d73$export$24c7f46a6e3605dd = v);
111
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-FocusRing--quiet", () => $390add5aac6e4d73$export$2927016961429360, (v) => $390add5aac6e4d73$export$2927016961429360 = v);
112
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist", () => $390add5aac6e4d73$export$35315228197e36b8, (v) => $390add5aac6e4d73$export$35315228197e36b8 = v);
113
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--interactive", () => $390add5aac6e4d73$export$b8611be6978ea2dd, (v) => $390add5aac6e4d73$export$b8611be6978ea2dd = v);
114
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--large", () => $390add5aac6e4d73$export$b0d9d5077004711a, (v) => $390add5aac6e4d73$export$b0d9d5077004711a = v);
115
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--medium", () => $390add5aac6e4d73$export$9666cb7894b7712a, (v) => $390add5aac6e4d73$export$9666cb7894b7712a = v);
116
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--small", () => $390add5aac6e4d73$export$43119eed81e90e13, (v) => $390add5aac6e4d73$export$43119eed81e90e13 = v);
117
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--vertical", () => $390add5aac6e4d73$export$146e7d67031e074f, (v) => $390add5aac6e4d73$export$146e7d67031e074f = v);
118
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--xlarge", () => $390add5aac6e4d73$export$56195e68ddf7db1b, (v) => $390add5aac6e4d73$export$56195e68ddf7db1b = v);
119
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-chevron", () => $390add5aac6e4d73$export$e0b9c44558d2fb75, (v) => $390add5aac6e4d73$export$e0b9c44558d2fb75 = v);
120
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-item", () => $390add5aac6e4d73$export$df6f1d30f09c136e, (v) => $390add5aac6e4d73$export$df6f1d30f09c136e = v);
121
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-label", () => $390add5aac6e4d73$export$2393468f68ff8031, (v) => $390add5aac6e4d73$export$2393468f68ff8031 = v);
122
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-link", () => $390add5aac6e4d73$export$f622f4b07b665af3, (v) => $390add5aac6e4d73$export$f622f4b07b665af3 = v);
123
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-marker", () => $390add5aac6e4d73$export$9d44d123fa093f85, (v) => $390add5aac6e4d73$export$9d44d123fa093f85 = v);
124
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-segment", () => $390add5aac6e4d73$export$1f36a6b1ab318f2f, (v) => $390add5aac6e4d73$export$1f36a6b1ab318f2f = v);
125
+ var $390add5aac6e4d73$export$980c1089c0604ea3;
126
+ var $390add5aac6e4d73$export$f39a09f249340e2a;
127
+ var $390add5aac6e4d73$export$8c4ee2c50c22c514;
128
+ var $390add5aac6e4d73$export$7e62df9ca2e410e4;
129
+ var $390add5aac6e4d73$export$d35bc1e505d1ebbf;
130
+ var $390add5aac6e4d73$export$ad416fbde92db390;
131
+ var $390add5aac6e4d73$export$b8813cd5d7824ce7;
132
+ var $390add5aac6e4d73$export$a4561bd665abb5db;
133
+ var $390add5aac6e4d73$export$1e0fb04f31d3c22a;
134
+ var $390add5aac6e4d73$export$1237798dc640739a;
135
+ var $390add5aac6e4d73$export$53f1d5ea8de3d7c;
136
+ var $390add5aac6e4d73$export$9c30223ca0a664fb;
137
+ var $390add5aac6e4d73$export$98e628dec113755e;
138
+ var $390add5aac6e4d73$export$4109102f950813a6;
139
+ var $390add5aac6e4d73$export$24c7f46a6e3605dd;
140
+ var $390add5aac6e4d73$export$2927016961429360;
141
+ var $390add5aac6e4d73$export$35315228197e36b8;
142
+ var $390add5aac6e4d73$export$b8611be6978ea2dd;
143
+ var $390add5aac6e4d73$export$b0d9d5077004711a;
144
+ var $390add5aac6e4d73$export$9666cb7894b7712a;
145
+ var $390add5aac6e4d73$export$43119eed81e90e13;
146
+ var $390add5aac6e4d73$export$146e7d67031e074f;
147
+ var $390add5aac6e4d73$export$56195e68ddf7db1b;
148
+ var $390add5aac6e4d73$export$e0b9c44558d2fb75;
149
+ var $390add5aac6e4d73$export$df6f1d30f09c136e;
150
+ var $390add5aac6e4d73$export$2393468f68ff8031;
151
+ var $390add5aac6e4d73$export$f622f4b07b665af3;
152
+ var $390add5aac6e4d73$export$9d44d123fa093f85;
153
+ var $390add5aac6e4d73$export$1f36a6b1ab318f2f;
154
+ $390add5aac6e4d73$export$980c1089c0604ea3 = `Y9ExmG_chevron`;
155
+ $390add5aac6e4d73$export$f39a09f249340e2a = `Y9ExmG_focus-ring`;
156
+ $390add5aac6e4d73$export$8c4ee2c50c22c514 = `Y9ExmG_i18nFontFamily`;
157
+ $390add5aac6e4d73$export$7e62df9ca2e410e4 = `Y9ExmG_is-completed`;
158
+ $390add5aac6e4d73$export$d35bc1e505d1ebbf = `Y9ExmG_is-disabled`;
159
+ $390add5aac6e4d73$export$ad416fbde92db390 = `Y9ExmG_is-emphasized`;
160
+ $390add5aac6e4d73$export$b8813cd5d7824ce7 = `Y9ExmG_is-hovered`;
161
+ $390add5aac6e4d73$export$a4561bd665abb5db = `Y9ExmG_is-reversed`;
162
+ $390add5aac6e4d73$export$1e0fb04f31d3c22a = `Y9ExmG_is-selected`;
163
+ $390add5aac6e4d73$export$1237798dc640739a = `Y9ExmG_label`;
164
+ $390add5aac6e4d73$export$53f1d5ea8de3d7c = `Y9ExmG_line`;
165
+ $390add5aac6e4d73$export$9c30223ca0a664fb = `Y9ExmG_link`;
166
+ $390add5aac6e4d73$export$98e628dec113755e = `Y9ExmG_number`;
167
+ $390add5aac6e4d73$export$4109102f950813a6 = `Y9ExmG_spectrum-FocusRing-ring`;
168
+ $390add5aac6e4d73$export$24c7f46a6e3605dd = `Y9ExmG_spectrum-FocusRing ${$390add5aac6e4d73$export$4109102f950813a6}`;
169
+ $390add5aac6e4d73$export$2927016961429360 = `Y9ExmG_spectrum-FocusRing--quiet`;
170
+ $390add5aac6e4d73$export$35315228197e36b8 = `Y9ExmG_spectrum-Steplist`;
171
+ $390add5aac6e4d73$export$b8611be6978ea2dd = `Y9ExmG_spectrum-Steplist--interactive`;
172
+ $390add5aac6e4d73$export$b0d9d5077004711a = `Y9ExmG_spectrum-Steplist--large`;
173
+ $390add5aac6e4d73$export$9666cb7894b7712a = `Y9ExmG_spectrum-Steplist--medium`;
174
+ $390add5aac6e4d73$export$43119eed81e90e13 = `Y9ExmG_spectrum-Steplist--small`;
175
+ $390add5aac6e4d73$export$146e7d67031e074f = `Y9ExmG_spectrum-Steplist--vertical`;
176
+ $390add5aac6e4d73$export$56195e68ddf7db1b = `Y9ExmG_spectrum-Steplist--xlarge`;
177
+ $390add5aac6e4d73$export$e0b9c44558d2fb75 = `Y9ExmG_spectrum-Steplist-chevron`;
178
+ $390add5aac6e4d73$export$df6f1d30f09c136e = `Y9ExmG_spectrum-Steplist-item`;
179
+ $390add5aac6e4d73$export$2393468f68ff8031 = `Y9ExmG_spectrum-Steplist-label`;
180
+ $390add5aac6e4d73$export$f622f4b07b665af3 = `Y9ExmG_spectrum-Steplist-link`;
181
+ $390add5aac6e4d73$export$9d44d123fa093f85 = `Y9ExmG_spectrum-Steplist-marker`;
182
+ $390add5aac6e4d73$export$1f36a6b1ab318f2f = `Y9ExmG_spectrum-Steplist-segment`;
183
+
184
+
185
+
186
+
187
+
188
+
189
+ function $d2e2cd0667356b5d$export$87c2a8a94eda1754(props) {
190
+ let { isDisabled: isDisabled, isEmphasized: isEmphasized, item: item } = props;
191
+ let { key: key } = item;
192
+ let ref = (0, $5XIpf$react.useRef)();
193
+ let { direction: direction } = (0, $5XIpf$reactariai18n.useLocale)();
194
+ let state = (0, $5XIpf$react.useContext)((0, $b9b57d2de2195519$export$66136572efa4af6e));
195
+ const isCompleted = state.isCompleted(key);
196
+ const isItemDisabled = isDisabled || state.disabledKeys.has(key);
197
+ let { stepProps: stepProps, stepStateProps: stepStateProps } = (0, $5XIpf$reactariasteplist.useStepListItem)({
198
+ ...props,
199
+ key: key
200
+ }, state, ref);
201
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $5XIpf$reactariainteractions.useHover)(props);
202
+ const isSelected = state.selectedKey === key;
203
+ let stepStateText = "";
204
+ const stringFormatter = (0, $5XIpf$reactariai18n.useLocalizedStringFormatter)((0, $fed92386245d94a4$export$2e2bcd8739ae039));
205
+ const numberFormatter = (0, $5XIpf$reactariai18n.useNumberFormatter)();
206
+ if (isSelected) stepStateText = stringFormatter.format("current");
207
+ else if (isCompleted) stepStateText = stringFormatter.format("completed");
208
+ else stepStateText = stringFormatter.format("notCompleted");
209
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("li", {
210
+ key: key,
211
+ className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-item")
212
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, $5XIpf$reactariafocus.FocusRing), {
213
+ within: true,
214
+ focusRingClass: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "focus-ring")
215
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("a", {
216
+ "aria-labelledby": `step-marker-${key} step-label-${key}`,
217
+ ref: ref,
218
+ ...(0, $5XIpf$reactariautils.mergeProps)(hoverProps, stepProps),
219
+ className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-link", {
220
+ "is-selected": isSelected && !isItemDisabled,
221
+ "is-disabled": isItemDisabled,
222
+ "is-hovered": isHovered,
223
+ "is-emphasized": isEmphasized && isSelected,
224
+ "is-completed": isCompleted
225
+ })
226
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, $5XIpf$reactariavisuallyhidden.VisuallyHidden), stepStateProps, stepStateText), /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("span", {
227
+ id: `step-marker-${key}`,
228
+ "aria-hidden": "true",
229
+ className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-marker")
230
+ }, numberFormatter.format((item.index || 0) + 1)), /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("span", {
231
+ id: `step-label-${key}`,
232
+ "aria-hidden": "true",
233
+ className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-label")
234
+ }, item.rendered))), /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("span", {
235
+ className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-segment", {
236
+ "is-completed": isCompleted
237
+ })
238
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, ($parcel$interopDefault($5XIpf$spectrumiconsuiChevronRightMedium))), {
239
+ UNSAFE_className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-chevron", {
240
+ "is-reversed": direction === "rtl"
241
+ })
242
+ })));
243
+ }
244
+
245
+
246
+
247
+
248
+
249
+ function $a64198f1506264d6$var$StepList(props, ref) {
250
+ const { size: size = "M", orientation: orientation = "horizontal" } = props;
251
+ props = (0, $5XIpf$reactspectrumprovider.useProviderProps)(props);
252
+ let { styleProps: styleProps } = (0, $5XIpf$reactspectrumutils.useStyleProps)(props);
253
+ let domRef = (0, $5XIpf$reactspectrumutils.useDOMRef)(ref);
254
+ let state = (0, $5XIpf$reactstatelysteplist.useStepListState)(props);
255
+ let { listProps: listProps } = (0, $5XIpf$reactariasteplist.useStepList)(props, state, domRef);
256
+ const { isDisabled: isDisabled, isEmphasized: isEmphasized, isReadOnly: isReadOnly } = props;
257
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("ol", {
258
+ ...listProps,
259
+ ...styleProps,
260
+ ref: domRef,
261
+ className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist", styleProps.className, {
262
+ "spectrum-Steplist--interactive": !isReadOnly && !isDisabled,
263
+ "spectrum-Steplist--small": size === "S",
264
+ "spectrum-Steplist--medium": size === "M",
265
+ "spectrum-Steplist--large": size === "L",
266
+ "spectrum-Steplist--xlarge": size === "XL",
267
+ "spectrum-Steplist--vertical": orientation === "vertical"
268
+ })
269
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, $b9b57d2de2195519$export$66136572efa4af6e).Provider, {
270
+ value: state
271
+ }, [
272
+ ...state.collection
273
+ ].map((item)=>/*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, $d2e2cd0667356b5d$export$87c2a8a94eda1754), {
274
+ key: item.key,
275
+ isDisabled: isDisabled,
276
+ isEmphasized: isEmphasized,
277
+ isReadOnly: isReadOnly,
278
+ item: item
279
+ }))));
280
+ }
281
+ const $a64198f1506264d6$export$ff2e09ca3ba758a9 = /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).forwardRef($a64198f1506264d6$var$StepList);
282
+
283
+
284
+
285
+
286
+
287
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;;ACVD;;;;;;;;;;CAUC;AAKM,MAAM,4CAAkB,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAyB;;;ACf3E;;;;;;;;;;CAUC;;;;AEVD,4BAAiB;IAAG,aAAa,CAAC,WAAW,CAAC;IAC5C,gBAAgB,CAAC,eAAe,CAAC;IACjC,WAAW,CAAC,SAAS,CAAC;IACtB,YAAY,CAAC,SAAS,CAAC;AACzB;;;IDFA,2CAAe;IACb,SAAS,CAAA,GAAA,gEAAG;AACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEJA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AA5BA,4CAA4B,CAAC,cAAc,CAAC;AAC5C,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qB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yCAAc,EAAE,QAAQ;QAAC,OAAO;OAC9B;WAAI,MAAM,UAAU;KAAC,CAAC,GAAG,CAAC,CAAC,qBAC1B,0DAAC,CAAA,GAAA,yCAAW;YACV,KAAK,KAAK,GAAG;YACb,YAAY;YACZ,cAAc;YACd,YAAY;YACZ,MAAM;;AAMlB;AAEA,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;","sources":["packages/@react-spectrum/steplist/src/index.ts","packages/@react-spectrum/steplist/src/StepList.tsx","packages/@react-spectrum/steplist/src/StepListContext.ts","packages/@react-spectrum/steplist/src/StepListItem.tsx","packages/@react-spectrum/steplist/intl/index.js","packages/@react-spectrum/steplist/intl/en-US.json","packages/@adobe/spectrum-css-temp/components/steplist/vars.css"],"sourcesContent":["/*\n * Copyright 2023 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/// <reference types=\"css-module-types\" />\n\nexport {StepList} from './StepList';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumStepListProps} from './StepList';\n","/*\n * Copyright 2023 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 {AriaStepListProps, useStepList} from '@react-aria/steplist';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, Orientation, StyleProps} from '@react-types/shared';\nimport React, {ReactElement} from 'react';\nimport {StepListContext} from './StepListContext';\nimport {StepListItem} from './StepListItem';\nimport styles from '@adobe/spectrum-css-temp/components/steplist/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useStepListState} from '@react-stately/steplist';\n\nexport interface SpectrumStepListProps<T> extends AriaStepListProps<T>, StyleProps {\n /**\n * Whether the step list should be displayed with a emphasized style.\n * @default false\n */\n isEmphasized?: boolean,\n /**\n * The orientation of the step list.\n * @default 'horizontal'\n */\n orientation?: Orientation,\n /**\n * The size of the step list.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\nfunction StepList<T extends object>(props: SpectrumStepListProps<T>, ref: DOMRef<HTMLOListElement>) {\n const {size = 'M', orientation = 'horizontal'} = props;\n props = useProviderProps(props);\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n\n let state = useStepListState(props);\n let {listProps} = useStepList(props, state, domRef);\n\n const {isDisabled, isEmphasized, isReadOnly} = props;\n\n return (\n <ol\n {...listProps}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Steplist', styleProps.className, {\n 'spectrum-Steplist--interactive': !isReadOnly && !isDisabled,\n 'spectrum-Steplist--small': size === 'S',\n 'spectrum-Steplist--medium': size === 'M',\n 'spectrum-Steplist--large': size === 'L',\n 'spectrum-Steplist--xlarge': size === 'XL',\n 'spectrum-Steplist--vertical': orientation === 'vertical'\n })}>\n <StepListContext.Provider value={state}>\n {[...state.collection].map((item) => (\n <StepListItem\n key={item.key}\n isDisabled={isDisabled}\n isEmphasized={isEmphasized}\n isReadOnly={isReadOnly}\n item={item} />\n )\n )}\n </StepListContext.Provider>\n </ol>\n );\n}\n\nconst _StepList = React.forwardRef(StepList) as <T>(props: SpectrumStepListProps<T> & {ref?: DOMRef<HTMLOListElement>}) => ReactElement;\nexport {_StepList as StepList};\n","/*\n * Copyright 202 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 React from 'react';\nimport {StepListState} from '@react-stately/steplist';\n\nexport const StepListContext = React.createContext<StepListState<unknown>>(null);\n","/*\n * Copyright 2023 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 */\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {classNames} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport intlMessages from '../intl';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {useContext, useRef} from 'react';\nimport {StepListContext} from './StepListContext';\nimport styles from '@adobe/spectrum-css-temp/components/steplist/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale, useLocalizedStringFormatter, useNumberFormatter} from '@react-aria/i18n';\nimport {useStepListItem} from '@react-aria/steplist';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface SpectrumStepListItemProps<T> {\n item: Node<T>,\n isDisabled?: boolean,\n isEmphasized?: boolean,\n isReadOnly?: boolean\n}\n\nexport function StepListItem<T>(props: SpectrumStepListItemProps<T>) {\n let {\n isDisabled,\n isEmphasized,\n item\n } = props;\n let {key} = item;\n\n let ref = useRef();\n let {direction} = useLocale();\n let state = useContext(StepListContext);\n const isCompleted = state.isCompleted(key);\n const isItemDisabled = isDisabled || state.disabledKeys.has(key);\n let {stepProps, stepStateProps} = useStepListItem({...props, key}, state, ref);\n\n let {hoverProps, isHovered} = useHover(props);\n const isSelected = state.selectedKey === key;\n\n let stepStateText = '';\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n const numberFormatter = useNumberFormatter();\n\n if (isSelected) {\n stepStateText = stringFormatter.format('current');\n } else if (isCompleted) {\n stepStateText = stringFormatter.format('completed');\n } else {\n stepStateText = stringFormatter.format('notCompleted');\n }\n\n return (\n <li\n key={key}\n className={\n classNames(\n styles,\n 'spectrum-Steplist-item'\n )\n }>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <a\n aria-labelledby={`step-marker-${key} step-label-${key}`}\n ref={ref}\n {...mergeProps(hoverProps, stepProps)}\n className={classNames(\n styles,\n 'spectrum-Steplist-link',\n {\n 'is-selected': isSelected && !isItemDisabled,\n 'is-disabled': isItemDisabled,\n 'is-hovered': isHovered,\n 'is-emphasized': isEmphasized && isSelected,\n 'is-completed': isCompleted\n }\n )}>\n <VisuallyHidden {...stepStateProps}>{stepStateText}</VisuallyHidden>\n <span id={`step-marker-${key}`} aria-hidden=\"true\" className={classNames(styles, 'spectrum-Steplist-marker')}>{numberFormatter.format((item.index || 0) + 1)}</span>\n <span id={`step-label-${key}`} aria-hidden=\"true\" className={classNames(styles, 'spectrum-Steplist-label')}>\n {item.rendered}\n </span>\n </a>\n </FocusRing>\n <span\n className={classNames(\n styles,\n 'spectrum-Steplist-segment', {\n 'is-completed': isCompleted\n })} >\n <ChevronRightMedium\n UNSAFE_className={classNames(styles, 'spectrum-Steplist-chevron', {\n 'is-reversed': direction === 'rtl'\n })} />\n </span>\n </li>\n );\n}\n","import enUS from './en-US.json';\n\nexport default {\n 'en-US': enUS\n};\n","{\n \"completed\": \"Completed: \",\n \"notCompleted\": \"Not completed: \",\n \"current\": \"Current: \",\n \"steplist\": \"Step List\"\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"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js ADDED
@@ -0,0 +1,285 @@
1
+ import "./main.css";
2
+ import {Item as $6f77c10bf951cb4f$re_export$Item} from "@react-stately/collections";
3
+ import {useStepList as $gZOFb$useStepList, useStepListItem as $gZOFb$useStepListItem} from "@react-aria/steplist";
4
+ import {useStyleProps as $gZOFb$useStyleProps, useDOMRef as $gZOFb$useDOMRef, classNames as $gZOFb$classNames} from "@react-spectrum/utils";
5
+ import $gZOFb$react, {useRef as $gZOFb$useRef, useContext as $gZOFb$useContext} from "react";
6
+ import {useProviderProps as $gZOFb$useProviderProps} from "@react-spectrum/provider";
7
+ import {useStepListState as $gZOFb$useStepListState} from "@react-stately/steplist";
8
+ import $gZOFb$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
9
+ import {FocusRing as $gZOFb$FocusRing} from "@react-aria/focus";
10
+ import {mergeProps as $gZOFb$mergeProps} from "@react-aria/utils";
11
+ import {useHover as $gZOFb$useHover} from "@react-aria/interactions";
12
+ import {useLocale as $gZOFb$useLocale, useLocalizedStringFormatter as $gZOFb$useLocalizedStringFormatter, useNumberFormatter as $gZOFb$useNumberFormatter} from "@react-aria/i18n";
13
+ import {VisuallyHidden as $gZOFb$VisuallyHidden} from "@react-aria/visually-hidden";
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
+ * Copyright 2023 Adobe. All rights reserved.
25
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
26
+ * you may not use this file except in compliance with the License. You may obtain a copy
27
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software distributed under
30
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
31
+ * OF ANY KIND, either express or implied. See the License for the specific language
32
+ * governing permissions and limitations under the License.
33
+ */ /// <reference types="css-module-types" />
34
+ /*
35
+ * Copyright 2023 Adobe. All rights reserved.
36
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
37
+ * you may not use this file except in compliance with the License. You may obtain a copy
38
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
39
+ *
40
+ * Unless required by applicable law or agreed to in writing, software distributed under
41
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
42
+ * OF ANY KIND, either express or implied. See the License for the specific language
43
+ * governing permissions and limitations under the License.
44
+ */
45
+
46
+
47
+ /*
48
+ * Copyright 202 Adobe. All rights reserved.
49
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
50
+ * you may not use this file except in compliance with the License. You may obtain a copy
51
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
52
+ *
53
+ * Unless required by applicable law or agreed to in writing, software distributed under
54
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
55
+ * OF ANY KIND, either express or implied. See the License for the specific language
56
+ * governing permissions and limitations under the License.
57
+ */
58
+ const $739a883ac33f90d8$export$66136572efa4af6e = (0, $gZOFb$react).createContext(null);
59
+
60
+
61
+ /*
62
+ * Copyright 2023 Adobe. All rights reserved.
63
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
64
+ * you may not use this file except in compliance with the License. You may obtain a copy
65
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
66
+ *
67
+ * Unless required by applicable law or agreed to in writing, software distributed under
68
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
69
+ * OF ANY KIND, either express or implied. See the License for the specific language
70
+ * governing permissions and limitations under the License.
71
+ */
72
+
73
+
74
+ var $08c8c4603e0a825e$exports = {};
75
+ $08c8c4603e0a825e$exports = {
76
+ "completed": `Completed: `,
77
+ "notCompleted": `Not completed: `,
78
+ "current": `Current: `,
79
+ "steplist": `Step List`
80
+ };
81
+
82
+
83
+ var $62132693388ec24a$export$2e2bcd8739ae039 = {
84
+ "en-US": (0, (/*@__PURE__*/$parcel$interopDefault($08c8c4603e0a825e$exports)))
85
+ };
86
+
87
+
88
+
89
+
90
+
91
+ var $b2477f17b7c66618$exports = {};
92
+
93
+ $parcel$export($b2477f17b7c66618$exports, "chevron", () => $b2477f17b7c66618$export$980c1089c0604ea3, (v) => $b2477f17b7c66618$export$980c1089c0604ea3 = v);
94
+ $parcel$export($b2477f17b7c66618$exports, "focus-ring", () => $b2477f17b7c66618$export$f39a09f249340e2a, (v) => $b2477f17b7c66618$export$f39a09f249340e2a = v);
95
+ $parcel$export($b2477f17b7c66618$exports, "i18nFontFamily", () => $b2477f17b7c66618$export$8c4ee2c50c22c514, (v) => $b2477f17b7c66618$export$8c4ee2c50c22c514 = v);
96
+ $parcel$export($b2477f17b7c66618$exports, "is-completed", () => $b2477f17b7c66618$export$7e62df9ca2e410e4, (v) => $b2477f17b7c66618$export$7e62df9ca2e410e4 = v);
97
+ $parcel$export($b2477f17b7c66618$exports, "is-disabled", () => $b2477f17b7c66618$export$d35bc1e505d1ebbf, (v) => $b2477f17b7c66618$export$d35bc1e505d1ebbf = v);
98
+ $parcel$export($b2477f17b7c66618$exports, "is-emphasized", () => $b2477f17b7c66618$export$ad416fbde92db390, (v) => $b2477f17b7c66618$export$ad416fbde92db390 = v);
99
+ $parcel$export($b2477f17b7c66618$exports, "is-hovered", () => $b2477f17b7c66618$export$b8813cd5d7824ce7, (v) => $b2477f17b7c66618$export$b8813cd5d7824ce7 = v);
100
+ $parcel$export($b2477f17b7c66618$exports, "is-reversed", () => $b2477f17b7c66618$export$a4561bd665abb5db, (v) => $b2477f17b7c66618$export$a4561bd665abb5db = v);
101
+ $parcel$export($b2477f17b7c66618$exports, "is-selected", () => $b2477f17b7c66618$export$1e0fb04f31d3c22a, (v) => $b2477f17b7c66618$export$1e0fb04f31d3c22a = v);
102
+ $parcel$export($b2477f17b7c66618$exports, "label", () => $b2477f17b7c66618$export$1237798dc640739a, (v) => $b2477f17b7c66618$export$1237798dc640739a = v);
103
+ $parcel$export($b2477f17b7c66618$exports, "line", () => $b2477f17b7c66618$export$53f1d5ea8de3d7c, (v) => $b2477f17b7c66618$export$53f1d5ea8de3d7c = v);
104
+ $parcel$export($b2477f17b7c66618$exports, "link", () => $b2477f17b7c66618$export$9c30223ca0a664fb, (v) => $b2477f17b7c66618$export$9c30223ca0a664fb = v);
105
+ $parcel$export($b2477f17b7c66618$exports, "number", () => $b2477f17b7c66618$export$98e628dec113755e, (v) => $b2477f17b7c66618$export$98e628dec113755e = v);
106
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-FocusRing-ring", () => $b2477f17b7c66618$export$4109102f950813a6, (v) => $b2477f17b7c66618$export$4109102f950813a6 = v);
107
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-FocusRing", () => $b2477f17b7c66618$export$24c7f46a6e3605dd, (v) => $b2477f17b7c66618$export$24c7f46a6e3605dd = v);
108
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-FocusRing--quiet", () => $b2477f17b7c66618$export$2927016961429360, (v) => $b2477f17b7c66618$export$2927016961429360 = v);
109
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist", () => $b2477f17b7c66618$export$35315228197e36b8, (v) => $b2477f17b7c66618$export$35315228197e36b8 = v);
110
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--interactive", () => $b2477f17b7c66618$export$b8611be6978ea2dd, (v) => $b2477f17b7c66618$export$b8611be6978ea2dd = v);
111
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--large", () => $b2477f17b7c66618$export$b0d9d5077004711a, (v) => $b2477f17b7c66618$export$b0d9d5077004711a = v);
112
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--medium", () => $b2477f17b7c66618$export$9666cb7894b7712a, (v) => $b2477f17b7c66618$export$9666cb7894b7712a = v);
113
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--small", () => $b2477f17b7c66618$export$43119eed81e90e13, (v) => $b2477f17b7c66618$export$43119eed81e90e13 = v);
114
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--vertical", () => $b2477f17b7c66618$export$146e7d67031e074f, (v) => $b2477f17b7c66618$export$146e7d67031e074f = v);
115
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--xlarge", () => $b2477f17b7c66618$export$56195e68ddf7db1b, (v) => $b2477f17b7c66618$export$56195e68ddf7db1b = v);
116
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-chevron", () => $b2477f17b7c66618$export$e0b9c44558d2fb75, (v) => $b2477f17b7c66618$export$e0b9c44558d2fb75 = v);
117
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-item", () => $b2477f17b7c66618$export$df6f1d30f09c136e, (v) => $b2477f17b7c66618$export$df6f1d30f09c136e = v);
118
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-label", () => $b2477f17b7c66618$export$2393468f68ff8031, (v) => $b2477f17b7c66618$export$2393468f68ff8031 = v);
119
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-link", () => $b2477f17b7c66618$export$f622f4b07b665af3, (v) => $b2477f17b7c66618$export$f622f4b07b665af3 = v);
120
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-marker", () => $b2477f17b7c66618$export$9d44d123fa093f85, (v) => $b2477f17b7c66618$export$9d44d123fa093f85 = v);
121
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-segment", () => $b2477f17b7c66618$export$1f36a6b1ab318f2f, (v) => $b2477f17b7c66618$export$1f36a6b1ab318f2f = v);
122
+ var $b2477f17b7c66618$export$980c1089c0604ea3;
123
+ var $b2477f17b7c66618$export$f39a09f249340e2a;
124
+ var $b2477f17b7c66618$export$8c4ee2c50c22c514;
125
+ var $b2477f17b7c66618$export$7e62df9ca2e410e4;
126
+ var $b2477f17b7c66618$export$d35bc1e505d1ebbf;
127
+ var $b2477f17b7c66618$export$ad416fbde92db390;
128
+ var $b2477f17b7c66618$export$b8813cd5d7824ce7;
129
+ var $b2477f17b7c66618$export$a4561bd665abb5db;
130
+ var $b2477f17b7c66618$export$1e0fb04f31d3c22a;
131
+ var $b2477f17b7c66618$export$1237798dc640739a;
132
+ var $b2477f17b7c66618$export$53f1d5ea8de3d7c;
133
+ var $b2477f17b7c66618$export$9c30223ca0a664fb;
134
+ var $b2477f17b7c66618$export$98e628dec113755e;
135
+ var $b2477f17b7c66618$export$4109102f950813a6;
136
+ var $b2477f17b7c66618$export$24c7f46a6e3605dd;
137
+ var $b2477f17b7c66618$export$2927016961429360;
138
+ var $b2477f17b7c66618$export$35315228197e36b8;
139
+ var $b2477f17b7c66618$export$b8611be6978ea2dd;
140
+ var $b2477f17b7c66618$export$b0d9d5077004711a;
141
+ var $b2477f17b7c66618$export$9666cb7894b7712a;
142
+ var $b2477f17b7c66618$export$43119eed81e90e13;
143
+ var $b2477f17b7c66618$export$146e7d67031e074f;
144
+ var $b2477f17b7c66618$export$56195e68ddf7db1b;
145
+ var $b2477f17b7c66618$export$e0b9c44558d2fb75;
146
+ var $b2477f17b7c66618$export$df6f1d30f09c136e;
147
+ var $b2477f17b7c66618$export$2393468f68ff8031;
148
+ var $b2477f17b7c66618$export$f622f4b07b665af3;
149
+ var $b2477f17b7c66618$export$9d44d123fa093f85;
150
+ var $b2477f17b7c66618$export$1f36a6b1ab318f2f;
151
+ $b2477f17b7c66618$export$980c1089c0604ea3 = `Y9ExmG_chevron`;
152
+ $b2477f17b7c66618$export$f39a09f249340e2a = `Y9ExmG_focus-ring`;
153
+ $b2477f17b7c66618$export$8c4ee2c50c22c514 = `Y9ExmG_i18nFontFamily`;
154
+ $b2477f17b7c66618$export$7e62df9ca2e410e4 = `Y9ExmG_is-completed`;
155
+ $b2477f17b7c66618$export$d35bc1e505d1ebbf = `Y9ExmG_is-disabled`;
156
+ $b2477f17b7c66618$export$ad416fbde92db390 = `Y9ExmG_is-emphasized`;
157
+ $b2477f17b7c66618$export$b8813cd5d7824ce7 = `Y9ExmG_is-hovered`;
158
+ $b2477f17b7c66618$export$a4561bd665abb5db = `Y9ExmG_is-reversed`;
159
+ $b2477f17b7c66618$export$1e0fb04f31d3c22a = `Y9ExmG_is-selected`;
160
+ $b2477f17b7c66618$export$1237798dc640739a = `Y9ExmG_label`;
161
+ $b2477f17b7c66618$export$53f1d5ea8de3d7c = `Y9ExmG_line`;
162
+ $b2477f17b7c66618$export$9c30223ca0a664fb = `Y9ExmG_link`;
163
+ $b2477f17b7c66618$export$98e628dec113755e = `Y9ExmG_number`;
164
+ $b2477f17b7c66618$export$4109102f950813a6 = `Y9ExmG_spectrum-FocusRing-ring`;
165
+ $b2477f17b7c66618$export$24c7f46a6e3605dd = `Y9ExmG_spectrum-FocusRing ${$b2477f17b7c66618$export$4109102f950813a6}`;
166
+ $b2477f17b7c66618$export$2927016961429360 = `Y9ExmG_spectrum-FocusRing--quiet`;
167
+ $b2477f17b7c66618$export$35315228197e36b8 = `Y9ExmG_spectrum-Steplist`;
168
+ $b2477f17b7c66618$export$b8611be6978ea2dd = `Y9ExmG_spectrum-Steplist--interactive`;
169
+ $b2477f17b7c66618$export$b0d9d5077004711a = `Y9ExmG_spectrum-Steplist--large`;
170
+ $b2477f17b7c66618$export$9666cb7894b7712a = `Y9ExmG_spectrum-Steplist--medium`;
171
+ $b2477f17b7c66618$export$43119eed81e90e13 = `Y9ExmG_spectrum-Steplist--small`;
172
+ $b2477f17b7c66618$export$146e7d67031e074f = `Y9ExmG_spectrum-Steplist--vertical`;
173
+ $b2477f17b7c66618$export$56195e68ddf7db1b = `Y9ExmG_spectrum-Steplist--xlarge`;
174
+ $b2477f17b7c66618$export$e0b9c44558d2fb75 = `Y9ExmG_spectrum-Steplist-chevron`;
175
+ $b2477f17b7c66618$export$df6f1d30f09c136e = `Y9ExmG_spectrum-Steplist-item`;
176
+ $b2477f17b7c66618$export$2393468f68ff8031 = `Y9ExmG_spectrum-Steplist-label`;
177
+ $b2477f17b7c66618$export$f622f4b07b665af3 = `Y9ExmG_spectrum-Steplist-link`;
178
+ $b2477f17b7c66618$export$9d44d123fa093f85 = `Y9ExmG_spectrum-Steplist-marker`;
179
+ $b2477f17b7c66618$export$1f36a6b1ab318f2f = `Y9ExmG_spectrum-Steplist-segment`;
180
+
181
+
182
+
183
+
184
+
185
+
186
+ function $24c3cb1adfb0acc5$export$87c2a8a94eda1754(props) {
187
+ let { isDisabled: isDisabled, isEmphasized: isEmphasized, item: item } = props;
188
+ let { key: key } = item;
189
+ let ref = (0, $gZOFb$useRef)();
190
+ let { direction: direction } = (0, $gZOFb$useLocale)();
191
+ let state = (0, $gZOFb$useContext)((0, $739a883ac33f90d8$export$66136572efa4af6e));
192
+ const isCompleted = state.isCompleted(key);
193
+ const isItemDisabled = isDisabled || state.disabledKeys.has(key);
194
+ let { stepProps: stepProps, stepStateProps: stepStateProps } = (0, $gZOFb$useStepListItem)({
195
+ ...props,
196
+ key: key
197
+ }, state, ref);
198
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $gZOFb$useHover)(props);
199
+ const isSelected = state.selectedKey === key;
200
+ let stepStateText = "";
201
+ const stringFormatter = (0, $gZOFb$useLocalizedStringFormatter)((0, $62132693388ec24a$export$2e2bcd8739ae039));
202
+ const numberFormatter = (0, $gZOFb$useNumberFormatter)();
203
+ if (isSelected) stepStateText = stringFormatter.format("current");
204
+ else if (isCompleted) stepStateText = stringFormatter.format("completed");
205
+ else stepStateText = stringFormatter.format("notCompleted");
206
+ return /*#__PURE__*/ (0, $gZOFb$react).createElement("li", {
207
+ key: key,
208
+ className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-item")
209
+ }, /*#__PURE__*/ (0, $gZOFb$react).createElement((0, $gZOFb$FocusRing), {
210
+ within: true,
211
+ focusRingClass: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "focus-ring")
212
+ }, /*#__PURE__*/ (0, $gZOFb$react).createElement("a", {
213
+ "aria-labelledby": `step-marker-${key} step-label-${key}`,
214
+ ref: ref,
215
+ ...(0, $gZOFb$mergeProps)(hoverProps, stepProps),
216
+ className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-link", {
217
+ "is-selected": isSelected && !isItemDisabled,
218
+ "is-disabled": isItemDisabled,
219
+ "is-hovered": isHovered,
220
+ "is-emphasized": isEmphasized && isSelected,
221
+ "is-completed": isCompleted
222
+ })
223
+ }, /*#__PURE__*/ (0, $gZOFb$react).createElement((0, $gZOFb$VisuallyHidden), stepStateProps, stepStateText), /*#__PURE__*/ (0, $gZOFb$react).createElement("span", {
224
+ id: `step-marker-${key}`,
225
+ "aria-hidden": "true",
226
+ className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-marker")
227
+ }, numberFormatter.format((item.index || 0) + 1)), /*#__PURE__*/ (0, $gZOFb$react).createElement("span", {
228
+ id: `step-label-${key}`,
229
+ "aria-hidden": "true",
230
+ className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-label")
231
+ }, item.rendered))), /*#__PURE__*/ (0, $gZOFb$react).createElement("span", {
232
+ className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-segment", {
233
+ "is-completed": isCompleted
234
+ })
235
+ }, /*#__PURE__*/ (0, $gZOFb$react).createElement((0, $gZOFb$spectrumiconsuiChevronRightMedium), {
236
+ UNSAFE_className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-chevron", {
237
+ "is-reversed": direction === "rtl"
238
+ })
239
+ })));
240
+ }
241
+
242
+
243
+
244
+
245
+
246
+ function $6bd0589d5d2f8b66$var$StepList(props, ref) {
247
+ const { size: size = "M", orientation: orientation = "horizontal" } = props;
248
+ props = (0, $gZOFb$useProviderProps)(props);
249
+ let { styleProps: styleProps } = (0, $gZOFb$useStyleProps)(props);
250
+ let domRef = (0, $gZOFb$useDOMRef)(ref);
251
+ let state = (0, $gZOFb$useStepListState)(props);
252
+ let { listProps: listProps } = (0, $gZOFb$useStepList)(props, state, domRef);
253
+ const { isDisabled: isDisabled, isEmphasized: isEmphasized, isReadOnly: isReadOnly } = props;
254
+ return /*#__PURE__*/ (0, $gZOFb$react).createElement("ol", {
255
+ ...listProps,
256
+ ...styleProps,
257
+ ref: domRef,
258
+ className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist", styleProps.className, {
259
+ "spectrum-Steplist--interactive": !isReadOnly && !isDisabled,
260
+ "spectrum-Steplist--small": size === "S",
261
+ "spectrum-Steplist--medium": size === "M",
262
+ "spectrum-Steplist--large": size === "L",
263
+ "spectrum-Steplist--xlarge": size === "XL",
264
+ "spectrum-Steplist--vertical": orientation === "vertical"
265
+ })
266
+ }, /*#__PURE__*/ (0, $gZOFb$react).createElement((0, $739a883ac33f90d8$export$66136572efa4af6e).Provider, {
267
+ value: state
268
+ }, [
269
+ ...state.collection
270
+ ].map((item)=>/*#__PURE__*/ (0, $gZOFb$react).createElement((0, $24c3cb1adfb0acc5$export$87c2a8a94eda1754), {
271
+ key: item.key,
272
+ isDisabled: isDisabled,
273
+ isEmphasized: isEmphasized,
274
+ isReadOnly: isReadOnly,
275
+ item: item
276
+ }))));
277
+ }
278
+ const $6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 = /*#__PURE__*/ (0, $gZOFb$react).forwardRef($6bd0589d5d2f8b66$var$StepList);
279
+
280
+
281
+
282
+
283
+
284
+ export {$6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 as StepList, $6f77c10bf951cb4f$re_export$Item as Item};
285
+ //# sourceMappingURL=module.js.map