@medixdeck/ui 0.1.27 → 0.1.29
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 +8 -0
- package/dist/index.cjs +42 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +359 -55
- package/dist/index.js +5613 -4836
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ 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
|
-
export declare function Accordion({ items, allowMultiple, defaultOpenIds, colorScheme, answerType, ...props }: AccordionProps): JSX_2.Element;
|
|
29
|
+
export declare function Accordion({ items, allowMultiple, defaultOpenIds, colorScheme, answerType, haptic, disableHaptic, ...props }: AccordionProps): JSX_2.Element;
|
|
30
30
|
|
|
31
31
|
export declare type AccordionColorScheme = 'blue' | 'purple';
|
|
32
32
|
|
|
@@ -53,6 +53,10 @@ export declare interface AccordionProps extends Omit<BoxProps, 'onChange'> {
|
|
|
53
53
|
* Format of the answer string content. Default is "HTML".
|
|
54
54
|
*/
|
|
55
55
|
answerType?: 'HTML' | 'MD';
|
|
56
|
+
/** Haptic feedback intent/pattern on item toggle. Set `false` to disable. */
|
|
57
|
+
haptic?: HapticInput;
|
|
58
|
+
/** Disable haptic feedback for accordion toggles. */
|
|
59
|
+
disableHaptic?: boolean;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
/**
|
|
@@ -75,6 +79,10 @@ export declare interface AlertProps extends BoxProps {
|
|
|
75
79
|
icon?: default_2.ReactNode;
|
|
76
80
|
onClose?: () => void;
|
|
77
81
|
closable?: boolean;
|
|
82
|
+
/** Haptic feedback intent/pattern when dismissing. Set `false` to disable. */
|
|
83
|
+
haptic?: HapticInput;
|
|
84
|
+
/** Disable haptic feedback for alert dismiss action. */
|
|
85
|
+
disableHaptic?: boolean;
|
|
78
86
|
}
|
|
79
87
|
|
|
80
88
|
export declare type AlertStatus = 'info' | 'success' | 'warning' | 'error';
|
|
@@ -155,15 +163,14 @@ export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
|
155
163
|
* MedixDeck Badge
|
|
156
164
|
*
|
|
157
165
|
* Status indicator chip using exact MedixDeck brand colours.
|
|
166
|
+
* Includes a leading status dot by default for quick visual scanning.
|
|
158
167
|
*
|
|
159
168
|
* @example
|
|
160
169
|
* ```tsx
|
|
161
|
-
* <Badge rounded
|
|
162
|
-
* <Badge rounded
|
|
163
|
-
* <Badge rounded
|
|
164
|
-
* <Badge
|
|
165
|
-
* <Badge rounded={false} status="warning" variant="subtle">Pending</Badge>
|
|
166
|
-
* <Badge rounded={false} status="error" variant="solid">Cancelled</Badge>
|
|
170
|
+
* <Badge rounded status="success">Verified</Badge>
|
|
171
|
+
* <Badge rounded status="warning" variant="subtle">Pending</Badge>
|
|
172
|
+
* <Badge rounded status="error" variant="solid">Cancelled</Badge>
|
|
173
|
+
* <Badge status="info" showDot={false}>No dot</Badge>
|
|
167
174
|
* ```
|
|
168
175
|
*/
|
|
169
176
|
export declare const Badge: default_2.ForwardRefExoticComponent<BadgeProps & default_2.RefAttributes<HTMLSpanElement>>;
|
|
@@ -177,6 +184,8 @@ export declare interface BadgeProps {
|
|
|
177
184
|
size?: BadgeSize;
|
|
178
185
|
/** Whether to apply a fully rounded (100px) pill border radius vs the standard 4px */
|
|
179
186
|
rounded?: boolean;
|
|
187
|
+
/** Show a leading status dot. Dotted badges are the default. */
|
|
188
|
+
showDot?: boolean;
|
|
180
189
|
children?: default_2.ReactNode;
|
|
181
190
|
className?: string;
|
|
182
191
|
style?: default_2.CSSProperties;
|
|
@@ -270,21 +279,9 @@ export declare interface BottomLink {
|
|
|
270
279
|
|
|
271
280
|
export { Box }
|
|
272
281
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
* Page location indicator.
|
|
277
|
-
*
|
|
278
|
-
* @example
|
|
279
|
-
* ```tsx
|
|
280
|
-
* <Breadcrumb items={[
|
|
281
|
-
* { label: "Home", href: "/" },
|
|
282
|
-
* { label: "For Doctors", href: "/for-doctors" },
|
|
283
|
-
* { label: "Profile" },
|
|
284
|
-
* ]} />
|
|
285
|
-
* ```
|
|
286
|
-
*/
|
|
287
|
-
export declare function Breadcrumb({ items, separator, renderLink, ...props }: BreadcrumbProps): JSX_2.Element;
|
|
282
|
+
export declare function Breadcrumb({ items, separator, colorScheme, renderLink, ...props }: BreadcrumbProps): JSX_2.Element;
|
|
283
|
+
|
|
284
|
+
export declare type BreadcrumbColorScheme = 'blue' | 'purple';
|
|
288
285
|
|
|
289
286
|
export declare interface BreadcrumbItem {
|
|
290
287
|
label: string;
|
|
@@ -294,6 +291,11 @@ export declare interface BreadcrumbItem {
|
|
|
294
291
|
export declare interface BreadcrumbProps extends BoxProps {
|
|
295
292
|
items: BreadcrumbItem[];
|
|
296
293
|
separator?: default_2.ReactNode;
|
|
294
|
+
/**
|
|
295
|
+
* Brand accent color for interactive breadcrumb link hover state.
|
|
296
|
+
* @default "blue"
|
|
297
|
+
*/
|
|
298
|
+
colorScheme?: BreadcrumbColorScheme;
|
|
297
299
|
renderLink?: (item: BreadcrumbItem, children: default_2.ReactNode) => default_2.ReactNode;
|
|
298
300
|
}
|
|
299
301
|
|
|
@@ -328,6 +330,10 @@ export declare interface ButtonProps {
|
|
|
328
330
|
rightIcon?: default_2.ReactElement;
|
|
329
331
|
/** Disabled state */
|
|
330
332
|
disabled?: boolean;
|
|
333
|
+
/** Haptic feedback intent/pattern on press. Set `false` to disable. */
|
|
334
|
+
haptic?: HapticInput;
|
|
335
|
+
/** Disable haptic feedback for this button. */
|
|
336
|
+
disableHaptic?: boolean;
|
|
331
337
|
/** HTML type attribute */
|
|
332
338
|
type?: 'button' | 'submit' | 'reset';
|
|
333
339
|
/** Click handler */
|
|
@@ -350,6 +356,8 @@ export declare interface ButtonProps {
|
|
|
350
356
|
target?: string;
|
|
351
357
|
/** Link rel if rendered as an anchor */
|
|
352
358
|
rel?: string;
|
|
359
|
+
/** Optional tab index (disabled non-button elements are removed from tab order) */
|
|
360
|
+
tabIndex?: number;
|
|
353
361
|
}
|
|
354
362
|
|
|
355
363
|
/**
|
|
@@ -363,7 +371,7 @@ export declare interface ButtonProps {
|
|
|
363
371
|
* <Calendar value={date} onChange={setDate} colorScheme="purple" />
|
|
364
372
|
* ```
|
|
365
373
|
*/
|
|
366
|
-
export declare function Calendar({ value, onChange, minDate, maxDate, colorScheme, ...props }: CalendarProps): JSX_2.Element;
|
|
374
|
+
export declare function Calendar({ value, onChange, minDate, maxDate, colorScheme, haptic, disableHaptic, ...props }: CalendarProps): JSX_2.Element;
|
|
367
375
|
|
|
368
376
|
export declare interface CalendarProps extends Omit<BoxProps, 'onChange'> {
|
|
369
377
|
value?: Date | null;
|
|
@@ -372,8 +380,18 @@ export declare interface CalendarProps extends Omit<BoxProps, 'onChange'> {
|
|
|
372
380
|
maxDate?: Date;
|
|
373
381
|
/** Brand color scheme ('blue' | 'purple') — defaults to 'blue' */
|
|
374
382
|
colorScheme?: 'blue' | 'purple';
|
|
383
|
+
/** Haptic feedback intent/pattern on date/navigation selection. Set `false` to disable. */
|
|
384
|
+
haptic?: HapticInput;
|
|
385
|
+
/** Disable haptic feedback for calendar interactions. */
|
|
386
|
+
disableHaptic?: boolean;
|
|
375
387
|
}
|
|
376
388
|
|
|
389
|
+
/** Cancel any ongoing vibration pattern (best effort). */
|
|
390
|
+
export declare function cancelHaptic(): void;
|
|
391
|
+
|
|
392
|
+
/** True when the Vibration API is present. */
|
|
393
|
+
export declare function canUseHaptics(): boolean;
|
|
394
|
+
|
|
377
395
|
/**
|
|
378
396
|
* MedixDeck Card
|
|
379
397
|
*
|
|
@@ -434,12 +452,21 @@ export declare interface CheckboxProps {
|
|
|
434
452
|
disabled?: boolean;
|
|
435
453
|
/** Show indeterminate dash instead of tick */
|
|
436
454
|
indeterminate?: boolean;
|
|
455
|
+
/** Haptic feedback intent/pattern on toggle. Set `false` to disable. */
|
|
456
|
+
haptic?: HapticInput;
|
|
457
|
+
/** Disable haptic feedback for this checkbox. */
|
|
458
|
+
disableHaptic?: boolean;
|
|
437
459
|
children?: default_2.ReactNode;
|
|
438
460
|
/** Helper text below the label */
|
|
439
461
|
description?: string;
|
|
440
462
|
name?: string;
|
|
441
463
|
value?: string;
|
|
442
464
|
id?: string;
|
|
465
|
+
'aria-label'?: string;
|
|
466
|
+
'aria-labelledby'?: string;
|
|
467
|
+
'aria-describedby'?: string;
|
|
468
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
469
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
443
470
|
}
|
|
444
471
|
|
|
445
472
|
/**
|
|
@@ -686,7 +713,7 @@ export declare interface Column<T = Record<string, unknown>> {
|
|
|
686
713
|
align?: 'left' | 'center' | 'right';
|
|
687
714
|
}
|
|
688
715
|
|
|
689
|
-
export declare function Combobox({ options, value, onChange, placeholder, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, }: ComboboxProps): JSX_2.Element;
|
|
716
|
+
export declare function Combobox({ options, value, onChange, placeholder, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, haptic, disableHaptic, id, name, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: ComboboxProps): JSX_2.Element;
|
|
690
717
|
|
|
691
718
|
export declare interface ComboboxOption {
|
|
692
719
|
label: string;
|
|
@@ -705,6 +732,17 @@ export declare interface ComboboxProps {
|
|
|
705
732
|
colorScheme?: 'blue' | 'purple';
|
|
706
733
|
isInvalid?: boolean;
|
|
707
734
|
isDisabled?: boolean;
|
|
735
|
+
/** Haptic feedback intent/pattern on selection. Set `false` to disable. */
|
|
736
|
+
haptic?: HapticInput;
|
|
737
|
+
/** Disable haptic feedback for this combobox. */
|
|
738
|
+
disableHaptic?: boolean;
|
|
739
|
+
id?: string;
|
|
740
|
+
name?: string;
|
|
741
|
+
'aria-label'?: string;
|
|
742
|
+
'aria-labelledby'?: string;
|
|
743
|
+
'aria-describedby'?: string;
|
|
744
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
745
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
708
746
|
}
|
|
709
747
|
|
|
710
748
|
/**
|
|
@@ -892,7 +930,7 @@ export declare type DashboardEnvironmentBannerStatus = 'warning' | 'info' | 'err
|
|
|
892
930
|
* }
|
|
893
931
|
* ```
|
|
894
932
|
*/
|
|
895
|
-
export declare function DashboardLayout({ children, logo, navGroups, user, greeting, greetingSubtext, onLogout, renderLink, dropdownItems, topBarSlot, sidebarWidth, collapsedSidebarWidth, collapsible, defaultCollapsed, isCollapsed: controlledIsCollapsed, onCollapseChange, collapsedLogo, collapseTogglePlacement, colorScheme, mobileNavItems, scoreCard, environment, showEnvironmentBanner, environmentBanner, environmentBannerSlot, ...rest }: DashboardLayoutProps): JSX_2.Element;
|
|
933
|
+
export declare function DashboardLayout({ children, logo, navGroups, user, greeting, greetingSubtext, onLogout, renderLink, dropdownItems, topBarSlot, sidebarWidth, collapsedSidebarWidth, collapsible, defaultCollapsed, isCollapsed: controlledIsCollapsed, onCollapseChange, collapsedLogo, collapseTogglePlacement, colorScheme, mobileNavItems, scoreCard, environment, showEnvironmentBanner, environmentBanner, environmentBannerSlot, haptic, disableHaptic, ...rest }: DashboardLayoutProps): JSX_2.Element;
|
|
896
934
|
|
|
897
935
|
export declare namespace DashboardLayout {
|
|
898
936
|
var displayName: string;
|
|
@@ -1071,6 +1109,17 @@ export declare interface DashboardLayoutProps extends Omit<BoxProps, 'children'>
|
|
|
1071
1109
|
* Custom slot to completely override the environment banner UI while preserving layout flow.
|
|
1072
1110
|
*/
|
|
1073
1111
|
environmentBannerSlot?: default_2.ReactNode;
|
|
1112
|
+
/**
|
|
1113
|
+
* Haptic feedback intent/pattern for dashboard sidebar and mobile menu interactions.
|
|
1114
|
+
* Set `false` to disable menu haptics for this layout instance.
|
|
1115
|
+
* @default "selection"
|
|
1116
|
+
*/
|
|
1117
|
+
haptic?: HapticInput;
|
|
1118
|
+
/**
|
|
1119
|
+
* Disable haptic feedback for dashboard sidebar and mobile menu interactions.
|
|
1120
|
+
* @default false
|
|
1121
|
+
*/
|
|
1122
|
+
disableHaptic?: boolean;
|
|
1074
1123
|
}
|
|
1075
1124
|
|
|
1076
1125
|
/**
|
|
@@ -1194,7 +1243,7 @@ export declare interface DashboardUser {
|
|
|
1194
1243
|
* />
|
|
1195
1244
|
* ```
|
|
1196
1245
|
*/
|
|
1197
|
-
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;
|
|
1246
|
+
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, haptic, disableHaptic, }: DataTableProps<T>): JSX_2.Element;
|
|
1198
1247
|
|
|
1199
1248
|
export declare interface DataTableProps<T = Record<string, unknown>> {
|
|
1200
1249
|
columns: Column<T>[];
|
|
@@ -1234,6 +1283,10 @@ export declare interface DataTableProps<T = Record<string, unknown>> {
|
|
|
1234
1283
|
* @default false
|
|
1235
1284
|
*/
|
|
1236
1285
|
stickyFirstColumn?: boolean;
|
|
1286
|
+
/** Haptic feedback intent/pattern for sort/row interactions. Set `false` to disable. */
|
|
1287
|
+
haptic?: HapticInput;
|
|
1288
|
+
/** Disable haptic feedback for table interactions. */
|
|
1289
|
+
disableHaptic?: boolean;
|
|
1237
1290
|
}
|
|
1238
1291
|
|
|
1239
1292
|
/**
|
|
@@ -1251,7 +1304,7 @@ export declare interface DataTableProps<T = Record<string, unknown>> {
|
|
|
1251
1304
|
* />
|
|
1252
1305
|
* ```
|
|
1253
1306
|
*/
|
|
1254
|
-
export declare function DatePicker({ value, onChange, min, max, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, placeholder, id, includeTime, }: DatePickerProps): JSX_2.Element;
|
|
1307
|
+
export declare function DatePicker({ value, onChange, min, max, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, placeholder, id, includeTime, haptic, disableHaptic, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: DatePickerProps): JSX_2.Element;
|
|
1255
1308
|
|
|
1256
1309
|
export declare interface DatePickerProps {
|
|
1257
1310
|
/** Controlled value (ISO date string: YYYY-MM-DD) */
|
|
@@ -1272,6 +1325,15 @@ export declare interface DatePickerProps {
|
|
|
1272
1325
|
id?: string;
|
|
1273
1326
|
/** Whether to also show time input */
|
|
1274
1327
|
includeTime?: boolean;
|
|
1328
|
+
/** Haptic feedback intent/pattern on open/selection. Set `false` to disable. */
|
|
1329
|
+
haptic?: HapticInput;
|
|
1330
|
+
/** Disable haptic feedback for this date picker. */
|
|
1331
|
+
disableHaptic?: boolean;
|
|
1332
|
+
'aria-label'?: string;
|
|
1333
|
+
'aria-labelledby'?: string;
|
|
1334
|
+
'aria-describedby'?: string;
|
|
1335
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
1336
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
1275
1337
|
}
|
|
1276
1338
|
|
|
1277
1339
|
/**
|
|
@@ -1290,7 +1352,7 @@ export declare interface DatePickerProps {
|
|
|
1290
1352
|
* />
|
|
1291
1353
|
* ```
|
|
1292
1354
|
*/
|
|
1293
|
-
export declare function DateRangePicker({ startValue, onStartChange, endValue, onEndChange, min, max, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, startPlaceholder, endPlaceholder, id, }: DateRangePickerProps): JSX_2.Element;
|
|
1355
|
+
export declare function DateRangePicker({ startValue, onStartChange, endValue, onEndChange, min, max, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, startPlaceholder, endPlaceholder, id, haptic, disableHaptic, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: DateRangePickerProps): JSX_2.Element;
|
|
1294
1356
|
|
|
1295
1357
|
export declare interface DateRangePickerProps {
|
|
1296
1358
|
/** Controlled start date value (ISO date string: YYYY-MM-DD) */
|
|
@@ -1313,8 +1375,19 @@ export declare interface DateRangePickerProps {
|
|
|
1313
1375
|
startPlaceholder?: string;
|
|
1314
1376
|
endPlaceholder?: string;
|
|
1315
1377
|
id?: string;
|
|
1378
|
+
/** Haptic feedback intent/pattern on open/selection. Set `false` to disable. */
|
|
1379
|
+
haptic?: HapticInput;
|
|
1380
|
+
/** Disable haptic feedback for this date range picker. */
|
|
1381
|
+
disableHaptic?: boolean;
|
|
1382
|
+
'aria-label'?: string;
|
|
1383
|
+
'aria-labelledby'?: string;
|
|
1384
|
+
'aria-describedby'?: string;
|
|
1385
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
1386
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
1316
1387
|
}
|
|
1317
1388
|
|
|
1389
|
+
export declare const DEFAULT_HAPTIC_PATTERNS: Record<HapticIntent, HapticPattern>;
|
|
1390
|
+
|
|
1318
1391
|
export declare const dismissToast: (id: string) => void;
|
|
1319
1392
|
|
|
1320
1393
|
/**
|
|
@@ -1392,7 +1465,7 @@ export declare const DRAFT_STORAGE_PREFIX = "medix_rte_draft_";
|
|
|
1392
1465
|
* </Drawer>
|
|
1393
1466
|
* ```
|
|
1394
1467
|
*/
|
|
1395
|
-
export declare function Drawer({ isOpen, onClose, title, placement, size, closeOnOverlayClick, closeOnEscape, footer, children, }: DrawerProps): JSX_2.Element;
|
|
1468
|
+
export declare function Drawer({ isOpen, onClose, title, placement, size, closeOnOverlayClick, closeOnEscape, footer, children, haptic, disableHaptic, }: DrawerProps): JSX_2.Element;
|
|
1396
1469
|
|
|
1397
1470
|
export declare type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|
|
1398
1471
|
|
|
@@ -1406,6 +1479,10 @@ export declare interface DrawerProps {
|
|
|
1406
1479
|
closeOnEscape?: boolean;
|
|
1407
1480
|
footer?: default_2.ReactNode;
|
|
1408
1481
|
children?: default_2.ReactNode;
|
|
1482
|
+
/** Haptic feedback intent/pattern when the drawer closes. Set `false` to disable. */
|
|
1483
|
+
haptic?: HapticInput;
|
|
1484
|
+
/** Disable haptic feedback for drawer close actions. */
|
|
1485
|
+
disableHaptic?: boolean;
|
|
1409
1486
|
}
|
|
1410
1487
|
|
|
1411
1488
|
export declare type DrawerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
@@ -1456,7 +1533,7 @@ export declare interface EmptyStateProps extends BoxProps {
|
|
|
1456
1533
|
* />
|
|
1457
1534
|
* ```
|
|
1458
1535
|
*/
|
|
1459
|
-
export declare function FileUpload({ accept, multiple, maxSize, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, onChange, dropzoneTitle, id, }: FileUploadProps): JSX_2.Element;
|
|
1536
|
+
export declare function FileUpload({ accept, multiple, maxSize, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, onChange, dropzoneTitle, id, haptic, disableHaptic, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: FileUploadProps): JSX_2.Element;
|
|
1460
1537
|
|
|
1461
1538
|
export declare interface FileUploadProps {
|
|
1462
1539
|
/** Accepted file types (e.g. ".pdf,.jpg,.png" or "image/*") */
|
|
@@ -1478,6 +1555,15 @@ export declare interface FileUploadProps {
|
|
|
1478
1555
|
dropzoneTitle?: string;
|
|
1479
1556
|
/** Custom ID for the file input */
|
|
1480
1557
|
id?: string;
|
|
1558
|
+
/** Haptic feedback intent/pattern on file selection/error. Set `false` to disable. */
|
|
1559
|
+
haptic?: HapticInput;
|
|
1560
|
+
/** Disable haptic feedback for file upload interactions. */
|
|
1561
|
+
disableHaptic?: boolean;
|
|
1562
|
+
'aria-label'?: string;
|
|
1563
|
+
'aria-labelledby'?: string;
|
|
1564
|
+
'aria-describedby'?: string;
|
|
1565
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
1566
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
1481
1567
|
}
|
|
1482
1568
|
|
|
1483
1569
|
export { Flex }
|
|
@@ -1571,11 +1657,12 @@ export declare interface FooterSection {
|
|
|
1571
1657
|
* MedixDeck FormControl
|
|
1572
1658
|
*
|
|
1573
1659
|
* Wrapper for form fields that adds label, helper text, and error display.
|
|
1660
|
+
* Wires label association and ARIA helper/error descriptions to the child control.
|
|
1574
1661
|
*
|
|
1575
1662
|
* @example
|
|
1576
1663
|
* ```tsx
|
|
1577
1664
|
* <FormControl label="Email address" isRequired errorMessage="Please enter a valid email.">
|
|
1578
|
-
* <Input type="email" placeholder="you@example.com"
|
|
1665
|
+
* <Input type="email" placeholder="you@example.com" />
|
|
1579
1666
|
* </FormControl>
|
|
1580
1667
|
* ```
|
|
1581
1668
|
*/
|
|
@@ -1648,6 +1735,50 @@ export { Grid }
|
|
|
1648
1735
|
|
|
1649
1736
|
export { GridItem }
|
|
1650
1737
|
|
|
1738
|
+
/** Accept semantic intents, custom patterns, or false/null to disable. */
|
|
1739
|
+
export declare type HapticInput = HapticIntent | HapticPattern | false | null | undefined;
|
|
1740
|
+
|
|
1741
|
+
/**
|
|
1742
|
+
* MedixDeck Haptics
|
|
1743
|
+
*
|
|
1744
|
+
* Lightweight, SSR-safe haptic feedback utilities for web/PWA environments.
|
|
1745
|
+
* Uses the Vibration API when available (primarily Android/Chromium). iOS
|
|
1746
|
+
* Safari does not support navigator.vibrate, so calls become graceful no-ops
|
|
1747
|
+
* unless an experimental fallback is added in the future.
|
|
1748
|
+
*
|
|
1749
|
+
* Haptics are an enhancement, never the only signal. Visual/state feedback and
|
|
1750
|
+
* accessibility semantics must remain primary.
|
|
1751
|
+
*/
|
|
1752
|
+
export declare type HapticIntent = 'selection' | 'impactLight' | 'impactMedium' | 'impactHeavy' | 'success' | 'warning' | 'error' | 'notification';
|
|
1753
|
+
|
|
1754
|
+
/** Vibration API-compatible pattern: duration in ms or [vibrate, pause, ...]. */
|
|
1755
|
+
export declare type HapticPattern = number | number[];
|
|
1756
|
+
|
|
1757
|
+
export declare interface HapticsConfig {
|
|
1758
|
+
/** Master enable switch. @default true */
|
|
1759
|
+
enabled?: boolean;
|
|
1760
|
+
/** Suppress haptics when prefers-reduced-motion matches. @default true */
|
|
1761
|
+
respectReducedMotion?: boolean;
|
|
1762
|
+
/** Override default intent patterns. */
|
|
1763
|
+
patterns?: Partial<Record<HapticIntent, HapticPattern>>;
|
|
1764
|
+
/** Execution strategy. @default "vibration" */
|
|
1765
|
+
strategy?: 'vibration' | 'none';
|
|
1766
|
+
/** Emit debug logs in development. @default false */
|
|
1767
|
+
debug?: boolean;
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
/**
|
|
1771
|
+
* Internal provider for haptics configuration. `MedixProvider` renders this
|
|
1772
|
+
* automatically; consumers typically do not need to use it directly.
|
|
1773
|
+
*/
|
|
1774
|
+
export declare function HapticsProvider({ haptics, children }: HapticsProviderProps): JSX_2.Element;
|
|
1775
|
+
|
|
1776
|
+
export declare interface HapticsProviderProps {
|
|
1777
|
+
/** Haptics configuration or boolean shorthand. @default true */
|
|
1778
|
+
haptics?: boolean | HapticsConfig;
|
|
1779
|
+
children: default_2.ReactNode;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1651
1782
|
export { Heading }
|
|
1652
1783
|
|
|
1653
1784
|
export { HStack }
|
|
@@ -1706,6 +1837,10 @@ export declare interface IconButtonProps {
|
|
|
1706
1837
|
isRound?: boolean;
|
|
1707
1838
|
/** Disabled state */
|
|
1708
1839
|
disabled?: boolean;
|
|
1840
|
+
/** Haptic feedback intent/pattern on press. Set `false` to disable. */
|
|
1841
|
+
haptic?: HapticInput;
|
|
1842
|
+
/** Disable haptic feedback for this button. */
|
|
1843
|
+
disableHaptic?: boolean;
|
|
1709
1844
|
/** HTML type attribute */
|
|
1710
1845
|
type?: 'button' | 'submit' | 'reset';
|
|
1711
1846
|
/** Click handler */
|
|
@@ -1750,6 +1885,9 @@ export declare interface InputProps extends Omit<InputProps_2, 'size'> {
|
|
|
1750
1885
|
errorMessage?: string;
|
|
1751
1886
|
}
|
|
1752
1887
|
|
|
1888
|
+
/** True when the user prefers reduced motion. Safe during SSR. */
|
|
1889
|
+
export declare function isReducedMotionPreferred(): boolean;
|
|
1890
|
+
|
|
1753
1891
|
export { Link }
|
|
1754
1892
|
|
|
1755
1893
|
/**
|
|
@@ -1883,7 +2021,7 @@ export declare const medixConfig: SystemConfig;
|
|
|
1883
2021
|
* }
|
|
1884
2022
|
* ```
|
|
1885
2023
|
*/
|
|
1886
|
-
export declare function MedixProvider({ children, defaultColorMode, forcedColorMode, }: MedixProviderProps): JSX_2.Element;
|
|
2024
|
+
export declare function MedixProvider({ children, defaultColorMode, forcedColorMode, haptics, }: MedixProviderProps): JSX_2.Element;
|
|
1887
2025
|
|
|
1888
2026
|
export declare interface MedixProviderProps {
|
|
1889
2027
|
children: default_2.ReactNode;
|
|
@@ -1896,6 +2034,12 @@ export declare interface MedixProviderProps {
|
|
|
1896
2034
|
* Force a specific color mode (disables user toggle)
|
|
1897
2035
|
*/
|
|
1898
2036
|
forcedColorMode?: 'light' | 'dark';
|
|
2037
|
+
/**
|
|
2038
|
+
* Global haptic feedback configuration. Pass `false` to disable all haptics.
|
|
2039
|
+
* Respects `prefers-reduced-motion` by default on supported devices.
|
|
2040
|
+
* @default true
|
|
2041
|
+
*/
|
|
2042
|
+
haptics?: boolean | HapticsConfig;
|
|
1899
2043
|
}
|
|
1900
2044
|
|
|
1901
2045
|
/**
|
|
@@ -1917,7 +2061,7 @@ export declare interface MedixProviderProps {
|
|
|
1917
2061
|
* </Modal>
|
|
1918
2062
|
* ```
|
|
1919
2063
|
*/
|
|
1920
|
-
export declare function Modal({ isOpen, onClose, title, description, size, closeOnOverlayClick, closeOnEscape, footer, children, mobileVariant, }: ModalProps): JSX_2.Element;
|
|
2064
|
+
export declare function Modal({ isOpen, onClose, title, description, size, closeOnOverlayClick, closeOnEscape, footer, children, mobileVariant, haptic, disableHaptic, }: ModalProps): JSX_2.Element;
|
|
1921
2065
|
|
|
1922
2066
|
export declare type ModalMobileVariant = 'centered' | 'bottom-sheet';
|
|
1923
2067
|
|
|
@@ -1940,10 +2084,21 @@ export declare interface ModalProps {
|
|
|
1940
2084
|
* @default "bottom-sheet"
|
|
1941
2085
|
*/
|
|
1942
2086
|
mobileVariant?: ModalMobileVariant;
|
|
2087
|
+
/** Haptic feedback intent/pattern when the modal closes. Set `false` to disable. */
|
|
2088
|
+
haptic?: HapticInput;
|
|
2089
|
+
/** Disable haptic feedback for modal close actions. */
|
|
2090
|
+
disableHaptic?: boolean;
|
|
1943
2091
|
}
|
|
1944
2092
|
|
|
1945
2093
|
export declare type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
1946
2094
|
|
|
2095
|
+
declare interface MultiSelectProps extends SelectCommonProps {
|
|
2096
|
+
multiple: true;
|
|
2097
|
+
value?: string[];
|
|
2098
|
+
defaultValue?: string[] | string;
|
|
2099
|
+
onChange?: (value: string[]) => void;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
1947
2102
|
/**
|
|
1948
2103
|
* MedixDeck Navbar
|
|
1949
2104
|
*
|
|
@@ -2179,7 +2334,7 @@ export declare interface NotFoundPageProps extends BoxProps {
|
|
|
2179
2334
|
* />
|
|
2180
2335
|
* ```
|
|
2181
2336
|
*/
|
|
2182
|
-
export declare function OTPInput({ length, value, defaultValue, onChange, onComplete, colorScheme, isInvalid, isDisabled, mask, label, helperText, errorMessage, }: OTPInputProps): JSX_2.Element;
|
|
2337
|
+
export declare function OTPInput({ length, value, defaultValue, onChange, onComplete, colorScheme, isInvalid, isDisabled, mask, haptic, disableHaptic, label, helperText, errorMessage, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: OTPInputProps): JSX_2.Element;
|
|
2183
2338
|
|
|
2184
2339
|
export declare interface OTPInputProps {
|
|
2185
2340
|
/** Number of digits */
|
|
@@ -2198,12 +2353,22 @@ export declare interface OTPInputProps {
|
|
|
2198
2353
|
isDisabled?: boolean;
|
|
2199
2354
|
/** Whether to mask like a password */
|
|
2200
2355
|
mask?: boolean;
|
|
2356
|
+
/** Haptic feedback intent/pattern on digit entry/complete. Set `false` to disable. */
|
|
2357
|
+
haptic?: HapticInput;
|
|
2358
|
+
/** Disable haptic feedback for OTP interactions. */
|
|
2359
|
+
disableHaptic?: boolean;
|
|
2201
2360
|
/** Label above the input */
|
|
2202
2361
|
label?: string;
|
|
2203
2362
|
/** Helper text */
|
|
2204
2363
|
helperText?: string;
|
|
2205
2364
|
/** Error message */
|
|
2206
2365
|
errorMessage?: string;
|
|
2366
|
+
id?: string;
|
|
2367
|
+
'aria-label'?: string;
|
|
2368
|
+
'aria-labelledby'?: string;
|
|
2369
|
+
'aria-describedby'?: string;
|
|
2370
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
2371
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
2207
2372
|
}
|
|
2208
2373
|
|
|
2209
2374
|
/**
|
|
@@ -2214,7 +2379,9 @@ export declare interface OTPInputProps {
|
|
|
2214
2379
|
* <Pagination total={245} pageSize={10} currentPage={3} onChange={setPage} />
|
|
2215
2380
|
* ```
|
|
2216
2381
|
*/
|
|
2217
|
-
export declare function Pagination({ total, pageSize, currentPage, onChange, siblingCount, showEdges, compact, ...props }: PaginationProps): JSX_2.Element | null;
|
|
2382
|
+
export declare function Pagination({ total, pageSize, currentPage, onChange, siblingCount, showEdges, compact, colorScheme, haptic, disableHaptic, ...props }: PaginationProps): JSX_2.Element | null;
|
|
2383
|
+
|
|
2384
|
+
export declare type PaginationColorScheme = 'blue' | 'purple';
|
|
2218
2385
|
|
|
2219
2386
|
export declare interface PaginationProps extends Omit<BoxProps, 'onChange'> {
|
|
2220
2387
|
/** Total number of items */
|
|
@@ -2231,6 +2398,15 @@ export declare interface PaginationProps extends Omit<BoxProps, 'onChange'> {
|
|
|
2231
2398
|
showEdges?: boolean;
|
|
2232
2399
|
/** Compact mode */
|
|
2233
2400
|
compact?: boolean;
|
|
2401
|
+
/**
|
|
2402
|
+
* Brand accent color for active/interactive pagination controls.
|
|
2403
|
+
* @default "blue"
|
|
2404
|
+
*/
|
|
2405
|
+
colorScheme?: PaginationColorScheme;
|
|
2406
|
+
/** Haptic feedback intent/pattern on page change. Set `false` to disable. */
|
|
2407
|
+
haptic?: HapticInput;
|
|
2408
|
+
/** Disable haptic feedback for pagination. */
|
|
2409
|
+
disableHaptic?: boolean;
|
|
2234
2410
|
}
|
|
2235
2411
|
|
|
2236
2412
|
/**
|
|
@@ -2298,7 +2474,7 @@ export declare interface PatientTimelineProps extends Omit<BoxProps, 'onChange'>
|
|
|
2298
2474
|
* />
|
|
2299
2475
|
* ```
|
|
2300
2476
|
*/
|
|
2301
|
-
export declare function PhoneInput({ value, onChange, showCountryCode, showCountryFlag, defaultCountryCode, defaultCountry, placeholder, colorScheme, isInvalid, errorMessage, label, helperText, isDisabled, id, }: PhoneInputProps): JSX_2.Element;
|
|
2477
|
+
export declare function PhoneInput({ value, onChange, showCountryCode, showCountryFlag, defaultCountryCode, defaultCountry, placeholder, colorScheme, isInvalid, errorMessage, label, helperText, isDisabled, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: PhoneInputProps): JSX_2.Element;
|
|
2302
2478
|
|
|
2303
2479
|
export declare interface PhoneInputProps {
|
|
2304
2480
|
/** Controlled value (full number including country code prefix) */
|
|
@@ -2324,6 +2500,11 @@ export declare interface PhoneInputProps {
|
|
|
2324
2500
|
helperText?: string;
|
|
2325
2501
|
isDisabled?: boolean;
|
|
2326
2502
|
id?: string;
|
|
2503
|
+
'aria-label'?: string;
|
|
2504
|
+
'aria-labelledby'?: string;
|
|
2505
|
+
'aria-describedby'?: string;
|
|
2506
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
2507
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
2327
2508
|
}
|
|
2328
2509
|
|
|
2329
2510
|
export declare const PinInput: typeof OTPInput;
|
|
@@ -2490,7 +2671,8 @@ export declare interface PWAInstallPromptProps {
|
|
|
2490
2671
|
*/
|
|
2491
2672
|
delaySeconds?: number;
|
|
2492
2673
|
/**
|
|
2493
|
-
* For documentation/storybook purposes.
|
|
2674
|
+
* For documentation/storybook purposes only. Bypasses installation and cooldown
|
|
2675
|
+
* checks without capturing a browser install event. Omit in production apps.
|
|
2494
2676
|
*/
|
|
2495
2677
|
forceVisible?: boolean;
|
|
2496
2678
|
/**
|
|
@@ -2553,7 +2735,7 @@ export declare const radiiTokens: {
|
|
|
2553
2735
|
* />
|
|
2554
2736
|
* ```
|
|
2555
2737
|
*/
|
|
2556
|
-
export declare function RadioGroup({ name, value: controlledValue, onChange, options, colorScheme, direction, }: RadioGroupProps): JSX_2.Element;
|
|
2738
|
+
export declare function RadioGroup({ name, value: controlledValue, onChange, options, colorScheme, direction, haptic, disableHaptic, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: RadioGroupProps): JSX_2.Element;
|
|
2557
2739
|
|
|
2558
2740
|
export declare interface RadioGroupProps {
|
|
2559
2741
|
name: string;
|
|
@@ -2564,6 +2746,16 @@ export declare interface RadioGroupProps {
|
|
|
2564
2746
|
/** Brand color for the selected dot */
|
|
2565
2747
|
colorScheme?: 'blue' | 'purple';
|
|
2566
2748
|
direction?: 'row' | 'column';
|
|
2749
|
+
/** Haptic feedback intent/pattern on selection. Set `false` to disable. */
|
|
2750
|
+
haptic?: HapticInput;
|
|
2751
|
+
/** Disable haptic feedback for this radio group. */
|
|
2752
|
+
disableHaptic?: boolean;
|
|
2753
|
+
id?: string;
|
|
2754
|
+
'aria-label'?: string;
|
|
2755
|
+
'aria-labelledby'?: string;
|
|
2756
|
+
'aria-describedby'?: string;
|
|
2757
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
2758
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
2567
2759
|
}
|
|
2568
2760
|
|
|
2569
2761
|
export declare interface RadioOption {
|
|
@@ -2573,6 +2765,17 @@ export declare interface RadioOption {
|
|
|
2573
2765
|
disabled?: boolean;
|
|
2574
2766
|
}
|
|
2575
2767
|
|
|
2768
|
+
export declare interface ResolvedHapticsConfig {
|
|
2769
|
+
enabled: boolean;
|
|
2770
|
+
respectReducedMotion: boolean;
|
|
2771
|
+
patterns: Record<HapticIntent, HapticPattern>;
|
|
2772
|
+
strategy: 'vibration' | 'none';
|
|
2773
|
+
debug: boolean;
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
/** Resolve an input intent/pattern to a concrete Vibration API pattern. */
|
|
2777
|
+
export declare function resolveHapticPattern(input: HapticInput, config?: ResolvedHapticsConfig | HapticsConfig | boolean | null): HapticPattern | null;
|
|
2778
|
+
|
|
2576
2779
|
export declare interface RichTextDraftPayload {
|
|
2577
2780
|
/** The saved text/HTML/Markdown content */
|
|
2578
2781
|
content: string;
|
|
@@ -2603,7 +2806,7 @@ export declare const RichTextEditor: typeof RichTextInput;
|
|
|
2603
2806
|
* <RichTextInput outputFormat="markdown" onChange={setMarkdown} />
|
|
2604
2807
|
* ```
|
|
2605
2808
|
*/
|
|
2606
|
-
export declare function RichTextInput({ id, name, value, defaultValue, onChange, onMarkdownChange, onHtmlChange, outputFormat, defaultMode, mode: controlledMode, onModeChange, showModeToggle, placeholder, label, helperText, errorMessage, isInvalid, disabled, colorScheme, minHeight, maxHeight, maxLength, showCharCount, toolbarOptions, className, storageKey, persistDraft, debounceMs, draftMaxAgeMs, showDraftStatus, onDraftRestored, }: RichTextInputProps): JSX_2.Element;
|
|
2809
|
+
export declare function RichTextInput({ id, name, value, defaultValue, onChange, onMarkdownChange, onHtmlChange, outputFormat, defaultMode, mode: controlledMode, onModeChange, showModeToggle, placeholder, label, helperText, errorMessage, isInvalid, disabled, colorScheme, minHeight, maxHeight, maxLength, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, showCharCount, toolbarOptions, className, storageKey, persistDraft, debounceMs, draftMaxAgeMs, showDraftStatus, onDraftRestored, }: RichTextInputProps): JSX_2.Element;
|
|
2607
2810
|
|
|
2608
2811
|
export declare namespace RichTextInput {
|
|
2609
2812
|
var displayName: string;
|
|
@@ -2662,6 +2865,10 @@ export declare interface RichTextInputProps {
|
|
|
2662
2865
|
showCharCount?: boolean;
|
|
2663
2866
|
/** Customize visible toolbar controls */
|
|
2664
2867
|
toolbarOptions?: ToolbarOptions;
|
|
2868
|
+
/** Haptic feedback intent/pattern for toolbar actions and mode toggles. Set `false` to disable. */
|
|
2869
|
+
haptic?: HapticInput;
|
|
2870
|
+
/** Disable haptic feedback for rich text interactions. */
|
|
2871
|
+
disableHaptic?: boolean;
|
|
2665
2872
|
/** Additional CSS class on the wrapper */
|
|
2666
2873
|
className?: string;
|
|
2667
2874
|
/**
|
|
@@ -2693,6 +2900,11 @@ export declare interface RichTextInputProps {
|
|
|
2693
2900
|
* Callback invoked when a saved draft is restored from localStorage on mount.
|
|
2694
2901
|
*/
|
|
2695
2902
|
onDraftRestored?: (draft: RichTextDraftPayload) => void;
|
|
2903
|
+
'aria-label'?: string;
|
|
2904
|
+
'aria-labelledby'?: string;
|
|
2905
|
+
'aria-describedby'?: string;
|
|
2906
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
2907
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
2696
2908
|
}
|
|
2697
2909
|
|
|
2698
2910
|
/**
|
|
@@ -2761,13 +2973,7 @@ export declare interface SectionHeaderProps extends BoxProps {
|
|
|
2761
2973
|
*/
|
|
2762
2974
|
export declare function Select(props: SelectProps): JSX_2.Element;
|
|
2763
2975
|
|
|
2764
|
-
|
|
2765
|
-
value: string;
|
|
2766
|
-
label: string;
|
|
2767
|
-
disabled?: boolean;
|
|
2768
|
-
}
|
|
2769
|
-
|
|
2770
|
-
export declare interface SelectProps {
|
|
2976
|
+
declare interface SelectCommonProps {
|
|
2771
2977
|
options?: SelectOption[];
|
|
2772
2978
|
placeholder?: string;
|
|
2773
2979
|
isInvalid?: boolean;
|
|
@@ -2778,19 +2984,33 @@ export declare interface SelectProps {
|
|
|
2778
2984
|
children?: default_2.ReactNode;
|
|
2779
2985
|
/** Optional icon to render on the left side of the select field */
|
|
2780
2986
|
icon?: default_2.ReactNode;
|
|
2781
|
-
value?: string | string[];
|
|
2782
|
-
defaultValue?: string | string[];
|
|
2783
|
-
onChange?: (value: any) => void;
|
|
2784
2987
|
name?: string;
|
|
2785
2988
|
id?: string;
|
|
2786
2989
|
disabled?: boolean;
|
|
2787
|
-
|
|
2990
|
+
/** Haptic feedback intent/pattern on selection/toggle. Set `false` to disable. */
|
|
2991
|
+
haptic?: HapticInput;
|
|
2992
|
+
/** Disable haptic feedback for this select. */
|
|
2993
|
+
disableHaptic?: boolean;
|
|
2788
2994
|
onBlur?: default_2.FocusEventHandler<HTMLDivElement | HTMLInputElement>;
|
|
2789
2995
|
onFocus?: default_2.FocusEventHandler<HTMLDivElement | HTMLInputElement>;
|
|
2790
2996
|
style?: default_2.CSSProperties;
|
|
2791
2997
|
className?: string;
|
|
2998
|
+
/** Accessible label/description wiring for custom trigger */
|
|
2999
|
+
'aria-label'?: string;
|
|
3000
|
+
'aria-labelledby'?: string;
|
|
3001
|
+
'aria-describedby'?: string;
|
|
3002
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
3003
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
3004
|
+
}
|
|
3005
|
+
|
|
3006
|
+
export declare interface SelectOption {
|
|
3007
|
+
value: string;
|
|
3008
|
+
label: string;
|
|
3009
|
+
disabled?: boolean;
|
|
2792
3010
|
}
|
|
2793
3011
|
|
|
3012
|
+
export declare type SelectProps = SingleSelectProps | MultiSelectProps;
|
|
3013
|
+
|
|
2794
3014
|
/**
|
|
2795
3015
|
* MedixDeck ServerErrorPage (500)
|
|
2796
3016
|
*
|
|
@@ -2861,6 +3081,13 @@ export declare const shadowTokens: {
|
|
|
2861
3081
|
|
|
2862
3082
|
export { SimpleGrid }
|
|
2863
3083
|
|
|
3084
|
+
declare interface SingleSelectProps extends SelectCommonProps {
|
|
3085
|
+
multiple?: false;
|
|
3086
|
+
value?: string;
|
|
3087
|
+
defaultValue?: string | string[];
|
|
3088
|
+
onChange?: (value: string) => void;
|
|
3089
|
+
}
|
|
3090
|
+
|
|
2864
3091
|
/**
|
|
2865
3092
|
* MedixDeck Skeleton
|
|
2866
3093
|
*
|
|
@@ -3062,12 +3289,21 @@ export declare interface SwitchProps {
|
|
|
3062
3289
|
defaultChecked?: boolean;
|
|
3063
3290
|
onChange?: (checked: boolean) => void;
|
|
3064
3291
|
disabled?: boolean;
|
|
3292
|
+
/** Haptic feedback intent/pattern on toggle. Set `false` to disable. */
|
|
3293
|
+
haptic?: HapticInput;
|
|
3294
|
+
/** Disable haptic feedback for this switch. */
|
|
3295
|
+
disableHaptic?: boolean;
|
|
3065
3296
|
/** Label shown to the right */
|
|
3066
3297
|
label?: string;
|
|
3067
3298
|
/** Helper text shown below the label */
|
|
3068
3299
|
description?: string;
|
|
3069
3300
|
name?: string;
|
|
3070
3301
|
id?: string;
|
|
3302
|
+
'aria-label'?: string;
|
|
3303
|
+
'aria-labelledby'?: string;
|
|
3304
|
+
'aria-describedby'?: string;
|
|
3305
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
3306
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
3071
3307
|
}
|
|
3072
3308
|
|
|
3073
3309
|
export declare const system: SystemContext;
|
|
@@ -3093,7 +3329,9 @@ export declare interface TabItem {
|
|
|
3093
3329
|
* />
|
|
3094
3330
|
* ```
|
|
3095
3331
|
*/
|
|
3096
|
-
export declare function Tabs({ tabs, defaultActiveId, activeId: controlledId, onChange, variant, size, renderContent, ...props }: TabsProps): JSX_2.Element;
|
|
3332
|
+
export declare function Tabs({ tabs, defaultActiveId, activeId: controlledId, onChange, variant, size, renderContent, colorScheme, haptic, disableHaptic, ...props }: TabsProps): JSX_2.Element;
|
|
3333
|
+
|
|
3334
|
+
export declare type TabsColorScheme = 'blue' | 'purple';
|
|
3097
3335
|
|
|
3098
3336
|
export declare interface TabsProps extends Omit<BoxProps, 'onChange'> {
|
|
3099
3337
|
tabs: TabItem[];
|
|
@@ -3103,16 +3341,27 @@ export declare interface TabsProps extends Omit<BoxProps, 'onChange'> {
|
|
|
3103
3341
|
variant?: 'line' | 'pill';
|
|
3104
3342
|
size?: 'sm' | 'md' | 'lg';
|
|
3105
3343
|
renderContent?: boolean;
|
|
3344
|
+
/**
|
|
3345
|
+
* Brand accent color for line variant active/hover/focus states and badges.
|
|
3346
|
+
* @default "blue"
|
|
3347
|
+
*/
|
|
3348
|
+
colorScheme?: TabsColorScheme;
|
|
3349
|
+
/** Haptic feedback intent/pattern on tab change. Set `false` to disable. */
|
|
3350
|
+
haptic?: HapticInput;
|
|
3351
|
+
/** Disable haptic feedback for tab changes. */
|
|
3352
|
+
disableHaptic?: boolean;
|
|
3106
3353
|
}
|
|
3107
3354
|
|
|
3108
3355
|
/**
|
|
3109
3356
|
* MedixDeck Tag / Chip
|
|
3110
3357
|
*
|
|
3111
3358
|
* For filters, categories, and selections.
|
|
3359
|
+
* Includes a leading dot by default for quick visual scanning.
|
|
3112
3360
|
*
|
|
3113
3361
|
* @example
|
|
3114
3362
|
* ```tsx
|
|
3115
3363
|
* <Tag colorScheme="blue" variant="subtle">Cardiology</Tag>
|
|
3364
|
+
* <Tag colorScheme="purple" variant="solid" showDot={false}>No dot</Tag>
|
|
3116
3365
|
* ```
|
|
3117
3366
|
*/
|
|
3118
3367
|
export declare const Tag: default_2.ForwardRefExoticComponent<TagProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -3126,6 +3375,8 @@ export declare type TagInputProps = TagsInputProps;
|
|
|
3126
3375
|
export declare interface TagProps extends BoxProps {
|
|
3127
3376
|
variant?: TagVariant;
|
|
3128
3377
|
colorScheme?: TagColorScheme;
|
|
3378
|
+
/** Show a leading status dot. Dotted tags are the default. */
|
|
3379
|
+
showDot?: boolean;
|
|
3129
3380
|
/** Optional close-button handler */
|
|
3130
3381
|
onClose?: () => void;
|
|
3131
3382
|
children: default_2.ReactNode;
|
|
@@ -3148,7 +3399,7 @@ export declare interface TagProps extends BoxProps {
|
|
|
3148
3399
|
* />
|
|
3149
3400
|
* ```
|
|
3150
3401
|
*/
|
|
3151
|
-
export declare function TagsInput({ value, onChange, placeholder, label, helperText, errorMessage, isInvalid, colorScheme, size, isDisabled, isReadOnly, maxTags, allowDuplicates, addOnBlur, delimiter, id, name, style, className, }: TagsInputProps): JSX_2.Element;
|
|
3402
|
+
export declare function TagsInput({ value, onChange, placeholder, label, helperText, errorMessage, isInvalid, colorScheme, size, isDisabled, isReadOnly, maxTags, allowDuplicates, addOnBlur, delimiter, id, name, haptic, disableHaptic, style, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: TagsInputProps): JSX_2.Element;
|
|
3152
3403
|
|
|
3153
3404
|
export declare interface TagsInputProps {
|
|
3154
3405
|
/** Array of tag strings */
|
|
@@ -3185,9 +3436,18 @@ export declare interface TagsInputProps {
|
|
|
3185
3436
|
id?: string;
|
|
3186
3437
|
/** HTML input name */
|
|
3187
3438
|
name?: string;
|
|
3439
|
+
/** Haptic feedback intent/pattern on tag add/remove. Set `false` to disable. */
|
|
3440
|
+
haptic?: HapticInput;
|
|
3441
|
+
/** Disable haptic feedback for tags interactions. */
|
|
3442
|
+
disableHaptic?: boolean;
|
|
3188
3443
|
/** Extra container styles */
|
|
3189
3444
|
style?: default_2.CSSProperties;
|
|
3190
3445
|
className?: string;
|
|
3446
|
+
'aria-label'?: string;
|
|
3447
|
+
'aria-labelledby'?: string;
|
|
3448
|
+
'aria-describedby'?: string;
|
|
3449
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
3450
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
3191
3451
|
}
|
|
3192
3452
|
|
|
3193
3453
|
export declare type TagVariant = 'solid' | 'subtle' | 'outline';
|
|
@@ -3479,6 +3739,10 @@ export declare type ToastOptions = {
|
|
|
3479
3739
|
description?: string | default_2.ReactNode;
|
|
3480
3740
|
type?: AlertStatus;
|
|
3481
3741
|
duration?: number;
|
|
3742
|
+
/** Haptic feedback intent/pattern when this toast appears. Set `false` to disable. */
|
|
3743
|
+
haptic?: HapticInput;
|
|
3744
|
+
/** Disable haptic feedback for this toast. */
|
|
3745
|
+
disableHaptic?: boolean;
|
|
3482
3746
|
};
|
|
3483
3747
|
|
|
3484
3748
|
export declare type ToastType = AlertStatus;
|
|
@@ -3513,8 +3777,9 @@ export declare interface ToolbarOptions {
|
|
|
3513
3777
|
*
|
|
3514
3778
|
* Hover label for icons, truncated text, and contextual hints.
|
|
3515
3779
|
* On touch / mobile devices, tapping the trigger toggles the tooltip open
|
|
3516
|
-
* and an outside tap dismisses it — ensuring the content is
|
|
3517
|
-
* without relying on hover events.
|
|
3780
|
+
* and an outside tap dismisses it by default — ensuring the content is accessible
|
|
3781
|
+
* without relying on hover events. For controls with a primary tap action, set
|
|
3782
|
+
* `toggleOnTouch={false}` so taps pass through.
|
|
3518
3783
|
*
|
|
3519
3784
|
* @example
|
|
3520
3785
|
* ```tsx
|
|
@@ -3527,7 +3792,7 @@ export declare interface ToolbarOptions {
|
|
|
3527
3792
|
* </Tooltip>
|
|
3528
3793
|
* ```
|
|
3529
3794
|
*/
|
|
3530
|
-
export declare function Tooltip({ label, children, placement, ...props }: TooltipProps): JSX_2.Element;
|
|
3795
|
+
export declare function Tooltip({ label, children, placement, toggleOnTouch, ...props }: TooltipProps): JSX_2.Element;
|
|
3531
3796
|
|
|
3532
3797
|
declare type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
3533
3798
|
|
|
@@ -3542,6 +3807,25 @@ export declare interface TooltipProps extends Omit<TooltipRootProps, 'content'>
|
|
|
3542
3807
|
* @default "top"
|
|
3543
3808
|
*/
|
|
3544
3809
|
placement?: TooltipPlacement;
|
|
3810
|
+
/**
|
|
3811
|
+
* On touch/coarse-pointer devices, toggles tooltip open/close on tap by default
|
|
3812
|
+
* for accessibility. Set to `false` for controls with a primary tap action
|
|
3813
|
+
* (links/buttons/icon actions) so the tap is not intercepted.
|
|
3814
|
+
* @default true
|
|
3815
|
+
*/
|
|
3816
|
+
toggleOnTouch?: boolean;
|
|
3817
|
+
}
|
|
3818
|
+
|
|
3819
|
+
/**
|
|
3820
|
+
* Trigger haptic feedback. Returns true if a vibration call was attempted.
|
|
3821
|
+
* Always safe to call (SSR/no-support/reduced-motion/disabled => false).
|
|
3822
|
+
*/
|
|
3823
|
+
export declare function triggerHaptic(input: HapticInput, options?: TriggerHapticOptions): boolean;
|
|
3824
|
+
|
|
3825
|
+
declare interface TriggerHapticOptions {
|
|
3826
|
+
config?: ResolvedHapticsConfig | HapticsConfig | boolean | null;
|
|
3827
|
+
/** Bypass reduced-motion preference check (use sparingly). */
|
|
3828
|
+
force?: boolean;
|
|
3545
3829
|
}
|
|
3546
3830
|
|
|
3547
3831
|
/**
|
|
@@ -3718,6 +4002,26 @@ export declare interface UseColorSchemeResult {
|
|
|
3718
4002
|
isPurple: boolean;
|
|
3719
4003
|
}
|
|
3720
4004
|
|
|
4005
|
+
/**
|
|
4006
|
+
* Access haptics configuration and trigger helpers.
|
|
4007
|
+
*
|
|
4008
|
+
* Safe to use without `MedixProvider` (falls back to defaults and no provider crash).
|
|
4009
|
+
*/
|
|
4010
|
+
export declare function useHaptics(): UseHapticsResult;
|
|
4011
|
+
|
|
4012
|
+
export declare interface UseHapticsResult {
|
|
4013
|
+
/** Whether the Vibration API is available in this runtime. */
|
|
4014
|
+
isSupported: boolean;
|
|
4015
|
+
/** Effective enabled state after config and reduced-motion preference. */
|
|
4016
|
+
isEnabled: boolean;
|
|
4017
|
+
/** Trigger a haptic intent or custom pattern. Returns true if attempted. */
|
|
4018
|
+
trigger: (input: HapticInput) => boolean;
|
|
4019
|
+
/** Cancel ongoing vibration (best effort). */
|
|
4020
|
+
cancel: () => void;
|
|
4021
|
+
/** Resolved haptics configuration from provider/defaults. */
|
|
4022
|
+
config: ResolvedHapticsConfig;
|
|
4023
|
+
}
|
|
4024
|
+
|
|
3721
4025
|
/**
|
|
3722
4026
|
* Convenience hook for checking whether the active MedixDeck theme is dark.
|
|
3723
4027
|
*/
|