@coderabbitai/carrot-ui 0.1.20 → 0.1.22
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/README.md +21 -1
- package/dist/index.d.ts +495 -96
- package/dist/index.js +1910 -1301
- package/package.json +4 -1
- package/src/scales.css +99 -28
- package/src/styles.css +2 -0
- package/src/theme.css +64 -23
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
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
|
+
import { AlertDialogDescriptionProps as AlertDialogDescriptionProps_2 } from '@base-ui/react';
|
|
3
4
|
import { Button as Button_2 } from '@base-ui/react/button';
|
|
5
|
+
import { Checkbox as Checkbox_2 } from '@base-ui/react/checkbox';
|
|
4
6
|
import { ClassValue } from 'clsx';
|
|
5
7
|
import { Column } from '@tanstack/react-table';
|
|
6
8
|
import { ColumnDef } from '@tanstack/react-table';
|
|
7
9
|
import { ColumnFiltersState } from '@tanstack/react-table';
|
|
8
10
|
import { Command as Command_2 } from 'cmdk';
|
|
9
11
|
import { ComponentProps } from 'react';
|
|
12
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
10
13
|
import { ComponentType } from 'react';
|
|
14
|
+
import { default as default_2 } from 'react';
|
|
11
15
|
import { Dialog as Dialog_2 } from '@base-ui/react/dialog';
|
|
12
16
|
import { Drawer as Drawer_2 } from '@base-ui/react/drawer';
|
|
13
17
|
import { Field } from '@base-ui/react/field';
|
|
@@ -16,6 +20,8 @@ import { ForwardRefExoticComponent } from 'react';
|
|
|
16
20
|
import { JSX } from 'react/jsx-runtime';
|
|
17
21
|
import { Menu } from '@base-ui/react/menu';
|
|
18
22
|
import { Popover as Popover_2 } from '@base-ui/react/popover';
|
|
23
|
+
import { Radio } from '@base-ui/react/radio';
|
|
24
|
+
import { RadioGroup as RadioGroup_2 } from '@base-ui/react/radio-group';
|
|
19
25
|
import { ReactElement } from 'react';
|
|
20
26
|
import { ReactNode } from 'react';
|
|
21
27
|
import { RefAttributes } from 'react';
|
|
@@ -24,8 +30,11 @@ import { RowSelectionState } from '@tanstack/react-table';
|
|
|
24
30
|
import { Separator as Separator_2 } from '@base-ui/react/separator';
|
|
25
31
|
import { SortingState } from '@tanstack/react-table';
|
|
26
32
|
import { SVGProps } from 'react';
|
|
33
|
+
import { Switch } from '@base-ui/react/switch';
|
|
27
34
|
import { TableOptions } from '@tanstack/react-table';
|
|
28
35
|
import { Tabs as Tabs_2 } from '@base-ui/react/tabs';
|
|
36
|
+
import { Toggle as Toggle_2 } from '@base-ui/react/toggle';
|
|
37
|
+
import { ToggleGroup } from '@base-ui/react/toggle-group';
|
|
29
38
|
import { Tooltip as Tooltip_2 } from '@base-ui/react/tooltip';
|
|
30
39
|
|
|
31
40
|
export declare const Accordion: {
|
|
@@ -50,14 +59,13 @@ export declare interface AccordionTriggerProps extends ComponentProps<typeof Acc
|
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
/**
|
|
53
|
-
*
|
|
62
|
+
* Alert component for important messages.
|
|
54
63
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* in the intent color.
|
|
64
|
+
* Two layouts:
|
|
65
|
+
* - `inline` — horizontal bar with icon, text, and optional action. Features
|
|
66
|
+
* a flickering pixel grid on the right side.
|
|
67
|
+
* - `banner` — full-width centered layout for page-level announcements.
|
|
68
|
+
* Content is centered with the icon above the text.
|
|
61
69
|
*/
|
|
62
70
|
export declare const Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>>;
|
|
63
71
|
|
|
@@ -107,14 +115,22 @@ export declare interface AlertDialogTitleProps extends ComponentProps<typeof Ale
|
|
|
107
115
|
export declare interface AlertDialogTriggerProps extends ComponentProps<typeof AlertDialog_2.Trigger> {
|
|
108
116
|
}
|
|
109
117
|
|
|
118
|
+
export declare type AlertLayout = "inline" | "banner";
|
|
119
|
+
|
|
110
120
|
export declare interface AlertProps {
|
|
111
121
|
/** Visual style variant */
|
|
112
122
|
variant?: AlertVariant;
|
|
123
|
+
/**
|
|
124
|
+
* Layout mode:
|
|
125
|
+
* - `inline` (default) — horizontal bar with icon left, text center, action right
|
|
126
|
+
* - `banner` — full-width centered layout for page-level announcements
|
|
127
|
+
*/
|
|
128
|
+
layout?: AlertLayout;
|
|
113
129
|
/** Override the default icon */
|
|
114
130
|
icon?: ReactNode;
|
|
115
|
-
/** Action element rendered
|
|
131
|
+
/** Action element rendered beside the text (e.g. a Button) */
|
|
116
132
|
action?: ReactNode;
|
|
117
|
-
/** Called when the dismiss button is clicked. When provided, a close button appears
|
|
133
|
+
/** Called when the dismiss button is clicked. When provided, a close button appears. */
|
|
118
134
|
onDismiss?: () => void;
|
|
119
135
|
className?: string;
|
|
120
136
|
children: ReactNode;
|
|
@@ -135,29 +151,18 @@ export declare interface AppHeaderActionsProps {
|
|
|
135
151
|
className?: string;
|
|
136
152
|
}
|
|
137
153
|
|
|
154
|
+
/**
|
|
155
|
+
* AppHeader breadcrumb — renders a Logo link followed by breadcrumb segments.
|
|
156
|
+
*
|
|
157
|
+
* Delegates to the standalone Breadcrumb component for the segment rendering.
|
|
158
|
+
* The Logo + first separator is AppHeader-specific.
|
|
159
|
+
*/
|
|
138
160
|
declare function AppHeaderBreadcrumb({ items, linkComponent: LinkEl, className, }: AppHeaderBreadcrumbProps): JSX.Element;
|
|
139
161
|
|
|
140
|
-
declare interface AppHeaderBreadcrumbItem {
|
|
141
|
-
label: string;
|
|
142
|
-
icon?: ReactNode;
|
|
143
|
-
href?: string;
|
|
144
|
-
selector?: boolean;
|
|
145
|
-
options?: AppHeaderBreadcrumbOption[];
|
|
146
|
-
onSelect?: (value: string) => void;
|
|
147
|
-
value?: string;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
declare interface AppHeaderBreadcrumbOption {
|
|
151
|
-
value: string;
|
|
152
|
-
label: string;
|
|
153
|
-
icon?: ReactNode;
|
|
154
|
-
[key: string]: unknown;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
162
|
export declare interface AppHeaderBreadcrumbProps {
|
|
158
|
-
items:
|
|
163
|
+
items: BreadcrumbItem[];
|
|
159
164
|
/** Custom link component (e.g. TanStack Router's Link, Next.js Link, etc.). Defaults to <a>. */
|
|
160
|
-
linkComponent?:
|
|
165
|
+
linkComponent?: LinkComponent_2;
|
|
161
166
|
className?: string;
|
|
162
167
|
}
|
|
163
168
|
|
|
@@ -174,9 +179,9 @@ export declare interface AppHeaderProps {
|
|
|
174
179
|
* - `circle` variant for users (fully rounded)
|
|
175
180
|
* - `square` variant for organizations/workspaces (rounded corners)
|
|
176
181
|
*/
|
|
177
|
-
export declare
|
|
182
|
+
export declare const Avatar: ForwardRefExoticComponent<AvatarProps & RefAttributes<HTMLElement>>;
|
|
178
183
|
|
|
179
|
-
declare type AvatarColor = "neutral" | "accent" | "danger" | "
|
|
184
|
+
declare type AvatarColor = "neutral" | "accent" | "danger" | "warn" | "success";
|
|
180
185
|
|
|
181
186
|
declare type AvatarGenerativePattern = "grid" | "symmetric" | "dense" | "quad" | "quad-dense" | "diagonal" | "sierpinski";
|
|
182
187
|
|
|
@@ -213,14 +218,71 @@ export declare type AvatarVariant = "circle" | "square";
|
|
|
213
218
|
|
|
214
219
|
export declare const Badge: ForwardRefExoticComponent<BadgeProps & RefAttributes<HTMLSpanElement>>;
|
|
215
220
|
|
|
216
|
-
export declare interface BadgeProps {
|
|
221
|
+
export declare interface BadgeProps extends ComponentPropsWithoutRef<"span"> {
|
|
222
|
+
/** Visual style variant */
|
|
217
223
|
variant?: BadgeVariant;
|
|
218
|
-
|
|
219
|
-
|
|
224
|
+
/** Size of the badge */
|
|
225
|
+
size?: BadgeSize;
|
|
220
226
|
}
|
|
221
227
|
|
|
228
|
+
export declare type BadgeSize = keyof typeof sizeStyles_5;
|
|
229
|
+
|
|
222
230
|
export declare type BadgeVariant = keyof typeof variantStyles_2;
|
|
223
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Breadcrumb navigation with support for links, selectors, and icons.
|
|
234
|
+
*
|
|
235
|
+
* Each segment can be:
|
|
236
|
+
* - **Static text** — plain label (last segment, current page)
|
|
237
|
+
* - **Link** — clickable label that navigates to a parent page
|
|
238
|
+
* - **Selector** — label + chevron dropdown to switch between siblings
|
|
239
|
+
* (e.g. switch repos). The label can also be a link independently.
|
|
240
|
+
*
|
|
241
|
+
* Usage:
|
|
242
|
+
* ```tsx
|
|
243
|
+
* <Breadcrumb
|
|
244
|
+
* items={[
|
|
245
|
+
* { label: "Repositories", href: "/repositories" },
|
|
246
|
+
* { label: "landing", href: "/repos/landing", selector: true, options: repos, value: "landing" },
|
|
247
|
+
* { label: "Settings" },
|
|
248
|
+
* ]}
|
|
249
|
+
* />
|
|
250
|
+
* ```
|
|
251
|
+
*/
|
|
252
|
+
export declare function Breadcrumb({ items, linkComponent: LinkEl, className, }: BreadcrumbProps): JSX.Element;
|
|
253
|
+
|
|
254
|
+
export declare interface BreadcrumbItem {
|
|
255
|
+
/** Display label for this segment */
|
|
256
|
+
readonly label: string;
|
|
257
|
+
/** Optional icon rendered before the label */
|
|
258
|
+
readonly icon?: ReactNode;
|
|
259
|
+
/** Link URL — makes the label a clickable link */
|
|
260
|
+
readonly href?: string;
|
|
261
|
+
/** Enable a dropdown selector (ChevronUpDown trigger) */
|
|
262
|
+
readonly selector?: boolean;
|
|
263
|
+
/** Options for the selector dropdown */
|
|
264
|
+
readonly options?: BreadcrumbOption[];
|
|
265
|
+
/** Callback when a selector option is chosen */
|
|
266
|
+
readonly onSelect?: (value: string) => void;
|
|
267
|
+
/** Currently selected value for the selector */
|
|
268
|
+
readonly value?: string;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export declare interface BreadcrumbOption {
|
|
272
|
+
readonly value: string;
|
|
273
|
+
readonly label: string;
|
|
274
|
+
readonly icon?: ReactNode;
|
|
275
|
+
readonly [key: string]: unknown;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export declare interface BreadcrumbProps {
|
|
279
|
+
/** Breadcrumb segments */
|
|
280
|
+
readonly items: BreadcrumbItem[];
|
|
281
|
+
/** Custom link component (e.g. TanStack Router's Link, Next.js Link). Defaults to <a>. */
|
|
282
|
+
readonly linkComponent?: LinkComponent;
|
|
283
|
+
readonly className?: string;
|
|
284
|
+
}
|
|
285
|
+
|
|
224
286
|
/**
|
|
225
287
|
* Button component built on Base UI with Tailwind CSS styling.
|
|
226
288
|
*
|
|
@@ -230,6 +292,23 @@ export declare type BadgeVariant = keyof typeof variantStyles_2;
|
|
|
230
292
|
*/
|
|
231
293
|
export declare const Button: ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & RefAttributes<HTMLElement>>;
|
|
232
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Groups buttons together visually by merging their borders.
|
|
297
|
+
*
|
|
298
|
+
* Use for static button groups (e.g. a split button with a dropdown trigger).
|
|
299
|
+
* For toggle button groups with selection state, use `ToggleButtonGroup`.
|
|
300
|
+
*
|
|
301
|
+
* Children should be `Button` or `ToggleButton` components. The group
|
|
302
|
+
* removes inner border radii and collapses adjacent borders so the buttons
|
|
303
|
+
* read as a single connected surface.
|
|
304
|
+
*/
|
|
305
|
+
export declare const ButtonGroup: ForwardRefExoticComponent<ButtonGroupProps & RefAttributes<HTMLDivElement>>;
|
|
306
|
+
|
|
307
|
+
export declare interface ButtonGroupProps extends ComponentPropsWithoutRef<"div"> {
|
|
308
|
+
/** Orientation of the group */
|
|
309
|
+
orientation?: "horizontal" | "vertical";
|
|
310
|
+
}
|
|
311
|
+
|
|
233
312
|
export declare interface ButtonProps extends ComponentProps<typeof Button_2> {
|
|
234
313
|
/** Visual style variant */
|
|
235
314
|
variant?: ButtonVariant;
|
|
@@ -311,29 +390,13 @@ declare type CardVariant = keyof typeof variantStyles;
|
|
|
311
390
|
* Checked state uses accent color. Indeterminate state uses neutral gray
|
|
312
391
|
* to visually distinguish it from a deliberate selection.
|
|
313
392
|
*/
|
|
314
|
-
export declare
|
|
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;
|
|
393
|
+
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLButtonElement>>;
|
|
394
|
+
|
|
395
|
+
export declare interface CheckboxProps extends ComponentPropsWithoutRef<typeof Checkbox_2.Root> {
|
|
329
396
|
/** Size of the checkbox. */
|
|
330
397
|
size?: CheckboxSize;
|
|
331
398
|
/** Optional label rendered beside the checkbox. */
|
|
332
399
|
label?: ReactNode;
|
|
333
|
-
/** Name attribute for form submission. */
|
|
334
|
-
name?: string;
|
|
335
|
-
/** Additional class name for the root element. */
|
|
336
|
-
className?: string;
|
|
337
400
|
}
|
|
338
401
|
|
|
339
402
|
declare type CheckboxSize = keyof typeof sizeStyles_3;
|
|
@@ -367,6 +430,8 @@ export declare const ComboboxButton: ForwardRefExoticComponent<ComboboxButtonPro
|
|
|
367
430
|
export declare interface ComboboxButtonProps {
|
|
368
431
|
/** Placeholder text shown when no value is selected */
|
|
369
432
|
placeholder?: string;
|
|
433
|
+
/** Size of the button */
|
|
434
|
+
size?: ButtonSize;
|
|
370
435
|
className?: string;
|
|
371
436
|
}
|
|
372
437
|
|
|
@@ -394,6 +459,28 @@ export declare interface ComboboxContentProps {
|
|
|
394
459
|
className?: string;
|
|
395
460
|
}
|
|
396
461
|
|
|
462
|
+
/**
|
|
463
|
+
* Groups related combobox items with an optional label.
|
|
464
|
+
* Wraps Base UI's Combobox.Group.
|
|
465
|
+
*/
|
|
466
|
+
export declare const ComboboxGroup: ForwardRefExoticComponent<ComboboxGroupProps & RefAttributes<HTMLDivElement>>;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Accessible label automatically associated with its parent group.
|
|
470
|
+
* Renders via Menu.GroupLabel for consistent styling.
|
|
471
|
+
*/
|
|
472
|
+
export declare const ComboboxGroupLabel: ForwardRefExoticComponent<ComboboxGroupLabelProps & RefAttributes<HTMLDivElement>>;
|
|
473
|
+
|
|
474
|
+
export declare interface ComboboxGroupLabelProps {
|
|
475
|
+
readonly className?: string;
|
|
476
|
+
readonly children: ReactNode;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
export declare interface ComboboxGroupProps {
|
|
480
|
+
readonly className?: string;
|
|
481
|
+
readonly children: ReactNode;
|
|
482
|
+
}
|
|
483
|
+
|
|
397
484
|
export declare interface ComboboxItem {
|
|
398
485
|
readonly value: string;
|
|
399
486
|
readonly label: string;
|
|
@@ -429,6 +516,16 @@ export declare interface ComboboxProps {
|
|
|
429
516
|
readonly className?: string;
|
|
430
517
|
}
|
|
431
518
|
|
|
519
|
+
/**
|
|
520
|
+
* Visual separator between combobox groups.
|
|
521
|
+
* Renders via Menu.Separator for consistent styling.
|
|
522
|
+
*/
|
|
523
|
+
export declare const ComboboxSeparator: ForwardRefExoticComponent<ComboboxSeparatorProps & RefAttributes<HTMLDivElement>>;
|
|
524
|
+
|
|
525
|
+
export declare interface ComboboxSeparatorProps {
|
|
526
|
+
readonly className?: string;
|
|
527
|
+
}
|
|
528
|
+
|
|
432
529
|
/**
|
|
433
530
|
* Fully composable trigger. Renders whatever children you give it as the
|
|
434
531
|
* element that opens the combobox popup.
|
|
@@ -597,7 +694,7 @@ export declare interface DataTableProps<TData> {
|
|
|
597
694
|
* />
|
|
598
695
|
* ```
|
|
599
696
|
*/
|
|
600
|
-
export declare
|
|
697
|
+
export declare const DataTableSearch: ForwardRefExoticComponent<DataTableSearchProps & RefAttributes<HTMLDivElement>>;
|
|
601
698
|
|
|
602
699
|
export declare interface DataTableSearchProps {
|
|
603
700
|
/** Current search value */
|
|
@@ -630,7 +727,7 @@ export declare interface DataTableSearchProps {
|
|
|
630
727
|
* </DataTableToolbar>
|
|
631
728
|
* ```
|
|
632
729
|
*/
|
|
633
|
-
export declare
|
|
730
|
+
export declare const DataTableToolbar: ForwardRefExoticComponent<DataTableToolbarProps & RefAttributes<HTMLDivElement>>;
|
|
634
731
|
|
|
635
732
|
export declare interface DataTableToolbarProps {
|
|
636
733
|
/** Toolbar contents -- typically DataTableSearch, Select, Combobox, Button, etc. */
|
|
@@ -645,10 +742,11 @@ export declare const Dialog: {
|
|
|
645
742
|
Content: typeof DialogContent;
|
|
646
743
|
Panel: ForwardRefExoticComponent<DialogPanelProps & RefAttributes<HTMLDivElement>>;
|
|
647
744
|
Title: ForwardRefExoticComponent<Omit<DialogTitleProps, "ref"> & RefAttributes<HTMLHeadingElement>>;
|
|
745
|
+
/** @deprecated Use a plain `<p>` inside Dialog.Body instead. */
|
|
746
|
+
Description: ForwardRefExoticComponent<Omit<AlertDialogDescriptionProps_2, "ref"> & RefAttributes<HTMLParagraphElement>>;
|
|
648
747
|
Body: ForwardRefExoticComponent<DialogBodyProps & RefAttributes<HTMLDivElement>>;
|
|
649
748
|
Footer: ForwardRefExoticComponent<DialogFooterProps & RefAttributes<HTMLDivElement>>;
|
|
650
749
|
Close: ForwardRefExoticComponent<Omit<DialogCloseProps, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
651
|
-
Description: ForwardRefExoticComponent<Omit<DialogDescriptionProps, "ref"> & RefAttributes<HTMLParagraphElement>>;
|
|
652
750
|
};
|
|
653
751
|
|
|
654
752
|
export declare interface DialogBackdropProps extends ComponentProps<typeof Dialog_2.Backdrop> {
|
|
@@ -668,9 +766,6 @@ export declare interface DialogContentProps extends ComponentProps<typeof Dialog
|
|
|
668
766
|
size?: DialogSize;
|
|
669
767
|
}
|
|
670
768
|
|
|
671
|
-
export declare interface DialogDescriptionProps extends ComponentProps<typeof Dialog_2.Description> {
|
|
672
|
-
}
|
|
673
|
-
|
|
674
769
|
export declare interface DialogFooterProps {
|
|
675
770
|
className?: string;
|
|
676
771
|
children: ReactNode;
|
|
@@ -686,7 +781,7 @@ declare function DialogRoot({ ...props }: DialogRootProps): JSX.Element;
|
|
|
686
781
|
export declare interface DialogRootProps extends ComponentProps<typeof Dialog_2.Root> {
|
|
687
782
|
}
|
|
688
783
|
|
|
689
|
-
export declare type DialogSize = keyof typeof
|
|
784
|
+
export declare type DialogSize = keyof typeof sizeStyles_6;
|
|
690
785
|
|
|
691
786
|
export declare interface DialogTitleProps extends ComponentProps<typeof Dialog_2.Title> {
|
|
692
787
|
}
|
|
@@ -738,7 +833,7 @@ export declare interface DrawerBodyProps {
|
|
|
738
833
|
}
|
|
739
834
|
|
|
740
835
|
export declare interface DrawerCloseProps extends ComponentProps<typeof Drawer_2.Close> {
|
|
741
|
-
/** Show default
|
|
836
|
+
/** Show default XMarkIcon icon. Default: true when no children. */
|
|
742
837
|
asIcon?: boolean;
|
|
743
838
|
}
|
|
744
839
|
|
|
@@ -935,7 +1030,7 @@ export declare interface FormTextareaProps extends ComponentProps<typeof Field.C
|
|
|
935
1030
|
* When `active`, renders its own static background with the press inset
|
|
936
1031
|
* effect (same as standalone active state). The group pill handles hover.
|
|
937
1032
|
*/
|
|
938
|
-
export declare function Hover({ children, active, background, backgroundClassName, borderRadius, focus, interactive, instantHover, disabled, fullWidth, className, }: HoverProps): JSX.Element;
|
|
1033
|
+
export declare function Hover({ children, active, background, backgroundClassName, borderRadius, focus, interactive, instantHover, disabled, fullWidth, className, ...rest }: HoverProps): JSX.Element;
|
|
939
1034
|
|
|
940
1035
|
export declare function HoverGroup({ children, background, borderRadius, className, }: HoverGroupProps): JSX.Element;
|
|
941
1036
|
|
|
@@ -948,7 +1043,7 @@ export declare interface HoverGroupProps {
|
|
|
948
1043
|
className?: string;
|
|
949
1044
|
}
|
|
950
1045
|
|
|
951
|
-
export declare interface HoverProps {
|
|
1046
|
+
export declare interface HoverProps extends Omit<ComponentProps<"div">, "children"> {
|
|
952
1047
|
children: ReactNode;
|
|
953
1048
|
/** Force the hover background visible (e.g. active/selected state) */
|
|
954
1049
|
active?: boolean;
|
|
@@ -969,7 +1064,6 @@ export declare interface HoverProps {
|
|
|
969
1064
|
disabled?: boolean;
|
|
970
1065
|
/** Stretch to full width */
|
|
971
1066
|
fullWidth?: boolean;
|
|
972
|
-
className?: string;
|
|
973
1067
|
}
|
|
974
1068
|
|
|
975
1069
|
declare type LinkComponent = ComponentType<{
|
|
@@ -979,6 +1073,13 @@ declare type LinkComponent = ComponentType<{
|
|
|
979
1073
|
children?: ReactNode;
|
|
980
1074
|
}>;
|
|
981
1075
|
|
|
1076
|
+
declare type LinkComponent_2 = ComponentType<{
|
|
1077
|
+
to?: string;
|
|
1078
|
+
href?: string;
|
|
1079
|
+
className?: string;
|
|
1080
|
+
children?: ReactNode;
|
|
1081
|
+
}>;
|
|
1082
|
+
|
|
982
1083
|
/**
|
|
983
1084
|
* CodeRabbit logo mark.
|
|
984
1085
|
*/
|
|
@@ -1002,7 +1103,7 @@ declare type LogoVariant = "mark" | "circle";
|
|
|
1002
1103
|
* Renders a `<button>` by default - when `href` is provided,
|
|
1003
1104
|
* renders an `<a>` tag instead.
|
|
1004
1105
|
*/
|
|
1005
|
-
export declare function NavLink({ active, icon, href, onClick, className, children, }: NavLinkProps): JSX.Element;
|
|
1106
|
+
export declare function NavLink({ active, icon, href, onClick, size, className, children, }: NavLinkProps): JSX.Element;
|
|
1006
1107
|
|
|
1007
1108
|
export declare interface NavLinkProps {
|
|
1008
1109
|
/** Whether this link is the currently active/selected item */
|
|
@@ -1013,6 +1114,8 @@ export declare interface NavLinkProps {
|
|
|
1013
1114
|
href?: string;
|
|
1014
1115
|
/** Click handler */
|
|
1015
1116
|
onClick?: () => void;
|
|
1117
|
+
/** Size of the nav link */
|
|
1118
|
+
size?: NavLinkSize;
|
|
1016
1119
|
className?: string;
|
|
1017
1120
|
children: ReactNode;
|
|
1018
1121
|
}
|
|
@@ -1025,26 +1128,35 @@ export declare interface NavLinkProps {
|
|
|
1025
1128
|
*/
|
|
1026
1129
|
export declare function NavLinks({ className, children }: NavLinksProps): JSX.Element;
|
|
1027
1130
|
|
|
1131
|
+
export declare type NavLinkSize = keyof typeof sizeStyles_4;
|
|
1132
|
+
|
|
1028
1133
|
export declare interface NavLinksProps {
|
|
1029
1134
|
className?: string;
|
|
1030
1135
|
children: ReactNode;
|
|
1031
1136
|
}
|
|
1032
1137
|
|
|
1033
1138
|
/**
|
|
1034
|
-
* Full-page layout shell.
|
|
1139
|
+
* Full-page layout shell with a sidebar and content area.
|
|
1035
1140
|
*
|
|
1036
|
-
*
|
|
1037
|
-
*
|
|
1141
|
+
* Structure: sidebar (fixed width) + content panel (flex-1).
|
|
1142
|
+
* The content panel renders as a rounded card on bg-cui-base-0.
|
|
1038
1143
|
*/
|
|
1039
|
-
export declare const PageLayout: ForwardRefExoticComponent<PageLayoutProps & RefAttributes<HTMLDivElement
|
|
1144
|
+
export declare const PageLayout: ForwardRefExoticComponent<PageLayoutProps & RefAttributes<HTMLDivElement>> & {
|
|
1145
|
+
Header: ForwardRefExoticComponent<Omit<PageLayoutHeaderProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
1146
|
+
Body: ForwardRefExoticComponent<Omit<PageLayoutBodyProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1149
|
+
export declare interface PageLayoutBodyProps extends ComponentProps<"div"> {
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
export declare interface PageLayoutHeaderProps extends ComponentProps<"div"> {
|
|
1153
|
+
}
|
|
1040
1154
|
|
|
1041
1155
|
export declare interface PageLayoutProps {
|
|
1042
|
-
/**
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
className?: string;
|
|
1047
|
-
children: ReactNode;
|
|
1156
|
+
/** Sidebar content */
|
|
1157
|
+
readonly sidebar?: ReactNode;
|
|
1158
|
+
readonly className?: string;
|
|
1159
|
+
readonly children: ReactNode;
|
|
1048
1160
|
}
|
|
1049
1161
|
|
|
1050
1162
|
/**
|
|
@@ -1054,7 +1166,7 @@ export declare interface PageLayoutProps {
|
|
|
1054
1166
|
* Renders as a cohesive strip - pass `rowsPerPage` + `onRowsPerPageChange`
|
|
1055
1167
|
* to show the rows-per-page selector, and `totalItems` to show the result count.
|
|
1056
1168
|
*/
|
|
1057
|
-
export declare
|
|
1169
|
+
export declare const Pagination: ForwardRefExoticComponent<PaginationProps & RefAttributes<HTMLElement>>;
|
|
1058
1170
|
|
|
1059
1171
|
export declare interface PaginationProps {
|
|
1060
1172
|
/** Current page (1-indexed) */
|
|
@@ -1063,7 +1175,7 @@ export declare interface PaginationProps {
|
|
|
1063
1175
|
pageCount: number;
|
|
1064
1176
|
/** Called when the page changes */
|
|
1065
1177
|
onPageChange?: (page: number) => void;
|
|
1066
|
-
/** Total item count - shows "1–10 of
|
|
1178
|
+
/** Total item count - shows "1–10 of XMarkIcon" when provided */
|
|
1067
1179
|
totalItems?: number;
|
|
1068
1180
|
/** Rows per page - shows selector when provided with onRowsPerPageChange */
|
|
1069
1181
|
rowsPerPage?: number;
|
|
@@ -1073,9 +1185,13 @@ export declare interface PaginationProps {
|
|
|
1073
1185
|
rowOptions?: number[];
|
|
1074
1186
|
/** Number of sibling pages to show around active page. Default 1 */
|
|
1075
1187
|
siblingCount?: number;
|
|
1188
|
+
/** Size of the pagination controls */
|
|
1189
|
+
size?: PaginationSize;
|
|
1076
1190
|
className?: string;
|
|
1077
1191
|
}
|
|
1078
1192
|
|
|
1193
|
+
export declare type PaginationSize = keyof typeof sizeStyles_7;
|
|
1194
|
+
|
|
1079
1195
|
/**
|
|
1080
1196
|
* A 3x3 pixel-grid spinner with configurable animation variants.
|
|
1081
1197
|
*
|
|
@@ -1166,6 +1282,23 @@ export declare interface PopoverTitleProps {
|
|
|
1166
1282
|
export declare interface PopoverTriggerProps extends ComponentProps<typeof Popover_2.Trigger> {
|
|
1167
1283
|
}
|
|
1168
1284
|
|
|
1285
|
+
export declare const RadioGroup: {
|
|
1286
|
+
Root: ForwardRefExoticComponent<Omit<RadioGroupRootProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
1287
|
+
Item: ForwardRefExoticComponent<Omit<RadioGroupItemProps, "ref"> & RefAttributes<HTMLSpanElement>>;
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
export declare interface RadioGroupItemProps extends ComponentProps<typeof Radio.Root> {
|
|
1291
|
+
/** Size of the radio indicator */
|
|
1292
|
+
size?: RadioGroupItemSize;
|
|
1293
|
+
/** Label text rendered beside the radio */
|
|
1294
|
+
label?: string;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
export declare type RadioGroupItemSize = keyof typeof sizeStyles_10;
|
|
1298
|
+
|
|
1299
|
+
export declare interface RadioGroupRootProps extends ComponentProps<typeof RadioGroup_2> {
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1169
1302
|
export { Row }
|
|
1170
1303
|
|
|
1171
1304
|
export { RowSelectionState }
|
|
@@ -1205,7 +1338,7 @@ export declare interface SaveBarProps {
|
|
|
1205
1338
|
* - `fill` (default) - equal-width segments via CSS grid, indicator positioned with translateX
|
|
1206
1339
|
* - `fit` - segments size to content, indicator position/width measured from DOM
|
|
1207
1340
|
*/
|
|
1208
|
-
export declare
|
|
1341
|
+
export declare const SegmentedControl: <T extends string = string>(props: SegmentedControlProps<T> & default_2.RefAttributes<HTMLDivElement>) => default_2.ReactElement | null;
|
|
1209
1342
|
|
|
1210
1343
|
export declare interface SegmentedControlOption<T extends string = string> {
|
|
1211
1344
|
value: T;
|
|
@@ -1228,9 +1361,13 @@ export declare interface SegmentedControlProps<T extends string = string> {
|
|
|
1228
1361
|
* - `fit` - segments hug their content
|
|
1229
1362
|
*/
|
|
1230
1363
|
layout?: "fill" | "fit";
|
|
1364
|
+
/** Size of the segmented control items */
|
|
1365
|
+
size?: SegmentedControlSize;
|
|
1231
1366
|
className?: string;
|
|
1232
1367
|
}
|
|
1233
1368
|
|
|
1369
|
+
export declare type SegmentedControlSize = keyof typeof sizeStyles_8;
|
|
1370
|
+
|
|
1234
1371
|
/**
|
|
1235
1372
|
* Select component for choosing from a list of predefined options.
|
|
1236
1373
|
*
|
|
@@ -1249,6 +1386,8 @@ export declare const SelectButton: ForwardRefExoticComponent<SelectButtonProps &
|
|
|
1249
1386
|
export declare interface SelectButtonProps {
|
|
1250
1387
|
/** Placeholder text shown when no value is selected */
|
|
1251
1388
|
placeholder?: string;
|
|
1389
|
+
/** Size of the button */
|
|
1390
|
+
size?: ButtonSize;
|
|
1252
1391
|
className?: string;
|
|
1253
1392
|
}
|
|
1254
1393
|
|
|
@@ -1427,6 +1566,149 @@ export declare interface SettingsRowProps {
|
|
|
1427
1566
|
className?: string;
|
|
1428
1567
|
}
|
|
1429
1568
|
|
|
1569
|
+
export declare const Sidebar: typeof SidebarRoot & {
|
|
1570
|
+
Section: typeof SidebarSection;
|
|
1571
|
+
Header: typeof SidebarHeader;
|
|
1572
|
+
Label: ForwardRefExoticComponent<Omit<SidebarLabelProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
1573
|
+
Link: typeof SidebarLink;
|
|
1574
|
+
BackLink: typeof SidebarBackLink;
|
|
1575
|
+
CollapseButton: typeof SidebarCollapseButton;
|
|
1576
|
+
Layers: typeof SidebarLayers;
|
|
1577
|
+
};
|
|
1578
|
+
|
|
1579
|
+
declare function SidebarBackLink({ name, onClick, className }: SidebarBackLinkProps): JSX.Element;
|
|
1580
|
+
|
|
1581
|
+
export declare interface SidebarBackLinkProps {
|
|
1582
|
+
/** Display name */
|
|
1583
|
+
readonly name: string;
|
|
1584
|
+
/** Click handler */
|
|
1585
|
+
readonly onClick?: () => void;
|
|
1586
|
+
readonly className?: string;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
declare function SidebarCollapseButton({ className }: SidebarCollapseButtonProps): JSX.Element;
|
|
1590
|
+
|
|
1591
|
+
export declare interface SidebarCollapseButtonProps {
|
|
1592
|
+
readonly className?: string;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
declare interface SidebarContextValue {
|
|
1596
|
+
readonly collapsed: boolean;
|
|
1597
|
+
readonly toggle: () => void;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
/**
|
|
1601
|
+
* Header row that smoothly hides its children when the sidebar collapses.
|
|
1602
|
+
*
|
|
1603
|
+
* Matches the Vue DSidebar header pattern:
|
|
1604
|
+
* - `AnimatePresence mode="popLayout"` keeps CollapseButton stable in layout
|
|
1605
|
+
* - Children slide out with `x: -320, scale: 0.5` spring animation
|
|
1606
|
+
* - Row uses `justify-center` so CollapseButton centers when collapsed
|
|
1607
|
+
* - Padding `px-2` only applied when expanded
|
|
1608
|
+
*
|
|
1609
|
+
* Usage:
|
|
1610
|
+
* ```tsx
|
|
1611
|
+
* <Sidebar.Header>
|
|
1612
|
+
* <Logo />
|
|
1613
|
+
* <span>CodeRabbit</span>
|
|
1614
|
+
* </Sidebar.Header>
|
|
1615
|
+
* ```
|
|
1616
|
+
* The `CollapseButton` is rendered automatically at the end of the row.
|
|
1617
|
+
*/
|
|
1618
|
+
declare function SidebarHeader({ className, children }: SidebarHeaderProps): JSX.Element;
|
|
1619
|
+
|
|
1620
|
+
declare interface SidebarHeaderProps {
|
|
1621
|
+
readonly className?: string;
|
|
1622
|
+
readonly children: ReactNode;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
export declare interface SidebarLabelProps extends ComponentProps<"div"> {
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* Wraps sidebar content in directional slide animations.
|
|
1630
|
+
*
|
|
1631
|
+
* When `activeKey` changes, the old content slides out and new content
|
|
1632
|
+
* slides in. `direction="forward"` slides left (drilling in),
|
|
1633
|
+
* `direction="back"` slides right (going up).
|
|
1634
|
+
*
|
|
1635
|
+
* Usage:
|
|
1636
|
+
* ```tsx
|
|
1637
|
+
* <Sidebar.Layers activeKey={currentSection} direction={navDirection}>
|
|
1638
|
+
* {currentSection === "main" ? <MainNav /> : <SettingsNav />}
|
|
1639
|
+
* </Sidebar.Layers>
|
|
1640
|
+
* ```
|
|
1641
|
+
*/
|
|
1642
|
+
declare function SidebarLayers({ activeKey, direction, className, children, }: SidebarLayersProps): JSX.Element;
|
|
1643
|
+
|
|
1644
|
+
export declare interface SidebarLayersProps {
|
|
1645
|
+
/** Unique key for the current layer — changes trigger the animation */
|
|
1646
|
+
readonly activeKey: string;
|
|
1647
|
+
/** Direction of the transition: forward drills in, back goes up */
|
|
1648
|
+
readonly direction?: "forward" | "back";
|
|
1649
|
+
readonly className?: string;
|
|
1650
|
+
readonly children: ReactNode;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
declare function SidebarLink({ name, href, as, active, icon, nested, external, showIndicator, onClick, className, }: SidebarLinkProps): JSX.Element;
|
|
1654
|
+
|
|
1655
|
+
export declare interface SidebarLinkProps {
|
|
1656
|
+
/** Display name */
|
|
1657
|
+
readonly name: string;
|
|
1658
|
+
/** Link URL (renders as <a>) or omit for button */
|
|
1659
|
+
readonly href?: string;
|
|
1660
|
+
/** Render as "div" when nested inside an interactive container (e.g. DropdownMenu.Trigger) to avoid nested <button> */
|
|
1661
|
+
readonly as?: "div";
|
|
1662
|
+
/** Whether this link is currently active */
|
|
1663
|
+
readonly active?: boolean;
|
|
1664
|
+
/** Icon component rendered before the name */
|
|
1665
|
+
readonly icon?: ReactNode;
|
|
1666
|
+
/** Show a trailing chevron indicating navigation to a nested layer */
|
|
1667
|
+
readonly nested?: boolean;
|
|
1668
|
+
/** Show an external link arrow and open in new tab */
|
|
1669
|
+
readonly external?: boolean;
|
|
1670
|
+
/** Show a pulsing activity indicator dot */
|
|
1671
|
+
readonly showIndicator?: boolean;
|
|
1672
|
+
/** Click handler */
|
|
1673
|
+
readonly onClick?: () => void;
|
|
1674
|
+
readonly className?: string;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
/**
|
|
1678
|
+
* Sidebar with collapsible state and directional layer transitions.
|
|
1679
|
+
*
|
|
1680
|
+
* Supports both uncontrolled (`defaultCollapsed`) and controlled
|
|
1681
|
+
* (`collapsed` + `onCollapsedChange`) modes. Use controlled mode
|
|
1682
|
+
* to persist state across route changes or sync with external storage.
|
|
1683
|
+
*
|
|
1684
|
+
* Sub-components:
|
|
1685
|
+
* - `Sidebar.Section` — groups related links
|
|
1686
|
+
* - `Sidebar.Label` — section label that collapses smoothly
|
|
1687
|
+
* - `Sidebar.Link` — nav link with Hover + Tooltip
|
|
1688
|
+
* - `Sidebar.BackLink` — back navigation with directional slide
|
|
1689
|
+
* - `Sidebar.CollapseButton` — toggle sidebar width
|
|
1690
|
+
* - `Sidebar.Layers` — directional animation container for nested sidebars
|
|
1691
|
+
*/
|
|
1692
|
+
declare function SidebarRoot({ defaultCollapsed, collapsed: controlledCollapsed, onCollapsedChange, className, children, }: SidebarRootProps): JSX.Element;
|
|
1693
|
+
|
|
1694
|
+
export declare interface SidebarRootProps {
|
|
1695
|
+
/** Start in collapsed state (uncontrolled) */
|
|
1696
|
+
readonly defaultCollapsed?: boolean;
|
|
1697
|
+
/** Controlled collapsed state */
|
|
1698
|
+
readonly collapsed?: boolean;
|
|
1699
|
+
/** Callback when collapsed state changes (controlled mode) */
|
|
1700
|
+
readonly onCollapsedChange?: (collapsed: boolean) => void;
|
|
1701
|
+
readonly className?: string;
|
|
1702
|
+
readonly children: ReactNode;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
declare function SidebarSection({ className, children }: SidebarSectionProps): JSX.Element;
|
|
1706
|
+
|
|
1707
|
+
export declare interface SidebarSectionProps {
|
|
1708
|
+
readonly className?: string;
|
|
1709
|
+
readonly children: ReactNode;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1430
1712
|
declare const sizeStyles: {
|
|
1431
1713
|
readonly xs: {
|
|
1432
1714
|
readonly height: "h-6";
|
|
@@ -1448,6 +1730,19 @@ declare const sizeStyles: {
|
|
|
1448
1730
|
};
|
|
1449
1731
|
};
|
|
1450
1732
|
|
|
1733
|
+
declare const sizeStyles_10: {
|
|
1734
|
+
readonly sm: {
|
|
1735
|
+
readonly radio: "size-4";
|
|
1736
|
+
readonly indicator: "size-1.5";
|
|
1737
|
+
readonly label: "text-cui-sm";
|
|
1738
|
+
};
|
|
1739
|
+
readonly md: {
|
|
1740
|
+
readonly radio: "size-[18px]";
|
|
1741
|
+
readonly indicator: "size-2";
|
|
1742
|
+
readonly label: "text-cui-base";
|
|
1743
|
+
};
|
|
1744
|
+
};
|
|
1745
|
+
|
|
1451
1746
|
declare const sizeStyles_2: {
|
|
1452
1747
|
readonly sm: {
|
|
1453
1748
|
readonly track: "w-9 h-5";
|
|
@@ -1463,20 +1758,69 @@ declare const sizeStyles_3: {
|
|
|
1463
1758
|
readonly sm: {
|
|
1464
1759
|
readonly root: "size-4 rounded-[4px]";
|
|
1465
1760
|
readonly icon: "size-3";
|
|
1466
|
-
readonly label: "text-
|
|
1761
|
+
readonly label: "text-cui-sm";
|
|
1467
1762
|
};
|
|
1468
1763
|
readonly md: {
|
|
1469
1764
|
readonly root: "size-[18px] rounded-[5px]";
|
|
1470
1765
|
readonly icon: "size-3.5";
|
|
1471
|
-
readonly label: "text-
|
|
1766
|
+
readonly label: "text-cui-base";
|
|
1472
1767
|
};
|
|
1473
1768
|
};
|
|
1474
1769
|
|
|
1475
1770
|
declare const sizeStyles_4: {
|
|
1771
|
+
readonly sm: "h-7 px-1.5";
|
|
1772
|
+
readonly md: "h-8 px-1.5";
|
|
1773
|
+
};
|
|
1774
|
+
|
|
1775
|
+
declare const sizeStyles_5: {
|
|
1776
|
+
readonly sm: "px-1.5 py-0.5 text-cui-sm";
|
|
1777
|
+
readonly md: "px-2 py-0.5 text-cui-base";
|
|
1778
|
+
};
|
|
1779
|
+
|
|
1780
|
+
declare const sizeStyles_6: {
|
|
1476
1781
|
readonly md: "max-w-[450px]";
|
|
1477
1782
|
readonly lg: "max-w-[550px]";
|
|
1478
1783
|
};
|
|
1479
1784
|
|
|
1785
|
+
declare const sizeStyles_7: {
|
|
1786
|
+
readonly sm: {
|
|
1787
|
+
readonly button: "size-7";
|
|
1788
|
+
readonly icon: "size-4";
|
|
1789
|
+
readonly strip: "h-9";
|
|
1790
|
+
};
|
|
1791
|
+
readonly md: {
|
|
1792
|
+
readonly button: "size-8";
|
|
1793
|
+
readonly icon: "size-4";
|
|
1794
|
+
readonly strip: "h-10";
|
|
1795
|
+
};
|
|
1796
|
+
};
|
|
1797
|
+
|
|
1798
|
+
declare const sizeStyles_8: {
|
|
1799
|
+
readonly sm: "h-7 px-2.5";
|
|
1800
|
+
readonly md: "h-8 px-3";
|
|
1801
|
+
};
|
|
1802
|
+
|
|
1803
|
+
declare const sizeStyles_9: {
|
|
1804
|
+
readonly xs: {
|
|
1805
|
+
readonly height: "h-6";
|
|
1806
|
+
readonly padding: "px-1.5";
|
|
1807
|
+
readonly textPadding: "px-1";
|
|
1808
|
+
readonly icon: "w-6";
|
|
1809
|
+
};
|
|
1810
|
+
readonly sm: {
|
|
1811
|
+
readonly height: "h-7";
|
|
1812
|
+
readonly padding: "px-1.5";
|
|
1813
|
+
readonly textPadding: "px-1";
|
|
1814
|
+
readonly icon: "w-7";
|
|
1815
|
+
};
|
|
1816
|
+
readonly md: {
|
|
1817
|
+
readonly height: "h-8";
|
|
1818
|
+
readonly padding: "px-2";
|
|
1819
|
+
readonly textPadding: "px-1";
|
|
1820
|
+
readonly icon: "w-8";
|
|
1821
|
+
};
|
|
1822
|
+
};
|
|
1823
|
+
|
|
1480
1824
|
/**
|
|
1481
1825
|
* Skeleton loading placeholder with a sweeping pixel wave.
|
|
1482
1826
|
*
|
|
@@ -1588,6 +1932,11 @@ export declare const Tabs: {
|
|
|
1588
1932
|
Panel: ForwardRefExoticComponent<Omit<TabsPanelProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
1589
1933
|
};
|
|
1590
1934
|
|
|
1935
|
+
declare const tabSizeStyles: {
|
|
1936
|
+
readonly sm: "h-7 px-2.5";
|
|
1937
|
+
readonly md: "h-8 px-3";
|
|
1938
|
+
};
|
|
1939
|
+
|
|
1591
1940
|
export declare interface TabsListProps extends ComponentProps<typeof Tabs_2.List> {
|
|
1592
1941
|
/**
|
|
1593
1942
|
* Layout mode:
|
|
@@ -1604,8 +1953,12 @@ export declare interface TabsRootProps extends ComponentProps<typeof Tabs_2.Root
|
|
|
1604
1953
|
}
|
|
1605
1954
|
|
|
1606
1955
|
export declare interface TabsTabProps extends ComponentProps<typeof Tabs_2.Tab> {
|
|
1956
|
+
/** Size of the tab */
|
|
1957
|
+
size?: TabsTabSize;
|
|
1607
1958
|
}
|
|
1608
1959
|
|
|
1960
|
+
export declare type TabsTabSize = keyof typeof tabSizeStyles;
|
|
1961
|
+
|
|
1609
1962
|
export declare type ThemeMode = "light" | "dark" | "system";
|
|
1610
1963
|
|
|
1611
1964
|
/**
|
|
@@ -1613,19 +1966,57 @@ export declare type ThemeMode = "light" | "dark" | "system";
|
|
|
1613
1966
|
*/
|
|
1614
1967
|
export declare const Toggle: ForwardRefExoticComponent<ToggleProps & RefAttributes<HTMLButtonElement>>;
|
|
1615
1968
|
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1969
|
+
/**
|
|
1970
|
+
* A two-state button that can be pressed or unpressed.
|
|
1971
|
+
*
|
|
1972
|
+
* Built on Base UI Toggle. Visually matches the Button component but
|
|
1973
|
+
* toggles between pressed/unpressed states. Uses `data-[pressed]` for
|
|
1974
|
+
* the active visual.
|
|
1975
|
+
*
|
|
1976
|
+
* Use standalone for single toggles (like a bold button in a toolbar).
|
|
1977
|
+
* Use inside a `ToggleButtonGroup` for mutually exclusive or multi-select
|
|
1978
|
+
* button groups.
|
|
1979
|
+
*/
|
|
1980
|
+
export declare const ToggleButton: ForwardRefExoticComponent<Omit<ToggleButtonProps, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
1981
|
+
|
|
1982
|
+
/**
|
|
1983
|
+
* Groups toggle buttons with shared selection state.
|
|
1984
|
+
*
|
|
1985
|
+
* Built on Base UI ToggleGroup. When `multiple` is false (default),
|
|
1986
|
+
* pressing one button unpresses the others. When true, any combination
|
|
1987
|
+
* of buttons can be pressed.
|
|
1988
|
+
*
|
|
1989
|
+
* Children should be `ToggleButton` components with `value` props.
|
|
1990
|
+
*/
|
|
1991
|
+
export declare const ToggleButtonGroup: ForwardRefExoticComponent<ToggleButtonGroupProps<string> & RefAttributes<HTMLDivElement>>;
|
|
1992
|
+
|
|
1993
|
+
export declare interface ToggleButtonGroupProps<Value extends string = string> extends Omit<ComponentPropsWithoutRef<typeof ToggleGroup>, "value" | "defaultValue" | "onValueChange"> {
|
|
1994
|
+
/** Controlled pressed values */
|
|
1995
|
+
value?: readonly Value[];
|
|
1996
|
+
/** Uncontrolled default pressed values */
|
|
1997
|
+
defaultValue?: readonly Value[];
|
|
1998
|
+
/** Called when the pressed states change */
|
|
1999
|
+
onValueChange?: (value: Value[]) => void;
|
|
2000
|
+
/** When false, only one toggle can be pressed at a time */
|
|
2001
|
+
multiple?: boolean;
|
|
2002
|
+
/** Orientation of the group */
|
|
2003
|
+
orientation?: "horizontal" | "vertical";
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
export declare interface ToggleButtonProps extends ComponentProps<typeof Toggle_2> {
|
|
2007
|
+
/** Size of the toggle button */
|
|
2008
|
+
size?: ToggleButtonSize;
|
|
2009
|
+
/** Icon element rendered before the label */
|
|
2010
|
+
iconLeft?: ReactNode;
|
|
2011
|
+
/** Icon element rendered after the label */
|
|
2012
|
+
iconRight?: ReactNode;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
export declare type ToggleButtonSize = keyof typeof sizeStyles_9;
|
|
2016
|
+
|
|
2017
|
+
export declare interface ToggleProps extends ComponentPropsWithoutRef<typeof Switch.Root> {
|
|
1625
2018
|
/** Size of the toggle. */
|
|
1626
2019
|
size?: ToggleSize;
|
|
1627
|
-
/** Additional class name for the root element. */
|
|
1628
|
-
className?: string;
|
|
1629
2020
|
}
|
|
1630
2021
|
|
|
1631
2022
|
declare type ToggleSize = keyof typeof sizeStyles_2;
|
|
@@ -1687,10 +2078,10 @@ export declare function useDirtyState<T extends object>(initial: T): DirtyState<
|
|
|
1687
2078
|
* User menu dropdown - shows user info, theme toggle, navigation items,
|
|
1688
2079
|
* and a log out action.
|
|
1689
2080
|
*
|
|
1690
|
-
*
|
|
1691
|
-
*
|
|
2081
|
+
* Theme state is passed as props so the component stays decoupled from
|
|
2082
|
+
* any specific theme hook.
|
|
1692
2083
|
*/
|
|
1693
|
-
export declare function UserMenu({ user, theme, onThemeChange, items, onLogout, className, }: UserMenuProps): JSX.Element;
|
|
2084
|
+
export declare function UserMenu({ user, theme, onThemeChange, items, onLogout, children, side, align, className, }: UserMenuProps): JSX.Element;
|
|
1694
2085
|
|
|
1695
2086
|
export declare interface UserMenuItem {
|
|
1696
2087
|
label: string;
|
|
@@ -1709,6 +2100,12 @@ export declare interface UserMenuProps {
|
|
|
1709
2100
|
items?: UserMenuItem[];
|
|
1710
2101
|
/** Called when "Log out" is clicked */
|
|
1711
2102
|
onLogout?: () => void;
|
|
2103
|
+
/** Custom trigger content. Defaults to a bare Avatar. */
|
|
2104
|
+
children?: ReactNode;
|
|
2105
|
+
/** Which side the dropdown opens on */
|
|
2106
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
2107
|
+
/** Alignment of the dropdown relative to the trigger */
|
|
2108
|
+
align?: "start" | "center" | "end";
|
|
1712
2109
|
className?: string;
|
|
1713
2110
|
}
|
|
1714
2111
|
|
|
@@ -1723,6 +2120,8 @@ export declare interface UserMenuUser {
|
|
|
1723
2120
|
initials?: string;
|
|
1724
2121
|
}
|
|
1725
2122
|
|
|
2123
|
+
export declare function useSidebar(): SidebarContextValue;
|
|
2124
|
+
|
|
1726
2125
|
declare const variantConfig: {
|
|
1727
2126
|
readonly primary: {
|
|
1728
2127
|
readonly active: true;
|
|
@@ -1763,7 +2162,7 @@ declare const variantConfig: {
|
|
|
1763
2162
|
};
|
|
1764
2163
|
|
|
1765
2164
|
declare const variantConfig_2: {
|
|
1766
|
-
readonly
|
|
2165
|
+
readonly accent: {
|
|
1767
2166
|
readonly container: "bg-cui-accent-subtle";
|
|
1768
2167
|
readonly icon: "text-cui-accent";
|
|
1769
2168
|
readonly text: "text-cui-accent [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80";
|
|
@@ -1783,7 +2182,7 @@ declare const variantConfig_2: {
|
|
|
1783
2182
|
titleId?: string;
|
|
1784
2183
|
} & RefAttributes<SVGSVGElement>>;
|
|
1785
2184
|
};
|
|
1786
|
-
readonly
|
|
2185
|
+
readonly warn: {
|
|
1787
2186
|
readonly container: "bg-cui-warn-subtle";
|
|
1788
2187
|
readonly icon: "text-cui-warn";
|
|
1789
2188
|
readonly text: "text-cui-warn [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80";
|
|
@@ -1814,7 +2213,7 @@ declare const variantStyles_2: {
|
|
|
1814
2213
|
readonly neutral: "bg-cui-subtle text-cui-secondary";
|
|
1815
2214
|
readonly accent: "bg-cui-accent-subtle text-cui-accent";
|
|
1816
2215
|
readonly danger: "bg-cui-danger-subtle text-cui-danger";
|
|
1817
|
-
readonly
|
|
2216
|
+
readonly warn: "bg-cui-warn-subtle text-cui-warn";
|
|
1818
2217
|
readonly success: "bg-cui-success-subtle text-cui-success";
|
|
1819
2218
|
};
|
|
1820
2219
|
|