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