@stenajs-webui/core 21.41.0 → 21.42.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/accessibility/accessible-font-size-detector/AccessibleFontSizeProvider.d.ts +9 -0
- package/dist/accessibility/accessible-font-size-detector/UseAccessibleFontSizeContext.d.ts +2 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +326 -278
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +25 -25
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- /package/dist/{components/accessibility → accessibility/screen-reader-only-text}/ScreenReaderOnlyText.d.ts +0 -0
package/dist/index.es.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
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
|
|
2
|
+
import { cssColor as H } from "@stenajs-webui/theme";
|
|
3
|
+
import { jsx as l, Fragment as T, jsxs as D } from "react/jsx-runtime";
|
|
4
|
+
import N, { forwardRef as f, useState as h, useCallback as m, useLayoutEffect as O, useRef as g, createContext as U, useEffect as p, useMemo as S, useContext as V } from "react";
|
|
5
|
+
import C from "@emotion/styled";
|
|
6
|
+
import { system as j, background as q, border as B, borderRight as W, borderLeft as X, borderTop as G, borderBottom as Y, borderColor as K, borderRadius as Z, borderStyle as J, borderWidth as Q, boxShadow as ee, flexbox as te, overflow as re, position as ne, layout as ue, zIndex as oe, left as se, right as ie, top as ae, bottom as ce } from "styled-system";
|
|
7
|
+
import { memoize as le, pickBy as de, debounce as pe } from "lodash-es";
|
|
8
8
|
import A from "classnames";
|
|
9
|
-
const
|
|
10
|
-
separatorLine:
|
|
11
|
-
},
|
|
9
|
+
const me = "_separatorLine_nzfcz_1", he = {
|
|
10
|
+
separatorLine: me
|
|
11
|
+
}, it = f(
|
|
12
12
|
({
|
|
13
|
-
color: e =
|
|
13
|
+
color: e = H("--lhds-color-ui-300"),
|
|
14
14
|
size: t = "100%",
|
|
15
15
|
width: r = "1px",
|
|
16
|
-
vertical:
|
|
17
|
-
},
|
|
16
|
+
vertical: n = !1
|
|
17
|
+
}, u) => /* @__PURE__ */ l(
|
|
18
18
|
"hr",
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
20
|
+
className: he.separatorLine,
|
|
21
21
|
"aria-hidden": !0,
|
|
22
22
|
color: e,
|
|
23
23
|
style: {
|
|
24
24
|
backgroundColor: e,
|
|
25
|
-
height:
|
|
26
|
-
width:
|
|
25
|
+
height: n ? t || "100%" : r || "1px",
|
|
26
|
+
width: n ? r || "1px" : t || "100%"
|
|
27
27
|
},
|
|
28
|
-
ref:
|
|
28
|
+
ref: u
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
|
-
),
|
|
31
|
+
), fe = C.button`
|
|
32
32
|
display: inline-block;
|
|
33
33
|
user-select: none;
|
|
34
34
|
border: 0;
|
|
@@ -51,46 +51,46 @@ const ae = "_separatorLine_nzfcz_1", ce = {
|
|
|
51
51
|
${({ width: e }) => e ? `width: ${e};` : ""}
|
|
52
52
|
${({ height: e }) => e ? `height: ${e};` : ""}
|
|
53
53
|
${({ borderRadius: e }) => e ? `border-radius: ${e};` : ""}
|
|
54
|
-
`,
|
|
54
|
+
`, at = f(
|
|
55
55
|
({
|
|
56
56
|
disableFocusHighlight: e,
|
|
57
57
|
onClick: t,
|
|
58
58
|
onDblClick: r,
|
|
59
|
-
tooltip:
|
|
60
|
-
disableOpacityOnClick:
|
|
59
|
+
tooltip: n,
|
|
60
|
+
disableOpacityOnClick: u,
|
|
61
61
|
disablePointer: o,
|
|
62
62
|
opacityOnHover: s,
|
|
63
|
-
disabled:
|
|
63
|
+
disabled: a,
|
|
64
64
|
children: i,
|
|
65
|
-
background:
|
|
66
|
-
hoverBackground:
|
|
67
|
-
focusBackground:
|
|
65
|
+
background: c = "transparent",
|
|
66
|
+
hoverBackground: d,
|
|
67
|
+
focusBackground: b,
|
|
68
68
|
type: k = "button",
|
|
69
69
|
..._
|
|
70
|
-
}, P) => /* @__PURE__ */
|
|
71
|
-
|
|
70
|
+
}, P) => /* @__PURE__ */ l(
|
|
71
|
+
fe,
|
|
72
72
|
{
|
|
73
73
|
opacityOnHover: s,
|
|
74
|
-
title:
|
|
75
|
-
disabled:
|
|
76
|
-
disableOpacityOnClick:
|
|
74
|
+
title: n,
|
|
75
|
+
disabled: a,
|
|
76
|
+
disableOpacityOnClick: u,
|
|
77
77
|
onClick: t,
|
|
78
78
|
onDoubleClick: r,
|
|
79
79
|
disableFocusHighlight: e,
|
|
80
80
|
pointer: !!(t || r) && !o,
|
|
81
81
|
ref: P,
|
|
82
|
-
background:
|
|
83
|
-
hoverBackground:
|
|
84
|
-
focusBackground:
|
|
82
|
+
background: c,
|
|
83
|
+
hoverBackground: d,
|
|
84
|
+
focusBackground: b,
|
|
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, ge = (e) => {
|
|
91
91
|
if (e !== 0)
|
|
92
92
|
return `calc(${e} * var(--swui-metrics-space))`;
|
|
93
|
-
},
|
|
93
|
+
}, I = (e) => ge(x(e)), be = {
|
|
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 ae = "_separatorLine_nzfcz_1", ce = {
|
|
|
577
577
|
for: !0,
|
|
578
578
|
class: !0,
|
|
579
579
|
autofocus: !0
|
|
580
|
-
},
|
|
580
|
+
}, ve = `^((${Object.keys(be).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)-.*))$`, ye = new RegExp(ve), we = le(
|
|
583
|
+
(e) => ye.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91
|
|
584
|
+
), xe = {
|
|
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
|
+
}, ke = [
|
|
590
590
|
"spacing",
|
|
591
591
|
"indent",
|
|
592
592
|
"gap",
|
|
@@ -594,7 +594,7 @@ const ae = "_separatorLine_nzfcz_1", ce = {
|
|
|
594
594
|
"height",
|
|
595
595
|
"overflow",
|
|
596
596
|
"display"
|
|
597
|
-
],
|
|
597
|
+
], _e = (e) => ke.includes(e), $e = j({
|
|
598
598
|
row: {
|
|
599
599
|
property: "flexDirection",
|
|
600
600
|
transform: (e) => e ? "row" : "column"
|
|
@@ -616,18 +616,18 @@ const ae = "_separatorLine_nzfcz_1", ce = {
|
|
|
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
|
-
transform: (e) =>
|
|
627
|
+
transform: (e) => xe[e] ?? e
|
|
628
628
|
}
|
|
629
|
-
}),
|
|
630
|
-
shouldForwardProp: (e) => typeof e == "string" ?
|
|
629
|
+
}), y = C("div", {
|
|
630
|
+
shouldForwardProp: (e) => typeof e == "string" ? _e(e) ? !1 : we(e) : !1
|
|
631
631
|
})`
|
|
632
632
|
--current-spacing: 0;
|
|
633
633
|
--current-indent: 0;
|
|
@@ -635,13 +635,8 @@ const ae = "_separatorLine_nzfcz_1", ce = {
|
|
|
635
635
|
box-sizing: border-box;
|
|
636
636
|
display: flex;
|
|
637
637
|
flex-direction: column;
|
|
638
|
-
${
|
|
639
|
-
${F};
|
|
640
|
-
${N};
|
|
641
|
-
${U};
|
|
642
|
-
${V};
|
|
638
|
+
${$e};
|
|
643
639
|
${q};
|
|
644
|
-
${j};
|
|
645
640
|
${B};
|
|
646
641
|
${W};
|
|
647
642
|
${X};
|
|
@@ -654,8 +649,13 @@ const ae = "_separatorLine_nzfcz_1", ce = {
|
|
|
654
649
|
${ee};
|
|
655
650
|
${te};
|
|
656
651
|
${re};
|
|
657
|
-
${ue};
|
|
658
652
|
${ne};
|
|
653
|
+
${ue};
|
|
654
|
+
${oe};
|
|
655
|
+
${se};
|
|
656
|
+
${ie};
|
|
657
|
+
${ae};
|
|
658
|
+
${ce};
|
|
659
659
|
|
|
660
660
|
gap: calc(var(--current-gap) * var(--swui-metrics-space));
|
|
661
661
|
|
|
@@ -676,232 +676,277 @@ const ae = "_separatorLine_nzfcz_1", ce = {
|
|
|
676
676
|
${({ focusWithinBackground: e }) => e ? `background: ${e};` : ""}
|
|
677
677
|
${({ focusWithinBorder: e }) => e ? `border: ${e};` : ""}
|
|
678
678
|
}
|
|
679
|
-
`,
|
|
679
|
+
`, ct = f(
|
|
680
680
|
function(t, r) {
|
|
681
|
-
return /* @__PURE__ */
|
|
681
|
+
return /* @__PURE__ */ l(y, { ref: r, ...t });
|
|
682
682
|
}
|
|
683
|
-
),
|
|
684
|
-
const { x: t, y: r, width:
|
|
683
|
+
), Se = (e) => {
|
|
684
|
+
const { x: t, y: r, width: n, height: u, bottom: o, top: s, left: a, right: i } = e.getBoundingClientRect();
|
|
685
685
|
return {
|
|
686
|
-
width:
|
|
687
|
-
height:
|
|
686
|
+
width: n,
|
|
687
|
+
height: u,
|
|
688
688
|
top: s,
|
|
689
|
-
left:
|
|
689
|
+
left: a,
|
|
690
690
|
x: t,
|
|
691
691
|
y: r,
|
|
692
692
|
right: i,
|
|
693
693
|
bottom: o
|
|
694
694
|
};
|
|
695
|
-
},
|
|
696
|
-
const [r,
|
|
695
|
+
}, Ce = (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, Ee = (e, t) => {
|
|
696
|
+
const [r, n] = h(), u = m(() => {
|
|
697
697
|
window.requestAnimationFrame(() => {
|
|
698
698
|
if (e.current) {
|
|
699
|
-
const o =
|
|
700
|
-
(!r || !
|
|
699
|
+
const o = Se(e.current);
|
|
700
|
+
(!r || !Ce(r, o)) && t && t(o), n(o);
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
|
-
}, [e, r,
|
|
704
|
-
return
|
|
705
|
-
|
|
706
|
-
}, [
|
|
703
|
+
}, [e, r, n, t]);
|
|
704
|
+
return O(() => {
|
|
705
|
+
u();
|
|
706
|
+
}, [u]), {
|
|
707
707
|
dimensions: r
|
|
708
708
|
};
|
|
709
|
-
},
|
|
710
|
-
function({ onResize: t, ...r },
|
|
711
|
-
const
|
|
712
|
-
return
|
|
709
|
+
}, lt = f(
|
|
710
|
+
function({ onResize: t, ...r }, n) {
|
|
711
|
+
const u = g(null);
|
|
712
|
+
return Ee(n ?? u, t), /* @__PURE__ */ l(y, { ...r, ref: n });
|
|
713
713
|
}
|
|
714
|
-
),
|
|
714
|
+
), dt = f(
|
|
715
715
|
function(t, r) {
|
|
716
|
-
return /* @__PURE__ */
|
|
716
|
+
return /* @__PURE__ */ l(y, { row: !0, ref: r, ...t });
|
|
717
717
|
}
|
|
718
|
-
),
|
|
719
|
-
return /* @__PURE__ */
|
|
720
|
-
}),
|
|
721
|
-
function({ num: t = 1, ...r },
|
|
722
|
-
return /* @__PURE__ */
|
|
718
|
+
), pt = f(function({ num: t = 1, ...r }, n) {
|
|
719
|
+
return /* @__PURE__ */ l(y, { indent: t, ref: n, ...r });
|
|
720
|
+
}), mt = f(
|
|
721
|
+
function({ num: t = 1, ...r }, n) {
|
|
722
|
+
return /* @__PURE__ */ l(y, { spacing: t, ref: n, ...r });
|
|
723
723
|
}
|
|
724
|
-
),
|
|
724
|
+
), Te = C.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
|
+
`, ht = ({
|
|
730
730
|
half: e = !1,
|
|
731
731
|
horizontal: t = !1,
|
|
732
732
|
num: r = 1,
|
|
733
|
-
vertical:
|
|
733
|
+
vertical: n = !1
|
|
734
734
|
}) => {
|
|
735
|
-
const
|
|
736
|
-
return /* @__PURE__ */
|
|
737
|
-
|
|
735
|
+
const u = r * (e ? 0.5 : 1);
|
|
736
|
+
return /* @__PURE__ */ l(
|
|
737
|
+
Te,
|
|
738
738
|
{
|
|
739
739
|
style: {
|
|
740
|
-
"--current-size":
|
|
740
|
+
"--current-size": u,
|
|
741
741
|
height: t ? 1 : void 0,
|
|
742
|
-
width:
|
|
742
|
+
width: n ? 1 : void 0
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
);
|
|
746
|
-
},
|
|
747
|
-
|
|
748
|
-
|
|
746
|
+
}, ft = ({ children: e, nest: t, render: r }) => t ? /* @__PURE__ */ l(T, { children: r(e) }) : /* @__PURE__ */ l(T, { children: e }), F = U({
|
|
747
|
+
isFontLarge: !1,
|
|
748
|
+
fontSizeRatio: 1
|
|
749
|
+
}), R = 12, gt = ({ children: e }) => {
|
|
750
|
+
const t = g(null), [r, n] = h(!1), [u, o] = h(1);
|
|
751
|
+
p(() => {
|
|
752
|
+
if (!t.current)
|
|
753
|
+
return;
|
|
754
|
+
const a = new ResizeObserver((i) => {
|
|
755
|
+
for (const c of i) {
|
|
756
|
+
const d = c.contentRect.height;
|
|
757
|
+
n(d > R), o(d / R);
|
|
758
|
+
}
|
|
759
|
+
});
|
|
760
|
+
return a.observe(t.current), () => a.disconnect();
|
|
761
|
+
}, []);
|
|
762
|
+
const s = S(
|
|
763
|
+
() => ({ isFontLarge: r, fontSizeRatio: u }),
|
|
764
|
+
[u, r]
|
|
765
|
+
);
|
|
766
|
+
return /* @__PURE__ */ D(F.Provider, { value: s, children: [
|
|
767
|
+
/* @__PURE__ */ l(
|
|
768
|
+
"div",
|
|
769
|
+
{
|
|
770
|
+
ref: t,
|
|
771
|
+
"aria-hidden": !0,
|
|
772
|
+
style: {
|
|
773
|
+
fontSize: "1rem",
|
|
774
|
+
position: "absolute",
|
|
775
|
+
visibility: "hidden",
|
|
776
|
+
height: "auto",
|
|
777
|
+
width: "auto",
|
|
778
|
+
whiteSpace: "nowrap"
|
|
779
|
+
},
|
|
780
|
+
children: "M"
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
e
|
|
784
|
+
] });
|
|
785
|
+
}, bt = () => {
|
|
786
|
+
const e = V(F);
|
|
787
|
+
return e || {
|
|
788
|
+
isFontLarge: !1,
|
|
789
|
+
fontSizeRatio: 1
|
|
790
|
+
};
|
|
791
|
+
}, Ie = "_visuallyHidden_1gevf_1", Re = {
|
|
792
|
+
visuallyHidden: Ie
|
|
793
|
+
}, Le = (e) => de(e, ze), ze = (e, t) => Me(t), Me = (e) => e.startsWith("data-") || e.startsWith("aria-"), vt = ({
|
|
749
794
|
children: e,
|
|
750
795
|
...t
|
|
751
|
-
}) => /* @__PURE__ */
|
|
752
|
-
text:
|
|
753
|
-
standard:
|
|
754
|
-
bold:
|
|
755
|
-
caption:
|
|
756
|
-
overline:
|
|
757
|
-
large:
|
|
758
|
-
medium:
|
|
759
|
-
small:
|
|
760
|
-
smaller:
|
|
761
|
-
}, w =
|
|
796
|
+
}) => /* @__PURE__ */ l("span", { className: Re.visuallyHidden, ...Le(t), children: e }), Oe = "_text_1iisw_1", Ae = "_standard_1iisw_24", Fe = "_bold_1iisw_27", Pe = "_caption_1iisw_31", He = "_overline_1iisw_39", De = "_large_1iisw_48", Ne = "_medium_1iisw_53", Ue = "_small_1iisw_58", Ve = "_smaller_1iisw_63", $ = {
|
|
797
|
+
text: Oe,
|
|
798
|
+
standard: Ae,
|
|
799
|
+
bold: Fe,
|
|
800
|
+
caption: Pe,
|
|
801
|
+
overline: He,
|
|
802
|
+
large: De,
|
|
803
|
+
medium: Ne,
|
|
804
|
+
small: Ue,
|
|
805
|
+
smaller: Ve
|
|
806
|
+
}, w = f(
|
|
762
807
|
({
|
|
763
808
|
children: e,
|
|
764
809
|
variant: t = "standard",
|
|
765
810
|
size: r = "medium",
|
|
766
|
-
className:
|
|
767
|
-
color:
|
|
811
|
+
className: n,
|
|
812
|
+
color: u,
|
|
768
813
|
userSelect: o,
|
|
769
814
|
whiteSpace: s,
|
|
770
|
-
wordBreak:
|
|
815
|
+
wordBreak: a,
|
|
771
816
|
textAlign: i,
|
|
772
|
-
overflow:
|
|
773
|
-
textOverflow:
|
|
774
|
-
style:
|
|
817
|
+
overflow: c,
|
|
818
|
+
textOverflow: d,
|
|
819
|
+
style: b,
|
|
775
820
|
...k
|
|
776
|
-
}, _) => /* @__PURE__ */
|
|
821
|
+
}, _) => /* @__PURE__ */ l(
|
|
777
822
|
"span",
|
|
778
823
|
{
|
|
779
|
-
className: A($.text, $[t], $[r],
|
|
824
|
+
className: A($.text, $[t], $[r], n),
|
|
780
825
|
ref: _,
|
|
781
826
|
style: {
|
|
782
|
-
color:
|
|
827
|
+
color: u,
|
|
783
828
|
userSelect: o,
|
|
784
829
|
whiteSpace: s,
|
|
785
|
-
wordBreak:
|
|
830
|
+
wordBreak: a,
|
|
786
831
|
textAlign: i,
|
|
787
|
-
overflow:
|
|
788
|
-
textOverflow:
|
|
789
|
-
...
|
|
832
|
+
overflow: c,
|
|
833
|
+
textOverflow: d,
|
|
834
|
+
...b
|
|
790
835
|
},
|
|
791
836
|
...k,
|
|
792
837
|
children: e
|
|
793
838
|
}
|
|
794
839
|
)
|
|
795
|
-
),
|
|
796
|
-
heading:
|
|
797
|
-
h1:
|
|
798
|
-
h2:
|
|
799
|
-
h3:
|
|
800
|
-
h4:
|
|
801
|
-
h5:
|
|
802
|
-
h6:
|
|
803
|
-
},
|
|
840
|
+
), yt = w, wt = (e) => /* @__PURE__ */ l(w, { size: "small", ...e }), xt = (e) => /* @__PURE__ */ l(w, { size: "smaller", ...e }), kt = (e) => /* @__PURE__ */ l(w, { size: "medium", ...e }), _t = (e) => /* @__PURE__ */ l(w, { size: "large", ...e }), je = "_heading_1cnsg_1", qe = "_h1_1cnsg_10", Be = "_h2_1cnsg_14", We = "_h3_1cnsg_18", Xe = "_h4_1cnsg_22", Ge = "_h5_1cnsg_26", Ye = "_h6_1cnsg_30", L = {
|
|
841
|
+
heading: je,
|
|
842
|
+
h1: qe,
|
|
843
|
+
h2: Be,
|
|
844
|
+
h3: We,
|
|
845
|
+
h4: Xe,
|
|
846
|
+
h5: Ge,
|
|
847
|
+
h6: Ye
|
|
848
|
+
}, Ke = f(
|
|
804
849
|
({
|
|
805
850
|
variant: e = "h3",
|
|
806
851
|
className: t,
|
|
807
852
|
color: r,
|
|
808
|
-
whiteSpace:
|
|
809
|
-
wordBreak:
|
|
853
|
+
whiteSpace: n,
|
|
854
|
+
wordBreak: u,
|
|
810
855
|
style: o,
|
|
811
856
|
children: s,
|
|
812
|
-
as:
|
|
857
|
+
as: a,
|
|
813
858
|
...i
|
|
814
|
-
},
|
|
815
|
-
|
|
859
|
+
}, c) => /* @__PURE__ */ l(
|
|
860
|
+
a ?? e,
|
|
816
861
|
{
|
|
817
|
-
className: A(
|
|
818
|
-
style: { color: r, whiteSpace:
|
|
819
|
-
ref:
|
|
862
|
+
className: A(L.heading, L[e], t),
|
|
863
|
+
style: { color: r, whiteSpace: n, wordBreak: u, ...o },
|
|
864
|
+
ref: c,
|
|
820
865
|
...i,
|
|
821
866
|
children: s
|
|
822
867
|
}
|
|
823
868
|
)
|
|
824
|
-
),
|
|
825
|
-
const
|
|
869
|
+
), $t = (e) => /* @__PURE__ */ l(Ke, { variant: "h2", ...e }), Ze = (e, t) => e === t, St = (e, t, r = Ze) => {
|
|
870
|
+
const n = m(
|
|
826
871
|
(i) => {
|
|
827
|
-
e.some((
|
|
872
|
+
e.some((c) => r(c, i)) || t([...e, i]);
|
|
828
873
|
},
|
|
829
874
|
[e, t, r]
|
|
830
|
-
),
|
|
875
|
+
), u = m(
|
|
831
876
|
(i) => {
|
|
832
877
|
t(
|
|
833
|
-
i.reduce((
|
|
878
|
+
i.reduce((c, d) => c.some((b) => r(b, d)) ? c : [...c, d], e)
|
|
834
879
|
);
|
|
835
880
|
},
|
|
836
881
|
[e, t, r]
|
|
837
882
|
), o = m(
|
|
838
883
|
(i) => {
|
|
839
|
-
const
|
|
840
|
-
|
|
884
|
+
const c = e.findIndex((d) => r(d, i));
|
|
885
|
+
c >= 0 && t(e.filter((d, b) => b !== c));
|
|
841
886
|
},
|
|
842
887
|
[e, t, r]
|
|
843
888
|
), s = m(
|
|
844
889
|
(i) => {
|
|
845
|
-
t(e.filter((
|
|
890
|
+
t(e.filter((c) => !i.some((d) => r(d, c))));
|
|
846
891
|
},
|
|
847
892
|
[e, t, r]
|
|
848
|
-
),
|
|
893
|
+
), a = m(
|
|
849
894
|
(i) => {
|
|
850
|
-
e.some((
|
|
895
|
+
e.some((d) => r(d, i)) ? o(i) : n(i);
|
|
851
896
|
},
|
|
852
|
-
[e,
|
|
897
|
+
[e, n, o, r]
|
|
853
898
|
);
|
|
854
899
|
return {
|
|
855
|
-
add:
|
|
856
|
-
addMultiple:
|
|
900
|
+
add: n,
|
|
901
|
+
addMultiple: u,
|
|
857
902
|
remove: o,
|
|
858
903
|
removeMultiple: s,
|
|
859
|
-
toggle:
|
|
904
|
+
toggle: a
|
|
860
905
|
};
|
|
861
906
|
}, E = (e) => {
|
|
862
|
-
const [t, r] =
|
|
907
|
+
const [t, r] = h(e), n = m(() => {
|
|
863
908
|
r(!0);
|
|
864
|
-
}, [r]),
|
|
909
|
+
}, [r]), u = m(() => {
|
|
865
910
|
r(!1);
|
|
866
911
|
}, [r]), o = m(() => {
|
|
867
912
|
r((s) => !s);
|
|
868
913
|
}, [r]);
|
|
869
|
-
return [t,
|
|
870
|
-
},
|
|
871
|
-
const [r,
|
|
872
|
-
return
|
|
873
|
-
const
|
|
874
|
-
|
|
914
|
+
return [t, n, u, o];
|
|
915
|
+
}, Ct = (e, t) => {
|
|
916
|
+
const [r, n] = h(e);
|
|
917
|
+
return p(() => {
|
|
918
|
+
const u = setTimeout(() => {
|
|
919
|
+
n(e);
|
|
875
920
|
}, t);
|
|
876
921
|
return () => {
|
|
877
|
-
clearTimeout(
|
|
922
|
+
clearTimeout(u);
|
|
878
923
|
};
|
|
879
924
|
}, [e, t]), r;
|
|
880
|
-
},
|
|
881
|
-
const [r,
|
|
882
|
-
return
|
|
883
|
-
e &&
|
|
884
|
-
const
|
|
885
|
-
e ||
|
|
925
|
+
}, Et = (e, t) => {
|
|
926
|
+
const [r, n] = h(e);
|
|
927
|
+
return p(() => {
|
|
928
|
+
e && n(!0);
|
|
929
|
+
const u = setTimeout(() => {
|
|
930
|
+
e || n(e);
|
|
886
931
|
}, t);
|
|
887
932
|
return () => {
|
|
888
|
-
clearTimeout(
|
|
933
|
+
clearTimeout(u);
|
|
889
934
|
};
|
|
890
935
|
}, [e, t]), r;
|
|
891
936
|
};
|
|
892
|
-
let
|
|
893
|
-
const
|
|
894
|
-
const [t, r] =
|
|
895
|
-
return
|
|
937
|
+
let Je = 0;
|
|
938
|
+
const z = (e) => `webui-${e ? e + "-" : ""}${++Je}`, Tt = (e) => {
|
|
939
|
+
const [t, r] = h(() => z(e));
|
|
940
|
+
return p(() => r(z(e)), [e]), t;
|
|
896
941
|
}, v = (e, t, r) => {
|
|
897
|
-
const
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
}, [r]),
|
|
942
|
+
const n = g(null);
|
|
943
|
+
p(() => {
|
|
944
|
+
n.current = r;
|
|
945
|
+
}, [r]), p(() => {
|
|
901
946
|
if (!(e.current && e.current.addEventListener)) return;
|
|
902
|
-
const o = (
|
|
903
|
-
if (
|
|
904
|
-
return
|
|
947
|
+
const o = (a) => {
|
|
948
|
+
if (n.current)
|
|
949
|
+
return n.current(a);
|
|
905
950
|
};
|
|
906
951
|
if (!e.current)
|
|
907
952
|
return;
|
|
@@ -910,168 +955,171 @@ const R = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => {
|
|
|
910
955
|
s && s.removeEventListener(t, o);
|
|
911
956
|
};
|
|
912
957
|
}, [t, e]);
|
|
913
|
-
},
|
|
914
|
-
const [t, r,
|
|
915
|
-
|
|
916
|
-
document.activeElement === e.current ? r() :
|
|
917
|
-
}, [e,
|
|
918
|
-
const
|
|
958
|
+
}, It = (e) => {
|
|
959
|
+
const [t, r, n] = E(!1);
|
|
960
|
+
p(() => {
|
|
961
|
+
document.activeElement === e.current ? r() : n();
|
|
962
|
+
}, [e, n, r]), v(e, "focus", r), v(e, "blur", n);
|
|
963
|
+
const u = m(() => {
|
|
919
964
|
e.current && e.current.focus();
|
|
920
965
|
}, [e]), o = m(() => {
|
|
921
966
|
e.current && e.current.blur();
|
|
922
967
|
}, [e]);
|
|
923
|
-
return { isInFocus: t, focus:
|
|
924
|
-
},
|
|
968
|
+
return { isInFocus: t, focus: u, blur: o };
|
|
969
|
+
}, Rt = (e) => {
|
|
925
970
|
const t = g(e);
|
|
926
|
-
return
|
|
971
|
+
return O(() => {
|
|
927
972
|
t.current = e;
|
|
928
973
|
}), m((...r) => {
|
|
929
|
-
const { current:
|
|
930
|
-
return
|
|
974
|
+
const { current: n } = t;
|
|
975
|
+
return n(...r);
|
|
931
976
|
}, []);
|
|
932
|
-
},
|
|
933
|
-
const t =
|
|
977
|
+
}, Lt = (e) => {
|
|
978
|
+
const t = N.useRef(e);
|
|
934
979
|
return t.current = e, t;
|
|
935
|
-
},
|
|
936
|
-
const [t, r,
|
|
937
|
-
return v(e, "mouseover", r), v(e, "mouseout",
|
|
938
|
-
},
|
|
939
|
-
const [t, r,
|
|
940
|
-
return v(e, "mouseenter", r), v(e, "mouseleave",
|
|
941
|
-
},
|
|
980
|
+
}, zt = (e) => {
|
|
981
|
+
const [t, r, n] = E(!1);
|
|
982
|
+
return v(e, "mouseover", r), v(e, "mouseout", n), t;
|
|
983
|
+
}, Mt = (e) => {
|
|
984
|
+
const [t, r, n] = E(!1);
|
|
985
|
+
return v(e, "mouseenter", r), v(e, "mouseleave", n), t;
|
|
986
|
+
}, Ot = (e, t) => {
|
|
942
987
|
const r = g(() => {
|
|
943
988
|
});
|
|
944
|
-
|
|
989
|
+
p(() => {
|
|
945
990
|
r.current = t;
|
|
946
|
-
}, [t]),
|
|
947
|
-
const
|
|
948
|
-
e.filter((s) => s.current).every((s) => s.current && !s.current.contains(
|
|
991
|
+
}, [t]), p(() => {
|
|
992
|
+
const n = (u) => {
|
|
993
|
+
e.filter((s) => s.current).every((s) => s.current && !s.current.contains(u.target)) && r.current(u);
|
|
949
994
|
};
|
|
950
|
-
return document.addEventListener("mousedown",
|
|
951
|
-
document.removeEventListener("mousedown",
|
|
995
|
+
return document.addEventListener("mousedown", n), document.addEventListener("touchstart", n), () => {
|
|
996
|
+
document.removeEventListener("mousedown", n), document.removeEventListener("touchstart", n);
|
|
952
997
|
};
|
|
953
998
|
}, [...e]);
|
|
954
|
-
},
|
|
955
|
-
const
|
|
999
|
+
}, At = (e, t, r) => {
|
|
1000
|
+
const n = g(() => {
|
|
956
1001
|
});
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
}, [t]),
|
|
960
|
-
const
|
|
961
|
-
!e.current || e.current.contains(o.target) ||
|
|
1002
|
+
p(() => {
|
|
1003
|
+
n.current = t;
|
|
1004
|
+
}, [t]), p(() => {
|
|
1005
|
+
const u = (o) => {
|
|
1006
|
+
!e.current || e.current.contains(o.target) || n.current(o);
|
|
962
1007
|
};
|
|
963
|
-
return document.addEventListener("mousedown",
|
|
964
|
-
document.removeEventListener("mousedown",
|
|
1008
|
+
return document.addEventListener("mousedown", u, r), document.addEventListener("touchstart", u, r), () => {
|
|
1009
|
+
document.removeEventListener("mousedown", u, r), document.removeEventListener("touchstart", u, r);
|
|
965
1010
|
};
|
|
966
1011
|
}, [e, r]);
|
|
967
|
-
},
|
|
1012
|
+
}, M = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], Ft = (e, t) => {
|
|
968
1013
|
const r = g(() => {
|
|
969
1014
|
});
|
|
970
|
-
|
|
1015
|
+
p(() => {
|
|
971
1016
|
r.current = e;
|
|
972
|
-
}, [e]),
|
|
973
|
-
const
|
|
974
|
-
return
|
|
975
|
-
|
|
976
|
-
(
|
|
1017
|
+
}, [e]), p(() => {
|
|
1018
|
+
const n = pe(r.current, t);
|
|
1019
|
+
return M.forEach((u) => window.addEventListener(u, n)), () => {
|
|
1020
|
+
M.forEach(
|
|
1021
|
+
(u) => window.removeEventListener(u, n)
|
|
977
1022
|
);
|
|
978
1023
|
};
|
|
979
1024
|
}, [t]);
|
|
980
|
-
},
|
|
981
|
-
const [r,
|
|
982
|
-
([i]) =>
|
|
1025
|
+
}, Pt = (e, t) => {
|
|
1026
|
+
const [r, n] = h(!1), { rootMargin: u, root: o, threshold: s } = t || {}, a = S(() => new IntersectionObserver(
|
|
1027
|
+
([i]) => n(i.isIntersecting),
|
|
983
1028
|
{
|
|
984
|
-
rootMargin:
|
|
1029
|
+
rootMargin: u,
|
|
985
1030
|
root: o,
|
|
986
1031
|
threshold: s
|
|
987
1032
|
}
|
|
988
|
-
), [
|
|
989
|
-
return
|
|
990
|
-
|
|
991
|
-
}), [
|
|
992
|
-
},
|
|
1033
|
+
), [n, u, o, s]);
|
|
1034
|
+
return p(() => (e.current && a.observe(e.current), () => {
|
|
1035
|
+
a.disconnect();
|
|
1036
|
+
}), [a, e]), r;
|
|
1037
|
+
}, Ht = (e) => {
|
|
993
1038
|
const t = g(null);
|
|
994
|
-
return
|
|
1039
|
+
return p(() => {
|
|
995
1040
|
e && (typeof e == "function" ? e(t.current) : e.current = t.current);
|
|
996
1041
|
}), t;
|
|
997
|
-
},
|
|
998
|
-
const [
|
|
999
|
-
(
|
|
1000
|
-
|
|
1042
|
+
}, Dt = (e, t, r = !0) => {
|
|
1043
|
+
const [n, u] = h(e), o = g(null), s = m(
|
|
1044
|
+
(a, i = t) => {
|
|
1045
|
+
u(a), r && clearTimeout(o.current), o.current = setTimeout(() => u(e), i);
|
|
1001
1046
|
},
|
|
1002
1047
|
[t, r, e]
|
|
1003
1048
|
);
|
|
1004
|
-
return
|
|
1049
|
+
return p(() => () => {
|
|
1005
1050
|
clearTimeout(o.current);
|
|
1006
|
-
}, []), [
|
|
1007
|
-
},
|
|
1051
|
+
}, []), [n, s];
|
|
1052
|
+
}, Nt = () => S(() => /* @__PURE__ */ new Date(), []), Ut = (e) => (t, r) => e(t).localeCompare(e(r)), Vt = (e) => (t, r) => e(t) - e(r), jt = (e) => {
|
|
1008
1053
|
throw new Error(`Switch unhandled case: ${e}`);
|
|
1009
|
-
},
|
|
1054
|
+
}, qt = (e, t) => t, Bt = (e) => Object.keys(e).filter((t) => e[t]), Wt = (e) => {
|
|
1010
1055
|
try {
|
|
1011
1056
|
const t = parseFloat(e);
|
|
1012
1057
|
return isNaN(t) || t == null ? void 0 : t;
|
|
1013
1058
|
} catch {
|
|
1014
1059
|
}
|
|
1015
|
-
},
|
|
1060
|
+
}, Xt = (e) => {
|
|
1016
1061
|
try {
|
|
1017
1062
|
const t = parseInt(e, 10);
|
|
1018
1063
|
return isNaN(t) || t == null ? void 0 : t;
|
|
1019
1064
|
} catch {
|
|
1020
1065
|
}
|
|
1021
1066
|
};
|
|
1022
|
-
function
|
|
1067
|
+
function Gt(e, t) {
|
|
1023
1068
|
if (e == null)
|
|
1024
1069
|
throw new Error("Invariant error: " + t);
|
|
1025
1070
|
}
|
|
1026
1071
|
export {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1072
|
+
F as AccessibleFontSizeContext,
|
|
1073
|
+
gt as AccessibleFontSizeProvider,
|
|
1074
|
+
y as Box,
|
|
1075
|
+
at as Clickable,
|
|
1076
|
+
ct as Column,
|
|
1077
|
+
$t as HeaderText,
|
|
1078
|
+
Ke as Heading,
|
|
1079
|
+
pt as Indent,
|
|
1080
|
+
_t as LargeText,
|
|
1081
|
+
ft as Nest,
|
|
1082
|
+
lt as ResizeAwareBox,
|
|
1083
|
+
dt as Row,
|
|
1084
|
+
vt as ScreenReaderOnlyText,
|
|
1085
|
+
it as SeparatorLine,
|
|
1086
|
+
wt as SmallText,
|
|
1087
|
+
xt as SmallerText,
|
|
1088
|
+
ht as Space,
|
|
1089
|
+
mt as Spacing,
|
|
1090
|
+
kt as StandardText,
|
|
1044
1091
|
w as Text,
|
|
1045
|
-
|
|
1092
|
+
yt as Txt,
|
|
1046
1093
|
x as booleanOrNumberToNumber,
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1094
|
+
Vt as byNumberField,
|
|
1095
|
+
Ut as byStringField,
|
|
1096
|
+
qt as exhaustSwitchCase,
|
|
1097
|
+
jt as exhaustSwitchCaseElseThrow,
|
|
1098
|
+
Le as getDataProps,
|
|
1099
|
+
Se as getDimensionObject,
|
|
1100
|
+
Gt as invariant,
|
|
1101
|
+
Wt as parseFloatElseUndefined,
|
|
1102
|
+
Xt as parseIntElseUndefined,
|
|
1103
|
+
Bt as truthyKeysAsList,
|
|
1104
|
+
bt as useAccessibleFontSizeContext,
|
|
1105
|
+
St as useArraySet,
|
|
1058
1106
|
E as useBoolean,
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1107
|
+
Ct as useDebounce,
|
|
1108
|
+
Et as useDelayedFalse,
|
|
1109
|
+
Tt as useDomId,
|
|
1110
|
+
Ee as useElementDimensions,
|
|
1111
|
+
It as useElementFocus,
|
|
1112
|
+
Rt as useEventCallback,
|
|
1065
1113
|
v as useEventListener,
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1114
|
+
Ht as useForwardedRef,
|
|
1115
|
+
Lt as useLatest,
|
|
1116
|
+
Mt as useMouseIsEntered,
|
|
1117
|
+
zt as useMouseIsOver,
|
|
1118
|
+
Ot as useMultiOnClickOutside,
|
|
1119
|
+
At as useOnClickOutside,
|
|
1120
|
+
Ft as useOnNoMouseMovement,
|
|
1121
|
+
Pt as useOnScreen,
|
|
1122
|
+
Dt as useTimeoutState,
|
|
1123
|
+
Nt as useToday
|
|
1076
1124
|
};
|
|
1077
1125
|
//# sourceMappingURL=index.es.js.map
|