@medixdeck/ui 0.1.19 → 0.1.21

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/dist/index.d.ts CHANGED
@@ -81,6 +81,29 @@ export declare type AlertStatus = 'info' | 'success' | 'warning' | 'error';
81
81
 
82
82
  export declare type AlertVariant = 'subtle' | 'solid' | 'left-accent';
83
83
 
84
+ /**
85
+ * MedixDeck AllergyBadge
86
+ *
87
+ * High-visibility badge for patient allergies with severity classification.
88
+ * Life-threatening allergies display with a bold red border for immediate recognition.
89
+ *
90
+ * @example
91
+ * ```tsx
92
+ * <AllergyBadge allergen="Penicillin" severity="severe" />
93
+ * <AllergyBadge allergen="Latex" severity="mild" />
94
+ * ```
95
+ */
96
+ export declare function AllergyBadge({ allergen, severity, ...props }: AllergyBadgeProps): JSX_2.Element;
97
+
98
+ export declare interface AllergyBadgeProps extends Omit<BoxProps, 'onChange'> {
99
+ /** Allergen name e.g. "Penicillin", "Latex" */
100
+ allergen: string;
101
+ /** Clinical reaction severity */
102
+ severity?: AllergySeverity;
103
+ }
104
+
105
+ export declare type AllergySeverity = 'mild' | 'moderate' | 'severe' | 'life-threatening';
106
+
84
107
  /**
85
108
  * MedixDeck AppointmentCard
86
109
  *
@@ -219,6 +242,26 @@ export declare interface BlogCardProps extends Omit<BoxProps, 'onClick'> {
219
242
  colorScheme?: BlogCardColorScheme;
220
243
  }
221
244
 
245
+ export declare type BloodType = 'A+' | 'A-' | 'B+' | 'B-' | 'AB+' | 'AB-' | 'O+' | 'O-';
246
+
247
+ /**
248
+ * MedixDeck BloodTypeBadge
249
+ *
250
+ * Displays a patient's ABO blood group with Rh factor in a high-visibility
251
+ * red badge, consistent with clinical standards.
252
+ *
253
+ * @example
254
+ * ```tsx
255
+ * <BloodTypeBadge bloodType="O+" />
256
+ * ```
257
+ */
258
+ export declare function BloodTypeBadge({ bloodType, ...props }: BloodTypeBadgeProps): JSX_2.Element;
259
+
260
+ export declare interface BloodTypeBadgeProps extends Omit<BoxProps, 'onChange'> {
261
+ /** ABO blood group with Rh factor */
262
+ bloodType: BloodType;
263
+ }
264
+
222
265
  export declare interface BottomLink {
223
266
  label: string;
224
267
  href: string;
@@ -982,7 +1025,7 @@ export declare interface DashboardUser {
982
1025
  * />
983
1026
  * ```
984
1027
  */
985
- export declare function DataTable<T extends Record<string, unknown>>({ columns, data, rowKey, isLoading, emptyMessage, sortable, sortKey, sortDirection, onSort, striped, onRowClick, caption, enablePagination, pageSize, page, onPageChange, enableSearch, searchPlaceholder, searchQuery, onSearchChange, style, className, }: DataTableProps<T>): JSX_2.Element;
1028
+ export declare function DataTable<T extends Record<string, unknown>>({ columns, data, rowKey, isLoading, emptyMessage, sortable, sortKey, sortDirection, onSort, striped, onRowClick, caption, enablePagination, pageSize, page, onPageChange, enableSearch, searchPlaceholder, searchQuery, onSearchChange, style, className, stickyFirstColumn, }: DataTableProps<T>): JSX_2.Element;
986
1029
 
987
1030
  export declare interface DataTableProps<T = Record<string, unknown>> {
988
1031
  columns: Column<T>[];
@@ -1016,6 +1059,12 @@ export declare interface DataTableProps<T = Record<string, unknown>> {
1016
1059
  /** Extra styles for outer container */
1017
1060
  style?: default_2.CSSProperties;
1018
1061
  className?: string;
1062
+ /**
1063
+ * When true, the first column is pinned (sticky) to the left during
1064
+ * horizontal scrolling so patient names / IDs stay visible.
1065
+ * @default false
1066
+ */
1067
+ stickyFirstColumn?: boolean;
1019
1068
  }
1020
1069
 
1021
1070
  /**
@@ -1310,7 +1359,7 @@ export declare interface FooterProps extends Omit<BoxProps, 'children'> {
1310
1359
  sections?: FooterSection[];
1311
1360
  /** Social media links */
1312
1361
  socialLinks?: SocialLink[];
1313
- /** Copyright text. Defaults to "© {year} MedixDeck Health Solution Ltd. All Rights Reserved." */
1362
+ /** Copyright text. Defaults to "© {year} MedixDeck Health Solutions Ltd. All Rights Reserved." */
1314
1363
  copyright?: string;
1315
1364
  /** Links at the bottom right corner */
1316
1365
  bottomLinks?: BottomLink[];
@@ -1398,6 +1447,28 @@ export { HStack }
1398
1447
  */
1399
1448
  export declare function htmlToMarkdown(html: string): string;
1400
1449
 
1450
+ /**
1451
+ * MedixDeck ICD10Badge
1452
+ *
1453
+ * Displays a standardized ICD-10 diagnosis code chip with optional description.
1454
+ *
1455
+ * @example
1456
+ * ```tsx
1457
+ * <ICD10Badge code="J45.9" description="Unspecified asthma" category="chronic" />
1458
+ * ```
1459
+ */
1460
+ export declare function ICD10Badge({ code, description, category, ...props }: ICD10BadgeProps): JSX_2.Element;
1461
+
1462
+ export declare interface ICD10BadgeProps extends Omit<BoxProps, 'onChange'> {
1463
+ /** ICD-10 code e.g. "J45.9" */
1464
+ code: string;
1465
+ /** Human-readable description e.g. "Unspecified asthma, uncomplicated" */
1466
+ description?: string;
1467
+ /** Clinical category for color coding */
1468
+ category?: 'primary' | 'secondary' | 'chronic' | 'acute';
1469
+ colorScheme?: 'blue' | 'purple';
1470
+ }
1471
+
1401
1472
  export { Icon }
1402
1473
 
1403
1474
  /**
@@ -1533,6 +1604,47 @@ export declare type LogoVariant = 'blue' | 'purple' | 'black' | 'white';
1533
1604
  */
1534
1605
  export declare function markdownToHtml(markdown: string): string;
1535
1606
 
1607
+ /**
1608
+ * MedixDeck MedicalRecordBadge
1609
+ *
1610
+ * Composite component that renders a patient's key medical identifiers:
1611
+ * ICD-10 diagnoses, blood type, and allergy alerts in a single compact strip.
1612
+ *
1613
+ * @example
1614
+ * ```tsx
1615
+ * <MedicalRecordBadge
1616
+ * bloodType="O+"
1617
+ * diagnoses={[
1618
+ * { code: "E11.9", description: "Type 2 Diabetes", category: "chronic" },
1619
+ * { code: "I10", description: "Essential Hypertension", category: "chronic" },
1620
+ * ]}
1621
+ * allergies={[
1622
+ * { allergen: "Penicillin", severity: "severe" },
1623
+ * { allergen: "Sulfa drugs", severity: "moderate" },
1624
+ * ]}
1625
+ * />
1626
+ * ```
1627
+ */
1628
+ export declare function MedicalRecordBadge({ diagnoses, bloodType, allergies, direction, ...props }: MedicalRecordBadgeProps): JSX_2.Element;
1629
+
1630
+ export declare interface MedicalRecordBadgeProps extends Omit<BoxProps, 'onChange'> {
1631
+ /** ICD-10 diagnoses */
1632
+ diagnoses?: Array<{
1633
+ code: string;
1634
+ description?: string;
1635
+ category?: ICD10BadgeProps['category'];
1636
+ }>;
1637
+ /** Blood type */
1638
+ bloodType?: BloodType;
1639
+ /** Known allergies */
1640
+ allergies?: Array<{
1641
+ allergen: string;
1642
+ severity?: AllergySeverity;
1643
+ }>;
1644
+ /** Layout direction */
1645
+ direction?: 'row' | 'column';
1646
+ }
1647
+
1536
1648
  export declare const medixConfig: SystemConfig;
1537
1649
 
1538
1650
  /**
@@ -1579,6 +1691,8 @@ export declare interface MedixProviderProps {
1579
1691
  * MedixDeck Modal
1580
1692
  *
1581
1693
  * Dialog overlay for focused interactions.
1694
+ * On mobile viewports it automatically renders as a swipeable bottom sheet
1695
+ * (set `mobileVariant="centered"` to opt out of this behaviour).
1582
1696
  *
1583
1697
  * @example
1584
1698
  * ```tsx
@@ -1592,7 +1706,9 @@ export declare interface MedixProviderProps {
1592
1706
  * </Modal>
1593
1707
  * ```
1594
1708
  */
1595
- export declare function Modal({ isOpen, onClose, title, description, size, closeOnOverlayClick, closeOnEscape, footer, children, }: ModalProps): JSX_2.Element;
1709
+ export declare function Modal({ isOpen, onClose, title, description, size, closeOnOverlayClick, closeOnEscape, footer, children, mobileVariant, }: ModalProps): JSX_2.Element;
1710
+
1711
+ export declare type ModalMobileVariant = 'centered' | 'bottom-sheet';
1596
1712
 
1597
1713
  export declare interface ModalProps {
1598
1714
  isOpen: boolean;
@@ -1607,6 +1723,12 @@ export declare interface ModalProps {
1607
1723
  /** Footer action buttons */
1608
1724
  footer?: default_2.ReactNode;
1609
1725
  children?: default_2.ReactNode;
1726
+ /**
1727
+ * On mobile viewports (< 768px), transforms the modal into a swipeable
1728
+ * bottom sheet that slides up from the bottom edge.
1729
+ * @default "bottom-sheet"
1730
+ */
1731
+ mobileVariant?: ModalMobileVariant;
1610
1732
  }
1611
1733
 
1612
1734
  export declare type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
@@ -1890,6 +2012,54 @@ export declare interface PaginationProps extends Omit<BoxProps, 'onChange'> {
1890
2012
  compact?: boolean;
1891
2013
  }
1892
2014
 
2015
+ /**
2016
+ * MedixDeck PatientTimeline
2017
+ *
2018
+ * Vertical activity timeline for patient medical history.
2019
+ * Supports consultation, lab, prescription, vitals, notes, admission, and discharge events.
2020
+ *
2021
+ * @example
2022
+ * ```tsx
2023
+ * <PatientTimeline
2024
+ * colorScheme="blue"
2025
+ * events={[
2026
+ * {
2027
+ * id: "1",
2028
+ * type: "consultation",
2029
+ * title: "Video Consultation",
2030
+ * description: "Follow-up on hypertension management.",
2031
+ * date: "Aug 16, 2026 · 10:30 AM",
2032
+ * provider: "Dr. Amaka Okonkwo",
2033
+ * badgeLabel: "Completed",
2034
+ * badgeStatus: "success",
2035
+ * },
2036
+ * {
2037
+ * id: "2",
2038
+ * type: "lab",
2039
+ * title: "Blood Panel Results",
2040
+ * date: "Aug 14, 2026",
2041
+ * badgeLabel: "Abnormal",
2042
+ * badgeStatus: "warning",
2043
+ * },
2044
+ * ]}
2045
+ * />
2046
+ * ```
2047
+ */
2048
+ export declare function PatientTimeline({ events, compact, isLoading, loadingCount, colorScheme, ...props }: PatientTimelineProps): JSX_2.Element;
2049
+
2050
+ export declare interface PatientTimelineProps extends Omit<BoxProps, 'onChange'> {
2051
+ /** Array of timeline events in chronological order (newest first) */
2052
+ events: TimelineEvent[];
2053
+ /** Whether to show compact view (hide descriptions) */
2054
+ compact?: boolean;
2055
+ /** Loading state */
2056
+ isLoading?: boolean;
2057
+ /** Number of skeleton rows to show when loading */
2058
+ loadingCount?: number;
2059
+ /** Brand color scheme for active connector line */
2060
+ colorScheme?: 'blue' | 'purple';
2061
+ }
2062
+
1893
2063
  /**
1894
2064
  * MedixDeck PhoneInput
1895
2065
  *
@@ -1939,6 +2109,70 @@ export declare const PinInput: typeof OTPInput;
1939
2109
 
1940
2110
  export declare type PinInputProps = OTPInputProps;
1941
2111
 
2112
+ /**
2113
+ * MedixDeck PrescriptionCard
2114
+ *
2115
+ * Displays a digital prescription with drug list, dosage instructions,
2116
+ * prescriber info, refill count, and optional download action.
2117
+ *
2118
+ * @example
2119
+ * ```tsx
2120
+ * <PrescriptionCard
2121
+ * rxId="RX-20260816-0042"
2122
+ * doctorName="Dr. Amaka Okonkwo"
2123
+ * doctorSpecialty="General Practitioner"
2124
+ * issuedDate="Aug 16, 2026"
2125
+ * expiryDate="Sep 16, 2026"
2126
+ * status="active"
2127
+ * refillsRemaining={2}
2128
+ * drugs={[
2129
+ * { name: "Amoxicillin", dosage: "500mg", frequency: "3x daily", duration: "7 days", instructions: "Take with food" },
2130
+ * { name: "Ibuprofen", dosage: "400mg", frequency: "As needed", duration: "7 days" },
2131
+ * ]}
2132
+ * onDownload={() => window.print()}
2133
+ * />
2134
+ * ```
2135
+ */
2136
+ export declare function PrescriptionCard({ rxId, doctorName, doctorSpecialty, issuedDate, expiryDate, drugs, refillsRemaining, status, colorScheme, onDownload, ...props }: PrescriptionCardProps): JSX_2.Element;
2137
+
2138
+ export declare interface PrescriptionCardProps extends Omit<BoxProps, 'onChange'> {
2139
+ /** Prescription / Rx ID */
2140
+ rxId?: string;
2141
+ /** Prescribing doctor */
2142
+ doctorName: string;
2143
+ /** Doctor specialty */
2144
+ doctorSpecialty?: string;
2145
+ /** Issue date (display string) */
2146
+ issuedDate: string;
2147
+ /** Expiry date (display string) */
2148
+ expiryDate?: string;
2149
+ /** List of prescribed drugs */
2150
+ drugs: PrescriptionDrug[];
2151
+ /** Number of refills remaining */
2152
+ refillsRemaining?: number;
2153
+ /** Status of the prescription */
2154
+ status?: 'active' | 'expired' | 'dispensed';
2155
+ /** Whether prescription has been dispensed / fulfilled */
2156
+ isDispensed?: boolean;
2157
+ /** Brand color scheme */
2158
+ colorScheme?: 'blue' | 'purple';
2159
+ /** Download / print action */
2160
+ onDownload?: () => void;
2161
+ }
2162
+
2163
+ export declare interface PrescriptionDrug {
2164
+ /** Drug name e.g. "Amoxicillin" */
2165
+ name: string;
2166
+ /** Dosage e.g. "500mg" */
2167
+ dosage: string;
2168
+ /** Frequency e.g. "Twice daily" */
2169
+ frequency: string;
2170
+ /** Duration e.g. "7 days" */
2171
+ duration?: string;
2172
+ /** Additional instructions e.g. "Take with food" */
2173
+ instructions?: string;
2174
+ }
2175
+
1942
2176
  /**
1943
2177
  * MedixDeck Progress / ProgressBar
1944
2178
  *
@@ -2669,6 +2903,64 @@ export declare interface TagsInputProps {
2669
2903
 
2670
2904
  export declare type TagVariant = 'solid' | 'subtle' | 'outline';
2671
2905
 
2906
+ /**
2907
+ * MedixDeck TelehealthCallBar
2908
+ *
2909
+ * Floating control bar for active telehealth video consultations.
2910
+ * Displays participant info, call duration, and media control actions.
2911
+ * Integrates MedixDeck semantic tokens for seamless light and dark mode support.
2912
+ *
2913
+ * @example
2914
+ * ```tsx
2915
+ * <TelehealthCallBar
2916
+ * variant="adaptive"
2917
+ * participantName="Dr. Amaka Okonkwo"
2918
+ * participantRole="General Practitioner"
2919
+ * duration="04:32"
2920
+ * isMuted={muted}
2921
+ * isCameraOff={cameraOff}
2922
+ * onToggleMute={() => setMuted(m => !m)}
2923
+ * onToggleCamera={() => setCameraOff(c => !c)}
2924
+ * onEndCall={handleEndCall}
2925
+ * />
2926
+ * ```
2927
+ */
2928
+ export declare function TelehealthCallBar({ participantName, participantRole, participantAvatar, duration, isMuted, isCameraOff, isSharingScreen, onToggleMute, onToggleCamera, onEndCall, onShareScreen, position, variant, ...props }: TelehealthCallBarProps): JSX_2.Element;
2929
+
2930
+ export declare interface TelehealthCallBarProps extends Omit<BoxProps, 'onChange'> {
2931
+ /** Name of the other participant (doctor or patient) */
2932
+ participantName: string;
2933
+ /** Participant's specialty or role label */
2934
+ participantRole?: string;
2935
+ /** Participant's avatar URL */
2936
+ participantAvatar?: string;
2937
+ /** Live call duration display string e.g. "04:32" */
2938
+ duration?: string;
2939
+ /** Whether local mic is muted */
2940
+ isMuted?: boolean;
2941
+ /** Whether local camera is off */
2942
+ isCameraOff?: boolean;
2943
+ /** Called when mute/unmute pressed */
2944
+ onToggleMute?: () => void;
2945
+ /** Called when camera on/off pressed */
2946
+ onToggleCamera?: () => void;
2947
+ /** Called when end call pressed */
2948
+ onEndCall?: () => void;
2949
+ /** Called when share screen pressed */
2950
+ onShareScreen?: () => void;
2951
+ /** Whether screen sharing is active */
2952
+ isSharingScreen?: boolean;
2953
+ /** Position of the bar */
2954
+ position?: 'bottom' | 'top';
2955
+ /**
2956
+ * Color scheme variant:
2957
+ * - `'adaptive'` (default): Seamlessly adapts to MedixDeck light and dark mode tokens.
2958
+ * - `'dark'`: Enforces classic dark glassmorphic styling for floating call overlays over video feeds.
2959
+ * @default "adaptive"
2960
+ */
2961
+ variant?: 'adaptive' | 'dark';
2962
+ }
2963
+
2672
2964
  /**
2673
2965
  * MedixDeck TestimonialCard
2674
2966
  */
@@ -2804,6 +3096,31 @@ export declare type ThemeMode = 'light' | 'dark';
2804
3096
 
2805
3097
  export declare type ThemeModeSetting = ThemeMode | 'system';
2806
3098
 
3099
+ export declare interface TimelineEvent {
3100
+ /** Unique ID for the event */
3101
+ id: string;
3102
+ /** Event type — controls icon and color */
3103
+ type: TimelineEventType;
3104
+ /** Primary event title */
3105
+ title: string;
3106
+ /** Secondary description or summary */
3107
+ description?: string;
3108
+ /** Date/time display string */
3109
+ date: string;
3110
+ /** Optional provider / actor name */
3111
+ provider?: string;
3112
+ /** Optional badge label e.g. "Completed", "Pending" */
3113
+ badgeLabel?: string;
3114
+ /** Badge status for color */
3115
+ badgeStatus?: 'success' | 'warning' | 'error' | 'info' | 'neutral';
3116
+ /** Custom icon override (React node) */
3117
+ icon?: default_2.ReactNode;
3118
+ /** Click handler for event drill-down */
3119
+ onClick?: () => void;
3120
+ }
3121
+
3122
+ export declare type TimelineEventType = 'consultation' | 'lab' | 'prescription' | 'vitals' | 'note' | 'admission' | 'discharge' | 'custom';
3123
+
2807
3124
  export declare const toast: ((options: ToastOptions) => string) & {
2808
3125
  success: (title: string, options?: Partial<ToastOptions>) => string;
2809
3126
  error: (title: string, options?: Partial<ToastOptions>) => string;
@@ -2865,6 +3182,9 @@ export declare interface ToolbarOptions {
2865
3182
  * MedixDeck Tooltip
2866
3183
  *
2867
3184
  * Hover label for icons, truncated text, and contextual hints.
3185
+ * On touch / mobile devices, tapping the trigger toggles the tooltip open
3186
+ * and an outside tap dismisses it — ensuring the content is always accessible
3187
+ * without relying on hover events.
2868
3188
  *
2869
3189
  * @example
2870
3190
  * ```tsx
@@ -3070,52 +3390,26 @@ export declare interface UseColorSchemeResult {
3070
3390
 
3071
3391
  /**
3072
3392
  * Convenience hook for checking whether the active MedixDeck theme is dark.
3073
- *
3074
- * Returns `false` until the component has mounted and `next-themes` has had a
3075
- * chance to resolve the active theme. This avoids reporting light mode during
3076
- * SSR or initial hydration when the resolved client theme is actually dark.
3077
3393
  */
3078
3394
  export declare function useIsDarkMode(): boolean;
3079
3395
 
3080
3396
  /**
3081
3397
  * Accesses the current MedixDeck theme mode and helpers for updating it.
3082
- *
3083
- * In SSR environments (e.g. Next.js), `next-themes` resolves the theme after
3084
- * hydration. Gate any theme-dependent UI on `mounted` to avoid hydration
3085
- * mismatches and flicker. In Next.js App Router, this hook must be called
3086
- * inside a `"use client"` component.
3087
- *
3088
- * @example
3089
- * ```tsx
3090
- * // Avoid hydration mismatch: render theme-dependent UI only after mount.
3091
- * const { mounted, themeMode, toggleThemeMode } = useThemeMode();
3092
- *
3093
- * if (!mounted) return null;
3094
- *
3095
- * return (
3096
- * <button onClick={toggleThemeMode}>
3097
- * Switch to {themeMode === "dark" ? "light" : "dark"} mode
3098
- * </button>
3099
- * );
3100
- * ```
3101
3398
  */
3102
3399
  export declare function useThemeMode(): UseThemeModeResult;
3103
3400
 
3104
3401
  export declare interface UseThemeModeResult {
3105
3402
  /**
3106
3403
  * Indicates whether the hook has mounted on the client.
3107
- * Primarily useful for avoiding SSR hydration mismatches with `next-themes`.
3404
+ * Useful for avoiding SSR hydration mismatches with `next-themes`.
3108
3405
  */
3109
3406
  mounted: boolean;
3110
3407
  /**
3111
- * The currently resolved theme mode.
3112
- * Falls back to `"light"` before client-side theme values are available.
3408
+ * The currently resolved theme mode ('light' or 'dark').
3113
3409
  */
3114
3410
  themeMode: ThemeMode;
3115
3411
  /**
3116
- * The user's current theme preference (`"light"`, `"dark"`, or `"system"`).
3117
- * Defaults to `"system"` before client-side hydration or when the provider
3118
- * returns an unrecognised value (e.g. outside a `MedixProvider`).
3412
+ * The user's current theme preference ('light', 'dark', or 'system').
3119
3413
  */
3120
3414
  themeSetting: ThemeModeSetting;
3121
3415
  /**
@@ -3123,7 +3417,7 @@ export declare interface UseThemeModeResult {
3123
3417
  */
3124
3418
  setThemeMode: (mode: ThemeModeSetting) => void;
3125
3419
  /**
3126
- * Toggles between `"light"` and `"dark"` modes.
3420
+ * Toggles between 'light' and 'dark' modes.
3127
3421
  */
3128
3422
  toggleThemeMode: () => void;
3129
3423
  }