levannta-ui 1.0.34-react18 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +773 -1122
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +7 -15
- package/dist/index.umd.js.map +1 -1
- package/package.json +14 -15
package/dist/index.umd.js
CHANGED
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(y,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],m):(y=typeof globalThis<"u"?globalThis:y||self,m(y.LevantaUI={},y.React))})(this,function(y,m){"use strict";var Q={exports:{}},G={};/**
|
|
2
2
|
* @license React
|
|
3
|
-
* react-jsx-runtime.production.
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
5
|
-
* Copyright (c)
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var se;function be(){if(se)return G;se=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function t(a,n,o){var d=null;if(o!==void 0&&(d=""+o),n.key!==void 0&&(d=""+n.key),"key"in n){o={};for(var i in n)i!=="key"&&(o[i]=n[i])}else o=n;return n=o.ref,{$$typeof:s,type:a,key:d,ref:n!==void 0?n:null,props:o}}return G.Fragment=l,G.jsx=t,G.jsxs=t,G}var J={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
13
|
-
* Copyright (c)
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+ge+e}}var xe=!1,fe;{var jr=typeof WeakMap=="function"?WeakMap:Map;fe=new jr}function Be(e,t){if(!e||xe)return"";{var i=fe.get(e);if(i!==void 0)return i}var f;xe=!0;var N=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var E;E=K.current,K.current=null,ue();try{if(t){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(W){f=W}Reflect.construct(e,[],y)}else{try{y.call()}catch(W){f=W}e.call(y.prototype)}}else{try{throw Error()}catch(W){f=W}e()}}catch(W){if(W&&f&&typeof W.stack=="string"){for(var j=W.stack.split(`
|
|
19
|
-
`),P=f.stack.split(`
|
|
20
|
-
`),M=j.length-1,A=P.length-1;M>=1&&A>=0&&j[M]!==P[A];)A--;for(;M>=1&&A>=0;M--,A--)if(j[M]!==P[A]){if(M!==1||A!==1)do if(M--,A--,A<0||j[M]!==P[A]){var H=`
|
|
21
|
-
`+j[M].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),typeof e=="function"&&fe.set(e,H),H}while(M>=1&&A>=0);break}}}finally{xe=!1,K.current=E,Ve(),Error.prepareStackTrace=N}var ne=e?e.displayName||e.name:"",Q=ne?de(ne):"";return typeof e=="function"&&fe.set(e,Q),Q}function wr(e,t,i){return Be(e,!1)}function yr(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function he(e,t,i){if(e==null)return"";if(typeof e=="function")return Be(e,yr(e));if(typeof e=="string")return de(e);switch(e){case m:return de("Suspense");case c:return de("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case u:return wr(e.render);case x:return he(e.type,t,i);case g:{var f=e,N=f._payload,E=f._init;try{return he(E(N),t,i)}catch{}}}return""}var oe=Object.prototype.hasOwnProperty,Pe={},We=V.ReactDebugCurrentFrame;function ve(e){if(e){var t=e._owner,i=he(e.type,e._source,t?t.type:null);We.setExtraStackFrame(i)}else We.setExtraStackFrame(null)}function Cr(e,t,i,f,N){{var E=Function.call.bind(oe);for(var y in e)if(E(e,y)){var j=void 0;try{if(typeof e[y]!="function"){var P=Error((f||"React class")+": "+i+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}j=e[y](t,y,f,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(M){j=M}j&&!(j instanceof Error)&&(ve(N),k("%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).",f||"React class",i,y,typeof j),ve(null)),j instanceof Error&&!(j.message in Pe)&&(Pe[j.message]=!0,ve(N),k("Failed %s type: %s",i,j.message),ve(null))}}}var Nr=Array.isArray;function je(e){return Nr(e)}function Er(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,i=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function kr(e){try{return ze(e),!1}catch{return!0}}function ze(e){return""+e}function Ye(e){if(kr(e))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Er(e)),ze(e)}var Ue=V.ReactCurrentOwner,Rr={key:!0,ref:!0,__self:!0,__source:!0},He,Ke;function _r(e){if(oe.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Sr(e){if(oe.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function Tr(e,t){typeof e.ref=="string"&&Ue.current}function Lr(e,t){{var i=function(){He||(He=!0,k("%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)",t))};i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}}function Or(e,t){{var i=function(){Ke||(Ke=!0,k("%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)",t))};i.isReactWarning=!0,Object.defineProperty(e,"ref",{get:i,configurable:!0})}}var Ir=function(e,t,i,f,N,E,y){var j={$$typeof:o,type:e,key:t,ref:i,props:y,_owner:E};return j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(j,"_self",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.defineProperty(j,"_source",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j};function Dr(e,t,i,f,N){{var E,y={},j=null,P=null;i!==void 0&&(Ye(i),j=""+i),Sr(t)&&(Ye(t.key),j=""+t.key),_r(t)&&(P=t.ref,Tr(t,N));for(E in t)oe.call(t,E)&&!Rr.hasOwnProperty(E)&&(y[E]=t[E]);if(e&&e.defaultProps){var M=e.defaultProps;for(E in M)y[E]===void 0&&(y[E]=M[E])}if(j||P){var A=typeof e=="function"?e.displayName||e.name||"Unknown":e;j&&Lr(y,A),P&&Or(y,A)}return Ir(e,j,P,N,f,Ue.current,y)}}var we=V.ReactCurrentOwner,Xe=V.ReactDebugCurrentFrame;function te(e){if(e){var t=e._owner,i=he(e.type,e._source,t?t.type:null);Xe.setExtraStackFrame(i)}else Xe.setExtraStackFrame(null)}var ye;ye=!1;function Ce(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Je(){{if(we.current){var e=O(we.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function Mr(e){return""}var Ze={};function Fr(e){{var t=Je();if(!t){var i=typeof e=="string"?e:e.displayName||e.name;i&&(t=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+i+">.")}return t}}function Ge(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=Fr(t);if(Ze[i])return;Ze[i]=!0;var f="";e&&e._owner&&e._owner!==we.current&&(f=" It was passed a child from "+O(e._owner.type)+"."),te(e),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',i,f),te(null)}}function Qe(e,t){{if(typeof e!="object")return;if(je(e))for(var i=0;i<e.length;i++){var f=e[i];Ce(f)&&Ge(f,t)}else if(Ce(e))e._store&&(e._store.validated=!0);else if(e){var N=w(e);if(typeof N=="function"&&N!==e.entries)for(var E=N.call(e),y;!(y=E.next()).done;)Ce(y.value)&&Ge(y.value,t)}}}function Ar(e){{var t=e.type;if(t==null||typeof t=="string")return;var i;if(typeof t=="function")i=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===u||t.$$typeof===x))i=t.propTypes;else return;if(i){var f=O(t);Cr(i,e.props,"prop",f,e)}else if(t.PropTypes!==void 0&&!ye){ye=!0;var N=O(t);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",N||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Vr(e){{for(var t=Object.keys(e.props),i=0;i<t.length;i++){var f=t[i];if(f!=="children"&&f!=="key"){te(e),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),te(null);break}}e.ref!==null&&(te(e),k("Invalid attribute `ref` supplied to `React.Fragment`."),te(null))}}var $e={};function qe(e,t,i,f,N,E){{var y=X(e);if(!y){var j="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(j+=" 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=Mr();P?j+=P:j+=Je();var M;e===null?M="null":je(e)?M="array":e!==void 0&&e.$$typeof===o?(M="<"+(O(e.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):M=typeof e,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",M,j)}var A=Dr(e,t,i,N,E);if(A==null)return A;if(y){var H=t.children;if(H!==void 0)if(f)if(je(H)){for(var ne=0;ne<H.length;ne++)Qe(H[ne],e);Object.freeze&&Object.freeze(H)}else k("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 Qe(H,e)}if(oe.call(t,"key")){var Q=O(e),W=Object.keys(t).filter(function(Ur){return Ur!=="key"}),Ne=W.length>0?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}";if(!$e[Q+Ne]){var Yr=W.length>0?"{"+W.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
|
|
17
|
+
*/var te;function ve(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){function s(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===F?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case A:return"Profiler";case x:return"StrictMode";case P:return"Suspense";case W:return"SuspenseList";case U:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case k:return"Portal";case O:return(r.displayName||"Context")+".Provider";case M:return(r._context.displayName||"Context")+".Consumer";case C:var f=r.render;return r=r.displayName,r||(r=f.displayName||f.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case H:return f=r.displayName||null,f!==null?f:s(r.type)||"Memo";case Y:f=r._payload,r=r._init;try{return s(r(f))}catch{}}return null}function l(r){return""+r}function t(r){try{l(r);var f=!1}catch{f=!0}if(f){f=console;var j=f.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return j.call(f,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),l(r)}}function a(r){if(r===w)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===Y)return"<...>";try{var f=s(r);return f?"<"+f+">":"<...>"}catch{return"<...>"}}function n(){var r=g.A;return r===null?null:r.getOwner()}function o(){return Error("react-stack-top-frame")}function d(r){if(T.call(r,"key")){var f=Object.getOwnPropertyDescriptor(r,"key").get;if(f&&f.isReactWarning)return!1}return r.key!==void 0}function i(r,f){function j(){I||(I=!0,console.error("%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://react.dev/link/special-props)",f))}j.isReactWarning=!0,Object.defineProperty(r,"key",{get:j,configurable:!0})}function u(){var r=s(this.type);return X[r]||(X[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function h(r,f,j,R,D,B,V,ee){return j=B.ref,r={$$typeof:b,type:r,key:f,props:B,_owner:D},(j!==void 0?j:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:u}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function c(r,f,j,R,D,B,V,ee){var L=f.children;if(L!==void 0)if(R)if(S(L)){for(R=0;R<L.length;R++)p(L[R]);Object.freeze&&Object.freeze(L)}else console.error("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 p(L);if(T.call(f,"key")){L=s(r);var Z=Object.keys(f).filter(function(Oe){return Oe!=="key"});R=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",z[L+R]||(Z=0<Z.length?"{"+Z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
26
18
|
let props = %s;
|
|
27
19
|
<%s {...props} />
|
|
28
20
|
React keys must be passed directly to JSX without using spread:
|
|
29
21
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Ne,Q,Yr,Q),$e[Q+Ne]=!0}}return e===l?Vr(A):Ar(A),A}}function Br(e,t,i){return qe(e,t,i,!0)}function Pr(e,t,i){return qe(e,t,i,!1)}var Wr=Pr,zr=Br;se.Fragment=l,se.jsx=Wr,se.jsxs=zr}()),se}process.env.NODE_ENV==="production"?me.exports=er():me.exports=rr();var r=me.exports;function Re(n){var o,a,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(o=0;o<s;o++)n[o]&&(a=Re(n[o]))&&(l&&(l+=" "),l+=a)}else for(a in n)n[a]&&(l&&(l+=" "),l+=a);return l}function tr(){for(var n,o,a=0,l="",s=arguments.length;a<s;a++)(n=arguments[a])&&(o=Re(n))&&(l&&(l+=" "),l+=o);return l}const _e=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Se=tr,ie=(n,o)=>a=>{var l;if((o==null?void 0:o.variants)==null)return Se(n,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:s,defaultVariants:h}=o,v=Object.keys(s).map(m=>{const c=a==null?void 0:a[m],x=h==null?void 0:h[m];if(c===null)return null;const g=_e(c)||_e(x);return s[m][g]}),d=a&&Object.entries(a).reduce((m,c)=>{let[x,g]=c;return g===void 0||(m[x]=g),m},{}),u=o==null||(l=o.compoundVariants)===null||l===void 0?void 0:l.reduce((m,c)=>{let{class:x,className:g,...b}=c;return Object.entries(b).every(R=>{let[T,w]=R;return Array.isArray(w)?w.includes({...h,...d}[T]):{...h,...d}[T]===w})?[...m,x,g]:m},[]);return Se(n,v,u,a==null?void 0:a.class,a==null?void 0:a.className)},Te=ie("button",{variants:{variant:{outlined:"button-outlined",filled:"button-filled",icon:"button-icon"},color:{primary:"button-color-primary",secondary:"button-color-secondary",error:"button-color-error",clear:"button-color-clear"},size:{sm:"button-size-sm",md:"button-size-md",lg:"button-size-lg",xl:"button-size-xl"},pill:{true:"button-pill"},active:{true:"button-active"},iconLeft:{true:"button-with-icon-left"},iconRight:{true:"button-with-icon-right"},iconLeftJustified:{true:"button-with-icon-left button-with-icon-left-justified"},iconRightJustified:{true:"button-with-icon-right button-with-icon-right-justified"},iconOnly:{true:"button-icon-only"}},defaultVariants:{variant:"filled",color:"primary",size:"md"},compoundVariants:[{variant:"outlined",color:"primary",className:"button-outlined-primary"},{variant:"outlined",color:"secondary",className:"button-outlined-secondary"},{variant:"outlined",color:"error",className:"button-outlined-error"},{variant:"outlined",color:"clear",className:"button-outlined-clear"},{variant:"filled",color:"primary",className:"button-filled-primary"},{variant:"filled",color:"secondary",className:"button-filled-secondary"},{variant:"filled",color:"error",className:"button-filled-error"},{variant:"filled",color:"clear",className:"button-filled-clear"},{variant:"icon",color:"primary",className:"button-icon-primary"},{variant:"icon",color:"secondary",className:"button-icon-secondary"},{variant:"icon",color:"error",className:"button-icon-error"},{variant:"icon",color:"clear",className:"button-icon-clear"}]}),pe=p.forwardRef(({className:n,variant:o,color:a,size:l,pill:s,active:h,iconLeft:v,iconRight:d,iconLeftJustified:u,iconRightJustified:m,iconOnly:c,width:x,children:g,style:b,...R},T)=>{const w={...b||{},...x?{width:x}:{}};return r.jsxs("button",{className:Te({variant:o,color:a,size:l,pill:s,active:h,iconLeft:!!v,iconRight:!!d,iconLeftJustified:!!u,iconRightJustified:!!m,iconOnly:!!c,className:n}),style:w,ref:T,...R,children:[v&&r.jsx("span",{className:"button-icon-left",children:v}),u&&r.jsx("span",{className:"button-icon-left",children:u}),c?r.jsx("span",{children:c}):g,d&&r.jsx("span",{className:"button-icon-right",children:d}),m&&r.jsx("span",{className:"button-icon-right",children:m})]})});pe.displayName="Button";const nr=({className:n})=>r.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,children:r.jsx("path",{d:"M8.12 9.29006L12 13.1701L15.88 9.29006C16.27 8.90006 16.9 8.90006 17.29 9.29006C17.68 9.68006 17.68 10.3101 17.29 10.7001L12.7 15.2901C12.31 15.6801 11.68 15.6801 11.29 15.2901L6.7 10.7001C6.31 10.3101 6.31 9.68006 6.7 9.29006C7.09 8.91006 7.73 8.90006 8.12 9.29006Z",fill:"#F9FAFB"})}),ar=({icon:n,url:o,label:a,submenu:l,collapsed:s,active:h,activePath:v,isOpen:d,onToggle:u,onExpand:m,onSetActive:c,isMobile:x=!1})=>{const g=l&&l.length>0,b=g&&l.some(w=>w.url===v),R=h||d&&g||b||o===v,T=w=>{if(w.preventDefault(),x&&g){u();return}if(c&&c(o),s&&m){m();return}g&&!s&&u()};return r.jsx("div",{className:`sidebar-item ${d?"open":""} `,children:r.jsxs("div",{className:`sidebar-item-wrapper ${R&&!s?"active":""}`,children:[r.jsxs("a",{href:o,className:`sidebar-link sidebar-collapsed ${R?"active-text":""}`,onClick:T,children:[r.jsx("div",{className:`sidebar-icon ${R?"active-text":""}`,children:n}),(!s||x)&&r.jsxs("div",{className:"sidebar-content",children:[r.jsx("span",{className:"sidebar-label",children:a}),g&&r.jsx("span",{className:"submenu-arrow",children:r.jsx(nr,{className:`${R?"active-text":""}`})})]})]}),g&&(!s||x)&&r.jsx("div",{className:"submenu",children:l.map((w,V)=>{const k=w.url===v;return r.jsx("a",{href:w.url,className:`submenu-item ${k?"active-text":""}`,onClick:()=>c&&c(w.url),children:r.jsx("span",{className:"submenu-label",children:w.label})},V)})})]})})},sr=({className:n})=>r.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,children:[r.jsx("circle",{cx:"14",cy:"14",r:"14",fill:"#00F7AA"}),r.jsx("path",{d:"M10.8383 7.82832C10.3833 8.28332 10.3833 9.01832 10.8383 9.47332L15.365 14L10.8383 18.5267C10.3833 18.9817 10.3833 19.7167 10.8383 20.1717C11.2933 20.6267 12.0283 20.6267 12.4833 20.1717L17.8383 14.8167C18.2933 14.3617 18.2933 13.6267 17.8383 13.1717L12.4833 7.81665C12.04 7.37332 11.2933 7.37332 10.8383 7.82832Z",fill:"#002244"})]}),Le=()=>r.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{className:"hamburger-icon",children:[r.jsx("line",{x1:"4",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:"hamburger-line top-line"}),r.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:"hamburger-line middle-line"}),r.jsx("line",{x1:"4",y1:"18",x2:"20",y2:"18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:"hamburger-line bottom-line"})]})}),ir=({logo:n,logoCollapsed:o,items:a,logoutIcon:l,onLogout:s,logoutLabel:h="Cerrar sesión",collapsed:v=!1,onToggle:d,activePath:u,onActiveChange:m})=>{const[c,x]=p.useState(v),[g,b]=p.useState(null),[R,T]=p.useState(u),[w,V]=p.useState(!1),[k,Y]=p.useState(!1),[L,$]=p.useState(!1);p.useEffect(()=>{const C=()=>{$(window.innerWidth<=768)};return C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[]),p.useEffect(()=>{var C;if(u){T(u);const D=a.findIndex(O=>{var F;return O.url===u||((F=O.submenu)==null?void 0:F.some(B=>B.url===u))});D!==-1&&((C=a[D].submenu)!=null&&C.length?b(D):b(null))}},[u,a]);const J=()=>{x(!c),d&&d()},q=()=>{var C;if(c)if(x(!1),d&&d(),R){const D=a.findIndex(O=>{var F;return O.url===R||((F=O.submenu)==null?void 0:F.some(B=>B.url===R))});D!==-1&&((C=a[D].submenu)!=null&&C.length)?b(D):b(null)}else b(null)},ee=C=>{b(g===C?null:C),L&&V(!0)},Z=C=>{T(C);const D=a.findIndex(O=>{var F;return O.url===C||((F=O.submenu)==null?void 0:F.some(B=>B.url===C))});if(D!==-1){const O=a[D];O.submenu&&O.submenu.length>0?b(D):b(null)}else b(null);m&&m(C),L&&(a.some(F=>{var B;return(B=F.submenu)==null?void 0:B.some(re=>re.url===C)})||(Y(!0),setTimeout(()=>{V(!1),Y(!1)},500)))},X=()=>{w?(Y(!0),setTimeout(()=>{V(!1),Y(!1)},500)):V(!0)};return r.jsxs(r.Fragment,{children:[L&&r.jsxs("div",{className:"mobile-navbar",children:[r.jsx("div",{className:"mobile-logo",children:n}),r.jsx("button",{className:`mobile-menu-button ${w?"open":""}`,onClick:X,"aria-label":"Toggle mobile menu",children:r.jsx(Le,{})})]}),!L&&r.jsx("button",{className:`mobile-menu-button ${w?"open":""}`,onClick:X,"aria-label":"Toggle mobile menu",style:{display:"none"},children:r.jsx(Le,{})}),L&&(w||k)&&r.jsx("div",{className:`sidebar-overlay ${w?"visible":""}`,onClick:X}),r.jsxs("div",{className:`sidebar-wrapper ${w?"mobile-open":""} ${k?"mobile-closing":""}`,children:[r.jsxs("div",{className:`sidebar ${!L&&c?"sidebar-collapsed":""} ${L?"sidebar-mobile":""}`,children:[!L&&r.jsx("div",{className:"sidebar-header",children:r.jsx("div",{className:"sidebar-logo",children:c?r.jsx("span",{className:"logo-text",children:o}):r.jsx("span",{className:"logo-text",children:n})})}),L&&(w||k)&&r.jsxs("div",{className:"mobile-header",children:[r.jsx("div",{className:"mobile-logo-menu",children:n}),r.jsx("button",{className:"mobile-close-button",onClick:X,"aria-label":"Close menu",children:"×"})]}),r.jsx("div",{className:"sidebar-menu",children:a.map((C,D)=>r.jsx(ar,{icon:C.icon,url:C.url,label:C.label,submenu:C.submenu,collapsed:c,active:C.active||C.url===R,activePath:R,isOpen:g===D,onToggle:()=>ee(D),onExpand:q,onSetActive:Z,isMobile:L},D))}),s&&r.jsx("div",{className:"sidebar-footer",children:r.jsxs("button",{className:"logout-button",onClick:s,children:[l,!c&&r.jsx("span",{children:h})]})})]}),!L&&r.jsx("button",{className:`sidebar-toggle-icon${c?" collapsed":""}`,onClick:J,"aria-label":"Toggle sidebar",children:r.jsx(sr,{})})]})]})},lr=({isOpen:n,onClose:o,title:a="",children:l,position:s="right",size:h="medium",enableSwipeToClose:v=!0})=>{const[d,u]=p.useState(!1),m=p.useRef(null),c=p.useRef(0),x=p.useRef(0),g=50,b=()=>{!d&&n&&(u(!0),setTimeout(()=>{u(!1),o()},500))},R=w=>{v&&(c.current=w.touches[0].clientX,x.current=w.touches[0].clientY)},T=w=>{if(!v||!w.changedTouches[0])return;const V=w.changedTouches[0].clientX,k=w.changedTouches[0].clientY,Y=V-c.current,L=k-x.current;(s==="right"&&Y>g||s==="left"&&Y<-g||s==="top"&&L<-g||s==="bottom"&&L>g)&&b()};return p.useEffect(()=>{n&&u(!1)},[n]),p.useEffect(()=>(n&&!d?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n,d]),!n&&!d?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`drawer-overlay ${d?"fade-out":"fade-in"}`,onClick:b}),r.jsxs("div",{ref:m,className:`drawer drawer-${s} drawer-${h} ${d?"drawer-closing":"drawer-open"}`,onTouchStart:R,onTouchEnd:T,children:[r.jsxs("div",{className:`drawer-header ${a?"has-title":"no-title"}`,children:[a&&r.jsx("h2",{className:"drawer-title",children:a}),r.jsx("button",{className:"drawer-close",onClick:b,"aria-label":"Cerrar",children:"✕"})]}),r.jsx("div",{className:"drawer-content",children:l})]})]})},or=ie("modal-container",{variants:{size:{s:"modal-size-s",m:"modal-size-m",l:"modal-size-l"}},defaultVariants:{size:"m"}}),cr=({title:n,children:o,active:a,onClose:l,size:s})=>{const h=p.useRef(null);p.useEffect(()=>{const d=u=>{u.key==="Escape"&&l()};return a&&document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[a,l]);const v=d=>{h.current&&d.target===h.current&&l()};return a?r.jsx("div",{className:"modal-backdrop",ref:h,onClick:v,children:r.jsxs("div",{className:or({size:s}),children:[r.jsxs("div",{className:"modal-header",children:[r.jsx("h2",{children:n}),r.jsx("button",{className:"modal-close",onClick:l,"aria-label":"Cerrar",children:"×"})]}),r.jsx("hr",{className:"modal-divider"}),r.jsx("div",{className:"modal-content",children:o})]})}):null},ur=({isOpen:n,onToggle:o,title:a,subtitle:l,children:s})=>r.jsxs("div",{className:`collapsible ${n?"open":""}`,children:[r.jsxs("div",{className:"collapsible-header",onClick:o,children:[r.jsxs("div",{className:"collapsible-header-content",children:[r.jsx("h3",{className:"collapsible-title",children:a}),l&&r.jsx("p",{className:"collapsible-subtitle",children:l})]}),r.jsx("div",{className:`collapsible-arrow ${n?"open":""}`,children:r.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M7 10L12 15L17 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),r.jsx("div",{className:`collapsible-content ${n?"open":""}`,children:s})]}),dr=({children:n})=>r.jsx("div",{className:"card",children:n}),fr=({buttonsData:n,size:o="sm"})=>{const[a,l]=p.useState(0),s=(h,v)=>{h.onClick(),l(v)};return r.jsx("div",{className:"toggle-button-container",children:n.map((h,v)=>r.jsx("div",{className:`toggle-button-inner ${a===v?"active":""} ${o}`,onClick:()=>s(h,v),children:r.jsx("span",{children:h.label})},v))})},Oe=({className:n})=>r.jsx("svg",{width:"23",height:"22",viewBox:"0 0 23 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,children:r.jsx("path",{d:"M19.5 15V19H3.50001V15H0.833344V19C0.833344 20.4667 2.03334 21.6667 3.50001 21.6667H19.5C20.9667 21.6667 22.1667 20.4667 22.1667 19V15H19.5ZM4.83334 7.00004L6.71334 8.88004L10.1667 5.44004V16.3334H12.8333V5.44004L16.2867 8.88004L18.1667 7.00004L11.5 0.333374L4.83334 7.00004Z",fill:"#1A2441"})}),hr=({accept:n="*/*",onUpload:o,onGoogleDriveSelect:a,maxSize:l=10*1024*1024,multiple:s=!1,placeholder:h="Haz click o arrastra y suelta tu archivo aquí",googleDriveText:v="Subir desde Drive",loading:d=!1,error:u,validateFile:m,disabled:c=!1,className:x="",showGoogleDrive:g=!0,variant:b="default"})=>{const[R,T]=p.useState(!1),[w,V]=p.useState(0),[k,Y]=p.useState(null),L=p.useRef(null),$=p.useCallback(_=>{const I=[],U=[];return Array.from(_).forEach(z=>{var le;if(z.size>l){U.push(`El archivo "${z.name}" excede el tamaño máximo de ${F(l)}`);return}if(n!=="*/*"){const G=n.split(",").map(K=>K.trim()),ce="."+((le=z.name.split(".").pop())==null?void 0:le.toLowerCase()),ue=z.type;if(!G.some(K=>K.startsWith(".")?ce===K.toLowerCase():K.endsWith("/*")?ue.startsWith(K.replace("/*","")):ue===K)){U.push(`El archivo "${z.name}" no es del tipo aceptado`);return}}if(m){const G=m(z);if(G){U.push(G);return}}I.push(z)}),{validFiles:I,errors:U}},[n,l,m]),J=p.useCallback(_=>{const{validFiles:I,errors:U}=$(_);if(U.length>0){Y(U.join(", "));return}Y(null),o&&I.length>0&&o(s?I:[I[0]])},[$,o,s]),q=p.useCallback(_=>{_.preventDefault(),_.stopPropagation(),V(I=>I+1),T(!0)},[]),ee=p.useCallback(_=>{_.preventDefault(),_.stopPropagation(),V(I=>I-1),w<=1&&T(!1)},[w]),Z=p.useCallback(_=>{_.preventDefault(),_.stopPropagation()},[]),X=p.useCallback(_=>{_.preventDefault(),_.stopPropagation(),T(!1),V(0);const I=_.dataTransfer.files;I.length>0&&J(I)},[J]),C=p.useCallback(_=>{const I=_.target.files;I&&I.length>0&&J(I),L.current&&(L.current.value="")},[J]),D=p.useCallback(()=>{!c&&L.current&&L.current.click()},[c]),O=p.useCallback(()=>{!c&&a&&a()},[c,a]),F=_=>{if(_===0)return"0 Bytes";const I=1024,U=["Bytes","KB","MB","GB"],z=Math.floor(Math.log(_)/Math.log(I));return parseFloat((_/Math.pow(I,z)).toFixed(2))+" "+U[z]},B=["uploader-container",R?"uploader-drag-over":"",d?"uploader-loading":"",c?"uploader-disabled":"",x].filter(Boolean).join(" "),re=r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{d:"M6 2L2 8L6 14L10 8L6 2Z",fill:"#4285F4"}),r.jsx("path",{d:"M18 2L14 8L18 14L22 8L18 2Z",fill:"#34A853"}),r.jsx("path",{d:"M12 8L8 14L12 20L16 14L12 8Z",fill:"#FBBC04"})]});return r.jsxs("div",{className:`uploader-wrapper ${b}`,children:[r.jsxs("div",{className:B,children:[b==="default"&&r.jsxs("div",{className:"uploader-card-area",children:[r.jsxs("div",{className:"uploader-drop-zone",onDragEnter:q,onDragLeave:ee,onDragOver:Z,onDrop:X,onClick:D,children:[r.jsx("input",{ref:L,type:"file",accept:n,multiple:s,onChange:C,className:"uploader-input",disabled:c||d}),r.jsx("p",{className:"uploader-placeholder",children:h}),r.jsx(pe,{size:"sm",variant:"filled",color:"secondary",iconLeft:r.jsx(Oe,{className:"icon-size"}),children:" Subir archivo"})]}),g&&r.jsxs("button",{className:"uploader-google-drive-button",type:"button",onClick:O,disabled:c||d,children:[re,v]})]}),b==="dotted"&&r.jsxs("div",{className:"uploader-drop-zone",onDragEnter:q,onDragLeave:ee,onDragOver:Z,onDrop:X,onClick:D,children:[r.jsx("input",{ref:L,type:"file",accept:n,multiple:s,onChange:C,className:"uploader-input",disabled:c||d}),r.jsx(Oe,{}),r.jsx("p",{className:"uploader-placeholder",children:h})]}),b==="bordered"&&r.jsx("div",{className:"uploader-bordered-area",children:r.jsx("div",{className:"uploader-bordered-zone"})})]}),(u||k)&&r.jsx("div",{className:"uploader-error",children:u||k})]})},Ie=({className:n})=>r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,children:r.jsx("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),vr=({size:n=24,className:o=""})=>r.jsxs("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:o,children:[r.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),r.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),r.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),r.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),De=ie("input",{variants:{size:{sm:"input-size-sm",md:"input-size-md",lg:"input-size-lg"},state:{default:"input-state-default",focused:"input-state-focused",filled:"input-state-filled",error:"input-state-error",success:"input-state-success",disabled:"input-state-disabled"},hasLeadingIcon:{true:"input-with-leading-icon"},hasTrailingIcon:{true:"input-with-trailing-icon"}},defaultVariants:{size:"md",state:"default"}}),Me=p.forwardRef(({className:n,size:o,state:a,leadingIcon:l,trailingIcon:s,hintText:h,onClear:v,placeholder:d="Placeholder",value:u,onChange:m,...c},x)=>{const g=!!l,b=!!s,R=u&&u.toString().length>0;let T=a;return a==="default"&&R&&(T="filled"),r.jsxs("div",{className:"input-container",children:[r.jsxs("div",{className:"input-wrapper",children:[g&&r.jsx("span",{className:"input-leading-icon",children:l}),r.jsx("input",{className:De({size:o,state:T,hasLeadingIcon:g,hasTrailingIcon:b,className:n}),placeholder:d,value:u,ref:x,...c}),b&&r.jsx("span",{className:"input-trailing-icon",children:s}),v&&u&&u.toString().length>0&&r.jsx("button",{type:"button",className:"input-clear-button",onClick:v,"aria-label":"Clear input",children:r.jsx(Ie,{})})]}),h&&r.jsx("div",{className:`input-hint input-hint-${T}`,children:h})]})});Me.displayName="Input";const Fe=ie("alert",{variants:{variant:{info:"alert-info",warning:"alert-warning",success:"alert-success",error:"alert-error"}},defaultVariants:{variant:"info"}}),Ae=p.forwardRef(({className:n,variant:o,title:a,description:l,children:s,onDismiss:h,icon:v,...d},u)=>{const m={info:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2",fill:"none"}),r.jsx("path",{d:"M10 6v4m0 4h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),warning:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2",fill:"none"}),r.jsx("path",{d:"M10 6v4m0 4h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),success:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2",fill:"none"}),r.jsx("path",{d:"M10 6v4m0 4h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),error:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2",fill:"none"}),r.jsx("path",{d:"M10 6v4m0 4h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})},c=v||(o?m[o]:m.info);return r.jsxs("div",{className:Fe({variant:o,className:n}),ref:u,...d,children:[r.jsx("div",{className:"alert-icon",children:c}),r.jsxs("div",{className:"alert-content",children:[a&&r.jsx("div",{className:"alert-title",children:a}),l&&r.jsx("div",{className:"alert-description",children:l}),s&&r.jsx("div",{className:"alert-children",children:s})]}),r.jsx("button",{className:"alert-dismiss",onClick:h,"aria-label":"Cerrar alerta",children:r.jsx(Ie,{})})]})});Ae.displayName="Alert";const mr=({size:n="md",state:o="default",outline:a=!1,pill:l=!1,iconAlignment:s="left",children:h,onClick:v,className:d="",iconOnly:u=!1,icon:m=r.jsx(vr,{})})=>{const c=["social-login",`social-login--${n}`,`social-login--${o}`,a&&"social-login--outline",l&&"social-login--pill",u&&"social-login--icon-only",`social-login--icon-${s}`,d].filter(Boolean).join(" "),x=h||"Inicia sesión";return r.jsxs("button",{className:c,onClick:v,disabled:o==="disabled",type:"button",children:[s==="left"&&m,!u&&r.jsx("span",{className:"social-login__text",children:x}),s==="right"&&m,s==="center"&&u&&m]})},pr=ie("progress-bar",{variants:{variant:{default:"progress-bar-default",gradient:"progress-bar-gradient",striped:"progress-bar-striped"},size:{sm:"progress-bar-size-sm",md:"progress-bar-size-md",lg:"progress-bar-size-lg"},color:{primary:"progress-bar-color-primary",secondary:"progress-bar-color-secondary",success:"progress-bar-color-success",warning:"progress-bar-color-warning",error:"progress-bar-color-error"},animated:{true:"progress-bar-animated"}},defaultVariants:{variant:"default",size:"md",color:"primary"}}),br=p.forwardRef(({className:n,variant:o,size:a,color:l,animated:s,amount:h,total:v,showPercentage:d=!1,label:u,height:m,style:c,...x},g)=>{const b=Math.min(Math.max(h/v*100,0),100),R={...c||{},...m?{height:m}:{}},T={width:`${b}%`};return r.jsxs("div",{className:pr({variant:o,size:a,color:l,animated:s,className:n}),style:R,ref:g,role:"progressbar","aria-valuenow":h,"aria-valuemin":0,"aria-valuemax":v,"aria-label":u||`Progreso: ${h} de ${v}`,...x,children:[r.jsx("div",{className:"progress-bar-track",children:r.jsx("div",{className:"progress-bar-fill",style:T})}),(d||u)&&r.jsx("div",{className:"progress-bar-text",children:u||`${Math.round(b)}%`})]})}),gr=(n,o)=>`/logos/${`${n}_${o}.png`}`,be=p.forwardRef(({type:n="logo",color:o="color",alt:a,className:l,...s},h)=>{const v=gr(n,o),d=a||(n==="logo"?"Levannta logo":"Levannta isologo");return r.jsx("img",{ref:h,className:["logo",l].filter(Boolean).join(" "),src:v,alt:d,...s})});be.displayName="Logo";const xr=({title:n,children:o,className:a,showLogo:l=!0,logoProps:s,...h})=>{const v=["header",a].filter(Boolean).join(" ");return r.jsx("header",{className:v,...h,children:r.jsxs("div",{className:"header-content-wrapper",children:[r.jsx("h1",{className:"header-title",children:n}),l&&r.jsx(be,{className:"header-logo",type:(s==null?void 0:s.type)??"logo",color:(s==null?void 0:s.color)??"color",width:(s==null?void 0:s.width)??240,height:s==null?void 0:s.height,alt:s==null?void 0:s.alt}),o&&r.jsx("div",{className:"header-children",children:o})]})})};S.Alert=Ae,S.Button=pe,S.Card=dr,S.Collapsible=ur,S.Drawer=lr,S.Header=xr,S.Input=Me,S.Logo=be,S.Modal=cr,S.ProgressBar=br,S.Sidebar=ir,S.SocialLogin=mr,S.ToggleButton=fr,S.Uploader=hr,S.alertVariants=Fe,S.buttonVariants=Te,S.inputVariants=De,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
22
|
+
<%s key={someKey} {...props} />`,R,L,Z,L),z[L+R]=!0)}if(L=null,j!==void 0&&(t(j),L=""+j),d(f)&&(t(f.key),L=""+f.key),"key"in f){j={};for(var re in f)re!=="key"&&(j[re]=f[re])}else j=f;return L&&i(j,typeof r=="function"?r.displayName||r.name||"Unknown":r),h(r,L,B,D,n(),j,V,ee)}function p(r){typeof r=="object"&&r!==null&&r.$$typeof===b&&r._store&&(r._store.validated=1)}var v=m,b=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),O=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),g=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,S=Array.isArray,_=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(r){return r()}};var I,X={},N=v.react_stack_bottom_frame.bind(v,o)(),E=_(a(o)),z={};J.Fragment=w,J.jsx=function(r,f,j,R,D){var B=1e4>g.recentlyCreatedOwnerStacks++;return c(r,f,j,!1,R,D,B?Error("react-stack-top-frame"):N,B?_(a(r)):E)},J.jsxs=function(r,f,j,R,D){var B=1e4>g.recentlyCreatedOwnerStacks++;return c(r,f,j,!0,R,D,B?Error("react-stack-top-frame"):N,B?_(a(r)):E)}}()),J}process.env.NODE_ENV==="production"?Q.exports=be():Q.exports=ve();var e=Q.exports;function ne(s){var l,t,a="";if(typeof s=="string"||typeof s=="number")a+=s;else if(typeof s=="object")if(Array.isArray(s)){var n=s.length;for(l=0;l<n;l++)s[l]&&(t=ne(s[l]))&&(a&&(a+=" "),a+=t)}else for(t in s)s[t]&&(a&&(a+=" "),a+=t);return a}function xe(){for(var s,l,t=0,a="",n=arguments.length;t<n;t++)(s=arguments[t])&&(l=ne(s))&&(a&&(a+=" "),a+=l);return a}const ae=s=>typeof s=="boolean"?`${s}`:s===0?"0":s,le=xe,K=(s,l)=>t=>{var a;if((l==null?void 0:l.variants)==null)return le(s,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:n,defaultVariants:o}=l,d=Object.keys(n).map(h=>{const c=t==null?void 0:t[h],p=o==null?void 0:o[h];if(c===null)return null;const v=ae(c)||ae(p);return n[h][v]}),i=t&&Object.entries(t).reduce((h,c)=>{let[p,v]=c;return v===void 0||(h[p]=v),h},{}),u=l==null||(a=l.compoundVariants)===null||a===void 0?void 0:a.reduce((h,c)=>{let{class:p,className:v,...b}=c;return Object.entries(b).every(k=>{let[w,x]=k;return Array.isArray(x)?x.includes({...o,...i}[w]):{...o,...i}[w]===x})?[...h,p,v]:h},[]);return le(s,d,u,t==null?void 0:t.class,t==null?void 0:t.className)},oe=K("button",{variants:{variant:{outlined:"button-outlined",filled:"button-filled",icon:"button-icon"},color:{primary:"button-color-primary",secondary:"button-color-secondary",error:"button-color-error",clear:"button-color-clear"},size:{sm:"button-size-sm",md:"button-size-md",lg:"button-size-lg",xl:"button-size-xl"},pill:{true:"button-pill"},active:{true:"button-active"},iconLeft:{true:"button-with-icon-left"},iconRight:{true:"button-with-icon-right"},iconLeftJustified:{true:"button-with-icon-left button-with-icon-left-justified"},iconRightJustified:{true:"button-with-icon-right button-with-icon-right-justified"},iconOnly:{true:"button-icon-only"}},defaultVariants:{variant:"filled",color:"primary",size:"md"},compoundVariants:[{variant:"outlined",color:"primary",className:"button-outlined-primary"},{variant:"outlined",color:"secondary",className:"button-outlined-secondary"},{variant:"outlined",color:"error",className:"button-outlined-error"},{variant:"outlined",color:"clear",className:"button-outlined-clear"},{variant:"filled",color:"primary",className:"button-filled-primary"},{variant:"filled",color:"secondary",className:"button-filled-secondary"},{variant:"filled",color:"error",className:"button-filled-error"},{variant:"filled",color:"clear",className:"button-filled-clear"},{variant:"icon",color:"primary",className:"button-icon-primary"},{variant:"icon",color:"secondary",className:"button-icon-secondary"},{variant:"icon",color:"error",className:"button-icon-error"},{variant:"icon",color:"clear",className:"button-icon-clear"}]}),$=m.forwardRef(({className:s,variant:l,color:t,size:a,pill:n,active:o,iconLeft:d,iconRight:i,iconLeftJustified:u,iconRightJustified:h,iconOnly:c,width:p,children:v,style:b,...k},w)=>{const x={...b||{},...p?{width:p}:{}};return e.jsxs("button",{className:oe({variant:l,color:t,size:a,pill:n,active:o,iconLeft:!!d,iconRight:!!i,iconLeftJustified:!!u,iconRightJustified:!!h,iconOnly:!!c,className:s}),style:x,ref:w,...k,children:[d&&e.jsx("span",{className:"button-icon-left",children:d}),u&&e.jsx("span",{className:"button-icon-left",children:u}),c?e.jsx("span",{children:c}):v,i&&e.jsx("span",{className:"button-icon-right",children:i}),h&&e.jsx("span",{className:"button-icon-right",children:h})]})});$.displayName="Button";const ge=({className:s})=>e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,children:e.jsx("path",{d:"M8.12 9.29006L12 13.1701L15.88 9.29006C16.27 8.90006 16.9 8.90006 17.29 9.29006C17.68 9.68006 17.68 10.3101 17.29 10.7001L12.7 15.2901C12.31 15.6801 11.68 15.6801 11.29 15.2901L6.7 10.7001C6.31 10.3101 6.31 9.68006 6.7 9.29006C7.09 8.91006 7.73 8.90006 8.12 9.29006Z",fill:"#F9FAFB"})}),pe=({icon:s,url:l,label:t,submenu:a,collapsed:n,active:o,activePath:d,isOpen:i,onToggle:u,onExpand:h,onSetActive:c,isMobile:p=!1})=>{const v=a&&a.length>0,b=v&&a.some(x=>x.url===d),k=o||i&&v||b||l===d,w=x=>{if(x.preventDefault(),p&&v){u();return}if(c&&c(l),n&&h){h();return}v&&!n&&u()};return e.jsx("div",{className:`sidebar-item ${i?"open":""} `,children:e.jsxs("div",{className:`sidebar-item-wrapper ${k&&!n?"active":""}`,children:[e.jsxs("a",{href:l,className:`sidebar-link sidebar-collapsed ${k?"active-text":""}`,onClick:w,children:[e.jsx("div",{className:`sidebar-icon ${k?"active-text":""}`,children:s}),(!n||p)&&e.jsxs("div",{className:"sidebar-content",children:[e.jsx("span",{className:"sidebar-label",children:t}),v&&e.jsx("span",{className:"submenu-arrow",children:e.jsx(ge,{className:`${k?"active-text":""}`})})]})]}),v&&(!n||p)&&e.jsx("div",{className:"submenu",children:a.map((x,A)=>{const M=x.url===d;return e.jsx("a",{href:x.url,className:`submenu-item ${M?"active-text":""}`,onClick:()=>c&&c(x.url),children:e.jsx("span",{className:"submenu-label",children:x.label})},A)})})]})})},je=({className:s})=>e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,children:[e.jsx("circle",{cx:"14",cy:"14",r:"14",fill:"#00F7AA"}),e.jsx("path",{d:"M10.8383 7.82832C10.3833 8.28332 10.3833 9.01832 10.8383 9.47332L15.365 14L10.8383 18.5267C10.3833 18.9817 10.3833 19.7167 10.8383 20.1717C11.2933 20.6267 12.0283 20.6267 12.4833 20.1717L17.8383 14.8167C18.2933 14.3617 18.2933 13.6267 17.8383 13.1717L12.4833 7.81665C12.04 7.37332 11.2933 7.37332 10.8383 7.82832Z",fill:"#002244"})]}),ie=()=>e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{className:"hamburger-icon",children:[e.jsx("line",{x1:"4",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:"hamburger-line top-line"}),e.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:"hamburger-line middle-line"}),e.jsx("line",{x1:"4",y1:"18",x2:"20",y2:"18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:"hamburger-line bottom-line"})]})}),we=({logo:s,logoCollapsed:l,items:t,logoutIcon:a,onLogout:n,logoutLabel:o="Cerrar sesión",collapsed:d=!1,onToggle:i,activePath:u,onActiveChange:h})=>{const[c,p]=m.useState(d),[v,b]=m.useState(null),[k,w]=m.useState(u),[x,A]=m.useState(!1),[M,O]=m.useState(!1),[C,P]=m.useState(!1);m.useEffect(()=>{const g=()=>{P(window.innerWidth<=768)};return g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}},[]),m.useEffect(()=>{var g;if(u){w(u);const T=t.findIndex(S=>{var _;return S.url===u||((_=S.submenu)==null?void 0:_.some(I=>I.url===u))});T!==-1&&((g=t[T].submenu)!=null&&g.length?b(T):b(null))}},[u,t]);const W=()=>{p(!c),i&&i()},H=()=>{var g;if(c)if(p(!1),i&&i(),k){const T=t.findIndex(S=>{var _;return S.url===k||((_=S.submenu)==null?void 0:_.some(I=>I.url===k))});T!==-1&&((g=t[T].submenu)!=null&&g.length)?b(T):b(null)}else b(null)},Y=g=>{b(v===g?null:g),C&&A(!0)},U=g=>{w(g);const T=t.findIndex(S=>{var _;return S.url===g||((_=S.submenu)==null?void 0:_.some(I=>I.url===g))});if(T!==-1){const S=t[T];S.submenu&&S.submenu.length>0?b(T):b(null)}else b(null);h&&h(g),C&&(t.some(_=>{var I;return(I=_.submenu)==null?void 0:I.some(X=>X.url===g)})||(O(!0),setTimeout(()=>{A(!1),O(!1)},500)))},F=()=>{x?(O(!0),setTimeout(()=>{A(!1),O(!1)},500)):A(!0)};return e.jsxs(e.Fragment,{children:[C&&e.jsxs("div",{className:"mobile-navbar",children:[e.jsx("div",{className:"mobile-logo",children:s}),e.jsx("button",{className:`mobile-menu-button ${x?"open":""}`,onClick:F,"aria-label":"Toggle mobile menu",children:e.jsx(ie,{})})]}),!C&&e.jsx("button",{className:`mobile-menu-button ${x?"open":""}`,onClick:F,"aria-label":"Toggle mobile menu",style:{display:"none"},children:e.jsx(ie,{})}),C&&(x||M)&&e.jsx("div",{className:`sidebar-overlay ${x?"visible":""}`,onClick:F}),e.jsxs("div",{className:`sidebar-wrapper ${x?"mobile-open":""} ${M?"mobile-closing":""}`,children:[e.jsxs("div",{className:`sidebar ${!C&&c?"sidebar-collapsed":""} ${C?"sidebar-mobile":""}`,children:[!C&&e.jsx("div",{className:"sidebar-header",children:e.jsx("div",{className:"sidebar-logo",children:c?e.jsx("span",{className:"logo-text",children:l}):e.jsx("span",{className:"logo-text",children:s})})}),C&&(x||M)&&e.jsxs("div",{className:"mobile-header",children:[e.jsx("div",{className:"mobile-logo-menu",children:s}),e.jsx("button",{className:"mobile-close-button",onClick:F,"aria-label":"Close menu",children:"×"})]}),e.jsx("div",{className:"sidebar-menu",children:t.map((g,T)=>e.jsx(pe,{icon:g.icon,url:g.url,label:g.label,submenu:g.submenu,collapsed:c,active:g.active||g.url===k,activePath:k,isOpen:v===T,onToggle:()=>Y(T),onExpand:H,onSetActive:U,isMobile:C},T))}),n&&e.jsx("div",{className:"sidebar-footer",children:e.jsxs("button",{className:"logout-button",onClick:n,children:[a,!c&&e.jsx("span",{children:o})]})})]}),!C&&e.jsx("button",{className:`sidebar-toggle-icon${c?" collapsed":""}`,onClick:W,"aria-label":"Toggle sidebar",children:e.jsx(je,{})})]})]})},Ne=({isOpen:s,onClose:l,title:t="",children:a,position:n="right",size:o="medium",enableSwipeToClose:d=!0})=>{const[i,u]=m.useState(!1),h=m.useRef(null),c=m.useRef(0),p=m.useRef(0),v=50,b=()=>{!i&&s&&(u(!0),setTimeout(()=>{u(!1),l()},500))},k=x=>{d&&(c.current=x.touches[0].clientX,p.current=x.touches[0].clientY)},w=x=>{if(!d||!x.changedTouches[0])return;const A=x.changedTouches[0].clientX,M=x.changedTouches[0].clientY,O=A-c.current,C=M-p.current;(n==="right"&&O>v||n==="left"&&O<-v||n==="top"&&C<-v||n==="bottom"&&C>v)&&b()};return m.useEffect(()=>{s&&u(!1)},[s]),m.useEffect(()=>(s&&!i?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[s,i]),!s&&!i?null:e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`drawer-overlay ${i?"fade-out":"fade-in"}`,onClick:b}),e.jsxs("div",{ref:h,className:`drawer drawer-${n} drawer-${o} ${i?"drawer-closing":"drawer-open"}`,onTouchStart:k,onTouchEnd:w,children:[e.jsxs("div",{className:`drawer-header ${t?"has-title":"no-title"}`,children:[t&&e.jsx("h2",{className:"drawer-title",children:t}),e.jsx("button",{className:"drawer-close",onClick:b,"aria-label":"Cerrar",children:"✕"})]}),e.jsx("div",{className:"drawer-content",children:a})]})]})},ke=K("modal-container",{variants:{size:{s:"modal-size-s",m:"modal-size-m",l:"modal-size-l"}},defaultVariants:{size:"m"}}),ye=({title:s,children:l,active:t,onClose:a,size:n})=>{const o=m.useRef(null);m.useEffect(()=>{const i=u=>{u.key==="Escape"&&a()};return t&&document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[t,a]);const d=i=>{o.current&&i.target===o.current&&a()};return t?e.jsx("div",{className:"modal-backdrop",ref:o,onClick:d,children:e.jsxs("div",{className:ke({size:n}),children:[e.jsxs("div",{className:"modal-header",children:[e.jsx("h2",{children:s}),e.jsx("button",{className:"modal-close",onClick:a,"aria-label":"Cerrar",children:"×"})]}),e.jsx("hr",{className:"modal-divider"}),e.jsx("div",{className:"modal-content",children:l})]})}):null},Ce=({isOpen:s,onToggle:l,title:t,subtitle:a,children:n})=>e.jsxs("div",{className:`collapsible ${s?"open":""}`,children:[e.jsxs("div",{className:"collapsible-header",onClick:l,children:[e.jsxs("div",{className:"collapsible-header-content",children:[e.jsx("h3",{className:"collapsible-title",children:t}),a&&e.jsx("p",{className:"collapsible-subtitle",children:a})]}),e.jsx("div",{className:`collapsible-arrow ${s?"open":""}`,children:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M7 10L12 15L17 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsx("div",{className:`collapsible-content ${s?"open":""}`,children:n})]}),Ee=({children:s})=>e.jsx("div",{className:"card",children:s}),Te=({buttonsData:s,size:l="sm"})=>{const[t,a]=m.useState(0),n=(o,d)=>{o.onClick(),a(d)};return e.jsx("div",{className:"toggle-button-container",children:s.map((o,d)=>e.jsx("div",{className:`toggle-button-inner ${t===d?"active":""} ${l}`,onClick:()=>n(o,d),children:e.jsx("span",{children:o.label})},d))})},ce=({className:s})=>e.jsx("svg",{width:"23",height:"22",viewBox:"0 0 23 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,children:e.jsx("path",{d:"M19.5 15V19H3.50001V15H0.833344V19C0.833344 20.4667 2.03334 21.6667 3.50001 21.6667H19.5C20.9667 21.6667 22.1667 20.4667 22.1667 19V15H19.5ZM4.83334 7.00004L6.71334 8.88004L10.1667 5.44004V16.3334H12.8333V5.44004L16.2867 8.88004L18.1667 7.00004L11.5 0.333374L4.83334 7.00004Z",fill:"#1A2441"})}),Re=({accept:s="*/*",onUpload:l,onGoogleDriveSelect:t,maxSize:a=10*1024*1024,multiple:n=!1,placeholder:o="Haz click o arrastra y suelta tu archivo aquí",googleDriveText:d="Subir desde Drive",loading:i=!1,error:u,validateFile:h,disabled:c=!1,className:p="",showGoogleDrive:v=!0,variant:b="default"})=>{const[k,w]=m.useState(!1),[x,A]=m.useState(0),[M,O]=m.useState(null),C=m.useRef(null),P=m.useCallback(N=>{const E=[],z=[];return Array.from(N).forEach(r=>{var f;if(r.size>a){z.push(`El archivo "${r.name}" excede el tamaño máximo de ${_(a)}`);return}if(s!=="*/*"){const j=s.split(",").map(V=>V.trim()),R="."+((f=r.name.split(".").pop())==null?void 0:f.toLowerCase()),D=r.type;if(!j.some(V=>V.startsWith(".")?R===V.toLowerCase():V.endsWith("/*")?D.startsWith(V.replace("/*","")):D===V)){z.push(`El archivo "${r.name}" no es del tipo aceptado`);return}}if(h){const j=h(r);if(j){z.push(j);return}}E.push(r)}),{validFiles:E,errors:z}},[s,a,h]),W=m.useCallback(N=>{const{validFiles:E,errors:z}=P(N);if(z.length>0){O(z.join(", "));return}O(null),l&&E.length>0&&l(n?E:[E[0]])},[P,l,n]),H=m.useCallback(N=>{N.preventDefault(),N.stopPropagation(),A(E=>E+1),w(!0)},[]),Y=m.useCallback(N=>{N.preventDefault(),N.stopPropagation(),A(E=>E-1),x<=1&&w(!1)},[x]),U=m.useCallback(N=>{N.preventDefault(),N.stopPropagation()},[]),F=m.useCallback(N=>{N.preventDefault(),N.stopPropagation(),w(!1),A(0);const E=N.dataTransfer.files;E.length>0&&W(E)},[W]),g=m.useCallback(N=>{const E=N.target.files;E&&E.length>0&&W(E),C.current&&(C.current.value="")},[W]),T=m.useCallback(()=>{!c&&C.current&&C.current.click()},[c]),S=m.useCallback(()=>{!c&&t&&t()},[c,t]),_=N=>{if(N===0)return"0 Bytes";const E=1024,z=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(N)/Math.log(E));return parseFloat((N/Math.pow(E,r)).toFixed(2))+" "+z[r]},I=["uploader-container",k?"uploader-drag-over":"",i?"uploader-loading":"",c?"uploader-disabled":"",p].filter(Boolean).join(" "),X=e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M6 2L2 8L6 14L10 8L6 2Z",fill:"#4285F4"}),e.jsx("path",{d:"M18 2L14 8L18 14L22 8L18 2Z",fill:"#34A853"}),e.jsx("path",{d:"M12 8L8 14L12 20L16 14L12 8Z",fill:"#FBBC04"})]});return e.jsxs("div",{className:`uploader-wrapper ${b}`,children:[e.jsxs("div",{className:I,children:[b==="default"&&e.jsxs("div",{className:"uploader-card-area",children:[e.jsxs("div",{className:"uploader-drop-zone",onDragEnter:H,onDragLeave:Y,onDragOver:U,onDrop:F,onClick:T,children:[e.jsx("input",{ref:C,type:"file",accept:s,multiple:n,onChange:g,className:"uploader-input",disabled:c||i}),e.jsx("p",{className:"uploader-placeholder",children:o}),e.jsx($,{size:"sm",variant:"filled",color:"secondary",iconLeft:e.jsx(ce,{className:"icon-size"}),children:" Subir archivo"})]}),v&&e.jsxs("button",{className:"uploader-google-drive-button",type:"button",onClick:S,disabled:c||i,children:[X,d]})]}),b==="dotted"&&e.jsxs("div",{className:"uploader-drop-zone",onDragEnter:H,onDragLeave:Y,onDragOver:U,onDrop:F,onClick:T,children:[e.jsx("input",{ref:C,type:"file",accept:s,multiple:n,onChange:g,className:"uploader-input",disabled:c||i}),e.jsx(ce,{}),e.jsx("p",{className:"uploader-placeholder",children:o})]}),b==="bordered"&&e.jsx("div",{className:"uploader-bordered-area",children:e.jsx("div",{className:"uploader-bordered-zone"})})]}),(u||M)&&e.jsx("div",{className:"uploader-error",children:u||M})]})},de=({className:s})=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,children:e.jsx("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Se=({size:s=24,className:l=""})=>e.jsxs("svg",{width:s,height:s,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l,children:[e.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),e.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),e.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),e.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),ue=K("input",{variants:{size:{sm:"input-size-sm",md:"input-size-md",lg:"input-size-lg"},state:{default:"input-state-default",focused:"input-state-focused",filled:"input-state-filled",error:"input-state-error",success:"input-state-success",disabled:"input-state-disabled"},hasLeadingIcon:{true:"input-with-leading-icon"},hasTrailingIcon:{true:"input-with-trailing-icon"}},defaultVariants:{size:"md",state:"default"}}),fe=m.forwardRef(({className:s,size:l,state:t,leadingIcon:a,trailingIcon:n,hintText:o,onClear:d,placeholder:i="Placeholder",value:u,onChange:h,...c},p)=>{const v=!!a,b=!!n,k=u&&u.toString().length>0;let w=t;return t==="default"&&k&&(w="filled"),e.jsxs("div",{className:"input-container",children:[e.jsxs("div",{className:"input-wrapper",children:[v&&e.jsx("span",{className:"input-leading-icon",children:a}),e.jsx("input",{className:ue({size:l,state:w,hasLeadingIcon:v,hasTrailingIcon:b,className:s}),placeholder:i,value:u,ref:p,...c}),b&&e.jsx("span",{className:"input-trailing-icon",children:n}),d&&u&&u.toString().length>0&&e.jsx("button",{type:"button",className:"input-clear-button",onClick:d,"aria-label":"Clear input",children:e.jsx(de,{})})]}),o&&e.jsx("div",{className:`input-hint input-hint-${w}`,children:o})]})});fe.displayName="Input";const me=K("alert",{variants:{variant:{info:"alert-info",warning:"alert-warning",success:"alert-success",error:"alert-error"}},defaultVariants:{variant:"info"}}),he=m.forwardRef(({className:s,variant:l,title:t,description:a,children:n,onDismiss:o,icon:d,...i},u)=>{const h={info:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2",fill:"none"}),e.jsx("path",{d:"M10 6v4m0 4h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),warning:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2",fill:"none"}),e.jsx("path",{d:"M10 6v4m0 4h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),success:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2",fill:"none"}),e.jsx("path",{d:"M10 6v4m0 4h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),error:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2",fill:"none"}),e.jsx("path",{d:"M10 6v4m0 4h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})},c=d||(l?h[l]:h.info);return e.jsxs("div",{className:me({variant:l,className:s}),ref:u,...i,children:[e.jsx("div",{className:"alert-icon",children:c}),e.jsxs("div",{className:"alert-content",children:[t&&e.jsx("div",{className:"alert-title",children:t}),a&&e.jsx("div",{className:"alert-description",children:a}),n&&e.jsx("div",{className:"alert-children",children:n})]}),e.jsx("button",{className:"alert-dismiss",onClick:o,"aria-label":"Cerrar alerta",children:e.jsx(de,{})})]})});he.displayName="Alert";const _e=({size:s="md",state:l="default",outline:t=!1,pill:a=!1,iconAlignment:n="left",children:o,onClick:d,className:i="",iconOnly:u=!1,icon:h=e.jsx(Se,{})})=>{const c=["social-login",`social-login--${s}`,`social-login--${l}`,t&&"social-login--outline",a&&"social-login--pill",u&&"social-login--icon-only",`social-login--icon-${n}`,i].filter(Boolean).join(" "),p=o||"Inicia sesión";return e.jsxs("button",{className:c,onClick:d,disabled:l==="disabled",type:"button",children:[n==="left"&&h,!u&&e.jsx("span",{className:"social-login__text",children:p}),n==="right"&&h,n==="center"&&u&&h]})},Le=K("progress-bar",{variants:{variant:{default:"progress-bar-default",gradient:"progress-bar-gradient",striped:"progress-bar-striped"},size:{sm:"progress-bar-size-sm",md:"progress-bar-size-md",lg:"progress-bar-size-lg"},color:{primary:"progress-bar-color-primary",secondary:"progress-bar-color-secondary",success:"progress-bar-color-success",warning:"progress-bar-color-warning",error:"progress-bar-color-error"},animated:{true:"progress-bar-animated"}},defaultVariants:{variant:"default",size:"md",color:"primary"}}),Ae=m.forwardRef(({className:s,variant:l,size:t,color:a,animated:n,amount:o,total:d,showPercentage:i=!1,label:u,height:h,style:c,...p},v)=>{const b=Math.min(Math.max(o/d*100,0),100),k={...c||{},...h?{height:h}:{}},w={width:`${b}%`};return e.jsxs("div",{className:Le({variant:l,size:t,color:a,animated:n,className:s}),style:k,ref:v,role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":d,"aria-label":u||`Progreso: ${o} de ${d}`,...p,children:[e.jsx("div",{className:"progress-bar-track",children:e.jsx("div",{className:"progress-bar-fill",style:w})}),(i||u)&&e.jsx("div",{className:"progress-bar-text",children:u||`${Math.round(b)}%`})]})}),Ie=(s,l)=>`/logos/${`${s}_${l}.png`}`,q=m.forwardRef(({type:s="logo",color:l="color",alt:t,className:a,...n},o)=>{const d=Ie(s,l),i=t||(s==="logo"?"Levannta logo":"Levannta isologo");return e.jsx("img",{ref:o,className:["logo",a].filter(Boolean).join(" "),src:d,alt:i,...n})});q.displayName="Logo";const Me=({title:s,children:l,className:t,showLogo:a=!0,logoProps:n,...o})=>{const d=["header",t].filter(Boolean).join(" ");return e.jsx("header",{className:d,...o,children:e.jsxs("div",{className:"header-content-wrapper",children:[e.jsx("h1",{className:"header-title",children:s}),a&&e.jsx(q,{className:"header-logo",type:(n==null?void 0:n.type)??"logo",color:(n==null?void 0:n.color)??"color",width:(n==null?void 0:n.width)??240,height:n==null?void 0:n.height,alt:n==null?void 0:n.alt}),l&&e.jsx("div",{className:"header-children",children:l})]})})};y.Alert=he,y.Button=$,y.Card=Ee,y.Collapsible=Ce,y.Drawer=Ne,y.Header=Me,y.Input=fe,y.Logo=q,y.Modal=ye,y.ProgressBar=Ae,y.Sidebar=we,y.SocialLogin=_e,y.ToggleButton=Te,y.Uploader=Re,y.alertVariants=me,y.buttonVariants=oe,y.inputVariants=ue,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|
|
31
23
|
//# sourceMappingURL=index.umd.js.map
|