@starasia/dropdown 1.0.0 → 1.0.2

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.
@@ -1,5 +1,5 @@
1
- import or, { useState as G, useRef as X, useEffect as B, forwardRef as gn } from "react";
2
- var wr = { exports: {} }, H = {};
1
+ import or, { useState as Z, useRef as H, useEffect as N, forwardRef as gn } from "react";
2
+ var wr = { exports: {} }, G = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
@@ -12,22 +12,22 @@ var wr = { exports: {} }, H = {};
12
12
  var zr;
13
13
  function bn() {
14
14
  if (zr)
15
- return H;
15
+ return G;
16
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 };
17
+ var u = or, p = Symbol.for("react.element"), x = Symbol.for("react.fragment"), k = Object.prototype.hasOwnProperty, f = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function P(R, g, C) {
19
+ var _, $ = {}, E = null, L = null;
20
+ C !== void 0 && (E = "" + C), g.key !== void 0 && (E = "" + g.key), g.ref !== void 0 && (L = g.ref);
21
+ for (_ in g)
22
+ k.call(g, _) && !h.hasOwnProperty(_) && ($[_] = g[_]);
23
+ if (R && R.defaultProps)
24
+ for (_ in g = R.defaultProps, g)
25
+ $[_] === void 0 && ($[_] = g[_]);
26
+ return { $$typeof: p, type: R, key: E, ref: L, props: $, _owner: f.current };
27
27
  }
28
- return H.Fragment = x, H.jsx = O, H.jsxs = O, H;
28
+ return G.Fragment = x, G.jsx = P, G.jsxs = P, G;
29
29
  }
30
- var K = {};
30
+ var X = {};
31
31
  /**
32
32
  * @license React
33
33
  * react-jsx-runtime.development.js
@@ -40,88 +40,88 @@ var K = {};
40
40
  var Nr;
41
41
  function xn() {
42
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) {
43
+ var u = or, p = Symbol.for("react.element"), x = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), R = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), $ = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), A = Symbol.iterator, m = "@@iterator";
44
+ function o(r) {
45
45
  if (r === null || typeof r != "object")
46
46
  return null;
47
- var n = I && r[I] || r[o];
47
+ var n = A && r[A] || r[m];
48
48
  return typeof n == "function" ? n : null;
49
49
  }
50
- var S = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
- function h(r) {
50
+ var v = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
+ function l(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
- W("error", r, e);
55
+ w("error", r, e);
56
56
  }
57
57
  }
58
- function W(r, n, e) {
58
+ function w(r, n, e) {
59
59
  {
60
- var a = S.ReactDebugCurrentFrame, d = a.getStackAddendum();
60
+ var a = v.ReactDebugCurrentFrame, d = a.getStackAddendum();
61
61
  d !== "" && (n += "%s", e = e.concat([d]));
62
- var l = e.map(function(s) {
62
+ var c = e.map(function(s) {
63
63
  return String(s);
64
64
  });
65
- l.unshift("Warning: " + n), Function.prototype.apply.call(console[r], console, l);
65
+ c.unshift("Warning: " + n), Function.prototype.apply.call(console[r], console, c);
66
66
  }
67
67
  }
68
- var V = !1, U = !1, Z = !1, ir = !1, Q = !1, rr;
68
+ var j = !1, z = !1, B = !1, ir = !1, Q = !1, rr;
69
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
70
+ function Y(r) {
71
+ return !!(typeof r == "string" || typeof r == "function" || r === k || r === h || Q || r === f || r === C || r === _ || ir || r === L || j || z || B || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === $ || r.$$typeof === P || r.$$typeof === R || r.$$typeof === g || // 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 R(r, n, e) {
77
+ function T(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 k(r) {
84
+ function O(r) {
85
85
  return r.displayName || "Context";
86
86
  }
87
- function j(r) {
87
+ function D(r) {
88
88
  if (r == null)
89
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")
90
+ if (typeof r.tag == "number" && l("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 b:
95
+ case k:
96
96
  return "Fragment";
97
97
  case x:
98
98
  return "Portal";
99
- case v:
99
+ case h:
100
100
  return "Profiler";
101
- case u:
101
+ case f:
102
102
  return "StrictMode";
103
- case F:
103
+ case C:
104
104
  return "Suspense";
105
- case y:
105
+ case _:
106
106
  return "SuspenseList";
107
107
  }
108
108
  if (typeof r == "object")
109
109
  switch (r.$$typeof) {
110
- case m:
110
+ case R:
111
111
  var n = r;
112
- return k(n) + ".Consumer";
113
- case O:
112
+ return O(n) + ".Consumer";
113
+ case P:
114
114
  var e = r;
115
- return k(e._context) + ".Provider";
116
- case f:
117
- return R(r, r.render, "ForwardRef");
118
- case T:
115
+ return O(e._context) + ".Provider";
116
+ case g:
117
+ return T(r, r.render, "ForwardRef");
118
+ case $:
119
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;
120
+ return a !== null ? a : D(r.type) || "Memo";
121
+ case E: {
122
+ var d = r, c = d._payload, s = d._init;
123
123
  try {
124
- return j(s(l));
124
+ return D(s(c));
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 E = Object.assign, z = 0, gr, br, xr, mr, yr, kr, Er;
132
+ var S = Object.assign, M = 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 (z === 0) {
138
+ if (M === 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
- z++;
156
+ M++;
157
157
  }
158
158
  }
159
159
  function Vr() {
160
160
  {
161
- if (z--, z === 0) {
161
+ if (M--, M === 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: E({}, r, {
168
+ log: S({}, r, {
169
169
  value: gr
170
170
  }),
171
- info: E({}, r, {
171
+ info: S({}, r, {
172
172
  value: br
173
173
  }),
174
- warn: E({}, r, {
174
+ warn: S({}, r, {
175
175
  value: xr
176
176
  }),
177
- error: E({}, r, {
177
+ error: S({}, r, {
178
178
  value: mr
179
179
  }),
180
- group: E({}, r, {
180
+ group: S({}, r, {
181
181
  value: yr
182
182
  }),
183
- groupCollapsed: E({}, r, {
183
+ groupCollapsed: S({}, r, {
184
184
  value: kr
185
185
  }),
186
- groupEnd: E({}, r, {
186
+ groupEnd: S({}, r, {
187
187
  value: Er
188
188
  })
189
189
  });
190
190
  }
191
- z < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
191
+ M < 0 && l("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
192
  }
193
193
  }
194
- var sr = S.ReactCurrentDispatcher, dr;
194
+ var sr = v.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 l;
226
- l = sr.current, sr.current = null, Mr();
225
+ var c;
226
+ c = 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 (C) {
240
- a = C;
239
+ } catch (F) {
240
+ a = F;
241
241
  }
242
242
  Reflect.construct(r, [], s);
243
243
  } else {
244
244
  try {
245
245
  s.call();
246
- } catch (C) {
247
- a = C;
246
+ } catch (F) {
247
+ a = F;
248
248
  }
249
249
  r.call(s.prototype);
250
250
  }
251
251
  } else {
252
252
  try {
253
253
  throw Error();
254
- } catch (C) {
255
- a = C;
254
+ } catch (F) {
255
+ a = F;
256
256
  }
257
257
  r();
258
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)
259
+ } catch (F) {
260
+ if (F && a && typeof F.stack == "string") {
261
+ for (var i = F.stack.split(`
262
+ `), I = a.stack.split(`
263
+ `), b = i.length - 1, y = I.length - 1; b >= 1 && y >= 0 && i[b] !== I[y]; )
264
+ y--;
265
+ for (; b >= 1 && y >= 0; b--, y--)
266
+ if (i[b] !== I[y]) {
267
+ if (b !== 1 || y !== 1)
268
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;
269
+ if (b--, y--, y < 0 || i[b] !== I[y]) {
270
+ var W = `
271
+ ` + i[b].replace(" at new ", " at ");
272
+ return r.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", r.displayName)), typeof r == "function" && er.set(r, W), W;
273
273
  }
274
- while (w >= 1 && g >= 0);
274
+ while (b >= 1 && y >= 0);
275
275
  break;
276
276
  }
277
277
  }
278
278
  } finally {
279
- lr = !1, sr.current = l, Vr(), Error.prepareStackTrace = d;
279
+ lr = !1, sr.current = c, Vr(), Error.prepareStackTrace = d;
280
280
  }
281
- var M = r ? r.displayName || r.name : "", N = M ? nr(M) : "";
282
- return typeof r == "function" && er.set(r, N), N;
281
+ var q = r ? r.displayName || r.name : "", V = q ? nr(q) : "";
282
+ return typeof r == "function" && er.set(r, V), V;
283
283
  }
284
284
  function qr(r, n, e) {
285
285
  return _r(r, !1);
286
286
  }
287
- function Jr(r) {
287
+ function Hr(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, Jr(r));
295
+ return _r(r, Hr(r));
296
296
  if (typeof r == "string")
297
297
  return nr(r);
298
298
  switch (r) {
299
- case F:
299
+ case C:
300
300
  return nr("Suspense");
301
- case y:
301
+ case _:
302
302
  return nr("SuspenseList");
303
303
  }
304
304
  if (typeof r == "object")
305
305
  switch (r.$$typeof) {
306
- case f:
306
+ case g:
307
307
  return qr(r.render);
308
- case T:
308
+ case $:
309
309
  return ar(r.type, n, e);
310
- case A: {
311
- var a = r, d = a._payload, l = a._init;
310
+ case E: {
311
+ var a = r, d = a._payload, c = a._init;
312
312
  try {
313
- return ar(l(d), n, e);
313
+ return ar(c(d), n, e);
314
314
  } catch {
315
315
  }
316
316
  }
317
317
  }
318
318
  return "";
319
319
  }
320
- var q = Object.prototype.hasOwnProperty, jr = {}, Cr = S.ReactDebugCurrentFrame;
320
+ var J = Object.prototype.hasOwnProperty, jr = {}, Cr = v.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 Hr(r, n, e, a, d) {
328
+ function Jr(r, n, e, a, d) {
329
329
  {
330
- var l = Function.call.bind(q);
330
+ var c = Function.call.bind(J);
331
331
  for (var s in r)
332
- if (l(r, s)) {
332
+ if (c(r, s)) {
333
333
  var i = void 0;
334
334
  try {
335
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", _;
336
+ var I = 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 I.name = "Invariant Violation", I;
338
338
  }
339
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;
340
+ } catch (b) {
341
+ i = b;
342
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));
343
+ i && !(i instanceof Error) && (tr(d), l("%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), l("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 Or(r), !1;
359
+ return Tr(r), !1;
360
360
  } catch {
361
361
  return !0;
362
362
  }
363
363
  }
364
- function Or(r) {
364
+ function Tr(r) {
365
365
  return "" + r;
366
366
  }
367
- function Tr(r) {
367
+ function Or(r) {
368
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);
369
+ return l("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Gr(r)), Tr(r);
370
370
  }
371
- var J = S.ReactCurrentOwner, Zr = {
371
+ var K = v.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 (q.call(r, "ref")) {
379
+ if (J.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 (q.call(r, "key")) {
387
+ if (J.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" && 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);
395
+ if (typeof r.ref == "string" && K.current && n && K.current.stateNode !== n) {
396
+ var e = D(K.current.type);
397
+ ur[e] || (l('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', D(K.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, 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));
403
+ Sr || (Sr = !0, l("%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, 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));
414
+ Pr || (Pr = !0, l("%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, l, s) {
422
+ var tn = function(r, n, e, a, d, c, 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: l
432
+ _owner: c
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 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]);
453
+ var c, s = {}, i = null, I = null;
454
+ e !== void 0 && (Or(e), i = "" + e), rn(n) && (Or(n.key), i = "" + n.key), Qr(n) && (I = n.ref, nn(n, d));
455
+ for (c in n)
456
+ J.call(n, c) && !Zr.hasOwnProperty(c) && (s[c] = n[c]);
457
457
  if (r && r.defaultProps) {
458
- var w = r.defaultProps;
459
- for (l in w)
460
- s[l] === void 0 && (s[l] = w[l]);
458
+ var b = r.defaultProps;
459
+ for (c in b)
460
+ s[c] === void 0 && (s[c] = b[c]);
461
461
  }
462
- if (i || _) {
463
- var g = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
464
- i && en(s, g), _ && an(s, g);
462
+ if (i || I) {
463
+ var y = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
464
+ i && en(s, y), I && an(s, y);
465
465
  }
466
- return tn(r, i, _, d, a, J.current, s);
466
+ return tn(r, i, I, d, a, K.current, s);
467
467
  }
468
468
  }
469
- var pr = S.ReactCurrentOwner, Ir = S.ReactDebugCurrentFrame;
470
- function Y(r) {
469
+ var pr = v.ReactCurrentOwner, Ir = v.ReactDebugCurrentFrame;
470
+ function U(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 Fr() {
482
+ function Dr() {
483
483
  {
484
484
  if (pr.current) {
485
- var r = j(pr.current.type);
485
+ var r = D(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 Ar = {};
505
+ var Fr = {};
506
506
  function dn(r) {
507
507
  {
508
- var n = Fr();
508
+ var n = Dr();
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 Dr(r, n) {
518
+ function $r(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 (Ar[e])
524
+ if (Fr[e])
525
525
  return;
526
- Ar[e] = !0;
526
+ Fr[e] = !0;
527
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);
528
+ r && r._owner && r._owner !== pr.current && (a = " It was passed a child from " + D(r._owner.type) + "."), U(r), l('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), U(null);
529
529
  }
530
530
  }
531
- function Wr(r, n) {
531
+ function Ar(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) && Dr(a, n);
538
+ vr(a) && $r(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 = $(r);
543
+ var d = o(r);
544
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);
545
+ for (var c = d.call(r), s; !(s = c.next()).done; )
546
+ vr(s.value) && $r(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 === f || // Note: Memo only checks outer props here.
558
+ else if (typeof n == "object" && (n.$$typeof === g || // Note: Memo only checks outer props here.
559
559
  // Inner props are checked in the reconciler.
560
- n.$$typeof === T))
560
+ n.$$typeof === $))
561
561
  e = n.propTypes;
562
562
  else
563
563
  return;
564
564
  if (e) {
565
- var a = j(n);
566
- Hr(e, r.props, "prop", a, r);
565
+ var a = D(n);
566
+ Jr(e, r.props, "prop", a, r);
567
567
  } else if (n.PropTypes !== void 0 && !fr) {
568
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");
569
+ var d = D(n);
570
+ l("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 && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
572
+ typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && l("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
- Y(r), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), Y(null);
580
+ U(r), l("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), U(null);
581
581
  break;
582
582
  }
583
583
  }
584
- r.ref !== null && (Y(r), h("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null));
584
+ r.ref !== null && (U(r), l("Invalid attribute `ref` supplied to `React.Fragment`."), U(null));
585
585
  }
586
586
  }
587
- var $r = {};
588
- function Lr(r, n, e, a, d, l) {
587
+ var Wr = {};
588
+ function Lr(r, n, e, a, d, c) {
589
589
  {
590
- var s = L(r);
590
+ var s = Y(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 _ = 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);
594
+ var I = sn(d);
595
+ I ? i += I : i += Dr();
596
+ var b;
597
+ r === null ? b = "null" : cr(r) ? b = "array" : r !== void 0 && r.$$typeof === p ? (b = "<" + (D(r.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : b = typeof r, l("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, i);
598
598
  }
599
- var g = on(r, n, e, d, l);
600
- if (g == null)
601
- return g;
599
+ var y = on(r, n, e, d, c);
600
+ if (y == null)
601
+ return y;
602
602
  if (s) {
603
- var P = n.children;
604
- if (P !== void 0)
603
+ var W = n.children;
604
+ if (W !== void 0)
605
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);
606
+ if (cr(W)) {
607
+ for (var q = 0; q < W.length; q++)
608
+ Ar(W[q], r);
609
+ Object.freeze && Object.freeze(W);
610
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.");
611
+ l("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
- Wr(P, r);
613
+ Ar(W, r);
614
614
  }
615
- if (q.call(n, "key")) {
616
- var N = j(r), C = Object.keys(n).filter(function(wn) {
615
+ if (J.call(n, "key")) {
616
+ var V = D(r), F = Object.keys(n).filter(function(wn) {
617
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:
618
+ }), hr = F.length > 0 ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}";
619
+ if (!Wr[V + hr]) {
620
+ var hn = F.length > 0 ? "{" + F.join(": ..., ") + ": ...}" : "{}";
621
+ l(`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, N, hn, N), $r[N + hr] = !0;
626
+ <%s key={someKey} {...props} />`, hr, V, hn, V), Wr[V + hr] = !0;
627
627
  }
628
628
  }
629
- return r === b ? cn(g) : ln(g), g;
629
+ return r === k ? cn(y) : ln(y), y;
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
- K.Fragment = b, K.jsx = fn, K.jsxs = vn;
640
- }()), K;
639
+ X.Fragment = k, X.jsx = fn, X.jsxs = vn;
640
+ }()), X;
641
641
  }
642
642
  process.env.NODE_ENV === "production" ? wr.exports = bn() : wr.exports = xn();
643
643
  var t = wr.exports;
@@ -844,6 +844,12 @@ 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
+
847
853
  .starasia-input-dropdown-lists-container-bottom {
848
854
  top: 100%;
849
855
  margin-top: var(--starasia-ui-dropdown-spacing-xs);
@@ -916,6 +922,10 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
916
922
  /* box-shadow: 0px 0px 0px -1px #f0f0f0; */
917
923
  }
918
924
 
925
+ .starasia-input-dropdwon-item.highlight {
926
+ background-color: rgba(100, 181, 246, 0.21);
927
+ }
928
+
919
929
  .starasia-input-dropdwon-item-disable {
920
930
  color: var(--starasia-ui-dropdown-color-disable) !important;
921
931
  pointer-events: none;
@@ -1046,19 +1056,19 @@ const mn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
1046
1056
  width: 100%;
1047
1057
  }
1048
1058
  `;
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);
1059
+ function yn(u) {
1060
+ const [p, x] = Z(u), k = H(null), f = (h) => {
1061
+ k.current && !k.current.contains(h.target) && x(!1);
1052
1062
  };
1053
- return B(() => (document.addEventListener("click", u, !0), () => {
1054
- document.removeEventListener("click", u, !0);
1055
- }), []), { ref: b, isComponentVisible: p, setIsComponentVisible: x };
1063
+ return N(() => (document.addEventListener("click", f, !0), () => {
1064
+ document.removeEventListener("click", f, !0);
1065
+ }), []), { ref: k, isComponentVisible: p, setIsComponentVisible: x };
1056
1066
  }
1057
- const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1067
+ const kn = ({ ...u }) => /* @__PURE__ */ t.jsx(
1058
1068
  "svg",
1059
1069
  {
1060
1070
  xmlns: "http://www.w3.org/2000/svg",
1061
- ...c,
1071
+ ...u,
1062
1072
  viewBox: "0 0 24 24",
1063
1073
  fill: "none",
1064
1074
  color: "#939E99",
@@ -1073,11 +1083,11 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1073
1083
  }
1074
1084
  )
1075
1085
  }
1076
- ), En = ({ ...c }) => /* @__PURE__ */ t.jsxs(
1086
+ ), En = ({ ...u }) => /* @__PURE__ */ t.jsxs(
1077
1087
  "svg",
1078
1088
  {
1079
1089
  xmlns: "http://www.w3.org/2000/svg",
1080
- ...c,
1090
+ ...u,
1081
1091
  viewBox: "0 0 20 20",
1082
1092
  fill: "none",
1083
1093
  children: [
@@ -1105,14 +1115,14 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1105
1115
  )
1106
1116
  ]
1107
1117
  }
1108
- ), Rn = ({ isChecked: c }) => /* @__PURE__ */ t.jsxs("div", { className: "checkbox-wrapper-30", children: [
1118
+ ), Rn = ({ isChecked: u }) => /* @__PURE__ */ t.jsxs("div", { className: "checkbox-wrapper-30", children: [
1109
1119
  /* @__PURE__ */ t.jsxs("span", { className: "checkbox", children: [
1110
1120
  /* @__PURE__ */ t.jsx(
1111
1121
  "input",
1112
1122
  {
1113
1123
  type: "checkbox",
1114
1124
  style: { pointerEvents: "none" },
1115
- checked: c
1125
+ checked: u
1116
1126
  }
1117
1127
  ),
1118
1128
  /* @__PURE__ */ t.jsx("svg", { children: /* @__PURE__ */ t.jsx("use", { xlinkHref: "#checkbox-30", className: "checkbox" }) })
@@ -1127,42 +1137,82 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1127
1137
  ) }) })
1128
1138
  ] }), _n = gn(
1129
1139
  ({
1130
- positionDropdown: c,
1140
+ positionDropdown: u,
1131
1141
  dropdownLists: p,
1132
1142
  isComponentVisible: x,
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);
1143
+ searchAble: k,
1144
+ onSearch: f,
1145
+ value: h,
1146
+ handleChangeValue: P,
1147
+ multiSelect: R,
1148
+ searchValue: g
1149
+ }, C) => {
1150
+ const [_, $] = Z(0), [E, L] = Z(), A = H(null), m = H(null);
1151
+ return N(() => {
1152
+ if (A.current) {
1153
+ const o = A.current.getBoundingClientRect();
1154
+ $(o.width);
1145
1155
  }
1146
- }, [I, x]), B(() => {
1147
- p && f ? p.forEach((o) => {
1148
- if (o.label.startsWith(f || "")) {
1149
- D(o.value);
1156
+ }, [A, x]), N(() => {
1157
+ p && g ? p.forEach((o) => {
1158
+ if (o.label.startsWith(g || "")) {
1159
+ L(o.value);
1150
1160
  return;
1151
1161
  }
1152
- }) : D(void 0);
1153
- }, [f, p]), /* @__PURE__ */ t.jsx(t.Fragment, { children: x ? /* @__PURE__ */ t.jsxs(
1162
+ }) : L(void 0);
1163
+ }, [g, p]), N(() => {
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(
1154
1195
  "div",
1155
1196
  {
1156
1197
  className: "starasia-input-dropdown-lists-container",
1157
1198
  onClick: (o) => o.stopPropagation(),
1158
- ref: F,
1199
+ ref: (o) => {
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,
1159
1209
  children: [
1160
- b ? /* @__PURE__ */ t.jsxs(
1210
+ k ? /* @__PURE__ */ t.jsxs(
1161
1211
  "div",
1162
1212
  {
1163
1213
  className: "starasia-input-dropdown-container-dropdown-search",
1164
1214
  style: {
1165
- order: c == "bottom" ? 0 : 2,
1215
+ order: u == "bottom" ? 0 : 2,
1166
1216
  position: "sticky",
1167
1217
  top: 0,
1168
1218
  bottom: 0,
@@ -1174,9 +1224,9 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1174
1224
  "input",
1175
1225
  {
1176
1226
  onChange: (o) => {
1177
- u && u(o.target.value);
1227
+ f && f(o.target.value);
1178
1228
  },
1179
- value: f,
1229
+ value: g,
1180
1230
  autoFocus: !0,
1181
1231
  style: { width: "100%" }
1182
1232
  }
@@ -1187,17 +1237,18 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1187
1237
  /* @__PURE__ */ t.jsx(
1188
1238
  "div",
1189
1239
  {
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));
1240
+ className: `starasia-input-dropdwon-item-container ${R ? "multi" : ""}`,
1241
+ ref: A,
1242
+ children: p.map((o, v) => {
1243
+ const l = !!(h != null && h.find((w) => w.value === o.value));
1194
1244
  return /* @__PURE__ */ t.jsxs(
1195
1245
  "div",
1196
1246
  {
1197
- className: `starasia-input-dropdwon-item ${S ? "active" : " "} ${o.disable ? "starasia-input-dropdwon-item-disable" : null}`,
1198
- onClick: () => O(o.label, o.value),
1247
+ "data-value": o.value,
1248
+ className: `starasia-input-dropdwon-item ${l ? "active" : " "} ${E === o.value ? "highlight" : ""} ${o.disable ? "starasia-input-dropdwon-item-disable" : null}`,
1249
+ onClick: () => P(o.label, o.value),
1199
1250
  children: [
1200
- m ? /* @__PURE__ */ t.jsx("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ t.jsx(Rn, { isChecked: S }) }) : null,
1251
+ R ? /* @__PURE__ */ t.jsx("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ t.jsx(Rn, { isChecked: l }) }) : null,
1201
1252
  o.icon ? /* @__PURE__ */ t.jsx("div", { children: or.cloneElement(o.icon, {
1202
1253
  width: 16
1203
1254
  }) }) : null,
@@ -1205,10 +1256,10 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1205
1256
  /* @__PURE__ */ t.jsx(
1206
1257
  "p",
1207
1258
  {
1208
- className: `starasia-input-dropdwon-item-text ${S ? "active" : null} ${o.disable ? "starasia-input-dropdwon-item-disable" : null}`,
1259
+ className: `starasia-input-dropdwon-item-text ${l ? "active" : null} ${o.disable ? "starasia-input-dropdwon-item-disable" : null}`,
1209
1260
  style: {
1210
1261
  textWrap: "nowrap",
1211
- width: `${y - 12}px`,
1262
+ width: `${_ - 12}px`,
1212
1263
  overflow: "hidden",
1213
1264
  textOverflow: "ellipsis"
1214
1265
  },
@@ -1218,10 +1269,10 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1218
1269
  o.description ? /* @__PURE__ */ t.jsx(
1219
1270
  "p",
1220
1271
  {
1221
- className: `starasia-input-dropdwon-item-text-description ${S ? "active" : null} ${o.disable ? "starasia-input-dropdwon-item-disable" : null}`,
1272
+ className: `starasia-input-dropdwon-item-text-description ${l ? "active" : null} ${o.disable ? "starasia-input-dropdwon-item-disable" : null}`,
1222
1273
  style: {
1223
1274
  textWrap: "nowrap",
1224
- width: `${y - 12}px`,
1275
+ width: `${_ - 12}px`,
1225
1276
  overflow: "hidden",
1226
1277
  textOverflow: "ellipsis"
1227
1278
  },
@@ -1231,7 +1282,7 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1231
1282
  ] })
1232
1283
  ]
1233
1284
  },
1234
- $
1285
+ v
1235
1286
  );
1236
1287
  })
1237
1288
  }
@@ -1241,98 +1292,105 @@ const kn = ({ ...c }) => /* @__PURE__ */ t.jsx(
1241
1292
  ) : null });
1242
1293
  }
1243
1294
  ), jn = ({
1244
- children: c,
1295
+ children: u,
1245
1296
  handleChangePosition: p
1246
1297
  }) => {
1247
- const x = X(null);
1248
- B(() => {
1249
- var O;
1250
- const u = () => {
1298
+ const x = H(null);
1299
+ N(() => {
1300
+ var P;
1301
+ const f = () => {
1251
1302
  if (x.current) {
1252
- let m = x.current.parentElement;
1253
- for (; m && !b(m); )
1254
- m = m.parentElement;
1255
- m && p();
1303
+ let R = x.current.parentElement;
1304
+ for (; R && !k(R); )
1305
+ R = R.parentElement;
1306
+ R && p();
1256
1307
  }
1257
1308
  };
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);
1309
+ let h = (P = x.current) == null ? void 0 : P.parentElement;
1310
+ for (; h && !k(h); )
1311
+ h = h.parentElement;
1312
+ return h && h.addEventListener("scroll", f), f(), () => {
1313
+ h && h.removeEventListener("scroll", f);
1263
1314
  };
1264
1315
  }, []);
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) => {
1316
+ const k = (f) => f && (f.scrollHeight > f.clientHeight || f.scrollWidth > f.clientWidth);
1317
+ return /* @__PURE__ */ t.jsx("div", { ref: x, children: u });
1318
+ }, Br = "starasia-input-dropdown-styles", Cn = (u) => {
1268
1319
  if (!document.getElementById(Br)) {
1269
1320
  const p = document.createElement("style");
1270
- p.id = Br, p.textContent = c, document.head.appendChild(p);
1321
+ p.id = Br, p.textContent = u, document.head.appendChild(p);
1271
1322
  }
1272
1323
  };
1273
1324
  Cn(mn);
1274
1325
  const Sn = ({
1275
- dropdownLists: c,
1326
+ dropdownLists: u,
1276
1327
  onChange: p,
1277
1328
  defaultValue: x,
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
1329
+ size: k = "md",
1330
+ multiSelect: f,
1331
+ searchAble: h,
1332
+ iconLeft: P,
1333
+ placeholder: R,
1334
+ onSearch: g,
1335
+ error: C,
1336
+ onBlur: _,
1337
+ onFocus: $,
1338
+ disable: E,
1339
+ searchValue: L
1289
1340
  }) => {
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) : []
1341
+ const A = H(), [m, o] = Z([]), [v, l] = Z(""), w = H(null), { isComponentVisible: j, ref: z, setIsComponentVisible: B } = yn(!1), ir = () => {
1342
+ B((T) => !T);
1343
+ }, Q = (T, O) => {
1344
+ if (!f)
1345
+ o([{ label: T, value: O }]), p([{ label: T, value: O }]), B(!1);
1346
+ else if (m == null ? void 0 : m.find((S) => S.value === O)) {
1347
+ const S = [
1348
+ ...m ? m.filter((M) => M.value !== O) : []
1298
1349
  ];
1299
- $(E), p(E);
1350
+ o(S), p(S);
1300
1351
  } else {
1301
- const E = [...o || [], { label: R, value: k }];
1302
- $(E), p(E);
1352
+ const S = [...m || [], { label: T, value: O }];
1353
+ o(S), p(S);
1303
1354
  }
1304
1355
  };
1305
- B(() => {
1306
- JSON.stringify(I.current) === JSON.stringify(x) || (I.current = x, $(I.current || []));
1356
+ N(() => {
1357
+ JSON.stringify(A.current) === JSON.stringify(x) || (A.current = x, o(A.current || []));
1307
1358
  }, [x]);
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),
1359
+ const rr = () => m.length ? f ? m == null ? void 0 : m.map((T, O) => /* @__PURE__ */ t.jsxs("div", { className: "starasia-input-dropdown-preview-item", children: [
1360
+ /* @__PURE__ */ t.jsx("p", { style: { minWidth: "max-content" }, children: T == null ? void 0 : T.label }, O),
1310
1361
  /* @__PURE__ */ t.jsx(
1311
- On,
1362
+ Tn,
1312
1363
  {
1313
- onClick: () => Q(R.label, R.value)
1364
+ onClick: () => Q(T.label, T.value)
1314
1365
  }
1315
1366
  )
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"));
1367
+ ] })) : /* @__PURE__ */ t.jsx("p", { style: { minWidth: "max-content" }, children: m == null ? void 0 : m[0].label }) : /* @__PURE__ */ t.jsx("p", { className: "starasia-input-dropdown-placeholder", children: R }), Y = () => {
1368
+ if (z.current && w.current) {
1369
+ const T = window.innerHeight, O = z.current.getBoundingClientRect(), D = w.current.getBoundingClientRect(), S = O.bottom + D.height;
1370
+ w.current.style.left = `${O.left}px`, w.current.style.width = `${O.width}px`, S >= T - 10 ? (w.current.style.top = `${O.top - D.height - 5}px`, l("top")) : (w.current.style.top = `${O.top + O.height}px`, l("bottom"));
1320
1371
  }
1321
1372
  };
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(
1373
+ return N(() => (window.addEventListener("scroll", Y), window.addEventListener("resize", Y), () => {
1374
+ window.removeEventListener("scroll", Y), window.removeEventListener("resize", Y);
1375
+ }), []), N(() => {
1376
+ Y();
1377
+ }, [j]), N(() => {
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(
1327
1385
  "div",
1328
1386
  {
1329
- className: `starasia-input-dropdown-container ${A ? "disable" : ""} starasia-input-dropdown-size-${b} ${V ? "active" : ""} ${F ? "error" : ""}`,
1330
- ref: U,
1387
+ className: `starasia-input-dropdown-container ${E ? "disable" : ""} starasia-input-dropdown-size-${k} ${j ? "active" : ""} ${C ? "error" : ""}`,
1388
+ ref: z,
1331
1389
  onClick: ir,
1332
1390
  children: [
1333
1391
  /* @__PURE__ */ t.jsxs("div", { className: "starasia-input-dropdown-preview-container", children: [
1334
- O ? /* @__PURE__ */ t.jsx(t.Fragment, { children: or.cloneElement(O, {
1335
- width: Yr(b),
1392
+ P ? /* @__PURE__ */ t.jsx(t.Fragment, { children: or.cloneElement(P, {
1393
+ width: Yr(k),
1336
1394
  color: "#939E99",
1337
1395
  style: {
1338
1396
  color: "#939E99"
@@ -1343,8 +1401,8 @@ const Sn = ({
1343
1401
  {
1344
1402
  className: "starasia-input-dropdown-container-preview-item",
1345
1403
  tabIndex: 100,
1346
- onBlur: y,
1347
- onFocus: T,
1404
+ onBlur: _,
1405
+ onFocus: $,
1348
1406
  children: rr()
1349
1407
  }
1350
1408
  ),
@@ -1352,7 +1410,7 @@ const Sn = ({
1352
1410
  kn,
1353
1411
  {
1354
1412
  strokeWidth: 2,
1355
- width: Yr(b),
1413
+ width: Yr(k),
1356
1414
  style: { color: "#939E99" }
1357
1415
  }
1358
1416
  )
@@ -1360,29 +1418,29 @@ const Sn = ({
1360
1418
  /* @__PURE__ */ t.jsx(
1361
1419
  _n,
1362
1420
  {
1363
- dropdownLists: c,
1421
+ dropdownLists: u,
1364
1422
  handleChangeValue: Q,
1365
- isComponentVisible: V,
1366
- positionDropdown: S,
1367
- searchAble: !!v,
1368
- value: o,
1369
- onSearch: f,
1370
- ref: W,
1371
- multiSelect: u,
1372
- searchValue: D
1423
+ isComponentVisible: j,
1424
+ positionDropdown: v,
1425
+ searchAble: !!h,
1426
+ value: m,
1427
+ onSearch: g,
1428
+ ref: w,
1429
+ multiSelect: f,
1430
+ searchValue: L
1373
1431
  }
1374
1432
  )
1375
1433
  ]
1376
1434
  }
1377
1435
  ) });
1378
- }, Yr = (c) => {
1379
- if (c === "sm")
1436
+ }, Yr = (u) => {
1437
+ if (u === "sm")
1380
1438
  return 16;
1381
- if (c === "md")
1439
+ if (u === "md")
1382
1440
  return 16;
1383
- if (c === "lg")
1441
+ if (u === "lg")
1384
1442
  return 20;
1385
- }, On = (c) => /* @__PURE__ */ t.jsx(
1443
+ }, Tn = (u) => /* @__PURE__ */ t.jsx(
1386
1444
  "svg",
1387
1445
  {
1388
1446
  xmlns: "http://www.w3.org/2000/svg",
@@ -1390,7 +1448,7 @@ const Sn = ({
1390
1448
  height: "18",
1391
1449
  viewBox: "0 0 18 18",
1392
1450
  fill: "none",
1393
- ...c,
1451
+ ...u,
1394
1452
  children: /* @__PURE__ */ t.jsx(
1395
1453
  "path",
1396
1454
  {