@starasia/dropdown 1.0.2 → 1.0.3
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/dropdown.es.js +307 -365
- package/dist/dropdown.umd.js +10 -20
- package/package.json +5 -1
package/dist/dropdown.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import or, { useState as
|
|
2
|
-
var wr = { exports: {} },
|
|
1
|
+
import or, { useState as G, useRef as X, useEffect as B, forwardRef as gn } from "react";
|
|
2
|
+
var wr = { exports: {} }, H = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -12,22 +12,22 @@ var wr = { exports: {} }, G = {};
|
|
|
12
12
|
var zr;
|
|
13
13
|
function bn() {
|
|
14
14
|
if (zr)
|
|
15
|
-
return
|
|
15
|
+
return H;
|
|
16
16
|
zr = 1;
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
for (
|
|
22
|
-
|
|
23
|
-
if (
|
|
24
|
-
for (
|
|
25
|
-
|
|
26
|
-
return { $$typeof: p, type:
|
|
17
|
+
var c = or, p = Symbol.for("react.element"), x = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, u = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function O(m, f, F) {
|
|
19
|
+
var y, T = {}, A = null, D = null;
|
|
20
|
+
F !== void 0 && (A = "" + F), f.key !== void 0 && (A = "" + f.key), f.ref !== void 0 && (D = f.ref);
|
|
21
|
+
for (y in f)
|
|
22
|
+
b.call(f, y) && !v.hasOwnProperty(y) && (T[y] = f[y]);
|
|
23
|
+
if (m && m.defaultProps)
|
|
24
|
+
for (y in f = m.defaultProps, f)
|
|
25
|
+
T[y] === void 0 && (T[y] = f[y]);
|
|
26
|
+
return { $$typeof: p, type: m, key: A, ref: D, props: T, _owner: u.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return H.Fragment = x, H.jsx = O, H.jsxs = O, H;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var K = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -40,88 +40,88 @@ var X = {};
|
|
|
40
40
|
var Nr;
|
|
41
41
|
function xn() {
|
|
42
42
|
return Nr || (Nr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var
|
|
44
|
-
function
|
|
43
|
+
var c = or, p = Symbol.for("react.element"), x = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), O = Symbol.for("react.provider"), m = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), I = Symbol.iterator, o = "@@iterator";
|
|
44
|
+
function $(r) {
|
|
45
45
|
if (r === null || typeof r != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var n =
|
|
47
|
+
var n = I && r[I] || r[o];
|
|
48
48
|
return typeof n == "function" ? n : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
50
|
+
var S = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function h(r) {
|
|
52
52
|
{
|
|
53
53
|
for (var n = arguments.length, e = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++)
|
|
54
54
|
e[a - 1] = arguments[a];
|
|
55
|
-
|
|
55
|
+
W("error", r, e);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function W(r, n, e) {
|
|
59
59
|
{
|
|
60
|
-
var a =
|
|
60
|
+
var a = S.ReactDebugCurrentFrame, d = a.getStackAddendum();
|
|
61
61
|
d !== "" && (n += "%s", e = e.concat([d]));
|
|
62
|
-
var
|
|
62
|
+
var l = e.map(function(s) {
|
|
63
63
|
return String(s);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
l.unshift("Warning: " + n), Function.prototype.apply.call(console[r], console, l);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var V = !1, U = !1, Z = !1, ir = !1, Q = !1, rr;
|
|
69
69
|
rr = Symbol.for("react.module.reference");
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof r == "string" || typeof r == "function" || r ===
|
|
70
|
+
function L(r) {
|
|
71
|
+
return !!(typeof r == "string" || typeof r == "function" || r === b || r === v || Q || r === u || r === F || r === y || ir || r === D || V || U || Z || typeof r == "object" && r !== null && (r.$$typeof === A || r.$$typeof === T || r.$$typeof === O || r.$$typeof === m || r.$$typeof === f || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
75
|
r.$$typeof === rr || r.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function R(r, n, e) {
|
|
78
78
|
var a = r.displayName;
|
|
79
79
|
if (a)
|
|
80
80
|
return a;
|
|
81
81
|
var d = n.displayName || n.name || "";
|
|
82
82
|
return d !== "" ? e + "(" + d + ")" : e;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function k(r) {
|
|
85
85
|
return r.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function j(r) {
|
|
88
88
|
if (r == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof r.tag == "number" &&
|
|
90
|
+
if (typeof r.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
91
91
|
return r.displayName || r.name || null;
|
|
92
92
|
if (typeof r == "string")
|
|
93
93
|
return r;
|
|
94
94
|
switch (r) {
|
|
95
|
-
case
|
|
95
|
+
case b:
|
|
96
96
|
return "Fragment";
|
|
97
97
|
case x:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case v:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case u:
|
|
102
102
|
return "StrictMode";
|
|
103
|
-
case
|
|
103
|
+
case F:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
105
|
+
case y:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof r == "object")
|
|
109
109
|
switch (r.$$typeof) {
|
|
110
|
-
case
|
|
110
|
+
case m:
|
|
111
111
|
var n = r;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
112
|
+
return k(n) + ".Consumer";
|
|
113
|
+
case O:
|
|
114
114
|
var e = r;
|
|
115
|
-
return
|
|
116
|
-
case
|
|
117
|
-
return
|
|
118
|
-
case
|
|
115
|
+
return k(e._context) + ".Provider";
|
|
116
|
+
case f:
|
|
117
|
+
return R(r, r.render, "ForwardRef");
|
|
118
|
+
case T:
|
|
119
119
|
var a = r.displayName || null;
|
|
120
|
-
return a !== null ? a :
|
|
121
|
-
case
|
|
122
|
-
var d = r,
|
|
120
|
+
return a !== null ? a : j(r.type) || "Memo";
|
|
121
|
+
case A: {
|
|
122
|
+
var d = r, l = d._payload, s = d._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return j(s(l));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,13 +129,13 @@ function xn() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
132
|
+
var E = Object.assign, z = 0, gr, br, xr, mr, yr, kr, Er;
|
|
133
133
|
function Rr() {
|
|
134
134
|
}
|
|
135
135
|
Rr.__reactDisabledLog = !0;
|
|
136
136
|
function Mr() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
138
|
+
if (z === 0) {
|
|
139
139
|
gr = console.log, br = console.info, xr = console.warn, mr = console.error, yr = console.group, kr = console.groupCollapsed, Er = console.groupEnd;
|
|
140
140
|
var r = {
|
|
141
141
|
configurable: !0,
|
|
@@ -153,45 +153,45 @@ function xn() {
|
|
|
153
153
|
groupEnd: r
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
z++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
function Vr() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (z--, z === 0) {
|
|
162
162
|
var r = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
168
|
+
log: E({}, r, {
|
|
169
169
|
value: gr
|
|
170
170
|
}),
|
|
171
|
-
info:
|
|
171
|
+
info: E({}, r, {
|
|
172
172
|
value: br
|
|
173
173
|
}),
|
|
174
|
-
warn:
|
|
174
|
+
warn: E({}, r, {
|
|
175
175
|
value: xr
|
|
176
176
|
}),
|
|
177
|
-
error:
|
|
177
|
+
error: E({}, r, {
|
|
178
178
|
value: mr
|
|
179
179
|
}),
|
|
180
|
-
group:
|
|
180
|
+
group: E({}, r, {
|
|
181
181
|
value: yr
|
|
182
182
|
}),
|
|
183
|
-
groupCollapsed:
|
|
183
|
+
groupCollapsed: E({}, r, {
|
|
184
184
|
value: kr
|
|
185
185
|
}),
|
|
186
|
-
groupEnd:
|
|
186
|
+
groupEnd: E({}, r, {
|
|
187
187
|
value: Er
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
z < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var sr =
|
|
194
|
+
var sr = S.ReactCurrentDispatcher, dr;
|
|
195
195
|
function nr(r, n, e) {
|
|
196
196
|
{
|
|
197
197
|
if (dr === void 0)
|
|
@@ -222,8 +222,8 @@ function xn() {
|
|
|
222
222
|
lr = !0;
|
|
223
223
|
var d = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
|
-
var
|
|
226
|
-
|
|
225
|
+
var l;
|
|
226
|
+
l = sr.current, sr.current = null, Mr();
|
|
227
227
|
try {
|
|
228
228
|
if (n) {
|
|
229
229
|
var s = function() {
|
|
@@ -236,55 +236,55 @@ function xn() {
|
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
238
|
Reflect.construct(s, []);
|
|
239
|
-
} catch (
|
|
240
|
-
a =
|
|
239
|
+
} catch (C) {
|
|
240
|
+
a = C;
|
|
241
241
|
}
|
|
242
242
|
Reflect.construct(r, [], s);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
245
|
s.call();
|
|
246
|
-
} catch (
|
|
247
|
-
a =
|
|
246
|
+
} catch (C) {
|
|
247
|
+
a = C;
|
|
248
248
|
}
|
|
249
249
|
r.call(s.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
a =
|
|
254
|
+
} catch (C) {
|
|
255
|
+
a = C;
|
|
256
256
|
}
|
|
257
257
|
r();
|
|
258
258
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var i =
|
|
262
|
-
`),
|
|
263
|
-
`),
|
|
264
|
-
|
|
265
|
-
for (;
|
|
266
|
-
if (i[
|
|
267
|
-
if (
|
|
259
|
+
} catch (C) {
|
|
260
|
+
if (C && a && typeof C.stack == "string") {
|
|
261
|
+
for (var i = C.stack.split(`
|
|
262
|
+
`), _ = a.stack.split(`
|
|
263
|
+
`), w = i.length - 1, g = _.length - 1; w >= 1 && g >= 0 && i[w] !== _[g]; )
|
|
264
|
+
g--;
|
|
265
|
+
for (; w >= 1 && g >= 0; w--, g--)
|
|
266
|
+
if (i[w] !== _[g]) {
|
|
267
|
+
if (w !== 1 || g !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
270
|
-
var
|
|
271
|
-
` + i[
|
|
272
|
-
return r.displayName &&
|
|
269
|
+
if (w--, g--, g < 0 || i[w] !== _[g]) {
|
|
270
|
+
var P = `
|
|
271
|
+
` + i[w].replace(" at new ", " at ");
|
|
272
|
+
return r.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", r.displayName)), typeof r == "function" && er.set(r, P), P;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (w >= 1 && g >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
lr = !1, sr.current =
|
|
279
|
+
lr = !1, sr.current = l, Vr(), Error.prepareStackTrace = d;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof r == "function" && er.set(r,
|
|
281
|
+
var M = r ? r.displayName || r.name : "", N = M ? nr(M) : "";
|
|
282
|
+
return typeof r == "function" && er.set(r, N), N;
|
|
283
283
|
}
|
|
284
284
|
function qr(r, n, e) {
|
|
285
285
|
return _r(r, !1);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Jr(r) {
|
|
288
288
|
var n = r.prototype;
|
|
289
289
|
return !!(n && n.isReactComponent);
|
|
290
290
|
}
|
|
@@ -292,32 +292,32 @@ function xn() {
|
|
|
292
292
|
if (r == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof r == "function")
|
|
295
|
-
return _r(r,
|
|
295
|
+
return _r(r, Jr(r));
|
|
296
296
|
if (typeof r == "string")
|
|
297
297
|
return nr(r);
|
|
298
298
|
switch (r) {
|
|
299
|
-
case
|
|
299
|
+
case F:
|
|
300
300
|
return nr("Suspense");
|
|
301
|
-
case
|
|
301
|
+
case y:
|
|
302
302
|
return nr("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof r == "object")
|
|
305
305
|
switch (r.$$typeof) {
|
|
306
|
-
case
|
|
306
|
+
case f:
|
|
307
307
|
return qr(r.render);
|
|
308
|
-
case
|
|
308
|
+
case T:
|
|
309
309
|
return ar(r.type, n, e);
|
|
310
|
-
case
|
|
311
|
-
var a = r, d = a._payload,
|
|
310
|
+
case A: {
|
|
311
|
+
var a = r, d = a._payload, l = a._init;
|
|
312
312
|
try {
|
|
313
|
-
return ar(
|
|
313
|
+
return ar(l(d), n, e);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
320
|
+
var q = Object.prototype.hasOwnProperty, jr = {}, Cr = S.ReactDebugCurrentFrame;
|
|
321
321
|
function tr(r) {
|
|
322
322
|
if (r) {
|
|
323
323
|
var n = r._owner, e = ar(r.type, r._source, n ? n.type : null);
|
|
@@ -325,22 +325,22 @@ function xn() {
|
|
|
325
325
|
} else
|
|
326
326
|
Cr.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Hr(r, n, e, a, d) {
|
|
329
329
|
{
|
|
330
|
-
var
|
|
330
|
+
var l = Function.call.bind(q);
|
|
331
331
|
for (var s in r)
|
|
332
|
-
if (
|
|
332
|
+
if (l(r, s)) {
|
|
333
333
|
var i = void 0;
|
|
334
334
|
try {
|
|
335
335
|
if (typeof r[s] != "function") {
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
336
|
+
var _ = Error((a || "React class") + ": " + e + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw _.name = "Invariant Violation", _;
|
|
338
338
|
}
|
|
339
339
|
i = r[s](n, s, a, e, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
-
} catch (
|
|
341
|
-
i =
|
|
340
|
+
} catch (w) {
|
|
341
|
+
i = w;
|
|
342
342
|
}
|
|
343
|
-
i && !(i instanceof Error) && (tr(d),
|
|
343
|
+
i && !(i instanceof Error) && (tr(d), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", e, s, typeof i), tr(null)), i instanceof Error && !(i.message in jr) && (jr[i.message] = !0, tr(d), h("Failed %s type: %s", e, i.message), tr(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -356,19 +356,19 @@ function xn() {
|
|
|
356
356
|
}
|
|
357
357
|
function Xr(r) {
|
|
358
358
|
try {
|
|
359
|
-
return
|
|
359
|
+
return Or(r), !1;
|
|
360
360
|
} catch {
|
|
361
361
|
return !0;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Or(r) {
|
|
365
365
|
return "" + r;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Tr(r) {
|
|
368
368
|
if (Xr(r))
|
|
369
|
-
return
|
|
369
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Gr(r)), Or(r);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var J = S.ReactCurrentOwner, Zr = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
@@ -376,7 +376,7 @@ function xn() {
|
|
|
376
376
|
}, Sr, Pr, ur;
|
|
377
377
|
ur = {};
|
|
378
378
|
function Qr(r) {
|
|
379
|
-
if (
|
|
379
|
+
if (q.call(r, "ref")) {
|
|
380
380
|
var n = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
381
381
|
if (n && n.isReactWarning)
|
|
382
382
|
return !1;
|
|
@@ -384,7 +384,7 @@ function xn() {
|
|
|
384
384
|
return r.ref !== void 0;
|
|
385
385
|
}
|
|
386
386
|
function rn(r) {
|
|
387
|
-
if (
|
|
387
|
+
if (q.call(r, "key")) {
|
|
388
388
|
var n = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
389
389
|
if (n && n.isReactWarning)
|
|
390
390
|
return !1;
|
|
@@ -392,15 +392,15 @@ function xn() {
|
|
|
392
392
|
return r.key !== void 0;
|
|
393
393
|
}
|
|
394
394
|
function nn(r, n) {
|
|
395
|
-
if (typeof r.ref == "string" &&
|
|
396
|
-
var e =
|
|
397
|
-
ur[e] || (
|
|
395
|
+
if (typeof r.ref == "string" && J.current && n && J.current.stateNode !== n) {
|
|
396
|
+
var e = j(J.current.type);
|
|
397
|
+
ur[e] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', j(J.current.type), r.ref), ur[e] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
function en(r, n) {
|
|
401
401
|
{
|
|
402
402
|
var e = function() {
|
|
403
|
-
Sr || (Sr = !0,
|
|
403
|
+
Sr || (Sr = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
404
404
|
};
|
|
405
405
|
e.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
406
406
|
get: e,
|
|
@@ -411,7 +411,7 @@ function xn() {
|
|
|
411
411
|
function an(r, n) {
|
|
412
412
|
{
|
|
413
413
|
var e = function() {
|
|
414
|
-
Pr || (Pr = !0,
|
|
414
|
+
Pr || (Pr = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
415
415
|
};
|
|
416
416
|
e.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
417
417
|
get: e,
|
|
@@ -419,7 +419,7 @@ function xn() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var tn = function(r, n, e, a, d,
|
|
422
|
+
var tn = function(r, n, e, a, d, l, s) {
|
|
423
423
|
var i = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: p,
|
|
@@ -429,7 +429,7 @@ function xn() {
|
|
|
429
429
|
ref: e,
|
|
430
430
|
props: s,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
|
-
_owner:
|
|
432
|
+
_owner: l
|
|
433
433
|
};
|
|
434
434
|
return i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
@@ -450,24 +450,24 @@ function xn() {
|
|
|
450
450
|
};
|
|
451
451
|
function on(r, n, e, a, d) {
|
|
452
452
|
{
|
|
453
|
-
var
|
|
454
|
-
e !== void 0 && (
|
|
455
|
-
for (
|
|
456
|
-
|
|
453
|
+
var l, s = {}, i = null, _ = null;
|
|
454
|
+
e !== void 0 && (Tr(e), i = "" + e), rn(n) && (Tr(n.key), i = "" + n.key), Qr(n) && (_ = n.ref, nn(n, d));
|
|
455
|
+
for (l in n)
|
|
456
|
+
q.call(n, l) && !Zr.hasOwnProperty(l) && (s[l] = n[l]);
|
|
457
457
|
if (r && r.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (
|
|
460
|
-
s[
|
|
458
|
+
var w = r.defaultProps;
|
|
459
|
+
for (l in w)
|
|
460
|
+
s[l] === void 0 && (s[l] = w[l]);
|
|
461
461
|
}
|
|
462
|
-
if (i ||
|
|
463
|
-
var
|
|
464
|
-
i && en(s,
|
|
462
|
+
if (i || _) {
|
|
463
|
+
var g = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
464
|
+
i && en(s, g), _ && an(s, g);
|
|
465
465
|
}
|
|
466
|
-
return tn(r, i,
|
|
466
|
+
return tn(r, i, _, d, a, J.current, s);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
var pr =
|
|
470
|
-
function
|
|
469
|
+
var pr = S.ReactCurrentOwner, Ir = S.ReactDebugCurrentFrame;
|
|
470
|
+
function Y(r) {
|
|
471
471
|
if (r) {
|
|
472
472
|
var n = r._owner, e = ar(r.type, r._source, n ? n.type : null);
|
|
473
473
|
Ir.setExtraStackFrame(e);
|
|
@@ -479,10 +479,10 @@ function xn() {
|
|
|
479
479
|
function vr(r) {
|
|
480
480
|
return typeof r == "object" && r !== null && r.$$typeof === p;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Fr() {
|
|
483
483
|
{
|
|
484
484
|
if (pr.current) {
|
|
485
|
-
var r =
|
|
485
|
+
var r = j(pr.current.type);
|
|
486
486
|
if (r)
|
|
487
487
|
return `
|
|
488
488
|
|
|
@@ -502,10 +502,10 @@ Check your code at ` + n + ":" + e + ".";
|
|
|
502
502
|
return "";
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
var
|
|
505
|
+
var Ar = {};
|
|
506
506
|
function dn(r) {
|
|
507
507
|
{
|
|
508
|
-
var n =
|
|
508
|
+
var n = Fr();
|
|
509
509
|
if (!n) {
|
|
510
510
|
var e = typeof r == "string" ? r : r.displayName || r.name;
|
|
511
511
|
e && (n = `
|
|
@@ -515,35 +515,35 @@ Check the top-level render call using <` + e + ">.");
|
|
|
515
515
|
return n;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Dr(r, n) {
|
|
519
519
|
{
|
|
520
520
|
if (!r._store || r._store.validated || r.key != null)
|
|
521
521
|
return;
|
|
522
522
|
r._store.validated = !0;
|
|
523
523
|
var e = dn(n);
|
|
524
|
-
if (
|
|
524
|
+
if (Ar[e])
|
|
525
525
|
return;
|
|
526
|
-
|
|
526
|
+
Ar[e] = !0;
|
|
527
527
|
var a = "";
|
|
528
|
-
r && r._owner && r._owner !== pr.current && (a = " It was passed a child from " +
|
|
528
|
+
r && r._owner && r._owner !== pr.current && (a = " It was passed a child from " + j(r._owner.type) + "."), Y(r), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', e, a), Y(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function Wr(r, n) {
|
|
532
532
|
{
|
|
533
533
|
if (typeof r != "object")
|
|
534
534
|
return;
|
|
535
535
|
if (cr(r))
|
|
536
536
|
for (var e = 0; e < r.length; e++) {
|
|
537
537
|
var a = r[e];
|
|
538
|
-
vr(a) &&
|
|
538
|
+
vr(a) && Dr(a, n);
|
|
539
539
|
}
|
|
540
540
|
else if (vr(r))
|
|
541
541
|
r._store && (r._store.validated = !0);
|
|
542
542
|
else if (r) {
|
|
543
|
-
var d =
|
|
543
|
+
var d = $(r);
|
|
544
544
|
if (typeof d == "function" && d !== r.entries)
|
|
545
|
-
for (var
|
|
546
|
-
vr(s.value) &&
|
|
545
|
+
for (var l = d.call(r), s; !(s = l.next()).done; )
|
|
546
|
+
vr(s.value) && Dr(s.value, n);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
}
|
|
@@ -555,21 +555,21 @@ Check the top-level render call using <` + e + ">.");
|
|
|
555
555
|
var e;
|
|
556
556
|
if (typeof n == "function")
|
|
557
557
|
e = n.propTypes;
|
|
558
|
-
else if (typeof n == "object" && (n.$$typeof ===
|
|
558
|
+
else if (typeof n == "object" && (n.$$typeof === f || // Note: Memo only checks outer props here.
|
|
559
559
|
// Inner props are checked in the reconciler.
|
|
560
|
-
n.$$typeof ===
|
|
560
|
+
n.$$typeof === T))
|
|
561
561
|
e = n.propTypes;
|
|
562
562
|
else
|
|
563
563
|
return;
|
|
564
564
|
if (e) {
|
|
565
|
-
var a =
|
|
566
|
-
|
|
565
|
+
var a = j(n);
|
|
566
|
+
Hr(e, r.props, "prop", a, r);
|
|
567
567
|
} else if (n.PropTypes !== void 0 && !fr) {
|
|
568
568
|
fr = !0;
|
|
569
|
-
var d =
|
|
570
|
-
|
|
569
|
+
var d = j(n);
|
|
570
|
+
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", d || "Unknown");
|
|
571
571
|
}
|
|
572
|
-
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved &&
|
|
572
|
+
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
function cn(r) {
|
|
@@ -577,56 +577,56 @@ Check the top-level render call using <` + e + ">.");
|
|
|
577
577
|
for (var n = Object.keys(r.props), e = 0; e < n.length; e++) {
|
|
578
578
|
var a = n[e];
|
|
579
579
|
if (a !== "children" && a !== "key") {
|
|
580
|
-
|
|
580
|
+
Y(r), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), Y(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
r.ref !== null && (
|
|
584
|
+
r.ref !== null && (Y(r), h("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
var
|
|
588
|
-
function Lr(r, n, e, a, d,
|
|
587
|
+
var $r = {};
|
|
588
|
+
function Lr(r, n, e, a, d, l) {
|
|
589
589
|
{
|
|
590
|
-
var s =
|
|
590
|
+
var s = L(r);
|
|
591
591
|
if (!s) {
|
|
592
592
|
var i = "";
|
|
593
593
|
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
594
|
-
var
|
|
595
|
-
|
|
596
|
-
var
|
|
597
|
-
r === null ?
|
|
594
|
+
var _ = sn(d);
|
|
595
|
+
_ ? i += _ : i += Fr();
|
|
596
|
+
var w;
|
|
597
|
+
r === null ? w = "null" : cr(r) ? w = "array" : r !== void 0 && r.$$typeof === p ? (w = "<" + (j(r.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : w = typeof r, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, i);
|
|
598
598
|
}
|
|
599
|
-
var
|
|
600
|
-
if (
|
|
601
|
-
return
|
|
599
|
+
var g = on(r, n, e, d, l);
|
|
600
|
+
if (g == null)
|
|
601
|
+
return g;
|
|
602
602
|
if (s) {
|
|
603
|
-
var
|
|
604
|
-
if (
|
|
603
|
+
var P = n.children;
|
|
604
|
+
if (P !== void 0)
|
|
605
605
|
if (a)
|
|
606
|
-
if (cr(
|
|
607
|
-
for (var
|
|
608
|
-
|
|
609
|
-
Object.freeze && Object.freeze(
|
|
606
|
+
if (cr(P)) {
|
|
607
|
+
for (var M = 0; M < P.length; M++)
|
|
608
|
+
Wr(P[M], r);
|
|
609
|
+
Object.freeze && Object.freeze(P);
|
|
610
610
|
} else
|
|
611
|
-
|
|
611
|
+
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
612
612
|
else
|
|
613
|
-
|
|
613
|
+
Wr(P, r);
|
|
614
614
|
}
|
|
615
|
-
if (
|
|
616
|
-
var
|
|
615
|
+
if (q.call(n, "key")) {
|
|
616
|
+
var N = j(r), C = Object.keys(n).filter(function(wn) {
|
|
617
617
|
return wn !== "key";
|
|
618
|
-
}), hr =
|
|
619
|
-
if (
|
|
620
|
-
var hn =
|
|
621
|
-
|
|
618
|
+
}), hr = C.length > 0 ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
619
|
+
if (!$r[N + hr]) {
|
|
620
|
+
var hn = C.length > 0 ? "{" + C.join(": ..., ") + ": ...}" : "{}";
|
|
621
|
+
h(`A props object containing a "key" prop is being spread into JSX:
|
|
622
622
|
let props = %s;
|
|
623
623
|
<%s {...props} />
|
|
624
624
|
React keys must be passed directly to JSX without using spread:
|
|
625
625
|
let props = %s;
|
|
626
|
-
<%s key={someKey} {...props} />`, hr,
|
|
626
|
+
<%s key={someKey} {...props} />`, hr, N, hn, N), $r[N + hr] = !0;
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
return r ===
|
|
629
|
+
return r === b ? cn(g) : ln(g), g;
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
function un(r, n, e) {
|
|
@@ -636,8 +636,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
636
636
|
return Lr(r, n, e, !1);
|
|
637
637
|
}
|
|
638
638
|
var fn = pn, vn = un;
|
|
639
|
-
|
|
640
|
-
}()),
|
|
639
|
+
K.Fragment = b, K.jsx = fn, K.jsxs = vn;
|
|
640
|
+
}()), K;
|
|
641
641
|
}
|
|
642
642
|
process.env.NODE_ENV === "production" ? wr.exports = bn() : wr.exports = xn();
|
|
643
643
|
var t = wr.exports;
|
|
@@ -844,12 +844,6 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
844
844
|
white-space: nowrap; */
|
|
845
845
|
}
|
|
846
846
|
|
|
847
|
-
/* remove default focus outline when container is focused for keyboard handling */
|
|
848
|
-
.starasia-input-dropdown-lists-container:focus {
|
|
849
|
-
outline: none;
|
|
850
|
-
box-shadow: none;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
847
|
.starasia-input-dropdown-lists-container-bottom {
|
|
854
848
|
top: 100%;
|
|
855
849
|
margin-top: var(--starasia-ui-dropdown-spacing-xs);
|
|
@@ -922,10 +916,6 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
922
916
|
/* box-shadow: 0px 0px 0px -1px #f0f0f0; */
|
|
923
917
|
}
|
|
924
918
|
|
|
925
|
-
.starasia-input-dropdwon-item.highlight {
|
|
926
|
-
background-color: rgba(100, 181, 246, 0.21);
|
|
927
|
-
}
|
|
928
|
-
|
|
929
919
|
.starasia-input-dropdwon-item-disable {
|
|
930
920
|
color: var(--starasia-ui-dropdown-color-disable) !important;
|
|
931
921
|
pointer-events: none;
|
|
@@ -1056,19 +1046,19 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
1056
1046
|
width: 100%;
|
|
1057
1047
|
}
|
|
1058
1048
|
`;
|
|
1059
|
-
function yn(
|
|
1060
|
-
const [p, x] =
|
|
1061
|
-
|
|
1049
|
+
function yn(c) {
|
|
1050
|
+
const [p, x] = G(c), b = X(null), u = (v) => {
|
|
1051
|
+
b.current && !b.current.contains(v.target) && x(!1);
|
|
1062
1052
|
};
|
|
1063
|
-
return
|
|
1064
|
-
document.removeEventListener("click",
|
|
1065
|
-
}), []), { ref:
|
|
1053
|
+
return B(() => (document.addEventListener("click", u, !0), () => {
|
|
1054
|
+
document.removeEventListener("click", u, !0);
|
|
1055
|
+
}), []), { ref: b, isComponentVisible: p, setIsComponentVisible: x };
|
|
1066
1056
|
}
|
|
1067
|
-
const kn = ({ ...
|
|
1057
|
+
const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
|
|
1068
1058
|
"svg",
|
|
1069
1059
|
{
|
|
1070
1060
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1071
|
-
...
|
|
1061
|
+
...c,
|
|
1072
1062
|
viewBox: "0 0 24 24",
|
|
1073
1063
|
fill: "none",
|
|
1074
1064
|
color: "#939E99",
|
|
@@ -1083,11 +1073,11 @@ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
|
|
|
1083
1073
|
}
|
|
1084
1074
|
)
|
|
1085
1075
|
}
|
|
1086
|
-
), En = ({ ...
|
|
1076
|
+
), En = ({ ...c }) => /* @__PURE__ */ t.jsxs(
|
|
1087
1077
|
"svg",
|
|
1088
1078
|
{
|
|
1089
1079
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1090
|
-
...
|
|
1080
|
+
...c,
|
|
1091
1081
|
viewBox: "0 0 20 20",
|
|
1092
1082
|
fill: "none",
|
|
1093
1083
|
children: [
|
|
@@ -1115,14 +1105,14 @@ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
|
|
|
1115
1105
|
)
|
|
1116
1106
|
]
|
|
1117
1107
|
}
|
|
1118
|
-
), Rn = ({ isChecked:
|
|
1108
|
+
), Rn = ({ isChecked: c }) => /* @__PURE__ */ t.jsxs("div", { className: "checkbox-wrapper-30", children: [
|
|
1119
1109
|
/* @__PURE__ */ t.jsxs("span", { className: "checkbox", children: [
|
|
1120
1110
|
/* @__PURE__ */ t.jsx(
|
|
1121
1111
|
"input",
|
|
1122
1112
|
{
|
|
1123
1113
|
type: "checkbox",
|
|
1124
1114
|
style: { pointerEvents: "none" },
|
|
1125
|
-
checked:
|
|
1115
|
+
checked: c
|
|
1126
1116
|
}
|
|
1127
1117
|
),
|
|
1128
1118
|
/* @__PURE__ */ t.jsx("svg", { children: /* @__PURE__ */ t.jsx("use", { xlinkHref: "#checkbox-30", className: "checkbox" }) })
|
|
@@ -1137,82 +1127,42 @@ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
|
|
|
1137
1127
|
) }) })
|
|
1138
1128
|
] }), _n = gn(
|
|
1139
1129
|
({
|
|
1140
|
-
positionDropdown:
|
|
1130
|
+
positionDropdown: c,
|
|
1141
1131
|
dropdownLists: p,
|
|
1142
1132
|
isComponentVisible: x,
|
|
1143
|
-
searchAble:
|
|
1144
|
-
onSearch:
|
|
1145
|
-
value:
|
|
1146
|
-
handleChangeValue:
|
|
1147
|
-
multiSelect:
|
|
1148
|
-
searchValue:
|
|
1149
|
-
},
|
|
1150
|
-
const [
|
|
1151
|
-
return
|
|
1152
|
-
if (
|
|
1153
|
-
const o =
|
|
1154
|
-
|
|
1133
|
+
searchAble: b,
|
|
1134
|
+
onSearch: u,
|
|
1135
|
+
value: v,
|
|
1136
|
+
handleChangeValue: O,
|
|
1137
|
+
multiSelect: m,
|
|
1138
|
+
searchValue: f
|
|
1139
|
+
}, F) => {
|
|
1140
|
+
const [y, T] = G(0), [A, D] = G(), I = X(null);
|
|
1141
|
+
return B(() => {
|
|
1142
|
+
if (I.current) {
|
|
1143
|
+
const o = I.current.getBoundingClientRect();
|
|
1144
|
+
T(o.width);
|
|
1155
1145
|
}
|
|
1156
|
-
}, [
|
|
1157
|
-
p &&
|
|
1158
|
-
if (o.label.startsWith(
|
|
1159
|
-
|
|
1146
|
+
}, [I, x]), B(() => {
|
|
1147
|
+
p && f ? p.forEach((o) => {
|
|
1148
|
+
if (o.label.startsWith(f || "")) {
|
|
1149
|
+
D(o.value);
|
|
1160
1150
|
return;
|
|
1161
1151
|
}
|
|
1162
|
-
}) :
|
|
1163
|
-
}, [
|
|
1164
|
-
const o = m.current || (C == null ? void 0 : C.current);
|
|
1165
|
-
if (!o || !x)
|
|
1166
|
-
return;
|
|
1167
|
-
const v = p.filter((w) => !w.disable), l = (w) => {
|
|
1168
|
-
if (w.key === "ArrowDown") {
|
|
1169
|
-
if (w.preventDefault(), !v.length)
|
|
1170
|
-
return;
|
|
1171
|
-
const j = v.findIndex((B) => B.value === E), z = j === -1 ? 0 : (j + 1) % v.length;
|
|
1172
|
-
L(v[z].value);
|
|
1173
|
-
} else if (w.key === "ArrowUp") {
|
|
1174
|
-
if (w.preventDefault(), !v.length)
|
|
1175
|
-
return;
|
|
1176
|
-
const j = v.findIndex((B) => B.value === E), z = j <= 0 ? v.length - 1 : j - 1;
|
|
1177
|
-
L(v[z].value);
|
|
1178
|
-
} else if (w.key === "Enter") {
|
|
1179
|
-
if (w.preventDefault(), !E)
|
|
1180
|
-
return;
|
|
1181
|
-
const j = p.find((z) => z.value === E);
|
|
1182
|
-
j && !j.disable && P(j.label, j.value);
|
|
1183
|
-
}
|
|
1184
|
-
};
|
|
1185
|
-
return o.addEventListener("keydown", l), () => o.removeEventListener("keydown", l);
|
|
1186
|
-
}, [x, p, E, P, C]), N(() => {
|
|
1187
|
-
if (!E)
|
|
1188
|
-
return;
|
|
1189
|
-
const o = A.current;
|
|
1190
|
-
if (!o)
|
|
1191
|
-
return;
|
|
1192
|
-
const v = o.querySelector(`[data-value="${E}"]`);
|
|
1193
|
-
v && v.scrollIntoView && v.scrollIntoView({ block: "nearest" });
|
|
1194
|
-
}, [E]), /* @__PURE__ */ t.jsx(t.Fragment, { children: x ? /* @__PURE__ */ t.jsxs(
|
|
1152
|
+
}) : D(void 0);
|
|
1153
|
+
}, [f, p]), /* @__PURE__ */ t.jsx(t.Fragment, { children: x ? /* @__PURE__ */ t.jsxs(
|
|
1195
1154
|
"div",
|
|
1196
1155
|
{
|
|
1197
1156
|
className: "starasia-input-dropdown-lists-container",
|
|
1198
1157
|
onClick: (o) => o.stopPropagation(),
|
|
1199
|
-
ref:
|
|
1200
|
-
if (m.current = o, typeof C == "function")
|
|
1201
|
-
C(o);
|
|
1202
|
-
else if (C)
|
|
1203
|
-
try {
|
|
1204
|
-
C.current = o;
|
|
1205
|
-
} catch {
|
|
1206
|
-
}
|
|
1207
|
-
},
|
|
1208
|
-
tabIndex: 0,
|
|
1158
|
+
ref: F,
|
|
1209
1159
|
children: [
|
|
1210
|
-
|
|
1160
|
+
b ? /* @__PURE__ */ t.jsxs(
|
|
1211
1161
|
"div",
|
|
1212
1162
|
{
|
|
1213
1163
|
className: "starasia-input-dropdown-container-dropdown-search",
|
|
1214
1164
|
style: {
|
|
1215
|
-
order:
|
|
1165
|
+
order: c == "bottom" ? 0 : 2,
|
|
1216
1166
|
position: "sticky",
|
|
1217
1167
|
top: 0,
|
|
1218
1168
|
bottom: 0,
|
|
@@ -1224,9 +1174,9 @@ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
|
|
|
1224
1174
|
"input",
|
|
1225
1175
|
{
|
|
1226
1176
|
onChange: (o) => {
|
|
1227
|
-
|
|
1177
|
+
u && u(o.target.value);
|
|
1228
1178
|
},
|
|
1229
|
-
value:
|
|
1179
|
+
value: f,
|
|
1230
1180
|
autoFocus: !0,
|
|
1231
1181
|
style: { width: "100%" }
|
|
1232
1182
|
}
|
|
@@ -1237,18 +1187,17 @@ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
|
|
|
1237
1187
|
/* @__PURE__ */ t.jsx(
|
|
1238
1188
|
"div",
|
|
1239
1189
|
{
|
|
1240
|
-
className: `starasia-input-dropdwon-item-container ${
|
|
1241
|
-
ref:
|
|
1242
|
-
children: p.map((o,
|
|
1243
|
-
const
|
|
1190
|
+
className: `starasia-input-dropdwon-item-container ${m ? "multi" : ""}`,
|
|
1191
|
+
ref: I,
|
|
1192
|
+
children: p.map((o, $) => {
|
|
1193
|
+
const S = !!(v != null && v.find((h) => h.value === o.value));
|
|
1244
1194
|
return /* @__PURE__ */ t.jsxs(
|
|
1245
1195
|
"div",
|
|
1246
1196
|
{
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
onClick: () => P(o.label, o.value),
|
|
1197
|
+
className: `starasia-input-dropdwon-item ${S ? "active" : " "} ${o.disable ? "starasia-input-dropdwon-item-disable" : null}`,
|
|
1198
|
+
onClick: () => O(o.label, o.value),
|
|
1250
1199
|
children: [
|
|
1251
|
-
|
|
1200
|
+
m ? /* @__PURE__ */ t.jsx("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ t.jsx(Rn, { isChecked: S }) }) : null,
|
|
1252
1201
|
o.icon ? /* @__PURE__ */ t.jsx("div", { children: or.cloneElement(o.icon, {
|
|
1253
1202
|
width: 16
|
|
1254
1203
|
}) }) : null,
|
|
@@ -1256,10 +1205,10 @@ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
|
|
|
1256
1205
|
/* @__PURE__ */ t.jsx(
|
|
1257
1206
|
"p",
|
|
1258
1207
|
{
|
|
1259
|
-
className: `starasia-input-dropdwon-item-text ${
|
|
1208
|
+
className: `starasia-input-dropdwon-item-text ${S ? "active" : null} ${o.disable ? "starasia-input-dropdwon-item-disable" : null}`,
|
|
1260
1209
|
style: {
|
|
1261
1210
|
textWrap: "nowrap",
|
|
1262
|
-
width: `${
|
|
1211
|
+
width: `${y - 12}px`,
|
|
1263
1212
|
overflow: "hidden",
|
|
1264
1213
|
textOverflow: "ellipsis"
|
|
1265
1214
|
},
|
|
@@ -1269,10 +1218,10 @@ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
|
|
|
1269
1218
|
o.description ? /* @__PURE__ */ t.jsx(
|
|
1270
1219
|
"p",
|
|
1271
1220
|
{
|
|
1272
|
-
className: `starasia-input-dropdwon-item-text-description ${
|
|
1221
|
+
className: `starasia-input-dropdwon-item-text-description ${S ? "active" : null} ${o.disable ? "starasia-input-dropdwon-item-disable" : null}`,
|
|
1273
1222
|
style: {
|
|
1274
1223
|
textWrap: "nowrap",
|
|
1275
|
-
width: `${
|
|
1224
|
+
width: `${y - 12}px`,
|
|
1276
1225
|
overflow: "hidden",
|
|
1277
1226
|
textOverflow: "ellipsis"
|
|
1278
1227
|
},
|
|
@@ -1282,7 +1231,7 @@ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
|
|
|
1282
1231
|
] })
|
|
1283
1232
|
]
|
|
1284
1233
|
},
|
|
1285
|
-
|
|
1234
|
+
$
|
|
1286
1235
|
);
|
|
1287
1236
|
})
|
|
1288
1237
|
}
|
|
@@ -1292,105 +1241,98 @@ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
|
|
|
1292
1241
|
) : null });
|
|
1293
1242
|
}
|
|
1294
1243
|
), jn = ({
|
|
1295
|
-
children:
|
|
1244
|
+
children: c,
|
|
1296
1245
|
handleChangePosition: p
|
|
1297
1246
|
}) => {
|
|
1298
|
-
const x =
|
|
1299
|
-
|
|
1300
|
-
var
|
|
1301
|
-
const
|
|
1247
|
+
const x = X(null);
|
|
1248
|
+
B(() => {
|
|
1249
|
+
var O;
|
|
1250
|
+
const u = () => {
|
|
1302
1251
|
if (x.current) {
|
|
1303
|
-
let
|
|
1304
|
-
for (;
|
|
1305
|
-
|
|
1306
|
-
|
|
1252
|
+
let m = x.current.parentElement;
|
|
1253
|
+
for (; m && !b(m); )
|
|
1254
|
+
m = m.parentElement;
|
|
1255
|
+
m && p();
|
|
1307
1256
|
}
|
|
1308
1257
|
};
|
|
1309
|
-
let
|
|
1310
|
-
for (;
|
|
1311
|
-
|
|
1312
|
-
return
|
|
1313
|
-
|
|
1258
|
+
let v = (O = x.current) == null ? void 0 : O.parentElement;
|
|
1259
|
+
for (; v && !b(v); )
|
|
1260
|
+
v = v.parentElement;
|
|
1261
|
+
return v && v.addEventListener("scroll", u), u(), () => {
|
|
1262
|
+
v && v.removeEventListener("scroll", u);
|
|
1314
1263
|
};
|
|
1315
1264
|
}, []);
|
|
1316
|
-
const
|
|
1317
|
-
return /* @__PURE__ */ t.jsx("div", { ref: x, children:
|
|
1318
|
-
}, Br = "starasia-input-dropdown-styles", Cn = (
|
|
1265
|
+
const b = (u) => u && (u.scrollHeight > u.clientHeight || u.scrollWidth > u.clientWidth);
|
|
1266
|
+
return /* @__PURE__ */ t.jsx("div", { ref: x, children: c });
|
|
1267
|
+
}, Br = "starasia-input-dropdown-styles", Cn = (c) => {
|
|
1319
1268
|
if (!document.getElementById(Br)) {
|
|
1320
1269
|
const p = document.createElement("style");
|
|
1321
|
-
p.id = Br, p.textContent =
|
|
1270
|
+
p.id = Br, p.textContent = c, document.head.appendChild(p);
|
|
1322
1271
|
}
|
|
1323
1272
|
};
|
|
1324
1273
|
Cn(mn);
|
|
1325
1274
|
const Sn = ({
|
|
1326
|
-
dropdownLists:
|
|
1275
|
+
dropdownLists: c,
|
|
1327
1276
|
onChange: p,
|
|
1328
1277
|
defaultValue: x,
|
|
1329
|
-
size:
|
|
1330
|
-
multiSelect:
|
|
1331
|
-
searchAble:
|
|
1332
|
-
iconLeft:
|
|
1333
|
-
placeholder:
|
|
1334
|
-
onSearch:
|
|
1335
|
-
error:
|
|
1336
|
-
onBlur:
|
|
1337
|
-
onFocus:
|
|
1338
|
-
disable:
|
|
1339
|
-
searchValue:
|
|
1278
|
+
size: b = "md",
|
|
1279
|
+
multiSelect: u,
|
|
1280
|
+
searchAble: v,
|
|
1281
|
+
iconLeft: O,
|
|
1282
|
+
placeholder: m,
|
|
1283
|
+
onSearch: f,
|
|
1284
|
+
error: F,
|
|
1285
|
+
onBlur: y,
|
|
1286
|
+
onFocus: T,
|
|
1287
|
+
disable: A,
|
|
1288
|
+
searchValue: D
|
|
1340
1289
|
}) => {
|
|
1341
|
-
const
|
|
1342
|
-
|
|
1343
|
-
}, Q = (
|
|
1344
|
-
if (!
|
|
1345
|
-
|
|
1346
|
-
else if (
|
|
1347
|
-
const
|
|
1348
|
-
...
|
|
1290
|
+
const I = X(), [o, $] = G([]), [S, h] = G(""), W = X(null), { isComponentVisible: V, ref: U, setIsComponentVisible: Z } = yn(!1), ir = () => {
|
|
1291
|
+
Z((R) => !R);
|
|
1292
|
+
}, Q = (R, k) => {
|
|
1293
|
+
if (!u)
|
|
1294
|
+
$([{ label: R, value: k }]), p([{ label: R, value: k }]), Z(!1);
|
|
1295
|
+
else if (o == null ? void 0 : o.find((E) => E.value === k)) {
|
|
1296
|
+
const E = [
|
|
1297
|
+
...o ? o.filter((z) => z.value !== k) : []
|
|
1349
1298
|
];
|
|
1350
|
-
|
|
1299
|
+
$(E), p(E);
|
|
1351
1300
|
} else {
|
|
1352
|
-
const
|
|
1353
|
-
|
|
1301
|
+
const E = [...o || [], { label: R, value: k }];
|
|
1302
|
+
$(E), p(E);
|
|
1354
1303
|
}
|
|
1355
1304
|
};
|
|
1356
|
-
|
|
1357
|
-
JSON.stringify(
|
|
1305
|
+
B(() => {
|
|
1306
|
+
JSON.stringify(I.current) === JSON.stringify(x) || (I.current = x, $(I.current || []));
|
|
1358
1307
|
}, [x]);
|
|
1359
|
-
const rr = () =>
|
|
1360
|
-
/* @__PURE__ */ t.jsx("p", { style: { minWidth: "max-content" }, children:
|
|
1308
|
+
const rr = () => o.length ? u ? o == null ? void 0 : o.map((R, k) => /* @__PURE__ */ t.jsxs("div", { className: "starasia-input-dropdown-preview-item", children: [
|
|
1309
|
+
/* @__PURE__ */ t.jsx("p", { style: { minWidth: "max-content" }, children: R == null ? void 0 : R.label }, k),
|
|
1361
1310
|
/* @__PURE__ */ t.jsx(
|
|
1362
|
-
|
|
1311
|
+
On,
|
|
1363
1312
|
{
|
|
1364
|
-
onClick: () => Q(
|
|
1313
|
+
onClick: () => Q(R.label, R.value)
|
|
1365
1314
|
}
|
|
1366
1315
|
)
|
|
1367
|
-
] })) : /* @__PURE__ */ t.jsx("p", { style: { minWidth: "max-content" }, children:
|
|
1368
|
-
if (
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1316
|
+
] })) : /* @__PURE__ */ t.jsx("p", { style: { minWidth: "max-content" }, children: o == null ? void 0 : o[0].label }) : /* @__PURE__ */ t.jsx("p", { className: "starasia-input-dropdown-placeholder", children: m }), L = () => {
|
|
1317
|
+
if (U.current && W.current) {
|
|
1318
|
+
const R = window.innerHeight, k = U.current.getBoundingClientRect(), j = W.current.getBoundingClientRect(), E = k.bottom + j.height;
|
|
1319
|
+
W.current.style.left = `${k.left}px`, W.current.style.width = `${k.width}px`, E >= R - 10 ? (W.current.style.top = `${k.top - j.height - 5}px`, h("top")) : (W.current.style.top = `${k.top + k.height}px`, h("bottom"));
|
|
1371
1320
|
}
|
|
1372
1321
|
};
|
|
1373
|
-
return
|
|
1374
|
-
window.removeEventListener("scroll",
|
|
1375
|
-
}), []),
|
|
1376
|
-
|
|
1377
|
-
}, [
|
|
1378
|
-
j && w.current && !h && setTimeout(() => {
|
|
1379
|
-
try {
|
|
1380
|
-
w.current && w.current.focus();
|
|
1381
|
-
} catch {
|
|
1382
|
-
}
|
|
1383
|
-
}, 0);
|
|
1384
|
-
}, [j, h]), /* @__PURE__ */ t.jsx(jn, { handleChangePosition: Y, children: /* @__PURE__ */ t.jsxs(
|
|
1322
|
+
return B(() => (window.addEventListener("scroll", L), window.addEventListener("resize", L), () => {
|
|
1323
|
+
window.removeEventListener("scroll", L), window.removeEventListener("resize", L);
|
|
1324
|
+
}), []), B(() => {
|
|
1325
|
+
L();
|
|
1326
|
+
}, [V]), /* @__PURE__ */ t.jsx(jn, { handleChangePosition: L, children: /* @__PURE__ */ t.jsxs(
|
|
1385
1327
|
"div",
|
|
1386
1328
|
{
|
|
1387
|
-
className: `starasia-input-dropdown-container ${
|
|
1388
|
-
ref:
|
|
1329
|
+
className: `starasia-input-dropdown-container ${A ? "disable" : ""} starasia-input-dropdown-size-${b} ${V ? "active" : ""} ${F ? "error" : ""}`,
|
|
1330
|
+
ref: U,
|
|
1389
1331
|
onClick: ir,
|
|
1390
1332
|
children: [
|
|
1391
1333
|
/* @__PURE__ */ t.jsxs("div", { className: "starasia-input-dropdown-preview-container", children: [
|
|
1392
|
-
|
|
1393
|
-
width: Yr(
|
|
1334
|
+
O ? /* @__PURE__ */ t.jsx(t.Fragment, { children: or.cloneElement(O, {
|
|
1335
|
+
width: Yr(b),
|
|
1394
1336
|
color: "#939E99",
|
|
1395
1337
|
style: {
|
|
1396
1338
|
color: "#939E99"
|
|
@@ -1401,8 +1343,8 @@ const Sn = ({
|
|
|
1401
1343
|
{
|
|
1402
1344
|
className: "starasia-input-dropdown-container-preview-item",
|
|
1403
1345
|
tabIndex: 100,
|
|
1404
|
-
onBlur:
|
|
1405
|
-
onFocus:
|
|
1346
|
+
onBlur: y,
|
|
1347
|
+
onFocus: T,
|
|
1406
1348
|
children: rr()
|
|
1407
1349
|
}
|
|
1408
1350
|
),
|
|
@@ -1410,7 +1352,7 @@ const Sn = ({
|
|
|
1410
1352
|
kn,
|
|
1411
1353
|
{
|
|
1412
1354
|
strokeWidth: 2,
|
|
1413
|
-
width: Yr(
|
|
1355
|
+
width: Yr(b),
|
|
1414
1356
|
style: { color: "#939E99" }
|
|
1415
1357
|
}
|
|
1416
1358
|
)
|
|
@@ -1418,29 +1360,29 @@ const Sn = ({
|
|
|
1418
1360
|
/* @__PURE__ */ t.jsx(
|
|
1419
1361
|
_n,
|
|
1420
1362
|
{
|
|
1421
|
-
dropdownLists:
|
|
1363
|
+
dropdownLists: c,
|
|
1422
1364
|
handleChangeValue: Q,
|
|
1423
|
-
isComponentVisible:
|
|
1424
|
-
positionDropdown:
|
|
1425
|
-
searchAble: !!
|
|
1426
|
-
value:
|
|
1427
|
-
onSearch:
|
|
1428
|
-
ref:
|
|
1429
|
-
multiSelect:
|
|
1430
|
-
searchValue:
|
|
1365
|
+
isComponentVisible: V,
|
|
1366
|
+
positionDropdown: S,
|
|
1367
|
+
searchAble: !!v,
|
|
1368
|
+
value: o,
|
|
1369
|
+
onSearch: f,
|
|
1370
|
+
ref: W,
|
|
1371
|
+
multiSelect: u,
|
|
1372
|
+
searchValue: D
|
|
1431
1373
|
}
|
|
1432
1374
|
)
|
|
1433
1375
|
]
|
|
1434
1376
|
}
|
|
1435
1377
|
) });
|
|
1436
|
-
}, Yr = (
|
|
1437
|
-
if (
|
|
1378
|
+
}, Yr = (c) => {
|
|
1379
|
+
if (c === "sm")
|
|
1438
1380
|
return 16;
|
|
1439
|
-
if (
|
|
1381
|
+
if (c === "md")
|
|
1440
1382
|
return 16;
|
|
1441
|
-
if (
|
|
1383
|
+
if (c === "lg")
|
|
1442
1384
|
return 20;
|
|
1443
|
-
},
|
|
1385
|
+
}, On = (c) => /* @__PURE__ */ t.jsx(
|
|
1444
1386
|
"svg",
|
|
1445
1387
|
{
|
|
1446
1388
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1448,7 +1390,7 @@ const Sn = ({
|
|
|
1448
1390
|
height: "18",
|
|
1449
1391
|
viewBox: "0 0 18 18",
|
|
1450
1392
|
fill: "none",
|
|
1451
|
-
...
|
|
1393
|
+
...c,
|
|
1452
1394
|
children: /* @__PURE__ */ t.jsx(
|
|
1453
1395
|
"path",
|
|
1454
1396
|
{
|