@react-spectrum/steplist 3.0.0-alpha.23 → 3.0.0-alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.mjs +3 -3
- package/dist/main.js +4 -4
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -3
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +3 -0
- package/package.json +24 -42
- package/src/index.ts +4 -3
- package/dist/StepList.main.js +0 -72
- package/dist/StepList.main.js.map +0 -1
- package/dist/StepList.mjs +0 -67
- package/dist/StepList.module.js +0 -67
- package/dist/StepList.module.js.map +0 -1
- package/dist/StepListContext.main.js +0 -27
- package/dist/StepListContext.main.js.map +0 -1
- package/dist/StepListContext.mjs +0 -18
- package/dist/StepListContext.module.js +0 -18
- package/dist/StepListContext.module.js.map +0 -1
- package/dist/StepListItem.main.js +0 -122
- package/dist/StepListItem.main.js.map +0 -1
- package/dist/StepListItem.mjs +0 -117
- package/dist/StepListItem.module.js +0 -117
- package/dist/StepListItem.module.js.map +0 -1
- package/dist/en-US.main.js +0 -9
- package/dist/en-US.main.js.map +0 -1
- package/dist/en-US.mjs +0 -11
- package/dist/en-US.module.js +0 -11
- package/dist/en-US.module.js.map +0 -1
- package/dist/index.main.js +0 -19
- package/dist/index.main.js.map +0 -1
- package/dist/index.mjs +0 -14
- package/dist/index.module.js +0 -14
- package/dist/index.module.js.map +0 -1
- package/dist/steplist.5b736ed7.css +0 -497
- package/dist/steplist.5b736ed7.css.map +0 -1
- package/dist/steplist_vars_css.main.js +0 -95
- package/dist/steplist_vars_css.main.js.map +0 -1
- package/dist/steplist_vars_css.mjs +0 -97
- package/dist/steplist_vars_css.module.js +0 -97
- package/dist/steplist_vars_css.module.js.map +0 -1
- package/dist/types.d.ts +0 -26
- package/dist/types.d.ts.map +0 -1
- package/src/StepList.tsx +0 -77
- package/src/StepListContext.ts +0 -16
- package/src/StepListItem.tsx +0 -115
package/dist/StepListItem.mjs
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import $62132693388ec24a$export$2e2bcd8739ae039 from "./index.mjs";
|
|
2
|
-
import {StepListContext as $739a883ac33f90d8$export$66136572efa4af6e} from "./StepListContext.mjs";
|
|
3
|
-
import "./steplist.5b736ed7.css";
|
|
4
|
-
import $j1UBu$steplist_vars_cssmodulejs from "./steplist_vars_css.mjs";
|
|
5
|
-
import $j1UBu$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
|
|
6
|
-
import {classNames as $j1UBu$classNames} from "@react-spectrum/utils";
|
|
7
|
-
import {FocusRing as $j1UBu$FocusRing} from "@react-aria/focus";
|
|
8
|
-
import {useId as $j1UBu$useId, mergeProps as $j1UBu$mergeProps} from "@react-aria/utils";
|
|
9
|
-
import $j1UBu$react, {useRef as $j1UBu$useRef, useContext as $j1UBu$useContext} from "react";
|
|
10
|
-
import {useHover as $j1UBu$useHover} from "@react-aria/interactions";
|
|
11
|
-
import {useLocale as $j1UBu$useLocale, useLocalizedStringFormatter as $j1UBu$useLocalizedStringFormatter, useNumberFormatter as $j1UBu$useNumberFormatter} from "@react-aria/i18n";
|
|
12
|
-
import {useStepListItem as $j1UBu$useStepListItem} from "@react-aria/steplist";
|
|
13
|
-
import {VisuallyHidden as $j1UBu$VisuallyHidden} from "@react-aria/visually-hidden";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function $parcel$interopDefault(a) {
|
|
17
|
-
return a && a.__esModule ? a.default : a;
|
|
18
|
-
}
|
|
19
|
-
/*
|
|
20
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
21
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
22
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
23
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
24
|
-
*
|
|
25
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
26
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
27
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
28
|
-
* governing permissions and limitations under the License.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
function $24c3cb1adfb0acc5$export$87c2a8a94eda1754(props) {
|
|
42
|
-
let { isDisabled: isDisabled, item: item } = props;
|
|
43
|
-
let { key: key } = item;
|
|
44
|
-
let ref = (0, $j1UBu$useRef)(null);
|
|
45
|
-
let { direction: direction } = (0, $j1UBu$useLocale)();
|
|
46
|
-
let state = (0, $j1UBu$useContext)((0, $739a883ac33f90d8$export$66136572efa4af6e));
|
|
47
|
-
const isSelected = state.selectedKey === key;
|
|
48
|
-
const isCompleted = state.isCompleted(key);
|
|
49
|
-
const isItemDisabled = isDisabled || state.disabledKeys.has(key);
|
|
50
|
-
let { stepProps: stepProps, stepStateProps: stepStateProps } = (0, $j1UBu$useStepListItem)({
|
|
51
|
-
...props,
|
|
52
|
-
key: key
|
|
53
|
-
}, state, ref);
|
|
54
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $j1UBu$useHover)({
|
|
55
|
-
...props,
|
|
56
|
-
isDisabled: isItemDisabled || isSelected || props.isReadOnly
|
|
57
|
-
});
|
|
58
|
-
let stepStateText = '';
|
|
59
|
-
const stringFormatter = (0, $j1UBu$useLocalizedStringFormatter)((0, $62132693388ec24a$export$2e2bcd8739ae039), '@react-spectrum/steplist');
|
|
60
|
-
const numberFormatter = (0, $j1UBu$useNumberFormatter)();
|
|
61
|
-
if (isSelected) stepStateText = stringFormatter.format('current');
|
|
62
|
-
else if (isCompleted) stepStateText = stringFormatter.format('completed');
|
|
63
|
-
else stepStateText = stringFormatter.format('notCompleted');
|
|
64
|
-
let markerId = (0, $j1UBu$useId)();
|
|
65
|
-
let labelId = (0, $j1UBu$useId)();
|
|
66
|
-
return /*#__PURE__*/ (0, $j1UBu$react).createElement("li", {
|
|
67
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-item')
|
|
68
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement((0, $j1UBu$FocusRing), {
|
|
69
|
-
within: true,
|
|
70
|
-
focusRingClass: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'focus-ring')
|
|
71
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement("a", {
|
|
72
|
-
...(0, $j1UBu$mergeProps)(hoverProps, stepProps),
|
|
73
|
-
"aria-labelledby": `${markerId} ${labelId}`,
|
|
74
|
-
ref: ref,
|
|
75
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-link', {
|
|
76
|
-
'is-selected': isSelected && !isItemDisabled,
|
|
77
|
-
'is-disabled': isItemDisabled,
|
|
78
|
-
'is-hovered': isHovered,
|
|
79
|
-
'is-completed': isCompleted,
|
|
80
|
-
'is-selectable': state.isSelectable(key) && !isSelected
|
|
81
|
-
})
|
|
82
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement((0, $j1UBu$VisuallyHidden), stepStateProps, stepStateText), /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
|
|
83
|
-
id: labelId,
|
|
84
|
-
"aria-hidden": "true",
|
|
85
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-label')
|
|
86
|
-
}, item.rendered), /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
|
|
87
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-segment', {
|
|
88
|
-
'is-completed': isCompleted
|
|
89
|
-
})
|
|
90
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement("svg", {
|
|
91
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-segmentLine'),
|
|
92
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
93
|
-
height: "100%",
|
|
94
|
-
viewBox: "0 0 2 8",
|
|
95
|
-
preserveAspectRatio: "none"
|
|
96
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement("line", {
|
|
97
|
-
x1: "1",
|
|
98
|
-
y1: "0",
|
|
99
|
-
x2: "1",
|
|
100
|
-
y2: "8",
|
|
101
|
-
vectorEffect: "non-scaling-stroke"
|
|
102
|
-
})), /*#__PURE__*/ (0, $j1UBu$react).createElement((0, $j1UBu$spectrumiconsuiChevronRightMedium), {
|
|
103
|
-
UNSAFE_className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-chevron', {
|
|
104
|
-
'is-reversed': direction === 'rtl'
|
|
105
|
-
})
|
|
106
|
-
})), /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
|
|
107
|
-
"aria-hidden": "true",
|
|
108
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-markerWrapper')
|
|
109
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
|
|
110
|
-
id: markerId,
|
|
111
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-marker')
|
|
112
|
-
}, numberFormatter.format((item.index || 0) + 1))))));
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
export {$24c3cb1adfb0acc5$export$87c2a8a94eda1754 as StepListItem};
|
|
117
|
-
//# sourceMappingURL=StepListItem.module.js.map
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import $62132693388ec24a$export$2e2bcd8739ae039 from "./index.module.js";
|
|
2
|
-
import {StepListContext as $739a883ac33f90d8$export$66136572efa4af6e} from "./StepListContext.module.js";
|
|
3
|
-
import "./steplist.5b736ed7.css";
|
|
4
|
-
import $j1UBu$steplist_vars_cssmodulejs from "./steplist_vars_css.module.js";
|
|
5
|
-
import $j1UBu$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
|
|
6
|
-
import {classNames as $j1UBu$classNames} from "@react-spectrum/utils";
|
|
7
|
-
import {FocusRing as $j1UBu$FocusRing} from "@react-aria/focus";
|
|
8
|
-
import {useId as $j1UBu$useId, mergeProps as $j1UBu$mergeProps} from "@react-aria/utils";
|
|
9
|
-
import $j1UBu$react, {useRef as $j1UBu$useRef, useContext as $j1UBu$useContext} from "react";
|
|
10
|
-
import {useHover as $j1UBu$useHover} from "@react-aria/interactions";
|
|
11
|
-
import {useLocale as $j1UBu$useLocale, useLocalizedStringFormatter as $j1UBu$useLocalizedStringFormatter, useNumberFormatter as $j1UBu$useNumberFormatter} from "@react-aria/i18n";
|
|
12
|
-
import {useStepListItem as $j1UBu$useStepListItem} from "@react-aria/steplist";
|
|
13
|
-
import {VisuallyHidden as $j1UBu$VisuallyHidden} from "@react-aria/visually-hidden";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function $parcel$interopDefault(a) {
|
|
17
|
-
return a && a.__esModule ? a.default : a;
|
|
18
|
-
}
|
|
19
|
-
/*
|
|
20
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
21
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
22
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
23
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
24
|
-
*
|
|
25
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
26
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
27
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
28
|
-
* governing permissions and limitations under the License.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
function $24c3cb1adfb0acc5$export$87c2a8a94eda1754(props) {
|
|
42
|
-
let { isDisabled: isDisabled, item: item } = props;
|
|
43
|
-
let { key: key } = item;
|
|
44
|
-
let ref = (0, $j1UBu$useRef)(null);
|
|
45
|
-
let { direction: direction } = (0, $j1UBu$useLocale)();
|
|
46
|
-
let state = (0, $j1UBu$useContext)((0, $739a883ac33f90d8$export$66136572efa4af6e));
|
|
47
|
-
const isSelected = state.selectedKey === key;
|
|
48
|
-
const isCompleted = state.isCompleted(key);
|
|
49
|
-
const isItemDisabled = isDisabled || state.disabledKeys.has(key);
|
|
50
|
-
let { stepProps: stepProps, stepStateProps: stepStateProps } = (0, $j1UBu$useStepListItem)({
|
|
51
|
-
...props,
|
|
52
|
-
key: key
|
|
53
|
-
}, state, ref);
|
|
54
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $j1UBu$useHover)({
|
|
55
|
-
...props,
|
|
56
|
-
isDisabled: isItemDisabled || isSelected || props.isReadOnly
|
|
57
|
-
});
|
|
58
|
-
let stepStateText = '';
|
|
59
|
-
const stringFormatter = (0, $j1UBu$useLocalizedStringFormatter)((0, $62132693388ec24a$export$2e2bcd8739ae039), '@react-spectrum/steplist');
|
|
60
|
-
const numberFormatter = (0, $j1UBu$useNumberFormatter)();
|
|
61
|
-
if (isSelected) stepStateText = stringFormatter.format('current');
|
|
62
|
-
else if (isCompleted) stepStateText = stringFormatter.format('completed');
|
|
63
|
-
else stepStateText = stringFormatter.format('notCompleted');
|
|
64
|
-
let markerId = (0, $j1UBu$useId)();
|
|
65
|
-
let labelId = (0, $j1UBu$useId)();
|
|
66
|
-
return /*#__PURE__*/ (0, $j1UBu$react).createElement("li", {
|
|
67
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-item')
|
|
68
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement((0, $j1UBu$FocusRing), {
|
|
69
|
-
within: true,
|
|
70
|
-
focusRingClass: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'focus-ring')
|
|
71
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement("a", {
|
|
72
|
-
...(0, $j1UBu$mergeProps)(hoverProps, stepProps),
|
|
73
|
-
"aria-labelledby": `${markerId} ${labelId}`,
|
|
74
|
-
ref: ref,
|
|
75
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-link', {
|
|
76
|
-
'is-selected': isSelected && !isItemDisabled,
|
|
77
|
-
'is-disabled': isItemDisabled,
|
|
78
|
-
'is-hovered': isHovered,
|
|
79
|
-
'is-completed': isCompleted,
|
|
80
|
-
'is-selectable': state.isSelectable(key) && !isSelected
|
|
81
|
-
})
|
|
82
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement((0, $j1UBu$VisuallyHidden), stepStateProps, stepStateText), /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
|
|
83
|
-
id: labelId,
|
|
84
|
-
"aria-hidden": "true",
|
|
85
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-label')
|
|
86
|
-
}, item.rendered), /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
|
|
87
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-segment', {
|
|
88
|
-
'is-completed': isCompleted
|
|
89
|
-
})
|
|
90
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement("svg", {
|
|
91
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-segmentLine'),
|
|
92
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
93
|
-
height: "100%",
|
|
94
|
-
viewBox: "0 0 2 8",
|
|
95
|
-
preserveAspectRatio: "none"
|
|
96
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement("line", {
|
|
97
|
-
x1: "1",
|
|
98
|
-
y1: "0",
|
|
99
|
-
x2: "1",
|
|
100
|
-
y2: "8",
|
|
101
|
-
vectorEffect: "non-scaling-stroke"
|
|
102
|
-
})), /*#__PURE__*/ (0, $j1UBu$react).createElement((0, $j1UBu$spectrumiconsuiChevronRightMedium), {
|
|
103
|
-
UNSAFE_className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-chevron', {
|
|
104
|
-
'is-reversed': direction === 'rtl'
|
|
105
|
-
})
|
|
106
|
-
})), /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
|
|
107
|
-
"aria-hidden": "true",
|
|
108
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-markerWrapper')
|
|
109
|
-
}, /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
|
|
110
|
-
id: markerId,
|
|
111
|
-
className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), 'spectrum-Steplist-marker')
|
|
112
|
-
}, numberFormatter.format((item.index || 0) + 1))))));
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
export {$24c3cb1adfb0acc5$export$87c2a8a94eda1754 as StepListItem};
|
|
117
|
-
//# sourceMappingURL=StepListItem.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;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ights 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, {ReactNode, 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>): ReactNode {\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"],"names":[],"version":3,"file":"StepListItem.module.js.map"}
|
package/dist/en-US.main.js
DELETED
package/dist/en-US.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,aAAa,CAAC,WAAW,CAAC;IAC5C,gBAAgB,CAAC,eAAe,CAAC;IACjC,WAAW,CAAC,SAAS,CAAC;IACtB,YAAY,CAAC,SAAS,CAAC;AACzB","sources":["packages/@react-spectrum/steplist/intl/en-US.json"],"sourcesContent":["{\n \"completed\": \"Completed: \",\n \"notCompleted\": \"Not completed: \",\n \"current\": \"Current: \",\n \"steplist\": \"Step List\"\n}\n"],"names":[],"version":3,"file":"en-US.main.js.map"}
|
package/dist/en-US.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var $08c8c4603e0a825e$exports = {};
|
|
2
|
-
$08c8c4603e0a825e$exports = {
|
|
3
|
-
"completed": `Completed: `,
|
|
4
|
-
"notCompleted": `Not completed: `,
|
|
5
|
-
"current": `Current: `,
|
|
6
|
-
"steplist": `Step List`
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export {$08c8c4603e0a825e$exports as default};
|
|
11
|
-
//# sourceMappingURL=en-US.module.js.map
|
package/dist/en-US.module.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var $08c8c4603e0a825e$exports = {};
|
|
2
|
-
$08c8c4603e0a825e$exports = {
|
|
3
|
-
"completed": `Completed: `,
|
|
4
|
-
"notCompleted": `Not completed: `,
|
|
5
|
-
"current": `Current: `,
|
|
6
|
-
"steplist": `Step List`
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export {$08c8c4603e0a825e$exports as default};
|
|
11
|
-
//# sourceMappingURL=en-US.module.js.map
|
package/dist/en-US.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,WAAW,CAAC;IAC5C,gBAAgB,CAAC,eAAe,CAAC;IACjC,WAAW,CAAC,SAAS,CAAC;IACtB,YAAY,CAAC,SAAS,CAAC;AACzB","sources":["packages/@react-spectrum/steplist/intl/en-US.json"],"sourcesContent":["{\n \"completed\": \"Completed: \",\n \"notCompleted\": \"Not completed: \",\n \"current\": \"Current: \",\n \"steplist\": \"Step List\"\n}\n"],"names":[],"version":3,"file":"en-US.module.js.map"}
|
package/dist/index.main.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var $17d0d848808abe0b$exports = require("./en-US.main.js");
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function $parcel$interopDefault(a) {
|
|
5
|
-
return a && a.__esModule ? a.default : a;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
function $parcel$export(e, n, v, s) {
|
|
9
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
$parcel$export(module.exports, "default", () => $fed92386245d94a4$export$2e2bcd8739ae039);
|
|
13
|
-
|
|
14
|
-
var $fed92386245d94a4$export$2e2bcd8739ae039 = {
|
|
15
|
-
'en-US': (0, ($parcel$interopDefault($17d0d848808abe0b$exports)))
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=index.main.js.map
|
package/dist/index.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;IAEA,2CAAe;IACb,SAAS,CAAA,GAAA,mDAAG;AACd","sources":["packages/@react-spectrum/steplist/intl/index.js"],"sourcesContent":["import enUS from './en-US.json';\n\nexport default {\n 'en-US': enUS\n};\n"],"names":[],"version":3,"file":"index.main.js.map"}
|
package/dist/index.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import $eOUd0$enUSmodulejs from "./en-US.mjs";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function $parcel$interopDefault(a) {
|
|
5
|
-
return a && a.__esModule ? a.default : a;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
var $62132693388ec24a$export$2e2bcd8739ae039 = {
|
|
9
|
-
'en-US': (0, ($parcel$interopDefault($eOUd0$enUSmodulejs)))
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {$62132693388ec24a$export$2e2bcd8739ae039 as default};
|
|
14
|
-
//# sourceMappingURL=index.module.js.map
|
package/dist/index.module.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import $eOUd0$enUSmodulejs from "./en-US.module.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function $parcel$interopDefault(a) {
|
|
5
|
-
return a && a.__esModule ? a.default : a;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
var $62132693388ec24a$export$2e2bcd8739ae039 = {
|
|
9
|
-
'en-US': (0, ($parcel$interopDefault($eOUd0$enUSmodulejs)))
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {$62132693388ec24a$export$2e2bcd8739ae039 as default};
|
|
14
|
-
//# sourceMappingURL=index.module.js.map
|
package/dist/index.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;IAEA,2CAAe;IACb,SAAS,CAAA,GAAA,6CAAG;AACd","sources":["packages/@react-spectrum/steplist/intl/index.js"],"sourcesContent":["import enUS from './en-US.json';\n\nexport default {\n 'en-US': enUS\n};\n"],"names":[],"version":3,"file":"index.module.js.map"}
|