@snack-uikit/stepper 0.4.0 → 0.4.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.4.1 (2023-12-14)
|
|
7
|
+
|
|
8
|
+
### Only dependencies have been changed
|
|
9
|
+
* [@snack-uikit/icons@0.19.1](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/icons/CHANGELOG.md)
|
|
10
|
+
* [@snack-uikit/truncate-string@0.4.1](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/truncate-string/CHANGELOG.md)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
# 0.4.0 (2023-12-14)
|
|
7
17
|
|
|
8
18
|
|
|
@@ -98,5 +98,5 @@ export function Stepper(_a) {
|
|
|
98
98
|
}, [currentStepState]);
|
|
99
99
|
const stepper = (_jsx("div", Object.assign({ className: cn(styles.stepper, className) }, extractSupportProps(props), { children: stepsView.map((step, index, all) => (_jsx(Step, { step: step, isLast: all.length - 1 === index, "data-test-id": props['data-test-id'] }, step.title + index))) })));
|
|
100
100
|
const stepperApi = { goNext, goPrev, currentStepIndex, isCompleted, resetValidation, stepCount: steps.length };
|
|
101
|
-
return _jsx(StepperContext.Provider,
|
|
101
|
+
return _jsx(StepperContext.Provider, { value: stepperApi, children: children(Object.assign({ stepper }, stepperApi)) });
|
|
102
102
|
}
|
|
@@ -20,5 +20,5 @@ function getContent(state, number) {
|
|
|
20
20
|
}
|
|
21
21
|
export function Icon({ state, number, className }) {
|
|
22
22
|
const content = useMemo(() => getContent(state, number), [number, state]);
|
|
23
|
-
return (_jsx("div",
|
|
23
|
+
return (_jsx("div", { "data-state": state, className: cn(styles.icon, className), children: typeof content === 'number' ? _jsx(Typography.SansLabelL, { children: content }) : content }));
|
|
24
24
|
}
|
|
@@ -22,5 +22,5 @@ const getTailTestId = getTestIdBuilder('_element-tail');
|
|
|
22
22
|
const getStepTestId = getTestIdBuilder('_element-step');
|
|
23
23
|
export function Step(_a) {
|
|
24
24
|
var { step, className, isLast, 'data-test-id': testId } = _a, props = __rest(_a, ["step", "className", "isLast", 'data-test-id']);
|
|
25
|
-
return (_jsxs("div", Object.assign({ className: cn(styles.step, className), "data-state": step.state }, extractSupportProps(props), { children: [_jsxs("button",
|
|
25
|
+
return (_jsxs("div", Object.assign({ className: cn(styles.step, className), "data-state": step.state }, extractSupportProps(props), { children: [_jsxs("button", { className: styles.content, onClick: step.onClick, disabled: !step.onClick, "data-test-id": getStepTestId(testId), "data-state": step.state, children: [_jsx(Icon, Object.assign({}, step, { className: styles.icon })), _jsx(Typography.SansBodyM, { className: styles.title, tag: 'div', children: _jsx(TruncateString, { text: step.title }) })] }), !isLast && (_jsx("div", { className: styles.tail, "data-completed": step.state === STEP_STATE.Completed || undefined, "data-test-id": getTailTestId(testId), children: _jsx("div", { className: styles.tailLine }) }))] })));
|
|
26
26
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Stepper",
|
|
7
|
-
"version": "0.4.
|
|
7
|
+
"version": "0.4.1",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"license": "Apache-2.0",
|
|
33
33
|
"scripts": {},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@snack-uikit/icons": "0.19.
|
|
35
|
+
"@snack-uikit/icons": "0.19.1",
|
|
36
36
|
"@snack-uikit/loaders": "0.5.0",
|
|
37
|
-
"@snack-uikit/truncate-string": "0.4.
|
|
37
|
+
"@snack-uikit/truncate-string": "0.4.1",
|
|
38
38
|
"@snack-uikit/typography": "0.6.0",
|
|
39
39
|
"@snack-uikit/utils": "3.2.0",
|
|
40
40
|
"classnames": "2.3.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "62f43bf0cbfd611d0b746117400f67096b1790f6"
|
|
43
43
|
}
|