@webstrail/ui-library 1.0.1 → 1.0.2

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.
Files changed (43) hide show
  1. package/dist/UIProvider-C3ae0nQV.cjs +2 -0
  2. package/dist/UIProvider-C3ae0nQV.cjs.map +1 -0
  3. package/dist/UIProvider-CHECrDaZ.js +466 -0
  4. package/dist/UIProvider-CHECrDaZ.js.map +1 -0
  5. package/dist/core/config/globalConfig.d.ts +54 -0
  6. package/dist/core/config/index.d.ts +1 -0
  7. package/dist/core/index.d.ts +4 -0
  8. package/dist/core/theme/defaultTheme.d.ts +7 -0
  9. package/dist/core/theme/deriveTokens.d.ts +16 -0
  10. package/dist/core/theme/index.d.ts +2 -0
  11. package/dist/core/types/common.d.ts +32 -0
  12. package/dist/core/types/config.d.ts +70 -0
  13. package/dist/core/types/index.d.ts +3 -0
  14. package/dist/core/types/tokens.d.ts +65 -0
  15. package/dist/core/utils/styles.d.ts +19 -0
  16. package/dist/core.cjs +2 -0
  17. package/dist/core.cjs.map +1 -0
  18. package/dist/core.js +344 -0
  19. package/dist/core.js.map +1 -0
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.ts +6 -4
  23. package/dist/index.js +817 -1248
  24. package/dist/index.js.map +1 -1
  25. package/dist/react/components/Button/Button.d.ts +2 -0
  26. package/dist/react/components/Button/Button.types.d.ts +52 -0
  27. package/dist/react/components/Button/index.d.ts +2 -0
  28. package/dist/react/index.d.ts +6 -0
  29. package/dist/react.cjs +2 -0
  30. package/dist/react.cjs.map +1 -0
  31. package/dist/react.js +9 -0
  32. package/dist/react.js.map +1 -0
  33. package/dist/style.css +1 -1
  34. package/dist/web-components/button/button.element.d.ts +59 -0
  35. package/dist/web-components/button/button.styles.d.ts +1 -0
  36. package/dist/web-components/button/button.types.d.ts +21 -0
  37. package/dist/web-components/button/index.d.ts +3 -0
  38. package/dist/web-components/index.d.ts +1 -0
  39. package/dist/web-components.cjs +269 -0
  40. package/dist/web-components.cjs.map +1 -0
  41. package/dist/web-components.js +503 -0
  42. package/dist/web-components.js.map +1 -0
  43. package/package.json +19 -3
package/dist/index.js CHANGED
@@ -1,916 +1,505 @@
1
- import { jsxs as F, jsx as u } from "react/jsx-runtime";
2
- import { createContext as Le, useContext as Ie, useMemo as ke, forwardRef as ce, useId as ge, useRef as fe, useState as N, useImperativeHandle as $e, useEffect as ze } from "react";
3
- const Oe = "_button_cc9s7_1", Ve = "_sizeSmall_cc9s7_57", De = "_sizeMedium_cc9s7_71", He = "_sizeLarge_cc9s7_85", Pe = "_variantPrimary_cc9s7_101", Ge = "_loading_cc9s7_113", Ue = "_variantSecondary_cc9s7_143", je = "_variantOutline_cc9s7_171", Ze = "_variantGhost_cc9s7_227", Ke = "_variantDanger_cc9s7_275", Je = "_fullWidth_cc9s7_305", Qe = "_disabled_cc9s7_315", Xe = "_spinner_cc9s7_349", Ye = "_icon_cc9s7_369", J = {
4
- button: Oe,
5
- sizeSmall: Ve,
6
- sizeMedium: De,
7
- sizeLarge: He,
8
- variantPrimary: Pe,
9
- loading: Ge,
10
- variantSecondary: Ue,
11
- variantOutline: je,
12
- variantGhost: Ze,
13
- variantDanger: Ke,
14
- fullWidth: Je,
15
- disabled: Qe,
16
- spinner: Xe,
17
- icon: Ye
1
+ import { camelToKebab as zi, configureWebstrail as Fi, defaultButtonStyles as Ai, defaultColors as Oi, defaultLayout as Ri, defaultResolvedConfig as Mi, defaultTypography as Vi, getWebstrailConfig as Di, normalizeButtonSize as ji, normalizeDimension as Gi, resetWebstrailConfig as Hi, resolveEffectiveButtonConfig as Ui, subscribeWebstrailConfig as Pi } from "./core.js";
2
+ import { u as pn } from "./UIProvider-CHECrDaZ.js";
3
+ import { B as Zi, U as Ji, a as Qi, d as Xi, c as Yi, e as mi, g as yi, f as li, h as Ni, m as Si, r as Ci, s as si, b as nr } from "./UIProvider-CHECrDaZ.js";
4
+ import { jsxs as q, jsx as c } from "react/jsx-runtime";
5
+ import { forwardRef as on, useId as fn, useRef as tn, useState as N, useImperativeHandle as bn, useEffect as wn, createContext as Bn, useContext as qn } from "react";
6
+ import { WbButton as ir, buttonStyles as rr, registerWbButton as cr } from "./web-components.js";
7
+ const En = "_container_106aw_1", Tn = "_floatingContainer_106aw_15", zn = "_label_106aw_23", Fn = "_requiredAsterisk_106aw_43", An = "_outerWrapper_106aw_55", On = "_inputWrapper_106aw_69", Rn = "_outerIconBox_106aw_77", Mn = "_hasError_106aw_135", Vn = "_disabled_106aw_143", Dn = "_withFloatingLabel_106aw_185", jn = "_floatingLabel_106aw_241", Gn = "_floatingLabelText_106aw_285", Hn = "_withStartIcon_106aw_327", Un = "_floated_106aw_335", Pn = "_input_106aw_69", Kn = "_floatingInput_106aw_437", Zn = "_withEndIcon_106aw_477", Jn = "_startIcon_106aw_485", Qn = "_endIcon_106aw_487", Xn = "_helperText_106aw_507", Yn = "_errorMessage_106aw_519", f = {
8
+ container: En,
9
+ floatingContainer: Tn,
10
+ label: zn,
11
+ requiredAsterisk: Fn,
12
+ outerWrapper: An,
13
+ inputWrapper: On,
14
+ outerIconBox: Rn,
15
+ hasError: Mn,
16
+ disabled: Vn,
17
+ withFloatingLabel: Dn,
18
+ floatingLabel: jn,
19
+ floatingLabelText: Gn,
20
+ withStartIcon: Hn,
21
+ floated: Un,
22
+ input: Pn,
23
+ floatingInput: Kn,
24
+ withEndIcon: Zn,
25
+ startIcon: Jn,
26
+ endIcon: Qn,
27
+ helperText: Xn,
28
+ errorMessage: Yn
18
29
  };
19
- function b(...o) {
20
- const t = [];
21
- for (const i of o)
22
- if (i) {
23
- if (typeof i == "string" || typeof i == "number") {
24
- const c = String(i).trim();
25
- c && t.push(c);
26
- } else if (Array.isArray(i)) {
27
- if (i.length > 0) {
28
- const c = b(...i);
29
- c && t.push(c);
30
+ function d(...rn) {
31
+ const k = [];
32
+ for (const t of rn)
33
+ if (t) {
34
+ if (typeof t == "string" || typeof t == "number") {
35
+ const x = String(t).trim();
36
+ x && k.push(x);
37
+ } else if (Array.isArray(t)) {
38
+ if (t.length > 0) {
39
+ const x = d(...t);
40
+ x && k.push(x);
30
41
  }
31
- } else if (typeof i == "object") {
32
- for (const [c, n] of Object.entries(i))
33
- if (n) {
34
- const f = c.trim();
35
- f && t.push(f);
42
+ } else if (typeof t == "object") {
43
+ for (const [x, I] of Object.entries(t))
44
+ if (I) {
45
+ const h = x.trim();
46
+ h && k.push(h);
36
47
  }
37
48
  }
38
49
  }
39
- return t.join(" ");
50
+ return k.join(" ");
40
51
  }
41
- const Fe = {
42
- colors: {
43
- primary: "#2491eb",
44
- secondary: "#406993",
45
- text: "#1f2937",
46
- textSecondary: "#6b7280",
47
- border: "#d1d5db",
48
- background: "#ffffff",
49
- error: "#dc2626",
50
- success: "#16a34a",
51
- disabled: "#9ca3af",
52
- disabledBackground: "#f3f4f6",
53
- disabledText: "#9ca3af",
54
- focusRing: "rgba(36, 145, 235, 0.35)"
55
- },
56
- typography: {
57
- fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif',
58
- fontSizeSmall: "12px",
59
- fontSizeMedium: "14px",
60
- fontSizeLarge: "16px",
61
- fontWeightNormal: 400,
62
- fontWeightMedium: 500,
63
- fontWeightBold: 600
64
- },
65
- layout: {
66
- borderRadiusSmall: "6px",
67
- borderRadiusMedium: "8px",
68
- borderRadiusLarge: "12px"
69
- },
70
- button: {
71
- height: "40px",
72
- borderRadius: "8px",
73
- fontSize: "14px",
74
- fontWeight: 500,
75
- backgroundColor: "#2491eb",
76
- textColor: "#ffffff",
77
- borderColor: "transparent",
78
- hoverBackgroundColor: "#1d78c4",
79
- hoverTextColor: "#ffffff",
80
- activeBackgroundColor: "#1565a0",
81
- disabledBackgroundColor: "#f3f4f6",
82
- disabledTextColor: "#9ca3af",
83
- disabledBorderColor: "#e5e7eb",
84
- focusRingColor: "rgba(36, 145, 235, 0.35)",
85
- padding: "0 16px",
86
- transition: "all 0.15s ease-in-out"
87
- },
88
- input: {
89
- height: "42px",
90
- borderRadius: "8px",
91
- borderColor: "#d1d5db",
92
- textColor: "#1f2937",
93
- placeholderColor: "#9ca3af",
94
- backgroundColor: "#ffffff",
95
- focusBorderColor: "#2491eb",
96
- focusRingColor: "rgba(36, 145, 235, 0.25)",
97
- errorBorderColor: "#dc2626",
98
- disabledBackgroundColor: "#f3f4f6",
99
- disabledTextColor: "#9ca3af",
100
- disabledBorderColor: "#e5e7eb",
101
- labelColor: "#374151",
102
- helperColor: "#6b7280",
103
- errorColor: "#dc2626",
104
- fontSize: "14px",
105
- padding: "0 14px",
106
- floatingLabel: !0
107
- },
108
- select: {
109
- height: "42px",
110
- borderRadius: "8px",
111
- borderColor: "#d1d5db",
112
- textColor: "#1f2937",
113
- placeholderColor: "#9ca3af",
114
- backgroundColor: "#ffffff",
115
- focusBorderColor: "#2491eb",
116
- focusRingColor: "rgba(36, 145, 235, 0.25)",
117
- errorBorderColor: "#dc2626",
118
- disabledBackgroundColor: "#f3f4f6",
119
- disabledTextColor: "#9ca3af",
120
- dropdownBackgroundColor: "#ffffff",
121
- dropdownBorderColor: "#e5e7eb",
122
- dropdownShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
123
- optionTextColor: "#1f2937",
124
- optionHoverBackgroundColor: "#f3f4f6",
125
- optionHoverTextColor: "#1f2937",
126
- optionSelectedBackgroundColor: "#eff6ff",
127
- optionSelectedTextColor: "#2491eb",
128
- optionSelectedHoverBackgroundColor: "#dbeafe",
129
- optionCheckColor: "#2491eb",
130
- optionBorderRadius: "6px",
131
- optionPadding: "8px 12px",
132
- optionFontSize: "14px",
133
- optionFontWeight: 400,
134
- optionSelectedFontWeight: 500,
135
- labelColor: "#374151",
136
- errorColor: "#dc2626",
137
- fontSize: "14px",
138
- floatingLabel: !0
139
- },
140
- checkbox: {
141
- size: "18px",
142
- borderRadius: "4px",
143
- borderColor: "#d1d5db",
144
- checkedColor: "#2491eb",
145
- checkmarkColor: "#ffffff",
146
- backgroundColor: "#ffffff",
147
- focusRingColor: "rgba(36, 145, 235, 0.35)",
148
- disabledColor: "#d1d5db",
149
- disabledBackgroundColor: "#f3f4f6",
150
- labelColor: "#1f2937",
151
- fontSize: "14px"
152
- },
153
- textarea: {
154
- minHeight: "100px",
155
- borderRadius: "8px",
156
- borderColor: "#d1d5db",
157
- textColor: "#1f2937",
158
- placeholderColor: "#9ca3af",
159
- backgroundColor: "#ffffff",
160
- focusBorderColor: "#2491eb",
161
- focusRingColor: "rgba(36, 145, 235, 0.25)",
162
- errorBorderColor: "#dc2626",
163
- disabledBackgroundColor: "#f3f4f6",
164
- disabledTextColor: "#9ca3af",
165
- disabledBorderColor: "#e5e7eb",
166
- labelColor: "#374151",
167
- helperColor: "#6b7280",
168
- errorColor: "#dc2626",
169
- counterColor: "#9ca3af",
170
- fontSize: "14px",
171
- padding: "10px 14px",
172
- floatingLabel: !0
173
- },
174
- radio: {
175
- size: "18px",
176
- color: "#2491eb",
177
- checkedColor: "#2491eb",
178
- labelColor: "#1f2937",
179
- descriptionColor: "#6b7280",
180
- fontSize: "14px"
181
- },
182
- switch: {
183
- width: "40px",
184
- height: "22px",
185
- thumbSize: "16px",
186
- thumbColor: "#ffffff",
187
- trackColor: "#e2e8f0",
188
- trackCheckedColor: "#2491eb",
189
- focusRingColor: "rgba(36, 145, 235, 0.35)",
190
- borderRadius: "9999px",
191
- disabledOpacity: 0.5,
192
- labelColor: "#1f2937",
193
- descriptionColor: "#6b7280",
194
- fontSize: "14px"
195
- }
196
- }, be = Le(Fe);
197
- be.displayName = "UIContext";
198
- function me() {
199
- return Ie(be);
200
- }
201
- function ve(o) {
202
- return typeof o == "object" && o !== null && !Array.isArray(o);
203
- }
204
- function we(o, t = 0.1) {
205
- if (!o || typeof o != "string") return "rgba(36, 145, 235, 0.1)";
206
- const i = o.trim(), c = i.match(/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/);
207
- if (c) {
208
- const d = parseInt(c[1], 16), h = parseInt(c[2], 16), w = parseInt(c[3], 16);
209
- return `rgba(${d}, ${h}, ${w}, ${t})`;
210
- }
211
- const n = i.match(/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/);
212
- if (n) {
213
- const d = parseInt(n[1] + n[1], 16), h = parseInt(n[2] + n[2], 16), w = parseInt(n[3] + n[3], 16);
214
- return `rgba(${d}, ${h}, ${w}, ${t})`;
215
- }
216
- const f = Math.round(t * 100);
217
- return `color-mix(in srgb, ${i} ${f}%, #ffffff)`;
218
- }
219
- function ye(o, t = 0.25) {
220
- if (!o || typeof o != "string") return "rgba(36, 145, 235, 0.25)";
221
- const i = o.trim(), c = i.match(/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/);
222
- if (c) {
223
- const d = parseInt(c[1], 16), h = parseInt(c[2], 16), w = parseInt(c[3], 16);
224
- return `rgba(${d}, ${h}, ${w}, ${t})`;
225
- }
226
- const n = i.match(/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/);
227
- if (n) {
228
- const d = parseInt(n[1] + n[1], 16), h = parseInt(n[2] + n[2], 16), w = parseInt(n[3] + n[3], 16);
229
- return `rgba(${d}, ${h}, ${w}, ${t})`;
230
- }
231
- const f = Math.round(t * 100);
232
- return `color-mix(in srgb, ${i} ${f}%, transparent)`;
233
- }
234
- function Be(o, t = 0.12) {
235
- if (!o || typeof o != "string") return "#1d78c4";
236
- const i = o.trim(), c = i.match(/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/);
237
- if (c) {
238
- const d = Math.max(0, 1 - t), h = Math.round(parseInt(c[1], 16) * d), w = Math.round(parseInt(c[2], 16) * d), l = Math.round(parseInt(c[3], 16) * d), x = (I) => I.toString(16).padStart(2, "0");
239
- return `#${x(h)}${x(w)}${x(l)}`;
240
- }
241
- const n = i.match(/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/);
242
- if (n) {
243
- const d = Math.max(0, 1 - t), h = Math.round(parseInt(n[1] + n[1], 16) * d), w = Math.round(parseInt(n[2] + n[2], 16) * d), l = Math.round(parseInt(n[3] + n[3], 16) * d), x = (I) => I.toString(16).padStart(2, "0");
244
- return `#${x(h)}${x(w)}${x(l)}`;
245
- }
246
- const f = Math.round((1 - t) * 100);
247
- return `color-mix(in srgb, ${i} ${f}%, #000000)`;
248
- }
249
- function Ce(o) {
250
- const t = we(o, 0.1), i = we(o, 0.18), c = ye(o, 0.25), n = Be(o, 0.12), f = Be(o, 0.22), d = we(o, 0.08);
251
- return {
252
- colors: {
253
- primary: o,
254
- focusRing: c
255
- },
256
- select: {
257
- focusBorderColor: o,
258
- focusRingColor: c,
259
- optionSelectedTextColor: o,
260
- optionCheckColor: o,
261
- optionSelectedBackgroundColor: t,
262
- optionSelectedHoverBackgroundColor: i
263
- },
264
- button: {
265
- backgroundColor: o,
266
- hoverBackgroundColor: n,
267
- activeBackgroundColor: f,
268
- focusRingColor: c,
269
- outlineColor: o,
270
- outlineBorderColor: o,
271
- outlineHoverBackgroundColor: d,
272
- ghostColor: o,
273
- ghostHoverBackgroundColor: d
274
- },
275
- input: {
276
- focusBorderColor: o,
277
- focusRingColor: c
278
- },
279
- checkbox: {
280
- checkedColor: o,
281
- focusRingColor: c
282
- },
283
- textarea: {
284
- focusBorderColor: o,
285
- focusRingColor: c
286
- },
287
- radio: {
288
- color: o,
289
- checkedColor: o,
290
- focusRingColor: c
291
- },
292
- switch: {
293
- trackCheckedColor: o,
294
- focusRingColor: c
295
- }
296
- };
297
- }
298
- function he(o, ...t) {
299
- let i = { ...o };
300
- for (const c of t) {
301
- if (!c || !ve(c))
302
- continue;
303
- const n = { ...i };
304
- for (const f of Object.keys(c)) {
305
- const d = c[f];
306
- if (d === void 0)
307
- continue;
308
- const h = n[f];
309
- ve(h) && ve(d) ? n[f] = he(
310
- h,
311
- d
312
- ) : n[f] = d;
313
- }
314
- i = n;
315
- }
316
- return i;
317
- }
318
- function Se(o, t) {
319
- var c;
320
- if (!t)
321
- return { ...o };
322
- const i = (c = t.colors) == null ? void 0 : c.primary;
323
- if (i && typeof i == "string") {
324
- const n = Ce(i);
325
- return he(o, n, t);
326
- }
327
- return he(o, t);
328
- }
329
- const Ne = /* @__PURE__ */ new Set([
330
- "fontWeight",
331
- "opacity",
332
- "zIndex",
333
- "lineHeight",
334
- "flex",
335
- "flexGrow",
336
- "flexShrink",
337
- "order"
338
- ]);
339
- function se(o) {
340
- return o.replace(/([A-Z])/g, "-$1").toLowerCase();
341
- }
342
- function er(o, t) {
343
- return typeof t == "number" && !Ne.has(o) ? `${t}px` : String(t);
344
- }
345
- function rr(o, t, i) {
346
- return he(
347
- o,
348
- t,
349
- i
350
- );
351
- }
352
- function _e(o, t) {
353
- if (!o)
354
- return {};
355
- const i = {};
356
- for (const [c, n] of Object.entries(o))
357
- if (!(n == null || n === "") && (typeof n == "string" || typeof n == "number")) {
358
- const f = `--${t}-${se(c)}`;
359
- i[f] = er(c, n);
360
- }
361
- return i;
362
- }
363
- function de(o, t) {
364
- const i = me(), c = Fe[o], n = i[o];
365
- return ke(() => {
366
- const f = rr(
367
- c,
368
- n,
369
- t
370
- ), d = _e(
371
- f,
372
- `wui-${o}`
373
- );
374
- return {
375
- resolved: f,
376
- cssVars: d,
377
- getCombinedStyle: (w) => w ? {
378
- ...d,
379
- ...w
380
- } : d
381
- };
382
- }, [o, c, n, t]);
383
- }
384
- const nr = ce(function({
385
- children: t,
386
- label: i,
387
- variant: c = "primary",
388
- size: n = "medium",
389
- loading: f = !1,
390
- loadingText: d,
391
- disabled: h = !1,
392
- startIcon: w,
393
- endIcon: l,
394
- fullWidth: x = !1,
395
- className: I,
396
- style: E,
397
- styles: V,
398
- type: k = "button",
399
- ...e
400
- }, r) {
401
- const { getCombinedStyle: U } = de("button", V), _ = {
402
- primary: J.variantPrimary,
403
- secondary: J.variantSecondary,
404
- outline: J.variantOutline,
405
- ghost: J.variantGhost,
406
- danger: J.variantDanger
407
- }[c], p = {
408
- small: J.sizeSmall,
409
- medium: J.sizeMedium,
410
- large: J.sizeLarge
411
- }[n], g = h || f, a = b(
412
- "wui-button",
413
- J.button,
414
- _,
415
- p,
416
- x && J.fullWidth,
417
- f && J.loading,
418
- g && J.disabled,
419
- I
420
- );
421
- return /* @__PURE__ */ F(
422
- "button",
423
- {
424
- ref: r,
425
- type: k,
426
- className: a,
427
- style: U(E),
428
- disabled: g,
429
- "aria-busy": f || void 0,
430
- "aria-disabled": g || void 0,
431
- ...e,
432
- children: [
433
- f ? /* @__PURE__ */ u("span", { className: J.spinner, "aria-hidden": "true" }) : w ? /* @__PURE__ */ u("span", { className: J.icon, children: w }) : null,
434
- f && d ? /* @__PURE__ */ u("span", { children: d }) : i !== void 0 ? /* @__PURE__ */ u("span", { children: i }) : t,
435
- !f && l && /* @__PURE__ */ u("span", { className: J.icon, children: l })
436
- ]
437
- }
438
- );
439
- });
440
- nr.displayName = "Button";
441
- const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label_mdr3c_12", ar = "_requiredAsterisk_mdr3c_22", tr = "_outerWrapper_mdr3c_28", dr = "_inputWrapper_mdr3c_35", ur = "_outerIconBox_mdr3c_39", fr = "_hasError_mdr3c_68", pr = "_disabled_mdr3c_72", _r = "_withFloatingLabel_mdr3c_93", br = "_floatingLabel_mdr3c_121", hr = "_floatingLabelText_mdr3c_143", gr = "_withStartIcon_mdr3c_164", xr = "_floated_mdr3c_168", vr = "_input_mdr3c_35", wr = "_floatingInput_mdr3c_219", kr = "_withEndIcon_mdr3c_239", Ir = "_startIcon_mdr3c_243", $r = "_endIcon_mdr3c_244", lr = "_helperText_mdr3c_254", Br = "_errorMessage_mdr3c_260", $ = {
442
- container: ir,
443
- floatingContainer: cr,
444
- label: or,
445
- requiredAsterisk: ar,
446
- outerWrapper: tr,
447
- inputWrapper: dr,
448
- outerIconBox: ur,
449
- hasError: fr,
450
- disabled: pr,
451
- withFloatingLabel: _r,
452
- floatingLabel: br,
453
- floatingLabelText: hr,
454
- withStartIcon: gr,
455
- floated: xr,
456
- input: vr,
457
- floatingInput: wr,
458
- withEndIcon: kr,
459
- startIcon: Ir,
460
- endIcon: $r,
461
- helperText: lr,
462
- errorMessage: Br
463
- }, Lr = ce(function({
464
- id: t,
465
- label: i,
466
- floatingLabel: c,
467
- helperText: n,
468
- errorMessage: f,
469
- required: d = !1,
470
- disabled: h = !1,
471
- readOnly: w = !1,
472
- startIcon: l,
473
- endIcon: x,
474
- startIconPlacement: I = "inside",
475
- endIconPlacement: E = "inside",
476
- outerStartIcon: V,
477
- outerEndIcon: k,
478
- className: e,
479
- style: r,
480
- styles: U,
481
- slotClassNames: _,
482
- slotStyles: p,
483
- "data-testid": g,
484
- onChange: a,
485
- onFocus: A,
486
- onBlur: D,
487
- ...M
488
- }, q) {
489
- const j = ge(), B = t || `wui-input-${j}`, H = n ? `${B}-helper` : void 0, L = f ? `${B}-error` : void 0, O = fe(null), { resolved: Y, getCombinedStyle: R } = de("input", U), P = !!f, Z = c ?? (Y == null ? void 0 : Y.floatingLabel) ?? !0, m = M.value !== void 0, [y, ee] = N(
490
- M.defaultValue ?? ""
491
- ), [re, C] = N(!1), Q = m ? M.value : y, ne = Q != null && String(Q).trim().length > 0, oe = re || !!ne, s = (G) => {
492
- C(!0), A == null || A(G);
493
- }, ue = (G) => {
494
- C(!1), D == null || D(G);
495
- }, pe = (G) => {
496
- m || ee(G.target.value), a == null || a(G);
497
- }, ae = !!(Z && i), te = V ?? (I === "outside" ? l : void 0), v = I === "outside" ? void 0 : l, W = k ?? (E === "outside" ? x : void 0), K = E === "outside" ? void 0 : x, xe = !!(te || W), We = b(
52
+ const mn = on(function({
53
+ id: k,
54
+ label: t,
55
+ floatingLabel: x,
56
+ helperText: I,
57
+ errorMessage: h,
58
+ required: L = !1,
59
+ disabled: b = !1,
60
+ readOnly: E = !1,
61
+ startIcon: z,
62
+ endIcon: _,
63
+ startIconPlacement: $ = "inside",
64
+ endIconPlacement: M = "inside",
65
+ outerStartIcon: H,
66
+ outerEndIcon: p,
67
+ className: n,
68
+ style: e,
69
+ styles: Q,
70
+ slotClassNames: a,
71
+ slotStyles: r,
72
+ "data-testid": u,
73
+ onChange: i,
74
+ onFocus: W,
75
+ onBlur: V,
76
+ ...A
77
+ }, O) {
78
+ const U = fn(), g = k || `wui-input-${U}`, D = I ? `${g}-helper` : void 0, w = h ? `${g}-error` : void 0, R = tn(null), { resolved: X, getCombinedStyle: B } = pn("input", Q), j = !!h, P = x ?? (X == null ? void 0 : X.floatingLabel) ?? !0, Y = A.value !== void 0, [m, C] = N(
79
+ A.defaultValue ?? ""
80
+ ), [s, y] = N(!1), Z = Y ? A.value : m, nn = Z != null && String(Z).trim().length > 0, cn = s || !!nn, S = (G) => {
81
+ y(!0), W == null || W(G);
82
+ }, un = (G) => {
83
+ y(!1), V == null || V(G);
84
+ }, _n = (G) => {
85
+ Y || C(G.target.value), i == null || i(G);
86
+ }, dn = !!(P && t), an = H ?? ($ === "outside" ? z : void 0), o = $ === "outside" ? void 0 : z, T = p ?? (M === "outside" ? _ : void 0), K = M === "outside" ? void 0 : _, hn = !!(an || T), xn = d(
498
87
  "wui-input-container",
499
- $.container,
500
- ae && $.floatingContainer,
501
- e
502
- ), Te = b(
88
+ f.container,
89
+ dn && f.floatingContainer,
90
+ n
91
+ ), In = d(
503
92
  "wui-input-wrapper",
504
- $.inputWrapper,
505
- ae && $.withFloatingLabel,
506
- P && $.hasError,
507
- h && $.disabled,
508
- _ == null ? void 0 : _.wrapper
509
- ), Ee = b(
93
+ f.inputWrapper,
94
+ dn && f.withFloatingLabel,
95
+ j && f.hasError,
96
+ b && f.disabled,
97
+ a == null ? void 0 : a.wrapper
98
+ ), Ln = d(
510
99
  "wui-input-field",
511
- $.input,
512
- ae && $.floatingInput,
513
- oe && $.floated,
514
- !!v && $.withStartIcon,
515
- !!K && $.withEndIcon,
516
- _ == null ? void 0 : _.input
517
- ), Me = [L, H].filter(Boolean).join(" ") || void 0, le = /* @__PURE__ */ F("div", { className: Te, style: p == null ? void 0 : p.wrapper, children: [
518
- Z && i && /* @__PURE__ */ u(
100
+ f.input,
101
+ dn && f.floatingInput,
102
+ cn && f.floated,
103
+ !!o && f.withStartIcon,
104
+ !!K && f.withEndIcon,
105
+ a == null ? void 0 : a.input
106
+ ), $n = [w, D].filter(Boolean).join(" ") || void 0, gn = /* @__PURE__ */ q("div", { className: In, style: r == null ? void 0 : r.wrapper, children: [
107
+ P && t && /* @__PURE__ */ c(
519
108
  "label",
520
109
  {
521
- htmlFor: B,
522
- className: b(
110
+ htmlFor: g,
111
+ className: d(
523
112
  "wui-input-floating-label",
524
- $.floatingLabel,
525
- !!v && $.withStartIcon,
526
- oe && $.floated,
527
- (_ == null ? void 0 : _.floatingLabel) || (_ == null ? void 0 : _.label)
113
+ f.floatingLabel,
114
+ !!o && f.withStartIcon,
115
+ cn && f.floated,
116
+ (a == null ? void 0 : a.floatingLabel) || (a == null ? void 0 : a.label)
528
117
  ),
529
- style: (p == null ? void 0 : p.floatingLabel) || (p == null ? void 0 : p.label),
530
- children: /* @__PURE__ */ F("span", { className: $.floatingLabelText, children: [
531
- i,
532
- d && /* @__PURE__ */ u("span", { className: $.requiredAsterisk, "aria-hidden": "true", children: "*" })
118
+ style: (r == null ? void 0 : r.floatingLabel) || (r == null ? void 0 : r.label),
119
+ children: /* @__PURE__ */ q("span", { className: f.floatingLabelText, children: [
120
+ t,
121
+ L && /* @__PURE__ */ c("span", { className: f.requiredAsterisk, "aria-hidden": "true", children: "*" })
533
122
  ] })
534
123
  }
535
124
  ),
536
- v && /* @__PURE__ */ u("span", { className: $.startIcon, children: v }),
537
- /* @__PURE__ */ u(
125
+ o && /* @__PURE__ */ c("span", { className: f.startIcon, children: o }),
126
+ /* @__PURE__ */ c(
538
127
  "input",
539
128
  {
540
129
  ref: (G) => {
541
- O.current = G, typeof q == "function" ? q(G) : q && (q.current = G);
130
+ R.current = G, typeof O == "function" ? O(G) : O && (O.current = G);
542
131
  },
543
- id: B,
544
- disabled: h,
545
- readOnly: w,
546
- required: d,
547
- "aria-invalid": P ? "true" : "false",
548
- "aria-describedby": Me,
549
- className: Ee,
550
- style: p == null ? void 0 : p.input,
551
- onChange: pe,
552
- onFocus: s,
553
- onBlur: ue,
554
- ...M
132
+ id: g,
133
+ disabled: b,
134
+ readOnly: E,
135
+ required: L,
136
+ "aria-invalid": j ? "true" : "false",
137
+ "aria-describedby": $n,
138
+ className: Ln,
139
+ style: r == null ? void 0 : r.input,
140
+ onChange: _n,
141
+ onFocus: S,
142
+ onBlur: un,
143
+ ...A
555
144
  }
556
145
  ),
557
- K && /* @__PURE__ */ u("span", { className: $.endIcon, children: K })
558
- ] }), qe = xe ? /* @__PURE__ */ F(
146
+ K && /* @__PURE__ */ c("span", { className: f.endIcon, children: K })
147
+ ] }), Wn = hn ? /* @__PURE__ */ q(
559
148
  "div",
560
149
  {
561
- className: b(
150
+ className: d(
562
151
  "wui-input-outer-wrapper",
563
- $.outerWrapper,
564
- _ == null ? void 0 : _.outerWrapper
152
+ f.outerWrapper,
153
+ a == null ? void 0 : a.outerWrapper
565
154
  ),
566
- style: p == null ? void 0 : p.outerWrapper,
155
+ style: r == null ? void 0 : r.outerWrapper,
567
156
  children: [
568
- te && /* @__PURE__ */ u(
157
+ an && /* @__PURE__ */ c(
569
158
  "div",
570
159
  {
571
- className: b(
160
+ className: d(
572
161
  "wui-input-outer-icon",
573
162
  "wui-input-outer-start-icon",
574
- $.outerIconBox,
575
- h && $.disabled,
576
- P && $.hasError,
577
- (_ == null ? void 0 : _.outerIconBox) || (_ == null ? void 0 : _.outerStartIcon)
163
+ f.outerIconBox,
164
+ b && f.disabled,
165
+ j && f.hasError,
166
+ (a == null ? void 0 : a.outerIconBox) || (a == null ? void 0 : a.outerStartIcon)
578
167
  ),
579
- style: (p == null ? void 0 : p.outerIconBox) || (p == null ? void 0 : p.outerStartIcon),
168
+ style: (r == null ? void 0 : r.outerIconBox) || (r == null ? void 0 : r.outerStartIcon),
580
169
  onClick: () => {
581
170
  var G;
582
- return !h && ((G = O.current) == null ? void 0 : G.focus());
171
+ return !b && ((G = R.current) == null ? void 0 : G.focus());
583
172
  },
584
- children: te
173
+ children: an
585
174
  }
586
175
  ),
587
- le,
588
- W && /* @__PURE__ */ u(
176
+ gn,
177
+ T && /* @__PURE__ */ c(
589
178
  "div",
590
179
  {
591
- className: b(
180
+ className: d(
592
181
  "wui-input-outer-icon",
593
182
  "wui-input-outer-end-icon",
594
- $.outerIconBox,
595
- h && $.disabled,
596
- P && $.hasError,
597
- (_ == null ? void 0 : _.outerIconBox) || (_ == null ? void 0 : _.outerEndIcon)
183
+ f.outerIconBox,
184
+ b && f.disabled,
185
+ j && f.hasError,
186
+ (a == null ? void 0 : a.outerIconBox) || (a == null ? void 0 : a.outerEndIcon)
598
187
  ),
599
- style: (p == null ? void 0 : p.outerIconBox) || (p == null ? void 0 : p.outerEndIcon),
188
+ style: (r == null ? void 0 : r.outerIconBox) || (r == null ? void 0 : r.outerEndIcon),
600
189
  onClick: () => {
601
190
  var G;
602
- return !h && ((G = O.current) == null ? void 0 : G.focus());
191
+ return !b && ((G = R.current) == null ? void 0 : G.focus());
603
192
  },
604
- children: W
193
+ children: T
605
194
  }
606
195
  )
607
196
  ]
608
197
  }
609
- ) : le;
610
- return /* @__PURE__ */ F("div", { className: We, style: R(r), "data-testid": g, children: [
611
- !Z && i && /* @__PURE__ */ F(
198
+ ) : gn;
199
+ return /* @__PURE__ */ q("div", { className: xn, style: B(e), "data-testid": u, children: [
200
+ !P && t && /* @__PURE__ */ q(
612
201
  "label",
613
202
  {
614
- htmlFor: B,
615
- className: b("wui-input-label", $.label, _ == null ? void 0 : _.label),
616
- style: p == null ? void 0 : p.label,
203
+ htmlFor: g,
204
+ className: d("wui-input-label", f.label, a == null ? void 0 : a.label),
205
+ style: r == null ? void 0 : r.label,
617
206
  children: [
618
- i,
619
- d && /* @__PURE__ */ u("span", { className: $.requiredAsterisk, "aria-hidden": "true", children: "*" })
207
+ t,
208
+ L && /* @__PURE__ */ c("span", { className: f.requiredAsterisk, "aria-hidden": "true", children: "*" })
620
209
  ]
621
210
  }
622
211
  ),
623
- qe,
624
- P ? /* @__PURE__ */ u(
212
+ Wn,
213
+ j ? /* @__PURE__ */ c(
625
214
  "span",
626
215
  {
627
- id: L,
216
+ id: w,
628
217
  role: "alert",
629
- className: b(
218
+ className: d(
630
219
  "wui-input-error",
631
- $.errorMessage,
632
- _ == null ? void 0 : _.errorMessage
220
+ f.errorMessage,
221
+ a == null ? void 0 : a.errorMessage
633
222
  ),
634
- style: p == null ? void 0 : p.errorMessage,
635
- children: f
223
+ style: r == null ? void 0 : r.errorMessage,
224
+ children: h
636
225
  }
637
- ) : n ? /* @__PURE__ */ u(
226
+ ) : I ? /* @__PURE__ */ c(
638
227
  "span",
639
228
  {
640
- id: H,
641
- className: b(
229
+ id: D,
230
+ className: d(
642
231
  "wui-input-helper",
643
- $.helperText,
644
- _ == null ? void 0 : _.helperText
232
+ f.helperText,
233
+ a == null ? void 0 : a.helperText
645
234
  ),
646
- style: p == null ? void 0 : p.helperText,
647
- children: n
235
+ style: r == null ? void 0 : r.helperText,
236
+ children: I
648
237
  }
649
238
  ) : null
650
239
  ] });
651
240
  });
652
- Lr.displayName = "Input";
653
- const zr = "_container_1mwsv_1", Fr = "_disabled_1mwsv_27", Ar = "_hiddenInput_1mwsv_37", Rr = "_box_1mwsv_55", Wr = "_checked_1mwsv_91", Tr = "_indeterminate_1mwsv_93", Er = "_icon_1mwsv_103", Mr = "_label_1mwsv_123", ie = {
654
- container: zr,
655
- disabled: Fr,
656
- hiddenInput: Ar,
657
- box: Rr,
658
- checked: Wr,
659
- indeterminate: Tr,
660
- icon: Er,
661
- label: Mr
662
- }, qr = ce(function({
663
- label: t,
664
- checked: i,
665
- defaultChecked: c = !1,
666
- indeterminate: n = !1,
667
- disabled: f = !1,
668
- onChange: d,
669
- className: h,
670
- style: w,
671
- styles: l,
672
- slotClassNames: x,
673
- slotStyles: I,
674
- "data-testid": E,
675
- ...V
676
- }, k) {
677
- const e = fe(null);
678
- $e(k, () => e.current);
679
- const r = i !== void 0, [U, _] = N(c), p = r ? i : U, { getCombinedStyle: g } = de("checkbox", l);
680
- ze(() => {
681
- e.current && (e.current.indeterminate = !!n);
682
- }, [n]);
683
- const a = (M) => {
684
- f || (r || _(M.target.checked), d == null || d(M));
685
- }, A = b(
241
+ mn.displayName = "Input";
242
+ const yn = "_container_1mwsv_1", ln = "_disabled_1mwsv_27", Nn = "_hiddenInput_1mwsv_37", Sn = "_box_1mwsv_55", Cn = "_checked_1mwsv_91", sn = "_indeterminate_1mwsv_93", ne = "_icon_1mwsv_103", ee = "_label_1mwsv_123", en = {
243
+ container: yn,
244
+ disabled: ln,
245
+ hiddenInput: Nn,
246
+ box: Sn,
247
+ checked: Cn,
248
+ indeterminate: sn,
249
+ icon: ne,
250
+ label: ee
251
+ }, ie = on(function({
252
+ label: k,
253
+ checked: t,
254
+ defaultChecked: x = !1,
255
+ indeterminate: I = !1,
256
+ disabled: h = !1,
257
+ onChange: L,
258
+ className: b,
259
+ style: E,
260
+ styles: z,
261
+ slotClassNames: _,
262
+ slotStyles: $,
263
+ "data-testid": M,
264
+ ...H
265
+ }, p) {
266
+ const n = tn(null);
267
+ bn(p, () => n.current);
268
+ const e = t !== void 0, [Q, a] = N(x), r = e ? t : Q, { getCombinedStyle: u } = pn("checkbox", z);
269
+ wn(() => {
270
+ n.current && (n.current.indeterminate = !!I);
271
+ }, [I]);
272
+ const i = (A) => {
273
+ h || (e || a(A.target.checked), L == null || L(A));
274
+ }, W = d(
686
275
  "wui-checkbox-container",
687
- ie.container,
688
- f && ie.disabled,
689
- x == null ? void 0 : x.container,
690
- h
691
- ), D = b(
276
+ en.container,
277
+ h && en.disabled,
278
+ _ == null ? void 0 : _.container,
279
+ b
280
+ ), V = d(
692
281
  "wui-checkbox-box",
693
- ie.box,
694
- p && ie.checked,
695
- n && ie.indeterminate,
696
- x == null ? void 0 : x.box
282
+ en.box,
283
+ r && en.checked,
284
+ I && en.indeterminate,
285
+ _ == null ? void 0 : _.box
697
286
  );
698
- return /* @__PURE__ */ F("label", { className: A, style: g(w), "data-testid": E, children: [
699
- /* @__PURE__ */ u(
287
+ return /* @__PURE__ */ q("label", { className: W, style: u(E), "data-testid": M, children: [
288
+ /* @__PURE__ */ c(
700
289
  "input",
701
290
  {
702
- ref: e,
291
+ ref: n,
703
292
  type: "checkbox",
704
- checked: p,
705
- disabled: f,
706
- onChange: a,
707
- className: ie.hiddenInput,
708
- "aria-checked": n ? "mixed" : p,
709
- ...V
293
+ checked: r,
294
+ disabled: h,
295
+ onChange: i,
296
+ className: en.hiddenInput,
297
+ "aria-checked": I ? "mixed" : r,
298
+ ...H
710
299
  }
711
300
  ),
712
- /* @__PURE__ */ u("span", { className: D, style: I == null ? void 0 : I.box, children: n ? /* @__PURE__ */ u(
301
+ /* @__PURE__ */ c("span", { className: V, style: $ == null ? void 0 : $.box, children: I ? /* @__PURE__ */ c(
713
302
  "svg",
714
303
  {
715
- className: b(ie.icon, x == null ? void 0 : x.icon),
716
- style: I == null ? void 0 : I.icon,
304
+ className: d(en.icon, _ == null ? void 0 : _.icon),
305
+ style: $ == null ? void 0 : $.icon,
717
306
  viewBox: "0 0 24 24",
718
307
  "aria-hidden": "true",
719
- children: /* @__PURE__ */ u("line", { x1: "5", y1: "12", x2: "19", y2: "12", strokeWidth: "3" })
308
+ children: /* @__PURE__ */ c("line", { x1: "5", y1: "12", x2: "19", y2: "12", strokeWidth: "3" })
720
309
  }
721
- ) : p ? /* @__PURE__ */ u(
310
+ ) : r ? /* @__PURE__ */ c(
722
311
  "svg",
723
312
  {
724
- className: b(ie.icon, x == null ? void 0 : x.icon),
725
- style: I == null ? void 0 : I.icon,
313
+ className: d(en.icon, _ == null ? void 0 : _.icon),
314
+ style: $ == null ? void 0 : $.icon,
726
315
  viewBox: "0 0 24 24",
727
316
  "aria-hidden": "true",
728
- children: /* @__PURE__ */ u("polyline", { points: "20 6 9 17 4 12", strokeWidth: "3" })
317
+ children: /* @__PURE__ */ c("polyline", { points: "20 6 9 17 4 12", strokeWidth: "3" })
729
318
  }
730
319
  ) : null }),
731
- t && /* @__PURE__ */ u(
320
+ k && /* @__PURE__ */ c(
732
321
  "span",
733
322
  {
734
- className: b("wui-checkbox-label", ie.label, x == null ? void 0 : x.label),
735
- style: I == null ? void 0 : I.label,
736
- children: t
323
+ className: d("wui-checkbox-label", en.label, _ == null ? void 0 : _.label),
324
+ style: $ == null ? void 0 : $.label,
325
+ children: k
737
326
  }
738
327
  )
739
328
  ] });
740
329
  });
741
- qr.displayName = "Checkbox";
742
- const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_selectWrapper_q8gl5_23", Hr = "_withFloatingLabel_q8gl5_33", Pr = "_selectWrapperOpen_q8gl5_41", Gr = "_label_q8gl5_49", Ur = "_requiredAsterisk_q8gl5_69", jr = "_floatingLabel_q8gl5_81", Zr = "_floatingLabelText_q8gl5_125", Kr = "_floated_q8gl5_167", Jr = "_trigger_q8gl5_199", Qr = "_hasError_q8gl5_199", Xr = "_disabled_q8gl5_209", Yr = "_open_q8gl5_273", mr = "_value_q8gl5_315", yr = "_placeholder_q8gl5_329", Cr = "_floatingPlaceholder_q8gl5_337", Sr = "_arrow_q8gl5_359", Nr = "_arrowOpen_q8gl5_379", sr = "_dropdown_q8gl5_387", en = "_option_q8gl5_431", rn = "_optionActive_q8gl5_467", nn = "_optionSelected_q8gl5_477", cn = "_optionDisabled_q8gl5_519", on = "_checkIcon_q8gl5_531", an = "_errorMessage_q8gl5_553", z = {
743
- container: Or,
744
- floatingContainer: Vr,
745
- selectWrapper: Dr,
746
- withFloatingLabel: Hr,
747
- selectWrapperOpen: Pr,
748
- label: Gr,
749
- requiredAsterisk: Ur,
750
- floatingLabel: jr,
751
- floatingLabelText: Zr,
752
- floated: Kr,
753
- trigger: Jr,
754
- hasError: Qr,
755
- disabled: Xr,
756
- open: Yr,
757
- value: mr,
758
- placeholder: yr,
759
- floatingPlaceholder: Cr,
760
- arrow: Sr,
761
- arrowOpen: Nr,
762
- dropdown: sr,
763
- option: en,
764
- optionActive: rn,
765
- optionSelected: nn,
766
- optionDisabled: cn,
767
- checkIcon: on,
768
- errorMessage: an
769
- }, tn = ce(function({
770
- options: t,
771
- value: i,
772
- defaultValue: c,
773
- placeholder: n = "Select an option...",
774
- label: f,
775
- floatingLabel: d,
776
- errorMessage: h,
777
- disabled: w = !1,
778
- required: l = !1,
779
- onChange: x,
780
- name: I,
781
- className: E,
782
- style: V,
783
- styles: k,
784
- slotClassNames: e,
785
- slotStyles: r,
786
- "data-testid": U,
787
- id: _
788
- }, p) {
789
- const g = ge(), a = _ || `wui-select-${g}`, A = `${a}-label`, D = `${a}-listbox`, M = h ? `${a}-error` : void 0, q = i !== void 0, [j, B] = N(c), H = q ? i : j, [L, O] = N(!1), [Y, R] = N(!1), [P, Z] = N(-1), m = fe(null), y = fe(null), { resolved: ee, getCombinedStyle: re } = de("select", k), C = !!h, Q = d ?? (ee == null ? void 0 : ee.floatingLabel) ?? !0, ne = !!(Q && f), oe = L || Y || !!H, s = t.find((v) => v.value === H);
790
- ze(() => {
791
- if (!L) return;
792
- const v = (W) => {
793
- m.current && !m.current.contains(W.target) && O(!1);
330
+ ie.displayName = "Checkbox";
331
+ const re = "_container_q8gl5_1", ce = "_floatingContainer_q8gl5_15", de = "_selectWrapper_q8gl5_23", ae = "_withFloatingLabel_q8gl5_33", oe = "_selectWrapperOpen_q8gl5_41", ue = "_label_q8gl5_49", te = "_requiredAsterisk_q8gl5_69", pe = "_floatingLabel_q8gl5_81", _e = "_floatingLabelText_q8gl5_125", fe = "_floated_q8gl5_167", he = "_trigger_q8gl5_199", be = "_hasError_q8gl5_199", ge = "_disabled_q8gl5_209", we = "_open_q8gl5_273", ve = "_value_q8gl5_315", ke = "_placeholder_q8gl5_329", xe = "_floatingPlaceholder_q8gl5_337", Ie = "_arrow_q8gl5_359", Le = "_arrowOpen_q8gl5_379", $e = "_dropdown_q8gl5_387", We = "_option_q8gl5_431", Be = "_optionActive_q8gl5_467", qe = "_optionSelected_q8gl5_477", Ee = "_optionDisabled_q8gl5_519", Te = "_checkIcon_q8gl5_531", ze = "_errorMessage_q8gl5_553", v = {
332
+ container: re,
333
+ floatingContainer: ce,
334
+ selectWrapper: de,
335
+ withFloatingLabel: ae,
336
+ selectWrapperOpen: oe,
337
+ label: ue,
338
+ requiredAsterisk: te,
339
+ floatingLabel: pe,
340
+ floatingLabelText: _e,
341
+ floated: fe,
342
+ trigger: he,
343
+ hasError: be,
344
+ disabled: ge,
345
+ open: we,
346
+ value: ve,
347
+ placeholder: ke,
348
+ floatingPlaceholder: xe,
349
+ arrow: Ie,
350
+ arrowOpen: Le,
351
+ dropdown: $e,
352
+ option: We,
353
+ optionActive: Be,
354
+ optionSelected: qe,
355
+ optionDisabled: Ee,
356
+ checkIcon: Te,
357
+ errorMessage: ze
358
+ }, Fe = on(function({
359
+ options: k,
360
+ value: t,
361
+ defaultValue: x,
362
+ placeholder: I = "Select an option...",
363
+ label: h,
364
+ floatingLabel: L,
365
+ errorMessage: b,
366
+ disabled: E = !1,
367
+ required: z = !1,
368
+ onChange: _,
369
+ name: $,
370
+ className: M,
371
+ style: H,
372
+ styles: p,
373
+ slotClassNames: n,
374
+ slotStyles: e,
375
+ "data-testid": Q,
376
+ id: a
377
+ }, r) {
378
+ const u = fn(), i = a || `wui-select-${u}`, W = `${i}-label`, V = `${i}-listbox`, A = b ? `${i}-error` : void 0, O = t !== void 0, [U, g] = N(x), D = O ? t : U, [w, R] = N(!1), [X, B] = N(!1), [j, P] = N(-1), Y = tn(null), m = tn(null), { resolved: C, getCombinedStyle: s } = pn("select", p), y = !!b, Z = L ?? (C == null ? void 0 : C.floatingLabel) ?? !0, nn = !!(Z && h), cn = w || X || !!D, S = k.find((o) => o.value === D);
379
+ wn(() => {
380
+ if (!w) return;
381
+ const o = (T) => {
382
+ Y.current && !Y.current.contains(T.target) && R(!1);
794
383
  };
795
- return document.addEventListener("mousedown", v), () => {
796
- document.removeEventListener("mousedown", v);
384
+ return document.addEventListener("mousedown", o), () => {
385
+ document.removeEventListener("mousedown", o);
797
386
  };
798
- }, [L]);
799
- const ue = (v) => {
800
- var W;
801
- v.disabled || w || (q || B(v.value), x == null || x(v.value), O(!1), (W = y.current) == null || W.focus());
802
- }, pe = (v) => {
803
- if (!w)
804
- if (v.key === "ArrowDown" || v.key === "ArrowUp") {
805
- if (v.preventDefault(), !L) {
806
- O(!0), Z(0);
387
+ }, [w]);
388
+ const un = (o) => {
389
+ var T;
390
+ o.disabled || E || (O || g(o.value), _ == null || _(o.value), R(!1), (T = m.current) == null || T.focus());
391
+ }, _n = (o) => {
392
+ if (!E)
393
+ if (o.key === "ArrowDown" || o.key === "ArrowUp") {
394
+ if (o.preventDefault(), !w) {
395
+ R(!0), P(0);
807
396
  return;
808
397
  }
809
- const W = v.key === "ArrowDown" ? 1 : -1;
810
- let K = P + W;
811
- K < 0 && (K = t.length - 1), K >= t.length && (K = 0), Z(K);
812
- } else v.key === "Enter" || v.key === " " ? (v.preventDefault(), L && P >= 0 && t[P] ? ue(t[P]) : O((W) => !W)) : v.key === "Escape" && L && (v.preventDefault(), O(!1));
813
- }, ae = b(
398
+ const T = o.key === "ArrowDown" ? 1 : -1;
399
+ let K = j + T;
400
+ K < 0 && (K = k.length - 1), K >= k.length && (K = 0), P(K);
401
+ } else o.key === "Enter" || o.key === " " ? (o.preventDefault(), w && j >= 0 && k[j] ? un(k[j]) : R((T) => !T)) : o.key === "Escape" && w && (o.preventDefault(), R(!1));
402
+ }, dn = d(
814
403
  "wui-select-container",
815
- z.container,
816
- ne && z.floatingContainer,
817
- e == null ? void 0 : e.container,
818
- E
819
- ), te = b(
404
+ v.container,
405
+ nn && v.floatingContainer,
406
+ n == null ? void 0 : n.container,
407
+ M
408
+ ), an = d(
820
409
  "wui-select-trigger",
821
- z.trigger,
822
- L && z.open,
823
- C && z.hasError,
824
- w && z.disabled,
825
- e == null ? void 0 : e.trigger
410
+ v.trigger,
411
+ w && v.open,
412
+ y && v.hasError,
413
+ E && v.disabled,
414
+ n == null ? void 0 : n.trigger
826
415
  );
827
- return /* @__PURE__ */ F(
416
+ return /* @__PURE__ */ q(
828
417
  "div",
829
418
  {
830
- ref: (v) => {
831
- m.current = v, typeof p == "function" ? p(v) : p && (p.current = v);
419
+ ref: (o) => {
420
+ Y.current = o, typeof r == "function" ? r(o) : r && (r.current = o);
832
421
  },
833
- className: ae,
834
- style: re(V),
835
- "data-testid": U,
422
+ className: dn,
423
+ style: s(H),
424
+ "data-testid": Q,
836
425
  children: [
837
- !Q && f && /* @__PURE__ */ F(
426
+ !Z && h && /* @__PURE__ */ q(
838
427
  "label",
839
428
  {
840
- id: A,
841
- className: b("wui-select-label", z.label, e == null ? void 0 : e.label),
842
- style: r == null ? void 0 : r.label,
429
+ id: W,
430
+ className: d("wui-select-label", v.label, n == null ? void 0 : n.label),
431
+ style: e == null ? void 0 : e.label,
843
432
  onClick: () => {
844
- var v;
845
- return !w && ((v = y.current) == null ? void 0 : v.focus());
433
+ var o;
434
+ return !E && ((o = m.current) == null ? void 0 : o.focus());
846
435
  },
847
436
  children: [
848
- f,
849
- l && /* @__PURE__ */ u("span", { className: z.requiredAsterisk, "aria-hidden": "true", children: "*" })
437
+ h,
438
+ z && /* @__PURE__ */ c("span", { className: v.requiredAsterisk, "aria-hidden": "true", children: "*" })
850
439
  ]
851
440
  }
852
441
  ),
853
- I && /* @__PURE__ */ u("input", { type: "hidden", name: I, value: H || "" }),
854
- /* @__PURE__ */ F(
442
+ $ && /* @__PURE__ */ c("input", { type: "hidden", name: $, value: D || "" }),
443
+ /* @__PURE__ */ q(
855
444
  "div",
856
445
  {
857
- className: b(
446
+ className: d(
858
447
  "wui-select-wrapper",
859
- z.selectWrapper,
860
- ne && z.withFloatingLabel,
861
- L && z.selectWrapperOpen,
862
- e == null ? void 0 : e.wrapper
448
+ v.selectWrapper,
449
+ nn && v.withFloatingLabel,
450
+ w && v.selectWrapperOpen,
451
+ n == null ? void 0 : n.wrapper
863
452
  ),
864
- style: r == null ? void 0 : r.wrapper,
453
+ style: e == null ? void 0 : e.wrapper,
865
454
  children: [
866
- /* @__PURE__ */ F(
455
+ /* @__PURE__ */ q(
867
456
  "button",
868
457
  {
869
- ref: y,
870
- id: a,
458
+ ref: m,
459
+ id: i,
871
460
  type: "button",
872
461
  role: "combobox",
873
- "aria-expanded": L,
462
+ "aria-expanded": w,
874
463
  "aria-haspopup": "listbox",
875
- "aria-controls": D,
876
- "aria-labelledby": f ? A : void 0,
877
- "aria-invalid": C ? "true" : "false",
878
- "aria-describedby": M,
879
- disabled: w,
880
- onClick: () => !w && O((v) => !v),
881
- onFocus: () => R(!0),
882
- onBlur: () => R(!1),
883
- onKeyDown: pe,
884
- className: te,
885
- style: r == null ? void 0 : r.trigger,
464
+ "aria-controls": V,
465
+ "aria-labelledby": h ? W : void 0,
466
+ "aria-invalid": y ? "true" : "false",
467
+ "aria-describedby": A,
468
+ disabled: E,
469
+ onClick: () => !E && R((o) => !o),
470
+ onFocus: () => B(!0),
471
+ onBlur: () => B(!1),
472
+ onKeyDown: _n,
473
+ className: an,
474
+ style: e == null ? void 0 : e.trigger,
886
475
  children: [
887
- /* @__PURE__ */ u(
476
+ /* @__PURE__ */ c(
888
477
  "span",
889
478
  {
890
- className: b(
479
+ className: d(
891
480
  "wui-select-value",
892
- z.value,
893
- !s && z.placeholder,
894
- ne && !s && z.floatingPlaceholder,
895
- oe && z.floated,
896
- s ? e == null ? void 0 : e.value : e == null ? void 0 : e.placeholder
481
+ v.value,
482
+ !S && v.placeholder,
483
+ nn && !S && v.floatingPlaceholder,
484
+ cn && v.floated,
485
+ S ? n == null ? void 0 : n.value : n == null ? void 0 : n.placeholder
897
486
  ),
898
- style: s ? r == null ? void 0 : r.value : r == null ? void 0 : r.placeholder,
899
- children: s ? s.label : n
487
+ style: S ? e == null ? void 0 : e.value : e == null ? void 0 : e.placeholder,
488
+ children: S ? S.label : I
900
489
  }
901
490
  ),
902
- /* @__PURE__ */ u(
491
+ /* @__PURE__ */ c(
903
492
  "span",
904
493
  {
905
- className: b(
494
+ className: d(
906
495
  "wui-select-arrow",
907
- z.arrow,
908
- L && z.arrowOpen,
909
- e == null ? void 0 : e.arrow
496
+ v.arrow,
497
+ w && v.arrowOpen,
498
+ n == null ? void 0 : n.arrow
910
499
  ),
911
- style: r == null ? void 0 : r.arrow,
500
+ style: e == null ? void 0 : e.arrow,
912
501
  "aria-hidden": "true",
913
- children: /* @__PURE__ */ u(
502
+ children: /* @__PURE__ */ c(
914
503
  "svg",
915
504
  {
916
505
  width: "14",
@@ -919,7 +508,7 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
919
508
  fill: "none",
920
509
  stroke: "currentColor",
921
510
  strokeWidth: "2.5",
922
- children: /* @__PURE__ */ u("polyline", { points: "6 9 12 15 18 9" })
511
+ children: /* @__PURE__ */ c("polyline", { points: "6 9 12 15 18 9" })
923
512
  }
924
513
  )
925
514
  }
@@ -927,78 +516,78 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
927
516
  ]
928
517
  }
929
518
  ),
930
- ne && /* @__PURE__ */ u(
519
+ nn && /* @__PURE__ */ c(
931
520
  "label",
932
521
  {
933
- id: A,
934
- htmlFor: a,
935
- className: b(
522
+ id: W,
523
+ htmlFor: i,
524
+ className: d(
936
525
  "wui-select-floating-label",
937
- z.floatingLabel,
938
- oe && z.floated,
939
- (e == null ? void 0 : e.floatingLabel) || (e == null ? void 0 : e.label)
526
+ v.floatingLabel,
527
+ cn && v.floated,
528
+ (n == null ? void 0 : n.floatingLabel) || (n == null ? void 0 : n.label)
940
529
  ),
941
- style: (r == null ? void 0 : r.floatingLabel) || (r == null ? void 0 : r.label),
530
+ style: (e == null ? void 0 : e.floatingLabel) || (e == null ? void 0 : e.label),
942
531
  onClick: () => {
943
- var v;
944
- return !w && ((v = y.current) == null ? void 0 : v.focus());
532
+ var o;
533
+ return !E && ((o = m.current) == null ? void 0 : o.focus());
945
534
  },
946
- children: /* @__PURE__ */ F("span", { className: z.floatingLabelText, children: [
947
- f,
948
- l && /* @__PURE__ */ u("span", { className: z.requiredAsterisk, "aria-hidden": "true", children: "*" })
535
+ children: /* @__PURE__ */ q("span", { className: v.floatingLabelText, children: [
536
+ h,
537
+ z && /* @__PURE__ */ c("span", { className: v.requiredAsterisk, "aria-hidden": "true", children: "*" })
949
538
  ] })
950
539
  }
951
540
  ),
952
- L && /* @__PURE__ */ u(
541
+ w && /* @__PURE__ */ c(
953
542
  "ul",
954
543
  {
955
- id: D,
544
+ id: V,
956
545
  role: "listbox",
957
- "aria-labelledby": f ? A : void 0,
958
- className: b(
546
+ "aria-labelledby": h ? W : void 0,
547
+ className: d(
959
548
  "wui-select-dropdown",
960
- z.dropdown,
961
- e == null ? void 0 : e.dropdown
549
+ v.dropdown,
550
+ n == null ? void 0 : n.dropdown
962
551
  ),
963
- style: r == null ? void 0 : r.dropdown,
964
- children: t.map((v, W) => {
965
- const K = v.value === H, xe = W === P;
966
- return /* @__PURE__ */ F(
552
+ style: e == null ? void 0 : e.dropdown,
553
+ children: k.map((o, T) => {
554
+ const K = o.value === D, hn = T === j;
555
+ return /* @__PURE__ */ q(
967
556
  "li",
968
557
  {
969
558
  role: "option",
970
559
  "aria-selected": K,
971
- "aria-disabled": v.disabled || void 0,
972
- className: b(
560
+ "aria-disabled": o.disabled || void 0,
561
+ className: d(
973
562
  "wui-select-option",
974
- z.option,
975
- K && z.optionSelected,
976
- xe && z.optionActive,
977
- v.disabled && z.optionDisabled,
978
- e == null ? void 0 : e.option,
979
- K && (e == null ? void 0 : e.selectedOption)
563
+ v.option,
564
+ K && v.optionSelected,
565
+ hn && v.optionActive,
566
+ o.disabled && v.optionDisabled,
567
+ n == null ? void 0 : n.option,
568
+ K && (n == null ? void 0 : n.selectedOption)
980
569
  ),
981
570
  style: {
982
- ...r == null ? void 0 : r.option,
983
- ...K ? r == null ? void 0 : r.selectedOption : void 0
571
+ ...e == null ? void 0 : e.option,
572
+ ...K ? e == null ? void 0 : e.selectedOption : void 0
984
573
  },
985
- onClick: () => ue(v),
574
+ onClick: () => un(o),
986
575
  children: [
987
- /* @__PURE__ */ u("span", { children: v.label }),
988
- K && /* @__PURE__ */ u(
576
+ /* @__PURE__ */ c("span", { children: o.label }),
577
+ K && /* @__PURE__ */ c(
989
578
  "svg",
990
579
  {
991
- className: b(z.checkIcon, e == null ? void 0 : e.checkIcon),
992
- style: r == null ? void 0 : r.checkIcon,
580
+ className: d(v.checkIcon, n == null ? void 0 : n.checkIcon),
581
+ style: e == null ? void 0 : e.checkIcon,
993
582
  viewBox: "0 0 24 24",
994
583
  strokeWidth: "3",
995
584
  "aria-hidden": "true",
996
- children: /* @__PURE__ */ u("polyline", { points: "20 6 9 17 4 12" })
585
+ children: /* @__PURE__ */ c("polyline", { points: "20 6 9 17 4 12" })
997
586
  }
998
587
  )
999
588
  ]
1000
589
  },
1001
- v.value
590
+ o.value
1002
591
  );
1003
592
  })
1004
593
  }
@@ -1006,308 +595,308 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
1006
595
  ]
1007
596
  }
1008
597
  ),
1009
- C && /* @__PURE__ */ u(
598
+ y && /* @__PURE__ */ c(
1010
599
  "span",
1011
600
  {
1012
- id: M,
601
+ id: A,
1013
602
  role: "alert",
1014
- className: b(
603
+ className: d(
1015
604
  "wui-select-error",
1016
- z.errorMessage,
1017
- e == null ? void 0 : e.errorMessage
605
+ v.errorMessage,
606
+ n == null ? void 0 : n.errorMessage
1018
607
  ),
1019
- style: r == null ? void 0 : r.errorMessage,
1020
- children: h
608
+ style: e == null ? void 0 : e.errorMessage,
609
+ children: b
1021
610
  }
1022
611
  )
1023
612
  ]
1024
613
  }
1025
614
  );
1026
615
  });
1027
- tn.displayName = "Select";
1028
- const dn = "_container_1tasa_1", un = "_floatingContainer_1tasa_8", fn = "_label_1tasa_12", pn = "_requiredAsterisk_1tasa_22", _n = "_wrapper_1tasa_28", bn = "_withFloatingLabel_1tasa_40", hn = "_hasError_1tasa_53", gn = "_disabled_1tasa_62", xn = "_floatingLabel_1tasa_68", vn = "_floatingLabelText_1tasa_90", wn = "_floated_1tasa_111", kn = "_textarea_1tasa_139", In = "_floatingTextarea_1tasa_159", $n = "_footer_1tasa_175", ln = "_helperText_1tasa_183", Bn = "_errorMessage_1tasa_188", Ln = "_counter_1tasa_194", T = {
1029
- container: dn,
1030
- floatingContainer: un,
1031
- label: fn,
1032
- requiredAsterisk: pn,
1033
- wrapper: _n,
1034
- withFloatingLabel: bn,
1035
- hasError: hn,
1036
- disabled: gn,
1037
- floatingLabel: xn,
1038
- floatingLabelText: vn,
1039
- floated: wn,
1040
- textarea: kn,
1041
- floatingTextarea: In,
1042
- footer: $n,
1043
- helperText: ln,
1044
- errorMessage: Bn,
1045
- counter: Ln
1046
- }, zn = ce(function({
1047
- id: t,
1048
- label: i,
1049
- floatingLabel: c,
1050
- helperText: n,
1051
- errorMessage: f,
1052
- required: d = !1,
1053
- disabled: h = !1,
1054
- readOnly: w = !1,
1055
- rows: l = 4,
1056
- maxLength: x,
1057
- showCount: I = !1,
1058
- value: E,
1059
- defaultValue: V,
1060
- onChange: k,
1061
- onFocus: e,
1062
- onBlur: r,
1063
- className: U,
1064
- style: _,
1065
- styles: p,
1066
- slotClassNames: g,
1067
- slotStyles: a,
1068
- "data-testid": A,
1069
- ...D
1070
- }, M) {
1071
- const q = ge(), j = t || `wui-textarea-${q}`, B = n ? `${j}-helper` : void 0, H = f ? `${j}-error` : void 0, L = E !== void 0, [O, Y] = N(
1072
- V !== void 0 ? String(V) : ""
1073
- ), [R, P] = N(!1), Z = L ? String(E ?? "") : O, m = Z != null && String(Z).trim().length > 0, { resolved: y, getCombinedStyle: ee } = de("textarea", p), re = !!f, C = c ?? (y == null ? void 0 : y.floatingLabel) ?? !0, Q = !!(C && i), ne = R || !!m, oe = (W) => {
1074
- L || Y(W.target.value), k == null || k(W);
1075
- }, s = (W) => {
1076
- P(!0), e == null || e(W);
1077
- }, ue = (W) => {
1078
- P(!1), r == null || r(W);
1079
- }, pe = b(
616
+ Fe.displayName = "Select";
617
+ const Ae = "_container_1f8v3_1", Oe = "_floatingContainer_1f8v3_15", Re = "_label_1f8v3_23", Me = "_requiredAsterisk_1f8v3_43", Ve = "_wrapper_1f8v3_55", De = "_withFloatingLabel_1f8v3_79", je = "_hasError_1f8v3_105", Ge = "_disabled_1f8v3_123", He = "_floatingLabel_1f8v3_135", Ue = "_floatingLabelText_1f8v3_179", Pe = "_floated_1f8v3_221", Ke = "_textarea_1f8v3_277", Ze = "_floatingTextarea_1f8v3_317", Je = "_footer_1f8v3_349", Qe = "_helperText_1f8v3_365", Xe = "_errorMessage_1f8v3_375", Ye = "_counter_1f8v3_387", F = {
618
+ container: Ae,
619
+ floatingContainer: Oe,
620
+ label: Re,
621
+ requiredAsterisk: Me,
622
+ wrapper: Ve,
623
+ withFloatingLabel: De,
624
+ hasError: je,
625
+ disabled: Ge,
626
+ floatingLabel: He,
627
+ floatingLabelText: Ue,
628
+ floated: Pe,
629
+ textarea: Ke,
630
+ floatingTextarea: Ze,
631
+ footer: Je,
632
+ helperText: Qe,
633
+ errorMessage: Xe,
634
+ counter: Ye
635
+ }, me = on(function({
636
+ id: k,
637
+ label: t,
638
+ floatingLabel: x,
639
+ helperText: I,
640
+ errorMessage: h,
641
+ required: L = !1,
642
+ disabled: b = !1,
643
+ readOnly: E = !1,
644
+ rows: z = 4,
645
+ maxLength: _,
646
+ showCount: $ = !1,
647
+ value: M,
648
+ defaultValue: H,
649
+ onChange: p,
650
+ onFocus: n,
651
+ onBlur: e,
652
+ className: Q,
653
+ style: a,
654
+ styles: r,
655
+ slotClassNames: u,
656
+ slotStyles: i,
657
+ "data-testid": W,
658
+ ...V
659
+ }, A) {
660
+ const O = fn(), U = k || `wui-textarea-${O}`, g = I ? `${U}-helper` : void 0, D = h ? `${U}-error` : void 0, w = M !== void 0, [R, X] = N(
661
+ H !== void 0 ? String(H) : ""
662
+ ), [B, j] = N(!1), P = w ? String(M ?? "") : R, Y = P != null && String(P).trim().length > 0, { resolved: m, getCombinedStyle: C } = pn("textarea", r), s = !!h, y = x ?? (m == null ? void 0 : m.floatingLabel) ?? !0, Z = !!(y && t), nn = B || !!Y, cn = (T) => {
663
+ w || X(T.target.value), p == null || p(T);
664
+ }, S = (T) => {
665
+ j(!0), n == null || n(T);
666
+ }, un = (T) => {
667
+ j(!1), e == null || e(T);
668
+ }, _n = d(
1080
669
  "wui-textarea-container",
1081
- T.container,
1082
- Q && T.floatingContainer,
1083
- g == null ? void 0 : g.container,
1084
- U
1085
- ), ae = b(
670
+ F.container,
671
+ Z && F.floatingContainer,
672
+ u == null ? void 0 : u.container,
673
+ Q
674
+ ), dn = d(
1086
675
  "wui-textarea-wrapper",
1087
- T.wrapper,
1088
- Q && T.withFloatingLabel,
1089
- re && T.hasError,
1090
- h && T.disabled,
1091
- g == null ? void 0 : g.wrapper
1092
- ), te = b(
676
+ F.wrapper,
677
+ Z && F.withFloatingLabel,
678
+ s && F.hasError,
679
+ b && F.disabled,
680
+ u == null ? void 0 : u.wrapper
681
+ ), an = d(
1093
682
  "wui-textarea-field",
1094
- T.textarea,
1095
- Q && T.floatingTextarea,
1096
- ne && T.floated,
1097
- g == null ? void 0 : g.textarea
1098
- ), v = [H, B].filter(Boolean).join(" ") || void 0;
1099
- return /* @__PURE__ */ F("div", { className: pe, style: ee(_), "data-testid": A, children: [
1100
- !C && i && /* @__PURE__ */ F(
683
+ F.textarea,
684
+ Z && F.floatingTextarea,
685
+ nn && F.floated,
686
+ u == null ? void 0 : u.textarea
687
+ ), o = [D, g].filter(Boolean).join(" ") || void 0;
688
+ return /* @__PURE__ */ q("div", { className: _n, style: C(a), "data-testid": W, children: [
689
+ !y && t && /* @__PURE__ */ q(
1101
690
  "label",
1102
691
  {
1103
- htmlFor: j,
1104
- className: b("wui-textarea-label", T.label, g == null ? void 0 : g.label),
1105
- style: a == null ? void 0 : a.label,
692
+ htmlFor: U,
693
+ className: d("wui-textarea-label", F.label, u == null ? void 0 : u.label),
694
+ style: i == null ? void 0 : i.label,
1106
695
  children: [
1107
- i,
1108
- d && /* @__PURE__ */ u("span", { className: T.requiredAsterisk, "aria-hidden": "true", children: "*" })
696
+ t,
697
+ L && /* @__PURE__ */ c("span", { className: F.requiredAsterisk, "aria-hidden": "true", children: "*" })
1109
698
  ]
1110
699
  }
1111
700
  ),
1112
- /* @__PURE__ */ F("div", { className: ae, style: a == null ? void 0 : a.wrapper, children: [
1113
- Q && /* @__PURE__ */ u(
701
+ /* @__PURE__ */ q("div", { className: dn, style: i == null ? void 0 : i.wrapper, children: [
702
+ Z && /* @__PURE__ */ c(
1114
703
  "label",
1115
704
  {
1116
- htmlFor: j,
1117
- className: b(
705
+ htmlFor: U,
706
+ className: d(
1118
707
  "wui-textarea-floating-label",
1119
- T.floatingLabel,
1120
- ne && T.floated,
1121
- (g == null ? void 0 : g.floatingLabel) || (g == null ? void 0 : g.label)
708
+ F.floatingLabel,
709
+ nn && F.floated,
710
+ (u == null ? void 0 : u.floatingLabel) || (u == null ? void 0 : u.label)
1122
711
  ),
1123
- style: (a == null ? void 0 : a.floatingLabel) || (a == null ? void 0 : a.label),
1124
- children: /* @__PURE__ */ F("span", { className: T.floatingLabelText, children: [
1125
- i,
1126
- d && /* @__PURE__ */ u("span", { className: T.requiredAsterisk, "aria-hidden": "true", children: "*" })
712
+ style: (i == null ? void 0 : i.floatingLabel) || (i == null ? void 0 : i.label),
713
+ children: /* @__PURE__ */ q("span", { className: F.floatingLabelText, children: [
714
+ t,
715
+ L && /* @__PURE__ */ c("span", { className: F.requiredAsterisk, "aria-hidden": "true", children: "*" })
1127
716
  ] })
1128
717
  }
1129
718
  ),
1130
- /* @__PURE__ */ u(
719
+ /* @__PURE__ */ c(
1131
720
  "textarea",
1132
721
  {
1133
- ref: M,
1134
- id: j,
1135
- rows: l,
1136
- maxLength: x,
1137
- value: L ? E : void 0,
1138
- defaultValue: L ? void 0 : V,
1139
- onChange: oe,
1140
- onFocus: s,
1141
- onBlur: ue,
1142
- disabled: h,
1143
- readOnly: w,
1144
- required: d,
1145
- "aria-invalid": re ? "true" : "false",
1146
- "aria-describedby": v,
1147
- className: te,
1148
- style: a == null ? void 0 : a.textarea,
1149
- ...D
722
+ ref: A,
723
+ id: U,
724
+ rows: z,
725
+ maxLength: _,
726
+ value: w ? M : void 0,
727
+ defaultValue: w ? void 0 : H,
728
+ onChange: cn,
729
+ onFocus: S,
730
+ onBlur: un,
731
+ disabled: b,
732
+ readOnly: E,
733
+ required: L,
734
+ "aria-invalid": s ? "true" : "false",
735
+ "aria-describedby": o,
736
+ className: an,
737
+ style: i == null ? void 0 : i.textarea,
738
+ ...V
1150
739
  }
1151
740
  )
1152
741
  ] }),
1153
- /* @__PURE__ */ F("div", { className: T.footer, children: [
1154
- re ? /* @__PURE__ */ u(
742
+ /* @__PURE__ */ q("div", { className: F.footer, children: [
743
+ s ? /* @__PURE__ */ c(
1155
744
  "span",
1156
745
  {
1157
- id: H,
746
+ id: D,
1158
747
  role: "alert",
1159
- className: b(
748
+ className: d(
1160
749
  "wui-textarea-error",
1161
- T.errorMessage,
1162
- g == null ? void 0 : g.errorMessage
750
+ F.errorMessage,
751
+ u == null ? void 0 : u.errorMessage
1163
752
  ),
1164
- style: a == null ? void 0 : a.errorMessage,
1165
- children: f
753
+ style: i == null ? void 0 : i.errorMessage,
754
+ children: h
1166
755
  }
1167
- ) : n ? /* @__PURE__ */ u(
756
+ ) : I ? /* @__PURE__ */ c(
1168
757
  "span",
1169
758
  {
1170
- id: B,
1171
- className: b(
759
+ id: g,
760
+ className: d(
1172
761
  "wui-textarea-helper",
1173
- T.helperText,
1174
- g == null ? void 0 : g.helperText
762
+ F.helperText,
763
+ u == null ? void 0 : u.helperText
1175
764
  ),
1176
- style: a == null ? void 0 : a.helperText,
1177
- children: n
765
+ style: i == null ? void 0 : i.helperText,
766
+ children: I
1178
767
  }
1179
- ) : /* @__PURE__ */ u("span", {}),
1180
- I && /* @__PURE__ */ u(
768
+ ) : /* @__PURE__ */ c("span", {}),
769
+ $ && /* @__PURE__ */ c(
1181
770
  "span",
1182
771
  {
1183
- className: b(
772
+ className: d(
1184
773
  "wui-textarea-counter",
1185
- T.counter,
1186
- g == null ? void 0 : g.counter
774
+ F.counter,
775
+ u == null ? void 0 : u.counter
1187
776
  ),
1188
- style: a == null ? void 0 : a.counter,
777
+ style: i == null ? void 0 : i.counter,
1189
778
  "aria-live": "polite",
1190
- children: x !== void 0 ? `${Z.length} / ${x}` : Z.length
779
+ children: _ !== void 0 ? `${P.length} / ${_}` : P.length
1191
780
  }
1192
781
  )
1193
782
  ] })
1194
783
  ] });
1195
784
  });
1196
- zn.displayName = "Textarea";
1197
- const Fn = "_container_1ek6o_1", An = "_disabled_1ek6o_29", Rn = "_radio_1ek6o_39", Wn = "_labelWrapper_1ek6o_71", Tn = "_label_1ek6o_71", En = "_labelChecked_1ek6o_99", Mn = "_description_1ek6o_109", qn = "_groupContainer_1ek6o_121", On = "_groupLabel_1ek6o_135", Vn = "_optionsVertical_1ek6o_149", Dn = "_optionsHorizontal_1ek6o_161", Hn = "_groupError_1ek6o_175", S = {
1198
- container: Fn,
1199
- disabled: An,
1200
- radio: Rn,
1201
- labelWrapper: Wn,
1202
- label: Tn,
1203
- labelChecked: En,
1204
- description: Mn,
1205
- groupContainer: qn,
1206
- groupLabel: On,
1207
- optionsVertical: Vn,
1208
- optionsHorizontal: Dn,
1209
- groupError: Hn
1210
- }, Ae = Le(null);
1211
- function Pn() {
1212
- return Ie(Ae);
785
+ me.displayName = "Textarea";
786
+ const ye = "_container_1ek6o_1", le = "_disabled_1ek6o_29", Ne = "_radio_1ek6o_39", Se = "_labelWrapper_1ek6o_71", Ce = "_label_1ek6o_71", se = "_labelChecked_1ek6o_99", ni = "_description_1ek6o_109", ei = "_groupContainer_1ek6o_121", ii = "_groupLabel_1ek6o_135", ri = "_optionsVertical_1ek6o_149", ci = "_optionsHorizontal_1ek6o_161", di = "_groupError_1ek6o_175", l = {
787
+ container: ye,
788
+ disabled: le,
789
+ radio: Ne,
790
+ labelWrapper: Se,
791
+ label: Ce,
792
+ labelChecked: se,
793
+ description: ni,
794
+ groupContainer: ei,
795
+ groupLabel: ii,
796
+ optionsVertical: ri,
797
+ optionsHorizontal: ci,
798
+ groupError: di
799
+ }, vn = Bn(null);
800
+ function ai() {
801
+ return qn(vn);
1213
802
  }
1214
- const Re = ce(function({
1215
- label: t,
1216
- description: i,
1217
- value: c,
1218
- size: n,
1219
- color: f,
1220
- checked: d,
1221
- defaultChecked: h = !1,
1222
- disabled: w = !1,
1223
- onChange: l,
1224
- name: x,
1225
- className: I,
1226
- style: E,
1227
- styles: V,
1228
- slotClassNames: k,
1229
- slotStyles: e,
1230
- "data-testid": r,
1231
- id: U,
1232
- ..._
1233
- }, p) {
1234
- const g = fe(null);
1235
- $e(p, () => g.current);
1236
- const a = Pn(), A = !!a, D = x || (a == null ? void 0 : a.name), M = A ? (a == null ? void 0 : a.value) !== void 0 && c !== void 0 ? a.value === c : d !== void 0 ? d : h : d !== void 0 ? d : void 0, [q, j] = N(h), B = A ? M : d !== void 0 ? d : q, H = w || !!(a != null && a.disabled), L = n ?? (a == null ? void 0 : a.size), O = f ?? (a == null ? void 0 : a.color), Y = {
1237
- ...(a == null ? void 0 : a.groupStyles) || {},
1238
- ...V || {},
1239
- ...L !== void 0 ? { size: L } : {},
1240
- ...O !== void 0 ? { color: O } : {}
1241
- }, { resolved: R, getCombinedStyle: P } = de("radio", Y), Z = O || (R == null ? void 0 : R.color) || (R == null ? void 0 : R.checkedColor), m = L !== void 0 ? typeof L == "number" ? `${L}px` : L : (R == null ? void 0 : R.size) !== void 0 ? typeof R.size == "number" ? `${R.size}px` : R.size : void 0, y = (C) => {
1242
- var Q;
1243
- H || (!A && d === void 0 && j(C.target.checked), a && c !== void 0 && ((Q = a.onChange) == null || Q.call(a, c)), l == null || l(C));
1244
- }, ee = b(
803
+ const kn = on(function({
804
+ label: k,
805
+ description: t,
806
+ value: x,
807
+ size: I,
808
+ color: h,
809
+ checked: L,
810
+ defaultChecked: b = !1,
811
+ disabled: E = !1,
812
+ onChange: z,
813
+ name: _,
814
+ className: $,
815
+ style: M,
816
+ styles: H,
817
+ slotClassNames: p,
818
+ slotStyles: n,
819
+ "data-testid": e,
820
+ id: Q,
821
+ ...a
822
+ }, r) {
823
+ const u = tn(null);
824
+ bn(r, () => u.current);
825
+ const i = ai(), W = !!i, V = _ || (i == null ? void 0 : i.name), A = W ? (i == null ? void 0 : i.value) !== void 0 && x !== void 0 ? i.value === x : L !== void 0 ? L : b : L !== void 0 ? L : void 0, [O, U] = N(b), g = W ? A : L !== void 0 ? L : O, D = E || !!(i != null && i.disabled), w = I ?? (i == null ? void 0 : i.size), R = h ?? (i == null ? void 0 : i.color), X = {
826
+ ...(i == null ? void 0 : i.groupStyles) || {},
827
+ ...H || {},
828
+ ...w !== void 0 ? { size: w } : {},
829
+ ...R !== void 0 ? { color: R } : {}
830
+ }, { resolved: B, getCombinedStyle: j } = pn("radio", X), P = R || (B == null ? void 0 : B.color) || (B == null ? void 0 : B.checkedColor), Y = w !== void 0 ? typeof w == "number" ? `${w}px` : w : (B == null ? void 0 : B.size) !== void 0 ? typeof B.size == "number" ? `${B.size}px` : B.size : void 0, m = (y) => {
831
+ var Z;
832
+ D || (!W && L === void 0 && U(y.target.checked), i && x !== void 0 && ((Z = i.onChange) == null || Z.call(i, x)), z == null || z(y));
833
+ }, C = d(
1245
834
  "wui-radio-container",
1246
- S.container,
1247
- H && S.disabled,
1248
- k == null ? void 0 : k.container,
1249
- I
1250
- ), re = b(
835
+ l.container,
836
+ D && l.disabled,
837
+ p == null ? void 0 : p.container,
838
+ $
839
+ ), s = d(
1251
840
  "wui-radio-input",
1252
- S.radio,
1253
- (k == null ? void 0 : k.radio) || (k == null ? void 0 : k.control)
841
+ l.radio,
842
+ (p == null ? void 0 : p.radio) || (p == null ? void 0 : p.control)
1254
843
  );
1255
- return /* @__PURE__ */ F("label", { className: ee, style: P(E), "data-testid": r, children: [
1256
- /* @__PURE__ */ u(
844
+ return /* @__PURE__ */ q("label", { className: C, style: j(M), "data-testid": e, children: [
845
+ /* @__PURE__ */ c(
1257
846
  "input",
1258
847
  {
1259
- ref: g,
1260
- id: U,
848
+ ref: u,
849
+ id: Q,
1261
850
  type: "radio",
1262
- name: D,
1263
- value: c,
1264
- checked: B,
1265
- defaultChecked: A ? void 0 : h,
1266
- disabled: H,
1267
- onChange: y,
1268
- className: re,
851
+ name: V,
852
+ value: x,
853
+ checked: g,
854
+ defaultChecked: W ? void 0 : b,
855
+ disabled: D,
856
+ onChange: m,
857
+ className: s,
1269
858
  style: {
1270
- ...Z ? { accentColor: Z } : void 0,
1271
- ...m ? { width: m, height: m } : void 0,
1272
- ...(e == null ? void 0 : e.radio) || (e == null ? void 0 : e.control)
859
+ ...P ? { accentColor: P } : void 0,
860
+ ...Y ? { width: Y, height: Y } : void 0,
861
+ ...(n == null ? void 0 : n.radio) || (n == null ? void 0 : n.control)
1273
862
  },
1274
- ..._
863
+ ...a
1275
864
  }
1276
865
  ),
1277
- (t || i) && /* @__PURE__ */ F(
866
+ (k || t) && /* @__PURE__ */ q(
1278
867
  "span",
1279
868
  {
1280
- className: b(
869
+ className: d(
1281
870
  "wui-radio-label-wrapper",
1282
- S.labelWrapper,
1283
- k == null ? void 0 : k.labelWrapper
871
+ l.labelWrapper,
872
+ p == null ? void 0 : p.labelWrapper
1284
873
  ),
1285
- style: e == null ? void 0 : e.labelWrapper,
874
+ style: n == null ? void 0 : n.labelWrapper,
1286
875
  children: [
1287
- t && /* @__PURE__ */ u(
876
+ k && /* @__PURE__ */ c(
1288
877
  "span",
1289
878
  {
1290
- className: b(
879
+ className: d(
1291
880
  "wui-radio-label",
1292
- S.label,
1293
- B && S.labelChecked,
1294
- k == null ? void 0 : k.label,
1295
- B && (k == null ? void 0 : k.labelChecked)
881
+ l.label,
882
+ g && l.labelChecked,
883
+ p == null ? void 0 : p.label,
884
+ g && (p == null ? void 0 : p.labelChecked)
1296
885
  ),
1297
- style: e == null ? void 0 : e.label,
1298
- children: t
886
+ style: n == null ? void 0 : n.label,
887
+ children: k
1299
888
  }
1300
889
  ),
1301
- i && /* @__PURE__ */ u(
890
+ t && /* @__PURE__ */ c(
1302
891
  "span",
1303
892
  {
1304
- className: b(
893
+ className: d(
1305
894
  "wui-radio-description",
1306
- S.description,
1307
- k == null ? void 0 : k.description
895
+ l.description,
896
+ p == null ? void 0 : p.description
1308
897
  ),
1309
- style: e == null ? void 0 : e.description,
1310
- children: i
898
+ style: n == null ? void 0 : n.description,
899
+ children: t
1311
900
  }
1312
901
  )
1313
902
  ]
@@ -1315,195 +904,195 @@ const Re = ce(function({
1315
904
  )
1316
905
  ] });
1317
906
  });
1318
- Re.displayName = "Radio";
1319
- const Gn = ce(function({
1320
- name: t,
1321
- value: i,
1322
- defaultValue: c,
1323
- onChange: n,
1324
- options: f,
1325
- direction: d = "vertical",
1326
- label: h,
1327
- errorMessage: w,
1328
- disabled: l = !1,
1329
- size: x,
1330
- color: I,
1331
- children: E,
1332
- styles: V,
1333
- className: k,
1334
- style: e,
1335
- "data-testid": r
1336
- }, U) {
1337
- const _ = ge(), p = t || `wui-radiogroup-${_}`, g = i !== void 0, [a, A] = N(c), D = g ? i : a, M = (B) => {
1338
- l || (g || A(B), n == null || n(B));
1339
- }, q = b(
907
+ kn.displayName = "Radio";
908
+ const oi = on(function({
909
+ name: k,
910
+ value: t,
911
+ defaultValue: x,
912
+ onChange: I,
913
+ options: h,
914
+ direction: L = "vertical",
915
+ label: b,
916
+ errorMessage: E,
917
+ disabled: z = !1,
918
+ size: _,
919
+ color: $,
920
+ children: M,
921
+ styles: H,
922
+ className: p,
923
+ style: n,
924
+ "data-testid": e
925
+ }, Q) {
926
+ const a = fn(), r = k || `wui-radiogroup-${a}`, u = t !== void 0, [i, W] = N(x), V = u ? t : i, A = (g) => {
927
+ z || (u || W(g), I == null || I(g));
928
+ }, O = d(
1340
929
  "wui-radiogroup-container",
1341
- S.groupContainer,
1342
- k
1343
- ), j = d === "horizontal" ? S.optionsHorizontal : S.optionsVertical;
1344
- return /* @__PURE__ */ u(
1345
- Ae.Provider,
930
+ l.groupContainer,
931
+ p
932
+ ), U = L === "horizontal" ? l.optionsHorizontal : l.optionsVertical;
933
+ return /* @__PURE__ */ c(
934
+ vn.Provider,
1346
935
  {
1347
936
  value: {
1348
- name: p,
1349
- value: D,
1350
- onChange: M,
1351
- disabled: l,
1352
- size: x,
1353
- color: I,
1354
- groupStyles: V
937
+ name: r,
938
+ value: V,
939
+ onChange: A,
940
+ disabled: z,
941
+ size: _,
942
+ color: $,
943
+ groupStyles: H
1355
944
  },
1356
- children: /* @__PURE__ */ F(
945
+ children: /* @__PURE__ */ q(
1357
946
  "div",
1358
947
  {
1359
- ref: U,
948
+ ref: Q,
1360
949
  role: "radiogroup",
1361
- "aria-label": typeof h == "string" ? h : void 0,
1362
- className: q,
1363
- style: e,
1364
- "data-testid": r,
950
+ "aria-label": typeof b == "string" ? b : void 0,
951
+ className: O,
952
+ style: n,
953
+ "data-testid": e,
1365
954
  children: [
1366
- h && /* @__PURE__ */ u("span", { className: S.groupLabel, children: h }),
1367
- /* @__PURE__ */ u("div", { className: j, children: f ? f.map((B) => /* @__PURE__ */ u(
1368
- Re,
955
+ b && /* @__PURE__ */ c("span", { className: l.groupLabel, children: b }),
956
+ /* @__PURE__ */ c("div", { className: U, children: h ? h.map((g) => /* @__PURE__ */ c(
957
+ kn,
1369
958
  {
1370
- value: B.value,
1371
- label: B.label,
1372
- description: B.description,
1373
- disabled: B.disabled,
1374
- size: B.size,
1375
- color: B.color,
1376
- styles: B.styles
959
+ value: g.value,
960
+ label: g.label,
961
+ description: g.description,
962
+ disabled: g.disabled,
963
+ size: g.size,
964
+ color: g.color,
965
+ styles: g.styles
1377
966
  },
1378
- B.value
1379
- )) : E }),
1380
- w && /* @__PURE__ */ u("span", { role: "alert", className: S.groupError, children: w })
967
+ g.value
968
+ )) : M }),
969
+ E && /* @__PURE__ */ c("span", { role: "alert", className: l.groupError, children: E })
1381
970
  ]
1382
971
  }
1383
972
  )
1384
973
  }
1385
974
  );
1386
975
  });
1387
- Gn.displayName = "RadioGroup";
1388
- const Un = "_container_17pmz_1", jn = "_disabled_17pmz_15", Zn = "_hiddenInput_17pmz_20", Kn = "_track_17pmz_30", Jn = "_checked_17pmz_51", Qn = "_thumb_17pmz_56", Xn = "_sizeSmall_17pmz_83", Yn = "_sizeMedium_17pmz_90", mn = "_sizeLarge_17pmz_97", yn = "_icon_17pmz_105", Cn = "_labelWrapper_17pmz_116", Sn = "_label_17pmz_116", Nn = "_description_17pmz_127", X = {
1389
- container: Un,
1390
- disabled: jn,
1391
- hiddenInput: Zn,
1392
- track: Kn,
1393
- checked: Jn,
1394
- thumb: Qn,
1395
- sizeSmall: Xn,
1396
- sizeMedium: Yn,
1397
- sizeLarge: mn,
1398
- icon: yn,
1399
- labelWrapper: Cn,
1400
- label: Sn,
1401
- description: Nn
1402
- }, sn = {
1403
- small: X.sizeSmall,
1404
- medium: X.sizeMedium,
1405
- large: X.sizeLarge
1406
- }, ei = ce(function({
1407
- checked: t,
1408
- defaultChecked: i = !1,
1409
- onChange: c,
1410
- disabled: n = !1,
1411
- size: f = "medium",
1412
- label: d,
1413
- description: h,
1414
- checkedIcon: w,
1415
- uncheckedIcon: l,
1416
- name: x,
1417
- value: I,
1418
- className: E,
1419
- style: V,
1420
- styles: k,
1421
- slotClassNames: e,
1422
- slotStyles: r,
1423
- "data-testid": U,
1424
- id: _,
1425
- ...p
1426
- }, g) {
1427
- const a = fe(null);
1428
- $e(g, () => a.current);
1429
- const A = t !== void 0, [D, M] = N(i), q = A ? t : D, { getCombinedStyle: j } = de("switch", k), B = (Y) => {
1430
- if (n) return;
1431
- const R = Y.target.checked;
1432
- A || M(R), c == null || c(R, Y);
1433
- }, H = b(
976
+ oi.displayName = "RadioGroup";
977
+ const ui = "_container_1f1un_1", ti = "_disabled_1f1un_29", pi = "_hiddenInput_1f1un_39", _i = "_track_1f1un_59", fi = "_checked_1f1un_101", hi = "_thumb_1f1un_111", bi = "_sizeSmall_1f1un_165", gi = "_sizeMedium_1f1un_179", wi = "_sizeLarge_1f1un_193", vi = "_icon_1f1un_209", ki = "_labelWrapper_1f1un_231", xi = "_label_1f1un_231", Ii = "_description_1f1un_253", J = {
978
+ container: ui,
979
+ disabled: ti,
980
+ hiddenInput: pi,
981
+ track: _i,
982
+ checked: fi,
983
+ thumb: hi,
984
+ sizeSmall: bi,
985
+ sizeMedium: gi,
986
+ sizeLarge: wi,
987
+ icon: vi,
988
+ labelWrapper: ki,
989
+ label: xi,
990
+ description: Ii
991
+ }, Li = {
992
+ small: J.sizeSmall,
993
+ medium: J.sizeMedium,
994
+ large: J.sizeLarge
995
+ }, $i = on(function({
996
+ checked: k,
997
+ defaultChecked: t = !1,
998
+ onChange: x,
999
+ disabled: I = !1,
1000
+ size: h = "medium",
1001
+ label: L,
1002
+ description: b,
1003
+ checkedIcon: E,
1004
+ uncheckedIcon: z,
1005
+ name: _,
1006
+ value: $,
1007
+ className: M,
1008
+ style: H,
1009
+ styles: p,
1010
+ slotClassNames: n,
1011
+ slotStyles: e,
1012
+ "data-testid": Q,
1013
+ id: a,
1014
+ ...r
1015
+ }, u) {
1016
+ const i = tn(null);
1017
+ bn(u, () => i.current);
1018
+ const W = k !== void 0, [V, A] = N(t), O = W ? k : V, { getCombinedStyle: U } = pn("switch", p), g = (X) => {
1019
+ if (I) return;
1020
+ const B = X.target.checked;
1021
+ W || A(B), x == null || x(B, X);
1022
+ }, D = d(
1434
1023
  "wui-switch-container",
1435
- X.container,
1436
- n && X.disabled,
1437
- e == null ? void 0 : e.container,
1438
- E
1439
- ), L = b(
1024
+ J.container,
1025
+ I && J.disabled,
1026
+ n == null ? void 0 : n.container,
1027
+ M
1028
+ ), w = d(
1440
1029
  "wui-switch-track",
1441
- X.track,
1442
- sn[f],
1443
- q && X.checked,
1444
- e == null ? void 0 : e.track
1445
- ), O = b("wui-switch-thumb", X.thumb, e == null ? void 0 : e.thumb);
1446
- return /* @__PURE__ */ F("label", { className: H, style: j(V), "data-testid": U, children: [
1447
- /* @__PURE__ */ u(
1030
+ J.track,
1031
+ Li[h],
1032
+ O && J.checked,
1033
+ n == null ? void 0 : n.track
1034
+ ), R = d("wui-switch-thumb", J.thumb, n == null ? void 0 : n.thumb);
1035
+ return /* @__PURE__ */ q("label", { className: D, style: U(H), "data-testid": Q, children: [
1036
+ /* @__PURE__ */ c(
1448
1037
  "input",
1449
1038
  {
1450
- ref: a,
1451
- id: _,
1039
+ ref: i,
1040
+ id: a,
1452
1041
  type: "checkbox",
1453
1042
  role: "switch",
1454
- name: x,
1455
- value: I,
1456
- checked: q,
1457
- disabled: n,
1458
- onChange: B,
1459
- className: X.hiddenInput,
1460
- "aria-checked": q,
1461
- ...p
1043
+ name: _,
1044
+ value: $,
1045
+ checked: O,
1046
+ disabled: I,
1047
+ onChange: g,
1048
+ className: J.hiddenInput,
1049
+ "aria-checked": O,
1050
+ ...r
1462
1051
  }
1463
1052
  ),
1464
- /* @__PURE__ */ u("span", { className: L, style: r == null ? void 0 : r.track, "aria-hidden": "true", children: /* @__PURE__ */ u("span", { className: O, style: r == null ? void 0 : r.thumb, children: q ? w && /* @__PURE__ */ u(
1053
+ /* @__PURE__ */ c("span", { className: w, style: e == null ? void 0 : e.track, "aria-hidden": "true", children: /* @__PURE__ */ c("span", { className: R, style: e == null ? void 0 : e.thumb, children: O ? E && /* @__PURE__ */ c(
1465
1054
  "span",
1466
1055
  {
1467
- className: b(X.icon, e == null ? void 0 : e.icon),
1468
- style: r == null ? void 0 : r.icon,
1469
- children: w
1056
+ className: d(J.icon, n == null ? void 0 : n.icon),
1057
+ style: e == null ? void 0 : e.icon,
1058
+ children: E
1470
1059
  }
1471
- ) : l && /* @__PURE__ */ u(
1060
+ ) : z && /* @__PURE__ */ c(
1472
1061
  "span",
1473
1062
  {
1474
- className: b(X.icon, e == null ? void 0 : e.icon),
1475
- style: r == null ? void 0 : r.icon,
1476
- children: l
1063
+ className: d(J.icon, n == null ? void 0 : n.icon),
1064
+ style: e == null ? void 0 : e.icon,
1065
+ children: z
1477
1066
  }
1478
1067
  ) }) }),
1479
- (d || h) && /* @__PURE__ */ F(
1068
+ (L || b) && /* @__PURE__ */ q(
1480
1069
  "span",
1481
1070
  {
1482
- className: b(
1071
+ className: d(
1483
1072
  "wui-switch-label-wrapper",
1484
- X.labelWrapper,
1485
- e == null ? void 0 : e.labelWrapper
1073
+ J.labelWrapper,
1074
+ n == null ? void 0 : n.labelWrapper
1486
1075
  ),
1487
- style: r == null ? void 0 : r.labelWrapper,
1076
+ style: e == null ? void 0 : e.labelWrapper,
1488
1077
  children: [
1489
- d && /* @__PURE__ */ u(
1078
+ L && /* @__PURE__ */ c(
1490
1079
  "span",
1491
1080
  {
1492
- className: b("wui-switch-label", X.label, e == null ? void 0 : e.label),
1493
- style: r == null ? void 0 : r.label,
1494
- children: d
1081
+ className: d("wui-switch-label", J.label, n == null ? void 0 : n.label),
1082
+ style: e == null ? void 0 : e.label,
1083
+ children: L
1495
1084
  }
1496
1085
  ),
1497
- h && /* @__PURE__ */ u(
1086
+ b && /* @__PURE__ */ c(
1498
1087
  "span",
1499
1088
  {
1500
- className: b(
1089
+ className: d(
1501
1090
  "wui-switch-description",
1502
- X.description,
1503
- e == null ? void 0 : e.description
1091
+ J.description,
1092
+ n == null ? void 0 : n.description
1504
1093
  ),
1505
- style: r == null ? void 0 : r.description,
1506
- children: h
1094
+ style: e == null ? void 0 : e.description,
1095
+ children: b
1507
1096
  }
1508
1097
  )
1509
1098
  ]
@@ -1511,67 +1100,47 @@ const Un = "_container_17pmz_1", jn = "_disabled_17pmz_15", Zn = "_hiddenInput_1
1511
1100
  )
1512
1101
  ] });
1513
1102
  });
1514
- ei.displayName = "Switch";
1515
- const ri = ({
1516
- children: o,
1517
- config: t,
1518
- wrapWithContainer: i = !1,
1519
- className: c,
1520
- style: n
1521
- }) => {
1522
- const f = Ie(be), d = ke(() => Se(f, t), [f, t]), h = ke(() => {
1523
- if (!i) return {};
1524
- const l = _e(
1525
- d.colors,
1526
- "wui-color"
1527
- ), x = _e(
1528
- d.typography,
1529
- "wui-typography"
1530
- ), I = _e(
1531
- d.layout,
1532
- "wui-layout"
1533
- );
1534
- return {
1535
- ...l,
1536
- ...x,
1537
- ...I,
1538
- ...n
1539
- };
1540
- }, [i, d, n]), w = i ? /* @__PURE__ */ u(
1541
- "div",
1542
- {
1543
- className: c ? `wui-provider-root ${c}` : "wui-provider-root",
1544
- style: h,
1545
- children: o
1546
- }
1547
- ) : o;
1548
- return /* @__PURE__ */ u(be.Provider, { value: d, children: w });
1549
- };
1550
- ri.displayName = "UIProvider";
1103
+ $i.displayName = "Switch";
1551
1104
  export {
1552
- nr as Button,
1553
- qr as Checkbox,
1554
- Lr as Input,
1555
- Re as Radio,
1556
- Gn as RadioGroup,
1557
- Ae as RadioGroupContext,
1558
- tn as Select,
1559
- ei as Switch,
1560
- zn as Textarea,
1561
- be as UIContext,
1562
- ri as UIProvider,
1563
- b as classNames,
1564
- he as deepMerge,
1565
- Fe as defaultUIConfig,
1566
- Ce as deriveTokensFromPrimary,
1567
- Be as getDarkerShade,
1568
- ye as getFocusRingColor,
1569
- we as getSubtleBackgroundColor,
1570
- Se as mergeUIConfig,
1571
- rr as resolveComponentStyles,
1572
- _e as stylesToCssVars,
1573
- de as useComponentStyles,
1574
- Pn as useRadioGroup,
1575
- me as useUI
1105
+ Zi as Button,
1106
+ ie as Checkbox,
1107
+ mn as Input,
1108
+ kn as Radio,
1109
+ oi as RadioGroup,
1110
+ vn as RadioGroupContext,
1111
+ Fe as Select,
1112
+ $i as Switch,
1113
+ me as Textarea,
1114
+ Ji as UIContext,
1115
+ Qi as UIProvider,
1116
+ ir as WbButton,
1117
+ rr as buttonStyles,
1118
+ zi as camelToKebab,
1119
+ d as classNames,
1120
+ Fi as configureWebstrail,
1121
+ Xi as deepMerge,
1122
+ Ai as defaultButtonStyles,
1123
+ Oi as defaultColors,
1124
+ Ri as defaultLayout,
1125
+ Mi as defaultResolvedConfig,
1126
+ Vi as defaultTypography,
1127
+ Yi as defaultUIConfig,
1128
+ mi as deriveTokensFromPrimary,
1129
+ yi as getDarkerShade,
1130
+ li as getFocusRingColor,
1131
+ Ni as getSubtleBackgroundColor,
1132
+ Di as getWebstrailConfig,
1133
+ Si as mergeUIConfig,
1134
+ ji as normalizeButtonSize,
1135
+ Gi as normalizeDimension,
1136
+ cr as registerWbButton,
1137
+ Hi as resetWebstrailConfig,
1138
+ Ci as resolveComponentStyles,
1139
+ Ui as resolveEffectiveButtonConfig,
1140
+ si as stylesToCssVars,
1141
+ Pi as subscribeWebstrailConfig,
1142
+ pn as useComponentStyles,
1143
+ ai as useRadioGroup,
1144
+ nr as useUI
1576
1145
  };
1577
1146
  //# sourceMappingURL=index.js.map