apx-side-menu-ultimate
Version:
Librería de proyectos de APX
1 lines • 13 kB
Source Map (JSON)
{"version":3,"file":"apx-side-menu-ultimate.mjs","sources":["../../../projects/apx-side-menu/src/lib/apx-side-menu.ts","../../../projects/apx-side-menu/src/lib/apx-side-menu.html","../../../projects/apx-side-menu/src/public-api.ts","../../../projects/apx-side-menu/src/apx-side-menu-ultimate.ts"],"sourcesContent":["import { Component, input, output } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\n\nexport enum TitleColor {\n red = 'text-red-500',\n green = 'text-green-500',\n blue = 'text-blue-500',\n purple = 'text-purple-500',\n}\n\n@Component({\n selector: 'apx-side-menu',\n imports: [RouterLink, RouterLinkActive],\n templateUrl: './apx-side-menu.html',\n styles: ``\n})\nexport class ApxSideMenu {\n isAuthenticated = input<boolean>(false);\n\n titleColor = input<TitleColor>(TitleColor.purple);\n\n onSignOut = output<void>();\n onSignIn = output<void>();\n}\n","<aside\n class=\"bg-gradient-to-br from-gray-800 to-gray-900 -translate-x-80 fixed inset-0 z-50 my-4 ml-4 h-[calc(100vh-32px)] w-72 rounded-xl transition-transform duration-300 xl:translate-x-0\">\n <div class=\"relative border-b border-white/20\">\n <a class=\"flex items-center gap-4 py-6 px-8\" href=\"#/\">\n <h6 class=\"text-2xl font-bold block antialiased tracking-normal font-sans leading-relaxed text-white\">\n <!-- Todo: personalizar colores -->\n <span [classList]=\"[titleColor()]\">APX</span>\n <span class=\"font-thin\"> Corp</span>\n </h6>\n </a>\n <button\n class=\"middle none font-sans font-medium text-center uppercase transition-all disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none w-8 max-w-[32px] h-8 max-h-[32px] rounded-lg text-xs text-white hover:bg-white/10 active:bg-white/30 absolute right-0 top-0 grid rounded-br-none rounded-tl-none xl:hidden\"\n type=\"button\">\n <span class=\"absolute top-1/2 left-1/2 transform -translate-y-1/2 -translate-x-1/2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2.5\" stroke=\"currentColor\"\n aria-hidden=\"true\" class=\"h-5 w-5 text-white\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\"></path>\n </svg>\n </span>\n </button>\n </div>\n <div class=\"m-4\">\n <ul class=\"mb-4 flex flex-col gap-1\">\n <li>\n <!-- middle none font-sans font-bold center transition-all disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none text-xs py-3 rounded-lg bg-gradient-to-tr from-blue-600 to-blue-400 text-white shadow-md shadow-blue-500/20 hover:shadow-lg hover:shadow-blue-500/40 active:opacity-[0.85] w-full flex items-center gap-4 px-4 capitalize -->\n <a routerLink=\"/\" aria-current=\"page\"\n routerLinkActive=\"rounded-lg bg-gradient-to-tr from-blue-600 to-blue-400 text-white shadow-md shadow-blue-500/20 active:opacity-[0.85] w-full flex items-center gap-4 px-4 capitalize\"\n [routerLinkActiveOptions]=\"{ exact: true }\">\n <button\n class=\"middle none font-sans font-bold center transition-all disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none text-xs py-3 rounded-lg text-white hover:bg-white/10 active:bg-white/30 w-full flex items-center gap-4 px-4 capitalize\"\n type=\"button\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"\n class=\"w-5 h-5 text-inherit\">\n <path\n d=\"M11.47 3.84a.75.75 0 011.06 0l8.69 8.69a.75.75 0 101.06-1.06l-8.689-8.69a2.25 2.25 0 00-3.182 0l-8.69 8.69a.75.75 0 001.061 1.06l8.69-8.69z\">\n </path>\n <path\n d=\"M12 5.432l8.159 8.159c.03.03.06.058.091.086v6.198c0 1.035-.84 1.875-1.875 1.875H15a.75.75 0 01-.75-.75v-4.5a.75.75 0 00-.75-.75h-3a.75.75 0 00-.75.75V21a.75.75 0 01-.75.75H5.625a1.875 1.875 0 01-1.875-1.875v-6.198a2.29 2.29 0 00.091-.086L12 5.43z\">\n </path>\n </svg>\n <p class=\"block antialiased font-sans text-base leading-relaxed text-inherit font-medium capitalize\">\n dashboard</p>\n </button>\n </a>\n </li>\n <li>\n <a class=\"\" href=\"#\">\n <button\n class=\"middle none font-sans font-bold center transition-all disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none text-xs py-3 rounded-lg text-white hover:bg-white/10 active:bg-white/30 w-full flex items-center gap-4 px-4 capitalize\"\n type=\"button\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"\n class=\"w-5 h-5 text-inherit\">\n <path fill-rule=\"evenodd\"\n d=\"M18.685 19.097A9.723 9.723 0 0021.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 003.065 7.097A9.716 9.716 0 0012 21.75a9.716 9.716 0 006.685-2.653zm-12.54-1.285A7.486 7.486 0 0112 15a7.486 7.486 0 015.855 2.812A8.224 8.224 0 0112 20.25a8.224 8.224 0 01-5.855-2.438zM15.75 9a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z\"\n clip-rule=\"evenodd\"></path>\n </svg>\n <p class=\"block antialiased font-sans text-base leading-relaxed text-inherit font-medium capitalize\">profile\n </p>\n </button>\n </a>\n </li>\n <li>\n <a class=\"\" routerLink=\"/projects\"\n routerLinkActive=\"rounded-lg bg-gradient-to-tr from-blue-600 to-blue-400 text-white shadow-md shadow-blue-500/20 active:opacity-[0.85] w-full flex items-center gap-4 px-4 capitalize\"\n [routerLinkActiveOptions]=\"{ exact: true }\">\n <button\n class=\"middle none font-sans font-bold center transition-all disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none text-xs py-3 rounded-lg text-white hover:bg-white/10 active:bg-white/30 w-full flex items-center gap-4 px-4 capitalize\"\n type=\"button\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"\n class=\"w-5 h-5 text-inherit\">\n <path fill-rule=\"evenodd\"\n d=\"M1.5 5.625c0-1.036.84-1.875 1.875-1.875h17.25c1.035 0 1.875.84 1.875 1.875v12.75c0 1.035-.84 1.875-1.875 1.875H3.375A1.875 1.875 0 011.5 18.375V5.625zM21 9.375A.375.375 0 0020.625 9h-7.5a.375.375 0 00-.375.375v1.5c0 .207.168.375.375.375h7.5a.375.375 0 00.375-.375v-1.5zm0 3.75a.375.375 0 00-.375-.375h-7.5a.375.375 0 00-.375.375v1.5c0 .207.168.375.375.375h7.5a.375.375 0 00.375-.375v-1.5zm0 3.75a.375.375 0 00-.375-.375h-7.5a.375.375 0 00-.375.375v1.5c0 .207.168.375.375.375h7.5a.375.375 0 00.375-.375v-1.5zM10.875 18.75a.375.375 0 00.375-.375v-1.5a.375.375 0 00-.375-.375h-7.5a.375.375 0 00-.375.375v1.5c0 .207.168.375.375.375h7.5zM3.375 15h7.5a.375.375 0 00.375-.375v-1.5a.375.375 0 00-.375-.375h-7.5a.375.375 0 00-.375.375v1.5c0 .207.168.375.375.375zm0-3.75h7.5a.375.375 0 00.375-.375v-1.5A.375.375 0 0010.875 9h-7.5A.375.375 0 003 9.375v1.5c0 .207.168.375.375.375z\"\n clip-rule=\"evenodd\"></path>\n </svg>\n <p class=\"block antialiased font-sans text-base leading-relaxed text-inherit font-medium capitalize\">\n Projects\n </p>\n </button>\n </a>\n </li>\n <li>\n <a class=\"\" href=\"#\">\n <button\n class=\"middle none font-sans font-bold center transition-all disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none text-xs py-3 rounded-lg text-white hover:bg-white/10 active:bg-white/30 w-full flex items-center gap-4 px-4 capitalize\"\n type=\"button\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"\n class=\"w-5 h-5 text-inherit\">\n <path fill-rule=\"evenodd\"\n d=\"M5.25 9a6.75 6.75 0 0113.5 0v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 01-.297 1.206c-1.544.57-3.16.99-4.831 1.243a3.75 3.75 0 11-7.48 0 24.585 24.585 0 01-4.831-1.244.75.75 0 01-.298-1.205A8.217 8.217 0 005.25 9.75V9zm4.502 8.9a2.25 2.25 0 104.496 0 25.057 25.057 0 01-4.496 0z\"\n clip-rule=\"evenodd\"></path>\n </svg>\n <p class=\"block antialiased font-sans text-base leading-relaxed text-inherit font-medium capitalize\">\n notifactions</p>\n </button>\n </a>\n </li>\n </ul>\n\n <ul class=\"mb-4 flex flex-col gap-1\">\n <li class=\"mx-3.5 mt-4 mb-2\">\n <p class=\"block antialiased font-sans text-sm leading-normal text-white font-black uppercase opacity-75\">auth\n pages</p>\n </li>\n @if (isAuthenticated()) {\n <li>\n <button\n class=\"middle none font-sans font-bold center transition-all disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none text-xs py-3 rounded-lg text-white hover:bg-white/10 active:bg-white/30 w-full flex items-center gap-4 px-4 capitalize\"\n type=\"button\"\n (click)=\"onSignOut.emit()\"\n data-logout\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"\n class=\"w-5 h-5 text-inherit\">\n <path fill-rule=\"evenodd\"\n d=\"M7.5 3.75A1.5 1.5 0 006 5.25v13.5a1.5 1.5 0 001.5 1.5h6a1.5 1.5 0 001.5-1.5V15a.75.75 0 011.5 0v3.75a3 3 0 01-3 3h-6a3 3 0 01-3-3V5.25a3 3 0 013-3h6a3 3 0 013 3V9A.75.75 0 0115 9V5.25a1.5 1.5 0 00-1.5-1.5h-6zm10.72 4.72a.75.75 0 011.06 0l3 3a.75.75 0 010 1.06l-3 3a.75.75 0 11-1.06-1.06l1.72-1.72H9a.75.75 0 010-1.5h10.94l-1.72-1.72a.75.75 0 010-1.06z\"\n clip-rule=\"evenodd\"></path>\n </svg>\n <p class=\"block antialiased font-sans text-base leading-relaxed text-inherit font-medium capitalize\">Logout\n </p>\n </button>\n </li>\n } @else {\n <li>\n <button\n class=\"middle none font-sans font-bold center transition-all disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none text-xs py-3 rounded-lg text-white hover:bg-white/10 active:bg-white/30 w-full flex items-center gap-4 px-4 capitalize\"\n type=\"button\"\n (click)=\"onSignIn.emit()\"\n data-login\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"\n class=\"w-5 h-5 text-inherit\">\n <path\n d=\"M6.25 6.375a4.125 4.125 0 118.25 0 4.125 4.125 0 01-8.25 0zM3.25 19.125a7.125 7.125 0 0114.25 0v.003l-.001.119a.75.75 0 01-.363.63 13.067 13.067 0 01-6.761 1.873c-2.472 0-4.786-.684-6.76-1.873a.75.75 0 01-.364-.63l-.001-.122zM19.75 7.5a.75.75 0 00-1.5 0v2.25H16a.75.75 0 000 1.5h2.25v2.25a.75.75 0 001.5 0v-2.25H22a.75.75 0 000-1.5h-2.25V7.5z\">\n </path>\n </svg>\n <p class=\"block antialiased font-sans text-base leading-relaxed text-inherit font-medium capitalize\">Login\n </p>\n </button>\n </li>\n }\n </ul>\n </div>\n</aside>\n","/*\n * Public API Surface of apx-side-menu\n */\n\nexport * from './lib/apx-side-menu';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;IAGY;AAAZ,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,KAAA,CAAA,GAAA,cAAoB;AACpB,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,gBAAwB;AACxB,IAAA,UAAA,CAAA,MAAA,CAAA,GAAA,eAAsB;AACtB,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,iBAA0B;AAC5B,CAAC,EALW,UAAU,KAAV,UAAU,GAKrB,EAAA,CAAA,CAAA;MAQY,WAAW,CAAA;AACtB,IAAA,eAAe,GAAG,KAAK,CAAU,KAAK,CAAC;AAEvC,IAAA,UAAU,GAAG,KAAK,CAAa,UAAU,CA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