@pattern-stack/frontend-patterns 0.2.0-alpha.15 → 0.2.0-alpha.16
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/CHANGELOG.md +8 -0
- package/dist/atoms/types/navigation.d.ts +9 -2
- package/dist/atoms/types/navigation.d.ts.map +1 -1
- package/dist/index.es.js +33 -13
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +33 -13
- package/dist/index.js.map +1 -1
- package/dist/molecules/layout/Sidebar.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10727,23 +10727,43 @@ const Sidebar = ({
|
|
|
10727
10727
|
"data-component-name": "Sidebar",
|
|
10728
10728
|
"data-collapsed": !isExpanded,
|
|
10729
10729
|
children: [
|
|
10730
|
-
/* @__PURE__ */ jsxRuntime.
|
|
10731
|
-
"
|
|
10730
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10731
|
+
"div",
|
|
10732
10732
|
{
|
|
10733
|
-
onClick: toggleSidebar,
|
|
10734
10733
|
className: cn(
|
|
10735
|
-
"
|
|
10736
|
-
"
|
|
10737
|
-
"flex items-center justify-center",
|
|
10738
|
-
"hover:bg-muted hover:text-foreground",
|
|
10739
|
-
"active:scale-95",
|
|
10740
|
-
"transition-all duration-150 ease-out"
|
|
10734
|
+
"flex items-center p-3 pt-4",
|
|
10735
|
+
isExpanded ? "justify-between gap-2" : "justify-center"
|
|
10741
10736
|
),
|
|
10742
|
-
"data-component-name": "
|
|
10743
|
-
|
|
10744
|
-
|
|
10737
|
+
"data-component-name": "SidebarHeader",
|
|
10738
|
+
children: [
|
|
10739
|
+
isExpanded && (navigation == null ? void 0 : navigation.logo) != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10740
|
+
"div",
|
|
10741
|
+
{
|
|
10742
|
+
className: "flex-1 min-w-0 flex items-center",
|
|
10743
|
+
"data-component-name": "SidebarLogo",
|
|
10744
|
+
children: typeof navigation.logo === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground truncate", children: navigation.logo }) : navigation.logo
|
|
10745
|
+
}
|
|
10746
|
+
),
|
|
10747
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10748
|
+
"button",
|
|
10749
|
+
{
|
|
10750
|
+
onClick: toggleSidebar,
|
|
10751
|
+
className: cn(
|
|
10752
|
+
"w-7 h-7 rounded-md shrink-0",
|
|
10753
|
+
"bg-muted/50 text-muted-foreground",
|
|
10754
|
+
"flex items-center justify-center",
|
|
10755
|
+
"hover:bg-muted hover:text-foreground",
|
|
10756
|
+
"active:scale-95",
|
|
10757
|
+
"transition-all duration-150 ease-out"
|
|
10758
|
+
),
|
|
10759
|
+
"data-component-name": "SidebarToggle",
|
|
10760
|
+
title: !isExpanded ? "Expand sidebar" : "Collapse sidebar",
|
|
10761
|
+
children: !isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3.5 h-3.5" })
|
|
10762
|
+
}
|
|
10763
|
+
)
|
|
10764
|
+
]
|
|
10745
10765
|
}
|
|
10746
|
-
)
|
|
10766
|
+
),
|
|
10747
10767
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 p-3 space-y-2", "data-component-name": "SidebarNav", children: items.map((item) => {
|
|
10748
10768
|
const [itemBasePath, itemQuery] = item.path.split("?");
|
|
10749
10769
|
const currentPath = location.pathname;
|