@stenajs-webui/core 19.0.1 → 19.0.2

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.
@@ -28,6 +28,14 @@ export interface BoxProps extends StyledSystemProps, DivProps {
28
28
  * Adds spacing between children.
29
29
  */
30
30
  gap?: ResponsiveValue<boolean | TLengthStyledSystem>;
31
+ /**
32
+ * Adds gap between columns.
33
+ */
34
+ columnGap?: ResponsiveValue<boolean | TLengthStyledSystem>;
35
+ /**
36
+ * Adds gap between rows.
37
+ */
38
+ rowGap?: ResponsiveValue<boolean | TLengthStyledSystem>;
31
39
  /**
32
40
  * Adds a shadow around the box.
33
41
  */
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
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
2
  import { cssColor as L } from "@stenajs-webui/theme";
3
- import { jsx as d, Fragment as I } from "react/jsx-runtime";
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";
3
+ import { jsx as a, Fragment as I } from "react/jsx-runtime";
4
+ import _ from "@emotion/styled";
5
+ import { forwardRef as p, useState as w, useCallback as h, useLayoutEffect as z, useRef as f, useEffect as m, useMemo as H } from "react";
6
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";
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 G, borderStyle as W, borderWidth as B, boxShadow as K, 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
8
  import { pickBy as oe, debounce as se } from "lodash";
9
9
  import D from "classnames";
10
10
  import * as ce from "react-dom";
11
- const ue = $.hr`
11
+ const ue = _.hr`
12
12
  display: flex;
13
13
  border: 0;
14
14
  margin: 0;
@@ -16,13 +16,13 @@ const ue = $.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
- `, Qe = f(
19
+ `, Qe = p(
20
20
  ({
21
21
  color: e = L("--lhds-color-ui-300"),
22
22
  size: t = "100%",
23
23
  width: n = "1px",
24
24
  vertical: r = !1
25
- }, o) => /* @__PURE__ */ d(
25
+ }, o) => /* @__PURE__ */ a(
26
26
  ue,
27
27
  {
28
28
  "aria-hidden": !0,
@@ -33,7 +33,7 @@ const ue = $.hr`
33
33
  ref: o
34
34
  }
35
35
  )
36
- ), ie = $.button`
36
+ ), ie = _.button`
37
37
  display: inline-block;
38
38
  user-select: none;
39
39
  border: 0;
@@ -56,7 +56,7 @@ const ue = $.hr`
56
56
  ${({ width: e }) => e ? `width: ${e};` : ""}
57
57
  ${({ height: e }) => e ? `height: ${e};` : ""}
58
58
  ${({ borderRadius: e }) => e ? `border-radius: ${e};` : ""}
59
- `, Xe = f(
59
+ `, Xe = p(
60
60
  ({
61
61
  disableFocusHighlight: e,
62
62
  onClick: t,
@@ -67,12 +67,12 @@ const ue = $.hr`
67
67
  opacityOnHover: c,
68
68
  disabled: i,
69
69
  children: u,
70
- background: a = "transparent",
70
+ background: d = "transparent",
71
71
  hoverBackground: l,
72
72
  focusBackground: g,
73
73
  type: O = "button",
74
74
  ...M
75
- }, k) => /* @__PURE__ */ d(
75
+ }, k) => /* @__PURE__ */ a(
76
76
  ie,
77
77
  {
78
78
  opacityOnHover: c,
@@ -84,7 +84,7 @@ const ue = $.hr`
84
84
  disableFocusHighlight: e,
85
85
  pointer: !!(t || n) && !s,
86
86
  ref: k,
87
- background: a,
87
+ background: d,
88
88
  hoverBackground: l,
89
89
  focusBackground: g,
90
90
  type: O,
@@ -92,12 +92,12 @@ const ue = $.hr`
92
92
  children: u
93
93
  }
94
94
  )
95
- ), _ = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, de = {
95
+ ), b = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, ae = {
96
96
  box: "var(--swui-shadow-box)",
97
97
  popover: "var(--swui-shadow-popover)",
98
98
  modal: "var(--swui-shadow-modal)",
99
99
  bottom: "var(--swui-shadow-bottom)"
100
- }, ae = [
100
+ }, de = [
101
101
  "spacing",
102
102
  "indent",
103
103
  "gap",
@@ -105,36 +105,46 @@ const ue = $.hr`
105
105
  "height",
106
106
  "overflow",
107
107
  "display"
108
- ], le = (e) => ae.includes(e), me = F({
108
+ ], le = (e) => de.includes(e), me = F({
109
109
  row: {
110
110
  property: "flexDirection",
111
111
  transform: (e) => e ? "row" : "column"
112
112
  },
113
113
  indent: {
114
114
  property: "--current-indent",
115
- transform: _
115
+ transform: b
116
116
  },
117
117
  spacing: {
118
118
  property: "--current-spacing",
119
- transform: _
119
+ transform: b
120
120
  },
121
121
  gap: {
122
122
  property: "--current-gap",
123
- transform: _
123
+ transform: b
124
+ },
125
+ columnGap: {
126
+ property: "--current-column-gap",
127
+ transform: b
128
+ },
129
+ rowGap: {
130
+ property: "--current-row-gap",
131
+ transform: b
124
132
  },
125
133
  shadow: {
126
134
  property: "boxShadow",
127
135
  transform: (e) => {
128
136
  var t;
129
- return (t = de[e]) != null ? t : e;
137
+ return (t = ae[e]) != null ? t : e;
130
138
  }
131
139
  }
132
- }), b = $("div", {
140
+ }), x = _("div", {
133
141
  shouldForwardProp: (e) => typeof e == "string" ? le(e) ? !1 : R(e) : !1
134
142
  })`
135
143
  --current-spacing: 0;
136
144
  --current-indent: 0;
137
145
  --current-gap: 0;
146
+ --current-column-gap: 0;
147
+ --current-row-gap: 0;
138
148
  box-sizing: border-box;
139
149
  display: flex;
140
150
  flex-direction: column;
@@ -146,10 +156,10 @@ const ue = $.hr`
146
156
  ${A};
147
157
  ${U};
148
158
  ${q};
159
+ ${G};
149
160
  ${W};
150
161
  ${B};
151
162
  ${K};
152
- ${G};
153
163
  ${J};
154
164
  ${Q};
155
165
  ${X};
@@ -161,6 +171,8 @@ const ue = $.hr`
161
171
  ${re};
162
172
 
163
173
  gap: calc(var(--current-gap) * var(--swui-metrics-space));
174
+ column-gap: calc(var(--current-column-gap) * var(--swui-metrics-space));
175
+ row-gap: calc(var(--current-row-gap) * var(--swui-metrics-space));
164
176
 
165
177
  padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))
166
178
  calc(var(--current-indent) * var(--swui-metrics-indent));
@@ -176,8 +188,8 @@ const ue = $.hr`
176
188
  ${({ focusWithinBackground: e }) => e ? `background: ${e};` : ""}
177
189
  ${({ focusWithinBorder: e }) => e ? `border: ${e};` : ""}
178
190
  }
179
- `, Ye = f(function(t, n) {
180
- return /* @__PURE__ */ d(b, { ref: n, ...t });
191
+ `, Ye = p(function(t, n) {
192
+ return /* @__PURE__ */ a(x, { ref: n, ...t });
181
193
  }), he = (e) => {
182
194
  const { x: t, y: n, width: r, height: o, bottom: s, top: c, left: i, right: u } = e.getBoundingClientRect();
183
195
  return {
@@ -190,12 +202,12 @@ const ue = $.hr`
190
202
  right: u,
191
203
  bottom: s
192
204
  };
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(() => {
205
+ }, pe = (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) => {
206
+ const [n, r] = w(), o = h(() => {
195
207
  window.requestAnimationFrame(() => {
196
208
  if (e.current) {
197
209
  const s = he(e.current);
198
- (!n || !fe(n, s)) && t && t(s), r(s);
210
+ (!n || !pe(n, s)) && t && t(s), r(s);
199
211
  }
200
212
  });
201
213
  }, [e, n, r, t]);
@@ -204,20 +216,20 @@ const ue = $.hr`
204
216
  }, [o]), {
205
217
  dimensions: n
206
218
  };
207
- }, Ze = f(
219
+ }, Ze = p(
208
220
  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 });
221
+ const o = f(null), s = r != null ? r : o;
222
+ return we(s, t), /* @__PURE__ */ a(x, { ...n, ref: r });
211
223
  }
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(
224
+ ), et = p(function(t, n) {
225
+ return /* @__PURE__ */ a(x, { row: !0, ref: n, ...t });
226
+ }), tt = p(function({ num: t = 1, ...n }, r) {
227
+ return /* @__PURE__ */ a(x, { indent: t, ref: r, ...n });
228
+ }), nt = p(
217
229
  function({ num: t = 1, ...n }, r) {
218
- return /* @__PURE__ */ d(b, { spacing: t, ref: r, ...n });
230
+ return /* @__PURE__ */ a(x, { spacing: t, ref: r, ...n });
219
231
  }
220
- ), ve = $.div`
232
+ ), fe = _.div`
221
233
  --current-size: 1;
222
234
  flex: none;
223
235
  width: calc(var(--current-size) * var(--swui-metrics-space));
@@ -229,8 +241,8 @@ const ue = $.hr`
229
241
  vertical: r = !1
230
242
  }) => {
231
243
  const o = n * (e ? 0.5 : 1);
232
- return /* @__PURE__ */ d(
233
- ve,
244
+ return /* @__PURE__ */ a(
245
+ fe,
234
246
  {
235
247
  style: {
236
248
  ["--current-size"]: o,
@@ -239,12 +251,12 @@ const ue = $.hr`
239
251
  }
240
252
  }
241
253
  );
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
254
+ }, ot = ({ children: e, nest: t, render: n }) => t ? /* @__PURE__ */ a(I, { children: n(e) }) : /* @__PURE__ */ a(I, { children: e }), ve = "_visuallyHidden_1gevf_1", ge = {
255
+ visuallyHidden: ve
244
256
  }, be = (e) => oe(e, xe), xe = (e, t) => $e(t), $e = (e) => e.startsWith("data-") || e.startsWith("aria-"), st = ({
245
257
  children: e,
246
258
  ...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 = {
259
+ }) => /* @__PURE__ */ a("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
260
  text: _e,
249
261
  standard: ye,
250
262
  bold: Ee,
@@ -254,7 +266,7 @@ const ue = $.hr`
254
266
  medium: Te,
255
267
  small: De,
256
268
  smaller: Oe
257
- }, x = f(
269
+ }, $ = p(
258
270
  ({
259
271
  children: e,
260
272
  variant: t = "standard",
@@ -265,18 +277,18 @@ const ue = $.hr`
265
277
  whiteSpace: c,
266
278
  wordBreak: i,
267
279
  style: u,
268
- ...a
269
- }, l) => /* @__PURE__ */ d(
280
+ ...d
281
+ }, l) => /* @__PURE__ */ a(
270
282
  "span",
271
283
  {
272
284
  className: D(y.text, y[t], y[n], r),
273
285
  ref: l,
274
286
  style: { color: o, userSelect: s, whiteSpace: c, wordBreak: i, ...u },
275
- ...a,
287
+ ...d,
276
288
  children: e
277
289
  }
278
290
  )
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 = {
291
+ ), ct = $, ut = (e) => /* @__PURE__ */ a($, { size: "small", ...e }), it = (e) => /* @__PURE__ */ a($, { size: "smaller", ...e }), at = (e) => /* @__PURE__ */ a($, { size: "medium", ...e }), dt = (e) => /* @__PURE__ */ a($, { 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
292
  heading: Me,
281
293
  h1: ke,
282
294
  h2: Le,
@@ -284,7 +296,7 @@ const ue = $.hr`
284
296
  h4: He,
285
297
  h5: Re,
286
298
  h6: Fe
287
- }, je = f(
299
+ }, je = p(
288
300
  ({
289
301
  variant: e = "h3",
290
302
  className: t,
@@ -295,41 +307,41 @@ const ue = $.hr`
295
307
  children: c,
296
308
  as: i,
297
309
  ...u
298
- }, a) => {
310
+ }, d) => {
299
311
  const l = i != null ? i : e;
300
- return /* @__PURE__ */ d(
312
+ return /* @__PURE__ */ a(
301
313
  l,
302
314
  {
303
315
  className: D(S.heading, S[e], t),
304
316
  style: { color: n, whiteSpace: r, wordBreak: o, ...s },
305
- ref: a,
317
+ ref: d,
306
318
  ...u,
307
319
  children: c
308
320
  }
309
321
  );
310
322
  }
311
- ), lt = (e) => /* @__PURE__ */ d(je, { variant: "h2", ...e }), Ne = (e, t) => e === t, mt = (e, t, n = Ne) => {
323
+ ), lt = (e) => /* @__PURE__ */ a(je, { variant: "h2", ...e }), Ne = (e, t) => e === t, mt = (e, t, n = Ne) => {
312
324
  const r = h(
313
325
  (u) => {
314
- e.some((a) => n(a, u)) || t([...e, u]);
326
+ e.some((d) => n(d, u)) || t([...e, u]);
315
327
  },
316
328
  [e, t, n]
317
329
  ), o = h(
318
330
  (u) => {
319
331
  t(
320
- u.reduce((a, l) => a.some((g) => n(g, l)) ? a : [...a, l], e)
332
+ u.reduce((d, l) => d.some((g) => n(g, l)) ? d : [...d, l], e)
321
333
  );
322
334
  },
323
335
  [e, t, n]
324
336
  ), s = h(
325
337
  (u) => {
326
- const a = e.findIndex((l) => n(l, u));
327
- a >= 0 && t(e.filter((l, g) => g !== a));
338
+ const d = e.findIndex((l) => n(l, u));
339
+ d >= 0 && t(e.filter((l, g) => g !== d));
328
340
  },
329
341
  [e, t, n]
330
342
  ), c = h(
331
343
  (u) => {
332
- t(e.filter((a) => !u.some((l) => n(l, a))));
344
+ t(e.filter((d) => !u.some((l) => n(l, d))));
333
345
  },
334
346
  [e, t, n]
335
347
  ), i = h(
@@ -346,7 +358,7 @@ const ue = $.hr`
346
358
  toggle: i
347
359
  };
348
360
  }, E = (e) => {
349
- const [t, n] = p(e), r = h(() => {
361
+ const [t, n] = w(e), r = h(() => {
350
362
  n(!0);
351
363
  }, [n]), o = h(() => {
352
364
  n(!1);
@@ -355,7 +367,7 @@ const ue = $.hr`
355
367
  }, [n]);
356
368
  return [t, r, o, s];
357
369
  }, ht = (e, t) => {
358
- const [n, r] = p(e);
370
+ const [n, r] = w(e);
359
371
  return m(() => {
360
372
  const o = setTimeout(() => {
361
373
  r(e);
@@ -364,8 +376,8 @@ const ue = $.hr`
364
376
  clearTimeout(o);
365
377
  };
366
378
  }, [e, t]), n;
367
- }, ft = (e, t) => {
368
- const [n, r] = p(e);
379
+ }, pt = (e, t) => {
380
+ const [n, r] = w(e);
369
381
  return m(() => {
370
382
  e && r(!0);
371
383
  const o = setTimeout(() => {
@@ -377,11 +389,11 @@ const ue = $.hr`
377
389
  }, [e, t]), n;
378
390
  };
379
391
  let Pe = 0;
380
- const C = (e) => `webui-${e ? e + "-" : ""}${++Pe}`, pt = (e) => {
381
- const [t, n] = p(() => C(e));
392
+ const C = (e) => `webui-${e ? e + "-" : ""}${++Pe}`, wt = (e) => {
393
+ const [t, n] = w(() => C(e));
382
394
  return m(() => n(C(e)), [e]), t;
383
- }, w = (e, t, n) => {
384
- const r = v();
395
+ }, v = (e, t, n) => {
396
+ const r = f();
385
397
  m(() => {
386
398
  r.current = n;
387
399
  }, [n]), m(() => {
@@ -398,25 +410,25 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Pe}`, pt = (e) => {
398
410
  c && c.removeEventListener(t, s);
399
411
  };
400
412
  }, [t, e]);
401
- }, vt = (e) => {
413
+ }, ft = (e) => {
402
414
  const [t, n, r] = E(!1);
403
415
  m(() => {
404
416
  document.activeElement === ce.findDOMNode(e.current) ? n() : r();
405
- }, [e, r, n]), w(e, "focus", n), w(e, "blur", r);
417
+ }, [e, r, n]), v(e, "focus", n), v(e, "blur", r);
406
418
  const o = h(() => {
407
419
  e.current && e.current.focus();
408
420
  }, [e]), s = h(() => {
409
421
  e.current && e.current.blur();
410
422
  }, [e]);
411
423
  return { isInFocus: t, focus: o, blur: s };
412
- }, wt = (e) => {
424
+ }, vt = (e) => {
413
425
  const [t, n, r] = E(!1);
414
- return w(e, "mouseover", n), w(e, "mouseout", r), t;
426
+ return v(e, "mouseover", n), v(e, "mouseout", r), t;
415
427
  }, gt = (e) => {
416
428
  const [t, n, r] = E(!1);
417
- return w(e, "mouseenter", n), w(e, "mouseleave", r), t;
429
+ return v(e, "mouseenter", n), v(e, "mouseleave", r), t;
418
430
  }, bt = (e, t) => {
419
- const n = v(() => {
431
+ const n = f(() => {
420
432
  });
421
433
  m(() => {
422
434
  n.current = t;
@@ -429,7 +441,7 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Pe}`, pt = (e) => {
429
441
  };
430
442
  }, [...e]);
431
443
  }, xt = (e, t, n) => {
432
- const r = v(() => {
444
+ const r = f(() => {
433
445
  });
434
446
  m(() => {
435
447
  r.current = t;
@@ -442,7 +454,7 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Pe}`, pt = (e) => {
442
454
  };
443
455
  }, [e, n]);
444
456
  }, T = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], $t = (e, t) => {
445
- const n = v(() => {
457
+ const n = f(() => {
446
458
  });
447
459
  m(() => {
448
460
  n.current = e;
@@ -455,7 +467,7 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Pe}`, pt = (e) => {
455
467
  };
456
468
  }, [t]);
457
469
  }, _t = (e, t) => {
458
- const [n, r] = p(!1), { rootMargin: o, root: s, threshold: c } = t || {}, i = H(() => new IntersectionObserver(
470
+ const [n, r] = w(!1), { rootMargin: o, root: s, threshold: c } = t || {}, i = H(() => new IntersectionObserver(
459
471
  ([u]) => r(u.isIntersecting),
460
472
  {
461
473
  rootMargin: o,
@@ -467,12 +479,12 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Pe}`, pt = (e) => {
467
479
  i.disconnect();
468
480
  }), [i, e]), n;
469
481
  }, yt = (e) => {
470
- const t = v(null);
482
+ const t = f(null);
471
483
  return m(() => {
472
484
  !e || (typeof e == "function" ? e(t.current) : e.current = t.current);
473
485
  }), t;
474
486
  }, Et = (e, t, n = !0) => {
475
- const [r, o] = p(e), s = v(), c = h(
487
+ const [r, o] = w(e), s = f(), c = h(
476
488
  (i, u = t) => {
477
489
  o(i), n && clearTimeout(s.current), s.current = setTimeout(() => o(e), u);
478
490
  },
@@ -497,13 +509,13 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++Pe}`, pt = (e) => {
497
509
  }
498
510
  };
499
511
  export {
500
- b as Box,
512
+ x as Box,
501
513
  Xe as Clickable,
502
514
  Ye as Column,
503
515
  lt as HeaderText,
504
516
  je as Heading,
505
517
  tt as Indent,
506
- at as LargeText,
518
+ dt as LargeText,
507
519
  ot as Nest,
508
520
  Ze as ResizeAwareBox,
509
521
  et as Row,
@@ -513,10 +525,10 @@ export {
513
525
  it as SmallerText,
514
526
  rt as Space,
515
527
  nt as Spacing,
516
- dt as StandardText,
517
- x as Text,
528
+ at as StandardText,
529
+ $ as Text,
518
530
  ct as Txt,
519
- _ as booleanOrNumberToNumber,
531
+ b as booleanOrNumberToNumber,
520
532
  St as exhaustSwitchCase,
521
533
  It as exhaustSwitchCaseElseThrow,
522
534
  be as getDataProps,
@@ -527,14 +539,14 @@ export {
527
539
  mt as useArraySet,
528
540
  E as useBoolean,
529
541
  ht as useDebounce,
530
- ft as useDelayedFalse,
531
- pt as useDomId,
532
- pe as useElementDimensions,
533
- vt as useElementFocus,
534
- w as useEventListener,
542
+ pt as useDelayedFalse,
543
+ wt as useDomId,
544
+ we as useElementDimensions,
545
+ ft as useElementFocus,
546
+ v as useEventListener,
535
547
  yt as useForwardedRef,
536
548
  gt as useMouseIsEntered,
537
- wt as useMouseIsOver,
549
+ vt as useMouseIsOver,
538
550
  bt as useMultiOnClickOutside,
539
551
  xt as useOnClickOutside,
540
552
  $t as useOnNoMouseMovement,
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/components/decorators/separatorline/SeparatorLine.tsx","../src/components/interaction/Clickable.tsx","../src/utils/BooleanOrNumberToNumber.ts","../src/components/layout/box/Box.tsx","../src/components/layout/column/Column.tsx","../src/hooks/UseElementDimensions.ts","../src/components/layout/box/ResizeAwareBox.tsx","../src/components/layout/row/Row.tsx","../src/components/layout/indent/Indent.tsx","../src/components/layout/spacing/Spacing.tsx","../src/components/layout/space/Space.tsx","../src/components/util/Nest.tsx","../src/utils/PropsForwarder.ts","../src/components/accessibility/ScreenReaderOnlyText.tsx","../src/components/text/Text.tsx","../src/components/deprecated-text/SmallText.tsx","../src/components/deprecated-text/SmallerText.tsx","../src/components/deprecated-text/StandardText.tsx","../src/components/deprecated-text/LargeText.tsx","../src/components/heading/Heading.tsx","../src/components/deprecated-text/HeaderText.tsx","../src/hooks/UseArraySet.ts","../src/hooks/UseBoolean.ts","../src/hooks/UseDebounce.ts","../src/hooks/UseDelayedFalse.ts","../src/hooks/UseDomId.ts","../src/hooks/UseEventListener.ts","../src/hooks/UseElementFocus.ts","../src/hooks/UseMouseIsOver.ts","../src/hooks/UseMouseIsEntered.ts","../src/hooks/UseMultiOnClickOutside.ts","../src/hooks/UseOnClickOutside.ts","../src/hooks/UseOnNoMouseInput.ts","../src/hooks/UseOnScreen.ts","../src/hooks/UseForwardedRef.ts","../src/hooks/UseTimeoutState.ts","../src/utils/SwitchCaseExhauster.ts","../src/utils/TruthyKeysAsList.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\ninterface SeparatorLineComponentProps {\n color: string;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nconst SeparatorLineComponent = styled.hr<SeparatorLineComponentProps>`\n display: flex;\n border: 0;\n margin: 0;\n flex: none;\n background-color: ${(props) => props.color};\n height: ${(props) =>\n props.vertical ? props.size || \"100%\" : props.width || \"1px\"};\n width: ${(props) =>\n props.vertical ? props.width || \"1px\" : props.size || \"100%\"};\n`;\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = cssColor(\"--lhds-color-ui-300\"),\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <SeparatorLineComponent\n aria-hidden={true}\n color={color}\n size={size}\n width={width}\n vertical={vertical}\n ref={ref}\n />\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\nimport { CSSProperties, forwardRef, MouseEventHandler } from \"react\";\nimport { ButtonElementProps } from \"../../types/ElementProps\";\n\nexport interface ClickableProps extends ButtonElementProps {\n /** Callback function called when clicking on click area. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /** Callback function called when double clicking on click area. */\n onDblClick?: MouseEventHandler<HTMLButtonElement>;\n /** Adds a title to the click area. */\n tooltip?: string;\n /** If set, there is no opacity applies when clicking on the click area. */\n disableOpacityOnClick?: boolean;\n /** Mouse does not turn into pointer when hovering over click area. */\n disablePointer?: boolean;\n /** When set, click area receives opacity when mouse hovers over it. */\n opacityOnHover?: boolean;\n /** Custom style on div with click event. */\n style?: CSSProperties;\n /** Disables shadow when element is focused. */\n disableFocusHighlight?: boolean;\n /** Disables the HTML button element. */\n disabled?: boolean;\n /**\n * Sets the background of the box.\n */\n background?: string;\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: string;\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: string;\n /**\n * The width.\n */\n width?: string;\n /**\n * The height.\n */\n height?: string;\n /**\n * Border radius\n */\n borderRadius?: string;\n}\n\ninterface ClickableElementProps {\n disableOpacityOnClick?: boolean;\n opacityOnHover?: boolean;\n disableFocusHighlight?: boolean;\n pointer?: boolean;\n background?: string;\n focusBackground?: string;\n hoverBackground?: string;\n width?: string;\n height?: string;\n borderRadius?: string;\n}\n\nconst ClickableElement = styled.button<ClickableElementProps>`\n display: inline-block;\n user-select: none;\n border: 0;\n padding: 0;\n background: ${({ background }) => background};\n ${({ pointer }) => (pointer ? \"cursor: pointer;\" : \"\")}\n\n :hover {\n ${(props) => (props.opacityOnHover ? \"opacity: 0.7;\" : \"\")};\n ${({ hoverBackground }) => `background: ${hoverBackground};`}\n }\n :active {\n ${({ disableOpacityOnClick }) =>\n !disableOpacityOnClick ? \"opacity: 0.5;\" : \"\"}\n }\n :focus {\n outline: 0;\n ${({ disableFocusHighlight }) =>\n disableFocusHighlight\n ? \"\"\n : \"box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);\"}\n ${({ focusBackground }) => `background: ${focusBackground};`}\n }\n ${({ width }) => (width ? `width: ${width};` : \"\")}\n ${({ height }) => (height ? `height: ${height};` : \"\")}\n ${({ borderRadius }) =>\n borderRadius ? `border-radius: ${borderRadius};` : \"\"}\n`;\n\nexport const Clickable = forwardRef<HTMLButtonElement, ClickableProps>(\n (\n {\n disableFocusHighlight,\n onClick,\n onDblClick,\n tooltip,\n disableOpacityOnClick,\n disablePointer,\n opacityOnHover,\n disabled,\n children,\n background = \"transparent\",\n hoverBackground,\n focusBackground,\n type = \"button\",\n ...restProps\n },\n ref\n ) => {\n const hasClickHandler = !!(onClick || onDblClick);\n\n return (\n <ClickableElement\n opacityOnHover={opacityOnHover}\n title={tooltip}\n disabled={disabled}\n disableOpacityOnClick={disableOpacityOnClick}\n onClick={onClick}\n onDoubleClick={onDblClick}\n disableFocusHighlight={disableFocusHighlight}\n pointer={hasClickHandler && !disablePointer}\n ref={ref}\n background={background}\n hoverBackground={hoverBackground}\n focusBackground={focusBackground}\n type={type}\n {...restProps}\n >\n {children}\n </ClickableElement>\n );\n }\n);\n","export const booleanOrNumberToNumber = (\n num: number | boolean | undefined\n): number => {\n if (num == null) {\n return 0;\n }\n if (typeof num === \"boolean\") {\n return num ? 1 : 0;\n }\n return num;\n};\n","import isPropValid from \"@emotion/is-prop-valid\";\nimport styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\n\nimport {\n background,\n BackgroundProps,\n border,\n borderBottom,\n BorderBottomProps,\n borderColor,\n borderLeft,\n BorderLeftProps,\n borderRadius,\n BorderRadiusProps,\n borderRight,\n BorderRightProps,\n borderStyle,\n BorderStyleProps,\n borderTop,\n BorderTopProps,\n borderWidth,\n BorderWidthProps,\n bottom,\n BottomProps,\n boxShadow,\n BoxShadowProps,\n flexbox,\n FlexboxProps,\n layout,\n LayoutProps,\n left,\n LeftProps,\n overflow,\n OverflowProps,\n position,\n PositionProps,\n ResponsiveValue,\n right,\n RightProps,\n system,\n TLengthStyledSystem,\n top,\n TopProps,\n zIndex,\n ZIndexProps,\n} from \"styled-system\";\nimport { DivProps } from \"../../../types/ElementProps\";\nimport { booleanOrNumberToNumber } from \"../../../utils/BooleanOrNumberToNumber\";\n\ninterface StyledSystemProps\n extends BorderRadiusProps,\n BorderStyleProps,\n BorderWidthProps,\n BorderLeftProps,\n BorderRightProps,\n BorderTopProps,\n BorderBottomProps,\n FlexboxProps,\n LayoutProps,\n OverflowProps,\n PositionProps,\n ZIndexProps,\n LeftProps,\n RightProps,\n TopProps,\n BottomProps {}\n\nconst shadows = {\n box: \"var(--swui-shadow-box)\",\n popover: \"var(--swui-shadow-popover)\",\n modal: \"var(--swui-shadow-modal)\",\n bottom: \"var(--swui-shadow-bottom)\",\n};\n\ntype ShadowType = keyof typeof shadows;\n\nexport interface BoxProps extends StyledSystemProps, DivProps {\n /**\n * If true, children are placed in a row.\n */\n row?: ResponsiveValue<boolean>;\n\n /**\n * Adds spacing over and under content.\n */\n spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing left and right of content.\n */\n indent?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing between children.\n */\n gap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds a shadow around the box.\n */\n shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;\n\n /**\n * Sets the background of the box.\n */\n background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;\n\n /**\n * Sets the border of the box.\n */\n border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;\n\n /**\n * Sets the border color of the box.\n */\n borderColor?: ResponsiveValue<Property.BorderColor>;\n\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when hovering with mouse.\n */\n hoverBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when the box is in focus.\n */\n focusBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when focus is within the box.\n */\n focusWithinBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when focus is within the box.\n */\n focusWithinBorder?: Property.Border<TLengthStyledSystem>;\n}\n\nconst excludedProps = [\n \"spacing\",\n \"indent\",\n \"gap\",\n \"width\",\n \"height\",\n \"overflow\",\n \"display\",\n];\n\nconst isExcludedWebUiProp = (propName: string) =>\n excludedProps.includes(propName);\n\nconst box = system({\n row: {\n property: \"flexDirection\",\n transform: (row: boolean) => (row ? \"row\" : \"column\"),\n },\n indent: {\n // @ts-ignore\n property: \"--current-indent\",\n transform: booleanOrNumberToNumber,\n },\n spacing: {\n // @ts-ignore\n property: \"--current-spacing\",\n transform: booleanOrNumberToNumber,\n },\n gap: {\n // @ts-ignore\n property: \"--current-gap\",\n transform: booleanOrNumberToNumber,\n },\n shadow: {\n property: \"boxShadow\",\n transform: (value) => shadows[value] ?? value,\n },\n});\n\ntype InnerProps = BoxProps & BoxShadowProps & BackgroundProps;\n\nexport const Box = styled(\"div\", {\n shouldForwardProp: (propName) =>\n typeof propName === \"string\"\n ? isExcludedWebUiProp(propName)\n ? false\n : isPropValid(propName)\n : false,\n})<InnerProps>`\n --current-spacing: 0;\n --current-indent: 0;\n --current-gap: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n ${box};\n ${background};\n ${border};\n ${borderRight};\n ${borderLeft};\n ${borderTop};\n ${borderBottom};\n ${borderColor};\n ${borderRadius};\n ${borderStyle};\n ${borderWidth};\n ${boxShadow};\n ${flexbox};\n ${overflow};\n ${position};\n ${layout};\n ${zIndex};\n ${left};\n ${right};\n ${top};\n ${bottom};\n\n gap: calc(var(--current-gap) * var(--swui-metrics-space));\n\n padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))\n calc(var(--current-indent) * var(--swui-metrics-indent));\n :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\n }\n :focus-within {\n ${({ focusWithinBackground }) =>\n focusWithinBackground ? `background: ${focusWithinBackground};` : \"\"}\n ${({ focusWithinBorder }) =>\n focusWithinBorder ? `border: ${focusWithinBorder};` : \"\"}\n }\n`;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Column = forwardRef<HTMLDivElement, BoxProps>(function Column(\n props,\n ref\n) {\n return <Box ref={ref} {...props} />;\n});\n","import { RefObject, useCallback, useLayoutEffect, useState } from \"react\";\n\nexport interface ElementDimensions {\n width: number;\n height: number;\n top: number;\n left: number;\n x: number;\n y: number;\n right: number;\n bottom: number;\n}\n\nexport const getDimensionObject = (node: HTMLElement): ElementDimensions => {\n const { x, y, width, height, bottom, top, left, right } =\n node.getBoundingClientRect();\n\n return {\n width,\n height,\n top,\n left,\n x,\n y,\n right,\n bottom,\n };\n};\n\nconst isEqualDimensions = (\n a: ElementDimensions,\n b: ElementDimensions\n): boolean =>\n a.x === b.x &&\n a.y === b.y &&\n a.width === b.width &&\n a.height === b.height &&\n a.bottom === b.bottom &&\n a.top === b.top &&\n a.left === b.left &&\n a.right === b.right;\n\nexport const useElementDimensions = (\n ref: RefObject<HTMLElement>,\n onResizeElement?: (dimensions: ElementDimensions) => void\n) => {\n const [dimensions, setDimensions] = useState<ElementDimensions | undefined>();\n\n const updateDimensions = useCallback(() => {\n window.requestAnimationFrame(() => {\n if (ref.current) {\n const newDimensions = getDimensionObject(ref.current);\n if (!dimensions || !isEqualDimensions(dimensions, newDimensions)) {\n if (onResizeElement) {\n onResizeElement(newDimensions);\n }\n }\n setDimensions(newDimensions);\n }\n });\n }, [ref, dimensions, setDimensions, onResizeElement]);\n\n useLayoutEffect(() => {\n updateDimensions();\n }, [updateDimensions]);\n\n return {\n dimensions,\n };\n};\n","import * as React from \"react\";\nimport { forwardRef, RefObject, useRef } from \"react\";\nimport { Box, BoxProps } from \"./Box\";\nimport {\n ElementDimensions,\n useElementDimensions,\n} from \"../../../hooks/UseElementDimensions\";\n\nexport interface ResizeAwareBoxProps extends BoxProps {\n onResize?: (dimensions: ElementDimensions) => void;\n}\n\nexport const ResizeAwareBox = forwardRef<HTMLDivElement, ResizeAwareBoxProps>(\n function ResizeAwareBox({ onResize, ...boxProps }, ref) {\n const localRef = useRef<HTMLDivElement>(null);\n const currentRef = (ref as RefObject<HTMLDivElement>) ?? localRef;\n useElementDimensions(currentRef, onResize);\n\n return <Box {...boxProps} ref={ref} />;\n }\n);\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Row = forwardRef<HTMLDivElement, BoxProps>(function Row(\n props,\n ref\n) {\n return <Box row ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface IndentProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Indent = forwardRef<HTMLDivElement, IndentProps>(function Indent(\n { num = 1, ...props },\n ref\n) {\n return <Box indent={num} ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface SpacingProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Spacing = forwardRef<HTMLDivElement, SpacingProps>(\n function Spacing({ num = 1, ...props }, ref) {\n return <Box spacing={num} ref={ref} {...props} />;\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\n\nexport interface SpaceProps {\n half?: boolean;\n horizontal?: boolean;\n num?: number;\n vertical?: boolean;\n}\n\nconst InnerSpace = styled.div`\n --current-size: 1;\n flex: none;\n width: calc(var(--current-size) * var(--swui-metrics-space));\n height: calc(var(--current-size) * var(--swui-metrics-space));\n`;\n\nexport const Space: React.VFC<SpaceProps> = ({\n half = false,\n horizontal = false,\n num = 1,\n vertical = false,\n}) => {\n const size = num * (half ? 0.5 : 1);\n\n return (\n <InnerSpace\n style={{\n [\"--current-size\" as string]: size,\n height: horizontal ? 1 : undefined,\n width: vertical ? 1 : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\n\ninterface Props {\n nest?: boolean;\n render: (children: ReactNode) => ReactNode;\n children?: ReactNode;\n}\n\nexport const Nest: React.FC<Props> = ({ children, nest, render }) => {\n if (nest) {\n return <>{render(children)}</>;\n }\n return <>{children}</>;\n};\n","import { pickBy } from \"lodash\";\n\nexport const getDataProps = <T extends Record<string, unknown>>(\n props: Record<string, unknown> | {}\n): T => pickBy(props, isDataPropMapper) as T;\n\nconst isDataPropMapper = (_: unknown, key: string): boolean => isDataProp(key);\n\nconst isDataProp = <TProp extends string>(propName: TProp): boolean =>\n propName.startsWith(\"data-\") || propName.startsWith(\"aria-\");\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./ScreenReaderOnlyText.module.css\";\nimport { getDataProps } from \"../../utils/PropsForwarder\";\n\nexport interface ScreenReaderOnlyTextProps {\n children?: ReactNode;\n}\n\nexport const ScreenReaderOnlyText: React.FC<ScreenReaderOnlyTextProps> = ({\n children,\n ...props\n}) => {\n return (\n <span className={styles.visuallyHidden} {...getDataProps(props)}>\n {children}\n </span>\n );\n};\n","import * as React from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Text.module.css\";\nimport { SpanProps } from \"../../types/ElementProps\";\nimport { Property } from \"csstype\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps extends SpanProps {\n variant?: TextVariant;\n size?: TextSize;\n userSelect?: Property.UserSelect;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n color?: string;\n}\n\nexport type TextVariant = \"standard\" | \"caption\" | \"overline\" | \"bold\";\nexport type TextSize = \"large\" | \"medium\" | \"small\" | \"smaller\";\n\nexport const Text = forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n children,\n variant = \"standard\",\n size = \"medium\",\n className,\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n style,\n ...spanProps\n },\n ref\n ) => {\n return (\n <span\n className={cx(styles.text, styles[variant], styles[size], className)}\n ref={ref}\n style={{ color, userSelect, whiteSpace, wordBreak, ...style }}\n {...spanProps}\n >\n {children}\n </span>\n );\n }\n);\n\nexport const Txt = Text;\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"small\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallerText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"smaller\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const StandardText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"medium\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const LargeText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"large\"} {...props} />;\n};\n","import cx from \"classnames\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { H1Props } from \"../../types/ElementProps\";\nimport styles from \"./Heading.module.css\";\n\nexport interface HeadingProps extends H1Props {\n variant?: HeadingVariant;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n as?: HeadingVariant;\n}\n\nexport type HeadingVariant = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\n (\n {\n variant = \"h3\",\n className,\n color,\n whiteSpace,\n wordBreak,\n style,\n children,\n as,\n ...hProps\n },\n ref\n ) => {\n const Element = as ?? variant;\n return (\n <Element\n className={cx(styles.heading, styles[variant], className)}\n style={{ color, whiteSpace, wordBreak, ...style }}\n ref={ref}\n {...hProps}\n >\n {children}\n </Element>\n );\n }\n);\n","import * as React from \"react\";\nimport { Heading, HeadingProps } from \"../heading/Heading\";\n\n/**\n * @deprecated Please use `Heading` instead.\n */\nexport const HeaderText: React.FC<Omit<HeadingProps, \"variant\">> = (props) => {\n return <Heading variant={\"h2\"} {...props} />;\n};\n","import { useCallback } from \"react\";\n\ntype ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;\n\nconst defaultComparator = <T>(a: T, b: T) => a === b;\n\nexport const useArraySet = <T>(\n list: Array<T>,\n setList: (list: Array<T>) => void,\n comparator: ArrayItemEqualsComparator<T> = defaultComparator\n) => {\n const add = useCallback(\n (item: T) => {\n if (!list.some((l) => comparator(l, item))) {\n setList([...list, item]);\n }\n },\n [list, setList, comparator]\n );\n\n const addMultiple = useCallback(\n (items: Array<T>) => {\n setList(\n items.reduce((list, item) => {\n if (!list.some((l) => comparator(l, item))) {\n return [...list, item];\n }\n return list;\n }, list)\n );\n },\n [list, setList, comparator]\n );\n\n const remove = useCallback(\n (item: T) => {\n const index = list.findIndex((l) => comparator(l, item));\n if (index >= 0) {\n setList(list.filter((_, i) => i !== index));\n }\n },\n [list, setList, comparator]\n );\n\n const removeMultiple = useCallback(\n (items: Array<T>) => {\n setList(list.filter((item) => !items.some((l) => comparator(l, item))));\n },\n [list, setList, comparator]\n );\n\n const toggle = useCallback(\n (item: T) => {\n const found = list.some((l) => comparator(l, item));\n if (found) {\n remove(item);\n } else {\n add(item);\n }\n },\n [list, add, remove, comparator]\n );\n\n return {\n add,\n addMultiple,\n remove,\n removeMultiple,\n toggle,\n };\n};\n","import { useCallback, useState } from \"react\";\n\ntype Value = boolean;\ntype SetTrue = () => void;\ntype SetFalse = () => void;\ntype ToggleValue = () => void;\ntype BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];\n\nexport const useBoolean = (initialValue: Value): BooleanHook => {\n const [value, setValue] = useState(initialValue);\n\n const setTrue = useCallback(() => {\n setValue(true);\n }, [setValue]);\n\n const setFalse = useCallback(() => {\n setValue(false);\n }, [setValue]);\n\n const toggle = useCallback(() => {\n setValue((v) => !v);\n }, [setValue]);\n\n return [value, setTrue, setFalse, toggle];\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]); // Only re-call effect if value or delay changes\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDelayedFalse = (value: boolean, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<boolean>(value);\n\n useEffect(() => {\n if (value) {\n setDebouncedValue(true);\n }\n\n const handler = setTimeout(() => {\n if (!value) {\n setDebouncedValue(value);\n }\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nlet id = 0;\nconst genId = (componentName?: string) =>\n `webui-${componentName ? componentName + \"-\" : \"\"}${++id}`;\n\n/** @deprecated use useId-hook from React 18 */\nexport const useDomId = (componentName?: string): string => {\n const [id, setId] = useState<string | null>(() => genId(componentName));\n useEffect(() => setId(genId(componentName)), [componentName]);\n return id!;\n};\n","import { RefObject, useEffect, useRef } from \"react\";\n\ntype EventHandler<TEventName extends keyof HTMLElementEventMap> = (\n event: HTMLElementEventMap[TEventName]\n) => void;\n\nexport const useEventListener = <TEventName extends keyof HTMLElementEventMap>(\n ref: RefObject<HTMLElement>,\n eventName: TEventName,\n handler: EventHandler<TEventName>\n) => {\n // Create a ref that stores handler\n const savedHandler = useRef<EventHandler<TEventName>>();\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Make sure element supports addEventListener\n const isSupported = ref.current && ref.current.addEventListener;\n if (!isSupported) return;\n\n // Create event listener that calls handler function stored in ref\n const eventListener: EventHandler<TEventName> = (event) => {\n if (savedHandler.current) {\n return savedHandler.current(event);\n }\n };\n\n // Add event listener\n if (!ref.current) {\n return;\n }\n\n const element = ref.current;\n element.addEventListener(eventName, eventListener);\n\n // Remove event listener on cleanup\n return () => {\n if (element) {\n element.removeEventListener(eventName, eventListener);\n }\n };\n }, [eventName, ref]); // Re-run if eventName or element changes\n};\n","import { RefObject, useCallback, useEffect } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useElementFocus = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [isInFocus, setIsInFocus, setIsNotInFocus] = useBoolean(false);\n\n useEffect(() => {\n if (document.activeElement === ReactDOM.findDOMNode(ref.current)) {\n setIsInFocus();\n } else {\n setIsNotInFocus();\n }\n }, [ref, setIsNotInFocus, setIsInFocus]);\n\n useEventListener(ref, \"focus\", setIsInFocus);\n useEventListener(ref, \"blur\", setIsNotInFocus);\n\n const focus = useCallback(() => {\n if (ref.current) {\n ref.current.focus();\n }\n }, [ref]);\n\n const blur = useCallback(() => {\n if (ref.current) {\n ref.current.blur();\n }\n }, [ref]);\n\n return { isInFocus, focus, blur };\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsOver = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsOver, setMouseIsOver, setMouseIsNotOver] = useBoolean(false);\n\n useEventListener(ref, \"mouseover\", setMouseIsOver);\n useEventListener(ref, \"mouseout\", setMouseIsNotOver);\n\n return mouseIsOver;\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsEntered = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsEntered, setMouseIsEntered, setMouseIsNotEntered] =\n useBoolean(false);\n\n useEventListener(ref, \"mouseenter\", setMouseIsEntered);\n useEventListener(ref, \"mouseleave\", setMouseIsNotEntered);\n\n return mouseIsEntered;\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useMultiOnClickOutside = (\n refs: Array<React.RefObject<any>>,\n handler: (event: TouchEvent | MouseEvent) => void\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n\n const allNotContains = refs\n .filter((ref) => ref.current)\n .every((ref) => {\n return ref.current && !ref.current.contains(event.target);\n });\n\n if (!allNotContains) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...refs]);\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnClickOutside = (\n ref: React.RefObject<any>,\n handler: (event: TouchEvent | MouseEvent) => void,\n options?: AddEventListenerOptions\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener, options);\n document.addEventListener(\"touchstart\", listener, options);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener, options);\n document.removeEventListener(\"touchstart\", listener, options);\n };\n }, [ref, options]);\n};\n","import { debounce } from \"lodash\";\nimport { useEffect, useRef } from \"react\";\n\nconst events = [\"mousemove\", \"mousedown\", \"keydown\", \"touchstart\", \"scroll\"];\n\nexport const useOnNoMouseMovement = (callback: () => void, delay: number) => {\n const eventHandler = useRef<(event: Event) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const onIdleChange = debounce(eventHandler.current, delay);\n events.forEach((event) => window.addEventListener(event, onIdleChange));\n\n return () => {\n events.forEach((event) =>\n window.removeEventListener(event, onIdleChange)\n );\n };\n }, [delay]);\n};\n","import { RefObject, useEffect, useMemo, useState } from \"react\";\n\nexport const useOnScreen = (\n ref: RefObject<Element>,\n options?: IntersectionObserverInit\n) => {\n const [isVisible, setIsVisible] = useState(false);\n\n const { rootMargin, root, threshold } = options || {};\n\n const observer = useMemo(() => {\n return new IntersectionObserver(\n ([entry]) => setIsVisible(entry.isIntersecting),\n {\n rootMargin,\n root,\n threshold,\n }\n );\n }, [setIsVisible, rootMargin, root, threshold]);\n\n useEffect(() => {\n if (ref.current) {\n observer.observe(ref.current);\n }\n return () => {\n observer.disconnect();\n };\n }, [observer, ref]);\n\n return isVisible;\n};\n","import {\n MutableRefObject,\n RefCallback,\n RefObject,\n useEffect,\n useRef,\n} from \"react\";\n\nexport const useForwardedRef = <T>(\n ref: RefCallback<T> | MutableRefObject<T> | null\n): RefObject<NonNullable<T>> => {\n const innerRef = useRef<T>(null) as MutableRefObject<NonNullable<T>>;\n\n useEffect(() => {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(innerRef.current);\n } else {\n ref.current = innerRef.current;\n }\n });\n\n return innerRef;\n};\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const useTimeoutState = <S>(\n initialValue: S,\n defaultTimeout: number,\n clearTimeoutOnSetValue = true\n): [S, (v: S) => void] => {\n const [value, setValue] = useState<S>(initialValue);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const wrappedSetter = useCallback(\n (newValue: S, timeout = defaultTimeout) => {\n setValue(newValue);\n if (clearTimeoutOnSetValue) {\n clearTimeout(timeoutRef.current!);\n }\n timeoutRef.current = setTimeout(() => setValue(initialValue), timeout);\n },\n [defaultTimeout, clearTimeoutOnSetValue, initialValue]\n );\n\n useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current!);\n };\n }, []);\n\n return [value, wrappedSetter];\n};\n","export const exhaustSwitchCaseElseThrow = (arg: never) => {\n throw new Error(`Switch unhandled case: ${arg}`);\n};\n\nexport const exhaustSwitchCase = <T>(_arg: never, fallback: T) => {\n return fallback;\n};\n","export const truthyKeysAsList = (r: Record<string, boolean>): Array<string> =>\n Object.keys(r).filter((key) => r[key]);\n","export const parseFloatElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseFloat(s);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n\nexport const parseIntElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseInt(s, 10);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n"],"names":["SeparatorLineComponent","styled","props","SeparatorLine","forwardRef","color","cssColor","size","width","vertical","ref","jsx","ClickableElement","background","pointer","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","opacityOnHover","disabled","children","type","restProps","booleanOrNumberToNumber","num","shadows","excludedProps","isExcludedWebUiProp","propName","box","system","row","value","_a","Box","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","bottom","hoverBorder","focusBorder","focusWithinBackground","focusWithinBorder","Column","getDimensionObject","node","x","y","isEqualDimensions","a","b","useElementDimensions","onResizeElement","dimensions","setDimensions","useState","updateDimensions","useCallback","newDimensions","useLayoutEffect","ResizeAwareBox","onResize","boxProps","localRef","useRef","currentRef","Row","Indent","Spacing","InnerSpace","Space","half","horizontal","Nest","nest","render","Fragment","getDataProps","pickBy","isDataPropMapper","_","key","isDataProp","ScreenReaderOnlyText","styles","Text","variant","className","userSelect","whiteSpace","wordBreak","style","spanProps","cx","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","HeaderText","defaultComparator","useArraySet","list","setList","comparator","add","item","l","addMultiple","items","remove","index","i","removeMultiple","toggle","useBoolean","initialValue","setValue","setTrue","setFalse","v","useDebounce","delay","debouncedValue","setDebouncedValue","useEffect","handler","useDelayedFalse","id","genId","componentName","useDomId","setId","useEventListener","eventName","savedHandler","eventListener","event","element","useElementFocus","isInFocus","setIsInFocus","setIsNotInFocus","ReactDOM","focus","blur","useMouseIsOver","mouseIsOver","setMouseIsOver","setMouseIsNotOver","useMouseIsEntered","mouseIsEntered","setMouseIsEntered","setMouseIsNotEntered","useMultiOnClickOutside","refs","eventHandler","listener","useOnClickOutside","options","events","useOnNoMouseMovement","callback","onIdleChange","debounce","useOnScreen","isVisible","setIsVisible","rootMargin","root","threshold","observer","useMemo","entry","useForwardedRef","innerRef","useTimeoutState","defaultTimeout","clearTimeoutOnSetValue","timeoutRef","wrappedSetter","newValue","timeout","exhaustSwitchCaseElseThrow","arg","exhaustSwitchCase","_arg","fallback","truthyKeysAsList","r","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":";;;;;;;;;AAoBA,MAAMA,KAAyBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKhB,CAACC,MAAUA,EAAM;AAAA,YAC3B,CAACA,MACTA,EAAM,WAAWA,EAAM,QAAQ,SAASA,EAAM,SAAS;AAAA,WAChD,CAACA,MACRA,EAAM,WAAWA,EAAM,SAAS,QAAQA,EAAM,QAAQ;AAAA,GAG7CC,KAAgBC;AAAA,EAC3B,CACE;AAAA,IACE,OAAAC,IAAQC,EAAS,qBAAqB;AAAA,IACtC,MAAAC,IAAO;AAAA,IACP,OAAAC,IAAQ;AAAA,IACR,UAAAC,IAAW;AAAA,KAEbC,MAGE,gBAAAC;AAAA,IAACX;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,OAAAK;AAAA,MACA,MAAAE;AAAA,MACA,OAAAC;AAAA,MACA,UAAAC;AAAA,MACA,KAAAC;AAAA,IAAA;AAAA,EAAA;AAIR,GCUME,KAAmBX,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKhB,CAAC,EAAE,YAAAY,EAAiB,MAAAA;AAAA,IAChC,CAAC,EAAE,SAAAC,EAAQ,MAAOA,IA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aC,KAAoB,CAAIC,GAAaC,MACzCA,GCLIC,KAAmB,CAACC,MAC/B,OAAO,KAAKA,CAAC,EAAE,OAAO,CAAChH,MAAQgH,EAAEhH,EAAI,GCD1BiH,KAA0B,CAACC,MAAkC;AACpE,MAAA;AACI,UAAAC,IAAI,WAAWD,CAAC;AAItB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA;EACI;AAEf,GAEaC,KAAwB,CAACF,MAAkC;AAClE,MAAA;AACI,UAAAC,IAAI,SAASD,GAAG,EAAE;AAIxB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA;EACI;AAEf;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/components/decorators/separatorline/SeparatorLine.tsx","../src/components/interaction/Clickable.tsx","../src/utils/BooleanOrNumberToNumber.ts","../src/components/layout/box/Box.tsx","../src/components/layout/column/Column.tsx","../src/hooks/UseElementDimensions.ts","../src/components/layout/box/ResizeAwareBox.tsx","../src/components/layout/row/Row.tsx","../src/components/layout/indent/Indent.tsx","../src/components/layout/spacing/Spacing.tsx","../src/components/layout/space/Space.tsx","../src/components/util/Nest.tsx","../src/utils/PropsForwarder.ts","../src/components/accessibility/ScreenReaderOnlyText.tsx","../src/components/text/Text.tsx","../src/components/deprecated-text/SmallText.tsx","../src/components/deprecated-text/SmallerText.tsx","../src/components/deprecated-text/StandardText.tsx","../src/components/deprecated-text/LargeText.tsx","../src/components/heading/Heading.tsx","../src/components/deprecated-text/HeaderText.tsx","../src/hooks/UseArraySet.ts","../src/hooks/UseBoolean.ts","../src/hooks/UseDebounce.ts","../src/hooks/UseDelayedFalse.ts","../src/hooks/UseDomId.ts","../src/hooks/UseEventListener.ts","../src/hooks/UseElementFocus.ts","../src/hooks/UseMouseIsOver.ts","../src/hooks/UseMouseIsEntered.ts","../src/hooks/UseMultiOnClickOutside.ts","../src/hooks/UseOnClickOutside.ts","../src/hooks/UseOnNoMouseInput.ts","../src/hooks/UseOnScreen.ts","../src/hooks/UseForwardedRef.ts","../src/hooks/UseTimeoutState.ts","../src/utils/SwitchCaseExhauster.ts","../src/utils/TruthyKeysAsList.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\ninterface SeparatorLineComponentProps {\n color: string;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nconst SeparatorLineComponent = styled.hr<SeparatorLineComponentProps>`\n display: flex;\n border: 0;\n margin: 0;\n flex: none;\n background-color: ${(props) => props.color};\n height: ${(props) =>\n props.vertical ? props.size || \"100%\" : props.width || \"1px\"};\n width: ${(props) =>\n props.vertical ? props.width || \"1px\" : props.size || \"100%\"};\n`;\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = cssColor(\"--lhds-color-ui-300\"),\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <SeparatorLineComponent\n aria-hidden={true}\n color={color}\n size={size}\n width={width}\n vertical={vertical}\n ref={ref}\n />\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\nimport { CSSProperties, forwardRef, MouseEventHandler } from \"react\";\nimport { ButtonElementProps } from \"../../types/ElementProps\";\n\nexport interface ClickableProps extends ButtonElementProps {\n /** Callback function called when clicking on click area. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /** Callback function called when double clicking on click area. */\n onDblClick?: MouseEventHandler<HTMLButtonElement>;\n /** Adds a title to the click area. */\n tooltip?: string;\n /** If set, there is no opacity applies when clicking on the click area. */\n disableOpacityOnClick?: boolean;\n /** Mouse does not turn into pointer when hovering over click area. */\n disablePointer?: boolean;\n /** When set, click area receives opacity when mouse hovers over it. */\n opacityOnHover?: boolean;\n /** Custom style on div with click event. */\n style?: CSSProperties;\n /** Disables shadow when element is focused. */\n disableFocusHighlight?: boolean;\n /** Disables the HTML button element. */\n disabled?: boolean;\n /**\n * Sets the background of the box.\n */\n background?: string;\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: string;\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: string;\n /**\n * The width.\n */\n width?: string;\n /**\n * The height.\n */\n height?: string;\n /**\n * Border radius\n */\n borderRadius?: string;\n}\n\ninterface ClickableElementProps {\n disableOpacityOnClick?: boolean;\n opacityOnHover?: boolean;\n disableFocusHighlight?: boolean;\n pointer?: boolean;\n background?: string;\n focusBackground?: string;\n hoverBackground?: string;\n width?: string;\n height?: string;\n borderRadius?: string;\n}\n\nconst ClickableElement = styled.button<ClickableElementProps>`\n display: inline-block;\n user-select: none;\n border: 0;\n padding: 0;\n background: ${({ background }) => background};\n ${({ pointer }) => (pointer ? \"cursor: pointer;\" : \"\")}\n\n :hover {\n ${(props) => (props.opacityOnHover ? \"opacity: 0.7;\" : \"\")};\n ${({ hoverBackground }) => `background: ${hoverBackground};`}\n }\n :active {\n ${({ disableOpacityOnClick }) =>\n !disableOpacityOnClick ? \"opacity: 0.5;\" : \"\"}\n }\n :focus {\n outline: 0;\n ${({ disableFocusHighlight }) =>\n disableFocusHighlight\n ? \"\"\n : \"box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);\"}\n ${({ focusBackground }) => `background: ${focusBackground};`}\n }\n ${({ width }) => (width ? `width: ${width};` : \"\")}\n ${({ height }) => (height ? `height: ${height};` : \"\")}\n ${({ borderRadius }) =>\n borderRadius ? `border-radius: ${borderRadius};` : \"\"}\n`;\n\nexport const Clickable = forwardRef<HTMLButtonElement, ClickableProps>(\n (\n {\n disableFocusHighlight,\n onClick,\n onDblClick,\n tooltip,\n disableOpacityOnClick,\n disablePointer,\n opacityOnHover,\n disabled,\n children,\n background = \"transparent\",\n hoverBackground,\n focusBackground,\n type = \"button\",\n ...restProps\n },\n ref\n ) => {\n const hasClickHandler = !!(onClick || onDblClick);\n\n return (\n <ClickableElement\n opacityOnHover={opacityOnHover}\n title={tooltip}\n disabled={disabled}\n disableOpacityOnClick={disableOpacityOnClick}\n onClick={onClick}\n onDoubleClick={onDblClick}\n disableFocusHighlight={disableFocusHighlight}\n pointer={hasClickHandler && !disablePointer}\n ref={ref}\n background={background}\n hoverBackground={hoverBackground}\n focusBackground={focusBackground}\n type={type}\n {...restProps}\n >\n {children}\n </ClickableElement>\n );\n }\n);\n","export const booleanOrNumberToNumber = (\n num: number | boolean | undefined\n): number => {\n if (num == null) {\n return 0;\n }\n if (typeof num === \"boolean\") {\n return num ? 1 : 0;\n }\n return num;\n};\n","import isPropValid from \"@emotion/is-prop-valid\";\nimport styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\n\nimport {\n background,\n BackgroundProps,\n border,\n borderBottom,\n BorderBottomProps,\n borderColor,\n borderLeft,\n BorderLeftProps,\n borderRadius,\n BorderRadiusProps,\n borderRight,\n BorderRightProps,\n borderStyle,\n BorderStyleProps,\n borderTop,\n BorderTopProps,\n borderWidth,\n BorderWidthProps,\n bottom,\n BottomProps,\n boxShadow,\n BoxShadowProps,\n flexbox,\n FlexboxProps,\n layout,\n LayoutProps,\n left,\n LeftProps,\n overflow,\n OverflowProps,\n position,\n PositionProps,\n ResponsiveValue,\n right,\n RightProps,\n system,\n TLengthStyledSystem,\n top,\n TopProps,\n zIndex,\n ZIndexProps,\n} from \"styled-system\";\nimport { DivProps } from \"../../../types/ElementProps\";\nimport { booleanOrNumberToNumber } from \"../../../utils/BooleanOrNumberToNumber\";\n\ninterface StyledSystemProps\n extends BorderRadiusProps,\n BorderStyleProps,\n BorderWidthProps,\n BorderLeftProps,\n BorderRightProps,\n BorderTopProps,\n BorderBottomProps,\n FlexboxProps,\n LayoutProps,\n OverflowProps,\n PositionProps,\n ZIndexProps,\n LeftProps,\n RightProps,\n TopProps,\n BottomProps {}\n\nconst shadows = {\n box: \"var(--swui-shadow-box)\",\n popover: \"var(--swui-shadow-popover)\",\n modal: \"var(--swui-shadow-modal)\",\n bottom: \"var(--swui-shadow-bottom)\",\n};\n\ntype ShadowType = keyof typeof shadows;\n\nexport interface BoxProps extends StyledSystemProps, DivProps {\n /**\n * If true, children are placed in a row.\n */\n row?: ResponsiveValue<boolean>;\n\n /**\n * Adds spacing over and under content.\n */\n spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing left and right of content.\n */\n indent?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing between children.\n */\n gap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between columns.\n */\n columnGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between rows.\n */\n rowGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds a shadow around the box.\n */\n shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;\n\n /**\n * Sets the background of the box.\n */\n background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;\n\n /**\n * Sets the border of the box.\n */\n border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;\n\n /**\n * Sets the border color of the box.\n */\n borderColor?: ResponsiveValue<Property.BorderColor>;\n\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when hovering with mouse.\n */\n hoverBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when the box is in focus.\n */\n focusBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when focus is within the box.\n */\n focusWithinBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when focus is within the box.\n */\n focusWithinBorder?: Property.Border<TLengthStyledSystem>;\n}\n\nconst excludedProps = [\n \"spacing\",\n \"indent\",\n \"gap\",\n \"width\",\n \"height\",\n \"overflow\",\n \"display\",\n];\n\nconst isExcludedWebUiProp = (propName: string) =>\n excludedProps.includes(propName);\n\nconst box = system({\n row: {\n property: \"flexDirection\",\n transform: (row: boolean) => (row ? \"row\" : \"column\"),\n },\n indent: {\n // @ts-ignore\n property: \"--current-indent\",\n transform: booleanOrNumberToNumber,\n },\n spacing: {\n // @ts-ignore\n property: \"--current-spacing\",\n transform: booleanOrNumberToNumber,\n },\n gap: {\n // @ts-ignore\n property: \"--current-gap\",\n transform: booleanOrNumberToNumber,\n },\n columnGap: {\n // @ts-ignore\n property: \"--current-column-gap\",\n transform: booleanOrNumberToNumber,\n },\n rowGap: {\n // @ts-ignore\n property: \"--current-row-gap\",\n transform: booleanOrNumberToNumber,\n },\n shadow: {\n property: \"boxShadow\",\n transform: (value) => shadows[value] ?? value,\n },\n});\n\ntype InnerProps = BoxProps & BoxShadowProps & BackgroundProps;\n\nexport const Box = styled(\"div\", {\n shouldForwardProp: (propName) =>\n typeof propName === \"string\"\n ? isExcludedWebUiProp(propName)\n ? false\n : isPropValid(propName)\n : false,\n})<InnerProps>`\n --current-spacing: 0;\n --current-indent: 0;\n --current-gap: 0;\n --current-column-gap: 0;\n --current-row-gap: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n ${box};\n ${background};\n ${border};\n ${borderRight};\n ${borderLeft};\n ${borderTop};\n ${borderBottom};\n ${borderColor};\n ${borderRadius};\n ${borderStyle};\n ${borderWidth};\n ${boxShadow};\n ${flexbox};\n ${overflow};\n ${position};\n ${layout};\n ${zIndex};\n ${left};\n ${right};\n ${top};\n ${bottom};\n\n gap: calc(var(--current-gap) * var(--swui-metrics-space));\n column-gap: calc(var(--current-column-gap) * var(--swui-metrics-space));\n row-gap: calc(var(--current-row-gap) * var(--swui-metrics-space));\n\n padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))\n calc(var(--current-indent) * var(--swui-metrics-indent));\n :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\n }\n :focus-within {\n ${({ focusWithinBackground }) =>\n focusWithinBackground ? `background: ${focusWithinBackground};` : \"\"}\n ${({ focusWithinBorder }) =>\n focusWithinBorder ? `border: ${focusWithinBorder};` : \"\"}\n }\n`;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Column = forwardRef<HTMLDivElement, BoxProps>(function Column(\n props,\n ref\n) {\n return <Box ref={ref} {...props} />;\n});\n","import { RefObject, useCallback, useLayoutEffect, useState } from \"react\";\n\nexport interface ElementDimensions {\n width: number;\n height: number;\n top: number;\n left: number;\n x: number;\n y: number;\n right: number;\n bottom: number;\n}\n\nexport const getDimensionObject = (node: HTMLElement): ElementDimensions => {\n const { x, y, width, height, bottom, top, left, right } =\n node.getBoundingClientRect();\n\n return {\n width,\n height,\n top,\n left,\n x,\n y,\n right,\n bottom,\n };\n};\n\nconst isEqualDimensions = (\n a: ElementDimensions,\n b: ElementDimensions\n): boolean =>\n a.x === b.x &&\n a.y === b.y &&\n a.width === b.width &&\n a.height === b.height &&\n a.bottom === b.bottom &&\n a.top === b.top &&\n a.left === b.left &&\n a.right === b.right;\n\nexport const useElementDimensions = (\n ref: RefObject<HTMLElement>,\n onResizeElement?: (dimensions: ElementDimensions) => void\n) => {\n const [dimensions, setDimensions] = useState<ElementDimensions | undefined>();\n\n const updateDimensions = useCallback(() => {\n window.requestAnimationFrame(() => {\n if (ref.current) {\n const newDimensions = getDimensionObject(ref.current);\n if (!dimensions || !isEqualDimensions(dimensions, newDimensions)) {\n if (onResizeElement) {\n onResizeElement(newDimensions);\n }\n }\n setDimensions(newDimensions);\n }\n });\n }, [ref, dimensions, setDimensions, onResizeElement]);\n\n useLayoutEffect(() => {\n updateDimensions();\n }, [updateDimensions]);\n\n return {\n dimensions,\n };\n};\n","import * as React from \"react\";\nimport { forwardRef, RefObject, useRef } from \"react\";\nimport { Box, BoxProps } from \"./Box\";\nimport {\n ElementDimensions,\n useElementDimensions,\n} from \"../../../hooks/UseElementDimensions\";\n\nexport interface ResizeAwareBoxProps extends BoxProps {\n onResize?: (dimensions: ElementDimensions) => void;\n}\n\nexport const ResizeAwareBox = forwardRef<HTMLDivElement, ResizeAwareBoxProps>(\n function ResizeAwareBox({ onResize, ...boxProps }, ref) {\n const localRef = useRef<HTMLDivElement>(null);\n const currentRef = (ref as RefObject<HTMLDivElement>) ?? localRef;\n useElementDimensions(currentRef, onResize);\n\n return <Box {...boxProps} ref={ref} />;\n }\n);\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Row = forwardRef<HTMLDivElement, BoxProps>(function Row(\n props,\n ref\n) {\n return <Box row ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface IndentProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Indent = forwardRef<HTMLDivElement, IndentProps>(function Indent(\n { num = 1, ...props },\n ref\n) {\n return <Box indent={num} ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface SpacingProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Spacing = forwardRef<HTMLDivElement, SpacingProps>(\n function Spacing({ num = 1, ...props }, ref) {\n return <Box spacing={num} ref={ref} {...props} />;\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\n\nexport interface SpaceProps {\n half?: boolean;\n horizontal?: boolean;\n num?: number;\n vertical?: boolean;\n}\n\nconst InnerSpace = styled.div`\n --current-size: 1;\n flex: none;\n width: calc(var(--current-size) * var(--swui-metrics-space));\n height: calc(var(--current-size) * var(--swui-metrics-space));\n`;\n\nexport const Space: React.VFC<SpaceProps> = ({\n half = false,\n horizontal = false,\n num = 1,\n vertical = false,\n}) => {\n const size = num * (half ? 0.5 : 1);\n\n return (\n <InnerSpace\n style={{\n [\"--current-size\" as string]: size,\n height: horizontal ? 1 : undefined,\n width: vertical ? 1 : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\n\ninterface Props {\n nest?: boolean;\n render: (children: ReactNode) => ReactNode;\n children?: ReactNode;\n}\n\nexport const Nest: React.FC<Props> = ({ children, nest, render }) => {\n if (nest) {\n return <>{render(children)}</>;\n }\n return <>{children}</>;\n};\n","import { pickBy } from \"lodash\";\n\nexport const getDataProps = <T extends Record<string, unknown>>(\n props: Record<string, unknown> | {}\n): T => pickBy(props, isDataPropMapper) as T;\n\nconst isDataPropMapper = (_: unknown, key: string): boolean => isDataProp(key);\n\nconst isDataProp = <TProp extends string>(propName: TProp): boolean =>\n propName.startsWith(\"data-\") || propName.startsWith(\"aria-\");\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./ScreenReaderOnlyText.module.css\";\nimport { getDataProps } from \"../../utils/PropsForwarder\";\n\nexport interface ScreenReaderOnlyTextProps {\n children?: ReactNode;\n}\n\nexport const ScreenReaderOnlyText: React.FC<ScreenReaderOnlyTextProps> = ({\n children,\n ...props\n}) => {\n return (\n <span className={styles.visuallyHidden} {...getDataProps(props)}>\n {children}\n </span>\n );\n};\n","import * as React from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Text.module.css\";\nimport { SpanProps } from \"../../types/ElementProps\";\nimport { Property } from \"csstype\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps extends SpanProps {\n variant?: TextVariant;\n size?: TextSize;\n userSelect?: Property.UserSelect;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n color?: string;\n}\n\nexport type TextVariant = \"standard\" | \"caption\" | \"overline\" | \"bold\";\nexport type TextSize = \"large\" | \"medium\" | \"small\" | \"smaller\";\n\nexport const Text = forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n children,\n variant = \"standard\",\n size = \"medium\",\n className,\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n style,\n ...spanProps\n },\n ref\n ) => {\n return (\n <span\n className={cx(styles.text, styles[variant], styles[size], className)}\n ref={ref}\n style={{ color, userSelect, whiteSpace, wordBreak, ...style }}\n {...spanProps}\n >\n {children}\n </span>\n );\n }\n);\n\nexport const Txt = Text;\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"small\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallerText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"smaller\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const StandardText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"medium\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const LargeText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"large\"} {...props} />;\n};\n","import cx from \"classnames\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { H1Props } from \"../../types/ElementProps\";\nimport styles from \"./Heading.module.css\";\n\nexport interface HeadingProps extends H1Props {\n variant?: HeadingVariant;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n as?: HeadingVariant;\n}\n\nexport type HeadingVariant = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\n (\n {\n variant = \"h3\",\n className,\n color,\n whiteSpace,\n wordBreak,\n style,\n children,\n as,\n ...hProps\n },\n ref\n ) => {\n const Element = as ?? variant;\n return (\n <Element\n className={cx(styles.heading, styles[variant], className)}\n style={{ color, whiteSpace, wordBreak, ...style }}\n ref={ref}\n {...hProps}\n >\n {children}\n </Element>\n );\n }\n);\n","import * as React from \"react\";\nimport { Heading, HeadingProps } from \"../heading/Heading\";\n\n/**\n * @deprecated Please use `Heading` instead.\n */\nexport const HeaderText: React.FC<Omit<HeadingProps, \"variant\">> = (props) => {\n return <Heading variant={\"h2\"} {...props} />;\n};\n","import { useCallback } from \"react\";\n\ntype ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;\n\nconst defaultComparator = <T>(a: T, b: T) => a === b;\n\nexport const useArraySet = <T>(\n list: Array<T>,\n setList: (list: Array<T>) => void,\n comparator: ArrayItemEqualsComparator<T> = defaultComparator\n) => {\n const add = useCallback(\n (item: T) => {\n if (!list.some((l) => comparator(l, item))) {\n setList([...list, item]);\n }\n },\n [list, setList, comparator]\n );\n\n const addMultiple = useCallback(\n (items: Array<T>) => {\n setList(\n items.reduce((list, item) => {\n if (!list.some((l) => comparator(l, item))) {\n return [...list, item];\n }\n return list;\n }, list)\n );\n },\n [list, setList, comparator]\n );\n\n const remove = useCallback(\n (item: T) => {\n const index = list.findIndex((l) => comparator(l, item));\n if (index >= 0) {\n setList(list.filter((_, i) => i !== index));\n }\n },\n [list, setList, comparator]\n );\n\n const removeMultiple = useCallback(\n (items: Array<T>) => {\n setList(list.filter((item) => !items.some((l) => comparator(l, item))));\n },\n [list, setList, comparator]\n );\n\n const toggle = useCallback(\n (item: T) => {\n const found = list.some((l) => comparator(l, item));\n if (found) {\n remove(item);\n } else {\n add(item);\n }\n },\n [list, add, remove, comparator]\n );\n\n return {\n add,\n addMultiple,\n remove,\n removeMultiple,\n toggle,\n };\n};\n","import { useCallback, useState } from \"react\";\n\ntype Value = boolean;\ntype SetTrue = () => void;\ntype SetFalse = () => void;\ntype ToggleValue = () => void;\ntype BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];\n\nexport const useBoolean = (initialValue: Value): BooleanHook => {\n const [value, setValue] = useState(initialValue);\n\n const setTrue = useCallback(() => {\n setValue(true);\n }, [setValue]);\n\n const setFalse = useCallback(() => {\n setValue(false);\n }, [setValue]);\n\n const toggle = useCallback(() => {\n setValue((v) => !v);\n }, [setValue]);\n\n return [value, setTrue, setFalse, toggle];\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]); // Only re-call effect if value or delay changes\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDelayedFalse = (value: boolean, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<boolean>(value);\n\n useEffect(() => {\n if (value) {\n setDebouncedValue(true);\n }\n\n const handler = setTimeout(() => {\n if (!value) {\n setDebouncedValue(value);\n }\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nlet id = 0;\nconst genId = (componentName?: string) =>\n `webui-${componentName ? componentName + \"-\" : \"\"}${++id}`;\n\n/** @deprecated use useId-hook from React 18 */\nexport const useDomId = (componentName?: string): string => {\n const [id, setId] = useState<string | null>(() => genId(componentName));\n useEffect(() => setId(genId(componentName)), [componentName]);\n return id!;\n};\n","import { RefObject, useEffect, useRef } from \"react\";\n\ntype EventHandler<TEventName extends keyof HTMLElementEventMap> = (\n event: HTMLElementEventMap[TEventName]\n) => void;\n\nexport const useEventListener = <TEventName extends keyof HTMLElementEventMap>(\n ref: RefObject<HTMLElement>,\n eventName: TEventName,\n handler: EventHandler<TEventName>\n) => {\n // Create a ref that stores handler\n const savedHandler = useRef<EventHandler<TEventName>>();\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Make sure element supports addEventListener\n const isSupported = ref.current && ref.current.addEventListener;\n if (!isSupported) return;\n\n // Create event listener that calls handler function stored in ref\n const eventListener: EventHandler<TEventName> = (event) => {\n if (savedHandler.current) {\n return savedHandler.current(event);\n }\n };\n\n // Add event listener\n if (!ref.current) {\n return;\n }\n\n const element = ref.current;\n element.addEventListener(eventName, eventListener);\n\n // Remove event listener on cleanup\n return () => {\n if (element) {\n element.removeEventListener(eventName, eventListener);\n }\n };\n }, [eventName, ref]); // Re-run if eventName or element changes\n};\n","import { RefObject, useCallback, useEffect } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useElementFocus = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [isInFocus, setIsInFocus, setIsNotInFocus] = useBoolean(false);\n\n useEffect(() => {\n if (document.activeElement === ReactDOM.findDOMNode(ref.current)) {\n setIsInFocus();\n } else {\n setIsNotInFocus();\n }\n }, [ref, setIsNotInFocus, setIsInFocus]);\n\n useEventListener(ref, \"focus\", setIsInFocus);\n useEventListener(ref, \"blur\", setIsNotInFocus);\n\n const focus = useCallback(() => {\n if (ref.current) {\n ref.current.focus();\n }\n }, [ref]);\n\n const blur = useCallback(() => {\n if (ref.current) {\n ref.current.blur();\n }\n }, [ref]);\n\n return { isInFocus, focus, blur };\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsOver = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsOver, setMouseIsOver, setMouseIsNotOver] = useBoolean(false);\n\n useEventListener(ref, \"mouseover\", setMouseIsOver);\n useEventListener(ref, \"mouseout\", setMouseIsNotOver);\n\n return mouseIsOver;\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsEntered = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsEntered, setMouseIsEntered, setMouseIsNotEntered] =\n useBoolean(false);\n\n useEventListener(ref, \"mouseenter\", setMouseIsEntered);\n useEventListener(ref, \"mouseleave\", setMouseIsNotEntered);\n\n return mouseIsEntered;\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useMultiOnClickOutside = (\n refs: Array<React.RefObject<any>>,\n handler: (event: TouchEvent | MouseEvent) => void\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n\n const allNotContains = refs\n .filter((ref) => ref.current)\n .every((ref) => {\n return ref.current && !ref.current.contains(event.target);\n });\n\n if (!allNotContains) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...refs]);\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnClickOutside = (\n ref: React.RefObject<any>,\n handler: (event: TouchEvent | MouseEvent) => void,\n options?: AddEventListenerOptions\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener, options);\n document.addEventListener(\"touchstart\", listener, options);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener, options);\n document.removeEventListener(\"touchstart\", listener, options);\n };\n }, [ref, options]);\n};\n","import { debounce } from \"lodash\";\nimport { useEffect, useRef } from \"react\";\n\nconst events = [\"mousemove\", \"mousedown\", \"keydown\", \"touchstart\", \"scroll\"];\n\nexport const useOnNoMouseMovement = (callback: () => void, delay: number) => {\n const eventHandler = useRef<(event: Event) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const onIdleChange = debounce(eventHandler.current, delay);\n events.forEach((event) => window.addEventListener(event, onIdleChange));\n\n return () => {\n events.forEach((event) =>\n window.removeEventListener(event, onIdleChange)\n );\n };\n }, [delay]);\n};\n","import { RefObject, useEffect, useMemo, useState } from \"react\";\n\nexport const useOnScreen = (\n ref: RefObject<Element>,\n options?: IntersectionObserverInit\n) => {\n const [isVisible, setIsVisible] = useState(false);\n\n const { rootMargin, root, threshold } = options || {};\n\n const observer = useMemo(() => {\n return new IntersectionObserver(\n ([entry]) => setIsVisible(entry.isIntersecting),\n {\n rootMargin,\n root,\n threshold,\n }\n );\n }, [setIsVisible, rootMargin, root, threshold]);\n\n useEffect(() => {\n if (ref.current) {\n observer.observe(ref.current);\n }\n return () => {\n observer.disconnect();\n };\n }, [observer, ref]);\n\n return isVisible;\n};\n","import {\n MutableRefObject,\n RefCallback,\n RefObject,\n useEffect,\n useRef,\n} from \"react\";\n\nexport const useForwardedRef = <T>(\n ref: RefCallback<T> | MutableRefObject<T> | null\n): RefObject<NonNullable<T>> => {\n const innerRef = useRef<T>(null) as MutableRefObject<NonNullable<T>>;\n\n useEffect(() => {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(innerRef.current);\n } else {\n ref.current = innerRef.current;\n }\n });\n\n return innerRef;\n};\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const useTimeoutState = <S>(\n initialValue: S,\n defaultTimeout: number,\n clearTimeoutOnSetValue = true\n): [S, (v: S) => void] => {\n const [value, setValue] = useState<S>(initialValue);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const wrappedSetter = useCallback(\n (newValue: S, timeout = defaultTimeout) => {\n setValue(newValue);\n if (clearTimeoutOnSetValue) {\n clearTimeout(timeoutRef.current!);\n }\n timeoutRef.current = setTimeout(() => setValue(initialValue), timeout);\n },\n [defaultTimeout, clearTimeoutOnSetValue, initialValue]\n );\n\n useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current!);\n };\n }, []);\n\n return [value, wrappedSetter];\n};\n","export const exhaustSwitchCaseElseThrow = (arg: never) => {\n throw new Error(`Switch unhandled case: ${arg}`);\n};\n\nexport const exhaustSwitchCase = <T>(_arg: never, fallback: T) => {\n return fallback;\n};\n","export const truthyKeysAsList = (r: Record<string, boolean>): Array<string> =>\n Object.keys(r).filter((key) => r[key]);\n","export const parseFloatElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseFloat(s);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n\nexport const parseIntElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseInt(s, 10);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n"],"names":["SeparatorLineComponent","styled","props","SeparatorLine","forwardRef","color","cssColor","size","width","vertical","ref","jsx","ClickableElement","background","pointer","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","opacityOnHover","disabled","children","type","restProps","booleanOrNumberToNumber","num","shadows","excludedProps","isExcludedWebUiProp","propName","box","system","row","value","_a","Box","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","bottom","hoverBorder","focusBorder","focusWithinBackground","focusWithinBorder","Column","getDimensionObject","node","x","y","isEqualDimensions","a","b","useElementDimensions","onResizeElement","dimensions","setDimensions","useState","updateDimensions","useCallback","newDimensions","useLayoutEffect","ResizeAwareBox","onResize","boxProps","localRef","useRef","currentRef","Row","Indent","Spacing","InnerSpace","Space","half","horizontal","Nest","nest","render","Fragment","getDataProps","pickBy","isDataPropMapper","_","key","isDataProp","ScreenReaderOnlyText","styles","Text","variant","className","userSelect","whiteSpace","wordBreak","style","spanProps","cx","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","HeaderText","defaultComparator","useArraySet","list","setList","comparator","add","item","l","addMultiple","items","remove","index","i","removeMultiple","toggle","useBoolean","initialValue","setValue","setTrue","setFalse","v","useDebounce","delay","debouncedValue","setDebouncedValue","useEffect","handler","useDelayedFalse","id","genId","componentName","useDomId","setId","useEventListener","eventName","savedHandler","eventListener","event","element","useElementFocus","isInFocus","setIsInFocus","setIsNotInFocus","ReactDOM","focus","blur","useMouseIsOver","mouseIsOver","setMouseIsOver","setMouseIsNotOver","useMouseIsEntered","mouseIsEntered","setMouseIsEntered","setMouseIsNotEntered","useMultiOnClickOutside","refs","eventHandler","listener","useOnClickOutside","options","events","useOnNoMouseMovement","callback","onIdleChange","debounce","useOnScreen","isVisible","setIsVisible","rootMargin","root","threshold","observer","useMemo","entry","useForwardedRef","innerRef","useTimeoutState","defaultTimeout","clearTimeoutOnSetValue","timeoutRef","wrappedSetter","newValue","timeout","exhaustSwitchCaseElseThrow","arg","exhaustSwitchCase","_arg","fallback","truthyKeysAsList","r","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":";;;;;;;;;AAoBA,MAAMA,KAAyBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKhB,CAACC,MAAUA,EAAM;AAAA,YAC3B,CAACA,MACTA,EAAM,WAAWA,EAAM,QAAQ,SAASA,EAAM,SAAS;AAAA,WAChD,CAACA,MACRA,EAAM,WAAWA,EAAM,SAAS,QAAQA,EAAM,QAAQ;AAAA,GAG7CC,KAAgBC;AAAA,EAC3B,CACE;AAAA,IACE,OAAAC,IAAQC,EAAS,qBAAqB;AAAA,IACtC,MAAAC,IAAO;AAAA,IACP,OAAAC,IAAQ;AAAA,IACR,UAAAC,IAAW;AAAA,KAEbC,MAGE,gBAAAC;AAAA,IAACX;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,OAAAK;AAAA,MACA,MAAAE;AAAA,MACA,OAAAC;AAAA,MACA,UAAAC;AAAA,MACA,KAAAC;AAAA,IAAA;AAAA,EAAA;AAIR,GCUME,KAAmBX,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKhB,CAAC,EAAE,YAAAY,EAAiB,MAAAA;AAAA,IAChC,CAAC,EAAE,SAAAC,EAAQ,MAAOA,IAAU,qBAAqB;AAAA;AAAA;AAAA,MAG/C,CAACZ,MAAWA,EAAM,iBAAiB,kBAAkB;AAAA,MACrD,CAAC,EAAE,iBAAAa,EAAgB,MAAM,eAAeA;AAAA;AAAA;AAAA,MAGxC,CAAC,EAAE,uBAAAC,EACH,MAACA,IAA0C,KAAlB;AAAA;AAAA;AAAA;AAAA,MAIzB,CAAC,EAAE,uBAAAC,EAAsB,MACzBA,IACI,KACA;AAAA,MACJ,CAAC,EAAE,iBAAAC,EAAgB,MAAM,eAAeA;AAAA;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WAAWD,CAAC;AAItB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA;EACI;AAEf,GAEaC,KAAwB,CAACF,MAAkC;AAClE,MAAA;AACI,UAAAC,IAAI,SAASD,GAAG,EAAE;AAIxB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA;EACI;AAEf;"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
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
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const F=require("@stenajs-webui/theme"),d=require("react/jsx-runtime"),z=require("@emotion/styled"),r=require("react"),H=require("@emotion/is-prop-valid"),a=require("styled-system"),j=require("lodash"),N=require("classnames"),P=require("react-dom"),y=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function q(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=y(z),A=y(H),C=y(N),V=q(P),U=g.default.hr`
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const F=require("@stenajs-webui/theme"),d=require("react/jsx-runtime"),z=require("@emotion/styled"),s=require("react"),H=require("@emotion/is-prop-valid"),i=require("styled-system"),j=require("lodash"),N=require("classnames"),P=require("react-dom"),y=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function q(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=y(z),A=y(H),C=y(N),V=q(P),U=g.default.hr`
3
3
  display: flex;
4
4
  border: 0;
5
5
  margin: 0;
@@ -7,7 +7,7 @@
7
7
  background-color: ${e=>e.color};
8
8
  height: ${e=>e.vertical?e.size||"100%":e.width||"1px"};
9
9
  width: ${e=>e.vertical?e.width||"1px":e.size||"100%"};
10
- `,B=r.forwardRef(({color:e=F.cssColor("--lhds-color-ui-300"),size:t="100%",width:n="1px",vertical:s=!1},o)=>d.jsx(U,{"aria-hidden":!0,color:e,size:t,width:n,vertical:s,ref:o})),K=g.default.button`
10
+ `,B=s.forwardRef(({color:e=F.cssColor("--lhds-color-ui-300"),size:t="100%",width:n="1px",vertical:r=!1},o)=>d.jsx(U,{"aria-hidden":!0,color:e,size:t,width:n,vertical:r,ref:o})),G=g.default.button`
11
11
  display: inline-block;
12
12
  user-select: none;
13
13
  border: 0;
@@ -30,36 +30,40 @@
30
30
  ${({width:e})=>e?`width: ${e};`:""}
31
31
  ${({height:e})=>e?`height: ${e};`:""}
32
32
  ${({borderRadius:e})=>e?`border-radius: ${e};`:""}
33
- `,W=r.forwardRef(({disableFocusHighlight:e,onClick:t,onDblClick:n,tooltip:s,disableOpacityOnClick:o,disablePointer:u,opacityOnHover:c,disabled:l,children:i,background:f="transparent",hoverBackground:m,focusBackground:w,type:k="button",...D},M)=>{const L=!!(t||n);return d.jsx(K,{opacityOnHover:c,title:s,disabled:l,disableOpacityOnClick:o,onClick:t,onDoubleClick:n,disableFocusHighlight:e,pointer:L&&!u,ref:M,background:f,hoverBackground:m,focusBackground:w,type:k,...D,children:i})}),p=e=>e==null?0:typeof e=="boolean"?e?1:0:e,G={box:"var(--swui-shadow-box)",popover:"var(--swui-shadow-popover)",modal:"var(--swui-shadow-modal)",bottom:"var(--swui-shadow-bottom)"},J=["spacing","indent","gap","width","height","overflow","display"],Q=e=>J.includes(e),X=a.system({row:{property:"flexDirection",transform:e=>e?"row":"column"},indent:{property:"--current-indent",transform:p},spacing:{property:"--current-spacing",transform:p},gap:{property:"--current-gap",transform:p},shadow:{property:"boxShadow",transform:e=>{var t;return(t=G[e])!=null?t:e}}}),x=g.default("div",{shouldForwardProp:e=>typeof e=="string"?Q(e)?!1:A.default(e):!1})`
33
+ `,K=s.forwardRef(({disableFocusHighlight:e,onClick:t,onDblClick:n,tooltip:r,disableOpacityOnClick:o,disablePointer:u,opacityOnHover:c,disabled:l,children:a,background:f="transparent",hoverBackground:m,focusBackground:b,type:k="button",...D},M)=>{const L=!!(t||n);return d.jsx(G,{opacityOnHover:c,title:r,disabled:l,disableOpacityOnClick:o,onClick:t,onDoubleClick:n,disableFocusHighlight:e,pointer:L&&!u,ref:M,background:f,hoverBackground:m,focusBackground:b,type:k,...D,children:a})}),p=e=>e==null?0:typeof e=="boolean"?e?1:0:e,W={box:"var(--swui-shadow-box)",popover:"var(--swui-shadow-popover)",modal:"var(--swui-shadow-modal)",bottom:"var(--swui-shadow-bottom)"},J=["spacing","indent","gap","width","height","overflow","display"],Q=e=>J.includes(e),X=i.system({row:{property:"flexDirection",transform:e=>e?"row":"column"},indent:{property:"--current-indent",transform:p},spacing:{property:"--current-spacing",transform:p},gap:{property:"--current-gap",transform:p},columnGap:{property:"--current-column-gap",transform:p},rowGap:{property:"--current-row-gap",transform:p},shadow:{property:"boxShadow",transform:e=>{var t;return(t=W[e])!=null?t:e}}}),w=g.default("div",{shouldForwardProp:e=>typeof e=="string"?Q(e)?!1:A.default(e):!1})`
34
34
  --current-spacing: 0;
35
35
  --current-indent: 0;
36
36
  --current-gap: 0;
37
+ --current-column-gap: 0;
38
+ --current-row-gap: 0;
37
39
  box-sizing: border-box;
38
40
  display: flex;
39
41
  flex-direction: column;
40
42
  ${X};
41
- ${a.background};
42
- ${a.border};
43
- ${a.borderRight};
44
- ${a.borderLeft};
45
- ${a.borderTop};
46
- ${a.borderBottom};
47
- ${a.borderColor};
48
- ${a.borderRadius};
49
- ${a.borderStyle};
50
- ${a.borderWidth};
51
- ${a.boxShadow};
52
- ${a.flexbox};
53
- ${a.overflow};
54
- ${a.position};
55
- ${a.layout};
56
- ${a.zIndex};
57
- ${a.left};
58
- ${a.right};
59
- ${a.top};
60
- ${a.bottom};
43
+ ${i.background};
44
+ ${i.border};
45
+ ${i.borderRight};
46
+ ${i.borderLeft};
47
+ ${i.borderTop};
48
+ ${i.borderBottom};
49
+ ${i.borderColor};
50
+ ${i.borderRadius};
51
+ ${i.borderStyle};
52
+ ${i.borderWidth};
53
+ ${i.boxShadow};
54
+ ${i.flexbox};
55
+ ${i.overflow};
56
+ ${i.position};
57
+ ${i.layout};
58
+ ${i.zIndex};
59
+ ${i.left};
60
+ ${i.right};
61
+ ${i.top};
62
+ ${i.bottom};
61
63
 
62
64
  gap: calc(var(--current-gap) * var(--swui-metrics-space));
65
+ column-gap: calc(var(--current-column-gap) * var(--swui-metrics-space));
66
+ row-gap: calc(var(--current-row-gap) * var(--swui-metrics-space));
63
67
 
64
68
  padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))
65
69
  calc(var(--current-indent) * var(--swui-metrics-indent));
@@ -75,10 +79,10 @@
75
79
  ${({focusWithinBackground:e})=>e?`background: ${e};`:""}
76
80
  ${({focusWithinBorder:e})=>e?`border: ${e};`:""}
77
81
  }
78
- `,Y=r.forwardRef(function(t,n){return d.jsx(x,{ref:n,...t})}),O=e=>{const{x:t,y:n,width:s,height:o,bottom:u,top:c,left:l,right:i}=e.getBoundingClientRect();return{width:s,height:o,top:c,left:l,x:t,y:n,right:i,bottom:u}},Z=(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,R=(e,t)=>{const[n,s]=r.useState(),o=r.useCallback(()=>{window.requestAnimationFrame(()=>{if(e.current){const u=O(e.current);(!n||!Z(n,u))&&t&&t(u),s(u)}})},[e,n,s,t]);return r.useLayoutEffect(()=>{o()},[o]),{dimensions:n}},ee=r.forwardRef(function({onResize:t,...n},s){const o=r.useRef(null),u=s!=null?s:o;return R(u,t),d.jsx(x,{...n,ref:s})}),te=r.forwardRef(function(t,n){return d.jsx(x,{row:!0,ref:n,...t})}),ne=r.forwardRef(function({num:t=1,...n},s){return d.jsx(x,{indent:t,ref:s,...n})}),se=r.forwardRef(function({num:t=1,...n},s){return d.jsx(x,{spacing:t,ref:s,...n})}),re=g.default.div`
82
+ `,Y=s.forwardRef(function(t,n){return d.jsx(w,{ref:n,...t})}),O=e=>{const{x:t,y:n,width:r,height:o,bottom:u,top:c,left:l,right:a}=e.getBoundingClientRect();return{width:r,height:o,top:c,left:l,x:t,y:n,right:a,bottom:u}},Z=(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,R=(e,t)=>{const[n,r]=s.useState(),o=s.useCallback(()=>{window.requestAnimationFrame(()=>{if(e.current){const u=O(e.current);(!n||!Z(n,u))&&t&&t(u),r(u)}})},[e,n,r,t]);return s.useLayoutEffect(()=>{o()},[o]),{dimensions:n}},ee=s.forwardRef(function({onResize:t,...n},r){const o=s.useRef(null),u=r!=null?r:o;return R(u,t),d.jsx(w,{...n,ref:r})}),te=s.forwardRef(function(t,n){return d.jsx(w,{row:!0,ref:n,...t})}),ne=s.forwardRef(function({num:t=1,...n},r){return d.jsx(w,{indent:t,ref:r,...n})}),re=s.forwardRef(function({num:t=1,...n},r){return d.jsx(w,{spacing:t,ref:r,...n})}),se=g.default.div`
79
83
  --current-size: 1;
80
84
  flex: none;
81
85
  width: calc(var(--current-size) * var(--swui-metrics-space));
82
86
  height: calc(var(--current-size) * var(--swui-metrics-space));
83
- `,oe=({half:e=!1,horizontal:t=!1,num:n=1,vertical:s=!1})=>{const o=n*(e?.5:1);return d.jsx(re,{style:{["--current-size"]:o,height:t?1:void 0,width:s?1:void 0}})},ue=({children:e,nest:t,render:n})=>t?d.jsx(d.Fragment,{children:n(e)}):d.jsx(d.Fragment,{children:e}),ce="_visuallyHidden_1gevf_1",ie={visuallyHidden:ce},I=e=>j.pickBy(e,ae),ae=(e,t)=>de(t),de=e=>e.startsWith("data-")||e.startsWith("aria-"),le=({children:e,...t})=>d.jsx("span",{className:ie.visuallyHidden,...I(t),children:e}),fe="_text_1iisw_1",me="_standard_1iisw_24",he="_bold_1iisw_27",xe="_caption_1iisw_31",be="_overline_1iisw_39",we="_large_1iisw_48",pe="_medium_1iisw_53",ge="_small_1iisw_58",ve="_smaller_1iisw_63",_={text:fe,standard:me,bold:he,caption:xe,overline:be,large:we,medium:pe,small:ge,smaller:ve},b=r.forwardRef(({children:e,variant:t="standard",size:n="medium",className:s,color:o,userSelect:u,whiteSpace:c,wordBreak:l,style:i,...f},m)=>d.jsx("span",{className:C.default(_.text,_[t],_[n],s),ref:m,style:{color:o,userSelect:u,whiteSpace:c,wordBreak:l,...i},...f,children:e})),_e=b,ye=e=>d.jsx(b,{size:"small",...e}),$e=e=>d.jsx(b,{size:"smaller",...e}),Ee=e=>d.jsx(b,{size:"medium",...e}),Se=e=>d.jsx(b,{size:"large",...e}),je="_heading_xn9xj_1",Ce="_h1_xn9xj_15",Oe="_h2_xn9xj_19",Re="_h3_xn9xj_23",Ie="_h4_xn9xj_27",Te="_h5_xn9xj_31",ke="_h6_xn9xj_35",$={heading:je,h1:Ce,h2:Oe,h3:Re,h4:Ie,h5:Te,h6:ke},T=r.forwardRef(({variant:e="h3",className:t,color:n,whiteSpace:s,wordBreak:o,style:u,children:c,as:l,...i},f)=>{const m=l!=null?l:e;return d.jsx(m,{className:C.default($.heading,$[e],t),style:{color:n,whiteSpace:s,wordBreak:o,...u},ref:f,...i,children:c})}),De=e=>d.jsx(T,{variant:"h2",...e}),Me=(e,t)=>e===t,Le=(e,t,n=Me)=>{const s=r.useCallback(i=>{e.some(f=>n(f,i))||t([...e,i])},[e,t,n]),o=r.useCallback(i=>{t(i.reduce((f,m)=>f.some(w=>n(w,m))?f:[...f,m],e))},[e,t,n]),u=r.useCallback(i=>{const f=e.findIndex(m=>n(m,i));f>=0&&t(e.filter((m,w)=>w!==f))},[e,t,n]),c=r.useCallback(i=>{t(e.filter(f=>!i.some(m=>n(m,f))))},[e,t,n]),l=r.useCallback(i=>{e.some(m=>n(m,i))?u(i):s(i)},[e,s,u,n]);return{add:s,addMultiple:o,remove:u,removeMultiple:c,toggle:l}},v=e=>{const[t,n]=r.useState(e),s=r.useCallback(()=>{n(!0)},[n]),o=r.useCallback(()=>{n(!1)},[n]),u=r.useCallback(()=>{n(c=>!c)},[n]);return[t,s,o,u]},Fe=(e,t)=>{const[n,s]=r.useState(e);return r.useEffect(()=>{const o=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},ze=(e,t)=>{const[n,s]=r.useState(e);return r.useEffect(()=>{e&&s(!0);const o=setTimeout(()=>{e||s(e)},t);return()=>{clearTimeout(o)}},[e,t]),n};let He=0;const E=e=>`webui-${e?e+"-":""}${++He}`,Ne=e=>{const[t,n]=r.useState(()=>E(e));return r.useEffect(()=>n(E(e)),[e]),t},h=(e,t,n)=>{const s=r.useRef();r.useEffect(()=>{s.current=n},[n]),r.useEffect(()=>{if(!(e.current&&e.current.addEventListener))return;const u=l=>{if(s.current)return s.current(l)};if(!e.current)return;const c=e.current;return c.addEventListener(t,u),()=>{c&&c.removeEventListener(t,u)}},[t,e])},Pe=e=>{const[t,n,s]=v(!1);r.useEffect(()=>{document.activeElement===V.findDOMNode(e.current)?n():s()},[e,s,n]),h(e,"focus",n),h(e,"blur",s);const o=r.useCallback(()=>{e.current&&e.current.focus()},[e]),u=r.useCallback(()=>{e.current&&e.current.blur()},[e]);return{isInFocus:t,focus:o,blur:u}},qe=e=>{const[t,n,s]=v(!1);return h(e,"mouseover",n),h(e,"mouseout",s),t},Ae=e=>{const[t,n,s]=v(!1);return h(e,"mouseenter",n),h(e,"mouseleave",s),t},Ve=(e,t)=>{const n=r.useRef(()=>{});r.useEffect(()=>{n.current=t},[t]),r.useEffect(()=>{const s=o=>{!e.filter(c=>c.current).every(c=>c.current&&!c.current.contains(o.target))||n.current(o)};return document.addEventListener("mousedown",s),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("touchstart",s)}},[...e])},Ue=(e,t,n)=>{const s=r.useRef(()=>{});r.useEffect(()=>{s.current=t},[t]),r.useEffect(()=>{const o=u=>{!e.current||e.current.contains(u.target)||s.current(u)};return document.addEventListener("mousedown",o,n),document.addEventListener("touchstart",o,n),()=>{document.removeEventListener("mousedown",o,n),document.removeEventListener("touchstart",o,n)}},[e,n])},S=["mousemove","mousedown","keydown","touchstart","scroll"],Be=(e,t)=>{const n=r.useRef(()=>{});r.useEffect(()=>{n.current=e},[e]),r.useEffect(()=>{const s=j.debounce(n.current,t);return S.forEach(o=>window.addEventListener(o,s)),()=>{S.forEach(o=>window.removeEventListener(o,s))}},[t])},Ke=(e,t)=>{const[n,s]=r.useState(!1),{rootMargin:o,root:u,threshold:c}=t||{},l=r.useMemo(()=>new IntersectionObserver(([i])=>s(i.isIntersecting),{rootMargin:o,root:u,threshold:c}),[s,o,u,c]);return r.useEffect(()=>(e.current&&l.observe(e.current),()=>{l.disconnect()}),[l,e]),n},We=e=>{const t=r.useRef(null);return r.useEffect(()=>{!e||(typeof e=="function"?e(t.current):e.current=t.current)}),t},Ge=(e,t,n=!0)=>{const[s,o]=r.useState(e),u=r.useRef(),c=r.useCallback((l,i=t)=>{o(l),n&&clearTimeout(u.current),u.current=setTimeout(()=>o(e),i)},[t,n,e]);return r.useEffect(()=>()=>{clearTimeout(u.current)},[]),[s,c]},Je=e=>{throw new Error(`Switch unhandled case: ${e}`)},Qe=(e,t)=>t,Xe=e=>Object.keys(e).filter(t=>e[t]),Ye=e=>{try{const t=parseFloat(e);return isNaN(t)||t==null?void 0:t}catch{}},Ze=e=>{try{const t=parseInt(e,10);return isNaN(t)||t==null?void 0:t}catch{}};exports.Box=x;exports.Clickable=W;exports.Column=Y;exports.HeaderText=De;exports.Heading=T;exports.Indent=ne;exports.LargeText=Se;exports.Nest=ue;exports.ResizeAwareBox=ee;exports.Row=te;exports.ScreenReaderOnlyText=le;exports.SeparatorLine=B;exports.SmallText=ye;exports.SmallerText=$e;exports.Space=oe;exports.Spacing=se;exports.StandardText=Ee;exports.Text=b;exports.Txt=_e;exports.booleanOrNumberToNumber=p;exports.exhaustSwitchCase=Qe;exports.exhaustSwitchCaseElseThrow=Je;exports.getDataProps=I;exports.getDimensionObject=O;exports.parseFloatElseUndefined=Ye;exports.parseIntElseUndefined=Ze;exports.truthyKeysAsList=Xe;exports.useArraySet=Le;exports.useBoolean=v;exports.useDebounce=Fe;exports.useDelayedFalse=ze;exports.useDomId=Ne;exports.useElementDimensions=R;exports.useElementFocus=Pe;exports.useEventListener=h;exports.useForwardedRef=We;exports.useMouseIsEntered=Ae;exports.useMouseIsOver=qe;exports.useMultiOnClickOutside=Ve;exports.useOnClickOutside=Ue;exports.useOnNoMouseMovement=Be;exports.useOnScreen=Ke;exports.useTimeoutState=Ge;
87
+ `,oe=({half:e=!1,horizontal:t=!1,num:n=1,vertical:r=!1})=>{const o=n*(e?.5:1);return d.jsx(se,{style:{["--current-size"]:o,height:t?1:void 0,width:r?1:void 0}})},ue=({children:e,nest:t,render:n})=>t?d.jsx(d.Fragment,{children:n(e)}):d.jsx(d.Fragment,{children:e}),ce="_visuallyHidden_1gevf_1",ae={visuallyHidden:ce},I=e=>j.pickBy(e,ie),ie=(e,t)=>de(t),de=e=>e.startsWith("data-")||e.startsWith("aria-"),le=({children:e,...t})=>d.jsx("span",{className:ae.visuallyHidden,...I(t),children:e}),fe="_text_1iisw_1",me="_standard_1iisw_24",he="_bold_1iisw_27",pe="_caption_1iisw_31",we="_overline_1iisw_39",xe="_large_1iisw_48",be="_medium_1iisw_53",ge="_small_1iisw_58",ve="_smaller_1iisw_63",_={text:fe,standard:me,bold:he,caption:pe,overline:we,large:xe,medium:be,small:ge,smaller:ve},x=s.forwardRef(({children:e,variant:t="standard",size:n="medium",className:r,color:o,userSelect:u,whiteSpace:c,wordBreak:l,style:a,...f},m)=>d.jsx("span",{className:C.default(_.text,_[t],_[n],r),ref:m,style:{color:o,userSelect:u,whiteSpace:c,wordBreak:l,...a},...f,children:e})),_e=x,ye=e=>d.jsx(x,{size:"small",...e}),$e=e=>d.jsx(x,{size:"smaller",...e}),Ee=e=>d.jsx(x,{size:"medium",...e}),Se=e=>d.jsx(x,{size:"large",...e}),je="_heading_xn9xj_1",Ce="_h1_xn9xj_15",Oe="_h2_xn9xj_19",Re="_h3_xn9xj_23",Ie="_h4_xn9xj_27",Te="_h5_xn9xj_31",ke="_h6_xn9xj_35",$={heading:je,h1:Ce,h2:Oe,h3:Re,h4:Ie,h5:Te,h6:ke},T=s.forwardRef(({variant:e="h3",className:t,color:n,whiteSpace:r,wordBreak:o,style:u,children:c,as:l,...a},f)=>{const m=l!=null?l:e;return d.jsx(m,{className:C.default($.heading,$[e],t),style:{color:n,whiteSpace:r,wordBreak:o,...u},ref:f,...a,children:c})}),De=e=>d.jsx(T,{variant:"h2",...e}),Me=(e,t)=>e===t,Le=(e,t,n=Me)=>{const r=s.useCallback(a=>{e.some(f=>n(f,a))||t([...e,a])},[e,t,n]),o=s.useCallback(a=>{t(a.reduce((f,m)=>f.some(b=>n(b,m))?f:[...f,m],e))},[e,t,n]),u=s.useCallback(a=>{const f=e.findIndex(m=>n(m,a));f>=0&&t(e.filter((m,b)=>b!==f))},[e,t,n]),c=s.useCallback(a=>{t(e.filter(f=>!a.some(m=>n(m,f))))},[e,t,n]),l=s.useCallback(a=>{e.some(m=>n(m,a))?u(a):r(a)},[e,r,u,n]);return{add:r,addMultiple:o,remove:u,removeMultiple:c,toggle:l}},v=e=>{const[t,n]=s.useState(e),r=s.useCallback(()=>{n(!0)},[n]),o=s.useCallback(()=>{n(!1)},[n]),u=s.useCallback(()=>{n(c=>!c)},[n]);return[t,r,o,u]},Fe=(e,t)=>{const[n,r]=s.useState(e);return s.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},ze=(e,t)=>{const[n,r]=s.useState(e);return s.useEffect(()=>{e&&r(!0);const o=setTimeout(()=>{e||r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n};let He=0;const E=e=>`webui-${e?e+"-":""}${++He}`,Ne=e=>{const[t,n]=s.useState(()=>E(e));return s.useEffect(()=>n(E(e)),[e]),t},h=(e,t,n)=>{const r=s.useRef();s.useEffect(()=>{r.current=n},[n]),s.useEffect(()=>{if(!(e.current&&e.current.addEventListener))return;const u=l=>{if(r.current)return r.current(l)};if(!e.current)return;const c=e.current;return c.addEventListener(t,u),()=>{c&&c.removeEventListener(t,u)}},[t,e])},Pe=e=>{const[t,n,r]=v(!1);s.useEffect(()=>{document.activeElement===V.findDOMNode(e.current)?n():r()},[e,r,n]),h(e,"focus",n),h(e,"blur",r);const o=s.useCallback(()=>{e.current&&e.current.focus()},[e]),u=s.useCallback(()=>{e.current&&e.current.blur()},[e]);return{isInFocus:t,focus:o,blur:u}},qe=e=>{const[t,n,r]=v(!1);return h(e,"mouseover",n),h(e,"mouseout",r),t},Ae=e=>{const[t,n,r]=v(!1);return h(e,"mouseenter",n),h(e,"mouseleave",r),t},Ve=(e,t)=>{const n=s.useRef(()=>{});s.useEffect(()=>{n.current=t},[t]),s.useEffect(()=>{const r=o=>{!e.filter(c=>c.current).every(c=>c.current&&!c.current.contains(o.target))||n.current(o)};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[...e])},Ue=(e,t,n)=>{const r=s.useRef(()=>{});s.useEffect(()=>{r.current=t},[t]),s.useEffect(()=>{const o=u=>{!e.current||e.current.contains(u.target)||r.current(u)};return document.addEventListener("mousedown",o,n),document.addEventListener("touchstart",o,n),()=>{document.removeEventListener("mousedown",o,n),document.removeEventListener("touchstart",o,n)}},[e,n])},S=["mousemove","mousedown","keydown","touchstart","scroll"],Be=(e,t)=>{const n=s.useRef(()=>{});s.useEffect(()=>{n.current=e},[e]),s.useEffect(()=>{const r=j.debounce(n.current,t);return S.forEach(o=>window.addEventListener(o,r)),()=>{S.forEach(o=>window.removeEventListener(o,r))}},[t])},Ge=(e,t)=>{const[n,r]=s.useState(!1),{rootMargin:o,root:u,threshold:c}=t||{},l=s.useMemo(()=>new IntersectionObserver(([a])=>r(a.isIntersecting),{rootMargin:o,root:u,threshold:c}),[r,o,u,c]);return s.useEffect(()=>(e.current&&l.observe(e.current),()=>{l.disconnect()}),[l,e]),n},Ke=e=>{const t=s.useRef(null);return s.useEffect(()=>{!e||(typeof e=="function"?e(t.current):e.current=t.current)}),t},We=(e,t,n=!0)=>{const[r,o]=s.useState(e),u=s.useRef(),c=s.useCallback((l,a=t)=>{o(l),n&&clearTimeout(u.current),u.current=setTimeout(()=>o(e),a)},[t,n,e]);return s.useEffect(()=>()=>{clearTimeout(u.current)},[]),[r,c]},Je=e=>{throw new Error(`Switch unhandled case: ${e}`)},Qe=(e,t)=>t,Xe=e=>Object.keys(e).filter(t=>e[t]),Ye=e=>{try{const t=parseFloat(e);return isNaN(t)||t==null?void 0:t}catch{}},Ze=e=>{try{const t=parseInt(e,10);return isNaN(t)||t==null?void 0:t}catch{}};exports.Box=w;exports.Clickable=K;exports.Column=Y;exports.HeaderText=De;exports.Heading=T;exports.Indent=ne;exports.LargeText=Se;exports.Nest=ue;exports.ResizeAwareBox=ee;exports.Row=te;exports.ScreenReaderOnlyText=le;exports.SeparatorLine=B;exports.SmallText=ye;exports.SmallerText=$e;exports.Space=oe;exports.Spacing=re;exports.StandardText=Ee;exports.Text=x;exports.Txt=_e;exports.booleanOrNumberToNumber=p;exports.exhaustSwitchCase=Qe;exports.exhaustSwitchCaseElseThrow=Je;exports.getDataProps=I;exports.getDimensionObject=O;exports.parseFloatElseUndefined=Ye;exports.parseIntElseUndefined=Ze;exports.truthyKeysAsList=Xe;exports.useArraySet=Le;exports.useBoolean=v;exports.useDebounce=Fe;exports.useDelayedFalse=ze;exports.useDomId=Ne;exports.useElementDimensions=R;exports.useElementFocus=Pe;exports.useEventListener=h;exports.useForwardedRef=Ke;exports.useMouseIsEntered=Ae;exports.useMouseIsOver=qe;exports.useMultiOnClickOutside=Ve;exports.useOnClickOutside=Ue;exports.useOnNoMouseMovement=Be;exports.useOnScreen=Ge;exports.useTimeoutState=We;
84
88
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/components/decorators/separatorline/SeparatorLine.tsx","../src/components/interaction/Clickable.tsx","../src/utils/BooleanOrNumberToNumber.ts","../src/components/layout/box/Box.tsx","../src/components/layout/column/Column.tsx","../src/hooks/UseElementDimensions.ts","../src/components/layout/box/ResizeAwareBox.tsx","../src/components/layout/row/Row.tsx","../src/components/layout/indent/Indent.tsx","../src/components/layout/spacing/Spacing.tsx","../src/components/layout/space/Space.tsx","../src/components/util/Nest.tsx","../src/utils/PropsForwarder.ts","../src/components/accessibility/ScreenReaderOnlyText.tsx","../src/components/text/Text.tsx","../src/components/deprecated-text/SmallText.tsx","../src/components/deprecated-text/SmallerText.tsx","../src/components/deprecated-text/StandardText.tsx","../src/components/deprecated-text/LargeText.tsx","../src/components/heading/Heading.tsx","../src/components/deprecated-text/HeaderText.tsx","../src/hooks/UseArraySet.ts","../src/hooks/UseBoolean.ts","../src/hooks/UseDebounce.ts","../src/hooks/UseDelayedFalse.ts","../src/hooks/UseDomId.ts","../src/hooks/UseEventListener.ts","../src/hooks/UseElementFocus.ts","../src/hooks/UseMouseIsOver.ts","../src/hooks/UseMouseIsEntered.ts","../src/hooks/UseMultiOnClickOutside.ts","../src/hooks/UseOnClickOutside.ts","../src/hooks/UseOnNoMouseInput.ts","../src/hooks/UseOnScreen.ts","../src/hooks/UseForwardedRef.ts","../src/hooks/UseTimeoutState.ts","../src/utils/SwitchCaseExhauster.ts","../src/utils/TruthyKeysAsList.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\ninterface SeparatorLineComponentProps {\n color: string;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nconst SeparatorLineComponent = styled.hr<SeparatorLineComponentProps>`\n display: flex;\n border: 0;\n margin: 0;\n flex: none;\n background-color: ${(props) => props.color};\n height: ${(props) =>\n props.vertical ? props.size || \"100%\" : props.width || \"1px\"};\n width: ${(props) =>\n props.vertical ? props.width || \"1px\" : props.size || \"100%\"};\n`;\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = cssColor(\"--lhds-color-ui-300\"),\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <SeparatorLineComponent\n aria-hidden={true}\n color={color}\n size={size}\n width={width}\n vertical={vertical}\n ref={ref}\n />\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\nimport { CSSProperties, forwardRef, MouseEventHandler } from \"react\";\nimport { ButtonElementProps } from \"../../types/ElementProps\";\n\nexport interface ClickableProps extends ButtonElementProps {\n /** Callback function called when clicking on click area. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /** Callback function called when double clicking on click area. */\n onDblClick?: MouseEventHandler<HTMLButtonElement>;\n /** Adds a title to the click area. */\n tooltip?: string;\n /** If set, there is no opacity applies when clicking on the click area. */\n disableOpacityOnClick?: boolean;\n /** Mouse does not turn into pointer when hovering over click area. */\n disablePointer?: boolean;\n /** When set, click area receives opacity when mouse hovers over it. */\n opacityOnHover?: boolean;\n /** Custom style on div with click event. */\n style?: CSSProperties;\n /** Disables shadow when element is focused. */\n disableFocusHighlight?: boolean;\n /** Disables the HTML button element. */\n disabled?: boolean;\n /**\n * Sets the background of the box.\n */\n background?: string;\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: string;\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: string;\n /**\n * The width.\n */\n width?: string;\n /**\n * The height.\n */\n height?: string;\n /**\n * Border radius\n */\n borderRadius?: string;\n}\n\ninterface ClickableElementProps {\n disableOpacityOnClick?: boolean;\n opacityOnHover?: boolean;\n disableFocusHighlight?: boolean;\n pointer?: boolean;\n background?: string;\n focusBackground?: string;\n hoverBackground?: string;\n width?: string;\n height?: string;\n borderRadius?: string;\n}\n\nconst ClickableElement = styled.button<ClickableElementProps>`\n display: inline-block;\n user-select: none;\n border: 0;\n padding: 0;\n background: ${({ background }) => background};\n ${({ pointer }) => (pointer ? \"cursor: pointer;\" : \"\")}\n\n :hover {\n ${(props) => (props.opacityOnHover ? \"opacity: 0.7;\" : \"\")};\n ${({ hoverBackground }) => `background: ${hoverBackground};`}\n }\n :active {\n ${({ disableOpacityOnClick }) =>\n !disableOpacityOnClick ? \"opacity: 0.5;\" : \"\"}\n }\n :focus {\n outline: 0;\n ${({ disableFocusHighlight }) =>\n disableFocusHighlight\n ? \"\"\n : \"box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);\"}\n ${({ focusBackground }) => `background: ${focusBackground};`}\n }\n ${({ width }) => (width ? `width: ${width};` : \"\")}\n ${({ height }) => (height ? `height: ${height};` : \"\")}\n ${({ borderRadius }) =>\n borderRadius ? `border-radius: ${borderRadius};` : \"\"}\n`;\n\nexport const Clickable = forwardRef<HTMLButtonElement, ClickableProps>(\n (\n {\n disableFocusHighlight,\n onClick,\n onDblClick,\n tooltip,\n disableOpacityOnClick,\n disablePointer,\n opacityOnHover,\n disabled,\n children,\n background = \"transparent\",\n hoverBackground,\n focusBackground,\n type = \"button\",\n ...restProps\n },\n ref\n ) => {\n const hasClickHandler = !!(onClick || onDblClick);\n\n return (\n <ClickableElement\n opacityOnHover={opacityOnHover}\n title={tooltip}\n disabled={disabled}\n disableOpacityOnClick={disableOpacityOnClick}\n onClick={onClick}\n onDoubleClick={onDblClick}\n disableFocusHighlight={disableFocusHighlight}\n pointer={hasClickHandler && !disablePointer}\n ref={ref}\n background={background}\n hoverBackground={hoverBackground}\n focusBackground={focusBackground}\n type={type}\n {...restProps}\n >\n {children}\n </ClickableElement>\n );\n }\n);\n","export const booleanOrNumberToNumber = (\n num: number | boolean | undefined\n): number => {\n if (num == null) {\n return 0;\n }\n if (typeof num === \"boolean\") {\n return num ? 1 : 0;\n }\n return num;\n};\n","import isPropValid from \"@emotion/is-prop-valid\";\nimport styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\n\nimport {\n background,\n BackgroundProps,\n border,\n borderBottom,\n BorderBottomProps,\n borderColor,\n borderLeft,\n BorderLeftProps,\n borderRadius,\n BorderRadiusProps,\n borderRight,\n BorderRightProps,\n borderStyle,\n BorderStyleProps,\n borderTop,\n BorderTopProps,\n borderWidth,\n BorderWidthProps,\n bottom,\n BottomProps,\n boxShadow,\n BoxShadowProps,\n flexbox,\n FlexboxProps,\n layout,\n LayoutProps,\n left,\n LeftProps,\n overflow,\n OverflowProps,\n position,\n PositionProps,\n ResponsiveValue,\n right,\n RightProps,\n system,\n TLengthStyledSystem,\n top,\n TopProps,\n zIndex,\n ZIndexProps,\n} from \"styled-system\";\nimport { DivProps } from \"../../../types/ElementProps\";\nimport { booleanOrNumberToNumber } from \"../../../utils/BooleanOrNumberToNumber\";\n\ninterface StyledSystemProps\n extends BorderRadiusProps,\n BorderStyleProps,\n BorderWidthProps,\n BorderLeftProps,\n BorderRightProps,\n BorderTopProps,\n BorderBottomProps,\n FlexboxProps,\n LayoutProps,\n OverflowProps,\n PositionProps,\n ZIndexProps,\n LeftProps,\n RightProps,\n TopProps,\n BottomProps {}\n\nconst shadows = {\n box: \"var(--swui-shadow-box)\",\n popover: \"var(--swui-shadow-popover)\",\n modal: \"var(--swui-shadow-modal)\",\n bottom: \"var(--swui-shadow-bottom)\",\n};\n\ntype ShadowType = keyof typeof shadows;\n\nexport interface BoxProps extends StyledSystemProps, DivProps {\n /**\n * If true, children are placed in a row.\n */\n row?: ResponsiveValue<boolean>;\n\n /**\n * Adds spacing over and under content.\n */\n spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing left and right of content.\n */\n indent?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing between children.\n */\n gap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds a shadow around the box.\n */\n shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;\n\n /**\n * Sets the background of the box.\n */\n background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;\n\n /**\n * Sets the border of the box.\n */\n border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;\n\n /**\n * Sets the border color of the box.\n */\n borderColor?: ResponsiveValue<Property.BorderColor>;\n\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when hovering with mouse.\n */\n hoverBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when the box is in focus.\n */\n focusBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when focus is within the box.\n */\n focusWithinBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when focus is within the box.\n */\n focusWithinBorder?: Property.Border<TLengthStyledSystem>;\n}\n\nconst excludedProps = [\n \"spacing\",\n \"indent\",\n \"gap\",\n \"width\",\n \"height\",\n \"overflow\",\n \"display\",\n];\n\nconst isExcludedWebUiProp = (propName: string) =>\n excludedProps.includes(propName);\n\nconst box = system({\n row: {\n property: \"flexDirection\",\n transform: (row: boolean) => (row ? \"row\" : \"column\"),\n },\n indent: {\n // @ts-ignore\n property: \"--current-indent\",\n transform: booleanOrNumberToNumber,\n },\n spacing: {\n // @ts-ignore\n property: \"--current-spacing\",\n transform: booleanOrNumberToNumber,\n },\n gap: {\n // @ts-ignore\n property: \"--current-gap\",\n transform: booleanOrNumberToNumber,\n },\n shadow: {\n property: \"boxShadow\",\n transform: (value) => shadows[value] ?? value,\n },\n});\n\ntype InnerProps = BoxProps & BoxShadowProps & BackgroundProps;\n\nexport const Box = styled(\"div\", {\n shouldForwardProp: (propName) =>\n typeof propName === \"string\"\n ? isExcludedWebUiProp(propName)\n ? false\n : isPropValid(propName)\n : false,\n})<InnerProps>`\n --current-spacing: 0;\n --current-indent: 0;\n --current-gap: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n ${box};\n ${background};\n ${border};\n ${borderRight};\n ${borderLeft};\n ${borderTop};\n ${borderBottom};\n ${borderColor};\n ${borderRadius};\n ${borderStyle};\n ${borderWidth};\n ${boxShadow};\n ${flexbox};\n ${overflow};\n ${position};\n ${layout};\n ${zIndex};\n ${left};\n ${right};\n ${top};\n ${bottom};\n\n gap: calc(var(--current-gap) * var(--swui-metrics-space));\n\n padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))\n calc(var(--current-indent) * var(--swui-metrics-indent));\n :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\n }\n :focus-within {\n ${({ focusWithinBackground }) =>\n focusWithinBackground ? `background: ${focusWithinBackground};` : \"\"}\n ${({ focusWithinBorder }) =>\n focusWithinBorder ? `border: ${focusWithinBorder};` : \"\"}\n }\n`;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Column = forwardRef<HTMLDivElement, BoxProps>(function Column(\n props,\n ref\n) {\n return <Box ref={ref} {...props} />;\n});\n","import { RefObject, useCallback, useLayoutEffect, useState } from \"react\";\n\nexport interface ElementDimensions {\n width: number;\n height: number;\n top: number;\n left: number;\n x: number;\n y: number;\n right: number;\n bottom: number;\n}\n\nexport const getDimensionObject = (node: HTMLElement): ElementDimensions => {\n const { x, y, width, height, bottom, top, left, right } =\n node.getBoundingClientRect();\n\n return {\n width,\n height,\n top,\n left,\n x,\n y,\n right,\n bottom,\n };\n};\n\nconst isEqualDimensions = (\n a: ElementDimensions,\n b: ElementDimensions\n): boolean =>\n a.x === b.x &&\n a.y === b.y &&\n a.width === b.width &&\n a.height === b.height &&\n a.bottom === b.bottom &&\n a.top === b.top &&\n a.left === b.left &&\n a.right === b.right;\n\nexport const useElementDimensions = (\n ref: RefObject<HTMLElement>,\n onResizeElement?: (dimensions: ElementDimensions) => void\n) => {\n const [dimensions, setDimensions] = useState<ElementDimensions | undefined>();\n\n const updateDimensions = useCallback(() => {\n window.requestAnimationFrame(() => {\n if (ref.current) {\n const newDimensions = getDimensionObject(ref.current);\n if (!dimensions || !isEqualDimensions(dimensions, newDimensions)) {\n if (onResizeElement) {\n onResizeElement(newDimensions);\n }\n }\n setDimensions(newDimensions);\n }\n });\n }, [ref, dimensions, setDimensions, onResizeElement]);\n\n useLayoutEffect(() => {\n updateDimensions();\n }, [updateDimensions]);\n\n return {\n dimensions,\n };\n};\n","import * as React from \"react\";\nimport { forwardRef, RefObject, useRef } from \"react\";\nimport { Box, BoxProps } from \"./Box\";\nimport {\n ElementDimensions,\n useElementDimensions,\n} from \"../../../hooks/UseElementDimensions\";\n\nexport interface ResizeAwareBoxProps extends BoxProps {\n onResize?: (dimensions: ElementDimensions) => void;\n}\n\nexport const ResizeAwareBox = forwardRef<HTMLDivElement, ResizeAwareBoxProps>(\n function ResizeAwareBox({ onResize, ...boxProps }, ref) {\n const localRef = useRef<HTMLDivElement>(null);\n const currentRef = (ref as RefObject<HTMLDivElement>) ?? localRef;\n useElementDimensions(currentRef, onResize);\n\n return <Box {...boxProps} ref={ref} />;\n }\n);\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Row = forwardRef<HTMLDivElement, BoxProps>(function Row(\n props,\n ref\n) {\n return <Box row ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface IndentProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Indent = forwardRef<HTMLDivElement, IndentProps>(function Indent(\n { num = 1, ...props },\n ref\n) {\n return <Box indent={num} ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface SpacingProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Spacing = forwardRef<HTMLDivElement, SpacingProps>(\n function Spacing({ num = 1, ...props }, ref) {\n return <Box spacing={num} ref={ref} {...props} />;\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\n\nexport interface SpaceProps {\n half?: boolean;\n horizontal?: boolean;\n num?: number;\n vertical?: boolean;\n}\n\nconst InnerSpace = styled.div`\n --current-size: 1;\n flex: none;\n width: calc(var(--current-size) * var(--swui-metrics-space));\n height: calc(var(--current-size) * var(--swui-metrics-space));\n`;\n\nexport const Space: React.VFC<SpaceProps> = ({\n half = false,\n horizontal = false,\n num = 1,\n vertical = false,\n}) => {\n const size = num * (half ? 0.5 : 1);\n\n return (\n <InnerSpace\n style={{\n [\"--current-size\" as string]: size,\n height: horizontal ? 1 : undefined,\n width: vertical ? 1 : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\n\ninterface Props {\n nest?: boolean;\n render: (children: ReactNode) => ReactNode;\n children?: ReactNode;\n}\n\nexport const Nest: React.FC<Props> = ({ children, nest, render }) => {\n if (nest) {\n return <>{render(children)}</>;\n }\n return <>{children}</>;\n};\n","import { pickBy } from \"lodash\";\n\nexport const getDataProps = <T extends Record<string, unknown>>(\n props: Record<string, unknown> | {}\n): T => pickBy(props, isDataPropMapper) as T;\n\nconst isDataPropMapper = (_: unknown, key: string): boolean => isDataProp(key);\n\nconst isDataProp = <TProp extends string>(propName: TProp): boolean =>\n propName.startsWith(\"data-\") || propName.startsWith(\"aria-\");\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./ScreenReaderOnlyText.module.css\";\nimport { getDataProps } from \"../../utils/PropsForwarder\";\n\nexport interface ScreenReaderOnlyTextProps {\n children?: ReactNode;\n}\n\nexport const ScreenReaderOnlyText: React.FC<ScreenReaderOnlyTextProps> = ({\n children,\n ...props\n}) => {\n return (\n <span className={styles.visuallyHidden} {...getDataProps(props)}>\n {children}\n </span>\n );\n};\n","import * as React from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Text.module.css\";\nimport { SpanProps } from \"../../types/ElementProps\";\nimport { Property } from \"csstype\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps extends SpanProps {\n variant?: TextVariant;\n size?: TextSize;\n userSelect?: Property.UserSelect;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n color?: string;\n}\n\nexport type TextVariant = \"standard\" | \"caption\" | \"overline\" | \"bold\";\nexport type TextSize = \"large\" | \"medium\" | \"small\" | \"smaller\";\n\nexport const Text = forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n children,\n variant = \"standard\",\n size = \"medium\",\n className,\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n style,\n ...spanProps\n },\n ref\n ) => {\n return (\n <span\n className={cx(styles.text, styles[variant], styles[size], className)}\n ref={ref}\n style={{ color, userSelect, whiteSpace, wordBreak, ...style }}\n {...spanProps}\n >\n {children}\n </span>\n );\n }\n);\n\nexport const Txt = Text;\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"small\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallerText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"smaller\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const StandardText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"medium\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const LargeText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"large\"} {...props} />;\n};\n","import cx from \"classnames\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { H1Props } from \"../../types/ElementProps\";\nimport styles from \"./Heading.module.css\";\n\nexport interface HeadingProps extends H1Props {\n variant?: HeadingVariant;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n as?: HeadingVariant;\n}\n\nexport type HeadingVariant = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\n (\n {\n variant = \"h3\",\n className,\n color,\n whiteSpace,\n wordBreak,\n style,\n children,\n as,\n ...hProps\n },\n ref\n ) => {\n const Element = as ?? variant;\n return (\n <Element\n className={cx(styles.heading, styles[variant], className)}\n style={{ color, whiteSpace, wordBreak, ...style }}\n ref={ref}\n {...hProps}\n >\n {children}\n </Element>\n );\n }\n);\n","import * as React from \"react\";\nimport { Heading, HeadingProps } from \"../heading/Heading\";\n\n/**\n * @deprecated Please use `Heading` instead.\n */\nexport const HeaderText: React.FC<Omit<HeadingProps, \"variant\">> = (props) => {\n return <Heading variant={\"h2\"} {...props} />;\n};\n","import { useCallback } from \"react\";\n\ntype ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;\n\nconst defaultComparator = <T>(a: T, b: T) => a === b;\n\nexport const useArraySet = <T>(\n list: Array<T>,\n setList: (list: Array<T>) => void,\n comparator: ArrayItemEqualsComparator<T> = defaultComparator\n) => {\n const add = useCallback(\n (item: T) => {\n if (!list.some((l) => comparator(l, item))) {\n setList([...list, item]);\n }\n },\n [list, setList, comparator]\n );\n\n const addMultiple = useCallback(\n (items: Array<T>) => {\n setList(\n items.reduce((list, item) => {\n if (!list.some((l) => comparator(l, item))) {\n return [...list, item];\n }\n return list;\n }, list)\n );\n },\n [list, setList, comparator]\n );\n\n const remove = useCallback(\n (item: T) => {\n const index = list.findIndex((l) => comparator(l, item));\n if (index >= 0) {\n setList(list.filter((_, i) => i !== index));\n }\n },\n [list, setList, comparator]\n );\n\n const removeMultiple = useCallback(\n (items: Array<T>) => {\n setList(list.filter((item) => !items.some((l) => comparator(l, item))));\n },\n [list, setList, comparator]\n );\n\n const toggle = useCallback(\n (item: T) => {\n const found = list.some((l) => comparator(l, item));\n if (found) {\n remove(item);\n } else {\n add(item);\n }\n },\n [list, add, remove, comparator]\n );\n\n return {\n add,\n addMultiple,\n remove,\n removeMultiple,\n toggle,\n };\n};\n","import { useCallback, useState } from \"react\";\n\ntype Value = boolean;\ntype SetTrue = () => void;\ntype SetFalse = () => void;\ntype ToggleValue = () => void;\ntype BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];\n\nexport const useBoolean = (initialValue: Value): BooleanHook => {\n const [value, setValue] = useState(initialValue);\n\n const setTrue = useCallback(() => {\n setValue(true);\n }, [setValue]);\n\n const setFalse = useCallback(() => {\n setValue(false);\n }, [setValue]);\n\n const toggle = useCallback(() => {\n setValue((v) => !v);\n }, [setValue]);\n\n return [value, setTrue, setFalse, toggle];\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]); // Only re-call effect if value or delay changes\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDelayedFalse = (value: boolean, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<boolean>(value);\n\n useEffect(() => {\n if (value) {\n setDebouncedValue(true);\n }\n\n const handler = setTimeout(() => {\n if (!value) {\n setDebouncedValue(value);\n }\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nlet id = 0;\nconst genId = (componentName?: string) =>\n `webui-${componentName ? componentName + \"-\" : \"\"}${++id}`;\n\n/** @deprecated use useId-hook from React 18 */\nexport const useDomId = (componentName?: string): string => {\n const [id, setId] = useState<string | null>(() => genId(componentName));\n useEffect(() => setId(genId(componentName)), [componentName]);\n return id!;\n};\n","import { RefObject, useEffect, useRef } from \"react\";\n\ntype EventHandler<TEventName extends keyof HTMLElementEventMap> = (\n event: HTMLElementEventMap[TEventName]\n) => void;\n\nexport const useEventListener = <TEventName extends keyof HTMLElementEventMap>(\n ref: RefObject<HTMLElement>,\n eventName: TEventName,\n handler: EventHandler<TEventName>\n) => {\n // Create a ref that stores handler\n const savedHandler = useRef<EventHandler<TEventName>>();\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Make sure element supports addEventListener\n const isSupported = ref.current && ref.current.addEventListener;\n if (!isSupported) return;\n\n // Create event listener that calls handler function stored in ref\n const eventListener: EventHandler<TEventName> = (event) => {\n if (savedHandler.current) {\n return savedHandler.current(event);\n }\n };\n\n // Add event listener\n if (!ref.current) {\n return;\n }\n\n const element = ref.current;\n element.addEventListener(eventName, eventListener);\n\n // Remove event listener on cleanup\n return () => {\n if (element) {\n element.removeEventListener(eventName, eventListener);\n }\n };\n }, [eventName, ref]); // Re-run if eventName or element changes\n};\n","import { RefObject, useCallback, useEffect } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useElementFocus = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [isInFocus, setIsInFocus, setIsNotInFocus] = useBoolean(false);\n\n useEffect(() => {\n if (document.activeElement === ReactDOM.findDOMNode(ref.current)) {\n setIsInFocus();\n } else {\n setIsNotInFocus();\n }\n }, [ref, setIsNotInFocus, setIsInFocus]);\n\n useEventListener(ref, \"focus\", setIsInFocus);\n useEventListener(ref, \"blur\", setIsNotInFocus);\n\n const focus = useCallback(() => {\n if (ref.current) {\n ref.current.focus();\n }\n }, [ref]);\n\n const blur = useCallback(() => {\n if (ref.current) {\n ref.current.blur();\n }\n }, [ref]);\n\n return { isInFocus, focus, blur };\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsOver = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsOver, setMouseIsOver, setMouseIsNotOver] = useBoolean(false);\n\n useEventListener(ref, \"mouseover\", setMouseIsOver);\n useEventListener(ref, \"mouseout\", setMouseIsNotOver);\n\n return mouseIsOver;\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsEntered = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsEntered, setMouseIsEntered, setMouseIsNotEntered] =\n useBoolean(false);\n\n useEventListener(ref, \"mouseenter\", setMouseIsEntered);\n useEventListener(ref, \"mouseleave\", setMouseIsNotEntered);\n\n return mouseIsEntered;\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useMultiOnClickOutside = (\n refs: Array<React.RefObject<any>>,\n handler: (event: TouchEvent | MouseEvent) => void\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n\n const allNotContains = refs\n .filter((ref) => ref.current)\n .every((ref) => {\n return ref.current && !ref.current.contains(event.target);\n });\n\n if (!allNotContains) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...refs]);\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnClickOutside = (\n ref: React.RefObject<any>,\n handler: (event: TouchEvent | MouseEvent) => void,\n options?: AddEventListenerOptions\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener, options);\n document.addEventListener(\"touchstart\", listener, options);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener, options);\n document.removeEventListener(\"touchstart\", listener, options);\n };\n }, [ref, options]);\n};\n","import { debounce } from \"lodash\";\nimport { useEffect, useRef } from \"react\";\n\nconst events = [\"mousemove\", \"mousedown\", \"keydown\", \"touchstart\", \"scroll\"];\n\nexport const useOnNoMouseMovement = (callback: () => void, delay: number) => {\n const eventHandler = useRef<(event: Event) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const onIdleChange = debounce(eventHandler.current, delay);\n events.forEach((event) => window.addEventListener(event, onIdleChange));\n\n return () => {\n events.forEach((event) =>\n window.removeEventListener(event, onIdleChange)\n );\n };\n }, [delay]);\n};\n","import { RefObject, useEffect, useMemo, useState } from \"react\";\n\nexport const useOnScreen = (\n ref: RefObject<Element>,\n options?: IntersectionObserverInit\n) => {\n const [isVisible, setIsVisible] = useState(false);\n\n const { rootMargin, root, threshold } = options || {};\n\n const observer = useMemo(() => {\n return new IntersectionObserver(\n ([entry]) => setIsVisible(entry.isIntersecting),\n {\n rootMargin,\n root,\n threshold,\n }\n );\n }, [setIsVisible, rootMargin, root, threshold]);\n\n useEffect(() => {\n if (ref.current) {\n observer.observe(ref.current);\n }\n return () => {\n observer.disconnect();\n };\n }, [observer, ref]);\n\n return isVisible;\n};\n","import {\n MutableRefObject,\n RefCallback,\n RefObject,\n useEffect,\n useRef,\n} from \"react\";\n\nexport const useForwardedRef = <T>(\n ref: RefCallback<T> | MutableRefObject<T> | null\n): RefObject<NonNullable<T>> => {\n const innerRef = useRef<T>(null) as MutableRefObject<NonNullable<T>>;\n\n useEffect(() => {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(innerRef.current);\n } else {\n ref.current = innerRef.current;\n }\n });\n\n return innerRef;\n};\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const useTimeoutState = <S>(\n initialValue: S,\n defaultTimeout: number,\n clearTimeoutOnSetValue = true\n): [S, (v: S) => void] => {\n const [value, setValue] = useState<S>(initialValue);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const wrappedSetter = useCallback(\n (newValue: S, timeout = defaultTimeout) => {\n setValue(newValue);\n if (clearTimeoutOnSetValue) {\n clearTimeout(timeoutRef.current!);\n }\n timeoutRef.current = setTimeout(() => setValue(initialValue), timeout);\n },\n [defaultTimeout, clearTimeoutOnSetValue, initialValue]\n );\n\n useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current!);\n };\n }, []);\n\n return [value, wrappedSetter];\n};\n","export const exhaustSwitchCaseElseThrow = (arg: never) => {\n throw new Error(`Switch unhandled case: ${arg}`);\n};\n\nexport const exhaustSwitchCase = <T>(_arg: never, fallback: T) => {\n return fallback;\n};\n","export const truthyKeysAsList = (r: Record<string, boolean>): Array<string> =>\n Object.keys(r).filter((key) => r[key]);\n","export const parseFloatElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseFloat(s);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n\nexport const parseIntElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseInt(s, 10);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n"],"names":["SeparatorLineComponent","styled","props","SeparatorLine","forwardRef","color","cssColor","size","width","vertical","ref","jsx","ClickableElement","background","pointer","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","opacityOnHover","disabled","children","type","restProps","hasClickHandler","booleanOrNumberToNumber","num","shadows","excludedProps","isExcludedWebUiProp","propName","box","system","row","value","_a","Box","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","bottom","hoverBorder","focusBorder","focusWithinBackground","focusWithinBorder","Column","getDimensionObject","node","x","y","isEqualDimensions","a","b","useElementDimensions","onResizeElement","dimensions","setDimensions","useState","updateDimensions","useCallback","newDimensions","useLayoutEffect","ResizeAwareBox","onResize","boxProps","localRef","useRef","currentRef","Row","Indent","Spacing","InnerSpace","Space","half","horizontal","Nest","nest","render","Fragment","getDataProps","pickBy","isDataPropMapper","_","key","isDataProp","ScreenReaderOnlyText","styles","Text","variant","className","userSelect","whiteSpace","wordBreak","style","spanProps","cx","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","HeaderText","defaultComparator","useArraySet","list","setList","comparator","add","item","l","addMultiple","items","remove","index","i","removeMultiple","toggle","useBoolean","initialValue","setValue","setTrue","setFalse","v","useDebounce","delay","debouncedValue","setDebouncedValue","useEffect","handler","useDelayedFalse","id","genId","componentName","useDomId","setId","useEventListener","eventName","savedHandler","eventListener","event","element","useElementFocus","isInFocus","setIsInFocus","setIsNotInFocus","ReactDOM","focus","blur","useMouseIsOver","mouseIsOver","setMouseIsOver","setMouseIsNotOver","useMouseIsEntered","mouseIsEntered","setMouseIsEntered","setMouseIsNotEntered","useMultiOnClickOutside","refs","eventHandler","listener","useOnClickOutside","options","events","useOnNoMouseMovement","callback","onIdleChange","debounce","useOnScreen","isVisible","setIsVisible","rootMargin","root","threshold","observer","useMemo","entry","useForwardedRef","innerRef","useTimeoutState","defaultTimeout","clearTimeoutOnSetValue","timeoutRef","wrappedSetter","newValue","timeout","exhaustSwitchCaseElseThrow","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AAAA,SAEbwH,EAAgB/H,EAAA,YACpB,CAACgI,EAAaC,EAAUL,IAAmB,CACzC5D,EAASgE,CAAQ,EACbH,GACF,aAAaC,EAAW,OAAQ,EAElCA,EAAW,QAAU,WAAW,IAAM9D,EAASD,CAAY,EAAGkE,CAAO,CACvE,EACA,CAACL,EAAgBC,EAAwB9D,CAAY,CAAA,EAGvDS,OAAAA,EAAAA,UAAU,IACD,IAAM,CACX,aAAasD,EAAW,OAAQ,CAAA,EAEjC,CAAE,CAAA,EAEE,CAACtK,EAAOuK,CAAa,CAC9B,EC5BaG,GAA8BC,GAAe,CAClD,MAAA,IAAI,MAAM,0BAA0BA,GAAK,CACjD,EAEaC,GAAoB,CAAIC,EAAaC,IACzCA,ECLIC,GAAoBC,GAC/B,OAAO,KAAKA,CAAC,EAAE,OAAQhH,GAAQgH,EAAEhH,EAAI,ECD1BiH,GAA2BC,GAAkC,CACpE,GAAA,CACI,MAAAC,EAAI,WAAWD,CAAC,EAItB,OAHI,MAAMC,CAAC,GAGPA,GAAK,KACA,OAEFA,QACI,CAEf,EAEaC,GAAyBF,GAAkC,CAClE,GAAA,CACI,MAAAC,EAAI,SAASD,EAAG,EAAE,EAIxB,OAHI,MAAMC,CAAC,GAGPA,GAAK,KACA,OAEFA,QACI,CAEf"}
1
+ {"version":3,"file":"index.js","sources":["../src/components/decorators/separatorline/SeparatorLine.tsx","../src/components/interaction/Clickable.tsx","../src/utils/BooleanOrNumberToNumber.ts","../src/components/layout/box/Box.tsx","../src/components/layout/column/Column.tsx","../src/hooks/UseElementDimensions.ts","../src/components/layout/box/ResizeAwareBox.tsx","../src/components/layout/row/Row.tsx","../src/components/layout/indent/Indent.tsx","../src/components/layout/spacing/Spacing.tsx","../src/components/layout/space/Space.tsx","../src/components/util/Nest.tsx","../src/utils/PropsForwarder.ts","../src/components/accessibility/ScreenReaderOnlyText.tsx","../src/components/text/Text.tsx","../src/components/deprecated-text/SmallText.tsx","../src/components/deprecated-text/SmallerText.tsx","../src/components/deprecated-text/StandardText.tsx","../src/components/deprecated-text/LargeText.tsx","../src/components/heading/Heading.tsx","../src/components/deprecated-text/HeaderText.tsx","../src/hooks/UseArraySet.ts","../src/hooks/UseBoolean.ts","../src/hooks/UseDebounce.ts","../src/hooks/UseDelayedFalse.ts","../src/hooks/UseDomId.ts","../src/hooks/UseEventListener.ts","../src/hooks/UseElementFocus.ts","../src/hooks/UseMouseIsOver.ts","../src/hooks/UseMouseIsEntered.ts","../src/hooks/UseMultiOnClickOutside.ts","../src/hooks/UseOnClickOutside.ts","../src/hooks/UseOnNoMouseInput.ts","../src/hooks/UseOnScreen.ts","../src/hooks/UseForwardedRef.ts","../src/hooks/UseTimeoutState.ts","../src/utils/SwitchCaseExhauster.ts","../src/utils/TruthyKeysAsList.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\ninterface SeparatorLineComponentProps {\n color: string;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nconst SeparatorLineComponent = styled.hr<SeparatorLineComponentProps>`\n display: flex;\n border: 0;\n margin: 0;\n flex: none;\n background-color: ${(props) => props.color};\n height: ${(props) =>\n props.vertical ? props.size || \"100%\" : props.width || \"1px\"};\n width: ${(props) =>\n props.vertical ? props.width || \"1px\" : props.size || \"100%\"};\n`;\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = cssColor(\"--lhds-color-ui-300\"),\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <SeparatorLineComponent\n aria-hidden={true}\n color={color}\n size={size}\n width={width}\n vertical={vertical}\n ref={ref}\n />\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\nimport { CSSProperties, forwardRef, MouseEventHandler } from \"react\";\nimport { ButtonElementProps } from \"../../types/ElementProps\";\n\nexport interface ClickableProps extends ButtonElementProps {\n /** Callback function called when clicking on click area. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /** Callback function called when double clicking on click area. */\n onDblClick?: MouseEventHandler<HTMLButtonElement>;\n /** Adds a title to the click area. */\n tooltip?: string;\n /** If set, there is no opacity applies when clicking on the click area. */\n disableOpacityOnClick?: boolean;\n /** Mouse does not turn into pointer when hovering over click area. */\n disablePointer?: boolean;\n /** When set, click area receives opacity when mouse hovers over it. */\n opacityOnHover?: boolean;\n /** Custom style on div with click event. */\n style?: CSSProperties;\n /** Disables shadow when element is focused. */\n disableFocusHighlight?: boolean;\n /** Disables the HTML button element. */\n disabled?: boolean;\n /**\n * Sets the background of the box.\n */\n background?: string;\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: string;\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: string;\n /**\n * The width.\n */\n width?: string;\n /**\n * The height.\n */\n height?: string;\n /**\n * Border radius\n */\n borderRadius?: string;\n}\n\ninterface ClickableElementProps {\n disableOpacityOnClick?: boolean;\n opacityOnHover?: boolean;\n disableFocusHighlight?: boolean;\n pointer?: boolean;\n background?: string;\n focusBackground?: string;\n hoverBackground?: string;\n width?: string;\n height?: string;\n borderRadius?: string;\n}\n\nconst ClickableElement = styled.button<ClickableElementProps>`\n display: inline-block;\n user-select: none;\n border: 0;\n padding: 0;\n background: ${({ background }) => background};\n ${({ pointer }) => (pointer ? \"cursor: pointer;\" : \"\")}\n\n :hover {\n ${(props) => (props.opacityOnHover ? \"opacity: 0.7;\" : \"\")};\n ${({ hoverBackground }) => `background: ${hoverBackground};`}\n }\n :active {\n ${({ disableOpacityOnClick }) =>\n !disableOpacityOnClick ? \"opacity: 0.5;\" : \"\"}\n }\n :focus {\n outline: 0;\n ${({ disableFocusHighlight }) =>\n disableFocusHighlight\n ? \"\"\n : \"box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);\"}\n ${({ focusBackground }) => `background: ${focusBackground};`}\n }\n ${({ width }) => (width ? `width: ${width};` : \"\")}\n ${({ height }) => (height ? `height: ${height};` : \"\")}\n ${({ borderRadius }) =>\n borderRadius ? `border-radius: ${borderRadius};` : \"\"}\n`;\n\nexport const Clickable = forwardRef<HTMLButtonElement, ClickableProps>(\n (\n {\n disableFocusHighlight,\n onClick,\n onDblClick,\n tooltip,\n disableOpacityOnClick,\n disablePointer,\n opacityOnHover,\n disabled,\n children,\n background = \"transparent\",\n hoverBackground,\n focusBackground,\n type = \"button\",\n ...restProps\n },\n ref\n ) => {\n const hasClickHandler = !!(onClick || onDblClick);\n\n return (\n <ClickableElement\n opacityOnHover={opacityOnHover}\n title={tooltip}\n disabled={disabled}\n disableOpacityOnClick={disableOpacityOnClick}\n onClick={onClick}\n onDoubleClick={onDblClick}\n disableFocusHighlight={disableFocusHighlight}\n pointer={hasClickHandler && !disablePointer}\n ref={ref}\n background={background}\n hoverBackground={hoverBackground}\n focusBackground={focusBackground}\n type={type}\n {...restProps}\n >\n {children}\n </ClickableElement>\n );\n }\n);\n","export const booleanOrNumberToNumber = (\n num: number | boolean | undefined\n): number => {\n if (num == null) {\n return 0;\n }\n if (typeof num === \"boolean\") {\n return num ? 1 : 0;\n }\n return num;\n};\n","import isPropValid from \"@emotion/is-prop-valid\";\nimport styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\n\nimport {\n background,\n BackgroundProps,\n border,\n borderBottom,\n BorderBottomProps,\n borderColor,\n borderLeft,\n BorderLeftProps,\n borderRadius,\n BorderRadiusProps,\n borderRight,\n BorderRightProps,\n borderStyle,\n BorderStyleProps,\n borderTop,\n BorderTopProps,\n borderWidth,\n BorderWidthProps,\n bottom,\n BottomProps,\n boxShadow,\n BoxShadowProps,\n flexbox,\n FlexboxProps,\n layout,\n LayoutProps,\n left,\n LeftProps,\n overflow,\n OverflowProps,\n position,\n PositionProps,\n ResponsiveValue,\n right,\n RightProps,\n system,\n TLengthStyledSystem,\n top,\n TopProps,\n zIndex,\n ZIndexProps,\n} from \"styled-system\";\nimport { DivProps } from \"../../../types/ElementProps\";\nimport { booleanOrNumberToNumber } from \"../../../utils/BooleanOrNumberToNumber\";\n\ninterface StyledSystemProps\n extends BorderRadiusProps,\n BorderStyleProps,\n BorderWidthProps,\n BorderLeftProps,\n BorderRightProps,\n BorderTopProps,\n BorderBottomProps,\n FlexboxProps,\n LayoutProps,\n OverflowProps,\n PositionProps,\n ZIndexProps,\n LeftProps,\n RightProps,\n TopProps,\n BottomProps {}\n\nconst shadows = {\n box: \"var(--swui-shadow-box)\",\n popover: \"var(--swui-shadow-popover)\",\n modal: \"var(--swui-shadow-modal)\",\n bottom: \"var(--swui-shadow-bottom)\",\n};\n\ntype ShadowType = keyof typeof shadows;\n\nexport interface BoxProps extends StyledSystemProps, DivProps {\n /**\n * If true, children are placed in a row.\n */\n row?: ResponsiveValue<boolean>;\n\n /**\n * Adds spacing over and under content.\n */\n spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing left and right of content.\n */\n indent?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing between children.\n */\n gap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between columns.\n */\n columnGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between rows.\n */\n rowGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds a shadow around the box.\n */\n shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;\n\n /**\n * Sets the background of the box.\n */\n background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;\n\n /**\n * Sets the border of the box.\n */\n border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;\n\n /**\n * Sets the border color of the box.\n */\n borderColor?: ResponsiveValue<Property.BorderColor>;\n\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when hovering with mouse.\n */\n hoverBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when the box is in focus.\n */\n focusBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when focus is within the box.\n */\n focusWithinBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when focus is within the box.\n */\n focusWithinBorder?: Property.Border<TLengthStyledSystem>;\n}\n\nconst excludedProps = [\n \"spacing\",\n \"indent\",\n \"gap\",\n \"width\",\n \"height\",\n \"overflow\",\n \"display\",\n];\n\nconst isExcludedWebUiProp = (propName: string) =>\n excludedProps.includes(propName);\n\nconst box = system({\n row: {\n property: \"flexDirection\",\n transform: (row: boolean) => (row ? \"row\" : \"column\"),\n },\n indent: {\n // @ts-ignore\n property: \"--current-indent\",\n transform: booleanOrNumberToNumber,\n },\n spacing: {\n // @ts-ignore\n property: \"--current-spacing\",\n transform: booleanOrNumberToNumber,\n },\n gap: {\n // @ts-ignore\n property: \"--current-gap\",\n transform: booleanOrNumberToNumber,\n },\n columnGap: {\n // @ts-ignore\n property: \"--current-column-gap\",\n transform: booleanOrNumberToNumber,\n },\n rowGap: {\n // @ts-ignore\n property: \"--current-row-gap\",\n transform: booleanOrNumberToNumber,\n },\n shadow: {\n property: \"boxShadow\",\n transform: (value) => shadows[value] ?? value,\n },\n});\n\ntype InnerProps = BoxProps & BoxShadowProps & BackgroundProps;\n\nexport const Box = styled(\"div\", {\n shouldForwardProp: (propName) =>\n typeof propName === \"string\"\n ? isExcludedWebUiProp(propName)\n ? false\n : isPropValid(propName)\n : false,\n})<InnerProps>`\n --current-spacing: 0;\n --current-indent: 0;\n --current-gap: 0;\n --current-column-gap: 0;\n --current-row-gap: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n ${box};\n ${background};\n ${border};\n ${borderRight};\n ${borderLeft};\n ${borderTop};\n ${borderBottom};\n ${borderColor};\n ${borderRadius};\n ${borderStyle};\n ${borderWidth};\n ${boxShadow};\n ${flexbox};\n ${overflow};\n ${position};\n ${layout};\n ${zIndex};\n ${left};\n ${right};\n ${top};\n ${bottom};\n\n gap: calc(var(--current-gap) * var(--swui-metrics-space));\n column-gap: calc(var(--current-column-gap) * var(--swui-metrics-space));\n row-gap: calc(var(--current-row-gap) * var(--swui-metrics-space));\n\n padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))\n calc(var(--current-indent) * var(--swui-metrics-indent));\n :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\n }\n :focus-within {\n ${({ focusWithinBackground }) =>\n focusWithinBackground ? `background: ${focusWithinBackground};` : \"\"}\n ${({ focusWithinBorder }) =>\n focusWithinBorder ? `border: ${focusWithinBorder};` : \"\"}\n }\n`;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Column = forwardRef<HTMLDivElement, BoxProps>(function Column(\n props,\n ref\n) {\n return <Box ref={ref} {...props} />;\n});\n","import { RefObject, useCallback, useLayoutEffect, useState } from \"react\";\n\nexport interface ElementDimensions {\n width: number;\n height: number;\n top: number;\n left: number;\n x: number;\n y: number;\n right: number;\n bottom: number;\n}\n\nexport const getDimensionObject = (node: HTMLElement): ElementDimensions => {\n const { x, y, width, height, bottom, top, left, right } =\n node.getBoundingClientRect();\n\n return {\n width,\n height,\n top,\n left,\n x,\n y,\n right,\n bottom,\n };\n};\n\nconst isEqualDimensions = (\n a: ElementDimensions,\n b: ElementDimensions\n): boolean =>\n a.x === b.x &&\n a.y === b.y &&\n a.width === b.width &&\n a.height === b.height &&\n a.bottom === b.bottom &&\n a.top === b.top &&\n a.left === b.left &&\n a.right === b.right;\n\nexport const useElementDimensions = (\n ref: RefObject<HTMLElement>,\n onResizeElement?: (dimensions: ElementDimensions) => void\n) => {\n const [dimensions, setDimensions] = useState<ElementDimensions | undefined>();\n\n const updateDimensions = useCallback(() => {\n window.requestAnimationFrame(() => {\n if (ref.current) {\n const newDimensions = getDimensionObject(ref.current);\n if (!dimensions || !isEqualDimensions(dimensions, newDimensions)) {\n if (onResizeElement) {\n onResizeElement(newDimensions);\n }\n }\n setDimensions(newDimensions);\n }\n });\n }, [ref, dimensions, setDimensions, onResizeElement]);\n\n useLayoutEffect(() => {\n updateDimensions();\n }, [updateDimensions]);\n\n return {\n dimensions,\n };\n};\n","import * as React from \"react\";\nimport { forwardRef, RefObject, useRef } from \"react\";\nimport { Box, BoxProps } from \"./Box\";\nimport {\n ElementDimensions,\n useElementDimensions,\n} from \"../../../hooks/UseElementDimensions\";\n\nexport interface ResizeAwareBoxProps extends BoxProps {\n onResize?: (dimensions: ElementDimensions) => void;\n}\n\nexport const ResizeAwareBox = forwardRef<HTMLDivElement, ResizeAwareBoxProps>(\n function ResizeAwareBox({ onResize, ...boxProps }, ref) {\n const localRef = useRef<HTMLDivElement>(null);\n const currentRef = (ref as RefObject<HTMLDivElement>) ?? localRef;\n useElementDimensions(currentRef, onResize);\n\n return <Box {...boxProps} ref={ref} />;\n }\n);\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Row = forwardRef<HTMLDivElement, BoxProps>(function Row(\n props,\n ref\n) {\n return <Box row ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface IndentProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Indent = forwardRef<HTMLDivElement, IndentProps>(function Indent(\n { num = 1, ...props },\n ref\n) {\n return <Box indent={num} ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface SpacingProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Spacing = forwardRef<HTMLDivElement, SpacingProps>(\n function Spacing({ num = 1, ...props }, ref) {\n return <Box spacing={num} ref={ref} {...props} />;\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\n\nexport interface SpaceProps {\n half?: boolean;\n horizontal?: boolean;\n num?: number;\n vertical?: boolean;\n}\n\nconst InnerSpace = styled.div`\n --current-size: 1;\n flex: none;\n width: calc(var(--current-size) * var(--swui-metrics-space));\n height: calc(var(--current-size) * var(--swui-metrics-space));\n`;\n\nexport const Space: React.VFC<SpaceProps> = ({\n half = false,\n horizontal = false,\n num = 1,\n vertical = false,\n}) => {\n const size = num * (half ? 0.5 : 1);\n\n return (\n <InnerSpace\n style={{\n [\"--current-size\" as string]: size,\n height: horizontal ? 1 : undefined,\n width: vertical ? 1 : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\n\ninterface Props {\n nest?: boolean;\n render: (children: ReactNode) => ReactNode;\n children?: ReactNode;\n}\n\nexport const Nest: React.FC<Props> = ({ children, nest, render }) => {\n if (nest) {\n return <>{render(children)}</>;\n }\n return <>{children}</>;\n};\n","import { pickBy } from \"lodash\";\n\nexport const getDataProps = <T extends Record<string, unknown>>(\n props: Record<string, unknown> | {}\n): T => pickBy(props, isDataPropMapper) as T;\n\nconst isDataPropMapper = (_: unknown, key: string): boolean => isDataProp(key);\n\nconst isDataProp = <TProp extends string>(propName: TProp): boolean =>\n propName.startsWith(\"data-\") || propName.startsWith(\"aria-\");\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./ScreenReaderOnlyText.module.css\";\nimport { getDataProps } from \"../../utils/PropsForwarder\";\n\nexport interface ScreenReaderOnlyTextProps {\n children?: ReactNode;\n}\n\nexport const ScreenReaderOnlyText: React.FC<ScreenReaderOnlyTextProps> = ({\n children,\n ...props\n}) => {\n return (\n <span className={styles.visuallyHidden} {...getDataProps(props)}>\n {children}\n </span>\n );\n};\n","import * as React from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Text.module.css\";\nimport { SpanProps } from \"../../types/ElementProps\";\nimport { Property } from \"csstype\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps extends SpanProps {\n variant?: TextVariant;\n size?: TextSize;\n userSelect?: Property.UserSelect;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n color?: string;\n}\n\nexport type TextVariant = \"standard\" | \"caption\" | \"overline\" | \"bold\";\nexport type TextSize = \"large\" | \"medium\" | \"small\" | \"smaller\";\n\nexport const Text = forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n children,\n variant = \"standard\",\n size = \"medium\",\n className,\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n style,\n ...spanProps\n },\n ref\n ) => {\n return (\n <span\n className={cx(styles.text, styles[variant], styles[size], className)}\n ref={ref}\n style={{ color, userSelect, whiteSpace, wordBreak, ...style }}\n {...spanProps}\n >\n {children}\n </span>\n );\n }\n);\n\nexport const Txt = Text;\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"small\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallerText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"smaller\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const StandardText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"medium\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const LargeText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"large\"} {...props} />;\n};\n","import cx from \"classnames\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { H1Props } from \"../../types/ElementProps\";\nimport styles from \"./Heading.module.css\";\n\nexport interface HeadingProps extends H1Props {\n variant?: HeadingVariant;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n as?: HeadingVariant;\n}\n\nexport type HeadingVariant = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\n (\n {\n variant = \"h3\",\n className,\n color,\n whiteSpace,\n wordBreak,\n style,\n children,\n as,\n ...hProps\n },\n ref\n ) => {\n const Element = as ?? variant;\n return (\n <Element\n className={cx(styles.heading, styles[variant], className)}\n style={{ color, whiteSpace, wordBreak, ...style }}\n ref={ref}\n {...hProps}\n >\n {children}\n </Element>\n );\n }\n);\n","import * as React from \"react\";\nimport { Heading, HeadingProps } from \"../heading/Heading\";\n\n/**\n * @deprecated Please use `Heading` instead.\n */\nexport const HeaderText: React.FC<Omit<HeadingProps, \"variant\">> = (props) => {\n return <Heading variant={\"h2\"} {...props} />;\n};\n","import { useCallback } from \"react\";\n\ntype ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;\n\nconst defaultComparator = <T>(a: T, b: T) => a === b;\n\nexport const useArraySet = <T>(\n list: Array<T>,\n setList: (list: Array<T>) => void,\n comparator: ArrayItemEqualsComparator<T> = defaultComparator\n) => {\n const add = useCallback(\n (item: T) => {\n if (!list.some((l) => comparator(l, item))) {\n setList([...list, item]);\n }\n },\n [list, setList, comparator]\n );\n\n const addMultiple = useCallback(\n (items: Array<T>) => {\n setList(\n items.reduce((list, item) => {\n if (!list.some((l) => comparator(l, item))) {\n return [...list, item];\n }\n return list;\n }, list)\n );\n },\n [list, setList, comparator]\n );\n\n const remove = useCallback(\n (item: T) => {\n const index = list.findIndex((l) => comparator(l, item));\n if (index >= 0) {\n setList(list.filter((_, i) => i !== index));\n }\n },\n [list, setList, comparator]\n );\n\n const removeMultiple = useCallback(\n (items: Array<T>) => {\n setList(list.filter((item) => !items.some((l) => comparator(l, item))));\n },\n [list, setList, comparator]\n );\n\n const toggle = useCallback(\n (item: T) => {\n const found = list.some((l) => comparator(l, item));\n if (found) {\n remove(item);\n } else {\n add(item);\n }\n },\n [list, add, remove, comparator]\n );\n\n return {\n add,\n addMultiple,\n remove,\n removeMultiple,\n toggle,\n };\n};\n","import { useCallback, useState } from \"react\";\n\ntype Value = boolean;\ntype SetTrue = () => void;\ntype SetFalse = () => void;\ntype ToggleValue = () => void;\ntype BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];\n\nexport const useBoolean = (initialValue: Value): BooleanHook => {\n const [value, setValue] = useState(initialValue);\n\n const setTrue = useCallback(() => {\n setValue(true);\n }, [setValue]);\n\n const setFalse = useCallback(() => {\n setValue(false);\n }, [setValue]);\n\n const toggle = useCallback(() => {\n setValue((v) => !v);\n }, [setValue]);\n\n return [value, setTrue, setFalse, toggle];\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]); // Only re-call effect if value or delay changes\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDelayedFalse = (value: boolean, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<boolean>(value);\n\n useEffect(() => {\n if (value) {\n setDebouncedValue(true);\n }\n\n const handler = setTimeout(() => {\n if (!value) {\n setDebouncedValue(value);\n }\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nlet id = 0;\nconst genId = (componentName?: string) =>\n `webui-${componentName ? componentName + \"-\" : \"\"}${++id}`;\n\n/** @deprecated use useId-hook from React 18 */\nexport const useDomId = (componentName?: string): string => {\n const [id, setId] = useState<string | null>(() => genId(componentName));\n useEffect(() => setId(genId(componentName)), [componentName]);\n return id!;\n};\n","import { RefObject, useEffect, useRef } from \"react\";\n\ntype EventHandler<TEventName extends keyof HTMLElementEventMap> = (\n event: HTMLElementEventMap[TEventName]\n) => void;\n\nexport const useEventListener = <TEventName extends keyof HTMLElementEventMap>(\n ref: RefObject<HTMLElement>,\n eventName: TEventName,\n handler: EventHandler<TEventName>\n) => {\n // Create a ref that stores handler\n const savedHandler = useRef<EventHandler<TEventName>>();\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Make sure element supports addEventListener\n const isSupported = ref.current && ref.current.addEventListener;\n if (!isSupported) return;\n\n // Create event listener that calls handler function stored in ref\n const eventListener: EventHandler<TEventName> = (event) => {\n if (savedHandler.current) {\n return savedHandler.current(event);\n }\n };\n\n // Add event listener\n if (!ref.current) {\n return;\n }\n\n const element = ref.current;\n element.addEventListener(eventName, eventListener);\n\n // Remove event listener on cleanup\n return () => {\n if (element) {\n element.removeEventListener(eventName, eventListener);\n }\n };\n }, [eventName, ref]); // Re-run if eventName or element changes\n};\n","import { RefObject, useCallback, useEffect } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useElementFocus = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [isInFocus, setIsInFocus, setIsNotInFocus] = useBoolean(false);\n\n useEffect(() => {\n if (document.activeElement === ReactDOM.findDOMNode(ref.current)) {\n setIsInFocus();\n } else {\n setIsNotInFocus();\n }\n }, [ref, setIsNotInFocus, setIsInFocus]);\n\n useEventListener(ref, \"focus\", setIsInFocus);\n useEventListener(ref, \"blur\", setIsNotInFocus);\n\n const focus = useCallback(() => {\n if (ref.current) {\n ref.current.focus();\n }\n }, [ref]);\n\n const blur = useCallback(() => {\n if (ref.current) {\n ref.current.blur();\n }\n }, [ref]);\n\n return { isInFocus, focus, blur };\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsOver = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsOver, setMouseIsOver, setMouseIsNotOver] = useBoolean(false);\n\n useEventListener(ref, \"mouseover\", setMouseIsOver);\n useEventListener(ref, \"mouseout\", setMouseIsNotOver);\n\n return mouseIsOver;\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsEntered = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsEntered, setMouseIsEntered, setMouseIsNotEntered] =\n useBoolean(false);\n\n useEventListener(ref, \"mouseenter\", setMouseIsEntered);\n useEventListener(ref, \"mouseleave\", setMouseIsNotEntered);\n\n return mouseIsEntered;\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useMultiOnClickOutside = (\n refs: Array<React.RefObject<any>>,\n handler: (event: TouchEvent | MouseEvent) => void\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n\n const allNotContains = refs\n .filter((ref) => ref.current)\n .every((ref) => {\n return ref.current && !ref.current.contains(event.target);\n });\n\n if (!allNotContains) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...refs]);\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnClickOutside = (\n ref: React.RefObject<any>,\n handler: (event: TouchEvent | MouseEvent) => void,\n options?: AddEventListenerOptions\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener, options);\n document.addEventListener(\"touchstart\", listener, options);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener, options);\n document.removeEventListener(\"touchstart\", listener, options);\n };\n }, [ref, options]);\n};\n","import { debounce } from \"lodash\";\nimport { useEffect, useRef } from \"react\";\n\nconst events = [\"mousemove\", \"mousedown\", \"keydown\", \"touchstart\", \"scroll\"];\n\nexport const useOnNoMouseMovement = (callback: () => void, delay: number) => {\n const eventHandler = useRef<(event: Event) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const onIdleChange = debounce(eventHandler.current, delay);\n events.forEach((event) => window.addEventListener(event, onIdleChange));\n\n return () => {\n events.forEach((event) =>\n window.removeEventListener(event, onIdleChange)\n );\n };\n }, [delay]);\n};\n","import { RefObject, useEffect, useMemo, useState } from \"react\";\n\nexport const useOnScreen = (\n ref: RefObject<Element>,\n options?: IntersectionObserverInit\n) => {\n const [isVisible, setIsVisible] = useState(false);\n\n const { rootMargin, root, threshold } = options || {};\n\n const observer = useMemo(() => {\n return new IntersectionObserver(\n ([entry]) => setIsVisible(entry.isIntersecting),\n {\n rootMargin,\n root,\n threshold,\n }\n );\n }, [setIsVisible, rootMargin, root, threshold]);\n\n useEffect(() => {\n if (ref.current) {\n observer.observe(ref.current);\n }\n return () => {\n observer.disconnect();\n };\n }, [observer, ref]);\n\n return isVisible;\n};\n","import {\n MutableRefObject,\n RefCallback,\n RefObject,\n useEffect,\n useRef,\n} from \"react\";\n\nexport const useForwardedRef = <T>(\n ref: RefCallback<T> | MutableRefObject<T> | null\n): RefObject<NonNullable<T>> => {\n const innerRef = useRef<T>(null) as MutableRefObject<NonNullable<T>>;\n\n useEffect(() => {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(innerRef.current);\n } else {\n ref.current = innerRef.current;\n }\n });\n\n return innerRef;\n};\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const useTimeoutState = <S>(\n initialValue: S,\n defaultTimeout: number,\n clearTimeoutOnSetValue = true\n): [S, (v: S) => void] => {\n const [value, setValue] = useState<S>(initialValue);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const wrappedSetter = useCallback(\n (newValue: S, timeout = defaultTimeout) => {\n setValue(newValue);\n if (clearTimeoutOnSetValue) {\n clearTimeout(timeoutRef.current!);\n }\n timeoutRef.current = setTimeout(() => setValue(initialValue), timeout);\n },\n [defaultTimeout, clearTimeoutOnSetValue, initialValue]\n );\n\n useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current!);\n };\n }, []);\n\n return [value, wrappedSetter];\n};\n","export const exhaustSwitchCaseElseThrow = (arg: never) => {\n throw new Error(`Switch unhandled case: ${arg}`);\n};\n\nexport const exhaustSwitchCase = <T>(_arg: never, fallback: T) => {\n return fallback;\n};\n","export const truthyKeysAsList = (r: Record<string, boolean>): Array<string> =>\n Object.keys(r).filter((key) => r[key]);\n","export const parseFloatElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseFloat(s);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n\nexport const parseIntElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseInt(s, 10);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n"],"names":["SeparatorLineComponent","styled","props","SeparatorLine","forwardRef","color","cssColor","size","width","vertical","ref","jsx","ClickableElement","background","pointer","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","opacityOnHover","disabled","children","type","restProps","hasClickHandler","booleanOrNumberToNumber","num","shadows","excludedProps","isExcludedWebUiProp","propName","box","system","row","value","_a","Box","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","bottom","hoverBorder","focusBorder","focusWithinBackground","focusWithinBorder","Column","getDimensionObject","node","x","y","isEqualDimensions","a","b","useElementDimensions","onResizeElement","dimensions","setDimensions","useState","updateDimensions","useCallback","newDimensions","useLayoutEffect","ResizeAwareBox","onResize","boxProps","localRef","useRef","currentRef","Row","Indent","Spacing","InnerSpace","Space","half","horizontal","Nest","nest","render","Fragment","getDataProps","pickBy","isDataPropMapper","_","key","isDataProp","ScreenReaderOnlyText","styles","Text","variant","className","userSelect","whiteSpace","wordBreak","style","spanProps","cx","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","HeaderText","defaultComparator","useArraySet","list","setList","comparator","add","item","l","addMultiple","items","remove","index","i","removeMultiple","toggle","useBoolean","initialValue","setValue","setTrue","setFalse","v","useDebounce","delay","debouncedValue","setDebouncedValue","useEffect","handler","useDelayedFalse","id","genId","componentName","useDomId","setId","useEventListener","eventName","savedHandler","eventListener","event","element","useElementFocus","isInFocus","setIsInFocus","setIsNotInFocus","ReactDOM","focus","blur","useMouseIsOver","mouseIsOver","setMouseIsOver","setMouseIsNotOver","useMouseIsEntered","mouseIsEntered","setMouseIsEntered","setMouseIsNotEntered","useMultiOnClickOutside","refs","eventHandler","listener","useOnClickOutside","options","events","useOnNoMouseMovement","callback","onIdleChange","debounce","useOnScreen","isVisible","setIsVisible","rootMargin","root","threshold","observer","useMemo","entry","useForwardedRef","innerRef","useTimeoutState","defaultTimeout","clearTimeoutOnSetValue","timeoutRef","wrappedSetter","newValue","timeout","exhaustSwitchCaseElseThrow","arg","exhaustSwitchCase","_arg","fallback","truthyKeysAsList","r","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":"wuBAoBMA,EAAyBC,EAAO,QAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKfC,GAAUA,EAAM;AAAA,YAC1BA,GACTA,EAAM,SAAWA,EAAM,MAAQ,OAASA,EAAM,OAAS;AAAA,WAC/CA,GACRA,EAAM,SAAWA,EAAM,OAAS,MAAQA,EAAM,MAAQ;AAAA,EAG7CC,EAAgBC,EAAA,WAC3B,CACE,CACE,MAAAC,EAAQC,WAAS,qBAAqB,EACtC,KAAAC,EAAO,OACP,MAAAC,EAAQ,MACR,SAAAC,EAAW,IAEbC,IAGEC,EAAA,IAACX,EAAA,CACC,cAAa,GACb,MAAAK,EACA,KAAAE,EACA,MAAAC,EACA,SAAAC,EACA,IAAAC,CAAA,CAAA,CAIR,ECUME,EAAmBX,EAAO,QAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKhB,CAAC,CAAE,WAAAY,CAAiB,IAAAA;AAAA,IAChC,CAAC,CAAE,QAAAC,CAAQ,IAAOA,EAAU,mBAAqB;AAAA;AAAA;AAAA,MAG9CZ,GA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,KACA,OAEFA,QACI,CAEf,EAEaC,GAAyBF,GAAkC,CAClE,GAAA,CACI,MAAAC,EAAI,SAASD,EAAG,EAAE,EAIxB,OAHI,MAAMC,CAAC,GAGPA,GAAK,KACA,OAEFA,QACI,CAEf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stenajs-webui/core",
3
- "version": "19.0.1",
3
+ "version": "19.0.2",
4
4
  "description": "",
5
5
  "author": "mattias800",
6
6
  "license": "MIT",
@@ -57,10 +57,10 @@
57
57
  "files": [
58
58
  "dist"
59
59
  ],
60
- "gitHead": "6d06c62a317fbb73114889ff2d22562811f5d293",
60
+ "gitHead": "0ed5c10f82f82f023fdfe152427a4907ffed92a9",
61
61
  "dependencies": {
62
62
  "@emotion/is-prop-valid": "^1.1.0",
63
- "@stenajs-webui/theme": "19.0.1",
63
+ "@stenajs-webui/theme": "19.0.2",
64
64
  "classnames": "^2.3.1"
65
65
  }
66
66
  }