@snapdragonsnursery/react-components 1.10.0 → 1.11.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapdragonsnursery/react-components",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -173,6 +173,7 @@ export function AppSidebar({
173
173
  navItems,
174
174
  projects,
175
175
  user,
176
+ version,
176
177
  ...props
177
178
  }) {
178
179
  return (
@@ -198,6 +199,11 @@ export function AppSidebar({
198
199
  <SidebarTrigger aria-label="Toggle sidebar" />
199
200
  </div>
200
201
  <NavUser user={user ?? data.user} />
202
+ {version ? (
203
+ <div className="mt-1 text-xs text-muted-foreground">
204
+ <a href="/changelog" title="View changelog" className="hover:underline">v{version}</a>
205
+ </div>
206
+ ) : null}
201
207
  </SidebarFooter>
202
208
  <SidebarRail />
203
209
  </Sidebar>
@@ -51,7 +51,7 @@ export function ThemeModeToggle() {
51
51
  return (
52
52
  <DropdownMenu>
53
53
  <DropdownMenuTrigger asChild>
54
- <Button variant="ghost" size="icon" className="h-7 w-7" aria-label={`Theme: ${mode}`}>
54
+ <Button variant="ghost" size="icon" className="h-7 w-7 p-0" aria-label={`Theme: ${mode}`}>
55
55
  {currentIcon}
56
56
  <span className="sr-only">Toggle theme</span>
57
57
  </Button>
@@ -233,7 +233,7 @@ function SidebarTrigger({
233
233
  data-slot="sidebar-trigger"
234
234
  variant="ghost"
235
235
  size="icon"
236
- className={cn("size-7", className)}
236
+ className={cn("h-7 w-7 p-0", className)}
237
237
  onClick={(event) => {
238
238
  onClick?.(event)
239
239
  toggleSidebar()
package/src/index.d.ts CHANGED
@@ -66,7 +66,22 @@ export function configureTelemetry(...args: any[]): any
66
66
 
67
67
 
68
68
  // Sidebar + UI exports
69
- export const AppSidebar: React.ComponentType<any>
69
+ export interface AppSidebarProps {
70
+ sites?: any
71
+ activeSiteId?: any
72
+ onSiteChange?: (item: any) => void
73
+ sitesLoading?: boolean
74
+ rooms?: any
75
+ activeRoomId?: any
76
+ onRoomChange?: (item: any) => void
77
+ roomsLoading?: boolean
78
+ roomBaseColor?: string
79
+ navItems?: any
80
+ projects?: any
81
+ user?: any
82
+ version?: string
83
+ }
84
+ export const AppSidebar: React.ComponentType<AppSidebarProps>
70
85
  export const Sidebar: React.ComponentType<any>
71
86
  export const SidebarContent: React.ComponentType<any>
72
87
  export const SidebarFooter: React.ComponentType<any>