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