@tedi-design-system/react 14.2.0-rc.2 → 14.2.0-rc.4
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/_virtual/index.cjs10.js +1 -1
- package/_virtual/index.cjs11.js +1 -1
- package/_virtual/index.cjs12.js +1 -1
- package/_virtual/index.cjs13.js +1 -1
- package/_virtual/index.cjs5.js +1 -1
- package/_virtual/index.cjs6.js +1 -1
- package/_virtual/index.cjs7.js +1 -1
- package/_virtual/index.cjs8.js +1 -1
- package/_virtual/index.cjs9.js +1 -1
- package/_virtual/index.es10.js +1 -1
- package/_virtual/index.es11.js +1 -1
- package/_virtual/index.es12.js +1 -1
- package/_virtual/index.es13.js +2 -4
- package/_virtual/index.es5.js +4 -2
- package/_virtual/index.es6.js +1 -1
- package/_virtual/index.es7.js +1 -1
- package/_virtual/index.es8.js +1 -1
- package/_virtual/index.es9.js +1 -1
- package/bundle-stats.html +15 -15
- package/external/@mui/system/colorManipulator.cjs.js +1 -1
- package/external/@mui/system/colorManipulator.es.js +2 -2
- package/external/@mui/system/createStyled.cjs.js +1 -1
- package/external/@mui/system/createStyled.es.js +6 -6
- package/external/@mui/system/useThemeWithoutDefault.cjs.js +1 -1
- package/external/@mui/system/useThemeWithoutDefault.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/prop-types/external/react-is/index.cjs.js +1 -1
- package/external/prop-types/external/react-is/index.es.js +1 -1
- package/external/toposort/index.cjs.js +1 -1
- package/external/toposort/index.es.js +1 -1
- package/index.css +1 -1
- package/package.json +4 -4
- package/src/community/components/stepper/step.d.ts +6 -0
- package/src/community/components/stepper/stepper-nav.cjs.js +1 -1
- package/src/community/components/stepper/stepper-nav.d.ts +6 -0
- package/src/community/components/stepper/stepper-nav.es.js +26 -26
- package/src/community/components/stepper/stepper.cjs.js +1 -1
- package/src/community/components/stepper/stepper.es.js +25 -25
- package/src/community/components/vertical-stepper/step-item/step-item.cjs.js +1 -1
- package/src/community/components/vertical-stepper/step-item/step-item.es.js +52 -55
- package/src/community/components/vertical-stepper/sub-item/sub-item.cjs.js +1 -1
- package/src/community/components/vertical-stepper/sub-item/sub-item.es.js +22 -40
- package/src/community/components/vertical-stepper/vertical-stepper.module.scss.cjs.js +1 -1
- package/src/community/components/vertical-stepper/vertical-stepper.module.scss.es.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tedi-design-system/react",
|
|
3
|
-
"version": "14.2.0-rc.
|
|
3
|
+
"version": "14.2.0-rc.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@commitlint/cli": "^19.8.1",
|
|
67
|
-
"@commitlint/config-conventional": "^
|
|
67
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
68
68
|
"@semantic-release/changelog": "^6.0.3",
|
|
69
69
|
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
70
70
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@storybook/theming": "8.6.14",
|
|
93
93
|
"@svgr/webpack": "8.1.0",
|
|
94
94
|
"@swc-node/register": "~1.9.1",
|
|
95
|
-
"@swc/core": "~1.
|
|
95
|
+
"@swc/core": "~1.14.0",
|
|
96
96
|
"@swc/helpers": "~0.5.11",
|
|
97
97
|
"@testing-library/dom": "^9.3.4",
|
|
98
98
|
"@testing-library/jest-dom": "^6.4.2",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"next": "^14.1.3",
|
|
133
133
|
"prettier": "^2.8.8",
|
|
134
134
|
"replace-in-file": "^7.1.0",
|
|
135
|
-
"rollup-plugin-visualizer": "^
|
|
135
|
+
"rollup-plugin-visualizer": "^6.0.5",
|
|
136
136
|
"sass": "^1.83.1",
|
|
137
137
|
"showdown": "^2.1.0",
|
|
138
138
|
"storybook": "8.4.2",
|
|
@@ -25,6 +25,12 @@ export interface StepProps {
|
|
|
25
25
|
* Mark the step as completed
|
|
26
26
|
*/
|
|
27
27
|
completed?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Show completed icon next to the step label
|
|
30
|
+
* When true, a checkmark icon is displayed next to the step label even when the step is not marked as completed.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
showCompletedIcon?: boolean;
|
|
28
34
|
}
|
|
29
35
|
export declare const Step: (props: StepProps) => JSX.Element | null;
|
|
30
36
|
export default Step;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),m=require("../../../../external/classnames/index.cjs.js"),I=require("react"),g=require("../icon/icon.cjs.js"),s=require("./stepper.module.scss.cjs.js"),w=require("./stepper-context.cjs.js"),k=require("../../../tedi/providers/label-provider/use-labels.cjs.js"),A=require("../../helpers/hooks/use-layout.cjs.js"),v=b=>{const{getLabel:p}=k.useLabels(),{items:c,ariaLabel:f,completedLabel:x=p("stepper.completed"),notCompletedLabel:_=p("stepper.not-completed")}=b,h=A.useLayout(["mobile"]),{activeStep:i,handleActiveStepChange:N,allowStepLabelClick:l}=I.useContext(w.StepperContext),j=c.filter(e=>e.completed).map(e=>e.index),S=e=>typeof l=="boolean"?!l:l==="completed"?!e.completed:!(l==="completed-or-next"&&(e.completed||e.index===i+1||e.index===Math.max(...j)+1)),L=e=>{const{label:o,completed:a,index:n,id:y,showCompletedIcon:d}=e,r=n===i,C=n<=i,u=S(e),q=m.default(s.default["stepper__nav-item"],{[s.default["stepper__nav-item--disabled"]]:u},{[s.default["stepper__nav-item--active"]]:C},{[s.default["stepper__nav-item--completed"]]:a}),M=m.default(s.default["stepper__nav-item-label"],{"visually-hidden":h&&!r});return t.jsxs("li",{className:q,children:[t.jsxs("button",{type:"button",role:"tab","aria-selected":r,"aria-controls":y,className:s.default["stepper__nav-item-inner"],onClick:()=>N(n),disabled:u,children:[t.jsxs("span",{className:s.default["stepper__nav-item-counter"],children:[(a||d)&&t.jsx(g.Icon,{name:"done",size:18}),!a&&!d&&n+1]}),t.jsx("span",{className:M,children:o}),a&&t.jsx("span",{className:"visually-hidden",children:x}),!a&&!r&&t.jsx("span",{className:"visually-hidden",children:_})]}),r&&t.jsx("span",{className:s.default["stepper__nav-item-arrow"]})]})};return t.jsx("nav",{role:"tablist","aria-label":f,children:t.jsx("ol",{className:s.default.stepper__nav,children:c.map((e,o)=>t.jsx(L,{...e},o))})})};exports.StepperNav=v;exports.default=v;
|
|
@@ -15,6 +15,12 @@ export interface StepperNavItem {
|
|
|
15
15
|
* The position of the step
|
|
16
16
|
*/
|
|
17
17
|
index: number;
|
|
18
|
+
/**
|
|
19
|
+
* Show completed icon next to the step label
|
|
20
|
+
* When true, a checkmark icon is displayed next to the step label even when the step is not marked as completed.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
showCompletedIcon?: boolean;
|
|
18
24
|
}
|
|
19
25
|
export interface StepperNavProps {
|
|
20
26
|
/**
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import v from "../../../../external/classnames/index.es.js";
|
|
3
3
|
import g from "react";
|
|
4
4
|
import { Icon as j } from "../icon/icon.es.js";
|
|
5
5
|
import t from "./stepper.module.scss.es.js";
|
|
6
6
|
import { StepperContext as k } from "./stepper-context.es.js";
|
|
7
|
-
import { useLabels as
|
|
8
|
-
import { useLayout as
|
|
9
|
-
const
|
|
10
|
-
const { getLabel: c } =
|
|
7
|
+
import { useLabels as A } from "../../../tedi/providers/label-provider/use-labels.es.js";
|
|
8
|
+
import { useLayout as B } from "../../helpers/hooks/use-layout.es.js";
|
|
9
|
+
const J = (b) => {
|
|
10
|
+
const { getLabel: c } = A(), {
|
|
11
11
|
items: m,
|
|
12
|
-
ariaLabel:
|
|
13
|
-
completedLabel:
|
|
14
|
-
notCompletedLabel:
|
|
15
|
-
} =
|
|
16
|
-
const { label: p, completed: s, index: r, id:
|
|
12
|
+
ariaLabel: f,
|
|
13
|
+
completedLabel: _ = c("stepper.completed"),
|
|
14
|
+
notCompletedLabel: h = c("stepper.not-completed")
|
|
15
|
+
} = b, N = B(["mobile"]), { activeStep: o, handleActiveStepChange: x, allowStepLabelClick: l } = g.useContext(k), S = m.filter((e) => e.completed).map((e) => e.index), L = (e) => typeof l == "boolean" ? !l : l === "completed" ? !e.completed : !(l === "completed-or-next" && (e.completed || e.index === o + 1 || e.index === Math.max(...S) + 1)), y = (e) => {
|
|
16
|
+
const { label: p, completed: s, index: r, id: C, showCompletedIcon: d } = e, n = r === o, I = r <= o, u = L(e), M = v(
|
|
17
17
|
t["stepper__nav-item"],
|
|
18
|
-
{ [t["stepper__nav-item--disabled"]]:
|
|
19
|
-
{ [t["stepper__nav-item--active"]]:
|
|
18
|
+
{ [t["stepper__nav-item--disabled"]]: u },
|
|
19
|
+
{ [t["stepper__nav-item--active"]]: I },
|
|
20
20
|
{ [t["stepper__nav-item--completed"]]: s }
|
|
21
|
-
),
|
|
22
|
-
"visually-hidden":
|
|
21
|
+
), w = v(t["stepper__nav-item-label"], {
|
|
22
|
+
"visually-hidden": N && !n
|
|
23
23
|
});
|
|
24
|
-
return /* @__PURE__ */ i("li", { className:
|
|
24
|
+
return /* @__PURE__ */ i("li", { className: M, children: [
|
|
25
25
|
/* @__PURE__ */ i(
|
|
26
26
|
"button",
|
|
27
27
|
{
|
|
28
28
|
type: "button",
|
|
29
29
|
role: "tab",
|
|
30
30
|
"aria-selected": n,
|
|
31
|
-
"aria-controls":
|
|
31
|
+
"aria-controls": C,
|
|
32
32
|
className: t["stepper__nav-item-inner"],
|
|
33
|
-
onClick: () =>
|
|
34
|
-
disabled:
|
|
33
|
+
onClick: () => x(r),
|
|
34
|
+
disabled: u,
|
|
35
35
|
children: [
|
|
36
36
|
/* @__PURE__ */ i("span", { className: t["stepper__nav-item-counter"], children: [
|
|
37
|
-
s && /* @__PURE__ */ a(j, { name: "done", size: 18 }),
|
|
38
|
-
!s && r + 1
|
|
37
|
+
(s || d) && /* @__PURE__ */ a(j, { name: "done", size: 18 }),
|
|
38
|
+
!s && !d && r + 1
|
|
39
39
|
] }),
|
|
40
|
-
/* @__PURE__ */ a("span", { className:
|
|
41
|
-
s && /* @__PURE__ */ a("span", { className: "visually-hidden", children:
|
|
42
|
-
!s && !n && /* @__PURE__ */ a("span", { className: "visually-hidden", children:
|
|
40
|
+
/* @__PURE__ */ a("span", { className: w, children: p }),
|
|
41
|
+
s && /* @__PURE__ */ a("span", { className: "visually-hidden", children: _ }),
|
|
42
|
+
!s && !n && /* @__PURE__ */ a("span", { className: "visually-hidden", children: h })
|
|
43
43
|
]
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
46
|
n && /* @__PURE__ */ a("span", { className: t["stepper__nav-item-arrow"] })
|
|
47
47
|
] });
|
|
48
48
|
};
|
|
49
|
-
return /* @__PURE__ */ a("nav", { role: "tablist", "aria-label":
|
|
49
|
+
return /* @__PURE__ */ a("nav", { role: "tablist", "aria-label": f, children: /* @__PURE__ */ a("ol", { className: t.stepper__nav, children: m.map((e, p) => /* @__PURE__ */ a(y, { ...e }, p)) }) });
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
J as StepperNav,
|
|
53
|
+
J as default
|
|
54
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),w=require("../../../../external/classnames/index.cjs.js"),t=require("react"),q=require("./step.cjs.js"),j=require("./stepper.module.scss.cjs.js"),H=require("./stepper-context.cjs.js"),g=require("./stepper-nav.cjs.js"),I=require("../card/card-header/card-header.cjs.js"),R=require("../card/card.cjs.js"),B=require("../card/card-content/card-content.cjs.js"),h=a=>{const{activeStep:n,defaultActiveStep:N,onActiveStepChange:s,allowStepLabelClick:p=!0,children:k,className:d,ariaLabel:u,completedLabel:m,notCompletedLabel:S,card:c}=a,[v,y]=t.useState(N||0),o=t.useCallback((e=a.activeStep)=>typeof e<"u",[a.activeStep]),C=t.useCallback(e=>{s==null||s(e),o(n)||y(e)},[n,o,s]),f=t.useMemo(()=>o(n)?n:v,[n,v,o]),i=t.Children.map(k,e=>t.isValidElement(e)&&e.type===q.Step?e:null),x=i==null?void 0:i.map((e,l)=>t.cloneElement(e,{key:l,index:l,...e.props})),b=()=>t.Children.toArray(a.children).filter(e=>t.isValidElement(e)&&e.type===q.Step).map((e,l)=>{const{label:L,completed:P,id:V,showCompletedIcon:_}=e.props;return{label:L,completed:!!P,index:l,id:V,showCompletedIcon:_}}),M=t.useMemo(()=>({activeStep:f,handleActiveStepChange:C,allowStepLabelClick:p}),[p,f,C]),A=w.default(j.default.stepper,d,{[j.default["stepper--card"]]:!!c}),E=()=>{if(c){const e=c===!0?{}:c;return r.jsxs(R.Card,{padding:1.5,...e,"data-name":"stepper",className:A,children:[r.jsx(I.CardHeader,{padding:0,background:"white",children:r.jsx(g.StepperNav,{items:b(),ariaLabel:u,completedLabel:m,notCompletedLabel:S})}),r.jsx(B.CardContent,{children:x})]})}return r.jsxs("div",{"data-name":"stepper",className:d,children:[r.jsx(g.StepperNav,{items:b(),ariaLabel:u,completedLabel:m,notCompletedLabel:S}),x]})};return r.jsx(H.StepperContext.Provider,{value:M,children:E()})};exports.Stepper=h;exports.default=h;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import _ from "../../../../external/classnames/index.es.js";
|
|
3
3
|
import t from "react";
|
|
4
4
|
import { Step as k } from "./step.es.js";
|
|
5
5
|
import y from "./stepper.module.scss.es.js";
|
|
6
6
|
import { StepperContext as B } from "./stepper-context.es.js";
|
|
7
7
|
import { StepperNav as N } from "./stepper-nav.es.js";
|
|
8
8
|
import { CardHeader as H } from "../card/card-header/card-header.es.js";
|
|
9
|
-
import { Card as
|
|
10
|
-
import { CardContent as
|
|
11
|
-
const
|
|
9
|
+
import { Card as R } from "../card/card.es.js";
|
|
10
|
+
import { CardContent as q } from "../card/card-content/card-content.es.js";
|
|
11
|
+
const W = (a) => {
|
|
12
12
|
const {
|
|
13
13
|
activeStep: r,
|
|
14
14
|
defaultActiveStep: x,
|
|
15
15
|
onActiveStepChange: n,
|
|
16
|
-
allowStepLabelClick:
|
|
16
|
+
allowStepLabelClick: i = !0,
|
|
17
17
|
children: A,
|
|
18
18
|
className: m,
|
|
19
19
|
ariaLabel: d,
|
|
20
20
|
completedLabel: u,
|
|
21
21
|
notCompletedLabel: f,
|
|
22
22
|
card: p
|
|
23
|
-
} =
|
|
24
|
-
(e =
|
|
25
|
-
[
|
|
23
|
+
} = a, [C, E] = t.useState(x || 0), s = t.useCallback(
|
|
24
|
+
(e = a.activeStep) => typeof e < "u",
|
|
25
|
+
[a.activeStep]
|
|
26
26
|
), S = t.useCallback(
|
|
27
27
|
(e) => {
|
|
28
28
|
n == null || n(e), s(r) || E(e);
|
|
@@ -31,20 +31,20 @@ const U = (o) => {
|
|
|
31
31
|
), v = t.useMemo(
|
|
32
32
|
() => s(r) ? r : C,
|
|
33
33
|
[r, C, s]
|
|
34
|
-
),
|
|
35
|
-
key:
|
|
36
|
-
index:
|
|
34
|
+
), c = t.Children.map(A, (e) => t.isValidElement(e) && e.type === k ? e : null), b = c == null ? void 0 : c.map((e, l) => t.cloneElement(e, {
|
|
35
|
+
key: l,
|
|
36
|
+
index: l,
|
|
37
37
|
...e.props
|
|
38
|
-
})), h = () => t.Children.toArray(
|
|
39
|
-
const { label: V, completed: j, id:
|
|
40
|
-
return { label: V, completed: !!j, index:
|
|
38
|
+
})), h = () => t.Children.toArray(a.children).filter((e) => t.isValidElement(e) && e.type === k).map((e, l) => {
|
|
39
|
+
const { label: V, completed: j, id: w, showCompletedIcon: I } = e.props;
|
|
40
|
+
return { label: V, completed: !!j, index: l, id: w, showCompletedIcon: I };
|
|
41
41
|
}), L = t.useMemo(
|
|
42
|
-
() => ({ activeStep: v, handleActiveStepChange: S, allowStepLabelClick:
|
|
43
|
-
[
|
|
44
|
-
), M =
|
|
42
|
+
() => ({ activeStep: v, handleActiveStepChange: S, allowStepLabelClick: i }),
|
|
43
|
+
[i, v, S]
|
|
44
|
+
), M = _(y.stepper, m, {
|
|
45
45
|
[y["stepper--card"]]: !!p
|
|
46
|
-
}), P = () => p ? /* @__PURE__ */ g(
|
|
47
|
-
/* @__PURE__ */
|
|
46
|
+
}), P = () => p ? /* @__PURE__ */ g(R, { padding: 1.5, ...p === !0 ? {} : p, "data-name": "stepper", className: M, children: [
|
|
47
|
+
/* @__PURE__ */ o(H, { padding: 0, background: "white", children: /* @__PURE__ */ o(
|
|
48
48
|
N,
|
|
49
49
|
{
|
|
50
50
|
items: h(),
|
|
@@ -53,9 +53,9 @@ const U = (o) => {
|
|
|
53
53
|
notCompletedLabel: f
|
|
54
54
|
}
|
|
55
55
|
) }),
|
|
56
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ o(q, { children: b })
|
|
57
57
|
] }) : /* @__PURE__ */ g("div", { "data-name": "stepper", className: m, children: [
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ o(
|
|
59
59
|
N,
|
|
60
60
|
{
|
|
61
61
|
items: h(),
|
|
@@ -66,9 +66,9 @@ const U = (o) => {
|
|
|
66
66
|
),
|
|
67
67
|
b
|
|
68
68
|
] });
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ o(B.Provider, { value: L, children: P() });
|
|
70
70
|
};
|
|
71
71
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
W as Stepper,
|
|
73
|
+
W as default
|
|
74
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("../../../../../external/classnames/index.cjs.js"),I=require("react"),j=require("../../../../tedi/components/base/typography/text/text.cjs.js"),c=require("../../../../tedi/components/base/icon/icon.cjs.js"),k=require("../../../../tedi/components/buttons/collapse/collapse.cjs.js"),s=require("../vertical-stepper.module.scss.cjs.js"),i=require("../../../../tedi/components/layout/grid/row.cjs.js"),o=require("../../../../tedi/components/layout/grid/col.cjs.js"),R=({children:t,className:h,isSelected:p,hasIcon:r,title:d,href:N,onClick:u,state:l="default",info:a,isOpen:m,onToggle:x})=>{const[g,q]=I.useState(!1),f=m??g,v=n=>{x&&x(n),m===void 0&&q(n)},y=C.default(s.default["stepper-item"],{[s.default[l]]:l,[s.default.selected]:p,[s.default["has-info"]]:a&&!t,[s.default["info-with-children"]]:a&&t,[s.default["stepper-collapse-open"]]:f},h);return e.jsxs("li",{role:"treeitem","aria-selected":p,className:y,children:[e.jsx("span",{className:s.default["stepper-counter"]}),e.jsx("div",{className:s.default["stepper-content"],children:t?e.jsx(k.Collapse,{onToggle:v,open:f,hideCollapseText:!0,id:"vertical-stepper-collapse",className:s.default["stepper-item-collapse"],title:e.jsxs(e.Fragment,{children:[e.jsx(i.Row,{alignItems:"start",children:e.jsx(o.Col,{children:e.jsxs(j.Text,{element:"span",className:s.default["stepper-link"],children:[d,r&&l==="error"&&e.jsx(c.Icon,{name:"error",color:"danger",size:16,display:"inline",className:s.default["stepper-icon"]}),r&&l==="completed"&&e.jsx(c.Icon,{name:"check",color:"success",size:16,display:"inline",className:s.default["stepper-icon"]})]})})}),e.jsx(i.Row,{children:e.jsx(o.Col,{children:a})})]}),children:t&&e.jsx("ul",{className:s.default["sub-item-list"],children:t})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.default["stepper-link-container"],children:e.jsx("a",{href:N,onClick:n=>{n.preventDefault(),u&&u()},children:e.jsxs(j.Text,{element:"span",className:s.default["stepper-link"],children:[d,r&&l==="error"&&e.jsx(c.Icon,{name:"error",color:"danger",size:16,display:"inline",className:s.default["stepper-icon"]}),r&&l==="completed"&&e.jsx(c.Icon,{name:"check",color:"success",size:16,display:"inline",className:s.default["stepper-icon"]})]})})}),e.jsx(i.Row,{children:e.jsx(o.Col,{children:a})})]})}),e.jsx("div",{className:s.default["stepper-line"]})]})};exports.StepItem=R;
|
|
@@ -1,97 +1,94 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { Text as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { Collapse as
|
|
7
|
-
import
|
|
8
|
-
import { Row as
|
|
9
|
-
import { Col as
|
|
1
|
+
import { jsxs as i, jsx as s, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import j from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import I from "react";
|
|
4
|
+
import { Text as v } from "../../../../tedi/components/base/typography/text/text.es.js";
|
|
5
|
+
import { Icon as t } from "../../../../tedi/components/base/icon/icon.es.js";
|
|
6
|
+
import { Collapse as R } from "../../../../tedi/components/buttons/collapse/collapse.es.js";
|
|
7
|
+
import e from "../vertical-stepper.module.scss.es.js";
|
|
8
|
+
import { Row as c } from "../../../../tedi/components/layout/grid/row.es.js";
|
|
9
|
+
import { Col as o } from "../../../../tedi/components/layout/grid/col.es.js";
|
|
10
10
|
const E = ({
|
|
11
|
-
children:
|
|
12
|
-
className:
|
|
11
|
+
children: l,
|
|
12
|
+
className: k,
|
|
13
13
|
isSelected: m,
|
|
14
|
-
hasIcon:
|
|
14
|
+
hasIcon: p,
|
|
15
15
|
title: d,
|
|
16
|
-
href:
|
|
17
|
-
onClick:
|
|
18
|
-
state:
|
|
16
|
+
href: x,
|
|
17
|
+
onClick: f,
|
|
18
|
+
state: r = "default",
|
|
19
19
|
info: a,
|
|
20
|
-
isOpen:
|
|
20
|
+
isOpen: h,
|
|
21
21
|
onToggle: N
|
|
22
22
|
}) => {
|
|
23
|
-
const [
|
|
24
|
-
N && N(
|
|
25
|
-
},
|
|
26
|
-
|
|
23
|
+
const [y, z] = I.useState(!1), u = h ?? y, C = (n) => {
|
|
24
|
+
N && N(n), h === void 0 && z(n);
|
|
25
|
+
}, T = j(
|
|
26
|
+
e["stepper-item"],
|
|
27
27
|
{
|
|
28
|
-
[r
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
28
|
+
[e[r]]: r,
|
|
29
|
+
[e.selected]: m,
|
|
30
|
+
[e["has-info"]]: a && !l,
|
|
31
|
+
[e["info-with-children"]]: a && l,
|
|
32
|
+
[e["stepper-collapse-open"]]: u
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
k
|
|
35
35
|
);
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
36
|
+
return /* @__PURE__ */ i("li", { role: "treeitem", "aria-selected": m, className: T, children: [
|
|
37
|
+
/* @__PURE__ */ s("span", { className: e["stepper-counter"] }),
|
|
38
|
+
/* @__PURE__ */ s("div", { className: e["stepper-content"], children: l ? /* @__PURE__ */ s(
|
|
39
|
+
R,
|
|
40
40
|
{
|
|
41
|
-
onToggle:
|
|
41
|
+
onToggle: C,
|
|
42
42
|
open: u,
|
|
43
43
|
hideCollapseText: !0,
|
|
44
44
|
id: "vertical-stepper-collapse",
|
|
45
|
-
className:
|
|
46
|
-
title: /* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
45
|
+
className: e["stepper-item-collapse"],
|
|
46
|
+
title: /* @__PURE__ */ i(g, { children: [
|
|
47
|
+
/* @__PURE__ */ s(c, { alignItems: "start", children: /* @__PURE__ */ s(o, { children: /* @__PURE__ */ i(v, { element: "span", className: e["stepper-link"], children: [
|
|
48
48
|
d,
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
p && r === "error" && /* @__PURE__ */ s(
|
|
50
|
+
t,
|
|
51
51
|
{
|
|
52
52
|
name: "error",
|
|
53
53
|
color: "danger",
|
|
54
54
|
size: 16,
|
|
55
55
|
display: "inline",
|
|
56
|
-
className:
|
|
56
|
+
className: e["stepper-icon"]
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
p && r === "completed" && /* @__PURE__ */ s(
|
|
60
|
+
t,
|
|
61
61
|
{
|
|
62
62
|
name: "check",
|
|
63
63
|
color: "success",
|
|
64
64
|
size: 16,
|
|
65
65
|
display: "inline",
|
|
66
|
-
className:
|
|
66
|
+
className: e["stepper-icon"]
|
|
67
67
|
}
|
|
68
68
|
)
|
|
69
69
|
] }) }) }),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ s(c, { children: /* @__PURE__ */ s(o, { children: a }) })
|
|
71
71
|
] }),
|
|
72
|
-
children:
|
|
72
|
+
children: l && /* @__PURE__ */ s("ul", { className: e["sub-item-list"], children: l })
|
|
73
73
|
}
|
|
74
|
-
) : /* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
74
|
+
) : /* @__PURE__ */ i(g, { children: [
|
|
75
|
+
/* @__PURE__ */ s("div", { className: e["stepper-link-container"], children: /* @__PURE__ */ s(
|
|
76
76
|
"a",
|
|
77
77
|
{
|
|
78
|
-
href:
|
|
79
|
-
onClick: (
|
|
80
|
-
|
|
78
|
+
href: x,
|
|
79
|
+
onClick: (n) => {
|
|
80
|
+
n.preventDefault(), f && f();
|
|
81
81
|
},
|
|
82
|
-
className:
|
|
83
|
-
children: /* @__PURE__ */ s(k, { children: [
|
|
82
|
+
children: /* @__PURE__ */ i(v, { element: "span", className: e["stepper-link"], children: [
|
|
84
83
|
d,
|
|
85
|
-
/* @__PURE__ */ s("
|
|
86
|
-
|
|
87
|
-
o && l === "completed" && /* @__PURE__ */ e(c, { name: "check", color: "success", size: 16, display: "inline" })
|
|
88
|
-
] })
|
|
84
|
+
p && r === "error" && /* @__PURE__ */ s(t, { name: "error", color: "danger", size: 16, display: "inline", className: e["stepper-icon"] }),
|
|
85
|
+
p && r === "completed" && /* @__PURE__ */ s(t, { name: "check", color: "success", size: 16, display: "inline", className: e["stepper-icon"] })
|
|
89
86
|
] })
|
|
90
87
|
}
|
|
91
88
|
) }),
|
|
92
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ s(c, { children: /* @__PURE__ */ s(o, { children: a }) })
|
|
93
90
|
] }) }),
|
|
94
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ s("div", { className: e["stepper-line"] })
|
|
95
92
|
] });
|
|
96
93
|
};
|
|
97
94
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("../../../../../external/classnames/index.cjs.js"),f=require("../../../../tedi/components/base/typography/text/text.cjs.js"),i=require("../../../../tedi/components/base/icon/icon.cjs.js"),s=require("../vertical-stepper.module.scss.cjs.js"),j=({children:n,className:r,state:t="default",isSelected:l,hasIcon:a,title:c,href:u,as:d="a",onClick:m})=>{const o=d,x=p.default(s.default["sub-item"],{[s.default[t]]:t,[s.default.selected]:l},r);return e.jsxs(e.Fragment,{children:[e.jsxs("li",{role:"treeitem",className:x,"aria-selected":l,children:[e.jsx("span",{className:s.default["sub-item-dot-container"],children:e.jsx("span",{className:s.default["sub-item-dot"]})}),e.jsx("span",{className:s.default["sub-item-text"],children:e.jsx(o,{href:u,onClick:m,className:s.default["sub-item-link"],children:e.jsxs(f.Text,{element:"span",className:s.default["sub-item-title"],children:[c,a&&t==="error"&&e.jsx(i.Icon,{name:"error",color:"danger",size:16,display:"inline",className:s.default["stepper-icon"]}),a&&t==="completed"&&e.jsx(i.Icon,{name:"check",color:"success",size:16,display:"inline",className:s.default["stepper-icon"]})]})})})]}),e.jsx("div",{children:n})]})};exports.SubItem=j;
|
|
@@ -1,55 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, Fragment as b, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import f from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import { Text as h } from "../../../../tedi/components/base/typography/text/text.es.js";
|
|
4
|
-
import { Icon as
|
|
4
|
+
import { Icon as a } from "../../../../tedi/components/base/icon/icon.es.js";
|
|
5
5
|
import e from "../vertical-stepper.module.scss.es.js";
|
|
6
6
|
const z = ({
|
|
7
|
-
children:
|
|
8
|
-
className:
|
|
9
|
-
state:
|
|
10
|
-
isSelected:
|
|
11
|
-
hasIcon:
|
|
12
|
-
title:
|
|
13
|
-
href:
|
|
14
|
-
as:
|
|
15
|
-
onClick:
|
|
7
|
+
children: t,
|
|
8
|
+
className: c,
|
|
9
|
+
state: m = "default",
|
|
10
|
+
isSelected: i,
|
|
11
|
+
hasIcon: l,
|
|
12
|
+
title: n,
|
|
13
|
+
href: o,
|
|
14
|
+
as: p = "a",
|
|
15
|
+
onClick: d
|
|
16
16
|
}) => {
|
|
17
|
-
const u =
|
|
17
|
+
const u = p, N = f(
|
|
18
18
|
e["sub-item"],
|
|
19
19
|
{
|
|
20
|
-
[e[
|
|
21
|
-
[e.selected]:
|
|
20
|
+
[e[m]]: m,
|
|
21
|
+
[e.selected]: i
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
c
|
|
24
24
|
);
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ r(b, { children: [
|
|
26
|
+
/* @__PURE__ */ r("li", { role: "treeitem", className: N, "aria-selected": i, children: [
|
|
27
27
|
/* @__PURE__ */ s("span", { className: e["sub-item-dot-container"], children: /* @__PURE__ */ s("span", { className: e["sub-item-dot"] }) }),
|
|
28
|
-
/* @__PURE__ */ s("span", { className: e["sub-item-text"], children: /* @__PURE__ */ s(u, { href:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
name: "error",
|
|
34
|
-
color: "danger",
|
|
35
|
-
size: 16,
|
|
36
|
-
display: "inline",
|
|
37
|
-
className: e["radio__tooltip-icon"]
|
|
38
|
-
}
|
|
39
|
-
),
|
|
40
|
-
m && r === "completed" && /* @__PURE__ */ s(
|
|
41
|
-
l,
|
|
42
|
-
{
|
|
43
|
-
name: "check",
|
|
44
|
-
color: "success",
|
|
45
|
-
size: 16,
|
|
46
|
-
display: "inline",
|
|
47
|
-
className: e["radio__tooltip-icon"]
|
|
48
|
-
}
|
|
49
|
-
)
|
|
28
|
+
/* @__PURE__ */ s("span", { className: e["sub-item-text"], children: /* @__PURE__ */ s(u, { href: o, onClick: d, className: e["sub-item-link"], children: /* @__PURE__ */ r(h, { element: "span", className: e["sub-item-title"], children: [
|
|
29
|
+
n,
|
|
30
|
+
l && m === "error" && /* @__PURE__ */ s(a, { name: "error", color: "danger", size: 16, display: "inline", className: e["stepper-icon"] }),
|
|
31
|
+
l && m === "completed" && /* @__PURE__ */ s(a, { name: "check", color: "success", size: 16, display: "inline", className: e["stepper-icon"] })
|
|
50
32
|
] }) }) })
|
|
51
33
|
] }),
|
|
52
|
-
/* @__PURE__ */ s("div", { children:
|
|
34
|
+
/* @__PURE__ */ s("div", { children: t })
|
|
53
35
|
] });
|
|
54
36
|
};
|
|
55
37
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="stepper-71e70cf4",t="completed-c59c99e2",s="error-eb9ee41a",p="disabled-bfb62e80",r="selected-c539d0b0",c={stepper:e,"stepper-item":"stepper-item-e267f101","stepper-separator":"stepper-separator-9dd26e0d","info-with-children":"info-with-children-02cbca6b","stepper-collapse-open":"stepper-collapse-open-65c57c8f","stepper-line":"stepper-line-0db6c4be",completed:t,"stepper-counter":"stepper-counter-5b8e1c15","stepper-link":"stepper-link-2ff892c1",error:s,disabled:p,default:"default-8405064b",selected:r,"stepper-content":"stepper-content-931e3146","stepper-item-collapse":"stepper-item-collapse-aec95d4f","sub-item-list":"sub-item-list-27bfca48","sub-item":"sub-item-8061f7a9","sub-item-children":"sub-item-children-5f7e590a","sub-item-dot":"sub-item-dot-7329e3ad","sub-item-dot-container":"sub-item-dot-container-16d7de04","sub-item-text":"sub-item-text-77a4a125","stepper--compact":"stepper--compact-04f601b0","has-info":"has-info-6196e454","stepper-link-container":"stepper-link-container-36f9e633"
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="stepper-71e70cf4",t="completed-c59c99e2",s="error-eb9ee41a",p="disabled-bfb62e80",r="selected-c539d0b0",c={stepper:e,"stepper-item":"stepper-item-e267f101","stepper-separator":"stepper-separator-9dd26e0d","info-with-children":"info-with-children-02cbca6b","stepper-collapse-open":"stepper-collapse-open-65c57c8f","stepper-line":"stepper-line-0db6c4be",completed:t,"stepper-counter":"stepper-counter-5b8e1c15","stepper-link":"stepper-link-2ff892c1",error:s,disabled:p,default:"default-8405064b",selected:r,"stepper-content":"stepper-content-931e3146","stepper-item-collapse":"stepper-item-collapse-aec95d4f","stepper-icon":"stepper-icon-f48fc356","sub-item-list":"sub-item-list-27bfca48","sub-item":"sub-item-8061f7a9","sub-item-children":"sub-item-children-5f7e590a","sub-item-dot":"sub-item-dot-7329e3ad","sub-item-dot-container":"sub-item-dot-container-16d7de04","sub-item-text":"sub-item-text-77a4a125","sub-item-title":"sub-item-title-b97a9817","stepper--compact":"stepper--compact-04f601b0","has-info":"has-info-6196e454","stepper-link-container":"stepper-link-container-36f9e633"};exports.completed=t;exports.default=c;exports.disabled=p;exports.error=s;exports.selected=r;exports.stepper=e;
|
|
@@ -14,16 +14,17 @@ const e = "stepper-71e70cf4", t = "completed-c59c99e2", p = "error-eb9ee41a", s
|
|
|
14
14
|
selected: r,
|
|
15
15
|
"stepper-content": "stepper-content-931e3146",
|
|
16
16
|
"stepper-item-collapse": "stepper-item-collapse-aec95d4f",
|
|
17
|
+
"stepper-icon": "stepper-icon-f48fc356",
|
|
17
18
|
"sub-item-list": "sub-item-list-27bfca48",
|
|
18
19
|
"sub-item": "sub-item-8061f7a9",
|
|
19
20
|
"sub-item-children": "sub-item-children-5f7e590a",
|
|
20
21
|
"sub-item-dot": "sub-item-dot-7329e3ad",
|
|
21
22
|
"sub-item-dot-container": "sub-item-dot-container-16d7de04",
|
|
22
23
|
"sub-item-text": "sub-item-text-77a4a125",
|
|
24
|
+
"sub-item-title": "sub-item-title-b97a9817",
|
|
23
25
|
"stepper--compact": "stepper--compact-04f601b0",
|
|
24
26
|
"has-info": "has-info-6196e454",
|
|
25
|
-
"stepper-link-container": "stepper-link-container-36f9e633"
|
|
26
|
-
"stepper-link-icon": "stepper-link-icon-09d5a621"
|
|
27
|
+
"stepper-link-container": "stepper-link-container-36f9e633"
|
|
27
28
|
};
|
|
28
29
|
export {
|
|
29
30
|
t as completed,
|