@react-spectrum/steplist 3.0.0-alpha.0 → 3.0.0-alpha.1

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 CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  require("./main.css");
2
4
  var $5XIpf$reactstatelycollections = require("@react-stately/collections");
3
5
  var $5XIpf$reactariasteplist = require("@react-aria/steplist");
@@ -93,24 +95,22 @@ var $fed92386245d94a4$export$2e2bcd8739ae039 = {
93
95
 
94
96
  var $390add5aac6e4d73$exports = {};
95
97
 
96
- $parcel$export($390add5aac6e4d73$exports, "chevron", () => $390add5aac6e4d73$export$980c1089c0604ea3, (v) => $390add5aac6e4d73$export$980c1089c0604ea3 = v);
97
98
  $parcel$export($390add5aac6e4d73$exports, "focus-ring", () => $390add5aac6e4d73$export$f39a09f249340e2a, (v) => $390add5aac6e4d73$export$f39a09f249340e2a = v);
98
99
  $parcel$export($390add5aac6e4d73$exports, "i18nFontFamily", () => $390add5aac6e4d73$export$8c4ee2c50c22c514, (v) => $390add5aac6e4d73$export$8c4ee2c50c22c514 = v);
99
100
  $parcel$export($390add5aac6e4d73$exports, "is-completed", () => $390add5aac6e4d73$export$7e62df9ca2e410e4, (v) => $390add5aac6e4d73$export$7e62df9ca2e410e4 = v);
100
101
  $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
102
  $parcel$export($390add5aac6e4d73$exports, "is-hovered", () => $390add5aac6e4d73$export$b8813cd5d7824ce7, (v) => $390add5aac6e4d73$export$b8813cd5d7824ce7 = v);
103
103
  $parcel$export($390add5aac6e4d73$exports, "is-reversed", () => $390add5aac6e4d73$export$a4561bd665abb5db, (v) => $390add5aac6e4d73$export$a4561bd665abb5db = v);
104
104
  $parcel$export($390add5aac6e4d73$exports, "is-selected", () => $390add5aac6e4d73$export$1e0fb04f31d3c22a, (v) => $390add5aac6e4d73$export$1e0fb04f31d3c22a = v);
105
105
  $parcel$export($390add5aac6e4d73$exports, "label", () => $390add5aac6e4d73$export$1237798dc640739a, (v) => $390add5aac6e4d73$export$1237798dc640739a = v);
106
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);
107
+ $parcel$export($390add5aac6e4d73$exports, "marker", () => $390add5aac6e4d73$export$ffc4d0086f1a4c9, (v) => $390add5aac6e4d73$export$ffc4d0086f1a4c9 = v);
109
108
  $parcel$export($390add5aac6e4d73$exports, "spectrum-FocusRing-ring", () => $390add5aac6e4d73$export$4109102f950813a6, (v) => $390add5aac6e4d73$export$4109102f950813a6 = v);
110
109
  $parcel$export($390add5aac6e4d73$exports, "spectrum-FocusRing", () => $390add5aac6e4d73$export$24c7f46a6e3605dd, (v) => $390add5aac6e4d73$export$24c7f46a6e3605dd = v);
111
110
  $parcel$export($390add5aac6e4d73$exports, "spectrum-FocusRing--quiet", () => $390add5aac6e4d73$export$2927016961429360, (v) => $390add5aac6e4d73$export$2927016961429360 = v);
112
111
  $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);
112
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--emphasized", () => $390add5aac6e4d73$export$d2cf12460a777241, (v) => $390add5aac6e4d73$export$d2cf12460a777241 = v);
113
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--horizontal", () => $390add5aac6e4d73$export$6f0c4d0e9f29399d, (v) => $390add5aac6e4d73$export$6f0c4d0e9f29399d = v);
114
114
  $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--large", () => $390add5aac6e4d73$export$b0d9d5077004711a, (v) => $390add5aac6e4d73$export$b0d9d5077004711a = v);
115
115
  $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--medium", () => $390add5aac6e4d73$export$9666cb7894b7712a, (v) => $390add5aac6e4d73$export$9666cb7894b7712a = v);
116
116
  $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist--small", () => $390add5aac6e4d73$export$43119eed81e90e13, (v) => $390add5aac6e4d73$export$43119eed81e90e13 = v);
@@ -121,25 +121,25 @@ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-item", () => $390ad
121
121
  $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-label", () => $390add5aac6e4d73$export$2393468f68ff8031, (v) => $390add5aac6e4d73$export$2393468f68ff8031 = v);
122
122
  $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-link", () => $390add5aac6e4d73$export$f622f4b07b665af3, (v) => $390add5aac6e4d73$export$f622f4b07b665af3 = v);
123
123
  $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-marker", () => $390add5aac6e4d73$export$9d44d123fa093f85, (v) => $390add5aac6e4d73$export$9d44d123fa093f85 = v);
124
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-markerWrapper", () => $390add5aac6e4d73$export$a7d0643524891b06, (v) => $390add5aac6e4d73$export$a7d0643524891b06 = v);
124
125
  $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-segment", () => $390add5aac6e4d73$export$1f36a6b1ab318f2f, (v) => $390add5aac6e4d73$export$1f36a6b1ab318f2f = v);
125
- var $390add5aac6e4d73$export$980c1089c0604ea3;
126
+ $parcel$export($390add5aac6e4d73$exports, "spectrum-Steplist-segmentLine", () => $390add5aac6e4d73$export$f92a1d2b4a328a95, (v) => $390add5aac6e4d73$export$f92a1d2b4a328a95 = v);
126
127
  var $390add5aac6e4d73$export$f39a09f249340e2a;
127
128
  var $390add5aac6e4d73$export$8c4ee2c50c22c514;
128
129
  var $390add5aac6e4d73$export$7e62df9ca2e410e4;
129
130
  var $390add5aac6e4d73$export$d35bc1e505d1ebbf;
130
- var $390add5aac6e4d73$export$ad416fbde92db390;
131
131
  var $390add5aac6e4d73$export$b8813cd5d7824ce7;
132
132
  var $390add5aac6e4d73$export$a4561bd665abb5db;
133
133
  var $390add5aac6e4d73$export$1e0fb04f31d3c22a;
134
134
  var $390add5aac6e4d73$export$1237798dc640739a;
135
135
  var $390add5aac6e4d73$export$53f1d5ea8de3d7c;
136
- var $390add5aac6e4d73$export$9c30223ca0a664fb;
137
- var $390add5aac6e4d73$export$98e628dec113755e;
136
+ var $390add5aac6e4d73$export$ffc4d0086f1a4c9;
138
137
  var $390add5aac6e4d73$export$4109102f950813a6;
139
138
  var $390add5aac6e4d73$export$24c7f46a6e3605dd;
140
139
  var $390add5aac6e4d73$export$2927016961429360;
141
140
  var $390add5aac6e4d73$export$35315228197e36b8;
142
- var $390add5aac6e4d73$export$b8611be6978ea2dd;
141
+ var $390add5aac6e4d73$export$d2cf12460a777241;
142
+ var $390add5aac6e4d73$export$6f0c4d0e9f29399d;
143
143
  var $390add5aac6e4d73$export$b0d9d5077004711a;
144
144
  var $390add5aac6e4d73$export$9666cb7894b7712a;
145
145
  var $390add5aac6e4d73$export$43119eed81e90e13;
@@ -150,25 +150,25 @@ var $390add5aac6e4d73$export$df6f1d30f09c136e;
150
150
  var $390add5aac6e4d73$export$2393468f68ff8031;
151
151
  var $390add5aac6e4d73$export$f622f4b07b665af3;
152
152
  var $390add5aac6e4d73$export$9d44d123fa093f85;
153
+ var $390add5aac6e4d73$export$a7d0643524891b06;
153
154
  var $390add5aac6e4d73$export$1f36a6b1ab318f2f;
154
- $390add5aac6e4d73$export$980c1089c0604ea3 = `Y9ExmG_chevron`;
155
+ var $390add5aac6e4d73$export$f92a1d2b4a328a95;
155
156
  $390add5aac6e4d73$export$f39a09f249340e2a = `Y9ExmG_focus-ring`;
156
157
  $390add5aac6e4d73$export$8c4ee2c50c22c514 = `Y9ExmG_i18nFontFamily`;
157
158
  $390add5aac6e4d73$export$7e62df9ca2e410e4 = `Y9ExmG_is-completed`;
158
159
  $390add5aac6e4d73$export$d35bc1e505d1ebbf = `Y9ExmG_is-disabled`;
159
- $390add5aac6e4d73$export$ad416fbde92db390 = `Y9ExmG_is-emphasized`;
160
160
  $390add5aac6e4d73$export$b8813cd5d7824ce7 = `Y9ExmG_is-hovered`;
161
161
  $390add5aac6e4d73$export$a4561bd665abb5db = `Y9ExmG_is-reversed`;
162
162
  $390add5aac6e4d73$export$1e0fb04f31d3c22a = `Y9ExmG_is-selected`;
163
163
  $390add5aac6e4d73$export$1237798dc640739a = `Y9ExmG_label`;
164
164
  $390add5aac6e4d73$export$53f1d5ea8de3d7c = `Y9ExmG_line`;
165
- $390add5aac6e4d73$export$9c30223ca0a664fb = `Y9ExmG_link`;
166
- $390add5aac6e4d73$export$98e628dec113755e = `Y9ExmG_number`;
165
+ $390add5aac6e4d73$export$ffc4d0086f1a4c9 = `Y9ExmG_marker`;
167
166
  $390add5aac6e4d73$export$4109102f950813a6 = `Y9ExmG_spectrum-FocusRing-ring`;
168
167
  $390add5aac6e4d73$export$24c7f46a6e3605dd = `Y9ExmG_spectrum-FocusRing ${$390add5aac6e4d73$export$4109102f950813a6}`;
169
168
  $390add5aac6e4d73$export$2927016961429360 = `Y9ExmG_spectrum-FocusRing--quiet`;
170
169
  $390add5aac6e4d73$export$35315228197e36b8 = `Y9ExmG_spectrum-Steplist`;
171
- $390add5aac6e4d73$export$b8611be6978ea2dd = `Y9ExmG_spectrum-Steplist--interactive`;
170
+ $390add5aac6e4d73$export$d2cf12460a777241 = `Y9ExmG_spectrum-Steplist--emphasized`;
171
+ $390add5aac6e4d73$export$6f0c4d0e9f29399d = `Y9ExmG_spectrum-Steplist--horizontal`;
172
172
  $390add5aac6e4d73$export$b0d9d5077004711a = `Y9ExmG_spectrum-Steplist--large`;
173
173
  $390add5aac6e4d73$export$9666cb7894b7712a = `Y9ExmG_spectrum-Steplist--medium`;
174
174
  $390add5aac6e4d73$export$43119eed81e90e13 = `Y9ExmG_spectrum-Steplist--small`;
@@ -179,7 +179,9 @@ $390add5aac6e4d73$export$df6f1d30f09c136e = `Y9ExmG_spectrum-Steplist-item`;
179
179
  $390add5aac6e4d73$export$2393468f68ff8031 = `Y9ExmG_spectrum-Steplist-label`;
180
180
  $390add5aac6e4d73$export$f622f4b07b665af3 = `Y9ExmG_spectrum-Steplist-link`;
181
181
  $390add5aac6e4d73$export$9d44d123fa093f85 = `Y9ExmG_spectrum-Steplist-marker`;
182
+ $390add5aac6e4d73$export$a7d0643524891b06 = `Y9ExmG_spectrum-Steplist-markerWrapper`;
182
183
  $390add5aac6e4d73$export$1f36a6b1ab318f2f = `Y9ExmG_spectrum-Steplist-segment`;
184
+ $390add5aac6e4d73$export$f92a1d2b4a328a95 = `Y9ExmG_spectrum-Steplist-segmentLine`;
183
185
 
184
186
 
185
187
 
@@ -187,59 +189,77 @@ $390add5aac6e4d73$export$1f36a6b1ab318f2f = `Y9ExmG_spectrum-Steplist-segment`;
187
189
 
188
190
 
189
191
  function $d2e2cd0667356b5d$export$87c2a8a94eda1754(props) {
190
- let { isDisabled: isDisabled, isEmphasized: isEmphasized, item: item } = props;
192
+ let { isDisabled: isDisabled, item: item } = props;
191
193
  let { key: key } = item;
192
- let ref = (0, $5XIpf$react.useRef)();
194
+ let ref = (0, $5XIpf$react.useRef)(null);
193
195
  let { direction: direction } = (0, $5XIpf$reactariai18n.useLocale)();
194
196
  let state = (0, $5XIpf$react.useContext)((0, $b9b57d2de2195519$export$66136572efa4af6e));
197
+ const isSelected = state.selectedKey === key;
195
198
  const isCompleted = state.isCompleted(key);
196
199
  const isItemDisabled = isDisabled || state.disabledKeys.has(key);
197
200
  let { stepProps: stepProps, stepStateProps: stepStateProps } = (0, $5XIpf$reactariasteplist.useStepListItem)({
198
201
  ...props,
199
202
  key: key
200
203
  }, state, ref);
201
- let { hoverProps: hoverProps, isHovered: isHovered } = (0, $5XIpf$reactariainteractions.useHover)(props);
202
- const isSelected = state.selectedKey === key;
204
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $5XIpf$reactariainteractions.useHover)({
205
+ ...props,
206
+ isDisabled: isItemDisabled || isSelected || props.isReadOnly
207
+ });
203
208
  let stepStateText = "";
204
- const stringFormatter = (0, $5XIpf$reactariai18n.useLocalizedStringFormatter)((0, $fed92386245d94a4$export$2e2bcd8739ae039));
209
+ const stringFormatter = (0, $5XIpf$reactariai18n.useLocalizedStringFormatter)((0, $fed92386245d94a4$export$2e2bcd8739ae039), "@react-spectrum/steplist");
205
210
  const numberFormatter = (0, $5XIpf$reactariai18n.useNumberFormatter)();
206
211
  if (isSelected) stepStateText = stringFormatter.format("current");
207
212
  else if (isCompleted) stepStateText = stringFormatter.format("completed");
208
213
  else stepStateText = stringFormatter.format("notCompleted");
214
+ let markerId = (0, $5XIpf$reactariautils.useId)();
215
+ let labelId = (0, $5XIpf$reactariautils.useId)();
209
216
  return /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("li", {
210
- key: key,
211
217
  className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-item")
212
218
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, $5XIpf$reactariafocus.FocusRing), {
213
219
  within: true,
214
220
  focusRingClass: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "focus-ring")
215
221
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("a", {
216
- "aria-labelledby": `step-marker-${key} step-label-${key}`,
217
- ref: ref,
218
222
  ...(0, $5XIpf$reactariautils.mergeProps)(hoverProps, stepProps),
223
+ "aria-labelledby": `${markerId} ${labelId}`,
224
+ ref: ref,
219
225
  className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-link", {
220
226
  "is-selected": isSelected && !isItemDisabled,
221
227
  "is-disabled": isItemDisabled,
222
228
  "is-hovered": isHovered,
223
- "is-emphasized": isEmphasized && isSelected,
224
- "is-completed": isCompleted
229
+ "is-completed": isCompleted,
230
+ "is-selectable": state.isSelectable(key) && !isSelected
225
231
  })
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
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, $5XIpf$reactariavisuallyhidden.VisuallyHidden), stepStateProps, stepStateText), /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("div", {
233
+ id: labelId,
232
234
  "aria-hidden": "true",
233
235
  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", {
236
+ }, item.rendered), /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("div", {
235
237
  className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-segment", {
236
238
  "is-completed": isCompleted
237
239
  })
238
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, ($parcel$interopDefault($5XIpf$spectrumiconsuiChevronRightMedium))), {
240
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("svg", {
241
+ className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-segmentLine"),
242
+ xmlns: "http://www.w3.org/2000/svg",
243
+ height: "100%",
244
+ viewBox: "0 0 2 8",
245
+ preserveAspectRatio: "none"
246
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("line", {
247
+ x1: "1",
248
+ y1: "0",
249
+ x2: "1",
250
+ y2: "8",
251
+ vectorEffect: "non-scaling-stroke"
252
+ })), /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, ($parcel$interopDefault($5XIpf$spectrumiconsuiChevronRightMedium))), {
239
253
  UNSAFE_className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-chevron", {
240
254
  "is-reversed": direction === "rtl"
241
255
  })
242
- })));
256
+ })), /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("div", {
257
+ "aria-hidden": "true",
258
+ className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-markerWrapper")
259
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("div", {
260
+ id: markerId,
261
+ className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-marker")
262
+ }, numberFormatter.format((item.index || 0) + 1))))));
243
263
  }
244
264
 
245
265
 
@@ -249,21 +269,22 @@ function $d2e2cd0667356b5d$export$87c2a8a94eda1754(props) {
249
269
  function $a64198f1506264d6$var$StepList(props, ref) {
250
270
  const { size: size = "M", orientation: orientation = "horizontal" } = props;
251
271
  props = (0, $5XIpf$reactspectrumprovider.useProviderProps)(props);
272
+ const { isDisabled: isDisabled, isEmphasized: isEmphasized } = props;
252
273
  let { styleProps: styleProps } = (0, $5XIpf$reactspectrumutils.useStyleProps)(props);
253
274
  let domRef = (0, $5XIpf$reactspectrumutils.useDOMRef)(ref);
254
275
  let state = (0, $5XIpf$reactstatelysteplist.useStepListState)(props);
255
276
  let { listProps: listProps } = (0, $5XIpf$reactariasteplist.useStepList)(props, state, domRef);
256
- const { isDisabled: isDisabled, isEmphasized: isEmphasized, isReadOnly: isReadOnly } = props;
257
277
  return /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement("ol", {
258
278
  ...listProps,
259
279
  ...styleProps,
260
280
  ref: domRef,
261
281
  className: (0, $5XIpf$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist", styleProps.className, {
262
- "spectrum-Steplist--interactive": !isReadOnly && !isDisabled,
263
282
  "spectrum-Steplist--small": size === "S",
264
283
  "spectrum-Steplist--medium": size === "M",
265
284
  "spectrum-Steplist--large": size === "L",
266
285
  "spectrum-Steplist--xlarge": size === "XL",
286
+ "spectrum-Steplist--emphasized": isEmphasized,
287
+ "spectrum-Steplist--horizontal": orientation === "horizontal",
267
288
  "spectrum-Steplist--vertical": orientation === "vertical"
268
289
  })
269
290
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, $b9b57d2de2195519$export$66136572efa4af6e).Provider, {
@@ -273,8 +294,6 @@ function $a64198f1506264d6$var$StepList(props, ref) {
273
294
  ].map((item)=>/*#__PURE__*/ (0, ($parcel$interopDefault($5XIpf$react))).createElement((0, $d2e2cd0667356b5d$export$87c2a8a94eda1754), {
274
295
  key: item.key,
275
296
  isDisabled: isDisabled,
276
- isEmphasized: isEmphasized,
277
- isReadOnly: isReadOnly,
278
297
  item: item
279
298
  }))));
280
299
  }
package/dist/main.js.map CHANGED
@@ -1 +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,4CAA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CAAA,GAAA,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"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;;ACVD;;;;;;;;;;CAUC;AAKM,MAAM,4CAAkB,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAgC;;;ACflF;;;;;;;;;;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,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAiC,CAAC,mBAAmB,CAAC;A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,EAAE,OAAO,OAAO;IAG5C,qBACE,0DAAC;QACE,GAAG,SAAS;QACZ,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAK,GAAG,qBAAqB,WAAW,SAAS,EAAE;YACvE,4BAA4B,SAAS;YACrC,6BAA6B,SAAS;YACtC,4BAA4B,SAAS;YACrC,6BAA6B,SAAS;YACtC,iCAAiC;YACjC,iCAAiC,gBAAgB;YACjD,+BAA+B,gBAAgB;QACjD;qBACA,0DAAC,CAAA,GAAA,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,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 const {isDisabled, isEmphasized} = 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\n return (\n <ol\n {...listProps}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Steplist', styleProps.className, {\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--emphasized': isEmphasized,\n 'spectrum-Steplist--horizontal': orientation === 'horizontal',\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 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>(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, useId} 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 item\n } = props;\n let {key} = item;\n\n let ref = useRef(null);\n let {direction} = useLocale();\n let state = useContext(StepListContext)!;\n const isSelected = state.selectedKey === key;\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, isDisabled: isItemDisabled || isSelected || props.isReadOnly});\n\n\n let stepStateText = '';\n const stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/steplist');\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 let markerId = useId();\n let labelId = useId();\n\n return (\n <li\n className={\n classNames(\n styles,\n 'spectrum-Steplist-item'\n )\n }>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <a\n {...mergeProps(hoverProps, stepProps)}\n aria-labelledby={`${markerId} ${labelId}`}\n ref={ref}\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-completed': isCompleted,\n 'is-selectable': state.isSelectable(key) && !isSelected\n }\n )}>\n <VisuallyHidden {...stepStateProps}>{stepStateText}</VisuallyHidden>\n <div id={labelId} aria-hidden=\"true\" className={classNames(styles, 'spectrum-Steplist-label')}>\n {item.rendered}\n </div>\n <div\n className={classNames(\n styles,\n 'spectrum-Steplist-segment', {\n 'is-completed': isCompleted\n })} >\n <svg className={classNames(styles, 'spectrum-Steplist-segmentLine')} xmlns=\"http://www.w3.org/2000/svg\" height=\"100%\" viewBox=\"0 0 2 8\" preserveAspectRatio=\"none\">\n <line x1=\"1\" y1=\"0\" x2=\"1\" y2=\"8\" vectorEffect=\"non-scaling-stroke\" />\n </svg>\n <ChevronRightMedium\n UNSAFE_className={classNames(styles, 'spectrum-Steplist-chevron', {\n 'is-reversed': direction === 'rtl'\n })} />\n </div>\n <div aria-hidden=\"true\" className={classNames(styles, 'spectrum-Steplist-markerWrapper')}>\n <div id={markerId} className={classNames(styles, 'spectrum-Steplist-marker')}>{numberFormatter.format((item.index || 0) + 1)}</div>\n </div>\n </a>\n </FocusRing>\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 CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import "./main.css";
2
4
  import {Item as $6f77c10bf951cb4f$re_export$Item} from "@react-stately/collections";
3
5
  import {useStepList as $gZOFb$useStepList, useStepListItem as $gZOFb$useStepListItem} from "@react-aria/steplist";
@@ -7,7 +9,7 @@ import {useProviderProps as $gZOFb$useProviderProps} from "@react-spectrum/provi
7
9
  import {useStepListState as $gZOFb$useStepListState} from "@react-stately/steplist";
8
10
  import $gZOFb$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
9
11
  import {FocusRing as $gZOFb$FocusRing} from "@react-aria/focus";
10
- import {mergeProps as $gZOFb$mergeProps} from "@react-aria/utils";
12
+ import {useId as $gZOFb$useId, mergeProps as $gZOFb$mergeProps} from "@react-aria/utils";
11
13
  import {useHover as $gZOFb$useHover} from "@react-aria/interactions";
12
14
  import {useLocale as $gZOFb$useLocale, useLocalizedStringFormatter as $gZOFb$useLocalizedStringFormatter, useNumberFormatter as $gZOFb$useNumberFormatter} from "@react-aria/i18n";
13
15
  import {VisuallyHidden as $gZOFb$VisuallyHidden} from "@react-aria/visually-hidden";
@@ -90,24 +92,22 @@ var $62132693388ec24a$export$2e2bcd8739ae039 = {
90
92
 
91
93
  var $b2477f17b7c66618$exports = {};
92
94
 
93
- $parcel$export($b2477f17b7c66618$exports, "chevron", () => $b2477f17b7c66618$export$980c1089c0604ea3, (v) => $b2477f17b7c66618$export$980c1089c0604ea3 = v);
94
95
  $parcel$export($b2477f17b7c66618$exports, "focus-ring", () => $b2477f17b7c66618$export$f39a09f249340e2a, (v) => $b2477f17b7c66618$export$f39a09f249340e2a = v);
95
96
  $parcel$export($b2477f17b7c66618$exports, "i18nFontFamily", () => $b2477f17b7c66618$export$8c4ee2c50c22c514, (v) => $b2477f17b7c66618$export$8c4ee2c50c22c514 = v);
96
97
  $parcel$export($b2477f17b7c66618$exports, "is-completed", () => $b2477f17b7c66618$export$7e62df9ca2e410e4, (v) => $b2477f17b7c66618$export$7e62df9ca2e410e4 = v);
97
98
  $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
99
  $parcel$export($b2477f17b7c66618$exports, "is-hovered", () => $b2477f17b7c66618$export$b8813cd5d7824ce7, (v) => $b2477f17b7c66618$export$b8813cd5d7824ce7 = v);
100
100
  $parcel$export($b2477f17b7c66618$exports, "is-reversed", () => $b2477f17b7c66618$export$a4561bd665abb5db, (v) => $b2477f17b7c66618$export$a4561bd665abb5db = v);
101
101
  $parcel$export($b2477f17b7c66618$exports, "is-selected", () => $b2477f17b7c66618$export$1e0fb04f31d3c22a, (v) => $b2477f17b7c66618$export$1e0fb04f31d3c22a = v);
102
102
  $parcel$export($b2477f17b7c66618$exports, "label", () => $b2477f17b7c66618$export$1237798dc640739a, (v) => $b2477f17b7c66618$export$1237798dc640739a = v);
103
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);
104
+ $parcel$export($b2477f17b7c66618$exports, "marker", () => $b2477f17b7c66618$export$ffc4d0086f1a4c9, (v) => $b2477f17b7c66618$export$ffc4d0086f1a4c9 = v);
106
105
  $parcel$export($b2477f17b7c66618$exports, "spectrum-FocusRing-ring", () => $b2477f17b7c66618$export$4109102f950813a6, (v) => $b2477f17b7c66618$export$4109102f950813a6 = v);
107
106
  $parcel$export($b2477f17b7c66618$exports, "spectrum-FocusRing", () => $b2477f17b7c66618$export$24c7f46a6e3605dd, (v) => $b2477f17b7c66618$export$24c7f46a6e3605dd = v);
108
107
  $parcel$export($b2477f17b7c66618$exports, "spectrum-FocusRing--quiet", () => $b2477f17b7c66618$export$2927016961429360, (v) => $b2477f17b7c66618$export$2927016961429360 = v);
109
108
  $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);
109
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--emphasized", () => $b2477f17b7c66618$export$d2cf12460a777241, (v) => $b2477f17b7c66618$export$d2cf12460a777241 = v);
110
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--horizontal", () => $b2477f17b7c66618$export$6f0c4d0e9f29399d, (v) => $b2477f17b7c66618$export$6f0c4d0e9f29399d = v);
111
111
  $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--large", () => $b2477f17b7c66618$export$b0d9d5077004711a, (v) => $b2477f17b7c66618$export$b0d9d5077004711a = v);
112
112
  $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--medium", () => $b2477f17b7c66618$export$9666cb7894b7712a, (v) => $b2477f17b7c66618$export$9666cb7894b7712a = v);
113
113
  $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist--small", () => $b2477f17b7c66618$export$43119eed81e90e13, (v) => $b2477f17b7c66618$export$43119eed81e90e13 = v);
@@ -118,25 +118,25 @@ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-item", () => $b2477
118
118
  $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-label", () => $b2477f17b7c66618$export$2393468f68ff8031, (v) => $b2477f17b7c66618$export$2393468f68ff8031 = v);
119
119
  $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-link", () => $b2477f17b7c66618$export$f622f4b07b665af3, (v) => $b2477f17b7c66618$export$f622f4b07b665af3 = v);
120
120
  $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-marker", () => $b2477f17b7c66618$export$9d44d123fa093f85, (v) => $b2477f17b7c66618$export$9d44d123fa093f85 = v);
121
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-markerWrapper", () => $b2477f17b7c66618$export$a7d0643524891b06, (v) => $b2477f17b7c66618$export$a7d0643524891b06 = v);
121
122
  $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-segment", () => $b2477f17b7c66618$export$1f36a6b1ab318f2f, (v) => $b2477f17b7c66618$export$1f36a6b1ab318f2f = v);
122
- var $b2477f17b7c66618$export$980c1089c0604ea3;
123
+ $parcel$export($b2477f17b7c66618$exports, "spectrum-Steplist-segmentLine", () => $b2477f17b7c66618$export$f92a1d2b4a328a95, (v) => $b2477f17b7c66618$export$f92a1d2b4a328a95 = v);
123
124
  var $b2477f17b7c66618$export$f39a09f249340e2a;
124
125
  var $b2477f17b7c66618$export$8c4ee2c50c22c514;
125
126
  var $b2477f17b7c66618$export$7e62df9ca2e410e4;
126
127
  var $b2477f17b7c66618$export$d35bc1e505d1ebbf;
127
- var $b2477f17b7c66618$export$ad416fbde92db390;
128
128
  var $b2477f17b7c66618$export$b8813cd5d7824ce7;
129
129
  var $b2477f17b7c66618$export$a4561bd665abb5db;
130
130
  var $b2477f17b7c66618$export$1e0fb04f31d3c22a;
131
131
  var $b2477f17b7c66618$export$1237798dc640739a;
132
132
  var $b2477f17b7c66618$export$53f1d5ea8de3d7c;
133
- var $b2477f17b7c66618$export$9c30223ca0a664fb;
134
- var $b2477f17b7c66618$export$98e628dec113755e;
133
+ var $b2477f17b7c66618$export$ffc4d0086f1a4c9;
135
134
  var $b2477f17b7c66618$export$4109102f950813a6;
136
135
  var $b2477f17b7c66618$export$24c7f46a6e3605dd;
137
136
  var $b2477f17b7c66618$export$2927016961429360;
138
137
  var $b2477f17b7c66618$export$35315228197e36b8;
139
- var $b2477f17b7c66618$export$b8611be6978ea2dd;
138
+ var $b2477f17b7c66618$export$d2cf12460a777241;
139
+ var $b2477f17b7c66618$export$6f0c4d0e9f29399d;
140
140
  var $b2477f17b7c66618$export$b0d9d5077004711a;
141
141
  var $b2477f17b7c66618$export$9666cb7894b7712a;
142
142
  var $b2477f17b7c66618$export$43119eed81e90e13;
@@ -147,25 +147,25 @@ var $b2477f17b7c66618$export$df6f1d30f09c136e;
147
147
  var $b2477f17b7c66618$export$2393468f68ff8031;
148
148
  var $b2477f17b7c66618$export$f622f4b07b665af3;
149
149
  var $b2477f17b7c66618$export$9d44d123fa093f85;
150
+ var $b2477f17b7c66618$export$a7d0643524891b06;
150
151
  var $b2477f17b7c66618$export$1f36a6b1ab318f2f;
151
- $b2477f17b7c66618$export$980c1089c0604ea3 = `Y9ExmG_chevron`;
152
+ var $b2477f17b7c66618$export$f92a1d2b4a328a95;
152
153
  $b2477f17b7c66618$export$f39a09f249340e2a = `Y9ExmG_focus-ring`;
153
154
  $b2477f17b7c66618$export$8c4ee2c50c22c514 = `Y9ExmG_i18nFontFamily`;
154
155
  $b2477f17b7c66618$export$7e62df9ca2e410e4 = `Y9ExmG_is-completed`;
155
156
  $b2477f17b7c66618$export$d35bc1e505d1ebbf = `Y9ExmG_is-disabled`;
156
- $b2477f17b7c66618$export$ad416fbde92db390 = `Y9ExmG_is-emphasized`;
157
157
  $b2477f17b7c66618$export$b8813cd5d7824ce7 = `Y9ExmG_is-hovered`;
158
158
  $b2477f17b7c66618$export$a4561bd665abb5db = `Y9ExmG_is-reversed`;
159
159
  $b2477f17b7c66618$export$1e0fb04f31d3c22a = `Y9ExmG_is-selected`;
160
160
  $b2477f17b7c66618$export$1237798dc640739a = `Y9ExmG_label`;
161
161
  $b2477f17b7c66618$export$53f1d5ea8de3d7c = `Y9ExmG_line`;
162
- $b2477f17b7c66618$export$9c30223ca0a664fb = `Y9ExmG_link`;
163
- $b2477f17b7c66618$export$98e628dec113755e = `Y9ExmG_number`;
162
+ $b2477f17b7c66618$export$ffc4d0086f1a4c9 = `Y9ExmG_marker`;
164
163
  $b2477f17b7c66618$export$4109102f950813a6 = `Y9ExmG_spectrum-FocusRing-ring`;
165
164
  $b2477f17b7c66618$export$24c7f46a6e3605dd = `Y9ExmG_spectrum-FocusRing ${$b2477f17b7c66618$export$4109102f950813a6}`;
166
165
  $b2477f17b7c66618$export$2927016961429360 = `Y9ExmG_spectrum-FocusRing--quiet`;
167
166
  $b2477f17b7c66618$export$35315228197e36b8 = `Y9ExmG_spectrum-Steplist`;
168
- $b2477f17b7c66618$export$b8611be6978ea2dd = `Y9ExmG_spectrum-Steplist--interactive`;
167
+ $b2477f17b7c66618$export$d2cf12460a777241 = `Y9ExmG_spectrum-Steplist--emphasized`;
168
+ $b2477f17b7c66618$export$6f0c4d0e9f29399d = `Y9ExmG_spectrum-Steplist--horizontal`;
169
169
  $b2477f17b7c66618$export$b0d9d5077004711a = `Y9ExmG_spectrum-Steplist--large`;
170
170
  $b2477f17b7c66618$export$9666cb7894b7712a = `Y9ExmG_spectrum-Steplist--medium`;
171
171
  $b2477f17b7c66618$export$43119eed81e90e13 = `Y9ExmG_spectrum-Steplist--small`;
@@ -176,7 +176,9 @@ $b2477f17b7c66618$export$df6f1d30f09c136e = `Y9ExmG_spectrum-Steplist-item`;
176
176
  $b2477f17b7c66618$export$2393468f68ff8031 = `Y9ExmG_spectrum-Steplist-label`;
177
177
  $b2477f17b7c66618$export$f622f4b07b665af3 = `Y9ExmG_spectrum-Steplist-link`;
178
178
  $b2477f17b7c66618$export$9d44d123fa093f85 = `Y9ExmG_spectrum-Steplist-marker`;
179
+ $b2477f17b7c66618$export$a7d0643524891b06 = `Y9ExmG_spectrum-Steplist-markerWrapper`;
179
180
  $b2477f17b7c66618$export$1f36a6b1ab318f2f = `Y9ExmG_spectrum-Steplist-segment`;
181
+ $b2477f17b7c66618$export$f92a1d2b4a328a95 = `Y9ExmG_spectrum-Steplist-segmentLine`;
180
182
 
181
183
 
182
184
 
@@ -184,59 +186,77 @@ $b2477f17b7c66618$export$1f36a6b1ab318f2f = `Y9ExmG_spectrum-Steplist-segment`;
184
186
 
185
187
 
186
188
  function $24c3cb1adfb0acc5$export$87c2a8a94eda1754(props) {
187
- let { isDisabled: isDisabled, isEmphasized: isEmphasized, item: item } = props;
189
+ let { isDisabled: isDisabled, item: item } = props;
188
190
  let { key: key } = item;
189
- let ref = (0, $gZOFb$useRef)();
191
+ let ref = (0, $gZOFb$useRef)(null);
190
192
  let { direction: direction } = (0, $gZOFb$useLocale)();
191
193
  let state = (0, $gZOFb$useContext)((0, $739a883ac33f90d8$export$66136572efa4af6e));
194
+ const isSelected = state.selectedKey === key;
192
195
  const isCompleted = state.isCompleted(key);
193
196
  const isItemDisabled = isDisabled || state.disabledKeys.has(key);
194
197
  let { stepProps: stepProps, stepStateProps: stepStateProps } = (0, $gZOFb$useStepListItem)({
195
198
  ...props,
196
199
  key: key
197
200
  }, state, ref);
198
- let { hoverProps: hoverProps, isHovered: isHovered } = (0, $gZOFb$useHover)(props);
199
- const isSelected = state.selectedKey === key;
201
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $gZOFb$useHover)({
202
+ ...props,
203
+ isDisabled: isItemDisabled || isSelected || props.isReadOnly
204
+ });
200
205
  let stepStateText = "";
201
- const stringFormatter = (0, $gZOFb$useLocalizedStringFormatter)((0, $62132693388ec24a$export$2e2bcd8739ae039));
206
+ const stringFormatter = (0, $gZOFb$useLocalizedStringFormatter)((0, $62132693388ec24a$export$2e2bcd8739ae039), "@react-spectrum/steplist");
202
207
  const numberFormatter = (0, $gZOFb$useNumberFormatter)();
203
208
  if (isSelected) stepStateText = stringFormatter.format("current");
204
209
  else if (isCompleted) stepStateText = stringFormatter.format("completed");
205
210
  else stepStateText = stringFormatter.format("notCompleted");
211
+ let markerId = (0, $gZOFb$useId)();
212
+ let labelId = (0, $gZOFb$useId)();
206
213
  return /*#__PURE__*/ (0, $gZOFb$react).createElement("li", {
207
- key: key,
208
214
  className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-item")
209
215
  }, /*#__PURE__*/ (0, $gZOFb$react).createElement((0, $gZOFb$FocusRing), {
210
216
  within: true,
211
217
  focusRingClass: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "focus-ring")
212
218
  }, /*#__PURE__*/ (0, $gZOFb$react).createElement("a", {
213
- "aria-labelledby": `step-marker-${key} step-label-${key}`,
214
- ref: ref,
215
219
  ...(0, $gZOFb$mergeProps)(hoverProps, stepProps),
220
+ "aria-labelledby": `${markerId} ${labelId}`,
221
+ ref: ref,
216
222
  className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-link", {
217
223
  "is-selected": isSelected && !isItemDisabled,
218
224
  "is-disabled": isItemDisabled,
219
225
  "is-hovered": isHovered,
220
- "is-emphasized": isEmphasized && isSelected,
221
- "is-completed": isCompleted
226
+ "is-completed": isCompleted,
227
+ "is-selectable": state.isSelectable(key) && !isSelected
222
228
  })
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
+ }, /*#__PURE__*/ (0, $gZOFb$react).createElement((0, $gZOFb$VisuallyHidden), stepStateProps, stepStateText), /*#__PURE__*/ (0, $gZOFb$react).createElement("div", {
230
+ id: labelId,
229
231
  "aria-hidden": "true",
230
232
  className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-label")
231
- }, item.rendered))), /*#__PURE__*/ (0, $gZOFb$react).createElement("span", {
233
+ }, item.rendered), /*#__PURE__*/ (0, $gZOFb$react).createElement("div", {
232
234
  className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-segment", {
233
235
  "is-completed": isCompleted
234
236
  })
235
- }, /*#__PURE__*/ (0, $gZOFb$react).createElement((0, $gZOFb$spectrumiconsuiChevronRightMedium), {
237
+ }, /*#__PURE__*/ (0, $gZOFb$react).createElement("svg", {
238
+ className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-segmentLine"),
239
+ xmlns: "http://www.w3.org/2000/svg",
240
+ height: "100%",
241
+ viewBox: "0 0 2 8",
242
+ preserveAspectRatio: "none"
243
+ }, /*#__PURE__*/ (0, $gZOFb$react).createElement("line", {
244
+ x1: "1",
245
+ y1: "0",
246
+ x2: "1",
247
+ y2: "8",
248
+ vectorEffect: "non-scaling-stroke"
249
+ })), /*#__PURE__*/ (0, $gZOFb$react).createElement((0, $gZOFb$spectrumiconsuiChevronRightMedium), {
236
250
  UNSAFE_className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-chevron", {
237
251
  "is-reversed": direction === "rtl"
238
252
  })
239
- })));
253
+ })), /*#__PURE__*/ (0, $gZOFb$react).createElement("div", {
254
+ "aria-hidden": "true",
255
+ className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-markerWrapper")
256
+ }, /*#__PURE__*/ (0, $gZOFb$react).createElement("div", {
257
+ id: markerId,
258
+ className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist-marker")
259
+ }, numberFormatter.format((item.index || 0) + 1))))));
240
260
  }
241
261
 
242
262
 
@@ -246,21 +266,22 @@ function $24c3cb1adfb0acc5$export$87c2a8a94eda1754(props) {
246
266
  function $6bd0589d5d2f8b66$var$StepList(props, ref) {
247
267
  const { size: size = "M", orientation: orientation = "horizontal" } = props;
248
268
  props = (0, $gZOFb$useProviderProps)(props);
269
+ const { isDisabled: isDisabled, isEmphasized: isEmphasized } = props;
249
270
  let { styleProps: styleProps } = (0, $gZOFb$useStyleProps)(props);
250
271
  let domRef = (0, $gZOFb$useDOMRef)(ref);
251
272
  let state = (0, $gZOFb$useStepListState)(props);
252
273
  let { listProps: listProps } = (0, $gZOFb$useStepList)(props, state, domRef);
253
- const { isDisabled: isDisabled, isEmphasized: isEmphasized, isReadOnly: isReadOnly } = props;
254
274
  return /*#__PURE__*/ (0, $gZOFb$react).createElement("ol", {
255
275
  ...listProps,
256
276
  ...styleProps,
257
277
  ref: domRef,
258
278
  className: (0, $gZOFb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($b2477f17b7c66618$exports))), "spectrum-Steplist", styleProps.className, {
259
- "spectrum-Steplist--interactive": !isReadOnly && !isDisabled,
260
279
  "spectrum-Steplist--small": size === "S",
261
280
  "spectrum-Steplist--medium": size === "M",
262
281
  "spectrum-Steplist--large": size === "L",
263
282
  "spectrum-Steplist--xlarge": size === "XL",
283
+ "spectrum-Steplist--emphasized": isEmphasized,
284
+ "spectrum-Steplist--horizontal": orientation === "horizontal",
264
285
  "spectrum-Steplist--vertical": orientation === "vertical"
265
286
  })
266
287
  }, /*#__PURE__*/ (0, $gZOFb$react).createElement((0, $739a883ac33f90d8$export$66136572efa4af6e).Provider, {
@@ -270,8 +291,6 @@ function $6bd0589d5d2f8b66$var$StepList(props, ref) {
270
291
  ].map((item)=>/*#__PURE__*/ (0, $gZOFb$react).createElement((0, $24c3cb1adfb0acc5$export$87c2a8a94eda1754), {
271
292
  key: item.key,
272
293
  isDisabled: isDisabled,
273
- isEmphasized: isEmphasized,
274
- isReadOnly: isReadOnly,
275
294
  item: item
276
295
  }))));
277
296
  }