@stenajs-webui/core 23.21.16 → 23.22.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.es.js CHANGED
@@ -1,22 +1,22 @@
1
- import { cssColor as V } from "@stenajs-webui/theme";
2
- import { jsx as a, jsxs as O, Fragment as R } from "react/jsx-runtime";
3
- import B, { forwardRef as h, useState as g, useCallback as m, useLayoutEffect as H, useRef as y, createContext as j, useEffect as p, useMemo as E, useContext as q, isValidElement as W, Fragment as G } from "react";
4
- import S from "classnames";
5
- import C from "@emotion/styled";
6
- import { system as X, background as Y, border as K, borderRight as Z, borderLeft as J, borderTop as Q, borderBottom as ee, borderColor as te, borderRadius as re, borderStyle as ne, borderWidth as ue, boxShadow as oe, flexbox as se, overflow as ie, position as ae, layout as ce, zIndex as le, left as de, right as pe, top as me, bottom as he } from "styled-system";
7
- import { memoize as fe, pickBy as D, debounce as ge } from "lodash-es";
8
- import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
9
- separatorLine: ye
10
- }, I = h(
1
+ import { cssColor as G } from "@stenajs-webui/theme";
2
+ import { jsx as a, jsxs as V, Fragment as z } from "react/jsx-runtime";
3
+ import X, { forwardRef as g, useState as v, useCallback as p, useLayoutEffect as B, useRef as f, createContext as Y, useEffect as m, useMemo as T, useContext as K, isValidElement as Z, Fragment as J } from "react";
4
+ import R from "classnames";
5
+ import A from "@emotion/styled";
6
+ import { system as Q, background as ee, border as te, borderRight as re, borderLeft as ne, borderTop as ue, borderBottom as oe, borderColor as se, borderRadius as ie, borderStyle as ce, borderWidth as ae, boxShadow as le, flexbox as de, overflow as pe, position as me, layout as he, zIndex as fe, left as ge, right as ye, top as ve, bottom as be } from "styled-system";
7
+ import { memoize as we, pickBy as W, debounce as xe } from "lodash-es";
8
+ import './index.css';const ke = "_separatorLine_nzfcz_1", _e = {
9
+ separatorLine: ke
10
+ }, F = g(
11
11
  ({
12
- color: e = V("--lhds-color-ui-400"),
12
+ color: e = G("--lhds-color-ui-400"),
13
13
  size: t = "100%",
14
14
  width: r = "1px",
15
15
  vertical: n = !1
16
16
  }, u) => /* @__PURE__ */ a(
17
17
  "hr",
18
18
  {
19
- className: ve.separatorLine,
19
+ className: _e.separatorLine,
20
20
  "aria-hidden": !0,
21
21
  color: e,
22
22
  style: {
@@ -27,17 +27,17 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
27
27
  ref: u
28
28
  }
29
29
  )
30
- ), be = "_text_1iisw_1", we = "_standard_1iisw_24", xe = "_bold_1iisw_27", ke = "_caption_1iisw_31", _e = "_overline_1iisw_39", $e = "_large_1iisw_48", Se = "_medium_1iisw_53", Ee = "_small_1iisw_58", Ce = "_smaller_1iisw_63", b = {
31
- text: be,
32
- standard: we,
33
- bold: xe,
34
- caption: ke,
35
- overline: _e,
36
- large: $e,
37
- medium: Se,
38
- small: Ee,
39
- smaller: Ce
40
- }, x = h(
30
+ ), $e = "_text_1iisw_1", Se = "_standard_1iisw_24", Ee = "_bold_1iisw_27", Ce = "_caption_1iisw_31", Te = "_overline_1iisw_39", Re = "_large_1iisw_48", Ie = "_medium_1iisw_53", Ae = "_small_1iisw_58", Le = "_smaller_1iisw_63", _ = {
31
+ text: $e,
32
+ standard: Se,
33
+ bold: Ee,
34
+ caption: Ce,
35
+ overline: Te,
36
+ large: Re,
37
+ medium: Ie,
38
+ small: Ae,
39
+ smaller: Le
40
+ }, S = g(
41
41
  ({
42
42
  children: e,
43
43
  variant: t = "standard",
@@ -45,36 +45,36 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
45
45
  className: n,
46
46
  color: u,
47
47
  userSelect: o,
48
- whiteSpace: s,
49
- wordBreak: c,
50
- textAlign: i = "left",
51
- overflow: l,
48
+ whiteSpace: i,
49
+ wordBreak: l,
50
+ textAlign: s = "left",
51
+ overflow: c,
52
52
  textOverflow: d,
53
- style: f,
54
- ...k
55
- }, _) => /* @__PURE__ */ a(
53
+ style: h,
54
+ ...y
55
+ }, b) => /* @__PURE__ */ a(
56
56
  "span",
57
57
  {
58
- className: S(b.text, b[t], b[r], n),
59
- ref: _,
58
+ className: R(_.text, _[t], _[r], n),
59
+ ref: b,
60
60
  style: {
61
61
  color: u,
62
62
  userSelect: o,
63
- whiteSpace: s,
64
- wordBreak: c,
65
- textAlign: i,
66
- overflow: l,
63
+ whiteSpace: i,
64
+ wordBreak: l,
65
+ textAlign: s,
66
+ overflow: c,
67
67
  textOverflow: d,
68
- ...f
68
+ ...h
69
69
  },
70
- ...k,
70
+ ...y,
71
71
  children: e
72
72
  }
73
73
  )
74
- ), ft = x, $ = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, Te = (e) => {
74
+ ), wt = S, C = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, Pe = (e) => {
75
75
  if (e !== 0)
76
76
  return `calc(${e} * var(--swui-metrics-space))`;
77
- }, A = (e) => Te($(e)), Re = {
77
+ }, M = (e) => Pe(C(e)), ze = {
78
78
  // react props
79
79
  // https://github.com/facebook/react/blob/5495a7f24aef85ba6937truetrue1ce962673ca9f5fde6/src/renderers/dom/shared/hooks/ReactDOMUnknownPropertyHook.js
80
80
  children: !0,
@@ -561,16 +561,16 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
561
561
  for: !0,
562
562
  class: !0,
563
563
  autofocus: !0
564
- }, Ie = `^((${Object.keys(Re).join(
564
+ }, Fe = `^((${Object.keys(ze).join(
565
565
  "|"
566
- )})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`, Ae = new RegExp(Ie), Le = fe(
567
- (e) => Ae.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91
568
- ), Pe = {
566
+ )})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`, Me = new RegExp(Fe), Oe = we(
567
+ (e) => Me.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91
568
+ ), De = {
569
569
  box: "var(--swui-shadow-box)",
570
570
  popover: "var(--swui-shadow-popover)",
571
571
  modal: "var(--swui-shadow-modal)",
572
572
  bottom: "var(--swui-shadow-bottom)"
573
- }, ze = [
573
+ }, He = [
574
574
  "spacing",
575
575
  "indent",
576
576
  "gap",
@@ -578,7 +578,7 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
578
578
  "height",
579
579
  "overflow",
580
580
  "display"
581
- ], Fe = (e) => ze.includes(e), Me = X({
581
+ ], Ne = (e) => He.includes(e), Ue = Q({
582
582
  row: {
583
583
  property: "flexDirection",
584
584
  transform: (e) => e ? "row" : "column"
@@ -586,32 +586,32 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
586
586
  indent: {
587
587
  // @ts-expect-error Sets a CSS property.
588
588
  property: "--current-indent",
589
- transform: $
589
+ transform: C
590
590
  },
591
591
  spacing: {
592
592
  // @ts-expect-error Sets a CSS property.
593
593
  property: "--current-spacing",
594
- transform: $
594
+ transform: C
595
595
  },
596
596
  gap: {
597
597
  // @ts-expect-error Sets a CSS property.
598
598
  property: "--current-gap",
599
- transform: $
599
+ transform: C
600
600
  },
601
601
  columnGap: {
602
602
  property: "columnGap",
603
- transform: A
603
+ transform: M
604
604
  },
605
605
  rowGap: {
606
606
  property: "rowGap",
607
- transform: A
607
+ transform: M
608
608
  },
609
609
  shadow: {
610
610
  property: "boxShadow",
611
- transform: (e) => Pe[e] ?? e
611
+ transform: (e) => De[e] ?? e
612
612
  }
613
- }), v = C("div", {
614
- shouldForwardProp: (e) => typeof e == "string" ? Fe(e) ? !1 : Le(e) : !1
613
+ }), w = A("div", {
614
+ shouldForwardProp: (e) => typeof e == "string" ? Ne(e) ? !1 : Oe(e) : !1
615
615
  })`
616
616
  --current-spacing: 0;
617
617
  --current-indent: 0;
@@ -619,12 +619,7 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
619
619
  box-sizing: border-box;
620
620
  display: flex;
621
621
  flex-direction: column;
622
- ${Me};
623
- ${Y};
624
- ${K};
625
- ${Z};
626
- ${J};
627
- ${Q};
622
+ ${Ue};
628
623
  ${ee};
629
624
  ${te};
630
625
  ${re};
@@ -633,13 +628,18 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
633
628
  ${oe};
634
629
  ${se};
635
630
  ${ie};
636
- ${ae};
637
631
  ${ce};
632
+ ${ae};
638
633
  ${le};
639
634
  ${de};
640
635
  ${pe};
641
636
  ${me};
642
637
  ${he};
638
+ ${fe};
639
+ ${ge};
640
+ ${ye};
641
+ ${ve};
642
+ ${be};
643
643
 
644
644
  gap: calc(var(--current-gap) * var(--swui-metrics-space));
645
645
 
@@ -660,15 +660,15 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
660
660
  ${({ focusWithinBackground: e }) => e ? `background: ${e};` : ""}
661
661
  ${({ focusWithinBorder: e }) => e ? `border: ${e};` : ""}
662
662
  }
663
- `, Oe = h(
663
+ `, Ve = g(
664
664
  function(t, r) {
665
- return /* @__PURE__ */ a(v, { row: !0, ref: r, ...t });
665
+ return /* @__PURE__ */ a(w, { row: !0, ref: r, ...t });
666
666
  }
667
- ), gt = ({ children: e }) => /* @__PURE__ */ O(Oe, { alignItems: "center", gap: 2, children: [
668
- /* @__PURE__ */ a(v, { flexGrow: 1, children: /* @__PURE__ */ a(I, {}) }),
669
- typeof e == "string" ? /* @__PURE__ */ a(x, { children: e }) : e,
670
- /* @__PURE__ */ a(v, { flexGrow: 1, children: /* @__PURE__ */ a(I, {}) })
671
- ] }), He = C.button`
667
+ ), xt = ({ children: e }) => /* @__PURE__ */ V(Ve, { alignItems: "center", gap: 2, children: [
668
+ /* @__PURE__ */ a(w, { flexGrow: 1, children: /* @__PURE__ */ a(F, {}) }),
669
+ typeof e == "string" ? /* @__PURE__ */ a(S, { children: e }) : e,
670
+ /* @__PURE__ */ a(w, { flexGrow: 1, children: /* @__PURE__ */ a(F, {}) })
671
+ ] }), Be = A.button`
672
672
  display: inline-block;
673
673
  user-select: none;
674
674
  border: 0;
@@ -691,7 +691,7 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
691
691
  ${({ width: e }) => e ? `width: ${e};` : ""}
692
692
  ${({ height: e }) => e ? `height: ${e};` : ""}
693
693
  ${({ borderRadius: e }) => e ? `border-radius: ${e};` : ""}
694
- `, yt = h(
694
+ `, kt = g(
695
695
  ({
696
696
  disableFocusHighlight: e,
697
697
  onClick: t,
@@ -699,81 +699,81 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
699
699
  tooltip: n,
700
700
  disableOpacityOnClick: u,
701
701
  disablePointer: o,
702
- opacityOnHover: s,
703
- disabled: c,
704
- children: i,
705
- background: l = "transparent",
702
+ opacityOnHover: i,
703
+ disabled: l,
704
+ children: s,
705
+ background: c = "transparent",
706
706
  hoverBackground: d,
707
- focusBackground: f,
708
- type: k = "button",
709
- ..._
710
- }, U) => /* @__PURE__ */ a(
711
- He,
707
+ focusBackground: h,
708
+ type: y = "button",
709
+ ...b
710
+ }, x) => /* @__PURE__ */ a(
711
+ Be,
712
712
  {
713
- opacityOnHover: s,
713
+ opacityOnHover: i,
714
714
  title: n,
715
- disabled: c,
715
+ disabled: l,
716
716
  disableOpacityOnClick: u,
717
717
  onClick: t,
718
718
  onDoubleClick: r,
719
719
  disableFocusHighlight: e,
720
720
  pointer: !!(t || r) && !o,
721
- ref: U,
722
- background: l,
721
+ ref: x,
722
+ background: c,
723
723
  hoverBackground: d,
724
- focusBackground: f,
725
- type: k,
726
- ..._,
727
- children: i
724
+ focusBackground: h,
725
+ type: y,
726
+ ...b,
727
+ children: s
728
728
  }
729
729
  )
730
- ), vt = h(
730
+ ), _t = g(
731
731
  function(t, r) {
732
- return /* @__PURE__ */ a(v, { ref: r, ...t });
732
+ return /* @__PURE__ */ a(w, { ref: r, ...t });
733
733
  }
734
- ), De = (e) => {
735
- const { x: t, y: r, width: n, height: u, bottom: o, top: s, left: c, right: i } = e.getBoundingClientRect();
734
+ ), We = (e) => {
735
+ const { x: t, y: r, width: n, height: u, bottom: o, top: i, left: l, right: s } = e.getBoundingClientRect();
736
736
  return {
737
737
  width: n,
738
738
  height: u,
739
- top: s,
740
- left: c,
739
+ top: i,
740
+ left: l,
741
741
  x: t,
742
742
  y: r,
743
- right: i,
743
+ right: s,
744
744
  bottom: o
745
745
  };
746
- }, Ne = (e, t) => e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height && e.bottom === t.bottom && e.top === t.top && e.left === t.left && e.right === t.right, Ue = (e, t) => {
747
- const [r, n] = g(), u = m(() => {
746
+ }, je = (e, t) => e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height && e.bottom === t.bottom && e.top === t.top && e.left === t.left && e.right === t.right, qe = (e, t) => {
747
+ const [r, n] = v(), u = p(() => {
748
748
  window.requestAnimationFrame(() => {
749
749
  if (e.current) {
750
- const o = De(e.current);
751
- (!r || !Ne(r, o)) && t && t(o), n(o);
750
+ const o = We(e.current);
751
+ (!r || !je(r, o)) && t && t(o), n(o);
752
752
  }
753
753
  });
754
754
  }, [e, r, n, t]);
755
- return H(() => {
755
+ return B(() => {
756
756
  u();
757
757
  }, [u]), {
758
758
  dimensions: r
759
759
  };
760
- }, bt = h(
760
+ }, $t = g(
761
761
  function({ onResize: t, ...r }, n) {
762
- const u = y(null);
763
- return Ue(n ?? u, t), /* @__PURE__ */ a(v, { ...r, ref: n });
762
+ const u = f(null);
763
+ return qe(n ?? u, t), /* @__PURE__ */ a(w, { ...r, ref: n });
764
764
  }
765
- ), wt = h(function({ num: t = 1, ...r }, n) {
766
- return /* @__PURE__ */ a(v, { indent: t, ref: n, ...r });
767
- }), xt = h(
765
+ ), St = g(function({ num: t = 1, ...r }, n) {
766
+ return /* @__PURE__ */ a(w, { indent: t, ref: n, ...r });
767
+ }), Et = g(
768
768
  function({ num: t = 1, ...r }, n) {
769
- return /* @__PURE__ */ a(v, { spacing: t, ref: n, ...r });
769
+ return /* @__PURE__ */ a(w, { spacing: t, ref: n, ...r });
770
770
  }
771
- ), Ve = C.div`
771
+ ), Ge = A.div`
772
772
  --current-size: 1;
773
773
  flex: none;
774
774
  width: calc(var(--current-size) * var(--swui-metrics-space));
775
775
  height: calc(var(--current-size) * var(--swui-metrics-space));
776
- `, kt = ({
776
+ `, Ct = ({
777
777
  half: e = !1,
778
778
  horizontal: t = !1,
779
779
  num: r = 1,
@@ -781,7 +781,7 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
781
781
  }) => {
782
782
  const u = r * (e ? 0.5 : 1);
783
783
  return /* @__PURE__ */ a(
784
- Ve,
784
+ Ge,
785
785
  {
786
786
  style: {
787
787
  "--current-size": u,
@@ -790,27 +790,27 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
790
790
  }
791
791
  }
792
792
  );
793
- }, _t = ({ children: e, nest: t, render: r }) => t ? /* @__PURE__ */ a(R, { children: r(e) }) : /* @__PURE__ */ a(R, { children: e }), N = j({
793
+ }, Tt = ({ children: e, nest: t, render: r }) => t ? /* @__PURE__ */ a(z, { children: r(e) }) : /* @__PURE__ */ a(z, { children: e }), j = Y({
794
794
  isFontLarge: !1,
795
795
  fontSizeRatio: 1
796
- }), L = 12, $t = ({ children: e }) => {
797
- const t = y(null), [r, n] = g(!1), [u, o] = g(1);
798
- p(() => {
796
+ }), O = 12, Rt = ({ children: e }) => {
797
+ const t = f(null), [r, n] = v(!1), [u, o] = v(1);
798
+ m(() => {
799
799
  if (!t.current)
800
800
  return;
801
- const c = new ResizeObserver((i) => {
802
- for (const l of i) {
803
- const d = l.contentRect.height;
804
- n(d > L), o(d / L);
801
+ const l = new ResizeObserver((s) => {
802
+ for (const c of s) {
803
+ const d = c.contentRect.height;
804
+ n(d > O), o(d / O);
805
805
  }
806
806
  });
807
- return c.observe(t.current), () => c.disconnect();
807
+ return l.observe(t.current), () => l.disconnect();
808
808
  }, []);
809
- const s = E(
809
+ const i = T(
810
810
  () => ({ isFontLarge: r, fontSizeRatio: u }),
811
811
  [u, r]
812
812
  );
813
- return /* @__PURE__ */ O(N.Provider, { value: s, children: [
813
+ return /* @__PURE__ */ V(j.Provider, { value: i, children: [
814
814
  /* @__PURE__ */ a(
815
815
  "div",
816
816
  {
@@ -829,31 +829,31 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
829
829
  ),
830
830
  e
831
831
  ] });
832
- }, St = () => {
833
- const e = q(N);
832
+ }, It = () => {
833
+ const e = K(j);
834
834
  return e || {
835
835
  isFontLarge: !1,
836
836
  fontSizeRatio: 1
837
837
  };
838
- }, Be = "_lively_1k3wm_6", je = {
839
- lively: Be
840
- }, Et = h(function({ politeness: t = "polite", className: r, children: n, ...u }, o) {
838
+ }, Xe = "_lively_1k3wm_6", Ye = {
839
+ lively: Xe
840
+ }, At = g(function({ politeness: t = "polite", className: r, children: n, ...u }, o) {
841
841
  return /* @__PURE__ */ a(
842
842
  "div",
843
843
  {
844
844
  ref: o,
845
- className: S(je.lively, r),
845
+ className: R(Ye.lively, r),
846
846
  "aria-live": t,
847
847
  ...u,
848
848
  children: n
849
849
  }
850
850
  );
851
- }), qe = "_visuallyHidden_1gevf_1", We = {
852
- visuallyHidden: qe
853
- }, Ge = (e) => D(e, Xe), Ct = (e) => D(e, Ye), Xe = (e, t) => t.startsWith("data-") || t.startsWith("aria-"), Ye = (e, t) => t.startsWith("aria-"), Tt = ({
851
+ }), Ke = "_visuallyHidden_1gevf_1", Ze = {
852
+ visuallyHidden: Ke
853
+ }, Je = (e) => W(e, Qe), Lt = (e) => W(e, et), Qe = (e, t) => t.startsWith("data-") || t.startsWith("aria-"), et = (e, t) => t.startsWith("aria-"), Pt = ({
854
854
  children: e,
855
855
  ...t
856
- }) => /* @__PURE__ */ a("span", { className: We.visuallyHidden, ...Ge(t), children: e }), Ke = h(
856
+ }) => /* @__PURE__ */ a("span", { className: Ze.visuallyHidden, ...Je(t), children: e }), tt = g(
857
857
  ({
858
858
  children: e,
859
859
  variant: t = "standard",
@@ -861,41 +861,41 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
861
861
  className: n,
862
862
  color: u,
863
863
  userSelect: o,
864
- whiteSpace: s,
865
- wordBreak: c,
866
- textAlign: i = "left",
867
- overflow: l,
864
+ whiteSpace: i,
865
+ wordBreak: l,
866
+ textAlign: s = "left",
867
+ overflow: c,
868
868
  textOverflow: d,
869
- style: f,
870
- ...k
871
- }, _) => /* @__PURE__ */ a(
869
+ style: h,
870
+ ...y
871
+ }, b) => /* @__PURE__ */ a(
872
872
  "p",
873
873
  {
874
- className: S(b.text, b[t], b[r], n),
875
- ref: _,
874
+ className: R(_.text, _[t], _[r], n),
875
+ ref: b,
876
876
  style: {
877
877
  color: u,
878
878
  userSelect: o,
879
- whiteSpace: s,
880
- wordBreak: c,
881
- textAlign: i,
882
- overflow: l,
879
+ whiteSpace: i,
880
+ wordBreak: l,
881
+ textAlign: s,
882
+ overflow: c,
883
883
  textOverflow: d,
884
- ...f
884
+ ...h
885
885
  },
886
- ...k,
886
+ ...y,
887
887
  children: e
888
888
  }
889
889
  )
890
- ), Rt = Ke, It = (e) => /* @__PURE__ */ a(x, { size: "small", ...e }), At = (e) => /* @__PURE__ */ a(x, { size: "smaller", ...e }), Lt = (e) => /* @__PURE__ */ a(x, { size: "medium", ...e }), Pt = (e) => /* @__PURE__ */ a(x, { size: "large", ...e }), Ze = "_heading_1cnsg_1", Je = "_h1_1cnsg_10", Qe = "_h2_1cnsg_14", et = "_h3_1cnsg_18", tt = "_h4_1cnsg_22", rt = "_h5_1cnsg_26", nt = "_h6_1cnsg_30", P = {
891
- heading: Ze,
892
- h1: Je,
893
- h2: Qe,
894
- h3: et,
895
- h4: tt,
896
- h5: rt,
897
- h6: nt
898
- }, ut = h(
890
+ ), zt = tt, Ft = (e) => /* @__PURE__ */ a(S, { size: "small", ...e }), Mt = (e) => /* @__PURE__ */ a(S, { size: "smaller", ...e }), Ot = (e) => /* @__PURE__ */ a(S, { size: "medium", ...e }), Dt = (e) => /* @__PURE__ */ a(S, { size: "large", ...e }), rt = "_heading_1cnsg_1", nt = "_h1_1cnsg_10", ut = "_h2_1cnsg_14", ot = "_h3_1cnsg_18", st = "_h4_1cnsg_22", it = "_h5_1cnsg_26", ct = "_h6_1cnsg_30", D = {
891
+ heading: rt,
892
+ h1: nt,
893
+ h2: ut,
894
+ h3: ot,
895
+ h4: st,
896
+ h5: it,
897
+ h6: ct
898
+ }, at = g(
899
899
  ({
900
900
  variant: e = "h3",
901
901
  className: t,
@@ -903,37 +903,37 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
903
903
  whiteSpace: n,
904
904
  wordBreak: u,
905
905
  style: o,
906
- children: s,
907
- as: c,
908
- ...i
909
- }, l) => /* @__PURE__ */ a(
910
- c ?? e,
906
+ children: i,
907
+ as: l,
908
+ ...s
909
+ }, c) => /* @__PURE__ */ a(
910
+ l ?? e,
911
911
  {
912
- className: S(P.heading, P[e], t),
912
+ className: R(D.heading, D[e], t),
913
913
  style: { color: r, whiteSpace: n, wordBreak: u, ...o },
914
- ref: l,
915
- ...i,
916
- children: s
914
+ ref: c,
915
+ ...s,
916
+ children: i
917
917
  }
918
918
  )
919
- ), zt = (e) => /* @__PURE__ */ a(ut, { variant: "h2", ...e }), Ft = ({
919
+ ), Ht = (e) => /* @__PURE__ */ a(at, { variant: "h2", ...e }), Nt = ({
920
920
  blockedKeys: e,
921
921
  blockMouse: t = !1,
922
922
  ...r
923
923
  }) => {
924
- const n = m(
924
+ const n = p(
925
925
  (o) => {
926
926
  (e == null || (Array.isArray(e) ? e.includes(o.key) : e === o.key)) && o.stopPropagation();
927
927
  },
928
928
  [e]
929
- ), u = m(
929
+ ), u = p(
930
930
  (o) => {
931
931
  t && o.stopPropagation();
932
932
  },
933
933
  [t]
934
934
  );
935
935
  return /* @__PURE__ */ a(
936
- v,
936
+ w,
937
937
  {
938
938
  ...r,
939
939
  onKeyDown: n,
@@ -942,33 +942,33 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
942
942
  onMouseUp: u
943
943
  }
944
944
  );
945
- }, ot = (e, t) => e === t, Mt = (e, t, r = ot) => {
946
- const n = m(
947
- (i) => {
948
- e.some((l) => r(l, i)) || t([...e, i]);
945
+ }, lt = (e, t) => e === t, Ut = (e, t, r = lt) => {
946
+ const n = p(
947
+ (s) => {
948
+ e.some((c) => r(c, s)) || t([...e, s]);
949
949
  },
950
950
  [e, t, r]
951
- ), u = m(
952
- (i) => {
951
+ ), u = p(
952
+ (s) => {
953
953
  t(
954
- i.reduce((l, d) => l.some((f) => r(f, d)) ? l : [...l, d], e)
954
+ s.reduce((c, d) => c.some((h) => r(h, d)) ? c : [...c, d], e)
955
955
  );
956
956
  },
957
957
  [e, t, r]
958
- ), o = m(
959
- (i) => {
960
- const l = e.findIndex((d) => r(d, i));
961
- l >= 0 && t(e.filter((d, f) => f !== l));
958
+ ), o = p(
959
+ (s) => {
960
+ const c = e.findIndex((d) => r(d, s));
961
+ c >= 0 && t(e.filter((d, h) => h !== c));
962
962
  },
963
963
  [e, t, r]
964
- ), s = m(
965
- (i) => {
966
- t(e.filter((l) => !i.some((d) => r(d, l))));
964
+ ), i = p(
965
+ (s) => {
966
+ t(e.filter((c) => !s.some((d) => r(d, c))));
967
967
  },
968
968
  [e, t, r]
969
- ), c = m(
970
- (i) => {
971
- e.some((d) => r(d, i)) ? o(i) : n(i);
969
+ ), l = p(
970
+ (s) => {
971
+ e.some((d) => r(d, s)) ? o(s) : n(s);
972
972
  },
973
973
  [e, n, o, r]
974
974
  );
@@ -976,21 +976,21 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
976
976
  add: n,
977
977
  addMultiple: u,
978
978
  remove: o,
979
- removeMultiple: s,
980
- toggle: c
979
+ removeMultiple: i,
980
+ toggle: l
981
981
  };
982
- }, T = (e) => {
983
- const [t, r] = g(e), n = m(() => {
982
+ }, L = (e) => {
983
+ const [t, r] = v(e), n = p(() => {
984
984
  r(!0);
985
- }, [r]), u = m(() => {
985
+ }, [r]), u = p(() => {
986
986
  r(!1);
987
- }, [r]), o = m(() => {
988
- r((s) => !s);
987
+ }, [r]), o = p(() => {
988
+ r((i) => !i);
989
989
  }, [r]);
990
990
  return [t, n, u, o];
991
- }, Ot = (e, t) => {
992
- const [r, n] = g(e);
993
- return p(() => {
991
+ }, Vt = (e, t) => {
992
+ const [r, n] = v(e);
993
+ return m(() => {
994
994
  const u = setTimeout(() => {
995
995
  n(e);
996
996
  }, t);
@@ -998,9 +998,60 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
998
998
  clearTimeout(u);
999
999
  };
1000
1000
  }, [e, t]), r;
1001
- }, Ht = (e, t) => {
1002
- const [r, n] = g(e);
1003
- return p(() => {
1001
+ }, I = (e) => {
1002
+ const t = f(e);
1003
+ return B(() => {
1004
+ t.current = e;
1005
+ }), p((...r) => {
1006
+ const { current: n } = t;
1007
+ return n(...r);
1008
+ }, []);
1009
+ }, dt = (e) => {
1010
+ const t = X.useRef(e);
1011
+ return t.current = e, t;
1012
+ }, Bt = (e, { delay: t, onError: r, onSettled: n }) => {
1013
+ const u = I(e), o = I(
1014
+ (k, E) => r?.(k, E)
1015
+ ), i = I(() => n?.()), l = dt(t), s = f(null), c = f(null), d = f(null), h = p(() => {
1016
+ c.current != null && (clearTimeout(c.current), c.current = null);
1017
+ }, []), y = p(() => {
1018
+ if (d.current != null)
1019
+ return d.current;
1020
+ if (s.current == null)
1021
+ return Promise.resolve();
1022
+ const k = async () => {
1023
+ try {
1024
+ for (; s.current != null; ) {
1025
+ const { value: P } = s.current;
1026
+ s.current = null, h();
1027
+ try {
1028
+ await u(P);
1029
+ } catch (q) {
1030
+ o(q, P);
1031
+ }
1032
+ }
1033
+ } finally {
1034
+ d.current = null, i();
1035
+ }
1036
+ }, E = Promise.resolve().then(k);
1037
+ return d.current = E, E;
1038
+ }, [h, u, o, i]), b = p(
1039
+ (k) => {
1040
+ s.current = { value: k }, h(), c.current = setTimeout(() => {
1041
+ c.current = null, y();
1042
+ }, l.current);
1043
+ },
1044
+ [h, y, l]
1045
+ ), x = p(() => {
1046
+ h(), s.current = null;
1047
+ }, [h]);
1048
+ return m(() => x, [x]), T(
1049
+ () => ({ schedule: b, flush: y, cancel: x }),
1050
+ [b, y, x]
1051
+ );
1052
+ }, Wt = (e, t) => {
1053
+ const [r, n] = v(e);
1054
+ return m(() => {
1004
1055
  e && n(!0);
1005
1056
  const u = setTimeout(() => {
1006
1057
  e || n(e);
@@ -1010,74 +1061,63 @@ import './index.css';const ye = "_separatorLine_nzfcz_1", ve = {
1010
1061
  };
1011
1062
  }, [e, t]), r;
1012
1063
  };
1013
- let st = 0;
1014
- const z = (e) => `webui-${e ? e + "-" : ""}${++st}`, Dt = (e) => {
1015
- const [t, r] = g(() => z(e));
1016
- return p(() => r(z(e)), [e]), t;
1017
- }, w = (e, t, r) => {
1018
- const n = y(null);
1019
- p(() => {
1064
+ let pt = 0;
1065
+ const H = (e) => `webui-${e ? e + "-" : ""}${++pt}`, jt = (e) => {
1066
+ const [t, r] = v(() => H(e));
1067
+ return m(() => r(H(e)), [e]), t;
1068
+ }, $ = (e, t, r) => {
1069
+ const n = f(null);
1070
+ m(() => {
1020
1071
  n.current = r;
1021
- }, [r]), p(() => {
1072
+ }, [r]), m(() => {
1022
1073
  if (!(e.current && e.current.addEventListener)) return;
1023
- const o = (c) => {
1074
+ const o = (l) => {
1024
1075
  if (n.current)
1025
- return n.current(c);
1076
+ return n.current(l);
1026
1077
  };
1027
1078
  if (!e.current)
1028
1079
  return;
1029
- const s = e.current;
1030
- return s.addEventListener(t, o), () => {
1031
- s && s.removeEventListener(t, o);
1080
+ const i = e.current;
1081
+ return i.addEventListener(t, o), () => {
1082
+ i && i.removeEventListener(t, o);
1032
1083
  };
1033
1084
  }, [t, e]);
1034
- }, Nt = (e) => {
1035
- const [t, r, n] = T(!1);
1036
- p(() => {
1085
+ }, qt = (e) => {
1086
+ const [t, r, n] = L(!1);
1087
+ m(() => {
1037
1088
  document.activeElement === e.current ? r() : n();
1038
- }, [e, n, r]), w(e, "focus", r), w(e, "blur", n);
1039
- const u = m(() => {
1089
+ }, [e, n, r]), $(e, "focus", r), $(e, "blur", n);
1090
+ const u = p(() => {
1040
1091
  e.current && e.current.focus();
1041
- }, [e]), o = m(() => {
1092
+ }, [e]), o = p(() => {
1042
1093
  e.current && e.current.blur();
1043
1094
  }, [e]);
1044
1095
  return { isInFocus: t, focus: u, blur: o };
1045
- }, Ut = (e) => {
1046
- const t = y(e);
1047
- return H(() => {
1048
- t.current = e;
1049
- }), m((...r) => {
1050
- const { current: n } = t;
1051
- return n(...r);
1052
- }, []);
1053
- }, Vt = (e) => {
1054
- const t = B.useRef(e);
1055
- return t.current = e, t;
1056
- }, Bt = (e) => {
1057
- const [t, r, n] = T(!1);
1058
- return w(e, "mouseover", r), w(e, "mouseout", n), t;
1059
- }, jt = (e) => {
1060
- const [t, r, n] = T(!1);
1061
- return w(e, "mouseenter", r), w(e, "mouseleave", n), t;
1062
- }, qt = (e, t) => {
1063
- const r = y(() => {
1096
+ }, Gt = (e) => {
1097
+ const [t, r, n] = L(!1);
1098
+ return $(e, "mouseover", r), $(e, "mouseout", n), t;
1099
+ }, Xt = (e) => {
1100
+ const [t, r, n] = L(!1);
1101
+ return $(e, "mouseenter", r), $(e, "mouseleave", n), t;
1102
+ }, Yt = (e, t) => {
1103
+ const r = f(() => {
1064
1104
  });
1065
- p(() => {
1105
+ m(() => {
1066
1106
  r.current = t;
1067
- }, [t]), p(() => {
1107
+ }, [t]), m(() => {
1068
1108
  const n = (u) => {
1069
- e.filter((s) => s.current).every((s) => s.current && !s.current.contains(u.target)) && r.current(u);
1109
+ e.filter((i) => i.current).every((i) => i.current && !i.current.contains(u.target)) && r.current(u);
1070
1110
  };
1071
1111
  return document.addEventListener("mousedown", n), document.addEventListener("touchstart", n), () => {
1072
1112
  document.removeEventListener("mousedown", n), document.removeEventListener("touchstart", n);
1073
1113
  };
1074
1114
  }, [...e]);
1075
- }, Wt = (e, t, r) => {
1076
- const n = y(() => {
1115
+ }, Kt = (e, t, r) => {
1116
+ const n = f(() => {
1077
1117
  });
1078
- p(() => {
1118
+ m(() => {
1079
1119
  n.current = t;
1080
- }, [t]), p(() => {
1120
+ }, [t]), m(() => {
1081
1121
  const u = (o) => {
1082
1122
  !e.current || e.current.contains(o.target) || n.current(o);
1083
1123
  };
@@ -1085,70 +1125,70 @@ const z = (e) => `webui-${e ? e + "-" : ""}${++st}`, Dt = (e) => {
1085
1125
  document.removeEventListener("mousedown", u, r), document.removeEventListener("touchstart", u, r);
1086
1126
  };
1087
1127
  }, [e, r]);
1088
- }, F = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], Gt = (e, t) => {
1089
- const r = y(() => {
1128
+ }, N = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], Zt = (e, t) => {
1129
+ const r = f(() => {
1090
1130
  });
1091
- p(() => {
1131
+ m(() => {
1092
1132
  r.current = e;
1093
- }, [e]), p(() => {
1094
- const n = ge(r.current, t);
1095
- return F.forEach((u) => window.addEventListener(u, n)), () => {
1096
- F.forEach(
1133
+ }, [e]), m(() => {
1134
+ const n = xe(r.current, t);
1135
+ return N.forEach((u) => window.addEventListener(u, n)), () => {
1136
+ N.forEach(
1097
1137
  (u) => window.removeEventListener(u, n)
1098
1138
  );
1099
1139
  };
1100
1140
  }, [t]);
1101
- }, Xt = (e, t) => {
1102
- const [r, n] = g(!1), { rootMargin: u, root: o, threshold: s } = t || {}, c = E(() => new IntersectionObserver(
1103
- ([i]) => n(i.isIntersecting),
1141
+ }, Jt = (e, t) => {
1142
+ const [r, n] = v(!1), { rootMargin: u, root: o, threshold: i } = t || {}, l = T(() => new IntersectionObserver(
1143
+ ([s]) => n(s.isIntersecting),
1104
1144
  {
1105
1145
  rootMargin: u,
1106
1146
  root: o,
1107
- threshold: s
1147
+ threshold: i
1108
1148
  }
1109
- ), [n, u, o, s]);
1110
- return p(() => (e.current && c.observe(e.current), () => {
1111
- c.disconnect();
1112
- }), [c, e]), r;
1113
- }, Yt = (e) => {
1114
- const t = y(null);
1115
- return p(() => {
1149
+ ), [n, u, o, i]);
1150
+ return m(() => (e.current && l.observe(e.current), () => {
1151
+ l.disconnect();
1152
+ }), [l, e]), r;
1153
+ }, Qt = (e) => {
1154
+ const t = f(null);
1155
+ return m(() => {
1116
1156
  e && (typeof e == "function" ? e(t.current) : e.current = t.current);
1117
1157
  }), t;
1118
- }, Kt = (e, t, r = !0) => {
1119
- const [n, u] = g(e), o = y(null), s = m(
1120
- (c, i = t) => {
1121
- u(c), r && clearTimeout(o.current), o.current = setTimeout(() => u(e), i);
1158
+ }, er = (e, t, r = !0) => {
1159
+ const [n, u] = v(e), o = f(null), i = p(
1160
+ (l, s = t) => {
1161
+ u(l), r && clearTimeout(o.current), o.current = setTimeout(() => u(e), s);
1122
1162
  },
1123
1163
  [t, r, e]
1124
1164
  );
1125
- return p(() => () => {
1165
+ return m(() => () => {
1126
1166
  clearTimeout(o.current);
1127
- }, []), [n, s];
1128
- }, Zt = () => E(() => /* @__PURE__ */ new Date(), []), Jt = (e) => (t, r) => e(t).localeCompare(e(r)), Qt = (e) => (t, r) => e(t) - e(r), er = (e) => {
1167
+ }, []), [n, i];
1168
+ }, tr = () => T(() => /* @__PURE__ */ new Date(), []), rr = (e) => (t, r) => e(t).localeCompare(e(r)), nr = (e) => (t, r) => e(t) - e(r), ur = (e) => {
1129
1169
  throw new Error(`Switch unhandled case: ${e}`);
1130
- }, tr = (e, t) => t, rr = (e) => Object.keys(e).filter((t) => e[t]), nr = (e) => {
1170
+ }, or = (e, t) => t, sr = (e) => Object.keys(e).filter((t) => e[t]), ir = (e) => {
1131
1171
  try {
1132
1172
  const t = parseFloat(e);
1133
1173
  return isNaN(t) || t == null ? void 0 : t;
1134
1174
  } catch {
1135
1175
  }
1136
- }, ur = (e) => {
1176
+ }, cr = (e) => {
1137
1177
  try {
1138
1178
  const t = parseInt(e, 10);
1139
1179
  return isNaN(t) || t == null ? void 0 : t;
1140
1180
  } catch {
1141
1181
  }
1142
1182
  };
1143
- function or(e, t) {
1183
+ function ar(e, t) {
1144
1184
  if (e == null)
1145
1185
  throw new Error("Invariant error: " + t);
1146
1186
  }
1147
- const sr = (e) => {
1148
- if (!W(e) || e.type !== G) return !1;
1187
+ const lr = (e) => {
1188
+ if (!Z(e) || e.type !== J) return !1;
1149
1189
  const r = e.props.children;
1150
- return Array.isArray(r) ? r.every(M) : M(r);
1151
- }, M = (e) => e == null || e === !1, ir = (e) => {
1190
+ return Array.isArray(r) ? r.every(U) : U(r);
1191
+ }, U = (e) => e == null || e === !1, dr = (e) => {
1152
1192
  try {
1153
1193
  const t = new Intl.PluralRules(e);
1154
1194
  return (r) => t.select(r);
@@ -1166,68 +1206,69 @@ const sr = (e) => {
1166
1206
  }
1167
1207
  };
1168
1208
  }
1169
- }, ar = (e) => (t, r) => r[e(t)] ?? r.other ?? "";
1209
+ }, pr = (e) => (t, r) => r[e(t)] ?? r.other ?? "";
1170
1210
  export {
1171
- N as AccessibleFontSizeContext,
1172
- $t as AccessibleFontSizeProvider,
1173
- Ft as BlockKeyboardEvents,
1174
- v as Box,
1175
- yt as Clickable,
1176
- vt as Column,
1177
- zt as HeaderText,
1178
- ut as Heading,
1179
- wt as Indent,
1180
- Pt as LargeText,
1181
- Et as Lively,
1182
- _t as Nest,
1183
- Rt as P,
1184
- Ke as Paragraph,
1185
- bt as ResizeAwareBox,
1186
- Oe as Row,
1187
- Tt as ScreenReaderOnlyText,
1188
- I as SeparatorLine,
1189
- gt as SeparatorText,
1190
- It as SmallText,
1191
- At as SmallerText,
1192
- kt as Space,
1193
- xt as Spacing,
1194
- Lt as StandardText,
1195
- x as Text,
1196
- ft as Txt,
1197
- $ as booleanOrNumberToNumber,
1198
- Qt as byNumberField,
1199
- Jt as byStringField,
1200
- tr as exhaustSwitchCase,
1201
- er as exhaustSwitchCaseElseThrow,
1202
- Ct as getAriaProps,
1203
- Ge as getDataProps,
1204
- De as getDimensionObject,
1205
- or as invariant,
1206
- sr as isEmptyFragment,
1207
- nr as parseFloatElseUndefined,
1208
- ur as parseIntElseUndefined,
1209
- ar as pluralFormatter,
1210
- ir as selectPluralRule,
1211
- rr as truthyKeysAsList,
1212
- St as useAccessibleFontSizeContext,
1213
- Mt as useArraySet,
1214
- T as useBoolean,
1215
- Ot as useDebounce,
1216
- Ht as useDelayedFalse,
1217
- Dt as useDomId,
1218
- Ue as useElementDimensions,
1219
- Nt as useElementFocus,
1220
- Ut as useEventCallback,
1221
- w as useEventListener,
1222
- Yt as useForwardedRef,
1223
- Vt as useLatest,
1224
- jt as useMouseIsEntered,
1225
- Bt as useMouseIsOver,
1226
- qt as useMultiOnClickOutside,
1227
- Wt as useOnClickOutside,
1228
- Gt as useOnNoMouseMovement,
1229
- Xt as useOnScreen,
1230
- Kt as useTimeoutState,
1231
- Zt as useToday
1211
+ j as AccessibleFontSizeContext,
1212
+ Rt as AccessibleFontSizeProvider,
1213
+ Nt as BlockKeyboardEvents,
1214
+ w as Box,
1215
+ kt as Clickable,
1216
+ _t as Column,
1217
+ Ht as HeaderText,
1218
+ at as Heading,
1219
+ St as Indent,
1220
+ Dt as LargeText,
1221
+ At as Lively,
1222
+ Tt as Nest,
1223
+ zt as P,
1224
+ tt as Paragraph,
1225
+ $t as ResizeAwareBox,
1226
+ Ve as Row,
1227
+ Pt as ScreenReaderOnlyText,
1228
+ F as SeparatorLine,
1229
+ xt as SeparatorText,
1230
+ Ft as SmallText,
1231
+ Mt as SmallerText,
1232
+ Ct as Space,
1233
+ Et as Spacing,
1234
+ Ot as StandardText,
1235
+ S as Text,
1236
+ wt as Txt,
1237
+ C as booleanOrNumberToNumber,
1238
+ nr as byNumberField,
1239
+ rr as byStringField,
1240
+ or as exhaustSwitchCase,
1241
+ ur as exhaustSwitchCaseElseThrow,
1242
+ Lt as getAriaProps,
1243
+ Je as getDataProps,
1244
+ We as getDimensionObject,
1245
+ ar as invariant,
1246
+ lr as isEmptyFragment,
1247
+ ir as parseFloatElseUndefined,
1248
+ cr as parseIntElseUndefined,
1249
+ pr as pluralFormatter,
1250
+ dr as selectPluralRule,
1251
+ sr as truthyKeysAsList,
1252
+ It as useAccessibleFontSizeContext,
1253
+ Ut as useArraySet,
1254
+ L as useBoolean,
1255
+ Vt as useDebounce,
1256
+ Bt as useDebouncedWrite,
1257
+ Wt as useDelayedFalse,
1258
+ jt as useDomId,
1259
+ qe as useElementDimensions,
1260
+ qt as useElementFocus,
1261
+ I as useEventCallback,
1262
+ $ as useEventListener,
1263
+ Qt as useForwardedRef,
1264
+ dt as useLatest,
1265
+ Xt as useMouseIsEntered,
1266
+ Gt as useMouseIsOver,
1267
+ Yt as useMultiOnClickOutside,
1268
+ Kt as useOnClickOutside,
1269
+ Zt as useOnNoMouseMovement,
1270
+ Jt as useOnScreen,
1271
+ er as useTimeoutState,
1272
+ tr as useToday
1232
1273
  };
1233
1274
  //# sourceMappingURL=index.es.js.map