@bixlab/mtone 0.8.0 → 0.10.3

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
@@ -50,7 +50,6 @@ interface InputSearchProps extends InputProps {
50
50
  searchButton?: React.ReactNode;
51
51
  loading?: boolean;
52
52
  }
53
- declare const SearchInput: React.ForwardRefExoticComponent<InputSearchProps & React.RefAttributes<HTMLInputElement>>;
54
53
  interface InputPasswordProps extends Omit<InputProps, "type"> {
55
54
  visible?: boolean;
56
55
  defaultVisible?: boolean;
@@ -62,7 +61,6 @@ interface InputTextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaEl
62
61
  maxRows?: number;
63
62
  };
64
63
  }
65
- declare const Textarea: React.ForwardRefExoticComponent<InputTextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
66
64
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>> & {
67
65
  Search: React.ForwardRefExoticComponent<InputSearchProps & React.RefAttributes<HTMLInputElement>>;
68
66
  TextArea: React.ForwardRefExoticComponent<InputTextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
@@ -252,6 +250,8 @@ interface TextProps extends React.HTMLAttributes<HTMLSpanElement> {
252
250
  }
253
251
  interface TitleProps extends TextProps {
254
252
  level?: 1 | 2 | 3 | 4 | 5 | 6;
253
+ /** Draws a full-width rule below the heading. Defaults to true only for h2. */
254
+ divider?: boolean;
255
255
  }
256
256
  type ParagraphProps = TextProps;
257
257
  interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
@@ -276,12 +276,19 @@ interface BlockquoteProps extends Omit<React.BlockquoteHTMLAttributes<HTMLQuoteE
276
276
  textWrap?: React.CSSProperties["textWrap"];
277
277
  }
278
278
  declare const Blockquote: React.ForwardRefExoticComponent<BlockquoteProps & React.RefAttributes<HTMLQuoteElement>>;
279
+ interface TypographyCodeProps extends Omit<React.HTMLAttributes<HTMLElement>, "dangerouslySetInnerHTML"> {
280
+ /** Render a preformatted block instead of inline code. */
281
+ block?: boolean;
282
+ /** Highlight a supported language in multiline string blocks. */
283
+ language?: string;
284
+ }
279
285
  declare const Typography: {
280
286
  Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
281
287
  Title: React.ForwardRefExoticComponent<TitleProps & React.RefAttributes<HTMLHeadingElement>>;
282
288
  Paragraph: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLParagraphElement>>;
283
289
  Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
284
290
  Blockquote: React.ForwardRefExoticComponent<BlockquoteProps & React.RefAttributes<HTMLQuoteElement>>;
291
+ Code: React.ForwardRefExoticComponent<TypographyCodeProps & React.RefAttributes<HTMLElement>>;
285
292
  };
286
293
 
287
294
  interface DividerProps extends React.HTMLAttributes<HTMLElement> {
@@ -296,20 +303,31 @@ interface DividerProps extends React.HTMLAttributes<HTMLElement> {
296
303
  /** A non-interactive separator. Titles are supported in horizontal orientation only. */
297
304
  declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement | HTMLHRElement>>;
298
305
 
299
- type DropdownAlign = "start" | "end" | "left" | "right";
300
- interface DropdownLayoutProps {
306
+ interface PopoverSearchableSelectItem {
307
+ value: string;
308
+ label: string;
309
+ icon?: React__default.ReactNode;
310
+ disabled?: boolean;
311
+ }
312
+ interface PopoverSearchableSelectProps extends Omit<PopoverProps, "content" | "unstyled"> {
313
+ items: readonly PopoverSearchableSelectItem[];
314
+ value?: string | null;
315
+ defaultValue?: string | null;
316
+ onValueChange?: (value: string) => void;
317
+ searchPlaceholder?: string;
318
+ }
319
+
320
+ type FloatingAlign = "start" | "end" | "left" | "right";
321
+ interface FloatingLayoutProps {
301
322
  /** Content-sized by default. Numbers are CSS pixels; strings are CSS widths. */
302
323
  width?: React__default.CSSProperties["width"];
303
324
  /** start/end are logical; left/right are physical even in RTL. */
304
- align?: DropdownAlign;
305
- }
306
- interface DropdownProps extends OpenProps, DropdownLayoutProps {
307
- trigger: React__default.ReactElement;
308
- content: React__default.ReactNode;
309
- /** Accessible name for the nonmodal dialog. */
310
- label?: string;
325
+ align?: FloatingAlign;
311
326
  }
312
- declare function Dropdown({ trigger, content, width, align, label, ...props }: DropdownProps): React__default.JSX.Element;
327
+
328
+ declare const accentNames: readonly ["neutral", "blue", "green", "orange", "red", "purple", "teal", "coral"];
329
+ /** Shared theme accent keys, backed by the matching --mt-accent-* properties. */
330
+ type MtoneAccent = (typeof accentNames)[number];
313
331
 
314
332
  interface TabItem {
315
333
  value: string;
@@ -322,6 +340,8 @@ interface TabItem {
322
340
  forceRender?: boolean;
323
341
  destroyOnHidden?: boolean;
324
342
  }
343
+ /** A theme accent preset, or any valid CSS color value. */
344
+ type TabsIndicatorColor = MtoneAccent | (string & {});
325
345
  interface TabsProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children"> {
326
346
  items: TabItem[];
327
347
  value?: string;
@@ -329,8 +349,11 @@ interface TabsProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>,
329
349
  onValueChange?: (value: string) => void;
330
350
  label?: string;
331
351
  placement?: "top" | "bottom" | "start" | "end";
332
- variant?: "line" | "card" | "editable-card";
352
+ /** Attached connects to the panel at top; other placements use line styling. */
353
+ variant?: "line" | "card" | "editable-card" | "attached";
333
354
  size?: "small" | "medium" | "large";
355
+ /** Color of the selected line indicator; defaults to currentColor. */
356
+ indicatorColor?: TabsIndicatorColor;
334
357
  centered?: boolean;
335
358
  gap?: number;
336
359
  extraStart?: React__default.ReactNode;
@@ -386,7 +409,6 @@ type ToastProviderProps = {
386
409
  position?: ToastPosition;
387
410
  };
388
411
  declare function ToastProvider({ children, timeout, limit, position, }: ToastProviderProps): React.JSX.Element;
389
- declare const Toast: typeof ToastProvider;
390
412
 
391
413
  interface Option {
392
414
  value: string;
@@ -420,9 +442,12 @@ declare function Checkbox({ label, children, className, ...props }: CheckboxProp
420
442
  declare function Switch({ label, children, className, ...props }: Omit<CheckboxProps, "indeterminate">): React__default.JSX.Element;
421
443
  interface RadioGroupProps extends Common, ValueProps<string> {
422
444
  options: Option[];
445
+ /** Visual treatment; both modes use the same radio semantics and form behavior. */
446
+ variant?: "default" | "segmented";
447
+ /** Defaults to vertical for standard radios and horizontal for segments. */
423
448
  orientation?: "horizontal" | "vertical";
424
449
  }
425
- declare function RadioGroup({ options, label, className, orientation, ...props }: RadioGroupProps): React__default.JSX.Element;
450
+ declare function RadioGroup({ options, label, className, variant, orientation, ...props }: RadioGroupProps): React__default.JSX.Element;
426
451
  interface FieldControlProps {
427
452
  id?: string;
428
453
  "aria-invalid"?: React__default.AriaAttributes["aria-invalid"];
@@ -461,7 +486,6 @@ interface NumberInputProps extends Common, Omit<ValueProps<number | null>, "defa
461
486
  }
462
487
  declare function NumberInput({ label, className, ...props }: NumberInputProps): React__default.JSX.Element;
463
488
 
464
- declare function Segmented({ options, label, className, ...props }: RadioGroupProps): React__default.JSX.Element;
465
489
  interface MenuItem {
466
490
  type?: "item";
467
491
  icon?: React__default.ReactNode;
@@ -501,21 +525,30 @@ interface MenuRadioGroup {
501
525
  children: Omit<MenuItem, "type" | "children" | "onSelect">[];
502
526
  }
503
527
  type MenuEntry = MenuItem | MenuGroup | MenuDivider | MenuCheckboxItem | MenuRadioGroup;
504
- interface MenuProps extends OpenProps, DropdownLayoutProps {
505
- trigger: React__default.ReactElement;
528
+ interface MenuProps {
506
529
  items: MenuEntry[];
507
530
  onSelect?: (key: string) => void;
531
+ /** Accessible name for an inline menu. */
532
+ label?: string;
533
+ className?: string;
508
534
  }
509
- declare function Menu({ trigger, items, onSelect, width, align, ...props }: MenuProps): React__default.JSX.Element;
535
+ interface PopoverMenuProps extends OpenProps, FloatingLayoutProps, Omit<MenuProps, "className"> {
536
+ trigger: string | React__default.ReactElement;
537
+ /** Whether a mouse hover can open the menu in addition to normal presses. */
538
+ triggerMode?: "click" | "hover";
539
+ }
540
+ /** Commands in normal document flow, without a trigger or a floating surface. */
541
+ declare function Menu({ items, onSelect, label, className }: MenuProps): React__default.JSX.Element;
542
+ declare function PopoverMenu({ trigger, triggerMode, items, onOpenChange, onSelect, width, align, label, ...props }: PopoverMenuProps): React__default.JSX.Element;
510
543
  /** A top-level application menu. Keys must be unique within the bar. */
511
- interface MenubarMenu extends DropdownLayoutProps {
544
+ interface MenubarMenu extends FloatingLayoutProps {
512
545
  key: string;
513
546
  label: React__default.ReactNode;
514
547
  icon?: React__default.ReactNode;
515
548
  disabled?: boolean;
516
549
  items: MenuEntry[];
517
550
  }
518
- interface MenubarProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "onSelect" | "children">, DropdownLayoutProps {
551
+ interface MenubarProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "onSelect" | "children">, FloatingLayoutProps {
519
552
  menus: MenubarMenu[];
520
553
  openKey?: string | null;
521
554
  defaultOpenKey?: string | null;
@@ -525,23 +558,30 @@ interface MenubarProps extends Omit<React__default.HTMLAttributes<HTMLDivElement
525
558
  loop?: boolean;
526
559
  trigger?: "click" | "hover";
527
560
  }
528
- /** Coordinated command menus, sharing Menu items and Dropdown surfaces. */
561
+ /** Coordinated command menus, sharing Menu items and floating surfaces. */
529
562
  declare function Menubar({ menus, openKey, defaultOpenKey, onOpenChange, onSelect, disabled, loop, trigger, width, align, className, ...props }: MenubarProps): React__default.JSX.Element;
530
- /** @deprecated Use MenuProps instead. */
531
- type DropdownMenuProps = MenuProps;
532
- /** @deprecated Use Menu instead. */
533
- declare const DropdownMenu: typeof Menu;
534
- declare function ContextMenu({ children, items, onSelect, width, ...props }: Omit<MenuProps, "trigger" | "align"> & {
563
+ declare function ContextMenu({ children, items, onSelect, width, label, ...props }: OpenProps & Omit<MenuProps, "className"> & {
535
564
  children: React__default.ReactNode;
565
+ width?: FloatingLayoutProps["width"];
536
566
  }): React__default.JSX.Element;
537
- interface PopoverProps extends OpenProps {
538
- trigger: React__default.ReactElement;
567
+ interface PopoverProps extends OpenProps, Omit<FloatingLayoutProps, "align"> {
568
+ trigger: string | React__default.ReactElement;
539
569
  content: React__default.ReactNode;
540
570
  title?: React__default.ReactNode;
571
+ /** Accessible name. Overrides the visible title when supplied. */
572
+ label?: string;
541
573
  side?: "top" | "bottom" | "left" | "right";
542
- }
543
- declare function Popover({ trigger, content, title, side, ...props }: PopoverProps): React__default.JSX.Element;
544
- declare function Tooltip({ children, content, side, ...props }: Omit<PopoverProps, "trigger" | "title"> & {
574
+ align?: FloatingLayoutProps["align"] | "center";
575
+ /** Remove the Popup frame, padding and background, keeping positioning and focus. */
576
+ unstyled?: boolean;
577
+ }
578
+ declare function PopoverRoot(props: PopoverProps): React__default.JSX.Element;
579
+ declare function PopoverSearchableSelect({ items, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, searchPlaceholder, title, width, align, ...props }: PopoverSearchableSelectProps): React__default.JSX.Element;
580
+ declare const Popover: typeof PopoverRoot & {
581
+ Menu: typeof PopoverMenu;
582
+ SearchableSelect: typeof PopoverSearchableSelect;
583
+ };
584
+ declare function Tooltip({ children, content, side, ...props }: OpenProps & Pick<PopoverProps, "content" | "side"> & {
545
585
  children: React__default.ReactElement;
546
586
  }): React__default.JSX.Element;
547
587
  interface DialogFrameProps extends OpenProps {
@@ -557,10 +597,6 @@ interface DialogProps extends DialogFrameProps {
557
597
  modal?: boolean;
558
598
  }
559
599
  declare function Dialog({ modal, title, description, children, footer, trigger, className, ...props }: DialogProps): React__default.JSX.Element;
560
- /** @deprecated Use DialogProps instead. */
561
- type ModalProps = DialogProps;
562
- /** @deprecated Use Dialog instead. */
563
- declare const Modal: typeof Dialog;
564
600
  interface ConfirmDialogProps extends DialogFrameProps {
565
601
  onConfirm?: () => void | Promise<void>;
566
602
  confirmText?: string;
@@ -597,6 +633,13 @@ interface CardTabItem {
597
633
  }
598
634
  interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
599
635
  title?: React.ReactNode;
636
+ /** Show a separate header control that hides content without unmounting it. */
637
+ collapsible?: boolean;
638
+ collapsed?: boolean;
639
+ defaultCollapsed?: boolean;
640
+ onCollapsedChange?: (collapsed: boolean) => void;
641
+ /** Accessible name of the collapse control; defaults to localized action text. */
642
+ collapseLabel?: string;
600
643
  /** Native HTML tooltip, formerly supplied through title. */
601
644
  htmlTitle?: string;
602
645
  extra?: React.ReactNode;
@@ -664,6 +707,8 @@ interface ListProps<T = unknown> extends Omit<React__default.HTMLAttributes<HTML
664
707
  getKey?: (item: T, index: number) => React__default.Key;
665
708
  /** Render row content, not a li/ListItem. The List owns the row element. */
666
709
  renderItem?: (item: T, index: number) => React__default.ReactNode;
710
+ /** Opt into live vertical drag sorting of nonvirtual data rows with a List.SortHandle. */
711
+ onReorder?: (fromIndex: number, toIndex: number) => void;
667
712
  groupBy?: (item: T) => React__default.Key;
668
713
  renderGroup?: (key: React__default.Key, items: readonly T[]) => React__default.ReactNode;
669
714
  stickyGroups?: boolean;
@@ -682,10 +727,10 @@ interface ListProps<T = unknown> extends Omit<React__default.HTMLAttributes<HTML
682
727
  ref?: React__default.Ref<ListHandle>;
683
728
  }
684
729
  /** Compact native list, with optional grouped and windowed data rendering. */
685
- declare function ListRoot<T = unknown>({ children, items, getKey, renderItem, groupBy, renderGroup, stickyGroups, height, contentWidth, virtual, estimatedItemHeight, estimatedGroupHeight, overscan, hoverable, emptyContent, loading, loadingContent, onEndReached, endThreshold, ref, className, style, onScroll, ...props }: ListProps<T>): React__default.JSX.Element;
730
+ declare function ListRoot<T = unknown>({ children, items, getKey, renderItem, onReorder, groupBy, renderGroup, stickyGroups, height, contentWidth, virtual, estimatedItemHeight, estimatedGroupHeight, overscan, hoverable, emptyContent, loading, loadingContent, onEndReached, endThreshold, ref, className, style, onScroll, onDragOver, onDrop, ...props }: ListProps<T>): React__default.JSX.Element;
686
731
  /** Drag grip for a controlled sortable list. Supply keyboard reordering separately. */
687
732
  type ListSortHandleProps = Omit<React__default.HTMLAttributes<HTMLSpanElement>, "children" | "draggable">;
688
- declare function ListSortHandle({ className, title, ...props }: ListSortHandleProps): React__default.JSX.Element;
733
+ declare function ListSortHandle({ className, title, onDragStart, ...props }: ListSortHandleProps): React__default.JSX.Element;
689
734
  interface ListItemProps extends React__default.LiHTMLAttributes<HTMLLIElement> {
690
735
  sortHandle?: ListSortHandleProps;
691
736
  icon?: React__default.ReactNode;
@@ -716,43 +761,78 @@ type MtoneProviderProps = Partial<Context> & {
716
761
  children: React.ReactNode;
717
762
  };
718
763
  declare function MtoneProvider({ children, locale, tokens, theme, }: MtoneProviderProps): React.JSX.Element;
764
+ /** Visual treatment of an opt-in pressed Button. */
765
+ type ButtonToggleOptions = {
766
+ mode: "background";
767
+ } | {
768
+ mode: "icon";
769
+ preset: "star" | "pin";
770
+ offIcon?: never;
771
+ onIcon?: never;
772
+ } | {
773
+ mode: "icon";
774
+ preset?: never;
775
+ offIcon: React.ReactNode;
776
+ onIcon: React.ReactNode;
777
+ };
778
+ type ButtonSize = "small" | "normal" | "large" | "sm" | "md" | "lg";
719
779
  type ButtonProps = Omit<React.ComponentPropsWithoutRef<typeof Button$1>, "className"> & {
720
780
  className?: string;
721
781
  variant?: "blue" | "solid" | "outline" | "soft" | "ghost";
722
- size?: "sm" | "md" | "lg";
782
+ size?: ButtonSize;
783
+ /** Square icon-only mode. Provide aria-label or aria-labelledby for its accessible name. */
784
+ iconOnly?: boolean;
723
785
  danger?: boolean;
724
786
  loading?: boolean;
787
+ /** Opt into a persistent pressed state. True uses background mode. */
788
+ toggle?: boolean | ButtonToggleOptions;
789
+ pressed?: boolean;
790
+ defaultPressed?: boolean;
791
+ onPressedChange?: (pressed: boolean) => void;
725
792
  icon?: React.ReactNode;
793
+ /** Content before the label (inline start). When omitted, icon is used. */
794
+ leftSection?: React.ReactNode;
795
+ /** Content after the label (inline end), including while loading. */
796
+ rightSection?: React.ReactNode;
797
+ /** Visual-only dropdown chevron, unless rightSection is explicitly specified. */
798
+ preset?: "dropdown";
726
799
  };
727
800
  declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.ButtonProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "className"> & {
728
801
  className?: string;
729
802
  variant?: "blue" | "solid" | "outline" | "soft" | "ghost";
730
- size?: "sm" | "md" | "lg";
731
- danger?: boolean;
732
- loading?: boolean;
733
- icon?: React.ReactNode;
734
- } & React.RefAttributes<HTMLButtonElement>>;
735
- declare const IconButton: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.ButtonProps, "ref"> & React.RefAttributes<HTMLElement>, "ref">, "className"> & {
736
- className?: string;
737
- variant?: "blue" | "solid" | "outline" | "soft" | "ghost";
738
- size?: "sm" | "md" | "lg";
803
+ size?: ButtonSize;
804
+ /** Square icon-only mode. Provide aria-label or aria-labelledby for its accessible name. */
805
+ iconOnly?: boolean;
739
806
  danger?: boolean;
740
807
  loading?: boolean;
808
+ /** Opt into a persistent pressed state. True uses background mode. */
809
+ toggle?: boolean | ButtonToggleOptions;
810
+ pressed?: boolean;
811
+ defaultPressed?: boolean;
812
+ onPressedChange?: (pressed: boolean) => void;
741
813
  icon?: React.ReactNode;
742
- } & {
743
- "aria-label": string;
814
+ /** Content before the label (inline start). When omitted, icon is used. */
815
+ leftSection?: React.ReactNode;
816
+ /** Content after the label (inline end), including while loading. */
817
+ rightSection?: React.ReactNode;
818
+ /** Visual-only dropdown chevron, unless rightSection is explicitly specified. */
819
+ preset?: "dropdown";
744
820
  } & React.RefAttributes<HTMLButtonElement>>;
745
821
  type ButtonGroupProps = React.HTMLAttributes<HTMLDivElement> & {
746
822
  /** Join adjacent buttons, keeping only the outside corners rounded. */
747
823
  connected?: boolean;
824
+ /** Default size for Buttons without their own size, including composed triggers. */
825
+ size?: ButtonSize;
748
826
  };
749
- declare const ButtonGroup: ({ className, connected, ...p }: ButtonGroupProps) => React.JSX.Element;
827
+ declare function ButtonGroup({ className, connected, size, ...p }: ButtonGroupProps): React.JSX.Element;
750
828
 
751
829
  type Tone = "neutral" | "blue" | "green" | "orange" | "red" | "purple";
752
- declare function Badge({ children, tone, onRemove, className, ...p }: React.HTMLAttributes<HTMLSpanElement> & {
830
+ interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
753
831
  tone?: Tone;
832
+ variant?: "default" | "filter";
754
833
  onRemove?: () => void;
755
- }): React.JSX.Element;
834
+ }
835
+ declare function Tag({ children, tone, variant, onRemove, className, ...p }: TagProps): React.JSX.Element;
756
836
  declare const Status: ({ children, tone, }: {
757
837
  children: React.ReactNode;
758
838
  tone?: Tone;
@@ -805,14 +885,46 @@ type SidebarProps = React.HTMLAttributes<HTMLElement> & {
805
885
  expandLabel?: string;
806
886
  };
807
887
  declare function Sidebar({ className, children, header, footer, collapsePlacement, collapsible, collapsed, defaultCollapsed, onCollapsedChange, collapseLabel, expandLabel, ...p }: SidebarProps): React.JSX.Element;
808
- declare const NavItem: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
888
+ interface NavItemAction {
889
+ content: React.ReactNode;
890
+ visibility?: "always" | "hover" | "active";
891
+ }
892
+ interface NavItemCommonProps {
809
893
  active?: boolean;
810
894
  icon?: React.ReactNode;
811
- } & React.RefAttributes<HTMLButtonElement>>;
812
- declare function NavGroup({ label, children, }: {
895
+ actions?: NavItemAction | readonly NavItemAction[];
896
+ }
897
+ type NavItemButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & NavItemCommonProps & {
898
+ href?: undefined;
899
+ };
900
+ type NavItemLinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & NavItemCommonProps & {
901
+ href: string;
902
+ disabled?: boolean;
903
+ };
904
+ type NavItemProps = NavItemButtonProps | NavItemLinkProps;
905
+ declare const NavItem: {
906
+ (props: NavItemLinkProps & React.RefAttributes<HTMLAnchorElement>): React.ReactNode;
907
+ (props: NavItemButtonProps & React.RefAttributes<HTMLButtonElement>): React.ReactNode;
908
+ };
909
+ interface NavGroupProps {
813
910
  label?: React.ReactNode;
814
911
  children: React.ReactNode;
815
- }): React.JSX.Element;
912
+ /** Show a decorative divider before this group when it follows another group. */
913
+ divider?: boolean;
914
+ /** Header controls at the inline end, hidden in the collapsed sidebar. */
915
+ actions?: React.ReactNode;
916
+ }
917
+ declare function NavGroup({ label, children, divider, actions }: NavGroupProps): React.JSX.Element;
918
+ interface NavSubmenuProps {
919
+ label: React.ReactNode;
920
+ children: React.ReactNode;
921
+ icon?: React.ReactNode;
922
+ defaultExpanded?: boolean;
923
+ expanded?: boolean;
924
+ onExpandedChange?: (expanded: boolean) => void;
925
+ disabled?: boolean;
926
+ }
927
+ declare function NavSubmenu({ label, children, icon, defaultExpanded, expanded, onExpandedChange, disabled, }: NavSubmenuProps): React.JSX.Element;
816
928
  interface BreadcrumbItem {
817
929
  key?: React.Key;
818
930
  label: React.ReactNode;
@@ -825,18 +937,13 @@ interface BreadcrumbItem {
825
937
  /** Separator after this item; null hides it. */
826
938
  separator?: React.ReactNode;
827
939
  onClick?: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>;
828
- menu?: Omit<MenuProps, "trigger">;
940
+ menu?: Omit<PopoverMenuProps, "trigger">;
829
941
  }
830
942
  interface BreadcrumbProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
831
943
  items: BreadcrumbItem[];
832
944
  separator?: React.ReactNode;
833
945
  }
834
946
  declare function Breadcrumb({ items, separator, "aria-label": label, ...props }: BreadcrumbProps): React.JSX.Element;
835
- declare function FilterChip({ children, onRemove, }: {
836
- children: React.ReactNode;
837
- onRemove: () => void;
838
- }): React.JSX.Element;
839
- declare const FilterBar: ({ className, ...p }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
840
947
 
841
948
  type TableRef = Reference;
842
949
  type SortOrder = "ascend" | "descend" | null;
@@ -1232,7 +1339,6 @@ interface TreeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "draggabl
1232
1339
  expandAction?: false | "click" | "doubleClick";
1233
1340
  }
1234
1341
  declare const Tree: React.ForwardRefExoticComponent<TreeProps & React.RefAttributes<TreeRef>>;
1235
- declare const DirectoryTree: React.ForwardRefExoticComponent<TreeProps & React.RefAttributes<TreeRef>>;
1236
1342
 
1237
1343
  type PaginationProps = {
1238
1344
  total: number;
@@ -1282,11 +1388,12 @@ type UploadProps = {
1282
1388
  children?: React.ReactNode;
1283
1389
  };
1284
1390
  declare function Upload({ upload, accept, maxSize, multiple, disabled, onChange, className, children, }: UploadProps): React.JSX.Element;
1285
- declare const Dropzone: typeof Upload;
1286
1391
 
1287
1392
  type AdminLayoutProps = React.HTMLAttributes<HTMLDivElement> & {
1288
1393
  hasSider?: boolean;
1289
1394
  fullHeight?: boolean;
1395
+ /** Optional banner above the sidebar and main area, outside their scroll regions. */
1396
+ notice?: React.ReactNode;
1290
1397
  };
1291
1398
  type AdminLayoutSiderProps = Omit<SidebarProps, "header" | "footer" | "collapsePlacement"> & {
1292
1399
  logo?: React.ReactNode;
@@ -1308,7 +1415,7 @@ type AdminLayoutContentProps = React.HTMLAttributes<HTMLElement> & {
1308
1415
  };
1309
1416
  declare function AdminLayoutContent({ as: Element, className, ...props }: AdminLayoutContentProps): React.JSX.Element;
1310
1417
  declare function AdminLayoutFooter({ className, ...props }: React.HTMLAttributes<HTMLElement>): React.JSX.Element;
1311
- declare function AdminLayoutRoot({ hasSider, fullHeight, className, children, ...props }: AdminLayoutProps): React.JSX.Element;
1418
+ declare function AdminLayoutRoot({ hasSider, fullHeight, className, children, notice, ...props }: AdminLayoutProps): React.JSX.Element;
1312
1419
  /** Compose nested layouts with the familiar AdminLayout.Sider/Header/Content/Footer API. */
1313
1420
  declare const AdminLayout: typeof AdminLayoutRoot & {
1314
1421
  Sider: typeof AdminLayoutSider;
@@ -1317,6 +1424,60 @@ declare const AdminLayout: typeof AdminLayoutRoot & {
1317
1424
  Footer: typeof AdminLayoutFooter;
1318
1425
  };
1319
1426
 
1427
+ type GlobalNoticeProps = Omit<React.ComponentPropsWithRef<"div">, "title"> & {
1428
+ title: React.ReactNode;
1429
+ icon?: React.ReactNode;
1430
+ /** Label for the trailing action; omit it for an icon-only dismiss button. */
1431
+ actionLabel?: string;
1432
+ actionRef?: React.Ref<HTMLButtonElement>;
1433
+ /** The app owns visibility, pending state, and any async side effects. */
1434
+ onAction?: () => void;
1435
+ loading?: boolean;
1436
+ error?: React.ReactNode;
1437
+ };
1438
+ declare function GlobalNotice({ title, children, icon, actionLabel, actionRef, onAction, loading, error, className, ...props }: GlobalNoticeProps): React.JSX.Element;
1439
+
1440
+ declare const pageLayoutWidths: {
1441
+ readonly sm: 720;
1442
+ readonly md: 960;
1443
+ readonly lg: 1200;
1444
+ };
1445
+ interface PageLayoutProps extends Omit<React.ComponentPropsWithRef<"div">, "title"> {
1446
+ title: React.ReactNode;
1447
+ subtitle?: React.ReactNode;
1448
+ icon?: React.ReactNode;
1449
+ actions?: React.ReactNode;
1450
+ description?: React.ReactNode;
1451
+ extra?: React.ReactNode;
1452
+ tabs?: React.ReactNode;
1453
+ /** Optional page-local sidebar. Pass a Sidebar or any other content. */
1454
+ sidebar?: React.ReactNode;
1455
+ /** Physical side of the main column when there is room. */
1456
+ sidebarPosition?: "left" | "right";
1457
+ /** Span both columns with the header and tabs ("full"), only the header
1458
+ * ("header"), or keep both in the main column ("main"). */
1459
+ headerSpan?: "full" | "header" | "main";
1460
+ headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
1461
+ /** Center the entire layout in its parent, with a preset or maximum pixel width. */
1462
+ maxWidth?: keyof typeof pageLayoutWidths | number;
1463
+ }
1464
+ declare function PageLayout({ title, subtitle, icon, actions, description, extra, tabs, children, sidebar, sidebarPosition, headerSpan, headingLevel, maxWidth, className, style, ...rootProps }: PageLayoutProps): React.JSX.Element;
1465
+
1466
+ type SectionGroupProps = React.ComponentPropsWithoutRef<"div"> & {
1467
+ /** Show a separator between sections. */
1468
+ dividers?: boolean;
1469
+ };
1470
+ type SectionGroupSectionProps = Omit<React.ComponentPropsWithoutRef<"section">, "title"> & {
1471
+ title: React.ReactNode;
1472
+ actions?: React.ReactNode;
1473
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
1474
+ };
1475
+ declare function SectionGroupRoot({ children, className, dividers, ...props }: SectionGroupProps): React.JSX.Element;
1476
+ declare function Section({ title, actions, headingLevel, children, className, ...props }: SectionGroupSectionProps): React.JSX.Element;
1477
+ declare const SectionGroup: typeof SectionGroupRoot & {
1478
+ Section: typeof Section;
1479
+ };
1480
+
1320
1481
  interface SpotlightAction {
1321
1482
  /** Unique within this Spotlight. */
1322
1483
  id: string;
@@ -1471,38 +1632,6 @@ declare const Mentions: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLA
1471
1632
  classNames?: Partial<Record<MentionsSemantic, string>>;
1472
1633
  styles?: Partial<Record<MentionsSemantic, React.CSSProperties>>;
1473
1634
  } & React.RefAttributes<MentionsRef>>;
1474
- declare const Mention: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "children" | "defaultValue" | "prefix" | "onChange" | "onSelect" | "value"> & {
1475
- value?: string;
1476
- defaultValue?: string;
1477
- onChange?: (value: string) => void;
1478
- options?: MentionOption[];
1479
- prefix?: string | string[];
1480
- split?: string;
1481
- onSearch?: (text: string, prefix: string) => void;
1482
- onSelect?: (option: MentionOption, prefix: string) => void;
1483
- filterOption?: false | ((input: string, option: MentionOption) => boolean);
1484
- validateSearch?: (text: string, split: string) => boolean;
1485
- loading?: boolean;
1486
- notFoundContent?: React.ReactNode;
1487
- placement?: "top" | "bottom";
1488
- getPopupContainer?: () => HTMLElement;
1489
- popupRender?: (menu: React.ReactElement) => React.ReactNode;
1490
- onPopupScroll?: React.UIEventHandler<HTMLDivElement>;
1491
- size?: "sm" | "md" | "lg";
1492
- status?: "error" | "warning";
1493
- autoSize?: boolean | {
1494
- minRows?: number;
1495
- maxRows?: number;
1496
- };
1497
- allowClear?: boolean | {
1498
- clearIcon?: React.ReactNode;
1499
- label?: string;
1500
- tabIndex?: number;
1501
- };
1502
- onClear?: () => void;
1503
- classNames?: Partial<Record<MentionsSemantic, string>>;
1504
- styles?: Partial<Record<MentionsSemantic, React.CSSProperties>>;
1505
- } & React.RefAttributes<MentionsRef>>;
1506
1635
 
1507
1636
  type CalendarMode = "month" | "year";
1508
1637
  type CalendarSelectInfo = {
@@ -1728,8 +1857,17 @@ interface TableOfContentsProps extends Omit<React__default.HTMLAttributes<HTMLEl
1728
1857
  selector?: string;
1729
1858
  title?: React__default.ReactNode;
1730
1859
  initialItems?: TableOfContentsItem[];
1860
+ /** Explicit ordered items, instead of discovering headings from the DOM. */
1861
+ items?: readonly TableOfContentsItem[];
1862
+ listStyle?: "flat" | "nested";
1863
+ /** A supplied href uses native link navigation instead of scrolling in JS. */
1864
+ getHref?: (item: TableOfContentsItem) => string | undefined;
1865
+ fallbackActiveId?: string;
1866
+ highlightLastAtEnd?: boolean;
1867
+ /** At this viewport width or below, use a native collapsed disclosure. */
1868
+ collapseBelow?: number;
1731
1869
  observe?: boolean;
1732
- offset?: number;
1870
+ offset?: number | (() => number);
1733
1871
  behavior?: ScrollBehavior;
1734
1872
  indent?: number;
1735
1873
  variant?: "default" | "subtle";
@@ -2052,4 +2190,397 @@ interface TagSelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "chi
2052
2190
  /** An inline group of multi-select tags with optional responsive row disclosure. */
2053
2191
  declare function TagSelect({ options, value, defaultValue, onValueChange, disabled, selectAll, selectAllLabel, expandable, expanded, defaultExpanded, onExpandedChange, expandLabel, collapseLabel, className, ...props }: TagSelectProps): React.JSX.Element;
2054
2192
 
2055
- export { AdminLayout, type AdminLayoutContentProps, type AdminLayoutHeaderProps, type AdminLayoutProps, type AdminLayoutSiderProps, Affix, type AffixProps, Alert, AutoComplete, type AutoCompleteGroup, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarBreakpoint, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, Blockquote, type BlockquoteProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarCellInfo, type CalendarHeaderInfo, type CalendarMode, type CalendarProps, type CalendarSelectInfo, type CalendarSemanticSlot, Card, type CardGridProps, type CardMetaProps, type CardMetaSemantic, type CardProps, type CardSemantic, type CardTabItem, type CardTokens, Cascader, type CascaderKey, type CascaderOption, CascaderPanel, type CascaderPanelProps, type CascaderPath, type CascaderProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, DatePicker, type DatePickerProps, Dialog, type DialogProps, DirectoryTree, Divider, type DividerProps, DocumentCard, type DocumentItem, DocumentList, Drawer, Dropdown, type DropdownAlign, type DropdownLayoutProps, DropdownMenu, type DropdownMenuProps, type DropdownProps, Dropzone, Empty, Fieldset, type FieldsetProps, FilterBar, FilterChip, Form, FormField, type FormFieldProps, type FormInstance, type FormProps, type FormRule, type FormValidateTrigger, type FormValidationError, type FormValues, HoverCard, type HoverCardProps, IconButton, 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, Mention, 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, Modal, type ModalProps, MtoneProvider, type MtoneProviderProps, MtoneScope, type MtoneScopeProps, type MtoneTheme, MultiSelect, type MultiSelectProps, NavGroup, NavItem, NumberInput, type NumberInputProps, type OpenProps, type Option, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popconfirm, type PopconfirmPlacement, type PopconfirmProps, Popover, type PopoverProps, Progress, type ProgressColor, type ProgressProps, type ProgressStatus, type ProgressType, PropertyItem, PropertyList, RadioGroup, type RadioGroupProps, Rate, type RateCharacterInfo, type RateProps, Result, type ResultProps, type ResultSemantic, type ResultStatus, SearchInput, Segmented, Select, type SelectProps, Sidebar, type SidebarProps, 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 TabsProps, TagSelect, type TagSelectOption, type TagSelectProps, Text, type TextProps, Textarea, Timeline, type TimelineItem, type TimelinePlacement, type TimelineProps, type TimelineSemantic, Title, type TitleProps, Toast, type ToastOptions, type ToastPosition, type ToastPromiseOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToastUpdateOptions, type Tokens, type Tone, 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 TypographyCopyable, type TypographyEditable, type TypographyEllipsis, type TypographyTone, Upload, type UploadAdapter, type UploadContext, type UploadFile, type UploadProps, cn, getMentions, useMtone, useToast };
2193
+ type DataListKey = string | number;
2194
+ interface DataListSearch<T> {
2195
+ value?: string;
2196
+ defaultValue?: string;
2197
+ onChange?: (value: string) => void;
2198
+ placeholder?: string;
2199
+ label?: string;
2200
+ /** Client-side matcher. Remote lists ignore it. */
2201
+ match?: (item: T, query: string) => boolean;
2202
+ }
2203
+ interface DataListLocalPagination {
2204
+ mode?: "local";
2205
+ page?: number;
2206
+ defaultPage?: number;
2207
+ pageSize?: number;
2208
+ onPageChange?: (page: number) => void;
2209
+ }
2210
+ interface DataListRemotePagination {
2211
+ mode: "remote";
2212
+ page: number;
2213
+ pageSize: number;
2214
+ total: number;
2215
+ onPageChange: (page: number) => void;
2216
+ }
2217
+ type DataListPagination = DataListLocalPagination | DataListRemotePagination;
2218
+ interface DataListSelection<T> {
2219
+ selectedKeys?: readonly DataListKey[];
2220
+ defaultSelectedKeys?: readonly DataListKey[];
2221
+ onChange?: (keys: DataListKey[]) => void;
2222
+ getDisabled?: (item: T) => boolean;
2223
+ }
2224
+ interface DataListExpansion<T> {
2225
+ expandedKeys?: readonly DataListKey[];
2226
+ defaultExpandedKeys?: readonly DataListKey[];
2227
+ onChange?: (keys: DataListKey[]) => void;
2228
+ isExpandable?: (item: T) => boolean;
2229
+ renderDetail: (item: T) => React.ReactNode;
2230
+ }
2231
+ interface DataListBatchContext {
2232
+ selectedKeys: readonly DataListKey[];
2233
+ clearSelection: () => void;
2234
+ }
2235
+ interface DataListProps<T> extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
2236
+ items: readonly T[];
2237
+ /** Unique stable string or finite number. */
2238
+ getKey: (item: T) => DataListKey;
2239
+ /** Accessible row name; defaults to the stringified key. */
2240
+ getLabel?: (item: T) => string;
2241
+ /** Row content only. DataList's underlying List owns the li. */
2242
+ renderItem: (item: T, index: number) => React.ReactNode;
2243
+ search?: DataListSearch<T>;
2244
+ /** Client-side predicate. Remote lists ignore it. */
2245
+ filter?: (item: T) => boolean;
2246
+ filters?: React.ReactNode;
2247
+ toolbar?: React.ReactNode;
2248
+ pagination?: DataListPagination;
2249
+ selection?: DataListSelection<T>;
2250
+ expansion?: DataListExpansion<T>;
2251
+ renderActions?: (item: T) => React.ReactNode;
2252
+ renderBatchActions?: (context: DataListBatchContext) => React.ReactNode;
2253
+ loading?: boolean;
2254
+ empty?: React.ReactNode;
2255
+ }
2256
+ 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;
2257
+
2258
+ type CardGroupBreakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
2259
+ type CardGroupResponsive = number | Partial<Record<CardGroupBreakpoint, number>>;
2260
+ interface CardGroupProps extends React.HTMLAttributes<HTMLDivElement> {
2261
+ direction?: "horizontal" | "vertical";
2262
+ columns?: CardGroupResponsive;
2263
+ gap?: CardGroupResponsive;
2264
+ divided?: boolean;
2265
+ }
2266
+ interface CardGroupItemProps extends React.HTMLAttributes<HTMLDivElement> {
2267
+ span?: CardGroupResponsive;
2268
+ }
2269
+ declare function CardGroupItem({ span: _span, className, style, ...props }: CardGroupItemProps): React.JSX.Element;
2270
+ declare function CardGroupRoot({ direction, columns, gap, divided, children, className, style, ...props }: CardGroupProps): React.JSX.Element;
2271
+ declare const CardGroup: typeof CardGroupRoot & {
2272
+ Item: typeof CardGroupItem;
2273
+ };
2274
+
2275
+ type QuestionnaireChoice = {
2276
+ value: string;
2277
+ label: React.ReactNode;
2278
+ disabled?: boolean;
2279
+ };
2280
+ type Question = {
2281
+ id: string;
2282
+ title: string;
2283
+ description?: React.ReactNode;
2284
+ required?: boolean;
2285
+ };
2286
+ type TextField = {
2287
+ placeholder?: string;
2288
+ label?: string;
2289
+ };
2290
+ type QuestionnaireItem = Question & ({
2291
+ type: "single";
2292
+ choices: readonly QuestionnaireChoice[];
2293
+ other?: TextField;
2294
+ } | {
2295
+ type: "multiple";
2296
+ choices: readonly QuestionnaireChoice[];
2297
+ } | ({
2298
+ type: "text";
2299
+ } & TextField));
2300
+ type QuestionnaireAnswer = {
2301
+ type: "choice";
2302
+ value: string;
2303
+ } | {
2304
+ type: "choices";
2305
+ values: readonly string[];
2306
+ } | {
2307
+ type: "text";
2308
+ value: string;
2309
+ };
2310
+ type QuestionnaireAnswers = Readonly<Partial<Record<string, QuestionnaireAnswer>>>;
2311
+ interface QuestionnaireProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onSubmit"> {
2312
+ items: readonly QuestionnaireItem[];
2313
+ answers?: QuestionnaireAnswers;
2314
+ defaultAnswers?: QuestionnaireAnswers;
2315
+ onAnswersChange?: (answers: QuestionnaireAnswers) => void;
2316
+ onSubmit: (answers: QuestionnaireAnswers) => void | Promise<void>;
2317
+ submitLabel?: React.ReactNode;
2318
+ }
2319
+ declare function Questionnaire({ items, answers, defaultAnswers, onAnswersChange, onSubmit, submitLabel, className, ...props }: QuestionnaireProps): React.JSX.Element;
2320
+
2321
+ interface AiChatProps extends React.HTMLAttributes<HTMLDivElement> {
2322
+ autoFollow?: boolean;
2323
+ bottomThreshold?: number;
2324
+ scrollToBottomLabel?: string;
2325
+ empty?: React.ReactNode;
2326
+ footer?: React.ReactNode;
2327
+ }
2328
+ declare function AiChat({ autoFollow, bottomThreshold, scrollToBottomLabel, empty, footer, children, className, ...props }: AiChatProps): React.JSX.Element;
2329
+ interface AiMessageProps extends React.HTMLAttributes<HTMLElement> {
2330
+ from: "user" | "assistant" | "system";
2331
+ name?: React.ReactNode;
2332
+ avatar?: React.ReactNode;
2333
+ actions?: React.ReactNode;
2334
+ status?: "idle" | "streaming" | "error";
2335
+ statusLabel?: string;
2336
+ }
2337
+ declare function AiMessage({ from, name, avatar, actions, status, statusLabel, children, className, ...props }: AiMessageProps): React.JSX.Element;
2338
+ interface AiPromptAttachment {
2339
+ id: string;
2340
+ name: string;
2341
+ size?: number;
2342
+ }
2343
+ interface AiPromptSubmission {
2344
+ text: string;
2345
+ attachments: readonly AiPromptAttachment[];
2346
+ }
2347
+ type AiPromptStatus = "ready" | "submitted" | "streaming" | "error";
2348
+ interface AiPromptInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSubmit" | "defaultValue"> {
2349
+ value?: string;
2350
+ defaultValue?: string;
2351
+ onValueChange?: (value: string) => void;
2352
+ onSubmit: (submission: AiPromptSubmission) => void | Promise<void>;
2353
+ onStop?: () => void;
2354
+ status?: AiPromptStatus;
2355
+ disabled?: boolean;
2356
+ placeholder?: string;
2357
+ attachments?: readonly AiPromptAttachment[];
2358
+ onFilesSelect?: (files: File[]) => void;
2359
+ onAttachmentRemove?: (id: string) => void;
2360
+ accept?: string;
2361
+ multiple?: boolean;
2362
+ toolbar?: React.ReactNode;
2363
+ error?: React.ReactNode;
2364
+ submitLabel?: string;
2365
+ stopLabel?: string;
2366
+ attachmentLabel?: string;
2367
+ }
2368
+ declare function AiPromptInput({ value, defaultValue, onValueChange, onSubmit, onStop, status, disabled, placeholder, attachments, onFilesSelect, onAttachmentRemove, accept, multiple, toolbar, error, submitLabel, stopLabel, attachmentLabel, className, ...props }: AiPromptInputProps): React.JSX.Element;
2369
+ interface AiSuggestionProps extends Omit<ButtonProps, "onSelect"> {
2370
+ prompt: string;
2371
+ onSelect?: (prompt: string) => void;
2372
+ }
2373
+ declare function AiSuggestion({ prompt, onSelect, children, onClick, className, ...props }: AiSuggestionProps): React.JSX.Element;
2374
+ interface AiModelOption {
2375
+ value: string;
2376
+ label: string;
2377
+ disabled?: boolean;
2378
+ }
2379
+ interface AiModelSelectorProps extends React.HTMLAttributes<HTMLDivElement> {
2380
+ models: AiModelOption[];
2381
+ value: string;
2382
+ onValueChange: (value: string) => void;
2383
+ efforts?: AiModelOption[];
2384
+ effort?: string;
2385
+ onEffortChange?: (value: string) => void;
2386
+ disabled?: boolean;
2387
+ modelLabel?: string;
2388
+ effortLabel?: string;
2389
+ }
2390
+ declare function AiModelSelector({ models, value, onValueChange, efforts, effort, onEffortChange, disabled, modelLabel, effortLabel, className, ...props }: AiModelSelectorProps): React.JSX.Element;
2391
+
2392
+ type AiActivityStatus = "pending" | "running" | "completed" | "error" | "cancelled";
2393
+ interface AiActivityStep {
2394
+ id: string;
2395
+ title: string;
2396
+ description?: React.ReactNode;
2397
+ status?: AiActivityStatus;
2398
+ }
2399
+ interface AiActivityProps extends React.HTMLAttributes<HTMLDivElement> {
2400
+ title?: string;
2401
+ status?: AiActivityStatus;
2402
+ statusLabel?: string;
2403
+ open?: boolean;
2404
+ defaultOpen?: boolean;
2405
+ onOpenChange?: (open: boolean) => void;
2406
+ }
2407
+ interface AiTaskProps extends AiActivityProps {
2408
+ steps?: AiActivityStep[];
2409
+ }
2410
+ declare function AiTask({ title, steps, children, ...props }: AiTaskProps): React.JSX.Element;
2411
+ interface AiReasoningProps extends AiActivityProps {
2412
+ text: string;
2413
+ }
2414
+ /** The text is a caller-provided public explanation. Does not retrieve or expose private reasoning. */
2415
+ declare function AiReasoning({ title, text, children, ...props }: AiReasoningProps): React.JSX.Element;
2416
+ interface AiPlanProps extends AiActivityProps {
2417
+ items: AiActivityStep[];
2418
+ }
2419
+ declare function AiPlan({ title, items, children, defaultOpen, ...props }: AiPlanProps): React.JSX.Element;
2420
+ interface AiQueueProps extends AiActivityProps {
2421
+ items: AiActivityStep[];
2422
+ }
2423
+ declare function AiQueue({ title, items, children, defaultOpen, ...props }: AiQueueProps): React.JSX.Element;
2424
+ interface AiSubagentProps extends AiActivityProps {
2425
+ name: string;
2426
+ description?: React.ReactNode;
2427
+ result?: React.ReactNode;
2428
+ }
2429
+ declare function AiSubagent({ name, title, description, result, children, ...props }: AiSubagentProps): React.JSX.Element;
2430
+ interface AiToolProps extends AiActivityProps {
2431
+ name: string;
2432
+ input?: string;
2433
+ output?: string;
2434
+ }
2435
+ /** Presentation only. Input and output are escaped plain text; this component never invokes a tool. */
2436
+ declare function AiTool({ name, title, input, output, children, ...props }: AiToolProps): React.JSX.Element;
2437
+ interface AiCheckpointProps extends React.HTMLAttributes<HTMLDivElement> {
2438
+ label?: string;
2439
+ description?: React.ReactNode;
2440
+ onRestore?: () => void;
2441
+ restoreLabel?: string;
2442
+ disabled?: boolean;
2443
+ }
2444
+ declare function AiCheckpoint({ label, description, onRestore, restoreLabel, disabled, children, className, ...props }: AiCheckpointProps): React.JSX.Element;
2445
+ interface AiConfirmationProps extends React.HTMLAttributes<HTMLDivElement> {
2446
+ title?: string;
2447
+ description?: React.ReactNode;
2448
+ /** Fully controlled decision. Clicking only calls the corresponding callback. */
2449
+ state?: "pending" | "approved" | "rejected";
2450
+ busy?: boolean;
2451
+ onConfirm?: () => void;
2452
+ onReject?: () => void;
2453
+ confirmLabel?: string;
2454
+ rejectLabel?: string;
2455
+ }
2456
+ /** A request UI, not an authorization engine: no automatic decision, execution or persistence. */
2457
+ declare function AiConfirmation({ title, description, state, busy, onConfirm, onReject, confirmLabel, rejectLabel, children, className, ...props }: AiConfirmationProps): React.JSX.Element;
2458
+
2459
+ interface AiEvidenceAppearance {
2460
+ className?: string;
2461
+ style?: React.CSSProperties;
2462
+ label?: string;
2463
+ }
2464
+ interface AiContextProps extends AiEvidenceAppearance {
2465
+ usedTokens: number;
2466
+ maxTokens?: number;
2467
+ inputTokens?: number;
2468
+ outputTokens?: number;
2469
+ /** Caller-formatted monetary value; no billing or pricing calculation is performed. */
2470
+ cost?: string;
2471
+ }
2472
+ declare function AiContext({ usedTokens, maxTokens, inputTokens, outputTokens, cost, label, className, style, }: AiContextProps): React.JSX.Element;
2473
+ interface AiFileNode {
2474
+ id: string;
2475
+ name: string;
2476
+ kind?: "file" | "folder";
2477
+ children?: AiFileNode[];
2478
+ disabled?: boolean;
2479
+ }
2480
+ interface AiFileTreeProps extends AiEvidenceAppearance {
2481
+ items: AiFileNode[];
2482
+ selectedId?: string | null;
2483
+ defaultSelectedId?: string;
2484
+ onSelect?: (id: string, node: AiFileNode) => void;
2485
+ defaultExpandedIds?: string[];
2486
+ }
2487
+ declare function AiFileTree({ items, selectedId, defaultSelectedId, onSelect, defaultExpandedIds, label, className, style, }: AiFileTreeProps): React.JSX.Element;
2488
+ interface AiSource {
2489
+ id: string;
2490
+ title: string;
2491
+ url?: string;
2492
+ description?: string;
2493
+ }
2494
+ interface AiInlineCitationProps {
2495
+ source: AiSource;
2496
+ index?: number;
2497
+ className?: string;
2498
+ style?: React.CSSProperties;
2499
+ }
2500
+ declare function AiInlineCitation({ source, index, className, style, }: AiInlineCitationProps): React.JSX.Element;
2501
+ interface AiSourcesProps extends AiEvidenceAppearance {
2502
+ sources: AiSource[];
2503
+ defaultOpen?: boolean;
2504
+ }
2505
+ declare function AiSources({ sources, defaultOpen, label, className, style, }: AiSourcesProps): React.JSX.Element;
2506
+ interface AiStackFrame {
2507
+ file: string;
2508
+ line?: number;
2509
+ column?: number;
2510
+ functionName?: string;
2511
+ }
2512
+ interface AiStackTraceProps extends AiEvidenceAppearance {
2513
+ message: string;
2514
+ frames: AiStackFrame[];
2515
+ defaultOpen?: boolean;
2516
+ }
2517
+ declare function AiStackTrace({ message, frames, defaultOpen, label, className, style, }: AiStackTraceProps): React.JSX.Element;
2518
+ type AiTerminalStatus = "idle" | "running" | "success" | "error";
2519
+ interface AiTerminalProps extends AiEvidenceAppearance {
2520
+ output: string;
2521
+ status?: AiTerminalStatus;
2522
+ }
2523
+ declare function AiTerminal({ output, status, label, className, style, }: AiTerminalProps): React.JSX.Element;
2524
+ type AiTestStatus = "passed" | "failed" | "skipped" | "running";
2525
+ interface AiTestResult {
2526
+ id: string;
2527
+ name: string;
2528
+ status: AiTestStatus;
2529
+ durationMs?: number;
2530
+ details?: string;
2531
+ }
2532
+ interface AiTestResultsProps extends AiEvidenceAppearance {
2533
+ results: AiTestResult[];
2534
+ defaultOpen?: boolean;
2535
+ }
2536
+ declare function AiTestResults({ results, defaultOpen, label, className, style, }: AiTestResultsProps): React.JSX.Element;
2537
+
2538
+ type CheckCardSize = "sm" | "md" | "lg";
2539
+ interface CheckCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "onChange"> {
2540
+ value?: string;
2541
+ checked?: boolean;
2542
+ defaultChecked?: boolean;
2543
+ onChange?: (checked: boolean) => void;
2544
+ name?: string;
2545
+ form?: string;
2546
+ required?: boolean;
2547
+ disabled?: boolean;
2548
+ loading?: boolean;
2549
+ title?: React.ReactNode;
2550
+ description?: React.ReactNode;
2551
+ avatar?: React.ReactNode;
2552
+ cover?: React.ReactNode;
2553
+ extra?: React.ReactNode;
2554
+ size?: CheckCardSize;
2555
+ bordered?: boolean;
2556
+ }
2557
+ type CheckCardOption = Omit<CheckCardProps, "value" | "checked" | "defaultChecked" | "onChange" | "name" | "form"> & {
2558
+ value: string;
2559
+ };
2560
+ type CheckCardGroupCommon = Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, "onChange" | "defaultValue"> & {
2561
+ legend?: React.ReactNode;
2562
+ loading?: boolean;
2563
+ options?: readonly CheckCardOption[];
2564
+ size?: CheckCardSize;
2565
+ bordered?: boolean;
2566
+ };
2567
+ type CheckCardGroupProps = CheckCardGroupCommon & ({
2568
+ multiple?: false;
2569
+ value?: string;
2570
+ defaultValue?: string;
2571
+ onChange?: (value: string) => void;
2572
+ required?: boolean;
2573
+ } | {
2574
+ multiple: true;
2575
+ value?: readonly string[];
2576
+ defaultValue?: readonly string[];
2577
+ onChange?: (value: string[]) => void;
2578
+ required?: never;
2579
+ });
2580
+ declare function CheckCardGroup(props: CheckCardGroupProps): React.JSX.Element;
2581
+ declare function CheckCardRoot({ value, checked, defaultChecked, onChange, name, form, required, disabled, loading: ownLoading, title, description, avatar, cover, extra, children, size, bordered, className, id, "aria-label": label, "aria-labelledby": labelledBy, "aria-describedby": describedBy, ...props }: CheckCardProps): React.JSX.Element;
2582
+ declare const CheckCard: typeof CheckCardRoot & {
2583
+ Group: typeof CheckCardGroup;
2584
+ };
2585
+
2586
+ 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, 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, MultiSelect, type MultiSelectProps, 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, type PopoverSearchableSelectItem, type PopoverSearchableSelectProps, 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 SelectProps, Sidebar, type SidebarProps, 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, 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 };