@purpurds/password-field 6.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 +92 -0
- package/dist/constants.d.ts +10 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/main-B6vgbdqW.mjs +1002 -0
- package/dist/main-B6vgbdqW.mjs.map +1 -0
- package/dist/main-CqBhSgIE.js +2 -0
- package/dist/main-CqBhSgIE.js.map +1 -0
- package/dist/metadata.js +9 -0
- package/dist/password-field-BwuKVABM.mjs +1557 -0
- package/dist/password-field-BwuKVABM.mjs.map +1 -0
- package/dist/password-field-CE2wn3y4.js +58 -0
- package/dist/password-field-CE2wn3y4.js.map +1 -0
- package/dist/password-field.cjs.js +2 -0
- package/dist/password-field.cjs.js.map +1 -0
- package/dist/password-field.d.ts +27 -0
- package/dist/password-field.d.ts.map +1 -0
- package/dist/password-field.es.js +8 -0
- package/dist/password-field.es.js.map +1 -0
- package/dist/password-strength-indicator.d.ts +11 -0
- package/dist/password-strength-indicator.d.ts.map +1 -0
- package/dist/password-strength.d.ts +13 -0
- package/dist/password-strength.d.ts.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/use-password-strength.d.ts +10 -0
- package/dist/use-password-strength.d.ts.map +1 -0
- package/package.json +69 -0
- package/src/constants.ts +10 -0
- package/src/global.d.ts +4 -0
- package/src/password-field.module.scss +5 -0
- package/src/password-field.stories.tsx +273 -0
- package/src/password-field.story.css +23 -0
- package/src/password-field.test.tsx +69 -0
- package/src/password-field.tsx +128 -0
- package/src/password-strength-indicator.module.scss +19 -0
- package/src/password-strength-indicator.test.tsx +46 -0
- package/src/password-strength-indicator.tsx +38 -0
- package/src/password-strength.module.scss +30 -0
- package/src/password-strength.test.tsx +52 -0
- package/src/password-strength.tsx +79 -0
- package/src/types.ts +7 -0
- package/src/use-password-strength.ts +61 -0
|
@@ -0,0 +1,1557 @@
|
|
|
1
|
+
import { jsxs as b, jsx as o, Fragment as at } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { forwardRef as q, useId as ut, useRef as it, useState as T, useMemo as pt, useEffect as ot, isValidElement as st } from "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
const lt = {
|
|
6
|
+
LG: "lg"
|
|
7
|
+
};
|
|
8
|
+
function ct(t) {
|
|
9
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
10
|
+
}
|
|
11
|
+
var nr = { exports: {} };
|
|
12
|
+
/*!
|
|
13
|
+
Copyright (c) 2018 Jed Watson.
|
|
14
|
+
Licensed under the MIT License (MIT), see
|
|
15
|
+
http://jedwatson.github.io/classnames
|
|
16
|
+
*/
|
|
17
|
+
var ar;
|
|
18
|
+
function dt() {
|
|
19
|
+
return ar || (ar = 1, function(t) {
|
|
20
|
+
(function() {
|
|
21
|
+
var u = {}.hasOwnProperty;
|
|
22
|
+
function n() {
|
|
23
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
24
|
+
var a = arguments[e];
|
|
25
|
+
a && (r = p(r, i(a)));
|
|
26
|
+
}
|
|
27
|
+
return r;
|
|
28
|
+
}
|
|
29
|
+
function i(r) {
|
|
30
|
+
if (typeof r == "string" || typeof r == "number")
|
|
31
|
+
return r;
|
|
32
|
+
if (typeof r != "object")
|
|
33
|
+
return "";
|
|
34
|
+
if (Array.isArray(r))
|
|
35
|
+
return n.apply(null, r);
|
|
36
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
37
|
+
return r.toString();
|
|
38
|
+
var e = "";
|
|
39
|
+
for (var a in r)
|
|
40
|
+
u.call(r, a) && r[a] && (e = p(e, a));
|
|
41
|
+
return e;
|
|
42
|
+
}
|
|
43
|
+
function p(r, e) {
|
|
44
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
45
|
+
}
|
|
46
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
47
|
+
})();
|
|
48
|
+
}(nr)), nr.exports;
|
|
49
|
+
}
|
|
50
|
+
var _t = dt();
|
|
51
|
+
const ur = /* @__PURE__ */ ct(_t), ft = "_rotate_1xozj_1", gt = "_dash_1xozj_1", P = {
|
|
52
|
+
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
53
|
+
rotate: ft,
|
|
54
|
+
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
55
|
+
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
56
|
+
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
57
|
+
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
58
|
+
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
59
|
+
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
60
|
+
dash: gt,
|
|
61
|
+
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
62
|
+
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
63
|
+
}, A = "purpur-spinner", vt = {
|
|
64
|
+
SM: "sm"
|
|
65
|
+
}, ht = ({
|
|
66
|
+
["data-testid"]: t,
|
|
67
|
+
disabled: u = !1,
|
|
68
|
+
negative: n = !1,
|
|
69
|
+
size: i = vt.SM,
|
|
70
|
+
...p
|
|
71
|
+
}) => /* @__PURE__ */ o(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
className: ur([P[A], P[`${A}--${i}`]]),
|
|
75
|
+
"data-testid": t,
|
|
76
|
+
...p,
|
|
77
|
+
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
78
|
+
"circle",
|
|
79
|
+
{
|
|
80
|
+
className: ur(P[`${A}__circle`], {
|
|
81
|
+
[P[`${A}__circle--disabled`]]: u,
|
|
82
|
+
[P[`${A}__circle--negative`]]: n
|
|
83
|
+
}),
|
|
84
|
+
cx: "25",
|
|
85
|
+
cy: "25",
|
|
86
|
+
r: "20"
|
|
87
|
+
}
|
|
88
|
+
) })
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
function mt(t) {
|
|
92
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
93
|
+
}
|
|
94
|
+
var ir = { exports: {} };
|
|
95
|
+
/*!
|
|
96
|
+
Copyright (c) 2018 Jed Watson.
|
|
97
|
+
Licensed under the MIT License (MIT), see
|
|
98
|
+
http://jedwatson.github.io/classnames
|
|
99
|
+
*/
|
|
100
|
+
var pr;
|
|
101
|
+
function bt() {
|
|
102
|
+
return pr || (pr = 1, function(t) {
|
|
103
|
+
(function() {
|
|
104
|
+
var u = {}.hasOwnProperty;
|
|
105
|
+
function n() {
|
|
106
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
107
|
+
var a = arguments[e];
|
|
108
|
+
a && (r = p(r, i.call(this, a)));
|
|
109
|
+
}
|
|
110
|
+
return r;
|
|
111
|
+
}
|
|
112
|
+
function i(r) {
|
|
113
|
+
if (typeof r == "string" || typeof r == "number")
|
|
114
|
+
return this && this[r] || r;
|
|
115
|
+
if (typeof r != "object")
|
|
116
|
+
return "";
|
|
117
|
+
if (Array.isArray(r))
|
|
118
|
+
return n.apply(this, r);
|
|
119
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
120
|
+
return r.toString();
|
|
121
|
+
var e = "";
|
|
122
|
+
for (var a in r)
|
|
123
|
+
u.call(r, a) && r[a] && (e = p(e, this && this[a] || a));
|
|
124
|
+
return e;
|
|
125
|
+
}
|
|
126
|
+
function p(r, e) {
|
|
127
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
128
|
+
}
|
|
129
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
130
|
+
})();
|
|
131
|
+
}(ir)), ir.exports;
|
|
132
|
+
}
|
|
133
|
+
var yt = bt();
|
|
134
|
+
const xt = /* @__PURE__ */ mt(yt), wt = {
|
|
135
|
+
"purpur-button": "_purpur-button_w455q_1",
|
|
136
|
+
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
137
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
138
|
+
"purpur-button--sm": "_purpur-button--sm_w455q_39",
|
|
139
|
+
"purpur-button--md": "_purpur-button--md_w455q_45",
|
|
140
|
+
"purpur-button--lg": "_purpur-button--lg_w455q_51",
|
|
141
|
+
"purpur-button--full-width": "_purpur-button--full-width_w455q_57",
|
|
142
|
+
"purpur-button--primary": "_purpur-button--primary_w455q_60",
|
|
143
|
+
"purpur-button--disabled": "_purpur-button--disabled_w455q_64",
|
|
144
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_w455q_70",
|
|
145
|
+
"purpur-button--secondary": "_purpur-button--secondary_w455q_82",
|
|
146
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_w455q_93",
|
|
147
|
+
"purpur-button--expressive": "_purpur-button--expressive_w455q_104",
|
|
148
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_w455q_114",
|
|
149
|
+
"purpur-button--negative": "_purpur-button--negative_w455q_126",
|
|
150
|
+
"purpur-button--destructive": "_purpur-button--destructive_w455q_133",
|
|
151
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_w455q_143",
|
|
152
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_w455q_153",
|
|
153
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
154
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
155
|
+
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
156
|
+
}, $t = xt.bind(wt), j = "purpur-button", St = ({
|
|
157
|
+
children: t,
|
|
158
|
+
className: u,
|
|
159
|
+
["data-testid"]: n,
|
|
160
|
+
disabled: i = !1,
|
|
161
|
+
fullWidth: p = !1,
|
|
162
|
+
iconOnly: r,
|
|
163
|
+
loading: e = !1,
|
|
164
|
+
negative: a = !1,
|
|
165
|
+
onClick: l,
|
|
166
|
+
size: d = "md",
|
|
167
|
+
variant: c,
|
|
168
|
+
type: _ = "button",
|
|
169
|
+
...v
|
|
170
|
+
}, s) => {
|
|
171
|
+
if (r && c === "destructive")
|
|
172
|
+
return null;
|
|
173
|
+
const h = $t(
|
|
174
|
+
[
|
|
175
|
+
j,
|
|
176
|
+
`${j}--${a ? `${c}-negative` : c}`,
|
|
177
|
+
`${j}--${d}`
|
|
178
|
+
],
|
|
179
|
+
{
|
|
180
|
+
[`${j}--icon-only`]: r,
|
|
181
|
+
[`${j}--negative`]: a,
|
|
182
|
+
[`${j}--full-width`]: p,
|
|
183
|
+
[`${j}--disabled`]: i || e
|
|
184
|
+
},
|
|
185
|
+
u
|
|
186
|
+
), $ = (y) => {
|
|
187
|
+
i || e ? y.preventDefault() : l && l(y);
|
|
188
|
+
}, S = !!v["aria-disabled"] || i || e;
|
|
189
|
+
return /* @__PURE__ */ b(
|
|
190
|
+
"button",
|
|
191
|
+
{
|
|
192
|
+
className: h,
|
|
193
|
+
"data-testid": n,
|
|
194
|
+
type: _,
|
|
195
|
+
ref: s,
|
|
196
|
+
"aria-disabled": S,
|
|
197
|
+
onClick: $,
|
|
198
|
+
...v,
|
|
199
|
+
children: [
|
|
200
|
+
e && /* @__PURE__ */ o(ht, { size: d === lt.LG ? "xs" : "xxs", negative: a, disabled: S }),
|
|
201
|
+
" ",
|
|
202
|
+
t
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}, Fr = q(St);
|
|
207
|
+
Fr.displayName = "Button";
|
|
208
|
+
function jt(t) {
|
|
209
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
210
|
+
}
|
|
211
|
+
var or = { exports: {} };
|
|
212
|
+
/*!
|
|
213
|
+
Copyright (c) 2018 Jed Watson.
|
|
214
|
+
Licensed under the MIT License (MIT), see
|
|
215
|
+
http://jedwatson.github.io/classnames
|
|
216
|
+
*/
|
|
217
|
+
var sr;
|
|
218
|
+
function Nt() {
|
|
219
|
+
return sr || (sr = 1, function(t) {
|
|
220
|
+
(function() {
|
|
221
|
+
var u = {}.hasOwnProperty;
|
|
222
|
+
function n() {
|
|
223
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
224
|
+
var a = arguments[e];
|
|
225
|
+
a && (r = p(r, i.call(this, a)));
|
|
226
|
+
}
|
|
227
|
+
return r;
|
|
228
|
+
}
|
|
229
|
+
function i(r) {
|
|
230
|
+
if (typeof r == "string" || typeof r == "number")
|
|
231
|
+
return this && this[r] || r;
|
|
232
|
+
if (typeof r != "object")
|
|
233
|
+
return "";
|
|
234
|
+
if (Array.isArray(r))
|
|
235
|
+
return n.apply(this, r);
|
|
236
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
237
|
+
return r.toString();
|
|
238
|
+
var e = "";
|
|
239
|
+
for (var a in r)
|
|
240
|
+
u.call(r, a) && r[a] && (e = p(e, this && this[a] || a));
|
|
241
|
+
return e;
|
|
242
|
+
}
|
|
243
|
+
function p(r, e) {
|
|
244
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
245
|
+
}
|
|
246
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
247
|
+
})();
|
|
248
|
+
}(or)), or.exports;
|
|
249
|
+
}
|
|
250
|
+
var Ot = Nt();
|
|
251
|
+
const qt = /* @__PURE__ */ jt(Ot), Pt = {
|
|
252
|
+
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
253
|
+
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
254
|
+
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
255
|
+
"purpur-icon--sm": "_purpur-icon--sm_8u1lq_12",
|
|
256
|
+
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
257
|
+
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
258
|
+
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
259
|
+
}, At = qt.bind(Pt), lr = "purpur-icon", zt = "md", Mt = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Ct = ({ content: t = "", title: u } = {}) => {
|
|
260
|
+
const n = [
|
|
261
|
+
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
262
|
+
{ name: "fill", value: "currentColor" },
|
|
263
|
+
{ name: "viewBox", value: "0 0 24 24" },
|
|
264
|
+
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
265
|
+
], i = u ? `<title>${u}</title>` : "";
|
|
266
|
+
return `<svg ${Mt(n)}>${i}${t}</svg>`;
|
|
267
|
+
}, Rt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), K = ({
|
|
268
|
+
["data-testid"]: t,
|
|
269
|
+
svg: u,
|
|
270
|
+
allyTitle: n,
|
|
271
|
+
className: i,
|
|
272
|
+
size: p = zt,
|
|
273
|
+
...r
|
|
274
|
+
}) => {
|
|
275
|
+
const e = Ct({
|
|
276
|
+
content: Rt(u.svg),
|
|
277
|
+
title: n
|
|
278
|
+
}), a = At(i, lr, `${lr}--${p}`);
|
|
279
|
+
return /* @__PURE__ */ o(
|
|
280
|
+
"span",
|
|
281
|
+
{
|
|
282
|
+
"aria-label": n,
|
|
283
|
+
className: a,
|
|
284
|
+
"data-testid": t,
|
|
285
|
+
dangerouslySetInnerHTML: { __html: e },
|
|
286
|
+
...r
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
};
|
|
290
|
+
K.displayName = "Icon";
|
|
291
|
+
const Et = {
|
|
292
|
+
name: "password-invisible",
|
|
293
|
+
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.364 2.364a.9.9 0 0 1 1.272 0l3.809 3.808a11.61 11.61 0 0 1 2.218-.789A9.944 9.944 0 0 1 12 5.1c2.652 0 5 1.103 6.826 2.42 1.827 1.317 3.2 2.897 3.923 3.98l.333.5-.333.5c-.647.969-1.81 2.33-3.349 3.547a.9.9 0 0 1-1.116-1.413A15.273 15.273 0 0 0 20.894 12a15.297 15.297 0 0 0-3.12-3.02C16.134 7.797 14.148 6.9 12 6.9c-.655 0-1.295.083-1.914.233-.435.105-.86.242-1.274.407l.418.417a4.9 4.9 0 0 1 7.632 4.654.9.9 0 1 1-1.786-.222 3.1 3.1 0 0 0-4.538-3.123l11.098 11.098a.9.9 0 1 1-1.272 1.272l-3.809-3.808c-1.362.642-2.9 1.072-4.555 1.072-2.651 0-5-1.103-6.826-2.42-1.827-1.317-3.2-2.897-3.923-3.98L.918 12l.333-.5c.645-.966 1.804-2.322 3.335-3.536a.9.9 0 1 1 1.118 1.411A15.266 15.266 0 0 0 3.107 12a15.294 15.294 0 0 0 3.12 3.02C7.866 16.203 9.85 17.1 12 17.1c1.114 0 2.185-.24 3.188-.64l-.418-.418A4.9 4.9 0 0 1 7.1 12a8.888 8.888 0 0 1-.007-.225 2.488 2.488 0 0 1 .014-.385.9.9 0 1 1 1.786.222.79.79 0 0 0-.001.11A6.245 6.245 0 0 1 8.9 12a3.1 3.1 0 0 0 4.562 2.734L8.586 9.859a.912.912 0 0 1-.102-.102l-6.12-6.12a.9.9 0 0 1 0-1.273Z" clip-rule="evenodd"/></svg>',
|
|
294
|
+
keywords: ["password-invisible"],
|
|
295
|
+
category: "action"
|
|
296
|
+
}, Zr = (t) => /* @__PURE__ */ o(K, { ...t, svg: Et });
|
|
297
|
+
Zr.displayName = "IconPasswordInvisible";
|
|
298
|
+
const Dt = {
|
|
299
|
+
name: "password-visible",
|
|
300
|
+
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.107 12a15.294 15.294 0 0 0 3.12 3.02C7.866 16.203 9.85 17.1 12 17.1c2.149 0 4.134-.897 5.774-2.08a15.295 15.295 0 0 0 3.12-3.02 15.3 15.3 0 0 0-3.12-3.02C16.134 7.797 14.148 6.9 12 6.9c-2.149 0-4.134.897-5.774 2.08A15.299 15.299 0 0 0 3.106 12Zm2.067-4.48C7 6.203 9.349 5.1 12 5.1c2.652 0 5 1.103 6.826 2.42 1.827 1.317 3.2 2.897 3.923 3.98l.333.5-.333.5c-.722 1.083-2.096 2.663-3.923 3.98C17 17.797 14.651 18.9 12 18.9s-5-1.103-6.826-2.42c-1.827-1.317-3.2-2.897-3.923-3.98L.918 12l.333-.5c.722-1.083 2.096-2.663 3.923-3.98ZM12 8.9a3.1 3.1 0 1 0 0 6.2 3.1 3.1 0 0 0 0-6.2ZM7.1 12a4.9 4.9 0 1 1 9.8 0 4.9 4.9 0 0 1-9.8 0Zm4-1.538a.9.9 0 0 1 .9-.9A2.438 2.438 0 0 1 14.438 12a.9.9 0 0 1-1.8 0 .638.638 0 0 0-.638-.638.9.9 0 0 1-.9-.9Z" clip-rule="evenodd"/></svg>',
|
|
301
|
+
keywords: ["password-visible"],
|
|
302
|
+
category: "action"
|
|
303
|
+
}, Gr = (t) => /* @__PURE__ */ o(K, { ...t, svg: Dt });
|
|
304
|
+
Gr.displayName = "IconPasswordVisible";
|
|
305
|
+
const kt = {
|
|
306
|
+
LG: "lg"
|
|
307
|
+
};
|
|
308
|
+
function Bt(t) {
|
|
309
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
310
|
+
}
|
|
311
|
+
var cr = { exports: {} };
|
|
312
|
+
/*!
|
|
313
|
+
Copyright (c) 2018 Jed Watson.
|
|
314
|
+
Licensed under the MIT License (MIT), see
|
|
315
|
+
http://jedwatson.github.io/classnames
|
|
316
|
+
*/
|
|
317
|
+
var dr;
|
|
318
|
+
function It() {
|
|
319
|
+
return dr || (dr = 1, function(t) {
|
|
320
|
+
(function() {
|
|
321
|
+
var u = {}.hasOwnProperty;
|
|
322
|
+
function n() {
|
|
323
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
324
|
+
var a = arguments[e];
|
|
325
|
+
a && (r = p(r, i(a)));
|
|
326
|
+
}
|
|
327
|
+
return r;
|
|
328
|
+
}
|
|
329
|
+
function i(r) {
|
|
330
|
+
if (typeof r == "string" || typeof r == "number")
|
|
331
|
+
return r;
|
|
332
|
+
if (typeof r != "object")
|
|
333
|
+
return "";
|
|
334
|
+
if (Array.isArray(r))
|
|
335
|
+
return n.apply(null, r);
|
|
336
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
337
|
+
return r.toString();
|
|
338
|
+
var e = "";
|
|
339
|
+
for (var a in r)
|
|
340
|
+
u.call(r, a) && r[a] && (e = p(e, a));
|
|
341
|
+
return e;
|
|
342
|
+
}
|
|
343
|
+
function p(r, e) {
|
|
344
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
345
|
+
}
|
|
346
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
347
|
+
})();
|
|
348
|
+
}(cr)), cr.exports;
|
|
349
|
+
}
|
|
350
|
+
var Tt = It();
|
|
351
|
+
const _r = /* @__PURE__ */ Bt(Tt), Lt = "_rotate_1xozj_1", Wt = "_dash_1xozj_1", z = {
|
|
352
|
+
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
353
|
+
rotate: Lt,
|
|
354
|
+
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
355
|
+
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
356
|
+
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
357
|
+
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
358
|
+
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
359
|
+
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
360
|
+
dash: Wt,
|
|
361
|
+
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
362
|
+
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
363
|
+
}, M = "purpur-spinner", Ft = {
|
|
364
|
+
SM: "sm"
|
|
365
|
+
}, Zt = ({
|
|
366
|
+
["data-testid"]: t,
|
|
367
|
+
disabled: u = !1,
|
|
368
|
+
negative: n = !1,
|
|
369
|
+
size: i = Ft.SM,
|
|
370
|
+
...p
|
|
371
|
+
}) => /* @__PURE__ */ o(
|
|
372
|
+
"div",
|
|
373
|
+
{
|
|
374
|
+
className: _r([z[M], z[`${M}--${i}`]]),
|
|
375
|
+
"data-testid": t,
|
|
376
|
+
...p,
|
|
377
|
+
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
378
|
+
"circle",
|
|
379
|
+
{
|
|
380
|
+
className: _r(z[`${M}__circle`], {
|
|
381
|
+
[z[`${M}__circle--disabled`]]: u,
|
|
382
|
+
[z[`${M}__circle--negative`]]: n
|
|
383
|
+
}),
|
|
384
|
+
cx: "25",
|
|
385
|
+
cy: "25",
|
|
386
|
+
r: "20"
|
|
387
|
+
}
|
|
388
|
+
) })
|
|
389
|
+
}
|
|
390
|
+
);
|
|
391
|
+
function Gt(t) {
|
|
392
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
393
|
+
}
|
|
394
|
+
var fr = { exports: {} };
|
|
395
|
+
/*!
|
|
396
|
+
Copyright (c) 2018 Jed Watson.
|
|
397
|
+
Licensed under the MIT License (MIT), see
|
|
398
|
+
http://jedwatson.github.io/classnames
|
|
399
|
+
*/
|
|
400
|
+
var gr;
|
|
401
|
+
function Vt() {
|
|
402
|
+
return gr || (gr = 1, function(t) {
|
|
403
|
+
(function() {
|
|
404
|
+
var u = {}.hasOwnProperty;
|
|
405
|
+
function n() {
|
|
406
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
407
|
+
var a = arguments[e];
|
|
408
|
+
a && (r = p(r, i.call(this, a)));
|
|
409
|
+
}
|
|
410
|
+
return r;
|
|
411
|
+
}
|
|
412
|
+
function i(r) {
|
|
413
|
+
if (typeof r == "string" || typeof r == "number")
|
|
414
|
+
return this && this[r] || r;
|
|
415
|
+
if (typeof r != "object")
|
|
416
|
+
return "";
|
|
417
|
+
if (Array.isArray(r))
|
|
418
|
+
return n.apply(this, r);
|
|
419
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
420
|
+
return r.toString();
|
|
421
|
+
var e = "";
|
|
422
|
+
for (var a in r)
|
|
423
|
+
u.call(r, a) && r[a] && (e = p(e, this && this[a] || a));
|
|
424
|
+
return e;
|
|
425
|
+
}
|
|
426
|
+
function p(r, e) {
|
|
427
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
428
|
+
}
|
|
429
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
430
|
+
})();
|
|
431
|
+
}(fr)), fr.exports;
|
|
432
|
+
}
|
|
433
|
+
var Ht = Vt();
|
|
434
|
+
const Ut = /* @__PURE__ */ Gt(Ht), Xt = {
|
|
435
|
+
"purpur-button": "_purpur-button_w455q_1",
|
|
436
|
+
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
437
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
438
|
+
"purpur-button--sm": "_purpur-button--sm_w455q_39",
|
|
439
|
+
"purpur-button--md": "_purpur-button--md_w455q_45",
|
|
440
|
+
"purpur-button--lg": "_purpur-button--lg_w455q_51",
|
|
441
|
+
"purpur-button--full-width": "_purpur-button--full-width_w455q_57",
|
|
442
|
+
"purpur-button--primary": "_purpur-button--primary_w455q_60",
|
|
443
|
+
"purpur-button--disabled": "_purpur-button--disabled_w455q_64",
|
|
444
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_w455q_70",
|
|
445
|
+
"purpur-button--secondary": "_purpur-button--secondary_w455q_82",
|
|
446
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_w455q_93",
|
|
447
|
+
"purpur-button--expressive": "_purpur-button--expressive_w455q_104",
|
|
448
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_w455q_114",
|
|
449
|
+
"purpur-button--negative": "_purpur-button--negative_w455q_126",
|
|
450
|
+
"purpur-button--destructive": "_purpur-button--destructive_w455q_133",
|
|
451
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_w455q_143",
|
|
452
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_w455q_153",
|
|
453
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
454
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
455
|
+
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
456
|
+
}, Kt = Ut.bind(Xt), N = "purpur-button", Yt = ({
|
|
457
|
+
children: t,
|
|
458
|
+
className: u,
|
|
459
|
+
["data-testid"]: n,
|
|
460
|
+
disabled: i = !1,
|
|
461
|
+
fullWidth: p = !1,
|
|
462
|
+
iconOnly: r,
|
|
463
|
+
loading: e = !1,
|
|
464
|
+
negative: a = !1,
|
|
465
|
+
onClick: l,
|
|
466
|
+
size: d = "md",
|
|
467
|
+
variant: c,
|
|
468
|
+
type: _ = "button",
|
|
469
|
+
...v
|
|
470
|
+
}, s) => {
|
|
471
|
+
if (r && c === "destructive")
|
|
472
|
+
return null;
|
|
473
|
+
const h = Kt(
|
|
474
|
+
[
|
|
475
|
+
N,
|
|
476
|
+
`${N}--${a ? `${c}-negative` : c}`,
|
|
477
|
+
`${N}--${d}`
|
|
478
|
+
],
|
|
479
|
+
{
|
|
480
|
+
[`${N}--icon-only`]: r,
|
|
481
|
+
[`${N}--negative`]: a,
|
|
482
|
+
[`${N}--full-width`]: p,
|
|
483
|
+
[`${N}--disabled`]: i || e
|
|
484
|
+
},
|
|
485
|
+
u
|
|
486
|
+
), $ = (y) => {
|
|
487
|
+
i || e ? y.preventDefault() : l && l(y);
|
|
488
|
+
}, S = !!v["aria-disabled"] || i || e;
|
|
489
|
+
return /* @__PURE__ */ b(
|
|
490
|
+
"button",
|
|
491
|
+
{
|
|
492
|
+
className: h,
|
|
493
|
+
"data-testid": n,
|
|
494
|
+
type: _,
|
|
495
|
+
ref: s,
|
|
496
|
+
"aria-disabled": S,
|
|
497
|
+
onClick: $,
|
|
498
|
+
...v,
|
|
499
|
+
children: [
|
|
500
|
+
e && /* @__PURE__ */ o(Zt, { size: d === kt.LG ? "xs" : "xxs", negative: a, disabled: S }),
|
|
501
|
+
" ",
|
|
502
|
+
t
|
|
503
|
+
]
|
|
504
|
+
}
|
|
505
|
+
);
|
|
506
|
+
}, Vr = q(Yt);
|
|
507
|
+
Vr.displayName = "Button";
|
|
508
|
+
function Jt(t) {
|
|
509
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
510
|
+
}
|
|
511
|
+
var vr = { exports: {} };
|
|
512
|
+
/*!
|
|
513
|
+
Copyright (c) 2018 Jed Watson.
|
|
514
|
+
Licensed under the MIT License (MIT), see
|
|
515
|
+
http://jedwatson.github.io/classnames
|
|
516
|
+
*/
|
|
517
|
+
var hr;
|
|
518
|
+
function Qt() {
|
|
519
|
+
return hr || (hr = 1, function(t) {
|
|
520
|
+
(function() {
|
|
521
|
+
var u = {}.hasOwnProperty;
|
|
522
|
+
function n() {
|
|
523
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
524
|
+
var a = arguments[e];
|
|
525
|
+
a && (r = p(r, i.call(this, a)));
|
|
526
|
+
}
|
|
527
|
+
return r;
|
|
528
|
+
}
|
|
529
|
+
function i(r) {
|
|
530
|
+
if (typeof r == "string" || typeof r == "number")
|
|
531
|
+
return this && this[r] || r;
|
|
532
|
+
if (typeof r != "object")
|
|
533
|
+
return "";
|
|
534
|
+
if (Array.isArray(r))
|
|
535
|
+
return n.apply(this, r);
|
|
536
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
537
|
+
return r.toString();
|
|
538
|
+
var e = "";
|
|
539
|
+
for (var a in r)
|
|
540
|
+
u.call(r, a) && r[a] && (e = p(e, this && this[a] || a));
|
|
541
|
+
return e;
|
|
542
|
+
}
|
|
543
|
+
function p(r, e) {
|
|
544
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
545
|
+
}
|
|
546
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
547
|
+
})();
|
|
548
|
+
}(vr)), vr.exports;
|
|
549
|
+
}
|
|
550
|
+
var re = Qt();
|
|
551
|
+
const te = /* @__PURE__ */ Jt(re), ee = {
|
|
552
|
+
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
553
|
+
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
554
|
+
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
555
|
+
"purpur-icon--sm": "_purpur-icon--sm_8u1lq_12",
|
|
556
|
+
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
557
|
+
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
558
|
+
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
559
|
+
}, ne = te.bind(ee), mr = "purpur-icon", ae = "md", ue = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), ie = ({ content: t = "", title: u } = {}) => {
|
|
560
|
+
const n = [
|
|
561
|
+
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
562
|
+
{ name: "fill", value: "currentColor" },
|
|
563
|
+
{ name: "viewBox", value: "0 0 24 24" },
|
|
564
|
+
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
565
|
+
], i = u ? `<title>${u}</title>` : "";
|
|
566
|
+
return `<svg ${ue(n)}>${i}${t}</svg>`;
|
|
567
|
+
}, pe = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Hr = ({
|
|
568
|
+
["data-testid"]: t,
|
|
569
|
+
svg: u,
|
|
570
|
+
allyTitle: n,
|
|
571
|
+
className: i,
|
|
572
|
+
size: p = ae,
|
|
573
|
+
...r
|
|
574
|
+
}) => {
|
|
575
|
+
const e = ie({
|
|
576
|
+
content: pe(u.svg),
|
|
577
|
+
title: n
|
|
578
|
+
}), a = ne(i, mr, `${mr}--${p}`);
|
|
579
|
+
return /* @__PURE__ */ o(
|
|
580
|
+
"span",
|
|
581
|
+
{
|
|
582
|
+
"aria-label": n,
|
|
583
|
+
className: a,
|
|
584
|
+
"data-testid": t,
|
|
585
|
+
dangerouslySetInnerHTML: { __html: e },
|
|
586
|
+
...r
|
|
587
|
+
}
|
|
588
|
+
);
|
|
589
|
+
};
|
|
590
|
+
Hr.displayName = "Icon";
|
|
591
|
+
const oe = {
|
|
592
|
+
name: "error-filled",
|
|
593
|
+
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>',
|
|
594
|
+
keywords: ["error-filled"],
|
|
595
|
+
category: "status"
|
|
596
|
+
};
|
|
597
|
+
function se(t) {
|
|
598
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
599
|
+
}
|
|
600
|
+
var br = { exports: {} };
|
|
601
|
+
/*!
|
|
602
|
+
Copyright (c) 2018 Jed Watson.
|
|
603
|
+
Licensed under the MIT License (MIT), see
|
|
604
|
+
http://jedwatson.github.io/classnames
|
|
605
|
+
*/
|
|
606
|
+
var yr;
|
|
607
|
+
function le() {
|
|
608
|
+
return yr || (yr = 1, function(t) {
|
|
609
|
+
(function() {
|
|
610
|
+
var u = {}.hasOwnProperty;
|
|
611
|
+
function n() {
|
|
612
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
613
|
+
var a = arguments[e];
|
|
614
|
+
a && (r = p(r, i(a)));
|
|
615
|
+
}
|
|
616
|
+
return r;
|
|
617
|
+
}
|
|
618
|
+
function i(r) {
|
|
619
|
+
if (typeof r == "string" || typeof r == "number")
|
|
620
|
+
return r;
|
|
621
|
+
if (typeof r != "object")
|
|
622
|
+
return "";
|
|
623
|
+
if (Array.isArray(r))
|
|
624
|
+
return n.apply(null, r);
|
|
625
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
626
|
+
return r.toString();
|
|
627
|
+
var e = "";
|
|
628
|
+
for (var a in r)
|
|
629
|
+
u.call(r, a) && r[a] && (e = p(e, a));
|
|
630
|
+
return e;
|
|
631
|
+
}
|
|
632
|
+
function p(r, e) {
|
|
633
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
634
|
+
}
|
|
635
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
636
|
+
})();
|
|
637
|
+
}(br)), br.exports;
|
|
638
|
+
}
|
|
639
|
+
var ce = le();
|
|
640
|
+
const de = /* @__PURE__ */ se(ce), xr = {
|
|
641
|
+
"purpur-field-error-text": "_purpur-field-error-text_1lj7e_1",
|
|
642
|
+
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_1lj7e_11"
|
|
643
|
+
}, wr = "purpur-field-error-text", _e = ({
|
|
644
|
+
["data-testid"]: t,
|
|
645
|
+
children: u,
|
|
646
|
+
className: n,
|
|
647
|
+
relevant: i = "additions text",
|
|
648
|
+
...p
|
|
649
|
+
}) => /* @__PURE__ */ b(
|
|
650
|
+
"div",
|
|
651
|
+
{
|
|
652
|
+
className: de([n, xr[wr]]),
|
|
653
|
+
"data-testid": t,
|
|
654
|
+
"aria-live": "assertive",
|
|
655
|
+
"aria-relevant": i,
|
|
656
|
+
...p,
|
|
657
|
+
children: [
|
|
658
|
+
/* @__PURE__ */ o(Hr, { svg: oe, size: "xs", className: xr[`${wr}__icon`] }),
|
|
659
|
+
u
|
|
660
|
+
]
|
|
661
|
+
}
|
|
662
|
+
);
|
|
663
|
+
function fe(t) {
|
|
664
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
665
|
+
}
|
|
666
|
+
var $r = { exports: {} };
|
|
667
|
+
/*!
|
|
668
|
+
Copyright (c) 2018 Jed Watson.
|
|
669
|
+
Licensed under the MIT License (MIT), see
|
|
670
|
+
http://jedwatson.github.io/classnames
|
|
671
|
+
*/
|
|
672
|
+
var Sr;
|
|
673
|
+
function ge() {
|
|
674
|
+
return Sr || (Sr = 1, function(t) {
|
|
675
|
+
(function() {
|
|
676
|
+
var u = {}.hasOwnProperty;
|
|
677
|
+
function n() {
|
|
678
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
679
|
+
var a = arguments[e];
|
|
680
|
+
a && (r = p(r, i(a)));
|
|
681
|
+
}
|
|
682
|
+
return r;
|
|
683
|
+
}
|
|
684
|
+
function i(r) {
|
|
685
|
+
if (typeof r == "string" || typeof r == "number")
|
|
686
|
+
return r;
|
|
687
|
+
if (typeof r != "object")
|
|
688
|
+
return "";
|
|
689
|
+
if (Array.isArray(r))
|
|
690
|
+
return n.apply(null, r);
|
|
691
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
692
|
+
return r.toString();
|
|
693
|
+
var e = "";
|
|
694
|
+
for (var a in r)
|
|
695
|
+
u.call(r, a) && r[a] && (e = p(e, a));
|
|
696
|
+
return e;
|
|
697
|
+
}
|
|
698
|
+
function p(r, e) {
|
|
699
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
700
|
+
}
|
|
701
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
702
|
+
})();
|
|
703
|
+
}($r)), $r.exports;
|
|
704
|
+
}
|
|
705
|
+
var ve = ge();
|
|
706
|
+
const he = /* @__PURE__ */ fe(ve), jr = {
|
|
707
|
+
"purpur-field-helper-text": "_purpur-field-helper-text_atw6b_1",
|
|
708
|
+
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_atw6b_9"
|
|
709
|
+
}, Nr = "purpur-field-helper-text", me = ({
|
|
710
|
+
["data-testid"]: t,
|
|
711
|
+
children: u,
|
|
712
|
+
className: n,
|
|
713
|
+
disabled: i,
|
|
714
|
+
id: p,
|
|
715
|
+
...r
|
|
716
|
+
}) => {
|
|
717
|
+
const e = he([
|
|
718
|
+
n,
|
|
719
|
+
jr[Nr],
|
|
720
|
+
{
|
|
721
|
+
[jr[`${Nr}--disabled`]]: i
|
|
722
|
+
}
|
|
723
|
+
]);
|
|
724
|
+
return /* @__PURE__ */ o("span", { id: p, className: e, "data-testid": t, ...r, children: u });
|
|
725
|
+
};
|
|
726
|
+
function be(t) {
|
|
727
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
728
|
+
}
|
|
729
|
+
var Or = { exports: {} };
|
|
730
|
+
/*!
|
|
731
|
+
Copyright (c) 2018 Jed Watson.
|
|
732
|
+
Licensed under the MIT License (MIT), see
|
|
733
|
+
http://jedwatson.github.io/classnames
|
|
734
|
+
*/
|
|
735
|
+
var qr;
|
|
736
|
+
function ye() {
|
|
737
|
+
return qr || (qr = 1, function(t) {
|
|
738
|
+
(function() {
|
|
739
|
+
var u = {}.hasOwnProperty;
|
|
740
|
+
function n() {
|
|
741
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
742
|
+
var a = arguments[e];
|
|
743
|
+
a && (r = p(r, i.call(this, a)));
|
|
744
|
+
}
|
|
745
|
+
return r;
|
|
746
|
+
}
|
|
747
|
+
function i(r) {
|
|
748
|
+
if (typeof r == "string" || typeof r == "number")
|
|
749
|
+
return this && this[r] || r;
|
|
750
|
+
if (typeof r != "object")
|
|
751
|
+
return "";
|
|
752
|
+
if (Array.isArray(r))
|
|
753
|
+
return n.apply(this, r);
|
|
754
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
755
|
+
return r.toString();
|
|
756
|
+
var e = "";
|
|
757
|
+
for (var a in r)
|
|
758
|
+
u.call(r, a) && r[a] && (e = p(e, this && this[a] || a));
|
|
759
|
+
return e;
|
|
760
|
+
}
|
|
761
|
+
function p(r, e) {
|
|
762
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
763
|
+
}
|
|
764
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
765
|
+
})();
|
|
766
|
+
}(Or)), Or.exports;
|
|
767
|
+
}
|
|
768
|
+
var xe = ye();
|
|
769
|
+
const we = /* @__PURE__ */ be(xe), $e = {
|
|
770
|
+
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
771
|
+
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
772
|
+
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
773
|
+
"purpur-icon--sm": "_purpur-icon--sm_8u1lq_12",
|
|
774
|
+
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
775
|
+
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
776
|
+
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
777
|
+
}, Se = we.bind($e), Pr = "purpur-icon", je = "md", Ne = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Oe = ({ content: t = "", title: u } = {}) => {
|
|
778
|
+
const n = [
|
|
779
|
+
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
780
|
+
{ name: "fill", value: "currentColor" },
|
|
781
|
+
{ name: "viewBox", value: "0 0 24 24" },
|
|
782
|
+
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
783
|
+
], i = u ? `<title>${u}</title>` : "";
|
|
784
|
+
return `<svg ${Ne(n)}>${i}${t}</svg>`;
|
|
785
|
+
}, qe = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Y = ({
|
|
786
|
+
["data-testid"]: t,
|
|
787
|
+
svg: u,
|
|
788
|
+
allyTitle: n,
|
|
789
|
+
className: i,
|
|
790
|
+
size: p = je,
|
|
791
|
+
...r
|
|
792
|
+
}) => {
|
|
793
|
+
const e = Oe({
|
|
794
|
+
content: qe(u.svg),
|
|
795
|
+
title: n
|
|
796
|
+
}), a = Se(i, Pr, `${Pr}--${p}`);
|
|
797
|
+
return /* @__PURE__ */ o(
|
|
798
|
+
"span",
|
|
799
|
+
{
|
|
800
|
+
"aria-label": n,
|
|
801
|
+
className: a,
|
|
802
|
+
"data-testid": t,
|
|
803
|
+
dangerouslySetInnerHTML: { __html: e },
|
|
804
|
+
...r
|
|
805
|
+
}
|
|
806
|
+
);
|
|
807
|
+
};
|
|
808
|
+
Y.displayName = "Icon";
|
|
809
|
+
const Pe = {
|
|
810
|
+
name: "check-circle-filled",
|
|
811
|
+
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>',
|
|
812
|
+
keywords: ["check-circle-filled"],
|
|
813
|
+
category: "status"
|
|
814
|
+
}, Ur = (t) => /* @__PURE__ */ o(Y, { ...t, svg: Pe });
|
|
815
|
+
Ur.displayName = "IconCheckCircleFilled";
|
|
816
|
+
const Ae = {
|
|
817
|
+
name: "close",
|
|
818
|
+
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>',
|
|
819
|
+
keywords: ["close"],
|
|
820
|
+
category: "utility"
|
|
821
|
+
}, Xr = (t) => /* @__PURE__ */ o(Y, { ...t, svg: Ae });
|
|
822
|
+
Xr.displayName = "IconClose";
|
|
823
|
+
function Ar(t, u) {
|
|
824
|
+
if (typeof t == "function")
|
|
825
|
+
return t(u);
|
|
826
|
+
t != null && (t.current = u);
|
|
827
|
+
}
|
|
828
|
+
function ze(...t) {
|
|
829
|
+
return (u) => {
|
|
830
|
+
let n = !1;
|
|
831
|
+
const i = t.map((p) => {
|
|
832
|
+
const r = Ar(p, u);
|
|
833
|
+
return !n && typeof r == "function" && (n = !0), r;
|
|
834
|
+
});
|
|
835
|
+
if (n)
|
|
836
|
+
return () => {
|
|
837
|
+
for (let p = 0; p < i.length; p++) {
|
|
838
|
+
const r = i[p];
|
|
839
|
+
typeof r == "function" ? r() : Ar(t[p], null);
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
var Kr = g.forwardRef((t, u) => {
|
|
845
|
+
const { children: n, ...i } = t, p = g.Children.toArray(n), r = p.find(Ce);
|
|
846
|
+
if (r) {
|
|
847
|
+
const e = r.props.children, a = p.map((l) => l === r ? g.Children.count(e) > 1 ? g.Children.only(null) : g.isValidElement(e) ? e.props.children : null : l);
|
|
848
|
+
return /* @__PURE__ */ o(X, { ...i, ref: u, children: g.isValidElement(e) ? g.cloneElement(e, void 0, a) : null });
|
|
849
|
+
}
|
|
850
|
+
return /* @__PURE__ */ o(X, { ...i, ref: u, children: n });
|
|
851
|
+
});
|
|
852
|
+
Kr.displayName = "Slot";
|
|
853
|
+
var X = g.forwardRef((t, u) => {
|
|
854
|
+
const { children: n, ...i } = t;
|
|
855
|
+
if (g.isValidElement(n)) {
|
|
856
|
+
const p = Ee(n), r = Re(i, n.props);
|
|
857
|
+
return n.type !== g.Fragment && (r.ref = u ? ze(u, p) : p), g.cloneElement(n, r);
|
|
858
|
+
}
|
|
859
|
+
return g.Children.count(n) > 1 ? g.Children.only(null) : null;
|
|
860
|
+
});
|
|
861
|
+
X.displayName = "SlotClone";
|
|
862
|
+
var Me = ({ children: t }) => /* @__PURE__ */ o(at, { children: t });
|
|
863
|
+
function Ce(t) {
|
|
864
|
+
return g.isValidElement(t) && t.type === Me;
|
|
865
|
+
}
|
|
866
|
+
function Re(t, u) {
|
|
867
|
+
const n = { ...u };
|
|
868
|
+
for (const i in u) {
|
|
869
|
+
const p = t[i], r = u[i];
|
|
870
|
+
/^on[A-Z]/.test(i) ? p && r ? n[i] = (...e) => {
|
|
871
|
+
r(...e), p(...e);
|
|
872
|
+
} : p && (n[i] = p) : i === "style" ? n[i] = { ...p, ...r } : i === "className" && (n[i] = [p, r].filter(Boolean).join(" "));
|
|
873
|
+
}
|
|
874
|
+
return { ...t, ...n };
|
|
875
|
+
}
|
|
876
|
+
function Ee(t) {
|
|
877
|
+
var u, n;
|
|
878
|
+
let i = (u = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : u.get, p = i && "isReactWarning" in i && i.isReactWarning;
|
|
879
|
+
return p ? t.ref : (i = (n = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : n.get, p = i && "isReactWarning" in i && i.isReactWarning, p ? t.props.ref : t.props.ref || t.ref);
|
|
880
|
+
}
|
|
881
|
+
var De = [
|
|
882
|
+
"a",
|
|
883
|
+
"button",
|
|
884
|
+
"div",
|
|
885
|
+
"form",
|
|
886
|
+
"h2",
|
|
887
|
+
"h3",
|
|
888
|
+
"img",
|
|
889
|
+
"input",
|
|
890
|
+
"label",
|
|
891
|
+
"li",
|
|
892
|
+
"nav",
|
|
893
|
+
"ol",
|
|
894
|
+
"p",
|
|
895
|
+
"span",
|
|
896
|
+
"svg",
|
|
897
|
+
"ul"
|
|
898
|
+
], ke = De.reduce((t, u) => {
|
|
899
|
+
const n = g.forwardRef((i, p) => {
|
|
900
|
+
const { asChild: r, ...e } = i, a = r ? Kr : u;
|
|
901
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(a, { ...e, ref: p });
|
|
902
|
+
});
|
|
903
|
+
return n.displayName = `Primitive.${u}`, { ...t, [u]: n };
|
|
904
|
+
}, {}), Be = "Label", Yr = g.forwardRef((t, u) => /* @__PURE__ */ o(
|
|
905
|
+
ke.label,
|
|
906
|
+
{
|
|
907
|
+
...t,
|
|
908
|
+
ref: u,
|
|
909
|
+
onMouseDown: (n) => {
|
|
910
|
+
var i;
|
|
911
|
+
n.target.closest("button, input, select, textarea") || ((i = t.onMouseDown) == null || i.call(t, n), !n.defaultPrevented && n.detail > 1 && n.preventDefault());
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
));
|
|
915
|
+
Yr.displayName = Be;
|
|
916
|
+
var Ie = Yr;
|
|
917
|
+
function Te(t) {
|
|
918
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
919
|
+
}
|
|
920
|
+
var zr = { exports: {} };
|
|
921
|
+
/*!
|
|
922
|
+
Copyright (c) 2018 Jed Watson.
|
|
923
|
+
Licensed under the MIT License (MIT), see
|
|
924
|
+
http://jedwatson.github.io/classnames
|
|
925
|
+
*/
|
|
926
|
+
var Mr;
|
|
927
|
+
function Le() {
|
|
928
|
+
return Mr || (Mr = 1, function(t) {
|
|
929
|
+
(function() {
|
|
930
|
+
var u = {}.hasOwnProperty;
|
|
931
|
+
function n() {
|
|
932
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
933
|
+
var a = arguments[e];
|
|
934
|
+
a && (r = p(r, i(a)));
|
|
935
|
+
}
|
|
936
|
+
return r;
|
|
937
|
+
}
|
|
938
|
+
function i(r) {
|
|
939
|
+
if (typeof r == "string" || typeof r == "number")
|
|
940
|
+
return r;
|
|
941
|
+
if (typeof r != "object")
|
|
942
|
+
return "";
|
|
943
|
+
if (Array.isArray(r))
|
|
944
|
+
return n.apply(null, r);
|
|
945
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
946
|
+
return r.toString();
|
|
947
|
+
var e = "";
|
|
948
|
+
for (var a in r)
|
|
949
|
+
u.call(r, a) && r[a] && (e = p(e, a));
|
|
950
|
+
return e;
|
|
951
|
+
}
|
|
952
|
+
function p(r, e) {
|
|
953
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
954
|
+
}
|
|
955
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
956
|
+
})();
|
|
957
|
+
}(zr)), zr.exports;
|
|
958
|
+
}
|
|
959
|
+
var We = Le();
|
|
960
|
+
const Fe = /* @__PURE__ */ Te(We), G = {
|
|
961
|
+
"purpur-label": "_purpur-label_1jndl_1",
|
|
962
|
+
"purpur-label--negative": "_purpur-label--negative_1jndl_8",
|
|
963
|
+
"purpur-label--disabled": "_purpur-label--disabled_1jndl_11"
|
|
964
|
+
}, V = "purpur-label", Ze = ({
|
|
965
|
+
children: t,
|
|
966
|
+
className: u,
|
|
967
|
+
htmlFor: n,
|
|
968
|
+
"data-testid": i,
|
|
969
|
+
disabled: p,
|
|
970
|
+
negative: r = !1,
|
|
971
|
+
...e
|
|
972
|
+
}) => {
|
|
973
|
+
const a = Fe([
|
|
974
|
+
u,
|
|
975
|
+
G[V],
|
|
976
|
+
{
|
|
977
|
+
[G[`${V}--disabled`]]: p,
|
|
978
|
+
[G[`${V}--negative`]]: r
|
|
979
|
+
}
|
|
980
|
+
]);
|
|
981
|
+
return /* @__PURE__ */ o(Ie, { className: a, "data-testid": i, htmlFor: n, ...e, children: t });
|
|
982
|
+
};
|
|
983
|
+
function Ge(t) {
|
|
984
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
985
|
+
}
|
|
986
|
+
var Cr = { exports: {} };
|
|
987
|
+
/*!
|
|
988
|
+
Copyright (c) 2018 Jed Watson.
|
|
989
|
+
Licensed under the MIT License (MIT), see
|
|
990
|
+
http://jedwatson.github.io/classnames
|
|
991
|
+
*/
|
|
992
|
+
var Rr;
|
|
993
|
+
function Ve() {
|
|
994
|
+
return Rr || (Rr = 1, function(t) {
|
|
995
|
+
(function() {
|
|
996
|
+
var u = {}.hasOwnProperty;
|
|
997
|
+
function n() {
|
|
998
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
999
|
+
var a = arguments[e];
|
|
1000
|
+
a && (r = p(r, i(a)));
|
|
1001
|
+
}
|
|
1002
|
+
return r;
|
|
1003
|
+
}
|
|
1004
|
+
function i(r) {
|
|
1005
|
+
if (typeof r == "string" || typeof r == "number")
|
|
1006
|
+
return r;
|
|
1007
|
+
if (typeof r != "object")
|
|
1008
|
+
return "";
|
|
1009
|
+
if (Array.isArray(r))
|
|
1010
|
+
return n.apply(null, r);
|
|
1011
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
1012
|
+
return r.toString();
|
|
1013
|
+
var e = "";
|
|
1014
|
+
for (var a in r)
|
|
1015
|
+
u.call(r, a) && r[a] && (e = p(e, a));
|
|
1016
|
+
return e;
|
|
1017
|
+
}
|
|
1018
|
+
function p(r, e) {
|
|
1019
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
1020
|
+
}
|
|
1021
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1022
|
+
})();
|
|
1023
|
+
}(Cr)), Cr.exports;
|
|
1024
|
+
}
|
|
1025
|
+
var He = Ve();
|
|
1026
|
+
const Er = /* @__PURE__ */ Ge(He), Ue = "_rotate_1xozj_1", Xe = "_dash_1xozj_1", C = {
|
|
1027
|
+
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
1028
|
+
rotate: Ue,
|
|
1029
|
+
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
1030
|
+
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
1031
|
+
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
1032
|
+
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
1033
|
+
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
1034
|
+
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
1035
|
+
dash: Xe,
|
|
1036
|
+
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
1037
|
+
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
1038
|
+
}, R = "purpur-spinner", Ke = {
|
|
1039
|
+
SM: "sm"
|
|
1040
|
+
}, Ye = ({
|
|
1041
|
+
["data-testid"]: t,
|
|
1042
|
+
disabled: u = !1,
|
|
1043
|
+
negative: n = !1,
|
|
1044
|
+
size: i = Ke.SM,
|
|
1045
|
+
...p
|
|
1046
|
+
}) => /* @__PURE__ */ o(
|
|
1047
|
+
"div",
|
|
1048
|
+
{
|
|
1049
|
+
className: Er([C[R], C[`${R}--${i}`]]),
|
|
1050
|
+
"data-testid": t,
|
|
1051
|
+
...p,
|
|
1052
|
+
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
1053
|
+
"circle",
|
|
1054
|
+
{
|
|
1055
|
+
className: Er(C[`${R}__circle`], {
|
|
1056
|
+
[C[`${R}__circle--disabled`]]: u,
|
|
1057
|
+
[C[`${R}__circle--negative`]]: n
|
|
1058
|
+
}),
|
|
1059
|
+
cx: "25",
|
|
1060
|
+
cy: "25",
|
|
1061
|
+
r: "20"
|
|
1062
|
+
}
|
|
1063
|
+
) })
|
|
1064
|
+
}
|
|
1065
|
+
);
|
|
1066
|
+
function Je(t) {
|
|
1067
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1068
|
+
}
|
|
1069
|
+
var Dr = { exports: {} };
|
|
1070
|
+
/*!
|
|
1071
|
+
Copyright (c) 2018 Jed Watson.
|
|
1072
|
+
Licensed under the MIT License (MIT), see
|
|
1073
|
+
http://jedwatson.github.io/classnames
|
|
1074
|
+
*/
|
|
1075
|
+
var kr;
|
|
1076
|
+
function Qe() {
|
|
1077
|
+
return kr || (kr = 1, function(t) {
|
|
1078
|
+
(function() {
|
|
1079
|
+
var u = {}.hasOwnProperty;
|
|
1080
|
+
function n() {
|
|
1081
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
1082
|
+
var a = arguments[e];
|
|
1083
|
+
a && (r = p(r, i.call(this, a)));
|
|
1084
|
+
}
|
|
1085
|
+
return r;
|
|
1086
|
+
}
|
|
1087
|
+
function i(r) {
|
|
1088
|
+
if (typeof r == "string" || typeof r == "number")
|
|
1089
|
+
return this && this[r] || r;
|
|
1090
|
+
if (typeof r != "object")
|
|
1091
|
+
return "";
|
|
1092
|
+
if (Array.isArray(r))
|
|
1093
|
+
return n.apply(this, r);
|
|
1094
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
1095
|
+
return r.toString();
|
|
1096
|
+
var e = "";
|
|
1097
|
+
for (var a in r)
|
|
1098
|
+
u.call(r, a) && r[a] && (e = p(e, this && this[a] || a));
|
|
1099
|
+
return e;
|
|
1100
|
+
}
|
|
1101
|
+
function p(r, e) {
|
|
1102
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
1103
|
+
}
|
|
1104
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1105
|
+
})();
|
|
1106
|
+
}(Dr)), Dr.exports;
|
|
1107
|
+
}
|
|
1108
|
+
var rn = Qe();
|
|
1109
|
+
const tn = /* @__PURE__ */ Je(rn), en = {
|
|
1110
|
+
"purpur-text-field": "_purpur-text-field_nj9f4_1",
|
|
1111
|
+
"purpur-text-field__label": "_purpur-text-field__label_nj9f4_7",
|
|
1112
|
+
"purpur-text-field__label-text": "_purpur-text-field__label-text_nj9f4_13",
|
|
1113
|
+
"purpur-text-field__field-row": "_purpur-text-field__field-row_nj9f4_16",
|
|
1114
|
+
"purpur-text-field__frame": "_purpur-text-field__frame_nj9f4_20",
|
|
1115
|
+
"purpur-text-field__input-container": "_purpur-text-field__input-container_nj9f4_27",
|
|
1116
|
+
"purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--disabled_nj9f4_38",
|
|
1117
|
+
"purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--readonly_nj9f4_41",
|
|
1118
|
+
"purpur-text-field__input-container--has-clear-button": "_purpur-text-field__input-container--has-clear-button_nj9f4_44",
|
|
1119
|
+
"purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-adornment_nj9f4_47",
|
|
1120
|
+
"purpur-text-field__input": "_purpur-text-field__input_nj9f4_27",
|
|
1121
|
+
"purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-adornment_nj9f4_53",
|
|
1122
|
+
"purpur-text-field__input--valid": "_purpur-text-field__input--valid_nj9f4_94",
|
|
1123
|
+
"purpur-text-field__input--error": "_purpur-text-field__input--error_nj9f4_94",
|
|
1124
|
+
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_nj9f4_106",
|
|
1125
|
+
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_nj9f4_111"
|
|
1126
|
+
}, nn = (t) => it(t), w = tn.bind(en), f = "purpur-text-field", an = ({
|
|
1127
|
+
["data-testid"]: t,
|
|
1128
|
+
className: u,
|
|
1129
|
+
clearButtonAllyLabel: n,
|
|
1130
|
+
beforeField: i,
|
|
1131
|
+
afterField: p,
|
|
1132
|
+
endAdornment: r,
|
|
1133
|
+
errorText: e,
|
|
1134
|
+
helperText: a,
|
|
1135
|
+
label: l,
|
|
1136
|
+
loading: d = !1,
|
|
1137
|
+
onClear: c,
|
|
1138
|
+
startAdornment: _,
|
|
1139
|
+
valid: v = !1,
|
|
1140
|
+
...s
|
|
1141
|
+
}, h) => {
|
|
1142
|
+
var $;
|
|
1143
|
+
const S = ut(), y = s.id ?? S, x = (m) => t ? `${t}-${m}` : void 0, rr = v && !e, W = a ? `${y}-helper-text` : void 0, F = [_].filter((m) => !!m), tr = (typeof s.value == "number" ? s.value !== void 0 : ($ = s.value) == null ? void 0 : $.length) && !s.disabled && !s.readOnly && !d && c && n, er = nn(null), tt = (m) => {
|
|
1144
|
+
er.current = m, typeof h == "function" ? h(m) : h && (h.current = m);
|
|
1145
|
+
}, et = () => {
|
|
1146
|
+
var m;
|
|
1147
|
+
c == null || c(), (m = er.current) == null || m.focus();
|
|
1148
|
+
}, Z = [
|
|
1149
|
+
d && /* @__PURE__ */ o(
|
|
1150
|
+
Ye,
|
|
1151
|
+
{
|
|
1152
|
+
disabled: s.disabled,
|
|
1153
|
+
size: "xs",
|
|
1154
|
+
"data-testid": x("spinner")
|
|
1155
|
+
},
|
|
1156
|
+
"spinner"
|
|
1157
|
+
),
|
|
1158
|
+
tr && /* @__PURE__ */ o(
|
|
1159
|
+
Vr,
|
|
1160
|
+
{
|
|
1161
|
+
variant: "tertiary-purple",
|
|
1162
|
+
onClick: et,
|
|
1163
|
+
iconOnly: !0,
|
|
1164
|
+
"aria-label": n ?? "",
|
|
1165
|
+
"data-testid": x("clear-button"),
|
|
1166
|
+
tabIndex: -1,
|
|
1167
|
+
children: /* @__PURE__ */ o(Xr, { size: "xs" })
|
|
1168
|
+
},
|
|
1169
|
+
"clear-button"
|
|
1170
|
+
),
|
|
1171
|
+
rr && /* @__PURE__ */ o(
|
|
1172
|
+
Ur,
|
|
1173
|
+
{
|
|
1174
|
+
"data-testid": x("valid-icon"),
|
|
1175
|
+
className: w(`${f}__valid-icon`)
|
|
1176
|
+
},
|
|
1177
|
+
"valid-icon"
|
|
1178
|
+
)
|
|
1179
|
+
].filter((m) => !!m), nt = w([
|
|
1180
|
+
`${f}__input-container`,
|
|
1181
|
+
{
|
|
1182
|
+
[`${f}__input-container--start-adornment`]: F.length,
|
|
1183
|
+
[`${f}__input-container--end-adornment`]: Z.length || r,
|
|
1184
|
+
[`${f}__input-container--disabled`]: s.disabled,
|
|
1185
|
+
[`${f}__input-container--has-clear-button`]: tr,
|
|
1186
|
+
[`${f}__input-container--readonly`]: s.readOnly && !s.disabled
|
|
1187
|
+
}
|
|
1188
|
+
]);
|
|
1189
|
+
return /* @__PURE__ */ b("div", { className: w(u, f), children: [
|
|
1190
|
+
l && /* @__PURE__ */ o(
|
|
1191
|
+
Ze,
|
|
1192
|
+
{
|
|
1193
|
+
htmlFor: y,
|
|
1194
|
+
className: w(`${f}__label`),
|
|
1195
|
+
"data-testid": x("label"),
|
|
1196
|
+
disabled: s.disabled,
|
|
1197
|
+
children: `${s.required ? "* " : ""}${l}`
|
|
1198
|
+
}
|
|
1199
|
+
),
|
|
1200
|
+
/* @__PURE__ */ b("div", { className: w(`${f}__field-row`), children: [
|
|
1201
|
+
!!i && i,
|
|
1202
|
+
/* @__PURE__ */ b("div", { className: nt, children: [
|
|
1203
|
+
!!F.length && /* @__PURE__ */ o(
|
|
1204
|
+
"div",
|
|
1205
|
+
{
|
|
1206
|
+
"data-testid": x("start-adornments"),
|
|
1207
|
+
className: w(`${f}__adornment-container`),
|
|
1208
|
+
children: F
|
|
1209
|
+
}
|
|
1210
|
+
),
|
|
1211
|
+
/* @__PURE__ */ o(
|
|
1212
|
+
"input",
|
|
1213
|
+
{
|
|
1214
|
+
...s,
|
|
1215
|
+
id: y,
|
|
1216
|
+
ref: tt,
|
|
1217
|
+
"data-testid": x("input"),
|
|
1218
|
+
"aria-describedby": s["aria-describedby"] || W,
|
|
1219
|
+
"aria-invalid": s["aria-invalid"] || !!e,
|
|
1220
|
+
className: w([
|
|
1221
|
+
`${f}__input`,
|
|
1222
|
+
{
|
|
1223
|
+
[`${f}__input--valid`]: rr,
|
|
1224
|
+
[`${f}__input--error`]: !!e
|
|
1225
|
+
}
|
|
1226
|
+
])
|
|
1227
|
+
}
|
|
1228
|
+
),
|
|
1229
|
+
/* @__PURE__ */ o("div", { className: w(`${f}__frame`) }),
|
|
1230
|
+
(!!Z.length || r) && /* @__PURE__ */ b(
|
|
1231
|
+
"div",
|
|
1232
|
+
{
|
|
1233
|
+
"data-testid": x("end-adornments"),
|
|
1234
|
+
className: w(`${f}__adornment-container`),
|
|
1235
|
+
children: [
|
|
1236
|
+
Z,
|
|
1237
|
+
r
|
|
1238
|
+
]
|
|
1239
|
+
}
|
|
1240
|
+
)
|
|
1241
|
+
] }),
|
|
1242
|
+
!!p && p
|
|
1243
|
+
] }),
|
|
1244
|
+
W && /* @__PURE__ */ o(me, { "data-testid": x("helper-text"), id: W, children: a }),
|
|
1245
|
+
e && /* @__PURE__ */ o(_e, { "data-testid": x("error-text"), children: e })
|
|
1246
|
+
] });
|
|
1247
|
+
}, Jr = q(an);
|
|
1248
|
+
Jr.displayName = "TextField";
|
|
1249
|
+
function un(t) {
|
|
1250
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1251
|
+
}
|
|
1252
|
+
var H = { exports: {} };
|
|
1253
|
+
/*!
|
|
1254
|
+
Copyright (c) 2018 Jed Watson.
|
|
1255
|
+
Licensed under the MIT License (MIT), see
|
|
1256
|
+
http://jedwatson.github.io/classnames
|
|
1257
|
+
*/
|
|
1258
|
+
var Br;
|
|
1259
|
+
function pn() {
|
|
1260
|
+
return Br || (Br = 1, function(t) {
|
|
1261
|
+
(function() {
|
|
1262
|
+
var u = {}.hasOwnProperty;
|
|
1263
|
+
function n() {
|
|
1264
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
1265
|
+
var a = arguments[e];
|
|
1266
|
+
a && (r = p(r, i.call(this, a)));
|
|
1267
|
+
}
|
|
1268
|
+
return r;
|
|
1269
|
+
}
|
|
1270
|
+
function i(r) {
|
|
1271
|
+
if (typeof r == "string" || typeof r == "number")
|
|
1272
|
+
return this && this[r] || r;
|
|
1273
|
+
if (typeof r != "object")
|
|
1274
|
+
return "";
|
|
1275
|
+
if (Array.isArray(r))
|
|
1276
|
+
return n.apply(this, r);
|
|
1277
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
1278
|
+
return r.toString();
|
|
1279
|
+
var e = "";
|
|
1280
|
+
for (var a in r)
|
|
1281
|
+
u.call(r, a) && r[a] && (e = p(e, this && this[a] || a));
|
|
1282
|
+
return e;
|
|
1283
|
+
}
|
|
1284
|
+
function p(r, e) {
|
|
1285
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
1286
|
+
}
|
|
1287
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1288
|
+
})();
|
|
1289
|
+
}(H)), H.exports;
|
|
1290
|
+
}
|
|
1291
|
+
var on = pn();
|
|
1292
|
+
const J = /* @__PURE__ */ un(on), E = {
|
|
1293
|
+
WEAK: "weak",
|
|
1294
|
+
MEDIUM: "medium",
|
|
1295
|
+
STRONG: "strong"
|
|
1296
|
+
}, O = {
|
|
1297
|
+
PASSWORD: "password",
|
|
1298
|
+
TEXT: "text"
|
|
1299
|
+
}, sn = {
|
|
1300
|
+
"purpur-password-field": "_purpur-password-field_co7kv_1"
|
|
1301
|
+
};
|
|
1302
|
+
function ln(t) {
|
|
1303
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1304
|
+
}
|
|
1305
|
+
var Ir = { exports: {} };
|
|
1306
|
+
/*!
|
|
1307
|
+
Copyright (c) 2018 Jed Watson.
|
|
1308
|
+
Licensed under the MIT License (MIT), see
|
|
1309
|
+
http://jedwatson.github.io/classnames
|
|
1310
|
+
*/
|
|
1311
|
+
var Tr;
|
|
1312
|
+
function cn() {
|
|
1313
|
+
return Tr || (Tr = 1, function(t) {
|
|
1314
|
+
(function() {
|
|
1315
|
+
var u = {}.hasOwnProperty;
|
|
1316
|
+
function n() {
|
|
1317
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
|
1318
|
+
var a = arguments[e];
|
|
1319
|
+
a && (r = p(r, i(a)));
|
|
1320
|
+
}
|
|
1321
|
+
return r;
|
|
1322
|
+
}
|
|
1323
|
+
function i(r) {
|
|
1324
|
+
if (typeof r == "string" || typeof r == "number")
|
|
1325
|
+
return r;
|
|
1326
|
+
if (typeof r != "object")
|
|
1327
|
+
return "";
|
|
1328
|
+
if (Array.isArray(r))
|
|
1329
|
+
return n.apply(null, r);
|
|
1330
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
1331
|
+
return r.toString();
|
|
1332
|
+
var e = "";
|
|
1333
|
+
for (var a in r)
|
|
1334
|
+
u.call(r, a) && r[a] && (e = p(e, a));
|
|
1335
|
+
return e;
|
|
1336
|
+
}
|
|
1337
|
+
function p(r, e) {
|
|
1338
|
+
return e ? r ? r + " " + e : r + e : r;
|
|
1339
|
+
}
|
|
1340
|
+
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1341
|
+
})();
|
|
1342
|
+
}(Ir)), Ir.exports;
|
|
1343
|
+
}
|
|
1344
|
+
var dn = cn();
|
|
1345
|
+
const _n = /* @__PURE__ */ ln(dn), D = {
|
|
1346
|
+
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
1347
|
+
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
1348
|
+
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
1349
|
+
"purpur-paragraph--negative": "_purpur-paragraph--negative_1rh57_13",
|
|
1350
|
+
"purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_1rh57_16",
|
|
1351
|
+
"purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_1rh57_22",
|
|
1352
|
+
"purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_1rh57_29",
|
|
1353
|
+
"purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_1rh57_36",
|
|
1354
|
+
"purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_1rh57_42",
|
|
1355
|
+
"purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_1rh57_48",
|
|
1356
|
+
"purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_1rh57_54",
|
|
1357
|
+
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
1358
|
+
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
1359
|
+
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
1360
|
+
}, fn = {
|
|
1361
|
+
PARAGRAPH100: "paragraph-100"
|
|
1362
|
+
}, k = "purpur-paragraph", Qr = ({
|
|
1363
|
+
["data-testid"]: t,
|
|
1364
|
+
children: u,
|
|
1365
|
+
className: n,
|
|
1366
|
+
disabled: i,
|
|
1367
|
+
enableHyphenation: p = !1,
|
|
1368
|
+
negative: r = !1,
|
|
1369
|
+
variant: e = fn.PARAGRAPH100,
|
|
1370
|
+
...a
|
|
1371
|
+
}) => {
|
|
1372
|
+
const l = _n([
|
|
1373
|
+
n,
|
|
1374
|
+
D[k],
|
|
1375
|
+
D[`${k}--${e}`],
|
|
1376
|
+
{
|
|
1377
|
+
[D[`${k}--hyphens`]]: p,
|
|
1378
|
+
[D[`${k}--disabled`]]: i,
|
|
1379
|
+
[D[`${k}--negative`]]: r
|
|
1380
|
+
}
|
|
1381
|
+
]);
|
|
1382
|
+
return /* @__PURE__ */ o("p", { ...a, className: l, "data-testid": t, children: u });
|
|
1383
|
+
};
|
|
1384
|
+
Qr.displayName = "Paragraph";
|
|
1385
|
+
const gn = {
|
|
1386
|
+
"purpur-password-strength": "_purpur-password-strength_sa1ua_1",
|
|
1387
|
+
"purpur-password-strength__indicator-container": "_purpur-password-strength__indicator-container_sa1ua_6",
|
|
1388
|
+
"purpur-password-strength__password-strength-text--weak": "_purpur-password-strength__password-strength-text--weak_sa1ua_10",
|
|
1389
|
+
"purpur-password-strength__password-strength-text--medium": "_purpur-password-strength__password-strength-text--medium_sa1ua_13",
|
|
1390
|
+
"purpur-password-strength__password-strength-text--strong": "_purpur-password-strength__password-strength-text--strong_sa1ua_16",
|
|
1391
|
+
"purpur-password-strength__password-strength-label": "_purpur-password-strength__password-strength-label_sa1ua_19"
|
|
1392
|
+
}, vn = {
|
|
1393
|
+
"purpur-password-strength-indicator": "_purpur-password-strength-indicator_1o6zr_1",
|
|
1394
|
+
"purpur-password-strength-indicator--active": "_purpur-password-strength-indicator--active_1o6zr_7",
|
|
1395
|
+
"purpur-password-strength-indicator--weak": "_purpur-password-strength-indicator--weak_1o6zr_7",
|
|
1396
|
+
"purpur-password-strength-indicator--medium": "_purpur-password-strength-indicator--medium_1o6zr_10",
|
|
1397
|
+
"purpur-password-strength-indicator--strong": "_purpur-password-strength-indicator--strong_1o6zr_13"
|
|
1398
|
+
}, hn = J.bind(vn), U = "purpur-password-strength-indicator", L = q(
|
|
1399
|
+
({
|
|
1400
|
+
["data-testid"]: t = "password-strength-indicator",
|
|
1401
|
+
active: u,
|
|
1402
|
+
className: n,
|
|
1403
|
+
passwordStrength: i
|
|
1404
|
+
}, p) => {
|
|
1405
|
+
const r = hn([
|
|
1406
|
+
n,
|
|
1407
|
+
U,
|
|
1408
|
+
{ [`${U}--${i}`]: i },
|
|
1409
|
+
{ [`${U}--active`]: u }
|
|
1410
|
+
]);
|
|
1411
|
+
return /* @__PURE__ */ o("div", { "data-testid": t, className: r, ref: p });
|
|
1412
|
+
}
|
|
1413
|
+
);
|
|
1414
|
+
L.displayName = "PasswordStrengthIndicator";
|
|
1415
|
+
const mn = (t, u, n, i) => {
|
|
1416
|
+
const [p, r] = T(0), [e, a] = T(), [l, d] = T(void 0), c = pt(
|
|
1417
|
+
() => ({
|
|
1418
|
+
0: [E.WEAK, u],
|
|
1419
|
+
1: [E.WEAK, u],
|
|
1420
|
+
2: [E.MEDIUM, n],
|
|
1421
|
+
3: [E.STRONG, i],
|
|
1422
|
+
4: [E.STRONG, i]
|
|
1423
|
+
}),
|
|
1424
|
+
[u, n, i]
|
|
1425
|
+
);
|
|
1426
|
+
return ot(() => {
|
|
1427
|
+
(async () => {
|
|
1428
|
+
if (!t)
|
|
1429
|
+
r(0), a(void 0), d(void 0);
|
|
1430
|
+
else {
|
|
1431
|
+
const { default: _ } = await import("./main-B6vgbdqW.mjs").then(($) => $.m), { score: v } = _(t), [s, h] = c[v];
|
|
1432
|
+
r(v), a(s), d(h);
|
|
1433
|
+
}
|
|
1434
|
+
})();
|
|
1435
|
+
}, [t, c]), {
|
|
1436
|
+
score: p,
|
|
1437
|
+
passwordStrength: e,
|
|
1438
|
+
currentPasswordStrengthText: l
|
|
1439
|
+
};
|
|
1440
|
+
}, I = J.bind(gn), B = "purpur-password-strength", Q = q(
|
|
1441
|
+
({
|
|
1442
|
+
["data-testid"]: t = "password-strength",
|
|
1443
|
+
className: u,
|
|
1444
|
+
value: n,
|
|
1445
|
+
label: i,
|
|
1446
|
+
weakText: p,
|
|
1447
|
+
mediumText: r,
|
|
1448
|
+
strongText: e,
|
|
1449
|
+
...a
|
|
1450
|
+
}, l) => {
|
|
1451
|
+
const d = I([u, B]), { score: c, passwordStrength: _, currentPasswordStrengthText: v } = mn(
|
|
1452
|
+
n,
|
|
1453
|
+
p,
|
|
1454
|
+
r,
|
|
1455
|
+
e
|
|
1456
|
+
);
|
|
1457
|
+
return /* @__PURE__ */ b("div", { "data-testid": t, className: d, ref: l, ...a, children: [
|
|
1458
|
+
/* @__PURE__ */ b("div", { className: I(`${B}__indicator-container`), children: [
|
|
1459
|
+
/* @__PURE__ */ o(
|
|
1460
|
+
L,
|
|
1461
|
+
{
|
|
1462
|
+
active: !!_,
|
|
1463
|
+
passwordStrength: _
|
|
1464
|
+
}
|
|
1465
|
+
),
|
|
1466
|
+
/* @__PURE__ */ o(
|
|
1467
|
+
L,
|
|
1468
|
+
{
|
|
1469
|
+
active: !!_ && c > 1,
|
|
1470
|
+
passwordStrength: _
|
|
1471
|
+
}
|
|
1472
|
+
),
|
|
1473
|
+
/* @__PURE__ */ o(
|
|
1474
|
+
L,
|
|
1475
|
+
{
|
|
1476
|
+
active: !!_ && c > 2,
|
|
1477
|
+
passwordStrength: _
|
|
1478
|
+
}
|
|
1479
|
+
)
|
|
1480
|
+
] }),
|
|
1481
|
+
/* @__PURE__ */ b(
|
|
1482
|
+
Qr,
|
|
1483
|
+
{
|
|
1484
|
+
"aria-live": "polite",
|
|
1485
|
+
"data-testid": `${t}-text`,
|
|
1486
|
+
className: I([
|
|
1487
|
+
`${B}__password-strength-text`,
|
|
1488
|
+
{ [`${B}__password-strength-text--${_}`]: _ }
|
|
1489
|
+
]),
|
|
1490
|
+
children: [
|
|
1491
|
+
/* @__PURE__ */ b("span", { className: I(`${B}__password-strength-label`), children: [
|
|
1492
|
+
i,
|
|
1493
|
+
v ? ": " : ""
|
|
1494
|
+
] }),
|
|
1495
|
+
v
|
|
1496
|
+
]
|
|
1497
|
+
}
|
|
1498
|
+
)
|
|
1499
|
+
] });
|
|
1500
|
+
}
|
|
1501
|
+
);
|
|
1502
|
+
Q.displayName = "PasswordStrength";
|
|
1503
|
+
const Lr = J.bind(sn), Wr = "purpur-password-field", rt = q(
|
|
1504
|
+
({
|
|
1505
|
+
["data-testid"]: t = "password-field",
|
|
1506
|
+
children: u,
|
|
1507
|
+
className: n,
|
|
1508
|
+
hidePasswordAllyLabel: i,
|
|
1509
|
+
onChange: p,
|
|
1510
|
+
showPasswordAllyLabel: r,
|
|
1511
|
+
...e
|
|
1512
|
+
}, a) => {
|
|
1513
|
+
const l = Lr([n, Wr]), [d, c] = T(O.PASSWORD), _ = async (h) => {
|
|
1514
|
+
p == null || p(h);
|
|
1515
|
+
}, v = () => {
|
|
1516
|
+
c(d === O.PASSWORD ? O.TEXT : O.PASSWORD);
|
|
1517
|
+
}, s = d === O.PASSWORD ? Gr : Zr;
|
|
1518
|
+
return /* @__PURE__ */ b("div", { className: l, children: [
|
|
1519
|
+
/* @__PURE__ */ o(
|
|
1520
|
+
Jr,
|
|
1521
|
+
{
|
|
1522
|
+
className: Lr(`${Wr}__text-field`),
|
|
1523
|
+
"data-testid": t,
|
|
1524
|
+
onChange: _,
|
|
1525
|
+
ref: a,
|
|
1526
|
+
type: d,
|
|
1527
|
+
endAdornment: (
|
|
1528
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
1529
|
+
/* @__PURE__ */ o(
|
|
1530
|
+
Fr,
|
|
1531
|
+
{
|
|
1532
|
+
"aria-label": d === O.PASSWORD ? r : i,
|
|
1533
|
+
"data-testid": `${t}-type-toggle-button`,
|
|
1534
|
+
onClick: v,
|
|
1535
|
+
size: "sm",
|
|
1536
|
+
variant: "tertiary-purple",
|
|
1537
|
+
iconOnly: !0,
|
|
1538
|
+
children: /* @__PURE__ */ o(s, { size: "sm" })
|
|
1539
|
+
}
|
|
1540
|
+
)
|
|
1541
|
+
),
|
|
1542
|
+
...e
|
|
1543
|
+
}
|
|
1544
|
+
),
|
|
1545
|
+
u
|
|
1546
|
+
] });
|
|
1547
|
+
}
|
|
1548
|
+
);
|
|
1549
|
+
rt.PasswordStrength = Q;
|
|
1550
|
+
rt.displayName = "PasswordField";
|
|
1551
|
+
const wn = (t) => st(t) && (t == null ? void 0 : t.type) === Q;
|
|
1552
|
+
export {
|
|
1553
|
+
rt as P,
|
|
1554
|
+
un as g,
|
|
1555
|
+
wn as i
|
|
1556
|
+
};
|
|
1557
|
+
//# sourceMappingURL=password-field-BwuKVABM.mjs.map
|