@stenajs-webui/core 18.11.2-next.0 → 18.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
- (function(){"use strict";try{var e=document.createElement("style");e.appendChild(document.createTextNode("._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._heading_8a8m8_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);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_8a8m8_1._h1_8a8m8_14{--swui-heading-font-size: 2.8rem;--swui-heading-line-height: 4rem}._heading_8a8m8_1._h2_8a8m8_19{--swui-heading-font-size: 2.4rem;--swui-heading-line-height: 3.2rem}._heading_8a8m8_1._h3_8a8m8_24{--swui-heading-font-size: 2rem;--swui-heading-line-height: 2.4rem}._heading_8a8m8_1._h4_8a8m8_29{--swui-heading-font-size: 1.6rem;--swui-heading-line-height: 2.4rem;font-weight:var(--swui-font-weight-text-bold)}._heading_8a8m8_1._h5_8a8m8_35{--swui-heading-font-size: 1.4rem;--swui-heading-line-height: 1.6rem;font-weight:var(--swui-font-weight-text-bold)}._heading_8a8m8_1._h6_8a8m8_41{--swui-heading-font-size: 1.2rem;--swui-heading-line-height: 1.6rem;font-weight:var(--swui-font-weight-text-bold)}")),document.head.appendChild(e)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
1
+ (function(){"use strict";try{var t=document.createElement("style");t.appendChild(document.createTextNode("._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._heading_1fcct_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);--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_1fcct_1._h1_1fcct_15{--swui-heading-font-size: 2.8rem}._heading_1fcct_1._h2_1fcct_19{--swui-heading-font-size: 2.4rem}._heading_1fcct_1._h3_1fcct_23{--swui-heading-font-size: 2rem}._heading_1fcct_1._h4_1fcct_27{--swui-heading-font-size: 1.6rem;font-weight:var(--swui-font-weight-text-bold)}._heading_1fcct_1._h5_1fcct_32{--swui-heading-font-size: 1.4rem;font-weight:var(--swui-font-weight-text-bold)}._heading_1fcct_1._h6_1fcct_37{--swui-heading-font-size: 1.2rem;font-weight:var(--swui-font-weight-text-bold)}")),document.head.appendChild(t)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
2
  import "@stenajs-webui/theme";
3
3
  import _ from "@emotion/styled";
4
4
  import { forwardRef as f, useState as p, useCallback as h, useLayoutEffect as L, useRef as w, useEffect as m, useMemo as z } from "react";
5
- import { jsx as d, Fragment as I } from "react/jsx-runtime";
5
+ import { jsx as a, Fragment as I } from "react/jsx-runtime";
6
6
  import F from "@emotion/is-prop-valid";
7
7
  import { system as R, background as H, border as N, borderRight as P, borderLeft as V, borderTop as A, borderBottom as j, borderColor as U, borderRadius as q, borderStyle as W, borderWidth as B, boxShadow as K, flexbox as G, overflow as J, position as Q, layout as X, zIndex as Y, left as Z, right as ee, top as te, bottom as ne } from "styled-system";
8
8
  import T from "classnames";
@@ -21,7 +21,7 @@ const ce = _.hr`
21
21
  size: t = "100%",
22
22
  width: n = "1px",
23
23
  vertical: r = !1
24
- }, o) => /* @__PURE__ */ d(ce, {
24
+ }, o) => /* @__PURE__ */ a(ce, {
25
25
  color: e,
26
26
  size: t,
27
27
  width: n,
@@ -78,12 +78,12 @@ const ce = _.hr`
78
78
  opacityOnHover: c,
79
79
  disabled: i,
80
80
  children: u,
81
- background: a = "transparent",
81
+ background: d = "transparent",
82
82
  hoverBackground: l,
83
83
  focusBackground: g,
84
84
  type: M = "button",
85
85
  ...O
86
- }, k) => /* @__PURE__ */ d(ue, {
86
+ }, k) => /* @__PURE__ */ a(ue, {
87
87
  opacityOnHover: c,
88
88
  title: r,
89
89
  disabled: i,
@@ -93,7 +93,7 @@ const ce = _.hr`
93
93
  disableFocusHighlight: e,
94
94
  pointer: !!(t || n) && !s,
95
95
  ref: k,
96
- background: a,
96
+ background: d,
97
97
  hoverBackground: l,
98
98
  focusBackground: g,
99
99
  type: M,
@@ -103,7 +103,7 @@ const ce = _.hr`
103
103
  box: "var(--swui-shadow-box)",
104
104
  popover: "var(--swui-shadow-popover)",
105
105
  modal: "var(--swui-shadow-modal)"
106
- }, ae = ["spacing", "indent", "gap", "width", "height", "overflow", "display"], de = (e) => ae.includes(e), le = R({
106
+ }, de = ["spacing", "indent", "gap", "width", "height", "overflow", "display"], ae = (e) => de.includes(e), le = R({
107
107
  row: {
108
108
  property: "flexDirection",
109
109
  transform: (e) => e ? "row" : "column"
@@ -128,7 +128,7 @@ const ce = _.hr`
128
128
  }
129
129
  }
130
130
  }), b = _("div", {
131
- shouldForwardProp: (e) => typeof e == "string" ? de(e) ? !1 : F(e) : !1
131
+ shouldForwardProp: (e) => typeof e == "string" ? ae(e) ? !1 : F(e) : !1
132
132
  })`
133
133
  --current-spacing: 0;
134
134
  --current-indent: 0;
@@ -187,7 +187,7 @@ const ce = _.hr`
187
187
  }) => e ? `border: ${e};` : ""}
188
188
  }
189
189
  `, Ge = f(function(t, n) {
190
- return /* @__PURE__ */ d(b, {
190
+ return /* @__PURE__ */ a(b, {
191
191
  ref: n,
192
192
  ...t
193
193
  });
@@ -222,12 +222,12 @@ const ce = _.hr`
222
222
  ...n
223
223
  }, r) {
224
224
  const o = w(null), s = r != null ? r : o;
225
- return fe(s, t), /* @__PURE__ */ d(b, {
225
+ return fe(s, t), /* @__PURE__ */ a(b, {
226
226
  ...n,
227
227
  ref: r
228
228
  });
229
229
  }), Qe = f(function(t, n) {
230
- return /* @__PURE__ */ d(b, {
230
+ return /* @__PURE__ */ a(b, {
231
231
  row: !0,
232
232
  ref: n,
233
233
  ...t
@@ -236,7 +236,7 @@ const ce = _.hr`
236
236
  num: t = 1,
237
237
  ...n
238
238
  }, r) {
239
- return /* @__PURE__ */ d(b, {
239
+ return /* @__PURE__ */ a(b, {
240
240
  indent: t,
241
241
  ref: r,
242
242
  ...n
@@ -245,7 +245,7 @@ const ce = _.hr`
245
245
  num: t = 1,
246
246
  ...n
247
247
  }, r) {
248
- return /* @__PURE__ */ d(b, {
248
+ return /* @__PURE__ */ a(b, {
249
249
  spacing: t,
250
250
  ref: r,
251
251
  ...n
@@ -262,7 +262,7 @@ const ce = _.hr`
262
262
  vertical: r = !1
263
263
  }) => {
264
264
  const o = n * (e ? 0.5 : 1);
265
- return /* @__PURE__ */ d(pe, {
265
+ return /* @__PURE__ */ a(pe, {
266
266
  style: {
267
267
  ["--current-size"]: o,
268
268
  height: t ? 1 : void 0,
@@ -273,9 +273,9 @@ const ce = _.hr`
273
273
  children: e,
274
274
  nest: t,
275
275
  render: n
276
- }) => t ? /* @__PURE__ */ d(I, {
276
+ }) => t ? /* @__PURE__ */ a(I, {
277
277
  children: n(e)
278
- }) : /* @__PURE__ */ d(I, {
278
+ }) : /* @__PURE__ */ a(I, {
279
279
  children: e
280
280
  }), we = "_text_1iisw_1", ve = "_standard_1iisw_24", ge = "_bold_1iisw_27", be = "_caption_1iisw_31", $e = "_overline_1iisw_39", _e = "_large_1iisw_48", xe = "_medium_1iisw_53", ye = "_small_1iisw_58", Ee = "_smaller_1iisw_63", y = {
281
281
  text: we,
@@ -297,8 +297,8 @@ const ce = _.hr`
297
297
  whiteSpace: c,
298
298
  wordBreak: i,
299
299
  style: u,
300
- ...a
301
- }, l) => /* @__PURE__ */ d("span", {
300
+ ...d
301
+ }, l) => /* @__PURE__ */ a("span", {
302
302
  className: T(y.text, y[t], y[n], r),
303
303
  ref: l,
304
304
  style: {
@@ -308,21 +308,21 @@ const ce = _.hr`
308
308
  wordBreak: i,
309
309
  ...u
310
310
  },
311
- ...a,
311
+ ...d,
312
312
  children: e
313
- })), tt = $, nt = (e) => /* @__PURE__ */ d($, {
313
+ })), tt = $, nt = (e) => /* @__PURE__ */ a($, {
314
314
  size: "small",
315
315
  ...e
316
- }), rt = (e) => /* @__PURE__ */ d($, {
316
+ }), rt = (e) => /* @__PURE__ */ a($, {
317
317
  size: "smaller",
318
318
  ...e
319
- }), ot = (e) => /* @__PURE__ */ d($, {
319
+ }), ot = (e) => /* @__PURE__ */ a($, {
320
320
  size: "medium",
321
321
  ...e
322
- }), st = (e) => /* @__PURE__ */ d($, {
322
+ }), st = (e) => /* @__PURE__ */ a($, {
323
323
  size: "large",
324
324
  ...e
325
- }), Ie = "_heading_8a8m8_1", Se = "_h1_8a8m8_14", Ce = "_h2_8a8m8_19", De = "_h3_8a8m8_24", Te = "_h4_8a8m8_29", Me = "_h5_8a8m8_35", Oe = "_h6_8a8m8_41", S = {
325
+ }), Ie = "_heading_1fcct_1", Se = "_h1_1fcct_15", Ce = "_h2_1fcct_19", De = "_h3_1fcct_23", Te = "_h4_1fcct_27", Me = "_h5_1fcct_32", Oe = "_h6_1fcct_37", S = {
326
326
  heading: Ie,
327
327
  h1: Se,
328
328
  h2: Ce,
@@ -340,9 +340,9 @@ const ce = _.hr`
340
340
  children: c,
341
341
  as: i,
342
342
  ...u
343
- }, a) => {
343
+ }, d) => {
344
344
  const l = i != null ? i : e;
345
- return /* @__PURE__ */ d(l, {
345
+ return /* @__PURE__ */ a(l, {
346
346
  className: T(S.heading, S[e], t),
347
347
  style: {
348
348
  color: n,
@@ -350,35 +350,35 @@ const ce = _.hr`
350
350
  wordBreak: o,
351
351
  ...s
352
352
  },
353
- ref: a,
353
+ ref: d,
354
354
  ...u,
355
355
  children: c
356
356
  });
357
- }), ct = (e) => /* @__PURE__ */ d(ke, {
357
+ }), ct = (e) => /* @__PURE__ */ a(ke, {
358
358
  variant: "h2",
359
359
  ...e
360
360
  }), Le = (e, t) => e === t, ut = (e, t, n = Le) => {
361
361
  const r = h(
362
362
  (u) => {
363
- e.some((a) => n(a, u)) || t([...e, u]);
363
+ e.some((d) => n(d, u)) || t([...e, u]);
364
364
  },
365
365
  [e, t, n]
366
366
  ), o = h(
367
367
  (u) => {
368
368
  t(
369
- u.reduce((a, l) => a.some((g) => n(g, l)) ? a : [...a, l], e)
369
+ u.reduce((d, l) => d.some((g) => n(g, l)) ? d : [...d, l], e)
370
370
  );
371
371
  },
372
372
  [e, t, n]
373
373
  ), s = h(
374
374
  (u) => {
375
- const a = e.findIndex((l) => n(l, u));
376
- a >= 0 && t(e.filter((l, g) => g !== a));
375
+ const d = e.findIndex((l) => n(l, u));
376
+ d >= 0 && t(e.filter((l, g) => g !== d));
377
377
  },
378
378
  [e, t, n]
379
379
  ), c = h(
380
380
  (u) => {
381
- t(e.filter((a) => !u.some((l) => n(l, a))));
381
+ t(e.filter((d) => !u.some((l) => n(l, d))));
382
382
  },
383
383
  [e, t, n]
384
384
  ), i = h(
@@ -413,7 +413,7 @@ const ce = _.hr`
413
413
  clearTimeout(o);
414
414
  };
415
415
  }, [e, t]), n;
416
- }, at = (e, t) => {
416
+ }, dt = (e, t) => {
417
417
  const [n, r] = p(e);
418
418
  return m(() => {
419
419
  e && r(!0);
@@ -426,7 +426,7 @@ const ce = _.hr`
426
426
  }, [e, t]), n;
427
427
  };
428
428
  let ze = 0;
429
- const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
429
+ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, at = (e) => {
430
430
  const [t, n] = p(() => C(e));
431
431
  return m(() => n(C(e)), [e]), t;
432
432
  }, v = (e, t, n) => {
@@ -575,8 +575,8 @@ export {
575
575
  ut as useArraySet,
576
576
  E as useBoolean,
577
577
  it as useDebounce,
578
- at as useDelayedFalse,
579
- dt as useDomId,
578
+ dt as useDelayedFalse,
579
+ at as useDomId,
580
580
  fe as useElementDimensions,
581
581
  lt as useElementFocus,
582
582
  v as useEventListener,
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{var e=document.createElement("style");e.appendChild(document.createTextNode("._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._heading_8a8m8_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);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_8a8m8_1._h1_8a8m8_14{--swui-heading-font-size: 2.8rem;--swui-heading-line-height: 4rem}._heading_8a8m8_1._h2_8a8m8_19{--swui-heading-font-size: 2.4rem;--swui-heading-line-height: 3.2rem}._heading_8a8m8_1._h3_8a8m8_24{--swui-heading-font-size: 2rem;--swui-heading-line-height: 2.4rem}._heading_8a8m8_1._h4_8a8m8_29{--swui-heading-font-size: 1.6rem;--swui-heading-line-height: 2.4rem;font-weight:var(--swui-font-weight-text-bold)}._heading_8a8m8_1._h5_8a8m8_35{--swui-heading-font-size: 1.4rem;--swui-heading-line-height: 1.6rem;font-weight:var(--swui-font-weight-text-bold)}._heading_8a8m8_1._h6_8a8m8_41{--swui-heading-font-size: 1.2rem;--swui-heading-line-height: 1.6rem;font-weight:var(--swui-font-weight-text-bold)}")),document.head.appendChild(e)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("@stenajs-webui/theme");const L=require("@emotion/styled"),r=require("react"),l=require("react/jsx-runtime"),F=require("@emotion/is-prop-valid"),i=require("styled-system"),z=require("classnames"),N=require("react-dom"),C=require("lodash"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function P(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 x=$(L),q=$(F),I=$(z),H=P(N),A=x.default.hr`
1
+ (function(){"use strict";try{var t=document.createElement("style");t.appendChild(document.createTextNode("._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._heading_1fcct_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);--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_1fcct_1._h1_1fcct_15{--swui-heading-font-size: 2.8rem}._heading_1fcct_1._h2_1fcct_19{--swui-heading-font-size: 2.4rem}._heading_1fcct_1._h3_1fcct_23{--swui-heading-font-size: 2rem}._heading_1fcct_1._h4_1fcct_27{--swui-heading-font-size: 1.6rem;font-weight:var(--swui-font-weight-text-bold)}._heading_1fcct_1._h5_1fcct_32{--swui-heading-font-size: 1.4rem;font-weight:var(--swui-font-weight-text-bold)}._heading_1fcct_1._h6_1fcct_37{--swui-heading-font-size: 1.2rem;font-weight:var(--swui-font-weight-text-bold)}")),document.head.appendChild(t)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("@stenajs-webui/theme");const L=require("@emotion/styled"),r=require("react"),l=require("react/jsx-runtime"),F=require("@emotion/is-prop-valid"),a=require("styled-system"),z=require("classnames"),N=require("react-dom"),C=require("lodash"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function P(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 x=$(L),q=$(F),I=$(z),H=P(N),A=x.default.hr`
3
3
  display: flex;
4
4
  border: 0;
5
5
  margin: 0;
@@ -30,7 +30,7 @@
30
30
  ${({width:e})=>e?`width: ${e};`:""}
31
31
  ${({height:e})=>e?`height: ${e};`:""}
32
32
  ${({borderRadius:e})=>e?`border-radius: ${e};`:""}
33
- `,B=r.forwardRef(({disableFocusHighlight:e,onClick:t,onDblClick:n,tooltip:s,disableOpacityOnClick:o,disablePointer:u,opacityOnHover:c,disabled:d,children:a,background:f="transparent",hoverBackground:m,focusBackground:p,type:T="button",...k},D)=>{const M=!!(t||n);return l.jsx(U,{opacityOnHover:c,title:s,disabled:d,disableOpacityOnClick:o,onClick:t,onDoubleClick:n,disableFocusHighlight:e,pointer:M&&!u,ref:D,background:f,hoverBackground:m,focusBackground:p,type:T,...k,children:a})}),g=e=>e==null?0:typeof e=="boolean"?e?1:0:e,K={box:"var(--swui-shadow-box)",popover:"var(--swui-shadow-popover)",modal:"var(--swui-shadow-modal)"},W=["spacing","indent","gap","width","height","overflow","display"],G=e=>W.includes(e),J=i.system({row:{property:"flexDirection",transform:e=>e?"row":"column"},indent:{property:"--current-indent",transform:g},spacing:{property:"--current-spacing",transform:g},gap:{property:"--current-gap",transform:g},shadow:{property:"boxShadow",transform:e=>{var t;return(t=K[e])!=null?t:e}}}),b=x.default("div",{shouldForwardProp:e=>typeof e=="string"?G(e)?!1:q.default(e):!1})`
33
+ `,B=r.forwardRef(({disableFocusHighlight:e,onClick:t,onDblClick:n,tooltip:s,disableOpacityOnClick:o,disablePointer:c,opacityOnHover:u,disabled:d,children:i,background:f="transparent",hoverBackground:m,focusBackground:p,type:T="button",...k},D)=>{const M=!!(t||n);return l.jsx(U,{opacityOnHover:u,title:s,disabled:d,disableOpacityOnClick:o,onClick:t,onDoubleClick:n,disableFocusHighlight:e,pointer:M&&!c,ref:D,background:f,hoverBackground:m,focusBackground:p,type:T,...k,children:i})}),g=e=>e==null?0:typeof e=="boolean"?e?1:0:e,K={box:"var(--swui-shadow-box)",popover:"var(--swui-shadow-popover)",modal:"var(--swui-shadow-modal)"},W=["spacing","indent","gap","width","height","overflow","display"],G=e=>W.includes(e),J=a.system({row:{property:"flexDirection",transform:e=>e?"row":"column"},indent:{property:"--current-indent",transform:g},spacing:{property:"--current-spacing",transform:g},gap:{property:"--current-gap",transform:g},shadow:{property:"boxShadow",transform:e=>{var t;return(t=K[e])!=null?t:e}}}),b=x.default("div",{shouldForwardProp:e=>typeof e=="string"?G(e)?!1:q.default(e):!1})`
34
34
  --current-spacing: 0;
35
35
  --current-indent: 0;
36
36
  --current-gap: 0;
@@ -38,26 +38,26 @@
38
38
  display: flex;
39
39
  flex-direction: column;
40
40
  ${J};
41
- ${i.background};
42
- ${i.border};
43
- ${i.borderRight};
44
- ${i.borderLeft};
45
- ${i.borderTop};
46
- ${i.borderBottom};
47
- ${i.borderColor};
48
- ${i.borderRadius};
49
- ${i.borderStyle};
50
- ${i.borderWidth};
51
- ${i.boxShadow};
52
- ${i.flexbox};
53
- ${i.overflow};
54
- ${i.position};
55
- ${i.layout};
56
- ${i.zIndex};
57
- ${i.left};
58
- ${i.right};
59
- ${i.top};
60
- ${i.bottom};
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};
61
61
 
62
62
  gap: calc(var(--current-gap) * var(--swui-metrics-space));
63
63
 
@@ -75,10 +75,10 @@
75
75
  ${({focusWithinBackground:e})=>e?`background: ${e};`:""}
76
76
  ${({focusWithinBorder:e})=>e?`border: ${e};`:""}
77
77
  }
78
- `,Q=r.forwardRef(function(t,n){return l.jsx(b,{ref:n,...t})}),O=e=>{const{x:t,y:n,width:s,height:o,bottom:u,top:c,left:d,right:a}=e.getBoundingClientRect();return{width:s,height:o,top:c,left:d,x:t,y:n,right:a,bottom:u}},X=(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||!X(n,u))&&t&&t(u),s(u)}})},[e,n,s,t]);return r.useLayoutEffect(()=>{o()},[o]),{dimensions:n}},Y=r.forwardRef(function({onResize:t,...n},s){const o=r.useRef(null),u=s!=null?s:o;return R(u,t),l.jsx(b,{...n,ref:s})}),Z=r.forwardRef(function(t,n){return l.jsx(b,{row:!0,ref:n,...t})}),ee=r.forwardRef(function({num:t=1,...n},s){return l.jsx(b,{indent:t,ref:s,...n})}),te=r.forwardRef(function({num:t=1,...n},s){return l.jsx(b,{spacing:t,ref:s,...n})}),ne=x.default.div`
78
+ `,Q=r.forwardRef(function(t,n){return l.jsx(b,{ref:n,...t})}),O=e=>{const{x:t,y:n,width:s,height:o,bottom:c,top:u,left:d,right:i}=e.getBoundingClientRect();return{width:s,height:o,top:u,left:d,x:t,y:n,right:i,bottom:c}},X=(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 c=O(e.current);(!n||!X(n,c))&&t&&t(c),s(c)}})},[e,n,s,t]);return r.useLayoutEffect(()=>{o()},[o]),{dimensions:n}},Y=r.forwardRef(function({onResize:t,...n},s){const o=r.useRef(null),c=s!=null?s:o;return R(c,t),l.jsx(b,{...n,ref:s})}),Z=r.forwardRef(function(t,n){return l.jsx(b,{row:!0,ref:n,...t})}),ee=r.forwardRef(function({num:t=1,...n},s){return l.jsx(b,{indent:t,ref:s,...n})}),te=r.forwardRef(function({num:t=1,...n},s){return l.jsx(b,{spacing:t,ref:s,...n})}),ne=x.default.div`
79
79
  --current-size: 1;
80
80
  flex: none;
81
81
  width: calc(var(--current-size) * var(--swui-metrics-space));
82
82
  height: calc(var(--current-size) * var(--swui-metrics-space));
83
- `,se=({half:e=!1,horizontal:t=!1,num:n=1,vertical:s=!1})=>{const o=n*(e?.5:1);return l.jsx(ne,{style:{["--current-size"]:o,height:t?1:void 0,width:s?1:void 0}})},re=({children:e,nest:t,render:n})=>t?l.jsx(l.Fragment,{children:n(e)}):l.jsx(l.Fragment,{children:e}),oe="_text_1iisw_1",ue="_standard_1iisw_24",ce="_bold_1iisw_27",ae="_caption_1iisw_31",ie="_overline_1iisw_39",de="_large_1iisw_48",le="_medium_1iisw_53",fe="_small_1iisw_58",me="_smaller_1iisw_63",_={text:oe,standard:ue,bold:ce,caption:ae,overline:ie,large:de,medium:le,small:fe,smaller:me},w=r.forwardRef(({children:e,variant:t="standard",size:n="medium",className:s,color:o,userSelect:u,whiteSpace:c,wordBreak:d,style:a,...f},m)=>l.jsx("span",{className:I.default(_.text,_[t],_[n],s),ref:m,style:{color:o,userSelect:u,whiteSpace:c,wordBreak:d,...a},...f,children:e})),he=w,be=e=>l.jsx(w,{size:"small",...e}),we=e=>l.jsx(w,{size:"smaller",...e}),pe=e=>l.jsx(w,{size:"medium",...e}),ge=e=>l.jsx(w,{size:"large",...e}),xe="_heading_8a8m8_1",ve="_h1_8a8m8_14",_e="_h2_8a8m8_19",$e="_h3_8a8m8_24",Ee="_h4_8a8m8_29",ye="_h5_8a8m8_35",Se="_h6_8a8m8_41",E={heading:xe,h1:ve,h2:_e,h3:$e,h4:Ee,h5:ye,h6:Se},j=r.forwardRef(({variant:e="h3",className:t,color:n,whiteSpace:s,wordBreak:o,style:u,children:c,as:d,...a},f)=>{const m=d!=null?d:e;return l.jsx(m,{className:I.default(E.heading,E[e],t),style:{color:n,whiteSpace:s,wordBreak:o,...u},ref:f,...a,children:c})}),Ce=e=>l.jsx(j,{variant:"h2",...e}),Ie=(e,t)=>e===t,Oe=(e,t,n=Ie)=>{const s=r.useCallback(a=>{e.some(f=>n(f,a))||t([...e,a])},[e,t,n]),o=r.useCallback(a=>{t(a.reduce((f,m)=>f.some(p=>n(p,m))?f:[...f,m],e))},[e,t,n]),u=r.useCallback(a=>{const f=e.findIndex(m=>n(m,a));f>=0&&t(e.filter((m,p)=>p!==f))},[e,t,n]),c=r.useCallback(a=>{t(e.filter(f=>!a.some(m=>n(m,f))))},[e,t,n]),d=r.useCallback(a=>{e.some(m=>n(m,a))?u(a):s(a)},[e,s,u,n]);return{add:s,addMultiple:o,remove:u,removeMultiple:c,toggle:d}},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]},Re=(e,t)=>{const[n,s]=r.useState(e);return r.useEffect(()=>{const o=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},je=(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 Te=0;const y=e=>`webui-${e?e+"-":""}${++Te}`,ke=e=>{const[t,n]=r.useState(()=>y(e));return r.useEffect(()=>n(y(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=d=>{if(s.current)return s.current(d)};if(!e.current)return;const c=e.current;return c.addEventListener(t,u),()=>{c&&c.removeEventListener(t,u)}},[t,e])},De=e=>{const[t,n,s]=v(!1);r.useEffect(()=>{document.activeElement===H.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}},Me=e=>{const[t,n,s]=v(!1);return h(e,"mouseover",n),h(e,"mouseout",s),t},Le=e=>{const[t,n,s]=v(!1);return h(e,"mouseenter",n),h(e,"mouseleave",s),t},Fe=(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])},ze=(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"],Ne=(e,t)=>{const n=r.useRef(()=>{});r.useEffect(()=>{n.current=e},[e]),r.useEffect(()=>{const s=C.debounce(n.current,t);return S.forEach(o=>window.addEventListener(o,s)),()=>{S.forEach(o=>window.removeEventListener(o,s))}},[t])},Pe=(e,t)=>{const[n,s]=r.useState(!1),{rootMargin:o,root:u,threshold:c}=t||{},d=r.useMemo(()=>new IntersectionObserver(([a])=>s(a.isIntersecting),{rootMargin:o,root:u,threshold:c}),[s,o,u,c]);return r.useEffect(()=>(e.current&&d.observe(e.current),()=>{d.disconnect()}),[d,e]),n},qe=e=>{const t=r.useRef(null);return r.useEffect(()=>{!e||(typeof e=="function"?e(t.current):e.current=t.current)}),t},He=(e,t,n=!0)=>{const[s,o]=r.useState(e),u=r.useRef(),c=r.useCallback((d,a=t)=>{o(d),n&&clearTimeout(u.current),u.current=setTimeout(()=>o(e),a)},[t,n,e]);return r.useEffect(()=>()=>{clearTimeout(u.current)},[]),[s,c]},Ae=e=>{throw new Error(`Switch unhandled case: ${e}`)},Ve=(e,t)=>t,Ue=e=>Object.keys(e).filter(t=>e[t]),Be=e=>C.pickBy(e,Ke),Ke=(e,t)=>We(t),We=e=>e.startsWith("data-")||e.startsWith("aria-"),Ge=e=>{try{const t=parseFloat(e);return isNaN(t)||t==null?void 0:t}catch{}},Je=e=>{try{const t=parseInt(e,10);return isNaN(t)||t==null?void 0:t}catch{}};exports.Box=b;exports.Clickable=B;exports.Column=Q;exports.HeaderText=Ce;exports.Heading=j;exports.Indent=ee;exports.LargeText=ge;exports.Nest=re;exports.ResizeAwareBox=Y;exports.Row=Z;exports.SeparatorLine=V;exports.SmallText=be;exports.SmallerText=we;exports.Space=se;exports.Spacing=te;exports.StandardText=pe;exports.Text=w;exports.Txt=he;exports.booleanOrNumberToNumber=g;exports.exhaustSwitchCase=Ve;exports.exhaustSwitchCaseElseThrow=Ae;exports.getDataProps=Be;exports.getDimensionObject=O;exports.parseFloatElseUndefined=Ge;exports.parseIntElseUndefined=Je;exports.truthyKeysAsList=Ue;exports.useArraySet=Oe;exports.useBoolean=v;exports.useDebounce=Re;exports.useDelayedFalse=je;exports.useDomId=ke;exports.useElementDimensions=R;exports.useElementFocus=De;exports.useEventListener=h;exports.useForwardedRef=qe;exports.useMouseIsEntered=Le;exports.useMouseIsOver=Me;exports.useMultiOnClickOutside=Fe;exports.useOnClickOutside=ze;exports.useOnNoMouseMovement=Ne;exports.useOnScreen=Pe;exports.useTimeoutState=He;
83
+ `,se=({half:e=!1,horizontal:t=!1,num:n=1,vertical:s=!1})=>{const o=n*(e?.5:1);return l.jsx(ne,{style:{["--current-size"]:o,height:t?1:void 0,width:s?1:void 0}})},re=({children:e,nest:t,render:n})=>t?l.jsx(l.Fragment,{children:n(e)}):l.jsx(l.Fragment,{children:e}),oe="_text_1iisw_1",ce="_standard_1iisw_24",ue="_bold_1iisw_27",ie="_caption_1iisw_31",ae="_overline_1iisw_39",de="_large_1iisw_48",le="_medium_1iisw_53",fe="_small_1iisw_58",me="_smaller_1iisw_63",_={text:oe,standard:ce,bold:ue,caption:ie,overline:ae,large:de,medium:le,small:fe,smaller:me},w=r.forwardRef(({children:e,variant:t="standard",size:n="medium",className:s,color:o,userSelect:c,whiteSpace:u,wordBreak:d,style:i,...f},m)=>l.jsx("span",{className:I.default(_.text,_[t],_[n],s),ref:m,style:{color:o,userSelect:c,whiteSpace:u,wordBreak:d,...i},...f,children:e})),he=w,be=e=>l.jsx(w,{size:"small",...e}),we=e=>l.jsx(w,{size:"smaller",...e}),pe=e=>l.jsx(w,{size:"medium",...e}),ge=e=>l.jsx(w,{size:"large",...e}),xe="_heading_1fcct_1",ve="_h1_1fcct_15",_e="_h2_1fcct_19",$e="_h3_1fcct_23",Ee="_h4_1fcct_27",ye="_h5_1fcct_32",Se="_h6_1fcct_37",E={heading:xe,h1:ve,h2:_e,h3:$e,h4:Ee,h5:ye,h6:Se},j=r.forwardRef(({variant:e="h3",className:t,color:n,whiteSpace:s,wordBreak:o,style:c,children:u,as:d,...i},f)=>{const m=d!=null?d:e;return l.jsx(m,{className:I.default(E.heading,E[e],t),style:{color:n,whiteSpace:s,wordBreak:o,...c},ref:f,...i,children:u})}),Ce=e=>l.jsx(j,{variant:"h2",...e}),Ie=(e,t)=>e===t,Oe=(e,t,n=Ie)=>{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(p=>n(p,m))?f:[...f,m],e))},[e,t,n]),c=r.useCallback(i=>{const f=e.findIndex(m=>n(m,i));f>=0&&t(e.filter((m,p)=>p!==f))},[e,t,n]),u=r.useCallback(i=>{t(e.filter(f=>!i.some(m=>n(m,f))))},[e,t,n]),d=r.useCallback(i=>{e.some(m=>n(m,i))?c(i):s(i)},[e,s,c,n]);return{add:s,addMultiple:o,remove:c,removeMultiple:u,toggle:d}},v=e=>{const[t,n]=r.useState(e),s=r.useCallback(()=>{n(!0)},[n]),o=r.useCallback(()=>{n(!1)},[n]),c=r.useCallback(()=>{n(u=>!u)},[n]);return[t,s,o,c]},Re=(e,t)=>{const[n,s]=r.useState(e);return r.useEffect(()=>{const o=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},je=(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 Te=0;const y=e=>`webui-${e?e+"-":""}${++Te}`,ke=e=>{const[t,n]=r.useState(()=>y(e));return r.useEffect(()=>n(y(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 c=d=>{if(s.current)return s.current(d)};if(!e.current)return;const u=e.current;return u.addEventListener(t,c),()=>{u&&u.removeEventListener(t,c)}},[t,e])},De=e=>{const[t,n,s]=v(!1);r.useEffect(()=>{document.activeElement===H.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]),c=r.useCallback(()=>{e.current&&e.current.blur()},[e]);return{isInFocus:t,focus:o,blur:c}},Me=e=>{const[t,n,s]=v(!1);return h(e,"mouseover",n),h(e,"mouseout",s),t},Le=e=>{const[t,n,s]=v(!1);return h(e,"mouseenter",n),h(e,"mouseleave",s),t},Fe=(e,t)=>{const n=r.useRef(()=>{});r.useEffect(()=>{n.current=t},[t]),r.useEffect(()=>{const s=o=>{!e.filter(u=>u.current).every(u=>u.current&&!u.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])},ze=(e,t,n)=>{const s=r.useRef(()=>{});r.useEffect(()=>{s.current=t},[t]),r.useEffect(()=>{const o=c=>{!e.current||e.current.contains(c.target)||s.current(c)};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"],Ne=(e,t)=>{const n=r.useRef(()=>{});r.useEffect(()=>{n.current=e},[e]),r.useEffect(()=>{const s=C.debounce(n.current,t);return S.forEach(o=>window.addEventListener(o,s)),()=>{S.forEach(o=>window.removeEventListener(o,s))}},[t])},Pe=(e,t)=>{const[n,s]=r.useState(!1),{rootMargin:o,root:c,threshold:u}=t||{},d=r.useMemo(()=>new IntersectionObserver(([i])=>s(i.isIntersecting),{rootMargin:o,root:c,threshold:u}),[s,o,c,u]);return r.useEffect(()=>(e.current&&d.observe(e.current),()=>{d.disconnect()}),[d,e]),n},qe=e=>{const t=r.useRef(null);return r.useEffect(()=>{!e||(typeof e=="function"?e(t.current):e.current=t.current)}),t},He=(e,t,n=!0)=>{const[s,o]=r.useState(e),c=r.useRef(),u=r.useCallback((d,i=t)=>{o(d),n&&clearTimeout(c.current),c.current=setTimeout(()=>o(e),i)},[t,n,e]);return r.useEffect(()=>()=>{clearTimeout(c.current)},[]),[s,u]},Ae=e=>{throw new Error(`Switch unhandled case: ${e}`)},Ve=(e,t)=>t,Ue=e=>Object.keys(e).filter(t=>e[t]),Be=e=>C.pickBy(e,Ke),Ke=(e,t)=>We(t),We=e=>e.startsWith("data-")||e.startsWith("aria-"),Ge=e=>{try{const t=parseFloat(e);return isNaN(t)||t==null?void 0:t}catch{}},Je=e=>{try{const t=parseInt(e,10);return isNaN(t)||t==null?void 0:t}catch{}};exports.Box=b;exports.Clickable=B;exports.Column=Q;exports.HeaderText=Ce;exports.Heading=j;exports.Indent=ee;exports.LargeText=ge;exports.Nest=re;exports.ResizeAwareBox=Y;exports.Row=Z;exports.SeparatorLine=V;exports.SmallText=be;exports.SmallerText=we;exports.Space=se;exports.Spacing=te;exports.StandardText=pe;exports.Text=w;exports.Txt=he;exports.booleanOrNumberToNumber=g;exports.exhaustSwitchCase=Ve;exports.exhaustSwitchCaseElseThrow=Ae;exports.getDataProps=Be;exports.getDimensionObject=O;exports.parseFloatElseUndefined=Ge;exports.parseIntElseUndefined=Je;exports.truthyKeysAsList=Ue;exports.useArraySet=Oe;exports.useBoolean=v;exports.useDebounce=Re;exports.useDelayedFalse=je;exports.useDomId=ke;exports.useElementDimensions=R;exports.useElementFocus=De;exports.useEventListener=h;exports.useForwardedRef=qe;exports.useMouseIsEntered=Le;exports.useMouseIsOver=Me;exports.useMultiOnClickOutside=Fe;exports.useOnClickOutside=ze;exports.useOnNoMouseMovement=Ne;exports.useOnScreen=Pe;exports.useTimeoutState=He;
84
84
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stenajs-webui/core",
3
- "version": "18.11.2-next.0",
3
+ "version": "18.12.0",
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": "b4a6516a1b43f928a5c5b1a76567b752447e9f89",
60
+ "gitHead": "d0bc10e9bd393ffa69851bed86e6929d632aae2a",
61
61
  "dependencies": {
62
62
  "@emotion/is-prop-valid": "^1.1.0",
63
- "@stenajs-webui/theme": "18.11.2-next.0",
63
+ "@stenajs-webui/theme": "18.12.0",
64
64
  "classnames": "^2.3.1"
65
65
  }
66
66
  }