@purpurds/text-field 5.24.3 → 5.25.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +6 -6
- package/dist/text-field.cjs.js +10 -10
- package/dist/text-field.cjs.js.map +1 -1
- package/dist/text-field.es.js +63 -73
- package/dist/text-field.es.js.map +1 -1
- package/package.json +8 -8
package/dist/text-field.es.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { jsxs as b, jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as h, Children as O, isValidElement as z, createElement as M,
|
|
2
|
+
import { forwardRef as h, Children as O, isValidElement as z, createElement as M, Fragment as mr, cloneElement as K, useEffect as gr, useRef as br, useId as yr } from "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const hr = {
|
|
5
|
-
SM: "sm",
|
|
6
|
-
MD: "md",
|
|
7
5
|
LG: "lg"
|
|
8
6
|
};
|
|
9
7
|
function $r(t) {
|
|
@@ -46,7 +44,7 @@ var Q = { exports: {} };
|
|
|
46
44
|
})();
|
|
47
45
|
})(Q);
|
|
48
46
|
var wr = Q.exports;
|
|
49
|
-
const
|
|
47
|
+
const T = /* @__PURE__ */ $r(wr), jr = "_rotate_1xozj_1", Sr = "_dash_1xozj_1", w = {
|
|
50
48
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
51
49
|
rotate: jr,
|
|
52
50
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
@@ -59,11 +57,7 @@ const V = /* @__PURE__ */ $r(wr), jr = "_rotate_1xozj_1", Sr = "_dash_1xozj_1",
|
|
|
59
57
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
60
58
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
61
59
|
}, j = "purpur-spinner", Nr = {
|
|
62
|
-
|
|
63
|
-
XS: "xs",
|
|
64
|
-
SM: "sm",
|
|
65
|
-
MD: "md",
|
|
66
|
-
LG: "lg"
|
|
60
|
+
SM: "sm"
|
|
67
61
|
}, Or = ({
|
|
68
62
|
["data-testid"]: t,
|
|
69
63
|
disabled: u = !1,
|
|
@@ -73,13 +67,13 @@ const V = /* @__PURE__ */ $r(wr), jr = "_rotate_1xozj_1", Sr = "_dash_1xozj_1",
|
|
|
73
67
|
}) => /* @__PURE__ */ p(
|
|
74
68
|
"div",
|
|
75
69
|
{
|
|
76
|
-
className:
|
|
70
|
+
className: T([w[j], w[`${j}--${a}`]]),
|
|
77
71
|
"data-testid": t,
|
|
78
72
|
...o,
|
|
79
73
|
children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
|
|
80
74
|
"circle",
|
|
81
75
|
{
|
|
82
|
-
className:
|
|
76
|
+
className: T(w[`${j}__circle`], {
|
|
83
77
|
[w[`${j}__circle--disabled`]]: u,
|
|
84
78
|
[w[`${j}__circle--negative`]]: n
|
|
85
79
|
}),
|
|
@@ -203,7 +197,7 @@ const Ar = /* @__PURE__ */ zr(Mr), Cr = {
|
|
|
203
197
|
);
|
|
204
198
|
}, tr = h(Ir);
|
|
205
199
|
tr.displayName = "Button";
|
|
206
|
-
function
|
|
200
|
+
function Br(t) {
|
|
207
201
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
208
202
|
}
|
|
209
203
|
var er = { exports: {} };
|
|
@@ -242,8 +236,8 @@ var er = { exports: {} };
|
|
|
242
236
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
243
237
|
})();
|
|
244
238
|
})(er);
|
|
245
|
-
var
|
|
246
|
-
const
|
|
239
|
+
var Lr = er.exports;
|
|
240
|
+
const Er = /* @__PURE__ */ Br(Lr), Pr = {
|
|
247
241
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
248
242
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
249
243
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -251,31 +245,31 @@ const Dr = /* @__PURE__ */ Lr(Br), Er = {
|
|
|
251
245
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
252
246
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
253
247
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
254
|
-
},
|
|
248
|
+
}, kr = {
|
|
255
249
|
name: "error-filled",
|
|
256
250
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',
|
|
257
251
|
keywords: ["error-filled"],
|
|
258
252
|
category: "status"
|
|
259
|
-
},
|
|
253
|
+
}, Fr = Er.bind(Pr), Y = "purpur-icon", Vr = "md", Zr = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Dr = ({ content: t = "", title: u } = {}) => {
|
|
260
254
|
const n = [
|
|
261
255
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
262
256
|
{ name: "fill", value: "currentColor" },
|
|
263
257
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
264
258
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
265
259
|
], a = u ? `<title>${u}</title>` : "";
|
|
266
|
-
return `<svg ${
|
|
260
|
+
return `<svg ${Zr(n)}>${a}${t}</svg>`;
|
|
267
261
|
}, Rr = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), nr = ({
|
|
268
262
|
["data-testid"]: t,
|
|
269
263
|
svg: u,
|
|
270
264
|
allyTitle: n,
|
|
271
265
|
className: a,
|
|
272
|
-
size: o =
|
|
266
|
+
size: o = Vr,
|
|
273
267
|
...r
|
|
274
268
|
}) => {
|
|
275
|
-
const e =
|
|
269
|
+
const e = Dr({
|
|
276
270
|
content: Rr(u.svg),
|
|
277
271
|
title: n
|
|
278
|
-
}), i =
|
|
272
|
+
}), i = Fr(a, Y, `${Y}--${o}`);
|
|
279
273
|
return /* @__PURE__ */ p(
|
|
280
274
|
"span",
|
|
281
275
|
{
|
|
@@ -288,7 +282,7 @@ const Dr = /* @__PURE__ */ Lr(Br), Er = {
|
|
|
288
282
|
);
|
|
289
283
|
};
|
|
290
284
|
nr.displayName = "Icon";
|
|
291
|
-
function
|
|
285
|
+
function Tr(t) {
|
|
292
286
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
293
287
|
}
|
|
294
288
|
var ir = { exports: {} };
|
|
@@ -327,8 +321,8 @@ var ir = { exports: {} };
|
|
|
327
321
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
328
322
|
})();
|
|
329
323
|
})(ir);
|
|
330
|
-
var
|
|
331
|
-
const Gr = /* @__PURE__ */
|
|
324
|
+
var Yr = ir.exports;
|
|
325
|
+
const Gr = /* @__PURE__ */ Tr(Yr), G = {
|
|
332
326
|
"purpur-field-error-text": "_purpur-field-error-text_1u768_1",
|
|
333
327
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_1u768_12"
|
|
334
328
|
}, H = "purpur-field-error-text", Hr = ({
|
|
@@ -346,12 +340,12 @@ const Gr = /* @__PURE__ */ Vr(Tr), G = {
|
|
|
346
340
|
"aria-relevant": a,
|
|
347
341
|
...o,
|
|
348
342
|
children: [
|
|
349
|
-
/* @__PURE__ */ p(nr, { svg:
|
|
343
|
+
/* @__PURE__ */ p(nr, { svg: kr, size: "xs", className: G[`${H}__icon`] }),
|
|
350
344
|
u
|
|
351
345
|
]
|
|
352
346
|
}
|
|
353
347
|
);
|
|
354
|
-
function
|
|
348
|
+
function Jr(t) {
|
|
355
349
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
356
350
|
}
|
|
357
351
|
var ur = { exports: {} };
|
|
@@ -390,11 +384,11 @@ var ur = { exports: {} };
|
|
|
390
384
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
391
385
|
})();
|
|
392
386
|
})(ur);
|
|
393
|
-
var
|
|
394
|
-
const
|
|
387
|
+
var Ur = ur.exports;
|
|
388
|
+
const Wr = /* @__PURE__ */ Jr(Ur), J = {
|
|
395
389
|
"purpur-field-helper-text": "_purpur-field-helper-text_atw6b_1",
|
|
396
390
|
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_atw6b_9"
|
|
397
|
-
},
|
|
391
|
+
}, U = "purpur-field-helper-text", Xr = ({
|
|
398
392
|
["data-testid"]: t,
|
|
399
393
|
children: u,
|
|
400
394
|
className: n,
|
|
@@ -402,11 +396,11 @@ const Ur = /* @__PURE__ */ Yr(Jr), Y = {
|
|
|
402
396
|
id: o,
|
|
403
397
|
...r
|
|
404
398
|
}) => {
|
|
405
|
-
const e =
|
|
399
|
+
const e = Wr([
|
|
406
400
|
n,
|
|
407
|
-
|
|
401
|
+
J[U],
|
|
408
402
|
{
|
|
409
|
-
[
|
|
403
|
+
[J[`${U}--disabled`]]: a
|
|
410
404
|
}
|
|
411
405
|
]);
|
|
412
406
|
return /* @__PURE__ */ p("span", { id: o, className: e, "data-testid": t, ...r, children: u });
|
|
@@ -470,7 +464,7 @@ const rt = /* @__PURE__ */ Kr(Qr), tt = {
|
|
|
470
464
|
keywords: ["close"],
|
|
471
465
|
category: "utility"
|
|
472
466
|
}, or = (t) => /* @__PURE__ */ p(
|
|
473
|
-
|
|
467
|
+
F,
|
|
474
468
|
{
|
|
475
469
|
...t,
|
|
476
470
|
svg: et
|
|
@@ -478,14 +472,14 @@ const rt = /* @__PURE__ */ Kr(Qr), tt = {
|
|
|
478
472
|
);
|
|
479
473
|
or.displayName = "IconCheckCircleFilled";
|
|
480
474
|
const pr = (t) => /* @__PURE__ */ p(
|
|
481
|
-
|
|
475
|
+
F,
|
|
482
476
|
{
|
|
483
477
|
...t,
|
|
484
478
|
svg: nt
|
|
485
479
|
}
|
|
486
480
|
);
|
|
487
481
|
pr.displayName = "IconClose";
|
|
488
|
-
const it = rt.bind(tt),
|
|
482
|
+
const it = rt.bind(tt), W = "purpur-icon", ut = "md", at = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), ot = ({ content: t = "", title: u } = {}) => {
|
|
489
483
|
const n = [
|
|
490
484
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
491
485
|
{ name: "fill", value: "currentColor" },
|
|
@@ -493,7 +487,7 @@ const it = rt.bind(tt), U = "purpur-icon", ut = "md", at = (t) => t.filter((u) =
|
|
|
493
487
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
494
488
|
], a = u ? `<title>${u}</title>` : "";
|
|
495
489
|
return `<svg ${at(n)}>${a}${t}</svg>`;
|
|
496
|
-
}, pt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
490
|
+
}, pt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), F = ({
|
|
497
491
|
["data-testid"]: t,
|
|
498
492
|
svg: u,
|
|
499
493
|
allyTitle: n,
|
|
@@ -504,7 +498,7 @@ const it = rt.bind(tt), U = "purpur-icon", ut = "md", at = (t) => t.filter((u) =
|
|
|
504
498
|
const e = ot({
|
|
505
499
|
content: pt(u.svg),
|
|
506
500
|
title: n
|
|
507
|
-
}), i = it(a,
|
|
501
|
+
}), i = it(a, W, `${W}--${o}`);
|
|
508
502
|
return /* @__PURE__ */ p(
|
|
509
503
|
"span",
|
|
510
504
|
{
|
|
@@ -516,7 +510,7 @@ const it = rt.bind(tt), U = "purpur-icon", ut = "md", at = (t) => t.filter((u) =
|
|
|
516
510
|
}
|
|
517
511
|
);
|
|
518
512
|
};
|
|
519
|
-
|
|
513
|
+
F.displayName = "Icon";
|
|
520
514
|
function y() {
|
|
521
515
|
return y = Object.assign ? Object.assign.bind() : function(t) {
|
|
522
516
|
for (var u = 1; u < arguments.length; u++) {
|
|
@@ -538,24 +532,24 @@ const lr = /* @__PURE__ */ h((t, u) => {
|
|
|
538
532
|
const { children: n, ...a } = t, o = O.toArray(n), r = o.find(dt);
|
|
539
533
|
if (r) {
|
|
540
534
|
const e = r.props.children, i = o.map((f) => f === r ? O.count(e) > 1 ? O.only(null) : /* @__PURE__ */ z(e) ? e.props.children : null : f);
|
|
541
|
-
return /* @__PURE__ */ M(
|
|
535
|
+
return /* @__PURE__ */ M(k, y({}, a, {
|
|
542
536
|
ref: u
|
|
543
537
|
}), /* @__PURE__ */ z(e) ? /* @__PURE__ */ K(e, void 0, i) : null);
|
|
544
538
|
}
|
|
545
|
-
return /* @__PURE__ */ M(
|
|
539
|
+
return /* @__PURE__ */ M(k, y({}, a, {
|
|
546
540
|
ref: u
|
|
547
541
|
}), n);
|
|
548
542
|
});
|
|
549
543
|
lr.displayName = "Slot";
|
|
550
|
-
const
|
|
544
|
+
const k = /* @__PURE__ */ h((t, u) => {
|
|
551
545
|
const { children: n, ...a } = t;
|
|
552
546
|
return /* @__PURE__ */ z(n) ? /* @__PURE__ */ K(n, {
|
|
553
547
|
..._t(a, n.props),
|
|
554
548
|
ref: u ? st(u, n.ref) : n.ref
|
|
555
549
|
}) : O.count(n) > 1 ? O.only(null) : null;
|
|
556
550
|
});
|
|
557
|
-
|
|
558
|
-
const ct = ({ children: t }) => /* @__PURE__ */ M(
|
|
551
|
+
k.displayName = "SlotClone";
|
|
552
|
+
const ct = ({ children: t }) => /* @__PURE__ */ M(mr, null, t);
|
|
559
553
|
function dt(t) {
|
|
560
554
|
return /* @__PURE__ */ z(t) && t.type === ct;
|
|
561
555
|
}
|
|
@@ -600,7 +594,7 @@ const ft = [
|
|
|
600
594
|
], vt = ft.reduce((t, u) => {
|
|
601
595
|
const n = /* @__PURE__ */ h((a, o) => {
|
|
602
596
|
const { asChild: r, ...e } = a, i = r ? lr : u;
|
|
603
|
-
return
|
|
597
|
+
return gr(() => {
|
|
604
598
|
window[Symbol.for("radix-ui")] = !0;
|
|
605
599
|
}, []), /* @__PURE__ */ M(i, y({}, e, {
|
|
606
600
|
ref: o
|
|
@@ -657,11 +651,11 @@ var sr = { exports: {} };
|
|
|
657
651
|
})();
|
|
658
652
|
})(sr);
|
|
659
653
|
var bt = sr.exports;
|
|
660
|
-
const yt = /* @__PURE__ */ gt(bt),
|
|
654
|
+
const yt = /* @__PURE__ */ gt(bt), E = {
|
|
661
655
|
"purpur-label": "_purpur-label_12cfi_1",
|
|
662
656
|
"purpur-label--negative": "_purpur-label--negative_12cfi_9",
|
|
663
657
|
"purpur-label--disabled": "_purpur-label--disabled_12cfi_12"
|
|
664
|
-
},
|
|
658
|
+
}, P = "purpur-label", ht = ({
|
|
665
659
|
children: t,
|
|
666
660
|
className: u,
|
|
667
661
|
htmlFor: n,
|
|
@@ -672,10 +666,10 @@ const yt = /* @__PURE__ */ gt(bt), D = {
|
|
|
672
666
|
}) => {
|
|
673
667
|
const i = yt([
|
|
674
668
|
u,
|
|
675
|
-
|
|
669
|
+
E[P],
|
|
676
670
|
{
|
|
677
|
-
[
|
|
678
|
-
[
|
|
671
|
+
[E[`${P}--disabled`]]: o,
|
|
672
|
+
[E[`${P}--negative`]]: r
|
|
679
673
|
}
|
|
680
674
|
]);
|
|
681
675
|
return /* @__PURE__ */ p(mt, { className: i, "data-testid": a, htmlFor: n, ...e, children: t });
|
|
@@ -720,7 +714,7 @@ var cr = { exports: {} };
|
|
|
720
714
|
})();
|
|
721
715
|
})(cr);
|
|
722
716
|
var wt = cr.exports;
|
|
723
|
-
const
|
|
717
|
+
const X = /* @__PURE__ */ $t(wt), jt = "_rotate_1xozj_1", St = "_dash_1xozj_1", S = {
|
|
724
718
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
725
719
|
rotate: jt,
|
|
726
720
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
@@ -733,11 +727,7 @@ const W = /* @__PURE__ */ $t(wt), jt = "_rotate_1xozj_1", St = "_dash_1xozj_1",
|
|
|
733
727
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
734
728
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
735
729
|
}, N = "purpur-spinner", Nt = {
|
|
736
|
-
|
|
737
|
-
XS: "xs",
|
|
738
|
-
SM: "sm",
|
|
739
|
-
MD: "md",
|
|
740
|
-
LG: "lg"
|
|
730
|
+
SM: "sm"
|
|
741
731
|
}, Ot = ({
|
|
742
732
|
["data-testid"]: t,
|
|
743
733
|
disabled: u = !1,
|
|
@@ -747,13 +737,13 @@ const W = /* @__PURE__ */ $t(wt), jt = "_rotate_1xozj_1", St = "_dash_1xozj_1",
|
|
|
747
737
|
}) => /* @__PURE__ */ p(
|
|
748
738
|
"div",
|
|
749
739
|
{
|
|
750
|
-
className:
|
|
740
|
+
className: X([S[N], S[`${N}--${a}`]]),
|
|
751
741
|
"data-testid": t,
|
|
752
742
|
...o,
|
|
753
743
|
children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
|
|
754
744
|
"circle",
|
|
755
745
|
{
|
|
756
|
-
className:
|
|
746
|
+
className: X(S[`${N}__circle`], {
|
|
757
747
|
[S[`${N}__circle--disabled`]]: u,
|
|
758
748
|
[S[`${N}__circle--negative`]]: n
|
|
759
749
|
}),
|
|
@@ -838,12 +828,12 @@ const At = /* @__PURE__ */ zt(Mt), Ct = {
|
|
|
838
828
|
...l
|
|
839
829
|
}, m) => {
|
|
840
830
|
var R;
|
|
841
|
-
const q = yr(), g = l.id ?? q, c = (d) => t ? `${t}-${d}` : void 0,
|
|
842
|
-
|
|
831
|
+
const q = yr(), g = l.id ?? q, c = (d) => t ? `${t}-${d}` : void 0, V = A && !e, I = i ? `${g}-helper-text` : void 0, B = [C].filter((d) => !!d), Z = (typeof l.value == "number" ? l.value !== void 0 : (R = l.value) == null ? void 0 : R.length) && !l.disabled && !l.readOnly && !$ && v && n, D = qt(null), fr = (d) => {
|
|
832
|
+
D.current = d, typeof m == "function" ? m(d) : m && (m.current = d);
|
|
843
833
|
}, vr = () => {
|
|
844
834
|
var d;
|
|
845
|
-
v == null || v(), (d =
|
|
846
|
-
},
|
|
835
|
+
v == null || v(), (d = D.current) == null || d.focus();
|
|
836
|
+
}, L = [
|
|
847
837
|
$ && /* @__PURE__ */ p(
|
|
848
838
|
Ot,
|
|
849
839
|
{
|
|
@@ -853,7 +843,7 @@ const At = /* @__PURE__ */ zt(Mt), Ct = {
|
|
|
853
843
|
},
|
|
854
844
|
"spinner"
|
|
855
845
|
),
|
|
856
|
-
|
|
846
|
+
Z && /* @__PURE__ */ p(
|
|
857
847
|
tr,
|
|
858
848
|
{
|
|
859
849
|
variant: "tertiary-purple",
|
|
@@ -866,7 +856,7 @@ const At = /* @__PURE__ */ zt(Mt), Ct = {
|
|
|
866
856
|
},
|
|
867
857
|
"clear-button"
|
|
868
858
|
),
|
|
869
|
-
|
|
859
|
+
V && /* @__PURE__ */ p(
|
|
870
860
|
or,
|
|
871
861
|
{
|
|
872
862
|
"data-testid": c("valid-icon"),
|
|
@@ -877,10 +867,10 @@ const At = /* @__PURE__ */ zt(Mt), Ct = {
|
|
|
877
867
|
].filter((d) => !!d), xr = _([
|
|
878
868
|
`${s}__input-container`,
|
|
879
869
|
{
|
|
880
|
-
[`${s}__input-container--start-adornment`]:
|
|
881
|
-
[`${s}__input-container--end-adornment`]:
|
|
870
|
+
[`${s}__input-container--start-adornment`]: B.length,
|
|
871
|
+
[`${s}__input-container--end-adornment`]: L.length || r,
|
|
882
872
|
[`${s}__input-container--disabled`]: l.disabled,
|
|
883
|
-
[`${s}__input-container--has-clear-button`]:
|
|
873
|
+
[`${s}__input-container--has-clear-button`]: Z,
|
|
884
874
|
[`${s}__input-container--readonly`]: l.readOnly && !l.disabled
|
|
885
875
|
}
|
|
886
876
|
]);
|
|
@@ -898,12 +888,12 @@ const At = /* @__PURE__ */ zt(Mt), Ct = {
|
|
|
898
888
|
/* @__PURE__ */ b("div", { className: _(`${s}__field-row`), children: [
|
|
899
889
|
!!a && a,
|
|
900
890
|
/* @__PURE__ */ b("div", { className: xr, children: [
|
|
901
|
-
!!
|
|
891
|
+
!!B.length && /* @__PURE__ */ p(
|
|
902
892
|
"div",
|
|
903
893
|
{
|
|
904
894
|
"data-testid": c("start-adornments"),
|
|
905
895
|
className: _(`${s}__adornment-container`),
|
|
906
|
-
children:
|
|
896
|
+
children: B
|
|
907
897
|
}
|
|
908
898
|
),
|
|
909
899
|
/* @__PURE__ */ p(
|
|
@@ -918,20 +908,20 @@ const At = /* @__PURE__ */ zt(Mt), Ct = {
|
|
|
918
908
|
className: _([
|
|
919
909
|
`${s}__input`,
|
|
920
910
|
{
|
|
921
|
-
[`${s}__input--valid`]:
|
|
911
|
+
[`${s}__input--valid`]: V,
|
|
922
912
|
[`${s}__input--error`]: !!e
|
|
923
913
|
}
|
|
924
914
|
])
|
|
925
915
|
}
|
|
926
916
|
),
|
|
927
917
|
/* @__PURE__ */ p("div", { className: _(`${s}__frame`) }),
|
|
928
|
-
(!!
|
|
918
|
+
(!!L.length || r) && /* @__PURE__ */ b(
|
|
929
919
|
"div",
|
|
930
920
|
{
|
|
931
921
|
"data-testid": c("end-adornments"),
|
|
932
922
|
className: _(`${s}__adornment-container`),
|
|
933
923
|
children: [
|
|
934
|
-
|
|
924
|
+
L,
|
|
935
925
|
r
|
|
936
926
|
]
|
|
937
927
|
}
|
|
@@ -939,14 +929,14 @@ const At = /* @__PURE__ */ zt(Mt), Ct = {
|
|
|
939
929
|
] }),
|
|
940
930
|
!!o && o
|
|
941
931
|
] }),
|
|
942
|
-
I && /* @__PURE__ */ p(
|
|
932
|
+
I && /* @__PURE__ */ p(Xr, { "data-testid": c("helper-text"), id: I, children: i }),
|
|
943
933
|
e && /* @__PURE__ */ p(Hr, { "data-testid": c("error-text"), children: e })
|
|
944
934
|
] });
|
|
945
935
|
}, _r = h(It);
|
|
946
936
|
_r.displayName = "TextField";
|
|
947
|
-
const
|
|
937
|
+
const kt = (t) => z(t) && t.type.displayName === _r.displayName;
|
|
948
938
|
export {
|
|
949
939
|
_r as TextField,
|
|
950
|
-
|
|
940
|
+
kt as isTextField
|
|
951
941
|
};
|
|
952
942
|
//# sourceMappingURL=text-field.es.js.map
|