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.2-beta.10 to 0.0.3-beta.1

594

dist/dropdown.es.js

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

import K, { useState as ar, useRef as ce, useEffect as sr } from "react";
var dr = { exports: {} }, L = {};
import q, { useState as Fr, useRef as ce, useEffect as or } from "react";
var ir = { exports: {} }, N = {};
/**

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

*/
var Fr;
var Sr;
function fe() {
if (Fr)
return L;
Fr = 1;
var c = K, m = Symbol.for("react.element"), R = Symbol.for("react.fragment"), w = Object.prototype.hasOwnProperty, _ = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
function O(j, h, P) {
var g, d = {}, y = null, F = null;
P !== void 0 && (y = "" + P), h.key !== void 0 && (y = "" + h.key), h.ref !== void 0 && (F = h.ref);
for (g in h)
w.call(h, g) && !S.hasOwnProperty(g) && (d[g] = h[g]);
if (Sr)
return N;
Sr = 1;
var h = q, w = 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, O = { key: !0, ref: !0, __self: !0, __source: !0 };
function P(j, g, u) {
var v, x = {}, C = null, D = null;
u !== void 0 && (C = "" + u), g.key !== void 0 && (C = "" + g.key), g.ref !== void 0 && (D = g.ref);
for (v in g)
y.call(g, v) && !O.hasOwnProperty(v) && (x[v] = g[v]);
if (j && j.defaultProps)
for (g in h = j.defaultProps, h)
d[g] === void 0 && (d[g] = h[g]);
return { $$typeof: m, type: j, key: y, ref: F, props: d, _owner: _.current };
for (v in g = j.defaultProps, g)
x[v] === void 0 && (x[v] = g[v]);
return { $$typeof: w, type: j, key: C, ref: D, props: x, _owner: _.current };
}
return L.Fragment = R, L.jsx = O, L.jsxs = O, L;
return N.Fragment = R, N.jsx = P, N.jsxs = P, N;
}
var z = {};
var L = {};
/**

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

*/
var Ir;
var Or;
function pe() {
return Ir || (Ir = 1, process.env.NODE_ENV !== "production" && function() {
var c = K, m = Symbol.for("react.element"), R = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), O = Symbol.for("react.provider"), j = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), Y = Symbol.iterator, M = "@@iterator";
function H(r) {
return Or || (Or = 1, process.env.NODE_ENV !== "production" && function() {
var h = q, w = Symbol.for("react.element"), R = 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"), g = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), V = Symbol.iterator, J = "@@iterator";
function s(r) {
if (r === null || typeof r != "object")
return null;
var e = Y && r[Y] || r[M];
var e = V && r[V] || r[J];
return typeof e == "function" ? e : null;
}
var D = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function v(r) {
var m = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function f(r) {
{
for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), o = 1; o < e; o++)
n[o - 1] = arguments[o];
s("error", r, n);
k("error", r, n);
}
}
function s(r, e, n) {
function k(r, e, n) {
{
var o = D.ReactDebugCurrentFrame, a = o.getStackAddendum();
var o = m.ReactDebugCurrentFrame, a = o.getStackAddendum();
a !== "" && (e += "%s", n = n.concat([a]));
var u = n.map(function(i) {
return String(i);
var d = n.map(function(t) {
return String(t);
});
u.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, u);
d.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, d);
}
}
var x = !1, A = !1, C = !1, X = !1, $r = !1, ur;
ur = Symbol.for("react.module.reference");
var G = !1, Ir = !1, Ar = !1, Wr = !1, $r = !1, tr;
tr = Symbol.for("react.module.reference");
function Nr(r) {
return !!(typeof r == "string" || typeof r == "function" || r === w || r === S || $r || r === _ || r === P || r === g || X || r === F || x || A || C || typeof r == "object" && r !== null && (r.$$typeof === y || r.$$typeof === d || r.$$typeof === O || r.$$typeof === j || r.$$typeof === h || // This needs to include all possible module reference object
return !!(typeof r == "string" || typeof r == "function" || r === y || r === O || $r || r === _ || r === u || r === v || Wr || r === D || G || Ir || Ar || typeof r == "object" && r !== null && (r.$$typeof === C || r.$$typeof === x || r.$$typeof === P || r.$$typeof === j || r.$$typeof === g || // 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 === ur || r.getModuleId !== void 0));
r.$$typeof === tr || r.getModuleId !== void 0));
}
function Vr(r, e, n) {
function Lr(r, e, n) {
var o = r.displayName;

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

}
function lr(r) {
function ar(r) {
return r.displayName || "Context";
}
function k(r) {
function T(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")
if (typeof r.tag == "number" && f("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;

@@ -98,13 +98,13 @@ if (typeof r == "string")

switch (r) {
case w:
case y:
return "Fragment";
case R:
return "Portal";
case S:
case O:
return "Profiler";
case _:
return "StrictMode";
case P:
case u:
return "Suspense";
case g:
case v:
return "SuspenseList";

@@ -116,15 +116,15 @@ }

var e = r;
return lr(e) + ".Consumer";
case O:
return ar(e) + ".Consumer";
case P:
var n = r;
return lr(n._context) + ".Provider";
case h:
return Vr(r, r.render, "ForwardRef");
case d:
return ar(n._context) + ".Provider";
case g:
return Lr(r, r.render, "ForwardRef");
case x:
var o = r.displayName || null;
return o !== null ? o : k(r.type) || "Memo";
case y: {
var a = r, u = a._payload, i = a._init;
return o !== null ? o : T(r.type) || "Memo";
case C: {
var a = r, d = a._payload, t = a._init;
try {
return k(i(u));
return T(t(d));
} catch {

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

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

@@ -162,3 +162,3 @@ };

}
N++;
W++;
}

@@ -168,3 +168,3 @@ }

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

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

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

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

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

@@ -232,13 +232,13 @@ return n;

var o;
rr = !0;
X = !0;
var a = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var u;
u = Z.current, Z.current = null, Lr();
var d;
d = K.current, K.current = null, Vr();
try {
if (e) {
var i = function() {
var t = function() {
throw Error();
};
if (Object.defineProperty(i.prototype, "props", {
if (Object.defineProperty(t.prototype, "props", {
set: function() {

@@ -249,14 +249,14 @@ throw Error();

try {
Reflect.construct(i, []);
} catch (T) {
o = T;
Reflect.construct(t, []);
} catch (S) {
o = S;
}
Reflect.construct(r, [], i);
Reflect.construct(r, [], t);
} else {
try {
i.call();
} catch (T) {
o = T;
t.call();
} catch (S) {
o = S;
}
r.call(i.prototype);
r.call(t.prototype);
}

@@ -266,23 +266,23 @@ } else {

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

@@ -292,9 +292,9 @@ }

} finally {
rr = !1, Z.current = u, zr(), Error.prepareStackTrace = a;
X = !1, K.current = d, zr(), Error.prepareStackTrace = a;
}
var $ = r ? r.displayName || r.name : "", Dr = $ ? U($) : "";
return typeof r == "function" && B.set(r, Dr), Dr;
var A = r ? r.displayName || r.name : "", Tr = A ? z(A) : "";
return typeof r == "function" && Y.set(r, Tr), Tr;
}
function Mr(r, e, n) {
return wr(r, !1);
return vr(r, !1);
}

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

}
function q(r, e, n) {
function M(r, e, n) {
if (r == null)
return "";
if (typeof r == "function")
return wr(r, Ur(r));
return vr(r, Ur(r));
if (typeof r == "string")
return U(r);
return z(r);
switch (r) {
case P:
return U("Suspense");
case g:
return U("SuspenseList");
case u:
return z("Suspense");
case v:
return z("SuspenseList");
}
if (typeof r == "object")
switch (r.$$typeof) {
case h:
case g:
return Mr(r.render);
case d:
return q(r.type, e, n);
case y: {
var o = r, a = o._payload, u = o._init;
case x:
return M(r.type, e, n);
case C: {
var o = r, a = o._payload, d = o._init;
try {
return q(u(a), e, n);
return M(d(a), e, n);
} catch {

@@ -335,26 +335,26 @@ }

}
var J = Object.prototype.hasOwnProperty, yr = {}, xr = D.ReactDebugCurrentFrame;
function G(r) {
var U = Object.prototype.hasOwnProperty, gr = {}, mr = m.ReactDebugCurrentFrame;
function B(r) {
if (r) {
var e = r._owner, n = q(r.type, r._source, e ? e.type : null);
xr.setExtraStackFrame(n);
var e = r._owner, n = M(r.type, r._source, e ? e.type : null);
mr.setExtraStackFrame(n);
} else
xr.setExtraStackFrame(null);
mr.setExtraStackFrame(null);
}
function Br(r, e, n, o, a) {
{
var u = Function.call.bind(J);
for (var i in r)
if (u(r, i)) {
var t = void 0;
var d = Function.call.bind(U);
for (var t in r)
if (d(r, t)) {
var i = void 0;
try {
if (typeof r[i] != "function") {
var b = Error((o || "React class") + ": " + n + " 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`.");
if (typeof r[t] != "function") {
var b = Error((o || "React class") + ": " + n + " 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;
}
t = r[i](e, i, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (f) {
t = f;
i = r[t](e, t, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (c) {
i = c;
}
t && !(t 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", n, i, typeof t), G(null)), t instanceof Error && !(t.message in yr) && (yr[t.message] = !0, G(a), v("Failed %s type: %s", n, t.message), G(null));
i && !(i instanceof Error) && (B(a), f("%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", n, t, typeof i), B(null)), i instanceof Error && !(i.message in gr) && (gr[i.message] = !0, B(a), f("Failed %s type: %s", n, i.message), B(null));
}

@@ -364,3 +364,3 @@ }

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

@@ -376,3 +376,3 @@ }

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

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

}
function Er(r) {
function wr(r) {
return "" + r;
}
function Rr(r) {
function br(r) {
if (Gr(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)), Er(r);
return f("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);
}
var V = D.ReactCurrentOwner, Kr = {
var $ = m.ReactCurrentOwner, Kr = {
key: !0,

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

__source: !0
}, _r, jr, nr;
nr = {};
}, yr, xr, Q;
Q = {};
function Hr(r) {
if (J.call(r, "ref")) {
if (U.call(r, "ref")) {
var e = Object.getOwnPropertyDescriptor(r, "ref").get;

@@ -407,3 +407,3 @@ if (e && e.isReactWarning)

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

@@ -416,5 +416,5 @@ if (e && e.isReactWarning)

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

@@ -425,3 +425,3 @@ }

var n = function() {
_r || (_r = !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)", e));
yr || (yr = !0, f("%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)", e));
};

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

var n = function() {
jr || (jr = !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)", e));
xr || (xr = !0, f("%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)", e));
};

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

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

@@ -455,7 +455,7 @@ type: r,

ref: n,
props: i,
props: t,
// Record the component responsible for creating this element.
_owner: u
_owner: d
};
return t._store = {}, Object.defineProperty(t._store, "validated", {
return i._store = {}, Object.defineProperty(i._store, "validated", {
configurable: !1,

@@ -465,3 +465,3 @@ enumerable: !1,

value: !1
}), Object.defineProperty(t, "_self", {
}), Object.defineProperty(i, "_self", {
configurable: !1,

@@ -471,3 +471,3 @@ enumerable: !1,

value: o
}), Object.defineProperty(t, "_source", {
}), Object.defineProperty(i, "_source", {
configurable: !1,

@@ -477,39 +477,39 @@ enumerable: !1,

value: a
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
};
function ne(r, e, n, o, a) {
{
var u, i = {}, t = null, b = null;
n !== void 0 && (Rr(n), t = "" + n), Xr(e) && (Rr(e.key), t = "" + e.key), Hr(e) && (b = e.ref, Zr(e, a));
for (u in e)
J.call(e, u) && !Kr.hasOwnProperty(u) && (i[u] = e[u]);
var d, t = {}, i = null, b = null;
n !== void 0 && (br(n), i = "" + n), Xr(e) && (br(e.key), i = "" + e.key), Hr(e) && (b = e.ref, Zr(e, a));
for (d in e)
U.call(e, d) && !Kr.hasOwnProperty(d) && (t[d] = e[d]);
if (r && r.defaultProps) {
var f = r.defaultProps;
for (u in f)
i[u] === void 0 && (i[u] = f[u]);
var c = r.defaultProps;
for (d in c)
t[d] === void 0 && (t[d] = c[d]);
}
if (t || b) {
if (i || b) {
var p = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
t && Qr(i, p), b && re(i, p);
i && Qr(t, p), b && re(t, p);
}
return ee(r, t, b, a, o, V.current, i);
return ee(r, i, b, a, o, $.current, t);
}
}
var or = D.ReactCurrentOwner, Cr = D.ReactDebugCurrentFrame;
function W(r) {
var rr = m.ReactCurrentOwner, Er = m.ReactDebugCurrentFrame;
function I(r) {
if (r) {
var e = r._owner, n = q(r.type, r._source, e ? e.type : null);
Cr.setExtraStackFrame(n);
var e = r._owner, n = M(r.type, r._source, e ? e.type : null);
Er.setExtraStackFrame(n);
} else
Cr.setExtraStackFrame(null);
Er.setExtraStackFrame(null);
}
var tr;
tr = !1;
function ir(r) {
return typeof r == "object" && r !== null && r.$$typeof === m;
var er;
er = !1;
function nr(r) {
return typeof r == "object" && r !== null && r.$$typeof === w;
}
function kr() {
function Rr() {
{
if (or.current) {
var r = k(or.current.type);
if (rr.current) {
var r = T(rr.current.type);
if (r)

@@ -534,6 +534,6 @@ return `

}
var Tr = {};
function te(r) {
var _r = {};
function ie(r) {
{
var e = kr();
var e = Rr();
if (!e) {

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

}
function Sr(r, e) {
function jr(r, e) {
{

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

r._store.validated = !0;
var n = te(e);
if (Tr[n])
var n = ie(e);
if (_r[n])
return;
Tr[n] = !0;
_r[n] = !0;
var o = "";
r && r._owner && r._owner !== or.current && (o = " It was passed a child from " + k(r._owner.type) + "."), W(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.', n, o), W(null);
r && r._owner && r._owner !== rr.current && (o = " It was passed a child from " + T(r._owner.type) + "."), I(r), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), I(null);
}
}
function Or(r, e) {
function Cr(r, e) {
{
if (typeof r != "object")
return;
if (er(r))
if (Z(r))
for (var n = 0; n < r.length; n++) {
var o = r[n];
ir(o) && Sr(o, e);
nr(o) && jr(o, e);
}
else if (ir(r))
else if (nr(r))
r._store && (r._store.validated = !0);
else if (r) {
var a = H(r);
var a = s(r);
if (typeof a == "function" && a !== r.entries)
for (var u = a.call(r), i; !(i = u.next()).done; )
ir(i.value) && Sr(i.value, e);
for (var d = a.call(r), t; !(t = d.next()).done; )
nr(t.value) && jr(t.value, e);
}
}
}
function ie(r) {
function te(r) {
{

@@ -590,5 +590,5 @@ var e = r.type;

n = e.propTypes;
else if (typeof e == "object" && (e.$$typeof === h || // Note: Memo only checks outer props here.
else if (typeof e == "object" && (e.$$typeof === g || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
e.$$typeof === d))
e.$$typeof === x))
n = e.propTypes;

@@ -598,10 +598,10 @@ else

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

@@ -614,51 +614,51 @@ }

if (o !== "children" && o !== "key") {
W(r), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), W(null);
I(r), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), I(null);
break;
}
}
r.ref !== null && (W(r), v("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
r.ref !== null && (I(r), f("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
}
}
function Pr(r, e, n, o, a, u) {
function kr(r, e, n, o, a, d) {
{
var i = Nr(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 t = Nr(r);
if (!t) {
var i = "";
(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 b = oe(a);
b ? t += b : t += kr();
var f;
r === null ? f = "null" : er(r) ? f = "array" : r !== void 0 && r.$$typeof === m ? (f = "<" + (k(r.type) || "Unknown") + " />", t = " Did you accidentally export a JSX literal instead of a component?") : f = 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", f, t);
b ? i += b : i += Rr();
var c;
r === null ? c = "null" : Z(r) ? c = "array" : r !== void 0 && r.$$typeof === w ? (c = "<" + (T(r.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : c = typeof r, f("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 p = ne(r, e, n, a, u);
var p = ne(r, e, n, a, d);
if (p == null)
return p;
if (i) {
if (t) {
var E = e.children;
if (E !== void 0)
if (o)
if (er(E)) {
for (var $ = 0; $ < E.length; $++)
Or(E[$], r);
if (Z(E)) {
for (var A = 0; A < E.length; A++)
Cr(E[A], r);
Object.freeze && Object.freeze(E);
} 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.");
f("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(E, r);
Cr(E, r);
}
return r === w ? ae(p) : ie(p), p;
return r === y ? ae(p) : te(p), p;
}
}
function se(r, e, n) {
return Pr(r, e, n, !0);
return kr(r, e, n, !0);
}
function de(r, e, n) {
return Pr(r, e, n, !1);
return kr(r, e, n, !1);
}
var ue = de, le = se;
z.Fragment = w, z.jsx = ue, z.jsxs = le;
}()), z;
L.Fragment = y, L.jsx = ue, L.jsxs = le;
}()), L;
}
process.env.NODE_ENV === "production" ? dr.exports = fe() : dr.exports = pe();
var l = dr.exports;
process.env.NODE_ENV === "production" ? ir.exports = fe() : ir.exports = pe();
var l = ir.exports;
const he = `@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");

@@ -857,14 +857,14 @@ * {

`;
function ve(c) {
const [m, R] = ar(c), w = ce(null), _ = (S) => {
w.current && !w.current.contains(S.target) && R(!1);
function ve(h) {
const [w, R] = Fr(h), y = ce(null), _ = (O) => {
y.current && !y.current.contains(O.target) && R(!1);
};
return sr(() => (document.addEventListener("click", _, !0), () => {
return or(() => (document.addEventListener("click", _, !0), () => {
document.removeEventListener("click", _, !0);
}), []), { ref: w, isComponentVisible: m, setIsComponentVisible: R };
}), []), { ref: y, isComponentVisible: w, setIsComponentVisible: R };
}
const Ar = "hudoro-input-dropdown-styles", ge = (c) => {
if (!document.getElementById(Ar)) {
const m = document.createElement("style");
m.id = Ar, m.textContent = c, document.head.appendChild(m);
const Pr = "hudoro-input-dropdown-styles", ge = (h) => {
if (!document.getElementById(Pr)) {
const w = document.createElement("style");
w.id = Pr, w.textContent = h, document.head.appendChild(w);
}

@@ -874,49 +874,47 @@ };

const ye = ({
dropdownLists: c,
onChange: m,
dropdownLists: h,
onChange: w,
defaultValue: R,
size: w = "md",
size: y = "md",
multiSelect: _,
searchAble: S,
iconLeft: O,
searchAble: O,
iconLeft: P,
placeholder: j,
onSearch: h
onSearch: g
}) => {
const [P, g] = ar(""), [d, y] = ar(), { isComponentVisible: F, ref: Y, setIsComponentVisible: M } = ve(!1), H = c == null ? void 0 : c.filter(
(s) => s.label.toLowerCase().includes(P.toLowerCase())
), D = () => {
M((s) => !s), g("");
}, v = (s, x) => {
const [u, v] = Fr(), { isComponentVisible: x, ref: C, setIsComponentVisible: D } = ve(!1), V = () => {
D((s) => !s);
}, J = (s, m) => {
if (!_)
y([{ label: s, value: x }]), m([{ label: s, value: x }]), M(!1);
else if (d == null ? void 0 : d.find((C) => C.value === x)) {
const C = [
...d ? d.filter((X) => X.value !== x) : []
v([{ label: s, value: m }]), w([{ label: s, value: m }]), D(!1);
else if (u == null ? void 0 : u.find((k) => k.value === m)) {
const k = [
...u ? u.filter((G) => G.value !== m) : []
];
y(C), m(C);
v(k), w(k);
} else {
const C = [...d || [], { label: s, value: x }];
y(C), m(C);
const k = [...u || [], { label: s, value: m }];
v(k), w(k);
}
};
return sr(() => {
R && y(R);
}, [R]), sr(() => {
if (d)
for (let s of d)
c.find((A) => A.value === s.value) || y([]);
}, [c]), /* @__PURE__ */ l.jsxs(
return or(() => {
R && v(R);
}, [R]), or(() => {
if (u)
for (let s of u)
h.find((f) => f.value === s.value) || v([]);
}, [h]), /* @__PURE__ */ l.jsxs(
"div",
{
className: `hsd-input-dropdown-container hsd-input-dropdown-size-${w} ${F ? "active" : ""}`,
ref: Y,
onClick: D,
className: `hsd-input-dropdown-container hsd-input-dropdown-size-${y} ${x ? "active" : ""}`,
ref: C,
onClick: V,
children: [
/* @__PURE__ */ l.jsxs("div", { className: "hsd-input-dropdown-preview-container", children: [
O ? /* @__PURE__ */ l.jsx(l.Fragment, { children: K.cloneElement(O, {
width: Wr(w),
P ? /* @__PURE__ */ l.jsx(l.Fragment, { children: q.cloneElement(P, {
width: Dr(y),
color: "#939E99"
}) }) : null,
/* @__PURE__ */ l.jsx("div", { className: "hsd-input-dropdown-container-preview-item", children: d != null && d.length ? d == null ? void 0 : d.map(
(s, x) => _ ? /* @__PURE__ */ l.jsx(
/* @__PURE__ */ l.jsx("div", { className: "hsd-input-dropdown-container-preview-item", children: u != null && u.length ? u == null ? void 0 : u.map(
(s, m) => _ ? /* @__PURE__ */ l.jsx(
"p",

@@ -928,8 +926,8 @@ {

},
x
) : /* @__PURE__ */ l.jsx("p", { style: { minWidth: "max-content" }, children: s == null ? void 0 : s.label }, x)
m
) : /* @__PURE__ */ l.jsx("p", { style: { minWidth: "max-content" }, children: s == null ? void 0 : s.label }, m)
) : /* @__PURE__ */ l.jsx("p", { className: "hsd-input-dropdown-placeholder", children: j || "Search" }) }),
/* @__PURE__ */ l.jsx(be, { strokeWidth: 2, width: Wr(w) })
/* @__PURE__ */ l.jsx(we, { strokeWidth: 2, width: Dr(y) })
] }),
F ? /* @__PURE__ */ l.jsxs(
x ? /* @__PURE__ */ l.jsxs(
"div",

@@ -940,3 +938,3 @@ {

children: [
S ? /* @__PURE__ */ l.jsxs("div", { className: "hsd-input-dropdown-container-dropdown-search", 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(me, { strokeWidth: 2, width: 20 }) }),

@@ -947,3 +945,3 @@ /* @__PURE__ */ l.jsx(

onChange: (s) => {
g(s.target.value), h && h(s.target.value);
g && g(s.target.value);
}

@@ -953,9 +951,9 @@ }

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

@@ -969,3 +967,3 @@ }) }) : null,

},
x
m
)) })

@@ -978,7 +976,7 @@ ]

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

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

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

@@ -1030,8 +1028,8 @@ fill: "none",

}
), Wr = (c) => {
if (c === "sm")
), Dr = (h) => {
if (h === "sm")
return 16;
if (c === "md")
if (h === "md")
return 20;
if (c === "lg")
if (h === "lg")
return 20;

@@ -1038,0 +1036,0 @@ };

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

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

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

* LICENSE file in the root directory of this source tree.
*/var dr;function Wr(){if(dr)return z;dr=1;var c=m,b=Symbol.for("react.element"),_=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,j=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,O={key:!0,ref:!0,__self:!0,__source:!0};function P(C,h,D){var g,d={},x=null,A=null;D!==void 0&&(x=""+D),h.key!==void 0&&(x=""+h.key),h.ref!==void 0&&(A=h.ref);for(g in h)y.call(h,g)&&!O.hasOwnProperty(g)&&(d[g]=h[g]);if(C&&C.defaultProps)for(g in h=C.defaultProps,h)d[g]===void 0&&(d[g]=h[g]);return{$$typeof:b,type:C,key:x,ref:A,props:d,_owner:j.current}}return z.Fragment=_,z.jsx=P,z.jsxs=P,z}var Y={};/**
*/var ir;function Fr(){if(ir)return L;ir=1;var h=y,m=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 D(C,g,u){var v,E={},T=null,I=null;u!==void 0&&(T=""+u),g.key!==void 0&&(T=""+g.key),g.ref!==void 0&&(I=g.ref);for(v in g)x.call(g,v)&&!P.hasOwnProperty(v)&&(E[v]=g[v]);if(C&&C.defaultProps)for(v in g=C.defaultProps,g)E[v]===void 0&&(E[v]=g[v]);return{$$typeof:m,type:C,key:T,ref:I,props:E,_owner:j.current}}return L.Fragment=_,L.jsx=D,L.jsxs=D,L}var V={};/**
* @license React

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

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

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

}
`;function Lr(c){const[b,_]=m.useState(c),y=m.useRef(null),j=O=>{y.current&&!y.current.contains(O.target)&&_(!1)};return m.useEffect(()=>(document.addEventListener("click",j,!0),()=>{document.removeEventListener("click",j,!0)}),[]),{ref:y,isComponentVisible:b,setIsComponentVisible:_}}const lr="hudoro-input-dropdown-styles";(c=>{if(!document.getElementById(lr)){const b=document.createElement("style");b.id=lr,b.textContent=c,document.head.appendChild(b)}})(Vr);const zr=({dropdownLists:c,onChange:b,defaultValue:_,size:y="md",multiSelect:j,searchAble:O,iconLeft:P,placeholder:C,onSearch:h})=>{const[D,g]=m.useState(""),[d,x]=m.useState(),{isComponentVisible:A,ref:B,setIsComponentVisible:J}=Lr(!1),Q=c==null?void 0:c.filter(s=>s.label.toLowerCase().includes(D.toLowerCase())),F=()=>{J(s=>!s),g("")},v=(s,E)=>{if(!j)x([{label:s,value:E}]),b([{label:s,value:E}]),J(!1);else if(d==null?void 0:d.find(T=>T.value===E)){const T=[...d?d.filter(q=>q.value!==E):[]];x(T),b(T)}else{const T=[...d||[],{label:s,value:E}];x(T),b(T)}};return m.useEffect(()=>{_&&x(_)},[_]),m.useEffect(()=>{if(d)for(let s of d)c.find(N=>N.value===s.value)||x([])},[c]),l.jsxs("div",{className:`hsd-input-dropdown-container hsd-input-dropdown-size-${y} ${A?"active":""}`,ref:B,onClick:F,children:[l.jsxs("div",{className:"hsd-input-dropdown-preview-container",children:[P?l.jsx(l.Fragment,{children:m.cloneElement(P,{width:cr(y),color:"#939E99"})}):null,l.jsx("div",{className:"hsd-input-dropdown-container-preview-item",children:d!=null&&d.length?d==null?void 0:d.map((s,E)=>j?l.jsx("p",{style:{minWidth:"max-content"},className:"hsd-input-dropdown-preview-item",children:s==null?void 0:s.label},E):l.jsx("p",{style:{minWidth:"max-content"},children:s==null?void 0:s.label},E)):l.jsx("p",{className:"hsd-input-dropdown-placeholder",children:C||"Search"})}),l.jsx(Mr,{strokeWidth:2,width:cr(y)})]}),A?l.jsxs("div",{className:"hsd-input-dropdown-lists-container",onClick:s=>s.stopPropagation(),children:[O?l.jsxs("div",{className:"hsd-input-dropdown-container-dropdown-search",children:[l.jsx("div",{style:{display:"flex"},children:l.jsx(Yr,{strokeWidth:2,width:20})}),l.jsx("input",{onChange:s=>{g(s.target.value),h&&h(s.target.value)}})]}):null,l.jsx("div",{className:"hsd-input-dropdwon-item-container",children:Q.map((s,E)=>l.jsxs("div",{className:`hsd-input-dropdwon-item ${d!=null&&d.find(N=>N.value===s.value)?"active":""}`,onClick:()=>v(s.label,s.value),children:[s.icon?l.jsx("div",{children:m.cloneElement(s.icon,{width:16})}):null,l.jsxs("div",{children:[" ",l.jsx("p",{children:s.label})]})]},E))})]}):null]})},Yr=({...c})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",...c,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=({...c})=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...c,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=c=>{if(c==="sm")return 16;if(c==="md")return 20;if(c==="lg")return 20};I.Dropdown=zr,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
`;function Wr(h){const[m,_]=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:m,setIsComponentVisible:_}}const sr="hudoro-input-dropdown-styles";(h=>{if(!document.getElementById(sr)){const m=document.createElement("style");m.id=sr,m.textContent=h,document.head.appendChild(m)}})(Ar);const Nr=({dropdownLists:h,onChange:m,defaultValue:_,size:x="md",multiSelect:j,searchAble:P,iconLeft:D,placeholder:C,onSearch:g})=>{const[u,v]=y.useState(),{isComponentVisible:E,ref:T,setIsComponentVisible:I}=Wr(!1),M=()=>{I(s=>!s)},H=(s,w)=>{if(!j)v([{label:s,value:w}]),m([{label:s,value:w}]),I(!1);else if(u==null?void 0:u.find(k=>k.value===w)){const k=[...u?u.filter(X=>X.value!==w):[]];v(k),m(k)}else{const k=[...u||[],{label:s,value:w}];v(k),m(k)}};return y.useEffect(()=>{_&&v(_)},[_]),y.useEffect(()=>{if(u)for(let s of u)h.find(f=>f.value===s.value)||v([])},[h]),l.jsxs("div",{className:`hsd-input-dropdown-container hsd-input-dropdown-size-${x} ${E?"active":""}`,ref:T,onClick:M,children:[l.jsxs("div",{className:"hsd-input-dropdown-preview-container",children:[D?l.jsx(l.Fragment,{children:y.cloneElement(D,{width:dr(x),color:"#939E99"})}):null,l.jsx("div",{className:"hsd-input-dropdown-container-preview-item",children:u!=null&&u.length?u==null?void 0:u.map((s,w)=>j?l.jsx("p",{style:{minWidth:"max-content"},className:"hsd-input-dropdown-preview-item",children:s==null?void 0:s.label},w):l.jsx("p",{style:{minWidth:"max-content"},children:s==null?void 0:s.label},w)):l.jsx("p",{className:"hsd-input-dropdown-placeholder",children:C||"Search"})}),l.jsx(Vr,{strokeWidth:2,width:dr(x)})]}),E?l.jsxs("div",{className:"hsd-input-dropdown-lists-container",onClick:s=>s.stopPropagation(),children:[P?l.jsxs("div",{className:"hsd-input-dropdown-container-dropdown-search",children:[l.jsx("div",{style:{display:"flex"},children:l.jsx(Lr,{strokeWidth:2,width:20})}),l.jsx("input",{onChange:s=>{g&&g(s.target.value)}})]}):null,l.jsx("div",{className:"hsd-input-dropdwon-item-container",children:h.map((s,w)=>l.jsxs("div",{className:`hsd-input-dropdwon-item ${u!=null&&u.find(f=>f.value===s.value)?"active":""}`,onClick:()=>H(s.label,s.value),children:[s.icon?l.jsx("div",{children:y.cloneElement(s.icon,{width:16})}):null,l.jsxs("div",{children:[" ",l.jsx("p",{children:s.label})]})]},w))})]}):null]})},Lr=({...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"})]}),Vr=({...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"})}),dr=h=>{if(h==="sm")return 16;if(h==="md")return 20;if(h==="lg")return 20};F.Dropdown=Nr,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
{
"name": "@hudoro/dropdown",
"version": "0.0.2-beta.10",
"version": "0.0.3-beta.1",
"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