@stenajs-webui/core 22.3.0 → 22.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
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
|
-
import { cssColor as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { system as
|
|
7
|
-
import { memoize as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
separatorLine:
|
|
11
|
-
},
|
|
2
|
+
import { cssColor as N } from "@stenajs-webui/theme";
|
|
3
|
+
import { jsx as c, Fragment as T, jsxs as U } from "react/jsx-runtime";
|
|
4
|
+
import V, { forwardRef as f, useState as h, useCallback as m, useLayoutEffect as F, useRef as g, createContext as j, useEffect as p, useMemo as S, useContext as q, isValidElement as B, Fragment as W } from "react";
|
|
5
|
+
import E from "@emotion/styled";
|
|
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 P, debounce as fe } from "lodash-es";
|
|
8
|
+
import O from "classnames";
|
|
9
|
+
const ge = "_separatorLine_nzfcz_1", ye = {
|
|
10
|
+
separatorLine: ge
|
|
11
|
+
}, lt = f(
|
|
12
12
|
({
|
|
13
|
-
color: e =
|
|
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__ */ c(
|
|
18
18
|
"hr",
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
20
|
+
className: ye.separatorLine,
|
|
21
21
|
"aria-hidden": !0,
|
|
22
22
|
color: e,
|
|
23
23
|
style: {
|
|
@@ -28,7 +28,7 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
28
28
|
ref: u
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
|
-
),
|
|
31
|
+
), ve = E.button`
|
|
32
32
|
display: inline-block;
|
|
33
33
|
user-select: none;
|
|
34
34
|
border: 0;
|
|
@@ -51,7 +51,7 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
51
51
|
${({ width: e }) => e ? `width: ${e};` : ""}
|
|
52
52
|
${({ height: e }) => e ? `height: ${e};` : ""}
|
|
53
53
|
${({ borderRadius: e }) => e ? `border-radius: ${e};` : ""}
|
|
54
|
-
`,
|
|
54
|
+
`, dt = f(
|
|
55
55
|
({
|
|
56
56
|
disableFocusHighlight: e,
|
|
57
57
|
onClick: t,
|
|
@@ -62,13 +62,13 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
62
62
|
opacityOnHover: s,
|
|
63
63
|
disabled: a,
|
|
64
64
|
children: i,
|
|
65
|
-
background:
|
|
65
|
+
background: l = "transparent",
|
|
66
66
|
hoverBackground: d,
|
|
67
|
-
focusBackground:
|
|
67
|
+
focusBackground: y,
|
|
68
68
|
type: k = "button",
|
|
69
69
|
..._
|
|
70
|
-
}, H) => /* @__PURE__ */
|
|
71
|
-
|
|
70
|
+
}, H) => /* @__PURE__ */ c(
|
|
71
|
+
ve,
|
|
72
72
|
{
|
|
73
73
|
opacityOnHover: s,
|
|
74
74
|
title: n,
|
|
@@ -79,18 +79,18 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
79
79
|
disableFocusHighlight: e,
|
|
80
80
|
pointer: !!(t || r) && !o,
|
|
81
81
|
ref: H,
|
|
82
|
-
background:
|
|
82
|
+
background: l,
|
|
83
83
|
hoverBackground: d,
|
|
84
|
-
focusBackground:
|
|
84
|
+
focusBackground: y,
|
|
85
85
|
type: k,
|
|
86
86
|
..._,
|
|
87
87
|
children: i
|
|
88
88
|
}
|
|
89
89
|
)
|
|
90
|
-
), x = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e,
|
|
90
|
+
), x = (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
|
-
}, I = (e) =>
|
|
93
|
+
}, I = (e) => be(x(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,
|
|
@@ -577,16 +577,16 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
577
577
|
for: !0,
|
|
578
578
|
class: !0,
|
|
579
579
|
autofocus: !0
|
|
580
|
-
},
|
|
580
|
+
}, xe = `^((${Object.keys(we).join(
|
|
581
581
|
"|"
|
|
582
|
-
)})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`,
|
|
583
|
-
(e) =>
|
|
584
|
-
),
|
|
582
|
+
)})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`, ke = new RegExp(xe), _e = he(
|
|
583
|
+
(e) => ke.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91
|
|
584
|
+
), $e = {
|
|
585
585
|
box: "var(--swui-shadow-box)",
|
|
586
586
|
popover: "var(--swui-shadow-popover)",
|
|
587
587
|
modal: "var(--swui-shadow-modal)",
|
|
588
588
|
bottom: "var(--swui-shadow-bottom)"
|
|
589
|
-
},
|
|
589
|
+
}, Se = [
|
|
590
590
|
"spacing",
|
|
591
591
|
"indent",
|
|
592
592
|
"gap",
|
|
@@ -594,7 +594,7 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
594
594
|
"height",
|
|
595
595
|
"overflow",
|
|
596
596
|
"display"
|
|
597
|
-
],
|
|
597
|
+
], Ee = (e) => Se.includes(e), Ce = X({
|
|
598
598
|
row: {
|
|
599
599
|
property: "flexDirection",
|
|
600
600
|
transform: (e) => e ? "row" : "column"
|
|
@@ -624,10 +624,10 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
624
624
|
},
|
|
625
625
|
shadow: {
|
|
626
626
|
property: "boxShadow",
|
|
627
|
-
transform: (e) =>
|
|
627
|
+
transform: (e) => $e[e] ?? e
|
|
628
628
|
}
|
|
629
|
-
}),
|
|
630
|
-
shouldForwardProp: (e) => typeof e == "string" ?
|
|
629
|
+
}), b = E("div", {
|
|
630
|
+
shouldForwardProp: (e) => typeof e == "string" ? Ee(e) ? !1 : _e(e) : !1
|
|
631
631
|
})`
|
|
632
632
|
--current-spacing: 0;
|
|
633
633
|
--current-indent: 0;
|
|
@@ -635,10 +635,7 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
635
635
|
box-sizing: border-box;
|
|
636
636
|
display: flex;
|
|
637
637
|
flex-direction: column;
|
|
638
|
-
${
|
|
639
|
-
${W};
|
|
640
|
-
${B};
|
|
641
|
-
${X};
|
|
638
|
+
${Ce};
|
|
642
639
|
${G};
|
|
643
640
|
${Y};
|
|
644
641
|
${K};
|
|
@@ -656,6 +653,9 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
656
653
|
${ae};
|
|
657
654
|
${ce};
|
|
658
655
|
${le};
|
|
656
|
+
${de};
|
|
657
|
+
${pe};
|
|
658
|
+
${me};
|
|
659
659
|
|
|
660
660
|
gap: calc(var(--current-gap) * var(--swui-metrics-space));
|
|
661
661
|
|
|
@@ -676,11 +676,11 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
676
676
|
${({ focusWithinBackground: e }) => e ? `background: ${e};` : ""}
|
|
677
677
|
${({ focusWithinBorder: e }) => e ? `border: ${e};` : ""}
|
|
678
678
|
}
|
|
679
|
-
`,
|
|
679
|
+
`, pt = f(
|
|
680
680
|
function(t, r) {
|
|
681
|
-
return /* @__PURE__ */
|
|
681
|
+
return /* @__PURE__ */ c(b, { 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();
|
|
685
685
|
return {
|
|
686
686
|
width: n,
|
|
@@ -692,49 +692,49 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
692
692
|
right: i,
|
|
693
693
|
bottom: o
|
|
694
694
|
};
|
|
695
|
-
},
|
|
695
|
+
}, Ie = (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, Re = (e, t) => {
|
|
696
696
|
const [r, n] = h(), u = m(() => {
|
|
697
697
|
window.requestAnimationFrame(() => {
|
|
698
698
|
if (e.current) {
|
|
699
|
-
const o =
|
|
700
|
-
(!r || !
|
|
699
|
+
const o = Te(e.current);
|
|
700
|
+
(!r || !Ie(r, o)) && t && t(o), n(o);
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
703
|
}, [e, r, n, t]);
|
|
704
|
-
return
|
|
704
|
+
return F(() => {
|
|
705
705
|
u();
|
|
706
706
|
}, [u]), {
|
|
707
707
|
dimensions: r
|
|
708
708
|
};
|
|
709
|
-
},
|
|
709
|
+
}, mt = f(
|
|
710
710
|
function({ onResize: t, ...r }, n) {
|
|
711
711
|
const u = g(null);
|
|
712
|
-
return
|
|
712
|
+
return Re(n ?? u, t), /* @__PURE__ */ c(b, { ...r, ref: n });
|
|
713
713
|
}
|
|
714
|
-
),
|
|
714
|
+
), ht = f(
|
|
715
715
|
function(t, r) {
|
|
716
|
-
return /* @__PURE__ */
|
|
716
|
+
return /* @__PURE__ */ c(b, { row: !0, ref: r, ...t });
|
|
717
717
|
}
|
|
718
|
-
),
|
|
719
|
-
return /* @__PURE__ */
|
|
720
|
-
}),
|
|
718
|
+
), ft = f(function({ num: t = 1, ...r }, n) {
|
|
719
|
+
return /* @__PURE__ */ c(b, { indent: t, ref: n, ...r });
|
|
720
|
+
}), gt = f(
|
|
721
721
|
function({ num: t = 1, ...r }, n) {
|
|
722
|
-
return /* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */ c(b, { spacing: t, ref: n, ...r });
|
|
723
723
|
}
|
|
724
|
-
),
|
|
724
|
+
), Le = 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
|
+
`, yt = ({
|
|
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__ */
|
|
737
|
-
|
|
736
|
+
return /* @__PURE__ */ c(
|
|
737
|
+
Le,
|
|
738
738
|
{
|
|
739
739
|
style: {
|
|
740
740
|
"--current-size": u,
|
|
@@ -743,17 +743,17 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
);
|
|
746
|
-
},
|
|
746
|
+
}, vt = ({ children: e, nest: t, render: r }) => t ? /* @__PURE__ */ c(T, { children: r(e) }) : /* @__PURE__ */ c(T, { children: e }), D = j({
|
|
747
747
|
isFontLarge: !1,
|
|
748
748
|
fontSizeRatio: 1
|
|
749
|
-
}), R = 12,
|
|
749
|
+
}), R = 12, bt = ({ children: e }) => {
|
|
750
750
|
const t = g(null), [r, n] = h(!1), [u, o] = h(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 =
|
|
755
|
+
for (const l of i) {
|
|
756
|
+
const d = l.contentRect.height;
|
|
757
757
|
n(d > R), o(d / R);
|
|
758
758
|
}
|
|
759
759
|
});
|
|
@@ -763,8 +763,8 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
763
763
|
() => ({ isFontLarge: r, fontSizeRatio: u }),
|
|
764
764
|
[u, r]
|
|
765
765
|
);
|
|
766
|
-
return /* @__PURE__ */
|
|
767
|
-
/* @__PURE__ */
|
|
766
|
+
return /* @__PURE__ */ U(D.Provider, { value: s, children: [
|
|
767
|
+
/* @__PURE__ */ c(
|
|
768
768
|
"div",
|
|
769
769
|
{
|
|
770
770
|
ref: t,
|
|
@@ -782,27 +782,27 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
782
782
|
),
|
|
783
783
|
e
|
|
784
784
|
] });
|
|
785
|
-
},
|
|
786
|
-
const e =
|
|
785
|
+
}, wt = () => {
|
|
786
|
+
const e = q(D);
|
|
787
787
|
return e || {
|
|
788
788
|
isFontLarge: !1,
|
|
789
789
|
fontSizeRatio: 1
|
|
790
790
|
};
|
|
791
|
-
},
|
|
792
|
-
visuallyHidden:
|
|
793
|
-
},
|
|
791
|
+
}, Ae = "_visuallyHidden_1gevf_1", Me = {
|
|
792
|
+
visuallyHidden: Ae
|
|
793
|
+
}, ze = (e) => P(e, Fe), xt = (e) => P(e, Pe), Fe = (e, t) => t.startsWith("data-") || t.startsWith("aria-"), Pe = (e, t) => t.startsWith("aria-"), kt = ({
|
|
794
794
|
children: e,
|
|
795
795
|
...t
|
|
796
|
-
}) => /* @__PURE__ */
|
|
797
|
-
text:
|
|
798
|
-
standard:
|
|
799
|
-
bold:
|
|
800
|
-
caption:
|
|
801
|
-
overline:
|
|
802
|
-
large:
|
|
803
|
-
medium:
|
|
804
|
-
small:
|
|
805
|
-
smaller:
|
|
796
|
+
}) => /* @__PURE__ */ c("span", { className: Me.visuallyHidden, ...ze(t), children: e }), Oe = "_text_1iisw_1", De = "_standard_1iisw_24", He = "_bold_1iisw_27", Ne = "_caption_1iisw_31", Ue = "_overline_1iisw_39", Ve = "_large_1iisw_48", je = "_medium_1iisw_53", qe = "_small_1iisw_58", Be = "_smaller_1iisw_63", $ = {
|
|
797
|
+
text: Oe,
|
|
798
|
+
standard: De,
|
|
799
|
+
bold: He,
|
|
800
|
+
caption: Ne,
|
|
801
|
+
overline: Ue,
|
|
802
|
+
large: Ve,
|
|
803
|
+
medium: je,
|
|
804
|
+
small: qe,
|
|
805
|
+
smaller: Be
|
|
806
806
|
}, w = f(
|
|
807
807
|
({
|
|
808
808
|
children: e,
|
|
@@ -814,14 +814,14 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
814
814
|
whiteSpace: s,
|
|
815
815
|
wordBreak: a,
|
|
816
816
|
textAlign: i,
|
|
817
|
-
overflow:
|
|
817
|
+
overflow: l,
|
|
818
818
|
textOverflow: d,
|
|
819
|
-
style:
|
|
819
|
+
style: y,
|
|
820
820
|
...k
|
|
821
|
-
}, _) => /* @__PURE__ */
|
|
821
|
+
}, _) => /* @__PURE__ */ c(
|
|
822
822
|
"span",
|
|
823
823
|
{
|
|
824
|
-
className:
|
|
824
|
+
className: O($.text, $[t], $[r], n),
|
|
825
825
|
ref: _,
|
|
826
826
|
style: {
|
|
827
827
|
color: u,
|
|
@@ -829,23 +829,23 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
829
829
|
whiteSpace: s,
|
|
830
830
|
wordBreak: a,
|
|
831
831
|
textAlign: i,
|
|
832
|
-
overflow:
|
|
832
|
+
overflow: l,
|
|
833
833
|
textOverflow: d,
|
|
834
|
-
...
|
|
834
|
+
...y
|
|
835
835
|
},
|
|
836
836
|
...k,
|
|
837
837
|
children: e
|
|
838
838
|
}
|
|
839
839
|
)
|
|
840
|
-
),
|
|
841
|
-
heading:
|
|
842
|
-
h1:
|
|
843
|
-
h2:
|
|
844
|
-
h3:
|
|
845
|
-
h4:
|
|
846
|
-
h5:
|
|
847
|
-
h6:
|
|
848
|
-
},
|
|
840
|
+
), _t = w, $t = (e) => /* @__PURE__ */ c(w, { size: "small", ...e }), St = (e) => /* @__PURE__ */ c(w, { size: "smaller", ...e }), Et = (e) => /* @__PURE__ */ c(w, { size: "medium", ...e }), Ct = (e) => /* @__PURE__ */ c(w, { size: "large", ...e }), We = "_heading_1cnsg_1", Xe = "_h1_1cnsg_10", Ge = "_h2_1cnsg_14", Ye = "_h3_1cnsg_18", Ke = "_h4_1cnsg_22", Ze = "_h5_1cnsg_26", Je = "_h6_1cnsg_30", L = {
|
|
841
|
+
heading: We,
|
|
842
|
+
h1: Xe,
|
|
843
|
+
h2: Ge,
|
|
844
|
+
h3: Ye,
|
|
845
|
+
h4: Ke,
|
|
846
|
+
h5: Ze,
|
|
847
|
+
h6: Je
|
|
848
|
+
}, Qe = f(
|
|
849
849
|
({
|
|
850
850
|
variant: e = "h3",
|
|
851
851
|
className: t,
|
|
@@ -856,38 +856,60 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
856
856
|
children: s,
|
|
857
857
|
as: a,
|
|
858
858
|
...i
|
|
859
|
-
},
|
|
859
|
+
}, l) => /* @__PURE__ */ c(
|
|
860
860
|
a ?? e,
|
|
861
861
|
{
|
|
862
|
-
className:
|
|
862
|
+
className: O(L.heading, L[e], t),
|
|
863
863
|
style: { color: r, whiteSpace: n, wordBreak: u, ...o },
|
|
864
|
-
ref:
|
|
864
|
+
ref: l,
|
|
865
865
|
...i,
|
|
866
866
|
children: s
|
|
867
867
|
}
|
|
868
868
|
)
|
|
869
|
-
),
|
|
869
|
+
), Tt = (e) => /* @__PURE__ */ c(Qe, { variant: "h2", ...e }), It = ({
|
|
870
|
+
blockedKeys: e,
|
|
871
|
+
...t
|
|
872
|
+
}) => {
|
|
873
|
+
const r = m(
|
|
874
|
+
(u) => {
|
|
875
|
+
(e == null || e.includes(u.key)) && (u.stopPropagation(), u.preventDefault());
|
|
876
|
+
},
|
|
877
|
+
[e]
|
|
878
|
+
), n = m((u) => {
|
|
879
|
+
u.stopPropagation(), u.preventDefault();
|
|
880
|
+
}, []);
|
|
881
|
+
return /* @__PURE__ */ c(
|
|
882
|
+
b,
|
|
883
|
+
{
|
|
884
|
+
...t,
|
|
885
|
+
onKeyDown: r,
|
|
886
|
+
onKeyUp: r,
|
|
887
|
+
onMouseDown: n,
|
|
888
|
+
onMouseUp: n
|
|
889
|
+
}
|
|
890
|
+
);
|
|
891
|
+
}, et = (e, t) => e === t, Rt = (e, t, r = et) => {
|
|
870
892
|
const n = m(
|
|
871
893
|
(i) => {
|
|
872
|
-
e.some((
|
|
894
|
+
e.some((l) => r(l, i)) || t([...e, i]);
|
|
873
895
|
},
|
|
874
896
|
[e, t, r]
|
|
875
897
|
), u = m(
|
|
876
898
|
(i) => {
|
|
877
899
|
t(
|
|
878
|
-
i.reduce((
|
|
900
|
+
i.reduce((l, d) => l.some((y) => r(y, d)) ? l : [...l, d], e)
|
|
879
901
|
);
|
|
880
902
|
},
|
|
881
903
|
[e, t, r]
|
|
882
904
|
), o = m(
|
|
883
905
|
(i) => {
|
|
884
|
-
const
|
|
885
|
-
|
|
906
|
+
const l = e.findIndex((d) => r(d, i));
|
|
907
|
+
l >= 0 && t(e.filter((d, y) => y !== l));
|
|
886
908
|
},
|
|
887
909
|
[e, t, r]
|
|
888
910
|
), s = m(
|
|
889
911
|
(i) => {
|
|
890
|
-
t(e.filter((
|
|
912
|
+
t(e.filter((l) => !i.some((d) => r(d, l))));
|
|
891
913
|
},
|
|
892
914
|
[e, t, r]
|
|
893
915
|
), a = m(
|
|
@@ -903,7 +925,7 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
903
925
|
removeMultiple: s,
|
|
904
926
|
toggle: a
|
|
905
927
|
};
|
|
906
|
-
},
|
|
928
|
+
}, C = (e) => {
|
|
907
929
|
const [t, r] = h(e), n = m(() => {
|
|
908
930
|
r(!0);
|
|
909
931
|
}, [r]), u = m(() => {
|
|
@@ -912,7 +934,7 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
912
934
|
r((s) => !s);
|
|
913
935
|
}, [r]);
|
|
914
936
|
return [t, n, u, o];
|
|
915
|
-
},
|
|
937
|
+
}, Lt = (e, t) => {
|
|
916
938
|
const [r, n] = h(e);
|
|
917
939
|
return p(() => {
|
|
918
940
|
const u = setTimeout(() => {
|
|
@@ -922,7 +944,7 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
922
944
|
clearTimeout(u);
|
|
923
945
|
};
|
|
924
946
|
}, [e, t]), r;
|
|
925
|
-
},
|
|
947
|
+
}, At = (e, t) => {
|
|
926
948
|
const [r, n] = h(e);
|
|
927
949
|
return p(() => {
|
|
928
950
|
e && n(!0);
|
|
@@ -934,10 +956,10 @@ const me = "_separatorLine_nzfcz_1", he = {
|
|
|
934
956
|
};
|
|
935
957
|
}, [e, t]), r;
|
|
936
958
|
};
|
|
937
|
-
let
|
|
938
|
-
const
|
|
939
|
-
const [t, r] = h(() =>
|
|
940
|
-
return p(() => r(
|
|
959
|
+
let tt = 0;
|
|
960
|
+
const A = (e) => `webui-${e ? e + "-" : ""}${++tt}`, Mt = (e) => {
|
|
961
|
+
const [t, r] = h(() => A(e));
|
|
962
|
+
return p(() => r(A(e)), [e]), t;
|
|
941
963
|
}, v = (e, t, r) => {
|
|
942
964
|
const n = g(null);
|
|
943
965
|
p(() => {
|
|
@@ -955,8 +977,8 @@ const z = (e) => `webui-${e ? e + "-" : ""}${++Je}`, It = (e) => {
|
|
|
955
977
|
s && s.removeEventListener(t, o);
|
|
956
978
|
};
|
|
957
979
|
}, [t, e]);
|
|
958
|
-
},
|
|
959
|
-
const [t, r, n] =
|
|
980
|
+
}, zt = (e) => {
|
|
981
|
+
const [t, r, n] = C(!1);
|
|
960
982
|
p(() => {
|
|
961
983
|
document.activeElement === e.current ? r() : n();
|
|
962
984
|
}, [e, n, r]), v(e, "focus", r), v(e, "blur", n);
|
|
@@ -966,24 +988,24 @@ const z = (e) => `webui-${e ? e + "-" : ""}${++Je}`, It = (e) => {
|
|
|
966
988
|
e.current && e.current.blur();
|
|
967
989
|
}, [e]);
|
|
968
990
|
return { isInFocus: t, focus: u, blur: o };
|
|
969
|
-
},
|
|
991
|
+
}, Ft = (e) => {
|
|
970
992
|
const t = g(e);
|
|
971
|
-
return
|
|
993
|
+
return F(() => {
|
|
972
994
|
t.current = e;
|
|
973
995
|
}), m((...r) => {
|
|
974
996
|
const { current: n } = t;
|
|
975
997
|
return n(...r);
|
|
976
998
|
}, []);
|
|
977
|
-
},
|
|
978
|
-
const t =
|
|
999
|
+
}, Pt = (e) => {
|
|
1000
|
+
const t = V.useRef(e);
|
|
979
1001
|
return t.current = e, t;
|
|
980
|
-
},
|
|
981
|
-
const [t, r, n] =
|
|
1002
|
+
}, Ot = (e) => {
|
|
1003
|
+
const [t, r, n] = C(!1);
|
|
982
1004
|
return v(e, "mouseover", r), v(e, "mouseout", n), t;
|
|
983
|
-
},
|
|
984
|
-
const [t, r, n] =
|
|
1005
|
+
}, Dt = (e) => {
|
|
1006
|
+
const [t, r, n] = C(!1);
|
|
985
1007
|
return v(e, "mouseenter", r), v(e, "mouseleave", n), t;
|
|
986
|
-
},
|
|
1008
|
+
}, Ht = (e, t) => {
|
|
987
1009
|
const r = g(() => {
|
|
988
1010
|
});
|
|
989
1011
|
p(() => {
|
|
@@ -996,7 +1018,7 @@ const z = (e) => `webui-${e ? e + "-" : ""}${++Je}`, It = (e) => {
|
|
|
996
1018
|
document.removeEventListener("mousedown", n), document.removeEventListener("touchstart", n);
|
|
997
1019
|
};
|
|
998
1020
|
}, [...e]);
|
|
999
|
-
},
|
|
1021
|
+
}, Nt = (e, t, r) => {
|
|
1000
1022
|
const n = g(() => {
|
|
1001
1023
|
});
|
|
1002
1024
|
p(() => {
|
|
@@ -1009,20 +1031,20 @@ const z = (e) => `webui-${e ? e + "-" : ""}${++Je}`, It = (e) => {
|
|
|
1009
1031
|
document.removeEventListener("mousedown", u, r), document.removeEventListener("touchstart", u, r);
|
|
1010
1032
|
};
|
|
1011
1033
|
}, [e, r]);
|
|
1012
|
-
},
|
|
1034
|
+
}, M = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], Ut = (e, t) => {
|
|
1013
1035
|
const r = g(() => {
|
|
1014
1036
|
});
|
|
1015
1037
|
p(() => {
|
|
1016
1038
|
r.current = e;
|
|
1017
1039
|
}, [e]), p(() => {
|
|
1018
|
-
const n =
|
|
1019
|
-
return
|
|
1020
|
-
|
|
1040
|
+
const n = fe(r.current, t);
|
|
1041
|
+
return M.forEach((u) => window.addEventListener(u, n)), () => {
|
|
1042
|
+
M.forEach(
|
|
1021
1043
|
(u) => window.removeEventListener(u, n)
|
|
1022
1044
|
);
|
|
1023
1045
|
};
|
|
1024
1046
|
}, [t]);
|
|
1025
|
-
},
|
|
1047
|
+
}, Vt = (e, t) => {
|
|
1026
1048
|
const [r, n] = h(!1), { rootMargin: u, root: o, threshold: s } = t || {}, a = S(() => new IntersectionObserver(
|
|
1027
1049
|
([i]) => n(i.isIntersecting),
|
|
1028
1050
|
{
|
|
@@ -1034,12 +1056,12 @@ const z = (e) => `webui-${e ? e + "-" : ""}${++Je}`, It = (e) => {
|
|
|
1034
1056
|
return p(() => (e.current && a.observe(e.current), () => {
|
|
1035
1057
|
a.disconnect();
|
|
1036
1058
|
}), [a, e]), r;
|
|
1037
|
-
},
|
|
1059
|
+
}, jt = (e) => {
|
|
1038
1060
|
const t = g(null);
|
|
1039
1061
|
return p(() => {
|
|
1040
1062
|
e && (typeof e == "function" ? e(t.current) : e.current = t.current);
|
|
1041
1063
|
}), t;
|
|
1042
|
-
},
|
|
1064
|
+
}, qt = (e, t, r = !0) => {
|
|
1043
1065
|
const [n, u] = h(e), o = g(null), s = m(
|
|
1044
1066
|
(a, i = t) => {
|
|
1045
1067
|
u(a), r && clearTimeout(o.current), o.current = setTimeout(() => u(e), i);
|
|
@@ -1049,78 +1071,85 @@ const z = (e) => `webui-${e ? e + "-" : ""}${++Je}`, It = (e) => {
|
|
|
1049
1071
|
return p(() => () => {
|
|
1050
1072
|
clearTimeout(o.current);
|
|
1051
1073
|
}, []), [n, s];
|
|
1052
|
-
},
|
|
1074
|
+
}, Bt = () => S(() => /* @__PURE__ */ new Date(), []), Wt = (e) => (t, r) => e(t).localeCompare(e(r)), Xt = (e) => (t, r) => e(t) - e(r), Gt = (e) => {
|
|
1053
1075
|
throw new Error(`Switch unhandled case: ${e}`);
|
|
1054
|
-
},
|
|
1076
|
+
}, Yt = (e, t) => t, Kt = (e) => Object.keys(e).filter((t) => e[t]), Zt = (e) => {
|
|
1055
1077
|
try {
|
|
1056
1078
|
const t = parseFloat(e);
|
|
1057
1079
|
return isNaN(t) || t == null ? void 0 : t;
|
|
1058
1080
|
} catch {
|
|
1059
1081
|
}
|
|
1060
|
-
},
|
|
1082
|
+
}, Jt = (e) => {
|
|
1061
1083
|
try {
|
|
1062
1084
|
const t = parseInt(e, 10);
|
|
1063
1085
|
return isNaN(t) || t == null ? void 0 : t;
|
|
1064
1086
|
} catch {
|
|
1065
1087
|
}
|
|
1066
1088
|
};
|
|
1067
|
-
function
|
|
1089
|
+
function Qt(e, t) {
|
|
1068
1090
|
if (e == null)
|
|
1069
1091
|
throw new Error("Invariant error: " + t);
|
|
1070
1092
|
}
|
|
1093
|
+
const er = (e) => {
|
|
1094
|
+
if (!B(e) || e.type !== W) return !1;
|
|
1095
|
+
const r = e.props.children;
|
|
1096
|
+
return Array.isArray(r) ? r.every(z) : z(r);
|
|
1097
|
+
}, z = (e) => e == null || e === !1;
|
|
1071
1098
|
export {
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1099
|
+
D as AccessibleFontSizeContext,
|
|
1100
|
+
bt as AccessibleFontSizeProvider,
|
|
1101
|
+
It as BlockKeyboardEvents,
|
|
1102
|
+
b as Box,
|
|
1103
|
+
dt as Clickable,
|
|
1104
|
+
pt as Column,
|
|
1105
|
+
Tt as HeaderText,
|
|
1106
|
+
Qe as Heading,
|
|
1107
|
+
ft as Indent,
|
|
1108
|
+
Ct as LargeText,
|
|
1109
|
+
vt as Nest,
|
|
1110
|
+
mt as ResizeAwareBox,
|
|
1111
|
+
ht as Row,
|
|
1112
|
+
kt as ScreenReaderOnlyText,
|
|
1113
|
+
lt as SeparatorLine,
|
|
1114
|
+
$t as SmallText,
|
|
1115
|
+
St as SmallerText,
|
|
1116
|
+
yt as Space,
|
|
1117
|
+
gt as Spacing,
|
|
1118
|
+
Et as StandardText,
|
|
1091
1119
|
w as Text,
|
|
1092
|
-
|
|
1120
|
+
_t as Txt,
|
|
1093
1121
|
x as booleanOrNumberToNumber,
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1122
|
+
Xt as byNumberField,
|
|
1123
|
+
Wt as byStringField,
|
|
1124
|
+
Yt as exhaustSwitchCase,
|
|
1125
|
+
Gt as exhaustSwitchCaseElseThrow,
|
|
1126
|
+
xt as getAriaProps,
|
|
1127
|
+
ze as getDataProps,
|
|
1128
|
+
Te as getDimensionObject,
|
|
1129
|
+
Qt as invariant,
|
|
1130
|
+
er as isEmptyFragment,
|
|
1131
|
+
Zt as parseFloatElseUndefined,
|
|
1132
|
+
Jt as parseIntElseUndefined,
|
|
1133
|
+
Kt as truthyKeysAsList,
|
|
1134
|
+
wt as useAccessibleFontSizeContext,
|
|
1135
|
+
Rt as useArraySet,
|
|
1136
|
+
C as useBoolean,
|
|
1137
|
+
Lt as useDebounce,
|
|
1138
|
+
At as useDelayedFalse,
|
|
1139
|
+
Mt as useDomId,
|
|
1140
|
+
Re as useElementDimensions,
|
|
1141
|
+
zt as useElementFocus,
|
|
1142
|
+
Ft as useEventCallback,
|
|
1114
1143
|
v as useEventListener,
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1144
|
+
jt as useForwardedRef,
|
|
1145
|
+
Pt as useLatest,
|
|
1146
|
+
Dt as useMouseIsEntered,
|
|
1147
|
+
Ot as useMouseIsOver,
|
|
1148
|
+
Ht as useMultiOnClickOutside,
|
|
1149
|
+
Nt as useOnClickOutside,
|
|
1150
|
+
Ut as useOnNoMouseMovement,
|
|
1151
|
+
Vt as useOnScreen,
|
|
1152
|
+
qt as useTimeoutState,
|
|
1153
|
+
Bt as useToday
|
|
1125
1154
|
};
|
|
1126
1155
|
//# sourceMappingURL=index.es.js.map
|