@stevederico/skateboard-ui 2.8.0 → 2.9.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.
Binary file
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # CHANGELOG
2
2
 
3
+ 2.9.0
4
+
5
+ Improve dark mode sidebar contrast
6
+ Update Header text size
7
+ Remove brand hover state
8
+ Reduce brand padding
9
+ Add brand text shrink
10
+ Remove nav bold on active
11
+ Use smaller nav buttons
12
+
3
13
  2.8.0
4
14
 
5
15
  Add content area border
package/layout/Header.jsx CHANGED
@@ -26,7 +26,7 @@ function Header({ title, buttonTitle, onButtonTitleClick, buttonClass, className
26
26
  {...props}
27
27
  >
28
28
  <div className="flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6">
29
- <h1 className="text-base font-medium">{title}</h1>
29
+ <h1 className="text-lg font-medium">{title}</h1>
30
30
  <div className="ml-auto flex items-center gap-2">
31
31
  {typeof buttonTitle !== "undefined" && (
32
32
  <Button
package/layout/Layout.jsx CHANGED
@@ -47,7 +47,7 @@ export default function Layout({ children }) {
47
47
  '--header-height': '3.5rem',
48
48
  }}>
49
49
  {showSidebar && <Sidebar variant="inset" />}
50
- <SidebarInset className={`border border-border ${constants.hideSidebarInsetRounding ? "md:peer-data-[variant=inset]:rounded-none" : ""}`}>
50
+ <SidebarInset className={`border border-border/50 ${constants.hideSidebarInsetRounding ? "md:peer-data-[variant=inset]:rounded-none" : ""}`}>
51
51
  <Outlet />
52
52
  </SidebarInset>
53
53
  </SidebarProvider>
@@ -42,13 +42,14 @@ export default function Sidebar({ variant = "inset", ...props }) {
42
42
  <SidebarRoot collapsible="icon" variant={variant} {...props}>
43
43
  {/* Header: App icon + name */}
44
44
  {!constants.hideSidebarHeader && (
45
- <SidebarHeader>
45
+ <SidebarHeader className="px-1">
46
46
  <SidebarMenu>
47
47
  <SidebarMenuItem>
48
48
  <SidebarMenuButton
49
49
  size="lg"
50
50
  onClick={() => navigate("/app")}
51
51
  tooltip={constants.appName}
52
+ className="hover:bg-transparent active:bg-transparent"
52
53
  >
53
54
  <div className="bg-app dark:border rounded-lg flex aspect-square size-8 items-center justify-center">
54
55
  <DynamicIcon
@@ -58,7 +59,7 @@ export default function Sidebar({ variant = "inset", ...props }) {
58
59
  strokeWidth={2}
59
60
  />
60
61
  </div>
61
- <span className="font-semibold text-lg truncate">
62
+ <span className="font-semibold text-lg shrink min-w-0 truncate">
62
63
  {constants.appName}
63
64
  </span>
64
65
  </SidebarMenuButton>
@@ -79,14 +80,16 @@ export default function Sidebar({ variant = "inset", ...props }) {
79
80
  <SidebarMenuButton
80
81
  isActive={isActive}
81
82
  tooltip={item.title}
83
+ size="sm"
84
+ className="data-active:font-normal"
82
85
  onClick={() =>
83
86
  navigate(`/app/${item.url.toLowerCase()}`)
84
87
  }
85
88
  >
86
89
  <DynamicIcon
87
90
  name={item.icon}
88
- size={18}
89
- strokeWidth={1.5}
91
+ size={20}
92
+ strokeWidth={2}
90
93
  />
91
94
  <span>{item.title}</span>
92
95
  </SidebarMenuButton>
@@ -105,9 +108,11 @@ export default function Sidebar({ variant = "inset", ...props }) {
105
108
  <SidebarMenuButton
106
109
  isActive={location.pathname.toLowerCase().includes("settings")}
107
110
  tooltip="Settings"
111
+ size="sm"
112
+ className="data-active:font-normal"
108
113
  onClick={() => navigate("/app/settings")}
109
114
  >
110
- <Settings size={18} strokeWidth={1.5} />
115
+ <Settings size={20} strokeWidth={2} />
111
116
  <span>Settings</span>
112
117
  </SidebarMenuButton>
113
118
  </SidebarMenuItem>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stevederico/skateboard-ui",
3
3
  "private": false,
4
- "version": "2.8.0",
4
+ "version": "2.9.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./Sidebar": {
@@ -26,7 +26,7 @@ import { PanelLeftIcon } from "lucide-react"
26
26
 
27
27
  const SIDEBAR_COOKIE_NAME = "sidebar_state"
28
28
  const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
29
- const SIDEBAR_WIDTH = "16rem"
29
+ const SIDEBAR_WIDTH = "14rem"
30
30
  const SIDEBAR_WIDTH_MOBILE = "18rem"
31
31
  const SIDEBAR_WIDTH_ICON = "3rem"
32
32
  const SIDEBAR_KEYBOARD_SHORTCUT = "b"
@@ -307,7 +307,7 @@ function SidebarHeader({
307
307
  <div
308
308
  data-slot="sidebar-header"
309
309
  data-sidebar="header"
310
- className={cn("gap-2 p-2 flex flex-col", className)}
310
+ className={cn("gap-2 px-2 pb-2 flex flex-col", className)}
311
311
  {...props} />
312
312
  );
313
313
  }
@@ -457,9 +457,9 @@ const sidebarMenuButtonVariants = cva(
457
457
  outline: "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
458
458
  },
459
459
  size: {
460
- default: "h-8 text-sm",
461
- sm: "h-7 text-xs",
462
- lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!",
460
+ default: "h-10 text-base",
461
+ sm: "h-8 text-sm",
462
+ lg: "h-14 text-base group-data-[collapsible=icon]:p-0!",
463
463
  },
464
464
  },
465
465
  defaultVariants: {
package/styles.css CHANGED
@@ -40,7 +40,7 @@
40
40
  --sidebar-foreground: oklch(0.145 0 0);
41
41
  --sidebar-primary: oklch(0.205 0 0);
42
42
  --sidebar-primary-foreground: oklch(0.985 0 0);
43
- --sidebar-accent: oklch(0.96 0 0);
43
+ --sidebar-accent: oklch(0.92 0 0);
44
44
  --sidebar-accent-foreground: oklch(0.205 0 0);
45
45
  --sidebar-border: oklch(0.922 0 0);
46
46
  --sidebar-ring: oklch(0.708 0 0);
@@ -72,11 +72,11 @@
72
72
  --chart-3: oklch(0.769 0.188 70.08);
73
73
  --chart-4: oklch(0.627 0.265 303.9);
74
74
  --chart-5: oklch(0.645 0.246 16.439);
75
- --sidebar: oklch(0.15 0 0);
75
+ --sidebar: oklch(0.18 0 0);
76
76
  --sidebar-foreground: oklch(0.985 0 0);
77
77
  --sidebar-primary: oklch(0.488 0.243 264.376);
78
78
  --sidebar-primary-foreground: oklch(0.985 0 0);
79
- --sidebar-accent: oklch(0.25 0 0);
79
+ --sidebar-accent: oklch(0.22 0 0);
80
80
  --sidebar-accent-foreground: oklch(0.985 0 0);
81
81
  --sidebar-border: oklch(0.35 0 0);
82
82
  --sidebar-ring: oklch(0.439 0 0);
@@ -109,11 +109,11 @@
109
109
  --chart-3: oklch(0.769 0.188 70.08);
110
110
  --chart-4: oklch(0.627 0.265 303.9);
111
111
  --chart-5: oklch(0.645 0.246 16.439);
112
- --sidebar: oklch(0.15 0 0);
112
+ --sidebar: oklch(0.18 0 0);
113
113
  --sidebar-foreground: oklch(0.985 0 0);
114
114
  --sidebar-primary: oklch(0.488 0.243 264.376);
115
115
  --sidebar-primary-foreground: oklch(0.985 0 0);
116
- --sidebar-accent: oklch(0.25 0 0);
116
+ --sidebar-accent: oklch(0.22 0 0);
117
117
  --sidebar-accent-foreground: oklch(0.985 0 0);
118
118
  --sidebar-border: oklch(0.35 0 0);
119
119
  --sidebar-ring: oklch(0.439 0 0);
@@ -3,6 +3,7 @@ import { useNavigate } from 'react-router-dom';
3
3
  import { getState } from '../core/Context.jsx';
4
4
  import { useTheme } from 'next-themes';
5
5
  import { Sun, Moon } from 'lucide-react';
6
+ import Header from '../layout/Header.jsx';
6
7
  import { Avatar, AvatarFallback } from '../shadcn/ui/avatar.jsx';
7
8
  import { Badge } from '../shadcn/ui/badge.jsx';
8
9
  import { Button } from '../shadcn/ui/button.jsx';
@@ -59,13 +60,11 @@ export default function SettingsView() {
59
60
 
60
61
  return (
61
62
  <div className="flex-1">
62
- {/* Header */}
63
- <div className="flex items-center justify-between px-6 py-4 border-b border-border">
64
- <h1 className="text-base font-medium">Settings</h1>
63
+ <Header title="Settings">
65
64
  <Button variant="ghost" size="icon" onClick={() => setTheme(isDarkMode ? 'light' : 'dark')} aria-label="Toggle dark mode">
66
- {isDarkMode ? <Sun size={16} /> : <Moon size={16} />}
65
+ {isDarkMode ? <Sun size={20} /> : <Moon size={20} />}
67
66
  </Button>
68
- </div>
67
+ </Header>
69
68
 
70
69
  {/* Main content */}
71
70
  <div className="flex flex-col items-center p-4 gap-4">