@medixdeck/ui 0.1.22 → 0.1.23

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
@@ -306,17 +306,17 @@ export function Header() {
306
306
 
307
307
  ### `NavItem` properties
308
308
 
309
- | Prop | Type | Description |
310
- |---|---|---|
311
- | `label` | `string` | Display text for the item |
312
- | `href` | `string` | Target URL (optional for dropdown triggers) |
313
- | `children` | `NavItem[]` | Nested items for desktop floating menus and mobile accordions |
314
- | `description` | `string` | Subtitle text displayed below label in dropdown items |
315
- | `icon` | `ReactNode` | Leading icon element |
316
- | `badge` | `string \| number \| ReactNode` | Status tag or count (e.g. `"Popular"`, `"NDPR"`) |
317
- | `isActive` | `boolean` | Highlights active route item |
318
- | `isExternal` | `boolean` | Opens link in a new tab with an external arrow icon |
319
- | `onClick` | `() => void` | Optional click callback |
309
+ | Prop | Type | Description |
310
+ | ------------- | ------------------------------- | ------------------------------------------------------------- |
311
+ | `label` | `string` | Display text for the item |
312
+ | `href` | `string` | Target URL (optional for dropdown triggers) |
313
+ | `children` | `NavItem[]` | Nested items for desktop floating menus and mobile accordions |
314
+ | `description` | `string` | Subtitle text displayed below label in dropdown items |
315
+ | `icon` | `ReactNode` | Leading icon element |
316
+ | `badge` | `string \| number \| ReactNode` | Status tag or count (e.g. `"Popular"`, `"NDPR"`) |
317
+ | `isActive` | `boolean` | Highlights active route item |
318
+ | `isExternal` | `boolean` | Opens link in a new tab with an external arrow icon |
319
+ | `onClick` | `() => void` | Optional click callback |
320
320
 
321
321
  ---
322
322
 
@@ -470,15 +470,15 @@ It is completely safe across SSR and CSR runtimes (Next.js App/Pages Router, Vit
470
470
 
471
471
  `DashboardEnvironmentBannerConfig` props:
472
472
 
473
- | Prop | Type | Default | Description |
474
- |---|---|---|---|
475
- | `environment` | `"auto" \| "production" \| "live" \| "sandbox" \| "test" \| "development" \| "staging" \| "preview"` | `"auto"` | Environment classification |
476
- | `badgeLabel` | `string` | auto | Uppercase badge label (e.g., `"SANDBOX ENVIRONMENT"`) |
477
- | `message` | `string` | auto | Descriptive warning / notice text |
478
- | `status` | `"warning" \| "info" \| "error" \| "neutral"` | auto | Visual color scheme (amber warning, blue info, red error) |
479
- | `action` | `ReactNode` | — | Action link or button on the right |
480
- | `dismissible` | `boolean` | `false` | Shows a close (✕) button |
481
- | `onDismiss` | `() => void` | — | Called when the close button is clicked |
473
+ | Prop | Type | Default | Description |
474
+ | ------------- | ---------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------- |
475
+ | `environment` | `"auto" \| "production" \| "live" \| "sandbox" \| "test" \| "development" \| "staging" \| "preview"` | `"auto"` | Environment classification |
476
+ | `badgeLabel` | `string` | auto | Uppercase badge label (e.g., `"SANDBOX ENVIRONMENT"`) |
477
+ | `message` | `string` | auto | Descriptive warning / notice text |
478
+ | `status` | `"warning" \| "info" \| "error" \| "neutral"` | auto | Visual color scheme (amber warning, blue info, red error) |
479
+ | `action` | `ReactNode` | — | Action link or button on the right |
480
+ | `dismissible` | `boolean` | `false` | Shows a close (✕) button |
481
+ | `onDismiss` | `() => void` | — | Called when the close button is clicked |
482
482
 
483
483
  ### Collapsible Sidebar (`collapsible`, `isCollapsed`, `onCollapseChange`)
484
484
 
@@ -491,14 +491,9 @@ On desktop (`md+`), `DashboardLayout` supports shrinking the sidebar into a comp
491
491
 
492
492
  ```tsx
493
493
  // 1. Uncontrolled with default expanded or collapsed
494
- <DashboardLayout
495
- collapsible={true}
496
- defaultCollapsed={false}
497
- user={user}
498
- navGroups={navGroups}
499
- >
494
+ <DashboardLayout collapsible={true} defaultCollapsed={false} user={user} navGroups={navGroups}>
500
495
  {children}
501
- </DashboardLayout>
496
+ </DashboardLayout>;
502
497
 
503
498
  // 2. Controlled collapse state
504
499
  function App() {
@@ -521,32 +516,32 @@ function App() {
521
516
 
522
517
  ### All `DashboardLayout` props
523
518
 
524
- | Prop | Type | Default | Description |
525
- | ------------------------ | ----------------------------------- | ---------- | --------------------------------------------- |
526
- | `user` | `DashboardUser` | — | Name, email, optional avatar |
527
- | `navGroups` | `DashboardNavGroup[]` | — | Sidebar navigation tree |
528
- | `collapsible` | `boolean` | `true` | Enables collapsible sidebar icon rail |
529
- | `defaultCollapsed` | `boolean` | `false` | Initial collapsed state (uncontrolled) |
530
- | `isCollapsed` | `boolean` | — | Controlled collapsed state |
531
- | `onCollapseChange` | `(collapsed: boolean) => void` | — | Fired when sidebar collapse state toggles |
532
- | `sidebarWidth` | `number` | `220` | Full sidebar width in px |
533
- | `collapsedSidebarWidth` | `number` | `68` | Compact icon rail width in px |
534
- | `collapseTogglePlacement`| `"sidebar-header" \| "topbar" \| "both" \| "none"` | `"sidebar-header"` | Placement of collapse/expand toggle buttons |
535
- | `collapsedLogo` | `ReactNode` | `<Logo type="icon" />` | Custom logo displayed in collapsed mode |
536
- | `colorScheme` | `"blue" \| "purple"` | `"blue"` | Brand accent colour |
537
- | `environment` | `DashboardEnvironment` | `"auto"` | Auto-detects test/sandbox/staging environments |
538
- | `showEnvironmentBanner` | `boolean` | auto | Force show (`true`) or suppress (`false`) banner |
539
- | `environmentBanner` | `DashboardEnvironmentBannerConfig` | — | Detailed banner message, action, & dismiss config |
540
- | `environmentBannerSlot` | `ReactNode` | — | Custom slot overriding the entire banner |
541
- | `logo` | `ReactNode` | `<Logo />` | Override the sidebar logo |
542
- | `greeting` | `string` | auto | Override "Good morning / afternoon / evening" |
543
- | `greetingSubtext` | `string` | — | Subtitle line below the greeting |
544
- | `mobileNavItems` | `DashboardMobileNavItem[]` | — | Mobile bottom tab bar items |
545
- | `scoreCard` | `DashboardScoreCardData` | — | Doctor identity card (desktop only) |
546
- | `topBarSlot` | `ReactNode` | — | Slot right of greeting (search, bell, etc.) |
547
- | `dropdownItems` | `DashboardDropdownItem[]` | — | Extra user dropdown items |
548
- | `renderLink` | `(item, children) => ReactNode` | `<a>` | Router integration |
549
- | `onLogout` | `() => void` | — | Logout callback |
519
+ | Prop | Type | Default | Description |
520
+ | ------------------------- | -------------------------------------------------- | ---------------------- | ------------------------------------------------- |
521
+ | `user` | `DashboardUser` | — | Name, email, optional avatar |
522
+ | `navGroups` | `DashboardNavGroup[]` | — | Sidebar navigation tree |
523
+ | `collapsible` | `boolean` | `true` | Enables collapsible sidebar icon rail |
524
+ | `defaultCollapsed` | `boolean` | `false` | Initial collapsed state (uncontrolled) |
525
+ | `isCollapsed` | `boolean` | — | Controlled collapsed state |
526
+ | `onCollapseChange` | `(collapsed: boolean) => void` | — | Fired when sidebar collapse state toggles |
527
+ | `sidebarWidth` | `number` | `220` | Full sidebar width in px |
528
+ | `collapsedSidebarWidth` | `number` | `68` | Compact icon rail width in px |
529
+ | `collapseTogglePlacement` | `"sidebar-header" \| "topbar" \| "both" \| "none"` | `"sidebar-header"` | Placement of collapse/expand toggle buttons |
530
+ | `collapsedLogo` | `ReactNode` | `<Logo type="icon" />` | Custom logo displayed in collapsed mode |
531
+ | `colorScheme` | `"blue" \| "purple"` | `"blue"` | Brand accent colour |
532
+ | `environment` | `DashboardEnvironment` | `"auto"` | Auto-detects test/sandbox/staging environments |
533
+ | `showEnvironmentBanner` | `boolean` | auto | Force show (`true`) or suppress (`false`) banner |
534
+ | `environmentBanner` | `DashboardEnvironmentBannerConfig` | — | Detailed banner message, action, & dismiss config |
535
+ | `environmentBannerSlot` | `ReactNode` | — | Custom slot overriding the entire banner |
536
+ | `logo` | `ReactNode` | `<Logo />` | Override the sidebar logo |
537
+ | `greeting` | `string` | auto | Override "Good morning / afternoon / evening" |
538
+ | `greetingSubtext` | `string` | — | Subtitle line below the greeting |
539
+ | `mobileNavItems` | `DashboardMobileNavItem[]` | — | Mobile bottom tab bar items |
540
+ | `scoreCard` | `DashboardScoreCardData` | — | Doctor identity card (desktop only) |
541
+ | `topBarSlot` | `ReactNode` | — | Slot right of greeting (search, bell, etc.) |
542
+ | `dropdownItems` | `DashboardDropdownItem[]` | — | Extra user dropdown items |
543
+ | `renderLink` | `(item, children) => ReactNode` | `<a>` | Router integration |
544
+ | `onLogout` | `() => void` | — | Logout callback |
550
545
 
551
546
  ## Footer
552
547