@hudoro/multi-select
Advanced tools
Comparing version 0.0.1-beta.4 to 0.0.1-beta.5
@@ -19,10 +19,10 @@ import Me, { useState as ae, useRef as ur, useEffect as cr, useMemo as fr } from "react"; | ||
function P(C, f, j) { | ||
var h, w = {}, E = null, b = null; | ||
var h, x = {}, 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]); | ||
p.call(f, h) && !T.hasOwnProperty(h) && (x[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 }; | ||
x[h] === void 0 && (x[h] = f[h]); | ||
return { $$typeof: m, type: C, key: E, ref: b, props: x, _owner: R.current }; | ||
} | ||
@@ -44,3 +44,3 @@ return V.Fragment = y, V.jsx = P, V.jsxs = P, V; | ||
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"; | ||
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"), x = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), A = Symbol.iterator, J = "@@iterator"; | ||
function G(e) { | ||
@@ -73,3 +73,3 @@ if (e === null || typeof e != "object") | ||
function Ae(e) { | ||
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 | ||
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 === x || 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 | ||
@@ -121,3 +121,3 @@ // we don't know which Flight build this will end up being used | ||
return De(e, e.render, "ForwardRef"); | ||
case w: | ||
case x: | ||
var i = e.displayName || null; | ||
@@ -274,5 +274,5 @@ return i !== null ? i : S(e.type) || "Memo"; | ||
if (u--, c--, c < 0 || o[u] !== v[c]) { | ||
var x = ` | ||
var w = ` | ||
` + 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; | ||
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, w), w; | ||
} | ||
@@ -313,3 +313,3 @@ while (u >= 1 && c >= 0); | ||
return $e(e.render); | ||
case w: | ||
case x: | ||
return U(e.type, r, n); | ||
@@ -326,9 +326,9 @@ case E: { | ||
} | ||
var Z = Object.prototype.hasOwnProperty, we = {}, xe = O.ReactDebugCurrentFrame; | ||
var Z = Object.prototype.hasOwnProperty, xe = {}, we = O.ReactDebugCurrentFrame; | ||
function H(e) { | ||
if (e) { | ||
var r = e._owner, n = U(e.type, e._source, r ? r.type : null); | ||
xe.setExtraStackFrame(n); | ||
we.setExtraStackFrame(n); | ||
} else | ||
xe.setExtraStackFrame(null); | ||
we.setExtraStackFrame(null); | ||
} | ||
@@ -350,3 +350,3 @@ function ze(e, r, n, i, l) { | ||
} | ||
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)); | ||
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 xe) && (xe[o.message] = !0, H(l), s("Failed %s type: %s", n, o.message), H(null)); | ||
} | ||
@@ -568,3 +568,3 @@ } | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === w)) | ||
r.$$typeof === x)) | ||
n = r.propTypes; | ||
@@ -611,13 +611,13 @@ else | ||
if (a) { | ||
var x = r.children; | ||
if (x !== void 0) | ||
var w = r.children; | ||
if (w !== void 0) | ||
if (i) | ||
if (re(x)) { | ||
for (var I = 0; I < x.length; I++) | ||
Le(x[I], e); | ||
Object.freeze && Object.freeze(x); | ||
if (re(w)) { | ||
for (var I = 0; I < w.length; I++) | ||
Le(w[I], e); | ||
Object.freeze && Object.freeze(w); | ||
} 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 | ||
Le(x, e); | ||
Le(w, e); | ||
} | ||
@@ -738,9 +738,12 @@ return e === p ? or(c) : ir(c), c; | ||
padding: var(--hsd-ui-spacing-2); | ||
border: var(--hsd-ui-border) solid var(--baseColor); | ||
border-radius: var(--hsd-ui-radii-base); | ||
/* border: var(--hsd-ui-border) solid var(--baseColor); */ | ||
/* border-radius: var(--hsd-ui-radii-base); */ | ||
background-color: white; | ||
box-shadow: 0px 16px 40px 0px rgba(154, 170, 207, 0.2); | ||
/* box-shadow: 0px 16px 40px 0px rgba(154, 170, 207, 0.2); */ | ||
max-height: 312px; | ||
overflow-y: auto; | ||
z-index: 999; | ||
border-radius: 8px; | ||
border: 1px solid rgba(120, 134, 127, 0.2); | ||
box-shadow: 0px 8px 12px 0px rgba(0, 0, 0, 0.08); | ||
} | ||
@@ -1215,3 +1218,3 @@ | ||
mr(pr); | ||
const wr = ({ | ||
const xr = ({ | ||
size: g = "md", | ||
@@ -1226,7 +1229,7 @@ listSelect: m, | ||
}) => { | ||
const { ref: f, isComponentVisible: j, setIsComponentVisible: h } = gr(!1), [w, E] = ae(""), [b, A] = ae([]), J = () => h((s) => !s), G = fr( | ||
const { ref: f, isComponentVisible: j, setIsComponentVisible: h } = gr(!1), [x, E] = ae(""), [b, A] = ae([]), J = () => h((s) => !s), G = fr( | ||
() => m.filter( | ||
(s) => s.label.toLowerCase().includes(w.toLowerCase()) | ||
(s) => s.label.toLowerCase().includes(x.toLowerCase()) | ||
), | ||
[w] | ||
[x] | ||
), O = (s, _) => { | ||
@@ -1305,3 +1308,3 @@ if (b == null ? void 0 : b.find((k) => k.value === _)) { | ||
export { | ||
wr as MultiSelect | ||
xr as MultiSelect | ||
}; |
@@ -1,2 +0,2 @@ | ||
(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={};/** | ||
(function(W,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],x):(W=typeof globalThis<"u"?globalThis:W||self,x(W.MultiSelect={},W.React))})(this,function(W,x){"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 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={};/** | ||
*/var de;function Ie(){if(de)return B;de=1;var g=x,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,w={},_=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)&&(w[h]=f[h]);if(k&&k.defaultProps)for(h in f=k.defaultProps,f)w[h]===void 0&&(w[h]=f[h]);return{$$typeof:m,type:k,key:_,ref:b,props:w,_owner:j.current}}return B.Fragment=R,B.jsx=F,B.jsxs=F,B}var V={};/** | ||
* @license React | ||
@@ -18,7 +18,7 @@ * react-jsx-runtime.development.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/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` | ||
*/var ue;function Ae(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&function(){var g=x,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"),w=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===w||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 w: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,xe,we;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,xe=console.groupCollapsed,we=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:xe}),groupEnd:M({},e,{value:we})})}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` | ||
`+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 w: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` | ||
@@ -29,3 +29,3 @@ Check the render method of \``+e+"`."}return""}}function sr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return` | ||
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"); | ||
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===w))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"); | ||
* { | ||
@@ -129,9 +129,12 @@ margin: 0; | ||
padding: var(--hsd-ui-spacing-2); | ||
border: var(--hsd-ui-border) solid var(--baseColor); | ||
border-radius: var(--hsd-ui-radii-base); | ||
/* border: var(--hsd-ui-border) solid var(--baseColor); */ | ||
/* border-radius: var(--hsd-ui-radii-base); */ | ||
background-color: white; | ||
box-shadow: 0px 16px 40px 0px rgba(154, 170, 207, 0.2); | ||
/* box-shadow: 0px 16px 40px 0px rgba(154, 170, 207, 0.2); */ | ||
max-height: 312px; | ||
overflow-y: auto; | ||
z-index: 999; | ||
border-radius: 8px; | ||
border: 1px solid rgba(120, 134, 127, 0.2); | ||
box-shadow: 0px 8px 12px 0px rgba(0, 0, 0, 0.08); | ||
} | ||
@@ -205,2 +208,2 @@ | ||
} | ||
`;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"})}); | ||
`;function Be(g){const[m,R]=x.useState(g),p=x.useRef(null),j=O=>{p.current&&!p.current.contains(O.target)&&R(!1)};return x.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),[w,_]=x.useState(""),[b,N]=x.useState([]),q=()=>h(s=>!s),Q=x.useMemo(()=>m.filter(s=>s.label.toLowerCase().includes(w.toLowerCase())),[w]),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"})}); |
{ | ||
"name": "@hudoro/multi-select", | ||
"version": "0.0.1-beta.4", | ||
"version": "0.0.1-beta.5", | ||
"description": "multi select component for Hudoro UI", | ||
@@ -5,0 +5,0 @@ "author": "Prawito Hudoro", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76099
1596