New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hudoro/dropdown

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hudoro/dropdown - npm Package Compare versions

Comparing version 0.0.3-beta.20 to 0.0.3-beta.21

587

dist/dropdown.es.js

@@ -1,3 +0,3 @@

import q, { useState as Fr, useRef as fn, useEffect as Ir } from "react";
var or = { exports: {} }, L = {};
import K, { useState as ar, useRef as fn, useEffect as Wr } from "react";
var sr = { exports: {} }, $ = {};
/**

@@ -12,21 +12,21 @@ * @license React

*/
var Tr;
var Fr;
function pn() {
if (Tr)
return L;
Tr = 1;
var g = q, m = Symbol.for("react.element"), b = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, _ = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, O = { key: !0, ref: !0, __self: !0, __source: !0 };
function P(j, w, s) {
var f, E = {}, C = null, F = null;
s !== void 0 && (C = "" + s), w.key !== void 0 && (C = "" + w.key), w.ref !== void 0 && (F = w.ref);
for (f in w)
y.call(w, f) && !O.hasOwnProperty(f) && (E[f] = w[f]);
if (j && j.defaultProps)
for (f in w = j.defaultProps, w)
E[f] === void 0 && (E[f] = w[f]);
return { $$typeof: m, type: j, key: C, ref: F, props: E, _owner: _.current };
if (Fr)
return $;
Fr = 1;
var h = K, g = Symbol.for("react.element"), R = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, _ = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
function P(C, p, m) {
var w, s = {}, j = null, I = null;
m !== void 0 && (j = "" + m), p.key !== void 0 && (j = "" + p.key), p.ref !== void 0 && (I = p.ref);
for (w in p)
y.call(p, w) && !S.hasOwnProperty(w) && (s[w] = p[w]);
if (C && C.defaultProps)
for (w in p = C.defaultProps, p)
s[w] === void 0 && (s[w] = p[w]);
return { $$typeof: g, type: C, key: j, ref: I, props: s, _owner: _.current };
}
return L.Fragment = b, L.jsx = P, L.jsxs = P, L;
return $.Fragment = R, $.jsx = P, $.jsxs = P, $;
}
var N = {};
var z = {};
/**

@@ -41,40 +41,40 @@ * @license React

*/
var Sr;
var Ir;
function hn() {
return Sr || (Sr = 1, process.env.NODE_ENV !== "production" && function() {
var g = q, m = Symbol.for("react.element"), b = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), j = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), s = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), z = Symbol.iterator, J = "@@iterator";
function u(r) {
return Ir || (Ir = 1, process.env.NODE_ENV !== "production" && function() {
var h = K, g = Symbol.for("react.element"), R = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), C = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), s = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), Y = Symbol.iterator, V = "@@iterator";
function H(r) {
if (r === null || typeof r != "object")
return null;
var n = z && r[z] || r[J];
var n = Y && r[Y] || r[V];
return typeof n == "function" ? n : null;
}
var v = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function p(r) {
var F = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function v(r) {
{
for (var n = arguments.length, e = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
e[o - 1] = arguments[o];
k("error", r, e);
d("error", r, e);
}
}
function k(r, n, e) {
function d(r, n, e) {
{
var o = v.ReactDebugCurrentFrame, a = o.getStackAddendum();
var o = F.ReactDebugCurrentFrame, a = o.getStackAddendum();
a !== "" && (n += "%s", e = e.concat([a]));
var d = e.map(function(t) {
var u = e.map(function(t) {
return String(t);
});
d.unshift("Warning: " + n), Function.prototype.apply.call(console[r], console, d);
u.unshift("Warning: " + n), Function.prototype.apply.call(console[r], console, u);
}
}
var G = !1, Dr = !1, Ar = !1, Wr = !1, $r = !1, ir;
ir = Symbol.for("react.module.reference");
var x = !1, M = !1, k = !1, X = !1, Nr = !1, dr;
dr = Symbol.for("react.module.reference");
function Lr(r) {
return !!(typeof r == "string" || typeof r == "function" || r === y || r === O || $r || r === _ || r === s || r === f || Wr || r === F || G || Dr || Ar || typeof r == "object" && r !== null && (r.$$typeof === C || r.$$typeof === E || r.$$typeof === P || r.$$typeof === j || r.$$typeof === w || // This needs to include all possible module reference object
return !!(typeof r == "string" || typeof r == "function" || r === y || r === S || Nr || r === _ || r === m || r === w || X || r === I || x || M || k || typeof r == "object" && r !== null && (r.$$typeof === j || r.$$typeof === s || r.$$typeof === P || r.$$typeof === C || r.$$typeof === p || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
r.$$typeof === ir || r.getModuleId !== void 0));
r.$$typeof === dr || r.getModuleId !== void 0));
}
function Nr(r, n, e) {
function $r(r, n, e) {
var o = r.displayName;

@@ -86,3 +86,3 @@ if (o)

}
function tr(r) {
function ur(r) {
return r.displayName || "Context";

@@ -93,3 +93,3 @@ }

return null;
if (typeof r.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
if (typeof r.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
return r.displayName || r.name || null;

@@ -101,11 +101,11 @@ if (typeof r == "string")

return "Fragment";
case b:
case R:
return "Portal";
case O:
case S:
return "Profiler";
case _:
return "StrictMode";
case s:
case m:
return "Suspense";
case f:
case w:
return "SuspenseList";

@@ -115,17 +115,17 @@ }

switch (r.$$typeof) {
case j:
case C:
var n = r;
return tr(n) + ".Consumer";
return ur(n) + ".Consumer";
case P:
var e = r;
return tr(e._context) + ".Provider";
case w:
return Nr(r, r.render, "ForwardRef");
case E:
return ur(e._context) + ".Provider";
case p:
return $r(r, r.render, "ForwardRef");
case s:
var o = r.displayName || null;
return o !== null ? o : T(r.type) || "Memo";
case C: {
var a = r, d = a._payload, t = a._init;
case j: {
var a = r, u = a._payload, t = a._init;
try {
return T(t(d));
return T(t(u));
} catch {

@@ -138,14 +138,14 @@ return null;

}
var I = Object.assign, W = 0, ar, sr, dr, ur, lr, cr, fr;
function pr() {
var D = Object.assign, N = 0, lr, cr, fr, pr, hr, vr, gr;
function mr() {
}
pr.__reactDisabledLog = !0;
mr.__reactDisabledLog = !0;
function zr() {
{
if (W === 0) {
ar = console.log, sr = console.info, dr = console.warn, ur = console.error, lr = console.group, cr = console.groupCollapsed, fr = console.groupEnd;
if (N === 0) {
lr = console.log, cr = console.info, fr = console.warn, pr = console.error, hr = console.group, vr = console.groupCollapsed, gr = console.groupEnd;
var r = {
configurable: !0,
enumerable: !0,
value: pr,
value: mr,
writable: !0

@@ -163,3 +163,3 @@ };

}
W++;
N++;
}

@@ -169,3 +169,3 @@ }

{
if (W--, W === 0) {
if (N--, N === 0) {
var r = {

@@ -177,32 +177,32 @@ configurable: !0,

Object.defineProperties(console, {
log: I({}, r, {
value: ar
log: D({}, r, {
value: lr
}),
info: I({}, r, {
value: sr
info: D({}, r, {
value: cr
}),
warn: I({}, r, {
value: dr
warn: D({}, r, {
value: fr
}),
error: I({}, r, {
value: ur
error: D({}, r, {
value: pr
}),
group: I({}, r, {
value: lr
group: D({}, r, {
value: hr
}),
groupCollapsed: I({}, r, {
value: cr
groupCollapsed: D({}, r, {
value: vr
}),
groupEnd: I({}, r, {
value: fr
groupEnd: D({}, r, {
value: gr
})
});
}
W < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
N < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var K = v.ReactCurrentDispatcher, H;
function Y(r, n, e) {
var Z = F.ReactCurrentDispatcher, Q;
function U(r, n, e) {
{
if (H === void 0)
if (Q === void 0)
try {

@@ -212,18 +212,18 @@ throw Error();

var o = a.stack.trim().match(/\n( *(at )?)/);
H = o && o[1] || "";
Q = o && o[1] || "";
}
return `
` + H + r;
` + Q + r;
}
}
var X = !1, M;
var rr = !1, B;
{
var Mr = typeof WeakMap == "function" ? WeakMap : Map;
M = new Mr();
var Vr = typeof WeakMap == "function" ? WeakMap : Map;
B = new Vr();
}
function hr(r, n) {
if (!r || X)
function wr(r, n) {
if (!r || rr)
return "";
{
var e = M.get(r);
var e = B.get(r);
if (e !== void 0)

@@ -233,7 +233,7 @@ return e;

var o;
X = !0;
rr = !0;
var a = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var d;
d = K.current, K.current = null, zr();
var u;
u = Z.current, Z.current = null, zr();
try {

@@ -251,4 +251,4 @@ if (n) {

Reflect.construct(t, []);
} catch (S) {
o = S;
} catch (O) {
o = O;
}

@@ -259,4 +259,4 @@ Reflect.construct(r, [], t);

t.call();
} catch (S) {
o = S;
} catch (O) {
o = O;
}

@@ -268,23 +268,23 @@ r.call(t.prototype);

throw Error();
} catch (S) {
o = S;
} catch (O) {
o = O;
}
r();
}
} catch (S) {
if (S && o && typeof S.stack == "string") {
for (var i = S.stack.split(`
`), x = o.stack.split(`
`), c = i.length - 1, h = x.length - 1; c >= 1 && h >= 0 && i[c] !== x[h]; )
h--;
for (; c >= 1 && h >= 0; c--, h--)
if (i[c] !== x[h]) {
if (c !== 1 || h !== 1)
} catch (O) {
if (O && o && typeof O.stack == "string") {
for (var i = O.stack.split(`
`), b = o.stack.split(`
`), c = i.length - 1, f = b.length - 1; c >= 1 && f >= 0 && i[c] !== b[f]; )
f--;
for (; c >= 1 && f >= 0; c--, f--)
if (i[c] !== b[f]) {
if (c !== 1 || f !== 1)
do
if (c--, h--, h < 0 || i[c] !== x[h]) {
var R = `
if (c--, f--, f < 0 || i[c] !== b[f]) {
var E = `
` + i[c].replace(" at new ", " at ");
return r.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", r.displayName)), typeof r == "function" && M.set(r, R), R;
return r.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", r.displayName)), typeof r == "function" && B.set(r, E), E;
}
while (c >= 1 && h >= 0);
while (c >= 1 && f >= 0);
break;

@@ -294,9 +294,9 @@ }

} finally {
X = !1, K.current = d, Yr(), Error.prepareStackTrace = a;
rr = !1, Z.current = u, Yr(), Error.prepareStackTrace = a;
}
var A = r ? r.displayName || r.name : "", kr = A ? Y(A) : "";
return typeof r == "function" && M.set(r, kr), kr;
var W = r ? r.displayName || r.name : "", Pr = W ? U(W) : "";
return typeof r == "function" && B.set(r, Pr), Pr;
}
function Vr(r, n, e) {
return hr(r, !1);
function Mr(r, n, e) {
return wr(r, !1);
}

@@ -307,25 +307,25 @@ function Ur(r) {

}
function V(r, n, e) {
function q(r, n, e) {
if (r == null)
return "";
if (typeof r == "function")
return hr(r, Ur(r));
return wr(r, Ur(r));
if (typeof r == "string")
return Y(r);
return U(r);
switch (r) {
case s:
return Y("Suspense");
case f:
return Y("SuspenseList");
case m:
return U("Suspense");
case w:
return U("SuspenseList");
}
if (typeof r == "object")
switch (r.$$typeof) {
case w:
return Vr(r.render);
case E:
return V(r.type, n, e);
case C: {
var o = r, a = o._payload, d = o._init;
case p:
return Mr(r.render);
case s:
return q(r.type, n, e);
case j: {
var o = r, a = o._payload, u = o._init;
try {
return V(d(a), n, e);
return q(u(a), n, e);
} catch {

@@ -337,20 +337,20 @@ }

}
var U = Object.prototype.hasOwnProperty, vr = {}, gr = v.ReactDebugCurrentFrame;
function B(r) {
var J = Object.prototype.hasOwnProperty, br = {}, yr = F.ReactDebugCurrentFrame;
function G(r) {
if (r) {
var n = r._owner, e = V(r.type, r._source, n ? n.type : null);
gr.setExtraStackFrame(e);
var n = r._owner, e = q(r.type, r._source, n ? n.type : null);
yr.setExtraStackFrame(e);
} else
gr.setExtraStackFrame(null);
yr.setExtraStackFrame(null);
}
function Br(r, n, e, o, a) {
{
var d = Function.call.bind(U);
var u = Function.call.bind(J);
for (var t in r)
if (d(r, t)) {
if (u(r, t)) {
var i = void 0;
try {
if (typeof r[t] != "function") {
var x = Error((o || "React class") + ": " + e + " type `" + t + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[t] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw x.name = "Invariant Violation", x;
var b = Error((o || "React class") + ": " + e + " type `" + t + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[t] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw b.name = "Invariant Violation", b;
}

@@ -361,3 +361,3 @@ i = r[t](n, t, o, e, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");

}
i && !(i instanceof Error) && (B(a), p("%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).", o || "React class", e, t, typeof i), B(null)), i instanceof Error && !(i.message in vr) && (vr[i.message] = !0, B(a), p("Failed %s type: %s", e, i.message), B(null));
i && !(i instanceof Error) && (G(a), v("%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).", o || "React class", e, t, typeof i), G(null)), i instanceof Error && !(i.message in br) && (br[i.message] = !0, G(a), v("Failed %s type: %s", e, i.message), G(null));
}

@@ -367,3 +367,3 @@ }

var qr = Array.isArray;
function Z(r) {
function nr(r) {
return qr(r);

@@ -379,3 +379,3 @@ }

try {
return wr(r), !1;
return xr(r), !1;
} catch {

@@ -385,10 +385,10 @@ return !0;

}
function wr(r) {
function xr(r) {
return "" + r;
}
function mr(r) {
function Er(r) {
if (Gr(r))
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Jr(r)), wr(r);
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Jr(r)), xr(r);
}
var $ = v.ReactCurrentOwner, Kr = {
var L = F.ReactCurrentOwner, Kr = {
key: !0,

@@ -398,6 +398,6 @@ ref: !0,

__source: !0
}, br, xr, Q;
Q = {};
}, Rr, _r, er;
er = {};
function Hr(r) {
if (U.call(r, "ref")) {
if (J.call(r, "ref")) {
var n = Object.getOwnPropertyDescriptor(r, "ref").get;

@@ -410,3 +410,3 @@ if (n && n.isReactWarning)

function Xr(r) {
if (U.call(r, "key")) {
if (J.call(r, "key")) {
var n = Object.getOwnPropertyDescriptor(r, "key").get;

@@ -419,5 +419,5 @@ if (n && n.isReactWarning)

function Zr(r, n) {
if (typeof r.ref == "string" && $.current && n && $.current.stateNode !== n) {
var e = T($.current.type);
Q[e] || (p('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', T($.current.type), r.ref), Q[e] = !0);
if (typeof r.ref == "string" && L.current && n && L.current.stateNode !== n) {
var e = T(L.current.type);
er[e] || (v('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', T(L.current.type), r.ref), er[e] = !0);
}

@@ -428,3 +428,3 @@ }

var e = function() {
br || (br = !0, p("%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));
Rr || (Rr = !0, v("%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));
};

@@ -440,3 +440,3 @@ e.isReactWarning = !0, Object.defineProperty(r, "key", {

var e = function() {
xr || (xr = !0, p("%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));
_r || (_r = !0, v("%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));
};

@@ -449,6 +449,6 @@ e.isReactWarning = !0, Object.defineProperty(r, "ref", {

}
var nn = function(r, n, e, o, a, d, t) {
var nn = function(r, n, e, o, a, u, t) {
var i = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: m,
$$typeof: g,
// Built-in properties that belong on the element

@@ -460,3 +460,3 @@ type: r,

// Record the component responsible for creating this element.
_owner: d
_owner: u
};

@@ -482,35 +482,35 @@ return i._store = {}, Object.defineProperty(i._store, "validated", {

{
var d, t = {}, i = null, x = null;
e !== void 0 && (mr(e), i = "" + e), Xr(n) && (mr(n.key), i = "" + n.key), Hr(n) && (x = n.ref, Zr(n, a));
for (d in n)
U.call(n, d) && !Kr.hasOwnProperty(d) && (t[d] = n[d]);
var u, t = {}, i = null, b = null;
e !== void 0 && (Er(e), i = "" + e), Xr(n) && (Er(n.key), i = "" + n.key), Hr(n) && (b = n.ref, Zr(n, a));
for (u in n)
J.call(n, u) && !Kr.hasOwnProperty(u) && (t[u] = n[u]);
if (r && r.defaultProps) {
var c = r.defaultProps;
for (d in c)
t[d] === void 0 && (t[d] = c[d]);
for (u in c)
t[u] === void 0 && (t[u] = c[u]);
}
if (i || x) {
var h = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
i && Qr(t, h), x && rn(t, h);
if (i || b) {
var f = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
i && Qr(t, f), b && rn(t, f);
}
return nn(r, i, x, a, o, $.current, t);
return nn(r, i, b, a, o, L.current, t);
}
}
var rr = v.ReactCurrentOwner, yr = v.ReactDebugCurrentFrame;
function D(r) {
var or = F.ReactCurrentOwner, jr = F.ReactDebugCurrentFrame;
function A(r) {
if (r) {
var n = r._owner, e = V(r.type, r._source, n ? n.type : null);
yr.setExtraStackFrame(e);
var n = r._owner, e = q(r.type, r._source, n ? n.type : null);
jr.setExtraStackFrame(e);
} else
yr.setExtraStackFrame(null);
jr.setExtraStackFrame(null);
}
var nr;
nr = !1;
function er(r) {
return typeof r == "object" && r !== null && r.$$typeof === m;
var ir;
ir = !1;
function tr(r) {
return typeof r == "object" && r !== null && r.$$typeof === g;
}
function Er() {
function Cr() {
{
if (rr.current) {
var r = T(rr.current.type);
if (or.current) {
var r = T(or.current.type);
if (r)

@@ -535,6 +535,6 @@ return `

}
var Rr = {};
var kr = {};
function tn(r) {
{
var n = Er();
var n = Cr();
if (!n) {

@@ -549,3 +549,3 @@ var e = typeof r == "string" ? r : r.displayName || r.name;

}
function _r(r, n) {
function Tr(r, n) {
{

@@ -556,25 +556,25 @@ if (!r._store || r._store.validated || r.key != null)

var e = tn(n);
if (Rr[e])
if (kr[e])
return;
Rr[e] = !0;
kr[e] = !0;
var o = "";
r && r._owner && r._owner !== rr.current && (o = " It was passed a child from " + T(r._owner.type) + "."), D(r), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', e, o), D(null);
r && r._owner && r._owner !== or.current && (o = " It was passed a child from " + T(r._owner.type) + "."), A(r), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', e, o), A(null);
}
}
function jr(r, n) {
function Or(r, n) {
{
if (typeof r != "object")
return;
if (Z(r))
if (nr(r))
for (var e = 0; e < r.length; e++) {
var o = r[e];
er(o) && _r(o, n);
tr(o) && Tr(o, n);
}
else if (er(r))
else if (tr(r))
r._store && (r._store.validated = !0);
else if (r) {
var a = u(r);
var a = H(r);
if (typeof a == "function" && a !== r.entries)
for (var d = a.call(r), t; !(t = d.next()).done; )
er(t.value) && _r(t.value, n);
for (var u = a.call(r), t; !(t = u.next()).done; )
tr(t.value) && Tr(t.value, n);
}

@@ -591,5 +591,5 @@ }

e = n.propTypes;
else if (typeof n == "object" && (n.$$typeof === w || // Note: Memo only checks outer props here.
else if (typeof n == "object" && (n.$$typeof === p || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
n.$$typeof === E))
n.$$typeof === s))
e = n.propTypes;

@@ -601,8 +601,8 @@ else

Br(e, r.props, "prop", o, r);
} else if (n.PropTypes !== void 0 && !nr) {
nr = !0;
} else if (n.PropTypes !== void 0 && !ir) {
ir = !0;
var a = T(n);
p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", a || "Unknown");
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", a || "Unknown");
}
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}

@@ -615,10 +615,10 @@ }

if (o !== "children" && o !== "key") {
D(r), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), D(null);
A(r), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), A(null);
break;
}
}
r.ref !== null && (D(r), p("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
r.ref !== null && (A(r), v("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
}
}
function Cr(r, n, e, o, a, d) {
function Sr(r, n, e, o, a, u) {
{

@@ -629,38 +629,38 @@ var t = Lr(r);

(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.");
var x = on(a);
x ? i += x : i += Er();
var b = on(a);
b ? i += b : i += Cr();
var c;
r === null ? c = "null" : Z(r) ? c = "array" : r !== void 0 && r.$$typeof === m ? (c = "<" + (T(r.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : c = typeof r, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, i);
r === null ? c = "null" : nr(r) ? c = "array" : r !== void 0 && r.$$typeof === g ? (c = "<" + (T(r.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : c = typeof r, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, i);
}
var h = en(r, n, e, a, d);
if (h == null)
return h;
var f = en(r, n, e, a, u);
if (f == null)
return f;
if (t) {
var R = n.children;
if (R !== void 0)
var E = n.children;
if (E !== void 0)
if (o)
if (Z(R)) {
for (var A = 0; A < R.length; A++)
jr(R[A], r);
Object.freeze && Object.freeze(R);
if (nr(E)) {
for (var W = 0; W < E.length; W++)
Or(E[W], r);
Object.freeze && Object.freeze(E);
} else
p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
jr(R, r);
Or(E, r);
}
return r === y ? sn(h) : an(h), h;
return r === y ? sn(f) : an(f), f;
}
}
function dn(r, n, e) {
return Cr(r, n, e, !0);
return Sr(r, n, e, !0);
}
function un(r, n, e) {
return Cr(r, n, e, !1);
return Sr(r, n, e, !1);
}
var ln = un, cn = dn;
N.Fragment = y, N.jsx = ln, N.jsxs = cn;
}()), N;
z.Fragment = y, z.jsx = ln, z.jsxs = cn;
}()), z;
}
process.env.NODE_ENV === "production" ? or.exports = pn() : or.exports = hn();
var l = or.exports;
process.env.NODE_ENV === "production" ? sr.exports = pn() : sr.exports = hn();
var l = sr.exports;
const vn = `@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");

@@ -859,92 +859,91 @@ * {

`;
function gn(g) {
const [m, b] = Fr(g), y = fn(null), _ = (O) => {
y.current && !y.current.contains(O.target) && b(!1);
function gn(h) {
const [g, R] = ar(h), y = fn(null), _ = (S) => {
y.current && !y.current.contains(S.target) && R(!1);
};
return Ir(() => (document.addEventListener("click", _, !0), () => {
return Wr(() => (document.addEventListener("click", _, !0), () => {
document.removeEventListener("click", _, !0);
}), []), { ref: y, isComponentVisible: m, setIsComponentVisible: b };
}), []), { ref: y, isComponentVisible: g, setIsComponentVisible: R };
}
const Or = "hudoro-input-dropdown-styles", wn = (g) => {
if (!document.getElementById(Or)) {
const m = document.createElement("style");
m.id = Or, m.textContent = g, document.head.appendChild(m);
const Dr = "hudoro-input-dropdown-styles", mn = (h) => {
if (!document.getElementById(Dr)) {
const g = document.createElement("style");
g.id = Dr, g.textContent = h, document.head.appendChild(g);
}
};
wn(vn);
const yn = ({
dropdownLists: g,
onChange: m,
defaultValue: b,
mn(vn);
const xn = ({
dropdownLists: h,
onChange: g,
defaultValue: R,
size: y = "md",
multiSelect: _,
searchAble: O,
searchAble: S,
iconLeft: P,
placeholder: j,
onSearch: w
placeholder: C,
onSearch: p
}) => {
const [s, f] = Fr([]), { isComponentVisible: E, ref: C, setIsComponentVisible: F } = gn(!1), z = () => {
F((u) => !u);
}, J = (u, v) => {
const [m, w] = ar([]), [s, j] = ar([]), { isComponentVisible: I, ref: Y, setIsComponentVisible: V } = gn(!1), H = () => {
V((d) => !d);
}, F = (d, x) => {
if (!_)
f([{ label: u, value: v }]), m([{ label: u, value: v }]), F(!1);
else if (s == null ? void 0 : s.find((k) => k.value === v)) {
j([{ label: d, value: x }]), g([{ label: d, value: x }]), V(!1);
else if (s == null ? void 0 : s.find((k) => k.value === x)) {
const k = [
...s ? s.filter((G) => G.value !== v) : []
...s ? s.filter((X) => X.value !== x) : []
];
f(k), m(k);
j(k), g(k);
} else {
const k = [...s || [], { label: u, value: v }];
f(k), m(k);
const k = [...s || [], { label: d, value: x }];
j(k), g(k);
}
};
return Ir(() => {
if (b)
if (!s.length)
f(b);
else
for (let u of b) {
const v = s.findIndex((p) => p.value === u.value);
if (v < 0) {
console.log("position", v), console.log("value", s), console.log("defaultValue", b), f(s);
return;
}
}
b != null && b.length || f([]);
}, [b, g, s]), /* @__PURE__ */ l.jsxs(
Wr(() => {
R && (JSON.stringify(m) === JSON.stringify(R) || w(R));
}, [R]);
const v = () => s.length ? _ ? s == null ? void 0 : s.map((d, x) => /* @__PURE__ */ l.jsx(
"p",
{
style: { minWidth: "max-content" },
className: "hsd-input-dropdown-preview-item",
children: d == null ? void 0 : d.label
},
x
)) : /* @__PURE__ */ l.jsx("p", { style: { minWidth: "max-content" }, children: s == null ? void 0 : s[0].label }) : m.length ? _ ? m == null ? void 0 : m.map((d, x) => /* @__PURE__ */ l.jsx(
"p",
{
style: { minWidth: "max-content" },
className: "hsd-input-dropdown-preview-item",
children: d == null ? void 0 : d.label
},
x
)) : /* @__PURE__ */ l.jsx("p", { style: { minWidth: "max-content" }, children: m == null ? void 0 : m[0].label }) : /* @__PURE__ */ l.jsx("p", { className: "hsd-input-dropdown-placeholder", children: C || "Search" });
return /* @__PURE__ */ l.jsxs(
"div",
{
className: `hsd-input-dropdown-container hsd-input-dropdown-size-${y} ${E ? "active" : ""}`,
ref: C,
onClick: z,
className: `hsd-input-dropdown-container hsd-input-dropdown-size-${y} ${I ? "active" : ""}`,
ref: Y,
onClick: H,
children: [
/* @__PURE__ */ l.jsxs("div", { className: "hsd-input-dropdown-preview-container", children: [
P ? /* @__PURE__ */ l.jsx(l.Fragment, { children: q.cloneElement(P, {
width: Pr(y),
P ? /* @__PURE__ */ l.jsx(l.Fragment, { children: K.cloneElement(P, {
width: Ar(y),
color: "#939E99"
}) }) : null,
/* @__PURE__ */ l.jsx("div", { className: "hsd-input-dropdown-container-preview-item", children: s.length ? _ ? s == null ? void 0 : s.map((u, v) => /* @__PURE__ */ l.jsx(
"p",
{
style: { minWidth: "max-content" },
className: "hsd-input-dropdown-preview-item",
children: u == null ? void 0 : u.label
},
v
)) : /* @__PURE__ */ l.jsx("p", { style: { minWidth: "max-content" }, children: s == null ? void 0 : s[0].label }) : /* @__PURE__ */ l.jsx("p", { className: "hsd-input-dropdown-placeholder", children: j || "Search" }) }),
/* @__PURE__ */ l.jsx(bn, { strokeWidth: 2, width: Pr(y) })
/* @__PURE__ */ l.jsx("div", { className: "hsd-input-dropdown-container-preview-item", children: v() }),
/* @__PURE__ */ l.jsx(bn, { strokeWidth: 2, width: Ar(y) })
] }),
E ? /* @__PURE__ */ l.jsxs(
I ? /* @__PURE__ */ l.jsxs(
"div",
{
className: "hsd-input-dropdown-lists-container",
onClick: (u) => u.stopPropagation(),
onClick: (d) => d.stopPropagation(),
children: [
O ? /* @__PURE__ */ l.jsxs("div", { className: "hsd-input-dropdown-container-dropdown-search", children: [
/* @__PURE__ */ l.jsx("div", { style: { display: "flex" }, children: /* @__PURE__ */ l.jsx(mn, { strokeWidth: 2, width: 20 }) }),
S ? /* @__PURE__ */ l.jsxs("div", { className: "hsd-input-dropdown-container-dropdown-search", children: [
/* @__PURE__ */ l.jsx("div", { style: { display: "flex" }, children: /* @__PURE__ */ l.jsx(wn, { strokeWidth: 2, width: 20 }) }),
/* @__PURE__ */ l.jsx(
"input",
{
onChange: (u) => {
w && w(u.target.value);
onChange: (d) => {
p && p(d.target.value);
}

@@ -954,9 +953,9 @@ }

] }) : null,
/* @__PURE__ */ l.jsx("div", { className: "hsd-input-dropdwon-item-container", children: g.map((u, v) => /* @__PURE__ */ l.jsxs(
/* @__PURE__ */ l.jsx("div", { className: "hsd-input-dropdwon-item-container", children: h.map((d, x) => /* @__PURE__ */ l.jsxs(
"div",
{
className: `hsd-input-dropdwon-item ${s != null && s.find((p) => p.value === u.value) ? "active" : ""}`,
onClick: () => J(u.label, u.value),
className: `hsd-input-dropdwon-item ${s != null && s.find((M) => M.value === d.value) ? "active" : ""}`,
onClick: () => F(d.label, d.value),
children: [
u.icon ? /* @__PURE__ */ l.jsx("div", { children: q.cloneElement(u.icon, {
d.icon ? /* @__PURE__ */ l.jsx("div", { children: K.cloneElement(d.icon, {
width: 16

@@ -966,7 +965,7 @@ }) }) : null,

" ",
/* @__PURE__ */ l.jsx("p", { children: u.label })
/* @__PURE__ */ l.jsx("p", { children: d.label })
] })
]
},
v
x
)) })

@@ -979,7 +978,7 @@ ]

);
}, mn = ({ ...g }) => /* @__PURE__ */ l.jsxs(
}, wn = ({ ...h }) => /* @__PURE__ */ l.jsxs(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
...g,
...h,
viewBox: "0 0 20 20",

@@ -1012,7 +1011,7 @@ fill: "none",

}
), bn = ({ ...g }) => /* @__PURE__ */ l.jsx(
), bn = ({ ...h }) => /* @__PURE__ */ l.jsx(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
...g,
...h,
viewBox: "0 0 24 24",

@@ -1031,12 +1030,12 @@ fill: "none",

}
), Pr = (g) => {
if (g === "sm")
), Ar = (h) => {
if (h === "sm")
return 16;
if (g === "md")
if (h === "md")
return 20;
if (g === "lg")
if (h === "lg")
return 20;
};
export {
yn as Dropdown
xn as Dropdown
};

@@ -1,2 +0,2 @@

(function(F,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(F=typeof globalThis<"u"?globalThis:F||self,E(F.Dropdown={},F.React))})(this,function(F,E){"use strict";var K={exports:{}},N={};/**
(function(D,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],y):(D=typeof globalThis<"u"?globalThis:D||self,y(D.Dropdown={},D.React))})(this,function(D,y){"use strict";var q={exports:{}},z={};/**
* @license React

@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js

* LICENSE file in the root directory of this source tree.
*/var ir;function Fr(){if(ir)return N;ir=1;var g=E,m=Symbol.for("react.element"),b=Symbol.for("react.fragment"),x=Object.prototype.hasOwnProperty,j=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P={key:!0,ref:!0,__self:!0,__source:!0};function D(C,w,s){var f,R={},T=null,I=null;s!==void 0&&(T=""+s),w.key!==void 0&&(T=""+w.key),w.ref!==void 0&&(I=w.ref);for(f in w)x.call(w,f)&&!P.hasOwnProperty(f)&&(R[f]=w[f]);if(C&&C.defaultProps)for(f in w=C.defaultProps,w)R[f]===void 0&&(R[f]=w[f]);return{$$typeof:m,type:C,key:T,ref:I,props:R,_owner:j.current}}return N.Fragment=b,N.jsx=D,N.jsxs=D,N}var z={};/**
*/var dr;function Wr(){if(dr)return z;dr=1;var h=y,g=Symbol.for("react.element"),_=Symbol.for("react.fragment"),x=Object.prototype.hasOwnProperty,j=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P={key:!0,ref:!0,__self:!0,__source:!0};function F(T,p,m){var w,s={},C=null,A=null;m!==void 0&&(C=""+m),p.key!==void 0&&(C=""+p.key),p.ref!==void 0&&(A=p.ref);for(w in p)x.call(p,w)&&!P.hasOwnProperty(w)&&(s[w]=p[w]);if(T&&T.defaultProps)for(w in p=T.defaultProps,p)s[w]===void 0&&(s[w]=p[w]);return{$$typeof:g,type:T,key:C,ref:A,props:s,_owner:j.current}}return z.Fragment=_,z.jsx=F,z.jsxs=F,z}var Y={};/**
* @license React

@@ -18,13 +18,13 @@ * react-jsx-runtime.development.js

* LICENSE file in the root directory of this source tree.
*/var ar;function Ir(){return ar||(ar=1,process.env.NODE_ENV!=="production"&&function(){var g=E,m=Symbol.for("react.element"),b=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),C=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),V=Symbol.iterator,H="@@iterator";function l(r){if(r===null||typeof r!="object")return null;var n=V&&r[V]||r[H];return typeof n=="function"?n:null}var v=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(r){{for(var n=arguments.length,e=new Array(n>1?n-1:0),o=1;o<n;o++)e[o-1]=arguments[o];k("error",r,e)}}function k(r,n,e){{var o=v.ReactDebugCurrentFrame,a=o.getStackAddendum();a!==""&&(n+="%s",e=e.concat([a]));var d=e.map(function(i){return String(i)});d.unshift("Warning: "+n),Function.prototype.apply.call(console[r],console,d)}}var X=!1,Yr=!1,Mr=!1,Vr=!1,Ur=!1,ur;ur=Symbol.for("react.module.reference");function Br(r){return!!(typeof r=="string"||typeof r=="function"||r===x||r===P||Ur||r===j||r===s||r===f||Vr||r===I||X||Yr||Mr||typeof r=="object"&&r!==null&&(r.$$typeof===T||r.$$typeof===R||r.$$typeof===D||r.$$typeof===C||r.$$typeof===w||r.$$typeof===ur||r.getModuleId!==void 0))}function $r(r,n,e){var o=r.displayName;if(o)return o;var a=n.displayName||n.name||"";return a!==""?e+"("+a+")":e}function lr(r){return r.displayName||"Context"}function S(r){if(r==null)return null;if(typeof r.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case x:return"Fragment";case b:return"Portal";case P:return"Profiler";case j:return"StrictMode";case s:return"Suspense";case f:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case C:var n=r;return lr(n)+".Consumer";case D:var e=r;return lr(e._context)+".Provider";case w:return $r(r,r.render,"ForwardRef");case R:var o=r.displayName||null;return o!==null?o:S(r.type)||"Memo";case T:{var a=r,d=a._payload,i=a._init;try{return S(i(d))}catch{return null}}}return null}var A=Object.assign,Y=0,cr,fr,pr,hr,vr,gr,wr;function mr(){}mr.__reactDisabledLog=!0;function Jr(){{if(Y===0){cr=console.log,fr=console.info,pr=console.warn,hr=console.error,vr=console.group,gr=console.groupCollapsed,wr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:mr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}Y++}}function Gr(){{if(Y--,Y===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},r,{value:cr}),info:A({},r,{value:fr}),warn:A({},r,{value:pr}),error:A({},r,{value:hr}),group:A({},r,{value:vr}),groupCollapsed:A({},r,{value:gr}),groupEnd:A({},r,{value:wr})})}Y<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=v.ReactCurrentDispatcher,q;function U(r,n,e){{if(q===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);q=o&&o[1]||""}return`
`+q+r}}var Q=!1,B;{var Kr=typeof WeakMap=="function"?WeakMap:Map;B=new Kr}function br(r,n){if(!r||Q)return"";{var e=B.get(r);if(e!==void 0)return e}var o;Q=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d;d=Z.current,Z.current=null,Jr();try{if(n){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){o=O}Reflect.construct(r,[],i)}else{try{i.call()}catch(O){o=O}r.call(i.prototype)}}else{try{throw Error()}catch(O){o=O}r()}}catch(O){if(O&&o&&typeof O.stack=="string"){for(var t=O.stack.split(`
`),y=o.stack.split(`
`),c=t.length-1,h=y.length-1;c>=1&&h>=0&&t[c]!==y[h];)h--;for(;c>=1&&h>=0;c--,h--)if(t[c]!==y[h]){if(c!==1||h!==1)do if(c--,h--,h<0||t[c]!==y[h]){var _=`
`+t[c].replace(" at new "," at ");return r.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",r.displayName)),typeof r=="function"&&B.set(r,_),_}while(c>=1&&h>=0);break}}}finally{Q=!1,Z.current=d,Gr(),Error.prepareStackTrace=a}var L=r?r.displayName||r.name:"",Dr=L?U(L):"";return typeof r=="function"&&B.set(r,Dr),Dr}function Hr(r,n,e){return br(r,!1)}function Xr(r){var n=r.prototype;return!!(n&&n.isReactComponent)}function $(r,n,e){if(r==null)return"";if(typeof r=="function")return br(r,Xr(r));if(typeof r=="string")return U(r);switch(r){case s:return U("Suspense");case f:return U("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case w:return Hr(r.render);case R:return $(r.type,n,e);case T:{var o=r,a=o._payload,d=o._init;try{return $(d(a),n,e)}catch{}}}return""}var J=Object.prototype.hasOwnProperty,yr={},xr=v.ReactDebugCurrentFrame;function G(r){if(r){var n=r._owner,e=$(r.type,r._source,n?n.type:null);xr.setExtraStackFrame(e)}else xr.setExtraStackFrame(null)}function Zr(r,n,e,o,a){{var d=Function.call.bind(J);for(var i in r)if(d(r,i)){var t=void 0;try{if(typeof r[i]!="function"){var y=Error((o||"React class")+": "+e+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw y.name="Invariant Violation",y}t=r[i](n,i,o,e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){t=c}t&&!(t instanceof Error)&&(G(a),p("%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).",o||"React class",e,i,typeof t),G(null)),t instanceof Error&&!(t.message in yr)&&(yr[t.message]=!0,G(a),p("Failed %s type: %s",e,t.message),G(null))}}}var qr=Array.isArray;function rr(r){return qr(r)}function Qr(r){{var n=typeof Symbol=="function"&&Symbol.toStringTag,e=n&&r[Symbol.toStringTag]||r.constructor.name||"Object";return e}}function rn(r){try{return Er(r),!1}catch{return!0}}function Er(r){return""+r}function Rr(r){if(rn(r))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qr(r)),Er(r)}var M=v.ReactCurrentOwner,nn={key:!0,ref:!0,__self:!0,__source:!0},_r,jr,nr;nr={};function en(r){if(J.call(r,"ref")){var n=Object.getOwnPropertyDescriptor(r,"ref").get;if(n&&n.isReactWarning)return!1}return r.ref!==void 0}function on(r){if(J.call(r,"key")){var n=Object.getOwnPropertyDescriptor(r,"key").get;if(n&&n.isReactWarning)return!1}return r.key!==void 0}function tn(r,n){if(typeof r.ref=="string"&&M.current&&n&&M.current.stateNode!==n){var e=S(M.current.type);nr[e]||(p('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',S(M.current.type),r.ref),nr[e]=!0)}}function an(r,n){{var e=function(){_r||(_r=!0,p("%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))};e.isReactWarning=!0,Object.defineProperty(r,"key",{get:e,configurable:!0})}}function sn(r,n){{var e=function(){jr||(jr=!0,p("%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))};e.isReactWarning=!0,Object.defineProperty(r,"ref",{get:e,configurable:!0})}}var dn=function(r,n,e,o,a,d,i){var t={$$typeof:m,type:r,key:n,ref:e,props:i,_owner:d};return t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(t,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(t,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t};function un(r,n,e,o,a){{var d,i={},t=null,y=null;e!==void 0&&(Rr(e),t=""+e),on(n)&&(Rr(n.key),t=""+n.key),en(n)&&(y=n.ref,tn(n,a));for(d in n)J.call(n,d)&&!nn.hasOwnProperty(d)&&(i[d]=n[d]);if(r&&r.defaultProps){var c=r.defaultProps;for(d in c)i[d]===void 0&&(i[d]=c[d])}if(t||y){var h=typeof r=="function"?r.displayName||r.name||"Unknown":r;t&&an(i,h),y&&sn(i,h)}return dn(r,t,y,a,o,M.current,i)}}var er=v.ReactCurrentOwner,Cr=v.ReactDebugCurrentFrame;function W(r){if(r){var n=r._owner,e=$(r.type,r._source,n?n.type:null);Cr.setExtraStackFrame(e)}else Cr.setExtraStackFrame(null)}var or;or=!1;function tr(r){return typeof r=="object"&&r!==null&&r.$$typeof===m}function Tr(){{if(er.current){var r=S(er.current.type);if(r)return`
*/var ur;function Nr(){return ur||(ur=1,process.env.NODE_ENV!=="production"&&function(){var h=y,g=Symbol.for("react.element"),_=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),T=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),s=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),U=Symbol.iterator,B="@@iterator";function Z(r){if(r===null||typeof r!="object")return null;var n=U&&r[U]||r[B];return typeof n=="function"?n:null}var I=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(r){{for(var n=arguments.length,e=new Array(n>1?n-1:0),o=1;o<n;o++)e[o-1]=arguments[o];d("error",r,e)}}function d(r,n,e){{var o=I.ReactDebugCurrentFrame,a=o.getStackAddendum();a!==""&&(n+="%s",e=e.concat([a]));var u=e.map(function(i){return String(i)});u.unshift("Warning: "+n),Function.prototype.apply.call(console[r],console,u)}}var E=!1,J=!1,k=!1,Q=!1,Ur=!1,fr;fr=Symbol.for("react.module.reference");function Br(r){return!!(typeof r=="string"||typeof r=="function"||r===x||r===P||Ur||r===j||r===m||r===w||Q||r===A||E||J||k||typeof r=="object"&&r!==null&&(r.$$typeof===C||r.$$typeof===s||r.$$typeof===F||r.$$typeof===T||r.$$typeof===p||r.$$typeof===fr||r.getModuleId!==void 0))}function Jr(r,n,e){var o=r.displayName;if(o)return o;var a=n.displayName||n.name||"";return a!==""?e+"("+a+")":e}function pr(r){return r.displayName||"Context"}function S(r){if(r==null)return null;if(typeof r.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case x:return"Fragment";case _:return"Portal";case P:return"Profiler";case j:return"StrictMode";case m:return"Suspense";case w:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case T:var n=r;return pr(n)+".Consumer";case F:var e=r;return pr(e._context)+".Provider";case p:return Jr(r,r.render,"ForwardRef");case s:var o=r.displayName||null;return o!==null?o:S(r.type)||"Memo";case C:{var a=r,u=a._payload,i=a._init;try{return S(i(u))}catch{return null}}}return null}var W=Object.assign,V=0,hr,vr,gr,mr,wr,br,yr;function xr(){}xr.__reactDisabledLog=!0;function $r(){{if(V===0){hr=console.log,vr=console.info,gr=console.warn,mr=console.error,wr=console.group,br=console.groupCollapsed,yr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:xr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}V++}}function Gr(){{if(V--,V===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},r,{value:hr}),info:W({},r,{value:vr}),warn:W({},r,{value:gr}),error:W({},r,{value:mr}),group:W({},r,{value:wr}),groupCollapsed:W({},r,{value:br}),groupEnd:W({},r,{value:yr})})}V<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var rr=I.ReactCurrentDispatcher,nr;function $(r,n,e){{if(nr===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);nr=o&&o[1]||""}return`
`+nr+r}}var er=!1,G;{var Kr=typeof WeakMap=="function"?WeakMap:Map;G=new Kr}function Er(r,n){if(!r||er)return"";{var e=G.get(r);if(e!==void 0)return e}var o;er=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=rr.current,rr.current=null,$r();try{if(n){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){o=O}Reflect.construct(r,[],i)}else{try{i.call()}catch(O){o=O}r.call(i.prototype)}}else{try{throw Error()}catch(O){o=O}r()}}catch(O){if(O&&o&&typeof O.stack=="string"){for(var t=O.stack.split(`
`),b=o.stack.split(`
`),c=t.length-1,f=b.length-1;c>=1&&f>=0&&t[c]!==b[f];)f--;for(;c>=1&&f>=0;c--,f--)if(t[c]!==b[f]){if(c!==1||f!==1)do if(c--,f--,f<0||t[c]!==b[f]){var R=`
`+t[c].replace(" at new "," at ");return r.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",r.displayName)),typeof r=="function"&&G.set(r,R),R}while(c>=1&&f>=0);break}}}finally{er=!1,rr.current=u,Gr(),Error.prepareStackTrace=a}var L=r?r.displayName||r.name:"",Ar=L?$(L):"";return typeof r=="function"&&G.set(r,Ar),Ar}function Hr(r,n,e){return Er(r,!1)}function Xr(r){var n=r.prototype;return!!(n&&n.isReactComponent)}function K(r,n,e){if(r==null)return"";if(typeof r=="function")return Er(r,Xr(r));if(typeof r=="string")return $(r);switch(r){case m:return $("Suspense");case w:return $("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case p:return Hr(r.render);case s:return K(r.type,n,e);case C:{var o=r,a=o._payload,u=o._init;try{return K(u(a),n,e)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,Rr={},_r=I.ReactDebugCurrentFrame;function X(r){if(r){var n=r._owner,e=K(r.type,r._source,n?n.type:null);_r.setExtraStackFrame(e)}else _r.setExtraStackFrame(null)}function qr(r,n,e,o,a){{var u=Function.call.bind(H);for(var i in r)if(u(r,i)){var t=void 0;try{if(typeof r[i]!="function"){var b=Error((o||"React class")+": "+e+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}t=r[i](n,i,o,e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){t=c}t&&!(t instanceof Error)&&(X(a),v("%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).",o||"React class",e,i,typeof t),X(null)),t instanceof Error&&!(t.message in Rr)&&(Rr[t.message]=!0,X(a),v("Failed %s type: %s",e,t.message),X(null))}}}var Zr=Array.isArray;function or(r){return Zr(r)}function Qr(r){{var n=typeof Symbol=="function"&&Symbol.toStringTag,e=n&&r[Symbol.toStringTag]||r.constructor.name||"Object";return e}}function rn(r){try{return jr(r),!1}catch{return!0}}function jr(r){return""+r}function Cr(r){if(rn(r))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qr(r)),jr(r)}var M=I.ReactCurrentOwner,nn={key:!0,ref:!0,__self:!0,__source:!0},Tr,kr,tr;tr={};function en(r){if(H.call(r,"ref")){var n=Object.getOwnPropertyDescriptor(r,"ref").get;if(n&&n.isReactWarning)return!1}return r.ref!==void 0}function on(r){if(H.call(r,"key")){var n=Object.getOwnPropertyDescriptor(r,"key").get;if(n&&n.isReactWarning)return!1}return r.key!==void 0}function tn(r,n){if(typeof r.ref=="string"&&M.current&&n&&M.current.stateNode!==n){var e=S(M.current.type);tr[e]||(v('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',S(M.current.type),r.ref),tr[e]=!0)}}function an(r,n){{var e=function(){Tr||(Tr=!0,v("%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))};e.isReactWarning=!0,Object.defineProperty(r,"key",{get:e,configurable:!0})}}function sn(r,n){{var e=function(){kr||(kr=!0,v("%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))};e.isReactWarning=!0,Object.defineProperty(r,"ref",{get:e,configurable:!0})}}var dn=function(r,n,e,o,a,u,i){var t={$$typeof:g,type:r,key:n,ref:e,props:i,_owner:u};return t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(t,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(t,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t};function un(r,n,e,o,a){{var u,i={},t=null,b=null;e!==void 0&&(Cr(e),t=""+e),on(n)&&(Cr(n.key),t=""+n.key),en(n)&&(b=n.ref,tn(n,a));for(u in n)H.call(n,u)&&!nn.hasOwnProperty(u)&&(i[u]=n[u]);if(r&&r.defaultProps){var c=r.defaultProps;for(u in c)i[u]===void 0&&(i[u]=c[u])}if(t||b){var f=typeof r=="function"?r.displayName||r.name||"Unknown":r;t&&an(i,f),b&&sn(i,f)}return dn(r,t,b,a,o,M.current,i)}}var ir=I.ReactCurrentOwner,Sr=I.ReactDebugCurrentFrame;function N(r){if(r){var n=r._owner,e=K(r.type,r._source,n?n.type:null);Sr.setExtraStackFrame(e)}else Sr.setExtraStackFrame(null)}var ar;ar=!1;function sr(r){return typeof r=="object"&&r!==null&&r.$$typeof===g}function Or(){{if(ir.current){var r=S(ir.current.type);if(r)return`
Check the render method of \``+r+"`."}return""}}function ln(r){{if(r!==void 0){var n=r.fileName.replace(/^.*[\\\/]/,""),e=r.lineNumber;return`
Check your code at `+n+":"+e+"."}return""}}var kr={};function cn(r){{var n=Tr();if(!n){var e=typeof r=="string"?r:r.displayName||r.name;e&&(n=`
Check your code at `+n+":"+e+"."}return""}}var Pr={};function cn(r){{var n=Or();if(!n){var e=typeof r=="string"?r:r.displayName||r.name;e&&(n=`
Check the top-level render call using <`+e+">.")}return n}}function Sr(r,n){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var e=cn(n);if(kr[e])return;kr[e]=!0;var o="";r&&r._owner&&r._owner!==er.current&&(o=" It was passed a child from "+S(r._owner.type)+"."),W(r),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',e,o),W(null)}}function Or(r,n){{if(typeof r!="object")return;if(rr(r))for(var e=0;e<r.length;e++){var o=r[e];tr(o)&&Sr(o,n)}else if(tr(r))r._store&&(r._store.validated=!0);else if(r){var a=l(r);if(typeof a=="function"&&a!==r.entries)for(var d=a.call(r),i;!(i=d.next()).done;)tr(i.value)&&Sr(i.value,n)}}}function fn(r){{var n=r.type;if(n==null||typeof n=="string")return;var e;if(typeof n=="function")e=n.propTypes;else if(typeof n=="object"&&(n.$$typeof===w||n.$$typeof===R))e=n.propTypes;else return;if(e){var o=S(n);Zr(e,r.props,"prop",o,r)}else if(n.PropTypes!==void 0&&!or){or=!0;var a=S(n);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",a||"Unknown")}typeof n.getDefaultProps=="function"&&!n.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pn(r){{for(var n=Object.keys(r.props),e=0;e<n.length;e++){var o=n[e];if(o!=="children"&&o!=="key"){W(r),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),W(null);break}}r.ref!==null&&(W(r),p("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Pr(r,n,e,o,a,d){{var i=Br(r);if(!i){var t="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(t+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var y=ln(a);y?t+=y:t+=Tr();var c;r===null?c="null":rr(r)?c="array":r!==void 0&&r.$$typeof===m?(c="<"+(S(r.type)||"Unknown")+" />",t=" Did you accidentally export a JSX literal instead of a component?"):c=typeof r,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,t)}var h=un(r,n,e,a,d);if(h==null)return h;if(i){var _=n.children;if(_!==void 0)if(o)if(rr(_)){for(var L=0;L<_.length;L++)Or(_[L],r);Object.freeze&&Object.freeze(_)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Or(_,r)}return r===x?pn(h):fn(h),h}}function hn(r,n,e){return Pr(r,n,e,!0)}function vn(r,n,e){return Pr(r,n,e,!1)}var gn=vn,wn=hn;z.Fragment=x,z.jsx=gn,z.jsxs=wn}()),z}process.env.NODE_ENV==="production"?K.exports=Fr():K.exports=Ir();var u=K.exports;const Ar=`@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
Check the top-level render call using <`+e+">.")}return n}}function Fr(r,n){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var e=cn(n);if(Pr[e])return;Pr[e]=!0;var o="";r&&r._owner&&r._owner!==ir.current&&(o=" It was passed a child from "+S(r._owner.type)+"."),N(r),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',e,o),N(null)}}function Ir(r,n){{if(typeof r!="object")return;if(or(r))for(var e=0;e<r.length;e++){var o=r[e];sr(o)&&Fr(o,n)}else if(sr(r))r._store&&(r._store.validated=!0);else if(r){var a=Z(r);if(typeof a=="function"&&a!==r.entries)for(var u=a.call(r),i;!(i=u.next()).done;)sr(i.value)&&Fr(i.value,n)}}}function fn(r){{var n=r.type;if(n==null||typeof n=="string")return;var e;if(typeof n=="function")e=n.propTypes;else if(typeof n=="object"&&(n.$$typeof===p||n.$$typeof===s))e=n.propTypes;else return;if(e){var o=S(n);qr(e,r.props,"prop",o,r)}else if(n.PropTypes!==void 0&&!ar){ar=!0;var a=S(n);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",a||"Unknown")}typeof n.getDefaultProps=="function"&&!n.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pn(r){{for(var n=Object.keys(r.props),e=0;e<n.length;e++){var o=n[e];if(o!=="children"&&o!=="key"){N(r),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),N(null);break}}r.ref!==null&&(N(r),v("Invalid attribute `ref` supplied to `React.Fragment`."),N(null))}}function Dr(r,n,e,o,a,u){{var i=Br(r);if(!i){var t="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(t+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var b=ln(a);b?t+=b:t+=Or();var c;r===null?c="null":or(r)?c="array":r!==void 0&&r.$$typeof===g?(c="<"+(S(r.type)||"Unknown")+" />",t=" Did you accidentally export a JSX literal instead of a component?"):c=typeof r,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,t)}var f=un(r,n,e,a,u);if(f==null)return f;if(i){var R=n.children;if(R!==void 0)if(o)if(or(R)){for(var L=0;L<R.length;L++)Ir(R[L],r);Object.freeze&&Object.freeze(R)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ir(R,r)}return r===x?pn(f):fn(f),f}}function hn(r,n,e){return Dr(r,n,e,!0)}function vn(r,n,e){return Dr(r,n,e,!1)}var gn=vn,mn=hn;Y.Fragment=x,Y.jsx=gn,Y.jsxs=mn}()),Y}process.env.NODE_ENV==="production"?q.exports=Wr():q.exports=Nr();var l=q.exports;const Lr=`@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
* {

@@ -221,2 +221,2 @@ margin: 0;

}
`;function Wr(g){const[m,b]=E.useState(g),x=E.useRef(null),j=P=>{x.current&&!x.current.contains(P.target)&&b(!1)};return E.useEffect(()=>(document.addEventListener("click",j,!0),()=>{document.removeEventListener("click",j,!0)}),[]),{ref:x,isComponentVisible:m,setIsComponentVisible:b}}const sr="hudoro-input-dropdown-styles";(g=>{if(!document.getElementById(sr)){const m=document.createElement("style");m.id=sr,m.textContent=g,document.head.appendChild(m)}})(Ar);const Lr=({dropdownLists:g,onChange:m,defaultValue:b,size:x="md",multiSelect:j,searchAble:P,iconLeft:D,placeholder:C,onSearch:w})=>{const[s,f]=E.useState([]),{isComponentVisible:R,ref:T,setIsComponentVisible:I}=Wr(!1),V=()=>{I(l=>!l)},H=(l,v)=>{if(!j)f([{label:l,value:v}]),m([{label:l,value:v}]),I(!1);else if(s==null?void 0:s.find(k=>k.value===v)){const k=[...s?s.filter(X=>X.value!==v):[]];f(k),m(k)}else{const k=[...s||[],{label:l,value:v}];f(k),m(k)}};return E.useEffect(()=>{if(b)if(!s.length)f(b);else for(let l of b){const v=s.findIndex(p=>p.value===l.value);if(v<0){console.log("position",v),console.log("value",s),console.log("defaultValue",b),f(s);return}}b!=null&&b.length||f([])},[b,g,s]),u.jsxs("div",{className:`hsd-input-dropdown-container hsd-input-dropdown-size-${x} ${R?"active":""}`,ref:T,onClick:V,children:[u.jsxs("div",{className:"hsd-input-dropdown-preview-container",children:[D?u.jsx(u.Fragment,{children:E.cloneElement(D,{width:dr(x),color:"#939E99"})}):null,u.jsx("div",{className:"hsd-input-dropdown-container-preview-item",children:s.length?j?s==null?void 0:s.map((l,v)=>u.jsx("p",{style:{minWidth:"max-content"},className:"hsd-input-dropdown-preview-item",children:l==null?void 0:l.label},v)):u.jsx("p",{style:{minWidth:"max-content"},children:s==null?void 0:s[0].label}):u.jsx("p",{className:"hsd-input-dropdown-placeholder",children:C||"Search"})}),u.jsx(zr,{strokeWidth:2,width:dr(x)})]}),R?u.jsxs("div",{className:"hsd-input-dropdown-lists-container",onClick:l=>l.stopPropagation(),children:[P?u.jsxs("div",{className:"hsd-input-dropdown-container-dropdown-search",children:[u.jsx("div",{style:{display:"flex"},children:u.jsx(Nr,{strokeWidth:2,width:20})}),u.jsx("input",{onChange:l=>{w&&w(l.target.value)}})]}):null,u.jsx("div",{className:"hsd-input-dropdwon-item-container",children:g.map((l,v)=>u.jsxs("div",{className:`hsd-input-dropdwon-item ${s!=null&&s.find(p=>p.value===l.value)?"active":""}`,onClick:()=>H(l.label,l.value),children:[l.icon?u.jsx("div",{children:E.cloneElement(l.icon,{width:16})}):null,u.jsxs("div",{children:[" ",u.jsx("p",{children:l.label})]})]},v))})]}):null]})},Nr=({...g})=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",...g,viewBox:"0 0 20 20",fill:"none",children:[u.jsx("circle",{cx:"9.80547",cy:"9.8055",r:"7.49047",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M15.0153 15.4043L17.9519 18.3333",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),zr=({...g})=>u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...g,viewBox:"0 0 24 24",fill:"none",color:"#1976D2",children:u.jsx("path",{d:"M4 9L12 17L20 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),dr=g=>{if(g==="sm")return 16;if(g==="md")return 20;if(g==="lg")return 20};F.Dropdown=Lr,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
`;function zr(h){const[g,_]=y.useState(h),x=y.useRef(null),j=P=>{x.current&&!x.current.contains(P.target)&&_(!1)};return y.useEffect(()=>(document.addEventListener("click",j,!0),()=>{document.removeEventListener("click",j,!0)}),[]),{ref:x,isComponentVisible:g,setIsComponentVisible:_}}const lr="hudoro-input-dropdown-styles";(h=>{if(!document.getElementById(lr)){const g=document.createElement("style");g.id=lr,g.textContent=h,document.head.appendChild(g)}})(Lr);const Yr=({dropdownLists:h,onChange:g,defaultValue:_,size:x="md",multiSelect:j,searchAble:P,iconLeft:F,placeholder:T,onSearch:p})=>{const[m,w]=y.useState([]),[s,C]=y.useState([]),{isComponentVisible:A,ref:U,setIsComponentVisible:B}=zr(!1),Z=()=>{B(d=>!d)},I=(d,E)=>{if(!j)C([{label:d,value:E}]),g([{label:d,value:E}]),B(!1);else if(s==null?void 0:s.find(k=>k.value===E)){const k=[...s?s.filter(Q=>Q.value!==E):[]];C(k),g(k)}else{const k=[...s||[],{label:d,value:E}];C(k),g(k)}};y.useEffect(()=>{_&&(JSON.stringify(m)===JSON.stringify(_)||w(_))},[_]);const v=()=>s.length?j?s==null?void 0:s.map((d,E)=>l.jsx("p",{style:{minWidth:"max-content"},className:"hsd-input-dropdown-preview-item",children:d==null?void 0:d.label},E)):l.jsx("p",{style:{minWidth:"max-content"},children:s==null?void 0:s[0].label}):m.length?j?m==null?void 0:m.map((d,E)=>l.jsx("p",{style:{minWidth:"max-content"},className:"hsd-input-dropdown-preview-item",children:d==null?void 0:d.label},E)):l.jsx("p",{style:{minWidth:"max-content"},children:m==null?void 0:m[0].label}):l.jsx("p",{className:"hsd-input-dropdown-placeholder",children:T||"Search"});return l.jsxs("div",{className:`hsd-input-dropdown-container hsd-input-dropdown-size-${x} ${A?"active":""}`,ref:U,onClick:Z,children:[l.jsxs("div",{className:"hsd-input-dropdown-preview-container",children:[F?l.jsx(l.Fragment,{children:y.cloneElement(F,{width:cr(x),color:"#939E99"})}):null,l.jsx("div",{className:"hsd-input-dropdown-container-preview-item",children:v()}),l.jsx(Mr,{strokeWidth:2,width:cr(x)})]}),A?l.jsxs("div",{className:"hsd-input-dropdown-lists-container",onClick:d=>d.stopPropagation(),children:[P?l.jsxs("div",{className:"hsd-input-dropdown-container-dropdown-search",children:[l.jsx("div",{style:{display:"flex"},children:l.jsx(Vr,{strokeWidth:2,width:20})}),l.jsx("input",{onChange:d=>{p&&p(d.target.value)}})]}):null,l.jsx("div",{className:"hsd-input-dropdwon-item-container",children:h.map((d,E)=>l.jsxs("div",{className:`hsd-input-dropdwon-item ${s!=null&&s.find(J=>J.value===d.value)?"active":""}`,onClick:()=>I(d.label,d.value),children:[d.icon?l.jsx("div",{children:y.cloneElement(d.icon,{width:16})}):null,l.jsxs("div",{children:[" ",l.jsx("p",{children:d.label})]})]},E))})]}):null]})},Vr=({...h})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",...h,viewBox:"0 0 20 20",fill:"none",children:[l.jsx("circle",{cx:"9.80547",cy:"9.8055",r:"7.49047",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M15.0153 15.4043L17.9519 18.3333",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),Mr=({...h})=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...h,viewBox:"0 0 24 24",fill:"none",color:"#1976D2",children:l.jsx("path",{d:"M4 9L12 17L20 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),cr=h=>{if(h==="sm")return 16;if(h==="md")return 20;if(h==="lg")return 20};D.Dropdown=Yr,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
{
"name": "@hudoro/dropdown",
"version": "0.0.3-beta.20",
"version": "0.0.3-beta.21",
"description": "dropdown component for Hudoro UI",

@@ -5,0 +5,0 @@ "author": "Prawito Hudoro",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc