@nextlyhq/ui 0.0.2-alpha.67 → 0.0.2-alpha.69
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/color.cjs +417 -138
- package/dist/color.cjs.map +1 -1
- package/dist/color.d.cts +49 -46
- package/dist/color.d.ts +49 -46
- package/dist/color.mjs +415 -136
- package/dist/color.mjs.map +1 -1
- package/dist/format.cjs +65 -39
- package/dist/format.cjs.map +1 -1
- package/dist/format.d.cts +21 -21
- package/dist/format.d.ts +21 -21
- package/dist/format.mjs +64 -37
- package/dist/format.mjs.map +1 -1
- package/dist/index.cjs +5808 -4437
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1086 -1246
- package/dist/index.d.ts +1090 -1250
- package/dist/index.mjs +5561 -4226
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.scoped.css +1 -1
- package/dist/tailwind-preset.cjs +167 -149
- package/dist/tailwind-preset.cjs.map +1 -1
- package/dist/tailwind-preset.d.cts +118 -116
- package/dist/tailwind-preset.d.ts +118 -116
- package/dist/tailwind-preset.mjs +162 -144
- package/dist/tailwind-preset.mjs.map +1 -1
- package/dist/theme.css +7 -3
- package/dist/utils.cjs +19 -8
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +3 -5
- package/dist/utils.d.ts +3 -5
- package/dist/utils.mjs +18 -6
- package/dist/utils.mjs.map +1 -1
- package/package.json +19 -21
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,65 @@
|
|
|
1
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { ButtonHTMLAttributes, ComponentProps, TextareaHTMLAttributes, HTMLAttributes, ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
4
|
-
import * as class_variance_authority from 'class-variance-authority';
|
|
5
|
-
import { VariantProps } from 'class-variance-authority';
|
|
6
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
-
import { Root } from '@radix-ui/react-label';
|
|
8
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
9
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
10
|
-
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
11
|
-
import { Root as Root$1 } from '@radix-ui/react-switch';
|
|
12
|
-
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
13
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
14
|
-
import { Content, Item, Root as Root$2, Trigger } from '@radix-ui/react-accordion';
|
|
15
|
-
import * as _radix_ui_react_tabs from '@radix-ui/react-tabs';
|
|
16
|
-
import { Content as Content$1, Root as Root$3 } from '@radix-ui/react-tabs';
|
|
17
|
-
import * as _radix_ui_react_tooltip from '@radix-ui/react-tooltip';
|
|
18
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
19
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
20
|
-
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
21
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
22
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
23
|
-
import { Command as Command$1 } from 'cmdk';
|
|
24
|
-
import { LucideProps } from 'lucide-react';
|
|
25
|
-
import { ToasterProps } from 'sonner';
|
|
26
|
-
export { ToasterProps, toast } from 'sonner';
|
|
27
|
-
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
28
|
-
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
29
|
-
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
30
1
|
|
|
2
|
+
import { VariantProps, cva } from "class-variance-authority";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { ButtonHTMLAttributes, ComponentProps, ComponentPropsWithoutRef, ElementRef, ForwardRefExoticComponent, HTMLAttributes, JSX, PropsWithoutRef, ReactNode, RefAttributes, TextareaHTMLAttributes } from "react";
|
|
5
|
+
import { Root } from "@radix-ui/react-label";
|
|
6
|
+
import { LucideProps } from "lucide-react";
|
|
7
|
+
import { Content, Provider, Root as Root$1, Trigger } from "@radix-ui/react-tooltip";
|
|
8
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
9
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
10
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
11
|
+
import { Root as Root$2 } from "@radix-ui/react-switch";
|
|
12
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
13
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
14
|
+
import { Content as Content$1, Item, Root as Root$3, Trigger as Trigger$1 } from "@radix-ui/react-accordion";
|
|
15
|
+
import { Content as Content$2, List, Root as Root$4, Trigger as Trigger$2 } from "@radix-ui/react-tabs";
|
|
16
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
17
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
18
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
19
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
20
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
21
|
+
import { Command as Command$1, defaultFilter } from "cmdk";
|
|
22
|
+
import { ToasterProps, ToasterProps as ToasterProps$1, toast } from "sonner";
|
|
23
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
24
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
25
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
26
|
+
/**
|
|
27
|
+
* The function `cva` returns for the variants map `T`: each variant's arms, and
|
|
28
|
+
* `class` or `className`.
|
|
29
|
+
*
|
|
30
|
+
* Every `*Variants` export is annotated with this over the very object its `cva`
|
|
31
|
+
* call is given (`VariantsFn<typeof BUTTON_VARIANT_MAP>`), so the published type
|
|
32
|
+
* is read from the configuration rather than restated beside it. An arm added to
|
|
33
|
+
* a map reaches the type with no second edit; a hand-written union would go on
|
|
34
|
+
* accepting the old set while the function accepted the new one.
|
|
35
|
+
* `variants.test-d.ts` checks each one against its map.
|
|
36
|
+
*/
|
|
37
|
+
type VariantsFn<T> = ReturnType<typeof cva<T>>;
|
|
31
38
|
/** @public */
|
|
32
39
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
33
|
-
|
|
40
|
+
asChild?: boolean;
|
|
34
41
|
}
|
|
35
|
-
|
|
42
|
+
/** The arms `buttonVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
43
|
+
declare const BUTTON_VARIANT_MAP: {
|
|
44
|
+
variant: {
|
|
45
|
+
default: string;
|
|
46
|
+
primary: string;
|
|
47
|
+
destructive: string;
|
|
48
|
+
outline: string;
|
|
49
|
+
secondary: string;
|
|
50
|
+
ghost: string;
|
|
51
|
+
link: string;
|
|
52
|
+
};
|
|
53
|
+
size: {
|
|
54
|
+
default: string;
|
|
55
|
+
sm: string;
|
|
56
|
+
md: string;
|
|
57
|
+
lg: string;
|
|
58
|
+
icon: string;
|
|
59
|
+
"icon-sm": string;
|
|
60
|
+
"icon-lg": string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
36
63
|
/**
|
|
37
64
|
* Button Component - Design System Specification
|
|
38
65
|
*
|
|
@@ -50,13 +77,17 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantPr
|
|
|
50
77
|
* Note: 'primary' is a semantic alias for 'default' variant for better code readability
|
|
51
78
|
* @experimental
|
|
52
79
|
*/
|
|
53
|
-
declare const buttonVariants:
|
|
54
|
-
variant?: "default" | "primary" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
55
|
-
size?: "default" | "sm" | "md" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
56
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
80
|
+
declare const buttonVariants: VariantsFn<typeof BUTTON_VARIANT_MAP>;
|
|
57
81
|
/** @public */
|
|
58
|
-
declare const Button:
|
|
59
|
-
|
|
82
|
+
declare const Button: ForwardRefExoticComponent<PropsWithoutRef<ButtonProps> & RefAttributes<HTMLButtonElement>>;
|
|
83
|
+
/** The arms `inputVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
84
|
+
declare const INPUT_VARIANT_MAP: {
|
|
85
|
+
size: {
|
|
86
|
+
sm: string;
|
|
87
|
+
default: string;
|
|
88
|
+
lg: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
60
91
|
/**
|
|
61
92
|
* Input Component - Design System Specification
|
|
62
93
|
*
|
|
@@ -93,32 +124,37 @@ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAtt
|
|
|
93
124
|
* - search: Search input with clear button
|
|
94
125
|
* @experimental
|
|
95
126
|
*/
|
|
96
|
-
declare const inputVariants:
|
|
97
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
98
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
127
|
+
declare const inputVariants: VariantsFn<typeof INPUT_VARIANT_MAP>;
|
|
99
128
|
/** @public */
|
|
100
|
-
interface InputProps extends Omit<ComponentProps<"input">, "size">, VariantProps<typeof inputVariants> {
|
|
101
|
-
}
|
|
129
|
+
interface InputProps extends Omit<ComponentProps<"input">, "size">, VariantProps<typeof inputVariants> {}
|
|
102
130
|
/** @public */
|
|
103
|
-
declare const Input:
|
|
104
|
-
|
|
131
|
+
declare const Input: ForwardRefExoticComponent<PropsWithoutRef<InputProps> & RefAttributes<HTMLInputElement>>;
|
|
132
|
+
type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
105
133
|
/** @public */
|
|
106
|
-
declare const Textarea:
|
|
107
|
-
|
|
134
|
+
declare const Textarea: ForwardRefExoticComponent<PropsWithoutRef<TextareaProps> & RefAttributes<HTMLTextAreaElement>>;
|
|
108
135
|
/** @public */
|
|
109
|
-
declare function Label({ className, ...props }: ComponentProps<typeof Root>):
|
|
110
|
-
|
|
136
|
+
declare function Label({ className, ...props }: ComponentProps<typeof Root>): JSX.Element;
|
|
111
137
|
/** @public */
|
|
112
|
-
interface FormLabelWithTooltipProps extends
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
138
|
+
interface FormLabelWithTooltipProps extends React$1.ComponentPropsWithoutRef<typeof Label> {
|
|
139
|
+
label: React$1.ReactNode;
|
|
140
|
+
description?: React$1.ReactNode;
|
|
141
|
+
required?: boolean;
|
|
142
|
+
labelClassName?: string;
|
|
143
|
+
tooltipClassName?: string;
|
|
118
144
|
}
|
|
119
145
|
/** @public */
|
|
120
|
-
declare const FormLabelWithTooltip:
|
|
121
|
-
|
|
146
|
+
export declare const FormLabelWithTooltip: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<FormLabelWithTooltipProps> & React$1.RefAttributes<React$1.ElementRef<typeof Label>>>;
|
|
147
|
+
/** The arms `badgeVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
148
|
+
declare const BADGE_VARIANT_MAP: {
|
|
149
|
+
variant: {
|
|
150
|
+
default: string;
|
|
151
|
+
primary: string;
|
|
152
|
+
success: string;
|
|
153
|
+
warning: string;
|
|
154
|
+
destructive: string;
|
|
155
|
+
outline: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
122
158
|
/**
|
|
123
159
|
* Badge Component - Design System Specification
|
|
124
160
|
*
|
|
@@ -148,15 +184,19 @@ declare const FormLabelWithTooltip: react.ForwardRefExoticComponent<FormLabelWit
|
|
|
148
184
|
* - outline: Transparent background with border border-border
|
|
149
185
|
* @experimental
|
|
150
186
|
*/
|
|
151
|
-
declare const badgeVariants:
|
|
152
|
-
variant?: "default" | "primary" | "destructive" | "outline" | "success" | "warning" | null | undefined;
|
|
153
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
187
|
+
declare const badgeVariants: VariantsFn<typeof BADGE_VARIANT_MAP>;
|
|
154
188
|
/** @public */
|
|
155
|
-
interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
156
|
-
}
|
|
189
|
+
interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
|
|
157
190
|
/** @public */
|
|
158
|
-
declare function Badge({ className, variant, ...props }: BadgeProps):
|
|
159
|
-
|
|
191
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): JSX.Element;
|
|
192
|
+
/** The arms `cardVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
193
|
+
declare const CARD_VARIANT_MAP: {
|
|
194
|
+
variant: {
|
|
195
|
+
default: string;
|
|
196
|
+
interactive: string;
|
|
197
|
+
elevated: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
160
200
|
/**
|
|
161
201
|
* Card Component - Design System Specification
|
|
162
202
|
*
|
|
@@ -208,87 +248,90 @@ declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_
|
|
|
208
248
|
* - Use aria-label or aria-labelledby for cards without visible text labels
|
|
209
249
|
* @experimental
|
|
210
250
|
*/
|
|
211
|
-
declare const cardVariants:
|
|
212
|
-
variant?: "default" | "interactive" | "elevated" | null | undefined;
|
|
213
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
251
|
+
declare const cardVariants: VariantsFn<typeof CARD_VARIANT_MAP>;
|
|
214
252
|
/** @experimental */
|
|
215
253
|
type CardProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardVariants>;
|
|
216
254
|
/** @experimental */
|
|
217
|
-
declare const Card:
|
|
218
|
-
variant?: "default" | "interactive" | "elevated" | null | undefined;
|
|
219
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string> & react.RefAttributes<HTMLDivElement>>;
|
|
255
|
+
declare const Card: ForwardRefExoticComponent<PropsWithoutRef<CardProps> & RefAttributes<HTMLDivElement>>;
|
|
220
256
|
/** @experimental */
|
|
221
257
|
interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
258
|
+
/**
|
|
259
|
+
* Whether to hide the bottom border border-border separator between header and content.
|
|
260
|
+
* Default: false (border border-border is shown per design spec)
|
|
261
|
+
*/
|
|
262
|
+
noBorder?: boolean;
|
|
227
263
|
}
|
|
228
264
|
/** @experimental */
|
|
229
|
-
declare const CardHeader:
|
|
265
|
+
declare const CardHeader: ForwardRefExoticComponent<PropsWithoutRef<CardHeaderProps> & RefAttributes<HTMLDivElement>>;
|
|
230
266
|
/** @experimental */
|
|
231
267
|
type CardTitleProps = HTMLAttributes<HTMLHeadingElement>;
|
|
232
268
|
/** @experimental */
|
|
233
|
-
declare const CardTitle:
|
|
269
|
+
declare const CardTitle: ForwardRefExoticComponent<PropsWithoutRef<CardTitleProps> & RefAttributes<HTMLHeadingElement>>;
|
|
234
270
|
/** @experimental */
|
|
235
271
|
type CardDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
236
272
|
/** @experimental */
|
|
237
|
-
declare const CardDescription:
|
|
273
|
+
declare const CardDescription: ForwardRefExoticComponent<PropsWithoutRef<CardDescriptionProps> & RefAttributes<HTMLParagraphElement>>;
|
|
238
274
|
/** @experimental */
|
|
239
275
|
type CardActionProps = HTMLAttributes<HTMLDivElement>;
|
|
240
276
|
/** @experimental */
|
|
241
|
-
declare const CardAction:
|
|
277
|
+
declare const CardAction: ForwardRefExoticComponent<PropsWithoutRef<CardActionProps> & RefAttributes<HTMLDivElement>>;
|
|
242
278
|
/** @experimental */
|
|
243
279
|
type CardContentProps = HTMLAttributes<HTMLDivElement>;
|
|
244
280
|
/** @experimental */
|
|
245
|
-
declare const CardContent:
|
|
281
|
+
declare const CardContent: ForwardRefExoticComponent<PropsWithoutRef<CardContentProps> & RefAttributes<HTMLDivElement>>;
|
|
246
282
|
/** @experimental */
|
|
247
283
|
type CardFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
248
284
|
/** @experimental */
|
|
249
|
-
declare const CardFooter:
|
|
250
|
-
|
|
285
|
+
declare const CardFooter: ForwardRefExoticComponent<PropsWithoutRef<CardFooterProps> & RefAttributes<HTMLDivElement>>;
|
|
251
286
|
type Gap = 0 | 1 | 2 | 3 | 4 | 6 | 8;
|
|
252
287
|
type Cols = 1 | 2 | 3 | 4 | 6;
|
|
253
288
|
/** @experimental */
|
|
254
289
|
interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
290
|
+
/** Main-axis direction. Default `col`. */
|
|
291
|
+
direction?: "col" | "row";
|
|
292
|
+
/** Gap between children (Tailwind spacing step). Default `4`. */
|
|
293
|
+
gap?: Gap;
|
|
259
294
|
}
|
|
260
295
|
/** Flex stack: vertical by default, horizontal with `direction="row"`.
|
|
261
296
|
* @experimental
|
|
262
297
|
*/
|
|
263
|
-
declare const Stack:
|
|
298
|
+
export declare const Stack: ForwardRefExoticComponent<PropsWithoutRef<StackProps> & RefAttributes<HTMLDivElement>>;
|
|
264
299
|
/** @experimental */
|
|
265
300
|
interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
301
|
+
/** Column count. Default `2`. */
|
|
302
|
+
cols?: Cols;
|
|
303
|
+
/** Gap between cells. Default `4`. */
|
|
304
|
+
gap?: Gap;
|
|
305
|
+
/**
|
|
306
|
+
* Collapse to one column in a narrow container. Off by default so existing
|
|
307
|
+
* callers keep the fixed column count they were written against.
|
|
308
|
+
*/
|
|
309
|
+
responsive?: boolean;
|
|
275
310
|
}
|
|
276
311
|
/** Simple fixed-column grid, or a container-responsive one via `responsive`.
|
|
277
312
|
* @experimental
|
|
278
313
|
*/
|
|
279
|
-
declare const Grid:
|
|
314
|
+
export declare const Grid: ForwardRefExoticComponent<PropsWithoutRef<GridProps> & RefAttributes<HTMLDivElement>>;
|
|
280
315
|
/** @experimental */
|
|
281
316
|
interface StatProps extends HTMLAttributes<HTMLDivElement> {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
317
|
+
/** Muted label above the value. */
|
|
318
|
+
label: string;
|
|
319
|
+
/** The emphasized value (string or node). */
|
|
320
|
+
value: ReactNode;
|
|
286
321
|
}
|
|
287
322
|
/** Labelled metric block for dashboard-style plugin widgets.
|
|
288
323
|
* @experimental
|
|
289
324
|
*/
|
|
290
|
-
declare const Stat:
|
|
291
|
-
|
|
325
|
+
export declare const Stat: ForwardRefExoticComponent<PropsWithoutRef<StatProps> & RefAttributes<HTMLDivElement>>;
|
|
326
|
+
/** The arms `alertVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
327
|
+
declare const ALERT_VARIANT_MAP: {
|
|
328
|
+
variant: {
|
|
329
|
+
info: string;
|
|
330
|
+
success: string;
|
|
331
|
+
warning: string;
|
|
332
|
+
destructive: string;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
292
335
|
/**
|
|
293
336
|
* Alert Component - Design System Specification
|
|
294
337
|
*
|
|
@@ -358,9 +401,7 @@ declare const Stat: react.ForwardRefExoticComponent<StatProps & react.RefAttribu
|
|
|
358
401
|
* - Destructive: <XCircle className="h-4 w-4" />
|
|
359
402
|
* @experimental
|
|
360
403
|
*/
|
|
361
|
-
declare const alertVariants:
|
|
362
|
-
variant?: "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
363
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
404
|
+
declare const alertVariants: VariantsFn<typeof ALERT_VARIANT_MAP>;
|
|
364
405
|
/** @experimental */
|
|
365
406
|
type AlertProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>;
|
|
366
407
|
/**
|
|
@@ -376,9 +417,7 @@ type AlertProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVari
|
|
|
376
417
|
* </Alert>
|
|
377
418
|
* @experimental
|
|
378
419
|
*/
|
|
379
|
-
declare const Alert:
|
|
380
|
-
variant?: "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
381
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string> & react.RefAttributes<HTMLDivElement>>;
|
|
420
|
+
declare const Alert: ForwardRefExoticComponent<PropsWithoutRef<AlertProps> & RefAttributes<HTMLDivElement>>;
|
|
382
421
|
/** @experimental */
|
|
383
422
|
type AlertTitleProps = HTMLAttributes<HTMLHeadingElement>;
|
|
384
423
|
/**
|
|
@@ -391,7 +430,7 @@ type AlertTitleProps = HTMLAttributes<HTMLHeadingElement>;
|
|
|
391
430
|
* <AlertTitle>Payment Successful</AlertTitle>
|
|
392
431
|
* @experimental
|
|
393
432
|
*/
|
|
394
|
-
declare const AlertTitle:
|
|
433
|
+
declare const AlertTitle: ForwardRefExoticComponent<PropsWithoutRef<AlertTitleProps> & RefAttributes<HTMLHeadingElement>>;
|
|
395
434
|
/** @experimental */
|
|
396
435
|
type AlertDescriptionProps = HTMLAttributes<HTMLDivElement>;
|
|
397
436
|
/**
|
|
@@ -406,11 +445,9 @@ type AlertDescriptionProps = HTMLAttributes<HTMLDivElement>;
|
|
|
406
445
|
* </AlertDescription>
|
|
407
446
|
* @experimental
|
|
408
447
|
*/
|
|
409
|
-
declare const AlertDescription:
|
|
410
|
-
|
|
448
|
+
declare const AlertDescription: ForwardRefExoticComponent<PropsWithoutRef<AlertDescriptionProps> & RefAttributes<HTMLDivElement>>;
|
|
411
449
|
/** @experimental */
|
|
412
|
-
declare function Separator({ className, orientation, decorative, ...props }:
|
|
413
|
-
|
|
450
|
+
declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof SeparatorPrimitive.Root>): JSX.Element;
|
|
414
451
|
/**
|
|
415
452
|
* Skeleton Loading Component
|
|
416
453
|
*
|
|
@@ -485,10 +522,17 @@ declare function Separator({ className, orientation, decorative, ...props }: rea
|
|
|
485
522
|
* @see {@link https://adrianroselli.com/2020/11/more-accessible-skeletons.html More Accessible Skeletons}
|
|
486
523
|
* @experimental
|
|
487
524
|
*/
|
|
488
|
-
declare const Skeleton:
|
|
525
|
+
declare const Skeleton: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<SkeletonProps> & React$1.RefAttributes<HTMLDivElement>>;
|
|
489
526
|
/** @experimental */
|
|
490
|
-
type SkeletonProps =
|
|
491
|
-
|
|
527
|
+
type SkeletonProps = React$1.ComponentProps<"div">;
|
|
528
|
+
/** The arms `progressVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
529
|
+
declare const PROGRESS_VARIANT_MAP: {
|
|
530
|
+
variant: {
|
|
531
|
+
default: string;
|
|
532
|
+
success: string;
|
|
533
|
+
error: string;
|
|
534
|
+
};
|
|
535
|
+
};
|
|
492
536
|
/**
|
|
493
537
|
* Progress variants using CVA
|
|
494
538
|
*
|
|
@@ -496,58 +540,56 @@ type SkeletonProps = react.ComponentProps<"div">;
|
|
|
496
540
|
*
|
|
497
541
|
* @experimental
|
|
498
542
|
*/
|
|
499
|
-
declare const progressVariants:
|
|
500
|
-
variant?: "default" | "success" | "error" | null | undefined;
|
|
501
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
543
|
+
export declare const progressVariants: VariantsFn<typeof PROGRESS_VARIANT_MAP>;
|
|
502
544
|
/**
|
|
503
545
|
* Progress component props
|
|
504
546
|
* @experimental
|
|
505
547
|
*/
|
|
506
548
|
type ProgressProps = {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
} &
|
|
549
|
+
/**
|
|
550
|
+
* Current progress value (0-100)
|
|
551
|
+
*
|
|
552
|
+
* @example
|
|
553
|
+
* ```tsx
|
|
554
|
+
* <Progress value={45} /> // 45% progress
|
|
555
|
+
* ```
|
|
556
|
+
*/
|
|
557
|
+
value: number;
|
|
558
|
+
/**
|
|
559
|
+
* Maximum value (default: 100)
|
|
560
|
+
*
|
|
561
|
+
* @example
|
|
562
|
+
* ```tsx
|
|
563
|
+
* <Progress value={30} max={50} /> // 60% progress (30/50)
|
|
564
|
+
* ```
|
|
565
|
+
*/
|
|
566
|
+
max?: number;
|
|
567
|
+
/**
|
|
568
|
+
* Visual variant for different states
|
|
569
|
+
*
|
|
570
|
+
* - `default`: Primary blue (bg-primary-500)
|
|
571
|
+
* - `success`: Green (bg-success-500)
|
|
572
|
+
* - `error`: Red (bg-destructive)
|
|
573
|
+
*
|
|
574
|
+
* @default "default"
|
|
575
|
+
*/
|
|
576
|
+
variant?: VariantProps<typeof progressVariants>["variant"];
|
|
577
|
+
/**
|
|
578
|
+
* Optional CSS class name for custom styling
|
|
579
|
+
*/
|
|
580
|
+
className?: string;
|
|
581
|
+
/**
|
|
582
|
+
* Optional ARIA label for screen readers
|
|
583
|
+
*
|
|
584
|
+
* If not provided, defaults to "Progress: X%"
|
|
585
|
+
*
|
|
586
|
+
* @example
|
|
587
|
+
* ```tsx
|
|
588
|
+
* <Progress value={45} aria-label="Uploading image.jpg: 45%" />
|
|
589
|
+
* ```
|
|
590
|
+
*/
|
|
591
|
+
"aria-label"?: string;
|
|
592
|
+
} & React$1.HTMLAttributes<HTMLDivElement>;
|
|
551
593
|
/**
|
|
552
594
|
* Progress component
|
|
553
595
|
*
|
|
@@ -571,57 +613,13 @@ type ProgressProps = {
|
|
|
571
613
|
* ```
|
|
572
614
|
* @experimental
|
|
573
615
|
*/
|
|
574
|
-
declare const Progress:
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
* @example
|
|
579
|
-
* ```tsx
|
|
580
|
-
* <Progress value={45} /> // 45% progress
|
|
581
|
-
* ```
|
|
582
|
-
*/
|
|
583
|
-
value: number;
|
|
584
|
-
/**
|
|
585
|
-
* Maximum value (default: 100)
|
|
586
|
-
*
|
|
587
|
-
* @example
|
|
588
|
-
* ```tsx
|
|
589
|
-
* <Progress value={30} max={50} /> // 60% progress (30/50)
|
|
590
|
-
* ```
|
|
591
|
-
*/
|
|
592
|
-
max?: number;
|
|
593
|
-
/**
|
|
594
|
-
* Visual variant for different states
|
|
595
|
-
*
|
|
596
|
-
* - `default`: Primary blue (bg-primary-500)
|
|
597
|
-
* - `success`: Green (bg-success-500)
|
|
598
|
-
* - `error`: Red (bg-destructive)
|
|
599
|
-
*
|
|
600
|
-
* @default "default"
|
|
601
|
-
*/
|
|
602
|
-
variant?: VariantProps<typeof progressVariants>["variant"];
|
|
603
|
-
/**
|
|
604
|
-
* Optional CSS class name for custom styling
|
|
605
|
-
*/
|
|
606
|
-
className?: string;
|
|
607
|
-
/**
|
|
608
|
-
* Optional ARIA label for screen readers
|
|
609
|
-
*
|
|
610
|
-
* If not provided, defaults to "Progress: X%"
|
|
611
|
-
*
|
|
612
|
-
* @example
|
|
613
|
-
* ```tsx
|
|
614
|
-
* <Progress value={45} aria-label="Uploading image.jpg: 45%" />
|
|
615
|
-
* ```
|
|
616
|
-
*/
|
|
617
|
-
"aria-label"?: string;
|
|
618
|
-
} & react.HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
619
|
-
|
|
616
|
+
declare const Progress: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ProgressProps> & React$1.RefAttributes<HTMLDivElement>>;
|
|
617
|
+
type CheckboxProps = ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> & {
|
|
618
|
+
indeterminate?: boolean;
|
|
619
|
+
};
|
|
620
620
|
/** @public */
|
|
621
|
-
declare const Checkbox:
|
|
622
|
-
|
|
623
|
-
} & react.RefAttributes<HTMLButtonElement>>;
|
|
624
|
-
|
|
621
|
+
declare const Checkbox: ForwardRefExoticComponent<PropsWithoutRef<CheckboxProps> & RefAttributes<ElementRef<typeof CheckboxPrimitive.Root>>>;
|
|
622
|
+
type RadioGroupProps = ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>;
|
|
625
623
|
/**
|
|
626
624
|
* RadioGroup Component - Design System Specification
|
|
627
625
|
*
|
|
@@ -651,47 +649,56 @@ declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxPrimitive.C
|
|
|
651
649
|
* - Hover state changes border border-border color for better interactivity
|
|
652
650
|
* @public
|
|
653
651
|
*/
|
|
654
|
-
declare const RadioGroup:
|
|
652
|
+
declare const RadioGroup: ForwardRefExoticComponent<PropsWithoutRef<RadioGroupProps> & RefAttributes<ElementRef<typeof RadioGroupPrimitive.Root>>>;
|
|
653
|
+
type RadioGroupItemProps = ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>;
|
|
655
654
|
/** @public */
|
|
656
|
-
declare const RadioGroupItem:
|
|
657
|
-
|
|
655
|
+
declare const RadioGroupItem: ForwardRefExoticComponent<PropsWithoutRef<RadioGroupItemProps> & RefAttributes<ElementRef<typeof RadioGroupPrimitive.Item>>>;
|
|
658
656
|
/**
|
|
659
657
|
* A pill track carrying a circular thumb is how a toggle is recognised, so both
|
|
660
658
|
* parts use `rounded-full` and stay outside the `--radius` scale: at any theme
|
|
661
659
|
* radius the switch must still read as a switch and not as a small checkbox.
|
|
662
660
|
* @public
|
|
663
661
|
*/
|
|
664
|
-
declare function Switch({ className, ...props }: ComponentProps<typeof Root$
|
|
665
|
-
|
|
662
|
+
declare function Switch({ className, ...props }: ComponentProps<typeof Root$2>): JSX.Element;
|
|
666
663
|
/** @experimental */
|
|
667
|
-
declare const Collapsible:
|
|
664
|
+
declare const Collapsible: typeof CollapsiblePrimitive.Root;
|
|
668
665
|
/** @experimental */
|
|
669
|
-
declare const CollapsibleTrigger:
|
|
666
|
+
declare const CollapsibleTrigger: typeof CollapsiblePrimitive.CollapsibleTrigger;
|
|
670
667
|
/** @experimental */
|
|
671
|
-
declare const CollapsibleContent:
|
|
672
|
-
|
|
668
|
+
declare const CollapsibleContent: typeof CollapsiblePrimitive.CollapsibleContent;
|
|
673
669
|
/**
|
|
674
670
|
* Props for the Accordion root component
|
|
675
671
|
* @see https://www.radix-ui.com/primitives/docs/components/accordion
|
|
676
672
|
* @experimental
|
|
677
673
|
*/
|
|
678
|
-
type AccordionProps = ComponentPropsWithoutRef<typeof Root$
|
|
674
|
+
type AccordionProps = ComponentPropsWithoutRef<typeof Root$3>;
|
|
679
675
|
/**
|
|
680
676
|
* Props for the AccordionItem component (container for trigger and content)
|
|
681
677
|
* @experimental
|
|
682
678
|
*/
|
|
683
679
|
type AccordionItemProps = ComponentPropsWithoutRef<typeof Item>;
|
|
680
|
+
/**
|
|
681
|
+
* Ref type for AccordionItem component
|
|
682
|
+
*/
|
|
683
|
+
type AccordionItemRef = ElementRef<typeof Item>;
|
|
684
684
|
/**
|
|
685
685
|
* Props for the AccordionTrigger component (clickable header button)
|
|
686
686
|
* @experimental
|
|
687
687
|
*/
|
|
688
|
-
type AccordionTriggerProps = ComponentPropsWithoutRef<typeof Trigger>;
|
|
688
|
+
type AccordionTriggerProps = ComponentPropsWithoutRef<typeof Trigger$1>;
|
|
689
|
+
/**
|
|
690
|
+
* Ref type for AccordionTrigger component
|
|
691
|
+
*/
|
|
692
|
+
type AccordionTriggerRef = ElementRef<typeof Trigger$1>;
|
|
689
693
|
/**
|
|
690
694
|
* Props for the AccordionContent component (collapsible content panel)
|
|
691
695
|
* @experimental
|
|
692
696
|
*/
|
|
693
|
-
type AccordionContentProps = ComponentPropsWithoutRef<typeof Content>;
|
|
694
|
-
|
|
697
|
+
type AccordionContentProps = ComponentPropsWithoutRef<typeof Content$1>;
|
|
698
|
+
/**
|
|
699
|
+
* Ref type for AccordionContent component
|
|
700
|
+
*/
|
|
701
|
+
type AccordionContentRef = ElementRef<typeof Content$1>;
|
|
695
702
|
/**
|
|
696
703
|
* Accordion Component - Design System Specification
|
|
697
704
|
*
|
|
@@ -786,7 +793,7 @@ type AccordionContentProps = ComponentPropsWithoutRef<typeof Content>;
|
|
|
786
793
|
* @see https://www.radix-ui.com/primitives/docs/components/accordion
|
|
787
794
|
* @experimental
|
|
788
795
|
*/
|
|
789
|
-
declare const Accordion:
|
|
796
|
+
declare const Accordion: typeof AccordionPrimitive.Root;
|
|
790
797
|
/**
|
|
791
798
|
* AccordionItem - Container for trigger and content
|
|
792
799
|
*
|
|
@@ -799,7 +806,7 @@ declare const Accordion: react.ForwardRefExoticComponent<(AccordionPrimitive.Acc
|
|
|
799
806
|
* - Disabled state can be set via disabled prop
|
|
800
807
|
* @experimental
|
|
801
808
|
*/
|
|
802
|
-
declare const AccordionItem:
|
|
809
|
+
declare const AccordionItem: ForwardRefExoticComponent<PropsWithoutRef<AccordionItemProps> & RefAttributes<AccordionItemRef>>;
|
|
803
810
|
/**
|
|
804
811
|
* AccordionTrigger - Clickable header button that toggles content visibility
|
|
805
812
|
*
|
|
@@ -824,7 +831,7 @@ declare const AccordionItem: react.ForwardRefExoticComponent<Omit<AccordionPrimi
|
|
|
824
831
|
* - Trigger includes AccordionPrimitive.Header wrapper for proper semantics
|
|
825
832
|
* @experimental
|
|
826
833
|
*/
|
|
827
|
-
declare const AccordionTrigger:
|
|
834
|
+
declare const AccordionTrigger: ForwardRefExoticComponent<PropsWithoutRef<AccordionTriggerProps> & RefAttributes<AccordionTriggerRef>>;
|
|
828
835
|
/**
|
|
829
836
|
* AccordionContent - Collapsible content panel
|
|
830
837
|
*
|
|
@@ -846,8 +853,61 @@ declare const AccordionTrigger: react.ForwardRefExoticComponent<Omit<AccordionPr
|
|
|
846
853
|
* - Height transitions smoothly from 0 to auto
|
|
847
854
|
* @experimental
|
|
848
855
|
*/
|
|
849
|
-
declare const AccordionContent:
|
|
850
|
-
|
|
856
|
+
declare const AccordionContent: ForwardRefExoticComponent<PropsWithoutRef<AccordionContentProps> & RefAttributes<AccordionContentRef>>;
|
|
857
|
+
/**
|
|
858
|
+
* Avatar component props
|
|
859
|
+
*
|
|
860
|
+
* Root container for displaying user avatars with image and fallback support.
|
|
861
|
+
* Extends Radix UI Avatar.Root props with size variants.
|
|
862
|
+
* @experimental
|
|
863
|
+
*/
|
|
864
|
+
type AvatarProps = ComponentPropsWithoutRef<"span"> & VariantProps<typeof avatarVariants> & {
|
|
865
|
+
/**
|
|
866
|
+
* Size variant
|
|
867
|
+
* - sm: 32px (h-8 w-8) - For compact layouts, lists
|
|
868
|
+
* - md: 40px (h-10 w-10) - Default size, general use
|
|
869
|
+
* - lg: 48px (h-12 w-12) - For prominent displays, profiles
|
|
870
|
+
* - xl: 64px (h-16 w-16) - For large profile displays, user panels
|
|
871
|
+
* - 2xl: 80px (h-20 w-20) - For profile headers, large avatars
|
|
872
|
+
* @default "md"
|
|
873
|
+
*/
|
|
874
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl";
|
|
875
|
+
};
|
|
876
|
+
/**
|
|
877
|
+
* AvatarImage component props
|
|
878
|
+
*
|
|
879
|
+
* Displays the avatar image with proper fallback handling.
|
|
880
|
+
* Extends standard img element props.
|
|
881
|
+
*
|
|
882
|
+
* Note: Both src and alt are optional to support dynamic loading scenarios.
|
|
883
|
+
* When src is undefined/empty, the AvatarFallback will be displayed instead.
|
|
884
|
+
* @experimental
|
|
885
|
+
*/
|
|
886
|
+
type AvatarImageProps = ComponentPropsWithoutRef<"img">;
|
|
887
|
+
/**
|
|
888
|
+
* AvatarFallback component props
|
|
889
|
+
*
|
|
890
|
+
* Displays fallback content (typically user initials) when image fails to load.
|
|
891
|
+
* Extends Radix UI Avatar.Fallback props.
|
|
892
|
+
* @experimental
|
|
893
|
+
*/
|
|
894
|
+
type AvatarFallbackProps = ComponentPropsWithoutRef<"span"> & {
|
|
895
|
+
/**
|
|
896
|
+
* Delay in milliseconds before showing fallback
|
|
897
|
+
* @default 600
|
|
898
|
+
*/
|
|
899
|
+
delayMs?: number;
|
|
900
|
+
};
|
|
901
|
+
/** The arms `avatarVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
902
|
+
declare const AVATAR_VARIANT_MAP: {
|
|
903
|
+
size: {
|
|
904
|
+
sm: string;
|
|
905
|
+
md: string;
|
|
906
|
+
lg: string;
|
|
907
|
+
xl: string;
|
|
908
|
+
"2xl": string;
|
|
909
|
+
};
|
|
910
|
+
};
|
|
851
911
|
/**
|
|
852
912
|
* Avatar Component - Design System Specification
|
|
853
913
|
*
|
|
@@ -911,9 +971,7 @@ declare const AccordionContent: react.ForwardRefExoticComponent<Omit<AccordionPr
|
|
|
911
971
|
* @see {@link https://github.com/nextlyhq/nextly/blob/main/ui-revamp/04-design-system-specification.md Design System Specification}
|
|
912
972
|
* @experimental
|
|
913
973
|
*/
|
|
914
|
-
declare const avatarVariants:
|
|
915
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
916
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
974
|
+
export declare const avatarVariants: VariantsFn<typeof AVATAR_VARIANT_MAP>;
|
|
917
975
|
/**
|
|
918
976
|
* Avatar root component
|
|
919
977
|
*
|
|
@@ -922,11 +980,7 @@ declare const avatarVariants: (props?: ({
|
|
|
922
980
|
* AvatarFallback for reliable text scaling.
|
|
923
981
|
* @experimental
|
|
924
982
|
*/
|
|
925
|
-
declare const Avatar:
|
|
926
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
927
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
928
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl";
|
|
929
|
-
} & react.RefAttributes<HTMLSpanElement>>;
|
|
983
|
+
declare const Avatar: ForwardRefExoticComponent<PropsWithoutRef<AvatarProps> & RefAttributes<HTMLSpanElement>>;
|
|
930
984
|
/**
|
|
931
985
|
* AvatarImage component
|
|
932
986
|
*
|
|
@@ -942,7 +996,7 @@ declare const Avatar: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLPro
|
|
|
942
996
|
* <AvatarImage src="/users/john-doe.jpg" alt="John Doe" />
|
|
943
997
|
* @experimental
|
|
944
998
|
*/
|
|
945
|
-
declare const AvatarImage:
|
|
999
|
+
declare const AvatarImage: ForwardRefExoticComponent<PropsWithoutRef<AvatarImageProps> & RefAttributes<HTMLImageElement>>;
|
|
946
1000
|
/**
|
|
947
1001
|
* AvatarFallback component
|
|
948
1002
|
*
|
|
@@ -975,67 +1029,40 @@ declare const AvatarImage: react.ForwardRefExoticComponent<Omit<react.DetailedHT
|
|
|
975
1029
|
* <AvatarFallback delayMs={300}>AB</AvatarFallback>
|
|
976
1030
|
* @experimental
|
|
977
1031
|
*/
|
|
978
|
-
declare const AvatarFallback:
|
|
979
|
-
delayMs?: number;
|
|
980
|
-
} & react.RefAttributes<HTMLSpanElement>>;
|
|
981
|
-
|
|
1032
|
+
declare const AvatarFallback: ForwardRefExoticComponent<PropsWithoutRef<AvatarFallbackProps> & RefAttributes<HTMLSpanElement>>;
|
|
982
1033
|
/**
|
|
983
|
-
*
|
|
984
|
-
*
|
|
985
|
-
*
|
|
986
|
-
* Extends Radix UI Avatar.Root props with size variants.
|
|
987
|
-
* @experimental
|
|
1034
|
+
* Props for the Tabs root component
|
|
1035
|
+
* @see https://www.radix-ui.com/primitives/docs/components/tabs
|
|
1036
|
+
* @public
|
|
988
1037
|
*/
|
|
989
|
-
type
|
|
990
|
-
/**
|
|
991
|
-
* Size variant
|
|
992
|
-
* - sm: 32px (h-8 w-8) - For compact layouts, lists
|
|
993
|
-
* - md: 40px (h-10 w-10) - Default size, general use
|
|
994
|
-
* - lg: 48px (h-12 w-12) - For prominent displays, profiles
|
|
995
|
-
* - xl: 64px (h-16 w-16) - For large profile displays, user panels
|
|
996
|
-
* - 2xl: 80px (h-20 w-20) - For profile headers, large avatars
|
|
997
|
-
* @default "md"
|
|
998
|
-
*/
|
|
999
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl";
|
|
1000
|
-
};
|
|
1038
|
+
type TabsProps = ComponentPropsWithoutRef<typeof Root$4>;
|
|
1001
1039
|
/**
|
|
1002
|
-
*
|
|
1003
|
-
*
|
|
1004
|
-
* Displays the avatar image with proper fallback handling.
|
|
1005
|
-
* Extends standard img element props.
|
|
1006
|
-
*
|
|
1007
|
-
* Note: Both src and alt are optional to support dynamic loading scenarios.
|
|
1008
|
-
* When src is undefined/empty, the AvatarFallback will be displayed instead.
|
|
1009
|
-
* @experimental
|
|
1040
|
+
* Props for the TabsList component (container for tab triggers)
|
|
1041
|
+
* @public
|
|
1010
1042
|
*/
|
|
1011
|
-
type
|
|
1043
|
+
type TabsListProps$1 = ComponentPropsWithoutRef<typeof List>;
|
|
1012
1044
|
/**
|
|
1013
|
-
*
|
|
1014
|
-
*
|
|
1015
|
-
* Displays fallback content (typically user initials) when image fails to load.
|
|
1016
|
-
* Extends Radix UI Avatar.Fallback props.
|
|
1017
|
-
* @experimental
|
|
1045
|
+
* Ref type for TabsList component
|
|
1018
1046
|
*/
|
|
1019
|
-
type
|
|
1020
|
-
/**
|
|
1021
|
-
* Delay in milliseconds before showing fallback
|
|
1022
|
-
* @default 600
|
|
1023
|
-
*/
|
|
1024
|
-
delayMs?: number;
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1047
|
+
type TabsListRef = ElementRef<typeof List>;
|
|
1027
1048
|
/**
|
|
1028
|
-
* Props for the
|
|
1029
|
-
* @see https://www.radix-ui.com/primitives/docs/components/tabs
|
|
1049
|
+
* Props for the TabsTrigger component (clickable tab button)
|
|
1030
1050
|
* @public
|
|
1031
1051
|
*/
|
|
1032
|
-
type
|
|
1052
|
+
type TabsTriggerProps$1 = ComponentPropsWithoutRef<typeof Trigger$2>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Ref type for TabsTrigger component
|
|
1055
|
+
*/
|
|
1056
|
+
type TabsTriggerRef = ElementRef<typeof Trigger$2>;
|
|
1033
1057
|
/**
|
|
1034
1058
|
* Props for the TabsContent component (content panel for each tab)
|
|
1035
1059
|
* @public
|
|
1036
1060
|
*/
|
|
1037
|
-
type TabsContentProps = ComponentPropsWithoutRef<typeof Content$
|
|
1038
|
-
|
|
1061
|
+
type TabsContentProps = ComponentPropsWithoutRef<typeof Content$2>;
|
|
1062
|
+
/**
|
|
1063
|
+
* Ref type for TabsContent component
|
|
1064
|
+
*/
|
|
1065
|
+
type TabsContentRef = ElementRef<typeof Content$2>;
|
|
1039
1066
|
/**
|
|
1040
1067
|
* Tabs Component - Design System Specification
|
|
1041
1068
|
*
|
|
@@ -1115,7 +1142,64 @@ type TabsContentProps = ComponentPropsWithoutRef<typeof Content$1>;
|
|
|
1115
1142
|
* @see https://www.radix-ui.com/primitives/docs/components/tabs
|
|
1116
1143
|
* @public
|
|
1117
1144
|
*/
|
|
1118
|
-
declare const Tabs:
|
|
1145
|
+
declare const Tabs: typeof Root$4;
|
|
1146
|
+
/**
|
|
1147
|
+
* The list's own appearance, as variants rather than as classes each caller
|
|
1148
|
+
* repeats.
|
|
1149
|
+
*
|
|
1150
|
+
* `ghost` is the compact, surface-less list used where tabs sit inside another
|
|
1151
|
+
* panel and must not draw a bar of their own. It was spelled `h-8 bg-transparent
|
|
1152
|
+
* p-0` at one call site and `h-7 bg-transparent p-0` at another; naming it here
|
|
1153
|
+
* settles the height rather than leaving two answers in the tree.
|
|
1154
|
+
*
|
|
1155
|
+
* Only APPEARANCE is promoted. Layout a caller chooses -- `w-full`,
|
|
1156
|
+
* `justify-start`, margins -- stays on `className`, because a variant names a
|
|
1157
|
+
* decision this component owns and layout is the caller's.
|
|
1158
|
+
*
|
|
1159
|
+
* Horizontal SCROLLING is the exception, and it moved to the `scrollable` prop
|
|
1160
|
+
* for a reason rather than as tidying: a caller putting `overflow-x-auto` on the
|
|
1161
|
+
* list makes the list itself the scroll container, which breaks the rail
|
|
1162
|
+
* contract this file's other half depends on. See that prop.
|
|
1163
|
+
*
|
|
1164
|
+
* The arms are a named declaration rather than an object literal inside `cva`,
|
|
1165
|
+
* because `cva` does not expose its configuration on the function it returns —
|
|
1166
|
+
* so anything checking which arms exist would otherwise have to restate them,
|
|
1167
|
+
* and the two drift the moment an arm is added.
|
|
1168
|
+
*/
|
|
1169
|
+
declare const TABS_LIST_VARIANTS: {
|
|
1170
|
+
readonly default: "h-10";
|
|
1171
|
+
readonly ghost: "h-8 bg-transparent";
|
|
1172
|
+
};
|
|
1173
|
+
/** The arms `tabsListVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
1174
|
+
declare const TABS_LIST_VARIANT_MAP: {
|
|
1175
|
+
variant: typeof TABS_LIST_VARIANTS;
|
|
1176
|
+
};
|
|
1177
|
+
declare const tabsListVariants: VariantsFn<typeof TABS_LIST_VARIANT_MAP>;
|
|
1178
|
+
/** What `TabsList` is declared to take. `TabsListProps`, below, is read back from the component. */
|
|
1179
|
+
type TabsListOwnProps = TabsListProps$1 & VariantProps<typeof tabsListVariants> & {
|
|
1180
|
+
/**
|
|
1181
|
+
* Let a strip too wide for its container scroll sideways.
|
|
1182
|
+
*
|
|
1183
|
+
* The scroll container is a WRAPPER, never the list, and that is why this
|
|
1184
|
+
* prop exists rather than callers reaching for `overflow-x-auto`
|
|
1185
|
+
* themselves. Two things go wrong when the list is the scroller, and the
|
|
1186
|
+
* second is why the obvious remedy is also wrong:
|
|
1187
|
+
*
|
|
1188
|
+
* - Per the CSS overflow rules, `visible` computes to `auto` when the
|
|
1189
|
+
* other axis is neither `visible` nor `clip`, so `overflow-x` alone
|
|
1190
|
+
* always makes the element a VERTICAL scroll container too.
|
|
1191
|
+
* - `TabsTrigger` carries `-mb-0.5` so its 2px underline lands ON this
|
|
1192
|
+
* list's rail rather than below it. That pull-up puts content past the
|
|
1193
|
+
* content-box edge, which the new scroll container reports as vertical
|
|
1194
|
+
* overflow — so `overflow-y-hidden` would clip the 2px the underline is
|
|
1195
|
+
* made of, silencing a scrollbar by deleting the indicator.
|
|
1196
|
+
*
|
|
1197
|
+
* With the wrapper scrolling instead, the list keeps its rail and
|
|
1198
|
+
* `w-max min-w-full` makes that rail span the full scroll width rather
|
|
1199
|
+
* than stopping where the triggers do.
|
|
1200
|
+
*/
|
|
1201
|
+
scrollable?: boolean;
|
|
1202
|
+
};
|
|
1119
1203
|
/**
|
|
1120
1204
|
* TabsList - Container for tab triggers
|
|
1121
1205
|
*
|
|
@@ -1126,32 +1210,27 @@ declare const Tabs: react.ForwardRefExoticComponent<_radix_ui_react_tabs.TabsPro
|
|
|
1126
1210
|
* - Layout: inline-flex (horizontal by default, use orientation="vertical" on Tabs root for vertical)
|
|
1127
1211
|
* @public
|
|
1128
1212
|
*/
|
|
1129
|
-
declare const TabsList:
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
* `w-max min-w-full` makes that rail span the full scroll width rather
|
|
1151
|
-
* than stopping where the triggers do.
|
|
1152
|
-
*/
|
|
1153
|
-
scrollable?: boolean;
|
|
1154
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
1213
|
+
declare const TabsList: ForwardRefExoticComponent<PropsWithoutRef<TabsListOwnProps> & RefAttributes<TabsListRef>>;
|
|
1214
|
+
/**
|
|
1215
|
+
* The trigger's own appearance. `size` carries the type scale only: everything
|
|
1216
|
+
* that draws the tab -- the square corners, the 2px underline, the active and
|
|
1217
|
+
* hover colours, the focus ring -- is in the base and is not a caller's to
|
|
1218
|
+
* choose, which is the property the `tab-indicator` lint rule
|
|
1219
|
+
* (`lint/tab-indicator`) holds every call site to.
|
|
1220
|
+
*
|
|
1221
|
+
* Arms declared separately for the same reason as the list's.
|
|
1222
|
+
*/
|
|
1223
|
+
declare const TABS_TRIGGER_SIZES: {
|
|
1224
|
+
readonly default: "text-sm";
|
|
1225
|
+
readonly sm: "text-xs";
|
|
1226
|
+
};
|
|
1227
|
+
/** The arms `tabsTriggerVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
1228
|
+
declare const TABS_TRIGGER_VARIANT_MAP: {
|
|
1229
|
+
size: typeof TABS_TRIGGER_SIZES;
|
|
1230
|
+
};
|
|
1231
|
+
declare const tabsTriggerVariants: VariantsFn<typeof TABS_TRIGGER_VARIANT_MAP>;
|
|
1232
|
+
/** What `TabsTrigger` is declared to take. `TabsTriggerProps`, below, is read back from the component. */
|
|
1233
|
+
type TabsTriggerOwnProps = TabsTriggerProps$1 & VariantProps<typeof tabsTriggerVariants>;
|
|
1155
1234
|
/**
|
|
1156
1235
|
* TabsTrigger - Clickable tab button
|
|
1157
1236
|
*
|
|
@@ -1171,9 +1250,7 @@ declare const TabsList: react.ForwardRefExoticComponent<Omit<_radix_ui_react_tab
|
|
|
1171
1250
|
* - Data attributes: [data-state="active|inactive"], [data-disabled]
|
|
1172
1251
|
* @public
|
|
1173
1252
|
*/
|
|
1174
|
-
declare const TabsTrigger:
|
|
1175
|
-
size?: "default" | "sm" | null | undefined;
|
|
1176
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string> & react.RefAttributes<HTMLButtonElement>>;
|
|
1253
|
+
declare const TabsTrigger: ForwardRefExoticComponent<PropsWithoutRef<TabsTriggerOwnProps> & RefAttributes<TabsTriggerRef>>;
|
|
1177
1254
|
/**
|
|
1178
1255
|
* TabsContent - Content panel for each tab
|
|
1179
1256
|
*
|
|
@@ -1187,8 +1264,7 @@ declare const TabsTrigger: react.ForwardRefExoticComponent<Omit<_radix_ui_react_
|
|
|
1187
1264
|
* - Only active content is visible, inactive content is hidden
|
|
1188
1265
|
* @public
|
|
1189
1266
|
*/
|
|
1190
|
-
declare const TabsContent:
|
|
1191
|
-
|
|
1267
|
+
declare const TabsContent: ForwardRefExoticComponent<PropsWithoutRef<TabsContentProps> & RefAttributes<TabsContentRef>>;
|
|
1192
1268
|
/**
|
|
1193
1269
|
* The public prop types, DERIVED from the components rather than restated.
|
|
1194
1270
|
*
|
|
@@ -1208,25 +1284,24 @@ type TabsListProps = ComponentPropsWithoutRef<typeof TabsList>;
|
|
|
1208
1284
|
* @public
|
|
1209
1285
|
*/
|
|
1210
1286
|
type TabsTriggerProps = ComponentPropsWithoutRef<typeof TabsTrigger>;
|
|
1211
|
-
|
|
1212
1287
|
/** @experimental */
|
|
1213
|
-
declare const TooltipProvider:
|
|
1288
|
+
declare const TooltipProvider: typeof Provider;
|
|
1214
1289
|
/** @public */
|
|
1215
|
-
declare const Tooltip:
|
|
1290
|
+
declare const Tooltip: typeof Root$1;
|
|
1216
1291
|
/** @public */
|
|
1217
|
-
declare const TooltipTrigger:
|
|
1292
|
+
declare const TooltipTrigger: typeof Trigger;
|
|
1293
|
+
type TooltipContentProps = React.ComponentPropsWithoutRef<typeof Content>;
|
|
1218
1294
|
/** @public */
|
|
1219
|
-
declare const TooltipContent:
|
|
1220
|
-
|
|
1295
|
+
declare const TooltipContent: ForwardRefExoticComponent<PropsWithoutRef<TooltipContentProps> & RefAttributes<React.ElementRef<typeof Content>>>;
|
|
1221
1296
|
/** @experimental */
|
|
1222
|
-
declare const Popover:
|
|
1297
|
+
declare const Popover: typeof PopoverPrimitive.Root;
|
|
1223
1298
|
/** @experimental */
|
|
1224
|
-
declare const PopoverTrigger:
|
|
1299
|
+
declare const PopoverTrigger: typeof PopoverPrimitive.Trigger;
|
|
1225
1300
|
/** @experimental */
|
|
1226
|
-
declare const PopoverAnchor:
|
|
1301
|
+
declare const PopoverAnchor: typeof PopoverPrimitive.Anchor;
|
|
1302
|
+
type PopoverContentProps = React$1.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>;
|
|
1227
1303
|
/** @experimental */
|
|
1228
|
-
declare const PopoverContent:
|
|
1229
|
-
|
|
1304
|
+
declare const PopoverContent: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<PopoverContentProps> & React$1.RefAttributes<React$1.ElementRef<typeof PopoverPrimitive.Content>>>;
|
|
1230
1305
|
/**
|
|
1231
1306
|
* Dialog (Modal) Component
|
|
1232
1307
|
*
|
|
@@ -1275,13 +1350,13 @@ declare const PopoverContent: react.ForwardRefExoticComponent<Omit<PopoverPrimit
|
|
|
1275
1350
|
* - Close button has sr-only text for screen readers
|
|
1276
1351
|
* @public
|
|
1277
1352
|
*/
|
|
1278
|
-
declare const Dialog:
|
|
1353
|
+
declare const Dialog: typeof DialogPrimitive.Root;
|
|
1279
1354
|
/** @experimental */
|
|
1280
|
-
declare const DialogTrigger:
|
|
1355
|
+
declare const DialogTrigger: typeof DialogPrimitive.Trigger;
|
|
1281
1356
|
/** @experimental */
|
|
1282
|
-
declare const DialogPortal:
|
|
1357
|
+
declare const DialogPortal: typeof DialogPrimitive.Portal;
|
|
1283
1358
|
/** @experimental */
|
|
1284
|
-
declare const DialogClose:
|
|
1359
|
+
declare const DialogClose: typeof DialogPrimitive.Close;
|
|
1285
1360
|
/** @experimental */
|
|
1286
1361
|
type DialogOverlayProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
|
1287
1362
|
/**
|
|
@@ -1290,7 +1365,17 @@ type DialogOverlayProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Overla
|
|
|
1290
1365
|
* token's, not a literal: it differs by mode and a host can retheme it.
|
|
1291
1366
|
* @experimental
|
|
1292
1367
|
*/
|
|
1293
|
-
declare const DialogOverlay:
|
|
1368
|
+
declare const DialogOverlay: ForwardRefExoticComponent<PropsWithoutRef<DialogOverlayProps> & RefAttributes<ElementRef<typeof DialogPrimitive.Overlay>>>;
|
|
1369
|
+
/** The arms `dialogContentVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
1370
|
+
declare const DIALOG_CONTENT_VARIANT_MAP: {
|
|
1371
|
+
size: {
|
|
1372
|
+
sm: string;
|
|
1373
|
+
md: string;
|
|
1374
|
+
lg: string;
|
|
1375
|
+
xl: string;
|
|
1376
|
+
full: string;
|
|
1377
|
+
};
|
|
1378
|
+
};
|
|
1294
1379
|
/**
|
|
1295
1380
|
* Dialog content size variants using CVA.
|
|
1296
1381
|
*
|
|
@@ -1301,9 +1386,7 @@ declare const DialogOverlay: react.ForwardRefExoticComponent<Omit<DialogPrimitiv
|
|
|
1301
1386
|
* @variant full - Full width with margin (responsive) - fullscreen on mobile
|
|
1302
1387
|
* @experimental
|
|
1303
1388
|
*/
|
|
1304
|
-
declare const dialogContentVariants:
|
|
1305
|
-
size?: "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
|
|
1306
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1389
|
+
declare const dialogContentVariants: VariantsFn<typeof DIALOG_CONTENT_VARIANT_MAP>;
|
|
1307
1390
|
/** @public */
|
|
1308
1391
|
type DialogContentProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & VariantProps<typeof dialogContentVariants>;
|
|
1309
1392
|
/**
|
|
@@ -1319,9 +1402,7 @@ type DialogContentProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Conten
|
|
|
1319
1402
|
* ```
|
|
1320
1403
|
* @public
|
|
1321
1404
|
*/
|
|
1322
|
-
declare const DialogContent:
|
|
1323
|
-
size?: "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
|
|
1324
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string> & react.RefAttributes<HTMLDivElement>>;
|
|
1405
|
+
declare const DialogContent: ForwardRefExoticComponent<PropsWithoutRef<DialogContentProps> & RefAttributes<ElementRef<typeof DialogPrimitive.Content>>>;
|
|
1325
1406
|
/** @public */
|
|
1326
1407
|
type DialogHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
1327
1408
|
/**
|
|
@@ -1329,7 +1410,7 @@ type DialogHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
|
1329
1410
|
* Provides consistent spacing and alignment (centered on mobile, left-aligned on desktop).
|
|
1330
1411
|
* @public
|
|
1331
1412
|
*/
|
|
1332
|
-
declare const DialogHeader:
|
|
1413
|
+
declare const DialogHeader: ForwardRefExoticComponent<PropsWithoutRef<DialogHeaderProps> & RefAttributes<HTMLDivElement>>;
|
|
1333
1414
|
/** @public */
|
|
1334
1415
|
type DialogFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
1335
1416
|
/**
|
|
@@ -1345,7 +1426,7 @@ type DialogFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
|
1345
1426
|
* ```
|
|
1346
1427
|
* @public
|
|
1347
1428
|
*/
|
|
1348
|
-
declare const DialogFooter:
|
|
1429
|
+
declare const DialogFooter: ForwardRefExoticComponent<PropsWithoutRef<DialogFooterProps> & RefAttributes<HTMLDivElement>>;
|
|
1349
1430
|
/** @public */
|
|
1350
1431
|
type DialogTitleProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
1351
1432
|
/**
|
|
@@ -1355,7 +1436,7 @@ type DialogTitleProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
|
1355
1436
|
* @accessibility Required for screen readers. Always include a DialogTitle.
|
|
1356
1437
|
* @public
|
|
1357
1438
|
*/
|
|
1358
|
-
declare const DialogTitle:
|
|
1439
|
+
declare const DialogTitle: ForwardRefExoticComponent<PropsWithoutRef<DialogTitleProps> & RefAttributes<ElementRef<typeof DialogPrimitive.Title>>>;
|
|
1359
1440
|
/** @public */
|
|
1360
1441
|
type DialogDescriptionProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
1361
1442
|
/**
|
|
@@ -1366,56 +1447,55 @@ type DialogDescriptionProps = ComponentPropsWithoutRef<typeof DialogPrimitive.De
|
|
|
1366
1447
|
* If not needed visually, you can use sr-only class.
|
|
1367
1448
|
* @public
|
|
1368
1449
|
*/
|
|
1369
|
-
declare const DialogDescription:
|
|
1370
|
-
|
|
1450
|
+
declare const DialogDescription: ForwardRefExoticComponent<PropsWithoutRef<DialogDescriptionProps> & RefAttributes<ElementRef<typeof DialogPrimitive.Description>>>;
|
|
1371
1451
|
/** @experimental */
|
|
1372
|
-
declare const AlertDialog:
|
|
1452
|
+
declare const AlertDialog: typeof AlertDialogPrimitive.Root;
|
|
1373
1453
|
/** @experimental */
|
|
1374
|
-
declare const AlertDialogTrigger:
|
|
1454
|
+
declare const AlertDialogTrigger: typeof AlertDialogPrimitive.Trigger;
|
|
1375
1455
|
/** @experimental */
|
|
1376
|
-
declare const AlertDialogPortal:
|
|
1456
|
+
declare const AlertDialogPortal: typeof AlertDialogPrimitive.Portal;
|
|
1377
1457
|
/** @experimental */
|
|
1378
1458
|
type AlertDialogOverlayProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>;
|
|
1379
1459
|
/**
|
|
1380
1460
|
* AlertDialogOverlay - The backdrop overlay behind the dialog content.
|
|
1381
1461
|
* @experimental
|
|
1382
1462
|
*/
|
|
1383
|
-
declare const AlertDialogOverlay:
|
|
1463
|
+
declare const AlertDialogOverlay: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogOverlayProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Overlay>>>;
|
|
1384
1464
|
/** @experimental */
|
|
1385
1465
|
type AlertDialogContentProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>;
|
|
1386
1466
|
/**
|
|
1387
1467
|
* AlertDialogContent - The main dialog content container.
|
|
1388
1468
|
* @experimental
|
|
1389
1469
|
*/
|
|
1390
|
-
declare const AlertDialogContent:
|
|
1470
|
+
declare const AlertDialogContent: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogContentProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Content>>>;
|
|
1391
1471
|
/** @experimental */
|
|
1392
1472
|
type AlertDialogHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
1393
1473
|
/**
|
|
1394
1474
|
* AlertDialogHeader - Container for dialog title and description.
|
|
1395
1475
|
* @experimental
|
|
1396
1476
|
*/
|
|
1397
|
-
declare const AlertDialogHeader:
|
|
1477
|
+
declare const AlertDialogHeader: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogHeaderProps> & RefAttributes<HTMLDivElement>>;
|
|
1398
1478
|
/** @experimental */
|
|
1399
1479
|
type AlertDialogFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
1400
1480
|
/**
|
|
1401
1481
|
* AlertDialogFooter - Container for dialog action buttons.
|
|
1402
1482
|
* @experimental
|
|
1403
1483
|
*/
|
|
1404
|
-
declare const AlertDialogFooter:
|
|
1484
|
+
declare const AlertDialogFooter: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogFooterProps> & RefAttributes<HTMLDivElement>>;
|
|
1405
1485
|
/** @experimental */
|
|
1406
1486
|
type AlertDialogTitleProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>;
|
|
1407
1487
|
/**
|
|
1408
1488
|
* AlertDialogTitle - The title of the alert dialog.
|
|
1409
1489
|
* @experimental
|
|
1410
1490
|
*/
|
|
1411
|
-
declare const AlertDialogTitle:
|
|
1491
|
+
declare const AlertDialogTitle: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogTitleProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Title>>>;
|
|
1412
1492
|
/** @experimental */
|
|
1413
1493
|
type AlertDialogDescriptionProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>;
|
|
1414
1494
|
/**
|
|
1415
1495
|
* AlertDialogDescription - The description text of the alert dialog.
|
|
1416
1496
|
* @experimental
|
|
1417
1497
|
*/
|
|
1418
|
-
declare const AlertDialogDescription:
|
|
1498
|
+
declare const AlertDialogDescription: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogDescriptionProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Description>>>;
|
|
1419
1499
|
/** @experimental */
|
|
1420
1500
|
type AlertDialogActionProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>;
|
|
1421
1501
|
/**
|
|
@@ -1423,7 +1503,7 @@ type AlertDialogActionProps = ComponentPropsWithoutRef<typeof AlertDialogPrimiti
|
|
|
1423
1503
|
* Styled as destructive by default.
|
|
1424
1504
|
* @experimental
|
|
1425
1505
|
*/
|
|
1426
|
-
declare const AlertDialogAction:
|
|
1506
|
+
declare const AlertDialogAction: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogActionProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Action>>>;
|
|
1427
1507
|
/** @experimental */
|
|
1428
1508
|
type AlertDialogCancelProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>;
|
|
1429
1509
|
/**
|
|
@@ -1431,202 +1511,112 @@ type AlertDialogCancelProps = ComponentPropsWithoutRef<typeof AlertDialogPrimiti
|
|
|
1431
1511
|
* Styled as outline variant.
|
|
1432
1512
|
* @experimental
|
|
1433
1513
|
*/
|
|
1434
|
-
declare const AlertDialogCancel:
|
|
1435
|
-
|
|
1436
|
-
/**
|
|
1437
|
-
* DropdownMenu Component
|
|
1438
|
-
*
|
|
1439
|
-
* A composable dropdown menu component built on Radix UI primitives.
|
|
1440
|
-
* Provides context menus, action menus, and navigation menus with full keyboard support.
|
|
1441
|
-
*
|
|
1442
|
-
* **Design Specifications**:
|
|
1443
|
-
* - Border-radius: `rounded-lg` for the menu surface, `rounded-sm` for items
|
|
1444
|
-
* - Padding: 4px (p-1) - compact spacing for menu items
|
|
1445
|
-
* - Shadow: shadow-md - floating element elevation
|
|
1446
|
-
* - Z-index: z-50 - above most content, below modals
|
|
1447
|
-
* - Min-width: 8rem (128px) - prevents cramped menus
|
|
1448
|
-
* - Item padding: 8px horizontal, 6px vertical (px-2 py-1.5)
|
|
1449
|
-
* - Font-size: 14px (text-sm)
|
|
1450
|
-
* - Transition: Tailwind animate utilities (fade, zoom, slide)
|
|
1451
|
-
*
|
|
1452
|
-
* **Accessibility**:
|
|
1453
|
-
* - Full keyboard navigation (Arrow keys, Enter, Escape, Tab)
|
|
1454
|
-
* - ARIA roles and attributes (menu, menuitem, menuitemcheckbox, menuitemradio)
|
|
1455
|
-
* - Focus management (focus trap, auto-focus first item)
|
|
1456
|
-
* - Screen reader support (labels, descriptions, indicators)
|
|
1457
|
-
* - WCAG 2.2 Level AA compliant
|
|
1458
|
-
*
|
|
1459
|
-
* **Features**:
|
|
1460
|
-
* - Portal rendering via PortalProvider for proper z-index stacking
|
|
1461
|
-
* - Checkbox and Radio item variants
|
|
1462
|
-
* - Sub-menu support (nested menus)
|
|
1463
|
-
* - Keyboard shortcuts display
|
|
1464
|
-
* - Customizable positioning (side, align, sideOffset)
|
|
1465
|
-
* - Disabled state support
|
|
1466
|
-
* - Inset support (for items with icons)
|
|
1467
|
-
*
|
|
1468
|
-
* @example
|
|
1469
|
-
* ```tsx
|
|
1470
|
-
* // Basic usage
|
|
1471
|
-
* <DropdownMenu>
|
|
1472
|
-
* <DropdownMenuTrigger asChild>
|
|
1473
|
-
* <Button variant="outline">Open Menu</Button>
|
|
1474
|
-
* </DropdownMenuTrigger>
|
|
1475
|
-
* <DropdownMenuContent>
|
|
1476
|
-
* <DropdownMenuItem>Profile</DropdownMenuItem>
|
|
1477
|
-
* <DropdownMenuItem>Settings</DropdownMenuItem>
|
|
1478
|
-
* <DropdownMenuSeparator />
|
|
1479
|
-
* <DropdownMenuItem>Logout</DropdownMenuItem>
|
|
1480
|
-
* </DropdownMenuContent>
|
|
1481
|
-
* </DropdownMenu>
|
|
1482
|
-
* ```
|
|
1483
|
-
*
|
|
1484
|
-
* @example
|
|
1485
|
-
* ```tsx
|
|
1486
|
-
* // With icons and shortcuts
|
|
1487
|
-
* <DropdownMenu>
|
|
1488
|
-
* <DropdownMenuTrigger asChild>
|
|
1489
|
-
* <Button variant="ghost" size="icon">
|
|
1490
|
-
* <MoreHorizontal className="h-4 w-4" />
|
|
1491
|
-
* </Button>
|
|
1492
|
-
* </DropdownMenuTrigger>
|
|
1493
|
-
* <DropdownMenuContent align="end">
|
|
1494
|
-
* <DropdownMenuLabel>Actions</DropdownMenuLabel>
|
|
1495
|
-
* <DropdownMenuItem>
|
|
1496
|
-
* <Edit className="h-4 w-4" />
|
|
1497
|
-
* Edit
|
|
1498
|
-
* <DropdownMenuShortcut>⌘E</DropdownMenuShortcut>
|
|
1499
|
-
* </DropdownMenuItem>
|
|
1500
|
-
* <DropdownMenuItem>
|
|
1501
|
-
* <Trash2 className="h-4 w-4" />
|
|
1502
|
-
* Delete
|
|
1503
|
-
* <DropdownMenuShortcut>⌘⌫</DropdownMenuShortcut>
|
|
1504
|
-
* </DropdownMenuItem>
|
|
1505
|
-
* </DropdownMenuContent>
|
|
1506
|
-
* </DropdownMenu>
|
|
1507
|
-
* ```
|
|
1508
|
-
*
|
|
1509
|
-
* @example
|
|
1510
|
-
* ```tsx
|
|
1511
|
-
* // With checkbox items
|
|
1512
|
-
* <DropdownMenu>
|
|
1513
|
-
* <DropdownMenuTrigger asChild>
|
|
1514
|
-
* <Button variant="outline">View Options</Button>
|
|
1515
|
-
* </DropdownMenuTrigger>
|
|
1516
|
-
* <DropdownMenuContent>
|
|
1517
|
-
* <DropdownMenuLabel>Display</DropdownMenuLabel>
|
|
1518
|
-
* <DropdownMenuSeparator />
|
|
1519
|
-
* <DropdownMenuCheckboxItem checked={showPanel} onCheckedChange={setShowPanel}>
|
|
1520
|
-
* Show Panel
|
|
1521
|
-
* </DropdownMenuCheckboxItem>
|
|
1522
|
-
* <DropdownMenuCheckboxItem checked={showToolbar} onCheckedChange={setShowToolbar}>
|
|
1523
|
-
* Show Toolbar
|
|
1524
|
-
* </DropdownMenuCheckboxItem>
|
|
1525
|
-
* </DropdownMenuContent>
|
|
1526
|
-
* </DropdownMenu>
|
|
1527
|
-
* ```
|
|
1528
|
-
*
|
|
1529
|
-
* @see https://www.radix-ui.com/docs/primitives/components/dropdown-menu - Radix UI DropdownMenu
|
|
1530
|
-
*/
|
|
1531
|
-
|
|
1514
|
+
declare const AlertDialogCancel: ForwardRefExoticComponent<PropsWithoutRef<AlertDialogCancelProps> & RefAttributes<ElementRef<typeof AlertDialogPrimitive.Cancel>>>;
|
|
1532
1515
|
/** @public */
|
|
1533
|
-
declare const DropdownMenu:
|
|
1516
|
+
declare const DropdownMenu: typeof DropdownMenuPrimitive.Root;
|
|
1534
1517
|
/** @public */
|
|
1535
|
-
declare const DropdownMenuTrigger:
|
|
1518
|
+
declare const DropdownMenuTrigger: typeof DropdownMenuPrimitive.Trigger;
|
|
1536
1519
|
/** @experimental */
|
|
1537
|
-
declare const DropdownMenuGroup:
|
|
1520
|
+
declare const DropdownMenuGroup: typeof DropdownMenuPrimitive.Group;
|
|
1538
1521
|
/** @experimental */
|
|
1539
|
-
declare const DropdownMenuPortal:
|
|
1522
|
+
declare const DropdownMenuPortal: typeof DropdownMenuPrimitive.Portal;
|
|
1540
1523
|
/** @experimental */
|
|
1541
|
-
declare const DropdownMenuSub:
|
|
1524
|
+
declare const DropdownMenuSub: typeof DropdownMenuPrimitive.Sub;
|
|
1542
1525
|
/** @experimental */
|
|
1543
|
-
declare const DropdownMenuRadioGroup:
|
|
1526
|
+
declare const DropdownMenuRadioGroup: typeof DropdownMenuPrimitive.RadioGroup;
|
|
1527
|
+
type DropdownMenuSubTriggerProps$1 = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
1528
|
+
inset?: boolean;
|
|
1529
|
+
};
|
|
1544
1530
|
/** @experimental */
|
|
1545
|
-
declare const DropdownMenuSubTrigger:
|
|
1546
|
-
|
|
1547
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
1531
|
+
declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<DropdownMenuSubTriggerProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>>>;
|
|
1532
|
+
type DropdownMenuSubContentProps$1 = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>;
|
|
1548
1533
|
/** @experimental */
|
|
1549
|
-
declare const DropdownMenuSubContent:
|
|
1534
|
+
declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<DropdownMenuSubContentProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DropdownMenuPrimitive.SubContent>>>;
|
|
1535
|
+
type DropdownMenuContentProps$1 = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;
|
|
1550
1536
|
/** @public */
|
|
1551
|
-
declare const DropdownMenuContent:
|
|
1537
|
+
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<DropdownMenuContentProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DropdownMenuPrimitive.Content>>>;
|
|
1538
|
+
type DropdownMenuItemProps$1 = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
1539
|
+
inset?: boolean;
|
|
1540
|
+
};
|
|
1552
1541
|
/** @public */
|
|
1553
|
-
declare const DropdownMenuItem:
|
|
1554
|
-
|
|
1555
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
1542
|
+
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<DropdownMenuItemProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DropdownMenuPrimitive.Item>>>;
|
|
1543
|
+
type DropdownMenuCheckboxItemProps$1 = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>;
|
|
1556
1544
|
/** @public */
|
|
1557
|
-
declare const DropdownMenuCheckboxItem:
|
|
1545
|
+
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<DropdownMenuCheckboxItemProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>>>;
|
|
1546
|
+
type DropdownMenuRadioItemProps$1 = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>;
|
|
1558
1547
|
/** @experimental */
|
|
1559
|
-
declare const DropdownMenuRadioItem:
|
|
1548
|
+
declare const DropdownMenuRadioItem: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<DropdownMenuRadioItemProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DropdownMenuPrimitive.RadioItem>>>;
|
|
1549
|
+
type DropdownMenuLabelProps$1 = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
1550
|
+
inset?: boolean;
|
|
1551
|
+
};
|
|
1560
1552
|
/** @experimental */
|
|
1561
|
-
declare const DropdownMenuLabel:
|
|
1562
|
-
|
|
1563
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
1553
|
+
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<DropdownMenuLabelProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DropdownMenuPrimitive.Label>>>;
|
|
1554
|
+
type DropdownMenuSeparatorProps$1 = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>;
|
|
1564
1555
|
/** @public */
|
|
1565
|
-
declare const DropdownMenuSeparator:
|
|
1556
|
+
declare const DropdownMenuSeparator: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<DropdownMenuSeparatorProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DropdownMenuPrimitive.Separator>>>;
|
|
1557
|
+
type DropdownMenuShortcutProps$1 = React$1.HTMLAttributes<HTMLSpanElement>;
|
|
1566
1558
|
/** @experimental */
|
|
1567
|
-
declare const DropdownMenuShortcut:
|
|
1568
|
-
|
|
1559
|
+
declare const DropdownMenuShortcut: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<DropdownMenuShortcutProps$1> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1569
1560
|
/**
|
|
1570
1561
|
* Props for the DropdownMenuSubTrigger component
|
|
1571
1562
|
* @experimental
|
|
1572
1563
|
*/
|
|
1573
|
-
type DropdownMenuSubTriggerProps =
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1564
|
+
type DropdownMenuSubTriggerProps = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
1565
|
+
/**
|
|
1566
|
+
* Whether to add left padding (for alignment with items that have icons)
|
|
1567
|
+
*/
|
|
1568
|
+
inset?: boolean;
|
|
1578
1569
|
};
|
|
1579
1570
|
/**
|
|
1580
1571
|
* Props for the DropdownMenuSubContent component
|
|
1581
1572
|
* @experimental
|
|
1582
1573
|
*/
|
|
1583
|
-
type DropdownMenuSubContentProps =
|
|
1574
|
+
type DropdownMenuSubContentProps = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>;
|
|
1584
1575
|
/**
|
|
1585
1576
|
* Props for the DropdownMenuContent component
|
|
1586
1577
|
* @public
|
|
1587
1578
|
*/
|
|
1588
|
-
type DropdownMenuContentProps =
|
|
1579
|
+
type DropdownMenuContentProps = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;
|
|
1589
1580
|
/**
|
|
1590
1581
|
* Props for the DropdownMenuItem component
|
|
1591
1582
|
* @public
|
|
1592
1583
|
*/
|
|
1593
|
-
type DropdownMenuItemProps =
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1584
|
+
type DropdownMenuItemProps = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
1585
|
+
/**
|
|
1586
|
+
* Whether to add left padding (for alignment with items that have icons)
|
|
1587
|
+
*/
|
|
1588
|
+
inset?: boolean;
|
|
1598
1589
|
};
|
|
1599
1590
|
/**
|
|
1600
1591
|
* Props for the DropdownMenuCheckboxItem component
|
|
1601
1592
|
* @public
|
|
1602
1593
|
*/
|
|
1603
|
-
type DropdownMenuCheckboxItemProps =
|
|
1594
|
+
type DropdownMenuCheckboxItemProps = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>;
|
|
1604
1595
|
/**
|
|
1605
1596
|
* Props for the DropdownMenuRadioItem component
|
|
1606
1597
|
* @experimental
|
|
1607
1598
|
*/
|
|
1608
|
-
type DropdownMenuRadioItemProps =
|
|
1599
|
+
type DropdownMenuRadioItemProps = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>;
|
|
1609
1600
|
/**
|
|
1610
1601
|
* Props for the DropdownMenuLabel component
|
|
1611
1602
|
* @experimental
|
|
1612
1603
|
*/
|
|
1613
|
-
type DropdownMenuLabelProps =
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1604
|
+
type DropdownMenuLabelProps = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
1605
|
+
/**
|
|
1606
|
+
* Whether to add left padding (for alignment with items that have icons)
|
|
1607
|
+
*/
|
|
1608
|
+
inset?: boolean;
|
|
1618
1609
|
};
|
|
1619
1610
|
/**
|
|
1620
1611
|
* Props for the DropdownMenuSeparator component
|
|
1621
1612
|
* @public
|
|
1622
1613
|
*/
|
|
1623
|
-
type DropdownMenuSeparatorProps =
|
|
1614
|
+
type DropdownMenuSeparatorProps = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>;
|
|
1624
1615
|
/**
|
|
1625
1616
|
* Props for the DropdownMenuShortcut component
|
|
1626
1617
|
* @experimental
|
|
1627
1618
|
*/
|
|
1628
|
-
type DropdownMenuShortcutProps =
|
|
1629
|
-
|
|
1619
|
+
type DropdownMenuShortcutProps = React$1.HTMLAttributes<HTMLSpanElement>;
|
|
1630
1620
|
/**
|
|
1631
1621
|
* Select Component - Design System Specification
|
|
1632
1622
|
*
|
|
@@ -1662,39 +1652,37 @@ type DropdownMenuShortcutProps = react.HTMLAttributes<HTMLSpanElement>;
|
|
|
1662
1652
|
* - Error state via aria-invalid
|
|
1663
1653
|
* @public
|
|
1664
1654
|
*/
|
|
1665
|
-
declare function Select({ ...props }: ComponentProps<typeof SelectPrimitive.Root>):
|
|
1655
|
+
declare function Select({ ...props }: ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
|
|
1666
1656
|
/** @experimental */
|
|
1667
|
-
declare function SelectGroup({ ...props }: ComponentProps<typeof SelectPrimitive.Group>):
|
|
1657
|
+
declare function SelectGroup({ ...props }: ComponentProps<typeof SelectPrimitive.Group>): JSX.Element;
|
|
1668
1658
|
/** @public */
|
|
1669
|
-
declare function SelectValue({ ...props }: ComponentProps<typeof SelectPrimitive.Value>):
|
|
1659
|
+
declare function SelectValue({ ...props }: ComponentProps<typeof SelectPrimitive.Value>): JSX.Element;
|
|
1660
|
+
/** The arms `selectTriggerVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
1661
|
+
declare const SELECT_TRIGGER_VARIANT_MAP: {
|
|
1662
|
+
size: {
|
|
1663
|
+
sm: string;
|
|
1664
|
+
default: string;
|
|
1665
|
+
lg: string;
|
|
1666
|
+
};
|
|
1667
|
+
};
|
|
1670
1668
|
/** @experimental */
|
|
1671
|
-
declare const selectTriggerVariants:
|
|
1672
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
1673
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1669
|
+
declare const selectTriggerVariants: VariantsFn<typeof SELECT_TRIGGER_VARIANT_MAP>;
|
|
1674
1670
|
/** @public */
|
|
1675
|
-
interface SelectTriggerProps extends ComponentProps<typeof SelectPrimitive.Trigger>, VariantProps<typeof selectTriggerVariants> {
|
|
1676
|
-
}
|
|
1671
|
+
interface SelectTriggerProps extends ComponentProps<typeof SelectPrimitive.Trigger>, VariantProps<typeof selectTriggerVariants> {}
|
|
1677
1672
|
/** @public */
|
|
1678
|
-
declare const SelectTrigger:
|
|
1673
|
+
declare const SelectTrigger: ForwardRefExoticComponent<PropsWithoutRef<SelectTriggerProps> & RefAttributes<React.ElementRef<typeof SelectPrimitive.Trigger>>>;
|
|
1679
1674
|
/** @public */
|
|
1680
|
-
declare function SelectContent({ className, children, position, ...props }: ComponentProps<typeof SelectPrimitive.Content>):
|
|
1675
|
+
declare function SelectContent({ className, children, position, ...props }: ComponentProps<typeof SelectPrimitive.Content>): JSX.Element;
|
|
1681
1676
|
/** @experimental */
|
|
1682
|
-
declare function SelectLabel({ className, ...props }: ComponentProps<typeof SelectPrimitive.Label>):
|
|
1677
|
+
declare function SelectLabel({ className, ...props }: ComponentProps<typeof SelectPrimitive.Label>): JSX.Element;
|
|
1683
1678
|
/** @public */
|
|
1684
|
-
declare function SelectItem({ className, children, ...props }: ComponentProps<typeof SelectPrimitive.Item>):
|
|
1679
|
+
declare function SelectItem({ className, children, ...props }: ComponentProps<typeof SelectPrimitive.Item>): JSX.Element;
|
|
1685
1680
|
/** @experimental */
|
|
1686
|
-
declare function SelectSeparator({ className, ...props }: ComponentProps<typeof SelectPrimitive.Separator>):
|
|
1681
|
+
declare function SelectSeparator({ className, ...props }: ComponentProps<typeof SelectPrimitive.Separator>): JSX.Element;
|
|
1687
1682
|
/** @experimental */
|
|
1688
|
-
declare function SelectScrollUpButton({ className, ...props }: ComponentProps<typeof SelectPrimitive.ScrollUpButton>):
|
|
1683
|
+
declare function SelectScrollUpButton({ className, ...props }: ComponentProps<typeof SelectPrimitive.ScrollUpButton>): JSX.Element;
|
|
1689
1684
|
/** @experimental */
|
|
1690
|
-
declare function SelectScrollDownButton({ className, ...props }: ComponentProps<typeof SelectPrimitive.ScrollDownButton>):
|
|
1691
|
-
|
|
1692
|
-
/**
|
|
1693
|
-
* Sheet Component Types
|
|
1694
|
-
*
|
|
1695
|
-
* TypeScript type definitions for the Sheet component (Dialog variant).
|
|
1696
|
-
*/
|
|
1697
|
-
|
|
1685
|
+
declare function SelectScrollDownButton({ className, ...props }: ComponentProps<typeof SelectPrimitive.ScrollDownButton>): JSX.Element;
|
|
1698
1686
|
/**
|
|
1699
1687
|
* Sheet root component props
|
|
1700
1688
|
* Extends Radix UI Dialog.Root props
|
|
@@ -1719,6 +1707,17 @@ type SheetCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Clo
|
|
|
1719
1707
|
* @experimental
|
|
1720
1708
|
*/
|
|
1721
1709
|
type SheetOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
|
1710
|
+
/**
|
|
1711
|
+
* Sheet content component props
|
|
1712
|
+
* Extends Radix UI Dialog.Content props with side variant
|
|
1713
|
+
*/
|
|
1714
|
+
type SheetContentProps$1 = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
|
|
1715
|
+
/**
|
|
1716
|
+
* Which edge to slide the sheet in from
|
|
1717
|
+
* @default "right"
|
|
1718
|
+
*/
|
|
1719
|
+
side?: "left" | "right" | "top" | "bottom";
|
|
1720
|
+
};
|
|
1722
1721
|
/**
|
|
1723
1722
|
* Sheet header component props
|
|
1724
1723
|
* Standard div props
|
|
@@ -1754,7 +1753,11 @@ type SheetContentRef = React.ElementRef<typeof DialogPrimitive.Content>;
|
|
|
1754
1753
|
type SheetTitleRef = React.ElementRef<typeof DialogPrimitive.Title>;
|
|
1755
1754
|
/** @experimental */
|
|
1756
1755
|
type SheetDescriptionRef = React.ElementRef<typeof DialogPrimitive.Description>;
|
|
1757
|
-
|
|
1756
|
+
/** What `Sheet` is: a component taking {@link SheetProps}, with a `displayName`. */
|
|
1757
|
+
type SheetComponent = {
|
|
1758
|
+
(props: SheetProps): React$1.JSX.Element;
|
|
1759
|
+
displayName: string;
|
|
1760
|
+
};
|
|
1758
1761
|
/**
|
|
1759
1762
|
* Sheet Component
|
|
1760
1763
|
*
|
|
@@ -1809,16 +1812,14 @@ type SheetDescriptionRef = React.ElementRef<typeof DialogPrimitive.Description>;
|
|
|
1809
1812
|
* @see https://www.radix-ui.com/primitives/docs/components/dialog
|
|
1810
1813
|
* @public
|
|
1811
1814
|
*/
|
|
1812
|
-
declare const Sheet:
|
|
1813
|
-
({ modal, children, ...props }: SheetProps): react_jsx_runtime.JSX.Element;
|
|
1814
|
-
displayName: string;
|
|
1815
|
-
};
|
|
1815
|
+
declare const Sheet: SheetComponent;
|
|
1816
1816
|
/** @experimental */
|
|
1817
|
-
declare const SheetTrigger:
|
|
1817
|
+
declare const SheetTrigger: typeof DialogPrimitive.Trigger;
|
|
1818
1818
|
/** @experimental */
|
|
1819
|
-
declare const SheetClose:
|
|
1819
|
+
declare const SheetClose: typeof DialogPrimitive.Close;
|
|
1820
1820
|
/** @experimental */
|
|
1821
|
-
declare const SheetPortal:
|
|
1821
|
+
declare const SheetPortal: typeof DialogPrimitive.Portal;
|
|
1822
|
+
type SheetOverlayProps$1 = React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
|
1822
1823
|
/**
|
|
1823
1824
|
* SheetOverlay
|
|
1824
1825
|
*
|
|
@@ -1829,19 +1830,25 @@ declare const SheetPortal: react.FC<DialogPrimitive.DialogPortalProps>;
|
|
|
1829
1830
|
* - **z-index**: 50
|
|
1830
1831
|
* @experimental
|
|
1831
1832
|
*/
|
|
1832
|
-
declare const SheetOverlay:
|
|
1833
|
+
declare const SheetOverlay: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<SheetOverlayProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DialogPrimitive.Overlay>>>;
|
|
1834
|
+
/** The arms `sheetVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
1835
|
+
declare const SHEET_VARIANT_MAP: {
|
|
1836
|
+
side: {
|
|
1837
|
+
top: string;
|
|
1838
|
+
bottom: string;
|
|
1839
|
+
left: string;
|
|
1840
|
+
right: string;
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
1833
1843
|
/**
|
|
1834
1844
|
* Sheet Content Variants
|
|
1835
1845
|
*
|
|
1836
1846
|
* Defines slide-in animations for each side and size options.
|
|
1837
1847
|
* @experimental
|
|
1838
1848
|
*/
|
|
1839
|
-
declare const sheetVariants:
|
|
1840
|
-
side?: "top" | "right" | "bottom" | "left" | null | undefined;
|
|
1841
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1849
|
+
declare const sheetVariants: VariantsFn<typeof SHEET_VARIANT_MAP>;
|
|
1842
1850
|
/** @public */
|
|
1843
|
-
interface SheetContentProps extends
|
|
1844
|
-
}
|
|
1851
|
+
interface SheetContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {}
|
|
1845
1852
|
/**
|
|
1846
1853
|
* SheetContent
|
|
1847
1854
|
*
|
|
@@ -1856,7 +1863,12 @@ interface SheetContentProps extends react.ComponentPropsWithoutRef<typeof Dialog
|
|
|
1856
1863
|
* @param side - Which edge to slide in from: "left", "right", "top", "bottom"
|
|
1857
1864
|
* @public
|
|
1858
1865
|
*/
|
|
1859
|
-
declare const SheetContent:
|
|
1866
|
+
declare const SheetContent: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<SheetContentProps> & React$1.RefAttributes<React$1.ElementRef<typeof DialogPrimitive.Content>>>;
|
|
1867
|
+
/** What `SheetHeader` and `SheetFooter` are: a `div` component with a `displayName`. */
|
|
1868
|
+
type SheetSectionComponent = {
|
|
1869
|
+
(props: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
1870
|
+
displayName: string;
|
|
1871
|
+
};
|
|
1860
1872
|
/**
|
|
1861
1873
|
* SheetHeader
|
|
1862
1874
|
*
|
|
@@ -1866,10 +1878,7 @@ declare const SheetContent: react.ForwardRefExoticComponent<SheetContentProps &
|
|
|
1866
1878
|
* - **Text Alignment**: Left (default) or center
|
|
1867
1879
|
* @public
|
|
1868
1880
|
*/
|
|
1869
|
-
declare const SheetHeader:
|
|
1870
|
-
({ className, ...props }: react.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
1871
|
-
displayName: string;
|
|
1872
|
-
};
|
|
1881
|
+
declare const SheetHeader: SheetSectionComponent;
|
|
1873
1882
|
/**
|
|
1874
1883
|
* SheetFooter
|
|
1875
1884
|
*
|
|
@@ -1879,10 +1888,8 @@ declare const SheetHeader: {
|
|
|
1879
1888
|
* - **Alignment**: Right-aligned on desktop, stretched on mobile
|
|
1880
1889
|
* @experimental
|
|
1881
1890
|
*/
|
|
1882
|
-
declare const SheetFooter:
|
|
1883
|
-
|
|
1884
|
-
displayName: string;
|
|
1885
|
-
};
|
|
1891
|
+
declare const SheetFooter: SheetSectionComponent;
|
|
1892
|
+
type SheetTitleProps$1 = React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
1886
1893
|
/**
|
|
1887
1894
|
* SheetTitle
|
|
1888
1895
|
*
|
|
@@ -1893,7 +1900,8 @@ declare const SheetFooter: {
|
|
|
1893
1900
|
* - **Required**: For accessibility (screen readers)
|
|
1894
1901
|
* @public
|
|
1895
1902
|
*/
|
|
1896
|
-
declare const SheetTitle:
|
|
1903
|
+
declare const SheetTitle: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<SheetTitleProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DialogPrimitive.Title>>>;
|
|
1904
|
+
type SheetDescriptionProps$1 = React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
1897
1905
|
/**
|
|
1898
1906
|
* SheetDescription
|
|
1899
1907
|
*
|
|
@@ -1904,8 +1912,7 @@ declare const SheetTitle: react.ForwardRefExoticComponent<Omit<DialogPrimitive.D
|
|
|
1904
1912
|
* - **Purpose**: Provide context for screen readers
|
|
1905
1913
|
* @public
|
|
1906
1914
|
*/
|
|
1907
|
-
declare const SheetDescription:
|
|
1908
|
-
|
|
1915
|
+
declare const SheetDescription: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<SheetDescriptionProps$1> & React$1.RefAttributes<React$1.ElementRef<typeof DialogPrimitive.Description>>>;
|
|
1909
1916
|
/**
|
|
1910
1917
|
* Command Component
|
|
1911
1918
|
*
|
|
@@ -1949,47 +1956,31 @@ type CommandProps = ComponentPropsWithoutRef<typeof Command$1>;
|
|
|
1949
1956
|
* Handles filtering, keyboard navigation, and accessibility.
|
|
1950
1957
|
* @experimental
|
|
1951
1958
|
*/
|
|
1952
|
-
declare const Command:
|
|
1953
|
-
children?: React.ReactNode;
|
|
1954
|
-
} & Pick<Pick<react.DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
1955
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
1956
|
-
} & {
|
|
1957
|
-
asChild?: boolean;
|
|
1958
|
-
}, "asChild" | "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
1959
|
-
label?: string;
|
|
1960
|
-
shouldFilter?: boolean;
|
|
1961
|
-
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
1962
|
-
defaultValue?: string;
|
|
1963
|
-
value?: string;
|
|
1964
|
-
onValueChange?: (value: string) => void;
|
|
1965
|
-
loop?: boolean;
|
|
1966
|
-
disablePointerSelection?: boolean;
|
|
1967
|
-
vimBindings?: boolean;
|
|
1968
|
-
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1959
|
+
declare const Command: ForwardRefExoticComponent<PropsWithoutRef<CommandProps> & RefAttributes<ElementRef<typeof Command$1>>>;
|
|
1969
1960
|
/** @experimental */
|
|
1970
1961
|
interface CommandDialogProps extends DialogPrimitive.DialogProps {
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1962
|
+
/**
|
|
1963
|
+
* Passed to the command root this dialog renders internally.
|
|
1964
|
+
*
|
|
1965
|
+
* A seam rather than a list of forwarded props, because the settings a caller needs from the
|
|
1966
|
+
* root are the ones this component happens not to have thought of: `label`, which supplies the
|
|
1967
|
+
* search input's accessible name (cmdk renders an EMPTY hidden label without it, and an empty
|
|
1968
|
+
* `aria-labelledby` reference is worse than none — it stops the placeholder naming the field);
|
|
1969
|
+
* `filter` and `shouldFilter`, which decide match order; and `vimBindings`, which claims Ctrl+K
|
|
1970
|
+
* and Ctrl+N inside the list.
|
|
1971
|
+
*
|
|
1972
|
+
* `children` is excluded because this component owns the dialog's contents.
|
|
1973
|
+
*/
|
|
1974
|
+
commandProps?: Omit<ComponentPropsWithoutRef<typeof Command>, "children">;
|
|
1975
|
+
/**
|
|
1976
|
+
* Passed to the dialog content this component renders internally.
|
|
1977
|
+
*
|
|
1978
|
+
* The seam that matters here is `onCloseAutoFocus`: this dialog has no trigger, so Radix has
|
|
1979
|
+
* nothing to hand focus back to, and it fires this at the point focus is actually being
|
|
1980
|
+
* returned — after the exit animation, which a timer set at close time cannot know the length
|
|
1981
|
+
* of. `className` is excluded because this component owns the dialog's own layout.
|
|
1982
|
+
*/
|
|
1983
|
+
contentProps?: Omit<ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, "children" | "className">;
|
|
1993
1984
|
}
|
|
1994
1985
|
/**
|
|
1995
1986
|
* CommandDialog - Command palette in a modal dialog.
|
|
@@ -2019,7 +2010,7 @@ interface CommandDialogProps extends DialogPrimitive.DialogProps {
|
|
|
2019
2010
|
* ```
|
|
2020
2011
|
* @experimental
|
|
2021
2012
|
*/
|
|
2022
|
-
declare const CommandDialog: ({ children, commandProps, contentProps, ...props }: CommandDialogProps) =>
|
|
2013
|
+
declare const CommandDialog: ({ children, commandProps, contentProps, ...props }: CommandDialogProps) => JSX.Element;
|
|
2023
2014
|
/** @experimental */
|
|
2024
2015
|
type CommandInputProps = ComponentPropsWithoutRef<typeof Command$1.Input>;
|
|
2025
2016
|
/**
|
|
@@ -2027,14 +2018,7 @@ type CommandInputProps = ComponentPropsWithoutRef<typeof Command$1.Input>;
|
|
|
2027
2018
|
* Includes search icon and styled per design system.
|
|
2028
2019
|
* @experimental
|
|
2029
2020
|
*/
|
|
2030
|
-
declare const CommandInput:
|
|
2031
|
-
ref?: React.Ref<HTMLInputElement>;
|
|
2032
|
-
} & {
|
|
2033
|
-
asChild?: boolean;
|
|
2034
|
-
}, "asChild" | "key" | keyof react.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
2035
|
-
value?: string;
|
|
2036
|
-
onValueChange?: (search: string) => void;
|
|
2037
|
-
} & react.RefAttributes<HTMLInputElement>, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
2021
|
+
declare const CommandInput: ForwardRefExoticComponent<PropsWithoutRef<CommandInputProps> & RefAttributes<ElementRef<typeof Command$1.Input>>>;
|
|
2038
2022
|
/** @experimental */
|
|
2039
2023
|
type CommandListProps = ComponentPropsWithoutRef<typeof Command$1.List>;
|
|
2040
2024
|
/**
|
|
@@ -2042,15 +2026,7 @@ type CommandListProps = ComponentPropsWithoutRef<typeof Command$1.List>;
|
|
|
2042
2026
|
* Max height 400px per design spec to prevent tall dialogs.
|
|
2043
2027
|
* @experimental
|
|
2044
2028
|
*/
|
|
2045
|
-
declare const CommandList:
|
|
2046
|
-
children?: React.ReactNode;
|
|
2047
|
-
} & Pick<Pick<react.DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
2048
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
2049
|
-
} & {
|
|
2050
|
-
asChild?: boolean;
|
|
2051
|
-
}, "asChild" | "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
2052
|
-
label?: string;
|
|
2053
|
-
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2029
|
+
declare const CommandList: ForwardRefExoticComponent<PropsWithoutRef<CommandListProps> & RefAttributes<ElementRef<typeof Command$1.List>>>;
|
|
2054
2030
|
/** @experimental */
|
|
2055
2031
|
type CommandEmptyProps = ComponentPropsWithoutRef<typeof Command$1.Empty>;
|
|
2056
2032
|
/**
|
|
@@ -2058,13 +2034,7 @@ type CommandEmptyProps = ComponentPropsWithoutRef<typeof Command$1.Empty>;
|
|
|
2058
2034
|
* Centered text with muted color per design spec.
|
|
2059
2035
|
* @experimental
|
|
2060
2036
|
*/
|
|
2061
|
-
declare const CommandEmpty:
|
|
2062
|
-
children?: React.ReactNode;
|
|
2063
|
-
} & Pick<Pick<react.DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
2064
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
2065
|
-
} & {
|
|
2066
|
-
asChild?: boolean;
|
|
2067
|
-
}, "asChild" | "key" | keyof HTMLAttributes<HTMLDivElement>> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2037
|
+
declare const CommandEmpty: ForwardRefExoticComponent<PropsWithoutRef<CommandEmptyProps> & RefAttributes<ElementRef<typeof Command$1.Empty>>>;
|
|
2068
2038
|
/** @experimental */
|
|
2069
2039
|
type CommandGroupProps = ComponentPropsWithoutRef<typeof Command$1.Group>;
|
|
2070
2040
|
/**
|
|
@@ -2072,17 +2042,7 @@ type CommandGroupProps = ComponentPropsWithoutRef<typeof Command$1.Group>;
|
|
|
2072
2042
|
* Heading styled as uppercase, small, semibold per design spec.
|
|
2073
2043
|
* @experimental
|
|
2074
2044
|
*/
|
|
2075
|
-
declare const CommandGroup:
|
|
2076
|
-
children?: React.ReactNode;
|
|
2077
|
-
} & Omit<Pick<Pick<react.DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
2078
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
2079
|
-
} & {
|
|
2080
|
-
asChild?: boolean;
|
|
2081
|
-
}, "asChild" | "key" | keyof HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
2082
|
-
heading?: React.ReactNode;
|
|
2083
|
-
value?: string;
|
|
2084
|
-
forceMount?: boolean;
|
|
2085
|
-
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2045
|
+
declare const CommandGroup: ForwardRefExoticComponent<PropsWithoutRef<CommandGroupProps> & RefAttributes<ElementRef<typeof Command$1.Group>>>;
|
|
2086
2046
|
/** @experimental */
|
|
2087
2047
|
type CommandSeparatorProps = ComponentPropsWithoutRef<typeof Command$1.Separator>;
|
|
2088
2048
|
/**
|
|
@@ -2090,13 +2050,7 @@ type CommandSeparatorProps = ComponentPropsWithoutRef<typeof Command$1.Separator
|
|
|
2090
2050
|
* 1px line with border border-border color, 8px margin top/bottom.
|
|
2091
2051
|
* @experimental
|
|
2092
2052
|
*/
|
|
2093
|
-
declare const CommandSeparator:
|
|
2094
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
2095
|
-
} & {
|
|
2096
|
-
asChild?: boolean;
|
|
2097
|
-
}, "asChild" | "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
2098
|
-
alwaysRender?: boolean;
|
|
2099
|
-
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2053
|
+
declare const CommandSeparator: ForwardRefExoticComponent<PropsWithoutRef<CommandSeparatorProps> & RefAttributes<ElementRef<typeof Command$1.Separator>>>;
|
|
2100
2054
|
/** @experimental */
|
|
2101
2055
|
type CommandItemProps = ComponentPropsWithoutRef<typeof Command$1.Item>;
|
|
2102
2056
|
/**
|
|
@@ -2105,19 +2059,7 @@ type CommandItemProps = ComponentPropsWithoutRef<typeof Command$1.Item>;
|
|
|
2105
2059
|
* Includes hover, focus, and selected states.
|
|
2106
2060
|
* @experimental
|
|
2107
2061
|
*/
|
|
2108
|
-
declare const CommandItem:
|
|
2109
|
-
children?: React.ReactNode;
|
|
2110
|
-
} & Omit<Pick<Pick<react.DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
2111
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
2112
|
-
} & {
|
|
2113
|
-
asChild?: boolean;
|
|
2114
|
-
}, "asChild" | "key" | keyof HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
|
|
2115
|
-
disabled?: boolean;
|
|
2116
|
-
onSelect?: (value: string) => void;
|
|
2117
|
-
value?: string;
|
|
2118
|
-
keywords?: string[];
|
|
2119
|
-
forceMount?: boolean;
|
|
2120
|
-
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2062
|
+
declare const CommandItem: ForwardRefExoticComponent<PropsWithoutRef<CommandItemProps> & RefAttributes<ElementRef<typeof Command$1.Item>>>;
|
|
2121
2063
|
/** @experimental */
|
|
2122
2064
|
type CommandShortcutProps = HTMLAttributes<HTMLSpanElement>;
|
|
2123
2065
|
/**
|
|
@@ -2125,8 +2067,7 @@ type CommandShortcutProps = HTMLAttributes<HTMLSpanElement>;
|
|
|
2125
2067
|
* Monospace font, subtle background, right-aligned per design spec.
|
|
2126
2068
|
* @experimental
|
|
2127
2069
|
*/
|
|
2128
|
-
declare const CommandShortcut:
|
|
2129
|
-
|
|
2070
|
+
declare const CommandShortcut: ForwardRefExoticComponent<PropsWithoutRef<CommandShortcutProps> & RefAttributes<HTMLSpanElement>>;
|
|
2130
2071
|
/**
|
|
2131
2072
|
* The command palette's default match scorer, re-exported.
|
|
2132
2073
|
*
|
|
@@ -2140,7 +2081,7 @@ declare const CommandShortcut: react.ForwardRefExoticComponent<CommandShortcutPr
|
|
|
2140
2081
|
*
|
|
2141
2082
|
* @experimental
|
|
2142
2083
|
*/
|
|
2143
|
-
declare const commandDefaultFilter:
|
|
2084
|
+
export declare const commandDefaultFilter: typeof defaultFilter;
|
|
2144
2085
|
/**
|
|
2145
2086
|
* The value of the item the palette has HIGHLIGHTED, from a component inside
|
|
2146
2087
|
* it.
|
|
@@ -2179,8 +2120,15 @@ declare const commandDefaultFilter: (value: string, search: string, keywords?: s
|
|
|
2179
2120
|
*
|
|
2180
2121
|
* @experimental
|
|
2181
2122
|
*/
|
|
2182
|
-
declare const useCommandHighlight: () => string;
|
|
2183
|
-
|
|
2123
|
+
export declare const useCommandHighlight: () => string;
|
|
2124
|
+
/** The arms `spinnerVariants` is built from. Its type is read from them: {@link VariantsFn}. */
|
|
2125
|
+
declare const SPINNER_VARIANT_MAP: {
|
|
2126
|
+
size: {
|
|
2127
|
+
sm: string;
|
|
2128
|
+
md: string;
|
|
2129
|
+
lg: string;
|
|
2130
|
+
};
|
|
2131
|
+
};
|
|
2184
2132
|
/**
|
|
2185
2133
|
* Spinner Component - Design System Specification
|
|
2186
2134
|
*
|
|
@@ -2226,9 +2174,7 @@ declare const useCommandHighlight: () => string;
|
|
|
2226
2174
|
* <Spinner className="text-primary" />
|
|
2227
2175
|
* @experimental
|
|
2228
2176
|
*/
|
|
2229
|
-
declare const spinnerVariants:
|
|
2230
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
2231
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2177
|
+
declare const spinnerVariants: VariantsFn<typeof SPINNER_VARIANT_MAP>;
|
|
2232
2178
|
/**
|
|
2233
2179
|
* Spinner component props
|
|
2234
2180
|
*
|
|
@@ -2237,18 +2183,17 @@ declare const spinnerVariants: (props?: ({
|
|
|
2237
2183
|
* @experimental
|
|
2238
2184
|
*/
|
|
2239
2185
|
type SpinnerProps = Omit<LucideProps, "size"> & VariantProps<typeof spinnerVariants> & {
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2186
|
+
/**
|
|
2187
|
+
* Accessible label for screen readers
|
|
2188
|
+
* @default "Loading"
|
|
2189
|
+
*/
|
|
2190
|
+
"aria-label"?: string;
|
|
2245
2191
|
};
|
|
2246
2192
|
/**
|
|
2247
2193
|
* Spinner component for loading states
|
|
2248
2194
|
* @experimental
|
|
2249
2195
|
*/
|
|
2250
|
-
declare const Spinner:
|
|
2251
|
-
|
|
2196
|
+
declare const Spinner: ForwardRefExoticComponent<PropsWithoutRef<SpinnerProps> & RefAttributes<SVGSVGElement>>;
|
|
2252
2197
|
/**
|
|
2253
2198
|
* Toaster Component - Toast Notification System
|
|
2254
2199
|
*
|
|
@@ -2340,42 +2285,48 @@ declare const Spinner: react.ForwardRefExoticComponent<Omit<SpinnerProps, "ref">
|
|
|
2340
2285
|
* @see https://ui.shadcn.com/docs/components/sonner - shadcn/ui integration guide
|
|
2341
2286
|
* @experimental
|
|
2342
2287
|
*/
|
|
2343
|
-
declare function Toaster({ theme, ...props }: ToasterProps):
|
|
2344
|
-
|
|
2288
|
+
export declare function Toaster({ theme, ...props }: ToasterProps$1): JSX.Element;
|
|
2289
|
+
type TableProps = React$1.HTMLAttributes<HTMLTableElement>;
|
|
2345
2290
|
/** @experimental */
|
|
2346
|
-
declare const Table:
|
|
2291
|
+
declare const Table: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TableProps> & React$1.RefAttributes<HTMLTableElement>>;
|
|
2292
|
+
type TableHeaderProps = React$1.HTMLAttributes<HTMLTableSectionElement>;
|
|
2347
2293
|
/** @experimental */
|
|
2348
|
-
declare const TableHeader:
|
|
2294
|
+
declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TableHeaderProps> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
2295
|
+
type TableBodyProps = React$1.HTMLAttributes<HTMLTableSectionElement>;
|
|
2349
2296
|
/** @experimental */
|
|
2350
|
-
declare const TableBody:
|
|
2297
|
+
declare const TableBody: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TableBodyProps> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
2298
|
+
type TableFooterProps = React$1.HTMLAttributes<HTMLTableSectionElement>;
|
|
2351
2299
|
/** @experimental */
|
|
2352
|
-
declare const TableFooter:
|
|
2300
|
+
declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TableFooterProps> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
2301
|
+
type TableRowProps = React$1.HTMLAttributes<HTMLTableRowElement>;
|
|
2353
2302
|
/** @experimental */
|
|
2354
|
-
declare const TableRow:
|
|
2303
|
+
declare const TableRow: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TableRowProps> & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
2304
|
+
type TableHeadProps = React$1.ThHTMLAttributes<HTMLTableCellElement>;
|
|
2355
2305
|
/** @experimental */
|
|
2356
|
-
declare const TableHead:
|
|
2306
|
+
declare const TableHead: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TableHeadProps> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
2307
|
+
type TableCellProps = React$1.TdHTMLAttributes<HTMLTableCellElement>;
|
|
2357
2308
|
/** @experimental */
|
|
2358
|
-
declare const TableCell:
|
|
2309
|
+
declare const TableCell: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TableCellProps> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
2310
|
+
type TableCaptionProps = React$1.HTMLAttributes<HTMLTableCaptionElement>;
|
|
2359
2311
|
/** @experimental */
|
|
2360
|
-
declare const TableCaption:
|
|
2361
|
-
|
|
2312
|
+
declare const TableCaption: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TableCaptionProps> & React$1.RefAttributes<HTMLTableCaptionElement>>;
|
|
2362
2313
|
/**
|
|
2363
2314
|
* Props for TableSearch component
|
|
2364
2315
|
* @experimental
|
|
2365
2316
|
*/
|
|
2366
2317
|
interface TableSearchProps {
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2318
|
+
/** Current search value */
|
|
2319
|
+
value: string;
|
|
2320
|
+
/** Callback when search value changes */
|
|
2321
|
+
onChange: (value: string) => void;
|
|
2322
|
+
/** Callback when clear button is clicked */
|
|
2323
|
+
onClear: () => void;
|
|
2324
|
+
/** Placeholder text for search input */
|
|
2325
|
+
placeholder?: string;
|
|
2326
|
+
/** Whether data is currently loading */
|
|
2327
|
+
isLoading?: boolean;
|
|
2328
|
+
/** Ref to the input element */
|
|
2329
|
+
inputRef?: React.RefObject<HTMLInputElement | null>;
|
|
2379
2330
|
}
|
|
2380
2331
|
/**
|
|
2381
2332
|
* Search input component for tables
|
|
@@ -2398,58 +2349,47 @@ interface TableSearchProps {
|
|
|
2398
2349
|
* ```
|
|
2399
2350
|
* @experimental
|
|
2400
2351
|
*/
|
|
2401
|
-
declare function TableSearch({ value, onChange, onClear, placeholder, isLoading, inputRef
|
|
2402
|
-
|
|
2352
|
+
export declare function TableSearch({ value, onChange, onClear, placeholder, isLoading, inputRef }: TableSearchProps): JSX.Element;
|
|
2403
2353
|
/**
|
|
2404
2354
|
* Props for TableError component
|
|
2405
2355
|
* @experimental
|
|
2406
2356
|
*/
|
|
2407
2357
|
interface TableErrorProps {
|
|
2408
|
-
|
|
2409
|
-
|
|
2358
|
+
/** Error message to display */
|
|
2359
|
+
message?: string;
|
|
2410
2360
|
}
|
|
2411
2361
|
/**
|
|
2412
2362
|
* Error state component for tables
|
|
2413
2363
|
* @experimental
|
|
2414
2364
|
*/
|
|
2415
|
-
declare function TableError({ message
|
|
2365
|
+
export declare function TableError({ message }: TableErrorProps): JSX.Element;
|
|
2416
2366
|
/**
|
|
2417
2367
|
* Loading state component for tables
|
|
2418
2368
|
* @experimental
|
|
2419
2369
|
*/
|
|
2420
|
-
declare function TableLoading():
|
|
2370
|
+
export declare function TableLoading(): JSX.Element;
|
|
2421
2371
|
/**
|
|
2422
2372
|
* Props for TableEmpty component
|
|
2423
2373
|
* @experimental
|
|
2424
2374
|
*/
|
|
2425
2375
|
interface TableEmptyProps {
|
|
2426
|
-
|
|
2427
|
-
|
|
2376
|
+
/** Custom message to display when no data */
|
|
2377
|
+
message?: string;
|
|
2428
2378
|
}
|
|
2429
2379
|
/**
|
|
2430
2380
|
* Empty state component for tables
|
|
2431
2381
|
* @experimental
|
|
2432
2382
|
*/
|
|
2433
|
-
declare function TableEmpty({ message }: TableEmptyProps):
|
|
2434
|
-
|
|
2435
|
-
/**
|
|
2436
|
-
* TableSkeleton Component
|
|
2437
|
-
*
|
|
2438
|
-
* Generic loading skeleton for data tables.
|
|
2439
|
-
* Renders header, body, and footer skeleton bars inside a card.
|
|
2440
|
-
* Unified with EntryTable skeleton pattern for consistency across all tables.
|
|
2441
|
-
*/
|
|
2442
|
-
|
|
2383
|
+
export declare function TableEmpty({ message }: TableEmptyProps): JSX.Element;
|
|
2443
2384
|
/** @experimental */
|
|
2444
2385
|
interface TableSkeletonProps {
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2386
|
+
columns?: number;
|
|
2387
|
+
rowCount?: number;
|
|
2388
|
+
hideWrapper?: boolean;
|
|
2389
|
+
hideFooter?: boolean;
|
|
2449
2390
|
}
|
|
2450
2391
|
/** @experimental */
|
|
2451
|
-
declare const TableSkeleton:
|
|
2452
|
-
|
|
2392
|
+
export declare const TableSkeleton: React$1.FC<TableSkeletonProps>;
|
|
2453
2393
|
/**
|
|
2454
2394
|
* One preset a host offers.
|
|
2455
2395
|
*
|
|
@@ -2462,37 +2402,37 @@ declare const TableSkeleton: react.FC<TableSkeletonProps>;
|
|
|
2462
2402
|
* @experimental
|
|
2463
2403
|
*/
|
|
2464
2404
|
interface ColorSwatch<TValue = string> {
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2405
|
+
id: string;
|
|
2406
|
+
label: string;
|
|
2407
|
+
color: string;
|
|
2408
|
+
value?: TValue;
|
|
2469
2409
|
}
|
|
2470
2410
|
/**
|
|
2471
2411
|
* Props for ColorPicker.
|
|
2472
2412
|
* @experimental
|
|
2473
2413
|
*/
|
|
2474
2414
|
interface ColorPickerProps<TValue = string> {
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2415
|
+
/** The colour shown on the surface, as hex. */
|
|
2416
|
+
color: string;
|
|
2417
|
+
/** A colour was chosen by editing — surface, hue, alpha or the hex field. */
|
|
2418
|
+
onColorChange: (color: string) => void;
|
|
2419
|
+
/** Presets. Painted from `color`, returned by `value`. */
|
|
2420
|
+
swatches?: ColorSwatch<TValue>[];
|
|
2421
|
+
/**
|
|
2422
|
+
* A preset was chosen. Separate from `onColorChange` because only the host
|
|
2423
|
+
* can say what a swatch MEANS: the two are different events, and collapsing
|
|
2424
|
+
* them is what loses a token reference.
|
|
2425
|
+
*/
|
|
2426
|
+
onSwatchSelect?: (swatch: ColorSwatch<TValue>) => void;
|
|
2427
|
+
/**
|
|
2428
|
+
* Recently used colours. Owned by the host, never by this component — the
|
|
2429
|
+
* admin scopes them per user, and a component writing `localStorage` at
|
|
2430
|
+
* render is unusable on a server and untestable without a DOM.
|
|
2431
|
+
*/
|
|
2432
|
+
recentColors?: string[];
|
|
2433
|
+
/** Alpha channel. Off by default: most call sites want an opaque colour. */
|
|
2434
|
+
showAlpha?: boolean;
|
|
2435
|
+
className?: string;
|
|
2496
2436
|
}
|
|
2497
2437
|
/**
|
|
2498
2438
|
* A colour control: a saturation square, a hue strip, optional alpha, a hex
|
|
@@ -2516,109 +2456,115 @@ interface ColorPickerProps<TValue = string> {
|
|
|
2516
2456
|
* />
|
|
2517
2457
|
* ```
|
|
2518
2458
|
*/
|
|
2519
|
-
declare function ColorPicker<TValue = string>({ color, onColorChange, swatches, onSwatchSelect, recentColors, showAlpha, className
|
|
2520
|
-
|
|
2459
|
+
export declare function ColorPicker<TValue = string>({ color, onColorChange, swatches, onSwatchSelect, recentColors, showAlpha, className }: ColorPickerProps<TValue>): React$1.JSX.Element;
|
|
2521
2460
|
/** @experimental */
|
|
2522
2461
|
interface PaginationMeta {
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2462
|
+
total: number;
|
|
2463
|
+
page: number;
|
|
2464
|
+
limit: number;
|
|
2465
|
+
totalPages: number;
|
|
2466
|
+
hasNext: boolean;
|
|
2467
|
+
hasPrev: boolean;
|
|
2529
2468
|
}
|
|
2530
2469
|
/** @experimental */
|
|
2531
2470
|
interface SortInfo {
|
|
2532
|
-
|
|
2533
|
-
|
|
2471
|
+
field: string;
|
|
2472
|
+
direction: "asc" | "desc";
|
|
2534
2473
|
}
|
|
2535
2474
|
/** @experimental */
|
|
2536
2475
|
interface FilterInfo {
|
|
2537
|
-
|
|
2538
|
-
|
|
2476
|
+
search?: string;
|
|
2477
|
+
filters?: Record<string, unknown>;
|
|
2539
2478
|
}
|
|
2540
2479
|
/** @experimental */
|
|
2541
2480
|
interface TableParams {
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2481
|
+
pagination: {
|
|
2482
|
+
page: number;
|
|
2483
|
+
pageSize: number;
|
|
2484
|
+
};
|
|
2485
|
+
sorting?: SortInfo[];
|
|
2486
|
+
filters?: FilterInfo;
|
|
2548
2487
|
}
|
|
2549
2488
|
/** @experimental */
|
|
2550
2489
|
interface ListResponse<TData> {
|
|
2551
|
-
|
|
2552
|
-
|
|
2490
|
+
items: TData[];
|
|
2491
|
+
meta: PaginationMeta;
|
|
2553
2492
|
}
|
|
2554
2493
|
/** @experimental */
|
|
2555
2494
|
interface PaginationConfig {
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2495
|
+
pageSize?: number;
|
|
2496
|
+
pageSizeOptions?: number[];
|
|
2497
|
+
showPageSizeSelector?: boolean;
|
|
2498
|
+
maxVisiblePages?: number;
|
|
2560
2499
|
}
|
|
2561
2500
|
/** @experimental */
|
|
2562
2501
|
interface ActionCallbacks<TData = unknown> {
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2502
|
+
onEdit?: (item: TData) => void;
|
|
2503
|
+
onDelete?: (item: TData) => void;
|
|
2504
|
+
onView?: (item: TData) => void;
|
|
2566
2505
|
}
|
|
2567
2506
|
/** @experimental */
|
|
2568
2507
|
type DataFetcher<TData> = (params: TableParams) => Promise<ListResponse<TData>>;
|
|
2569
|
-
|
|
2570
2508
|
interface PortalProviderProps {
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2509
|
+
/** The DOM element to portal overlay content into. Defaults to document.body (Radix default). */
|
|
2510
|
+
container: HTMLElement | null;
|
|
2511
|
+
children: ReactNode;
|
|
2574
2512
|
}
|
|
2575
2513
|
/** @public */
|
|
2576
|
-
declare function PortalProvider({ container, children }: PortalProviderProps):
|
|
2514
|
+
declare function PortalProvider({ container, children }: PortalProviderProps): JSX.Element;
|
|
2577
2515
|
/** @public */
|
|
2578
2516
|
declare function usePortalContainer(): HTMLElement | undefined;
|
|
2579
|
-
|
|
2580
2517
|
/** @experimental */
|
|
2581
|
-
declare const ContextMenu:
|
|
2518
|
+
declare const ContextMenu: typeof ContextMenuPrimitive.Root;
|
|
2582
2519
|
/** @experimental */
|
|
2583
|
-
declare const ContextMenuTrigger:
|
|
2520
|
+
declare const ContextMenuTrigger: typeof ContextMenuPrimitive.Trigger;
|
|
2584
2521
|
/** @experimental */
|
|
2585
|
-
declare const ContextMenuGroup:
|
|
2522
|
+
declare const ContextMenuGroup: typeof ContextMenuPrimitive.Group;
|
|
2586
2523
|
/** @experimental */
|
|
2587
|
-
declare const ContextMenuSub:
|
|
2524
|
+
declare const ContextMenuSub: typeof ContextMenuPrimitive.Sub;
|
|
2588
2525
|
/** @experimental */
|
|
2589
|
-
declare const ContextMenuRadioGroup:
|
|
2526
|
+
declare const ContextMenuRadioGroup: typeof ContextMenuPrimitive.RadioGroup;
|
|
2527
|
+
type ContextMenuSubTriggerProps = React$1.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
2528
|
+
inset?: boolean;
|
|
2529
|
+
};
|
|
2590
2530
|
/** @experimental */
|
|
2591
|
-
declare const ContextMenuSubTrigger:
|
|
2592
|
-
|
|
2593
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
2531
|
+
declare const ContextMenuSubTrigger: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ContextMenuSubTriggerProps> & React$1.RefAttributes<React$1.ElementRef<typeof ContextMenuPrimitive.SubTrigger>>>;
|
|
2532
|
+
type ContextMenuSubContentProps = React$1.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>;
|
|
2594
2533
|
/** @experimental */
|
|
2595
|
-
declare const ContextMenuSubContent:
|
|
2534
|
+
declare const ContextMenuSubContent: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ContextMenuSubContentProps> & React$1.RefAttributes<React$1.ElementRef<typeof ContextMenuPrimitive.SubContent>>>;
|
|
2535
|
+
type ContextMenuContentProps = React$1.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>;
|
|
2596
2536
|
/** @experimental */
|
|
2597
|
-
declare const ContextMenuContent:
|
|
2537
|
+
declare const ContextMenuContent: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ContextMenuContentProps> & React$1.RefAttributes<React$1.ElementRef<typeof ContextMenuPrimitive.Content>>>;
|
|
2538
|
+
type ContextMenuItemProps = React$1.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
|
|
2539
|
+
inset?: boolean;
|
|
2540
|
+
};
|
|
2598
2541
|
/** @experimental */
|
|
2599
|
-
declare const ContextMenuItem:
|
|
2600
|
-
|
|
2601
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
2542
|
+
declare const ContextMenuItem: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ContextMenuItemProps> & React$1.RefAttributes<React$1.ElementRef<typeof ContextMenuPrimitive.Item>>>;
|
|
2543
|
+
type ContextMenuCheckboxItemProps = React$1.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>;
|
|
2602
2544
|
/** @experimental */
|
|
2603
|
-
declare const ContextMenuCheckboxItem:
|
|
2545
|
+
declare const ContextMenuCheckboxItem: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ContextMenuCheckboxItemProps> & React$1.RefAttributes<React$1.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>>>;
|
|
2546
|
+
type ContextMenuRadioItemProps = React$1.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>;
|
|
2604
2547
|
/** @experimental */
|
|
2605
|
-
declare const ContextMenuRadioItem:
|
|
2548
|
+
declare const ContextMenuRadioItem: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ContextMenuRadioItemProps> & React$1.RefAttributes<React$1.ElementRef<typeof ContextMenuPrimitive.RadioItem>>>;
|
|
2549
|
+
type ContextMenuLabelProps = React$1.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {
|
|
2550
|
+
inset?: boolean;
|
|
2551
|
+
};
|
|
2606
2552
|
/** @experimental */
|
|
2607
|
-
declare const ContextMenuLabel:
|
|
2608
|
-
|
|
2609
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
2553
|
+
declare const ContextMenuLabel: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ContextMenuLabelProps> & React$1.RefAttributes<React$1.ElementRef<typeof ContextMenuPrimitive.Label>>>;
|
|
2554
|
+
type ContextMenuSeparatorProps = React$1.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>;
|
|
2610
2555
|
/** @experimental */
|
|
2611
|
-
declare const ContextMenuSeparator:
|
|
2556
|
+
declare const ContextMenuSeparator: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ContextMenuSeparatorProps> & React$1.RefAttributes<React$1.ElementRef<typeof ContextMenuPrimitive.Separator>>>;
|
|
2557
|
+
/** What `ContextMenuShortcut` is: a `span` component with a `displayName`. */
|
|
2558
|
+
type ContextMenuShortcutComponent = {
|
|
2559
|
+
(props: React$1.HTMLAttributes<HTMLSpanElement>): React$1.JSX.Element;
|
|
2560
|
+
displayName: string;
|
|
2561
|
+
};
|
|
2612
2562
|
/**
|
|
2613
2563
|
* A keyboard shortcut hint, right-aligned in the item.
|
|
2614
2564
|
*
|
|
2615
2565
|
* @experimental
|
|
2616
2566
|
*/
|
|
2617
|
-
declare const ContextMenuShortcut:
|
|
2618
|
-
({ className, ...props }: react.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
2619
|
-
displayName: string;
|
|
2620
|
-
};
|
|
2621
|
-
|
|
2567
|
+
declare const ContextMenuShortcut: ContextMenuShortcutComponent;
|
|
2622
2568
|
/**
|
|
2623
2569
|
* A splitter's accessible name, which the caller must supply one way or the
|
|
2624
2570
|
* other.
|
|
@@ -2634,18 +2580,18 @@ declare const ContextMenuShortcut: {
|
|
|
2634
2580
|
* precedence rules nobody writing the call site is thinking about.
|
|
2635
2581
|
*/
|
|
2636
2582
|
type SplitterName = {
|
|
2637
|
-
|
|
2638
|
-
|
|
2583
|
+
"aria-label": string;
|
|
2584
|
+
"aria-labelledby"?: never;
|
|
2639
2585
|
} | {
|
|
2640
|
-
|
|
2641
|
-
|
|
2586
|
+
"aria-labelledby": string;
|
|
2587
|
+
"aria-label"?: never;
|
|
2642
2588
|
};
|
|
2643
2589
|
/**
|
|
2644
2590
|
* A group of resizable panels, laid out horizontally or vertically.
|
|
2645
2591
|
*
|
|
2646
2592
|
* @experimental
|
|
2647
2593
|
*/
|
|
2648
|
-
declare const ResizablePanelGroup: ({ className, ...props }:
|
|
2594
|
+
declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.Group>) => JSX.Element;
|
|
2649
2595
|
/**
|
|
2650
2596
|
* One region of a panel group.
|
|
2651
2597
|
*
|
|
@@ -2661,91 +2607,32 @@ declare const ResizablePanel: typeof ResizablePrimitive.Panel;
|
|
|
2661
2607
|
*
|
|
2662
2608
|
* @experimental
|
|
2663
2609
|
*/
|
|
2664
|
-
declare const ResizableHandle: ({ withGrip, className, children, ...props }: Omit<
|
|
2665
|
-
|
|
2666
|
-
}) =>
|
|
2667
|
-
|
|
2668
|
-
/**
|
|
2669
|
-
* TreeView
|
|
2670
|
-
*
|
|
2671
|
-
* A keyboard-operable, virtualized tree. The layers panel of an editor is this control: a
|
|
2672
|
-
* hierarchy that can hold thousands of nodes, that someone navigates with arrow keys as much as
|
|
2673
|
-
* with a pointer, and that has to stay responsive while they do.
|
|
2674
|
-
*
|
|
2675
|
-
* **Why virtualized, and why that decides the markup.** A document of a few thousand blocks
|
|
2676
|
-
* renders a few thousand rows, and the cost is not the React work — it is layout and paint on
|
|
2677
|
-
* every expand, scroll and selection. Only the visible window is rendered here.
|
|
2678
|
-
*
|
|
2679
|
-
* That has a consequence the accessibility notes below depend on: with only a window in the DOM,
|
|
2680
|
-
* the nested `role="group"` markup the tree pattern usually uses **cannot be built**, because an
|
|
2681
|
-
* item's children may not be rendered at all. The APG covers this exact case by allowing a FLAT
|
|
2682
|
-
* set of `treeitem`s that describe the hierarchy through `aria-level`, `aria-setsize` and
|
|
2683
|
-
* `aria-posinset` instead of through nesting. A screen reader reads depth and position from those
|
|
2684
|
-
* attributes, so they are not decoration — without them a virtualized tree announces itself as a
|
|
2685
|
-
* flat list of whatever happens to be on screen.
|
|
2686
|
-
*
|
|
2687
|
-
* **Why a headless virtualizer.** The markup above is the requirement, so anything that owns the
|
|
2688
|
-
* DOM is unusable. `@tanstack/react-virtual` computes offsets and renders nothing.
|
|
2689
|
-
*
|
|
2690
|
-
* **State is controllable, not controlled.** `expandedIds`/`selectedId` may be passed with their
|
|
2691
|
-
* `onChange` partners to drive the tree from a store — which an editor will do, since selection is
|
|
2692
|
-
* shared with the canvas and the inspector — or omitted entirely, in which case the tree keeps its
|
|
2693
|
-
* own. Requiring a store for a tree in a settings dialog would be a poor trade.
|
|
2694
|
-
*
|
|
2695
|
-
* **Design specifications**:
|
|
2696
|
-
* - Row height: fixed 28px (`--tree-row`), so the virtualizer needs no measurement pass
|
|
2697
|
-
* - Indent: 12px per level, applied as padding so the whole row stays a hit target
|
|
2698
|
-
* - Selection: `bg-muted`, matching the menu highlight rather than a full-contrast flip
|
|
2699
|
-
* - Focus: `focus-visible` ring in the focus token
|
|
2700
|
-
*
|
|
2701
|
-
* **Accessibility**:
|
|
2702
|
-
* - `role="tree"` with flat `role="treeitem"` children carrying `aria-level`, `aria-setsize`,
|
|
2703
|
-
* `aria-posinset`, and `aria-expanded` on anything with children
|
|
2704
|
-
* - Roving tabindex: exactly one row is in the tab order, so Tab enters and leaves the tree once
|
|
2705
|
-
* rather than walking every node
|
|
2706
|
-
* - Arrow keys move and expand, per the APG tree pattern: Right expands then descends, Left
|
|
2707
|
-
* collapses then ascends, Home/End jump to the ends, `*` expands every sibling
|
|
2708
|
-
* - Typeahead focuses the next row whose label starts with what was typed
|
|
2709
|
-
* - Moving focus scrolls the row into view, which virtualization would otherwise prevent: a row
|
|
2710
|
-
* outside the window has no element to focus
|
|
2711
|
-
*
|
|
2712
|
-
* @example
|
|
2713
|
-
* ```tsx
|
|
2714
|
-
* <TreeView
|
|
2715
|
-
* nodes={layers}
|
|
2716
|
-
* aria-label="Layers"
|
|
2717
|
-
* selectedId={selected}
|
|
2718
|
-
* onSelectedChange={setSelected}
|
|
2719
|
-
* className="h-full"
|
|
2720
|
-
* />
|
|
2721
|
-
* ```
|
|
2722
|
-
*
|
|
2723
|
-
* @module
|
|
2724
|
-
*/
|
|
2725
|
-
|
|
2610
|
+
declare const ResizableHandle: ({ withGrip, className, children, ...props }: Omit<React$1.ComponentProps<typeof ResizablePrimitive.Separator>, "aria-label" | "aria-labelledby"> & SplitterName & {
|
|
2611
|
+
withGrip?: boolean;
|
|
2612
|
+
}) => JSX.Element;
|
|
2726
2613
|
/**
|
|
2727
2614
|
* One node of the tree. Children are omitted or empty for a leaf.
|
|
2728
2615
|
*
|
|
2729
2616
|
* @experimental
|
|
2730
2617
|
*/
|
|
2731
2618
|
interface TreeNode {
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2619
|
+
/** Stable identity. What selection and expansion are keyed by. */
|
|
2620
|
+
id: string;
|
|
2621
|
+
/** What the row shows. A string also feeds typeahead; anything else needs `textValue`. */
|
|
2622
|
+
label: React$1.ReactNode;
|
|
2623
|
+
/**
|
|
2624
|
+
* The text typeahead matches on, when `label` is not a string.
|
|
2625
|
+
*
|
|
2626
|
+
* Without it a row rendered as markup cannot be typed to, and a keyboard user loses the fastest
|
|
2627
|
+
* way through a long tree.
|
|
2628
|
+
*/
|
|
2629
|
+
textValue?: string;
|
|
2630
|
+
/** Children, if any. An empty array still marks the node as a parent. */
|
|
2631
|
+
children?: readonly TreeNode[];
|
|
2632
|
+
/** Shown before the label, after the twisty. */
|
|
2633
|
+
icon?: React$1.ReactNode;
|
|
2634
|
+
/** Skipped by every keyboard move and not selectable. */
|
|
2635
|
+
disabled?: boolean;
|
|
2749
2636
|
}
|
|
2750
2637
|
/**
|
|
2751
2638
|
* Which gesture a row's modifiers meant.
|
|
@@ -2762,205 +2649,156 @@ interface TreeNode {
|
|
|
2762
2649
|
* @experimental
|
|
2763
2650
|
*/
|
|
2764
2651
|
type TreeSelectionMode = "replace" | "toggle" | "extend";
|
|
2765
|
-
/**
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2652
|
+
/**
|
|
2653
|
+
* Read the gesture from the event that carried it.
|
|
2654
|
+
*
|
|
2655
|
+
* @experimental
|
|
2656
|
+
*/
|
|
2657
|
+
declare function treeSelectionMode(modifiers: {
|
|
2658
|
+
shiftKey: boolean;
|
|
2659
|
+
metaKey: boolean;
|
|
2660
|
+
ctrlKey: boolean;
|
|
2661
|
+
}): TreeSelectionMode;
|
|
2662
|
+
/**
|
|
2663
|
+
* Whether a row is in the selection at all.
|
|
2664
|
+
*
|
|
2665
|
+
* A helper rather than an expression inside the render, so the multi-select
|
|
2666
|
+
* branch is one call there instead of a condition — a small edit to a large
|
|
2667
|
+
* function is what pushes it across a complexity threshold.
|
|
2668
|
+
*
|
|
2669
|
+
* `selectedIds` when the caller owns a set, the single id otherwise, so a
|
|
2670
|
+
* caller that has not adopted the set keeps exactly the behaviour it had.
|
|
2671
|
+
*
|
|
2672
|
+
* @experimental
|
|
2673
|
+
*/
|
|
2674
|
+
declare function isRowSelected(id: string, primary: string | null | undefined, selectedIds: readonly string[] | undefined): boolean;
|
|
2675
|
+
/** @experimental */
|
|
2676
|
+
interface TreeViewProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
2677
|
+
/** The roots of the tree. */
|
|
2678
|
+
nodes: readonly TreeNode[];
|
|
2679
|
+
/** Expanded node ids, if the caller owns them. */
|
|
2680
|
+
expandedIds?: readonly string[];
|
|
2681
|
+
/** Which ids start expanded when the caller does not own expansion. */
|
|
2682
|
+
defaultExpandedIds?: readonly string[];
|
|
2683
|
+
/** Called with the full next set whenever a branch opens or closes. */
|
|
2684
|
+
onExpandedChange?: (ids: string[]) => void;
|
|
2685
|
+
/**
|
|
2686
|
+
* The selected node id, if the caller owns it.
|
|
2687
|
+
*
|
|
2688
|
+
* With `selectedIds` also supplied this is the PRIMARY — the row a detail
|
|
2689
|
+
* panel answers for. Drawn at a heavier weight so a reader can tell which
|
|
2690
|
+
* member of a multi-row selection the rest of the screen describes.
|
|
2691
|
+
*/
|
|
2692
|
+
selectedId?: string | null;
|
|
2693
|
+
/**
|
|
2694
|
+
* Every selected id, when the caller holds more than one.
|
|
2695
|
+
*
|
|
2696
|
+
* Additive: omit it and the tree behaves exactly as it did. Supplying it also
|
|
2697
|
+
* makes the tree announce itself as `aria-multiselectable`, which is why it
|
|
2698
|
+
* is a separate prop rather than inferred — a single-select tree claiming to
|
|
2699
|
+
* be multi-selectable is wrong in a way a screen-reader user acts on.
|
|
2700
|
+
*/
|
|
2701
|
+
selectedIds?: readonly string[];
|
|
2702
|
+
/** Which id starts selected when the caller does not own selection. */
|
|
2703
|
+
defaultSelectedId?: string | null;
|
|
2704
|
+
/** Called when a row is chosen, by pointer or by Enter. */
|
|
2705
|
+
onSelectedChange?: (id: string, mode: TreeSelectionMode) => void;
|
|
2706
|
+
/**
|
|
2707
|
+
* Names the tree for a screen reader. One of this or `aria-labelledby` is required: a tree
|
|
2708
|
+
* announced only as "tree" tells a user nothing about which one they are in.
|
|
2709
|
+
*/
|
|
2710
|
+
"aria-label"?: string;
|
|
2801
2711
|
}
|
|
2802
2712
|
/**
|
|
2803
2713
|
* A virtualized tree.
|
|
2804
2714
|
*
|
|
2805
2715
|
* @experimental
|
|
2806
2716
|
*/
|
|
2807
|
-
declare const TreeView:
|
|
2808
|
-
|
|
2717
|
+
declare const TreeView: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TreeViewProps> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2809
2718
|
/**
|
|
2810
2719
|
* The assistive-technology attributes a single thumb can carry.
|
|
2811
2720
|
*
|
|
2812
2721
|
* @experimental
|
|
2813
2722
|
*/
|
|
2814
2723
|
interface SliderThumbProps {
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2724
|
+
/** The thumb's accessible name. */
|
|
2725
|
+
"aria-label"?: string;
|
|
2726
|
+
/** An element naming the thumb, when the name is already on screen. */
|
|
2727
|
+
"aria-labelledby"?: string;
|
|
2728
|
+
/**
|
|
2729
|
+
* What the value MEANS, when the number alone does not say it — "40
|
|
2730
|
+
* percent", "Medium". Announced in place of the raw number.
|
|
2731
|
+
*/
|
|
2732
|
+
"aria-valuetext"?: string;
|
|
2733
|
+
/** An element carrying help text for this thumb. */
|
|
2734
|
+
"aria-describedby"?: string;
|
|
2826
2735
|
}
|
|
2827
2736
|
/**
|
|
2828
2737
|
* The slider's props, mirroring the Radix root.
|
|
2829
2738
|
*
|
|
2830
2739
|
* @experimental
|
|
2831
2740
|
*/
|
|
2832
|
-
type SliderProps = Omit<
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2741
|
+
type SliderProps = Omit<React$1.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>, "asChild"> & {
|
|
2742
|
+
/**
|
|
2743
|
+
* Assistive-technology attributes per thumb, in value order.
|
|
2744
|
+
*
|
|
2745
|
+
* The reason this exists at all: the focusable element with the `slider`
|
|
2746
|
+
* role is the THUMB, and none of these attributes are inherited from the
|
|
2747
|
+
* root. Anything a caller puts on the root is therefore announced by
|
|
2748
|
+
* nothing, and the thumbs are generated internally so they cannot be
|
|
2749
|
+
* reached any other way.
|
|
2750
|
+
*
|
|
2751
|
+
* Deliberately a curated set rather than the thumb's full prop type. This
|
|
2752
|
+
* is the surface assistive technology reads; opening it to arbitrary props
|
|
2753
|
+
* would let a caller replace the class names or the role the control
|
|
2754
|
+
* depends on, and every escape hatch in a design system eventually gets
|
|
2755
|
+
* used that way.
|
|
2756
|
+
*
|
|
2757
|
+
* Required for a RANGE: two thumbs sharing one name are announced
|
|
2758
|
+
* identically, so nothing says which end is held. A single thumb falls back
|
|
2759
|
+
* to the root's `aria-label`/`aria-labelledby`, so the one-thumb API stays
|
|
2760
|
+
* as documented.
|
|
2761
|
+
*/
|
|
2762
|
+
thumbs?: readonly SliderThumbProps[];
|
|
2854
2763
|
};
|
|
2855
2764
|
/**
|
|
2856
2765
|
* A bounded numeric value chosen by dragging.
|
|
2857
2766
|
*
|
|
2858
2767
|
* @experimental
|
|
2859
2768
|
*/
|
|
2860
|
-
declare const Slider:
|
|
2861
|
-
/**
|
|
2862
|
-
* Assistive-technology attributes per thumb, in value order.
|
|
2863
|
-
*
|
|
2864
|
-
* The reason this exists at all: the focusable element with the `slider`
|
|
2865
|
-
* role is the THUMB, and none of these attributes are inherited from the
|
|
2866
|
-
* root. Anything a caller puts on the root is therefore announced by
|
|
2867
|
-
* nothing, and the thumbs are generated internally so they cannot be
|
|
2868
|
-
* reached any other way.
|
|
2869
|
-
*
|
|
2870
|
-
* Deliberately a curated set rather than the thumb's full prop type. This
|
|
2871
|
-
* is the surface assistive technology reads; opening it to arbitrary props
|
|
2872
|
-
* would let a caller replace the class names or the role the control
|
|
2873
|
-
* depends on, and every escape hatch in a design system eventually gets
|
|
2874
|
-
* used that way.
|
|
2875
|
-
*
|
|
2876
|
-
* Required for a RANGE: two thumbs sharing one name are announced
|
|
2877
|
-
* identically, so nothing says which end is held. A single thumb falls back
|
|
2878
|
-
* to the root's `aria-label`/`aria-labelledby`, so the one-thumb API stays
|
|
2879
|
-
* as documented.
|
|
2880
|
-
*/
|
|
2881
|
-
thumbs?: readonly SliderThumbProps[];
|
|
2882
|
-
} & react.RefAttributes<HTMLSpanElement>>;
|
|
2883
|
-
|
|
2884
|
-
/**
|
|
2885
|
-
* The single owner of keyboard shortcuts for an application.
|
|
2886
|
-
*
|
|
2887
|
-
* ## Why this exists
|
|
2888
|
-
*
|
|
2889
|
-
* Shortcuts are usually registered by whoever needs them, each component adding its own
|
|
2890
|
-
* `document` listener. That works until two of them want the same key, and then it fails in a way
|
|
2891
|
-
* that is very hard to see: `stopPropagation()` does NOT stop other listeners on the same node —
|
|
2892
|
-
* that requires `stopImmediatePropagation()`, and even then only for listeners registered later.
|
|
2893
|
-
* So every global handler runs, in mount order, and mount order is not something a developer
|
|
2894
|
-
* chose. Pressing Escape during a drag can cancel the drag AND navigate away from the page,
|
|
2895
|
-
* because two independent listeners each believed they owned the key.
|
|
2896
|
-
*
|
|
2897
|
-
* This module replaces that with one listener and an explicit precedence rule.
|
|
2898
|
-
*
|
|
2899
|
-
* ## The model: a stack of layers
|
|
2900
|
-
*
|
|
2901
|
-
* A **layer** is a set of bindings belonging to one interactive context — the application shell,
|
|
2902
|
-
* a dialog, an editor canvas mid-drag. Layers are ordered, the topmost is offered each keystroke
|
|
2903
|
-
* first, and the first binding that matches consumes it.
|
|
2904
|
-
*
|
|
2905
|
-
* Precedence is `(depth, sequence)`: the deeper layer wins, and between layers at equal depth the
|
|
2906
|
-
* more recently registered wins.
|
|
2907
|
-
*
|
|
2908
|
-
* Of those two, **depth is declared and sequence is incidental** — and only declared properties
|
|
2909
|
-
* survive a refactor. A layer that unmounts and remounts takes a fresh sequence number, so a
|
|
2910
|
-
* subtree rebuilt for unrelated reasons can change equal-depth ordering. The guidance that falls
|
|
2911
|
-
* out: if relative order matters to you, express it as depth, because depth is the part of the
|
|
2912
|
-
* tuple you control. Equal-depth ordering is for stacking things that arrive in genuine
|
|
2913
|
-
* mount order, such as one dialog over another. Depth comes from how the application nests, so precedence
|
|
2914
|
-
* follows the component tree rather than a set of coordinated numbers — the z-index problem,
|
|
2915
|
-
* avoided. Equal-depth ordering is what stacks a second dialog above the first.
|
|
2916
|
-
*
|
|
2917
|
-
* A layer may be **blocking**, meaning it also swallows the keys it does NOT bind. That is the
|
|
2918
|
-
* property a drag or a modal needs: while it is up, nothing beneath it can act. This is the same
|
|
2919
|
-
* shape as a window manager's keyboard grab, and as the dismissable-layer stack this kit's
|
|
2920
|
-
* dialogs already sit on.
|
|
2921
|
-
*
|
|
2922
|
-
* ## What it deliberately does not do
|
|
2923
|
-
*
|
|
2924
|
-
* It listens in the BUBBLE phase, so a focused component that handles its own keys and calls
|
|
2925
|
-
* `stopPropagation()` wins without needing to know this module exists. React attaches its
|
|
2926
|
-
* handlers at the app root, below `document`, so an `onKeyDown` prop is a sufficient opt-out.
|
|
2927
|
-
* Capturing instead would make this module outrank every component in the tree, including the
|
|
2928
|
-
* kit's own dialogs, and there would be no way for a component to decline.
|
|
2929
|
-
*
|
|
2930
|
-
* @module lib/shortcuts/manager
|
|
2931
|
-
*/
|
|
2769
|
+
declare const Slider: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<SliderProps> & React$1.RefAttributes<React$1.ElementRef<typeof SliderPrimitive.Root>>>;
|
|
2932
2770
|
/**
|
|
2933
2771
|
* One shortcut and what it does.
|
|
2934
2772
|
*
|
|
2935
2773
|
* @experimental
|
|
2936
2774
|
*/
|
|
2937
2775
|
interface ShortcutBinding {
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2776
|
+
/** The keys, as understood by `parseKeys` — `"mod+s"`, `"Escape"`, `"g d"`. */
|
|
2777
|
+
keys: string;
|
|
2778
|
+
/**
|
|
2779
|
+
* What this does, in words, for a shortcuts help panel. Required because an undiscoverable
|
|
2780
|
+
* shortcut helps only the person who wrote it.
|
|
2781
|
+
*/
|
|
2782
|
+
description: string;
|
|
2783
|
+
/** Runs when the shortcut fires. */
|
|
2784
|
+
run: (event: KeyboardEvent) => void;
|
|
2785
|
+
/** Checked at press time; a binding whose condition is false is skipped and passes the key on. */
|
|
2786
|
+
when?: () => boolean;
|
|
2787
|
+
/**
|
|
2788
|
+
* Whether this fires while the user is typing in a field.
|
|
2789
|
+
*
|
|
2790
|
+
* Defaults to true for bindings whose FIRST chord carries a non-shift modifier or is Escape,
|
|
2791
|
+
* and false otherwise — the rule nearly every application converges on. `mod+s` must save
|
|
2792
|
+
* mid-sentence and Escape must dismiss, while a bare `n` must be able to be the letter n.
|
|
2793
|
+
*
|
|
2794
|
+
* The first chord decides because it is the keystroke that has to be taken from the field.
|
|
2795
|
+
* `mod+k c` is a command from its opening chord, so its bare `c` completes it in an input. A
|
|
2796
|
+
* sequence that OPENS on a plain character cannot fire while typing whatever it ends with:
|
|
2797
|
+
* allowing `g Escape` would mean swallowing the `g` of every word containing one.
|
|
2798
|
+
*/
|
|
2799
|
+
whenTyping?: boolean;
|
|
2800
|
+
/** Whether to call `preventDefault()` when it fires. Defaults to true. */
|
|
2801
|
+
preventDefault?: boolean;
|
|
2964
2802
|
}
|
|
2965
2803
|
/**
|
|
2966
2804
|
* How a layer behaves for keys it does not bind.
|
|
@@ -2968,41 +2806,41 @@ interface ShortcutBinding {
|
|
|
2968
2806
|
* @experimental
|
|
2969
2807
|
*/
|
|
2970
2808
|
interface ShortcutLayerOptions {
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
2809
|
+
/** Identifies the layer in diagnostics and in a help panel. */
|
|
2810
|
+
name: string;
|
|
2811
|
+
/** Precedence: deeper layers are offered keystrokes first. */
|
|
2812
|
+
depth: number;
|
|
2813
|
+
/**
|
|
2814
|
+
* Whether unmatched keys stop here instead of reaching layers beneath.
|
|
2815
|
+
*
|
|
2816
|
+
* The reason a drag can be interrupted safely: everything below is inert for as long as this
|
|
2817
|
+
* is set, so no other context can act on a keystroke aimed at this one.
|
|
2818
|
+
*/
|
|
2819
|
+
blocking?: boolean;
|
|
2820
|
+
/**
|
|
2821
|
+
* Sorted ABOVE depth, so a layer can outrank one nested deeper than itself.
|
|
2822
|
+
*
|
|
2823
|
+
* Depth alone cannot express a modal. A modal wants to sit above every ordinary layer, but the
|
|
2824
|
+
* host chooses how deeply its own shortcuts are scoped, so any depth a modal picks can be tied
|
|
2825
|
+
* or beaten by a scope the host nests one level further. Priority is the axis the host does not
|
|
2826
|
+
* control: ordinary layers leave it at 0 and a modal raises it.
|
|
2827
|
+
*
|
|
2828
|
+
* KNOWN LIMIT, stated so it is not discovered: layers at EQUAL priority still compare depth
|
|
2829
|
+
* before registration order. Two modals therefore stack by how deeply each is scoped rather
|
|
2830
|
+
* than by which opened last, so a modal opened later at a shallower depth can sit under one
|
|
2831
|
+
* opened earlier and nested deeper — while whatever renders them puts the newer on top.
|
|
2832
|
+
*
|
|
2833
|
+
* Fixing it needs the manager to record when a layer is ACTIVATED, which registration order
|
|
2834
|
+
* does not capture: `useShortcuts` registers once at mount and updates its options in place, so
|
|
2835
|
+
* a layer enabled later still carries its mount-time sequence. Not attempted here because
|
|
2836
|
+
* nothing reaches it yet: the layers that raise priority are modal HOLDS, and a hold blocks the
|
|
2837
|
+
* keystroke that would open the next one — the command palette cannot be summoned over a dialog
|
|
2838
|
+
* that is already holding, so two of them are not both active for a keystroke to be resolved
|
|
2839
|
+
* between.
|
|
2840
|
+
*/
|
|
2841
|
+
priority?: number;
|
|
2842
|
+
/** Whether the layer participates at all. A disabled layer neither matches nor blocks. */
|
|
2843
|
+
enabled?: boolean;
|
|
3006
2844
|
}
|
|
3007
2845
|
/**
|
|
3008
2846
|
* A layer's registration, held by whoever created it.
|
|
@@ -3010,10 +2848,10 @@ interface ShortcutLayerOptions {
|
|
|
3010
2848
|
* @experimental
|
|
3011
2849
|
*/
|
|
3012
2850
|
interface ShortcutRegistration {
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
2851
|
+
/** Replace this layer's bindings and options without changing its precedence. */
|
|
2852
|
+
update: (bindings: readonly ShortcutBinding[], options: ShortcutLayerOptions) => void;
|
|
2853
|
+
/** Remove the layer. */
|
|
2854
|
+
dispose: () => void;
|
|
3017
2855
|
}
|
|
3018
2856
|
/**
|
|
3019
2857
|
* Options for creating a manager.
|
|
@@ -3021,12 +2859,12 @@ interface ShortcutRegistration {
|
|
|
3021
2859
|
* @experimental
|
|
3022
2860
|
*/
|
|
3023
2861
|
interface ShortcutManagerOptions {
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
2862
|
+
/** Whether `mod` means Command. Detected from the platform when omitted. */
|
|
2863
|
+
isApple?: boolean;
|
|
2864
|
+
/** How long a partially typed sequence waits for its next key, in milliseconds. */
|
|
2865
|
+
sequenceTimeoutMs?: number;
|
|
2866
|
+
/** Clock source, for tests that need to control sequence expiry. */
|
|
2867
|
+
now?: () => number;
|
|
3030
2868
|
}
|
|
3031
2869
|
/**
|
|
3032
2870
|
* A shortcut manager: the registry, the matcher, and the one listener.
|
|
@@ -3034,31 +2872,31 @@ interface ShortcutManagerOptions {
|
|
|
3034
2872
|
* @experimental
|
|
3035
2873
|
*/
|
|
3036
2874
|
interface ShortcutManager {
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
2875
|
+
/** Add a layer. */
|
|
2876
|
+
register: (bindings: readonly ShortcutBinding[], options: ShortcutLayerOptions) => ShortcutRegistration;
|
|
2877
|
+
/**
|
|
2878
|
+
* Offer a keystroke to the stack. Returns whether it was consumed.
|
|
2879
|
+
*
|
|
2880
|
+
* Public so the behaviour can be tested without a DOM, and so a host that already owns its
|
|
2881
|
+
* event plumbing can drive the manager itself.
|
|
2882
|
+
*/
|
|
2883
|
+
handle: (event: KeyboardEvent) => boolean;
|
|
2884
|
+
/** Install the single listener on a target, returning a function that removes it. */
|
|
2885
|
+
attach: (target: Pick<EventTarget, "addEventListener" | "removeEventListener">) => () => void;
|
|
2886
|
+
/**
|
|
2887
|
+
* Every active binding, most-precedent layer first, for a shortcuts help panel.
|
|
2888
|
+
*
|
|
2889
|
+
* The same array is returned until the layer stack changes, so it is safe to use as an external
|
|
2890
|
+
* store snapshot without re-rendering on every read.
|
|
2891
|
+
*/
|
|
2892
|
+
activeBindings: () => readonly ActiveShortcut[];
|
|
2893
|
+
/**
|
|
2894
|
+
* Watch for changes to the layer stack.
|
|
2895
|
+
*
|
|
2896
|
+
* A help panel mounting alongside the components that register shortcuts would otherwise read
|
|
2897
|
+
* BEFORE their effects run and show nothing, with no later render to correct it.
|
|
2898
|
+
*/
|
|
2899
|
+
subscribe: (onChange: () => void) => () => void;
|
|
3062
2900
|
}
|
|
3063
2901
|
/**
|
|
3064
2902
|
* A binding as presented to a help panel, with the layer it came from.
|
|
@@ -3066,70 +2904,69 @@ interface ShortcutManager {
|
|
|
3066
2904
|
* @experimental
|
|
3067
2905
|
*/
|
|
3068
2906
|
interface ActiveShortcut {
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
2907
|
+
keys: string;
|
|
2908
|
+
description: string;
|
|
2909
|
+
layer: string;
|
|
3072
2910
|
}
|
|
3073
2911
|
/**
|
|
3074
2912
|
* Create a shortcut manager.
|
|
3075
2913
|
*
|
|
3076
2914
|
* @experimental
|
|
3077
2915
|
*/
|
|
3078
|
-
declare function createShortcutManager(options?: ShortcutManagerOptions): ShortcutManager;
|
|
3079
|
-
|
|
2916
|
+
export declare function createShortcutManager(options?: ShortcutManagerOptions): ShortcutManager;
|
|
3080
2917
|
/**
|
|
3081
2918
|
* Props for {@link ShortcutProvider}.
|
|
3082
2919
|
*
|
|
3083
2920
|
* @experimental
|
|
3084
2921
|
*/
|
|
3085
2922
|
interface ShortcutProviderProps extends ShortcutManagerOptions {
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
2923
|
+
children?: React$1.ReactNode;
|
|
2924
|
+
/**
|
|
2925
|
+
* Where the listener is installed. Defaults to `document`.
|
|
2926
|
+
*
|
|
2927
|
+
* The bubble phase is deliberate: a component that handles its own keys and calls
|
|
2928
|
+
* `stopPropagation` wins without knowing this exists, because React attaches its handlers
|
|
2929
|
+
* below `document`.
|
|
2930
|
+
*/
|
|
2931
|
+
target?: Pick<EventTarget, "addEventListener" | "removeEventListener"> | null;
|
|
3095
2932
|
}
|
|
3096
2933
|
/**
|
|
3097
2934
|
* Installs the application's one keydown listener and roots the layer stack.
|
|
3098
2935
|
*
|
|
3099
2936
|
* @experimental
|
|
3100
2937
|
*/
|
|
3101
|
-
declare function ShortcutProvider({ children, target, ...managerOptions }: ShortcutProviderProps):
|
|
2938
|
+
export declare function ShortcutProvider({ children, target, ...managerOptions }: ShortcutProviderProps): React$1.JSX.Element;
|
|
3102
2939
|
/**
|
|
3103
2940
|
* Raises the precedence of everything inside it by one level.
|
|
3104
2941
|
*
|
|
3105
2942
|
* @experimental
|
|
3106
2943
|
*/
|
|
3107
|
-
declare function ShortcutScope({ children
|
|
3108
|
-
|
|
3109
|
-
}):
|
|
2944
|
+
export declare function ShortcutScope({ children }: {
|
|
2945
|
+
children?: React$1.ReactNode;
|
|
2946
|
+
}): React$1.JSX.Element;
|
|
3110
2947
|
/**
|
|
3111
2948
|
* Options for {@link useShortcuts}, minus the depth, which comes from the tree.
|
|
3112
2949
|
*
|
|
3113
2950
|
* @experimental
|
|
3114
2951
|
*/
|
|
3115
2952
|
interface UseShortcutsOptions {
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
2953
|
+
/** Identifies this layer in a help panel. */
|
|
2954
|
+
name: string;
|
|
2955
|
+
/** Whether the layer participates. A disabled layer neither matches nor blocks. */
|
|
2956
|
+
enabled?: boolean;
|
|
2957
|
+
/**
|
|
2958
|
+
* Whether unmatched keys stop here rather than reaching layers beneath.
|
|
2959
|
+
*
|
|
2960
|
+
* Set this while a drag or a modal interaction owns the keyboard.
|
|
2961
|
+
*/
|
|
2962
|
+
blocking?: boolean;
|
|
2963
|
+
/**
|
|
2964
|
+
* Sorted ABOVE depth, so a layer can outrank one nested deeper than itself.
|
|
2965
|
+
*
|
|
2966
|
+
* For a modal, whose hold must not be tied or beaten by a host scoping its own shortcuts one
|
|
2967
|
+
* level further. Ordinary layers leave this alone.
|
|
2968
|
+
*/
|
|
2969
|
+
priority?: number;
|
|
3133
2970
|
}
|
|
3134
2971
|
/**
|
|
3135
2972
|
* Register shortcuts for as long as the calling component is mounted.
|
|
@@ -3139,13 +2976,13 @@ interface UseShortcutsOptions {
|
|
|
3139
2976
|
*
|
|
3140
2977
|
* @experimental
|
|
3141
2978
|
*/
|
|
3142
|
-
declare function useShortcuts(bindings: readonly ShortcutBinding[], options: UseShortcutsOptions): void;
|
|
2979
|
+
export declare function useShortcuts(bindings: readonly ShortcutBinding[], options: UseShortcutsOptions): void;
|
|
3143
2980
|
/**
|
|
3144
2981
|
* The manager itself, for a help panel that lists what is currently bound.
|
|
3145
2982
|
*
|
|
3146
2983
|
* @experimental
|
|
3147
2984
|
*/
|
|
3148
|
-
declare function useShortcutManager(): ShortcutManager;
|
|
2985
|
+
export declare function useShortcutManager(): ShortcutManager;
|
|
3149
2986
|
/**
|
|
3150
2987
|
* The shortcuts currently in effect, most precedent first.
|
|
3151
2988
|
*
|
|
@@ -3159,8 +2996,7 @@ declare function useShortcutManager(): ShortcutManager;
|
|
|
3159
2996
|
*
|
|
3160
2997
|
* @experimental
|
|
3161
2998
|
*/
|
|
3162
|
-
declare function useActiveShortcuts(): readonly ActiveShortcut[];
|
|
3163
|
-
|
|
2999
|
+
export declare function useActiveShortcuts(): readonly ActiveShortcut[];
|
|
3164
3000
|
/**
|
|
3165
3001
|
* A layout effect in the browser, a plain effect where there is no DOM.
|
|
3166
3002
|
*
|
|
@@ -3180,8 +3016,7 @@ declare function useActiveShortcuts(): readonly ActiveShortcut[];
|
|
|
3180
3016
|
*
|
|
3181
3017
|
* @experimental
|
|
3182
3018
|
*/
|
|
3183
|
-
declare const useIsomorphicLayoutEffect: typeof
|
|
3184
|
-
|
|
3019
|
+
export declare const useIsomorphicLayoutEffect: typeof React$1.useLayoutEffect;
|
|
3185
3020
|
/**
|
|
3186
3021
|
* Parsing and matching for keyboard shortcut specifications.
|
|
3187
3022
|
*
|
|
@@ -3206,14 +3041,14 @@ declare const useIsomorphicLayoutEffect: typeof react.useEffect;
|
|
|
3206
3041
|
* @experimental
|
|
3207
3042
|
*/
|
|
3208
3043
|
interface KeyChord {
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3044
|
+
/** The `KeyboardEvent.key` value, normalized to lower case for single characters. */
|
|
3045
|
+
readonly key: string;
|
|
3046
|
+
/** Command on Apple platforms, Control elsewhere. */
|
|
3047
|
+
readonly mod: boolean;
|
|
3048
|
+
readonly ctrl: boolean;
|
|
3049
|
+
readonly meta: boolean;
|
|
3050
|
+
readonly alt: boolean;
|
|
3051
|
+
readonly shift: boolean;
|
|
3217
3052
|
}
|
|
3218
3053
|
/**
|
|
3219
3054
|
* A shortcut: one chord, or several pressed in order.
|
|
@@ -3221,6 +3056,17 @@ interface KeyChord {
|
|
|
3221
3056
|
* @experimental
|
|
3222
3057
|
*/
|
|
3223
3058
|
type KeySequence = readonly KeyChord[];
|
|
3059
|
+
/**
|
|
3060
|
+
* Whether shift is part of what a caller can meaningfully require for this key.
|
|
3061
|
+
*
|
|
3062
|
+
* On a US layout `?` is already Shift+/, so the browser reports `key: "?"` with `shiftKey: true`.
|
|
3063
|
+
* A spec of `"?"` must therefore match an event that carries shift, or the most natural way to
|
|
3064
|
+
* write the binding would never fire. For letters and named keys the opposite holds: `"s"` must
|
|
3065
|
+
* NOT match Shift+S, or a binding would swallow a keystroke its author never claimed.
|
|
3066
|
+
*
|
|
3067
|
+
* The dividing line is whether the character itself already encodes the shift.
|
|
3068
|
+
*/
|
|
3069
|
+
declare function shiftIsMeaningful(key: string): boolean;
|
|
3224
3070
|
/**
|
|
3225
3071
|
* Parse a spec into the sequence of chords it describes.
|
|
3226
3072
|
*
|
|
@@ -3229,19 +3075,19 @@ type KeySequence = readonly KeyChord[];
|
|
|
3229
3075
|
*
|
|
3230
3076
|
* @experimental
|
|
3231
3077
|
*/
|
|
3232
|
-
declare function parseKeys(spec: string): KeySequence;
|
|
3078
|
+
export declare function parseKeys(spec: string): KeySequence;
|
|
3233
3079
|
/**
|
|
3234
3080
|
* The modifier state an event carries, with `mod` already resolved for the platform.
|
|
3235
3081
|
*
|
|
3236
3082
|
* @experimental
|
|
3237
3083
|
*/
|
|
3238
3084
|
interface ModifierState {
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3085
|
+
readonly ctrlKey: boolean;
|
|
3086
|
+
readonly metaKey: boolean;
|
|
3087
|
+
readonly altKey: boolean;
|
|
3088
|
+
readonly shiftKey: boolean;
|
|
3089
|
+
/** Optional, so a caller driving the matcher by hand need not synthesise one. */
|
|
3090
|
+
readonly getModifierState?: (key: string) => boolean;
|
|
3245
3091
|
}
|
|
3246
3092
|
/**
|
|
3247
3093
|
* Whether a chord describes the given keystroke.
|
|
@@ -3256,7 +3102,7 @@ interface ModifierState {
|
|
|
3256
3102
|
*
|
|
3257
3103
|
* @experimental
|
|
3258
3104
|
*/
|
|
3259
|
-
declare function chordMatches(chord: KeyChord, key: string, state: ModifierState, isApple: boolean): boolean;
|
|
3105
|
+
export declare function chordMatches(chord: KeyChord, key: string, state: ModifierState, isApple: boolean): boolean;
|
|
3260
3106
|
/**
|
|
3261
3107
|
* Whether this platform uses Command as its primary modifier.
|
|
3262
3108
|
*
|
|
@@ -3266,8 +3112,7 @@ declare function chordMatches(chord: KeyChord, key: string, state: ModifierState
|
|
|
3266
3112
|
*
|
|
3267
3113
|
* @experimental
|
|
3268
3114
|
*/
|
|
3269
|
-
declare function detectApplePlatform(): boolean;
|
|
3270
|
-
|
|
3115
|
+
export declare function detectApplePlatform(): boolean;
|
|
3271
3116
|
/**
|
|
3272
3117
|
* How wide a field's CONTROL may grow.
|
|
3273
3118
|
*
|
|
@@ -3292,69 +3137,67 @@ type FieldWidth = "half" | "full" | "fill";
|
|
|
3292
3137
|
* @experimental
|
|
3293
3138
|
*/
|
|
3294
3139
|
interface FieldShellRenderProps {
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3140
|
+
id: string;
|
|
3141
|
+
describedBy: string | undefined;
|
|
3142
|
+
invalid: boolean | undefined;
|
|
3298
3143
|
}
|
|
3299
3144
|
/** @experimental */
|
|
3300
3145
|
interface FieldShellProps {
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3146
|
+
label?: React.ReactNode;
|
|
3147
|
+
/** Helper text under the control. Rendered only when present. */
|
|
3148
|
+
description?: React.ReactNode;
|
|
3149
|
+
/** Validation message under the control. Rendered only when present. */
|
|
3150
|
+
error?: React.ReactNode;
|
|
3151
|
+
/** Defaults to "half": most admin inputs are short values. */
|
|
3152
|
+
width?: FieldWidth;
|
|
3153
|
+
htmlFor?: string;
|
|
3154
|
+
className?: string;
|
|
3155
|
+
/**
|
|
3156
|
+
* Either a single element to clone, or a function that receives the
|
|
3157
|
+
* computed wiring and applies it itself.
|
|
3158
|
+
*
|
|
3159
|
+
* The element form is `FieldShell` cloning it with `cloneElement` to
|
|
3160
|
+
* attach the id, `aria-describedby` and `aria-invalid` it computes —
|
|
3161
|
+
* unchanged from before, and still the right choice for an atomic control
|
|
3162
|
+
* (`Input`, `Textarea`, `Switch`) that spreads its own props onto a real
|
|
3163
|
+
* DOM node. Typing this branch as `ReactNode` would let a composite field
|
|
3164
|
+
* (two inputs with a unit between them, for example) compile and then
|
|
3165
|
+
* crash on mount, so it stays a single `ReactElement` — wrap several
|
|
3166
|
+
* elements in one real element, a `<div>`, not a `<Fragment>`: a Fragment
|
|
3167
|
+
* forwards none of those props to what is inside it.
|
|
3168
|
+
*
|
|
3169
|
+
* The function form exists for a compound control built on a Radix `Root`
|
|
3170
|
+
* (`Select`, and by the same shape `RadioGroup`): `Root` destructures a
|
|
3171
|
+
* fixed, named prop list and never spreads the remainder, so `id` handed
|
|
3172
|
+
* to it via `cloneElement` is silently dropped rather than reaching the
|
|
3173
|
+
* actual focusable element two levels down (`Select` > `SelectTrigger` >
|
|
3174
|
+
* `SelectValue`). A render function is called with `FieldShellRenderProps`
|
|
3175
|
+
* and applies `id`/`describedBy`/`invalid` to whichever nested element is
|
|
3176
|
+
* the real control, instead of relying on a single top-level clone that
|
|
3177
|
+
* can never reach it.
|
|
3178
|
+
*/
|
|
3179
|
+
children: React.ReactElement | ((field: FieldShellRenderProps) => React.ReactNode);
|
|
3335
3180
|
}
|
|
3336
3181
|
/** @experimental */
|
|
3337
3182
|
interface FormActionsProps {
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3183
|
+
/**
|
|
3184
|
+
* Whether the form has unsaved changes. Supplied by the page from the form
|
|
3185
|
+
* state that already tracks it; never computed here.
|
|
3186
|
+
*/
|
|
3187
|
+
dirty?: boolean;
|
|
3188
|
+
className?: string;
|
|
3189
|
+
children: React.ReactNode;
|
|
3345
3190
|
}
|
|
3346
|
-
|
|
3347
3191
|
/** @experimental */
|
|
3348
|
-
declare function FieldShell({ label, description, error, width, htmlFor, className, children
|
|
3349
|
-
|
|
3192
|
+
export declare function FieldShell({ label, description, error, width, htmlFor, className, children }: FieldShellProps): JSX.Element;
|
|
3350
3193
|
/** @experimental */
|
|
3351
3194
|
interface FormSectionProps {
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3195
|
+
/** Short label above the card, rendered uppercase. */
|
|
3196
|
+
label: string;
|
|
3197
|
+
/** Optional sentence under the label. */
|
|
3198
|
+
description?: React$1.ReactNode;
|
|
3199
|
+
className?: string;
|
|
3200
|
+
children: React$1.ReactNode;
|
|
3358
3201
|
}
|
|
3359
3202
|
/**
|
|
3360
3203
|
* A labelled card holding a group of fields.
|
|
@@ -3366,8 +3209,7 @@ interface FormSectionProps {
|
|
|
3366
3209
|
* page rather than to a section.
|
|
3367
3210
|
* @experimental
|
|
3368
3211
|
*/
|
|
3369
|
-
declare function FormSection({ label, description, className, children
|
|
3370
|
-
|
|
3212
|
+
export declare function FormSection({ label, description, className, children }: FormSectionProps): JSX.Element;
|
|
3371
3213
|
/**
|
|
3372
3214
|
* One action bar per form, at the end of the page's measure.
|
|
3373
3215
|
*
|
|
@@ -3377,16 +3219,15 @@ declare function FormSection({ label, description, className, children, }: FormS
|
|
|
3377
3219
|
* first as soon as either changed.
|
|
3378
3220
|
* @experimental
|
|
3379
3221
|
*/
|
|
3380
|
-
declare function FormActions({ dirty, className, children }: FormActionsProps):
|
|
3381
|
-
|
|
3222
|
+
export declare function FormActions({ dirty, className, children }: FormActionsProps): JSX.Element;
|
|
3382
3223
|
/** @experimental */
|
|
3383
3224
|
interface PageShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3225
|
+
/**
|
|
3226
|
+
* Which measure the content column is bounded to. `full` removes the cap so
|
|
3227
|
+
* the column takes whatever the panel gives it, while KEEPING the gutter — a
|
|
3228
|
+
* full-width page is still inset from the panel's edge.
|
|
3229
|
+
*/
|
|
3230
|
+
width?: "form" | "wide" | "full";
|
|
3390
3231
|
}
|
|
3391
3232
|
/**
|
|
3392
3233
|
* What each named width resolves to, owned here because this is what applies it.
|
|
@@ -3404,7 +3245,7 @@ interface PageShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
3404
3245
|
*
|
|
3405
3246
|
* @experimental
|
|
3406
3247
|
*/
|
|
3407
|
-
declare const SHELL_MEASURE: Record<NonNullable<PageShellProps["width"]>, string>;
|
|
3248
|
+
export declare const SHELL_MEASURE: Record<NonNullable<PageShellProps["width"]>, string>;
|
|
3408
3249
|
/**
|
|
3409
3250
|
* The page's inset and measure, owned in one place and spent as GRID COLUMNS.
|
|
3410
3251
|
*
|
|
@@ -3431,7 +3272,7 @@ declare const SHELL_MEASURE: Record<NonNullable<PageShellProps["width"]>, string
|
|
|
3431
3272
|
* "how far is content from the panel's edge".
|
|
3432
3273
|
* @experimental
|
|
3433
3274
|
*/
|
|
3434
|
-
declare const PageShell:
|
|
3275
|
+
export declare const PageShell: ForwardRefExoticComponent<PropsWithoutRef<PageShellProps> & RefAttributes<HTMLDivElement>>;
|
|
3435
3276
|
/** @experimental */
|
|
3436
3277
|
type BleedProps = HTMLAttributes<HTMLDivElement>;
|
|
3437
3278
|
/**
|
|
@@ -3456,22 +3297,21 @@ type BleedProps = HTMLAttributes<HTMLDivElement>;
|
|
|
3456
3297
|
* precisely what makes it stop working.
|
|
3457
3298
|
* @experimental
|
|
3458
3299
|
*/
|
|
3459
|
-
declare const Bleed:
|
|
3460
|
-
|
|
3300
|
+
export declare const Bleed: ForwardRefExoticComponent<PropsWithoutRef<BleedProps> & RefAttributes<HTMLDivElement>>;
|
|
3461
3301
|
/** @experimental */
|
|
3462
3302
|
interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3303
|
+
/** The page's name, rendered as its `h1`. */
|
|
3304
|
+
title: string;
|
|
3305
|
+
/**
|
|
3306
|
+
* A sentence under the title. A `ReactNode` rather than a string because a
|
|
3307
|
+
* description carrying a link or an inline code span is ordinary here, and
|
|
3308
|
+
* typing it narrowly would push those pages back to hand-rolling the header.
|
|
3309
|
+
*/
|
|
3310
|
+
description?: ReactNode;
|
|
3311
|
+
/** The trail above the title. The page supplies it; this only places it. */
|
|
3312
|
+
breadcrumbs?: ReactNode;
|
|
3313
|
+
/** Page-level actions, trailing the title on one line where there is room. */
|
|
3314
|
+
actions?: ReactNode;
|
|
3475
3315
|
}
|
|
3476
3316
|
/**
|
|
3477
3317
|
* A page's own identity — its trail, its name, its one-line summary and its
|
|
@@ -3497,6 +3337,6 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
|
3497
3337
|
* prop.
|
|
3498
3338
|
* @experimental
|
|
3499
3339
|
*/
|
|
3500
|
-
declare const PageHeader:
|
|
3501
|
-
|
|
3502
|
-
|
|
3340
|
+
export declare const PageHeader: ForwardRefExoticComponent<PropsWithoutRef<PageHeaderProps> & RefAttributes<HTMLElement>>;
|
|
3341
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type ActionCallbacks, type ActiveShortcut, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BleedProps, Button, type ButtonProps, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorPickerProps, type ColorSwatch, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataFetcher, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type FieldShellProps, type FieldShellRenderProps, type FieldWidth, type FilterInfo, type FormActionsProps, type FormLabelWithTooltipProps, type FormSectionProps, type GridProps, Input, type InputProps, type KeyChord, type KeySequence, Label, type ListResponse, type ModifierState, type PageHeaderProps, type PageShellProps, type PaginationConfig, type PaginationMeta, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, type ProgressProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, type SheetContentRef, SheetDescription, type SheetDescriptionProps, type SheetDescriptionRef, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetOverlay, type SheetOverlayProps, type SheetOverlayRef, SheetPortal, type SheetProps, SheetTitle, type SheetTitleProps, type SheetTitleRef, SheetTrigger, type SheetTriggerProps, type ShortcutBinding, type ShortcutLayerOptions, type ShortcutManager, type ShortcutManagerOptions, type ShortcutProviderProps, type ShortcutRegistration, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderThumbProps, type SortInfo, Spinner, type SpinnerProps, type StackProps, type StatProps, Switch, Table, TableBody, TableCaption, TableCell, type TableEmptyProps, type TableErrorProps, TableFooter, TableHead, TableHeader, type TableParams, TableRow, type TableSearchProps, type TableSkeletonProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeNode, TreeView, type TreeViewProps, type UseShortcutsOptions, alertVariants, badgeVariants, buttonVariants, cardVariants, dialogContentVariants, inputVariants, selectTriggerVariants, sheetVariants, spinnerVariants, toast, usePortalContainer };
|
|
3342
|
+
//# sourceMappingURL=index.d.ts.map
|