mgv-backoffice 1.0.7 → 1.0.9

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.
@@ -1 +1 @@
1
- (function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@heroicons/vue/24/outline"),require("@heroicons/vue/24/solid")):typeof define=="function"&&define.amd?define(["exports","vue","@heroicons/vue/24/outline","@heroicons/vue/24/solid"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.UiLib={},s.Vue,s.HeroiconsOutline,s.HeroiconsSolid))})(this,function(s,e,g,V){"use strict";var h=(t=>(t.WARNING="WARNING",t.ERROR="ERROR",t.SUCCESS="SUCCESS",t.INFROM="INFROM",t))(h||{}),d=(t=>(t.NONE="NONE",t.RED="RED",t.YELLOW="YELLOW",t.BLACK="BLACK",t.GRAY="GRAY",t.GREEN="GREEN",t.BLUE="BLUE",t))(d||{});function S(t){let r="red";switch(t){case h.ERROR:r="red";break;case h.SUCCESS:r="green";break;case h.INFROM:r="gray";break;case h.WARNING:r="yellow";break}return r}function L(t){let r="red";switch(t){case d.GREEN:{r="green";break}case d.RED:{r="red";break}case d.BLUE:{r="blue";break}case d.YELLOW:{r="yellow";break}case d.NONE:{r="";break}}return r}const A={class:"font-medium pl-1"},O=e.defineComponent({__name:"BaseAlert",props:{title:{type:String,required:!1,default:h.ERROR},color:{type:Object,required:!1}},setup(t){const r=t;function l(){let a=S(r.color);return"flex items-center p-4 mb-4 text-sm text-"+a+"-800 border border-"+a+"-300 rounded-lg bg-"+a+"-50 dark:bg-gray-800 dark:text-"+a+"-400 dark:border-"+a+"-800"}return(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l()),role:"alert"},[e.createVNode(e.unref(g.InformationCircleIcon),{class:"w-6 h-6 text-gray-400"}),e.createElementVNode("div",null,[e.createElementVNode("span",A,e.toDisplayString(t.title),1)])],2))}}),T="bg-red-100 text-red-700 border-red-200",C=e.defineComponent({__name:"BaseBadge",props:{color:{type:String,required:!1}},setup(t){const r=e.useSlots(),l=e.computed(()=>!!r.default),a=t,o={[d.RED]:"bg-red-100 text-red-700 border-red-200",[d.GREEN]:"bg-green-100 text-green-700 border-green-200",[d.BLUE]:"bg-blue-100 text-blue-700 border-blue-200",[d.YELLOW]:"bg-yellow-100 text-yellow-700 border-yellow-200",[d.GRAY]:"bg-gray-100 text-gray-700 border-gray-200",[d.NONE]:"bg-gray-50 text-gray-600 border-gray-200"},n=e.computed(()=>`inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${a.color&&o[a.color]||T}`);return(c,m)=>l.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(n.value)},[e.renderSlot(c.$slots,"default")],2)):e.createCommentVNode("",!0)}}),$={class:"flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700","aria-label":"Breadcrumb"},U={class:"inline-flex items-center space-x-1 md:space-x-3"},D={class:"inline-flex items-center",style:{"margin-left":"0"}},G=e.defineComponent({__name:"BaseBreadcrumb",props:{items:{type:Array,required:!1,default:void 0},path:{type:String,required:!1,default:void 0}},setup(t){const r=t,l=e.computed(()=>{if(r.items&&r.items.length>0)return r.items;const o=(r.path??(typeof window<"u"?window.location.pathname:"/")).split("/").filter(c=>c!=="");let n="";return o.map(c=>(n+="/"+c,{name:Number(c)?c:(c.charAt(0).toUpperCase()+c.slice(1)).replaceAll("-"," "),url:n}))});return(a,o)=>{const n=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("nav",$,[e.createElementVNode("ol",U,[e.createElementVNode("li",D,[e.createVNode(n,{to:"/",class:"inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white"},{default:e.withCtx(()=>[e.createVNode(e.unref(V.HomeIcon),{class:"h-4 w-4 text-gray-500 mr-2"}),o[0]||(o[0]=e.createTextVNode(" Home ",-1))]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(c,m)=>(e.openBlock(),e.createElementBlock("li",{key:m,class:"inline-flex items-center",style:{"margin-left":"0"}},[e.createVNode(e.unref(g.ChevronRightIcon),{class:"h-4 w-4 text-gray-500"}),e.createVNode(n,{to:c.url,class:"ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.name),1)]),_:2},1032,["to"])]))),128))])])}}});var f=(t=>(t.RED="RED",t.BLUE="BLUE",t.WHITE="WHITE",t.DARK="DARK",t.GREEN="GREEN",t.YELLOW="YELLOW",t.PURPLE="PURPLE",t))(f||{}),k=(t=>(t.EXTRA_SMALL="EXTRA SMALL",t.SMALL="SMALL",t.BASE="BASE",t.LARGE="LARGE",t.EXTRA_LARGE="EXTRA_LARGE",t))(k||{});const I=["type","disabled"],M={key:0},q={key:1},z=["type","disabled"],P={key:0},W={key:1},H={key:2},F=e.defineComponent({__name:"BaseButton",props:{description:{type:String,required:!0},color:{type:String,required:!1,default:f.BLUE},to:{type:String,required:!1},type:{type:String,required:!1,default:"button"},icon:{type:String,required:!1},iconSize:{type:String,required:!1},iconLeft:{type:String,required:!1},isRounded:{type:Boolean,required:!1},isDisable:{type:Boolean,required:!1},size:{type:String,required:!1},isLoading:{type:Boolean,required:!1}},setup(t){const r=t;function l(){let a="inline-flex items-center",o;switch(r.color){case f.BLUE:{o="focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300",r.isDisable&&(o+=" bg-blue-400");break}case f.WHITE:{o="focus:outline-none text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200",r.isDisable&&(o+=" bg-gray-400");break}case f.DARK:{o="focus:outline-none text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 ",r.isDisable&&(o+=" bg-gray-400");break}case f.GREEN:{o="focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300",r.isDisable&&(o+=" bg-green-400");break}case f.RED:{o="focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300",r.isDisable&&(o+=" bg-red-400");break}case f.YELLOW:{o="focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300",r.isDisable&&(o+=" bg-yellow-400");break}case f.PURPLE:{o="focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 px-5 py-2.5 mb-2",r.isDisable&&(o+=" bg-purple-400");break}}let n="px-5 py-2.5 mr-2 mb-2 text-sm";switch(r.size){case k.EXTRA_SMALL:{n="px-3 py-2 text-xs";break}case k.SMALL:{n="px-3 py-2 text-sm";break}case k.BASE:{n="px-5 py-2.5 text-sm";break}case k.LARGE:{n="px-5 py-3 text-base";break}case k.EXTRA_LARGE:{n="px-6 py-3.5 text-base";break}}let c="rounded-lg";return r.isRounded&&(c="rounded-full"),r.isDisable&&(o+=" cursor-not-allowed"),a+" "+n+" "+o+" "+"font-medium"+" "+c}return(a,o)=>{const n=e.resolveComponent("router-link");return t.to?(e.openBlock(),e.createBlock(n,{key:0,to:t.to},{default:e.withCtx(()=>[e.createElementVNode("button",{type:r.type,class:e.normalizeClass(l()),disabled:t.isDisable},[t.iconLeft?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(t.description),1)),e.renderSlot(a.$slots,"default"),t.iconLeft?(e.openBlock(),e.createElementBlock("span",q,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],10,I)]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("button",{key:1,type:r.type,class:e.normalizeClass(l()),disabled:t.isDisable},[t.isLoading?(e.openBlock(),e.createElementBlock("div",P,[...o[0]||(o[0]=[e.createElementVNode("svg",{"aria-hidden":"true",role:"status",class:"inline w-4 h-4 me-3 text-white animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"#E5E7EB"}),e.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0),t.iconLeft?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(t.description),1)),e.renderSlot(a.$slots,"default"),t.iconLeft?(e.openBlock(),e.createElementBlock("span",H,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],10,z))}}});var u=(t=>(t.BASE="BASE",t.BASE_SHORTER="BASE_SHORTER",t.SQUARE="SQUARE",t))(u||{});const Y={key:0,class:"h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"},j={key:1,class:"w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"},X={key:2,class:"w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"},K=e.defineComponent({__name:"BaseLine",props:{mode:{type:String,required:!1,default:u.BASE}},setup(t){return(r,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.mode===e.unref(u).BASE?(e.openBlock(),e.createElementBlock("hr",Y)):e.createCommentVNode("",!0),t.mode===e.unref(u).BASE_SHORTER?(e.openBlock(),e.createElementBlock("hr",j)):e.createCommentVNode("",!0),t.mode===e.unref(u).SQUARE?(e.openBlock(),e.createElementBlock("hr",X)):e.createCommentVNode("",!0)],64))}});var E=(t=>(t.SMALL="SMALL",t.MEDIUM="MEDIUM",t.LARGE="LARGE",t))(E||{});const Q=["height","width"],Z=e.defineComponent({__name:"BaseLogo",props:{size:{type:String,required:!1,default:E.MEDIUM}},setup(t){const r=t;function l(){let a="";switch(r.size){case E.SMALL:{a="50px";break}case E.MEDIUM:{a="100px";break}case E.LARGE:{a="150px";break}}return a}return(a,o)=>{const n=e.resolveComponent("router-link");return e.openBlock(),e.createBlock(n,{to:"/",class:"flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("svg",{height:l(),width:l(),viewBox:"33.6 130.6 499.7 242.9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[...o[0]||(o[0]=[e.createElementVNode("linearGradient",{id:"a"},[e.createElementVNode("stop",{offset:".085","stop-color":"#469e43"}),e.createElementVNode("stop",{offset:"1","stop-color":"#132d13"})],-1),e.createElementVNode("linearGradient",{id:"b",gradientUnits:"userSpaceOnUse",x1:"64.863",x2:"64.863","xlink:href":"#a",y1:"288.291",y2:"369.4"},null,-1),e.createElementVNode("linearGradient",{id:"c",gradientUnits:"userSpaceOnUse",x1:"138.367",x2:"138.367","xlink:href":"#a",y1:"308.454",y2:"370.601"},null,-1),e.createElementVNode("linearGradient",{id:"d",gradientUnits:"userSpaceOnUse",x1:"195.475",x2:"195.475","xlink:href":"#a",y1:"288.291",y2:"369.85"},null,-1),e.createElementVNode("linearGradient",{id:"e",gradientUnits:"userSpaceOnUse",x1:"249.634",x2:"249.634","xlink:href":"#a",y1:"307.312",y2:"369.511"},null,-1),e.createElementVNode("linearGradient",{id:"f",gradientUnits:"userSpaceOnUse",x1:"302.884",x2:"302.884","xlink:href":"#a",y1:"288.291",y2:"367.857"},null,-1),e.createElementVNode("linearGradient",{id:"g",gradientUnits:"userSpaceOnUse",x1:"354.118",x2:"354.118","xlink:href":"#a",y1:"307.312",y2:"369.511"},null,-1),e.createElementVNode("linearGradient",{id:"h",gradientUnits:"userSpaceOnUse",x1:"428.02",x2:"428.02","xlink:href":"#a",y1:"306.156",y2:"367.742"},null,-1),e.createElementVNode("linearGradient",{id:"i",gradientUnits:"userSpaceOnUse",x1:"502.066",x2:"502.066","xlink:href":"#a",y1:"288.291",y2:"369.4"},null,-1),e.createElementVNode("linearGradient",{id:"j",gradientUnits:"userSpaceOnUse",x1:"283.264",x2:"283.264","xlink:href":"#a",y1:"131.629",y2:"232.559"},null,-1),e.createElementVNode("linearGradient",{id:"k",gradientUnits:"userSpaceOnUse",x1:"283.46",x2:"283.46",y1:"202.275",y2:"183.785"},[e.createElementVNode("stop",{offset:"0","stop-color":"#969799","stop-opacity":"0"}),e.createElementVNode("stop",{offset:"1","stop-color":"#808183"})],-1),e.createElementVNode("path",{d:"m65 307.2c-6.8 0-13.1 2.2-18.2 5.9v-24.8h-13.2v81.1h31.4c17.2 0 31.1-13.9 31.1-31.1s-13.9-31.1-31.1-31.1zm0 49.3h-18.2v-18.2c0-10.1 8.2-18.2 18.2-18.2 10.1 0 18.2 8.2 18.2 18.2.1 10.1-8.1 18.2-18.2 18.2z",fill:"url(#b)"},null,-1),e.createElementVNode("path",{d:"m168.8 343.9h-46.7c1.4 7.1 6.6 12 14.1 12.7 6.4.6 12.9.1 19.9.1v11.9c-15.2 4.9-33.3.5-42.1-10.4-3.8-4.7-17.3-34.7 11.5-47.4 39-11.4 45.3 22.4 43.3 33.1zm-14.2-12.7c-1.7-8.1-8.8-12.9-17.9-12.3-7.6.5-14 5.8-14.5 12.3z",fill:"url(#c)"},null,-1),e.createElementVNode("path",{d:"m195.5 320.2c0 10.5-.2 20 .1 29.6.2 5.8 4.4 8.4 13.2 8.6v10.5c-13.8 3.9-26.2-4.5-26.4-18-.2-18.7-.1-43.9-.1-62.6h14.1l-.3 18.5 12.7-.1v13.4h-13.3z",fill:"url(#d)"},null,-1),e.createElementVNode("path",{d:"m249.6 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",fill:"url(#e)"},null,-1),e.createElementVNode("path",{d:"m296.4 288.3h13v79.6h-13z",fill:"url(#f)"},null,-1),e.createElementVNode("path",{d:"m354.1 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",fill:"url(#g)"},null,-1),e.createElementVNode("path",{d:"m442.2 367.7c0-12.3.2-23.6 0-34.9-.2-3.4-3.6-13.8-14.1-13.4-10.3-.3-14.4 10-14.3 12.7.1 10.2.5 35.1.5 35.1l-13.6.1s-.3-25.7.2-36.2c.6-14.1 12.7-25 27.5-25 14.7 0 26.2 10.4 26.7 24.9.4 10.4.5 36.3.5 36.3z",fill:"url(#h)"},null,-1),e.createElementVNode("path",{d:"m501.9 307.2c6.8 0 13.1 2.2 18.2 5.9v-24.8h13.2v81.1h-31.4c-17.2 0-31.1-13.9-31.1-31.1s13.9-31.1 31.1-31.1zm0 49.3h18.2v-18.2c0-10.1-8.2-18.2-18.2-18.2-10.1 0-18.2 8.2-18.2 18.2 0 10.1 8.1 18.2 18.2 18.2z",fill:"url(#i)"},null,-1),e.createElementVNode("path",{d:"m309.2 180.6h-24v-24c0-12.6 10.2-24.1 22.8-25 14.8-1 27.1 11.3 26.1 26.1-.8 12.7-12.3 22.9-24.9 22.9zm-50.7-48.9c-14.8-1-27.1 11.3-26.1 26.1.8 12.6 12.4 22.8 25 22.8h23.9v-24c0-12.6-10.3-24.1-22.8-24.9zm50.7 51.9h-24v23.9c0 12.6 10.2 24.1 22.8 25 14.8 1 27.1-11.3 26.1-26.1-.8-12.6-12.3-22.8-24.9-22.8zm-52.4 0c-14 0-25.3 11.8-24.4 26 .8 12.2 10.7 22.1 22.9 22.9 14.2.9 26-10.4 26-24.4v-24.5z",fill:"url(#j)"},null,-1),e.createElementVNode("path",{d:"m281.7 183.8h3.6v18.5h-3.6z",fill:"url(#k)"},null,-1)])],8,Q))]),_:1})}}});var B=(t=>(t.DELETE="DELETE",t.SUCCESS="SUCCESS",t))(B||{});const J={class:"dialog relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white"},v={key:0,class:"p-6 text-center"},ee={class:"mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"},te={class:"flex justify-center"},re=e.defineComponent({__name:"BaseModal",props:{title:{type:String,required:!0},description:{type:String,required:!1},to:{type:String,required:!1,default:"/"},mode:{type:String,required:!1,default:"SUCCESS"}},emits:["closeModal","confirmModal"],setup(t){return(r,l)=>{const a=e.resolveComponent("base-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"outside",onClick:l[0]||(l[0]=o=>r.$emit("closeModal"))}),e.createElementVNode("div",J,[t.mode===e.unref(B).DELETE?(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(g.ExclamationCircleIcon),{class:"w-12 h-12 text-gray-400 mx-auto mb-4"}),e.createElementVNode("h3",ee," Are you sure you want to delete this "+e.toDisplayString(t.title)+"? ",1),e.createElementVNode("div",te,[e.createVNode(a,{color:e.unref(f).RED,onClick:l[1]||(l[1]=o=>r.$emit("confirmModal")),description:"Yes, I'm sure"},null,8,["color"]),e.createVNode(a,{color:e.unref(f).WHITE,onClick:l[2]||(l[2]=o=>r.$emit("closeModal")),description:"No, cancel"},null,8,["color"])])])):e.createCommentVNode("",!0)])],64)}}}),N=(t,r)=>{const l=t.__vccOpts||t;for(const[a,o]of r)l[a]=o;return l},oe=N(re,[["__scopeId","data-v-492169b3"]]),ne=e.defineComponent({__name:"BaseRow",props:{bgColor:{type:String,required:!1,default:"white"}},setup(t){const r=t;function l(){return"block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 "+r.bgColor}return(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l())},[e.renderSlot(a.$slots,"default")],2))}}),ae={},le={class:"w-4 h-4 border-2 border-gray-200 border-t-blue-500 rounded-full animate-spin"};function se(t,r){return e.openBlock(),e.createElementBlock("div",le)}const ce=N(ae,[["render",se]]);var b=(t=>(t.SUCCESS="SUCCESS",t.WARNING="WARNING",t.ERROR="ERROR",t))(b||{}),x=(t=>(t.TOP_LEFT="TOP_LEFT",t.TOP_RIGHT="TOP_RIGHT",t.BOTTOM_LEFT="BOTTOM_LEFT",t.BOTTOM_RIGHT="BOTTOM_RIGHT",t))(x||{});const ie={class:"flex items-center w-full max-w-md p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800"},de={class:"ml-3 text-sm font-normal"},me={key:3,type:"button",class:"ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700","data-dismiss-target":"#toast-danger","aria-label":"Close"},fe=e.defineComponent({__name:"BaseToast",props:{mode:{type:Object,required:!0},description:{type:String,required:!0},hasCloseIcon:{type:Boolean,required:!1,default:!0},positioning:{type:String,required:!1,default:"right"}},setup(t){const r=t;function l(){let c="";switch(r.mode){case b.ERROR:c="text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";break;case b.SUCCESS:c="text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";break;case b.WARNING:c="text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";break}return"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 rounded-lg "+c}function a(){let c="top-5 right-5";switch(r.positioning){case x.BOTTOM_LEFT:c="bottom-5";break;case x.TOP_LEFT:c="top-5";break;case x.TOP_RIGHT:c="top-5 right-5";break;case x.BOTTOM_RIGHT:c="bottom-5 right-5";break}return"fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg "+c+" space-x"}const o=e.ref(!0);function n(){setTimeout(()=>o.value=!1,1e6)}return n(),(c,m)=>o.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:"toast-top-right",class:e.normalizeClass(a()),role:"alert"},[e.createElementVNode("div",ie,[t.mode==e.unref(b).ERROR?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l())},[e.createVNode(e.unref(g.ExclamationCircleIcon),{class:"h-6 w-6 text-red-500"}),m[1]||(m[1]=e.createElementVNode("span",{class:"sr-only"},"Error icon",-1))],2)):t.mode==e.unref(b).SUCCESS?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(l())},[e.createVNode(e.unref(g.CheckCircleIcon),{class:"h-6 w-6 text-green-500"}),m[2]||(m[2]=e.createElementVNode("span",{class:"sr-only"},"Check icon",-1))],2)):t.mode==e.unref(b).WARNING?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(l())},[e.createVNode(e.unref(g.ExclamationTriangleIcon),{class:"h-6 w-6 text-yellow-500"}),m[3]||(m[3]=e.createElementVNode("span",{class:"sr-only"},"Warning icon",-1))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",de,e.toDisplayString(t.description),1),t.hasCloseIcon?(e.openBlock(),e.createElementBlock("button",me,[m[4]||(m[4]=e.createElementVNode("span",{class:"sr-only"},"Close",-1)),e.createVNode(e.unref(g.XMarkIcon),{class:"h-6 w-6 text-gray-500 cursor-pointer",onClick:m[0]||(m[0]=i=>o.value=!o.value)})])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)}}),pe={class:"w-13"},ge=e.defineComponent({__name:"ColoredSquares",props:{color:{type:String,required:!1}},setup(t){const r=t,l=["bg-slate-300","bg-zinc-300","bg-neutral-300","bg-stone-300","bg-blue-300","bg-green-300","bg-yellow-300","bg-purple-300","bg-pink-300"],a=e.computed(()=>l[Math.floor(Math.random()*l.length)]);function o(){let n="gray";switch(r.color){case d.GREEN:{n="green";break}case d.RED:{n="red";break}case d.BLUE:{n="blue";break}case d.YELLOW:{n="yellow";break}case d.NONE:{n="";break}}return"font-bold bg-"+n+"-100 text-"+n+"-800 text-xs mr-2 px-2.5 py-0.5 rounded-full"}return(n,c)=>(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",{class:e.normalizeClass(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center",o()])},[e.renderSlot(n.$slots,"default"),e.createElementVNode("div",{class:e.normalizeClass(["absolute bottom-0 left-0 h-1 w-full",a.value])},null,2)],2)]))}}),ye={key:0,class:"font-bold text-green-800"},be={key:0},he={key:0},ke="font-bold",ue=e.defineComponent({__name:"EuroAmount",props:{amount:{type:Number,required:!1},beforeAmount:{type:Number,default:null,required:!1},showCurrency:{type:Boolean,default:!0,required:!1}},setup(t){const r=t,l=e.computed(()=>r.amount!==null&&r.amount!==void 0),a=e.computed(()=>l.value&&r.amount<0),o=e.computed(()=>r.beforeAmount===null||r.beforeAmount===void 0?!1:r.amount<r.beforeAmount),n=e.computed(()=>a.value||o.value),c=e.computed(()=>!a.value&&!o.value&&!(r.beforeAmount===null||r.beforeAmount===void 0));return(m,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value&&c.value?(e.openBlock(),e.createElementBlock("span",ye,[e.createTextVNode(e.toDisplayString(t.amount)+" ",1),t.showCurrency?(e.openBlock(),e.createElementBlock("span",be,"€")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value&&!c.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([ke,n.value?"text-red-800":"text-gray-800"])},[e.createTextVNode(e.toDisplayString(t.amount)+" ",1),t.showCurrency?(e.openBlock(),e.createElementBlock("span",he,"€")):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],64))}}),Ee=["onClick"],xe={key:1,style:{cursor:"not-allowed"}},Ce=N(e.defineComponent({__name:"Pagination",props:{totalItems:{type:Number,required:!0,default:10},itemsPerPage:{type:Number,default:20}},emits:["page-changed"],setup(t,{emit:r}){const l=t,a=e.ref(1),o=e.ref(0),n=e.ref([]),c=r;function m(i){if(i!==a.value&&i>=1&&i<=o.value&&(a.value=i),o.value>5){n.value=[],i-3>0&&(n.value.push(1),n.value.push(0));for(let p=2;p>=1;p--){let R=i-p;R>0&&n.value.push(R)}n.value.push(a.value);let y=o.value-i,_=y>2,Re=2;if(_){for(let p=1;p<=Re;p++)n.value.push(i+p);n.value.push(0),n.value.push(o.value)}else for(let p=1;p<=y;p++)n.value.push(i+p)}c("page-changed",i)}return e.watch(()=>l.totalItems,()=>{if(o.value=Math.ceil(l.totalItems/l.itemsPerPage),n.value=[],o.value>5){for(let i=1;i<5;i++)n.value.push(i);n.value.push(0),n.value.push(o.value)}else for(let i=1;i<=o.value;i++)n.value.push(i)}),(i,_e)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,y=>(e.openBlock(),e.createElementBlock("li",{key:y},[y!==0?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:_=>m(y),class:e.normalizeClass({active:y===a.value})},e.toDisplayString(y),11,Ee)):e.createCommentVNode("",!0),y===0?(e.openBlock(),e.createElementBlock("span",xe,"...")):e.createCommentVNode("",!0)]))),128))])]))}}),[["__scopeId","data-v-248e09af"]]),Be={key:0},Ne={key:0,class:"flex items-center space-x-2"},Se={key:1,class:"flex items-center space-x-2"},we=e.defineComponent({__name:"TrendArrow",props:{number:{type:Number,required:!1},icon:{type:String,required:!1}},setup(t){const r=t,l=e.computed(()=>r.number!==null&&r.number!==void 0&&r.number<0);return(a,o)=>t.number?(e.openBlock(),e.createElementBlock("div",Be,[l.value?(e.openBlock(),e.createElementBlock("span",Ne,[e.createVNode(C,{color:e.unref(d).RED},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.number)+e.toDisplayString(r.icon),1)]),_:1},8,["color"]),e.createVNode(e.unref(g.ArrowDownIcon),{class:"h-5 w-5 text-red-500"})])):(e.openBlock(),e.createElementBlock("span",Se,[e.createVNode(C,{color:e.unref(d).GREEN},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.number)+e.toDisplayString(r.icon),1)]),_:1},8,["color"]),e.createVNode(e.unref(g.ArrowUpIcon),{class:"h-5 w-5 text-green-500"})]))])):e.createCommentVNode("",!0)}});var w=(t=>(t.WIN="WIN",t.LOSE="LOSE",t))(w||{});s.AlertEnum=h,s.BaseAlert=O,s.BaseBadge=C,s.BaseBadgeEnum=w,s.BaseBreadcrumb=G,s.BaseButton=F,s.BaseButtonEnum=f,s.BaseButtonSizeEnum=k,s.BaseLine=K,s.BaseLoginEnum=E,s.BaseLogo=Z,s.BaseModal=oe,s.BaseModalEnum=B,s.BaseRow=ne,s.BaseSpinner=ce,s.BaseToast=fe,s.BaseToastEnum=b,s.ColoredSquares=ge,s.ColorsEnums=d,s.EuroAmount=ue,s.LineEnum=u,s.Pagination=Ce,s.PositioningEnum=x,s.TrendArrow=we,s.getBaseColor=S,s.getBaseColorOf=L,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
1
+ (function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@heroicons/vue/24/outline"),require("@heroicons/vue/24/solid")):typeof define=="function"&&define.amd?define(["exports","vue","@heroicons/vue/24/outline","@heroicons/vue/24/solid"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.UiLib={},s.Vue,s.HeroiconsOutline,s.HeroiconsSolid))})(this,function(s,e,p,V){"use strict";var h=(t=>(t.WARNING="WARNING",t.ERROR="ERROR",t.SUCCESS="SUCCESS",t.INFROM="INFROM",t))(h||{}),d=(t=>(t.NONE="NONE",t.RED="RED",t.YELLOW="YELLOW",t.BLACK="BLACK",t.GRAY="GRAY",t.GREEN="GREEN",t.BLUE="BLUE",t))(d||{});function S(t){let r="red";switch(t){case h.ERROR:r="red";break;case h.SUCCESS:r="green";break;case h.INFROM:r="gray";break;case h.WARNING:r="yellow";break}return r}function L(t){let r="red";switch(t){case d.GREEN:{r="green";break}case d.RED:{r="red";break}case d.BLUE:{r="blue";break}case d.YELLOW:{r="yellow";break}case d.NONE:{r="";break}}return r}const A={class:"font-medium pl-1"},O=e.defineComponent({__name:"BaseAlert",props:{title:{type:String,required:!1,default:h.ERROR},color:{type:Object,required:!1}},setup(t){const r=t;function a(){let l=S(r.color);return"flex items-center p-4 mb-4 text-sm text-"+l+"-800 border border-"+l+"-300 rounded-lg bg-"+l+"-50 dark:bg-gray-800 dark:text-"+l+"-400 dark:border-"+l+"-800"}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(a()),role:"alert"},[e.createVNode(e.unref(p.InformationCircleIcon),{class:"w-6 h-6 text-gray-400"}),e.createElementVNode("div",null,[e.createElementVNode("span",A,e.toDisplayString(t.title),1)])],2))}}),T="bg-red-100 text-red-700 border-red-200",C=e.defineComponent({__name:"BaseBadge",props:{color:{type:String,required:!1}},setup(t){const r=e.useSlots(),a=e.computed(()=>!!r.default),l=t,o={[d.RED]:"bg-red-100 text-red-700 border-red-200",[d.GREEN]:"bg-green-100 text-green-700 border-green-200",[d.BLUE]:"bg-blue-100 text-blue-700 border-blue-200",[d.YELLOW]:"bg-yellow-100 text-yellow-700 border-yellow-200",[d.GRAY]:"bg-gray-100 text-gray-700 border-gray-200",[d.NONE]:"bg-gray-50 text-gray-600 border-gray-200"},n=e.computed(()=>`inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${l.color&&o[l.color]||T}`);return(c,m)=>a.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(n.value)},[e.renderSlot(c.$slots,"default")],2)):e.createCommentVNode("",!0)}}),$={class:"flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700","aria-label":"Breadcrumb"},D={class:"inline-flex items-center space-x-1 md:space-x-3"},U={class:"inline-flex items-center",style:{"margin-left":"0"}},G=e.defineComponent({__name:"BaseBreadcrumb",props:{items:{type:Array,required:!1,default:void 0},path:{type:String,required:!1,default:void 0}},setup(t){const r=t,a=e.computed(()=>{if(r.items&&r.items.length>0)return r.items;const o=(r.path??(typeof window<"u"?window.location.pathname:"/")).split("/").filter(c=>c!=="");let n="";return o.map(c=>(n+="/"+c,{name:Number(c)?c:(c.charAt(0).toUpperCase()+c.slice(1)).replaceAll("-"," "),url:n}))});return(l,o)=>{const n=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("nav",$,[e.createElementVNode("ol",D,[e.createElementVNode("li",U,[e.createVNode(n,{to:"/",class:"inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white"},{default:e.withCtx(()=>[e.createVNode(e.unref(V.HomeIcon),{class:"h-4 w-4 text-gray-500 mr-2"}),o[0]||(o[0]=e.createTextVNode(" Home ",-1))]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(c,m)=>(e.openBlock(),e.createElementBlock("li",{key:m,class:"inline-flex items-center",style:{"margin-left":"0"}},[e.createVNode(e.unref(p.ChevronRightIcon),{class:"h-4 w-4 text-gray-500"}),e.createVNode(n,{to:c.url,class:"ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.name),1)]),_:2},1032,["to"])]))),128))])])}}});var f=(t=>(t.RED="RED",t.BLUE="BLUE",t.WHITE="WHITE",t.DARK="DARK",t.GREEN="GREEN",t.YELLOW="YELLOW",t.PURPLE="PURPLE",t))(f||{}),k=(t=>(t.EXTRA_SMALL="EXTRA SMALL",t.SMALL="SMALL",t.BASE="BASE",t.LARGE="LARGE",t.EXTRA_LARGE="EXTRA_LARGE",t))(k||{});const I=["type","disabled"],M={key:0},q={key:1},z=["type","disabled"],P={key:0},W={key:1},F={key:2},H=e.defineComponent({__name:"BaseButton",props:{description:{type:String,required:!0},color:{type:String,required:!1,default:f.BLUE},to:{type:String,required:!1},type:{type:String,required:!1,default:"button"},icon:{type:String,required:!1},iconSize:{type:String,required:!1},iconLeft:{type:String,required:!1},isRounded:{type:Boolean,required:!1},isDisable:{type:Boolean,required:!1},size:{type:String,required:!1},isLoading:{type:Boolean,required:!1}},setup(t){const r=t;function a(){let l="inline-flex items-center",o;switch(r.color){case f.BLUE:{o="focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300",r.isDisable&&(o+=" bg-blue-400");break}case f.WHITE:{o="focus:outline-none text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200",r.isDisable&&(o+=" bg-gray-400");break}case f.DARK:{o="focus:outline-none text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 ",r.isDisable&&(o+=" bg-gray-400");break}case f.GREEN:{o="focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300",r.isDisable&&(o+=" bg-green-400");break}case f.RED:{o="focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300",r.isDisable&&(o+=" bg-red-400");break}case f.YELLOW:{o="focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300",r.isDisable&&(o+=" bg-yellow-400");break}case f.PURPLE:{o="focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 px-5 py-2.5 mb-2",r.isDisable&&(o+=" bg-purple-400");break}}let n="px-5 py-2.5 mr-2 mb-2 text-sm";switch(r.size){case k.EXTRA_SMALL:{n="px-3 py-2 text-xs";break}case k.SMALL:{n="px-3 py-2 text-sm";break}case k.BASE:{n="px-5 py-2.5 text-sm";break}case k.LARGE:{n="px-5 py-3 text-base";break}case k.EXTRA_LARGE:{n="px-6 py-3.5 text-base";break}}let c="rounded-lg";return r.isRounded&&(c="rounded-full"),r.isDisable&&(o+=" cursor-not-allowed"),l+" "+n+" "+o+" "+"font-medium"+" "+c}return(l,o)=>{const n=e.resolveComponent("router-link");return t.to?(e.openBlock(),e.createBlock(n,{key:0,to:t.to},{default:e.withCtx(()=>[e.createElementVNode("button",{type:r.type,class:e.normalizeClass(a()),disabled:t.isDisable},[t.iconLeft?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(t.description),1)),e.renderSlot(l.$slots,"default"),t.iconLeft?(e.openBlock(),e.createElementBlock("span",q,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],10,I)]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("button",{key:1,type:r.type,class:e.normalizeClass(a()),disabled:t.isDisable},[t.isLoading?(e.openBlock(),e.createElementBlock("div",P,[...o[0]||(o[0]=[e.createElementVNode("svg",{"aria-hidden":"true",role:"status",class:"inline w-4 h-4 me-3 text-white animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"#E5E7EB"}),e.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})],-1)])])):e.createCommentVNode("",!0),t.iconLeft?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(t.description),1)),e.renderSlot(l.$slots,"default"),t.iconLeft?(e.openBlock(),e.createElementBlock("span",F,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],10,z))}}});var u=(t=>(t.BASE="BASE",t.BASE_SHORTER="BASE_SHORTER",t.SQUARE="SQUARE",t))(u||{});const j={key:0,class:"h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"},Y={key:1,class:"w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"},X={key:2,class:"w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"},K=e.defineComponent({__name:"BaseLine",props:{mode:{type:String,required:!1,default:u.BASE}},setup(t){return(r,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.mode===e.unref(u).BASE?(e.openBlock(),e.createElementBlock("hr",j)):e.createCommentVNode("",!0),t.mode===e.unref(u).BASE_SHORTER?(e.openBlock(),e.createElementBlock("hr",Y)):e.createCommentVNode("",!0),t.mode===e.unref(u).SQUARE?(e.openBlock(),e.createElementBlock("hr",X)):e.createCommentVNode("",!0)],64))}});var E=(t=>(t.SMALL="SMALL",t.MEDIUM="MEDIUM",t.LARGE="LARGE",t))(E||{});const Q=["height","width"],Z=e.defineComponent({__name:"BaseLogo",props:{size:{type:String,required:!1,default:E.MEDIUM}},setup(t){const r=t;function a(){let l="";switch(r.size){case E.SMALL:{l="50px";break}case E.MEDIUM:{l="100px";break}case E.LARGE:{l="150px";break}}return l}return(l,o)=>{const n=e.resolveComponent("router-link");return e.openBlock(),e.createBlock(n,{to:"/",class:"flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("svg",{height:a(),width:a(),viewBox:"33.6 130.6 499.7 242.9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[...o[0]||(o[0]=[e.createElementVNode("linearGradient",{id:"a"},[e.createElementVNode("stop",{offset:".085","stop-color":"#469e43"}),e.createElementVNode("stop",{offset:"1","stop-color":"#132d13"})],-1),e.createElementVNode("linearGradient",{id:"b",gradientUnits:"userSpaceOnUse",x1:"64.863",x2:"64.863","xlink:href":"#a",y1:"288.291",y2:"369.4"},null,-1),e.createElementVNode("linearGradient",{id:"c",gradientUnits:"userSpaceOnUse",x1:"138.367",x2:"138.367","xlink:href":"#a",y1:"308.454",y2:"370.601"},null,-1),e.createElementVNode("linearGradient",{id:"d",gradientUnits:"userSpaceOnUse",x1:"195.475",x2:"195.475","xlink:href":"#a",y1:"288.291",y2:"369.85"},null,-1),e.createElementVNode("linearGradient",{id:"e",gradientUnits:"userSpaceOnUse",x1:"249.634",x2:"249.634","xlink:href":"#a",y1:"307.312",y2:"369.511"},null,-1),e.createElementVNode("linearGradient",{id:"f",gradientUnits:"userSpaceOnUse",x1:"302.884",x2:"302.884","xlink:href":"#a",y1:"288.291",y2:"367.857"},null,-1),e.createElementVNode("linearGradient",{id:"g",gradientUnits:"userSpaceOnUse",x1:"354.118",x2:"354.118","xlink:href":"#a",y1:"307.312",y2:"369.511"},null,-1),e.createElementVNode("linearGradient",{id:"h",gradientUnits:"userSpaceOnUse",x1:"428.02",x2:"428.02","xlink:href":"#a",y1:"306.156",y2:"367.742"},null,-1),e.createElementVNode("linearGradient",{id:"i",gradientUnits:"userSpaceOnUse",x1:"502.066",x2:"502.066","xlink:href":"#a",y1:"288.291",y2:"369.4"},null,-1),e.createElementVNode("linearGradient",{id:"j",gradientUnits:"userSpaceOnUse",x1:"283.264",x2:"283.264","xlink:href":"#a",y1:"131.629",y2:"232.559"},null,-1),e.createElementVNode("linearGradient",{id:"k",gradientUnits:"userSpaceOnUse",x1:"283.46",x2:"283.46",y1:"202.275",y2:"183.785"},[e.createElementVNode("stop",{offset:"0","stop-color":"#969799","stop-opacity":"0"}),e.createElementVNode("stop",{offset:"1","stop-color":"#808183"})],-1),e.createElementVNode("path",{d:"m65 307.2c-6.8 0-13.1 2.2-18.2 5.9v-24.8h-13.2v81.1h31.4c17.2 0 31.1-13.9 31.1-31.1s-13.9-31.1-31.1-31.1zm0 49.3h-18.2v-18.2c0-10.1 8.2-18.2 18.2-18.2 10.1 0 18.2 8.2 18.2 18.2.1 10.1-8.1 18.2-18.2 18.2z",fill:"url(#b)"},null,-1),e.createElementVNode("path",{d:"m168.8 343.9h-46.7c1.4 7.1 6.6 12 14.1 12.7 6.4.6 12.9.1 19.9.1v11.9c-15.2 4.9-33.3.5-42.1-10.4-3.8-4.7-17.3-34.7 11.5-47.4 39-11.4 45.3 22.4 43.3 33.1zm-14.2-12.7c-1.7-8.1-8.8-12.9-17.9-12.3-7.6.5-14 5.8-14.5 12.3z",fill:"url(#c)"},null,-1),e.createElementVNode("path",{d:"m195.5 320.2c0 10.5-.2 20 .1 29.6.2 5.8 4.4 8.4 13.2 8.6v10.5c-13.8 3.9-26.2-4.5-26.4-18-.2-18.7-.1-43.9-.1-62.6h14.1l-.3 18.5 12.7-.1v13.4h-13.3z",fill:"url(#d)"},null,-1),e.createElementVNode("path",{d:"m249.6 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",fill:"url(#e)"},null,-1),e.createElementVNode("path",{d:"m296.4 288.3h13v79.6h-13z",fill:"url(#f)"},null,-1),e.createElementVNode("path",{d:"m354.1 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",fill:"url(#g)"},null,-1),e.createElementVNode("path",{d:"m442.2 367.7c0-12.3.2-23.6 0-34.9-.2-3.4-3.6-13.8-14.1-13.4-10.3-.3-14.4 10-14.3 12.7.1 10.2.5 35.1.5 35.1l-13.6.1s-.3-25.7.2-36.2c.6-14.1 12.7-25 27.5-25 14.7 0 26.2 10.4 26.7 24.9.4 10.4.5 36.3.5 36.3z",fill:"url(#h)"},null,-1),e.createElementVNode("path",{d:"m501.9 307.2c6.8 0 13.1 2.2 18.2 5.9v-24.8h13.2v81.1h-31.4c-17.2 0-31.1-13.9-31.1-31.1s13.9-31.1 31.1-31.1zm0 49.3h18.2v-18.2c0-10.1-8.2-18.2-18.2-18.2-10.1 0-18.2 8.2-18.2 18.2 0 10.1 8.1 18.2 18.2 18.2z",fill:"url(#i)"},null,-1),e.createElementVNode("path",{d:"m309.2 180.6h-24v-24c0-12.6 10.2-24.1 22.8-25 14.8-1 27.1 11.3 26.1 26.1-.8 12.7-12.3 22.9-24.9 22.9zm-50.7-48.9c-14.8-1-27.1 11.3-26.1 26.1.8 12.6 12.4 22.8 25 22.8h23.9v-24c0-12.6-10.3-24.1-22.8-24.9zm50.7 51.9h-24v23.9c0 12.6 10.2 24.1 22.8 25 14.8 1 27.1-11.3 26.1-26.1-.8-12.6-12.3-22.8-24.9-22.8zm-52.4 0c-14 0-25.3 11.8-24.4 26 .8 12.2 10.7 22.1 22.9 22.9 14.2.9 26-10.4 26-24.4v-24.5z",fill:"url(#j)"},null,-1),e.createElementVNode("path",{d:"m281.7 183.8h3.6v18.5h-3.6z",fill:"url(#k)"},null,-1)])],8,Q))]),_:1})}}});var B=(t=>(t.DELETE="DELETE",t.SUCCESS="SUCCESS",t))(B||{});const J={class:"dialog relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white"},v={key:0,class:"p-6 text-center"},ee={class:"mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"},te={class:"flex justify-center"},re=e.defineComponent({__name:"BaseModal",props:{title:{type:String,required:!0},description:{type:String,required:!1},to:{type:String,required:!1,default:"/"},mode:{type:String,required:!1,default:"SUCCESS"}},emits:["closeModal","confirmModal"],setup(t){return(r,a)=>{const l=e.resolveComponent("base-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"outside",onClick:a[0]||(a[0]=o=>r.$emit("closeModal"))}),e.createElementVNode("div",J,[t.mode===e.unref(B).DELETE?(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(p.ExclamationCircleIcon),{class:"w-12 h-12 text-gray-400 mx-auto mb-4"}),e.createElementVNode("h3",ee," Are you sure you want to delete this "+e.toDisplayString(t.title)+"? ",1),e.createElementVNode("div",te,[e.createVNode(l,{color:e.unref(f).RED,onClick:a[1]||(a[1]=o=>r.$emit("confirmModal")),description:"Yes, I'm sure"},null,8,["color"]),e.createVNode(l,{color:e.unref(f).WHITE,onClick:a[2]||(a[2]=o=>r.$emit("closeModal")),description:"No, cancel"},null,8,["color"])])])):e.createCommentVNode("",!0)])],64)}}}),N=(t,r)=>{const a=t.__vccOpts||t;for(const[l,o]of r)a[l]=o;return a},oe=N(re,[["__scopeId","data-v-492169b3"]]),ne=e.defineComponent({__name:"BaseRow",props:{bgColor:{type:String,required:!1,default:"white"}},setup(t){const r=t;function a(){return"block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 "+r.bgColor}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(a())},[e.renderSlot(l.$slots,"default")],2))}}),ae={},le={class:"w-4 h-4 border-2 border-gray-200 border-t-blue-500 rounded-full animate-spin"};function se(t,r){return e.openBlock(),e.createElementBlock("div",le)}const ce=N(ae,[["render",se]]);var y=(t=>(t.SUCCESS="SUCCESS",t.WARNING="WARNING",t.ERROR="ERROR",t))(y||{}),x=(t=>(t.TOP_LEFT="TOP_LEFT",t.TOP_RIGHT="TOP_RIGHT",t.BOTTOM_LEFT="BOTTOM_LEFT",t.BOTTOM_RIGHT="BOTTOM_RIGHT",t))(x||{});const ie={class:"flex items-center w-full max-w-md p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800"},de={class:"ml-3 text-sm font-normal"},me={key:3,type:"button",class:"ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700","data-dismiss-target":"#toast-danger","aria-label":"Close"},fe=e.defineComponent({__name:"BaseToast",props:{mode:{type:Object,required:!0},description:{type:String,required:!0},hasCloseIcon:{type:Boolean,required:!1,default:!0},positioning:{type:String,required:!1,default:"right"}},setup(t){const r=t;function a(){let c="";switch(r.mode){case y.ERROR:c="text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";break;case y.SUCCESS:c="text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";break;case y.WARNING:c="text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";break}return"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 rounded-lg "+c}function l(){let c="top-5 right-5";switch(r.positioning){case x.BOTTOM_LEFT:c="bottom-5";break;case x.TOP_LEFT:c="top-5";break;case x.TOP_RIGHT:c="top-5 right-5";break;case x.BOTTOM_RIGHT:c="bottom-5 right-5";break}return"fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg "+c+" space-x"}const o=e.ref(!0);function n(){setTimeout(()=>o.value=!1,1e6)}return n(),(c,m)=>o.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:"toast-top-right",class:e.normalizeClass(l()),role:"alert"},[e.createElementVNode("div",ie,[t.mode==e.unref(y).ERROR?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a())},[e.createVNode(e.unref(p.ExclamationCircleIcon),{class:"h-6 w-6 text-red-500"}),m[1]||(m[1]=e.createElementVNode("span",{class:"sr-only"},"Error icon",-1))],2)):t.mode==e.unref(y).SUCCESS?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(a())},[e.createVNode(e.unref(p.CheckCircleIcon),{class:"h-6 w-6 text-green-500"}),m[2]||(m[2]=e.createElementVNode("span",{class:"sr-only"},"Check icon",-1))],2)):t.mode==e.unref(y).WARNING?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(a())},[e.createVNode(e.unref(p.ExclamationTriangleIcon),{class:"h-6 w-6 text-yellow-500"}),m[3]||(m[3]=e.createElementVNode("span",{class:"sr-only"},"Warning icon",-1))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",de,e.toDisplayString(t.description),1),t.hasCloseIcon?(e.openBlock(),e.createElementBlock("button",me,[m[4]||(m[4]=e.createElementVNode("span",{class:"sr-only"},"Close",-1)),e.createVNode(e.unref(p.XMarkIcon),{class:"h-6 w-6 text-gray-500 cursor-pointer",onClick:m[0]||(m[0]=i=>o.value=!o.value)})])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)}}),ge={class:"w-13"},pe=e.defineComponent({__name:"ColoredSquares",props:{color:{type:String,required:!1}},setup(t){const r=t,a=["bg-slate-300","bg-zinc-300","bg-neutral-300","bg-stone-300","bg-blue-300","bg-green-300","bg-yellow-300","bg-purple-300","bg-pink-300"],l=e.computed(()=>a[Math.floor(Math.random()*a.length)]);function o(){let n="gray";switch(r.color){case d.GREEN:{n="green";break}case d.RED:{n="red";break}case d.BLUE:{n="blue";break}case d.YELLOW:{n="yellow";break}case d.NONE:{n="";break}}return"font-bold bg-"+n+"-100 text-"+n+"-800 text-xs mr-2 px-2.5 py-0.5 rounded-full"}return(n,c)=>(e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",{class:e.normalizeClass(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center",o()])},[e.renderSlot(n.$slots,"default"),e.createElementVNode("div",{class:e.normalizeClass(["absolute bottom-0 left-0 h-1 w-full",l.value])},null,2)],2)]))}}),be={class:"relative rounded-xl border-2 border-dashed border-orange-300 bg-white p-6"},ye={key:0,class:"absolute right-4 top-4 rounded-md bg-orange-100 px-3 py-1 text-xs font-bold tracking-wide text-orange-500"},he={class:"flex items-start justify-between"},ke={class:"text-sm font-bold tracking-wide text-gray-800"},ue={class:"mt-1 text-4xl font-bold text-gray-400"},Ee={class:"mt-1 text-sm font-medium text-orange-400"},xe=e.defineComponent({__name:"EarningsCard",props:{title:{default:"TOTAL EARNINGS"},amount:{default:0},subtitle:{default:"Lifetime commission"},badge:{default:""},currency:{default:"$"}},setup(t){const r=t,a=e.computed(()=>r.currency+r.amount.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}));return(l,o)=>(e.openBlock(),e.createElementBlock("div",be,[t.badge?(e.openBlock(),e.createElementBlock("div",ye,e.toDisplayString(t.badge),1)):e.createCommentVNode("",!0),e.createElementVNode("div",he,[e.createElementVNode("div",null,[e.createElementVNode("p",ke,e.toDisplayString(t.title),1),e.createElementVNode("p",ue,e.toDisplayString(a.value),1),e.createElementVNode("p",Ee,e.toDisplayString(t.subtitle),1)]),o[0]||(o[0]=e.createElementVNode("div",{class:"mt-6 flex h-12 w-12 items-center justify-center rounded-xl bg-orange-50"},[e.createElementVNode("svg",{class:"h-6 w-6 text-orange-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17"}),e.createElementVNode("polyline",{points:"16 7 22 7 22 13"})])],-1))])]))}}),Ce={key:0,class:"font-bold text-green-800"},Be={key:0},Ne={key:0},Se="font-bold",we=e.defineComponent({__name:"EuroAmount",props:{amount:{type:Number,required:!1},beforeAmount:{type:Number,default:null,required:!1},showCurrency:{type:Boolean,default:!0,required:!1}},setup(t){const r=t,a=e.computed(()=>r.amount!==null&&r.amount!==void 0),l=e.computed(()=>a.value&&r.amount<0),o=e.computed(()=>r.beforeAmount===null||r.beforeAmount===void 0?!1:r.amount<r.beforeAmount),n=e.computed(()=>l.value||o.value),c=e.computed(()=>!l.value&&!o.value&&!(r.beforeAmount===null||r.beforeAmount===void 0));return(m,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.value&&c.value?(e.openBlock(),e.createElementBlock("span",Ce,[e.createTextVNode(e.toDisplayString(t.amount)+" ",1),t.showCurrency?(e.openBlock(),e.createElementBlock("span",Be,"€")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),a.value&&!c.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([Se,n.value?"text-red-800":"text-gray-800"])},[e.createTextVNode(e.toDisplayString(t.amount)+" ",1),t.showCurrency?(e.openBlock(),e.createElementBlock("span",Ne,"€")):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],64))}}),_e=["onClick"],Re={key:1,style:{cursor:"not-allowed"}},Ve=N(e.defineComponent({__name:"Pagination",props:{totalItems:{type:Number,required:!0,default:10},itemsPerPage:{type:Number,default:20}},emits:["page-changed"],setup(t,{emit:r}){const a=t,l=e.ref(1),o=e.ref(0),n=e.ref([]),c=r;function m(i){if(i!==l.value&&i>=1&&i<=o.value&&(l.value=i),o.value>5){n.value=[],i-3>0&&(n.value.push(1),n.value.push(0));for(let g=2;g>=1;g--){let R=i-g;R>0&&n.value.push(R)}n.value.push(l.value);let b=o.value-i,_=b>2,De=2;if(_){for(let g=1;g<=De;g++)n.value.push(i+g);n.value.push(0),n.value.push(o.value)}else for(let g=1;g<=b;g++)n.value.push(i+g)}c("page-changed",i)}return e.watch(()=>a.totalItems,()=>{if(o.value=Math.ceil(a.totalItems/a.itemsPerPage),n.value=[],o.value>5){for(let i=1;i<5;i++)n.value.push(i);n.value.push(0),n.value.push(o.value)}else for(let i=1;i<=o.value;i++)n.value.push(i)}),(i,$e)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,b=>(e.openBlock(),e.createElementBlock("li",{key:b},[b!==0?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:_=>m(b),class:e.normalizeClass({active:b===l.value})},e.toDisplayString(b),11,_e)):e.createCommentVNode("",!0),b===0?(e.openBlock(),e.createElementBlock("span",Re,"...")):e.createCommentVNode("",!0)]))),128))])]))}}),[["__scopeId","data-v-248e09af"]]),Le={key:0},Ae={key:0,class:"flex items-center space-x-2"},Oe={key:1,class:"flex items-center space-x-2"},Te=e.defineComponent({__name:"TrendArrow",props:{number:{type:Number,required:!1},icon:{type:String,required:!1}},setup(t){const r=t,a=e.computed(()=>r.number!==null&&r.number!==void 0&&r.number<0);return(l,o)=>t.number?(e.openBlock(),e.createElementBlock("div",Le,[a.value?(e.openBlock(),e.createElementBlock("span",Ae,[e.createVNode(C,{color:e.unref(d).RED},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.number)+e.toDisplayString(r.icon),1)]),_:1},8,["color"]),e.createVNode(e.unref(p.ArrowDownIcon),{class:"h-5 w-5 text-red-500"})])):(e.openBlock(),e.createElementBlock("span",Oe,[e.createVNode(C,{color:e.unref(d).GREEN},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.number)+e.toDisplayString(r.icon),1)]),_:1},8,["color"]),e.createVNode(e.unref(p.ArrowUpIcon),{class:"h-5 w-5 text-green-500"})]))])):e.createCommentVNode("",!0)}});var w=(t=>(t.WIN="WIN",t.LOSE="LOSE",t))(w||{});s.AlertEnum=h,s.BaseAlert=O,s.BaseBadge=C,s.BaseBadgeEnum=w,s.BaseBreadcrumb=G,s.BaseButton=H,s.BaseButtonEnum=f,s.BaseButtonSizeEnum=k,s.BaseLine=K,s.BaseLoginEnum=E,s.BaseLogo=Z,s.BaseModal=oe,s.BaseModalEnum=B,s.BaseRow=ne,s.BaseSpinner=ce,s.BaseToast=fe,s.BaseToastEnum=y,s.ColoredSquares=pe,s.ColorsEnums=d,s.EarningsCard=xe,s.EuroAmount=we,s.LineEnum=u,s.Pagination=Ve,s.PositioningEnum=x,s.TrendArrow=Te,s.getBaseColor=S,s.getBaseColorOf=L,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "mgv-backoffice",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Shared Vue 3 UI component library",
5
+ "type": "module",
5
6
  "main": "./dist/ui-lib.umd.js",
6
7
  "module": "./dist/ui-lib.mjs",
7
8
  "types": "./dist/index.d.ts",
@@ -11,11 +12,15 @@
11
12
  "require": "./dist/ui-lib.umd.js",
12
13
  "types": "./dist/index.d.ts"
13
14
  },
14
- "./dist/style.css": "./dist/style.css"
15
+ "./dist/style.css": "./dist/style.css",
16
+ "./tailwind.safelist": "./tailwind.safelist.js",
17
+ "./tailwind.safelist.css": "./tailwind.safelist.css"
15
18
  },
16
19
  "files": [
17
20
  "dist",
18
- "src"
21
+ "src",
22
+ "tailwind.safelist.js",
23
+ "tailwind.safelist.css"
19
24
  ],
20
25
  "scripts": {
21
26
  "build": "vite build",
@@ -31,6 +36,8 @@
31
36
  "vue-router": "^4.6.4",
32
37
  "@heroicons/vue": "^2.2.0",
33
38
  "@vitejs/plugin-vue": "^5.2.0",
39
+ "@tailwindcss/vite": "^4.1.0",
40
+ "tailwindcss": "^4.1.0",
34
41
  "vite": "^5.4.0",
35
42
  "vite-plugin-dts": "^4.5.0",
36
43
  "typescript": "^5.9.3",
@@ -0,0 +1,74 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+
4
+ interface Props {
5
+ title?: string
6
+ amount?: number
7
+ subtitle?: string
8
+ badge?: string
9
+ currency?: string
10
+ }
11
+
12
+ const props = withDefaults(defineProps<Props>(), {
13
+ title: 'TOTAL EARNINGS',
14
+ amount: 0,
15
+ subtitle: 'Lifetime commission',
16
+ badge: '',
17
+ currency: '$',
18
+ })
19
+
20
+ const formattedAmount = computed(() => {
21
+ return props.currency + props.amount.toLocaleString('en-US', {
22
+ minimumFractionDigits: 2,
23
+ maximumFractionDigits: 2,
24
+ })
25
+ })
26
+ </script>
27
+
28
+ <template>
29
+ <div class="relative rounded-xl border-2 border-dashed border-orange-300 bg-white p-6">
30
+ <!-- Badge -->
31
+ <div
32
+ v-if="badge"
33
+ class="absolute right-4 top-4 rounded-md bg-orange-100 px-3 py-1 text-xs font-bold tracking-wide text-orange-500"
34
+ >
35
+ {{ badge }}
36
+ </div>
37
+
38
+ <!-- Header row -->
39
+ <div class="flex items-start justify-between">
40
+ <div>
41
+ <!-- Title -->
42
+ <p class="text-sm font-bold tracking-wide text-gray-800">
43
+ {{ title }}
44
+ </p>
45
+
46
+ <!-- Amount -->
47
+ <p class="mt-1 text-4xl font-bold text-gray-400">
48
+ {{ formattedAmount }}
49
+ </p>
50
+
51
+ <!-- Subtitle -->
52
+ <p class="mt-1 text-sm font-medium text-orange-400">
53
+ {{ subtitle }}
54
+ </p>
55
+ </div>
56
+
57
+ <!-- Chart icon -->
58
+ <div class="mt-6 flex h-12 w-12 items-center justify-center rounded-xl bg-orange-50">
59
+ <svg
60
+ class="h-6 w-6 text-orange-400"
61
+ viewBox="0 0 24 24"
62
+ fill="none"
63
+ stroke="currentColor"
64
+ stroke-width="2.5"
65
+ stroke-linecap="round"
66
+ stroke-linejoin="round"
67
+ >
68
+ <polyline points="22 7 13.5 15.5 8.5 10.5 2 17" />
69
+ <polyline points="16 7 22 7 22 13" />
70
+ </svg>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </template>
package/src/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import './style.css'
2
+
1
3
  // Components
2
4
  export { default as BaseAlert } from './components/BaseAlert.vue'
3
5
  export { default as BaseBadge } from './components/BaseBadge.vue'
@@ -10,6 +12,7 @@ export { default as BaseRow } from './components/BaseRow.vue'
10
12
  export { default as BaseSpinner } from './components/BaseSpinner.vue'
11
13
  export { default as BaseToast } from './components/BaseToast.vue'
12
14
  export { default as ColoredSquares } from './components/ColoredSquares.vue'
15
+ export { default as EarningsCard } from './components/EarningsCard.vue'
13
16
  export { default as EuroAmount } from './components/EuroAmount.vue'
14
17
  export { default as Pagination } from './components/Pagination.vue'
15
18
  export { default as TrendArrow } from './components/TrendArrow.vue'
package/src/style.css ADDED
@@ -0,0 +1 @@
1
+ @import "tailwindcss";
@@ -0,0 +1,120 @@
1
+ /**
2
+ * MGV-Backoffice Tailwind v4 Safelist
3
+ *
4
+ * Some components in this library build Tailwind classes dynamically
5
+ * (e.g. "bg-" + color + "-100"), which means the Tailwind compiler
6
+ * can't detect them at build time and will purge them.
7
+ *
8
+ * Import this file in your consuming project's main CSS file:
9
+ *
10
+ * @import "tailwindcss";
11
+ * @import "mgv-backoffice/tailwind.safelist.css";
12
+ */
13
+
14
+ /* ── BaseAlert ────────────────────────────────────────────── */
15
+ @source inline("
16
+ text-{red,green,blue,yellow,gray,orange,purple}-800
17
+ border-{red,green,blue,yellow,gray,orange,purple}-300
18
+ bg-{red,green,blue,yellow,gray,orange,purple}-50
19
+ dark:text-{red,green,blue,yellow,gray,orange,purple}-400
20
+ dark:border-{red,green,blue,yellow,gray,orange,purple}-800
21
+ flex items-center p-4 mb-4 text-sm border rounded-lg
22
+ dark:bg-gray-800 w-6 h-6 text-gray-400 font-medium pl-1
23
+ ");
24
+
25
+ /* ── BaseBadge ────────────────────────────────────────────── */
26
+ @source inline("
27
+ bg-{red,green,blue,yellow,gray}-100
28
+ text-{red,green,blue,yellow,gray}-700
29
+ border-{red,green,blue,yellow}-200
30
+ border-gray-200 bg-gray-50 text-gray-600
31
+ inline-flex gap-1 font-semibold text-xs leading-none
32
+ px-3 py-1.5 rounded-full
33
+ ");
34
+
35
+ /* ── BaseButton ───────────────────────────────────────────── */
36
+ @source inline("
37
+ focus:outline-none text-white
38
+ bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 bg-blue-400
39
+ text-gray-900 bg-white border-gray-200 hover:bg-gray-100 hover:text-blue-700
40
+ focus:z-10 focus:ring-gray-200
41
+ bg-gray-400 bg-gray-800 hover:bg-gray-900 focus:ring-gray-300
42
+ bg-green-700 hover:bg-green-800 focus:ring-green-300 bg-green-400
43
+ bg-red-700 hover:bg-red-800 focus:ring-red-300 bg-red-400
44
+ bg-yellow-400 hover:bg-yellow-500 focus:ring-yellow-300
45
+ bg-purple-700 hover:bg-purple-800 focus:ring-purple-300 bg-purple-400
46
+ px-5 py-2.5 mr-2 mb-2 py-2 text-base py-3 px-6 py-3.5
47
+ font-medium rounded-lg rounded-full cursor-not-allowed
48
+ inline w-4 h-4 me-3 animate-spin
49
+ ");
50
+
51
+ /* ── BaseToast ────────────────────────────────────────────── */
52
+ @source inline("
53
+ text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200
54
+ text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200
55
+ text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200
56
+ inline-flex items-center justify-center flex-shrink-0 w-8 h-8
57
+ top-5 right-5 bottom-5
58
+ fixed w-full max-w-md space-x-4 divide-x
59
+ shadow text-gray-500 bg-white dark:text-gray-400 dark:bg-gray-800
60
+ ml-3 font-normal ml-auto -mx-1.5 -my-1.5
61
+ hover:text-gray-900 focus:ring-2 focus:ring-gray-300
62
+ p-1.5 hover:bg-gray-100 dark:text-gray-500
63
+ dark:hover:text-white dark:hover:bg-gray-700
64
+ cursor-pointer sr-only h-6 w-6 text-yellow-500
65
+ ");
66
+
67
+ /* ── ColoredSquares ───────────────────────────────────────── */
68
+ @source inline("
69
+ bg-{red,green,blue,yellow,gray,orange,purple}-100
70
+ text-{red,green,blue,yellow,gray,orange,purple}-800
71
+ font-bold px-2.5 py-0.5
72
+ bg-{slate,zinc,neutral,stone,blue,green,yellow,purple,pink}-300
73
+ w-13 border-gray-300 relative aspect-square bg-white shadow-sm
74
+ overflow-hidden text-center absolute bottom-0 left-0 h-1 w-full
75
+ ");
76
+
77
+ /* ── EuroAmount ───────────────────────────────────────────── */
78
+ @source inline("
79
+ text-green-800 text-red-800 text-gray-800 font-bold
80
+ ");
81
+
82
+ /* ── TrendArrow ───────────────────────────────────────────── */
83
+ @source inline("
84
+ space-x-2 h-5 w-5 text-red-500 text-green-500
85
+ ");
86
+
87
+ /* ── BaseSpinner ──────────────────────────────────────────── */
88
+ @source inline("
89
+ border-2 border-gray-200 border-t-blue-500 animate-spin
90
+ ");
91
+
92
+ /* ── BaseRow ──────────────────────────────────────────────── */
93
+ @source inline("
94
+ block p-8 rounded-xl shadow-sm dark:border-gray-700
95
+ ");
96
+
97
+ /* ── BaseLine ─────────────────────────────────────────────── */
98
+ @source inline("
99
+ h-px my-8 bg-gray-200 border-0 dark:bg-gray-700
100
+ w-48 mx-auto my-4 bg-gray-100 rounded md:my-10 md:my-12
101
+ ");
102
+
103
+ /* ── BaseLogo ─────────────────────────────────────────────── */
104
+ @source inline("
105
+ mb-6 text-2xl font-semibold text-gray-900 dark:text-white
106
+ ");
107
+
108
+ /* ── BaseModal ────────────────────────────────────────────── */
109
+ @source inline("
110
+ top-20 mx-auto p-5 w-96 shadow-lg rounded-md p-6
111
+ text-center w-12 h-12 mb-4 mb-5 text-lg font-normal
112
+ dark:text-gray-400 justify-center
113
+ ");
114
+
115
+ /* ── BaseBreadcrumb ───────────────────────────────────────── */
116
+ @source inline("
117
+ px-5 py-3 text-gray-700 bg-gray-50 dark:border-gray-700
118
+ space-x-1 md:space-x-3 hover:text-blue-600
119
+ dark:hover:text-white ml-1 md:ml-2
120
+ ");