@coderabbitai/carrot-ui 0.1.19 → 0.1.21

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
@@ -1,13 +1,16 @@
1
1
  import { Accordion as Accordion_2 } from '@base-ui/react/accordion';
2
2
  import { AlertDialog as AlertDialog_2 } from '@base-ui/react/alert-dialog';
3
3
  import { Button as Button_2 } from '@base-ui/react/button';
4
+ import { Checkbox as Checkbox_2 } from '@base-ui/react/checkbox';
4
5
  import { ClassValue } from 'clsx';
5
6
  import { Column } from '@tanstack/react-table';
6
7
  import { ColumnDef } from '@tanstack/react-table';
7
8
  import { ColumnFiltersState } from '@tanstack/react-table';
8
9
  import { Command as Command_2 } from 'cmdk';
9
10
  import { ComponentProps } from 'react';
11
+ import { ComponentPropsWithoutRef } from 'react';
10
12
  import { ComponentType } from 'react';
13
+ import { default as default_2 } from 'react';
11
14
  import { Dialog as Dialog_2 } from '@base-ui/react/dialog';
12
15
  import { Drawer as Drawer_2 } from '@base-ui/react/drawer';
13
16
  import { Field } from '@base-ui/react/field';
@@ -16,6 +19,8 @@ import { ForwardRefExoticComponent } from 'react';
16
19
  import { JSX } from 'react/jsx-runtime';
17
20
  import { Menu } from '@base-ui/react/menu';
18
21
  import { Popover as Popover_2 } from '@base-ui/react/popover';
22
+ import { Radio } from '@base-ui/react/radio';
23
+ import { RadioGroup as RadioGroup_2 } from '@base-ui/react/radio-group';
19
24
  import { ReactElement } from 'react';
20
25
  import { ReactNode } from 'react';
21
26
  import { RefAttributes } from 'react';
@@ -24,8 +29,11 @@ import { RowSelectionState } from '@tanstack/react-table';
24
29
  import { Separator as Separator_2 } from '@base-ui/react/separator';
25
30
  import { SortingState } from '@tanstack/react-table';
26
31
  import { SVGProps } from 'react';
32
+ import { Switch } from '@base-ui/react/switch';
27
33
  import { TableOptions } from '@tanstack/react-table';
28
34
  import { Tabs as Tabs_2 } from '@base-ui/react/tabs';
35
+ import { Toggle as Toggle_2 } from '@base-ui/react/toggle';
36
+ import { ToggleGroup } from '@base-ui/react/toggle-group';
29
37
  import { Tooltip as Tooltip_2 } from '@base-ui/react/tooltip';
30
38
 
31
39
  export declare const Accordion: {
@@ -50,14 +58,13 @@ export declare interface AccordionTriggerProps extends ComponentProps<typeof Acc
50
58
  }
51
59
 
52
60
  /**
53
- * Horizontal banner alert for important messages.
61
+ * Alert component for important messages.
54
62
  *
55
- * Features a flickering pixel grid pattern on the right side that
56
- * uses the intent color for brand expression. Single-line layout:
57
- * icon on the left, text in the middle, optional action on the right.
58
- *
59
- * Links inside the text are automatically styled with an underline
60
- * in the intent color.
63
+ * Two layouts:
64
+ * - `inline` horizontal bar with icon, text, and optional action. Features
65
+ * a flickering pixel grid on the right side.
66
+ * - `banner` — full-width centered layout for page-level announcements.
67
+ * Content is centered with the icon above the text.
61
68
  */
62
69
  export declare const Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>>;
63
70
 
@@ -107,14 +114,22 @@ export declare interface AlertDialogTitleProps extends ComponentProps<typeof Ale
107
114
  export declare interface AlertDialogTriggerProps extends ComponentProps<typeof AlertDialog_2.Trigger> {
108
115
  }
109
116
 
117
+ export declare type AlertLayout = "inline" | "banner";
118
+
110
119
  export declare interface AlertProps {
111
120
  /** Visual style variant */
112
121
  variant?: AlertVariant;
122
+ /**
123
+ * Layout mode:
124
+ * - `inline` (default) — horizontal bar with icon left, text center, action right
125
+ * - `banner` — full-width centered layout for page-level announcements
126
+ */
127
+ layout?: AlertLayout;
113
128
  /** Override the default icon */
114
129
  icon?: ReactNode;
115
- /** Action element rendered at the far right (e.g. a Button) */
130
+ /** Action element rendered beside the text (e.g. a Button) */
116
131
  action?: ReactNode;
117
- /** Called when the dismiss button is clicked. When provided, a close button appears on the right. */
132
+ /** Called when the dismiss button is clicked. When provided, a close button appears. */
118
133
  onDismiss?: () => void;
119
134
  className?: string;
120
135
  children: ReactNode;
@@ -174,9 +189,9 @@ export declare interface AppHeaderProps {
174
189
  * - `circle` variant for users (fully rounded)
175
190
  * - `square` variant for organizations/workspaces (rounded corners)
176
191
  */
177
- export declare function Avatar({ src, initials, seed, generativePattern, alt, variant, size, color, className, }: AvatarProps): JSX.Element;
192
+ export declare const Avatar: ForwardRefExoticComponent<AvatarProps & RefAttributes<HTMLElement>>;
178
193
 
179
- declare type AvatarColor = "neutral" | "accent" | "danger" | "warning" | "success";
194
+ declare type AvatarColor = "neutral" | "accent" | "danger" | "warn" | "success";
180
195
 
181
196
  declare type AvatarGenerativePattern = "grid" | "symmetric" | "dense" | "quad" | "quad-dense" | "diagonal" | "sierpinski";
182
197
 
@@ -213,12 +228,15 @@ export declare type AvatarVariant = "circle" | "square";
213
228
 
214
229
  export declare const Badge: ForwardRefExoticComponent<BadgeProps & RefAttributes<HTMLSpanElement>>;
215
230
 
216
- export declare interface BadgeProps {
231
+ export declare interface BadgeProps extends ComponentPropsWithoutRef<"span"> {
232
+ /** Visual style variant */
217
233
  variant?: BadgeVariant;
218
- className?: string;
219
- children: ReactNode;
234
+ /** Size of the badge */
235
+ size?: BadgeSize;
220
236
  }
221
237
 
238
+ export declare type BadgeSize = keyof typeof sizeStyles_5;
239
+
222
240
  export declare type BadgeVariant = keyof typeof variantStyles_2;
223
241
 
224
242
  /**
@@ -230,6 +248,23 @@ export declare type BadgeVariant = keyof typeof variantStyles_2;
230
248
  */
231
249
  export declare const Button: ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & RefAttributes<HTMLElement>>;
232
250
 
251
+ /**
252
+ * Groups buttons together visually by merging their borders.
253
+ *
254
+ * Use for static button groups (e.g. a split button with a dropdown trigger).
255
+ * For toggle button groups with selection state, use `ToggleButtonGroup`.
256
+ *
257
+ * Children should be `Button` or `ToggleButton` components. The group
258
+ * removes inner border radii and collapses adjacent borders so the buttons
259
+ * read as a single connected surface.
260
+ */
261
+ export declare const ButtonGroup: ForwardRefExoticComponent<ButtonGroupProps & RefAttributes<HTMLDivElement>>;
262
+
263
+ export declare interface ButtonGroupProps extends ComponentPropsWithoutRef<"div"> {
264
+ /** Orientation of the group */
265
+ orientation?: "horizontal" | "vertical";
266
+ }
267
+
233
268
  export declare interface ButtonProps extends ComponentProps<typeof Button_2> {
234
269
  /** Visual style variant */
235
270
  variant?: ButtonVariant;
@@ -311,29 +346,13 @@ declare type CardVariant = keyof typeof variantStyles;
311
346
  * Checked state uses accent color. Indeterminate state uses neutral gray
312
347
  * to visually distinguish it from a deliberate selection.
313
348
  */
314
- export declare function Checkbox({ checked, defaultChecked, onCheckedChange, indeterminate, disabled, required, size, label, name, className, }: CheckboxProps): JSX.Element;
315
-
316
- export declare interface CheckboxProps {
317
- /** Whether the checkbox is ticked. Use for controlled mode. */
318
- checked?: boolean;
319
- /** Whether the checkbox is initially ticked. Use for uncontrolled mode. */
320
- defaultChecked?: boolean;
321
- /** Called when the checked state changes. */
322
- onCheckedChange?: (checked: boolean) => void;
323
- /** Whether the checkbox is in an indeterminate (mixed) state. */
324
- indeterminate?: boolean;
325
- /** Whether the checkbox is disabled. */
326
- disabled?: boolean;
327
- /** Whether the checkbox is required. */
328
- required?: boolean;
349
+ export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLButtonElement>>;
350
+
351
+ export declare interface CheckboxProps extends ComponentPropsWithoutRef<typeof Checkbox_2.Root> {
329
352
  /** Size of the checkbox. */
330
353
  size?: CheckboxSize;
331
354
  /** Optional label rendered beside the checkbox. */
332
355
  label?: ReactNode;
333
- /** Name attribute for form submission. */
334
- name?: string;
335
- /** Additional class name for the root element. */
336
- className?: string;
337
356
  }
338
357
 
339
358
  declare type CheckboxSize = keyof typeof sizeStyles_3;
@@ -367,6 +386,8 @@ export declare const ComboboxButton: ForwardRefExoticComponent<ComboboxButtonPro
367
386
  export declare interface ComboboxButtonProps {
368
387
  /** Placeholder text shown when no value is selected */
369
388
  placeholder?: string;
389
+ /** Size of the button */
390
+ size?: ButtonSize;
370
391
  className?: string;
371
392
  }
372
393
 
@@ -597,7 +618,7 @@ export declare interface DataTableProps<TData> {
597
618
  * />
598
619
  * ```
599
620
  */
600
- export declare function DataTableSearch({ value, onChange, placeholder, className, }: DataTableSearchProps): JSX.Element;
621
+ export declare const DataTableSearch: ForwardRefExoticComponent<DataTableSearchProps & RefAttributes<HTMLDivElement>>;
601
622
 
602
623
  export declare interface DataTableSearchProps {
603
624
  /** Current search value */
@@ -630,7 +651,7 @@ export declare interface DataTableSearchProps {
630
651
  * </DataTableToolbar>
631
652
  * ```
632
653
  */
633
- export declare function DataTableToolbar({ children, className, }: DataTableToolbarProps): JSX.Element;
654
+ export declare const DataTableToolbar: ForwardRefExoticComponent<DataTableToolbarProps & RefAttributes<HTMLDivElement>>;
634
655
 
635
656
  export declare interface DataTableToolbarProps {
636
657
  /** Toolbar contents -- typically DataTableSearch, Select, Combobox, Button, etc. */
@@ -686,7 +707,7 @@ declare function DialogRoot({ ...props }: DialogRootProps): JSX.Element;
686
707
  export declare interface DialogRootProps extends ComponentProps<typeof Dialog_2.Root> {
687
708
  }
688
709
 
689
- export declare type DialogSize = keyof typeof sizeStyles_4;
710
+ export declare type DialogSize = keyof typeof sizeStyles_6;
690
711
 
691
712
  export declare interface DialogTitleProps extends ComponentProps<typeof Dialog_2.Title> {
692
713
  }
@@ -738,7 +759,7 @@ export declare interface DrawerBodyProps {
738
759
  }
739
760
 
740
761
  export declare interface DrawerCloseProps extends ComponentProps<typeof Drawer_2.Close> {
741
- /** Show default X icon. Default: true when no children. */
762
+ /** Show default XMarkIcon icon. Default: true when no children. */
742
763
  asIcon?: boolean;
743
764
  }
744
765
 
@@ -1002,7 +1023,7 @@ declare type LogoVariant = "mark" | "circle";
1002
1023
  * Renders a `<button>` by default - when `href` is provided,
1003
1024
  * renders an `<a>` tag instead.
1004
1025
  */
1005
- export declare function NavLink({ active, icon, href, onClick, className, children, }: NavLinkProps): JSX.Element;
1026
+ export declare function NavLink({ active, icon, href, onClick, size, className, children, }: NavLinkProps): JSX.Element;
1006
1027
 
1007
1028
  export declare interface NavLinkProps {
1008
1029
  /** Whether this link is the currently active/selected item */
@@ -1013,6 +1034,8 @@ export declare interface NavLinkProps {
1013
1034
  href?: string;
1014
1035
  /** Click handler */
1015
1036
  onClick?: () => void;
1037
+ /** Size of the nav link */
1038
+ size?: NavLinkSize;
1016
1039
  className?: string;
1017
1040
  children: ReactNode;
1018
1041
  }
@@ -1025,26 +1048,49 @@ export declare interface NavLinkProps {
1025
1048
  */
1026
1049
  export declare function NavLinks({ className, children }: NavLinksProps): JSX.Element;
1027
1050
 
1051
+ export declare type NavLinkSize = keyof typeof sizeStyles_4;
1052
+
1028
1053
  export declare interface NavLinksProps {
1029
1054
  className?: string;
1030
1055
  children: ReactNode;
1031
1056
  }
1032
1057
 
1033
1058
  /**
1034
- * Full-page layout shell.
1059
+ * Full-page layout shell with a sidebar and content area.
1035
1060
  *
1036
- * Provides the standard page structure:
1037
- * base background → header → content panel with nav.
1061
+ * Structure: sidebar (fixed width) + content panel (flex-1).
1038
1062
  */
1039
- export declare const PageLayout: ForwardRefExoticComponent<PageLayoutProps & RefAttributes<HTMLDivElement>>;
1063
+ export declare const PageLayout: ForwardRefExoticComponent<PageLayoutProps & RefAttributes<HTMLDivElement>> & {
1064
+ Sidebar: (({ defaultCollapsed, className, children, }: SidebarRootProps) => JSX.Element) & {
1065
+ Header: ForwardRefExoticComponent<Omit<SidebarHeaderProps, "ref"> & RefAttributes<HTMLDivElement>>;
1066
+ CollapseButton: ({ className }: SidebarCollapseButtonProps) => JSX.Element | null;
1067
+ BackButton: ({ onClick, className, children, }: SidebarBackButtonProps) => JSX.Element;
1068
+ Label: ForwardRefExoticComponent<Omit<SidebarLabelProps, "ref"> & RefAttributes<HTMLSpanElement>>;
1069
+ Search: ({ label, icon, onClick, className, }: SidebarSearchProps) => JSX.Element;
1070
+ Nav: ({ className, children }: SidebarNavProps) => JSX.Element;
1071
+ NavItem: ({ active, nested, icon, href, onClick, className, children, }: SidebarNavItemProps) => JSX.Element;
1072
+ Footer: ForwardRefExoticComponent<Omit<SidebarFooterProps, "ref"> & RefAttributes<HTMLDivElement>>;
1073
+ };
1074
+ SidebarHeader: ForwardRefExoticComponent<Omit<SidebarHeaderProps, "ref"> & RefAttributes<HTMLDivElement>>;
1075
+ SidebarSearch: ({ label, icon, onClick, className, }: SidebarSearchProps) => JSX.Element;
1076
+ SidebarNav: ({ className, children }: SidebarNavProps) => JSX.Element;
1077
+ SidebarNavItem: ({ active, nested, icon, href, onClick, className, children, }: SidebarNavItemProps) => JSX.Element;
1078
+ SidebarFooter: ForwardRefExoticComponent<Omit<SidebarFooterProps, "ref"> & RefAttributes<HTMLDivElement>>;
1079
+ Header: ForwardRefExoticComponent<Omit<PageLayoutHeaderProps, "ref"> & RefAttributes<HTMLDivElement>>;
1080
+ Body: ForwardRefExoticComponent<Omit<PageLayoutBodyProps, "ref"> & RefAttributes<HTMLDivElement>>;
1081
+ };
1082
+
1083
+ export declare interface PageLayoutBodyProps extends ComponentProps<"div"> {
1084
+ }
1085
+
1086
+ export declare interface PageLayoutHeaderProps extends ComponentProps<"div"> {
1087
+ }
1040
1088
 
1041
1089
  export declare interface PageLayoutProps {
1042
- /** Header content (typically AppHeader) */
1043
- header?: ReactNode;
1044
- /** Navigation content (typically NavLinks) */
1045
- nav?: ReactNode;
1046
- className?: string;
1047
- children: ReactNode;
1090
+ /** Sidebar content (typically PageLayout.Sidebar) */
1091
+ readonly sidebar?: ReactNode;
1092
+ readonly className?: string;
1093
+ readonly children: ReactNode;
1048
1094
  }
1049
1095
 
1050
1096
  /**
@@ -1054,7 +1100,7 @@ export declare interface PageLayoutProps {
1054
1100
  * Renders as a cohesive strip - pass `rowsPerPage` + `onRowsPerPageChange`
1055
1101
  * to show the rows-per-page selector, and `totalItems` to show the result count.
1056
1102
  */
1057
- export declare function Pagination({ page, pageCount, onPageChange, totalItems, rowsPerPage, onRowsPerPageChange, rowOptions, siblingCount, className, }: PaginationProps): JSX.Element | null;
1103
+ export declare const Pagination: ForwardRefExoticComponent<PaginationProps & RefAttributes<HTMLElement>>;
1058
1104
 
1059
1105
  export declare interface PaginationProps {
1060
1106
  /** Current page (1-indexed) */
@@ -1063,7 +1109,7 @@ export declare interface PaginationProps {
1063
1109
  pageCount: number;
1064
1110
  /** Called when the page changes */
1065
1111
  onPageChange?: (page: number) => void;
1066
- /** Total item count - shows "1–10 of X" when provided */
1112
+ /** Total item count - shows "1–10 of XMarkIcon" when provided */
1067
1113
  totalItems?: number;
1068
1114
  /** Rows per page - shows selector when provided with onRowsPerPageChange */
1069
1115
  rowsPerPage?: number;
@@ -1073,9 +1119,13 @@ export declare interface PaginationProps {
1073
1119
  rowOptions?: number[];
1074
1120
  /** Number of sibling pages to show around active page. Default 1 */
1075
1121
  siblingCount?: number;
1122
+ /** Size of the pagination controls */
1123
+ size?: PaginationSize;
1076
1124
  className?: string;
1077
1125
  }
1078
1126
 
1127
+ export declare type PaginationSize = keyof typeof sizeStyles_7;
1128
+
1079
1129
  /**
1080
1130
  * A 3x3 pixel-grid spinner with configurable animation variants.
1081
1131
  *
@@ -1166,6 +1216,23 @@ export declare interface PopoverTitleProps {
1166
1216
  export declare interface PopoverTriggerProps extends ComponentProps<typeof Popover_2.Trigger> {
1167
1217
  }
1168
1218
 
1219
+ export declare const RadioGroup: {
1220
+ Root: ForwardRefExoticComponent<Omit<RadioGroupRootProps, "ref"> & RefAttributes<HTMLDivElement>>;
1221
+ Item: ForwardRefExoticComponent<Omit<RadioGroupItemProps, "ref"> & RefAttributes<HTMLSpanElement>>;
1222
+ };
1223
+
1224
+ export declare interface RadioGroupItemProps extends ComponentProps<typeof Radio.Root> {
1225
+ /** Size of the radio indicator */
1226
+ size?: RadioGroupItemSize;
1227
+ /** Label text rendered beside the radio */
1228
+ label?: string;
1229
+ }
1230
+
1231
+ export declare type RadioGroupItemSize = keyof typeof sizeStyles_10;
1232
+
1233
+ export declare interface RadioGroupRootProps extends ComponentProps<typeof RadioGroup_2> {
1234
+ }
1235
+
1169
1236
  export { Row }
1170
1237
 
1171
1238
  export { RowSelectionState }
@@ -1205,7 +1272,7 @@ export declare interface SaveBarProps {
1205
1272
  * - `fill` (default) - equal-width segments via CSS grid, indicator positioned with translateX
1206
1273
  * - `fit` - segments size to content, indicator position/width measured from DOM
1207
1274
  */
1208
- export declare function SegmentedControl<T extends string = string>({ options, value: controlledValue, defaultValue, onValueChange, layout, className, }: SegmentedControlProps<T>): JSX.Element;
1275
+ export declare const SegmentedControl: <T extends string = string>(props: SegmentedControlProps<T> & default_2.RefAttributes<HTMLDivElement>) => default_2.ReactElement | null;
1209
1276
 
1210
1277
  export declare interface SegmentedControlOption<T extends string = string> {
1211
1278
  value: T;
@@ -1228,9 +1295,13 @@ export declare interface SegmentedControlProps<T extends string = string> {
1228
1295
  * - `fit` - segments hug their content
1229
1296
  */
1230
1297
  layout?: "fill" | "fit";
1298
+ /** Size of the segmented control items */
1299
+ size?: SegmentedControlSize;
1231
1300
  className?: string;
1232
1301
  }
1233
1302
 
1303
+ export declare type SegmentedControlSize = keyof typeof sizeStyles_8;
1304
+
1234
1305
  /**
1235
1306
  * Select component for choosing from a list of predefined options.
1236
1307
  *
@@ -1249,6 +1320,8 @@ export declare const SelectButton: ForwardRefExoticComponent<SelectButtonProps &
1249
1320
  export declare interface SelectButtonProps {
1250
1321
  /** Placeholder text shown when no value is selected */
1251
1322
  placeholder?: string;
1323
+ /** Size of the button */
1324
+ size?: ButtonSize;
1252
1325
  className?: string;
1253
1326
  }
1254
1327
 
@@ -1427,6 +1500,98 @@ export declare interface SettingsRowProps {
1427
1500
  className?: string;
1428
1501
  }
1429
1502
 
1503
+ export declare const Sidebar: typeof SidebarRoot & {
1504
+ Header: ForwardRefExoticComponent<Omit<SidebarHeaderProps, "ref"> & RefAttributes<HTMLDivElement>>;
1505
+ CollapseButton: typeof SidebarCollapseButton;
1506
+ BackButton: typeof SidebarBackButton;
1507
+ Label: ForwardRefExoticComponent<Omit<SidebarLabelProps, "ref"> & RefAttributes<HTMLSpanElement>>;
1508
+ Search: typeof SidebarSearch;
1509
+ Nav: typeof SidebarNav;
1510
+ NavItem: typeof SidebarNavItem;
1511
+ Footer: ForwardRefExoticComponent<Omit<SidebarFooterProps, "ref"> & RefAttributes<HTMLDivElement>>;
1512
+ };
1513
+
1514
+ /**
1515
+ * Back navigation row for nested sidebar contexts.
1516
+ * Replaces the org switcher header when drilling into a sub-section.
1517
+ * Shows ArrowLeftIcon + section title when expanded, just the arrow when collapsed.
1518
+ */
1519
+ declare function SidebarBackButton({ onClick, className, children, }: SidebarBackButtonProps): JSX.Element;
1520
+
1521
+ export declare interface SidebarBackButtonProps {
1522
+ /** Click handler — typically navigates back to the parent route */
1523
+ readonly onClick?: () => void;
1524
+ readonly className?: string;
1525
+ /** Section title displayed next to the back arrow */
1526
+ readonly children: ReactNode;
1527
+ }
1528
+
1529
+ /**
1530
+ * Toggle button for collapsing/expanding the sidebar.
1531
+ * Chevron direction flips based on collapsed state.
1532
+ */
1533
+ declare function SidebarCollapseButton({ className }: SidebarCollapseButtonProps): JSX.Element | null;
1534
+
1535
+ export declare interface SidebarCollapseButtonProps {
1536
+ readonly className?: string;
1537
+ }
1538
+
1539
+ export declare interface SidebarContextValue {
1540
+ readonly collapsed: boolean;
1541
+ readonly toggle: () => void;
1542
+ }
1543
+
1544
+ export declare interface SidebarFooterProps extends ComponentProps<"div"> {
1545
+ }
1546
+
1547
+ export declare interface SidebarHeaderProps extends ComponentProps<"div"> {
1548
+ }
1549
+
1550
+ export declare interface SidebarLabelProps extends ComponentProps<"span"> {
1551
+ }
1552
+
1553
+ declare function SidebarNav({ className, children }: SidebarNavProps): JSX.Element;
1554
+
1555
+ declare function SidebarNavItem({ active, nested, icon, href, onClick, className, children, }: SidebarNavItemProps): JSX.Element;
1556
+
1557
+ export declare interface SidebarNavItemProps {
1558
+ readonly active?: boolean;
1559
+ /** Show a trailing chevron indicating this item navigates to a nested section */
1560
+ readonly nested?: boolean;
1561
+ readonly icon?: ReactNode;
1562
+ readonly href?: string;
1563
+ readonly onClick?: () => void;
1564
+ readonly className?: string;
1565
+ readonly children: ReactNode;
1566
+ }
1567
+
1568
+ export declare interface SidebarNavProps {
1569
+ readonly className?: string;
1570
+ readonly children: ReactNode;
1571
+ }
1572
+
1573
+ /**
1574
+ * Sidebar panel with collapsible state.
1575
+ * Provides collapsed/toggle context to all sub-components.
1576
+ */
1577
+ declare function SidebarRoot({ defaultCollapsed, className, children, }: SidebarRootProps): JSX.Element;
1578
+
1579
+ export declare interface SidebarRootProps {
1580
+ /** Start in collapsed state */
1581
+ readonly defaultCollapsed?: boolean;
1582
+ readonly className?: string;
1583
+ readonly children: ReactNode;
1584
+ }
1585
+
1586
+ declare function SidebarSearch({ label, icon, onClick, className, }: SidebarSearchProps): JSX.Element;
1587
+
1588
+ export declare interface SidebarSearchProps {
1589
+ readonly label?: string;
1590
+ readonly icon?: ReactNode;
1591
+ readonly onClick?: () => void;
1592
+ readonly className?: string;
1593
+ }
1594
+
1430
1595
  declare const sizeStyles: {
1431
1596
  readonly xs: {
1432
1597
  readonly height: "h-6";
@@ -1448,6 +1613,19 @@ declare const sizeStyles: {
1448
1613
  };
1449
1614
  };
1450
1615
 
1616
+ declare const sizeStyles_10: {
1617
+ readonly sm: {
1618
+ readonly radio: "size-4";
1619
+ readonly indicator: "size-1.5";
1620
+ readonly label: "text-cui-sm";
1621
+ };
1622
+ readonly md: {
1623
+ readonly radio: "size-[18px]";
1624
+ readonly indicator: "size-2";
1625
+ readonly label: "text-cui-base";
1626
+ };
1627
+ };
1628
+
1451
1629
  declare const sizeStyles_2: {
1452
1630
  readonly sm: {
1453
1631
  readonly track: "w-9 h-5";
@@ -1463,20 +1641,69 @@ declare const sizeStyles_3: {
1463
1641
  readonly sm: {
1464
1642
  readonly root: "size-4 rounded-[4px]";
1465
1643
  readonly icon: "size-3";
1466
- readonly label: "text-xs";
1644
+ readonly label: "text-cui-sm";
1467
1645
  };
1468
1646
  readonly md: {
1469
1647
  readonly root: "size-[18px] rounded-[5px]";
1470
1648
  readonly icon: "size-3.5";
1471
- readonly label: "text-sm";
1649
+ readonly label: "text-cui-base";
1472
1650
  };
1473
1651
  };
1474
1652
 
1475
1653
  declare const sizeStyles_4: {
1654
+ readonly sm: "h-7 px-1.5";
1655
+ readonly md: "h-8 px-1.5";
1656
+ };
1657
+
1658
+ declare const sizeStyles_5: {
1659
+ readonly sm: "px-1.5 py-0.5 text-cui-sm";
1660
+ readonly md: "px-2 py-0.5 text-cui-base";
1661
+ };
1662
+
1663
+ declare const sizeStyles_6: {
1476
1664
  readonly md: "max-w-[450px]";
1477
1665
  readonly lg: "max-w-[550px]";
1478
1666
  };
1479
1667
 
1668
+ declare const sizeStyles_7: {
1669
+ readonly sm: {
1670
+ readonly button: "size-7";
1671
+ readonly icon: "size-4";
1672
+ readonly strip: "h-9";
1673
+ };
1674
+ readonly md: {
1675
+ readonly button: "size-8";
1676
+ readonly icon: "size-4";
1677
+ readonly strip: "h-10";
1678
+ };
1679
+ };
1680
+
1681
+ declare const sizeStyles_8: {
1682
+ readonly sm: "h-7 px-2.5";
1683
+ readonly md: "h-8 px-3";
1684
+ };
1685
+
1686
+ declare const sizeStyles_9: {
1687
+ readonly xs: {
1688
+ readonly height: "h-6";
1689
+ readonly padding: "px-1.5";
1690
+ readonly textPadding: "px-1";
1691
+ readonly icon: "w-6";
1692
+ };
1693
+ readonly sm: {
1694
+ readonly height: "h-7";
1695
+ readonly padding: "px-1.5";
1696
+ readonly textPadding: "px-1";
1697
+ readonly icon: "w-7";
1698
+ };
1699
+ readonly md: {
1700
+ readonly height: "h-8";
1701
+ readonly padding: "px-2";
1702
+ readonly textPadding: "px-1";
1703
+ readonly icon: "w-8";
1704
+ };
1705
+ };
1706
+
1480
1707
  /**
1481
1708
  * Skeleton loading placeholder with a sweeping pixel wave.
1482
1709
  *
@@ -1588,6 +1815,11 @@ export declare const Tabs: {
1588
1815
  Panel: ForwardRefExoticComponent<Omit<TabsPanelProps, "ref"> & RefAttributes<HTMLDivElement>>;
1589
1816
  };
1590
1817
 
1818
+ declare const tabSizeStyles: {
1819
+ readonly sm: "h-7 px-2.5";
1820
+ readonly md: "h-8 px-3";
1821
+ };
1822
+
1591
1823
  export declare interface TabsListProps extends ComponentProps<typeof Tabs_2.List> {
1592
1824
  /**
1593
1825
  * Layout mode:
@@ -1604,8 +1836,12 @@ export declare interface TabsRootProps extends ComponentProps<typeof Tabs_2.Root
1604
1836
  }
1605
1837
 
1606
1838
  export declare interface TabsTabProps extends ComponentProps<typeof Tabs_2.Tab> {
1839
+ /** Size of the tab */
1840
+ size?: TabsTabSize;
1607
1841
  }
1608
1842
 
1843
+ export declare type TabsTabSize = keyof typeof tabSizeStyles;
1844
+
1609
1845
  export declare type ThemeMode = "light" | "dark" | "system";
1610
1846
 
1611
1847
  /**
@@ -1613,19 +1849,57 @@ export declare type ThemeMode = "light" | "dark" | "system";
1613
1849
  */
1614
1850
  export declare const Toggle: ForwardRefExoticComponent<ToggleProps & RefAttributes<HTMLButtonElement>>;
1615
1851
 
1616
- export declare interface ToggleProps {
1617
- /** Whether the toggle is on. Use for controlled mode. */
1618
- checked?: boolean;
1619
- /** Whether the toggle is initially on. Use for uncontrolled mode. */
1620
- defaultChecked?: boolean;
1621
- /** Called when the checked state changes. */
1622
- onCheckedChange?: (checked: boolean) => void;
1623
- /** Whether the toggle is disabled. */
1624
- disabled?: boolean;
1852
+ /**
1853
+ * A two-state button that can be pressed or unpressed.
1854
+ *
1855
+ * Built on Base UI Toggle. Visually matches the Button component but
1856
+ * toggles between pressed/unpressed states. Uses `data-[pressed]` for
1857
+ * the active visual.
1858
+ *
1859
+ * Use standalone for single toggles (like a bold button in a toolbar).
1860
+ * Use inside a `ToggleButtonGroup` for mutually exclusive or multi-select
1861
+ * button groups.
1862
+ */
1863
+ export declare const ToggleButton: ForwardRefExoticComponent<Omit<ToggleButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
1864
+
1865
+ /**
1866
+ * Groups toggle buttons with shared selection state.
1867
+ *
1868
+ * Built on Base UI ToggleGroup. When `multiple` is false (default),
1869
+ * pressing one button unpresses the others. When true, any combination
1870
+ * of buttons can be pressed.
1871
+ *
1872
+ * Children should be `ToggleButton` components with `value` props.
1873
+ */
1874
+ export declare const ToggleButtonGroup: ForwardRefExoticComponent<ToggleButtonGroupProps<string> & RefAttributes<HTMLDivElement>>;
1875
+
1876
+ export declare interface ToggleButtonGroupProps<Value extends string = string> extends Omit<ComponentPropsWithoutRef<typeof ToggleGroup>, "value" | "defaultValue" | "onValueChange"> {
1877
+ /** Controlled pressed values */
1878
+ value?: readonly Value[];
1879
+ /** Uncontrolled default pressed values */
1880
+ defaultValue?: readonly Value[];
1881
+ /** Called when the pressed states change */
1882
+ onValueChange?: (value: Value[]) => void;
1883
+ /** When false, only one toggle can be pressed at a time */
1884
+ multiple?: boolean;
1885
+ /** Orientation of the group */
1886
+ orientation?: "horizontal" | "vertical";
1887
+ }
1888
+
1889
+ export declare interface ToggleButtonProps extends ComponentProps<typeof Toggle_2> {
1890
+ /** Size of the toggle button */
1891
+ size?: ToggleButtonSize;
1892
+ /** Icon element rendered before the label */
1893
+ iconLeft?: ReactNode;
1894
+ /** Icon element rendered after the label */
1895
+ iconRight?: ReactNode;
1896
+ }
1897
+
1898
+ export declare type ToggleButtonSize = keyof typeof sizeStyles_9;
1899
+
1900
+ export declare interface ToggleProps extends ComponentPropsWithoutRef<typeof Switch.Root> {
1625
1901
  /** Size of the toggle. */
1626
1902
  size?: ToggleSize;
1627
- /** Additional class name for the root element. */
1628
- className?: string;
1629
1903
  }
1630
1904
 
1631
1905
  declare type ToggleSize = keyof typeof sizeStyles_2;
@@ -1687,10 +1961,10 @@ export declare function useDirtyState<T extends object>(initial: T): DirtyState<
1687
1961
  * User menu dropdown - shows user info, theme toggle, navigation items,
1688
1962
  * and a log out action.
1689
1963
  *
1690
- * Designed to be placed inside `<AppHeader.Actions>`. Theme state is passed
1691
- * as props so the component stays decoupled from any specific theme hook.
1964
+ * Theme state is passed as props so the component stays decoupled from
1965
+ * any specific theme hook.
1692
1966
  */
1693
- export declare function UserMenu({ user, theme, onThemeChange, items, onLogout, className, }: UserMenuProps): JSX.Element;
1967
+ export declare function UserMenu({ user, theme, onThemeChange, items, onLogout, children, side, align, className, }: UserMenuProps): JSX.Element;
1694
1968
 
1695
1969
  export declare interface UserMenuItem {
1696
1970
  label: string;
@@ -1709,6 +1983,12 @@ export declare interface UserMenuProps {
1709
1983
  items?: UserMenuItem[];
1710
1984
  /** Called when "Log out" is clicked */
1711
1985
  onLogout?: () => void;
1986
+ /** Custom trigger content. Defaults to a bare Avatar. */
1987
+ children?: ReactNode;
1988
+ /** Which side the dropdown opens on */
1989
+ side?: "top" | "bottom" | "left" | "right";
1990
+ /** Alignment of the dropdown relative to the trigger */
1991
+ align?: "start" | "center" | "end";
1712
1992
  className?: string;
1713
1993
  }
1714
1994
 
@@ -1723,6 +2003,8 @@ export declare interface UserMenuUser {
1723
2003
  initials?: string;
1724
2004
  }
1725
2005
 
2006
+ export declare function useSidebar(): SidebarContextValue;
2007
+
1726
2008
  declare const variantConfig: {
1727
2009
  readonly primary: {
1728
2010
  readonly active: true;
@@ -1763,7 +2045,7 @@ declare const variantConfig: {
1763
2045
  };
1764
2046
 
1765
2047
  declare const variantConfig_2: {
1766
- readonly info: {
2048
+ readonly accent: {
1767
2049
  readonly container: "bg-cui-accent-subtle";
1768
2050
  readonly icon: "text-cui-accent";
1769
2051
  readonly text: "text-cui-accent [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80";
@@ -1783,7 +2065,7 @@ declare const variantConfig_2: {
1783
2065
  titleId?: string;
1784
2066
  } & RefAttributes<SVGSVGElement>>;
1785
2067
  };
1786
- readonly warning: {
2068
+ readonly warn: {
1787
2069
  readonly container: "bg-cui-warn-subtle";
1788
2070
  readonly icon: "text-cui-warn";
1789
2071
  readonly text: "text-cui-warn [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80";
@@ -1814,7 +2096,7 @@ declare const variantStyles_2: {
1814
2096
  readonly neutral: "bg-cui-subtle text-cui-secondary";
1815
2097
  readonly accent: "bg-cui-accent-subtle text-cui-accent";
1816
2098
  readonly danger: "bg-cui-danger-subtle text-cui-danger";
1817
- readonly warning: "bg-cui-warn-subtle text-cui-warn";
2099
+ readonly warn: "bg-cui-warn-subtle text-cui-warn";
1818
2100
  readonly success: "bg-cui-success-subtle text-cui-success";
1819
2101
  };
1820
2102