@pattern-stack/frontend-patterns 0.2.0-alpha.13 → 0.2.0-alpha.15

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/index.es.js CHANGED
@@ -4121,7 +4121,7 @@ const Button = React__default.forwardRef(
4121
4121
  children: [
4122
4122
  loading && /* @__PURE__ */ jsx(Spinner$1, { className: "w-4 h-4 mr-2" }),
4123
4123
  !loading && icon && /* @__PURE__ */ jsx("span", { className: cn("inline-flex shrink-0", children && "mr-2"), children: icon }),
4124
- children && /* @__PURE__ */ jsx("span", { className: cn(iconOnlyMobile && "hidden sm:inline"), children }),
4124
+ children && (iconOnlyMobile ? /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children }) : /* @__PURE__ */ jsx(Fragment, { children })),
4125
4125
  !loading && iconAfter && /* @__PURE__ */ jsx("span", { className: cn("inline-flex shrink-0", children && "ml-2"), children: iconAfter })
4126
4126
  ]
4127
4127
  }
@@ -10650,7 +10650,11 @@ const SidebarButton = ({
10650
10650
  }
10651
10651
  );
10652
10652
  };
10653
- const Sidebar = ({ className, footer }) => {
10653
+ const Sidebar = ({
10654
+ className,
10655
+ footer,
10656
+ topOffset = "header"
10657
+ }) => {
10654
10658
  const { isExpanded, toggleSidebar } = useSidebar();
10655
10659
  const { navigation } = useNavigation();
10656
10660
  const location = useLocation();
@@ -10670,9 +10674,9 @@ const Sidebar = ({ className, footer }) => {
10670
10674
  "aside",
10671
10675
  {
10672
10676
  className: cn(
10673
- "fixed left-0 top-16 flex flex-col bg-background border-r border-border z-40",
10677
+ "fixed left-0 flex flex-col bg-background border-r border-border z-40",
10674
10678
  "transition-all duration-300 ease-in-out",
10675
- "h-[calc(100vh-4rem)]",
10679
+ topOffset === "none" ? "top-0 h-screen" : "top-16 h-[calc(100vh-4rem)]",
10676
10680
  // Full height minus header (4rem = 64px)
10677
10681
  !isExpanded ? "w-16" : "w-64",
10678
10682
  className
@@ -10799,7 +10803,13 @@ const AppLayout = ({ header, sidebar } = {}) => {
10799
10803
  const hideHeader = header === false;
10800
10804
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-background", children: [
10801
10805
  !hideHeader && /* @__PURE__ */ jsx(AppHeader, { ...header ?? {} }),
10802
- /* @__PURE__ */ jsx(Sidebar, { footer: sidebar == null ? void 0 : sidebar.footer }),
10806
+ /* @__PURE__ */ jsx(
10807
+ Sidebar,
10808
+ {
10809
+ footer: sidebar == null ? void 0 : sidebar.footer,
10810
+ topOffset: hideHeader ? "none" : "header"
10811
+ }
10812
+ ),
10803
10813
  /* @__PURE__ */ jsx(
10804
10814
  "main",
10805
10815
  {