@vhyxui/react 0.1.0-alpha.1
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/Alert-BJ1O0bnK.cjs +1 -0
- package/dist/Alert-am3ANPTH.js +99 -0
- package/dist/Badge-Fuc7l-1E.js +38 -0
- package/dist/Badge-RM7n86Rq.cjs +1 -0
- package/dist/Breadcrumb-Db7ASomJ.js +90 -0
- package/dist/Breadcrumb-StitgXXx.cjs +1 -0
- package/dist/Button-B32xz0b5.js +58 -0
- package/dist/Button-CfYG4zkG.cjs +1 -0
- package/dist/Card-D7ZNeWtE.js +75 -0
- package/dist/Card-d5xrWgQS.cjs +1 -0
- package/dist/Checkbox-DWl91ci_.js +92 -0
- package/dist/Checkbox-DvkT6QP9.cjs +1 -0
- package/dist/Dialog-CtYu14zl.js +245 -0
- package/dist/Dialog-gPT4noD8.cjs +1 -0
- package/dist/Drawer-BFJxsPG1.js +246 -0
- package/dist/Drawer-BygSIQQn.cjs +1 -0
- package/dist/Field-Bv07PL2M.js +120 -0
- package/dist/Field-D6FSsUGj.cjs +1 -0
- package/dist/Input-Dqt5q33I.js +151 -0
- package/dist/Input-OFmZxiHe.cjs +1 -0
- package/dist/Pagination-C1h7OTgM.js +128 -0
- package/dist/Pagination-CmmcBPNz.cjs +1 -0
- package/dist/Popover-BPFkS4xn.cjs +1 -0
- package/dist/Popover-MxUovsIt.js +194 -0
- package/dist/Progress-DWLr6Bq2.js +75 -0
- package/dist/Progress-FO-4WX0i.cjs +1 -0
- package/dist/RadioItem-BfkTHBxQ.cjs +1 -0
- package/dist/RadioItem-CzHSS_qK.js +141 -0
- package/dist/Select-C9yB2B8M.cjs +1 -0
- package/dist/Select-DjeJOdb7.js +327 -0
- package/dist/Separator-C5lPGzes.cjs +1 -0
- package/dist/Separator-DQT58t90.js +52 -0
- package/dist/Spinner-Cd5tcOLS.js +61 -0
- package/dist/Spinner-DSHhLV-r.cjs +1 -0
- package/dist/Switch-BU_Tcttb.cjs +1 -0
- package/dist/Switch-DOAZfSV0.js +64 -0
- package/dist/Tabs-BTfm4LbV.js +220 -0
- package/dist/Tabs-DuU02-UD.cjs +1 -0
- package/dist/Textarea-CLrctxHU.js +104 -0
- package/dist/Textarea-H6evM8L4.cjs +1 -0
- package/dist/Toast-0acAjZTB.js +167 -0
- package/dist/Toast-ndaxbpcV.cjs +1 -0
- package/dist/Tooltip-BAmErB_g.js +107 -0
- package/dist/Tooltip-CCd6VRvZ.cjs +1 -0
- package/dist/VhyxUIProvider-C9NxI-tU.cjs +1 -0
- package/dist/VhyxUIProvider-D1vNoiIk.js +34 -0
- package/dist/alert.cjs +1 -0
- package/dist/alert.d.ts +25 -0
- package/dist/alert.js +4 -0
- package/dist/badge.cjs +1 -0
- package/dist/badge.d.ts +31 -0
- package/dist/badge.js +4 -0
- package/dist/breadcrumb.cjs +1 -0
- package/dist/breadcrumb.d.ts +81 -0
- package/dist/breadcrumb.js +4 -0
- package/dist/button.cjs +1 -0
- package/dist/button.d.ts +36 -0
- package/dist/button.js +4 -0
- package/dist/card.cjs +1 -0
- package/dist/card.d.ts +72 -0
- package/dist/card.js +4 -0
- package/dist/checkbox.cjs +1 -0
- package/dist/checkbox.d.ts +33 -0
- package/dist/checkbox.js +4 -0
- package/dist/dialog.cjs +1 -0
- package/dist/dialog.d.ts +112 -0
- package/dist/dialog.js +4 -0
- package/dist/drawer.cjs +1 -0
- package/dist/drawer.d.ts +110 -0
- package/dist/drawer.js +4 -0
- package/dist/form.cjs +1 -0
- package/dist/form.d.ts +116 -0
- package/dist/form.js +6 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1184 -0
- package/dist/index.js +83 -0
- package/dist/input.cjs +1 -0
- package/dist/input.d.ts +31 -0
- package/dist/input.js +4 -0
- package/dist/jsx-runtime-BRMkMA8J.cjs +22 -0
- package/dist/jsx-runtime-CL69jGNW.js +279 -0
- package/dist/pagination.cjs +1 -0
- package/dist/pagination.d.ts +32 -0
- package/dist/pagination.js +4 -0
- package/dist/popover.cjs +1 -0
- package/dist/popover.d.ts +72 -0
- package/dist/popover.js +4 -0
- package/dist/progress.cjs +1 -0
- package/dist/progress.d.ts +35 -0
- package/dist/progress.js +4 -0
- package/dist/radio.cjs +1 -0
- package/dist/radio.d.ts +47 -0
- package/dist/radio.js +5 -0
- package/dist/select.cjs +1 -0
- package/dist/select.d.ts +97 -0
- package/dist/select.js +4 -0
- package/dist/separator.cjs +1 -0
- package/dist/separator.d.ts +21 -0
- package/dist/separator.js +4 -0
- package/dist/spinner.cjs +1 -0
- package/dist/spinner.d.ts +24 -0
- package/dist/spinner.js +4 -0
- package/dist/style.css +1 -0
- package/dist/switch.cjs +1 -0
- package/dist/switch.d.ts +28 -0
- package/dist/switch.js +4 -0
- package/dist/tabs.cjs +1 -0
- package/dist/tabs.d.ts +59 -0
- package/dist/tabs.js +4 -0
- package/dist/test-utils.cjs +1 -0
- package/dist/test-utils.d.ts +5 -0
- package/dist/test-utils.js +12 -0
- package/dist/textarea.cjs +1 -0
- package/dist/textarea.d.ts +34 -0
- package/dist/textarea.js +4 -0
- package/dist/toast.cjs +1 -0
- package/dist/toast.d.ts +28 -0
- package/dist/toast.js +5 -0
- package/dist/tooltip.cjs +1 -0
- package/dist/tooltip.d.ts +32 -0
- package/dist/tooltip.js +4 -0
- package/dist/useId-BGRmH6iF.js +8 -0
- package/dist/useId-D2AEOm2G.cjs +1 -0
- package/package.json +170 -0
- package/style.css +1 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1184 @@
|
|
|
1
|
+
import { ComponentContract } from '@vhyxui/core';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormState } from 'react-hook-form';
|
|
5
|
+
import { UseFormRegister } from 'react-hook-form';
|
|
6
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
7
|
+
|
|
8
|
+
export declare const Alert: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<AlertProps> & default_2.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
|
|
10
|
+
/** Props for the Alert component. */
|
|
11
|
+
export declare interface AlertProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
/** Semantic variant. @default 'default' */
|
|
13
|
+
variant?: AlertVariant;
|
|
14
|
+
/** Optional title rendered in bold above the message. */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Icon override. Defaults to a variant-appropriate symbol when omitted. */
|
|
17
|
+
icon?: default_2.ReactNode;
|
|
18
|
+
/** When true, renders a Dismiss button. @default false */
|
|
19
|
+
dismissible?: boolean;
|
|
20
|
+
/** Callback fired when the Dismiss button is clicked. */
|
|
21
|
+
onDismiss?: () => void;
|
|
22
|
+
/** VhyxSeal contract override. Merged on top of the default alertContract. */
|
|
23
|
+
contract?: Partial<ComponentContract>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Visual variant of the Alert. */
|
|
27
|
+
export declare type AlertVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
28
|
+
|
|
29
|
+
export declare const Badge: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<BadgeProps> & default_2.RefAttributes<HTMLSpanElement>>;
|
|
30
|
+
|
|
31
|
+
/** Props for the Badge component. */
|
|
32
|
+
export declare interface BadgeProps extends default_2.HTMLAttributes<HTMLSpanElement> {
|
|
33
|
+
/** Visual variant. @default 'default' */
|
|
34
|
+
variant?: BadgeVariant;
|
|
35
|
+
/** Size of the badge. @default 'md' */
|
|
36
|
+
size?: BadgeSize;
|
|
37
|
+
/**
|
|
38
|
+
* When true, renders a small circular dot indicator with no text.
|
|
39
|
+
* Useful for notification indicators.
|
|
40
|
+
*/
|
|
41
|
+
dot?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Numeric count to display. When count exceeds max, displays "{max}+".
|
|
44
|
+
* Ignored when dot=true.
|
|
45
|
+
*/
|
|
46
|
+
count?: number;
|
|
47
|
+
/** Maximum count before truncation. @default 99 */
|
|
48
|
+
max?: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Size of the Badge. */
|
|
52
|
+
export declare type BadgeSize = 'sm' | 'md' | 'lg';
|
|
53
|
+
|
|
54
|
+
/** Visual variant of the Badge. */
|
|
55
|
+
export declare type BadgeVariant = 'default' | 'success' | 'warning' | 'danger' | 'info' | 'outline';
|
|
56
|
+
|
|
57
|
+
export declare const Breadcrumb: default_2.ComponentType<BreadcrumbProps & default_2.RefAttributes<HTMLElement>> & {
|
|
58
|
+
Item: typeof BreadcrumbItem;
|
|
59
|
+
Link: typeof BreadcrumbLink;
|
|
60
|
+
Page: typeof BreadcrumbPage;
|
|
61
|
+
Ellipsis: typeof BreadcrumbEllipsis;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** Collapsed items indicator — rendered when maxItems is exceeded. */
|
|
65
|
+
declare function BreadcrumbEllipsis({ className, ...rest }: BreadcrumbEllipsisProps): default_2.ReactElement;
|
|
66
|
+
|
|
67
|
+
declare namespace BreadcrumbEllipsis {
|
|
68
|
+
var displayName: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare interface BreadcrumbEllipsisProps extends default_2.HTMLAttributes<HTMLSpanElement> {
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A single item in the breadcrumb list.
|
|
76
|
+
* Renders as an `<li>` with the separator automatically appended.
|
|
77
|
+
*/
|
|
78
|
+
declare function BreadcrumbItem({ children, className, ...rest }: BreadcrumbItemProps): default_2.ReactElement;
|
|
79
|
+
|
|
80
|
+
declare namespace BreadcrumbItem {
|
|
81
|
+
var displayName: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export declare interface BreadcrumbItemProps extends default_2.LiHTMLAttributes<HTMLLIElement> {
|
|
85
|
+
children?: default_2.ReactNode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** An ancestor page link in the breadcrumb trail. */
|
|
89
|
+
declare function BreadcrumbLink({ children, className, asChild, ...rest }: BreadcrumbLinkProps): default_2.ReactElement;
|
|
90
|
+
|
|
91
|
+
declare namespace BreadcrumbLink {
|
|
92
|
+
var displayName: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare interface BreadcrumbLinkProps extends default_2.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
96
|
+
/**
|
|
97
|
+
* When true, renders as the child element via Slot instead of <a>.
|
|
98
|
+
* Use with Next.js Link or other routing components.
|
|
99
|
+
*/
|
|
100
|
+
asChild?: boolean;
|
|
101
|
+
children?: default_2.ReactNode;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The current page in the breadcrumb hierarchy.
|
|
106
|
+
* Not a link — receives aria-current="page".
|
|
107
|
+
*/
|
|
108
|
+
declare function BreadcrumbPage({ children, className, ...rest }: BreadcrumbPageProps): default_2.ReactElement;
|
|
109
|
+
|
|
110
|
+
declare namespace BreadcrumbPage {
|
|
111
|
+
var displayName: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export declare interface BreadcrumbPageProps extends default_2.HTMLAttributes<HTMLSpanElement> {
|
|
115
|
+
children?: default_2.ReactNode;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Root props for the Breadcrumb compound component. */
|
|
119
|
+
export declare interface BreadcrumbProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
120
|
+
/**
|
|
121
|
+
* Separator element rendered between items. Defaults to "/" (aria-hidden).
|
|
122
|
+
*/
|
|
123
|
+
separator?: default_2.ReactNode;
|
|
124
|
+
/**
|
|
125
|
+
* When set, collapses the middle items with an ellipsis when
|
|
126
|
+
* the item count exceeds this number. Not yet implemented — reserved.
|
|
127
|
+
*/
|
|
128
|
+
maxItems?: number;
|
|
129
|
+
/** VhyxSeal contract override. */
|
|
130
|
+
contract?: Partial<ComponentContract>;
|
|
131
|
+
children?: default_2.ReactNode;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare const Button: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<ButtonProps> & default_2.RefAttributes<HTMLButtonElement>>;
|
|
135
|
+
|
|
136
|
+
/** Props for the Button component. */
|
|
137
|
+
export declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
138
|
+
/** Visual style of the button. @default 'primary' */
|
|
139
|
+
variant?: ButtonVariant;
|
|
140
|
+
/** Size of the button, maps to --vhyx-size-* height tokens. @default 'md' */
|
|
141
|
+
size?: ButtonSize;
|
|
142
|
+
/** When true, shows a spinner and disables interaction. */
|
|
143
|
+
loading?: boolean;
|
|
144
|
+
/** Optional icon element rendered alongside button text. */
|
|
145
|
+
icon?: default_2.ReactNode;
|
|
146
|
+
/** Side the icon appears on. @default 'left' */
|
|
147
|
+
iconPosition?: 'left' | 'right';
|
|
148
|
+
/** When true, renders icon only with no text. Requires aria-label for accessibility. */
|
|
149
|
+
iconOnly?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* When true, renders as the child element instead of a <button>.
|
|
152
|
+
* All Button props are merged onto the child via Slot.
|
|
153
|
+
* Use for navigation links or custom trigger elements.
|
|
154
|
+
*/
|
|
155
|
+
asChild?: boolean;
|
|
156
|
+
/** VhyxSeal contract override — merged with the default button contract. */
|
|
157
|
+
contract?: Partial<ComponentContract>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** Size tokens available on the Button component. */
|
|
161
|
+
export declare type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
162
|
+
|
|
163
|
+
/** All variants available on the Button component. */
|
|
164
|
+
export declare type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link';
|
|
165
|
+
|
|
166
|
+
export declare const Card: default_2.ComponentType<CardProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
167
|
+
Header: typeof CardHeader;
|
|
168
|
+
Body: typeof CardBody;
|
|
169
|
+
Footer: typeof CardFooter;
|
|
170
|
+
Image: typeof CardImage;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
declare function CardBody({ children, className, ...rest }: CardBodyProps): default_2.ReactElement;
|
|
174
|
+
|
|
175
|
+
declare namespace CardBody {
|
|
176
|
+
var displayName: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export declare interface CardBodyProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
180
|
+
children?: default_2.ReactNode;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
declare function CardFooter({ children, className, ...rest }: CardFooterProps): default_2.ReactElement;
|
|
184
|
+
|
|
185
|
+
declare namespace CardFooter {
|
|
186
|
+
var displayName: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export declare interface CardFooterProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
190
|
+
children?: default_2.ReactNode;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
declare function CardHeader({ children, className, ...rest }: CardHeaderProps): default_2.ReactElement;
|
|
194
|
+
|
|
195
|
+
declare namespace CardHeader {
|
|
196
|
+
var displayName: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export declare interface CardHeaderProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
200
|
+
children?: default_2.ReactNode;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
declare function CardImage({ children, className, ...rest }: CardImageProps): default_2.ReactElement;
|
|
204
|
+
|
|
205
|
+
declare namespace CardImage {
|
|
206
|
+
var displayName: string;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export declare interface CardImageProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
210
|
+
children?: default_2.ReactNode;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** Padding size applied to the Card. */
|
|
214
|
+
export declare type CardPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
215
|
+
|
|
216
|
+
/** Root props for the Card compound component. */
|
|
217
|
+
export declare interface CardProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
218
|
+
/** Visual variant. @default 'default' */
|
|
219
|
+
variant?: CardVariant;
|
|
220
|
+
/** Padding inside the card. @default 'md' */
|
|
221
|
+
padding?: CardPadding;
|
|
222
|
+
/**
|
|
223
|
+
* When true, adds hover and active states — use for clickable cards.
|
|
224
|
+
* Add onClick and role="button" or wrap with a link separately.
|
|
225
|
+
*/
|
|
226
|
+
interactive?: boolean;
|
|
227
|
+
/** VhyxSeal contract override. */
|
|
228
|
+
contract?: Partial<ComponentContract>;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Visual variant of the Card. */
|
|
232
|
+
export declare type CardVariant = 'default' | 'outline' | 'ghost' | 'elevated';
|
|
233
|
+
|
|
234
|
+
export declare const Checkbox: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<CheckboxProps> & default_2.RefAttributes<HTMLButtonElement>>;
|
|
235
|
+
|
|
236
|
+
/** Props for the Checkbox component. */
|
|
237
|
+
export declare interface CheckboxProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'defaultChecked'> {
|
|
238
|
+
/** Controlled checked state. */
|
|
239
|
+
checked?: CheckedState;
|
|
240
|
+
/** Uncontrolled default checked state. @default false */
|
|
241
|
+
defaultChecked?: CheckedState;
|
|
242
|
+
/** Called when the checked state changes. */
|
|
243
|
+
onCheckedChange?: (checked: CheckedState) => void;
|
|
244
|
+
/** When true, renders the indeterminate state (dash mark). */
|
|
245
|
+
indeterminate?: boolean;
|
|
246
|
+
/** Size of the checkbox. @default 'md' */
|
|
247
|
+
size?: CheckboxSize;
|
|
248
|
+
/**
|
|
249
|
+
* When true, renders as the child element instead of <button role="checkbox">.
|
|
250
|
+
* ARIA attributes and click handler are merged onto the child via Slot.
|
|
251
|
+
*/
|
|
252
|
+
asChild?: boolean;
|
|
253
|
+
/** VhyxSeal contract override — merged with the default checkbox contract. */
|
|
254
|
+
contract?: Partial<ComponentContract>;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/** Size tokens available on the Checkbox component. */
|
|
258
|
+
export declare type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
259
|
+
|
|
260
|
+
/** Checkbox checked value — boolean or 'indeterminate'. */
|
|
261
|
+
declare type CheckedState = boolean | 'indeterminate';
|
|
262
|
+
|
|
263
|
+
export declare const Dialog: default_2.ComponentType<DialogProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
264
|
+
Trigger: default_2.ForwardRefExoticComponent<DialogTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
265
|
+
Portal: typeof DialogPortal;
|
|
266
|
+
Overlay: default_2.ForwardRefExoticComponent<DialogOverlayProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
267
|
+
Content: default_2.ForwardRefExoticComponent<DialogContentProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
268
|
+
Header: typeof DialogHeader;
|
|
269
|
+
Footer: typeof DialogFooter;
|
|
270
|
+
Title: typeof DialogTitle;
|
|
271
|
+
Description: typeof DialogDescription;
|
|
272
|
+
Close: default_2.ForwardRefExoticComponent<DialogCloseProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export declare interface DialogCloseProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
276
|
+
children?: default_2.ReactNode;
|
|
277
|
+
/**
|
|
278
|
+
* When true, renders as the child element via Slot instead of <button>.
|
|
279
|
+
* Use to avoid nested interactive elements when composing with Button.
|
|
280
|
+
*/
|
|
281
|
+
asChild?: boolean;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export declare interface DialogContentProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
285
|
+
/** Override the accessible label for the close button inside. */
|
|
286
|
+
closeLabel?: string;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/** Optional accessible description. */
|
|
290
|
+
declare function DialogDescription({ children, className, ...rest }: DialogDescriptionProps): default_2.ReactElement;
|
|
291
|
+
|
|
292
|
+
declare namespace DialogDescription {
|
|
293
|
+
var displayName: string;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export declare interface DialogDescriptionProps extends default_2.HTMLAttributes<HTMLParagraphElement> {
|
|
297
|
+
children?: default_2.ReactNode;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/** Optional layout wrapper for the dialog footer (actions). */
|
|
301
|
+
declare function DialogFooter({ children, className, ...rest }: DialogFooterProps): default_2.ReactElement;
|
|
302
|
+
|
|
303
|
+
declare namespace DialogFooter {
|
|
304
|
+
var displayName: string;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export declare interface DialogFooterProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
308
|
+
children?: default_2.ReactNode;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** Optional layout wrapper for the dialog header area. */
|
|
312
|
+
declare function DialogHeader({ children, className, ...rest }: DialogHeaderProps): default_2.ReactElement;
|
|
313
|
+
|
|
314
|
+
declare namespace DialogHeader {
|
|
315
|
+
var displayName: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export declare interface DialogHeaderProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
319
|
+
children?: default_2.ReactNode;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export declare interface DialogOverlayProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/** Renders its children in document.body. */
|
|
326
|
+
declare function DialogPortal({ children }: DialogPortalProps): default_2.ReactPortal | null;
|
|
327
|
+
|
|
328
|
+
declare namespace DialogPortal {
|
|
329
|
+
var displayName: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export declare interface DialogPortalProps {
|
|
333
|
+
children?: default_2.ReactNode;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/** Root props for the Dialog compound component. */
|
|
337
|
+
export declare interface DialogProps {
|
|
338
|
+
/** Controlled open state. */
|
|
339
|
+
open?: boolean;
|
|
340
|
+
/** Default open state for uncontrolled mode. @default false */
|
|
341
|
+
defaultOpen?: boolean;
|
|
342
|
+
/** Called when the open state changes. */
|
|
343
|
+
onOpenChange?: (open: boolean) => void;
|
|
344
|
+
/** When true, blocks interaction with the rest of the page. @default true */
|
|
345
|
+
modal?: boolean;
|
|
346
|
+
/** Controls the maximum width of the dialog panel. @default 'md' */
|
|
347
|
+
size?: 'sm' | 'md' | 'lg';
|
|
348
|
+
/** VhyxSeal contract override. */
|
|
349
|
+
contract?: Partial<ComponentContract>;
|
|
350
|
+
/** Dialog sub-components as children. */
|
|
351
|
+
children: default_2.ReactNode;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/** The dialog's accessible title. Required for screen reader announcement. */
|
|
355
|
+
declare function DialogTitle({ children, className, ...rest }: DialogTitleProps): default_2.ReactElement;
|
|
356
|
+
|
|
357
|
+
declare namespace DialogTitle {
|
|
358
|
+
var displayName: string;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export declare interface DialogTitleProps extends default_2.HTMLAttributes<HTMLHeadingElement> {
|
|
362
|
+
children?: default_2.ReactNode;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export declare interface DialogTriggerProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
366
|
+
/** When true, renders as the child element via Slot instead of <button>. */
|
|
367
|
+
asChild?: boolean;
|
|
368
|
+
children?: default_2.ReactNode;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export declare const Drawer: default_2.ComponentType<DrawerProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
372
|
+
Trigger: default_2.ForwardRefExoticComponent<DrawerTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
373
|
+
Portal: typeof DrawerPortal;
|
|
374
|
+
Overlay: default_2.ForwardRefExoticComponent<DrawerOverlayProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
375
|
+
Content: default_2.ForwardRefExoticComponent<DrawerContentProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
376
|
+
Header: typeof DrawerHeader;
|
|
377
|
+
Footer: typeof DrawerFooter;
|
|
378
|
+
Title: typeof DrawerTitle;
|
|
379
|
+
Description: typeof DrawerDescription;
|
|
380
|
+
Close: default_2.ForwardRefExoticComponent<DrawerCloseProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
export declare interface DrawerCloseProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
384
|
+
children?: default_2.ReactNode;
|
|
385
|
+
/**
|
|
386
|
+
* When true, renders as the child element via Slot instead of <button>.
|
|
387
|
+
* Use to avoid nested interactive elements when composing with Button.
|
|
388
|
+
*/
|
|
389
|
+
asChild?: boolean;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export declare interface DrawerContentProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
declare function DrawerDescription({ children, className, ...rest }: DrawerDescriptionProps): default_2.ReactElement;
|
|
396
|
+
|
|
397
|
+
declare namespace DrawerDescription {
|
|
398
|
+
var displayName: string;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export declare interface DrawerDescriptionProps extends default_2.HTMLAttributes<HTMLParagraphElement> {
|
|
402
|
+
children?: default_2.ReactNode;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
declare function DrawerFooter({ children, className, ...rest }: DrawerFooterProps): default_2.ReactElement;
|
|
406
|
+
|
|
407
|
+
declare namespace DrawerFooter {
|
|
408
|
+
var displayName: string;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export declare interface DrawerFooterProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
412
|
+
children?: default_2.ReactNode;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
declare function DrawerHeader({ children, className, ...rest }: DrawerHeaderProps): default_2.ReactElement;
|
|
416
|
+
|
|
417
|
+
declare namespace DrawerHeader {
|
|
418
|
+
var displayName: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export declare interface DrawerHeaderProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
422
|
+
children?: default_2.ReactNode;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export declare interface DrawerOverlayProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/** Renders its children in document.body when the drawer is open. */
|
|
429
|
+
declare function DrawerPortal({ children }: DrawerPortalProps): default_2.ReactPortal | null;
|
|
430
|
+
|
|
431
|
+
declare namespace DrawerPortal {
|
|
432
|
+
var displayName: string;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export declare interface DrawerPortalProps {
|
|
436
|
+
children?: default_2.ReactNode;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/** Root props for the Drawer compound component. */
|
|
440
|
+
export declare interface DrawerProps {
|
|
441
|
+
/** Controlled open state. */
|
|
442
|
+
open?: boolean;
|
|
443
|
+
/** Called when the open state changes. */
|
|
444
|
+
onOpenChange?: (open: boolean) => void;
|
|
445
|
+
/** Side the drawer slides in from. @default 'right' */
|
|
446
|
+
side?: DrawerSide;
|
|
447
|
+
/** Size of the drawer panel. @default 'md' */
|
|
448
|
+
size?: DrawerSize;
|
|
449
|
+
/** VhyxSeal contract override. */
|
|
450
|
+
contract?: Partial<ComponentContract>;
|
|
451
|
+
/** Drawer sub-components as children. */
|
|
452
|
+
children: default_2.ReactNode;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/** Side the Drawer slides in from. */
|
|
456
|
+
export declare type DrawerSide = 'left' | 'right' | 'top' | 'bottom';
|
|
457
|
+
|
|
458
|
+
/** Size of the Drawer panel. */
|
|
459
|
+
export declare type DrawerSize = 'sm' | 'md' | 'lg' | 'full';
|
|
460
|
+
|
|
461
|
+
declare function DrawerTitle({ children, className, ...rest }: DrawerTitleProps): default_2.ReactElement;
|
|
462
|
+
|
|
463
|
+
declare namespace DrawerTitle {
|
|
464
|
+
var displayName: string;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export declare interface DrawerTitleProps extends default_2.HTMLAttributes<HTMLHeadingElement> {
|
|
468
|
+
children?: default_2.ReactNode;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export declare interface DrawerTriggerProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
472
|
+
/** When true, renders as the child element via Slot instead of <button>. */
|
|
473
|
+
asChild?: boolean;
|
|
474
|
+
children?: default_2.ReactNode;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Field — the missing layer. Label + input + hint + error in one first-class component.
|
|
479
|
+
*
|
|
480
|
+
* Automatically:
|
|
481
|
+
* - Generates unique IDs and connects label htmlFor → input id
|
|
482
|
+
* - Wires aria-describedby from input → hint and/or error text
|
|
483
|
+
* - Propagates aria-invalid and data-error to the child when an error is set
|
|
484
|
+
* - Reads validation errors from the parent Form context (react-hook-form)
|
|
485
|
+
*
|
|
486
|
+
* Developers rebuild Field on every project. VhyxUI ships it first class.
|
|
487
|
+
*
|
|
488
|
+
* @example
|
|
489
|
+
* <Field name="email" label="Email" hint="We'll never share it" required>
|
|
490
|
+
* <Input type="email" />
|
|
491
|
+
* </Field>
|
|
492
|
+
*/
|
|
493
|
+
export declare function Field({ name, label, hint, error, required, optional, layout, children, className, ...htmlProps }: FieldProps): default_2.ReactElement;
|
|
494
|
+
|
|
495
|
+
export declare namespace Field {
|
|
496
|
+
var displayName: string;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/** Props for the Field component — the label/input/hint/error assembly layer. */
|
|
500
|
+
export declare interface FieldProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
501
|
+
/**
|
|
502
|
+
* Field name — used to read validation errors from the parent Form context
|
|
503
|
+
* when react-hook-form is wired up.
|
|
504
|
+
*/
|
|
505
|
+
name: string;
|
|
506
|
+
/** Label rendered above (or beside) the input. */
|
|
507
|
+
label?: default_2.ReactNode;
|
|
508
|
+
/** Helper text rendered below the input. Connected via aria-describedby. */
|
|
509
|
+
hint?: default_2.ReactNode;
|
|
510
|
+
/**
|
|
511
|
+
* Error message. When set, the child input receives aria-invalid and
|
|
512
|
+
* data-error attributes and the error text is announced as a live region.
|
|
513
|
+
* If absent, Field reads the error from the parent Form context automatically.
|
|
514
|
+
*/
|
|
515
|
+
error?: string;
|
|
516
|
+
/** When true, renders a required indicator (*) next to the label. */
|
|
517
|
+
required?: boolean;
|
|
518
|
+
/** When true, renders an optional indicator next to the label. */
|
|
519
|
+
optional?: boolean;
|
|
520
|
+
/** Field layout. Overrides the parent Form layout when set. @default 'vertical' */
|
|
521
|
+
layout?: 'vertical' | 'horizontal';
|
|
522
|
+
/** The single interactive child element (Input, Textarea, Select, etc.). */
|
|
523
|
+
children: default_2.ReactNode;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/** Minimal field validation state used by Field to read error messages. */
|
|
527
|
+
declare type FieldValidationState = {
|
|
528
|
+
error?: {
|
|
529
|
+
message?: string;
|
|
530
|
+
};
|
|
531
|
+
invalid: boolean;
|
|
532
|
+
isDirty: boolean;
|
|
533
|
+
isTouched: boolean;
|
|
534
|
+
isValidating: boolean;
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
export declare const Form: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<FormProps> & default_2.RefAttributes<HTMLFormElement>>;
|
|
538
|
+
|
|
539
|
+
/** Value provided by the Form context to all descendant Fields. */
|
|
540
|
+
export declare interface FormContextValue {
|
|
541
|
+
/** react-hook-form form state, available when a form prop is provided. */
|
|
542
|
+
formState?: FormState<FieldValues>;
|
|
543
|
+
/** react-hook-form register function, available when a form prop is provided. */
|
|
544
|
+
register?: UseFormRegister<FieldValues>;
|
|
545
|
+
/** Per-field state accessor from react-hook-form, available when a form prop is provided. */
|
|
546
|
+
getFieldState?: (name: string) => FieldValidationState;
|
|
547
|
+
/** When true, all form controls in this form are disabled. */
|
|
548
|
+
disabled: boolean;
|
|
549
|
+
/** Size applied to all controls in this form. */
|
|
550
|
+
size: 'sm' | 'md' | 'lg';
|
|
551
|
+
/** Layout direction of fields in this form. */
|
|
552
|
+
layout: 'vertical' | 'horizontal' | 'inline';
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/** Props for the Form component. */
|
|
556
|
+
export declare interface FormProps extends default_2.FormHTMLAttributes<HTMLFormElement> {
|
|
557
|
+
/**
|
|
558
|
+
* react-hook-form return value from useForm().
|
|
559
|
+
* When provided, Field components automatically read validation errors,
|
|
560
|
+
* and form submission is handled via form.handleSubmit(onSubmit).
|
|
561
|
+
*/
|
|
562
|
+
form?: UseFormReturn<FieldValues>;
|
|
563
|
+
/** Field layout within this form. @default 'vertical' */
|
|
564
|
+
layout?: 'vertical' | 'horizontal' | 'inline';
|
|
565
|
+
/** Size applied to all controls in this form. @default 'md' */
|
|
566
|
+
size?: 'sm' | 'md' | 'lg';
|
|
567
|
+
/**
|
|
568
|
+
* When true, all form controls are disabled.
|
|
569
|
+
* Propagated to Field children via context.
|
|
570
|
+
*/
|
|
571
|
+
disabled?: boolean;
|
|
572
|
+
/**
|
|
573
|
+
* Called with validated form data on submission.
|
|
574
|
+
* When form prop is provided, this is called by react-hook-form after validation.
|
|
575
|
+
* When form prop is absent, called on native form submit with empty FieldValues.
|
|
576
|
+
*/
|
|
577
|
+
onSubmit?: (data: FieldValues) => void | Promise<void>;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export declare const Input: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<InputProps> & default_2.RefAttributes<HTMLInputElement>>;
|
|
581
|
+
|
|
582
|
+
/** Props for the Input component. */
|
|
583
|
+
export declare interface InputProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
|
|
584
|
+
/** Size of the input, maps to --vhyx-size-* height tokens. @default 'md' */
|
|
585
|
+
size?: InputSize;
|
|
586
|
+
/** Optional icon element rendered inside the input. */
|
|
587
|
+
icon?: default_2.ReactNode;
|
|
588
|
+
/** Side the icon appears on. @default 'left' */
|
|
589
|
+
iconPosition?: 'left' | 'right';
|
|
590
|
+
/** Content rendered after the input (inside the wrapper, to the right). */
|
|
591
|
+
suffix?: default_2.ReactNode;
|
|
592
|
+
/** Content rendered before the input (inside the wrapper, to the left). */
|
|
593
|
+
prefix?: default_2.ReactNode;
|
|
594
|
+
/** When true, always shows a clear button regardless of type. */
|
|
595
|
+
clearable?: boolean;
|
|
596
|
+
/** Called when the clear button is clicked. */
|
|
597
|
+
onClear?: () => void;
|
|
598
|
+
/** When true, applies the error visual state and sets aria-invalid. */
|
|
599
|
+
error?: boolean;
|
|
600
|
+
/** VhyxSeal contract override — merged with the default input contract. */
|
|
601
|
+
contract?: Partial<ComponentContract>;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/** Size tokens available on the Input component. */
|
|
605
|
+
export declare type InputSize = 'sm' | 'md' | 'lg';
|
|
606
|
+
|
|
607
|
+
export declare const Pagination: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<PaginationProps> & default_2.RefAttributes<HTMLElement>>;
|
|
608
|
+
|
|
609
|
+
/** Props for the Pagination component. */
|
|
610
|
+
export declare interface PaginationProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
611
|
+
/** Current page (1-indexed). */
|
|
612
|
+
page: number;
|
|
613
|
+
/** Total number of pages. */
|
|
614
|
+
pageCount: number;
|
|
615
|
+
/** Called when the user activates a page button. */
|
|
616
|
+
onPageChange: (page: number) => void;
|
|
617
|
+
/**
|
|
618
|
+
* Number of sibling pages shown on each side of the current page.
|
|
619
|
+
* @default 1
|
|
620
|
+
*/
|
|
621
|
+
siblingCount?: number;
|
|
622
|
+
/** When true, renders First and Last buttons. @default false */
|
|
623
|
+
showFirstLast?: boolean;
|
|
624
|
+
/** When true, renders Previous and Next buttons. @default true */
|
|
625
|
+
showPrevNext?: boolean;
|
|
626
|
+
/** Size of the pagination buttons. @default 'md' */
|
|
627
|
+
size?: PaginationSize;
|
|
628
|
+
/** VhyxSeal contract override. */
|
|
629
|
+
contract?: Partial<ComponentContract>;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/** Size tokens for Pagination. */
|
|
633
|
+
export declare type PaginationSize = 'sm' | 'md' | 'lg';
|
|
634
|
+
|
|
635
|
+
export declare const Popover: default_2.ComponentType<PopoverProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
636
|
+
Trigger: default_2.ForwardRefExoticComponent<PopoverTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
637
|
+
Content: typeof PopoverContent;
|
|
638
|
+
Arrow: typeof PopoverArrow;
|
|
639
|
+
Close: default_2.ForwardRefExoticComponent<PopoverCloseProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
export declare type PopoverAlign = 'start' | 'center' | 'end';
|
|
643
|
+
|
|
644
|
+
/** Optional decorative arrow pointing toward the trigger. */
|
|
645
|
+
declare function PopoverArrow({ className, ...rest }: PopoverArrowProps): default_2.ReactElement;
|
|
646
|
+
|
|
647
|
+
declare namespace PopoverArrow {
|
|
648
|
+
var displayName: string;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
export declare interface PopoverArrowProps extends default_2.SVGAttributes<SVGSVGElement> {
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
export declare interface PopoverCloseProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
655
|
+
children?: default_2.ReactNode;
|
|
656
|
+
/**
|
|
657
|
+
* When true, renders as the child element via Slot instead of <button>.
|
|
658
|
+
* Use to avoid nested interactive elements when composing with Button.
|
|
659
|
+
*/
|
|
660
|
+
asChild?: boolean;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* The floating panel. Rendered in a portal.
|
|
665
|
+
* Non-modal (aria-modal="false") — focus is NOT trapped.
|
|
666
|
+
*/
|
|
667
|
+
declare function PopoverContent({ children, className, side, align, ...rest }: PopoverContentProps): default_2.ReactPortal | null;
|
|
668
|
+
|
|
669
|
+
declare namespace PopoverContent {
|
|
670
|
+
var displayName: string;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export declare interface PopoverContentProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
674
|
+
/** Side to position the popover relative to its trigger. @default 'bottom' */
|
|
675
|
+
side?: PopoverSide;
|
|
676
|
+
/** Alignment along the cross-axis. @default 'center' */
|
|
677
|
+
align?: PopoverAlign;
|
|
678
|
+
children?: default_2.ReactNode;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/** Root props for the Popover compound component. */
|
|
682
|
+
export declare interface PopoverProps {
|
|
683
|
+
/** Controlled open state. */
|
|
684
|
+
open?: boolean;
|
|
685
|
+
/** Default open state for uncontrolled mode. @default false */
|
|
686
|
+
defaultOpen?: boolean;
|
|
687
|
+
/** Called when the open state changes. */
|
|
688
|
+
onOpenChange?: (open: boolean) => void;
|
|
689
|
+
/** VhyxSeal contract override. */
|
|
690
|
+
contract?: Partial<ComponentContract>;
|
|
691
|
+
/** Popover sub-components as children. */
|
|
692
|
+
children: default_2.ReactNode;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export declare type PopoverSide = 'top' | 'right' | 'bottom' | 'left';
|
|
696
|
+
|
|
697
|
+
export declare interface PopoverTriggerProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
698
|
+
/** When true, renders as the child element via Slot instead of <button>. */
|
|
699
|
+
asChild?: boolean;
|
|
700
|
+
children?: default_2.ReactNode;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export declare const Progress: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<ProgressProps> & default_2.RefAttributes<HTMLDivElement>>;
|
|
704
|
+
|
|
705
|
+
/** Props for the Progress component. */
|
|
706
|
+
export declare interface ProgressProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
707
|
+
/** Current progress value (0 to max). */
|
|
708
|
+
value?: number;
|
|
709
|
+
/** Maximum value. @default 100 */
|
|
710
|
+
max?: number;
|
|
711
|
+
/**
|
|
712
|
+
* When true, shows an indeterminate animation — use when progress is unknown.
|
|
713
|
+
* Omits aria-valuenow when set.
|
|
714
|
+
*/
|
|
715
|
+
indeterminate?: boolean;
|
|
716
|
+
/** Size (height) of the progress bar. @default 'md' */
|
|
717
|
+
size?: ProgressSize;
|
|
718
|
+
/** Color variant of the progress bar fill. @default 'default' */
|
|
719
|
+
variant?: ProgressVariant;
|
|
720
|
+
/** When true, renders a percentage label above the bar. */
|
|
721
|
+
showLabel?: boolean;
|
|
722
|
+
/** Custom label text. Overrides the computed percentage when provided. */
|
|
723
|
+
label?: string;
|
|
724
|
+
/** VhyxSeal contract override. */
|
|
725
|
+
contract?: Partial<ComponentContract>;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/** Size tokens available on the Progress component. */
|
|
729
|
+
export declare type ProgressSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
730
|
+
|
|
731
|
+
/** Color variant of the progress bar fill. */
|
|
732
|
+
export declare type ProgressVariant = 'default' | 'success' | 'warning' | 'danger';
|
|
733
|
+
|
|
734
|
+
export declare const RadioGroup: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<RadioGroupProps> & default_2.RefAttributes<HTMLDivElement>>;
|
|
735
|
+
|
|
736
|
+
/** Props for the RadioGroup component. */
|
|
737
|
+
export declare interface RadioGroupProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
738
|
+
/** Controlled selected value. */
|
|
739
|
+
value?: string;
|
|
740
|
+
/** Default selected value for uncontrolled mode. */
|
|
741
|
+
defaultValue?: string;
|
|
742
|
+
/** Called when the selected value changes. */
|
|
743
|
+
onValueChange?: (value: string) => void;
|
|
744
|
+
/** When true, all items in the group are disabled. */
|
|
745
|
+
disabled?: boolean;
|
|
746
|
+
/** Layout direction of the radio items. @default 'vertical' */
|
|
747
|
+
orientation?: 'horizontal' | 'vertical';
|
|
748
|
+
/** Size applied to all radio items. @default 'md' */
|
|
749
|
+
size?: RadioGroupSize;
|
|
750
|
+
/** VhyxSeal contract override. */
|
|
751
|
+
contract?: Partial<ComponentContract>;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/** Size tokens available on the RadioGroup. */
|
|
755
|
+
export declare type RadioGroupSize = 'sm' | 'md' | 'lg';
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* RadioItem — a single option within a RadioGroup.
|
|
759
|
+
*
|
|
760
|
+
* Renders as `<button role="radio">`. Arrow keys navigate between items.
|
|
761
|
+
* Tab exits the group entirely. Only the selected or first item is tabbable.
|
|
762
|
+
*
|
|
763
|
+
* Must be used inside a RadioGroup.
|
|
764
|
+
*/
|
|
765
|
+
export declare const RadioItem: default_2.ForwardRefExoticComponent<RadioItemProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
766
|
+
|
|
767
|
+
/** Props for the RadioItem component. */
|
|
768
|
+
export declare interface RadioItemProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
769
|
+
/** The value this item represents in the RadioGroup. */
|
|
770
|
+
value: string;
|
|
771
|
+
/** When true, this item cannot be selected. */
|
|
772
|
+
disabled?: boolean;
|
|
773
|
+
/** Label content rendered alongside the radio indicator. */
|
|
774
|
+
children?: default_2.ReactNode;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export declare const Select: default_2.ComponentType<SelectProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
778
|
+
Trigger: default_2.ForwardRefExoticComponent<SelectTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
779
|
+
Content: typeof SelectContent;
|
|
780
|
+
Item: default_2.ForwardRefExoticComponent<SelectItemProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
781
|
+
Group: typeof SelectGroup;
|
|
782
|
+
Label: typeof SelectLabel;
|
|
783
|
+
Separator: typeof SelectSeparator;
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Portal-rendered listbox. Deferred to client-only via `mounted` state so
|
|
788
|
+
* SSR and client initial renders both produce null — eliminating the
|
|
789
|
+
* hydration mismatch that occurred when SSR returned null but the client
|
|
790
|
+
* immediately rendered the portal with differing data-state / position values.
|
|
791
|
+
*
|
|
792
|
+
* SelectItem labels register on their own mount effects after this content
|
|
793
|
+
* mounts client-side, so the trigger label display is updated via state.
|
|
794
|
+
*/
|
|
795
|
+
declare function SelectContent({ children, className, ...rest }: SelectContentProps): default_2.ReactPortal | null;
|
|
796
|
+
|
|
797
|
+
declare namespace SelectContent {
|
|
798
|
+
var displayName: string;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
export declare interface SelectContentProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
802
|
+
children?: default_2.ReactNode;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
declare function SelectGroup({ children, className, ...rest }: SelectGroupProps): default_2.ReactElement;
|
|
806
|
+
|
|
807
|
+
declare namespace SelectGroup {
|
|
808
|
+
var displayName: string;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
export declare interface SelectGroupProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
812
|
+
children?: default_2.ReactNode;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
export declare interface SelectItemProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
816
|
+
/** The value this item represents. */
|
|
817
|
+
value: string;
|
|
818
|
+
/** When true, this item cannot be selected. */
|
|
819
|
+
disabled?: boolean;
|
|
820
|
+
children: default_2.ReactNode;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
declare function SelectLabel({ children, className, ...rest }: SelectLabelProps): default_2.ReactElement;
|
|
824
|
+
|
|
825
|
+
declare namespace SelectLabel {
|
|
826
|
+
var displayName: string;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
export declare interface SelectLabelProps extends default_2.HTMLAttributes<HTMLSpanElement> {
|
|
830
|
+
children?: default_2.ReactNode;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
/** Root props for the Select compound component. */
|
|
834
|
+
export declare interface SelectProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
835
|
+
/** Controlled selected value. */
|
|
836
|
+
value?: string;
|
|
837
|
+
/** Default selected value for uncontrolled mode. */
|
|
838
|
+
defaultValue?: string;
|
|
839
|
+
/** Called when a new value is selected. */
|
|
840
|
+
onValueChange?: (value: string) => void;
|
|
841
|
+
/** When true, the trigger is disabled. */
|
|
842
|
+
disabled?: boolean;
|
|
843
|
+
/** Size applied to all Select sub-components. @default 'md' */
|
|
844
|
+
size?: SelectSize;
|
|
845
|
+
/** Placeholder text shown when no value is selected. */
|
|
846
|
+
placeholder?: string;
|
|
847
|
+
/** VhyxSeal contract override. */
|
|
848
|
+
contract?: Partial<ComponentContract>;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
declare function SelectSeparator({ className, ...rest }: SelectSeparatorProps): default_2.ReactElement;
|
|
852
|
+
|
|
853
|
+
declare namespace SelectSeparator {
|
|
854
|
+
var displayName: string;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
export declare interface SelectSeparatorProps extends default_2.HTMLAttributes<HTMLHRElement> {
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/** Size tokens for Select. */
|
|
861
|
+
export declare type SelectSize = 'sm' | 'md' | 'lg';
|
|
862
|
+
|
|
863
|
+
export declare interface SelectTriggerProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
864
|
+
/** Optional icon rendered on the right. Defaults to a chevron SVG. */
|
|
865
|
+
icon?: default_2.ReactNode;
|
|
866
|
+
/** When true, renders as the child element via Slot instead of <button>. */
|
|
867
|
+
asChild?: boolean;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
export declare const Separator: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<SeparatorProps> & default_2.RefAttributes<HTMLElement>>;
|
|
871
|
+
|
|
872
|
+
/** Props for the Separator component. */
|
|
873
|
+
export declare interface SeparatorProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
874
|
+
/** Layout direction of the separator line. @default 'horizontal' */
|
|
875
|
+
orientation?: 'horizontal' | 'vertical';
|
|
876
|
+
/**
|
|
877
|
+
* When true (default), the separator is purely visual — rendered as aria-hidden.
|
|
878
|
+
* When false, renders with role="separator" so screen readers announce it.
|
|
879
|
+
*/
|
|
880
|
+
decorative?: boolean;
|
|
881
|
+
/**
|
|
882
|
+
* Optional text label centered on a horizontal separator.
|
|
883
|
+
* Not supported on vertical separators.
|
|
884
|
+
*/
|
|
885
|
+
label?: string;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
export declare const Spinner: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<SpinnerProps> & default_2.RefAttributes<SVGSVGElement>>;
|
|
889
|
+
|
|
890
|
+
/** Props for the Spinner component. */
|
|
891
|
+
export declare interface SpinnerProps extends default_2.SVGAttributes<SVGElement> {
|
|
892
|
+
/** Size of the spinner. @default 'md' */
|
|
893
|
+
size?: SpinnerSize;
|
|
894
|
+
/** Color variant of the spinner stroke. @default 'default' */
|
|
895
|
+
variant?: SpinnerVariant;
|
|
896
|
+
/**
|
|
897
|
+
* Screen reader label — always rendered as visually-hidden text.
|
|
898
|
+
* @default 'Loading'
|
|
899
|
+
*/
|
|
900
|
+
label?: string;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/** Size tokens available on the Spinner component. */
|
|
904
|
+
export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
905
|
+
|
|
906
|
+
/** Color variant of the spinner stroke. */
|
|
907
|
+
export declare type SpinnerVariant = 'default' | 'accent' | 'white';
|
|
908
|
+
|
|
909
|
+
export declare const Switch: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<SwitchProps> & default_2.RefAttributes<HTMLButtonElement>>;
|
|
910
|
+
|
|
911
|
+
/** Props for the Switch component. */
|
|
912
|
+
export declare interface SwitchProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
913
|
+
/** Controlled checked state. */
|
|
914
|
+
checked?: boolean;
|
|
915
|
+
/** Default checked state for uncontrolled mode. @default false */
|
|
916
|
+
defaultChecked?: boolean;
|
|
917
|
+
/** Called when the switch is toggled. */
|
|
918
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
919
|
+
/** Size of the switch. @default 'md' */
|
|
920
|
+
size?: SwitchSize;
|
|
921
|
+
/**
|
|
922
|
+
* When true, renders as the child element instead of <button role="switch">.
|
|
923
|
+
* ARIA attributes and handlers are merged onto the child via Slot.
|
|
924
|
+
*/
|
|
925
|
+
asChild?: boolean;
|
|
926
|
+
/** VhyxSeal contract override. */
|
|
927
|
+
contract?: Partial<ComponentContract>;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/** Size tokens available on the Switch component. */
|
|
931
|
+
export declare type SwitchSize = 'sm' | 'md' | 'lg';
|
|
932
|
+
|
|
933
|
+
export declare const Tabs: default_2.ComponentType<TabsProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
934
|
+
List: default_2.ForwardRefExoticComponent<TabsListProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
935
|
+
Trigger: default_2.ForwardRefExoticComponent<TabsTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
936
|
+
Content: typeof TabsContent;
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
/** The content panel for a tab. Rendered only when its value is active. */
|
|
940
|
+
declare function TabsContent({ value, children, className, ...rest }: TabsContentProps): default_2.ReactElement | null;
|
|
941
|
+
|
|
942
|
+
declare namespace TabsContent {
|
|
943
|
+
var displayName: string;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
export declare interface TabsContentProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
947
|
+
/** The value that activates this panel. */
|
|
948
|
+
value: string;
|
|
949
|
+
children?: default_2.ReactNode;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
export declare interface TabsListProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
953
|
+
children?: default_2.ReactNode;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/** Root props for the Tabs compound component. */
|
|
957
|
+
export declare interface TabsProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
958
|
+
/** Controlled active tab value. */
|
|
959
|
+
value?: string;
|
|
960
|
+
/** Default active tab value for uncontrolled mode. */
|
|
961
|
+
defaultValue?: string;
|
|
962
|
+
/** Called when the active tab changes. */
|
|
963
|
+
onValueChange?: (value: string) => void;
|
|
964
|
+
/** Layout direction of the tab list. @default 'horizontal' */
|
|
965
|
+
orientation?: 'horizontal' | 'vertical';
|
|
966
|
+
/** Visual variant of the tab list. @default 'default' */
|
|
967
|
+
variant?: TabsVariant;
|
|
968
|
+
/** Size of the tabs. @default 'md' */
|
|
969
|
+
size?: TabsSize;
|
|
970
|
+
/** VhyxSeal contract override. */
|
|
971
|
+
contract?: Partial<ComponentContract>;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/** Size tokens for Tabs. */
|
|
975
|
+
export declare type TabsSize = 'sm' | 'md' | 'lg';
|
|
976
|
+
|
|
977
|
+
export declare interface TabsTriggerProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
978
|
+
/** The value this trigger activates. */
|
|
979
|
+
value: string;
|
|
980
|
+
/** When true, renders as the child element via Slot instead of <button>. */
|
|
981
|
+
asChild?: boolean;
|
|
982
|
+
children?: default_2.ReactNode;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
/** Variant visual styles for Tabs. */
|
|
986
|
+
export declare type TabsVariant = 'default' | 'pills' | 'underline' | 'enclosed';
|
|
987
|
+
|
|
988
|
+
export declare const Textarea: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<TextareaProps> & default_2.RefAttributes<HTMLTextAreaElement>>;
|
|
989
|
+
|
|
990
|
+
/** Props for the Textarea component. */
|
|
991
|
+
export declare interface TextareaProps extends default_2.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
992
|
+
/** Size of the textarea. @default 'md' */
|
|
993
|
+
size?: TextareaSize;
|
|
994
|
+
/**
|
|
995
|
+
* Resize behaviour.
|
|
996
|
+
* 'auto' makes the textarea grow with content up to maxRows.
|
|
997
|
+
* @default 'vertical'
|
|
998
|
+
*/
|
|
999
|
+
resize?: TextareaResize;
|
|
1000
|
+
/** Minimum number of visible rows. @default 3 */
|
|
1001
|
+
minRows?: number;
|
|
1002
|
+
/** Maximum number of rows before scroll activates. Applies when resize='auto'. */
|
|
1003
|
+
maxRows?: number;
|
|
1004
|
+
/** When true, renders a character count below the textarea. Requires maxLength. */
|
|
1005
|
+
showCount?: boolean;
|
|
1006
|
+
/** When true, applies error visual state and sets aria-invalid. */
|
|
1007
|
+
error?: boolean;
|
|
1008
|
+
/** VhyxSeal contract override — merged with the default textarea contract. */
|
|
1009
|
+
contract?: Partial<ComponentContract>;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/** Resize behaviour for the textarea. */
|
|
1013
|
+
export declare type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both' | 'auto';
|
|
1014
|
+
|
|
1015
|
+
/** Size tokens available on the Textarea component. */
|
|
1016
|
+
export declare type TextareaSize = 'sm' | 'md' | 'lg';
|
|
1017
|
+
|
|
1018
|
+
export declare const Toast: default_2.ComponentType<ToastProviderProps> & {
|
|
1019
|
+
displayName: string;
|
|
1020
|
+
};
|
|
1021
|
+
|
|
1022
|
+
/** The VhyxUI imperative toast API. */
|
|
1023
|
+
export declare const toast: typeof toastFn;
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Shows a toast notification.
|
|
1027
|
+
*
|
|
1028
|
+
* @returns The id of the created toast (use with toast.dismiss(id) to remove early).
|
|
1029
|
+
*
|
|
1030
|
+
* @example
|
|
1031
|
+
* toast('File saved')
|
|
1032
|
+
* toast.success('Upload complete')
|
|
1033
|
+
* toast.danger('Connection lost')
|
|
1034
|
+
* toast.warning('Storage nearly full')
|
|
1035
|
+
* toast.info('Update available', { action: { label: 'Install', onClick: install } })
|
|
1036
|
+
*/
|
|
1037
|
+
declare function toastFn(message: string, options?: ToastOptions): string;
|
|
1038
|
+
|
|
1039
|
+
declare namespace toastFn {
|
|
1040
|
+
var success: (message: string, options?: ToastOptions) => string;
|
|
1041
|
+
var danger: (message: string, options?: ToastOptions) => string;
|
|
1042
|
+
var warning: (message: string, options?: ToastOptions) => string;
|
|
1043
|
+
var info: (message: string, options?: ToastOptions) => string;
|
|
1044
|
+
var dismiss: (id?: string) => void;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/** A single toast item held in the store. */
|
|
1048
|
+
export declare interface ToastItem extends ToastOptions {
|
|
1049
|
+
/** Unique identifier auto-generated on creation. */
|
|
1050
|
+
id: string;
|
|
1051
|
+
/** Primary message text. */
|
|
1052
|
+
message: string;
|
|
1053
|
+
/** Semantic variant controlling colour and icon. */
|
|
1054
|
+
variant: ToastVariant;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
/** Options accepted by toast() calls. */
|
|
1058
|
+
export declare interface ToastOptions {
|
|
1059
|
+
/** Supplementary description rendered below the message. */
|
|
1060
|
+
description?: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* Duration in milliseconds before the toast auto-dismisses.
|
|
1063
|
+
* Pass Infinity to prevent auto-dismiss.
|
|
1064
|
+
*/
|
|
1065
|
+
duration?: number;
|
|
1066
|
+
/** Optional action button rendered inside the toast. */
|
|
1067
|
+
action?: {
|
|
1068
|
+
label: string;
|
|
1069
|
+
onClick: () => void;
|
|
1070
|
+
};
|
|
1071
|
+
/** When true, renders a Dismiss button. @default true */
|
|
1072
|
+
dismissible?: boolean;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/** Position of the toast region on screen. */
|
|
1076
|
+
export declare type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* ToastProvider — subscribes to the global toast store and renders active toasts.
|
|
1080
|
+
* Place inside VhyxUIProvider. Developers do not need to add this directly.
|
|
1081
|
+
*/
|
|
1082
|
+
export declare function ToastProvider({ position, maxToasts, defaultDuration, children, }: ToastProviderProps): default_2.ReactElement;
|
|
1083
|
+
|
|
1084
|
+
/** Props for the ToastProvider. */
|
|
1085
|
+
export declare interface ToastProviderProps {
|
|
1086
|
+
/** Position of the toast region. @default 'bottom-right' */
|
|
1087
|
+
position?: ToastPosition;
|
|
1088
|
+
/** Maximum number of simultaneous toasts. @default 5 */
|
|
1089
|
+
maxToasts?: number;
|
|
1090
|
+
/** Default auto-dismiss duration in ms. @default 5000 */
|
|
1091
|
+
defaultDuration?: number;
|
|
1092
|
+
/** Application children. */
|
|
1093
|
+
children?: default_2.ReactNode;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Toast store — zero React dependency.
|
|
1098
|
+
*
|
|
1099
|
+
* Singleton subscribe/notify pattern. The ToastProvider subscribes and
|
|
1100
|
+
* re-renders when toasts change. toast() calls push items to this store.
|
|
1101
|
+
*/
|
|
1102
|
+
/** Semantic variants available on a toast. */
|
|
1103
|
+
export declare type ToastVariant = 'default' | 'success' | 'danger' | 'warning' | 'info';
|
|
1104
|
+
|
|
1105
|
+
export declare const Tooltip: default_2.ComponentType<TooltipProps>;
|
|
1106
|
+
|
|
1107
|
+
/** Props for the Tooltip component. */
|
|
1108
|
+
export declare interface TooltipProps {
|
|
1109
|
+
/** The tooltip content (typically a short text label). */
|
|
1110
|
+
content: default_2.ReactNode;
|
|
1111
|
+
/** Side to show the tooltip relative to the trigger. @default 'top' */
|
|
1112
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
1113
|
+
/** Alignment along the cross-axis. @default 'center' */
|
|
1114
|
+
align?: 'start' | 'center' | 'end';
|
|
1115
|
+
/**
|
|
1116
|
+
* Delay in ms before the tooltip appears on hover.
|
|
1117
|
+
* @default 400
|
|
1118
|
+
*/
|
|
1119
|
+
delayDuration?: number;
|
|
1120
|
+
/**
|
|
1121
|
+
* How long the tooltip remains visible after mouse leaves one trigger
|
|
1122
|
+
* before showing on the next trigger without the full delay.
|
|
1123
|
+
* @default 300
|
|
1124
|
+
*/
|
|
1125
|
+
skipDelayDuration?: number;
|
|
1126
|
+
/**
|
|
1127
|
+
* The single interactive child element. The tooltip is triggered by this element.
|
|
1128
|
+
* Must be a React element that can receive ref, onMouseEnter, onMouseLeave,
|
|
1129
|
+
* onFocus, onBlur, and aria-describedby props.
|
|
1130
|
+
*/
|
|
1131
|
+
children: default_2.ReactElement;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Returns the current Form context value.
|
|
1136
|
+
* Returns null when used outside a Form — Field and other consumers handle this gracefully.
|
|
1137
|
+
*/
|
|
1138
|
+
export declare function useFormContext(): FormContextValue | null;
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* VhyxUIProvider — root provider for VhyxUI.
|
|
1142
|
+
*
|
|
1143
|
+
* Place once at the top of your application tree. Provides:
|
|
1144
|
+
* - SealProvider (VhyxSeal contract registry for agent API access)
|
|
1145
|
+
* - A visually hidden skip link as the first focusable element on every page.
|
|
1146
|
+
* Becomes visible on keyboard focus, linking to `#vhyx-main`.
|
|
1147
|
+
* - The Toast notification region (imperative API via `toast()`).
|
|
1148
|
+
*
|
|
1149
|
+
* @example
|
|
1150
|
+
* <VhyxUIProvider>
|
|
1151
|
+
* <main id="vhyx-main">
|
|
1152
|
+
* <App />
|
|
1153
|
+
* </main>
|
|
1154
|
+
* </VhyxUIProvider>
|
|
1155
|
+
*/
|
|
1156
|
+
export declare function VhyxUIProvider({ children, toastPosition, maxToasts, defaultDuration, }: VhyxUIProviderProps): default_2.ReactElement;
|
|
1157
|
+
|
|
1158
|
+
export declare namespace VhyxUIProvider {
|
|
1159
|
+
var displayName: string;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/** Props for VhyxUIProvider. */
|
|
1163
|
+
export declare interface VhyxUIProviderProps {
|
|
1164
|
+
/** All application content. */
|
|
1165
|
+
children: default_2.ReactNode;
|
|
1166
|
+
/**
|
|
1167
|
+
* Position of the toast notification region.
|
|
1168
|
+
* Passed through to ToastProvider.
|
|
1169
|
+
* @default 'bottom-right'
|
|
1170
|
+
*/
|
|
1171
|
+
toastPosition?: ToastPosition;
|
|
1172
|
+
/**
|
|
1173
|
+
* Maximum number of toasts shown simultaneously.
|
|
1174
|
+
* @default 5
|
|
1175
|
+
*/
|
|
1176
|
+
maxToasts?: number;
|
|
1177
|
+
/**
|
|
1178
|
+
* Default duration in milliseconds before a toast auto-dismisses.
|
|
1179
|
+
* @default 4000
|
|
1180
|
+
*/
|
|
1181
|
+
defaultDuration?: number;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
export { }
|