@borisj74/bv-ds 0.1.6 → 0.1.7

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.cjs CHANGED
@@ -33124,6 +33124,7 @@ function SidebarNavigation({
33124
33124
  logo,
33125
33125
  header,
33126
33126
  children,
33127
+ panel,
33127
33128
  footer,
33128
33129
  open,
33129
33130
  onOpenChange,
@@ -33134,6 +33135,7 @@ function SidebarNavigation({
33134
33135
  const isOpen = open ?? internalOpen;
33135
33136
  const setOpen = (v) => onOpenChange ? onOpenChange(v) : setInternalOpen(v);
33136
33137
  const slim = type === "slim";
33138
+ const dualTier = type === "dualTier";
33137
33139
  const rail = /* @__PURE__ */ jsxRuntime.jsxs(
33138
33140
  "nav",
33139
33141
  {
@@ -33155,8 +33157,13 @@ function SidebarNavigation({
33155
33157
  ]
33156
33158
  }
33157
33159
  );
33160
+ const panelEl = dualTier && panel ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-[256px] shrink-0 flex-col gap-xxs overflow-y-auto border-r border-border-secondary bg-bg-primary px-xl py-xl", children: panel }) : null;
33161
+ const desktopRail = dualTier ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full", children: [
33162
+ rail,
33163
+ panelEl
33164
+ ] }) : rail;
33158
33165
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
33159
- /* @__PURE__ */ jsxRuntime.jsx("aside", { className: "hidden h-full md:flex", children: rail }),
33166
+ /* @__PURE__ */ jsxRuntime.jsx("aside", { className: "hidden h-full md:flex", children: desktopRail }),
33160
33167
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "md:hidden", children: [
33161
33168
  /* @__PURE__ */ jsxRuntime.jsx(NavMenuButton, { opened: isOpen, onClick: () => setOpen(!isOpen) }),
33162
33169
  isOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50 flex", children: [
package/dist/index.d.cts CHANGED
@@ -2372,6 +2372,12 @@ interface SidebarNavigationProps extends Omit<HTMLAttributes<HTMLElement>, "titl
2372
2372
  header?: ReactNode;
2373
2373
  /** Nav items — compose `NavItemBase` / `NavItemDropdownBase` children. */
2374
2374
  children?: ReactNode;
2375
+ /**
2376
+ * `dualTier` only — second-tier panel (256px) shown beside the primary rail,
2377
+ * listing the active item's sub-pages. Compose `NavItemBase` rows. Ignored for
2378
+ * other types and on mobile (where only the primary rail shows).
2379
+ */
2380
+ panel?: ReactNode;
2375
2381
  /** Footer slot — typically `NavFeaturedCard` + `NavAccountCard`. */
2376
2382
  footer?: ReactNode;
2377
2383
  /** Controlled mobile-drawer open state. Omit to use internal state. */
@@ -2385,11 +2391,11 @@ interface SidebarNavigationProps extends Omit<HTMLAttributes<HTMLElement>, "titl
2385
2391
  * the rail is hidden behind a hamburger (`NavMenuButton`); opening it shows a
2386
2392
  * `bg-bg-overlay` + `backdrop-blur-md` scrim and slides the rail in as a drawer.
2387
2393
  *
2388
- * NOTE: `dualTier`'s icon-rail + expanding-panel split is simplified to a single
2389
- * 280px column here — compose the icon rail separately if you need the two-tier
2390
- * layout. (flagged)
2394
+ * `dualTier` renders a 280px primary rail plus a 256px second-tier `panel`
2395
+ * (total 536px) for the active item's sub-pages; on mobile only the primary
2396
+ * rail shows.
2391
2397
  */
2392
- declare function SidebarNavigation({ type, logo, header, children, footer, open, onOpenChange, className, ...rest }: SidebarNavigationProps): react.JSX.Element;
2398
+ declare function SidebarNavigation({ type, logo, header, children, panel, footer, open, onOpenChange, className, ...rest }: SidebarNavigationProps): react.JSX.Element;
2393
2399
 
2394
2400
  interface SlideOutMenuHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
2395
2401
  /** Featured-icon slot (left of the heading). */
package/dist/index.d.ts CHANGED
@@ -2372,6 +2372,12 @@ interface SidebarNavigationProps extends Omit<HTMLAttributes<HTMLElement>, "titl
2372
2372
  header?: ReactNode;
2373
2373
  /** Nav items — compose `NavItemBase` / `NavItemDropdownBase` children. */
2374
2374
  children?: ReactNode;
2375
+ /**
2376
+ * `dualTier` only — second-tier panel (256px) shown beside the primary rail,
2377
+ * listing the active item's sub-pages. Compose `NavItemBase` rows. Ignored for
2378
+ * other types and on mobile (where only the primary rail shows).
2379
+ */
2380
+ panel?: ReactNode;
2375
2381
  /** Footer slot — typically `NavFeaturedCard` + `NavAccountCard`. */
2376
2382
  footer?: ReactNode;
2377
2383
  /** Controlled mobile-drawer open state. Omit to use internal state. */
@@ -2385,11 +2391,11 @@ interface SidebarNavigationProps extends Omit<HTMLAttributes<HTMLElement>, "titl
2385
2391
  * the rail is hidden behind a hamburger (`NavMenuButton`); opening it shows a
2386
2392
  * `bg-bg-overlay` + `backdrop-blur-md` scrim and slides the rail in as a drawer.
2387
2393
  *
2388
- * NOTE: `dualTier`'s icon-rail + expanding-panel split is simplified to a single
2389
- * 280px column here — compose the icon rail separately if you need the two-tier
2390
- * layout. (flagged)
2394
+ * `dualTier` renders a 280px primary rail plus a 256px second-tier `panel`
2395
+ * (total 536px) for the active item's sub-pages; on mobile only the primary
2396
+ * rail shows.
2391
2397
  */
2392
- declare function SidebarNavigation({ type, logo, header, children, footer, open, onOpenChange, className, ...rest }: SidebarNavigationProps): react.JSX.Element;
2398
+ declare function SidebarNavigation({ type, logo, header, children, panel, footer, open, onOpenChange, className, ...rest }: SidebarNavigationProps): react.JSX.Element;
2393
2399
 
2394
2400
  interface SlideOutMenuHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
2395
2401
  /** Featured-icon slot (left of the heading). */
package/dist/index.js CHANGED
@@ -33103,6 +33103,7 @@ function SidebarNavigation({
33103
33103
  logo,
33104
33104
  header,
33105
33105
  children,
33106
+ panel,
33106
33107
  footer,
33107
33108
  open,
33108
33109
  onOpenChange,
@@ -33113,6 +33114,7 @@ function SidebarNavigation({
33113
33114
  const isOpen = open ?? internalOpen;
33114
33115
  const setOpen = (v) => onOpenChange ? onOpenChange(v) : setInternalOpen(v);
33115
33116
  const slim = type === "slim";
33117
+ const dualTier = type === "dualTier";
33116
33118
  const rail = /* @__PURE__ */ jsxs(
33117
33119
  "nav",
33118
33120
  {
@@ -33134,8 +33136,13 @@ function SidebarNavigation({
33134
33136
  ]
33135
33137
  }
33136
33138
  );
33139
+ const panelEl = dualTier && panel ? /* @__PURE__ */ jsx("div", { className: "flex h-full w-[256px] shrink-0 flex-col gap-xxs overflow-y-auto border-r border-border-secondary bg-bg-primary px-xl py-xl", children: panel }) : null;
33140
+ const desktopRail = dualTier ? /* @__PURE__ */ jsxs("div", { className: "flex h-full", children: [
33141
+ rail,
33142
+ panelEl
33143
+ ] }) : rail;
33137
33144
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
33138
- /* @__PURE__ */ jsx("aside", { className: "hidden h-full md:flex", children: rail }),
33145
+ /* @__PURE__ */ jsx("aside", { className: "hidden h-full md:flex", children: desktopRail }),
33139
33146
  /* @__PURE__ */ jsxs("div", { className: "md:hidden", children: [
33140
33147
  /* @__PURE__ */ jsx(NavMenuButton, { opened: isOpen, onClick: () => setOpen(!isOpen) }),
33141
33148
  isOpen && /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-50 flex", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@borisj74/bv-ds",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "bv-ds — React component library synced from Figma (Untitled UI v8.0), built on Tailwind CSS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,6 +17,12 @@ export interface SidebarNavigationProps extends Omit<HTMLAttributes<HTMLElement>
17
17
  header?: ReactNode;
18
18
  /** Nav items — compose `NavItemBase` / `NavItemDropdownBase` children. */
19
19
  children?: ReactNode;
20
+ /**
21
+ * `dualTier` only — second-tier panel (256px) shown beside the primary rail,
22
+ * listing the active item's sub-pages. Compose `NavItemBase` rows. Ignored for
23
+ * other types and on mobile (where only the primary rail shows).
24
+ */
25
+ panel?: ReactNode;
20
26
  /** Footer slot — typically `NavFeaturedCard` + `NavAccountCard`. */
21
27
  footer?: ReactNode;
22
28
  /** Controlled mobile-drawer open state. Omit to use internal state. */
@@ -39,15 +45,16 @@ const WIDTH: Record<SidebarNavigationType, string> = {
39
45
  * the rail is hidden behind a hamburger (`NavMenuButton`); opening it shows a
40
46
  * `bg-bg-overlay` + `backdrop-blur-md` scrim and slides the rail in as a drawer.
41
47
  *
42
- * NOTE: `dualTier`'s icon-rail + expanding-panel split is simplified to a single
43
- * 280px column here — compose the icon rail separately if you need the two-tier
44
- * layout. (flagged)
48
+ * `dualTier` renders a 280px primary rail plus a 256px second-tier `panel`
49
+ * (total 536px) for the active item's sub-pages; on mobile only the primary
50
+ * rail shows.
45
51
  */
46
52
  export function SidebarNavigation({
47
53
  type = "simple",
48
54
  logo,
49
55
  header,
50
56
  children,
57
+ panel,
51
58
  footer,
52
59
  open,
53
60
  onOpenChange,
@@ -58,6 +65,7 @@ export function SidebarNavigation({
58
65
  const isOpen = open ?? internalOpen;
59
66
  const setOpen = (v: boolean) => (onOpenChange ? onOpenChange(v) : setInternalOpen(v));
60
67
  const slim = type === "slim";
68
+ const dualTier = type === "dualTier";
61
69
 
62
70
  const rail = (
63
71
  <nav
@@ -81,10 +89,27 @@ export function SidebarNavigation({
81
89
  </nav>
82
90
  );
83
91
 
92
+ // dualTier: primary rail (280) + second-tier panel (256) = 536px.
93
+ const panelEl =
94
+ dualTier && panel ? (
95
+ <div className="flex h-full w-[256px] shrink-0 flex-col gap-xxs overflow-y-auto border-r border-border-secondary bg-bg-primary px-xl py-xl">
96
+ {panel}
97
+ </div>
98
+ ) : null;
99
+
100
+ const desktopRail = dualTier ? (
101
+ <div className="flex h-full">
102
+ {rail}
103
+ {panelEl}
104
+ </div>
105
+ ) : (
106
+ rail
107
+ );
108
+
84
109
  return (
85
110
  <>
86
111
  {/* Desktop rail */}
87
- <aside className="hidden h-full md:flex">{rail}</aside>
112
+ <aside className="hidden h-full md:flex">{desktopRail}</aside>
88
113
 
89
114
  {/* Mobile trigger + drawer */}
90
115
  <div className="md:hidden">