@webstrail/ui-library 1.0.1 → 1.0.3

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.js CHANGED
@@ -29,8 +29,8 @@ function b(...o) {
29
29
  c && t.push(c);
30
30
  }
31
31
  } else if (typeof i == "object") {
32
- for (const [c, n] of Object.entries(i))
33
- if (n) {
32
+ for (const [c, r] of Object.entries(i))
33
+ if (r) {
34
34
  const f = c.trim();
35
35
  f && t.push(f);
36
36
  }
@@ -198,20 +198,20 @@ be.displayName = "UIContext";
198
198
  function me() {
199
199
  return Ie(be);
200
200
  }
201
- function ve(o) {
201
+ function we(o) {
202
202
  return typeof o == "object" && o !== null && !Array.isArray(o);
203
203
  }
204
- function we(o, t = 0.1) {
204
+ function xe(o, t = 0.1) {
205
205
  if (!o || typeof o != "string") return "rgba(36, 145, 235, 0.1)";
206
206
  const i = o.trim(), c = i.match(/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/);
207
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})`;
208
+ const d = parseInt(c[1], 16), h = parseInt(c[2], 16), x = parseInt(c[3], 16);
209
+ return `rgba(${d}, ${h}, ${x}, ${t})`;
210
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})`;
211
+ const r = i.match(/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/);
212
+ if (r) {
213
+ const d = parseInt(r[1] + r[1], 16), h = parseInt(r[2] + r[2], 16), x = parseInt(r[3] + r[3], 16);
214
+ return `rgba(${d}, ${h}, ${x}, ${t})`;
215
215
  }
216
216
  const f = Math.round(t * 100);
217
217
  return `color-mix(in srgb, ${i} ${f}%, #ffffff)`;
@@ -220,13 +220,13 @@ function ye(o, t = 0.25) {
220
220
  if (!o || typeof o != "string") return "rgba(36, 145, 235, 0.25)";
221
221
  const i = o.trim(), c = i.match(/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/);
222
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})`;
223
+ const d = parseInt(c[1], 16), h = parseInt(c[2], 16), x = parseInt(c[3], 16);
224
+ return `rgba(${d}, ${h}, ${x}, ${t})`;
225
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})`;
226
+ const r = i.match(/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/);
227
+ if (r) {
228
+ const d = parseInt(r[1] + r[1], 16), h = parseInt(r[2] + r[2], 16), x = parseInt(r[3] + r[3], 16);
229
+ return `rgba(${d}, ${h}, ${x}, ${t})`;
230
230
  }
231
231
  const f = Math.round(t * 100);
232
232
  return `color-mix(in srgb, ${i} ${f}%, transparent)`;
@@ -235,19 +235,19 @@ function Be(o, t = 0.12) {
235
235
  if (!o || typeof o != "string") return "#1d78c4";
236
236
  const i = o.trim(), c = i.match(/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/);
237
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)}`;
238
+ const d = Math.max(0, 1 - t), h = Math.round(parseInt(c[1], 16) * d), x = Math.round(parseInt(c[2], 16) * d), l = Math.round(parseInt(c[3], 16) * d), v = (I) => I.toString(16).padStart(2, "0");
239
+ return `#${v(h)}${v(x)}${v(l)}`;
240
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)}`;
241
+ const r = i.match(/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/);
242
+ if (r) {
243
+ const d = Math.max(0, 1 - t), h = Math.round(parseInt(r[1] + r[1], 16) * d), x = Math.round(parseInt(r[2] + r[2], 16) * d), l = Math.round(parseInt(r[3] + r[3], 16) * d), v = (I) => I.toString(16).padStart(2, "0");
244
+ return `#${v(h)}${v(x)}${v(l)}`;
245
245
  }
246
246
  const f = Math.round((1 - t) * 100);
247
247
  return `color-mix(in srgb, ${i} ${f}%, #000000)`;
248
248
  }
249
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);
250
+ const t = xe(o, 0.1), i = xe(o, 0.18), c = ye(o, 0.25), r = Be(o, 0.12), f = Be(o, 0.22), d = xe(o, 0.08);
251
251
  return {
252
252
  colors: {
253
253
  primary: o,
@@ -263,7 +263,7 @@ function Ce(o) {
263
263
  },
264
264
  button: {
265
265
  backgroundColor: o,
266
- hoverBackgroundColor: n,
266
+ hoverBackgroundColor: r,
267
267
  activeBackgroundColor: f,
268
268
  focusRingColor: c,
269
269
  outlineColor: o,
@@ -298,20 +298,20 @@ function Ce(o) {
298
298
  function he(o, ...t) {
299
299
  let i = { ...o };
300
300
  for (const c of t) {
301
- if (!c || !ve(c))
301
+ if (!c || !we(c))
302
302
  continue;
303
- const n = { ...i };
303
+ const r = { ...i };
304
304
  for (const f of Object.keys(c)) {
305
305
  const d = c[f];
306
306
  if (d === void 0)
307
307
  continue;
308
- const h = n[f];
309
- ve(h) && ve(d) ? n[f] = he(
308
+ const h = r[f];
309
+ we(h) && we(d) ? r[f] = he(
310
310
  h,
311
311
  d
312
- ) : n[f] = d;
312
+ ) : r[f] = d;
313
313
  }
314
- i = n;
314
+ i = r;
315
315
  }
316
316
  return i;
317
317
  }
@@ -321,8 +321,8 @@ function Se(o, t) {
321
321
  return { ...o };
322
322
  const i = (c = t.colors) == null ? void 0 : c.primary;
323
323
  if (i && typeof i == "string") {
324
- const n = Ce(i);
325
- return he(o, n, t);
324
+ const r = Ce(i);
325
+ return he(o, r, t);
326
326
  }
327
327
  return he(o, t);
328
328
  }
@@ -339,10 +339,10 @@ const Ne = /* @__PURE__ */ new Set([
339
339
  function se(o) {
340
340
  return o.replace(/([A-Z])/g, "-$1").toLowerCase();
341
341
  }
342
- function er(o, t) {
342
+ function en(o, t) {
343
343
  return typeof t == "number" && !Ne.has(o) ? `${t}px` : String(t);
344
344
  }
345
- function rr(o, t, i) {
345
+ function nn(o, t, i) {
346
346
  return he(
347
347
  o,
348
348
  t,
@@ -353,19 +353,19 @@ function _e(o, t) {
353
353
  if (!o)
354
354
  return {};
355
355
  const i = {};
356
- for (const [c, n] of Object.entries(o))
357
- if (!(n == null || n === "") && (typeof n == "string" || typeof n == "number")) {
356
+ for (const [c, r] of Object.entries(o))
357
+ if (!(r == null || r === "") && (typeof r == "string" || typeof r == "number")) {
358
358
  const f = `--${t}-${se(c)}`;
359
- i[f] = er(c, n);
359
+ i[f] = en(c, r);
360
360
  }
361
361
  return i;
362
362
  }
363
363
  function de(o, t) {
364
- const i = me(), c = Fe[o], n = i[o];
364
+ const i = me(), c = Fe[o], r = i[o];
365
365
  return ke(() => {
366
- const f = rr(
366
+ const f = nn(
367
367
  c,
368
- n,
368
+ r,
369
369
  t
370
370
  ), d = _e(
371
371
  f,
@@ -374,30 +374,30 @@ function de(o, t) {
374
374
  return {
375
375
  resolved: f,
376
376
  cssVars: d,
377
- getCombinedStyle: (w) => w ? {
377
+ getCombinedStyle: (x) => x ? {
378
378
  ...d,
379
- ...w
379
+ ...x
380
380
  } : d
381
381
  };
382
- }, [o, c, n, t]);
382
+ }, [o, c, r, t]);
383
383
  }
384
- const nr = ce(function({
384
+ const rn = ce(function({
385
385
  children: t,
386
386
  label: i,
387
387
  variant: c = "primary",
388
- size: n = "medium",
388
+ size: r = "medium",
389
389
  loading: f = !1,
390
390
  loadingText: d,
391
391
  disabled: h = !1,
392
- startIcon: w,
392
+ startIcon: x,
393
393
  endIcon: l,
394
- fullWidth: x = !1,
394
+ fullWidth: v = !1,
395
395
  className: I,
396
396
  style: E,
397
397
  styles: V,
398
398
  type: k = "button",
399
399
  ...e
400
- }, r) {
400
+ }, n) {
401
401
  const { getCombinedStyle: U } = de("button", V), _ = {
402
402
  primary: J.variantPrimary,
403
403
  secondary: J.variantSecondary,
@@ -408,12 +408,12 @@ const nr = ce(function({
408
408
  small: J.sizeSmall,
409
409
  medium: J.sizeMedium,
410
410
  large: J.sizeLarge
411
- }[n], g = h || f, a = b(
411
+ }[r], g = h || f, a = b(
412
412
  "wui-button",
413
413
  J.button,
414
414
  _,
415
415
  p,
416
- x && J.fullWidth,
416
+ v && J.fullWidth,
417
417
  f && J.loading,
418
418
  g && J.disabled,
419
419
  I
@@ -421,7 +421,7 @@ const nr = ce(function({
421
421
  return /* @__PURE__ */ F(
422
422
  "button",
423
423
  {
424
- ref: r,
424
+ ref: n,
425
425
  type: k,
426
426
  className: a,
427
427
  style: U(E),
@@ -430,53 +430,53 @@ const nr = ce(function({
430
430
  "aria-disabled": g || void 0,
431
431
  ...e,
432
432
  children: [
433
- f ? /* @__PURE__ */ u("span", { className: J.spinner, "aria-hidden": "true" }) : w ? /* @__PURE__ */ u("span", { className: J.icon, children: w }) : null,
433
+ f ? /* @__PURE__ */ u("span", { className: J.spinner, "aria-hidden": "true" }) : x ? /* @__PURE__ */ u("span", { className: J.icon, children: x }) : null,
434
434
  f && d ? /* @__PURE__ */ u("span", { children: d }) : i !== void 0 ? /* @__PURE__ */ u("span", { children: i }) : t,
435
435
  !f && l && /* @__PURE__ */ u("span", { className: J.icon, children: l })
436
436
  ]
437
437
  }
438
438
  );
439
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({
440
+ rn.displayName = "Button";
441
+ const cn = "_container_106aw_1", on = "_floatingContainer_106aw_15", an = "_label_106aw_23", tn = "_requiredAsterisk_106aw_43", dn = "_outerWrapper_106aw_55", un = "_inputWrapper_106aw_69", fn = "_outerIconBox_106aw_77", pn = "_hasError_106aw_135", _n = "_disabled_106aw_143", bn = "_withFloatingLabel_106aw_185", hn = "_floatingLabel_106aw_241", gn = "_floatingLabelText_106aw_285", vn = "_withStartIcon_106aw_327", wn = "_floated_106aw_335", xn = "_input_106aw_69", kn = "_floatingInput_106aw_437", In = "_withEndIcon_106aw_477", $n = "_startIcon_106aw_485", ln = "_endIcon_106aw_487", Bn = "_helperText_106aw_507", Ln = "_errorMessage_106aw_519", $ = {
442
+ container: cn,
443
+ floatingContainer: on,
444
+ label: an,
445
+ requiredAsterisk: tn,
446
+ outerWrapper: dn,
447
+ inputWrapper: un,
448
+ outerIconBox: fn,
449
+ hasError: pn,
450
+ disabled: _n,
451
+ withFloatingLabel: bn,
452
+ floatingLabel: hn,
453
+ floatingLabelText: gn,
454
+ withStartIcon: vn,
455
+ floated: wn,
456
+ input: xn,
457
+ floatingInput: kn,
458
+ withEndIcon: In,
459
+ startIcon: $n,
460
+ endIcon: ln,
461
+ helperText: Bn,
462
+ errorMessage: Ln
463
+ }, zn = ce(function({
464
464
  id: t,
465
465
  label: i,
466
466
  floatingLabel: c,
467
- helperText: n,
467
+ helperText: r,
468
468
  errorMessage: f,
469
469
  required: d = !1,
470
470
  disabled: h = !1,
471
- readOnly: w = !1,
471
+ readOnly: x = !1,
472
472
  startIcon: l,
473
- endIcon: x,
473
+ endIcon: v,
474
474
  startIconPlacement: I = "inside",
475
475
  endIconPlacement: E = "inside",
476
476
  outerStartIcon: V,
477
477
  outerEndIcon: k,
478
478
  className: e,
479
- style: r,
479
+ style: n,
480
480
  styles: U,
481
481
  slotClassNames: _,
482
482
  slotStyles: p,
@@ -486,15 +486,15 @@ const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label
486
486
  onBlur: D,
487
487
  ...M
488
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(
489
+ const j = ge(), B = t || `wui-input-${j}`, H = r ? `${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
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) => {
491
+ ), [ne, C] = N(!1), Q = m ? M.value : y, re = Q != null && String(Q).trim().length > 0, oe = ne || !!re, s = (G) => {
492
492
  C(!0), A == null || A(G);
493
493
  }, ue = (G) => {
494
494
  C(!1), D == null || D(G);
495
495
  }, pe = (G) => {
496
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(
497
+ }, ae = !!(Z && i), te = V ?? (I === "outside" ? l : void 0), w = I === "outside" ? void 0 : l, W = k ?? (E === "outside" ? v : void 0), K = E === "outside" ? void 0 : v, ve = !!(te || W), We = b(
498
498
  "wui-input-container",
499
499
  $.container,
500
500
  ae && $.floatingContainer,
@@ -511,7 +511,7 @@ const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label
511
511
  $.input,
512
512
  ae && $.floatingInput,
513
513
  oe && $.floated,
514
- !!v && $.withStartIcon,
514
+ !!w && $.withStartIcon,
515
515
  !!K && $.withEndIcon,
516
516
  _ == null ? void 0 : _.input
517
517
  ), Me = [L, H].filter(Boolean).join(" ") || void 0, le = /* @__PURE__ */ F("div", { className: Te, style: p == null ? void 0 : p.wrapper, children: [
@@ -522,7 +522,7 @@ const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label
522
522
  className: b(
523
523
  "wui-input-floating-label",
524
524
  $.floatingLabel,
525
- !!v && $.withStartIcon,
525
+ !!w && $.withStartIcon,
526
526
  oe && $.floated,
527
527
  (_ == null ? void 0 : _.floatingLabel) || (_ == null ? void 0 : _.label)
528
528
  ),
@@ -533,7 +533,7 @@ const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label
533
533
  ] })
534
534
  }
535
535
  ),
536
- v && /* @__PURE__ */ u("span", { className: $.startIcon, children: v }),
536
+ w && /* @__PURE__ */ u("span", { className: $.startIcon, children: w }),
537
537
  /* @__PURE__ */ u(
538
538
  "input",
539
539
  {
@@ -542,7 +542,7 @@ const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label
542
542
  },
543
543
  id: B,
544
544
  disabled: h,
545
- readOnly: w,
545
+ readOnly: x,
546
546
  required: d,
547
547
  "aria-invalid": P ? "true" : "false",
548
548
  "aria-describedby": Me,
@@ -555,7 +555,7 @@ const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label
555
555
  }
556
556
  ),
557
557
  K && /* @__PURE__ */ u("span", { className: $.endIcon, children: K })
558
- ] }), qe = xe ? /* @__PURE__ */ F(
558
+ ] }), qe = ve ? /* @__PURE__ */ F(
559
559
  "div",
560
560
  {
561
561
  className: b(
@@ -607,7 +607,7 @@ const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label
607
607
  ]
608
608
  }
609
609
  ) : le;
610
- return /* @__PURE__ */ F("div", { className: We, style: R(r), "data-testid": g, children: [
610
+ return /* @__PURE__ */ F("div", { className: We, style: R(n), "data-testid": g, children: [
611
611
  !Z && i && /* @__PURE__ */ F(
612
612
  "label",
613
613
  {
@@ -634,7 +634,7 @@ const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label
634
634
  style: p == null ? void 0 : p.errorMessage,
635
635
  children: f
636
636
  }
637
- ) : n ? /* @__PURE__ */ u(
637
+ ) : r ? /* @__PURE__ */ u(
638
638
  "span",
639
639
  {
640
640
  id: H,
@@ -644,58 +644,58 @@ const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label
644
644
  _ == null ? void 0 : _.helperText
645
645
  ),
646
646
  style: p == null ? void 0 : p.helperText,
647
- children: n
647
+ children: r
648
648
  }
649
649
  ) : null
650
650
  ] });
651
651
  });
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({
652
+ zn.displayName = "Input";
653
+ const Fn = "_container_1mwsv_1", An = "_disabled_1mwsv_27", Rn = "_hiddenInput_1mwsv_37", Wn = "_box_1mwsv_55", Tn = "_checked_1mwsv_91", En = "_indeterminate_1mwsv_93", Mn = "_icon_1mwsv_103", qn = "_label_1mwsv_123", ie = {
654
+ container: Fn,
655
+ disabled: An,
656
+ hiddenInput: Rn,
657
+ box: Wn,
658
+ checked: Tn,
659
+ indeterminate: En,
660
+ icon: Mn,
661
+ label: qn
662
+ }, On = ce(function({
663
663
  label: t,
664
664
  checked: i,
665
665
  defaultChecked: c = !1,
666
- indeterminate: n = !1,
666
+ indeterminate: r = !1,
667
667
  disabled: f = !1,
668
668
  onChange: d,
669
669
  className: h,
670
- style: w,
670
+ style: x,
671
671
  styles: l,
672
- slotClassNames: x,
672
+ slotClassNames: v,
673
673
  slotStyles: I,
674
674
  "data-testid": E,
675
675
  ...V
676
676
  }, k) {
677
677
  const e = fe(null);
678
678
  $e(k, () => e.current);
679
- const r = i !== void 0, [U, _] = N(c), p = r ? i : U, { getCombinedStyle: g } = de("checkbox", l);
679
+ const n = i !== void 0, [U, _] = N(c), p = n ? i : U, { getCombinedStyle: g } = de("checkbox", l);
680
680
  ze(() => {
681
- e.current && (e.current.indeterminate = !!n);
682
- }, [n]);
681
+ e.current && (e.current.indeterminate = !!r);
682
+ }, [r]);
683
683
  const a = (M) => {
684
- f || (r || _(M.target.checked), d == null || d(M));
684
+ f || (n || _(M.target.checked), d == null || d(M));
685
685
  }, A = b(
686
686
  "wui-checkbox-container",
687
687
  ie.container,
688
688
  f && ie.disabled,
689
- x == null ? void 0 : x.container,
689
+ v == null ? void 0 : v.container,
690
690
  h
691
691
  ), D = b(
692
692
  "wui-checkbox-box",
693
693
  ie.box,
694
694
  p && ie.checked,
695
- n && ie.indeterminate,
696
- x == null ? void 0 : x.box
695
+ r && ie.indeterminate,
696
+ v == null ? void 0 : v.box
697
697
  );
698
- return /* @__PURE__ */ F("label", { className: A, style: g(w), "data-testid": E, children: [
698
+ return /* @__PURE__ */ F("label", { className: A, style: g(x), "data-testid": E, children: [
699
699
  /* @__PURE__ */ u(
700
700
  "input",
701
701
  {
@@ -705,14 +705,14 @@ const zr = "_container_1mwsv_1", Fr = "_disabled_1mwsv_27", Ar = "_hiddenInput_1
705
705
  disabled: f,
706
706
  onChange: a,
707
707
  className: ie.hiddenInput,
708
- "aria-checked": n ? "mixed" : p,
708
+ "aria-checked": r ? "mixed" : p,
709
709
  ...V
710
710
  }
711
711
  ),
712
- /* @__PURE__ */ u("span", { className: D, style: I == null ? void 0 : I.box, children: n ? /* @__PURE__ */ u(
712
+ /* @__PURE__ */ u("span", { className: D, style: I == null ? void 0 : I.box, children: r ? /* @__PURE__ */ u(
713
713
  "svg",
714
714
  {
715
- className: b(ie.icon, x == null ? void 0 : x.icon),
715
+ className: b(ie.icon, v == null ? void 0 : v.icon),
716
716
  style: I == null ? void 0 : I.icon,
717
717
  viewBox: "0 0 24 24",
718
718
  "aria-hidden": "true",
@@ -721,7 +721,7 @@ const zr = "_container_1mwsv_1", Fr = "_disabled_1mwsv_27", Ar = "_hiddenInput_1
721
721
  ) : p ? /* @__PURE__ */ u(
722
722
  "svg",
723
723
  {
724
- className: b(ie.icon, x == null ? void 0 : x.icon),
724
+ className: b(ie.icon, v == null ? void 0 : v.icon),
725
725
  style: I == null ? void 0 : I.icon,
726
726
  viewBox: "0 0 24 24",
727
727
  "aria-hidden": "true",
@@ -731,89 +731,89 @@ const zr = "_container_1mwsv_1", Fr = "_disabled_1mwsv_27", Ar = "_hiddenInput_1
731
731
  t && /* @__PURE__ */ u(
732
732
  "span",
733
733
  {
734
- className: b("wui-checkbox-label", ie.label, x == null ? void 0 : x.label),
734
+ className: b("wui-checkbox-label", ie.label, v == null ? void 0 : v.label),
735
735
  style: I == null ? void 0 : I.label,
736
736
  children: t
737
737
  }
738
738
  )
739
739
  ] });
740
740
  });
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({
741
+ On.displayName = "Checkbox";
742
+ const Vn = "_container_q8gl5_1", Dn = "_floatingContainer_q8gl5_15", Hn = "_selectWrapper_q8gl5_23", Pn = "_withFloatingLabel_q8gl5_33", Gn = "_selectWrapperOpen_q8gl5_41", Un = "_label_q8gl5_49", jn = "_requiredAsterisk_q8gl5_69", Zn = "_floatingLabel_q8gl5_81", Kn = "_floatingLabelText_q8gl5_125", Jn = "_floated_q8gl5_167", Qn = "_trigger_q8gl5_199", Xn = "_hasError_q8gl5_199", Yn = "_disabled_q8gl5_209", mn = "_open_q8gl5_273", yn = "_value_q8gl5_315", Cn = "_placeholder_q8gl5_329", Sn = "_floatingPlaceholder_q8gl5_337", Nn = "_arrow_q8gl5_359", sn = "_arrowOpen_q8gl5_379", er = "_dropdown_q8gl5_387", nr = "_option_q8gl5_431", rr = "_optionActive_q8gl5_467", ir = "_optionSelected_q8gl5_477", cr = "_optionDisabled_q8gl5_519", or = "_checkIcon_q8gl5_531", ar = "_errorMessage_q8gl5_553", z = {
743
+ container: Vn,
744
+ floatingContainer: Dn,
745
+ selectWrapper: Hn,
746
+ withFloatingLabel: Pn,
747
+ selectWrapperOpen: Gn,
748
+ label: Un,
749
+ requiredAsterisk: jn,
750
+ floatingLabel: Zn,
751
+ floatingLabelText: Kn,
752
+ floated: Jn,
753
+ trigger: Qn,
754
+ hasError: Xn,
755
+ disabled: Yn,
756
+ open: mn,
757
+ value: yn,
758
+ placeholder: Cn,
759
+ floatingPlaceholder: Sn,
760
+ arrow: Nn,
761
+ arrowOpen: sn,
762
+ dropdown: er,
763
+ option: nr,
764
+ optionActive: rr,
765
+ optionSelected: ir,
766
+ optionDisabled: cr,
767
+ checkIcon: or,
768
+ errorMessage: ar
769
+ }, tr = ce(function({
770
770
  options: t,
771
771
  value: i,
772
772
  defaultValue: c,
773
- placeholder: n = "Select an option...",
773
+ placeholder: r = "Select an option...",
774
774
  label: f,
775
775
  floatingLabel: d,
776
776
  errorMessage: h,
777
- disabled: w = !1,
777
+ disabled: x = !1,
778
778
  required: l = !1,
779
- onChange: x,
779
+ onChange: v,
780
780
  name: I,
781
781
  className: E,
782
782
  style: V,
783
783
  styles: k,
784
784
  slotClassNames: e,
785
- slotStyles: r,
785
+ slotStyles: n,
786
786
  "data-testid": U,
787
787
  id: _
788
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);
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: ne } = de("select", k), C = !!h, Q = d ?? (ee == null ? void 0 : ee.floatingLabel) ?? !0, re = !!(Q && f), oe = L || Y || !!H, s = t.find((w) => w.value === H);
790
790
  ze(() => {
791
791
  if (!L) return;
792
- const v = (W) => {
792
+ const w = (W) => {
793
793
  m.current && !m.current.contains(W.target) && O(!1);
794
794
  };
795
- return document.addEventListener("mousedown", v), () => {
796
- document.removeEventListener("mousedown", v);
795
+ return document.addEventListener("mousedown", w), () => {
796
+ document.removeEventListener("mousedown", w);
797
797
  };
798
798
  }, [L]);
799
- const ue = (v) => {
799
+ const ue = (w) => {
800
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) {
801
+ w.disabled || x || (q || B(w.value), v == null || v(w.value), O(!1), (W = y.current) == null || W.focus());
802
+ }, pe = (w) => {
803
+ if (!x)
804
+ if (w.key === "ArrowDown" || w.key === "ArrowUp") {
805
+ if (w.preventDefault(), !L) {
806
806
  O(!0), Z(0);
807
807
  return;
808
808
  }
809
- const W = v.key === "ArrowDown" ? 1 : -1;
809
+ const W = w.key === "ArrowDown" ? 1 : -1;
810
810
  let K = P + W;
811
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));
812
+ } else w.key === "Enter" || w.key === " " ? (w.preventDefault(), L && P >= 0 && t[P] ? ue(t[P]) : O((W) => !W)) : w.key === "Escape" && L && (w.preventDefault(), O(!1));
813
813
  }, ae = b(
814
814
  "wui-select-container",
815
815
  z.container,
816
- ne && z.floatingContainer,
816
+ re && z.floatingContainer,
817
817
  e == null ? void 0 : e.container,
818
818
  E
819
819
  ), te = b(
@@ -821,17 +821,17 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
821
821
  z.trigger,
822
822
  L && z.open,
823
823
  C && z.hasError,
824
- w && z.disabled,
824
+ x && z.disabled,
825
825
  e == null ? void 0 : e.trigger
826
826
  );
827
827
  return /* @__PURE__ */ F(
828
828
  "div",
829
829
  {
830
- ref: (v) => {
831
- m.current = v, typeof p == "function" ? p(v) : p && (p.current = v);
830
+ ref: (w) => {
831
+ m.current = w, typeof p == "function" ? p(w) : p && (p.current = w);
832
832
  },
833
833
  className: ae,
834
- style: re(V),
834
+ style: ne(V),
835
835
  "data-testid": U,
836
836
  children: [
837
837
  !Q && f && /* @__PURE__ */ F(
@@ -839,10 +839,10 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
839
839
  {
840
840
  id: A,
841
841
  className: b("wui-select-label", z.label, e == null ? void 0 : e.label),
842
- style: r == null ? void 0 : r.label,
842
+ style: n == null ? void 0 : n.label,
843
843
  onClick: () => {
844
- var v;
845
- return !w && ((v = y.current) == null ? void 0 : v.focus());
844
+ var w;
845
+ return !x && ((w = y.current) == null ? void 0 : w.focus());
846
846
  },
847
847
  children: [
848
848
  f,
@@ -857,11 +857,11 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
857
857
  className: b(
858
858
  "wui-select-wrapper",
859
859
  z.selectWrapper,
860
- ne && z.withFloatingLabel,
860
+ re && z.withFloatingLabel,
861
861
  L && z.selectWrapperOpen,
862
862
  e == null ? void 0 : e.wrapper
863
863
  ),
864
- style: r == null ? void 0 : r.wrapper,
864
+ style: n == null ? void 0 : n.wrapper,
865
865
  children: [
866
866
  /* @__PURE__ */ F(
867
867
  "button",
@@ -876,13 +876,13 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
876
876
  "aria-labelledby": f ? A : void 0,
877
877
  "aria-invalid": C ? "true" : "false",
878
878
  "aria-describedby": M,
879
- disabled: w,
880
- onClick: () => !w && O((v) => !v),
879
+ disabled: x,
880
+ onClick: () => !x && O((w) => !w),
881
881
  onFocus: () => R(!0),
882
882
  onBlur: () => R(!1),
883
883
  onKeyDown: pe,
884
884
  className: te,
885
- style: r == null ? void 0 : r.trigger,
885
+ style: n == null ? void 0 : n.trigger,
886
886
  children: [
887
887
  /* @__PURE__ */ u(
888
888
  "span",
@@ -891,12 +891,12 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
891
891
  "wui-select-value",
892
892
  z.value,
893
893
  !s && z.placeholder,
894
- ne && !s && z.floatingPlaceholder,
894
+ re && !s && z.floatingPlaceholder,
895
895
  oe && z.floated,
896
896
  s ? e == null ? void 0 : e.value : e == null ? void 0 : e.placeholder
897
897
  ),
898
- style: s ? r == null ? void 0 : r.value : r == null ? void 0 : r.placeholder,
899
- children: s ? s.label : n
898
+ style: s ? n == null ? void 0 : n.value : n == null ? void 0 : n.placeholder,
899
+ children: s ? s.label : r
900
900
  }
901
901
  ),
902
902
  /* @__PURE__ */ u(
@@ -908,7 +908,7 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
908
908
  L && z.arrowOpen,
909
909
  e == null ? void 0 : e.arrow
910
910
  ),
911
- style: r == null ? void 0 : r.arrow,
911
+ style: n == null ? void 0 : n.arrow,
912
912
  "aria-hidden": "true",
913
913
  children: /* @__PURE__ */ u(
914
914
  "svg",
@@ -927,7 +927,7 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
927
927
  ]
928
928
  }
929
929
  ),
930
- ne && /* @__PURE__ */ u(
930
+ re && /* @__PURE__ */ u(
931
931
  "label",
932
932
  {
933
933
  id: A,
@@ -938,10 +938,10 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
938
938
  oe && z.floated,
939
939
  (e == null ? void 0 : e.floatingLabel) || (e == null ? void 0 : e.label)
940
940
  ),
941
- style: (r == null ? void 0 : r.floatingLabel) || (r == null ? void 0 : r.label),
941
+ style: (n == null ? void 0 : n.floatingLabel) || (n == null ? void 0 : n.label),
942
942
  onClick: () => {
943
- var v;
944
- return !w && ((v = y.current) == null ? void 0 : v.focus());
943
+ var w;
944
+ return !x && ((w = y.current) == null ? void 0 : w.focus());
945
945
  },
946
946
  children: /* @__PURE__ */ F("span", { className: z.floatingLabelText, children: [
947
947
  f,
@@ -960,36 +960,36 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
960
960
  z.dropdown,
961
961
  e == null ? void 0 : e.dropdown
962
962
  ),
963
- style: r == null ? void 0 : r.dropdown,
964
- children: t.map((v, W) => {
965
- const K = v.value === H, xe = W === P;
963
+ style: n == null ? void 0 : n.dropdown,
964
+ children: t.map((w, W) => {
965
+ const K = w.value === H, ve = W === P;
966
966
  return /* @__PURE__ */ F(
967
967
  "li",
968
968
  {
969
969
  role: "option",
970
970
  "aria-selected": K,
971
- "aria-disabled": v.disabled || void 0,
971
+ "aria-disabled": w.disabled || void 0,
972
972
  className: b(
973
973
  "wui-select-option",
974
974
  z.option,
975
975
  K && z.optionSelected,
976
- xe && z.optionActive,
977
- v.disabled && z.optionDisabled,
976
+ ve && z.optionActive,
977
+ w.disabled && z.optionDisabled,
978
978
  e == null ? void 0 : e.option,
979
979
  K && (e == null ? void 0 : e.selectedOption)
980
980
  ),
981
981
  style: {
982
- ...r == null ? void 0 : r.option,
983
- ...K ? r == null ? void 0 : r.selectedOption : void 0
982
+ ...n == null ? void 0 : n.option,
983
+ ...K ? n == null ? void 0 : n.selectedOption : void 0
984
984
  },
985
- onClick: () => ue(v),
985
+ onClick: () => ue(w),
986
986
  children: [
987
- /* @__PURE__ */ u("span", { children: v.label }),
987
+ /* @__PURE__ */ u("span", { children: w.label }),
988
988
  K && /* @__PURE__ */ u(
989
989
  "svg",
990
990
  {
991
991
  className: b(z.checkIcon, e == null ? void 0 : e.checkIcon),
992
- style: r == null ? void 0 : r.checkIcon,
992
+ style: n == null ? void 0 : n.checkIcon,
993
993
  viewBox: "0 0 24 24",
994
994
  strokeWidth: "3",
995
995
  "aria-hidden": "true",
@@ -998,7 +998,7 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
998
998
  )
999
999
  ]
1000
1000
  },
1001
- v.value
1001
+ w.value
1002
1002
  );
1003
1003
  })
1004
1004
  }
@@ -1016,7 +1016,7 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
1016
1016
  z.errorMessage,
1017
1017
  e == null ? void 0 : e.errorMessage
1018
1018
  ),
1019
- style: r == null ? void 0 : r.errorMessage,
1019
+ style: n == null ? void 0 : n.errorMessage,
1020
1020
  children: h
1021
1021
  }
1022
1022
  )
@@ -1024,42 +1024,42 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
1024
1024
  }
1025
1025
  );
1026
1026
  });
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({
1027
+ tr.displayName = "Select";
1028
+ const dr = "_container_1f8v3_1", ur = "_floatingContainer_1f8v3_15", fr = "_label_1f8v3_23", pr = "_requiredAsterisk_1f8v3_43", _r = "_wrapper_1f8v3_55", br = "_withFloatingLabel_1f8v3_79", hr = "_hasError_1f8v3_105", gr = "_disabled_1f8v3_123", vr = "_floatingLabel_1f8v3_135", wr = "_floatingLabelText_1f8v3_179", xr = "_floated_1f8v3_221", kr = "_textarea_1f8v3_277", Ir = "_floatingTextarea_1f8v3_317", $r = "_footer_1f8v3_349", lr = "_helperText_1f8v3_365", Br = "_errorMessage_1f8v3_375", Lr = "_counter_1f8v3_387", T = {
1029
+ container: dr,
1030
+ floatingContainer: ur,
1031
+ label: fr,
1032
+ requiredAsterisk: pr,
1033
+ wrapper: _r,
1034
+ withFloatingLabel: br,
1035
+ hasError: hr,
1036
+ disabled: gr,
1037
+ floatingLabel: vr,
1038
+ floatingLabelText: wr,
1039
+ floated: xr,
1040
+ textarea: kr,
1041
+ floatingTextarea: Ir,
1042
+ footer: $r,
1043
+ helperText: lr,
1044
+ errorMessage: Br,
1045
+ counter: Lr
1046
+ }, zr = ce(function({
1047
1047
  id: t,
1048
1048
  label: i,
1049
1049
  floatingLabel: c,
1050
- helperText: n,
1050
+ helperText: r,
1051
1051
  errorMessage: f,
1052
1052
  required: d = !1,
1053
1053
  disabled: h = !1,
1054
- readOnly: w = !1,
1054
+ readOnly: x = !1,
1055
1055
  rows: l = 4,
1056
- maxLength: x,
1056
+ maxLength: v,
1057
1057
  showCount: I = !1,
1058
1058
  value: E,
1059
1059
  defaultValue: V,
1060
1060
  onChange: k,
1061
1061
  onFocus: e,
1062
- onBlur: r,
1062
+ onBlur: n,
1063
1063
  className: U,
1064
1064
  style: _,
1065
1065
  styles: p,
@@ -1068,14 +1068,14 @@ const dn = "_container_1tasa_1", un = "_floatingContainer_1tasa_8", fn = "_label
1068
1068
  "data-testid": A,
1069
1069
  ...D
1070
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(
1071
+ const q = ge(), j = t || `wui-textarea-${q}`, B = r ? `${j}-helper` : void 0, H = f ? `${j}-error` : void 0, L = E !== void 0, [O, Y] = N(
1072
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) => {
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), ne = !!f, C = c ?? (y == null ? void 0 : y.floatingLabel) ?? !0, Q = !!(C && i), re = R || !!m, oe = (W) => {
1074
1074
  L || Y(W.target.value), k == null || k(W);
1075
1075
  }, s = (W) => {
1076
1076
  P(!0), e == null || e(W);
1077
1077
  }, ue = (W) => {
1078
- P(!1), r == null || r(W);
1078
+ P(!1), n == null || n(W);
1079
1079
  }, pe = b(
1080
1080
  "wui-textarea-container",
1081
1081
  T.container,
@@ -1086,16 +1086,16 @@ const dn = "_container_1tasa_1", un = "_floatingContainer_1tasa_8", fn = "_label
1086
1086
  "wui-textarea-wrapper",
1087
1087
  T.wrapper,
1088
1088
  Q && T.withFloatingLabel,
1089
- re && T.hasError,
1089
+ ne && T.hasError,
1090
1090
  h && T.disabled,
1091
1091
  g == null ? void 0 : g.wrapper
1092
1092
  ), te = b(
1093
1093
  "wui-textarea-field",
1094
1094
  T.textarea,
1095
1095
  Q && T.floatingTextarea,
1096
- ne && T.floated,
1096
+ re && T.floated,
1097
1097
  g == null ? void 0 : g.textarea
1098
- ), v = [H, B].filter(Boolean).join(" ") || void 0;
1098
+ ), w = [H, B].filter(Boolean).join(" ") || void 0;
1099
1099
  return /* @__PURE__ */ F("div", { className: pe, style: ee(_), "data-testid": A, children: [
1100
1100
  !C && i && /* @__PURE__ */ F(
1101
1101
  "label",
@@ -1117,7 +1117,7 @@ const dn = "_container_1tasa_1", un = "_floatingContainer_1tasa_8", fn = "_label
1117
1117
  className: b(
1118
1118
  "wui-textarea-floating-label",
1119
1119
  T.floatingLabel,
1120
- ne && T.floated,
1120
+ re && T.floated,
1121
1121
  (g == null ? void 0 : g.floatingLabel) || (g == null ? void 0 : g.label)
1122
1122
  ),
1123
1123
  style: (a == null ? void 0 : a.floatingLabel) || (a == null ? void 0 : a.label),
@@ -1133,17 +1133,17 @@ const dn = "_container_1tasa_1", un = "_floatingContainer_1tasa_8", fn = "_label
1133
1133
  ref: M,
1134
1134
  id: j,
1135
1135
  rows: l,
1136
- maxLength: x,
1136
+ maxLength: v,
1137
1137
  value: L ? E : void 0,
1138
1138
  defaultValue: L ? void 0 : V,
1139
1139
  onChange: oe,
1140
1140
  onFocus: s,
1141
1141
  onBlur: ue,
1142
1142
  disabled: h,
1143
- readOnly: w,
1143
+ readOnly: x,
1144
1144
  required: d,
1145
- "aria-invalid": re ? "true" : "false",
1146
- "aria-describedby": v,
1145
+ "aria-invalid": ne ? "true" : "false",
1146
+ "aria-describedby": w,
1147
1147
  className: te,
1148
1148
  style: a == null ? void 0 : a.textarea,
1149
1149
  ...D
@@ -1151,7 +1151,7 @@ const dn = "_container_1tasa_1", un = "_floatingContainer_1tasa_8", fn = "_label
1151
1151
  )
1152
1152
  ] }),
1153
1153
  /* @__PURE__ */ F("div", { className: T.footer, children: [
1154
- re ? /* @__PURE__ */ u(
1154
+ ne ? /* @__PURE__ */ u(
1155
1155
  "span",
1156
1156
  {
1157
1157
  id: H,
@@ -1164,7 +1164,7 @@ const dn = "_container_1tasa_1", un = "_floatingContainer_1tasa_8", fn = "_label
1164
1164
  style: a == null ? void 0 : a.errorMessage,
1165
1165
  children: f
1166
1166
  }
1167
- ) : n ? /* @__PURE__ */ u(
1167
+ ) : r ? /* @__PURE__ */ u(
1168
1168
  "span",
1169
1169
  {
1170
1170
  id: B,
@@ -1174,7 +1174,7 @@ const dn = "_container_1tasa_1", un = "_floatingContainer_1tasa_8", fn = "_label
1174
1174
  g == null ? void 0 : g.helperText
1175
1175
  ),
1176
1176
  style: a == null ? void 0 : a.helperText,
1177
- children: n
1177
+ children: r
1178
1178
  }
1179
1179
  ) : /* @__PURE__ */ u("span", {}),
1180
1180
  I && /* @__PURE__ */ u(
@@ -1187,53 +1187,53 @@ const dn = "_container_1tasa_1", un = "_floatingContainer_1tasa_8", fn = "_label
1187
1187
  ),
1188
1188
  style: a == null ? void 0 : a.counter,
1189
1189
  "aria-live": "polite",
1190
- children: x !== void 0 ? `${Z.length} / ${x}` : Z.length
1190
+ children: v !== void 0 ? `${Z.length} / ${v}` : Z.length
1191
1191
  }
1192
1192
  )
1193
1193
  ] })
1194
1194
  ] });
1195
1195
  });
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
1196
+ zr.displayName = "Textarea";
1197
+ const Fr = "_container_1ek6o_1", Ar = "_disabled_1ek6o_29", Rr = "_radio_1ek6o_39", Wr = "_labelWrapper_1ek6o_71", Tr = "_label_1ek6o_71", Er = "_labelChecked_1ek6o_99", Mr = "_description_1ek6o_109", qr = "_groupContainer_1ek6o_121", Or = "_groupLabel_1ek6o_135", Vr = "_optionsVertical_1ek6o_149", Dr = "_optionsHorizontal_1ek6o_161", Hr = "_groupError_1ek6o_175", S = {
1198
+ container: Fr,
1199
+ disabled: Ar,
1200
+ radio: Rr,
1201
+ labelWrapper: Wr,
1202
+ label: Tr,
1203
+ labelChecked: Er,
1204
+ description: Mr,
1205
+ groupContainer: qr,
1206
+ groupLabel: Or,
1207
+ optionsVertical: Vr,
1208
+ optionsHorizontal: Dr,
1209
+ groupError: Hr
1210
1210
  }, Ae = Le(null);
1211
- function Pn() {
1211
+ function Pr() {
1212
1212
  return Ie(Ae);
1213
1213
  }
1214
1214
  const Re = ce(function({
1215
1215
  label: t,
1216
1216
  description: i,
1217
1217
  value: c,
1218
- size: n,
1218
+ size: r,
1219
1219
  color: f,
1220
1220
  checked: d,
1221
1221
  defaultChecked: h = !1,
1222
- disabled: w = !1,
1222
+ disabled: x = !1,
1223
1223
  onChange: l,
1224
- name: x,
1224
+ name: v,
1225
1225
  className: I,
1226
1226
  style: E,
1227
1227
  styles: V,
1228
1228
  slotClassNames: k,
1229
1229
  slotStyles: e,
1230
- "data-testid": r,
1230
+ "data-testid": n,
1231
1231
  id: U,
1232
1232
  ..._
1233
1233
  }, p) {
1234
1234
  const g = fe(null);
1235
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 = {
1236
+ const a = Pr(), A = !!a, D = v || (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 = x || !!(a != null && a.disabled), L = r ?? (a == null ? void 0 : a.size), O = f ?? (a == null ? void 0 : a.color), Y = {
1237
1237
  ...(a == null ? void 0 : a.groupStyles) || {},
1238
1238
  ...V || {},
1239
1239
  ...L !== void 0 ? { size: L } : {},
@@ -1247,12 +1247,12 @@ const Re = ce(function({
1247
1247
  H && S.disabled,
1248
1248
  k == null ? void 0 : k.container,
1249
1249
  I
1250
- ), re = b(
1250
+ ), ne = b(
1251
1251
  "wui-radio-input",
1252
1252
  S.radio,
1253
1253
  (k == null ? void 0 : k.radio) || (k == null ? void 0 : k.control)
1254
1254
  );
1255
- return /* @__PURE__ */ F("label", { className: ee, style: P(E), "data-testid": r, children: [
1255
+ return /* @__PURE__ */ F("label", { className: ee, style: P(E), "data-testid": n, children: [
1256
1256
  /* @__PURE__ */ u(
1257
1257
  "input",
1258
1258
  {
@@ -1265,7 +1265,7 @@ const Re = ce(function({
1265
1265
  defaultChecked: A ? void 0 : h,
1266
1266
  disabled: H,
1267
1267
  onChange: y,
1268
- className: re,
1268
+ className: ne,
1269
1269
  style: {
1270
1270
  ...Z ? { accentColor: Z } : void 0,
1271
1271
  ...m ? { width: m, height: m } : void 0,
@@ -1316,26 +1316,26 @@ const Re = ce(function({
1316
1316
  ] });
1317
1317
  });
1318
1318
  Re.displayName = "Radio";
1319
- const Gn = ce(function({
1319
+ const Gr = ce(function({
1320
1320
  name: t,
1321
1321
  value: i,
1322
1322
  defaultValue: c,
1323
- onChange: n,
1323
+ onChange: r,
1324
1324
  options: f,
1325
1325
  direction: d = "vertical",
1326
1326
  label: h,
1327
- errorMessage: w,
1327
+ errorMessage: x,
1328
1328
  disabled: l = !1,
1329
- size: x,
1329
+ size: v,
1330
1330
  color: I,
1331
1331
  children: E,
1332
1332
  styles: V,
1333
1333
  className: k,
1334
1334
  style: e,
1335
- "data-testid": r
1335
+ "data-testid": n
1336
1336
  }, U) {
1337
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));
1338
+ l || (g || A(B), r == null || r(B));
1339
1339
  }, q = b(
1340
1340
  "wui-radiogroup-container",
1341
1341
  S.groupContainer,
@@ -1349,7 +1349,7 @@ const Gn = ce(function({
1349
1349
  value: D,
1350
1350
  onChange: M,
1351
1351
  disabled: l,
1352
- size: x,
1352
+ size: v,
1353
1353
  color: I,
1354
1354
  groupStyles: V
1355
1355
  },
@@ -1361,7 +1361,7 @@ const Gn = ce(function({
1361
1361
  "aria-label": typeof h == "string" ? h : void 0,
1362
1362
  className: q,
1363
1363
  style: e,
1364
- "data-testid": r,
1364
+ "data-testid": n,
1365
1365
  children: [
1366
1366
  h && /* @__PURE__ */ u("span", { className: S.groupLabel, children: h }),
1367
1367
  /* @__PURE__ */ u("div", { className: j, children: f ? f.map((B) => /* @__PURE__ */ u(
@@ -1377,29 +1377,29 @@ const Gn = ce(function({
1377
1377
  },
1378
1378
  B.value
1379
1379
  )) : E }),
1380
- w && /* @__PURE__ */ u("span", { role: "alert", className: S.groupError, children: w })
1380
+ x && /* @__PURE__ */ u("span", { role: "alert", className: S.groupError, children: x })
1381
1381
  ]
1382
1382
  }
1383
1383
  )
1384
1384
  }
1385
1385
  );
1386
1386
  });
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 = {
1387
+ Gr.displayName = "RadioGroup";
1388
+ const Ur = "_container_1f1un_1", jr = "_disabled_1f1un_29", Zr = "_hiddenInput_1f1un_39", Kr = "_track_1f1un_59", Jr = "_checked_1f1un_101", Qr = "_thumb_1f1un_111", Xr = "_sizeSmall_1f1un_165", Yr = "_sizeMedium_1f1un_179", mr = "_sizeLarge_1f1un_193", yr = "_icon_1f1un_209", Cr = "_labelWrapper_1f1un_231", Sr = "_label_1f1un_231", Nr = "_description_1f1un_253", X = {
1389
+ container: Ur,
1390
+ disabled: jr,
1391
+ hiddenInput: Zr,
1392
+ track: Kr,
1393
+ checked: Jr,
1394
+ thumb: Qr,
1395
+ sizeSmall: Xr,
1396
+ sizeMedium: Yr,
1397
+ sizeLarge: mr,
1398
+ icon: yr,
1399
+ labelWrapper: Cr,
1400
+ label: Sr,
1401
+ description: Nr
1402
+ }, sr = {
1403
1403
  small: X.sizeSmall,
1404
1404
  medium: X.sizeMedium,
1405
1405
  large: X.sizeLarge
@@ -1407,19 +1407,19 @@ const Un = "_container_17pmz_1", jn = "_disabled_17pmz_15", Zn = "_hiddenInput_1
1407
1407
  checked: t,
1408
1408
  defaultChecked: i = !1,
1409
1409
  onChange: c,
1410
- disabled: n = !1,
1410
+ disabled: r = !1,
1411
1411
  size: f = "medium",
1412
1412
  label: d,
1413
1413
  description: h,
1414
- checkedIcon: w,
1414
+ checkedIcon: x,
1415
1415
  uncheckedIcon: l,
1416
- name: x,
1416
+ name: v,
1417
1417
  value: I,
1418
1418
  className: E,
1419
1419
  style: V,
1420
1420
  styles: k,
1421
1421
  slotClassNames: e,
1422
- slotStyles: r,
1422
+ slotStyles: n,
1423
1423
  "data-testid": U,
1424
1424
  id: _,
1425
1425
  ...p
@@ -1427,19 +1427,19 @@ const Un = "_container_17pmz_1", jn = "_disabled_17pmz_15", Zn = "_hiddenInput_1
1427
1427
  const a = fe(null);
1428
1428
  $e(g, () => a.current);
1429
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;
1430
+ if (r) return;
1431
1431
  const R = Y.target.checked;
1432
1432
  A || M(R), c == null || c(R, Y);
1433
1433
  }, H = b(
1434
1434
  "wui-switch-container",
1435
1435
  X.container,
1436
- n && X.disabled,
1436
+ r && X.disabled,
1437
1437
  e == null ? void 0 : e.container,
1438
1438
  E
1439
1439
  ), L = b(
1440
1440
  "wui-switch-track",
1441
1441
  X.track,
1442
- sn[f],
1442
+ sr[f],
1443
1443
  q && X.checked,
1444
1444
  e == null ? void 0 : e.track
1445
1445
  ), O = b("wui-switch-thumb", X.thumb, e == null ? void 0 : e.thumb);
@@ -1451,28 +1451,28 @@ const Un = "_container_17pmz_1", jn = "_disabled_17pmz_15", Zn = "_hiddenInput_1
1451
1451
  id: _,
1452
1452
  type: "checkbox",
1453
1453
  role: "switch",
1454
- name: x,
1454
+ name: v,
1455
1455
  value: I,
1456
1456
  checked: q,
1457
- disabled: n,
1457
+ disabled: r,
1458
1458
  onChange: B,
1459
1459
  className: X.hiddenInput,
1460
1460
  "aria-checked": q,
1461
1461
  ...p
1462
1462
  }
1463
1463
  ),
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(
1464
+ /* @__PURE__ */ u("span", { className: L, style: n == null ? void 0 : n.track, "aria-hidden": "true", children: /* @__PURE__ */ u("span", { className: O, style: n == null ? void 0 : n.thumb, children: q ? x && /* @__PURE__ */ u(
1465
1465
  "span",
1466
1466
  {
1467
1467
  className: b(X.icon, e == null ? void 0 : e.icon),
1468
- style: r == null ? void 0 : r.icon,
1469
- children: w
1468
+ style: n == null ? void 0 : n.icon,
1469
+ children: x
1470
1470
  }
1471
1471
  ) : l && /* @__PURE__ */ u(
1472
1472
  "span",
1473
1473
  {
1474
1474
  className: b(X.icon, e == null ? void 0 : e.icon),
1475
- style: r == null ? void 0 : r.icon,
1475
+ style: n == null ? void 0 : n.icon,
1476
1476
  children: l
1477
1477
  }
1478
1478
  ) }) }),
@@ -1484,13 +1484,13 @@ const Un = "_container_17pmz_1", jn = "_disabled_17pmz_15", Zn = "_hiddenInput_1
1484
1484
  X.labelWrapper,
1485
1485
  e == null ? void 0 : e.labelWrapper
1486
1486
  ),
1487
- style: r == null ? void 0 : r.labelWrapper,
1487
+ style: n == null ? void 0 : n.labelWrapper,
1488
1488
  children: [
1489
1489
  d && /* @__PURE__ */ u(
1490
1490
  "span",
1491
1491
  {
1492
1492
  className: b("wui-switch-label", X.label, e == null ? void 0 : e.label),
1493
- style: r == null ? void 0 : r.label,
1493
+ style: n == null ? void 0 : n.label,
1494
1494
  children: d
1495
1495
  }
1496
1496
  ),
@@ -1502,7 +1502,7 @@ const Un = "_container_17pmz_1", jn = "_disabled_17pmz_15", Zn = "_hiddenInput_1
1502
1502
  X.description,
1503
1503
  e == null ? void 0 : e.description
1504
1504
  ),
1505
- style: r == null ? void 0 : r.description,
1505
+ style: n == null ? void 0 : n.description,
1506
1506
  children: h
1507
1507
  }
1508
1508
  )
@@ -1512,19 +1512,19 @@ const Un = "_container_17pmz_1", jn = "_disabled_17pmz_15", Zn = "_hiddenInput_1
1512
1512
  ] });
1513
1513
  });
1514
1514
  ei.displayName = "Switch";
1515
- const ri = ({
1515
+ const ni = ({
1516
1516
  children: o,
1517
1517
  config: t,
1518
1518
  wrapWithContainer: i = !1,
1519
1519
  className: c,
1520
- style: n
1520
+ style: r
1521
1521
  }) => {
1522
1522
  const f = Ie(be), d = ke(() => Se(f, t), [f, t]), h = ke(() => {
1523
1523
  if (!i) return {};
1524
1524
  const l = _e(
1525
1525
  d.colors,
1526
1526
  "wui-color"
1527
- ), x = _e(
1527
+ ), v = _e(
1528
1528
  d.typography,
1529
1529
  "wui-typography"
1530
1530
  ), I = _e(
@@ -1533,11 +1533,11 @@ const ri = ({
1533
1533
  );
1534
1534
  return {
1535
1535
  ...l,
1536
- ...x,
1536
+ ...v,
1537
1537
  ...I,
1538
- ...n
1538
+ ...r
1539
1539
  };
1540
- }, [i, d, n]), w = i ? /* @__PURE__ */ u(
1540
+ }, [i, d, r]), x = i ? /* @__PURE__ */ u(
1541
1541
  "div",
1542
1542
  {
1543
1543
  className: c ? `wui-provider-root ${c}` : "wui-provider-root",
@@ -1545,33 +1545,33 @@ const ri = ({
1545
1545
  children: o
1546
1546
  }
1547
1547
  ) : o;
1548
- return /* @__PURE__ */ u(be.Provider, { value: d, children: w });
1548
+ return /* @__PURE__ */ u(be.Provider, { value: d, children: x });
1549
1549
  };
1550
- ri.displayName = "UIProvider";
1550
+ ni.displayName = "UIProvider";
1551
1551
  export {
1552
- nr as Button,
1553
- qr as Checkbox,
1554
- Lr as Input,
1552
+ rn as Button,
1553
+ On as Checkbox,
1554
+ zn as Input,
1555
1555
  Re as Radio,
1556
- Gn as RadioGroup,
1556
+ Gr as RadioGroup,
1557
1557
  Ae as RadioGroupContext,
1558
- tn as Select,
1558
+ tr as Select,
1559
1559
  ei as Switch,
1560
- zn as Textarea,
1560
+ zr as Textarea,
1561
1561
  be as UIContext,
1562
- ri as UIProvider,
1562
+ ni as UIProvider,
1563
1563
  b as classNames,
1564
1564
  he as deepMerge,
1565
1565
  Fe as defaultUIConfig,
1566
1566
  Ce as deriveTokensFromPrimary,
1567
1567
  Be as getDarkerShade,
1568
1568
  ye as getFocusRingColor,
1569
- we as getSubtleBackgroundColor,
1569
+ xe as getSubtleBackgroundColor,
1570
1570
  Se as mergeUIConfig,
1571
- rr as resolveComponentStyles,
1571
+ nn as resolveComponentStyles,
1572
1572
  _e as stylesToCssVars,
1573
1573
  de as useComponentStyles,
1574
- Pn as useRadioGroup,
1574
+ Pr as useRadioGroup,
1575
1575
  me as useUI
1576
1576
  };
1577
1577
  //# sourceMappingURL=index.js.map