@yuno-payments/dashboard-design-system 3.1.0-beta.7 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +42 -42
- package/dist/index.d.ts +698 -48
- package/dist/index.js +14993 -13553
- package/dist/styles.css +1 -1
- package/dist/tokens.css +5 -5
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,10 @@ import { ClassValue } from 'clsx';
|
|
|
7
7
|
import { Column } from '@tanstack/react-table';
|
|
8
8
|
import { ColumnDef } from '@tanstack/react-table';
|
|
9
9
|
import { ColumnResizeMode } from '@tanstack/react-table';
|
|
10
|
+
import { Command as Command_2 } from 'cmdk';
|
|
10
11
|
import { ComponentProps } from 'react';
|
|
11
12
|
import { DateRange } from 'react-day-picker';
|
|
13
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
12
14
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
13
15
|
import { ElementType } from 'react';
|
|
14
16
|
import { ForwardRefExoticComponent } from 'react';
|
|
@@ -254,7 +256,7 @@ declare const Alert_2: React_2.ForwardRefExoticComponent<AlertProps_2 & React_2.
|
|
|
254
256
|
* else. What the `actions` prop below replaces is narrower: call sites that
|
|
255
257
|
* were hand-rolling a row of buttons inside the description.
|
|
256
258
|
*/
|
|
257
|
-
export declare interface AlertProps extends Omit<ComponentProps<typeof Alert_2>, 'children' | 'dismiss'> {
|
|
259
|
+
export declare interface AlertProps extends Omit<ComponentProps<typeof Alert_2>, 'children' | 'dismiss' | 'action'> {
|
|
258
260
|
/** Icon shown at the start of the alert. */
|
|
259
261
|
icon?: IconName;
|
|
260
262
|
/** Alert title/heading. */
|
|
@@ -414,8 +416,8 @@ export declare interface BadgeProps extends ComponentProps<typeof Badge_2> {
|
|
|
414
416
|
|
|
415
417
|
declare type BadgeVariant = NonNullable<ComponentProps<typeof Badge>['variant']>;
|
|
416
418
|
|
|
417
|
-
declare const badgeVariants: (props?: {
|
|
418
|
-
variant?: "default" | "info" | "warning" | "success" | "destructive" | "alert" | "secondary" | "outline" | "error";
|
|
419
|
+
export declare const badgeVariants: (props?: {
|
|
420
|
+
variant?: "default" | "info" | "warning" | "success" | "destructive" | "alert" | "secondary" | "outline" | "error" | "verified";
|
|
419
421
|
} & ClassProp) => string;
|
|
420
422
|
|
|
421
423
|
/**
|
|
@@ -497,9 +499,10 @@ export declare const BulkActionBar: ForwardRefExoticComponent<BulkActionBarProps
|
|
|
497
499
|
|
|
498
500
|
export declare interface BulkActionBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
499
501
|
/**
|
|
500
|
-
* Whether the bar is shown. While closed the bar stays mounted
|
|
501
|
-
*
|
|
502
|
-
* while closing if you don't want "0 selected"
|
|
502
|
+
* Whether the bar is shown. While closed the bar stays mounted so the exit
|
|
503
|
+
* transition can play, but it leaves the accessibility tree and stops taking
|
|
504
|
+
* focus — freeze your label while closing if you don't want "0 selected"
|
|
505
|
+
* flashing during it.
|
|
503
506
|
*/
|
|
504
507
|
open: boolean;
|
|
505
508
|
/**
|
|
@@ -594,7 +597,7 @@ declare type ButtonSize = 'default' | 'sm' | 'lg' | 'icon';
|
|
|
594
597
|
|
|
595
598
|
declare type ButtonVariant = 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
596
599
|
|
|
597
|
-
declare const buttonVariants: (props?: {
|
|
600
|
+
export declare const buttonVariants: (props?: {
|
|
598
601
|
variant?: "default" | "destructive" | "link" | "secondary" | "outline" | "ghost";
|
|
599
602
|
size?: "default" | "sm" | "lg" | "icon";
|
|
600
603
|
} & ClassProp) => string;
|
|
@@ -835,6 +838,59 @@ export declare interface CheckboxProps extends Omit<ComponentProps<typeof Checkb
|
|
|
835
838
|
info?: string;
|
|
836
839
|
}
|
|
837
840
|
|
|
841
|
+
export declare const ChoiceChips: React_2.ForwardRefExoticComponent<ChoiceChipsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
842
|
+
|
|
843
|
+
export declare interface ChoiceChipsOption {
|
|
844
|
+
/**
|
|
845
|
+
* Value reported in `onValueChange`. Must be unique among the options.
|
|
846
|
+
*/
|
|
847
|
+
value: string;
|
|
848
|
+
/**
|
|
849
|
+
* Visible text of the chip, also its accessible name.
|
|
850
|
+
*/
|
|
851
|
+
label: string;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export declare interface ChoiceChipsProps {
|
|
855
|
+
/**
|
|
856
|
+
* Chips to render, in order.
|
|
857
|
+
*/
|
|
858
|
+
options: ChoiceChipsOption[];
|
|
859
|
+
/**
|
|
860
|
+
* Selected values. They are reported back in the order of `options`.
|
|
861
|
+
*/
|
|
862
|
+
value: string[];
|
|
863
|
+
/**
|
|
864
|
+
* Fired with the new selection when a chip is toggled.
|
|
865
|
+
*/
|
|
866
|
+
onValueChange: (value: string[]) => void;
|
|
867
|
+
/**
|
|
868
|
+
* Id of the element holding the question, used as the group's
|
|
869
|
+
* `aria-labelledby`.
|
|
870
|
+
*/
|
|
871
|
+
labelledBy: string;
|
|
872
|
+
/**
|
|
873
|
+
* Largest number of chips that can be selected. Once reached, the
|
|
874
|
+
* unselected chips are disabled until one is released.
|
|
875
|
+
*/
|
|
876
|
+
max?: number;
|
|
877
|
+
/**
|
|
878
|
+
* Writing direction of the chips. When omitted, it is inherited from the
|
|
879
|
+
* nearest ancestor with a `dir` attribute other than `<html>` or `<body>`,
|
|
880
|
+
* then from the current language, and only then from the document root.
|
|
881
|
+
*/
|
|
882
|
+
dir?: 'ltr' | 'rtl';
|
|
883
|
+
/**
|
|
884
|
+
* Disables every chip and blocks changes.
|
|
885
|
+
* @default false
|
|
886
|
+
*/
|
|
887
|
+
disabled?: boolean;
|
|
888
|
+
/**
|
|
889
|
+
* Additional classes for the outer container.
|
|
890
|
+
*/
|
|
891
|
+
className?: string;
|
|
892
|
+
}
|
|
893
|
+
|
|
838
894
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
839
895
|
|
|
840
896
|
/**
|
|
@@ -1000,6 +1056,106 @@ export declare interface ComboboxProps {
|
|
|
1000
1056
|
"aria-labelledby"?: string;
|
|
1001
1057
|
}
|
|
1002
1058
|
|
|
1059
|
+
/**
|
|
1060
|
+
* A searchable list of commands.
|
|
1061
|
+
*
|
|
1062
|
+
* Follows Pagination's shape, which is the model in this library for a
|
|
1063
|
+
* component that is useful both ways: `Command` takes data, and the parts it is
|
|
1064
|
+
* built from are exported beside it (`CommandRoot`, `CommandInput`, …) for a
|
|
1065
|
+
* call site that needs to lay one out itself. The parts already existed in
|
|
1066
|
+
* vendor/ and were used by SearchSelect and MultiSelect; they were simply never
|
|
1067
|
+
* exported.
|
|
1068
|
+
*
|
|
1069
|
+
* The props are the family's — `options`, `groups`, `searchPlaceholder`,
|
|
1070
|
+
* `emptyState`, `maxHeight`, `className`, `id` — so this reads like Select,
|
|
1071
|
+
* SearchSelect and Combobox. The one deviation is `onSelect`, explained above.
|
|
1072
|
+
*
|
|
1073
|
+
* @example
|
|
1074
|
+
* ```tsx
|
|
1075
|
+
* <Command
|
|
1076
|
+
* searchPlaceholder="Search actions"
|
|
1077
|
+
* options={[
|
|
1078
|
+
* { value: 'refund', label: 'Refund payment', icon: 'ArrowUUpLeft' },
|
|
1079
|
+
* { value: 'export', label: 'Export CSV', shortcut: '⌘E' },
|
|
1080
|
+
* ]}
|
|
1081
|
+
* onSelect={run}
|
|
1082
|
+
* />
|
|
1083
|
+
* ```
|
|
1084
|
+
*/
|
|
1085
|
+
export declare const Command: ForwardRefExoticComponent<CommandProps & RefAttributes<HTMLDivElement>>;
|
|
1086
|
+
|
|
1087
|
+
export declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React_2.ComponentProps<typeof Dialog_2> & {
|
|
1088
|
+
title?: string;
|
|
1089
|
+
description?: string;
|
|
1090
|
+
className?: string;
|
|
1091
|
+
showCloseButton?: boolean;
|
|
1092
|
+
}): JSX_2.Element;
|
|
1093
|
+
|
|
1094
|
+
export declare function CommandEmpty({ ...props }: React_2.ComponentProps<typeof Command_2.Empty>): JSX_2.Element;
|
|
1095
|
+
|
|
1096
|
+
export declare function CommandGroup({ className, ...props }: React_2.ComponentProps<typeof Command_2.Group>): JSX_2.Element;
|
|
1097
|
+
|
|
1098
|
+
export declare function CommandInput({ className, ...props }: React_2.ComponentProps<typeof Command_2.Input>): JSX_2.Element;
|
|
1099
|
+
|
|
1100
|
+
export declare function CommandItem({ className, ...props }: React_2.ComponentProps<typeof Command_2.Item>): JSX_2.Element;
|
|
1101
|
+
|
|
1102
|
+
export declare function CommandList({ className, ...props }: React_2.ComponentProps<typeof Command_2.List>): JSX_2.Element;
|
|
1103
|
+
|
|
1104
|
+
/** A single command. `value` is what `onSelect` reports. */
|
|
1105
|
+
export declare interface CommandOption {
|
|
1106
|
+
value: string;
|
|
1107
|
+
label: string;
|
|
1108
|
+
/** Second line under the label, for when the label alone is ambiguous. */
|
|
1109
|
+
description?: string;
|
|
1110
|
+
/** Leading icon. Sized by the component; do not pass a size. */
|
|
1111
|
+
icon?: IconName;
|
|
1112
|
+
/** Trailing hint, e.g. "⌘K". Right-aligned by CommandShortcut. */
|
|
1113
|
+
shortcut?: string;
|
|
1114
|
+
disabled?: boolean;
|
|
1115
|
+
/**
|
|
1116
|
+
* Extra text the search should match on. The label and description are
|
|
1117
|
+
* already searched; this is for synonyms a merchant might type instead.
|
|
1118
|
+
*/
|
|
1119
|
+
keywords?: string[];
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/** A titled run of commands. An untitled group still separates visually. */
|
|
1123
|
+
export declare interface CommandOptionGroup {
|
|
1124
|
+
label?: string;
|
|
1125
|
+
options: CommandOption[];
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
export declare interface CommandProps {
|
|
1129
|
+
/** Flat list of commands. Ignored when `groups` is passed. */
|
|
1130
|
+
options?: CommandOption[];
|
|
1131
|
+
/** Grouped commands. Takes precedence over `options`. */
|
|
1132
|
+
groups?: CommandOptionGroup[];
|
|
1133
|
+
/**
|
|
1134
|
+
* Fired when a command is chosen, with its `value`.
|
|
1135
|
+
*
|
|
1136
|
+
* Not `onChange`, which every other component in this family uses: those
|
|
1137
|
+
* report a new value that persists, and a command reports an action that
|
|
1138
|
+
* fires and leaves no state behind. cmdk calls it onSelect too.
|
|
1139
|
+
*/
|
|
1140
|
+
onSelect?: (value: string) => void;
|
|
1141
|
+
/** Placeholder for the search box. */
|
|
1142
|
+
searchPlaceholder?: string;
|
|
1143
|
+
/** Hide the search box for a plain, short list. @default true */
|
|
1144
|
+
withSearch?: boolean;
|
|
1145
|
+
/** Shown when nothing matches the search. */
|
|
1146
|
+
emptyState?: ReactNode;
|
|
1147
|
+
/** Caps the scrolling list. Accepts a number of pixels or any CSS length. */
|
|
1148
|
+
maxHeight?: number | string;
|
|
1149
|
+
className?: string;
|
|
1150
|
+
id?: string;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
export declare function CommandRoot({ className, ...props }: React_2.ComponentProps<typeof Command_2>): JSX_2.Element;
|
|
1154
|
+
|
|
1155
|
+
export declare function CommandSeparator({ className, ...props }: React_2.ComponentProps<typeof Command_2.Separator>): JSX_2.Element;
|
|
1156
|
+
|
|
1157
|
+
export declare function CommandShortcut({ className, ...props }: React_2.ComponentProps<'span'>): JSX_2.Element;
|
|
1158
|
+
|
|
1003
1159
|
/**
|
|
1004
1160
|
* Confirm/cancel modal for destructive or irreversible actions, built on
|
|
1005
1161
|
* `Dialog`. Encapsulates the per-module `ConfirmationDialog` that recipients
|
|
@@ -1020,7 +1176,7 @@ export declare interface ComboboxProps {
|
|
|
1020
1176
|
* ```
|
|
1021
1177
|
*/
|
|
1022
1178
|
export declare const ConfirmationDialog: {
|
|
1023
|
-
({ open, onClose, onConfirm, title, description, confirmLabel, cancelLabel, variant, isLoading, confirmDisabled, children, }: ConfirmationDialogProps): JSX_2.Element;
|
|
1179
|
+
({ open, onClose, onConfirm, title, description, confirmLabel, cancelLabel, variant, isLoading, confirmDisabled, children, widthContainer, }: ConfirmationDialogProps): JSX_2.Element;
|
|
1024
1180
|
displayName: string;
|
|
1025
1181
|
};
|
|
1026
1182
|
|
|
@@ -1074,6 +1230,11 @@ export declare interface ConfirmationDialogProps {
|
|
|
1074
1230
|
* Extra content rendered in the dialog body, below the description.
|
|
1075
1231
|
*/
|
|
1076
1232
|
children?: ReactNode;
|
|
1233
|
+
/**
|
|
1234
|
+
* Desktop width of the dialog container (px or CSS length) — mobile stays
|
|
1235
|
+
* fullscreen. Default: the Dialog's `max-w-md`.
|
|
1236
|
+
*/
|
|
1237
|
+
widthContainer?: number | string;
|
|
1077
1238
|
}
|
|
1078
1239
|
|
|
1079
1240
|
/**
|
|
@@ -1256,7 +1417,7 @@ export declare interface DataItemProps extends Omit<HTMLAttributes<HTMLDivElemen
|
|
|
1256
1417
|
* />
|
|
1257
1418
|
* ```
|
|
1258
1419
|
*/
|
|
1259
|
-
export declare function DataTable<TData, TValue>({ columns, data, isLoading, empty, checkboxSelection, isRowSelectable, rowSelection: externalRowSelection, onRowSelectionChange, enableSorting, manualSorting, sorting: externalSorting, onSortingChange: externalOnSortingChange, enableColumnFilters, enableColumnResizing, columnResizeMode, enableColumnPinning, onRowClick, onRowMouseEnter, onRowMouseLeave, getRowClassName, getRowCanExpand, renderSubComponent, getRowExpandLabel, expanderPosition, expanderHeader, actions, height, rowHeight, className, persistKey, initialSettings, onUpdate, enableColumnDragDrop, lang, translations, }: Readonly<DataTableProps<TData, TValue>>): JSX_2.Element;
|
|
1420
|
+
export declare function DataTable<TData, TValue>({ columns, data, isLoading, empty, checkboxSelection, isRowSelectable, getRowSelectionDisabledReason, getRowSelectLabel, rowSelection: externalRowSelection, onRowSelectionChange, enableSorting, manualSorting, sorting: externalSorting, onSortingChange: externalOnSortingChange, enableColumnFilters, enableColumnResizing, columnResizeMode, enableColumnPinning, onRowClick, onRowMouseEnter, onRowMouseLeave, getRowClassName, getRowCanExpand, renderSubComponent, getRowExpandLabel, expanderPosition, expanderHeader, actions, height, rowHeight, className, persistKey, initialSettings, onUpdate, enableColumnDragDrop, lang, translations, }: Readonly<DataTableProps<TData, TValue>>): JSX_2.Element;
|
|
1260
1421
|
|
|
1261
1422
|
export declare interface DataTableActionsConfig<TData> {
|
|
1262
1423
|
/** Custom render function for complete control */
|
|
@@ -1500,20 +1661,26 @@ export declare interface DataTableCopyCellProps {
|
|
|
1500
1661
|
}
|
|
1501
1662
|
|
|
1502
1663
|
/**
|
|
1503
|
-
* A table cell for
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1664
|
+
* A table cell for a country: a circular flag and the code, or the name.
|
|
1665
|
+
*
|
|
1666
|
+
* The flag was an emoji until DAS-18254, built from regional indicator pairs.
|
|
1667
|
+
* That looked fine on a Mac and failed everywhere else: Windows ships no flag
|
|
1668
|
+
* glyphs, so 24 call sites rendered a bare "US" where a flag was meant to be,
|
|
1669
|
+
* and codes with no glyph at all — XK — were broken on every platform.
|
|
1670
|
+
*
|
|
1671
|
+
* It now serves circular SVGs from dashboard-assets, which unifies three ways
|
|
1672
|
+
* of drawing a flag into one.
|
|
1673
|
+
*
|
|
1674
|
+
* If the image fails — an offline browser, a code the set does not carry — the
|
|
1675
|
+
* cell falls back to the code in a muted chip. A missing flag should not leave
|
|
1676
|
+
* a broken-image icon in a table row.
|
|
1506
1677
|
*
|
|
1507
1678
|
* @example
|
|
1508
1679
|
* ```tsx
|
|
1509
|
-
* // Code with flag
|
|
1510
1680
|
* <DataTableCountryCell code="US" />
|
|
1511
|
-
*
|
|
1512
|
-
* // With country name
|
|
1513
1681
|
* <DataTableCountryCell code="CO" showName getCountryName={countryNameFromCode} />
|
|
1514
|
-
*
|
|
1515
|
-
* // Without flag
|
|
1516
1682
|
* <DataTableCountryCell code="BR" showFlag={false} />
|
|
1683
|
+
* <DataTableCountryCell code="BR" flagBaseUrl="/flags" />
|
|
1517
1684
|
* ```
|
|
1518
1685
|
*/
|
|
1519
1686
|
export declare const DataTableCountryCell: ForwardRefExoticComponent<DataTableCountryCellProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -1521,12 +1688,19 @@ export declare const DataTableCountryCell: ForwardRefExoticComponent<DataTableCo
|
|
|
1521
1688
|
export declare interface DataTableCountryCellProps {
|
|
1522
1689
|
/** ISO 3166-1 alpha-2 country code (e.g., "US", "CO", "BR") */
|
|
1523
1690
|
code: string | null | undefined;
|
|
1524
|
-
/** Whether to show the flag
|
|
1691
|
+
/** Whether to show the flag @default true */
|
|
1525
1692
|
showFlag?: boolean;
|
|
1526
1693
|
/** Whether to show the country name instead of just the code @default false */
|
|
1527
1694
|
showName?: boolean;
|
|
1528
1695
|
/** Custom function to resolve country name from code */
|
|
1529
1696
|
getCountryName?: (code: string) => string;
|
|
1697
|
+
/**
|
|
1698
|
+
* Where the flags are served from, without a trailing slash. The file is
|
|
1699
|
+
* `{baseUrl}/{code}.svg`, lowercased.
|
|
1700
|
+
*
|
|
1701
|
+
* Point it at a self-hosted copy to drop the external request.
|
|
1702
|
+
*/
|
|
1703
|
+
flagBaseUrl?: string;
|
|
1530
1704
|
/** Content to render when code is empty/invalid @default "-" */
|
|
1531
1705
|
emptyState?: ReactNode;
|
|
1532
1706
|
/** Additional CSS classes */
|
|
@@ -1766,6 +1940,18 @@ export declare interface DataTableProps<TData, TValue> {
|
|
|
1766
1940
|
* checkbox and are skipped by "select all".
|
|
1767
1941
|
*/
|
|
1768
1942
|
isRowSelectable?: (rowData: TData) => boolean;
|
|
1943
|
+
/**
|
|
1944
|
+
* Why a row excluded by `isRowSelectable` cannot be selected, shown as a
|
|
1945
|
+
* tooltip over its disabled checkbox. A disabled control with no reason
|
|
1946
|
+
* reads as broken; return `undefined` to show nothing for that row.
|
|
1947
|
+
*/
|
|
1948
|
+
getRowSelectionDisabledReason?: (rowData: TData) => React_2.ReactNode;
|
|
1949
|
+
/**
|
|
1950
|
+
* Accessible name of a row's selection checkbox, from the row's own data
|
|
1951
|
+
* ("Select payment 7f3a…"). Siblings must not share a name; the default
|
|
1952
|
+
* `selectRow` translation gives every row the same one.
|
|
1953
|
+
*/
|
|
1954
|
+
getRowSelectLabel?: (rowData: TData) => string;
|
|
1769
1955
|
/**
|
|
1770
1956
|
* Controlled row selection state (optional)
|
|
1771
1957
|
* If provided, component operates in controlled mode
|
|
@@ -2454,6 +2640,8 @@ export declare interface DetailSectionProps extends Omit<HTMLAttributes<HTMLElem
|
|
|
2454
2640
|
*/
|
|
2455
2641
|
export declare const Dialog: React_2.ForwardRefExoticComponent<DialogProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
2456
2642
|
|
|
2643
|
+
declare function Dialog_2({ ...props }: Readonly<React_2.ComponentProps<typeof DialogPrimitive.Root>>): JSX_2.Element;
|
|
2644
|
+
|
|
2457
2645
|
/**
|
|
2458
2646
|
* Scrollable content area for dialog body.
|
|
2459
2647
|
*
|
|
@@ -2995,6 +3183,93 @@ declare interface ExtendedToasterProps extends Omit<ToasterProps, 'position'> {
|
|
|
2995
3183
|
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
|
|
2996
3184
|
}
|
|
2997
3185
|
|
|
3186
|
+
export declare const FeedbackPrompt: React_2.ForwardRefExoticComponent<FeedbackPromptProps & React_2.RefAttributes<HTMLElement>>;
|
|
3187
|
+
|
|
3188
|
+
export declare interface FeedbackPromptProps {
|
|
3189
|
+
/**
|
|
3190
|
+
* Whether the prompt is shown. When `false` nothing is rendered.
|
|
3191
|
+
*/
|
|
3192
|
+
open: boolean;
|
|
3193
|
+
/**
|
|
3194
|
+
* The question or heading of the prompt.
|
|
3195
|
+
*/
|
|
3196
|
+
title: React_2.ReactNode;
|
|
3197
|
+
/**
|
|
3198
|
+
* Id of the title element. Pass the same id to the controls that answer it
|
|
3199
|
+
* (e.g. `RatingScale` `labelledBy`).
|
|
3200
|
+
*/
|
|
3201
|
+
titleId: string;
|
|
3202
|
+
/**
|
|
3203
|
+
* Short text shown in the header, e.g. "Quick question".
|
|
3204
|
+
*/
|
|
3205
|
+
eyebrow?: React_2.ReactNode;
|
|
3206
|
+
/**
|
|
3207
|
+
* Small decorative icon shown before the eyebrow, inside a tinted circle.
|
|
3208
|
+
*/
|
|
3209
|
+
icon?: React_2.ReactNode;
|
|
3210
|
+
/**
|
|
3211
|
+
* Leading visual shown at the inline start of the title and body, e.g. a
|
|
3212
|
+
* success check on a thank-you step.
|
|
3213
|
+
*/
|
|
3214
|
+
media?: React_2.ReactNode;
|
|
3215
|
+
/**
|
|
3216
|
+
* Changes whenever the content is replaced (e.g. the step of a survey), so
|
|
3217
|
+
* the new content animates in.
|
|
3218
|
+
*/
|
|
3219
|
+
contentKey?: React_2.Key;
|
|
3220
|
+
/**
|
|
3221
|
+
* Shows the close button. Turn it off on a closing thank-you step.
|
|
3222
|
+
* @default true
|
|
3223
|
+
*/
|
|
3224
|
+
showCloseButton?: boolean;
|
|
3225
|
+
/**
|
|
3226
|
+
* Shows a thin bar at the bottom edge that empties over this many
|
|
3227
|
+
* milliseconds, to signal that the prompt is about to close on its own. The
|
|
3228
|
+
* bar is hidden with `prefers-reduced-motion`.
|
|
3229
|
+
*/
|
|
3230
|
+
countdownMs?: number;
|
|
3231
|
+
/**
|
|
3232
|
+
* The body: the controls that answer the prompt.
|
|
3233
|
+
*/
|
|
3234
|
+
children?: React_2.ReactNode;
|
|
3235
|
+
/**
|
|
3236
|
+
* Actions shown at the bottom, e.g. "Later" and "Don't ask again".
|
|
3237
|
+
*/
|
|
3238
|
+
footer?: React_2.ReactNode;
|
|
3239
|
+
/**
|
|
3240
|
+
* Fired by the close button and by Escape while focus is inside the prompt.
|
|
3241
|
+
*/
|
|
3242
|
+
onDismiss: () => void;
|
|
3243
|
+
/**
|
|
3244
|
+
* Accessible name of the close button.
|
|
3245
|
+
*/
|
|
3246
|
+
dismissLabel: string;
|
|
3247
|
+
/**
|
|
3248
|
+
* Writing direction. The prompt sits at the inline end of the viewport, so
|
|
3249
|
+
* it moves to the left in `rtl`. When omitted, it is inherited.
|
|
3250
|
+
*/
|
|
3251
|
+
dir?: 'ltr' | 'rtl';
|
|
3252
|
+
/**
|
|
3253
|
+
* Where the prompt sits. `corner` is a card at the inline-end bottom of the
|
|
3254
|
+
* viewport; `sheet` spans the bottom edge, for narrow screens. Both stay
|
|
3255
|
+
* non-modal.
|
|
3256
|
+
* @default 'corner'
|
|
3257
|
+
*/
|
|
3258
|
+
variant?: FeedbackPromptVariant;
|
|
3259
|
+
/**
|
|
3260
|
+
* Masks the prompt's content in session replays (`data-dd-privacy="mask"`).
|
|
3261
|
+
* Keep it on whenever the prompt collects answers.
|
|
3262
|
+
* @default true
|
|
3263
|
+
*/
|
|
3264
|
+
maskContent?: boolean;
|
|
3265
|
+
/**
|
|
3266
|
+
* Additional classes for the card.
|
|
3267
|
+
*/
|
|
3268
|
+
className?: string;
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3271
|
+
export declare type FeedbackPromptVariant = 'corner' | 'sheet';
|
|
3272
|
+
|
|
2998
3273
|
/**
|
|
2999
3274
|
* Form field component with label, description, error handling, and icon support.
|
|
3000
3275
|
*
|
|
@@ -3038,7 +3313,7 @@ export declare const Field: ForwardRefExoticComponent<FieldProps & RefAttributes
|
|
|
3038
3313
|
* ever passed `info` or `requiredIndicator` to a Label directly. All 14 call
|
|
3039
3314
|
* sites pass them to a field.
|
|
3040
3315
|
*
|
|
3041
|
-
* Not copied into Field / Select / DatePicker /
|
|
3316
|
+
* Not copied into Field / Select / DatePicker / FileUploader because all four
|
|
3042
3317
|
* rendered the identical block, and four copies of a layout is how they drift.
|
|
3043
3318
|
*/
|
|
3044
3319
|
export declare const FieldLabelRow: {
|
|
@@ -3065,7 +3340,7 @@ export declare interface FieldLabelRowProps {
|
|
|
3065
3340
|
/**
|
|
3066
3341
|
* Props for the Field component
|
|
3067
3342
|
*/
|
|
3068
|
-
export declare interface FieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className'> {
|
|
3343
|
+
export declare interface FieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'prefix'> {
|
|
3069
3344
|
/**
|
|
3070
3345
|
* Label text displayed above the input
|
|
3071
3346
|
*/
|
|
@@ -3108,6 +3383,14 @@ export declare interface FieldProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
3108
3383
|
* Additional props to pass to the end icon
|
|
3109
3384
|
*/
|
|
3110
3385
|
endIconProps?: Partial<ComponentProps<typeof Icon>>;
|
|
3386
|
+
/**
|
|
3387
|
+
* Text adornment to display at the start (left side) of the input
|
|
3388
|
+
*/
|
|
3389
|
+
prefix?: ReactNode;
|
|
3390
|
+
/**
|
|
3391
|
+
* Text adornment to display at the end (right side) of the input
|
|
3392
|
+
*/
|
|
3393
|
+
suffix?: ReactNode;
|
|
3111
3394
|
/**
|
|
3112
3395
|
* Layout orientation of the label and input
|
|
3113
3396
|
* @default "vertical"
|
|
@@ -3123,12 +3406,21 @@ export declare interface FieldProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
3123
3406
|
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
3124
3407
|
}
|
|
3125
3408
|
|
|
3409
|
+
/** A file the uploader refused, and the rule it broke. */
|
|
3410
|
+
export declare interface FileRejection {
|
|
3411
|
+
file: File;
|
|
3412
|
+
reason: FileRejectionReason;
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
/** Why a dropped or picked file did not make it into the list. */
|
|
3416
|
+
export declare type FileRejectionReason = 'type' | 'size' | 'limit';
|
|
3417
|
+
|
|
3126
3418
|
/**
|
|
3127
3419
|
* File upload component with drag & drop support and integrated file list.
|
|
3128
3420
|
*
|
|
3129
3421
|
* Includes a dropzone area for selecting/dropping files and an integrated list
|
|
3130
3422
|
* showing upload progress or completion status for each file. The consumer only
|
|
3131
|
-
* needs to render `<
|
|
3423
|
+
* needs to render `<FileUploader />` -- no separate file list component required.
|
|
3132
3424
|
*
|
|
3133
3425
|
* Helper texts ("Supports: PDF, DOCX..." and "10 MB max file size.") are
|
|
3134
3426
|
* auto-generated from the `accept` and `maxSize` props.
|
|
@@ -3137,7 +3429,7 @@ export declare interface FieldProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
3137
3429
|
* ```tsx
|
|
3138
3430
|
* const [files, setFiles] = useState<UploadFile[]>([]);
|
|
3139
3431
|
*
|
|
3140
|
-
* <
|
|
3432
|
+
* <FileUploader
|
|
3141
3433
|
* label="Knowledge base"
|
|
3142
3434
|
* accept=".pdf,.docx,.txt,.csv"
|
|
3143
3435
|
* maxSize={10 * 1024 * 1024}
|
|
@@ -3151,18 +3443,29 @@ export declare interface FieldProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
3151
3443
|
* />
|
|
3152
3444
|
* ```
|
|
3153
3445
|
*/
|
|
3154
|
-
export declare const
|
|
3446
|
+
export declare const FileUploader: ForwardRefExoticComponent<FileUploaderProps & RefAttributes<HTMLInputElement>>;
|
|
3155
3447
|
|
|
3156
3448
|
/**
|
|
3157
|
-
* Props for the
|
|
3449
|
+
* Props for the FileUploader component
|
|
3158
3450
|
*/
|
|
3159
|
-
export declare interface
|
|
3451
|
+
export declare interface FileUploaderProps {
|
|
3160
3452
|
/** Array of upload file objects (controlled) */
|
|
3161
3453
|
value?: UploadFile[];
|
|
3162
3454
|
/** Callback when new files are added (via drop or click). Provides the newly added native File objects */
|
|
3163
3455
|
onFilesAdded?: (files: File[]) => void;
|
|
3164
3456
|
/** Callback to remove a file by id */
|
|
3165
3457
|
onRemove?: (fileId: string) => void;
|
|
3458
|
+
/** Callback to retry a failed upload. Renders the retry control on error rows. */
|
|
3459
|
+
onRetry?: (fileId: string) => void;
|
|
3460
|
+
/**
|
|
3461
|
+
* Callback for files the uploader refused, with the rule each one broke.
|
|
3462
|
+
*
|
|
3463
|
+
* Without it the rejection is silent: `accept` and `maxSize` filter the drop
|
|
3464
|
+
* and the user is left looking at an empty list with no idea why. The reason
|
|
3465
|
+
* is a code rather than a message because the copy belongs to the consumer —
|
|
3466
|
+
* it is the side that has the locales.
|
|
3467
|
+
*/
|
|
3468
|
+
onFilesRejected?: (rejections: FileRejection[]) => void;
|
|
3166
3469
|
/** Accepted file extensions (e.g., ".pdf,.docx,.txt,.csv"). Used for validation AND to auto-generate the "Supports: ..." text */
|
|
3167
3470
|
accept?: string;
|
|
3168
3471
|
/** Maximum file size in bytes (e.g., 10485760 for 10MB). Used for validation AND to auto-generate the "X MB max file size." text */
|
|
@@ -3191,6 +3494,12 @@ export declare interface FileUploadProps {
|
|
|
3191
3494
|
image?: string;
|
|
3192
3495
|
}
|
|
3193
3496
|
|
|
3497
|
+
/**
|
|
3498
|
+
* Every language the filter chrome ships copy for, in a runtime-checkable form
|
|
3499
|
+
* (the `FilterLanguage` union is types-only and erased at build time).
|
|
3500
|
+
*/
|
|
3501
|
+
export declare const FILTER_LANGUAGES: FilterLanguage[];
|
|
3502
|
+
|
|
3194
3503
|
export declare const FilterButton: ForwardRefExoticComponent<Omit<FilterButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
3195
3504
|
|
|
3196
3505
|
export declare interface FilterButtonProps extends Omit<ComponentProps<typeof Button_2>, 'children'> {
|
|
@@ -3250,6 +3559,12 @@ export declare interface FilterConfig {
|
|
|
3250
3559
|
* Items for checkbox/radio type filters
|
|
3251
3560
|
*/
|
|
3252
3561
|
items?: FilterSectionItem[];
|
|
3562
|
+
/**
|
|
3563
|
+
* Hierarchical radio filters: groups render as nested, non-selectable
|
|
3564
|
+
* headings with their items underneath, and `items` follow as standalone
|
|
3565
|
+
* rows. See `FilterSection`.
|
|
3566
|
+
*/
|
|
3567
|
+
groups?: FilterSectionGroup[];
|
|
3253
3568
|
/**
|
|
3254
3569
|
* Selected values for checkbox type filters
|
|
3255
3570
|
*/
|
|
@@ -3450,6 +3765,7 @@ export declare interface FilterDateRangeProps extends ComponentProps<typeof Radi
|
|
|
3450
3765
|
mode?: 'range' | 'single';
|
|
3451
3766
|
singleDayLabel?: string;
|
|
3452
3767
|
showAllTime?: boolean;
|
|
3768
|
+
showTime?: boolean;
|
|
3453
3769
|
className?: string;
|
|
3454
3770
|
/**
|
|
3455
3771
|
* Announcement text to display at the top of the filter (e.g., timezone info)
|
|
@@ -3594,12 +3910,20 @@ export declare interface FilterDropdownProps {
|
|
|
3594
3910
|
* Custom translations (overrides lang-based translations)
|
|
3595
3911
|
*/
|
|
3596
3912
|
translations?: FilterTranslations;
|
|
3913
|
+
/**
|
|
3914
|
+
* Which edge of the trigger row the panel hangs from. `auto` (default)
|
|
3915
|
+
* hangs from the start and, when the panel would run past the viewport —
|
|
3916
|
+
* a trigger placed on the right of a header — slides it back just enough
|
|
3917
|
+
* to fit.
|
|
3918
|
+
* @default 'auto'
|
|
3919
|
+
*/
|
|
3920
|
+
align?: 'start' | 'end' | 'auto';
|
|
3597
3921
|
}
|
|
3598
3922
|
|
|
3599
3923
|
/**
|
|
3600
3924
|
* Supported languages for filter translations
|
|
3601
3925
|
*/
|
|
3602
|
-
declare type FilterLanguage = 'en' | 'es' | 'ja' | 'ar' | 'fr' | 'pt' | 'tr' | 'ru' | 'de' | 'zh';
|
|
3926
|
+
export declare type FilterLanguage = 'en' | 'es' | 'ja' | 'ar' | 'fr' | 'pt' | 'tr' | 'ru' | 'de' | 'zh';
|
|
3603
3927
|
|
|
3604
3928
|
/**
|
|
3605
3929
|
* Sidebar menu displaying available filter options
|
|
@@ -3761,6 +4085,13 @@ export declare interface FilterRadioOptionProps {
|
|
|
3761
4085
|
value: string;
|
|
3762
4086
|
description?: string;
|
|
3763
4087
|
className?: string;
|
|
4088
|
+
/**
|
|
4089
|
+
* Muted text at the end of the row (hierarchical layout). Switches the row
|
|
4090
|
+
* to a single full-width line: label first, qualifier last.
|
|
4091
|
+
*/
|
|
4092
|
+
qualifier?: string;
|
|
4093
|
+
/** Nesting level in a hierarchical layout; each level indents the row. */
|
|
4094
|
+
depth?: number;
|
|
3764
4095
|
}
|
|
3765
4096
|
|
|
3766
4097
|
export declare const FilterSection: ForwardRefExoticComponent<FilterSectionProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -3771,7 +4102,21 @@ declare interface FilterSectionCheckboxProps extends FilterSectionPropsBase {
|
|
|
3771
4102
|
onChange: (selectedValues: string[]) => void;
|
|
3772
4103
|
}
|
|
3773
4104
|
|
|
3774
|
-
|
|
4105
|
+
/**
|
|
4106
|
+
* A non-selectable heading in a hierarchical section. Groups nest through
|
|
4107
|
+
* `groups`; their own `items` render under the heading, indented one level
|
|
4108
|
+
* deeper. Only the items can be picked.
|
|
4109
|
+
*/
|
|
4110
|
+
export declare interface FilterSectionGroup {
|
|
4111
|
+
id: string;
|
|
4112
|
+
label: string;
|
|
4113
|
+
/** Muted text at the end of the heading row, e.g. "13 accounts". */
|
|
4114
|
+
qualifier?: string;
|
|
4115
|
+
items?: FilterSectionItem[];
|
|
4116
|
+
groups?: FilterSectionGroup[];
|
|
4117
|
+
}
|
|
4118
|
+
|
|
4119
|
+
export declare interface FilterSectionItem {
|
|
3775
4120
|
value: string;
|
|
3776
4121
|
label: string;
|
|
3777
4122
|
description?: string;
|
|
@@ -3784,6 +4129,13 @@ export declare type FilterSectionProps = FilterSectionCheckboxProps | FilterSect
|
|
|
3784
4129
|
declare interface FilterSectionPropsBase {
|
|
3785
4130
|
title: string;
|
|
3786
4131
|
items: FilterSectionItem[];
|
|
4132
|
+
/**
|
|
4133
|
+
* Hierarchical layout: groups render as headings nested by depth, with
|
|
4134
|
+
* their items underneath; `items` then follow as standalone rows, without a
|
|
4135
|
+
* heading. Single-column, with each row's `description` at the end. Radio
|
|
4136
|
+
* only.
|
|
4137
|
+
*/
|
|
4138
|
+
groups?: FilterSectionGroup[];
|
|
3787
4139
|
className?: string;
|
|
3788
4140
|
searchable?: boolean;
|
|
3789
4141
|
searchPlaceholder?: string;
|
|
@@ -3892,6 +4244,24 @@ export declare function getDataTableTranslations(lang?: DataTableLanguage): Requ
|
|
|
3892
4244
|
*/
|
|
3893
4245
|
export declare function getDefaultLanguage(): SupportedLanguage;
|
|
3894
4246
|
|
|
4247
|
+
/**
|
|
4248
|
+
* Maps an app language tag onto a supported filter language.
|
|
4249
|
+
*
|
|
4250
|
+
* Consumers hold i18n tags like `es-419` or `pt-BR`; the filter chrome ships
|
|
4251
|
+
* copy per base language. Regional variants collapse to their base tag and
|
|
4252
|
+
* anything unsupported falls back to English — so every module stops
|
|
4253
|
+
* re-declaring its own copy of this mapping.
|
|
4254
|
+
*
|
|
4255
|
+
* @example getFilterLanguage('es-419') // 'es'
|
|
4256
|
+
*/
|
|
4257
|
+
export declare function getFilterLanguage(locale: string): FilterLanguage;
|
|
4258
|
+
|
|
4259
|
+
/**
|
|
4260
|
+
* Get translations for a specific language
|
|
4261
|
+
* Falls back to localStorage language, then to English if not found
|
|
4262
|
+
*/
|
|
4263
|
+
export declare function getFilterTranslations(lang?: FilterLanguage): Required<FilterTranslations>;
|
|
4264
|
+
|
|
3895
4265
|
/**
|
|
3896
4266
|
* Prominent banner component for highlighting important information or calls-to-action.
|
|
3897
4267
|
* Features an icon in a circular container, title, description, and optional action button.
|
|
@@ -3982,7 +4352,7 @@ export declare const Icon: ForwardRefExoticComponent<IconProps & RefAttributes<H
|
|
|
3982
4352
|
* To add an icon, just add its PascalCase name here (it must exist in the
|
|
3983
4353
|
* Phosphor set: https://phosphoricons.com).
|
|
3984
4354
|
*/
|
|
3985
|
-
export declare const ICON_NAMES: readonly ["Activity", "AidaLogo", "Archive", "ArrowBendUpLeft", "ArrowBendUpRight", "ArrowCircleLeft", "ArrowCircleRight", "ArrowCircleUp", "ArrowCircleUpLeft", "ArrowClockwise", "ArrowCounterClockwise", "ArrowDown", "ArrowElbowDownRight", "ArrowLeft", "ArrowRight", "ArrowSquareIn", "ArrowSquareOut", "ArrowUp", "ArrowUpRight", "ArrowsClockwise", "ArrowsCounterClockwise", "ArrowsDownUp", "ArrowsInSimple", "ArrowsLeftRight", "ArrowsOutSimple", "Bank", "BellRinging", "BellSimple", "BellSimpleSlash", "Binoculars", "BoundingBox", "BracketsAngle", "BracketsCurly", "BracketsSquare", "BugBeetle", "Buildings", "Calendar", "CalendarDots", "CalendarBlank", "CalendarCheck", "CalendarPlus", "Camera", "Cards", "CaretCircleRight", "CaretDoubleLeft", "CaretDoubleRight", "CaretDown", "CaretLeft", "CaretRight", "CaretUp", "CaretUpDown", "Certificate", "ChartBar", "ChartLine", "ChartLineUp", "ChartPie", "Check", "CheckCircle", "CheckSquare", "CheckSquareOffset", "Circle", "CircleNotch", "Clock", "ClockClockwise", "ClockCountdown", "ClockCounterClockwise", "CloudSlash", "Code", "Columns", "Concierge", "Copy", "CopySimple", "CreditCard", "GoogleLogo", "AppleLogo", "PaypalLogo", "CurrencyCircleDollar", "CurrencyDollar", "Desktop", "Detective", "DeviceMobileCamera", "DeviceMobileSpeaker", "DotsNine", "DotsSixVertical", "DotsThree", "DotsThreeCircleVertical", "DotsThreeOutline", "DotsThreeVertical", "Download", "DownloadSimple", "Envelope", "Equals", "Eraser", "Export", "Eye", "EyeClosed", "EyeSlash", "File", "FileArchive", "FileArrowUp", "FileCsv", "FileDoc", "FileJpg", "FilePdf", "FilePlus", "FilePng", "FilePpt", "FileSearch", "FileMagnifyingGlass", "FileTxt", "FileXls", "FileZip", "Flag", "FlagBanner", "FunnelSimple", "Gear", "GearFine", "GearSix", "GitBranch", "GitFork", "GlobeHemisphereWest", "Hash", "Headset", "IdentificationCard", "Image", "ImageSquare", "Info", "Intersect", "Key", "Layout", "Lifebuoy", "Lightbulb", "Lightning", "LinkBreak", "LinkSimple", "LinkSimpleHorizontal", "List", "ListBullets", "ListChecks", "ListNumbers", "ListPlus", "Lock", "LockKey", "MagicWand", "MagnifyingGlass", "MapPin", "Microphone", "Minus", "MinusCircle", "Money", "Monitor", "Moon", "Network", "NetworkSlash", "NotePencil", "Notepad", "Notification", "NumberCircleOne", "Package", "Palette", "Password", "Pause", "PauseCircle", "Pencil", "PencilSimple", "PencilSimpleLine", "Percent", "Phone", "PhoneCall", "PhoneOutgoing", "PhonePlus", "PhoneSlash", "PhoneX", "Play", "PlayCircle", "Plug", "Plugs", "Plus", "PlusCircle", "Prohibit", "PushPin", "PushPinSimple", "PushPinSimpleSlash", "Question", "Queue", "RadioButton", "Repeat", "Rows", "SelectionInverse", "ShareNetwork", "ShieldCheck", "ShieldSlash", "ShieldWarning", "ShoppingCart", "ShoppingCartSimple", "Sidebar", "SignOut", "SortAscending", "SortDescending", "Sparkle", "Square", "SquareHalf", "SquareHalfBottom", "SquaresFour", "Stack", "Star", "Storefront", "Stop", "Sun", "Swap", "Swatches", "Table", "Tag", "TerminalWindow", "TestTube", "TextColumns", "TextT", "Textbox", "ThumbsDown", "ThumbsUp", "Timer", "ToggleLeft", "ToggleRight", "Translate", "Trash", "TreeStructure", "TrendDown", "TrendUp", "Upload", "UploadSimple", "User", "UserCircle", "UserPlus", "UserSwitch", "Vault", "Wallet", "Warning", "WarningCircle", "X", "XCircle"];
|
|
4355
|
+
export declare const ICON_NAMES: readonly ["Activity", "AidaLogo", "Archive", "ArrowBendUpLeft", "ArrowBendUpRight", "ArrowCircleLeft", "ArrowCircleRight", "ArrowCircleUp", "ArrowCircleUpLeft", "ArrowClockwise", "ArrowCounterClockwise", "ArrowDown", "ArrowElbowDownRight", "ArrowLeft", "ArrowRight", "ArrowSquareIn", "ArrowSquareOut", "ArrowUp", "ArrowUpRight", "ArrowUUpLeft", "ArrowsClockwise", "ArrowsCounterClockwise", "ArrowsDownUp", "ArrowsInSimple", "ArrowsLeftRight", "ArrowsOutSimple", "Bank", "BellRinging", "BellSimple", "BellSimpleSlash", "Binoculars", "BoundingBox", "BracketsAngle", "BracketsCurly", "BracketsSquare", "BugBeetle", "Buildings", "Calendar", "CalendarDots", "CalendarBlank", "CalendarCheck", "CalendarPlus", "Camera", "Cards", "CaretCircleRight", "CaretDoubleLeft", "CaretDoubleRight", "CaretDown", "CaretLeft", "CaretRight", "CaretUp", "CaretUpDown", "Certificate", "ChartBar", "ChartLine", "ChartLineUp", "ChartPie", "ChartPieSlice", "ChatCircleText", "Check", "CheckCircle", "CheckSquare", "CheckSquareOffset", "Circle", "CircleNotch", "Clock", "ClockClockwise", "ClockCountdown", "ClockCounterClockwise", "CloudSlash", "Code", "Columns", "Concierge", "Copy", "CopySimple", "CreditCard", "FileText", "GoogleLogo", "AppleLogo", "PaypalLogo", "CurrencyCircleDollar", "CurrencyDollar", "Desktop", "Detective", "DeviceMobileCamera", "DeviceMobileSpeaker", "DotsNine", "DotsSixVertical", "DotsThree", "DotsThreeCircleVertical", "DotsThreeOutline", "DotsThreeVertical", "Download", "DownloadSimple", "Envelope", "Equals", "Eraser", "Export", "Eye", "EyeClosed", "EyeSlash", "FadersHorizontal", "File", "FileArchive", "FileArrowUp", "FileCsv", "FileDoc", "FileImage", "FileJpg", "FilePdf", "FilePlus", "FilePng", "FileSvg", "FilePpt", "FileSearch", "FileMagnifyingGlass", "FileTxt", "FileXls", "FileZip", "Flag", "FlagBanner", "FunnelSimple", "Gear", "GearFine", "GearSix", "GitBranch", "GitFork", "GlobeHemisphereWest", "Hash", "Headset", "Heartbeat", "IdentificationCard", "Image", "ImageSquare", "Info", "Intersect", "Key", "Layout", "Lifebuoy", "Lightbulb", "Lightning", "LinkBreak", "LinkSimple", "LinkSimpleHorizontal", "List", "ListBullets", "ListChecks", "ListNumbers", "ListPlus", "Lock", "LockKey", "MagicWand", "MagnifyingGlass", "MapPin", "Microphone", "Minus", "MinusCircle", "Money", "Monitor", "Moon", "Network", "NetworkSlash", "Note", "NotePencil", "Notepad", "Notification", "NumberCircleOne", "Package", "Palette", "Password", "Pause", "PauseCircle", "Pencil", "PencilSimple", "PencilSimpleLine", "Percent", "Phone", "PhoneCall", "PhoneOutgoing", "PhonePlus", "PhoneSlash", "PhoneX", "Play", "PlayCircle", "Plug", "Plugs", "PlugsConnected", "Plus", "PlusCircle", "Prohibit", "PushPin", "PushPinSimple", "PushPinSimpleSlash", "Question", "Queue", "RadioButton", "Receipt", "Repeat", "Rows", "SelectionInverse", "ShareNetwork", "ShieldCheck", "ShieldSlash", "ShieldWarning", "ShoppingCart", "ShoppingCartSimple", "Sidebar", "SignOut", "SortAscending", "SortDescending", "Sparkle", "Square", "SquareHalf", "SquareHalfBottom", "SquaresFour", "Stack", "Star", "Storefront", "Stop", "Sun", "Swap", "Swatches", "Table", "Tag", "TerminalWindow", "TestTube", "TextColumns", "TextT", "Textbox", "ThumbsDown", "ThumbsUp", "Timer", "ToggleLeft", "ToggleRight", "Translate", "Trash", "TreeStructure", "TrendDown", "TrendUp", "Upload", "UploadSimple", "User", "UserCircle", "UserPlus", "UserSwitch", "Users", "Vault", "Wallet", "Warning", "WarningCircle", "X", "XCircle"];
|
|
3986
4356
|
|
|
3987
4357
|
/** A known icon name (autocompleted) — but any string is accepted so that
|
|
3988
4358
|
* CMS / API-driven icon names continue to work. */
|
|
@@ -3994,8 +4364,16 @@ export declare interface IconProps extends Omit<HTMLAttributes<HTMLElement>, 'co
|
|
|
3994
4364
|
* or any runtime string for CMS/API-driven icons.
|
|
3995
4365
|
*/
|
|
3996
4366
|
name?: IconName;
|
|
3997
|
-
/**
|
|
3998
|
-
|
|
4367
|
+
/**
|
|
4368
|
+
* Icon weight/style. @default "light"
|
|
4369
|
+
*
|
|
4370
|
+
* Narrowed to the two weights the webfont actually loads. It used to be
|
|
4371
|
+
* `IconWeight | string`, which collapsed the union back to `string` — so
|
|
4372
|
+
* `weight="bold"` type-checked, silently fell back to light through
|
|
4373
|
+
* WEIGHT_CLASS, and made fonts.ts's claim that the type refuses it untrue.
|
|
4374
|
+
* The runtime fallback stays for values that arrive as data.
|
|
4375
|
+
*/
|
|
4376
|
+
weight?: IconWeight;
|
|
3999
4377
|
/** Size token (xs–xl) or an explicit pixel value. @default "md" */
|
|
4000
4378
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number | string;
|
|
4001
4379
|
/** CSS color. Defaults to `currentColor` (inherits text color). */
|
|
@@ -4046,6 +4424,64 @@ export declare function InputOTPSlot({ index, className, ...props }: React_2.Com
|
|
|
4046
4424
|
index: number;
|
|
4047
4425
|
}): JSX_2.Element;
|
|
4048
4426
|
|
|
4427
|
+
/**
|
|
4428
|
+
* A single keyboard key, as a semantic `<kbd>`.
|
|
4429
|
+
*
|
|
4430
|
+
* Ported from the prototype-kit in DAS-18254. Pass a token from the table above
|
|
4431
|
+
* and it resolves per platform; pass anything else and it renders as given.
|
|
4432
|
+
*
|
|
4433
|
+
* @example
|
|
4434
|
+
* ```tsx
|
|
4435
|
+
* <Kbd>Mod</Kbd> // ⌘ on a Mac, Ctrl elsewhere
|
|
4436
|
+
* <Kbd>K</Kbd>
|
|
4437
|
+
* ```
|
|
4438
|
+
*/
|
|
4439
|
+
export declare const Kbd: ForwardRefExoticComponent<KbdProps & RefAttributes<HTMLElement>>;
|
|
4440
|
+
|
|
4441
|
+
export declare interface KbdProps extends HTMLAttributes<HTMLElement> {
|
|
4442
|
+
/**
|
|
4443
|
+
* @default "sm" — 20px, for a hint sitting inline beside a label.
|
|
4444
|
+
* `md` is 24px, for the rows of a shortcuts dialog.
|
|
4445
|
+
*/
|
|
4446
|
+
size?: 'sm' | 'md';
|
|
4447
|
+
/**
|
|
4448
|
+
* @default "default" — a light chip for a light surface.
|
|
4449
|
+
* `inverse` is translucent, for a dark one such as a tooltip.
|
|
4450
|
+
*/
|
|
4451
|
+
tone?: 'default' | 'inverse';
|
|
4452
|
+
}
|
|
4453
|
+
|
|
4454
|
+
/**
|
|
4455
|
+
* A chord, or a sequence of them.
|
|
4456
|
+
*
|
|
4457
|
+
* Every key goes through `Kbd`, so the platform tokens work the same way.
|
|
4458
|
+
*
|
|
4459
|
+
* @example
|
|
4460
|
+
* ```tsx
|
|
4461
|
+
* <KbdSequence keys={['Mod', 'K']} /> // ⌘ K
|
|
4462
|
+
* <KbdSequence keys={[['C'], ['L']]} /> // C then L
|
|
4463
|
+
* ```
|
|
4464
|
+
*/
|
|
4465
|
+
export declare const KbdSequence: {
|
|
4466
|
+
({ keys, size, tone, separator, className, }: KbdSequenceProps): JSX_2.Element;
|
|
4467
|
+
displayName: string;
|
|
4468
|
+
};
|
|
4469
|
+
|
|
4470
|
+
export declare interface KbdSequenceProps {
|
|
4471
|
+
/**
|
|
4472
|
+
* One chord as `string[]`, or several as `string[][]`.
|
|
4473
|
+
*
|
|
4474
|
+
* A chord is keys pressed together (`['Mod', 'K']`); a sequence is chords
|
|
4475
|
+
* pressed one after the other (`[['C'], ['L']]` — press C, then L).
|
|
4476
|
+
*/
|
|
4477
|
+
keys: string[] | string[][];
|
|
4478
|
+
size?: 'sm' | 'md';
|
|
4479
|
+
tone?: 'default' | 'inverse';
|
|
4480
|
+
/** Word between chords. @default "then" */
|
|
4481
|
+
separator?: ReactNode;
|
|
4482
|
+
className?: string;
|
|
4483
|
+
}
|
|
4484
|
+
|
|
4049
4485
|
/**
|
|
4050
4486
|
* A label. Nothing else.
|
|
4051
4487
|
*
|
|
@@ -4053,7 +4489,7 @@ export declare function InputOTPSlot({ index, className, ...props }: React_2.Com
|
|
|
4053
4489
|
* render a `justify-between` row so the marker could sit at the right edge —
|
|
4054
4490
|
* three of those four props described the FIELD, not the label, and the row
|
|
4055
4491
|
* came along with them. Every one of those concerns now lives in
|
|
4056
|
-
* `FieldLabelRow`, which is what Field, Select, DatePicker and
|
|
4492
|
+
* `FieldLabelRow`, which is what Field, Select, DatePicker and FileUploader
|
|
4057
4493
|
* render.
|
|
4058
4494
|
*
|
|
4059
4495
|
* No consumer notices: of the 30 <Label> usages across the product, not one
|
|
@@ -4456,16 +4892,32 @@ export declare interface MultiValuesFieldProps {
|
|
|
4456
4892
|
* Validation function that returns true or an error message
|
|
4457
4893
|
*/
|
|
4458
4894
|
validate?: (value: string) => boolean | string;
|
|
4895
|
+
/**
|
|
4896
|
+
* Called with every value that was NOT added and why — a typed value that
|
|
4897
|
+
* failed, or the entries of a pasted list that were dropped (over the
|
|
4898
|
+
* limit, duplicate, invalid). Nothing the user enters is discarded silently
|
|
4899
|
+
* when this is given.
|
|
4900
|
+
*/
|
|
4901
|
+
onRejected?: (rejected: RejectedValue[]) => void;
|
|
4902
|
+
/**
|
|
4903
|
+
* Localised messages for the built-in rejections; the English defaults are
|
|
4904
|
+
* used when absent.
|
|
4905
|
+
*/
|
|
4906
|
+
messages?: {
|
|
4907
|
+
maxItems?: string;
|
|
4908
|
+
duplicate?: string;
|
|
4909
|
+
invalid?: string;
|
|
4910
|
+
};
|
|
4459
4911
|
/**
|
|
4460
4912
|
* Visual variant for the value badges
|
|
4461
4913
|
* @default "outline"
|
|
4462
4914
|
*/
|
|
4463
|
-
badgeVariant?:
|
|
4915
|
+
badgeVariant?: 'default' | 'secondary' | 'destructive' | 'outline';
|
|
4464
4916
|
/**
|
|
4465
4917
|
* Layout orientation
|
|
4466
4918
|
* @default "vertical"
|
|
4467
4919
|
*/
|
|
4468
|
-
orientation?:
|
|
4920
|
+
orientation?: 'vertical' | 'horizontal';
|
|
4469
4921
|
/**
|
|
4470
4922
|
* Additional CSS classes
|
|
4471
4923
|
*/
|
|
@@ -4684,7 +5136,7 @@ export declare const OTPField: React_2.ForwardRefExoticComponent<Omit<OTPFieldPr
|
|
|
4684
5136
|
/**
|
|
4685
5137
|
* Props for the OTPField component
|
|
4686
5138
|
*/
|
|
4687
|
-
export declare interface OTPFieldProps extends Omit<ComponentProps<typeof InputOTP>,
|
|
5139
|
+
export declare interface OTPFieldProps extends Omit<ComponentProps<typeof InputOTP>, 'maxLength' | 'render'> {
|
|
4688
5140
|
/**
|
|
4689
5141
|
* Number of OTP input slots
|
|
4690
5142
|
* @default 6
|
|
@@ -4710,6 +5162,22 @@ export declare interface OTPFieldProps extends Omit<ComponentProps<typeof InputO
|
|
|
4710
5162
|
|
|
4711
5163
|
export declare const OVERLAY_EVENT = "yuno-overlay";
|
|
4712
5164
|
|
|
5165
|
+
/**
|
|
5166
|
+
* A page heading, at text-3xl.
|
|
5167
|
+
*
|
|
5168
|
+
* @deprecated Use `<Title size="large" as="h1">` (DAS-18254). Title is the
|
|
5169
|
+
* heading system this should have been part of: four sizes on the Tailwind
|
|
5170
|
+
* scale, icon slots, truncation.
|
|
5171
|
+
*
|
|
5172
|
+
* Deliberately NOT re-implemented as a wrapper over Title, even though it would
|
|
5173
|
+
* be a three-line change. Title puts its text inside a span so it can truncate,
|
|
5174
|
+
* so delegating would move the text node one level down and change what
|
|
5175
|
+
* `getByText(...)` returns at all 20 call sites — four tests in this package
|
|
5176
|
+
* caught it immediately. It would also drop page titles from text-3xl (30px) to
|
|
5177
|
+
* Title's `large` (24px). Both are fine changes to make; neither is something a
|
|
5178
|
+
* deprecation should do quietly. They belong to the migration, where each page
|
|
5179
|
+
* can be looked at.
|
|
5180
|
+
*/
|
|
4713
5181
|
export declare const PageTitle: ForwardRefExoticComponent<PageTitleProps & RefAttributes<HTMLHeadingElement>>;
|
|
4714
5182
|
|
|
4715
5183
|
export declare interface PageTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
@@ -4884,7 +5352,7 @@ export declare const PasswordField: ForwardRefExoticComponent<PasswordFieldProps
|
|
|
4884
5352
|
/**
|
|
4885
5353
|
* Props for the PasswordField component
|
|
4886
5354
|
*/
|
|
4887
|
-
export declare interface PasswordFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type">, Omit<FieldProps, "type" | "endIcon" | "endIconProps"> {
|
|
5355
|
+
export declare interface PasswordFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "prefix">, Omit<FieldProps, "type" | "endIcon" | "endIconProps"> {
|
|
4888
5356
|
/**
|
|
4889
5357
|
* Whether password is visible by default
|
|
4890
5358
|
* @default false
|
|
@@ -5047,7 +5515,9 @@ export declare const RadioGroup: ForwardRefExoticComponent<Omit<RadioGroupProps,
|
|
|
5047
5515
|
|
|
5048
5516
|
export declare function RadioGroupBase({ className, ...props }: React_2.ComponentProps<typeof RadioGroupPrimitive.Root>): JSX_2.Element;
|
|
5049
5517
|
|
|
5050
|
-
export declare function RadioGroupItem({ className, ...props }: React_2.ComponentProps<typeof RadioGroupPrimitive.Item>
|
|
5518
|
+
export declare function RadioGroupItem({ className, indicatorClassName, ...props }: React_2.ComponentProps<typeof RadioGroupPrimitive.Item> & {
|
|
5519
|
+
indicatorClassName?: string;
|
|
5520
|
+
}): JSX_2.Element;
|
|
5051
5521
|
|
|
5052
5522
|
export declare const RadioGroupOption: ({ option, radioId, isInlineLayout, }: RadioGroupOptionProps) => JSX_2.Element;
|
|
5053
5523
|
|
|
@@ -5104,12 +5574,85 @@ export declare interface RadioOption {
|
|
|
5104
5574
|
* Optional description text
|
|
5105
5575
|
*/
|
|
5106
5576
|
description?: string;
|
|
5577
|
+
/**
|
|
5578
|
+
* Extra content rendered under the label, e.g. a follow-up field that only
|
|
5579
|
+
* makes sense once this option is chosen. Stacked layout only.
|
|
5580
|
+
*/
|
|
5581
|
+
content?: ReactNode;
|
|
5107
5582
|
/**
|
|
5108
5583
|
* Whether this option is disabled
|
|
5109
5584
|
*/
|
|
5110
5585
|
disabled?: boolean;
|
|
5111
5586
|
}
|
|
5112
5587
|
|
|
5588
|
+
export declare const RatingScale: React_2.ForwardRefExoticComponent<RatingScaleProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
5589
|
+
|
|
5590
|
+
export declare interface RatingScaleProps {
|
|
5591
|
+
/**
|
|
5592
|
+
* Lowest selectable value, rendered as the first item (e.g. `0` for NPS, `1`
|
|
5593
|
+
* for CSAT or CES).
|
|
5594
|
+
*/
|
|
5595
|
+
min: number;
|
|
5596
|
+
/**
|
|
5597
|
+
* Highest selectable value, rendered as the last item (e.g. `10`, `5` or `7`).
|
|
5598
|
+
*/
|
|
5599
|
+
max: number;
|
|
5600
|
+
/**
|
|
5601
|
+
* Selected value. `null` means nothing is selected yet; no item is
|
|
5602
|
+
* preselected.
|
|
5603
|
+
*/
|
|
5604
|
+
value: number | null;
|
|
5605
|
+
/**
|
|
5606
|
+
* Fired with the chosen number when an item is clicked or selected with the
|
|
5607
|
+
* keyboard. Clicking the selected item again does not deselect it.
|
|
5608
|
+
*/
|
|
5609
|
+
onValueChange: (value: number) => void;
|
|
5610
|
+
/**
|
|
5611
|
+
* Text shown under the first item describing the low end of the scale. It
|
|
5612
|
+
* is also announced as part of the group description.
|
|
5613
|
+
*/
|
|
5614
|
+
lowLabel: string;
|
|
5615
|
+
/**
|
|
5616
|
+
* Text shown under the last item describing the high end of the scale. It
|
|
5617
|
+
* is also announced as part of the group description.
|
|
5618
|
+
*/
|
|
5619
|
+
highLabel: string;
|
|
5620
|
+
/**
|
|
5621
|
+
* Returns the accessible name of each item, e.g.
|
|
5622
|
+
* `(n) => t('rating.item', { n })`. Each name must be unique.
|
|
5623
|
+
*/
|
|
5624
|
+
getItemLabel: (value: number) => string;
|
|
5625
|
+
/**
|
|
5626
|
+
* Id of the element holding the question, used as the group's
|
|
5627
|
+
* `aria-labelledby`.
|
|
5628
|
+
*/
|
|
5629
|
+
labelledBy: string;
|
|
5630
|
+
/**
|
|
5631
|
+
* Writing direction. In `rtl` the scale starts on the right and the
|
|
5632
|
+
* horizontal arrow keys are mirrored. When omitted, it is inherited from the
|
|
5633
|
+
* nearest ancestor with a `dir` attribute other than `<html>` or `<body>`,
|
|
5634
|
+
* then from the current language, and only then from the document root.
|
|
5635
|
+
*/
|
|
5636
|
+
dir?: 'ltr' | 'rtl';
|
|
5637
|
+
/**
|
|
5638
|
+
* Disables every item and blocks changes.
|
|
5639
|
+
* @default false
|
|
5640
|
+
*/
|
|
5641
|
+
disabled?: boolean;
|
|
5642
|
+
/**
|
|
5643
|
+
* Additional classes for the outer container.
|
|
5644
|
+
*/
|
|
5645
|
+
className?: string;
|
|
5646
|
+
}
|
|
5647
|
+
|
|
5648
|
+
export declare interface RejectedValue {
|
|
5649
|
+
value: string;
|
|
5650
|
+
reason: RejectionReason;
|
|
5651
|
+
}
|
|
5652
|
+
|
|
5653
|
+
/** Why a value the user entered or pasted was not added. */
|
|
5654
|
+
export declare type RejectionReason = 'max' | 'duplicate' | 'invalid';
|
|
5655
|
+
|
|
5113
5656
|
/**
|
|
5114
5657
|
* Clean a value for a search, lookup or filter. Ordinary spaces inside it
|
|
5115
5658
|
* survive, so multi-word search keeps working.
|
|
@@ -5215,9 +5758,17 @@ export declare const SearchSelect: React_2.ForwardRefExoticComponent<SearchSelec
|
|
|
5215
5758
|
|
|
5216
5759
|
export declare interface SearchSelectProps {
|
|
5217
5760
|
label?: string;
|
|
5761
|
+
/** Info content shown in a tooltip beside the label. */
|
|
5762
|
+
info?: React_2.ReactNode;
|
|
5763
|
+
/**
|
|
5764
|
+
* Whether to annotate the field's required/optional state.
|
|
5765
|
+
* - `true` shows "(required)" or "(optional)", chosen by `required`
|
|
5766
|
+
* - a string shows that text instead
|
|
5767
|
+
*/
|
|
5768
|
+
requiredIndicator?: boolean | string;
|
|
5769
|
+
required?: boolean;
|
|
5218
5770
|
description?: string;
|
|
5219
5771
|
error?: string;
|
|
5220
|
-
optional?: boolean;
|
|
5221
5772
|
placeholder?: string;
|
|
5222
5773
|
value?: string;
|
|
5223
5774
|
defaultValue?: string;
|
|
@@ -5376,6 +5927,12 @@ export declare interface SelectOption {
|
|
|
5376
5927
|
* Omit to render no badge.
|
|
5377
5928
|
*/
|
|
5378
5929
|
badge?: string;
|
|
5930
|
+
/**
|
|
5931
|
+
* Optional muted hint shown right-aligned in the dropdown row (e.g. a date
|
|
5932
|
+
* range or "Created by you"). Not mirrored into the trigger's value.
|
|
5933
|
+
* Use instead of `badge` for plain-text hints.
|
|
5934
|
+
*/
|
|
5935
|
+
meta?: string;
|
|
5379
5936
|
}
|
|
5380
5937
|
|
|
5381
5938
|
/**
|
|
@@ -5423,12 +5980,6 @@ export declare interface SelectProps {
|
|
|
5423
5980
|
* @default false
|
|
5424
5981
|
*/
|
|
5425
5982
|
required?: boolean;
|
|
5426
|
-
/**
|
|
5427
|
-
* Whether to show "(Optional)" next to the label
|
|
5428
|
-
* @default false
|
|
5429
|
-
* @deprecated Use requiredIndicator instead
|
|
5430
|
-
*/
|
|
5431
|
-
optional?: boolean;
|
|
5432
5983
|
/**
|
|
5433
5984
|
* Placeholder text shown when no option is selected
|
|
5434
5985
|
* @default "Select an option"
|
|
@@ -5455,6 +6006,11 @@ export declare interface SelectProps {
|
|
|
5455
6006
|
* Array of options (use either options or groups, not both)
|
|
5456
6007
|
*/
|
|
5457
6008
|
options?: SelectOption[];
|
|
6009
|
+
/**
|
|
6010
|
+
* Muted message rendered inside the dropdown when there are no options
|
|
6011
|
+
* (and no groups) to show.
|
|
6012
|
+
*/
|
|
6013
|
+
emptyMessage?: string;
|
|
5458
6014
|
/**
|
|
5459
6015
|
* Array of grouped options (use either options or groups, not both)
|
|
5460
6016
|
*/
|
|
@@ -5827,9 +6383,10 @@ export declare const Textarea: ForwardRefExoticComponent<TextareaProps & RefAttr
|
|
|
5827
6383
|
*/
|
|
5828
6384
|
export declare interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "className">, VariantProps<typeof textareaWrapperVariants> {
|
|
5829
6385
|
/**
|
|
5830
|
-
* Label
|
|
6386
|
+
* Label shown above or next to the textarea. A node, not just a string: the
|
|
6387
|
+
* product marks optional fields with a styled "(optional)" span inside it.
|
|
5831
6388
|
*/
|
|
5832
|
-
label?:
|
|
6389
|
+
label?: ReactNode;
|
|
5833
6390
|
/**
|
|
5834
6391
|
* Helper text displayed below the textarea
|
|
5835
6392
|
*/
|
|
@@ -5953,6 +6510,58 @@ declare interface TimePickerProps_2 extends Omit<React_2.InputHTMLAttributes<HTM
|
|
|
5953
6510
|
value?: string;
|
|
5954
6511
|
}
|
|
5955
6512
|
|
|
6513
|
+
export declare const Title: ForwardRefExoticComponent<TitleProps & RefAttributes<HTMLHeadingElement>>;
|
|
6514
|
+
|
|
6515
|
+
export declare interface TitleProps extends Omit<HTMLAttributes<HTMLHeadingElement>, 'title'> {
|
|
6516
|
+
/** Type scale step. All four are font-semibold. */
|
|
6517
|
+
size?: TitleSize;
|
|
6518
|
+
/** Heading level rendered. Pick by document outline, not by size. */
|
|
6519
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
|
|
6520
|
+
/** Left slot. Subject icon or a back control. Muted, 16px. */
|
|
6521
|
+
icon?: ReactNode;
|
|
6522
|
+
/** Right slot. Quiet help affordance (Info + Tooltip). Muted, 16px. */
|
|
6523
|
+
iconRight?: ReactNode;
|
|
6524
|
+
}
|
|
6525
|
+
|
|
6526
|
+
/**
|
|
6527
|
+
* Title — the heading atom.
|
|
6528
|
+
*
|
|
6529
|
+
* Ported from the prototype-kit in DAS-18254, because the design system had no
|
|
6530
|
+
* heading system at all: it shipped `PageTitle` alone, locked to one size, and
|
|
6531
|
+
* the product answered by hand-rolling 103 weighted `<hN>` elements across
|
|
6532
|
+
* eight different type scales. A heading is not a page-title-shaped problem.
|
|
6533
|
+
*
|
|
6534
|
+
* Four sizes, all font-semibold, all on the Tailwind scale (never px):
|
|
6535
|
+
*
|
|
6536
|
+
* small → text-sm (14 / 20) section label inside a card
|
|
6537
|
+
* default → text-base (16 / 24) card title
|
|
6538
|
+
* medium → text-xl (20 / 28) section divider inside a page
|
|
6539
|
+
* large → text-2xl (24 / 32) page title
|
|
6540
|
+
*
|
|
6541
|
+
* Only the type scale moves. The frame is constant: gap-3 between the text and
|
|
6542
|
+
* either icon, 16px icons, and no padding of its own — the text sits flush
|
|
6543
|
+
* against the leading edge so a Title lines up with the fields under it.
|
|
6544
|
+
* Spacing between a Title and its siblings belongs to the container.
|
|
6545
|
+
*
|
|
6546
|
+
* The text carries the weight in `text-foreground`; both icon slots sit back in
|
|
6547
|
+
* `text-muted-foreground`. Icons support the heading, they do not compete.
|
|
6548
|
+
*
|
|
6549
|
+
* ── One deviation from the kit, and one gap ────────────────────────────────
|
|
6550
|
+
*
|
|
6551
|
+
* `[&_svg]:size-4` is the kit's, and it only reaches callers who pass a real
|
|
6552
|
+
* `<svg>`. Our `Icon` draws the Phosphor WEBFONT — an `<i>` sized by an inline
|
|
6553
|
+
* `font-size` — so no parent rule can size it. Pass `size="sm"` (16px) to land
|
|
6554
|
+
* an `<Icon>` on the same grid.
|
|
6555
|
+
*
|
|
6556
|
+
* The kit's scale has no `text-lg` step, but 27 of the product's hand-rolled
|
|
6557
|
+
* headings use one, and both design systems' DialogTitle is `text-lg` — while
|
|
6558
|
+
* the kit's own docs here claim `default`/text-base is the dialog title. The
|
|
6559
|
+
* kit contradicts itself, so this port does not invent a fifth size to settle
|
|
6560
|
+
* it: those call sites keep passing `className="text-lg"` until the migration
|
|
6561
|
+
* decides, case by case, whether they are really `default` or `medium`.
|
|
6562
|
+
*/
|
|
6563
|
+
export declare type TitleSize = 'small' | 'default' | 'medium' | 'large';
|
|
6564
|
+
|
|
5956
6565
|
export { toast }
|
|
5957
6566
|
|
|
5958
6567
|
/**
|
|
@@ -6082,6 +6691,8 @@ export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProvide
|
|
|
6082
6691
|
|
|
6083
6692
|
export declare type TooltipProviderProps = ComponentProps<typeof TooltipProvider>;
|
|
6084
6693
|
|
|
6694
|
+
export declare const tooltipSurfaceClassName = "rounded-lg px-3 py-1.5 text-xs bg-black text-white dark:bg-white dark:text-black dark:border dark:border-gray-200 dark:shadow-md";
|
|
6695
|
+
|
|
6085
6696
|
declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
6086
6697
|
|
|
6087
6698
|
declare type TooltipTriggerProps = ComponentProps<typeof TooltipTrigger>;
|
|
@@ -6147,7 +6758,7 @@ export declare interface TransferListProps extends Omit<HTMLAttributes<HTMLDivEl
|
|
|
6147
6758
|
/**
|
|
6148
6759
|
* Keyboard keys that trigger adding a value
|
|
6149
6760
|
*/
|
|
6150
|
-
export declare type TriggerKey =
|
|
6761
|
+
export declare type TriggerKey = 'Enter' | 'Tab' | 'Comma' | 'Space';
|
|
6151
6762
|
|
|
6152
6763
|
/**
|
|
6153
6764
|
* Tutorial component that renders a customizable tooltip for guided tours.
|
|
@@ -6183,6 +6794,11 @@ export declare interface TutorialProps extends TooltipRenderProps {
|
|
|
6183
6794
|
width?: number;
|
|
6184
6795
|
/** Accessible label for the step close button. @default "Close" */
|
|
6185
6796
|
closeLabel?: string;
|
|
6797
|
+
/**
|
|
6798
|
+
* Localized step counter (e.g. "Paso 2 de 3"). The design system has no
|
|
6799
|
+
* i18n of its own, so the caller renders it. Falls back to English.
|
|
6800
|
+
*/
|
|
6801
|
+
stepLabel?: string;
|
|
6186
6802
|
}
|
|
6187
6803
|
|
|
6188
6804
|
/**
|
|
@@ -6199,12 +6815,26 @@ export declare interface UploadFile {
|
|
|
6199
6815
|
size: number;
|
|
6200
6816
|
/** Upload progress from 0-100. When 100 or undefined, file is considered "Uploaded" */
|
|
6201
6817
|
progress?: number;
|
|
6202
|
-
/**
|
|
6203
|
-
|
|
6818
|
+
/**
|
|
6819
|
+
* Upload status. If omitted, derived from progress: 0-99 = "uploading",
|
|
6820
|
+
* 100/undefined = "uploaded".
|
|
6821
|
+
*
|
|
6822
|
+
* "success" is the moment the transfer lands — full bar plus a check. It is
|
|
6823
|
+
* the transient state you flash before settling on "uploaded", the resting
|
|
6824
|
+
* row where the bar goes away and only the file and its remove action remain.
|
|
6825
|
+
*/
|
|
6826
|
+
status?: UploadFileStatus;
|
|
6204
6827
|
/** Optional error message when status is "error" */
|
|
6205
6828
|
errorMessage?: string;
|
|
6829
|
+
/** Thumbnail URL. When set, the preview replaces the file-type icon (image uploads). */
|
|
6830
|
+
previewUrl?: string;
|
|
6831
|
+
/** Status line override. Each status ships default copy. */
|
|
6832
|
+
statusLabel?: string;
|
|
6206
6833
|
}
|
|
6207
6834
|
|
|
6835
|
+
/** The four states a row can be in. */
|
|
6836
|
+
export declare type UploadFileStatus = 'uploading' | 'success' | 'uploaded' | 'error';
|
|
6837
|
+
|
|
6208
6838
|
/**
|
|
6209
6839
|
* Custom hook to lock/unlock body scroll when a modal or overlay is open
|
|
6210
6840
|
* This prevents the background from scrolling while a modal is active
|
|
@@ -6272,6 +6902,10 @@ export declare function useDirection(lang?: SupportedLanguage): "rtl" | "ltr";
|
|
|
6272
6902
|
* Custom hook to handle Escape key press
|
|
6273
6903
|
* Commonly used for closing modals, dialogs, sheets, etc.
|
|
6274
6904
|
*
|
|
6905
|
+
* Layers stack in activation order: when several overlays are open at once,
|
|
6906
|
+
* Escape reaches only the most recently activated one. Once it deactivates or
|
|
6907
|
+
* unmounts, the layer beneath it takes over.
|
|
6908
|
+
*
|
|
6275
6909
|
* @param isActive - Whether the Escape key handler should be active
|
|
6276
6910
|
* @param onEscape - Callback function to execute when Escape is pressed
|
|
6277
6911
|
*
|
|
@@ -6283,6 +6917,22 @@ export declare function useDirection(lang?: SupportedLanguage): "rtl" | "ltr";
|
|
|
6283
6917
|
*/
|
|
6284
6918
|
export declare function useEscapeKey(isActive: boolean, onEscape: () => void): void;
|
|
6285
6919
|
|
|
6920
|
+
/**
|
|
6921
|
+
* Whether the user is on a Mac, so a keyboard hint can show the right glyph:
|
|
6922
|
+
* ⌘ against Ctrl, ⌥ against Alt.
|
|
6923
|
+
*
|
|
6924
|
+
* Ported from the prototype-kit with Kbd in DAS-18254. It lives here rather
|
|
6925
|
+
* than inside the component because a shortcut hint is not the only thing that
|
|
6926
|
+
* needs to know — a `Mod+K` listener has to decide between metaKey and ctrlKey
|
|
6927
|
+
* for exactly the same reason.
|
|
6928
|
+
*
|
|
6929
|
+
* useSyncExternalStore rather than useEffect: the platform cannot change during
|
|
6930
|
+
* a session, so `subscribe` is a no-op and the value is read straight from a
|
|
6931
|
+
* snapshot. That keeps the first paint correct instead of flashing the wrong
|
|
6932
|
+
* glyph for a frame.
|
|
6933
|
+
*/
|
|
6934
|
+
export declare function useIsMac(): boolean;
|
|
6935
|
+
|
|
6286
6936
|
/**
|
|
6287
6937
|
* Custom hook to track media query matches
|
|
6288
6938
|
* Returns true if the media query matches, false otherwise
|