@medixdeck/ui 0.1.24 → 0.1.26

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
@@ -54,17 +54,17 @@ export function App() {
54
54
 
55
55
  ## Public API index
56
56
 
57
- | Area | Exports |
58
- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
59
- | Provider + theme | `MedixProvider`, `useThemeMode`, `useIsDarkMode`, `useColorScheme`, `system`, `medixConfig`, token exports |
60
- | Primitive | `Button`, `IconButton`, `Badge`, `Avatar`, `AvatarGroup`, `Spinner`, `FullPageSpinner`, `Tag`, `Divider`, `Logo` |
57
+ | Area | Exports |
58
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
59
+ | Provider + theme | `MedixProvider`, `useThemeMode`, `useIsDarkMode`, `useColorScheme`, `system`, `medixConfig`, token exports |
60
+ | Primitive | `Button`, `IconButton`, `Badge`, `Avatar`, `AvatarGroup`, `Spinner`, `FullPageSpinner`, `Tag`, `Divider`, `Logo` |
61
61
  | Form | `Input`, `SearchInput`, `Textarea`, `Select`, `Checkbox`, `RadioGroup`, `Switch`, `FormControl`, `OTPInput`, `PinInput`, `PhoneInput`, `DatePicker`, `DateRangePicker`, `Calendar`, `Combobox`, `FileUpload`, `TagsInput`, `TagInput`, `clearTextareaDraft`, `getTextareaDraft`, `saveTextareaDraft`, `RichTextInput`, `RichTextEditor`, `clearRichTextDraft`, `getRichTextDraft`, `saveRichTextDraft` |
62
- | Layout | `Card`, `CardHeader`, `CardBody`, `CardFooter`, `StatCard`, `Container`, `SectionHeader`, `ThemeColorPalette`, `DashboardLayout`, `Footer` |
63
- | Navigation | `Navbar`, `Breadcrumb`, `Tabs`, `Pagination`, `Stepper` |
64
- | Feedback | `Alert`, `Skeleton`, `SkeletonText`, `SkeletonCard`, `Progress`, `Modal`, `Drawer`, `Tooltip`, `EmptyState`, `NotFoundPage`, `ServerErrorPage`, `Toaster`, `toast`, `dismissToast`, `CookieConsentBanner`, `PWAInstallPrompt` |
65
- | Data display | `Accordion`, `TestimonialCard`, `BlogCard`, `DataTable` |
66
- | Healthcare | `DoctorCard`, `VitalBadge`, `AppointmentCard` |
67
- | Chakra re-exports | `Box`, `Flex`, `Grid`, `Stack`, `Text`, `Heading`, `Link`, `Image`, `Icon`, `Center`, `Wrap`, `WrapItem`, others in `lib/index.ts` |
62
+ | Layout | `Card`, `CardHeader`, `CardBody`, `CardFooter`, `StatCard`, `Container`, `SectionHeader`, `ThemeColorPalette`, `DashboardLayout`, `Footer` |
63
+ | Navigation | `Navbar`, `Breadcrumb`, `Tabs`, `Pagination`, `Stepper` |
64
+ | Feedback | `Alert`, `Skeleton`, `SkeletonText`, `SkeletonCard`, `Progress`, `Modal`, `Drawer`, `Tooltip`, `EmptyState`, `NotFoundPage`, `ServerErrorPage`, `Toaster`, `toast`, `dismissToast`, `CookieConsentBanner`, `PWAInstallPrompt` |
65
+ | Data display | `Accordion`, `TestimonialCard`, `BlogCard`, `DataTable` |
66
+ | Healthcare | `DoctorCard`, `VitalBadge`, `AppointmentCard` |
67
+ | Chakra re-exports | `Box`, `Flex`, `Grid`, `Stack`, `Text`, `Heading`, `Link`, `Image`, `Icon`, `Center`, `Wrap`, `WrapItem`, others in `lib/index.ts` |
68
68
 
69
69
  ## Design-system rules
70
70
 
@@ -403,16 +403,16 @@ import { DashboardLayout } from '@medixdeck/ui';
403
403
 
404
404
  `DashboardNavItem` props:
405
405
 
406
- | Prop | Type | Required | Description |
407
- | ---------- | -------------------- | -------- | ------------------------------------------------------------------------------------------- |
408
- | `label` | `string` | ✓ | Display label for the sidebar link |
409
- | `href` | `string` | ✓ | Identifier or URL passed to `renderLink` and used as unique key |
410
- | `icon` | `ReactNode` | — | Optional icon element |
411
- | `badge` | `number` | — | Numeric count badge displayed to the right of the label |
412
- | `hasDot` | `boolean` | — | Red dot indicator for unread alerts or notifications |
413
- | `isNew` | `boolean` | — | "NEW" pill badge matching the active `colorScheme` (`blue` or `purple`) |
414
- | `isActive` | `boolean` | — | Marks this item as the active navigation route |
415
- | `subItems` | `DashboardNavItem[]` | — | Nested sub-links that expand/collapse in an accordion menu |
406
+ | Prop | Type | Required | Description |
407
+ | ---------- | -------------------- | -------- | ----------------------------------------------------------------------- |
408
+ | `label` | `string` | ✓ | Display label for the sidebar link |
409
+ | `href` | `string` | ✓ | Identifier or URL passed to `renderLink` and used as unique key |
410
+ | `icon` | `ReactNode` | — | Optional icon element |
411
+ | `badge` | `number` | — | Numeric count badge displayed to the right of the label |
412
+ | `hasDot` | `boolean` | — | Red dot indicator for unread alerts or notifications |
413
+ | `isNew` | `boolean` | — | "NEW" pill badge matching the active `colorScheme` (`blue` or `purple`) |
414
+ | `isActive` | `boolean` | — | Marks this item as the active navigation route |
415
+ | `subItems` | `DashboardNavItem[]` | — | Nested sub-links that expand/collapse in an accordion menu |
416
416
 
417
417
  ### Mobile bottom navigation (`mobileNavItems`)
418
418
 
@@ -452,8 +452,8 @@ Shown above the sidebar nav on **desktop only**. Only pass this prop for doctor-
452
452
  name: 'Dr. Okedi Williams',
453
453
  role: 'Cardiologist',
454
454
  avatarSrc: '/dr-okedi.jpg', // optional — initials fallback
455
- tier: 'gold', // "bronze" | "silver" | "gold" | "platinum" | "diamond"
456
- medixScore: 847,
455
+ tier: 'gold', // "bronze" | "silver" | "gold" | "platinum" | "elite-i" | "elite-ii" | "elite-iii" | "elite-iv" | "elite-v"
456
+ medixScore: 8470,
457
457
  link: '/doctor/profile', // optional — makes the card clickable
458
458
  }}
459
459
  >
@@ -461,15 +461,21 @@ Shown above the sidebar nav on **desktop only**. Only pass this prop for doctor-
461
461
  </DashboardLayout>
462
462
  ```
463
463
 
464
- Tier colours:
465
-
466
- | Tier | Label colour | Avatar ring |
467
- | ---------- | ------------ | ----------- |
468
- | `bronze` | `#92400E` | `#D97706` |
469
- | `silver` | `#475569` | `#94A3B8` |
470
- | `gold` | `#D97706` | `#F59E0B` |
471
- | `platinum` | `#0284C7` | `#38BDF8` |
472
- | `diamond` | `#7C3AED` | `#A78BFA` |
464
+ Tiers mirror the backend `MEDIX_SCORE_TIER` bands. Use `getMedixScoreTierForScore(score)` to resolve a tier key from a raw balance.
465
+
466
+ Tier colours and score bands:
467
+
468
+ | Tier | Level | Score band | Label colour | Avatar ring |
469
+ | ----------- | :---: | ----------------- | ------------ | ----------- |
470
+ | `bronze` | 1 | 0 – 999 | `#92400E` | `#D97706` |
471
+ | `silver` | 2 | 1,000 – 4,999 | `#475569` | `#94A3B8` |
472
+ | `gold` | 3 | 5,000 – 14,999 | `#D97706` | `#F59E0B` |
473
+ | `platinum` | 4 | 15,000 – 39,999 | `#0284C7` | `#38BDF8` |
474
+ | `elite-i` | 5 | 40,000 – 59,999 | `#6D28D9` | `#8B5CF6` |
475
+ | `elite-ii` | 6 | 60,000 – 79,999 | `#7C3AED` | `#A78BFA` |
476
+ | `elite-iii` | 7 | 80,000 – 119,999 | `#7700CC` | `#A855F7` |
477
+ | `elite-iv` | 8 | 120,000 – 199,999 | `#5B21B6` | `#7C3AED` |
478
+ | `elite-v` | 9 | 200,000+ | `#4C1D95` | `#6D28D9` |
473
479
 
474
480
  ### Greeting subtitle (`greetingSubtext`)
475
481