@alexgorbatchev/shadcn 0.0.205 → 0.0.206

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.
@@ -3905,6 +3905,7 @@ function AppShell2({
3905
3905
  defaultSidebarOpen = true,
3906
3906
  label = "Application",
3907
3907
  content = "scroll",
3908
+ topBar = true,
3908
3909
  density
3909
3910
  }) {
3910
3911
  return /* @__PURE__ */ jsxs25(SidebarProvider2, {
@@ -3948,8 +3949,22 @@ function AppShell2({
3948
3949
  })
3949
3950
  })
3950
3951
  }),
3951
- sidebarFooter && /* @__PURE__ */ jsx39(SidebarFooter2, {
3952
+ topBar ? sidebarFooter && /* @__PURE__ */ jsx39(SidebarFooter2, {
3952
3953
  children: sidebarFooter
3954
+ }) : /* @__PURE__ */ jsx39(SidebarFooter2, {
3955
+ children: /* @__PURE__ */ jsxs25("div", {
3956
+ "data-slot": "app-shell-sidebar-footer",
3957
+ className: "flex min-w-0 items-center gap-control-gap group-data-[collapsible=icon]:flex-col group-data-[collapsible=icon]:items-stretch",
3958
+ children: [
3959
+ sidebarFooter && /* @__PURE__ */ jsx39("div", {
3960
+ className: "min-w-0",
3961
+ children: sidebarFooter
3962
+ }),
3963
+ /* @__PURE__ */ jsx39(SidebarTrigger2, {
3964
+ className: "ms-auto group-data-[collapsible=icon]:ms-0 max-md:hidden"
3965
+ })
3966
+ ]
3967
+ })
3953
3968
  })
3954
3969
  ]
3955
3970
  }),
@@ -3960,7 +3975,7 @@ function AppShell2({
3960
3975
  children: [
3961
3976
  /* @__PURE__ */ jsxs25("header", {
3962
3977
  "data-scroll": "none",
3963
- className: "flex shrink-0 items-center gap-control-gap border-b border-border p-panel",
3978
+ className: cn2("flex shrink-0 items-center gap-control-gap border-b border-border p-panel", !topBar && "md:hidden"),
3964
3979
  children: [
3965
3980
  /* @__PURE__ */ jsx39(SidebarTrigger2, {}),
3966
3981
  header
@@ -29,7 +29,13 @@ type AppShellProps = IDensityProps & {
29
29
  defaultSidebarOpen?: boolean;
30
30
  label?: string;
31
31
  content?: AppShellContent;
32
+ /**
33
+ * Show the top bar with the sidebar toggle and `header` on every screen size (the default). With `false`, wide
34
+ * screens drop the top bar and show the sidebar toggle at the end of the sidebar footer, after `sidebarFooter`;
35
+ * narrow screens keep the top bar, because its toggle is the only way to open the navigation sheet there.
36
+ */
37
+ topBar?: boolean;
32
38
  };
33
- declare function AppShell({ navigation, brand, children, header, sidebarFooter, footer, height, defaultSidebarOpen, label, content, density, }: AppShellProps): ReactElement;
39
+ declare function AppShell({ navigation, brand, children, header, sidebarFooter, footer, height, defaultSidebarOpen, label, content, topBar, density, }: AppShellProps): ReactElement;
34
40
  export { AppShell };
35
41
  export type { AppShellContent, AppShellNavigationItem, AppShellProps };
@@ -26,7 +26,7 @@ import {
26
26
  PaginationPrevious2,
27
27
  PaginationNext2,
28
28
  PaginationEllipsis2
29
- } from "../../chunk-z5qnt4nx.js";
29
+ } from "../../chunk-gf6fsbrz.js";
30
30
  import {
31
31
  MenuPopup,
32
32
  MenuItem2,
package/dist/index.js CHANGED
@@ -188,7 +188,7 @@ import {
188
188
  DashboardLayout2,
189
189
  BillingUsage2,
190
190
  SelectionAction2
191
- } from "./chunk-z5qnt4nx.js";
191
+ } from "./chunk-gf6fsbrz.js";
192
192
  import {
193
193
  statusDotVariants2,
194
194
  StatusDot2
package/dist/prototype.js CHANGED
@@ -2051,7 +2051,7 @@ var program = new Command;
2051
2051
  // package.json
2052
2052
  var package_default = {
2053
2053
  name: "@alexgorbatchev/shadcn",
2054
- version: "0.0.205",
2054
+ version: "0.0.206",
2055
2055
  description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
@@ -9,7 +9,13 @@ Source: src/components/stories/layout/AppShell.stories.tsx
9
9
 
10
10
  ```tsx
11
11
  import { AnalyticsProvider } from "@alexgorbatchev/shadcn/analytics";
12
- import { AppShell, PageHeader, Stack, StatCard, Text } from "@alexgorbatchev/shadcn";
12
+ import { AppShell, Button, PageHeader, Stack, StatCard, Text } from "@alexgorbatchev/shadcn";
13
+ ```
14
+
15
+ ## Supporting imports
16
+
17
+ ```tsx
18
+ import { UserIcon } from "lucide-react";
13
19
  ```
14
20
 
15
21
  ## Default component
@@ -95,3 +101,25 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
95
101
  }
96
102
  }
97
103
  ```
104
+
105
+ ### WithoutTopBar
106
+
107
+ ```tsx
108
+ {
109
+ args: {
110
+ topBar: false,
111
+ header: undefined,
112
+ sidebarFooter: (<Button variant="ghost" size="icon-sm" aria-label="Account">
113
+ <UserIcon />
114
+ </Button>),
115
+ }
116
+ }
117
+ ```
118
+
119
+ ### WithoutTopBarOnPhone
120
+
121
+ ```tsx
122
+ {
123
+ args: { topBar: false, header: undefined }
124
+ }
125
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.205",
3
+ "version": "0.0.206",
4
4
  "description": "Sharp, monospace React components with compact, comfortable, and touch densities.",
5
5
  "license": "MIT",
6
6
  "repository": {