ui-mathilde-web 0.11.6 → 0.11.7

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.
@@ -20176,7 +20176,7 @@ const Iu = "data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%20
20176
20176
  }
20177
20177
  ) : r ? /* @__PURE__ */ p("div", { className: `flex ${h}`, children: /* @__PURE__ */ p(r, { size: s || 50 }) }) : null,
20178
20178
  /* @__PURE__ */ B("div", { className: "flex flex-col pl-8", children: [
20179
- /* @__PURE__ */ p("h3", { className: "text-end text-base font-bold md:text-lg", children: /* @__PURE__ */ B("span", { className: "inline-flex items-center gap-2", children: [
20179
+ /* @__PURE__ */ p("h3", { className: "font-bold text-base md:text-lg text-end", children: /* @__PURE__ */ B("span", { className: "inline-flex items-center gap-2", children: [
20180
20180
  /* @__PURE__ */ p("span", { children: a }),
20181
20181
  d ? /* @__PURE__ */ p(
20182
20182
  $l,
@@ -20188,7 +20188,7 @@ const Iu = "data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%20
20188
20188
  }
20189
20189
  ) : null
20190
20190
  ] }) }),
20191
- o && /* @__PURE__ */ p("p", { className: "text-end text-lg font-semibold md:text-xl", children: o })
20191
+ o && /* @__PURE__ */ p("p", { className: "text-lg md:text-xl font-normal text-end", children: o })
20192
20192
  ] })
20193
20193
  ] }) });
20194
20194
  }
@@ -484,7 +484,7 @@ You may have forgotten to import it.`);var r=e.__emotion_real===e,s=r&&e.__emoti
484
484
 
485
485
  `,`;
486
486
  }
487
- `])),function(t){var e=t.menuItemStyles;return e},function(t){var e=t.rootStyles;return e},xe.button,function(t){var e=t.level,n=t.disabled,r=t.active,s=t.collapsed,a=t.rtl;return Gb({level:e,disabled:n,active:r,collapsed:s,rtl:a})},function(t){var e=t.buttonStyles;return e}),h5=function(t,e){var n,r=t.children,s=t.icon,a=t.className,o=t.prefix,i=t.suffix,l=t.active,c=l===void 0?!1:l,d=t.disabled,u=d===void 0?!1:d,h=t.component,g=t.rootStyles,m=zr(t,["children","icon","className","prefix","suffix","active","disabled","component","rootStyles"]),p=_.useContext(zi),b=_.useContext(Wi),y=b.collapsed,w=b.rtl,k=b.transitionDuration,v=Ad().menuItemStyles,x=function(N){if(v){var M={level:p,disabled:u,active:c,isSubmenu:!1},P=v.root,T=v.button,W=v.label,F=v.icon,C=v.prefix,O=v.suffix;switch(N){case"root":return typeof P=="function"?P(M):P;case"button":return typeof T=="function"?T(M):T;case"label":return typeof W=="function"?W(M):W;case"icon":return typeof F=="function"?F(M):F;case"prefix":return typeof C=="function"?C(M):C;case"suffix":return typeof O=="function"?O(M):O;default:return}}},S=(n={},n[xe.active]=c,n[xe.disabled]=u,n);return _.createElement(f5,{ref:e,className:lt(xe.menuItemRoot,S,a),menuItemStyles:x("root"),level:p,collapsed:y,rtl:w,disabled:u,active:c,buttonStyles:x("button"),rootStyles:g},_.createElement(Kb,Bt({className:lt(xe.button,S),"data-testid":"".concat(xe.button,"-test-id"),component:h,tabIndex:0},m),s&&_.createElement(yb,{rtl:w,className:lt(xe.icon,S),rootStyles:x("icon")},s),o&&_.createElement(vb,{collapsed:y,transitionDuration:k,firstLevel:p===0,className:lt(xe.prefix,S),rtl:w,rootStyles:x("prefix")},o),_.createElement(pb,{className:lt(xe.label,S),rootStyles:x("label")},r),i&&_.createElement(kb,{collapsed:y,transitionDuration:k,firstLevel:p===0,className:lt(xe.suffix,S),rootStyles:x("suffix")},i)))},g5=_.forwardRef(h5),Zb;const m5="p-4 z-50 bg-[#191960] text-white text-xs text-start font-semibold max-w-[280px] whitespace-normal break-words";function $a({content:t,trigger:e,children:n,disabled:r}){return r?f.jsx("div",{className:"flex",children:n}):f.jsx("div",{className:"flex",children:f.jsx(Jo,{content:t,trigger:e,className:m5,children:n})})}const Ud="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%200C13.971%200%2018%204.029%2018%209C18%2013.971%2013.971%2018%209%2018C4.029%2018%200%2013.971%200%209C0%204.029%204.029%200%209%200ZM8%208.25C7.58579%208.25%207.25%208.58579%207.25%209C7.25%209.41421%207.58579%209.75%208%209.75H8.25V14C8.25%2014.4142%208.58579%2014.75%209%2014.75C9.41421%2014.75%209.75%2014.4142%209.75%2014V9C9.75%208.58579%209.41421%208.25%209%208.25H8ZM8.74902%204.25C8.19966%204.25%207.74892%204.69502%207.75%205.25L7.75488%205.35254C7.80623%205.85661%208.2324%206.25%208.75%206.25C9.30221%206.25%209.75%205.80221%209.75%205.25C9.75%204.73062%209.35499%204.3061%208.85156%204.25488L8.74902%204.25Z'%20fill='%23191960'/%3e%3c/svg%3e",Xd=_.forwardRef((t,e)=>{const{imageUrl:n,icon:r,title:s,description:a,width:o,height:i,iconPosition:l,imagePosition:c,tooltip:d,tooltipContent:u,tooltipTrigger:h}=t,g={start:"justify-start",center:"justify-center",end:"justify-end"}[l||"center"];return f.jsx("div",{className:`${Pm.Card} flex flex-col border px-3.5 py-7`,ref:e,children:f.jsxs("div",{className:"flex justify-between",children:[n?f.jsx(Cr,{classIm:c||"mx-auto",src:n,alt:s,width:o,height:i}):r?f.jsx("div",{className:`flex ${g}`,children:f.jsx(r,{size:o||50})}):null,f.jsxs("div",{className:"flex flex-col pl-8",children:[f.jsx("h3",{className:"text-end text-base font-bold md:text-lg",children:f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx("span",{children:s}),d?f.jsx($a,{content:u||"",trigger:h||"hover",disabled:!u,children:f.jsx("img",{src:Ud,alt:"info",className:"size-4"})}):null]})}),a&&f.jsx("p",{className:"text-end text-lg font-semibold md:text-xl",children:a})]})]})})});Xd.displayName="Card";const p5=({aHref:t,logo:e,menuItems:n,campaignCards:r=[],onLogout:s,defaultCollapsed:a=!1,background:o="linear-gradient(180deg, rgba(25, 25, 96, 0.95) 0%, rgba(41, 41, 139, 0.95) 100%)",textColor:i="#ffffff",className:l=""})=>{const[c,d]=_.useState(a),[u,h]=_.useState(null),[g,m]=_.useState(new Set),[p,b]=_.useState(null),[y,w]=_.useState(null),k=n.filter(C=>C.position!=="bottom"),v=n.filter(C=>C.position==="bottom"),x=C=>typeof C=="string"?f.jsx("img",{src:C,style:{width:"20px",height:"20px"}}):C?_.createElement(C,{style:{width:"20px",height:"20px"}}):null,S=(C=!1,O=!1)=>({background:c?"transparent":O?"#FFFFFF55":C?"#FFFFFF22":"#FFFFFF33",color:i,borderRadius:C?"15px":"20px",button:{width:c?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:c?"0 0.25rem":"0 0.5rem",color:i,fontSize:C?"0.9rem":void 0}}),N=(C,O=!1,E)=>{const B=O?y===C.id:p===C.id;return f.jsx(g5,{icon:x(C.icon),onClick:()=>W(C,E),className:"mx-auto mb-1 rounded-md",rootStyles:S(O,B),children:O?C.label:f.jsxs("div",{className:"flex w-full items-center justify-between",children:[f.jsx("span",{children:C.label}),C.subMenuSection&&f.jsx(yD,{className:`text-lg transition-transform duration-200 ${g.has(C.id)?"rotate-180":""}`})]})},C.id)},M=C=>C.map(O=>f.jsxs("div",{children:[N(O),O.subMenuSection&&g.has(O.id)&&f.jsx("div",{className:"ml-4 space-y-1 mb-2",children:O.subMenuSection.items.map(E=>N(E,!0,O.id))})]},O.id)),P=()=>{u||d(!1)},T=()=>{u||(d(!0),m(new Set))},W=(C,O)=>{if(O?(b(O),w(C.id)):(b(C.id),w(null)),C.subMenuSection){const E=new Set(g);E.has(C.id)?E.delete(C.id):E.add(C.id),m(E)}else C.action?C.action():C.href&&(C.target==="_blank"?window.open(C.href,"_blank"):window.location.href=C.href)},F=C=>{C.action?C.action():C.href&&(C.target==="_blank"?window.open(C.href,"_blank"):window.location.href=C.href)};return f.jsx("div",{className:`fixed left-0 top-0 z-40 my-1 mx-2 ${l}`,children:f.jsxs("div",{className:"flex flex-col",onMouseEnter:P,onMouseLeave:T,children:[f.jsxs(YM,{collapsed:c,rootStyles:{[`.${Ue.container}`]:{background:o,color:i,height:"100vh",display:"flex",flexDirection:"column",width:c?"70px":"275px",transition:"all 400ms ease-in-out",borderRadius:"20px",boxShadow:"5px 0px 10px 0px #00000040;",padding:c?"0":"0.45rem"}},children:[f.jsx("div",{className:`${c?"mx-auto":""} mb-4 mt-10 `,children:f.jsx("a",{href:t||"/",children:f.jsx(Cr,{classIm:`${c?"mx-auto":"mx-4"}`,src:`${c?e.src.collapsed:e.src.expanded}`,alt:e.alt,width:c?e.width.collapsed:e.width.expanded,height:c?e.height.collapsed:e.height.expanded})})}),f.jsxs("div",{className:"flex h-full flex-col",children:[f.jsxs(XM,{className:"mx-2 flex-1 relative",children:[f.jsx("div",{className:"flex flex-col",children:M(k)}),f.jsx("div",{className:` ${g.size===0?"absolute bottom-0":""} w-full`,children:M(v)})]}),s&&f.jsx("div",{className:"w-full cursor-pointer py-4 px-6 mt-auto mb-1",children:f.jsx("div",{className:"flex rounded-2xl mb-1",style:{background:c?"transparent":"#FFFFFF1A",float:c?"none":"right",width:c?"20px":"fit-content",height:c?"20px":"fit-content",padding:c?"0":"0.5rem"},onClick:s,children:f.jsx("button",{style:{color:i,width:c?"20px":"fit-content",height:c?"20px":"fit-content"},children:f.jsx("img",{src:"https://ftp.mathilde-ads.com/382-1a63116bc0d0909114f6c93af9d3dd8d.svg",alt:"logout",width:c?"25px":"fit-content",height:c?"25px":"fit-content"})})})})]})]}),r.length>0&&f.jsx(w0,{width:"40%",isOpen:u==="campaigns",onClose:()=>h(null),children:f.jsxs("div",{className:"flex flex-col px-10 pb-5",children:[f.jsx("h2",{className:"mb-3 text-center font-bold",children:"Selecciona el tipo de campaña que quieres crear"}),f.jsx("div",{className:"flex",children:r.map(C=>f.jsx("div",{className:"flex w-3/6 p-2",onClick:()=>F(C),children:f.jsx(Xd,{imageUrl:C.imageUrl,title:C.title,description:C.description})},C.id))})]})})]})})},Gd={"mth-color-primary":"pagination-module__mth-color-primary__hNTQd","mth-input-number":"pagination-module__mth-input-number__2TY-u"};function b5(t){return Ee({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"square",strokeMiterlimit:"10",strokeWidth:"48",d:"M328 112 184 256l144 144"},child:[]}]})(t)}function y5(t){return Ee({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"square",strokeMiterlimit:"10",strokeWidth:"48",d:"m184 112 144 144-144 144"},child:[]}]})(t)}function Jb(t){return Ee({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368 144 144m224 0L144 368"},child:[]}]})(t)}const Kd=({currentPage:t,totalPages:e,onPageChange:n,value:r})=>f.jsxs("div",{className:"flex items-center justify-center gap-4",children:[f.jsxs("span",{className:"text-xs text-gray-700",children:["Ver  ",f.jsx("input",{type:"number",className:`w-8 h-8 text-xs ${Gd["mth-input-number"]}`,id:"itemsPerPage",defaultValue:r||15,maxLength:3})]}),f.jsx("button",{onClick:()=>n(t-1),disabled:t===1,className:" text-gray-500 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-50",children:f.jsx(b5,{className:`w-6 h-6 ${Gd["mth-color-primary"]}`})}),f.jsxs("span",{className:"text-xs text-gray-700",children:[t," DE ",e]}),f.jsx("button",{onClick:()=>n(t+1),disabled:t===e,className:"text-gray-500 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-50",children:f.jsx(y5,{className:`w-6 h-6 ${Gd["mth-color-primary"]}`})})]}),w5={mth_toggle:"toggle-module__mth_toggle__8NB4F"};function Qd({labelIzquierda:t,labelDerecha:e,checkedLabel:n,uncheckedLabel:r,checked:s=!1,disabled:a=!1,onChange:o,colors:i={},labelPosition:l="right",boldWhenActive:c=!1}){const[d,u]=_.useState(s),g={...{offBackgroundColor:"#EEEEEE",offCircleColor:"#BBBBBB",offCircleBorderColor:"#BBBBBB",onBackgroundColor:"#DEE9FF",onCircleColor:"#191960",onCircleBorderColor:"#191960"},...i},m=M=>{if(a)return;const P=M.target.checked;u(P),o==null||o(P)},p=d?g.onBackgroundColor:g.offBackgroundColor,b=d?g.onCircleColor:g.offCircleColor,y=d?g.onCircleBorderColor:g.offCircleBorderColor,w=t||n||r||e,k=`text-sm ${a?"text-gray-500":"text-gray-700"}`,v=t&&f.jsx("span",{className:!d&&c?"font-bold "+k:k,children:t}),x=e&&f.jsx("span",{className:d&&c?"font-bold "+k:k,children:e}),S=f.jsxs("label",{className:`inline-flex items-center ${a?"cursor-not-allowed opacity-60":"cursor-pointer"}`,children:[f.jsx("input",{type:"checkbox",className:"peer sr-only",checked:d,onChange:m,disabled:a}),f.jsx("div",{className:`${w5.mth_toggle} peer relative h-5 w-9 rounded-full
487
+ `])),function(t){var e=t.menuItemStyles;return e},function(t){var e=t.rootStyles;return e},xe.button,function(t){var e=t.level,n=t.disabled,r=t.active,s=t.collapsed,a=t.rtl;return Gb({level:e,disabled:n,active:r,collapsed:s,rtl:a})},function(t){var e=t.buttonStyles;return e}),h5=function(t,e){var n,r=t.children,s=t.icon,a=t.className,o=t.prefix,i=t.suffix,l=t.active,c=l===void 0?!1:l,d=t.disabled,u=d===void 0?!1:d,h=t.component,g=t.rootStyles,m=zr(t,["children","icon","className","prefix","suffix","active","disabled","component","rootStyles"]),p=_.useContext(zi),b=_.useContext(Wi),y=b.collapsed,w=b.rtl,k=b.transitionDuration,v=Ad().menuItemStyles,x=function(N){if(v){var M={level:p,disabled:u,active:c,isSubmenu:!1},P=v.root,T=v.button,W=v.label,F=v.icon,C=v.prefix,O=v.suffix;switch(N){case"root":return typeof P=="function"?P(M):P;case"button":return typeof T=="function"?T(M):T;case"label":return typeof W=="function"?W(M):W;case"icon":return typeof F=="function"?F(M):F;case"prefix":return typeof C=="function"?C(M):C;case"suffix":return typeof O=="function"?O(M):O;default:return}}},S=(n={},n[xe.active]=c,n[xe.disabled]=u,n);return _.createElement(f5,{ref:e,className:lt(xe.menuItemRoot,S,a),menuItemStyles:x("root"),level:p,collapsed:y,rtl:w,disabled:u,active:c,buttonStyles:x("button"),rootStyles:g},_.createElement(Kb,Bt({className:lt(xe.button,S),"data-testid":"".concat(xe.button,"-test-id"),component:h,tabIndex:0},m),s&&_.createElement(yb,{rtl:w,className:lt(xe.icon,S),rootStyles:x("icon")},s),o&&_.createElement(vb,{collapsed:y,transitionDuration:k,firstLevel:p===0,className:lt(xe.prefix,S),rtl:w,rootStyles:x("prefix")},o),_.createElement(pb,{className:lt(xe.label,S),rootStyles:x("label")},r),i&&_.createElement(kb,{collapsed:y,transitionDuration:k,firstLevel:p===0,className:lt(xe.suffix,S),rootStyles:x("suffix")},i)))},g5=_.forwardRef(h5),Zb;const m5="p-4 z-50 bg-[#191960] text-white text-xs text-start font-semibold max-w-[280px] whitespace-normal break-words";function $a({content:t,trigger:e,children:n,disabled:r}){return r?f.jsx("div",{className:"flex",children:n}):f.jsx("div",{className:"flex",children:f.jsx(Jo,{content:t,trigger:e,className:m5,children:n})})}const Ud="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%200C13.971%200%2018%204.029%2018%209C18%2013.971%2013.971%2018%209%2018C4.029%2018%200%2013.971%200%209C0%204.029%204.029%200%209%200ZM8%208.25C7.58579%208.25%207.25%208.58579%207.25%209C7.25%209.41421%207.58579%209.75%208%209.75H8.25V14C8.25%2014.4142%208.58579%2014.75%209%2014.75C9.41421%2014.75%209.75%2014.4142%209.75%2014V9C9.75%208.58579%209.41421%208.25%209%208.25H8ZM8.74902%204.25C8.19966%204.25%207.74892%204.69502%207.75%205.25L7.75488%205.35254C7.80623%205.85661%208.2324%206.25%208.75%206.25C9.30221%206.25%209.75%205.80221%209.75%205.25C9.75%204.73062%209.35499%204.3061%208.85156%204.25488L8.74902%204.25Z'%20fill='%23191960'/%3e%3c/svg%3e",Xd=_.forwardRef((t,e)=>{const{imageUrl:n,icon:r,title:s,description:a,width:o,height:i,iconPosition:l,imagePosition:c,tooltip:d,tooltipContent:u,tooltipTrigger:h}=t,g={start:"justify-start",center:"justify-center",end:"justify-end"}[l||"center"];return f.jsx("div",{className:`${Pm.Card} flex flex-col border px-3.5 py-7`,ref:e,children:f.jsxs("div",{className:"flex justify-between",children:[n?f.jsx(Cr,{classIm:c||"mx-auto",src:n,alt:s,width:o,height:i}):r?f.jsx("div",{className:`flex ${g}`,children:f.jsx(r,{size:o||50})}):null,f.jsxs("div",{className:"flex flex-col pl-8",children:[f.jsx("h3",{className:"font-bold text-base md:text-lg text-end",children:f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx("span",{children:s}),d?f.jsx($a,{content:u||"",trigger:h||"hover",disabled:!u,children:f.jsx("img",{src:Ud,alt:"info",className:"size-4"})}):null]})}),a&&f.jsx("p",{className:"text-lg md:text-xl font-normal text-end",children:a})]})]})})});Xd.displayName="Card";const p5=({aHref:t,logo:e,menuItems:n,campaignCards:r=[],onLogout:s,defaultCollapsed:a=!1,background:o="linear-gradient(180deg, rgba(25, 25, 96, 0.95) 0%, rgba(41, 41, 139, 0.95) 100%)",textColor:i="#ffffff",className:l=""})=>{const[c,d]=_.useState(a),[u,h]=_.useState(null),[g,m]=_.useState(new Set),[p,b]=_.useState(null),[y,w]=_.useState(null),k=n.filter(C=>C.position!=="bottom"),v=n.filter(C=>C.position==="bottom"),x=C=>typeof C=="string"?f.jsx("img",{src:C,style:{width:"20px",height:"20px"}}):C?_.createElement(C,{style:{width:"20px",height:"20px"}}):null,S=(C=!1,O=!1)=>({background:c?"transparent":O?"#FFFFFF55":C?"#FFFFFF22":"#FFFFFF33",color:i,borderRadius:C?"15px":"20px",button:{width:c?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:c?"0 0.25rem":"0 0.5rem",color:i,fontSize:C?"0.9rem":void 0}}),N=(C,O=!1,E)=>{const B=O?y===C.id:p===C.id;return f.jsx(g5,{icon:x(C.icon),onClick:()=>W(C,E),className:"mx-auto mb-1 rounded-md",rootStyles:S(O,B),children:O?C.label:f.jsxs("div",{className:"flex w-full items-center justify-between",children:[f.jsx("span",{children:C.label}),C.subMenuSection&&f.jsx(yD,{className:`text-lg transition-transform duration-200 ${g.has(C.id)?"rotate-180":""}`})]})},C.id)},M=C=>C.map(O=>f.jsxs("div",{children:[N(O),O.subMenuSection&&g.has(O.id)&&f.jsx("div",{className:"ml-4 space-y-1 mb-2",children:O.subMenuSection.items.map(E=>N(E,!0,O.id))})]},O.id)),P=()=>{u||d(!1)},T=()=>{u||(d(!0),m(new Set))},W=(C,O)=>{if(O?(b(O),w(C.id)):(b(C.id),w(null)),C.subMenuSection){const E=new Set(g);E.has(C.id)?E.delete(C.id):E.add(C.id),m(E)}else C.action?C.action():C.href&&(C.target==="_blank"?window.open(C.href,"_blank"):window.location.href=C.href)},F=C=>{C.action?C.action():C.href&&(C.target==="_blank"?window.open(C.href,"_blank"):window.location.href=C.href)};return f.jsx("div",{className:`fixed left-0 top-0 z-40 my-1 mx-2 ${l}`,children:f.jsxs("div",{className:"flex flex-col",onMouseEnter:P,onMouseLeave:T,children:[f.jsxs(YM,{collapsed:c,rootStyles:{[`.${Ue.container}`]:{background:o,color:i,height:"100vh",display:"flex",flexDirection:"column",width:c?"70px":"275px",transition:"all 400ms ease-in-out",borderRadius:"20px",boxShadow:"5px 0px 10px 0px #00000040;",padding:c?"0":"0.45rem"}},children:[f.jsx("div",{className:`${c?"mx-auto":""} mb-4 mt-10 `,children:f.jsx("a",{href:t||"/",children:f.jsx(Cr,{classIm:`${c?"mx-auto":"mx-4"}`,src:`${c?e.src.collapsed:e.src.expanded}`,alt:e.alt,width:c?e.width.collapsed:e.width.expanded,height:c?e.height.collapsed:e.height.expanded})})}),f.jsxs("div",{className:"flex h-full flex-col",children:[f.jsxs(XM,{className:"mx-2 flex-1 relative",children:[f.jsx("div",{className:"flex flex-col",children:M(k)}),f.jsx("div",{className:` ${g.size===0?"absolute bottom-0":""} w-full`,children:M(v)})]}),s&&f.jsx("div",{className:"w-full cursor-pointer py-4 px-6 mt-auto mb-1",children:f.jsx("div",{className:"flex rounded-2xl mb-1",style:{background:c?"transparent":"#FFFFFF1A",float:c?"none":"right",width:c?"20px":"fit-content",height:c?"20px":"fit-content",padding:c?"0":"0.5rem"},onClick:s,children:f.jsx("button",{style:{color:i,width:c?"20px":"fit-content",height:c?"20px":"fit-content"},children:f.jsx("img",{src:"https://ftp.mathilde-ads.com/382-1a63116bc0d0909114f6c93af9d3dd8d.svg",alt:"logout",width:c?"25px":"fit-content",height:c?"25px":"fit-content"})})})})]})]}),r.length>0&&f.jsx(w0,{width:"40%",isOpen:u==="campaigns",onClose:()=>h(null),children:f.jsxs("div",{className:"flex flex-col px-10 pb-5",children:[f.jsx("h2",{className:"mb-3 text-center font-bold",children:"Selecciona el tipo de campaña que quieres crear"}),f.jsx("div",{className:"flex",children:r.map(C=>f.jsx("div",{className:"flex w-3/6 p-2",onClick:()=>F(C),children:f.jsx(Xd,{imageUrl:C.imageUrl,title:C.title,description:C.description})},C.id))})]})})]})})},Gd={"mth-color-primary":"pagination-module__mth-color-primary__hNTQd","mth-input-number":"pagination-module__mth-input-number__2TY-u"};function b5(t){return Ee({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"square",strokeMiterlimit:"10",strokeWidth:"48",d:"M328 112 184 256l144 144"},child:[]}]})(t)}function y5(t){return Ee({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"square",strokeMiterlimit:"10",strokeWidth:"48",d:"m184 112 144 144-144 144"},child:[]}]})(t)}function Jb(t){return Ee({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368 144 144m224 0L144 368"},child:[]}]})(t)}const Kd=({currentPage:t,totalPages:e,onPageChange:n,value:r})=>f.jsxs("div",{className:"flex items-center justify-center gap-4",children:[f.jsxs("span",{className:"text-xs text-gray-700",children:["Ver  ",f.jsx("input",{type:"number",className:`w-8 h-8 text-xs ${Gd["mth-input-number"]}`,id:"itemsPerPage",defaultValue:r||15,maxLength:3})]}),f.jsx("button",{onClick:()=>n(t-1),disabled:t===1,className:" text-gray-500 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-50",children:f.jsx(b5,{className:`w-6 h-6 ${Gd["mth-color-primary"]}`})}),f.jsxs("span",{className:"text-xs text-gray-700",children:[t," DE ",e]}),f.jsx("button",{onClick:()=>n(t+1),disabled:t===e,className:"text-gray-500 hover:text-gray-700 disabled:cursor-not-allowed disabled:opacity-50",children:f.jsx(y5,{className:`w-6 h-6 ${Gd["mth-color-primary"]}`})})]}),w5={mth_toggle:"toggle-module__mth_toggle__8NB4F"};function Qd({labelIzquierda:t,labelDerecha:e,checkedLabel:n,uncheckedLabel:r,checked:s=!1,disabled:a=!1,onChange:o,colors:i={},labelPosition:l="right",boldWhenActive:c=!1}){const[d,u]=_.useState(s),g={...{offBackgroundColor:"#EEEEEE",offCircleColor:"#BBBBBB",offCircleBorderColor:"#BBBBBB",onBackgroundColor:"#DEE9FF",onCircleColor:"#191960",onCircleBorderColor:"#191960"},...i},m=M=>{if(a)return;const P=M.target.checked;u(P),o==null||o(P)},p=d?g.onBackgroundColor:g.offBackgroundColor,b=d?g.onCircleColor:g.offCircleColor,y=d?g.onCircleBorderColor:g.offCircleBorderColor,w=t||n||r||e,k=`text-sm ${a?"text-gray-500":"text-gray-700"}`,v=t&&f.jsx("span",{className:!d&&c?"font-bold "+k:k,children:t}),x=e&&f.jsx("span",{className:d&&c?"font-bold "+k:k,children:e}),S=f.jsxs("label",{className:`inline-flex items-center ${a?"cursor-not-allowed opacity-60":"cursor-pointer"}`,children:[f.jsx("input",{type:"checkbox",className:"peer sr-only",checked:d,onChange:m,disabled:a}),f.jsx("div",{className:`${w5.mth_toggle} peer relative h-5 w-9 rounded-full
488
488
  after:absolute after:start-[2px]
489
489
  after:top-0.5 after:h-4
490
490
  after:w-4 after:rounded-full
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-mathilde-web",
3
- "version": "0.11.6",
3
+ "version": "0.11.7",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"