@stenajs-webui/core 19.0.0-next.3 → 19.0.0-next.30

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