@stenajs-webui/core 23.9.0 → 23.10.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/components/text/Paragraph.d.ts +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +216 -180
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +25 -25
- package/dist/index.js.map +1 -1
- package/dist/types/ElementProps.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
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 N } from "@stenajs-webui/theme";
|
|
3
|
-
import { jsx as
|
|
4
|
-
import V, { forwardRef as
|
|
3
|
+
import { jsx as l, Fragment as R, jsxs as U } from "react/jsx-runtime";
|
|
4
|
+
import V, { forwardRef as h, useState as g, useCallback as m, useLayoutEffect as M, useRef as y, createContext as B, useEffect as p, useMemo as S, useContext as j, isValidElement as q, Fragment as W } from "react";
|
|
5
5
|
import E from "@emotion/styled";
|
|
6
6
|
import { system as X, background as G, border as Y, borderRight as K, borderLeft as Z, borderTop as J, borderBottom as Q, borderColor as ee, borderRadius as te, borderStyle as re, borderWidth as ne, boxShadow as ue, flexbox as oe, overflow as se, position as ie, layout as ae, zIndex as ce, left as le, right as de, top as pe, bottom as me } from "styled-system";
|
|
7
|
-
import { memoize as he, pickBy as
|
|
8
|
-
import
|
|
7
|
+
import { memoize as he, pickBy as O, debounce as fe } from "lodash-es";
|
|
8
|
+
import C from "classnames";
|
|
9
9
|
const ge = "_separatorLine_nzfcz_1", ye = {
|
|
10
10
|
separatorLine: ge
|
|
11
|
-
},
|
|
11
|
+
}, dt = h(
|
|
12
12
|
({
|
|
13
13
|
color: e = N("--lhds-color-ui-300"),
|
|
14
14
|
size: t = "100%",
|
|
15
15
|
width: r = "1px",
|
|
16
16
|
vertical: n = !1
|
|
17
|
-
}, u) => /* @__PURE__ */
|
|
17
|
+
}, u) => /* @__PURE__ */ l(
|
|
18
18
|
"hr",
|
|
19
19
|
{
|
|
20
20
|
className: ye.separatorLine,
|
|
@@ -51,7 +51,7 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
51
51
|
${({ width: e }) => e ? `width: ${e};` : ""}
|
|
52
52
|
${({ height: e }) => e ? `height: ${e};` : ""}
|
|
53
53
|
${({ borderRadius: e }) => e ? `border-radius: ${e};` : ""}
|
|
54
|
-
`,
|
|
54
|
+
`, pt = h(
|
|
55
55
|
({
|
|
56
56
|
disableFocusHighlight: e,
|
|
57
57
|
onClick: t,
|
|
@@ -62,12 +62,12 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
62
62
|
opacityOnHover: s,
|
|
63
63
|
disabled: a,
|
|
64
64
|
children: i,
|
|
65
|
-
background:
|
|
65
|
+
background: c = "transparent",
|
|
66
66
|
hoverBackground: d,
|
|
67
|
-
focusBackground:
|
|
68
|
-
type:
|
|
69
|
-
...
|
|
70
|
-
}, D) => /* @__PURE__ */
|
|
67
|
+
focusBackground: f,
|
|
68
|
+
type: x = "button",
|
|
69
|
+
...k
|
|
70
|
+
}, D) => /* @__PURE__ */ l(
|
|
71
71
|
ve,
|
|
72
72
|
{
|
|
73
73
|
opacityOnHover: s,
|
|
@@ -79,18 +79,18 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
79
79
|
disableFocusHighlight: e,
|
|
80
80
|
pointer: !!(t || r) && !o,
|
|
81
81
|
ref: D,
|
|
82
|
-
background:
|
|
82
|
+
background: c,
|
|
83
83
|
hoverBackground: d,
|
|
84
|
-
focusBackground:
|
|
85
|
-
type:
|
|
86
|
-
...
|
|
84
|
+
focusBackground: f,
|
|
85
|
+
type: x,
|
|
86
|
+
...k,
|
|
87
87
|
children: i
|
|
88
88
|
}
|
|
89
89
|
)
|
|
90
|
-
),
|
|
90
|
+
), $ = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, be = (e) => {
|
|
91
91
|
if (e !== 0)
|
|
92
92
|
return `calc(${e} * var(--swui-metrics-space))`;
|
|
93
|
-
},
|
|
93
|
+
}, I = (e) => be($(e)), we = {
|
|
94
94
|
// react props
|
|
95
95
|
// https://github.com/facebook/react/blob/5495a7f24aef85ba6937truetrue1ce962673ca9f5fde6/src/renderers/dom/shared/hooks/ReactDOMUnknownPropertyHook.js
|
|
96
96
|
children: !0,
|
|
@@ -602,31 +602,31 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
602
602
|
indent: {
|
|
603
603
|
// @ts-expect-error Sets a CSS property.
|
|
604
604
|
property: "--current-indent",
|
|
605
|
-
transform:
|
|
605
|
+
transform: $
|
|
606
606
|
},
|
|
607
607
|
spacing: {
|
|
608
608
|
// @ts-expect-error Sets a CSS property.
|
|
609
609
|
property: "--current-spacing",
|
|
610
|
-
transform:
|
|
610
|
+
transform: $
|
|
611
611
|
},
|
|
612
612
|
gap: {
|
|
613
613
|
// @ts-expect-error Sets a CSS property.
|
|
614
614
|
property: "--current-gap",
|
|
615
|
-
transform:
|
|
615
|
+
transform: $
|
|
616
616
|
},
|
|
617
617
|
columnGap: {
|
|
618
618
|
property: "columnGap",
|
|
619
|
-
transform:
|
|
619
|
+
transform: I
|
|
620
620
|
},
|
|
621
621
|
rowGap: {
|
|
622
622
|
property: "rowGap",
|
|
623
|
-
transform:
|
|
623
|
+
transform: I
|
|
624
624
|
},
|
|
625
625
|
shadow: {
|
|
626
626
|
property: "boxShadow",
|
|
627
627
|
transform: (e) => $e[e] ?? e
|
|
628
628
|
}
|
|
629
|
-
}),
|
|
629
|
+
}), w = E("div", {
|
|
630
630
|
shouldForwardProp: (e) => typeof e == "string" ? Ee(e) ? !1 : _e(e) : !1
|
|
631
631
|
})`
|
|
632
632
|
--current-spacing: 0;
|
|
@@ -676,9 +676,9 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
676
676
|
${({ focusWithinBackground: e }) => e ? `background: ${e};` : ""}
|
|
677
677
|
${({ focusWithinBorder: e }) => e ? `border: ${e};` : ""}
|
|
678
678
|
}
|
|
679
|
-
`,
|
|
679
|
+
`, mt = h(
|
|
680
680
|
function(t, r) {
|
|
681
|
-
return /* @__PURE__ */
|
|
681
|
+
return /* @__PURE__ */ l(w, { ref: r, ...t });
|
|
682
682
|
}
|
|
683
683
|
), Te = (e) => {
|
|
684
684
|
const { x: t, y: r, width: n, height: u, bottom: o, top: s, left: a, right: i } = e.getBoundingClientRect();
|
|
@@ -693,7 +693,7 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
693
693
|
bottom: o
|
|
694
694
|
};
|
|
695
695
|
}, Re = (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, Ie = (e, t) => {
|
|
696
|
-
const [r, n] =
|
|
696
|
+
const [r, n] = g(), u = m(() => {
|
|
697
697
|
window.requestAnimationFrame(() => {
|
|
698
698
|
if (e.current) {
|
|
699
699
|
const o = Te(e.current);
|
|
@@ -701,39 +701,39 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
703
|
}, [e, r, n, t]);
|
|
704
|
-
return
|
|
704
|
+
return M(() => {
|
|
705
705
|
u();
|
|
706
706
|
}, [u]), {
|
|
707
707
|
dimensions: r
|
|
708
708
|
};
|
|
709
|
-
},
|
|
709
|
+
}, ht = h(
|
|
710
710
|
function({ onResize: t, ...r }, n) {
|
|
711
|
-
const u =
|
|
712
|
-
return Ie(n ?? u, t), /* @__PURE__ */
|
|
711
|
+
const u = y(null);
|
|
712
|
+
return Ie(n ?? u, t), /* @__PURE__ */ l(w, { ...r, ref: n });
|
|
713
713
|
}
|
|
714
|
-
),
|
|
714
|
+
), ft = h(
|
|
715
715
|
function(t, r) {
|
|
716
|
-
return /* @__PURE__ */
|
|
716
|
+
return /* @__PURE__ */ l(w, { row: !0, ref: r, ...t });
|
|
717
717
|
}
|
|
718
|
-
),
|
|
719
|
-
return /* @__PURE__ */
|
|
720
|
-
}),
|
|
718
|
+
), gt = h(function({ num: t = 1, ...r }, n) {
|
|
719
|
+
return /* @__PURE__ */ l(w, { indent: t, ref: n, ...r });
|
|
720
|
+
}), yt = h(
|
|
721
721
|
function({ num: t = 1, ...r }, n) {
|
|
722
|
-
return /* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */ l(w, { spacing: t, ref: n, ...r });
|
|
723
723
|
}
|
|
724
724
|
), Ae = E.div`
|
|
725
725
|
--current-size: 1;
|
|
726
726
|
flex: none;
|
|
727
727
|
width: calc(var(--current-size) * var(--swui-metrics-space));
|
|
728
728
|
height: calc(var(--current-size) * var(--swui-metrics-space));
|
|
729
|
-
`,
|
|
729
|
+
`, vt = ({
|
|
730
730
|
half: e = !1,
|
|
731
731
|
horizontal: t = !1,
|
|
732
732
|
num: r = 1,
|
|
733
733
|
vertical: n = !1
|
|
734
734
|
}) => {
|
|
735
735
|
const u = r * (e ? 0.5 : 1);
|
|
736
|
-
return /* @__PURE__ */
|
|
736
|
+
return /* @__PURE__ */ l(
|
|
737
737
|
Ae,
|
|
738
738
|
{
|
|
739
739
|
style: {
|
|
@@ -743,18 +743,18 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
);
|
|
746
|
-
},
|
|
746
|
+
}, bt = ({ children: e, nest: t, render: r }) => t ? /* @__PURE__ */ l(R, { children: r(e) }) : /* @__PURE__ */ l(R, { children: e }), H = B({
|
|
747
747
|
isFontLarge: !1,
|
|
748
748
|
fontSizeRatio: 1
|
|
749
|
-
}),
|
|
750
|
-
const t =
|
|
749
|
+
}), A = 12, wt = ({ children: e }) => {
|
|
750
|
+
const t = y(null), [r, n] = g(!1), [u, o] = g(1);
|
|
751
751
|
p(() => {
|
|
752
752
|
if (!t.current)
|
|
753
753
|
return;
|
|
754
754
|
const a = new ResizeObserver((i) => {
|
|
755
|
-
for (const
|
|
756
|
-
const d =
|
|
757
|
-
n(d >
|
|
755
|
+
for (const c of i) {
|
|
756
|
+
const d = c.contentRect.height;
|
|
757
|
+
n(d > A), o(d / A);
|
|
758
758
|
}
|
|
759
759
|
});
|
|
760
760
|
return a.observe(t.current), () => a.disconnect();
|
|
@@ -764,7 +764,7 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
764
764
|
[u, r]
|
|
765
765
|
);
|
|
766
766
|
return /* @__PURE__ */ U(H.Provider, { value: s, children: [
|
|
767
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ l(
|
|
768
768
|
"div",
|
|
769
769
|
{
|
|
770
770
|
ref: t,
|
|
@@ -782,7 +782,7 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
782
782
|
),
|
|
783
783
|
e
|
|
784
784
|
] });
|
|
785
|
-
},
|
|
785
|
+
}, xt = () => {
|
|
786
786
|
const e = j(H);
|
|
787
787
|
return e || {
|
|
788
788
|
isFontLarge: !1,
|
|
@@ -790,10 +790,10 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
790
790
|
};
|
|
791
791
|
}, Le = "_visuallyHidden_1gevf_1", Pe = {
|
|
792
792
|
visuallyHidden: Le
|
|
793
|
-
}, ze = (e) =>
|
|
793
|
+
}, ze = (e) => O(e, Fe), kt = (e) => O(e, Me), Fe = (e, t) => t.startsWith("data-") || t.startsWith("aria-"), Me = (e, t) => t.startsWith("aria-"), _t = ({
|
|
794
794
|
children: e,
|
|
795
795
|
...t
|
|
796
|
-
}) => /* @__PURE__ */
|
|
796
|
+
}) => /* @__PURE__ */ l("span", { className: Pe.visuallyHidden, ...ze(t), children: e }), Oe = "_text_1iisw_1", He = "_standard_1iisw_24", De = "_bold_1iisw_27", Ne = "_caption_1iisw_31", Ue = "_overline_1iisw_39", Ve = "_large_1iisw_48", Be = "_medium_1iisw_53", je = "_small_1iisw_58", qe = "_smaller_1iisw_63", v = {
|
|
797
797
|
text: Oe,
|
|
798
798
|
standard: He,
|
|
799
799
|
bold: De,
|
|
@@ -803,7 +803,7 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
803
803
|
medium: Be,
|
|
804
804
|
small: je,
|
|
805
805
|
smaller: qe
|
|
806
|
-
},
|
|
806
|
+
}, _ = h(
|
|
807
807
|
({
|
|
808
808
|
children: e,
|
|
809
809
|
variant: t = "standard",
|
|
@@ -814,38 +814,72 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
814
814
|
whiteSpace: s,
|
|
815
815
|
wordBreak: a,
|
|
816
816
|
textAlign: i = "left",
|
|
817
|
-
overflow:
|
|
817
|
+
overflow: c,
|
|
818
818
|
textOverflow: d,
|
|
819
|
-
style:
|
|
820
|
-
...
|
|
821
|
-
},
|
|
819
|
+
style: f,
|
|
820
|
+
...x
|
|
821
|
+
}, k) => /* @__PURE__ */ l(
|
|
822
822
|
"span",
|
|
823
823
|
{
|
|
824
|
-
className:
|
|
825
|
-
ref:
|
|
824
|
+
className: C(v.text, v[t], v[r], n),
|
|
825
|
+
ref: k,
|
|
826
826
|
style: {
|
|
827
827
|
color: u,
|
|
828
828
|
userSelect: o,
|
|
829
829
|
whiteSpace: s,
|
|
830
830
|
wordBreak: a,
|
|
831
831
|
textAlign: i,
|
|
832
|
-
overflow:
|
|
832
|
+
overflow: c,
|
|
833
833
|
textOverflow: d,
|
|
834
|
-
...
|
|
834
|
+
...f
|
|
835
835
|
},
|
|
836
|
-
...
|
|
836
|
+
...x,
|
|
837
837
|
children: e
|
|
838
838
|
}
|
|
839
839
|
)
|
|
840
|
-
),
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
840
|
+
), $t = _, We = h(
|
|
841
|
+
({
|
|
842
|
+
children: e,
|
|
843
|
+
variant: t = "standard",
|
|
844
|
+
size: r = "medium",
|
|
845
|
+
className: n,
|
|
846
|
+
color: u,
|
|
847
|
+
userSelect: o,
|
|
848
|
+
whiteSpace: s,
|
|
849
|
+
wordBreak: a,
|
|
850
|
+
textAlign: i = "left",
|
|
851
|
+
overflow: c,
|
|
852
|
+
textOverflow: d,
|
|
853
|
+
style: f,
|
|
854
|
+
...x
|
|
855
|
+
}, k) => /* @__PURE__ */ l(
|
|
856
|
+
"p",
|
|
857
|
+
{
|
|
858
|
+
className: C(v.text, v[t], v[r], n),
|
|
859
|
+
ref: k,
|
|
860
|
+
style: {
|
|
861
|
+
color: u,
|
|
862
|
+
userSelect: o,
|
|
863
|
+
whiteSpace: s,
|
|
864
|
+
wordBreak: a,
|
|
865
|
+
textAlign: i,
|
|
866
|
+
overflow: c,
|
|
867
|
+
textOverflow: d,
|
|
868
|
+
...f
|
|
869
|
+
},
|
|
870
|
+
...x,
|
|
871
|
+
children: e
|
|
872
|
+
}
|
|
873
|
+
)
|
|
874
|
+
), St = We, Et = (e) => /* @__PURE__ */ l(_, { size: "small", ...e }), Ct = (e) => /* @__PURE__ */ l(_, { size: "smaller", ...e }), Tt = (e) => /* @__PURE__ */ l(_, { size: "medium", ...e }), Rt = (e) => /* @__PURE__ */ l(_, { size: "large", ...e }), Xe = "_heading_1cnsg_1", Ge = "_h1_1cnsg_10", Ye = "_h2_1cnsg_14", Ke = "_h3_1cnsg_18", Ze = "_h4_1cnsg_22", Je = "_h5_1cnsg_26", Qe = "_h6_1cnsg_30", L = {
|
|
875
|
+
heading: Xe,
|
|
876
|
+
h1: Ge,
|
|
877
|
+
h2: Ye,
|
|
878
|
+
h3: Ke,
|
|
879
|
+
h4: Ze,
|
|
880
|
+
h5: Je,
|
|
881
|
+
h6: Qe
|
|
882
|
+
}, et = h(
|
|
849
883
|
({
|
|
850
884
|
variant: e = "h3",
|
|
851
885
|
className: t,
|
|
@@ -856,17 +890,17 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
856
890
|
children: s,
|
|
857
891
|
as: a,
|
|
858
892
|
...i
|
|
859
|
-
},
|
|
893
|
+
}, c) => /* @__PURE__ */ l(
|
|
860
894
|
a ?? e,
|
|
861
895
|
{
|
|
862
|
-
className:
|
|
896
|
+
className: C(L.heading, L[e], t),
|
|
863
897
|
style: { color: r, whiteSpace: n, wordBreak: u, ...o },
|
|
864
|
-
ref:
|
|
898
|
+
ref: c,
|
|
865
899
|
...i,
|
|
866
900
|
children: s
|
|
867
901
|
}
|
|
868
902
|
)
|
|
869
|
-
),
|
|
903
|
+
), It = (e) => /* @__PURE__ */ l(et, { variant: "h2", ...e }), At = ({
|
|
870
904
|
blockedKeys: e,
|
|
871
905
|
blockMouse: t = !1,
|
|
872
906
|
...r
|
|
@@ -882,8 +916,8 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
882
916
|
},
|
|
883
917
|
[t]
|
|
884
918
|
);
|
|
885
|
-
return /* @__PURE__ */
|
|
886
|
-
|
|
919
|
+
return /* @__PURE__ */ l(
|
|
920
|
+
w,
|
|
887
921
|
{
|
|
888
922
|
...r,
|
|
889
923
|
onKeyDown: n,
|
|
@@ -892,28 +926,28 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
892
926
|
onMouseUp: u
|
|
893
927
|
}
|
|
894
928
|
);
|
|
895
|
-
},
|
|
929
|
+
}, tt = (e, t) => e === t, Lt = (e, t, r = tt) => {
|
|
896
930
|
const n = m(
|
|
897
931
|
(i) => {
|
|
898
|
-
e.some((
|
|
932
|
+
e.some((c) => r(c, i)) || t([...e, i]);
|
|
899
933
|
},
|
|
900
934
|
[e, t, r]
|
|
901
935
|
), u = m(
|
|
902
936
|
(i) => {
|
|
903
937
|
t(
|
|
904
|
-
i.reduce((
|
|
938
|
+
i.reduce((c, d) => c.some((f) => r(f, d)) ? c : [...c, d], e)
|
|
905
939
|
);
|
|
906
940
|
},
|
|
907
941
|
[e, t, r]
|
|
908
942
|
), o = m(
|
|
909
943
|
(i) => {
|
|
910
|
-
const
|
|
911
|
-
|
|
944
|
+
const c = e.findIndex((d) => r(d, i));
|
|
945
|
+
c >= 0 && t(e.filter((d, f) => f !== c));
|
|
912
946
|
},
|
|
913
947
|
[e, t, r]
|
|
914
948
|
), s = m(
|
|
915
949
|
(i) => {
|
|
916
|
-
t(e.filter((
|
|
950
|
+
t(e.filter((c) => !i.some((d) => r(d, c))));
|
|
917
951
|
},
|
|
918
952
|
[e, t, r]
|
|
919
953
|
), a = m(
|
|
@@ -929,8 +963,8 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
929
963
|
removeMultiple: s,
|
|
930
964
|
toggle: a
|
|
931
965
|
};
|
|
932
|
-
},
|
|
933
|
-
const [t, r] =
|
|
966
|
+
}, T = (e) => {
|
|
967
|
+
const [t, r] = g(e), n = m(() => {
|
|
934
968
|
r(!0);
|
|
935
969
|
}, [r]), u = m(() => {
|
|
936
970
|
r(!1);
|
|
@@ -938,8 +972,8 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
938
972
|
r((s) => !s);
|
|
939
973
|
}, [r]);
|
|
940
974
|
return [t, n, u, o];
|
|
941
|
-
},
|
|
942
|
-
const [r, n] =
|
|
975
|
+
}, Pt = (e, t) => {
|
|
976
|
+
const [r, n] = g(e);
|
|
943
977
|
return p(() => {
|
|
944
978
|
const u = setTimeout(() => {
|
|
945
979
|
n(e);
|
|
@@ -948,8 +982,8 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
948
982
|
clearTimeout(u);
|
|
949
983
|
};
|
|
950
984
|
}, [e, t]), r;
|
|
951
|
-
},
|
|
952
|
-
const [r, n] =
|
|
985
|
+
}, zt = (e, t) => {
|
|
986
|
+
const [r, n] = g(e);
|
|
953
987
|
return p(() => {
|
|
954
988
|
e && n(!0);
|
|
955
989
|
const u = setTimeout(() => {
|
|
@@ -960,12 +994,12 @@ const ge = "_separatorLine_nzfcz_1", ye = {
|
|
|
960
994
|
};
|
|
961
995
|
}, [e, t]), r;
|
|
962
996
|
};
|
|
963
|
-
let
|
|
964
|
-
const
|
|
965
|
-
const [t, r] =
|
|
966
|
-
return p(() => r(
|
|
967
|
-
},
|
|
968
|
-
const n =
|
|
997
|
+
let rt = 0;
|
|
998
|
+
const P = (e) => `webui-${e ? e + "-" : ""}${++rt}`, Ft = (e) => {
|
|
999
|
+
const [t, r] = g(() => P(e));
|
|
1000
|
+
return p(() => r(P(e)), [e]), t;
|
|
1001
|
+
}, b = (e, t, r) => {
|
|
1002
|
+
const n = y(null);
|
|
969
1003
|
p(() => {
|
|
970
1004
|
n.current = r;
|
|
971
1005
|
}, [r]), p(() => {
|
|
@@ -981,36 +1015,36 @@ const L = (e) => `webui-${e ? e + "-" : ""}${++tt}`, Pt = (e) => {
|
|
|
981
1015
|
s && s.removeEventListener(t, o);
|
|
982
1016
|
};
|
|
983
1017
|
}, [t, e]);
|
|
984
|
-
},
|
|
985
|
-
const [t, r, n] =
|
|
1018
|
+
}, Mt = (e) => {
|
|
1019
|
+
const [t, r, n] = T(!1);
|
|
986
1020
|
p(() => {
|
|
987
1021
|
document.activeElement === e.current ? r() : n();
|
|
988
|
-
}, [e, n, r]),
|
|
1022
|
+
}, [e, n, r]), b(e, "focus", r), b(e, "blur", n);
|
|
989
1023
|
const u = m(() => {
|
|
990
1024
|
e.current && e.current.focus();
|
|
991
1025
|
}, [e]), o = m(() => {
|
|
992
1026
|
e.current && e.current.blur();
|
|
993
1027
|
}, [e]);
|
|
994
1028
|
return { isInFocus: t, focus: u, blur: o };
|
|
995
|
-
},
|
|
996
|
-
const t =
|
|
997
|
-
return
|
|
1029
|
+
}, Ot = (e) => {
|
|
1030
|
+
const t = y(e);
|
|
1031
|
+
return M(() => {
|
|
998
1032
|
t.current = e;
|
|
999
1033
|
}), m((...r) => {
|
|
1000
1034
|
const { current: n } = t;
|
|
1001
1035
|
return n(...r);
|
|
1002
1036
|
}, []);
|
|
1003
|
-
},
|
|
1037
|
+
}, Ht = (e) => {
|
|
1004
1038
|
const t = V.useRef(e);
|
|
1005
1039
|
return t.current = e, t;
|
|
1006
|
-
},
|
|
1007
|
-
const [t, r, n] =
|
|
1008
|
-
return
|
|
1009
|
-
},
|
|
1010
|
-
const [t, r, n] =
|
|
1011
|
-
return
|
|
1012
|
-
},
|
|
1013
|
-
const r =
|
|
1040
|
+
}, Dt = (e) => {
|
|
1041
|
+
const [t, r, n] = T(!1);
|
|
1042
|
+
return b(e, "mouseover", r), b(e, "mouseout", n), t;
|
|
1043
|
+
}, Nt = (e) => {
|
|
1044
|
+
const [t, r, n] = T(!1);
|
|
1045
|
+
return b(e, "mouseenter", r), b(e, "mouseleave", n), t;
|
|
1046
|
+
}, Ut = (e, t) => {
|
|
1047
|
+
const r = y(() => {
|
|
1014
1048
|
});
|
|
1015
1049
|
p(() => {
|
|
1016
1050
|
r.current = t;
|
|
@@ -1022,8 +1056,8 @@ const L = (e) => `webui-${e ? e + "-" : ""}${++tt}`, Pt = (e) => {
|
|
|
1022
1056
|
document.removeEventListener("mousedown", n), document.removeEventListener("touchstart", n);
|
|
1023
1057
|
};
|
|
1024
1058
|
}, [...e]);
|
|
1025
|
-
},
|
|
1026
|
-
const n =
|
|
1059
|
+
}, Vt = (e, t, r) => {
|
|
1060
|
+
const n = y(() => {
|
|
1027
1061
|
});
|
|
1028
1062
|
p(() => {
|
|
1029
1063
|
n.current = t;
|
|
@@ -1035,21 +1069,21 @@ const L = (e) => `webui-${e ? e + "-" : ""}${++tt}`, Pt = (e) => {
|
|
|
1035
1069
|
document.removeEventListener("mousedown", u, r), document.removeEventListener("touchstart", u, r);
|
|
1036
1070
|
};
|
|
1037
1071
|
}, [e, r]);
|
|
1038
|
-
},
|
|
1039
|
-
const r =
|
|
1072
|
+
}, z = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], Bt = (e, t) => {
|
|
1073
|
+
const r = y(() => {
|
|
1040
1074
|
});
|
|
1041
1075
|
p(() => {
|
|
1042
1076
|
r.current = e;
|
|
1043
1077
|
}, [e]), p(() => {
|
|
1044
1078
|
const n = fe(r.current, t);
|
|
1045
|
-
return
|
|
1046
|
-
|
|
1079
|
+
return z.forEach((u) => window.addEventListener(u, n)), () => {
|
|
1080
|
+
z.forEach(
|
|
1047
1081
|
(u) => window.removeEventListener(u, n)
|
|
1048
1082
|
);
|
|
1049
1083
|
};
|
|
1050
1084
|
}, [t]);
|
|
1051
|
-
},
|
|
1052
|
-
const [r, n] =
|
|
1085
|
+
}, jt = (e, t) => {
|
|
1086
|
+
const [r, n] = g(!1), { rootMargin: u, root: o, threshold: s } = t || {}, a = S(() => new IntersectionObserver(
|
|
1053
1087
|
([i]) => n(i.isIntersecting),
|
|
1054
1088
|
{
|
|
1055
1089
|
rootMargin: u,
|
|
@@ -1060,13 +1094,13 @@ const L = (e) => `webui-${e ? e + "-" : ""}${++tt}`, Pt = (e) => {
|
|
|
1060
1094
|
return p(() => (e.current && a.observe(e.current), () => {
|
|
1061
1095
|
a.disconnect();
|
|
1062
1096
|
}), [a, e]), r;
|
|
1063
|
-
},
|
|
1064
|
-
const t =
|
|
1097
|
+
}, qt = (e) => {
|
|
1098
|
+
const t = y(null);
|
|
1065
1099
|
return p(() => {
|
|
1066
1100
|
e && (typeof e == "function" ? e(t.current) : e.current = t.current);
|
|
1067
1101
|
}), t;
|
|
1068
|
-
},
|
|
1069
|
-
const [n, u] =
|
|
1102
|
+
}, Wt = (e, t, r = !0) => {
|
|
1103
|
+
const [n, u] = g(e), o = y(null), s = m(
|
|
1070
1104
|
(a, i = t) => {
|
|
1071
1105
|
u(a), r && clearTimeout(o.current), o.current = setTimeout(() => u(e), i);
|
|
1072
1106
|
},
|
|
@@ -1075,30 +1109,30 @@ const L = (e) => `webui-${e ? e + "-" : ""}${++tt}`, Pt = (e) => {
|
|
|
1075
1109
|
return p(() => () => {
|
|
1076
1110
|
clearTimeout(o.current);
|
|
1077
1111
|
}, []), [n, s];
|
|
1078
|
-
},
|
|
1112
|
+
}, Xt = () => S(() => /* @__PURE__ */ new Date(), []), Gt = (e) => (t, r) => e(t).localeCompare(e(r)), Yt = (e) => (t, r) => e(t) - e(r), Kt = (e) => {
|
|
1079
1113
|
throw new Error(`Switch unhandled case: ${e}`);
|
|
1080
|
-
},
|
|
1114
|
+
}, Zt = (e, t) => t, Jt = (e) => Object.keys(e).filter((t) => e[t]), Qt = (e) => {
|
|
1081
1115
|
try {
|
|
1082
1116
|
const t = parseFloat(e);
|
|
1083
1117
|
return isNaN(t) || t == null ? void 0 : t;
|
|
1084
1118
|
} catch {
|
|
1085
1119
|
}
|
|
1086
|
-
},
|
|
1120
|
+
}, er = (e) => {
|
|
1087
1121
|
try {
|
|
1088
1122
|
const t = parseInt(e, 10);
|
|
1089
1123
|
return isNaN(t) || t == null ? void 0 : t;
|
|
1090
1124
|
} catch {
|
|
1091
1125
|
}
|
|
1092
1126
|
};
|
|
1093
|
-
function
|
|
1127
|
+
function tr(e, t) {
|
|
1094
1128
|
if (e == null)
|
|
1095
1129
|
throw new Error("Invariant error: " + t);
|
|
1096
1130
|
}
|
|
1097
|
-
const
|
|
1131
|
+
const rr = (e) => {
|
|
1098
1132
|
if (!q(e) || e.type !== W) return !1;
|
|
1099
1133
|
const r = e.props.children;
|
|
1100
|
-
return Array.isArray(r) ? r.every(
|
|
1101
|
-
},
|
|
1134
|
+
return Array.isArray(r) ? r.every(F) : F(r);
|
|
1135
|
+
}, F = (e) => e == null || e === !1, nr = (e) => {
|
|
1102
1136
|
try {
|
|
1103
1137
|
const t = new Intl.PluralRules(e);
|
|
1104
1138
|
return (r) => t.select(r);
|
|
@@ -1116,64 +1150,66 @@ const er = (e) => {
|
|
|
1116
1150
|
}
|
|
1117
1151
|
};
|
|
1118
1152
|
}
|
|
1119
|
-
},
|
|
1153
|
+
}, ur = (e) => (t, r) => r[e(t)] ?? r.other ?? "";
|
|
1120
1154
|
export {
|
|
1121
1155
|
H as AccessibleFontSizeContext,
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
Yt as
|
|
1147
|
-
Gt as
|
|
1148
|
-
|
|
1156
|
+
wt as AccessibleFontSizeProvider,
|
|
1157
|
+
At as BlockKeyboardEvents,
|
|
1158
|
+
w as Box,
|
|
1159
|
+
pt as Clickable,
|
|
1160
|
+
mt as Column,
|
|
1161
|
+
It as HeaderText,
|
|
1162
|
+
et as Heading,
|
|
1163
|
+
gt as Indent,
|
|
1164
|
+
Rt as LargeText,
|
|
1165
|
+
bt as Nest,
|
|
1166
|
+
St as P,
|
|
1167
|
+
We as Paragraph,
|
|
1168
|
+
ht as ResizeAwareBox,
|
|
1169
|
+
ft as Row,
|
|
1170
|
+
_t as ScreenReaderOnlyText,
|
|
1171
|
+
dt as SeparatorLine,
|
|
1172
|
+
Et as SmallText,
|
|
1173
|
+
Ct as SmallerText,
|
|
1174
|
+
vt as Space,
|
|
1175
|
+
yt as Spacing,
|
|
1176
|
+
Tt as StandardText,
|
|
1177
|
+
_ as Text,
|
|
1178
|
+
$t as Txt,
|
|
1179
|
+
$ as booleanOrNumberToNumber,
|
|
1180
|
+
Yt as byNumberField,
|
|
1181
|
+
Gt as byStringField,
|
|
1182
|
+
Zt as exhaustSwitchCase,
|
|
1183
|
+
Kt as exhaustSwitchCaseElseThrow,
|
|
1184
|
+
kt as getAriaProps,
|
|
1149
1185
|
ze as getDataProps,
|
|
1150
1186
|
Te as getDimensionObject,
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1187
|
+
tr as invariant,
|
|
1188
|
+
rr as isEmptyFragment,
|
|
1189
|
+
Qt as parseFloatElseUndefined,
|
|
1190
|
+
er as parseIntElseUndefined,
|
|
1191
|
+
ur as pluralFormatter,
|
|
1192
|
+
nr as selectPluralRule,
|
|
1193
|
+
Jt as truthyKeysAsList,
|
|
1194
|
+
xt as useAccessibleFontSizeContext,
|
|
1195
|
+
Lt as useArraySet,
|
|
1196
|
+
T as useBoolean,
|
|
1197
|
+
Pt as useDebounce,
|
|
1198
|
+
zt as useDelayedFalse,
|
|
1199
|
+
Ft as useDomId,
|
|
1164
1200
|
Ie as useElementDimensions,
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1201
|
+
Mt as useElementFocus,
|
|
1202
|
+
Ot as useEventCallback,
|
|
1203
|
+
b as useEventListener,
|
|
1204
|
+
qt as useForwardedRef,
|
|
1205
|
+
Ht as useLatest,
|
|
1206
|
+
Nt as useMouseIsEntered,
|
|
1207
|
+
Dt as useMouseIsOver,
|
|
1208
|
+
Ut as useMultiOnClickOutside,
|
|
1209
|
+
Vt as useOnClickOutside,
|
|
1210
|
+
Bt as useOnNoMouseMovement,
|
|
1211
|
+
jt as useOnScreen,
|
|
1212
|
+
Wt as useTimeoutState,
|
|
1213
|
+
Xt as useToday
|
|
1178
1214
|
};
|
|
1179
1215
|
//# sourceMappingURL=index.es.js.map
|