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