lawgic-dev-kit 0.15.7 → 0.15.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/atoms/UploadContainer/UploadContainer.js +25 -21
- package/dist/lawgic-dev-kit.umd.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/package.json +1 -1
package/dist/_virtual/index6.js
CHANGED
package/dist/_virtual/index7.js
CHANGED
|
@@ -13,7 +13,7 @@ import I from "../LoadingProgress/LoadingProgress.js";
|
|
|
13
13
|
import "../../molecules/InformationContainer/InformationContainer.js";
|
|
14
14
|
const V = ({
|
|
15
15
|
title: j = "drag_and_drop_your_files_here",
|
|
16
|
-
subtitle:
|
|
16
|
+
subtitle: f = null,
|
|
17
17
|
buttonTitle: v = "choose_files",
|
|
18
18
|
onUpload: b = () => {
|
|
19
19
|
},
|
|
@@ -32,27 +32,27 @@ const V = ({
|
|
|
32
32
|
// en KB
|
|
33
33
|
loading: y = !1,
|
|
34
34
|
loadingDuration: N = 1e4,
|
|
35
|
-
className:
|
|
35
|
+
className: p = ""
|
|
36
36
|
}) => {
|
|
37
|
-
const { t:
|
|
37
|
+
const { t: s } = L(), [u, a] = h(!1), [m, i] = h(""), c = P(null), D = o.map((e) => `.${e}`).join(","), x = (e) => {
|
|
38
38
|
const r = [];
|
|
39
39
|
let d = !1;
|
|
40
|
-
Array.from(e).forEach((
|
|
40
|
+
Array.from(e).forEach((l) => {
|
|
41
41
|
var g;
|
|
42
|
-
const B = ((g =
|
|
42
|
+
const B = ((g = l.name.split(".").pop()) == null ? void 0 : g.toLowerCase()) || "";
|
|
43
43
|
if (!o.includes(B)) {
|
|
44
44
|
i(
|
|
45
|
-
`El archivo ${
|
|
45
|
+
`El archivo ${l.name} tiene una extensión no permitida.`
|
|
46
46
|
), d = !0;
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
if (
|
|
49
|
+
if (l.size > n * 1024) {
|
|
50
50
|
i(
|
|
51
|
-
`El archivo ${
|
|
51
|
+
`El archivo ${l.name} excede el tamaño máximo de ${n}KB.`
|
|
52
52
|
), d = !0;
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
r.push(
|
|
55
|
+
r.push(l);
|
|
56
56
|
}), !d && r.length > 0 && (i(""), b(r));
|
|
57
57
|
}, w = () => {
|
|
58
58
|
c.current && c.current.click();
|
|
@@ -61,16 +61,16 @@ const V = ({
|
|
|
61
61
|
r && r.length > 0 && x(r), e.target.value = "";
|
|
62
62
|
}, C = (e) => {
|
|
63
63
|
e.preventDefault(), e.stopPropagation(), a(!0);
|
|
64
|
-
}, $ = (e) => {
|
|
65
|
-
e.preventDefault(), e.stopPropagation(), a(!1);
|
|
66
64
|
}, _ = (e) => {
|
|
65
|
+
e.preventDefault(), e.stopPropagation(), a(!1);
|
|
66
|
+
}, $ = (e) => {
|
|
67
67
|
e.preventDefault(), e.stopPropagation(), u || a(!0);
|
|
68
68
|
}, k = (e) => {
|
|
69
69
|
e.preventDefault(), e.stopPropagation(), a(!1);
|
|
70
70
|
const r = e.dataTransfer.files;
|
|
71
71
|
r.length > 0 && x(r);
|
|
72
72
|
};
|
|
73
|
-
return y ? /* @__PURE__ */ t.jsx("div", { className: `w-full mx-auto font-sans h-full ${
|
|
73
|
+
return y ? /* @__PURE__ */ t.jsx("div", { className: `w-full mx-auto font-sans h-full ${p} flex flex-col grow`, children: /* @__PURE__ */ t.jsx("div", { className: "bg-blue-50 p-16 rounded-2xl h-full flex flex-col grow", children: /* @__PURE__ */ t.jsxs(
|
|
74
74
|
"div",
|
|
75
75
|
{
|
|
76
76
|
className: "h-full grow flex items-center justify-center gap-16 border-[1.4px] border-dashed rounded-2xl pt-28 p-32 text-center transition-all duration-300 border-blue-100 select-none",
|
|
@@ -85,19 +85,19 @@ const V = ({
|
|
|
85
85
|
}
|
|
86
86
|
),
|
|
87
87
|
/* @__PURE__ */ t.jsxs("h4", { className: "text-body-s text-gray-400", children: [
|
|
88
|
-
|
|
88
|
+
s("loading"),
|
|
89
89
|
"..."
|
|
90
90
|
] })
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
|
-
) }) }) : /* @__PURE__ */ t.jsxs("div", { className: `w-full mx-auto font-sans h-full ${
|
|
94
|
-
/* @__PURE__ */ t.jsx("div", { className: "bg-blue-50 p-16 rounded-2xl", children: /* @__PURE__ */ t.jsxs(
|
|
93
|
+
) }) }) : /* @__PURE__ */ t.jsxs("div", { className: `w-full mx-auto font-sans h-full flex flex-col ${p}`, children: [
|
|
94
|
+
/* @__PURE__ */ t.jsx("div", { className: "bg-blue-50 p-16 rounded-2xl h-full grow", children: /* @__PURE__ */ t.jsxs(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
97
97
|
className: `flex flex-col border-[1.4px] border-dashed rounded-2xl pt-28 p-32 text-center cursor-pointer transition-all duration-300 ${u ? "border-blue-400 bg-blue-100/50" : "border-blue-100 hover:border-blue-400"}`,
|
|
98
98
|
onDragEnter: C,
|
|
99
|
-
onDragLeave:
|
|
100
|
-
onDragOver:
|
|
99
|
+
onDragLeave: _,
|
|
100
|
+
onDragOver: $,
|
|
101
101
|
onDrop: k,
|
|
102
102
|
onClick: w,
|
|
103
103
|
children: [
|
|
@@ -110,9 +110,9 @@ const V = ({
|
|
|
110
110
|
}
|
|
111
111
|
) }),
|
|
112
112
|
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
113
|
-
/* @__PURE__ */ t.jsx("h3", { className: "font-600 text-xl text-dark", children:
|
|
114
|
-
|
|
115
|
-
/* @__PURE__ */ t.jsx(T, { color: "blue", children:
|
|
113
|
+
/* @__PURE__ */ t.jsx("h3", { className: "font-600 text-xl text-dark", children: s(j) }),
|
|
114
|
+
f && /* @__PURE__ */ t.jsx("p", { className: "font-400 text-lg text-gray-500", children: s(f) }),
|
|
115
|
+
/* @__PURE__ */ t.jsx(T, { color: "blue", children: s(v) }),
|
|
116
116
|
/* @__PURE__ */ t.jsx(
|
|
117
117
|
"input",
|
|
118
118
|
{
|
|
@@ -131,7 +131,11 @@ const V = ({
|
|
|
131
131
|
m && /* @__PURE__ */ t.jsx("div", { className: "mt-3 text-sm text-red-500", children: m }),
|
|
132
132
|
/* @__PURE__ */ t.jsx("div", { className: "mt-10 w-full flex justify-center", children: /* @__PURE__ */ t.jsxs("span", { className: "text-gray-500 font-400 text-base", children: [
|
|
133
133
|
o.join(", ").toUpperCase(),
|
|
134
|
-
"
|
|
134
|
+
" ",
|
|
135
|
+
s("formats"),
|
|
136
|
+
". ",
|
|
137
|
+
s("maximum_size"),
|
|
138
|
+
":",
|
|
135
139
|
" ",
|
|
136
140
|
F(n, "mb")
|
|
137
141
|
] }) })
|
|
@@ -757,4 +757,4 @@ attempted value: ${a}
|
|
|
757
757
|
group-disabled:bg-gray-500
|
|
758
758
|
`,children:[a&&a,v.jsx("input",{id:n,name:n,disabled:o,placeholder:r,value:h,onChange:A=>m(A.target.value),onBlur:y,ref:g,className:"group bg-transparent w-full h-full font-600 placeholder:font-600 text-body-m disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden",...d}),c&&c]}),v.jsx("h4",{className:"font-500 text-label text-red-500 leading-none",children:(S==null?void 0:S.message)&&b(S.message,{x:w||E})})]})},sk=({label:e,value:t,className:n})=>v.jsxs("div",{className:`flex flex-col gap-4 ${n||""}`,children:[v.jsx("p",{className:"text-lg font-600 text-gray-800",children:e}),v.jsx("p",{className:"text-base font-400 text-gray-600",children:t})]}),ok=({options:e,onChange:t,value:n,disabled:r,error:i,label:o="Select an option",placeholder:a="Select an option...",className:c="",allowSearch:u=!1})=>{const[d,h]=I.useState(!1),[m,g]=I.useState(""),y=I.useRef(null),S=I.useRef(null),b=e.find(j=>j.value===n),E=I.useMemo(()=>e.map(j=>({...j,searchableLabel:typeof j.label=="string"?j.label:I.isValidElement(j.label)?vl(j.label):String(j.label),searchableValue:String(j.value)})),[e]),w=I.useMemo(()=>{const j={keys:[{name:"searchableLabel",weight:2},{name:"searchableValue",weight:1}],threshold:.2,distance:150,includeScore:!0,includeMatches:!0,ignoreLocation:!0,minMatchCharLength:1,shouldSort:!0,findAllMatches:!0};return new dT(E,j)},[E]),{x:A,y:O,strategy:$,refs:P,context:R}=gi({open:d,onOpenChange:h,middleware:[fi(8),hi(),di({padding:8}),No({apply({availableHeight:j,elements:W}){Object.assign(W.floating.style,{maxHeight:`${Math.min(j-10,300)}px`})},padding:8}),ps({element:S})],placement:"bottom-start",whileElementsMounted:ui}),V=gs(R),F=pi(R),{getReferenceProps:Y,getFloatingProps:Q}=yi([V,F]),{isMounted:ee,styles:de}=vs(R,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),fe=I.useMemo(()=>m.trim()?w.search(m).map(W=>({...W.item,score:W.score,matches:W.matches})):e,[m,w,e]),oe=j=>{t(j.value),h(!1),g("")},re=Y({onClick:()=>{r||(h(!d),!d&&y.current&&u&&setTimeout(()=>{var j;return(j=y.current)==null?void 0:j.focus()},100))}});return v.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${c}`,children:[o&&v.jsx("h6",{className:`text-gray-600 font-600 group ${i?"!text-red-500":""} text-label ${r?"text-gray-300":""}`,children:o}),v.jsxs("div",{ref:P.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer
|
|
759
759
|
border transition-all duration-200 ${r?"opacity-60 cursor-not-allowed":"hover:border-blue-400"}
|
|
760
|
-
${i?"border-red-500 hover:border-red-600":""} ${d?"border-blue-400":"border-blue-100"}`,...re,children:[b?v.jsx("div",{className:"flex items-center w-full",children:v.jsx("span",{className:"flex-grow font-600 text-body-m",children:b.label})}):v.jsx("span",{className:"text-gray-400 font-600 text-body-m",children:a}),v.jsx("svg",{className:`w-16 h-16 transition-transform ${d?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),i&&v.jsx("p",{className:"mt-1 text-sm text-red-600",children:i}),ee&&v.jsxs("div",{ref:P.setFloating,style:{position:$,top:O??0,left:A??0,...de,width:P.reference.current instanceof Element?P.reference.current.clientWidth:void 0,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...Q(),children:[u&&v.jsx("div",{className:"sticky top-0 bg-white p-8 border-b border-gray-100 z-20",children:v.jsxs("div",{className:"relative",children:[v.jsx("div",{className:"absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none",children:v.jsx("svg",{className:"h-16 w-16 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),v.jsx("input",{ref:y,type:"text",className:"w-full py-8 pl-40 pr-12 rounded-full focus:outline-none text-body-s",placeholder:"Search options...",value:m,onChange:j=>g(j.target.value),onClick:j=>j.stopPropagation(),autoFocus:!0}),m&&v.jsx("button",{className:"absolute inset-y-0 right-0 pr-12 flex items-center",onClick:j=>{j.stopPropagation(),g("")},children:v.jsx("svg",{className:"h-16 w-16 text-gray-400 hover:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})}),v.jsx("div",{className:"max-h-[250px] overflow-y-auto",children:fe.length>0?v.jsx("ul",{className:"py-4",children:fe.map((j,W)=>v.jsx("li",{className:`flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer ${n===j.value?"bg-blue-100/30 text-blue-500 font-medium":""}`,onClick:H=>{H.stopPropagation(),oe(j)},children:v.jsx("span",{children:j.label})},`${j.value}-${W}`))}):v.jsxs("div",{className:"px-16 py-16 text-center text-gray-500",children:[v.jsx("svg",{className:"mx-auto h-24 w-24 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),v.jsxs("p",{className:"mt-8 text-body-s",children:['No matches found for "',m,'"']})]})})]})]})},vl=e=>{if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(!e)return"";if(I.isValidElement(e)){const n=e.props.children;return n?Array.isArray(n)?n.map(vl).join(" "):vl(n):""}return Array.isArray(e)?e.map(vl).join(" "):""},Lw=({size:e=100,strokeWidth:t=4,color:n="#1DA696",duration:r=3e3,label:i="",initialProgress:o=0,automaticProgress:a=!0,...c})=>{const[u,d]=I.useState(o),h=(e-t)/2,m=2*Math.PI*h,g=m*(1-u/100),{className:y="",...S}=c;return I.useEffect(()=>{if(!a)return;let b,E;const w=A=>{b||(b=A);const O=A-b,$=Math.min(100,O/r*100);d($),$<100&&(E=requestAnimationFrame(w))};return E=requestAnimationFrame(w),()=>{E&&cancelAnimationFrame(E)}},[r,a]),v.jsxs("div",{...S,className:`relative flex items-center justify-center ${y}`,children:[v.jsxs("svg",{height:e,width:e,className:"transform -rotate-90",children:[v.jsx("circle",{stroke:"#E5E7EB",fill:"transparent",strokeWidth:t,r:h,cx:e/2,cy:e/2}),v.jsx("circle",{stroke:n,fill:"transparent",strokeWidth:t,strokeDasharray:m,strokeDashoffset:g,strokeLinecap:"round",r:h,cx:e/2,cy:e/2})]}),v.jsxs("div",{className:"absolute flex flex-col items-center justify-center",children:[i&&v.jsx("div",{className:"text-xs font-medium text-gray-500",children:i}),v.jsxs("div",{className:"text-lg font-semibold",style:{color:n},children:[Math.round(u),"%"]})]})]})},ak=({title:e="drag_and_drop_your_files_here",subtitle:t=null,buttonTitle:n="choose_files",onUpload:r=()=>{},acceptedExtensions:i=["pdf","png","jpg","jpeg","svg","docx","doc","xls","xlsx"],maxSize:o=1024,loading:a=!1,loadingDuration:c=1e4,className:u=""})=>{const{t:d}=ze(),[h,m]=I.useState(!1),[g,y]=I.useState(""),S=I.useRef(null),b=i.map(V=>`.${V}`).join(","),E=V=>{const F=[];let Y=!1;Array.from(V).forEach(Q=>{var de;const ee=((de=Q.name.split(".").pop())==null?void 0:de.toLowerCase())||"";if(!i.includes(ee)){y(`El archivo ${Q.name} tiene una extensión no permitida.`),Y=!0;return}if(Q.size>o*1024){y(`El archivo ${Q.name} excede el tamaño máximo de ${o}KB.`),Y=!0;return}F.push(Q)}),!Y&&F.length>0&&(y(""),r(F))},w=()=>{S.current&&S.current.click()},A=V=>{const F=V.target.files;F&&F.length>0&&E(F),V.target.value=""},O=V=>{V.preventDefault(),V.stopPropagation(),m(!0)},$=V=>{V.preventDefault(),V.stopPropagation(),m(!1)},P=V=>{V.preventDefault(),V.stopPropagation(),h||m(!0)},R=V=>{V.preventDefault(),V.stopPropagation(),m(!1);const F=V.dataTransfer.files;F.length>0&&E(F)};return a?v.jsx("div",{className:`w-full mx-auto font-sans h-full ${u} flex flex-col grow`,children:v.jsx("div",{className:"bg-blue-50 p-16 rounded-2xl h-full flex flex-col grow",children:v.jsxs("div",{className:"h-full grow flex items-center justify-center gap-16 border-[1.4px] border-dashed rounded-2xl pt-28 p-32 text-center transition-all duration-300 border-blue-100 select-none",children:[v.jsx(Lw,{size:75,duration:c,strokeWidth:6,color:"#4570EB"}),v.jsxs("h4",{className:"text-body-s text-gray-400",children:[d("loading"),"..."]})]})})}):v.jsxs("div",{className:`w-full mx-auto font-sans h-full ${u}`,children:[v.jsx("div",{className:"bg-blue-50 p-16 rounded-2xl",children:v.jsxs("div",{className:`flex flex-col border-[1.4px] border-dashed rounded-2xl pt-28 p-32 text-center cursor-pointer transition-all duration-300 ${h?"border-blue-400 bg-blue-100/50":"border-blue-100 hover:border-blue-400"}`,onDragEnter:O,onDragLeave:$,onDragOver:P,onDrop:R,onClick:w,children:[v.jsx("div",{className:"flex justify-center translate-y-4",children:v.jsx("img",{className:"w-full h-auto max-w-160",src:"/images/svg/empty-state/empty-state-upload.svg",alt:"empty-state"})}),v.jsxs("div",{className:"flex flex-col items-center",children:[v.jsx("h3",{className:"font-600 text-xl text-dark",children:d(e)}),t&&v.jsx("p",{className:"font-400 text-lg text-gray-500",children:d(t)}),v.jsx(Nw,{color:"blue",children:d(n)}),v.jsx("input",{type:"file",ref:S,className:"hidden",multiple:!0,accept:b,onChange:A})]})]})}),g&&v.jsx("div",{className:"mt-3 text-sm text-red-500",children:g}),v.jsx("div",{className:"mt-10 w-full flex justify-center",children:v.jsxs("span",{className:"text-gray-500 font-400 text-base",children:[i.join(", ").toUpperCase()," formats. Maximus size:"," ",wv(o,"mb")]})})]})},ln=8,lk=1e3,ck="300px",uk={top:"bottom",right:"left",bottom:"top",left:"right"},fk={top:{borderLeft:`${ln}px solid transparent`,borderRight:`${ln}px solid transparent`,borderTop:`${ln}px solid #C7C8CA`},bottom:{borderLeft:`${ln}px solid transparent`,borderRight:`${ln}px solid transparent`,borderBottom:`${ln}px solid #C7C8CA`},left:{borderTop:`${ln}px solid transparent`,borderBottom:`${ln}px solid transparent`,borderLeft:`${ln}px solid #C7C8CA`},right:{borderTop:`${ln}px solid transparent`,borderBottom:`${ln}px solid transparent`,borderRight:`${ln}px solid #C7C8CA`}},dk=({children:e,message:t,className:n="",placement:r="top",offset:i=8,delay:o=0})=>{const[a,c]=I.useState(!1),u=I.useRef(null),{x:d,y:h,strategy:m,placement:g,refs:y,context:S,middlewareData:b}=gi({open:a,onOpenChange:c,placement:r,middleware:[fi(i),hi(),di({padding:8}),ps({element:u})],whileElementsMounted:ui}),E=z5(S,{delay:o}),w=K5(S),A=pi(S),O=Z5(S,{role:"tooltip"}),{getReferenceProps:$,getFloatingProps:P}=yi([E,w,A,O]),R=g.split("-")[0],V=uk[R],{x:F,y:Y}=b.arrow||{x:0,y:0},Q=I.cloneElement(e,{ref:y.setReference,...$()});return v.jsxs(v.Fragment,{children:[Q,v.jsx(Kn,{children:a&&v.jsx("div",{ref:y.setFloating,style:{position:m,top:h??0,left:d??0,zIndex:lk,width:"max-content",maxWidth:ck},...P(),children:v.jsxs(Ze.div,{className:`py-10 px-16 rounded-xl text-md bg-gray-200 text-gray-800 font-600 shadow-lg ${n} relative`,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeOut"},children:[t,v.jsx("div",{ref:u,className:"absolute w-0 h-0 tooltip-arrow-light",style:{position:"absolute",left:F!=null?`${F}px`:"",top:Y!=null?`${Y}px`:"",[V]:"-7px",...fk[R]}})]})})})]})},hk="Alejo",mk=({theme:e={},children:t})=>{const n={...Md,...e};return v.jsx(bx.Provider,{value:n,children:t})};se.ActionButton=kC,se.AlertModal=xx,se.AsyncToast=tv,se.Avatar=cw,se.BoxContainer=bs,se.Button=jo,se.CalendarSelector=Xd,se.CenterModal=gw,se.Checkbox=RN,se.CountryDropdown=pL,se.CountryInput=hL,se.CountryLabel=mL,se.DateInput=iN,se.DialogModal=rw,se.Divider=pw,se.Dropdown=aN,se.FileUpload=lN,se.FloatingMenu=Lo,se.IconButton=uh,se.ImageProfileInput=vL,se.IndexedStep=sw,se.IndexedStepper=cN,se.InfoCard=xL,se.InformationContainer=ow,se.InformationDisclaimer=SL,se.LoadingProgress=Lw,se.LoadingSpinner=TL,se.ModalContainer=xN,se.Organism=hk,se.PasswordInput=EL,se.PhoneInput=CL,se.ProgressBar=ML,se.SearchBar=_L,se.SearchModal=fN,se.SectionButton=zL,se.SelectInput=GL,se.SidebarButton=XL,se.Stepper=gN,se.Tab=Rw,se.Tabs=yN,se.TextButton=Nw,se.TextInput=ik,se.TextStaticInput=sk,se.ThemeProvider=mk,se.Toast=pf,se.Tooltip=dk,se.UncontrolledDateInput=bN,se.UncontrolledSelector=ok,se.UncontrolledTextInput=Zd,se.UploadContainer=ak,se.capitalizeFirstLetter=xv,se.closeModal=TN,se.defaultTheme=Md,se.formatLocalizedDate=cD,se.getImageUrl=Sv,se.openCustomModal=SN,se.openModal=wN,se.renderTabContent=EN,se.showToastAsync=th,se.showToastLoading=lw,se.stringToColor=gf,se.toBase64=uD,se.toast=CN,se.translateBytes=wv,se.useTheme=ze,se.yupImageProfileValidator=bL,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|
|
760
|
+
${i?"border-red-500 hover:border-red-600":""} ${d?"border-blue-400":"border-blue-100"}`,...re,children:[b?v.jsx("div",{className:"flex items-center w-full",children:v.jsx("span",{className:"flex-grow font-600 text-body-m",children:b.label})}):v.jsx("span",{className:"text-gray-400 font-600 text-body-m",children:a}),v.jsx("svg",{className:`w-16 h-16 transition-transform ${d?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),i&&v.jsx("p",{className:"mt-1 text-sm text-red-600",children:i}),ee&&v.jsxs("div",{ref:P.setFloating,style:{position:$,top:O??0,left:A??0,...de,width:P.reference.current instanceof Element?P.reference.current.clientWidth:void 0,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...Q(),children:[u&&v.jsx("div",{className:"sticky top-0 bg-white p-8 border-b border-gray-100 z-20",children:v.jsxs("div",{className:"relative",children:[v.jsx("div",{className:"absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none",children:v.jsx("svg",{className:"h-16 w-16 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),v.jsx("input",{ref:y,type:"text",className:"w-full py-8 pl-40 pr-12 rounded-full focus:outline-none text-body-s",placeholder:"Search options...",value:m,onChange:j=>g(j.target.value),onClick:j=>j.stopPropagation(),autoFocus:!0}),m&&v.jsx("button",{className:"absolute inset-y-0 right-0 pr-12 flex items-center",onClick:j=>{j.stopPropagation(),g("")},children:v.jsx("svg",{className:"h-16 w-16 text-gray-400 hover:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})}),v.jsx("div",{className:"max-h-[250px] overflow-y-auto",children:fe.length>0?v.jsx("ul",{className:"py-4",children:fe.map((j,W)=>v.jsx("li",{className:`flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer ${n===j.value?"bg-blue-100/30 text-blue-500 font-medium":""}`,onClick:H=>{H.stopPropagation(),oe(j)},children:v.jsx("span",{children:j.label})},`${j.value}-${W}`))}):v.jsxs("div",{className:"px-16 py-16 text-center text-gray-500",children:[v.jsx("svg",{className:"mx-auto h-24 w-24 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),v.jsxs("p",{className:"mt-8 text-body-s",children:['No matches found for "',m,'"']})]})})]})]})},vl=e=>{if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(!e)return"";if(I.isValidElement(e)){const n=e.props.children;return n?Array.isArray(n)?n.map(vl).join(" "):vl(n):""}return Array.isArray(e)?e.map(vl).join(" "):""},Lw=({size:e=100,strokeWidth:t=4,color:n="#1DA696",duration:r=3e3,label:i="",initialProgress:o=0,automaticProgress:a=!0,...c})=>{const[u,d]=I.useState(o),h=(e-t)/2,m=2*Math.PI*h,g=m*(1-u/100),{className:y="",...S}=c;return I.useEffect(()=>{if(!a)return;let b,E;const w=A=>{b||(b=A);const O=A-b,$=Math.min(100,O/r*100);d($),$<100&&(E=requestAnimationFrame(w))};return E=requestAnimationFrame(w),()=>{E&&cancelAnimationFrame(E)}},[r,a]),v.jsxs("div",{...S,className:`relative flex items-center justify-center ${y}`,children:[v.jsxs("svg",{height:e,width:e,className:"transform -rotate-90",children:[v.jsx("circle",{stroke:"#E5E7EB",fill:"transparent",strokeWidth:t,r:h,cx:e/2,cy:e/2}),v.jsx("circle",{stroke:n,fill:"transparent",strokeWidth:t,strokeDasharray:m,strokeDashoffset:g,strokeLinecap:"round",r:h,cx:e/2,cy:e/2})]}),v.jsxs("div",{className:"absolute flex flex-col items-center justify-center",children:[i&&v.jsx("div",{className:"text-xs font-medium text-gray-500",children:i}),v.jsxs("div",{className:"text-lg font-semibold",style:{color:n},children:[Math.round(u),"%"]})]})]})},ak=({title:e="drag_and_drop_your_files_here",subtitle:t=null,buttonTitle:n="choose_files",onUpload:r=()=>{},acceptedExtensions:i=["pdf","png","jpg","jpeg","svg","docx","doc","xls","xlsx"],maxSize:o=1024,loading:a=!1,loadingDuration:c=1e4,className:u=""})=>{const{t:d}=ze(),[h,m]=I.useState(!1),[g,y]=I.useState(""),S=I.useRef(null),b=i.map(V=>`.${V}`).join(","),E=V=>{const F=[];let Y=!1;Array.from(V).forEach(Q=>{var de;const ee=((de=Q.name.split(".").pop())==null?void 0:de.toLowerCase())||"";if(!i.includes(ee)){y(`El archivo ${Q.name} tiene una extensión no permitida.`),Y=!0;return}if(Q.size>o*1024){y(`El archivo ${Q.name} excede el tamaño máximo de ${o}KB.`),Y=!0;return}F.push(Q)}),!Y&&F.length>0&&(y(""),r(F))},w=()=>{S.current&&S.current.click()},A=V=>{const F=V.target.files;F&&F.length>0&&E(F),V.target.value=""},O=V=>{V.preventDefault(),V.stopPropagation(),m(!0)},$=V=>{V.preventDefault(),V.stopPropagation(),m(!1)},P=V=>{V.preventDefault(),V.stopPropagation(),h||m(!0)},R=V=>{V.preventDefault(),V.stopPropagation(),m(!1);const F=V.dataTransfer.files;F.length>0&&E(F)};return a?v.jsx("div",{className:`w-full mx-auto font-sans h-full ${u} flex flex-col grow`,children:v.jsx("div",{className:"bg-blue-50 p-16 rounded-2xl h-full flex flex-col grow",children:v.jsxs("div",{className:"h-full grow flex items-center justify-center gap-16 border-[1.4px] border-dashed rounded-2xl pt-28 p-32 text-center transition-all duration-300 border-blue-100 select-none",children:[v.jsx(Lw,{size:75,duration:c,strokeWidth:6,color:"#4570EB"}),v.jsxs("h4",{className:"text-body-s text-gray-400",children:[d("loading"),"..."]})]})})}):v.jsxs("div",{className:`w-full mx-auto font-sans h-full flex flex-col ${u}`,children:[v.jsx("div",{className:"bg-blue-50 p-16 rounded-2xl h-full grow",children:v.jsxs("div",{className:`flex flex-col border-[1.4px] border-dashed rounded-2xl pt-28 p-32 text-center cursor-pointer transition-all duration-300 ${h?"border-blue-400 bg-blue-100/50":"border-blue-100 hover:border-blue-400"}`,onDragEnter:O,onDragLeave:$,onDragOver:P,onDrop:R,onClick:w,children:[v.jsx("div",{className:"flex justify-center translate-y-4",children:v.jsx("img",{className:"w-full h-auto max-w-160",src:"/images/svg/empty-state/empty-state-upload.svg",alt:"empty-state"})}),v.jsxs("div",{className:"flex flex-col items-center",children:[v.jsx("h3",{className:"font-600 text-xl text-dark",children:d(e)}),t&&v.jsx("p",{className:"font-400 text-lg text-gray-500",children:d(t)}),v.jsx(Nw,{color:"blue",children:d(n)}),v.jsx("input",{type:"file",ref:S,className:"hidden",multiple:!0,accept:b,onChange:A})]})]})}),g&&v.jsx("div",{className:"mt-3 text-sm text-red-500",children:g}),v.jsx("div",{className:"mt-10 w-full flex justify-center",children:v.jsxs("span",{className:"text-gray-500 font-400 text-base",children:[i.join(", ").toUpperCase()," ",d("formats"),". ",d("maximum_size"),":"," ",wv(o,"mb")]})})]})},ln=8,lk=1e3,ck="300px",uk={top:"bottom",right:"left",bottom:"top",left:"right"},fk={top:{borderLeft:`${ln}px solid transparent`,borderRight:`${ln}px solid transparent`,borderTop:`${ln}px solid #C7C8CA`},bottom:{borderLeft:`${ln}px solid transparent`,borderRight:`${ln}px solid transparent`,borderBottom:`${ln}px solid #C7C8CA`},left:{borderTop:`${ln}px solid transparent`,borderBottom:`${ln}px solid transparent`,borderLeft:`${ln}px solid #C7C8CA`},right:{borderTop:`${ln}px solid transparent`,borderBottom:`${ln}px solid transparent`,borderRight:`${ln}px solid #C7C8CA`}},dk=({children:e,message:t,className:n="",placement:r="top",offset:i=8,delay:o=0})=>{const[a,c]=I.useState(!1),u=I.useRef(null),{x:d,y:h,strategy:m,placement:g,refs:y,context:S,middlewareData:b}=gi({open:a,onOpenChange:c,placement:r,middleware:[fi(i),hi(),di({padding:8}),ps({element:u})],whileElementsMounted:ui}),E=z5(S,{delay:o}),w=K5(S),A=pi(S),O=Z5(S,{role:"tooltip"}),{getReferenceProps:$,getFloatingProps:P}=yi([E,w,A,O]),R=g.split("-")[0],V=uk[R],{x:F,y:Y}=b.arrow||{x:0,y:0},Q=I.cloneElement(e,{ref:y.setReference,...$()});return v.jsxs(v.Fragment,{children:[Q,v.jsx(Kn,{children:a&&v.jsx("div",{ref:y.setFloating,style:{position:m,top:h??0,left:d??0,zIndex:lk,width:"max-content",maxWidth:ck},...P(),children:v.jsxs(Ze.div,{className:`py-10 px-16 rounded-xl text-md bg-gray-200 text-gray-800 font-600 shadow-lg ${n} relative`,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeOut"},children:[t,v.jsx("div",{ref:u,className:"absolute w-0 h-0 tooltip-arrow-light",style:{position:"absolute",left:F!=null?`${F}px`:"",top:Y!=null?`${Y}px`:"",[V]:"-7px",...fk[R]}})]})})})]})},hk="Alejo",mk=({theme:e={},children:t})=>{const n={...Md,...e};return v.jsx(bx.Provider,{value:n,children:t})};se.ActionButton=kC,se.AlertModal=xx,se.AsyncToast=tv,se.Avatar=cw,se.BoxContainer=bs,se.Button=jo,se.CalendarSelector=Xd,se.CenterModal=gw,se.Checkbox=RN,se.CountryDropdown=pL,se.CountryInput=hL,se.CountryLabel=mL,se.DateInput=iN,se.DialogModal=rw,se.Divider=pw,se.Dropdown=aN,se.FileUpload=lN,se.FloatingMenu=Lo,se.IconButton=uh,se.ImageProfileInput=vL,se.IndexedStep=sw,se.IndexedStepper=cN,se.InfoCard=xL,se.InformationContainer=ow,se.InformationDisclaimer=SL,se.LoadingProgress=Lw,se.LoadingSpinner=TL,se.ModalContainer=xN,se.Organism=hk,se.PasswordInput=EL,se.PhoneInput=CL,se.ProgressBar=ML,se.SearchBar=_L,se.SearchModal=fN,se.SectionButton=zL,se.SelectInput=GL,se.SidebarButton=XL,se.Stepper=gN,se.Tab=Rw,se.Tabs=yN,se.TextButton=Nw,se.TextInput=ik,se.TextStaticInput=sk,se.ThemeProvider=mk,se.Toast=pf,se.Tooltip=dk,se.UncontrolledDateInput=bN,se.UncontrolledSelector=ok,se.UncontrolledTextInput=Zd,se.UploadContainer=ak,se.capitalizeFirstLetter=xv,se.closeModal=TN,se.defaultTheme=Md,se.formatLocalizedDate=cD,se.getImageUrl=Sv,se.openCustomModal=SN,se.openModal=wN,se.renderTabContent=EN,se.showToastAsync=th,se.showToastLoading=lw,se.stringToColor=gf,se.toBase64=uD,se.toast=CN,se.translateBytes=wv,se.useTheme=ze,se.yupImageProfileValidator=bL,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index6.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|