@drivenets/design-system 0.5.0 → 0.6.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/CHANGELOG.md +7 -0
- package/dist/components/ds-alert-banner/ds-alert-banner.d.ts +5 -5
- package/dist/components/ds-autocomplete/ds-autocomplete.d.ts +2 -2
- package/dist/components/ds-autocomplete/ds-autocomplete.d.ts.map +1 -1
- package/dist/components/ds-button/ds-button.d.ts +2 -2
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.d.ts +2 -0
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.types.d.ts +1 -1
- package/dist/components/ds-button/versions/ds-button-legacy/index.d.ts +2 -0
- package/dist/components/ds-card/ds-card.d.cts +5 -5
- package/dist/components/ds-card/ds-card.d.cts.map +1 -1
- package/dist/components/ds-card/ds-card.d.ts +5 -5
- package/dist/components/ds-card/ds-card.module.cjs +4 -4
- package/dist/components/ds-card/ds-card.module.js +4 -4
- package/dist/components/ds-card/ds-card.module.js.map +1 -1
- package/dist/components/ds-confirmation/ds-confirmation.d.cts +8 -8
- package/dist/components/ds-confirmation/ds-confirmation.d.cts.map +1 -1
- package/dist/components/ds-confirmation/ds-confirmation.d.ts +8 -8
- package/dist/components/ds-date-input/ds-date-input.d.cts +2 -2
- package/dist/components/ds-drawer/ds-drawer.d.cts +9 -9
- package/dist/components/ds-drawer/ds-drawer.d.ts +9 -9
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.cts +2 -2
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.cts.map +1 -1
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.ts +2 -2
- package/dist/components/ds-form-control/ds-form-control.d.cts +8 -8
- package/dist/components/ds-icon/ds-icon.d.cts +2 -2
- package/dist/components/ds-icon/ds-icon.d.ts +2 -2
- package/dist/components/ds-icon/ds-icon.d.ts.map +1 -1
- package/dist/components/ds-loader/ds-loader.d.cts +2 -2
- package/dist/components/ds-loader/ds-loader.d.ts +2 -2
- package/dist/components/ds-modal/ds-modal.d.cts +8 -8
- package/dist/components/ds-modal/ds-modal.d.ts +8 -8
- package/dist/components/ds-panel/ds-panel.cjs +112 -33
- package/dist/components/ds-panel/ds-panel.d.cts +3 -2
- package/dist/components/ds-panel/ds-panel.d.cts.map +1 -1
- package/dist/components/ds-panel/ds-panel.d.ts +3 -2
- package/dist/components/ds-panel/ds-panel.d.ts.map +1 -1
- package/dist/components/ds-panel/ds-panel.js +112 -33
- package/dist/components/ds-panel/ds-panel.js.map +1 -1
- package/dist/components/ds-panel/ds-panel.module.cjs +7 -6
- package/dist/components/ds-panel/ds-panel.module.js +7 -6
- package/dist/components/ds-panel/ds-panel.module.js.map +1 -1
- package/dist/components/ds-panel/ds-panel.types.d.cts +1 -0
- package/dist/components/ds-panel/ds-panel.types.d.cts.map +1 -1
- package/dist/components/ds-panel/ds-panel.types.d.ts +1 -0
- package/dist/components/ds-panel/ds-panel.types.d.ts.map +1 -1
- package/dist/components/ds-select/ds-select.d.cts +2 -2
- package/dist/components/ds-select/ds-select.d.ts +2 -2
- package/dist/components/ds-skeleton/ds-skeleton-circle.d.cts +2 -2
- package/dist/components/ds-skeleton/ds-skeleton-rect.d.cts +2 -2
- package/dist/components/ds-skeleton/ds-skeleton-text.d.cts +2 -2
- package/dist/components/ds-skeleton/ds-skeleton.d.cts +4 -4
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.cts +2 -2
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.ts +2 -2
- package/dist/components/ds-stepper/components/ds-step-content.cjs +31 -35
- package/dist/components/ds-stepper/components/ds-step-content.d.cts +5 -5
- package/dist/components/ds-stepper/components/ds-step-content.d.cts.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-content.d.ts +5 -5
- package/dist/components/ds-stepper/components/ds-step-content.d.ts.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-content.js +32 -36
- package/dist/components/ds-stepper/components/ds-step-content.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-next-button.cjs +34 -17
- package/dist/components/ds-stepper/components/ds-step-next-button.d.cts +8 -5
- package/dist/components/ds-stepper/components/ds-step-next-button.d.cts.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-next-button.d.ts +9 -5
- package/dist/components/ds-stepper/components/ds-step-next-button.d.ts.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-next-button.js +34 -17
- package/dist/components/ds-stepper/components/ds-step-next-button.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-separator.cjs +36 -0
- package/dist/components/ds-stepper/components/ds-step-separator.js +36 -0
- package/dist/components/ds-stepper/components/ds-step-separator.js.map +1 -0
- package/dist/components/ds-stepper/components/ds-step.cjs +145 -90
- package/dist/components/ds-stepper/components/ds-step.d.cts +24 -5
- package/dist/components/ds-stepper/components/ds-step.d.cts.map +1 -1
- package/dist/components/ds-stepper/components/ds-step.d.ts +24 -5
- package/dist/components/ds-stepper/components/ds-step.d.ts.map +1 -1
- package/dist/components/ds-stepper/components/ds-step.js +145 -90
- package/dist/components/ds-stepper/components/ds-step.js.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.cjs +75 -48
- package/dist/components/ds-stepper/ds-stepper.d.cts +7 -3
- package/dist/components/ds-stepper/ds-stepper.d.cts.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.d.ts +7 -3
- package/dist/components/ds-stepper/ds-stepper.d.ts.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.js +76 -49
- package/dist/components/ds-stepper/ds-stepper.js.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.module.cjs +17 -11
- package/dist/components/ds-stepper/ds-stepper.module.js +17 -11
- package/dist/components/ds-stepper/ds-stepper.module.js.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.types.d.cts +11 -2
- package/dist/components/ds-stepper/ds-stepper.types.d.cts.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.types.d.ts +11 -2
- package/dist/components/ds-stepper/ds-stepper.types.d.ts.map +1 -1
- package/dist/components/ds-stepper/hooks/use-stepper.js.map +1 -1
- package/dist/components/ds-stepper/hooks/use-steps.cjs +13 -11
- package/dist/components/ds-stepper/hooks/use-steps.js +13 -11
- package/dist/components/ds-stepper/hooks/use-steps.js.map +1 -1
- package/dist/components/ds-stepper/index.d.ts +4 -4
- package/dist/components/ds-table/ds-table.d.cts +2 -2
- package/dist/components/ds-tabs/ds-tabs.d.cts +5 -5
- package/dist/components/ds-tag/ds-tag.d.cts +2 -2
- package/dist/components/ds-tag/ds-tag.d.ts +2 -2
- package/dist/components/ds-tag-filter/ds-tag-filter.d.cts +2 -2
- package/dist/components/ds-tag-filter/ds-tag-filter.d.ts +2 -2
- package/dist/components/ds-toggle/ds-toggle.d.cts +2 -2
- package/dist/components/ds-toggle/ds-toggle.d.ts +2 -2
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.d.cts +5 -5
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.min.css +1 -1
- package/package.json +1 -1
- package/src/components/ds-card/ds-card.module.scss +3 -11
- package/src/components/ds-panel/ds-panel.module.scss +6 -0
- package/src/components/ds-panel/ds-panel.tsx +85 -0
- package/src/components/ds-panel/ds-panel.types.ts +1 -0
- package/src/components/ds-stepper/components/ds-step-content.tsx +25 -7
- package/src/components/ds-stepper/components/ds-step-next-button.tsx +8 -3
- package/src/components/ds-stepper/components/ds-step-separator.tsx +22 -0
- package/src/components/ds-stepper/components/ds-step.tsx +69 -10
- package/src/components/ds-stepper/ds-stepper.module.scss +193 -31
- package/src/components/ds-stepper/ds-stepper.tsx +29 -5
- package/src/components/ds-stepper/ds-stepper.types.ts +11 -1
- package/src/components/ds-stepper/hooks/use-stepper.ts +3 -1
- package/src/components/ds-stepper/hooks/use-steps.ts +3 -2
- package/src/components/ds-stepper/index.tsx +4 -4
- package/src/styles/_mixin.scss +1 -0
- package/src/styles/mixins/_disabled.scss +18 -0
|
@@ -3,73 +3,100 @@ import { useSteps } from "./hooks/use-steps.js";
|
|
|
3
3
|
import { StepperContext } from "./hooks/use-stepper.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import classNames from "classnames";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/ds-stepper/ds-stepper.tsx
|
|
9
9
|
function DsStepper(t0) {
|
|
10
|
-
const $ = c(
|
|
11
|
-
const { count, variant, activeStep, onStepChange, onComplete, children } = t0;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const $ = c(27);
|
|
11
|
+
const { count, variant, orientation: t1, floating: t2, activeStep, onStepChange, onComplete, children, className, actions } = t0;
|
|
12
|
+
const orientation = t1 === void 0 ? "vertical" : t1;
|
|
13
|
+
const floating = t2 === void 0 ? false : t2;
|
|
14
|
+
let t3;
|
|
15
|
+
if ($[0] !== activeStep || $[1] !== count || $[2] !== onComplete || $[3] !== onStepChange || $[4] !== orientation) {
|
|
16
|
+
t3 = {
|
|
15
17
|
count,
|
|
16
18
|
activeStep,
|
|
17
19
|
onStepChange,
|
|
18
|
-
onComplete
|
|
20
|
+
onComplete,
|
|
21
|
+
orientation
|
|
19
22
|
};
|
|
20
23
|
$[0] = activeStep;
|
|
21
24
|
$[1] = count;
|
|
22
25
|
$[2] = onComplete;
|
|
23
26
|
$[3] = onStepChange;
|
|
24
|
-
$[4] =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
$[4] = orientation;
|
|
28
|
+
$[5] = t3;
|
|
29
|
+
} else t3 = $[5];
|
|
30
|
+
const stepsApi = useSteps(t3);
|
|
31
|
+
const isHorizontal = orientation === "horizontal";
|
|
32
|
+
let t4;
|
|
33
|
+
if ($[6] !== floating || $[7] !== orientation || $[8] !== stepsApi || $[9] !== variant) {
|
|
34
|
+
t4 = {
|
|
30
35
|
stepsApi,
|
|
31
|
-
variant
|
|
36
|
+
variant,
|
|
37
|
+
orientation,
|
|
38
|
+
floating
|
|
32
39
|
};
|
|
33
|
-
$[
|
|
34
|
-
$[
|
|
35
|
-
$[7] = t2;
|
|
36
|
-
} else t2 = $[7];
|
|
37
|
-
let t3;
|
|
38
|
-
if ($[8] !== stepsApi) {
|
|
39
|
-
t3 = stepsApi.getRootProps();
|
|
40
|
+
$[6] = floating;
|
|
41
|
+
$[7] = orientation;
|
|
40
42
|
$[8] = stepsApi;
|
|
41
|
-
$[9] =
|
|
42
|
-
} else t3 = $[9];
|
|
43
|
-
const t4 = variant === "single";
|
|
44
|
-
let t5;
|
|
45
|
-
if ($[10] !== t4) {
|
|
46
|
-
t5 = classNames(ds_stepper_module_default.root, { [ds_stepper_module_default.variantSingle]: t4 });
|
|
43
|
+
$[9] = variant;
|
|
47
44
|
$[10] = t4;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
} else t4 = $[10];
|
|
46
|
+
let t5;
|
|
47
|
+
if ($[11] !== stepsApi) {
|
|
48
|
+
t5 = stepsApi.getRootProps();
|
|
49
|
+
$[11] = stepsApi;
|
|
50
|
+
$[12] = t5;
|
|
51
|
+
} else t5 = $[12];
|
|
52
|
+
const t6 = variant === "single";
|
|
53
|
+
let t7;
|
|
54
|
+
if ($[13] !== className || $[14] !== t6) {
|
|
55
|
+
t7 = classNames(ds_stepper_module_default.root, { [ds_stepper_module_default.variantSingle]: t6 }, className);
|
|
56
|
+
$[13] = className;
|
|
57
|
+
$[14] = t6;
|
|
58
|
+
$[15] = t7;
|
|
59
|
+
} else t7 = $[15];
|
|
60
|
+
let t8;
|
|
61
|
+
if ($[16] !== actions || $[17] !== children || $[18] !== isHorizontal) {
|
|
62
|
+
t8 = isHorizontal ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
63
|
+
className: ds_stepper_module_default.stepsContainer,
|
|
55
64
|
children
|
|
65
|
+
}), actions && /* @__PURE__ */ jsx("div", {
|
|
66
|
+
className: ds_stepper_module_default.horizontalActions,
|
|
67
|
+
children: actions
|
|
68
|
+
})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [children, actions && /* @__PURE__ */ jsx("div", {
|
|
69
|
+
className: ds_stepper_module_default.verticalActions,
|
|
70
|
+
children: actions
|
|
71
|
+
})] });
|
|
72
|
+
$[16] = actions;
|
|
73
|
+
$[17] = children;
|
|
74
|
+
$[18] = isHorizontal;
|
|
75
|
+
$[19] = t8;
|
|
76
|
+
} else t8 = $[19];
|
|
77
|
+
let t9;
|
|
78
|
+
if ($[20] !== t5 || $[21] !== t7 || $[22] !== t8) {
|
|
79
|
+
t9 = /* @__PURE__ */ jsx("div", {
|
|
80
|
+
...t5,
|
|
81
|
+
className: t7,
|
|
82
|
+
children: t8
|
|
56
83
|
});
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
} else
|
|
62
|
-
let
|
|
63
|
-
if ($[
|
|
64
|
-
|
|
65
|
-
value:
|
|
66
|
-
children:
|
|
84
|
+
$[20] = t5;
|
|
85
|
+
$[21] = t7;
|
|
86
|
+
$[22] = t8;
|
|
87
|
+
$[23] = t9;
|
|
88
|
+
} else t9 = $[23];
|
|
89
|
+
let t10;
|
|
90
|
+
if ($[24] !== t4 || $[25] !== t9) {
|
|
91
|
+
t10 = /* @__PURE__ */ jsx(StepperContext.Provider, {
|
|
92
|
+
value: t4,
|
|
93
|
+
children: t9
|
|
67
94
|
});
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
} else
|
|
72
|
-
return
|
|
95
|
+
$[24] = t4;
|
|
96
|
+
$[25] = t9;
|
|
97
|
+
$[26] = t10;
|
|
98
|
+
} else t10 = $[26];
|
|
99
|
+
return t10;
|
|
73
100
|
}
|
|
74
101
|
|
|
75
102
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-stepper.js","names":["classnames","styles","useSteps","StepperContext","DsStepperProps","DsStepper","t0","$","_c","count","variant","activeStep","onStepChange","onComplete","children","
|
|
1
|
+
{"version":3,"file":"ds-stepper.js","names":["classnames","styles","useSteps","StepperContext","DsStepperProps","DsStepper","t0","$","_c","count","variant","orientation","t1","floating","t2","activeStep","onStepChange","onComplete","children","className","actions","undefined","t3","stepsApi","isHorizontal","t4","t5","getRootProps","t6","t7","root","variantSingle","t8","stepsContainer","horizontalActions","verticalActions","t9","t10"],"sources":["../../../src/components/ds-stepper/ds-stepper.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport styles from './ds-stepper.module.scss';\nimport { useSteps } from './hooks/use-steps';\nimport { StepperContext } from './hooks/use-stepper';\nimport type { DsStepperProps } from './ds-stepper.types';\n\nexport function DsStepper({\n\tcount,\n\tvariant,\n\torientation = 'vertical',\n\tfloating = false,\n\tactiveStep,\n\tonStepChange,\n\tonComplete,\n\tchildren,\n\tclassName,\n\tactions,\n}: DsStepperProps) {\n\tconst stepsApi = useSteps({ count, activeStep, onStepChange, onComplete, orientation });\n\n\tconst isHorizontal = orientation === 'horizontal';\n\n\treturn (\n\t\t<StepperContext.Provider\n\t\t\tvalue={{\n\t\t\t\tstepsApi,\n\t\t\t\tvariant,\n\t\t\t\torientation,\n\t\t\t\tfloating,\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\t{...stepsApi.getRootProps()}\n\t\t\t\tclassName={classnames(\n\t\t\t\t\tstyles.root,\n\t\t\t\t\t{\n\t\t\t\t\t\t[styles.variantSingle]: variant === 'single',\n\t\t\t\t\t},\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{isHorizontal ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className={styles.stepsContainer}>{children}</div>\n\n\t\t\t\t\t\t{actions && <div className={styles.horizontalActions}>{actions}</div>}\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{children}\n\n\t\t\t\t\t\t{actions && <div className={styles.verticalActions}>{actions}</div>}\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</StepperContext.Provider>\n\t);\n}\n"],"mappings":";;;;;;;;AAMA,SAAOK,UAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAmB,MAAA,EAAAC,OAAAC,SAAAC,aAAAC,IAAAC,UAAAC,IAAAC,YAAAC,cAAAC,YAAAC,UAAAC,WAAAC,YAAAd;CAGzB,MAAAK,cAAAC,OAAAS,SAAA,aAAAT;CACA,MAAAC,WAAAC,OAAAO,SAAA,QAAAP;CAAgB,IAAAQ;AAAA,KAAAf,EAAA,OAAAQ,cAAAR,EAAA,OAAAE,SAAAF,EAAA,OAAAU,cAAAV,EAAA,OAAAS,gBAAAT,EAAA,OAAAI,aAAA;AAQUW,OAAA;GAAAb;GAAAM;GAAAC;GAAAC;GAAAN;GAA4D;AAAAJ,IAAA,KAAAQ;AAAAR,IAAA,KAAAE;AAAAF,IAAA,KAAAU;AAAAV,IAAA,KAAAS;AAAAT,IAAA,KAAAI;AAAAJ,IAAA,KAAAe;OAAAA,MAAAf,EAAA;CAAtF,MAAAgB,WAAiBrB,SAASoB,GAA6D;CAEvF,MAAAE,eAAqBb,gBAAgB;CAAa,IAAAc;AAAA,KAAAlB,EAAA,OAAAM,YAAAN,EAAA,OAAAI,eAAAJ,EAAA,OAAAgB,YAAAhB,EAAA,OAAAG,SAAA;AAIzCe,OAAA;GAAAF;GAAAb;GAAAC;GAAAE;GAKN;AAAAN,IAAA,KAAAM;AAAAN,IAAA,KAAAI;AAAAJ,IAAA,KAAAgB;AAAAhB,IAAA,KAAAG;AAAAH,IAAA,MAAAkB;OAAAA,MAAAlB,EAAA;CAAA,IAAAmB;AAAA,KAAAnB,EAAA,QAAAgB,UAAA;AAGIG,OAAAH,SAAQI,cAAe;AAAApB,IAAA,MAAAgB;AAAAhB,IAAA,MAAAmB;OAAAA,MAAAnB,EAAA;CAID,MAAAqB,KAAAlB,YAAY;CAAQ,IAAAmB;AAAA,KAAAtB,EAAA,QAAAY,aAAAZ,EAAA,QAAAqB,IAAA;AAHnCC,OAAA7B,WACVC,0BAAM6B,MACN,GACE7B,0BAAM8B,gBAAiBH,IACxB,EACDT,UACA;AAAAZ,IAAA,MAAAY;AAAAZ,IAAA,MAAAqB;AAAArB,IAAA,MAAAsB;OAAAA,MAAAtB,EAAA;CAAA,IAAAyB;AAAA,KAAAzB,EAAA,QAAAa,WAAAb,EAAA,QAAAW,YAAAX,EAAA,QAAAiB,cAAA;AAEAQ,OAAAR,eAAA,4CAEC,oBAAA;GAAgB,WAAAvB,0BAAMgC;GAAkBf;IAEvC,EAAAE,WAAW,oBAAA;GAAgB,WAAAnB,0BAAMiC;aAAqBd;IAAa,IAQrE,GAZA,4CAQEF,UAEAE,WAAW,oBAAA;GAAgB,WAAAnB,0BAAMkC;aAAmBf;IAAa,IAEnE;AAAAb,IAAA,MAAAa;AAAAb,IAAA,MAAAW;AAAAX,IAAA,MAAAiB;AAAAjB,IAAA,MAAAyB;OAAAA,MAAAzB,EAAA;CAAA,IAAA6B;AAAA,KAAA7B,EAAA,QAAAmB,MAAAnB,EAAA,QAAAsB,MAAAtB,EAAA,QAAAyB,IAAA;AAtBFI,OAAA,oBAAA;GAuBM,GAtBDV;GACO,WAAAG;aAQVG;IAaI;AAAAzB,IAAA,MAAAmB;AAAAnB,IAAA,MAAAsB;AAAAtB,IAAA,MAAAyB;AAAAzB,IAAA,MAAA6B;OAAAA,MAAA7B,EAAA;CAAA,IAAA8B;AAAA,KAAA9B,EAAA,QAAAkB,MAAAlB,EAAA,QAAA6B,IAAA;AA/BPC,QAAA,oBAAA,eAAA;GACQ,OAAAZ;aAOPW;IAwByB;AAAA7B,IAAA,MAAAkB;AAAAlB,IAAA,MAAA6B;AAAA7B,IAAA,MAAA8B;OAAAA,OAAA9B,EAAA;AAAA,QAhC1B8B"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/components/ds-stepper/ds-stepper.module.scss
|
|
3
3
|
var ds_stepper_module_default = {
|
|
4
|
-
"
|
|
5
|
-
"root": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
4
|
+
"dragHandle": "_dragHandle_whfa9_1",
|
|
5
|
+
"root": "_root_whfa9_1",
|
|
6
|
+
"verticalActions": "_verticalActions_whfa9_1",
|
|
7
|
+
"step": "_step_whfa9_1",
|
|
8
|
+
"variantSingle": "_variantSingle_whfa9_1",
|
|
9
|
+
"indicatorContainer": "_indicatorContainer_whfa9_1",
|
|
10
|
+
"indicator": "_indicator_whfa9_1",
|
|
11
|
+
"separator": "_separator_whfa9_1",
|
|
12
|
+
"stepContent": "_stepContent_whfa9_1",
|
|
13
|
+
"stepContentSingle": "_stepContentSingle_whfa9_1",
|
|
14
|
+
"stepLabel": "_stepLabel_whfa9_1",
|
|
15
|
+
"stepDescription": "_stepDescription_whfa9_1",
|
|
16
|
+
"stepActions": "_stepActions_whfa9_1",
|
|
17
|
+
"stepsContainer": "_stepsContainer_whfa9_1",
|
|
18
|
+
"horizontalActions": "_horizontalActions_whfa9_1",
|
|
19
|
+
"stepLabelRow": "_stepLabelRow_whfa9_1",
|
|
20
|
+
"horizontalSeparator": "_horizontalSeparator_whfa9_1"
|
|
15
21
|
};
|
|
16
22
|
|
|
17
23
|
//#endregion
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
//#region src/components/ds-stepper/ds-stepper.module.scss
|
|
2
2
|
var ds_stepper_module_default = {
|
|
3
|
-
"
|
|
4
|
-
"root": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
3
|
+
"dragHandle": "_dragHandle_whfa9_1",
|
|
4
|
+
"root": "_root_whfa9_1",
|
|
5
|
+
"verticalActions": "_verticalActions_whfa9_1",
|
|
6
|
+
"step": "_step_whfa9_1",
|
|
7
|
+
"variantSingle": "_variantSingle_whfa9_1",
|
|
8
|
+
"indicatorContainer": "_indicatorContainer_whfa9_1",
|
|
9
|
+
"indicator": "_indicator_whfa9_1",
|
|
10
|
+
"separator": "_separator_whfa9_1",
|
|
11
|
+
"stepContent": "_stepContent_whfa9_1",
|
|
12
|
+
"stepContentSingle": "_stepContentSingle_whfa9_1",
|
|
13
|
+
"stepLabel": "_stepLabel_whfa9_1",
|
|
14
|
+
"stepDescription": "_stepDescription_whfa9_1",
|
|
15
|
+
"stepActions": "_stepActions_whfa9_1",
|
|
16
|
+
"stepsContainer": "_stepsContainer_whfa9_1",
|
|
17
|
+
"horizontalActions": "_horizontalActions_whfa9_1",
|
|
18
|
+
"stepLabelRow": "_stepLabelRow_whfa9_1",
|
|
19
|
+
"horizontalSeparator": "_horizontalSeparator_whfa9_1"
|
|
14
20
|
};
|
|
15
21
|
|
|
16
22
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-stepper.module.js","names":[],"sources":["../../../src/components/ds-stepper/ds-stepper.module.scss"],"sourcesContent":[".step {\n\tpadding:
|
|
1
|
+
{"version":3,"file":"ds-stepper.module.js","names":[],"sources":["../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/components/ds-stepper/ds-stepper.module.scss","../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/styles/mixins/_disabled.scss"],"sourcesContent":["@use '../../styles/mixin' as mixins;\n\n$step-padding: var(--spacing-sm);\n$step-gap: var(--spacing-standard);\n$step-border-radius: var(--spacing-3xs);\n\n$step-single-padding-block: var(--spacing-standard);\n$step-single-padding-inline-start: var(--spacing-sm);\n$step-single-padding-inline-end: var(--spacing-md);\n$step-single-border-radius: var(--spacing-xs);\n\n$indicator-size: 36px;\n$indicator-size-single: var(--icon-width-extra-large);\n$indicator-border-width: var(--spacing-4xs);\n$indicator-border-width-current: 3px;\n$indicator-container-padding: 0 var(--spacing-4xs);\n\n$separator-width: var(--spacing-4xs);\n$separator-offset: var(--spacing-sm);\n\n$label-padding: var(--spacing-4xs) 0;\n$label-font-size: var(--font-size-md);\n$label-font-size-single: var(--font-size-sm);\n$label-line-height: 1.5;\n$label-font-weight: var(--font-weight-medium);\n$description-font-size: var(--font-size-sm);\n$description-line-height: 1.4;\n\n$actions-margin-top: var(--spacing-sm);\n$actions-gap: var(--spacing-3xs);\n\n$drag-handle-size: 20px;\n\n$horizontal-current-min-width: 256px;\n$horizontal-description-line-clamp: 2;\n\n.dragHandle {\n\tdisplay: grid;\n\tplace-items: center;\n\tflex-shrink: 0;\n\twidth: $drag-handle-size;\n\theight: $drag-handle-size;\n\tcolor: var(--color-font-secondary);\n\tcursor: grab;\n}\n.root {\n\tbackground: var(--color-background);\n\toverflow-y: auto;\n}\n\n.verticalActions {\n\tdisplay: flex;\n\tgap: $actions-gap;\n\tpadding: $step-padding;\n}\n\n.step {\n\tposition: relative;\n\tpadding: $step-padding;\n\tdisplay: flex;\n\tgap: $step-gap;\n\tbackground: none;\n\tborder: none;\n\ttext-align: start;\n\tfont-family: inherit;\n\n\t@include mixins.disabled-overlay;\n\n\t.root.variantSingle & {\n\t\tpadding-block: $step-single-padding-block;\n\t\tpadding-inline-start: $step-single-padding-inline-start;\n\t\tpadding-inline-end: $step-single-padding-inline-end;\n\t\tborder-radius: $step-single-border-radius;\n\t}\n\n\t.root:not(.variantSingle) &[data-complete] {\n\t\tcursor: pointer;\n\t}\n\n\t&[data-current] {\n\t\tborder-radius: $step-border-radius;\n\t\tbackground: var(--color-background-action-secondary-hover);\n\t}\n\n\t.indicatorContainer {\n\t\tpadding: $indicator-container-padding;\n\t\tposition: relative;\n\t\tdisplay: flex;\n\n\t\t.indicator {\n\t\t\theight: $indicator-size;\n\t\t\twidth: $indicator-size;\n\t\t\tborder: $indicator-border-width solid var(--color-border);\n\t\t\tdisplay: grid;\n\t\t\tplace-items: center;\n\t\t\tborder-radius: 100%;\n\n\t\t\t.variantSingle & {\n\t\t\t\theight: $indicator-size-single;\n\t\t\t\twidth: $indicator-size-single;\n\t\t\t}\n\t\t}\n\n\t\t&[data-complete] .indicator {\n\t\t\tcolor: var(--color-background-selected);\n\t\t\tborder-color: var(--color-background-selected);\n\t\t}\n\n\t\t&[data-current] .indicator {\n\t\t\tbackground: var(--color-background-selected);\n\t\t\tcolor: var(--white);\n\t\t\tborder: $indicator-border-width-current solid var(--white);\n\t\t}\n\n\t\t.separator {\n\t\t\tposition: absolute;\n\t\t\twidth: $separator-width;\n\t\t\theight: calc(100% - $separator-offset);\n\t\t\ttop: $indicator-size;\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc($separator-width / -2);\n\t\t\tbackground: var(--color-border);\n\t\t\tz-index: 10;\n\n\t\t\t&[data-complete] {\n\t\t\t\tbackground: var(--color-background-selected);\n\t\t\t}\n\n\t\t\t&[data-current] {\n\t\t\t\tbackground: var(--color-background-selected);\n\t\t\t}\n\t\t}\n\t}\n\n\t.stepContent {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tflex-grow: 1;\n\n\t\t&.stepContentSingle {\n\t\t\tflex-direction: row;\n\t\t\talign-items: center;\n\t\t}\n\t}\n\n\t.stepLabel {\n\t\tpadding: $label-padding;\n\t\tfont-size: $label-font-size;\n\t\tline-height: $label-line-height;\n\t\tfont-weight: $label-font-weight;\n\t\tcolor: var(--color-font-secondary);\n\n\t\t.root.variantSingle & {\n\t\t\tfont-size: $label-font-size-single;\n\t\t}\n\t}\n\n\t.stepDescription {\n\t\tmargin: 0;\n\t\tfont-size: $description-font-size;\n\t\tline-height: $description-line-height;\n\t\tcolor: var(--color-background-deselected);\n\t}\n\n\t&[data-current] {\n\t\t.stepLabel {\n\t\t\tcolor: var(--color-font-action);\n\t\t}\n\n\t\t.stepDescription {\n\t\t\tcolor: var(--color-font-main);\n\t\t}\n\t}\n\n\t&[data-complete] {\n\t\t.stepLabel {\n\t\t\tcolor: var(--color-font-main);\n\t\t}\n\n\t\t.stepDescription {\n\t\t\tcolor: var(--color-font-secondary);\n\t\t}\n\t}\n\n\t.stepContent:not(.stepContentSingle) .stepActions {\n\t\tmargin-top: $actions-margin-top;\n\t}\n\n\t.stepActions {\n\t\tmargin-inline-start: auto;\n\t\tdisplay: flex;\n\t\tgap: $actions-gap;\n\t}\n}\n\n.step[data-error] {\n\t.indicatorContainer .indicator {\n\t\tbackground: var(--color-background-danger-weak);\n\t\tcolor: var(--color-background-danger-strong);\n\t\tborder-color: var(--color-background-danger-strong);\n\t}\n\n\t.stepLabel {\n\t\tcolor: var(--color-font-danger);\n\t}\n}\n\n.root[data-orientation='horizontal'] {\n\tdisplay: flex;\n\talign-items: center;\n\tpadding: var(--spacing-xs) var(--spacing-standard);\n\n\t.stepsContainer {\n\t\tdisplay: flex;\n\t\tflex: 1 1 0;\n\t\talign-items: flex-start;\n\t\tmin-width: 0;\n\t\toverflow-x: auto;\n\t}\n\n\t.horizontalActions {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-shrink: 0;\n\t\tpadding-inline-start: var(--spacing-xs);\n\t}\n\n\t.step {\n\t\tflex: 1 1 0;\n\t\tpadding: var(--spacing-3xs) var(--spacing-xs);\n\t\tgap: var(--spacing-sm);\n\t\tborder-radius: var(--spacing-2xs);\n\t\toverflow: clip;\n\n\t\t&[data-current] {\n\t\t\tmin-width: $horizontal-current-min-width;\n\t\t\tborder-radius: var(--spacing-2xs);\n\t\t}\n\t}\n\n\t.indicatorContainer {\n\t\tpadding: 0;\n\n\t\t.indicator {\n\t\t\theight: $indicator-size;\n\t\t\twidth: $indicator-size;\n\t\t}\n\t}\n\n\t.stepContent {\n\t\tmin-width: 0;\n\t}\n\n\t.stepLabelRow {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: var(--spacing-sm);\n\t\theight: $indicator-size;\n\t\tmin-width: 0;\n\t}\n\n\t.stepLabel {\n\t\tpadding: 0;\n\t\tfont-size: var(--font-size-sm);\n\t\tline-height: var(--line-height-sm);\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tflex-shrink: 0;\n\t}\n\n\t.horizontalSeparator {\n\t\tflex: 1 1 0;\n\t\theight: var(--spacing-4xs);\n\t\tmin-width: 0;\n\t\tbackground: var(--color-border-contrast);\n\n\t\t&[data-complete] {\n\t\t\tbackground: var(--color-background-selected);\n\t\t}\n\n\t\t&[data-current] {\n\t\t\tbackground: var(--color-outline-moderate);\n\t\t}\n\t}\n\n\t.stepDescription {\n\t\tfont-size: var(--font-size-xs);\n\t\tline-height: var(--line-height-xs);\n\t\tmax-height: var(--spacing-8);\n\t\toverflow: hidden;\n\t\tdisplay: -webkit-box;\n\t\t-webkit-line-clamp: $horizontal-description-line-clamp;\n\t\t-webkit-box-orient: vertical;\n\t}\n}\n"],"mappings":""}
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
1
|
+
import { PropsWithChildren, ReactNode } from "react";
|
|
2
2
|
import * as steps from "@zag-js/steps";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-stepper/ds-stepper.types.d.ts
|
|
5
5
|
type DsStepperVariant = 'single';
|
|
6
|
+
type DsStepperOrientation = 'horizontal' | 'vertical';
|
|
6
7
|
type DsStepperProps = PropsWithChildren<{
|
|
7
8
|
variant?: DsStepperVariant;
|
|
9
|
+
orientation?: DsStepperOrientation;
|
|
10
|
+
floating?: boolean;
|
|
8
11
|
onComplete?: steps.Props['onStepComplete'];
|
|
9
12
|
activeStep?: steps.Props['step'];
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional actions rendered at the end of the stepper.
|
|
16
|
+
* Horizontal: displayed after the steps. Vertical: displayed at the bottom.
|
|
17
|
+
*/
|
|
18
|
+
actions?: ReactNode;
|
|
10
19
|
} & Pick<steps.Props, 'onStepChange' | 'count'>>;
|
|
11
20
|
//#endregion
|
|
12
|
-
export { DsStepperProps, DsStepperVariant };
|
|
21
|
+
export { DsStepperOrientation, DsStepperProps, DsStepperVariant };
|
|
13
22
|
//# sourceMappingURL=ds-stepper.types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-stepper.types.d.cts","names":[],"sources":["../../../src/components/ds-stepper/ds-stepper.types.ts"],"sourcesContent":[],"mappings":";;;;KAGY,gBAAA;KAEA,cAAA,GAAiB;
|
|
1
|
+
{"version":3,"file":"ds-stepper.types.d.cts","names":[],"sources":["../../../src/components/ds-stepper/ds-stepper.types.ts"],"sourcesContent":[],"mappings":";;;;KAGY,gBAAA;KAEA,oBAAA;AAFA,KAIA,cAAA,GAAiB,iBAJD,CAAA;EAEhB,OAAA,CAAA,EAIA,gBAJoB;EAEpB,WAAA,CAAA,EAGI,oBAHU;EAEd,QAAA,CAAA,EAAA,OAAA;EACI,UAAA,CAAA,EAED,KAAA,CAAM,KAFL,CAAA,gBAAA,CAAA;EAED,UAAM,CAAA,EACN,KAAA,CAAM,KADA,CAAA,MAAA,CAAA;EACN,SAAM,CAAA,EAAA,MAAA;EAMT;;;;EAZkC,OAAA,CAAA,EAYlC,SAZkC;IAazC,KAAK,KAAA,CAAM"}
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
1
|
+
import { PropsWithChildren, ReactNode } from "react";
|
|
2
2
|
import * as steps from "@zag-js/steps";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-stepper/ds-stepper.types.d.ts
|
|
5
5
|
type DsStepperVariant = 'single';
|
|
6
|
+
type DsStepperOrientation = 'horizontal' | 'vertical';
|
|
6
7
|
type DsStepperProps = PropsWithChildren<{
|
|
7
8
|
variant?: DsStepperVariant;
|
|
9
|
+
orientation?: DsStepperOrientation;
|
|
10
|
+
floating?: boolean;
|
|
8
11
|
onComplete?: steps.Props['onStepComplete'];
|
|
9
12
|
activeStep?: steps.Props['step'];
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional actions rendered at the end of the stepper.
|
|
16
|
+
* Horizontal: displayed after the steps. Vertical: displayed at the bottom.
|
|
17
|
+
*/
|
|
18
|
+
actions?: ReactNode;
|
|
10
19
|
} & Pick<steps.Props, 'onStepChange' | 'count'>>;
|
|
11
20
|
//#endregion
|
|
12
|
-
export { DsStepperProps, DsStepperVariant };
|
|
21
|
+
export { DsStepperOrientation, DsStepperProps, DsStepperVariant };
|
|
13
22
|
//# sourceMappingURL=ds-stepper.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-stepper.types.d.ts","names":[],"sources":["../../../src/components/ds-stepper/ds-stepper.types.ts"],"sourcesContent":[],"mappings":";;;;KAGY,gBAAA;KAEA,cAAA,GAAiB;
|
|
1
|
+
{"version":3,"file":"ds-stepper.types.d.ts","names":[],"sources":["../../../src/components/ds-stepper/ds-stepper.types.ts"],"sourcesContent":[],"mappings":";;;;KAGY,gBAAA;KAEA,oBAAA;AAFA,KAIA,cAAA,GAAiB,iBAJD,CAAA;EAEhB,OAAA,CAAA,EAIA,gBAJoB;EAEpB,WAAA,CAAA,EAGI,oBAHU;EAEd,QAAA,CAAA,EAAA,OAAA;EACI,UAAA,CAAA,EAED,KAAA,CAAM,KAFL,CAAA,gBAAA,CAAA;EAED,UAAM,CAAA,EACN,KAAA,CAAM,KADA,CAAA,MAAA,CAAA;EACN,SAAM,CAAA,EAAA,MAAA;EAMT;;;;EAZkC,OAAA,CAAA,EAYlC,SAZkC;IAazC,KAAK,KAAA,CAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-stepper.js","names":["createContext","useContext","DsStepperVariant","useSteps","StepsContext","stepsApi","ReturnType","variant","StepperContext","useStepper","context","Error"],"sources":["../../../../src/components/ds-stepper/hooks/use-stepper.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { DsStepperVariant } from '../ds-stepper.types';\nimport type { useSteps } from './use-steps';\n\ntype StepsContext = {\n\tstepsApi: ReturnType<typeof useSteps>;\n\tvariant: DsStepperVariant | undefined;\n};\n\nexport const StepperContext = createContext<StepsContext | null>(null);\n\nexport function useStepper() {\n\tconst context = useContext(StepperContext);\n\n\tif (!context) {\n\t\tthrow new Error('useStepper must be used within a DsStepper');\n\t}\n\n\treturn context;\n}\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"use-stepper.js","names":["createContext","useContext","DsStepperOrientation","DsStepperVariant","useSteps","StepsContext","stepsApi","ReturnType","variant","orientation","floating","StepperContext","useStepper","context","Error"],"sources":["../../../../src/components/ds-stepper/hooks/use-stepper.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { DsStepperOrientation, DsStepperVariant } from '../ds-stepper.types';\nimport type { useSteps } from './use-steps';\n\ntype StepsContext = {\n\tstepsApi: ReturnType<typeof useSteps>;\n\tvariant: DsStepperVariant | undefined;\n\torientation: DsStepperOrientation;\n\tfloating: boolean;\n};\n\nexport const StepperContext = createContext<StepsContext | null>(null);\n\nexport function useStepper() {\n\tconst context = useContext(StepperContext);\n\n\tif (!context) {\n\t\tthrow new Error('useStepper must be used within a DsStepper');\n\t}\n\n\treturn context;\n}\n"],"mappings":";;;AAWA,MAAaW,iBAAiBX,cAAmC,KAAK;AAEtE,SAAOY,aAAA;CACN,MAAAC,UAAgBZ,WAAWU,eAAe;AAE1C,KAAI,CAACE,QACJ,OAAM,IAAIC,MAAM,6CAA6C;AAC7D,QAEMD"}
|
|
@@ -7,32 +7,34 @@ let _zag_js_react = require("@zag-js/react");
|
|
|
7
7
|
|
|
8
8
|
//#region src/components/ds-stepper/hooks/use-steps.ts
|
|
9
9
|
function useSteps(t0) {
|
|
10
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
11
|
-
const { count, activeStep, onStepChange, onComplete } = t0;
|
|
10
|
+
const $ = (0, react_compiler_runtime.c)(9);
|
|
11
|
+
const { count, activeStep, onStepChange, onComplete, orientation } = t0;
|
|
12
12
|
const t1 = (0, react.useId)();
|
|
13
13
|
let t2;
|
|
14
|
-
if ($[0] !== activeStep || $[1] !== count || $[2] !== onComplete || $[3] !== onStepChange || $[4] !== t1) {
|
|
14
|
+
if ($[0] !== activeStep || $[1] !== count || $[2] !== onComplete || $[3] !== onStepChange || $[4] !== orientation || $[5] !== t1) {
|
|
15
15
|
t2 = {
|
|
16
16
|
id: t1,
|
|
17
17
|
count,
|
|
18
18
|
step: activeStep,
|
|
19
19
|
onStepChange,
|
|
20
|
-
onStepComplete: onComplete
|
|
20
|
+
onStepComplete: onComplete,
|
|
21
|
+
orientation
|
|
21
22
|
};
|
|
22
23
|
$[0] = activeStep;
|
|
23
24
|
$[1] = count;
|
|
24
25
|
$[2] = onComplete;
|
|
25
26
|
$[3] = onStepChange;
|
|
26
|
-
$[4] =
|
|
27
|
-
$[5] =
|
|
28
|
-
|
|
27
|
+
$[4] = orientation;
|
|
28
|
+
$[5] = t1;
|
|
29
|
+
$[6] = t2;
|
|
30
|
+
} else t2 = $[6];
|
|
29
31
|
const service = (0, _zag_js_react.useMachine)(_zag_js_steps.machine, t2);
|
|
30
32
|
let t3;
|
|
31
|
-
if ($[
|
|
33
|
+
if ($[7] !== service) {
|
|
32
34
|
t3 = _zag_js_steps.connect(service, _zag_js_react.normalizeProps);
|
|
33
|
-
$[
|
|
34
|
-
$[
|
|
35
|
-
} else t3 = $[
|
|
35
|
+
$[7] = service;
|
|
36
|
+
$[8] = t3;
|
|
37
|
+
} else t3 = $[8];
|
|
36
38
|
return t3;
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -5,32 +5,34 @@ import { normalizeProps, useMachine } from "@zag-js/react";
|
|
|
5
5
|
|
|
6
6
|
//#region src/components/ds-stepper/hooks/use-steps.ts
|
|
7
7
|
function useSteps(t0) {
|
|
8
|
-
const $ = c(
|
|
9
|
-
const { count, activeStep, onStepChange, onComplete } = t0;
|
|
8
|
+
const $ = c(9);
|
|
9
|
+
const { count, activeStep, onStepChange, onComplete, orientation } = t0;
|
|
10
10
|
const t1 = useId();
|
|
11
11
|
let t2;
|
|
12
|
-
if ($[0] !== activeStep || $[1] !== count || $[2] !== onComplete || $[3] !== onStepChange || $[4] !== t1) {
|
|
12
|
+
if ($[0] !== activeStep || $[1] !== count || $[2] !== onComplete || $[3] !== onStepChange || $[4] !== orientation || $[5] !== t1) {
|
|
13
13
|
t2 = {
|
|
14
14
|
id: t1,
|
|
15
15
|
count,
|
|
16
16
|
step: activeStep,
|
|
17
17
|
onStepChange,
|
|
18
|
-
onStepComplete: onComplete
|
|
18
|
+
onStepComplete: onComplete,
|
|
19
|
+
orientation
|
|
19
20
|
};
|
|
20
21
|
$[0] = activeStep;
|
|
21
22
|
$[1] = count;
|
|
22
23
|
$[2] = onComplete;
|
|
23
24
|
$[3] = onStepChange;
|
|
24
|
-
$[4] =
|
|
25
|
-
$[5] =
|
|
26
|
-
|
|
25
|
+
$[4] = orientation;
|
|
26
|
+
$[5] = t1;
|
|
27
|
+
$[6] = t2;
|
|
28
|
+
} else t2 = $[6];
|
|
27
29
|
const service = useMachine(steps.machine, t2);
|
|
28
30
|
let t3;
|
|
29
|
-
if ($[
|
|
31
|
+
if ($[7] !== service) {
|
|
30
32
|
t3 = steps.connect(service, normalizeProps);
|
|
31
|
-
$[
|
|
32
|
-
$[
|
|
33
|
-
} else t3 = $[
|
|
33
|
+
$[7] = service;
|
|
34
|
+
$[8] = t3;
|
|
35
|
+
} else t3 = $[8];
|
|
34
36
|
return t3;
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-steps.js","names":["useId","steps","normalizeProps","useMachine","DsStepperProps","UseSteps","Pick","useSteps","t0","$","_c","count","activeStep","onStepChange","onComplete","t1","t2","id","step","onStepComplete","service","machine","t3","connect"],"sources":["../../../../src/components/ds-stepper/hooks/use-steps.ts"],"sourcesContent":["import { useId } from 'react';\nimport * as steps from '@zag-js/steps';\nimport { normalizeProps, useMachine } from '@zag-js/react';\nimport type { DsStepperProps } from '../ds-stepper.types';\n\ntype UseSteps = Pick<DsStepperProps, 'activeStep' | 'onStepChange' | 'count' | 'onComplete'>;\n\nexport function useSteps({ count, activeStep, onStepChange, onComplete }: UseSteps) {\n\tconst service = useMachine(steps.machine, {\n\t\tid: useId(),\n\t\tcount,\n\t\tstep: activeStep,\n\t\tonStepChange,\n\t\tonStepComplete: onComplete,\n\t});\n\n\treturn steps.connect(service, normalizeProps);\n}\n"],"mappings":";;;;;;AAOA,SAAOO,SAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAkB,MAAA,EAAAC,OAAAC,YAAAC,cAAAC,
|
|
1
|
+
{"version":3,"file":"use-steps.js","names":["useId","steps","normalizeProps","useMachine","DsStepperProps","UseSteps","Pick","useSteps","t0","$","_c","count","activeStep","onStepChange","onComplete","orientation","t1","t2","id","step","onStepComplete","service","machine","t3","connect"],"sources":["../../../../src/components/ds-stepper/hooks/use-steps.ts"],"sourcesContent":["import { useId } from 'react';\nimport * as steps from '@zag-js/steps';\nimport { normalizeProps, useMachine } from '@zag-js/react';\nimport type { DsStepperProps } from '../ds-stepper.types';\n\ntype UseSteps = Pick<DsStepperProps, 'activeStep' | 'onStepChange' | 'count' | 'onComplete' | 'orientation'>;\n\nexport function useSteps({ count, activeStep, onStepChange, onComplete, orientation }: UseSteps) {\n\tconst service = useMachine(steps.machine, {\n\t\tid: useId(),\n\t\tcount,\n\t\tstep: activeStep,\n\t\tonStepChange,\n\t\tonStepComplete: onComplete,\n\t\torientation,\n\t});\n\n\treturn steps.connect(service, normalizeProps);\n}\n"],"mappings":";;;;;;AAOA,SAAOO,SAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAkB,MAAA,EAAAC,OAAAC,YAAAC,cAAAC,YAAAC,gBAAAP;CAEnB,MAAAQ,KAAAhB,OAAO;CAAA,IAAAiB;AAAA,KAAAR,EAAA,OAAAG,cAAAH,EAAA,OAAAE,SAAAF,EAAA,OAAAK,cAAAL,EAAA,OAAAI,gBAAAJ,EAAA,OAAAM,eAAAN,EAAA,OAAAO,IAAA;AAD8BC,OAAA;GAAAC,IACrCF;GAAOL;GAAAQ,MAELP;GAAUC;GAAAO,gBAEAN;GAAUC;GAE1B;AAAAN,IAAA,KAAAG;AAAAH,IAAA,KAAAE;AAAAF,IAAA,KAAAK;AAAAL,IAAA,KAAAI;AAAAJ,IAAA,KAAAM;AAAAN,IAAA,KAAAO;AAAAP,IAAA,KAAAQ;OAAAA,MAAAR,EAAA;CAPD,MAAAY,UAAgBlB,WAAWF,MAAKqB,SAAUL,GAOxC;CAAC,IAAAM;AAAA,KAAAd,EAAA,OAAAY,SAAA;AAEIE,OAAAtB,MAAKuB,QAASH,SAASnB,eAAe;AAAAO,IAAA,KAAAY;AAAAZ,IAAA,KAAAc;OAAAA,MAAAd,EAAA;AAAA,QAAtCc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DsStepperProps, DsStepperVariant } from "./ds-stepper.types.js";
|
|
1
|
+
import { DsStepperOrientation, DsStepperProps, DsStepperVariant } from "./ds-stepper.types.js";
|
|
2
2
|
import { DsStepper } from "./ds-stepper.js";
|
|
3
|
-
import { DsStep } from "./components/ds-step.js";
|
|
4
|
-
import { DsStepContent } from "./components/ds-step-content.js";
|
|
5
|
-
import { DsNextStepButton } from "./components/ds-step-next-button.js";
|
|
3
|
+
import { DsStep, DsStepProps } from "./components/ds-step.js";
|
|
4
|
+
import { DsStepContent, DsStepContentProps } from "./components/ds-step-content.js";
|
|
5
|
+
import { DsNextStepButton, DsNextStepButtonProps } from "./components/ds-step-next-button.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsDataTableProps } from "./ds-table.types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime61 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-table/ds-table.d.ts
|
|
5
5
|
/**
|
|
@@ -38,7 +38,7 @@ declare const DsTable: <TData extends {
|
|
|
38
38
|
columnVisibility: externalColumnVisibility,
|
|
39
39
|
onColumnVisibilityChange,
|
|
40
40
|
activeRowId
|
|
41
|
-
}: DsDataTableProps<TData, TValue>) =>
|
|
41
|
+
}: DsDataTableProps<TData, TValue>) => react_jsx_runtime61.JSX.Element;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { DsTable };
|
|
44
44
|
//# sourceMappingURL=ds-table.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsTabsContentProps, DsTabsListProps, DsTabsProps, DsTabsTabProps } from "./ds-tabs.types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime51 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-tabs/ds-tabs.d.ts
|
|
5
5
|
declare const DsTabs: {
|
|
@@ -12,12 +12,12 @@ declare const DsTabs: {
|
|
|
12
12
|
className,
|
|
13
13
|
style,
|
|
14
14
|
children
|
|
15
|
-
}: DsTabsProps) =>
|
|
15
|
+
}: DsTabsProps) => react_jsx_runtime51.JSX.Element;
|
|
16
16
|
List: ({
|
|
17
17
|
className,
|
|
18
18
|
style,
|
|
19
19
|
children
|
|
20
|
-
}: DsTabsListProps) =>
|
|
20
|
+
}: DsTabsListProps) => react_jsx_runtime51.JSX.Element;
|
|
21
21
|
Tab: ({
|
|
22
22
|
value,
|
|
23
23
|
disabled,
|
|
@@ -30,13 +30,13 @@ declare const DsTabs: {
|
|
|
30
30
|
className,
|
|
31
31
|
style,
|
|
32
32
|
children
|
|
33
|
-
}: DsTabsTabProps) =>
|
|
33
|
+
}: DsTabsTabProps) => react_jsx_runtime51.JSX.Element;
|
|
34
34
|
Content: ({
|
|
35
35
|
value,
|
|
36
36
|
className,
|
|
37
37
|
style,
|
|
38
38
|
children
|
|
39
|
-
}: DsTabsContentProps) =>
|
|
39
|
+
}: DsTabsContentProps) => react_jsx_runtime51.JSX.Element;
|
|
40
40
|
};
|
|
41
41
|
//#endregion
|
|
42
42
|
export { DsTabs };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsTagProps } from "./ds-tag.types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime59 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-tag/ds-tag.d.ts
|
|
5
5
|
/**
|
|
@@ -19,7 +19,7 @@ declare const DsTag: ({
|
|
|
19
19
|
onDelete,
|
|
20
20
|
slots,
|
|
21
21
|
...rest
|
|
22
|
-
}: DsTagProps) =>
|
|
22
|
+
}: DsTagProps) => react_jsx_runtime59.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { DsTag };
|
|
25
25
|
//# sourceMappingURL=ds-tag.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsTagProps } from "./ds-tag.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime60 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-tag/ds-tag.d.ts
|
|
5
5
|
/**
|
|
@@ -19,7 +19,7 @@ declare const DsTag: ({
|
|
|
19
19
|
onDelete,
|
|
20
20
|
slots,
|
|
21
21
|
...rest
|
|
22
|
-
}: DsTagProps) =>
|
|
22
|
+
}: DsTagProps) => react_jsx_runtime60.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { DsTag };
|
|
25
25
|
//# sourceMappingURL=ds-tag.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsTagFilterProps } from "./ds-tag-filter.types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime60 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-tag-filter/ds-tag-filter.d.ts
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ declare const DsTagFilter: ({
|
|
|
18
18
|
onItemDelete,
|
|
19
19
|
onItemSelect,
|
|
20
20
|
onExpand
|
|
21
|
-
}: DsTagFilterProps) =>
|
|
21
|
+
}: DsTagFilterProps) => react_jsx_runtime60.JSX.Element | null;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { DsTagFilter };
|
|
24
24
|
//# sourceMappingURL=ds-tag-filter.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsTagFilterProps } from "./ds-tag-filter.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime53 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-tag-filter/ds-tag-filter.d.ts
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ declare const DsTagFilter: ({
|
|
|
18
18
|
onItemDelete,
|
|
19
19
|
onItemSelect,
|
|
20
20
|
onExpand
|
|
21
|
-
}: DsTagFilterProps) =>
|
|
21
|
+
}: DsTagFilterProps) => react_jsx_runtime53.JSX.Element | null;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { DsTagFilter };
|
|
24
24
|
//# sourceMappingURL=ds-tag-filter.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsToggleProps } from "./ds-toggle.types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime62 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-toggle/ds-toggle.d.ts
|
|
5
5
|
/**
|
|
@@ -18,7 +18,7 @@ declare const DsToggle: ({
|
|
|
18
18
|
children,
|
|
19
19
|
checked,
|
|
20
20
|
...rest
|
|
21
|
-
}: DsToggleProps) =>
|
|
21
|
+
}: DsToggleProps) => react_jsx_runtime62.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { DsToggle };
|
|
24
24
|
//# sourceMappingURL=ds-toggle.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsToggleProps } from "./ds-toggle.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime54 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-toggle/ds-toggle.d.ts
|
|
5
5
|
/**
|
|
@@ -18,7 +18,7 @@ declare const DsToggle: ({
|
|
|
18
18
|
children,
|
|
19
19
|
checked,
|
|
20
20
|
...rest
|
|
21
|
-
}: DsToggleProps) =>
|
|
21
|
+
}: DsToggleProps) => react_jsx_runtime54.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { DsToggle };
|
|
24
24
|
//# sourceMappingURL=ds-toggle.d.ts.map
|