@evinvest/uikit 0.1.0
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 +162 -0
- package/dist/index.d.ts +1183 -0
- package/dist/index.js +6722 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -0
- package/styles/tokens.css +106 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1183 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Fuses class fragments into one string with real Tailwind conflict resolution:
|
|
6
|
+
* `clsx` drops falsy fragments and joins the rest, `tailwind-merge` resolves
|
|
7
|
+
* conflicting utilities so the rightmost wins (`cn("p-4", "p-2") === "p-2"`). A
|
|
8
|
+
* caller's `className` override, passed last, therefore beats the base classes.
|
|
9
|
+
*
|
|
10
|
+
* The Rust mirror is the `cn!` macro in `ev::uikit` (`tailwind_fuse::tw_merge!`).
|
|
11
|
+
*/
|
|
12
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Minimal `asChild` mechanism — the dep-light replacement for
|
|
16
|
+
* `@radix-ui/react-slot`. Renders by cloning its single child, merging the
|
|
17
|
+
* Slot's own props onto it: `className` is fused with `cn`, event handlers are
|
|
18
|
+
* chained (child's runs first, then ours), and `style` objects are shallow
|
|
19
|
+
* merged. Refs are composed so both the caller's and the child's ref fire.
|
|
20
|
+
*
|
|
21
|
+
* There is no Rust counterpart: Dioxus composition is expressed with `children`
|
|
22
|
+
* directly, so `asChild` is a TS-only ergonomic.
|
|
23
|
+
*/
|
|
24
|
+
interface SlotProps extends React.HTMLAttributes<HTMLElement> {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Controlled/uncontrolled state, the dep-light equivalent of Radix's
|
|
31
|
+
* `useControllableState`. When `value` is provided the component is controlled
|
|
32
|
+
* (the hook returns it and routes writes through `onChange`); otherwise it owns
|
|
33
|
+
* an internal `useState` seeded from `defaultValue`.
|
|
34
|
+
*
|
|
35
|
+
* The Rust mirror is `use_controllable_signal` in `ev::uikit`.
|
|
36
|
+
*/
|
|
37
|
+
declare function useControllableState<T>(opts: {
|
|
38
|
+
value?: T | undefined;
|
|
39
|
+
defaultValue: T;
|
|
40
|
+
onChange?: ((value: T) => void) | undefined;
|
|
41
|
+
}): [T, (next: T) => void];
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Renders its children into `container` (default `document.body`) via
|
|
45
|
+
* `react-dom`'s `createPortal` — the dep-light stand-in for
|
|
46
|
+
* `@radix-ui/react-portal`. SSR-safe: renders nothing until mounted.
|
|
47
|
+
*
|
|
48
|
+
* Rust has no portal counterpart (see the README "Limitations"): `ev::uikit`
|
|
49
|
+
* overlays render inline with fixed positioning instead.
|
|
50
|
+
*/
|
|
51
|
+
interface PortalProps {
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
container?: Element | null;
|
|
54
|
+
}
|
|
55
|
+
declare function Portal({ children, container }: PortalProps): React.ReactPortal | null;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Calls `onDismiss` on Escape or on a pointer-down outside the layer — the
|
|
59
|
+
* dep-light core of every overlay's "click away to close". Pass refs to any
|
|
60
|
+
* nodes that should NOT count as outside (e.g. the trigger), via `exclude`.
|
|
61
|
+
*
|
|
62
|
+
* Mirrors the dismiss behaviour Rust expresses with a full-screen backdrop.
|
|
63
|
+
*/
|
|
64
|
+
declare function useDismissableLayer(opts: {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
onDismiss: () => void;
|
|
67
|
+
exclude?: Array<React.RefObject<Element | null>>;
|
|
68
|
+
}): React.RefObject<HTMLDivElement | null>;
|
|
69
|
+
|
|
70
|
+
type Side = "top" | "right" | "bottom" | "left";
|
|
71
|
+
type Align = "start" | "center" | "end";
|
|
72
|
+
interface FloatingResult {
|
|
73
|
+
floatingRef: React.RefObject<HTMLElement | null>;
|
|
74
|
+
style: React.CSSProperties;
|
|
75
|
+
side: Side;
|
|
76
|
+
align: Align;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Positions a floating element against an anchor with `position: fixed` and
|
|
80
|
+
* `getBoundingClientRect` — the dep-light stand-in for `@radix-ui/react-popper`
|
|
81
|
+
* / floating-ui. Supports a preferred `side`/`align`, an `offset`, and a single
|
|
82
|
+
* collision flip onto the opposite side when the preferred side overflows the
|
|
83
|
+
* viewport. Recomputes on scroll and resize while `open`.
|
|
84
|
+
*
|
|
85
|
+
* Rust's overlays use CSS-only placement (`data-side`) and do not measure; see
|
|
86
|
+
* the README "Limitations".
|
|
87
|
+
*/
|
|
88
|
+
declare function useFloating(opts: {
|
|
89
|
+
anchorRef: React.RefObject<Element | null>;
|
|
90
|
+
open: boolean;
|
|
91
|
+
side?: Side;
|
|
92
|
+
align?: Align;
|
|
93
|
+
offset?: number;
|
|
94
|
+
}): FloatingResult;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Traps Tab focus inside the returned ref's subtree and restores focus to the
|
|
98
|
+
* previously-focused element on unmount — the dep-light core of dialogs/menus,
|
|
99
|
+
* replacing `@radix-ui/react-focus-scope`. On mount, focuses the first
|
|
100
|
+
* focusable (or the container itself).
|
|
101
|
+
*
|
|
102
|
+
* Rust dialogs rely on the browser's native focus order within a fixed overlay;
|
|
103
|
+
* see the README "Limitations".
|
|
104
|
+
*/
|
|
105
|
+
declare function useFocusScope(enabled: boolean): React.RefObject<HTMLDivElement | null>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Keeps a node mounted through its exit animation — the dep-light core of
|
|
109
|
+
* `@radix-ui/react-presence`. While `present` is true the node is mounted with
|
|
110
|
+
* `data-state="open"`; when `present` flips to false the hook switches it to
|
|
111
|
+
* `data-state="closed"` and unmounts only after the node's CSS
|
|
112
|
+
* animation/transition ends (or immediately if there is none).
|
|
113
|
+
*
|
|
114
|
+
* Usage: spread `{ ref, ...(isPresent ? {} : {}) }` and render only while
|
|
115
|
+
* `isPresent`. The Rust mirror toggles `data-state` without deferring unmount.
|
|
116
|
+
*/
|
|
117
|
+
declare function usePresence(present: boolean): {
|
|
118
|
+
isPresent: boolean;
|
|
119
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Arrow-key roving focus over a set of items — the dep-light core of menus,
|
|
124
|
+
* tabs, radio-groups and toolbars (replacing `@radix-ui/react-roving-focus`).
|
|
125
|
+
* Returns an `onKeyDown` to spread on the container and the active index; items
|
|
126
|
+
* should set `tabIndex={index === activeIndex ? 0 : -1}`.
|
|
127
|
+
*
|
|
128
|
+
* Mirrors the keyboard navigation Rust drives with a focused-index signal.
|
|
129
|
+
*/
|
|
130
|
+
declare function useRovingFocus(opts: {
|
|
131
|
+
count: number;
|
|
132
|
+
orientation?: "horizontal" | "vertical" | "both";
|
|
133
|
+
loop?: boolean;
|
|
134
|
+
initial?: number;
|
|
135
|
+
}): {
|
|
136
|
+
activeIndex: number;
|
|
137
|
+
setActiveIndex: (i: number) => void;
|
|
138
|
+
onKeyDown: (event: React.KeyboardEvent) => void;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Combines several refs into one callback ref so a node can satisfy multiple
|
|
143
|
+
* consumers at once (e.g. an overlay that is both the floating element and the
|
|
144
|
+
* dismissable layer). Used throughout the overlay components.
|
|
145
|
+
*/
|
|
146
|
+
declare function mergeRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T>;
|
|
147
|
+
|
|
148
|
+
declare const alertVariants: {
|
|
149
|
+
readonly default: "bg-card text-card-foreground";
|
|
150
|
+
readonly destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90";
|
|
151
|
+
};
|
|
152
|
+
type AlertVariant = keyof typeof alertVariants;
|
|
153
|
+
interface AlertProps extends React.ComponentProps<"div"> {
|
|
154
|
+
variant?: AlertVariant;
|
|
155
|
+
}
|
|
156
|
+
declare function Alert({ className, variant, ...props }: AlertProps): React.JSX.Element;
|
|
157
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
158
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
159
|
+
|
|
160
|
+
interface AspectRatioProps extends React.ComponentProps<"div"> {
|
|
161
|
+
ratio?: number;
|
|
162
|
+
}
|
|
163
|
+
declare function AspectRatio({ ratio, className, style, ...props }: AspectRatioProps): React.JSX.Element;
|
|
164
|
+
|
|
165
|
+
declare function Avatar({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
166
|
+
declare function AvatarImage({ className, onError, ...props }: React.ComponentProps<"img">): React.JSX.Element | null;
|
|
167
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
168
|
+
|
|
169
|
+
declare const badgeVariants: {
|
|
170
|
+
readonly default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90";
|
|
171
|
+
readonly secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90";
|
|
172
|
+
readonly destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20";
|
|
173
|
+
readonly outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground";
|
|
174
|
+
readonly success: "border-transparent bg-main-accent-t2/20 text-main-accent-t2";
|
|
175
|
+
};
|
|
176
|
+
type BadgeVariant = keyof typeof badgeVariants;
|
|
177
|
+
interface BadgeProps extends React.ComponentProps<"span"> {
|
|
178
|
+
variant?: BadgeVariant;
|
|
179
|
+
asChild?: boolean;
|
|
180
|
+
}
|
|
181
|
+
declare function Badge({ className, variant, asChild, ...props }: BadgeProps): React.JSX.Element;
|
|
182
|
+
|
|
183
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
184
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
|
|
185
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
186
|
+
interface BreadcrumbLinkProps extends React.ComponentProps<"a"> {
|
|
187
|
+
asChild?: boolean;
|
|
188
|
+
}
|
|
189
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: BreadcrumbLinkProps): React.JSX.Element;
|
|
190
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
191
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
192
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
193
|
+
|
|
194
|
+
declare const buttonVariantClasses: {
|
|
195
|
+
readonly default: "bg-primary text-primary-foreground hover:bg-primary/90";
|
|
196
|
+
readonly secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80";
|
|
197
|
+
readonly outline: "border bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground";
|
|
198
|
+
readonly ghost: "hover:bg-accent hover:text-accent-foreground";
|
|
199
|
+
readonly destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20";
|
|
200
|
+
readonly link: "text-primary underline-offset-4 hover:underline";
|
|
201
|
+
};
|
|
202
|
+
declare const buttonSizeClasses: {
|
|
203
|
+
readonly default: "h-9 px-4 py-2 has-[>svg]:px-3";
|
|
204
|
+
readonly sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5";
|
|
205
|
+
readonly lg: "h-10 rounded-md px-6 has-[>svg]:px-4";
|
|
206
|
+
readonly icon: "size-9";
|
|
207
|
+
readonly "icon-sm": "size-8";
|
|
208
|
+
readonly "icon-lg": "size-10";
|
|
209
|
+
};
|
|
210
|
+
type ButtonVariant = keyof typeof buttonVariantClasses;
|
|
211
|
+
type ButtonSize = keyof typeof buttonSizeClasses;
|
|
212
|
+
interface ButtonVariantsOptions {
|
|
213
|
+
variant?: ButtonVariant;
|
|
214
|
+
size?: ButtonSize;
|
|
215
|
+
className?: string;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Returns the fused canonical button class string. Reused by `pagination` so a
|
|
219
|
+
* non-`Button` element can adopt the same styling, mirroring Rust's
|
|
220
|
+
* `button_classes`.
|
|
221
|
+
*/
|
|
222
|
+
declare function buttonVariants({ variant, size, className, }?: ButtonVariantsOptions): string;
|
|
223
|
+
interface ButtonProps extends React.ComponentProps<"button"> {
|
|
224
|
+
variant?: ButtonVariant;
|
|
225
|
+
size?: ButtonSize;
|
|
226
|
+
asChild?: boolean;
|
|
227
|
+
}
|
|
228
|
+
declare function Button({ className, variant, size, asChild, ...props }: ButtonProps): React.JSX.Element;
|
|
229
|
+
|
|
230
|
+
declare const buttonGroupOrientationClasses: {
|
|
231
|
+
readonly horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none";
|
|
232
|
+
readonly vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none";
|
|
233
|
+
};
|
|
234
|
+
type ButtonGroupOrientation = keyof typeof buttonGroupOrientationClasses;
|
|
235
|
+
interface ButtonGroupProps extends React.ComponentProps<"div"> {
|
|
236
|
+
orientation?: ButtonGroupOrientation;
|
|
237
|
+
}
|
|
238
|
+
declare function ButtonGroup({ className, orientation, ...props }: ButtonGroupProps): React.JSX.Element;
|
|
239
|
+
interface ButtonGroupTextProps extends React.ComponentProps<"div"> {
|
|
240
|
+
asChild?: boolean;
|
|
241
|
+
}
|
|
242
|
+
declare function ButtonGroupText({ className, asChild, ...props }: ButtonGroupTextProps): React.JSX.Element;
|
|
243
|
+
declare function ButtonGroupSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
244
|
+
|
|
245
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
246
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
247
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
248
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
249
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
250
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
251
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
252
|
+
|
|
253
|
+
declare function Empty({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
254
|
+
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
255
|
+
declare const emptyMediaVariants: {
|
|
256
|
+
readonly default: "bg-transparent";
|
|
257
|
+
readonly icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6";
|
|
258
|
+
};
|
|
259
|
+
type EmptyMediaVariant = keyof typeof emptyMediaVariants;
|
|
260
|
+
interface EmptyMediaProps extends React.ComponentProps<"div"> {
|
|
261
|
+
variant?: EmptyMediaVariant;
|
|
262
|
+
}
|
|
263
|
+
declare function EmptyMedia({ className, variant, ...props }: EmptyMediaProps): React.JSX.Element;
|
|
264
|
+
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
265
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
266
|
+
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
267
|
+
|
|
268
|
+
declare function Label({ className, ...props }: React.ComponentProps<"label">): React.JSX.Element;
|
|
269
|
+
|
|
270
|
+
declare const fieldOrientation: {
|
|
271
|
+
readonly vertical: "flex-col [&>*]:w-full [&>.sr-only]:w-auto";
|
|
272
|
+
readonly horizontal: string;
|
|
273
|
+
readonly responsive: string;
|
|
274
|
+
};
|
|
275
|
+
type FieldOrientation = keyof typeof fieldOrientation;
|
|
276
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): React.JSX.Element;
|
|
277
|
+
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
|
|
278
|
+
variant?: "legend" | "label";
|
|
279
|
+
}): React.JSX.Element;
|
|
280
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
281
|
+
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & {
|
|
282
|
+
orientation?: FieldOrientation;
|
|
283
|
+
}): React.JSX.Element;
|
|
284
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
285
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): React.JSX.Element;
|
|
286
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
287
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
288
|
+
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
|
|
289
|
+
children?: React.ReactNode;
|
|
290
|
+
}): React.JSX.Element;
|
|
291
|
+
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
|
|
292
|
+
errors?: Array<{
|
|
293
|
+
message?: string;
|
|
294
|
+
} | undefined>;
|
|
295
|
+
}): React.JSX.Element | null;
|
|
296
|
+
|
|
297
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
298
|
+
|
|
299
|
+
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
|
|
300
|
+
|
|
301
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
302
|
+
declare const inputGroupAddonAligns: {
|
|
303
|
+
readonly "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]";
|
|
304
|
+
readonly "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]";
|
|
305
|
+
readonly "block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5";
|
|
306
|
+
readonly "block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5";
|
|
307
|
+
};
|
|
308
|
+
type InputGroupAddonAlign = keyof typeof inputGroupAddonAligns;
|
|
309
|
+
interface InputGroupAddonProps extends React.ComponentProps<"div"> {
|
|
310
|
+
align?: InputGroupAddonAlign;
|
|
311
|
+
}
|
|
312
|
+
declare function InputGroupAddon({ className, align, ...props }: InputGroupAddonProps): React.JSX.Element;
|
|
313
|
+
declare const inputGroupButtonSizes: {
|
|
314
|
+
readonly xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2";
|
|
315
|
+
readonly sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5";
|
|
316
|
+
readonly "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0";
|
|
317
|
+
readonly "icon-sm": "size-8 p-0 has-[>svg]:p-0";
|
|
318
|
+
};
|
|
319
|
+
type InputGroupButtonSize = keyof typeof inputGroupButtonSizes;
|
|
320
|
+
interface InputGroupButtonProps extends Omit<ButtonProps, "size"> {
|
|
321
|
+
size?: InputGroupButtonSize;
|
|
322
|
+
}
|
|
323
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: InputGroupButtonProps): React.JSX.Element;
|
|
324
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
325
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
326
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
|
|
327
|
+
|
|
328
|
+
declare const separatorOrientations: {
|
|
329
|
+
readonly horizontal: "data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full";
|
|
330
|
+
readonly vertical: "data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px";
|
|
331
|
+
};
|
|
332
|
+
type SeparatorOrientation = keyof typeof separatorOrientations;
|
|
333
|
+
interface SeparatorProps extends React.ComponentProps<"div"> {
|
|
334
|
+
orientation?: SeparatorOrientation;
|
|
335
|
+
}
|
|
336
|
+
declare function Separator({ className, orientation, ...props }: SeparatorProps): React.JSX.Element;
|
|
337
|
+
|
|
338
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
339
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
340
|
+
declare const itemVariants: {
|
|
341
|
+
readonly default: "bg-transparent";
|
|
342
|
+
readonly outline: "border-border";
|
|
343
|
+
readonly muted: "bg-muted/50";
|
|
344
|
+
};
|
|
345
|
+
declare const itemSizes: {
|
|
346
|
+
readonly default: "p-4 gap-4 ";
|
|
347
|
+
readonly sm: "py-3 px-4 gap-2.5";
|
|
348
|
+
};
|
|
349
|
+
type ItemVariant = keyof typeof itemVariants;
|
|
350
|
+
type ItemSize = keyof typeof itemSizes;
|
|
351
|
+
interface ItemProps extends React.ComponentProps<"div"> {
|
|
352
|
+
variant?: ItemVariant;
|
|
353
|
+
size?: ItemSize;
|
|
354
|
+
asChild?: boolean;
|
|
355
|
+
}
|
|
356
|
+
declare function Item({ className, variant, size, asChild, ...props }: ItemProps): React.JSX.Element;
|
|
357
|
+
declare const itemMediaVariants: {
|
|
358
|
+
readonly default: "bg-transparent";
|
|
359
|
+
readonly icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4";
|
|
360
|
+
readonly image: "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover";
|
|
361
|
+
};
|
|
362
|
+
type ItemMediaVariant = keyof typeof itemMediaVariants;
|
|
363
|
+
interface ItemMediaProps extends React.ComponentProps<"div"> {
|
|
364
|
+
variant?: ItemMediaVariant;
|
|
365
|
+
}
|
|
366
|
+
declare function ItemMedia({ className, variant, ...props }: ItemMediaProps): React.JSX.Element;
|
|
367
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
368
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
369
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
370
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
371
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
372
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
373
|
+
|
|
374
|
+
declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): React.JSX.Element;
|
|
375
|
+
declare function KbdGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
376
|
+
|
|
377
|
+
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
378
|
+
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
379
|
+
declare function PaginationItem(props: React.ComponentProps<"li">): React.JSX.Element;
|
|
380
|
+
type PaginationLinkProps = {
|
|
381
|
+
isActive?: boolean;
|
|
382
|
+
size?: ButtonSize;
|
|
383
|
+
} & React.ComponentProps<"a">;
|
|
384
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
|
|
385
|
+
declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
|
386
|
+
declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
|
387
|
+
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
388
|
+
|
|
389
|
+
interface ProgressProps extends React.ComponentProps<"div"> {
|
|
390
|
+
value?: number;
|
|
391
|
+
}
|
|
392
|
+
declare function Progress({ className, value, ...props }: ProgressProps): React.JSX.Element;
|
|
393
|
+
|
|
394
|
+
declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
395
|
+
|
|
396
|
+
declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): React.JSX.Element;
|
|
397
|
+
|
|
398
|
+
declare function Table({ className, ...props }: React.ComponentProps<"table">): React.JSX.Element;
|
|
399
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
|
|
400
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
|
|
401
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): React.JSX.Element;
|
|
402
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): React.JSX.Element;
|
|
403
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): React.JSX.Element;
|
|
404
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): React.JSX.Element;
|
|
405
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): React.JSX.Element;
|
|
406
|
+
|
|
407
|
+
type AccordionType = "single" | "multiple";
|
|
408
|
+
interface AccordionProps extends Omit<React.ComponentProps<"div">, "onChange"> {
|
|
409
|
+
type?: AccordionType;
|
|
410
|
+
collapsible?: boolean;
|
|
411
|
+
value?: string[];
|
|
412
|
+
defaultValue?: string[];
|
|
413
|
+
onValueChange?: (value: string[]) => void;
|
|
414
|
+
}
|
|
415
|
+
declare function Accordion({ type, collapsible, value, defaultValue, onValueChange, children, ...props }: AccordionProps): React.JSX.Element;
|
|
416
|
+
interface AccordionItemProps extends React.ComponentProps<"div"> {
|
|
417
|
+
value: string;
|
|
418
|
+
}
|
|
419
|
+
declare function AccordionItem({ className, value, children, ...props }: AccordionItemProps): React.JSX.Element;
|
|
420
|
+
declare function AccordionTrigger({ className, children, onClick, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
421
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
422
|
+
|
|
423
|
+
interface CollapsibleProps extends React.ComponentProps<"div"> {
|
|
424
|
+
open?: boolean;
|
|
425
|
+
defaultOpen?: boolean;
|
|
426
|
+
onOpenChange?: (open: boolean) => void;
|
|
427
|
+
}
|
|
428
|
+
declare function Collapsible({ open, defaultOpen, onOpenChange, children, ...props }: CollapsibleProps): React.JSX.Element;
|
|
429
|
+
declare function CollapsibleTrigger({ onClick, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
430
|
+
declare function CollapsibleContent({ children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
431
|
+
|
|
432
|
+
type TabsOrientation = "horizontal" | "vertical";
|
|
433
|
+
interface TabsProps extends Omit<React.ComponentProps<"div">, "onChange"> {
|
|
434
|
+
value?: string;
|
|
435
|
+
defaultValue?: string;
|
|
436
|
+
onValueChange?: (value: string) => void;
|
|
437
|
+
orientation?: TabsOrientation;
|
|
438
|
+
}
|
|
439
|
+
declare function Tabs({ className, value, defaultValue, onValueChange, orientation, children, ...props }: TabsProps): React.JSX.Element;
|
|
440
|
+
declare function TabsList({ className, children, onKeyDown, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
441
|
+
interface TabsTriggerInternal {
|
|
442
|
+
__index?: number;
|
|
443
|
+
__isFocusItem?: boolean;
|
|
444
|
+
__onFocusItem?: () => void;
|
|
445
|
+
}
|
|
446
|
+
interface TabsTriggerProps extends React.ComponentProps<"button">, TabsTriggerInternal {
|
|
447
|
+
value: string;
|
|
448
|
+
}
|
|
449
|
+
declare function TabsTrigger({ className, value, onClick, onFocus, __isFocusItem, __onFocusItem, ...props }: TabsTriggerProps): React.JSX.Element;
|
|
450
|
+
interface TabsContentProps extends React.ComponentProps<"div"> {
|
|
451
|
+
value: string;
|
|
452
|
+
}
|
|
453
|
+
declare function TabsContent({ className, value, children, ...props }: TabsContentProps): React.JSX.Element | null;
|
|
454
|
+
|
|
455
|
+
declare const toggleVariantClasses: {
|
|
456
|
+
readonly default: "bg-transparent";
|
|
457
|
+
readonly outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground";
|
|
458
|
+
};
|
|
459
|
+
declare const toggleSizeClasses: {
|
|
460
|
+
readonly default: "h-9 px-2 min-w-9";
|
|
461
|
+
readonly sm: "h-8 px-1.5 min-w-8";
|
|
462
|
+
readonly lg: "h-10 px-2.5 min-w-10";
|
|
463
|
+
};
|
|
464
|
+
type ToggleVariant = keyof typeof toggleVariantClasses;
|
|
465
|
+
type ToggleSize = keyof typeof toggleSizeClasses;
|
|
466
|
+
interface ToggleVariantsOptions {
|
|
467
|
+
variant?: ToggleVariant;
|
|
468
|
+
size?: ToggleSize;
|
|
469
|
+
className?: string;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Returns the fused canonical toggle class string. Reused by `toggle-group` so
|
|
473
|
+
* its items adopt the same styling, mirroring Rust's `toggle_classes`.
|
|
474
|
+
*/
|
|
475
|
+
declare function toggleVariants({ variant, size, className, }?: ToggleVariantsOptions): string;
|
|
476
|
+
interface ToggleProps extends Omit<React.ComponentProps<"button">, "onChange"> {
|
|
477
|
+
variant?: ToggleVariant;
|
|
478
|
+
size?: ToggleSize;
|
|
479
|
+
pressed?: boolean;
|
|
480
|
+
defaultPressed?: boolean;
|
|
481
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
482
|
+
}
|
|
483
|
+
declare function Toggle({ className, variant, size, pressed, defaultPressed, onPressedChange, onClick, ...props }: ToggleProps): React.JSX.Element;
|
|
484
|
+
|
|
485
|
+
interface ToggleGroupProps extends Omit<React.ComponentProps<"div">, "onChange"> {
|
|
486
|
+
variant?: ToggleVariant;
|
|
487
|
+
size?: ToggleSize;
|
|
488
|
+
type?: "single" | "multiple";
|
|
489
|
+
value?: string | string[];
|
|
490
|
+
defaultValue?: string | string[];
|
|
491
|
+
onValueChange?: (value: string | string[]) => void;
|
|
492
|
+
}
|
|
493
|
+
declare function ToggleGroup({ className, variant, size, type, value, defaultValue, onValueChange, children, ...props }: ToggleGroupProps): React.JSX.Element;
|
|
494
|
+
interface ToggleGroupItemProps extends Omit<React.ComponentProps<"button">, "value" | "onChange"> {
|
|
495
|
+
value: string;
|
|
496
|
+
variant?: ToggleVariant;
|
|
497
|
+
size?: ToggleSize;
|
|
498
|
+
}
|
|
499
|
+
declare function ToggleGroupItem({ className, children, value, variant, size, onClick, ...props }: ToggleGroupItemProps): React.JSX.Element;
|
|
500
|
+
|
|
501
|
+
interface SwitchProps extends Omit<React.ComponentProps<"button">, "onChange"> {
|
|
502
|
+
checked?: boolean;
|
|
503
|
+
defaultChecked?: boolean;
|
|
504
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
505
|
+
}
|
|
506
|
+
declare function Switch({ className, checked, defaultChecked, onCheckedChange, onClick, disabled, ...props }: SwitchProps): React.JSX.Element;
|
|
507
|
+
|
|
508
|
+
interface CheckboxProps extends Omit<React.ComponentProps<"button">, "onChange"> {
|
|
509
|
+
checked?: boolean;
|
|
510
|
+
defaultChecked?: boolean;
|
|
511
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
512
|
+
}
|
|
513
|
+
declare function Checkbox({ className, checked, defaultChecked, onCheckedChange, onClick, disabled, ...props }: CheckboxProps): React.JSX.Element;
|
|
514
|
+
|
|
515
|
+
interface RadioGroupProps extends Omit<React.ComponentProps<"div">, "onChange"> {
|
|
516
|
+
value?: string;
|
|
517
|
+
defaultValue?: string;
|
|
518
|
+
onValueChange?: (value: string) => void;
|
|
519
|
+
}
|
|
520
|
+
declare function RadioGroup({ className, value, defaultValue, onValueChange, children, onKeyDown, ...props }: RadioGroupProps): React.JSX.Element;
|
|
521
|
+
interface RadioGroupItemProps extends Omit<React.ComponentProps<"button">, "value"> {
|
|
522
|
+
value: string;
|
|
523
|
+
}
|
|
524
|
+
declare function RadioGroupItem({ className, value, disabled, onClick, ...props }: RadioGroupItemProps): React.JSX.Element;
|
|
525
|
+
|
|
526
|
+
type Orientation = "horizontal" | "vertical";
|
|
527
|
+
interface SliderProps extends Omit<React.ComponentProps<"span">, "defaultValue" | "onChange"> {
|
|
528
|
+
value?: number;
|
|
529
|
+
defaultValue?: number;
|
|
530
|
+
onValueChange?: (value: number) => void;
|
|
531
|
+
min?: number;
|
|
532
|
+
max?: number;
|
|
533
|
+
step?: number;
|
|
534
|
+
orientation?: Orientation;
|
|
535
|
+
disabled?: boolean;
|
|
536
|
+
}
|
|
537
|
+
declare function Slider({ className, value, defaultValue, onValueChange, min, max, step, orientation, disabled, ...props }: SliderProps): React.JSX.Element;
|
|
538
|
+
|
|
539
|
+
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
540
|
+
interface ScrollBarProps extends React.ComponentProps<"div"> {
|
|
541
|
+
orientation?: "vertical" | "horizontal";
|
|
542
|
+
}
|
|
543
|
+
declare function ScrollBar({ className, orientation, ...props }: ScrollBarProps): React.JSX.Element;
|
|
544
|
+
|
|
545
|
+
interface SidebarContextValue {
|
|
546
|
+
state: "expanded" | "collapsed";
|
|
547
|
+
open: boolean;
|
|
548
|
+
setOpen: (open: boolean) => void;
|
|
549
|
+
toggleSidebar: () => void;
|
|
550
|
+
}
|
|
551
|
+
declare function useSidebar(): SidebarContextValue;
|
|
552
|
+
interface SidebarProviderProps extends React.ComponentProps<"div"> {
|
|
553
|
+
defaultOpen?: boolean;
|
|
554
|
+
open?: boolean;
|
|
555
|
+
onOpenChange?: (open: boolean) => void;
|
|
556
|
+
}
|
|
557
|
+
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange, className, style, children, ...props }: SidebarProviderProps): React.JSX.Element;
|
|
558
|
+
interface SidebarProps extends React.ComponentProps<"div"> {
|
|
559
|
+
side?: "left" | "right";
|
|
560
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
561
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
562
|
+
}
|
|
563
|
+
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: SidebarProps): React.JSX.Element;
|
|
564
|
+
declare function SidebarTrigger({ className, onClick, children, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
565
|
+
declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
566
|
+
declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;
|
|
567
|
+
declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
568
|
+
declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
569
|
+
declare function SidebarSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
570
|
+
declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
571
|
+
declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
572
|
+
interface SidebarGroupLabelProps extends React.ComponentProps<"div"> {
|
|
573
|
+
asChild?: boolean;
|
|
574
|
+
}
|
|
575
|
+
declare function SidebarGroupLabel({ className, asChild, ...props }: SidebarGroupLabelProps): React.JSX.Element;
|
|
576
|
+
declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
577
|
+
declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
578
|
+
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
579
|
+
declare const sidebarMenuButtonVariantClasses: {
|
|
580
|
+
readonly default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground";
|
|
581
|
+
readonly outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]";
|
|
582
|
+
};
|
|
583
|
+
declare const sidebarMenuButtonSizeClasses: {
|
|
584
|
+
readonly default: "h-8 text-sm";
|
|
585
|
+
readonly sm: "h-7 text-xs";
|
|
586
|
+
readonly lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!";
|
|
587
|
+
};
|
|
588
|
+
type SidebarMenuButtonVariant = keyof typeof sidebarMenuButtonVariantClasses;
|
|
589
|
+
type SidebarMenuButtonSize = keyof typeof sidebarMenuButtonSizeClasses;
|
|
590
|
+
interface SidebarMenuButtonProps extends React.ComponentProps<"button"> {
|
|
591
|
+
asChild?: boolean;
|
|
592
|
+
isActive?: boolean;
|
|
593
|
+
variant?: SidebarMenuButtonVariant;
|
|
594
|
+
size?: SidebarMenuButtonSize;
|
|
595
|
+
}
|
|
596
|
+
declare function SidebarMenuButton({ asChild, isActive, variant, size, className, ...props }: SidebarMenuButtonProps): React.JSX.Element;
|
|
597
|
+
|
|
598
|
+
type CarouselOrientation = "horizontal" | "vertical";
|
|
599
|
+
interface CarouselProps extends React.ComponentProps<"div"> {
|
|
600
|
+
orientation?: CarouselOrientation;
|
|
601
|
+
index?: number;
|
|
602
|
+
defaultIndex?: number;
|
|
603
|
+
onIndexChange?: (index: number) => void;
|
|
604
|
+
}
|
|
605
|
+
declare function Carousel({ orientation, index: indexProp, defaultIndex, onIndexChange, className, children, onKeyDown, ...props }: CarouselProps): React.JSX.Element;
|
|
606
|
+
declare function CarouselContent({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
607
|
+
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
608
|
+
declare function CarouselPrevious({ className, variant, size, ...props }: ButtonProps): React.JSX.Element;
|
|
609
|
+
declare function CarouselNext({ className, variant, size, ...props }: ButtonProps): React.JSX.Element;
|
|
610
|
+
|
|
611
|
+
interface InputOTPProps extends Omit<React.ComponentProps<"input">, "value" | "defaultValue" | "onChange"> {
|
|
612
|
+
maxLength: number;
|
|
613
|
+
value?: string;
|
|
614
|
+
defaultValue?: string;
|
|
615
|
+
onChange?: (value: string) => void;
|
|
616
|
+
containerClassName?: string;
|
|
617
|
+
children?: React.ReactNode;
|
|
618
|
+
}
|
|
619
|
+
declare function InputOTP({ maxLength, value: valueProp, defaultValue, onChange, className, containerClassName, children, disabled, ...props }: InputOTPProps): React.JSX.Element;
|
|
620
|
+
declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
621
|
+
interface InputOTPSlotProps extends React.ComponentProps<"div"> {
|
|
622
|
+
index: number;
|
|
623
|
+
}
|
|
624
|
+
declare function InputOTPSlot({ index, className, ...props }: InputOTPSlotProps): React.JSX.Element;
|
|
625
|
+
declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
626
|
+
|
|
627
|
+
interface TooltipProviderProps {
|
|
628
|
+
children?: React.ReactNode;
|
|
629
|
+
}
|
|
630
|
+
declare function TooltipProvider({ children }: TooltipProviderProps): React.JSX.Element;
|
|
631
|
+
interface TooltipProps {
|
|
632
|
+
open?: boolean;
|
|
633
|
+
defaultOpen?: boolean;
|
|
634
|
+
onOpenChange?: (open: boolean) => void;
|
|
635
|
+
children?: React.ReactNode;
|
|
636
|
+
}
|
|
637
|
+
declare function Tooltip({ open, defaultOpen, onOpenChange, children }: TooltipProps): React.JSX.Element;
|
|
638
|
+
interface TooltipTriggerProps extends React.ComponentProps<"button"> {
|
|
639
|
+
asChild?: boolean;
|
|
640
|
+
}
|
|
641
|
+
declare function TooltipTrigger({ asChild, onPointerEnter, onPointerLeave, onFocus, onBlur, ...props }: TooltipTriggerProps): React.JSX.Element;
|
|
642
|
+
interface TooltipContentProps extends React.ComponentProps<"div"> {
|
|
643
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
644
|
+
sideOffset?: number;
|
|
645
|
+
}
|
|
646
|
+
declare function TooltipContent({ className, side: sideProp, sideOffset, children, ...props }: TooltipContentProps): React.JSX.Element | null;
|
|
647
|
+
|
|
648
|
+
interface PopoverProps {
|
|
649
|
+
open?: boolean;
|
|
650
|
+
defaultOpen?: boolean;
|
|
651
|
+
onOpenChange?: (open: boolean) => void;
|
|
652
|
+
children?: React.ReactNode;
|
|
653
|
+
}
|
|
654
|
+
declare function Popover({ open, defaultOpen, onOpenChange, children }: PopoverProps): React.JSX.Element;
|
|
655
|
+
interface PopoverTriggerProps extends React.ComponentProps<"button"> {
|
|
656
|
+
asChild?: boolean;
|
|
657
|
+
}
|
|
658
|
+
declare function PopoverTrigger({ asChild, onClick, ...props }: PopoverTriggerProps): React.JSX.Element;
|
|
659
|
+
interface PopoverAnchorProps extends React.ComponentProps<"div"> {
|
|
660
|
+
asChild?: boolean;
|
|
661
|
+
}
|
|
662
|
+
declare function PopoverAnchor({ asChild, ...props }: PopoverAnchorProps): React.JSX.Element;
|
|
663
|
+
interface PopoverContentProps extends React.ComponentProps<"div"> {
|
|
664
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
665
|
+
align?: "start" | "center" | "end";
|
|
666
|
+
sideOffset?: number;
|
|
667
|
+
}
|
|
668
|
+
declare function PopoverContent({ className, side: sideProp, align, sideOffset, children, ...props }: PopoverContentProps): React.JSX.Element | null;
|
|
669
|
+
|
|
670
|
+
interface HoverCardProps {
|
|
671
|
+
open?: boolean;
|
|
672
|
+
defaultOpen?: boolean;
|
|
673
|
+
onOpenChange?: (open: boolean) => void;
|
|
674
|
+
children?: React.ReactNode;
|
|
675
|
+
}
|
|
676
|
+
declare function HoverCard({ open, defaultOpen, onOpenChange, children }: HoverCardProps): React.JSX.Element;
|
|
677
|
+
interface HoverCardTriggerProps extends React.ComponentProps<"a"> {
|
|
678
|
+
asChild?: boolean;
|
|
679
|
+
}
|
|
680
|
+
declare function HoverCardTrigger({ asChild, onPointerEnter, onPointerLeave, ...props }: HoverCardTriggerProps): React.JSX.Element;
|
|
681
|
+
interface HoverCardContentProps extends React.ComponentProps<"div"> {
|
|
682
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
683
|
+
align?: "start" | "center" | "end";
|
|
684
|
+
sideOffset?: number;
|
|
685
|
+
}
|
|
686
|
+
declare function HoverCardContent({ className, side: sideProp, align, sideOffset, children, ...props }: HoverCardContentProps): React.JSX.Element | null;
|
|
687
|
+
|
|
688
|
+
interface DropdownMenuProps {
|
|
689
|
+
open?: boolean;
|
|
690
|
+
defaultOpen?: boolean;
|
|
691
|
+
onOpenChange?: (open: boolean) => void;
|
|
692
|
+
children?: React.ReactNode;
|
|
693
|
+
}
|
|
694
|
+
declare function DropdownMenu({ open, defaultOpen, onOpenChange, children }: DropdownMenuProps): React.JSX.Element;
|
|
695
|
+
declare function DropdownMenuPortal({ children }: {
|
|
696
|
+
children?: React.ReactNode;
|
|
697
|
+
}): React.JSX.Element;
|
|
698
|
+
interface DropdownMenuTriggerProps extends React.ComponentProps<"button"> {
|
|
699
|
+
asChild?: boolean;
|
|
700
|
+
}
|
|
701
|
+
declare function DropdownMenuTrigger({ asChild, onClick, ...props }: DropdownMenuTriggerProps): React.JSX.Element;
|
|
702
|
+
interface DropdownMenuContentProps extends React.ComponentProps<"div"> {
|
|
703
|
+
sideOffset?: number;
|
|
704
|
+
}
|
|
705
|
+
declare function DropdownMenuContent({ className, sideOffset, children, ...props }: DropdownMenuContentProps): React.JSX.Element | null;
|
|
706
|
+
declare function DropdownMenuGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
707
|
+
interface DropdownMenuItemProps extends React.ComponentProps<"div"> {
|
|
708
|
+
inset?: boolean;
|
|
709
|
+
variant?: "default" | "destructive";
|
|
710
|
+
disabled?: boolean;
|
|
711
|
+
}
|
|
712
|
+
declare function DropdownMenuItem({ className, inset, variant, disabled, onClick, onKeyDown, ...props }: DropdownMenuItemProps): React.JSX.Element;
|
|
713
|
+
interface DropdownMenuCheckboxItemProps extends React.ComponentProps<"div"> {
|
|
714
|
+
checked?: boolean;
|
|
715
|
+
disabled?: boolean;
|
|
716
|
+
}
|
|
717
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, disabled, onClick, ...props }: DropdownMenuCheckboxItemProps): React.JSX.Element;
|
|
718
|
+
interface DropdownMenuRadioGroupProps extends Omit<React.ComponentProps<"div">, "onChange"> {
|
|
719
|
+
value?: string;
|
|
720
|
+
onValueChange?: (value: string) => void;
|
|
721
|
+
}
|
|
722
|
+
declare function DropdownMenuRadioGroup({ className, value, onValueChange, children, ...props }: DropdownMenuRadioGroupProps): React.JSX.Element;
|
|
723
|
+
interface DropdownMenuRadioItemProps extends React.ComponentProps<"div"> {
|
|
724
|
+
value: string;
|
|
725
|
+
disabled?: boolean;
|
|
726
|
+
}
|
|
727
|
+
declare function DropdownMenuRadioItem({ className, children, value, disabled, onClick, ...props }: DropdownMenuRadioItemProps): React.JSX.Element;
|
|
728
|
+
interface DropdownMenuLabelProps extends React.ComponentProps<"div"> {
|
|
729
|
+
inset?: boolean;
|
|
730
|
+
}
|
|
731
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps): React.JSX.Element;
|
|
732
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
733
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
734
|
+
interface DropdownMenuSubProps {
|
|
735
|
+
open?: boolean;
|
|
736
|
+
defaultOpen?: boolean;
|
|
737
|
+
onOpenChange?: (open: boolean) => void;
|
|
738
|
+
children?: React.ReactNode;
|
|
739
|
+
}
|
|
740
|
+
declare function DropdownMenuSub({ open, defaultOpen, onOpenChange, children }: DropdownMenuSubProps): React.JSX.Element;
|
|
741
|
+
interface DropdownMenuSubTriggerProps extends React.ComponentProps<"div"> {
|
|
742
|
+
inset?: boolean;
|
|
743
|
+
}
|
|
744
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, onClick, ...props }: DropdownMenuSubTriggerProps): React.JSX.Element;
|
|
745
|
+
declare function DropdownMenuSubContent({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
746
|
+
|
|
747
|
+
interface ContextMenuProps {
|
|
748
|
+
open?: boolean;
|
|
749
|
+
defaultOpen?: boolean;
|
|
750
|
+
onOpenChange?: (open: boolean) => void;
|
|
751
|
+
children?: React.ReactNode;
|
|
752
|
+
}
|
|
753
|
+
declare function ContextMenu({ open, defaultOpen, onOpenChange, children }: ContextMenuProps): React.JSX.Element;
|
|
754
|
+
declare function ContextMenuPortal({ children }: {
|
|
755
|
+
children?: React.ReactNode;
|
|
756
|
+
}): React.JSX.Element;
|
|
757
|
+
interface ContextMenuTriggerProps extends React.ComponentProps<"div"> {
|
|
758
|
+
asChild?: boolean;
|
|
759
|
+
}
|
|
760
|
+
declare function ContextMenuTrigger({ asChild, onContextMenu, ...props }: ContextMenuTriggerProps): React.JSX.Element;
|
|
761
|
+
declare function ContextMenuGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
762
|
+
declare function ContextMenuContent({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
763
|
+
interface ContextMenuItemProps extends React.ComponentProps<"div"> {
|
|
764
|
+
inset?: boolean;
|
|
765
|
+
variant?: "default" | "destructive";
|
|
766
|
+
disabled?: boolean;
|
|
767
|
+
}
|
|
768
|
+
declare function ContextMenuItem({ className, inset, variant, disabled, onClick, onKeyDown, ...props }: ContextMenuItemProps): React.JSX.Element;
|
|
769
|
+
interface ContextMenuCheckboxItemProps extends React.ComponentProps<"div"> {
|
|
770
|
+
checked?: boolean;
|
|
771
|
+
disabled?: boolean;
|
|
772
|
+
}
|
|
773
|
+
declare function ContextMenuCheckboxItem({ className, children, checked, disabled, onClick, ...props }: ContextMenuCheckboxItemProps): React.JSX.Element;
|
|
774
|
+
interface ContextMenuRadioGroupProps extends Omit<React.ComponentProps<"div">, "onChange"> {
|
|
775
|
+
value?: string;
|
|
776
|
+
onValueChange?: (value: string) => void;
|
|
777
|
+
}
|
|
778
|
+
declare function ContextMenuRadioGroup({ className, value, onValueChange, children, ...props }: ContextMenuRadioGroupProps): React.JSX.Element;
|
|
779
|
+
interface ContextMenuRadioItemProps extends React.ComponentProps<"div"> {
|
|
780
|
+
value: string;
|
|
781
|
+
disabled?: boolean;
|
|
782
|
+
}
|
|
783
|
+
declare function ContextMenuRadioItem({ className, children, value, disabled, onClick, ...props }: ContextMenuRadioItemProps): React.JSX.Element;
|
|
784
|
+
interface ContextMenuLabelProps extends React.ComponentProps<"div"> {
|
|
785
|
+
inset?: boolean;
|
|
786
|
+
}
|
|
787
|
+
declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuLabelProps): React.JSX.Element;
|
|
788
|
+
declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
789
|
+
declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
790
|
+
interface ContextMenuSubProps {
|
|
791
|
+
open?: boolean;
|
|
792
|
+
defaultOpen?: boolean;
|
|
793
|
+
onOpenChange?: (open: boolean) => void;
|
|
794
|
+
children?: React.ReactNode;
|
|
795
|
+
}
|
|
796
|
+
declare function ContextMenuSub({ open, defaultOpen, onOpenChange, children }: ContextMenuSubProps): React.JSX.Element;
|
|
797
|
+
interface ContextMenuSubTriggerProps extends React.ComponentProps<"div"> {
|
|
798
|
+
inset?: boolean;
|
|
799
|
+
}
|
|
800
|
+
declare function ContextMenuSubTrigger({ className, inset, children, onClick, ...props }: ContextMenuSubTriggerProps): React.JSX.Element;
|
|
801
|
+
declare function ContextMenuSubContent({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
802
|
+
|
|
803
|
+
declare function Menubar({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
804
|
+
interface MenubarMenuProps {
|
|
805
|
+
open?: boolean;
|
|
806
|
+
defaultOpen?: boolean;
|
|
807
|
+
onOpenChange?: (open: boolean) => void;
|
|
808
|
+
children?: React.ReactNode;
|
|
809
|
+
}
|
|
810
|
+
declare function MenubarMenu({ open, defaultOpen, onOpenChange, children }: MenubarMenuProps): React.JSX.Element;
|
|
811
|
+
declare function MenubarTrigger({ className, onClick, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
812
|
+
declare function MenubarContent({ className, children, align, ...props }: React.ComponentProps<"div"> & {
|
|
813
|
+
align?: "start" | "center" | "end";
|
|
814
|
+
}): React.JSX.Element | null;
|
|
815
|
+
declare function MenubarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
816
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<"div"> & {
|
|
817
|
+
inset?: boolean;
|
|
818
|
+
variant?: "default" | "destructive";
|
|
819
|
+
}): React.JSX.Element;
|
|
820
|
+
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<"div"> & {
|
|
821
|
+
checked?: boolean;
|
|
822
|
+
}): React.JSX.Element;
|
|
823
|
+
interface MenubarRadioGroupProps {
|
|
824
|
+
value?: string;
|
|
825
|
+
defaultValue?: string;
|
|
826
|
+
onValueChange?: (value: string) => void;
|
|
827
|
+
className?: string;
|
|
828
|
+
children?: React.ReactNode;
|
|
829
|
+
}
|
|
830
|
+
declare function MenubarRadioGroup({ value, defaultValue, onValueChange, className, children, }: MenubarRadioGroupProps): React.JSX.Element;
|
|
831
|
+
declare function MenubarRadioItem({ className, children, value, ...props }: React.ComponentProps<"div"> & {
|
|
832
|
+
value: string;
|
|
833
|
+
}): React.JSX.Element;
|
|
834
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<"div"> & {
|
|
835
|
+
inset?: boolean;
|
|
836
|
+
}): React.JSX.Element;
|
|
837
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
838
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
839
|
+
interface MenubarSubProps {
|
|
840
|
+
open?: boolean;
|
|
841
|
+
defaultOpen?: boolean;
|
|
842
|
+
onOpenChange?: (open: boolean) => void;
|
|
843
|
+
children?: React.ReactNode;
|
|
844
|
+
}
|
|
845
|
+
declare function MenubarSub({ open, defaultOpen, onOpenChange, children }: MenubarSubProps): React.JSX.Element;
|
|
846
|
+
declare function MenubarSubTrigger({ className, inset, children, onClick, ...props }: React.ComponentProps<"div"> & {
|
|
847
|
+
inset?: boolean;
|
|
848
|
+
}): React.JSX.Element;
|
|
849
|
+
declare function MenubarSubContent({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Fused canonical trigger class string, the mirror of Rust's
|
|
853
|
+
* `navigation_menu_trigger_style()`. Reuse it to style a plain link the same way
|
|
854
|
+
* a `NavigationMenuTrigger` is styled.
|
|
855
|
+
*/
|
|
856
|
+
declare function navigationMenuTriggerStyle(): string;
|
|
857
|
+
declare function NavigationMenu({ className, children, viewport, ...props }: React.ComponentProps<"nav"> & {
|
|
858
|
+
viewport?: boolean;
|
|
859
|
+
}): React.JSX.Element;
|
|
860
|
+
declare function NavigationMenuList({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
861
|
+
interface NavigationMenuItemProps extends React.ComponentProps<"li"> {
|
|
862
|
+
open?: boolean;
|
|
863
|
+
defaultOpen?: boolean;
|
|
864
|
+
onOpenChange?: (open: boolean) => void;
|
|
865
|
+
}
|
|
866
|
+
declare function NavigationMenuItem({ className, open, defaultOpen, onOpenChange, children, ...props }: NavigationMenuItemProps): React.JSX.Element;
|
|
867
|
+
declare function NavigationMenuTrigger({ className, children, onClick, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
868
|
+
declare function NavigationMenuContent({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
869
|
+
declare function NavigationMenuViewport({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
870
|
+
declare function NavigationMenuLink({ className, asChild, ...props }: React.ComponentProps<"a"> & {
|
|
871
|
+
asChild?: boolean;
|
|
872
|
+
}): React.JSX.Element;
|
|
873
|
+
declare function NavigationMenuIndicator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
874
|
+
|
|
875
|
+
interface DialogProps {
|
|
876
|
+
open?: boolean;
|
|
877
|
+
defaultOpen?: boolean;
|
|
878
|
+
onOpenChange?: (open: boolean) => void;
|
|
879
|
+
children?: React.ReactNode;
|
|
880
|
+
}
|
|
881
|
+
declare function Dialog({ open, defaultOpen, onOpenChange, children }: DialogProps): React.JSX.Element;
|
|
882
|
+
interface DialogTriggerProps extends React.ComponentProps<"button"> {
|
|
883
|
+
asChild?: boolean;
|
|
884
|
+
}
|
|
885
|
+
declare function DialogTrigger({ asChild, onClick, ...props }: DialogTriggerProps): React.JSX.Element;
|
|
886
|
+
type DialogPortalProps = {
|
|
887
|
+
children?: React.ReactNode;
|
|
888
|
+
};
|
|
889
|
+
declare function DialogPortal({ children }: DialogPortalProps): React.JSX.Element;
|
|
890
|
+
interface DialogOverlayProps extends React.ComponentProps<"div"> {
|
|
891
|
+
}
|
|
892
|
+
declare function DialogOverlay({ className, ...props }: DialogOverlayProps): React.JSX.Element;
|
|
893
|
+
interface DialogContentProps extends React.ComponentProps<"div"> {
|
|
894
|
+
showCloseButton?: boolean;
|
|
895
|
+
}
|
|
896
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: DialogContentProps): React.JSX.Element | null;
|
|
897
|
+
interface DialogCloseProps extends React.ComponentProps<"button"> {
|
|
898
|
+
asChild?: boolean;
|
|
899
|
+
}
|
|
900
|
+
declare function DialogClose({ asChild, onClick, ...props }: DialogCloseProps): React.JSX.Element;
|
|
901
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
902
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
903
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
|
|
904
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
905
|
+
|
|
906
|
+
interface AlertDialogProps {
|
|
907
|
+
open?: boolean;
|
|
908
|
+
defaultOpen?: boolean;
|
|
909
|
+
onOpenChange?: (open: boolean) => void;
|
|
910
|
+
children?: React.ReactNode;
|
|
911
|
+
}
|
|
912
|
+
declare function AlertDialog({ open, defaultOpen, onOpenChange, children }: AlertDialogProps): React.JSX.Element;
|
|
913
|
+
interface AlertDialogTriggerProps extends React.ComponentProps<"button"> {
|
|
914
|
+
asChild?: boolean;
|
|
915
|
+
}
|
|
916
|
+
declare function AlertDialogTrigger({ asChild, onClick, ...props }: AlertDialogTriggerProps): React.JSX.Element;
|
|
917
|
+
interface AlertDialogOverlayProps extends React.ComponentProps<"div"> {
|
|
918
|
+
}
|
|
919
|
+
declare function AlertDialogOverlay({ className, ...props }: AlertDialogOverlayProps): React.JSX.Element;
|
|
920
|
+
interface AlertDialogContentProps extends React.ComponentProps<"div"> {
|
|
921
|
+
}
|
|
922
|
+
declare function AlertDialogContent({ className, children, ...props }: AlertDialogContentProps): React.JSX.Element | null;
|
|
923
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
924
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
925
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
|
|
926
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
927
|
+
interface AlertDialogActionProps extends React.ComponentProps<"button"> {
|
|
928
|
+
}
|
|
929
|
+
declare function AlertDialogAction({ className, onClick, ...props }: AlertDialogActionProps): React.JSX.Element;
|
|
930
|
+
interface AlertDialogCancelProps extends React.ComponentProps<"button"> {
|
|
931
|
+
}
|
|
932
|
+
declare function AlertDialogCancel({ className, onClick, ...props }: AlertDialogCancelProps): React.JSX.Element;
|
|
933
|
+
|
|
934
|
+
interface SheetProps {
|
|
935
|
+
open?: boolean;
|
|
936
|
+
defaultOpen?: boolean;
|
|
937
|
+
onOpenChange?: (open: boolean) => void;
|
|
938
|
+
children?: React.ReactNode;
|
|
939
|
+
}
|
|
940
|
+
declare function Sheet({ open, defaultOpen, onOpenChange, children }: SheetProps): React.JSX.Element;
|
|
941
|
+
interface SheetTriggerProps extends React.ComponentProps<"button"> {
|
|
942
|
+
asChild?: boolean;
|
|
943
|
+
}
|
|
944
|
+
declare function SheetTrigger({ asChild, onClick, ...props }: SheetTriggerProps): React.JSX.Element;
|
|
945
|
+
interface SheetOverlayProps extends React.ComponentProps<"div"> {
|
|
946
|
+
}
|
|
947
|
+
declare function SheetOverlay({ className, ...props }: SheetOverlayProps): React.JSX.Element;
|
|
948
|
+
interface SheetContentProps extends React.ComponentProps<"div"> {
|
|
949
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
950
|
+
}
|
|
951
|
+
declare function SheetContent({ className, children, side, ...props }: SheetContentProps): React.JSX.Element | null;
|
|
952
|
+
interface SheetCloseProps extends React.ComponentProps<"button"> {
|
|
953
|
+
asChild?: boolean;
|
|
954
|
+
}
|
|
955
|
+
declare function SheetClose({ asChild, onClick, ...props }: SheetCloseProps): React.JSX.Element;
|
|
956
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
957
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
958
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
|
|
959
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
960
|
+
|
|
961
|
+
type DrawerDirection = "top" | "bottom" | "left" | "right";
|
|
962
|
+
interface DrawerProps {
|
|
963
|
+
open?: boolean;
|
|
964
|
+
defaultOpen?: boolean;
|
|
965
|
+
onOpenChange?: (open: boolean) => void;
|
|
966
|
+
direction?: DrawerDirection;
|
|
967
|
+
children?: React.ReactNode;
|
|
968
|
+
}
|
|
969
|
+
declare function Drawer({ open, defaultOpen, onOpenChange, direction, children, }: DrawerProps): React.JSX.Element;
|
|
970
|
+
interface DrawerTriggerProps extends React.ComponentProps<"button"> {
|
|
971
|
+
asChild?: boolean;
|
|
972
|
+
}
|
|
973
|
+
declare function DrawerTrigger({ asChild, onClick, ...props }: DrawerTriggerProps): React.JSX.Element;
|
|
974
|
+
interface DrawerCloseProps extends React.ComponentProps<"button"> {
|
|
975
|
+
asChild?: boolean;
|
|
976
|
+
}
|
|
977
|
+
declare function DrawerClose({ asChild, onClick, ...props }: DrawerCloseProps): React.JSX.Element;
|
|
978
|
+
declare function DrawerOverlay({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
979
|
+
declare function DrawerContent({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
980
|
+
declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
981
|
+
declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
982
|
+
declare function DrawerTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
983
|
+
declare function DrawerDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
984
|
+
|
|
985
|
+
interface SelectProps {
|
|
986
|
+
value?: string;
|
|
987
|
+
defaultValue?: string;
|
|
988
|
+
onValueChange?: (value: string) => void;
|
|
989
|
+
open?: boolean;
|
|
990
|
+
defaultOpen?: boolean;
|
|
991
|
+
onOpenChange?: (open: boolean) => void;
|
|
992
|
+
children?: React.ReactNode;
|
|
993
|
+
}
|
|
994
|
+
declare function Select({ value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, children, }: SelectProps): React.JSX.Element;
|
|
995
|
+
interface SelectTriggerProps extends React.ComponentProps<"button"> {
|
|
996
|
+
size?: "sm" | "default";
|
|
997
|
+
}
|
|
998
|
+
declare function SelectTrigger({ className, size, onClick, children, ...props }: SelectTriggerProps): React.JSX.Element;
|
|
999
|
+
interface SelectValueProps extends React.ComponentProps<"span"> {
|
|
1000
|
+
placeholder?: string;
|
|
1001
|
+
}
|
|
1002
|
+
declare function SelectValue({ className, placeholder, ...props }: SelectValueProps): React.JSX.Element;
|
|
1003
|
+
interface SelectContentProps extends React.ComponentProps<"div"> {
|
|
1004
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
1005
|
+
align?: "start" | "center" | "end";
|
|
1006
|
+
sideOffset?: number;
|
|
1007
|
+
}
|
|
1008
|
+
declare function SelectContent({ className, side: sideProp, align, sideOffset, children, ...props }: SelectContentProps): React.JSX.Element | null;
|
|
1009
|
+
interface SelectItemContext {
|
|
1010
|
+
__index?: number;
|
|
1011
|
+
__active?: boolean;
|
|
1012
|
+
__setActive?: (i: number) => void;
|
|
1013
|
+
}
|
|
1014
|
+
interface SelectItemProps extends React.ComponentProps<"div">, SelectItemContext {
|
|
1015
|
+
value: string;
|
|
1016
|
+
}
|
|
1017
|
+
declare function SelectItem({ className, value, children, __index, __active, __setActive, ...props }: SelectItemProps): React.JSX.Element;
|
|
1018
|
+
declare function SelectGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
1019
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
1020
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
1021
|
+
|
|
1022
|
+
interface CommandProps extends React.ComponentProps<"div"> {
|
|
1023
|
+
search?: string;
|
|
1024
|
+
defaultSearch?: string;
|
|
1025
|
+
onSearchChange?: (search: string) => void;
|
|
1026
|
+
}
|
|
1027
|
+
declare function Command({ className, search, defaultSearch, onSearchChange, children, ...props }: CommandProps): React.JSX.Element;
|
|
1028
|
+
interface CommandDialogProps {
|
|
1029
|
+
open?: boolean;
|
|
1030
|
+
defaultOpen?: boolean;
|
|
1031
|
+
onOpenChange?: (open: boolean) => void;
|
|
1032
|
+
className?: string;
|
|
1033
|
+
children?: React.ReactNode;
|
|
1034
|
+
}
|
|
1035
|
+
declare function CommandDialog({ open, defaultOpen, onOpenChange, className, children, }: CommandDialogProps): React.JSX.Element | null;
|
|
1036
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
1037
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
1038
|
+
declare function CommandEmpty({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
1039
|
+
interface CommandGroupProps extends React.ComponentProps<"div"> {
|
|
1040
|
+
heading?: string;
|
|
1041
|
+
}
|
|
1042
|
+
declare function CommandGroup({ className, heading, children, ...props }: CommandGroupProps): React.JSX.Element;
|
|
1043
|
+
interface CommandItemProps extends Omit<React.ComponentProps<"div">, "onSelect"> {
|
|
1044
|
+
value: string;
|
|
1045
|
+
disabled?: boolean;
|
|
1046
|
+
onSelect?: (value: string) => void;
|
|
1047
|
+
}
|
|
1048
|
+
declare function CommandItem({ className, value, disabled, onSelect, children, ...props }: CommandItemProps): React.JSX.Element | null;
|
|
1049
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
1050
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
1051
|
+
|
|
1052
|
+
type ChartConfig = {
|
|
1053
|
+
[k in string]: {
|
|
1054
|
+
label?: React.ReactNode;
|
|
1055
|
+
color?: string;
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1058
|
+
declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<"div"> & {
|
|
1059
|
+
config: ChartConfig;
|
|
1060
|
+
}): React.JSX.Element;
|
|
1061
|
+
declare const ChartStyle: ({ id, config }: {
|
|
1062
|
+
id: string;
|
|
1063
|
+
config: ChartConfig;
|
|
1064
|
+
}) => React.JSX.Element | null;
|
|
1065
|
+
type ChartItem = {
|
|
1066
|
+
label?: React.ReactNode;
|
|
1067
|
+
value?: React.ReactNode;
|
|
1068
|
+
color?: string;
|
|
1069
|
+
};
|
|
1070
|
+
declare const ChartTooltip: ({ children }: {
|
|
1071
|
+
children?: React.ReactNode;
|
|
1072
|
+
}) => React.JSX.Element;
|
|
1073
|
+
declare function ChartTooltipContent({ className, items, label, hideLabel, hideIndicator, labelClassName, }: React.ComponentProps<"div"> & {
|
|
1074
|
+
items?: ChartItem[];
|
|
1075
|
+
label?: React.ReactNode;
|
|
1076
|
+
hideLabel?: boolean;
|
|
1077
|
+
hideIndicator?: boolean;
|
|
1078
|
+
labelClassName?: string;
|
|
1079
|
+
}): React.JSX.Element | null;
|
|
1080
|
+
declare const ChartLegend: ({ children }: {
|
|
1081
|
+
children?: React.ReactNode;
|
|
1082
|
+
}) => React.JSX.Element;
|
|
1083
|
+
declare function ChartLegendContent({ className, hideIcon, items, }: React.ComponentProps<"div"> & {
|
|
1084
|
+
hideIcon?: boolean;
|
|
1085
|
+
items?: ChartItem[];
|
|
1086
|
+
}): React.JSX.Element | null;
|
|
1087
|
+
|
|
1088
|
+
interface CalendarProps {
|
|
1089
|
+
/** The currently selected day, if any. */
|
|
1090
|
+
selected?: Date;
|
|
1091
|
+
/** Fired with the day a user activates. */
|
|
1092
|
+
onSelect?: (date: Date) => void;
|
|
1093
|
+
/** Controlled displayed month (any day in it is fine). */
|
|
1094
|
+
month?: Date;
|
|
1095
|
+
/** Uncontrolled initial displayed month. */
|
|
1096
|
+
defaultMonth?: Date;
|
|
1097
|
+
/** Fired when the displayed month changes via the nav buttons. */
|
|
1098
|
+
onMonthChange?: (month: Date) => void;
|
|
1099
|
+
/** "Today", highlighted in the grid; defaults to the real current date. */
|
|
1100
|
+
today?: Date;
|
|
1101
|
+
className?: string;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* A dep-light single-month, single-date picker. Mirrors the landing `Calendar`'s
|
|
1105
|
+
* class names while replacing `react-day-picker` with a hand-rolled month grid.
|
|
1106
|
+
* Uses the built-in `Date` (a language built-in, not a dependency) for the date
|
|
1107
|
+
* math; the Rust mirror does the same math by hand.
|
|
1108
|
+
*
|
|
1109
|
+
* Simplifications versus the source: one month only (no multi-month), a single
|
|
1110
|
+
* selected date (no range/multi), and none of the locale/dropdown/caption
|
|
1111
|
+
* features — see the package README.
|
|
1112
|
+
*/
|
|
1113
|
+
declare function Calendar({ selected, onSelect, month, defaultMonth, onMonthChange, today, className, }: CalendarProps): React.JSX.Element;
|
|
1114
|
+
|
|
1115
|
+
type ToastVariant = "default" | "success" | "error" | "info" | "warning";
|
|
1116
|
+
type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
1117
|
+
interface ToastOptions {
|
|
1118
|
+
description?: React.ReactNode;
|
|
1119
|
+
duration?: number;
|
|
1120
|
+
variant?: ToastVariant;
|
|
1121
|
+
}
|
|
1122
|
+
interface Toast {
|
|
1123
|
+
id: number;
|
|
1124
|
+
message: React.ReactNode;
|
|
1125
|
+
description?: React.ReactNode;
|
|
1126
|
+
duration: number;
|
|
1127
|
+
variant: ToastVariant;
|
|
1128
|
+
}
|
|
1129
|
+
interface ToastFn {
|
|
1130
|
+
(message: React.ReactNode, opts?: ToastOptions): number;
|
|
1131
|
+
success: (message: React.ReactNode, opts?: ToastOptions) => number;
|
|
1132
|
+
error: (message: React.ReactNode, opts?: ToastOptions) => number;
|
|
1133
|
+
info: (message: React.ReactNode, opts?: ToastOptions) => number;
|
|
1134
|
+
warning: (message: React.ReactNode, opts?: ToastOptions) => number;
|
|
1135
|
+
dismiss: (id: number) => void;
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* Global toast handle. `toast(msg)` enqueues a neutral toast; the `.success`,
|
|
1139
|
+
* `.error`, `.info` and `.warning` helpers pin the variant; `toast.dismiss(id)`
|
|
1140
|
+
* removes one early. Mirrors Rust's `use_toaster()` handle methods.
|
|
1141
|
+
*/
|
|
1142
|
+
declare const toast: ToastFn;
|
|
1143
|
+
interface ToasterProps extends React.ComponentProps<"ol"> {
|
|
1144
|
+
position?: ToastPosition;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Renders the live toast stack from the module store. Fixed-positioned per
|
|
1148
|
+
* `position` (default `bottom-right`); each toast auto-dismisses after its
|
|
1149
|
+
* `duration` (default 4000ms) via `setTimeout`. Single dark palette — no theme
|
|
1150
|
+
* switching (the upstream `next-themes` dependency is dropped).
|
|
1151
|
+
*/
|
|
1152
|
+
declare function Toaster({ position, className, ...props }: ToasterProps): React.JSX.Element;
|
|
1153
|
+
|
|
1154
|
+
declare function Form({ ...props }: React.ComponentProps<"form">): React.JSX.Element;
|
|
1155
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
1156
|
+
declare function FormLabel({ className, error, ...props }: React.ComponentProps<typeof Label> & {
|
|
1157
|
+
error?: boolean;
|
|
1158
|
+
}): React.JSX.Element;
|
|
1159
|
+
declare function FormControl({ error, ...props }: React.ComponentProps<typeof Slot> & {
|
|
1160
|
+
error?: boolean;
|
|
1161
|
+
}): React.JSX.Element;
|
|
1162
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
1163
|
+
declare function FormMessage({ className, children, ...props }: React.ComponentProps<"p">): React.JSX.Element | null;
|
|
1164
|
+
|
|
1165
|
+
type ResizableDirection = "horizontal" | "vertical";
|
|
1166
|
+
interface ResizablePanelGroupProps extends React.ComponentProps<"div"> {
|
|
1167
|
+
direction?: ResizableDirection;
|
|
1168
|
+
keyboardStep?: number;
|
|
1169
|
+
onLayout?: (sizes: number[]) => void;
|
|
1170
|
+
}
|
|
1171
|
+
declare function ResizablePanelGroup({ className, direction, keyboardStep, onLayout, children, ...props }: ResizablePanelGroupProps): React.JSX.Element;
|
|
1172
|
+
interface ResizablePanelProps extends React.ComponentProps<"div"> {
|
|
1173
|
+
index: number;
|
|
1174
|
+
defaultSize?: number;
|
|
1175
|
+
}
|
|
1176
|
+
declare function ResizablePanel({ className, index, defaultSize, style, children, ...props }: ResizablePanelProps): React.JSX.Element;
|
|
1177
|
+
interface ResizableHandleProps extends React.ComponentProps<"div"> {
|
|
1178
|
+
index: number;
|
|
1179
|
+
withHandle?: boolean;
|
|
1180
|
+
}
|
|
1181
|
+
declare function ResizableHandle({ className, index, withHandle, children, ...props }: ResizableHandleProps): React.JSX.Element;
|
|
1182
|
+
|
|
1183
|
+
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, type AlertDialogOverlayProps, type AlertDialogProps, AlertDialogTitle, AlertDialogTrigger, type AlertDialogTriggerProps, type AlertProps, AlertTitle, type AlertVariant, type Align, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, type ButtonSize, type ButtonVariant, type ButtonVariantsOptions, Calendar, type CalendarProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselProps, type ChartConfig, ChartContainer, type ChartItem, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupProps, CommandInput, CommandItem, type CommandItemProps, CommandList, type CommandProps, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, ContextMenuGroup, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, DialogTrigger, type DialogTriggerProps, Drawer, DrawerClose, type DrawerCloseProps, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, type DrawerProps, DrawerTitle, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyMediaVariant, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, type FieldOrientation, FieldSeparator, FieldSet, FieldTitle, type FloatingResult, Form, FormControl, FormDescription, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, type HoverCardContentProps, type HoverCardProps, HoverCardTrigger, type HoverCardTriggerProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonAlign, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, type InputGroupButtonSize, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputOTPSlotProps, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, type ItemMediaProps, type ItemMediaVariant, type ItemProps, ItemSeparator, type ItemSize, ItemTitle, type ItemVariant, Kbd, KbdGroup, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, type MenubarMenuProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, type MenubarSubProps, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, type PortalProps, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type ResizableDirection, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps, ScrollArea, ScrollBar, type ScrollBarProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectProps, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, Separator, type SeparatorOrientation, type SeparatorProps, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, type SheetOverlayProps, type SheetProps, SheetTitle, SheetTrigger, type SheetTriggerProps, type Side, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, type SidebarMenuButtonProps, type SidebarMenuButtonSize, type SidebarMenuButtonVariant, SidebarMenuItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SliderProps, Slot, type SlotProps, Spinner, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type Toast, type ToastFn, type ToastOptions, type ToastPosition, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToggleSize, type ToggleVariant, type ToggleVariantsOptions, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, buttonVariants, cn, mergeRefs, navigationMenuTriggerStyle, toast, toggleVariants, useControllableState, useDismissableLayer, useFloating, useFocusScope, usePresence, useRovingFocus, useSidebar };
|