@purpurds/text-field 7.6.1 → 7.7.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.d.ts +646 -4
- package/dist/text-field.d.ts.map +1 -1
- package/dist/text-field.es.js +362 -412
- package/dist/text-field.es.js.map +1 -1
- package/package.json +9 -8
- package/src/text-field.stories.tsx +1 -1
- package/src/text-field.tsx +147 -151
package/dist/text-field.es.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as b, jsx as p, Fragment as xr } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as sr, useRef as $r, useId as wr, isValidElement as Sr } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
const
|
|
5
|
+
const Nr = {
|
|
6
6
|
LG: "lg"
|
|
7
7
|
};
|
|
8
|
-
function
|
|
8
|
+
function Or(t) {
|
|
9
9
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var z = { exports: {} };
|
|
12
12
|
/*!
|
|
13
13
|
Copyright (c) 2018 Jed Watson.
|
|
14
14
|
Licensed under the MIT License (MIT), see
|
|
15
15
|
http://jedwatson.github.io/classnames
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
return
|
|
17
|
+
var D;
|
|
18
|
+
function jr() {
|
|
19
|
+
return D || (D = 1, function(t) {
|
|
20
20
|
(function() {
|
|
21
21
|
var u = {}.hasOwnProperty;
|
|
22
22
|
function n() {
|
|
23
23
|
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
24
24
|
var i = arguments[e];
|
|
25
|
-
i && (r = l(r, a(i)));
|
|
25
|
+
i && (r = l(r, a.call(this, i)));
|
|
26
26
|
}
|
|
27
27
|
return r;
|
|
28
28
|
}
|
|
29
29
|
function a(r) {
|
|
30
30
|
if (typeof r == "string" || typeof r == "number")
|
|
31
|
-
return r;
|
|
31
|
+
return this && this[r] || r;
|
|
32
32
|
if (typeof r != "object")
|
|
33
33
|
return "";
|
|
34
34
|
if (Array.isArray(r))
|
|
35
|
-
return n.apply(
|
|
35
|
+
return n.apply(this, r);
|
|
36
36
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
37
37
|
return r.toString();
|
|
38
38
|
var e = "";
|
|
39
39
|
for (var i in r)
|
|
40
|
-
u.call(r, i) && r[i] && (e = l(e, i));
|
|
40
|
+
u.call(r, i) && r[i] && (e = l(e, this && this[i] || i));
|
|
41
41
|
return e;
|
|
42
42
|
}
|
|
43
43
|
function l(r, e) {
|
|
@@ -45,61 +45,52 @@ function Cr() {
|
|
|
45
45
|
}
|
|
46
46
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
47
47
|
})();
|
|
48
|
-
}(
|
|
48
|
+
}(z)), z.exports;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
const
|
|
50
|
+
var qr = jr();
|
|
51
|
+
const kr = /* @__PURE__ */ Or(qr), Mr = "_rotate_12t9p_1", Ar = "_dash_12t9p_1", Cr = {
|
|
52
52
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
53
|
-
rotate:
|
|
53
|
+
rotate: Mr,
|
|
54
54
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
55
55
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
56
56
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
57
57
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
58
58
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
59
59
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
60
|
-
dash:
|
|
60
|
+
dash: Ar,
|
|
61
61
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
62
62
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
63
|
-
},
|
|
63
|
+
}, L = kr.bind(Cr), x = "purpur-spinner", Rr = {
|
|
64
64
|
SM: "sm"
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"div",
|
|
65
|
+
}, Br = ({
|
|
66
|
+
disabled: t = !1,
|
|
67
|
+
negative: u = !1,
|
|
68
|
+
size: n = Rr.SM,
|
|
69
|
+
...a
|
|
70
|
+
}) => /* @__PURE__ */ p("div", { className: L(x, `${x}--${n}`), ...a, children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
|
|
71
|
+
"circle",
|
|
73
72
|
{
|
|
74
|
-
className:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
[w[`${S}__circle--disabled`]]: u,
|
|
82
|
-
[w[`${S}__circle--negative`]]: n
|
|
83
|
-
}),
|
|
84
|
-
cx: "25",
|
|
85
|
-
cy: "25",
|
|
86
|
-
r: "20"
|
|
87
|
-
}
|
|
88
|
-
) })
|
|
73
|
+
className: L(`${x}__circle`, {
|
|
74
|
+
[`${x}__circle--disabled`]: t,
|
|
75
|
+
[`${x}__circle--negative`]: u
|
|
76
|
+
}),
|
|
77
|
+
cx: "25",
|
|
78
|
+
cy: "25",
|
|
79
|
+
r: "20"
|
|
89
80
|
}
|
|
90
|
-
);
|
|
91
|
-
function
|
|
81
|
+
) }) });
|
|
82
|
+
function Ir(t) {
|
|
92
83
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
93
84
|
}
|
|
94
|
-
var
|
|
85
|
+
var Z = { exports: {} };
|
|
95
86
|
/*!
|
|
96
87
|
Copyright (c) 2018 Jed Watson.
|
|
97
88
|
Licensed under the MIT License (MIT), see
|
|
98
89
|
http://jedwatson.github.io/classnames
|
|
99
90
|
*/
|
|
100
|
-
var
|
|
101
|
-
function
|
|
102
|
-
return
|
|
91
|
+
var F;
|
|
92
|
+
function Er() {
|
|
93
|
+
return F || (F = 1, function(t) {
|
|
103
94
|
(function() {
|
|
104
95
|
var u = {}.hasOwnProperty;
|
|
105
96
|
function n() {
|
|
@@ -128,10 +119,10 @@ function Vr() {
|
|
|
128
119
|
}
|
|
129
120
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
130
121
|
})();
|
|
131
|
-
}(
|
|
122
|
+
}(Z)), Z.exports;
|
|
132
123
|
}
|
|
133
|
-
var
|
|
134
|
-
const
|
|
124
|
+
var Pr = Er();
|
|
125
|
+
const Vr = /* @__PURE__ */ Ir(Pr), zr = {
|
|
135
126
|
"purpur-button": "_purpur-button_w455q_1",
|
|
136
127
|
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
137
128
|
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
@@ -153,70 +144,77 @@ const Dr = /* @__PURE__ */ Pr(zr), Lr = {
|
|
|
153
144
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
154
145
|
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
155
146
|
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
147
|
+
}, Dr = Vr.bind(zr), h = "purpur-button", cr = sr(
|
|
148
|
+
({
|
|
149
|
+
children: t,
|
|
150
|
+
className: u,
|
|
151
|
+
disabled: n = !1,
|
|
152
|
+
fullWidth: a = !1,
|
|
153
|
+
iconOnly: l,
|
|
154
|
+
loading: r = !1,
|
|
155
|
+
negative: e = !1,
|
|
156
|
+
onClick: i,
|
|
157
|
+
size: v = "md",
|
|
158
|
+
variant: y,
|
|
159
|
+
type: w = "button",
|
|
160
|
+
...g
|
|
161
|
+
}, N) => {
|
|
162
|
+
if (l && y === "destructive")
|
|
163
|
+
return null;
|
|
164
|
+
const O = Dr(
|
|
165
|
+
[
|
|
166
|
+
h,
|
|
167
|
+
`${h}--${e ? `${y}-negative` : y}`,
|
|
168
|
+
`${h}--${v}`
|
|
169
|
+
],
|
|
170
|
+
{
|
|
171
|
+
[`${h}--icon-only`]: l,
|
|
172
|
+
[`${h}--negative`]: e,
|
|
173
|
+
[`${h}--full-width`]: a,
|
|
174
|
+
[`${h}--disabled`]: n || r
|
|
175
|
+
},
|
|
176
|
+
u
|
|
177
|
+
), o = (S) => {
|
|
178
|
+
n || r ? S.preventDefault() : i && i(S);
|
|
179
|
+
}, m = !!g["aria-disabled"] || n || r;
|
|
180
|
+
return /* @__PURE__ */ b(
|
|
181
|
+
"button",
|
|
182
|
+
{
|
|
183
|
+
className: O,
|
|
184
|
+
type: w,
|
|
185
|
+
ref: N,
|
|
186
|
+
"aria-disabled": m,
|
|
187
|
+
onClick: o,
|
|
188
|
+
...g,
|
|
189
|
+
children: [
|
|
190
|
+
r && /* @__PURE__ */ p(
|
|
191
|
+
Br,
|
|
192
|
+
{
|
|
193
|
+
size: v === Nr.LG ? "xs" : "xxs",
|
|
194
|
+
negative: e,
|
|
195
|
+
disabled: m
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
" ",
|
|
199
|
+
t
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
cr.displayName = "Button";
|
|
206
|
+
function Lr(t) {
|
|
209
207
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
210
208
|
}
|
|
211
|
-
var
|
|
209
|
+
var W = { exports: {} };
|
|
212
210
|
/*!
|
|
213
211
|
Copyright (c) 2018 Jed Watson.
|
|
214
212
|
Licensed under the MIT License (MIT), see
|
|
215
213
|
http://jedwatson.github.io/classnames
|
|
216
214
|
*/
|
|
217
|
-
var
|
|
218
|
-
function
|
|
219
|
-
return
|
|
215
|
+
var T;
|
|
216
|
+
function Zr() {
|
|
217
|
+
return T || (T = 1, function(t) {
|
|
220
218
|
(function() {
|
|
221
219
|
var u = {}.hasOwnProperty;
|
|
222
220
|
function n() {
|
|
@@ -245,10 +243,10 @@ function Tr() {
|
|
|
245
243
|
}
|
|
246
244
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
247
245
|
})();
|
|
248
|
-
}(
|
|
246
|
+
}(W)), W.exports;
|
|
249
247
|
}
|
|
250
|
-
var
|
|
251
|
-
const
|
|
248
|
+
var Fr = Zr();
|
|
249
|
+
const Wr = /* @__PURE__ */ Lr(Fr), Tr = {
|
|
252
250
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
253
251
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
254
252
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -256,76 +254,61 @@ const Hr = /* @__PURE__ */ Wr(Gr), Ur = {
|
|
|
256
254
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
257
255
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
258
256
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
259
|
-
},
|
|
257
|
+
}, Gr = Wr.bind(Tr), G = "purpur-icon", Hr = "md", Ur = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Xr = ({ content: t = "", title: u } = {}) => {
|
|
260
258
|
const n = [
|
|
261
259
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
262
260
|
{ name: "fill", value: "currentColor" },
|
|
263
261
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
264
262
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
265
263
|
], a = u ? `<title>${u}</title>` : "";
|
|
266
|
-
return `<svg ${
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
...r
|
|
274
|
-
}) => {
|
|
275
|
-
const e = Kr({
|
|
276
|
-
content: Qr(u.svg),
|
|
277
|
-
title: n
|
|
278
|
-
}), i = Xr(a, X, `${X}--${l}`);
|
|
279
|
-
return /* @__PURE__ */ p(
|
|
280
|
-
"span",
|
|
281
|
-
{
|
|
282
|
-
className: i,
|
|
283
|
-
"data-testid": t,
|
|
284
|
-
dangerouslySetInnerHTML: { __html: e },
|
|
285
|
-
...r
|
|
286
|
-
}
|
|
287
|
-
);
|
|
264
|
+
return `<svg ${Ur(n)}>${a}${t}</svg>`;
|
|
265
|
+
}, Yr = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), dr = ({ svg: t, allyTitle: u, className: n, size: a = Hr, ...l }) => {
|
|
266
|
+
const r = Xr({
|
|
267
|
+
content: Yr(t.svg),
|
|
268
|
+
title: u
|
|
269
|
+
}), e = Gr(n, G, `${G}--${a}`);
|
|
270
|
+
return /* @__PURE__ */ p("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...l });
|
|
288
271
|
};
|
|
289
|
-
|
|
290
|
-
const
|
|
272
|
+
dr.displayName = "Icon";
|
|
273
|
+
const Jr = {
|
|
291
274
|
name: "error-filled",
|
|
292
275
|
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>',
|
|
293
276
|
keywords: ["error-filled"],
|
|
294
277
|
category: "status"
|
|
295
278
|
};
|
|
296
|
-
function
|
|
279
|
+
function Kr(t) {
|
|
297
280
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
298
281
|
}
|
|
299
|
-
var
|
|
282
|
+
var H = { exports: {} };
|
|
300
283
|
/*!
|
|
301
284
|
Copyright (c) 2018 Jed Watson.
|
|
302
285
|
Licensed under the MIT License (MIT), see
|
|
303
286
|
http://jedwatson.github.io/classnames
|
|
304
287
|
*/
|
|
305
|
-
var
|
|
306
|
-
function
|
|
307
|
-
return
|
|
288
|
+
var U;
|
|
289
|
+
function Qr() {
|
|
290
|
+
return U || (U = 1, function(t) {
|
|
308
291
|
(function() {
|
|
309
292
|
var u = {}.hasOwnProperty;
|
|
310
293
|
function n() {
|
|
311
294
|
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
312
295
|
var i = arguments[e];
|
|
313
|
-
i && (r = l(r, a(i)));
|
|
296
|
+
i && (r = l(r, a.call(this, i)));
|
|
314
297
|
}
|
|
315
298
|
return r;
|
|
316
299
|
}
|
|
317
300
|
function a(r) {
|
|
318
301
|
if (typeof r == "string" || typeof r == "number")
|
|
319
|
-
return r;
|
|
302
|
+
return this && this[r] || r;
|
|
320
303
|
if (typeof r != "object")
|
|
321
304
|
return "";
|
|
322
305
|
if (Array.isArray(r))
|
|
323
|
-
return n.apply(
|
|
306
|
+
return n.apply(this, r);
|
|
324
307
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
325
308
|
return r.toString();
|
|
326
309
|
var e = "";
|
|
327
310
|
for (var i in r)
|
|
328
|
-
u.call(r, i) && r[i] && (e = l(e, i));
|
|
311
|
+
u.call(r, i) && r[i] && (e = l(e, this && this[i] || i));
|
|
329
312
|
return e;
|
|
330
313
|
}
|
|
331
314
|
function l(r, e) {
|
|
@@ -333,63 +316,63 @@ function et() {
|
|
|
333
316
|
}
|
|
334
317
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
335
318
|
})();
|
|
336
|
-
}(
|
|
319
|
+
}(H)), H.exports;
|
|
337
320
|
}
|
|
338
|
-
var
|
|
339
|
-
const
|
|
321
|
+
var rt = Qr();
|
|
322
|
+
const tt = /* @__PURE__ */ Kr(rt), et = {
|
|
340
323
|
"purpur-field-error-text": "_purpur-field-error-text_1lj7e_1",
|
|
341
324
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_1lj7e_11"
|
|
342
|
-
},
|
|
325
|
+
}, X = tt.bind(et), Y = "purpur-field-error-text", nt = ({
|
|
343
326
|
children: t,
|
|
344
327
|
className: u,
|
|
345
328
|
["aria-relevant"]: n = "additions text",
|
|
346
329
|
...a
|
|
347
|
-
}) => /* @__PURE__ */
|
|
330
|
+
}) => /* @__PURE__ */ b(
|
|
348
331
|
"div",
|
|
349
332
|
{
|
|
350
|
-
className:
|
|
333
|
+
className: X(u, Y),
|
|
351
334
|
"aria-live": "assertive",
|
|
352
335
|
"aria-relevant": n,
|
|
353
336
|
...a,
|
|
354
337
|
children: [
|
|
355
|
-
/* @__PURE__ */ p(
|
|
338
|
+
/* @__PURE__ */ p(dr, { svg: Jr, size: "xs", className: X(`${Y}__icon`) }),
|
|
356
339
|
t
|
|
357
340
|
]
|
|
358
341
|
}
|
|
359
342
|
);
|
|
360
|
-
function
|
|
343
|
+
function it(t) {
|
|
361
344
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
362
345
|
}
|
|
363
|
-
var
|
|
346
|
+
var J = { exports: {} };
|
|
364
347
|
/*!
|
|
365
348
|
Copyright (c) 2018 Jed Watson.
|
|
366
349
|
Licensed under the MIT License (MIT), see
|
|
367
350
|
http://jedwatson.github.io/classnames
|
|
368
351
|
*/
|
|
369
|
-
var
|
|
370
|
-
function
|
|
371
|
-
return
|
|
352
|
+
var K;
|
|
353
|
+
function ut() {
|
|
354
|
+
return K || (K = 1, function(t) {
|
|
372
355
|
(function() {
|
|
373
356
|
var u = {}.hasOwnProperty;
|
|
374
357
|
function n() {
|
|
375
358
|
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
376
359
|
var i = arguments[e];
|
|
377
|
-
i && (r = l(r, a(i)));
|
|
360
|
+
i && (r = l(r, a.call(this, i)));
|
|
378
361
|
}
|
|
379
362
|
return r;
|
|
380
363
|
}
|
|
381
364
|
function a(r) {
|
|
382
365
|
if (typeof r == "string" || typeof r == "number")
|
|
383
|
-
return r;
|
|
366
|
+
return this && this[r] || r;
|
|
384
367
|
if (typeof r != "object")
|
|
385
368
|
return "";
|
|
386
369
|
if (Array.isArray(r))
|
|
387
|
-
return n.apply(
|
|
370
|
+
return n.apply(this, r);
|
|
388
371
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
389
372
|
return r.toString();
|
|
390
373
|
var e = "";
|
|
391
374
|
for (var i in r)
|
|
392
|
-
u.call(r, i) && r[i] && (e = l(e, i));
|
|
375
|
+
u.call(r, i) && r[i] && (e = l(e, this && this[i] || i));
|
|
393
376
|
return e;
|
|
394
377
|
}
|
|
395
378
|
function l(r, e) {
|
|
@@ -397,40 +380,36 @@ function lt() {
|
|
|
397
380
|
}
|
|
398
381
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
399
382
|
})();
|
|
400
|
-
}(
|
|
383
|
+
}(J)), J.exports;
|
|
401
384
|
}
|
|
402
|
-
var
|
|
403
|
-
const
|
|
385
|
+
var at = ut();
|
|
386
|
+
const lt = /* @__PURE__ */ it(at), pt = {
|
|
404
387
|
"purpur-field-helper-text": "_purpur-field-helper-text_atw6b_1",
|
|
405
388
|
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_atw6b_9"
|
|
406
|
-
},
|
|
389
|
+
}, ot = lt.bind(pt), Q = "purpur-field-helper-text", st = ({
|
|
407
390
|
children: t,
|
|
408
391
|
className: u,
|
|
409
392
|
disabled: n,
|
|
410
393
|
id: a,
|
|
411
394
|
...l
|
|
412
395
|
}) => {
|
|
413
|
-
const r = ot(
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
{
|
|
417
|
-
[er[`${nr}--disabled`]]: n
|
|
418
|
-
}
|
|
419
|
-
]);
|
|
396
|
+
const r = ot(u, Q, {
|
|
397
|
+
[`${Q}--disabled`]: n
|
|
398
|
+
});
|
|
420
399
|
return /* @__PURE__ */ p("span", { id: a, className: r, ...l, children: t });
|
|
421
400
|
};
|
|
422
401
|
function ct(t) {
|
|
423
402
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
424
403
|
}
|
|
425
|
-
var
|
|
404
|
+
var rr = { exports: {} };
|
|
426
405
|
/*!
|
|
427
406
|
Copyright (c) 2018 Jed Watson.
|
|
428
407
|
Licensed under the MIT License (MIT), see
|
|
429
408
|
http://jedwatson.github.io/classnames
|
|
430
409
|
*/
|
|
431
|
-
var
|
|
410
|
+
var tr;
|
|
432
411
|
function dt() {
|
|
433
|
-
return
|
|
412
|
+
return tr || (tr = 1, function(t) {
|
|
434
413
|
(function() {
|
|
435
414
|
var u = {}.hasOwnProperty;
|
|
436
415
|
function n() {
|
|
@@ -459,7 +438,7 @@ function dt() {
|
|
|
459
438
|
}
|
|
460
439
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
461
440
|
})();
|
|
462
|
-
}(
|
|
441
|
+
}(rr)), rr.exports;
|
|
463
442
|
}
|
|
464
443
|
var _t = dt();
|
|
465
444
|
const ft = /* @__PURE__ */ ct(_t), vt = {
|
|
@@ -470,52 +449,37 @@ const ft = /* @__PURE__ */ ct(_t), vt = {
|
|
|
470
449
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
471
450
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
472
451
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
473
|
-
}, gt = ft.bind(vt),
|
|
452
|
+
}, gt = ft.bind(vt), er = "purpur-icon", mt = "md", ht = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), bt = ({ content: t = "", title: u } = {}) => {
|
|
474
453
|
const n = [
|
|
475
454
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
476
455
|
{ name: "fill", value: "currentColor" },
|
|
477
456
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
478
457
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
479
458
|
], a = u ? `<title>${u}</title>` : "";
|
|
480
|
-
return `<svg ${
|
|
481
|
-
},
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
...r
|
|
488
|
-
}) => {
|
|
489
|
-
const e = bt({
|
|
490
|
-
content: xt(u.svg),
|
|
491
|
-
title: n
|
|
492
|
-
}), i = gt(a, ar, `${ar}--${l}`);
|
|
493
|
-
return /* @__PURE__ */ p(
|
|
494
|
-
"span",
|
|
495
|
-
{
|
|
496
|
-
className: i,
|
|
497
|
-
"data-testid": t,
|
|
498
|
-
dangerouslySetInnerHTML: { __html: e },
|
|
499
|
-
...r
|
|
500
|
-
}
|
|
501
|
-
);
|
|
459
|
+
return `<svg ${ht(n)}>${a}${t}</svg>`;
|
|
460
|
+
}, yt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), B = ({ svg: t, allyTitle: u, className: n, size: a = mt, ...l }) => {
|
|
461
|
+
const r = bt({
|
|
462
|
+
content: yt(t.svg),
|
|
463
|
+
title: u
|
|
464
|
+
}), e = gt(n, er, `${er}--${a}`);
|
|
465
|
+
return /* @__PURE__ */ p("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...l });
|
|
502
466
|
};
|
|
503
|
-
|
|
504
|
-
const
|
|
467
|
+
B.displayName = "Icon";
|
|
468
|
+
const xt = {
|
|
505
469
|
name: "check-circle-filled",
|
|
506
470
|
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>',
|
|
507
471
|
keywords: ["check-circle-filled"],
|
|
508
472
|
category: "status"
|
|
509
|
-
},
|
|
510
|
-
|
|
473
|
+
}, _r = (t) => /* @__PURE__ */ p(B, { ...t, svg: xt });
|
|
474
|
+
_r.displayName = "IconCheckCircleFilled";
|
|
511
475
|
const $t = {
|
|
512
476
|
name: "close",
|
|
513
477
|
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>',
|
|
514
478
|
keywords: ["close"],
|
|
515
479
|
category: "utility"
|
|
516
|
-
},
|
|
517
|
-
|
|
518
|
-
function
|
|
480
|
+
}, fr = (t) => /* @__PURE__ */ p(B, { ...t, svg: $t });
|
|
481
|
+
fr.displayName = "IconClose";
|
|
482
|
+
function nr(t, u) {
|
|
519
483
|
if (typeof t == "function")
|
|
520
484
|
return t(u);
|
|
521
485
|
t != null && (t.current = u);
|
|
@@ -524,28 +488,28 @@ function wt(...t) {
|
|
|
524
488
|
return (u) => {
|
|
525
489
|
let n = !1;
|
|
526
490
|
const a = t.map((l) => {
|
|
527
|
-
const r =
|
|
491
|
+
const r = nr(l, u);
|
|
528
492
|
return !n && typeof r == "function" && (n = !0), r;
|
|
529
493
|
});
|
|
530
494
|
if (n)
|
|
531
495
|
return () => {
|
|
532
496
|
for (let l = 0; l < a.length; l++) {
|
|
533
497
|
const r = a[l];
|
|
534
|
-
typeof r == "function" ? r() :
|
|
498
|
+
typeof r == "function" ? r() : nr(t[l], null);
|
|
535
499
|
}
|
|
536
500
|
};
|
|
537
501
|
};
|
|
538
502
|
}
|
|
539
|
-
var
|
|
503
|
+
var vr = c.forwardRef((t, u) => {
|
|
540
504
|
const { children: n, ...a } = t, l = c.Children.toArray(n), r = l.find(Nt);
|
|
541
505
|
if (r) {
|
|
542
506
|
const e = r.props.children, i = l.map((v) => v === r ? c.Children.count(e) > 1 ? c.Children.only(null) : c.isValidElement(e) ? e.props.children : null : v);
|
|
543
|
-
return /* @__PURE__ */ p(
|
|
507
|
+
return /* @__PURE__ */ p(R, { ...a, ref: u, children: c.isValidElement(e) ? c.cloneElement(e, void 0, i) : null });
|
|
544
508
|
}
|
|
545
|
-
return /* @__PURE__ */ p(
|
|
509
|
+
return /* @__PURE__ */ p(R, { ...a, ref: u, children: n });
|
|
546
510
|
});
|
|
547
|
-
|
|
548
|
-
var
|
|
511
|
+
vr.displayName = "Slot";
|
|
512
|
+
var R = c.forwardRef((t, u) => {
|
|
549
513
|
const { children: n, ...a } = t;
|
|
550
514
|
if (c.isValidElement(n)) {
|
|
551
515
|
const l = jt(n), r = Ot(a, n.props);
|
|
@@ -553,8 +517,8 @@ var E = c.forwardRef((t, u) => {
|
|
|
553
517
|
}
|
|
554
518
|
return c.Children.count(n) > 1 ? c.Children.only(null) : null;
|
|
555
519
|
});
|
|
556
|
-
|
|
557
|
-
var St = ({ children: t }) => /* @__PURE__ */ p(
|
|
520
|
+
R.displayName = "SlotClone";
|
|
521
|
+
var St = ({ children: t }) => /* @__PURE__ */ p(xr, { children: t });
|
|
558
522
|
function Nt(t) {
|
|
559
523
|
return c.isValidElement(t) && t.type === St;
|
|
560
524
|
}
|
|
@@ -592,11 +556,11 @@ var qt = [
|
|
|
592
556
|
"ul"
|
|
593
557
|
], kt = qt.reduce((t, u) => {
|
|
594
558
|
const n = c.forwardRef((a, l) => {
|
|
595
|
-
const { asChild: r, ...e } = a, i = r ?
|
|
559
|
+
const { asChild: r, ...e } = a, i = r ? vr : u;
|
|
596
560
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(i, { ...e, ref: l });
|
|
597
561
|
});
|
|
598
562
|
return n.displayName = `Primitive.${u}`, { ...t, [u]: n };
|
|
599
|
-
}, {}), Mt = "Label",
|
|
563
|
+
}, {}), Mt = "Label", gr = c.forwardRef((t, u) => /* @__PURE__ */ p(
|
|
600
564
|
kt.label,
|
|
601
565
|
{
|
|
602
566
|
...t,
|
|
@@ -607,41 +571,41 @@ var qt = [
|
|
|
607
571
|
}
|
|
608
572
|
}
|
|
609
573
|
));
|
|
610
|
-
|
|
611
|
-
var
|
|
612
|
-
function
|
|
574
|
+
gr.displayName = Mt;
|
|
575
|
+
var At = gr;
|
|
576
|
+
function Ct(t) {
|
|
613
577
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
614
578
|
}
|
|
615
|
-
var
|
|
579
|
+
var ir = { exports: {} };
|
|
616
580
|
/*!
|
|
617
581
|
Copyright (c) 2018 Jed Watson.
|
|
618
582
|
Licensed under the MIT License (MIT), see
|
|
619
583
|
http://jedwatson.github.io/classnames
|
|
620
584
|
*/
|
|
621
|
-
var
|
|
585
|
+
var ur;
|
|
622
586
|
function Rt() {
|
|
623
|
-
return
|
|
587
|
+
return ur || (ur = 1, function(t) {
|
|
624
588
|
(function() {
|
|
625
589
|
var u = {}.hasOwnProperty;
|
|
626
590
|
function n() {
|
|
627
591
|
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
628
592
|
var i = arguments[e];
|
|
629
|
-
i && (r = l(r, a(i)));
|
|
593
|
+
i && (r = l(r, a.call(this, i)));
|
|
630
594
|
}
|
|
631
595
|
return r;
|
|
632
596
|
}
|
|
633
597
|
function a(r) {
|
|
634
598
|
if (typeof r == "string" || typeof r == "number")
|
|
635
|
-
return r;
|
|
599
|
+
return this && this[r] || r;
|
|
636
600
|
if (typeof r != "object")
|
|
637
601
|
return "";
|
|
638
602
|
if (Array.isArray(r))
|
|
639
|
-
return n.apply(
|
|
603
|
+
return n.apply(this, r);
|
|
640
604
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
641
605
|
return r.toString();
|
|
642
606
|
var e = "";
|
|
643
607
|
for (var i in r)
|
|
644
|
-
u.call(r, i) && r[i] && (e = l(e, i));
|
|
608
|
+
u.call(r, i) && r[i] && (e = l(e, this && this[i] || i));
|
|
645
609
|
return e;
|
|
646
610
|
}
|
|
647
611
|
function l(r, e) {
|
|
@@ -649,63 +613,59 @@ function Rt() {
|
|
|
649
613
|
}
|
|
650
614
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
651
615
|
})();
|
|
652
|
-
}(
|
|
616
|
+
}(ir)), ir.exports;
|
|
653
617
|
}
|
|
654
618
|
var Bt = Rt();
|
|
655
|
-
const It = /* @__PURE__ */
|
|
619
|
+
const It = /* @__PURE__ */ Ct(Bt), Et = {
|
|
656
620
|
"purpur-label": "_purpur-label_1jndl_1",
|
|
657
621
|
"purpur-label--negative": "_purpur-label--negative_1jndl_8",
|
|
658
622
|
"purpur-label--disabled": "_purpur-label--disabled_1jndl_11"
|
|
659
|
-
},
|
|
623
|
+
}, Pt = It.bind(Et), A = "purpur-label", Vt = ({
|
|
660
624
|
children: t,
|
|
661
625
|
className: u,
|
|
662
626
|
disabled: n,
|
|
663
627
|
negative: a = !1,
|
|
664
628
|
...l
|
|
665
629
|
}) => {
|
|
666
|
-
const r =
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
[R[`${B}--negative`]]: a
|
|
672
|
-
}
|
|
673
|
-
]);
|
|
674
|
-
return /* @__PURE__ */ p(Ct, { className: r, ...l, children: t });
|
|
630
|
+
const r = Pt(u, A, {
|
|
631
|
+
[`${A}--disabled`]: n,
|
|
632
|
+
[`${A}--negative`]: a
|
|
633
|
+
});
|
|
634
|
+
return /* @__PURE__ */ p(At, { className: r, ...l, children: t });
|
|
675
635
|
};
|
|
676
|
-
function
|
|
636
|
+
function zt(t) {
|
|
677
637
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
678
638
|
}
|
|
679
|
-
var
|
|
639
|
+
var ar = { exports: {} };
|
|
680
640
|
/*!
|
|
681
641
|
Copyright (c) 2018 Jed Watson.
|
|
682
642
|
Licensed under the MIT License (MIT), see
|
|
683
643
|
http://jedwatson.github.io/classnames
|
|
684
644
|
*/
|
|
685
|
-
var
|
|
686
|
-
function
|
|
687
|
-
return
|
|
645
|
+
var lr;
|
|
646
|
+
function Dt() {
|
|
647
|
+
return lr || (lr = 1, function(t) {
|
|
688
648
|
(function() {
|
|
689
649
|
var u = {}.hasOwnProperty;
|
|
690
650
|
function n() {
|
|
691
651
|
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
692
652
|
var i = arguments[e];
|
|
693
|
-
i && (r = l(r, a(i)));
|
|
653
|
+
i && (r = l(r, a.call(this, i)));
|
|
694
654
|
}
|
|
695
655
|
return r;
|
|
696
656
|
}
|
|
697
657
|
function a(r) {
|
|
698
658
|
if (typeof r == "string" || typeof r == "number")
|
|
699
|
-
return r;
|
|
659
|
+
return this && this[r] || r;
|
|
700
660
|
if (typeof r != "object")
|
|
701
661
|
return "";
|
|
702
662
|
if (Array.isArray(r))
|
|
703
|
-
return n.apply(
|
|
663
|
+
return n.apply(this, r);
|
|
704
664
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
705
665
|
return r.toString();
|
|
706
666
|
var e = "";
|
|
707
667
|
for (var i in r)
|
|
708
|
-
u.call(r, i) && r[i] && (e = l(e, i));
|
|
668
|
+
u.call(r, i) && r[i] && (e = l(e, this && this[i] || i));
|
|
709
669
|
return e;
|
|
710
670
|
}
|
|
711
671
|
function l(r, e) {
|
|
@@ -713,61 +673,52 @@ function Vt() {
|
|
|
713
673
|
}
|
|
714
674
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
715
675
|
})();
|
|
716
|
-
}(
|
|
676
|
+
}(ar)), ar.exports;
|
|
717
677
|
}
|
|
718
|
-
var
|
|
719
|
-
const
|
|
678
|
+
var Lt = Dt();
|
|
679
|
+
const Zt = /* @__PURE__ */ zt(Lt), Ft = "_rotate_12t9p_1", Wt = "_dash_12t9p_1", Tt = {
|
|
720
680
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
721
|
-
rotate:
|
|
681
|
+
rotate: Ft,
|
|
722
682
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
723
683
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
724
684
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
725
685
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
726
686
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
727
687
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
728
|
-
dash:
|
|
688
|
+
dash: Wt,
|
|
729
689
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
730
690
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
731
|
-
},
|
|
691
|
+
}, pr = Zt.bind(Tt), $ = "purpur-spinner", Gt = {
|
|
732
692
|
SM: "sm"
|
|
733
|
-
},
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
"div",
|
|
693
|
+
}, Ht = ({
|
|
694
|
+
disabled: t = !1,
|
|
695
|
+
negative: u = !1,
|
|
696
|
+
size: n = Gt.SM,
|
|
697
|
+
...a
|
|
698
|
+
}) => /* @__PURE__ */ p("div", { className: pr($, `${$}--${n}`), ...a, children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
|
|
699
|
+
"circle",
|
|
741
700
|
{
|
|
742
|
-
className:
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
[N[`${O}__circle--disabled`]]: u,
|
|
750
|
-
[N[`${O}__circle--negative`]]: n
|
|
751
|
-
}),
|
|
752
|
-
cx: "25",
|
|
753
|
-
cy: "25",
|
|
754
|
-
r: "20"
|
|
755
|
-
}
|
|
756
|
-
) })
|
|
701
|
+
className: pr(`${$}__circle`, {
|
|
702
|
+
[`${$}__circle--disabled`]: t,
|
|
703
|
+
[`${$}__circle--negative`]: u
|
|
704
|
+
}),
|
|
705
|
+
cx: "25",
|
|
706
|
+
cy: "25",
|
|
707
|
+
r: "20"
|
|
757
708
|
}
|
|
758
|
-
);
|
|
759
|
-
function
|
|
709
|
+
) }) });
|
|
710
|
+
function Ut(t) {
|
|
760
711
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
761
712
|
}
|
|
762
|
-
var
|
|
713
|
+
var C = { exports: {} };
|
|
763
714
|
/*!
|
|
764
715
|
Copyright (c) 2018 Jed Watson.
|
|
765
716
|
Licensed under the MIT License (MIT), see
|
|
766
717
|
http://jedwatson.github.io/classnames
|
|
767
718
|
*/
|
|
768
|
-
var
|
|
769
|
-
function
|
|
770
|
-
return
|
|
719
|
+
var or;
|
|
720
|
+
function Xt() {
|
|
721
|
+
return or || (or = 1, function(t) {
|
|
771
722
|
(function() {
|
|
772
723
|
var u = {}.hasOwnProperty;
|
|
773
724
|
function n() {
|
|
@@ -796,10 +747,10 @@ function Tt() {
|
|
|
796
747
|
}
|
|
797
748
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
798
749
|
})();
|
|
799
|
-
}(
|
|
750
|
+
}(C)), C.exports;
|
|
800
751
|
}
|
|
801
|
-
var
|
|
802
|
-
const
|
|
752
|
+
var Yt = Xt();
|
|
753
|
+
const Jt = /* @__PURE__ */ Ut(Yt), Kt = {
|
|
803
754
|
"purpur-text-field": "_purpur-text-field_3gl1k_1",
|
|
804
755
|
"purpur-text-field__label": "_purpur-text-field__label_3gl1k_7",
|
|
805
756
|
"purpur-text-field__label-text": "_purpur-text-field__label-text_3gl1k_12",
|
|
@@ -816,136 +767,135 @@ const Ht = /* @__PURE__ */ Wt(Gt), Ut = {
|
|
|
816
767
|
"purpur-text-field__input--error": "_purpur-text-field__input--error_3gl1k_94",
|
|
817
768
|
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_3gl1k_106",
|
|
818
769
|
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_3gl1k_111"
|
|
819
|
-
},
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
`${s}__input-container`,
|
|
875
|
-
|
|
876
|
-
[`${s}__input-container--
|
|
877
|
-
[`${s}__input-container--end-adornment`]: A.length || r,
|
|
770
|
+
}, Qt = (t) => $r(t), f = Jt.bind(Kt), s = "purpur-text-field", mr = sr(
|
|
771
|
+
({
|
|
772
|
+
["data-testid"]: t,
|
|
773
|
+
className: u,
|
|
774
|
+
clearButtonAriaLabel: n,
|
|
775
|
+
beforeField: a,
|
|
776
|
+
afterField: l,
|
|
777
|
+
endAdornment: r,
|
|
778
|
+
errorText: e,
|
|
779
|
+
helperText: i,
|
|
780
|
+
hideRequiredAsterisk: v = !1,
|
|
781
|
+
label: y,
|
|
782
|
+
loading: w = !1,
|
|
783
|
+
onClear: g,
|
|
784
|
+
startAdornment: N,
|
|
785
|
+
valid: O = !1,
|
|
786
|
+
...o
|
|
787
|
+
}, m) => {
|
|
788
|
+
var V;
|
|
789
|
+
const S = wr(), j = o.id ?? S, _ = (d) => t ? `${t}-${d}` : void 0, I = O && !e, q = i ? `${j}-helper-text` : void 0, k = [N].filter((d) => !!d), E = (typeof o.value == "number" ? o.value !== void 0 : (V = o.value) == null ? void 0 : V.length) && !o.disabled && !o.readOnly && !w && g && n, P = Qt(null), hr = (d) => {
|
|
790
|
+
P.current = d, typeof m == "function" ? m(d) : m && (m.current = d);
|
|
791
|
+
}, br = () => {
|
|
792
|
+
var d;
|
|
793
|
+
g == null || g(), (d = P.current) == null || d.focus();
|
|
794
|
+
}, M = [
|
|
795
|
+
w && /* @__PURE__ */ p(
|
|
796
|
+
Ht,
|
|
797
|
+
{
|
|
798
|
+
disabled: o.disabled,
|
|
799
|
+
size: "xs",
|
|
800
|
+
"data-testid": _("spinner")
|
|
801
|
+
},
|
|
802
|
+
"spinner"
|
|
803
|
+
),
|
|
804
|
+
E && /* @__PURE__ */ p(
|
|
805
|
+
cr,
|
|
806
|
+
{
|
|
807
|
+
variant: "tertiary-purple",
|
|
808
|
+
onClick: br,
|
|
809
|
+
iconOnly: !0,
|
|
810
|
+
"aria-label": n ?? "",
|
|
811
|
+
"data-testid": _("clear-button"),
|
|
812
|
+
tabIndex: -1,
|
|
813
|
+
children: /* @__PURE__ */ p(fr, { size: "xs" })
|
|
814
|
+
},
|
|
815
|
+
"clear-button"
|
|
816
|
+
),
|
|
817
|
+
I && /* @__PURE__ */ p(
|
|
818
|
+
_r,
|
|
819
|
+
{
|
|
820
|
+
"data-testid": _("valid-icon"),
|
|
821
|
+
className: f(`${s}__valid-icon`)
|
|
822
|
+
},
|
|
823
|
+
"valid-icon"
|
|
824
|
+
)
|
|
825
|
+
].filter((d) => !!d), yr = f(`${s}__input-container`, {
|
|
826
|
+
[`${s}__input-container--start-adornment`]: k.length,
|
|
827
|
+
[`${s}__input-container--end-adornment`]: M.length || r,
|
|
878
828
|
[`${s}__input-container--disabled`]: o.disabled,
|
|
879
|
-
[`${s}__input-container--has-clear-button`]:
|
|
829
|
+
[`${s}__input-container--has-clear-button`]: E,
|
|
880
830
|
[`${s}__input-container--readonly`]: o.readOnly && !o.disabled
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
)
|
|
831
|
+
});
|
|
832
|
+
return /* @__PURE__ */ b("div", { className: f(u, s), children: [
|
|
833
|
+
y && /* @__PURE__ */ b(
|
|
834
|
+
Vt,
|
|
835
|
+
{
|
|
836
|
+
htmlFor: j,
|
|
837
|
+
className: f(`${s}__label`),
|
|
838
|
+
"data-testid": _("label"),
|
|
839
|
+
disabled: o.disabled,
|
|
840
|
+
children: [
|
|
841
|
+
o.required && !v && /* @__PURE__ */ p("span", { "aria-hidden": !0, children: "*" }),
|
|
842
|
+
y
|
|
843
|
+
]
|
|
844
|
+
}
|
|
845
|
+
),
|
|
846
|
+
/* @__PURE__ */ b("div", { className: f(`${s}__field-row`), children: [
|
|
847
|
+
!!a && a,
|
|
848
|
+
/* @__PURE__ */ b("div", { className: yr, children: [
|
|
849
|
+
!!k.length && /* @__PURE__ */ p(
|
|
850
|
+
"div",
|
|
851
|
+
{
|
|
852
|
+
"data-testid": _("start-adornments"),
|
|
853
|
+
className: f(`${s}__adornment-container`),
|
|
854
|
+
children: k
|
|
855
|
+
}
|
|
856
|
+
),
|
|
857
|
+
/* @__PURE__ */ p(
|
|
858
|
+
"input",
|
|
859
|
+
{
|
|
860
|
+
...o,
|
|
861
|
+
id: j,
|
|
862
|
+
ref: hr,
|
|
863
|
+
"data-testid": _("input"),
|
|
864
|
+
"aria-describedby": o["aria-describedby"] || q,
|
|
865
|
+
"aria-invalid": o["aria-invalid"] || !!e,
|
|
866
|
+
className: f([
|
|
867
|
+
`${s}__input`,
|
|
868
|
+
{
|
|
869
|
+
[`${s}__input--valid`]: I,
|
|
870
|
+
[`${s}__input--error`]: !!e
|
|
871
|
+
}
|
|
872
|
+
])
|
|
873
|
+
}
|
|
874
|
+
),
|
|
875
|
+
/* @__PURE__ */ p("div", { className: f(`${s}__frame`) }),
|
|
876
|
+
(!!M.length || r) && /* @__PURE__ */ b(
|
|
877
|
+
"div",
|
|
878
|
+
{
|
|
879
|
+
"data-testid": _("end-adornments"),
|
|
880
|
+
className: f(`${s}__adornment-container`),
|
|
881
|
+
children: [
|
|
882
|
+
M,
|
|
883
|
+
r
|
|
884
|
+
]
|
|
885
|
+
}
|
|
886
|
+
)
|
|
887
|
+
] }),
|
|
888
|
+
!!l && l
|
|
938
889
|
] }),
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
const te = (t) => qr(t) && t.type.displayName === hr.displayName;
|
|
890
|
+
q && /* @__PURE__ */ p(st, { "data-testid": _("helper-text"), id: q, children: i }),
|
|
891
|
+
e && /* @__PURE__ */ p(nt, { "data-testid": _("error-text"), children: e })
|
|
892
|
+
] });
|
|
893
|
+
}
|
|
894
|
+
);
|
|
895
|
+
mr.displayName = "TextField";
|
|
896
|
+
const ie = (t) => Sr(t) && t.type.displayName === mr.displayName;
|
|
947
897
|
export {
|
|
948
|
-
|
|
949
|
-
|
|
898
|
+
mr as TextField,
|
|
899
|
+
ie as isTextField
|
|
950
900
|
};
|
|
951
901
|
//# sourceMappingURL=text-field.es.js.map
|