@tedi-design-system/react 15.0.0-rc.1 → 15.0.0-rc.11
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.es13.js +2 -2
- package/_virtual/index.es14.js +2 -2
- package/bundle-stats.html +1 -1
- package/community.cjs.js +1 -1
- package/community.es.js +219 -227
- package/external/react-is/index.cjs.js +1 -1
- package/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 +3 -3
- package/src/community/components/accordion/accordion-item-header/accordion-item-header.cjs.js +1 -1
- package/src/community/components/accordion/accordion-item-header/accordion-item-header.es.js +2 -2
- package/src/community/components/button-content/button-content.cjs.js +1 -1
- package/src/community/components/button-content/button-content.d.ts +1 -1
- package/src/community/components/button-content/button-content.es.js +39 -33
- package/src/community/components/form/select/select.cjs.js +1 -1
- package/src/community/components/form/select/select.d.ts +1 -1
- package/src/community/components/form/select/select.es.js +33 -33
- package/src/community/components/form/text-editor/components/style-button.cjs.js +1 -1
- package/src/community/components/form/text-editor/components/style-button.es.js +2 -2
- package/src/community/components/form/toggle/toggle.cjs.js +1 -1
- package/src/community/components/form/toggle/toggle.es.js +4 -4
- package/src/community/components/layout/breadcrumbs/crumb/crumb.cjs.js +1 -1
- package/src/community/components/layout/breadcrumbs/crumb/crumb.es.js +9 -9
- package/src/community/components/layout/footer/footer.cjs.js +1 -1
- package/src/community/components/layout/footer/footer.d.ts +1 -1
- package/src/community/components/layout/footer/footer.es.js +22 -22
- package/src/community/components/layout/header/components/header-language/header-language.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-language/header-language.es.js +8 -8
- package/src/community/components/layout/header/components/header-modal/header-modal.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-modal/header-modal.es.js +6 -6
- package/src/community/components/layout/header/components/header-notification/header-notification.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-notification/header-notification.es.js +4 -4
- package/src/community/components/layout/header/components/header-role/header-role.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-role/header-role.es.js +19 -19
- package/src/community/components/layout/header/components/header-settings/header-settings.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-settings/header-settings.es.js +1 -1
- package/src/community/components/layout/sidenav/sidenav.cjs.js +1 -1
- package/src/community/components/layout/sidenav/sidenav.d.ts +1 -1
- package/src/community/components/layout/sidenav/sidenav.es.js +39 -34
- package/src/community/components/placeholder/placeholder.cjs.js +1 -1
- package/src/community/components/placeholder/placeholder.d.ts +1 -1
- package/src/community/components/placeholder/placeholder.es.js +21 -20
- package/src/community/components/stepper/stepper-nav.cjs.js +1 -1
- package/src/community/components/stepper/stepper-nav.es.js +1 -1
- package/src/community/components/table/components/helpers.cjs.js +1 -1
- package/src/community/components/table/components/helpers.es.js +1 -1
- package/src/community/components/table/components/pagination/PaginationNextButton.cjs.js +1 -1
- package/src/community/components/table/components/pagination/PaginationNextButton.es.js +1 -1
- package/src/community/components/table/components/pagination/pagination.cjs.js +1 -1
- package/src/community/components/table/components/pagination/pagination.es.js +4 -4
- package/src/community/components/table/components/table-filter/components/table-date-filter.cjs.js +1 -1
- package/src/community/components/table/components/table-filter/components/table-date-filter.es.js +1 -1
- package/src/community/components/table/components/table-filter/components/table-select-filter.cjs.js +1 -1
- package/src/community/components/table/components/table-filter/components/table-select-filter.es.js +5 -5
- package/src/community/components/table-of-contents/table-of-contents-item.cjs.js +1 -1
- package/src/community/components/table-of-contents/table-of-contents-item.es.js +18 -18
- package/src/community/components/table-of-contents/table-of-contents-items.cjs.js +1 -1
- package/src/community/components/table-of-contents/table-of-contents-items.es.js +1 -1
- package/src/community/components/table-of-contents/table-of-contents-modal.cjs.js +1 -1
- package/src/community/components/table-of-contents/table-of-contents-modal.es.js +13 -13
- package/src/community/components/toggle-open/toggle-open.d.ts +1 -1
- package/src/community/components/tooltip/tooltip-trigger.cjs.js +1 -1
- package/src/community/components/tooltip/tooltip-trigger.es.js +1 -1
- package/src/community/components/vertical-progress/vertical-progress-item.cjs.js +1 -1
- package/src/community/components/vertical-progress/vertical-progress-item.es.js +4 -4
- package/src/community/index.d.ts +0 -4
- package/src/tedi/components/base/icon/icon.d.ts +1 -1
- package/src/tedi/components/base/icon/icon.module.scss.cjs.js +1 -1
- package/src/tedi/components/base/icon/icon.module.scss.es.js +1 -0
- package/src/tedi/components/buttons/collapse/collapse.cjs.js +1 -1
- package/src/tedi/components/buttons/collapse/collapse.d.ts +6 -0
- package/src/tedi/components/buttons/collapse/collapse.es.js +63 -62
- package/src/tedi/components/content/label/label.d.ts +1 -1
- package/src/tedi/components/form/textfield/textfield.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/textfield/textfield.module.scss.es.js +0 -1
- package/src/tedi/components/layout/sidenav/components/sidenav-mobile/sidenav-mobile.cjs.js +1 -1
- package/src/tedi/components/layout/sidenav/components/sidenav-mobile/sidenav-mobile.es.js +46 -42
- package/src/tedi/components/misc/scroll-visibility/scroll-visibility.cjs.js +2 -1
- package/src/tedi/components/misc/scroll-visibility/scroll-visibility.es.js +44 -32
- package/src/tedi/helpers/hooks/use-scroll.cjs.js +1 -1
- package/src/tedi/helpers/hooks/use-scroll.d.ts +3 -1
- package/src/tedi/helpers/hooks/use-scroll.es.js +19 -19
- package/src/community/components/ellipsis/ellipsis.cjs.js +0 -1
- package/src/community/components/ellipsis/ellipsis.d.ts +0 -19
- package/src/community/components/ellipsis/ellipsis.es.js +0 -34
- package/src/community/components/ellipsis/ellipsis.module.scss.cjs.js +0 -1
- package/src/community/components/ellipsis/ellipsis.module.scss.es.js +0 -9
- package/src/community/components/icon/icon.cjs.js +0 -1
- package/src/community/components/icon/icon.d.ts +0 -49
- package/src/community/components/icon/icon.es.js +0 -47
- package/src/community/components/icon/icon.module.scss.cjs.js +0 -1
- package/src/community/components/icon/icon.module.scss.es.js +0 -9
- package/src/community/components/typography/heading/heading.cjs.js +0 -1
- package/src/community/components/typography/heading/heading.d.ts +0 -11
- package/src/community/components/typography/heading/heading.es.js +0 -10
- package/src/community/components/typography/text/text.cjs.js +0 -1
- package/src/community/components/typography/text/text.d.ts +0 -43
- package/src/community/components/typography/text/text.es.js +0 -26
- package/src/tedi/providers/storybook-provider/storybook-provider.d.ts +0 -10
|
@@ -1,77 +1,78 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import o from "../../../../../external/classnames/index.es.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { Text as
|
|
7
|
-
import { Print as
|
|
3
|
+
import f from "react";
|
|
4
|
+
import A from "../../../../../external/react-animate-height/dist/esm/index.es.js";
|
|
5
|
+
import { Icon as H } from "../../base/icon/icon.es.js";
|
|
6
|
+
import { Text as q } from "../../base/typography/text/text.es.js";
|
|
7
|
+
import { Print as F } from "../../misc/print/print.es.js";
|
|
8
8
|
import e from "./collapse.module.scss.es.js";
|
|
9
|
-
import { usePrint as
|
|
10
|
-
import { useBreakpointProps as
|
|
11
|
-
import { useLabels as
|
|
12
|
-
import { Row as
|
|
9
|
+
import { usePrint as G } from "../../../helpers/hooks/use-print.es.js";
|
|
10
|
+
import { useBreakpointProps as J } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
11
|
+
import { useLabels as Q } from "../../../providers/label-provider/use-labels.es.js";
|
|
12
|
+
import { Row as k } from "../../layout/grid/row.es.js";
|
|
13
13
|
import { Col as s } from "../../layout/grid/col.es.js";
|
|
14
|
-
const
|
|
15
|
-
const { getCurrentBreakpointProps:
|
|
14
|
+
const se = (w) => {
|
|
15
|
+
const { getCurrentBreakpointProps: O } = J(w.defaultServerBreakpoint), { getLabel: y } = Q(), {
|
|
16
16
|
id: r,
|
|
17
17
|
children: g,
|
|
18
|
-
className:
|
|
19
|
-
openText:
|
|
20
|
-
closeText:
|
|
21
|
-
hideCollapseText:
|
|
22
|
-
title:
|
|
18
|
+
className: P,
|
|
19
|
+
openText: b = y("open"),
|
|
20
|
+
closeText: x = y("close"),
|
|
21
|
+
hideCollapseText: $ = !1,
|
|
22
|
+
title: c,
|
|
23
23
|
titleRowProps: B,
|
|
24
24
|
defaultOpen: S,
|
|
25
|
-
open:
|
|
26
|
-
onToggle:
|
|
27
|
-
arrowType:
|
|
28
|
-
size:
|
|
25
|
+
open: d,
|
|
26
|
+
onToggle: p,
|
|
27
|
+
arrowType: n = "default",
|
|
28
|
+
size: i = "default",
|
|
29
29
|
underline: T = !0,
|
|
30
|
-
toggleLabel:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
toggleLabel: N,
|
|
31
|
+
iconOnly: j = !1,
|
|
32
|
+
...D
|
|
33
|
+
} = O(w), m = `${r}__trigger`, u = `${r}__content`, L = `${r}__animate`, [C, M] = f.useState(() => S), _ = G(), a = f.useMemo(
|
|
34
|
+
() => _ || (d !== void 0 ? d : C),
|
|
35
|
+
[_, d, C]
|
|
36
|
+
), R = j === !0 && !c, z = o(
|
|
36
37
|
e["tedi-collapse"],
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
e[`tedi-collapse--arrow-${
|
|
41
|
-
|
|
42
|
-
),
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
(
|
|
47
|
-
},
|
|
48
|
-
() => /* @__PURE__ */ t("div", { id:
|
|
49
|
-
[g,
|
|
38
|
+
i === "small" && e["tedi-collapse--small"],
|
|
39
|
+
a && e["tedi-collapse--is-open"],
|
|
40
|
+
R && e["tedi-collapse--icon-only"],
|
|
41
|
+
e[`tedi-collapse--arrow-${n}`],
|
|
42
|
+
P
|
|
43
|
+
), v = () => {
|
|
44
|
+
const l = !a;
|
|
45
|
+
M(l), p == null || p(l);
|
|
46
|
+
}, E = (l) => {
|
|
47
|
+
(l.key === "Enter" || l.key === " ") && !l.repeat && (l.preventDefault(), v());
|
|
48
|
+
}, K = N || (a ? x : b), I = f.useMemo(
|
|
49
|
+
() => /* @__PURE__ */ t("div", { id: u, role: "region", "aria-labelledby": m, className: e["tedi-collapse__content"], children: g }),
|
|
50
|
+
[g, u, m]
|
|
50
51
|
);
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ h("div", { "data-name": "collapse", ...D, className: z, children: [
|
|
52
53
|
/* @__PURE__ */ t(
|
|
53
54
|
"button",
|
|
54
55
|
{
|
|
55
|
-
id:
|
|
56
|
+
id: m,
|
|
56
57
|
type: "button",
|
|
57
58
|
"data-name": "collapse-trigger",
|
|
58
59
|
className: e["tedi-collapse__title"],
|
|
59
|
-
"aria-label":
|
|
60
|
-
"aria-expanded":
|
|
61
|
-
"aria-controls":
|
|
62
|
-
onKeyDown:
|
|
63
|
-
onClick:
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
-
|
|
66
|
-
/* @__PURE__ */ t(s, { width: "auto", children: /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */ t(
|
|
68
|
-
|
|
60
|
+
"aria-label": K,
|
|
61
|
+
"aria-expanded": a,
|
|
62
|
+
"aria-controls": u,
|
|
63
|
+
onKeyDown: E,
|
|
64
|
+
onClick: v,
|
|
65
|
+
children: /* @__PURE__ */ h(k, { justifyContent: "between", alignItems: "center", wrap: "nowrap", ...B, element: "span", children: [
|
|
66
|
+
c && /* @__PURE__ */ t(s, { "aria-hidden": "true", children: c }),
|
|
67
|
+
/* @__PURE__ */ t(s, { width: "auto", children: /* @__PURE__ */ h(k, { element: "span", alignItems: "center", gutter: 0, wrap: "nowrap", children: [
|
|
68
|
+
/* @__PURE__ */ t(F, { visibility: "hide", children: /* @__PURE__ */ t(s, { width: "auto", className: o({ "visually-hidden": $ }), children: /* @__PURE__ */ t(
|
|
69
|
+
q,
|
|
69
70
|
{
|
|
70
71
|
element: "span",
|
|
71
72
|
className: o(e["tedi-collapse__text"], {
|
|
72
73
|
[e["tedi-collapse__text--underline"]]: T
|
|
73
74
|
}),
|
|
74
|
-
children:
|
|
75
|
+
children: a ? x : b
|
|
75
76
|
}
|
|
76
77
|
) }) }),
|
|
77
78
|
/* @__PURE__ */ t(s, { width: "auto", children: /* @__PURE__ */ t(
|
|
@@ -79,19 +80,19 @@ const ie = (f) => {
|
|
|
79
80
|
{
|
|
80
81
|
className: o(
|
|
81
82
|
e["tedi-collapse__icon-wrapper"],
|
|
82
|
-
e[`tedi-collapse__icon-wrapper--${
|
|
83
|
-
|
|
83
|
+
e[`tedi-collapse__icon-wrapper--${n}`],
|
|
84
|
+
i === "small" && e["tedi-collapse__icon-wrapper--small"]
|
|
84
85
|
),
|
|
85
86
|
children: /* @__PURE__ */ t(
|
|
86
|
-
|
|
87
|
+
H,
|
|
87
88
|
{
|
|
88
89
|
className: o(
|
|
89
90
|
e["tedi-collapse__icon"],
|
|
90
|
-
e[`tedi-collapse__icon--${
|
|
91
|
-
|
|
91
|
+
e[`tedi-collapse__icon--${n}`],
|
|
92
|
+
i === "small" && e["tedi-collapse__icon--small"]
|
|
92
93
|
),
|
|
93
94
|
name: "expand_more",
|
|
94
|
-
size:
|
|
95
|
+
size: i === "small" || n === "secondary" ? 18 : 24
|
|
95
96
|
}
|
|
96
97
|
)
|
|
97
98
|
}
|
|
@@ -100,10 +101,10 @@ const ie = (f) => {
|
|
|
100
101
|
] })
|
|
101
102
|
}
|
|
102
103
|
),
|
|
103
|
-
|
|
104
|
+
_ ? I : /* @__PURE__ */ t(A, { id: L, duration: 300, height: a ? "auto" : 0, "data-testid": "collapse-inner", children: I })
|
|
104
105
|
] });
|
|
105
106
|
};
|
|
106
107
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
se as Collapse,
|
|
109
|
+
se as default
|
|
109
110
|
};
|
|
@@ -32,5 +32,5 @@ export interface LabelProps extends BreakpointSupport<LabelBreakpointProps>, Lab
|
|
|
32
32
|
*/
|
|
33
33
|
tooltip?: string;
|
|
34
34
|
}
|
|
35
|
-
export declare const Label: import('react').ForwardRefExoticComponent<LabelProps & import('react').RefAttributes<
|
|
35
|
+
export declare const Label: import('react').ForwardRefExoticComponent<LabelProps & import('react').RefAttributes<HTMLLabelElement | HTMLSpanElement>>;
|
|
36
36
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-textfield":"tedi-textfield-376bbeed","tedi-textfield__inner":"tedi-textfield__inner-98791cdd","tedi-textfield__input":"tedi-textfield__input-ade0f9a6","tedi-textfield--invalid":"tedi-textfield--invalid-290ce18d","tedi-textfield--valid":"tedi-textfield--valid-273af8c0","tedi-textfield--clearable":"tedi-textfield--clearable-f47f0508","tedi-textfield--with-icon":"tedi-textfield--with-icon-db2c6f01","
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-textfield":"tedi-textfield-376bbeed","tedi-textfield__inner":"tedi-textfield__inner-98791cdd","tedi-textfield__input":"tedi-textfield__input-ade0f9a6","tedi-textfield--invalid":"tedi-textfield--invalid-290ce18d","tedi-textfield--valid":"tedi-textfield--valid-273af8c0","tedi-textfield--clearable":"tedi-textfield--clearable-f47f0508","tedi-textfield--with-icon":"tedi-textfield--with-icon-db2c6f01","tedi-textfield__input--hidden-arrows":"tedi-textfield__input--hidden-arrows-609217f7","tedi-textfield__right-area":"tedi-textfield__right-area-6ac81c6b","tedi-textfield--small":"tedi-textfield--small-4ffcc517","tedi-textfield--large":"tedi-textfield--large-0e4d788c","tedi-textfield__separator":"tedi-textfield__separator-63d1ba14","tedi-textfield__icon-wrapper":"tedi-textfield__icon-wrapper-4935814e","tedi-textfield--inline":"tedi-textfield--inline-7ed55c4e","tedi-textfield__icon":"tedi-textfield__icon-05d4adc8","tedi-textfield__feedback-wrapper":"tedi-textfield__feedback-wrapper-9d47f9c6"};exports.default=e;
|
|
@@ -6,7 +6,6 @@ const e = {
|
|
|
6
6
|
"tedi-textfield--valid": "tedi-textfield--valid-273af8c0",
|
|
7
7
|
"tedi-textfield--clearable": "tedi-textfield--clearable-f47f0508",
|
|
8
8
|
"tedi-textfield--with-icon": "tedi-textfield--with-icon-db2c6f01",
|
|
9
|
-
"textfield--with-icon": "textfield--with-icon-d23a33f0",
|
|
10
9
|
"tedi-textfield__input--hidden-arrows": "tedi-textfield__input--hidden-arrows-609217f7",
|
|
11
10
|
"tedi-textfield__right-area": "tedi-textfield__right-area-6ac81c6b",
|
|
12
11
|
"tedi-textfield--small": "tedi-textfield--small-4ffcc517",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),H=require("../../../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),l=require("../../../../../../../external/classnames/index.cjs.js"),m=require("react"),d=require("../../../../base/icon/icon.cjs.js"),f=require("../../../../buttons/button/button.cjs.js"),n=require("../../sidenav.module.scss.cjs.js"),q=require("../sidenav-item/sidenav-item.cjs.js"),U=require("../../../../../providers/label-provider/use-labels.cjs.js"),D=({navItems:h,ariaLabel:y,linkAs:v,isOpen:M,onClose:r,showOverlay:w=!0,id:B,className:G})=>{var k,g,p,I,S,C,L;const{getLabel:b}=U.useLabels(),[s,c]=m.useState([{items:h}]);m.useEffect(()=>{c([{items:h}])},[h]);const a=s[s.length-1],P=s.length===1,x=e=>{var _;const i=!!(e.subItems||e.subItemGroups),o=!!(e.href||e.to);if(!i){r();return}const u=((_=e.subItemGroups)==null?void 0:_.flatMap(E=>E.subItems))||e.subItems||[];c([...s,{items:u,parent:e,renderParentLink:o}])},R=()=>{c(s.slice(0,-1))},T=()=>{c([s[0]])},z=((g=(k=a.parent)==null?void 0:k.subItems)==null?void 0:g.length)??((I=(p=a.parent)==null?void 0:p.subItemGroups)==null?void 0:I.length),F=s.length>1&&!(a.renderParentLink&&z),N=(e,i)=>i===1?!(e.subItems||e.subItemGroups)?t.jsx(q.SideNavItem,{...e,as:v,level:i,onItemClick:r,className:l.default(n.default["tedi-sidenav__item--mobile"],e.className)}):t.jsx("li",{className:l.default(n.default["tedi-sidenav__item"],n.default["tedi-sidenav__item--mobile"]),children:t.jsxs("button",{onClick:()=>x(e),className:n.default["tedi-sidenav__link"],children:[e.icon&&t.jsx(d.Icon,{name:typeof e.icon=="string"?e.icon:e.icon.name,color:"white",className:n.default["tedi-sidenav__icon"]}),t.jsx("span",{className:n.default["tedi-sidenav__title"],children:e.children}),t.jsx(d.Icon,{name:"expand_more",color:"white",className:n.default["tedi-sidenav__toggle-icon"]})]})}):O(e,i),O=(e,i)=>{const o=!!(e.href||e.to),u=!!(e.subItems||e.subItemGroups);return o?t.jsx(q.SideNavItem,{...e,as:v,level:i,icon:void 0,onItemClick:r,className:l.default(n.default["tedi-sidenav__sub-item"],e.className)}):t.jsx("li",{className:l.default(n.default["tedi-sidenav__item"]),children:t.jsxs(f.Button,{noStyle:!0,onClick:()=>u?x(e):r(),className:n.default["tedi-sidenav__link"],children:[t.jsx("span",{className:n.default["tedi-sidenav__title"],children:e.children}),u?t.jsx(d.Icon,{name:"expand_more",color:"white",className:n.default["tedi-sidenav__toggle-icon"]}):null]})})},j=t.jsxs("nav",{"data-name":"mobile-sidenav",className:l.default(n.default["tedi-sidenav"],n.default["tedi-sidenav--mobile"],G),"aria-label":y,id:B,children:[t.jsx("div",{className:n.default["tedi-sidenav__list"],children:!P&&t.jsxs("div",{className:n.default["tedi-sidenav__back-buttons"],children:[s.length>1&&t.jsxs(f.Button,{noStyle:!0,onClick:T,className:l.default(n.default["tedi-sidenav__link"],n.default["tedi-sidenav__back-button"]),children:[t.jsx(d.Icon,{name:"arrow_back",size:16,color:"white"}),t.jsx("span",{children:b("sidenav.backToMainMenu")})]}),s.length>2&&t.jsxs(f.Button,{noStyle:!0,onClick:R,className:l.default(n.default["tedi-sidenav__link"],n.default["tedi-sidenav__back-button"]),children:[t.jsx(d.Icon,{name:"arrow_back",size:16,color:"white"}),t.jsx("span",{children:((C=(S=s[s.length-1])==null?void 0:S.parent)==null?void 0:C.children)+" "+b("sidenav.backtoMenu")})]})]})}),F&&t.jsx("div",{className:l.default(n.default["tedi-sidenav__subheading"],n.default["tedi-sidenav__subheading--mobile"]),children:(L=a.parent)==null?void 0:L.children}),t.jsxs("ul",{className:n.default["tedi-sidenav__list"],role:"menubar",children:[a.renderParentLink&&a.parent&&t.jsx("li",{className:n.default["tedi-sidenav__list-item"],children:t.jsx("div",{className:l.default(n.default["tedi-sidenav__collapse"]),children:N(a.parent,s.length)})}),!a.renderParentLink&&a.items.map((e,i)=>t.jsx(m.Fragment,{children:N(e,s.length)},e.id||i))]})]});return M?w?t.jsx(H.FloatingOverlay,{style:{top:"0",position:"relative",height:"100%"},className:n.default["tedi-sidenav__overlay"],children:j}):j:null};exports.SideNavMobile=D;
|
|
@@ -1,53 +1,57 @@
|
|
|
1
1
|
import { jsxs as r, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { FloatingOverlay as
|
|
2
|
+
import { FloatingOverlay as q } from "../../../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
3
|
import l from "../../../../../../../external/classnames/index.es.js";
|
|
4
|
-
import
|
|
4
|
+
import D, { useState as J, useEffect as K } from "react";
|
|
5
5
|
import { Icon as d } from "../../../../base/icon/icon.es.js";
|
|
6
|
-
import { Button as
|
|
6
|
+
import { Button as v } from "../../../../buttons/button/button.es.js";
|
|
7
7
|
import n from "../../sidenav.module.scss.es.js";
|
|
8
|
-
import { SideNavItem as
|
|
9
|
-
import { useLabels as
|
|
10
|
-
const
|
|
11
|
-
navItems:
|
|
8
|
+
import { SideNavItem as M } from "../sidenav-item/sidenav-item.es.js";
|
|
9
|
+
import { useLabels as Q } from "../../../../../providers/label-provider/use-labels.es.js";
|
|
10
|
+
const ne = ({
|
|
11
|
+
navItems: _,
|
|
12
12
|
ariaLabel: x,
|
|
13
|
-
linkAs:
|
|
13
|
+
linkAs: b,
|
|
14
14
|
isOpen: G,
|
|
15
15
|
onClose: o,
|
|
16
16
|
showOverlay: P = !0,
|
|
17
17
|
id: R,
|
|
18
18
|
className: B
|
|
19
19
|
}) => {
|
|
20
|
-
var
|
|
21
|
-
const { getLabel:
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
var f, I, C, L, S, y, w;
|
|
21
|
+
const { getLabel: p } = Q(), [s, c] = J([{ items: _ }]);
|
|
22
|
+
K(() => {
|
|
23
|
+
c([{ items: _ }]);
|
|
24
|
+
}, [_]);
|
|
25
|
+
const t = s[s.length - 1], j = s.length === 1, k = (e) => {
|
|
26
|
+
var u;
|
|
27
|
+
const a = !!(e.subItems || e.subItemGroups), m = !!(e.href || e.to);
|
|
24
28
|
if (!a) {
|
|
25
29
|
o();
|
|
26
30
|
return;
|
|
27
31
|
}
|
|
28
|
-
const
|
|
29
|
-
|
|
32
|
+
const h = ((u = e.subItemGroups) == null ? void 0 : u.flatMap((O) => O.subItems)) || e.subItems || [];
|
|
33
|
+
c([
|
|
30
34
|
...s,
|
|
31
35
|
{
|
|
32
|
-
items:
|
|
36
|
+
items: h,
|
|
33
37
|
parent: e,
|
|
34
|
-
renderParentLink:
|
|
38
|
+
renderParentLink: m
|
|
35
39
|
}
|
|
36
40
|
]);
|
|
37
41
|
}, z = () => {
|
|
38
|
-
|
|
42
|
+
c(s.slice(0, -1));
|
|
39
43
|
}, F = () => {
|
|
40
|
-
|
|
41
|
-
}, T = ((
|
|
42
|
-
|
|
44
|
+
c([s[0]]);
|
|
45
|
+
}, T = ((I = (f = t.parent) == null ? void 0 : f.subItems) == null ? void 0 : I.length) ?? ((L = (C = t.parent) == null ? void 0 : C.subItemGroups) == null ? void 0 : L.length), E = s.length > 1 && !(t.renderParentLink && T), N = (e, a) => a === 1 ? !(e.subItems || e.subItemGroups) ? /* @__PURE__ */ i(
|
|
46
|
+
M,
|
|
43
47
|
{
|
|
44
48
|
...e,
|
|
45
|
-
as:
|
|
49
|
+
as: b,
|
|
46
50
|
level: a,
|
|
47
51
|
onItemClick: o,
|
|
48
52
|
className: l(n["tedi-sidenav__item--mobile"], e.className)
|
|
49
53
|
}
|
|
50
|
-
) : /* @__PURE__ */ i("li", { className: l(n["tedi-sidenav__item"], n["tedi-sidenav__item--mobile"]), children: /* @__PURE__ */ r("button", { onClick: () =>
|
|
54
|
+
) : /* @__PURE__ */ i("li", { className: l(n["tedi-sidenav__item"], n["tedi-sidenav__item--mobile"]), children: /* @__PURE__ */ r("button", { onClick: () => k(e), className: n["tedi-sidenav__link"], children: [
|
|
51
55
|
e.icon && /* @__PURE__ */ i(
|
|
52
56
|
d,
|
|
53
57
|
{
|
|
@@ -58,31 +62,31 @@ const ee = ({
|
|
|
58
62
|
),
|
|
59
63
|
/* @__PURE__ */ i("span", { className: n["tedi-sidenav__title"], children: e.children }),
|
|
60
64
|
/* @__PURE__ */ i(d, { name: "expand_more", color: "white", className: n["tedi-sidenav__toggle-icon"] })
|
|
61
|
-
] }) }) :
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
|
|
65
|
+
] }) }) : H(e, a), H = (e, a) => {
|
|
66
|
+
const m = !!(e.href || e.to), h = !!(e.subItems || e.subItemGroups);
|
|
67
|
+
return m ? /* @__PURE__ */ i(
|
|
68
|
+
M,
|
|
65
69
|
{
|
|
66
70
|
...e,
|
|
67
|
-
as:
|
|
71
|
+
as: b,
|
|
68
72
|
level: a,
|
|
69
73
|
icon: void 0,
|
|
70
74
|
onItemClick: o,
|
|
71
75
|
className: l(n["tedi-sidenav__sub-item"], e.className)
|
|
72
76
|
}
|
|
73
77
|
) : /* @__PURE__ */ i("li", { className: l(n["tedi-sidenav__item"]), children: /* @__PURE__ */ r(
|
|
74
|
-
|
|
78
|
+
v,
|
|
75
79
|
{
|
|
76
80
|
noStyle: !0,
|
|
77
|
-
onClick: () =>
|
|
81
|
+
onClick: () => h ? k(e) : o(),
|
|
78
82
|
className: n["tedi-sidenav__link"],
|
|
79
83
|
children: [
|
|
80
84
|
/* @__PURE__ */ i("span", { className: n["tedi-sidenav__title"], children: e.children }),
|
|
81
|
-
|
|
85
|
+
h ? /* @__PURE__ */ i(d, { name: "expand_more", color: "white", className: n["tedi-sidenav__toggle-icon"] }) : null
|
|
82
86
|
]
|
|
83
87
|
}
|
|
84
88
|
) });
|
|
85
|
-
},
|
|
89
|
+
}, g = /* @__PURE__ */ r(
|
|
86
90
|
"nav",
|
|
87
91
|
{
|
|
88
92
|
"data-name": "mobile-sidenav",
|
|
@@ -92,40 +96,40 @@ const ee = ({
|
|
|
92
96
|
children: [
|
|
93
97
|
/* @__PURE__ */ i("div", { className: n["tedi-sidenav__list"], children: !j && /* @__PURE__ */ r("div", { className: n["tedi-sidenav__back-buttons"], children: [
|
|
94
98
|
s.length > 1 && /* @__PURE__ */ r(
|
|
95
|
-
|
|
99
|
+
v,
|
|
96
100
|
{
|
|
97
101
|
noStyle: !0,
|
|
98
102
|
onClick: F,
|
|
99
103
|
className: l(n["tedi-sidenav__link"], n["tedi-sidenav__back-button"]),
|
|
100
104
|
children: [
|
|
101
105
|
/* @__PURE__ */ i(d, { name: "arrow_back", size: 16, color: "white" }),
|
|
102
|
-
/* @__PURE__ */ i("span", { children:
|
|
106
|
+
/* @__PURE__ */ i("span", { children: p("sidenav.backToMainMenu") })
|
|
103
107
|
]
|
|
104
108
|
}
|
|
105
109
|
),
|
|
106
110
|
s.length > 2 && /* @__PURE__ */ r(
|
|
107
|
-
|
|
111
|
+
v,
|
|
108
112
|
{
|
|
109
113
|
noStyle: !0,
|
|
110
114
|
onClick: z,
|
|
111
115
|
className: l(n["tedi-sidenav__link"], n["tedi-sidenav__back-button"]),
|
|
112
116
|
children: [
|
|
113
117
|
/* @__PURE__ */ i(d, { name: "arrow_back", size: 16, color: "white" }),
|
|
114
|
-
/* @__PURE__ */ i("span", { children: ((
|
|
118
|
+
/* @__PURE__ */ i("span", { children: ((y = (S = s[s.length - 1]) == null ? void 0 : S.parent) == null ? void 0 : y.children) + " " + p("sidenav.backtoMenu") })
|
|
115
119
|
]
|
|
116
120
|
}
|
|
117
121
|
)
|
|
118
122
|
] }) }),
|
|
119
|
-
|
|
123
|
+
E && /* @__PURE__ */ i("div", { className: l(n["tedi-sidenav__subheading"], n["tedi-sidenav__subheading--mobile"]), children: (w = t.parent) == null ? void 0 : w.children }),
|
|
120
124
|
/* @__PURE__ */ r("ul", { className: n["tedi-sidenav__list"], role: "menubar", children: [
|
|
121
|
-
t.renderParentLink && t.parent && /* @__PURE__ */ i("li", { className: n["tedi-sidenav__list-item"], children: /* @__PURE__ */ i("div", { className: l(n["tedi-sidenav__collapse"]), children:
|
|
122
|
-
!t.renderParentLink && t.items.map((e, a) => /* @__PURE__ */ i(
|
|
125
|
+
t.renderParentLink && t.parent && /* @__PURE__ */ i("li", { className: n["tedi-sidenav__list-item"], children: /* @__PURE__ */ i("div", { className: l(n["tedi-sidenav__collapse"]), children: N(t.parent, s.length) }) }),
|
|
126
|
+
!t.renderParentLink && t.items.map((e, a) => /* @__PURE__ */ i(D.Fragment, { children: N(e, s.length) }, e.id || a))
|
|
123
127
|
] })
|
|
124
128
|
]
|
|
125
129
|
}
|
|
126
130
|
);
|
|
127
131
|
return G ? P ? /* @__PURE__ */ i(
|
|
128
|
-
|
|
132
|
+
q,
|
|
129
133
|
{
|
|
130
134
|
style: {
|
|
131
135
|
top: "0",
|
|
@@ -133,10 +137,10 @@ const ee = ({
|
|
|
133
137
|
height: "100%"
|
|
134
138
|
},
|
|
135
139
|
className: n["tedi-sidenav__overlay"],
|
|
136
|
-
children:
|
|
140
|
+
children: g
|
|
137
141
|
}
|
|
138
|
-
) :
|
|
142
|
+
) : g : null;
|
|
139
143
|
};
|
|
140
144
|
export {
|
|
141
|
-
|
|
145
|
+
ne as SideNavMobile
|
|
142
146
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("react/jsx-runtime"),v=require("../../../../../external/classnames/index.cjs.js"),t=require("react"),V=require("../../../helpers/hooks/use-scroll.cjs.js"),b=require("./scroll-visibility.module.scss.cjs.js"),g=w=>{const{children:l,enabled:o=!0,className:H,visibility:n="hide",toggleVisibility:h=!1,scrollDistance:c=100,scrollDirection:u="down",scrollContainer:p,animationDirection:q="center"}=w,[d,D]=t.useState(!1),{scrollTop:i=0,scrollHeight:a=0,clientHeight:f=0}=V.useScroll(p)??{},[E,m]=t.useState(!1),S=t.useRef(0);t.useEffect(()=>{if(D(!0),!o)return;const e=u==="down"?i:a-f-i,s=n==="hide"?e>c:e<=c;m(s),S.current=e},[]),t.useEffect(()=>{if(!d||!o)return;const e=n==="show",s=u==="down"?i:a-f-i;let r;h&&s<S.current?r=e:s>c?r=!e:r=e,m(r),S.current=s},[d,o,n,h,c,i,u,a,f]);const y=v.default(b.default["tedi-scroll-visibility"],b.default[`tedi-scroll-visibility--${q}`],{[b.default["tedi-scroll-visibility--hidden"]]:d&&o&&E},H);return t.isValidElement(l)?t.cloneElement(l,{className:v.default(l.props.className,y)}):M.jsx("div",{className:y,children:l})};exports.ScrollVisibility=g;exports.default=g;
|
|
@@ -1,40 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as M } from "react/jsx-runtime";
|
|
3
|
+
import y from "../../../../../external/classnames/index.es.js";
|
|
4
|
+
import { useState as S, useRef as V, useEffect as w, cloneElement as x, isValidElement as I } from "react";
|
|
5
|
+
import { useScroll as T } from "../../../helpers/hooks/use-scroll.es.js";
|
|
6
|
+
import f from "./scroll-visibility.module.scss.es.js";
|
|
7
|
+
const k = (H) => {
|
|
7
8
|
const {
|
|
8
|
-
children:
|
|
9
|
-
enabled:
|
|
10
|
-
className:
|
|
9
|
+
children: t,
|
|
10
|
+
enabled: l = !0,
|
|
11
|
+
className: v,
|
|
11
12
|
visibility: n = "hide",
|
|
12
|
-
toggleVisibility:
|
|
13
|
-
scrollDistance:
|
|
14
|
-
scrollDirection:
|
|
15
|
-
scrollContainer:
|
|
16
|
-
animationDirection:
|
|
17
|
-
} =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (!
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
toggleVisibility: h = !1,
|
|
14
|
+
scrollDistance: o = 100,
|
|
15
|
+
scrollDirection: c = "down",
|
|
16
|
+
scrollContainer: D,
|
|
17
|
+
animationDirection: N = "center"
|
|
18
|
+
} = H, [d, g] = S(!1), { scrollTop: s = 0, scrollHeight: a = 0, clientHeight: u = 0 } = T(D) ?? {}, [E, p] = S(!1), m = V(0);
|
|
19
|
+
w(() => {
|
|
20
|
+
if (g(!0), !l) return;
|
|
21
|
+
const e = c === "down" ? s : a - u - s, i = n === "hide" ? e > o : e <= o;
|
|
22
|
+
p(i), m.current = e;
|
|
23
|
+
}, []), w(() => {
|
|
24
|
+
if (!d || !l) return;
|
|
25
|
+
const e = n === "show", i = c === "down" ? s : a - u - s;
|
|
26
|
+
let r;
|
|
27
|
+
h && i < m.current ? r = e : i > o ? r = !e : r = e, p(r), m.current = i;
|
|
28
|
+
}, [
|
|
29
|
+
d,
|
|
30
|
+
l,
|
|
31
|
+
n,
|
|
32
|
+
h,
|
|
33
|
+
o,
|
|
34
|
+
s,
|
|
35
|
+
c,
|
|
36
|
+
a,
|
|
37
|
+
u
|
|
38
|
+
]);
|
|
39
|
+
const b = y(
|
|
40
|
+
f["tedi-scroll-visibility"],
|
|
41
|
+
f[`tedi-scroll-visibility--${N}`],
|
|
30
42
|
{
|
|
31
|
-
[
|
|
43
|
+
[f["tedi-scroll-visibility--hidden"]]: d && l && E
|
|
32
44
|
},
|
|
33
|
-
|
|
45
|
+
v
|
|
34
46
|
);
|
|
35
|
-
return
|
|
47
|
+
return I(t) ? x(t, { className: y(t.props.className, b) }) : /* @__PURE__ */ M("div", { className: b, children: t });
|
|
36
48
|
};
|
|
37
49
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
k as ScrollVisibility,
|
|
51
|
+
k as default
|
|
40
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../../external/lodash-es/throttle.cjs.js"),r=require("react"),u={scrollTop:0,scrollHeight:0,clientHeight:0},a=t=>{const[s,n]=r.useState(u);return r.useEffect(()=>{const e=t??document.documentElement,o=t??window,c=()=>{n({scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight})},l=i.default(c,50);return o.addEventListener("scroll",l),c(),()=>{o.removeEventListener("scroll",l),l.cancel()}},[t]),s};exports.useScroll=a;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useState as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return
|
|
10
|
-
const t =
|
|
11
|
-
|
|
12
|
-
scrollTop:
|
|
13
|
-
scrollHeight:
|
|
14
|
-
clientHeight:
|
|
1
|
+
import n from "../../../../external/lodash-es/throttle.es.js";
|
|
2
|
+
import { useState as i, useEffect as g } from "react";
|
|
3
|
+
const u = {
|
|
4
|
+
scrollTop: 0,
|
|
5
|
+
scrollHeight: 0,
|
|
6
|
+
clientHeight: 0
|
|
7
|
+
}, a = (t) => {
|
|
8
|
+
const [r, s] = i(u);
|
|
9
|
+
return g(() => {
|
|
10
|
+
const o = t ?? document.documentElement, l = t ?? window, c = () => {
|
|
11
|
+
s({
|
|
12
|
+
scrollTop: o.scrollTop,
|
|
13
|
+
scrollHeight: o.scrollHeight,
|
|
14
|
+
clientHeight: o.clientHeight
|
|
15
15
|
});
|
|
16
|
-
}, 50);
|
|
17
|
-
return
|
|
18
|
-
|
|
16
|
+
}, e = n(c, 50);
|
|
17
|
+
return l.addEventListener("scroll", e), c(), () => {
|
|
18
|
+
l.removeEventListener("scroll", e), e.cancel();
|
|
19
19
|
};
|
|
20
|
-
}, [
|
|
20
|
+
}, [t]), r;
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
a as useScroll
|
|
24
24
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),i=require("react"),f=require("../../../tedi/helpers/hooks/use-element-size.cjs.js"),o=require("./ellipsis.module.scss.cjs.js"),g=require("../tooltip/tooltip-provider.cjs.js"),q=require("../tooltip/tooltip-trigger.cjs.js"),T=require("../tooltip/tooltip.cjs.js"),h=require("../card/card.cjs.js"),j=require("../card/card-content/card-content.cjs.js"),n=c=>{const{children:r,lineClamp:s=2,showTooltip:u=!0,...d}=c,e=i.useRef(null),[a,p]=i.useState(!1),m=f.useElementSize(e);i.useEffect(()=>{e.current&&p(e.current.scrollHeight>e.current.clientHeight)},[e,m]);const l=t.jsx("div",{"data-name":"ellipsis",...d,ref:e,className:o.default.ellipsis,style:{lineClamp:s,WebkitLineClamp:s},children:r});return a&&u?t.jsxs(g.TooltipProvider,{children:[t.jsx(q.TooltipTrigger,{children:l}),t.jsx(T.Tooltip,{children:t.jsx(h.Card,{borderless:!0,className:o.default.ellipsis__tooltip,children:t.jsx(j.CardContent,{padding:.75,children:r})})})]}):l};exports.Ellipsis=n;exports.default=n;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface EllipsisProps {
|
|
3
|
-
/**
|
|
4
|
-
* Any content
|
|
5
|
-
*/
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* What is max lines before Ellipsis
|
|
9
|
-
* @default 2
|
|
10
|
-
*/
|
|
11
|
-
lineClamp?: number;
|
|
12
|
-
/**
|
|
13
|
-
* Render Ellipsis with Tooltip
|
|
14
|
-
* @default true
|
|
15
|
-
*/
|
|
16
|
-
showTooltip?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare const Ellipsis: (props: EllipsisProps) => JSX.Element;
|
|
19
|
-
export default Ellipsis;
|