@tedi-design-system/react 18.2.0-rc.4 → 19.0.0-rc.10

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 (103) hide show
  1. package/README.md +27 -1
  2. package/_virtual/index.es13.js +2 -2
  3. package/_virtual/index.es14.js +2 -2
  4. package/bundle-stats.html +1 -1
  5. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
  6. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
  7. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
  8. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
  9. package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
  10. package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
  11. package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
  12. package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
  13. package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
  14. package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
  15. package/external/prop-types/external/react-is/index.cjs.js +1 -1
  16. package/external/prop-types/external/react-is/index.es.js +1 -1
  17. package/external/react-is/index.cjs.js +1 -1
  18. package/external/react-is/index.es.js +1 -1
  19. package/external/toposort/index.cjs.js +1 -1
  20. package/external/toposort/index.es.js +1 -1
  21. package/fonts/material-symbols-outlined.woff2 +0 -0
  22. package/fonts/material-symbols-rounded.woff2 +0 -0
  23. package/fonts/material-symbols-sharp.woff2 +0 -0
  24. package/index.css +1 -1
  25. package/package.json +6 -4
  26. package/src/tedi/components/content/calendar/calendar.cjs.js +1 -1
  27. package/src/tedi/components/content/calendar/calendar.d.ts +12 -0
  28. package/src/tedi/components/content/calendar/calendar.es.js +39 -35
  29. package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.cjs.js +1 -1
  30. package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.d.ts +13 -1
  31. package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.es.js +40 -35
  32. package/src/tedi/components/content/table/table.cjs.js +1 -1
  33. package/src/tedi/components/content/table/table.d.ts +6 -0
  34. package/src/tedi/components/content/table/table.es.js +431 -413
  35. package/src/tedi/components/content/table/table.module.scss.cjs.js +1 -1
  36. package/src/tedi/components/content/table/table.module.scss.es.js +3 -0
  37. package/src/tedi/components/form/date-field/date-field.cjs.js +1 -1
  38. package/src/tedi/components/form/date-field/date-field.d.ts +10 -0
  39. package/src/tedi/components/form/date-field/date-field.es.js +176 -170
  40. package/src/tedi/components/form/date-field/date-picker-modal/date-picker-modal.cjs.js +1 -1
  41. package/src/tedi/components/form/date-field/date-picker-modal/date-picker-modal.d.ts +4 -0
  42. package/src/tedi/components/form/date-field/date-picker-modal/date-picker-modal.es.js +47 -43
  43. package/src/tedi/components/form/date-time-field/date-time-field.cjs.js +1 -1
  44. package/src/tedi/components/form/date-time-field/date-time-field.d.ts +10 -0
  45. package/src/tedi/components/form/date-time-field/date-time-field.es.js +92 -88
  46. package/src/tedi/components/form/file-upload/file-upload.cjs.js +1 -1
  47. package/src/tedi/components/form/file-upload/file-upload.es.js +11 -11
  48. package/src/tedi/components/form/select/components/select-multi-option.cjs.js +1 -1
  49. package/src/tedi/components/form/select/components/select-multi-option.es.js +24 -23
  50. package/src/tedi/components/form/select/components/select-single-option.cjs.js +1 -1
  51. package/src/tedi/components/form/select/components/select-single-option.es.js +11 -10
  52. package/src/tedi/components/form/select/select.module.scss.cjs.js +1 -1
  53. package/src/tedi/components/form/select/select.module.scss.es.js +2 -1
  54. package/src/tedi/components/form/textarea/textarea.cjs.js +1 -1
  55. package/src/tedi/components/form/textarea/textarea.d.ts +3 -3
  56. package/src/tedi/components/form/textarea/textarea.es.js +12 -12
  57. package/src/tedi/components/misc/ellipsis/ellipsis.cjs.js +1 -1
  58. package/src/tedi/components/misc/ellipsis/ellipsis.es.js +20 -19
  59. package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.cjs.js +1 -0
  60. package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.d.ts +23 -0
  61. package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.es.js +12 -0
  62. package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.cjs.js +1 -0
  63. package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.d.ts +34 -0
  64. package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.es.js +63 -0
  65. package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.cjs.js +1 -0
  66. package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.d.ts +24 -0
  67. package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.es.js +8 -0
  68. package/src/tedi/components/misc/timeline/index.d.ts +4 -0
  69. package/src/tedi/components/misc/timeline/timeline.cjs.js +1 -0
  70. package/src/tedi/components/misc/timeline/timeline.d.ts +48 -0
  71. package/src/tedi/components/misc/timeline/timeline.es.js +38 -0
  72. package/src/tedi/components/misc/timeline/timeline.module.scss.cjs.js +1 -0
  73. package/src/tedi/components/misc/timeline/timeline.module.scss.es.js +18 -0
  74. package/src/tedi/components/navigation/breadcrumbs/breadcrumbs.cjs.js +1 -1
  75. package/src/tedi/components/navigation/breadcrumbs/breadcrumbs.es.js +35 -32
  76. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.cjs.js +1 -1
  77. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.d.ts +1 -1
  78. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.es.js +33 -33
  79. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-item/table-of-contents-item.d.ts +0 -10
  80. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-list/table-of-contents-list.cjs.js +1 -1
  81. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-list/table-of-contents-list.es.js +27 -18
  82. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.cjs.js +1 -1
  83. package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.es.js +21 -35
  84. package/src/tedi/components/navigation/table-of-contents/table-of-contents.cjs.js +1 -1
  85. package/src/tedi/components/navigation/table-of-contents/table-of-contents.d.ts +17 -10
  86. package/src/tedi/components/navigation/table-of-contents/table-of-contents.es.js +51 -52
  87. package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.cjs.js +1 -1
  88. package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.es.js +0 -1
  89. package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.cjs.js +1 -1
  90. package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.d.ts +8 -4
  91. package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.es.js +85 -54
  92. package/src/tedi/components/overlays/overlay/overlay-content.cjs.js +1 -1
  93. package/src/tedi/components/overlays/overlay/overlay-content.d.ts +6 -1
  94. package/src/tedi/components/overlays/overlay/overlay-content.es.js +28 -27
  95. package/src/tedi/components/overlays/popover/popover-content.cjs.js +1 -1
  96. package/src/tedi/components/overlays/popover/popover-content.d.ts +7 -0
  97. package/src/tedi/components/overlays/popover/popover-content.es.js +47 -36
  98. package/src/tedi/index.d.ts +1 -0
  99. package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
  100. package/src/tedi/providers/label-provider/labels-map.d.ts +0 -21
  101. package/src/tedi/providers/label-provider/labels-map.es.js +2 -23
  102. package/tedi.cjs.js +1 -1
  103. package/tedi.es.js +90 -82
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),y=require("../../../../../external/classnames/index.cjs.js"),l=require("react"),L=require("../../misc/affix/affix.cjs.js"),S=require("./components/table-of-contents-collapsible/table-of-contents-collapsible.cjs.js"),g=require("./components/table-of-contents-item/table-of-contents-item.cjs.js"),k=require("./components/table-of-contents-list/table-of-contents-list.cjs.js"),m=require("./table-of-contents.module.scss.cjs.js"),w=require("../../../providers/label-provider/use-labels.cjs.js"),M=require("../../content/card/card.cjs.js"),E=require("../../content/card/card-content/card-content.cjs.js"),q=l.createContext({activeTrail:new Set}),h=n=>l.isValidElement(n)&&n.type===g.TableOfContentsItem,p=n=>l.Children.toArray(n).filter(h).map(c=>{const{id:s,isValid:i,separator:o,hideIcon:a,children:e}=c.props,r=l.Children.toArray(e),d=r.filter(h),u=r.filter(b=>!h(b));return{id:s,isValid:i,separator:o,hideIcon:a,content:t.jsx(t.Fragment,{children:u}),children:d.length?p(e):void 0}}),j=(n,c)=>{const s=new Set;if(!c)return s;const i=(o,a)=>{for(const e of o){const r=e.id?[...a,e.id]:a;if(e.id===c||e.children&&i(e.children,r))return r.forEach(d=>s.add(d)),!0}return!1};return i(n,[]),s};function f(n){const{getLabel:c}=w.useLabels(),{children:s,heading:i,activeId:o,showIcons:a=!1,numbered:e=!1,sticky:r=!0,variant:d="default",padding:u,className:b}=n,I=i===void 0?c("table-of-contents.title"):i,C=l.useMemo(()=>p(s),[s]),x=l.useMemo(()=>j(C,o),[C,o]),N=l.useMemo(()=>({activeId:o,showIcons:a,numbered:e,activeTrail:x}),[o,a,e,x]),A=u!==void 0?{"--tedi-table-of-contents-padding":`${u}rem`}:void 0,T=t.jsx("div",{className:y.default(m.default["tedi-table-of-contents"],{[m.default["tedi-table-of-contents--transparent"]]:d==="transparent"}),style:A,children:t.jsx(k.TableOfContentsList,{nodes:C,heading:I})}),v=y.default({[m.default["tedi-table-of-contents--sticky"]]:r},b),O=d==="transparent"?t.jsx("div",{className:v,children:T}):t.jsx(M.Card,{className:v,children:t.jsx(E.CardContent,{padding:0,children:T})});return t.jsx(q.Provider,{value:N,children:r?t.jsx(L.Affix,{position:"sticky",top:1.5,bottom:1.5,children:O}):O})}f.displayName="TableOfContents";f.Item=g.TableOfContentsItem;f.Collapsible=S.TableOfContentsCollapsible;exports.TableOfContents=f;exports.TableOfContentsContext=q;exports.buildActiveTrail=j;exports.childrenToNodes=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("../../../../../external/classnames/index.cjs.js"),l=require("react"),S=require("../../misc/affix/affix.cjs.js"),k=require("./components/table-of-contents-collapsible/table-of-contents-collapsible.cjs.js"),y=require("./components/table-of-contents-item/table-of-contents-item.cjs.js"),M=require("./components/table-of-contents-list/table-of-contents-list.cjs.js"),b=require("./table-of-contents.module.scss.cjs.js"),w=require("../../../providers/label-provider/use-labels.cjs.js"),E=require("../../content/card/card.cjs.js"),P=require("../../content/card/card-content/card-content.cjs.js"),q=l.createContext({activeTrail:new Set}),C=n=>l.isValidElement(n)&&n.type===y.TableOfContentsItem,m=n=>l.Children.toArray(n).filter(C).map(c=>{const{id:s,separator:r,children:a}=c.props,o=l.Children.toArray(a),e=o.filter(C),i=o.filter(d=>!C(d));return{id:s,separator:r,content:t.jsx(t.Fragment,{children:i}),children:e.length?m(a):void 0}}),j=(n,c)=>{const s=new Set;if(!c)return s;const r=(a,o)=>{for(const e of a){const i=e.id?[...o,e.id]:o;if(e.id===c||e.children&&r(e.children,i))return i.forEach(d=>s.add(d)),!0}return!1};return r(n,[]),s};function u(n){const{getLabel:c}=w.useLabels(),{children:s,heading:r,headingLevel:a="h3",ariaLabel:o,activeId:e,numbered:i=!1,sticky:d=!0,variant:h="default",padding:p,className:N}=n,L=r===void 0?c("table-of-contents.title"):r,f=l.useMemo(()=>m(s),[s]),v=l.useMemo(()=>j(f,e),[f,e]),A=l.useMemo(()=>({activeId:e,numbered:i,headingLevel:a,ariaLabel:o,activeTrail:v}),[e,i,a,o,v]),I=p!==void 0?{"--tedi-table-of-contents-padding":`${p}rem`}:void 0,x=t.jsx("div",{className:g.default(b.default["tedi-table-of-contents"],{[b.default["tedi-table-of-contents--transparent"]]:h==="transparent"}),style:I,children:t.jsx(M.TableOfContentsList,{nodes:f,heading:L})}),T=g.default({[b.default["tedi-table-of-contents--sticky"]]:d},N),O=h==="transparent"?t.jsx("div",{className:T,children:x}):t.jsx(E.Card,{className:T,children:t.jsx(P.CardContent,{padding:0,children:x})});return t.jsx(q.Provider,{value:A,children:d?t.jsx(S.Affix,{position:"sticky",top:1.5,bottom:1.5,children:O}):O})}u.displayName="TableOfContents";u.Item=y.TableOfContentsItem;u.Collapsible=k.TableOfContentsCollapsible;exports.TableOfContents=u;exports.TableOfContentsContext=q;exports.buildActiveTrail=j;exports.childrenToNodes=m;
@@ -1,5 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TableOfContentsItemProps } from './components/table-of-contents-item/table-of-contents-item';
3
+ /** Semantic level of the `TableOfContents` heading element. */
4
+ export type TableOfContentsHeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
3
5
  export interface TableOfContentsProps {
4
6
  /**
5
7
  * `TableOfContents.Item` elements. An item's non-`Item` children are its
@@ -12,6 +14,19 @@ export interface TableOfContentsProps {
12
14
  * the navigation keeps an accessible name via `aria-label`).
13
15
  */
14
16
  heading?: string | null;
17
+ /**
18
+ * Configurable semantic heading level (`h1`–`h6`); the visual style stays H4 regardless. Set it
19
+ * to match the surrounding page's heading outline and avoid skipped heading levels (WCAG 1.3.1).
20
+ * Ignored when the list is headless.
21
+ * @default h3
22
+ */
23
+ headingLevel?: TableOfContentsHeadingLevel;
24
+ /**
25
+ * Override the navigation landmark's accessible name. When empty, the `<nav>` falls back to the
26
+ * heading (via `aria-labelledby`), or the localised title when headless. Use it to disambiguate
27
+ * multiple tables of contents on the same page.
28
+ */
29
+ ariaLabel?: string;
15
30
  /**
16
31
  * Visual variant:
17
32
  * - `default` — rendered inside a bordered `Card`.
@@ -32,13 +47,6 @@ export interface TableOfContentsProps {
32
47
  * children.
33
48
  */
34
49
  activeId?: string;
35
- /**
36
- * Show a validation glyph before each item (multistep-form usage). Each state uses a distinct
37
- * icon shape (not colour alone) with a localised text alternative: a check for `isValid === true`,
38
- * an empty circle for `undefined` (not completed), and a warning for `isValid === false`.
39
- * @default false
40
- */
41
- showIcons?: boolean;
42
50
  /**
43
51
  * Render the list as an ordered list with auto-generated hierarchical numbers
44
52
  * (`1.`, `2.`, `2.1`, …) shown before each item.
@@ -60,14 +68,13 @@ export interface TableOfContentsNode {
60
68
  id?: string;
61
69
  content: ReactNode;
62
70
  children?: TableOfContentsNode[];
63
- isValid?: boolean;
64
71
  separator?: boolean;
65
- hideIcon?: boolean;
66
72
  }
67
73
  interface TableOfContentsContextValue {
68
74
  activeId?: string;
69
- showIcons?: boolean;
70
75
  numbered?: boolean;
76
+ headingLevel?: TableOfContentsHeadingLevel;
77
+ ariaLabel?: string;
71
78
  activeTrail: Set<string>;
72
79
  }
73
80
  export declare const TableOfContentsContext: import('react').Context<TableOfContentsContextValue>;
@@ -1,71 +1,70 @@
1
- import { jsx as i, Fragment as w } from "react/jsx-runtime";
2
- import g from "../../../../../external/classnames/index.es.js";
3
- import { useMemo as p, createContext as E, Children as N, isValidElement as L } from "react";
4
- import { Affix as S } from "../../misc/affix/affix.es.js";
5
- import { TableOfContentsCollapsible as V } from "./components/table-of-contents-collapsible/table-of-contents-collapsible.es.js";
1
+ import { jsx as r, Fragment as w } from "react/jsx-runtime";
2
+ import T from "../../../../../external/classnames/index.es.js";
3
+ import { useMemo as m, createContext as E, Children as N, isValidElement as S } from "react";
4
+ import { Affix as V } from "../../misc/affix/affix.es.js";
5
+ import { TableOfContentsCollapsible as j } from "./components/table-of-contents-collapsible/table-of-contents-collapsible.es.js";
6
6
  import { TableOfContentsItem as x } from "./components/table-of-contents-item/table-of-contents-item.es.js";
7
- import { TableOfContentsList as j } from "./components/table-of-contents-list/table-of-contents-list.es.js";
8
- import h from "./table-of-contents.module.scss.es.js";
9
- import { useLabels as F } from "../../../providers/label-provider/use-labels.es.js";
10
- import { Card as H } from "../../content/card/card.es.js";
11
- import { CardContent as M } from "../../content/card/card-content/card-content.es.js";
12
- const P = E({
7
+ import { TableOfContentsList as F } from "./components/table-of-contents-list/table-of-contents-list.es.js";
8
+ import f from "./table-of-contents.module.scss.es.js";
9
+ import { useLabels as H } from "../../../providers/label-provider/use-labels.es.js";
10
+ import { Card as M } from "../../content/card/card.es.js";
11
+ import { CardContent as P } from "../../content/card/card-content/card-content.es.js";
12
+ const $ = E({
13
13
  activeTrail: /* @__PURE__ */ new Set()
14
- }), b = (e) => L(e) && e.type === x, I = (e) => N.toArray(e).filter(b).map((l) => {
15
- const { id: n, isValid: s, separator: o, hideIcon: a, children: t } = l.props, r = N.toArray(t), c = r.filter(b), d = r.filter((m) => !b(m));
14
+ }), p = (e) => S(e) && e.type === x, O = (e) => N.toArray(e).filter(p).map((l) => {
15
+ const { id: n, separator: i, children: s } = l.props, o = N.toArray(s), t = o.filter(p), a = o.filter((c) => !p(c));
16
16
  return {
17
17
  id: n,
18
- isValid: s,
19
- separator: o,
20
- hideIcon: a,
21
- content: /* @__PURE__ */ i(w, { children: d }),
22
- children: c.length ? I(t) : void 0
18
+ separator: i,
19
+ content: /* @__PURE__ */ r(w, { children: a }),
20
+ children: t.length ? O(s) : void 0
23
21
  };
24
- }), $ = (e, l) => {
22
+ }), q = (e, l) => {
25
23
  const n = /* @__PURE__ */ new Set();
26
24
  if (!l) return n;
27
- const s = (o, a) => {
28
- for (const t of o) {
29
- const r = t.id ? [...a, t.id] : a;
30
- if (t.id === l || t.children && s(t.children, r))
31
- return r.forEach((c) => n.add(c)), !0;
25
+ const i = (s, o) => {
26
+ for (const t of s) {
27
+ const a = t.id ? [...o, t.id] : o;
28
+ if (t.id === l || t.children && i(t.children, a))
29
+ return a.forEach((c) => n.add(c)), !0;
32
30
  }
33
31
  return !1;
34
32
  };
35
- return s(e, []), n;
33
+ return i(e, []), n;
36
34
  };
37
- function u(e) {
38
- const { getLabel: l } = F(), {
35
+ function h(e) {
36
+ const { getLabel: l } = H(), {
39
37
  children: n,
40
- heading: s,
41
- activeId: o,
42
- showIcons: a = !1,
43
- numbered: t = !1,
44
- sticky: r = !0,
45
- variant: c = "default",
46
- padding: d,
47
- className: m
48
- } = e, O = s === void 0 ? l("table-of-contents.title") : s, f = p(() => I(n), [n]), C = p(() => $(f, o), [f, o]), A = p(
49
- () => ({ activeId: o, showIcons: a, numbered: t, activeTrail: C }),
50
- [o, a, t, C]
51
- ), k = d !== void 0 ? { "--tedi-table-of-contents-padding": `${d}rem` } : void 0, v = /* @__PURE__ */ i(
38
+ heading: i,
39
+ headingLevel: s = "h3",
40
+ ariaLabel: o,
41
+ activeId: t,
42
+ numbered: a = !1,
43
+ sticky: c = !0,
44
+ variant: b = "default",
45
+ padding: u,
46
+ className: A
47
+ } = e, L = i === void 0 ? l("table-of-contents.title") : i, d = m(() => O(n), [n]), C = m(() => q(d, t), [d, t]), k = m(
48
+ () => ({ activeId: t, numbered: a, headingLevel: s, ariaLabel: o, activeTrail: C }),
49
+ [t, a, s, o, C]
50
+ ), I = u !== void 0 ? { "--tedi-table-of-contents-padding": `${u}rem` } : void 0, v = /* @__PURE__ */ r(
52
51
  "div",
53
52
  {
54
- className: g(h["tedi-table-of-contents"], {
55
- [h["tedi-table-of-contents--transparent"]]: c === "transparent"
53
+ className: T(f["tedi-table-of-contents"], {
54
+ [f["tedi-table-of-contents--transparent"]]: b === "transparent"
56
55
  }),
57
- style: k,
58
- children: /* @__PURE__ */ i(j, { nodes: f, heading: O })
56
+ style: I,
57
+ children: /* @__PURE__ */ r(F, { nodes: d, heading: L })
59
58
  }
60
- ), y = g({ [h["tedi-table-of-contents--sticky"]]: r }, m), T = c === "transparent" ? /* @__PURE__ */ i("div", { className: y, children: v }) : /* @__PURE__ */ i(H, { className: y, children: /* @__PURE__ */ i(M, { padding: 0, children: v }) });
61
- return /* @__PURE__ */ i(P.Provider, { value: A, children: r ? /* @__PURE__ */ i(S, { position: "sticky", top: 1.5, bottom: 1.5, children: T }) : T });
59
+ ), y = T({ [f["tedi-table-of-contents--sticky"]]: c }, A), g = b === "transparent" ? /* @__PURE__ */ r("div", { className: y, children: v }) : /* @__PURE__ */ r(M, { className: y, children: /* @__PURE__ */ r(P, { padding: 0, children: v }) });
60
+ return /* @__PURE__ */ r($.Provider, { value: k, children: c ? /* @__PURE__ */ r(V, { position: "sticky", top: 1.5, bottom: 1.5, children: g }) : g });
62
61
  }
63
- u.displayName = "TableOfContents";
64
- u.Item = x;
65
- u.Collapsible = V;
62
+ h.displayName = "TableOfContents";
63
+ h.Item = x;
64
+ h.Collapsible = j;
66
65
  export {
67
- u as TableOfContents,
68
- P as TableOfContentsContext,
69
- $ as buildActiveTrail,
70
- I as childrenToNodes
66
+ h as TableOfContents,
67
+ $ as TableOfContentsContext,
68
+ q as buildActiveTrail,
69
+ O as childrenToNodes
71
70
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-table-of-contents":"tedi-table-of-contents-ce55e86d","tedi-table-of-contents--transparent":"tedi-table-of-contents--transparent-067ea2c2","tedi-table-of-contents__list":"tedi-table-of-contents__list-94025876","tedi-table-of-contents--sticky":"tedi-table-of-contents--sticky-1ee87047","tedi-table-of-contents__heading":"tedi-table-of-contents__heading-c6b7a6df","tedi-table-of-contents__group":"tedi-table-of-contents__group-590e4963","tedi-table-of-contents__list--headless":"tedi-table-of-contents__list--headless-99c1bab5","tedi-table-of-contents__item":"tedi-table-of-contents__item-29f072b5","tedi-table-of-contents__row":"tedi-table-of-contents__row-fb686650","tedi-table-of-contents__row--level-2":"tedi-table-of-contents__row--level-2-4fec675b","tedi-table-of-contents__icon":"tedi-table-of-contents__icon-5bb71193","tedi-table-of-contents__number":"tedi-table-of-contents__number-693b03b7","tedi-table-of-contents__content":"tedi-table-of-contents__content-8a05ad59","tedi-table-of-contents__item--selected":"tedi-table-of-contents__item--selected-632958d1","tedi-table-of-contents__bar":"tedi-table-of-contents__bar-f4daef0b","tedi-table-of-contents__bar--static":"tedi-table-of-contents__bar--static-f919cf73","tedi-table-of-contents__bar-title":"tedi-table-of-contents__bar-title-b82ab4ed","tedi-table-of-contents__sheet":"tedi-table-of-contents__sheet-16e41b54","tedi-table-of-contents__sheet-header":"tedi-table-of-contents__sheet-header-ec904c54"};exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-table-of-contents":"tedi-table-of-contents-ce55e86d","tedi-table-of-contents--transparent":"tedi-table-of-contents--transparent-067ea2c2","tedi-table-of-contents__list":"tedi-table-of-contents__list-94025876","tedi-table-of-contents--sticky":"tedi-table-of-contents--sticky-1ee87047","tedi-table-of-contents__heading":"tedi-table-of-contents__heading-c6b7a6df","tedi-table-of-contents__group":"tedi-table-of-contents__group-590e4963","tedi-table-of-contents__list--headless":"tedi-table-of-contents__list--headless-99c1bab5","tedi-table-of-contents__item":"tedi-table-of-contents__item-29f072b5","tedi-table-of-contents__row":"tedi-table-of-contents__row-fb686650","tedi-table-of-contents__row--level-2":"tedi-table-of-contents__row--level-2-4fec675b","tedi-table-of-contents__number":"tedi-table-of-contents__number-693b03b7","tedi-table-of-contents__content":"tedi-table-of-contents__content-8a05ad59","tedi-table-of-contents__item--selected":"tedi-table-of-contents__item--selected-632958d1","tedi-table-of-contents__bar":"tedi-table-of-contents__bar-f4daef0b","tedi-table-of-contents__bar--static":"tedi-table-of-contents__bar--static-f919cf73","tedi-table-of-contents__bar-title":"tedi-table-of-contents__bar-title-b82ab4ed","tedi-table-of-contents__sheet":"tedi-table-of-contents__sheet-16e41b54","tedi-table-of-contents__sheet-header":"tedi-table-of-contents__sheet-header-ec904c54"};exports.default=t;
@@ -9,7 +9,6 @@ const t = {
9
9
  "tedi-table-of-contents__item": "tedi-table-of-contents__item-29f072b5",
10
10
  "tedi-table-of-contents__row": "tedi-table-of-contents__row-fb686650",
11
11
  "tedi-table-of-contents__row--level-2": "tedi-table-of-contents__row--level-2-4fec675b",
12
- "tedi-table-of-contents__icon": "tedi-table-of-contents__icon-5bb71193",
13
12
  "tedi-table-of-contents__number": "tedi-table-of-contents__number-693b03b7",
14
13
  "tedi-table-of-contents__content": "tedi-table-of-contents__content-8a05ad59",
15
14
  "tedi-table-of-contents__item--selected": "tedi-table-of-contents__item--selected-632958d1",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),K=require("../../../../../../external/classnames/index.cjs.js"),R=require("../dropdown-context.cjs.js"),r=require("./dropdown-item.module.scss.cjs.js"),S=({children:c,onClick:t,disabled:n,active:w,index:u,indent:i,asChild:o=!1,closeOnSelect:p=!0,isParent:y=!1,className:_,role:s,...l})=>{const{getItemProps:v,listItemsRef:b,setOpen:f,activeIndex:x,divided:I,variant:a}=R.useDropdownContext(),g=o?"div":"button",q=e=>typeof e!="number"||e<=0?{}:{"--dropdown-indent-level":e,"--dropdown-indent":`${e}rem`},D=e=>{if(n)return;const d=e.currentTarget.querySelector('input[type="checkbox"], input[type="radio"]');if(d){d.click();return}o?t==null||t(e):(t==null||t(e),p&&f(!1))},P=e=>{if(!n&&(e.key==="Enter"||e.key===" ")){e.preventDefault();const d=e.currentTarget.querySelector('input[type="checkbox"], input[type="radio"]');d?d.click():t==null||t(e),!o&&p&&f(!1)}},m={ref(e){typeof u=="number"&&(b.current[u]=e)},tabIndex:x===u?0:-1,className:K.default(r.default["tedi-dropdown__item"],{[r.default["tedi-dropdown__item--active"]]:w,[r.default["tedi-dropdown__item--disabled"]]:n,[r.default["tedi-dropdown__item--divided"]]:I,[r.default["tedi-dropdown__item--indent"]]:i,[r.default["tedi-dropdown__item--tree-item"]]:a==="tree"&&i,[r.default["tedi-dropdown__item--tree-parent"]]:a==="tree"&&y},_),style:q(i),onClick:D,onKeyDown:P,...l},j=o&&p===!1?{...m,role:s}:v({role:s??"menuitem",disabled:o?void 0:n,...m});return T.jsx(g,{...j,children:c})};exports.DropdownItem=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),U=require("../../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),D=require("../../../../../../external/classnames/index.cjs.js"),m=require("react"),z=require("../dropdown-context.cjs.js"),u=require("./dropdown-item.module.scss.cjs.js"),g=(n,t)=>r=>{n==null||n(r),r.defaultPrevented||t==null||t(r)},A=({children:n,onClick:t,disabled:r,active:x,index:d,indent:p,asChild:s=!1,closeOnSelect:f=!0,isParent:I=!1,className:b,role:y,...q})=>{const{getItemProps:R,listItemsRef:P,setOpen:a,activeIndex:k,divided:E,variant:l}=z.useDropdownContext(),K=s?"div":"button",c=s&&f!==!1&&m.isValidElement(n),w=e=>{typeof d=="number"&&(P.current[d]=e)},N=m.isValidElement(n)?n.ref:void 0,T=U.useMergeRefs([w,N]),j=e=>typeof e!="number"||e<=0?{}:{"--dropdown-indent-level":e,"--dropdown-indent":`${e}rem`},V=e=>{if(r){e.preventDefault();return}const o=e.currentTarget.querySelector('input[type="checkbox"], input[type="radio"]');if(o){o.click();return}t==null||t(e),(!s||c)&&f&&a(!1)},M=e=>{if(r){(e.key==="Enter"||e.key===" ")&&e.preventDefault();return}if(e.key==="Enter"||e.key===" "){const o=e.currentTarget.querySelector('input[type="checkbox"], input[type="radio"]');if(o){e.preventDefault(),o.click(),!s&&f&&a(!1);return}if(c){e.preventDefault(),e.currentTarget.click();return}e.preventDefault(),t==null||t(e),!s&&f&&a(!1)}},_={ref:w,tabIndex:k===d?0:-1,className:D.default(u.default["tedi-dropdown__item"],{[u.default["tedi-dropdown__item--active"]]:x,[u.default["tedi-dropdown__item--disabled"]]:r,[u.default["tedi-dropdown__item--divided"]]:E,[u.default["tedi-dropdown__item--indent"]]:p,[u.default["tedi-dropdown__item--tree-item"]]:l==="tree"&&p,[u.default["tedi-dropdown__item--tree-parent"]]:l==="tree"&&I},b),style:j(p),onClick:V,onKeyDown:M,...q},v=s&&f===!1?{..._,role:y}:R({role:y??"menuitem",disabled:s?void 0:r,..._});if(c){const e=n,o=e.props,i=v;return m.cloneElement(e,{...i,ref:T,className:D.default(i.className,o.className),style:{...i.style,...o.style},"aria-disabled":r||void 0,tabIndex:r?-1:i.tabIndex,onClick:g(i.onClick,o.onClick),onKeyDown:g(i.onKeyDown,o.onKeyDown)})}return S.jsx(K,{...v,children:n})};exports.DropdownItem=A;
@@ -34,10 +34,14 @@ export type DropdownItemProps = {
34
34
  */
35
35
  indent?: number;
36
36
  /**
37
- * When `true`, renders a plain `<div>` instead of a `<button>`.
38
- * Useful when wrapping form controls like `<Checkbox>` or `<Radio>` that already handle their own events.
39
- * **Warning:** When `asChild={true}`, the item is no longer focusable via keyboard navigation
40
- * unless the child element itself is focusable.
37
+ * Render the item as its child element instead of a `<button>`.
38
+ *
39
+ * - **Navigable child (default `closeOnSelect`)** — e.g. a `Link`: the item props (`role`,
40
+ * roving `tabindex`, handlers, styles) are merged directly onto the child so it becomes the
41
+ * single focusable `menuitem`. This avoids a focusable wrapper *and* a focusable child (a
42
+ * double Tab stop) and keeps the role and accessible name on one element.
43
+ * - **Form control (`closeOnSelect={false}`)** — e.g. a `Checkbox` / `Radio`: the child is
44
+ * wrapped in a plain `<div>` menuitem that forwards activation to the inner control.
41
45
  *
42
46
  * @default false
43
47
  */
@@ -1,70 +1,101 @@
1
- import { jsx as T } from "react/jsx-runtime";
2
- import j from "../../../../../../external/classnames/index.es.js";
3
- import { useDropdownContext as E } from "../dropdown-context.es.js";
4
- import r from "./dropdown-item.module.scss.es.js";
5
- const l = ({
6
- children: y,
7
- onClick: t,
8
- disabled: n,
9
- active: _,
10
- index: d,
11
- indent: i,
12
- asChild: o = !1,
13
- closeOnSelect: s = !0,
14
- isParent: w = !1,
15
- className: c,
16
- role: m,
17
- ...v
1
+ import { jsx as $ } from "react/jsx-runtime";
2
+ import { useMergeRefs as z } from "../../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
+ import D from "../../../../../../external/classnames/index.es.js";
4
+ import { isValidElement as I, cloneElement as A } from "react";
5
+ import { useDropdownContext as B } from "../dropdown-context.es.js";
6
+ import p from "./dropdown-item.module.scss.es.js";
7
+ const b = (n, e) => (o) => {
8
+ n == null || n(o), o.defaultPrevented || e == null || e(o);
9
+ }, W = ({
10
+ children: n,
11
+ onClick: e,
12
+ disabled: o,
13
+ active: g,
14
+ index: m,
15
+ indent: u,
16
+ asChild: s = !1,
17
+ closeOnSelect: i = !0,
18
+ isParent: l = !1,
19
+ className: x,
20
+ role: d,
21
+ ...k
18
22
  }) => {
19
- const { getItemProps: b, listItemsRef: x, setOpen: f, activeIndex: D, divided: I, variant: u } = E(), g = o ? "div" : "button", P = (e) => typeof e != "number" || e <= 0 ? {} : {
20
- "--dropdown-indent-level": e,
21
- "--dropdown-indent": `${e}rem`
22
- }, q = (e) => {
23
- if (n) return;
24
- const p = e.currentTarget.querySelector(
23
+ const { getItemProps: K, listItemsRef: N, setOpen: a, activeIndex: P, divided: R, variant: y } = B(), E = s ? "div" : "button", c = s && i !== !1 && I(n), w = (t) => {
24
+ typeof m == "number" && (N.current[m] = t);
25
+ }, T = I(n) ? n.ref : void 0, q = z([w, T]), V = (t) => typeof t != "number" || t <= 0 ? {} : {
26
+ "--dropdown-indent-level": t,
27
+ "--dropdown-indent": `${t}rem`
28
+ }, j = (t) => {
29
+ if (o) {
30
+ t.preventDefault();
31
+ return;
32
+ }
33
+ const r = t.currentTarget.querySelector(
25
34
  'input[type="checkbox"], input[type="radio"]'
26
35
  );
27
- if (p) {
28
- p.click();
36
+ if (r) {
37
+ r.click();
38
+ return;
39
+ }
40
+ e == null || e(t), (!s || c) && i && a(!1);
41
+ }, M = (t) => {
42
+ if (o) {
43
+ (t.key === "Enter" || t.key === " ") && t.preventDefault();
29
44
  return;
30
45
  }
31
- o ? t == null || t(e) : (t == null || t(e), s && f(!1));
32
- }, K = (e) => {
33
- if (!n && (e.key === "Enter" || e.key === " ")) {
34
- e.preventDefault();
35
- const p = e.currentTarget.querySelector(
46
+ if (t.key === "Enter" || t.key === " ") {
47
+ const r = t.currentTarget.querySelector(
36
48
  'input[type="checkbox"], input[type="radio"]'
37
49
  );
38
- p ? p.click() : t == null || t(e), !o && s && f(!1);
50
+ if (r) {
51
+ t.preventDefault(), r.click(), !s && i && a(!1);
52
+ return;
53
+ }
54
+ if (c) {
55
+ t.preventDefault(), t.currentTarget.click();
56
+ return;
57
+ }
58
+ t.preventDefault(), e == null || e(t), !s && i && a(!1);
39
59
  }
40
- }, a = {
41
- ref(e) {
42
- typeof d == "number" && (x.current[d] = e);
43
- },
44
- tabIndex: D === d ? 0 : -1,
45
- className: j(
46
- r["tedi-dropdown__item"],
60
+ }, v = {
61
+ ref: w,
62
+ tabIndex: P === m ? 0 : -1,
63
+ className: D(
64
+ p["tedi-dropdown__item"],
47
65
  {
48
- [r["tedi-dropdown__item--active"]]: _,
49
- [r["tedi-dropdown__item--disabled"]]: n,
50
- [r["tedi-dropdown__item--divided"]]: I,
51
- [r["tedi-dropdown__item--indent"]]: i,
52
- [r["tedi-dropdown__item--tree-item"]]: u === "tree" && i,
53
- [r["tedi-dropdown__item--tree-parent"]]: u === "tree" && w
66
+ [p["tedi-dropdown__item--active"]]: g,
67
+ [p["tedi-dropdown__item--disabled"]]: o,
68
+ [p["tedi-dropdown__item--divided"]]: R,
69
+ [p["tedi-dropdown__item--indent"]]: u,
70
+ [p["tedi-dropdown__item--tree-item"]]: y === "tree" && u,
71
+ [p["tedi-dropdown__item--tree-parent"]]: y === "tree" && l
54
72
  },
55
- c
73
+ x
56
74
  ),
57
- style: P(i),
58
- onClick: q,
59
- onKeyDown: K,
75
+ style: V(u),
76
+ onClick: j,
77
+ onKeyDown: M,
78
+ ...k
79
+ }, _ = s && i === !1 ? { ...v, role: d } : K({
80
+ role: d ?? "menuitem",
81
+ disabled: s ? void 0 : o,
60
82
  ...v
61
- }, N = o && s === !1 ? { ...a, role: m } : b({
62
- role: m ?? "menuitem",
63
- disabled: o ? void 0 : n,
64
- ...a
65
83
  });
66
- return /* @__PURE__ */ T(g, { ...N, children: y });
84
+ if (c) {
85
+ const t = n, r = t.props, f = _;
86
+ return A(t, {
87
+ ...f,
88
+ ref: q,
89
+ className: D(f.className, r.className),
90
+ style: { ...f.style, ...r.style },
91
+ "aria-disabled": o || void 0,
92
+ tabIndex: o ? -1 : f.tabIndex,
93
+ onClick: b(f.onClick, r.onClick),
94
+ onKeyDown: b(f.onKeyDown, r.onKeyDown)
95
+ });
96
+ }
97
+ return /* @__PURE__ */ $(E, { ..._, children: n });
67
98
  };
68
99
  export {
69
- l as DropdownItem
100
+ W as DropdownItem
70
101
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),s=require("react"),C=require("./overlay.cjs.js"),E=u=>{const{children:y,classNames:e,labelledBy:f,describedBy:h}=u,{open:l,x:m,y:g,strategy:b,focusManager:o,floating:v,arrowRef:x,getFloatingProps:w,placement:p,context:i,arrow:t,scrollLock:d,contentId:j,role:F,ariaHidden:q}=s.useContext(C.OverlayContext);if(s.useEffect(()=>{d&&(l?(document.documentElement.style.overflow="hidden",document.documentElement.scrollHeight>window.innerHeight&&(document.body.style.overflow="scroll")):(document.documentElement.style.overflow="",document.body.style.overflow=""))},[l,d]),!l)return null;const a=n.jsxs("div",{...w({ref:v,tabIndex:-1,id:j,"aria-hidden":q||void 0,"aria-labelledby":f,"aria-describedby":h,style:{position:b,left:m,top:g},className:e==null?void 0:e.content}),"data-placement":p,"data-testid":"overlay-content",children:[n.jsx(r.FloatingArrow,{ref:c=>x.current=c,context:i,className:e==null?void 0:e.arrow,height:t==null?void 0:t.height,width:t==null?void 0:t.width,"data-testid":"overlay-arrow"}),y]});return n.jsx(r.FloatingPortal,{children:F==="tooltip"?a:n.jsx(r.FloatingFocusManager,{modal:(o==null?void 0:o.modal)||!1,...o,context:i,children:a})})};exports.OverlayContent=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),s=require("react"),C=require("./overlay.cjs.js"),E=u=>{const{children:y,classNames:e,labelledBy:f,describedBy:h,contentStyle:m}=u,{open:l,x:g,y:b,strategy:v,focusManager:o,floating:x,arrowRef:w,getFloatingProps:p,placement:j,context:i,arrow:t,scrollLock:d,contentId:F,role:S,ariaHidden:q}=s.useContext(C.OverlayContext);if(s.useEffect(()=>{d&&(l?(document.documentElement.style.overflow="hidden",document.documentElement.scrollHeight>window.innerHeight&&(document.body.style.overflow="scroll")):(document.documentElement.style.overflow="",document.body.style.overflow=""))},[l,d]),!l)return null;const a=n.jsxs("div",{...p({ref:x,tabIndex:-1,id:F,"aria-hidden":q||void 0,"aria-labelledby":f,"aria-describedby":h,style:{position:v,left:g,top:b,...m},className:e==null?void 0:e.content}),"data-placement":j,"data-testid":"overlay-content",children:[n.jsx(r.FloatingArrow,{ref:c=>w.current=c,context:i,className:e==null?void 0:e.arrow,height:t==null?void 0:t.height,width:t==null?void 0:t.width,"data-testid":"overlay-arrow"}),y]});return n.jsx(r.FloatingPortal,{children:S==="tooltip"?a:n.jsx(r.FloatingFocusManager,{modal:(o==null?void 0:o.modal)||!1,...o,context:i,children:a})})};exports.OverlayContent=E;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { CSSProperties, ReactNode } from 'react';
2
2
  export interface OverlayContentProps {
3
3
  /**
4
4
  * Overlay content.
@@ -36,5 +36,10 @@ export interface OverlayContentProps {
36
36
  * Useful for longer explanations or supporting content that complements the title.
37
37
  */
38
38
  describedBy?: string;
39
+ /**
40
+ * Extra inline styles merged onto the floating content container (after the positioning styles).
41
+ * Used to pass through consumer-controlled values such as padding CSS variables.
42
+ */
43
+ contentStyle?: CSSProperties;
39
44
  }
40
45
  export declare const OverlayContent: (props: OverlayContentProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,52 +1,53 @@
1
- import { jsxs as E, jsx as n } from "react/jsx-runtime";
2
- import { FloatingArrow as C, FloatingPortal as H, FloatingFocusManager as j } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
1
+ import { jsxs as C, jsx as n } from "react/jsx-runtime";
2
+ import { FloatingArrow as H, FloatingPortal as S, FloatingFocusManager as j } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
3
  import { useContext as B, useEffect as I } from "react";
4
4
  import { OverlayContext as O } from "./overlay.es.js";
5
- const L = (c) => {
6
- const { children: s, classNames: e, labelledBy: m, describedBy: f } = c, {
5
+ const R = (c) => {
6
+ const { children: s, classNames: e, labelledBy: m, describedBy: f, contentStyle: y } = c, {
7
7
  open: l,
8
- x: y,
9
- y: h,
10
- strategy: u,
8
+ x: h,
9
+ y: u,
10
+ strategy: g,
11
11
  focusManager: o,
12
- floating: g,
13
- arrowRef: p,
14
- getFloatingProps: b,
15
- placement: v,
12
+ floating: p,
13
+ arrowRef: b,
14
+ getFloatingProps: v,
15
+ placement: w,
16
16
  context: r,
17
17
  arrow: t,
18
18
  scrollLock: i,
19
- contentId: w,
20
- role: x,
21
- ariaHidden: F
19
+ contentId: x,
20
+ role: F,
21
+ ariaHidden: E
22
22
  } = B(O);
23
23
  if (I(() => {
24
24
  i && (l ? (document.documentElement.style.overflow = "hidden", document.documentElement.scrollHeight > window.innerHeight && (document.body.style.overflow = "scroll")) : (document.documentElement.style.overflow = "", document.body.style.overflow = ""));
25
25
  }, [l, i]), !l) return null;
26
- const d = /* @__PURE__ */ E(
26
+ const d = /* @__PURE__ */ C(
27
27
  "div",
28
28
  {
29
- ...b({
30
- ref: g,
29
+ ...v({
30
+ ref: p,
31
31
  tabIndex: -1,
32
- id: w,
33
- "aria-hidden": F || void 0,
32
+ id: x,
33
+ "aria-hidden": E || void 0,
34
34
  "aria-labelledby": m,
35
35
  "aria-describedby": f,
36
36
  style: {
37
- position: u,
38
- left: y,
39
- top: h
37
+ position: g,
38
+ left: h,
39
+ top: u,
40
+ ...y
40
41
  },
41
42
  className: e == null ? void 0 : e.content
42
43
  }),
43
- "data-placement": v,
44
+ "data-placement": w,
44
45
  "data-testid": "overlay-content",
45
46
  children: [
46
47
  /* @__PURE__ */ n(
47
- C,
48
+ H,
48
49
  {
49
- ref: (a) => p.current = a,
50
+ ref: (a) => b.current = a,
50
51
  context: r,
51
52
  className: e == null ? void 0 : e.arrow,
52
53
  height: t == null ? void 0 : t.height,
@@ -58,8 +59,8 @@ const L = (c) => {
58
59
  ]
59
60
  }
60
61
  );
61
- return /* @__PURE__ */ n(H, { children: x === "tooltip" ? d : /* @__PURE__ */ n(j, { modal: (o == null ? void 0 : o.modal) || !1, ...o, context: r, children: d }) });
62
+ return /* @__PURE__ */ n(S, { children: F === "tooltip" ? d : /* @__PURE__ */ n(j, { modal: (o == null ? void 0 : o.modal) || !1, ...o, context: r, children: d }) });
62
63
  };
63
64
  export {
64
- L as OverlayContent
65
+ R as OverlayContent
65
66
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("../../../../../external/classnames/index.cjs.js"),s=require("react"),y=require("../../base/typography/text/text.cjs.js"),_=require("../../buttons/closing-button/closing-button.cjs.js"),j=require("../overlay/overlay.cjs.js"),b=require("../overlay/overlay-content.cjs.js"),e=require("./popover.module.scss.cjs.js"),g=require("./popover-context.cjs.js"),x=C=>{const{children:i,width:d="small",className:h,title:t,titleProps:l={element:"h4"},close:a,closeProps:r={size:"default"}}=C,{onOpenChange:m}=s.useContext(j.OverlayContext),{withBorder:c}=s.useContext(g.PopoverContext),u=s.useId(),p=!!i,v=s.useId();return o.jsxs(b.OverlayContent,{classNames:{content:n.default(e.default["tedi-popover"],{[e.default[`tedi-popover--${d}`]]:d&&d!=="none",[e.default["tedi-popover--border"]]:c},h),arrow:n.default(e.default["tedi-popover__arrow"],{[e.default["tedi-popover__arrow--border"]]:c})},labelledBy:t?u:void 0,describedBy:p?v:void 0,children:[(t||a)&&o.jsxs("div",{className:n.default(e.default["tedi-popover__header"],{[e.default["tedi-popover__header--no-title"]]:!t}),children:[t&&o.jsx(y.Text,{...l,id:u,className:n.default("align-self-center",l.className),children:t}),a&&o.jsx(_.ClosingButton,{...r,onClick:q=>{var f;m(!1),(f=r.onClick)==null||f.call(r,q)}})]}),p?o.jsx("div",{id:v,children:i}):i]})};x.displayName="PopoverContent";exports.PopoverContent=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),s=require("../../../../../external/classnames/index.cjs.js"),c=require("react"),q=require("../../base/typography/text/text.cjs.js"),_=require("../../buttons/closing-button/closing-button.cjs.js"),j=require("../overlay/overlay.cjs.js"),P=require("../overlay/overlay-content.cjs.js"),r=require("./popover.module.scss.cjs.js"),B=require("./popover-context.cjs.js"),N=e=>{if(e===void 0)return;const t=a=>`${a}rem`,o=typeof e=="number"?{top:e,right:e,bottom:e,left:e}:"vertical"in e?{top:e.vertical,right:e.horizontal,bottom:e.vertical,left:e.horizontal}:e;return{"--popover-content-padding-top":t(o.top),"--popover-content-padding-right":t(o.right),"--popover-content-padding-bottom":t(o.bottom),"--popover-content-padding-left":t(o.left)}},x=e=>{const{children:t,width:o="small",className:a,title:n,titleProps:d={element:"h4"},close:u,closeProps:i={size:"default"},padding:C}=e,{onOpenChange:b}=c.useContext(j.OverlayContext),{withBorder:p}=c.useContext(B.PopoverContext),v=c.useId(),f=!!t,m=c.useId();return l.jsxs(P.OverlayContent,{classNames:{content:s.default(r.default["tedi-popover"],{[r.default[`tedi-popover--${o}`]]:o&&o!=="none",[r.default["tedi-popover--border"]]:p},a),arrow:s.default(r.default["tedi-popover__arrow"],{[r.default["tedi-popover__arrow--border"]]:p})},labelledBy:n?v:void 0,describedBy:f?m:void 0,contentStyle:N(C),children:[(n||u)&&l.jsxs("div",{className:s.default(r.default["tedi-popover__header"],{[r.default["tedi-popover__header--no-title"]]:!n}),children:[n&&l.jsx(q.Text,{...d,id:v,className:s.default("align-self-center",d.className),children:n}),u&&l.jsx(_.ClosingButton,{...i,onClick:y=>{var h;b(!1),(h=i.onClick)==null||h.call(i,y)}})]}),f?l.jsx("div",{id:m,children:t}):t]})};x.displayName="PopoverContent";exports.PopoverContent=x;
@@ -1,5 +1,6 @@
1
1
  import { TextProps } from '../../base/typography/text/text';
2
2
  import { ClosingButtonProps } from '../../buttons/closing-button/closing-button';
3
+ import { CardContentPadding } from '../../content/card/card';
3
4
  import { OverlayContentProps } from '../overlay/overlay-content';
4
5
  export interface PopoverContentProps extends Omit<OverlayContentProps, 'classNames'> {
5
6
  /**
@@ -28,6 +29,12 @@ export interface PopoverContentProps extends Omit<OverlayContentProps, 'classNam
28
29
  * @default small
29
30
  */
30
31
  width?: 'small' | 'medium' | 'large' | 'none';
32
+ /**
33
+ * Inner padding of the popover, using the same scale as `Card` — a number in rems,
34
+ * `{ vertical, horizontal }`, or `{ top, right, bottom, left }`. Set to `0` (or zero a single axis)
35
+ * when the popover holds a menu whose rows should reach the edges. Defaults to the popover padding.
36
+ */
37
+ padding?: CardContentPadding;
31
38
  }
32
39
  export declare const PopoverContent: {
33
40
  (props: PopoverContentProps): import("react/jsx-runtime").JSX.Element;