@dipusevilla/componentes-iu 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -54,7 +54,7 @@ attempted value: ${i}
54
54
  text-[var(--color-ds-text-primary)]
55
55
  hover:bg-[var(--color-ds-background-surface)]
56
56
 
57
- `,onClick:()=>{g.onChange(A.value),m(!1)},children:A.label},A.value))})]})}})}function fi({schema:r}){const{layout:e,fields:t,onSubmit:s,successMessage:n,errorMessage:a,footerButtons:i,defaultValues:l,loadDefaultValues:c,validationSchema:f}=r,{show:d}=us(),{t:h}=It(),m=ni({fields:t,explicitSchema:f}),b=In({resolver:m,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),{control:E,reset:k,watch:F,handleSubmit:g,formState:{errors:p,isSubmitting:S}}=b,[A,C]=y.useState(!1);y.useEffect(()=>{c&&(C(!0),c().then(R=>k(R)).finally(()=>C(!1)))},[c,k]);const{loadingCount:Y,optionsMap:q}=ii(t),P=ai(t),Z=oi(t,E),G=y.useMemo(()=>{const R={};return e.forEach((w,z)=>{w.type==="tabs"&&(R[z]=w.tabs[0].key)}),R},[e]),[L,U]=y.useState(G),_=y.useCallback(R=>{const w=F(),{watchField:z,watchValue:te}=R;return typeof te=="function"?te(w):w[z]===te},[F]),M=y.useCallback(R=>{var B,X,Q,ie;let w;if(typeof R=="string"){if(w=P[R],!w)return null}else w=R;if("visibleWhen"in w&&w.visibleWhen&&!_(w.visibleWhen))return null;let z=!!w.disabled;if("disabledWhen"in w&&w.disabledWhen&&_(w.disabledWhen)&&(z=!0),!z&&"name"in w&&w.name&&Z[w.name]&&(z=!0),w.type==="search")return o.jsx(di,{name:w.name,control:E,searchFn:w.searchFn,label:w.label,size:w.size,width:w.width,disabled:z||S},w.name);if(w.type==="inputGroup"){const W=w,ue=W.inputs.map(ce=>{var Le;const H=typeof ce=="string"?P[ce]:ce;if(!H)return null;let de=!!H.disabled;H.disabledWhen&&_(H.disabledWhen)&&(de=!0),!de&&Z[H.name]&&(de=!0);const _e={name:H.name,control:E,rules:H.validation,defaultValue:void 0,label:H.label,size:H.size,width:H.width,placeholder:H.placeholder,hasError:!!p[H.name],errorMessage:((Le=p[H.name])==null?void 0:Le.message)||"",loading:A,disabled:de,suffixButton:H.suffixButton};return H.type==="select"?{..._e,options:H.options??q[H.name]??[],loadOptions:H.options?void 0:H.loadOptions}:_e}).filter(ce=>ce!==null);return o.jsx(is,{groupLabel:W.groupLabel,inputs:ue,separator:W.separator,useSeparator:W.useSeparator,className:W.className,showVisibleLabel:W.showVisibleLabel,size:W.size},`inputGroup_${W.groupLabel}`)}if(w.type==="button"){const W=w;return o.jsx("div",{className:"self-center",children:o.jsx(Te,{type:"button",variant:W.variant,size:W.size,width:W.width,icon:W.icon,iconPosition:W.iconPosition,ariaLabel:W.ariaLabel,onClick:W.onClick,disabled:z||S,children:W.label})},W.name)}const te=w.suffixButton,ne=typeof te=="string"?M(te):te,j={name:w.name,control:E,disabled:z||S,label:w.label,size:w.size,width:w.width,placeholder:w.placeholder,info:w.info,suffixButton:ne};switch(w.type){case"select":return o.jsx(be,{name:w.name,control:E,render:({field:W})=>{var ue;return o.jsx(Ge,{...j,value:W.value,onChange:W.onChange,options:w.options??q[w.name]??[],loadOptions:w.options?void 0:w.loadOptions,hasError:!!p[w.name],errorMessage:(ue=p[w.name])==null?void 0:ue.message,suffixButton:ne})}},w.name);case"textarea":return o.jsx(be,{name:w.name,control:E,render:({field:W,fieldState:ue})=>{var ce;return o.jsx(Zt,{...j,value:W.value,onChange:W.onChange,maxLength:w.maxLength,showCounter:!!w.showCounter,hasError:!!ue.error,errorMessage:((ce=ue.error)==null?void 0:ce.message)||""})}},w.name);case"file":return o.jsx(rs,{...j,defaultValue:[],maxFiles:w.maxFiles,accept:w.accept,hasError:!!p[w.name],errorMessage:(B=p[w.name])==null?void 0:B.message},w.name);case"checkbox":return o.jsx(ui,{...j,defaultValue:!1,hasError:!!p[w.name],errorMessage:(X=p[w.name])==null?void 0:X.message,name:w.name},w.name);case"date":return o.jsx(Qr,{...j,defaultValue:"",showTime:!!w.showTime,hasError:!!p[w.name],errorMessage:(Q=p[w.name])==null?void 0:Q.message},w.name);case"optionGroup":return o.jsx(os,{...j,options:w.options||[],multiple:w.multiple,vertical:w.vertical,groupLabel:w.groupLabel,defaultValue:void 0,className:w.width?void 0:"w-full",name:w.name},w.name);default:return o.jsx(Pt,{...j,type:w.type,loadingDefaults:A,hasError:!!p[w.name],errorMessage:(ie=p[w.name])==null?void 0:ie.message,suffixButton:ne,name:w.name},w.name)}},[P,E,p,S,A,q,_,Z]);return o.jsx(kn,{...b,children:o.jsxs("form",{noValidate:!0,onSubmit:g(async R=>{await s(R),d(n??h("ds.form.saveSuccess"),"success")},R=>{ma(R),d(a??h("ds.form.saveError"),"error")}),className:"space-y-6",children:[e.map((R,w)=>R.type==="rows"?o.jsx(y.Fragment,{children:R.sections.map((z,te)=>o.jsx("div",{className:"mb-6",children:o.jsx(_t,{title:z.sectionTitle,defaultOpen:z.defaultOpen,children:z.rows.map((ne,j)=>o.jsxs("div",{children:[ne.title&&o.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:ne.title}),o.jsx("div",{className:"flex flex-wrap -mx-2",children:ne.columns.map((B,X)=>{var Q;return o.jsx("div",{className:`${B.width??"flex-1"} px-2 flex flex-col`,children:o.jsx("div",{className:"space-y-4",children:(Q=B.fields)==null?void 0:Q.map((ie,W)=>o.jsx(y.Fragment,{children:M(ie)},W))})},X)})})]},j))})},te))},w):o.jsx(ns,{options:R.tabs.map(z=>({label:z.label,value:z.key})),value:L[w],onChange:z=>U(te=>({...te,[w]:z})),children:Object.fromEntries(R.tabs.map(z=>[z.key,o.jsx("div",{className:"space-y-6",children:z.sections.map((te,ne)=>o.jsx("div",{className:"mb-6",children:o.jsx(_t,{title:te.sectionTitle,defaultOpen:te.defaultOpen,children:te.rows.map((j,B)=>o.jsx("div",{children:o.jsx("div",{className:"flex flex-wrap -mx-2",children:j.columns.map((X,Q)=>{var ie;return o.jsx("div",{className:`${X.width??"flex-1"} px-2 flex flex-col`,children:o.jsx("div",{className:"space-y-4",children:(ie=X.fields)==null?void 0:ie.map((W,ue)=>o.jsx(y.Fragment,{children:M(W)},ue))})},Q)})})},B))})},ne))},z.key)]))},w)),o.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:i??o.jsx(Te,{variant:"primary",icon:Gs,size:"sm",disabled:S||A||Y>0,children:h(S?"ds.form.sending":"ds.form.submit")})})]})})}const hi={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function lt({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:n,...a}){return o.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:n,className:D("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",hi[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...a,children:o.jsx(r,{className:D(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function _s({dark:r,onToggle:e}){return o.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:D("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:o.jsxs("div",{className:D("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[o.jsx(ke,{component:gn,size:"sm",className:D("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),o.jsx(ke,{component:hn,size:"sm",className:D("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const Ns=y.createContext({theme:"light",toggle:()=>{}});function mi({children:r}){const[e,t]=y.useState(!1),[s,n]=y.useState("light");y.useEffect(()=>{if(typeof window>"u")return;const i=localStorage.getItem("ds-theme");i==="light"||i==="dark"?n(i):window.matchMedia("(prefers-color-scheme: dark)").matches&&n("dark"),t(!0)},[]),y.useEffect(()=>{e&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,e]);const a=()=>n(i=>i==="light"?"dark":"light");return e?o.jsx(Ns.Provider,{value:{theme:s,toggle:a},children:r}):null}const Fs=()=>y.useContext(Ns),Ss=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:n,languageOptions:a,onChangeLocale:i,profile:l,profileOptions:c,onChangeProfile:f})=>{const d=r.slice(0,3),{toggle:h}=Fs(),{t:m,i18n:b}=It(),E=k=>{b.changeLanguage(k),i(k)};return o.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(lt,{icon:xn,size:"sm",ariaLabel:m("back"),onClick:t}),o.jsx(lt,{icon:vn,size:"sm",ariaLabel:m("clearPins"),onClick:()=>r.forEach(k=>e(k.id))}),d.map(k=>o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("a",{href:k.href,className:D("inline-flex items-center rounded-lg","px-2 py-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:k.label}),o.jsx(lt,{icon:$t,size:"sm",ariaLabel:`${m("remove")} ${k.label}`,onClick:()=>e(k.id)})]},k.id))]}),o.jsx("div",{className:"flex-grow"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ge,{size:"sm",width:"auto",options:a,value:n,onChange:E,disableErrorPlaceholder:!0}),o.jsx(Ge,{size:"sm",width:"auto",options:c,value:l,onChange:f,disableErrorPlaceholder:!0}),o.jsx(_s,{dark:s,onToggle:h})]})]})},xi=({loading:r=!1,ariaLabel:e="Cargando..."})=>r?o.jsxs("div",{className:`\r
57
+ `,onClick:()=>{g.onChange(A.value),m(!1)},children:A.label},A.value))})]})}})}function fi({schema:r}){const{layout:e,fields:t,onSubmit:s,successMessage:n,errorMessage:a,footerButtons:i,defaultValues:l,loadDefaultValues:c,validationSchema:f}=r,{show:d}=us(),{t:h}=It(),m=ni({fields:t,explicitSchema:f}),b=In({resolver:m,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),{control:E,reset:k,watch:F,handleSubmit:g,formState:{errors:p,isSubmitting:S}}=b,[A,C]=y.useState(!1);y.useEffect(()=>{c&&(C(!0),c().then(R=>k(R)).finally(()=>C(!1)))},[c,k]);const{loadingCount:Y,optionsMap:q}=ii(t),P=ai(t),Z=oi(t,E),G=y.useMemo(()=>{const R={};return e.forEach((w,z)=>{w.type==="tabs"&&(R[z]=w.tabs[0].key)}),R},[e]),[L,U]=y.useState(G),_=y.useCallback(R=>{const w=F(),{watchField:z,watchValue:te}=R;return typeof te=="function"?te(w):w[z]===te},[F]),M=y.useCallback(R=>{var B,X,Q,ie;let w;if(typeof R=="string"){if(w=P[R],!w)return null}else w=R;if("visibleWhen"in w&&w.visibleWhen&&!_(w.visibleWhen))return null;let z=!!w.disabled;if("disabledWhen"in w&&w.disabledWhen&&_(w.disabledWhen)&&(z=!0),!z&&"name"in w&&w.name&&Z[w.name]&&(z=!0),w.type==="search")return o.jsx(di,{name:w.name,control:E,searchFn:w.searchFn,label:w.label,size:w.size,width:w.width,disabled:z||S},w.name);if(w.type==="inputGroup"){const W=w,ue=W.inputs.map(ce=>{var Le;const H=typeof ce=="string"?P[ce]:ce;if(!H)return null;let de=!!H.disabled;H.disabledWhen&&_(H.disabledWhen)&&(de=!0),!de&&Z[H.name]&&(de=!0);const _e={name:H.name,control:E,rules:H.validation,defaultValue:void 0,label:H.label,size:H.size,width:H.width,placeholder:H.placeholder,hasError:!!p[H.name],errorMessage:((Le=p[H.name])==null?void 0:Le.message)||"",loading:A,disabled:de,suffixButton:H.suffixButton};return H.type==="select"?{..._e,options:H.options??q[H.name]??[],loadOptions:H.options?void 0:H.loadOptions}:_e}).filter(ce=>ce!==null);return o.jsx(is,{groupLabel:W.groupLabel,inputs:ue,separator:W.separator,useSeparator:W.useSeparator,className:W.className,showVisibleLabel:W.showVisibleLabel,size:W.size},`inputGroup_${W.groupLabel}`)}if(w.type==="button"){const W=w;return o.jsx("div",{className:"self-center",children:o.jsx(Te,{type:"button",variant:W.variant,size:W.size,width:W.width,icon:W.icon,iconPosition:W.iconPosition,ariaLabel:W.ariaLabel,onClick:W.onClick,disabled:z||S,children:W.label})},W.name)}const te=w.suffixButton,ne=typeof te=="string"?M(te):te,j={name:w.name,control:E,disabled:z||S,label:w.label,size:w.size,width:w.width,placeholder:w.placeholder,info:w.info,suffixButton:ne};switch(w.type){case"select":return o.jsx(be,{name:w.name,control:E,render:({field:W})=>{var ue;return o.jsx(Ge,{...j,value:W.value,onChange:W.onChange,options:w.options??q[w.name]??[],loadOptions:w.options?void 0:w.loadOptions,hasError:!!p[w.name],errorMessage:(ue=p[w.name])==null?void 0:ue.message,suffixButton:ne})}},w.name);case"textarea":return o.jsx(be,{name:w.name,control:E,render:({field:W,fieldState:ue})=>{var ce;return o.jsx(Zt,{...j,value:W.value,onChange:W.onChange,maxLength:w.maxLength,showCounter:!!w.showCounter,hasError:!!ue.error,errorMessage:((ce=ue.error)==null?void 0:ce.message)||""})}},w.name);case"file":return o.jsx(rs,{...j,defaultValue:[],maxFiles:w.maxFiles,accept:w.accept,hasError:!!p[w.name],errorMessage:(B=p[w.name])==null?void 0:B.message},w.name);case"checkbox":return o.jsx(ui,{...j,defaultValue:!1,hasError:!!p[w.name],errorMessage:(X=p[w.name])==null?void 0:X.message,name:w.name},w.name);case"date":return o.jsx(Qr,{...j,defaultValue:"",showTime:!!w.showTime,hasError:!!p[w.name],errorMessage:(Q=p[w.name])==null?void 0:Q.message},w.name);case"optionGroup":return o.jsx(os,{...j,options:w.options||[],multiple:w.multiple,vertical:w.vertical,groupLabel:w.groupLabel,defaultValue:void 0,className:w.width?void 0:"w-full",name:w.name},w.name);default:return o.jsx(Pt,{...j,type:w.type,loadingDefaults:A,hasError:!!p[w.name],errorMessage:(ie=p[w.name])==null?void 0:ie.message,suffixButton:ne,name:w.name},w.name)}},[P,E,p,S,A,q,_,Z]);return o.jsx(kn,{...b,children:o.jsxs("form",{noValidate:!0,onSubmit:g(async R=>{await s(R),d(n??h("ds.form.saveSuccess"),"success")},R=>{ma(R),d(a??h("ds.form.saveError"),"error")}),className:"space-y-6",children:[e.map((R,w)=>R.type==="rows"?o.jsx(y.Fragment,{children:R.sections.map((z,te)=>o.jsx("div",{className:"mb-6",children:o.jsx(_t,{title:z.sectionTitle,defaultOpen:z.defaultOpen,children:z.rows.map((ne,j)=>o.jsxs("div",{children:[ne.title&&o.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:ne.title}),o.jsx("div",{className:"flex flex-wrap -mx-2",children:ne.columns.map((B,X)=>{var Q;return o.jsx("div",{className:`${B.width??"flex-1"} px-2 flex flex-col`,children:o.jsx("div",{className:"space-y-4",children:(Q=B.fields)==null?void 0:Q.map((ie,W)=>o.jsx(y.Fragment,{children:M(ie)},W))})},X)})})]},j))})},te))},w):o.jsx(ns,{options:R.tabs.map(z=>({label:z.label,value:z.key})),value:L[w],onChange:z=>U(te=>({...te,[w]:z})),children:Object.fromEntries(R.tabs.map(z=>[z.key,o.jsx("div",{className:"space-y-6",children:z.sections.map((te,ne)=>o.jsx("div",{className:"mb-6",children:o.jsx(_t,{title:te.sectionTitle,defaultOpen:te.defaultOpen,children:te.rows.map((j,B)=>o.jsx("div",{children:o.jsx("div",{className:"flex flex-wrap -mx-2",children:j.columns.map((X,Q)=>{var ie;return o.jsx("div",{className:`${X.width??"flex-1"} px-2 flex flex-col`,children:o.jsx("div",{className:"space-y-4",children:(ie=X.fields)==null?void 0:ie.map((W,ue)=>o.jsx(y.Fragment,{children:M(W)},ue))})},Q)})})},B))})},ne))},z.key)]))},w)),o.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:i??o.jsx(Te,{type:"submit",variant:"primary",icon:Gs,size:"sm",disabled:S||A||Y>0,children:h(S?"ds.form.sending":"ds.form.submit")})})]})})}const hi={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function lt({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:n,...a}){return o.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:n,className:D("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",hi[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...a,children:o.jsx(r,{className:D(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function _s({dark:r,onToggle:e}){return o.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:D("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:o.jsxs("div",{className:D("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[o.jsx(ke,{component:gn,size:"sm",className:D("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),o.jsx(ke,{component:hn,size:"sm",className:D("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const Ns=y.createContext({theme:"light",toggle:()=>{}});function mi({children:r}){const[e,t]=y.useState(!1),[s,n]=y.useState("light");y.useEffect(()=>{if(typeof window>"u")return;const i=localStorage.getItem("ds-theme");i==="light"||i==="dark"?n(i):window.matchMedia("(prefers-color-scheme: dark)").matches&&n("dark"),t(!0)},[]),y.useEffect(()=>{e&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,e]);const a=()=>n(i=>i==="light"?"dark":"light");return e?o.jsx(Ns.Provider,{value:{theme:s,toggle:a},children:r}):null}const Fs=()=>y.useContext(Ns),Ss=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:n,languageOptions:a,onChangeLocale:i,profile:l,profileOptions:c,onChangeProfile:f})=>{const d=r.slice(0,3),{toggle:h}=Fs(),{t:m,i18n:b}=It(),E=k=>{b.changeLanguage(k),i(k)};return o.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(lt,{icon:xn,size:"sm",ariaLabel:m("back"),onClick:t}),o.jsx(lt,{icon:vn,size:"sm",ariaLabel:m("clearPins"),onClick:()=>r.forEach(k=>e(k.id))}),d.map(k=>o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("a",{href:k.href,className:D("inline-flex items-center rounded-lg","px-2 py-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:k.label}),o.jsx(lt,{icon:$t,size:"sm",ariaLabel:`${m("remove")} ${k.label}`,onClick:()=>e(k.id)})]},k.id))]}),o.jsx("div",{className:"flex-grow"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ge,{size:"sm",width:"auto",options:a,value:n,onChange:E,disableErrorPlaceholder:!0}),o.jsx(Ge,{size:"sm",width:"auto",options:c,value:l,onChange:f,disableErrorPlaceholder:!0}),o.jsx(_s,{dark:s,onToggle:h})]})]})},xi=({loading:r=!1,ariaLabel:e="Cargando..."})=>r?o.jsxs("div",{className:`\r
58
58
  fixed inset-0\r
59
59
  flex items-center justify-center\r
60
60
  bg-[var(--color-ds-background-surface)]/90\r
package/dist/index.es.js CHANGED
@@ -5606,6 +5606,7 @@ function Ni({ schema: r }) {
5606
5606
  /* @__PURE__ */ o.jsx("footer", { className: "py-4 w-full flex justify-center space-x-4", children: i ?? /* @__PURE__ */ o.jsx(
5607
5607
  Ve,
5608
5608
  {
5609
+ type: "submit",
5609
5610
  variant: "primary",
5610
5611
  icon: Ws,
5611
5612
  size: "sm",
package/dist/index.umd.js CHANGED
@@ -55,7 +55,7 @@ attempted value: ${o}
55
55
  text-[var(--color-ds-text-primary)]
56
56
  hover:bg-[var(--color-ds-background-surface)]
57
57
 
58
- `,onClick:()=>{b.onChange(A.value),m(!1)},children:A.label},A.value))})]})}})}function ao({schema:r}){const{layout:e,fields:t,onSubmit:s,successMessage:a,errorMessage:n,footerButtons:o,defaultValues:l,loadDefaultValues:c,validationSchema:f}=r,{show:u}=Yr(),{t:h}=Ct(),m=Xn({fields:t,explicitSchema:f}),v=Da({resolver:m,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),{control:E,reset:j,watch:F,handleSubmit:b,formState:{errors:g,isSubmitting:S}}=v,[A,O]=x.useState(!1);x.useEffect(()=>{c&&(O(!0),c().then(D=>j(D)).finally(()=>O(!1)))},[c,j]);const{loadingCount:G,optionsMap:q}=Kn(t),P=Jn(t),B=Qn(t,E),X=x.useMemo(()=>{const D={};return e.forEach((w,Z)=>{w.type==="tabs"&&(D[Z]=w.tabs[0].key)}),D},[e]),[I,U]=x.useState(X),_=x.useCallback(D=>{const w=F(),{watchField:Z,watchValue:re}=D;return typeof re=="function"?re(w):w[Z]===re},[F]),L=x.useCallback(D=>{var R,J,ee,ie;let w;if(typeof D=="string"){if(w=P[D],!w)return null}else w=D;if("visibleWhen"in w&&w.visibleWhen&&!_(w.visibleWhen))return null;let Z=!!w.disabled;if("disabledWhen"in w&&w.disabledWhen&&_(w.disabledWhen)&&(Z=!0),!Z&&"name"in w&&w.name&&B[w.name]&&(Z=!0),w.type==="search")return i.jsx(so,{name:w.name,control:E,searchFn:w.searchFn,label:w.label,size:w.size,width:w.width,disabled:Z||S},w.name);if(w.type==="inputGroup"){const W=w,he=W.inputs.map(de=>{var Be;const H=typeof de=="string"?P[de]:de;if(!H)return null;let me=!!H.disabled;H.disabledWhen&&_(H.disabledWhen)&&(me=!0),!me&&B[H.name]&&(me=!0);const Ce={name:H.name,control:E,rules:H.validation,defaultValue:void 0,label:H.label,size:H.size,width:H.width,placeholder:H.placeholder,hasError:!!g[H.name],errorMessage:((Be=g[H.name])==null?void 0:Be.message)||"",loading:A,disabled:me,suffixButton:H.suffixButton};return H.type==="select"?{...Ce,options:H.options??q[H.name]??[],loadOptions:H.options?void 0:H.loadOptions}:Ce}).filter(de=>de!==null);return i.jsx(Rr,{groupLabel:W.groupLabel,inputs:he,separator:W.separator,useSeparator:W.useSeparator,className:W.className,showVisibleLabel:W.showVisibleLabel,size:W.size},`inputGroup_${W.groupLabel}`)}if(w.type==="button"){const W=w;return i.jsx("div",{className:"self-center",children:i.jsx(Ne,{type:"button",variant:W.variant,size:W.size,width:W.width,icon:W.icon,iconPosition:W.iconPosition,ariaLabel:W.ariaLabel,onClick:W.onClick,disabled:Z||S,children:W.label})},W.name)}const re=w.suffixButton,oe=typeof re=="string"?L(re):re,k={name:w.name,control:E,disabled:Z||S,label:w.label,size:w.size,width:w.width,placeholder:w.placeholder,info:w.info,suffixButton:oe};switch(w.type){case"select":return i.jsx(xe,{name:w.name,control:E,render:({field:W})=>{var he;return i.jsx(Je,{...k,value:W.value,onChange:W.onChange,options:w.options??q[w.name]??[],loadOptions:w.options?void 0:w.loadOptions,hasError:!!g[w.name],errorMessage:(he=g[w.name])==null?void 0:he.message,suffixButton:oe})}},w.name);case"textarea":return i.jsx(xe,{name:w.name,control:E,render:({field:W,fieldState:he})=>{var de;return i.jsx(Rt,{...k,value:W.value,onChange:W.onChange,maxLength:w.maxLength,showCounter:!!w.showCounter,hasError:!!he.error,errorMessage:((de=he.error)==null?void 0:de.message)||""})}},w.name);case"file":return i.jsx(Mr,{...k,defaultValue:[],maxFiles:w.maxFiles,accept:w.accept,hasError:!!g[w.name],errorMessage:(R=g[w.name])==null?void 0:R.message},w.name);case"checkbox":return i.jsx(ro,{...k,defaultValue:!1,hasError:!!g[w.name],errorMessage:(J=g[w.name])==null?void 0:J.message,name:w.name},w.name);case"date":return i.jsx(Tr,{...k,defaultValue:"",showTime:!!w.showTime,hasError:!!g[w.name],errorMessage:(ee=g[w.name])==null?void 0:ee.message},w.name);case"optionGroup":return i.jsx(Zr,{...k,options:w.options||[],multiple:w.multiple,vertical:w.vertical,groupLabel:w.groupLabel,defaultValue:void 0,className:w.width?void 0:"w-full",name:w.name},w.name);default:return i.jsx($t,{...k,type:w.type,loadingDefaults:A,hasError:!!g[w.name],errorMessage:(ie=g[w.name])==null?void 0:ie.message,suffixButton:oe,name:w.name},w.name)}},[P,E,g,S,A,q,_,B]);return i.jsx(xa,{...v,children:i.jsxs("form",{noValidate:!0,onSubmit:b(async D=>{await s(D),u(a??h("ds.form.saveSuccess"),"success")},D=>{cn(D),u(n??h("ds.form.saveError"),"error")}),className:"space-y-6",children:[e.map((D,w)=>D.type==="rows"?i.jsx(x.Fragment,{children:D.sections.map((Z,re)=>i.jsx("div",{className:"mb-6",children:i.jsx(yt,{title:Z.sectionTitle,defaultOpen:Z.defaultOpen,children:Z.rows.map((oe,k)=>i.jsxs("div",{children:[oe.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:oe.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:oe.columns.map((R,J)=>{var ee;return i.jsx("div",{className:`${R.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(ee=R.fields)==null?void 0:ee.map((ie,W)=>i.jsx(x.Fragment,{children:L(ie)},W))})},J)})})]},k))})},re))},w):i.jsx(Ir,{options:D.tabs.map(Z=>({label:Z.label,value:Z.key})),value:I[w],onChange:Z=>U(re=>({...re,[w]:Z})),children:Object.fromEntries(D.tabs.map(Z=>[Z.key,i.jsx("div",{className:"space-y-6",children:Z.sections.map((re,oe)=>i.jsx("div",{className:"mb-6",children:i.jsx(yt,{title:re.sectionTitle,defaultOpen:re.defaultOpen,children:re.rows.map((k,R)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:k.columns.map((J,ee)=>{var ie;return i.jsx("div",{className:`${J.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(ie=J.fields)==null?void 0:ie.map((W,he)=>i.jsx(x.Fragment,{children:L(W)},he))})},ee)})})},R))})},oe))},Z.key)]))},w)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:o??i.jsx(Ne,{variant:"primary",icon:Ws,size:"sm",disabled:S||A||G>0,children:h(S?"ds.form.sending":"ds.form.submit")})})]})})}const no={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function bt({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:a,...n}){return i.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:a,className:M("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",no[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...n,children:i.jsx(r,{className:M(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function ws({dark:r,onToggle:e}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:M("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:i.jsxs("div",{className:M("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[i.jsx(je,{component:fa,size:"sm",className:M("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(je,{component:la,size:"sm",className:M("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const ks=x.createContext({theme:"light",toggle:()=>{}});function oo({children:r}){const[e,t]=x.useState(!1),[s,a]=x.useState("light");x.useEffect(()=>{if(typeof window>"u")return;const o=localStorage.getItem("ds-theme");o==="light"||o==="dark"?a(o):window.matchMedia("(prefers-color-scheme: dark)").matches&&a("dark"),t(!0)},[]),x.useEffect(()=>{e&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,e]);const n=()=>a(o=>o==="light"?"dark":"light");return e?i.jsx(ks.Provider,{value:{theme:s,toggle:n},children:r}):null}const js=()=>x.useContext(ks),Es=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:a,languageOptions:n,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:f})=>{const u=r.slice(0,3),{toggle:h}=js(),{t:m,i18n:v}=Ct(),E=j=>{v.changeLanguage(j),o(j)};return i.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(bt,{icon:da,size:"sm",ariaLabel:m("back"),onClick:t}),i.jsx(bt,{icon:ma,size:"sm",ariaLabel:m("clearPins"),onClick:()=>r.forEach(j=>e(j.id))}),u.map(j=>i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("a",{href:j.href,className:M("inline-flex items-center rounded-lg","px-2 py-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:j.label}),i.jsx(bt,{icon:vt,size:"sm",ariaLabel:`${m("remove")} ${j.label}`,onClick:()=>e(j.id)})]},j.id))]}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Je,{size:"sm",width:"auto",options:n,value:a,onChange:E,disableErrorPlaceholder:!0}),i.jsx(Je,{size:"sm",width:"auto",options:c,value:l,onChange:f,disableErrorPlaceholder:!0}),i.jsx(ws,{dark:s,onToggle:h})]})]})},io=({loading:r=!1,ariaLabel:e="Cargando..."})=>r?i.jsxs("div",{className:`\r
58
+ `,onClick:()=>{b.onChange(A.value),m(!1)},children:A.label},A.value))})]})}})}function ao({schema:r}){const{layout:e,fields:t,onSubmit:s,successMessage:a,errorMessage:n,footerButtons:o,defaultValues:l,loadDefaultValues:c,validationSchema:f}=r,{show:u}=Yr(),{t:h}=Ct(),m=Xn({fields:t,explicitSchema:f}),v=Da({resolver:m,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),{control:E,reset:j,watch:F,handleSubmit:b,formState:{errors:g,isSubmitting:S}}=v,[A,O]=x.useState(!1);x.useEffect(()=>{c&&(O(!0),c().then(D=>j(D)).finally(()=>O(!1)))},[c,j]);const{loadingCount:G,optionsMap:q}=Kn(t),P=Jn(t),B=Qn(t,E),X=x.useMemo(()=>{const D={};return e.forEach((w,Z)=>{w.type==="tabs"&&(D[Z]=w.tabs[0].key)}),D},[e]),[I,U]=x.useState(X),_=x.useCallback(D=>{const w=F(),{watchField:Z,watchValue:re}=D;return typeof re=="function"?re(w):w[Z]===re},[F]),L=x.useCallback(D=>{var R,J,ee,ie;let w;if(typeof D=="string"){if(w=P[D],!w)return null}else w=D;if("visibleWhen"in w&&w.visibleWhen&&!_(w.visibleWhen))return null;let Z=!!w.disabled;if("disabledWhen"in w&&w.disabledWhen&&_(w.disabledWhen)&&(Z=!0),!Z&&"name"in w&&w.name&&B[w.name]&&(Z=!0),w.type==="search")return i.jsx(so,{name:w.name,control:E,searchFn:w.searchFn,label:w.label,size:w.size,width:w.width,disabled:Z||S},w.name);if(w.type==="inputGroup"){const W=w,he=W.inputs.map(de=>{var Be;const H=typeof de=="string"?P[de]:de;if(!H)return null;let me=!!H.disabled;H.disabledWhen&&_(H.disabledWhen)&&(me=!0),!me&&B[H.name]&&(me=!0);const Ce={name:H.name,control:E,rules:H.validation,defaultValue:void 0,label:H.label,size:H.size,width:H.width,placeholder:H.placeholder,hasError:!!g[H.name],errorMessage:((Be=g[H.name])==null?void 0:Be.message)||"",loading:A,disabled:me,suffixButton:H.suffixButton};return H.type==="select"?{...Ce,options:H.options??q[H.name]??[],loadOptions:H.options?void 0:H.loadOptions}:Ce}).filter(de=>de!==null);return i.jsx(Rr,{groupLabel:W.groupLabel,inputs:he,separator:W.separator,useSeparator:W.useSeparator,className:W.className,showVisibleLabel:W.showVisibleLabel,size:W.size},`inputGroup_${W.groupLabel}`)}if(w.type==="button"){const W=w;return i.jsx("div",{className:"self-center",children:i.jsx(Ne,{type:"button",variant:W.variant,size:W.size,width:W.width,icon:W.icon,iconPosition:W.iconPosition,ariaLabel:W.ariaLabel,onClick:W.onClick,disabled:Z||S,children:W.label})},W.name)}const re=w.suffixButton,oe=typeof re=="string"?L(re):re,k={name:w.name,control:E,disabled:Z||S,label:w.label,size:w.size,width:w.width,placeholder:w.placeholder,info:w.info,suffixButton:oe};switch(w.type){case"select":return i.jsx(xe,{name:w.name,control:E,render:({field:W})=>{var he;return i.jsx(Je,{...k,value:W.value,onChange:W.onChange,options:w.options??q[w.name]??[],loadOptions:w.options?void 0:w.loadOptions,hasError:!!g[w.name],errorMessage:(he=g[w.name])==null?void 0:he.message,suffixButton:oe})}},w.name);case"textarea":return i.jsx(xe,{name:w.name,control:E,render:({field:W,fieldState:he})=>{var de;return i.jsx(Rt,{...k,value:W.value,onChange:W.onChange,maxLength:w.maxLength,showCounter:!!w.showCounter,hasError:!!he.error,errorMessage:((de=he.error)==null?void 0:de.message)||""})}},w.name);case"file":return i.jsx(Mr,{...k,defaultValue:[],maxFiles:w.maxFiles,accept:w.accept,hasError:!!g[w.name],errorMessage:(R=g[w.name])==null?void 0:R.message},w.name);case"checkbox":return i.jsx(ro,{...k,defaultValue:!1,hasError:!!g[w.name],errorMessage:(J=g[w.name])==null?void 0:J.message,name:w.name},w.name);case"date":return i.jsx(Tr,{...k,defaultValue:"",showTime:!!w.showTime,hasError:!!g[w.name],errorMessage:(ee=g[w.name])==null?void 0:ee.message},w.name);case"optionGroup":return i.jsx(Zr,{...k,options:w.options||[],multiple:w.multiple,vertical:w.vertical,groupLabel:w.groupLabel,defaultValue:void 0,className:w.width?void 0:"w-full",name:w.name},w.name);default:return i.jsx($t,{...k,type:w.type,loadingDefaults:A,hasError:!!g[w.name],errorMessage:(ie=g[w.name])==null?void 0:ie.message,suffixButton:oe,name:w.name},w.name)}},[P,E,g,S,A,q,_,B]);return i.jsx(xa,{...v,children:i.jsxs("form",{noValidate:!0,onSubmit:b(async D=>{await s(D),u(a??h("ds.form.saveSuccess"),"success")},D=>{cn(D),u(n??h("ds.form.saveError"),"error")}),className:"space-y-6",children:[e.map((D,w)=>D.type==="rows"?i.jsx(x.Fragment,{children:D.sections.map((Z,re)=>i.jsx("div",{className:"mb-6",children:i.jsx(yt,{title:Z.sectionTitle,defaultOpen:Z.defaultOpen,children:Z.rows.map((oe,k)=>i.jsxs("div",{children:[oe.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:oe.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:oe.columns.map((R,J)=>{var ee;return i.jsx("div",{className:`${R.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(ee=R.fields)==null?void 0:ee.map((ie,W)=>i.jsx(x.Fragment,{children:L(ie)},W))})},J)})})]},k))})},re))},w):i.jsx(Ir,{options:D.tabs.map(Z=>({label:Z.label,value:Z.key})),value:I[w],onChange:Z=>U(re=>({...re,[w]:Z})),children:Object.fromEntries(D.tabs.map(Z=>[Z.key,i.jsx("div",{className:"space-y-6",children:Z.sections.map((re,oe)=>i.jsx("div",{className:"mb-6",children:i.jsx(yt,{title:re.sectionTitle,defaultOpen:re.defaultOpen,children:re.rows.map((k,R)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:k.columns.map((J,ee)=>{var ie;return i.jsx("div",{className:`${J.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(ie=J.fields)==null?void 0:ie.map((W,he)=>i.jsx(x.Fragment,{children:L(W)},he))})},ee)})})},R))})},oe))},Z.key)]))},w)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:o??i.jsx(Ne,{type:"submit",variant:"primary",icon:Ws,size:"sm",disabled:S||A||G>0,children:h(S?"ds.form.sending":"ds.form.submit")})})]})})}const no={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function bt({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:a,...n}){return i.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:a,className:M("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",no[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...n,children:i.jsx(r,{className:M(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function ws({dark:r,onToggle:e}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:M("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:i.jsxs("div",{className:M("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[i.jsx(je,{component:fa,size:"sm",className:M("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(je,{component:la,size:"sm",className:M("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const ks=x.createContext({theme:"light",toggle:()=>{}});function oo({children:r}){const[e,t]=x.useState(!1),[s,a]=x.useState("light");x.useEffect(()=>{if(typeof window>"u")return;const o=localStorage.getItem("ds-theme");o==="light"||o==="dark"?a(o):window.matchMedia("(prefers-color-scheme: dark)").matches&&a("dark"),t(!0)},[]),x.useEffect(()=>{e&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,e]);const n=()=>a(o=>o==="light"?"dark":"light");return e?i.jsx(ks.Provider,{value:{theme:s,toggle:n},children:r}):null}const js=()=>x.useContext(ks),Es=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:a,languageOptions:n,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:f})=>{const u=r.slice(0,3),{toggle:h}=js(),{t:m,i18n:v}=Ct(),E=j=>{v.changeLanguage(j),o(j)};return i.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(bt,{icon:da,size:"sm",ariaLabel:m("back"),onClick:t}),i.jsx(bt,{icon:ma,size:"sm",ariaLabel:m("clearPins"),onClick:()=>r.forEach(j=>e(j.id))}),u.map(j=>i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("a",{href:j.href,className:M("inline-flex items-center rounded-lg","px-2 py-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:j.label}),i.jsx(bt,{icon:vt,size:"sm",ariaLabel:`${m("remove")} ${j.label}`,onClick:()=>e(j.id)})]},j.id))]}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Je,{size:"sm",width:"auto",options:n,value:a,onChange:E,disableErrorPlaceholder:!0}),i.jsx(Je,{size:"sm",width:"auto",options:c,value:l,onChange:f,disableErrorPlaceholder:!0}),i.jsx(ws,{dark:s,onToggle:h})]})]})},io=({loading:r=!1,ariaLabel:e="Cargando..."})=>r?i.jsxs("div",{className:`\r
59
59
  fixed inset-0\r
60
60
  flex items-center justify-center\r
61
61
  bg-[var(--color-ds-background-surface)]/90\r
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dipusevilla/componentes-iu",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Librería de componentes React de Dipusevilla",
5
5
  "keywords": [
6
6
  "react",