@loykin/designkit 0.0.1-dev.3 → 0.0.1-dev.4

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/README.md CHANGED
@@ -204,15 +204,15 @@ handle stays inside the clipped panel corner:
204
204
 
205
205
  ```css
206
206
  .layout-dashboard .react-grid-item:not(.react-grid-placeholder) {
207
- --dk-resize-handle-size: clamp(20px, calc(var(--radius) * 1.6), 40px);
208
- --dk-resize-handle-inset: clamp(4px, calc(var(--radius) * 0.45), 16px);
209
- --dk-resize-handle-mark-size: clamp(6px, calc(var(--radius) * 0.55), 12px);
210
- --dk-resize-handle-color: rgba(0, 0, 0, 0.35);
211
- --dk-resize-handle-mark-radius: min(var(--radius), var(--dk-resize-handle-mark-size));
207
+ --designkit-resize-handle-size: clamp(20px, calc(var(--radius) * 1.6), 40px);
208
+ --designkit-resize-handle-inset: clamp(4px, calc(var(--radius) * 0.45), 16px);
209
+ --designkit-resize-handle-mark-size: clamp(6px, calc(var(--radius) * 0.55), 12px);
210
+ --designkit-resize-handle-color: rgba(0, 0, 0, 0.35);
211
+ --designkit-resize-handle-mark-radius: min(var(--radius), var(--designkit-resize-handle-mark-size));
212
212
  }
213
213
 
214
214
  .dark .layout-dashboard .react-grid-item:not(.react-grid-placeholder) {
215
- --dk-resize-handle-color: rgba(255, 255, 255, 0.4);
215
+ --designkit-resize-handle-color: rgba(255, 255, 255, 0.4);
216
216
  }
217
217
  ```
218
218
 
@@ -453,6 +453,39 @@ import {
453
453
  } from '@loykin/designkit'
454
454
  ```
455
455
 
456
+ ### PageTopBar
457
+
458
+ Top breadcrumb / action bar placed at the top of a page template via the `topBar` prop.
459
+
460
+ ```tsx
461
+ import { PageTopBar } from '@loykin/designkit'
462
+
463
+ <PageTopBar left="Admin / Users" right={<Button size="sm">Add</Button>} />
464
+ ```
465
+
466
+ | Prop | Type | Default | Description |
467
+ |---|---|---|---|
468
+ | `left` | `ReactNode` | — | Left content. A plain string is parsed as `/`-separated breadcrumbs. |
469
+ | `right` | `ReactNode` | — | Right-aligned actions |
470
+ | `variant` | `'ghost' \| 'default'` | `'ghost'` | `'default'` adds a bottom border |
471
+ | `sidebarTrigger` | `false \| ReactNode` | auto | Mobile sidebar open button. `undefined` auto-detects SidebarProvider context; `false` suppresses; pass a `ReactNode` for a custom trigger. |
472
+ | `height` | `string` | `var(--designkit-toolbar-height)` | Bar height |
473
+ | `className` | `string` | — | Class applied to the bar root |
474
+
475
+ **Mobile sidebar trigger**
476
+
477
+ When `PageTopBar` is rendered inside a `SidebarShell` on a mobile viewport, it automatically prepends a hamburger trigger to open the sidebar drawer — no extra code required. To suppress this (e.g. when the left slot already has a back button), pass `sidebarTrigger={false}`:
478
+
479
+ ```tsx
480
+ // Back-button detail page — suppress auto trigger
481
+ <PageTopBar sidebarTrigger={false} left={<BackButton />} />
482
+
483
+ // Custom trigger
484
+ <PageTopBar sidebarTrigger={<MyTrigger />} left="Settings" />
485
+ ```
486
+
487
+ ---
488
+
456
489
  ### EmptyState
457
490
 
458
491
  ```tsx
@@ -471,20 +504,20 @@ import { Users } from 'lucide-react'
471
504
 
472
505
  ## Theming
473
506
 
474
- Designkit maps shadcn/ui CSS variables onto its own `--dk-*` tokens. Changing your shadcn theme automatically updates all designkit components.
507
+ Designkit maps shadcn/ui CSS variables onto its own `--designkit-*` tokens. Changing your shadcn theme automatically updates all designkit components.
475
508
 
476
509
  | What | How |
477
510
  |---|---|
478
511
  | Colors, radius, typography | shadcn/ui theme variables (`--primary`, `--radius`, etc.) |
479
- | Spacing, density, padding | `--dk-density`, `--dk-page-padding-*`, `--dk-panel-gap` |
512
+ | Spacing, density, padding | `--designkit-density`, `--designkit-page-padding-*`, `--designkit-panel-gap` |
480
513
  | Per-page overrides | `className` or `theme` prop |
481
514
 
482
515
  ```css
483
516
  :root {
484
- --dk-density: 1; /* 0.85 compact / 1 default / 1.15 comfortable */
485
- --dk-page-padding-x: 1.5rem;
486
- --dk-page-padding-y: 1rem;
487
- --dk-panel-gap: 1rem;
517
+ --designkit-density: 1; /* 0.85 compact / 1 default / 1.15 comfortable */
518
+ --designkit-page-padding-x: 1.5rem;
519
+ --designkit-page-padding-y: 1rem;
520
+ --designkit-panel-gap: 1rem;
488
521
  }
489
522
  ```
490
523
 
@@ -492,7 +525,7 @@ Per-page override via `className`:
492
525
 
493
526
  ```css
494
527
  .layout-dashboard {
495
- --dk-density: 0.85;
528
+ --designkit-density: 0.85;
496
529
  }
497
530
  ```
498
531
 
@@ -504,7 +537,7 @@ Or via `theme` prop:
504
537
 
505
538
  ```tsx
506
539
  <DataBodyTemplate
507
- theme={{ '--dk-density': '1.15' } as React.CSSProperties}
540
+ theme={{ '--designkit-density': '1.15' } as React.CSSProperties}
508
541
  title="Settings"
509
542
  >
510
543
  ```