@tedi-design-system/react 19.0.0-rc.9 → 19.0.1-rc.1

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 (69) hide show
  1. package/bundle-stats.html +394 -38
  2. package/index.css +1 -1
  3. package/package.json +7 -6
  4. package/src/community/components/card/card.cjs.js +1 -1
  5. package/src/community/components/card/card.es.js +20 -19
  6. package/src/community/components/color-tokens.cjs.js +1 -0
  7. package/src/community/components/color-tokens.d.ts +14 -0
  8. package/src/community/components/color-tokens.es.js +35 -0
  9. package/src/community/components/layout/header/components/header-role/header-role.cjs.js +1 -1
  10. package/src/community/components/layout/header/components/header-role/header-role.es.js +19 -19
  11. package/src/community/components/layout/header/components/header-role/header-role.module.scss.cjs.js +1 -1
  12. package/src/community/components/layout/header/components/header-role/header-role.module.scss.es.js +2 -1
  13. package/src/community/components/map-components/button-group/button-group.cjs.js +1 -1
  14. package/src/community/components/map-components/button-group/button-group.es.js +18 -14
  15. package/src/community/components/map-components/map-button/map-button.cjs.js +1 -1
  16. package/src/community/components/map-components/map-button/map-button.es.js +34 -33
  17. package/src/community/components/tooltip/tooltip.cjs.js +1 -1
  18. package/src/community/components/tooltip/tooltip.es.js +31 -30
  19. package/src/tedi/components/content/list/list-item.cjs.js +1 -1
  20. package/src/tedi/components/content/list/list-item.d.ts +1 -1
  21. package/src/tedi/components/content/list/list-item.es.js +8 -8
  22. package/src/tedi/components/content/list/list.cjs.js +1 -1
  23. package/src/tedi/components/content/list/list.d.ts +1 -1
  24. package/src/tedi/components/content/list/list.es.js +29 -23
  25. package/src/tedi/components/content/list/list.module.scss.cjs.js +1 -1
  26. package/src/tedi/components/content/list/list.module.scss.es.js +3 -2
  27. package/src/tedi/components/content/table/table.cjs.js +1 -1
  28. package/src/tedi/components/content/table/table.es.js +448 -438
  29. package/src/tedi/components/content/text-group/text-group-list/text-group-list.d.ts +6 -5
  30. package/src/tedi/components/content/text-group/text-group.d.ts +7 -5
  31. package/src/tedi/components/form/date-field/date-field.cjs.js +1 -1
  32. package/src/tedi/components/form/date-field/date-field.d.ts +6 -0
  33. package/src/tedi/components/form/date-field/date-field.es.js +163 -162
  34. package/src/tedi/components/form/date-time-field/date-time-field.cjs.js +1 -1
  35. package/src/tedi/components/form/date-time-field/date-time-field.d.ts +6 -0
  36. package/src/tedi/components/form/date-time-field/date-time-field.es.js +101 -100
  37. package/src/tedi/components/form/select/components/select-multi-option.cjs.js +1 -1
  38. package/src/tedi/components/form/select/components/select-multi-option.es.js +24 -23
  39. package/src/tedi/components/form/select/components/select-single-option.cjs.js +1 -1
  40. package/src/tedi/components/form/select/components/select-single-option.es.js +11 -10
  41. package/src/tedi/components/form/select/select.module.scss.cjs.js +1 -1
  42. package/src/tedi/components/form/select/select.module.scss.es.js +2 -1
  43. package/src/tedi/components/form/time-field/time-field.cjs.js +1 -1
  44. package/src/tedi/components/form/time-field/time-field.d.ts +6 -0
  45. package/src/tedi/components/form/time-field/time-field.es.js +37 -36
  46. package/src/tedi/components/form/time-picker/time-picker.cjs.js +1 -1
  47. package/src/tedi/components/form/time-picker/time-picker.es.js +1 -1
  48. package/src/tedi/components/layout/vertical-spacing/vertical-spacing-item.cjs.js +1 -1
  49. package/src/tedi/components/layout/vertical-spacing/vertical-spacing-item.d.ts +5 -0
  50. package/src/tedi/components/layout/vertical-spacing/vertical-spacing-item.es.js +14 -13
  51. package/src/tedi/components/layout/vertical-spacing/vertical-spacing.cjs.js +1 -1
  52. package/src/tedi/components/layout/vertical-spacing/vertical-spacing.d.ts +5 -0
  53. package/src/tedi/components/layout/vertical-spacing/vertical-spacing.es.js +18 -17
  54. package/src/tedi/components/misc/ellipsis/ellipsis.cjs.js +1 -1
  55. package/src/tedi/components/misc/ellipsis/ellipsis.es.js +20 -19
  56. package/src/tedi/components/misc/timeline/timeline.cjs.js +1 -1
  57. package/src/tedi/components/misc/timeline/timeline.es.js +24 -27
  58. package/src/tedi/components/overlays/overlay/overlay-content.cjs.js +1 -1
  59. package/src/tedi/components/overlays/overlay/overlay-content.d.ts +6 -1
  60. package/src/tedi/components/overlays/overlay/overlay-content.es.js +28 -27
  61. package/src/tedi/components/overlays/overlay/overlay.cjs.js +1 -1
  62. package/src/tedi/components/overlays/overlay/overlay.es.js +29 -28
  63. package/src/tedi/components/overlays/popover/popover-content.cjs.js +1 -1
  64. package/src/tedi/components/overlays/popover/popover-content.d.ts +7 -0
  65. package/src/tedi/components/overlays/popover/popover-content.es.js +47 -36
  66. package/src/tedi/helpers/index.d.ts +1 -0
  67. package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
  68. package/src/tedi/providers/label-provider/labels-map.d.ts +21 -0
  69. package/src/tedi/providers/label-provider/labels-map.es.js +21 -0
@@ -1,19 +1,19 @@
1
- import { jsxs as q, jsx as i, Fragment as fe } from "react/jsx-runtime";
2
- import { useFloating as me, useClick as ue, useDismiss as pe, useRole as ge, useInteractions as he, FloatingPortal as ke, FloatingFocusManager as ve } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
1
+ import { jsxs as q, jsx as i, Fragment as me } from "react/jsx-runtime";
2
+ import { useFloating as ue, useClick as pe, useDismiss as ge, useRole as he, useInteractions as ke, FloatingPortal as ve, FloatingFocusManager as be } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
3
  import y from "../../../../../external/classnames/index.es.js";
4
- import be, { useState as N, useEffect as z } from "react";
4
+ import Ce, { useState as N, useEffect as z } from "react";
5
5
  import { TextField as A } from "../textfield/textfield.es.js";
6
- import { TimePicker as Ce } from "../time-picker/time-picker.es.js";
6
+ import { TimePicker as xe } from "../time-picker/time-picker.es.js";
7
7
  import d from "./time-field.module.scss.es.js";
8
- import { normalizeTime as xe, TIMEPICKER_OFFSET as _e } from "./time-field-helpers.es.js";
9
- import { TimePickerModal as Fe } from "./time-picker-modal/time-picker-modal.es.js";
10
- import { useBreakpointProps as Pe } from "../../../helpers/hooks/use-breakpoint-props.es.js";
11
- import Te, { isBreakpointBelow as we } from "../../../helpers/hooks/use-breakpoint.es.js";
8
+ import { normalizeTime as _e, TIMEPICKER_OFFSET as Fe } from "./time-field-helpers.es.js";
9
+ import { TimePickerModal as Pe } from "./time-picker-modal/time-picker-modal.es.js";
10
+ import { useBreakpointProps as Te } from "../../../helpers/hooks/use-breakpoint-props.es.js";
11
+ import we, { isBreakpointBelow as Ie } from "../../../helpers/hooks/use-breakpoint.es.js";
12
12
  import { Dropdown as b } from "../../overlays/dropdown/dropdown.es.js";
13
- import { autoUpdate as Ie } from "../../../../../external/@floating-ui/dom/dist/floating-ui.dom.es.js";
14
- import { offset as ye, flip as Ne, shift as Be } from "../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js";
15
- const Oe = (C) => {
16
- const { getCurrentBreakpointProps: K } = Pe(C.defaultServerBreakpoint), {
13
+ import { autoUpdate as ye } from "../../../../../external/@floating-ui/dom/dist/floating-ui.dom.es.js";
14
+ import { offset as Ne, flip as Be, shift as Oe } from "../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js";
15
+ const Me = (C) => {
16
+ const { getCurrentBreakpointProps: K } = Te(C.defaultServerBreakpoint), {
17
17
  id: G,
18
18
  label: H,
19
19
  value: c,
@@ -33,32 +33,33 @@ const Oe = (C) => {
33
33
  useNativePicker: X = !1,
34
34
  timePickerTrigger: M = "button",
35
35
  showPicker: o = !0,
36
- availableTimesVariant: F = "grid-buttons"
37
- } = K(C), R = c !== void 0, [Y, V] = N(c ?? J ?? ""), f = R ? c : Y, [P, T] = N(!1), [Z, E] = N(!1), m = M === "input", l = X, $ = Te(), u = !l && o && !h && !s && (_ === !0 || typeof _ == "string" && we($, _)), ee = me({
36
+ availableTimesVariant: F = "grid-buttons",
37
+ clearable: Y = !0
38
+ } = K(C), R = c !== void 0, [Z, V] = N(c ?? J ?? ""), f = R ? c : Z, [P, T] = N(!1), [$, E] = N(!1), m = M === "input", l = X, ee = we(), u = !l && o && !h && !s && (_ === !0 || typeof _ == "string" && Ie(ee, _)), te = ue({
38
39
  open: P,
39
40
  onOpenChange: T,
40
41
  placement: m ? "bottom-start" : "bottom-end",
41
- middleware: [ye(_e), Ne(), Be()],
42
- whileElementsMounted: Ie
43
- }), { refs: w, context: k, x: te, y: ie, strategy: oe } = ee, ne = ue(k), re = pe(k), le = ge(k, { role: "listbox" }), U = o && m && !h && !s && !l && !u, D = he([...U ? [ne] : [], re, le]), p = (e) => {
42
+ middleware: [Ne(Fe), Be(), Oe()],
43
+ whileElementsMounted: ye
44
+ }), { refs: w, context: k, x: ie, y: oe, strategy: ne } = te, re = pe(k), le = ge(k), se = he(k, { role: "listbox" }), U = o && m && !h && !s && !l && !u, D = ke([...U ? [re] : [], le, se]), p = (e) => {
44
45
  const n = e.trim();
45
46
  R || V(n), x == null || x(n);
46
- }, se = (e) => {
47
+ }, ae = (e) => {
47
48
  var v;
48
49
  const n = e.target.value ?? "";
49
50
  (v = t == null ? void 0 : t.onBlur) == null || v.call(t, e);
50
- const r = xe(n);
51
+ const r = _e(n);
51
52
  r !== null && r !== n && p(r);
52
53
  };
53
54
  z(() => {
54
55
  c !== void 0 && V(c);
55
56
  }, [c]);
56
- const g = be.useRef(null);
57
+ const g = Ce.useRef(null);
57
58
  z(() => {
58
59
  var e;
59
60
  (e = g.current) != null && e.inner && w.setReference(g.current.inner);
60
61
  }, [w]);
61
- const ae = () => {
62
+ const de = () => {
62
63
  var n;
63
64
  const e = (n = g.current) == null ? void 0 : n.input;
64
65
  if (e) {
@@ -68,8 +69,8 @@ const Oe = (C) => {
68
69
  }
69
70
  e.focus();
70
71
  }
71
- }, de = () => T((e) => !e), S = () => E(!0), ce = () => {
72
- !o || s || (l ? ae() : u ? S() : M === "button" && de());
72
+ }, ce = () => T((e) => !e), S = () => E(!0), fe = () => {
73
+ !o || s || (l ? de() : u ? S() : M === "button" && ce());
73
74
  }, j = u && m && !h ? () => {
74
75
  S();
75
76
  } : void 0, I = {
@@ -81,11 +82,11 @@ const Oe = (C) => {
81
82
  readOnly: h || !l && m,
82
83
  disabled: s || (t == null ? void 0 : t.disabled),
83
84
  icon: o ? "schedule" : { name: "schedule", color: "inherit" },
84
- isClearable: !0,
85
+ isClearable: Y,
85
86
  required: L,
86
- onIconClick: o ? ce : void 0,
87
+ onIconClick: o ? fe : void 0,
87
88
  onChange: p,
88
- onBlur: se,
89
+ onBlur: ae,
89
90
  className: y(
90
91
  d["tedi-time-field__textfield"],
91
92
  { [d["tedi-time-field__icon--disabled"]]: !o || s },
@@ -125,7 +126,7 @@ const Oe = (C) => {
125
126
  /* @__PURE__ */ i(b.Content, { children: a.map((r, v) => /* @__PURE__ */ i(b.Item, { index: v, active: r === f, onClick: () => p(r), children: r }, r)) })
126
127
  ] });
127
128
  }
128
- return /* @__PURE__ */ q(fe, { children: [
129
+ return /* @__PURE__ */ q(me, { children: [
129
130
  /* @__PURE__ */ i(
130
131
  "div",
131
132
  {
@@ -137,9 +138,9 @@ const Oe = (C) => {
137
138
  }
138
139
  ),
139
140
  u && /* @__PURE__ */ i(
140
- Fe,
141
+ Pe,
141
142
  {
142
- open: Z,
143
+ open: $,
143
144
  onOpenChange: E,
144
145
  value: f,
145
146
  onConfirm: p,
@@ -149,19 +150,19 @@ const Oe = (C) => {
149
150
  modalProps: W
150
151
  }
151
152
  ),
152
- !l && o && !s && !u && /* @__PURE__ */ i(ke, { children: P && /* @__PURE__ */ i(ve, { context: k, modal: !1, initialFocus: -1, children: /* @__PURE__ */ i(
153
+ !l && o && !s && !u && /* @__PURE__ */ i(ve, { children: P && /* @__PURE__ */ i(be, { context: k, modal: !1, initialFocus: -1, children: /* @__PURE__ */ i(
153
154
  "div",
154
155
  {
155
156
  ref: w.setFloating,
156
157
  ...D.getFloatingProps({
157
158
  style: {
158
- position: oe,
159
- top: ie ?? 0,
160
- left: te ?? 0
159
+ position: ne,
160
+ top: oe ?? 0,
161
+ left: ie ?? 0
161
162
  }
162
163
  }),
163
164
  children: /* @__PURE__ */ i(
164
- Ce,
165
+ xe,
165
166
  {
166
167
  value: f,
167
168
  stepMinutes: B,
@@ -177,7 +178,7 @@ const Oe = (C) => {
177
178
  ) }) })
178
179
  ] });
179
180
  };
180
- Oe.displayName = "TimeField";
181
+ Me.displayName = "TimeField";
181
182
  export {
182
- Oe as TimeField
183
+ Me as TimeField
183
184
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react/jsx-runtime"),n=require("react"),t=require("../time-field/time-field-helpers.cjs.js"),H=require("./components/time-grid/time-grid.cjs.js"),x=require("./components/time-wheel/time-wheel.cjs.js"),T=({value:s,defaultValue:f="",onChange:r,stepMinutes:o=1,availableTimes:i,gridVariant:h="button",className:u,bordered:c=!0})=>{const[j,P]=n.useState(f),l=s!==void 0,m=l?s:j,d=e=>{l||P(e),r==null||r(e)},a=n.useMemo(t.generateHours,[]),q=n.useMemo(()=>t.generateMinutes(o),[o]),{hour:y,minute:S}=t.parseTime(m||"12:00"),g=a.includes(y)?y:"12",k=t.findClosestMinute(S,q);return Array.isArray(i)&&i.length>0?M.jsx(H.TimeGrid,{times:i,value:m,variant:h,onSelect:d,className:u,bordered:c}):M.jsx(x.TimeWheel,{hours:a,minutes:q,selectedHour:g,selectedMinute:k,onChange:(e,p)=>d(`${e}:${p}`),className:u,bordered:c})};T.displayName="TimePicker";exports.TimePicker=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react/jsx-runtime"),n=require("react"),t=require("../time-field/time-field-helpers.cjs.js"),H=require("./components/time-grid/time-grid.cjs.js"),x=require("./components/time-wheel/time-wheel.cjs.js"),T=({value:s,defaultValue:f="",onChange:r,stepMinutes:o=1,availableTimes:i,gridVariant:h="button",className:u,bordered:c=!0})=>{const[j,P]=n.useState(f),l=s!==void 0,m=l?s:j,d=e=>{l||P(e),r==null||r(e)},a=n.useMemo(()=>t.generateHours(),[]),q=n.useMemo(()=>t.generateMinutes(o),[o]),{hour:y,minute:S}=t.parseTime(m||"12:00"),g=a.includes(y)?y:"12",k=t.findClosestMinute(S,q);return Array.isArray(i)&&i.length>0?M.jsx(H.TimeGrid,{times:i,value:m,variant:h,onSelect:d,className:u,bordered:c}):M.jsx(x.TimeWheel,{hours:a,minutes:q,selectedHour:g,selectedMinute:k,onChange:(e,p)=>d(`${e}:${p}`),className:u,bordered:c})};T.displayName="TimePicker";exports.TimePicker=T;
@@ -15,7 +15,7 @@ const I = ({
15
15
  }) => {
16
16
  const [M, T] = S.useState(h), c = o !== void 0, m = c ? o : M, u = (t) => {
17
17
  c || T(t), e == null || e(t);
18
- }, f = a(_, []), l = a(() => $(n), [n]), { hour: d, minute: k } = g(m || "12:00"), A = f.includes(d) ? d : "12", H = j(k, l);
18
+ }, f = a(() => _(), []), l = a(() => $(n), [n]), { hour: d, minute: k } = g(m || "12:00"), A = f.includes(d) ? d : "12", H = j(k, l);
19
19
  return Array.isArray(r) && r.length > 0 ? /* @__PURE__ */ p(
20
20
  x,
21
21
  {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),u=require("../../../../../external/classnames/index.cjs.js"),m=require("./vertical-spacing.module.scss.cjs.js"),d=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),i=e=>{const{getCurrentBreakpointProps:r}=d.useBreakpointProps(e.defaultServerBreakpoint),{children:a,className:n,element:s="div",size:t=1,...c}=r(e),l=u.default(m.default["tedi-vertical-spacing__item"],n);return o.jsx(s,{"data-name":"vertical-spacing-item",...c,style:{"--vertical-spacing-internal":`${t}${t!==0?"em":""}`},className:l,children:a})};exports.VerticalSpacingItem=i;exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),m=require("../../../../../external/classnames/index.cjs.js"),d=require("./vertical-spacing.module.scss.cjs.js"),p=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),i=e=>{const{getCurrentBreakpointProps:r}=p.useBreakpointProps(e.defaultServerBreakpoint),{children:a,className:n,element:s="div",size:t=1,style:c,...l}=r(e),o=m.default(d.default["tedi-vertical-spacing__item"],n);return u.jsx(s,{"data-name":"vertical-spacing-item",...l,style:{"--vertical-spacing-internal":`${t}${t!==0?"em":""}`,...c},className:o,children:a})};exports.VerticalSpacingItem=i;exports.default=i;
@@ -21,6 +21,11 @@ export interface VerticalSpacingItemProps extends BreakpointSupport<VerticalSpac
21
21
  * Additional class name(s) to apply to the element
22
22
  */
23
23
  className?: string;
24
+ /**
25
+ * Additional inline styles, merged with the internal spacing custom property
26
+ * (rather than replacing it).
27
+ */
28
+ style?: React.CSSProperties;
24
29
  }
25
30
  export declare const VerticalSpacingItem: (props: VerticalSpacingItemProps) => JSX.Element;
26
31
  export default VerticalSpacingItem;
@@ -1,27 +1,28 @@
1
- import { jsx as c } from "react/jsx-runtime";
1
+ import { jsx as l } from "react/jsx-runtime";
2
2
  import o from "../../../../../external/classnames/index.es.js";
3
- import l from "./vertical-spacing.module.scss.es.js";
4
- import { useBreakpointProps as p } from "../../../helpers/hooks/use-breakpoint-props.es.js";
5
- const v = (e) => {
6
- const { getCurrentBreakpointProps: r } = p(e.defaultServerBreakpoint), {
3
+ import p from "./vertical-spacing.module.scss.es.js";
4
+ import { useBreakpointProps as d } from "../../../helpers/hooks/use-breakpoint-props.es.js";
5
+ const B = (e) => {
6
+ const { getCurrentBreakpointProps: r } = d(e.defaultServerBreakpoint), {
7
7
  children: a,
8
8
  className: i,
9
9
  element: s = "div",
10
10
  size: t = 1,
11
- ...n
12
- } = r(e), m = o(l["tedi-vertical-spacing__item"], i);
13
- return /* @__PURE__ */ c(
11
+ style: n,
12
+ ...m
13
+ } = r(e), c = o(p["tedi-vertical-spacing__item"], i);
14
+ return /* @__PURE__ */ l(
14
15
  s,
15
16
  {
16
17
  "data-name": "vertical-spacing-item",
17
- ...n,
18
- style: { "--vertical-spacing-internal": `${t}${t !== 0 ? "em" : ""}` },
19
- className: m,
18
+ ...m,
19
+ style: { "--vertical-spacing-internal": `${t}${t !== 0 ? "em" : ""}`, ...n },
20
+ className: c,
20
21
  children: a
21
22
  }
22
23
  );
23
24
  };
24
25
  export {
25
- v as VerticalSpacingItem,
26
- v as default
26
+ B as VerticalSpacingItem,
27
+ B as default
27
28
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("../../../../../external/classnames/index.cjs.js"),p=require("./vertical-spacing.module.scss.cjs.js"),g=require("./vertical-spacing-item.cjs.js"),m=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),r=e=>{const{getCurrentBreakpointProps:i}=m.useBreakpointProps(e.defaultServerBreakpoint),{children:a,className:n,element:c="div",size:t=1,...s}=i(e),l=u.default(p.default["tedi-vertical-spacing"],n);return o.jsx(c,{"data-name":"vertical-spacing",role:"presentation",...s,className:l,style:{"--vertical-spacing-internal":t!==0?`${t}em`:"0"},children:a})};r.Item=g.VerticalSpacingItem;exports.VerticalSpacing=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),p=require("../../../../../external/classnames/index.cjs.js"),g=require("./vertical-spacing.module.scss.cjs.js"),m=require("./vertical-spacing-item.cjs.js"),d=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),r=e=>{const{getCurrentBreakpointProps:i}=d.useBreakpointProps(e.defaultServerBreakpoint),{children:a,className:n,element:c="div",size:t=1,style:s,...l}=i(e),o=p.default(g.default["tedi-vertical-spacing"],n);return u.jsx(c,{"data-name":"vertical-spacing",role:"presentation",...l,className:o,style:{"--vertical-spacing-internal":t!==0?`${t}em`:"0",...s},children:a})};r.Item=m.VerticalSpacingItem;exports.VerticalSpacing=r;
@@ -22,6 +22,11 @@ export interface VerticalSpacingProps extends BreakpointSupport<VerticalSpacingB
22
22
  * Additional class name(s) to apply to the element
23
23
  */
24
24
  className?: string;
25
+ /**
26
+ * Additional inline styles, merged with the internal spacing custom property
27
+ * (rather than replacing it).
28
+ */
29
+ style?: React.CSSProperties;
25
30
  }
26
31
  export declare const VerticalSpacing: {
27
32
  (props: VerticalSpacingProps): JSX.Element;
@@ -1,29 +1,30 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import m from "../../../../../external/classnames/index.es.js";
3
- import l from "./vertical-spacing.module.scss.es.js";
4
- import { VerticalSpacingItem as p } from "./vertical-spacing-item.es.js";
5
- import { useBreakpointProps as g } from "../../../helpers/hooks/use-breakpoint-props.es.js";
6
- const f = (e) => {
7
- const { getCurrentBreakpointProps: r } = g(e.defaultServerBreakpoint), {
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import l from "../../../../../external/classnames/index.es.js";
3
+ import p from "./vertical-spacing.module.scss.es.js";
4
+ import { VerticalSpacingItem as g } from "./vertical-spacing-item.es.js";
5
+ import { useBreakpointProps as f } from "../../../helpers/hooks/use-breakpoint-props.es.js";
6
+ const d = (e) => {
7
+ const { getCurrentBreakpointProps: r } = f(e.defaultServerBreakpoint), {
8
8
  children: a,
9
9
  className: i,
10
- element: n = "div",
10
+ element: s = "div",
11
11
  size: t = 1,
12
- ...s
13
- } = r(e), o = m(l["tedi-vertical-spacing"], i);
14
- return /* @__PURE__ */ c(
15
- n,
12
+ style: n,
13
+ ...o
14
+ } = r(e), c = l(p["tedi-vertical-spacing"], i);
15
+ return /* @__PURE__ */ m(
16
+ s,
16
17
  {
17
18
  "data-name": "vertical-spacing",
18
19
  role: "presentation",
19
- ...s,
20
- className: o,
21
- style: { "--vertical-spacing-internal": t !== 0 ? `${t}em` : "0" },
20
+ ...o,
21
+ className: c,
22
+ style: { "--vertical-spacing-internal": t !== 0 ? `${t}em` : "0", ...n },
22
23
  children: a
23
24
  }
24
25
  );
25
26
  };
26
- f.Item = p;
27
+ d.Item = g;
27
28
  export {
28
- f as VerticalSpacing
29
+ d as VerticalSpacing
29
30
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("../../../../../external/classnames/index.cjs.js"),o=require("react"),a=require("../../overlays/popover/popover.cjs.js"),i=require("./ellipsis.module.scss.cjs.js"),x=require("../../../helpers/hooks/use-element-size.cjs.js"),g=d=>{const{children:l,lineClamp:r=2,position:s="end",popover:p=!0,className:u,...m}=d,n=o.useRef(null),[f,h]=o.useState(!1),v=x.useElementSize(n);o.useEffect(()=>{const t=n.current;t&&h(s==="start"?t.scrollWidth>t.clientWidth:t.scrollHeight>t.clientHeight)},[v,s,r]);const c=e.jsx("div",{"data-name":"ellipsis",...m,ref:n,className:j.default(i.default["tedi-ellipsis"],{[i.default["tedi-ellipsis--start"]]:s==="start"},u),style:s==="end"?{lineClamp:r,WebkitLineClamp:r}:void 0,children:s==="start"?e.jsx("span",{className:i.default["tedi-ellipsis__inner"],children:l}):l});return f&&p?e.jsxs(a.Popover,{openWith:"hover",focusManager:{modal:!1},children:[e.jsx(a.Popover.Trigger,{children:c}),e.jsx(a.Popover.Content,{children:e.jsx("span",{className:i.default["tedi-ellipsis__overlay"],children:l})})]}):c};exports.Ellipsis=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("../../../../../external/classnames/index.cjs.js"),o=require("react"),a=require("../../overlays/popover/popover.cjs.js"),i=require("./ellipsis.module.scss.cjs.js"),g=require("../../../helpers/hooks/use-element-size.cjs.js"),E=p=>{const{children:l,lineClamp:r=2,position:s="end",popover:u=!0,className:m,...f}=p,n=o.useRef(null),[v,h]=o.useState(!1),j=g.useElementSize(n);o.useEffect(()=>{const t=n.current;t&&h(s==="start"?t.scrollWidth>t.clientWidth:t.scrollHeight>t.clientHeight)},[j,s,r]);const c=v&&u,d=e.jsx("div",{"data-name":"ellipsis",...f,ref:n,role:c?"button":void 0,className:x.default(i.default["tedi-ellipsis"],{[i.default["tedi-ellipsis--start"]]:s==="start"},m),style:s==="end"?{lineClamp:r,WebkitLineClamp:r}:void 0,children:s==="start"?e.jsx("span",{className:i.default["tedi-ellipsis__inner"],children:l}):l});return c?e.jsxs(a.Popover,{openWith:"hover",focusManager:{modal:!1},children:[e.jsx(a.Popover.Trigger,{children:d}),e.jsx(a.Popover.Content,{children:e.jsx("span",{className:i.default["tedi-ellipsis__overlay"],children:l})})]}):d};exports.Ellipsis=E;
@@ -1,37 +1,38 @@
1
- import { jsx as t, jsxs as _ } from "react/jsx-runtime";
2
- import g from "../../../../../external/classnames/index.es.js";
3
- import o from "react";
1
+ import { jsx as t, jsxs as g } from "react/jsx-runtime";
2
+ import E from "../../../../../external/classnames/index.es.js";
3
+ import n from "react";
4
4
  import { Popover as a } from "../../overlays/popover/popover.es.js";
5
5
  import i from "./ellipsis.module.scss.es.js";
6
- import { useElementSize as E } from "../../../helpers/hooks/use-element-size.es.js";
7
- const S = (m) => {
8
- const { children: l, lineClamp: r = 2, position: e = "end", popover: p = !0, className: d, ...f } = m, n = o.useRef(null), [h, u] = o.useState(!1), v = E(n);
9
- o.useEffect(() => {
10
- const s = n.current;
11
- s && u(
6
+ import { useElementSize as N } from "../../../helpers/hooks/use-element-size.es.js";
7
+ const b = (m) => {
8
+ const { children: l, lineClamp: r = 2, position: e = "end", popover: d = !0, className: f, ...h } = m, o = n.useRef(null), [u, v] = n.useState(!1), _ = N(o);
9
+ n.useEffect(() => {
10
+ const s = o.current;
11
+ s && v(
12
12
  e === "start" ? s.scrollWidth > s.clientWidth : s.scrollHeight > s.clientHeight
13
13
  );
14
- }, [v, e, r]);
15
- const c = /* @__PURE__ */ t(
14
+ }, [_, e, r]);
15
+ const c = u && d, p = /* @__PURE__ */ t(
16
16
  "div",
17
17
  {
18
18
  "data-name": "ellipsis",
19
- ...f,
20
- ref: n,
21
- className: g(
19
+ ...h,
20
+ ref: o,
21
+ role: c ? "button" : void 0,
22
+ className: E(
22
23
  i["tedi-ellipsis"],
23
24
  { [i["tedi-ellipsis--start"]]: e === "start" },
24
- d
25
+ f
25
26
  ),
26
27
  style: e === "end" ? { lineClamp: r, WebkitLineClamp: r } : void 0,
27
28
  children: e === "start" ? /* @__PURE__ */ t("span", { className: i["tedi-ellipsis__inner"], children: l }) : l
28
29
  }
29
30
  );
30
- return h && p ? /* @__PURE__ */ _(a, { openWith: "hover", focusManager: { modal: !1 }, children: [
31
- /* @__PURE__ */ t(a.Trigger, { children: c }),
31
+ return c ? /* @__PURE__ */ g(a, { openWith: "hover", focusManager: { modal: !1 }, children: [
32
+ /* @__PURE__ */ t(a.Trigger, { children: p }),
32
33
  /* @__PURE__ */ t(a.Content, { children: /* @__PURE__ */ t("span", { className: i["tedi-ellipsis__overlay"], children: l }) })
33
- ] }) : c;
34
+ ] }) : p;
34
35
  };
35
36
  export {
36
- S as Ellipsis
37
+ b as Ellipsis
37
38
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react/jsx-runtime"),y=require("../../../../../external/classnames/index.cjs.js"),n=require("react"),I=require("./components/timeline-description/timeline-description.cjs.js"),d=require("./components/timeline-item/timeline-item.cjs.js"),g=require("./components/timeline-title/timeline-title.cjs.js"),u=require("./timeline.module.scss.cjs.js"),c=e=>n.isValidElement(e)&&e.type===d.TimelineItem,j=(e,t)=>t===void 0?"future":e===t?"current":e<t?"past":"future",i=({children:e,activeIndex:t,variant:l="default",cardPadding:s,className:a})=>{const f=n.Children.toArray(e).filter(c).length;let m=-1;const T=n.Children.map(e,r=>{if(!c(r))return r;m+=1;const o=m;return n.cloneElement(r,{state:j(o,t),isLast:o===f-1})}),p=l==="card"&&s!==void 0?{"--tedi-timeline-card-padding":`${s}rem`}:void 0;return q.jsx("div",{className:y.default(u.default["tedi-timeline"],{[u.default["tedi-timeline--card"]]:l==="card"},a),style:p,children:T})};i.displayName="Timeline";i.Item=d.TimelineItem;i.Title=g.TimelineTitle;i.Description=I.TimelineDescription;exports.Timeline=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react/jsx-runtime"),v=require("../../../../../external/classnames/index.cjs.js"),s=require("react"),D=require("./components/timeline-description/timeline-description.cjs.js"),p=require("./components/timeline-item/timeline-item.cjs.js"),E=require("./components/timeline-title/timeline-title.cjs.js"),a=require("./timeline.module.scss.cjs.js"),d=e=>s.isValidElement(e)&&e.type===p.TimelineItem,I=(e,i)=>i===void 0?"future":e===i?"current":e<i?"past":"future",r=({children:e,activeIndex:i,variant:l="default",cardPadding:o,className:f})=>{const m=s.Children.toArray(e),u=m.flatMap((t,n)=>d(t)?[n]:[]),T=u.length,y=new Map(u.map((t,n)=>[t,n])),q=m.map((t,n)=>{if(!d(t))return t;const c=y.get(n)??0;return s.cloneElement(t,{state:I(c,i),isLast:c===T-1})}),g=l==="card"&&o!==void 0?{"--tedi-timeline-card-padding":`${o}rem`}:void 0;return j.jsx("div",{className:v.default(a.default["tedi-timeline"],{[a.default["tedi-timeline--card"]]:l==="card"},f),style:g,children:q})};r.displayName="Timeline";r.Item=p.TimelineItem;r.Title=E.TimelineTitle;r.Description=D.TimelineDescription;exports.Timeline=r;
@@ -1,38 +1,35 @@
1
- import { jsx as y } from "react/jsx-runtime";
2
- import E from "../../../../../external/classnames/index.es.js";
3
- import { Children as l, cloneElement as N, isValidElement as v } from "react";
4
- import { TimelineDescription as C } from "./components/timeline-description/timeline-description.es.js";
5
- import { TimelineItem as a } from "./components/timeline-item/timeline-item.es.js";
6
- import { TimelineTitle as D } from "./components/timeline-title/timeline-title.es.js";
1
+ import { jsx as N } from "react/jsx-runtime";
2
+ import g from "../../../../../external/classnames/index.es.js";
3
+ import { Children as v, cloneElement as A, isValidElement as C } from "react";
4
+ import { TimelineDescription as D } from "./components/timeline-description/timeline-description.es.js";
5
+ import { TimelineItem as f } from "./components/timeline-item/timeline-item.es.js";
6
+ import { TimelineTitle as M } from "./components/timeline-title/timeline-title.es.js";
7
7
  import p from "./timeline.module.scss.es.js";
8
- const f = (e) => v(e) && e.type === a, I = (e, t) => t === void 0 ? "future" : e === t ? "current" : e < t ? "past" : "future", i = ({
9
- children: e,
10
- activeIndex: t,
8
+ const c = (t) => C(t) && t.type === f, h = (t, i) => i === void 0 ? "future" : t === i ? "current" : t < i ? "past" : "future", o = ({
9
+ children: t,
10
+ activeIndex: i,
11
11
  variant: m = "default",
12
- cardPadding: o,
12
+ cardPadding: n,
13
13
  className: u
14
14
  }) => {
15
- const c = l.toArray(e).filter(f).length;
16
- let n = -1;
17
- const d = l.map(e, (r) => {
18
- if (!f(r)) return r;
19
- n += 1;
20
- const s = n;
21
- return N(r, { state: I(s, t), isLast: s === c - 1 });
22
- }), T = m === "card" && o !== void 0 ? { "--tedi-timeline-card-padding": `${o}rem` } : void 0;
23
- return /* @__PURE__ */ y(
15
+ const s = v.toArray(t), l = s.flatMap((e, r) => c(e) ? [r] : []), d = l.length, y = new Map(l.map((e, r) => [e, r])), T = s.map((e, r) => {
16
+ if (!c(e)) return e;
17
+ const a = y.get(r) ?? 0;
18
+ return A(e, { state: h(a, i), isLast: a === d - 1 });
19
+ }), E = m === "card" && n !== void 0 ? { "--tedi-timeline-card-padding": `${n}rem` } : void 0;
20
+ return /* @__PURE__ */ N(
24
21
  "div",
25
22
  {
26
- className: E(p["tedi-timeline"], { [p["tedi-timeline--card"]]: m === "card" }, u),
27
- style: T,
28
- children: d
23
+ className: g(p["tedi-timeline"], { [p["tedi-timeline--card"]]: m === "card" }, u),
24
+ style: E,
25
+ children: T
29
26
  }
30
27
  );
31
28
  };
32
- i.displayName = "Timeline";
33
- i.Item = a;
34
- i.Title = D;
35
- i.Description = C;
29
+ o.displayName = "Timeline";
30
+ o.Item = f;
31
+ o.Title = M;
32
+ o.Description = D;
36
33
  export {
37
- i as Timeline
34
+ o as Timeline
38
35
  };
@@ -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.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Q=require("react/jsx-runtime"),t=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),n=require("react"),X=require("./overlay-content.cjs.js"),Y=require("./overlay-trigger.cjs.js"),Z=require("../../../helpers/hooks/use-is-touch-device.cjs.js"),$=require("../../../helpers/hooks/use-is-mounted.cjs.js"),S=require("../../../../../external/@floating-ui/dom/dist/floating-ui.dom.cjs.js"),i=require("../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js"),D=3,E=n.createContext({open:!1,onOpenChange:()=>{},isMounted:!1,openWith:"hover",reference:()=>{},floating:()=>{},focusManager:{},arrowRef:{current:null},x:0,y:0,strategy:"absolute",getReferenceProps:()=>({}),getFloatingProps:()=>({}),arrow:{width:0,height:0,x:0,y:0,centerOffset:0},placement:"top",context:{},scrollLock:void 0,contentId:""}),u=H=>{const L=Z.useIsTouchDevice(),{children:W,placement:A="top",openWith:s=L?"click":"hover",defaultOpen:G=!1,open:a,onToggle:r,role:d="tooltip",ariaHidden:f=!1,arrowDimensions:e,offset:V=D+((e==null?void 0:e.height)??0),arrowPadding:z=4,focusManager:g,dismissible:O,scrollLock:M,trackReferencePosition:B=!1}=H,{order:m=["reference","content"],initialFocus:x,modal:p,...C}=g??{},F=x!==void 0?x:p?0:void 0,[P,R]=n.useState(G),h=n.useRef(null),b=$.useIsMounted(),v=n.useMemo(()=>r&&typeof a<"u"?a:P,[r,a,P]),y=n.useCallback(l=>{typeof a>"u"&&R(l),r==null||r(l)},[a,R,r]),{x:q,y:I,refs:c,strategy:w,context:o,middlewareData:k,placement:T}=t.useFloating({placement:A,open:v,onOpenChange:y,middleware:[i.offset(V),i.flip(),i.shift({padding:8}),i.arrow({element:h,padding:z})],whileElementsMounted:B?(l,K,N)=>S.autoUpdate(l,K,N,{animationFrame:!0}):S.autoUpdate}),{getReferenceProps:U,getFloatingProps:_}=t.useInteractions([t.useHover(o,{enabled:s==="hover",handleClose:t.safePolygon()}),t.useClick(o,{toggle:O}),t.useFocus(o,{enabled:s==="hover"}),t.useRole(o,{role:d,enabled:!f}),t.useDismiss(o,{enabled:O,outsidePressEvent:s==="click"?"mousedown":"pointerdown"})]),j=n.useId(),J=n.useMemo(()=>({open:v,onOpenChange:y,isMounted:b,openWith:s,focusManager:g?{order:m,modal:p,initialFocus:F,...C}:void 0,reference:c.setReference,floating:c.setFloating,arrowRef:h,x:q,y:I,strategy:w,getReferenceProps:U,getFloatingProps:_,arrow:{width:e==null?void 0:e.width,height:e==null?void 0:e.height,...k.arrow},context:o,placement:T,scrollLock:M,role:d,ariaHidden:f,contentId:j}),[v,y,b,s,g,c.setReference,c.setFloating,h,q,I,w,U,_,e==null?void 0:e.width,e==null?void 0:e.height,k.arrow,o,T,M,d,f,j,p,m,F,C]);return Q.jsx(E.Provider,{value:J,children:W})};u.Trigger=Y.OverlayTrigger;u.Content=X.OverlayContent;exports.Overlay=u;exports.OverlayContext=E;exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Q=require("react/jsx-runtime"),t=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),n=require("react"),X=require("./overlay-content.cjs.js"),Y=require("./overlay-trigger.cjs.js"),Z=require("../../../helpers/hooks/use-is-touch-device.cjs.js"),$=require("../../../helpers/hooks/use-is-mounted.cjs.js"),S=require("../../../../../external/@floating-ui/dom/dist/floating-ui.dom.cjs.js"),i=require("../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js"),D=3,E=n.createContext({open:!1,onOpenChange:()=>{},isMounted:!1,openWith:"hover",reference:()=>{},floating:()=>{},focusManager:{},arrowRef:{current:null},x:0,y:0,strategy:"absolute",getReferenceProps:()=>({}),getFloatingProps:()=>({}),arrow:{width:0,height:0,x:0,y:0,centerOffset:0},placement:"top",context:{},scrollLock:void 0,contentId:""}),u=H=>{const L=Z.useIsTouchDevice(),{children:W,placement:A="top",openWith:r=L?"click":"hover",defaultOpen:G=!1,open:a,onToggle:s,role:d="tooltip",ariaHidden:f=!1,arrowDimensions:e,offset:V=D+((e==null?void 0:e.height)??0),arrowPadding:z=4,focusManager:g,dismissible:O,scrollLock:M,trackReferencePosition:B=!1}=H,{order:m=["reference","content"],initialFocus:x,modal:p,...C}=g??{},F=x!==void 0?x:p?0:void 0,[P,R]=n.useState(G),h=n.useRef(null),b=$.useIsMounted(),v=n.useMemo(()=>s&&typeof a<"u"?a:P,[s,a,P]),y=n.useCallback(l=>{typeof a>"u"&&R(l),s==null||s(l)},[a,R,s]),{x:q,y:I,refs:c,strategy:k,context:o,middlewareData:w,placement:T}=t.useFloating({placement:A,open:v,onOpenChange:y,middleware:[i.offset(V),i.flip(),i.shift({padding:8}),i.arrow({element:h,padding:z})],whileElementsMounted:B?(l,K,N)=>S.autoUpdate(l,K,N,{animationFrame:!0}):S.autoUpdate}),{getReferenceProps:U,getFloatingProps:_}=t.useInteractions([t.useHover(o,{enabled:r==="hover",handleClose:t.safePolygon()}),t.useClick(o,{enabled:r==="click",toggle:O}),t.useFocus(o,{enabled:r==="hover"}),t.useRole(o,{role:d,enabled:!f}),t.useDismiss(o,{enabled:O,outsidePressEvent:r==="click"?"mousedown":"pointerdown"})]),j=n.useId(),J=n.useMemo(()=>({open:v,onOpenChange:y,isMounted:b,openWith:r,focusManager:g?{order:m,modal:p,initialFocus:F,...C}:void 0,reference:c.setReference,floating:c.setFloating,arrowRef:h,x:q,y:I,strategy:k,getReferenceProps:U,getFloatingProps:_,arrow:{width:e==null?void 0:e.width,height:e==null?void 0:e.height,...w.arrow},context:o,placement:T,scrollLock:M,role:d,ariaHidden:f,contentId:j}),[v,y,b,r,g,c.setReference,c.setFloating,h,q,I,k,U,_,e==null?void 0:e.width,e==null?void 0:e.height,w.arrow,o,T,M,d,f,j,p,m,F,C]);return Q.jsx(E.Provider,{value:J,children:W})};u.Trigger=Y.OverlayTrigger;u.Content=X.OverlayContent;exports.Overlay=u;exports.OverlayContext=E;exports.default=u;