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