@stenajs-webui/core 19.0.0-next.9 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(){"use strict";try{var
|
|
2
|
-
import "@stenajs-webui/theme";
|
|
3
|
-
import _ from "@emotion/styled";
|
|
4
|
-
import { forwardRef as p, useState as f, useCallback as h, useLayoutEffect as L, useRef as w, useEffect as m, useMemo as z } from "react";
|
|
1
|
+
(function(){"use strict";try{var i=document.createElement("style");i.appendChild(document.createTextNode("._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_xn9xj_1{--swui-heading-text-color: var(--swui-text-primary-color);--swui-heading-font-family: var(--swui-font-primary);--swui-heading-font-weight: var(--swui-font-weight-text-bold);--swui-heading-line-height: var(--swui-line-height);font-size:var(--swui-heading-font-size);color:var(--swui-heading-text-color);letter-spacing:0;margin:0;line-height:var(--swui-heading-line-height);font-family:var(--swui-heading-font-family);font-weight:var(--swui-heading-font-weight)}._heading_xn9xj_1._h1_xn9xj_15{--swui-heading-font-size: 2.8rem}._heading_xn9xj_1._h2_xn9xj_19{--swui-heading-font-size: 2.4rem}._heading_xn9xj_1._h3_xn9xj_23{--swui-heading-font-size: 2rem}._heading_xn9xj_1._h4_xn9xj_27{--swui-heading-font-size: 1.8rem}._heading_xn9xj_1._h5_xn9xj_31{--swui-heading-font-size: 1.6rem}._heading_xn9xj_1._h6_xn9xj_35{--swui-heading-font-size: 1.4rem}")),document.head.appendChild(i)}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { cssColor as L } from "@stenajs-webui/theme";
|
|
5
3
|
import { jsx as d, Fragment as I } from "react/jsx-runtime";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
4
|
+
import $ from "@emotion/styled";
|
|
5
|
+
import { forwardRef as f, useState as p, useCallback as h, useLayoutEffect as z, useRef as v, useEffect as m, useMemo as H } from "react";
|
|
6
|
+
import R from "@emotion/is-prop-valid";
|
|
7
|
+
import { system as F, background as j, border as N, borderRight as P, borderLeft as V, borderTop as A, borderBottom as U, borderColor as q, borderRadius as W, borderStyle as B, borderWidth as K, boxShadow as G, flexbox as J, overflow as Q, position as X, layout as Y, zIndex as Z, left as ee, right as te, top as ne, bottom as re } from "styled-system";
|
|
8
|
+
import { pickBy as oe, debounce as se } from "lodash";
|
|
9
|
+
import D from "classnames";
|
|
10
|
+
import * as ce from "react-dom";
|
|
11
|
+
const ue = $.hr`
|
|
12
12
|
display: flex;
|
|
13
13
|
border: 0;
|
|
14
14
|
margin: 0;
|
|
@@ -16,120 +16,121 @@ const ce = _.hr`
|
|
|
16
16
|
background-color: ${(e) => e.color};
|
|
17
17
|
height: ${(e) => e.vertical ? e.size || "100%" : e.width || "1px"};
|
|
18
18
|
width: ${(e) => e.vertical ? e.width || "1px" : e.size || "100%"};
|
|
19
|
-
`,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
`, Qe = f(
|
|
20
|
+
({
|
|
21
|
+
color: e = L("--lhds-color-ui-300"),
|
|
22
|
+
size: t = "100%",
|
|
23
|
+
width: n = "1px",
|
|
24
|
+
vertical: r = !1
|
|
25
|
+
}, o) => /* @__PURE__ */ d(
|
|
26
|
+
ue,
|
|
27
|
+
{
|
|
28
|
+
"aria-hidden": !0,
|
|
29
|
+
color: e,
|
|
30
|
+
size: t,
|
|
31
|
+
width: n,
|
|
32
|
+
vertical: r,
|
|
33
|
+
ref: o
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
), ie = $.button`
|
|
31
37
|
display: inline-block;
|
|
32
38
|
user-select: none;
|
|
33
39
|
border: 0;
|
|
34
40
|
padding: 0;
|
|
35
|
-
background: ${({
|
|
36
|
-
|
|
37
|
-
}) => e};
|
|
38
|
-
${({
|
|
39
|
-
pointer: e
|
|
40
|
-
}) => e ? "cursor: pointer;" : ""}
|
|
41
|
+
background: ${({ background: e }) => e};
|
|
42
|
+
${({ pointer: e }) => e ? "cursor: pointer;" : ""}
|
|
41
43
|
|
|
42
44
|
:hover {
|
|
43
45
|
${(e) => e.opacityOnHover ? "opacity: 0.7;" : ""};
|
|
44
|
-
${({
|
|
45
|
-
hoverBackground: e
|
|
46
|
-
}) => `background: ${e};`}
|
|
46
|
+
${({ hoverBackground: e }) => `background: ${e};`}
|
|
47
47
|
}
|
|
48
48
|
:active {
|
|
49
|
-
${({
|
|
50
|
-
disableOpacityOnClick: e
|
|
51
|
-
}) => e ? "" : "opacity: 0.5;"}
|
|
49
|
+
${({ disableOpacityOnClick: e }) => e ? "" : "opacity: 0.5;"}
|
|
52
50
|
}
|
|
53
51
|
:focus {
|
|
54
52
|
outline: 0;
|
|
55
|
-
${({
|
|
56
|
-
|
|
57
|
-
}) => e ? "" : "box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);"}
|
|
58
|
-
${({
|
|
59
|
-
focusBackground: e
|
|
60
|
-
}) => `background: ${e};`}
|
|
53
|
+
${({ disableFocusHighlight: e }) => e ? "" : "box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);"}
|
|
54
|
+
${({ focusBackground: e }) => `background: ${e};`}
|
|
61
55
|
}
|
|
62
|
-
${({
|
|
63
|
-
|
|
64
|
-
}) => e ? `
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})), x = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, ie = {
|
|
56
|
+
${({ width: e }) => e ? `width: ${e};` : ""}
|
|
57
|
+
${({ height: e }) => e ? `height: ${e};` : ""}
|
|
58
|
+
${({ borderRadius: e }) => e ? `border-radius: ${e};` : ""}
|
|
59
|
+
`, Xe = f(
|
|
60
|
+
({
|
|
61
|
+
disableFocusHighlight: e,
|
|
62
|
+
onClick: t,
|
|
63
|
+
onDblClick: n,
|
|
64
|
+
tooltip: r,
|
|
65
|
+
disableOpacityOnClick: o,
|
|
66
|
+
disablePointer: s,
|
|
67
|
+
opacityOnHover: c,
|
|
68
|
+
disabled: i,
|
|
69
|
+
children: u,
|
|
70
|
+
background: a = "transparent",
|
|
71
|
+
hoverBackground: l,
|
|
72
|
+
focusBackground: g,
|
|
73
|
+
type: O = "button",
|
|
74
|
+
...M
|
|
75
|
+
}, k) => /* @__PURE__ */ d(
|
|
76
|
+
ie,
|
|
77
|
+
{
|
|
78
|
+
opacityOnHover: c,
|
|
79
|
+
title: r,
|
|
80
|
+
disabled: i,
|
|
81
|
+
disableOpacityOnClick: o,
|
|
82
|
+
onClick: t,
|
|
83
|
+
onDoubleClick: n,
|
|
84
|
+
disableFocusHighlight: e,
|
|
85
|
+
pointer: !!(t || n) && !s,
|
|
86
|
+
ref: k,
|
|
87
|
+
background: a,
|
|
88
|
+
hoverBackground: l,
|
|
89
|
+
focusBackground: g,
|
|
90
|
+
type: O,
|
|
91
|
+
...M,
|
|
92
|
+
children: u
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
), _ = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, de = {
|
|
103
96
|
box: "var(--swui-shadow-box)",
|
|
104
97
|
popover: "var(--swui-shadow-popover)",
|
|
105
98
|
modal: "var(--swui-shadow-modal)",
|
|
106
99
|
bottom: "var(--swui-shadow-bottom)"
|
|
107
|
-
}, ae = [
|
|
100
|
+
}, ae = [
|
|
101
|
+
"spacing",
|
|
102
|
+
"indent",
|
|
103
|
+
"gap",
|
|
104
|
+
"width",
|
|
105
|
+
"height",
|
|
106
|
+
"overflow",
|
|
107
|
+
"display"
|
|
108
|
+
], le = (e) => ae.includes(e), me = F({
|
|
108
109
|
row: {
|
|
109
110
|
property: "flexDirection",
|
|
110
111
|
transform: (e) => e ? "row" : "column"
|
|
111
112
|
},
|
|
112
113
|
indent: {
|
|
113
114
|
property: "--current-indent",
|
|
114
|
-
transform:
|
|
115
|
+
transform: _
|
|
115
116
|
},
|
|
116
117
|
spacing: {
|
|
117
118
|
property: "--current-spacing",
|
|
118
|
-
transform:
|
|
119
|
+
transform: _
|
|
119
120
|
},
|
|
120
121
|
gap: {
|
|
121
122
|
property: "--current-gap",
|
|
122
|
-
transform:
|
|
123
|
+
transform: _
|
|
123
124
|
},
|
|
124
125
|
shadow: {
|
|
125
126
|
property: "boxShadow",
|
|
126
127
|
transform: (e) => {
|
|
127
128
|
var t;
|
|
128
|
-
return (t =
|
|
129
|
+
return (t = de[e]) != null ? t : e;
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
|
-
}), b =
|
|
132
|
-
shouldForwardProp: (e) => typeof e == "string" ?
|
|
132
|
+
}), b = $("div", {
|
|
133
|
+
shouldForwardProp: (e) => typeof e == "string" ? le(e) ? !1 : R(e) : !1
|
|
133
134
|
})`
|
|
134
135
|
--current-spacing: 0;
|
|
135
136
|
--current-indent: 0;
|
|
@@ -137,13 +138,12 @@ const ce = _.hr`
|
|
|
137
138
|
box-sizing: border-box;
|
|
138
139
|
display: flex;
|
|
139
140
|
flex-direction: column;
|
|
140
|
-
${
|
|
141
|
-
${
|
|
141
|
+
${me};
|
|
142
|
+
${j};
|
|
142
143
|
${N};
|
|
143
144
|
${P};
|
|
144
145
|
${V};
|
|
145
146
|
${A};
|
|
146
|
-
${j};
|
|
147
147
|
${U};
|
|
148
148
|
${q};
|
|
149
149
|
${W};
|
|
@@ -158,41 +158,27 @@ const ce = _.hr`
|
|
|
158
158
|
${ee};
|
|
159
159
|
${te};
|
|
160
160
|
${ne};
|
|
161
|
+
${re};
|
|
161
162
|
|
|
162
163
|
gap: calc(var(--current-gap) * var(--swui-metrics-space));
|
|
163
164
|
|
|
164
165
|
padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))
|
|
165
166
|
calc(var(--current-indent) * var(--swui-metrics-indent));
|
|
166
167
|
:hover {
|
|
167
|
-
${({
|
|
168
|
-
|
|
169
|
-
}) => e ? `background: ${e};` : ""}
|
|
170
|
-
${({
|
|
171
|
-
hoverBorder: e
|
|
172
|
-
}) => e ? `border: ${e};` : ""}
|
|
168
|
+
${({ hoverBackground: e }) => e ? `background: ${e};` : ""}
|
|
169
|
+
${({ hoverBorder: e }) => e ? `border: ${e};` : ""}
|
|
173
170
|
}
|
|
174
171
|
:focus {
|
|
175
|
-
${({
|
|
176
|
-
|
|
177
|
-
}) => e ? `background: ${e};` : ""}
|
|
178
|
-
${({
|
|
179
|
-
focusBorder: e
|
|
180
|
-
}) => e ? `border: ${e};` : ""}
|
|
172
|
+
${({ focusBackground: e }) => e ? `background: ${e};` : ""}
|
|
173
|
+
${({ focusBorder: e }) => e ? `border: ${e};` : ""}
|
|
181
174
|
}
|
|
182
175
|
:focus-within {
|
|
183
|
-
${({
|
|
184
|
-
|
|
185
|
-
}) => e ? `background: ${e};` : ""}
|
|
186
|
-
${({
|
|
187
|
-
focusWithinBorder: e
|
|
188
|
-
}) => e ? `border: ${e};` : ""}
|
|
176
|
+
${({ focusWithinBackground: e }) => e ? `background: ${e};` : ""}
|
|
177
|
+
${({ focusWithinBorder: e }) => e ? `border: ${e};` : ""}
|
|
189
178
|
}
|
|
190
|
-
`,
|
|
191
|
-
return /* @__PURE__ */ d(b, {
|
|
192
|
-
|
|
193
|
-
...t
|
|
194
|
-
});
|
|
195
|
-
}), me = (e) => {
|
|
179
|
+
`, Ye = f(function(t, n) {
|
|
180
|
+
return /* @__PURE__ */ d(b, { ref: n, ...t });
|
|
181
|
+
}), he = (e) => {
|
|
196
182
|
const { x: t, y: n, width: r, height: o, bottom: s, top: c, left: i, right: u } = e.getBoundingClientRect();
|
|
197
183
|
return {
|
|
198
184
|
width: r,
|
|
@@ -204,161 +190,125 @@ const ce = _.hr`
|
|
|
204
190
|
right: u,
|
|
205
191
|
bottom: s
|
|
206
192
|
};
|
|
207
|
-
},
|
|
208
|
-
const [n, r] =
|
|
193
|
+
}, fe = (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, pe = (e, t) => {
|
|
194
|
+
const [n, r] = p(), o = h(() => {
|
|
209
195
|
window.requestAnimationFrame(() => {
|
|
210
196
|
if (e.current) {
|
|
211
|
-
const s =
|
|
212
|
-
(!n || !
|
|
197
|
+
const s = he(e.current);
|
|
198
|
+
(!n || !fe(n, s)) && t && t(s), r(s);
|
|
213
199
|
}
|
|
214
200
|
});
|
|
215
201
|
}, [e, n, r, t]);
|
|
216
|
-
return
|
|
202
|
+
return z(() => {
|
|
217
203
|
o();
|
|
218
204
|
}, [o]), {
|
|
219
205
|
dimensions: n
|
|
220
206
|
};
|
|
221
|
-
},
|
|
222
|
-
onResize: t,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
});
|
|
230
|
-
}),
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
});
|
|
236
|
-
}), Xe = p(function({
|
|
237
|
-
num: t = 1,
|
|
238
|
-
...n
|
|
239
|
-
}, r) {
|
|
240
|
-
return /* @__PURE__ */ d(b, {
|
|
241
|
-
indent: t,
|
|
242
|
-
ref: r,
|
|
243
|
-
...n
|
|
244
|
-
});
|
|
245
|
-
}), Ye = p(function({
|
|
246
|
-
num: t = 1,
|
|
247
|
-
...n
|
|
248
|
-
}, r) {
|
|
249
|
-
return /* @__PURE__ */ d(b, {
|
|
250
|
-
spacing: t,
|
|
251
|
-
ref: r,
|
|
252
|
-
...n
|
|
253
|
-
});
|
|
254
|
-
}), fe = _.div`
|
|
207
|
+
}, Ze = f(
|
|
208
|
+
function({ onResize: t, ...n }, r) {
|
|
209
|
+
const o = v(null), s = r != null ? r : o;
|
|
210
|
+
return pe(s, t), /* @__PURE__ */ d(b, { ...n, ref: r });
|
|
211
|
+
}
|
|
212
|
+
), et = f(function(t, n) {
|
|
213
|
+
return /* @__PURE__ */ d(b, { row: !0, ref: n, ...t });
|
|
214
|
+
}), tt = f(function({ num: t = 1, ...n }, r) {
|
|
215
|
+
return /* @__PURE__ */ d(b, { indent: t, ref: r, ...n });
|
|
216
|
+
}), nt = f(
|
|
217
|
+
function({ num: t = 1, ...n }, r) {
|
|
218
|
+
return /* @__PURE__ */ d(b, { spacing: t, ref: r, ...n });
|
|
219
|
+
}
|
|
220
|
+
), ve = $.div`
|
|
255
221
|
--current-size: 1;
|
|
256
222
|
flex: none;
|
|
257
223
|
width: calc(var(--current-size) * var(--swui-metrics-space));
|
|
258
224
|
height: calc(var(--current-size) * var(--swui-metrics-space));
|
|
259
|
-
`,
|
|
225
|
+
`, rt = ({
|
|
260
226
|
half: e = !1,
|
|
261
227
|
horizontal: t = !1,
|
|
262
228
|
num: n = 1,
|
|
263
229
|
vertical: r = !1
|
|
264
230
|
}) => {
|
|
265
231
|
const o = n * (e ? 0.5 : 1);
|
|
266
|
-
return /* @__PURE__ */ d(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
232
|
+
return /* @__PURE__ */ d(
|
|
233
|
+
ve,
|
|
234
|
+
{
|
|
235
|
+
style: {
|
|
236
|
+
["--current-size"]: o,
|
|
237
|
+
height: t ? 1 : void 0,
|
|
238
|
+
width: r ? 1 : void 0
|
|
239
|
+
}
|
|
271
240
|
}
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
render: n
|
|
277
|
-
}) => t ? /* @__PURE__ */ d(I, {
|
|
278
|
-
children: n(e)
|
|
279
|
-
}) : /* @__PURE__ */ d(I, {
|
|
280
|
-
children: e
|
|
281
|
-
}), we = "_text_1iisw_1", ve = "_standard_1iisw_24", ge = "_bold_1iisw_27", be = "_caption_1iisw_31", $e = "_overline_1iisw_39", _e = "_large_1iisw_48", xe = "_medium_1iisw_53", ye = "_small_1iisw_58", Ee = "_smaller_1iisw_63", y = {
|
|
282
|
-
text: we,
|
|
283
|
-
standard: ve,
|
|
284
|
-
bold: ge,
|
|
285
|
-
caption: be,
|
|
286
|
-
overline: $e,
|
|
287
|
-
large: _e,
|
|
288
|
-
medium: xe,
|
|
289
|
-
small: ye,
|
|
290
|
-
smaller: Ee
|
|
291
|
-
}, $ = p(({
|
|
241
|
+
);
|
|
242
|
+
}, ot = ({ children: e, nest: t, render: n }) => t ? /* @__PURE__ */ d(I, { children: n(e) }) : /* @__PURE__ */ d(I, { children: e }), we = "_visuallyHidden_1gevf_1", ge = {
|
|
243
|
+
visuallyHidden: we
|
|
244
|
+
}, be = (e) => oe(e, xe), xe = (e, t) => $e(t), $e = (e) => e.startsWith("data-") || e.startsWith("aria-"), st = ({
|
|
292
245
|
children: e,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
246
|
+
...t
|
|
247
|
+
}) => /* @__PURE__ */ d("span", { className: ge.visuallyHidden, ...be(t), children: e }), _e = "_text_1iisw_1", ye = "_standard_1iisw_24", Ee = "_bold_1iisw_27", Ie = "_caption_1iisw_31", Se = "_overline_1iisw_39", Ce = "_large_1iisw_48", Te = "_medium_1iisw_53", De = "_small_1iisw_58", Oe = "_smaller_1iisw_63", y = {
|
|
248
|
+
text: _e,
|
|
249
|
+
standard: ye,
|
|
250
|
+
bold: Ee,
|
|
251
|
+
caption: Ie,
|
|
252
|
+
overline: Se,
|
|
253
|
+
large: Ce,
|
|
254
|
+
medium: Te,
|
|
255
|
+
small: De,
|
|
256
|
+
smaller: Oe
|
|
257
|
+
}, x = f(
|
|
258
|
+
({
|
|
259
|
+
children: e,
|
|
260
|
+
variant: t = "standard",
|
|
261
|
+
size: n = "medium",
|
|
262
|
+
className: r,
|
|
306
263
|
color: o,
|
|
307
264
|
userSelect: s,
|
|
308
265
|
whiteSpace: c,
|
|
309
266
|
wordBreak: i,
|
|
267
|
+
style: u,
|
|
268
|
+
...a
|
|
269
|
+
}, l) => /* @__PURE__ */ d(
|
|
270
|
+
"span",
|
|
271
|
+
{
|
|
272
|
+
className: D(y.text, y[t], y[n], r),
|
|
273
|
+
ref: l,
|
|
274
|
+
style: { color: o, userSelect: s, whiteSpace: c, wordBreak: i, ...u },
|
|
275
|
+
...a,
|
|
276
|
+
children: e
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
), ct = x, ut = (e) => /* @__PURE__ */ d(x, { size: "small", ...e }), it = (e) => /* @__PURE__ */ d(x, { size: "smaller", ...e }), dt = (e) => /* @__PURE__ */ d(x, { size: "medium", ...e }), at = (e) => /* @__PURE__ */ d(x, { size: "large", ...e }), Me = "_heading_xn9xj_1", ke = "_h1_xn9xj_15", Le = "_h2_xn9xj_19", ze = "_h3_xn9xj_23", He = "_h4_xn9xj_27", Re = "_h5_xn9xj_31", Fe = "_h6_xn9xj_35", S = {
|
|
280
|
+
heading: Me,
|
|
281
|
+
h1: ke,
|
|
282
|
+
h2: Le,
|
|
283
|
+
h3: ze,
|
|
284
|
+
h4: He,
|
|
285
|
+
h5: Re,
|
|
286
|
+
h6: Fe
|
|
287
|
+
}, je = f(
|
|
288
|
+
({
|
|
289
|
+
variant: e = "h3",
|
|
290
|
+
className: t,
|
|
291
|
+
color: n,
|
|
292
|
+
whiteSpace: r,
|
|
293
|
+
wordBreak: o,
|
|
294
|
+
style: s,
|
|
295
|
+
children: c,
|
|
296
|
+
as: i,
|
|
310
297
|
...u
|
|
311
|
-
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
...e
|
|
326
|
-
}), Ie = "_heading_1us7p_1", Se = "_h1_1us7p_14", Ce = "_h2_1us7p_19", De = "_h3_1us7p_24", Te = "_h4_1us7p_29", Me = "_h5_1us7p_34", Oe = "_h6_1us7p_39", S = {
|
|
327
|
-
heading: Ie,
|
|
328
|
-
h1: Se,
|
|
329
|
-
h2: Ce,
|
|
330
|
-
h3: De,
|
|
331
|
-
h4: Te,
|
|
332
|
-
h5: Me,
|
|
333
|
-
h6: Oe
|
|
334
|
-
}, ke = p(({
|
|
335
|
-
variant: e = "h3",
|
|
336
|
-
className: t,
|
|
337
|
-
color: n,
|
|
338
|
-
whiteSpace: r,
|
|
339
|
-
wordBreak: o,
|
|
340
|
-
style: s,
|
|
341
|
-
children: c,
|
|
342
|
-
as: i,
|
|
343
|
-
...u
|
|
344
|
-
}, a) => {
|
|
345
|
-
const l = i != null ? i : e;
|
|
346
|
-
return /* @__PURE__ */ d(l, {
|
|
347
|
-
className: T(S.heading, S[e], t),
|
|
348
|
-
style: {
|
|
349
|
-
color: n,
|
|
350
|
-
whiteSpace: r,
|
|
351
|
-
wordBreak: o,
|
|
352
|
-
...s
|
|
353
|
-
},
|
|
354
|
-
ref: a,
|
|
355
|
-
...u,
|
|
356
|
-
children: c
|
|
357
|
-
});
|
|
358
|
-
}), ct = (e) => /* @__PURE__ */ d(ke, {
|
|
359
|
-
variant: "h2",
|
|
360
|
-
...e
|
|
361
|
-
}), Le = (e, t) => e === t, ut = (e, t, n = Le) => {
|
|
298
|
+
}, a) => {
|
|
299
|
+
const l = i != null ? i : e;
|
|
300
|
+
return /* @__PURE__ */ d(
|
|
301
|
+
l,
|
|
302
|
+
{
|
|
303
|
+
className: D(S.heading, S[e], t),
|
|
304
|
+
style: { color: n, whiteSpace: r, wordBreak: o, ...s },
|
|
305
|
+
ref: a,
|
|
306
|
+
...u,
|
|
307
|
+
children: c
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
), lt = (e) => /* @__PURE__ */ d(je, { variant: "h2", ...e }), Ne = (e, t) => e === t, mt = (e, t, n = Ne) => {
|
|
362
312
|
const r = h(
|
|
363
313
|
(u) => {
|
|
364
314
|
e.some((a) => n(a, u)) || t([...e, u]);
|
|
@@ -396,7 +346,7 @@ const ce = _.hr`
|
|
|
396
346
|
toggle: i
|
|
397
347
|
};
|
|
398
348
|
}, E = (e) => {
|
|
399
|
-
const [t, n] =
|
|
349
|
+
const [t, n] = p(e), r = h(() => {
|
|
400
350
|
n(!0);
|
|
401
351
|
}, [n]), o = h(() => {
|
|
402
352
|
n(!1);
|
|
@@ -404,8 +354,8 @@ const ce = _.hr`
|
|
|
404
354
|
n((c) => !c);
|
|
405
355
|
}, [n]);
|
|
406
356
|
return [t, r, o, s];
|
|
407
|
-
},
|
|
408
|
-
const [n, r] =
|
|
357
|
+
}, ht = (e, t) => {
|
|
358
|
+
const [n, r] = p(e);
|
|
409
359
|
return m(() => {
|
|
410
360
|
const o = setTimeout(() => {
|
|
411
361
|
r(e);
|
|
@@ -414,8 +364,8 @@ const ce = _.hr`
|
|
|
414
364
|
clearTimeout(o);
|
|
415
365
|
};
|
|
416
366
|
}, [e, t]), n;
|
|
417
|
-
},
|
|
418
|
-
const [n, r] =
|
|
367
|
+
}, ft = (e, t) => {
|
|
368
|
+
const [n, r] = p(e);
|
|
419
369
|
return m(() => {
|
|
420
370
|
e && r(!0);
|
|
421
371
|
const o = setTimeout(() => {
|
|
@@ -426,12 +376,12 @@ const ce = _.hr`
|
|
|
426
376
|
};
|
|
427
377
|
}, [e, t]), n;
|
|
428
378
|
};
|
|
429
|
-
let
|
|
430
|
-
const C = (e) => `webui-${e ? e + "-" : ""}${++
|
|
431
|
-
const [t, n] =
|
|
379
|
+
let Pe = 0;
|
|
380
|
+
const C = (e) => `webui-${e ? e + "-" : ""}${++Pe}`, pt = (e) => {
|
|
381
|
+
const [t, n] = p(() => C(e));
|
|
432
382
|
return m(() => n(C(e)), [e]), t;
|
|
433
|
-
},
|
|
434
|
-
const r =
|
|
383
|
+
}, w = (e, t, n) => {
|
|
384
|
+
const r = v();
|
|
435
385
|
m(() => {
|
|
436
386
|
r.current = n;
|
|
437
387
|
}, [n]), m(() => {
|
|
@@ -448,25 +398,25 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
|
|
|
448
398
|
c && c.removeEventListener(t, s);
|
|
449
399
|
};
|
|
450
400
|
}, [t, e]);
|
|
451
|
-
},
|
|
401
|
+
}, vt = (e) => {
|
|
452
402
|
const [t, n, r] = E(!1);
|
|
453
403
|
m(() => {
|
|
454
|
-
document.activeElement ===
|
|
455
|
-
}, [e, r, n]),
|
|
404
|
+
document.activeElement === ce.findDOMNode(e.current) ? n() : r();
|
|
405
|
+
}, [e, r, n]), w(e, "focus", n), w(e, "blur", r);
|
|
456
406
|
const o = h(() => {
|
|
457
407
|
e.current && e.current.focus();
|
|
458
408
|
}, [e]), s = h(() => {
|
|
459
409
|
e.current && e.current.blur();
|
|
460
410
|
}, [e]);
|
|
461
411
|
return { isInFocus: t, focus: o, blur: s };
|
|
462
|
-
},
|
|
412
|
+
}, wt = (e) => {
|
|
463
413
|
const [t, n, r] = E(!1);
|
|
464
|
-
return
|
|
465
|
-
},
|
|
414
|
+
return w(e, "mouseover", n), w(e, "mouseout", r), t;
|
|
415
|
+
}, gt = (e) => {
|
|
466
416
|
const [t, n, r] = E(!1);
|
|
467
|
-
return
|
|
468
|
-
},
|
|
469
|
-
const n =
|
|
417
|
+
return w(e, "mouseenter", n), w(e, "mouseleave", r), t;
|
|
418
|
+
}, bt = (e, t) => {
|
|
419
|
+
const n = v(() => {
|
|
470
420
|
});
|
|
471
421
|
m(() => {
|
|
472
422
|
n.current = t;
|
|
@@ -478,8 +428,8 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
|
|
|
478
428
|
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
|
|
479
429
|
};
|
|
480
430
|
}, [...e]);
|
|
481
|
-
},
|
|
482
|
-
const r =
|
|
431
|
+
}, xt = (e, t, n) => {
|
|
432
|
+
const r = v(() => {
|
|
483
433
|
});
|
|
484
434
|
m(() => {
|
|
485
435
|
r.current = t;
|
|
@@ -491,21 +441,21 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
|
|
|
491
441
|
document.removeEventListener("mousedown", o, n), document.removeEventListener("touchstart", o, n);
|
|
492
442
|
};
|
|
493
443
|
}, [e, n]);
|
|
494
|
-
},
|
|
495
|
-
const n =
|
|
444
|
+
}, T = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], $t = (e, t) => {
|
|
445
|
+
const n = v(() => {
|
|
496
446
|
});
|
|
497
447
|
m(() => {
|
|
498
448
|
n.current = e;
|
|
499
449
|
}, [e]), m(() => {
|
|
500
|
-
const r =
|
|
501
|
-
return
|
|
502
|
-
|
|
450
|
+
const r = se(n.current, t);
|
|
451
|
+
return T.forEach((o) => window.addEventListener(o, r)), () => {
|
|
452
|
+
T.forEach(
|
|
503
453
|
(o) => window.removeEventListener(o, r)
|
|
504
454
|
);
|
|
505
455
|
};
|
|
506
456
|
}, [t]);
|
|
507
|
-
},
|
|
508
|
-
const [n, r] =
|
|
457
|
+
}, _t = (e, t) => {
|
|
458
|
+
const [n, r] = p(!1), { rootMargin: o, root: s, threshold: c } = t || {}, i = H(() => new IntersectionObserver(
|
|
509
459
|
([u]) => r(u.isIntersecting),
|
|
510
460
|
{
|
|
511
461
|
rootMargin: o,
|
|
@@ -516,13 +466,13 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
|
|
|
516
466
|
return m(() => (e.current && i.observe(e.current), () => {
|
|
517
467
|
i.disconnect();
|
|
518
468
|
}), [i, e]), n;
|
|
519
|
-
},
|
|
520
|
-
const t =
|
|
469
|
+
}, yt = (e) => {
|
|
470
|
+
const t = v(null);
|
|
521
471
|
return m(() => {
|
|
522
472
|
!e || (typeof e == "function" ? e(t.current) : e.current = t.current);
|
|
523
473
|
}), t;
|
|
524
|
-
},
|
|
525
|
-
const [r, o] =
|
|
474
|
+
}, Et = (e, t, n = !0) => {
|
|
475
|
+
const [r, o] = p(e), s = v(), c = h(
|
|
526
476
|
(i, u = t) => {
|
|
527
477
|
o(i), n && clearTimeout(s.current), s.current = setTimeout(() => o(e), u);
|
|
528
478
|
},
|
|
@@ -531,15 +481,15 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
|
|
|
531
481
|
return m(() => () => {
|
|
532
482
|
clearTimeout(s.current);
|
|
533
483
|
}, []), [r, c];
|
|
534
|
-
},
|
|
484
|
+
}, It = (e) => {
|
|
535
485
|
throw new Error(`Switch unhandled case: ${e}`);
|
|
536
|
-
},
|
|
486
|
+
}, St = (e, t) => t, Ct = (e) => Object.keys(e).filter((t) => e[t]), Tt = (e) => {
|
|
537
487
|
try {
|
|
538
488
|
const t = parseFloat(e);
|
|
539
489
|
return isNaN(t) || t == null ? void 0 : t;
|
|
540
490
|
} catch {
|
|
541
491
|
}
|
|
542
|
-
},
|
|
492
|
+
}, Dt = (e) => {
|
|
543
493
|
try {
|
|
544
494
|
const t = parseInt(e, 10);
|
|
545
495
|
return isNaN(t) || t == null ? void 0 : t;
|
|
@@ -548,46 +498,47 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
|
|
|
548
498
|
};
|
|
549
499
|
export {
|
|
550
500
|
b as Box,
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
501
|
+
Xe as Clickable,
|
|
502
|
+
Ye as Column,
|
|
503
|
+
lt as HeaderText,
|
|
504
|
+
je as Heading,
|
|
505
|
+
tt as Indent,
|
|
506
|
+
at as LargeText,
|
|
507
|
+
ot as Nest,
|
|
508
|
+
Ze as ResizeAwareBox,
|
|
509
|
+
et as Row,
|
|
510
|
+
st as ScreenReaderOnlyText,
|
|
511
|
+
Qe as SeparatorLine,
|
|
512
|
+
ut as SmallText,
|
|
513
|
+
it as SmallerText,
|
|
514
|
+
rt as Space,
|
|
515
|
+
nt as Spacing,
|
|
516
|
+
dt as StandardText,
|
|
517
|
+
x as Text,
|
|
518
|
+
ct as Txt,
|
|
519
|
+
_ as booleanOrNumberToNumber,
|
|
520
|
+
St as exhaustSwitchCase,
|
|
521
|
+
It as exhaustSwitchCaseElseThrow,
|
|
522
|
+
be as getDataProps,
|
|
523
|
+
he as getDimensionObject,
|
|
524
|
+
Tt as parseFloatElseUndefined,
|
|
525
|
+
Dt as parseIntElseUndefined,
|
|
526
|
+
Ct as truthyKeysAsList,
|
|
527
|
+
mt as useArraySet,
|
|
577
528
|
E as useBoolean,
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
529
|
+
ht as useDebounce,
|
|
530
|
+
ft as useDelayedFalse,
|
|
531
|
+
pt as useDomId,
|
|
581
532
|
pe as useElementDimensions,
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
533
|
+
vt as useElementFocus,
|
|
534
|
+
w as useEventListener,
|
|
535
|
+
yt as useForwardedRef,
|
|
536
|
+
gt as useMouseIsEntered,
|
|
537
|
+
wt as useMouseIsOver,
|
|
538
|
+
bt as useMultiOnClickOutside,
|
|
539
|
+
xt as useOnClickOutside,
|
|
540
|
+
$t as useOnNoMouseMovement,
|
|
541
|
+
_t as useOnScreen,
|
|
542
|
+
Et as useTimeoutState
|
|
592
543
|
};
|
|
593
544
|
//# sourceMappingURL=index.es.js.map
|