@greatapps/common 1.1.112 → 1.1.113
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/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import { ReactNode } from
|
|
4
|
-
import Image from
|
|
5
|
-
import { ProfilePopover } from
|
|
6
|
-
import { useAccountModals } from
|
|
7
|
-
import type { ProfileMenuItem } from
|
|
8
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import Image from "next/image";
|
|
5
|
+
import { ProfilePopover } from "./ProfilePopover";
|
|
6
|
+
import { useAccountModals } from "../../store/useAccountModals";
|
|
7
|
+
import type { ProfileMenuItem } from "./ProfilePopover";
|
|
8
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/overlay/Tooltip";
|
|
9
9
|
|
|
10
10
|
export interface AppMobileNavBarProps {
|
|
11
11
|
/** Which app is currently active — controls which icon gets the indicator */
|
|
12
|
-
activeApp?:
|
|
12
|
+
activeApp?: "gapps" | "gpages";
|
|
13
13
|
/** Called when the GreatApps logo is clicked */
|
|
14
14
|
onLogoClick?: () => void;
|
|
15
15
|
/** Called when the app icon (e.g. GreatPages) is clicked */
|
|
@@ -33,8 +33,8 @@ export function AppMobileNavBar({
|
|
|
33
33
|
}: AppMobileNavBarProps) {
|
|
34
34
|
const { openConfigurations } = useAccountModals();
|
|
35
35
|
|
|
36
|
-
const isGpagesActive = activeApp ===
|
|
37
|
-
const isGappsActive = activeApp ===
|
|
36
|
+
const isGpagesActive = activeApp === "gpages";
|
|
37
|
+
const isGappsActive = activeApp === "gapps";
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<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">
|
|
@@ -42,10 +42,15 @@ export function AppMobileNavBar({
|
|
|
42
42
|
<Tooltip>
|
|
43
43
|
<TooltipTrigger asChild>
|
|
44
44
|
<div
|
|
45
|
-
className={`relative size-10 flex items-center justify-center rounded-lg transition-colors ${onLogoClick ?
|
|
45
|
+
className={`relative size-10 flex items-center justify-center rounded-lg transition-colors ${onLogoClick ? "cursor-pointer hover:bg-gray-100" : ""}`}
|
|
46
46
|
onClick={onLogoClick}
|
|
47
47
|
>
|
|
48
|
-
<Image
|
|
48
|
+
<Image
|
|
49
|
+
src="/icons/great-icon.svg"
|
|
50
|
+
alt="GreatApps"
|
|
51
|
+
width={28}
|
|
52
|
+
height={28}
|
|
53
|
+
/>
|
|
49
54
|
{isGappsActive && (
|
|
50
55
|
<div className="absolute bottom-[-17px] left-1/2 -translate-x-1/2 w-5 h-[3px] bg-gray-950 rounded-t-xl" />
|
|
51
56
|
)}
|
|
@@ -58,36 +63,48 @@ export function AppMobileNavBar({
|
|
|
58
63
|
<TooltipTrigger asChild>
|
|
59
64
|
{isGpagesActive ? (
|
|
60
65
|
<div
|
|
61
|
-
className="size-10 rounded-
|
|
66
|
+
className="size-10 rounded-[10px] cursor-pointer p-[3px]"
|
|
62
67
|
style={{
|
|
63
|
-
border:
|
|
64
|
-
background:
|
|
65
|
-
boxShadow:
|
|
68
|
+
border: "2px solid #A1F1FF",
|
|
69
|
+
background: "#FFFFFF",
|
|
70
|
+
boxShadow: "0 0 10px rgba(161, 241, 255, 0.4)",
|
|
66
71
|
}}
|
|
67
72
|
onClick={onAppIconClick}
|
|
68
73
|
>
|
|
69
74
|
<div
|
|
70
|
-
className="w-full h-full rounded-
|
|
75
|
+
className="w-full h-full rounded-[6px] flex items-center justify-center"
|
|
71
76
|
style={{
|
|
72
|
-
background:
|
|
77
|
+
background:
|
|
78
|
+
"linear-gradient(180deg, #E0FAFF 0%, #B9F6FF 100%)",
|
|
73
79
|
}}
|
|
74
80
|
>
|
|
75
|
-
<Image
|
|
81
|
+
<Image
|
|
82
|
+
src="/icons/icon-navbar.svg"
|
|
83
|
+
alt="GreatPages"
|
|
84
|
+
width={22}
|
|
85
|
+
height={22}
|
|
86
|
+
className="drop-shadow-sm"
|
|
87
|
+
/>
|
|
76
88
|
</div>
|
|
77
89
|
</div>
|
|
78
90
|
) : (
|
|
79
91
|
<div
|
|
80
|
-
className={`size-10 flex items-center justify-center rounded-lg transition-colors duration-300 bg-pages-50 ${onAppIconClick ?
|
|
92
|
+
className={`size-10 flex items-center justify-center rounded-lg transition-colors duration-300 bg-pages-50 ${onAppIconClick ? "cursor-pointer hover:opacity-80" : ""}`}
|
|
81
93
|
onClick={onAppIconClick}
|
|
82
94
|
>
|
|
83
|
-
<Image
|
|
95
|
+
<Image
|
|
96
|
+
src="/icons/icon-navbar.svg"
|
|
97
|
+
alt="GreatPages"
|
|
98
|
+
width={24}
|
|
99
|
+
height={24}
|
|
100
|
+
/>
|
|
84
101
|
</div>
|
|
85
102
|
)}
|
|
86
103
|
</TooltipTrigger>
|
|
87
104
|
<TooltipContent side="bottom">GreatPages</TooltipContent>
|
|
88
105
|
</Tooltip>
|
|
89
106
|
{isGpagesActive && (
|
|
90
|
-
<div className="absolute
|
|
107
|
+
<div className="absolute bottom-[-17px] left-1/2 -translate-x-1/2 w-5 h-[3px] bg-pages-500 rounded-t-xl" />
|
|
91
108
|
)}
|
|
92
109
|
</div>
|
|
93
110
|
{extraLeftSlot}
|