@ttoss/react-wizard 0.8.8 → 0.9.0
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 +4 -5
- package/dist/index.d.cts +5 -14
- package/dist/index.d.mts +5 -15
- package/package.json +13 -13
package/dist/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
23
|
}
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
27
27
|
value: mod,
|
|
28
28
|
enumerable: true
|
|
29
29
|
}) : target, mod));
|
|
@@ -32,8 +32,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
let _ttoss_react_i18n = require("@ttoss/react-i18n");
|
|
33
33
|
let _ttoss_ui = require("@ttoss/ui");
|
|
34
34
|
let react = require("react");
|
|
35
|
-
|
|
36
|
-
react = __toESM(react);
|
|
35
|
+
react = __toESM(react, 1);
|
|
37
36
|
let _chakra_ui_react = require("@chakra-ui/react");
|
|
38
37
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
39
38
|
|
|
@@ -196,12 +195,12 @@ var getWizardPrimaryButtonVariant = (variant = "spotlight-accent") => {
|
|
|
196
195
|
|
|
197
196
|
//#endregion
|
|
198
197
|
//#region src/WizardContext.ts
|
|
199
|
-
var WizardContext = react
|
|
198
|
+
var WizardContext = react.createContext(null);
|
|
200
199
|
/**
|
|
201
200
|
* Hook to access the wizard context from within step content.
|
|
202
201
|
*/
|
|
203
202
|
var useWizard = () => {
|
|
204
|
-
const context = react
|
|
203
|
+
const context = react.useContext(WizardContext);
|
|
205
204
|
if (!context) throw new Error("useWizard must be used within a Wizard component.");
|
|
206
205
|
return context;
|
|
207
206
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import "@ttoss/ui";
|
|
3
4
|
//#region src/Wizard.styles.d.ts
|
|
4
5
|
type WizardVariant = 'spotlight-accent' | 'spotlight-primary' | 'primary' | 'secondary' | 'accent';
|
|
5
6
|
//#endregion
|
|
@@ -147,18 +148,8 @@ interface WizardContextValue {
|
|
|
147
148
|
* @param props.onCancel - Called when the user cancels the wizard.
|
|
148
149
|
* @param props.onStepChange - Called when the current step changes.
|
|
149
150
|
*/
|
|
150
|
-
declare const Wizard: {
|
|
151
|
-
({
|
|
152
|
-
steps,
|
|
153
|
-
layout,
|
|
154
|
-
variant,
|
|
155
|
-
onComplete,
|
|
156
|
-
onCancel,
|
|
157
|
-
onStepChange,
|
|
158
|
-
initialStep,
|
|
159
|
-
allowStepClick,
|
|
160
|
-
labels
|
|
161
|
-
}: WizardProps): import("react/jsx-runtime").JSX.Element;
|
|
151
|
+
export declare const Wizard: {
|
|
152
|
+
({ steps, layout, variant, onComplete, onCancel, onStepChange, initialStep, allowStepClick, labels }: WizardProps): React.JSX.Element;
|
|
162
153
|
displayName: string;
|
|
163
154
|
};
|
|
164
155
|
//#endregion
|
|
@@ -166,6 +157,6 @@ declare const Wizard: {
|
|
|
166
157
|
/**
|
|
167
158
|
* Hook to access the wizard context from within step content.
|
|
168
159
|
*/
|
|
169
|
-
declare const useWizard: () => WizardContextValue;
|
|
160
|
+
export declare const useWizard: () => WizardContextValue;
|
|
170
161
|
//#endregion
|
|
171
|
-
export {
|
|
162
|
+
export type { WizardContextValue, WizardLabels, WizardLayout, WizardProps, WizardStep, WizardStepStatus, WizardVariant };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
+
import "@ttoss/ui";
|
|
2
3
|
import * as React from "react";
|
|
3
|
-
|
|
4
4
|
//#region src/Wizard.styles.d.ts
|
|
5
5
|
type WizardVariant = 'spotlight-accent' | 'spotlight-primary' | 'primary' | 'secondary' | 'accent';
|
|
6
6
|
//#endregion
|
|
@@ -148,18 +148,8 @@ interface WizardContextValue {
|
|
|
148
148
|
* @param props.onCancel - Called when the user cancels the wizard.
|
|
149
149
|
* @param props.onStepChange - Called when the current step changes.
|
|
150
150
|
*/
|
|
151
|
-
declare const Wizard: {
|
|
152
|
-
({
|
|
153
|
-
steps,
|
|
154
|
-
layout,
|
|
155
|
-
variant,
|
|
156
|
-
onComplete,
|
|
157
|
-
onCancel,
|
|
158
|
-
onStepChange,
|
|
159
|
-
initialStep,
|
|
160
|
-
allowStepClick,
|
|
161
|
-
labels
|
|
162
|
-
}: WizardProps): import("react/jsx-runtime").JSX.Element;
|
|
151
|
+
export declare const Wizard: {
|
|
152
|
+
({ steps, layout, variant, onComplete, onCancel, onStepChange, initialStep, allowStepClick, labels }: WizardProps): React.JSX.Element;
|
|
163
153
|
displayName: string;
|
|
164
154
|
};
|
|
165
155
|
//#endregion
|
|
@@ -167,6 +157,6 @@ declare const Wizard: {
|
|
|
167
157
|
/**
|
|
168
158
|
* Hook to access the wizard context from within step content.
|
|
169
159
|
*/
|
|
170
|
-
declare const useWizard: () => WizardContextValue;
|
|
160
|
+
export declare const useWizard: () => WizardContextValue;
|
|
171
161
|
//#endregion
|
|
172
|
-
export {
|
|
162
|
+
export type { WizardContextValue, WizardLabels, WizardLayout, WizardProps, WizardStep, WizardStepStatus, WizardVariant };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/react-wizard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
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",
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
],
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "^30.0.0",
|
|
39
|
-
"@types/react": "^19.
|
|
40
|
-
"jest": "^30.
|
|
41
|
-
"react": "^19.
|
|
42
|
-
"tsdown": "^0.
|
|
43
|
-
"@ttoss/config": "^
|
|
44
|
-
"@ttoss/
|
|
45
|
-
"@ttoss/react-i18n": "^
|
|
46
|
-
"@ttoss/test-utils": "^
|
|
47
|
-
"@ttoss/ui": "^
|
|
48
|
-
"@ttoss/
|
|
39
|
+
"@types/react": "^19.3.0",
|
|
40
|
+
"jest": "^30.5.2",
|
|
41
|
+
"react": "^19.3.0",
|
|
42
|
+
"tsdown": "^0.23.1",
|
|
43
|
+
"@ttoss/config": "^2.0.0",
|
|
44
|
+
"@ttoss/forms": "^0.51.0",
|
|
45
|
+
"@ttoss/react-i18n": "^3.0.0",
|
|
46
|
+
"@ttoss/test-utils": "^5.0.0",
|
|
47
|
+
"@ttoss/ui": "^7.0.0",
|
|
48
|
+
"@ttoss/i18n-cli": "^0.14.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@chakra-ui/react": "^3",
|
|
52
52
|
"react": ">=16.8.0",
|
|
53
53
|
"react-icons": "^5",
|
|
54
|
-
"@ttoss/react-i18n": "^
|
|
55
|
-
"@ttoss/ui": "^
|
|
54
|
+
"@ttoss/react-i18n": "^3.0.0",
|
|
55
|
+
"@ttoss/ui": "^7.0.0"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public",
|