@purpurds/text-field 8.18.0 → 8.20.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 +1 -1
- package/dist/text-field.cjs.js.map +1 -1
- package/dist/text-field.d.ts +22 -22
- package/dist/text-field.es.js +189 -180
- package/dist/text-field.es.js.map +1 -1
- package/package.json +10 -10
package/dist/text-field.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as b, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as sr, useRef as jr, useId as Sr, isValidElement as Nr } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
const
|
|
5
|
+
const Or = {
|
|
6
6
|
LG: "lg"
|
|
7
7
|
};
|
|
8
|
-
function
|
|
8
|
+
function qr(e) {
|
|
9
9
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
10
10
|
}
|
|
11
|
-
var D = { exports: {} },
|
|
12
|
-
function
|
|
13
|
-
return
|
|
11
|
+
var D = { exports: {} }, k;
|
|
12
|
+
function Cr() {
|
|
13
|
+
return k || (k = 1, (function(e) {
|
|
14
14
|
(function() {
|
|
15
15
|
var u = {}.hasOwnProperty;
|
|
16
16
|
function n() {
|
|
@@ -41,31 +41,31 @@ function Or() {
|
|
|
41
41
|
})();
|
|
42
42
|
})(D)), D.exports;
|
|
43
43
|
}
|
|
44
|
-
var
|
|
45
|
-
const
|
|
44
|
+
var Mr = Cr();
|
|
45
|
+
const Ar = /* @__PURE__ */ qr(Mr), Rr = "_rotate_12t9p_1", Ir = "_dash_12t9p_1", Br = {
|
|
46
46
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
47
|
-
rotate:
|
|
47
|
+
rotate: Rr,
|
|
48
48
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
49
49
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
50
50
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
51
51
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
52
52
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
53
53
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
54
|
-
dash:
|
|
54
|
+
dash: Ir,
|
|
55
55
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
56
56
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
57
|
-
},
|
|
57
|
+
}, Z = Ar.bind(Br), w = "purpur-spinner", zr = {
|
|
58
58
|
SM: "sm"
|
|
59
|
-
},
|
|
59
|
+
}, cr = ({
|
|
60
60
|
disabled: e = !1,
|
|
61
61
|
negative: u = !1,
|
|
62
|
-
size: n =
|
|
62
|
+
size: n = zr.SM,
|
|
63
63
|
className: p,
|
|
64
64
|
...a
|
|
65
|
-
}) => /* @__PURE__ */ l("div", { className:
|
|
65
|
+
}) => /* @__PURE__ */ l("div", { className: Z(w, `${w}--${n}`, p), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
|
|
66
66
|
"circle",
|
|
67
67
|
{
|
|
68
|
-
className:
|
|
68
|
+
className: Z(`${w}__circle`, {
|
|
69
69
|
[`${w}__circle--disabled`]: e,
|
|
70
70
|
[`${w}__circle--negative`]: u
|
|
71
71
|
}),
|
|
@@ -74,12 +74,12 @@ const Cr = /* @__PURE__ */ Nr(qr), Mr = "_rotate_12t9p_1", Ar = "_dash_12t9p_1",
|
|
|
74
74
|
r: "20"
|
|
75
75
|
}
|
|
76
76
|
) }) });
|
|
77
|
-
|
|
78
|
-
function
|
|
77
|
+
cr.displayName = "Spinner";
|
|
78
|
+
function Er(e) {
|
|
79
79
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
80
80
|
}
|
|
81
|
-
var
|
|
82
|
-
function
|
|
81
|
+
var W = { exports: {} }, F;
|
|
82
|
+
function Pr() {
|
|
83
83
|
return F || (F = 1, (function(e) {
|
|
84
84
|
(function() {
|
|
85
85
|
var u = {}.hasOwnProperty;
|
|
@@ -109,10 +109,10 @@ function Er() {
|
|
|
109
109
|
}
|
|
110
110
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
111
111
|
})();
|
|
112
|
-
})(
|
|
112
|
+
})(W)), W.exports;
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
const
|
|
114
|
+
var Vr = Pr();
|
|
115
|
+
const Lr = /* @__PURE__ */ Er(Vr), Dr = {
|
|
116
116
|
"purpur-button": "_purpur-button_10jh0_1",
|
|
117
117
|
"purpur-button--xs": "_purpur-button--xs_10jh0_22",
|
|
118
118
|
"purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
|
|
@@ -135,7 +135,7 @@ const Vr = /* @__PURE__ */ Br(Pr), zr = {
|
|
|
135
135
|
"purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
|
|
136
136
|
"purpur-button--text": "_purpur-button--text_10jh0_185",
|
|
137
137
|
"purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
|
|
138
|
-
},
|
|
138
|
+
}, T = Lr.bind(Dr), y = "purpur-button", _r = sr(
|
|
139
139
|
({
|
|
140
140
|
children: e,
|
|
141
141
|
className: u,
|
|
@@ -149,10 +149,10 @@ const Vr = /* @__PURE__ */ Br(Pr), zr = {
|
|
|
149
149
|
variant: _,
|
|
150
150
|
type: $ = "button",
|
|
151
151
|
...g
|
|
152
|
-
},
|
|
152
|
+
}, N) => {
|
|
153
153
|
if (a && _ === "destructive")
|
|
154
154
|
return null;
|
|
155
|
-
const
|
|
155
|
+
const O = T(
|
|
156
156
|
[
|
|
157
157
|
y,
|
|
158
158
|
`${y}--${t ? `${_}-negative` : _}`,
|
|
@@ -171,20 +171,20 @@ const Vr = /* @__PURE__ */ Br(Pr), zr = {
|
|
|
171
171
|
return /* @__PURE__ */ b(
|
|
172
172
|
"button",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
174
|
+
className: O,
|
|
175
175
|
type: $,
|
|
176
|
-
ref:
|
|
176
|
+
ref: N,
|
|
177
177
|
"aria-disabled": s,
|
|
178
178
|
onClick: d,
|
|
179
179
|
...g,
|
|
180
180
|
children: [
|
|
181
181
|
r && /* @__PURE__ */ l(
|
|
182
|
-
|
|
182
|
+
cr,
|
|
183
183
|
{
|
|
184
|
-
size: f ===
|
|
184
|
+
size: f === Or.LG ? "xs" : "xxs",
|
|
185
185
|
negative: t,
|
|
186
186
|
disabled: s,
|
|
187
|
-
className:
|
|
187
|
+
className: T(`${y}__spinner`)
|
|
188
188
|
}
|
|
189
189
|
),
|
|
190
190
|
" ",
|
|
@@ -194,13 +194,13 @@ const Vr = /* @__PURE__ */ Br(Pr), zr = {
|
|
|
194
194
|
);
|
|
195
195
|
}
|
|
196
196
|
);
|
|
197
|
-
|
|
198
|
-
function
|
|
197
|
+
_r.displayName = "Button";
|
|
198
|
+
function kr(e) {
|
|
199
199
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
200
200
|
}
|
|
201
|
-
var G = { exports: {} },
|
|
202
|
-
function
|
|
203
|
-
return
|
|
201
|
+
var G = { exports: {} }, H;
|
|
202
|
+
function Zr() {
|
|
203
|
+
return H || (H = 1, (function(e) {
|
|
204
204
|
(function() {
|
|
205
205
|
var u = {}.hasOwnProperty;
|
|
206
206
|
function n() {
|
|
@@ -231,8 +231,8 @@ function Lr() {
|
|
|
231
231
|
})();
|
|
232
232
|
})(G)), G.exports;
|
|
233
233
|
}
|
|
234
|
-
var
|
|
235
|
-
const
|
|
234
|
+
var Wr = Zr();
|
|
235
|
+
const Fr = /* @__PURE__ */ kr(Wr), Tr = {
|
|
236
236
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
237
237
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
238
238
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -240,34 +240,34 @@ const Zr = /* @__PURE__ */ Dr(kr), Fr = {
|
|
|
240
240
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
241
241
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
242
242
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
243
|
-
},
|
|
243
|
+
}, Gr = Fr.bind(Tr), U = "purpur-icon", Hr = "md", Ur = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Yr = ({ content: e = "", title: u } = {}) => {
|
|
244
244
|
const n = [
|
|
245
245
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
246
246
|
{ name: "fill", value: "currentColor" },
|
|
247
247
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
248
248
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
249
249
|
], p = u ? `<title>${u}</title>` : "";
|
|
250
|
-
return `<svg ${
|
|
251
|
-
},
|
|
252
|
-
const r =
|
|
253
|
-
content:
|
|
250
|
+
return `<svg ${Ur(n)}>${p}${e}</svg>`;
|
|
251
|
+
}, Jr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), dr = ({ svg: e, allyTitle: u, className: n, size: p = Hr, ...a }) => {
|
|
252
|
+
const r = Yr({
|
|
253
|
+
content: Jr(e.svg),
|
|
254
254
|
title: u
|
|
255
|
-
}), t =
|
|
255
|
+
}), t = Gr(U, `${U}--${p}`, n);
|
|
256
256
|
return /* @__PURE__ */ l("span", { className: t, dangerouslySetInnerHTML: { __html: r }, ...a });
|
|
257
257
|
};
|
|
258
|
-
|
|
259
|
-
const
|
|
258
|
+
dr.displayName = "Icon";
|
|
259
|
+
const Kr = {
|
|
260
260
|
name: "error-filled",
|
|
261
261
|
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>',
|
|
262
262
|
keywords: ["error-filled"],
|
|
263
263
|
category: "status"
|
|
264
264
|
};
|
|
265
|
-
function
|
|
265
|
+
function Qr(e) {
|
|
266
266
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
267
267
|
}
|
|
268
|
-
var
|
|
269
|
-
function
|
|
270
|
-
return
|
|
268
|
+
var Y = { exports: {} }, J;
|
|
269
|
+
function Xr() {
|
|
270
|
+
return J || (J = 1, (function(e) {
|
|
271
271
|
(function() {
|
|
272
272
|
var u = {}.hasOwnProperty;
|
|
273
273
|
function n() {
|
|
@@ -296,14 +296,14 @@ function Kr() {
|
|
|
296
296
|
}
|
|
297
297
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
298
298
|
})();
|
|
299
|
-
})(
|
|
299
|
+
})(Y)), Y.exports;
|
|
300
300
|
}
|
|
301
|
-
var
|
|
302
|
-
const
|
|
301
|
+
var re = Xr();
|
|
302
|
+
const ee = /* @__PURE__ */ Qr(re), te = {
|
|
303
303
|
"purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
|
|
304
304
|
"purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
|
|
305
305
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
|
|
306
|
-
},
|
|
306
|
+
}, K = ee.bind(te), R = "purpur-field-error-text", ne = ({
|
|
307
307
|
children: e,
|
|
308
308
|
className: u,
|
|
309
309
|
negative: n = !1,
|
|
@@ -312,24 +312,24 @@ const Xr = /* @__PURE__ */ Jr(Qr), re = {
|
|
|
312
312
|
}) => /* @__PURE__ */ b(
|
|
313
313
|
"div",
|
|
314
314
|
{
|
|
315
|
-
className:
|
|
316
|
-
[`${
|
|
315
|
+
className: K(u, R, {
|
|
316
|
+
[`${R}--negative`]: n
|
|
317
317
|
}),
|
|
318
318
|
"aria-live": "assertive",
|
|
319
319
|
"aria-relevant": p,
|
|
320
320
|
...a,
|
|
321
321
|
children: [
|
|
322
|
-
/* @__PURE__ */ l(
|
|
322
|
+
/* @__PURE__ */ l(dr, { svg: Kr, size: "xs", className: K(`${R}__icon`) }),
|
|
323
323
|
e
|
|
324
324
|
]
|
|
325
325
|
}
|
|
326
326
|
);
|
|
327
|
-
function
|
|
327
|
+
function ie(e) {
|
|
328
328
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
329
329
|
}
|
|
330
|
-
var
|
|
331
|
-
function
|
|
332
|
-
return
|
|
330
|
+
var Q = { exports: {} }, X;
|
|
331
|
+
function ue() {
|
|
332
|
+
return X || (X = 1, (function(e) {
|
|
333
333
|
(function() {
|
|
334
334
|
var u = {}.hasOwnProperty;
|
|
335
335
|
function n() {
|
|
@@ -358,14 +358,14 @@ function ne() {
|
|
|
358
358
|
}
|
|
359
359
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
360
360
|
})();
|
|
361
|
-
})(
|
|
361
|
+
})(Q)), Q.exports;
|
|
362
362
|
}
|
|
363
|
-
var
|
|
364
|
-
const
|
|
363
|
+
var ae = ue();
|
|
364
|
+
const pe = /* @__PURE__ */ ie(ae), le = {
|
|
365
365
|
"purpur-field-helper-text": "_purpur-field-helper-text_1ociq_1",
|
|
366
366
|
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_1ociq_9",
|
|
367
367
|
"purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_1ociq_12"
|
|
368
|
-
},
|
|
368
|
+
}, oe = pe.bind(le), I = "purpur-field-helper-text", se = ({
|
|
369
369
|
children: e,
|
|
370
370
|
className: u,
|
|
371
371
|
disabled: n,
|
|
@@ -373,18 +373,18 @@ const ue = /* @__PURE__ */ te(ie), ae = {
|
|
|
373
373
|
negative: a,
|
|
374
374
|
...r
|
|
375
375
|
}) => {
|
|
376
|
-
const t =
|
|
377
|
-
[`${
|
|
378
|
-
[`${
|
|
376
|
+
const t = oe(u, I, {
|
|
377
|
+
[`${I}--disabled`]: n,
|
|
378
|
+
[`${I}--negative`]: a
|
|
379
379
|
});
|
|
380
380
|
return /* @__PURE__ */ l("span", { id: p, className: t, ...r, children: e });
|
|
381
381
|
};
|
|
382
|
-
function
|
|
382
|
+
function ce(e) {
|
|
383
383
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
384
384
|
}
|
|
385
|
-
var
|
|
386
|
-
function
|
|
387
|
-
return
|
|
385
|
+
var rr = { exports: {} }, er;
|
|
386
|
+
function _e() {
|
|
387
|
+
return er || (er = 1, (function(e) {
|
|
388
388
|
(function() {
|
|
389
389
|
var u = {}.hasOwnProperty;
|
|
390
390
|
function n() {
|
|
@@ -413,10 +413,10 @@ function se() {
|
|
|
413
413
|
}
|
|
414
414
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
415
415
|
})();
|
|
416
|
-
})(
|
|
416
|
+
})(rr)), rr.exports;
|
|
417
417
|
}
|
|
418
|
-
var
|
|
419
|
-
const
|
|
418
|
+
var de = _e();
|
|
419
|
+
const fe = /* @__PURE__ */ ce(de), ve = {
|
|
420
420
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
421
421
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
422
422
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -424,61 +424,70 @@ const _e = /* @__PURE__ */ oe(ce), de = {
|
|
|
424
424
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
425
425
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
426
426
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
427
|
-
},
|
|
427
|
+
}, he = fe.bind(ve), tr = "purpur-icon", me = "md", ge = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), ye = ({ content: e = "", title: u } = {}) => {
|
|
428
428
|
const n = [
|
|
429
429
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
430
430
|
{ name: "fill", value: "currentColor" },
|
|
431
431
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
432
432
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
433
433
|
], p = u ? `<title>${u}</title>` : "";
|
|
434
|
-
return `<svg ${
|
|
435
|
-
},
|
|
436
|
-
const r =
|
|
437
|
-
content:
|
|
434
|
+
return `<svg ${ge(n)}>${p}${e}</svg>`;
|
|
435
|
+
}, xe = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), E = ({ svg: e, allyTitle: u, className: n, size: p = me, ...a }) => {
|
|
436
|
+
const r = ye({
|
|
437
|
+
content: xe(e.svg),
|
|
438
438
|
title: u
|
|
439
|
-
}), t =
|
|
439
|
+
}), t = he(tr, `${tr}--${p}`, n);
|
|
440
440
|
return /* @__PURE__ */ l("span", { className: t, dangerouslySetInnerHTML: { __html: r }, ...a });
|
|
441
441
|
};
|
|
442
442
|
E.displayName = "Icon";
|
|
443
|
-
const
|
|
443
|
+
const be = {
|
|
444
444
|
name: "check-circle-filled",
|
|
445
445
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm4.712-12.491a.875.875 0 1 0-1.424-1.018l-4.4 6.16-2.27-2.27a.875.875 0 0 0-1.237 1.238l3 3a.875.875 0 0 0 1.331-.11l5-7Z" clip-rule="evenodd"/></svg>',
|
|
446
446
|
keywords: ["check-circle-filled"],
|
|
447
447
|
category: "status"
|
|
448
|
-
},
|
|
449
|
-
|
|
450
|
-
const
|
|
448
|
+
}, fr = (e) => /* @__PURE__ */ l(E, { ...e, svg: be });
|
|
449
|
+
fr.displayName = "IconCheckCircleFilled";
|
|
450
|
+
const $e = {
|
|
451
451
|
name: "close",
|
|
452
452
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
|
|
453
453
|
keywords: ["close"],
|
|
454
454
|
category: "utility"
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
function
|
|
455
|
+
}, vr = (e) => /* @__PURE__ */ l(E, { ...e, svg: $e });
|
|
456
|
+
vr.displayName = "IconClose";
|
|
457
|
+
function nr(e, u) {
|
|
458
458
|
if (typeof e == "function")
|
|
459
459
|
return e(u);
|
|
460
460
|
e != null && (e.current = u);
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function we(...e) {
|
|
463
463
|
return (u) => {
|
|
464
464
|
let n = !1;
|
|
465
465
|
const p = e.map((a) => {
|
|
466
|
-
const r =
|
|
466
|
+
const r = nr(a, u);
|
|
467
467
|
return !n && typeof r == "function" && (n = !0), r;
|
|
468
468
|
});
|
|
469
469
|
if (n)
|
|
470
470
|
return () => {
|
|
471
471
|
for (let a = 0; a < p.length; a++) {
|
|
472
472
|
const r = p[a];
|
|
473
|
-
typeof r == "function" ? r() :
|
|
473
|
+
typeof r == "function" ? r() : nr(e[a], null);
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
+
var je = /* @__PURE__ */ Symbol.for("react.lazy"), S = c[" use ".trim().toString()];
|
|
479
|
+
function Se(e) {
|
|
480
|
+
return typeof e == "object" && e !== null && "then" in e;
|
|
481
|
+
}
|
|
482
|
+
function hr(e) {
|
|
483
|
+
return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === je && "_payload" in e && Se(e._payload);
|
|
484
|
+
}
|
|
478
485
|
// @__NO_SIDE_EFFECTS__
|
|
479
|
-
function
|
|
480
|
-
const u = /* @__PURE__ */
|
|
481
|
-
|
|
486
|
+
function Ne(e) {
|
|
487
|
+
const u = /* @__PURE__ */ Oe(e), n = c.forwardRef((p, a) => {
|
|
488
|
+
let { children: r, ...t } = p;
|
|
489
|
+
hr(r) && typeof S == "function" && (r = S(r._payload));
|
|
490
|
+
const i = c.Children.toArray(r), f = i.find(Ce);
|
|
482
491
|
if (f) {
|
|
483
492
|
const _ = f.props.children, $ = i.map((g) => g === f ? c.Children.count(_) > 1 ? c.Children.only(null) : c.isValidElement(_) ? _.props.children : null : g);
|
|
484
493
|
return /* @__PURE__ */ l(u, { ...t, ref: a, children: c.isValidElement(_) ? c.cloneElement(_, void 0, $) : null });
|
|
@@ -488,22 +497,22 @@ function $e(e) {
|
|
|
488
497
|
return n.displayName = `${e}.Slot`, n;
|
|
489
498
|
}
|
|
490
499
|
// @__NO_SIDE_EFFECTS__
|
|
491
|
-
function
|
|
500
|
+
function Oe(e) {
|
|
492
501
|
const u = c.forwardRef((n, p) => {
|
|
493
|
-
|
|
494
|
-
if (c.isValidElement(a)) {
|
|
495
|
-
const t =
|
|
496
|
-
return a.type !== c.Fragment && (i.ref = p ?
|
|
502
|
+
let { children: a, ...r } = n;
|
|
503
|
+
if (hr(a) && typeof S == "function" && (a = S(a._payload)), c.isValidElement(a)) {
|
|
504
|
+
const t = Ae(a), i = Me(r, a.props);
|
|
505
|
+
return a.type !== c.Fragment && (i.ref = p ? we(p, t) : t), c.cloneElement(a, i);
|
|
497
506
|
}
|
|
498
507
|
return c.Children.count(a) > 1 ? c.Children.only(null) : null;
|
|
499
508
|
});
|
|
500
509
|
return u.displayName = `${e}.SlotClone`, u;
|
|
501
510
|
}
|
|
502
|
-
var
|
|
503
|
-
function
|
|
504
|
-
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
511
|
+
var qe = /* @__PURE__ */ Symbol("radix.slottable");
|
|
512
|
+
function Ce(e) {
|
|
513
|
+
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === qe;
|
|
505
514
|
}
|
|
506
|
-
function
|
|
515
|
+
function Me(e, u) {
|
|
507
516
|
const n = { ...u };
|
|
508
517
|
for (const p in u) {
|
|
509
518
|
const a = e[p], r = u[p];
|
|
@@ -514,11 +523,11 @@ function Ne(e, u) {
|
|
|
514
523
|
}
|
|
515
524
|
return { ...e, ...n };
|
|
516
525
|
}
|
|
517
|
-
function
|
|
526
|
+
function Ae(e) {
|
|
518
527
|
let u = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = u && "isReactWarning" in u && u.isReactWarning;
|
|
519
528
|
return n ? e.ref : (u = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = u && "isReactWarning" in u && u.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
520
529
|
}
|
|
521
|
-
var
|
|
530
|
+
var Re = [
|
|
522
531
|
"a",
|
|
523
532
|
"button",
|
|
524
533
|
"div",
|
|
@@ -536,14 +545,14 @@ var qe = [
|
|
|
536
545
|
"span",
|
|
537
546
|
"svg",
|
|
538
547
|
"ul"
|
|
539
|
-
],
|
|
540
|
-
const n = /* @__PURE__ */
|
|
548
|
+
], Ie = Re.reduce((e, u) => {
|
|
549
|
+
const n = /* @__PURE__ */ Ne(`Primitive.${u}`), p = c.forwardRef((a, r) => {
|
|
541
550
|
const { asChild: t, ...i } = a, f = t ? n : u;
|
|
542
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(f, { ...i, ref: r });
|
|
551
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(f, { ...i, ref: r });
|
|
543
552
|
});
|
|
544
553
|
return p.displayName = `Primitive.${u}`, { ...e, [u]: p };
|
|
545
|
-
}, {}),
|
|
546
|
-
|
|
554
|
+
}, {}), Be = "Label", mr = c.forwardRef((e, u) => /* @__PURE__ */ l(
|
|
555
|
+
Ie.label,
|
|
547
556
|
{
|
|
548
557
|
...e,
|
|
549
558
|
ref: u,
|
|
@@ -552,14 +561,14 @@ var qe = [
|
|
|
552
561
|
}
|
|
553
562
|
}
|
|
554
563
|
));
|
|
555
|
-
|
|
556
|
-
var
|
|
557
|
-
function
|
|
564
|
+
mr.displayName = Be;
|
|
565
|
+
var ze = mr;
|
|
566
|
+
function Ee(e) {
|
|
558
567
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
559
568
|
}
|
|
560
|
-
var
|
|
561
|
-
function
|
|
562
|
-
return
|
|
569
|
+
var ir = { exports: {} }, ur;
|
|
570
|
+
function Pe() {
|
|
571
|
+
return ur || (ur = 1, (function(e) {
|
|
563
572
|
(function() {
|
|
564
573
|
var u = {}.hasOwnProperty;
|
|
565
574
|
function n() {
|
|
@@ -588,32 +597,32 @@ function Ie() {
|
|
|
588
597
|
}
|
|
589
598
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
590
599
|
})();
|
|
591
|
-
})(
|
|
600
|
+
})(ir)), ir.exports;
|
|
592
601
|
}
|
|
593
|
-
var
|
|
594
|
-
const
|
|
602
|
+
var Ve = Pe();
|
|
603
|
+
const Le = /* @__PURE__ */ Ee(Ve), De = {
|
|
595
604
|
"purpur-label": "_purpur-label_1x80u_1",
|
|
596
605
|
"purpur-label--negative": "_purpur-label--negative_1x80u_8",
|
|
597
606
|
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
598
|
-
},
|
|
607
|
+
}, ke = Le.bind(De), B = "purpur-label", Ze = ({
|
|
599
608
|
children: e,
|
|
600
609
|
className: u,
|
|
601
610
|
disabled: n,
|
|
602
611
|
negative: p = !1,
|
|
603
612
|
...a
|
|
604
613
|
}) => {
|
|
605
|
-
const r =
|
|
606
|
-
[`${
|
|
607
|
-
[`${
|
|
614
|
+
const r = ke(u, B, {
|
|
615
|
+
[`${B}--disabled`]: n,
|
|
616
|
+
[`${B}--negative`]: p
|
|
608
617
|
});
|
|
609
|
-
return /* @__PURE__ */ l(
|
|
618
|
+
return /* @__PURE__ */ l(ze, { className: r, ...a, children: e });
|
|
610
619
|
};
|
|
611
|
-
function
|
|
620
|
+
function We(e) {
|
|
612
621
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
613
622
|
}
|
|
614
|
-
var
|
|
615
|
-
function
|
|
616
|
-
return
|
|
623
|
+
var ar = { exports: {} }, pr;
|
|
624
|
+
function Fe() {
|
|
625
|
+
return pr || (pr = 1, (function(e) {
|
|
617
626
|
(function() {
|
|
618
627
|
var u = {}.hasOwnProperty;
|
|
619
628
|
function n() {
|
|
@@ -642,33 +651,33 @@ function Le() {
|
|
|
642
651
|
}
|
|
643
652
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
644
653
|
})();
|
|
645
|
-
})(
|
|
654
|
+
})(ar)), ar.exports;
|
|
646
655
|
}
|
|
647
|
-
var
|
|
648
|
-
const
|
|
656
|
+
var Te = Fe();
|
|
657
|
+
const Ge = /* @__PURE__ */ We(Te), He = "_rotate_12t9p_1", Ue = "_dash_12t9p_1", Ye = {
|
|
649
658
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
650
|
-
rotate:
|
|
659
|
+
rotate: He,
|
|
651
660
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
652
661
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
653
662
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
654
663
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
655
664
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
656
665
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
657
|
-
dash:
|
|
666
|
+
dash: Ue,
|
|
658
667
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
659
668
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
660
|
-
},
|
|
669
|
+
}, lr = Ge.bind(Ye), j = "purpur-spinner", Je = {
|
|
661
670
|
SM: "sm"
|
|
662
|
-
},
|
|
671
|
+
}, gr = ({
|
|
663
672
|
disabled: e = !1,
|
|
664
673
|
negative: u = !1,
|
|
665
|
-
size: n =
|
|
674
|
+
size: n = Je.SM,
|
|
666
675
|
className: p,
|
|
667
676
|
...a
|
|
668
|
-
}) => /* @__PURE__ */ l("div", { className:
|
|
677
|
+
}) => /* @__PURE__ */ l("div", { className: lr(j, `${j}--${n}`, p), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
|
|
669
678
|
"circle",
|
|
670
679
|
{
|
|
671
|
-
className:
|
|
680
|
+
className: lr(`${j}__circle`, {
|
|
672
681
|
[`${j}__circle--disabled`]: e,
|
|
673
682
|
[`${j}__circle--negative`]: u
|
|
674
683
|
}),
|
|
@@ -677,14 +686,14 @@ const Ze = /* @__PURE__ */ De(ke), Fe = "_rotate_12t9p_1", We = "_dash_12t9p_1",
|
|
|
677
686
|
r: "20"
|
|
678
687
|
}
|
|
679
688
|
) }) });
|
|
680
|
-
|
|
681
|
-
function
|
|
689
|
+
gr.displayName = "Spinner";
|
|
690
|
+
function Ke(e) {
|
|
682
691
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
683
692
|
}
|
|
684
|
-
var
|
|
685
|
-
var
|
|
686
|
-
function
|
|
687
|
-
return
|
|
693
|
+
var z = { exports: {} };
|
|
694
|
+
var or;
|
|
695
|
+
function Qe() {
|
|
696
|
+
return or || (or = 1, (function(e) {
|
|
688
697
|
(function() {
|
|
689
698
|
var u = {}.hasOwnProperty;
|
|
690
699
|
function n() {
|
|
@@ -713,10 +722,10 @@ function Ue() {
|
|
|
713
722
|
}
|
|
714
723
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
715
724
|
})();
|
|
716
|
-
})(
|
|
725
|
+
})(z)), z.exports;
|
|
717
726
|
}
|
|
718
|
-
var
|
|
719
|
-
const
|
|
727
|
+
var Xe = Qe();
|
|
728
|
+
const rt = /* @__PURE__ */ Ke(Xe), et = {
|
|
720
729
|
"purpur-text-field": "_purpur-text-field_1n0q1_1",
|
|
721
730
|
"purpur-text-field__label": "_purpur-text-field__label_1n0q1_7",
|
|
722
731
|
"purpur-text-field__label-text": "_purpur-text-field__label-text_1n0q1_12",
|
|
@@ -737,7 +746,7 @@ const Je = /* @__PURE__ */ He(Ye), Ke = {
|
|
|
737
746
|
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_1n0q1_146",
|
|
738
747
|
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_1n0q1_151",
|
|
739
748
|
"purpur-text-field__valid-icon--negative": "_purpur-text-field__valid-icon--negative_1n0q1_154"
|
|
740
|
-
},
|
|
749
|
+
}, tt = (e) => jr(e), m = rt.bind(et), o = "purpur-text-field", yr = sr(
|
|
741
750
|
({
|
|
742
751
|
["data-testid"]: e,
|
|
743
752
|
className: u,
|
|
@@ -751,18 +760,18 @@ const Je = /* @__PURE__ */ He(Ye), Ke = {
|
|
|
751
760
|
label: _,
|
|
752
761
|
loading: $ = !1,
|
|
753
762
|
onClear: g,
|
|
754
|
-
startAdornment:
|
|
755
|
-
valid:
|
|
763
|
+
startAdornment: N,
|
|
764
|
+
valid: O = !1,
|
|
756
765
|
negative: d = !1,
|
|
757
766
|
...s
|
|
758
767
|
}, x) => {
|
|
759
|
-
const
|
|
760
|
-
|
|
761
|
-
},
|
|
762
|
-
g?.(),
|
|
763
|
-
},
|
|
768
|
+
const xr = Sr(), q = s.id ?? xr, v = (h) => e ? `${e}-${h}` : void 0, P = O && !t, C = i ? `${q}-helper-text` : void 0, M = [N].filter((h) => !!h), V = (typeof s.value == "number" ? s.value !== void 0 : s.value?.length) && !s.disabled && !s.readOnly && !$ && g && n, L = tt(null), br = (h) => {
|
|
769
|
+
L.current = h, typeof x == "function" ? x(h) : x && (x.current = h);
|
|
770
|
+
}, $r = () => {
|
|
771
|
+
g?.(), L.current?.focus();
|
|
772
|
+
}, A = [
|
|
764
773
|
$ && /* @__PURE__ */ l(
|
|
765
|
-
|
|
774
|
+
gr,
|
|
766
775
|
{
|
|
767
776
|
disabled: s.disabled,
|
|
768
777
|
size: "xs",
|
|
@@ -772,21 +781,21 @@ const Je = /* @__PURE__ */ He(Ye), Ke = {
|
|
|
772
781
|
"spinner"
|
|
773
782
|
),
|
|
774
783
|
V && /* @__PURE__ */ l(
|
|
775
|
-
|
|
784
|
+
_r,
|
|
776
785
|
{
|
|
777
786
|
negative: d,
|
|
778
787
|
variant: "tertiary-purple",
|
|
779
|
-
onClick:
|
|
788
|
+
onClick: $r,
|
|
780
789
|
iconOnly: !0,
|
|
781
790
|
"aria-label": n ?? "",
|
|
782
791
|
"data-testid": v("clear-button"),
|
|
783
792
|
tabIndex: -1,
|
|
784
|
-
children: /* @__PURE__ */ l(
|
|
793
|
+
children: /* @__PURE__ */ l(vr, { size: "xs" })
|
|
785
794
|
},
|
|
786
795
|
"clear-button"
|
|
787
796
|
),
|
|
788
797
|
P && /* @__PURE__ */ l(
|
|
789
|
-
|
|
798
|
+
fr,
|
|
790
799
|
{
|
|
791
800
|
"data-testid": v("valid-icon"),
|
|
792
801
|
className: m(`${o}__valid-icon`, {
|
|
@@ -795,9 +804,9 @@ const Je = /* @__PURE__ */ He(Ye), Ke = {
|
|
|
795
804
|
},
|
|
796
805
|
"valid-icon"
|
|
797
806
|
)
|
|
798
|
-
].filter((h) => !!h),
|
|
799
|
-
[`${o}__input-container--start-adornment`]:
|
|
800
|
-
[`${o}__input-container--end-adornment`]:
|
|
807
|
+
].filter((h) => !!h), wr = m(`${o}__input-container`, {
|
|
808
|
+
[`${o}__input-container--start-adornment`]: M.length,
|
|
809
|
+
[`${o}__input-container--end-adornment`]: A.length || r,
|
|
801
810
|
[`${o}__input-container--disabled`]: s.disabled,
|
|
802
811
|
[`${o}__input-container--has-clear-button`]: V,
|
|
803
812
|
[`${o}__input-container--readonly`]: s.readOnly && !s.disabled,
|
|
@@ -805,9 +814,9 @@ const Je = /* @__PURE__ */ He(Ye), Ke = {
|
|
|
805
814
|
});
|
|
806
815
|
return /* @__PURE__ */ b("div", { className: m(u, o), children: [
|
|
807
816
|
_ && /* @__PURE__ */ b(
|
|
808
|
-
|
|
817
|
+
Ze,
|
|
809
818
|
{
|
|
810
|
-
htmlFor:
|
|
819
|
+
htmlFor: q,
|
|
811
820
|
className: m(`${o}__label`),
|
|
812
821
|
"data-testid": v("label"),
|
|
813
822
|
disabled: s.disabled,
|
|
@@ -820,23 +829,23 @@ const Je = /* @__PURE__ */ He(Ye), Ke = {
|
|
|
820
829
|
),
|
|
821
830
|
/* @__PURE__ */ b("div", { className: m(`${o}__field-row`), children: [
|
|
822
831
|
!!p && p,
|
|
823
|
-
/* @__PURE__ */ b("div", { className:
|
|
824
|
-
!!
|
|
832
|
+
/* @__PURE__ */ b("div", { className: wr, children: [
|
|
833
|
+
!!M.length && /* @__PURE__ */ l(
|
|
825
834
|
"div",
|
|
826
835
|
{
|
|
827
836
|
"data-testid": v("start-adornments"),
|
|
828
837
|
className: m(`${o}__adornment-container`),
|
|
829
|
-
children:
|
|
838
|
+
children: M
|
|
830
839
|
}
|
|
831
840
|
),
|
|
832
841
|
/* @__PURE__ */ l(
|
|
833
842
|
"input",
|
|
834
843
|
{
|
|
835
844
|
...s,
|
|
836
|
-
id:
|
|
837
|
-
ref:
|
|
845
|
+
id: q,
|
|
846
|
+
ref: br,
|
|
838
847
|
"data-testid": v("input"),
|
|
839
|
-
"aria-describedby": s["aria-describedby"] ||
|
|
848
|
+
"aria-describedby": s["aria-describedby"] || C,
|
|
840
849
|
"aria-invalid": s["aria-invalid"] || !!t,
|
|
841
850
|
className: m([
|
|
842
851
|
`${o}__input`,
|
|
@@ -856,13 +865,13 @@ const Je = /* @__PURE__ */ He(Ye), Ke = {
|
|
|
856
865
|
})
|
|
857
866
|
}
|
|
858
867
|
),
|
|
859
|
-
(!!
|
|
868
|
+
(!!A.length || r) && /* @__PURE__ */ b(
|
|
860
869
|
"div",
|
|
861
870
|
{
|
|
862
871
|
"data-testid": v("end-adornments"),
|
|
863
872
|
className: m(`${o}__adornment-container`),
|
|
864
873
|
children: [
|
|
865
|
-
|
|
874
|
+
A,
|
|
866
875
|
r
|
|
867
876
|
]
|
|
868
877
|
}
|
|
@@ -870,24 +879,24 @@ const Je = /* @__PURE__ */ He(Ye), Ke = {
|
|
|
870
879
|
] }),
|
|
871
880
|
!!a && a
|
|
872
881
|
] }),
|
|
873
|
-
|
|
874
|
-
|
|
882
|
+
C && /* @__PURE__ */ l(
|
|
883
|
+
se,
|
|
875
884
|
{
|
|
876
885
|
"data-testid": v("helper-text"),
|
|
877
|
-
id:
|
|
886
|
+
id: C,
|
|
878
887
|
negative: d,
|
|
879
888
|
disabled: s.disabled,
|
|
880
889
|
children: i
|
|
881
890
|
}
|
|
882
891
|
),
|
|
883
|
-
t && /* @__PURE__ */ l(
|
|
892
|
+
t && /* @__PURE__ */ l(ne, { "data-testid": v("error-text"), negative: d, children: t })
|
|
884
893
|
] });
|
|
885
894
|
}
|
|
886
895
|
);
|
|
887
|
-
|
|
888
|
-
const
|
|
896
|
+
yr.displayName = "TextField";
|
|
897
|
+
const pt = (e) => Nr(e) && e.type.displayName === yr.displayName;
|
|
889
898
|
export {
|
|
890
|
-
|
|
891
|
-
|
|
899
|
+
yr as TextField,
|
|
900
|
+
pt as isTextField
|
|
892
901
|
};
|
|
893
902
|
//# sourceMappingURL=text-field.es.js.map
|