@minidev.fun/ui 1.0.2 → 1.0.4
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/accordion.d.ts +36 -0
- package/dist/alert-dialog.d.ts +114 -0
- package/dist/alert.d.ts +41 -0
- package/dist/aspect-ratio.d.ts +14 -0
- package/dist/avatar.d.ts +55 -0
- package/dist/{components/ui/badge.d.ts → badge.d.ts} +22 -16
- package/dist/breadcrumb.d.ts +54 -0
- package/dist/button-group.d.ts +45 -0
- package/dist/{components/ui/button.d.ts → button.d.ts} +46 -41
- package/dist/calendar.d.ts +68 -0
- package/dist/card.d.ts +45 -0
- package/dist/carousel.d.ts +116 -0
- package/dist/{components/ui/chart.d.ts → chart.d.ts} +85 -73
- package/dist/checkbox.d.ts +14 -0
- package/dist/collapsible.d.ts +28 -0
- package/dist/combobox.d.ts +113 -0
- package/dist/command.d.ts +90 -0
- package/dist/components/minidev.fun/undefined/index.d.ts +2 -0
- package/dist/components/ui/src/components/ui/accordion.d.ts +2 -0
- package/dist/components/ui/src/components/ui/alert-dialog.d.ts +2 -0
- package/dist/components/ui/src/components/ui/alert.d.ts +2 -0
- package/dist/components/ui/src/components/ui/aspect-ratio.d.ts +2 -0
- package/dist/components/ui/src/components/ui/avatar.d.ts +2 -0
- package/dist/components/ui/src/components/ui/badge.d.ts +2 -0
- package/dist/components/ui/src/components/ui/breadcrumb.d.ts +2 -0
- package/dist/components/ui/src/components/ui/button-group.d.ts +2 -0
- package/dist/components/ui/src/components/ui/button.d.ts +2 -0
- package/dist/components/ui/src/components/ui/calendar.d.ts +2 -0
- package/dist/components/ui/src/components/ui/card.d.ts +2 -0
- package/dist/components/ui/src/components/ui/carousel.d.ts +2 -0
- package/dist/components/ui/src/components/ui/chart.d.ts +2 -0
- package/dist/components/ui/src/components/ui/checkbox.d.ts +2 -0
- package/dist/components/ui/src/components/ui/collapsible.d.ts +2 -0
- package/dist/components/ui/src/components/ui/combobox.d.ts +2 -0
- package/dist/components/ui/src/components/ui/command.d.ts +2 -0
- package/dist/components/ui/src/components/ui/context-menu.d.ts +2 -0
- package/dist/components/ui/src/components/ui/dialog.d.ts +2 -0
- package/dist/components/ui/src/components/ui/drawer.d.ts +2 -0
- package/dist/components/ui/src/components/ui/dropdown-menu.d.ts +2 -0
- package/dist/components/ui/src/components/ui/empty.d.ts +2 -0
- package/dist/components/ui/src/components/ui/field.d.ts +2 -0
- package/dist/components/ui/src/components/ui/hover-card.d.ts +2 -0
- package/dist/components/ui/src/components/ui/input-group.d.ts +2 -0
- package/dist/components/ui/src/components/ui/input-otp.d.ts +2 -0
- package/dist/components/ui/src/components/ui/input.d.ts +2 -0
- package/dist/components/ui/src/components/ui/item.d.ts +2 -0
- package/dist/components/ui/src/components/ui/kbd.d.ts +2 -0
- package/dist/components/ui/src/components/ui/label.d.ts +2 -0
- package/dist/components/ui/src/components/ui/menubar.d.ts +2 -0
- package/dist/components/ui/src/components/ui/modal.d.ts +2 -0
- package/dist/components/ui/src/components/ui/navigation-menu.d.ts +2 -0
- package/dist/components/ui/src/components/ui/pagination.d.ts +2 -0
- package/dist/components/ui/src/components/ui/popover.d.ts +2 -0
- package/dist/components/ui/src/components/ui/progress.d.ts +2 -0
- package/dist/components/ui/src/components/ui/radio-group.d.ts +2 -0
- package/dist/components/ui/src/components/ui/resizable.d.ts +2 -0
- package/dist/components/ui/src/components/ui/scroll-area.d.ts +2 -0
- package/dist/components/ui/src/components/ui/select.d.ts +2 -0
- package/dist/components/ui/src/components/ui/separator.d.ts +2 -0
- package/dist/components/ui/src/components/ui/sheet.d.ts +2 -0
- package/dist/components/ui/src/components/ui/sidebar.d.ts +2 -0
- package/dist/components/ui/src/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/src/components/ui/slider.d.ts +2 -0
- package/dist/components/ui/src/components/ui/sonner.d.ts +2 -0
- package/dist/components/ui/src/components/ui/spinner.d.ts +2 -0
- package/dist/components/ui/src/components/ui/switch.d.ts +2 -0
- package/dist/components/ui/src/components/ui/table.d.ts +2 -0
- package/dist/components/ui/src/components/ui/tabs.d.ts +2 -0
- package/dist/components/ui/src/components/ui/textarea.d.ts +2 -0
- package/dist/components/ui/src/components/ui/toast.d.ts +2 -0
- package/dist/components/ui/src/components/ui/toggle-group.d.ts +2 -0
- package/dist/components/ui/src/components/ui/toggle.d.ts +2 -0
- package/dist/components/ui/src/components/ui/tooltip.d.ts +2 -0
- package/dist/context-menu.d.ts +97 -0
- package/dist/dialog.d.ts +90 -0
- package/dist/drawer.d.ts +61 -0
- package/dist/dropdown-menu.d.ts +121 -0
- package/dist/empty.d.ts +56 -0
- package/dist/field.d.ts +109 -0
- package/dist/hooks/src/hooks/use-mobile.d.ts +2 -0
- package/dist/hover-card.d.ts +28 -0
- package/dist/index.d.ts +290 -0
- package/dist/input-group.d.ts +106 -0
- package/dist/input-otp.d.ts +43 -0
- package/dist/input.d.ts +14 -0
- package/dist/item.d.ts +101 -0
- package/dist/kbd.d.ts +19 -0
- package/dist/label.d.ts +12 -0
- package/dist/lib/utils.d.ts +2 -23
- package/dist/menubar.d.ts +205 -0
- package/dist/modal.d.ts +104 -0
- package/dist/navigation-menu.d.ts +66 -0
- package/dist/pagination.d.ts +99 -0
- package/dist/popover.d.ts +55 -0
- package/dist/progress.d.ts +41 -0
- package/dist/radio-group.d.ts +21 -0
- package/dist/{components/ui/resizable.d.ts → resizable.d.ts} +47 -38
- package/dist/{components/ui/scroll-area.d.ts → scroll-area.d.ts} +69 -64
- package/dist/select.d.ts +79 -0
- package/dist/separator.d.ts +12 -0
- package/dist/sheet.d.ts +68 -0
- package/dist/sidebar.d.ts +288 -0
- package/dist/skeleton.d.ts +11 -0
- package/dist/{components/ui/slider.d.ts → slider.d.ts} +24 -21
- package/dist/{components/ui/sonner.d.ts → sonner.d.ts} +27 -21
- package/dist/spinner.d.ts +11 -0
- package/dist/switch.d.ts +15 -0
- package/dist/table.d.ts +68 -0
- package/dist/tabs.d.ts +42 -0
- package/dist/{components/ui/textarea.d.ts → textarea.d.ts} +21 -18
- package/dist/toast.d.ts +15 -0
- package/dist/toggle-group.d.ts +36 -0
- package/dist/toggle.d.ts +19 -0
- package/dist/tooltip.d.ts +36 -0
- package/dist/{hooks/use-mobile.d.ts → use-mobile.d.ts} +19 -18
- package/dist/utils.d.ts +25 -0
- package/package.json +1 -1
- package/dist/components/minidev.fun/color-mode/color-mode-initializer.d.ts +0 -46
- package/dist/components/minidev.fun/color-mode/color-mode-initializer.d.ts.map +0 -1
- package/dist/components/minidev.fun/color-mode/color-mode-toggle.d.ts +0 -106
- package/dist/components/minidev.fun/color-mode/color-mode-toggle.d.ts.map +0 -1
- package/dist/components/minidev.fun/color-mode/index.d.ts +0 -4
- package/dist/components/minidev.fun/color-mode/index.d.ts.map +0 -1
- package/dist/components/minidev.fun/color-mode/use-color-mode.d.ts +0 -91
- package/dist/components/minidev.fun/color-mode/use-color-mode.d.ts.map +0 -1
- package/dist/components/minidev.fun/first-light/first-light-filters.d.ts +0 -27
- package/dist/components/minidev.fun/first-light/first-light-filters.d.ts.map +0 -1
- package/dist/components/minidev.fun/first-light/index.d.ts +0 -2
- package/dist/components/minidev.fun/first-light/index.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/blockquote.d.ts +0 -13
- package/dist/components/minidev.fun/typography/blockquote.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/code.d.ts +0 -13
- package/dist/components/minidev.fun/typography/code.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/index.d.ts +0 -6
- package/dist/components/minidev.fun/typography/index.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/list-item.d.ts +0 -27
- package/dist/components/minidev.fun/typography/list-item.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/text.d.ts +0 -44
- package/dist/components/minidev.fun/typography/text.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/title.d.ts +0 -22
- package/dist/components/minidev.fun/typography/title.d.ts.map +0 -1
- package/dist/components/ui/accordion.d.ts +0 -27
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/alert-dialog.d.ts +0 -47
- package/dist/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/components/ui/alert.d.ts +0 -30
- package/dist/components/ui/alert.d.ts.map +0 -1
- package/dist/components/ui/aspect-ratio.d.ts +0 -11
- package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/components/ui/avatar.d.ts +0 -42
- package/dist/components/ui/avatar.d.ts.map +0 -1
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/breadcrumb.d.ts +0 -39
- package/dist/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/components/ui/button-group.d.ts +0 -26
- package/dist/components/ui/button-group.d.ts.map +0 -1
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/calendar.d.ts +0 -20
- package/dist/components/ui/calendar.d.ts.map +0 -1
- package/dist/components/ui/card.d.ts +0 -30
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/carousel.d.ts +0 -56
- package/dist/components/ui/carousel.d.ts.map +0 -1
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/checkbox.d.ts +0 -11
- package/dist/components/ui/checkbox.d.ts.map +0 -1
- package/dist/components/ui/collapsible.d.ts +0 -21
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/combobox.d.ts +0 -80
- package/dist/components/ui/combobox.d.ts.map +0 -1
- package/dist/components/ui/command.d.ts +0 -63
- package/dist/components/ui/command.d.ts.map +0 -1
- package/dist/components/ui/context-menu.d.ts +0 -64
- package/dist/components/ui/context-menu.d.ts.map +0 -1
- package/dist/components/ui/dialog.d.ts +0 -69
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/drawer.d.ts +0 -40
- package/dist/components/ui/drawer.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu.d.ts +0 -88
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/empty.d.ts +0 -41
- package/dist/components/ui/empty.d.ts.map +0 -1
- package/dist/components/ui/field.d.ts +0 -78
- package/dist/components/ui/field.d.ts.map +0 -1
- package/dist/components/ui/hover-card.d.ts +0 -21
- package/dist/components/ui/hover-card.d.ts.map +0 -1
- package/dist/components/ui/input-group.d.ts +0 -50
- package/dist/components/ui/input-group.d.ts.map +0 -1
- package/dist/components/ui/input-otp.d.ts +0 -34
- package/dist/components/ui/input-otp.d.ts.map +0 -1
- package/dist/components/ui/input.d.ts +0 -11
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/item.d.ts +0 -69
- package/dist/components/ui/item.d.ts.map +0 -1
- package/dist/components/ui/kbd.d.ts +0 -14
- package/dist/components/ui/kbd.d.ts.map +0 -1
- package/dist/components/ui/label.d.ts +0 -9
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/menubar.d.ts +0 -87
- package/dist/components/ui/menubar.d.ts.map +0 -1
- package/dist/components/ui/modal.d.ts +0 -41
- package/dist/components/ui/modal.d.ts.map +0 -1
- package/dist/components/ui/navigation-menu.d.ts +0 -52
- package/dist/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/components/ui/pagination.d.ts +0 -42
- package/dist/components/ui/pagination.d.ts.map +0 -1
- package/dist/components/ui/popover.d.ts +0 -42
- package/dist/components/ui/popover.d.ts.map +0 -1
- package/dist/components/ui/progress.d.ts +0 -30
- package/dist/components/ui/progress.d.ts.map +0 -1
- package/dist/components/ui/radio-group.d.ts +0 -16
- package/dist/components/ui/radio-group.d.ts.map +0 -1
- package/dist/components/ui/resizable.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/select.d.ts +0 -58
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -9
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/components/ui/sheet.d.ts +0 -51
- package/dist/components/ui/sheet.d.ts.map +0 -1
- package/dist/components/ui/sidebar.d.ts +0 -172
- package/dist/components/ui/sidebar.d.ts.map +0 -1
- package/dist/components/ui/skeleton.d.ts +0 -8
- package/dist/components/ui/skeleton.d.ts.map +0 -1
- package/dist/components/ui/slider.d.ts.map +0 -1
- package/dist/components/ui/sonner.d.ts.map +0 -1
- package/dist/components/ui/spinner.d.ts +0 -8
- package/dist/components/ui/spinner.d.ts.map +0 -1
- package/dist/components/ui/switch.d.ts +0 -12
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/table.d.ts +0 -51
- package/dist/components/ui/table.d.ts.map +0 -1
- package/dist/components/ui/tabs.d.ts +0 -31
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/toast.d.ts +0 -11
- package/dist/components/ui/toast.d.ts.map +0 -1
- package/dist/components/ui/toggle-group.d.ts +0 -26
- package/dist/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/components/ui/toggle.d.ts +0 -14
- package/dist/components/ui/toggle.d.ts.map +0 -1
- package/dist/components/ui/tooltip.d.ts +0 -27
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/variants.d.ts +0 -107
- package/dist/lib/variants.d.ts.map +0 -1
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { Button as Button_2 } from '@base-ui/react/button';
|
|
2
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
|
+
import * as React_2 from 'react';
|
|
5
|
+
import { Separator as Separator_2 } from '@base-ui/react/separator';
|
|
6
|
+
import { Tooltip } from '@base-ui/react/tooltip';
|
|
7
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
8
|
+
import { VariantProps } from 'class-variance-authority';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Versatile button component with multiple visual variants and sizes.
|
|
12
|
+
*
|
|
13
|
+
* Supports icon placement via `data-icon="inline-start"` or `data-icon="inline-end"` attributes
|
|
14
|
+
* on child elements. Use the `render` prop to compose with other components or change the
|
|
15
|
+
* underlying element while maintaining button semantics.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* // Basic button
|
|
20
|
+
* <Button variant="default">Click me</Button>
|
|
21
|
+
*
|
|
22
|
+
* // With icon
|
|
23
|
+
* <Button>
|
|
24
|
+
* <PlusIcon data-icon="inline-start" />
|
|
25
|
+
* Create
|
|
26
|
+
* </Button>
|
|
27
|
+
*
|
|
28
|
+
* // Icon only
|
|
29
|
+
* <Button size="icon" aria-label="Settings">
|
|
30
|
+
* <SettingsIcon />
|
|
31
|
+
* </Button>
|
|
32
|
+
*
|
|
33
|
+
* // Custom element
|
|
34
|
+
* <Button render={<a href="/login" />}>Sign in</Button>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare function Button({ className, variant, size, ...props }: ButtonProps): JSX.Element;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Props for the Button component.
|
|
41
|
+
* Combines Base UI Button props with variant styling options.
|
|
42
|
+
*/
|
|
43
|
+
declare type ButtonProps = Button_2.Props & VariantProps<typeof buttonVariants>;
|
|
44
|
+
|
|
45
|
+
declare const buttonVariants: (props?: ({
|
|
46
|
+
variant?: "link" | "default" | "outline" | "success" | "destructive" | "info" | "primary" | "secondary" | "ghost" | "warning" | null | undefined;
|
|
47
|
+
size?: "default" | "icon" | "sm" | "lg" | "xs" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
48
|
+
} & ClassProp) | undefined) => string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Text input field with support for all HTML input types.
|
|
52
|
+
*
|
|
53
|
+
* Supports text, email, password, number, tel, url, search, date, time, file, and other input types.
|
|
54
|
+
* Includes built-in validation styling via `aria-invalid` attribute.
|
|
55
|
+
*/
|
|
56
|
+
declare function Input({ className, type, ...props }: InputProps): JSX.Element;
|
|
57
|
+
|
|
58
|
+
declare type InputProps = React_2.ComponentProps<"input">;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Visual divider for separating content sections.
|
|
62
|
+
* Supports both horizontal (default) and vertical orientations.
|
|
63
|
+
*/
|
|
64
|
+
declare function Separator({ className, orientation, ...props }: SeparatorProps): JSX.Element;
|
|
65
|
+
|
|
66
|
+
declare type SeparatorProps = Separator_2.Props;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Sidebar container with responsive behavior. Renders as Sheet on mobile.
|
|
70
|
+
* Use with SidebarProvider for state management.
|
|
71
|
+
*/
|
|
72
|
+
export declare function Sidebar({ side, variant, collapsible, className, children, ...props }: SidebarProps): JSX.Element;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Scrollable main content area of sidebar. Contains SidebarGroup components.
|
|
76
|
+
*/
|
|
77
|
+
export declare function SidebarContent({ className, ...props }: SidebarContentProps): JSX.Element;
|
|
78
|
+
|
|
79
|
+
export declare type SidebarContentProps = React_2.ComponentProps<"div">;
|
|
80
|
+
|
|
81
|
+
declare type SidebarContextProps = {
|
|
82
|
+
state: "expanded" | "collapsed";
|
|
83
|
+
open: boolean;
|
|
84
|
+
setOpen: (open: boolean) => void;
|
|
85
|
+
openMobile: boolean;
|
|
86
|
+
setOpenMobile: (open: boolean) => void;
|
|
87
|
+
isMobile: boolean;
|
|
88
|
+
toggleSidebar: () => void;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Bottom section of sidebar for user profile, settings, or secondary actions.
|
|
93
|
+
*/
|
|
94
|
+
export declare function SidebarFooter({ className, ...props }: SidebarFooterProps): JSX.Element;
|
|
95
|
+
|
|
96
|
+
export declare type SidebarFooterProps = React_2.ComponentProps<"div">;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Container for grouped menu items with optional label.
|
|
100
|
+
*/
|
|
101
|
+
export declare function SidebarGroup({ className, ...props }: SidebarGroupProps): JSX.Element;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Action button displayed in top-right of group (e.g., add, expand all).
|
|
105
|
+
*/
|
|
106
|
+
export declare function SidebarGroupAction({ className, render, ...props }: SidebarGroupActionProps): React_2.ReactElement<unknown, string | React_2.JSXElementConstructor<any>>;
|
|
107
|
+
|
|
108
|
+
export declare type SidebarGroupActionProps = useRender.ComponentProps<"button"> & React_2.ComponentProps<"button">;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Container for menu items within a group.
|
|
112
|
+
*/
|
|
113
|
+
export declare function SidebarGroupContent({ className, ...props }: SidebarGroupContentProps): JSX.Element;
|
|
114
|
+
|
|
115
|
+
export declare type SidebarGroupContentProps = React_2.ComponentProps<"div">;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Label heading for a sidebar group. Fades out when sidebar collapses to icon mode.
|
|
119
|
+
*/
|
|
120
|
+
export declare function SidebarGroupLabel({ className, render, ...props }: SidebarGroupLabelProps): React_2.ReactElement<unknown, string | React_2.JSXElementConstructor<any>>;
|
|
121
|
+
|
|
122
|
+
export declare type SidebarGroupLabelProps = useRender.ComponentProps<"div"> & React_2.ComponentProps<"div">;
|
|
123
|
+
|
|
124
|
+
export declare type SidebarGroupProps = React_2.ComponentProps<"div">;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Top section of sidebar for branding, app switcher, or global actions.
|
|
128
|
+
*/
|
|
129
|
+
export declare function SidebarHeader({ className, ...props }: SidebarHeaderProps): JSX.Element;
|
|
130
|
+
|
|
131
|
+
export declare type SidebarHeaderProps = React_2.ComponentProps<"div">;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Styled input for sidebar search/filter functionality.
|
|
135
|
+
*/
|
|
136
|
+
export declare function SidebarInput({ className, ...props }: SidebarInputProps): JSX.Element;
|
|
137
|
+
|
|
138
|
+
export declare type SidebarInputProps = React_2.ComponentProps<typeof Input>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Main content area that sits beside the sidebar. Automatically adjusts margins based on sidebar state.
|
|
142
|
+
*/
|
|
143
|
+
export declare function SidebarInset({ className, ...props }: SidebarInsetProps): JSX.Element;
|
|
144
|
+
|
|
145
|
+
export declare type SidebarInsetProps = React_2.ComponentProps<"main">;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Unordered list container for sidebar menu items.
|
|
149
|
+
*/
|
|
150
|
+
export declare function SidebarMenu({ className, ...props }: SidebarMenuProps): JSX.Element;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Secondary action button for menu item (e.g., delete, edit). Positioned on right side.
|
|
154
|
+
*/
|
|
155
|
+
export declare function SidebarMenuAction({ className, render, showOnHover, ...props }: SidebarMenuActionProps): React_2.ReactElement<unknown, string | React_2.JSXElementConstructor<any>>;
|
|
156
|
+
|
|
157
|
+
export declare type SidebarMenuActionProps = useRender.ComponentProps<"button"> & React_2.ComponentProps<"button"> & {
|
|
158
|
+
/** Only show on hover/focus. @default false */
|
|
159
|
+
showOnHover?: boolean;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Badge/counter displayed on right side of menu item (e.g., notification count).
|
|
164
|
+
*/
|
|
165
|
+
export declare function SidebarMenuBadge({ className, ...props }: SidebarMenuBadgeProps): JSX.Element;
|
|
166
|
+
|
|
167
|
+
export declare type SidebarMenuBadgeProps = React_2.ComponentProps<"div">;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Clickable button for sidebar menu item. Supports variants, sizes, active state, and tooltips.
|
|
171
|
+
*/
|
|
172
|
+
export declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, className, ...props }: SidebarMenuButtonProps): JSX.Element;
|
|
173
|
+
|
|
174
|
+
export declare type SidebarMenuButtonProps = useRender.ComponentProps<"button"> & React_2.ComponentProps<"button"> & {
|
|
175
|
+
/** Mark as active/current page. */
|
|
176
|
+
isActive?: boolean;
|
|
177
|
+
/** Tooltip content shown when sidebar is collapsed. */
|
|
178
|
+
tooltip?: string | React_2.ComponentProps<typeof TooltipContent>;
|
|
179
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>;
|
|
180
|
+
|
|
181
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
182
|
+
variant?: "default" | "outline" | null | undefined;
|
|
183
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
184
|
+
} & ClassProp) | undefined) => string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* List item wrapper for a single menu entry.
|
|
188
|
+
*/
|
|
189
|
+
export declare function SidebarMenuItem({ className, ...props }: SidebarMenuItemProps): JSX.Element;
|
|
190
|
+
|
|
191
|
+
export declare type SidebarMenuItemProps = React_2.ComponentProps<"li">;
|
|
192
|
+
|
|
193
|
+
export declare type SidebarMenuProps = React_2.ComponentProps<"ul">;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Loading skeleton placeholder for menu item with randomized width.
|
|
197
|
+
*/
|
|
198
|
+
export declare function SidebarMenuSkeleton({ className, showIcon, ...props }: SidebarMenuSkeletonProps): JSX.Element;
|
|
199
|
+
|
|
200
|
+
export declare type SidebarMenuSkeletonProps = React_2.ComponentProps<"div"> & {
|
|
201
|
+
/** Show icon skeleton. @default false */
|
|
202
|
+
showIcon?: boolean;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Nested submenu list with indented border. Place inside SidebarMenuItem.
|
|
207
|
+
*/
|
|
208
|
+
export declare function SidebarMenuSub({ className, ...props }: SidebarMenuSubProps): JSX.Element;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Link button for submenu item. Defaults to anchor tag.
|
|
212
|
+
*/
|
|
213
|
+
export declare function SidebarMenuSubButton({ render, size, isActive, className, ...props }: SidebarMenuSubButtonProps): React_2.ReactElement<unknown, string | React_2.JSXElementConstructor<any>>;
|
|
214
|
+
|
|
215
|
+
export declare type SidebarMenuSubButtonProps = useRender.ComponentProps<"a"> & React_2.ComponentProps<"a"> & {
|
|
216
|
+
/** Size variant. @default "md" */
|
|
217
|
+
size?: "sm" | "md";
|
|
218
|
+
/** Mark as active/current page. */
|
|
219
|
+
isActive?: boolean;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* List item wrapper for submenu entry.
|
|
224
|
+
*/
|
|
225
|
+
export declare function SidebarMenuSubItem({ className, ...props }: SidebarMenuSubItemProps): JSX.Element;
|
|
226
|
+
|
|
227
|
+
export declare type SidebarMenuSubItemProps = React_2.ComponentProps<"li">;
|
|
228
|
+
|
|
229
|
+
export declare type SidebarMenuSubProps = React_2.ComponentProps<"ul">;
|
|
230
|
+
|
|
231
|
+
export declare type SidebarProps = React_2.ComponentProps<"div"> & {
|
|
232
|
+
/** Which side to display sidebar. @default "left" */
|
|
233
|
+
side?: "left" | "right";
|
|
234
|
+
variant?: "sidebar" | "floating" | "inset" | "fixed";
|
|
235
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Root provider for sidebar with state management, keyboard shortcuts (⌘B), and mobile detection.
|
|
240
|
+
* Manages collapsed/expanded state and persists preference in cookie.
|
|
241
|
+
*/
|
|
242
|
+
export declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: SidebarProviderProps): JSX.Element;
|
|
243
|
+
|
|
244
|
+
export declare type SidebarProviderProps = React_2.ComponentProps<"div"> & {
|
|
245
|
+
/** Initial open state on desktop. @default true */
|
|
246
|
+
defaultOpen?: boolean;
|
|
247
|
+
/** Controlled open state for desktop. */
|
|
248
|
+
open?: boolean;
|
|
249
|
+
/** Callback when open state changes. Persists state in cookie. */
|
|
250
|
+
onOpenChange?: (open: boolean) => void;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Invisible rail element on sidebar edge for drag-to-resize interaction.
|
|
255
|
+
*/
|
|
256
|
+
export declare function SidebarRail({ className, ...props }: SidebarRailProps): JSX.Element;
|
|
257
|
+
|
|
258
|
+
export declare type SidebarRailProps = React_2.ComponentProps<"button">;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Horizontal divider between sidebar sections.
|
|
262
|
+
*/
|
|
263
|
+
export declare function SidebarSeparator({ className, ...props }: SidebarSeparatorProps): JSX.Element;
|
|
264
|
+
|
|
265
|
+
export declare type SidebarSeparatorProps = React_2.ComponentProps<typeof Separator>;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Button to toggle sidebar open/closed. Shows hamburger icon.
|
|
269
|
+
*/
|
|
270
|
+
export declare function SidebarTrigger({ className, onClick, ...props }: SidebarTriggerProps): JSX.Element;
|
|
271
|
+
|
|
272
|
+
export declare type SidebarTriggerProps = React_2.ComponentProps<typeof Button>;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Tooltip content popup with automatic portal, positioning, and arrow.
|
|
276
|
+
* Includes smooth animations and collision detection.
|
|
277
|
+
*/
|
|
278
|
+
declare function TooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: TooltipContentProps): JSX.Element;
|
|
279
|
+
|
|
280
|
+
declare type TooltipContentProps = Tooltip.Popup.Props & Pick<Tooltip.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Hook to access sidebar context including state, mobile state, and toggle functions.
|
|
284
|
+
* Must be used within SidebarProvider.
|
|
285
|
+
*/
|
|
286
|
+
export declare function useSidebar(): SidebarContextProps;
|
|
287
|
+
|
|
288
|
+
export { }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Skeleton loading placeholder with pulse animation.
|
|
5
|
+
* Use to indicate content is loading while maintaining layout structure.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Skeleton({ className, ...props }: SkeletonProps): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare type SkeletonProps = React.ComponentProps<"div">;
|
|
10
|
+
|
|
11
|
+
export { }
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { Slider as Slider_2 } from '@base-ui/react/slider';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Slider for selecting single values or ranges with one or more draggable thumbs.
|
|
6
|
+
* Supports horizontal and vertical orientations with keyboard navigation.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // Single value slider
|
|
10
|
+
* <Slider defaultValue={[50]} min={0} max={100} />
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Range slider (two thumbs)
|
|
14
|
+
* <Slider defaultValue={[25, 75]} min={0} max={100} />
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Controlled slider with step
|
|
18
|
+
* <Slider value={value} onValueChange={setValue} min={0} max={100} step={10} />
|
|
19
|
+
*/
|
|
20
|
+
export declare function Slider({ className, defaultValue, value, min, max, ...props }: SliderProps): JSX.Element;
|
|
21
|
+
|
|
22
|
+
export declare type SliderProps = Slider_2.Root.Props;
|
|
23
|
+
|
|
24
|
+
export { }
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { toast } from 'sonner';
|
|
3
|
+
import { ToasterProps } from 'sonner';
|
|
4
|
+
|
|
5
|
+
export { toast }
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Toast notification container with themed icons and color system integration.
|
|
9
|
+
*
|
|
10
|
+
* Provides a pre-configured Sonner toaster with custom icons for each toast type
|
|
11
|
+
* and automatic theme integration. Use the exported `toast` function to trigger notifications.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* // Add to your app root
|
|
16
|
+
* <Toaster position="bottom-right" />
|
|
17
|
+
*
|
|
18
|
+
* // Trigger toasts anywhere
|
|
19
|
+
* toast.success("Saved successfully")
|
|
20
|
+
* toast.error("Failed to save", { description: error.message })
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function Toaster({ theme, richColors, ...props }: ToasterComponentProps): JSX.Element;
|
|
24
|
+
|
|
25
|
+
export declare type ToasterComponentProps = ToasterProps;
|
|
26
|
+
|
|
27
|
+
export { }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Animated loading spinner for indicating processing states.
|
|
5
|
+
* Uses Lucide's Loader2 icon with continuous rotation animation.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Spinner({ className, ...props }: SpinnerProps): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare type SpinnerProps = React.ComponentProps<"svg">;
|
|
10
|
+
|
|
11
|
+
export { }
|
package/dist/switch.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { Switch as Switch_2 } from '@base-ui/react/switch';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Toggle switch for binary on/off settings.
|
|
6
|
+
* Renders a styled switch with automatic focus management and form integration.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Switch({ className, size, ...props }: SwitchProps): JSX.Element;
|
|
9
|
+
|
|
10
|
+
export declare type SwitchProps = Switch_2.Root.Props & {
|
|
11
|
+
/** Switch size variant. @default "default" */
|
|
12
|
+
size?: "sm" | "default";
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { }
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Root table component with automatic horizontal scrolling container.
|
|
6
|
+
* Wraps standard HTML table element with responsive overflow behavior.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Table({ className, ...props }: TableProps): JSX.Element;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Table body section for data rows.
|
|
12
|
+
* Use with TableRow and TableCell for row content.
|
|
13
|
+
*/
|
|
14
|
+
export declare function TableBody({ className, ...props }: TableBodyProps): JSX.Element;
|
|
15
|
+
|
|
16
|
+
export declare type TableBodyProps = React_2.ComponentProps<"tbody">;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Table caption for accessibility and description.
|
|
20
|
+
* Rendered below the table by default.
|
|
21
|
+
*/
|
|
22
|
+
export declare function TableCaption({ className, ...props }: TableCaptionProps): JSX.Element;
|
|
23
|
+
|
|
24
|
+
export declare type TableCaptionProps = React_2.ComponentProps<"caption">;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Table data cell for row content.
|
|
28
|
+
* Use within TableBody > TableRow.
|
|
29
|
+
*/
|
|
30
|
+
export declare function TableCell({ className, ...props }: TableCellProps): JSX.Element;
|
|
31
|
+
|
|
32
|
+
export declare type TableCellProps = React_2.ComponentProps<"td">;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Table footer section for summary rows.
|
|
36
|
+
* Typically used for totals or aggregated data.
|
|
37
|
+
*/
|
|
38
|
+
export declare function TableFooter({ className, ...props }: TableFooterProps): JSX.Element;
|
|
39
|
+
|
|
40
|
+
export declare type TableFooterProps = React_2.ComponentProps<"tfoot">;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Table header cell for column titles.
|
|
44
|
+
* Use within TableHeader > TableRow.
|
|
45
|
+
*/
|
|
46
|
+
export declare function TableHead({ className, ...props }: TableHeadProps): JSX.Element;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Table header section for column headings.
|
|
50
|
+
* Use with TableHead for individual header cells.
|
|
51
|
+
*/
|
|
52
|
+
export declare function TableHeader({ className, ...props }: TableHeaderProps): JSX.Element;
|
|
53
|
+
|
|
54
|
+
export declare type TableHeaderProps = React_2.ComponentProps<"thead">;
|
|
55
|
+
|
|
56
|
+
export declare type TableHeadProps = React_2.ComponentProps<"th">;
|
|
57
|
+
|
|
58
|
+
export declare type TableProps = React_2.ComponentProps<"table">;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Table row with hover and selection states.
|
|
62
|
+
* Add `data-state="selected"` attribute to highlight row.
|
|
63
|
+
*/
|
|
64
|
+
export declare function TableRow({ className, ...props }: TableRowProps): JSX.Element;
|
|
65
|
+
|
|
66
|
+
export declare type TableRowProps = React_2.ComponentProps<"tr">;
|
|
67
|
+
|
|
68
|
+
export { }
|
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { Tabs as Tabs_2 } from '@base-ui/react/tabs';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Root container for tabs component that manages tab state and orientation.
|
|
8
|
+
* Supports both controlled and uncontrolled usage with horizontal or vertical layout.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Tabs({ className, orientation, ...props }: TabsProps): JSX.Element;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Content panel that displays when its corresponding tab is active.
|
|
14
|
+
* Automatically hidden/shown based on active tab value.
|
|
15
|
+
*/
|
|
16
|
+
export declare function TabsContent({ className, ...props }: TabsContentProps): JSX.Element;
|
|
17
|
+
|
|
18
|
+
export declare type TabsContentProps = Tabs_2.Panel.Props;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Container for tab triggers with two visual variants.
|
|
22
|
+
* @param variant - Visual style: "default" (background highlight) or "line" (underline indicator). @default "default"
|
|
23
|
+
*/
|
|
24
|
+
export declare function TabsList({ className, variant, ...props }: TabsListProps): JSX.Element;
|
|
25
|
+
|
|
26
|
+
export declare type TabsListProps = Tabs_2.List.Props & VariantProps<typeof tabsListVariants>;
|
|
27
|
+
|
|
28
|
+
export declare const tabsListVariants: (props?: ({
|
|
29
|
+
variant?: "line" | "default" | null | undefined;
|
|
30
|
+
} & ClassProp) | undefined) => string;
|
|
31
|
+
|
|
32
|
+
export declare type TabsProps = Tabs_2.Root.Props;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Individual tab button that activates the corresponding panel.
|
|
36
|
+
* Supports icons, badges, and disabled state. Active tab has visual highlight or underline based on variant.
|
|
37
|
+
*/
|
|
38
|
+
export declare function TabsTrigger({ className, ...props }: TabsTriggerProps): JSX.Element;
|
|
39
|
+
|
|
40
|
+
export declare type TabsTriggerProps = Tabs_2.Tab.Props;
|
|
41
|
+
|
|
42
|
+
export { }
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Multi-line text input with auto-grow behavior and validation states.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Auto-grows vertically with content (field-sizing-content)
|
|
9
|
+
* - Error state via aria-invalid
|
|
10
|
+
* - Supports all native textarea props (rows, disabled, etc.)
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Textarea placeholder="Enter description..." rows={4} />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function Textarea({ className, ...props }: TextareaProps): JSX.Element;
|
|
18
|
+
|
|
19
|
+
export declare type TextareaProps = React_2.ComponentProps<"textarea">;
|
|
20
|
+
|
|
21
|
+
export { }
|
package/dist/toast.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
|
|
4
|
+
export declare function Toast({ title, description, variant, className, onClose, children, ...props }: ToastProps): JSX.Element;
|
|
5
|
+
|
|
6
|
+
export declare interface ToastProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
variant?: ToastVariant;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare type ToastVariant = "default" | "success" | "destructive" | "info" | "loading";
|
|
14
|
+
|
|
15
|
+
export { }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { Toggle } from '@base-ui/react/toggle';
|
|
4
|
+
import { ToggleGroup as ToggleGroup_2 } from '@base-ui/react/toggle-group';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Container for a group of toggle buttons that share state. Supports both single and multiple selection modes.
|
|
9
|
+
*
|
|
10
|
+
* By default, the toggle group allows multiple selection. Use `multiple={false}` for single selection.
|
|
11
|
+
* All items inherit variant and size from the group unless explicitly overridden.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ToggleGroup({ className, variant, size, spacing, orientation, children, ...props }: ToggleGroupProps): JSX.Element;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Individual toggle button within a ToggleGroup. Inherits variant and size from parent group context.
|
|
17
|
+
*
|
|
18
|
+
* When spacing={0}, items are joined together with shared borders. Use `aria-label` for icon-only buttons.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ToggleGroupItem({ className, children, variant, size, ...props }: ToggleGroupItemProps): JSX.Element;
|
|
21
|
+
|
|
22
|
+
export declare type ToggleGroupItemProps = Toggle.Props & VariantProps<typeof toggleVariants>;
|
|
23
|
+
|
|
24
|
+
export declare type ToggleGroupProps = ToggleGroup_2.Props & VariantProps<typeof toggleVariants> & {
|
|
25
|
+
/** Gap between items in spacing units. Set to 0 for joined buttons. @default 0 */
|
|
26
|
+
spacing?: number;
|
|
27
|
+
/** Layout direction of the toggle group. @default "horizontal" */
|
|
28
|
+
orientation?: "horizontal" | "vertical";
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare const toggleVariants: (props?: ({
|
|
32
|
+
variant?: "default" | "outline" | null | undefined;
|
|
33
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
34
|
+
} & ClassProp) | undefined) => string;
|
|
35
|
+
|
|
36
|
+
export { }
|
package/dist/toggle.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { Toggle as Toggle_2 } from '@base-ui/react/toggle';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Two-state button that can be pressed (on) or unpressed (off).
|
|
8
|
+
* Supports icons, text, or both. Commonly used for formatting toolbars, view mode toggles, and preference switches.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Toggle({ className, variant, size, ...props }: ToggleProps): JSX.Element;
|
|
11
|
+
|
|
12
|
+
export declare type ToggleProps = Toggle_2.Props & VariantProps<typeof toggleVariants>;
|
|
13
|
+
|
|
14
|
+
export declare const toggleVariants: (props?: ({
|
|
15
|
+
variant?: "default" | "outline" | null | undefined;
|
|
16
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
17
|
+
} & ClassProp) | undefined) => string;
|
|
18
|
+
|
|
19
|
+
export { }
|