@semcore/wizard 2.55.0-prerelease.0 → 2.55.0-prerelease.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.
Files changed (69) hide show
  1. package/lib/cjs/Wizard.js +109 -129
  2. package/lib/cjs/Wizard.js.map +1 -1
  3. package/lib/cjs/index.d.js +2 -0
  4. package/lib/cjs/index.d.js.map +1 -0
  5. package/lib/cjs/index.js +1 -1
  6. package/lib/cjs/index.js.map +1 -1
  7. package/lib/cjs/style/wizard.shadow.css +46 -54
  8. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +5 -4
  9. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  10. package/lib/cjs/translations/de.json +1 -1
  11. package/lib/cjs/translations/es.json +1 -1
  12. package/lib/cjs/translations/fr.json +1 -1
  13. package/lib/cjs/translations/it.json +1 -1
  14. package/lib/cjs/translations/ja.json +1 -1
  15. package/lib/cjs/translations/ko.json +1 -1
  16. package/lib/cjs/translations/nl.json +1 -1
  17. package/lib/cjs/translations/pl.json +1 -1
  18. package/lib/cjs/translations/pt.json +1 -1
  19. package/lib/cjs/translations/sv.json +1 -1
  20. package/lib/cjs/translations/tr.json +1 -1
  21. package/lib/cjs/translations/vi.json +1 -1
  22. package/lib/cjs/translations/zh.json +1 -1
  23. package/lib/es6/Wizard.js +98 -121
  24. package/lib/es6/Wizard.js.map +1 -1
  25. package/lib/es6/index.d.js +2 -0
  26. package/lib/es6/index.d.js.map +1 -0
  27. package/lib/es6/index.js.map +1 -1
  28. package/lib/es6/style/wizard.shadow.css +46 -54
  29. package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
  30. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  31. package/lib/es6/translations/de.json +1 -1
  32. package/lib/es6/translations/es.json +1 -1
  33. package/lib/es6/translations/fr.json +1 -1
  34. package/lib/es6/translations/it.json +1 -1
  35. package/lib/es6/translations/ja.json +1 -1
  36. package/lib/es6/translations/ko.json +1 -1
  37. package/lib/es6/translations/nl.json +1 -1
  38. package/lib/es6/translations/pl.json +1 -1
  39. package/lib/es6/translations/pt.json +1 -1
  40. package/lib/es6/translations/sv.json +1 -1
  41. package/lib/es6/translations/tr.json +1 -1
  42. package/lib/es6/translations/vi.json +1 -1
  43. package/lib/es6/translations/zh.json +1 -1
  44. package/lib/esm/Wizard.mjs +99 -125
  45. package/lib/esm/style/wizard.shadow.css +46 -54
  46. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
  47. package/lib/esm/translations/de.json.mjs +1 -1
  48. package/lib/esm/translations/es.json.mjs +1 -1
  49. package/lib/esm/translations/fr.json.mjs +1 -1
  50. package/lib/esm/translations/it.json.mjs +1 -1
  51. package/lib/esm/translations/ja.json.mjs +1 -1
  52. package/lib/esm/translations/ko.json.mjs +1 -1
  53. package/lib/esm/translations/nl.json.mjs +1 -1
  54. package/lib/esm/translations/pl.json.mjs +1 -1
  55. package/lib/esm/translations/pt.json.mjs +1 -1
  56. package/lib/esm/translations/sv.json.mjs +1 -1
  57. package/lib/esm/translations/tr.json.mjs +1 -1
  58. package/lib/esm/translations/vi.json.mjs +1 -1
  59. package/lib/esm/translations/zh.json.mjs +1 -1
  60. package/lib/types/index.d.ts +108 -3
  61. package/package.json +7 -7
  62. package/src/style/wizard.shadow.css +10 -10
  63. package/lib/cjs/Wizard.types.js +0 -2
  64. package/lib/cjs/Wizard.types.js.map +0 -1
  65. package/lib/es6/Wizard.types.js +0 -2
  66. package/lib/es6/Wizard.types.js.map +0 -1
  67. package/lib/types/Wizard.d.ts +0 -6
  68. package/lib/types/Wizard.types.d.ts +0 -124
  69. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +0 -72
@@ -1,145 +1,116 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
4
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
4
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
5
5
  import _inherits from "@babel/runtime/helpers/esm/inherits";
6
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
6
7
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
7
- import { sstyled, Component, assignProps, createComponent } from "@semcore/core";
8
- import { Box, ScreenReaderOnly } from "@semcore/base-components";
9
- import Button from "@semcore/button";
10
- import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
11
- import findComponent from "@semcore/core/lib/utils/findComponent";
12
- import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
13
- import { setFocus } from "@semcore/core/lib/utils/use/useFocusLock";
14
- import ArrowLeft from "@semcore/icon/ArrowLeft/m";
15
- import ArrowRight from "@semcore/icon/ArrowRight/m";
16
- import CheckM from "@semcore/icon/Check/m";
17
- import Modal from "@semcore/modal";
8
+ import { sstyled } from "@semcore/utils/lib/core/index";
9
+ import createComponent, { sstyled as sstyled$1, Component, assignProps } from "@semcore/core";
18
10
  import React from "react";
11
+ import { ScreenReaderOnly, Box } from "@semcore/flex-box";
12
+ import Modal from "@semcore/modal";
13
+ import CheckM from "@semcore/icon/Check/m";
14
+ import keyboardFocusEnhance from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
15
+ import i18nEnhance from "@semcore/utils/lib/enhances/i18nEnhance";
19
16
  import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
17
+ import { setFocus } from "@semcore/utils/lib/use/useFocusLock";
18
+ import uniqueIDEnhancement from "@semcore/utils/lib/uniqueID";
19
+ import Button from "@semcore/button";
20
+ import ArrowRight from "@semcore/icon/ArrowRight/m";
21
+ import ArrowLeft from "@semcore/icon/ArrowLeft/m";
20
22
  /*!__reshadow-styles__:"./style/wizard.shadow.css"*/
21
23
  var style = (
22
24
  /*__reshadow_css_start__*/
23
25
  (sstyled.insert(
24
26
  /*__inner_css_start__*/
25
- ".___SWizard_xpswz_gg_{max-width:980px;max-height:700px;display:flex;padding:0;background:0 0}.___SSidebar_xpswz_gg_{background:var(--intergalactic-control-primary-advertising, rgb(162, 97, 253));color:var(--intergalactic-text-primary-invert, rgba(254, 255, 255, 0.949));font-weight:var(--intergalactic-bold, 700);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-2x, 8px);max-width:220px;flex-shrink:0;box-sizing:border-box;border-radius:var(--intergalactic-modal-rounded, calc(12px + 2px))0 0 var(--intergalactic-modal-rounded, calc(12px + 2px))}@media (max-width:1060px){.___SSidebar_xpswz_gg_{width:56px}}.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_{display:flex;gap:var(--intergalactic-spacing-1x, 4px);font-size:var(--intergalactic-fs-200, 14px);border-radius:var(--intergalactic-control-rounded, 6px);padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);cursor:pointer;position:relative;overflow:auto;line-height:var(--intergalactic-lh-200, 142%)}.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_:focus-visible{outline-color:var(--intergalactic-keyboard-focus-invert-outline, rgba(255, 255, 255, 0.7))}@media (hover:hover){.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_:hover{background:var(--intergalactic-control-primary-advertising-hover, rgb(150, 76, 251));z-index:2}}.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_.__active_xpswz_gg_{background:var(--intergalactic-control-primary-advertising-active, rgb(144, 65, 250))}.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_.__disabled_xpswz_gg_,.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_:disabled{opacity:var(--intergalactic-disabled-opacity, 0.4);cursor:default;pointer-events:none}@media (max-width:1060px){.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_{padding:var(--intergalactic-spacing-2x, 8px)}@media (hover:hover){.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_:hover{width:-moz-max-content;width:max-content;max-width:220px}.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_:hover .___SStepDescription_xpswz_gg_{display:block;border-radius:var(--intergalactic-control-rounded, 6px);overflow:auto}.___SSidebar_xpswz_gg_ .___SStepper_xpswz_gg_.__active_xpswz_gg_:hover .___SStepDescription_xpswz_gg_{background:var(--intergalactic-control-primary-advertising-active, rgb(144, 65, 250))}}}.___SSidebarHeader_xpswz_gg_{font-size:var(--intergalactic-fs-300, 16px);margin:0 var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-4x, 16px)}@media (max-width:1060px){.___SSidebarHeader_xpswz_gg_{display:none}}.___SStepNumber_xpswz_gg_{display:inline-block;min-width:20px;text-align:center}.___SCompleted_xpswz_gg_{margin-top:1px}.___SStepDescription_xpswz_gg_{word-wrap:anywhere}@media (max-width:1060px){.___SStepDescription_xpswz_gg_{display:none}}.___SContent_xpswz_gg_{padding:var(--intergalactic-spacing-10x, 40px);width:100%;border-radius:0 var(--intergalactic-modal-rounded, calc(12px + 2px)) var(--intergalactic-modal-rounded, calc(12px + 2px))0;background:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255))}.___SContent_xpswz_gg_.__noSidebar_xpswz_gg_{border-radius:var(--intergalactic-modal-rounded, calc(12px + 2px))}.___SSidebarMenu_xpswz_gg_{display:contents}",
27
+ ".___SWizard_mgd0i_gg_{max-width:980px;max-height:700px;display:flex;padding:0;background:0 0}.___SSidebar_mgd0i_gg_{background:var(--intergalactic-control-primary-advertising, rgb(162, 97, 253));color:var(--intergalactic-text-primary-invert, rgba(254, 255, 255, 0.949));font-weight:var(--intergalactic-bold, 700);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-2x, 8px) calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-05x, 2px));max-width:220px;flex-shrink:0;box-sizing:border-box;border-radius:var(--intergalactic-modal-rounded, calc(12px + 2px))0 0 var(--intergalactic-modal-rounded, calc(12px + 2px))}@media (max-width:1060px){.___SSidebar_mgd0i_gg_{width:44px}}.___SSidebarHeader_mgd0i_gg_{font-size:var(--intergalactic-fs-300, 16px);margin:0 var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-4x, 16px)}@media (max-width:1060px){.___SSidebarHeader_mgd0i_gg_{display:none}}.___SStepper_mgd0i_gg_{display:flex;font-size:var(--intergalactic-fs-200, 14px);border-radius:var(--intergalactic-control-rounded, 6px);padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);cursor:pointer;position:relative;overflow:auto;line-height:var(--intergalactic-lh-200, 142%)}@media (hover:hover){.___SStepper_mgd0i_gg_:hover{background:var(--intergalactic-control-primary-advertising-hover, rgb(150, 76, 251));z-index:1}}.___SStepper_mgd0i_gg_.__active_mgd0i_gg_{background:var(--intergalactic-control-primary-advertising-active, rgb(144, 65, 250))}.___SStepper_mgd0i_gg_.__disabled_mgd0i_gg_,.___SStepper_mgd0i_gg_:disabled{opacity:var(--intergalactic-disabled-opacity, 0.4);cursor:default;pointer-events:none}@media (max-width:1060px){.___SStepper_mgd0i_gg_{padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-1x, 4px)}@media (hover:hover){.___SStepper_mgd0i_gg_:hover{width:-moz-fit-content;width:fit-content;max-width:220px}.___SStepper_mgd0i_gg_:hover .___SStepDescription_mgd0i_gg_{display:block;border-radius:var(--intergalactic-control-rounded, 6px);white-space:nowrap;overflow:auto}.___SStepper_mgd0i_gg_.__active_mgd0i_gg_:hover .___SStepDescription_mgd0i_gg_{background:var(--intergalactic-control-primary-advertising-active, rgb(144, 65, 250))}}}.___SStepNumber_mgd0i_gg_{display:inline-block;min-width:20px}.___SCompleted_mgd0i_gg_{margin-top:1px}@media (max-width:1060px){.___SStepDescription_mgd0i_gg_{display:none}}.___SContent_mgd0i_gg_{padding:var(--intergalactic-spacing-10x, 40px);width:100%;border-radius:0 var(--intergalactic-modal-rounded, calc(12px + 2px)) var(--intergalactic-modal-rounded, calc(12px + 2px))0;background:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255))}.___SSidebarMenu_mgd0i_gg_{display:contents}",
26
28
  /*__inner_css_end__*/
27
- "xpswz_gg_"
29
+ "mgd0i_gg_"
28
30
  ), /*__reshadow_css_end__*/
29
31
  {
30
- "__SWizard": "___SWizard_xpswz_gg_",
31
- "__SStepNumber": "___SStepNumber_xpswz_gg_",
32
- "__SCompleted": "___SCompleted_xpswz_gg_",
33
- "__SContent": "___SContent_xpswz_gg_",
34
- "_noSidebar": "__noSidebar_xpswz_gg_",
35
- "__SSidebarMenu": "___SSidebarMenu_xpswz_gg_",
36
- "__SSidebar": "___SSidebar_xpswz_gg_",
37
- "__SStepper": "___SStepper_xpswz_gg_",
38
- "_active": "__active_xpswz_gg_",
39
- "_disabled": "__disabled_xpswz_gg_",
40
- "__SStepDescription": "___SStepDescription_xpswz_gg_",
41
- "__SSidebarHeader": "___SSidebarHeader_xpswz_gg_"
32
+ "__SWizard": "___SWizard_mgd0i_gg_",
33
+ "__SStepNumber": "___SStepNumber_mgd0i_gg_",
34
+ "__SCompleted": "___SCompleted_mgd0i_gg_",
35
+ "__SContent": "___SContent_mgd0i_gg_",
36
+ "__SSidebarMenu": "___SSidebarMenu_mgd0i_gg_",
37
+ "__SSidebar": "___SSidebar_mgd0i_gg_",
38
+ "__SSidebarHeader": "___SSidebarHeader_mgd0i_gg_",
39
+ "__SStepper": "___SStepper_mgd0i_gg_",
40
+ "_active": "__active_mgd0i_gg_",
41
+ "_disabled": "__disabled_mgd0i_gg_",
42
+ "__SStepDescription": "___SStepDescription_mgd0i_gg_"
42
43
  })
43
44
  );
44
- var WizardRoot = /* @__PURE__ */ (function(_Component) {
45
+ var WizardRoot = /* @__PURE__ */ function(_Component) {
46
+ _inherits(WizardRoot2, _Component);
47
+ var _super = _createSuper(WizardRoot2);
45
48
  function WizardRoot2() {
46
49
  var _this;
47
50
  _classCallCheck(this, WizardRoot2);
48
51
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
49
52
  args[_key] = arguments[_key];
50
53
  }
51
- _this = _callSuper(this, WizardRoot2, [].concat(args));
52
- _defineProperty(_this, "_steps", /* @__PURE__ */ new Map());
53
- _defineProperty(_this, "modalRef", /* @__PURE__ */ React.createRef());
54
- _defineProperty(_this, "contentRef", /* @__PURE__ */ React.createRef());
55
- _defineProperty(_this, "stepperRefs", []);
56
- _defineProperty(_this, "state", {
57
- highlighted: _this.props.step
54
+ _this = _super.call.apply(_super, [this].concat(args));
55
+ _defineProperty(_assertThisInitialized(_this), "_steps", /* @__PURE__ */ new Map());
56
+ _defineProperty(_assertThisInitialized(_this), "modalRef", /* @__PURE__ */ React.createRef());
57
+ _defineProperty(_assertThisInitialized(_this), "contentRef", /* @__PURE__ */ React.createRef());
58
+ _defineProperty(_assertThisInitialized(_this), "state", {
59
+ highlighted: null
58
60
  });
59
- _defineProperty(_this, "stepperFocusPrev", function(i) {
61
+ _defineProperty(_assertThisInitialized(_this), "stepperRefs", []);
62
+ _defineProperty(_assertThisInitialized(_this), "stepperFocusPrev", function(i) {
60
63
  return function() {
61
64
  var prevStep = _this._steps.get(i);
62
65
  if (!prevStep) return;
63
- if (prevStep.disabled) {
64
- _this.stepperFocusPrev(i - 1)();
65
- return;
66
- }
67
66
  _this.setState({
68
67
  highlighted: prevStep === null || prevStep === void 0 ? void 0 : prevStep.step
69
68
  });
70
69
  setTimeout(function() {
71
70
  var _this$stepperRefs;
72
- (_this$stepperRefs = _this.stepperRefs[i - 1]) === null || _this$stepperRefs === void 0 || _this$stepperRefs.focus();
71
+ (_this$stepperRefs = _this.stepperRefs[i - 1]) === null || _this$stepperRefs === void 0 ? void 0 : _this$stepperRefs.focus();
73
72
  }, 0);
74
73
  };
75
74
  });
76
- _defineProperty(_this, "stepperFocusNext", function(i) {
75
+ _defineProperty(_assertThisInitialized(_this), "stepperFocusNext", function(i) {
77
76
  return function() {
78
77
  var nextStep = _this._steps.get(i + 2);
79
78
  if (!nextStep) return;
80
- if (nextStep.disabled) {
81
- _this.stepperFocusNext(i + 1)();
82
- return;
83
- }
84
79
  _this.setState({
85
80
  highlighted: nextStep === null || nextStep === void 0 ? void 0 : nextStep.step
86
81
  });
87
82
  setTimeout(function() {
88
83
  var _this$stepperRefs2;
89
- (_this$stepperRefs2 = _this.stepperRefs[i + 1]) === null || _this$stepperRefs2 === void 0 || _this$stepperRefs2.focus();
84
+ (_this$stepperRefs2 = _this.stepperRefs[i + 1]) === null || _this$stepperRefs2 === void 0 ? void 0 : _this$stepperRefs2.focus();
90
85
  }, 0);
91
86
  };
92
87
  });
93
88
  return _this;
94
89
  }
95
- _inherits(WizardRoot2, _Component);
96
- return _createClass(WizardRoot2, [{
97
- key: "getStepId",
98
- value: function getStepId(step) {
99
- return "".concat(this.asProps.uid, "-step-").concat(step);
100
- }
101
- }, {
102
- key: "getId",
103
- value: function getId() {
104
- return "".concat(this.asProps.uid, "-title");
105
- }
106
- }, {
107
- key: "getStepperId",
108
- value: function getStepperId(step) {
109
- var uid = this.asProps.uid;
110
- return "".concat(uid, "-stepper-").concat(step);
111
- }
112
- }, {
113
- key: "getContentId",
114
- value: function getContentId(step) {
115
- var uid = this.asProps.uid;
116
- return "".concat(uid, "-content-").concat(step);
117
- }
118
- }, {
90
+ _createClass(WizardRoot2, [{
119
91
  key: "getStepProps",
120
92
  value: function getStepProps(props) {
121
93
  return {
122
94
  steps: this._steps,
123
95
  active: props.step === this.asProps.step,
124
- id: this.getStepId(props.step)
96
+ id: "".concat(this.asProps.uid, "-step-").concat(props.step)
125
97
  };
126
98
  }
127
99
  }, {
128
100
  key: "getSidebarProps",
129
101
  value: function getSidebarProps() {
130
102
  return {
131
- id: this.getId()
103
+ uid: this.asProps.uid
132
104
  };
133
105
  }
134
106
  }, {
135
107
  key: "getContentProps",
136
108
  value: function getContentProps() {
137
- var _this$asProps = this.asProps, Children = _this$asProps.Children, step = _this$asProps.step;
138
- var Sidebar2 = findComponent(Children, ["Wizard.Sidebar"], true);
139
- return _defineProperty(_defineProperty({
140
- ref: this.contentRef,
141
- noSidebar: !Sidebar2
142
- }, "aria-labelledby", this.getStepperId(step)), "id", this.getContentId(step));
109
+ return {
110
+ uid: this.asProps.uid,
111
+ step: this.asProps.step,
112
+ ref: this.contentRef
113
+ };
143
114
  }
144
115
  }, {
145
116
  key: "getStepBackProps",
@@ -171,22 +142,18 @@ var WizardRoot = /* @__PURE__ */ (function(_Component) {
171
142
  }, props));
172
143
  }
173
144
  var active = props.step === this.asProps.step;
174
- var highlighted = this.state.highlighted === props.step;
145
+ var highlighted = this.state.highlighted === props.step || this.state.highlighted === null && i === 0;
175
146
  return {
176
147
  active,
177
- "tabIndex": highlighted ? 0 : -1,
148
+ tabIndex: highlighted ? 0 : -1,
178
149
  number,
179
- "getI18nText": this.asProps.getI18nText,
180
- "uid": this.asProps.uid,
181
- "ref": function ref(node) {
150
+ getI18nText: this.asProps.getI18nText,
151
+ uid: this.asProps.uid,
152
+ ref: function ref(node) {
182
153
  _this2.stepperRefs[i] = node;
183
154
  },
184
- "focusNext": this.stepperFocusNext(i),
185
- "focusPrev": this.stepperFocusPrev(i),
186
- "id": this.getStepperId(props.step),
187
- "aria-controls": active ? this.getContentId(props.step) : void 0,
188
- "aria-disabled": props.disabled,
189
- "aria-selected": active
155
+ focusNext: this.stepperFocusNext(i),
156
+ focusPrev: this.stepperFocusPrev(i)
190
157
  };
191
158
  }
192
159
  }, {
@@ -195,13 +162,11 @@ var WizardRoot = /* @__PURE__ */ (function(_Component) {
195
162
  var _this3 = this;
196
163
  if (prevProps.step === this.asProps.step) return;
197
164
  this.setState({
198
- highlighted: this.asProps.step
165
+ highlighted: this.asProps.step || null
199
166
  });
200
167
  setTimeout(function() {
201
168
  if (prevProps.step === _this3.asProps.step) return;
202
- if (_this3.contentRef.current) {
203
- setFocus(_this3.contentRef.current);
204
- }
169
+ setFocus(_this3.contentRef.current);
205
170
  }, 1);
206
171
  }
207
172
  }, {
@@ -209,17 +174,18 @@ var WizardRoot = /* @__PURE__ */ (function(_Component) {
209
174
  value: function render() {
210
175
  var _ref7;
211
176
  var SWizard = this.Root;
212
- var _this$asProps2 = this.asProps, Children = _this$asProps2.Children, styles = _this$asProps2.styles;
177
+ var _this$asProps = this.asProps, Children = _this$asProps.Children, styles = _this$asProps.styles, uid = _this$asProps.uid;
213
178
  this._steps.clear();
214
- return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SWizard, _ref7.cn("SWizard", {
179
+ return _ref7 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SWizard, _ref7.cn("SWizard", {
215
180
  "render": Modal,
216
181
  "aria-label": void 0,
217
182
  "ref": this.modalRef,
218
- "aria-labelledby": this.getId()
183
+ "aria-labelledby": "".concat(uid, "-title")
219
184
  }), /* @__PURE__ */ React.createElement(Children, _ref7.cn("Children", {})));
220
185
  }
221
186
  }]);
222
- })(Component);
187
+ return WizardRoot2;
188
+ }(Component);
223
189
  _defineProperty(WizardRoot, "displayName", "Wizard");
224
190
  _defineProperty(WizardRoot, "style", style);
225
191
  _defineProperty(WizardRoot, "enhance", [i18nEnhance(localizedMessages), uniqueIDEnhancement()]);
@@ -230,14 +196,16 @@ _defineProperty(WizardRoot, "defaultProps", {
230
196
  });
231
197
  function Sidebar(props) {
232
198
  var _ref = arguments[0], _ref8;
233
- var Children = props.Children, styles = props.styles, title = props.title, id = props.id;
199
+ var Children = props.Children, styles = props.styles, title = props.title, uid = props.uid;
234
200
  var SSidebar = Box;
235
201
  var SSidebarHeader = "h2";
236
202
  var SSidebarMenu = "div";
237
- return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SSidebar, _ref8.cn("SSidebar", _objectSpread({}, assignProps({
238
- "__excludeProps": ["title", "id"]
203
+ React.useCallback(function(e) {
204
+ }, []);
205
+ return _ref8 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SSidebar, _ref8.cn("SSidebar", _objectSpread({}, assignProps({
206
+ "__excludeProps": ["title"]
239
207
  }, _ref))), title && /* @__PURE__ */ React.createElement(SSidebarHeader, _ref8.cn("SSidebarHeader", {
240
- "id": id
208
+ "id": "".concat(uid, "-title")
241
209
  }), title), /* @__PURE__ */ React.createElement(SSidebarMenu, _ref8.cn("SSidebarMenu", {
242
210
  "role": "tablist",
243
211
  "aria-orientation": "vertical"
@@ -249,13 +217,13 @@ function Step(props) {
249
217
  var Children = props.Children, styles = props.styles, active = props.active;
250
218
  if (active) {
251
219
  var _ref9;
252
- return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(SStep, _ref9.cn("SStep", _objectSpread({}, assignProps({}, _ref2))), /* @__PURE__ */ React.createElement(Children, _ref9.cn("Children", {})));
220
+ return _ref9 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SStep, _ref9.cn("SStep", _objectSpread({}, assignProps({}, _ref2))), /* @__PURE__ */ React.createElement(Children, _ref9.cn("Children", {})));
253
221
  }
254
222
  return null;
255
223
  }
256
224
  function Stepper(props) {
257
- var _ref3 = arguments[0], _ref0;
258
- var Children = props.Children, styles = props.styles, step = props.step, onActive = props.onActive, completed = props.completed, number = props.number, getI18nText = props.getI18nText, focusNext = props.focusNext, focusPrev = props.focusPrev, disabled = props.disabled;
225
+ var _ref3 = arguments[0], _ref10;
226
+ var Children = props.Children, styles = props.styles, step = props.step, active = props.active, onActive = props.onActive, completed = props.completed, disabled = props.disabled, number = props.number, getI18nText = props.getI18nText, uid = props.uid, focusNext = props.focusNext, focusPrev = props.focusPrev;
259
227
  var SStepper = Box;
260
228
  var SStepNumber = "span";
261
229
  var SStepDescription = "span";
@@ -277,56 +245,62 @@ function Stepper(props) {
277
245
  e.stopPropagation();
278
246
  }
279
247
  }, [step, onActive, focusPrev, focusNext]);
280
- return _ref0 = sstyled(styles), /* @__PURE__ */ React.createElement(SStepper, _ref0.cn("SStepper", _objectSpread({}, assignProps({
248
+ return _ref10 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SStepper, _ref10.cn("SStepper", _objectSpread({}, assignProps({
281
249
  "role": "tab",
282
- "tabIndex": disabled ? void 0 : 0,
250
+ "id": "".concat(uid, "-stepper-").concat(step),
251
+ "aria-controls": active ? "".concat(uid, "-content-").concat(step) : void 0,
252
+ "aria-disabled": disabled,
253
+ "aria-selected": active,
283
254
  "onClick": handlerClick,
284
255
  "onKeyDown": handlerKeyDown
285
- }, _ref3))), completed && /* @__PURE__ */ React.createElement(ScreenReaderOnly, _ref0.cn("ScreenReaderOnly", {}), getI18nText("completedStep")), /* @__PURE__ */ React.createElement(SStepNumber, _ref0.cn("SStepNumber", {
256
+ }, _ref3))), completed && /* @__PURE__ */ React.createElement(ScreenReaderOnly, _ref10.cn("ScreenReaderOnly", {}), getI18nText("completedStep")), /* @__PURE__ */ React.createElement(SStepNumber, _ref10.cn("SStepNumber", {
286
257
  "aria-hidden": "true"
287
- }), completed ? /* @__PURE__ */ React.createElement(SCompleted, _ref0.cn("SCompleted", {})) : number), /* @__PURE__ */ React.createElement(SStepDescription, _ref0.cn("SStepDescription", {}), /* @__PURE__ */ React.createElement(Children, _ref0.cn("Children", {}))));
258
+ }), completed ? /* @__PURE__ */ React.createElement(SCompleted, _ref10.cn("SCompleted", {})) : number), /* @__PURE__ */ React.createElement(SStepDescription, _ref10.cn("SStepDescription", {}), /* @__PURE__ */ React.createElement(Children, _ref10.cn("Children", {}))));
288
259
  }
260
+ Stepper.enhance = [keyboardFocusEnhance()];
289
261
  function Content(props) {
290
- var _ref4 = arguments[0], _ref1;
291
- var Children = props.Children, styles = props.styles;
262
+ var _ref4 = arguments[0], _ref11;
263
+ var Children = props.Children, hasChildren = props.children, styles = props.styles, uid = props.uid, step = props.step;
292
264
  var SContent = Box;
293
- return _ref1 = sstyled(styles), /* @__PURE__ */ React.createElement(SContent, _ref1.cn("SContent", _objectSpread({}, assignProps({
294
- "role": "tabpanel"
295
- }, _ref4))), /* @__PURE__ */ React.createElement(Children, _ref1.cn("Children", {})));
265
+ return _ref11 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SContent, _ref11.cn("SContent", _objectSpread({}, assignProps({
266
+ "role": "tabpanel",
267
+ "aria-labelledby": "".concat(uid, "-stepper-").concat(step),
268
+ "id": "".concat(uid, "-content-").concat(step)
269
+ }, _ref4))), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref11.cn("Children", {})) : stepName);
296
270
  }
297
271
  function StepBack(props) {
298
- var _ref5 = arguments[0], _ref10;
272
+ var _ref5 = arguments[0], _ref12;
299
273
  var SStepBack = Button;
300
- var Children = props.Children, hasChildren = props.children, styles = props.styles, getI18nText = props.getI18nText, stepName = props.stepName;
274
+ var Children = props.Children, hasChildren = props.children, styles = props.styles, getI18nText = props.getI18nText, stepName2 = props.stepName;
301
275
  var handleClick = React.useCallback(function() {
302
276
  var _props$onActive;
303
- (_props$onActive = props.onActive) === null || _props$onActive === void 0 || _props$onActive.call(props, props.step - 1);
277
+ (_props$onActive = props.onActive) === null || _props$onActive === void 0 ? void 0 : _props$onActive.call(props, props.step - 1);
304
278
  }, [props.step]);
305
- return _ref10 = sstyled(styles), /* @__PURE__ */ React.createElement(SStepBack, _ref10.cn("SStepBack", _objectSpread({}, assignProps({
279
+ return _ref12 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SStepBack, _ref12.cn("SStepBack", _objectSpread({}, assignProps({
306
280
  "use": "tertiary",
307
281
  "size": "l",
308
282
  "onClick": handleClick,
309
283
  "aria-label": getI18nText("backButton", {
310
- buttonName: stepName
284
+ buttonName: stepName2
311
285
  })
312
- }, _ref5))), /* @__PURE__ */ React.createElement(Button.Addon, null, /* @__PURE__ */ React.createElement(ArrowLeft, _ref10.cn("ArrowLeft", {}))), /* @__PURE__ */ React.createElement(Button.Text, null, hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref10.cn("Children", {})) : stepName));
286
+ }, _ref5))), /* @__PURE__ */ React.createElement(Button.Addon, null, /* @__PURE__ */ React.createElement(ArrowLeft, _ref12.cn("ArrowLeft", {}))), /* @__PURE__ */ React.createElement(Button.Text, null, hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref12.cn("Children", {})) : stepName2));
313
287
  }
314
288
  function StepNext(props) {
315
- var _ref6 = arguments[0], _ref11;
289
+ var _ref6 = arguments[0], _ref13;
316
290
  var SStepNext = Button;
317
- var Children = props.Children, hasChildren = props.children, styles = props.styles, getI18nText = props.getI18nText, stepName = props.stepName;
291
+ var Children = props.Children, hasChildren = props.children, styles = props.styles, getI18nText = props.getI18nText, stepName2 = props.stepName;
318
292
  var handleClick = React.useCallback(function() {
319
293
  var _props$onActive2;
320
- (_props$onActive2 = props.onActive) === null || _props$onActive2 === void 0 || _props$onActive2.call(props, props.step + 1);
294
+ (_props$onActive2 = props.onActive) === null || _props$onActive2 === void 0 ? void 0 : _props$onActive2.call(props, props.step + 1);
321
295
  }, [props.step]);
322
- return _ref11 = sstyled(styles), /* @__PURE__ */ React.createElement(SStepNext, _ref11.cn("SStepNext", _objectSpread({}, assignProps({
296
+ return _ref13 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SStepNext, _ref13.cn("SStepNext", _objectSpread({}, assignProps({
323
297
  "use": "tertiary",
324
298
  "size": "l",
325
299
  "onClick": handleClick,
326
300
  "aria-label": getI18nText("nextButton", {
327
- buttonName: stepName
301
+ buttonName: stepName2
328
302
  })
329
- }, _ref6))), /* @__PURE__ */ React.createElement(Button.Text, null, hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref11.cn("Children", {})) : stepName), /* @__PURE__ */ React.createElement(Button.Addon, null, /* @__PURE__ */ React.createElement(ArrowRight, _ref11.cn("ArrowRight", {}))));
303
+ }, _ref6))), /* @__PURE__ */ React.createElement(Button.Text, null, hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref13.cn("Children", {})) : stepName2), /* @__PURE__ */ React.createElement(Button.Addon, null, /* @__PURE__ */ React.createElement(ArrowRight, _ref13.cn("ArrowRight", {}))));
330
304
  }
331
305
  var Wizard = createComponent(WizardRoot, {
332
306
  Sidebar,
@@ -12,60 +12,15 @@ SSidebar {
12
12
  font-weight: var(--intergalactic-bold, 700);
13
13
  font-size: var(--intergalactic-fs-300, 16px);
14
14
  line-height: var(--intergalactic-lh-300, 150%);
15
- padding: var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-2x, 8px);
15
+ padding: var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-2x, 8px)
16
+ calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-05x, 2px));
16
17
  max-width: 220px;
17
18
  flex-shrink: 0;
18
19
  box-sizing: border-box;
19
20
  border-radius: var(--intergalactic-modal-rounded, calc(12px + 2px)) 0 0
20
21
  var(--intergalactic-modal-rounded, calc(12px + 2px));
21
22
  @media (max-width: 1060px) {
22
- width: 56px;
23
- }
24
-
25
- SStepper {
26
- display: flex;
27
- gap: var(--intergalactic-spacing-1x, 4px);
28
- font-size: var(--intergalactic-fs-200, 14px);
29
- border-radius: var(--intergalactic-control-rounded, 6px);
30
- padding: var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);
31
- cursor: pointer;
32
- position: relative;
33
- overflow: auto;
34
- line-height: var(--intergalactic-lh-200, 142%);
35
-
36
- &:focus-visible {
37
- outline-color: var(--intergalactic-keyboard-focus-invert-outline, oklch(1 0 0 / 0.7));
38
- }
39
-
40
- &:hover {
41
- background: var(--intergalactic-control-primary-advertising-hover, oklch(0.6 0.244 297.8));
42
- z-index: 2;
43
- }
44
- &[active] {
45
- background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
46
- }
47
- &:disabled,
48
- &[disabled] {
49
- opacity: var(--intergalactic-disabled-opacity, 0.4);
50
- cursor: default;
51
- pointer-events: none; /* Disable interactions */
52
- }
53
-
54
- @media (max-width: 1060px) {
55
- padding: var(--intergalactic-spacing-2x, 8px);
56
- &:hover {
57
- width: max-content;
58
- max-width: 220px;
59
- }
60
- &:hover SStepDescription {
61
- display: block;
62
- border-radius: var(--intergalactic-control-rounded, 6px);
63
- overflow: auto;
64
- }
65
- &[active]:hover SStepDescription {
66
- background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
67
- }
68
- }
23
+ width: 44px;
69
24
  }
70
25
  }
71
26
 
@@ -77,10 +32,51 @@ SSidebarHeader {
77
32
  }
78
33
  }
79
34
 
35
+ SStepper {
36
+ display: flex;
37
+ font-size: var(--intergalactic-fs-200, 14px);
38
+ border-radius: var(--intergalactic-control-rounded, 6px);
39
+ padding: var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);
40
+ cursor: pointer;
41
+ position: relative;
42
+ overflow: auto;
43
+ line-height: var(--intergalactic-lh-200, 142%);
44
+
45
+ &:hover {
46
+ background: var(--intergalactic-control-primary-advertising-hover, oklch(0.6 0.244 297.8));
47
+ z-index: 1;
48
+ }
49
+ &[active] {
50
+ background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
51
+ }
52
+ &:disabled,
53
+ &[disabled] {
54
+ opacity: var(--intergalactic-disabled-opacity, 0.4);
55
+ cursor: default;
56
+ pointer-events: none; /* Disable interactions */
57
+ }
58
+
59
+ @media (max-width: 1060px) {
60
+ padding: var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-1x, 4px);
61
+ &:hover {
62
+ width: fit-content;
63
+ max-width: 220px;
64
+ }
65
+ &:hover SStepDescription {
66
+ display: block;
67
+ border-radius: var(--intergalactic-control-rounded, 6px);
68
+ white-space: nowrap;
69
+ overflow: auto;
70
+ }
71
+ &[active]:hover SStepDescription {
72
+ background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
73
+ }
74
+ }
75
+ }
76
+
80
77
  SStepNumber {
81
78
  display: inline-block;
82
79
  min-width: 20px;
83
- text-align: center;
84
80
  }
85
81
 
86
82
  SCompleted {
@@ -89,7 +85,6 @@ SCompleted {
89
85
  }
90
86
 
91
87
  SStepDescription {
92
- overflow-wrap: anywhere;
93
88
  @media (max-width: 1060px) {
94
89
  display: none;
95
90
  }
@@ -102,10 +97,7 @@ SContent {
102
97
  0;
103
98
  background: var(--intergalactic-bg-primary-neutral, oklch(1 0 0));
104
99
  }
105
- SContent[noSidebar] {
106
- border-radius: var(--intergalactic-modal-rounded, calc(12px + 2px));
107
- }
108
100
 
109
101
  SSidebarMenu {
110
102
  display: contents;
111
- }
103
+ }
@@ -6,12 +6,12 @@ import it from "./it.json.mjs";
6
6
  import ja from "./ja.json.mjs";
7
7
  import ko from "./ko.json.mjs";
8
8
  import nl from "./nl.json.mjs";
9
- import pl from "./pl.json.mjs";
10
9
  import pt from "./pt.json.mjs";
11
- import sv from "./sv.json.mjs";
12
10
  import tr from "./tr.json.mjs";
13
11
  import vi from "./vi.json.mjs";
14
12
  import zh from "./zh.json.mjs";
13
+ import pl from "./pl.json.mjs";
14
+ import sv from "./sv.json.mjs";
15
15
  var localizedMessages = {
16
16
  de,
17
17
  en,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "Abgeschlossener Schritt";
2
2
  const backButton = "Zurück zu {buttonName}";
3
- const nextButton = "Zu {buttonName}";
3
+ const nextButton = "Weiter zu {buttonName}";
4
4
  const de = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "Paso completado";
2
2
  const backButton = "Volver a {buttonName}";
3
- const nextButton = "Ir a {buttonName}";
3
+ const nextButton = "Continuar a {buttonName}";
4
4
  const es = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "Étape terminée";
2
2
  const backButton = "Retour à {buttonName}";
3
- const nextButton = "Vers {buttonName}";
3
+ const nextButton = "Continuer vers {buttonName}";
4
4
  const fr = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "Fase completata";
2
2
  const backButton = "Torna a {buttonName}";
3
- const nextButton = "Vai a {buttonName}";
3
+ const nextButton = "Continua a {buttonName}";
4
4
  const it = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "完成したステップ";
2
2
  const backButton = "{buttonName}に戻る";
3
- const nextButton = "{buttonName}に移動";
3
+ const nextButton = "{buttonName} に移動";
4
4
  const ja = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "단계 완료됨";
2
2
  const backButton = "{buttonName} 단계로 돌아가기";
3
- const nextButton = "{buttonName} 주소로 이동";
3
+ const nextButton = "{buttonName}로 계속";
4
4
  const ko = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "Voltooide stap";
2
2
  const backButton = "Terug naar {buttonName}";
3
- const nextButton = "Naar {buttonName}";
3
+ const nextButton = "Door naar {buttonName}";
4
4
  const nl = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "Ukończony krok";
2
2
  const backButton = "Wróć do: {buttonName}";
3
- const nextButton = "Przejdź do: {buttonName}";
3
+ const nextButton = "Dalej do: {buttonName}";
4
4
  const pl = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "Etapa concluída";
2
2
  const backButton = "Voltar para {buttonName}";
3
- const nextButton = "Ir para {buttonName}";
3
+ const nextButton = "Continuar para {buttonName}";
4
4
  const pt = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "Genomfört steg";
2
2
  const backButton = "Tillbaka till {buttonName}";
3
- const nextButton = "Gå till {buttonName}";
3
+ const nextButton = "Fortsätt till {buttonName}";
4
4
  const sv = {
5
5
  completedStep,
6
6
  backButton,
@@ -1,6 +1,6 @@
1
1
  const completedStep = "Tamamlanan adım";
2
2
  const backButton = "Geri dön{buttonName}";
3
- const nextButton = "Git {buttonName}";
3
+ const nextButton = "{buttonName} adresine devam edin";
4
4
  const tr = {
5
5
  completedStep,
6
6
  backButton,