@ttoss/react-wizard 0.8.6 → 0.8.7
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/index.cjs +40 -19
- package/dist/index.mjs +43 -19
- package/i18n/compiled/en.json +6 -0
- package/i18n/compiled/pt-BR.json +6 -0
- package/i18n/lang/en.json +4 -0
- package/i18n/lang/pt-BR.json +4 -0
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -208,6 +208,38 @@ var useWizard = () => {
|
|
|
208
208
|
|
|
209
209
|
//#endregion
|
|
210
210
|
//#region src/WizardStepList.tsx
|
|
211
|
+
var messages$1 = (0, _ttoss_react_i18n.defineMessages)({
|
|
212
|
+
stepListLabel: {
|
|
213
|
+
defaultMessage: "Wizard steps",
|
|
214
|
+
description: "Wizard: accessible name of the list of steps."
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
var WizardStepText = ({
|
|
218
|
+
step,
|
|
219
|
+
status,
|
|
220
|
+
variant
|
|
221
|
+
}) => {
|
|
222
|
+
if (!step.title && !step.description) return null;
|
|
223
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsxs)(_ttoss_ui.Box, {
|
|
224
|
+
sx: WizardStepTextWrapperSx,
|
|
225
|
+
children: [step.title && /* @__PURE__ */(0, react_jsx_runtime.jsx)(_chakra_ui_react.Steps.Title, {
|
|
226
|
+
css: getWizardStepTitleSx({
|
|
227
|
+
status,
|
|
228
|
+
variant
|
|
229
|
+
}),
|
|
230
|
+
children: step.title
|
|
231
|
+
}), step.description && /* @__PURE__ */(0, react_jsx_runtime.jsx)(_ttoss_ui.Flex, {
|
|
232
|
+
sx: WizardStepDescriptionFlexSx,
|
|
233
|
+
children: /* @__PURE__ */(0, react_jsx_runtime.jsx)(_chakra_ui_react.Steps.Description, {
|
|
234
|
+
css: getWizardStepDescriptionSx({
|
|
235
|
+
status,
|
|
236
|
+
variant
|
|
237
|
+
}),
|
|
238
|
+
children: step.description
|
|
239
|
+
})
|
|
240
|
+
})]
|
|
241
|
+
});
|
|
242
|
+
};
|
|
211
243
|
var WizardStepList = ({
|
|
212
244
|
steps,
|
|
213
245
|
currentStep,
|
|
@@ -217,11 +249,14 @@ var WizardStepList = ({
|
|
|
217
249
|
getStepStatus,
|
|
218
250
|
onStepClick
|
|
219
251
|
}) => {
|
|
252
|
+
const {
|
|
253
|
+
intl
|
|
254
|
+
} = (0, _ttoss_react_i18n.useI18n)();
|
|
220
255
|
const isHorizontal = layout === "top" || layout === "bottom";
|
|
221
256
|
const orientation = isHorizontal ? "horizontal" : "vertical";
|
|
222
257
|
return /* @__PURE__ */(0, react_jsx_runtime.jsx)(_ttoss_ui.Flex, {
|
|
223
258
|
role: "navigation",
|
|
224
|
-
"aria-label":
|
|
259
|
+
"aria-label": intl.formatMessage(messages$1.stepListLabel),
|
|
225
260
|
"data-variant": variant,
|
|
226
261
|
sx: getWizardStepListSx({
|
|
227
262
|
layout,
|
|
@@ -276,24 +311,10 @@ var WizardStepList = ({
|
|
|
276
311
|
incomplete: /* @__PURE__ */(0, react_jsx_runtime.jsx)(_chakra_ui_react.Steps.Number, {})
|
|
277
312
|
})
|
|
278
313
|
})
|
|
279
|
-
}),
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
status,
|
|
284
|
-
variant
|
|
285
|
-
}),
|
|
286
|
-
children: step.title
|
|
287
|
-
}), step.description && /* @__PURE__ */(0, react_jsx_runtime.jsx)(_ttoss_ui.Flex, {
|
|
288
|
-
sx: WizardStepDescriptionFlexSx,
|
|
289
|
-
children: /* @__PURE__ */(0, react_jsx_runtime.jsx)(_chakra_ui_react.Steps.Description, {
|
|
290
|
-
css: getWizardStepDescriptionSx({
|
|
291
|
-
status,
|
|
292
|
-
variant
|
|
293
|
-
}),
|
|
294
|
-
children: step.description
|
|
295
|
-
})
|
|
296
|
-
})]
|
|
314
|
+
}), /* @__PURE__ */(0, react_jsx_runtime.jsx)(WizardStepText, {
|
|
315
|
+
step,
|
|
316
|
+
status,
|
|
317
|
+
variant
|
|
297
318
|
})]
|
|
298
319
|
}), index < steps.length - 1 && /* @__PURE__ */(0, react_jsx_runtime.jsx)(_chakra_ui_react.Steps.Separator, {
|
|
299
320
|
css: getWizardStepSeparatorSx({
|
package/dist/index.mjs
CHANGED
|
@@ -176,6 +176,41 @@ var useWizard = () => {
|
|
|
176
176
|
|
|
177
177
|
//#endregion
|
|
178
178
|
//#region src/WizardStepList.tsx
|
|
179
|
+
var messages$1 = defineMessages({
|
|
180
|
+
stepListLabel: {
|
|
181
|
+
id: "mVLnY8",
|
|
182
|
+
defaultMessage: [{
|
|
183
|
+
"type": 0,
|
|
184
|
+
"value": "Wizard steps"
|
|
185
|
+
}]
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
var WizardStepText = ({
|
|
189
|
+
step,
|
|
190
|
+
status,
|
|
191
|
+
variant
|
|
192
|
+
}) => {
|
|
193
|
+
if (!step.title && !step.description) return null;
|
|
194
|
+
return /* @__PURE__ */jsxs(Box, {
|
|
195
|
+
sx: WizardStepTextWrapperSx,
|
|
196
|
+
children: [step.title && /* @__PURE__ */jsx(Steps.Title, {
|
|
197
|
+
css: getWizardStepTitleSx({
|
|
198
|
+
status,
|
|
199
|
+
variant
|
|
200
|
+
}),
|
|
201
|
+
children: step.title
|
|
202
|
+
}), step.description && /* @__PURE__ */jsx(Flex, {
|
|
203
|
+
sx: WizardStepDescriptionFlexSx,
|
|
204
|
+
children: /* @__PURE__ */jsx(Steps.Description, {
|
|
205
|
+
css: getWizardStepDescriptionSx({
|
|
206
|
+
status,
|
|
207
|
+
variant
|
|
208
|
+
}),
|
|
209
|
+
children: step.description
|
|
210
|
+
})
|
|
211
|
+
})]
|
|
212
|
+
});
|
|
213
|
+
};
|
|
179
214
|
var WizardStepList = ({
|
|
180
215
|
steps,
|
|
181
216
|
currentStep,
|
|
@@ -185,11 +220,14 @@ var WizardStepList = ({
|
|
|
185
220
|
getStepStatus,
|
|
186
221
|
onStepClick
|
|
187
222
|
}) => {
|
|
223
|
+
const {
|
|
224
|
+
intl
|
|
225
|
+
} = useI18n();
|
|
188
226
|
const isHorizontal = layout === "top" || layout === "bottom";
|
|
189
227
|
const orientation = isHorizontal ? "horizontal" : "vertical";
|
|
190
228
|
return /* @__PURE__ */jsx(Flex, {
|
|
191
229
|
role: "navigation",
|
|
192
|
-
"aria-label":
|
|
230
|
+
"aria-label": intl.formatMessage(messages$1.stepListLabel),
|
|
193
231
|
"data-variant": variant,
|
|
194
232
|
sx: getWizardStepListSx({
|
|
195
233
|
layout,
|
|
@@ -244,24 +282,10 @@ var WizardStepList = ({
|
|
|
244
282
|
incomplete: /* @__PURE__ */jsx(Steps.Number, {})
|
|
245
283
|
})
|
|
246
284
|
})
|
|
247
|
-
}),
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
status,
|
|
252
|
-
variant
|
|
253
|
-
}),
|
|
254
|
-
children: step.title
|
|
255
|
-
}), step.description && /* @__PURE__ */jsx(Flex, {
|
|
256
|
-
sx: WizardStepDescriptionFlexSx,
|
|
257
|
-
children: /* @__PURE__ */jsx(Steps.Description, {
|
|
258
|
-
css: getWizardStepDescriptionSx({
|
|
259
|
-
status,
|
|
260
|
-
variant
|
|
261
|
-
}),
|
|
262
|
-
children: step.description
|
|
263
|
-
})
|
|
264
|
-
})]
|
|
285
|
+
}), /* @__PURE__ */jsx(WizardStepText, {
|
|
286
|
+
step,
|
|
287
|
+
status,
|
|
288
|
+
variant
|
|
265
289
|
})]
|
|
266
290
|
}), index < steps.length - 1 && /* @__PURE__ */jsx(Steps.Separator, {
|
|
267
291
|
css: getWizardStepSeparatorSx({
|
package/i18n/compiled/en.json
CHANGED
package/i18n/compiled/pt-BR.json
CHANGED
package/i18n/lang/en.json
CHANGED
package/i18n/lang/pt-BR.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/react-wizard",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"description": "A React wizard component for guiding users through multi-step flows with configurable step list layouts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"React",
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"jest": "^30.4.2",
|
|
41
41
|
"react": "^19.2.6",
|
|
42
42
|
"tsdown": "^0.22.2",
|
|
43
|
-
"@ttoss/config": "^1.41.0",
|
|
44
|
-
"@ttoss/forms": "^0.50.6",
|
|
45
43
|
"@ttoss/i18n-cli": "^0.13.0",
|
|
46
|
-
"@ttoss/
|
|
44
|
+
"@ttoss/config": "^1.41.0",
|
|
47
45
|
"@ttoss/test-utils": "^4.4.0",
|
|
48
|
-
"@ttoss/
|
|
46
|
+
"@ttoss/react-i18n": "^2.7.2",
|
|
47
|
+
"@ttoss/ui": "^6.11.1",
|
|
48
|
+
"@ttoss/forms": "^0.50.7"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@chakra-ui/react": "^3",
|
|
52
52
|
"react": ">=16.8.0",
|
|
53
53
|
"react-icons": "^5",
|
|
54
|
-
"@ttoss/
|
|
55
|
-
"@ttoss/
|
|
54
|
+
"@ttoss/react-i18n": "^2.7.2",
|
|
55
|
+
"@ttoss/ui": "^6.11.1"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public",
|