@hudoro/multi-select
Advanced tools
Comparing version 0.0.1-beta.3 to 0.0.1-beta.4
@@ -1,3 +0,3 @@ | ||
import Te, { useState as re, useRef as ur, useEffect as cr, useMemo as fr } from "react"; | ||
var ne = { exports: {} }, B = {}; | ||
import Me, { useState as ae, useRef as ur, useEffect as cr, useMemo as fr } from "react"; | ||
var se = { exports: {} }, V = {}; | ||
/** | ||
@@ -12,21 +12,21 @@ * @license React | ||
*/ | ||
var _e; | ||
var Pe; | ||
function hr() { | ||
if (_e) | ||
return B; | ||
_e = 1; | ||
var g = Te, m = Symbol.for("react.element"), y = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, C = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, O = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function P(j, d, E) { | ||
var v, x = {}, _ = null, u = null; | ||
E !== void 0 && (_ = "" + E), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (u = d.ref); | ||
for (v in d) | ||
b.call(d, v) && !O.hasOwnProperty(v) && (x[v] = d[v]); | ||
if (j && j.defaultProps) | ||
for (v in d = j.defaultProps, d) | ||
x[v] === void 0 && (x[v] = d[v]); | ||
return { $$typeof: m, type: j, key: _, ref: u, props: x, _owner: C.current }; | ||
if (Pe) | ||
return V; | ||
Pe = 1; | ||
var g = Me, m = Symbol.for("react.element"), y = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, R = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, T = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function P(C, f, j) { | ||
var h, w = {}, E = null, b = null; | ||
j !== void 0 && (E = "" + j), f.key !== void 0 && (E = "" + f.key), f.ref !== void 0 && (b = f.ref); | ||
for (h in f) | ||
p.call(f, h) && !T.hasOwnProperty(h) && (w[h] = f[h]); | ||
if (C && C.defaultProps) | ||
for (h in f = C.defaultProps, f) | ||
w[h] === void 0 && (w[h] = f[h]); | ||
return { $$typeof: m, type: C, key: E, ref: b, props: w, _owner: R.current }; | ||
} | ||
return B.Fragment = y, B.jsx = P, B.jsxs = P, B; | ||
return V.Fragment = y, V.jsx = P, V.jsxs = P, V; | ||
} | ||
var V = {}; | ||
var N = {}; | ||
/** | ||
@@ -41,38 +41,38 @@ * @license React | ||
*/ | ||
var Se; | ||
var We; | ||
function vr() { | ||
return Se || (Se = 1, process.env.NODE_ENV !== "production" && function() { | ||
var g = Te, m = Symbol.for("react.element"), y = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), j = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), k = Symbol.iterator, F = "@@iterator"; | ||
function R(e) { | ||
return We || (We = 1, process.env.NODE_ENV !== "production" && function() { | ||
var g = Me, m = Symbol.for("react.element"), y = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), C = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), A = Symbol.iterator, J = "@@iterator"; | ||
function G(e) { | ||
if (e === null || typeof e != "object") | ||
return null; | ||
var r = k && e[k] || e[F]; | ||
var r = A && e[A] || e[J]; | ||
return typeof r == "function" ? r : null; | ||
} | ||
var S = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function h(e) { | ||
var O = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function s(e) { | ||
{ | ||
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++) | ||
n[i - 1] = arguments[i]; | ||
Oe("error", e, n); | ||
_("error", e, n); | ||
} | ||
} | ||
function Oe(e, r, n) { | ||
function _(e, r, n) { | ||
{ | ||
var i = S.ReactDebugCurrentFrame, s = i.getStackAddendum(); | ||
s !== "" && (r += "%s", n = n.concat([s])); | ||
var l = n.map(function(a) { | ||
var i = O.ReactDebugCurrentFrame, l = i.getStackAddendum(); | ||
l !== "" && (r += "%s", n = n.concat([l])); | ||
var d = n.map(function(a) { | ||
return String(a); | ||
}); | ||
l.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, l); | ||
d.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, d); | ||
} | ||
} | ||
var Pe = !1, We = !1, Fe = !1, Me = !1, Ie = !1, te; | ||
te = Symbol.for("react.module.reference"); | ||
var F = !1, k = !1, $ = !1, K = !1, Ie = !1, le; | ||
le = Symbol.for("react.module.reference"); | ||
function Ae(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === b || e === O || Ie || e === C || e === E || e === v || Me || e === u || Pe || We || Fe || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === x || e.$$typeof === P || e.$$typeof === j || e.$$typeof === d || // This needs to include all possible module reference object | ||
return !!(typeof e == "string" || typeof e == "function" || e === p || e === T || Ie || e === R || e === j || e === h || K || e === b || F || k || $ || typeof e == "object" && e !== null && (e.$$typeof === E || e.$$typeof === w || e.$$typeof === P || e.$$typeof === C || e.$$typeof === f || // 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. | ||
e.$$typeof === te || e.getModuleId !== void 0)); | ||
e.$$typeof === le || e.getModuleId !== void 0)); | ||
} | ||
@@ -83,12 +83,12 @@ function De(e, r, n) { | ||
return i; | ||
var s = r.displayName || r.name || ""; | ||
return s !== "" ? n + "(" + s + ")" : n; | ||
var l = r.displayName || r.name || ""; | ||
return l !== "" ? n + "(" + l + ")" : n; | ||
} | ||
function ie(e) { | ||
function de(e) { | ||
return e.displayName || "Context"; | ||
} | ||
function L(e) { | ||
function S(e) { | ||
if (e == null) | ||
return null; | ||
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
if (typeof e.tag == "number" && s("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
return e.displayName || e.name || null; | ||
@@ -98,13 +98,13 @@ if (typeof e == "string") | ||
switch (e) { | ||
case b: | ||
case p: | ||
return "Fragment"; | ||
case y: | ||
return "Portal"; | ||
case O: | ||
case T: | ||
return "Profiler"; | ||
case C: | ||
case R: | ||
return "StrictMode"; | ||
case E: | ||
case j: | ||
return "Suspense"; | ||
case v: | ||
case h: | ||
return "SuspenseList"; | ||
@@ -114,17 +114,17 @@ } | ||
switch (e.$$typeof) { | ||
case j: | ||
case C: | ||
var r = e; | ||
return ie(r) + ".Consumer"; | ||
return de(r) + ".Consumer"; | ||
case P: | ||
var n = e; | ||
return ie(n._context) + ".Provider"; | ||
case d: | ||
return de(n._context) + ".Provider"; | ||
case f: | ||
return De(e, e.render, "ForwardRef"); | ||
case x: | ||
case w: | ||
var i = e.displayName || null; | ||
return i !== null ? i : L(e.type) || "Memo"; | ||
case _: { | ||
var s = e, l = s._payload, a = s._init; | ||
return i !== null ? i : S(e.type) || "Memo"; | ||
case E: { | ||
var l = e, d = l._payload, a = l._init; | ||
try { | ||
return L(a(l)); | ||
return S(a(d)); | ||
} catch { | ||
@@ -137,14 +137,14 @@ return null; | ||
} | ||
var W = Object.assign, A = 0, oe, ae, se, le, de, ue, ce; | ||
function fe() { | ||
var W = Object.assign, D = 0, ue, ce, fe, he, ve, pe, ge; | ||
function me() { | ||
} | ||
fe.__reactDisabledLog = !0; | ||
me.__reactDisabledLog = !0; | ||
function Be() { | ||
{ | ||
if (A === 0) { | ||
oe = console.log, ae = console.info, se = console.warn, le = console.error, de = console.group, ue = console.groupCollapsed, ce = console.groupEnd; | ||
if (D === 0) { | ||
ue = console.log, ce = console.info, fe = console.warn, he = console.error, ve = console.group, pe = console.groupCollapsed, ge = console.groupEnd; | ||
var e = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: fe, | ||
value: me, | ||
writable: !0 | ||
@@ -162,3 +162,3 @@ }; | ||
} | ||
A++; | ||
D++; | ||
} | ||
@@ -168,3 +168,3 @@ } | ||
{ | ||
if (A--, A === 0) { | ||
if (D--, D === 0) { | ||
var e = { | ||
@@ -177,51 +177,51 @@ configurable: !0, | ||
log: W({}, e, { | ||
value: oe | ||
value: ue | ||
}), | ||
info: W({}, e, { | ||
value: ae | ||
value: ce | ||
}), | ||
warn: W({}, e, { | ||
value: se | ||
value: fe | ||
}), | ||
error: W({}, e, { | ||
value: le | ||
value: he | ||
}), | ||
group: W({}, e, { | ||
value: de | ||
value: ve | ||
}), | ||
groupCollapsed: W({}, e, { | ||
value: ue | ||
value: pe | ||
}), | ||
groupEnd: W({}, e, { | ||
value: ce | ||
value: ge | ||
}) | ||
}); | ||
} | ||
A < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
D < 0 && s("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
} | ||
} | ||
var H = S.ReactCurrentDispatcher, q; | ||
function N(e, r, n) { | ||
var X = O.ReactCurrentDispatcher, Q; | ||
function Y(e, r, n) { | ||
{ | ||
if (q === void 0) | ||
if (Q === void 0) | ||
try { | ||
throw Error(); | ||
} catch (s) { | ||
var i = s.stack.trim().match(/\n( *(at )?)/); | ||
q = i && i[1] || ""; | ||
} catch (l) { | ||
var i = l.stack.trim().match(/\n( *(at )?)/); | ||
Q = i && i[1] || ""; | ||
} | ||
return ` | ||
` + q + e; | ||
` + Q + e; | ||
} | ||
} | ||
var J = !1, $; | ||
var ee = !1, z; | ||
{ | ||
var Ne = typeof WeakMap == "function" ? WeakMap : Map; | ||
$ = new Ne(); | ||
z = new Ne(); | ||
} | ||
function he(e, r) { | ||
if (!e || J) | ||
function be(e, r) { | ||
if (!e || ee) | ||
return ""; | ||
{ | ||
var n = $.get(e); | ||
var n = z.get(e); | ||
if (n !== void 0) | ||
@@ -231,7 +231,7 @@ return n; | ||
var i; | ||
J = !0; | ||
var s = Error.prepareStackTrace; | ||
ee = !0; | ||
var l = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var l; | ||
l = H.current, H.current = null, Be(); | ||
var d; | ||
d = X.current, X.current = null, Be(); | ||
try { | ||
@@ -249,4 +249,4 @@ if (r) { | ||
Reflect.construct(a, []); | ||
} catch (T) { | ||
i = T; | ||
} catch (L) { | ||
i = L; | ||
} | ||
@@ -257,4 +257,4 @@ Reflect.construct(e, [], a); | ||
a.call(); | ||
} catch (T) { | ||
i = T; | ||
} catch (L) { | ||
i = L; | ||
} | ||
@@ -266,23 +266,23 @@ e.call(a.prototype); | ||
throw Error(); | ||
} catch (T) { | ||
i = T; | ||
} catch (L) { | ||
i = L; | ||
} | ||
e(); | ||
} | ||
} catch (T) { | ||
if (T && i && typeof T.stack == "string") { | ||
for (var o = T.stack.split(` | ||
`), p = i.stack.split(` | ||
`), c = o.length - 1, f = p.length - 1; c >= 1 && f >= 0 && o[c] !== p[f]; ) | ||
f--; | ||
for (; c >= 1 && f >= 0; c--, f--) | ||
if (o[c] !== p[f]) { | ||
if (c !== 1 || f !== 1) | ||
} catch (L) { | ||
if (L && i && typeof L.stack == "string") { | ||
for (var o = L.stack.split(` | ||
`), v = i.stack.split(` | ||
`), u = o.length - 1, c = v.length - 1; u >= 1 && c >= 0 && o[u] !== v[c]; ) | ||
c--; | ||
for (; u >= 1 && c >= 0; u--, c--) | ||
if (o[u] !== v[c]) { | ||
if (u !== 1 || c !== 1) | ||
do | ||
if (c--, f--, f < 0 || o[c] !== p[f]) { | ||
var w = ` | ||
` + o[c].replace(" at new ", " at "); | ||
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && $.set(e, w), w; | ||
if (u--, c--, c < 0 || o[u] !== v[c]) { | ||
var x = ` | ||
` + o[u].replace(" at new ", " at "); | ||
return e.displayName && x.includes("<anonymous>") && (x = x.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, x), x; | ||
} | ||
while (c >= 1 && f >= 0); | ||
while (u >= 1 && c >= 0); | ||
break; | ||
@@ -292,9 +292,9 @@ } | ||
} finally { | ||
J = !1, H.current = l, Ve(), Error.prepareStackTrace = s; | ||
ee = !1, X.current = d, Ve(), Error.prepareStackTrace = l; | ||
} | ||
var I = e ? e.displayName || e.name : "", Ee = I ? N(I) : ""; | ||
return typeof e == "function" && $.set(e, Ee), Ee; | ||
var I = e ? e.displayName || e.name : "", Oe = I ? Y(I) : ""; | ||
return typeof e == "function" && z.set(e, Oe), Oe; | ||
} | ||
function $e(e, r, n) { | ||
return he(e, !1); | ||
return be(e, !1); | ||
} | ||
@@ -305,25 +305,25 @@ function Ye(e) { | ||
} | ||
function Y(e, r, n) { | ||
function U(e, r, n) { | ||
if (e == null) | ||
return ""; | ||
if (typeof e == "function") | ||
return he(e, Ye(e)); | ||
return be(e, Ye(e)); | ||
if (typeof e == "string") | ||
return N(e); | ||
return Y(e); | ||
switch (e) { | ||
case E: | ||
return N("Suspense"); | ||
case v: | ||
return N("SuspenseList"); | ||
case j: | ||
return Y("Suspense"); | ||
case h: | ||
return Y("SuspenseList"); | ||
} | ||
if (typeof e == "object") | ||
switch (e.$$typeof) { | ||
case d: | ||
case f: | ||
return $e(e.render); | ||
case x: | ||
return Y(e.type, r, n); | ||
case _: { | ||
var i = e, s = i._payload, l = i._init; | ||
case w: | ||
return U(e.type, r, n); | ||
case E: { | ||
var i = e, l = i._payload, d = i._init; | ||
try { | ||
return Y(l(s), r, n); | ||
return U(d(l), r, n); | ||
} catch { | ||
@@ -335,26 +335,26 @@ } | ||
} | ||
var z = Object.prototype.hasOwnProperty, ve = {}, pe = S.ReactDebugCurrentFrame; | ||
function U(e) { | ||
var Z = Object.prototype.hasOwnProperty, we = {}, xe = O.ReactDebugCurrentFrame; | ||
function H(e) { | ||
if (e) { | ||
var r = e._owner, n = Y(e.type, e._source, r ? r.type : null); | ||
pe.setExtraStackFrame(n); | ||
var r = e._owner, n = U(e.type, e._source, r ? r.type : null); | ||
xe.setExtraStackFrame(n); | ||
} else | ||
pe.setExtraStackFrame(null); | ||
xe.setExtraStackFrame(null); | ||
} | ||
function ze(e, r, n, i, s) { | ||
function ze(e, r, n, i, l) { | ||
{ | ||
var l = Function.call.bind(z); | ||
var d = Function.call.bind(Z); | ||
for (var a in e) | ||
if (l(e, a)) { | ||
if (d(e, a)) { | ||
var o = void 0; | ||
try { | ||
if (typeof e[a] != "function") { | ||
var p = Error((i || "React class") + ": " + n + " type `" + a + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[a] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw p.name = "Invariant Violation", p; | ||
var v = Error((i || "React class") + ": " + n + " type `" + a + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[a] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw v.name = "Invariant Violation", v; | ||
} | ||
o = e[a](r, a, i, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (c) { | ||
o = c; | ||
} catch (u) { | ||
o = u; | ||
} | ||
o && !(o instanceof Error) && (U(s), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", i || "React class", n, a, typeof o), U(null)), o instanceof Error && !(o.message in ve) && (ve[o.message] = !0, U(s), h("Failed %s type: %s", n, o.message), U(null)); | ||
o && !(o instanceof Error) && (H(l), s("%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).", i || "React class", n, a, typeof o), H(null)), o instanceof Error && !(o.message in we) && (we[o.message] = !0, H(l), s("Failed %s type: %s", n, o.message), H(null)); | ||
} | ||
@@ -364,3 +364,3 @@ } | ||
var Ue = Array.isArray; | ||
function G(e) { | ||
function re(e) { | ||
return Ue(e); | ||
@@ -376,3 +376,3 @@ } | ||
try { | ||
return ge(e), !1; | ||
return Ce(e), !1; | ||
} catch { | ||
@@ -382,10 +382,10 @@ return !0; | ||
} | ||
function ge(e) { | ||
function Ce(e) { | ||
return "" + e; | ||
} | ||
function me(e) { | ||
function ke(e) { | ||
if (He(e)) | ||
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ze(e)), ge(e); | ||
return s("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ze(e)), Ce(e); | ||
} | ||
var D = S.ReactCurrentOwner, qe = { | ||
var B = O.ReactCurrentOwner, qe = { | ||
key: !0, | ||
@@ -395,6 +395,6 @@ ref: !0, | ||
__source: !0 | ||
}, be, we, K; | ||
K = {}; | ||
}, ye, Re, ne; | ||
ne = {}; | ||
function Je(e) { | ||
if (z.call(e, "ref")) { | ||
if (Z.call(e, "ref")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
@@ -407,3 +407,3 @@ if (r && r.isReactWarning) | ||
function Ge(e) { | ||
if (z.call(e, "key")) { | ||
if (Z.call(e, "key")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
@@ -416,5 +416,5 @@ if (r && r.isReactWarning) | ||
function Ke(e, r) { | ||
if (typeof e.ref == "string" && D.current && r && D.current.stateNode !== r) { | ||
var n = L(D.current.type); | ||
K[n] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', L(D.current.type), e.ref), K[n] = !0); | ||
if (typeof e.ref == "string" && B.current && r && B.current.stateNode !== r) { | ||
var n = S(B.current.type); | ||
ne[n] || (s('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(B.current.type), e.ref), ne[n] = !0); | ||
} | ||
@@ -425,3 +425,3 @@ } | ||
var n = function() { | ||
be || (be = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
ye || (ye = !0, s("%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)", r)); | ||
}; | ||
@@ -437,3 +437,3 @@ n.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
var n = function() { | ||
we || (we = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
Re || (Re = !0, s("%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)", r)); | ||
}; | ||
@@ -446,3 +446,3 @@ n.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
} | ||
var er = function(e, r, n, i, s, l, a) { | ||
var er = function(e, r, n, i, l, d, a) { | ||
var o = { | ||
@@ -457,3 +457,3 @@ // This tag allows us to uniquely identify this as a React Element | ||
// Record the component responsible for creating this element. | ||
_owner: l | ||
_owner: d | ||
}; | ||
@@ -474,40 +474,40 @@ return o._store = {}, Object.defineProperty(o._store, "validated", { | ||
writable: !1, | ||
value: s | ||
value: l | ||
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o; | ||
}; | ||
function rr(e, r, n, i, s) { | ||
function rr(e, r, n, i, l) { | ||
{ | ||
var l, a = {}, o = null, p = null; | ||
n !== void 0 && (me(n), o = "" + n), Ge(r) && (me(r.key), o = "" + r.key), Je(r) && (p = r.ref, Ke(r, s)); | ||
for (l in r) | ||
z.call(r, l) && !qe.hasOwnProperty(l) && (a[l] = r[l]); | ||
var d, a = {}, o = null, v = null; | ||
n !== void 0 && (ke(n), o = "" + n), Ge(r) && (ke(r.key), o = "" + r.key), Je(r) && (v = r.ref, Ke(r, l)); | ||
for (d in r) | ||
Z.call(r, d) && !qe.hasOwnProperty(d) && (a[d] = r[d]); | ||
if (e && e.defaultProps) { | ||
var c = e.defaultProps; | ||
for (l in c) | ||
a[l] === void 0 && (a[l] = c[l]); | ||
var u = e.defaultProps; | ||
for (d in u) | ||
a[d] === void 0 && (a[d] = u[d]); | ||
} | ||
if (o || p) { | ||
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
o && Xe(a, f), p && Qe(a, f); | ||
if (o || v) { | ||
var c = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
o && Xe(a, c), v && Qe(a, c); | ||
} | ||
return er(e, o, p, s, i, D.current, a); | ||
return er(e, o, v, l, i, B.current, a); | ||
} | ||
} | ||
var X = S.ReactCurrentOwner, xe = S.ReactDebugCurrentFrame; | ||
var te = O.ReactCurrentOwner, je = O.ReactDebugCurrentFrame; | ||
function M(e) { | ||
if (e) { | ||
var r = e._owner, n = Y(e.type, e._source, r ? r.type : null); | ||
xe.setExtraStackFrame(n); | ||
var r = e._owner, n = U(e.type, e._source, r ? r.type : null); | ||
je.setExtraStackFrame(n); | ||
} else | ||
xe.setExtraStackFrame(null); | ||
je.setExtraStackFrame(null); | ||
} | ||
var Q; | ||
Q = !1; | ||
function ee(e) { | ||
var ie; | ||
ie = !1; | ||
function oe(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === m; | ||
} | ||
function Ce() { | ||
function Ee() { | ||
{ | ||
if (X.current) { | ||
var e = L(X.current.type); | ||
if (te.current) { | ||
var e = S(te.current.type); | ||
if (e) | ||
@@ -532,6 +532,6 @@ return ` | ||
} | ||
var ke = {}; | ||
var _e = {}; | ||
function tr(e) { | ||
{ | ||
var r = Ce(); | ||
var r = Ee(); | ||
if (!r) { | ||
@@ -546,3 +546,3 @@ var n = typeof e == "string" ? e : e.displayName || e.name; | ||
} | ||
function Re(e, r) { | ||
function Se(e, r) { | ||
{ | ||
@@ -553,25 +553,25 @@ if (!e._store || e._store.validated || e.key != null) | ||
var n = tr(r); | ||
if (ke[n]) | ||
if (_e[n]) | ||
return; | ||
ke[n] = !0; | ||
_e[n] = !0; | ||
var i = ""; | ||
e && e._owner && e._owner !== X.current && (i = " It was passed a child from " + L(e._owner.type) + "."), M(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, i), M(null); | ||
e && e._owner && e._owner !== te.current && (i = " It was passed a child from " + S(e._owner.type) + "."), M(e), s('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, i), M(null); | ||
} | ||
} | ||
function ye(e, r) { | ||
function Le(e, r) { | ||
{ | ||
if (typeof e != "object") | ||
return; | ||
if (G(e)) | ||
if (re(e)) | ||
for (var n = 0; n < e.length; n++) { | ||
var i = e[n]; | ||
ee(i) && Re(i, r); | ||
oe(i) && Se(i, r); | ||
} | ||
else if (ee(e)) | ||
else if (oe(e)) | ||
e._store && (e._store.validated = !0); | ||
else if (e) { | ||
var s = R(e); | ||
if (typeof s == "function" && s !== e.entries) | ||
for (var l = s.call(e), a; !(a = l.next()).done; ) | ||
ee(a.value) && Re(a.value, r); | ||
var l = G(e); | ||
if (typeof l == "function" && l !== e.entries) | ||
for (var d = l.call(e), a; !(a = d.next()).done; ) | ||
oe(a.value) && Se(a.value, r); | ||
} | ||
@@ -588,5 +588,5 @@ } | ||
n = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here. | ||
else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === x)) | ||
r.$$typeof === w)) | ||
n = r.propTypes; | ||
@@ -596,10 +596,10 @@ else | ||
if (n) { | ||
var i = L(r); | ||
var i = S(r); | ||
ze(n, e.props, "prop", i, e); | ||
} else if (r.PropTypes !== void 0 && !Q) { | ||
Q = !0; | ||
var s = L(r); | ||
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown"); | ||
} else if (r.PropTypes !== void 0 && !ie) { | ||
ie = !0; | ||
var l = S(r); | ||
s("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown"); | ||
} | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && s("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
} | ||
@@ -612,10 +612,10 @@ } | ||
if (i !== "children" && i !== "key") { | ||
M(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", i), M(null); | ||
M(e), s("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", i), M(null); | ||
break; | ||
} | ||
} | ||
e.ref !== null && (M(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), M(null)); | ||
e.ref !== null && (M(e), s("Invalid attribute `ref` supplied to `React.Fragment`."), M(null)); | ||
} | ||
} | ||
function je(e, r, n, i, s, l) { | ||
function Te(e, r, n, i, l, d) { | ||
{ | ||
@@ -626,38 +626,38 @@ var a = Ae(e); | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " 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 p = nr(s); | ||
p ? o += p : o += Ce(); | ||
var c; | ||
e === null ? c = "null" : G(e) ? c = "array" : e !== void 0 && e.$$typeof === m ? (c = "<" + (L(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, o); | ||
var v = nr(l); | ||
v ? o += v : o += Ee(); | ||
var u; | ||
e === null ? u = "null" : re(e) ? u = "array" : e !== void 0 && e.$$typeof === m ? (u = "<" + (S(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : u = typeof e, s("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", u, o); | ||
} | ||
var f = rr(e, r, n, s, l); | ||
if (f == null) | ||
return f; | ||
var c = rr(e, r, n, l, d); | ||
if (c == null) | ||
return c; | ||
if (a) { | ||
var w = r.children; | ||
if (w !== void 0) | ||
var x = r.children; | ||
if (x !== void 0) | ||
if (i) | ||
if (G(w)) { | ||
for (var I = 0; I < w.length; I++) | ||
ye(w[I], e); | ||
Object.freeze && Object.freeze(w); | ||
if (re(x)) { | ||
for (var I = 0; I < x.length; I++) | ||
Le(x[I], e); | ||
Object.freeze && Object.freeze(x); | ||
} else | ||
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
s("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 | ||
ye(w, e); | ||
Le(x, e); | ||
} | ||
return e === b ? or(f) : ir(f), f; | ||
return e === p ? or(c) : ir(c), c; | ||
} | ||
} | ||
function ar(e, r, n) { | ||
return je(e, r, n, !0); | ||
return Te(e, r, n, !0); | ||
} | ||
function sr(e, r, n) { | ||
return je(e, r, n, !1); | ||
return Te(e, r, n, !1); | ||
} | ||
var lr = sr, dr = ar; | ||
V.Fragment = b, V.jsx = lr, V.jsxs = dr; | ||
}()), V; | ||
N.Fragment = p, N.jsx = lr, N.jsxs = dr; | ||
}()), N; | ||
} | ||
process.env.NODE_ENV === "production" ? ne.exports = hr() : ne.exports = vr(); | ||
var t = ne.exports; | ||
process.env.NODE_ENV === "production" ? se.exports = hr() : se.exports = vr(); | ||
var t = se.exports; | ||
const pr = `@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"); | ||
@@ -813,3 +813,4 @@ * { | ||
.hsd-multi-select-dropdown-list:has(input[type="checkbox"]:checked) { | ||
color: var(--hsd-ui-color-blue-800); | ||
/* color: var(--hsd-ui-color-blue-800); */ | ||
accent-color: #001ed2; | ||
} | ||
@@ -839,86 +840,10 @@ | ||
function gr(g) { | ||
const [m, y] = re(g), b = ur(null), C = (O) => { | ||
b.current && !b.current.contains(O.target) && y(!1); | ||
const [m, y] = ae(g), p = ur(null), R = (T) => { | ||
p.current && !p.current.contains(T.target) && y(!1); | ||
}; | ||
return cr(() => (document.addEventListener("click", C, !0), () => { | ||
document.removeEventListener("click", C, !0); | ||
}), []), { ref: b, isComponentVisible: m, setIsComponentVisible: y }; | ||
return cr(() => (document.addEventListener("click", R, !0), () => { | ||
document.removeEventListener("click", R, !0); | ||
}), []), { ref: p, isComponentVisible: m, setIsComponentVisible: y }; | ||
} | ||
const Le = "hudoro-multi-select-styles", mr = (g) => { | ||
if (!document.getElementById(Le)) { | ||
const m = document.createElement("style"); | ||
m.id = Le, m.textContent = g, document.head.appendChild(m); | ||
} | ||
}; | ||
mr(pr); | ||
const wr = ({ | ||
size: g = "md", | ||
listSelect: m, | ||
onChange: y | ||
}) => { | ||
const { ref: b, isComponentVisible: C, setIsComponentVisible: O } = gr(!1), [P, j] = re(""), [d, E] = re([]), v = () => O((u) => !u), x = fr( | ||
() => m.filter( | ||
(u) => u.label.toLowerCase().includes(P.toLowerCase()) | ||
), | ||
[P] | ||
), _ = (u, k) => { | ||
if (d == null ? void 0 : d.find((R) => R.value === k)) { | ||
const S = [...d].filter((h) => h.value !== k); | ||
E(S), y(S); | ||
} else { | ||
const R = [...d]; | ||
R == null || R.push({ label: u, value: k }), E(R), y(R); | ||
} | ||
}; | ||
return /* @__PURE__ */ t.jsxs("div", { className: `hsd-multi-select-container size-${g}`, ref: b, children: [ | ||
/* @__PURE__ */ t.jsxs( | ||
"div", | ||
{ | ||
onClick: v, | ||
className: `hsd-multi-select-container-preview ${C ? "active" : ""} `, | ||
children: [ | ||
Z[g].user, | ||
/* @__PURE__ */ t.jsx("div", { className: "hsd-multi-select-container-value", children: d.length ? d.map((u, k) => /* @__PURE__ */ t.jsx("p", { className: "hsd-multi-select-preview-value", children: u.label }, k)) : /* @__PURE__ */ t.jsx("p", { style: { color: "#d1d5db" }, children: "+123" }) }), | ||
Z[g].arrow | ||
] | ||
} | ||
), | ||
C ? /* @__PURE__ */ t.jsxs("div", { className: "hsd-multi-select-container-dropdown", children: [ | ||
/* @__PURE__ */ t.jsxs("div", { className: "hsd-multi-select-container-dropdown-search", children: [ | ||
Z[g].search, | ||
/* @__PURE__ */ t.jsx( | ||
"input", | ||
{ | ||
placeholder: "+123", | ||
onChange: (u) => j(u.target.value) | ||
} | ||
) | ||
] }), | ||
/* @__PURE__ */ t.jsx("div", { className: "hsd-multi-select-container-dropdown-list", children: x.map((u, k) => /* @__PURE__ */ t.jsxs( | ||
"label", | ||
{ | ||
htmlFor: u.value, | ||
className: "hsd-multi-select-dropdown-list", | ||
children: [ | ||
/* @__PURE__ */ t.jsxs("div", { className: "hsd-multi-select-label-dropdown-list", children: [ | ||
Z[g].image, | ||
/* @__PURE__ */ t.jsx("p", { children: u.label }) | ||
] }), | ||
/* @__PURE__ */ t.jsx( | ||
"input", | ||
{ | ||
type: "checkbox", | ||
id: u.value, | ||
value: u.value, | ||
onChange: (F) => _(u.label, F.target.value), | ||
checked: !!d.find((F) => F.value === u.value) | ||
} | ||
) | ||
] | ||
}, | ||
k | ||
)) }) | ||
] }) : null | ||
] }); | ||
}, Z = { | ||
const q = { | ||
sm: { | ||
@@ -1308,5 +1233,98 @@ user: /* @__PURE__ */ t.jsx( | ||
} | ||
}, Fe = "hudoro-multi-select-styles", mr = (g) => { | ||
if (!document.getElementById(Fe)) { | ||
const m = document.createElement("style"); | ||
m.id = Fe, m.textContent = g, document.head.appendChild(m); | ||
} | ||
}; | ||
mr(pr); | ||
const wr = ({ | ||
size: g = "md", | ||
listSelect: m, | ||
onChange: y, | ||
icon: p = !0, | ||
searchAble: R = !0, | ||
placeholder: T, | ||
displayCheckedItem: P = !0, | ||
reverse: C | ||
}) => { | ||
const { ref: f, isComponentVisible: j, setIsComponentVisible: h } = gr(!1), [w, E] = ae(""), [b, A] = ae([]), J = () => h((s) => !s), G = fr( | ||
() => m.filter( | ||
(s) => s.label.toLowerCase().includes(w.toLowerCase()) | ||
), | ||
[w] | ||
), O = (s, _) => { | ||
if (b == null ? void 0 : b.find((k) => k.value === _)) { | ||
const $ = [...b].filter((K) => K.value !== _); | ||
A($), y($); | ||
} else { | ||
const k = [...b]; | ||
k == null || k.push({ label: s, value: _ }), A(k), y(k); | ||
} | ||
}; | ||
return /* @__PURE__ */ t.jsxs("div", { className: `hsd-multi-select-container size-${g}`, ref: f, children: [ | ||
/* @__PURE__ */ t.jsxs( | ||
"div", | ||
{ | ||
onClick: J, | ||
className: `hsd-multi-select-container-preview ${j ? "active" : ""} `, | ||
children: [ | ||
p ? q[g].user : null, | ||
/* @__PURE__ */ t.jsx("div", { className: "hsd-multi-select-container-value", children: P && b.length ? b.map((s, _) => /* @__PURE__ */ t.jsx("p", { className: "hsd-multi-select-preview-value", children: s.label }, _)) : /* @__PURE__ */ t.jsx("p", { style: { color: "#d1d5db" }, children: T }) }), | ||
q[g].arrow | ||
] | ||
} | ||
), | ||
j ? /* @__PURE__ */ t.jsxs("div", { className: "hsd-multi-select-container-dropdown", children: [ | ||
R ? /* @__PURE__ */ t.jsxs("div", { className: "hsd-multi-select-container-dropdown-search", children: [ | ||
p ? q[g].search : null, | ||
/* @__PURE__ */ t.jsx( | ||
"input", | ||
{ | ||
placeholder: "+123", | ||
onChange: (s) => E(s.target.value) | ||
} | ||
) | ||
] }) : null, | ||
/* @__PURE__ */ t.jsx("div", { className: "hsd-multi-select-container-dropdown-list", children: G.map((s, _) => /* @__PURE__ */ t.jsxs( | ||
"label", | ||
{ | ||
htmlFor: s.value, | ||
className: "hsd-multi-select-dropdown-list", | ||
style: { | ||
display: "flex", | ||
justifyContent: C ? "start" : "space-between", | ||
gap: 12 | ||
}, | ||
children: [ | ||
/* @__PURE__ */ t.jsxs( | ||
"div", | ||
{ | ||
className: "hsd-multi-select-label-dropdown-list", | ||
style: { order: C ? 2 : 1 }, | ||
children: [ | ||
p ? q[g].image : null, | ||
/* @__PURE__ */ t.jsx("p", { children: s.label }) | ||
] | ||
} | ||
), | ||
/* @__PURE__ */ t.jsx( | ||
"input", | ||
{ | ||
type: "checkbox", | ||
id: s.value, | ||
value: s.value, | ||
onChange: (F) => O(s.label, F.target.value), | ||
checked: !!b.find((F) => F.value === s.value) | ||
} | ||
) | ||
] | ||
}, | ||
_ | ||
)) }) | ||
] }) : null | ||
] }); | ||
}; | ||
export { | ||
wr as MultiSelect | ||
}; |
@@ -1,2 +0,2 @@ | ||
(function(F,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],b):(F=typeof globalThis<"u"?globalThis:F||self,b(F.MultiSelect={},F.React))})(this,function(F,b){"use strict";var G={exports:{}},B={};/** | ||
(function(W,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],w):(W=typeof globalThis<"u"?globalThis:W||self,w(W.MultiSelect={},W.React))})(this,function(W,w){"use strict";var X={exports:{}},B={};/** | ||
* @license React | ||
@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var ie;function Oe(){if(ie)return B;ie=1;var g=b,m=Symbol.for("react.element"),j=Symbol.for("react.fragment"),w=Object.prototype.hasOwnProperty,k=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P={key:!0,ref:!0,__self:!0,__source:!0};function W(E,d,_){var v,C={},S=null,u=null;_!==void 0&&(S=""+_),d.key!==void 0&&(S=""+d.key),d.ref!==void 0&&(u=d.ref);for(v in d)w.call(d,v)&&!P.hasOwnProperty(v)&&(C[v]=d[v]);if(E&&E.defaultProps)for(v in d=E.defaultProps,d)C[v]===void 0&&(C[v]=d[v]);return{$$typeof:m,type:E,key:S,ref:u,props:C,_owner:k.current}}return B.Fragment=j,B.jsx=W,B.jsxs=W,B}var V={};/** | ||
*/var de;function Ie(){if(de)return B;de=1;var g=w,m=Symbol.for("react.element"),R=Symbol.for("react.fragment"),p=Object.prototype.hasOwnProperty,j=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,O={key:!0,ref:!0,__self:!0,__source:!0};function F(k,f,E){var h,x={},_=null,b=null;E!==void 0&&(_=""+E),f.key!==void 0&&(_=""+f.key),f.ref!==void 0&&(b=f.ref);for(h in f)p.call(f,h)&&!O.hasOwnProperty(h)&&(x[h]=f[h]);if(k&&k.defaultProps)for(h in f=k.defaultProps,f)x[h]===void 0&&(x[h]=f[h]);return{$$typeof:m,type:k,key:_,ref:b,props:x,_owner:j.current}}return B.Fragment=R,B.jsx=F,B.jsxs=F,B}var V={};/** | ||
* @license React | ||
@@ -18,13 +18,13 @@ * react-jsx-runtime.development.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var oe;function Pe(){return oe||(oe=1,process.env.NODE_ENV!=="production"&&function(){var g=b,m=Symbol.for("react.element"),j=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),E=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),u=Symbol.for("react.offscreen"),y=Symbol.iterator,I="@@iterator";function R(e){if(e===null||typeof e!="object")return null;var r=y&&e[y]||e[I];return typeof r=="function"?r:null}var T=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];Ie("error",e,n)}}function Ie(e,r,n){{var i=T.ReactDebugCurrentFrame,s=i.getStackAddendum();s!==""&&(r+="%s",n=n.concat([s]));var l=n.map(function(a){return String(a)});l.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,l)}}var Ae=!1,De=!1,Be=!1,Ve=!1,Ne=!1,se;se=Symbol.for("react.module.reference");function Ye(e){return!!(typeof e=="string"||typeof e=="function"||e===w||e===P||Ne||e===k||e===_||e===v||Ve||e===u||Ae||De||Be||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===C||e.$$typeof===W||e.$$typeof===E||e.$$typeof===d||e.$$typeof===se||e.getModuleId!==void 0))}function ze(e,r,n){var i=e.displayName;if(i)return i;var s=r.displayName||r.name||"";return s!==""?n+"("+s+")":n}function le(e){return e.displayName||"Context"}function L(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case j:return"Portal";case P:return"Profiler";case k:return"StrictMode";case _:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var r=e;return le(r)+".Consumer";case W:var n=e;return le(n._context)+".Provider";case d:return ze(e,e.render,"ForwardRef");case C:var i=e.displayName||null;return i!==null?i:L(e.type)||"Memo";case S:{var s=e,l=s._payload,a=s._init;try{return L(a(l))}catch{return null}}}return null}var M=Object.assign,N=0,de,ue,ce,fe,he,ve,pe;function ge(){}ge.__reactDisabledLog=!0;function Ue(){{if(N===0){de=console.log,ue=console.info,ce=console.warn,fe=console.error,he=console.group,ve=console.groupCollapsed,pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ge,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}N++}}function Ze(){{if(N--,N===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:de}),info:M({},e,{value:ue}),warn:M({},e,{value:ce}),error:M({},e,{value:fe}),group:M({},e,{value:he}),groupCollapsed:M({},e,{value:ve}),groupEnd:M({},e,{value:pe})})}N<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=T.ReactCurrentDispatcher,X;function U(e,r,n){{if(X===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);X=i&&i[1]||""}return` | ||
`+X+e}}var q=!1,Z;{var He=typeof WeakMap=="function"?WeakMap:Map;Z=new He}function me(e,r){if(!e||q)return"";{var n=Z.get(e);if(n!==void 0)return n}var i;q=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var l;l=K.current,K.current=null,Ue();try{if(r){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(O){i=O}Reflect.construct(e,[],a)}else{try{a.call()}catch(O){i=O}e.call(a.prototype)}}else{try{throw Error()}catch(O){i=O}e()}}catch(O){if(O&&i&&typeof O.stack=="string"){for(var o=O.stack.split(` | ||
`),p=i.stack.split(` | ||
`),c=o.length-1,f=p.length-1;c>=1&&f>=0&&o[c]!==p[f];)f--;for(;c>=1&&f>=0;c--,f--)if(o[c]!==p[f]){if(c!==1||f!==1)do if(c--,f--,f<0||o[c]!==p[f]){var x=` | ||
`+o[c].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&Z.set(e,x),x}while(c>=1&&f>=0);break}}}finally{q=!1,K.current=l,Ze(),Error.prepareStackTrace=s}var D=e?e.displayName||e.name:"",Le=D?U(D):"";return typeof e=="function"&&Z.set(e,Le),Le}function $e(e,r,n){return me(e,!1)}function Je(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,n){if(e==null)return"";if(typeof e=="function")return me(e,Je(e));if(typeof e=="string")return U(e);switch(e){case _:return U("Suspense");case v:return U("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return $e(e.render);case C:return H(e.type,r,n);case S:{var i=e,s=i._payload,l=i._init;try{return H(l(s),r,n)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,be={},we=T.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,n=H(e.type,e._source,r?r.type:null);we.setExtraStackFrame(n)}else we.setExtraStackFrame(null)}function Ge(e,r,n,i,s){{var l=Function.call.bind($);for(var a in e)if(l(e,a)){var o=void 0;try{if(typeof e[a]!="function"){var p=Error((i||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}o=e[a](r,a,i,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){o=c}o&&!(o instanceof Error)&&(J(s),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",i||"React class",n,a,typeof o),J(null)),o instanceof Error&&!(o.message in be)&&(be[o.message]=!0,J(s),h("Failed %s type: %s",n,o.message),J(null))}}}var Ke=Array.isArray;function Q(e){return Ke(e)}function Xe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function qe(e){try{return xe(e),!1}catch{return!0}}function xe(e){return""+e}function Ce(e){if(qe(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),xe(e)}var Y=T.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},ke,ye,ee;ee={};function er(e){if($.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function rr(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function nr(e,r){if(typeof e.ref=="string"&&Y.current&&r&&Y.current.stateNode!==r){var n=L(Y.current.type);ee[n]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',L(Y.current.type),e.ref),ee[n]=!0)}}function tr(e,r){{var n=function(){ke||(ke=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function ir(e,r){{var n=function(){ye||(ye=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var or=function(e,r,n,i,s,l,a){var o={$$typeof:m,type:e,key:r,ref:n,props:a,_owner:l};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function ar(e,r,n,i,s){{var l,a={},o=null,p=null;n!==void 0&&(Ce(n),o=""+n),rr(r)&&(Ce(r.key),o=""+r.key),er(r)&&(p=r.ref,nr(r,s));for(l in r)$.call(r,l)&&!Qe.hasOwnProperty(l)&&(a[l]=r[l]);if(e&&e.defaultProps){var c=e.defaultProps;for(l in c)a[l]===void 0&&(a[l]=c[l])}if(o||p){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&tr(a,f),p&&ir(a,f)}return or(e,o,p,s,i,Y.current,a)}}var re=T.ReactCurrentOwner,Re=T.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,n=H(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(n)}else Re.setExtraStackFrame(null)}var ne;ne=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===m}function je(){{if(re.current){var e=L(re.current.type);if(e)return` | ||
*/var ue;function Ae(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&function(){var g=w,m=Symbol.for("react.element"),R=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),k=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),N=Symbol.iterator,q="@@iterator";function Q(e){if(e===null||typeof e!="object")return null;var r=N&&e[N]||e[q];return typeof r=="function"?r:null}var P=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function s(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];S("error",e,n)}}function S(e,r,n){{var i=P.ReactDebugCurrentFrame,l=i.getStackAddendum();l!==""&&(r+="%s",n=n.concat([l]));var d=n.map(function(a){return String(a)});d.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,d)}}var I=!1,y=!1,Z=!1,ee=!1,Ne=!1,fe;fe=Symbol.for("react.module.reference");function Ye(e){return!!(typeof e=="string"||typeof e=="function"||e===p||e===O||Ne||e===j||e===E||e===h||ee||e===b||I||y||Z||typeof e=="object"&&e!==null&&(e.$$typeof===_||e.$$typeof===x||e.$$typeof===F||e.$$typeof===k||e.$$typeof===f||e.$$typeof===fe||e.getModuleId!==void 0))}function ze(e,r,n){var i=e.displayName;if(i)return i;var l=r.displayName||r.name||"";return l!==""?n+"("+l+")":n}function he(e){return e.displayName||"Context"}function T(e){if(e==null)return null;if(typeof e.tag=="number"&&s("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case R:return"Portal";case O:return"Profiler";case j:return"StrictMode";case E:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case k:var r=e;return he(r)+".Consumer";case F:var n=e;return he(n._context)+".Provider";case f:return ze(e,e.render,"ForwardRef");case x:var i=e.displayName||null;return i!==null?i:T(e.type)||"Memo";case _:{var l=e,d=l._payload,a=l._init;try{return T(a(d))}catch{return null}}}return null}var M=Object.assign,Y=0,ve,pe,ge,me,be,we,xe;function Ce(){}Ce.__reactDisabledLog=!0;function Ue(){{if(Y===0){ve=console.log,pe=console.info,ge=console.warn,me=console.error,be=console.group,we=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Y++}}function Ze(){{if(Y--,Y===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:ve}),info:M({},e,{value:pe}),warn:M({},e,{value:ge}),error:M({},e,{value:me}),group:M({},e,{value:be}),groupCollapsed:M({},e,{value:we}),groupEnd:M({},e,{value:xe})})}Y<0&&s("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=P.ReactCurrentDispatcher,ne;function H(e,r,n){{if(ne===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);ne=i&&i[1]||""}return` | ||
`+ne+e}}var te=!1,$;{var He=typeof WeakMap=="function"?WeakMap:Map;$=new He}function ke(e,r){if(!e||te)return"";{var n=$.get(e);if(n!==void 0)return n}var i;te=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d;d=re.current,re.current=null,Ue();try{if(r){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(L){i=L}Reflect.construct(e,[],a)}else{try{a.call()}catch(L){i=L}e.call(a.prototype)}}else{try{throw Error()}catch(L){i=L}e()}}catch(L){if(L&&i&&typeof L.stack=="string"){for(var o=L.stack.split(` | ||
`),v=i.stack.split(` | ||
`),u=o.length-1,c=v.length-1;u>=1&&c>=0&&o[u]!==v[c];)c--;for(;u>=1&&c>=0;u--,c--)if(o[u]!==v[c]){if(u!==1||c!==1)do if(u--,c--,c<0||o[u]!==v[c]){var C=` | ||
`+o[u].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),typeof e=="function"&&$.set(e,C),C}while(u>=1&&c>=0);break}}}finally{te=!1,re.current=d,Ze(),Error.prepareStackTrace=l}var D=e?e.displayName||e.name:"",Me=D?H(D):"";return typeof e=="function"&&$.set(e,Me),Me}function $e(e,r,n){return ke(e,!1)}function Je(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,n){if(e==null)return"";if(typeof e=="function")return ke(e,Je(e));if(typeof e=="string")return H(e);switch(e){case E:return H("Suspense");case h:return H("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return $e(e.render);case x:return J(e.type,r,n);case _:{var i=e,l=i._payload,d=i._init;try{return J(d(l),r,n)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,ye={},Re=P.ReactDebugCurrentFrame;function K(e){if(e){var r=e._owner,n=J(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(n)}else Re.setExtraStackFrame(null)}function Ge(e,r,n,i,l){{var d=Function.call.bind(G);for(var a in e)if(d(e,a)){var o=void 0;try{if(typeof e[a]!="function"){var v=Error((i||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}o=e[a](r,a,i,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){o=u}o&&!(o instanceof Error)&&(K(l),s("%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).",i||"React class",n,a,typeof o),K(null)),o instanceof Error&&!(o.message in ye)&&(ye[o.message]=!0,K(l),s("Failed %s type: %s",n,o.message),K(null))}}}var Ke=Array.isArray;function ie(e){return Ke(e)}function Xe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function qe(e){try{return je(e),!1}catch{return!0}}function je(e){return""+e}function Ee(e){if(qe(e))return s("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),je(e)}var z=P.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},_e,Se,oe;oe={};function er(e){if(G.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function rr(e){if(G.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function nr(e,r){if(typeof e.ref=="string"&&z.current&&r&&z.current.stateNode!==r){var n=T(z.current.type);oe[n]||(s('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(z.current.type),e.ref),oe[n]=!0)}}function tr(e,r){{var n=function(){_e||(_e=!0,s("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function ir(e,r){{var n=function(){Se||(Se=!0,s("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var or=function(e,r,n,i,l,d,a){var o={$$typeof:m,type:e,key:r,ref:n,props:a,_owner:d};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function ar(e,r,n,i,l){{var d,a={},o=null,v=null;n!==void 0&&(Ee(n),o=""+n),rr(r)&&(Ee(r.key),o=""+r.key),er(r)&&(v=r.ref,nr(r,l));for(d in r)G.call(r,d)&&!Qe.hasOwnProperty(d)&&(a[d]=r[d]);if(e&&e.defaultProps){var u=e.defaultProps;for(d in u)a[d]===void 0&&(a[d]=u[d])}if(o||v){var c=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&tr(a,c),v&&ir(a,c)}return or(e,o,v,l,i,z.current,a)}}var ae=P.ReactCurrentOwner,Te=P.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,n=J(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(n)}else Te.setExtraStackFrame(null)}var se;se=!1;function le(e){return typeof e=="object"&&e!==null&&e.$$typeof===m}function Le(){{if(ae.current){var e=T(ae.current.type);if(e)return` | ||
Check the render method of \``+e+"`."}return""}}function sr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return` | ||
Check your code at `+r+":"+n+"."}return""}}var Ee={};function lr(e){{var r=je();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=` | ||
Check your code at `+r+":"+n+"."}return""}}var Oe={};function lr(e){{var r=Le();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=` | ||
Check the top-level render call using <`+n+">.")}return r}}function _e(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=lr(r);if(Ee[n])return;Ee[n]=!0;var i="";e&&e._owner&&e._owner!==re.current&&(i=" It was passed a child from "+L(e._owner.type)+"."),A(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,i),A(null)}}function Se(e,r){{if(typeof e!="object")return;if(Q(e))for(var n=0;n<e.length;n++){var i=e[n];te(i)&&_e(i,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var s=R(e);if(typeof s=="function"&&s!==e.entries)for(var l=s.call(e),a;!(a=l.next()).done;)te(a.value)&&_e(a.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===C))n=r.propTypes;else return;if(n){var i=L(r);Ge(n,e.props,"prop",i,e)}else if(r.PropTypes!==void 0&&!ne){ne=!0;var s=L(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var i=r[n];if(i!=="children"&&i!=="key"){A(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),A(null);break}}e.ref!==null&&(A(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function Te(e,r,n,i,s,l){{var a=Ye(e);if(!a){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" 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 p=sr(s);p?o+=p:o+=je();var c;e===null?c="null":Q(e)?c="array":e!==void 0&&e.$$typeof===m?(c="<"+(L(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,o)}var f=ar(e,r,n,s,l);if(f==null)return f;if(a){var x=r.children;if(x!==void 0)if(i)if(Q(x)){for(var D=0;D<x.length;D++)Se(x[D],e);Object.freeze&&Object.freeze(x)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Se(x,e)}return e===w?ur(f):dr(f),f}}function cr(e,r,n){return Te(e,r,n,!0)}function fr(e,r,n){return Te(e,r,n,!1)}var hr=fr,vr=cr;V.Fragment=w,V.jsx=hr,V.jsxs=vr}()),V}process.env.NODE_ENV==="production"?G.exports=Oe():G.exports=Pe();var t=G.exports;const We=`@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"); | ||
Check the top-level render call using <`+n+">.")}return r}}function Pe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=lr(r);if(Oe[n])return;Oe[n]=!0;var i="";e&&e._owner&&e._owner!==ae.current&&(i=" It was passed a child from "+T(e._owner.type)+"."),A(e),s('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,i),A(null)}}function We(e,r){{if(typeof e!="object")return;if(ie(e))for(var n=0;n<e.length;n++){var i=e[n];le(i)&&Pe(i,r)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var l=Q(e);if(typeof l=="function"&&l!==e.entries)for(var d=l.call(e),a;!(a=d.next()).done;)le(a.value)&&Pe(a.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===f||r.$$typeof===x))n=r.propTypes;else return;if(n){var i=T(r);Ge(n,e.props,"prop",i,e)}else if(r.PropTypes!==void 0&&!se){se=!0;var l=T(r);s("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&s("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var i=r[n];if(i!=="children"&&i!=="key"){A(e),s("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),A(null);break}}e.ref!==null&&(A(e),s("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function Fe(e,r,n,i,l,d){{var a=Ye(e);if(!a){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" 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 v=sr(l);v?o+=v:o+=Le();var u;e===null?u="null":ie(e)?u="array":e!==void 0&&e.$$typeof===m?(u="<"+(T(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):u=typeof e,s("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,o)}var c=ar(e,r,n,l,d);if(c==null)return c;if(a){var C=r.children;if(C!==void 0)if(i)if(ie(C)){for(var D=0;D<C.length;D++)We(C[D],e);Object.freeze&&Object.freeze(C)}else s("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 We(C,e)}return e===p?ur(c):dr(c),c}}function cr(e,r,n){return Fe(e,r,n,!0)}function fr(e,r,n){return Fe(e,r,n,!1)}var hr=fr,vr=cr;V.Fragment=p,V.jsx=hr,V.jsxs=vr}()),V}process.env.NODE_ENV==="production"?X.exports=Ie():X.exports=Ae();var t=X.exports;const De=`@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"); | ||
* { | ||
@@ -179,3 +179,4 @@ margin: 0; | ||
.hsd-multi-select-dropdown-list:has(input[type="checkbox"]:checked) { | ||
color: var(--hsd-ui-color-blue-800); | ||
/* color: var(--hsd-ui-color-blue-800); */ | ||
accent-color: #001ed2; | ||
} | ||
@@ -203,2 +204,2 @@ | ||
} | ||
`;function Fe(g){const[m,j]=b.useState(g),w=b.useRef(null),k=P=>{w.current&&!w.current.contains(P.target)&&j(!1)};return b.useEffect(()=>(document.addEventListener("click",k,!0),()=>{document.removeEventListener("click",k,!0)}),[]),{ref:w,isComponentVisible:m,setIsComponentVisible:j}}const ae="hudoro-multi-select-styles";(g=>{if(!document.getElementById(ae)){const m=document.createElement("style");m.id=ae,m.textContent=g,document.head.appendChild(m)}})(We);const Me=({size:g="md",listSelect:m,onChange:j})=>{const{ref:w,isComponentVisible:k,setIsComponentVisible:P}=Fe(!1),[W,E]=b.useState(""),[d,_]=b.useState([]),v=()=>P(u=>!u),C=b.useMemo(()=>m.filter(u=>u.label.toLowerCase().includes(W.toLowerCase())),[W]),S=(u,y)=>{if(d==null?void 0:d.find(R=>R.value===y)){const T=[...d].filter(h=>h.value!==y);_(T),j(T)}else{const R=[...d];R==null||R.push({label:u,value:y}),_(R),j(R)}};return t.jsxs("div",{className:`hsd-multi-select-container size-${g}`,ref:w,children:[t.jsxs("div",{onClick:v,className:`hsd-multi-select-container-preview ${k?"active":""} `,children:[z[g].user,t.jsx("div",{className:"hsd-multi-select-container-value",children:d.length?d.map((u,y)=>t.jsx("p",{className:"hsd-multi-select-preview-value",children:u.label},y)):t.jsx("p",{style:{color:"#d1d5db"},children:"+123"})}),z[g].arrow]}),k?t.jsxs("div",{className:"hsd-multi-select-container-dropdown",children:[t.jsxs("div",{className:"hsd-multi-select-container-dropdown-search",children:[z[g].search,t.jsx("input",{placeholder:"+123",onChange:u=>E(u.target.value)})]}),t.jsx("div",{className:"hsd-multi-select-container-dropdown-list",children:C.map((u,y)=>t.jsxs("label",{htmlFor:u.value,className:"hsd-multi-select-dropdown-list",children:[t.jsxs("div",{className:"hsd-multi-select-label-dropdown-list",children:[z[g].image,t.jsx("p",{children:u.label})]}),t.jsx("input",{type:"checkbox",id:u.value,value:u.value,onChange:I=>S(u.label,I.target.value),checked:!!d.find(I=>I.value===u.value)})]},y))})]}):null]})},z={sm:{user:t.jsx("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Profile",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M5.98979 9.23083C3.41138 9.23083 1.20947 9.62068 1.20947 11.1819C1.20947 12.7432 3.39741 13.147 5.98979 13.147C8.5682 13.147 10.7695 12.7565 10.7695 11.1959C10.7695 9.63528 8.58217 9.23083 5.98979 9.23083Z",stroke:"#6B7280",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",fillRule:"evenodd",clipRule:"evenodd",d:"M5.98993 7.00396C7.68199 7.00396 9.05342 5.6319 9.05342 3.93983C9.05342 2.24777 7.68199 0.876343 5.98993 0.876343C4.29786 0.876343 2.9258 2.24777 2.9258 3.93983C2.92008 5.62618 4.28262 6.99825 5.96834 7.00396H5.98993Z",stroke:"#6B7280",strokeLinecap:"round",strokeLinejoin:"round"})]})}),arrow:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{id:"Curved/Arrows-and-direction",children:t.jsx("path",{id:"shape",d:"M2.6665 6L7.99984 11.3333L13.3332 6",stroke:"#3B82F6",strokeLinecap:"round",strokeLinejoin:"round"})})}),search:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M13.3333 13.3333L10.5355 10.5355M12 7C12 4.23858 9.76142 2 7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12C9.76142 12 12 9.76142 12 7Z",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),image:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Image",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M13.1402 4.43114V9.86514C13.1402 11.8785 11.8802 13.2985 9.86683 13.2985H4.10016C2.08683 13.2985 0.833496 11.8785 0.833496 9.86514V4.43114C0.833496 2.41781 2.0935 0.998474 4.10016 0.998474H9.86683C11.8802 0.998474 13.1402 2.41781 13.1402 4.43114Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",d:"M2.521 10.119L3.53966 9.04362C3.89366 8.66829 4.48366 8.65029 4.85966 9.00362C4.871 9.01495 5.48433 9.63829 5.48433 9.63829C5.85433 10.015 6.459 10.021 6.83566 9.65162C6.86033 9.62762 8.39166 7.77029 8.39166 7.77029C8.78633 7.29096 9.495 7.22229 9.975 7.61762C10.007 7.64429 11.4537 9.12895 11.4537 9.12895",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 5",fillRule:"evenodd",clipRule:"evenodd",d:"M5.87529 5.25374C5.87529 5.89974 5.35195 6.42308 4.70595 6.42308C4.05995 6.42308 3.53662 5.89974 3.53662 5.25374C3.53662 4.60774 4.05995 4.08441 4.70595 4.08441C5.35195 4.08508 5.87529 4.60774 5.87529 5.25374Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})})},md:{user:t.jsx("svg",{width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Profile",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M7.98493 13.3462C4.11731 13.3462 0.814453 13.931 0.814453 16.2729C0.814453 18.6148 4.09636 19.2205 7.98493 19.2205C11.8525 19.2205 15.1545 18.6348 15.1545 16.2938C15.1545 13.9529 11.8735 13.3462 7.98493 13.3462Z",stroke:"#6B7280",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",fillRule:"evenodd",clipRule:"evenodd",d:"M7.98489 10.0059C10.523 10.0059 12.5801 7.94779 12.5801 5.40969C12.5801 2.8716 10.523 0.814453 7.98489 0.814453C5.44679 0.814453 3.3887 2.8716 3.3887 5.40969C3.38013 7.93922 5.42394 9.99731 7.95251 10.0059H7.98489Z",stroke:"#6B7280",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}),arrow:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{id:"Curved/Arrows-and-direction",children:t.jsx("path",{id:"shape",d:"M4 9L12 17L20 9",stroke:"#3B82F6",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}),search:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M20 20L15.8033 15.8033M18 10.5C18 6.35786 14.6421 3 10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C14.6421 18 18 14.6421 18 10.5Z",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),image:t.jsxs("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.6748 6.74774V13.5402C17.6748 16.0569 16.0998 17.8319 13.5832 17.8319H6.37484C3.85817 17.8319 2.2915 16.0569 2.2915 13.5402V6.74774C2.2915 4.23108 3.8665 2.45691 6.37484 2.45691H13.5832C16.0998 2.45691 17.6748 4.23108 17.6748 6.74774Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M4.40088 13.8575L5.67421 12.5133C6.11671 12.0441 6.85421 12.0216 7.32421 12.4633C7.33838 12.4775 8.10505 13.2566 8.10505 13.2566C8.56755 13.7275 9.32338 13.735 9.79421 13.2733C9.82505 13.2433 11.7392 10.9216 11.7392 10.9216C12.2325 10.3225 13.1184 10.2366 13.7184 10.7308C13.7584 10.7641 15.5667 12.62 15.5667 12.62",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.59374 7.776C8.59374 8.5835 7.93958 9.23766 7.13208 9.23766C6.32458 9.23766 5.67041 8.5835 5.67041 7.776C5.67041 6.9685 6.32458 6.31433 7.13208 6.31433C7.93958 6.31516 8.59374 6.9685 8.59374 7.776Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})},lg:{user:t.jsx("svg",{width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Profile",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M7.98493 13.3462C4.11731 13.3462 0.814453 13.931 0.814453 16.2729C0.814453 18.6148 4.09636 19.2205 7.98493 19.2205C11.8525 19.2205 15.1545 18.6348 15.1545 16.2938C15.1545 13.9529 11.8735 13.3462 7.98493 13.3462Z",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",fillRule:"evenodd",clipRule:"evenodd",d:"M7.98489 10.0059C10.523 10.0059 12.5801 7.94779 12.5801 5.40969C12.5801 2.8716 10.523 0.814453 7.98489 0.814453C5.44679 0.814453 3.3887 2.8716 3.3887 5.40969C3.38013 7.93922 5.42394 9.99731 7.95251 10.0059H7.98489Z",stroke:"#6B7280",strokeWidth:"1.42857",strokeLinecap:"round",strokeLinejoin:"round"})]})}),arrow:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{id:"Curved/Arrows-and-direction",children:t.jsx("path",{id:"shape",d:"M4 9L12 17L20 9",stroke:"#3B82F6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),search:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M20 20L15.8033 15.8033M18 10.5C18 6.35786 14.6421 3 10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C14.6421 18 18 14.6421 18 10.5Z",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),image:t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Image",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M19.21 5.89924V14.0502C19.21 17.0702 17.32 19.2002 14.3 19.2002H5.65C2.63 19.2002 0.75 17.0702 0.75 14.0502V5.89924C0.75 2.87924 2.64 0.750244 5.65 0.750244H14.3C17.32 0.750244 19.21 2.87924 19.21 5.89924Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",d:"M3.28125 14.4309L4.80925 12.8179C5.34025 12.2549 6.22525 12.2279 6.78925 12.7579C6.80625 12.7749 7.72625 13.7099 7.72625 13.7099C8.28125 14.2749 9.18825 14.2839 9.75325 13.7299C9.79025 13.6939 12.0872 10.9079 12.0872 10.9079C12.6792 10.1889 13.7422 10.0859 14.4622 10.6789C14.5102 10.7189 16.6803 12.9459 16.6803 12.9459",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 5",fillRule:"evenodd",clipRule:"evenodd",d:"M8.31269 7.13315C8.31269 8.10215 7.52769 8.88715 6.55869 8.88715C5.58969 8.88715 4.80469 8.10215 4.80469 7.13315C4.80469 6.16415 5.58969 5.37915 6.55869 5.37915C7.52769 5.38015 8.31269 6.16415 8.31269 7.13315Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})})}};F.MultiSelect=Me,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}); | ||
`;function Be(g){const[m,R]=w.useState(g),p=w.useRef(null),j=O=>{p.current&&!p.current.contains(O.target)&&R(!1)};return w.useEffect(()=>(document.addEventListener("click",j,!0),()=>{document.removeEventListener("click",j,!0)}),[]),{ref:p,isComponentVisible:m,setIsComponentVisible:R}}const U={sm:{user:t.jsx("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Profile",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M5.98979 9.23083C3.41138 9.23083 1.20947 9.62068 1.20947 11.1819C1.20947 12.7432 3.39741 13.147 5.98979 13.147C8.5682 13.147 10.7695 12.7565 10.7695 11.1959C10.7695 9.63528 8.58217 9.23083 5.98979 9.23083Z",stroke:"#6B7280",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",fillRule:"evenodd",clipRule:"evenodd",d:"M5.98993 7.00396C7.68199 7.00396 9.05342 5.6319 9.05342 3.93983C9.05342 2.24777 7.68199 0.876343 5.98993 0.876343C4.29786 0.876343 2.9258 2.24777 2.9258 3.93983C2.92008 5.62618 4.28262 6.99825 5.96834 7.00396H5.98993Z",stroke:"#6B7280",strokeLinecap:"round",strokeLinejoin:"round"})]})}),arrow:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{id:"Curved/Arrows-and-direction",children:t.jsx("path",{id:"shape",d:"M2.6665 6L7.99984 11.3333L13.3332 6",stroke:"#3B82F6",strokeLinecap:"round",strokeLinejoin:"round"})})}),search:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M13.3333 13.3333L10.5355 10.5355M12 7C12 4.23858 9.76142 2 7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12C9.76142 12 12 9.76142 12 7Z",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),image:t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Image",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M13.1402 4.43114V9.86514C13.1402 11.8785 11.8802 13.2985 9.86683 13.2985H4.10016C2.08683 13.2985 0.833496 11.8785 0.833496 9.86514V4.43114C0.833496 2.41781 2.0935 0.998474 4.10016 0.998474H9.86683C11.8802 0.998474 13.1402 2.41781 13.1402 4.43114Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",d:"M2.521 10.119L3.53966 9.04362C3.89366 8.66829 4.48366 8.65029 4.85966 9.00362C4.871 9.01495 5.48433 9.63829 5.48433 9.63829C5.85433 10.015 6.459 10.021 6.83566 9.65162C6.86033 9.62762 8.39166 7.77029 8.39166 7.77029C8.78633 7.29096 9.495 7.22229 9.975 7.61762C10.007 7.64429 11.4537 9.12895 11.4537 9.12895",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 5",fillRule:"evenodd",clipRule:"evenodd",d:"M5.87529 5.25374C5.87529 5.89974 5.35195 6.42308 4.70595 6.42308C4.05995 6.42308 3.53662 5.89974 3.53662 5.25374C3.53662 4.60774 4.05995 4.08441 4.70595 4.08441C5.35195 4.08508 5.87529 4.60774 5.87529 5.25374Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})})},md:{user:t.jsx("svg",{width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Profile",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M7.98493 13.3462C4.11731 13.3462 0.814453 13.931 0.814453 16.2729C0.814453 18.6148 4.09636 19.2205 7.98493 19.2205C11.8525 19.2205 15.1545 18.6348 15.1545 16.2938C15.1545 13.9529 11.8735 13.3462 7.98493 13.3462Z",stroke:"#6B7280",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",fillRule:"evenodd",clipRule:"evenodd",d:"M7.98489 10.0059C10.523 10.0059 12.5801 7.94779 12.5801 5.40969C12.5801 2.8716 10.523 0.814453 7.98489 0.814453C5.44679 0.814453 3.3887 2.8716 3.3887 5.40969C3.38013 7.93922 5.42394 9.99731 7.95251 10.0059H7.98489Z",stroke:"#6B7280",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}),arrow:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{id:"Curved/Arrows-and-direction",children:t.jsx("path",{id:"shape",d:"M4 9L12 17L20 9",stroke:"#3B82F6",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}),search:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M20 20L15.8033 15.8033M18 10.5C18 6.35786 14.6421 3 10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C14.6421 18 18 14.6421 18 10.5Z",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),image:t.jsxs("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.6748 6.74774V13.5402C17.6748 16.0569 16.0998 17.8319 13.5832 17.8319H6.37484C3.85817 17.8319 2.2915 16.0569 2.2915 13.5402V6.74774C2.2915 4.23108 3.8665 2.45691 6.37484 2.45691H13.5832C16.0998 2.45691 17.6748 4.23108 17.6748 6.74774Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M4.40088 13.8575L5.67421 12.5133C6.11671 12.0441 6.85421 12.0216 7.32421 12.4633C7.33838 12.4775 8.10505 13.2566 8.10505 13.2566C8.56755 13.7275 9.32338 13.735 9.79421 13.2733C9.82505 13.2433 11.7392 10.9216 11.7392 10.9216C12.2325 10.3225 13.1184 10.2366 13.7184 10.7308C13.7584 10.7641 15.5667 12.62 15.5667 12.62",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.59374 7.776C8.59374 8.5835 7.93958 9.23766 7.13208 9.23766C6.32458 9.23766 5.67041 8.5835 5.67041 7.776C5.67041 6.9685 6.32458 6.31433 7.13208 6.31433C7.93958 6.31516 8.59374 6.9685 8.59374 7.776Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})},lg:{user:t.jsx("svg",{width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Profile",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M7.98493 13.3462C4.11731 13.3462 0.814453 13.931 0.814453 16.2729C0.814453 18.6148 4.09636 19.2205 7.98493 19.2205C11.8525 19.2205 15.1545 18.6348 15.1545 16.2938C15.1545 13.9529 11.8735 13.3462 7.98493 13.3462Z",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",fillRule:"evenodd",clipRule:"evenodd",d:"M7.98489 10.0059C10.523 10.0059 12.5801 7.94779 12.5801 5.40969C12.5801 2.8716 10.523 0.814453 7.98489 0.814453C5.44679 0.814453 3.3887 2.8716 3.3887 5.40969C3.38013 7.93922 5.42394 9.99731 7.95251 10.0059H7.98489Z",stroke:"#6B7280",strokeWidth:"1.42857",strokeLinecap:"round",strokeLinejoin:"round"})]})}),arrow:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{id:"Curved/Arrows-and-direction",children:t.jsx("path",{id:"shape",d:"M4 9L12 17L20 9",stroke:"#3B82F6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),search:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M20 20L15.8033 15.8033M18 10.5C18 6.35786 14.6421 3 10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C14.6421 18 18 14.6421 18 10.5Z",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),image:t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Image",children:[t.jsx("path",{id:"Stroke 1",fillRule:"evenodd",clipRule:"evenodd",d:"M19.21 5.89924V14.0502C19.21 17.0702 17.32 19.2002 14.3 19.2002H5.65C2.63 19.2002 0.75 17.0702 0.75 14.0502V5.89924C0.75 2.87924 2.64 0.750244 5.65 0.750244H14.3C17.32 0.750244 19.21 2.87924 19.21 5.89924Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 3",d:"M3.28125 14.4309L4.80925 12.8179C5.34025 12.2549 6.22525 12.2279 6.78925 12.7579C6.80625 12.7749 7.72625 13.7099 7.72625 13.7099C8.28125 14.2749 9.18825 14.2839 9.75325 13.7299C9.79025 13.6939 12.0872 10.9079 12.0872 10.9079C12.6792 10.1889 13.7422 10.0859 14.4622 10.6789C14.5102 10.7189 16.6803 12.9459 16.6803 12.9459",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{id:"Stroke 5",fillRule:"evenodd",clipRule:"evenodd",d:"M8.31269 7.13315C8.31269 8.10215 7.52769 8.88715 6.55869 8.88715C5.58969 8.88715 4.80469 8.10215 4.80469 7.13315C4.80469 6.16415 5.58969 5.37915 6.55869 5.37915C7.52769 5.38015 8.31269 6.16415 8.31269 7.13315Z",stroke:"#374151",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})})}},ce="hudoro-multi-select-styles";(g=>{if(!document.getElementById(ce)){const m=document.createElement("style");m.id=ce,m.textContent=g,document.head.appendChild(m)}})(De);const Ve=({size:g="md",listSelect:m,onChange:R,icon:p=!0,searchAble:j=!0,placeholder:O,displayCheckedItem:F=!0,reverse:k})=>{const{ref:f,isComponentVisible:E,setIsComponentVisible:h}=Be(!1),[x,_]=w.useState(""),[b,N]=w.useState([]),q=()=>h(s=>!s),Q=w.useMemo(()=>m.filter(s=>s.label.toLowerCase().includes(x.toLowerCase())),[x]),P=(s,S)=>{if(b==null?void 0:b.find(y=>y.value===S)){const Z=[...b].filter(ee=>ee.value!==S);N(Z),R(Z)}else{const y=[...b];y==null||y.push({label:s,value:S}),N(y),R(y)}};return t.jsxs("div",{className:`hsd-multi-select-container size-${g}`,ref:f,children:[t.jsxs("div",{onClick:q,className:`hsd-multi-select-container-preview ${E?"active":""} `,children:[p?U[g].user:null,t.jsx("div",{className:"hsd-multi-select-container-value",children:F&&b.length?b.map((s,S)=>t.jsx("p",{className:"hsd-multi-select-preview-value",children:s.label},S)):t.jsx("p",{style:{color:"#d1d5db"},children:O})}),U[g].arrow]}),E?t.jsxs("div",{className:"hsd-multi-select-container-dropdown",children:[j?t.jsxs("div",{className:"hsd-multi-select-container-dropdown-search",children:[p?U[g].search:null,t.jsx("input",{placeholder:"+123",onChange:s=>_(s.target.value)})]}):null,t.jsx("div",{className:"hsd-multi-select-container-dropdown-list",children:Q.map((s,S)=>t.jsxs("label",{htmlFor:s.value,className:"hsd-multi-select-dropdown-list",style:{display:"flex",justifyContent:k?"start":"space-between",gap:12},children:[t.jsxs("div",{className:"hsd-multi-select-label-dropdown-list",style:{order:k?2:1},children:[p?U[g].image:null,t.jsx("p",{children:s.label})]}),t.jsx("input",{type:"checkbox",id:s.value,value:s.value,onChange:I=>P(s.label,I.target.value),checked:!!b.find(I=>I.value===s.value)})]},S))})]}):null]})};W.MultiSelect=Ve,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}); |
@@ -11,2 +11,7 @@ export interface IMultiSelectProps { | ||
}[]) => void; | ||
icon?: boolean; | ||
searchAble?: boolean; | ||
placeholder?: string; | ||
displayCheckedItem?: boolean; | ||
reverse?: boolean; | ||
} |
{ | ||
"name": "@hudoro/multi-select", | ||
"version": "0.0.1-beta.3", | ||
"version": "0.0.1-beta.4", | ||
"description": "multi select component for Hudoro UI", | ||
@@ -5,0 +5,0 @@ "author": "Prawito Hudoro", |
75823
9
1590