@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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +318 -318
- package/dist/style.css +1 -1
- package/package.json +1 -1
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,
|
|
33
|
-
if (
|
|
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
|
|
201
|
+
function we(o) {
|
|
202
202
|
return typeof o == "object" && o !== null && !Array.isArray(o);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
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),
|
|
209
|
-
return `rgba(${d}, ${h}, ${
|
|
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
|
|
212
|
-
if (
|
|
213
|
-
const d = parseInt(
|
|
214
|
-
return `rgba(${d}, ${h}, ${
|
|
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),
|
|
224
|
-
return `rgba(${d}, ${h}, ${
|
|
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
|
|
227
|
-
if (
|
|
228
|
-
const d = parseInt(
|
|
229
|
-
return `rgba(${d}, ${h}, ${
|
|
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),
|
|
239
|
-
return `#${
|
|
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
|
|
242
|
-
if (
|
|
243
|
-
const d = Math.max(0, 1 - t), h = Math.round(parseInt(
|
|
244
|
-
return `#${
|
|
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 =
|
|
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:
|
|
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 || !
|
|
301
|
+
if (!c || !we(c))
|
|
302
302
|
continue;
|
|
303
|
-
const
|
|
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 =
|
|
309
|
-
|
|
308
|
+
const h = r[f];
|
|
309
|
+
we(h) && we(d) ? r[f] = he(
|
|
310
310
|
h,
|
|
311
311
|
d
|
|
312
|
-
) :
|
|
312
|
+
) : r[f] = d;
|
|
313
313
|
}
|
|
314
|
-
i =
|
|
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
|
|
325
|
-
return he(o,
|
|
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
|
|
342
|
+
function en(o, t) {
|
|
343
343
|
return typeof t == "number" && !Ne.has(o) ? `${t}px` : String(t);
|
|
344
344
|
}
|
|
345
|
-
function
|
|
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,
|
|
357
|
-
if (!(
|
|
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] =
|
|
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],
|
|
364
|
+
const i = me(), c = Fe[o], r = i[o];
|
|
365
365
|
return ke(() => {
|
|
366
|
-
const f =
|
|
366
|
+
const f = nn(
|
|
367
367
|
c,
|
|
368
|
-
|
|
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: (
|
|
377
|
+
getCombinedStyle: (x) => x ? {
|
|
378
378
|
...d,
|
|
379
|
-
...
|
|
379
|
+
...x
|
|
380
380
|
} : d
|
|
381
381
|
};
|
|
382
|
-
}, [o, c,
|
|
382
|
+
}, [o, c, r, t]);
|
|
383
383
|
}
|
|
384
|
-
const
|
|
384
|
+
const rn = ce(function({
|
|
385
385
|
children: t,
|
|
386
386
|
label: i,
|
|
387
387
|
variant: c = "primary",
|
|
388
|
-
size:
|
|
388
|
+
size: r = "medium",
|
|
389
389
|
loading: f = !1,
|
|
390
390
|
loadingText: d,
|
|
391
391
|
disabled: h = !1,
|
|
392
|
-
startIcon:
|
|
392
|
+
startIcon: x,
|
|
393
393
|
endIcon: l,
|
|
394
|
-
fullWidth:
|
|
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
|
-
},
|
|
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
|
-
}[
|
|
411
|
+
}[r], g = h || f, a = b(
|
|
412
412
|
"wui-button",
|
|
413
413
|
J.button,
|
|
414
414
|
_,
|
|
415
415
|
p,
|
|
416
|
-
|
|
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:
|
|
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" }) :
|
|
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
|
-
|
|
441
|
-
const
|
|
442
|
-
container:
|
|
443
|
-
floatingContainer:
|
|
444
|
-
label:
|
|
445
|
-
requiredAsterisk:
|
|
446
|
-
outerWrapper:
|
|
447
|
-
inputWrapper:
|
|
448
|
-
outerIconBox:
|
|
449
|
-
hasError:
|
|
450
|
-
disabled:
|
|
451
|
-
withFloatingLabel:
|
|
452
|
-
floatingLabel:
|
|
453
|
-
floatingLabelText:
|
|
454
|
-
withStartIcon:
|
|
455
|
-
floated:
|
|
456
|
-
input:
|
|
457
|
-
floatingInput:
|
|
458
|
-
withEndIcon:
|
|
459
|
-
startIcon:
|
|
460
|
-
endIcon:
|
|
461
|
-
helperText:
|
|
462
|
-
errorMessage:
|
|
463
|
-
},
|
|
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:
|
|
467
|
+
helperText: r,
|
|
468
468
|
errorMessage: f,
|
|
469
469
|
required: d = !1,
|
|
470
470
|
disabled: h = !1,
|
|
471
|
-
readOnly:
|
|
471
|
+
readOnly: x = !1,
|
|
472
472
|
startIcon: l,
|
|
473
|
-
endIcon:
|
|
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:
|
|
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 =
|
|
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
|
-
), [
|
|
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),
|
|
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
|
-
!!
|
|
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
|
-
!!
|
|
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
|
-
|
|
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:
|
|
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 =
|
|
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(
|
|
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
|
-
) :
|
|
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:
|
|
647
|
+
children: r
|
|
648
648
|
}
|
|
649
649
|
) : null
|
|
650
650
|
] });
|
|
651
651
|
});
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
container:
|
|
655
|
-
disabled:
|
|
656
|
-
hiddenInput:
|
|
657
|
-
box:
|
|
658
|
-
checked:
|
|
659
|
-
indeterminate:
|
|
660
|
-
icon:
|
|
661
|
-
label:
|
|
662
|
-
},
|
|
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:
|
|
666
|
+
indeterminate: r = !1,
|
|
667
667
|
disabled: f = !1,
|
|
668
668
|
onChange: d,
|
|
669
669
|
className: h,
|
|
670
|
-
style:
|
|
670
|
+
style: x,
|
|
671
671
|
styles: l,
|
|
672
|
-
slotClassNames:
|
|
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
|
|
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 = !!
|
|
682
|
-
}, [
|
|
681
|
+
e.current && (e.current.indeterminate = !!r);
|
|
682
|
+
}, [r]);
|
|
683
683
|
const a = (M) => {
|
|
684
|
-
f || (
|
|
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
|
-
|
|
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
|
-
|
|
696
|
-
|
|
695
|
+
r && ie.indeterminate,
|
|
696
|
+
v == null ? void 0 : v.box
|
|
697
697
|
);
|
|
698
|
-
return /* @__PURE__ */ F("label", { className: A, style: g(
|
|
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":
|
|
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:
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
-
|
|
742
|
-
const
|
|
743
|
-
container:
|
|
744
|
-
floatingContainer:
|
|
745
|
-
selectWrapper:
|
|
746
|
-
withFloatingLabel:
|
|
747
|
-
selectWrapperOpen:
|
|
748
|
-
label:
|
|
749
|
-
requiredAsterisk:
|
|
750
|
-
floatingLabel:
|
|
751
|
-
floatingLabelText:
|
|
752
|
-
floated:
|
|
753
|
-
trigger:
|
|
754
|
-
hasError:
|
|
755
|
-
disabled:
|
|
756
|
-
open:
|
|
757
|
-
value:
|
|
758
|
-
placeholder:
|
|
759
|
-
floatingPlaceholder:
|
|
760
|
-
arrow:
|
|
761
|
-
arrowOpen:
|
|
762
|
-
dropdown:
|
|
763
|
-
option:
|
|
764
|
-
optionActive:
|
|
765
|
-
optionSelected:
|
|
766
|
-
optionDisabled:
|
|
767
|
-
checkIcon:
|
|
768
|
-
errorMessage:
|
|
769
|
-
},
|
|
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:
|
|
773
|
+
placeholder: r = "Select an option...",
|
|
774
774
|
label: f,
|
|
775
775
|
floatingLabel: d,
|
|
776
776
|
errorMessage: h,
|
|
777
|
-
disabled:
|
|
777
|
+
disabled: x = !1,
|
|
778
778
|
required: l = !1,
|
|
779
|
-
onChange:
|
|
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:
|
|
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:
|
|
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
|
|
792
|
+
const w = (W) => {
|
|
793
793
|
m.current && !m.current.contains(W.target) && O(!1);
|
|
794
794
|
};
|
|
795
|
-
return document.addEventListener("mousedown",
|
|
796
|
-
document.removeEventListener("mousedown",
|
|
795
|
+
return document.addEventListener("mousedown", w), () => {
|
|
796
|
+
document.removeEventListener("mousedown", w);
|
|
797
797
|
};
|
|
798
798
|
}, [L]);
|
|
799
|
-
const ue = (
|
|
799
|
+
const ue = (w) => {
|
|
800
800
|
var W;
|
|
801
|
-
|
|
802
|
-
}, pe = (
|
|
803
|
-
if (!
|
|
804
|
-
if (
|
|
805
|
-
if (
|
|
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 =
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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: (
|
|
831
|
-
m.current =
|
|
830
|
+
ref: (w) => {
|
|
831
|
+
m.current = w, typeof p == "function" ? p(w) : p && (p.current = w);
|
|
832
832
|
},
|
|
833
833
|
className: ae,
|
|
834
|
-
style:
|
|
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:
|
|
842
|
+
style: n == null ? void 0 : n.label,
|
|
843
843
|
onClick: () => {
|
|
844
|
-
var
|
|
845
|
-
return !
|
|
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
|
-
|
|
860
|
+
re && z.withFloatingLabel,
|
|
861
861
|
L && z.selectWrapperOpen,
|
|
862
862
|
e == null ? void 0 : e.wrapper
|
|
863
863
|
),
|
|
864
|
-
style:
|
|
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:
|
|
880
|
-
onClick: () => !
|
|
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:
|
|
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
|
-
|
|
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 ?
|
|
899
|
-
children: s ? s.label :
|
|
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:
|
|
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
|
-
|
|
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: (
|
|
941
|
+
style: (n == null ? void 0 : n.floatingLabel) || (n == null ? void 0 : n.label),
|
|
942
942
|
onClick: () => {
|
|
943
|
-
var
|
|
944
|
-
return !
|
|
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:
|
|
964
|
-
children: t.map((
|
|
965
|
-
const K =
|
|
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":
|
|
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
|
-
|
|
977
|
-
|
|
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
|
-
...
|
|
983
|
-
...K ?
|
|
982
|
+
...n == null ? void 0 : n.option,
|
|
983
|
+
...K ? n == null ? void 0 : n.selectedOption : void 0
|
|
984
984
|
},
|
|
985
|
-
onClick: () => ue(
|
|
985
|
+
onClick: () => ue(w),
|
|
986
986
|
children: [
|
|
987
|
-
/* @__PURE__ */ u("span", { children:
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
1028
|
-
const
|
|
1029
|
-
container:
|
|
1030
|
-
floatingContainer:
|
|
1031
|
-
label:
|
|
1032
|
-
requiredAsterisk:
|
|
1033
|
-
wrapper:
|
|
1034
|
-
withFloatingLabel:
|
|
1035
|
-
hasError:
|
|
1036
|
-
disabled:
|
|
1037
|
-
floatingLabel:
|
|
1038
|
-
floatingLabelText:
|
|
1039
|
-
floated:
|
|
1040
|
-
textarea:
|
|
1041
|
-
floatingTextarea:
|
|
1042
|
-
footer: $
|
|
1043
|
-
helperText:
|
|
1044
|
-
errorMessage:
|
|
1045
|
-
counter:
|
|
1046
|
-
},
|
|
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:
|
|
1050
|
+
helperText: r,
|
|
1051
1051
|
errorMessage: f,
|
|
1052
1052
|
required: d = !1,
|
|
1053
1053
|
disabled: h = !1,
|
|
1054
|
-
readOnly:
|
|
1054
|
+
readOnly: x = !1,
|
|
1055
1055
|
rows: l = 4,
|
|
1056
|
-
maxLength:
|
|
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:
|
|
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 =
|
|
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),
|
|
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),
|
|
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
|
-
|
|
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
|
-
|
|
1096
|
+
re && T.floated,
|
|
1097
1097
|
g == null ? void 0 : g.textarea
|
|
1098
|
-
),
|
|
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
|
-
|
|
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:
|
|
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:
|
|
1143
|
+
readOnly: x,
|
|
1144
1144
|
required: d,
|
|
1145
|
-
"aria-invalid":
|
|
1146
|
-
"aria-describedby":
|
|
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
|
-
|
|
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
|
-
) :
|
|
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:
|
|
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:
|
|
1190
|
+
children: v !== void 0 ? `${Z.length} / ${v}` : Z.length
|
|
1191
1191
|
}
|
|
1192
1192
|
)
|
|
1193
1193
|
] })
|
|
1194
1194
|
] });
|
|
1195
1195
|
});
|
|
1196
|
-
|
|
1197
|
-
const
|
|
1198
|
-
container:
|
|
1199
|
-
disabled:
|
|
1200
|
-
radio:
|
|
1201
|
-
labelWrapper:
|
|
1202
|
-
label:
|
|
1203
|
-
labelChecked:
|
|
1204
|
-
description:
|
|
1205
|
-
groupContainer:
|
|
1206
|
-
groupLabel:
|
|
1207
|
-
optionsVertical:
|
|
1208
|
-
optionsHorizontal:
|
|
1209
|
-
groupError:
|
|
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
|
|
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:
|
|
1218
|
+
size: r,
|
|
1219
1219
|
color: f,
|
|
1220
1220
|
checked: d,
|
|
1221
1221
|
defaultChecked: h = !1,
|
|
1222
|
-
disabled:
|
|
1222
|
+
disabled: x = !1,
|
|
1223
1223
|
onChange: l,
|
|
1224
|
-
name:
|
|
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":
|
|
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 =
|
|
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
|
-
),
|
|
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":
|
|
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:
|
|
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
|
|
1319
|
+
const Gr = ce(function({
|
|
1320
1320
|
name: t,
|
|
1321
1321
|
value: i,
|
|
1322
1322
|
defaultValue: c,
|
|
1323
|
-
onChange:
|
|
1323
|
+
onChange: r,
|
|
1324
1324
|
options: f,
|
|
1325
1325
|
direction: d = "vertical",
|
|
1326
1326
|
label: h,
|
|
1327
|
-
errorMessage:
|
|
1327
|
+
errorMessage: x,
|
|
1328
1328
|
disabled: l = !1,
|
|
1329
|
-
size:
|
|
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":
|
|
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),
|
|
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:
|
|
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":
|
|
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
|
-
|
|
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
|
-
|
|
1388
|
-
const
|
|
1389
|
-
container:
|
|
1390
|
-
disabled:
|
|
1391
|
-
hiddenInput:
|
|
1392
|
-
track:
|
|
1393
|
-
checked:
|
|
1394
|
-
thumb:
|
|
1395
|
-
sizeSmall:
|
|
1396
|
-
sizeMedium:
|
|
1397
|
-
sizeLarge:
|
|
1398
|
-
icon:
|
|
1399
|
-
labelWrapper:
|
|
1400
|
-
label:
|
|
1401
|
-
description:
|
|
1402
|
-
},
|
|
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:
|
|
1410
|
+
disabled: r = !1,
|
|
1411
1411
|
size: f = "medium",
|
|
1412
1412
|
label: d,
|
|
1413
1413
|
description: h,
|
|
1414
|
-
checkedIcon:
|
|
1414
|
+
checkedIcon: x,
|
|
1415
1415
|
uncheckedIcon: l,
|
|
1416
|
-
name:
|
|
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:
|
|
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 (
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
1454
|
+
name: v,
|
|
1455
1455
|
value: I,
|
|
1456
1456
|
checked: q,
|
|
1457
|
-
disabled:
|
|
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:
|
|
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:
|
|
1469
|
-
children:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
1515
|
+
const ni = ({
|
|
1516
1516
|
children: o,
|
|
1517
1517
|
config: t,
|
|
1518
1518
|
wrapWithContainer: i = !1,
|
|
1519
1519
|
className: c,
|
|
1520
|
-
style:
|
|
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
|
-
),
|
|
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
|
-
...
|
|
1536
|
+
...v,
|
|
1537
1537
|
...I,
|
|
1538
|
-
...
|
|
1538
|
+
...r
|
|
1539
1539
|
};
|
|
1540
|
-
}, [i, d,
|
|
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:
|
|
1548
|
+
return /* @__PURE__ */ u(be.Provider, { value: d, children: x });
|
|
1549
1549
|
};
|
|
1550
|
-
|
|
1550
|
+
ni.displayName = "UIProvider";
|
|
1551
1551
|
export {
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1552
|
+
rn as Button,
|
|
1553
|
+
On as Checkbox,
|
|
1554
|
+
zn as Input,
|
|
1555
1555
|
Re as Radio,
|
|
1556
|
-
|
|
1556
|
+
Gr as RadioGroup,
|
|
1557
1557
|
Ae as RadioGroupContext,
|
|
1558
|
-
|
|
1558
|
+
tr as Select,
|
|
1559
1559
|
ei as Switch,
|
|
1560
|
-
|
|
1560
|
+
zr as Textarea,
|
|
1561
1561
|
be as UIContext,
|
|
1562
|
-
|
|
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
|
-
|
|
1569
|
+
xe as getSubtleBackgroundColor,
|
|
1570
1570
|
Se as mergeUIConfig,
|
|
1571
|
-
|
|
1571
|
+
nn as resolveComponentStyles,
|
|
1572
1572
|
_e as stylesToCssVars,
|
|
1573
1573
|
de as useComponentStyles,
|
|
1574
|
-
|
|
1574
|
+
Pr as useRadioGroup,
|
|
1575
1575
|
me as useUI
|
|
1576
1576
|
};
|
|
1577
1577
|
//# sourceMappingURL=index.js.map
|