@snack-uikit/stepper 0.9.2-preview-02d918ac.0 → 0.9.2

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,15 @@
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.9.2 (2026-07-03)
7
+
8
+ ### Only dependencies have been changed
9
+ * [@snack-uikit/truncate-string@0.7.14]($PUBLIC_PROJECT_URL/blob/master/packages/truncate-string/CHANGELOG.md)
10
+
11
+
12
+
13
+
14
+
6
15
  ## 0.9.1 (2026-06-24)
7
16
 
8
17
  ### Only dependencies have been changed
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
3
5
  var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
4
6
  function adopt(value) {
5
7
  return value instanceof P ? value : new P(function (resolve) {
@@ -56,22 +58,35 @@ const DEFAULT_VALIDATOR = () => __awaiter(void 0, void 0, void 0, function* () {
56
58
  return true;
57
59
  });
58
60
  function Stepper(_a) {
59
- var {
60
- children,
61
- steps,
62
- className,
63
- onChangeCurrentStep,
64
- onCompleteChange,
65
- defaultCurrentStepIndex = 0,
66
- validator: validatorProp = DEFAULT_VALIDATOR,
67
- allowFreeNavigation = false
68
- } = _a,
61
+ var children = _a.children,
62
+ steps = _a.steps,
63
+ className = _a.className,
64
+ onChangeCurrentStep = _a.onChangeCurrentStep,
65
+ onCompleteChange = _a.onCompleteChange,
66
+ _a$defaultCurrentStep = _a.defaultCurrentStepIndex,
67
+ defaultCurrentStepIndex = _a$defaultCurrentStep === void 0 ? 0 : _a$defaultCurrentStep,
68
+ _a$validator = _a.validator,
69
+ validatorProp = _a$validator === void 0 ? DEFAULT_VALIDATOR : _a$validator,
70
+ _a$allowFreeNavigatio = _a.allowFreeNavigation,
71
+ allowFreeNavigation = _a$allowFreeNavigatio === void 0 ? false : _a$allowFreeNavigatio,
69
72
  props = __rest(_a, ["children", "steps", "className", "onChangeCurrentStep", "onCompleteChange", "defaultCurrentStepIndex", "validator", "allowFreeNavigation"]);
70
73
  const isCompletedByDefault = defaultCurrentStepIndex === steps.length - 1;
71
- const [currentStepState, setCurrentStepState] = (0, react_1.useState)(isCompletedByDefault ? constants_1.STEP_STATE.Completed : constants_1.STEP_STATE.Current);
72
- const [currentStepIndex, setCurrentStepIndexValue] = (0, react_1.useState)(defaultCurrentStepIndex);
73
- const [isCompleted, setIsCompleted] = (0, react_1.useState)(isCompletedByDefault);
74
- const [stepsValidator, setStepsValidator] = (0, react_1.useState)();
74
+ const _ref = (0, react_1.useState)(isCompletedByDefault ? constants_1.STEP_STATE.Completed : constants_1.STEP_STATE.Current),
75
+ _ref2 = (0, _slicedToArray2.default)(_ref, 2),
76
+ currentStepState = _ref2[0],
77
+ setCurrentStepState = _ref2[1];
78
+ const _ref3 = (0, react_1.useState)(defaultCurrentStepIndex),
79
+ _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
80
+ currentStepIndex = _ref4[0],
81
+ setCurrentStepIndexValue = _ref4[1];
82
+ const _ref5 = (0, react_1.useState)(isCompletedByDefault),
83
+ _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
84
+ isCompleted = _ref6[0],
85
+ setIsCompleted = _ref6[1];
86
+ const _ref7 = (0, react_1.useState)(),
87
+ _ref8 = (0, _slicedToArray2.default)(_ref7, 2),
88
+ stepsValidator = _ref8[0],
89
+ setStepsValidator = _ref8[1];
75
90
  (0, react_1.useEffect)(() => {
76
91
  onCompleteChange === null || onCompleteChange === void 0 ? void 0 : onCompleteChange(isCompleted);
77
92
  }, [isCompleted, onCompleteChange]);
@@ -32,11 +32,9 @@ function getContent(state, number) {
32
32
  }
33
33
  }
34
34
  function Icon(_ref) {
35
- let {
36
- state,
37
- number,
38
- className
39
- } = _ref;
35
+ let state = _ref.state,
36
+ number = _ref.number,
37
+ className = _ref.className;
40
38
  const content = (0, react_1.useMemo)(() => getContent(state, number), [number, state]);
41
39
  return (0, jsx_runtime_1.jsx)("div", {
42
40
  "data-state": state,
@@ -29,12 +29,10 @@ const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
29
29
  const getTailTestId = (0, utils_2.getTestIdBuilder)('_element-tail');
30
30
  const getStepTestId = (0, utils_2.getTestIdBuilder)('_element-step');
31
31
  function Step(_a) {
32
- var {
33
- step,
34
- className,
35
- 'data-test-id': testId,
36
- hideTailLine
37
- } = _a,
32
+ var step = _a.step,
33
+ className = _a.className,
34
+ testId = _a['data-test-id'],
35
+ hideTailLine = _a.hideTailLine,
38
36
  props = __rest(_a, ["step", "className", 'data-test-id', "hideTailLine"]);
39
37
  return (0, jsx_runtime_1.jsxs)("div", Object.assign({
40
38
  className: (0, classnames_1.default)(styles_module_scss_1.default.step, className),
package/dist/cjs/utils.js CHANGED
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getTestIdBuilder = void 0;
7
- const getTestIdBuilder = postfix => testId => postfix && testId ? `${testId}${postfix}` : undefined;
7
+ const getTestIdBuilder = postfix => testId => postfix && testId ? "".concat(testId).concat(postfix) : undefined;
8
8
  exports.getTestIdBuilder = getTestIdBuilder;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Stepper",
7
- "version": "0.9.2-preview-02d918ac.0",
7
+ "version": "0.9.2",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -38,10 +38,10 @@
38
38
  "dependencies": {
39
39
  "@snack-uikit/icons": "0.27.7",
40
40
  "@snack-uikit/loaders": "0.9.11",
41
- "@snack-uikit/truncate-string": "0.7.14-preview-02d918ac.0",
41
+ "@snack-uikit/truncate-string": "0.7.14",
42
42
  "@snack-uikit/typography": "0.8.13",
43
43
  "@snack-uikit/utils": "4.0.2",
44
44
  "classnames": "2.5.1"
45
45
  },
46
- "gitHead": "00136e44a3f59e0cf80df069e32dac42b3a8d88a"
46
+ "gitHead": "864821fceaa6bbb61080166d14f1682fa16e3f85"
47
47
  }