@greatapps/common 1.1.324 → 1.1.325
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.
|
@@ -22,24 +22,23 @@ function SideBarNavigation({
|
|
|
22
22
|
mql.addEventListener("change", handler);
|
|
23
23
|
return () => mql.removeEventListener("change", handler);
|
|
24
24
|
}, [collapseMd]);
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
28
|
"data-slot": "sidebar-navigation",
|
|
29
29
|
className: cn(
|
|
30
|
-
"relative hidden lg:
|
|
31
|
-
isExpanded ? "w-[273px]
|
|
32
|
-
className
|
|
30
|
+
"relative hidden lg:block h-screen transition-[width] duration-300 ease-in-out overflow-hidden",
|
|
31
|
+
isExpanded ? "w-[273px] border-r border-gray-200" : "w-0"
|
|
33
32
|
),
|
|
34
33
|
...props,
|
|
35
|
-
children: [
|
|
34
|
+
children: /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col h-full min-w-[273px] w-[273px] p-4", className), children: [
|
|
36
35
|
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
37
36
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
38
37
|
"button",
|
|
39
38
|
{
|
|
40
39
|
onClick: collapse,
|
|
41
40
|
className: cn(
|
|
42
|
-
"absolute top-[60px] -right-4 size-8 flex items-center justify-center rounded-full border border-gray-200 bg-white hover:bg-gray-100 cursor-pointer transition-all duration-300 z-
|
|
41
|
+
"absolute top-[60px] -right-4 size-8 flex items-center justify-center rounded-full border border-gray-200 bg-white hover:bg-gray-100 cursor-pointer transition-all duration-300 z-[999]",
|
|
43
42
|
isExpanded ? "opacity-100 scale-100" : "opacity-0 scale-0 pointer-events-none"
|
|
44
43
|
),
|
|
45
44
|
children: /* @__PURE__ */ jsx(IconChevronLeft, { size: 16, className: "text-gray-500" })
|
|
@@ -48,7 +47,7 @@ function SideBarNavigation({
|
|
|
48
47
|
isExpanded && /* @__PURE__ */ jsx(TooltipContent, { side: "right", children: "Recolher menu" })
|
|
49
48
|
] }),
|
|
50
49
|
children
|
|
51
|
-
]
|
|
50
|
+
] })
|
|
52
51
|
}
|
|
53
52
|
);
|
|
54
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layouts/SideBarNavigation.tsx"],"sourcesContent":["'use client';\n\nimport * as React from \"react\"\nimport { IconChevronLeft } from '@tabler/icons-react'\nimport { useDesktopSidebarStore } from \"../../store/useDesktopSidebarStore\"\nimport { useMdSidebarStore } from \"../../store/useMdSidebarStore\"\nimport { cn } from \"../../infra/utils/clsx\"\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/overlay/Tooltip\"\n\nfunction SideBarNavigation({\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\">) {\n const { isExpanded, collapse } = useDesktopSidebarStore()\n const collapseMd = useMdSidebarStore((s) => s.collapse)\n\n React.useEffect(() => {\n const mql = window.matchMedia('(min-width: 1351px)')\n const handler = (e: MediaQueryListEvent) => {\n if (e.matches) collapseMd()\n }\n if (mql.matches) collapseMd()\n mql.addEventListener('change', handler)\n return () => mql.removeEventListener('change', handler)\n }, [collapseMd])\n\n return (\n <div\n data-slot=\"sidebar-navigation\"\n className={cn(\n \"relative hidden lg:
|
|
1
|
+
{"version":3,"sources":["../../../src/components/layouts/SideBarNavigation.tsx"],"sourcesContent":["'use client';\n\nimport * as React from \"react\"\nimport { IconChevronLeft } from '@tabler/icons-react'\nimport { useDesktopSidebarStore } from \"../../store/useDesktopSidebarStore\"\nimport { useMdSidebarStore } from \"../../store/useMdSidebarStore\"\nimport { cn } from \"../../infra/utils/clsx\"\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/overlay/Tooltip\"\n\nfunction SideBarNavigation({\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\">) {\n const { isExpanded, collapse } = useDesktopSidebarStore()\n const collapseMd = useMdSidebarStore((s) => s.collapse)\n\n React.useEffect(() => {\n const mql = window.matchMedia('(min-width: 1351px)')\n const handler = (e: MediaQueryListEvent) => {\n if (e.matches) collapseMd()\n }\n if (mql.matches) collapseMd()\n mql.addEventListener('change', handler)\n return () => mql.removeEventListener('change', handler)\n }, [collapseMd])\n\n return (\n <div\n data-slot=\"sidebar-navigation\"\n className={cn(\n \"relative hidden lg:block h-screen transition-[width] duration-300 ease-in-out overflow-hidden\",\n isExpanded ? \"w-[273px] border-r border-gray-200\" : \"w-0\",\n )}\n {...props}\n >\n <div className={cn(\"flex flex-col h-full min-w-[273px] w-[273px] p-4\", className)}>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={collapse}\n className={cn(\n \"absolute top-[60px] -right-4 size-8 flex items-center justify-center rounded-full border border-gray-200 bg-white hover:bg-gray-100 cursor-pointer transition-all duration-300 z-[999]\",\n isExpanded ? \"opacity-100 scale-100\" : \"opacity-0 scale-0 pointer-events-none\",\n )}\n >\n <IconChevronLeft size={16} className=\"text-gray-500\" />\n </button>\n </TooltipTrigger>\n {isExpanded && <TooltipContent side=\"right\">Recolher menu</TooltipContent>}\n </Tooltip>\n {children}\n </div>\n </div>\n )\n}\n\nexport { SideBarNavigation };\n"],"mappings":";AAqCgB,SASY,KATZ;AAnChB,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,SAAS,8BAA8B;AACvC,SAAS,yBAAyB;AAClC,SAAS,UAAU;AACnB,SAAS,SAAS,gBAAgB,sBAAsB;AAExD,SAAS,kBAAkB;AAAA,EACvB;AAAA,EACA;AAAA,EACA,GAAG;AACP,GAAgC;AAC5B,QAAM,EAAE,YAAY,SAAS,IAAI,uBAAuB;AACxD,QAAM,aAAa,kBAAkB,CAAC,MAAM,EAAE,QAAQ;AAEtD,QAAM,UAAU,MAAM;AAClB,UAAM,MAAM,OAAO,WAAW,qBAAqB;AACnD,UAAM,UAAU,CAAC,MAA2B;AACxC,UAAI,EAAE,QAAS,YAAW;AAAA,IAC9B;AACA,QAAI,IAAI,QAAS,YAAW;AAC5B,QAAI,iBAAiB,UAAU,OAAO;AACtC,WAAO,MAAM,IAAI,oBAAoB,UAAU,OAAO;AAAA,EAC1D,GAAG,CAAC,UAAU,CAAC;AAEf,SACI;AAAA,IAAC;AAAA;AAAA,MACG,aAAU;AAAA,MACV,WAAW;AAAA,QACP;AAAA,QACA,aAAa,uCAAuC;AAAA,MACxD;AAAA,MACC,GAAG;AAAA,MAEJ,+BAAC,SAAI,WAAW,GAAG,oDAAoD,SAAS,GAC5E;AAAA,6BAAC,WACG;AAAA,8BAAC,kBAAe,SAAO,MACnB;AAAA,YAAC;AAAA;AAAA,cACG,SAAS;AAAA,cACT,WAAW;AAAA,gBACP;AAAA,gBACA,aAAa,0BAA0B;AAAA,cAC3C;AAAA,cAEA,8BAAC,mBAAgB,MAAM,IAAI,WAAU,iBAAgB;AAAA;AAAA,UACzD,GACJ;AAAA,UACC,cAAc,oBAAC,kBAAe,MAAK,SAAQ,2BAAa;AAAA,WAC7D;AAAA,QACC;AAAA,SACL;AAAA;AAAA,EACJ;AAER;","names":[]}
|
package/package.json
CHANGED
|
@@ -29,27 +29,28 @@ function SideBarNavigation({
|
|
|
29
29
|
<div
|
|
30
30
|
data-slot="sidebar-navigation"
|
|
31
31
|
className={cn(
|
|
32
|
-
"relative hidden lg:
|
|
33
|
-
isExpanded ? "w-[273px]
|
|
34
|
-
className,
|
|
32
|
+
"relative hidden lg:block h-screen transition-[width] duration-300 ease-in-out overflow-hidden",
|
|
33
|
+
isExpanded ? "w-[273px] border-r border-gray-200" : "w-0",
|
|
35
34
|
)}
|
|
36
35
|
{...props}
|
|
37
36
|
>
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
<div className={cn("flex flex-col h-full min-w-[273px] w-[273px] p-4", className)}>
|
|
38
|
+
<Tooltip>
|
|
39
|
+
<TooltipTrigger asChild>
|
|
40
|
+
<button
|
|
41
|
+
onClick={collapse}
|
|
42
|
+
className={cn(
|
|
43
|
+
"absolute top-[60px] -right-4 size-8 flex items-center justify-center rounded-full border border-gray-200 bg-white hover:bg-gray-100 cursor-pointer transition-all duration-300 z-[999]",
|
|
44
|
+
isExpanded ? "opacity-100 scale-100" : "opacity-0 scale-0 pointer-events-none",
|
|
45
|
+
)}
|
|
46
|
+
>
|
|
47
|
+
<IconChevronLeft size={16} className="text-gray-500" />
|
|
48
|
+
</button>
|
|
49
|
+
</TooltipTrigger>
|
|
50
|
+
{isExpanded && <TooltipContent side="right">Recolher menu</TooltipContent>}
|
|
51
|
+
</Tooltip>
|
|
52
|
+
{children}
|
|
53
|
+
</div>
|
|
53
54
|
</div>
|
|
54
55
|
)
|
|
55
56
|
}
|