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