@stenajs-webui/core 19.0.0-next.9 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,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";
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";
5
3
  import { jsx as d, 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`
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,120 +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__ */ d(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: a = "transparent",
82
- hoverBackground: l,
83
- focusBackground: g,
84
- type: M = "button",
85
- ...O
86
- }, k) => /* @__PURE__ */ d(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: a,
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
98
  modal: "var(--swui-shadow-modal)",
106
99
  bottom: "var(--swui-shadow-bottom)"
107
- }, ae = ["spacing", "indent", "gap", "width", "height", "overflow", "display"], de = (e) => ae.includes(e), le = R({
100
+ }, ae = [
101
+ "spacing",
102
+ "indent",
103
+ "gap",
104
+ "width",
105
+ "height",
106
+ "overflow",
107
+ "display"
108
+ ], le = (e) => ae.includes(e), me = F({
108
109
  row: {
109
110
  property: "flexDirection",
110
111
  transform: (e) => e ? "row" : "column"
111
112
  },
112
113
  indent: {
113
114
  property: "--current-indent",
114
- transform: x
115
+ transform: _
115
116
  },
116
117
  spacing: {
117
118
  property: "--current-spacing",
118
- transform: x
119
+ transform: _
119
120
  },
120
121
  gap: {
121
122
  property: "--current-gap",
122
- transform: x
123
+ transform: _
123
124
  },
124
125
  shadow: {
125
126
  property: "boxShadow",
126
127
  transform: (e) => {
127
128
  var t;
128
- return (t = ie[e]) != null ? t : e;
129
+ return (t = de[e]) != null ? t : e;
129
130
  }
130
131
  }
131
- }), b = _("div", {
132
- shouldForwardProp: (e) => typeof e == "string" ? de(e) ? !1 : F(e) : !1
132
+ }), b = $("div", {
133
+ shouldForwardProp: (e) => typeof e == "string" ? le(e) ? !1 : R(e) : !1
133
134
  })`
134
135
  --current-spacing: 0;
135
136
  --current-indent: 0;
@@ -137,13 +138,12 @@ const ce = _.hr`
137
138
  box-sizing: border-box;
138
139
  display: flex;
139
140
  flex-direction: column;
140
- ${le};
141
- ${H};
141
+ ${me};
142
+ ${j};
142
143
  ${N};
143
144
  ${P};
144
145
  ${V};
145
146
  ${A};
146
- ${j};
147
147
  ${U};
148
148
  ${q};
149
149
  ${W};
@@ -158,41 +158,27 @@ const ce = _.hr`
158
158
  ${ee};
159
159
  ${te};
160
160
  ${ne};
161
+ ${re};
161
162
 
162
163
  gap: calc(var(--current-gap) * var(--swui-metrics-space));
163
164
 
164
165
  padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))
165
166
  calc(var(--current-indent) * var(--swui-metrics-indent));
166
167
  :hover {
167
- ${({
168
- hoverBackground: e
169
- }) => e ? `background: ${e};` : ""}
170
- ${({
171
- hoverBorder: e
172
- }) => e ? `border: ${e};` : ""}
168
+ ${({ hoverBackground: e }) => e ? `background: ${e};` : ""}
169
+ ${({ hoverBorder: e }) => e ? `border: ${e};` : ""}
173
170
  }
174
171
  :focus {
175
- ${({
176
- focusBackground: e
177
- }) => e ? `background: ${e};` : ""}
178
- ${({
179
- focusBorder: e
180
- }) => e ? `border: ${e};` : ""}
172
+ ${({ focusBackground: e }) => e ? `background: ${e};` : ""}
173
+ ${({ focusBorder: e }) => e ? `border: ${e};` : ""}
181
174
  }
182
175
  :focus-within {
183
- ${({
184
- focusWithinBackground: e
185
- }) => e ? `background: ${e};` : ""}
186
- ${({
187
- focusWithinBorder: e
188
- }) => e ? `border: ${e};` : ""}
176
+ ${({ focusWithinBackground: e }) => e ? `background: ${e};` : ""}
177
+ ${({ focusWithinBorder: e }) => e ? `border: ${e};` : ""}
189
178
  }
190
- `, Ge = p(function(t, n) {
191
- return /* @__PURE__ */ d(b, {
192
- ref: n,
193
- ...t
194
- });
195
- }), me = (e) => {
179
+ `, Ye = f(function(t, n) {
180
+ return /* @__PURE__ */ d(b, { ref: n, ...t });
181
+ }), he = (e) => {
196
182
  const { x: t, y: n, width: r, height: o, bottom: s, top: c, left: i, right: u } = e.getBoundingClientRect();
197
183
  return {
198
184
  width: r,
@@ -204,161 +190,125 @@ const ce = _.hr`
204
190
  right: u,
205
191
  bottom: s
206
192
  };
207
- }, 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) => {
208
- 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(() => {
209
195
  window.requestAnimationFrame(() => {
210
196
  if (e.current) {
211
- const s = me(e.current);
212
- (!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);
213
199
  }
214
200
  });
215
201
  }, [e, n, r, t]);
216
- return L(() => {
202
+ return z(() => {
217
203
  o();
218
204
  }, [o]), {
219
205
  dimensions: n
220
206
  };
221
- }, Je = p(function({
222
- onResize: t,
223
- ...n
224
- }, r) {
225
- const o = w(null), s = r != null ? r : o;
226
- return pe(s, t), /* @__PURE__ */ d(b, {
227
- ...n,
228
- ref: r
229
- });
230
- }), Qe = p(function(t, n) {
231
- return /* @__PURE__ */ d(b, {
232
- row: !0,
233
- ref: n,
234
- ...t
235
- });
236
- }), Xe = p(function({
237
- num: t = 1,
238
- ...n
239
- }, r) {
240
- return /* @__PURE__ */ d(b, {
241
- indent: t,
242
- ref: r,
243
- ...n
244
- });
245
- }), Ye = p(function({
246
- num: t = 1,
247
- ...n
248
- }, r) {
249
- return /* @__PURE__ */ d(b, {
250
- spacing: t,
251
- ref: r,
252
- ...n
253
- });
254
- }), 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`
255
221
  --current-size: 1;
256
222
  flex: none;
257
223
  width: calc(var(--current-size) * var(--swui-metrics-space));
258
224
  height: calc(var(--current-size) * var(--swui-metrics-space));
259
- `, Ze = ({
225
+ `, rt = ({
260
226
  half: e = !1,
261
227
  horizontal: t = !1,
262
228
  num: n = 1,
263
229
  vertical: r = !1
264
230
  }) => {
265
231
  const o = n * (e ? 0.5 : 1);
266
- return /* @__PURE__ */ d(fe, {
267
- style: {
268
- ["--current-size"]: o,
269
- height: t ? 1 : void 0,
270
- 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
+ }
271
240
  }
272
- });
273
- }, et = ({
274
- children: e,
275
- nest: t,
276
- render: n
277
- }) => t ? /* @__PURE__ */ d(I, {
278
- children: n(e)
279
- }) : /* @__PURE__ */ d(I, {
280
- children: e
281
- }), 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 = {
282
- text: we,
283
- standard: ve,
284
- bold: ge,
285
- caption: be,
286
- overline: $e,
287
- large: _e,
288
- medium: xe,
289
- small: ye,
290
- smaller: Ee
291
- }, $ = 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 = ({
292
245
  children: e,
293
- variant: t = "standard",
294
- size: n = "medium",
295
- className: r,
296
- color: o,
297
- userSelect: s,
298
- whiteSpace: c,
299
- wordBreak: i,
300
- style: u,
301
- ...a
302
- }, l) => /* @__PURE__ */ d("span", {
303
- className: T(y.text, y[t], y[n], r),
304
- ref: l,
305
- 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,
306
263
  color: o,
307
264
  userSelect: s,
308
265
  whiteSpace: c,
309
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,
310
297
  ...u
311
- },
312
- ...a,
313
- children: e
314
- })), tt = $, nt = (e) => /* @__PURE__ */ d($, {
315
- size: "small",
316
- ...e
317
- }), rt = (e) => /* @__PURE__ */ d($, {
318
- size: "smaller",
319
- ...e
320
- }), ot = (e) => /* @__PURE__ */ d($, {
321
- size: "medium",
322
- ...e
323
- }), st = (e) => /* @__PURE__ */ d($, {
324
- size: "large",
325
- ...e
326
- }), 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 = {
327
- heading: Ie,
328
- h1: Se,
329
- h2: Ce,
330
- h3: De,
331
- h4: Te,
332
- h5: Me,
333
- h6: Oe
334
- }, ke = p(({
335
- variant: e = "h3",
336
- className: t,
337
- color: n,
338
- whiteSpace: r,
339
- wordBreak: o,
340
- style: s,
341
- children: c,
342
- as: i,
343
- ...u
344
- }, a) => {
345
- const l = i != null ? i : e;
346
- return /* @__PURE__ */ d(l, {
347
- className: T(S.heading, S[e], t),
348
- style: {
349
- color: n,
350
- whiteSpace: r,
351
- wordBreak: o,
352
- ...s
353
- },
354
- ref: a,
355
- ...u,
356
- children: c
357
- });
358
- }), ct = (e) => /* @__PURE__ */ d(ke, {
359
- variant: "h2",
360
- ...e
361
- }), 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) => {
362
312
  const r = h(
363
313
  (u) => {
364
314
  e.some((a) => n(a, u)) || t([...e, u]);
@@ -396,7 +346,7 @@ const ce = _.hr`
396
346
  toggle: i
397
347
  };
398
348
  }, E = (e) => {
399
- const [t, n] = f(e), r = h(() => {
349
+ const [t, n] = p(e), r = h(() => {
400
350
  n(!0);
401
351
  }, [n]), o = h(() => {
402
352
  n(!1);
@@ -404,8 +354,8 @@ const ce = _.hr`
404
354
  n((c) => !c);
405
355
  }, [n]);
406
356
  return [t, r, o, s];
407
- }, it = (e, t) => {
408
- const [n, r] = f(e);
357
+ }, ht = (e, t) => {
358
+ const [n, r] = p(e);
409
359
  return m(() => {
410
360
  const o = setTimeout(() => {
411
361
  r(e);
@@ -414,8 +364,8 @@ const ce = _.hr`
414
364
  clearTimeout(o);
415
365
  };
416
366
  }, [e, t]), n;
417
- }, at = (e, t) => {
418
- const [n, r] = f(e);
367
+ }, ft = (e, t) => {
368
+ const [n, r] = p(e);
419
369
  return m(() => {
420
370
  e && r(!0);
421
371
  const o = setTimeout(() => {
@@ -426,12 +376,12 @@ const ce = _.hr`
426
376
  };
427
377
  }, [e, t]), n;
428
378
  };
429
- let ze = 0;
430
- const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
431
- 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));
432
382
  return m(() => n(C(e)), [e]), t;
433
- }, v = (e, t, n) => {
434
- const r = w();
383
+ }, w = (e, t, n) => {
384
+ const r = v();
435
385
  m(() => {
436
386
  r.current = n;
437
387
  }, [n]), m(() => {
@@ -448,25 +398,25 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
448
398
  c && c.removeEventListener(t, s);
449
399
  };
450
400
  }, [t, e]);
451
- }, lt = (e) => {
401
+ }, vt = (e) => {
452
402
  const [t, n, r] = E(!1);
453
403
  m(() => {
454
- document.activeElement === re.findDOMNode(e.current) ? n() : r();
455
- }, [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);
456
406
  const o = h(() => {
457
407
  e.current && e.current.focus();
458
408
  }, [e]), s = h(() => {
459
409
  e.current && e.current.blur();
460
410
  }, [e]);
461
411
  return { isInFocus: t, focus: o, blur: s };
462
- }, mt = (e) => {
412
+ }, wt = (e) => {
463
413
  const [t, n, r] = E(!1);
464
- return v(e, "mouseover", n), v(e, "mouseout", r), t;
465
- }, ht = (e) => {
414
+ return w(e, "mouseover", n), w(e, "mouseout", r), t;
415
+ }, gt = (e) => {
466
416
  const [t, n, r] = E(!1);
467
- return v(e, "mouseenter", n), v(e, "mouseleave", r), t;
468
- }, pt = (e, t) => {
469
- const n = w(() => {
417
+ return w(e, "mouseenter", n), w(e, "mouseleave", r), t;
418
+ }, bt = (e, t) => {
419
+ const n = v(() => {
470
420
  });
471
421
  m(() => {
472
422
  n.current = t;
@@ -478,8 +428,8 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
478
428
  document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
479
429
  };
480
430
  }, [...e]);
481
- }, ft = (e, t, n) => {
482
- const r = w(() => {
431
+ }, xt = (e, t, n) => {
432
+ const r = v(() => {
483
433
  });
484
434
  m(() => {
485
435
  r.current = t;
@@ -491,21 +441,21 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
491
441
  document.removeEventListener("mousedown", o, n), document.removeEventListener("touchstart", o, n);
492
442
  };
493
443
  }, [e, n]);
494
- }, D = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], wt = (e, t) => {
495
- const n = w(() => {
444
+ }, T = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], $t = (e, t) => {
445
+ const n = v(() => {
496
446
  });
497
447
  m(() => {
498
448
  n.current = e;
499
449
  }, [e]), m(() => {
500
- const r = oe(n.current, t);
501
- return D.forEach((o) => window.addEventListener(o, r)), () => {
502
- D.forEach(
450
+ const r = se(n.current, t);
451
+ return T.forEach((o) => window.addEventListener(o, r)), () => {
452
+ T.forEach(
503
453
  (o) => window.removeEventListener(o, r)
504
454
  );
505
455
  };
506
456
  }, [t]);
507
- }, vt = (e, t) => {
508
- 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(
509
459
  ([u]) => r(u.isIntersecting),
510
460
  {
511
461
  rootMargin: o,
@@ -516,13 +466,13 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
516
466
  return m(() => (e.current && i.observe(e.current), () => {
517
467
  i.disconnect();
518
468
  }), [i, e]), n;
519
- }, gt = (e) => {
520
- const t = w(null);
469
+ }, yt = (e) => {
470
+ const t = v(null);
521
471
  return m(() => {
522
472
  !e || (typeof e == "function" ? e(t.current) : e.current = t.current);
523
473
  }), t;
524
- }, bt = (e, t, n = !0) => {
525
- 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(
526
476
  (i, u = t) => {
527
477
  o(i), n && clearTimeout(s.current), s.current = setTimeout(() => o(e), u);
528
478
  },
@@ -531,15 +481,15 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
531
481
  return m(() => () => {
532
482
  clearTimeout(s.current);
533
483
  }, []), [r, c];
534
- }, $t = (e) => {
484
+ }, It = (e) => {
535
485
  throw new Error(`Switch unhandled case: ${e}`);
536
- }, _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) => {
537
487
  try {
538
488
  const t = parseFloat(e);
539
489
  return isNaN(t) || t == null ? void 0 : t;
540
490
  } catch {
541
491
  }
542
- }, It = (e) => {
492
+ }, Dt = (e) => {
543
493
  try {
544
494
  const t = parseInt(e, 10);
545
495
  return isNaN(t) || t == null ? void 0 : t;
@@ -548,46 +498,47 @@ const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
548
498
  };
549
499
  export {
550
500
  b as Box,
551
- Ke as Clickable,
552
- Ge as Column,
553
- ct as HeaderText,
554
- ke as Heading,
555
- Xe as Indent,
556
- st as LargeText,
557
- et as Nest,
558
- Je as ResizeAwareBox,
559
- Qe as Row,
560
- Be as SeparatorLine,
561
- nt as SmallText,
562
- rt as SmallerText,
563
- Ze as Space,
564
- Ye as Spacing,
565
- ot as StandardText,
566
- $ as Text,
567
- tt as Txt,
568
- x as booleanOrNumberToNumber,
569
- _t as exhaustSwitchCase,
570
- $t as exhaustSwitchCaseElseThrow,
571
- yt as getDataProps,
572
- me as getDimensionObject,
573
- Et as parseFloatElseUndefined,
574
- It as parseIntElseUndefined,
575
- xt as truthyKeysAsList,
576
- 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,
577
528
  E as useBoolean,
578
- it as useDebounce,
579
- at as useDelayedFalse,
580
- dt as useDomId,
529
+ ht as useDebounce,
530
+ ft as useDelayedFalse,
531
+ pt as useDomId,
581
532
  pe as useElementDimensions,
582
- lt as useElementFocus,
583
- v as useEventListener,
584
- gt as useForwardedRef,
585
- ht as useMouseIsEntered,
586
- mt as useMouseIsOver,
587
- pt as useMultiOnClickOutside,
588
- ft as useOnClickOutside,
589
- wt as useOnNoMouseMovement,
590
- vt as useOnScreen,
591
- 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
592
543
  };
593
544
  //# sourceMappingURL=index.es.js.map