@semcore/wizard 2.55.0-prerelease.5 → 2.55.0-prerelease.6
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/lib/cjs/Wizard.js +109 -129
- package/lib/cjs/Wizard.js.map +1 -1
- package/lib/cjs/index.d.js +2 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/wizard.shadow.css +55 -53
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +5 -4
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/translations/de.json +1 -1
- package/lib/cjs/translations/es.json +1 -1
- package/lib/cjs/translations/fr.json +1 -1
- package/lib/cjs/translations/it.json +1 -1
- package/lib/cjs/translations/ja.json +1 -1
- package/lib/cjs/translations/ko.json +1 -1
- package/lib/cjs/translations/nl.json +1 -1
- package/lib/cjs/translations/pl.json +1 -1
- package/lib/cjs/translations/pt.json +1 -1
- package/lib/cjs/translations/sv.json +1 -1
- package/lib/cjs/translations/tr.json +1 -1
- package/lib/cjs/translations/vi.json +1 -1
- package/lib/cjs/translations/zh.json +1 -1
- package/lib/es6/Wizard.js +98 -121
- package/lib/es6/Wizard.js.map +1 -1
- package/lib/es6/index.d.js +2 -0
- package/lib/es6/index.d.js.map +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/wizard.shadow.css +55 -53
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/translations/de.json +1 -1
- package/lib/es6/translations/es.json +1 -1
- package/lib/es6/translations/fr.json +1 -1
- package/lib/es6/translations/it.json +1 -1
- package/lib/es6/translations/ja.json +1 -1
- package/lib/es6/translations/ko.json +1 -1
- package/lib/es6/translations/nl.json +1 -1
- package/lib/es6/translations/pl.json +1 -1
- package/lib/es6/translations/pt.json +1 -1
- package/lib/es6/translations/sv.json +1 -1
- package/lib/es6/translations/tr.json +1 -1
- package/lib/es6/translations/vi.json +1 -1
- package/lib/es6/translations/zh.json +1 -1
- package/lib/esm/Wizard.mjs +99 -125
- package/lib/esm/style/wizard.shadow.css +55 -53
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/translations/de.json.mjs +1 -1
- package/lib/esm/translations/es.json.mjs +1 -1
- package/lib/esm/translations/fr.json.mjs +1 -1
- package/lib/esm/translations/it.json.mjs +1 -1
- package/lib/esm/translations/ja.json.mjs +1 -1
- package/lib/esm/translations/ko.json.mjs +1 -1
- package/lib/esm/translations/nl.json.mjs +1 -1
- package/lib/esm/translations/pl.json.mjs +1 -1
- package/lib/esm/translations/pt.json.mjs +1 -1
- package/lib/esm/translations/sv.json.mjs +1 -1
- package/lib/esm/translations/tr.json.mjs +1 -1
- package/lib/esm/translations/vi.json.mjs +1 -1
- package/lib/esm/translations/zh.json.mjs +1 -1
- package/lib/types/index.d.ts +108 -3
- package/package.json +7 -7
- package/lib/cjs/Wizard.types.js +0 -2
- package/lib/cjs/Wizard.types.js.map +0 -1
- package/lib/es6/Wizard.types.js +0 -2
- package/lib/es6/Wizard.types.js.map +0 -1
- package/lib/types/Wizard.d.ts +0 -6
- package/lib/types/Wizard.types.d.ts +0 -124
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +0 -72
package/lib/esm/Wizard.mjs
CHANGED
|
@@ -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
|
|
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
|
|
8
|
-
import {
|
|
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
|
-
".
|
|
27
|
+
".___SWizard_isyd3_gg_{max-width:980px;max-height:700px;display:flex;padding:0;background:0 0}.___SSidebar_isyd3_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_isyd3_gg_{width:44px}}.___SSidebarHeader_isyd3_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_isyd3_gg_{display:none}}.___SStepper_isyd3_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%)}.___SStepper_isyd3_gg_:focus-visible{outline-color:var(--intergalactic-keyboard-focus-invert-outline, rgba(255, 255, 255, 0.7));outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}@media (hover:hover){.___SStepper_isyd3_gg_:hover{background:var(--intergalactic-control-primary-advertising-hover, rgb(150, 76, 251));z-index:1}}.___SStepper_isyd3_gg_.__active_isyd3_gg_{background:var(--intergalactic-control-primary-advertising-active, rgb(144, 65, 250))}.___SStepper_isyd3_gg_.__disabled_isyd3_gg_,.___SStepper_isyd3_gg_:disabled{opacity:var(--intergalactic-disabled-opacity, 0.4);cursor:default;pointer-events:none}@media (max-width:1060px){.___SStepper_isyd3_gg_{padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-1x, 4px)}@media (hover:hover){.___SStepper_isyd3_gg_:hover{width:-moz-fit-content;width:fit-content;max-width:220px}.___SStepper_isyd3_gg_:hover .___SStepDescription_isyd3_gg_{display:block;border-radius:var(--intergalactic-control-rounded, 6px);white-space:nowrap;overflow:auto}.___SStepper_isyd3_gg_.__active_isyd3_gg_:hover .___SStepDescription_isyd3_gg_{background:var(--intergalactic-control-primary-advertising-active, rgb(144, 65, 250))}}}.___SStepNumber_isyd3_gg_{display:inline-block;min-width:20px}.___SCompleted_isyd3_gg_{margin-top:1px}@media (max-width:1060px){.___SStepDescription_isyd3_gg_{display:none}}.___SContent_isyd3_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_isyd3_gg_{display:contents}",
|
|
26
28
|
/*__inner_css_end__*/
|
|
27
|
-
"
|
|
29
|
+
"isyd3_gg_"
|
|
28
30
|
), /*__reshadow_css_end__*/
|
|
29
31
|
{
|
|
30
|
-
"__SWizard": "
|
|
31
|
-
"__SStepNumber": "
|
|
32
|
-
"__SCompleted": "
|
|
33
|
-
"__SContent": "
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"__SStepper": "
|
|
38
|
-
"_active": "
|
|
39
|
-
"_disabled": "
|
|
40
|
-
"__SStepDescription": "
|
|
41
|
-
"__SSidebarHeader": "___SSidebarHeader_xpswz_gg_"
|
|
32
|
+
"__SWizard": "___SWizard_isyd3_gg_",
|
|
33
|
+
"__SStepNumber": "___SStepNumber_isyd3_gg_",
|
|
34
|
+
"__SCompleted": "___SCompleted_isyd3_gg_",
|
|
35
|
+
"__SContent": "___SContent_isyd3_gg_",
|
|
36
|
+
"__SSidebarMenu": "___SSidebarMenu_isyd3_gg_",
|
|
37
|
+
"__SSidebar": "___SSidebar_isyd3_gg_",
|
|
38
|
+
"__SSidebarHeader": "___SSidebarHeader_isyd3_gg_",
|
|
39
|
+
"__SStepper": "___SStepper_isyd3_gg_",
|
|
40
|
+
"_active": "__active_isyd3_gg_",
|
|
41
|
+
"_disabled": "__disabled_isyd3_gg_",
|
|
42
|
+
"__SStepDescription": "___SStepDescription_isyd3_gg_"
|
|
42
43
|
})
|
|
43
44
|
);
|
|
44
|
-
var WizardRoot = /* @__PURE__ */
|
|
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 =
|
|
52
|
-
_defineProperty(_this, "_steps", /* @__PURE__ */ new Map());
|
|
53
|
-
_defineProperty(_this, "modalRef", /* @__PURE__ */ React.createRef());
|
|
54
|
-
_defineProperty(_this, "contentRef", /* @__PURE__ */ React.createRef());
|
|
55
|
-
_defineProperty(_this, "
|
|
56
|
-
|
|
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, "
|
|
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
|
|
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
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
103
|
+
uid: this.asProps.uid
|
|
132
104
|
};
|
|
133
105
|
}
|
|
134
106
|
}, {
|
|
135
107
|
key: "getContentProps",
|
|
136
108
|
value: function getContentProps() {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
ref: this.contentRef
|
|
141
|
-
|
|
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
|
-
|
|
148
|
+
tabIndex: highlighted ? 0 : -1,
|
|
178
149
|
number,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
150
|
+
getI18nText: this.asProps.getI18nText,
|
|
151
|
+
uid: this.asProps.uid,
|
|
152
|
+
ref: function ref(node) {
|
|
182
153
|
_this2.stepperRefs[i] = node;
|
|
183
154
|
},
|
|
184
|
-
|
|
185
|
-
|
|
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
|
-
|
|
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$
|
|
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":
|
|
183
|
+
"aria-labelledby": "".concat(uid, "-title")
|
|
219
184
|
}), /* @__PURE__ */ React.createElement(Children, _ref7.cn("Children", {})));
|
|
220
185
|
}
|
|
221
186
|
}]);
|
|
222
|
-
|
|
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,
|
|
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
|
-
|
|
238
|
-
|
|
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":
|
|
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],
|
|
258
|
-
var Children = props.Children, styles = props.styles, step = props.step, onActive = props.onActive, completed = props.completed, number = props.number, getI18nText = props.getI18nText,
|
|
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
|
|
248
|
+
return _ref10 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SStepper, _ref10.cn("SStepper", _objectSpread({}, assignProps({
|
|
281
249
|
"role": "tab",
|
|
282
|
-
"
|
|
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,
|
|
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,
|
|
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],
|
|
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
|
|
294
|
-
"role": "tabpanel"
|
|
295
|
-
|
|
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],
|
|
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,
|
|
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
|
|
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
|
|
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:
|
|
284
|
+
buttonName: stepName2
|
|
311
285
|
})
|
|
312
|
-
}, _ref5))), /* @__PURE__ */ React.createElement(Button.Addon, null, /* @__PURE__ */ React.createElement(ArrowLeft,
|
|
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],
|
|
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,
|
|
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
|
|
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
|
|
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:
|
|
301
|
+
buttonName: stepName2
|
|
328
302
|
})
|
|
329
|
-
}, _ref6))), /* @__PURE__ */ React.createElement(Button.Text, null, hasChildren ? /* @__PURE__ */ React.createElement(Children,
|
|
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:
|
|
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,61 @@ 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
|
+
&:focus-visible {
|
|
46
|
+
outline-color: var(--intergalactic-keyboard-focus-invert-outline, oklch(1 0 0 / 0.7));
|
|
47
|
+
outline-style: solid;
|
|
48
|
+
outline-width: 2px;
|
|
49
|
+
outline-offset: 2px;
|
|
50
|
+
transition-duration: calc(var(--intergalactic-duration-extra-fast, 100) * 1ms);
|
|
51
|
+
transition-timing-function: ease-in-out;
|
|
52
|
+
transition-property: outline-color, outline-width, outline-offset;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background: var(--intergalactic-control-primary-advertising-hover, oklch(0.6 0.244 297.8));
|
|
57
|
+
z-index: 1;
|
|
58
|
+
}
|
|
59
|
+
&[active] {
|
|
60
|
+
background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
|
|
61
|
+
}
|
|
62
|
+
&:disabled,
|
|
63
|
+
&[disabled] {
|
|
64
|
+
opacity: var(--intergalactic-disabled-opacity, 0.4);
|
|
65
|
+
cursor: default;
|
|
66
|
+
pointer-events: none; /* Disable interactions */
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (max-width: 1060px) {
|
|
70
|
+
padding: var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-1x, 4px);
|
|
71
|
+
&:hover {
|
|
72
|
+
width: fit-content;
|
|
73
|
+
max-width: 220px;
|
|
74
|
+
}
|
|
75
|
+
&:hover SStepDescription {
|
|
76
|
+
display: block;
|
|
77
|
+
border-radius: var(--intergalactic-control-rounded, 6px);
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
overflow: auto;
|
|
80
|
+
}
|
|
81
|
+
&[active]:hover SStepDescription {
|
|
82
|
+
background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
80
87
|
SStepNumber {
|
|
81
88
|
display: inline-block;
|
|
82
89
|
min-width: 20px;
|
|
83
|
-
text-align: center;
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
SCompleted {
|
|
@@ -89,7 +95,6 @@ SCompleted {
|
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
SStepDescription {
|
|
92
|
-
overflow-wrap: anywhere;
|
|
93
98
|
@media (max-width: 1060px) {
|
|
94
99
|
display: none;
|
|
95
100
|
}
|
|
@@ -102,9 +107,6 @@ SContent {
|
|
|
102
107
|
0;
|
|
103
108
|
background: var(--intergalactic-bg-primary-neutral, oklch(1 0 0));
|
|
104
109
|
}
|
|
105
|
-
SContent[noSidebar] {
|
|
106
|
-
border-radius: var(--intergalactic-modal-rounded, calc(12px + 2px));
|
|
107
|
-
}
|
|
108
110
|
|
|
109
111
|
SSidebarMenu {
|
|
110
112
|
display: contents;
|
|
@@ -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,
|