@medixdeck/ui 0.1.26 → 0.1.28
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/LICENSE +21 -21
- package/README.md +44 -78
- package/dist/index.cjs +65 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +369 -62
- package/dist/index.js +11032 -13260
- package/dist/index.js.map +1 -1
- package/package.json +28 -23
- package/third-party/DOMPurify-LICENSE +202 -0
- package/third-party/NOTICE +4 -0
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
|
/**
|
|
@@ -1194,7 +1232,7 @@ export declare interface DashboardUser {
|
|
|
1194
1232
|
* />
|
|
1195
1233
|
* ```
|
|
1196
1234
|
*/
|
|
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;
|
|
1235
|
+
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
1236
|
|
|
1199
1237
|
export declare interface DataTableProps<T = Record<string, unknown>> {
|
|
1200
1238
|
columns: Column<T>[];
|
|
@@ -1234,6 +1272,10 @@ export declare interface DataTableProps<T = Record<string, unknown>> {
|
|
|
1234
1272
|
* @default false
|
|
1235
1273
|
*/
|
|
1236
1274
|
stickyFirstColumn?: boolean;
|
|
1275
|
+
/** Haptic feedback intent/pattern for sort/row interactions. Set `false` to disable. */
|
|
1276
|
+
haptic?: HapticInput;
|
|
1277
|
+
/** Disable haptic feedback for table interactions. */
|
|
1278
|
+
disableHaptic?: boolean;
|
|
1237
1279
|
}
|
|
1238
1280
|
|
|
1239
1281
|
/**
|
|
@@ -1251,7 +1293,7 @@ export declare interface DataTableProps<T = Record<string, unknown>> {
|
|
|
1251
1293
|
* />
|
|
1252
1294
|
* ```
|
|
1253
1295
|
*/
|
|
1254
|
-
export declare function DatePicker({ value, onChange, min, max, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, placeholder, id, includeTime, }: DatePickerProps): JSX_2.Element;
|
|
1296
|
+
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
1297
|
|
|
1256
1298
|
export declare interface DatePickerProps {
|
|
1257
1299
|
/** Controlled value (ISO date string: YYYY-MM-DD) */
|
|
@@ -1272,6 +1314,15 @@ export declare interface DatePickerProps {
|
|
|
1272
1314
|
id?: string;
|
|
1273
1315
|
/** Whether to also show time input */
|
|
1274
1316
|
includeTime?: boolean;
|
|
1317
|
+
/** Haptic feedback intent/pattern on open/selection. Set `false` to disable. */
|
|
1318
|
+
haptic?: HapticInput;
|
|
1319
|
+
/** Disable haptic feedback for this date picker. */
|
|
1320
|
+
disableHaptic?: boolean;
|
|
1321
|
+
'aria-label'?: string;
|
|
1322
|
+
'aria-labelledby'?: string;
|
|
1323
|
+
'aria-describedby'?: string;
|
|
1324
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
1325
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
1275
1326
|
}
|
|
1276
1327
|
|
|
1277
1328
|
/**
|
|
@@ -1290,7 +1341,7 @@ export declare interface DatePickerProps {
|
|
|
1290
1341
|
* />
|
|
1291
1342
|
* ```
|
|
1292
1343
|
*/
|
|
1293
|
-
export declare function DateRangePicker({ startValue, onStartChange, endValue, onEndChange, min, max, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, startPlaceholder, endPlaceholder, id, }: DateRangePickerProps): JSX_2.Element;
|
|
1344
|
+
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
1345
|
|
|
1295
1346
|
export declare interface DateRangePickerProps {
|
|
1296
1347
|
/** Controlled start date value (ISO date string: YYYY-MM-DD) */
|
|
@@ -1313,8 +1364,19 @@ export declare interface DateRangePickerProps {
|
|
|
1313
1364
|
startPlaceholder?: string;
|
|
1314
1365
|
endPlaceholder?: string;
|
|
1315
1366
|
id?: string;
|
|
1367
|
+
/** Haptic feedback intent/pattern on open/selection. Set `false` to disable. */
|
|
1368
|
+
haptic?: HapticInput;
|
|
1369
|
+
/** Disable haptic feedback for this date range picker. */
|
|
1370
|
+
disableHaptic?: boolean;
|
|
1371
|
+
'aria-label'?: string;
|
|
1372
|
+
'aria-labelledby'?: string;
|
|
1373
|
+
'aria-describedby'?: string;
|
|
1374
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
1375
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
1316
1376
|
}
|
|
1317
1377
|
|
|
1378
|
+
export declare const DEFAULT_HAPTIC_PATTERNS: Record<HapticIntent, HapticPattern>;
|
|
1379
|
+
|
|
1318
1380
|
export declare const dismissToast: (id: string) => void;
|
|
1319
1381
|
|
|
1320
1382
|
/**
|
|
@@ -1392,7 +1454,7 @@ export declare const DRAFT_STORAGE_PREFIX = "medix_rte_draft_";
|
|
|
1392
1454
|
* </Drawer>
|
|
1393
1455
|
* ```
|
|
1394
1456
|
*/
|
|
1395
|
-
export declare function Drawer({ isOpen, onClose, title, placement, size, closeOnOverlayClick, closeOnEscape, footer, children, }: DrawerProps): JSX_2.Element;
|
|
1457
|
+
export declare function Drawer({ isOpen, onClose, title, placement, size, closeOnOverlayClick, closeOnEscape, footer, children, haptic, disableHaptic, }: DrawerProps): JSX_2.Element;
|
|
1396
1458
|
|
|
1397
1459
|
export declare type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|
|
1398
1460
|
|
|
@@ -1406,6 +1468,10 @@ export declare interface DrawerProps {
|
|
|
1406
1468
|
closeOnEscape?: boolean;
|
|
1407
1469
|
footer?: default_2.ReactNode;
|
|
1408
1470
|
children?: default_2.ReactNode;
|
|
1471
|
+
/** Haptic feedback intent/pattern when the drawer closes. Set `false` to disable. */
|
|
1472
|
+
haptic?: HapticInput;
|
|
1473
|
+
/** Disable haptic feedback for drawer close actions. */
|
|
1474
|
+
disableHaptic?: boolean;
|
|
1409
1475
|
}
|
|
1410
1476
|
|
|
1411
1477
|
export declare type DrawerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
@@ -1456,7 +1522,7 @@ export declare interface EmptyStateProps extends BoxProps {
|
|
|
1456
1522
|
* />
|
|
1457
1523
|
* ```
|
|
1458
1524
|
*/
|
|
1459
|
-
export declare function FileUpload({ accept, multiple, maxSize, label, helperText, errorMessage, colorScheme, isInvalid, isDisabled, onChange, dropzoneTitle, id, }: FileUploadProps): JSX_2.Element;
|
|
1525
|
+
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
1526
|
|
|
1461
1527
|
export declare interface FileUploadProps {
|
|
1462
1528
|
/** Accepted file types (e.g. ".pdf,.jpg,.png" or "image/*") */
|
|
@@ -1478,6 +1544,15 @@ export declare interface FileUploadProps {
|
|
|
1478
1544
|
dropzoneTitle?: string;
|
|
1479
1545
|
/** Custom ID for the file input */
|
|
1480
1546
|
id?: string;
|
|
1547
|
+
/** Haptic feedback intent/pattern on file selection/error. Set `false` to disable. */
|
|
1548
|
+
haptic?: HapticInput;
|
|
1549
|
+
/** Disable haptic feedback for file upload interactions. */
|
|
1550
|
+
disableHaptic?: boolean;
|
|
1551
|
+
'aria-label'?: string;
|
|
1552
|
+
'aria-labelledby'?: string;
|
|
1553
|
+
'aria-describedby'?: string;
|
|
1554
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
1555
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
1481
1556
|
}
|
|
1482
1557
|
|
|
1483
1558
|
export { Flex }
|
|
@@ -1571,11 +1646,12 @@ export declare interface FooterSection {
|
|
|
1571
1646
|
* MedixDeck FormControl
|
|
1572
1647
|
*
|
|
1573
1648
|
* Wrapper for form fields that adds label, helper text, and error display.
|
|
1649
|
+
* Wires label association and ARIA helper/error descriptions to the child control.
|
|
1574
1650
|
*
|
|
1575
1651
|
* @example
|
|
1576
1652
|
* ```tsx
|
|
1577
1653
|
* <FormControl label="Email address" isRequired errorMessage="Please enter a valid email.">
|
|
1578
|
-
* <Input type="email" placeholder="you@example.com"
|
|
1654
|
+
* <Input type="email" placeholder="you@example.com" />
|
|
1579
1655
|
* </FormControl>
|
|
1580
1656
|
* ```
|
|
1581
1657
|
*/
|
|
@@ -1648,13 +1724,55 @@ export { Grid }
|
|
|
1648
1724
|
|
|
1649
1725
|
export { GridItem }
|
|
1650
1726
|
|
|
1651
|
-
|
|
1727
|
+
/** Accept semantic intents, custom patterns, or false/null to disable. */
|
|
1728
|
+
export declare type HapticInput = HapticIntent | HapticPattern | false | null | undefined;
|
|
1652
1729
|
|
|
1653
|
-
|
|
1730
|
+
/**
|
|
1731
|
+
* MedixDeck Haptics
|
|
1732
|
+
*
|
|
1733
|
+
* Lightweight, SSR-safe haptic feedback utilities for web/PWA environments.
|
|
1734
|
+
* Uses the Vibration API when available (primarily Android/Chromium). iOS
|
|
1735
|
+
* Safari does not support navigator.vibrate, so calls become graceful no-ops
|
|
1736
|
+
* unless an experimental fallback is added in the future.
|
|
1737
|
+
*
|
|
1738
|
+
* Haptics are an enhancement, never the only signal. Visual/state feedback and
|
|
1739
|
+
* accessibility semantics must remain primary.
|
|
1740
|
+
*/
|
|
1741
|
+
export declare type HapticIntent = 'selection' | 'impactLight' | 'impactMedium' | 'impactHeavy' | 'success' | 'warning' | 'error' | 'notification';
|
|
1742
|
+
|
|
1743
|
+
/** Vibration API-compatible pattern: duration in ms or [vibrate, pause, ...]. */
|
|
1744
|
+
export declare type HapticPattern = number | number[];
|
|
1745
|
+
|
|
1746
|
+
export declare interface HapticsConfig {
|
|
1747
|
+
/** Master enable switch. @default true */
|
|
1748
|
+
enabled?: boolean;
|
|
1749
|
+
/** Suppress haptics when prefers-reduced-motion matches. @default true */
|
|
1750
|
+
respectReducedMotion?: boolean;
|
|
1751
|
+
/** Override default intent patterns. */
|
|
1752
|
+
patterns?: Partial<Record<HapticIntent, HapticPattern>>;
|
|
1753
|
+
/** Execution strategy. @default "vibration" */
|
|
1754
|
+
strategy?: 'vibration' | 'none';
|
|
1755
|
+
/** Emit debug logs in development. @default false */
|
|
1756
|
+
debug?: boolean;
|
|
1757
|
+
}
|
|
1654
1758
|
|
|
1655
1759
|
/**
|
|
1656
|
-
*
|
|
1760
|
+
* Internal provider for haptics configuration. `MedixProvider` renders this
|
|
1761
|
+
* automatically; consumers typically do not need to use it directly.
|
|
1657
1762
|
*/
|
|
1763
|
+
export declare function HapticsProvider({ haptics, children }: HapticsProviderProps): JSX_2.Element;
|
|
1764
|
+
|
|
1765
|
+
export declare interface HapticsProviderProps {
|
|
1766
|
+
/** Haptics configuration or boolean shorthand. @default true */
|
|
1767
|
+
haptics?: boolean | HapticsConfig;
|
|
1768
|
+
children: default_2.ReactNode;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
export { Heading }
|
|
1772
|
+
|
|
1773
|
+
export { HStack }
|
|
1774
|
+
|
|
1775
|
+
/** Convert existing editor HTML identically in browsers and DOM-free SSR. */
|
|
1658
1776
|
export declare function htmlToMarkdown(html: string): string;
|
|
1659
1777
|
|
|
1660
1778
|
/**
|
|
@@ -1708,6 +1826,10 @@ export declare interface IconButtonProps {
|
|
|
1708
1826
|
isRound?: boolean;
|
|
1709
1827
|
/** Disabled state */
|
|
1710
1828
|
disabled?: boolean;
|
|
1829
|
+
/** Haptic feedback intent/pattern on press. Set `false` to disable. */
|
|
1830
|
+
haptic?: HapticInput;
|
|
1831
|
+
/** Disable haptic feedback for this button. */
|
|
1832
|
+
disableHaptic?: boolean;
|
|
1711
1833
|
/** HTML type attribute */
|
|
1712
1834
|
type?: 'button' | 'submit' | 'reset';
|
|
1713
1835
|
/** Click handler */
|
|
@@ -1752,6 +1874,9 @@ export declare interface InputProps extends Omit<InputProps_2, 'size'> {
|
|
|
1752
1874
|
errorMessage?: string;
|
|
1753
1875
|
}
|
|
1754
1876
|
|
|
1877
|
+
/** True when the user prefers reduced motion. Safe during SSR. */
|
|
1878
|
+
export declare function isReducedMotionPreferred(): boolean;
|
|
1879
|
+
|
|
1755
1880
|
export { Link }
|
|
1756
1881
|
|
|
1757
1882
|
/**
|
|
@@ -1809,6 +1934,9 @@ export declare type LogoType = 'full' | 'icon';
|
|
|
1809
1934
|
|
|
1810
1935
|
export declare type LogoVariant = 'blue' | 'purple' | 'black' | 'white';
|
|
1811
1936
|
|
|
1937
|
+
/**
|
|
1938
|
+
* Converts HTML content to clean, standard Markdown text.
|
|
1939
|
+
*/
|
|
1812
1940
|
/**
|
|
1813
1941
|
* Converts standard Markdown text to HTML.
|
|
1814
1942
|
*/
|
|
@@ -1882,7 +2010,7 @@ export declare const medixConfig: SystemConfig;
|
|
|
1882
2010
|
* }
|
|
1883
2011
|
* ```
|
|
1884
2012
|
*/
|
|
1885
|
-
export declare function MedixProvider({ children, defaultColorMode, forcedColorMode, }: MedixProviderProps): JSX_2.Element;
|
|
2013
|
+
export declare function MedixProvider({ children, defaultColorMode, forcedColorMode, haptics, }: MedixProviderProps): JSX_2.Element;
|
|
1886
2014
|
|
|
1887
2015
|
export declare interface MedixProviderProps {
|
|
1888
2016
|
children: default_2.ReactNode;
|
|
@@ -1895,6 +2023,12 @@ export declare interface MedixProviderProps {
|
|
|
1895
2023
|
* Force a specific color mode (disables user toggle)
|
|
1896
2024
|
*/
|
|
1897
2025
|
forcedColorMode?: 'light' | 'dark';
|
|
2026
|
+
/**
|
|
2027
|
+
* Global haptic feedback configuration. Pass `false` to disable all haptics.
|
|
2028
|
+
* Respects `prefers-reduced-motion` by default on supported devices.
|
|
2029
|
+
* @default true
|
|
2030
|
+
*/
|
|
2031
|
+
haptics?: boolean | HapticsConfig;
|
|
1898
2032
|
}
|
|
1899
2033
|
|
|
1900
2034
|
/**
|
|
@@ -1916,7 +2050,7 @@ export declare interface MedixProviderProps {
|
|
|
1916
2050
|
* </Modal>
|
|
1917
2051
|
* ```
|
|
1918
2052
|
*/
|
|
1919
|
-
export declare function Modal({ isOpen, onClose, title, description, size, closeOnOverlayClick, closeOnEscape, footer, children, mobileVariant, }: ModalProps): JSX_2.Element;
|
|
2053
|
+
export declare function Modal({ isOpen, onClose, title, description, size, closeOnOverlayClick, closeOnEscape, footer, children, mobileVariant, haptic, disableHaptic, }: ModalProps): JSX_2.Element;
|
|
1920
2054
|
|
|
1921
2055
|
export declare type ModalMobileVariant = 'centered' | 'bottom-sheet';
|
|
1922
2056
|
|
|
@@ -1939,10 +2073,21 @@ export declare interface ModalProps {
|
|
|
1939
2073
|
* @default "bottom-sheet"
|
|
1940
2074
|
*/
|
|
1941
2075
|
mobileVariant?: ModalMobileVariant;
|
|
2076
|
+
/** Haptic feedback intent/pattern when the modal closes. Set `false` to disable. */
|
|
2077
|
+
haptic?: HapticInput;
|
|
2078
|
+
/** Disable haptic feedback for modal close actions. */
|
|
2079
|
+
disableHaptic?: boolean;
|
|
1942
2080
|
}
|
|
1943
2081
|
|
|
1944
2082
|
export declare type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
1945
2083
|
|
|
2084
|
+
declare interface MultiSelectProps extends SelectCommonProps {
|
|
2085
|
+
multiple: true;
|
|
2086
|
+
value?: string[];
|
|
2087
|
+
defaultValue?: string[] | string;
|
|
2088
|
+
onChange?: (value: string[]) => void;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
1946
2091
|
/**
|
|
1947
2092
|
* MedixDeck Navbar
|
|
1948
2093
|
*
|
|
@@ -2134,11 +2279,11 @@ export declare interface NewsletterProps {
|
|
|
2134
2279
|
*
|
|
2135
2280
|
* export default function NotFound() {
|
|
2136
2281
|
* const router = useRouter();
|
|
2137
|
-
* return <NotFoundPage onAction={() => router.push("/")} />;
|
|
2282
|
+
* return <NotFoundPage onAction={() => router.push("/")} colorScheme="purple" />;
|
|
2138
2283
|
* }
|
|
2139
2284
|
* ```
|
|
2140
2285
|
*/
|
|
2141
|
-
export declare function NotFoundPage({ title, description, errorMessage, actionLabel, onAction, secondaryLabel, onSecondaryAction, ...props }: NotFoundPageProps): JSX_2.Element;
|
|
2286
|
+
export declare function NotFoundPage({ title, description, errorMessage, actionLabel, onAction, secondaryLabel, onSecondaryAction, colorScheme, ...props }: NotFoundPageProps): JSX_2.Element;
|
|
2142
2287
|
|
|
2143
2288
|
export declare interface NotFoundPageProps extends BoxProps {
|
|
2144
2289
|
/** Optional custom title. Defaults to "Page Not Found" */
|
|
@@ -2155,6 +2300,11 @@ export declare interface NotFoundPageProps extends BoxProps {
|
|
|
2155
2300
|
secondaryLabel?: string;
|
|
2156
2301
|
/** Secondary button onClick handler */
|
|
2157
2302
|
onSecondaryAction?: () => void;
|
|
2303
|
+
/**
|
|
2304
|
+
* Brand accent for the CTA buttons and the "404" watermark.
|
|
2305
|
+
* @default "blue"
|
|
2306
|
+
*/
|
|
2307
|
+
colorScheme?: 'blue' | 'purple';
|
|
2158
2308
|
}
|
|
2159
2309
|
|
|
2160
2310
|
/**
|
|
@@ -2173,7 +2323,7 @@ export declare interface NotFoundPageProps extends BoxProps {
|
|
|
2173
2323
|
* />
|
|
2174
2324
|
* ```
|
|
2175
2325
|
*/
|
|
2176
|
-
export declare function OTPInput({ length, value, defaultValue, onChange, onComplete, colorScheme, isInvalid, isDisabled, mask, label, helperText, errorMessage, }: OTPInputProps): JSX_2.Element;
|
|
2326
|
+
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;
|
|
2177
2327
|
|
|
2178
2328
|
export declare interface OTPInputProps {
|
|
2179
2329
|
/** Number of digits */
|
|
@@ -2192,12 +2342,22 @@ export declare interface OTPInputProps {
|
|
|
2192
2342
|
isDisabled?: boolean;
|
|
2193
2343
|
/** Whether to mask like a password */
|
|
2194
2344
|
mask?: boolean;
|
|
2345
|
+
/** Haptic feedback intent/pattern on digit entry/complete. Set `false` to disable. */
|
|
2346
|
+
haptic?: HapticInput;
|
|
2347
|
+
/** Disable haptic feedback for OTP interactions. */
|
|
2348
|
+
disableHaptic?: boolean;
|
|
2195
2349
|
/** Label above the input */
|
|
2196
2350
|
label?: string;
|
|
2197
2351
|
/** Helper text */
|
|
2198
2352
|
helperText?: string;
|
|
2199
2353
|
/** Error message */
|
|
2200
2354
|
errorMessage?: string;
|
|
2355
|
+
id?: string;
|
|
2356
|
+
'aria-label'?: string;
|
|
2357
|
+
'aria-labelledby'?: string;
|
|
2358
|
+
'aria-describedby'?: string;
|
|
2359
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
2360
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
2201
2361
|
}
|
|
2202
2362
|
|
|
2203
2363
|
/**
|
|
@@ -2208,7 +2368,9 @@ export declare interface OTPInputProps {
|
|
|
2208
2368
|
* <Pagination total={245} pageSize={10} currentPage={3} onChange={setPage} />
|
|
2209
2369
|
* ```
|
|
2210
2370
|
*/
|
|
2211
|
-
export declare function Pagination({ total, pageSize, currentPage, onChange, siblingCount, showEdges, compact, ...props }: PaginationProps): JSX_2.Element | null;
|
|
2371
|
+
export declare function Pagination({ total, pageSize, currentPage, onChange, siblingCount, showEdges, compact, colorScheme, haptic, disableHaptic, ...props }: PaginationProps): JSX_2.Element | null;
|
|
2372
|
+
|
|
2373
|
+
export declare type PaginationColorScheme = 'blue' | 'purple';
|
|
2212
2374
|
|
|
2213
2375
|
export declare interface PaginationProps extends Omit<BoxProps, 'onChange'> {
|
|
2214
2376
|
/** Total number of items */
|
|
@@ -2225,6 +2387,15 @@ export declare interface PaginationProps extends Omit<BoxProps, 'onChange'> {
|
|
|
2225
2387
|
showEdges?: boolean;
|
|
2226
2388
|
/** Compact mode */
|
|
2227
2389
|
compact?: boolean;
|
|
2390
|
+
/**
|
|
2391
|
+
* Brand accent color for active/interactive pagination controls.
|
|
2392
|
+
* @default "blue"
|
|
2393
|
+
*/
|
|
2394
|
+
colorScheme?: PaginationColorScheme;
|
|
2395
|
+
/** Haptic feedback intent/pattern on page change. Set `false` to disable. */
|
|
2396
|
+
haptic?: HapticInput;
|
|
2397
|
+
/** Disable haptic feedback for pagination. */
|
|
2398
|
+
disableHaptic?: boolean;
|
|
2228
2399
|
}
|
|
2229
2400
|
|
|
2230
2401
|
/**
|
|
@@ -2292,7 +2463,7 @@ export declare interface PatientTimelineProps extends Omit<BoxProps, 'onChange'>
|
|
|
2292
2463
|
* />
|
|
2293
2464
|
* ```
|
|
2294
2465
|
*/
|
|
2295
|
-
export declare function PhoneInput({ value, onChange, showCountryCode, showCountryFlag, defaultCountryCode, defaultCountry, placeholder, colorScheme, isInvalid, errorMessage, label, helperText, isDisabled, id, }: PhoneInputProps): JSX_2.Element;
|
|
2466
|
+
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;
|
|
2296
2467
|
|
|
2297
2468
|
export declare interface PhoneInputProps {
|
|
2298
2469
|
/** Controlled value (full number including country code prefix) */
|
|
@@ -2318,6 +2489,11 @@ export declare interface PhoneInputProps {
|
|
|
2318
2489
|
helperText?: string;
|
|
2319
2490
|
isDisabled?: boolean;
|
|
2320
2491
|
id?: string;
|
|
2492
|
+
'aria-label'?: string;
|
|
2493
|
+
'aria-labelledby'?: string;
|
|
2494
|
+
'aria-describedby'?: string;
|
|
2495
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
2496
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
2321
2497
|
}
|
|
2322
2498
|
|
|
2323
2499
|
export declare const PinInput: typeof OTPInput;
|
|
@@ -2433,10 +2609,11 @@ export declare interface ProgressProps extends BoxProps {
|
|
|
2433
2609
|
* title="Install MedixDeck"
|
|
2434
2610
|
* description="Get faster access and offline support."
|
|
2435
2611
|
* delaySeconds={5}
|
|
2612
|
+
* colorScheme="purple"
|
|
2436
2613
|
* />
|
|
2437
2614
|
* ```
|
|
2438
2615
|
*/
|
|
2439
|
-
export declare function PWAInstallPrompt({ title, description, installLabel, dismissLabel, cooldownDays, onInstall, onDismiss, appName, icon, position, delaySeconds, forceVisible, forceIOS, }: PWAInstallPromptProps): JSX_2.Element;
|
|
2616
|
+
export declare function PWAInstallPrompt({ title, description, installLabel, dismissLabel, cooldownDays, onInstall, onDismiss, appName, icon, position, colorScheme, delaySeconds, forceVisible, forceIOS, }: PWAInstallPromptProps): JSX_2.Element;
|
|
2440
2617
|
|
|
2441
2618
|
export declare namespace PWAInstallPrompt {
|
|
2442
2619
|
var displayName: string;
|
|
@@ -2472,13 +2649,19 @@ export declare interface PWAInstallPromptProps {
|
|
|
2472
2649
|
* @default "bottom"
|
|
2473
2650
|
*/
|
|
2474
2651
|
position?: 'top' | 'bottom';
|
|
2652
|
+
/**
|
|
2653
|
+
* Brand accent for the install button, iOS share icon, and step badges.
|
|
2654
|
+
* @default "blue"
|
|
2655
|
+
*/
|
|
2656
|
+
colorScheme?: 'blue' | 'purple';
|
|
2475
2657
|
/**
|
|
2476
2658
|
* Number of seconds to delay the prompt after the conditions are met.
|
|
2477
2659
|
* @default 0
|
|
2478
2660
|
*/
|
|
2479
2661
|
delaySeconds?: number;
|
|
2480
2662
|
/**
|
|
2481
|
-
* For documentation/storybook purposes.
|
|
2663
|
+
* For documentation/storybook purposes only. Bypasses installation and cooldown
|
|
2664
|
+
* checks without capturing a browser install event. Omit in production apps.
|
|
2482
2665
|
*/
|
|
2483
2666
|
forceVisible?: boolean;
|
|
2484
2667
|
/**
|
|
@@ -2541,7 +2724,7 @@ export declare const radiiTokens: {
|
|
|
2541
2724
|
* />
|
|
2542
2725
|
* ```
|
|
2543
2726
|
*/
|
|
2544
|
-
export declare function RadioGroup({ name, value: controlledValue, onChange, options, colorScheme, direction, }: RadioGroupProps): JSX_2.Element;
|
|
2727
|
+
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;
|
|
2545
2728
|
|
|
2546
2729
|
export declare interface RadioGroupProps {
|
|
2547
2730
|
name: string;
|
|
@@ -2552,6 +2735,16 @@ export declare interface RadioGroupProps {
|
|
|
2552
2735
|
/** Brand color for the selected dot */
|
|
2553
2736
|
colorScheme?: 'blue' | 'purple';
|
|
2554
2737
|
direction?: 'row' | 'column';
|
|
2738
|
+
/** Haptic feedback intent/pattern on selection. Set `false` to disable. */
|
|
2739
|
+
haptic?: HapticInput;
|
|
2740
|
+
/** Disable haptic feedback for this radio group. */
|
|
2741
|
+
disableHaptic?: boolean;
|
|
2742
|
+
id?: string;
|
|
2743
|
+
'aria-label'?: string;
|
|
2744
|
+
'aria-labelledby'?: string;
|
|
2745
|
+
'aria-describedby'?: string;
|
|
2746
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
2747
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
2555
2748
|
}
|
|
2556
2749
|
|
|
2557
2750
|
export declare interface RadioOption {
|
|
@@ -2561,6 +2754,17 @@ export declare interface RadioOption {
|
|
|
2561
2754
|
disabled?: boolean;
|
|
2562
2755
|
}
|
|
2563
2756
|
|
|
2757
|
+
export declare interface ResolvedHapticsConfig {
|
|
2758
|
+
enabled: boolean;
|
|
2759
|
+
respectReducedMotion: boolean;
|
|
2760
|
+
patterns: Record<HapticIntent, HapticPattern>;
|
|
2761
|
+
strategy: 'vibration' | 'none';
|
|
2762
|
+
debug: boolean;
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
/** Resolve an input intent/pattern to a concrete Vibration API pattern. */
|
|
2766
|
+
export declare function resolveHapticPattern(input: HapticInput, config?: ResolvedHapticsConfig | HapticsConfig | boolean | null): HapticPattern | null;
|
|
2767
|
+
|
|
2564
2768
|
export declare interface RichTextDraftPayload {
|
|
2565
2769
|
/** The saved text/HTML/Markdown content */
|
|
2566
2770
|
content: string;
|
|
@@ -2591,7 +2795,7 @@ export declare const RichTextEditor: typeof RichTextInput;
|
|
|
2591
2795
|
* <RichTextInput outputFormat="markdown" onChange={setMarkdown} />
|
|
2592
2796
|
* ```
|
|
2593
2797
|
*/
|
|
2594
|
-
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;
|
|
2798
|
+
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;
|
|
2595
2799
|
|
|
2596
2800
|
export declare namespace RichTextInput {
|
|
2597
2801
|
var displayName: string;
|
|
@@ -2650,6 +2854,10 @@ export declare interface RichTextInputProps {
|
|
|
2650
2854
|
showCharCount?: boolean;
|
|
2651
2855
|
/** Customize visible toolbar controls */
|
|
2652
2856
|
toolbarOptions?: ToolbarOptions;
|
|
2857
|
+
/** Haptic feedback intent/pattern for toolbar actions and mode toggles. Set `false` to disable. */
|
|
2858
|
+
haptic?: HapticInput;
|
|
2859
|
+
/** Disable haptic feedback for rich text interactions. */
|
|
2860
|
+
disableHaptic?: boolean;
|
|
2653
2861
|
/** Additional CSS class on the wrapper */
|
|
2654
2862
|
className?: string;
|
|
2655
2863
|
/**
|
|
@@ -2681,6 +2889,11 @@ export declare interface RichTextInputProps {
|
|
|
2681
2889
|
* Callback invoked when a saved draft is restored from localStorage on mount.
|
|
2682
2890
|
*/
|
|
2683
2891
|
onDraftRestored?: (draft: RichTextDraftPayload) => void;
|
|
2892
|
+
'aria-label'?: string;
|
|
2893
|
+
'aria-labelledby'?: string;
|
|
2894
|
+
'aria-describedby'?: string;
|
|
2895
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
2896
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
2684
2897
|
}
|
|
2685
2898
|
|
|
2686
2899
|
/**
|
|
@@ -2749,13 +2962,7 @@ export declare interface SectionHeaderProps extends BoxProps {
|
|
|
2749
2962
|
*/
|
|
2750
2963
|
export declare function Select(props: SelectProps): JSX_2.Element;
|
|
2751
2964
|
|
|
2752
|
-
|
|
2753
|
-
value: string;
|
|
2754
|
-
label: string;
|
|
2755
|
-
disabled?: boolean;
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
|
-
export declare interface SelectProps {
|
|
2965
|
+
declare interface SelectCommonProps {
|
|
2759
2966
|
options?: SelectOption[];
|
|
2760
2967
|
placeholder?: string;
|
|
2761
2968
|
isInvalid?: boolean;
|
|
@@ -2766,19 +2973,33 @@ export declare interface SelectProps {
|
|
|
2766
2973
|
children?: default_2.ReactNode;
|
|
2767
2974
|
/** Optional icon to render on the left side of the select field */
|
|
2768
2975
|
icon?: default_2.ReactNode;
|
|
2769
|
-
value?: string | string[];
|
|
2770
|
-
defaultValue?: string | string[];
|
|
2771
|
-
onChange?: (value: any) => void;
|
|
2772
2976
|
name?: string;
|
|
2773
2977
|
id?: string;
|
|
2774
2978
|
disabled?: boolean;
|
|
2775
|
-
|
|
2979
|
+
/** Haptic feedback intent/pattern on selection/toggle. Set `false` to disable. */
|
|
2980
|
+
haptic?: HapticInput;
|
|
2981
|
+
/** Disable haptic feedback for this select. */
|
|
2982
|
+
disableHaptic?: boolean;
|
|
2776
2983
|
onBlur?: default_2.FocusEventHandler<HTMLDivElement | HTMLInputElement>;
|
|
2777
2984
|
onFocus?: default_2.FocusEventHandler<HTMLDivElement | HTMLInputElement>;
|
|
2778
2985
|
style?: default_2.CSSProperties;
|
|
2779
2986
|
className?: string;
|
|
2987
|
+
/** Accessible label/description wiring for custom trigger */
|
|
2988
|
+
'aria-label'?: string;
|
|
2989
|
+
'aria-labelledby'?: string;
|
|
2990
|
+
'aria-describedby'?: string;
|
|
2991
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
2992
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2995
|
+
export declare interface SelectOption {
|
|
2996
|
+
value: string;
|
|
2997
|
+
label: string;
|
|
2998
|
+
disabled?: boolean;
|
|
2780
2999
|
}
|
|
2781
3000
|
|
|
3001
|
+
export declare type SelectProps = SingleSelectProps | MultiSelectProps;
|
|
3002
|
+
|
|
2782
3003
|
/**
|
|
2783
3004
|
* MedixDeck ServerErrorPage (500)
|
|
2784
3005
|
*
|
|
@@ -2791,11 +3012,11 @@ export declare interface SelectProps {
|
|
|
2791
3012
|
* import { ServerErrorPage } from "@medixdeck/ui";
|
|
2792
3013
|
*
|
|
2793
3014
|
* export default function Error({ error, reset }: { error: Error; reset: () => void }) {
|
|
2794
|
-
* return <ServerErrorPage errorMessage={error.message} onAction={() => reset()} />;
|
|
3015
|
+
* return <ServerErrorPage errorMessage={error.message} onAction={() => reset()} colorScheme="purple" />;
|
|
2795
3016
|
* }
|
|
2796
3017
|
* ```
|
|
2797
3018
|
*/
|
|
2798
|
-
export declare function ServerErrorPage({ title, description, errorMessage, actionLabel, onAction, secondaryLabel, onSecondaryAction, ...props }: ServerErrorPageProps): JSX_2.Element;
|
|
3019
|
+
export declare function ServerErrorPage({ title, description, errorMessage, actionLabel, onAction, secondaryLabel, onSecondaryAction, colorScheme, ...props }: ServerErrorPageProps): JSX_2.Element;
|
|
2799
3020
|
|
|
2800
3021
|
export declare interface ServerErrorPageProps extends BoxProps {
|
|
2801
3022
|
/** Optional custom title. Defaults to "Something went wrong" */
|
|
@@ -2812,6 +3033,12 @@ export declare interface ServerErrorPageProps extends BoxProps {
|
|
|
2812
3033
|
secondaryLabel?: string;
|
|
2813
3034
|
/** Secondary button onClick handler */
|
|
2814
3035
|
onSecondaryAction?: () => void;
|
|
3036
|
+
/**
|
|
3037
|
+
* Brand accent for the CTA buttons.
|
|
3038
|
+
* The error icon stays red as a status color on all schemes.
|
|
3039
|
+
* @default "blue"
|
|
3040
|
+
*/
|
|
3041
|
+
colorScheme?: 'blue' | 'purple';
|
|
2815
3042
|
}
|
|
2816
3043
|
|
|
2817
3044
|
export declare const shadowTokens: {
|
|
@@ -2843,6 +3070,13 @@ export declare const shadowTokens: {
|
|
|
2843
3070
|
|
|
2844
3071
|
export { SimpleGrid }
|
|
2845
3072
|
|
|
3073
|
+
declare interface SingleSelectProps extends SelectCommonProps {
|
|
3074
|
+
multiple?: false;
|
|
3075
|
+
value?: string;
|
|
3076
|
+
defaultValue?: string | string[];
|
|
3077
|
+
onChange?: (value: string) => void;
|
|
3078
|
+
}
|
|
3079
|
+
|
|
2846
3080
|
/**
|
|
2847
3081
|
* MedixDeck Skeleton
|
|
2848
3082
|
*
|
|
@@ -3044,12 +3278,21 @@ export declare interface SwitchProps {
|
|
|
3044
3278
|
defaultChecked?: boolean;
|
|
3045
3279
|
onChange?: (checked: boolean) => void;
|
|
3046
3280
|
disabled?: boolean;
|
|
3281
|
+
/** Haptic feedback intent/pattern on toggle. Set `false` to disable. */
|
|
3282
|
+
haptic?: HapticInput;
|
|
3283
|
+
/** Disable haptic feedback for this switch. */
|
|
3284
|
+
disableHaptic?: boolean;
|
|
3047
3285
|
/** Label shown to the right */
|
|
3048
3286
|
label?: string;
|
|
3049
3287
|
/** Helper text shown below the label */
|
|
3050
3288
|
description?: string;
|
|
3051
3289
|
name?: string;
|
|
3052
3290
|
id?: string;
|
|
3291
|
+
'aria-label'?: string;
|
|
3292
|
+
'aria-labelledby'?: string;
|
|
3293
|
+
'aria-describedby'?: string;
|
|
3294
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
3295
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
3053
3296
|
}
|
|
3054
3297
|
|
|
3055
3298
|
export declare const system: SystemContext;
|
|
@@ -3075,7 +3318,9 @@ export declare interface TabItem {
|
|
|
3075
3318
|
* />
|
|
3076
3319
|
* ```
|
|
3077
3320
|
*/
|
|
3078
|
-
export declare function Tabs({ tabs, defaultActiveId, activeId: controlledId, onChange, variant, size, renderContent, ...props }: TabsProps): JSX_2.Element;
|
|
3321
|
+
export declare function Tabs({ tabs, defaultActiveId, activeId: controlledId, onChange, variant, size, renderContent, colorScheme, haptic, disableHaptic, ...props }: TabsProps): JSX_2.Element;
|
|
3322
|
+
|
|
3323
|
+
export declare type TabsColorScheme = 'blue' | 'purple';
|
|
3079
3324
|
|
|
3080
3325
|
export declare interface TabsProps extends Omit<BoxProps, 'onChange'> {
|
|
3081
3326
|
tabs: TabItem[];
|
|
@@ -3085,16 +3330,27 @@ export declare interface TabsProps extends Omit<BoxProps, 'onChange'> {
|
|
|
3085
3330
|
variant?: 'line' | 'pill';
|
|
3086
3331
|
size?: 'sm' | 'md' | 'lg';
|
|
3087
3332
|
renderContent?: boolean;
|
|
3333
|
+
/**
|
|
3334
|
+
* Brand accent color for line variant active/hover/focus states and badges.
|
|
3335
|
+
* @default "blue"
|
|
3336
|
+
*/
|
|
3337
|
+
colorScheme?: TabsColorScheme;
|
|
3338
|
+
/** Haptic feedback intent/pattern on tab change. Set `false` to disable. */
|
|
3339
|
+
haptic?: HapticInput;
|
|
3340
|
+
/** Disable haptic feedback for tab changes. */
|
|
3341
|
+
disableHaptic?: boolean;
|
|
3088
3342
|
}
|
|
3089
3343
|
|
|
3090
3344
|
/**
|
|
3091
3345
|
* MedixDeck Tag / Chip
|
|
3092
3346
|
*
|
|
3093
3347
|
* For filters, categories, and selections.
|
|
3348
|
+
* Includes a leading dot by default for quick visual scanning.
|
|
3094
3349
|
*
|
|
3095
3350
|
* @example
|
|
3096
3351
|
* ```tsx
|
|
3097
3352
|
* <Tag colorScheme="blue" variant="subtle">Cardiology</Tag>
|
|
3353
|
+
* <Tag colorScheme="purple" variant="solid" showDot={false}>No dot</Tag>
|
|
3098
3354
|
* ```
|
|
3099
3355
|
*/
|
|
3100
3356
|
export declare const Tag: default_2.ForwardRefExoticComponent<TagProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -3108,6 +3364,8 @@ export declare type TagInputProps = TagsInputProps;
|
|
|
3108
3364
|
export declare interface TagProps extends BoxProps {
|
|
3109
3365
|
variant?: TagVariant;
|
|
3110
3366
|
colorScheme?: TagColorScheme;
|
|
3367
|
+
/** Show a leading status dot. Dotted tags are the default. */
|
|
3368
|
+
showDot?: boolean;
|
|
3111
3369
|
/** Optional close-button handler */
|
|
3112
3370
|
onClose?: () => void;
|
|
3113
3371
|
children: default_2.ReactNode;
|
|
@@ -3130,7 +3388,7 @@ export declare interface TagProps extends BoxProps {
|
|
|
3130
3388
|
* />
|
|
3131
3389
|
* ```
|
|
3132
3390
|
*/
|
|
3133
|
-
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;
|
|
3391
|
+
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;
|
|
3134
3392
|
|
|
3135
3393
|
export declare interface TagsInputProps {
|
|
3136
3394
|
/** Array of tag strings */
|
|
@@ -3167,9 +3425,18 @@ export declare interface TagsInputProps {
|
|
|
3167
3425
|
id?: string;
|
|
3168
3426
|
/** HTML input name */
|
|
3169
3427
|
name?: string;
|
|
3428
|
+
/** Haptic feedback intent/pattern on tag add/remove. Set `false` to disable. */
|
|
3429
|
+
haptic?: HapticInput;
|
|
3430
|
+
/** Disable haptic feedback for tags interactions. */
|
|
3431
|
+
disableHaptic?: boolean;
|
|
3170
3432
|
/** Extra container styles */
|
|
3171
3433
|
style?: default_2.CSSProperties;
|
|
3172
3434
|
className?: string;
|
|
3435
|
+
'aria-label'?: string;
|
|
3436
|
+
'aria-labelledby'?: string;
|
|
3437
|
+
'aria-describedby'?: string;
|
|
3438
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
3439
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
3173
3440
|
}
|
|
3174
3441
|
|
|
3175
3442
|
export declare type TagVariant = 'solid' | 'subtle' | 'outline';
|
|
@@ -3495,8 +3762,9 @@ export declare interface ToolbarOptions {
|
|
|
3495
3762
|
*
|
|
3496
3763
|
* Hover label for icons, truncated text, and contextual hints.
|
|
3497
3764
|
* On touch / mobile devices, tapping the trigger toggles the tooltip open
|
|
3498
|
-
* and an outside tap dismisses it — ensuring the content is
|
|
3499
|
-
* without relying on hover events.
|
|
3765
|
+
* and an outside tap dismisses it by default — ensuring the content is accessible
|
|
3766
|
+
* without relying on hover events. For controls with a primary tap action, set
|
|
3767
|
+
* `toggleOnTouch={false}` so taps pass through.
|
|
3500
3768
|
*
|
|
3501
3769
|
* @example
|
|
3502
3770
|
* ```tsx
|
|
@@ -3509,7 +3777,7 @@ export declare interface ToolbarOptions {
|
|
|
3509
3777
|
* </Tooltip>
|
|
3510
3778
|
* ```
|
|
3511
3779
|
*/
|
|
3512
|
-
export declare function Tooltip({ label, children, placement, ...props }: TooltipProps): JSX_2.Element;
|
|
3780
|
+
export declare function Tooltip({ label, children, placement, toggleOnTouch, ...props }: TooltipProps): JSX_2.Element;
|
|
3513
3781
|
|
|
3514
3782
|
declare type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
3515
3783
|
|
|
@@ -3524,6 +3792,25 @@ export declare interface TooltipProps extends Omit<TooltipRootProps, 'content'>
|
|
|
3524
3792
|
* @default "top"
|
|
3525
3793
|
*/
|
|
3526
3794
|
placement?: TooltipPlacement;
|
|
3795
|
+
/**
|
|
3796
|
+
* On touch/coarse-pointer devices, toggles tooltip open/close on tap by default
|
|
3797
|
+
* for accessibility. Set to `false` for controls with a primary tap action
|
|
3798
|
+
* (links/buttons/icon actions) so the tap is not intercepted.
|
|
3799
|
+
* @default true
|
|
3800
|
+
*/
|
|
3801
|
+
toggleOnTouch?: boolean;
|
|
3802
|
+
}
|
|
3803
|
+
|
|
3804
|
+
/**
|
|
3805
|
+
* Trigger haptic feedback. Returns true if a vibration call was attempted.
|
|
3806
|
+
* Always safe to call (SSR/no-support/reduced-motion/disabled => false).
|
|
3807
|
+
*/
|
|
3808
|
+
export declare function triggerHaptic(input: HapticInput, options?: TriggerHapticOptions): boolean;
|
|
3809
|
+
|
|
3810
|
+
declare interface TriggerHapticOptions {
|
|
3811
|
+
config?: ResolvedHapticsConfig | HapticsConfig | boolean | null;
|
|
3812
|
+
/** Bypass reduced-motion preference check (use sparingly). */
|
|
3813
|
+
force?: boolean;
|
|
3527
3814
|
}
|
|
3528
3815
|
|
|
3529
3816
|
/**
|
|
@@ -3700,6 +3987,26 @@ export declare interface UseColorSchemeResult {
|
|
|
3700
3987
|
isPurple: boolean;
|
|
3701
3988
|
}
|
|
3702
3989
|
|
|
3990
|
+
/**
|
|
3991
|
+
* Access haptics configuration and trigger helpers.
|
|
3992
|
+
*
|
|
3993
|
+
* Safe to use without `MedixProvider` (falls back to defaults and no provider crash).
|
|
3994
|
+
*/
|
|
3995
|
+
export declare function useHaptics(): UseHapticsResult;
|
|
3996
|
+
|
|
3997
|
+
export declare interface UseHapticsResult {
|
|
3998
|
+
/** Whether the Vibration API is available in this runtime. */
|
|
3999
|
+
isSupported: boolean;
|
|
4000
|
+
/** Effective enabled state after config and reduced-motion preference. */
|
|
4001
|
+
isEnabled: boolean;
|
|
4002
|
+
/** Trigger a haptic intent or custom pattern. Returns true if attempted. */
|
|
4003
|
+
trigger: (input: HapticInput) => boolean;
|
|
4004
|
+
/** Cancel ongoing vibration (best effort). */
|
|
4005
|
+
cancel: () => void;
|
|
4006
|
+
/** Resolved haptics configuration from provider/defaults. */
|
|
4007
|
+
config: ResolvedHapticsConfig;
|
|
4008
|
+
}
|
|
4009
|
+
|
|
3703
4010
|
/**
|
|
3704
4011
|
* Convenience hook for checking whether the active MedixDeck theme is dark.
|
|
3705
4012
|
*/
|