@tedi-design-system/react 14.1.0 → 14.2.0-rc.2

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.
Files changed (34) hide show
  1. package/_virtual/index.cjs10.js +1 -1
  2. package/_virtual/index.cjs11.js +1 -1
  3. package/_virtual/index.cjs12.js +1 -1
  4. package/_virtual/index.cjs13.js +1 -1
  5. package/_virtual/index.cjs5.js +1 -1
  6. package/_virtual/index.cjs6.js +1 -1
  7. package/_virtual/index.cjs7.js +1 -1
  8. package/_virtual/index.cjs8.js +1 -1
  9. package/_virtual/index.cjs9.js +1 -1
  10. package/_virtual/index.es10.js +1 -1
  11. package/_virtual/index.es11.js +1 -1
  12. package/_virtual/index.es12.js +1 -1
  13. package/_virtual/index.es13.js +4 -2
  14. package/_virtual/index.es5.js +2 -4
  15. package/_virtual/index.es6.js +1 -1
  16. package/_virtual/index.es7.js +1 -1
  17. package/_virtual/index.es8.js +1 -1
  18. package/_virtual/index.es9.js +1 -1
  19. package/bundle-stats.html +1 -1
  20. package/external/@mui/system/colorManipulator.cjs.js +1 -1
  21. package/external/@mui/system/colorManipulator.es.js +2 -2
  22. package/external/@mui/system/createStyled.cjs.js +1 -1
  23. package/external/@mui/system/createStyled.es.js +6 -6
  24. package/external/@mui/system/useThemeWithoutDefault.cjs.js +1 -1
  25. package/external/@mui/system/useThemeWithoutDefault.es.js +1 -1
  26. package/external/toposort/index.cjs.js +1 -1
  27. package/external/toposort/index.es.js +1 -1
  28. package/index.css +1 -1
  29. package/package.json +1 -1
  30. package/src/community/components/vertical-stepper/step-item/step-item.cjs.js +1 -1
  31. package/src/community/components/vertical-stepper/step-item/step-item.d.ts +5 -1
  32. package/src/community/components/vertical-stepper/step-item/step-item.es.js +63 -58
  33. package/src/community/components/vertical-stepper/sub-item/sub-item.cjs.js +1 -1
  34. package/src/community/components/vertical-stepper/sub-item/sub-item.es.js +37 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tedi-design-system/react",
3
- "version": "14.1.0",
3
+ "version": "14.2.0-rc.2",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("../../../../../external/classnames/index.cjs.js"),g=require("react"),i=require("../../../../tedi/components/base/icon/icon.cjs.js"),q=require("../../../../tedi/components/buttons/collapse/collapse.cjs.js"),s=require("../vertical-stepper.module.scss.cjs.js"),n=require("../../../../tedi/components/layout/grid/row.cjs.js"),o=require("../../../../tedi/components/layout/grid/col.cjs.js"),v=({children:t,className:x,isSelected:d,hasIcon:r,title:p,href:j,onClick:u,state:l="default",info:a})=>{const[m,f]=g.useState(!1),h=N.default(s.default["stepper-item"],{[s.default[l]]:l,[s.default.selected]:d,[s.default["has-info"]]:a&&!t,[s.default["info-with-children"]]:a&&t,[s.default["stepper-collapse-open"]]:m},x);return e.jsxs("li",{role:"treeitem","aria-selected":d,className:h,children:[e.jsx("span",{className:s.default["stepper-counter"]}),e.jsx("div",{className:s.default["stepper-content"],children:t?e.jsx(q.Collapse,{onToggle:c=>f(c),open:m,hideCollapseText:!0,id:"vertical-stepper-collapse",className:s.default["stepper-item-collapse"],title:e.jsxs(e.Fragment,{children:[e.jsx(n.Row,{alignItems:"start",children:e.jsxs(o.Col,{className:s.default["stepper-link"],children:[p,r&&l==="error"&&e.jsx(i.Icon,{name:"error",color:"danger",size:16,display:"inline",className:s.default["radio__tooltip-icon"]}),r&&l==="completed"&&e.jsx(i.Icon,{name:"check",color:"success",size:16,display:"inline",className:s.default["radio__tooltip-icon"]})]})}),e.jsx(n.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.jsxs("div",{className:s.default["stepper-link-container"],children:[e.jsx("a",{href:j,onClick:c=>{c.preventDefault(),u&&u()},className:s.default["stepper-link"],children:p}),e.jsxs("span",{className:s.default["stepper-link-icon"],children:[r&&l==="error"&&e.jsx(i.Icon,{name:"error",color:"danger",size:16,display:"inline"}),r&&l==="completed"&&e.jsx(i.Icon,{name:"check",color:"success",size:16,display:"inline"})]})]}),e.jsx(n.Row,{children:e.jsx(o.Col,{children:a})})]})}),e.jsx("div",{className:s.default["stepper-line"]})]})};exports.StepItem=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("../../../../../external/classnames/index.cjs.js"),C=require("react"),f=require("../../../../tedi/components/base/typography/text/text.cjs.js"),n=require("../../../../tedi/components/base/icon/icon.cjs.js"),I=require("../../../../tedi/components/buttons/collapse/collapse.cjs.js"),s=require("../vertical-stepper.module.scss.cjs.js"),c=require("../../../../tedi/components/layout/grid/row.cjs.js"),o=require("../../../../tedi/components/layout/grid/col.cjs.js"),R=({children:t,className:h,isSelected:d,hasIcon:r,title:p,href:N,onClick:u,state:l="default",info:a,isOpen:m,onToggle:x})=>{const[g,q]=C.useState(!1),j=m??g,v=i=>{x&&x(i),m===void 0&&q(i)},k=y.default(s.default["stepper-item"],{[s.default[l]]:l,[s.default.selected]:d,[s.default["has-info"]]:a&&!t,[s.default["info-with-children"]]:a&&t,[s.default["stepper-collapse-open"]]:j},h);return e.jsxs("li",{role:"treeitem","aria-selected":d,className:k,children:[e.jsx("span",{className:s.default["stepper-counter"]}),e.jsx("div",{className:s.default["stepper-content"],children:t?e.jsx(I.Collapse,{onToggle:v,open:j,hideCollapseText:!0,id:"vertical-stepper-collapse",className:s.default["stepper-item-collapse"],title:e.jsxs(e.Fragment,{children:[e.jsx(c.Row,{alignItems:"start",children:e.jsx(o.Col,{children:e.jsxs(f.Text,{className:s.default["stepper-link"],children:[p,r&&l==="error"&&e.jsx(n.Icon,{name:"error",color:"danger",size:16,display:"inline",className:s.default["radio__tooltip-icon"]}),r&&l==="completed"&&e.jsx(n.Icon,{name:"check",color:"success",size:16,display:"inline",className:s.default["radio__tooltip-icon"]})]})})}),e.jsx(c.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:i=>{i.preventDefault(),u&&u()},className:s.default["stepper-link"],children:e.jsxs(f.Text,{children:[p,e.jsxs("span",{className:s.default["stepper-link-icon"],children:[r&&l==="error"&&e.jsx(n.Icon,{name:"error",color:"danger",size:16,display:"inline"}),r&&l==="completed"&&e.jsx(n.Icon,{name:"check",color:"success",size:16,display:"inline"})]})]})})}),e.jsx(c.Row,{children:e.jsx(o.Col,{children:a})})]})}),e.jsx("div",{className:s.default["stepper-line"]})]})};exports.StepItem=R;
@@ -21,5 +21,9 @@ export interface StepItemProps {
21
21
  * Additional info components like StatusBadge, Button, Link or Text.
22
22
  */
23
23
  info?: React.ReactNode;
24
+ /** Controls the collapse externally if provided */
25
+ isOpen?: boolean;
26
+ /** Called when collapse is toggled */
27
+ onToggle?: (isOpen: boolean) => void;
24
28
  }
25
- export declare const StepItem: ({ children, className, isSelected, hasIcon, title, href, onClick, state, info, }: StepItemProps) => JSX.Element;
29
+ export declare const StepItem: ({ children, className, isSelected, hasIcon, title, href, onClick, state, info, isOpen, onToggle, }: StepItemProps) => JSX.Element;
@@ -1,94 +1,99 @@
1
- import { jsxs as s, jsx as l, Fragment as f } from "react/jsx-runtime";
2
- import v from "../../../../../external/classnames/index.es.js";
3
- import y from "react";
1
+ import { jsxs as s, jsx as e, Fragment as g } from "react/jsx-runtime";
2
+ import T from "../../../../../external/classnames/index.es.js";
3
+ import j from "react";
4
+ import { Text as k } from "../../../../tedi/components/base/typography/text/text.es.js";
4
5
  import { Icon as c } from "../../../../tedi/components/base/icon/icon.es.js";
5
- import { Collapse as x } from "../../../../tedi/components/buttons/collapse/collapse.es.js";
6
- import e from "../vertical-stepper.module.scss.es.js";
7
- import { Row as p } from "../../../../tedi/components/layout/grid/row.es.js";
8
- import { Col as n } from "../../../../tedi/components/layout/grid/col.es.js";
9
- const F = ({
6
+ import { Collapse as I } from "../../../../tedi/components/buttons/collapse/collapse.es.js";
7
+ import r from "../vertical-stepper.module.scss.es.js";
8
+ import { Row as n } from "../../../../tedi/components/layout/grid/row.es.js";
9
+ import { Col as p } from "../../../../tedi/components/layout/grid/col.es.js";
10
+ const E = ({
10
11
  children: i,
11
- className: u,
12
+ className: v,
12
13
  isSelected: m,
13
14
  hasIcon: o,
14
15
  title: d,
15
- href: g,
16
- onClick: N,
17
- state: r = "default",
18
- info: a
16
+ href: _,
17
+ onClick: h,
18
+ state: l = "default",
19
+ info: a,
20
+ isOpen: f,
21
+ onToggle: N
19
22
  }) => {
20
- const [h, k] = y.useState(!1), _ = v(
21
- e["stepper-item"],
23
+ const [x, y] = j.useState(!1), u = f ?? x, z = (t) => {
24
+ N && N(t), f === void 0 && y(t);
25
+ }, C = T(
26
+ r["stepper-item"],
22
27
  {
23
- [e[r]]: r,
24
- [e.selected]: m,
25
- [e["has-info"]]: a && !i,
26
- [e["info-with-children"]]: a && i,
27
- [e["stepper-collapse-open"]]: h
28
+ [r[l]]: l,
29
+ [r.selected]: m,
30
+ [r["has-info"]]: a && !i,
31
+ [r["info-with-children"]]: a && i,
32
+ [r["stepper-collapse-open"]]: u
28
33
  },
29
- u
34
+ v
30
35
  );
31
- return /* @__PURE__ */ s("li", { role: "treeitem", "aria-selected": m, className: _, children: [
32
- /* @__PURE__ */ l("span", { className: e["stepper-counter"] }),
33
- /* @__PURE__ */ l("div", { className: e["stepper-content"], children: i ? /* @__PURE__ */ l(
34
- x,
36
+ return /* @__PURE__ */ s("li", { role: "treeitem", "aria-selected": m, className: C, children: [
37
+ /* @__PURE__ */ e("span", { className: r["stepper-counter"] }),
38
+ /* @__PURE__ */ e("div", { className: r["stepper-content"], children: i ? /* @__PURE__ */ e(
39
+ I,
35
40
  {
36
- onToggle: (t) => k(t),
37
- open: h,
41
+ onToggle: z,
42
+ open: u,
38
43
  hideCollapseText: !0,
39
44
  id: "vertical-stepper-collapse",
40
- className: e["stepper-item-collapse"],
41
- title: /* @__PURE__ */ s(f, { children: [
42
- /* @__PURE__ */ l(p, { alignItems: "start", children: /* @__PURE__ */ s(n, { className: e["stepper-link"], children: [
45
+ className: r["stepper-item-collapse"],
46
+ title: /* @__PURE__ */ s(g, { children: [
47
+ /* @__PURE__ */ e(n, { alignItems: "start", children: /* @__PURE__ */ e(p, { children: /* @__PURE__ */ s(k, { className: r["stepper-link"], children: [
43
48
  d,
44
- o && r === "error" && /* @__PURE__ */ l(
49
+ o && l === "error" && /* @__PURE__ */ e(
45
50
  c,
46
51
  {
47
52
  name: "error",
48
53
  color: "danger",
49
54
  size: 16,
50
55
  display: "inline",
51
- className: e["radio__tooltip-icon"]
56
+ className: r["radio__tooltip-icon"]
52
57
  }
53
58
  ),
54
- o && r === "completed" && /* @__PURE__ */ l(
59
+ o && l === "completed" && /* @__PURE__ */ e(
55
60
  c,
56
61
  {
57
62
  name: "check",
58
63
  color: "success",
59
64
  size: 16,
60
65
  display: "inline",
61
- className: e["radio__tooltip-icon"]
66
+ className: r["radio__tooltip-icon"]
62
67
  }
63
68
  )
64
- ] }) }),
65
- /* @__PURE__ */ l(p, { children: /* @__PURE__ */ l(n, { children: a }) })
69
+ ] }) }) }),
70
+ /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(p, { children: a }) })
66
71
  ] }),
67
- children: i && /* @__PURE__ */ l("ul", { className: e["sub-item-list"], children: i })
72
+ children: i && /* @__PURE__ */ e("ul", { className: r["sub-item-list"], children: i })
68
73
  }
69
- ) : /* @__PURE__ */ s(f, { children: [
70
- /* @__PURE__ */ s("div", { className: e["stepper-link-container"], children: [
71
- /* @__PURE__ */ l(
72
- "a",
73
- {
74
- href: g,
75
- onClick: (t) => {
76
- t.preventDefault(), N && N();
77
- },
78
- className: e["stepper-link"],
79
- children: d
80
- }
81
- ),
82
- /* @__PURE__ */ s("span", { className: e["stepper-link-icon"], children: [
83
- o && r === "error" && /* @__PURE__ */ l(c, { name: "error", color: "danger", size: 16, display: "inline" }),
84
- o && r === "completed" && /* @__PURE__ */ l(c, { name: "check", color: "success", size: 16, display: "inline" })
85
- ] })
86
- ] }),
87
- /* @__PURE__ */ l(p, { children: /* @__PURE__ */ l(n, { children: a }) })
74
+ ) : /* @__PURE__ */ s(g, { children: [
75
+ /* @__PURE__ */ e("div", { className: r["stepper-link-container"], children: /* @__PURE__ */ e(
76
+ "a",
77
+ {
78
+ href: _,
79
+ onClick: (t) => {
80
+ t.preventDefault(), h && h();
81
+ },
82
+ className: r["stepper-link"],
83
+ children: /* @__PURE__ */ s(k, { children: [
84
+ d,
85
+ /* @__PURE__ */ s("span", { className: r["stepper-link-icon"], children: [
86
+ o && l === "error" && /* @__PURE__ */ e(c, { name: "error", color: "danger", size: 16, display: "inline" }),
87
+ o && l === "completed" && /* @__PURE__ */ e(c, { name: "check", color: "success", size: 16, display: "inline" })
88
+ ] })
89
+ ] })
90
+ }
91
+ ) }),
92
+ /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(p, { children: a }) })
88
93
  ] }) }),
89
- /* @__PURE__ */ l("div", { className: e["stepper-line"] })
94
+ /* @__PURE__ */ e("div", { className: r["stepper-line"] })
90
95
  ] });
91
96
  };
92
97
  export {
93
- F as StepItem
98
+ E as StepItem
94
99
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("../../../../../external/classnames/index.cjs.js"),i=require("../../../../tedi/components/base/icon/icon.cjs.js"),s=require("../vertical-stepper.module.scss.cjs.js"),j=({children:r,className:n,state:t="default",isSelected:l,hasIcon:a,title:c,href:o,as:d="a",onClick:u})=>{const m=d,f=x.default(s.default["sub-item"],{[s.default[t]]:t,[s.default.selected]:l},n);return e.jsxs(e.Fragment,{children:[e.jsxs("li",{role:"treeitem",className:f,"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.jsxs("span",{className:s.default["sub-item-text"],children:[e.jsx(m,{href:o,onClick:u,className:s.default["sub-item-link"],children:c}),a&&t==="error"&&e.jsx(i.Icon,{name:"error",color:"danger",size:16,display:"inline",className:s.default["radio__tooltip-icon"]}),a&&t==="completed"&&e.jsx(i.Icon,{name:"check",color:"success",size:16,display:"inline",className:s.default["radio__tooltip-icon"]})]})]}),e.jsx("div",{children:r})]})};exports.SubItem=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("../../../../../external/classnames/index.cjs.js"),f=require("../../../../tedi/components/base/typography/text/text.cjs.js"),r=require("../../../../tedi/components/base/icon/icon.cjs.js"),s=require("../vertical-stepper.module.scss.cjs.js"),p=({children:a,className:n,state:t="default",isSelected:l,hasIcon:i,title:c,href:o,as:d="a",onClick:u})=>{const m=d,x=j.default(s.default["sub-item"],{[s.default[t]]:t,[s.default.selected]:l},n);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(m,{href:o,onClick:u,children:e.jsxs(f.Text,{children:[c,i&&t==="error"&&e.jsx(r.Icon,{name:"error",color:"danger",size:16,display:"inline",className:s.default["radio__tooltip-icon"]}),i&&t==="completed"&&e.jsx(r.Icon,{name:"check",color:"success",size:16,display:"inline",className:s.default["radio__tooltip-icon"]})]})})})]}),e.jsx("div",{children:a})]})};exports.SubItem=p;
@@ -1,14 +1,15 @@
1
- import { jsxs as r, Fragment as b, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as i, Fragment as b, jsx as s } from "react/jsx-runtime";
2
2
  import f from "../../../../../external/classnames/index.es.js";
3
+ import { Text as h } from "../../../../tedi/components/base/typography/text/text.es.js";
3
4
  import { Icon as l } from "../../../../tedi/components/base/icon/icon.es.js";
4
5
  import e from "../vertical-stepper.module.scss.es.js";
5
- const g = ({
6
- children: m,
7
- className: c,
8
- state: i = "default",
6
+ const z = ({
7
+ children: a,
8
+ className: t,
9
+ state: r = "default",
9
10
  isSelected: o,
10
- hasIcon: a,
11
- title: t,
11
+ hasIcon: m,
12
+ title: c,
12
13
  href: n,
13
14
  as: d = "a",
14
15
  onClick: p
@@ -16,23 +17,41 @@ const g = ({
16
17
  const u = d, N = f(
17
18
  e["sub-item"],
18
19
  {
19
- [e[i]]: i,
20
+ [e[r]]: r,
20
21
  [e.selected]: o
21
22
  },
22
- c
23
+ t
23
24
  );
24
- return /* @__PURE__ */ r(b, { children: [
25
- /* @__PURE__ */ r("li", { role: "treeitem", className: N, "aria-selected": o, children: [
25
+ return /* @__PURE__ */ i(b, { children: [
26
+ /* @__PURE__ */ i("li", { role: "treeitem", className: N, "aria-selected": o, children: [
26
27
  /* @__PURE__ */ s("span", { className: e["sub-item-dot-container"], children: /* @__PURE__ */ s("span", { className: e["sub-item-dot"] }) }),
27
- /* @__PURE__ */ r("span", { className: e["sub-item-text"], children: [
28
- /* @__PURE__ */ s(u, { href: n, onClick: p, className: e["sub-item-link"], children: t }),
29
- a && i === "error" && /* @__PURE__ */ s(l, { name: "error", color: "danger", size: 16, display: "inline", className: e["radio__tooltip-icon"] }),
30
- a && i === "completed" && /* @__PURE__ */ s(l, { name: "check", color: "success", size: 16, display: "inline", className: e["radio__tooltip-icon"] })
31
- ] })
28
+ /* @__PURE__ */ s("span", { className: e["sub-item-text"], children: /* @__PURE__ */ s(u, { href: n, onClick: p, children: /* @__PURE__ */ i(h, { children: [
29
+ c,
30
+ m && r === "error" && /* @__PURE__ */ s(
31
+ l,
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
+ )
50
+ ] }) }) })
32
51
  ] }),
33
- /* @__PURE__ */ s("div", { children: m })
52
+ /* @__PURE__ */ s("div", { children: a })
34
53
  ] });
35
54
  };
36
55
  export {
37
- g as SubItem
56
+ z as SubItem
38
57
  };