@stenajs-webui/core 19.0.4 → 19.0.5

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