@equinor/stratus-ui 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -13,12 +13,12 @@ import F from "@tiptap/extension-table-cell";
13
13
  import I from "@tiptap/extension-table-header";
14
14
  import L from "@tiptap/extension-table-row";
15
15
  import R from "@tiptap/extension-text-align";
16
- import { TextStyle as ee } from "@tiptap/extension-text-style";
17
- import { Extension as z, Node as B, callOrReturn as te, createStyleTag as ne, escapeForRegEx as re, getExtensionField as ie, isNodeEmpty as ae, isNodeSelection as oe, mergeAttributes as V } from "@tiptap/core";
16
+ import { TextStyle as z } from "@tiptap/extension-text-style";
17
+ import { Extension as B, Node as V, callOrReturn as ee, createStyleTag as te, escapeForRegEx as ne, getExtensionField as re, isNodeEmpty as ie, isNodeSelection as ae, mergeAttributes as oe } from "@tiptap/core";
18
18
  import { EditorContent as H, ReactRenderer as se, useEditor as ce } from "@tiptap/react";
19
19
  import le from "@tiptap/starter-kit";
20
20
  import { createPopper as ue } from "@popperjs/core";
21
- import { addDays as de, addMonths as fe, addSeconds as pe, addYears as me, differenceInMilliseconds as he, eachDayOfInterval as ge, eachMonthOfInterval as _e, eachQuarterOfInterval as ve, eachWeekOfInterval as ye, eachYearOfInterval as be, endOfDay as xe, endOfDecade as U, endOfMonth as Se, endOfWeek as Ce, endOfYear as we, format as Te, getDayOfYear as Ee, getDecade as De, getISOWeek as Oe, getQuarter as ke, isAfter as Ae, isBefore as je, isEqual as Me, isSameDay as Ne, isSameMonth as Pe, isSameQuarter as Fe, isSameWeek as Ie, isSameYear as Le, isToday as Re, isWeekend as ze, parse as Be, parseISO as Ve, startOfDay as He, startOfDecade as Ue, startOfMonth as We, startOfWeek as Ge, startOfYear as Ke, subDays as qe, subMonths as Je, subYears as Ye, toDate as Xe } from "date-fns";
21
+ import { addDays as de, addMonths as fe, addSeconds as pe, addYears as U, differenceInMilliseconds as me, eachDayOfInterval as he, eachMonthOfInterval as ge, eachQuarterOfInterval as _e, eachWeekOfInterval as ve, eachYearOfInterval as ye, endOfDay as be, endOfDecade as xe, endOfMonth as Se, endOfWeek as Ce, endOfYear as we, format as Te, getDayOfYear as Ee, getDecade as De, getISOWeek as Oe, getQuarter as ke, isAfter as Ae, isBefore as je, isEqual as Me, isSameDay as Ne, isSameMonth as Pe, isSameQuarter as Fe, isSameWeek as Ie, isSameYear as Le, isToday as Re, isWeekend as ze, parse as Be, parseISO as Ve, startOfDay as He, startOfDecade as Ue, startOfMonth as We, startOfWeek as Ge, startOfYear as Ke, subDays as qe, subMonths as Je, subYears as Ye, toDate as Xe } from "date-fns";
22
22
  //#region src/theme/palette.ts
23
23
  var W = {
24
24
  primary: {
@@ -441,31 +441,31 @@ function pt(e, t, n) {
441
441
  left: a
442
442
  };
443
443
  }
444
- var mt = o(({ children: e, className: n, content: i, placement: a = "bottom", trigger: o = ["click", "hover"], open: c, defaultOpen: u = !1, arrow: f = !0, closeOnClickOutside: g = !0, tooltipRef: y, zIndex: w = 1500, maxWidth: T = "300px", fontSize: E = "0.75rem", style: D, container: O, keepMounted: k = !1, disablePortal: A = !1, disabled: j = !1, onOpen: M, onClose: N, onClick: P, onMouseEnter: F, onMouseLeave: I, onContextMenu: L, onClickOutside: R, ...ee }, z) => {
445
- let [B, te] = v(u), ne = _(null), re = _(null), ie = _(void 0), [ae, oe] = v(null), V = c !== void 0, H = j ? !1 : V ? c : B, se = _(H);
444
+ var mt = o(({ children: e, className: n, content: i, placement: a = "bottom", trigger: o = ["click", "hover"], open: c, defaultOpen: u = !1, arrow: f = !0, closeOnClickOutside: g = !0, tooltipRef: y, zIndex: w = 1500, maxWidth: T = "300px", fontSize: E = "0.75rem", style: D, container: O, keepMounted: k = !1, disablePortal: A = !1, disabled: j = !1, onOpen: M, onClose: N, onClick: P, onMouseEnter: F, onMouseLeave: I, onContextMenu: L, onClickOutside: R, ...z }, B) => {
445
+ let [V, ee] = v(u), te = _(null), ne = _(null), re = _(void 0), [ie, ae] = v(null), oe = c !== void 0, H = j ? !1 : oe ? c : V, se = _(H);
446
446
  d(() => {
447
447
  let e = se.current;
448
- se.current = H, j && (clearTimeout(ie.current), V || te(!1), e && N?.(new MouseEvent("click", {
448
+ se.current = H, j && (clearTimeout(re.current), oe || ee(!1), e && N?.(new MouseEvent("click", {
449
449
  bubbles: !0,
450
450
  cancelable: !0
451
451
  })));
452
452
  }, [
453
453
  j,
454
454
  H,
455
- V,
455
+ oe,
456
456
  N
457
- ]), d(() => () => clearTimeout(ie.current), []);
457
+ ]), d(() => () => clearTimeout(re.current), []);
458
458
  let ce = h(() => Array.isArray(o) ? o : [o], [o]), le = {};
459
- for (let e of Object.keys(ee)) e.startsWith("data-") && (le[e] = ee[e]);
459
+ for (let e of Object.keys(z)) e.startsWith("data-") && (le[e] = z[e]);
460
460
  let ue = l((e) => {
461
- j || (V || te(!0), M?.(e));
461
+ j || (oe || ee(!0), M?.(e));
462
462
  }, [
463
463
  j,
464
- V,
464
+ oe,
465
465
  M
466
466
  ]), de = l((e) => {
467
- V || te(!1), N?.(e);
468
- }, [V, N]);
467
+ oe || ee(!1), N?.(e);
468
+ }, [oe, N]);
469
469
  p(y, () => ({
470
470
  open: (e) => {
471
471
  let t = new MouseEvent("click", {
@@ -483,12 +483,12 @@ var mt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
483
483
  }
484
484
  }));
485
485
  let fe = l(() => {
486
- if (!ne.current || !re.current) return;
487
- let e = ne.current.getBoundingClientRect(), t = re.current.getBoundingClientRect(), n = pt(e, {
486
+ if (!te.current || !ne.current) return;
487
+ let e = te.current.getBoundingClientRect(), t = ne.current.getBoundingClientRect(), n = pt(e, {
488
488
  width: t.width,
489
489
  height: t.height
490
490
  }, a);
491
- oe(n);
491
+ ae(n);
492
492
  }, [a]);
493
493
  m(() => {
494
494
  H && fe();
@@ -506,7 +506,7 @@ var mt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
506
506
  if (!H || !g || !ce.includes("click") && !ce.includes("contextMenu")) return;
507
507
  let e = (e) => {
508
508
  let t = e.target;
509
- ne.current?.contains(t) || re.current?.contains(t) || (de(e), R?.(!1, e));
509
+ te.current?.contains(t) || ne.current?.contains(t) || (de(e), R?.(!1, e));
510
510
  };
511
511
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
512
512
  }, [
@@ -518,80 +518,80 @@ var mt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
518
518
  let pe = l((e) => {
519
519
  if (!ce.includes("click")) return;
520
520
  let t = !H;
521
- V || te(t), P?.(t, e), t ? M?.(e) : N?.(e);
521
+ oe || ee(t), P?.(t, e), t ? M?.(e) : N?.(e);
522
522
  }, [
523
523
  ce,
524
524
  H,
525
- V,
525
+ oe,
526
526
  P,
527
527
  M,
528
528
  N
529
- ]), me = l((e) => {
529
+ ]), U = l((e) => {
530
530
  if (!ce.includes("contextMenu")) return;
531
531
  e.preventDefault();
532
532
  let t = !H;
533
- V || te(t), L?.(t, e), t ? M?.(e) : N?.(e);
533
+ oe || ee(t), L?.(t, e), t ? M?.(e) : N?.(e);
534
534
  }, [
535
535
  ce,
536
536
  H,
537
- V,
537
+ oe,
538
538
  L,
539
539
  M,
540
540
  N
541
- ]), he = l((e) => {
542
- ce.includes("hover") && (clearTimeout(ie.current), ue(e), F?.(!0, e));
541
+ ]), me = l((e) => {
542
+ ce.includes("hover") && (clearTimeout(re.current), ue(e), F?.(!0, e));
543
543
  }, [
544
544
  ce,
545
545
  ue,
546
546
  F
547
- ]), ge = l((e) => {
548
- ce.includes("hover") && (ie.current = setTimeout(() => de(e), 100), I?.(!1, e));
547
+ ]), he = l((e) => {
548
+ ce.includes("hover") && (re.current = setTimeout(() => de(e), 100), I?.(!1, e));
549
549
  }, [
550
550
  ce,
551
551
  de,
552
552
  I
553
- ]), _e = l(() => {
554
- ce.includes("hover") && clearTimeout(ie.current);
555
- }, [ce]), ve = l((e) => {
553
+ ]), ge = l(() => {
554
+ ce.includes("hover") && clearTimeout(re.current);
555
+ }, [ce]), _e = l((e) => {
556
556
  ce.includes("hover") && (de(e), I?.(!1, e));
557
557
  }, [
558
558
  ce,
559
559
  de,
560
560
  I
561
- ]), ye = {};
562
- j || (ce.includes("click") && (ye.onClick = pe), ce.includes("contextMenu") && (ye.onContextMenu = me), ce.includes("hover") && (ye.onMouseEnter = he, ye.onMouseLeave = ge));
563
- let be = l((e) => {
564
- ne.current = e;
565
- }, []), xe = () => typeof e == "string" ? /* @__PURE__ */ x("span", {
566
- ref: be,
567
- ...ye,
561
+ ]), ve = {};
562
+ j || (ce.includes("click") && (ve.onClick = pe), ce.includes("contextMenu") && (ve.onContextMenu = U), ce.includes("hover") && (ve.onMouseEnter = me, ve.onMouseLeave = he));
563
+ let ye = l((e) => {
564
+ te.current = e;
565
+ }, []), be = () => typeof e == "string" ? /* @__PURE__ */ x("span", {
566
+ ref: ye,
567
+ ...ve,
568
568
  className: "stratus-tooltip-anchor",
569
569
  style: j ? { cursor: "default" } : void 0,
570
570
  children: e
571
571
  }) : t.map(e, (e) => s(e) ? r(e, {
572
- ref: be,
573
- ...ye,
572
+ ref: ye,
573
+ ...ve,
574
574
  style: {
575
575
  display: e.props?.display ?? "inline-block",
576
576
  ...j ? {} : { cursor: "pointer" },
577
577
  ...e.props?.style
578
578
  }
579
- }) : e), U = dt(a), Se = Array.isArray(T) ? T[0] : T, Ce = Array.isArray(E) ? E[0] : E, we = !j && (H || k) ? /* @__PURE__ */ S("div", {
579
+ }) : e), xe = dt(a), Se = Array.isArray(T) ? T[0] : T, Ce = Array.isArray(E) ? E[0] : E, we = !j && (H || k) ? /* @__PURE__ */ S("div", {
580
580
  ref: (e) => {
581
- re.current = e, typeof z == "function" ? z(e) : z && (z.current = e);
581
+ ne.current = e, typeof B == "function" ? B(e) : B && (B.current = e);
582
582
  },
583
- className: G("stratus-tooltip", `stratus-tooltip--${U}`, n),
583
+ className: G("stratus-tooltip", `stratus-tooltip--${xe}`, n),
584
584
  role: "tooltip",
585
585
  "data-state": H ? "open" : "closed",
586
586
  style: {
587
- top: ae?.top ?? -9999,
588
- left: ae?.left ?? -9999,
587
+ top: ie?.top ?? -9999,
588
+ left: ie?.left ?? -9999,
589
589
  zIndex: typeof w == "string" ? Number(w) || 1500 : w,
590
590
  display: H ? void 0 : "none",
591
591
  ...!H && k ? { visibility: "hidden" } : {}
592
592
  },
593
- onMouseEnter: _e,
594
- onMouseLeave: ve,
593
+ onMouseEnter: ge,
594
+ onMouseLeave: _e,
595
595
  ...le,
596
596
  children: [f && /* @__PURE__ */ x("span", { className: "stratus-tooltip__arrow" }), /* @__PURE__ */ x("div", {
597
597
  className: "stratus-tooltip__content",
@@ -603,7 +603,7 @@ var mt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
603
603
  children: i
604
604
  })]
605
605
  }) : null, Te = !A && typeof document < "u" ? O ?? document.body : null;
606
- return /* @__PURE__ */ S(b, { children: [xe(), we && (Te ? C(we, Te) : we)] });
606
+ return /* @__PURE__ */ S(b, { children: [be(), we && (Te ? C(we, Te) : we)] });
607
607
  });
608
608
  mt.displayName = "Tooltip";
609
609
  //#endregion
@@ -770,11 +770,11 @@ var Ct = o(function(e, t) {
770
770
  l?.(t, e), b ? b.toggleOpen(C, e, r) : O((e) => !e);
771
771
  }, I = (e) => {
772
772
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), F(e));
773
- }, L = b?.triggersSubMenu ?? "click", R = Array.isArray(L) ? L.includes("hover") : L === "hover", ee = (e) => {
773
+ }, L = b?.triggersSubMenu ?? "click", R = Array.isArray(L) ? L.includes("hover") : L === "hover", z = (e) => {
774
774
  !R || w || k || (b ? b.toggleOpen(C, e, r) : O(!0));
775
- }, z = (e) => {
775
+ }, B = (e) => {
776
776
  !R || w || !k || (b ? b.toggleOpen(C, e, r) : O(!1));
777
- }, B = x(E ? xt : St, {});
777
+ }, V = x(E ? xt : St, {});
778
778
  return /* @__PURE__ */ S("li", {
779
779
  ref: t,
780
780
  className: G("stratus-submenu", h),
@@ -782,8 +782,8 @@ var Ct = o(function(e, t) {
782
782
  ...g,
783
783
  ...p
784
784
  },
785
- onMouseEnter: E ? void 0 : ee,
786
- onMouseLeave: E ? void 0 : z,
785
+ onMouseEnter: E ? void 0 : z,
786
+ onMouseLeave: E ? void 0 : B,
787
787
  ...y,
788
788
  children: [/* @__PURE__ */ S("div", {
789
789
  ref: j,
@@ -806,7 +806,7 @@ var Ct = o(function(e, t) {
806
806
  }),
807
807
  s && /* @__PURE__ */ x("span", {
808
808
  className: G("stratus-submenu__trigger__arrow", E && k && "stratus-submenu__trigger__arrow--open"),
809
- children: B
809
+ children: V
810
810
  })
811
811
  ]
812
812
  }), E ? /* @__PURE__ */ x("div", {
@@ -861,7 +861,7 @@ var Dt = it((e, t) => {
861
861
  F,
862
862
  g,
863
863
  _
864
- ]), ee = l((e, t, n) => {
864
+ ]), z = l((e, t, n) => {
865
865
  let r = F.includes(e), i;
866
866
  i = r ? F.filter((t) => t !== e) : [...F, e], u || N(i);
867
867
  let a = {
@@ -878,7 +878,7 @@ var Dt = it((e, t) => {
878
878
  P,
879
879
  y,
880
880
  b
881
- ]), z = {
881
+ ]), B = {
882
882
  mode: a ? "vertical" : i,
883
883
  compact: p,
884
884
  disabled: m,
@@ -890,19 +890,19 @@ var Dt = it((e, t) => {
890
890
  isSelected: I,
891
891
  isOpen: L,
892
892
  toggleSelect: R,
893
- toggleOpen: ee,
893
+ toggleOpen: z,
894
894
  onClick: h
895
- }, B = n ?? "ul", te = G("stratus-menu", `stratus-menu--${i}`, T), ne = {
895
+ }, V = n ?? "ul", ee = G("stratus-menu", `stratus-menu--${i}`, T), te = {
896
896
  ...E,
897
897
  ...C
898
898
  };
899
899
  return /* @__PURE__ */ x(Tt.Provider, {
900
- value: z,
901
- children: /* @__PURE__ */ x(B, {
900
+ value: B,
901
+ children: /* @__PURE__ */ x(V, {
902
902
  ref: t,
903
903
  role: "menu",
904
- className: te,
905
- style: ne,
904
+ className: ee,
905
+ style: te,
906
906
  ...D,
907
907
  children: r
908
908
  })
@@ -1062,27 +1062,27 @@ function Rt(e, t, n) {
1062
1062
  return r;
1063
1063
  }
1064
1064
  function zt(e, t) {
1065
- let { columns: n, data: r, rowId: i = "id", childrenId: a = "children", compact: o = !1, headerHeight: s, rowHeight: c, dynamicHeight: u = !1, sortable: f = !0, multiSort: m = !1, resizable: g = !0, expandable: y = !1, expandedRowKeys: b, defaultExpandedRowKeys: C, draggable: A = !1, selectable: j = !1, selectRowOnClick: M = !0, stripedRows: N = !1, disabled: P = !1, elevation: F = 0, noDataValue: I, extraColumnsWidth: L, className: R, rowClassName: ee, onRowClick: z, onColumnSort: B, onRowSelect: te, onDragEnd: ne, onEndReached: re, onEndReachedThreshold: ie = 50, style: ae } = e, oe = _(null), V = _(null), [H, se] = v(0);
1065
+ let { columns: n, data: r, rowId: i = "id", childrenId: a = "children", compact: o = !1, headerHeight: s, rowHeight: c, dynamicHeight: u = !1, sortable: f = !0, multiSort: m = !1, resizable: g = !0, expandable: y = !1, expandedRowKeys: b, defaultExpandedRowKeys: C, draggable: A = !1, selectable: j = !1, selectRowOnClick: M = !0, stripedRows: N = !1, disabled: P = !1, elevation: F = 0, maxHeight: I, noDataValue: L, extraColumnsWidth: R, className: z, rowClassName: B, onRowClick: V, onColumnSort: ee, onRowSelect: te, onDragEnd: ne, onEndReached: re, onEndReachedThreshold: ie = 50, style: ae } = e, oe = _(null), H = _(null), [se, ce] = v(0), [le, ue] = v(0);
1066
1066
  d(() => {
1067
1067
  let e = oe.current;
1068
1068
  if (!e) return;
1069
1069
  let t = new ResizeObserver((e) => {
1070
- for (let t of e) se(t.contentRect.width);
1070
+ for (let t of e) ce(t.contentRect.width), ue(t.contentRect.height);
1071
1071
  });
1072
1072
  return t.observe(e), () => t.disconnect();
1073
1073
  }, []);
1074
- let [ce, le] = v([]), ue = l((e) => {
1075
- P || le((t) => {
1074
+ let [de, fe] = v([]), pe = l((e) => {
1075
+ P || fe((t) => {
1076
1076
  let n = typeof e == "function" ? e(t) : e;
1077
- return B?.(It(n)), n;
1077
+ return ee?.(It(n)), n;
1078
1078
  });
1079
- }, [B, P]), [de, fe] = v(() => C ? Pt(C) : {}), pe = h(() => b === void 0 ? de : Pt(b), [b, de]), me = l((e) => {
1080
- b === void 0 && fe((t) => typeof e == "function" ? e(t) : e);
1081
- }, [b]), [he, ge] = v(() => e.defaultSelectedRowsIds ? Object.fromEntries(e.defaultSelectedRowsIds.map((e) => [e, !0])) : {}), [_e, ve] = v(null), [ye, be] = v(null), xe = l((e, t) => typeof e == "function" ? Math.max(e(H, t), 0) : typeof e == "string" ? e.endsWith("%") ? Math.max(parseFloat(e) / 100 * H, 0) : parseFloat(e) || 150 : e, [H]), U = h(() => {
1079
+ }, [ee, P]), [U, me] = v(() => C ? Pt(C) : {}), he = h(() => b === void 0 ? U : Pt(b), [b, U]), ge = l((e) => {
1080
+ b === void 0 && me((t) => typeof e == "function" ? e(t) : e);
1081
+ }, [b]), [_e, ve] = v(() => e.defaultSelectedRowsIds ? Object.fromEntries(e.defaultSelectedRowsIds.map((e) => [e, !0])) : {}), [ye, be] = v(null), [xe, Se] = v(null), Ce = l((e, t) => typeof e == "function" ? Math.max(e(se, t), 0) : typeof e == "string" ? e.endsWith("%") ? Math.max(parseFloat(e) / 100 * se, 0) : parseFloat(e) || 150 : e, [se]), we = h(() => {
1082
1082
  let e = [];
1083
1083
  if (y) {
1084
- let t = L ? L({
1085
- totalWidth: H,
1084
+ let t = R ? R({
1085
+ totalWidth: se,
1086
1086
  column: { key: "__expandable__" },
1087
1087
  defaultWidth: 48
1088
1088
  }) : 48;
@@ -1106,8 +1106,8 @@ function zt(e, t) {
1106
1106
  });
1107
1107
  }
1108
1108
  if (j) {
1109
- let t = L ? L({
1110
- totalWidth: H,
1109
+ let t = R ? R({
1110
+ totalWidth: se,
1111
1111
  column: { key: "__selectable__" },
1112
1112
  defaultWidth: 48
1113
1113
  }) : 48;
@@ -1138,8 +1138,8 @@ function zt(e, t) {
1138
1138
  });
1139
1139
  }
1140
1140
  if (A) {
1141
- let t = L ? L({
1142
- totalWidth: H,
1141
+ let t = R ? R({
1142
+ totalWidth: se,
1143
1143
  column: { key: "__draggable__" },
1144
1144
  defaultWidth: 48
1145
1145
  }) : 48;
@@ -1159,7 +1159,7 @@ function zt(e, t) {
1159
1159
  });
1160
1160
  }
1161
1161
  return n.forEach((t, n) => {
1162
- let r = t.key ?? t.dataKey, i = H > 0 ? xe(t.width, t) : 150, a = t.sortable === void 0 ? f : t.sortable, o = t.resizable === void 0 ? g : t.resizable, s;
1162
+ let r = t.key ?? t.dataKey, i = se > 0 ? Ce(t.width, t) : 150, a = t.sortable === void 0 ? f : t.sortable, o = t.resizable === void 0 ? g : t.resizable, s;
1163
1163
  if (typeof t.sortType == "function") {
1164
1164
  let e = t.sortType, n = t.dataKey;
1165
1165
  s = (r, i) => e(r.original, i.original, n, t);
@@ -1197,31 +1197,31 @@ function zt(e, t) {
1197
1197
  }), e;
1198
1198
  }, [
1199
1199
  n,
1200
- H,
1200
+ se,
1201
1201
  y,
1202
1202
  j,
1203
1203
  A,
1204
1204
  f,
1205
1205
  g,
1206
- L,
1207
- xe,
1206
+ R,
1207
+ Ce,
1208
1208
  te
1209
- ]), Se = l((e) => String(e[i]), [i]), Ce = l((e) => {
1209
+ ]), Te = l((e) => String(e[i]), [i]), Ee = l((e) => {
1210
1210
  let t = e[a];
1211
1211
  return Array.isArray(t) ? t : void 0;
1212
- }, [a]), we = O({
1212
+ }, [a]), De = O({
1213
1213
  data: r,
1214
- columns: U,
1214
+ columns: we,
1215
1215
  state: {
1216
- sorting: ce,
1217
- expanded: pe,
1218
- rowSelection: he
1216
+ sorting: de,
1217
+ expanded: he,
1218
+ rowSelection: _e
1219
1219
  },
1220
- getRowId: Se,
1221
- getSubRows: y ? Ce : void 0,
1222
- onSortingChange: ue,
1223
- onExpandedChange: me,
1224
- onRowSelectionChange: ge,
1220
+ getRowId: Te,
1221
+ getSubRows: y ? Ee : void 0,
1222
+ onSortingChange: pe,
1223
+ onExpandedChange: ge,
1224
+ onRowSelectionChange: ve,
1225
1225
  getCoreRowModel: T(),
1226
1226
  getSortedRowModel: D(),
1227
1227
  getExpandedRowModel: y ? E() : void 0,
@@ -1232,86 +1232,92 @@ function zt(e, t) {
1232
1232
  enableColumnResizing: g && !P,
1233
1233
  enableRowSelection: j,
1234
1234
  enableExpanding: y
1235
- }), Te = Array.isArray(s) ? s[0] : s, Ee = c ?? (o ? 32 : 48), De = we.getRowModel().rows, Oe = we.getHeaderGroups(), ke = we.getVisibleLeafColumns(), Ae = !r.length, je = F ? Lt[F] ?? Lt[1] : void 0, Me = k({
1236
- count: ke.length,
1237
- estimateSize: (e) => ke[e]?.getSize() ?? 150,
1238
- getScrollElement: () => V.current,
1235
+ }), Oe = Array.isArray(s) ? s[0] : s, ke = c ?? (o ? 32 : 48), Ae = De.getRowModel().rows, je = De.getHeaderGroups(), Me = De.getVisibleLeafColumns(), Ne = !r.length, Pe = F ? Lt[F] ?? Lt[1] : void 0, Fe = k({
1236
+ count: Me.length,
1237
+ estimateSize: (e) => Me[e]?.getSize() ?? 150,
1238
+ getScrollElement: () => H.current,
1239
1239
  horizontal: !0,
1240
1240
  overscan: 3,
1241
1241
  initialRect: {
1242
- width: H || 800,
1243
- height: Ee * 10
1242
+ width: se || 800,
1243
+ height: le || ke * 10
1244
1244
  }
1245
- }), Ne = k({
1246
- count: De.length,
1247
- estimateSize: () => Ee,
1248
- getScrollElement: () => V.current,
1245
+ }), Ie = k({
1246
+ count: Ae.length,
1247
+ estimateSize: () => ke,
1248
+ getScrollElement: () => H.current,
1249
1249
  measureElement: u && typeof window < "u" && window.navigator.userAgent.indexOf("Firefox") === -1 ? (e) => e?.getBoundingClientRect().height : void 0,
1250
1250
  overscan: 5,
1251
1251
  initialRect: {
1252
- width: H || 800,
1253
- height: Ee * 10
1252
+ width: se || 800,
1253
+ height: le || ke * 10
1254
1254
  }
1255
- }), Pe = Me.getVirtualItems(), Fe = Ne.getVirtualItems(), Ie = Pe.length ? Pe : Rt(ke.length, (e) => ke[e]?.getSize() ?? 150, (H || 800) + 450), Le = Fe.length ? Fe : Rt(De.length, () => Ee, Ee * 15), Re = Ie[0]?.start ?? 0, ze = Ie.length ? Math.max(Me.getTotalSize() - (Ie[Ie.length - 1]?.end ?? 0), 0) : 0;
1255
+ }), Le = Fe.getVirtualItems(), Re = Ie.getVirtualItems(), ze = Le.length ? Le : Rt(Me.length, (e) => Me[e]?.getSize() ?? 150, (se || 800) + 450), Be = Re.length ? Re : Rt(Ae.length, () => ke, ke * 15), Ve = ze[0]?.start ?? 0, He = ze.length ? Math.max(Fe.getTotalSize() - (ze[ze.length - 1]?.end ?? 0), 0) : 0;
1256
1256
  d(() => {
1257
- Me.measure();
1258
- }, [Me, ke.map((e) => e.getSize()).join("|")]), p(t, () => ({
1257
+ Fe.measure();
1258
+ }, [
1259
+ Fe,
1260
+ Me.map((e) => e.getSize()).join("|"),
1261
+ le
1262
+ ]), d(() => {
1263
+ Ie.measure();
1264
+ }, [Ie, le]), p(t, () => ({
1259
1265
  clearSortState: () => {
1260
- le([]), B?.({});
1266
+ fe([]), ee?.({});
1261
1267
  },
1262
1268
  setColumnSort: ({ columnKey: e, order: t }) => {
1263
1269
  let n = [{
1264
1270
  id: e,
1265
1271
  desc: t === "desc"
1266
1272
  }];
1267
- le(n), B?.(It(n));
1273
+ fe(n), ee?.(It(n));
1268
1274
  },
1269
1275
  setSelectedRows: (e) => {
1270
- ge(Object.fromEntries(e.map((e) => [e, !0])));
1276
+ ve(Object.fromEntries(e.map((e) => [e, !0])));
1271
1277
  },
1272
1278
  getTableRef: () => ({
1273
1279
  scrollToTop: (e) => {
1274
- V.current && (V.current.scrollTop = e);
1280
+ H.current && (H.current.scrollTop = e);
1275
1281
  },
1276
1282
  scrollToRow: (e) => {
1277
- Ne.scrollToIndex(e, { align: "start" });
1283
+ Ie.scrollToIndex(e, { align: "start" });
1278
1284
  },
1279
1285
  scrollToLeft: (e) => {
1280
- V.current && (V.current.scrollLeft = e);
1286
+ H.current && (H.current.scrollLeft = e);
1281
1287
  },
1282
1288
  getDOMNode: () => oe.current,
1283
- getExpandedState: () => ({ expandedData: (we.getExpandedRowModel?.()?.rows ?? we.getRowModel().rows).map((e) => e.original) }),
1284
- getExpandedRowKeys: () => Ft(we.getState().expanded, we.getRowModel().rows),
1289
+ getExpandedState: () => ({ expandedData: (De.getExpandedRowModel?.()?.rows ?? De.getRowModel().rows).map((e) => e.original) }),
1290
+ getExpandedRowKeys: () => Ft(De.getState().expanded, De.getRowModel().rows),
1285
1291
  setExpandedRowKeys: (e) => {
1286
- b === void 0 && fe(Pt(e));
1292
+ b === void 0 && me(Pt(e));
1287
1293
  }
1288
1294
  })
1289
1295
  }), [
1290
- we,
1291
- Ne,
1296
+ De,
1297
+ Ie,
1292
1298
  b,
1293
- B
1299
+ ee
1294
1300
  ]), d(() => {
1295
1301
  if (!re) return;
1296
- let e = V.current;
1302
+ let e = H.current;
1297
1303
  if (!e) return;
1298
1304
  let t = () => {
1299
1305
  e.scrollTop + e.clientHeight >= e.scrollHeight - ie && re();
1300
1306
  };
1301
1307
  return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
1302
1308
  }, [re, ie]);
1303
- let Be = l((e, t) => {
1304
- !A || P || (ve(e.id), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e.id));
1305
- }, [A, P]), Ve = l((e, t) => {
1306
- !A || P || (t.preventDefault(), t.dataTransfer.dropEffect = "move", be(e.id));
1307
- }, [A, P]), He = l((e, t) => {
1309
+ let Ue = l((e, t) => {
1310
+ !A || P || (be(e.id), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e.id));
1311
+ }, [A, P]), We = l((e, t) => {
1312
+ !A || P || (t.preventDefault(), t.dataTransfer.dropEffect = "move", Se(e.id));
1313
+ }, [A, P]), Ge = l((e, t) => {
1308
1314
  if (!A || P) return;
1309
1315
  t.preventDefault();
1310
- let n = t.dataTransfer.getData("text/plain") || _e;
1311
- if (ve(null), be(null), !n || n === e.id) return;
1312
- let r = De.findIndex((e) => e.id === n), i = De.findIndex((t) => t.id === e.id);
1316
+ let n = t.dataTransfer.getData("text/plain") || ye;
1317
+ if (be(null), Se(null), !n || n === e.id) return;
1318
+ let r = Ae.findIndex((e) => e.id === n), i = Ae.findIndex((t) => t.id === e.id);
1313
1319
  if (r < 0 || i < 0) return;
1314
- let a = De.map((e) => e.original), [o] = a.splice(r, 1);
1320
+ let a = Ae.map((e) => e.original), [o] = a.splice(r, 1);
1315
1321
  a.splice(i, 0, o), ne?.({
1316
1322
  oldIndex: r,
1317
1323
  newIndex: i,
@@ -1321,39 +1327,43 @@ function zt(e, t) {
1321
1327
  }, [
1322
1328
  A,
1323
1329
  P,
1324
- _e,
1325
- De,
1330
+ ye,
1331
+ Ae,
1326
1332
  ne
1327
- ]), Ue = l(() => {
1328
- ve(null), be(null);
1333
+ ]), Ke = l(() => {
1334
+ be(null), Se(null);
1329
1335
  }, []);
1330
1336
  return /* @__PURE__ */ x("div", {
1331
1337
  ref: oe,
1332
- className: G("stratus-table-root", R),
1338
+ className: G("stratus-table-root", z),
1333
1339
  style: {
1334
1340
  ...ae,
1335
- ...je ? { boxShadow: je } : {}
1341
+ ...Pe ? { boxShadow: Pe } : {}
1336
1342
  },
1337
1343
  children: /* @__PURE__ */ x("div", {
1338
- ref: V,
1344
+ ref: H,
1339
1345
  className: "stratus-table-scroll",
1346
+ style: {
1347
+ ...le > 0 ? { height: le } : {},
1348
+ ...I === void 0 ? {} : { maxHeight: I }
1349
+ },
1340
1350
  children: /* @__PURE__ */ S("table", {
1341
1351
  className: G("stratus-table", "stratus-table--virtualized", o ? "stratus-table--compact" : void 0),
1342
- style: { width: Me.getTotalSize() || "100%" },
1352
+ style: { width: Fe.getTotalSize() || "100%" },
1343
1353
  children: [
1344
- /* @__PURE__ */ x("colgroup", { children: we.getAllColumns().map((e) => /* @__PURE__ */ x("col", { style: { width: e.getSize() } }, e.id)) }),
1354
+ /* @__PURE__ */ x("colgroup", { children: De.getAllColumns().map((e) => /* @__PURE__ */ x("col", { style: { width: e.getSize() } }, e.id)) }),
1345
1355
  /* @__PURE__ */ x("thead", {
1346
1356
  className: "stratus-table__head--virtualized",
1347
- children: Oe.map((e) => /* @__PURE__ */ S("tr", {
1357
+ children: je.map((e) => /* @__PURE__ */ S("tr", {
1348
1358
  className: "stratus-table__row--virtualized",
1349
- style: Te ? { height: Te } : void 0,
1359
+ style: Oe ? { height: Oe } : void 0,
1350
1360
  children: [
1351
- Re > 0 && /* @__PURE__ */ x("th", {
1361
+ Ve > 0 && /* @__PURE__ */ x("th", {
1352
1362
  "aria-hidden": "true",
1353
1363
  className: "stratus-table__virtual-padding",
1354
- style: { width: Re }
1364
+ style: { width: Ve }
1355
1365
  }),
1356
- Ie.map((t) => {
1366
+ ze.map((t) => {
1357
1367
  let n = e.headers[t.index];
1358
1368
  if (!n) return null;
1359
1369
  let r = n.column.getCanSort(), i = n.column.getIsSorted(), a = n.column.columnDef.meta?._col;
@@ -1364,7 +1374,7 @@ function zt(e, t) {
1364
1374
  style: {
1365
1375
  display: "flex",
1366
1376
  width: n.getSize(),
1367
- ...Te ? { height: Te } : {}
1377
+ ...Oe ? { height: Oe } : {}
1368
1378
  },
1369
1379
  onClick: r && !P ? n.column.getToggleSortingHandler() : void 0,
1370
1380
  children: [
@@ -1381,59 +1391,59 @@ function zt(e, t) {
1381
1391
  ]
1382
1392
  }, n.id);
1383
1393
  }),
1384
- ze > 0 && /* @__PURE__ */ x("th", {
1394
+ He > 0 && /* @__PURE__ */ x("th", {
1385
1395
  "aria-hidden": "true",
1386
1396
  className: "stratus-table__virtual-padding",
1387
- style: { width: ze }
1397
+ style: { width: He }
1388
1398
  })
1389
1399
  ]
1390
1400
  }, e.id))
1391
1401
  }),
1392
1402
  /* @__PURE__ */ x("tbody", {
1393
1403
  className: "stratus-table__body--virtualized",
1394
- style: { height: Ae ? void 0 : Ne.getTotalSize() },
1395
- children: Ae ? /* @__PURE__ */ x("tr", {
1404
+ style: { height: Ne ? void 0 : Ie.getTotalSize() },
1405
+ children: Ne ? /* @__PURE__ */ x("tr", {
1396
1406
  className: "stratus-table__row--virtualized",
1397
1407
  children: /* @__PURE__ */ x("td", {
1398
- colSpan: Math.max(ke.length, 1),
1408
+ colSpan: Math.max(Me.length, 1),
1399
1409
  className: "stratus-table__cell--virtualized",
1400
- style: { width: Me.getTotalSize() },
1410
+ style: { width: Fe.getTotalSize() },
1401
1411
  children: /* @__PURE__ */ x("div", {
1402
1412
  className: "stratus-table__empty",
1403
- children: I
1413
+ children: L
1404
1414
  })
1405
1415
  })
1406
- }) : Le.map((e) => {
1407
- let t = De[e.index];
1416
+ }) : Be.map((e) => {
1417
+ let t = Ae[e.index];
1408
1418
  if (!t) return null;
1409
- let n = e.index, r = t.original, i = Se(r), a = "";
1410
- typeof ee == "function" ? a = ee({
1419
+ let n = e.index, r = t.original, i = Te(r), a = "";
1420
+ typeof B == "function" ? a = B({
1411
1421
  rowData: r,
1412
1422
  rowIndex: n
1413
- }) : typeof ee == "string" && (a = ee);
1414
- let o = N && n % 2 == 1, s = t.getIsSelected(), c = !!z, l = A && ye === t.id;
1423
+ }) : typeof B == "string" && (a = B);
1424
+ let o = N && n % 2 == 1, s = t.getIsSelected(), c = !!V, l = A && xe === t.id;
1415
1425
  return /* @__PURE__ */ S("tr", {
1416
1426
  "data-index": e.index,
1417
- ref: u ? Ne.measureElement : void 0,
1418
- className: G("stratus-table__row--virtualized", a || void 0, A && "stratus-table__row--draggable", _e === t.id && "stratus-table__row--dragging", l && "stratus-table__row--drag-over"),
1427
+ ref: u ? Ie.measureElement : void 0,
1428
+ className: G("stratus-table__row--virtualized", a || void 0, A && "stratus-table__row--draggable", ye === t.id && "stratus-table__row--dragging", l && "stratus-table__row--drag-over"),
1419
1429
  draggable: A && !P,
1420
1430
  "data-clickable": c || void 0,
1421
1431
  "data-selected": s || void 0,
1422
1432
  "data-striped": o || void 0,
1423
1433
  style: {
1424
1434
  transform: `translateY(${e.start}px)`,
1425
- ...u ? {} : { height: Ee }
1435
+ ...u ? {} : { height: ke }
1426
1436
  },
1427
- onDragStart: (e) => Be(t, e),
1428
- onDragOver: (e) => Ve(t, e),
1429
- onDrop: (e) => He(t, e),
1430
- onDragEnd: Ue,
1437
+ onDragStart: (e) => Ue(t, e),
1438
+ onDragOver: (e) => We(t, e),
1439
+ onDrop: (e) => Ge(t, e),
1440
+ onDragEnd: Ke,
1431
1441
  onClick: P ? void 0 : (e) => {
1432
1442
  M && j && (t.toggleSelected(), te?.({
1433
1443
  rowIndex: t.index,
1434
1444
  rowData: r,
1435
1445
  selected: !t.getIsSelected()
1436
- })), z?.({
1446
+ })), V?.({
1437
1447
  rowKey: i,
1438
1448
  rowIndex: t.index,
1439
1449
  rowData: r,
@@ -1441,12 +1451,12 @@ function zt(e, t) {
1441
1451
  });
1442
1452
  },
1443
1453
  children: [
1444
- Re > 0 && /* @__PURE__ */ x("td", {
1454
+ Ve > 0 && /* @__PURE__ */ x("td", {
1445
1455
  "aria-hidden": "true",
1446
1456
  className: "stratus-table__virtual-padding",
1447
- style: { width: Re }
1457
+ style: { width: Ve }
1448
1458
  }),
1449
- Ie.map((e) => {
1459
+ ze.map((e) => {
1450
1460
  let i = t.getVisibleCells()[e.index];
1451
1461
  if (!i) return null;
1452
1462
  let a = i.column.columnDef.meta?._col, o = "";
@@ -1460,10 +1470,10 @@ function zt(e, t) {
1460
1470
  children: w(i.column.columnDef.cell, i.getContext())
1461
1471
  }, i.id);
1462
1472
  }),
1463
- ze > 0 && /* @__PURE__ */ x("td", {
1473
+ He > 0 && /* @__PURE__ */ x("td", {
1464
1474
  "aria-hidden": "true",
1465
1475
  className: "stratus-table__virtual-padding",
1466
- style: { width: ze }
1476
+ style: { width: He }
1467
1477
  })
1468
1478
  ]
1469
1479
  }, t.id);
@@ -1562,11 +1572,11 @@ var Yt = J({
1562
1572
  });
1563
1573
  //#endregion
1564
1574
  //#region src/components/Accordion/AccordionHeader.tsx
1565
- function Xt({ id: e, header: t, headerLevel: n, headerItems: r, isExpanded: i, disabled: a, expandIconPosition: o, expandIcon: s, onToggle: c }) {
1566
- let l = s ?? x(i ? Yt : yt, { size: 16 });
1575
+ function Xt({ id: e, header: t, headerLevel: n, headerItems: r, isExpanded: i, disabled: a, expandIconPosition: o, expandIcon: s, onToggle: c, headerClassName: l, chevronClassName: u, titleClassName: d }) {
1576
+ let f = s ?? x(i ? Yt : yt, { size: 16 });
1567
1577
  return /* @__PURE__ */ S("div", {
1568
1578
  id: e,
1569
- className: "stratus-accordion__header",
1579
+ className: G("stratus-accordion__header", l),
1570
1580
  role: "button",
1571
1581
  tabIndex: a ? void 0 : 0,
1572
1582
  "aria-expanded": i,
@@ -1577,19 +1587,19 @@ function Xt({ id: e, header: t, headerLevel: n, headerItems: r, isExpanded: i, d
1577
1587
  },
1578
1588
  children: [
1579
1589
  o === "left" && /* @__PURE__ */ x("span", {
1580
- className: "stratus-accordion__chevron stratus-accordion__chevron--left",
1581
- children: l
1590
+ className: G("stratus-accordion__chevron stratus-accordion__chevron--left", u),
1591
+ children: f
1582
1592
  }),
1583
1593
  /* @__PURE__ */ S("div", {
1584
1594
  className: "stratus-accordion__header-content",
1585
1595
  children: [/* @__PURE__ */ x(n, {
1586
- className: G("stratus-accordion__title", i && "stratus-accordion__title--expanded"),
1596
+ className: G("stratus-accordion__title", i && "stratus-accordion__title--expanded", d),
1587
1597
  children: t
1588
1598
  }), r]
1589
1599
  }),
1590
1600
  o === "right" && /* @__PURE__ */ x("span", {
1591
- className: "stratus-accordion__chevron stratus-accordion__chevron--right",
1592
- children: l
1601
+ className: G("stratus-accordion__chevron stratus-accordion__chevron--right", u),
1602
+ children: f
1593
1603
  })
1594
1604
  ]
1595
1605
  });
@@ -1597,19 +1607,19 @@ function Xt({ id: e, header: t, headerLevel: n, headerItems: r, isExpanded: i, d
1597
1607
  //#endregion
1598
1608
  //#region src/components/Accordion/Accordion.tsx
1599
1609
  var Zt = o(function(e, t) {
1600
- let { cssProps: n, otherProps: r } = K(e), { className: i, children: a, style: o, header: s, headerLevel: c = "h2", headerItems: l, defaultExpanded: u, expanded: p, expandIconPosition: m = "left", expandIcon: h, disabled: g = !1, elevation: y = !1, square: b = !0, onChange: C, ...w } = r, T = f(), E = typeof p == "boolean", D = _(!0), [O, k] = v(p ?? u ?? !1), A = !g && (E ? p : O), j = a != null, M = _(A), [N, P] = v(!1);
1610
+ let { cssProps: n, otherProps: r } = K(e), { className: i, children: a, style: o, header: s, headerLevel: c = "h2", headerItems: l, defaultExpanded: u, expanded: p, expandIconPosition: m = "left", expandIcon: h, disabled: g = !1, elevation: y = !1, square: b = !0, onChange: C, headerClassName: w, chevronClassName: T, titleClassName: E, collapseClassName: D, panelClassName: O, panelInnerClassName: k, ...A } = r, j = f(), M = typeof p == "boolean", N = _(!0), [P, F] = v(p ?? u ?? !1), I = !g && (M ? p : P), L = a != null, R = _(I), [z, B] = v(!1);
1601
1611
  d(() => {
1602
- if (D.current) {
1603
- D.current = !1, M.current = A;
1612
+ if (N.current) {
1613
+ N.current = !1, R.current = I;
1604
1614
  return;
1605
1615
  }
1606
- let e = M.current;
1607
- A ? P(!1) : e && j && P(!0), M.current = A;
1608
- }, [j, A]);
1609
- let F = (e) => {
1616
+ let e = R.current;
1617
+ I ? B(!1) : e && L && B(!0), R.current = I;
1618
+ }, [L, I]);
1619
+ let V = (e) => {
1610
1620
  if (g) return;
1611
- let t = E ? !p : !O;
1612
- !t && j && P(!0), E || k(t), C?.(t, e);
1621
+ let t = M ? !p : !P;
1622
+ !t && L && B(!0), M || F(t), C?.(t, e);
1613
1623
  };
1614
1624
  return /* @__PURE__ */ S("div", {
1615
1625
  ref: t,
@@ -1618,31 +1628,34 @@ var Zt = o(function(e, t) {
1618
1628
  ...o,
1619
1629
  ...n
1620
1630
  },
1621
- ...w,
1631
+ ...A,
1622
1632
  children: [
1623
1633
  /* @__PURE__ */ x(Xt, {
1624
- id: T,
1634
+ id: j,
1625
1635
  header: s,
1626
1636
  headerLevel: c,
1627
1637
  headerItems: l,
1628
- isExpanded: !!A,
1638
+ isExpanded: !!I,
1629
1639
  disabled: g,
1630
1640
  expandIconPosition: m,
1631
1641
  expandIcon: h,
1632
- onToggle: F
1642
+ onToggle: V,
1643
+ headerClassName: w,
1644
+ chevronClassName: T,
1645
+ titleClassName: E
1633
1646
  }),
1634
- (A || N) && j && /* @__PURE__ */ x("div", { className: "stratus-accordion__divider" }),
1647
+ (I || z) && L && /* @__PURE__ */ x("div", { className: "stratus-accordion__divider" }),
1635
1648
  /* @__PURE__ */ x("div", {
1636
- className: G("stratus-accordion__collapse", A && "stratus-accordion__collapse--expanded"),
1649
+ className: G("stratus-accordion__collapse", I && "stratus-accordion__collapse--expanded", D),
1637
1650
  onTransitionEnd: (e) => {
1638
- e.propertyName === "grid-template-rows" && !A && P(!1);
1651
+ e.propertyName === "grid-template-rows" && !I && B(!1);
1639
1652
  },
1640
1653
  children: /* @__PURE__ */ x("div", {
1641
- className: "stratus-accordion__panel",
1654
+ className: G("stratus-accordion__panel", O),
1642
1655
  role: "region",
1643
- "aria-labelledby": T,
1656
+ "aria-labelledby": j,
1644
1657
  children: /* @__PURE__ */ x("div", {
1645
- className: "stratus-accordion__panel-inner",
1658
+ className: G("stratus-accordion__panel-inner", k),
1646
1659
  children: a
1647
1660
  })
1648
1661
  })
@@ -2070,15 +2083,15 @@ function jn({ header: e, headerId: t, hasStringHeader: n, closable: r, fullScree
2070
2083
  //#endregion
2071
2084
  //#region src/components/Drawer/Drawer.tsx
2072
2085
  var Mn = o(function(e, t) {
2073
- let { open: n = !1, variant: r = "temporary", placement: i = "left", smallScreenSize: a = 425, header: o, closable: s = !1, fullScreen: c = !1, initialFullScreen: u = !1, keepMounted: p = !1, transitionDuration: m = 225, hideBackdrop: h = !1, disablePortal: g = !1, children: y, onClose: w, width: T = 240, ...E } = e, { cssProps: D, otherProps: O } = K(E), { className: k, style: A, ...j } = O, M = un(), N = r === "responsive" ? M < a ? "temporary" : "permanent" : r, P = N === "temporary", F = N === "persistent", I = N === "permanent", [L, R] = v(u), ee = l(() => R((e) => !e), []), [z, B] = v(n), [te, ne] = v(!1);
2086
+ let { open: n = !1, variant: r = "temporary", placement: i = "left", smallScreenSize: a = 425, header: o, closable: s = !1, fullScreen: c = !1, initialFullScreen: u = !1, keepMounted: p = !1, transitionDuration: m = 225, hideBackdrop: h = !1, disablePortal: g = !1, children: y, onClose: w, width: T = 240, ...E } = e, { cssProps: D, otherProps: O } = K(E), { className: k, style: A, ...j } = O, M = un(), N = r === "responsive" ? M < a ? "temporary" : "permanent" : r, P = N === "temporary", F = N === "persistent", I = N === "permanent", [L, R] = v(u), z = l(() => R((e) => !e), []), [B, V] = v(n), [ee, te] = v(!1);
2074
2087
  d(() => {
2075
- if (n) B(!0), requestAnimationFrame(() => {
2076
- requestAnimationFrame(() => ne(!0));
2088
+ if (n) V(!0), requestAnimationFrame(() => {
2089
+ requestAnimationFrame(() => te(!0));
2077
2090
  });
2078
2091
  else {
2079
- ne(!1);
2092
+ te(!1);
2080
2093
  let e = setTimeout(() => {
2081
- p || B(!1);
2094
+ p || V(!1);
2082
2095
  }, P || F ? m : 0);
2083
2096
  return () => clearTimeout(e);
2084
2097
  }
@@ -2089,7 +2102,7 @@ var Mn = o(function(e, t) {
2089
2102
  P,
2090
2103
  F
2091
2104
  ]);
2092
- let re = _(null);
2105
+ let ne = _(null);
2093
2106
  d(() => {
2094
2107
  if (!n || !P) return;
2095
2108
  let e = (e) => {
@@ -2100,33 +2113,33 @@ var Mn = o(function(e, t) {
2100
2113
  n,
2101
2114
  P,
2102
2115
  w
2103
- ]), On(re, n && P), Tn(n && P);
2104
- let ie = f(), ae = typeof o == "string" || typeof o == "number", oe = Array.isArray(T) ? (M < a ? T[0] : T[1]) ?? T[0] : T, V = typeof oe == "number" ? `${oe}px` : oe, H = i === "left" || i === "right", se = {
2116
+ ]), On(ne, n && P), Tn(n && P);
2117
+ let re = f(), ie = typeof o == "string" || typeof o == "number", ae = Array.isArray(T) ? (M < a ? T[0] : T[1]) ?? T[0] : T, oe = typeof ae == "number" ? `${ae}px` : ae, H = i === "left" || i === "right", se = {
2105
2118
  "--stratus-drawer-duration": `${m}ms`,
2106
- ...H ? { width: L ? "100%" : V } : {},
2119
+ ...H ? { width: L ? "100%" : oe } : {},
2107
2120
  ...A,
2108
2121
  ...D
2109
2122
  };
2110
- if (!(I || z || p)) return null;
2123
+ if (!(I || B || p)) return null;
2111
2124
  let ce = o != null || s || c ? /* @__PURE__ */ x(jn, {
2112
2125
  header: o,
2113
- headerId: ie,
2114
- hasStringHeader: ae,
2126
+ headerId: re,
2127
+ hasStringHeader: ie,
2115
2128
  closable: s,
2116
2129
  fullScreen: c,
2117
2130
  isFullscreen: L,
2118
2131
  isTemporary: P,
2119
- onToggleFullscreen: ee,
2132
+ onToggleFullscreen: z,
2120
2133
  onClose: w
2121
2134
  }) : null, le = /* @__PURE__ */ S("div", {
2122
2135
  ref: (e) => {
2123
- re.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
2136
+ ne.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
2124
2137
  },
2125
2138
  role: P ? "dialog" : void 0,
2126
2139
  "aria-modal": P && n ? !0 : void 0,
2127
- "aria-labelledby": P && ae ? ie : void 0,
2140
+ "aria-labelledby": P && ie ? re : void 0,
2128
2141
  tabIndex: P ? -1 : void 0,
2129
- className: G("stratus-drawer", `stratus-drawer--${N}`, `stratus-drawer--${i}`, te && n || I ? "stratus-drawer--open" : "stratus-drawer--closed", L && "stratus-drawer--fullscreen", k),
2142
+ className: G("stratus-drawer", `stratus-drawer--${N}`, `stratus-drawer--${i}`, ee && n || I ? "stratus-drawer--open" : "stratus-drawer--closed", L && "stratus-drawer--fullscreen", k),
2130
2143
  style: se,
2131
2144
  ...j,
2132
2145
  children: [ce, y]
@@ -2136,7 +2149,7 @@ var Mn = o(function(e, t) {
2136
2149
  children: le
2137
2150
  });
2138
2151
  let ue = /* @__PURE__ */ S(b, { children: [!h && /* @__PURE__ */ x("div", {
2139
- className: G("stratus-drawer-backdrop", te && n && "stratus-drawer-backdrop--open"),
2152
+ className: G("stratus-drawer-backdrop", ee && n && "stratus-drawer-backdrop--open"),
2140
2153
  style: { "--stratus-drawer-duration": `${m}ms` },
2141
2154
  onClick: (e) => w?.(e),
2142
2155
  "aria-hidden": !0
@@ -2250,11 +2263,11 @@ var Fn = o(function(e, t) {
2250
2263
  style: { animationDuration: `${o}ms` }
2251
2264
  })
2252
2265
  })]
2253
- }), ee = /* @__PURE__ */ x("div", {
2266
+ }), z = /* @__PURE__ */ x("div", {
2254
2267
  className: G("stratus-notification-container", `stratus-notification-container--${u}`),
2255
2268
  children: R
2256
2269
  });
2257
- return f ? ee : C(ee, document.body);
2270
+ return f ? z : C(z, document.body);
2258
2271
  }), In = 0, Ln = /* @__PURE__ */ new Map();
2259
2272
  function Rn() {
2260
2273
  let e = document.getElementById("stratus-notifications");
@@ -2368,17 +2381,20 @@ var Gn = o(function(e, t) {
2368
2381
  ]), Tn(n);
2369
2382
  let R = _(null);
2370
2383
  On(R, n);
2371
- let ee = f(), z = typeof a == "string" || typeof a == "number", B = (e) => {
2384
+ let z = f(), B = typeof a == "string" || typeof a == "number", V = (e) => {
2372
2385
  e.target === e.currentTarget && (h?.onClick?.(e), D && g?.(e));
2373
2386
  };
2374
2387
  if (!(P || u)) return null;
2375
- let te = a != null || r, ne = o != null || typeof y == "function" || typeof w == "function", re = {
2388
+ let ee = a != null || r, te = o != null || typeof y == "function" || typeof w == "function", ne = {
2376
2389
  ...M,
2377
2390
  ...k
2378
- }, ie = /* @__PURE__ */ x("div", {
2391
+ }, re = /* @__PURE__ */ x("div", {
2379
2392
  className: G("stratus-modal-backdrop", I && n && "stratus-modal-backdrop--open", O && "stratus-modal-backdrop--invisible"),
2380
- style: m == null ? void 0 : { "--stratus-modal-z": Number(m) },
2381
- onClick: B,
2393
+ style: m != null || h?.style ? {
2394
+ ...m != null && { "--stratus-modal-z": Number(m) },
2395
+ ...h?.style
2396
+ } : void 0,
2397
+ onClick: V,
2382
2398
  "aria-hidden": !n,
2383
2399
  children: /* @__PURE__ */ x("div", {
2384
2400
  ref: (e) => {
@@ -2386,18 +2402,18 @@ var Gn = o(function(e, t) {
2386
2402
  },
2387
2403
  role: "dialog",
2388
2404
  "aria-modal": !0,
2389
- "aria-labelledby": z ? ee : void 0,
2405
+ "aria-labelledby": B ? z : void 0,
2390
2406
  tabIndex: -1,
2391
2407
  className: G("stratus-modal", l && "stratus-modal--fullscreen", j),
2392
- style: re,
2408
+ style: ne,
2393
2409
  ...N,
2394
2410
  children: /* @__PURE__ */ S("div", {
2395
2411
  className: "stratus-modal__container",
2396
2412
  children: [
2397
- te && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
2413
+ ee && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
2398
2414
  className: "stratus-modal__header",
2399
2415
  children: [a != null && /* @__PURE__ */ x("span", {
2400
- id: z ? ee : void 0,
2416
+ id: B ? z : void 0,
2401
2417
  className: "stratus-modal__header-title",
2402
2418
  children: a
2403
2419
  }), r && /* @__PURE__ */ x(q, {
@@ -2415,7 +2431,7 @@ var Gn = o(function(e, t) {
2415
2431
  children: T
2416
2432
  })
2417
2433
  }),
2418
- ne && /* @__PURE__ */ x(Un, {
2434
+ te && /* @__PURE__ */ x(Un, {
2419
2435
  footer: o,
2420
2436
  okText: s,
2421
2437
  cancelText: c,
@@ -2426,7 +2442,7 @@ var Gn = o(function(e, t) {
2426
2442
  })
2427
2443
  })
2428
2444
  });
2429
- return p ? ie : C(ie, document.body);
2445
+ return p ? re : C(re, document.body);
2430
2446
  });
2431
2447
  Gn.displayName = "Modal";
2432
2448
  //#endregion
@@ -2575,24 +2591,24 @@ function Zn({ label: e, meta: t, htmlFor: n }) {
2575
2591
  //#endregion
2576
2592
  //#region src/components/Input/Input.tsx
2577
2593
  var Qn = o(function(e, t) {
2578
- let { children: n, className: r, style: i, inputRef: a, inputProps: o = {}, type: s = "text", variant: c = "default", label: u, meta: d, helperText: p, helperIcon: m, value: h, defaultValue: g, placeholder: y, startAdornment: b, endAdornment: C, outlineWidth: w, multiple: T = !1, compact: E = !1, fullWidth: D = !1, forceFocus: O = !1, disabled: k = !1, onChange: A, onFocus: j, onBlur: M, ...N } = e, { cssProps: P, otherProps: F } = K(N), I = f(), L = o.id ?? I, [R, ee] = v(g ?? ""), z = h !== void 0, B = z ? h : R, te = _(null), ne = l((e) => {
2579
- te.current = e, a && (a.current = e);
2580
- }, [a]), re = (e) => {
2594
+ let { children: n, className: r, style: i, inputRef: a, inputProps: o = {}, type: s = "text", variant: c = "default", label: u, meta: d, helperText: p, helperIcon: m, value: h, defaultValue: g, placeholder: y, startAdornment: b, endAdornment: C, outlineWidth: w, multiple: T = !1, compact: E = !1, fullWidth: D = !1, forceFocus: O = !1, disabled: k = !1, onChange: A, onFocus: j, onBlur: M, ...N } = e, { cssProps: P, otherProps: F } = K(N), I = f(), L = o.id ?? I, [R, z] = v(g ?? ""), B = h !== void 0, V = B ? h : R, ee = _(null), te = l((e) => {
2595
+ ee.current = e, a && (a.current = e);
2596
+ }, [a]), ne = (e) => {
2581
2597
  let t = e.target.value;
2582
- z || ee(t), A?.(t, e);
2598
+ B || z(t), A?.(t, e);
2599
+ }, re = (e) => {
2600
+ j?.(String(V), e);
2583
2601
  }, ie = (e) => {
2584
- j?.(String(B), e);
2585
- }, ae = (e) => {
2586
- M?.(String(B), e);
2587
- }, oe = G("stratus-input", `stratus-input--${c}`, E && "stratus-input--compact", D && "stratus-input--full-width", k && "stratus-input--disabled", O && "stratus-input--force-focus", r), V = {
2602
+ M?.(String(V), e);
2603
+ }, ae = G("stratus-input", `stratus-input--${c}`, E && "stratus-input--compact", D && "stratus-input--full-width", k && "stratus-input--disabled", O && "stratus-input--force-focus", r), oe = {
2588
2604
  ...w ? { "--stratus-input-outline-w": w } : {},
2589
2605
  ...i,
2590
2606
  ...P
2591
2607
  }, H = T ? "textarea" : "input";
2592
2608
  return /* @__PURE__ */ S("div", {
2593
2609
  ref: t,
2594
- className: oe,
2595
- style: Object.keys(V).length ? V : void 0,
2610
+ className: ae,
2611
+ style: Object.keys(oe).length ? oe : void 0,
2596
2612
  ...F,
2597
2613
  children: [
2598
2614
  /* @__PURE__ */ x(Zn, {
@@ -2609,16 +2625,16 @@ var Qn = o(function(e, t) {
2609
2625
  }),
2610
2626
  n ?? /* @__PURE__ */ x(H, {
2611
2627
  ...o,
2612
- ref: ne,
2628
+ ref: te,
2613
2629
  id: L,
2614
2630
  type: T ? void 0 : s,
2615
2631
  className: G("stratus-input__input", T && "stratus-input__input--textarea", o.className),
2616
- value: B,
2632
+ value: V,
2617
2633
  placeholder: y,
2618
2634
  disabled: k,
2619
- onChange: re,
2620
- onFocus: ie,
2621
- onBlur: ae
2635
+ onChange: ne,
2636
+ onFocus: re,
2637
+ onBlur: ie
2622
2638
  }),
2623
2639
  C && /* @__PURE__ */ x("span", {
2624
2640
  className: "stratus-input__end-adornment",
@@ -2756,21 +2772,21 @@ var rr = o(function(e, t) {
2756
2772
  w || C || e.button === 0 && I.current?.triggerAt(e.clientX, e.clientY);
2757
2773
  }, R;
2758
2774
  R = p ? g ?? /* @__PURE__ */ x(nr, { size: y }) : M ? h ?? /* @__PURE__ */ x(tr, { size: y }) : m ?? /* @__PURE__ */ x(er, { size: y });
2759
- let ee = G("stratus-checkbox", `stratus-checkbox--${f}`, b && "stratus-checkbox--compact", C && "stratus-checkbox--disabled", w && "stratus-checkbox--no-ripple", n), z = {
2775
+ let z = G("stratus-checkbox", `stratus-checkbox--${f}`, b && "stratus-checkbox--compact", C && "stratus-checkbox--disabled", w && "stratus-checkbox--no-ripple", n), B = {
2760
2776
  ...r,
2761
2777
  ...D
2762
- }, B = c ? /* @__PURE__ */ x("span", {
2778
+ }, V = c ? /* @__PURE__ */ x("span", {
2763
2779
  className: "stratus-checkbox__label",
2764
2780
  children: c
2765
2781
  }) : null;
2766
2782
  return /* @__PURE__ */ S("label", {
2767
2783
  ref: t,
2768
- className: ee,
2769
- style: Object.keys(z).length ? z : void 0,
2784
+ className: z,
2785
+ style: Object.keys(B).length ? B : void 0,
2770
2786
  onPointerDown: L,
2771
2787
  ...O,
2772
2788
  children: [
2773
- u === "left" && B,
2789
+ u === "left" && V,
2774
2790
  /* @__PURE__ */ x("input", {
2775
2791
  ...a,
2776
2792
  ref: P,
@@ -2788,7 +2804,7 @@ var rr = o(function(e, t) {
2788
2804
  disabled: w || C
2789
2805
  }), R]
2790
2806
  }),
2791
- u === "right" && B
2807
+ u === "right" && V
2792
2808
  ]
2793
2809
  });
2794
2810
  });
@@ -2913,134 +2929,152 @@ function fr({ tags: e, infield: t, selectedIds: n, allFlat: r, tagMaxCount: i, t
2913
2929
  //#endregion
2914
2930
  //#region src/components/Select/Select.tsx
2915
2931
  var pr = o(function(e, t) {
2916
- let { children: n, className: r, style: i, selectRef: a, inputRef: o, options: s = [], value: c, defaultValue: u, inputValue: m, variant: g = "default", label: y, meta: b, placeholder: C, helperText: w, helperIcon: T, startAdornment: E, endAdornment: D, allowClear: O = !0, clearLabel: k, multiple: A = !1, expandable: j = !1, infield: M = !0, tags: N = !1, tagMaxCount: P, tagMaxCountPlaceholder: F, selectedLabel: I = "Selected", filterOption: L = !0, noOptionsText: R = "No Data", hideDropdownWhenEmpty: ee = !1, persistInputText: z = !1, compact: B = !1, fullWidth: te = !1, disabled: ne = !1, onSelect: re, onDeselect: ie, onClear: ae, onChange: oe, itemGroupRenderer: V, itemRenderer: H, ...se } = e, { cssProps: ce, otherProps: le } = K(se), ue = f(), [de, fe] = v(!1), [pe, me] = v(() => cr(u)), [he, ge] = v(""), [_e, ve] = v(-1), [ye, be] = v(/* @__PURE__ */ new Set()), xe = c !== void 0, U = xe ? cr(c) : pe, Se = m === void 0 ? he : m, Ce = _(null), we = _(null), Te = _(null), Ee = l((e) => {
2917
- Ce.current = e, o && (o.current = e);
2932
+ let { children: n, className: r, style: i, selectRef: a, inputRef: o, options: s = [], value: c, defaultValue: u, inputValue: g, variant: y = "default", label: b, meta: w, placeholder: T, helperText: E, helperIcon: D, startAdornment: O, endAdornment: k, allowClear: A = !0, clearLabel: j, multiple: M = !1, expandable: N = !1, infield: P = !0, tags: F = !1, tagMaxCount: I, tagMaxCountPlaceholder: L, selectedLabel: R = "Selected", filterOption: z = !0, noOptionsText: B = "No Data", hideDropdownWhenEmpty: V = !1, persistInputText: ee = !1, compact: te = !1, fullWidth: ne = !1, disablePortal: re = !1, disabled: ie = !1, onSelect: ae, onDeselect: oe, onClear: H, onChange: se, itemGroupRenderer: ce, itemRenderer: le, ...ue } = e, { cssProps: de, otherProps: fe } = K(ue), pe = f(), [U, me] = v(!1), [he, ge] = v(() => cr(u)), [_e, ve] = v(""), [ye, be] = v(-1), [xe, Se] = v(/* @__PURE__ */ new Set()), Ce = c !== void 0, we = Ce ? cr(c) : he, Te = g === void 0 ? _e : g, Ee = _(null), De = _(null), Oe = _(null), ke = _(null), [Ae, je] = v({}), Me = l((e) => {
2933
+ Ee.current = e, o && (o.current = e);
2918
2934
  }, [o]);
2919
2935
  p(a, () => ({
2920
2936
  open: () => {
2921
- fe(!0), Ce.current?.focus();
2937
+ me(!0), Ee.current?.focus();
2922
2938
  },
2923
- close: () => fe(!1)
2939
+ close: () => me(!1)
2924
2940
  }), []), d(() => {
2925
- if (!de) return;
2941
+ if (!U) return;
2926
2942
  let e = (e) => {
2927
- we.current && !we.current.contains(e.target) && (fe(!1), ge(""));
2943
+ let t = e.target, n = De.current?.contains(t), r = ke.current?.contains(t);
2944
+ !n && !r && (me(!1), ve(""));
2928
2945
  };
2929
2946
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
2930
- }, [de]);
2931
- let De = h(() => dr(n), [n]), Oe = h(() => s.length > 0 ? s : De, [s, De]), ke = h(() => lr(Oe), [Oe]), Ae = l((e) => !L || !Se ? !0 : typeof L == "function" ? L(e, Se, U.map(String)) : e.label.toLowerCase().includes(Se.toLowerCase()), [
2932
- L,
2933
- Se,
2934
- U
2935
- ]), je = h(() => ke.filter((e) => !e.disabled && Ae(e)), [ke, Ae]);
2947
+ }, [U]), m(() => {
2948
+ if (!U || re) return;
2949
+ let e = () => {
2950
+ let e = Oe.current;
2951
+ if (!e) return;
2952
+ let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom - 2, r = t.top - 2, i = n < Math.min(256, r) && r > n, a = Math.max(0, i ? r : n);
2953
+ je({
2954
+ position: "fixed",
2955
+ left: t.left,
2956
+ width: t.width,
2957
+ maxHeight: Math.min(256, a),
2958
+ ...i ? { bottom: window.innerHeight - t.top + 2 } : { top: t.bottom + 2 }
2959
+ });
2960
+ };
2961
+ return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
2962
+ window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
2963
+ };
2964
+ }, [U, re]);
2965
+ let Ne = h(() => dr(n), [n]), Pe = h(() => s.length > 0 ? s : Ne, [s, Ne]), Fe = h(() => lr(Pe), [Pe]), Ie = l((e) => !z || !Te ? !0 : typeof z == "function" ? z(e, Te, we.map(String)) : e.label.toLowerCase().includes(Te.toLowerCase()), [
2966
+ z,
2967
+ Te,
2968
+ we
2969
+ ]), Le = h(() => Fe.filter((e) => !e.disabled && Ie(e)), [Fe, Ie]);
2936
2970
  d(() => {
2937
- if (!de) {
2938
- ve(-1);
2971
+ if (!U) {
2972
+ be(-1);
2939
2973
  return;
2940
2974
  }
2941
- let e = je.findIndex((e) => U.map(String).includes(ur(e)));
2942
- ve(e);
2943
- }, [de]), d(() => {
2944
- de && ve((e) => e > je.length - 1 ? -1 : e);
2945
- }, [je.length]), d(() => {
2946
- if (_e < 0 || !Te.current) return;
2947
- let e = je[_e];
2975
+ let e = Le.findIndex((e) => we.map(String).includes(ur(e)));
2976
+ be(e);
2977
+ }, [U]), d(() => {
2978
+ U && be((e) => e > Le.length - 1 ? -1 : e);
2979
+ }, [Le.length]), d(() => {
2980
+ if (ye < 0 || !ke.current) return;
2981
+ let e = Le[ye];
2948
2982
  if (!e) return;
2949
2983
  let t = String(e.value ?? e.label);
2950
- Te.current.querySelector(`[data-option-id="${CSS.escape(t)}"]`)?.scrollIntoView({ block: "nearest" });
2951
- }, [_e, je]);
2952
- let Me = h(() => A || U.length === 0 ? "" : ke.find((e) => String(e.value ?? e.label) === String(U[0]))?.label ?? String(U[0]), [
2953
- A,
2954
- U,
2955
- ke
2956
- ]), Ne = l((e, t) => {
2957
- let n = ur(e), r = U.map(String).includes(String(n)), i;
2958
- if (A) if (r) {
2959
- i = U.filter((e) => String(e) !== String(n)), xe || me(i);
2984
+ ke.current.querySelector(`[data-option-id="${CSS.escape(t)}"]`)?.scrollIntoView({ block: "nearest" });
2985
+ }, [ye, Le]);
2986
+ let Re = h(() => M || we.length === 0 ? "" : Fe.find((e) => String(e.value ?? e.label) === String(we[0]))?.label ?? String(we[0]), [
2987
+ M,
2988
+ we,
2989
+ Fe
2990
+ ]), ze = l((e, t) => {
2991
+ let n = ur(e), r = we.map(String).includes(String(n)), i;
2992
+ if (M) if (r) {
2993
+ i = we.filter((e) => String(e) !== String(n)), Ce || ge(i);
2960
2994
  let r = {
2961
2995
  selectedValue: i,
2962
2996
  deselectedValue: e.value ?? e.label,
2963
- options: ke.filter((e) => i.map(String).includes(String(ur(e))))
2997
+ options: Fe.filter((e) => i.map(String).includes(String(ur(e))))
2964
2998
  };
2965
- ie?.(r, t);
2999
+ oe?.(r, t);
2966
3000
  } else {
2967
- i = [...U, e.value ?? e.label], xe || me(i);
3001
+ i = [...we, e.value ?? e.label], Ce || ge(i);
2968
3002
  let n = {
2969
3003
  selectedValue: i,
2970
- options: ke.filter((e) => i.map(String).includes(String(ur(e))))
3004
+ options: Fe.filter((e) => i.map(String).includes(String(ur(e))))
2971
3005
  };
2972
- re?.(n, t);
3006
+ ae?.(n, t);
2973
3007
  }
2974
3008
  else {
2975
- i = [e.value ?? e.label], xe || me(i), fe(!1), ge("");
3009
+ i = [e.value ?? e.label], Ce || ge(i), me(!1), ve("");
2976
3010
  let n = {
2977
3011
  selectedValue: e.value ?? e.label,
2978
3012
  options: [e]
2979
3013
  };
2980
- re?.(n, t);
3014
+ ae?.(n, t);
2981
3015
  }
2982
3016
  }, [
2983
- U,
2984
- A,
2985
- xe,
2986
- ke,
2987
- re,
2988
- ie
2989
- ]), Pe = l((e) => {
2990
- if (!ne) switch (e.key) {
3017
+ we,
3018
+ M,
3019
+ Ce,
3020
+ Fe,
3021
+ ae,
3022
+ oe
3023
+ ]), Be = l((e) => {
3024
+ if (!ie) switch (e.key) {
2991
3025
  case "ArrowDown":
2992
- e.preventDefault(), de ? ve((e) => e < je.length - 1 ? e + 1 : 0) : fe(!0);
3026
+ e.preventDefault(), U ? be((e) => e < Le.length - 1 ? e + 1 : 0) : me(!0);
2993
3027
  break;
2994
3028
  case "ArrowUp":
2995
- e.preventDefault(), de && ve((e) => e > 0 ? e - 1 : je.length - 1);
3029
+ e.preventDefault(), U && be((e) => e > 0 ? e - 1 : Le.length - 1);
2996
3030
  break;
2997
3031
  case "Enter":
2998
- if (e.preventDefault(), de && _e >= 0) {
2999
- let t = je[_e];
3000
- t && Ne(t, e);
3001
- } else de || fe(!0);
3032
+ if (e.preventDefault(), U && ye >= 0) {
3033
+ let t = Le[ye];
3034
+ t && ze(t, e);
3035
+ } else U || me(!0);
3002
3036
  break;
3003
3037
  case "Escape":
3004
- de && (e.preventDefault(), fe(!1));
3038
+ U && (e.preventDefault(), me(!1));
3005
3039
  break;
3006
3040
  }
3007
3041
  }, [
3008
- ne,
3009
- de,
3010
- _e,
3011
- je,
3012
- Ne
3013
- ]), Fe = l((e) => {
3014
- e.stopPropagation(), xe || me([]), ge(""), ae?.(e);
3015
- }, [xe, ae]), Ie = l((e, t) => {
3042
+ ie,
3043
+ U,
3044
+ ye,
3045
+ Le,
3046
+ ze
3047
+ ]), Ve = l((e) => {
3048
+ e.stopPropagation(), Ce || ge([]), ve(""), H?.(e);
3049
+ }, [Ce, H]), He = l((e, t) => {
3016
3050
  t.stopPropagation();
3017
- let n = ke.find((t) => String(ur(t)) === String(e));
3018
- n && Ne(n, t);
3019
- }, [ke, Ne]), Le = l((e) => {
3020
- be((t) => {
3051
+ let n = Fe.find((t) => String(ur(t)) === String(e));
3052
+ n && ze(n, t);
3053
+ }, [Fe, ze]), Ue = l((e) => {
3054
+ Se((t) => {
3021
3055
  let n = new Set(t);
3022
3056
  return n.has(e) ? n.delete(e) : n.add(e), n;
3023
3057
  });
3024
- }, []), Re = l((e) => {
3025
- if (!L) return;
3058
+ }, []), We = l((e) => {
3059
+ if (!z) return;
3026
3060
  let t = e.target.value;
3027
- ge(t), oe?.(t), de || fe(!0);
3061
+ ve(t), se?.(t), U || me(!0);
3028
3062
  }, [
3029
- L,
3030
- de,
3031
- oe
3063
+ z,
3064
+ U,
3065
+ se
3032
3066
  ]);
3033
- function ze(e) {
3067
+ function Ge(e) {
3034
3068
  let t = [];
3035
3069
  for (let n of e) {
3036
3070
  if (n.type === "optgroup" && n.options) {
3037
- let e = ze(n.options).filter(Boolean);
3071
+ let e = Ge(n.options).filter(Boolean);
3038
3072
  if (e.length === 0) continue;
3039
- let r = j && ye.has(n.label);
3040
- V ? t.push(V(n, r ? [] : e, Se)) : t.push(/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
3041
- className: G("stratus-select__optgroup-label", j && "stratus-select__optgroup--expandable"),
3042
- onClick: j ? () => Le(n.label) : void 0,
3043
- children: [j && /* @__PURE__ */ x("span", {
3073
+ let r = N && xe.has(n.label);
3074
+ ce ? t.push(ce(n, r ? [] : e, Te)) : t.push(/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
3075
+ className: G("stratus-select__optgroup-label", N && "stratus-select__optgroup--expandable"),
3076
+ onClick: N ? () => Ue(n.label) : void 0,
3077
+ children: [N && /* @__PURE__ */ x("span", {
3044
3078
  className: G("stratus-select__optgroup-chevron", r && "stratus-select__optgroup-chevron--collapsed"),
3045
3079
  children: /* @__PURE__ */ x("svg", {
3046
3080
  width: "10",
@@ -3054,18 +3088,18 @@ var pr = o(function(e, t) {
3054
3088
  }), !r && e] }, `group-${n.label}`));
3055
3089
  continue;
3056
3090
  }
3057
- if (!Ae(n)) continue;
3058
- let e = ur(n), r = U.map(String).includes(String(e)), i = je[_e] === n;
3059
- H ? t.push(/* @__PURE__ */ x("div", {
3091
+ if (!Ie(n)) continue;
3092
+ let e = ur(n), r = we.map(String).includes(String(e)), i = Le[ye] === n;
3093
+ le ? t.push(/* @__PURE__ */ x("div", {
3060
3094
  "data-option-id": e,
3061
3095
  className: G(i && "stratus-select__option--highlighted"),
3062
- onClick: n.disabled ? void 0 : (e) => Ne(n, e),
3063
- children: H(n, Se, U.map(String))
3096
+ onClick: n.disabled ? void 0 : (e) => ze(n, e),
3097
+ children: le(n, Te, we.map(String))
3064
3098
  }, e)) : t.push(/* @__PURE__ */ S("div", {
3065
3099
  "data-option-id": e,
3066
3100
  className: G("stratus-select__option", r && "stratus-select__option--selected", i && "stratus-select__option--highlighted", n.disabled && "stratus-select__option--disabled"),
3067
- onClick: n.disabled ? void 0 : (e) => Ne(n, e),
3068
- children: [A && /* @__PURE__ */ x("span", {
3101
+ onClick: n.disabled ? void 0 : (e) => ze(n, e),
3102
+ children: [M && /* @__PURE__ */ x("span", {
3069
3103
  className: G("stratus-select__checkbox", r && "stratus-select__checkbox--checked", n.disabled && "stratus-select__checkbox--disabled"),
3070
3104
  "aria-hidden": "true",
3071
3105
  children: r && /* @__PURE__ */ x("svg", {
@@ -3086,87 +3120,89 @@ var pr = o(function(e, t) {
3086
3120
  }
3087
3121
  return t;
3088
3122
  }
3089
- let Be = ze(Oe), Ve = Be.length > 0, He = G("stratus-select", `stratus-select--${g}`, B && "stratus-select--compact", te && "stratus-select--full-width", ne && "stratus-select--disabled", de && "stratus-select--open", L && "stratus-select--filterable", r), Ue = {
3123
+ let Ke = Ge(Pe), qe = Ke.length > 0, Je = U && !(V && !qe) ? /* @__PURE__ */ x("div", {
3124
+ ref: ke,
3125
+ className: G("stratus-select__dropdown", !re && "stratus-select__dropdown--portal"),
3126
+ style: re ? void 0 : Ae,
3127
+ children: qe ? Ke : /* @__PURE__ */ x("div", {
3128
+ className: "stratus-select__no-data",
3129
+ children: B
3130
+ })
3131
+ }) : null, Ye = Je && !re && typeof document < "u" ? C(Je, document.body) : Je, Xe = G("stratus-select", `stratus-select--${y}`, te && "stratus-select--compact", ne && "stratus-select--full-width", ie && "stratus-select--disabled", U && "stratus-select--open", z && "stratus-select--filterable", r), W = {
3090
3132
  ...i,
3091
- ...ce
3092
- }, We = U.length > 0 || Se && Se.length > 0;
3133
+ ...de
3134
+ }, Ze = we.length > 0 || Te && Te.length > 0;
3093
3135
  return /* @__PURE__ */ S("div", {
3094
3136
  ref: (e) => {
3095
- we.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
3137
+ De.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
3096
3138
  },
3097
- className: He,
3098
- style: Object.keys(Ue).length ? Ue : void 0,
3099
- ...le,
3139
+ className: Xe,
3140
+ style: Object.keys(W).length ? W : void 0,
3141
+ ...fe,
3100
3142
  children: [
3101
3143
  /* @__PURE__ */ x(sr, {
3102
- label: y,
3103
- meta: b,
3104
- htmlFor: ue
3144
+ label: b,
3145
+ meta: w,
3146
+ htmlFor: pe
3105
3147
  }),
3106
3148
  /* @__PURE__ */ S("div", {
3149
+ ref: Oe,
3107
3150
  className: "stratus-select__input-wrapper",
3108
3151
  onClick: () => {
3109
- ne || (fe((e) => !e), Ce.current?.focus());
3152
+ ie || (me((e) => !e), Ee.current?.focus());
3110
3153
  },
3111
- onKeyDown: Pe,
3154
+ onKeyDown: Be,
3112
3155
  children: [
3113
- E && /* @__PURE__ */ x("span", {
3156
+ O && /* @__PURE__ */ x("span", {
3114
3157
  className: "stratus-input__start-adornment",
3115
- children: E
3158
+ children: O
3116
3159
  }),
3117
- A && N && M && U.length > 0 ? /* @__PURE__ */ x(fr, {
3118
- tags: N,
3119
- infield: M,
3120
- selectedIds: U,
3121
- allFlat: ke,
3122
- tagMaxCount: P,
3123
- tagMaxCountPlaceholder: F,
3124
- selectedLabel: I,
3125
- onTagRemove: Ie
3160
+ M && F && P && we.length > 0 ? /* @__PURE__ */ x(fr, {
3161
+ tags: F,
3162
+ infield: P,
3163
+ selectedIds: we,
3164
+ allFlat: Fe,
3165
+ tagMaxCount: I,
3166
+ tagMaxCountPlaceholder: L,
3167
+ selectedLabel: R,
3168
+ onTagRemove: He
3126
3169
  }) : null,
3127
- A && !N && M ? /* @__PURE__ */ x(fr, {
3128
- tags: N,
3129
- infield: M,
3130
- selectedIds: U,
3131
- allFlat: ke,
3132
- tagMaxCount: P,
3133
- tagMaxCountPlaceholder: F,
3134
- selectedLabel: I,
3135
- onTagRemove: Ie
3170
+ M && !F && P ? /* @__PURE__ */ x(fr, {
3171
+ tags: F,
3172
+ infield: P,
3173
+ selectedIds: we,
3174
+ allFlat: Fe,
3175
+ tagMaxCount: I,
3176
+ tagMaxCountPlaceholder: L,
3177
+ selectedLabel: R,
3178
+ onTagRemove: He
3136
3179
  }) : null,
3137
- !(A && N && M && U.length > 0) && !(A && !N && M) && /* @__PURE__ */ x("input", {
3138
- ref: Ee,
3139
- id: ue,
3180
+ !(M && F && P && we.length > 0) && !(M && !F && P) && /* @__PURE__ */ x("input", {
3181
+ ref: Me,
3182
+ id: pe,
3140
3183
  type: "text",
3141
3184
  className: "stratus-select__input",
3142
- value: L && Se !== "" && (de || z) ? Se : Me,
3143
- placeholder: U.length > 0 ? void 0 : C,
3144
- disabled: ne,
3145
- onChange: Re,
3185
+ value: z && Te !== "" && (U || ee) ? Te : Re,
3186
+ placeholder: we.length > 0 ? void 0 : T,
3187
+ disabled: ie,
3188
+ onChange: We,
3146
3189
  autoComplete: "off"
3147
3190
  }),
3148
- D && /* @__PURE__ */ x("span", {
3191
+ k && /* @__PURE__ */ x("span", {
3149
3192
  className: "stratus-input__end-adornment",
3150
- children: D
3193
+ children: k
3151
3194
  }),
3152
- O && We && !ne && /* @__PURE__ */ x(ar, {
3153
- onClear: Fe,
3154
- label: k
3195
+ A && Ze && !ie && /* @__PURE__ */ x(ar, {
3196
+ onClear: Ve,
3197
+ label: j
3155
3198
  }),
3156
3199
  /* @__PURE__ */ x(ir, {})
3157
3200
  ]
3158
3201
  }),
3159
- de && !(ee && !Ve) && /* @__PURE__ */ x("div", {
3160
- ref: Te,
3161
- className: "stratus-select__dropdown",
3162
- children: Ve ? Be : /* @__PURE__ */ x("div", {
3163
- className: "stratus-select__no-data",
3164
- children: R
3165
- })
3166
- }),
3202
+ Ye,
3167
3203
  /* @__PURE__ */ x(or, {
3168
- helperText: w,
3169
- helperIcon: T
3204
+ helperText: E,
3205
+ helperIcon: D
3170
3206
  })
3171
3207
  ]
3172
3208
  });
@@ -14814,7 +14850,7 @@ function Xg(e, t) {
14814
14850
  };
14815
14851
  }
14816
14852
  var Zg = Xg(!1, !0), Qg = Xg(!0, !0);
14817
- z.create({
14853
+ B.create({
14818
14854
  name: "characterCount",
14819
14855
  addOptions() {
14820
14856
  return {
@@ -14875,7 +14911,7 @@ z.create({
14875
14911
  }
14876
14912
  })];
14877
14913
  }
14878
- }), z.create({
14914
+ }), B.create({
14879
14915
  name: "dropCursor",
14880
14916
  addOptions() {
14881
14917
  return {
@@ -14887,7 +14923,7 @@ z.create({
14887
14923
  addProseMirrorPlugins() {
14888
14924
  return [Ta(this.options)];
14889
14925
  }
14890
- }), z.create({
14926
+ }), B.create({
14891
14927
  name: "focus",
14892
14928
  addOptions() {
14893
14929
  return {
@@ -14917,13 +14953,13 @@ z.create({
14917
14953
  } }
14918
14954
  })];
14919
14955
  }
14920
- }), z.create({
14956
+ }), B.create({
14921
14957
  name: "gapCursor",
14922
14958
  addProseMirrorPlugins() {
14923
14959
  return [Cg()];
14924
14960
  },
14925
14961
  extendNodeSchema(e) {
14926
- return { allowGapCursor: te(ie(e, "allowGapCursor", {
14962
+ return { allowGapCursor: ee(re(e, "allowGapCursor", {
14927
14963
  name: e.name,
14928
14964
  options: e.options,
14929
14965
  storage: e.storage
@@ -14951,7 +14987,7 @@ function i_({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
14951
14987
  let { anchor: a } = i, o = [], s = e.isEmpty;
14952
14988
  if (t.showOnlyCurrent && !t.includeChildren) {
14953
14989
  let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
14954
- if (c && c.type.isTextblock && ae(c)) {
14990
+ if (c && c.type.isTextblock && ie(c)) {
14955
14991
  let r = a >= l && a <= l + c.nodeSize;
14956
14992
  o.push(n_({
14957
14993
  editor: e,
@@ -14975,7 +15011,7 @@ function i_({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
14975
15011
  } else {
14976
15012
  let i = e_.getState(e.state), c = i?.topPos ?? 0, l = i?.bottomPos ?? r.content.size;
14977
15013
  r.nodesBetween(c, l, (r, i) => {
14978
- let c = a >= i && a <= i + r.nodeSize, l = !r.isLeaf && ae(r);
15014
+ let c = a >= i && a <= i + r.nodeSize, l = !r.isLeaf && ie(r);
14979
15015
  return r.type.isTextblock && (c || !t.showOnlyCurrent) && l && o.push(n_({
14980
15016
  editor: e,
14981
15017
  isEmptyDoc: s,
@@ -15116,7 +15152,7 @@ function f_({ editor: e, options: t }) {
15116
15152
  }) }
15117
15153
  });
15118
15154
  }
15119
- var p_ = z.create({
15155
+ var p_ = B.create({
15120
15156
  name: "placeholder",
15121
15157
  addOptions() {
15122
15158
  return {
@@ -15136,17 +15172,17 @@ var p_ = z.create({
15136
15172
  })];
15137
15173
  }
15138
15174
  }), m_ = ".ProseMirror:not(.ProseMirror-focused) *::selection {\n background: transparent;\n}\n\n.ProseMirror:not(.ProseMirror-focused) *::-moz-selection {\n background: transparent;\n}";
15139
- z.create({
15175
+ B.create({
15140
15176
  name: "selection",
15141
15177
  addOptions() {
15142
15178
  return { className: "selection" };
15143
15179
  },
15144
15180
  addProseMirrorPlugins() {
15145
15181
  let { editor: e, options: t } = this;
15146
- return e.options.injectCSS && typeof document < "u" && ne(m_, e.options.injectNonce, "selection"), [new xa({
15182
+ return e.options.injectCSS && typeof document < "u" && te(m_, e.options.injectNonce, "selection"), [new xa({
15147
15183
  key: new wa("selection"),
15148
15184
  props: { decorations(n) {
15149
- return n.selection.empty || e.isFocused || !e.isEditable || oe(n.selection) || e.view.dragging ? null : qu.create(n.doc, [Wu.inline(n.selection.from, n.selection.to, { class: t.className })]);
15185
+ return n.selection.empty || e.isFocused || !e.isEditable || ae(n.selection) || e.view.dragging ? null : qu.create(n.doc, [Wu.inline(n.selection.from, n.selection.to, { class: t.className })]);
15150
15186
  } }
15151
15187
  })];
15152
15188
  }
@@ -15154,7 +15190,7 @@ z.create({
15154
15190
  function h_({ types: e, node: t }) {
15155
15191
  return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
15156
15192
  }
15157
- z.create({
15193
+ B.create({
15158
15194
  name: "trailingNode",
15159
15195
  addOptions() {
15160
15196
  return {
@@ -15189,7 +15225,7 @@ z.create({
15189
15225
  }
15190
15226
  })];
15191
15227
  }
15192
- }), z.create({
15228
+ }), B.create({
15193
15229
  name: "undoRedo",
15194
15230
  addOptions() {
15195
15231
  return {
@@ -15236,7 +15272,7 @@ function v_() {
15236
15272
  //#endregion
15237
15273
  //#region src/components/TipTapEditor/TipTapEditorExtensions.ts
15238
15274
  function y_(e) {
15239
- let { char: t, allowSpaces: n, allowedPrefixes: r, startOfLine: i, $position: a } = e, o = re(t), s = RegExp(`\\s${o}$`), c = i ? "^" : "", l = RegExp(n ? `${c}${o}(?!.*\\s{2}).*?(?=\\s${o}|$)` : `${c}(?:^)?${o}[^\\s${o}]*`, "gm"), u = a.nodeBefore?.isText && a.nodeBefore.text;
15275
+ let { char: t, allowSpaces: n, allowedPrefixes: r, startOfLine: i, $position: a } = e, o = ne(t), s = RegExp(`\\s${o}$`), c = i ? "^" : "", l = RegExp(n ? `${c}${o}(?!.*\\s{2}).*?(?=\\s${o}|$)` : `${c}(?:^)?${o}[^\\s${o}]*`, "gm"), u = a.nodeBefore?.isText && a.nodeBefore.text;
15240
15276
  if (!u) return null;
15241
15277
  let d = a.pos - u.length, f = Array.from(u.matchAll(l)).pop();
15242
15278
  if (!f || f.input === void 0 || f.index === void 0) return null;
@@ -15354,7 +15390,7 @@ function x_({ pluginKey: e = b_, editor: t, char: n = "@", allowSpaces: r = !0,
15354
15390
  });
15355
15391
  return h;
15356
15392
  }
15357
- var S_ = new wa("mention"), C_ = B.create({
15393
+ var S_ = new wa("mention"), C_ = V.create({
15358
15394
  name: "mention",
15359
15395
  addOptions() {
15360
15396
  return {
@@ -15366,7 +15402,7 @@ var S_ = new wa("mention"), C_ = B.create({
15366
15402
  renderHTML({ options: e, node: t }) {
15367
15403
  return [
15368
15404
  "span",
15369
- V(this.HTMLAttributes, e.HTMLAttributes),
15405
+ oe(this.HTMLAttributes, e.HTMLAttributes),
15370
15406
  `${e.suggestion.char}${t.attrs.label ?? t.attrs.id}`
15371
15407
  ];
15372
15408
  },
@@ -15414,21 +15450,21 @@ var S_ = new wa("mention"), C_ = B.create({
15414
15450
  renderHTML({ node: e, HTMLAttributes: t }) {
15415
15451
  if (this.options.renderLabel !== void 0) return [
15416
15452
  "span",
15417
- V({ "data-type": this.name }, this.options.HTMLAttributes, t),
15453
+ oe({ "data-type": this.name }, this.options.HTMLAttributes, t),
15418
15454
  this.options.renderLabel({
15419
15455
  options: this.options,
15420
15456
  node: e
15421
15457
  })
15422
15458
  ];
15423
15459
  let n = { ...this.options };
15424
- n.HTMLAttributes = V({ "data-type": this.name }, this.options.HTMLAttributes, t);
15460
+ n.HTMLAttributes = oe({ "data-type": this.name }, this.options.HTMLAttributes, t);
15425
15461
  let r = this.options.renderHTML({
15426
15462
  options: n,
15427
15463
  node: e
15428
15464
  });
15429
15465
  return typeof r == "string" ? [
15430
15466
  "span",
15431
- V({ "data-type": this.name }, this.options.HTMLAttributes, t),
15467
+ oe({ "data-type": this.name }, this.options.HTMLAttributes, t),
15432
15468
  r
15433
15469
  ] : r;
15434
15470
  },
@@ -16102,7 +16138,7 @@ function Sv({ children: e, allowedColors: t, allowedBackgroundColors: n, clearTe
16102
16138
  function Cv({ renderToolbar: e = () => /* @__PURE__ */ x(Sv, {}), height: t, width: n, content: r, editable: i = !0, placeholder: a, immediatelyRender: o, onChange: s, spellCheck: c = !1, validateColors: u = !1, allowedColors: f = [], allowedBackgroundColors: m = [], overflowY: g, mentionOptions: v = { deleteTriggerWithBackspace: !0 }, className: y, style: b, ...C }, w) {
16103
16139
  let { userSuggestionPromise: T, userSuggestionRenderer: E } = v, D = h(() => [
16104
16140
  le,
16105
- ee,
16141
+ z,
16106
16142
  A,
16107
16143
  j.configure({ multicolor: !0 }),
16108
16144
  N,
@@ -16130,7 +16166,7 @@ function Cv({ renderToolbar: e = () => /* @__PURE__ */ x(Sv, {}), height: t, wid
16130
16166
  f,
16131
16167
  s,
16132
16168
  u
16133
- ]), k = h(() => ({ preserveWhitespace: !0 }), []), z = ce({
16169
+ ]), k = h(() => ({ preserveWhitespace: !0 }), []), B = ce({
16134
16170
  extensions: D,
16135
16171
  content: _(r ?? "").current,
16136
16172
  editable: i,
@@ -16139,38 +16175,38 @@ function Cv({ renderToolbar: e = () => /* @__PURE__ */ x(Sv, {}), height: t, wid
16139
16175
  onUpdate: O,
16140
16176
  shouldRerenderOnTransaction: !1
16141
16177
  });
16142
- if (p(w, () => ({ editor: z }), [z]), d(() => {
16143
- !z || z.isEditable === i || z.setEditable(i);
16144
- }, [i, z]), d(() => {
16145
- if (!z || r == null || r === z.getHTML()) return;
16146
- let { from: e, to: t } = z.state.selection;
16147
- z.chain().setContent(r, {
16178
+ if (p(w, () => ({ editor: B }), [B]), d(() => {
16179
+ !B || B.isEditable === i || B.setEditable(i);
16180
+ }, [i, B]), d(() => {
16181
+ if (!B || r == null || r === B.getHTML()) return;
16182
+ let { from: e, to: t } = B.state.selection;
16183
+ B.chain().setContent(r, {
16148
16184
  emitUpdate: !1,
16149
16185
  parseOptions: { preserveWhitespace: !0 }
16150
16186
  }).setTextSelection({
16151
16187
  from: e,
16152
16188
  to: t
16153
16189
  }).run();
16154
- }, [r, z]), !z) return null;
16155
- let B = {
16190
+ }, [r, B]), !B) return null;
16191
+ let V = {
16156
16192
  ...b,
16157
16193
  ...n == null ? {} : { width: typeof n == "number" ? `${n}px` : n },
16158
16194
  ...g == null ? {} : { overflowY: g }
16159
- }, te = t != null && i ? typeof t == "number" ? `${t}px` : t : void 0;
16195
+ }, ee = t != null && i ? typeof t == "number" ? `${t}px` : t : void 0;
16160
16196
  return /* @__PURE__ */ x(__, {
16161
- editor: z,
16197
+ editor: B,
16162
16198
  children: /* @__PURE__ */ S("div", {
16163
16199
  className: G("stratus-tiptap-editor", y),
16164
- style: B,
16200
+ style: V,
16165
16201
  "data-editable": i,
16166
16202
  ...C,
16167
16203
  children: [
16168
16204
  i && e(),
16169
16205
  /* @__PURE__ */ x(H, {
16170
16206
  spellCheck: c,
16171
- editor: z
16207
+ editor: B
16172
16208
  }),
16173
- te && /* @__PURE__ */ x("style", { children: `.stratus-tiptap-editor .ProseMirror { height: ${te}; min-height: ${te}; overflow-y: auto; }` })
16209
+ ee && /* @__PURE__ */ x("style", { children: `.stratus-tiptap-editor .ProseMirror { height: ${ee}; min-height: ${ee}; overflow-y: auto; }` })
16174
16210
  ]
16175
16211
  })
16176
16212
  });
@@ -16301,25 +16337,25 @@ function Iv(e, t, n, r, i) {
16301
16337
  return o <= 0 ? n : o >= a ? r : o * r / a;
16302
16338
  }
16303
16339
  var Lv = 0, Rv = o(function(e, t) {
16304
- let { value: n, min: r = 0, max: i = 100, step: a = 1, marks: o, vertical: s = !1, tooltipVisible: c, tooltipPlacement: u = "top", tooltipFormatter: f, disabled: p = !1, onChange: m, sliderEventHandlers: h = {}, ...g } = e, { cssProps: y, otherProps: C } = K(g), { className: w, ...T } = C, [E] = v(() => `slider-${++Lv}`), D = _(null), [O, k] = v(() => Mv(n, r)), [A, j] = v(!1), M = O.some((e) => e.isHovering), N = O.some((e) => e.isDragging), P = !p && (c === void 0 || c), { onClick: F, onMouseOver: I, onMouseOut: L, onDragStart: R, onDrag: ee, onDragEnd: z } = h;
16340
+ let { value: n, min: r = 0, max: i = 100, step: a = 1, marks: o, vertical: s = !1, tooltipVisible: c, tooltipPlacement: u = "top", tooltipFormatter: f, disabled: p = !1, onChange: m, sliderEventHandlers: h = {}, ...g } = e, { cssProps: y, otherProps: C } = K(g), { className: w, ...T } = C, [E] = v(() => `slider-${++Lv}`), D = _(null), [O, k] = v(() => Mv(n, r)), [A, j] = v(!1), M = O.some((e) => e.isHovering), N = O.some((e) => e.isDragging), P = !p && (c === void 0 || c), { onClick: F, onMouseOver: I, onMouseOut: L, onDragStart: R, onDrag: z, onDragEnd: B } = h;
16305
16341
  d(() => {
16306
16342
  n && k(Mv(n, r));
16307
16343
  }, [n, r]);
16308
- let B = l((e) => D.current ? Nv(D.current, e, i, s) : 0, [i, s]), te = l(() => {
16344
+ let V = l((e) => D.current ? Nv(D.current, e, i, s) : 0, [i, s]), ee = l(() => {
16309
16345
  if (!D.current) return [0, 0];
16310
- if (O.length === 1) return [0, B(O[0].value) + 6];
16311
- let e = O.map((e) => e.value), t = Math.min(...e), n = Math.max(...e), r = B(t);
16312
- return [r, B(n) - r + 6];
16313
- }, [O, B]), ne = l((e) => {
16346
+ if (O.length === 1) return [0, V(O[0].value) + 6];
16347
+ let e = O.map((e) => e.value), t = Math.min(...e), n = Math.max(...e), r = V(t);
16348
+ return [r, V(n) - r + 6];
16349
+ }, [O, V]), te = l((e) => {
16314
16350
  if (!o || p) return !1;
16315
- let [t, n] = te(), r = B(e);
16351
+ let [t, n] = ee(), r = V(e);
16316
16352
  return t <= r && t + n >= r;
16317
16353
  }, [
16318
16354
  o,
16319
16355
  p,
16320
- te,
16321
- B
16322
- ]), re = l((e) => {
16356
+ ee,
16357
+ V
16358
+ ]), ne = l((e) => {
16323
16359
  if (!D.current) return 0;
16324
16360
  let t = Fv(D.current, e);
16325
16361
  return Math.round(Iv(t, D.current, r, i, s));
@@ -16327,7 +16363,7 @@ var Lv = 0, Rv = o(function(e, t) {
16327
16363
  r,
16328
16364
  i,
16329
16365
  s
16330
- ]), ie = l((e, t) => a === 1 ? t : t > e && e + a <= t ? e + a : t < e && e - a >= t ? e - a : e, [a]), ae = (e, t) => {
16366
+ ]), re = l((e, t) => a === 1 ? t : t > e && e + a <= t ? e + a : t < e && e - a >= t ? e - a : e, [a]), ie = (e, t) => {
16331
16367
  if (p || M || N) return;
16332
16368
  let n = [...O];
16333
16369
  n[e] = {
@@ -16337,7 +16373,7 @@ var Lv = 0, Rv = o(function(e, t) {
16337
16373
  index: n[e].value,
16338
16374
  handle: e
16339
16375
  }, t);
16340
- }, oe = (e, t) => {
16376
+ }, ae = (e, t) => {
16341
16377
  if (p || !M || N) return;
16342
16378
  let n = [...O];
16343
16379
  n[e] = {
@@ -16347,28 +16383,28 @@ var Lv = 0, Rv = o(function(e, t) {
16347
16383
  index: n[e].value,
16348
16384
  handle: e
16349
16385
  }, t);
16350
- }, V = l((e) => {
16386
+ }, oe = l((e) => {
16351
16387
  if (p) return;
16352
16388
  let t = (t) => {
16353
16389
  if (p) return;
16354
16390
  t.preventDefault(), t.stopPropagation();
16355
- let n = re(t), r = ie(O[e].value, n), i = [...O];
16391
+ let n = ne(t), r = re(O[e].value, n), i = [...O];
16356
16392
  i[e] = {
16357
16393
  ...i[e],
16358
16394
  value: r
16359
- }, k(i), ee?.({
16395
+ }, k(i), z?.({
16360
16396
  index: r,
16361
16397
  handle: e
16362
16398
  }, t);
16363
16399
  }, n = (r) => {
16364
16400
  r.preventDefault(), r.stopPropagation(), document.removeEventListener("mousemove", t), document.removeEventListener("touchmove", t), document.removeEventListener("mouseup", n), document.removeEventListener("touchend", n);
16365
- let i = re(r), a = ie(O[e].value, i), o = [...O];
16401
+ let i = ne(r), a = re(O[e].value, i), o = [...O];
16366
16402
  o[e] = {
16367
16403
  ...o[e],
16368
16404
  value: a,
16369
16405
  isHovering: !1,
16370
16406
  isDragging: !1
16371
- }, k(o), m?.(o.map((e) => e.value).sort((e, t) => e - t), r), z?.({
16407
+ }, k(o), m?.(o.map((e) => e.value).sort((e, t) => e - t), r), B?.({
16372
16408
  index: a,
16373
16409
  handle: e
16374
16410
  }, r);
@@ -16386,11 +16422,11 @@ var Lv = 0, Rv = o(function(e, t) {
16386
16422
  }, [
16387
16423
  p,
16388
16424
  O,
16425
+ ne,
16389
16426
  re,
16390
- ie,
16391
16427
  m,
16392
- ee,
16393
16428
  z,
16429
+ B,
16394
16430
  R
16395
16431
  ]), H = (e) => {
16396
16432
  if (p || (e.preventDefault(), e.stopPropagation(), !D.current)) return;
@@ -16409,7 +16445,7 @@ var Lv = 0, Rv = o(function(e, t) {
16409
16445
  ...i[r],
16410
16446
  value: e
16411
16447
  }, k(i), m?.(i.map((e) => e.value).sort((e, t) => e - t), t.nativeEvent), F?.({ index: e }, t.nativeEvent);
16412
- }, [ce, le] = te();
16448
+ }, [ce, le] = ee();
16413
16449
  return /* @__PURE__ */ S("div", {
16414
16450
  ref: t,
16415
16451
  className: G("stratus-slider", w),
@@ -16442,11 +16478,11 @@ var Lv = 0, Rv = o(function(e, t) {
16442
16478
  children: /* @__PURE__ */ x("div", {
16443
16479
  id: `${E}__handle-${t}`,
16444
16480
  className: G("stratus-slider__handle", (e.isHovering || e.isDragging) && "is-hovering"),
16445
- style: s ? { marginTop: B(e.value) } : { marginLeft: B(e.value) },
16446
- onMouseDown: () => V(t),
16447
- onTouchStart: () => V(t),
16448
- onMouseOver: (e) => ae(t, e),
16449
- onMouseOut: (e) => oe(t, e),
16481
+ style: s ? { marginTop: V(e.value) } : { marginLeft: V(e.value) },
16482
+ onMouseDown: () => oe(t),
16483
+ onTouchStart: () => oe(t),
16484
+ onMouseOver: (e) => ie(t, e),
16485
+ onMouseOut: (e) => ae(t, e),
16450
16486
  tabIndex: p ? void 0 : 0,
16451
16487
  "aria-disabled": p
16452
16488
  })
@@ -16458,8 +16494,8 @@ var Lv = 0, Rv = o(function(e, t) {
16458
16494
  onMouseOut: () => !p && A && !N && j(!1),
16459
16495
  "aria-disabled": p,
16460
16496
  children: o && Object.keys(o).map((e, t) => /* @__PURE__ */ x("span", {
16461
- className: G("stratus-slider__rail-mark", s && "is-vertical", (A || M || N) && "is-hovering", ne(+e) && "is-active"),
16462
- style: s ? { marginTop: B(+e) } : { marginLeft: B(+e) },
16497
+ className: G("stratus-slider__rail-mark", s && "is-vertical", (A || M || N) && "is-hovering", te(+e) && "is-active"),
16498
+ style: s ? { marginTop: V(+e) } : { marginLeft: V(+e) },
16463
16499
  tabIndex: p ? void 0 : 0,
16464
16500
  "aria-disabled": p,
16465
16501
  onClick: se(+e),
@@ -16471,7 +16507,7 @@ var Lv = 0, Rv = o(function(e, t) {
16471
16507
  className: G("stratus-slider__marks-container", s && "is-vertical"),
16472
16508
  children: Object.keys(o).map((e, t) => /* @__PURE__ */ x("span", {
16473
16509
  className: "stratus-slider__mark",
16474
- style: s ? { marginTop: B(+e) } : { marginLeft: B(+e) },
16510
+ style: s ? { marginTop: V(+e) } : { marginLeft: V(+e) },
16475
16511
  "aria-disabled": p,
16476
16512
  onClick: se(+e),
16477
16513
  onMouseOver: (t) => I?.({ index: +e }, t),
@@ -16581,8 +16617,8 @@ function Xv(e, t) {
16581
16617
  case "date":
16582
16618
  case "week": return fe(t, 1);
16583
16619
  case "month":
16584
- case "quarter": return me(t, 1);
16585
- case "year": return Ue(me(U(t), 1));
16620
+ case "quarter": return U(t, 1);
16621
+ case "year": return Ue(U(xe(t), 1));
16586
16622
  default: return t;
16587
16623
  }
16588
16624
  }
@@ -16592,8 +16628,8 @@ function Zv(e, t, n) {
16592
16628
  case "date":
16593
16629
  case "week": return fe(t, n);
16594
16630
  case "month":
16595
- case "quarter": return me(t, n);
16596
- case "year": return Ue(me(U(t), n * 10));
16631
+ case "quarter": return U(t, n);
16632
+ case "year": return Ue(U(xe(t), n * 10));
16597
16633
  default: return t;
16598
16634
  }
16599
16635
  })(t, n);
@@ -16603,7 +16639,7 @@ function Zv(e, t, n) {
16603
16639
  case "month":
16604
16640
  case "quarter": return `${r.getFullYear()}`;
16605
16641
  case "year": {
16606
- let e = Ue(r), t = U(r);
16642
+ let e = Ue(r), t = xe(r);
16607
16643
  return `${e.getFullYear()}-${t.getFullYear()}`;
16608
16644
  }
16609
16645
  default: return "";
@@ -16623,26 +16659,26 @@ function $v({ display: e, rowProps: t = () => ({}), rowClassNames: r = () => "",
16623
16659
  let { uid: o, type: s, showWeekNumber: c, actualDate: l, selectedDate: d, updateSelectedDate: f, isDisabledDate: p } = u(Hv), m = s === "date" || s === "week", g = s === "week" || s === "date" && c, _ = h(() => {
16624
16660
  switch (s) {
16625
16661
  case "month": {
16626
- let t = me(l, e).getFullYear();
16662
+ let t = U(l, e).getFullYear();
16627
16663
  return Jv(Kv().map((e, n) => /* @__PURE__ */ new Date(`${t}-${n + 1}`)), 3);
16628
16664
  }
16629
16665
  case "quarter": {
16630
- let t = me(l, e).getFullYear();
16631
- return Jv(ve({
16666
+ let t = U(l, e).getFullYear();
16667
+ return Jv(_e({
16632
16668
  start: /* @__PURE__ */ new Date(`${t}`),
16633
16669
  end: /* @__PURE__ */ new Date(`${t}-12-31`)
16634
16670
  }), 4);
16635
16671
  }
16636
16672
  case "year": {
16637
- let t = Ue(me(U(l), e * 10)), n = Ue(t), r = U(t);
16638
- return Jv(be({
16639
- start: U(Ye(n, 1)),
16640
- end: Ue(me(r, 1))
16673
+ let t = Ue(U(xe(l), e * 10)), n = Ue(t), r = xe(t);
16674
+ return Jv(ye({
16675
+ start: xe(Ye(n, 1)),
16676
+ end: Ue(U(r, 1))
16641
16677
  }), 3);
16642
16678
  }
16643
16679
  default: {
16644
16680
  let t = fe(l, e);
16645
- return ye({
16681
+ return ve({
16646
16682
  start: We(t),
16647
16683
  end: Se(t)
16648
16684
  }, { weekStartsOn: 1 }).map((e) => {
@@ -16674,7 +16710,7 @@ function $v({ display: e, rowProps: t = () => ({}), rowClassNames: r = () => "",
16674
16710
  }
16675
16711
  }, b = (e) => s === "week" && d ? Ie(e, d, { weekStartsOn: 1 }) : !1, C = (t) => s !== "date" && s !== "week" ? !1 : !Pe(t, fe(l, e)), w = (t) => {
16676
16712
  if (s !== "year") return !1;
16677
- let n = Ue(me(U(l), e * 10));
16713
+ let n = Ue(U(xe(l), e * 10));
16678
16714
  return De(t) !== De(n);
16679
16715
  }, T = (e) => () => {
16680
16716
  s === "week" && f(e);
@@ -16936,16 +16972,16 @@ function fy(e, t, n, r) {
16936
16972
  //#endregion
16937
16973
  //#region src/components/DatePicker/DatePicker.tsx
16938
16974
  var py = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplays: r = 1, allowClear: i = !0, open: a, defaultOpen: o = !1, picker: s = "date", value: c, defaultValue: l, format: u, placeholder: d, showTime: f = !1, showToday: m = !0, showWeekNumber: h = !1, onChange: g, onOpen: _, onClose: y, disabled: b = !1, disabledDates: S, popoverPlacement: C = "bottom-start", inputProps: w = {}, footer: T, style: E, ...D }, O) {
16939
- let k = c === void 0 ? null : ly(c, u), A = c === void 0 ? l ? ly(l, u) : null : k, [j, M] = v(o), [N, P] = v(A), [F, I] = v(A), [L, R] = v(!1), ee = a !== void 0, z = ee ? a : j, B = c === void 0 ? F : k, te = c !== void 0 && z && !L ? k : F, ne = c !== void 0 && !z ? k : te, re = dy(s, ne, u, f), ie = r > 0 ? r : 1, ae = (e) => {
16940
- ee || M(e);
16975
+ let k = c === void 0 ? null : ly(c, u), A = c === void 0 ? l ? ly(l, u) : null : k, [j, M] = v(o), [N, P] = v(A), [F, I] = v(A), [L, R] = v(!1), z = a !== void 0, B = z ? a : j, V = c === void 0 ? F : k, ee = c !== void 0 && B && !L ? k : F, te = c !== void 0 && !B ? k : ee, ne = dy(s, te, u, f), re = r > 0 ? r : 1, ie = (e) => {
16976
+ z || M(e);
16977
+ }, ae = (e) => {
16978
+ b || (P(V), I(V), R(!1), ie(!0), _?.(e));
16941
16979
  }, oe = (e) => {
16942
- b || (P(B), I(B), R(!1), ae(!0), _?.(e));
16943
- }, V = (e) => {
16944
- ae(!1), y?.(e);
16980
+ ie(!1), y?.(e);
16945
16981
  };
16946
16982
  p(O, () => ({
16947
- open: () => oe(),
16948
- close: () => V()
16983
+ open: () => ae(),
16984
+ close: () => oe()
16949
16985
  }));
16950
16986
  let H = (e) => {
16951
16987
  ce(c === void 0 ? N : k, e);
@@ -16955,8 +16991,8 @@ var py = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
16955
16991
  g?.({
16956
16992
  text: dy(s, e, u, f),
16957
16993
  date: e || null
16958
- }), I(e), R(!1), V(t);
16959
- }, le = ne && i ? /* @__PURE__ */ x(q, {
16994
+ }), I(e), R(!1), oe(t);
16995
+ }, le = te && i ? /* @__PURE__ */ x(q, {
16960
16996
  variant: "ghost",
16961
16997
  size: "sm",
16962
16998
  className: "stratus-datepicker__clear-btn",
@@ -16971,20 +17007,20 @@ var py = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
16971
17007
  }), ue = d || uy(s, u, f);
16972
17008
  return /* @__PURE__ */ x(Yn, {
16973
17009
  className: G("stratus-datepicker", t),
16974
- open: z,
17010
+ open: B,
16975
17011
  placement: C,
16976
17012
  trigger: "click",
16977
17013
  tooltipRef: n,
16978
- onOpen: oe,
17014
+ onOpen: ae,
16979
17015
  onClose: H,
16980
17016
  maxWidth: "none",
16981
17017
  content: /* @__PURE__ */ x(sy, {
16982
- nDisplays: ie,
17018
+ nDisplays: re,
16983
17019
  type: s,
16984
17020
  showToday: m,
16985
17021
  showTime: f,
16986
17022
  showWeekNumber: h,
16987
- initialDate: te || null,
17023
+ initialDate: ee || null,
16988
17024
  onSelectDate: se,
16989
17025
  onChange: ce,
16990
17026
  disabledDates: S,
@@ -16996,12 +17032,12 @@ var py = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
16996
17032
  children: /* @__PURE__ */ x(Qn, {
16997
17033
  className: G(e, "stratus-datepicker__input"),
16998
17034
  endAdornment: le,
16999
- value: re ?? "",
17035
+ value: ne ?? "",
17000
17036
  placeholder: ue,
17001
17037
  disabled: b,
17002
17038
  onChange: () => g?.({
17003
- text: re,
17004
- date: ne
17039
+ text: ne,
17040
+ date: te
17005
17041
  }),
17006
17042
  style: { width: f ? 200 : 150 },
17007
17043
  ...w,
@@ -17185,32 +17221,32 @@ function _y({ disabled: e, picker: t, format: n, showTime: r, onChange: i, onCha
17185
17221
  //#endregion
17186
17222
  //#region src/components/DatePicker/DateRangePicker.tsx
17187
17223
  var vy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplays: r = 2, nInputs: i = 1, separator: a = "-", allowClear: o = !0, picker: s = "date", value: c, defaultValue: l, format: u, placeholderStartDate: d = "Start date", placeholderEndDate: f = "End date", showTime: m = !1, showToday: h = !0, showWeekNumber: g = !1, onChange: _, onChangeOnClickOutside: y = !0, disabled: b = !1, disabledDates: S, popoverPlacement: C = "bottom-start", startDateInputProps: w = {}, endDateInputProps: T = {}, footer: E, style: D, ...O }, k) {
17188
- let A = c ? ly(c[0], u) : null, j = c ? ly(c[1], u) : null, M = c ? A : l ? ly(l[0], u) : null, N = c ? j : l ? ly(l[1], u) : null, [P, F] = v(!1), [I, L] = v(M), [R, ee] = v(N), [z, B] = v(M), [te, ne] = v(N), [re, ie] = v(null), [ae, oe] = v(0), V = c ? A : z, H = c ? j : te, se = c && !P ? A : z, ce = c && !P ? j : te, le = r > 0 ? r : 2, ue = i > 1 ? 2 : 1, de = ue > 1 ? m ? "190px" : "135px" : m ? "300px" : "220px", fe = dy(s, se, u, m), pe = dy(s, ce, u, m), { openPicker: me, closePicker: he, handleOpenStartDate: ge, handleOpenEndDate: _e, handleDismiss: ve, handleSelectDate: ye, handleChangeDate: be, handleClear: xe, getRowClassNames: U, getRowProps: Se, getCellClassNames: Ce, getCellProps: we } = _y({
17224
+ let A = c ? ly(c[0], u) : null, j = c ? ly(c[1], u) : null, M = c ? A : l ? ly(l[0], u) : null, N = c ? j : l ? ly(l[1], u) : null, [P, F] = v(!1), [I, L] = v(M), [R, z] = v(N), [B, V] = v(M), [ee, te] = v(N), [ne, re] = v(null), [ie, ae] = v(0), oe = c ? A : B, H = c ? j : ee, se = c && !P ? A : B, ce = c && !P ? j : ee, le = r > 0 ? r : 2, ue = i > 1 ? 2 : 1, de = ue > 1 ? m ? "190px" : "135px" : m ? "300px" : "220px", fe = dy(s, se, u, m), pe = dy(s, ce, u, m), { openPicker: U, closePicker: me, handleOpenStartDate: he, handleOpenEndDate: ge, handleDismiss: _e, handleSelectDate: ve, handleChangeDate: ye, handleClear: be, getRowClassNames: xe, getRowProps: Se, getCellClassNames: Ce, getCellProps: we } = _y({
17189
17225
  disabled: b,
17190
17226
  picker: s,
17191
17227
  format: u,
17192
17228
  showTime: m,
17193
17229
  onChange: _,
17194
17230
  onChangeOnClickOutside: y,
17195
- committedStartDate: V,
17231
+ committedStartDate: oe,
17196
17232
  committedEndDate: H,
17197
17233
  savedStartDate: I,
17198
17234
  savedEndDate: R,
17199
- startDate: z,
17200
- endDate: te,
17201
- hoverDate: re,
17202
- focusInput: ae,
17235
+ startDate: B,
17236
+ endDate: ee,
17237
+ hoverDate: ne,
17238
+ focusInput: ie,
17203
17239
  setOpen: F,
17204
17240
  setSavedStartDate: L,
17205
- setSavedEndDate: ee,
17206
- setStartDate: B,
17207
- setEndDate: ne,
17208
- setHoverDate: ie,
17209
- setFocusInput: oe
17241
+ setSavedEndDate: z,
17242
+ setStartDate: V,
17243
+ setEndDate: te,
17244
+ setHoverDate: re,
17245
+ setFocusInput: ae
17210
17246
  });
17211
17247
  return p(k, () => ({
17212
- open: () => me(1),
17213
- close: () => he()
17248
+ open: () => U(1),
17249
+ close: () => me()
17214
17250
  })), /* @__PURE__ */ x(Yn, {
17215
17251
  className: G("stratus-datepicker", "stratus-datepicker--range", t),
17216
17252
  open: P,
@@ -17218,7 +17254,7 @@ var vy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
17218
17254
  trigger: "click",
17219
17255
  tooltipRef: n,
17220
17256
  arrow: !1,
17221
- onClose: ve,
17257
+ onClose: _e,
17222
17258
  maxWidth: "none",
17223
17259
  content: /* @__PURE__ */ x(sy, {
17224
17260
  nDisplays: le,
@@ -17226,11 +17262,11 @@ var vy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
17226
17262
  showToday: h,
17227
17263
  showTime: m,
17228
17264
  showWeekNumber: g,
17229
- initialDate: ae === 1 ? z || null : te || null,
17230
- onSelectDate: ye,
17231
- onChange: be,
17265
+ initialDate: ie === 1 ? B || null : ee || null,
17266
+ onSelectDate: ve,
17267
+ onChange: ye,
17232
17268
  disabledDates: S,
17233
- rowClassNames: U,
17269
+ rowClassNames: xe,
17234
17270
  rowProps: Se,
17235
17271
  cellClassNames: Ce,
17236
17272
  cellProps: we,
@@ -17244,15 +17280,15 @@ var vy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
17244
17280
  className: e,
17245
17281
  allowClear: o,
17246
17282
  nInputs: ue,
17247
- focusInput: ae,
17283
+ focusInput: ie,
17248
17284
  separator: a,
17249
17285
  placeholderStartDate: d,
17250
17286
  placeholderEndDate: f,
17251
17287
  startDate: fe || "",
17252
17288
  endDate: pe || "",
17253
- onClickClear: xe,
17254
- onClickStartDate: ge,
17255
- onClickEndDate: _e,
17289
+ onClickClear: be,
17290
+ onClickStartDate: he,
17291
+ onClickEndDate: ge,
17256
17292
  disabled: b,
17257
17293
  width: de,
17258
17294
  startDateInputProps: w,
@@ -17275,25 +17311,25 @@ function by(e, t, n = !0) {
17275
17311
  case "weeks": return n ? Ge(r, { weekStartsOn: 1 }) : Ce(r, { weekStartsOn: 1 });
17276
17312
  case "months": return n ? We(r) : Se(r);
17277
17313
  case "years": return n ? Ke(r) : we(r);
17278
- default: return n ? He(r) : xe(r);
17314
+ default: return n ? He(r) : be(r);
17279
17315
  }
17280
17316
  }
17281
17317
  function xy(e, t, n) {
17282
17318
  let r = yy(e), i = yy(t);
17283
17319
  switch (n) {
17284
- case "weeks": return ye({
17320
+ case "weeks": return ve({
17285
17321
  start: r,
17286
17322
  end: i
17287
17323
  }, { weekStartsOn: 1 });
17288
- case "months": return _e({
17324
+ case "months": return ge({
17289
17325
  start: r,
17290
17326
  end: i
17291
17327
  });
17292
- case "years": return be({
17328
+ case "years": return ye({
17293
17329
  start: r,
17294
17330
  end: i
17295
17331
  });
17296
- default: return ge({
17332
+ default: return he({
17297
17333
  start: r,
17298
17334
  end: i
17299
17335
  });
@@ -17308,7 +17344,7 @@ function Sy(e, t = !1) {
17308
17344
  }
17309
17345
  }
17310
17346
  function Cy(e, t, n, r) {
17311
- return he(r, n) / t * e;
17347
+ return me(r, n) / t * e;
17312
17348
  }
17313
17349
  function wy(e, t, n, r) {
17314
17350
  return !(je(e, n) && je(t, n) || Ae(e, r) && Ae(t, r));
@@ -17334,7 +17370,7 @@ function Dy(e, t) {
17334
17370
  return 150;
17335
17371
  }
17336
17372
  function Oy(e, t, n, r, i) {
17337
- let a = by(t, i, !0), o = by(n, i, !1), s = he(o, a);
17373
+ let a = by(t, i, !0), o = by(n, i, !1), s = me(o, a);
17338
17374
  return e.map((e) => {
17339
17375
  let c = yy(e.startDate), l = yy(e.endDate), { children: u, ...d } = e, f = u && u.length > 0 ? Oy(u, t, n, r, i) : void 0;
17340
17376
  return {
@@ -17420,7 +17456,7 @@ function jy() {
17420
17456
  function My({ start: e, end: t, rowWidth: n, groupDatesBy: r }) {
17421
17457
  let i = l(() => {
17422
17458
  let i = /* @__PURE__ */ new Date(), a = by(e, r, !0);
17423
- return Cy(n, he(by(t, r, !1), a), a, i);
17459
+ return Cy(n, me(by(t, r, !1), a), a, i);
17424
17460
  }, [
17425
17461
  e,
17426
17462
  t,
@@ -17443,28 +17479,28 @@ var Ny = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
17443
17479
  t,
17444
17480
  n,
17445
17481
  D
17446
- ]), ee = h(() => {
17482
+ ]), z = h(() => {
17447
17483
  let e = L * a / 100;
17448
17484
  return i.reduce((t, n) => t + Dy(e, n), 0);
17449
17485
  }, [
17450
17486
  L,
17451
17487
  a,
17452
17488
  i
17453
- ]), z = h(() => {
17454
- let e = L - ee, t = R.length * C;
17489
+ ]), B = h(() => {
17490
+ let e = L - z, t = R.length * C;
17455
17491
  return Math.max(e, t);
17456
17492
  }, [
17457
17493
  L,
17458
- ee,
17494
+ z,
17459
17495
  R,
17460
17496
  C
17461
- ]), B = h(() => Oy(r, t, n, O, D), [
17497
+ ]), V = h(() => Oy(r, t, n, O, D), [
17462
17498
  r,
17463
17499
  t,
17464
17500
  n,
17465
17501
  O,
17466
17502
  D
17467
- ]), te = h(() => {
17503
+ ]), ee = h(() => {
17468
17504
  let e = L * a / 100, t = i.map((t, n) => {
17469
17505
  let r = t.dataKey || t.accessor || t.key || `col_${n}`, i = Dy(e, t), a = {
17470
17506
  dataKey: r,
@@ -17499,7 +17535,7 @@ var Ny = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
17499
17535
  }), n = {
17500
17536
  dataKey: "__gantt__",
17501
17537
  key: "__gantt__",
17502
- width: z,
17538
+ width: B,
17503
17539
  sortable: !1,
17504
17540
  resizable: !1,
17505
17541
  headerClassName: "stratus-gantt__header-gantt",
@@ -17508,10 +17544,10 @@ var Ny = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
17508
17544
  className: "stratus-gantt__header-dates",
17509
17545
  style: {
17510
17546
  display: "flex",
17511
- width: z
17547
+ width: B
17512
17548
  },
17513
17549
  children: R.map((e, t) => {
17514
- let n = z / R.length, r = T ? T({
17550
+ let n = B / R.length, r = T ? T({
17515
17551
  column: {},
17516
17552
  columnIndex: t,
17517
17553
  date: e
@@ -17530,12 +17566,12 @@ var Ny = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
17530
17566
  style: {
17531
17567
  display: "flex",
17532
17568
  alignItems: "center",
17533
- width: z,
17569
+ width: B,
17534
17570
  height: "100%"
17535
17571
  },
17536
17572
  children: /* @__PURE__ */ x(ky, {
17537
17573
  rowData: e,
17538
- rowWidth: z,
17574
+ rowWidth: B,
17539
17575
  ganttTaskHeight: w,
17540
17576
  ganttTaskProps: f,
17541
17577
  ganttRowRenderer: E
@@ -17547,7 +17583,7 @@ var Ny = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
17547
17583
  L,
17548
17584
  a,
17549
17585
  i,
17550
- z,
17586
+ B,
17551
17587
  R,
17552
17588
  T,
17553
17589
  D,
@@ -17560,10 +17596,10 @@ var Ny = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
17560
17596
  let e = F.current.getTableRef();
17561
17597
  if (e) if (A) {
17562
17598
  let t = r.findIndex((e) => e.id === A);
17563
- t !== -1 && (e.scrollToRow(t), ne(r[t].startDate));
17564
- } else k && ne(k);
17599
+ t !== -1 && (e.scrollToRow(t), te(r[t].startDate));
17600
+ } else k && te(k);
17565
17601
  }, [k, A]);
17566
- function ne(e) {
17602
+ function te(e) {
17567
17603
  if (!e || !F.current) return;
17568
17604
  let t = yy(e), n = F.current.getTableRef();
17569
17605
  if (!n) return;
@@ -17571,38 +17607,38 @@ var Ny = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
17571
17607
  for (let e of i) o += Dy(r, e);
17572
17608
  let s = R.findIndex((e) => Ty(e, t));
17573
17609
  if (s !== -1) {
17574
- let e = z / R.length, t = o + s * e;
17575
- n.scrollToLeft(t), ie(t);
17610
+ let e = B / R.length, t = o + s * e;
17611
+ n.scrollToLeft(t), re(t);
17576
17612
  }
17577
17613
  }
17578
- function re(e) {
17614
+ function ne(e) {
17579
17615
  if (!e || !F.current) return;
17580
17616
  let t = F.current.getTableRef();
17581
17617
  if (!t) return;
17582
17618
  let n = r.findIndex((t) => t.id === e);
17583
- n !== -1 && (t.scrollToRow(n), ne(r[n].startDate));
17619
+ n !== -1 && (t.scrollToRow(n), te(r[n].startDate));
17584
17620
  }
17585
- function ie(e) {
17621
+ function re(e) {
17586
17622
  b && setTimeout(() => {
17587
17623
  let t = document.getElementById("stratus-gantt__timenowLine-container");
17588
17624
  t && (t.scrollLeft = e);
17589
17625
  });
17590
17626
  }
17591
17627
  p(P, () => ({
17592
- scrollToDate: (e) => setTimeout(() => ne(e)),
17593
- scrollToTask: (e) => setTimeout(() => re(e)),
17628
+ scrollToDate: (e) => setTimeout(() => te(e)),
17629
+ scrollToTask: (e) => setTimeout(() => ne(e)),
17594
17630
  clearSortState: () => F.current?.clearSortState(),
17595
17631
  setSelectedRows: (e) => F.current?.setSelectedRows(e.map(String)),
17596
17632
  getTableRef: () => F.current
17597
17633
  }));
17598
- let ae = l((e) => {
17634
+ let ie = l((e) => {
17599
17635
  M && M({
17600
17636
  rowData: e.rowData,
17601
17637
  rowIndex: e.rowIndex,
17602
17638
  rowKey: e.rowData.id,
17603
17639
  event: e.event
17604
17640
  });
17605
- }, [M]), oe = h(() => {
17641
+ }, [M]), ae = h(() => {
17606
17642
  let e = L * a / 100;
17607
17643
  return i.filter((e) => e.frozen === "left" || e.frozen === !0).reduce((t, n) => t + Dy(e, n), 0);
17608
17644
  }, [
@@ -17617,8 +17653,8 @@ var Ny = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
17617
17653
  style: { height: "100%" },
17618
17654
  children: [/* @__PURE__ */ x(Bt, {
17619
17655
  ref: F,
17620
- columns: te,
17621
- data: B,
17656
+ columns: ee,
17657
+ data: V,
17622
17658
  rowId: "id",
17623
17659
  headerHeight: s,
17624
17660
  rowHeight: c,
@@ -17631,21 +17667,21 @@ var Ny = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
17631
17667
  noDataValue: m ?? "No data",
17632
17668
  className: "stratus-gantt__table",
17633
17669
  rowClassName: u,
17634
- onRowClick: M ? ae : void 0,
17670
+ onRowClick: M ? ie : void 0,
17635
17671
  onColumnSort: N
17636
- }), b && z > 0 && /* @__PURE__ */ x("div", {
17672
+ }), b && B > 0 && /* @__PURE__ */ x("div", {
17637
17673
  id: "stratus-gantt__timenowLine-container",
17638
17674
  className: "stratus-gantt__timenowLine-container",
17639
17675
  children: /* @__PURE__ */ x("div", {
17640
17676
  className: "stratus-gantt__overlay-inner",
17641
17677
  style: {
17642
- width: z + oe + ee,
17643
- marginLeft: oe + 2
17678
+ width: B + ae + z,
17679
+ marginLeft: ae + 2
17644
17680
  },
17645
17681
  children: /* @__PURE__ */ x(My, {
17646
17682
  start: t,
17647
17683
  end: n,
17648
- rowWidth: z,
17684
+ rowWidth: B,
17649
17685
  groupDatesBy: D
17650
17686
  })
17651
17687
  })