@medixdeck/ui 0.1.13 → 0.1.15
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 +207 -3
- package/dist/index.cjs +57 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +350 -40
- package/dist/index.js +5694 -4247
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Box } from '@chakra-ui/react';
|
|
|
3
3
|
import { BoxProps } from '@chakra-ui/react';
|
|
4
4
|
import { Center } from '@chakra-ui/react';
|
|
5
5
|
import { default as default_2 } from 'react';
|
|
6
|
+
import { default as default_3 } from 'react-cookie-consent';
|
|
6
7
|
import { Flex } from '@chakra-ui/react';
|
|
7
8
|
import { Grid } from '@chakra-ui/react';
|
|
8
9
|
import { GridItem } from '@chakra-ui/react';
|
|
@@ -26,23 +27,9 @@ import { VStack } from '@chakra-ui/react';
|
|
|
26
27
|
import { Wrap } from '@chakra-ui/react';
|
|
27
28
|
import { WrapItem } from '@chakra-ui/react';
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
* Each item is a rounded card. Closed state shows an outlined "+" circle;
|
|
33
|
-
* open state shows a filled blue "−" circle. Matches the MedixDeck FAQ design.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```tsx
|
|
37
|
-
* <Accordion
|
|
38
|
-
* items={[
|
|
39
|
-
* { id: "q1", question: "What is MedixDeck?", answer: "…" },
|
|
40
|
-
* { id: "q2", question: "Are the doctors qualified?", answer: "…" },
|
|
41
|
-
* ]}
|
|
42
|
-
* />
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare function Accordion({ items, allowMultiple, defaultOpenIds, ...props }: AccordionProps): JSX_2.Element;
|
|
30
|
+
export declare function Accordion({ items, allowMultiple, defaultOpenIds, colorScheme, ...props }: AccordionProps): JSX_2.Element;
|
|
31
|
+
|
|
32
|
+
export declare type AccordionColorScheme = "blue" | "purple";
|
|
46
33
|
|
|
47
34
|
export declare interface AccordionItem {
|
|
48
35
|
id: string;
|
|
@@ -58,6 +45,11 @@ export declare interface AccordionProps extends Omit<BoxProps, "onChange"> {
|
|
|
58
45
|
allowMultiple?: boolean;
|
|
59
46
|
/** Initially open item IDs */
|
|
60
47
|
defaultOpenIds?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Brand accent applied to the open toggle icon and hover border.
|
|
50
|
+
* @default "blue"
|
|
51
|
+
*/
|
|
52
|
+
colorScheme?: AccordionColorScheme;
|
|
61
53
|
}
|
|
62
54
|
|
|
63
55
|
/**
|
|
@@ -140,9 +132,12 @@ export declare type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
|
140
132
|
*
|
|
141
133
|
* @example
|
|
142
134
|
* ```tsx
|
|
143
|
-
* <Badge status="success">Verified</Badge>
|
|
144
|
-
* <Badge status="warning" variant="subtle">Pending</Badge>
|
|
145
|
-
* <Badge status="error" variant="solid">Cancelled</Badge>
|
|
135
|
+
* <Badge rounded={true} status="success">Verified</Badge>
|
|
136
|
+
* <Badge rounded={true} status="warning" variant="subtle">Pending</Badge>
|
|
137
|
+
* <Badge rounded={true} status="error" variant="solid">Cancelled</Badge>
|
|
138
|
+
* <Badge rounded={false} status="success">Verified</Badge>
|
|
139
|
+
* <Badge rounded={false} status="warning" variant="subtle">Pending</Badge>
|
|
140
|
+
* <Badge rounded={false} status="error" variant="solid">Cancelled</Badge>
|
|
146
141
|
* ```
|
|
147
142
|
*/
|
|
148
143
|
export declare const Badge: default_2.ForwardRefExoticComponent<BadgeProps & default_2.RefAttributes<HTMLSpanElement>>;
|
|
@@ -154,6 +149,8 @@ export declare interface BadgeProps {
|
|
|
154
149
|
status?: BadgeStatus;
|
|
155
150
|
/** Size */
|
|
156
151
|
size?: BadgeSize;
|
|
152
|
+
/** Whether to apply a fully rounded (100px) pill border radius vs the standard 4px */
|
|
153
|
+
rounded?: boolean;
|
|
157
154
|
children?: default_2.ReactNode;
|
|
158
155
|
className?: string;
|
|
159
156
|
style?: default_2.CSSProperties;
|
|
@@ -184,7 +181,9 @@ export declare type BadgeVariant = "solid" | "subtle" | "outline" | "surface";
|
|
|
184
181
|
* />
|
|
185
182
|
* ```
|
|
186
183
|
*/
|
|
187
|
-
export declare function BlogCard({ title, excerpt, category, date, coverImage, href, onClick, ...props }: BlogCardProps): JSX_2.Element;
|
|
184
|
+
export declare function BlogCard({ title, excerpt, category, date, coverImage, href, onClick, colorScheme, ...props }: BlogCardProps): JSX_2.Element;
|
|
185
|
+
|
|
186
|
+
export declare type BlogCardColorScheme = "blue" | "purple";
|
|
188
187
|
|
|
189
188
|
export declare interface BlogCardProps extends Omit<BoxProps, "onClick"> {
|
|
190
189
|
/** Article headline */
|
|
@@ -210,6 +209,11 @@ export declare interface BlogCardProps extends Omit<BoxProps, "onClick"> {
|
|
|
210
209
|
href?: string;
|
|
211
210
|
/** Click handler – wraps the entire card in a <button> */
|
|
212
211
|
onClick?: () => void;
|
|
212
|
+
/**
|
|
213
|
+
* Brand accent applied to the category pill and date badge day number.
|
|
214
|
+
* @default "blue"
|
|
215
|
+
*/
|
|
216
|
+
colorScheme?: BlogCardColorScheme;
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
export declare interface BottomLink {
|
|
@@ -369,7 +373,7 @@ export declare const Checkbox: default_2.ForwardRefExoticComponent<CheckboxProps
|
|
|
369
373
|
|
|
370
374
|
export declare interface CheckboxProps {
|
|
371
375
|
/** Brand color for the checked state */
|
|
372
|
-
colorScheme?:
|
|
376
|
+
colorScheme?: ColorScheme_2;
|
|
373
377
|
/** Controlled checked value */
|
|
374
378
|
checked?: boolean;
|
|
375
379
|
/** Default checked (uncontrolled) */
|
|
@@ -423,9 +427,16 @@ declare const COLORS_2: {
|
|
|
423
427
|
};
|
|
424
428
|
};
|
|
425
429
|
|
|
426
|
-
|
|
430
|
+
/**
|
|
431
|
+
* The two MedixDeck brand color schemes available on themed components.
|
|
432
|
+
* - `"blue"` — Primary brand blue (#0685FF)
|
|
433
|
+
* - `"purple"` — Secondary brand purple (#7700CC)
|
|
434
|
+
*/
|
|
435
|
+
export declare type ColorScheme = "blue" | "purple";
|
|
427
436
|
|
|
428
|
-
declare type ColorScheme_2 = keyof typeof
|
|
437
|
+
declare type ColorScheme_2 = keyof typeof COLORS;
|
|
438
|
+
|
|
439
|
+
declare type ColorScheme_3 = keyof typeof COLORS_2;
|
|
429
440
|
|
|
430
441
|
/**
|
|
431
442
|
* MedixDeck Brand Color Tokens
|
|
@@ -652,6 +663,37 @@ export declare interface ContainerProps extends BoxProps {
|
|
|
652
663
|
maxWidth?: "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
653
664
|
}
|
|
654
665
|
|
|
666
|
+
/**
|
|
667
|
+
* MedixDeck CookieConsentBanner
|
|
668
|
+
*
|
|
669
|
+
* A GDPR/NDPR compliant cookie consent banner powered by react-cookie-consent.
|
|
670
|
+
*
|
|
671
|
+
* @example
|
|
672
|
+
* ```tsx
|
|
673
|
+
* <CookieConsentBanner />
|
|
674
|
+
* ```
|
|
675
|
+
*/
|
|
676
|
+
export declare function CookieConsentBanner({ title, acceptText, declineText, enableDeclineButton, children, ...props }: CookieConsentBannerProps): JSX_2.Element;
|
|
677
|
+
|
|
678
|
+
export declare namespace CookieConsentBanner {
|
|
679
|
+
var displayName: string;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export declare interface CookieConsentBannerProps extends Omit<CookieConsentComponentProps, "style" | "buttonStyle" | "declineButtonStyle" | "contentStyle"> {
|
|
683
|
+
/** Optional custom title for the banner */
|
|
684
|
+
title?: string;
|
|
685
|
+
/** Custom text for accept button. Defaults to "Accept All" */
|
|
686
|
+
acceptText?: string;
|
|
687
|
+
/** Custom text for decline button. Defaults to "Reject Non-Essential" */
|
|
688
|
+
declineText?: string;
|
|
689
|
+
/** Enables the decline button. Defaults to true for compliance. */
|
|
690
|
+
enableDeclineButton?: boolean;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
declare type CookieConsentComponentProps = default_2.ComponentProps<typeof default_3>;
|
|
694
|
+
|
|
695
|
+
export declare type DashboardColorScheme = "blue" | "purple";
|
|
696
|
+
|
|
655
697
|
export declare interface DashboardDropdownItem {
|
|
656
698
|
/** Label shown in the dropdown menu. */
|
|
657
699
|
label: string;
|
|
@@ -723,7 +765,7 @@ export declare interface DashboardDropdownItem {
|
|
|
723
765
|
* }
|
|
724
766
|
* ```
|
|
725
767
|
*/
|
|
726
|
-
export declare function DashboardLayout({ children, logo, navGroups, user, greeting, onLogout, renderLink, dropdownItems, topBarSlot, sidebarWidth, ...rest }: DashboardLayoutProps): JSX_2.Element;
|
|
768
|
+
export declare function DashboardLayout({ children, logo, navGroups, user, greeting, greetingSubtext, onLogout, renderLink, dropdownItems, topBarSlot, sidebarWidth, colorScheme, mobileNavItems, scoreCard, ...rest }: DashboardLayoutProps): JSX_2.Element;
|
|
727
769
|
|
|
728
770
|
export declare namespace DashboardLayout {
|
|
729
771
|
var displayName: string;
|
|
@@ -758,6 +800,17 @@ export declare interface DashboardLayoutProps extends Omit<BoxProps, "children">
|
|
|
758
800
|
* @example greeting="Welcome back"
|
|
759
801
|
*/
|
|
760
802
|
greeting?: string;
|
|
803
|
+
/**
|
|
804
|
+
* Optional subtitle rendered below the greeting in the top bar.
|
|
805
|
+
* Use it to surface contextual info like the date or a daily summary.
|
|
806
|
+
* Note: The top bar height remains fixed at 64px (`h="16"`) even when the subtitle is present.
|
|
807
|
+
*
|
|
808
|
+
* @example
|
|
809
|
+
* ```tsx
|
|
810
|
+
* greetingSubtext="Thursday, 15 May 2026 · 8 consultations scheduled today"
|
|
811
|
+
* ```
|
|
812
|
+
*/
|
|
813
|
+
greetingSubtext?: string;
|
|
761
814
|
/** Called when the sidebar logout button is clicked. */
|
|
762
815
|
onLogout?: () => void;
|
|
763
816
|
/**
|
|
@@ -789,6 +842,61 @@ export declare interface DashboardLayoutProps extends Omit<BoxProps, "children">
|
|
|
789
842
|
* @default 220
|
|
790
843
|
*/
|
|
791
844
|
sidebarWidth?: number;
|
|
845
|
+
/**
|
|
846
|
+
* Brand accent applied to active nav items, logo, badge backgrounds, and the
|
|
847
|
+
* theme toggle active state.
|
|
848
|
+
* @default "blue"
|
|
849
|
+
*/
|
|
850
|
+
colorScheme?: DashboardColorScheme;
|
|
851
|
+
/**
|
|
852
|
+
* Optional flat list of up to 5 items for the mobile bottom navigation bar.
|
|
853
|
+
* When provided, a fixed bottom tab bar is shown on mobile (hidden on md+).
|
|
854
|
+
* Each item requires an `icon` and a `label`. Set `isActive` on the current
|
|
855
|
+
* route's item to highlight it.
|
|
856
|
+
*
|
|
857
|
+
* The same `renderLink` prop is used to wrap each tab, so router integration
|
|
858
|
+
* works out-of-the-box.
|
|
859
|
+
*
|
|
860
|
+
* @example
|
|
861
|
+
* ```tsx
|
|
862
|
+
* mobileNavItems={[
|
|
863
|
+
* { label: "Home", href: "/", icon: <HomeIcon />, isActive: true },
|
|
864
|
+
* { label: "Messages", href: "/messages", icon: <ChatIcon />, badge: 3 },
|
|
865
|
+
* { label: "Profile", href: "/profile", icon: <UserIcon /> },
|
|
866
|
+
* ]}
|
|
867
|
+
* ```
|
|
868
|
+
*/
|
|
869
|
+
mobileNavItems?: DashboardMobileNavItem[];
|
|
870
|
+
/**
|
|
871
|
+
* Optional doctor identity / score card shown at the top of the sidebar
|
|
872
|
+
* (desktop only). Pass this when the authenticated user is a doctor.
|
|
873
|
+
*
|
|
874
|
+
* @example
|
|
875
|
+
* ```tsx
|
|
876
|
+
* scoreCard={{
|
|
877
|
+
* name: "Okedi Williams",
|
|
878
|
+
* role: "Cardiologist",
|
|
879
|
+
* avatarSrc: "/dr-okedi.jpg",
|
|
880
|
+
* tier: "gold",
|
|
881
|
+
* medixScore: 847,
|
|
882
|
+
* link: "/doctor/profile",
|
|
883
|
+
* }}
|
|
884
|
+
* ```
|
|
885
|
+
*/
|
|
886
|
+
scoreCard?: DashboardScoreCardData;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
export declare interface DashboardMobileNavItem {
|
|
890
|
+
/** Label shown below the icon in the mobile bottom bar. */
|
|
891
|
+
label: string;
|
|
892
|
+
/** href used by `renderLink` and as a unique key. */
|
|
893
|
+
href: string;
|
|
894
|
+
/** Icon element rendered above the label (recommended: 22×22 SVG). */
|
|
895
|
+
icon: default_2.ReactNode;
|
|
896
|
+
/** Mark this tab as active. */
|
|
897
|
+
isActive?: boolean;
|
|
898
|
+
/** Numeric count badge shown on the icon (capped at 99+). */
|
|
899
|
+
badge?: number;
|
|
792
900
|
}
|
|
793
901
|
|
|
794
902
|
export declare interface DashboardNavGroup {
|
|
@@ -811,6 +919,27 @@ export declare interface DashboardNavItem {
|
|
|
811
919
|
hasDot?: boolean;
|
|
812
920
|
/** Mark this item as the currently active route. */
|
|
813
921
|
isActive?: boolean;
|
|
922
|
+
/** Optional nested sub-items (creates an expandable dropdown accordion). */
|
|
923
|
+
subItems?: DashboardNavItem[];
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* Data for the doctor identity card shown at the top of the sidebar.
|
|
928
|
+
* Only rendered when this prop is supplied — intended for doctor-role users.
|
|
929
|
+
*/
|
|
930
|
+
export declare interface DashboardScoreCardData {
|
|
931
|
+
/** Doctor's full name. */
|
|
932
|
+
name: string;
|
|
933
|
+
/** Doctor's specialty / role shown as the primary label (e.g. "Cardiologist"). */
|
|
934
|
+
role: string;
|
|
935
|
+
/** Optional avatar image URL. Falls back to initials. */
|
|
936
|
+
avatarSrc?: string;
|
|
937
|
+
/** Optional href to navigate to the doctor's profile when the card is clicked. */
|
|
938
|
+
link?: string;
|
|
939
|
+
/** Clinician tier — determines avatar ring colour and badge text colour. */
|
|
940
|
+
tier: "bronze" | "silver" | "gold" | "platinum" | "diamond";
|
|
941
|
+
/** Numeric MedixScore displayed next to the tier label. */
|
|
942
|
+
medixScore: number;
|
|
814
943
|
}
|
|
815
944
|
|
|
816
945
|
export declare interface DashboardUser {
|
|
@@ -1112,12 +1241,25 @@ export { Flex }
|
|
|
1112
1241
|
* />
|
|
1113
1242
|
* ```
|
|
1114
1243
|
*/
|
|
1115
|
-
export declare function Footer({ description, logo, sections, socialLinks, copyright, bottomLinks, newsletter, renderLink, ...props }: FooterProps): JSX_2.Element;
|
|
1244
|
+
export declare function Footer({ description, logo, sections, socialLinks, copyright, bottomLinks, newsletter, renderLink, colorScheme, certifications, ...props }: FooterProps): JSX_2.Element;
|
|
1116
1245
|
|
|
1117
1246
|
export declare namespace Footer {
|
|
1118
1247
|
var displayName: string;
|
|
1119
1248
|
}
|
|
1120
1249
|
|
|
1250
|
+
export declare interface FooterCertification {
|
|
1251
|
+
/** Certification name displayed alongside the badge (e.g. "NDPR Compliant"). */
|
|
1252
|
+
name: string;
|
|
1253
|
+
/** Optional URL to a verification or info page. */
|
|
1254
|
+
href?: string;
|
|
1255
|
+
/** Open the link in a new tab. @default true */
|
|
1256
|
+
isExternal?: boolean;
|
|
1257
|
+
/** Badge/logo image URL. When omitted a generic shield icon is rendered. */
|
|
1258
|
+
imageSrc?: string;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
export declare type FooterColorScheme = "blue" | "purple";
|
|
1262
|
+
|
|
1121
1263
|
export declare interface FooterLink {
|
|
1122
1264
|
label: string;
|
|
1123
1265
|
href: string;
|
|
@@ -1133,7 +1275,7 @@ export declare interface FooterProps extends Omit<BoxProps, "children"> {
|
|
|
1133
1275
|
sections?: FooterSection[];
|
|
1134
1276
|
/** Social media links */
|
|
1135
1277
|
socialLinks?: SocialLink[];
|
|
1136
|
-
/** Copyright text. Defaults to "© {year} MedixDeck
|
|
1278
|
+
/** Copyright text. Defaults to "© {year} MedixDeck Health Solution Ltd. All Rights Reserved." */
|
|
1137
1279
|
copyright?: string;
|
|
1138
1280
|
/** Links at the bottom right corner */
|
|
1139
1281
|
bottomLinks?: BottomLink[];
|
|
@@ -1144,6 +1286,25 @@ export declare interface FooterProps extends Omit<BoxProps, "children"> {
|
|
|
1144
1286
|
href: string;
|
|
1145
1287
|
isExternal?: boolean;
|
|
1146
1288
|
}, children: default_2.ReactNode) => default_2.ReactNode;
|
|
1289
|
+
/**
|
|
1290
|
+
* Brand accent applied to logo, social icons, newsletter button, and link hover states.
|
|
1291
|
+
* @default "blue"
|
|
1292
|
+
*/
|
|
1293
|
+
colorScheme?: FooterColorScheme;
|
|
1294
|
+
/**
|
|
1295
|
+
* Compliance certifications displayed in a horizontal row above the copyright bar.
|
|
1296
|
+
* Each item shows a badge image (or a fallback shield icon) + certification name.
|
|
1297
|
+
*
|
|
1298
|
+
* @example
|
|
1299
|
+
* ```tsx
|
|
1300
|
+
* certifications={[
|
|
1301
|
+
* { name: "NDPR Compliant", imageSrc: "/badges/ndpr.png", href: "https://nitda.gov.ng/ndpr" },
|
|
1302
|
+
* { name: "ISO 27001", imageSrc: "/badges/iso.png" },
|
|
1303
|
+
* { name: "MDCN Certified", href: "https://mdcn.gov.ng" },
|
|
1304
|
+
* ]}
|
|
1305
|
+
* ```
|
|
1306
|
+
*/
|
|
1307
|
+
certifications?: FooterCertification[];
|
|
1147
1308
|
}
|
|
1148
1309
|
|
|
1149
1310
|
export declare interface FooterSection {
|
|
@@ -1469,7 +1630,9 @@ export declare type ModalSize = "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
|
1469
1630
|
* />
|
|
1470
1631
|
* ```
|
|
1471
1632
|
*/
|
|
1472
|
-
export declare function Navbar({ logo, navItems, navItemsAlign, ctaLabel, ctaHref, onCtaClick, ctaIconHref, onCtaIconClick, secondaryCtaLabel, secondaryCtaHref, onSecondaryCtaClick, ctaSlot, renderLink, isSticky, variant, ...props }: NavbarProps): JSX_2.Element;
|
|
1633
|
+
export declare function Navbar({ logo, navItems, navItemsAlign, ctaLabel, ctaHref, onCtaClick, ctaIconHref, onCtaIconClick, secondaryCtaLabel, secondaryCtaHref, onSecondaryCtaClick, ctaSlot, renderLink, isSticky, colorScheme, variant, ...props }: NavbarProps): JSX_2.Element;
|
|
1634
|
+
|
|
1635
|
+
export declare type NavbarColorScheme = "blue" | "purple";
|
|
1473
1636
|
|
|
1474
1637
|
export declare interface NavbarProps extends Omit<BoxProps, "children"> {
|
|
1475
1638
|
/** Logo element. Defaults to `<Logo />` when omitted. */
|
|
@@ -1540,6 +1703,11 @@ export declare interface NavbarProps extends Omit<BoxProps, "children"> {
|
|
|
1540
1703
|
* ```
|
|
1541
1704
|
*/
|
|
1542
1705
|
ctaSlot?: default_2.ReactNode;
|
|
1706
|
+
/**
|
|
1707
|
+
* Brand color scheme applied to CTAs, active links, and mobile icon accents.
|
|
1708
|
+
* @default "blue"
|
|
1709
|
+
*/
|
|
1710
|
+
colorScheme?: NavbarColorScheme;
|
|
1543
1711
|
/** Pin the navbar to the top of the viewport. */
|
|
1544
1712
|
isSticky?: boolean;
|
|
1545
1713
|
/**
|
|
@@ -1749,6 +1917,74 @@ export declare interface ProgressProps extends BoxProps {
|
|
|
1749
1917
|
isIndeterminate?: boolean;
|
|
1750
1918
|
}
|
|
1751
1919
|
|
|
1920
|
+
/**
|
|
1921
|
+
* MedixDeck PWAInstallPrompt
|
|
1922
|
+
*
|
|
1923
|
+
* A cross-platform Progressive Web App install nudge that handles both
|
|
1924
|
+
* Android/Chromium (via `beforeinstallprompt`) and iOS Safari (manual
|
|
1925
|
+
* "Add to Home Screen" instructions).
|
|
1926
|
+
*
|
|
1927
|
+
* Features:
|
|
1928
|
+
* - Respects user dismissals with a configurable cooldown (default 14 days)
|
|
1929
|
+
* - Auto-hides when the app is already in standalone / installed mode
|
|
1930
|
+
* - Smooth entrance / exit animations via Framer Motion
|
|
1931
|
+
* - Fully themed with MedixDeck design tokens
|
|
1932
|
+
*
|
|
1933
|
+
* @example
|
|
1934
|
+
* ```tsx
|
|
1935
|
+
* <PWAInstallPrompt
|
|
1936
|
+
* appName="MedixDeck"
|
|
1937
|
+
* title="Install MedixDeck"
|
|
1938
|
+
* description="Get faster access and offline support."
|
|
1939
|
+
* />
|
|
1940
|
+
* ```
|
|
1941
|
+
*/
|
|
1942
|
+
export declare function PWAInstallPrompt({ title, description, installLabel, dismissLabel, cooldownDays, onInstall, onDismiss, appName, icon, position, forceVisible, forceIOS, }: PWAInstallPromptProps): JSX_2.Element;
|
|
1943
|
+
|
|
1944
|
+
export declare namespace PWAInstallPrompt {
|
|
1945
|
+
var displayName: string;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
export declare interface PWAInstallPromptProps {
|
|
1949
|
+
/** Title of the install banner. */
|
|
1950
|
+
title?: string;
|
|
1951
|
+
/** Body message explaining why the user should install. */
|
|
1952
|
+
description?: string;
|
|
1953
|
+
/** Label for the install button. */
|
|
1954
|
+
installLabel?: string;
|
|
1955
|
+
/** Label for the dismiss button. */
|
|
1956
|
+
dismissLabel?: string;
|
|
1957
|
+
/** Number of days to suppress the prompt after dismissal. @default 14 */
|
|
1958
|
+
cooldownDays?: number;
|
|
1959
|
+
/** Callback fired when the user accepts the install. */
|
|
1960
|
+
onInstall?: () => void;
|
|
1961
|
+
/** Callback fired when the user dismisses the prompt. */
|
|
1962
|
+
onDismiss?: () => void;
|
|
1963
|
+
/**
|
|
1964
|
+
* The app name used in iOS instructions (e.g. "MedixDeck").
|
|
1965
|
+
* @default "this app"
|
|
1966
|
+
*/
|
|
1967
|
+
appName?: string;
|
|
1968
|
+
/**
|
|
1969
|
+
* Custom icon element (e.g. a `<Logo />` or an `<img />`).
|
|
1970
|
+
* When omitted, a default app icon is rendered.
|
|
1971
|
+
*/
|
|
1972
|
+
icon?: default_2.ReactNode;
|
|
1973
|
+
/**
|
|
1974
|
+
* Position of the banner on screen.
|
|
1975
|
+
* @default "bottom"
|
|
1976
|
+
*/
|
|
1977
|
+
position?: "top" | "bottom";
|
|
1978
|
+
/**
|
|
1979
|
+
* For documentation/storybook purposes. Forces the banner to be visible.
|
|
1980
|
+
*/
|
|
1981
|
+
forceVisible?: boolean;
|
|
1982
|
+
/**
|
|
1983
|
+
* For documentation/storybook purposes. Forces the iOS rendering mode.
|
|
1984
|
+
*/
|
|
1985
|
+
forceIOS?: boolean;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1752
1988
|
export declare const radiiTokens: {
|
|
1753
1989
|
readonly none: {
|
|
1754
1990
|
readonly value: "0px";
|
|
@@ -1881,6 +2117,8 @@ export declare interface SelectProps extends Omit<NativeSelectRootProps, "size">
|
|
|
1881
2117
|
errorMessage?: string;
|
|
1882
2118
|
size?: "sm" | "md" | "lg";
|
|
1883
2119
|
children?: default_2.ReactNode;
|
|
2120
|
+
/** Optional icon to render on the left side of the select field */
|
|
2121
|
+
icon?: default_2.ReactNode;
|
|
1884
2122
|
}
|
|
1885
2123
|
|
|
1886
2124
|
/**
|
|
@@ -2140,7 +2378,7 @@ export declare const Switch: default_2.ForwardRefExoticComponent<SwitchProps & d
|
|
|
2140
2378
|
|
|
2141
2379
|
export declare interface SwitchProps {
|
|
2142
2380
|
/** Brand color for the on state */
|
|
2143
|
-
colorScheme?:
|
|
2381
|
+
colorScheme?: ColorScheme_3;
|
|
2144
2382
|
size?: "sm" | "md" | "lg";
|
|
2145
2383
|
/** Controlled checked value */
|
|
2146
2384
|
checked?: boolean;
|
|
@@ -2405,6 +2643,15 @@ export declare interface TooltipProps extends Omit<TooltipRootProps, "content">
|
|
|
2405
2643
|
* MedixDeck Typography Tokens
|
|
2406
2644
|
* Font: Satoshi (from Fontshare)
|
|
2407
2645
|
* Scale derived from style guide.
|
|
2646
|
+
*
|
|
2647
|
+
* Font sizes use CSS clamp() for fluid, responsive scaling.
|
|
2648
|
+
* Formula: clamp(min-size, preferred-fluid, max-size)
|
|
2649
|
+
* - min-size : smallest the text will ever be (mobile)
|
|
2650
|
+
* - preferred : viewport-relative growth (vw + rem mix)
|
|
2651
|
+
* - max-size : largest the text will ever be (desktop)
|
|
2652
|
+
*
|
|
2653
|
+
* Consuming components automatically get responsive text by
|
|
2654
|
+
* referencing any token — no media queries needed.
|
|
2408
2655
|
*/
|
|
2409
2656
|
export declare const typographyTokens: {
|
|
2410
2657
|
readonly fonts: {
|
|
@@ -2420,37 +2667,37 @@ export declare const typographyTokens: {
|
|
|
2420
2667
|
};
|
|
2421
2668
|
readonly fontSizes: {
|
|
2422
2669
|
readonly "2xs": {
|
|
2423
|
-
readonly value: "0.625rem";
|
|
2670
|
+
readonly value: "clamp(0.5625rem, 0.5rem + 0.2vw, 0.625rem)";
|
|
2424
2671
|
};
|
|
2425
2672
|
readonly xs: {
|
|
2426
|
-
readonly value: "0.
|
|
2673
|
+
readonly value: "clamp(0.625rem, 0.5625rem + 0.25vw, 0.75rem)";
|
|
2427
2674
|
};
|
|
2428
2675
|
readonly sm: {
|
|
2429
|
-
readonly value: "0.
|
|
2676
|
+
readonly value: "clamp(0.6875rem, 0.625rem + 0.3vw, 0.8125rem)";
|
|
2430
2677
|
};
|
|
2431
2678
|
readonly md: {
|
|
2432
|
-
readonly value: "0.
|
|
2679
|
+
readonly value: "clamp(0.8125rem, 0.75rem + 0.35vw, 0.9375rem)";
|
|
2433
2680
|
};
|
|
2434
2681
|
readonly lg: {
|
|
2435
|
-
readonly value: "
|
|
2682
|
+
readonly value: "clamp(0.9375rem, 0.875rem + 0.4vw, 1.0625rem)";
|
|
2436
2683
|
};
|
|
2437
2684
|
readonly xl: {
|
|
2438
|
-
readonly value: "1.
|
|
2685
|
+
readonly value: "clamp(1rem, 0.9375rem + 0.5vw, 1.1875rem)";
|
|
2439
2686
|
};
|
|
2440
2687
|
readonly "2xl": {
|
|
2441
|
-
readonly value: "1.
|
|
2688
|
+
readonly value: "clamp(1.125rem, 1rem + 0.6vw, 1.4375rem)";
|
|
2442
2689
|
};
|
|
2443
2690
|
readonly "3xl": {
|
|
2444
|
-
readonly value: "1.
|
|
2691
|
+
readonly value: "clamp(1.25rem, 1.125rem + 0.75vw, 1.625rem)";
|
|
2445
2692
|
};
|
|
2446
2693
|
readonly "4xl": {
|
|
2447
|
-
readonly value: "1.
|
|
2694
|
+
readonly value: "clamp(1.5rem, 1.25rem + 1vw, 2rem)";
|
|
2448
2695
|
};
|
|
2449
2696
|
readonly "5xl": {
|
|
2450
|
-
readonly value: "2.
|
|
2697
|
+
readonly value: "clamp(1.75rem, 1.5rem + 1.5vw, 2.5rem)";
|
|
2451
2698
|
};
|
|
2452
2699
|
readonly "6xl": {
|
|
2453
|
-
readonly value: "3.
|
|
2700
|
+
readonly value: "clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem)";
|
|
2454
2701
|
};
|
|
2455
2702
|
};
|
|
2456
2703
|
readonly fontWeights: {
|
|
@@ -2503,6 +2750,69 @@ export declare const typographyTokens: {
|
|
|
2503
2750
|
};
|
|
2504
2751
|
};
|
|
2505
2752
|
|
|
2753
|
+
/**
|
|
2754
|
+
* Manages the active MedixDeck brand color scheme for themed components such
|
|
2755
|
+
* as `Navbar`, `Footer`, `Accordion`, and `BlogCard`.
|
|
2756
|
+
*
|
|
2757
|
+
* Initialises to `"blue"` by default, or to the `initialScheme` you pass in.
|
|
2758
|
+
* The returned `setColorScheme` and `toggleColorScheme` helpers let you update
|
|
2759
|
+
* it at any time — the new value propagates down through whatever you pass it
|
|
2760
|
+
* to via the component's `colorScheme` prop.
|
|
2761
|
+
*
|
|
2762
|
+
* @param initialScheme - Starting scheme. Defaults to `"blue"`.
|
|
2763
|
+
*
|
|
2764
|
+
* @example
|
|
2765
|
+
* ```tsx
|
|
2766
|
+
* // Basic — bind to a single component
|
|
2767
|
+
* const { colorScheme, toggleColorScheme } = useColorScheme();
|
|
2768
|
+
*
|
|
2769
|
+
* return (
|
|
2770
|
+
* <>
|
|
2771
|
+
* <button onClick={toggleColorScheme}>Switch scheme</button>
|
|
2772
|
+
* <Navbar colorScheme={colorScheme} navItems={[...]} />
|
|
2773
|
+
* </>
|
|
2774
|
+
* );
|
|
2775
|
+
* ```
|
|
2776
|
+
*
|
|
2777
|
+
* @example
|
|
2778
|
+
* ```tsx
|
|
2779
|
+
* // Start purple; share across multiple components
|
|
2780
|
+
* const { colorScheme, setColorScheme } = useColorScheme("purple");
|
|
2781
|
+
*
|
|
2782
|
+
* return (
|
|
2783
|
+
* <>
|
|
2784
|
+
* <Navbar colorScheme={colorScheme} navItems={[...]} />
|
|
2785
|
+
* <Accordion colorScheme={colorScheme} items={[...]} />
|
|
2786
|
+
* <Footer colorScheme={colorScheme} />
|
|
2787
|
+
* </>
|
|
2788
|
+
* );
|
|
2789
|
+
* ```
|
|
2790
|
+
*/
|
|
2791
|
+
export declare function useColorScheme(initialScheme?: ColorScheme): UseColorSchemeResult;
|
|
2792
|
+
|
|
2793
|
+
export declare interface UseColorSchemeResult {
|
|
2794
|
+
/**
|
|
2795
|
+
* The currently active color scheme.
|
|
2796
|
+
*/
|
|
2797
|
+
colorScheme: ColorScheme;
|
|
2798
|
+
/**
|
|
2799
|
+
* Explicitly set the active color scheme.
|
|
2800
|
+
*/
|
|
2801
|
+
setColorScheme: (scheme: ColorScheme) => void;
|
|
2802
|
+
/**
|
|
2803
|
+
* Toggle between `"blue"` and `"purple"`.
|
|
2804
|
+
*/
|
|
2805
|
+
toggleColorScheme: () => void;
|
|
2806
|
+
/**
|
|
2807
|
+
* `true` when the active scheme is `"blue"`.
|
|
2808
|
+
*/
|
|
2809
|
+
isBlue: boolean;
|
|
2810
|
+
/**
|
|
2811
|
+
* `true` when the active scheme is `"purple"`.
|
|
2812
|
+
*/
|
|
2813
|
+
isPurple: boolean;
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2506
2816
|
/**
|
|
2507
2817
|
* Convenience hook for checking whether the active MedixDeck theme is dark.
|
|
2508
2818
|
*
|