@vhyxui/react 0.3.0-alpha → 0.4.0-alpha
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/LICENSE +21 -0
- package/README.md +65 -0
- package/dist/Accordion-qtPur3CA.js +81 -0
- package/dist/Accordion-z3QDvyGf.cjs +1 -0
- package/dist/Alert-D4EFVKUy.js +99 -0
- package/dist/Alert-DWB9Gtpv.cjs +1 -0
- package/dist/Avatar-CDoAvY0m.js +51 -0
- package/dist/Avatar-afXJdutp.cjs +1 -0
- package/dist/Badge-DOhfKlXt.cjs +1 -0
- package/dist/Badge-Z6crWSLX.js +38 -0
- package/dist/Breadcrumb-CbPmH-b4.js +90 -0
- package/dist/Breadcrumb-DWRxQvbb.cjs +1 -0
- package/dist/Button-CnNtk6HV.cjs +1 -0
- package/dist/Button-DN5vy24q.js +60 -0
- package/dist/Card-CI7DyOJg.js +79 -0
- package/dist/Card-CZUQhd45.cjs +1 -0
- package/dist/Center-BmKeGEa1.cjs +1 -0
- package/dist/Center-DFq5m7mf.js +22 -0
- package/dist/Checkbox-D-5qaOEj.js +92 -0
- package/dist/Checkbox-DOd4SIx2.cjs +1 -0
- package/dist/Container-CcsVyA6r.cjs +1 -0
- package/dist/Container-DPKIgeDZ.js +21 -0
- package/dist/Dialog-B7Mhq9Qc.cjs +1 -0
- package/dist/Dialog-DhIanyWH.js +258 -0
- package/dist/Drawer-8maigAH9.cjs +1 -0
- package/dist/Drawer-BKizItfr.js +259 -0
- package/dist/Field-DJvjEmzE.cjs +1 -0
- package/dist/Field-Dx9gXxGL.js +120 -0
- package/dist/Grid-Bzzb0usH.cjs +1 -0
- package/dist/Grid-x_OHCzGV.js +25 -0
- package/dist/Heading-BPqfnM8i.js +14 -0
- package/dist/Heading-icKRWRno.cjs +1 -0
- package/dist/Input-B0dEXpG8.js +151 -0
- package/dist/Input-CdS0oZyf.cjs +1 -0
- package/dist/Kbd-C2vxklhy.cjs +1 -0
- package/dist/Kbd-DGURpjWN.js +22 -0
- package/dist/Pagination-CiE9Jzm0.cjs +1 -0
- package/dist/Pagination-UQ53MWnR.js +128 -0
- package/dist/{Popover-j9pNswBn.js → Popover-0QvSlzcQ.js} +53 -53
- package/dist/Popover-Chf2ikqa.cjs +1 -0
- package/dist/Progress-DdWZRQVS.js +75 -0
- package/dist/Progress-lItZES-D.cjs +1 -0
- package/dist/RadioItem-BbIH7LoA.js +141 -0
- package/dist/RadioItem-Cfxch4Gj.cjs +1 -0
- package/dist/Select-CgjfJSB8.js +350 -0
- package/dist/Select-D_oVKzzK.cjs +1 -0
- package/dist/SelectField-DBGtOECg.js +49 -0
- package/dist/SelectField-DdkU9fXq.cjs +1 -0
- package/dist/Separator-BwR51KpL.js +52 -0
- package/dist/Separator-CTncQd7E.cjs +1 -0
- package/dist/Skeleton-C1LTpmVC.js +20 -0
- package/dist/Skeleton-CpzYhkFp.cjs +1 -0
- package/dist/Spinner-BJnT9SOB.cjs +1 -0
- package/dist/{Spinner-BYi9eTfl.js → Spinner-Dz68qwGs.js} +25 -25
- package/dist/Stack--mNjuxZe.cjs +1 -0
- package/dist/Stack-CfwjUv0j.js +49 -0
- package/dist/Switch-I712svE0.cjs +1 -0
- package/dist/{Switch-DOAZfSV0.js → Switch-bIbcXIMH.js} +22 -22
- package/dist/Table-C2TUkSZv.cjs +1 -0
- package/dist/Table-C_jZjmPK.js +67 -0
- package/dist/Tabs-CbmdCTVE.js +220 -0
- package/dist/Tabs-Dfuu2ZVq.cjs +1 -0
- package/dist/Text-CgsfCbWf.cjs +1 -0
- package/dist/Text-Dl4z0gus.js +26 -0
- package/dist/Text.module-CEBydIO4.js +7 -0
- package/dist/Text.module-gGopk2Yk.cjs +1 -0
- package/dist/TextField-B492c5Ct.js +31 -0
- package/dist/TextField-Bp-b0-hG.cjs +1 -0
- package/dist/{Textarea-CLrctxHU.js → Textarea-cloHZ5Sz.js} +41 -41
- package/dist/Textarea-uXK6PrFb.cjs +1 -0
- package/dist/TextareaField-C5naVyA1.cjs +1 -0
- package/dist/TextareaField-CrRndsuY.js +31 -0
- package/dist/Toast-CESL8AKT.cjs +1 -0
- package/dist/Toast-DYqE0PjM.js +167 -0
- package/dist/Tooltip-B-PpSm6T.cjs +1 -0
- package/dist/{Tooltip-BAmErB_g.js → Tooltip-DCCaNX5W.js} +34 -34
- package/dist/VhyxUIProvider-3f3b9ukY.cjs +1 -0
- package/dist/VhyxUIProvider-B2UHeumk.js +58 -0
- package/dist/VisuallyHidden-BWdnOImJ.cjs +1 -0
- package/dist/VisuallyHidden-CPTxPvL_.js +18 -0
- package/dist/accordion.cjs +1 -0
- package/dist/accordion.d.ts +48 -0
- package/dist/accordion.js +5 -0
- package/dist/alert.cjs +1 -1
- package/dist/alert.js +3 -2
- package/dist/avatar.cjs +1 -0
- package/dist/avatar.d.ts +53 -0
- package/dist/avatar.js +7 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +2 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +3 -2
- package/dist/button.cjs +1 -1
- package/dist/button.js +3 -2
- package/dist/card.cjs +1 -1
- package/dist/card.js +3 -2
- package/dist/center.cjs +1 -0
- package/dist/center.d.ts +20 -0
- package/dist/center.js +5 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +3 -2
- package/dist/container.cjs +1 -0
- package/dist/container.d.ts +23 -0
- package/dist/container.js +5 -0
- package/dist/cx-OWdTFKLx.js +15 -0
- package/dist/cx-dgWA95G6.cjs +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +0 -1
- package/dist/dialog.js +3 -2
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +0 -1
- package/dist/drawer.js +3 -2
- package/dist/env-Cqd4Y-Z7.cjs +1 -0
- package/dist/env-lFT_FRkA.js +19 -0
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +6 -6
- package/dist/form.js +5 -4
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +35 -0
- package/dist/grid.js +5 -0
- package/dist/heading.cjs +1 -0
- package/dist/heading.d.ts +25 -0
- package/dist/heading.js +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +440 -20
- package/dist/index.js +96 -62
- package/dist/input.cjs +1 -1
- package/dist/input.js +3 -2
- package/dist/kbd.cjs +1 -0
- package/dist/kbd.d.ts +16 -0
- package/dist/kbd.js +5 -0
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.js +2 -1
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +3 -2
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +2 -1
- package/dist/radio.cjs +1 -1
- package/dist/radio.js +4 -3
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +3 -3
- package/dist/select.js +3 -2
- package/dist/selectfield.cjs +1 -1
- package/dist/selectfield.d.ts +6 -6
- package/dist/selectfield.js +3 -2
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +3 -2
- package/dist/skeleton.cjs +1 -0
- package/dist/skeleton.d.ts +22 -0
- package/dist/skeleton.js +5 -0
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.js +3 -2
- package/dist/stack.cjs +1 -0
- package/dist/stack.d.ts +58 -0
- package/dist/stack.js +7 -0
- package/dist/style.css +2 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +3 -2
- package/dist/table.cjs +1 -0
- package/dist/table.d.ts +65 -0
- package/dist/table.js +5 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +3 -2
- package/dist/test-utils.cjs +1 -1
- package/dist/test-utils.d.ts +14 -2
- package/dist/test-utils.js +5 -5
- package/dist/text.cjs +1 -0
- package/dist/text.d.ts +38 -0
- package/dist/text.js +5 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +2 -1
- package/dist/textareafield.cjs +1 -1
- package/dist/textareafield.d.ts +6 -6
- package/dist/textareafield.js +2 -1
- package/dist/textfield.cjs +1 -1
- package/dist/textfield.d.ts +6 -6
- package/dist/textfield.js +3 -2
- package/dist/toast.cjs +1 -1
- package/dist/toast.js +4 -3
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +3 -2
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.ts +28 -0
- package/dist/utils.js +8 -0
- package/dist/visually-hidden.cjs +1 -0
- package/dist/visually-hidden.d.ts +16 -0
- package/dist/visually-hidden.js +5 -0
- package/package.json +166 -72
- package/dist/Alert-BJ1O0bnK.cjs +0 -1
- package/dist/Alert-am3ANPTH.js +0 -99
- package/dist/Badge-Bbxb4wyt.js +0 -38
- package/dist/Badge-SBO9tGzn.cjs +0 -1
- package/dist/Breadcrumb-Db7ASomJ.js +0 -90
- package/dist/Breadcrumb-StitgXXx.cjs +0 -1
- package/dist/Button-DDMc7-3S.js +0 -58
- package/dist/Button-akOSYEu9.cjs +0 -1
- package/dist/Card-DSCA-Igh.cjs +0 -1
- package/dist/Card-Dh9Pcmfa.js +0 -79
- package/dist/Checkbox-DWl91ci_.js +0 -92
- package/dist/Checkbox-DvkT6QP9.cjs +0 -1
- package/dist/Dialog-CtYu14zl.js +0 -245
- package/dist/Dialog-gPT4noD8.cjs +0 -1
- package/dist/Drawer-BFJxsPG1.js +0 -246
- package/dist/Drawer-BygSIQQn.cjs +0 -1
- package/dist/Field-Bv07PL2M.js +0 -120
- package/dist/Field-D6FSsUGj.cjs +0 -1
- package/dist/Input-BS_t1bl-.js +0 -151
- package/dist/Input-UQ2fQwE7.cjs +0 -1
- package/dist/Pagination-C1h7OTgM.js +0 -128
- package/dist/Pagination-CmmcBPNz.cjs +0 -1
- package/dist/Popover-BlCmIF9J.cjs +0 -1
- package/dist/Progress-DWLr6Bq2.js +0 -75
- package/dist/Progress-FO-4WX0i.cjs +0 -1
- package/dist/RadioItem-BfkTHBxQ.cjs +0 -1
- package/dist/RadioItem-CzHSS_qK.js +0 -141
- package/dist/Select-BkJNe4Lc.cjs +0 -1
- package/dist/Select-DfV10hZt.js +0 -350
- package/dist/SelectField-B6N0uub8.js +0 -49
- package/dist/SelectField-Dxl2Mgbv.cjs +0 -1
- package/dist/Separator-C5lPGzes.cjs +0 -1
- package/dist/Separator-DQT58t90.js +0 -52
- package/dist/Spinner-CeIDpqkx.cjs +0 -1
- package/dist/Switch-BU_Tcttb.cjs +0 -1
- package/dist/Tabs-BTfm4LbV.js +0 -220
- package/dist/Tabs-DuU02-UD.cjs +0 -1
- package/dist/TextField-C3r-6jr6.cjs +0 -1
- package/dist/TextField-DtXQQJJk.js +0 -31
- package/dist/Textarea-H6evM8L4.cjs +0 -1
- package/dist/TextareaField-CpqPinvx.js +0 -31
- package/dist/TextareaField-D234Lyi_.cjs +0 -1
- package/dist/Toast-0acAjZTB.js +0 -167
- package/dist/Toast-ndaxbpcV.cjs +0 -1
- package/dist/Tooltip-CCd6VRvZ.cjs +0 -1
- package/dist/VhyxUIProvider-C7ie8u2L.cjs +0 -1
- package/dist/VhyxUIProvider-DVFSW4q-.js +0 -31
- package/dist/jsx-runtime-BRMkMA8J.cjs +0 -22
- package/dist/jsx-runtime-CL69jGNW.js +0 -279
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,50 @@ import { FormState } from 'react-hook-form';
|
|
|
5
5
|
import { UseFormRegister } from 'react-hook-form';
|
|
6
6
|
import { UseFormReturn } from 'react-hook-form';
|
|
7
7
|
|
|
8
|
+
export declare const Accordion: AccordionComponent;
|
|
9
|
+
|
|
10
|
+
declare type AccordionComponent = default_2.ForwardRefExoticComponent<AccordionProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
11
|
+
Item: typeof AccordionItem;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** A single collapsible section. */
|
|
15
|
+
declare const AccordionItem: default_2.ForwardRefExoticComponent<AccordionItemProps & default_2.RefAttributes<HTMLDetailsElement>>;
|
|
16
|
+
|
|
17
|
+
/** One entry for the data-driven `items` shorthand. */
|
|
18
|
+
export declare interface AccordionItemData {
|
|
19
|
+
value: string;
|
|
20
|
+
title: default_2.ReactNode;
|
|
21
|
+
content: default_2.ReactNode;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Props for Accordion.Item. */
|
|
26
|
+
export declare interface AccordionItemProps extends Omit<default_2.DetailsHTMLAttributes<HTMLDetailsElement>, 'title' | 'open'> {
|
|
27
|
+
/** Unique value within the accordion. */
|
|
28
|
+
value: string;
|
|
29
|
+
/** Header content. */
|
|
30
|
+
title: default_2.ReactNode;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Props for Accordion. */
|
|
35
|
+
export declare interface AccordionProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, 'defaultValue'> {
|
|
36
|
+
/** `single` keeps at most one section open. @default 'single' */
|
|
37
|
+
type?: 'single' | 'multiple';
|
|
38
|
+
/** Initially open section values (uncontrolled). */
|
|
39
|
+
defaultValue?: string[];
|
|
40
|
+
/** Open section values (controlled). */
|
|
41
|
+
value?: string[];
|
|
42
|
+
/** Called with the next list of open values. */
|
|
43
|
+
onValueChange?: (value: string[]) => void;
|
|
44
|
+
/** `ghost` removes the outer border. @default 'default' */
|
|
45
|
+
variant?: 'default' | 'ghost';
|
|
46
|
+
/** Shorthand: render items from data instead of children. */
|
|
47
|
+
items?: AccordionItemData[];
|
|
48
|
+
/** VhyxSeal contract override. */
|
|
49
|
+
contract?: Partial<ComponentContract>;
|
|
50
|
+
}
|
|
51
|
+
|
|
8
52
|
export declare const Alert: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<AlertProps> & default_2.RefAttributes<HTMLDivElement>>;
|
|
9
53
|
|
|
10
54
|
/** Props for the Alert component. */
|
|
@@ -26,6 +70,49 @@ export declare interface AlertProps extends default_2.HTMLAttributes<HTMLDivElem
|
|
|
26
70
|
/** Visual variant of the Alert. */
|
|
27
71
|
export declare type AlertVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
28
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Avatar — image with automatic initials fallback and optional presence dot.
|
|
75
|
+
* @example
|
|
76
|
+
* <Avatar name="Ada Lovelace" src="/ada.png" status="online" />
|
|
77
|
+
*/
|
|
78
|
+
export declare const Avatar: default_2.ForwardRefExoticComponent<AvatarProps & default_2.RefAttributes<HTMLSpanElement>>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* AvatarGroup — overlapping stack of avatars with "+N" overflow.
|
|
82
|
+
* @example
|
|
83
|
+
* <AvatarGroup max={3}>{people.map(p => <Avatar key={p.id} name={p.name} />)}</AvatarGroup>
|
|
84
|
+
*/
|
|
85
|
+
export declare function AvatarGroup({ max, size, className, children, ...rest }: AvatarGroupProps): default_2.ReactElement;
|
|
86
|
+
|
|
87
|
+
/** Props for AvatarGroup. */
|
|
88
|
+
export declare interface AvatarGroupProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
89
|
+
/** Show at most this many avatars, then a "+N" chip. */
|
|
90
|
+
max?: number;
|
|
91
|
+
/** Size applied to the overflow chip. @default 'md' */
|
|
92
|
+
size?: AvatarSize;
|
|
93
|
+
children: default_2.ReactNode;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Props for Avatar. */
|
|
97
|
+
export declare interface AvatarProps extends default_2.HTMLAttributes<HTMLSpanElement> {
|
|
98
|
+
/** Image URL. Falls back to initials when missing or when it fails to load. */
|
|
99
|
+
src?: string;
|
|
100
|
+
/** Person or entity name — used for alt text and initials. */
|
|
101
|
+
name: string;
|
|
102
|
+
/** @default 'md' */
|
|
103
|
+
size?: AvatarSize;
|
|
104
|
+
/** @default 'circle' */
|
|
105
|
+
shape?: 'circle' | 'square';
|
|
106
|
+
/** Presence dot in the corner. */
|
|
107
|
+
status?: AvatarStatus;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Avatar sizes. */
|
|
111
|
+
export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
112
|
+
|
|
113
|
+
/** Presence indicator. */
|
|
114
|
+
export declare type AvatarStatus = 'online' | 'busy' | 'away' | 'offline';
|
|
115
|
+
|
|
29
116
|
export declare const Badge: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<BadgeProps> & default_2.RefAttributes<HTMLSpanElement>>;
|
|
30
117
|
|
|
31
118
|
/** Props for the Badge component. */
|
|
@@ -131,6 +218,9 @@ export declare interface BreadcrumbProps extends default_2.HTMLAttributes<HTMLEl
|
|
|
131
218
|
children?: default_2.ReactNode;
|
|
132
219
|
}
|
|
133
220
|
|
|
221
|
+
/** Viewport breakpoints shared by responsive layout props. sm 640px · md 768px · lg 1024px. */
|
|
222
|
+
export declare type Breakpoint = 'sm' | 'md' | 'lg';
|
|
223
|
+
|
|
134
224
|
export declare const Button: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<ButtonProps> & default_2.RefAttributes<HTMLButtonElement>>;
|
|
135
225
|
|
|
136
226
|
/** Props for the Button component. */
|
|
@@ -231,6 +321,23 @@ export declare interface CardProps extends default_2.HTMLAttributes<HTMLDivEleme
|
|
|
231
321
|
/** Visual variant of the Card. */
|
|
232
322
|
export declare type CardVariant = 'default' | 'outline' | 'ghost' | 'elevated';
|
|
233
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Center — centers its children on both axes.
|
|
326
|
+
* @example
|
|
327
|
+
* <Center fullHeight><Spinner /></Center>
|
|
328
|
+
*/
|
|
329
|
+
export declare const Center: default_2.ForwardRefExoticComponent<CenterProps & default_2.RefAttributes<HTMLElement>>;
|
|
330
|
+
|
|
331
|
+
/** Props for Center. */
|
|
332
|
+
export declare interface CenterProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
333
|
+
/** Element to render. @default 'div' */
|
|
334
|
+
as?: default_2.ElementType;
|
|
335
|
+
/** Use `inline-flex` instead of `flex`. */
|
|
336
|
+
inline?: boolean;
|
|
337
|
+
/** Fill the viewport height — handy for auth and empty screens. */
|
|
338
|
+
fullHeight?: boolean;
|
|
339
|
+
}
|
|
340
|
+
|
|
234
341
|
export declare const Checkbox: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<CheckboxProps> & default_2.RefAttributes<HTMLButtonElement>>;
|
|
235
342
|
|
|
236
343
|
/** Props for the Checkbox component. */
|
|
@@ -260,6 +367,40 @@ export declare type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
|
260
367
|
/** Checkbox checked value — boolean or 'indeterminate'. */
|
|
261
368
|
declare type CheckedState = boolean | 'indeterminate';
|
|
262
369
|
|
|
370
|
+
/** A value accepted by {@link cx}: strings are kept, falsy values dropped, objects keep truthy keys. */
|
|
371
|
+
export declare type ClassValue = string | number | false | null | undefined | Record<string, boolean | null | undefined> | ClassValue[];
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Container — centers content with a readable max width and responsive gutters.
|
|
375
|
+
* @example
|
|
376
|
+
* <Container size="md"><Prose /></Container>
|
|
377
|
+
*/
|
|
378
|
+
export declare const Container: default_2.ForwardRefExoticComponent<ContainerProps & default_2.RefAttributes<HTMLElement>>;
|
|
379
|
+
|
|
380
|
+
/** Props for Container. */
|
|
381
|
+
export declare interface ContainerProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
382
|
+
/** Element to render. @default 'div' */
|
|
383
|
+
as?: default_2.ElementType;
|
|
384
|
+
/** Maximum width. @default 'lg' */
|
|
385
|
+
size?: ContainerSize;
|
|
386
|
+
/** Remove horizontal padding. */
|
|
387
|
+
flush?: boolean;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/** Max-width presets: sm 640 · md 768 · lg 1024 · xl 1280 · full. */
|
|
391
|
+
export declare type ContainerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Joins class names, skipping falsy values. Tiny `clsx` equivalent with zero dependencies.
|
|
395
|
+
*
|
|
396
|
+
* Works with Tailwind: component styles live in `@layer components`, so any
|
|
397
|
+
* utility you pass through `className` wins without `!important`.
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* cx('p-4', isActive && 'bg-accent', { 'opacity-50': disabled })
|
|
401
|
+
*/
|
|
402
|
+
export declare function cx(...values: ClassValue[]): string;
|
|
403
|
+
|
|
263
404
|
export declare const Dialog: default_2.ComponentType<DialogProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
264
405
|
Trigger: default_2.ForwardRefExoticComponent<DialogTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
265
406
|
Portal: typeof DialogPortal;
|
|
@@ -322,7 +463,6 @@ export declare interface DialogHeaderProps extends default_2.HTMLAttributes<HTML
|
|
|
322
463
|
export declare interface DialogOverlayProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
323
464
|
}
|
|
324
465
|
|
|
325
|
-
/** Renders its children in document.body. */
|
|
326
466
|
declare function DialogPortal({ children }: DialogPortalProps): default_2.ReactPortal | null;
|
|
327
467
|
|
|
328
468
|
declare namespace DialogPortal {
|
|
@@ -368,6 +508,9 @@ export declare interface DialogTriggerProps extends default_2.ButtonHTMLAttribut
|
|
|
368
508
|
children?: default_2.ReactNode;
|
|
369
509
|
}
|
|
370
510
|
|
|
511
|
+
/** Props for HStack/VStack — Stack without `direction`. */
|
|
512
|
+
export declare type DirectionalStackProps = Omit<StackProps, 'direction'>;
|
|
513
|
+
|
|
371
514
|
export declare const Drawer: default_2.ComponentType<DrawerProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
372
515
|
Trigger: default_2.ForwardRefExoticComponent<DrawerTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
373
516
|
Portal: typeof DrawerPortal;
|
|
@@ -425,7 +568,6 @@ export declare interface DrawerHeaderProps extends default_2.HTMLAttributes<HTML
|
|
|
425
568
|
export declare interface DrawerOverlayProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
426
569
|
}
|
|
427
570
|
|
|
428
|
-
/** Renders its children in document.body when the drawer is open. */
|
|
429
571
|
declare function DrawerPortal({ children }: DrawerPortalProps): default_2.ReactPortal | null;
|
|
430
572
|
|
|
431
573
|
declare namespace DrawerPortal {
|
|
@@ -513,21 +655,21 @@ export declare interface FieldProps extends Omit<default_2.HTMLAttributes<HTMLDi
|
|
|
513
655
|
*/
|
|
514
656
|
name: string;
|
|
515
657
|
/** Label rendered above (or beside) the input. */
|
|
516
|
-
label?: default_2.ReactNode;
|
|
658
|
+
label?: default_2.ReactNode | undefined;
|
|
517
659
|
/** Helper text rendered below the input. Connected via aria-describedby. */
|
|
518
|
-
hint?: default_2.ReactNode;
|
|
660
|
+
hint?: default_2.ReactNode | undefined;
|
|
519
661
|
/**
|
|
520
662
|
* Error message. When set, the child input receives aria-invalid and
|
|
521
663
|
* data-error attributes and the error text is announced as a live region.
|
|
522
664
|
* If absent, Field reads the error from the parent Form context automatically.
|
|
523
665
|
*/
|
|
524
|
-
error?: string;
|
|
666
|
+
error?: string | undefined;
|
|
525
667
|
/** When true, renders a required indicator (*) next to the label. */
|
|
526
|
-
required?: boolean;
|
|
668
|
+
required?: boolean | undefined;
|
|
527
669
|
/** When true, renders an optional indicator next to the label. */
|
|
528
|
-
optional?: boolean;
|
|
670
|
+
optional?: boolean | undefined;
|
|
529
671
|
/** Field layout. Overrides the parent Form layout when set. @default 'vertical' */
|
|
530
|
-
layout?: 'vertical' | 'horizontal';
|
|
672
|
+
layout?: 'vertical' | 'horizontal' | undefined;
|
|
531
673
|
/** The single interactive child element (Input, Textarea, Select, etc.). */
|
|
532
674
|
children: default_2.ReactNode;
|
|
533
675
|
}
|
|
@@ -586,6 +728,64 @@ export declare interface FormProps extends default_2.FormHTMLAttributes<HTMLForm
|
|
|
586
728
|
onSubmit?: (data: FieldValues) => void | Promise<void>;
|
|
587
729
|
}
|
|
588
730
|
|
|
731
|
+
/**
|
|
732
|
+
* Derives up to two initials from a name.
|
|
733
|
+
* @example
|
|
734
|
+
* getInitials('Ada Lovelace') // 'AL'
|
|
735
|
+
*/
|
|
736
|
+
export declare function getInitials(name: string): string;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Grid — equal columns or responsive auto-fit cards in one prop.
|
|
740
|
+
*
|
|
741
|
+
* @example
|
|
742
|
+
* <Grid minChildWidth="16rem" gap={6}>{cards}</Grid>
|
|
743
|
+
* <Grid columns={3} collapseBelow="md">…</Grid>
|
|
744
|
+
*/
|
|
745
|
+
export declare const Grid: default_2.ForwardRefExoticComponent<GridProps & default_2.RefAttributes<HTMLElement>>;
|
|
746
|
+
|
|
747
|
+
/** Props for Grid. */
|
|
748
|
+
export declare interface GridProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
749
|
+
/** Element to render. @default 'div' */
|
|
750
|
+
as?: default_2.ElementType;
|
|
751
|
+
/** Fixed number of equal columns. Ignored when `minChildWidth` is set. @default 1 */
|
|
752
|
+
columns?: number;
|
|
753
|
+
/**
|
|
754
|
+
* Responsive auto-fit: as many columns as fit, each at least this wide
|
|
755
|
+
* (e.g. `"16rem"` or `240`). The easiest way to build card grids.
|
|
756
|
+
*/
|
|
757
|
+
minChildWidth?: string | number;
|
|
758
|
+
/** Gap between cells, in token steps. @default 4 */
|
|
759
|
+
gap?: Space;
|
|
760
|
+
/** Collapse to a single column below this breakpoint (fixed `columns` only). */
|
|
761
|
+
collapseBelow?: Breakpoint;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Heading — semantic level and visual size are separate, so outlines stay correct.
|
|
766
|
+
* @example
|
|
767
|
+
* <Heading level={1}>Dashboard</Heading>
|
|
768
|
+
* <Heading level={2} size="sm">Recent activity</Heading>
|
|
769
|
+
*/
|
|
770
|
+
export declare const Heading: default_2.ForwardRefExoticComponent<HeadingProps & default_2.RefAttributes<HTMLHeadingElement>>;
|
|
771
|
+
|
|
772
|
+
/** Heading level 1–6. */
|
|
773
|
+
export declare type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
774
|
+
|
|
775
|
+
/** Props for Heading. */
|
|
776
|
+
export declare interface HeadingProps extends default_2.HTMLAttributes<HTMLHeadingElement> {
|
|
777
|
+
/** Semantic level → renders `<h1>`…`<h6>`. @default 2 */
|
|
778
|
+
level?: HeadingLevel;
|
|
779
|
+
/** Visual size. Defaults from level so semantics and looks stay independent. */
|
|
780
|
+
size?: HeadingSize;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/** Visual heading size, independent of level. */
|
|
784
|
+
export declare type HeadingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
785
|
+
|
|
786
|
+
/** Horizontal Stack. Defaults `align="center"`. @example <HStack gap={2}><Button/><Button/></HStack> */
|
|
787
|
+
export declare const HStack: default_2.ForwardRefExoticComponent<DirectionalStackProps & default_2.RefAttributes<HTMLElement>>;
|
|
788
|
+
|
|
589
789
|
export declare const Input: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<InputProps> & default_2.RefAttributes<HTMLInputElement>>;
|
|
590
790
|
|
|
591
791
|
/** Props for the Input component. */
|
|
@@ -613,6 +813,19 @@ export declare interface InputProps extends Omit<default_2.InputHTMLAttributes<H
|
|
|
613
813
|
/** Size tokens available on the Input component. */
|
|
614
814
|
export declare type InputSize = 'sm' | 'md' | 'lg';
|
|
615
815
|
|
|
816
|
+
/**
|
|
817
|
+
* Kbd — keyboard shortcut hint.
|
|
818
|
+
* @example
|
|
819
|
+
* <Kbd keys={['⌘', 'K']} />
|
|
820
|
+
*/
|
|
821
|
+
export declare function Kbd({ keys, children, style, ...rest }: KbdProps): default_2.ReactElement;
|
|
822
|
+
|
|
823
|
+
/** Props for Kbd. */
|
|
824
|
+
export declare interface KbdProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
825
|
+
/** Keys to render joined with "+", e.g. `['⌘', 'K']`. Alternative to children. */
|
|
826
|
+
keys?: string[];
|
|
827
|
+
}
|
|
828
|
+
|
|
616
829
|
export declare const Pagination: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<PaginationProps> & default_2.RefAttributes<HTMLElement>>;
|
|
617
830
|
|
|
618
831
|
/** Props for the Pagination component. */
|
|
@@ -797,6 +1010,12 @@ export declare interface RadioItemProps extends Omit<default_2.ButtonHTMLAttribu
|
|
|
797
1010
|
children?: default_2.ReactNode;
|
|
798
1011
|
}
|
|
799
1012
|
|
|
1013
|
+
/**
|
|
1014
|
+
* Resolves the VhyxSeal manifest domain without ever returning an empty string.
|
|
1015
|
+
* An empty domain makes `generateManifest()` throw a fatal error on every render.
|
|
1016
|
+
*/
|
|
1017
|
+
export declare function resolveSealDomain(domain?: string): string;
|
|
1018
|
+
|
|
800
1019
|
export declare const Select: default_2.ComponentType<SelectProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
801
1020
|
Trigger: default_2.ForwardRefExoticComponent<SelectTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
802
1021
|
Content: typeof SelectContent;
|
|
@@ -911,11 +1130,11 @@ export declare interface SelectProps extends default_2.HTMLAttributes<HTMLDivEle
|
|
|
911
1130
|
/** Called when a new value is selected. */
|
|
912
1131
|
onValueChange?: (value: string) => void;
|
|
913
1132
|
/** When true, the trigger is disabled. */
|
|
914
|
-
disabled?: boolean;
|
|
1133
|
+
disabled?: boolean | undefined;
|
|
915
1134
|
/** Size applied to all Select sub-components. @default 'md' */
|
|
916
|
-
size?: SelectSize;
|
|
1135
|
+
size?: SelectSize | undefined;
|
|
917
1136
|
/** Placeholder text shown when no value is selected. */
|
|
918
|
-
placeholder?: string;
|
|
1137
|
+
placeholder?: string | undefined;
|
|
919
1138
|
/** VhyxSeal contract override. */
|
|
920
1139
|
contract?: Partial<ComponentContract>;
|
|
921
1140
|
}
|
|
@@ -971,6 +1190,35 @@ export declare interface SeparatorProps extends default_2.HTMLAttributes<HTMLEle
|
|
|
971
1190
|
label?: string;
|
|
972
1191
|
}
|
|
973
1192
|
|
|
1193
|
+
/**
|
|
1194
|
+
* Skeleton — loading placeholder. Hidden from assistive tech; pair it with an
|
|
1195
|
+
* `aria-busy` container. Respects `prefers-reduced-motion`.
|
|
1196
|
+
* @example
|
|
1197
|
+
* <Skeleton variant="circle" width={40} height={40} />
|
|
1198
|
+
* <Skeleton variant="text" lines={3} />
|
|
1199
|
+
*/
|
|
1200
|
+
export declare function Skeleton({ variant, width, height, lines, className, style, ...rest }: SkeletonProps): default_2.ReactElement;
|
|
1201
|
+
|
|
1202
|
+
/** Props for Skeleton. */
|
|
1203
|
+
export declare interface SkeletonProps extends default_2.HTMLAttributes<HTMLSpanElement> {
|
|
1204
|
+
/** @default 'rect' */
|
|
1205
|
+
variant?: 'rect' | 'circle' | 'text';
|
|
1206
|
+
width?: string | number;
|
|
1207
|
+
height?: string | number;
|
|
1208
|
+
/** Repeat as N stacked text lines (last one shorter). */
|
|
1209
|
+
lines?: number;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/** Spacing steps available in @vhyxui/tokens (`--vhyx-space-*`). */
|
|
1213
|
+
export declare type Space = 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 14 | 16 | 20 | 24 | 32;
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Converts a spacing step to its CSS variable, e.g. `2.5` → `var(--vhyx-space-2-5)`.
|
|
1217
|
+
* @example
|
|
1218
|
+
* spaceVar(4) // 'var(--vhyx-space-4)'
|
|
1219
|
+
*/
|
|
1220
|
+
export declare function spaceVar(step: Space): string;
|
|
1221
|
+
|
|
974
1222
|
export declare const Spinner: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<SpinnerProps> & default_2.RefAttributes<SVGSVGElement>>;
|
|
975
1223
|
|
|
976
1224
|
/** Props for the Spinner component. */
|
|
@@ -992,6 +1240,46 @@ export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
992
1240
|
/** Color variant of the spinner stroke. */
|
|
993
1241
|
export declare type SpinnerVariant = 'default' | 'accent' | 'white';
|
|
994
1242
|
|
|
1243
|
+
/**
|
|
1244
|
+
* Stack — the one layout primitive you need most: children in a row or column with consistent gaps.
|
|
1245
|
+
*
|
|
1246
|
+
* @example
|
|
1247
|
+
* <Stack gap={4}>
|
|
1248
|
+
* <Heading>Title</Heading>
|
|
1249
|
+
* <Text tone="subtle">Body</Text>
|
|
1250
|
+
* </Stack>
|
|
1251
|
+
*
|
|
1252
|
+
* @example
|
|
1253
|
+
* <Stack direction="row" justify="between" align="center" collapseBelow="md">…</Stack>
|
|
1254
|
+
*/
|
|
1255
|
+
export declare const Stack: default_2.ForwardRefExoticComponent<StackProps & default_2.RefAttributes<HTMLElement>>;
|
|
1256
|
+
|
|
1257
|
+
/** Flex alignment keywords. */
|
|
1258
|
+
export declare type StackAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
1259
|
+
|
|
1260
|
+
/** Flex justification keywords. */
|
|
1261
|
+
export declare type StackJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
1262
|
+
|
|
1263
|
+
/** Props for Stack. */
|
|
1264
|
+
export declare interface StackProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
1265
|
+
/** Element to render. @default 'div' */
|
|
1266
|
+
as?: default_2.ElementType;
|
|
1267
|
+
/** Main axis. @default 'column' */
|
|
1268
|
+
direction?: 'row' | 'column';
|
|
1269
|
+
/** Gap between children, in token steps. @default 3 */
|
|
1270
|
+
gap?: Space;
|
|
1271
|
+
/** Cross-axis alignment. */
|
|
1272
|
+
align?: StackAlign;
|
|
1273
|
+
/** Main-axis distribution. */
|
|
1274
|
+
justify?: StackJustify;
|
|
1275
|
+
/** Allow children to wrap onto multiple lines. */
|
|
1276
|
+
wrap?: boolean;
|
|
1277
|
+
/** Switch a row to a column below this breakpoint (responsive without media queries in your code). */
|
|
1278
|
+
collapseBelow?: Breakpoint;
|
|
1279
|
+
/** Padding on all sides, in token steps. */
|
|
1280
|
+
padding?: Space;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
995
1283
|
export declare const Switch: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<SwitchProps> & default_2.RefAttributes<HTMLButtonElement>>;
|
|
996
1284
|
|
|
997
1285
|
/** Props for the Switch component. */
|
|
@@ -1016,6 +1304,67 @@ export declare interface SwitchProps extends Omit<default_2.ButtonHTMLAttributes
|
|
|
1016
1304
|
/** Size tokens available on the Switch component. */
|
|
1017
1305
|
export declare type SwitchSize = 'sm' | 'md' | 'lg';
|
|
1018
1306
|
|
|
1307
|
+
export declare const Table: TableComponent;
|
|
1308
|
+
|
|
1309
|
+
declare const TableBody: default_2.ForwardRefExoticComponent<default_2.HTMLAttributes<HTMLTableSectionElement> & default_2.RefAttributes<HTMLTableSectionElement>>;
|
|
1310
|
+
|
|
1311
|
+
declare const TableCell: default_2.ForwardRefExoticComponent<TableCellProps & default_2.RefAttributes<HTMLTableCellElement>>;
|
|
1312
|
+
|
|
1313
|
+
/** Props for header/data cells. */
|
|
1314
|
+
export declare interface TableCellProps extends Omit<default_2.TdHTMLAttributes<HTMLTableCellElement>, 'align'> {
|
|
1315
|
+
align?: 'start' | 'center' | 'end';
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
/** Column definition for the data-driven shorthand. */
|
|
1319
|
+
export declare interface TableColumn<Row> {
|
|
1320
|
+
/** Unique key; also the default accessor into the row. */
|
|
1321
|
+
key: string;
|
|
1322
|
+
/** Header content. */
|
|
1323
|
+
header: default_2.ReactNode;
|
|
1324
|
+
/** Custom cell renderer. Defaults to `String(row[key])`. */
|
|
1325
|
+
cell?: (row: Row, index: number) => default_2.ReactNode;
|
|
1326
|
+
/** Text alignment — use `end` for numbers. */
|
|
1327
|
+
align?: 'start' | 'center' | 'end';
|
|
1328
|
+
/** CSS width, e.g. `'8rem'`. */
|
|
1329
|
+
width?: string;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
declare type TableComponent = default_2.ForwardRefExoticComponent<TableProps & default_2.RefAttributes<HTMLTableElement>> & {
|
|
1333
|
+
Head: typeof TableHead;
|
|
1334
|
+
Body: typeof TableBody;
|
|
1335
|
+
Row: typeof TableRow;
|
|
1336
|
+
Header: typeof TableHeader;
|
|
1337
|
+
Cell: typeof TableCell;
|
|
1338
|
+
};
|
|
1339
|
+
|
|
1340
|
+
declare const TableHead: default_2.ForwardRefExoticComponent<default_2.HTMLAttributes<HTMLTableSectionElement> & default_2.RefAttributes<HTMLTableSectionElement>>;
|
|
1341
|
+
|
|
1342
|
+
declare const TableHeader: default_2.ForwardRefExoticComponent<TableCellProps & default_2.RefAttributes<HTMLTableCellElement>>;
|
|
1343
|
+
|
|
1344
|
+
/** Props for Table. */
|
|
1345
|
+
export declare interface TableProps extends default_2.TableHTMLAttributes<HTMLTableElement> {
|
|
1346
|
+
/** Zebra rows. */
|
|
1347
|
+
striped?: boolean;
|
|
1348
|
+
/** Highlight row under the pointer. @default true */
|
|
1349
|
+
hoverable?: boolean;
|
|
1350
|
+
/** @default 'comfortable' */
|
|
1351
|
+
density?: 'comfortable' | 'compact';
|
|
1352
|
+
/** Accessible caption (rendered below the table). */
|
|
1353
|
+
caption?: default_2.ReactNode;
|
|
1354
|
+
/** Shorthand: column definitions. Use with `data`. */
|
|
1355
|
+
columns?: TableColumn<Record<string, unknown>>[];
|
|
1356
|
+
/** Shorthand: rows. Use with `columns`. */
|
|
1357
|
+
data?: Record<string, unknown>[];
|
|
1358
|
+
/** Row key accessor for the shorthand. Defaults to `row.id` or the index. */
|
|
1359
|
+
rowKey?: (row: Record<string, unknown>, index: number) => string;
|
|
1360
|
+
/** Shown when `data` is empty. */
|
|
1361
|
+
emptyState?: default_2.ReactNode;
|
|
1362
|
+
/** VhyxSeal contract override. */
|
|
1363
|
+
contract?: Partial<ComponentContract>;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
declare const TableRow: default_2.ForwardRefExoticComponent<default_2.HTMLAttributes<HTMLTableRowElement> & default_2.RefAttributes<HTMLTableRowElement>>;
|
|
1367
|
+
|
|
1019
1368
|
export declare const Tabs: default_2.ComponentType<TabsProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
1020
1369
|
List: default_2.ForwardRefExoticComponent<TabsListProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
1021
1370
|
Trigger: default_2.ForwardRefExoticComponent<TabsTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1071,6 +1420,14 @@ export declare interface TabsTriggerProps extends Omit<default_2.ButtonHTMLAttri
|
|
|
1071
1420
|
/** Variant visual styles for Tabs. */
|
|
1072
1421
|
export declare type TabsVariant = 'default' | 'pills' | 'underline' | 'enclosed';
|
|
1073
1422
|
|
|
1423
|
+
/**
|
|
1424
|
+
* Text — body copy with token-based size, tone and weight.
|
|
1425
|
+
* @example
|
|
1426
|
+
* <Text tone="subtle" size="sm">Last updated 2 minutes ago</Text>
|
|
1427
|
+
*/
|
|
1428
|
+
declare const Text_2: default_2.ForwardRefExoticComponent<TextProps & default_2.RefAttributes<HTMLElement>>;
|
|
1429
|
+
export { Text_2 as Text }
|
|
1430
|
+
|
|
1074
1431
|
export declare const Textarea: default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<TextareaProps> & default_2.RefAttributes<HTMLTextAreaElement>>;
|
|
1075
1432
|
|
|
1076
1433
|
/**
|
|
@@ -1146,6 +1503,33 @@ export declare namespace TextField {
|
|
|
1146
1503
|
*/
|
|
1147
1504
|
export declare type TextFieldProps = FieldOwnProps & Omit<InputProps, 'id' | 'error'>;
|
|
1148
1505
|
|
|
1506
|
+
/** Props for Text. */
|
|
1507
|
+
export declare interface TextProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
1508
|
+
/** Element to render. @default 'p' */
|
|
1509
|
+
as?: default_2.ElementType;
|
|
1510
|
+
/** @default 'md' */
|
|
1511
|
+
size?: TextSize;
|
|
1512
|
+
/** @default 'default' */
|
|
1513
|
+
tone?: TextTone;
|
|
1514
|
+
weight?: TextWeight;
|
|
1515
|
+
align?: 'start' | 'center' | 'end';
|
|
1516
|
+
/** Monospace font. */
|
|
1517
|
+
mono?: boolean;
|
|
1518
|
+
/** Single line with ellipsis. */
|
|
1519
|
+
truncate?: boolean;
|
|
1520
|
+
/** Clamp to N lines with ellipsis. */
|
|
1521
|
+
lines?: number;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
/** Text size scale. */
|
|
1525
|
+
export declare type TextSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1526
|
+
|
|
1527
|
+
/** Semantic colour of text. */
|
|
1528
|
+
export declare type TextTone = 'default' | 'subtle' | 'muted' | 'accent' | 'success' | 'warning' | 'danger' | 'inherit';
|
|
1529
|
+
|
|
1530
|
+
/** Font weight. */
|
|
1531
|
+
export declare type TextWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
1532
|
+
|
|
1149
1533
|
export declare const Toast: default_2.ComponentType<ToastProviderProps> & {
|
|
1150
1534
|
displayName: string;
|
|
1151
1535
|
};
|
|
@@ -1268,24 +1652,26 @@ export declare interface TooltipProps {
|
|
|
1268
1652
|
*/
|
|
1269
1653
|
export declare function useFormContext(): FormContextValue | null;
|
|
1270
1654
|
|
|
1271
|
-
/**
|
|
1655
|
+
/** Colour scheme applied to `<html data-theme>`. `system` follows the OS. */
|
|
1656
|
+
export declare type VhyxTheme = 'light' | 'dark' | 'system';
|
|
1657
|
+
|
|
1272
1658
|
/**
|
|
1273
1659
|
* VhyxUIProvider — root provider for VhyxUI.
|
|
1274
1660
|
*
|
|
1275
1661
|
* Place once at the top of your application tree. Provides:
|
|
1276
|
-
* - SealProvider (VhyxSeal contract registry for agent API access)
|
|
1277
|
-
* - A visually hidden skip link as the first focusable element
|
|
1278
|
-
*
|
|
1279
|
-
* -
|
|
1662
|
+
* - SealProvider (VhyxSeal contract registry for agent API access), opt-out via `agentContracts={false}`
|
|
1663
|
+
* - A visually hidden skip link as the first focusable element, linking to `#vhyx-main`
|
|
1664
|
+
* - The Toast notification region (imperative API via `toast()`)
|
|
1665
|
+
* - Optional theme management via `theme="light" | "dark" | "system"`
|
|
1280
1666
|
*
|
|
1281
1667
|
* @example
|
|
1282
|
-
* <VhyxUIProvider>
|
|
1668
|
+
* <VhyxUIProvider theme="system">
|
|
1283
1669
|
* <main id="vhyx-main">
|
|
1284
1670
|
* <App />
|
|
1285
1671
|
* </main>
|
|
1286
1672
|
* </VhyxUIProvider>
|
|
1287
1673
|
*/
|
|
1288
|
-
export declare function VhyxUIProvider({ children, toastPosition, maxToasts, defaultDuration, domain, }: VhyxUIProviderProps): default_2.ReactElement;
|
|
1674
|
+
export declare function VhyxUIProvider({ children, toastPosition, maxToasts, defaultDuration, domain, theme, agentContracts, skipLink, }: VhyxUIProviderProps): default_2.ReactElement;
|
|
1289
1675
|
|
|
1290
1676
|
export declare namespace VhyxUIProvider {
|
|
1291
1677
|
var displayName: string;
|
|
@@ -1297,7 +1683,6 @@ export declare interface VhyxUIProviderProps {
|
|
|
1297
1683
|
children: default_2.ReactNode;
|
|
1298
1684
|
/**
|
|
1299
1685
|
* Position of the toast notification region.
|
|
1300
|
-
* Passed through to ToastProvider.
|
|
1301
1686
|
* @default 'bottom-right'
|
|
1302
1687
|
*/
|
|
1303
1688
|
toastPosition?: ToastPosition;
|
|
@@ -1313,10 +1698,45 @@ export declare interface VhyxUIProviderProps {
|
|
|
1313
1698
|
defaultDuration?: number;
|
|
1314
1699
|
/**
|
|
1315
1700
|
* Domain for VhyxSeal manifest generation.
|
|
1316
|
-
*
|
|
1701
|
+
* Resolution order: this prop → NEXT_PUBLIC_VHYX_DOMAIN → VITE_VHYX_DOMAIN →
|
|
1702
|
+
* `window.location.hostname` → `"localhost"`. Never empty, so the manifest
|
|
1703
|
+
* generator never fails on a missing domain.
|
|
1317
1704
|
* @example "myshop.platform.com"
|
|
1318
1705
|
*/
|
|
1319
1706
|
domain?: string;
|
|
1707
|
+
/**
|
|
1708
|
+
* Optional colour scheme. When set, the provider writes `data-theme` on
|
|
1709
|
+
* `<html>` (and follows the OS for `system`). Leave undefined when another
|
|
1710
|
+
* library (next-themes, your own toggle) already owns `data-theme`.
|
|
1711
|
+
*/
|
|
1712
|
+
theme?: VhyxTheme;
|
|
1713
|
+
/**
|
|
1714
|
+
* Register components with VhyxSeal so AI agents can read their contracts.
|
|
1715
|
+
* Set to false to opt out entirely (no SealProvider in the tree).
|
|
1716
|
+
* @default true
|
|
1717
|
+
*/
|
|
1718
|
+
agentContracts?: boolean;
|
|
1719
|
+
/**
|
|
1720
|
+
* Render the "Skip to main content" link targeting `#vhyx-main`.
|
|
1721
|
+
* @default true
|
|
1722
|
+
*/
|
|
1723
|
+
skipLink?: boolean;
|
|
1320
1724
|
}
|
|
1321
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* VisuallyHidden — content for screen readers only.
|
|
1728
|
+
* @example
|
|
1729
|
+
* <button><Icon /><VisuallyHidden>Close</VisuallyHidden></button>
|
|
1730
|
+
*/
|
|
1731
|
+
export declare function VisuallyHidden({ as: Tag, style, ...rest }: VisuallyHiddenProps): default_2.ReactElement;
|
|
1732
|
+
|
|
1733
|
+
/** Props for VisuallyHidden. */
|
|
1734
|
+
export declare interface VisuallyHiddenProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
1735
|
+
/** Element to render. @default 'span' */
|
|
1736
|
+
as?: default_2.ElementType;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
/** Vertical Stack. @example <VStack gap={4}>…</VStack> */
|
|
1740
|
+
export declare const VStack: default_2.ForwardRefExoticComponent<DirectionalStackProps & default_2.RefAttributes<HTMLElement>>;
|
|
1741
|
+
|
|
1322
1742
|
export { }
|