@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 +37 -31
- package/dist/index.cjs +27 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +64 -2
- package/dist/index.js +2409 -2321
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -755,6 +755,22 @@ export declare interface CookieConsentBannerProps extends Omit<CookieConsentComp
|
|
|
755
755
|
|
|
756
756
|
declare type CookieConsentComponentProps = default_2.ComponentProps<typeof default_3>;
|
|
757
757
|
|
|
758
|
+
/**
|
|
759
|
+
* Visual + band metadata for every backend-supported MedixScore tier.
|
|
760
|
+
*
|
|
761
|
+
* Score bands (backend `MEDIX_SCORE_TIER`):
|
|
762
|
+
* Bronze 0–999 · Silver 1,000–4,999 · Gold 5,000–14,999 ·
|
|
763
|
+
* Platinum 15,000–39,999 · Elite I 40,000–59,999 · Elite II 60,000–79,999 ·
|
|
764
|
+
* Elite III 80,000–119,999 · Elite IV 120,000–199,999 · Elite V 200,000+.
|
|
765
|
+
*
|
|
766
|
+
* Base tiers keep their established colours; Elite I–V use a violet/purple
|
|
767
|
+
* prestige ramp culminating in brand purple (`#7700CC`) and deep royal tones.
|
|
768
|
+
*/
|
|
769
|
+
export declare const DASHBOARD_MEDIX_TIER_CONFIG: Record<DashboardMedixScoreTier, DashboardMedixScoreTierMeta>;
|
|
770
|
+
|
|
771
|
+
/** Tier keys ordered by ascending level (Bronze → Elite V). */
|
|
772
|
+
export declare const DASHBOARD_MEDIX_TIER_ORDER: DashboardMedixScoreTier[];
|
|
773
|
+
|
|
758
774
|
export declare type DashboardColorScheme = 'blue' | 'purple';
|
|
759
775
|
|
|
760
776
|
export declare interface DashboardDropdownItem {
|
|
@@ -1027,7 +1043,7 @@ export declare interface DashboardLayoutProps extends Omit<BoxProps, 'children'>
|
|
|
1027
1043
|
* role: "Cardiologist",
|
|
1028
1044
|
* avatarSrc: "/dr-okedi.jpg",
|
|
1029
1045
|
* tier: "gold",
|
|
1030
|
-
* medixScore:
|
|
1046
|
+
* medixScore: 8470,
|
|
1031
1047
|
* link: "/doctor/profile",
|
|
1032
1048
|
* }}
|
|
1033
1049
|
* ```
|
|
@@ -1057,6 +1073,33 @@ export declare interface DashboardLayoutProps extends Omit<BoxProps, 'children'>
|
|
|
1057
1073
|
environmentBannerSlot?: default_2.ReactNode;
|
|
1058
1074
|
}
|
|
1059
1075
|
|
|
1076
|
+
/**
|
|
1077
|
+
* MedixScore clinician tier key.
|
|
1078
|
+
*
|
|
1079
|
+
* Mirrors the backend `MEDIX_SCORE_TIER` bands
|
|
1080
|
+
* (`medixdeck-backend/src/utils/medixScore.constants.ts`):
|
|
1081
|
+
* Bronze (L1) → Silver (L2) → Gold (L3) → Platinum (L4) →
|
|
1082
|
+
* Elite I (L5) → Elite II (L6) → Elite III (L7) → Elite IV (L8) → Elite V (L9).
|
|
1083
|
+
*/
|
|
1084
|
+
export declare type DashboardMedixScoreTier = 'bronze' | 'silver' | 'gold' | 'platinum' | 'elite-i' | 'elite-ii' | 'elite-iii' | 'elite-iv' | 'elite-v';
|
|
1085
|
+
|
|
1086
|
+
export declare interface DashboardMedixScoreTierMeta {
|
|
1087
|
+
/** Display name — matches backend tier `NAME` exactly (e.g. "Elite I"). */
|
|
1088
|
+
label: string;
|
|
1089
|
+
/** Tier level 1–9 — matches backend tier `LEVEL`. */
|
|
1090
|
+
level: number;
|
|
1091
|
+
/** Inclusive lower score bound — matches backend `MIN_SCORE`. */
|
|
1092
|
+
minScore: number;
|
|
1093
|
+
/** Inclusive upper score bound — matches backend `MAX_SCORE` (`null` = unbounded, Elite V). */
|
|
1094
|
+
maxScore: number | null;
|
|
1095
|
+
/** Label / badge text colour. */
|
|
1096
|
+
color: string;
|
|
1097
|
+
/** Avatar gradient-ring colour. */
|
|
1098
|
+
ring: string;
|
|
1099
|
+
/** Avatar fallback / tint background. */
|
|
1100
|
+
bg: string;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1060
1103
|
export declare interface DashboardMobileNavItem {
|
|
1061
1104
|
/** Label shown below the icon in the mobile bottom bar. */
|
|
1062
1105
|
label: string;
|
|
@@ -1116,7 +1159,7 @@ export declare interface DashboardScoreCardData {
|
|
|
1116
1159
|
/** Optional href to navigate to the doctor's profile when the card is clicked. */
|
|
1117
1160
|
link?: string;
|
|
1118
1161
|
/** Clinician tier — determines avatar ring colour and badge text colour. */
|
|
1119
|
-
tier:
|
|
1162
|
+
tier: DashboardMedixScoreTier;
|
|
1120
1163
|
/** Numeric MedixScore displayed next to the tier label. */
|
|
1121
1164
|
medixScore: number;
|
|
1122
1165
|
}
|
|
@@ -1572,6 +1615,25 @@ export declare function getEffectiveStorageKey(storageKey?: string, id?: string,
|
|
|
1572
1615
|
*/
|
|
1573
1616
|
export declare function getEffectiveTextareaStorageKey(storageKey?: string, id?: string, name?: string, placeholder?: string): string;
|
|
1574
1617
|
|
|
1618
|
+
/**
|
|
1619
|
+
* Resolve the tier key for a raw MedixScore balance using backend bands.
|
|
1620
|
+
* Negative / NaN inputs floor to `bronze`; Elite V has no upper bound.
|
|
1621
|
+
*
|
|
1622
|
+
* @example
|
|
1623
|
+
* ```ts
|
|
1624
|
+
* getMedixScoreTierForScore(0) // "bronze"
|
|
1625
|
+
* getMedixScoreTierForScore(5000) // "gold"
|
|
1626
|
+
* getMedixScoreTierForScore(250000) // "elite-v"
|
|
1627
|
+
* ```
|
|
1628
|
+
*/
|
|
1629
|
+
export declare function getMedixScoreTierForScore(score: number): DashboardMedixScoreTier;
|
|
1630
|
+
|
|
1631
|
+
/**
|
|
1632
|
+
* Safe tier metadata accessor — falls back to Bronze for unknown keys
|
|
1633
|
+
* (e.g. stale persisted values such as the removed `diamond` tier).
|
|
1634
|
+
*/
|
|
1635
|
+
export declare function getMedixScoreTierMeta(tier: DashboardMedixScoreTier | (string & {})): DashboardMedixScoreTierMeta;
|
|
1636
|
+
|
|
1575
1637
|
/**
|
|
1576
1638
|
* Safely retrieves a saved draft from localStorage.
|
|
1577
1639
|
*/
|