@bixlab/mtone 0.12.0 → 0.13.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.d.ts CHANGED
@@ -7,6 +7,7 @@ import * as _rc_component_table_es_Footer_Row from '@rc-component/table/es/Foote
7
7
  import * as _rc_component_table_es_Footer_Summary from '@rc-component/table/es/Footer/Summary';
8
8
  import { TableProps as TableProps$1, ColumnType, ExpandableConfig, Reference } from '@rc-component/table';
9
9
  import { ToastManagerAddOptions, ToastManagerUpdateOptions, ToastObject } from '@base-ui/react/toast';
10
+ import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
10
11
 
11
12
  interface InputOTPProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
12
13
  /** Number of cells, clamped to 1–32. */
@@ -420,6 +421,42 @@ interface TabsProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>,
420
421
  }
421
422
  declare const Tabs: React__default.ForwardRefExoticComponent<TabsProps & React__default.RefAttributes<HTMLDivElement>>;
422
423
 
424
+ interface TooltipProviderProps {
425
+ children?: React.ReactNode;
426
+ delay?: number;
427
+ closeDelay?: number;
428
+ timeout?: number;
429
+ }
430
+ type TooltipTrigger = "hover" | "focus" | "click" | "contextMenu";
431
+ type TooltipPart = "trigger" | "positioner" | "popup" | "arrow";
432
+ interface TooltipProps extends OpenProps {
433
+ children: React.ReactElement;
434
+ content: React.ReactNode;
435
+ side?: "top" | "bottom" | "left" | "right";
436
+ align?: "start" | "center" | "end";
437
+ trigger?: TooltipTrigger;
438
+ delay?: number;
439
+ closeDelay?: number;
440
+ offset?: number;
441
+ alignOffset?: number;
442
+ avoidCollisions?: boolean;
443
+ shift?: boolean;
444
+ arrow?: boolean;
445
+ arrowPadding?: number;
446
+ disabled?: boolean;
447
+ keepMounted?: boolean;
448
+ container?: Tooltip$1.Portal.Props["container"];
449
+ zIndex?: number;
450
+ tone?: "default" | MtoneAccent;
451
+ classNames?: Partial<Record<TooltipPart, string>>;
452
+ styles?: Partial<Record<TooltipPart, React.CSSProperties>>;
453
+ /** Enables a focusable wrapper for a child explicitly passed disabled. */
454
+ wrapDisabledTrigger?: boolean;
455
+ }
456
+ /** Shares the hover delays and adjacent transition behavior of Base UI Tooltip. */
457
+ declare function TooltipProvider({ children, delay, closeDelay, timeout }: TooltipProviderProps): React.JSX.Element;
458
+ declare function Tooltip(props: TooltipProps): React.JSX.Element;
459
+
423
460
  type ToastPosition = "top-right" | "bottom-right" | "top-left" | "bottom-left" | "top-center" | "bottom-center" | "center" | "center-top";
424
461
  type ToastType = "success" | "error" | "info" | "loading";
425
462
  type Presentation = {
@@ -605,9 +642,7 @@ declare function PopoverRoot(props: PopoverProps): React__default.JSX.Element;
605
642
  declare const Popover: typeof PopoverRoot & {
606
643
  Menu: typeof PopoverMenu;
607
644
  };
608
- declare function Tooltip({ children, content, side, ...props }: OpenProps & Pick<PopoverProps, "content" | "side"> & {
609
- children: React__default.ReactElement;
610
- }): React__default.JSX.Element;
645
+
611
646
  interface DialogFrameProps extends OpenProps {
612
647
  title: React__default.ReactNode;
613
648
  description?: React__default.ReactNode;
@@ -974,11 +1009,22 @@ interface BreadcrumbProps extends Omit<React.HTMLAttributes<HTMLElement>, "child
974
1009
  }
975
1010
  declare function Breadcrumb({ items, separator, "aria-label": label, ...props }: BreadcrumbProps): React.JSX.Element;
976
1011
 
977
- type TableRef = Reference;
978
- type SortOrder = "ascend" | "descend" | null;
979
- type TableFilterValue = React.Key | boolean;
980
- type TableFilters = Record<string, TableFilterValue[] | null>;
981
- type TableState = {
1012
+ interface TableProps extends React.ComponentPropsWithoutRef<"table"> {
1013
+ /** Adds an outer border and vertical cell dividers. */
1014
+ bordered?: boolean;
1015
+ /** Adds a subtle alternating background to body rows. */
1016
+ striped?: boolean;
1017
+ /** Highlights body rows under the pointer. */
1018
+ highlightOnHover?: boolean;
1019
+ }
1020
+ /** A styled native table. Supply the caption, sections, rows and cells as children. */
1021
+ declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
1022
+
1023
+ type DataTableRef = Reference;
1024
+ type DataTableSortOrder = "ascend" | "descend" | null;
1025
+ type DataTableFilterValue = React.Key | boolean;
1026
+ type DataTableFilters = Record<string, DataTableFilterValue[] | null>;
1027
+ type DataTableState = {
982
1028
  sort?: {
983
1029
  key: string;
984
1030
  direction: "asc" | "desc";
@@ -987,15 +1033,15 @@ type TableState = {
987
1033
  page: number;
988
1034
  pageSize: number;
989
1035
  };
990
- type TableFilterItem = {
1036
+ type DataTableFilterItem = {
991
1037
  text: React.ReactNode;
992
- value: TableFilterValue;
993
- children?: TableFilterItem[];
1038
+ value: DataTableFilterValue;
1039
+ children?: DataTableFilterItem[];
994
1040
  };
995
- type TableFilterDropdownProps = {
1041
+ type DataTableFilterDropdownProps = {
996
1042
  prefixCls: string;
997
- selectedKeys: TableFilterValue[];
998
- setSelectedKeys: (keys: TableFilterValue[]) => void;
1043
+ selectedKeys: DataTableFilterValue[];
1044
+ setSelectedKeys: (keys: DataTableFilterValue[]) => void;
999
1045
  confirm: (options?: {
1000
1046
  closeDropdown?: boolean;
1001
1047
  }) => void;
@@ -1004,52 +1050,52 @@ type TableFilterDropdownProps = {
1004
1050
  closeDropdown?: boolean;
1005
1051
  }) => void;
1006
1052
  close: () => void;
1007
- filters?: TableFilterItem[];
1053
+ filters?: DataTableFilterItem[];
1008
1054
  visible: boolean;
1009
1055
  };
1010
- type TableSortResult<T> = {
1011
- column?: TableColumn<T>;
1012
- order?: SortOrder;
1013
- field?: TableColumn<T>["dataIndex"];
1056
+ type DataTableSortResult<T> = {
1057
+ column?: DataTableColumn<T>;
1058
+ order?: DataTableSortOrder;
1059
+ field?: DataTableColumn<T>["dataIndex"];
1014
1060
  columnKey?: React.Key;
1015
1061
  };
1016
- type TableColumnTitleProps<T> = {
1062
+ type DataTableColumnTitleProps<T> = {
1017
1063
  sortColumns: {
1018
- column: TableColumn<T>;
1019
- order: SortOrder;
1064
+ column: DataTableColumn<T>;
1065
+ order: DataTableSortOrder;
1020
1066
  }[];
1021
- filters: TableFilters;
1067
+ filters: DataTableFilters;
1022
1068
  };
1023
- type TableColumn<T> = Omit<ColumnType<T>, "title" | "dataIndex"> & {
1069
+ type DataTableColumn<T> = Omit<ColumnType<T>, "title" | "dataIndex"> & {
1024
1070
  dataIndex?: keyof T | string | number | (string | number)[];
1025
- title?: React.ReactNode | ((props: TableColumnTitleProps<T>) => React.ReactNode);
1026
- children?: TableColumn<T>[];
1071
+ title?: React.ReactNode | ((props: DataTableColumnTitleProps<T>) => React.ReactNode);
1072
+ children?: DataTableColumn<T>[];
1027
1073
  sortable?: boolean;
1028
1074
  filterable?: boolean;
1029
- sorter?: boolean | ((a: T, b: T, order?: SortOrder) => number) | {
1030
- compare?: (a: T, b: T, order?: SortOrder) => number;
1075
+ sorter?: boolean | ((a: T, b: T, order?: DataTableSortOrder) => number) | {
1076
+ compare?: (a: T, b: T, order?: DataTableSortOrder) => number;
1031
1077
  multiple?: number;
1032
1078
  };
1033
- sortOrder?: SortOrder;
1034
- defaultSortOrder?: SortOrder;
1035
- sortDirections?: Exclude<SortOrder, null>[];
1079
+ sortOrder?: DataTableSortOrder;
1080
+ defaultSortOrder?: DataTableSortOrder;
1081
+ sortDirections?: Exclude<DataTableSortOrder, null>[];
1036
1082
  sortIcon?: (props: {
1037
- sortOrder: SortOrder;
1083
+ sortOrder: DataTableSortOrder;
1038
1084
  }) => React.ReactNode;
1039
1085
  showSorterTooltip?: boolean | {
1040
1086
  title?: React.ReactNode;
1041
1087
  target?: "full-header" | "sorter-icon";
1042
1088
  };
1043
- filters?: TableFilterItem[];
1044
- filteredValue?: TableFilterValue[] | null;
1045
- defaultFilteredValue?: TableFilterValue[] | null;
1089
+ filters?: DataTableFilterItem[];
1090
+ filteredValue?: DataTableFilterValue[] | null;
1091
+ defaultFilteredValue?: DataTableFilterValue[] | null;
1046
1092
  filtered?: boolean;
1047
1093
  filterMultiple?: boolean;
1048
1094
  filterMode?: "menu" | "tree";
1049
- filterSearch?: boolean | ((input: string, item: TableFilterItem) => boolean);
1095
+ filterSearch?: boolean | ((input: string, item: DataTableFilterItem) => boolean);
1050
1096
  filterResetToDefaultFilteredValue?: boolean;
1051
1097
  filterOnClose?: boolean;
1052
- filterDropdown?: React.ReactNode | ((props: TableFilterDropdownProps) => React.ReactNode);
1098
+ filterDropdown?: React.ReactNode | ((props: DataTableFilterDropdownProps) => React.ReactNode);
1053
1099
  filterIcon?: React.ReactNode | ((filtered: boolean) => React.ReactNode);
1054
1100
  filterDropdownProps?: {
1055
1101
  open?: boolean;
@@ -1057,17 +1103,17 @@ type TableColumn<T> = Omit<ColumnType<T>, "title" | "dataIndex"> & {
1057
1103
  className?: string;
1058
1104
  style?: React.CSSProperties;
1059
1105
  };
1060
- onFilter?: (value: TableFilterValue, record: T) => boolean;
1106
+ onFilter?: (value: DataTableFilterValue, record: T) => boolean;
1061
1107
  responsive?: ("xs" | "sm" | "md" | "lg" | "xl" | "xxl")[];
1062
1108
  };
1063
- type TableColumnsType<T> = TableColumn<T>[];
1064
- type TableSelectionType = "all" | "none" | "invert" | "single" | "multiple";
1065
- type TableRowSelection<T> = {
1109
+ type DataTableColumnsType<T> = DataTableColumn<T>[];
1110
+ type DataTableSelectionType = "all" | "none" | "invert" | "single" | "multiple";
1111
+ type DataTableRowSelection<T> = {
1066
1112
  type?: "checkbox" | "radio";
1067
1113
  selectedRowKeys?: React.Key[];
1068
1114
  defaultSelectedRowKeys?: React.Key[];
1069
1115
  onChange?: (keys: React.Key[], rows: T[], info: {
1070
- type: TableSelectionType;
1116
+ type: DataTableSelectionType;
1071
1117
  }) => void;
1072
1118
  onSelect?: (record: T, selected: boolean, rows: T[], event: Event) => void;
1073
1119
  onSelectAll?: (selected: boolean, rows: T[], changeRows: T[]) => void;
@@ -1091,7 +1137,7 @@ type TableRowSelection<T> = {
1091
1137
  onSelect: (keys: React.Key[]) => void;
1092
1138
  })[];
1093
1139
  };
1094
- type TablePagination = {
1140
+ type DataTablePagination = {
1095
1141
  page?: number;
1096
1142
  current?: number;
1097
1143
  defaultCurrent?: number;
@@ -1114,7 +1160,7 @@ type TablePagination = {
1114
1160
  className?: string;
1115
1161
  style?: React.CSSProperties;
1116
1162
  };
1117
- type TableLocale = {
1163
+ type DataTableLocale = {
1118
1164
  emptyText?: React.ReactNode;
1119
1165
  filterTitle?: string;
1120
1166
  filterConfirm?: string;
@@ -1136,20 +1182,20 @@ type TableLocale = {
1136
1182
  };
1137
1183
  type RcSemantics = NonNullable<TableProps$1["classNames"]>;
1138
1184
  type RcStyles = NonNullable<TableProps$1["styles"]>;
1139
- type TableClassNames = RcSemantics & {
1185
+ type DataTableClassNames = RcSemantics & {
1140
1186
  root?: string;
1141
1187
  pagination?: string;
1142
1188
  };
1143
- type TableStyles = RcStyles & {
1189
+ type DataTableStyles = RcStyles & {
1144
1190
  root?: React.CSSProperties;
1145
1191
  pagination?: React.CSSProperties;
1146
1192
  };
1147
- type TableProps<T> = Omit<TableProps$1<T>, "data" | "columns" | "children" | "onChange" | "scroll" | "classNames" | "styles" | "emptyText"> & {
1193
+ type DataTableProps<T> = Omit<TableProps$1<T>, "data" | "columns" | "children" | "onChange" | "scroll" | "classNames" | "styles" | "emptyText"> & {
1148
1194
  data?: T[];
1149
1195
  dataSource?: T[];
1150
- columns?: TableColumn<T>[];
1196
+ columns?: DataTableColumn<T>[];
1151
1197
  children?: React.ReactNode;
1152
- column?: Partial<TableColumn<T>>;
1198
+ column?: Partial<DataTableColumn<T>>;
1153
1199
  manual?: boolean;
1154
1200
  loading?: boolean | {
1155
1201
  spinning?: boolean;
@@ -1157,58 +1203,40 @@ type TableProps<T> = Omit<TableProps$1<T>, "data" | "columns" | "children" | "on
1157
1203
  delay?: number;
1158
1204
  indicator?: React.ReactNode;
1159
1205
  };
1160
- onChange?: (state: TableState) => void;
1161
- onTableChange?: (pagination: TablePagination, filters: TableFilters, sorter: TableSortResult<T> | TableSortResult<T>[], extra: {
1206
+ onChange?: (state: DataTableState) => void;
1207
+ onTableChange?: (pagination: DataTablePagination, filters: DataTableFilters, sorter: DataTableSortResult<T> | DataTableSortResult<T>[], extra: {
1162
1208
  currentDataSource: T[];
1163
1209
  action: "paginate" | "sort" | "filter";
1164
1210
  }) => void;
1165
- sort?: TableState["sort"];
1211
+ sort?: DataTableState["sort"];
1166
1212
  filters?: Record<string, string>;
1167
1213
  selectable?: boolean;
1168
1214
  selectedKeys?: React.Key[];
1169
1215
  onSelectionChange?: (keys: React.Key[]) => void;
1170
- rowSelection?: TableRowSelection<T>;
1171
- pagination?: false | TablePagination;
1216
+ rowSelection?: DataTableRowSelection<T>;
1217
+ pagination?: false | DataTablePagination;
1218
+ /** Toolbar inside the table frame, before top pagination and rows. */
1219
+ toolbar?: React.ReactNode;
1172
1220
  empty?: React.ReactNode;
1173
- locale?: TableLocale;
1221
+ locale?: DataTableLocale;
1174
1222
  size?: "small" | "middle" | "medium" | "large";
1175
1223
  bordered?: boolean;
1176
- sortDirections?: Exclude<SortOrder, null>[];
1177
- showSorterTooltip?: TableColumn<T>["showSorterTooltip"];
1224
+ sortDirections?: Exclude<DataTableSortOrder, null>[];
1225
+ showSorterTooltip?: DataTableColumn<T>["showSorterTooltip"];
1178
1226
  getPopupContainer?: (trigger: HTMLElement) => HTMLElement;
1179
1227
  scroll?: NonNullable<TableProps$1<T>["scroll"]> & {
1180
1228
  scrollToFirstRowOnChange?: boolean;
1181
1229
  };
1182
1230
  virtual?: boolean;
1183
1231
  virtualItemHeight?: number;
1184
- classNames?: TableClassNames | ((info: {
1185
- props: TableProps<T>;
1186
- }) => TableClassNames);
1187
- styles?: TableStyles | ((info: {
1188
- props: TableProps<T>;
1189
- }) => TableStyles);
1190
- };
1191
- type TableExpandableConfig<T> = ExpandableConfig<T>;
1192
-
1193
- declare function Column<T>(_props: TableColumn<T>): null;
1194
- declare function ColumnGroup<T>(_props: Omit<TableColumn<T>, "children"> & {
1195
- children: React.ReactNode;
1196
- }): null;
1197
- declare const Table: (<T>(props: TableProps<T> & React.RefAttributes<Reference>) => React.ReactElement) & {
1198
- Column: typeof Column;
1199
- ColumnGroup: typeof ColumnGroup;
1200
- Summary: React.FC<React.PropsWithChildren<_rc_component_table_es_Footer_Summary.SummaryProps>> & {
1201
- Row: React.FC<React.PropsWithChildren<_rc_component_table_es_Footer_Row.FooterRowProps>>;
1202
- Cell: React.FC<React.PropsWithChildren<_rc_component_table_es_Footer_Cell.SummaryCellProps>>;
1203
- };
1204
- EXPAND_COLUMN: {};
1205
- SELECTION_COLUMN: Readonly<{
1206
- key: "__mt_selection_column";
1207
- }>;
1208
- SELECTION_ALL: "all";
1209
- SELECTION_INVERT: "invert";
1210
- SELECTION_NONE: "none";
1211
- };
1232
+ classNames?: DataTableClassNames | ((info: {
1233
+ props: DataTableProps<T>;
1234
+ }) => DataTableClassNames);
1235
+ styles?: DataTableStyles | ((info: {
1236
+ props: DataTableProps<T>;
1237
+ }) => DataTableStyles);
1238
+ };
1239
+ type DataTableExpandableConfig<T> = ExpandableConfig<T>;
1212
1240
 
1213
1241
  type TreeKey = string | number;
1214
1242
  /** Legacy items retain id/label; normalized treeData uses the same shape. */
@@ -1574,6 +1602,26 @@ declare const Splitter: typeof SplitterRoot & {
1574
1602
  Panel: typeof SplitterPanel;
1575
1603
  };
1576
1604
 
1605
+ declare function Column<T>(_props: DataTableColumn<T>): null;
1606
+ declare function ColumnGroup<T>(_props: Omit<DataTableColumn<T>, "children"> & {
1607
+ children: React.ReactNode;
1608
+ }): null;
1609
+ declare const DataTable: (<T>(props: DataTableProps<T> & React.RefAttributes<Reference>) => React.ReactElement) & {
1610
+ Column: typeof Column;
1611
+ ColumnGroup: typeof ColumnGroup;
1612
+ Summary: React.FC<React.PropsWithChildren<_rc_component_table_es_Footer_Summary.SummaryProps>> & {
1613
+ Row: React.FC<React.PropsWithChildren<_rc_component_table_es_Footer_Row.FooterRowProps>>;
1614
+ Cell: React.FC<React.PropsWithChildren<_rc_component_table_es_Footer_Cell.SummaryCellProps>>;
1615
+ };
1616
+ EXPAND_COLUMN: {};
1617
+ SELECTION_COLUMN: Readonly<{
1618
+ key: "__mt_selection_column";
1619
+ }>;
1620
+ SELECTION_ALL: "all";
1621
+ SELECTION_INVERT: "invert";
1622
+ SELECTION_NONE: "none";
1623
+ };
1624
+
1577
1625
  /** Extract boundary-delimited mentions from plain text; does not validate membership in options. */
1578
1626
  declare function getMentions(value: string, config?: {
1579
1627
  prefix?: string | string[];
@@ -2224,8 +2272,6 @@ interface DataListSearch<T> {
2224
2272
  value?: string;
2225
2273
  defaultValue?: string;
2226
2274
  onChange?: (value: string) => void;
2227
- placeholder?: string;
2228
- label?: string;
2229
2275
  /** Client-side matcher. Remote lists ignore it. */
2230
2276
  match?: (item: T, query: string) => boolean;
2231
2277
  }
@@ -2261,6 +2307,13 @@ interface DataListBatchContext {
2261
2307
  selectedKeys: readonly DataListKey[];
2262
2308
  clearSelection: () => void;
2263
2309
  }
2310
+ interface DataListSearchProps {
2311
+ label?: string;
2312
+ placeholder?: string;
2313
+ }
2314
+ interface DataListSelectionProps {
2315
+ children?: (context: DataListBatchContext) => React.ReactNode;
2316
+ }
2264
2317
  interface DataListProps<T> extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
2265
2318
  items: readonly T[];
2266
2319
  /** Unique stable string or finite number. */
@@ -2272,17 +2325,22 @@ interface DataListProps<T> extends Omit<React.HTMLAttributes<HTMLElement>, "chil
2272
2325
  search?: DataListSearch<T>;
2273
2326
  /** Client-side predicate. Remote lists ignore it. */
2274
2327
  filter?: (item: T) => boolean;
2275
- filters?: React.ReactNode;
2328
+ /** Explicit top slot. Compose a Toolbar and connected controls if needed. */
2276
2329
  toolbar?: React.ReactNode;
2277
2330
  pagination?: DataListPagination;
2278
2331
  selection?: DataListSelection<T>;
2279
2332
  expansion?: DataListExpansion<T>;
2280
2333
  renderActions?: (item: T) => React.ReactNode;
2281
- renderBatchActions?: (context: DataListBatchContext) => React.ReactNode;
2282
2334
  loading?: boolean;
2283
2335
  empty?: React.ReactNode;
2284
2336
  }
2285
- declare function DataList<T>({ items, getKey, getLabel, renderItem, search, filter, filters, toolbar, pagination, selection, expansion, renderActions, renderBatchActions, loading, empty, className, ...props }: DataListProps<T>): React.JSX.Element;
2337
+ declare function DataListSearchField({ label, placeholder }: DataListSearchProps): React.JSX.Element | null;
2338
+ declare function DataListSelectionControl({ children }: DataListSelectionProps): React.JSX.Element | null;
2339
+ declare function DataListRoot<T>({ items, getKey, getLabel, renderItem, search, filter, toolbar, pagination, selection, expansion, renderActions, loading, empty, className, ...props }: DataListProps<T>): React.JSX.Element;
2340
+ declare const DataList: typeof DataListRoot & {
2341
+ Search: typeof DataListSearchField;
2342
+ Selection: typeof DataListSelectionControl;
2343
+ };
2286
2344
 
2287
2345
  type CardGroupBreakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
2288
2346
  type CardGroupResponsive = number | Partial<Record<CardGroupBreakpoint, number>>;
@@ -2619,8 +2677,10 @@ interface ToolbarProps extends Omit<React.ComponentPropsWithoutRef<"div">, "chil
2619
2677
  start?: React.ReactNode;
2620
2678
  /** Controls aligned at the logical end. */
2621
2679
  end?: React.ReactNode;
2622
- /** Surface color resolved from the active mtone theme. */
2680
+ /** Surface color resolved from the active mtone theme; defaults to gray. */
2623
2681
  background?: "white" | "gray";
2682
+ /** Gray surfaces default to borderless Button and Select chrome; white stays standard. */
2683
+ controlStyle?: "default" | "borderless";
2624
2684
  }
2625
2685
  /** Standalone presentation for search, filters and actions. */
2626
2686
  declare const Toolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
@@ -2654,4 +2714,27 @@ interface FloatingWindowProps {
2654
2714
  }
2655
2715
  declare function FloatingWindow({ title, children, trigger, open: controlledOpen, defaultOpen, onOpenChange, initialPosition, initialSize, minWidth, minHeight, maxWidth, maxHeight, draggable, resizable, minimizable, minimizedIcon, zIndex, }: FloatingWindowProps): React.JSX.Element;
2656
2716
 
2657
- export { AdminLayout, type AdminLayoutContentProps, type AdminLayoutHeaderProps, type AdminLayoutProps, type AdminLayoutSiderProps, Affix, type AffixProps, type AiActivityProps, type AiActivityStatus, type AiActivityStep, AiChat, type AiChatProps, AiCheckpoint, type AiCheckpointProps, AiConfirmation, type AiConfirmationProps, AiContext, type AiContextProps, type AiEvidenceAppearance, type AiFileNode, AiFileTree, type AiFileTreeProps, AiInlineCitation, type AiInlineCitationProps, AiMessage, type AiMessageProps, type AiModelOption, AiModelSelector, type AiModelSelectorProps, AiPlan, type AiPlanProps, type AiPromptAttachment, AiPromptInput, type AiPromptInputProps, type AiPromptStatus, type AiPromptSubmission, AiQueue, type AiQueueProps, AiReasoning, type AiReasoningProps, type AiSource, AiSources, type AiSourcesProps, type AiStackFrame, AiStackTrace, type AiStackTraceProps, AiSubagent, type AiSubagentProps, AiSuggestion, type AiSuggestionProps, AiTask, type AiTaskProps, AiTerminal, type AiTerminalProps, type AiTerminalStatus, type AiTestResult, AiTestResults, type AiTestResultsProps, type AiTestStatus, AiTool, type AiToolProps, Alert, AutoComplete, type AutoCompleteGroup, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarBreakpoint, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Blockquote, type BlockquoteProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonToggleOptions, Calendar, type CalendarCellInfo, type CalendarHeaderInfo, type CalendarMode, type CalendarProps, type CalendarSelectInfo, type CalendarSemanticSlot, Card, type CardGridProps, CardGroup, type CardGroupBreakpoint, type CardGroupItemProps, type CardGroupProps, type CardGroupResponsive, type CardMetaProps, type CardMetaSemantic, type CardProps, type CardSemantic, type CardTabItem, type CardTokens, Cascader, type CascaderKey, type CascaderOption, CascaderPanel, type CascaderPanelProps, type CascaderPath, type CascaderProps, CheckCard, type CheckCardGroupProps, type CheckCardOption, type CheckCardProps, type CheckCardSize, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, DataList, type DataListBatchContext, type DataListExpansion, type DataListKey, type DataListLocalPagination, type DataListPagination, type DataListProps, type DataListRemotePagination, type DataListSearch, type DataListSelection, DatePicker, type DatePickerProps, Dialog, type DialogProps, Divider, type DividerProps, DocumentCard, type DocumentItem, DocumentList, Drawer, Empty, Fieldset, type FieldsetProps, FloatingWindow, type FloatingWindowProps, Form, type FormFieldProps, type FormInstance, type FormProps, type FormRule, type FormValidateTrigger, type FormValidationError, type FormValues, GlobalNotice, type GlobalNoticeProps, HoverCard, type HoverCardProps, Image, ImageGroup, type ImageGroupProps, type ImageItem, ImagePreview, type ImagePreviewProps, type ImageProps, Input, type InputControlSize, type InputOTPProps, type InputPasswordProps, type InputProps, type InputSearchProps, type InputTextAreaProps, type InputVariant, Link, type LinkProps, List, type ListHandle, ListItem, type ListItemProps, type ListProps, type ListScrollTarget, type ListSortHandleProps, LoadingOverlay, type LoadingOverlayProps, type Locale, type MentionOption, Mentions, type MentionsProps, type MentionsRef, type MentionsSemantic, Menu, type MenuCheckboxItem, type MenuDivider, type MenuEntry, type MenuGroup, type MenuItem, type MenuProps, type MenuRadioGroup, Menubar, type MenubarMenu, type MenubarProps, type MtoneAccent, MtoneProvider, type MtoneProviderProps, MtoneScope, type MtoneScopeProps, type MtoneTheme, NavGroup, type NavGroupProps, NavItem, type NavItemAction, type NavItemButtonProps, type NavItemLinkProps, type NavItemProps, NavSubmenu, type NavSubmenuProps, NumberInput, type NumberInputProps, type OpenProps, type Option, PageLayout, type PageLayoutProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popconfirm, type PopconfirmPlacement, type PopconfirmProps, Popover, type PopoverMenuProps, type PopoverProps, Progress, type ProgressColor, type ProgressProps, type ProgressStatus, type ProgressType, PropertyItem, PropertyList, Questionnaire, type QuestionnaireAnswer, type QuestionnaireAnswers, type QuestionnaireChoice, type QuestionnaireItem, type QuestionnaireProps, RadioGroup, type RadioGroupProps, Rate, type RateCharacterInfo, type RateProps, Result, type ResultProps, type ResultSemantic, type ResultStatus, SectionGroup, type SectionGroupProps, type SectionGroupSectionProps, Select, type SelectMultipleProps, type SelectOption, type SelectOptionGroup, type SelectPopupSearchProps, type SelectProps, type SelectSingleProps, type SelectTagsProps, Sidebar, type SidebarProps, type SidebarTabsOptions, Skeleton, Slider, type SliderProps, type SortOrder, Spinner, Splitter, type SplitterPanelProps, type SplitterProps, type SplitterSize, Spotlight, type SpotlightAction, type SpotlightProps, Status, Switch, type TabItem, Table, type TableClassNames, type TableColumn, type TableColumnTitleProps, type TableColumnsType, type TableExpandableConfig, type TableFilterDropdownProps, type TableFilterItem, type TableFilterValue, type TableFilters, type TableLocale, TableOfContents, type TableOfContentsHandle, type TableOfContentsItem, type TableOfContentsProps, type TablePagination, type TableProps, type TableRef, type TableRowSelection, type TableSelectionType, type TableSortResult, type TableState, type TableStyles, Tabs, type TabsIndicatorColor, type TabsProps, Tag, type TagProps, TagSelect, type TagSelectOption, type TagSelectProps, Text, type TextProps, Timeline, type TimelineItem, type TimelinePlacement, type TimelineProps, type TimelineSemantic, Title, type TitleProps, type ToastOptions, type ToastPosition, type ToastPromiseOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToastUpdateOptions, type Tokens, type Tone, Toolbar, type ToolbarProps, Tooltip, Transfer, type TransferDirection, type TransferItem, type TransferListContext, type TransferProps, Tree, type TreeCheckedKeys, type TreeDropInfo, type TreeItem, type TreeKey, type TreeNode, type TreeNodeInfo, type TreeProps, type TreeRef, TreeSelect, type TreeSelectCommonProps, type TreeSelectProps, Typography, type TypographyCodeProps, type TypographyCopyable, type TypographyEditable, type TypographyEllipsis, type TypographyTone, Upload, type UploadAdapter, type UploadContext, type UploadFile, type UploadProps, cn, getMentions, useMtone, useToast };
2717
+ interface ShortcutOptions {
2718
+ enabled?: boolean;
2719
+ allowInInputs?: boolean;
2720
+ preventDefault?: boolean;
2721
+ }
2722
+ interface ShortcutsProviderProps {
2723
+ children?: React.ReactNode;
2724
+ }
2725
+ interface ShortcutScopeProps extends ShortcutsProviderProps {
2726
+ active?: boolean;
2727
+ priority?: number;
2728
+ }
2729
+ type Platform = "mac" | "other";
2730
+ type Shortcut = string | readonly string[] | false;
2731
+ type Callback = (event: KeyboardEvent) => void;
2732
+ declare function formatShortcut(shortcut: string, platform?: Platform): string;
2733
+ /** One document listener per root provider; nested providers reuse that root. */
2734
+ declare function ShortcutsProvider({ children }: ShortcutsProviderProps): React.JSX.Element;
2735
+ /** Activates or suspends shortcut registrations for the React subtree (including its portals). */
2736
+ declare function ShortcutScope({ children, active, priority }: ShortcutScopeProps): React.JSX.Element;
2737
+ /** Registers one exact chord or alternatives in the nearest active shortcut scope. */
2738
+ declare function useShortcut(shortcut: Shortcut, callback: Callback, options?: ShortcutOptions): void;
2739
+
2740
+ export { AdminLayout, type AdminLayoutContentProps, type AdminLayoutHeaderProps, type AdminLayoutProps, type AdminLayoutSiderProps, Affix, type AffixProps, type AiActivityProps, type AiActivityStatus, type AiActivityStep, AiChat, type AiChatProps, AiCheckpoint, type AiCheckpointProps, AiConfirmation, type AiConfirmationProps, AiContext, type AiContextProps, type AiEvidenceAppearance, type AiFileNode, AiFileTree, type AiFileTreeProps, AiInlineCitation, type AiInlineCitationProps, AiMessage, type AiMessageProps, type AiModelOption, AiModelSelector, type AiModelSelectorProps, AiPlan, type AiPlanProps, type AiPromptAttachment, AiPromptInput, type AiPromptInputProps, type AiPromptStatus, type AiPromptSubmission, AiQueue, type AiQueueProps, AiReasoning, type AiReasoningProps, type AiSource, AiSources, type AiSourcesProps, type AiStackFrame, AiStackTrace, type AiStackTraceProps, AiSubagent, type AiSubagentProps, AiSuggestion, type AiSuggestionProps, AiTask, type AiTaskProps, AiTerminal, type AiTerminalProps, type AiTerminalStatus, type AiTestResult, AiTestResults, type AiTestResultsProps, type AiTestStatus, AiTool, type AiToolProps, Alert, AutoComplete, type AutoCompleteGroup, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarBreakpoint, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Blockquote, type BlockquoteProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonToggleOptions, Calendar, type CalendarCellInfo, type CalendarHeaderInfo, type CalendarMode, type CalendarProps, type CalendarSelectInfo, type CalendarSemanticSlot, Card, type CardGridProps, CardGroup, type CardGroupBreakpoint, type CardGroupItemProps, type CardGroupProps, type CardGroupResponsive, type CardMetaProps, type CardMetaSemantic, type CardProps, type CardSemantic, type CardTabItem, type CardTokens, Cascader, type CascaderKey, type CascaderOption, CascaderPanel, type CascaderPanelProps, type CascaderPath, type CascaderProps, CheckCard, type CheckCardGroupProps, type CheckCardOption, type CheckCardProps, type CheckCardSize, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, DataList, type DataListBatchContext, type DataListExpansion, type DataListKey, type DataListLocalPagination, type DataListPagination, type DataListProps, type DataListRemotePagination, type DataListSearch, type DataListSearchProps, type DataListSelection, type DataListSelectionProps, DataTable, type DataTableClassNames, type DataTableColumn, type DataTableColumnTitleProps, type DataTableColumnsType, type DataTableExpandableConfig, type DataTableFilterDropdownProps, type DataTableFilterItem, type DataTableFilterValue, type DataTableFilters, type DataTableLocale, type DataTablePagination, type DataTableProps, type DataTableRef, type DataTableRowSelection, type DataTableSelectionType, type DataTableSortOrder, type DataTableSortResult, type DataTableState, type DataTableStyles, DatePicker, type DatePickerProps, Dialog, type DialogProps, Divider, type DividerProps, DocumentCard, type DocumentItem, DocumentList, Drawer, Empty, Fieldset, type FieldsetProps, FloatingWindow, type FloatingWindowProps, Form, type FormFieldProps, type FormInstance, type FormProps, type FormRule, type FormValidateTrigger, type FormValidationError, type FormValues, GlobalNotice, type GlobalNoticeProps, HoverCard, type HoverCardProps, Image, ImageGroup, type ImageGroupProps, type ImageItem, ImagePreview, type ImagePreviewProps, type ImageProps, Input, type InputControlSize, type InputOTPProps, type InputPasswordProps, type InputProps, type InputSearchProps, type InputTextAreaProps, type InputVariant, Link, type LinkProps, List, type ListHandle, ListItem, type ListItemProps, type ListProps, type ListScrollTarget, type ListSortHandleProps, LoadingOverlay, type LoadingOverlayProps, type Locale, type MentionOption, Mentions, type MentionsProps, type MentionsRef, type MentionsSemantic, Menu, type MenuCheckboxItem, type MenuDivider, type MenuEntry, type MenuGroup, type MenuItem, type MenuProps, type MenuRadioGroup, Menubar, type MenubarMenu, type MenubarProps, type MtoneAccent, MtoneProvider, type MtoneProviderProps, MtoneScope, type MtoneScopeProps, type MtoneTheme, NavGroup, type NavGroupProps, NavItem, type NavItemAction, type NavItemButtonProps, type NavItemLinkProps, type NavItemProps, NavSubmenu, type NavSubmenuProps, NumberInput, type NumberInputProps, type OpenProps, type Option, PageLayout, type PageLayoutProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popconfirm, type PopconfirmPlacement, type PopconfirmProps, Popover, type PopoverMenuProps, type PopoverProps, Progress, type ProgressColor, type ProgressProps, type ProgressStatus, type ProgressType, PropertyItem, PropertyList, Questionnaire, type QuestionnaireAnswer, type QuestionnaireAnswers, type QuestionnaireChoice, type QuestionnaireItem, type QuestionnaireProps, RadioGroup, type RadioGroupProps, Rate, type RateCharacterInfo, type RateProps, Result, type ResultProps, type ResultSemantic, type ResultStatus, SectionGroup, type SectionGroupProps, type SectionGroupSectionProps, Select, type SelectMultipleProps, type SelectOption, type SelectOptionGroup, type SelectPopupSearchProps, type SelectProps, type SelectSingleProps, type SelectTagsProps, type ShortcutOptions, ShortcutScope, type ShortcutScopeProps, ShortcutsProvider, type ShortcutsProviderProps, Sidebar, type SidebarProps, type SidebarTabsOptions, Skeleton, Slider, type SliderProps, Spinner, Splitter, type SplitterPanelProps, type SplitterProps, type SplitterSize, Spotlight, type SpotlightAction, type SpotlightProps, Status, Switch, type TabItem, Table, TableOfContents, type TableOfContentsHandle, type TableOfContentsItem, type TableOfContentsProps, type TableProps, Tabs, type TabsIndicatorColor, type TabsProps, Tag, type TagProps, TagSelect, type TagSelectOption, type TagSelectProps, Text, type TextProps, Timeline, type TimelineItem, type TimelinePlacement, type TimelineProps, type TimelineSemantic, Title, type TitleProps, type ToastOptions, type ToastPosition, type ToastPromiseOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToastUpdateOptions, type Tokens, type Tone, Toolbar, type ToolbarProps, Tooltip, type TooltipPart, type TooltipProps, TooltipProvider, type TooltipProviderProps, type TooltipTrigger, Transfer, type TransferDirection, type TransferItem, type TransferListContext, type TransferProps, Tree, type TreeCheckedKeys, type TreeDropInfo, type TreeItem, type TreeKey, type TreeNode, type TreeNodeInfo, type TreeProps, type TreeRef, TreeSelect, type TreeSelectCommonProps, type TreeSelectProps, Typography, type TypographyCodeProps, type TypographyCopyable, type TypographyEditable, type TypographyEllipsis, type TypographyTone, Upload, type UploadAdapter, type UploadContext, type UploadFile, type UploadProps, cn, formatShortcut, getMentions, useMtone, useShortcut, useToast };