galliard-ui 1.0.4 → 1.0.5
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/README.md +35 -2
- package/dist/components/Button/ButtonGal.d.ts +2 -0
- package/dist/components/inputs/CheckBox/CheckBoxGal.d.ts +2 -0
- package/dist/components/inputs/Dropdown/DropDownGal.d.ts +2 -0
- package/dist/components/inputs/InputFile/InputFileGal.d.ts +2 -0
- package/dist/components/inputs/InputRadio/InputRadioGal.d.ts +2 -0
- package/dist/components/inputs/InputText/InputTextGal.d.ts +2 -0
- package/dist/components/inputs/Textarea/TextAreaGal.d.ts +2 -0
- package/dist/components/inputs/utils/Functions.d.ts +1 -0
- package/dist/funtions/UnixActions.d.ts +8 -0
- package/dist/galliard-ui.cjs +1 -1
- package/dist/galliard-ui.d.ts +2 -411
- package/dist/galliard-ui.js +1 -1
- package/dist/hooks/useFileCatalogTranslate.d.ts +2 -0
- package/dist/hooks/useOnClickOutside.d.ts +4 -0
- package/dist/hooks/useValidateForms.d.ts +2 -0
- package/dist/index.d.ts +19 -0
- package/dist/models/Button/ButtonModel.d.ts +25 -0
- package/dist/models/Catalogs/FileCatalog.d.ts +79 -0
- package/dist/models/Hooks/ValidateModel.d.ts +60 -0
- package/dist/models/Inputs/CheckModel.d.ts +20 -0
- package/dist/models/Inputs/DropDownModel.d.ts +39 -0
- package/dist/models/Inputs/InputFileModel.d.ts +29 -0
- package/dist/models/Inputs/InputModel.d.ts +37 -0
- package/dist/models/Inputs/InputRadioModel.d.ts +34 -0
- package/dist/models/Inputs/TextAreaModel.d.ts +31 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,11 +5,44 @@
|
|
|
5
5
|
|
|
6
6
|
**Galliard UI** es una librería de componentes React moderna, construida con TypeScript y Sass, diseñada para ser ligera, accesible y fácil de integrar, y tambien altamente personalizable para adecuarse a cada proyecto.
|
|
7
7
|
|
|
8
|
+
<div align="center">
|
|
9
|
+
<a href="TU_LINK_DE_VERCEL_AQUI" target="_blank">
|
|
10
|
+
<img src="https://www.google.com/search?q=https://img.shields.io/badge/-%25F0%259F%2593%2596%2520Get%2520Started%2520%2526%2520Documentation-0070f3%3Fstyle%3Dfor-the-badge%26logo%3Dstorybook%26logoColor%3Dwhite" alt="Get Started" />
|
|
11
|
+
</a>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
8
14
|
## 🚀 Instalación
|
|
9
15
|
|
|
10
|
-
Instala Galliard UI en tu proyecto:
|
|
16
|
+
Instala Galliard UI en tu proyecto usando tu gestor de paquetes favorito:
|
|
11
17
|
|
|
12
18
|
```bash
|
|
13
19
|
npm install galliard-ui
|
|
14
20
|
# o
|
|
15
|
-
yarn add galliard-ui
|
|
21
|
+
yarn add galliard-ui
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 🛠️ Uso Básico
|
|
25
|
+
|
|
26
|
+
Importa los componentes directamente en tu aplicación de React o Next.js:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
import { ButtonGal } from 'galliard-ui';
|
|
30
|
+
|
|
31
|
+
const App = () => (
|
|
32
|
+
<ButtonGal label="Cerrrar sesión" action={() => handleLogout()} styleType="ThemeRed"/>
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## ✨ Características
|
|
37
|
+
|
|
38
|
+
⚡ Ligera: Optimizada para no pesar en tu bundle final.
|
|
39
|
+
|
|
40
|
+
🎨 Personalizable: Usa Mixins de Sass para adaptar los estilos a tu marca.
|
|
41
|
+
|
|
42
|
+
📱 Responsiva: Diseñada para funcionar en cualquier tamaño de pantalla.
|
|
43
|
+
|
|
44
|
+
⌨️ TypeScript: Tipado completo para una mejor experiencia de desarrollo.
|
|
45
|
+
|
|
46
|
+
## 📄 Licencia
|
|
47
|
+
|
|
48
|
+
Este proyecto está bajo la licencia MIT.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getRoundedValue: (rounded: string) => number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const TIMEZONES: readonly ["America/Mexico_City", "America/New_York", "America/Los_Angeles", "America/Bogota", "America/Argentina/Buenos_Aires", "America/Sao_Paulo", "Europe/Madrid", "Europe/London", "Europe/Paris", "Asia/Tokyo", "Asia/Shanghai", "Australia/Sydney", "UTC"];
|
|
2
|
+
type SupportedTimeZone = typeof TIMEZONES[number];
|
|
3
|
+
declare function convertToUnix(dateString: string | Date): number;
|
|
4
|
+
declare function unixToDate(unixTime: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
5
|
+
declare function unixToDateTimeString(unixTime: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
6
|
+
declare function unixToDateTime(unixTime: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
7
|
+
declare function unixToStringYMD(unixTimestamp: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
8
|
+
export { TIMEZONES, convertToUnix, unixToDate, unixToStringYMD, unixToDateTime, unixToDateTimeString };
|
package/dist/galliard-ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const l=require("react/jsx-runtime"),b=require("react");function en(e,t){const o=e.icons,r=e.aliases||Object.create(null),n=Object.create(null);function i(s){if(o[s])return n[s]=[];if(!(s in n)){n[s]=null;const c=r[s]&&r[s].parent,a=c&&i(c);a&&(n[s]=[c].concat(a))}return n[s]}return Object.keys(o).concat(Object.keys(r)).forEach(i),n}const Me=Object.freeze({left:0,top:0,width:16,height:16}),se=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),be=Object.freeze({...Me,...se}),me=Object.freeze({...be,body:"",hidden:!1});function nn(e,t){const o={};!e.hFlip!=!t.hFlip&&(o.hFlip=!0),!e.vFlip!=!t.vFlip&&(o.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(o.rotate=r),o}function Ie(e,t){const o=nn(e,t);for(const r in me)r in se?r in e&&!(r in o)&&(o[r]=se[r]):r in t?o[r]=t[r]:r in e&&(o[r]=e[r]);return o}function tn(e,t,o){const r=e.icons,n=e.aliases||Object.create(null);let i={};function s(c){i=Ie(r[c]||n[c],i)}return s(t),o.forEach(s),Ie(e,i)}function Pe(e,t){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(n=>{t(n,null),o.push(n)});const r=en(e);for(const n in r){const i=r[n];i&&(t(n,tn(e,n,i)),o.push(n))}return o}const on={provider:"",aliases:{},not_found:{},...Me};function de(e,t){for(const o in t)if(o in e&&typeof e[o]!=typeof t[o])return!1;return!0}function Ae(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!de(e,on))return null;const o=t.icons;for(const n in o){const i=o[n];if(!n||typeof i.body!="string"||!de(i,me))return null}const r=t.aliases||Object.create(null);for(const n in r){const i=r[n],s=i.parent;if(!n||typeof s!="string"||!o[s]&&!r[s]||!de(i,me))return null}return t}const $e=Object.create(null);function rn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function J(e,t){const o=$e[e]||($e[e]=Object.create(null));return o[t]||(o[t]=rn(e,t))}function Fe(e,t){return Ae(t)?Pe(t,(o,r)=>{r?e.icons[o]=r:e.missing.add(o)}):[]}function sn(e,t,o){try{if(typeof o.body=="string")return e.icons[t]={...o},!0}catch{}return!1}const Re=/^[a-z0-9]+(-[a-z0-9]+)*$/,ce=(e,t,o,r="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),a=n.pop(),u={provider:n.length>0?n[0]:r,prefix:a,name:c};return t&&!re(u)?null:u}const i=n[0],s=i.split("-");if(s.length>1){const c={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!re(c)?null:c}if(o&&r===""){const c={provider:r,prefix:"",name:i};return t&&!re(c,o)?null:c}return null},re=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let ne=!1;function Le(e){return typeof e=="boolean"&&(ne=e),ne}function we(e){const t=typeof e=="string"?ce(e,!0,ne):e;if(t){const o=J(t.provider,t.prefix),r=t.name;return o.icons[r]||(o.missing.has(r)?null:void 0)}}function cn(e,t){const o=ce(e,!0,ne);if(!o)return!1;const r=J(o.provider,o.prefix);return t?sn(r,o.name,t):(r.missing.add(o.name),!0)}function an(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ne&&!t&&!e.prefix){let n=!1;return Ae(e)&&(e.prefix="",Pe(e,(i,s)=>{cn(i,s)&&(n=!0)})),n}const o=e.prefix;if(!re({prefix:o,name:"a"}))return!1;const r=J(t,o);return!!Fe(r,e)}const Be=Object.freeze({width:null,height:null}),ze=Object.freeze({...Be,...se}),ln=/(-?[0-9.]*[0-9]+[0-9.]*)/g,un=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Te(e,t,o){if(t===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*t*o)/o;if(typeof e!="string")return e;const r=e.split(ln);if(r===null||!r.length)return e;const n=[];let i=r.shift(),s=un.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?n.push(i):n.push(Math.ceil(c*t*o)/o)}else n.push(i);if(i=r.shift(),i===void 0)return n.join("");s=!s}}function fn(e,t="defs"){let o="";const r=e.indexOf("<"+t);for(;r>=0;){const n=e.indexOf(">",r),i=e.indexOf("</"+t);if(n===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;o+=e.slice(n+1,i).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:o,content:e}}function dn(e,t){return e?"<defs>"+e+"</defs>"+t:t}function pn(e,t,o){const r=fn(e);return dn(r.defs,t+r.content+o)}const hn=e=>e==="unset"||e==="undefined"||e==="none";function mn(e,t){const o={...be,...e},r={...ze,...t},n={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,r].forEach(y=>{const p=[],h=y.hFlip,T=y.vFlip;let v=y.rotate;h?T?v+=2:(p.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),p.push("scale(-1 1)"),n.top=n.left=0):T&&(p.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),p.push("scale(1 -1)"),n.top=n.left=0);let j;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:j=n.height/2+n.top,p.unshift("rotate(90 "+j.toString()+" "+j.toString()+")");break;case 2:p.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:j=n.width/2+n.left,p.unshift("rotate(-90 "+j.toString()+" "+j.toString()+")");break}v%2===1&&(n.left!==n.top&&(j=n.left,n.left=n.top,n.top=j),n.width!==n.height&&(j=n.width,n.width=n.height,n.height=j)),p.length&&(i=pn(i,'<g transform="'+p.join(" ")+'">',"</g>"))});const s=r.width,c=r.height,a=n.width,u=n.height;let f,d;s===null?(d=c===null?"1em":c==="auto"?u:c,f=Te(d,a/u)):(f=s==="auto"?a:s,d=c===null?Te(f,u/a):c==="auto"?u:c);const g={},m=(y,p)=>{hn(p)||(g[y]=p.toString())};m("width",f),m("height",d);const x=[n.left,n.top,a,u];return g.viewBox=x.join(" "),{attributes:g,viewBox:x,body:i}}const gn=/\sid="(\S+)"/g,xn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let _n=0;function bn(e,t=xn){const o=[];let r;for(;r=gn.exec(e);)o.push(r[1]);if(!o.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(i=>{const s=typeof t=="function"?t(i):t+(_n++).toString(),c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const ge=Object.create(null);function yn(e,t){ge[e]=t}function xe(e){return ge[e]||ge[""]}function ye(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ve=Object.create(null),V=["https://api.simplesvg.com","https://api.unisvg.com"],ie=[];for(;V.length>0;)V.length===1||Math.random()>.5?ie.push(V.shift()):ie.push(V.pop());ve[""]=ye({resources:["https://api.iconify.design"].concat(ie)});function vn(e,t){const o=ye(t);return o===null?!1:(ve[e]=o,!0)}function je(e){return ve[e]}const jn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ee=jn();function In(e,t){const o=je(e);if(!o)return 0;let r;if(!o.maxURL)r=0;else{let n=0;o.resources.forEach(s=>{n=Math.max(n,s.length)});const i=t+".json?icons=";r=o.maxURL-n-o.path.length-i.length}return r}function $n(e){return e===404}const wn=(e,t,o)=>{const r=[],n=In(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},c=0;return o.forEach((a,u)=>{c+=a.length+1,c>=n&&u>0&&(r.push(s),s={type:i,provider:e,prefix:t,icons:[]},c=a.length),s.icons.push(a)}),r.push(s),r};function Tn(e){if(typeof e=="string"){const t=je(e);if(t)return t.path}return"/"}const En=(e,t,o)=>{if(!Ee){o("abort",424);return}let r=Tn(t.provider);switch(t.type){case"icons":{const i=t.prefix,c=t.icons.join(","),a=new URLSearchParams({icons:c});r+=i+".json?"+a.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:o("abort",400);return}let n=503;Ee(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{o($n(s)?"abort":"next",s)});return}return n=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?o("abort",i):o("next",n)});return}setTimeout(()=>{o("success",i)})}).catch(()=>{o("next",n)})},Nn={prepare:wn,send:En};function Ge(e,t){e.forEach(o=>{const r=o.loaderCallbacks;r&&(o.loaderCallbacks=r.filter(n=>n.id!==t))})}function Sn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let o=!1;const r=e.provider,n=e.prefix;t.forEach(i=>{const s=i.icons,c=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==n)return!0;const u=a.name;if(e.icons[u])s.loaded.push({provider:r,prefix:n,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:n,name:u});else return o=!0,!0;return!1}),s.pending.length!==c&&(o||Ge([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let kn=0;function Cn(e,t,o){const r=kn++,n=Ge.bind(null,o,r);if(!t.pending.length)return n;const i={id:r,icons:t,callback:e,abort:n};return o.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),n}function Dn(e){const t={loaded:[],missing:[],pending:[]},o=Object.create(null);e.sort((n,i)=>n.provider!==i.provider?n.provider.localeCompare(i.provider):n.prefix!==i.prefix?n.prefix.localeCompare(i.prefix):n.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(n=>{if(r.name===n.name&&r.prefix===n.prefix&&r.provider===n.provider)return;r=n;const i=n.provider,s=n.prefix,c=n.name,a=o[i]||(o[i]=Object.create(null)),u=a[s]||(a[s]=J(i,s));let f;c in u.icons?f=t.loaded:s===""||u.missing.has(c)?f=t.missing:f=t.pending;const d={provider:i,prefix:s,name:c};f.push(d)}),t}function On(e,t=!0,o=!1){const r=[];return e.forEach(n=>{const i=typeof n=="string"?ce(n,t,o):n;i&&r.push(i)}),r}const Mn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Pn(e,t,o,r){const n=e.resources.length,i=e.random?Math.floor(Math.random()*n):e.index;let s;if(e.random){let _=e.resources.slice(0);for(s=[];_.length>1;){const I=Math.floor(Math.random()*_.length);s.push(_[I]),_=_.slice(0,I).concat(_.slice(I+1))}s=s.concat(_)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let a="pending",u=0,f,d=null,g=[],m=[];typeof r=="function"&&m.push(r);function x(){d&&(clearTimeout(d),d=null)}function y(){a==="pending"&&(a="aborted"),x(),g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function p(_,I){I&&(m=[]),typeof _=="function"&&m.push(_)}function h(){return{startTime:c,payload:t,status:a,queriesSent:u,queriesPending:g.length,subscribe:p,abort:y}}function T(){a="failed",m.forEach(_=>{_(void 0,f)})}function v(){g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function j(_,I,$){const S=I!=="success";switch(g=g.filter(k=>k!==_),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){f=$,T();return}if(S){f=$,g.length||(s.length?N():T());return}if(x(),v(),!e.random){const k=e.resources.indexOf(_.resource);k!==-1&&k!==e.index&&(e.index=k)}a="completed",m.forEach(k=>{k($)})}function N(){if(a!=="pending")return;x();const _=s.shift();if(_===void 0){if(g.length){d=setTimeout(()=>{x(),a==="pending"&&(v(),T())},e.timeout);return}T();return}const I={status:"pending",resource:_,callback:($,S)=>{j(I,$,S)}};g.push(I),u++,d=setTimeout(N,e.rotate),o(_,t,I.callback)}return setTimeout(N),h}function qe(e){const t={...Mn,...e};let o=[];function r(){o=o.filter(c=>c().status==="pending")}function n(c,a,u){const f=Pn(t,c,a,(d,g)=>{r(),u&&u(d,g)});return o.push(f),f}function i(c){return o.find(a=>c(a))||null}return{query:n,find:i,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Ne(){}const pe=Object.create(null);function An(e){if(!pe[e]){const t=je(e);if(!t)return;const o=qe(t),r={config:t,redundancy:o};pe[e]=r}return pe[e]}function Fn(e,t,o){let r,n;if(typeof e=="string"){const i=xe(e);if(!i)return o(void 0,424),Ne;n=i.send;const s=An(e);s&&(r=s.redundancy)}else{const i=ye(e);if(i){r=qe(i);const s=e.resources?e.resources[0]:"",c=xe(s);c&&(n=c.send)}}return!r||!n?(o(void 0,424),Ne):r.query(t,n,o)().abort}function Se(){}function Rn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Sn(e)}))}function Ln(e){const t=[],o=[];return e.forEach(r=>{(r.match(Re)?t:o).push(r)}),{valid:t,invalid:o}}function K(e,t,o){function r(){const n=e.pendingIcons;t.forEach(i=>{n&&n.delete(i),e.icons[i]||e.missing.add(i)})}if(o&&typeof o=="object")try{if(!Fe(e,o).length){r();return}}catch(n){console.error(n)}r(),Rn(e)}function ke(e,t){e instanceof Promise?e.then(o=>{t(o)}).catch(()=>{t(null)}):t(e)}function Bn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:r}=e,n=e.iconsToLoad;if(delete e.iconsToLoad,!n||!n.length)return;const i=e.loadIcon;if(e.loadIcons&&(n.length>1||!i)){ke(e.loadIcons(n,r,o),f=>{K(e,n,f)});return}if(i){n.forEach(f=>{const d=i(f,r,o);ke(d,g=>{const m=g?{prefix:r,icons:{[f]:g}}:null;K(e,[f],m)})});return}const{valid:s,invalid:c}=Ln(n);if(c.length&&K(e,c,null),!s.length)return;const a=r.match(Re)?xe(o):null;if(!a){K(e,s,null);return}a.prepare(o,r,s).forEach(f=>{Fn(o,f,d=>{K(e,f.icons,d)})})}))}const zn=(e,t)=>{const o=On(e,!0,Le()),r=Dn(o);if(!r.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(r.loaded,r.missing,r.pending,Se)}),()=>{a=!1}}const n=Object.create(null),i=[];let s,c;return r.pending.forEach(a=>{const{provider:u,prefix:f}=a;if(f===c&&u===s)return;s=u,c=f,i.push(J(u,f));const d=n[u]||(n[u]=Object.create(null));d[f]||(d[f]=[])}),r.pending.forEach(a=>{const{provider:u,prefix:f,name:d}=a,g=J(u,f),m=g.pendingIcons||(g.pendingIcons=new Set);m.has(d)||(m.add(d),n[u][f].push(d))}),i.forEach(a=>{const u=n[a.provider][a.prefix];u.length&&Bn(a,u)}),t?Cn(t,r,i):Se};function Gn(e,t){const o={...e};for(const r in t){const n=t[r],i=typeof n;r in Be?(n===null||n&&(i==="string"||i==="number"))&&(o[r]=n):i===typeof o[r]&&(o[r]=r==="rotate"?n%4:n)}return o}const qn=/[\s,]+/;function Un(e,t){t.split(qn).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Yn(e,t=0){const o=e.replace(/^-?[0-9.]*/,"");function r(n){for(;n<0;)n+=4;return n%4}if(o===""){const n=parseInt(e);return isNaN(n)?0:r(n)}else if(o!==e){let n=0;switch(o){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-o.length));return isNaN(i)?0:(i=i/n,i%1===0?r(i):0)}}return t}function Qn(e,t){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)o+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}function Hn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Wn(e){return"data:image/svg+xml,"+Hn(e)}function Jn(e){return'url("'+Wn(e)+'")'}let ee;function Zn(){try{ee=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ee=null}}function Xn(e){return ee===void 0&&Zn(),ee?ee.createHTML(e):e}const Ue={...ze,inline:!1},Vn={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Kn={display:"inline-block"},_e={backgroundColor:"currentColor"},Ye={backgroundColor:"transparent"},Ce={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},De={WebkitMask:_e,mask:_e,background:Ye};for(const e in De){const t=De[e];for(const o in Ce)t[e+o]=Ce[o]}const et={...Ue,inline:!0};function Oe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const nt=(e,t,o)=>{const r=t.inline?et:Ue,n=Gn(r,t),i=t.mode||"svg",s={},c=t.style||{},a={...i==="svg"?Vn:{}};if(o){const p=ce(o,!1,!0);if(p){const h=["iconify"],T=["provider","prefix"];for(const v of T)p[v]&&h.push("iconify--"+p[v]);a.className=h.join(" ")}}for(let p in t){const h=t[p];if(h!==void 0)switch(p){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":a.ref=h;break;case"className":a[p]=(a[p]?a[p]+" ":"")+h;break;case"inline":case"hFlip":case"vFlip":n[p]=h===!0||h==="true"||h===1;break;case"flip":typeof h=="string"&&Un(n,h);break;case"color":s.color=h;break;case"rotate":typeof h=="string"?n[p]=Yn(h):typeof h=="number"&&(n[p]=h);break;case"ariaHidden":case"aria-hidden":h!==!0&&h!=="true"&&delete a["aria-hidden"];break;default:r[p]===void 0&&(a[p]=h)}}const u=mn(e,n),f=u.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),i==="svg"){a.style={...s,...c},Object.assign(a,f);let p=0,h=t.id;return typeof h=="string"&&(h=h.replace(/-/g,"_")),a.dangerouslySetInnerHTML={__html:Xn(bn(u.body,h?()=>h+"ID"+p++:"iconifyReact"))},b.createElement("svg",a)}const{body:d,width:g,height:m}=e,x=i==="mask"||(i==="bg"?!1:d.indexOf("currentColor")!==-1),y=Qn(d,{...f,width:g+"",height:m+""});return a.style={...s,"--svg":Jn(y),width:Oe(f.width),height:Oe(f.height),...Kn,...x?_e:Ye,...c},b.createElement("span",a)};Le(!0);yn("",Nn);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!an(r))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let o in t){const r="IconifyProviders["+o+"] is invalid.";try{const n=t[o];if(typeof n!="object"||!n||n.resources===void 0)continue;vn(o,n)||console.error(r)}catch{console.error(r)}}}}function Qe(e){const[t,o]=b.useState(!!e.ssr),[r,n]=b.useState({});function i(m){if(m){const x=e.icon;if(typeof x=="object")return{name:"",data:x};const y=we(x);if(y)return{name:x,data:y}}return{name:""}}const[s,c]=b.useState(i(!!e.ssr));function a(){const m=r.callback;m&&(m(),n({}))}function u(m){if(JSON.stringify(s)!==JSON.stringify(m))return a(),c(m),!0}function f(){var m;const x=e.icon;if(typeof x=="object"){u({name:"",data:x});return}const y=we(x);if(u({name:x,data:y}))if(y===void 0){const p=zn([x],f);n({callback:p})}else y&&((m=e.onLoad)===null||m===void 0||m.call(e,x))}b.useEffect(()=>(o(!0),a),[]),b.useEffect(()=>{t&&f()},[e.icon,t]);const{name:d,data:g}=s;return g?nt({...be,...g},e,d):e.children?e.children:e.fallback?e.fallback:b.createElement("span",{})}const D=b.forwardRef((e,t)=>Qe({...e,_ref:t}));b.forwardRef((e,t)=>Qe({inline:!0,...e,_ref:t}));const tt="_container_j1lh3_26",ot="_title_j1lh3_46",rt="_containerInputError_j1lh3_50",it="_containerInput_j1lh3_50",st="_inputElement_j1lh3_69",ct="_errorMessage_j1lh3_80",at="_icon_j1lh3_92",lt="_containerCustomIcon_j1lh3_99",A={container:tt,title:ot,containerInputError:rt,containerInput:it,inputElement:st,errorMessage:ct,icon:at,containerCustomIcon:lt},te=e=>{switch(e){case"none":return 0;case"sm":return 5;case"md":return 10;case"lg":return 15;case"full":return 9999;default:return 0}},ut=b.forwardRef(function({placeholder:t,value:o,setValue:r,label:n,typeInput:i,HorV:s,errorMessage:c,rounded:a,width:u,height:f,border:d,shadow:g,textSize:m,textColor:x,bgColor:y,customContainerClass:p,customInputClass:h,customIconRClass:T,customIconLClass:v,seeIconLeft:j=!0,seeIconRight:N,iconColorL:_,iconColorR:I,iconColorPass:$,iconSizeL:S,iconSizeR:k,iconSizePass:P,iconLeft:R,iconRight:L,customIconLeft:B,customIconRight:U,args:H},W){const[z,O]=b.useState(!1),G=b.useMemo(()=>te(a??"full"),[a]);return l.jsxs("div",{className:A.container,style:{flexDirection:s==="horizontal"?"row":"column"},children:[l.jsx("label",{className:A.title,style:{fontSize:m,color:x,height:s==="horizontal"?35:"auto",display:s==="horizontal"?"flex":"block",alignItems:s==="horizontal"?"center":"initial",marginRight:s==="horizontal"?10:0,marginBottom:s==="vertical"?5:0},children:n}),l.jsxs("div",{className:A.containerInputError,children:[l.jsxs("div",{className:`${A.containerInput} ${p}`,style:{borderRadius:G,width:!u&&i==="datetime-local"?"auto":u,height:f,border:d||d===void 0?"":"none",boxShadow:g?"0 0 5px #00000075":"",backgroundColor:y},children:[B?l.jsx("div",{className:`${A.containerCustomIcon} ${v}`,children:B}):j&&l.jsx(D,{icon:R??"mi:user",className:`${A.icon} ${v}`,style:{color:_,fontSize:S}}),l.jsx("input",{ref:W,className:`${A.inputElement} ${h}`,style:{fontSize:m,color:x},type:i==="password"&&z?"text":i,placeholder:t,value:o,onChange:Y=>r?.(Y.target.value),...H}),i==="password"&&l.jsx(D,{onClick:()=>O(!z),icon:z?"fluent:eye-20-filled":"fluent:eye-hide-20-filled",className:`${A.icon}`,style:{color:$,fontSize:P,marginRight:10}}),U?l.jsx("div",{className:`${A.containerCustomIcon} ${T}`,children:U}):N&&l.jsx(D,{icon:L??"mi:user",className:`${A.icon} ${T}`,style:{color:I,fontSize:k}})]}),c!==""&&l.jsx("p",{className:A.errorMessage,children:c})]})]})}),ft="_container_5daeb_26",dt="_containerInputError_5daeb_50",pt="_containerInput_5daeb_50",ht="_inputElement_5daeb_69",mt="_errorMessage_5daeb_80",gt="_icon_5daeb_92",xt="_containerCustomIcon_5daeb_99",Q={container:ft,containerInputError:dt,containerInput:pt,inputElement:ht,errorMessage:mt,icon:gt,containerCustomIcon:xt},_t=b.forwardRef(function({label:t,value:o,errorMessage:r,textSize:n,textColor:i,setValue:s,useLinkable:c,link:a,iconSize:u,seeIcon:f,icon:d,iconColor:g,customInputClass:m,customLabelClass:x,customIconClass:y,customIcon:p,args:h},T){const v=b.useId();return l.jsx("div",{ref:T,className:Q.container,children:l.jsxs("div",{className:Q.containerInputError,children:[l.jsxs("div",{className:Q.containerInput,children:[l.jsx("input",{className:`${Q.inputElement} ${m}`,style:{fontSize:n,color:i},type:"checkbox",checked:o,onChange:j=>s(j.target.checked),...h}),p?l.jsx("div",{className:`${Q.containerCustomIcon} ${y}`,children:p}):f&&l.jsx(D,{icon:d??"mi:user",className:`${Q.icon} ${y}`,style:{color:g,fontSize:u}}),c?l.jsx("a",{className:x,href:a||"#",style:{fontSize:n,color:i,textDecoration:"underline"},children:t}):l.jsx("label",{htmlFor:v,className:x,style:{fontSize:n,color:i},children:t})]}),r!==""&&l.jsx("p",{className:Q.errorMessage,children:r})]})})}),bt="_container_v1dbe_26",yt="_containerInputError_v1dbe_51",vt="_containerInput_v1dbe_51",jt="_errorMessage_v1dbe_81",It="_icon_v1dbe_93",$t="_containerCustomIcon_v1dbe_100",wt="_containerInputAndOptions_v1dbe_100",Tt="_containerOptions_v1dbe_100",Et="_optionElement_v1dbe_100",Nt="_containerIconOption_v1dbe_100",St="_containerLabel_v1dbe_112",kt="_textOption_v1dbe_142",Ct="_iconArrow_v1dbe_150",E={container:bt,containerInputError:yt,containerInput:vt,errorMessage:jt,icon:It,containerCustomIcon:$t,containerInputAndOptions:wt,containerOptions:Tt,optionElement:Et,containerIconOption:Nt,containerLabel:St,textOption:kt,iconArrow:Ct},He=(e,t)=>{b.useEffect(()=>{const o=r=>{const n=e.current;!n||n.contains(r.target)||t(r)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t])},Dt=b.forwardRef(function({label:t,value:o,setValue:r,options:n,placeholder:i,errorMessage:s,orientation:c="bottom",iconInRight:a=!1,rounded:u,border:f=!0,textSize:d="1.4em",textColor:g="#000",labelSize:m="1.4em",labelColor:x="#000",width:y=250,height:p=40,bgColor:h,shadow:T=!1,icon:v,iconSize:j=20,iconsOptionsSize:N=20,seeIcon:_=!1,seeOptionsIcons:I=!1,iconsColor:$="#000",customIcon:S,customContainerClass:k,customInputClass:P,customLabelClass:R,customIconClass:L,customOptionClass:B},U){const[H,W]=b.useState(null),[z,O]=b.useState(!1),G=b.useRef(null),Y={valueOption:null,text:i??"Selecciona una opción",icon:"hugeicons:cursor-magic-selection-04"};He(G,()=>{O(!1)}),b.useEffect(()=>{let C=[Y,...n];W(C)},[]);const Z=b.useMemo(()=>te(u??"lg"),[u]);return l.jsxs("div",{ref:U,className:`${E.container} ${k}`,children:[l.jsxs("div",{className:E.containerLabel,style:{flexDirection:a?"row-reverse":"row",justifyContent:a?"flex-end":"flex-start"},children:[S?l.jsx("div",{className:`${E.containerCustomIcon} ${L}`,style:{height:j},children:S}):_&&l.jsx(D,{icon:v??"icon-park-outline:dot",className:`${E.icon} ${L}`,style:{color:$,fontSize:j}}),l.jsx("label",{className:R,style:{fontSize:m,color:x},children:t})]}),l.jsxs("div",{className:E.containerInputError,children:[l.jsxs("div",{ref:G,className:E.containerInputAndOptions,children:[l.jsxs("div",{onClick:C=>{C.stopPropagation(),O(!z)},className:`${E.containerInput} ${P}`,style:{width:y,height:p,border:f?"":"none",boxShadow:T?"0 0 10px #00000050":"",borderRadius:Z,backgroundColor:h},children:[I&&o?.valueOption&&l.jsx(l.Fragment,{children:o?.customIcon?l.jsx("div",{className:E.containerCustomIcon,children:o?.customIcon}):o?.icon&&l.jsx(D,{icon:o.icon,className:E.icon,style:{color:o.iconColor?o.iconColor:$,fontSize:N}})}),l.jsx("p",{className:E.textOption,style:{fontSize:m,color:x,fontWeight:o?.valueOption?"bold":""},children:o?.text?o.text:Y.text}),l.jsx(D,{icon:"ri:arrow-down-s-line",className:`${E.icon} ${E.iconArrow}`})]}),z&&l.jsx("div",{className:E.containerOptions,style:{top:c==="bottom"?"calc(100% + 10px)":c==="left"||c==="right"?0:"",left:c==="right"?"calc(100% + 10px)":c==="top"||c==="bottom"?0:"",bottom:c==="top"?"calc(100% + 10px)":"",right:c==="left"?"calc(100% + 10px)":""},children:H?.map((C,le)=>l.jsxs("div",{onClick:X=>{X.stopPropagation(),O(!1),r(C)},className:`${E.optionElement} ${B}`,children:[I&&l.jsx("div",{className:`${E.containerIconOption}`,children:C.customIcon?C.customIcon:I&&l.jsx(D,{icon:C.icon??"icon-park-outline:dot",className:`${E.icon} ${E.containerIconOption}`,style:{color:C.iconColor?C.iconColor:$,fontSize:N}})}),l.jsx("p",{className:E.textOption,style:{fontSize:d,color:g},children:C.text?C.text:Y.text})]},le))})]}),s!==""&&l.jsx("p",{className:E.errorMessage,children:s})]})]})}),Ot="_container_1nag4_26",Mt="_containerInputError_1nag4_50",Pt="_errorMessage_1nag4_80",At="_icon_1nag4_92",Ft="_containerCustomIcon_1nag4_99",Rt="_containerInputFile_1nag4_114",Lt="_containerSelectedFile_1nag4_114",Bt="_textInput_1nag4_132",zt="_inputFile_1nag4_142",Gt="_fileName_1nag4_158",qt="_backdrop_1nag4_175",M={container:Ot,containerInputError:Mt,errorMessage:Pt,icon:At,containerCustomIcon:Ft,containerInputFile:Rt,containerSelectedFile:Lt,textInput:Bt,inputFile:zt,fileName:Gt,backdrop:qt},he={images:{common:"image/png, image/jpeg, image/gif, image/webp",png:"image/png",jpg:"image/jpeg, image/jpg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",ico:"image/x-icon, image/vnd.microsoft.icon",tiff:"image/tiff",bmp:"image/bmp",heic:"image/heic, image/heif"},docs:{pdf:"application/pdf",word:".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document",excel:".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",powerpoint:".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",odp:"application/vnd.oasis.opendocument.presentation",txt:"text/plain",rtf:"application/rtf",csv:"text/csv",markdown:"text/markdown, .md",epub:"application/epub+zip"},archives:{zip:"application/zip, application/x-zip-compressed",rar:"application/x-rar-compressed, .rar",sevenZ:"application/x-7z-compressed",tar:"application/x-tar",gz:"application/gzip",iso:"application/x-iso9660-image, .iso"},media:{audio:"audio/*",video:"video/*",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg, video/ogg",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo"},fonts:{woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf, application/x-font-ttf",otf:"font/otf, application/x-font-opentype",eot:"application/vnd.ms-fontobject"},code:{html:"text/html",css:"text/css",js:"text/javascript, application/javascript, .mjs",ts:"application/typescript, .ts, .tsx",json:"application/json",xml:"application/xml, text/xml",python:"text/x-python, .py",java:"text/x-java-source, .java, application/java-archive, .jar",csharp:"text/plain, .cs",cpp:"text/x-c++, .cpp, .h, .hpp",c:"text/x-c, .c",php:"application/x-httpd-php, .php",sql:"application/sql, .sql",sh:"application/x-sh, .sh",yaml:"text/yaml, .yaml, .yml"}},We=e=>{if(Array.isArray(e))return e.map(o=>We(o)).filter(o=>o!==void 0).join(", ");if(e!=="*"){if(typeof e=="string"){if(e in he){const t=he[e];return Object.values(t).join(", ")}return}if(typeof e=="object"){const t=[];return Object.keys(e).forEach(o=>{const r=e[o],n=he[o];r&&n&&r.forEach(i=>{const s=n[i];s&&t.push(s)})}),t.join(", ")}}},Ut="_btnThemeDark_1hn8j_26",Yt="_iconButton_1hn8j_58",Qt="_containerCustomIcon_1hn8j_65",Ht="_btnBorderedThemeDark_1hn8j_78",Wt="_btnThemeGreen_1hn8j_98",Jt="_btnBorderedThemeGreen_1hn8j_150",Zt="_btnThemeBlue_1hn8j_170",Xt="_btnBorderedThemeBlue_1hn8j_222",Vt="_btnThemeRed_1hn8j_242",Kt="_btnBorderedThemeRed_1hn8j_294",eo="_btnThemePurple_1hn8j_314",no="_btnBorderedThemePurple_1hn8j_366",to="_btnThemeGray_1hn8j_386",oo="_btnBorderedThemeGray_1hn8j_438",ro="_btnThemeLight_1hn8j_458",io="_btnBorderedThemeLight_1hn8j_510",so="_btnThemeYellow_1hn8j_530",co="_btnBorderedThemeYellow_1hn8j_582",oe={btnThemeDark:Ut,iconButton:Yt,containerCustomIcon:Qt,btnBorderedThemeDark:Ht,btnThemeGreen:Wt,btnBorderedThemeGreen:Jt,btnThemeBlue:Zt,btnBorderedThemeBlue:Xt,btnThemeRed:Vt,btnBorderedThemeRed:Kt,btnThemePurple:eo,btnBorderedThemePurple:no,btnThemeGray:to,btnBorderedThemeGray:oo,btnThemeLight:ro,btnBorderedThemeLight:io,btnThemeYellow:so,btnBorderedThemeYellow:co},Je=b.forwardRef(function({label:t="Texto del Botón",action:o=()=>{alert("Botón presionado")},font:r,width:n,height:i,icon:s="tabler:send",seeIcon:c=!0,textSize:a,iconColor:u,iconSize:f,styleType:d="ThemeDark",rounded:g="md",borderedStyle:m=!1,iconOn:x,padding:y,shadow:p=!1,colorShadow:h,customClassButton:T,customClassLabel:v,customClassIcon:j,customIcon:N,args:_},I){const $=b.useMemo(()=>te(g??"full"),[g]);return l.jsxs("button",{ref:I,className:`${oe[`btn${d}`]} ${m&&oe[`btnBordered${d}`]} ${T}`,style:{borderRadius:$,width:n??"auto",height:i??"auto",flexDirection:x==="left"?"row-reverse":"row",boxShadow:`${p?"0 0 7px "+(h||"#000"):""}`,padding:y},onClick:S=>{S.preventDefault(),o()},..._,children:[t&&l.jsx("p",{className:`${v}`,style:{fontSize:a,fontFamily:r},children:t}),N?l.jsx("div",{className:`${oe.containerCustomIcon} ${j}`,children:N}):c&&l.jsx(D,{icon:s,className:`${oe.iconButton} ${j}`,style:{fontSize:f,color:u}})]})}),ao=b.forwardRef(function({label:t,errorMessage:o,acceptFiles:r="*",selectedFileE:n,setSelectedFileE:i,maxMBSize:s,shadow:c=!0,textButtonCancel:a="Cancelar",width:u,height:f,bgColor:d,bgColorHover:g,labelSize:m,labelColor:x,rounded:y="md",iconSize:p=30,seeIcon:h=!0,icon:T,iconColor:v="#fff",customFIleClass:j,customSelectedClass:N,customLabelClass:_,customIconClass:I,customIcon:$,args:S},k){const P=b.useId(),R=b.useRef(0),[L,B]=b.useState(n),[U,H]=b.useState(!1),[W,z]=b.useState(null),[O,G]=b.useState(!1),Y=We(r),Z=()=>{B(null),i(null)},C=w=>{if(z(null),s){const Ke=s*1024*1024;if(w.size>Ke){z(`El archivo excede el límite de ${s} MB.`),Z();return}}B(w),i(w)},le=w=>{w.preventDefault(),w.target.files&&w.target.files[0]?C(w.target.files[0]):Z()},X=w=>{w.preventDefault(),w.stopPropagation(),R.current+=1,w.type==="dragenter"||w.type==="dragover"?G(!0):w.type==="dragleave"&&G(!1)},ue=w=>{w.preventDefault(),w.stopPropagation(),R.current-=1,R.current===0&&G(!1)},Ve=w=>{w.preventDefault(),w.stopPropagation(),G(!1),R.current=0,w.dataTransfer.files&&w.dataTransfer.files[0]&&C(w.dataTransfer.files[0])},fe=b.useMemo(()=>te(y??"lg"),[y]);return l.jsx("div",{className:M.container,children:l.jsxs("div",{className:M.containerInputError,children:[L?l.jsxs("div",{className:`${M.containerSelectedFile} ${N}`,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:fe,width:u,height:f},children:[h&&l.jsx(D,{icon:"uim:paperclip",className:M.icon}),l.jsx("p",{className:M.fileName,children:L?.name}),l.jsx("div",{className:M.backdrop,style:{borderRadius:fe},children:l.jsx(Je,{styleType:"ThemeRed",action:Z,label:a,rounded:"full",icon:"fa:trash",iconSize:"1.4rem",iconColor:"#fff",textSize:12,padding:"7px"})})]}):l.jsxs("label",{htmlFor:P,className:`${M.containerInputFile} ${j}`,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),onDragEnter:X,onDragLeave:ue,onDragOver:w=>w.preventDefault(),onDrop:Ve,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:fe,backgroundColor:O?"#fff":U?g:d,borderColor:O?d||"#6936ee":"",width:u,height:f},children:[!$||O?h&&l.jsx(D,{icon:O?"tabler:drag-drop":T??"mingcute:upload-3-fill",className:`${M.icon} ${I}`,onDragEnter:X,onDragLeave:ue,style:{color:O?d||"#6936ee":v,fontSize:p}}):l.jsx("div",{className:`${M.containerCustomIcon} ${I}`,style:{height:p??"2rem"},children:$}),l.jsx("span",{className:`${M.textInput} ${_}`,style:{fontSize:m,color:O?d||"#6936ee":x},onDragEnter:X,onDragLeave:ue,children:O?"Suelta para agregar":t??"Click o arrastra un archivo"}),l.jsx("input",{ref:k,id:P,type:"file",accept:Y,className:M.inputFile,onChange:le,...S})]}),l.jsx("p",{className:M.errorMessage,children:W||o||""})]})})}),lo="_container_sbkx2_26",uo="_containerInputError_sbkx2_50",fo="_inputElement_sbkx2_69",po="_errorMessage_sbkx2_80",ho="_icon_sbkx2_92",mo="_containerCustomIcon_sbkx2_99",go="_containerLabel_sbkx2_111",xo="_containerGroupRadio_sbkx2_127",_o="_containerRadio_sbkx2_134",F={container:lo,containerInputError:uo,inputElement:fo,errorMessage:po,icon:ho,containerCustomIcon:mo,containerLabel:go,containerGroupRadio:xo,containerRadio:_o},bo=b.forwardRef(function({label:t,labelSize:o,labelColor:r,options:n,errorMessage:i,textSize:s,textColor:c,setValue:a,name:u,HorV:f="horizontal",icon:d,iconInRight:g,iconSize:m,iconColor:x,customIcon:y,seeIcon:p=!0,customInputClass:h,customLabelClass:T,customTextClass:v,customIconLabelClass:j,customContainerRadiosClass:N},_){const I=b.useId();return l.jsxs("div",{ref:_,className:F.container,children:[l.jsxs("div",{className:F.containerLabel,style:{flexDirection:g?"row-reverse":"row",justifyContent:g?"flex-end":"flex-start"},children:[y?l.jsx("div",{className:`${F.containerCustomIcon} ${j}`,style:{height:m},children:y}):p&&l.jsx(D,{icon:d??"mi:user",className:`${F.icon} ${j}`,style:{color:x,fontSize:m}}),l.jsx("label",{style:{fontSize:o,color:r},className:v,children:t})]}),l.jsxs("div",{className:F.containerInputError,children:[l.jsx("div",{className:`${F.containerGroupRadio} ${N}`,style:{flexDirection:f==="vertical"?"column":"row",alignItems:f==="vertical"?"stretch":"center",justifyContent:f==="vertical"?"center":"flex-start"},children:n.map(($,S)=>{const k=`${I}-${S}`;return l.jsxs("div",{className:F.containerRadio,children:[l.jsx("input",{id:k,className:`${F.inputElement} ${h}`,style:{fontSize:s,color:c},type:"radio",name:u,value:$.value,onChange:P=>a(P.target.value)}),$.customIcon?l.jsx("div",{className:`${F.containerCustomIcon} ${$.customIconClass}`,children:$.customIcon}):$.seeIcon&&l.jsx(D,{icon:$.icon??"mi:user",className:`${F.icon} ${$.customIconClass}`,style:{color:$.iconColor,fontSize:m}}),l.jsx("label",{htmlFor:k,className:T,style:{fontSize:s,color:c},children:$.label})]},I+$.value)})}),i!==""&&l.jsx("p",{className:F.errorMessage,children:i})]})]})}),yo="_container_msjnc_26",vo="_containerInputError_msjnc_50",jo="_containerInput_msjnc_50",Io="_inputElement_msjnc_69",$o="_errorMessage_msjnc_80",wo="_icon_msjnc_92",To="_containerCustomIcon_msjnc_99",Eo="_containerLabel_msjnc_111",No="_counterCharacter_msjnc_142",q={container:yo,containerInputError:vo,containerInput:jo,inputElement:Io,errorMessage:$o,icon:wo,containerCustomIcon:To,containerLabel:Eo,counterCharacter:No},So=b.forwardRef(function({placeholder:t,value:o,setValue:r,label:n,errorMessage:i,seeMaxCharCounter:s=!0,maxCharacters:c=300,resize:a=!0,rounded:u,width:f=250,height:d=100,maxWidth:g=500,maxHeight:m=500,border:x,shadow:y,textSize:p,textColor:h,bgColor:T,customContainerClass:v,customTextAreaClass:j,customIconClass:N,seeIcon:_,iconInRight:I=!1,iconColor:$,iconSize:S,icon:k,customIcon:P,args:R},L){const B=b.useMemo(()=>te(u??"lg"),[u]);return l.jsxs("div",{className:q.container,children:[l.jsxs("div",{className:q.containerLabel,style:{flexDirection:I?"row-reverse":"row",justifyContent:I?"flex-end":"flex-start"},children:[P?l.jsx("div",{className:`${q.containerCustomIcon} ${N}`,style:{height:S},children:P}):_&&l.jsx(D,{icon:k??"mi:user",className:`${q.icon} ${N}`,style:{color:$,fontSize:S}}),l.jsx("label",{style:{fontSize:p,color:h},children:n})]}),l.jsxs("div",{className:q.containerInputError,children:[l.jsxs("div",{className:`${q.containerInput} ${v}`,style:{borderRadius:B,border:x||x===void 0?"":"none",boxShadow:y?"0 0 5px #00000075":"",backgroundColor:T,resize:a?"both":"none",width:f,height:d,minWidth:f,minHeight:d,maxWidth:g,maxHeight:m},children:[l.jsx("textarea",{ref:L,className:`${q.inputElement} ${j}`,style:{fontSize:p,color:h},placeholder:t,value:o,maxLength:c,onChange:U=>r?.(U.target.value),...R}),s&&l.jsxs("p",{className:q.counterCharacter,children:[o?o?.length:0,"/",c]})]}),i!==""&&l.jsx("p",{className:q.errorMessage,children:i})]})]})}),ko=["America/Mexico_City","America/New_York","America/Los_Angeles","America/Bogota","America/Argentina/Buenos_Aires","America/Sao_Paulo","Europe/Madrid","Europe/London","Europe/Paris","Asia/Tokyo","Asia/Shanghai","Australia/Sydney","UTC"],ae="America/Mexico_City";function Ze(e,t){return new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).formatToParts(e).reduce((r,n)=>(r[n.type]=n.value,r),{})}function Co(e){if(!e)return 0;let t;return typeof e=="string"?t=new Date(e):t=e,Math.floor(t.getTime()/1e3)}function Do(e,t=ae){if(!e)return"";const o=new Date(e*1e3),r=Ze(o,t);return`${r.year}-${r.month}-${r.day}`}function Xe(e,t=ae){if(!e)return"";const o=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"],r=new Date(e*1e3),n=Ze(r,t),i=parseInt(n.month,10)-1,s=o[i]||n.month,c=n.dayPeriod?n.dayPeriod.toUpperCase().replace(/\./g,""):"";return`${n.day}/${s}/${n.year} - ${n.hour}:${n.minute} ${c}`}function Oo(e,t=ae){if(!e)return"";const o=new Date(e*1e3),n=new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(o).reduce((i,s)=>(i[s.type]=s.value,i),{});return`${n.year}-${n.month}-${n.day} ${n.hour}:${n.minute}`}function Mo(e,t=ae){return Xe(e,t).split(" - ")[0]}exports.ButtonGal=Je;exports.CheckBoxGal=_t;exports.DropDownGal=Dt;exports.InputFileGal=ao;exports.InputRadioGal=bo;exports.InputTextGal=ut;exports.TIMEZONES=ko;exports.TextAreaGal=So;exports.convertToUnix=Co;exports.unixToDate=Do;exports.unixToDateTime=Oo;exports.unixToDateTimeString=Xe;exports.unixToStringYMD=Mo;exports.useOnClickOutside=He;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const l=require("react/jsx-runtime"),b=require("react");function en(e,t){const o=e.icons,r=e.aliases||Object.create(null),n=Object.create(null);function i(s){if(o[s])return n[s]=[];if(!(s in n)){n[s]=null;const c=r[s]&&r[s].parent,a=c&&i(c);a&&(n[s]=[c].concat(a))}return n[s]}return Object.keys(o).concat(Object.keys(r)).forEach(i),n}const Me=Object.freeze({left:0,top:0,width:16,height:16}),se=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),be=Object.freeze({...Me,...se}),me=Object.freeze({...be,body:"",hidden:!1});function nn(e,t){const o={};!e.hFlip!=!t.hFlip&&(o.hFlip=!0),!e.vFlip!=!t.vFlip&&(o.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(o.rotate=r),o}function Ie(e,t){const o=nn(e,t);for(const r in me)r in se?r in e&&!(r in o)&&(o[r]=se[r]):r in t?o[r]=t[r]:r in e&&(o[r]=e[r]);return o}function tn(e,t,o){const r=e.icons,n=e.aliases||Object.create(null);let i={};function s(c){i=Ie(r[c]||n[c],i)}return s(t),o.forEach(s),Ie(e,i)}function Pe(e,t){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(n=>{t(n,null),o.push(n)});const r=en(e);for(const n in r){const i=r[n];i&&(t(n,tn(e,n,i)),o.push(n))}return o}const on={provider:"",aliases:{},not_found:{},...Me};function de(e,t){for(const o in t)if(o in e&&typeof e[o]!=typeof t[o])return!1;return!0}function Ae(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!de(e,on))return null;const o=t.icons;for(const n in o){const i=o[n];if(!n||typeof i.body!="string"||!de(i,me))return null}const r=t.aliases||Object.create(null);for(const n in r){const i=r[n],s=i.parent;if(!n||typeof s!="string"||!o[s]&&!r[s]||!de(i,me))return null}return t}const $e=Object.create(null);function rn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function J(e,t){const o=$e[e]||($e[e]=Object.create(null));return o[t]||(o[t]=rn(e,t))}function Fe(e,t){return Ae(t)?Pe(t,(o,r)=>{r?e.icons[o]=r:e.missing.add(o)}):[]}function sn(e,t,o){try{if(typeof o.body=="string")return e.icons[t]={...o},!0}catch{}return!1}const Re=/^[a-z0-9]+(-[a-z0-9]+)*$/,ce=(e,t,o,r="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),a=n.pop(),u={provider:n.length>0?n[0]:r,prefix:a,name:c};return t&&!re(u)?null:u}const i=n[0],s=i.split("-");if(s.length>1){const c={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!re(c)?null:c}if(o&&r===""){const c={provider:r,prefix:"",name:i};return t&&!re(c,o)?null:c}return null},re=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let ne=!1;function Le(e){return typeof e=="boolean"&&(ne=e),ne}function we(e){const t=typeof e=="string"?ce(e,!0,ne):e;if(t){const o=J(t.provider,t.prefix),r=t.name;return o.icons[r]||(o.missing.has(r)?null:void 0)}}function cn(e,t){const o=ce(e,!0,ne);if(!o)return!1;const r=J(o.provider,o.prefix);return t?sn(r,o.name,t):(r.missing.add(o.name),!0)}function an(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ne&&!t&&!e.prefix){let n=!1;return Ae(e)&&(e.prefix="",Pe(e,(i,s)=>{cn(i,s)&&(n=!0)})),n}const o=e.prefix;if(!re({prefix:o,name:"a"}))return!1;const r=J(t,o);return!!Fe(r,e)}const Be=Object.freeze({width:null,height:null}),ze=Object.freeze({...Be,...se}),ln=/(-?[0-9.]*[0-9]+[0-9.]*)/g,un=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Te(e,t,o){if(t===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*t*o)/o;if(typeof e!="string")return e;const r=e.split(ln);if(r===null||!r.length)return e;const n=[];let i=r.shift(),s=un.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?n.push(i):n.push(Math.ceil(c*t*o)/o)}else n.push(i);if(i=r.shift(),i===void 0)return n.join("");s=!s}}function fn(e,t="defs"){let o="";const r=e.indexOf("<"+t);for(;r>=0;){const n=e.indexOf(">",r),i=e.indexOf("</"+t);if(n===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;o+=e.slice(n+1,i).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:o,content:e}}function dn(e,t){return e?"<defs>"+e+"</defs>"+t:t}function pn(e,t,o){const r=fn(e);return dn(r.defs,t+r.content+o)}const hn=e=>e==="unset"||e==="undefined"||e==="none";function mn(e,t){const o={...be,...e},r={...ze,...t},n={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,r].forEach(y=>{const p=[],h=y.hFlip,T=y.vFlip;let v=y.rotate;h?T?v+=2:(p.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),p.push("scale(-1 1)"),n.top=n.left=0):T&&(p.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),p.push("scale(1 -1)"),n.top=n.left=0);let j;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:j=n.height/2+n.top,p.unshift("rotate(90 "+j.toString()+" "+j.toString()+")");break;case 2:p.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:j=n.width/2+n.left,p.unshift("rotate(-90 "+j.toString()+" "+j.toString()+")");break}v%2===1&&(n.left!==n.top&&(j=n.left,n.left=n.top,n.top=j),n.width!==n.height&&(j=n.width,n.width=n.height,n.height=j)),p.length&&(i=pn(i,'<g transform="'+p.join(" ")+'">',"</g>"))});const s=r.width,c=r.height,a=n.width,u=n.height;let f,d;s===null?(d=c===null?"1em":c==="auto"?u:c,f=Te(d,a/u)):(f=s==="auto"?a:s,d=c===null?Te(f,u/a):c==="auto"?u:c);const g={},m=(y,p)=>{hn(p)||(g[y]=p.toString())};m("width",f),m("height",d);const x=[n.left,n.top,a,u];return g.viewBox=x.join(" "),{attributes:g,viewBox:x,body:i}}const gn=/\sid="(\S+)"/g,xn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let _n=0;function bn(e,t=xn){const o=[];let r;for(;r=gn.exec(e);)o.push(r[1]);if(!o.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(i=>{const s=typeof t=="function"?t(i):t+(_n++).toString(),c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const ge=Object.create(null);function yn(e,t){ge[e]=t}function xe(e){return ge[e]||ge[""]}function ye(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ve=Object.create(null),V=["https://api.simplesvg.com","https://api.unisvg.com"],ie=[];for(;V.length>0;)V.length===1||Math.random()>.5?ie.push(V.shift()):ie.push(V.pop());ve[""]=ye({resources:["https://api.iconify.design"].concat(ie)});function vn(e,t){const o=ye(t);return o===null?!1:(ve[e]=o,!0)}function je(e){return ve[e]}const jn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ee=jn();function In(e,t){const o=je(e);if(!o)return 0;let r;if(!o.maxURL)r=0;else{let n=0;o.resources.forEach(s=>{n=Math.max(n,s.length)});const i=t+".json?icons=";r=o.maxURL-n-o.path.length-i.length}return r}function $n(e){return e===404}const wn=(e,t,o)=>{const r=[],n=In(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},c=0;return o.forEach((a,u)=>{c+=a.length+1,c>=n&&u>0&&(r.push(s),s={type:i,provider:e,prefix:t,icons:[]},c=a.length),s.icons.push(a)}),r.push(s),r};function Tn(e){if(typeof e=="string"){const t=je(e);if(t)return t.path}return"/"}const En=(e,t,o)=>{if(!Ee){o("abort",424);return}let r=Tn(t.provider);switch(t.type){case"icons":{const i=t.prefix,c=t.icons.join(","),a=new URLSearchParams({icons:c});r+=i+".json?"+a.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:o("abort",400);return}let n=503;Ee(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{o($n(s)?"abort":"next",s)});return}return n=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?o("abort",i):o("next",n)});return}setTimeout(()=>{o("success",i)})}).catch(()=>{o("next",n)})},Nn={prepare:wn,send:En};function Ge(e,t){e.forEach(o=>{const r=o.loaderCallbacks;r&&(o.loaderCallbacks=r.filter(n=>n.id!==t))})}function Sn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let o=!1;const r=e.provider,n=e.prefix;t.forEach(i=>{const s=i.icons,c=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==n)return!0;const u=a.name;if(e.icons[u])s.loaded.push({provider:r,prefix:n,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:n,name:u});else return o=!0,!0;return!1}),s.pending.length!==c&&(o||Ge([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let kn=0;function Cn(e,t,o){const r=kn++,n=Ge.bind(null,o,r);if(!t.pending.length)return n;const i={id:r,icons:t,callback:e,abort:n};return o.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),n}function Dn(e){const t={loaded:[],missing:[],pending:[]},o=Object.create(null);e.sort((n,i)=>n.provider!==i.provider?n.provider.localeCompare(i.provider):n.prefix!==i.prefix?n.prefix.localeCompare(i.prefix):n.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(n=>{if(r.name===n.name&&r.prefix===n.prefix&&r.provider===n.provider)return;r=n;const i=n.provider,s=n.prefix,c=n.name,a=o[i]||(o[i]=Object.create(null)),u=a[s]||(a[s]=J(i,s));let f;c in u.icons?f=t.loaded:s===""||u.missing.has(c)?f=t.missing:f=t.pending;const d={provider:i,prefix:s,name:c};f.push(d)}),t}function On(e,t=!0,o=!1){const r=[];return e.forEach(n=>{const i=typeof n=="string"?ce(n,t,o):n;i&&r.push(i)}),r}const Mn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Pn(e,t,o,r){const n=e.resources.length,i=e.random?Math.floor(Math.random()*n):e.index;let s;if(e.random){let _=e.resources.slice(0);for(s=[];_.length>1;){const I=Math.floor(Math.random()*_.length);s.push(_[I]),_=_.slice(0,I).concat(_.slice(I+1))}s=s.concat(_)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let a="pending",u=0,f,d=null,g=[],m=[];typeof r=="function"&&m.push(r);function x(){d&&(clearTimeout(d),d=null)}function y(){a==="pending"&&(a="aborted"),x(),g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function p(_,I){I&&(m=[]),typeof _=="function"&&m.push(_)}function h(){return{startTime:c,payload:t,status:a,queriesSent:u,queriesPending:g.length,subscribe:p,abort:y}}function T(){a="failed",m.forEach(_=>{_(void 0,f)})}function v(){g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function j(_,I,$){const S=I!=="success";switch(g=g.filter(k=>k!==_),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){f=$,T();return}if(S){f=$,g.length||(s.length?N():T());return}if(x(),v(),!e.random){const k=e.resources.indexOf(_.resource);k!==-1&&k!==e.index&&(e.index=k)}a="completed",m.forEach(k=>{k($)})}function N(){if(a!=="pending")return;x();const _=s.shift();if(_===void 0){if(g.length){d=setTimeout(()=>{x(),a==="pending"&&(v(),T())},e.timeout);return}T();return}const I={status:"pending",resource:_,callback:($,S)=>{j(I,$,S)}};g.push(I),u++,d=setTimeout(N,e.rotate),o(_,t,I.callback)}return setTimeout(N),h}function qe(e){const t={...Mn,...e};let o=[];function r(){o=o.filter(c=>c().status==="pending")}function n(c,a,u){const f=Pn(t,c,a,(d,g)=>{r(),u&&u(d,g)});return o.push(f),f}function i(c){return o.find(a=>c(a))||null}return{query:n,find:i,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Ne(){}const pe=Object.create(null);function An(e){if(!pe[e]){const t=je(e);if(!t)return;const o=qe(t),r={config:t,redundancy:o};pe[e]=r}return pe[e]}function Fn(e,t,o){let r,n;if(typeof e=="string"){const i=xe(e);if(!i)return o(void 0,424),Ne;n=i.send;const s=An(e);s&&(r=s.redundancy)}else{const i=ye(e);if(i){r=qe(i);const s=e.resources?e.resources[0]:"",c=xe(s);c&&(n=c.send)}}return!r||!n?(o(void 0,424),Ne):r.query(t,n,o)().abort}function Se(){}function Rn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Sn(e)}))}function Ln(e){const t=[],o=[];return e.forEach(r=>{(r.match(Re)?t:o).push(r)}),{valid:t,invalid:o}}function K(e,t,o){function r(){const n=e.pendingIcons;t.forEach(i=>{n&&n.delete(i),e.icons[i]||e.missing.add(i)})}if(o&&typeof o=="object")try{if(!Fe(e,o).length){r();return}}catch(n){console.error(n)}r(),Rn(e)}function ke(e,t){e instanceof Promise?e.then(o=>{t(o)}).catch(()=>{t(null)}):t(e)}function Bn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:r}=e,n=e.iconsToLoad;if(delete e.iconsToLoad,!n||!n.length)return;const i=e.loadIcon;if(e.loadIcons&&(n.length>1||!i)){ke(e.loadIcons(n,r,o),f=>{K(e,n,f)});return}if(i){n.forEach(f=>{const d=i(f,r,o);ke(d,g=>{const m=g?{prefix:r,icons:{[f]:g}}:null;K(e,[f],m)})});return}const{valid:s,invalid:c}=Ln(n);if(c.length&&K(e,c,null),!s.length)return;const a=r.match(Re)?xe(o):null;if(!a){K(e,s,null);return}a.prepare(o,r,s).forEach(f=>{Fn(o,f,d=>{K(e,f.icons,d)})})}))}const zn=(e,t)=>{const o=On(e,!0,Le()),r=Dn(o);if(!r.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(r.loaded,r.missing,r.pending,Se)}),()=>{a=!1}}const n=Object.create(null),i=[];let s,c;return r.pending.forEach(a=>{const{provider:u,prefix:f}=a;if(f===c&&u===s)return;s=u,c=f,i.push(J(u,f));const d=n[u]||(n[u]=Object.create(null));d[f]||(d[f]=[])}),r.pending.forEach(a=>{const{provider:u,prefix:f,name:d}=a,g=J(u,f),m=g.pendingIcons||(g.pendingIcons=new Set);m.has(d)||(m.add(d),n[u][f].push(d))}),i.forEach(a=>{const u=n[a.provider][a.prefix];u.length&&Bn(a,u)}),t?Cn(t,r,i):Se};function Gn(e,t){const o={...e};for(const r in t){const n=t[r],i=typeof n;r in Be?(n===null||n&&(i==="string"||i==="number"))&&(o[r]=n):i===typeof o[r]&&(o[r]=r==="rotate"?n%4:n)}return o}const qn=/[\s,]+/;function Un(e,t){t.split(qn).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Yn(e,t=0){const o=e.replace(/^-?[0-9.]*/,"");function r(n){for(;n<0;)n+=4;return n%4}if(o===""){const n=parseInt(e);return isNaN(n)?0:r(n)}else if(o!==e){let n=0;switch(o){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-o.length));return isNaN(i)?0:(i=i/n,i%1===0?r(i):0)}}return t}function Qn(e,t){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)o+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}function Hn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Wn(e){return"data:image/svg+xml,"+Hn(e)}function Jn(e){return'url("'+Wn(e)+'")'}let ee;function Zn(){try{ee=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ee=null}}function Xn(e){return ee===void 0&&Zn(),ee?ee.createHTML(e):e}const Ue={...ze,inline:!1},Vn={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Kn={display:"inline-block"},_e={backgroundColor:"currentColor"},Ye={backgroundColor:"transparent"},Ce={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},De={WebkitMask:_e,mask:_e,background:Ye};for(const e in De){const t=De[e];for(const o in Ce)t[e+o]=Ce[o]}const et={...Ue,inline:!0};function Oe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const nt=(e,t,o)=>{const r=t.inline?et:Ue,n=Gn(r,t),i=t.mode||"svg",s={},c=t.style||{},a={...i==="svg"?Vn:{}};if(o){const p=ce(o,!1,!0);if(p){const h=["iconify"],T=["provider","prefix"];for(const v of T)p[v]&&h.push("iconify--"+p[v]);a.className=h.join(" ")}}for(let p in t){const h=t[p];if(h!==void 0)switch(p){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":a.ref=h;break;case"className":a[p]=(a[p]?a[p]+" ":"")+h;break;case"inline":case"hFlip":case"vFlip":n[p]=h===!0||h==="true"||h===1;break;case"flip":typeof h=="string"&&Un(n,h);break;case"color":s.color=h;break;case"rotate":typeof h=="string"?n[p]=Yn(h):typeof h=="number"&&(n[p]=h);break;case"ariaHidden":case"aria-hidden":h!==!0&&h!=="true"&&delete a["aria-hidden"];break;default:r[p]===void 0&&(a[p]=h)}}const u=mn(e,n),f=u.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),i==="svg"){a.style={...s,...c},Object.assign(a,f);let p=0,h=t.id;return typeof h=="string"&&(h=h.replace(/-/g,"_")),a.dangerouslySetInnerHTML={__html:Xn(bn(u.body,h?()=>h+"ID"+p++:"iconifyReact"))},b.createElement("svg",a)}const{body:d,width:g,height:m}=e,x=i==="mask"||(i==="bg"?!1:d.indexOf("currentColor")!==-1),y=Qn(d,{...f,width:g+"",height:m+""});return a.style={...s,"--svg":Jn(y),width:Oe(f.width),height:Oe(f.height),...Kn,...x?_e:Ye,...c},b.createElement("span",a)};Le(!0);yn("",Nn);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!an(r))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let o in t){const r="IconifyProviders["+o+"] is invalid.";try{const n=t[o];if(typeof n!="object"||!n||n.resources===void 0)continue;vn(o,n)||console.error(r)}catch{console.error(r)}}}}function Qe(e){const[t,o]=b.useState(!!e.ssr),[r,n]=b.useState({});function i(m){if(m){const x=e.icon;if(typeof x=="object")return{name:"",data:x};const y=we(x);if(y)return{name:x,data:y}}return{name:""}}const[s,c]=b.useState(i(!!e.ssr));function a(){const m=r.callback;m&&(m(),n({}))}function u(m){if(JSON.stringify(s)!==JSON.stringify(m))return a(),c(m),!0}function f(){var m;const x=e.icon;if(typeof x=="object"){u({name:"",data:x});return}const y=we(x);if(u({name:x,data:y}))if(y===void 0){const p=zn([x],f);n({callback:p})}else y&&((m=e.onLoad)===null||m===void 0||m.call(e,x))}b.useEffect(()=>(o(!0),a),[]),b.useEffect(()=>{t&&f()},[e.icon,t]);const{name:d,data:g}=s;return g?nt({...be,...g},e,d):e.children?e.children:e.fallback?e.fallback:b.createElement("span",{})}const D=b.forwardRef((e,t)=>Qe({...e,_ref:t}));b.forwardRef((e,t)=>Qe({inline:!0,...e,_ref:t}));const tt="_container_j1lh3_26",ot="_title_j1lh3_46",rt="_containerInputError_j1lh3_50",it="_containerInput_j1lh3_50",st="_inputElement_j1lh3_69",ct="_errorMessage_j1lh3_80",at="_icon_j1lh3_92",lt="_containerCustomIcon_j1lh3_99",A={container:tt,title:ot,containerInputError:rt,containerInput:it,inputElement:st,errorMessage:ct,icon:at,containerCustomIcon:lt},te=e=>{switch(e){case"none":return 0;case"sm":return 5;case"md":return 10;case"lg":return 15;case"full":return 9999;default:return 0}},ut=b.forwardRef(function({placeholder:t,value:o,setValue:r,label:n,typeInput:i,HorV:s,errorMessage:c,rounded:a,width:u,height:f,border:d,shadow:g,textSize:m,textColor:x,bgColor:y,customContainerClass:p,customInputClass:h,customIconRClass:T,customIconLClass:v,seeIconLeft:j=!0,seeIconRight:N,iconColorL:_,iconColorR:I,iconColorPass:$,iconSizeL:S,iconSizeR:k,iconSizePass:P,iconLeft:R,iconRight:L,customIconLeft:B,customIconRight:U,args:H},W){const[z,O]=b.useState(!1),G=b.useMemo(()=>te(a??"full"),[a]);return l.jsxs("div",{className:A.container,style:{flexDirection:s==="horizontal"?"row":"column"},children:[l.jsx("label",{className:A.title,style:{fontSize:m,color:x,height:s==="horizontal"?35:"auto",display:s==="horizontal"?"flex":"block",alignItems:s==="horizontal"?"center":"initial",marginRight:s==="horizontal"?10:0,marginBottom:s==="vertical"?5:0},children:n}),l.jsxs("div",{className:A.containerInputError,children:[l.jsxs("div",{className:`${A.containerInput} ${p}`,style:{borderRadius:G,width:!u&&i==="datetime-local"?"auto":u,height:f,border:d||d===void 0?"":"none",boxShadow:g?"0 0 5px #00000075":"",backgroundColor:y},children:[B?l.jsx("div",{className:`${A.containerCustomIcon} ${v}`,children:B}):j&&l.jsx(D,{icon:R??"mi:user",className:`${A.icon} ${v}`,style:{color:_,fontSize:S}}),l.jsx("input",{ref:W,className:`${A.inputElement} ${h}`,style:{fontSize:m,color:x},type:i==="password"&&z?"text":i,placeholder:t,value:o,onChange:Y=>r?.(Y.target.value),...H}),i==="password"&&l.jsx(D,{onClick:()=>O(!z),icon:z?"fluent:eye-20-filled":"fluent:eye-hide-20-filled",className:`${A.icon}`,style:{color:$,fontSize:P,marginRight:10,cursor:i=="password"?"pointer":"default"}}),U?l.jsx("div",{className:`${A.containerCustomIcon} ${T}`,children:U}):N&&l.jsx(D,{icon:L??"mi:user",className:`${A.icon} ${T}`,style:{color:I,fontSize:k}})]}),c!==""&&l.jsx("p",{className:A.errorMessage,children:c})]})]})}),ft="_container_5daeb_26",dt="_containerInputError_5daeb_50",pt="_containerInput_5daeb_50",ht="_inputElement_5daeb_69",mt="_errorMessage_5daeb_80",gt="_icon_5daeb_92",xt="_containerCustomIcon_5daeb_99",Q={container:ft,containerInputError:dt,containerInput:pt,inputElement:ht,errorMessage:mt,icon:gt,containerCustomIcon:xt},_t=b.forwardRef(function({label:t,value:o,errorMessage:r,textSize:n,textColor:i,setValue:s,useLinkable:c,link:a,iconSize:u,seeIcon:f,icon:d,iconColor:g,customInputClass:m,customLabelClass:x,customIconClass:y,customIcon:p,args:h},T){const v=b.useId();return l.jsx("div",{ref:T,className:Q.container,children:l.jsxs("div",{className:Q.containerInputError,children:[l.jsxs("div",{className:Q.containerInput,children:[l.jsx("input",{className:`${Q.inputElement} ${m}`,style:{fontSize:n,color:i},type:"checkbox",checked:o,onChange:j=>s(j.target.checked),...h}),p?l.jsx("div",{className:`${Q.containerCustomIcon} ${y}`,children:p}):f&&l.jsx(D,{icon:d??"mi:user",className:`${Q.icon} ${y}`,style:{color:g,fontSize:u}}),c?l.jsx("a",{className:x,href:a||"#",style:{fontSize:n,color:i,textDecoration:"underline"},children:t}):l.jsx("label",{htmlFor:v,className:x,style:{fontSize:n,color:i},children:t})]}),r!==""&&l.jsx("p",{className:Q.errorMessage,children:r})]})})}),bt="_container_v1dbe_26",yt="_containerInputError_v1dbe_51",vt="_containerInput_v1dbe_51",jt="_errorMessage_v1dbe_81",It="_icon_v1dbe_93",$t="_containerCustomIcon_v1dbe_100",wt="_containerInputAndOptions_v1dbe_100",Tt="_containerOptions_v1dbe_100",Et="_optionElement_v1dbe_100",Nt="_containerIconOption_v1dbe_100",St="_containerLabel_v1dbe_112",kt="_textOption_v1dbe_142",Ct="_iconArrow_v1dbe_150",E={container:bt,containerInputError:yt,containerInput:vt,errorMessage:jt,icon:It,containerCustomIcon:$t,containerInputAndOptions:wt,containerOptions:Tt,optionElement:Et,containerIconOption:Nt,containerLabel:St,textOption:kt,iconArrow:Ct},He=(e,t)=>{b.useEffect(()=>{const o=r=>{const n=e.current;!n||n.contains(r.target)||t(r)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t])},Dt=b.forwardRef(function({label:t,value:o,setValue:r,options:n,placeholder:i,errorMessage:s,orientation:c="bottom",iconInRight:a=!1,rounded:u,border:f=!0,textSize:d="1.4em",textColor:g="#000",labelSize:m="1.4em",labelColor:x="#000",width:y=250,height:p=40,bgColor:h,shadow:T=!1,icon:v,iconSize:j=20,iconsOptionsSize:N=20,seeIcon:_=!1,seeOptionsIcons:I=!1,iconsColor:$="#000",customIcon:S,customContainerClass:k,customInputClass:P,customLabelClass:R,customIconClass:L,customOptionClass:B},U){const[H,W]=b.useState(null),[z,O]=b.useState(!1),G=b.useRef(null),Y={valueOption:null,text:i??"Selecciona una opción",icon:"hugeicons:cursor-magic-selection-04"};He(G,()=>{O(!1)}),b.useEffect(()=>{let C=[Y,...n];W(C)},[]);const Z=b.useMemo(()=>te(u??"lg"),[u]);return l.jsxs("div",{ref:U,className:`${E.container} ${k}`,children:[l.jsxs("div",{className:E.containerLabel,style:{flexDirection:a?"row-reverse":"row",justifyContent:a?"flex-end":"flex-start"},children:[S?l.jsx("div",{className:`${E.containerCustomIcon} ${L}`,style:{height:j},children:S}):_&&l.jsx(D,{icon:v??"icon-park-outline:dot",className:`${E.icon} ${L}`,style:{color:$,fontSize:j}}),l.jsx("label",{className:R,style:{fontSize:m,color:x},children:t})]}),l.jsxs("div",{className:E.containerInputError,children:[l.jsxs("div",{ref:G,className:E.containerInputAndOptions,children:[l.jsxs("div",{onClick:C=>{C.stopPropagation(),O(!z)},className:`${E.containerInput} ${P}`,style:{width:y,height:p,border:f?"":"none",boxShadow:T?"0 0 10px #00000050":"",borderRadius:Z,backgroundColor:h},children:[I&&o?.valueOption&&l.jsx(l.Fragment,{children:o?.customIcon?l.jsx("div",{className:E.containerCustomIcon,children:o?.customIcon}):o?.icon&&l.jsx(D,{icon:o.icon,className:E.icon,style:{color:o.iconColor?o.iconColor:$,fontSize:N}})}),l.jsx("p",{className:E.textOption,style:{fontSize:m,color:x,fontWeight:o?.valueOption?"bold":""},children:o?.text?o.text:Y.text}),l.jsx(D,{icon:"ri:arrow-down-s-line",className:`${E.icon} ${E.iconArrow}`})]}),z&&l.jsx("div",{className:E.containerOptions,style:{top:c==="bottom"?"calc(100% + 10px)":c==="left"||c==="right"?0:"",left:c==="right"?"calc(100% + 10px)":c==="top"||c==="bottom"?0:"",bottom:c==="top"?"calc(100% + 10px)":"",right:c==="left"?"calc(100% + 10px)":""},children:H?.map((C,le)=>l.jsxs("div",{onClick:X=>{X.stopPropagation(),O(!1),r(C)},className:`${E.optionElement} ${B}`,children:[I&&l.jsx("div",{className:`${E.containerIconOption}`,children:C.customIcon?C.customIcon:I&&l.jsx(D,{icon:C.icon??"icon-park-outline:dot",className:`${E.icon} ${E.containerIconOption}`,style:{color:C.iconColor?C.iconColor:$,fontSize:N}})}),l.jsx("p",{className:E.textOption,style:{fontSize:d,color:g},children:C.text?C.text:Y.text})]},le))})]}),s!==""&&l.jsx("p",{className:E.errorMessage,children:s})]})]})}),Ot="_container_1nag4_26",Mt="_containerInputError_1nag4_50",Pt="_errorMessage_1nag4_80",At="_icon_1nag4_92",Ft="_containerCustomIcon_1nag4_99",Rt="_containerInputFile_1nag4_114",Lt="_containerSelectedFile_1nag4_114",Bt="_textInput_1nag4_132",zt="_inputFile_1nag4_142",Gt="_fileName_1nag4_158",qt="_backdrop_1nag4_175",M={container:Ot,containerInputError:Mt,errorMessage:Pt,icon:At,containerCustomIcon:Ft,containerInputFile:Rt,containerSelectedFile:Lt,textInput:Bt,inputFile:zt,fileName:Gt,backdrop:qt},he={images:{common:"image/png, image/jpeg, image/gif, image/webp",png:"image/png",jpg:"image/jpeg, image/jpg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",ico:"image/x-icon, image/vnd.microsoft.icon",tiff:"image/tiff",bmp:"image/bmp",heic:"image/heic, image/heif"},docs:{pdf:"application/pdf",word:".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document",excel:".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",powerpoint:".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",odp:"application/vnd.oasis.opendocument.presentation",txt:"text/plain",rtf:"application/rtf",csv:"text/csv",markdown:"text/markdown, .md",epub:"application/epub+zip"},archives:{zip:"application/zip, application/x-zip-compressed",rar:"application/x-rar-compressed, .rar",sevenZ:"application/x-7z-compressed",tar:"application/x-tar",gz:"application/gzip",iso:"application/x-iso9660-image, .iso"},media:{audio:"audio/*",video:"video/*",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg, video/ogg",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo"},fonts:{woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf, application/x-font-ttf",otf:"font/otf, application/x-font-opentype",eot:"application/vnd.ms-fontobject"},code:{html:"text/html",css:"text/css",js:"text/javascript, application/javascript, .mjs",ts:"application/typescript, .ts, .tsx",json:"application/json",xml:"application/xml, text/xml",python:"text/x-python, .py",java:"text/x-java-source, .java, application/java-archive, .jar",csharp:"text/plain, .cs",cpp:"text/x-c++, .cpp, .h, .hpp",c:"text/x-c, .c",php:"application/x-httpd-php, .php",sql:"application/sql, .sql",sh:"application/x-sh, .sh",yaml:"text/yaml, .yaml, .yml"}},We=e=>{if(Array.isArray(e))return e.map(o=>We(o)).filter(o=>o!==void 0).join(", ");if(e!=="*"){if(typeof e=="string"){if(e in he){const t=he[e];return Object.values(t).join(", ")}return}if(typeof e=="object"){const t=[];return Object.keys(e).forEach(o=>{const r=e[o],n=he[o];r&&n&&r.forEach(i=>{const s=n[i];s&&t.push(s)})}),t.join(", ")}}},Ut="_btnThemeDark_1hn8j_26",Yt="_iconButton_1hn8j_58",Qt="_containerCustomIcon_1hn8j_65",Ht="_btnBorderedThemeDark_1hn8j_78",Wt="_btnThemeGreen_1hn8j_98",Jt="_btnBorderedThemeGreen_1hn8j_150",Zt="_btnThemeBlue_1hn8j_170",Xt="_btnBorderedThemeBlue_1hn8j_222",Vt="_btnThemeRed_1hn8j_242",Kt="_btnBorderedThemeRed_1hn8j_294",eo="_btnThemePurple_1hn8j_314",no="_btnBorderedThemePurple_1hn8j_366",to="_btnThemeGray_1hn8j_386",oo="_btnBorderedThemeGray_1hn8j_438",ro="_btnThemeLight_1hn8j_458",io="_btnBorderedThemeLight_1hn8j_510",so="_btnThemeYellow_1hn8j_530",co="_btnBorderedThemeYellow_1hn8j_582",oe={btnThemeDark:Ut,iconButton:Yt,containerCustomIcon:Qt,btnBorderedThemeDark:Ht,btnThemeGreen:Wt,btnBorderedThemeGreen:Jt,btnThemeBlue:Zt,btnBorderedThemeBlue:Xt,btnThemeRed:Vt,btnBorderedThemeRed:Kt,btnThemePurple:eo,btnBorderedThemePurple:no,btnThemeGray:to,btnBorderedThemeGray:oo,btnThemeLight:ro,btnBorderedThemeLight:io,btnThemeYellow:so,btnBorderedThemeYellow:co},Je=b.forwardRef(function({label:t="Texto del Botón",action:o=()=>{alert("Botón presionado")},font:r,width:n,height:i,icon:s="tabler:send",seeIcon:c=!0,textSize:a,iconColor:u,iconSize:f,styleType:d="ThemeDark",rounded:g="md",borderedStyle:m=!1,iconOn:x,padding:y,shadow:p=!1,colorShadow:h,customClassButton:T,customClassLabel:v,customClassIcon:j,customIcon:N,args:_},I){const $=b.useMemo(()=>te(g??"full"),[g]);return l.jsxs("button",{ref:I,className:`${oe[`btn${d}`]} ${m&&oe[`btnBordered${d}`]} ${T}`,style:{borderRadius:$,width:n??"auto",height:i??"auto",flexDirection:x==="left"?"row-reverse":"row",boxShadow:`${p?"0 0 7px "+(h||"#000"):""}`,padding:y},onClick:S=>{S.preventDefault(),o()},..._,children:[t&&l.jsx("p",{className:`${v}`,style:{fontSize:a,fontFamily:r},children:t}),N?l.jsx("div",{className:`${oe.containerCustomIcon} ${j}`,children:N}):c&&l.jsx(D,{icon:s,className:`${oe.iconButton} ${j}`,style:{fontSize:f,color:u}})]})}),ao=b.forwardRef(function({label:t,errorMessage:o,acceptFiles:r="*",selectedFileE:n,setSelectedFileE:i,maxMBSize:s,shadow:c=!0,textButtonCancel:a="Cancelar",width:u,height:f,bgColor:d,bgColorHover:g,labelSize:m,labelColor:x,rounded:y="md",iconSize:p=30,seeIcon:h=!0,icon:T,iconColor:v="#fff",customFIleClass:j,customSelectedClass:N,customLabelClass:_,customIconClass:I,customIcon:$,args:S},k){const P=b.useId(),R=b.useRef(0),[L,B]=b.useState(n),[U,H]=b.useState(!1),[W,z]=b.useState(null),[O,G]=b.useState(!1),Y=We(r),Z=()=>{B(null),i(null)},C=w=>{if(z(null),s){const Ke=s*1024*1024;if(w.size>Ke){z(`El archivo excede el límite de ${s} MB.`),Z();return}}B(w),i(w)},le=w=>{w.preventDefault(),w.target.files&&w.target.files[0]?C(w.target.files[0]):Z()},X=w=>{w.preventDefault(),w.stopPropagation(),R.current+=1,w.type==="dragenter"||w.type==="dragover"?G(!0):w.type==="dragleave"&&G(!1)},ue=w=>{w.preventDefault(),w.stopPropagation(),R.current-=1,R.current===0&&G(!1)},Ve=w=>{w.preventDefault(),w.stopPropagation(),G(!1),R.current=0,w.dataTransfer.files&&w.dataTransfer.files[0]&&C(w.dataTransfer.files[0])},fe=b.useMemo(()=>te(y??"lg"),[y]);return l.jsx("div",{className:M.container,children:l.jsxs("div",{className:M.containerInputError,children:[L?l.jsxs("div",{className:`${M.containerSelectedFile} ${N}`,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:fe,width:u,height:f},children:[h&&l.jsx(D,{icon:"uim:paperclip",className:M.icon}),l.jsx("p",{className:M.fileName,children:L?.name}),l.jsx("div",{className:M.backdrop,style:{borderRadius:fe},children:l.jsx(Je,{styleType:"ThemeRed",action:Z,label:a,rounded:"full",icon:"fa:trash",iconSize:"1.4rem",iconColor:"#fff",textSize:12,padding:"7px"})})]}):l.jsxs("label",{htmlFor:P,className:`${M.containerInputFile} ${j}`,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),onDragEnter:X,onDragLeave:ue,onDragOver:w=>w.preventDefault(),onDrop:Ve,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:fe,backgroundColor:O?"#fff":U?g:d,borderColor:O?d||"#6936ee":"",width:u,height:f},children:[!$||O?h&&l.jsx(D,{icon:O?"tabler:drag-drop":T??"mingcute:upload-3-fill",className:`${M.icon} ${I}`,onDragEnter:X,onDragLeave:ue,style:{color:O?d||"#6936ee":v,fontSize:p}}):l.jsx("div",{className:`${M.containerCustomIcon} ${I}`,style:{height:p??"2rem"},children:$}),l.jsx("span",{className:`${M.textInput} ${_}`,style:{fontSize:m,color:O?d||"#6936ee":x},onDragEnter:X,onDragLeave:ue,children:O?"Suelta para agregar":t??"Click o arrastra un archivo"}),l.jsx("input",{ref:k,id:P,type:"file",accept:Y,className:M.inputFile,onChange:le,...S})]}),l.jsx("p",{className:M.errorMessage,children:W||o||""})]})})}),lo="_container_sbkx2_26",uo="_containerInputError_sbkx2_50",fo="_inputElement_sbkx2_69",po="_errorMessage_sbkx2_80",ho="_icon_sbkx2_92",mo="_containerCustomIcon_sbkx2_99",go="_containerLabel_sbkx2_111",xo="_containerGroupRadio_sbkx2_127",_o="_containerRadio_sbkx2_134",F={container:lo,containerInputError:uo,inputElement:fo,errorMessage:po,icon:ho,containerCustomIcon:mo,containerLabel:go,containerGroupRadio:xo,containerRadio:_o},bo=b.forwardRef(function({label:t,labelSize:o,labelColor:r,options:n,errorMessage:i,textSize:s,textColor:c,setValue:a,name:u,HorV:f="horizontal",icon:d,iconInRight:g,iconSize:m,iconColor:x,customIcon:y,seeIcon:p=!0,customInputClass:h,customLabelClass:T,customTextClass:v,customIconLabelClass:j,customContainerRadiosClass:N},_){const I=b.useId();return l.jsxs("div",{ref:_,className:F.container,children:[l.jsxs("div",{className:F.containerLabel,style:{flexDirection:g?"row-reverse":"row",justifyContent:g?"flex-end":"flex-start"},children:[y?l.jsx("div",{className:`${F.containerCustomIcon} ${j}`,style:{height:m},children:y}):p&&l.jsx(D,{icon:d??"mi:user",className:`${F.icon} ${j}`,style:{color:x,fontSize:m}}),l.jsx("label",{style:{fontSize:o,color:r},className:v,children:t})]}),l.jsxs("div",{className:F.containerInputError,children:[l.jsx("div",{className:`${F.containerGroupRadio} ${N}`,style:{flexDirection:f==="vertical"?"column":"row",alignItems:f==="vertical"?"stretch":"center",justifyContent:f==="vertical"?"center":"flex-start"},children:n.map(($,S)=>{const k=`${I}-${S}`;return l.jsxs("div",{className:F.containerRadio,children:[l.jsx("input",{id:k,className:`${F.inputElement} ${h}`,style:{fontSize:s,color:c},type:"radio",name:u,value:$.value,onChange:P=>a(P.target.value)}),$.customIcon?l.jsx("div",{className:`${F.containerCustomIcon} ${$.customIconClass}`,children:$.customIcon}):$.seeIcon&&l.jsx(D,{icon:$.icon??"mi:user",className:`${F.icon} ${$.customIconClass}`,style:{color:$.iconColor,fontSize:m}}),l.jsx("label",{htmlFor:k,className:T,style:{fontSize:s,color:c},children:$.label})]},I+$.value)})}),i!==""&&l.jsx("p",{className:F.errorMessage,children:i})]})]})}),yo="_container_msjnc_26",vo="_containerInputError_msjnc_50",jo="_containerInput_msjnc_50",Io="_inputElement_msjnc_69",$o="_errorMessage_msjnc_80",wo="_icon_msjnc_92",To="_containerCustomIcon_msjnc_99",Eo="_containerLabel_msjnc_111",No="_counterCharacter_msjnc_142",q={container:yo,containerInputError:vo,containerInput:jo,inputElement:Io,errorMessage:$o,icon:wo,containerCustomIcon:To,containerLabel:Eo,counterCharacter:No},So=b.forwardRef(function({placeholder:t,value:o,setValue:r,label:n,errorMessage:i,seeMaxCharCounter:s=!0,maxCharacters:c=300,resize:a=!0,rounded:u,width:f=250,height:d=100,maxWidth:g=500,maxHeight:m=500,border:x,shadow:y,textSize:p,textColor:h,bgColor:T,customContainerClass:v,customTextAreaClass:j,customIconClass:N,seeIcon:_,iconInRight:I=!1,iconColor:$,iconSize:S,icon:k,customIcon:P,args:R},L){const B=b.useMemo(()=>te(u??"lg"),[u]);return l.jsxs("div",{className:q.container,children:[l.jsxs("div",{className:q.containerLabel,style:{flexDirection:I?"row-reverse":"row",justifyContent:I?"flex-end":"flex-start"},children:[P?l.jsx("div",{className:`${q.containerCustomIcon} ${N}`,style:{height:S},children:P}):_&&l.jsx(D,{icon:k??"mi:user",className:`${q.icon} ${N}`,style:{color:$,fontSize:S}}),l.jsx("label",{style:{fontSize:p,color:h},children:n})]}),l.jsxs("div",{className:q.containerInputError,children:[l.jsxs("div",{className:`${q.containerInput} ${v}`,style:{borderRadius:B,border:x||x===void 0?"":"none",boxShadow:y?"0 0 5px #00000075":"",backgroundColor:T,resize:a?"both":"none",width:f,height:d,minWidth:f,minHeight:d,maxWidth:g,maxHeight:m},children:[l.jsx("textarea",{ref:L,className:`${q.inputElement} ${j}`,style:{fontSize:p,color:h},placeholder:t,value:o,maxLength:c,onChange:U=>r?.(U.target.value),...R}),s&&l.jsxs("p",{className:q.counterCharacter,children:[o?o?.length:0,"/",c]})]}),i!==""&&l.jsx("p",{className:q.errorMessage,children:i})]})]})}),ko=["America/Mexico_City","America/New_York","America/Los_Angeles","America/Bogota","America/Argentina/Buenos_Aires","America/Sao_Paulo","Europe/Madrid","Europe/London","Europe/Paris","Asia/Tokyo","Asia/Shanghai","Australia/Sydney","UTC"],ae="America/Mexico_City";function Ze(e,t){return new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).formatToParts(e).reduce((r,n)=>(r[n.type]=n.value,r),{})}function Co(e){if(!e)return 0;let t;return typeof e=="string"?t=new Date(e):t=e,Math.floor(t.getTime()/1e3)}function Do(e,t=ae){if(!e)return"";const o=new Date(e*1e3),r=Ze(o,t);return`${r.year}-${r.month}-${r.day}`}function Xe(e,t=ae){if(!e)return"";const o=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"],r=new Date(e*1e3),n=Ze(r,t),i=parseInt(n.month,10)-1,s=o[i]||n.month,c=n.dayPeriod?n.dayPeriod.toUpperCase().replace(/\./g,""):"";return`${n.day}/${s}/${n.year} - ${n.hour}:${n.minute} ${c}`}function Oo(e,t=ae){if(!e)return"";const o=new Date(e*1e3),n=new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(o).reduce((i,s)=>(i[s.type]=s.value,i),{});return`${n.year}-${n.month}-${n.day} ${n.hour}:${n.minute}`}function Mo(e,t=ae){return Xe(e,t).split(" - ")[0]}exports.ButtonGal=Je;exports.CheckBoxGal=_t;exports.DropDownGal=Dt;exports.InputFileGal=ao;exports.InputRadioGal=bo;exports.InputTextGal=ut;exports.TIMEZONES=ko;exports.TextAreaGal=So;exports.convertToUnix=Co;exports.unixToDate=Do;exports.unixToDateTime=Oo;exports.unixToDateTimeString=Xe;exports.unixToStringYMD=Mo;exports.useOnClickOutside=He;
|
package/dist/galliard-ui.d.ts
CHANGED
|
@@ -1,411 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ForwardRefExoticComponent } from 'react';
|
|
4
|
-
import { InputHTMLAttributes } from 'react';
|
|
5
|
-
import { RefAttributes } from 'react';
|
|
6
|
-
import { RefObject } from 'react';
|
|
7
|
-
import { TextareaHTMLAttributes } from 'react';
|
|
8
|
-
|
|
9
|
-
export declare type AcceptProp = MixedCategory | MixedCategory[];
|
|
10
|
-
|
|
11
|
-
declare interface BaseProps {
|
|
12
|
-
setError?: (error: string) => void;
|
|
13
|
-
nameInput?: string;
|
|
14
|
-
canBeNull?: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare interface BoolValidation extends BaseProps {
|
|
18
|
-
typeInput: 'bool';
|
|
19
|
-
value: boolean | null | undefined;
|
|
20
|
-
mustBeTrue?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export declare const ButtonGal: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
24
|
-
|
|
25
|
-
export declare interface ButtonProps {
|
|
26
|
-
label?: string;
|
|
27
|
-
action: () => void;
|
|
28
|
-
textSize?: string | number;
|
|
29
|
-
font?: 'OpenSansLight' | 'OpenSansRegular' | 'OpenSansSemiBold' | 'OpenSansBold' | 'OpenSansBolder';
|
|
30
|
-
width?: string | number;
|
|
31
|
-
height?: string | number;
|
|
32
|
-
icon?: string;
|
|
33
|
-
seeIcon?: boolean;
|
|
34
|
-
iconSize?: string | number;
|
|
35
|
-
iconColor?: string;
|
|
36
|
-
iconOn?: 'left' | 'right';
|
|
37
|
-
styleType?: 'ThemeDark' | 'ThemeLight' | 'ThemeGreen' | 'ThemeRed' | 'ThemeBlue' | 'ThemeYellow' | 'ThemePurple' | 'ThemeGray';
|
|
38
|
-
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
39
|
-
borderedStyle?: boolean;
|
|
40
|
-
padding?: string | number;
|
|
41
|
-
shadow?: boolean;
|
|
42
|
-
colorShadow?: string;
|
|
43
|
-
customClassButton?: string;
|
|
44
|
-
customClassLabel?: string;
|
|
45
|
-
customClassIcon?: string;
|
|
46
|
-
customIcon?: React.ReactNode;
|
|
47
|
-
args?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export declare const CheckBoxGal: ForwardRefExoticComponent<CheckProps & RefAttributes<HTMLInputElement>>;
|
|
51
|
-
|
|
52
|
-
export declare interface CheckProps {
|
|
53
|
-
label: string;
|
|
54
|
-
value: boolean;
|
|
55
|
-
setValue: (value: boolean) => void;
|
|
56
|
-
textSize?: number | string;
|
|
57
|
-
textColor?: string;
|
|
58
|
-
errorMessage?: string;
|
|
59
|
-
useLinkable?: boolean;
|
|
60
|
-
link?: string;
|
|
61
|
-
iconSize?: string | number;
|
|
62
|
-
seeIcon: boolean;
|
|
63
|
-
icon?: string;
|
|
64
|
-
iconColor?: string;
|
|
65
|
-
customInputClass?: string;
|
|
66
|
-
customLabelClass?: string;
|
|
67
|
-
customIconClass?: string;
|
|
68
|
-
customIcon?: React.ReactNode;
|
|
69
|
-
args?: InputHTMLAttributes<HTMLInputElement>;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
declare type CompatibleInputTypes = 'text' | 'email' | 'password' | 'url' | 'tel' | 'number' | 'date' | 'time' | 'datetime-local' | 'search';
|
|
73
|
-
|
|
74
|
-
export declare function convertToUnix(dateString: string | Date): number;
|
|
75
|
-
|
|
76
|
-
declare interface DataValidation extends BaseProps {
|
|
77
|
-
typeInput: 'data';
|
|
78
|
-
value: any | null | undefined;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
declare interface DateValidation extends BaseProps {
|
|
82
|
-
typeInput: 'date' | 'date-time';
|
|
83
|
-
value: Date | string | number | null | undefined;
|
|
84
|
-
min?: Date;
|
|
85
|
-
max?: Date;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export declare const DropDownGal: ForwardRefExoticComponent<DropDownProps & RefAttributes<HTMLInputElement>>;
|
|
89
|
-
|
|
90
|
-
export declare interface DropDownProps {
|
|
91
|
-
label?: string;
|
|
92
|
-
value: OptionsDropModel | null;
|
|
93
|
-
setValue: (value: OptionsDropModel | null) => void;
|
|
94
|
-
options: OptionsDropModel[];
|
|
95
|
-
placeholder?: string;
|
|
96
|
-
errorMessage?: string;
|
|
97
|
-
iconInRight?: boolean;
|
|
98
|
-
orientation?: 'top' | 'left' | 'right' | 'bottom';
|
|
99
|
-
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
100
|
-
border?: boolean;
|
|
101
|
-
textSize?: number | string;
|
|
102
|
-
textColor?: string;
|
|
103
|
-
labelSize?: number | string;
|
|
104
|
-
labelColor?: string;
|
|
105
|
-
width?: number | string;
|
|
106
|
-
height?: number | string;
|
|
107
|
-
bgColor?: string;
|
|
108
|
-
shadow?: boolean;
|
|
109
|
-
icon?: string;
|
|
110
|
-
iconSize?: string | number;
|
|
111
|
-
iconsOptionsSize?: string | number;
|
|
112
|
-
seeIcon?: boolean;
|
|
113
|
-
seeOptionsIcons?: boolean;
|
|
114
|
-
iconsColor?: string;
|
|
115
|
-
customIcon?: React.ReactNode;
|
|
116
|
-
customContainerClass?: string;
|
|
117
|
-
customInputClass?: string;
|
|
118
|
-
customLabelClass?: string;
|
|
119
|
-
customIconClass?: string;
|
|
120
|
-
customOptionClass?: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
declare interface EmailValidation extends BaseProps {
|
|
124
|
-
typeInput: 'email';
|
|
125
|
-
value: string | null | undefined;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
declare type Event_2 = MouseEvent | TouchEvent;
|
|
129
|
-
|
|
130
|
-
declare const FileCatalog: {
|
|
131
|
-
readonly images: {
|
|
132
|
-
readonly common: "image/png, image/jpeg, image/gif, image/webp";
|
|
133
|
-
readonly png: "image/png";
|
|
134
|
-
readonly jpg: "image/jpeg, image/jpg";
|
|
135
|
-
readonly gif: "image/gif";
|
|
136
|
-
readonly svg: "image/svg+xml";
|
|
137
|
-
readonly webp: "image/webp";
|
|
138
|
-
readonly avif: "image/avif";
|
|
139
|
-
readonly ico: "image/x-icon, image/vnd.microsoft.icon";
|
|
140
|
-
readonly tiff: "image/tiff";
|
|
141
|
-
readonly bmp: "image/bmp";
|
|
142
|
-
readonly heic: "image/heic, image/heif";
|
|
143
|
-
};
|
|
144
|
-
readonly docs: {
|
|
145
|
-
readonly pdf: "application/pdf";
|
|
146
|
-
readonly word: ".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
147
|
-
readonly excel: ".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
148
|
-
readonly powerpoint: ".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
149
|
-
readonly odt: "application/vnd.oasis.opendocument.text";
|
|
150
|
-
readonly ods: "application/vnd.oasis.opendocument.spreadsheet";
|
|
151
|
-
readonly odp: "application/vnd.oasis.opendocument.presentation";
|
|
152
|
-
readonly txt: "text/plain";
|
|
153
|
-
readonly rtf: "application/rtf";
|
|
154
|
-
readonly csv: "text/csv";
|
|
155
|
-
readonly markdown: "text/markdown, .md";
|
|
156
|
-
readonly epub: "application/epub+zip";
|
|
157
|
-
};
|
|
158
|
-
readonly archives: {
|
|
159
|
-
readonly zip: "application/zip, application/x-zip-compressed";
|
|
160
|
-
readonly rar: "application/x-rar-compressed, .rar";
|
|
161
|
-
readonly sevenZ: "application/x-7z-compressed";
|
|
162
|
-
readonly tar: "application/x-tar";
|
|
163
|
-
readonly gz: "application/gzip";
|
|
164
|
-
readonly iso: "application/x-iso9660-image, .iso";
|
|
165
|
-
};
|
|
166
|
-
readonly media: {
|
|
167
|
-
readonly audio: "audio/*";
|
|
168
|
-
readonly video: "video/*";
|
|
169
|
-
readonly mp3: "audio/mpeg";
|
|
170
|
-
readonly wav: "audio/wav";
|
|
171
|
-
readonly ogg: "audio/ogg, video/ogg";
|
|
172
|
-
readonly mp4: "video/mp4";
|
|
173
|
-
readonly webm: "video/webm";
|
|
174
|
-
readonly mov: "video/quicktime";
|
|
175
|
-
readonly avi: "video/x-msvideo";
|
|
176
|
-
};
|
|
177
|
-
readonly fonts: {
|
|
178
|
-
readonly woff: "font/woff";
|
|
179
|
-
readonly woff2: "font/woff2";
|
|
180
|
-
readonly ttf: "font/ttf, application/x-font-ttf";
|
|
181
|
-
readonly otf: "font/otf, application/x-font-opentype";
|
|
182
|
-
readonly eot: "application/vnd.ms-fontobject";
|
|
183
|
-
};
|
|
184
|
-
readonly code: {
|
|
185
|
-
readonly html: "text/html";
|
|
186
|
-
readonly css: "text/css";
|
|
187
|
-
readonly js: "text/javascript, application/javascript, .mjs";
|
|
188
|
-
readonly ts: "application/typescript, .ts, .tsx";
|
|
189
|
-
readonly json: "application/json";
|
|
190
|
-
readonly xml: "application/xml, text/xml";
|
|
191
|
-
readonly python: "text/x-python, .py";
|
|
192
|
-
readonly java: "text/x-java-source, .java, application/java-archive, .jar";
|
|
193
|
-
readonly csharp: "text/plain, .cs";
|
|
194
|
-
readonly cpp: "text/x-c++, .cpp, .h, .hpp";
|
|
195
|
-
readonly c: "text/x-c, .c";
|
|
196
|
-
readonly php: "application/x-httpd-php, .php";
|
|
197
|
-
readonly sql: "application/sql, .sql";
|
|
198
|
-
readonly sh: "application/x-sh, .sh";
|
|
199
|
-
readonly yaml: "text/yaml, .yaml, .yml";
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
export declare const InputFileGal: ForwardRefExoticComponent<InputFileProps & RefAttributes<HTMLInputElement>>;
|
|
204
|
-
|
|
205
|
-
export declare interface InputFileProps {
|
|
206
|
-
label?: string;
|
|
207
|
-
acceptFiles?: AcceptProp;
|
|
208
|
-
textButtonCancel?: string;
|
|
209
|
-
errorMessage?: string;
|
|
210
|
-
selectedFileE: File | null;
|
|
211
|
-
setSelectedFileE: (e: File | null) => void;
|
|
212
|
-
maxMBSize?: number;
|
|
213
|
-
shadow?: boolean;
|
|
214
|
-
width?: string | number;
|
|
215
|
-
height?: string | number;
|
|
216
|
-
bgColor?: string;
|
|
217
|
-
bgColorHover?: string;
|
|
218
|
-
labelSize?: number | string;
|
|
219
|
-
labelColor?: string;
|
|
220
|
-
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
221
|
-
iconSize?: string | number;
|
|
222
|
-
seeIcon?: boolean;
|
|
223
|
-
icon?: string;
|
|
224
|
-
iconColor?: string;
|
|
225
|
-
customFIleClass?: string;
|
|
226
|
-
customSelectedClass?: string;
|
|
227
|
-
customLabelClass?: string;
|
|
228
|
-
customIconClass?: string;
|
|
229
|
-
customIcon?: React.ReactNode;
|
|
230
|
-
args?: InputHTMLAttributes<HTMLInputElement>;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export declare interface InputProps {
|
|
234
|
-
placeholder?: string;
|
|
235
|
-
value?: string;
|
|
236
|
-
setValue?: (text: string) => void;
|
|
237
|
-
label?: string;
|
|
238
|
-
typeInput?: CompatibleInputTypes;
|
|
239
|
-
errorMessage?: string;
|
|
240
|
-
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
241
|
-
width?: string | number;
|
|
242
|
-
height?: string | number;
|
|
243
|
-
shadow?: boolean;
|
|
244
|
-
border?: boolean;
|
|
245
|
-
textSize?: number | string;
|
|
246
|
-
textColor?: string;
|
|
247
|
-
bgColor?: string;
|
|
248
|
-
HorV?: "horizontal" | "vertical";
|
|
249
|
-
customContainerClass?: string;
|
|
250
|
-
customInputClass?: string;
|
|
251
|
-
customIconRClass?: string;
|
|
252
|
-
customIconLClass?: string;
|
|
253
|
-
seeIconLeft?: boolean;
|
|
254
|
-
seeIconRight?: boolean;
|
|
255
|
-
iconColorL?: string;
|
|
256
|
-
iconColorR?: string;
|
|
257
|
-
iconColorPass?: string;
|
|
258
|
-
iconSizeL?: number;
|
|
259
|
-
iconSizeR?: number;
|
|
260
|
-
iconSizePass?: number;
|
|
261
|
-
iconLeft?: string;
|
|
262
|
-
iconRight?: string;
|
|
263
|
-
customIconLeft?: React.ReactNode;
|
|
264
|
-
customIconRight?: React.ReactNode;
|
|
265
|
-
args?: InputHTMLAttributes<HTMLInputElement>;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
export declare const InputRadioGal: ForwardRefExoticComponent<RadioProps & RefAttributes<HTMLInputElement>>;
|
|
269
|
-
|
|
270
|
-
export declare const InputTextGal: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
|
|
271
|
-
|
|
272
|
-
declare type MixedCategory = NameCategory | NameAttributesCategory | '*';
|
|
273
|
-
|
|
274
|
-
export declare type NameAttributesCategory = {
|
|
275
|
-
[K in NameCategory]?: (keyof typeof FileCatalog[K])[];
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
export declare type NameCategory = keyof typeof FileCatalog;
|
|
279
|
-
|
|
280
|
-
declare interface NumberValidation extends BaseProps {
|
|
281
|
-
typeInput: 'num';
|
|
282
|
-
value: number | null | undefined;
|
|
283
|
-
min?: number;
|
|
284
|
-
max?: number;
|
|
285
|
-
isInteger?: boolean;
|
|
286
|
-
needBeEqualTo?: number;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export declare interface OptionsDropModel {
|
|
290
|
-
valueOption: number | string | null;
|
|
291
|
-
text: string;
|
|
292
|
-
icon?: string;
|
|
293
|
-
iconColor?: string;
|
|
294
|
-
customIcon?: React.ReactNode;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
declare interface PassValidation extends BaseProps {
|
|
298
|
-
typeInput: 'pass';
|
|
299
|
-
value: string | null | undefined;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
declare interface PhoneValidation extends BaseProps {
|
|
303
|
-
typeInput: 'phone';
|
|
304
|
-
value: string | null | undefined;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
declare interface PropsOptions {
|
|
308
|
-
value: string | number;
|
|
309
|
-
label: string;
|
|
310
|
-
seeIcon: boolean;
|
|
311
|
-
icon?: string;
|
|
312
|
-
iconColor?: string;
|
|
313
|
-
customIcon?: default_2.ReactNode;
|
|
314
|
-
customIconClass?: string;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
export declare interface RadioProps {
|
|
318
|
-
label: string;
|
|
319
|
-
name: string;
|
|
320
|
-
options: PropsOptions[];
|
|
321
|
-
setValue: (value: string) => void;
|
|
322
|
-
textSize?: number | string;
|
|
323
|
-
textColor?: string;
|
|
324
|
-
labelSize?: number | string;
|
|
325
|
-
labelColor?: string;
|
|
326
|
-
errorMessage?: string;
|
|
327
|
-
iconInRight?: boolean;
|
|
328
|
-
HorV?: 'horizontal' | 'vertical';
|
|
329
|
-
icon?: string;
|
|
330
|
-
iconSize?: string | number;
|
|
331
|
-
iconColor?: string;
|
|
332
|
-
seeIcon?: boolean;
|
|
333
|
-
customIcon?: default_2.ReactElement;
|
|
334
|
-
customInputClass?: string;
|
|
335
|
-
customLabelClass?: string;
|
|
336
|
-
customTextClass?: string;
|
|
337
|
-
customIconLabelClass?: string;
|
|
338
|
-
customContainerRadiosClass?: string;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
declare type SupportedTimeZone = typeof TIMEZONES[number];
|
|
342
|
-
|
|
343
|
-
export declare const TextAreaGal: ForwardRefExoticComponent<TextAreaProps & RefAttributes<HTMLTextAreaElement>>;
|
|
344
|
-
|
|
345
|
-
export declare interface TextAreaProps {
|
|
346
|
-
placeholder?: string;
|
|
347
|
-
value?: string;
|
|
348
|
-
setValue?: (text: string) => void;
|
|
349
|
-
label?: string;
|
|
350
|
-
errorMessage?: string;
|
|
351
|
-
seeMaxCharCounter?: boolean;
|
|
352
|
-
maxCharacters?: number;
|
|
353
|
-
rounded?: "none" | "sm" | "md" | "lg";
|
|
354
|
-
width?: string | number;
|
|
355
|
-
height?: string | number;
|
|
356
|
-
maxWidth?: string | number;
|
|
357
|
-
maxHeight?: string | number;
|
|
358
|
-
shadow?: boolean;
|
|
359
|
-
border?: boolean;
|
|
360
|
-
textSize?: number | string;
|
|
361
|
-
textColor?: string;
|
|
362
|
-
bgColor?: string;
|
|
363
|
-
iconInRight?: boolean;
|
|
364
|
-
resize?: boolean;
|
|
365
|
-
customContainerClass?: string;
|
|
366
|
-
customTextAreaClass?: string;
|
|
367
|
-
customIconClass?: string;
|
|
368
|
-
seeIcon?: boolean;
|
|
369
|
-
iconColor?: string;
|
|
370
|
-
iconSize?: number;
|
|
371
|
-
icon?: string;
|
|
372
|
-
customIcon?: React.ReactNode;
|
|
373
|
-
args?: TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
declare interface TextValidation extends BaseProps {
|
|
377
|
-
typeInput: 'text';
|
|
378
|
-
value: string | null | undefined;
|
|
379
|
-
maxLength?: number;
|
|
380
|
-
minLength?: number;
|
|
381
|
-
regex?: RegExp;
|
|
382
|
-
needBeEqualTo?: string;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
declare interface TimeValidation extends BaseProps {
|
|
386
|
-
typeInput: 'time';
|
|
387
|
-
value: Date | string | number | null | undefined;
|
|
388
|
-
min?: Date;
|
|
389
|
-
max?: Date;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export declare const TIMEZONES: readonly ["America/Mexico_City", "America/New_York", "America/Los_Angeles", "America/Bogota", "America/Argentina/Buenos_Aires", "America/Sao_Paulo", "Europe/Madrid", "Europe/London", "Europe/Paris", "Asia/Tokyo", "Asia/Shanghai", "Australia/Sydney", "UTC"];
|
|
393
|
-
|
|
394
|
-
export declare function unixToDate(unixTime: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
395
|
-
|
|
396
|
-
export declare function unixToDateTime(unixTime: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
397
|
-
|
|
398
|
-
export declare function unixToDateTimeString(unixTime: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
399
|
-
|
|
400
|
-
export declare function unixToStringYMD(unixTimestamp: number | null | undefined, timeZone?: SupportedTimeZone): string;
|
|
401
|
-
|
|
402
|
-
declare interface UrlValidation extends BaseProps {
|
|
403
|
-
typeInput: 'url';
|
|
404
|
-
value: string | null | undefined;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
export declare const useOnClickOutside: <T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>, handler: (event: Event_2) => void) => void;
|
|
408
|
-
|
|
409
|
-
export declare type ValidateProps = TextValidation | EmailValidation | PhoneValidation | UrlValidation | PassValidation | NumberValidation | BoolValidation | DateValidation | TimeValidation | DataValidation;
|
|
410
|
-
|
|
411
|
-
export { }
|
|
1
|
+
export * from './index'
|
|
2
|
+
export {}
|
package/dist/galliard-ui.js
CHANGED
|
@@ -1205,7 +1205,7 @@ const st = "_container_j1lh3_26", at = "_title_j1lh3_46", lt = "_containerInputE
|
|
|
1205
1205
|
onClick: () => O(!G),
|
|
1206
1206
|
icon: G ? "fluent:eye-20-filled" : "fluent:eye-hide-20-filled",
|
|
1207
1207
|
className: `${F.icon}`,
|
|
1208
|
-
style: { color: $, fontSize: A, marginRight: 10 }
|
|
1208
|
+
style: { color: $, fontSize: A, marginRight: 10, cursor: i == "password" ? "pointer" : "default" }
|
|
1209
1209
|
}
|
|
1210
1210
|
),
|
|
1211
1211
|
Y ? /* @__PURE__ */ f("div", {
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './components/inputs/InputText/InputTextGal';
|
|
2
|
+
export * from './components/inputs/CheckBox/CheckBoxGal';
|
|
3
|
+
export * from './components/inputs/Dropdown/DropDownGal';
|
|
4
|
+
export * from './components/inputs/InputFile/InputFileGal';
|
|
5
|
+
export * from './components/inputs/InputRadio/InputRadioGal';
|
|
6
|
+
export * from './components/inputs/Textarea/TextAreaGal';
|
|
7
|
+
export * from './components/Button/ButtonGal';
|
|
8
|
+
export * from './hooks/useOnClickOutside';
|
|
9
|
+
export * from './hooks/useValidateForms';
|
|
10
|
+
export * from './funtions/UnixActions';
|
|
11
|
+
export type { ButtonProps } from './models/Button/ButtonModel';
|
|
12
|
+
export type { NameCategory, NameAttributesCategory, AcceptProp } from './models/Catalogs/FileCatalog';
|
|
13
|
+
export type { ValidateProps } from './models/Hooks/ValidateModel';
|
|
14
|
+
export type { CheckProps } from './models/Inputs/CheckModel';
|
|
15
|
+
export type { DropDownProps, OptionsDropModel } from './models/Inputs/DropDownModel';
|
|
16
|
+
export type { InputFileProps } from './models/Inputs/InputFileModel';
|
|
17
|
+
export type { InputProps } from './models/Inputs/InputModel';
|
|
18
|
+
export type { RadioProps } from './models/Inputs/InputRadioModel';
|
|
19
|
+
export type { TextAreaProps } from './models/Inputs/TextAreaModel';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
export interface ButtonProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
action: () => void;
|
|
5
|
+
textSize?: string | number;
|
|
6
|
+
font?: 'OpenSansLight' | 'OpenSansRegular' | 'OpenSansSemiBold' | 'OpenSansBold' | 'OpenSansBolder';
|
|
7
|
+
width?: string | number;
|
|
8
|
+
height?: string | number;
|
|
9
|
+
icon?: string;
|
|
10
|
+
seeIcon?: boolean;
|
|
11
|
+
iconSize?: string | number;
|
|
12
|
+
iconColor?: string;
|
|
13
|
+
iconOn?: 'left' | 'right';
|
|
14
|
+
styleType?: 'ThemeDark' | 'ThemeLight' | 'ThemeGreen' | 'ThemeRed' | 'ThemeBlue' | 'ThemeYellow' | 'ThemePurple' | 'ThemeGray';
|
|
15
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
16
|
+
borderedStyle?: boolean;
|
|
17
|
+
padding?: string | number;
|
|
18
|
+
shadow?: boolean;
|
|
19
|
+
colorShadow?: string;
|
|
20
|
+
customClassButton?: string;
|
|
21
|
+
customClassLabel?: string;
|
|
22
|
+
customClassIcon?: string;
|
|
23
|
+
customIcon?: React.ReactNode;
|
|
24
|
+
args?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export declare const FileCatalog: {
|
|
2
|
+
readonly images: {
|
|
3
|
+
readonly common: "image/png, image/jpeg, image/gif, image/webp";
|
|
4
|
+
readonly png: "image/png";
|
|
5
|
+
readonly jpg: "image/jpeg, image/jpg";
|
|
6
|
+
readonly gif: "image/gif";
|
|
7
|
+
readonly svg: "image/svg+xml";
|
|
8
|
+
readonly webp: "image/webp";
|
|
9
|
+
readonly avif: "image/avif";
|
|
10
|
+
readonly ico: "image/x-icon, image/vnd.microsoft.icon";
|
|
11
|
+
readonly tiff: "image/tiff";
|
|
12
|
+
readonly bmp: "image/bmp";
|
|
13
|
+
readonly heic: "image/heic, image/heif";
|
|
14
|
+
};
|
|
15
|
+
readonly docs: {
|
|
16
|
+
readonly pdf: "application/pdf";
|
|
17
|
+
readonly word: ".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
18
|
+
readonly excel: ".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
19
|
+
readonly powerpoint: ".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
20
|
+
readonly odt: "application/vnd.oasis.opendocument.text";
|
|
21
|
+
readonly ods: "application/vnd.oasis.opendocument.spreadsheet";
|
|
22
|
+
readonly odp: "application/vnd.oasis.opendocument.presentation";
|
|
23
|
+
readonly txt: "text/plain";
|
|
24
|
+
readonly rtf: "application/rtf";
|
|
25
|
+
readonly csv: "text/csv";
|
|
26
|
+
readonly markdown: "text/markdown, .md";
|
|
27
|
+
readonly epub: "application/epub+zip";
|
|
28
|
+
};
|
|
29
|
+
readonly archives: {
|
|
30
|
+
readonly zip: "application/zip, application/x-zip-compressed";
|
|
31
|
+
readonly rar: "application/x-rar-compressed, .rar";
|
|
32
|
+
readonly sevenZ: "application/x-7z-compressed";
|
|
33
|
+
readonly tar: "application/x-tar";
|
|
34
|
+
readonly gz: "application/gzip";
|
|
35
|
+
readonly iso: "application/x-iso9660-image, .iso";
|
|
36
|
+
};
|
|
37
|
+
readonly media: {
|
|
38
|
+
readonly audio: "audio/*";
|
|
39
|
+
readonly video: "video/*";
|
|
40
|
+
readonly mp3: "audio/mpeg";
|
|
41
|
+
readonly wav: "audio/wav";
|
|
42
|
+
readonly ogg: "audio/ogg, video/ogg";
|
|
43
|
+
readonly mp4: "video/mp4";
|
|
44
|
+
readonly webm: "video/webm";
|
|
45
|
+
readonly mov: "video/quicktime";
|
|
46
|
+
readonly avi: "video/x-msvideo";
|
|
47
|
+
};
|
|
48
|
+
readonly fonts: {
|
|
49
|
+
readonly woff: "font/woff";
|
|
50
|
+
readonly woff2: "font/woff2";
|
|
51
|
+
readonly ttf: "font/ttf, application/x-font-ttf";
|
|
52
|
+
readonly otf: "font/otf, application/x-font-opentype";
|
|
53
|
+
readonly eot: "application/vnd.ms-fontobject";
|
|
54
|
+
};
|
|
55
|
+
readonly code: {
|
|
56
|
+
readonly html: "text/html";
|
|
57
|
+
readonly css: "text/css";
|
|
58
|
+
readonly js: "text/javascript, application/javascript, .mjs";
|
|
59
|
+
readonly ts: "application/typescript, .ts, .tsx";
|
|
60
|
+
readonly json: "application/json";
|
|
61
|
+
readonly xml: "application/xml, text/xml";
|
|
62
|
+
readonly python: "text/x-python, .py";
|
|
63
|
+
readonly java: "text/x-java-source, .java, application/java-archive, .jar";
|
|
64
|
+
readonly csharp: "text/plain, .cs";
|
|
65
|
+
readonly cpp: "text/x-c++, .cpp, .h, .hpp";
|
|
66
|
+
readonly c: "text/x-c, .c";
|
|
67
|
+
readonly php: "application/x-httpd-php, .php";
|
|
68
|
+
readonly sql: "application/sql, .sql";
|
|
69
|
+
readonly sh: "application/x-sh, .sh";
|
|
70
|
+
readonly yaml: "text/yaml, .yaml, .yml";
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export type NameCategory = keyof typeof FileCatalog;
|
|
74
|
+
export type NameAttributesCategory = {
|
|
75
|
+
[K in NameCategory]?: (keyof typeof FileCatalog[K])[];
|
|
76
|
+
};
|
|
77
|
+
type MixedCategory = NameCategory | NameAttributesCategory | '*';
|
|
78
|
+
export type AcceptProp = MixedCategory | MixedCategory[];
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
interface BaseProps {
|
|
2
|
+
setError?: (error: string) => void;
|
|
3
|
+
nameInput?: string;
|
|
4
|
+
canBeNull?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface TextValidation extends BaseProps {
|
|
7
|
+
typeInput: 'text';
|
|
8
|
+
value: string | null | undefined;
|
|
9
|
+
maxLength?: number;
|
|
10
|
+
minLength?: number;
|
|
11
|
+
regex?: RegExp;
|
|
12
|
+
needBeEqualTo?: string;
|
|
13
|
+
}
|
|
14
|
+
interface EmailValidation extends BaseProps {
|
|
15
|
+
typeInput: 'email';
|
|
16
|
+
value: string | null | undefined;
|
|
17
|
+
}
|
|
18
|
+
interface PhoneValidation extends BaseProps {
|
|
19
|
+
typeInput: 'phone';
|
|
20
|
+
value: string | null | undefined;
|
|
21
|
+
}
|
|
22
|
+
interface UrlValidation extends BaseProps {
|
|
23
|
+
typeInput: 'url';
|
|
24
|
+
value: string | null | undefined;
|
|
25
|
+
}
|
|
26
|
+
interface PassValidation extends BaseProps {
|
|
27
|
+
typeInput: 'pass';
|
|
28
|
+
value: string | null | undefined;
|
|
29
|
+
}
|
|
30
|
+
interface NumberValidation extends BaseProps {
|
|
31
|
+
typeInput: 'num';
|
|
32
|
+
value: number | null | undefined;
|
|
33
|
+
min?: number;
|
|
34
|
+
max?: number;
|
|
35
|
+
isInteger?: boolean;
|
|
36
|
+
needBeEqualTo?: number;
|
|
37
|
+
}
|
|
38
|
+
interface BoolValidation extends BaseProps {
|
|
39
|
+
typeInput: 'bool';
|
|
40
|
+
value: boolean | null | undefined;
|
|
41
|
+
mustBeTrue?: boolean;
|
|
42
|
+
}
|
|
43
|
+
interface DateValidation extends BaseProps {
|
|
44
|
+
typeInput: 'date' | 'date-time';
|
|
45
|
+
value: Date | string | number | null | undefined;
|
|
46
|
+
min?: Date;
|
|
47
|
+
max?: Date;
|
|
48
|
+
}
|
|
49
|
+
interface TimeValidation extends BaseProps {
|
|
50
|
+
typeInput: 'time';
|
|
51
|
+
value: Date | string | number | null | undefined;
|
|
52
|
+
min?: Date;
|
|
53
|
+
max?: Date;
|
|
54
|
+
}
|
|
55
|
+
interface DataValidation extends BaseProps {
|
|
56
|
+
typeInput: 'data';
|
|
57
|
+
value: any | null | undefined;
|
|
58
|
+
}
|
|
59
|
+
export type ValidateProps = TextValidation | EmailValidation | PhoneValidation | UrlValidation | PassValidation | NumberValidation | BoolValidation | DateValidation | TimeValidation | DataValidation;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface CheckProps {
|
|
3
|
+
label: string;
|
|
4
|
+
value: boolean;
|
|
5
|
+
setValue: (value: boolean) => void;
|
|
6
|
+
textSize?: number | string;
|
|
7
|
+
textColor?: string;
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
useLinkable?: boolean;
|
|
10
|
+
link?: string;
|
|
11
|
+
iconSize?: string | number;
|
|
12
|
+
seeIcon: boolean;
|
|
13
|
+
icon?: string;
|
|
14
|
+
iconColor?: string;
|
|
15
|
+
customInputClass?: string;
|
|
16
|
+
customLabelClass?: string;
|
|
17
|
+
customIconClass?: string;
|
|
18
|
+
customIcon?: React.ReactNode;
|
|
19
|
+
args?: InputHTMLAttributes<HTMLInputElement>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface OptionsDropModel {
|
|
2
|
+
valueOption: number | string | null;
|
|
3
|
+
text: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
iconColor?: string;
|
|
6
|
+
customIcon?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface DropDownProps {
|
|
9
|
+
label?: string;
|
|
10
|
+
value: OptionsDropModel | null;
|
|
11
|
+
setValue: (value: OptionsDropModel | null) => void;
|
|
12
|
+
options: OptionsDropModel[];
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
errorMessage?: string;
|
|
15
|
+
iconInRight?: boolean;
|
|
16
|
+
orientation?: 'top' | 'left' | 'right' | 'bottom';
|
|
17
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
18
|
+
border?: boolean;
|
|
19
|
+
textSize?: number | string;
|
|
20
|
+
textColor?: string;
|
|
21
|
+
labelSize?: number | string;
|
|
22
|
+
labelColor?: string;
|
|
23
|
+
width?: number | string;
|
|
24
|
+
height?: number | string;
|
|
25
|
+
bgColor?: string;
|
|
26
|
+
shadow?: boolean;
|
|
27
|
+
icon?: string;
|
|
28
|
+
iconSize?: string | number;
|
|
29
|
+
iconsOptionsSize?: string | number;
|
|
30
|
+
seeIcon?: boolean;
|
|
31
|
+
seeOptionsIcons?: boolean;
|
|
32
|
+
iconsColor?: string;
|
|
33
|
+
customIcon?: React.ReactNode;
|
|
34
|
+
customContainerClass?: string;
|
|
35
|
+
customInputClass?: string;
|
|
36
|
+
customLabelClass?: string;
|
|
37
|
+
customIconClass?: string;
|
|
38
|
+
customOptionClass?: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { AcceptProp } from '../Catalogs/FileCatalog';
|
|
3
|
+
export interface InputFileProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
acceptFiles?: AcceptProp;
|
|
6
|
+
textButtonCancel?: string;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
selectedFileE: File | null;
|
|
9
|
+
setSelectedFileE: (e: File | null) => void;
|
|
10
|
+
maxMBSize?: number;
|
|
11
|
+
shadow?: boolean;
|
|
12
|
+
width?: string | number;
|
|
13
|
+
height?: string | number;
|
|
14
|
+
bgColor?: string;
|
|
15
|
+
bgColorHover?: string;
|
|
16
|
+
labelSize?: number | string;
|
|
17
|
+
labelColor?: string;
|
|
18
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
19
|
+
iconSize?: string | number;
|
|
20
|
+
seeIcon?: boolean;
|
|
21
|
+
icon?: string;
|
|
22
|
+
iconColor?: string;
|
|
23
|
+
customFIleClass?: string;
|
|
24
|
+
customSelectedClass?: string;
|
|
25
|
+
customLabelClass?: string;
|
|
26
|
+
customIconClass?: string;
|
|
27
|
+
customIcon?: React.ReactNode;
|
|
28
|
+
args?: InputHTMLAttributes<HTMLInputElement>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
type CompatibleInputTypes = 'text' | 'email' | 'password' | 'url' | 'tel' | 'number' | 'date' | 'time' | 'datetime-local' | 'search';
|
|
3
|
+
export interface InputProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
setValue?: (text: string) => void;
|
|
7
|
+
label?: string;
|
|
8
|
+
typeInput?: CompatibleInputTypes;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
11
|
+
width?: string | number;
|
|
12
|
+
height?: string | number;
|
|
13
|
+
shadow?: boolean;
|
|
14
|
+
border?: boolean;
|
|
15
|
+
textSize?: number | string;
|
|
16
|
+
textColor?: string;
|
|
17
|
+
bgColor?: string;
|
|
18
|
+
HorV?: "horizontal" | "vertical";
|
|
19
|
+
customContainerClass?: string;
|
|
20
|
+
customInputClass?: string;
|
|
21
|
+
customIconRClass?: string;
|
|
22
|
+
customIconLClass?: string;
|
|
23
|
+
seeIconLeft?: boolean;
|
|
24
|
+
seeIconRight?: boolean;
|
|
25
|
+
iconColorL?: string;
|
|
26
|
+
iconColorR?: string;
|
|
27
|
+
iconColorPass?: string;
|
|
28
|
+
iconSizeL?: number;
|
|
29
|
+
iconSizeR?: number;
|
|
30
|
+
iconSizePass?: number;
|
|
31
|
+
iconLeft?: string;
|
|
32
|
+
iconRight?: string;
|
|
33
|
+
customIconLeft?: React.ReactNode;
|
|
34
|
+
customIconRight?: React.ReactNode;
|
|
35
|
+
args?: InputHTMLAttributes<HTMLInputElement>;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface PropsOptions {
|
|
3
|
+
value: string | number;
|
|
4
|
+
label: string;
|
|
5
|
+
seeIcon: boolean;
|
|
6
|
+
icon?: string;
|
|
7
|
+
iconColor?: string;
|
|
8
|
+
customIcon?: React.ReactNode;
|
|
9
|
+
customIconClass?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RadioProps {
|
|
12
|
+
label: string;
|
|
13
|
+
name: string;
|
|
14
|
+
options: PropsOptions[];
|
|
15
|
+
setValue: (value: string) => void;
|
|
16
|
+
textSize?: number | string;
|
|
17
|
+
textColor?: string;
|
|
18
|
+
labelSize?: number | string;
|
|
19
|
+
labelColor?: string;
|
|
20
|
+
errorMessage?: string;
|
|
21
|
+
iconInRight?: boolean;
|
|
22
|
+
HorV?: 'horizontal' | 'vertical';
|
|
23
|
+
icon?: string;
|
|
24
|
+
iconSize?: string | number;
|
|
25
|
+
iconColor?: string;
|
|
26
|
+
seeIcon?: boolean;
|
|
27
|
+
customIcon?: React.ReactElement;
|
|
28
|
+
customInputClass?: string;
|
|
29
|
+
customLabelClass?: string;
|
|
30
|
+
customTextClass?: string;
|
|
31
|
+
customIconLabelClass?: string;
|
|
32
|
+
customContainerRadiosClass?: string;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
2
|
+
export interface TextAreaProps {
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
setValue?: (text: string) => void;
|
|
6
|
+
label?: string;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
seeMaxCharCounter?: boolean;
|
|
9
|
+
maxCharacters?: number;
|
|
10
|
+
rounded?: "none" | "sm" | "md" | "lg";
|
|
11
|
+
width?: string | number;
|
|
12
|
+
height?: string | number;
|
|
13
|
+
maxWidth?: string | number;
|
|
14
|
+
maxHeight?: string | number;
|
|
15
|
+
shadow?: boolean;
|
|
16
|
+
border?: boolean;
|
|
17
|
+
textSize?: number | string;
|
|
18
|
+
textColor?: string;
|
|
19
|
+
bgColor?: string;
|
|
20
|
+
iconInRight?: boolean;
|
|
21
|
+
resize?: boolean;
|
|
22
|
+
customContainerClass?: string;
|
|
23
|
+
customTextAreaClass?: string;
|
|
24
|
+
customIconClass?: string;
|
|
25
|
+
seeIcon?: boolean;
|
|
26
|
+
iconColor?: string;
|
|
27
|
+
iconSize?: number;
|
|
28
|
+
icon?: string;
|
|
29
|
+
customIcon?: React.ReactNode;
|
|
30
|
+
args?: TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
31
|
+
}
|