@stenajs-webui/core 21.4.0 → 21.5.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.
@@ -0,0 +1,2 @@
1
+ import { MutableRefObject } from "react";
2
+ export declare const useLatest: <T>(value: T) => MutableRefObject<T>;
package/dist/index.d.ts CHANGED
@@ -30,6 +30,7 @@ export * from "./hooks/UseDomId";
30
30
  export * from "./hooks/UseElementDimensions";
31
31
  export * from "./hooks/UseElementFocus";
32
32
  export * from "./hooks/UseEventListener";
33
+ export * from "./hooks/UseLatest";
33
34
  export * from "./hooks/UseMouseIsOver";
34
35
  export * from "./hooks/UseMouseIsEntered";
35
36
  export * from "./hooks/UseMultiOnClickOutside";
package/dist/index.es.js CHANGED
@@ -1,15 +1,15 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._separatorLine_nzfcz_1{display:flex;border:0;margin:0;flex:none}._visuallyHidden_1gevf_1{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._heading_1cnsg_1{font-size:2rem;color:var(--swui-text-primary-color);letter-spacing:0;margin:0;line-height:var(--swui-line-height);font-family:var(--swui-font-primary);font-weight:var(--swui-font-weight-text-bold)}._heading_1cnsg_1._h1_1cnsg_10{font-size:2.8rem}._heading_1cnsg_1._h2_1cnsg_14{font-size:2.4rem}._heading_1cnsg_1._h3_1cnsg_18{font-size:2rem}._heading_1cnsg_1._h4_1cnsg_22{font-size:1.8rem}._heading_1cnsg_1._h5_1cnsg_26{font-size:1.6rem}._heading_1cnsg_1._h6_1cnsg_30{font-size:1.4rem}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
2
  import { cssColor as A } from "@stenajs-webui/theme";
3
3
  import { jsx as a, Fragment as S } from "react/jsx-runtime";
4
- import { forwardRef as h, useState as f, useCallback as m, useLayoutEffect as P, useRef as v, useEffect as d, useMemo as D } from "react";
4
+ import P, { forwardRef as h, useState as f, useCallback as m, useLayoutEffect as D, useRef as v, useEffect as d, useMemo as H } from "react";
5
5
  import _ from "@emotion/styled";
6
- import { system as H, background as z, border as F, borderRight as N, borderLeft as U, borderTop as V, borderBottom as q, borderColor as j, borderRadius as B, borderStyle as W, borderWidth as X, boxShadow as G, flexbox as Y, overflow as K, position as Z, layout as J, zIndex as Q, left as ee, right as te, top as re, bottom as ue } from "styled-system";
7
- import { memoize as ne, pickBy as oe, debounce as se } from "lodash-es";
6
+ import { system as z, background as F, border as N, borderRight as U, borderLeft as V, borderTop as q, borderBottom as j, borderColor as B, borderRadius as W, borderStyle as X, borderWidth as G, boxShadow as Y, flexbox as K, overflow as Z, position as J, layout as Q, zIndex as ee, left as te, right as re, top as ue, bottom as ne } from "styled-system";
7
+ import { memoize as oe, pickBy as se, debounce as ie } from "lodash-es";
8
8
  import R from "classnames";
9
- import * as ie from "react-dom";
10
- const ae = "_separatorLine_nzfcz_1", ce = {
11
- separatorLine: ae
12
- }, rt = h(
9
+ import * as ae from "react-dom";
10
+ const ce = "_separatorLine_nzfcz_1", le = {
11
+ separatorLine: ce
12
+ }, ut = h(
13
13
  ({
14
14
  color: e = A("--lhds-color-ui-300"),
15
15
  size: t = "100%",
@@ -18,7 +18,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
18
18
  }, n) => /* @__PURE__ */ a(
19
19
  "hr",
20
20
  {
21
- className: ce.separatorLine,
21
+ className: le.separatorLine,
22
22
  "aria-hidden": !0,
23
23
  color: e,
24
24
  style: {
@@ -29,7 +29,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
29
29
  ref: n
30
30
  }
31
31
  )
32
- ), le = _.button`
32
+ ), de = _.button`
33
33
  display: inline-block;
34
34
  user-select: none;
35
35
  border: 0;
@@ -52,7 +52,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
52
52
  ${({ width: e }) => e ? `width: ${e};` : ""}
53
53
  ${({ height: e }) => e ? `height: ${e};` : ""}
54
54
  ${({ borderRadius: e }) => e ? `border-radius: ${e};` : ""}
55
- `, ut = h(
55
+ `, nt = h(
56
56
  ({
57
57
  disableFocusHighlight: e,
58
58
  onClick: t,
@@ -66,10 +66,10 @@ const ae = "_separatorLine_nzfcz_1", ce = {
66
66
  background: l = "transparent",
67
67
  hoverBackground: p,
68
68
  focusBackground: g,
69
- type: M = "button",
70
- ...O
71
- }, L) => /* @__PURE__ */ a(
72
- le,
69
+ type: L = "button",
70
+ ...M
71
+ }, O) => /* @__PURE__ */ a(
72
+ de,
73
73
  {
74
74
  opacityOnHover: s,
75
75
  title: u,
@@ -79,19 +79,19 @@ const ae = "_separatorLine_nzfcz_1", ce = {
79
79
  onDoubleClick: r,
80
80
  disableFocusHighlight: e,
81
81
  pointer: !!(t || r) && !o,
82
- ref: L,
82
+ ref: O,
83
83
  background: l,
84
84
  hoverBackground: p,
85
85
  focusBackground: g,
86
- type: M,
87
- ...O,
86
+ type: L,
87
+ ...M,
88
88
  children: i
89
89
  }
90
90
  )
91
- ), x = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, de = (e) => {
91
+ ), x = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, pe = (e) => {
92
92
  if (e !== 0)
93
93
  return `calc(${e} * var(--swui-metrics-space))`;
94
- }, E = (e) => de(x(e)), pe = {
94
+ }, E = (e) => pe(x(e)), me = {
95
95
  // react props
96
96
  // https://github.com/facebook/react/blob/5495a7f24aef85ba6937truetrue1ce962673ca9f5fde6/src/renderers/dom/shared/hooks/ReactDOMUnknownPropertyHook.js
97
97
  children: !0,
@@ -578,17 +578,17 @@ const ae = "_separatorLine_nzfcz_1", ce = {
578
578
  for: !0,
579
579
  class: !0,
580
580
  autofocus: !0
581
- }, me = `^((${Object.keys(pe).join(
581
+ }, he = `^((${Object.keys(me).join(
582
582
  "|"
583
- )})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`, he = new RegExp(me), ge = ne(
584
- (e) => he.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91
583
+ )})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`, ge = new RegExp(he), fe = oe(
584
+ (e) => ge.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91
585
585
  /* Z+1 */
586
- ), fe = {
586
+ ), ve = {
587
587
  box: "var(--swui-shadow-box)",
588
588
  popover: "var(--swui-shadow-popover)",
589
589
  modal: "var(--swui-shadow-modal)",
590
590
  bottom: "var(--swui-shadow-bottom)"
591
- }, ve = [
591
+ }, ye = [
592
592
  "spacing",
593
593
  "indent",
594
594
  "gap",
@@ -596,7 +596,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
596
596
  "height",
597
597
  "overflow",
598
598
  "display"
599
- ], ye = (e) => ve.includes(e), be = H({
599
+ ], be = (e) => ye.includes(e), we = z({
600
600
  row: {
601
601
  property: "flexDirection",
602
602
  transform: (e) => e ? "row" : "column"
@@ -626,10 +626,10 @@ const ae = "_separatorLine_nzfcz_1", ce = {
626
626
  },
627
627
  shadow: {
628
628
  property: "boxShadow",
629
- transform: (e) => fe[e] ?? e
629
+ transform: (e) => ve[e] ?? e
630
630
  }
631
631
  }), b = _("div", {
632
- shouldForwardProp: (e) => typeof e == "string" ? ye(e) ? !1 : ge(e) : !1
632
+ shouldForwardProp: (e) => typeof e == "string" ? be(e) ? !1 : fe(e) : !1
633
633
  })`
634
634
  --current-spacing: 0;
635
635
  --current-indent: 0;
@@ -637,8 +637,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
637
637
  box-sizing: border-box;
638
638
  display: flex;
639
639
  flex-direction: column;
640
- ${be};
641
- ${z};
640
+ ${we};
642
641
  ${F};
643
642
  ${N};
644
643
  ${U};
@@ -658,6 +657,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
658
657
  ${te};
659
658
  ${re};
660
659
  ${ue};
660
+ ${ne};
661
661
 
662
662
  gap: calc(var(--current-gap) * var(--swui-metrics-space));
663
663
 
@@ -678,9 +678,9 @@ const ae = "_separatorLine_nzfcz_1", ce = {
678
678
  ${({ focusWithinBackground: e }) => e ? `background: ${e};` : ""}
679
679
  ${({ focusWithinBorder: e }) => e ? `border: ${e};` : ""}
680
680
  }
681
- `, nt = h(function(t, r) {
681
+ `, ot = h(function(t, r) {
682
682
  return /* @__PURE__ */ a(b, { ref: r, ...t });
683
- }), we = (e) => {
683
+ }), xe = (e) => {
684
684
  const { x: t, y: r, width: u, height: n, bottom: o, top: s, left: c, right: i } = e.getBoundingClientRect();
685
685
  return {
686
686
  width: u,
@@ -692,39 +692,39 @@ const ae = "_separatorLine_nzfcz_1", ce = {
692
692
  right: i,
693
693
  bottom: o
694
694
  };
695
- }, xe = (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, ke = (e, t) => {
695
+ }, ke = (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, _e = (e, t) => {
696
696
  const [r, u] = f(), n = m(() => {
697
697
  window.requestAnimationFrame(() => {
698
698
  if (e.current) {
699
- const o = we(e.current);
700
- (!r || !xe(r, o)) && t && t(o), u(o);
699
+ const o = xe(e.current);
700
+ (!r || !ke(r, o)) && t && t(o), u(o);
701
701
  }
702
702
  });
703
703
  }, [e, r, u, t]);
704
- return P(() => {
704
+ return D(() => {
705
705
  n();
706
706
  }, [n]), {
707
707
  dimensions: r
708
708
  };
709
- }, ot = h(
709
+ }, st = h(
710
710
  function({ onResize: t, ...r }, u) {
711
711
  const n = v(null);
712
- return ke(u ?? n, t), /* @__PURE__ */ a(b, { ...r, ref: u });
712
+ return _e(u ?? n, t), /* @__PURE__ */ a(b, { ...r, ref: u });
713
713
  }
714
- ), st = h(function(t, r) {
714
+ ), it = h(function(t, r) {
715
715
  return /* @__PURE__ */ a(b, { row: !0, ref: r, ...t });
716
- }), it = h(function({ num: t = 1, ...r }, u) {
716
+ }), at = h(function({ num: t = 1, ...r }, u) {
717
717
  return /* @__PURE__ */ a(b, { indent: t, ref: u, ...r });
718
- }), at = h(
718
+ }), ct = h(
719
719
  function({ num: t = 1, ...r }, u) {
720
720
  return /* @__PURE__ */ a(b, { spacing: t, ref: u, ...r });
721
721
  }
722
- ), _e = _.div`
722
+ ), $e = _.div`
723
723
  --current-size: 1;
724
724
  flex: none;
725
725
  width: calc(var(--current-size) * var(--swui-metrics-space));
726
726
  height: calc(var(--current-size) * var(--swui-metrics-space));
727
- `, ct = ({
727
+ `, lt = ({
728
728
  half: e = !1,
729
729
  horizontal: t = !1,
730
730
  num: r = 1,
@@ -732,7 +732,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
732
732
  }) => {
733
733
  const n = r * (e ? 0.5 : 1);
734
734
  return /* @__PURE__ */ a(
735
- _e,
735
+ $e,
736
736
  {
737
737
  style: {
738
738
  "--current-size": n,
@@ -741,21 +741,21 @@ const ae = "_separatorLine_nzfcz_1", ce = {
741
741
  }
742
742
  }
743
743
  );
744
- }, lt = ({ children: e, nest: t, render: r }) => t ? /* @__PURE__ */ a(S, { children: r(e) }) : /* @__PURE__ */ a(S, { children: e }), $e = "_visuallyHidden_1gevf_1", Se = {
745
- visuallyHidden: $e
746
- }, Ee = (e) => oe(e, Te), Te = (e, t) => Ce(t), Ce = (e) => e.startsWith("data-") || e.startsWith("aria-"), dt = ({
744
+ }, dt = ({ children: e, nest: t, render: r }) => t ? /* @__PURE__ */ a(S, { children: r(e) }) : /* @__PURE__ */ a(S, { children: e }), Se = "_visuallyHidden_1gevf_1", Ee = {
745
+ visuallyHidden: Se
746
+ }, Te = (e) => se(e, Ce), Ce = (e, t) => Ie(t), Ie = (e) => e.startsWith("data-") || e.startsWith("aria-"), pt = ({
747
747
  children: e,
748
748
  ...t
749
- }) => /* @__PURE__ */ a("span", { className: Se.visuallyHidden, ...Ee(t), children: e }), Ie = "_text_1iisw_1", Re = "_standard_1iisw_24", Me = "_bold_1iisw_27", Oe = "_caption_1iisw_31", Le = "_overline_1iisw_39", Ae = "_large_1iisw_48", Pe = "_medium_1iisw_53", De = "_small_1iisw_58", He = "_smaller_1iisw_63", k = {
750
- text: Ie,
751
- standard: Re,
749
+ }) => /* @__PURE__ */ a("span", { className: Ee.visuallyHidden, ...Te(t), children: e }), Re = "_text_1iisw_1", Le = "_standard_1iisw_24", Me = "_bold_1iisw_27", Oe = "_caption_1iisw_31", Ae = "_overline_1iisw_39", Pe = "_large_1iisw_48", De = "_medium_1iisw_53", He = "_small_1iisw_58", ze = "_smaller_1iisw_63", k = {
750
+ text: Re,
751
+ standard: Le,
752
752
  bold: Me,
753
753
  caption: Oe,
754
- overline: Le,
755
- large: Ae,
756
- medium: Pe,
757
- small: De,
758
- smaller: He
754
+ overline: Ae,
755
+ large: Pe,
756
+ medium: De,
757
+ small: He,
758
+ smaller: ze
759
759
  }, w = h(
760
760
  ({
761
761
  children: e,
@@ -786,15 +786,15 @@ const ae = "_separatorLine_nzfcz_1", ce = {
786
786
  children: e
787
787
  }
788
788
  )
789
- ), pt = w, mt = (e) => /* @__PURE__ */ a(w, { size: "small", ...e }), ht = (e) => /* @__PURE__ */ a(w, { size: "smaller", ...e }), gt = (e) => /* @__PURE__ */ a(w, { size: "medium", ...e }), ft = (e) => /* @__PURE__ */ a(w, { size: "large", ...e }), ze = "_heading_1cnsg_1", Fe = "_h1_1cnsg_10", Ne = "_h2_1cnsg_14", Ue = "_h3_1cnsg_18", Ve = "_h4_1cnsg_22", qe = "_h5_1cnsg_26", je = "_h6_1cnsg_30", T = {
790
- heading: ze,
791
- h1: Fe,
792
- h2: Ne,
793
- h3: Ue,
794
- h4: Ve,
795
- h5: qe,
796
- h6: je
797
- }, Be = h(
789
+ ), mt = w, ht = (e) => /* @__PURE__ */ a(w, { size: "small", ...e }), gt = (e) => /* @__PURE__ */ a(w, { size: "smaller", ...e }), ft = (e) => /* @__PURE__ */ a(w, { size: "medium", ...e }), vt = (e) => /* @__PURE__ */ a(w, { size: "large", ...e }), Fe = "_heading_1cnsg_1", Ne = "_h1_1cnsg_10", Ue = "_h2_1cnsg_14", Ve = "_h3_1cnsg_18", qe = "_h4_1cnsg_22", je = "_h5_1cnsg_26", Be = "_h6_1cnsg_30", T = {
790
+ heading: Fe,
791
+ h1: Ne,
792
+ h2: Ue,
793
+ h3: Ve,
794
+ h4: qe,
795
+ h5: je,
796
+ h6: Be
797
+ }, We = h(
798
798
  ({
799
799
  variant: e = "h3",
800
800
  className: t,
@@ -815,7 +815,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
815
815
  children: s
816
816
  }
817
817
  )
818
- ), vt = (e) => /* @__PURE__ */ a(Be, { variant: "h2", ...e }), We = (e, t) => e === t, yt = (e, t, r = We) => {
818
+ ), yt = (e) => /* @__PURE__ */ a(We, { variant: "h2", ...e }), Xe = (e, t) => e === t, bt = (e, t, r = Xe) => {
819
819
  const u = m(
820
820
  (i) => {
821
821
  e.some((l) => r(l, i)) || t([...e, i]);
@@ -861,7 +861,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
861
861
  r((s) => !s);
862
862
  }, [r]);
863
863
  return [t, u, n, o];
864
- }, bt = (e, t) => {
864
+ }, wt = (e, t) => {
865
865
  const [r, u] = f(e);
866
866
  return d(() => {
867
867
  const n = setTimeout(() => {
@@ -871,7 +871,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
871
871
  clearTimeout(n);
872
872
  };
873
873
  }, [e, t]), r;
874
- }, wt = (e, t) => {
874
+ }, xt = (e, t) => {
875
875
  const [r, u] = f(e);
876
876
  return d(() => {
877
877
  e && u(!0);
@@ -883,8 +883,8 @@ const ae = "_separatorLine_nzfcz_1", ce = {
883
883
  };
884
884
  }, [e, t]), r;
885
885
  };
886
- let Xe = 0;
887
- const C = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => {
886
+ let Ge = 0;
887
+ const C = (e) => `webui-${e ? e + "-" : ""}${++Ge}`, kt = (e) => {
888
888
  const [t, r] = f(() => C(e));
889
889
  return d(() => r(C(e)), [e]), t;
890
890
  }, y = (e, t, r) => {
@@ -905,10 +905,10 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => {
905
905
  s && s.removeEventListener(t, o);
906
906
  };
907
907
  }, [t, e]);
908
- }, kt = (e) => {
908
+ }, _t = (e) => {
909
909
  const [t, r, u] = $(!1);
910
910
  d(() => {
911
- document.activeElement === ie.findDOMNode(e.current) ? r() : u();
911
+ document.activeElement === ae.findDOMNode(e.current) ? r() : u();
912
912
  }, [e, u, r]), y(e, "focus", r), y(e, "blur", u);
913
913
  const n = m(() => {
914
914
  e.current && e.current.focus();
@@ -916,13 +916,16 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => {
916
916
  e.current && e.current.blur();
917
917
  }, [e]);
918
918
  return { isInFocus: t, focus: n, blur: o };
919
- }, _t = (e) => {
919
+ }, $t = (e) => {
920
+ const t = P.useRef(e);
921
+ return t.current = e, t;
922
+ }, St = (e) => {
920
923
  const [t, r, u] = $(!1);
921
924
  return y(e, "mouseover", r), y(e, "mouseout", u), t;
922
- }, $t = (e) => {
925
+ }, Et = (e) => {
923
926
  const [t, r, u] = $(!1);
924
927
  return y(e, "mouseenter", r), y(e, "mouseleave", u), t;
925
- }, St = (e, t) => {
928
+ }, Tt = (e, t) => {
926
929
  const r = v(() => {
927
930
  });
928
931
  d(() => {
@@ -935,7 +938,7 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => {
935
938
  document.removeEventListener("mousedown", u), document.removeEventListener("touchstart", u);
936
939
  };
937
940
  }, [...e]);
938
- }, Et = (e, t, r) => {
941
+ }, Ct = (e, t, r) => {
939
942
  const u = v(() => {
940
943
  });
941
944
  d(() => {
@@ -948,21 +951,21 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => {
948
951
  document.removeEventListener("mousedown", n, r), document.removeEventListener("touchstart", n, r);
949
952
  };
950
953
  }, [e, r]);
951
- }, I = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], Tt = (e, t) => {
954
+ }, I = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], It = (e, t) => {
952
955
  const r = v(() => {
953
956
  });
954
957
  d(() => {
955
958
  r.current = e;
956
959
  }, [e]), d(() => {
957
- const u = se(r.current, t);
960
+ const u = ie(r.current, t);
958
961
  return I.forEach((n) => window.addEventListener(n, u)), () => {
959
962
  I.forEach(
960
963
  (n) => window.removeEventListener(n, u)
961
964
  );
962
965
  };
963
966
  }, [t]);
964
- }, Ct = (e, t) => {
965
- const [r, u] = f(!1), { rootMargin: n, root: o, threshold: s } = t || {}, c = D(() => new IntersectionObserver(
967
+ }, Rt = (e, t) => {
968
+ const [r, u] = f(!1), { rootMargin: n, root: o, threshold: s } = t || {}, c = H(() => new IntersectionObserver(
966
969
  ([i]) => u(i.isIntersecting),
967
970
  {
968
971
  rootMargin: n,
@@ -973,12 +976,12 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => {
973
976
  return d(() => (e.current && c.observe(e.current), () => {
974
977
  c.disconnect();
975
978
  }), [c, e]), r;
976
- }, It = (e) => {
979
+ }, Lt = (e) => {
977
980
  const t = v(null);
978
981
  return d(() => {
979
982
  e && (typeof e == "function" ? e(t.current) : e.current = t.current);
980
983
  }), t;
981
- }, Rt = (e, t, r = !0) => {
984
+ }, Mt = (e, t, r = !0) => {
982
985
  const [u, n] = f(e), o = v(), s = m(
983
986
  (c, i = t) => {
984
987
  n(c), r && clearTimeout(o.current), o.current = setTimeout(() => n(e), i);
@@ -988,15 +991,15 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => {
988
991
  return d(() => () => {
989
992
  clearTimeout(o.current);
990
993
  }, []), [u, s];
991
- }, Mt = (e) => {
994
+ }, Ot = (e) => {
992
995
  throw new Error(`Switch unhandled case: ${e}`);
993
- }, Ot = (e, t) => t, Lt = (e) => Object.keys(e).filter((t) => e[t]), At = (e) => {
996
+ }, At = (e, t) => t, Pt = (e) => Object.keys(e).filter((t) => e[t]), Dt = (e) => {
994
997
  try {
995
998
  const t = parseFloat(e);
996
999
  return isNaN(t) || t == null ? void 0 : t;
997
1000
  } catch {
998
1001
  }
999
- }, Pt = (e) => {
1002
+ }, Ht = (e) => {
1000
1003
  try {
1001
1004
  const t = parseInt(e, 10);
1002
1005
  return isNaN(t) || t == null ? void 0 : t;
@@ -1005,47 +1008,48 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => {
1005
1008
  };
1006
1009
  export {
1007
1010
  b as Box,
1008
- ut as Clickable,
1009
- nt as Column,
1010
- vt as HeaderText,
1011
- Be as Heading,
1012
- it as Indent,
1013
- ft as LargeText,
1014
- lt as Nest,
1015
- ot as ResizeAwareBox,
1016
- st as Row,
1017
- dt as ScreenReaderOnlyText,
1018
- rt as SeparatorLine,
1019
- mt as SmallText,
1020
- ht as SmallerText,
1021
- ct as Space,
1022
- at as Spacing,
1023
- gt as StandardText,
1011
+ nt as Clickable,
1012
+ ot as Column,
1013
+ yt as HeaderText,
1014
+ We as Heading,
1015
+ at as Indent,
1016
+ vt as LargeText,
1017
+ dt as Nest,
1018
+ st as ResizeAwareBox,
1019
+ it as Row,
1020
+ pt as ScreenReaderOnlyText,
1021
+ ut as SeparatorLine,
1022
+ ht as SmallText,
1023
+ gt as SmallerText,
1024
+ lt as Space,
1025
+ ct as Spacing,
1026
+ ft as StandardText,
1024
1027
  w as Text,
1025
- pt as Txt,
1028
+ mt as Txt,
1026
1029
  x as booleanOrNumberToNumber,
1027
- Ot as exhaustSwitchCase,
1028
- Mt as exhaustSwitchCaseElseThrow,
1029
- Ee as getDataProps,
1030
- we as getDimensionObject,
1031
- At as parseFloatElseUndefined,
1032
- Pt as parseIntElseUndefined,
1033
- Lt as truthyKeysAsList,
1034
- yt as useArraySet,
1030
+ At as exhaustSwitchCase,
1031
+ Ot as exhaustSwitchCaseElseThrow,
1032
+ Te as getDataProps,
1033
+ xe as getDimensionObject,
1034
+ Dt as parseFloatElseUndefined,
1035
+ Ht as parseIntElseUndefined,
1036
+ Pt as truthyKeysAsList,
1037
+ bt as useArraySet,
1035
1038
  $ as useBoolean,
1036
- bt as useDebounce,
1037
- wt as useDelayedFalse,
1038
- xt as useDomId,
1039
- ke as useElementDimensions,
1040
- kt as useElementFocus,
1039
+ wt as useDebounce,
1040
+ xt as useDelayedFalse,
1041
+ kt as useDomId,
1042
+ _e as useElementDimensions,
1043
+ _t as useElementFocus,
1041
1044
  y as useEventListener,
1042
- It as useForwardedRef,
1043
- $t as useMouseIsEntered,
1044
- _t as useMouseIsOver,
1045
- St as useMultiOnClickOutside,
1046
- Et as useOnClickOutside,
1047
- Tt as useOnNoMouseMovement,
1048
- Ct as useOnScreen,
1049
- Rt as useTimeoutState
1045
+ Lt as useForwardedRef,
1046
+ $t as useLatest,
1047
+ Et as useMouseIsEntered,
1048
+ St as useMouseIsOver,
1049
+ Tt as useMultiOnClickOutside,
1050
+ Ct as useOnClickOutside,
1051
+ It as useOnNoMouseMovement,
1052
+ Rt as useOnScreen,
1053
+ Mt as useTimeoutState
1050
1054
  };
1051
1055
  //# sourceMappingURL=index.es.js.map