@stenajs-webui/core 17.13.2 → 17.14.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 +476 -631
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +26 -25
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1,155 +1,134 @@
|
|
|
1
|
-
(function(){ try
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
1
|
+
(function(){"use strict";try{var e=document.createElement("style");e.appendChild(document.createTextNode("._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_1u7xw_1{font-size:var(--swui-heading-font-size);color:var(--lhds-color-ui-900);letter-spacing:0;margin:0;line-height:var(--swui-heading-line-height);font-family:var(--swui-font-primary);font-weight:var(--swui-font-weight-text)}._heading_1u7xw_1._h1_1u7xw_10{--swui-heading-font-size: 2.8rem;--swui-heading-line-height: 4rem}._heading_1u7xw_1._h2_1u7xw_15{--swui-heading-font-size: 2.4rem;--swui-heading-line-height: 3.2rem}._heading_1u7xw_1._h3_1u7xw_20{--swui-heading-font-size: 2rem;--swui-heading-line-height: 2.4rem}._heading_1u7xw_1._h4_1u7xw_25{--swui-heading-font-size: 1.6rem;--swui-heading-line-height: 2.4rem;font-weight:var(--swui-font-weight-text-bold)}._heading_1u7xw_1._h5_1u7xw_31{--swui-heading-font-size: 1.4rem;--swui-heading-line-height: 1.6rem;font-weight:var(--swui-font-weight-text-bold)}._heading_1u7xw_1._h6_1u7xw_37{--swui-heading-font-size: 1.2rem;--swui-heading-line-height: 1.6rem;font-weight:var(--swui-font-weight-text-bold)}")),document.head.appendChild(e)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
+
import "@stenajs-webui/theme";
|
|
3
|
+
import x from "@emotion/styled";
|
|
4
|
+
import { forwardRef as w, useState as f, useCallback as h, useLayoutEffect as L, useRef as p, useEffect as m, useMemo as z } from "react";
|
|
5
|
+
import { jsx as a, Fragment as I } from "react/jsx-runtime";
|
|
6
|
+
import F from "@emotion/is-prop-valid";
|
|
7
|
+
import { system as R, background as H, border as N, borderRight as P, borderLeft as V, borderTop as A, borderBottom as j, borderColor as U, borderRadius as q, borderStyle as W, borderWidth as B, boxShadow as K, flexbox as G, overflow as J, position as Q, layout as X, zIndex as Y, left as Z, right as ee, top as te, bottom as ne } from "styled-system";
|
|
8
|
+
import T from "classnames";
|
|
9
|
+
import * as re from "react-dom";
|
|
10
|
+
import { debounce as oe, pickBy as se } from "lodash";
|
|
11
|
+
const ce = x.hr`
|
|
11
12
|
display: flex;
|
|
12
13
|
border: 0;
|
|
13
14
|
margin: 0;
|
|
14
15
|
flex: none;
|
|
15
|
-
background-color: ${(
|
|
16
|
-
height: ${(
|
|
17
|
-
width: ${(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
ref
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
const ClickableElement = styled.button`
|
|
16
|
+
background-color: ${(e) => e.color};
|
|
17
|
+
height: ${(e) => e.vertical ? e.size || "100%" : e.width || "1px"};
|
|
18
|
+
width: ${(e) => e.vertical ? e.width || "1px" : e.size || "100%"};
|
|
19
|
+
`, Be = w(({
|
|
20
|
+
color: e = "var(--lhds-color-ui-300)",
|
|
21
|
+
size: t = "100%",
|
|
22
|
+
width: n = "1px",
|
|
23
|
+
vertical: r = !1
|
|
24
|
+
}, o) => /* @__PURE__ */ a(ce, {
|
|
25
|
+
color: e,
|
|
26
|
+
size: t,
|
|
27
|
+
width: n,
|
|
28
|
+
vertical: r,
|
|
29
|
+
ref: o
|
|
30
|
+
})), ue = x.button`
|
|
34
31
|
display: inline-block;
|
|
35
32
|
user-select: none;
|
|
36
33
|
border: 0;
|
|
37
34
|
padding: 0;
|
|
38
35
|
background: ${({
|
|
39
|
-
background:
|
|
40
|
-
}) =>
|
|
36
|
+
background: e
|
|
37
|
+
}) => e};
|
|
41
38
|
${({
|
|
42
|
-
pointer
|
|
43
|
-
}) =>
|
|
39
|
+
pointer: e
|
|
40
|
+
}) => e ? "cursor: pointer;" : ""}
|
|
44
41
|
|
|
45
42
|
:hover {
|
|
46
|
-
${(
|
|
43
|
+
${(e) => e.opacityOnHover ? "opacity: 0.7;" : ""};
|
|
47
44
|
${({
|
|
48
|
-
hoverBackground
|
|
49
|
-
}) => `background: ${
|
|
45
|
+
hoverBackground: e
|
|
46
|
+
}) => `background: ${e};`}
|
|
50
47
|
}
|
|
51
48
|
:active {
|
|
52
49
|
${({
|
|
53
|
-
disableOpacityOnClick
|
|
54
|
-
}) =>
|
|
50
|
+
disableOpacityOnClick: e
|
|
51
|
+
}) => e ? "" : "opacity: 0.5;"}
|
|
55
52
|
}
|
|
56
53
|
:focus {
|
|
57
54
|
outline: 0;
|
|
58
55
|
${({
|
|
59
|
-
disableFocusHighlight
|
|
60
|
-
}) =>
|
|
56
|
+
disableFocusHighlight: e
|
|
57
|
+
}) => e ? "" : "box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);"}
|
|
61
58
|
${({
|
|
62
|
-
focusBackground
|
|
63
|
-
}) => `background: ${
|
|
59
|
+
focusBackground: e
|
|
60
|
+
}) => `background: ${e};`}
|
|
64
61
|
}
|
|
65
62
|
${({
|
|
66
|
-
width
|
|
67
|
-
}) =>
|
|
63
|
+
width: e
|
|
64
|
+
}) => e ? `width: ${e};` : ""}
|
|
68
65
|
${({
|
|
69
|
-
height
|
|
70
|
-
}) =>
|
|
66
|
+
height: e
|
|
67
|
+
}) => e ? `height: ${e};` : ""}
|
|
71
68
|
${({
|
|
72
|
-
borderRadius:
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
...restProps,
|
|
107
|
-
children
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
const booleanOrNumberToNumber = (num) => {
|
|
111
|
-
if (num == null) {
|
|
112
|
-
return 0;
|
|
113
|
-
}
|
|
114
|
-
if (typeof num === "boolean") {
|
|
115
|
-
return num ? 1 : 0;
|
|
116
|
-
}
|
|
117
|
-
return num;
|
|
118
|
-
};
|
|
119
|
-
const shadows = {
|
|
69
|
+
borderRadius: e
|
|
70
|
+
}) => e ? `border-radius: ${e};` : ""}
|
|
71
|
+
`, Ke = w(({
|
|
72
|
+
disableFocusHighlight: e,
|
|
73
|
+
onClick: t,
|
|
74
|
+
onDblClick: n,
|
|
75
|
+
tooltip: r,
|
|
76
|
+
disableOpacityOnClick: o,
|
|
77
|
+
disablePointer: s,
|
|
78
|
+
opacityOnHover: c,
|
|
79
|
+
disabled: i,
|
|
80
|
+
children: u,
|
|
81
|
+
background: d = "transparent",
|
|
82
|
+
hoverBackground: l,
|
|
83
|
+
focusBackground: g,
|
|
84
|
+
type: M = "button",
|
|
85
|
+
...O
|
|
86
|
+
}, k) => /* @__PURE__ */ a(ue, {
|
|
87
|
+
opacityOnHover: c,
|
|
88
|
+
title: r,
|
|
89
|
+
disabled: i,
|
|
90
|
+
disableOpacityOnClick: o,
|
|
91
|
+
onClick: t,
|
|
92
|
+
onDoubleClick: n,
|
|
93
|
+
disableFocusHighlight: e,
|
|
94
|
+
pointer: !!(t || n) && !s,
|
|
95
|
+
ref: k,
|
|
96
|
+
background: d,
|
|
97
|
+
hoverBackground: l,
|
|
98
|
+
focusBackground: g,
|
|
99
|
+
type: M,
|
|
100
|
+
...O,
|
|
101
|
+
children: u
|
|
102
|
+
})), _ = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, ie = {
|
|
120
103
|
box: "var(--swui-shadow-box)",
|
|
121
104
|
popover: "var(--swui-shadow-popover)",
|
|
122
105
|
modal: "var(--swui-shadow-modal)"
|
|
123
|
-
}
|
|
124
|
-
const excludedProps = ["spacing", "indent", "gap", "width", "height", "overflow", "display"];
|
|
125
|
-
const isExcludedWebUiProp = (propName) => excludedProps.includes(propName);
|
|
126
|
-
const box = system({
|
|
106
|
+
}, de = ["spacing", "indent", "gap", "width", "height", "overflow", "display"], ae = (e) => de.includes(e), le = R({
|
|
127
107
|
row: {
|
|
128
108
|
property: "flexDirection",
|
|
129
|
-
transform: (
|
|
109
|
+
transform: (e) => e ? "row" : "column"
|
|
130
110
|
},
|
|
131
111
|
indent: {
|
|
132
112
|
property: "--current-indent",
|
|
133
|
-
transform:
|
|
113
|
+
transform: _
|
|
134
114
|
},
|
|
135
115
|
spacing: {
|
|
136
116
|
property: "--current-spacing",
|
|
137
|
-
transform:
|
|
117
|
+
transform: _
|
|
138
118
|
},
|
|
139
119
|
gap: {
|
|
140
120
|
property: "--current-gap",
|
|
141
|
-
transform:
|
|
121
|
+
transform: _
|
|
142
122
|
},
|
|
143
123
|
shadow: {
|
|
144
124
|
property: "boxShadow",
|
|
145
|
-
transform: (
|
|
146
|
-
var
|
|
147
|
-
return (
|
|
125
|
+
transform: (e) => {
|
|
126
|
+
var t;
|
|
127
|
+
return (t = ie[e]) != null ? t : e;
|
|
148
128
|
}
|
|
149
129
|
}
|
|
150
|
-
})
|
|
151
|
-
|
|
152
|
-
shouldForwardProp: (propName) => typeof propName === "string" ? isExcludedWebUiProp(propName) ? false : isPropValid(propName) : false
|
|
130
|
+
}), b = x("div", {
|
|
131
|
+
shouldForwardProp: (e) => typeof e == "string" ? ae(e) ? !1 : F(e) : !1
|
|
153
132
|
})`
|
|
154
133
|
--current-spacing: 0;
|
|
155
134
|
--current-indent: 0;
|
|
@@ -157,27 +136,27 @@ const Box = styled("div", {
|
|
|
157
136
|
box-sizing: border-box;
|
|
158
137
|
display: flex;
|
|
159
138
|
flex-direction: column;
|
|
160
|
-
${
|
|
161
|
-
${
|
|
162
|
-
${
|
|
163
|
-
${
|
|
164
|
-
${
|
|
165
|
-
${
|
|
166
|
-
${
|
|
167
|
-
${
|
|
168
|
-
${
|
|
169
|
-
${
|
|
170
|
-
${
|
|
171
|
-
${
|
|
172
|
-
${
|
|
173
|
-
${
|
|
174
|
-
${
|
|
175
|
-
${
|
|
176
|
-
${
|
|
177
|
-
${
|
|
178
|
-
${
|
|
179
|
-
${
|
|
180
|
-
${
|
|
139
|
+
${le};
|
|
140
|
+
${H};
|
|
141
|
+
${N};
|
|
142
|
+
${P};
|
|
143
|
+
${V};
|
|
144
|
+
${A};
|
|
145
|
+
${j};
|
|
146
|
+
${U};
|
|
147
|
+
${q};
|
|
148
|
+
${W};
|
|
149
|
+
${B};
|
|
150
|
+
${K};
|
|
151
|
+
${G};
|
|
152
|
+
${J};
|
|
153
|
+
${Q};
|
|
154
|
+
${X};
|
|
155
|
+
${Y};
|
|
156
|
+
${Z};
|
|
157
|
+
${ee};
|
|
158
|
+
${te};
|
|
159
|
+
${ne};
|
|
181
160
|
|
|
182
161
|
gap: calc(var(--current-gap) * var(--swui-metrics-space));
|
|
183
162
|
|
|
@@ -185,563 +164,429 @@ const Box = styled("div", {
|
|
|
185
164
|
calc(var(--current-indent) * var(--swui-metrics-indent));
|
|
186
165
|
:hover {
|
|
187
166
|
${({
|
|
188
|
-
hoverBackground
|
|
189
|
-
}) =>
|
|
167
|
+
hoverBackground: e
|
|
168
|
+
}) => e ? `background: ${e};` : ""}
|
|
190
169
|
${({
|
|
191
|
-
hoverBorder
|
|
192
|
-
}) =>
|
|
170
|
+
hoverBorder: e
|
|
171
|
+
}) => e ? `border: ${e};` : ""}
|
|
193
172
|
}
|
|
194
173
|
:focus {
|
|
195
174
|
${({
|
|
196
|
-
focusBackground
|
|
197
|
-
}) =>
|
|
175
|
+
focusBackground: e
|
|
176
|
+
}) => e ? `background: ${e};` : ""}
|
|
198
177
|
${({
|
|
199
|
-
focusBorder
|
|
200
|
-
}) =>
|
|
178
|
+
focusBorder: e
|
|
179
|
+
}) => e ? `border: ${e};` : ""}
|
|
201
180
|
}
|
|
202
181
|
:focus-within {
|
|
203
182
|
${({
|
|
204
|
-
focusWithinBackground
|
|
205
|
-
}) =>
|
|
183
|
+
focusWithinBackground: e
|
|
184
|
+
}) => e ? `background: ${e};` : ""}
|
|
206
185
|
${({
|
|
207
|
-
focusWithinBorder
|
|
208
|
-
}) =>
|
|
186
|
+
focusWithinBorder: e
|
|
187
|
+
}) => e ? `border: ${e};` : ""}
|
|
209
188
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
...props
|
|
189
|
+
`, Ge = w(function(t, n) {
|
|
190
|
+
return /* @__PURE__ */ a(b, {
|
|
191
|
+
ref: n,
|
|
192
|
+
...t
|
|
215
193
|
});
|
|
216
|
-
})
|
|
217
|
-
const
|
|
218
|
-
const { x, y, width, height, bottom: bottom2, top: top2, left: left2, right: right2 } = node.getBoundingClientRect();
|
|
194
|
+
}), me = (e) => {
|
|
195
|
+
const { x: t, y: n, width: r, height: o, bottom: s, top: c, left: i, right: u } = e.getBoundingClientRect();
|
|
219
196
|
return {
|
|
220
|
-
width,
|
|
221
|
-
height,
|
|
222
|
-
top:
|
|
223
|
-
left:
|
|
224
|
-
x,
|
|
225
|
-
y,
|
|
226
|
-
right:
|
|
227
|
-
bottom:
|
|
197
|
+
width: r,
|
|
198
|
+
height: o,
|
|
199
|
+
top: c,
|
|
200
|
+
left: i,
|
|
201
|
+
x: t,
|
|
202
|
+
y: n,
|
|
203
|
+
right: u,
|
|
204
|
+
bottom: s
|
|
228
205
|
};
|
|
229
|
-
}
|
|
230
|
-
const
|
|
231
|
-
const useElementDimensions = (ref, onResizeElement) => {
|
|
232
|
-
const [dimensions, setDimensions] = useState();
|
|
233
|
-
const updateDimensions = useCallback(() => {
|
|
206
|
+
}, he = (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, we = (e, t) => {
|
|
207
|
+
const [n, r] = f(), o = h(() => {
|
|
234
208
|
window.requestAnimationFrame(() => {
|
|
235
|
-
if (
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
if (onResizeElement) {
|
|
239
|
-
onResizeElement(newDimensions);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
setDimensions(newDimensions);
|
|
209
|
+
if (e.current) {
|
|
210
|
+
const s = me(e.current);
|
|
211
|
+
(!n || !he(n, s)) && t && t(s), r(s);
|
|
243
212
|
}
|
|
244
213
|
});
|
|
245
|
-
}, [
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}, [
|
|
249
|
-
|
|
250
|
-
dimensions
|
|
214
|
+
}, [e, n, r, t]);
|
|
215
|
+
return L(() => {
|
|
216
|
+
o();
|
|
217
|
+
}, [o]), {
|
|
218
|
+
dimensions: n
|
|
251
219
|
};
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
261
|
-
...boxProps,
|
|
262
|
-
ref
|
|
220
|
+
}, Je = w(function({
|
|
221
|
+
onResize: t,
|
|
222
|
+
...n
|
|
223
|
+
}, r) {
|
|
224
|
+
const o = p(null), s = r != null ? r : o;
|
|
225
|
+
return we(s, t), /* @__PURE__ */ a(b, {
|
|
226
|
+
...n,
|
|
227
|
+
ref: r
|
|
263
228
|
});
|
|
264
|
-
})
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
...props
|
|
229
|
+
}), Qe = w(function(t, n) {
|
|
230
|
+
return /* @__PURE__ */ a(b, {
|
|
231
|
+
row: !0,
|
|
232
|
+
ref: n,
|
|
233
|
+
...t
|
|
270
234
|
});
|
|
271
|
-
})
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
...props
|
|
235
|
+
}), Xe = w(function({
|
|
236
|
+
num: t = 1,
|
|
237
|
+
...n
|
|
238
|
+
}, r) {
|
|
239
|
+
return /* @__PURE__ */ a(b, {
|
|
240
|
+
indent: t,
|
|
241
|
+
ref: r,
|
|
242
|
+
...n
|
|
280
243
|
});
|
|
281
|
-
})
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
...props
|
|
244
|
+
}), Ye = w(function({
|
|
245
|
+
num: t = 1,
|
|
246
|
+
...n
|
|
247
|
+
}, r) {
|
|
248
|
+
return /* @__PURE__ */ a(b, {
|
|
249
|
+
spacing: t,
|
|
250
|
+
ref: r,
|
|
251
|
+
...n
|
|
290
252
|
});
|
|
291
|
-
})
|
|
292
|
-
const InnerSpace = styled.div`
|
|
253
|
+
}), fe = x.div`
|
|
293
254
|
--current-size: 1;
|
|
294
255
|
flex: none;
|
|
295
256
|
width: calc(var(--current-size) * var(--swui-metrics-space));
|
|
296
257
|
height: calc(var(--current-size) * var(--swui-metrics-space));
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
vertical = false
|
|
258
|
+
`, Ze = ({
|
|
259
|
+
half: e = !1,
|
|
260
|
+
horizontal: t = !1,
|
|
261
|
+
num: n = 1,
|
|
262
|
+
vertical: r = !1
|
|
303
263
|
}) => {
|
|
304
|
-
const
|
|
305
|
-
return /* @__PURE__ */
|
|
264
|
+
const o = n * (e ? 0.5 : 1);
|
|
265
|
+
return /* @__PURE__ */ a(fe, {
|
|
306
266
|
style: {
|
|
307
|
-
["--current-size"]:
|
|
308
|
-
height:
|
|
309
|
-
width:
|
|
267
|
+
["--current-size"]: o,
|
|
268
|
+
height: t ? 1 : void 0,
|
|
269
|
+
width: r ? 1 : void 0
|
|
310
270
|
}
|
|
311
271
|
});
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
272
|
+
}, et = ({
|
|
273
|
+
children: e,
|
|
274
|
+
nest: t,
|
|
275
|
+
render: n
|
|
276
|
+
}) => t ? /* @__PURE__ */ a(I, {
|
|
277
|
+
children: n(e)
|
|
278
|
+
}) : /* @__PURE__ */ a(I, {
|
|
279
|
+
children: e
|
|
280
|
+
}), pe = "_text_1iisw_1", ve = "_standard_1iisw_24", ge = "_bold_1iisw_27", be = "_caption_1iisw_31", $e = "_overline_1iisw_39", xe = "_large_1iisw_48", _e = "_medium_1iisw_53", ye = "_small_1iisw_58", Ee = "_smaller_1iisw_63", y = {
|
|
281
|
+
text: pe,
|
|
282
|
+
standard: ve,
|
|
283
|
+
bold: ge,
|
|
284
|
+
caption: be,
|
|
285
|
+
overline: $e,
|
|
286
|
+
large: xe,
|
|
287
|
+
medium: _e,
|
|
288
|
+
small: ye,
|
|
289
|
+
smaller: Ee
|
|
290
|
+
}, $ = w(({
|
|
291
|
+
children: e,
|
|
292
|
+
variant: t = "standard",
|
|
293
|
+
size: n = "medium",
|
|
294
|
+
className: r,
|
|
295
|
+
color: o,
|
|
296
|
+
userSelect: s,
|
|
297
|
+
whiteSpace: c,
|
|
298
|
+
wordBreak: i,
|
|
299
|
+
style: u,
|
|
300
|
+
...d
|
|
301
|
+
}, l) => /* @__PURE__ */ a("span", {
|
|
302
|
+
className: T(y.text, y[t], y[n], r),
|
|
303
|
+
ref: l,
|
|
304
|
+
style: {
|
|
305
|
+
color: o,
|
|
306
|
+
userSelect: s,
|
|
307
|
+
whiteSpace: c,
|
|
308
|
+
wordBreak: i,
|
|
309
|
+
...u
|
|
310
|
+
},
|
|
311
|
+
...d,
|
|
312
|
+
children: e
|
|
313
|
+
})), tt = $, nt = (e) => /* @__PURE__ */ a($, {
|
|
314
|
+
size: "small",
|
|
315
|
+
...e
|
|
316
|
+
}), rt = (e) => /* @__PURE__ */ a($, {
|
|
317
|
+
size: "smaller",
|
|
318
|
+
...e
|
|
319
|
+
}), ot = (e) => /* @__PURE__ */ a($, {
|
|
320
|
+
size: "medium",
|
|
321
|
+
...e
|
|
322
|
+
}), st = (e) => /* @__PURE__ */ a($, {
|
|
323
|
+
size: "large",
|
|
324
|
+
...e
|
|
325
|
+
}), Ie = "_heading_1u7xw_1", Se = "_h1_1u7xw_10", Ce = "_h2_1u7xw_15", De = "_h3_1u7xw_20", Te = "_h4_1u7xw_25", Me = "_h5_1u7xw_31", Oe = "_h6_1u7xw_37", S = {
|
|
326
|
+
heading: Ie,
|
|
327
|
+
h1: Se,
|
|
328
|
+
h2: Ce,
|
|
329
|
+
h3: De,
|
|
330
|
+
h4: Te,
|
|
331
|
+
h5: Me,
|
|
332
|
+
h6: Oe
|
|
333
|
+
}, ke = w(({
|
|
334
|
+
variant: e = "h3",
|
|
335
|
+
className: t,
|
|
336
|
+
color: n,
|
|
337
|
+
whiteSpace: r,
|
|
338
|
+
wordBreak: o,
|
|
339
|
+
style: s,
|
|
340
|
+
children: c,
|
|
341
|
+
as: i,
|
|
342
|
+
...u
|
|
343
|
+
}, d) => {
|
|
344
|
+
const l = i != null ? i : e;
|
|
345
|
+
return /* @__PURE__ */ a(l, {
|
|
346
|
+
className: T(S.heading, S[e], t),
|
|
362
347
|
style: {
|
|
363
|
-
color,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
...style
|
|
348
|
+
color: n,
|
|
349
|
+
whiteSpace: r,
|
|
350
|
+
wordBreak: o,
|
|
351
|
+
...s
|
|
368
352
|
},
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
});
|
|
373
|
-
const Txt = Text;
|
|
374
|
-
const SmallText = (props) => {
|
|
375
|
-
return /* @__PURE__ */ jsx(Text, {
|
|
376
|
-
size: "small",
|
|
377
|
-
...props
|
|
378
|
-
});
|
|
379
|
-
};
|
|
380
|
-
const SmallerText = (props) => {
|
|
381
|
-
return /* @__PURE__ */ jsx(Text, {
|
|
382
|
-
size: "smaller",
|
|
383
|
-
...props
|
|
384
|
-
});
|
|
385
|
-
};
|
|
386
|
-
const StandardText = (props) => {
|
|
387
|
-
return /* @__PURE__ */ jsx(Text, {
|
|
388
|
-
size: "medium",
|
|
389
|
-
...props
|
|
353
|
+
ref: d,
|
|
354
|
+
...u,
|
|
355
|
+
children: c
|
|
390
356
|
});
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
const heading = "_heading_1u7xw_1";
|
|
399
|
-
const h1 = "_h1_1u7xw_10";
|
|
400
|
-
const h2 = "_h2_1u7xw_15";
|
|
401
|
-
const h3 = "_h3_1u7xw_20";
|
|
402
|
-
const h4 = "_h4_1u7xw_25";
|
|
403
|
-
const h5 = "_h5_1u7xw_31";
|
|
404
|
-
const h6 = "_h6_1u7xw_37";
|
|
405
|
-
var styles = {
|
|
406
|
-
heading,
|
|
407
|
-
h1,
|
|
408
|
-
h2,
|
|
409
|
-
h3,
|
|
410
|
-
h4,
|
|
411
|
-
h5,
|
|
412
|
-
h6
|
|
413
|
-
};
|
|
414
|
-
const Heading = forwardRef(({
|
|
415
|
-
variant = "h3",
|
|
416
|
-
className,
|
|
417
|
-
color,
|
|
418
|
-
whiteSpace,
|
|
419
|
-
wordBreak,
|
|
420
|
-
style,
|
|
421
|
-
children,
|
|
422
|
-
as,
|
|
423
|
-
...hProps
|
|
424
|
-
}, ref) => {
|
|
425
|
-
const Element = as != null ? as : variant;
|
|
426
|
-
return /* @__PURE__ */ jsx(Element, {
|
|
427
|
-
className: cx(styles.heading, styles[variant], className),
|
|
428
|
-
style: {
|
|
429
|
-
color,
|
|
430
|
-
whiteSpace,
|
|
431
|
-
wordBreak,
|
|
432
|
-
...style
|
|
357
|
+
}), ct = (e) => /* @__PURE__ */ a(ke, {
|
|
358
|
+
variant: "h2",
|
|
359
|
+
...e
|
|
360
|
+
}), Le = (e, t) => e === t, ut = (e, t, n = Le) => {
|
|
361
|
+
const r = h(
|
|
362
|
+
(u) => {
|
|
363
|
+
e.some((d) => n(d, u)) || t([...e, u]);
|
|
433
364
|
},
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}, [list, setList, comparator]);
|
|
460
|
-
const remove = useCallback((item) => {
|
|
461
|
-
const index = list.findIndex((l) => comparator(l, item));
|
|
462
|
-
if (index >= 0) {
|
|
463
|
-
setList(list.filter((_, i) => i !== index));
|
|
464
|
-
}
|
|
465
|
-
}, [list, setList, comparator]);
|
|
466
|
-
const removeMultiple = useCallback((items) => {
|
|
467
|
-
setList(list.filter((item) => !items.some((l) => comparator(l, item))));
|
|
468
|
-
}, [list, setList, comparator]);
|
|
469
|
-
const toggle = useCallback((item) => {
|
|
470
|
-
const found = list.some((l) => comparator(l, item));
|
|
471
|
-
if (found) {
|
|
472
|
-
remove(item);
|
|
473
|
-
} else {
|
|
474
|
-
add(item);
|
|
475
|
-
}
|
|
476
|
-
}, [list, add, remove, comparator]);
|
|
365
|
+
[e, t, n]
|
|
366
|
+
), o = h(
|
|
367
|
+
(u) => {
|
|
368
|
+
t(
|
|
369
|
+
u.reduce((d, l) => d.some((g) => n(g, l)) ? d : [...d, l], e)
|
|
370
|
+
);
|
|
371
|
+
},
|
|
372
|
+
[e, t, n]
|
|
373
|
+
), s = h(
|
|
374
|
+
(u) => {
|
|
375
|
+
const d = e.findIndex((l) => n(l, u));
|
|
376
|
+
d >= 0 && t(e.filter((l, g) => g !== d));
|
|
377
|
+
},
|
|
378
|
+
[e, t, n]
|
|
379
|
+
), c = h(
|
|
380
|
+
(u) => {
|
|
381
|
+
t(e.filter((d) => !u.some((l) => n(l, d))));
|
|
382
|
+
},
|
|
383
|
+
[e, t, n]
|
|
384
|
+
), i = h(
|
|
385
|
+
(u) => {
|
|
386
|
+
e.some((l) => n(l, u)) ? s(u) : r(u);
|
|
387
|
+
},
|
|
388
|
+
[e, r, s, n]
|
|
389
|
+
);
|
|
477
390
|
return {
|
|
478
|
-
add,
|
|
479
|
-
addMultiple,
|
|
480
|
-
remove,
|
|
481
|
-
removeMultiple,
|
|
482
|
-
toggle
|
|
391
|
+
add: r,
|
|
392
|
+
addMultiple: o,
|
|
393
|
+
remove: s,
|
|
394
|
+
removeMultiple: c,
|
|
395
|
+
toggle: i
|
|
483
396
|
};
|
|
484
|
-
}
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
}, [
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
const [debouncedValue, setDebouncedValue] = useState(value);
|
|
500
|
-
useEffect(() => {
|
|
501
|
-
const handler = setTimeout(() => {
|
|
502
|
-
setDebouncedValue(value);
|
|
503
|
-
}, delay);
|
|
397
|
+
}, E = (e) => {
|
|
398
|
+
const [t, n] = f(e), r = h(() => {
|
|
399
|
+
n(!0);
|
|
400
|
+
}, [n]), o = h(() => {
|
|
401
|
+
n(!1);
|
|
402
|
+
}, [n]), s = h(() => {
|
|
403
|
+
n((c) => !c);
|
|
404
|
+
}, [n]);
|
|
405
|
+
return [t, r, o, s];
|
|
406
|
+
}, it = (e, t) => {
|
|
407
|
+
const [n, r] = f(e);
|
|
408
|
+
return m(() => {
|
|
409
|
+
const o = setTimeout(() => {
|
|
410
|
+
r(e);
|
|
411
|
+
}, t);
|
|
504
412
|
return () => {
|
|
505
|
-
clearTimeout(
|
|
413
|
+
clearTimeout(o);
|
|
506
414
|
};
|
|
507
|
-
}, [
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}
|
|
516
|
-
const handler = setTimeout(() => {
|
|
517
|
-
if (!value) {
|
|
518
|
-
setDebouncedValue(value);
|
|
519
|
-
}
|
|
520
|
-
}, delay);
|
|
415
|
+
}, [e, t]), n;
|
|
416
|
+
}, dt = (e, t) => {
|
|
417
|
+
const [n, r] = f(e);
|
|
418
|
+
return m(() => {
|
|
419
|
+
e && r(!0);
|
|
420
|
+
const o = setTimeout(() => {
|
|
421
|
+
e || r(e);
|
|
422
|
+
}, t);
|
|
521
423
|
return () => {
|
|
522
|
-
clearTimeout(
|
|
424
|
+
clearTimeout(o);
|
|
523
425
|
};
|
|
524
|
-
}, [
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
useEffect(() => {
|
|
537
|
-
savedHandler.current = handler;
|
|
538
|
-
}, [handler]);
|
|
539
|
-
useEffect(() => {
|
|
540
|
-
const isSupported = ref.current && ref.current.addEventListener;
|
|
541
|
-
if (!isSupported)
|
|
426
|
+
}, [e, t]), n;
|
|
427
|
+
};
|
|
428
|
+
let ze = 0;
|
|
429
|
+
const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, at = (e) => {
|
|
430
|
+
const [t, n] = f(() => C(e));
|
|
431
|
+
return m(() => n(C(e)), [e]), t;
|
|
432
|
+
}, v = (e, t, n) => {
|
|
433
|
+
const r = p();
|
|
434
|
+
m(() => {
|
|
435
|
+
r.current = n;
|
|
436
|
+
}, [n]), m(() => {
|
|
437
|
+
if (!(e.current && e.current.addEventListener))
|
|
542
438
|
return;
|
|
543
|
-
const
|
|
544
|
-
if (
|
|
545
|
-
return
|
|
546
|
-
}
|
|
439
|
+
const s = (i) => {
|
|
440
|
+
if (r.current)
|
|
441
|
+
return r.current(i);
|
|
547
442
|
};
|
|
548
|
-
if (!
|
|
443
|
+
if (!e.current)
|
|
549
444
|
return;
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
return () => {
|
|
554
|
-
if (element) {
|
|
555
|
-
element.removeEventListener(eventName, eventListener);
|
|
556
|
-
}
|
|
445
|
+
const c = e.current;
|
|
446
|
+
return c.addEventListener(t, s), () => {
|
|
447
|
+
c && c.removeEventListener(t, s);
|
|
557
448
|
};
|
|
558
|
-
}, [
|
|
559
|
-
}
|
|
560
|
-
const
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}, [
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
const
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
ref.current.blur();
|
|
579
|
-
}
|
|
580
|
-
}, [ref]);
|
|
581
|
-
return { isInFocus, focus, blur };
|
|
582
|
-
};
|
|
583
|
-
const useMouseIsOver = (ref) => {
|
|
584
|
-
const [mouseIsOver, setMouseIsOver, setMouseIsNotOver] = useBoolean(false);
|
|
585
|
-
useEventListener(ref, "mouseover", setMouseIsOver);
|
|
586
|
-
useEventListener(ref, "mouseout", setMouseIsNotOver);
|
|
587
|
-
return mouseIsOver;
|
|
588
|
-
};
|
|
589
|
-
const useMouseIsEntered = (ref) => {
|
|
590
|
-
const [mouseIsEntered, setMouseIsEntered, setMouseIsNotEntered] = useBoolean(false);
|
|
591
|
-
useEventListener(ref, "mouseenter", setMouseIsEntered);
|
|
592
|
-
useEventListener(ref, "mouseleave", setMouseIsNotEntered);
|
|
593
|
-
return mouseIsEntered;
|
|
594
|
-
};
|
|
595
|
-
const useMultiOnClickOutside = (refs, handler) => {
|
|
596
|
-
const eventHandler = useRef(() => {
|
|
597
|
-
return;
|
|
449
|
+
}, [t, e]);
|
|
450
|
+
}, lt = (e) => {
|
|
451
|
+
const [t, n, r] = E(!1);
|
|
452
|
+
m(() => {
|
|
453
|
+
document.activeElement === re.findDOMNode(e.current) ? n() : r();
|
|
454
|
+
}, [e, r, n]), v(e, "focus", n), v(e, "blur", r);
|
|
455
|
+
const o = h(() => {
|
|
456
|
+
e.current && e.current.focus();
|
|
457
|
+
}, [e]), s = h(() => {
|
|
458
|
+
e.current && e.current.blur();
|
|
459
|
+
}, [e]);
|
|
460
|
+
return { isInFocus: t, focus: o, blur: s };
|
|
461
|
+
}, mt = (e) => {
|
|
462
|
+
const [t, n, r] = E(!1);
|
|
463
|
+
return v(e, "mouseover", n), v(e, "mouseout", r), t;
|
|
464
|
+
}, ht = (e) => {
|
|
465
|
+
const [t, n, r] = E(!1);
|
|
466
|
+
return v(e, "mouseenter", n), v(e, "mouseleave", r), t;
|
|
467
|
+
}, wt = (e, t) => {
|
|
468
|
+
const n = p(() => {
|
|
598
469
|
});
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}, [
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
const allNotContains = refs.filter((ref) => ref.current).every((ref) => {
|
|
605
|
-
return ref.current && !ref.current.contains(event.target);
|
|
606
|
-
});
|
|
607
|
-
if (!allNotContains) {
|
|
608
|
-
return;
|
|
609
|
-
}
|
|
610
|
-
eventHandler.current(event);
|
|
470
|
+
m(() => {
|
|
471
|
+
n.current = t;
|
|
472
|
+
}, [t]), m(() => {
|
|
473
|
+
const r = (o) => {
|
|
474
|
+
!e.filter((c) => c.current).every((c) => c.current && !c.current.contains(o.target)) || n.current(o);
|
|
611
475
|
};
|
|
612
|
-
document.addEventListener("mousedown",
|
|
613
|
-
|
|
614
|
-
return () => {
|
|
615
|
-
document.removeEventListener("mousedown", listener);
|
|
616
|
-
document.removeEventListener("touchstart", listener);
|
|
476
|
+
return document.addEventListener("mousedown", r), document.addEventListener("touchstart", r), () => {
|
|
477
|
+
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
|
|
617
478
|
};
|
|
618
|
-
}, [...
|
|
619
|
-
}
|
|
620
|
-
const
|
|
621
|
-
const eventHandler = useRef(() => {
|
|
622
|
-
return;
|
|
479
|
+
}, [...e]);
|
|
480
|
+
}, ft = (e, t, n) => {
|
|
481
|
+
const r = p(() => {
|
|
623
482
|
});
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
}, [
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
if (!ref.current || ref.current.contains(event.target)) {
|
|
630
|
-
return;
|
|
631
|
-
}
|
|
632
|
-
eventHandler.current(event);
|
|
483
|
+
m(() => {
|
|
484
|
+
r.current = t;
|
|
485
|
+
}, [t]), m(() => {
|
|
486
|
+
const o = (s) => {
|
|
487
|
+
!e.current || e.current.contains(s.target) || r.current(s);
|
|
633
488
|
};
|
|
634
|
-
document.addEventListener("mousedown",
|
|
635
|
-
|
|
636
|
-
return () => {
|
|
637
|
-
document.removeEventListener("mousedown", listener, options);
|
|
638
|
-
document.removeEventListener("touchstart", listener, options);
|
|
489
|
+
return document.addEventListener("mousedown", o, n), document.addEventListener("touchstart", o, n), () => {
|
|
490
|
+
document.removeEventListener("mousedown", o, n), document.removeEventListener("touchstart", o, n);
|
|
639
491
|
};
|
|
640
|
-
}, [
|
|
641
|
-
}
|
|
642
|
-
const
|
|
643
|
-
const useOnNoMouseMovement = (callback, delay) => {
|
|
644
|
-
const eventHandler = useRef(() => {
|
|
645
|
-
return;
|
|
492
|
+
}, [e, n]);
|
|
493
|
+
}, D = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], pt = (e, t) => {
|
|
494
|
+
const n = p(() => {
|
|
646
495
|
});
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
}, [
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
};
|
|
656
|
-
}, [delay]);
|
|
657
|
-
};
|
|
658
|
-
const useOnScreen = (ref, options) => {
|
|
659
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
660
|
-
const { rootMargin, root, threshold } = options || {};
|
|
661
|
-
const observer = useMemo(() => {
|
|
662
|
-
return new IntersectionObserver(([entry]) => setIsVisible(entry.isIntersecting), {
|
|
663
|
-
rootMargin,
|
|
664
|
-
root,
|
|
665
|
-
threshold
|
|
666
|
-
});
|
|
667
|
-
}, [setIsVisible, rootMargin, root, threshold]);
|
|
668
|
-
useEffect(() => {
|
|
669
|
-
if (ref.current) {
|
|
670
|
-
observer.observe(ref.current);
|
|
671
|
-
}
|
|
672
|
-
return () => {
|
|
673
|
-
observer.disconnect();
|
|
496
|
+
m(() => {
|
|
497
|
+
n.current = e;
|
|
498
|
+
}, [e]), m(() => {
|
|
499
|
+
const r = oe(n.current, t);
|
|
500
|
+
return D.forEach((o) => window.addEventListener(o, r)), () => {
|
|
501
|
+
D.forEach(
|
|
502
|
+
(o) => window.removeEventListener(o, r)
|
|
503
|
+
);
|
|
674
504
|
};
|
|
675
|
-
}, [
|
|
676
|
-
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
if (typeof ref === "function") {
|
|
684
|
-
ref(innerRef.current);
|
|
685
|
-
} else {
|
|
686
|
-
ref.current = innerRef.current;
|
|
505
|
+
}, [t]);
|
|
506
|
+
}, vt = (e, t) => {
|
|
507
|
+
const [n, r] = f(!1), { rootMargin: o, root: s, threshold: c } = t || {}, i = z(() => new IntersectionObserver(
|
|
508
|
+
([u]) => r(u.isIntersecting),
|
|
509
|
+
{
|
|
510
|
+
rootMargin: o,
|
|
511
|
+
root: s,
|
|
512
|
+
threshold: c
|
|
687
513
|
}
|
|
688
|
-
|
|
689
|
-
return
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
};
|
|
711
|
-
const exhaustSwitchCase = (_arg, fallback) => {
|
|
712
|
-
return fallback;
|
|
713
|
-
};
|
|
714
|
-
const truthyKeysAsList = (r) => Object.keys(r).filter((key) => r[key]);
|
|
715
|
-
const getDataProps = (props) => pickBy(props, isDataPropMapper);
|
|
716
|
-
const isDataPropMapper = (_, key) => isDataProp(key);
|
|
717
|
-
const isDataProp = (propName) => propName.startsWith("data-") || propName.startsWith("aria-");
|
|
718
|
-
const parseFloatElseUndefined = (s) => {
|
|
514
|
+
), [r, o, s, c]);
|
|
515
|
+
return m(() => (e.current && i.observe(e.current), () => {
|
|
516
|
+
i.disconnect();
|
|
517
|
+
}), [i, e]), n;
|
|
518
|
+
}, gt = (e) => {
|
|
519
|
+
const t = p(null);
|
|
520
|
+
return m(() => {
|
|
521
|
+
!e || (typeof e == "function" ? e(t.current) : e.current = t.current);
|
|
522
|
+
}), t;
|
|
523
|
+
}, bt = (e, t, n = !0) => {
|
|
524
|
+
const [r, o] = f(e), s = p(), c = h(
|
|
525
|
+
(i, u = t) => {
|
|
526
|
+
o(i), n && clearTimeout(s.current), s.current = setTimeout(() => o(e), u);
|
|
527
|
+
},
|
|
528
|
+
[t, n, e]
|
|
529
|
+
);
|
|
530
|
+
return m(() => () => {
|
|
531
|
+
clearTimeout(s.current);
|
|
532
|
+
}, []), [r, c];
|
|
533
|
+
}, $t = (e) => {
|
|
534
|
+
throw new Error(`Switch unhandled case: ${e}`);
|
|
535
|
+
}, xt = (e, t) => t, _t = (e) => Object.keys(e).filter((t) => e[t]), yt = (e) => se(e, Fe), Fe = (e, t) => Re(t), Re = (e) => e.startsWith("data-") || e.startsWith("aria-"), Et = (e) => {
|
|
719
536
|
try {
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
}
|
|
724
|
-
if (f == null) {
|
|
725
|
-
return void 0;
|
|
726
|
-
}
|
|
727
|
-
return f;
|
|
728
|
-
} catch (e) {
|
|
537
|
+
const t = parseFloat(e);
|
|
538
|
+
return isNaN(t) || t == null ? void 0 : t;
|
|
539
|
+
} catch {
|
|
729
540
|
}
|
|
730
|
-
|
|
731
|
-
};
|
|
732
|
-
const parseIntElseUndefined = (s) => {
|
|
541
|
+
}, It = (e) => {
|
|
733
542
|
try {
|
|
734
|
-
const
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
}
|
|
738
|
-
if (f == null) {
|
|
739
|
-
return void 0;
|
|
740
|
-
}
|
|
741
|
-
return f;
|
|
742
|
-
} catch (e) {
|
|
543
|
+
const t = parseInt(e, 10);
|
|
544
|
+
return isNaN(t) || t == null ? void 0 : t;
|
|
545
|
+
} catch {
|
|
743
546
|
}
|
|
744
|
-
return void 0;
|
|
745
547
|
};
|
|
746
|
-
export {
|
|
548
|
+
export {
|
|
549
|
+
b as Box,
|
|
550
|
+
Ke as Clickable,
|
|
551
|
+
Ge as Column,
|
|
552
|
+
ct as HeaderText,
|
|
553
|
+
ke as Heading,
|
|
554
|
+
Xe as Indent,
|
|
555
|
+
st as LargeText,
|
|
556
|
+
et as Nest,
|
|
557
|
+
Je as ResizeAwareBox,
|
|
558
|
+
Qe as Row,
|
|
559
|
+
Be as SeparatorLine,
|
|
560
|
+
nt as SmallText,
|
|
561
|
+
rt as SmallerText,
|
|
562
|
+
Ze as Space,
|
|
563
|
+
Ye as Spacing,
|
|
564
|
+
ot as StandardText,
|
|
565
|
+
$ as Text,
|
|
566
|
+
tt as Txt,
|
|
567
|
+
_ as booleanOrNumberToNumber,
|
|
568
|
+
xt as exhaustSwitchCase,
|
|
569
|
+
$t as exhaustSwitchCaseElseThrow,
|
|
570
|
+
yt as getDataProps,
|
|
571
|
+
me as getDimensionObject,
|
|
572
|
+
Et as parseFloatElseUndefined,
|
|
573
|
+
It as parseIntElseUndefined,
|
|
574
|
+
_t as truthyKeysAsList,
|
|
575
|
+
ut as useArraySet,
|
|
576
|
+
E as useBoolean,
|
|
577
|
+
it as useDebounce,
|
|
578
|
+
dt as useDelayedFalse,
|
|
579
|
+
at as useDomId,
|
|
580
|
+
we as useElementDimensions,
|
|
581
|
+
lt as useElementFocus,
|
|
582
|
+
v as useEventListener,
|
|
583
|
+
gt as useForwardedRef,
|
|
584
|
+
ht as useMouseIsEntered,
|
|
585
|
+
mt as useMouseIsOver,
|
|
586
|
+
wt as useMultiOnClickOutside,
|
|
587
|
+
ft as useOnClickOutside,
|
|
588
|
+
pt as useOnNoMouseMovement,
|
|
589
|
+
vt as useOnScreen,
|
|
590
|
+
bt as useTimeoutState
|
|
591
|
+
};
|
|
747
592
|
//# sourceMappingURL=index.es.js.map
|