@medixdeck/ui 0.1.13 → 0.1.14
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 +54 -2
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +125 -28
- package/dist/index.js +4768 -4520
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -26,23 +26,9 @@ import { VStack } from '@chakra-ui/react';
|
|
|
26
26
|
import { Wrap } from '@chakra-ui/react';
|
|
27
27
|
import { WrapItem } from '@chakra-ui/react';
|
|
28
28
|
|
|
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;
|
|
29
|
+
export declare function Accordion({ items, allowMultiple, defaultOpenIds, colorScheme, ...props }: AccordionProps): JSX_2.Element;
|
|
30
|
+
|
|
31
|
+
export declare type AccordionColorScheme = "blue" | "purple";
|
|
46
32
|
|
|
47
33
|
export declare interface AccordionItem {
|
|
48
34
|
id: string;
|
|
@@ -58,6 +44,11 @@ export declare interface AccordionProps extends Omit<BoxProps, "onChange"> {
|
|
|
58
44
|
allowMultiple?: boolean;
|
|
59
45
|
/** Initially open item IDs */
|
|
60
46
|
defaultOpenIds?: string[];
|
|
47
|
+
/**
|
|
48
|
+
* Brand accent applied to the open toggle icon and hover border.
|
|
49
|
+
* @default "blue"
|
|
50
|
+
*/
|
|
51
|
+
colorScheme?: AccordionColorScheme;
|
|
61
52
|
}
|
|
62
53
|
|
|
63
54
|
/**
|
|
@@ -140,9 +131,12 @@ export declare type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
|
140
131
|
*
|
|
141
132
|
* @example
|
|
142
133
|
* ```tsx
|
|
143
|
-
* <Badge status="success">Verified</Badge>
|
|
144
|
-
* <Badge status="warning" variant="subtle">Pending</Badge>
|
|
145
|
-
* <Badge status="error" variant="solid">Cancelled</Badge>
|
|
134
|
+
* <Badge rounded={true} status="success">Verified</Badge>
|
|
135
|
+
* <Badge rounded={true} status="warning" variant="subtle">Pending</Badge>
|
|
136
|
+
* <Badge rounded={true} status="error" variant="solid">Cancelled</Badge>
|
|
137
|
+
* <Badge rounded={false} status="success">Verified</Badge>
|
|
138
|
+
* <Badge rounded={false} status="warning" variant="subtle">Pending</Badge>
|
|
139
|
+
* <Badge rounded={false} status="error" variant="solid">Cancelled</Badge>
|
|
146
140
|
* ```
|
|
147
141
|
*/
|
|
148
142
|
export declare const Badge: default_2.ForwardRefExoticComponent<BadgeProps & default_2.RefAttributes<HTMLSpanElement>>;
|
|
@@ -154,6 +148,8 @@ export declare interface BadgeProps {
|
|
|
154
148
|
status?: BadgeStatus;
|
|
155
149
|
/** Size */
|
|
156
150
|
size?: BadgeSize;
|
|
151
|
+
/** Whether to apply a fully rounded (100px) pill border radius vs the standard 4px */
|
|
152
|
+
rounded?: boolean;
|
|
157
153
|
children?: default_2.ReactNode;
|
|
158
154
|
className?: string;
|
|
159
155
|
style?: default_2.CSSProperties;
|
|
@@ -184,7 +180,9 @@ export declare type BadgeVariant = "solid" | "subtle" | "outline" | "surface";
|
|
|
184
180
|
* />
|
|
185
181
|
* ```
|
|
186
182
|
*/
|
|
187
|
-
export declare function BlogCard({ title, excerpt, category, date, coverImage, href, onClick, ...props }: BlogCardProps): JSX_2.Element;
|
|
183
|
+
export declare function BlogCard({ title, excerpt, category, date, coverImage, href, onClick, colorScheme, ...props }: BlogCardProps): JSX_2.Element;
|
|
184
|
+
|
|
185
|
+
export declare type BlogCardColorScheme = "blue" | "purple";
|
|
188
186
|
|
|
189
187
|
export declare interface BlogCardProps extends Omit<BoxProps, "onClick"> {
|
|
190
188
|
/** Article headline */
|
|
@@ -210,6 +208,11 @@ export declare interface BlogCardProps extends Omit<BoxProps, "onClick"> {
|
|
|
210
208
|
href?: string;
|
|
211
209
|
/** Click handler – wraps the entire card in a <button> */
|
|
212
210
|
onClick?: () => void;
|
|
211
|
+
/**
|
|
212
|
+
* Brand accent applied to the category pill and date badge day number.
|
|
213
|
+
* @default "blue"
|
|
214
|
+
*/
|
|
215
|
+
colorScheme?: BlogCardColorScheme;
|
|
213
216
|
}
|
|
214
217
|
|
|
215
218
|
export declare interface BottomLink {
|
|
@@ -369,7 +372,7 @@ export declare const Checkbox: default_2.ForwardRefExoticComponent<CheckboxProps
|
|
|
369
372
|
|
|
370
373
|
export declare interface CheckboxProps {
|
|
371
374
|
/** Brand color for the checked state */
|
|
372
|
-
colorScheme?:
|
|
375
|
+
colorScheme?: ColorScheme_2;
|
|
373
376
|
/** Controlled checked value */
|
|
374
377
|
checked?: boolean;
|
|
375
378
|
/** Default checked (uncontrolled) */
|
|
@@ -423,9 +426,16 @@ declare const COLORS_2: {
|
|
|
423
426
|
};
|
|
424
427
|
};
|
|
425
428
|
|
|
426
|
-
|
|
429
|
+
/**
|
|
430
|
+
* The two MedixDeck brand color schemes available on themed components.
|
|
431
|
+
* - `"blue"` — Primary brand blue (#0685FF)
|
|
432
|
+
* - `"purple"` — Secondary brand purple (#7700CC)
|
|
433
|
+
*/
|
|
434
|
+
export declare type ColorScheme = "blue" | "purple";
|
|
435
|
+
|
|
436
|
+
declare type ColorScheme_2 = keyof typeof COLORS;
|
|
427
437
|
|
|
428
|
-
declare type
|
|
438
|
+
declare type ColorScheme_3 = keyof typeof COLORS_2;
|
|
429
439
|
|
|
430
440
|
/**
|
|
431
441
|
* MedixDeck Brand Color Tokens
|
|
@@ -652,6 +662,8 @@ export declare interface ContainerProps extends BoxProps {
|
|
|
652
662
|
maxWidth?: "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
653
663
|
}
|
|
654
664
|
|
|
665
|
+
export declare type DashboardColorScheme = "blue" | "purple";
|
|
666
|
+
|
|
655
667
|
export declare interface DashboardDropdownItem {
|
|
656
668
|
/** Label shown in the dropdown menu. */
|
|
657
669
|
label: string;
|
|
@@ -723,7 +735,7 @@ export declare interface DashboardDropdownItem {
|
|
|
723
735
|
* }
|
|
724
736
|
* ```
|
|
725
737
|
*/
|
|
726
|
-
export declare function DashboardLayout({ children, logo, navGroups, user, greeting, onLogout, renderLink, dropdownItems, topBarSlot, sidebarWidth, ...rest }: DashboardLayoutProps): JSX_2.Element;
|
|
738
|
+
export declare function DashboardLayout({ children, logo, navGroups, user, greeting, onLogout, renderLink, dropdownItems, topBarSlot, sidebarWidth, colorScheme, ...rest }: DashboardLayoutProps): JSX_2.Element;
|
|
727
739
|
|
|
728
740
|
export declare namespace DashboardLayout {
|
|
729
741
|
var displayName: string;
|
|
@@ -789,6 +801,12 @@ export declare interface DashboardLayoutProps extends Omit<BoxProps, "children">
|
|
|
789
801
|
* @default 220
|
|
790
802
|
*/
|
|
791
803
|
sidebarWidth?: number;
|
|
804
|
+
/**
|
|
805
|
+
* Brand accent applied to active nav items, logo, badge backgrounds, and the
|
|
806
|
+
* theme toggle active state.
|
|
807
|
+
* @default "blue"
|
|
808
|
+
*/
|
|
809
|
+
colorScheme?: DashboardColorScheme;
|
|
792
810
|
}
|
|
793
811
|
|
|
794
812
|
export declare interface DashboardNavGroup {
|
|
@@ -811,6 +829,8 @@ export declare interface DashboardNavItem {
|
|
|
811
829
|
hasDot?: boolean;
|
|
812
830
|
/** Mark this item as the currently active route. */
|
|
813
831
|
isActive?: boolean;
|
|
832
|
+
/** Optional nested sub-items (creates an expandable dropdown accordion). */
|
|
833
|
+
subItems?: DashboardNavItem[];
|
|
814
834
|
}
|
|
815
835
|
|
|
816
836
|
export declare interface DashboardUser {
|
|
@@ -1112,12 +1132,14 @@ export { Flex }
|
|
|
1112
1132
|
* />
|
|
1113
1133
|
* ```
|
|
1114
1134
|
*/
|
|
1115
|
-
export declare function Footer({ description, logo, sections, socialLinks, copyright, bottomLinks, newsletter, renderLink, ...props }: FooterProps): JSX_2.Element;
|
|
1135
|
+
export declare function Footer({ description, logo, sections, socialLinks, copyright, bottomLinks, newsletter, renderLink, colorScheme, ...props }: FooterProps): JSX_2.Element;
|
|
1116
1136
|
|
|
1117
1137
|
export declare namespace Footer {
|
|
1118
1138
|
var displayName: string;
|
|
1119
1139
|
}
|
|
1120
1140
|
|
|
1141
|
+
export declare type FooterColorScheme = "blue" | "purple";
|
|
1142
|
+
|
|
1121
1143
|
export declare interface FooterLink {
|
|
1122
1144
|
label: string;
|
|
1123
1145
|
href: string;
|
|
@@ -1144,6 +1166,11 @@ export declare interface FooterProps extends Omit<BoxProps, "children"> {
|
|
|
1144
1166
|
href: string;
|
|
1145
1167
|
isExternal?: boolean;
|
|
1146
1168
|
}, children: default_2.ReactNode) => default_2.ReactNode;
|
|
1169
|
+
/**
|
|
1170
|
+
* Brand accent applied to logo, social icons, newsletter button, and link hover states.
|
|
1171
|
+
* @default "blue"
|
|
1172
|
+
*/
|
|
1173
|
+
colorScheme?: FooterColorScheme;
|
|
1147
1174
|
}
|
|
1148
1175
|
|
|
1149
1176
|
export declare interface FooterSection {
|
|
@@ -1469,7 +1496,9 @@ export declare type ModalSize = "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
|
1469
1496
|
* />
|
|
1470
1497
|
* ```
|
|
1471
1498
|
*/
|
|
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;
|
|
1499
|
+
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;
|
|
1500
|
+
|
|
1501
|
+
export declare type NavbarColorScheme = "blue" | "purple";
|
|
1473
1502
|
|
|
1474
1503
|
export declare interface NavbarProps extends Omit<BoxProps, "children"> {
|
|
1475
1504
|
/** Logo element. Defaults to `<Logo />` when omitted. */
|
|
@@ -1540,6 +1569,11 @@ export declare interface NavbarProps extends Omit<BoxProps, "children"> {
|
|
|
1540
1569
|
* ```
|
|
1541
1570
|
*/
|
|
1542
1571
|
ctaSlot?: default_2.ReactNode;
|
|
1572
|
+
/**
|
|
1573
|
+
* Brand color scheme applied to CTAs, active links, and mobile icon accents.
|
|
1574
|
+
* @default "blue"
|
|
1575
|
+
*/
|
|
1576
|
+
colorScheme?: NavbarColorScheme;
|
|
1543
1577
|
/** Pin the navbar to the top of the viewport. */
|
|
1544
1578
|
isSticky?: boolean;
|
|
1545
1579
|
/**
|
|
@@ -2140,7 +2174,7 @@ export declare const Switch: default_2.ForwardRefExoticComponent<SwitchProps & d
|
|
|
2140
2174
|
|
|
2141
2175
|
export declare interface SwitchProps {
|
|
2142
2176
|
/** Brand color for the on state */
|
|
2143
|
-
colorScheme?:
|
|
2177
|
+
colorScheme?: ColorScheme_3;
|
|
2144
2178
|
size?: "sm" | "md" | "lg";
|
|
2145
2179
|
/** Controlled checked value */
|
|
2146
2180
|
checked?: boolean;
|
|
@@ -2503,6 +2537,69 @@ export declare const typographyTokens: {
|
|
|
2503
2537
|
};
|
|
2504
2538
|
};
|
|
2505
2539
|
|
|
2540
|
+
/**
|
|
2541
|
+
* Manages the active MedixDeck brand color scheme for themed components such
|
|
2542
|
+
* as `Navbar`, `Footer`, `Accordion`, and `BlogCard`.
|
|
2543
|
+
*
|
|
2544
|
+
* Initialises to `"blue"` by default, or to the `initialScheme` you pass in.
|
|
2545
|
+
* The returned `setColorScheme` and `toggleColorScheme` helpers let you update
|
|
2546
|
+
* it at any time — the new value propagates down through whatever you pass it
|
|
2547
|
+
* to via the component's `colorScheme` prop.
|
|
2548
|
+
*
|
|
2549
|
+
* @param initialScheme - Starting scheme. Defaults to `"blue"`.
|
|
2550
|
+
*
|
|
2551
|
+
* @example
|
|
2552
|
+
* ```tsx
|
|
2553
|
+
* // Basic — bind to a single component
|
|
2554
|
+
* const { colorScheme, toggleColorScheme } = useColorScheme();
|
|
2555
|
+
*
|
|
2556
|
+
* return (
|
|
2557
|
+
* <>
|
|
2558
|
+
* <button onClick={toggleColorScheme}>Switch scheme</button>
|
|
2559
|
+
* <Navbar colorScheme={colorScheme} navItems={[...]} />
|
|
2560
|
+
* </>
|
|
2561
|
+
* );
|
|
2562
|
+
* ```
|
|
2563
|
+
*
|
|
2564
|
+
* @example
|
|
2565
|
+
* ```tsx
|
|
2566
|
+
* // Start purple; share across multiple components
|
|
2567
|
+
* const { colorScheme, setColorScheme } = useColorScheme("purple");
|
|
2568
|
+
*
|
|
2569
|
+
* return (
|
|
2570
|
+
* <>
|
|
2571
|
+
* <Navbar colorScheme={colorScheme} navItems={[...]} />
|
|
2572
|
+
* <Accordion colorScheme={colorScheme} items={[...]} />
|
|
2573
|
+
* <Footer colorScheme={colorScheme} />
|
|
2574
|
+
* </>
|
|
2575
|
+
* );
|
|
2576
|
+
* ```
|
|
2577
|
+
*/
|
|
2578
|
+
export declare function useColorScheme(initialScheme?: ColorScheme): UseColorSchemeResult;
|
|
2579
|
+
|
|
2580
|
+
export declare interface UseColorSchemeResult {
|
|
2581
|
+
/**
|
|
2582
|
+
* The currently active color scheme.
|
|
2583
|
+
*/
|
|
2584
|
+
colorScheme: ColorScheme;
|
|
2585
|
+
/**
|
|
2586
|
+
* Explicitly set the active color scheme.
|
|
2587
|
+
*/
|
|
2588
|
+
setColorScheme: (scheme: ColorScheme) => void;
|
|
2589
|
+
/**
|
|
2590
|
+
* Toggle between `"blue"` and `"purple"`.
|
|
2591
|
+
*/
|
|
2592
|
+
toggleColorScheme: () => void;
|
|
2593
|
+
/**
|
|
2594
|
+
* `true` when the active scheme is `"blue"`.
|
|
2595
|
+
*/
|
|
2596
|
+
isBlue: boolean;
|
|
2597
|
+
/**
|
|
2598
|
+
* `true` when the active scheme is `"purple"`.
|
|
2599
|
+
*/
|
|
2600
|
+
isPurple: boolean;
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2506
2603
|
/**
|
|
2507
2604
|
* Convenience hook for checking whether the active MedixDeck theme is dark.
|
|
2508
2605
|
*
|