@starasia/dropdown 1.0.3 → 1.0.5
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 +187 -846
- package/dist/dropdown.umd.js +15 -64
- package/package.json +1 -1
package/dist/dropdown.es.js
CHANGED
|
@@ -1,647 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.min.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var zr;
|
|
13
|
-
function bn() {
|
|
14
|
-
if (zr)
|
|
15
|
-
return H;
|
|
16
|
-
zr = 1;
|
|
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
|
-
}
|
|
28
|
-
return H.Fragment = x, H.jsx = O, H.jsxs = O, H;
|
|
29
|
-
}
|
|
30
|
-
var K = {};
|
|
31
|
-
/**
|
|
32
|
-
* @license React
|
|
33
|
-
* react-jsx-runtime.development.js
|
|
34
|
-
*
|
|
35
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
36
|
-
*
|
|
37
|
-
* This source code is licensed under the MIT license found in the
|
|
38
|
-
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/
|
|
40
|
-
var Nr;
|
|
41
|
-
function xn() {
|
|
42
|
-
return Nr || (Nr = 1, process.env.NODE_ENV !== "production" && 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
|
-
if (r === null || typeof r != "object")
|
|
46
|
-
return null;
|
|
47
|
-
var n = I && r[I] || r[o];
|
|
48
|
-
return typeof n == "function" ? n : null;
|
|
49
|
-
}
|
|
50
|
-
var S = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
-
function h(r) {
|
|
52
|
-
{
|
|
53
|
-
for (var n = arguments.length, e = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++)
|
|
54
|
-
e[a - 1] = arguments[a];
|
|
55
|
-
W("error", r, e);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function W(r, n, e) {
|
|
59
|
-
{
|
|
60
|
-
var a = S.ReactDebugCurrentFrame, d = a.getStackAddendum();
|
|
61
|
-
d !== "" && (n += "%s", e = e.concat([d]));
|
|
62
|
-
var l = e.map(function(s) {
|
|
63
|
-
return String(s);
|
|
64
|
-
});
|
|
65
|
-
l.unshift("Warning: " + n), Function.prototype.apply.call(console[r], console, l);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
var V = !1, U = !1, Z = !1, ir = !1, Q = !1, rr;
|
|
69
|
-
rr = Symbol.for("react.module.reference");
|
|
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
|
-
// types supported by any Flight configuration anywhere since
|
|
73
|
-
// we don't know which Flight build this will end up being used
|
|
74
|
-
// with.
|
|
75
|
-
r.$$typeof === rr || r.getModuleId !== void 0));
|
|
76
|
-
}
|
|
77
|
-
function R(r, n, e) {
|
|
78
|
-
var a = r.displayName;
|
|
79
|
-
if (a)
|
|
80
|
-
return a;
|
|
81
|
-
var d = n.displayName || n.name || "";
|
|
82
|
-
return d !== "" ? e + "(" + d + ")" : e;
|
|
83
|
-
}
|
|
84
|
-
function k(r) {
|
|
85
|
-
return r.displayName || "Context";
|
|
86
|
-
}
|
|
87
|
-
function j(r) {
|
|
88
|
-
if (r == null)
|
|
89
|
-
return null;
|
|
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
|
-
return r.displayName || r.name || null;
|
|
92
|
-
if (typeof r == "string")
|
|
93
|
-
return r;
|
|
94
|
-
switch (r) {
|
|
95
|
-
case b:
|
|
96
|
-
return "Fragment";
|
|
97
|
-
case x:
|
|
98
|
-
return "Portal";
|
|
99
|
-
case v:
|
|
100
|
-
return "Profiler";
|
|
101
|
-
case u:
|
|
102
|
-
return "StrictMode";
|
|
103
|
-
case F:
|
|
104
|
-
return "Suspense";
|
|
105
|
-
case y:
|
|
106
|
-
return "SuspenseList";
|
|
107
|
-
}
|
|
108
|
-
if (typeof r == "object")
|
|
109
|
-
switch (r.$$typeof) {
|
|
110
|
-
case m:
|
|
111
|
-
var n = r;
|
|
112
|
-
return k(n) + ".Consumer";
|
|
113
|
-
case O:
|
|
114
|
-
var e = r;
|
|
115
|
-
return k(e._context) + ".Provider";
|
|
116
|
-
case f:
|
|
117
|
-
return R(r, r.render, "ForwardRef");
|
|
118
|
-
case T:
|
|
119
|
-
var a = r.displayName || null;
|
|
120
|
-
return a !== null ? a : j(r.type) || "Memo";
|
|
121
|
-
case A: {
|
|
122
|
-
var d = r, l = d._payload, s = d._init;
|
|
123
|
-
try {
|
|
124
|
-
return j(s(l));
|
|
125
|
-
} catch {
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return null;
|
|
131
|
-
}
|
|
132
|
-
var E = Object.assign, z = 0, gr, br, xr, mr, yr, kr, Er;
|
|
133
|
-
function Rr() {
|
|
134
|
-
}
|
|
135
|
-
Rr.__reactDisabledLog = !0;
|
|
136
|
-
function Mr() {
|
|
137
|
-
{
|
|
138
|
-
if (z === 0) {
|
|
139
|
-
gr = console.log, br = console.info, xr = console.warn, mr = console.error, yr = console.group, kr = console.groupCollapsed, Er = console.groupEnd;
|
|
140
|
-
var r = {
|
|
141
|
-
configurable: !0,
|
|
142
|
-
enumerable: !0,
|
|
143
|
-
value: Rr,
|
|
144
|
-
writable: !0
|
|
145
|
-
};
|
|
146
|
-
Object.defineProperties(console, {
|
|
147
|
-
info: r,
|
|
148
|
-
log: r,
|
|
149
|
-
warn: r,
|
|
150
|
-
error: r,
|
|
151
|
-
group: r,
|
|
152
|
-
groupCollapsed: r,
|
|
153
|
-
groupEnd: r
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
z++;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function Vr() {
|
|
160
|
-
{
|
|
161
|
-
if (z--, z === 0) {
|
|
162
|
-
var r = {
|
|
163
|
-
configurable: !0,
|
|
164
|
-
enumerable: !0,
|
|
165
|
-
writable: !0
|
|
166
|
-
};
|
|
167
|
-
Object.defineProperties(console, {
|
|
168
|
-
log: E({}, r, {
|
|
169
|
-
value: gr
|
|
170
|
-
}),
|
|
171
|
-
info: E({}, r, {
|
|
172
|
-
value: br
|
|
173
|
-
}),
|
|
174
|
-
warn: E({}, r, {
|
|
175
|
-
value: xr
|
|
176
|
-
}),
|
|
177
|
-
error: E({}, r, {
|
|
178
|
-
value: mr
|
|
179
|
-
}),
|
|
180
|
-
group: E({}, r, {
|
|
181
|
-
value: yr
|
|
182
|
-
}),
|
|
183
|
-
groupCollapsed: E({}, r, {
|
|
184
|
-
value: kr
|
|
185
|
-
}),
|
|
186
|
-
groupEnd: E({}, r, {
|
|
187
|
-
value: Er
|
|
188
|
-
})
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
z < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
var sr = S.ReactCurrentDispatcher, dr;
|
|
195
|
-
function nr(r, n, e) {
|
|
196
|
-
{
|
|
197
|
-
if (dr === void 0)
|
|
198
|
-
try {
|
|
199
|
-
throw Error();
|
|
200
|
-
} catch (d) {
|
|
201
|
-
var a = d.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
-
dr = a && a[1] || "";
|
|
203
|
-
}
|
|
204
|
-
return `
|
|
205
|
-
` + dr + r;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
var lr = !1, er;
|
|
209
|
-
{
|
|
210
|
-
var Ur = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
-
er = new Ur();
|
|
212
|
-
}
|
|
213
|
-
function _r(r, n) {
|
|
214
|
-
if (!r || lr)
|
|
215
|
-
return "";
|
|
216
|
-
{
|
|
217
|
-
var e = er.get(r);
|
|
218
|
-
if (e !== void 0)
|
|
219
|
-
return e;
|
|
220
|
-
}
|
|
221
|
-
var a;
|
|
222
|
-
lr = !0;
|
|
223
|
-
var d = Error.prepareStackTrace;
|
|
224
|
-
Error.prepareStackTrace = void 0;
|
|
225
|
-
var l;
|
|
226
|
-
l = sr.current, sr.current = null, Mr();
|
|
227
|
-
try {
|
|
228
|
-
if (n) {
|
|
229
|
-
var s = function() {
|
|
230
|
-
throw Error();
|
|
231
|
-
};
|
|
232
|
-
if (Object.defineProperty(s.prototype, "props", {
|
|
233
|
-
set: function() {
|
|
234
|
-
throw Error();
|
|
235
|
-
}
|
|
236
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
|
-
try {
|
|
238
|
-
Reflect.construct(s, []);
|
|
239
|
-
} catch (C) {
|
|
240
|
-
a = C;
|
|
241
|
-
}
|
|
242
|
-
Reflect.construct(r, [], s);
|
|
243
|
-
} else {
|
|
244
|
-
try {
|
|
245
|
-
s.call();
|
|
246
|
-
} catch (C) {
|
|
247
|
-
a = C;
|
|
248
|
-
}
|
|
249
|
-
r.call(s.prototype);
|
|
250
|
-
}
|
|
251
|
-
} else {
|
|
252
|
-
try {
|
|
253
|
-
throw Error();
|
|
254
|
-
} catch (C) {
|
|
255
|
-
a = C;
|
|
256
|
-
}
|
|
257
|
-
r();
|
|
258
|
-
}
|
|
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
|
-
do
|
|
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
|
-
}
|
|
274
|
-
while (w >= 1 && g >= 0);
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
} finally {
|
|
279
|
-
lr = !1, sr.current = l, Vr(), Error.prepareStackTrace = d;
|
|
280
|
-
}
|
|
281
|
-
var M = r ? r.displayName || r.name : "", N = M ? nr(M) : "";
|
|
282
|
-
return typeof r == "function" && er.set(r, N), N;
|
|
283
|
-
}
|
|
284
|
-
function qr(r, n, e) {
|
|
285
|
-
return _r(r, !1);
|
|
286
|
-
}
|
|
287
|
-
function Jr(r) {
|
|
288
|
-
var n = r.prototype;
|
|
289
|
-
return !!(n && n.isReactComponent);
|
|
290
|
-
}
|
|
291
|
-
function ar(r, n, e) {
|
|
292
|
-
if (r == null)
|
|
293
|
-
return "";
|
|
294
|
-
if (typeof r == "function")
|
|
295
|
-
return _r(r, Jr(r));
|
|
296
|
-
if (typeof r == "string")
|
|
297
|
-
return nr(r);
|
|
298
|
-
switch (r) {
|
|
299
|
-
case F:
|
|
300
|
-
return nr("Suspense");
|
|
301
|
-
case y:
|
|
302
|
-
return nr("SuspenseList");
|
|
303
|
-
}
|
|
304
|
-
if (typeof r == "object")
|
|
305
|
-
switch (r.$$typeof) {
|
|
306
|
-
case f:
|
|
307
|
-
return qr(r.render);
|
|
308
|
-
case T:
|
|
309
|
-
return ar(r.type, n, e);
|
|
310
|
-
case A: {
|
|
311
|
-
var a = r, d = a._payload, l = a._init;
|
|
312
|
-
try {
|
|
313
|
-
return ar(l(d), n, e);
|
|
314
|
-
} catch {
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
return "";
|
|
319
|
-
}
|
|
320
|
-
var q = Object.prototype.hasOwnProperty, jr = {}, Cr = S.ReactDebugCurrentFrame;
|
|
321
|
-
function tr(r) {
|
|
322
|
-
if (r) {
|
|
323
|
-
var n = r._owner, e = ar(r.type, r._source, n ? n.type : null);
|
|
324
|
-
Cr.setExtraStackFrame(e);
|
|
325
|
-
} else
|
|
326
|
-
Cr.setExtraStackFrame(null);
|
|
327
|
-
}
|
|
328
|
-
function Hr(r, n, e, a, d) {
|
|
329
|
-
{
|
|
330
|
-
var l = Function.call.bind(q);
|
|
331
|
-
for (var s in r)
|
|
332
|
-
if (l(r, s)) {
|
|
333
|
-
var i = void 0;
|
|
334
|
-
try {
|
|
335
|
-
if (typeof r[s] != "function") {
|
|
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
|
-
}
|
|
339
|
-
i = r[s](n, s, a, e, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
-
} catch (w) {
|
|
341
|
-
i = w;
|
|
342
|
-
}
|
|
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
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
var Kr = Array.isArray;
|
|
348
|
-
function cr(r) {
|
|
349
|
-
return Kr(r);
|
|
350
|
-
}
|
|
351
|
-
function Gr(r) {
|
|
352
|
-
{
|
|
353
|
-
var n = typeof Symbol == "function" && Symbol.toStringTag, e = n && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
354
|
-
return e;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
function Xr(r) {
|
|
358
|
-
try {
|
|
359
|
-
return Or(r), !1;
|
|
360
|
-
} catch {
|
|
361
|
-
return !0;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
function Or(r) {
|
|
365
|
-
return "" + r;
|
|
366
|
-
}
|
|
367
|
-
function Tr(r) {
|
|
368
|
-
if (Xr(r))
|
|
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
|
-
}
|
|
371
|
-
var J = S.ReactCurrentOwner, Zr = {
|
|
372
|
-
key: !0,
|
|
373
|
-
ref: !0,
|
|
374
|
-
__self: !0,
|
|
375
|
-
__source: !0
|
|
376
|
-
}, Sr, Pr, ur;
|
|
377
|
-
ur = {};
|
|
378
|
-
function Qr(r) {
|
|
379
|
-
if (q.call(r, "ref")) {
|
|
380
|
-
var n = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
381
|
-
if (n && n.isReactWarning)
|
|
382
|
-
return !1;
|
|
383
|
-
}
|
|
384
|
-
return r.ref !== void 0;
|
|
385
|
-
}
|
|
386
|
-
function rn(r) {
|
|
387
|
-
if (q.call(r, "key")) {
|
|
388
|
-
var n = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
389
|
-
if (n && n.isReactWarning)
|
|
390
|
-
return !1;
|
|
391
|
-
}
|
|
392
|
-
return r.key !== void 0;
|
|
393
|
-
}
|
|
394
|
-
function nn(r, n) {
|
|
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
|
-
}
|
|
399
|
-
}
|
|
400
|
-
function en(r, n) {
|
|
401
|
-
{
|
|
402
|
-
var e = function() {
|
|
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
|
-
};
|
|
405
|
-
e.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
406
|
-
get: e,
|
|
407
|
-
configurable: !0
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
function an(r, n) {
|
|
412
|
-
{
|
|
413
|
-
var e = function() {
|
|
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
|
-
};
|
|
416
|
-
e.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
417
|
-
get: e,
|
|
418
|
-
configurable: !0
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
var tn = function(r, n, e, a, d, l, s) {
|
|
423
|
-
var i = {
|
|
424
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
425
|
-
$$typeof: p,
|
|
426
|
-
// Built-in properties that belong on the element
|
|
427
|
-
type: r,
|
|
428
|
-
key: n,
|
|
429
|
-
ref: e,
|
|
430
|
-
props: s,
|
|
431
|
-
// Record the component responsible for creating this element.
|
|
432
|
-
_owner: l
|
|
433
|
-
};
|
|
434
|
-
return i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
435
|
-
configurable: !1,
|
|
436
|
-
enumerable: !1,
|
|
437
|
-
writable: !0,
|
|
438
|
-
value: !1
|
|
439
|
-
}), Object.defineProperty(i, "_self", {
|
|
440
|
-
configurable: !1,
|
|
441
|
-
enumerable: !1,
|
|
442
|
-
writable: !1,
|
|
443
|
-
value: a
|
|
444
|
-
}), Object.defineProperty(i, "_source", {
|
|
445
|
-
configurable: !1,
|
|
446
|
-
enumerable: !1,
|
|
447
|
-
writable: !1,
|
|
448
|
-
value: d
|
|
449
|
-
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
450
|
-
};
|
|
451
|
-
function on(r, n, e, a, d) {
|
|
452
|
-
{
|
|
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
|
-
if (r && r.defaultProps) {
|
|
458
|
-
var w = r.defaultProps;
|
|
459
|
-
for (l in w)
|
|
460
|
-
s[l] === void 0 && (s[l] = w[l]);
|
|
461
|
-
}
|
|
462
|
-
if (i || _) {
|
|
463
|
-
var g = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
464
|
-
i && en(s, g), _ && an(s, g);
|
|
465
|
-
}
|
|
466
|
-
return tn(r, i, _, d, a, J.current, s);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
var pr = S.ReactCurrentOwner, Ir = S.ReactDebugCurrentFrame;
|
|
470
|
-
function Y(r) {
|
|
471
|
-
if (r) {
|
|
472
|
-
var n = r._owner, e = ar(r.type, r._source, n ? n.type : null);
|
|
473
|
-
Ir.setExtraStackFrame(e);
|
|
474
|
-
} else
|
|
475
|
-
Ir.setExtraStackFrame(null);
|
|
476
|
-
}
|
|
477
|
-
var fr;
|
|
478
|
-
fr = !1;
|
|
479
|
-
function vr(r) {
|
|
480
|
-
return typeof r == "object" && r !== null && r.$$typeof === p;
|
|
481
|
-
}
|
|
482
|
-
function Fr() {
|
|
483
|
-
{
|
|
484
|
-
if (pr.current) {
|
|
485
|
-
var r = j(pr.current.type);
|
|
486
|
-
if (r)
|
|
487
|
-
return `
|
|
488
|
-
|
|
489
|
-
Check the render method of \`` + r + "`.";
|
|
490
|
-
}
|
|
491
|
-
return "";
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
function sn(r) {
|
|
495
|
-
{
|
|
496
|
-
if (r !== void 0) {
|
|
497
|
-
var n = r.fileName.replace(/^.*[\\\/]/, ""), e = r.lineNumber;
|
|
498
|
-
return `
|
|
499
|
-
|
|
500
|
-
Check your code at ` + n + ":" + e + ".";
|
|
501
|
-
}
|
|
502
|
-
return "";
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
var Ar = {};
|
|
506
|
-
function dn(r) {
|
|
507
|
-
{
|
|
508
|
-
var n = Fr();
|
|
509
|
-
if (!n) {
|
|
510
|
-
var e = typeof r == "string" ? r : r.displayName || r.name;
|
|
511
|
-
e && (n = `
|
|
512
|
-
|
|
513
|
-
Check the top-level render call using <` + e + ">.");
|
|
514
|
-
}
|
|
515
|
-
return n;
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
function Dr(r, n) {
|
|
519
|
-
{
|
|
520
|
-
if (!r._store || r._store.validated || r.key != null)
|
|
521
|
-
return;
|
|
522
|
-
r._store.validated = !0;
|
|
523
|
-
var e = dn(n);
|
|
524
|
-
if (Ar[e])
|
|
525
|
-
return;
|
|
526
|
-
Ar[e] = !0;
|
|
527
|
-
var a = "";
|
|
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
|
-
}
|
|
530
|
-
}
|
|
531
|
-
function Wr(r, n) {
|
|
532
|
-
{
|
|
533
|
-
if (typeof r != "object")
|
|
534
|
-
return;
|
|
535
|
-
if (cr(r))
|
|
536
|
-
for (var e = 0; e < r.length; e++) {
|
|
537
|
-
var a = r[e];
|
|
538
|
-
vr(a) && Dr(a, n);
|
|
539
|
-
}
|
|
540
|
-
else if (vr(r))
|
|
541
|
-
r._store && (r._store.validated = !0);
|
|
542
|
-
else if (r) {
|
|
543
|
-
var d = $(r);
|
|
544
|
-
if (typeof d == "function" && d !== r.entries)
|
|
545
|
-
for (var l = d.call(r), s; !(s = l.next()).done; )
|
|
546
|
-
vr(s.value) && Dr(s.value, n);
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
function ln(r) {
|
|
551
|
-
{
|
|
552
|
-
var n = r.type;
|
|
553
|
-
if (n == null || typeof n == "string")
|
|
554
|
-
return;
|
|
555
|
-
var e;
|
|
556
|
-
if (typeof n == "function")
|
|
557
|
-
e = n.propTypes;
|
|
558
|
-
else if (typeof n == "object" && (n.$$typeof === f || // Note: Memo only checks outer props here.
|
|
559
|
-
// Inner props are checked in the reconciler.
|
|
560
|
-
n.$$typeof === T))
|
|
561
|
-
e = n.propTypes;
|
|
562
|
-
else
|
|
563
|
-
return;
|
|
564
|
-
if (e) {
|
|
565
|
-
var a = j(n);
|
|
566
|
-
Hr(e, r.props, "prop", a, r);
|
|
567
|
-
} else if (n.PropTypes !== void 0 && !fr) {
|
|
568
|
-
fr = !0;
|
|
569
|
-
var d = j(n);
|
|
570
|
-
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", d || "Unknown");
|
|
571
|
-
}
|
|
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
|
-
}
|
|
574
|
-
}
|
|
575
|
-
function cn(r) {
|
|
576
|
-
{
|
|
577
|
-
for (var n = Object.keys(r.props), e = 0; e < n.length; e++) {
|
|
578
|
-
var a = n[e];
|
|
579
|
-
if (a !== "children" && a !== "key") {
|
|
580
|
-
Y(r), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), Y(null);
|
|
581
|
-
break;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
r.ref !== null && (Y(r), h("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null));
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
var $r = {};
|
|
588
|
-
function Lr(r, n, e, a, d, l) {
|
|
589
|
-
{
|
|
590
|
-
var s = L(r);
|
|
591
|
-
if (!s) {
|
|
592
|
-
var i = "";
|
|
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 _ = 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
|
-
}
|
|
599
|
-
var g = on(r, n, e, d, l);
|
|
600
|
-
if (g == null)
|
|
601
|
-
return g;
|
|
602
|
-
if (s) {
|
|
603
|
-
var P = n.children;
|
|
604
|
-
if (P !== void 0)
|
|
605
|
-
if (a)
|
|
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
|
-
} else
|
|
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
|
-
else
|
|
613
|
-
Wr(P, r);
|
|
614
|
-
}
|
|
615
|
-
if (q.call(n, "key")) {
|
|
616
|
-
var N = j(r), C = Object.keys(n).filter(function(wn) {
|
|
617
|
-
return wn !== "key";
|
|
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
|
-
let props = %s;
|
|
623
|
-
<%s {...props} />
|
|
624
|
-
React keys must be passed directly to JSX without using spread:
|
|
625
|
-
let props = %s;
|
|
626
|
-
<%s key={someKey} {...props} />`, hr, N, hn, N), $r[N + hr] = !0;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
return r === b ? cn(g) : ln(g), g;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
function un(r, n, e) {
|
|
633
|
-
return Lr(r, n, e, !0);
|
|
634
|
-
}
|
|
635
|
-
function pn(r, n, e) {
|
|
636
|
-
return Lr(r, n, e, !1);
|
|
637
|
-
}
|
|
638
|
-
var fn = pn, vn = un;
|
|
639
|
-
K.Fragment = b, K.jsx = fn, K.jsxs = vn;
|
|
640
|
-
}()), K;
|
|
641
|
-
}
|
|
642
|
-
process.env.NODE_ENV === "production" ? wr.exports = bn() : wr.exports = xn();
|
|
643
|
-
var t = wr.exports;
|
|
644
|
-
const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
|
|
1
|
+
import { jsx as r, jsxs as l, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import F, { useState as y, useRef as k, useEffect as b, forwardRef as M } from "react";
|
|
3
|
+
const P = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
|
|
645
4
|
* {
|
|
646
5
|
margin: 0;
|
|
647
6
|
padding: 0;
|
|
@@ -650,27 +9,12 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
650
9
|
}
|
|
651
10
|
:root {
|
|
652
11
|
/* color */
|
|
653
|
-
/*
|
|
654
|
-
--starasia-ui-dropdown-color-primary-blue: var(
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
);
|
|
658
|
-
--starasia-ui-dropdown-color-
|
|
659
|
-
--starasia-ui-color-blue-500,
|
|
660
|
-
#3b82f6
|
|
661
|
-
);
|
|
662
|
-
--starasia-ui-dropdown-color-tertiary-blue: var(
|
|
663
|
-
--starasia-ui-color-blue-300,
|
|
664
|
-
#93c5fd
|
|
665
|
-
);
|
|
666
|
-
--starasia-ui-dropdown-color-quaternary-blue: var(
|
|
667
|
-
--starasia-ui-color-blue-100,
|
|
668
|
-
#dbeafe
|
|
669
|
-
);
|
|
670
|
-
--starasia-ui-dropdown-color-quinary-blue: var(
|
|
671
|
-
--starasia-ui-color-blue-50,
|
|
672
|
-
#eff6ff
|
|
673
|
-
);
|
|
12
|
+
/* brand */
|
|
13
|
+
--starasia-ui-dropdown-color-primary-blue: var(--starasia-ui-brand-primary-default);
|
|
14
|
+
--starasia-ui-dropdown-color-secondary-blue: var(--starasia-ui-brand-primary-default);
|
|
15
|
+
--starasia-ui-dropdown-color-tertiary-blue: var(--starasia-ui-brand-primary-secondary);
|
|
16
|
+
--starasia-ui-dropdown-color-quaternary-blue: var(--starasia-ui-brand-primary-tertiary);
|
|
17
|
+
--starasia-ui-dropdown-color-quinary-blue: var(--starasia-ui-brand-primary-tertiary);
|
|
674
18
|
/* gray */
|
|
675
19
|
--starasia-ui-dropdown-color-primary-gray: var(
|
|
676
20
|
--starasia-ui-color-gray-700,
|
|
@@ -709,10 +53,7 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
709
53
|
);
|
|
710
54
|
|
|
711
55
|
/* border color */
|
|
712
|
-
--starasia-ui-dropdown-border-color-primary: var(
|
|
713
|
-
--starasia-ui-color-blue-500,
|
|
714
|
-
#3b82f6
|
|
715
|
-
);
|
|
56
|
+
--starasia-ui-dropdown-border-color-primary: var(--starasia-ui-brand-primary-default);
|
|
716
57
|
--starasia-ui-dropdown-border-color-secondary: var(
|
|
717
58
|
--starasia-ui-color-gray-300,
|
|
718
59
|
#d1d5db
|
|
@@ -738,7 +79,7 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
738
79
|
--starasia-ui-dropdown-spacing-sm: var(--starasia-ui-spacing-sm, 8px);
|
|
739
80
|
|
|
740
81
|
/* shadow */
|
|
741
|
-
--starasia-ui-dropdown-box-shadow: 0px 0px 0px 2px rgba(
|
|
82
|
+
--starasia-ui-dropdown-box-shadow: 0px 0px 0px 2px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.2);
|
|
742
83
|
|
|
743
84
|
/* below is for size,above is */
|
|
744
85
|
--starasia-ui-dropdown-fontWeight-normal: var(
|
|
@@ -906,12 +247,12 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
906
247
|
}
|
|
907
248
|
|
|
908
249
|
.starasia-input-dropdwon-item:hover {
|
|
909
|
-
background-color: rgba(
|
|
250
|
+
background-color: rgba(var(--starasia-ui-raw-color-brand-secondary), 0.21);
|
|
910
251
|
}
|
|
911
252
|
.starasia-input-dropdwon-item.active {
|
|
912
253
|
/* color: var(--starasia-ui-dropdown-background-color-primary); */
|
|
913
254
|
/* border-radius: var(--borderRadius); */
|
|
914
|
-
background-color: rgba(
|
|
255
|
+
background-color: rgba(var(--starasia-ui-raw-color-brand-secondary), 0.21);
|
|
915
256
|
/* background: var(--starasia-ui-dropdown-background-color-secondary); */
|
|
916
257
|
/* box-shadow: 0px 0px 0px -1px #f0f0f0; */
|
|
917
258
|
}
|
|
@@ -956,7 +297,7 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
956
297
|
font-weight: 500;
|
|
957
298
|
}
|
|
958
299
|
.starasia-input-dropdwon-item-text.active {
|
|
959
|
-
color:
|
|
300
|
+
color: var(--starasia-ui-brand-primary-default);
|
|
960
301
|
}
|
|
961
302
|
|
|
962
303
|
.starasia-input-dropdwon-item-text-description {
|
|
@@ -966,14 +307,14 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
966
307
|
font-weight: 400;
|
|
967
308
|
}
|
|
968
309
|
.starasia-input-dropdwon-item-text-description.active {
|
|
969
|
-
color:
|
|
310
|
+
color: var(--starasia-ui-brand-primary-default);
|
|
970
311
|
}
|
|
971
312
|
|
|
972
313
|
/* for checkbox */
|
|
973
314
|
.checkbox-wrapper-30 .checkbox {
|
|
974
315
|
--bg: #fff;
|
|
975
316
|
--brdr: #d1d6ee;
|
|
976
|
-
--brdr-actv:
|
|
317
|
+
--brdr-actv: var(--starasia-ui-brand-primary-default);
|
|
977
318
|
--brdr-hovr: #bbc1e1;
|
|
978
319
|
--dur: calc((var(--size, 2) / 2) * 0.6s);
|
|
979
320
|
display: inline-block;
|
|
@@ -1046,23 +387,23 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
1046
387
|
width: 100%;
|
|
1047
388
|
}
|
|
1048
389
|
`;
|
|
1049
|
-
function
|
|
1050
|
-
const [
|
|
1051
|
-
|
|
390
|
+
function V(a) {
|
|
391
|
+
const [i, t] = y(a), c = k(null), o = (e) => {
|
|
392
|
+
c.current && !c.current.contains(e.target) && t(!1);
|
|
1052
393
|
};
|
|
1053
|
-
return
|
|
1054
|
-
document.removeEventListener("click",
|
|
1055
|
-
}), []), { ref:
|
|
394
|
+
return b(() => (document.addEventListener("click", o, !0), () => {
|
|
395
|
+
document.removeEventListener("click", o, !0);
|
|
396
|
+
}), []), { ref: c, isComponentVisible: i, setIsComponentVisible: t };
|
|
1056
397
|
}
|
|
1057
|
-
const
|
|
398
|
+
const J = ({ ...a }) => /* @__PURE__ */ r(
|
|
1058
399
|
"svg",
|
|
1059
400
|
{
|
|
1060
401
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1061
|
-
...
|
|
402
|
+
...a,
|
|
1062
403
|
viewBox: "0 0 24 24",
|
|
1063
404
|
fill: "none",
|
|
1064
405
|
color: "#939E99",
|
|
1065
|
-
children: /* @__PURE__ */
|
|
406
|
+
children: /* @__PURE__ */ r(
|
|
1066
407
|
"path",
|
|
1067
408
|
{
|
|
1068
409
|
d: "M4 9L12 17L20 9",
|
|
@@ -1073,15 +414,15 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
|
|
|
1073
414
|
}
|
|
1074
415
|
)
|
|
1075
416
|
}
|
|
1076
|
-
),
|
|
417
|
+
), G = ({ ...a }) => /* @__PURE__ */ l(
|
|
1077
418
|
"svg",
|
|
1078
419
|
{
|
|
1079
420
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1080
|
-
...
|
|
421
|
+
...a,
|
|
1081
422
|
viewBox: "0 0 20 20",
|
|
1082
423
|
fill: "none",
|
|
1083
424
|
children: [
|
|
1084
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ r(
|
|
1085
426
|
"circle",
|
|
1086
427
|
{
|
|
1087
428
|
cx: "9.80547",
|
|
@@ -1093,7 +434,7 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
|
|
|
1093
434
|
strokeLinejoin: "round"
|
|
1094
435
|
}
|
|
1095
436
|
),
|
|
1096
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ r(
|
|
1097
438
|
"path",
|
|
1098
439
|
{
|
|
1099
440
|
d: "M15.0153 15.4043L17.9519 18.3333",
|
|
@@ -1105,19 +446,19 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
|
|
|
1105
446
|
)
|
|
1106
447
|
]
|
|
1107
448
|
}
|
|
1108
|
-
),
|
|
1109
|
-
/* @__PURE__ */
|
|
1110
|
-
/* @__PURE__ */
|
|
449
|
+
), K = ({ isChecked: a }) => /* @__PURE__ */ l("div", { className: "checkbox-wrapper-30", children: [
|
|
450
|
+
/* @__PURE__ */ l("span", { className: "checkbox", children: [
|
|
451
|
+
/* @__PURE__ */ r(
|
|
1111
452
|
"input",
|
|
1112
453
|
{
|
|
1113
454
|
type: "checkbox",
|
|
1114
455
|
style: { pointerEvents: "none" },
|
|
1115
|
-
checked:
|
|
456
|
+
checked: a
|
|
1116
457
|
}
|
|
1117
458
|
),
|
|
1118
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ r("svg", { children: /* @__PURE__ */ r("use", { xlinkHref: "#checkbox-30", className: "checkbox" }) })
|
|
1119
460
|
] }),
|
|
1120
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ r("svg", { xmlns: "http://www.w3.org/2000/svg", style: { display: "none" }, children: /* @__PURE__ */ r("symbol", { id: "checkbox-30", viewBox: "0 0 22 22", children: /* @__PURE__ */ r(
|
|
1121
462
|
"path",
|
|
1122
463
|
{
|
|
1123
464
|
fill: "none",
|
|
@@ -1125,58 +466,58 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
|
|
|
1125
466
|
d: "M5.5,11.3L9,14.8L20.2,3.3l0,0c-0.5-1-1.5-1.8-2.7-1.8h-13c-1.7,0-3,1.3-3,3v13c0,1.7,1.3,3,3,3h13 c1.7,0,3-1.3,3-3v-13c0-0.4-0.1-0.8-0.3-1.2"
|
|
1126
467
|
}
|
|
1127
468
|
) }) })
|
|
1128
|
-
] }),
|
|
469
|
+
] }), Q = M(
|
|
1129
470
|
({
|
|
1130
|
-
positionDropdown:
|
|
1131
|
-
dropdownLists:
|
|
1132
|
-
isComponentVisible:
|
|
1133
|
-
searchAble:
|
|
1134
|
-
onSearch:
|
|
1135
|
-
value:
|
|
1136
|
-
handleChangeValue:
|
|
1137
|
-
multiSelect:
|
|
1138
|
-
searchValue:
|
|
1139
|
-
},
|
|
1140
|
-
const [
|
|
1141
|
-
return
|
|
1142
|
-
if (
|
|
1143
|
-
const
|
|
1144
|
-
|
|
1145
|
-
}
|
|
1146
|
-
}, [
|
|
1147
|
-
|
|
1148
|
-
if (
|
|
1149
|
-
|
|
471
|
+
positionDropdown: a,
|
|
472
|
+
dropdownLists: i,
|
|
473
|
+
isComponentVisible: t,
|
|
474
|
+
searchAble: c,
|
|
475
|
+
onSearch: o,
|
|
476
|
+
value: e,
|
|
477
|
+
handleChangeValue: h,
|
|
478
|
+
multiSelect: p,
|
|
479
|
+
searchValue: v
|
|
480
|
+
}, I) => {
|
|
481
|
+
const [C, R] = y(0), [$, z] = y(), w = k(null);
|
|
482
|
+
return b(() => {
|
|
483
|
+
if (w.current) {
|
|
484
|
+
const n = w.current.getBoundingClientRect();
|
|
485
|
+
R(n.width);
|
|
486
|
+
}
|
|
487
|
+
}, [w, t]), b(() => {
|
|
488
|
+
i && v ? i.forEach((n) => {
|
|
489
|
+
if (n.label.startsWith(v || "")) {
|
|
490
|
+
z(n.value);
|
|
1150
491
|
return;
|
|
1151
492
|
}
|
|
1152
|
-
}) :
|
|
1153
|
-
}, [
|
|
493
|
+
}) : z(void 0);
|
|
494
|
+
}, [v, i]), /* @__PURE__ */ r(q, { children: t ? /* @__PURE__ */ l(
|
|
1154
495
|
"div",
|
|
1155
496
|
{
|
|
1156
497
|
className: "starasia-input-dropdown-lists-container",
|
|
1157
|
-
onClick: (
|
|
1158
|
-
ref:
|
|
498
|
+
onClick: (n) => n.stopPropagation(),
|
|
499
|
+
ref: I,
|
|
1159
500
|
children: [
|
|
1160
|
-
|
|
501
|
+
c ? /* @__PURE__ */ l(
|
|
1161
502
|
"div",
|
|
1162
503
|
{
|
|
1163
504
|
className: "starasia-input-dropdown-container-dropdown-search",
|
|
1164
505
|
style: {
|
|
1165
|
-
order:
|
|
506
|
+
order: a == "bottom" ? 0 : 2,
|
|
1166
507
|
position: "sticky",
|
|
1167
508
|
top: 0,
|
|
1168
509
|
bottom: 0,
|
|
1169
510
|
zIndex: 1
|
|
1170
511
|
},
|
|
1171
512
|
children: [
|
|
1172
|
-
/* @__PURE__ */
|
|
1173
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ r("div", { style: { display: "flex" }, children: /* @__PURE__ */ r(G, { strokeWidth: 2, width: 20 }) }),
|
|
514
|
+
/* @__PURE__ */ r(
|
|
1174
515
|
"input",
|
|
1175
516
|
{
|
|
1176
|
-
onChange: (
|
|
1177
|
-
|
|
517
|
+
onChange: (n) => {
|
|
518
|
+
o && o(n.target.value);
|
|
1178
519
|
},
|
|
1179
|
-
value:
|
|
520
|
+
value: v,
|
|
1180
521
|
autoFocus: !0,
|
|
1181
522
|
style: { width: "100%" }
|
|
1182
523
|
}
|
|
@@ -1184,54 +525,54 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
|
|
|
1184
525
|
]
|
|
1185
526
|
}
|
|
1186
527
|
) : null,
|
|
1187
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ r(
|
|
1188
529
|
"div",
|
|
1189
530
|
{
|
|
1190
|
-
className: `starasia-input-dropdwon-item-container ${
|
|
1191
|
-
ref:
|
|
1192
|
-
children:
|
|
1193
|
-
const
|
|
1194
|
-
return /* @__PURE__ */
|
|
531
|
+
className: `starasia-input-dropdwon-item-container ${p ? "multi" : ""}`,
|
|
532
|
+
ref: w,
|
|
533
|
+
children: i.map((n, x) => {
|
|
534
|
+
const f = !!(e != null && e.find((E) => E.value === n.value));
|
|
535
|
+
return /* @__PURE__ */ l(
|
|
1195
536
|
"div",
|
|
1196
537
|
{
|
|
1197
|
-
className: `starasia-input-dropdwon-item ${
|
|
1198
|
-
onClick: () =>
|
|
538
|
+
className: `starasia-input-dropdwon-item ${f ? "active" : " "} ${n.disable ? "starasia-input-dropdwon-item-disable" : null}`,
|
|
539
|
+
onClick: () => h(n.label, n.value),
|
|
1199
540
|
children: [
|
|
1200
|
-
|
|
1201
|
-
|
|
541
|
+
p ? /* @__PURE__ */ r("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ r(K, { isChecked: f }) }) : null,
|
|
542
|
+
n.icon ? /* @__PURE__ */ r("div", { children: F.cloneElement(n.icon, {
|
|
1202
543
|
width: 16
|
|
1203
544
|
}) }) : null,
|
|
1204
|
-
/* @__PURE__ */
|
|
1205
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ l("div", { children: [
|
|
546
|
+
/* @__PURE__ */ r(
|
|
1206
547
|
"p",
|
|
1207
548
|
{
|
|
1208
|
-
className: `starasia-input-dropdwon-item-text ${
|
|
549
|
+
className: `starasia-input-dropdwon-item-text ${f ? "active" : null} ${n.disable ? "starasia-input-dropdwon-item-disable" : null}`,
|
|
1209
550
|
style: {
|
|
1210
551
|
textWrap: "nowrap",
|
|
1211
|
-
width: `${
|
|
552
|
+
width: `${C - 12}px`,
|
|
1212
553
|
overflow: "hidden",
|
|
1213
554
|
textOverflow: "ellipsis"
|
|
1214
555
|
},
|
|
1215
|
-
children:
|
|
556
|
+
children: n.label
|
|
1216
557
|
}
|
|
1217
558
|
),
|
|
1218
|
-
|
|
559
|
+
n.description ? /* @__PURE__ */ r(
|
|
1219
560
|
"p",
|
|
1220
561
|
{
|
|
1221
|
-
className: `starasia-input-dropdwon-item-text-description ${
|
|
562
|
+
className: `starasia-input-dropdwon-item-text-description ${f ? "active" : null} ${n.disable ? "starasia-input-dropdwon-item-disable" : null}`,
|
|
1222
563
|
style: {
|
|
1223
564
|
textWrap: "nowrap",
|
|
1224
|
-
width: `${
|
|
565
|
+
width: `${C - 12}px`,
|
|
1225
566
|
overflow: "hidden",
|
|
1226
567
|
textOverflow: "ellipsis"
|
|
1227
568
|
},
|
|
1228
|
-
children:
|
|
569
|
+
children: n.description
|
|
1229
570
|
}
|
|
1230
571
|
) : null
|
|
1231
572
|
] })
|
|
1232
573
|
]
|
|
1233
574
|
},
|
|
1234
|
-
|
|
575
|
+
x
|
|
1235
576
|
);
|
|
1236
577
|
})
|
|
1237
578
|
}
|
|
@@ -1240,149 +581,149 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
|
|
|
1240
581
|
}
|
|
1241
582
|
) : null });
|
|
1242
583
|
}
|
|
1243
|
-
),
|
|
1244
|
-
children:
|
|
1245
|
-
handleChangePosition:
|
|
584
|
+
), T = ({
|
|
585
|
+
children: a,
|
|
586
|
+
handleChangePosition: i
|
|
1246
587
|
}) => {
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1249
|
-
var
|
|
1250
|
-
const
|
|
1251
|
-
if (
|
|
1252
|
-
let
|
|
1253
|
-
for (;
|
|
1254
|
-
|
|
1255
|
-
|
|
588
|
+
const t = k(null);
|
|
589
|
+
b(() => {
|
|
590
|
+
var h;
|
|
591
|
+
const o = () => {
|
|
592
|
+
if (t.current) {
|
|
593
|
+
let p = t.current.parentElement;
|
|
594
|
+
for (; p && !c(p); )
|
|
595
|
+
p = p.parentElement;
|
|
596
|
+
p && i();
|
|
1256
597
|
}
|
|
1257
598
|
};
|
|
1258
|
-
let
|
|
1259
|
-
for (;
|
|
1260
|
-
|
|
1261
|
-
return
|
|
1262
|
-
|
|
599
|
+
let e = (h = t.current) == null ? void 0 : h.parentElement;
|
|
600
|
+
for (; e && !c(e); )
|
|
601
|
+
e = e.parentElement;
|
|
602
|
+
return e && e.addEventListener("scroll", o), o(), () => {
|
|
603
|
+
e && e.removeEventListener("scroll", o);
|
|
1263
604
|
};
|
|
1264
605
|
}, []);
|
|
1265
|
-
const
|
|
1266
|
-
return /* @__PURE__ */
|
|
1267
|
-
},
|
|
1268
|
-
if (!document.getElementById(
|
|
1269
|
-
const
|
|
1270
|
-
|
|
606
|
+
const c = (o) => o && (o.scrollHeight > o.clientHeight || o.scrollWidth > o.clientWidth);
|
|
607
|
+
return /* @__PURE__ */ r("div", { ref: t, children: a });
|
|
608
|
+
}, A = "starasia-input-dropdown-styles", U = (a) => {
|
|
609
|
+
if (!document.getElementById(A)) {
|
|
610
|
+
const i = document.createElement("style");
|
|
611
|
+
i.id = A, i.textContent = a, document.head.appendChild(i);
|
|
1271
612
|
}
|
|
1272
613
|
};
|
|
1273
|
-
|
|
1274
|
-
const
|
|
1275
|
-
dropdownLists:
|
|
1276
|
-
onChange:
|
|
1277
|
-
defaultValue:
|
|
1278
|
-
size:
|
|
1279
|
-
multiSelect:
|
|
1280
|
-
searchAble:
|
|
1281
|
-
iconLeft:
|
|
1282
|
-
placeholder:
|
|
1283
|
-
onSearch:
|
|
1284
|
-
error:
|
|
1285
|
-
onBlur:
|
|
1286
|
-
onFocus:
|
|
1287
|
-
disable:
|
|
1288
|
-
searchValue:
|
|
614
|
+
U(P);
|
|
615
|
+
const _ = ({
|
|
616
|
+
dropdownLists: a,
|
|
617
|
+
onChange: i,
|
|
618
|
+
defaultValue: t,
|
|
619
|
+
size: c = "md",
|
|
620
|
+
multiSelect: o,
|
|
621
|
+
searchAble: e,
|
|
622
|
+
iconLeft: h,
|
|
623
|
+
placeholder: p,
|
|
624
|
+
onSearch: v,
|
|
625
|
+
error: I,
|
|
626
|
+
onBlur: C,
|
|
627
|
+
onFocus: R,
|
|
628
|
+
disable: $,
|
|
629
|
+
searchValue: z
|
|
1289
630
|
}) => {
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1292
|
-
},
|
|
1293
|
-
if (!
|
|
1294
|
-
|
|
1295
|
-
else if (
|
|
1296
|
-
const
|
|
1297
|
-
...
|
|
631
|
+
const w = k(), [n, x] = y([]), [f, E] = y(""), g = k(null), { isComponentVisible: B, ref: L, setIsComponentVisible: N } = V(!1), H = () => {
|
|
632
|
+
N((s) => !s);
|
|
633
|
+
}, j = (s, d) => {
|
|
634
|
+
if (!o)
|
|
635
|
+
x([{ label: s, value: d }]), i([{ label: s, value: d }]), N(!1);
|
|
636
|
+
else if (n == null ? void 0 : n.find((u) => u.value === d)) {
|
|
637
|
+
const u = [
|
|
638
|
+
...n ? n.filter((D) => D.value !== d) : []
|
|
1298
639
|
];
|
|
1299
|
-
|
|
640
|
+
x(u), i(u);
|
|
1300
641
|
} else {
|
|
1301
|
-
const
|
|
1302
|
-
|
|
642
|
+
const u = [...n || [], { label: s, value: d }];
|
|
643
|
+
x(u), i(u);
|
|
1303
644
|
}
|
|
1304
645
|
};
|
|
1305
|
-
|
|
1306
|
-
JSON.stringify(
|
|
1307
|
-
}, [
|
|
1308
|
-
const
|
|
1309
|
-
/* @__PURE__ */
|
|
1310
|
-
/* @__PURE__ */
|
|
1311
|
-
|
|
646
|
+
b(() => {
|
|
647
|
+
JSON.stringify(w.current) === JSON.stringify(t) || (w.current = t, x(w.current || []));
|
|
648
|
+
}, [t]);
|
|
649
|
+
const O = () => n.length ? o ? n == null ? void 0 : n.map((s, d) => /* @__PURE__ */ l("div", { className: "starasia-input-dropdown-preview-item", children: [
|
|
650
|
+
/* @__PURE__ */ r("p", { style: { minWidth: "max-content" }, children: s == null ? void 0 : s.label }, d),
|
|
651
|
+
/* @__PURE__ */ r(
|
|
652
|
+
X,
|
|
1312
653
|
{
|
|
1313
|
-
onClick: () =>
|
|
654
|
+
onClick: () => j(s.label, s.value)
|
|
1314
655
|
}
|
|
1315
656
|
)
|
|
1316
|
-
] })) : /* @__PURE__ */
|
|
1317
|
-
if (
|
|
1318
|
-
const
|
|
1319
|
-
|
|
657
|
+
] })) : /* @__PURE__ */ r("p", { style: { minWidth: "max-content" }, children: n == null ? void 0 : n[0].label }) : /* @__PURE__ */ r("p", { className: "starasia-input-dropdown-placeholder", children: p }), m = () => {
|
|
658
|
+
if (L.current && g.current) {
|
|
659
|
+
const s = window.innerHeight, d = L.current.getBoundingClientRect(), W = g.current.getBoundingClientRect(), u = d.bottom + W.height;
|
|
660
|
+
g.current.style.left = `${d.left}px`, g.current.style.width = `${d.width}px`, u >= s - 10 ? (g.current.style.top = `${d.top - W.height - 5}px`, E("top")) : (g.current.style.top = `${d.top + d.height}px`, E("bottom"));
|
|
1320
661
|
}
|
|
1321
662
|
};
|
|
1322
|
-
return
|
|
1323
|
-
window.removeEventListener("scroll",
|
|
1324
|
-
}), []),
|
|
1325
|
-
|
|
1326
|
-
}, [
|
|
663
|
+
return b(() => (window.addEventListener("scroll", m), window.addEventListener("resize", m), () => {
|
|
664
|
+
window.removeEventListener("scroll", m), window.removeEventListener("resize", m);
|
|
665
|
+
}), []), b(() => {
|
|
666
|
+
m();
|
|
667
|
+
}, [B]), /* @__PURE__ */ r(T, { handleChangePosition: m, children: /* @__PURE__ */ l(
|
|
1327
668
|
"div",
|
|
1328
669
|
{
|
|
1329
|
-
className: `starasia-input-dropdown-container ${
|
|
1330
|
-
ref:
|
|
1331
|
-
onClick:
|
|
670
|
+
className: `starasia-input-dropdown-container ${$ ? "disable" : ""} starasia-input-dropdown-size-${c} ${B ? "active" : ""} ${I ? "error" : ""}`,
|
|
671
|
+
ref: L,
|
|
672
|
+
onClick: H,
|
|
1332
673
|
children: [
|
|
1333
|
-
/* @__PURE__ */
|
|
1334
|
-
|
|
1335
|
-
width:
|
|
674
|
+
/* @__PURE__ */ l("div", { className: "starasia-input-dropdown-preview-container", children: [
|
|
675
|
+
h ? /* @__PURE__ */ r(q, { children: F.cloneElement(h, {
|
|
676
|
+
width: S(c),
|
|
1336
677
|
color: "#939E99",
|
|
1337
678
|
style: {
|
|
1338
679
|
color: "#939E99"
|
|
1339
680
|
}
|
|
1340
681
|
}) }) : null,
|
|
1341
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ r(
|
|
1342
683
|
"div",
|
|
1343
684
|
{
|
|
1344
685
|
className: "starasia-input-dropdown-container-preview-item",
|
|
1345
686
|
tabIndex: 100,
|
|
1346
|
-
onBlur:
|
|
1347
|
-
onFocus:
|
|
1348
|
-
children:
|
|
687
|
+
onBlur: C,
|
|
688
|
+
onFocus: R,
|
|
689
|
+
children: O()
|
|
1349
690
|
}
|
|
1350
691
|
),
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
|
|
692
|
+
/* @__PURE__ */ r(
|
|
693
|
+
J,
|
|
1353
694
|
{
|
|
1354
695
|
strokeWidth: 2,
|
|
1355
|
-
width:
|
|
696
|
+
width: S(c),
|
|
1356
697
|
style: { color: "#939E99" }
|
|
1357
698
|
}
|
|
1358
699
|
)
|
|
1359
700
|
] }),
|
|
1360
|
-
/* @__PURE__ */
|
|
1361
|
-
|
|
701
|
+
/* @__PURE__ */ r(
|
|
702
|
+
Q,
|
|
1362
703
|
{
|
|
1363
|
-
dropdownLists:
|
|
1364
|
-
handleChangeValue:
|
|
1365
|
-
isComponentVisible:
|
|
1366
|
-
positionDropdown:
|
|
1367
|
-
searchAble: !!
|
|
1368
|
-
value:
|
|
1369
|
-
onSearch:
|
|
1370
|
-
ref:
|
|
1371
|
-
multiSelect:
|
|
1372
|
-
searchValue:
|
|
704
|
+
dropdownLists: a,
|
|
705
|
+
handleChangeValue: j,
|
|
706
|
+
isComponentVisible: B,
|
|
707
|
+
positionDropdown: f,
|
|
708
|
+
searchAble: !!e,
|
|
709
|
+
value: n,
|
|
710
|
+
onSearch: v,
|
|
711
|
+
ref: g,
|
|
712
|
+
multiSelect: o,
|
|
713
|
+
searchValue: z
|
|
1373
714
|
}
|
|
1374
715
|
)
|
|
1375
716
|
]
|
|
1376
717
|
}
|
|
1377
718
|
) });
|
|
1378
|
-
},
|
|
1379
|
-
if (
|
|
719
|
+
}, S = (a) => {
|
|
720
|
+
if (a === "sm")
|
|
1380
721
|
return 16;
|
|
1381
|
-
if (
|
|
722
|
+
if (a === "md")
|
|
1382
723
|
return 16;
|
|
1383
|
-
if (
|
|
724
|
+
if (a === "lg")
|
|
1384
725
|
return 20;
|
|
1385
|
-
},
|
|
726
|
+
}, X = (a) => /* @__PURE__ */ r(
|
|
1386
727
|
"svg",
|
|
1387
728
|
{
|
|
1388
729
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1390,8 +731,8 @@ const Sn = ({
|
|
|
1390
731
|
height: "18",
|
|
1391
732
|
viewBox: "0 0 18 18",
|
|
1392
733
|
fill: "none",
|
|
1393
|
-
...
|
|
1394
|
-
children: /* @__PURE__ */
|
|
734
|
+
...a,
|
|
735
|
+
children: /* @__PURE__ */ r(
|
|
1395
736
|
"path",
|
|
1396
737
|
{
|
|
1397
738
|
d: "M12 6L6 12M6.00001 6L12 12",
|
|
@@ -1404,5 +745,5 @@ const Sn = ({
|
|
|
1404
745
|
}
|
|
1405
746
|
);
|
|
1406
747
|
export {
|
|
1407
|
-
|
|
748
|
+
_ as Dropdown
|
|
1408
749
|
};
|