@pattern-stack/frontend-patterns 0.2.0-alpha.14 → 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 CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.0-alpha.16]
11
+
12
+ ### Added
13
+ - **`Sidebar` renders `navigation.logo`**: the previously unused `NavigationConfig.logo` field now appears at the top of the sidebar when expanded. Strings render in a small semibold label (`text-sm font-semibold text-foreground truncate`); `ReactNode` values render as-is so consumers can pass an `<img>`, SVG, or composed branding element. The collapse toggle moves to the right of the logo when expanded; when collapsed, the toggle remains centered alone (unchanged behavior).
14
+
15
+ ### Changed
16
+ - **`NavigationConfig.logo` widened to `string | ReactNode | undefined`** so consumers can pass arbitrary branding nodes, not just strings.
17
+
18
+ ## [0.2.0-alpha.15]
19
+
20
+ ### Fixed
21
+ - **`Sidebar` respects hidden header**: when `<AppLayout header={false} />` skips the header, the sidebar no longer leaves a 64px empty strip at the top and chop the bottom of its content. Added a new `topOffset?: 'header' | 'none'` prop on `<Sidebar>` (default `'header'`); `<AppLayout>` now passes `topOffset="none"` whenever `header === false`, which renders the sidebar at `top:0` with `h-screen` instead of `top-16` / `h-[calc(100vh-4rem)]`. Default header behaviour is unchanged.
22
+
10
23
  ## [0.2.0-alpha.14]
11
24
 
12
25
  ### Fixed
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from "react";
1
2
  export type IconName = "Palette" | "Menu" | "X" | "Shield" | "Users" | "BarChart" | "BarChart2" | "BarChart3" | "BarChart4" | "LineChart" | "AreaChart" | "PieChart" | "Database" | "TrendingUp" | "TrendingDown" | "Activity" | "Layout" | "Home" | "Settings" | "Bell" | "Search" | "Plus" | "Edit" | "Trash2" | "Eye" | "Download" | "Upload" | "Share" | "Lock" | "Unlock" | "Mail" | "Phone" | "Calendar" | "Clock" | "MapPin" | "Map" | "Star" | "Heart" | "Bookmark" | "Tag" | "Flag" | "File" | "Folder" | "Image" | "Video" | "Music" | "ChevronRight" | "ChevronDown" | "ChevronLeft" | "ChevronUp" | "ArrowRight" | "ArrowLeft" | "ArrowUp" | "ArrowDown" | "Check" | "AlertCircle" | "Info" | "HelpCircle" | "Building" | "Truck" | "Handshake" | "User" | "Brain" | "Calculator" | "ShoppingCart" | "Utensils" | "Car" | "Zap" | "Film" | "ShoppingBag" | "Wrench" | "CreditCard" | "Wallet" | "PiggyBank" | "Receipt" | "DollarSign" | "Percent" | "Gift" | "Package" | "Coffee" | "Plane" | "Bus" | "Fuel" | "Sparkles" | "Scissors" | "Dumbbell" | "Pill" | "Stethoscope" | "GraduationCap" | "Book" | "BookOpen" | "Gamepad2" | "Tv" | "Wifi" | "Droplets" | "Flame" | "TreePine" | "Dog" | "Baby" | "Shirt" | "Sofa" | "Hammer" | "Paintbrush" | "Lightbulb";
2
3
  export interface NavigationItem {
3
4
  /** Unique identifier for the navigation item */
@@ -22,8 +23,14 @@ export interface NavigationConfig {
22
23
  items: NavigationItem[];
23
24
  /** Whether to show the default showcase navigation as fallback */
24
25
  showDefaultNavigation?: boolean;
25
- /** Custom logo or title for the sidebar header */
26
- logo?: string;
26
+ /**
27
+ * Custom logo or title for the sidebar header. Renders at the top of the
28
+ * Sidebar (left of the collapse toggle) when the sidebar is expanded; hidden
29
+ * when collapsed. A `string` is rendered inside a small semibold label;
30
+ * a `ReactNode` is rendered as-is so consumers can pass an `<img>`, SVG,
31
+ * or composed branding element.
32
+ */
33
+ logo?: string | ReactNode;
27
34
  /** Whether the sidebar starts expanded */
28
35
  defaultExpanded?: boolean;
29
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/atoms/types/navigation.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,MAAM,GACN,GAAG,GACH,QAAQ,GAC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CAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B;IAC5B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,kEAAkE;IAClE,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/atoms/types/navigation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,MAAM,GACN,GAAG,GACH,QAAQ,GACR,OAAO,GACP,UAAU,GACV,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,UAAU,GACV,UAAU,GACV,YAAY,GACZ,cAAc,GACd,UAAU,GACV,QAAQ,GACR,MAAM,GACN,UAAU,GACV,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,QAAQ,GACR,KAAK,GACL,UAAU,GACV,QAAQ,GACR,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,OAAO,GACP,QAAQ,GACR,KAAK,GACL,MAAM,GACN,OAAO,GACP,UAAU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