@tedi-design-system/react 19.1.0-rc.1 → 19.1.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 (30) hide show
  1. package/_virtual/index.es13.js +2 -2
  2. package/_virtual/index.es14.js +2 -2
  3. package/bundle-stats.html +1 -1
  4. package/external/react-is/index.cjs.js +1 -1
  5. package/external/react-is/index.es.js +1 -1
  6. package/external/toposort/index.cjs.js +1 -1
  7. package/external/toposort/index.es.js +1 -1
  8. package/index.css +1 -1
  9. package/package.json +1 -1
  10. package/src/community/components/layout/sidenav/sidenav.cjs.js +1 -1
  11. package/src/community/components/layout/sidenav/sidenav.es.js +38 -40
  12. package/src/tedi/components/content/collapse/collapse.cjs.js +1 -1
  13. package/src/tedi/components/content/collapse/collapse.d.ts +9 -0
  14. package/src/tedi/components/content/collapse/collapse.es.js +44 -35
  15. package/src/tedi/components/layout/sidenav/components/sidenav-item/sidenav-item.cjs.js +1 -1
  16. package/src/tedi/components/layout/sidenav/components/sidenav-item/sidenav-item.es.js +82 -85
  17. package/src/tedi/components/layout/sidenav/sidenav.cjs.js +1 -1
  18. package/src/tedi/components/layout/sidenav/sidenav.es.js +16 -16
  19. package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.cjs.js +1 -1
  20. package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.es.js +6 -7
  21. package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.cjs.js +1 -1
  22. package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.es.js +2 -2
  23. package/src/tedi/components/layout/top-nav/top-nav.cjs.js +1 -1
  24. package/src/tedi/components/layout/top-nav/top-nav.es.js +9 -8
  25. package/src/tedi/helpers/hooks/use-safe-id.cjs.js +1 -0
  26. package/src/tedi/helpers/hooks/use-safe-id.d.ts +16 -0
  27. package/src/tedi/helpers/hooks/use-safe-id.es.js +5 -0
  28. package/src/tedi/helpers/index.d.ts +1 -0
  29. package/tedi.cjs.js +1 -1
  30. package/tedi.es.js +10 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tedi-design-system/react",
3
- "version": "19.1.0-rc.1",
3
+ "version": "19.1.0-rc.2",
4
4
  "description": "TEDI Design System React component library — accessible, reusable UI components. Docs & live examples: https://storybook.tedi.ee/react/rc/",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),d=require("react"),S=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),h=require("../../../../../external/classnames/index.cjs.js"),T=require("../../../../tedi/components/base/icon/icon.cjs.js"),L=require("../../../../tedi/components/content/collapse/collapse.cjs.js"),P=require("../../../../tedi/components/misc/print/print.cjs.js"),q=require("../../../helpers/hooks/use-layout.cjs.js"),B=require("../../anchor/anchor.cjs.js"),C=require("../layout-context.cjs.js"),a=require("./sidenav.module.scss.cjs.js"),F=require("./utility.cjs.js"),A=n=>requestAnimationFrame(n),I=n=>{const{navItems:l,ariaLabel:i,linkAs:r,breakToBottomContent:c,breakToHeader:x,showDividers:u=!0,hideSubItemIcons:m=!1,className:v,..._}=n,p=q.default(["mobile","tablet"]),{menuOpen:b,context:g,getFloatingProps:f,floating:y,headerType:e,y:s}=d.useContext(C.LayoutContext),{hasSidenav:o}=F.useSidenavRendered(e,n);if(!o)return null;const N=h.default(a.default.sidenav,v,{[a.default["sidenav--has-dividers"]]:u,[a.default["sidenav--hide-subitem-icons"]]:m}),j=t.jsx(P.Print,{visibility:"hide",children:t.jsx("nav",{"data-name":"sidenav",..._,className:N,"aria-label":i,children:t.jsx("ul",{className:a.default.sidenav__list,role:"menubar","aria-label":i,children:l.map((E,M)=>d.createElement(k,{as:r,...E,key:M}))})})});return p?b?t.jsx(S.FloatingOverlay,{lockScroll:!0,className:a.default.sidenav__overlay,children:t.jsx(S.FloatingFocusManager,{context:g,order:["reference","content"],children:t.jsx("div",{...f({style:{paddingTop:s??0},className:a.default.sidenav,"aria-label":i}),ref:y,children:j})})}):null:j},k=n=>{const{icon:l,children:i,isActive:r,onClick:c,subItems:x,as:u,...m}=n,{toggleMenu:v,onHeaderSidenavToggle:_}=d.useContext(C.LayoutContext),p=q.default(["mobile","tablet"]),b=h.default(a.default.sidenav__item,{[a.default["sidenav__item--current"]]:r}),g=d.useId(),f=e=>{const o={className:h.default(a.default.sidenav__icon)},N=typeof e=="string"?{...o,name:e,color:"inherit"}:{...o,...e,className:h.default(o.className,e==null?void 0:e.className),background:void 0};return t.jsx(T.Icon,{...N})},y=e=>{c==null||c(e),e.stopPropagation(),typeof _=="function"||(p?A(()=>v()):v())};return t.jsx("li",{"data-name":"sidenav-item",className:b,role:"presentation",children:x?t.jsx(L.Collapse,{id:g,hideCollapseText:!0,open:r,title:t.jsxs("span",{...(({_href:e,...s})=>s)(m),className:a.default.sidenav__link,noStyle:!0,role:"menuitem","aria-current":r?"page":void 0,children:[l&&f(l),t.jsx("span",{className:a.default.sidenav__title,children:i})]}),children:t.jsx("ul",{className:a.default.sidenav__list,role:"menubar",children:x.map((e,s)=>d.createElement(k,{as:u,...e,key:s}))})}):t.jsxs(B.Anchor,{...m,as:u,onClick:y,className:a.default.sidenav__link,noStyle:!0,role:"menuitem","aria-current":r?"page":void 0,children:[l&&f(l),t.jsx("span",{className:a.default.sidenav__title,children:i})]})})};exports.SideNav=I;exports.default=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),d=require("react"),S=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),h=require("../../../../../external/classnames/index.cjs.js"),T=require("../../../../tedi/components/base/icon/icon.cjs.js"),L=require("../../../../tedi/components/content/collapse/collapse.cjs.js"),P=require("../../../../tedi/components/misc/print/print.cjs.js"),q=require("../../../helpers/hooks/use-layout.cjs.js"),A=require("../../anchor/anchor.cjs.js"),C=require("../layout-context.cjs.js"),a=require("./sidenav.module.scss.cjs.js"),B=require("./utility.cjs.js"),F=n=>requestAnimationFrame(n),I=n=>{const{navItems:l,ariaLabel:r,linkAs:i,breakToBottomContent:c,breakToHeader:x,showDividers:u=!0,hideSubItemIcons:m=!1,className:v,..._}=n,p=q.default(["mobile","tablet"]),{menuOpen:g,context:y,getFloatingProps:f,floating:N,headerType:e,y:s}=d.useContext(C.LayoutContext),{hasSidenav:o}=B.useSidenavRendered(e,n);if(!o)return null;const b=h.default(a.default.sidenav,v,{[a.default["sidenav--has-dividers"]]:u,[a.default["sidenav--hide-subitem-icons"]]:m}),j=t.jsx(P.Print,{visibility:"hide",children:t.jsx("nav",{"data-name":"sidenav",..._,className:b,"aria-label":r,children:t.jsx("ul",{className:a.default.sidenav__list,children:l.map((E,M)=>d.createElement(k,{as:i,...E,key:M}))})})});return p?g?t.jsx(S.FloatingOverlay,{lockScroll:!0,className:a.default.sidenav__overlay,children:t.jsx(S.FloatingFocusManager,{context:y,order:["reference","content"],children:t.jsx("div",{...f({style:{paddingTop:s??0},className:a.default.sidenav,"aria-label":r}),ref:N,children:j})})}):null:j},k=n=>{const{icon:l,children:r,isActive:i,onClick:c,subItems:x,as:u,...m}=n,{toggleMenu:v,onHeaderSidenavToggle:_}=d.useContext(C.LayoutContext),p=q.default(["mobile","tablet"]),g=h.default(a.default.sidenav__item,{[a.default["sidenav__item--current"]]:i}),y=d.useId(),f=e=>{const o={className:h.default(a.default.sidenav__icon)},b=typeof e=="string"?{...o,name:e,color:"inherit"}:{...o,...e,className:h.default(o.className,e==null?void 0:e.className),background:void 0};return t.jsx(T.Icon,{...b})},N=e=>{c==null||c(e),e.stopPropagation(),typeof _=="function"||(p?F(()=>v()):v())};return t.jsx("li",{"data-name":"sidenav-item",className:g,children:x?t.jsx(L.Collapse,{id:y,hideCollapseText:!0,contentAsRegion:!1,open:i,title:t.jsxs("span",{...(({_href:e,...s})=>s)(m),className:a.default.sidenav__link,"aria-current":i?"page":void 0,children:[l&&f(l),t.jsx("span",{className:a.default.sidenav__title,children:r})]}),children:t.jsx("ul",{className:a.default.sidenav__list,children:x.map((e,s)=>d.createElement(k,{as:u,...e,key:s}))})}):t.jsxs(A.Anchor,{...m,as:u,onClick:N,className:a.default.sidenav__link,noStyle:!0,"aria-current":i?"page":void 0,children:[l&&f(l),t.jsx("span",{className:a.default.sidenav__title,children:r})]})})};exports.SideNav=I;exports.default=I;
@@ -1,98 +1,96 @@
1
1
  import { jsx as t, jsxs as x } from "react/jsx-runtime";
2
- import y, { createElement as C } from "react";
3
- import { FloatingOverlay as F, FloatingFocusManager as L } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
4
- import v from "../../../../../external/classnames/index.es.js";
5
- import { Icon as P } from "../../../../tedi/components/base/icon/icon.es.js";
6
- import { Collapse as A } from "../../../../tedi/components/content/collapse/collapse.es.js";
7
- import { Print as j } from "../../../../tedi/components/misc/print/print.es.js";
2
+ import b, { createElement as C } from "react";
3
+ import { FloatingOverlay as B, FloatingFocusManager as F } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
4
+ import p from "../../../../../external/classnames/index.es.js";
5
+ import { Icon as L } from "../../../../tedi/components/base/icon/icon.es.js";
6
+ import { Collapse as P } from "../../../../tedi/components/content/collapse/collapse.es.js";
7
+ import { Print as R } from "../../../../tedi/components/misc/print/print.es.js";
8
8
  import k from "../../../helpers/hooks/use-layout.es.js";
9
- import { Anchor as H } from "../../anchor/anchor.es.js";
9
+ import { Anchor as j } from "../../anchor/anchor.es.js";
10
10
  import { LayoutContext as E } from "../layout-context.es.js";
11
11
  import a from "./sidenav.module.scss.es.js";
12
- import { useSidenavRendered as O } from "./utility.es.js";
13
- const R = (s) => requestAnimationFrame(s), Y = (s) => {
12
+ import { useSidenavRendered as H } from "./utility.es.js";
13
+ const O = (n) => requestAnimationFrame(n), Y = (n) => {
14
14
  const {
15
15
  navItems: i,
16
- ariaLabel: o,
17
- linkAs: r,
16
+ ariaLabel: r,
17
+ linkAs: o,
18
18
  breakToBottomContent: c,
19
19
  breakToHeader: f,
20
20
  showDividers: d = !0,
21
21
  hideSubItemIcons: m = !1,
22
22
  className: u,
23
23
  ...h
24
- } = s, _ = k(["mobile", "tablet"]), { menuOpen: N, context: b, getFloatingProps: p, floating: S, headerType: e, y: n } = y.useContext(E), { hasSidenav: l } = O(e, s);
24
+ } = n, _ = k(["mobile", "tablet"]), { menuOpen: N, context: g, getFloatingProps: v, floating: S, headerType: e, y: s } = b.useContext(E), { hasSidenav: l } = H(e, n);
25
25
  if (!l)
26
26
  return null;
27
- const g = v(a.sidenav, u, {
27
+ const y = p(a.sidenav, u, {
28
28
  [a["sidenav--has-dividers"]]: d,
29
29
  [a["sidenav--hide-subitem-icons"]]: m
30
- }), I = /* @__PURE__ */ t(j, { visibility: "hide", children: /* @__PURE__ */ t("nav", { "data-name": "sidenav", ...h, className: g, "aria-label": o, children: /* @__PURE__ */ t("ul", { className: a.sidenav__list, role: "menubar", "aria-label": o, children: i.map((T, B) => /* @__PURE__ */ C(M, { as: r, ...T, key: B })) }) }) });
31
- return _ ? N ? /* @__PURE__ */ t(F, { lockScroll: !0, className: a.sidenav__overlay, children: /* @__PURE__ */ t(L, { context: b, order: ["reference", "content"], children: /* @__PURE__ */ t(
30
+ }), I = /* @__PURE__ */ t(R, { visibility: "hide", children: /* @__PURE__ */ t("nav", { "data-name": "sidenav", ...h, className: y, "aria-label": r, children: /* @__PURE__ */ t("ul", { className: a.sidenav__list, children: i.map((T, A) => /* @__PURE__ */ C(M, { as: o, ...T, key: A })) }) }) });
31
+ return _ ? N ? /* @__PURE__ */ t(B, { lockScroll: !0, className: a.sidenav__overlay, children: /* @__PURE__ */ t(F, { context: g, order: ["reference", "content"], children: /* @__PURE__ */ t(
32
32
  "div",
33
33
  {
34
- ...p({
34
+ ...v({
35
35
  style: {
36
- paddingTop: n ?? 0
36
+ paddingTop: s ?? 0
37
37
  },
38
38
  className: a.sidenav,
39
- "aria-label": o
39
+ "aria-label": r
40
40
  }),
41
41
  ref: S,
42
42
  children: I
43
43
  }
44
44
  ) }) }) : null : I;
45
- }, M = (s) => {
46
- const { icon: i, children: o, isActive: r, onClick: c, subItems: f, as: d, ...m } = s, { toggleMenu: u, onHeaderSidenavToggle: h } = y.useContext(E), _ = k(["mobile", "tablet"]), N = v(a.sidenav__item, { [a["sidenav__item--current"]]: r }), b = y.useId(), p = (e) => {
47
- const l = { className: v(a.sidenav__icon) }, g = typeof e == "string" ? { ...l, name: e, color: "inherit" } : {
45
+ }, M = (n) => {
46
+ const { icon: i, children: r, isActive: o, onClick: c, subItems: f, as: d, ...m } = n, { toggleMenu: u, onHeaderSidenavToggle: h } = b.useContext(E), _ = k(["mobile", "tablet"]), N = p(a.sidenav__item, { [a["sidenav__item--current"]]: o }), g = b.useId(), v = (e) => {
47
+ const l = { className: p(a.sidenav__icon) }, y = typeof e == "string" ? { ...l, name: e, color: "inherit" } : {
48
48
  ...l,
49
49
  ...e,
50
- className: v(l.className, e == null ? void 0 : e.className),
50
+ className: p(l.className, e == null ? void 0 : e.className),
51
51
  background: void 0
52
52
  };
53
- return /* @__PURE__ */ t(P, { ...g });
53
+ return /* @__PURE__ */ t(L, { ...y });
54
54
  };
55
- return /* @__PURE__ */ t("li", { "data-name": "sidenav-item", className: N, role: "presentation", children: f ? /* @__PURE__ */ t(
56
- A,
55
+ return /* @__PURE__ */ t("li", { "data-name": "sidenav-item", className: N, children: f ? /* @__PURE__ */ t(
56
+ P,
57
57
  {
58
- id: b,
58
+ id: g,
59
59
  hideCollapseText: !0,
60
- open: r,
60
+ contentAsRegion: !1,
61
+ open: o,
61
62
  title: /* @__PURE__ */ x(
62
63
  "span",
63
64
  {
64
- ...(({ _href: e, ...n }) => n)(m),
65
+ ...(({ _href: e, ...s }) => s)(m),
65
66
  className: a.sidenav__link,
66
- noStyle: !0,
67
- role: "menuitem",
68
- "aria-current": r ? "page" : void 0,
67
+ "aria-current": o ? "page" : void 0,
69
68
  children: [
70
- i && p(i),
71
- /* @__PURE__ */ t("span", { className: a.sidenav__title, children: o })
69
+ i && v(i),
70
+ /* @__PURE__ */ t("span", { className: a.sidenav__title, children: r })
72
71
  ]
73
72
  }
74
73
  ),
75
- children: /* @__PURE__ */ t("ul", { className: a.sidenav__list, role: "menubar", children: f.map((e, n) => /* @__PURE__ */ C(M, { as: d, ...e, key: n })) })
74
+ children: /* @__PURE__ */ t("ul", { className: a.sidenav__list, children: f.map((e, s) => /* @__PURE__ */ C(M, { as: d, ...e, key: s })) })
76
75
  }
77
76
  ) : (
78
77
  // // TODO: Remove ts-ignore
79
78
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
80
79
  // @ts-ignore
81
80
  /* @__PURE__ */ x(
82
- H,
81
+ j,
83
82
  {
84
83
  ...m,
85
84
  as: d,
86
85
  onClick: (e) => {
87
- c == null || c(e), e.stopPropagation(), typeof h == "function" || (_ ? R(() => u()) : u());
86
+ c == null || c(e), e.stopPropagation(), typeof h == "function" || (_ ? O(() => u()) : u());
88
87
  },
89
88
  className: a.sidenav__link,
90
89
  noStyle: !0,
91
- role: "menuitem",
92
- "aria-current": r ? "page" : void 0,
90
+ "aria-current": o ? "page" : void 0,
93
91
  children: [
94
- i && p(i),
95
- /* @__PURE__ */ t("span", { className: a.sidenav__title, children: o })
92
+ i && v(i),
93
+ /* @__PURE__ */ t("span", { className: a.sidenav__title, children: r })
96
94
  ]
97
95
  }
98
96
  )
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),q=require("../../../../../external/classnames/index.cjs.js"),n=require("react"),J=require("../../../../../external/react-animate-height/dist/esm/index.cjs.js"),K=require("../../../providers/printing-provider/printing-provider.cjs.js"),Q=require("../../buttons/collapse-button/collapse-button.cjs.js"),U=require("../../misc/print/print.cjs.js"),s=require("./collapse.module.scss.cjs.js"),V=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),W=require("../../layout/grid/row.cjs.js"),R=require("../../layout/grid/col.cjs.js"),w=d=>{const{getCurrentBreakpointProps:O}=V.useBreakpointProps(d.defaultServerBreakpoint),{id:l,children:P,className:k,openText:y,closeText:I,hideCollapseText:T=!1,title:o,titleRowProps:B,defaultOpen:S,open:u,onToggle:i,arrowType:E="default",size:N="default",underline:$=!0,toggleLabel:p,iconOnly:L=!1,controlsId:f,inverted:M=!1,fullRowToggle:a=!1,...z}=O(d),g=f!==void 0,h=`${l}__trigger`,x=`${l}__content`,A=`${l}__animate`,[D,F]=n.useState(()=>S??!1),v=K.usePrint(),r=v||(u!==void 0?u:D),G=L===!0&&!o,_=n.useRef(null),c=t=>{F(t),i==null||i(t)},m=n.useRef(c);m.current=c;const j=n.useRef(r);j.current=r,n.useEffect(()=>{const t=_.current;if(!a||!t)return;const b=H=>{H.target.closest("a, button, input, select, textarea, label")||m.current(!j.current)};return t.addEventListener("click",b),()=>t.removeEventListener("click",b)},[a]);const C=e.jsx("div",{id:x,role:"region","aria-labelledby":h,className:s.default["tedi-collapse__content"],children:P});return e.jsxs("div",{"data-name":"collapse",...z,className:q.default(s.default["tedi-collapse"],k),children:[e.jsx("div",{ref:_,className:q.default(s.default["tedi-collapse__header"],{[s.default["tedi-collapse__header--clickable"]]:a}),children:e.jsxs(W.Row,{justifyContent:"between",alignItems:"center",wrap:"nowrap",...B,children:[o&&e.jsx(R.Col,{children:o}),e.jsx(R.Col,{width:"auto",children:e.jsx(U.Print,{visibility:"hide",children:e.jsx(Q.CollapseButton,{id:h,open:r,onOpenChange:c,openText:y,closeText:I,hideText:T||G,arrowType:E,size:N,inverted:M,underline:$,"aria-controls":g?f:x,...p?{"aria-label":p}:{}})})})]})}),!g&&(v?C:e.jsx(J.default,{id:A,duration:300,height:r?"auto":0,"data-testid":"collapse-inner",children:C}))]})};exports.Collapse=w;exports.default=w;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),b=require("../../../../../external/classnames/index.cjs.js"),n=require("react"),K=require("../../../../../external/react-animate-height/dist/esm/index.cjs.js"),Q=require("../../../providers/printing-provider/printing-provider.cjs.js"),U=require("../../buttons/collapse-button/collapse-button.cjs.js"),V=require("../../misc/print/print.cjs.js"),s=require("./collapse.module.scss.cjs.js"),W=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),X=require("../../layout/grid/row.cjs.js"),q=require("../../layout/grid/col.cjs.js"),w=d=>{const{getCurrentBreakpointProps:O}=W.useBreakpointProps(d.defaultServerBreakpoint),{id:l,children:P,className:k,openText:y,closeText:I,hideCollapseText:T=!1,title:o,titleRowProps:B,defaultOpen:S,open:u,onToggle:i,arrowType:E="default",size:N="default",underline:$=!0,toggleLabel:p,iconOnly:L=!1,controlsId:f,inverted:M=!1,fullRowToggle:a=!1,contentAsRegion:z=!0,...A}=O(d),g=f!==void 0,h=`${l}__trigger`,x=`${l}__content`,D=`${l}__animate`,[F,G]=n.useState(()=>S??!1),v=Q.usePrint(),r=v||(u!==void 0?u:F),H=L===!0&&!o,_=n.useRef(null),c=t=>{G(t),i==null||i(t)},m=n.useRef(c);m.current=c;const j=n.useRef(r);j.current=r,n.useEffect(()=>{const t=_.current;if(!a||!t)return;const R=J=>{J.target.closest("a, button, input, select, textarea, label")||m.current(!j.current)};return t.addEventListener("click",R),()=>t.removeEventListener("click",R)},[a]);const C=e.jsx("div",{id:x,...z?{role:"region","aria-labelledby":h}:{},className:s.default["tedi-collapse__content"],children:P});return e.jsxs("div",{"data-name":"collapse",...A,className:b.default(s.default["tedi-collapse"],k),children:[e.jsx("div",{ref:_,className:b.default(s.default["tedi-collapse__header"],{[s.default["tedi-collapse__header--clickable"]]:a}),children:e.jsxs(X.Row,{justifyContent:"between",alignItems:"center",wrap:"nowrap",...B,children:[o&&e.jsx(q.Col,{children:o}),e.jsx(q.Col,{width:"auto",children:e.jsx(V.Print,{visibility:"hide",children:e.jsx(U.CollapseButton,{id:h,open:r,onOpenChange:c,openText:y,closeText:I,hideText:T||H,arrowType:E,size:N,inverted:M,underline:$,"aria-controls":g?f:x,...p?{"aria-label":p}:{}})})})]})}),!g&&(v?C:e.jsx(K.default,{id:D,duration:300,height:r?"auto":0,"data-testid":"collapse-inner",children:C}))]})};exports.Collapse=w;exports.default=w;
@@ -116,6 +116,15 @@ export interface CollapseProps extends BreakpointSupport<CollapseBreakpointProps
116
116
  * built-in `role="region"` panel.
117
117
  */
118
118
  controlsId?: string;
119
+ /**
120
+ * Whether the disclosed content panel is exposed as a `region` landmark
121
+ * (`role="region"` + `aria-labelledby`). Turn this **off** for repeated or
122
+ * nested disclosures such as navigation sub-menus, where many labelled regions
123
+ * pollute the landmark map and collide (axe `landmark-unique`); the
124
+ * `aria-expanded` toggle already conveys the relationship.
125
+ * @default true
126
+ */
127
+ contentAsRegion?: boolean;
119
128
  }
120
129
  export declare const Collapse: (props: CollapseProps) => JSX.Element;
121
130
  export default Collapse;
@@ -1,16 +1,16 @@
1
1
  import { jsxs as x, jsx as e } from "react/jsx-runtime";
2
2
  import y from "../../../../../external/classnames/index.es.js";
3
- import r from "react";
4
- import K from "../../../../../external/react-animate-height/dist/esm/index.es.js";
5
- import { usePrint as M } from "../../../providers/printing-provider/printing-provider.es.js";
6
- import { CollapseButton as Q } from "../../buttons/collapse-button/collapse-button.es.js";
7
- import { Print as U } from "../../misc/print/print.es.js";
3
+ import n from "react";
4
+ import M from "../../../../../external/react-animate-height/dist/esm/index.es.js";
5
+ import { usePrint as Q } from "../../../providers/printing-provider/printing-provider.es.js";
6
+ import { CollapseButton as U } from "../../buttons/collapse-button/collapse-button.es.js";
7
+ import { Print as V } from "../../misc/print/print.es.js";
8
8
  import o from "./collapse.module.scss.es.js";
9
- import { useBreakpointProps as V } from "../../../helpers/hooks/use-breakpoint-props.es.js";
10
- import { Row as W } from "../../layout/grid/row.es.js";
9
+ import { useBreakpointProps as W } from "../../../helpers/hooks/use-breakpoint-props.es.js";
10
+ import { Row as X } from "../../layout/grid/row.es.js";
11
11
  import { Col as O } from "../../layout/grid/col.es.js";
12
- const ae = (d) => {
13
- const { getCurrentBreakpointProps: k } = V(d.defaultServerBreakpoint), {
12
+ const ce = (d) => {
13
+ const { getCurrentBreakpointProps: k } = W(d.defaultServerBreakpoint), {
14
14
  id: i,
15
15
  children: I,
16
16
  className: P,
@@ -25,27 +25,36 @@ const ae = (d) => {
25
25
  arrowType: L = "default",
26
26
  size: S = "default",
27
27
  underline: $ = !0,
28
- toggleLabel: f,
29
- iconOnly: z = !1,
30
- controlsId: u,
31
- inverted: A = !1,
28
+ toggleLabel: u,
29
+ iconOnly: A = !1,
30
+ controlsId: f,
31
+ inverted: z = !1,
32
32
  fullRowToggle: a = !1,
33
- ...H
34
- } = k(d), m = u !== void 0, h = `${i}__trigger`, g = `${i}__content`, q = `${i}__animate`, [D, F] = r.useState(() => j ?? !1), _ = M(), n = _ || (p !== void 0 ? p : D), G = z === !0 && !l, v = r.useRef(null), c = (t) => {
35
- F(t), s == null || s(t);
36
- }, C = r.useRef(c);
37
- C.current = c;
38
- const R = r.useRef(n);
39
- R.current = n, r.useEffect(() => {
33
+ contentAsRegion: H = !0,
34
+ ...q
35
+ } = k(d), m = f !== void 0, h = `${i}__trigger`, g = `${i}__content`, D = `${i}__animate`, [F, G] = n.useState(() => j ?? !1), _ = Q(), r = _ || (p !== void 0 ? p : F), J = A === !0 && !l, v = n.useRef(null), c = (t) => {
36
+ G(t), s == null || s(t);
37
+ }, R = n.useRef(c);
38
+ R.current = c;
39
+ const C = n.useRef(r);
40
+ C.current = r, n.useEffect(() => {
40
41
  const t = v.current;
41
42
  if (!a || !t) return;
42
- const w = (J) => {
43
- J.target.closest("a, button, input, select, textarea, label") || C.current(!R.current);
43
+ const w = (K) => {
44
+ K.target.closest("a, button, input, select, textarea, label") || R.current(!C.current);
44
45
  };
45
46
  return t.addEventListener("click", w), () => t.removeEventListener("click", w);
46
47
  }, [a]);
47
- const b = /* @__PURE__ */ e("div", { id: g, role: "region", "aria-labelledby": h, className: o["tedi-collapse__content"], children: I });
48
- return /* @__PURE__ */ x("div", { "data-name": "collapse", ...H, className: y(o["tedi-collapse"], P), children: [
48
+ const b = /* @__PURE__ */ e(
49
+ "div",
50
+ {
51
+ id: g,
52
+ ...H ? { role: "region", "aria-labelledby": h } : {},
53
+ className: o["tedi-collapse__content"],
54
+ children: I
55
+ }
56
+ );
57
+ return /* @__PURE__ */ x("div", { "data-name": "collapse", ...q, className: y(o["tedi-collapse"], P), children: [
49
58
  /* @__PURE__ */ e(
50
59
  "div",
51
60
  {
@@ -53,32 +62,32 @@ const ae = (d) => {
53
62
  className: y(o["tedi-collapse__header"], {
54
63
  [o["tedi-collapse__header--clickable"]]: a
55
64
  }),
56
- children: /* @__PURE__ */ x(W, { justifyContent: "between", alignItems: "center", wrap: "nowrap", ...E, children: [
65
+ children: /* @__PURE__ */ x(X, { justifyContent: "between", alignItems: "center", wrap: "nowrap", ...E, children: [
57
66
  l && /* @__PURE__ */ e(O, { children: l }),
58
- /* @__PURE__ */ e(O, { width: "auto", children: /* @__PURE__ */ e(U, { visibility: "hide", children: /* @__PURE__ */ e(
59
- Q,
67
+ /* @__PURE__ */ e(O, { width: "auto", children: /* @__PURE__ */ e(V, { visibility: "hide", children: /* @__PURE__ */ e(
68
+ U,
60
69
  {
61
70
  id: h,
62
- open: n,
71
+ open: r,
63
72
  onOpenChange: c,
64
73
  openText: T,
65
74
  closeText: N,
66
- hideText: B || G,
75
+ hideText: B || J,
67
76
  arrowType: L,
68
77
  size: S,
69
- inverted: A,
78
+ inverted: z,
70
79
  underline: $,
71
- "aria-controls": m ? u : g,
72
- ...f ? { "aria-label": f } : {}
80
+ "aria-controls": m ? f : g,
81
+ ...u ? { "aria-label": u } : {}
73
82
  }
74
83
  ) }) })
75
84
  ] })
76
85
  }
77
86
  ),
78
- !m && (_ ? b : /* @__PURE__ */ e(K, { id: q, duration: 300, height: n ? "auto" : 0, "data-testid": "collapse-inner", children: b }))
87
+ !m && (_ ? b : /* @__PURE__ */ e(M, { id: D, duration: 300, height: r ? "auto" : 0, "data-testid": "collapse-inner", children: b }))
79
88
  ] });
80
89
  };
81
90
  export {
82
- ae as Collapse,
83
- ae as default
91
+ ce as Collapse,
92
+ ce as default
84
93
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("react"),n=require("../../../../../../../external/classnames/index.cjs.js"),P=require("../../../../base/icon/icon.cjs.js"),y=require("../../../../content/collapse/collapse.cjs.js"),k=require("../../../../navigation/link/link.cjs.js"),s=require("../../sidenav.module.scss.cjs.js"),J=require("../sidenav-dropdown/sidenav-dropdown.cjs.js"),K=require("../../../../../providers/label-provider/use-labels.cjs.js"),h=require("../../../../overlays/tooltip/tooltip.cjs.js"),D=M=>{const{icon:t,children:i,isActive:g,onClick:x,subItems:C,subItemGroups:O,as:j,onItemClick:v,className:E,level:d=1,isCollapsed:c=!1,isDefaultOpen:R=!1,sideNavItemSize:B="default",...u}=M,{getLabel:T}=K.useLabels(),[o,$]=f.useState(R??!1),[S,z]=f.useState(!1),N=f.useId(),m=O??(C?[{subItems:C}]:null),l=!!m,F=d>1&&l,H=n.default(s.default["tedi-sidenav__item"],s.default[`tedi-sidenav__item--${B}`],{[s.default[`tedi-sidenav__item--level-${d}`]]:d>1,[s.default["tedi-sidenav__item--current"]]:g,[s.default["tedi-sidenav__item--has-children"]]:l,[s.default["tedi-sidenav__item--with-tree"]]:F},E),_=a=>{const r={color:"white",className:n.default(s.default["tedi-sidenav__icon"])},p=typeof a=="string"?{...r,name:a}:{...r,...a,className:n.default(r.className,a==null?void 0:a.className)};return e.jsx(P.Icon,{...p})},A=a=>{x==null||x(a),l||v==null||v()},w=a=>{$(a)},G=l&&(u.href||u.to),b={...u,as:j,onClick:A,className:n.default(s.default["tedi-sidenav__link"],G&&s.default["tedi-sidenav__link--has-children-link"]),noStyle:!0,role:"menuitem","aria-current":g?"page":void 0,"aria-label":c&&typeof i=="string"?i:void 0,...l?{"aria-haspopup":"true","aria-expanded":o,"aria-controls":N}:{}},I=()=>!c&&(m==null?void 0:m.map((a,L)=>{var r;return e.jsxs("div",{children:[(a==null?void 0:a.subHeading)&&e.jsx("div",{className:s.default["tedi-sidenav__subheading"],children:a.subHeading}),e.jsx("ul",{className:s.default["tedi-sidenav__list"],role:"menu",children:(r=a.subItems)==null?void 0:r.map((p,W)=>f.createElement(D,{as:j,...p,key:W,level:d+1,onItemClick:v,isCollapsed:c,className:n.default(s.default["tedi-sidenav__sub-item"],p.className)}))})]},L)})),q=e.jsx("li",{"data-name":"sidenav-item",className:H,children:l&&c?e.jsx(J.SideNavDropdown,{trigger:e.jsx(h.Tooltip.Trigger,{children:e.jsxs("span",{className:n.default(s.default["tedi-sidenav__link"],S&&s.default["tedi-sidenav__link--active"]),children:[t&&_(t),e.jsx(P.Icon,{name:S?"chevron_right":"expand_more",color:"white",className:s.default["tedi-sidenav__toggle-icon"],size:18}),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i})]})}),as:j,groups:m,onOpenChange:z}):l&&d===1?u.href||u.to?e.jsxs(e.Fragment,{children:[e.jsxs(k.Link,{...b,children:[t&&_(t),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i})]}),e.jsx("div",{className:s.default["tedi-sidenav__link-collapse-wrapper"],children:e.jsx(y.Collapse,{id:N,hideCollapseText:!0,inverted:!0,open:o,onToggle:w,toggleLabel:T("sidenav.toggleSubmenuChildren",{isCollapsedInternal:o,children:i}),className:s.default["tedi-sidenav__collapse"],titleRowProps:{element:"span"},children:I()})})]}):e.jsx(y.Collapse,{id:N,hideCollapseText:!0,inverted:!0,fullRowToggle:!0,open:o,onToggle:w,className:s.default["tedi-sidenav__collapse"],titleRowProps:{element:"span"},toggleLabel:T("sidenav.toggleSubmenuChildren",{isCollapsedInternal:o,children:i}),title:e.jsxs("span",{className:n.default(s.default["tedi-sidenav__link"],o&&s.default["tedi-sidenav__link--active"]),"aria-current":g?"page":void 0,children:[t&&_(t),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i})]}),children:I()}):l?e.jsxs(e.Fragment,{children:[e.jsxs(k.Link,{...b,children:[t&&_(t),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i}),e.jsx("i",{className:s.default["tedi-sidenav__bullet"]})]}),I()]}):e.jsx(h.Tooltip.Trigger,{children:e.jsxs(k.Link,{...b,children:[t&&_(t),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i})]})})});return d===1&&c?e.jsxs(h.Tooltip,{placement:"right",focusManager:void 0,children:[e.jsx(h.Tooltip.Content,{maxWidth:"medium",children:i}),q]}):q};exports.SideNavItem=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),n=require("../../../../../../../external/classnames/index.cjs.js"),P=require("../../../../base/icon/icon.cjs.js"),R=require("../../../../content/collapse/collapse.cjs.js"),I=require("../../../../navigation/link/link.cjs.js"),s=require("../../sidenav.module.scss.cjs.js"),J=require("../sidenav-dropdown/sidenav-dropdown.cjs.js"),K=require("../../../../../providers/label-provider/use-labels.cjs.js"),Q=require("../../../../../helpers/hooks/use-safe-id.cjs.js"),p=require("../../../../overlays/tooltip/tooltip.cjs.js"),y=D=>{const{icon:a,children:i,isActive:h,onClick:g,subItems:k,subItemGroups:M,as:x,onItemClick:v,className:O,level:d=1,isCollapsed:r=!1,isDefaultOpen:E=!1,sideNavItemSize:A="default",...c}=D,{getLabel:C}=K.useLabels(),[u,B]=b.useState(E??!1),[S,$]=b.useState(!1),T=Q.useSafeId("sidenav-collapse"),m=M??(k?[{subItems:k}]:null),l=!!m,z=d>1&&l,F=n.default(s.default["tedi-sidenav__item"],s.default[`tedi-sidenav__item--${A}`],{[s.default[`tedi-sidenav__item--level-${d}`]]:d>1,[s.default["tedi-sidenav__item--current"]]:h,[s.default["tedi-sidenav__item--has-children"]]:l,[s.default["tedi-sidenav__item--with-tree"]]:z},O),_=t=>{const o={color:"white",className:n.default(s.default["tedi-sidenav__icon"])},f=typeof t=="string"?{...o,name:t}:{...o,...t,className:n.default(o.className,t==null?void 0:t.className)};return e.jsx(P.Icon,{...f})},H=t=>{g==null||g(t),l||v==null||v()},q=t=>{B(t)},G=l&&(c.href||c.to),j={...c,as:x,onClick:H,className:n.default(s.default["tedi-sidenav__link"],G&&s.default["tedi-sidenav__link--has-children-link"]),noStyle:!0,"aria-current":h?"page":void 0,"aria-label":r&&typeof i=="string"?i:void 0},N=()=>!r&&(m==null?void 0:m.map((t,L)=>{var o;return e.jsxs("div",{children:[(t==null?void 0:t.subHeading)&&e.jsx("div",{className:s.default["tedi-sidenav__subheading"],children:t.subHeading}),e.jsx("ul",{className:s.default["tedi-sidenav__list"],children:(o=t.subItems)==null?void 0:o.map((f,W)=>b.createElement(y,{as:x,...f,key:W,level:d+1,onItemClick:v,isCollapsed:r,className:n.default(s.default["tedi-sidenav__sub-item"],f.className)}))})]},L)})),w=e.jsx("li",{"data-name":"sidenav-item",className:F,children:l&&r?e.jsx(J.SideNavDropdown,{trigger:e.jsx(p.Tooltip.Trigger,{children:e.jsxs("span",{className:n.default(s.default["tedi-sidenav__link"],S&&s.default["tedi-sidenav__link--active"]),children:[a&&_(a),e.jsx(P.Icon,{name:S?"chevron_right":"expand_more",color:"white",className:s.default["tedi-sidenav__toggle-icon"],size:18}),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i})]})}),as:x,groups:m,onOpenChange:$}):l&&d===1?c.href||c.to?e.jsxs(e.Fragment,{children:[e.jsxs(I.Link,{...j,children:[a&&_(a),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i})]}),e.jsx("div",{className:s.default["tedi-sidenav__link-collapse-wrapper"],children:e.jsx(R.Collapse,{id:T,hideCollapseText:!0,inverted:!0,contentAsRegion:!1,open:u,onToggle:q,toggleLabel:C("sidenav.toggleSubmenuChildren",{isCollapsedInternal:u,children:i}),className:s.default["tedi-sidenav__collapse"],titleRowProps:{element:"span"},children:N()})})]}):e.jsx(R.Collapse,{id:T,hideCollapseText:!0,inverted:!0,fullRowToggle:!0,contentAsRegion:!1,open:u,onToggle:q,className:s.default["tedi-sidenav__collapse"],titleRowProps:{element:"span"},toggleLabel:C("sidenav.toggleSubmenuChildren",{isCollapsedInternal:u,children:i}),title:e.jsxs("span",{className:n.default(s.default["tedi-sidenav__link"],u&&s.default["tedi-sidenav__link--active"]),"aria-current":h?"page":void 0,children:[a&&_(a),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i})]}),children:N()}):l?e.jsxs(e.Fragment,{children:[e.jsxs(I.Link,{...j,children:[a&&_(a),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i}),e.jsx("i",{className:s.default["tedi-sidenav__bullet"]})]}),N()]}):e.jsx(p.Tooltip.Trigger,{children:e.jsxs(I.Link,{...j,children:[a&&_(a),e.jsx("span",{className:s.default["tedi-sidenav__title"],children:i})]})})});return d===1&&r?e.jsxs(p.Tooltip,{placement:"right",focusManager:void 0,children:[e.jsx(p.Tooltip.Content,{maxWidth:"medium",children:i}),w]}):w};exports.SideNavItem=y;
@@ -1,145 +1,142 @@
1
- import { jsx as i, jsxs as n, Fragment as D } from "react/jsx-runtime";
2
- import K, { useState as E, createElement as Q } from "react";
1
+ import { jsx as s, jsxs as n, Fragment as D } from "react/jsx-runtime";
2
+ import { useState as E, createElement as K } from "react";
3
3
  import d from "../../../../../../../external/classnames/index.es.js";
4
4
  import { Icon as M } from "../../../../base/icon/icon.es.js";
5
5
  import { Collapse as O } from "../../../../content/collapse/collapse.es.js";
6
- import { Link as w } from "../../../../navigation/link/link.es.js";
6
+ import { Link as k } from "../../../../navigation/link/link.es.js";
7
7
  import e from "../../sidenav.module.scss.es.js";
8
- import { SideNavDropdown as U } from "../sidenav-dropdown/sidenav-dropdown.es.js";
9
- import { useLabels as V } from "../../../../../providers/label-provider/use-labels.es.js";
10
- import { Tooltip as g } from "../../../../overlays/tooltip/tooltip.es.js";
11
- const X = (B) => {
8
+ import { SideNavDropdown as Q } from "../sidenav-dropdown/sidenav-dropdown.es.js";
9
+ import { useLabels as U } from "../../../../../providers/label-provider/use-labels.es.js";
10
+ import { useSafeId as V } from "../../../../../helpers/hooks/use-safe-id.es.js";
11
+ import { Tooltip as u } from "../../../../overlays/tooltip/tooltip.es.js";
12
+ const X = (R) => {
12
13
  const {
13
14
  icon: a,
14
15
  children: t,
15
- isActive: N,
16
- onClick: f,
17
- subItems: T,
18
- subItemGroups: R,
16
+ isActive: f,
17
+ onClick: N,
18
+ subItems: w,
19
+ subItemGroups: A,
19
20
  as: b,
20
21
  onItemClick: h,
21
- className: j,
22
- level: r = 1,
23
- isCollapsed: m = !1,
24
- isDefaultOpen: z = !1,
25
- sideNavItemSize: H = "default",
26
- ..._
27
- } = B, { getLabel: x } = V(), [o, $] = E(z ?? !1), [S, A] = E(!1), I = K.useId(), p = R ?? (T ? [{ subItems: T }] : null), l = !!p, F = r > 1 && l, G = d(
22
+ className: B,
23
+ level: o = 1,
24
+ isCollapsed: c = !1,
25
+ isDefaultOpen: j = !1,
26
+ sideNavItemSize: z = "default",
27
+ ...m
28
+ } = R, { getLabel: S } = U(), [_, H] = E(j ?? !1), [T, $] = E(!1), x = V("sidenav-collapse"), p = A ?? (w ? [{ subItems: w }] : null), l = !!p, F = o > 1 && l, G = d(
28
29
  e["tedi-sidenav__item"],
29
- e[`tedi-sidenav__item--${H}`],
30
+ e[`tedi-sidenav__item--${z}`],
30
31
  {
31
- [e[`tedi-sidenav__item--level-${r}`]]: r > 1,
32
- [e["tedi-sidenav__item--current"]]: N,
32
+ [e[`tedi-sidenav__item--level-${o}`]]: o > 1,
33
+ [e["tedi-sidenav__item--current"]]: f,
33
34
  [e["tedi-sidenav__item--has-children"]]: l,
34
35
  [e["tedi-sidenav__item--with-tree"]]: F
35
36
  },
36
- j
37
- ), v = (s) => {
38
- const c = {
37
+ B
38
+ ), v = (i) => {
39
+ const r = {
39
40
  color: "white",
40
41
  className: d(e["tedi-sidenav__icon"])
41
- }, u = typeof s == "string" ? { ...c, name: s } : {
42
- ...c,
43
- ...s,
44
- className: d(c.className, s == null ? void 0 : s.className)
42
+ }, g = typeof i == "string" ? { ...r, name: i } : {
43
+ ...r,
44
+ ...i,
45
+ className: d(r.className, i == null ? void 0 : i.className)
45
46
  };
46
- return /* @__PURE__ */ i(M, { ...u });
47
- }, W = (s) => {
48
- f == null || f(s), l || h == null || h();
49
- }, L = (s) => {
50
- $(s);
51
- }, q = l && (_.href || _.to), C = {
52
- ..._,
47
+ return /* @__PURE__ */ s(M, { ...g });
48
+ }, W = (i) => {
49
+ N == null || N(i), l || h == null || h();
50
+ }, L = (i) => {
51
+ H(i);
52
+ }, q = l && (m.href || m.to), I = {
53
+ ...m,
53
54
  as: b,
54
55
  onClick: W,
55
56
  className: d(e["tedi-sidenav__link"], q && e["tedi-sidenav__link--has-children-link"]),
56
57
  noStyle: !0,
57
- role: "menuitem",
58
- "aria-current": N ? "page" : void 0,
59
- "aria-label": m && typeof t == "string" ? t : void 0,
60
- ...l ? {
61
- "aria-haspopup": "true",
62
- "aria-expanded": o,
63
- "aria-controls": I
64
- } : {}
65
- }, k = () => !m && (p == null ? void 0 : p.map((s, y) => {
66
- var c;
58
+ "aria-current": f ? "page" : void 0,
59
+ "aria-label": c && typeof t == "string" ? t : void 0
60
+ }, C = () => !c && (p == null ? void 0 : p.map((i, y) => {
61
+ var r;
67
62
  return /* @__PURE__ */ n("div", { children: [
68
- (s == null ? void 0 : s.subHeading) && /* @__PURE__ */ i("div", { className: e["tedi-sidenav__subheading"], children: s.subHeading }),
69
- /* @__PURE__ */ i("ul", { className: e["tedi-sidenav__list"], role: "menu", children: (c = s.subItems) == null ? void 0 : c.map((u, J) => /* @__PURE__ */ Q(
63
+ (i == null ? void 0 : i.subHeading) && /* @__PURE__ */ s("div", { className: e["tedi-sidenav__subheading"], children: i.subHeading }),
64
+ /* @__PURE__ */ s("ul", { className: e["tedi-sidenav__list"], children: (r = i.subItems) == null ? void 0 : r.map((g, J) => /* @__PURE__ */ K(
70
65
  X,
71
66
  {
72
67
  as: b,
73
- ...u,
68
+ ...g,
74
69
  key: J,
75
- level: r + 1,
70
+ level: o + 1,
76
71
  onItemClick: h,
77
- isCollapsed: m,
78
- className: d(e["tedi-sidenav__sub-item"], u.className)
72
+ isCollapsed: c,
73
+ className: d(e["tedi-sidenav__sub-item"], g.className)
79
74
  }
80
75
  )) })
81
76
  ] }, y);
82
- })), P = /* @__PURE__ */ i("li", { "data-name": "sidenav-item", className: G, children: l && m ? /* @__PURE__ */ i(
83
- U,
77
+ })), P = /* @__PURE__ */ s("li", { "data-name": "sidenav-item", className: G, children: l && c ? /* @__PURE__ */ s(
78
+ Q,
84
79
  {
85
- trigger: /* @__PURE__ */ i(g.Trigger, { children: /* @__PURE__ */ n(
80
+ trigger: /* @__PURE__ */ s(u.Trigger, { children: /* @__PURE__ */ n(
86
81
  "span",
87
82
  {
88
- className: d(e["tedi-sidenav__link"], S && e["tedi-sidenav__link--active"]),
83
+ className: d(e["tedi-sidenav__link"], T && e["tedi-sidenav__link--active"]),
89
84
  children: [
90
85
  a && v(a),
91
- /* @__PURE__ */ i(
86
+ /* @__PURE__ */ s(
92
87
  M,
93
88
  {
94
- name: S ? "chevron_right" : "expand_more",
89
+ name: T ? "chevron_right" : "expand_more",
95
90
  color: "white",
96
91
  className: e["tedi-sidenav__toggle-icon"],
97
92
  size: 18
98
93
  }
99
94
  ),
100
- /* @__PURE__ */ i("span", { className: e["tedi-sidenav__title"], children: t })
95
+ /* @__PURE__ */ s("span", { className: e["tedi-sidenav__title"], children: t })
101
96
  ]
102
97
  }
103
98
  ) }),
104
99
  as: b,
105
100
  groups: p,
106
- onOpenChange: A
101
+ onOpenChange: $
107
102
  }
108
- ) : l && r === 1 ? _.href || _.to ? /* @__PURE__ */ n(D, { children: [
109
- /* @__PURE__ */ n(w, { ...C, children: [
103
+ ) : l && o === 1 ? m.href || m.to ? /* @__PURE__ */ n(D, { children: [
104
+ /* @__PURE__ */ n(k, { ...I, children: [
110
105
  a && v(a),
111
- /* @__PURE__ */ i("span", { className: e["tedi-sidenav__title"], children: t })
106
+ /* @__PURE__ */ s("span", { className: e["tedi-sidenav__title"], children: t })
112
107
  ] }),
113
- /* @__PURE__ */ i("div", { className: e["tedi-sidenav__link-collapse-wrapper"], children: /* @__PURE__ */ i(
108
+ /* @__PURE__ */ s("div", { className: e["tedi-sidenav__link-collapse-wrapper"], children: /* @__PURE__ */ s(
114
109
  O,
115
110
  {
116
- id: I,
111
+ id: x,
117
112
  hideCollapseText: !0,
118
113
  inverted: !0,
119
- open: o,
114
+ contentAsRegion: !1,
115
+ open: _,
120
116
  onToggle: L,
121
- toggleLabel: x("sidenav.toggleSubmenuChildren", {
122
- isCollapsedInternal: o,
117
+ toggleLabel: S("sidenav.toggleSubmenuChildren", {
118
+ isCollapsedInternal: _,
123
119
  children: t
124
120
  }),
125
121
  className: e["tedi-sidenav__collapse"],
126
122
  titleRowProps: { element: "span" },
127
- children: k()
123
+ children: C()
128
124
  }
129
125
  ) })
130
- ] }) : /* @__PURE__ */ i(
126
+ ] }) : /* @__PURE__ */ s(
131
127
  O,
132
128
  {
133
- id: I,
129
+ id: x,
134
130
  hideCollapseText: !0,
135
131
  inverted: !0,
136
132
  fullRowToggle: !0,
137
- open: o,
133
+ contentAsRegion: !1,
134
+ open: _,
138
135
  onToggle: L,
139
136
  className: e["tedi-sidenav__collapse"],
140
137
  titleRowProps: { element: "span" },
141
- toggleLabel: x("sidenav.toggleSubmenuChildren", {
142
- isCollapsedInternal: o,
138
+ toggleLabel: S("sidenav.toggleSubmenuChildren", {
139
+ isCollapsedInternal: _,
143
140
  children: t
144
141
  }),
145
142
  title: /* @__PURE__ */ n(
@@ -147,30 +144,30 @@ const X = (B) => {
147
144
  {
148
145
  className: d(
149
146
  e["tedi-sidenav__link"],
150
- o && e["tedi-sidenav__link--active"]
147
+ _ && e["tedi-sidenav__link--active"]
151
148
  ),
152
- "aria-current": N ? "page" : void 0,
149
+ "aria-current": f ? "page" : void 0,
153
150
  children: [
154
151
  a && v(a),
155
- /* @__PURE__ */ i("span", { className: e["tedi-sidenav__title"], children: t })
152
+ /* @__PURE__ */ s("span", { className: e["tedi-sidenav__title"], children: t })
156
153
  ]
157
154
  }
158
155
  ),
159
- children: k()
156
+ children: C()
160
157
  }
161
158
  ) : l ? /* @__PURE__ */ n(D, { children: [
162
- /* @__PURE__ */ n(w, { ...C, children: [
159
+ /* @__PURE__ */ n(k, { ...I, children: [
163
160
  a && v(a),
164
- /* @__PURE__ */ i("span", { className: e["tedi-sidenav__title"], children: t }),
165
- /* @__PURE__ */ i("i", { className: e["tedi-sidenav__bullet"] })
161
+ /* @__PURE__ */ s("span", { className: e["tedi-sidenav__title"], children: t }),
162
+ /* @__PURE__ */ s("i", { className: e["tedi-sidenav__bullet"] })
166
163
  ] }),
167
- k()
168
- ] }) : /* @__PURE__ */ i(g.Trigger, { children: /* @__PURE__ */ n(w, { ...C, children: [
164
+ C()
165
+ ] }) : /* @__PURE__ */ s(u.Trigger, { children: /* @__PURE__ */ n(k, { ...I, children: [
169
166
  a && v(a),
170
- /* @__PURE__ */ i("span", { className: e["tedi-sidenav__title"], children: t })
167
+ /* @__PURE__ */ s("span", { className: e["tedi-sidenav__title"], children: t })
171
168
  ] }) }) });
172
- return r === 1 && m ? /* @__PURE__ */ n(g, { placement: "right", focusManager: void 0, children: [
173
- /* @__PURE__ */ i(g.Content, { maxWidth: "medium", children: t }),
169
+ return o === 1 && c ? /* @__PURE__ */ n(u, { placement: "right", focusManager: void 0, children: [
170
+ /* @__PURE__ */ s(u.Content, { maxWidth: "medium", children: t }),
174
171
  P
175
172
  ] }) : P;
176
173
  };