@stenajs-webui/core 19.0.0-next.7 → 19.0.0-next.71

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