@greatapps/common 1.1.114 → 1.1.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/layouts/AppMobileNavBar.mjs +27 -3
- package/dist/components/layouts/AppMobileNavBar.mjs.map +1 -1
- package/dist/components/layouts/AppNavBar.mjs +2 -36
- package/dist/components/layouts/AppNavBar.mjs.map +1 -1
- package/dist/components/layouts/NavBar.mjs +79 -44
- package/dist/components/layouts/NavBar.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/layouts/AppNavBar.tsx +12 -52
- package/src/components/layouts/NavBar.tsx +118 -79
|
@@ -25,7 +25,15 @@ function AppMobileNavBar({
|
|
|
25
25
|
className: `relative size-10 flex items-center justify-center rounded-lg transition-colors ${onLogoClick ? "cursor-pointer hover:bg-gray-100" : ""}`,
|
|
26
26
|
onClick: onLogoClick,
|
|
27
27
|
children: [
|
|
28
|
-
/* @__PURE__ */ jsx(
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
Image,
|
|
30
|
+
{
|
|
31
|
+
src: "/icons/great-icon.svg",
|
|
32
|
+
alt: "GreatApps",
|
|
33
|
+
width: 28,
|
|
34
|
+
height: 28
|
|
35
|
+
}
|
|
36
|
+
),
|
|
29
37
|
isGappsActive && /* @__PURE__ */ jsx("div", { className: "absolute bottom-[-17px] left-1/2 -translate-x-1/2 w-5 h-[3px] bg-gray-950 rounded-t-xl" })
|
|
30
38
|
]
|
|
31
39
|
}
|
|
@@ -51,7 +59,15 @@ function AppMobileNavBar({
|
|
|
51
59
|
style: {
|
|
52
60
|
background: "radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(153,234,255,0.45) 100%)"
|
|
53
61
|
},
|
|
54
|
-
children: /* @__PURE__ */ jsx(
|
|
62
|
+
children: /* @__PURE__ */ jsx(
|
|
63
|
+
Image,
|
|
64
|
+
{
|
|
65
|
+
src: "/icons/icon-navbar.svg",
|
|
66
|
+
alt: "GreatPages",
|
|
67
|
+
width: 24,
|
|
68
|
+
height: 24
|
|
69
|
+
}
|
|
70
|
+
)
|
|
55
71
|
}
|
|
56
72
|
)
|
|
57
73
|
}
|
|
@@ -60,7 +76,15 @@ function AppMobileNavBar({
|
|
|
60
76
|
{
|
|
61
77
|
className: `size-10 flex items-center justify-center rounded-lg transition-colors duration-300 bg-pages-50 ${onAppIconClick ? "cursor-pointer hover:opacity-80" : ""}`,
|
|
62
78
|
onClick: onAppIconClick,
|
|
63
|
-
children: /* @__PURE__ */ jsx(
|
|
79
|
+
children: /* @__PURE__ */ jsx(
|
|
80
|
+
Image,
|
|
81
|
+
{
|
|
82
|
+
src: "/icons/icon-navbar.svg",
|
|
83
|
+
alt: "GreatPages",
|
|
84
|
+
width: 24,
|
|
85
|
+
height: 24
|
|
86
|
+
}
|
|
87
|
+
)
|
|
64
88
|
}
|
|
65
89
|
) }),
|
|
66
90
|
/* @__PURE__ */ jsx(TooltipContent, { side: "bottom", children: "GreatPages" })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layouts/AppMobileNavBar.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/layouts/AppMobileNavBar.tsx"],"sourcesContent":["\"use client\";\n\nimport { ReactNode } from \"react\";\nimport Image from \"next/image\";\nimport { ProfilePopover } from \"./ProfilePopover\";\nimport { useAccountModals } from \"../../store/useAccountModals\";\nimport type { ProfileMenuItem } from \"./ProfilePopover\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/overlay/Tooltip\";\n\nexport interface AppMobileNavBarProps {\n /** Which app is currently active — controls which icon gets the indicator */\n activeApp?: \"gapps\" | \"gpages\";\n /** Called when the GreatApps logo is clicked */\n onLogoClick?: () => void;\n /** Called when the app icon (e.g. GreatPages) is clicked */\n onAppIconClick?: () => void;\n /** Extra slot rendered after the app icon (e.g. project selector) */\n extraLeftSlot?: ReactNode;\n /** Required: the right-side action element (toggle button, sheet button, etc.) */\n rightActionSlot: ReactNode;\n menuItems?: ProfileMenuItem[];\n onCreditsClick?: () => void;\n}\n\nexport function AppMobileNavBar({\n activeApp,\n onLogoClick,\n onAppIconClick,\n extraLeftSlot,\n rightActionSlot,\n menuItems = [],\n onCreditsClick,\n}: AppMobileNavBarProps) {\n const { openConfigurations } = useAccountModals();\n\n const isGpagesActive = activeApp === \"gpages\";\n const isGappsActive = activeApp === \"gapps\";\n\n return (\n <div className=\"fixed top-0 left-0 right-0 flex md:hidden items-center justify-between p-4 bg-white z-50 border-b border-gray-200\">\n <div className=\"flex items-center gap-1.5\">\n <Tooltip>\n <TooltipTrigger asChild>\n <div\n className={`relative size-10 flex items-center justify-center rounded-lg transition-colors ${onLogoClick ? \"cursor-pointer hover:bg-gray-100\" : \"\"}`}\n onClick={onLogoClick}\n >\n <Image\n src=\"/icons/great-icon.svg\"\n alt=\"GreatApps\"\n width={28}\n height={28}\n />\n {isGappsActive && (\n <div className=\"absolute bottom-[-17px] left-1/2 -translate-x-1/2 w-5 h-[3px] bg-gray-950 rounded-t-xl\" />\n )}\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">GreatApps</TooltipContent>\n </Tooltip>\n <div className=\"relative\">\n <Tooltip>\n <TooltipTrigger asChild>\n {isGpagesActive ? (\n <div\n className=\"size-10 rounded-xl cursor-pointer p-[2px]\"\n style={{\n border: \"1.5px solid rgba(153,234,255,0.75)\",\n background: \"white\",\n boxShadow:\n \"0 0 8px rgba(153,234,255,0.5), 0 0 18px rgba(153,234,255,0.2)\",\n }}\n onClick={onAppIconClick}\n >\n <div\n className=\"w-full h-full rounded-lg flex items-center justify-center\"\n style={{\n background:\n \"radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(153,234,255,0.45) 100%)\",\n }}\n >\n <Image\n src=\"/icons/icon-navbar.svg\"\n alt=\"GreatPages\"\n width={24}\n height={24}\n />\n </div>\n </div>\n ) : (\n <div\n className={`size-10 flex items-center justify-center rounded-lg transition-colors duration-300 bg-pages-50 ${onAppIconClick ? \"cursor-pointer hover:opacity-80\" : \"\"}`}\n onClick={onAppIconClick}\n >\n <Image\n src=\"/icons/icon-navbar.svg\"\n alt=\"GreatPages\"\n width={24}\n height={24}\n />\n </div>\n )}\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">GreatPages</TooltipContent>\n </Tooltip>\n {isGpagesActive && (\n <div className=\"absolute -bottom-[17px] left-1/2 -translate-x-1/2 w-5 h-[3px] bg-pages-500 rounded-t-xl\" />\n )}\n </div>\n {extraLeftSlot}\n </div>\n <div className=\"flex items-center gap-1.5\">\n <ProfilePopover\n side=\"bottom\"\n align=\"end\"\n contentClassName=\"\"\n onEditProfile={() => openConfigurations()}\n onCreditsClick={onCreditsClick}\n menuItems={menuItems}\n />\n {rightActionSlot}\n </div>\n </div>\n );\n}\n"],"mappings":";AA2CY,SAIE,KAJF;AAxCZ,OAAO,WAAW;AAClB,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AAEjC,SAAS,SAAS,gBAAgB,sBAAsB;AAiBjD,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY,CAAC;AAAA,EACb;AACF,GAAyB;AACvB,QAAM,EAAE,mBAAmB,IAAI,iBAAiB;AAEhD,QAAM,iBAAiB,cAAc;AACrC,QAAM,gBAAgB,cAAc;AAEpC,SACE,qBAAC,SAAI,WAAU,qHACb;AAAA,yBAAC,SAAI,WAAU,6BACb;AAAA,2BAAC,WACC;AAAA,4BAAC,kBAAe,SAAO,MACrB;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,kFAAkF,cAAc,qCAAqC,EAAE;AAAA,YAClJ,SAAS;AAAA,YAET;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,KAAI;AAAA,kBACJ,KAAI;AAAA,kBACJ,OAAO;AAAA,kBACP,QAAQ;AAAA;AAAA,cACV;AAAA,cACC,iBACC,oBAAC,SAAI,WAAU,0FAAyF;AAAA;AAAA;AAAA,QAE5G,GACF;AAAA,QACA,oBAAC,kBAAe,MAAK,UAAS,uBAAS;AAAA,SACzC;AAAA,MACA,qBAAC,SAAI,WAAU,YACb;AAAA,6BAAC,WACC;AAAA,8BAAC,kBAAe,SAAO,MACpB,2BACC;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,QAAQ;AAAA,gBACR,YAAY;AAAA,gBACZ,WACE;AAAA,cACJ;AAAA,cACA,SAAS;AAAA,cAET;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,OAAO;AAAA,oBACL,YACE;AAAA,kBACJ;AAAA,kBAEA;AAAA,oBAAC;AAAA;AAAA,sBACC,KAAI;AAAA,sBACJ,KAAI;AAAA,sBACJ,OAAO;AAAA,sBACP,QAAQ;AAAA;AAAA,kBACV;AAAA;AAAA,cACF;AAAA;AAAA,UACF,IAEA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,kGAAkG,iBAAiB,oCAAoC,EAAE;AAAA,cACpK,SAAS;AAAA,cAET;AAAA,gBAAC;AAAA;AAAA,kBACC,KAAI;AAAA,kBACJ,KAAI;AAAA,kBACJ,OAAO;AAAA,kBACP,QAAQ;AAAA;AAAA,cACV;AAAA;AAAA,UACF,GAEJ;AAAA,UACA,oBAAC,kBAAe,MAAK,UAAS,wBAAU;AAAA,WAC1C;AAAA,QACC,kBACC,oBAAC,SAAI,WAAU,2FAA0F;AAAA,SAE7G;AAAA,MACC;AAAA,OACH;AAAA,IACA,qBAAC,SAAI,WAAU,6BACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAM;AAAA,UACN,kBAAiB;AAAA,UACjB,eAAe,MAAM,mBAAmB;AAAA,UACxC;AAAA,UACA;AAAA;AAAA,MACF;AAAA,MACC;AAAA,OACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Image from "next/image";
|
|
4
3
|
import { useRouter } from "next/navigation";
|
|
5
4
|
import { NavBar } from "./NavBar";
|
|
6
5
|
import { ProfilePopover } from "./ProfilePopover";
|
|
7
6
|
import { NotificationsPopover } from "./NotificationsPopover";
|
|
8
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/overlay/Tooltip";
|
|
9
7
|
import { useAccountModals } from "../../store/useAccountModals";
|
|
10
8
|
function AppNavBar({
|
|
11
9
|
onLogoClick,
|
|
@@ -21,46 +19,14 @@ function AppNavBar({
|
|
|
21
19
|
const { openConfigurations } = useAccountModals();
|
|
22
20
|
const handleLogoClick = onLogoClick ?? (() => router.push("/"));
|
|
23
21
|
const handleAppIconClick = () => router.push(appIconHref);
|
|
24
|
-
const isGpagesActive = activeApp === "gpages";
|
|
25
22
|
return /* @__PURE__ */ jsxs(
|
|
26
23
|
NavBar,
|
|
27
24
|
{
|
|
28
25
|
onLogoClick: handleLogoClick,
|
|
29
|
-
|
|
26
|
+
onAppIconClick: handleAppIconClick,
|
|
27
|
+
activeApp,
|
|
30
28
|
showExpandButton,
|
|
31
29
|
onExpandClick,
|
|
32
|
-
appIconSlot: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
33
|
-
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
34
|
-
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, onClick: handleAppIconClick, children: isGpagesActive ? /* @__PURE__ */ jsx(
|
|
35
|
-
"div",
|
|
36
|
-
{
|
|
37
|
-
className: "size-10 rounded-xl cursor-pointer p-[2px]",
|
|
38
|
-
style: {
|
|
39
|
-
border: "1.5px solid rgba(153,234,255,0.75)",
|
|
40
|
-
background: "white",
|
|
41
|
-
boxShadow: "0 0 8px rgba(153,234,255,0.5), 0 0 18px rgba(153,234,255,0.2)"
|
|
42
|
-
},
|
|
43
|
-
children: /* @__PURE__ */ jsx(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: "w-full h-full rounded-lg flex items-center justify-center",
|
|
47
|
-
style: {
|
|
48
|
-
background: "radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(153,234,255,0.45) 100%)"
|
|
49
|
-
},
|
|
50
|
-
children: /* @__PURE__ */ jsx(Image, { src: "/icons/icon-navbar.svg", alt: "GreatPages", width: 24, height: 24 })
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
) : /* @__PURE__ */ jsx("div", { className: "size-10 flex items-center justify-center rounded-lg cursor-pointer hover:bg-pages-50 transition-colors duration-300", children: /* @__PURE__ */ jsx(Image, { src: "/icons/icon-navbar.svg", alt: "GreatPages", width: 24, height: 24 }) }) }),
|
|
55
|
-
/* @__PURE__ */ jsx(TooltipContent, { side: "right", children: "GreatPages" })
|
|
56
|
-
] }),
|
|
57
|
-
/* @__PURE__ */ jsx(
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
className: `absolute -left-4 top-1/2 -translate-y-1/2 w-[3px] h-5 bg-pages-500 rounded-r-xl transition-opacity duration-300 ${isGpagesActive ? "opacity-100" : "opacity-0"}`
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
] }),
|
|
64
30
|
children: [
|
|
65
31
|
/* @__PURE__ */ jsx(NotificationsPopover, { onViewAll: onNotificationsViewAll }),
|
|
66
32
|
/* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layouts/AppNavBar.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/layouts/AppNavBar.tsx"],"sourcesContent":["\"use client\";\n\nimport { useRouter } from \"next/navigation\";\nimport { NavBar } from \"./NavBar\";\nimport { ProfilePopover } from \"./ProfilePopover\";\nimport { NotificationsPopover } from \"./NotificationsPopover\";\nimport { useAccountModals } from \"../../store/useAccountModals\";\nimport type { ProfileMenuItem } from \"./ProfilePopover\";\n\nexport interface AppNavBarProps {\n onLogoClick?: () => void;\n /** Which app is currently active — controls which icon gets the indicator */\n activeApp?: \"gapps\" | \"gpages\";\n appIconHref?: string;\n showExpandButton?: boolean;\n onExpandClick?: () => void;\n menuItems?: ProfileMenuItem[];\n onCreditsClick?: () => void;\n onNotificationsViewAll?: () => void;\n}\n\nexport function AppNavBar({\n onLogoClick,\n activeApp,\n appIconHref = \"/\",\n showExpandButton = false,\n onExpandClick,\n menuItems = [],\n onCreditsClick,\n onNotificationsViewAll,\n}: AppNavBarProps) {\n const router = useRouter();\n const { openConfigurations } = useAccountModals();\n\n const handleLogoClick = onLogoClick ?? (() => router.push(\"/\"));\n const handleAppIconClick = () => router.push(appIconHref);\n\n return (\n <NavBar\n onLogoClick={handleLogoClick}\n onAppIconClick={handleAppIconClick}\n activeApp={activeApp}\n showExpandButton={showExpandButton}\n onExpandClick={onExpandClick}\n >\n <NotificationsPopover onViewAll={onNotificationsViewAll} />\n <ProfilePopover\n onEditProfile={() => openConfigurations()}\n onCreditsClick={onCreditsClick}\n menuItems={menuItems}\n />\n </NavBar>\n );\n}\n"],"mappings":";AAsCI,SAOE,KAPF;AApCJ,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AACvB,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AAe1B,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB;AAAA,EACA,YAAY,CAAC;AAAA,EACb;AAAA,EACA;AACF,GAAmB;AACjB,QAAM,SAAS,UAAU;AACzB,QAAM,EAAE,mBAAmB,IAAI,iBAAiB;AAEhD,QAAM,kBAAkB,gBAAgB,MAAM,OAAO,KAAK,GAAG;AAC7D,QAAM,qBAAqB,MAAM,OAAO,KAAK,WAAW;AAExD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,4BAAC,wBAAqB,WAAW,wBAAwB;AAAA,QACzD;AAAA,UAAC;AAAA;AAAA,YACC,eAAe,MAAM,mBAAmB;AAAA,YACxC;AAAA,YACA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -7,56 +7,91 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/overlay/Tooltip";
|
|
|
7
7
|
import { cn } from "../../infra/utils/clsx";
|
|
8
8
|
function NavBar({
|
|
9
9
|
onLogoClick,
|
|
10
|
-
|
|
10
|
+
onAppIconClick,
|
|
11
|
+
activeApp,
|
|
11
12
|
showExpandButton = false,
|
|
12
13
|
onExpandClick,
|
|
13
|
-
appIconSlot,
|
|
14
14
|
children,
|
|
15
15
|
className
|
|
16
16
|
}) {
|
|
17
|
-
return /* @__PURE__ */ jsxs(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
17
|
+
return /* @__PURE__ */ jsxs(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: cn(
|
|
21
|
+
"hidden md:flex flex-col justify-between h-screen p-4 border-r border-gray-200 overflow-visible z-40 bg-white",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 items-center mt-[6.5px]", children: [
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
27
|
+
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
28
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { className: "cursor-pointer", asChild: true, onClick: onLogoClick, children: /* @__PURE__ */ jsx(Image, { src: "/icons/great-icon.svg", alt: "Great Icon", width: 28, height: 28 }) }),
|
|
29
|
+
/* @__PURE__ */ jsx(TooltipContent, { side: "right", children: "GreatApps" })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
className: cn(
|
|
35
|
+
"absolute -left-[22px] top-1/2 -translate-y-1/2 w-[3px] h-5 bg-gray-950 rounded-r-xl transition-opacity duration-300",
|
|
36
|
+
activeApp === "gapps" ? "opacity-100" : "opacity-0"
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ jsxs("div", { className: "relative w-full mt-[7.5px]", children: [
|
|
42
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
43
|
+
showExpandButton && /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
44
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
45
|
+
"button",
|
|
46
|
+
{
|
|
47
|
+
onClick: onExpandClick,
|
|
48
|
+
className: "lg:hidden absolute top-1/2 -translate-y-1/2 right-0 translate-x-[calc(50%+1rem)] size-8 flex items-center justify-center rounded-full border border-gray-200 bg-white hover:bg-gray-100 cursor-pointer transition-colors z-10",
|
|
49
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: 16, className: "text-gray-500" })
|
|
50
|
+
}
|
|
51
|
+
) }),
|
|
52
|
+
/* @__PURE__ */ jsx(TooltipContent, { side: "right", children: "Expandir menu" })
|
|
53
|
+
] })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
56
|
+
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
57
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, onClick: onAppIconClick, children: activeApp === "gpages" ? /* @__PURE__ */ jsx(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: "size-10 rounded-xl cursor-pointer p-[2px]",
|
|
61
|
+
style: {
|
|
62
|
+
border: "1.5px solid rgba(153,234,255,0.75)",
|
|
63
|
+
background: "white",
|
|
64
|
+
boxShadow: "0 0 8px rgba(153,234,255,0.5), 0 0 18px rgba(153,234,255,0.2)"
|
|
65
|
+
},
|
|
66
|
+
children: /* @__PURE__ */ jsx(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: "w-full h-full rounded-lg flex items-center justify-center",
|
|
70
|
+
style: {
|
|
71
|
+
background: "radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(153,234,255,0.45) 100%)"
|
|
72
|
+
},
|
|
73
|
+
children: /* @__PURE__ */ jsx(Image, { src: "/icons/icon-navbar.svg", alt: "GreatPages", width: 24, height: 24 })
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
) : /* @__PURE__ */ jsx("div", { className: "size-10 flex items-center justify-center rounded-lg cursor-pointer hover:bg-pages-50 transition-colors duration-300", children: /* @__PURE__ */ jsx(Image, { src: "/icons/icon-navbar.svg", alt: "GreatPages", width: 28, height: 28 }) }) }),
|
|
78
|
+
/* @__PURE__ */ jsx(TooltipContent, { side: "right", children: "GreatPages" })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: cn(
|
|
84
|
+
"absolute -left-4 top-1/2 -translate-y-1/2 w-[3px] h-5 bg-pages-500 rounded-r-xl transition-opacity duration-300",
|
|
85
|
+
activeApp === "gpages" ? "opacity-100" : "opacity-0"
|
|
86
|
+
)
|
|
87
|
+
}
|
|
38
88
|
)
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
46
|
-
"button",
|
|
47
|
-
{
|
|
48
|
-
onClick: onExpandClick,
|
|
49
|
-
className: "lg:hidden absolute top-1/2 -translate-y-1/2 right-0 translate-x-[calc(50%+1rem)] size-8 flex items-center justify-center rounded-full border border-gray-200 bg-white hover:bg-gray-100 cursor-pointer transition-colors z-10",
|
|
50
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { size: 16, className: "text-gray-500" })
|
|
51
|
-
}
|
|
52
|
-
) }),
|
|
53
|
-
/* @__PURE__ */ jsx(TooltipContent, { side: "right", children: "Expandir menu" })
|
|
54
|
-
] })
|
|
55
|
-
] }),
|
|
56
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: appIconSlot })
|
|
57
|
-
] }),
|
|
58
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-2", children })
|
|
59
|
-
] });
|
|
89
|
+
] }) })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-2", children })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
60
95
|
}
|
|
61
96
|
export {
|
|
62
97
|
NavBar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layouts/NavBar.tsx"],"sourcesContent":["\"use client\"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/layouts/NavBar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport Image from \"next/image\";\nimport { ChevronRight } from \"lucide-react\";\nimport { Separator } from \"../ui/data-display/Separator\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/overlay/Tooltip\";\nimport { cn } from \"../../infra/utils/clsx\";\n\ntype NavBarProps = {\n onLogoClick: () => void;\n onAppIconClick?: () => void;\n activeApp?: \"gapps\" | \"gpages\";\n showExpandButton?: boolean;\n onExpandClick?: () => void;\n children?: React.ReactNode;\n className?: string;\n};\n\nfunction NavBar({\n onLogoClick,\n onAppIconClick,\n activeApp,\n showExpandButton = false,\n onExpandClick,\n children,\n className,\n}: NavBarProps) {\n return (\n <div\n className={cn(\n \"hidden md:flex flex-col justify-between h-screen p-4 border-r border-gray-200 overflow-visible z-40 bg-white\",\n className,\n )}\n >\n <div className=\"flex flex-col gap-4 items-center mt-[6.5px]\">\n {/* GreatApps logo */}\n <div className=\"relative\">\n <Tooltip>\n <TooltipTrigger className=\"cursor-pointer\" asChild onClick={onLogoClick}>\n <Image src=\"/icons/great-icon.svg\" alt=\"Great Icon\" width={28} height={28} />\n </TooltipTrigger>\n <TooltipContent side=\"right\">GreatApps</TooltipContent>\n </Tooltip>\n <div\n className={cn(\n \"absolute -left-[22px] top-1/2 -translate-y-1/2 w-[3px] h-5 bg-gray-950 rounded-r-xl transition-opacity duration-300\",\n activeApp === \"gapps\" ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n </div>\n\n <div className=\"relative w-full mt-[7.5px]\">\n <Separator />\n {showExpandButton && (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={onExpandClick}\n className=\"lg:hidden absolute top-1/2 -translate-y-1/2 right-0 translate-x-[calc(50%+1rem)] size-8 flex items-center justify-center rounded-full border border-gray-200 bg-white hover:bg-gray-100 cursor-pointer transition-colors z-10\"\n >\n <ChevronRight size={16} className=\"text-gray-500\" />\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"right\">Expandir menu</TooltipContent>\n </Tooltip>\n )}\n </div>\n\n {/* GreatPages icon */}\n <div className=\"flex flex-col gap-2\">\n <div className=\"relative\">\n <Tooltip>\n <TooltipTrigger asChild onClick={onAppIconClick}>\n {activeApp === \"gpages\" ? (\n <div\n className=\"size-10 rounded-xl cursor-pointer p-[2px]\"\n style={{\n border: \"1.5px solid rgba(153,234,255,0.75)\",\n background: \"white\",\n boxShadow: \"0 0 8px rgba(153,234,255,0.5), 0 0 18px rgba(153,234,255,0.2)\",\n }}\n >\n <div\n className=\"w-full h-full rounded-lg flex items-center justify-center\"\n style={{\n background:\n \"radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(153,234,255,0.45) 100%)\",\n }}\n >\n <Image src=\"/icons/icon-navbar.svg\" alt=\"GreatPages\" width={24} height={24} />\n </div>\n </div>\n ) : (\n <div className=\"size-10 flex items-center justify-center rounded-lg cursor-pointer hover:bg-pages-50 transition-colors duration-300\">\n <Image src=\"/icons/icon-navbar.svg\" alt=\"GreatPages\" width={28} height={28} />\n </div>\n )}\n </TooltipTrigger>\n <TooltipContent side=\"right\">GreatPages</TooltipContent>\n </Tooltip>\n <div\n className={cn(\n \"absolute -left-4 top-1/2 -translate-y-1/2 w-[3px] h-5 bg-pages-500 rounded-r-xl transition-opacity duration-300\",\n activeApp === \"gpages\" ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n </div>\n </div>\n </div>\n\n <div className=\"flex flex-col items-center gap-2\">{children}</div>\n </div>\n );\n}\n\nexport { NavBar };\nexport type { NavBarProps };\n"],"mappings":";AAsCU,SAEI,KAFJ;AAnCV,OAAO,WAAW;AAClB,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,UAAU;AAYnB,SAAS,OAAO;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AACF,GAAgB;AACd,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,6BAAC,SAAI,WAAU,+CAEb;AAAA,+BAAC,SAAI,WAAU,YACb;AAAA,iCAAC,WACC;AAAA,kCAAC,kBAAe,WAAU,kBAAiB,SAAO,MAAC,SAAS,aAC1D,8BAAC,SAAM,KAAI,yBAAwB,KAAI,cAAa,OAAO,IAAI,QAAQ,IAAI,GAC7E;AAAA,cACA,oBAAC,kBAAe,MAAK,SAAQ,uBAAS;AAAA,eACxC;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,kBACT;AAAA,kBACA,cAAc,UAAU,gBAAgB;AAAA,gBAC1C;AAAA;AAAA,YACF;AAAA,aACF;AAAA,UAEA,qBAAC,SAAI,WAAU,8BACb;AAAA,gCAAC,aAAU;AAAA,YACV,oBACC,qBAAC,WACC;AAAA,kCAAC,kBAAe,SAAO,MACrB;AAAA,gBAAC;AAAA;AAAA,kBACC,SAAS;AAAA,kBACT,WAAU;AAAA,kBAEV,8BAAC,gBAAa,MAAM,IAAI,WAAU,iBAAgB;AAAA;AAAA,cACpD,GACF;AAAA,cACA,oBAAC,kBAAe,MAAK,SAAQ,2BAAa;AAAA,eAC5C;AAAA,aAEJ;AAAA,UAGA,oBAAC,SAAI,WAAU,uBACb,+BAAC,SAAI,WAAU,YACb;AAAA,iCAAC,WACC;AAAA,kCAAC,kBAAe,SAAO,MAAC,SAAS,gBAC9B,wBAAc,WACb;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,OAAO;AAAA,oBACL,QAAQ;AAAA,oBACR,YAAY;AAAA,oBACZ,WAAW;AAAA,kBACb;AAAA,kBAEA;AAAA,oBAAC;AAAA;AAAA,sBACC,WAAU;AAAA,sBACV,OAAO;AAAA,wBACL,YACE;AAAA,sBACJ;AAAA,sBAEA,8BAAC,SAAM,KAAI,0BAAyB,KAAI,cAAa,OAAO,IAAI,QAAQ,IAAI;AAAA;AAAA,kBAC9E;AAAA;AAAA,cACF,IAEA,oBAAC,SAAI,WAAU,uHACb,8BAAC,SAAM,KAAI,0BAAyB,KAAI,cAAa,OAAO,IAAI,QAAQ,IAAI,GAC9E,GAEJ;AAAA,cACA,oBAAC,kBAAe,MAAK,SAAQ,wBAAU;AAAA,eACzC;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,kBACT;AAAA,kBACA,cAAc,WAAW,gBAAgB;AAAA,gBAC3C;AAAA;AAAA,YACF;AAAA,aACF,GACF;AAAA,WACF;AAAA,QAEA,oBAAC,SAAI,WAAU,oCAAoC,UAAS;AAAA;AAAA;AAAA,EAC9D;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { useAccountModals } from '../../store/useAccountModals';
|
|
10
|
-
import type { ProfileMenuItem } from './ProfilePopover';
|
|
3
|
+
import { useRouter } from "next/navigation";
|
|
4
|
+
import { NavBar } from "./NavBar";
|
|
5
|
+
import { ProfilePopover } from "./ProfilePopover";
|
|
6
|
+
import { NotificationsPopover } from "./NotificationsPopover";
|
|
7
|
+
import { useAccountModals } from "../../store/useAccountModals";
|
|
8
|
+
import type { ProfileMenuItem } from "./ProfilePopover";
|
|
11
9
|
|
|
12
10
|
export interface AppNavBarProps {
|
|
13
11
|
onLogoClick?: () => void;
|
|
14
12
|
/** Which app is currently active — controls which icon gets the indicator */
|
|
15
|
-
activeApp?:
|
|
13
|
+
activeApp?: "gapps" | "gpages";
|
|
16
14
|
appIconHref?: string;
|
|
17
15
|
showExpandButton?: boolean;
|
|
18
16
|
onExpandClick?: () => void;
|
|
@@ -24,7 +22,7 @@ export interface AppNavBarProps {
|
|
|
24
22
|
export function AppNavBar({
|
|
25
23
|
onLogoClick,
|
|
26
24
|
activeApp,
|
|
27
|
-
appIconHref =
|
|
25
|
+
appIconHref = "/",
|
|
28
26
|
showExpandButton = false,
|
|
29
27
|
onExpandClick,
|
|
30
28
|
menuItems = [],
|
|
@@ -34,54 +32,16 @@ export function AppNavBar({
|
|
|
34
32
|
const router = useRouter();
|
|
35
33
|
const { openConfigurations } = useAccountModals();
|
|
36
34
|
|
|
37
|
-
const handleLogoClick = onLogoClick ?? (() => router.push(
|
|
35
|
+
const handleLogoClick = onLogoClick ?? (() => router.push("/"));
|
|
38
36
|
const handleAppIconClick = () => router.push(appIconHref);
|
|
39
37
|
|
|
40
|
-
const isGpagesActive = activeApp === 'gpages';
|
|
41
|
-
|
|
42
38
|
return (
|
|
43
39
|
<NavBar
|
|
44
40
|
onLogoClick={handleLogoClick}
|
|
45
|
-
|
|
41
|
+
onAppIconClick={handleAppIconClick}
|
|
42
|
+
activeApp={activeApp}
|
|
46
43
|
showExpandButton={showExpandButton}
|
|
47
44
|
onExpandClick={onExpandClick}
|
|
48
|
-
appIconSlot={
|
|
49
|
-
<div className="relative">
|
|
50
|
-
<Tooltip>
|
|
51
|
-
<TooltipTrigger asChild onClick={handleAppIconClick}>
|
|
52
|
-
{isGpagesActive ? (
|
|
53
|
-
<div
|
|
54
|
-
className="size-10 rounded-xl cursor-pointer p-[2px]"
|
|
55
|
-
style={{
|
|
56
|
-
border: '1.5px solid rgba(153,234,255,0.75)',
|
|
57
|
-
background: 'white',
|
|
58
|
-
boxShadow: '0 0 8px rgba(153,234,255,0.5), 0 0 18px rgba(153,234,255,0.2)',
|
|
59
|
-
}}
|
|
60
|
-
>
|
|
61
|
-
<div
|
|
62
|
-
className="w-full h-full rounded-lg flex items-center justify-center"
|
|
63
|
-
style={{
|
|
64
|
-
background: 'radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(153,234,255,0.45) 100%)',
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
<Image src="/icons/icon-navbar.svg" alt="GreatPages" width={24} height={24} />
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
) : (
|
|
71
|
-
<div className="size-10 flex items-center justify-center rounded-lg cursor-pointer hover:bg-pages-50 transition-colors duration-300">
|
|
72
|
-
<Image src="/icons/icon-navbar.svg" alt="GreatPages" width={24} height={24} />
|
|
73
|
-
</div>
|
|
74
|
-
)}
|
|
75
|
-
</TooltipTrigger>
|
|
76
|
-
<TooltipContent side="right">GreatPages</TooltipContent>
|
|
77
|
-
</Tooltip>
|
|
78
|
-
<div
|
|
79
|
-
className={`absolute -left-4 top-1/2 -translate-y-1/2 w-[3px] h-5 bg-pages-500 rounded-r-xl transition-opacity duration-300 ${
|
|
80
|
-
isGpagesActive ? 'opacity-100' : 'opacity-0'
|
|
81
|
-
}`}
|
|
82
|
-
/>
|
|
83
|
-
</div>
|
|
84
|
-
}
|
|
85
45
|
>
|
|
86
46
|
<NotificationsPopover onViewAll={onNotificationsViewAll} />
|
|
87
47
|
<ProfilePopover
|
|
@@ -1,79 +1,118 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import Image from "next/image"
|
|
5
|
-
import { ChevronRight } from "lucide-react"
|
|
6
|
-
import { Separator } from "../ui/data-display/Separator"
|
|
7
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/overlay/Tooltip"
|
|
8
|
-
import { cn } from "../../infra/utils/clsx"
|
|
9
|
-
|
|
10
|
-
type NavBarProps = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function NavBar({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}: NavBarProps) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import Image from "next/image";
|
|
5
|
+
import { ChevronRight } from "lucide-react";
|
|
6
|
+
import { Separator } from "../ui/data-display/Separator";
|
|
7
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/overlay/Tooltip";
|
|
8
|
+
import { cn } from "../../infra/utils/clsx";
|
|
9
|
+
|
|
10
|
+
type NavBarProps = {
|
|
11
|
+
onLogoClick: () => void;
|
|
12
|
+
onAppIconClick?: () => void;
|
|
13
|
+
activeApp?: "gapps" | "gpages";
|
|
14
|
+
showExpandButton?: boolean;
|
|
15
|
+
onExpandClick?: () => void;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
function NavBar({
|
|
21
|
+
onLogoClick,
|
|
22
|
+
onAppIconClick,
|
|
23
|
+
activeApp,
|
|
24
|
+
showExpandButton = false,
|
|
25
|
+
onExpandClick,
|
|
26
|
+
children,
|
|
27
|
+
className,
|
|
28
|
+
}: NavBarProps) {
|
|
29
|
+
return (
|
|
30
|
+
<div
|
|
31
|
+
className={cn(
|
|
32
|
+
"hidden md:flex flex-col justify-between h-screen p-4 border-r border-gray-200 overflow-visible z-40 bg-white",
|
|
33
|
+
className,
|
|
34
|
+
)}
|
|
35
|
+
>
|
|
36
|
+
<div className="flex flex-col gap-4 items-center mt-[6.5px]">
|
|
37
|
+
{/* GreatApps logo */}
|
|
38
|
+
<div className="relative">
|
|
39
|
+
<Tooltip>
|
|
40
|
+
<TooltipTrigger className="cursor-pointer" asChild onClick={onLogoClick}>
|
|
41
|
+
<Image src="/icons/great-icon.svg" alt="Great Icon" width={28} height={28} />
|
|
42
|
+
</TooltipTrigger>
|
|
43
|
+
<TooltipContent side="right">GreatApps</TooltipContent>
|
|
44
|
+
</Tooltip>
|
|
45
|
+
<div
|
|
46
|
+
className={cn(
|
|
47
|
+
"absolute -left-[22px] top-1/2 -translate-y-1/2 w-[3px] h-5 bg-gray-950 rounded-r-xl transition-opacity duration-300",
|
|
48
|
+
activeApp === "gapps" ? "opacity-100" : "opacity-0",
|
|
49
|
+
)}
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div className="relative w-full mt-[7.5px]">
|
|
54
|
+
<Separator />
|
|
55
|
+
{showExpandButton && (
|
|
56
|
+
<Tooltip>
|
|
57
|
+
<TooltipTrigger asChild>
|
|
58
|
+
<button
|
|
59
|
+
onClick={onExpandClick}
|
|
60
|
+
className="lg:hidden absolute top-1/2 -translate-y-1/2 right-0 translate-x-[calc(50%+1rem)] size-8 flex items-center justify-center rounded-full border border-gray-200 bg-white hover:bg-gray-100 cursor-pointer transition-colors z-10"
|
|
61
|
+
>
|
|
62
|
+
<ChevronRight size={16} className="text-gray-500" />
|
|
63
|
+
</button>
|
|
64
|
+
</TooltipTrigger>
|
|
65
|
+
<TooltipContent side="right">Expandir menu</TooltipContent>
|
|
66
|
+
</Tooltip>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
{/* GreatPages icon */}
|
|
71
|
+
<div className="flex flex-col gap-2">
|
|
72
|
+
<div className="relative">
|
|
73
|
+
<Tooltip>
|
|
74
|
+
<TooltipTrigger asChild onClick={onAppIconClick}>
|
|
75
|
+
{activeApp === "gpages" ? (
|
|
76
|
+
<div
|
|
77
|
+
className="size-10 rounded-xl cursor-pointer p-[2px]"
|
|
78
|
+
style={{
|
|
79
|
+
border: "1.5px solid rgba(153,234,255,0.75)",
|
|
80
|
+
background: "white",
|
|
81
|
+
boxShadow: "0 0 8px rgba(153,234,255,0.5), 0 0 18px rgba(153,234,255,0.2)",
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
<div
|
|
85
|
+
className="w-full h-full rounded-lg flex items-center justify-center"
|
|
86
|
+
style={{
|
|
87
|
+
background:
|
|
88
|
+
"radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(153,234,255,0.45) 100%)",
|
|
89
|
+
}}
|
|
90
|
+
>
|
|
91
|
+
<Image src="/icons/icon-navbar.svg" alt="GreatPages" width={24} height={24} />
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
) : (
|
|
95
|
+
<div className="size-10 flex items-center justify-center rounded-lg cursor-pointer hover:bg-pages-50 transition-colors duration-300">
|
|
96
|
+
<Image src="/icons/icon-navbar.svg" alt="GreatPages" width={28} height={28} />
|
|
97
|
+
</div>
|
|
98
|
+
)}
|
|
99
|
+
</TooltipTrigger>
|
|
100
|
+
<TooltipContent side="right">GreatPages</TooltipContent>
|
|
101
|
+
</Tooltip>
|
|
102
|
+
<div
|
|
103
|
+
className={cn(
|
|
104
|
+
"absolute -left-4 top-1/2 -translate-y-1/2 w-[3px] h-5 bg-pages-500 rounded-r-xl transition-opacity duration-300",
|
|
105
|
+
activeApp === "gpages" ? "opacity-100" : "opacity-0",
|
|
106
|
+
)}
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<div className="flex flex-col items-center gap-2">{children}</div>
|
|
113
|
+
</div>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { NavBar };
|
|
118
|
+
export type { NavBarProps };
|