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