@reopt-ai/opt-ui-primitives 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/index.cjs +4911 -4912
- package/dist/index.d.cts +776 -695
- package/dist/index.d.ts +776 -695
- package/dist/index.js +4788 -4913
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import react__default, { CSSProperties, ComponentPropsWithoutRef, ReactNode, ReactElement } from 'react';
|
|
3
|
-
import * as _floating_ui_core from '@floating-ui/core';
|
|
4
|
-
import * as _floating_ui_react from '@floating-ui/react';
|
|
5
|
-
import { MiddlewareState, Placement, Strategy, OpenChangeReason } from '@floating-ui/react';
|
|
6
|
-
import * as _floating_ui_react_dom from '@floating-ui/react-dom';
|
|
7
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
1
|
|
|
2
|
+
import { FloatingContext, MiddlewareState, Placement, Strategy, UseFloatingReturn } from "@floating-ui/react";
|
|
3
|
+
import React$1, { CSSProperties, ComponentPropsWithoutRef, ReactElement, ReactNode } from "react";
|
|
4
|
+
//#region src/hooks/use-controllable-state.d.ts
|
|
9
5
|
/**
|
|
10
6
|
* Manages controlled/uncontrolled state for input components.
|
|
11
7
|
* When `controlledValue` is provided, acts as controlled; otherwise uses internal state.
|
|
12
8
|
*/
|
|
13
9
|
declare function useControllableState<T>(defaultValue: T, controlledValue: T | undefined, onChange: ((value: T) => void) | undefined): [T, (value: T) => void];
|
|
14
|
-
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/hooks/use-enter-leave.d.ts
|
|
15
12
|
type AnimationState = "idle" | "entering" | "entered" | "leaving";
|
|
16
13
|
/**
|
|
17
14
|
* Manages data-enter/data-leave animation attributes.
|
|
@@ -34,33 +31,35 @@ type AnimationState = "idle" | "entering" | "entered" | "leaving";
|
|
|
34
31
|
* animation frame — the data-leave frame still paints, with no magic timeout.
|
|
35
32
|
*/
|
|
36
33
|
declare function useEnterLeave(open: boolean, options?: {
|
|
37
|
-
|
|
34
|
+
animated?: boolean;
|
|
38
35
|
}): {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
ref: import("react").RefObject<HTMLElement | null>;
|
|
37
|
+
mounted: boolean;
|
|
38
|
+
dataAttributes: Record<string, string>;
|
|
39
|
+
state: AnimationState;
|
|
43
40
|
};
|
|
44
|
-
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/hooks/use-focus-visible.d.ts
|
|
45
43
|
/** Returns `focusVisibleProps` to spread on a focusable element. */
|
|
46
44
|
declare function useFocusVisible(): {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
focusVisibleProps: {
|
|
46
|
+
onFocus: (e: React.FocusEvent) => void;
|
|
47
|
+
onBlur: (e: React.FocusEvent) => void;
|
|
48
|
+
};
|
|
51
49
|
};
|
|
52
|
-
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/hooks/use-roving-tabindex.d.ts
|
|
53
52
|
/** Options for `RovingTabindex`. */
|
|
54
53
|
interface RovingTabindexOptions {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
orientation?: "horizontal" | "vertical" | "both";
|
|
55
|
+
loop?: boolean;
|
|
56
|
+
rtl?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Grid mode: the number of columns the items are laid out in. When set,
|
|
59
|
+
* ArrowUp/ArrowDown move by a whole row (±columns) and ArrowLeft/ArrowRight
|
|
60
|
+
* by one cell, regardless of `orientation` (WAI-ARIA grid pattern).
|
|
61
|
+
*/
|
|
62
|
+
columns?: number;
|
|
64
63
|
}
|
|
65
64
|
/**
|
|
66
65
|
* Implements roving tabindex pattern for keyboard navigation.
|
|
@@ -71,25 +70,53 @@ interface RovingTabindexOptions {
|
|
|
71
70
|
* Compatible with the legacy Composite data-active-item styling contract.
|
|
72
71
|
*/
|
|
73
72
|
declare function useRovingTabindex(options?: RovingTabindexOptions): {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
73
|
+
containerRef: import("react").RefObject<HTMLElement | null>;
|
|
74
|
+
containerProps: {
|
|
75
|
+
ref: import("react").RefObject<HTMLElement | null>;
|
|
76
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
77
|
+
};
|
|
78
|
+
activeId: string | null;
|
|
79
|
+
register: (id: string, element: HTMLElement, disabled?: boolean) => void;
|
|
80
|
+
unregister: (id: string) => void;
|
|
81
|
+
moveTo: (id: string) => void;
|
|
82
|
+
getTabIndex: (id: string) => -1 | 0;
|
|
84
83
|
};
|
|
85
|
-
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/hooks/use-floating.d.ts
|
|
86
86
|
/** Why an overlay's open state changed, forwarded to `onOpenChange`. */
|
|
87
87
|
type DismissReason = "escape-key" | "outside-press" | "ancestor-scroll";
|
|
88
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Dismissal behavior. `true` enables outside-press + escape-key.
|
|
90
|
+
*
|
|
91
|
+
* ## Which dismissals to delegate — the overlay policy
|
|
92
|
+
*
|
|
93
|
+
* Delegating to floating-ui's `useDismiss` gets shadow-DOM-safe,
|
|
94
|
+
* reference-aware document listeners for free, so it is the default choice.
|
|
95
|
+
* An overlay keeps a dismissal for ITSELF only when closing also has to move
|
|
96
|
+
* focus, because the keydown handler is where the focus target is known:
|
|
97
|
+
*
|
|
98
|
+
* | Overlay | outsidePress | escapeKey | why |
|
|
99
|
+
* | ----------------- | ------------ | --------- | -------------------------------------- |
|
|
100
|
+
* | Popover | delegated | delegated | `FloatingFocusManager` restores focus |
|
|
101
|
+
* | Tooltip | n/a | delegated | never holds focus |
|
|
102
|
+
* | Menu | delegated | OWN | Escape must refocus the trigger |
|
|
103
|
+
* | Select / Combobox | delegated | OWN | Escape keeps focus on trigger/input |
|
|
104
|
+
*
|
|
105
|
+
* `outsidePress` is delegated everywhere: the press target should receive
|
|
106
|
+
* focus, so no overlay needs to intervene. When adding an overlay, follow this
|
|
107
|
+
* table rather than inventing a third pattern — and if a new one is genuinely
|
|
108
|
+
* needed, add a row here.
|
|
109
|
+
*/
|
|
89
110
|
type DismissConfig = boolean | {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
111
|
+
/** Close on a press outside the reference/floating elements. */
|
|
112
|
+
outsidePress?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Close on Escape. Set `false` when the overlay handles Escape itself
|
|
115
|
+
* because it also has to restore focus — see the table above.
|
|
116
|
+
*/
|
|
117
|
+
escapeKey?: boolean;
|
|
118
|
+
/** Close when an ancestor scroller scrolls. Off by default. */
|
|
119
|
+
ancestorScroll?: boolean;
|
|
93
120
|
};
|
|
94
121
|
/** Physical side a popup is placed on, derived from the resolved placement. */
|
|
95
122
|
type Side = "top" | "right" | "bottom" | "left";
|
|
@@ -97,39 +124,58 @@ type Side = "top" | "right" | "bottom" | "left";
|
|
|
97
124
|
type Align = "start" | "center" | "end";
|
|
98
125
|
/** Arguments passed to a function-valued offset. */
|
|
99
126
|
interface OffsetArgs {
|
|
100
|
-
|
|
101
|
-
|
|
127
|
+
rects: MiddlewareState["rects"];
|
|
128
|
+
placement: Placement;
|
|
102
129
|
}
|
|
103
130
|
/** A fixed pixel offset or one derived from the anchor/popup dimensions. */
|
|
104
131
|
type OffsetValue = number | ((args: OffsetArgs) => number);
|
|
105
132
|
/** Options for `useFloating`. */
|
|
106
133
|
interface UseFloatingOptions {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
placement?: Placement;
|
|
135
|
+
strategy?: Strategy;
|
|
136
|
+
/** @deprecated Use `sideOffset`. Distance from the anchor along the side axis. */
|
|
137
|
+
gutter?: number;
|
|
138
|
+
/** Distance from the anchor along the side (main) axis. Default 4. */
|
|
139
|
+
sideOffset?: OffsetValue;
|
|
140
|
+
/** Distance along the alignment (cross) axis. */
|
|
141
|
+
alignOffset?: OffsetValue;
|
|
142
|
+
sameWidth?: boolean;
|
|
143
|
+
flip?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Once positioned, keep the flipped side sticky instead of flipping back as
|
|
146
|
+
* the popup content resizes (e.g. a combobox list shrinking per keystroke).
|
|
147
|
+
*/
|
|
148
|
+
lazyFlip?: boolean;
|
|
149
|
+
shift?: number | boolean;
|
|
150
|
+
overflowPadding?: number;
|
|
151
|
+
open?: boolean;
|
|
152
|
+
/** Called when floating-ui requests a close (dismiss). */
|
|
153
|
+
onOpenChange?: (open: boolean, reason?: DismissReason) => void;
|
|
154
|
+
/**
|
|
155
|
+
* Delegate outside-press / escape-key dismissal to @floating-ui/react's
|
|
156
|
+
* `useDismiss` (shadow-DOM-safe, reference-aware) instead of hand-rolled
|
|
157
|
+
* document listeners. Off unless set. Requires `onOpenChange`.
|
|
158
|
+
*/
|
|
159
|
+
dismiss?: DismissConfig;
|
|
160
|
+
}
|
|
161
|
+
/** Positioning state and prop getters returned by `useFloating`. */
|
|
162
|
+
interface UseFloatingResult {
|
|
163
|
+
refs: UseFloatingReturn<Element>["refs"];
|
|
164
|
+
floatingStyles: CSSProperties;
|
|
165
|
+
placement: Placement;
|
|
166
|
+
side: Side;
|
|
167
|
+
align: Align;
|
|
168
|
+
isPositioned: boolean;
|
|
169
|
+
anchorHidden: boolean;
|
|
170
|
+
context: FloatingContext<Element>;
|
|
171
|
+
getReferenceProps: () => {
|
|
172
|
+
ref: UseFloatingReturn<Element>["refs"]["setReference"];
|
|
173
|
+
};
|
|
174
|
+
getFloatingProps: () => {
|
|
175
|
+
ref: UseFloatingReturn<Element>["refs"]["setFloating"];
|
|
176
|
+
style: CSSProperties;
|
|
177
|
+
};
|
|
178
|
+
getPositionerStateProps: (isOpen: boolean) => Record<string, string>;
|
|
133
179
|
}
|
|
134
180
|
/**
|
|
135
181
|
* Wraps @floating-ui/react with an API compatible with the legacy popover
|
|
@@ -138,79 +184,36 @@ interface UseFloatingOptions {
|
|
|
138
184
|
* (side/align/isPositioned/anchorHidden) plus CSS custom properties — without
|
|
139
185
|
* imposing any visual styling.
|
|
140
186
|
*/
|
|
141
|
-
declare function useFloating(options?: UseFloatingOptions):
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
floating: React.MutableRefObject<HTMLElement | null>;
|
|
145
|
-
setReference: (node: _floating_ui_react_dom.ReferenceType | null) => void;
|
|
146
|
-
setFloating: (node: HTMLElement | null) => void;
|
|
147
|
-
} & _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
|
|
148
|
-
floatingStyles: CSSProperties;
|
|
149
|
-
placement: Placement;
|
|
150
|
-
side: Side;
|
|
151
|
-
align: Align;
|
|
152
|
-
isPositioned: boolean;
|
|
153
|
-
anchorHidden: boolean;
|
|
154
|
-
context: {
|
|
155
|
-
x: number;
|
|
156
|
-
y: number;
|
|
157
|
-
placement: Placement;
|
|
158
|
-
strategy: Strategy;
|
|
159
|
-
middlewareData: _floating_ui_core.MiddlewareData;
|
|
160
|
-
isPositioned: boolean;
|
|
161
|
-
update: () => void;
|
|
162
|
-
floatingStyles: React.CSSProperties;
|
|
163
|
-
open: boolean;
|
|
164
|
-
onOpenChange: (open: boolean, event?: Event, reason?: OpenChangeReason) => void;
|
|
165
|
-
events: _floating_ui_react.FloatingEvents;
|
|
166
|
-
dataRef: React.MutableRefObject<_floating_ui_react.ContextData>;
|
|
167
|
-
nodeId: string | undefined;
|
|
168
|
-
floatingId: string | undefined;
|
|
169
|
-
refs: _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
|
|
170
|
-
elements: _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
|
|
171
|
-
};
|
|
172
|
-
getReferenceProps: () => {
|
|
173
|
-
ref: ((node: _floating_ui_react_dom.ReferenceType | null) => void) & ((node: _floating_ui_react.ReferenceType | null) => void);
|
|
174
|
-
};
|
|
175
|
-
getFloatingProps: () => {
|
|
176
|
-
ref: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
177
|
-
style: CSSProperties;
|
|
178
|
-
};
|
|
179
|
-
/**
|
|
180
|
-
* `data-open`/`data-closed`/`data-side`/`data-align`/`data-anchor-hidden`
|
|
181
|
-
* for the positioner. Additive — spread onto the panel alongside existing
|
|
182
|
-
* data attributes so Core can target open state, resolved side, and anchor
|
|
183
|
-
* visibility with CSS only.
|
|
184
|
-
*/
|
|
185
|
-
getPositionerStateProps: (isOpen: boolean) => Record<string, string>;
|
|
186
|
-
};
|
|
187
|
-
|
|
187
|
+
declare function useFloating(options?: UseFloatingOptions): UseFloatingResult;
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/hooks/use-id.d.ts
|
|
188
190
|
/**
|
|
189
191
|
* Generates a stable unique ID for a component.
|
|
190
192
|
* Uses React's built-in useId() for SSR-safe ID generation.
|
|
191
193
|
*/
|
|
192
194
|
declare function useId(providedId?: string): string;
|
|
193
|
-
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/hooks/use-focusable-when-disabled.d.ts
|
|
194
197
|
/** Options for {@link useFocusableWhenDisabled}. */
|
|
195
198
|
interface FocusableWhenDisabledOptions {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
199
|
+
disabled?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* Keep the element focusable and announced while disabled (APG pattern):
|
|
202
|
+
* emit `aria-disabled` instead of the native `disabled` attribute so it stays
|
|
203
|
+
* in the tab order and accessibility tree. The consumer must still suppress
|
|
204
|
+
* activation (Enter/Space/click) while disabled.
|
|
205
|
+
*/
|
|
206
|
+
focusableWhenDisabled?: boolean;
|
|
207
|
+
/** Whether the target is a native `<button>` (which takes `disabled`). */
|
|
208
|
+
isNativeButton?: boolean;
|
|
209
|
+
/** tabIndex to apply to a non-native element to keep it focusable. */
|
|
210
|
+
tabIndex?: number;
|
|
208
211
|
}
|
|
209
212
|
/** Attribute props to spread onto the focusable element. */
|
|
210
213
|
interface FocusableWhenDisabledProps {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
disabled?: boolean;
|
|
215
|
+
"aria-disabled"?: true;
|
|
216
|
+
tabIndex?: number;
|
|
214
217
|
}
|
|
215
218
|
/**
|
|
216
219
|
* Resolve the disabled/aria-disabled/tabIndex attributes for a control that may
|
|
@@ -222,8 +225,9 @@ interface FocusableWhenDisabledProps {
|
|
|
222
225
|
* instead. This is opt-in (`focusableWhenDisabled`) so existing behavior — a
|
|
223
226
|
* plain native `disabled` — is unchanged by default.
|
|
224
227
|
*/
|
|
225
|
-
declare function useFocusableWhenDisabled({ disabled, focusableWhenDisabled, isNativeButton, tabIndex
|
|
226
|
-
|
|
228
|
+
declare function useFocusableWhenDisabled({ disabled, focusableWhenDisabled, isNativeButton, tabIndex }: FocusableWhenDisabledOptions): FocusableWhenDisabledProps;
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region src/hooks/use-scroll-into-view.d.ts
|
|
227
231
|
/**
|
|
228
232
|
* Virtual-focus widgets (Menu/Select/Combobox/Command) keep DOM focus on the
|
|
229
233
|
* input/container and point `aria-activedescendant` at the active option, so the
|
|
@@ -234,64 +238,66 @@ declare function useFocusableWhenDisabled({ disabled, focusableWhenDisabled, isN
|
|
|
234
238
|
* `block: "nearest"` avoids scrolling when the option is already fully visible.
|
|
235
239
|
*/
|
|
236
240
|
declare function useScrollActiveDescendantIntoView(activeId: string | null | undefined): void;
|
|
237
|
-
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region src/primitives/disclosure.d.ts
|
|
238
243
|
/** Props for `DisclosureRoot`. */
|
|
239
244
|
interface DisclosureRootProps {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
children: ReactNode;
|
|
246
|
+
open?: boolean;
|
|
247
|
+
defaultOpen?: boolean;
|
|
248
|
+
/** Called when the open state changes. */
|
|
249
|
+
onOpenChange?: (open: boolean) => void;
|
|
250
|
+
/** @deprecated Use `onOpenChange`. */
|
|
251
|
+
setOpen?: (open: boolean) => void;
|
|
252
|
+
animated?: boolean;
|
|
248
253
|
}
|
|
249
254
|
/** Renders the `DisclosureRoot` component. */
|
|
250
|
-
declare function DisclosureRoot({ children, open: controlledOpen, defaultOpen, onOpenChange, setOpen: setOpenDeprecated, animated
|
|
255
|
+
declare function DisclosureRoot({ children, open: controlledOpen, defaultOpen, onOpenChange, setOpen: setOpenDeprecated, animated }: DisclosureRootProps): import("react").JSX.Element;
|
|
251
256
|
/** Props for `DisclosureTrigger`. */
|
|
252
|
-
interface DisclosureTriggerProps extends ComponentPropsWithoutRef<"button"> {
|
|
253
|
-
}
|
|
257
|
+
interface DisclosureTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
254
258
|
/** Renders the `DisclosureTrigger` component. */
|
|
255
|
-
declare function DisclosureTrigger({ onClick, ...props }: DisclosureTriggerProps):
|
|
259
|
+
declare function DisclosureTrigger({ onClick, ...props }: DisclosureTriggerProps): import("react").JSX.Element;
|
|
256
260
|
/** Props for `DisclosureContent`. */
|
|
257
261
|
interface DisclosureContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
262
|
+
/**
|
|
263
|
+
* When closed, keep the content in the DOM as `hidden="until-found"` (instead
|
|
264
|
+
* of unmounting) so browser find-in-page can reveal it. Chromium progressive
|
|
265
|
+
* enhancement; disables the enter/leave animation for this content. On reveal
|
|
266
|
+
* a `beforematch` event opens the disclosure so state stays consistent.
|
|
267
|
+
*/
|
|
268
|
+
hiddenUntilFound?: boolean;
|
|
265
269
|
}
|
|
266
270
|
/** Renders the `DisclosureContent` component. */
|
|
267
|
-
declare function DisclosureContent({ hiddenUntilFound, style, ...props }: DisclosureContentProps):
|
|
268
|
-
|
|
271
|
+
declare function DisclosureContent({ hiddenUntilFound, style, ...props }: DisclosureContentProps): import("react").JSX.Element | null;
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/primitives/button.d.ts
|
|
269
274
|
/** Props for `Button`. */
|
|
270
275
|
interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
276
|
+
/**
|
|
277
|
+
* Whether Enter activates the button. Set to `false` to suppress the native
|
|
278
|
+
* Enter→click (e.g. a non-submit button inside a form). Default: native.
|
|
279
|
+
*/
|
|
280
|
+
clickOnEnter?: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Whether Space activates the button. Set to `false` to suppress the native
|
|
283
|
+
* Space→click. Default: native.
|
|
284
|
+
*/
|
|
285
|
+
clickOnSpace?: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Keep the button focusable and announced while disabled (APG pattern):
|
|
288
|
+
* emits `aria-disabled` instead of the native `disabled` attribute and blocks
|
|
289
|
+
* activation. Default: false — a disabled button uses native `disabled`.
|
|
290
|
+
*/
|
|
291
|
+
focusableWhenDisabled?: boolean;
|
|
287
292
|
}
|
|
288
293
|
/**
|
|
289
294
|
* Accessible button primitive.
|
|
290
295
|
* Native <button> with keyboard handling defaults.
|
|
291
296
|
* Zero-overhead button primitive for the current stack.
|
|
292
297
|
*/
|
|
293
|
-
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
294
|
-
|
|
298
|
+
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/primitives/dialog.d.ts
|
|
295
301
|
/**
|
|
296
302
|
* Returns a function that closes the nearest dialog. Useful for custom dismiss
|
|
297
303
|
* affordances (e.g. swipe-to-dismiss) that aren't a `DialogDismiss` button.
|
|
@@ -299,571 +305,638 @@ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAtt
|
|
|
299
305
|
declare function useDialogClose(): () => void;
|
|
300
306
|
/** Props for `DialogRoot`. */
|
|
301
307
|
interface DialogRootProps {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
children: ReactNode;
|
|
309
|
+
open?: boolean;
|
|
310
|
+
defaultOpen?: boolean;
|
|
311
|
+
/** Called when the open state changes. */
|
|
312
|
+
onOpenChange?: (open: boolean) => void;
|
|
313
|
+
/** @deprecated Use `onOpenChange`. */
|
|
314
|
+
setOpen?: (open: boolean) => void;
|
|
315
|
+
animated?: boolean;
|
|
310
316
|
}
|
|
311
317
|
/** Renders the `DialogRoot` component. */
|
|
312
|
-
declare function DialogRoot({ children, open: controlledOpen, defaultOpen, onOpenChange, setOpen: setOpenDeprecated, animated
|
|
318
|
+
declare function DialogRoot({ children, open: controlledOpen, defaultOpen, onOpenChange, setOpen: setOpenDeprecated, animated }: DialogRootProps): import("react").JSX.Element;
|
|
313
319
|
/** Props for `DialogDisclosure`. */
|
|
314
|
-
interface DialogDisclosureProps extends ComponentPropsWithoutRef<"button"> {
|
|
315
|
-
|
|
316
|
-
declare const DialogDisclosure: react.ForwardRefExoticComponent<DialogDisclosureProps & react.RefAttributes<HTMLButtonElement>>;
|
|
320
|
+
interface DialogDisclosureProps extends ComponentPropsWithoutRef<"button"> {}
|
|
321
|
+
declare const DialogDisclosure: import("react").ForwardRefExoticComponent<DialogDisclosureProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
317
322
|
/** Props for `DialogPanel`. */
|
|
318
323
|
interface DialogPanelProps extends Omit<ComponentPropsWithoutRef<"dialog">, "open"> {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
+
backdrop?: ReactNode;
|
|
325
|
+
/** Close when the backdrop (outside the panel) is pressed. Default true. */
|
|
326
|
+
dismissOnBackdrop?: boolean;
|
|
327
|
+
/** Close on the Escape key. Default true. Alert dialogs set this false. */
|
|
328
|
+
dismissOnEscape?: boolean;
|
|
324
329
|
}
|
|
325
|
-
declare const DialogPanel: react.ForwardRefExoticComponent<DialogPanelProps & react.RefAttributes<HTMLDialogElement>>;
|
|
330
|
+
declare const DialogPanel: import("react").ForwardRefExoticComponent<DialogPanelProps & import("react").RefAttributes<HTMLDialogElement>>;
|
|
326
331
|
/** Props for `AlertDialogPanel`. */
|
|
327
|
-
interface AlertDialogPanelProps extends Omit<DialogPanelProps, "role"> {
|
|
328
|
-
}
|
|
332
|
+
interface AlertDialogPanelProps extends Omit<DialogPanelProps, "role"> {}
|
|
329
333
|
/**
|
|
330
334
|
* A dialog that demands an explicit choice: `role="alertdialog"` and no
|
|
331
335
|
* backdrop/Escape dismissal by default. Compose with the other Dialog parts
|
|
332
336
|
* (DialogRoot/Disclosure/Heading/Description/Dismiss).
|
|
333
337
|
*/
|
|
334
|
-
declare const AlertDialogPanel: react.ForwardRefExoticComponent<AlertDialogPanelProps & react.RefAttributes<HTMLDialogElement>>;
|
|
338
|
+
declare const AlertDialogPanel: import("react").ForwardRefExoticComponent<AlertDialogPanelProps & import("react").RefAttributes<HTMLDialogElement>>;
|
|
335
339
|
/** Props for `DialogHeading`. */
|
|
336
|
-
interface DialogHeadingProps extends ComponentPropsWithoutRef<"h2"> {
|
|
337
|
-
}
|
|
340
|
+
interface DialogHeadingProps extends ComponentPropsWithoutRef<"h2"> {}
|
|
338
341
|
/** Renders the `DialogHeading` component. */
|
|
339
|
-
declare function DialogHeading(props: DialogHeadingProps):
|
|
342
|
+
declare function DialogHeading(props: DialogHeadingProps): import("react").JSX.Element;
|
|
340
343
|
/** Props for `DialogDescription`. */
|
|
341
|
-
interface DialogDescriptionProps extends ComponentPropsWithoutRef<"p"> {
|
|
342
|
-
}
|
|
344
|
+
interface DialogDescriptionProps extends ComponentPropsWithoutRef<"p"> {}
|
|
343
345
|
/** Renders the `DialogDescription` component. */
|
|
344
|
-
declare function DialogDescription(props: DialogDescriptionProps):
|
|
346
|
+
declare function DialogDescription(props: DialogDescriptionProps): import("react").JSX.Element;
|
|
345
347
|
/** Props for `DialogDismiss`. */
|
|
346
|
-
interface DialogDismissProps extends ComponentPropsWithoutRef<"button"> {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
interface DialogDismissProps extends ComponentPropsWithoutRef<"button"> {}
|
|
349
|
+
declare const DialogDismiss: import("react").ForwardRefExoticComponent<DialogDismissProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
350
|
+
//#endregion
|
|
351
|
+
//#region src/primitives/tabs.d.ts
|
|
350
352
|
/** Props for `TabsRoot`. */
|
|
351
353
|
interface TabsRootProps {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
354
|
+
children: ReactNode;
|
|
355
|
+
selectedId?: string;
|
|
356
|
+
defaultSelectedId?: string;
|
|
357
|
+
/** Called when the selected tab changes. */
|
|
358
|
+
onSelectedIdChange?: (id: string) => void;
|
|
359
|
+
/** @deprecated Use `onSelectedIdChange`. */
|
|
360
|
+
setSelectedId?: (id: string) => void;
|
|
361
|
+
orientation?: "horizontal" | "vertical";
|
|
360
362
|
}
|
|
361
363
|
/** Renders the `TabsRoot` component. */
|
|
362
|
-
declare function TabsRoot({ children, selectedId: controlledId, defaultSelectedId, onSelectedIdChange, setSelectedId: setSelectedIdDeprecated, orientation
|
|
364
|
+
declare function TabsRoot({ children, selectedId: controlledId, defaultSelectedId, onSelectedIdChange, setSelectedId: setSelectedIdDeprecated, orientation }: TabsRootProps): import("react").JSX.Element;
|
|
363
365
|
/** Props for `TabList`. */
|
|
364
|
-
interface TabListProps extends ComponentPropsWithoutRef<"div"> {
|
|
365
|
-
}
|
|
366
|
+
interface TabListProps extends ComponentPropsWithoutRef<"div"> {}
|
|
366
367
|
/** Renders the `TabList` component. */
|
|
367
|
-
declare function TabList({ role, onKeyDown, ...props }: TabListProps):
|
|
368
|
+
declare function TabList({ role, onKeyDown, ...props }: TabListProps): import("react").JSX.Element;
|
|
368
369
|
/** Props for `Tab`. */
|
|
369
370
|
interface TabProps extends Omit<ComponentPropsWithoutRef<"button">, "id"> {
|
|
370
|
-
|
|
371
|
-
|
|
371
|
+
id: string;
|
|
372
|
+
disabled?: boolean;
|
|
372
373
|
}
|
|
373
374
|
/** Renders the `Tab` component. */
|
|
374
|
-
declare function Tab({ id, disabled, onClick, ...props }: TabProps):
|
|
375
|
+
declare function Tab({ id, disabled, onClick, ...props }: TabProps): import("react").JSX.Element;
|
|
375
376
|
/** Props for `TabPanel`. */
|
|
376
377
|
interface TabPanelProps extends Omit<ComponentPropsWithoutRef<"div">, "id"> {
|
|
377
|
-
|
|
378
|
+
tabId: string;
|
|
378
379
|
}
|
|
379
380
|
/** Renders the `TabPanel` component. */
|
|
380
|
-
declare function TabPanel({ tabId, ...props }: TabPanelProps):
|
|
381
|
-
|
|
381
|
+
declare function TabPanel({ tabId, ...props }: TabPanelProps): import("react").JSX.Element | null;
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region src/primitives/radio-group.d.ts
|
|
382
384
|
interface RadioGroupContextValue {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
385
|
+
name: string;
|
|
386
|
+
value: string;
|
|
387
|
+
setValue: (value: string) => void;
|
|
388
|
+
disabled: boolean;
|
|
389
|
+
orientation: "horizontal" | "vertical";
|
|
388
390
|
}
|
|
389
391
|
/** Returns the active `RadioGroupContext` value. */
|
|
390
392
|
declare function useRadioGroupContext(): RadioGroupContextValue | null;
|
|
391
393
|
/** Props for `RadioGroupRoot`. */
|
|
392
394
|
interface RadioGroupRootProps extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
395
|
+
children: ReactNode;
|
|
396
|
+
name?: string;
|
|
397
|
+
value?: string;
|
|
398
|
+
defaultValue?: string;
|
|
399
|
+
/** Called when the selected value changes. */
|
|
400
|
+
onValueChange?: (value: string) => void;
|
|
401
|
+
/** @deprecated Use `onValueChange`. */
|
|
402
|
+
onChange?: (value: string) => void;
|
|
403
|
+
disabled?: boolean;
|
|
404
|
+
orientation?: "horizontal" | "vertical";
|
|
403
405
|
}
|
|
404
406
|
/** Renders the `RadioGroupRoot` component. */
|
|
405
|
-
declare function RadioGroupRoot({ children, name: providedName, value: controlledValue, defaultValue, onValueChange, onChange, disabled, orientation, ...props }: RadioGroupRootProps):
|
|
407
|
+
declare function RadioGroupRoot({ children, name: providedName, value: controlledValue, defaultValue, onValueChange, onChange, disabled, orientation, ...props }: RadioGroupRootProps): import("react").JSX.Element;
|
|
406
408
|
/** Props for `Radio`. */
|
|
407
409
|
interface RadioProps extends Omit<ComponentPropsWithoutRef<"input">, "onChange" | "type"> {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
+
value: string;
|
|
411
|
+
disabled?: boolean;
|
|
410
412
|
}
|
|
411
|
-
declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
|
|
412
|
-
|
|
413
|
+
declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region src/internal/overlay-portal.d.ts
|
|
413
416
|
/** Where a portaled overlay mounts: an element, an element id, or body. */
|
|
414
417
|
type PortalRoot = HTMLElement | string | null;
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region src/internal/render-element.d.ts
|
|
420
|
+
/**
|
|
421
|
+
* The `render` prop contract: swap the element a part renders while keeping all
|
|
422
|
+
* of its behavior, props and refs. Either a React element to clone, or a
|
|
423
|
+
* function receiving the merged props.
|
|
424
|
+
*/
|
|
425
|
+
type RenderProp = ReactElement | ((props: Record<string, unknown>) => ReactElement);
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/primitives/tooltip.d.ts
|
|
428
|
+
/** Props for `TooltipGroup`. */
|
|
429
|
+
interface TooltipGroupProps {
|
|
430
|
+
children: ReactNode;
|
|
431
|
+
/**
|
|
432
|
+
* How long after a tooltip in this group closes its siblings still open
|
|
433
|
+
* INSTANTLY (no show delay). Default 300ms. Set 0 to disable skipping.
|
|
434
|
+
*/
|
|
435
|
+
skipDelay?: number;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Groups sibling tooltips so moving between them does not re-pay the show
|
|
439
|
+
* delay — the APG/desktop convention for toolbars and icon rows, where waiting
|
|
440
|
+
* 700ms per button makes the row feel broken.
|
|
441
|
+
*
|
|
442
|
+
* Optional: a `TooltipProvider` outside any group keeps its own delay.
|
|
443
|
+
*/
|
|
444
|
+
declare function TooltipGroup({ children, skipDelay }: TooltipGroupProps): React$1.JSX.Element;
|
|
445
|
+
/** Props for `TooltipRoot`. */
|
|
446
|
+
interface TooltipRootProps {
|
|
447
|
+
children: ReactNode;
|
|
448
|
+
timeout?: number;
|
|
449
|
+
showTimeout?: number;
|
|
450
|
+
hideTimeout?: number;
|
|
451
|
+
placement?: "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
|
|
452
|
+
animated?: boolean;
|
|
453
|
+
/** Render the tooltip in a portal (escapes clipping). Default: false. */
|
|
454
|
+
portal?: boolean;
|
|
455
|
+
/** Portal mount target (element or element id). Defaults to document.body. */
|
|
456
|
+
portalRoot?: PortalRoot;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Owns ONE tooltip: its open state, delays, placement and portal.
|
|
460
|
+
*
|
|
461
|
+
* Wrap several of these in a {@link TooltipGroup} to share a skip-delay window.
|
|
462
|
+
*/
|
|
463
|
+
declare function TooltipRoot({ children, timeout, showTimeout, hideTimeout, placement, animated, portal, portalRoot }: TooltipRootProps): React$1.JSX.Element;
|
|
464
|
+
/**
|
|
465
|
+
* Props for `TooltipProvider`.
|
|
466
|
+
*
|
|
467
|
+
* @deprecated Use `TooltipRootProps`.
|
|
468
|
+
*/
|
|
469
|
+
type TooltipProviderProps = TooltipRootProps;
|
|
470
|
+
/**
|
|
471
|
+
* A single tooltip.
|
|
472
|
+
*
|
|
473
|
+
* @deprecated Renamed to {@link TooltipRoot}. Despite the name this component
|
|
474
|
+
* never provided anything to a subtree of tooltips — it IS one tooltip. The
|
|
475
|
+
* delay-sharing provider is {@link TooltipGroup}. Kept as an alias for
|
|
476
|
+
* back-compat; scheduled for removal in the next major.
|
|
477
|
+
*/
|
|
478
|
+
declare const TooltipProvider: typeof TooltipRoot;
|
|
431
479
|
/** Props for `TooltipAnchor`. */
|
|
432
480
|
interface TooltipAnchorProps extends ComponentPropsWithoutRef<"div"> {
|
|
433
|
-
|
|
434
|
-
|
|
481
|
+
/** Render a custom element instead of a wrapper div. The element receives tooltip props. */
|
|
482
|
+
render?: React$1.ReactElement;
|
|
435
483
|
}
|
|
436
|
-
declare const TooltipAnchor:
|
|
484
|
+
declare const TooltipAnchor: React$1.ForwardRefExoticComponent<TooltipAnchorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
437
485
|
/** Props for `Tooltip`. */
|
|
438
486
|
interface TooltipProps extends ComponentPropsWithoutRef<"div"> {
|
|
487
|
+
/** Render a custom element instead of the default `div`. */
|
|
488
|
+
render?: RenderProp;
|
|
439
489
|
}
|
|
440
490
|
/** Renders the `Tooltip` component. */
|
|
441
|
-
declare function Tooltip({ children, onMouseEnter, onMouseLeave, ...props }: TooltipProps):
|
|
442
|
-
|
|
491
|
+
declare function Tooltip({ children, onMouseEnter, onMouseLeave, render, ...props }: TooltipProps): React$1.JSX.Element | null;
|
|
492
|
+
//#endregion
|
|
493
|
+
//#region src/primitives/popover.d.ts
|
|
443
494
|
/** Props for `PopoverRoot`. */
|
|
444
495
|
interface PopoverRootProps {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
496
|
+
children: ReactNode;
|
|
497
|
+
open?: boolean;
|
|
498
|
+
defaultOpen?: boolean;
|
|
499
|
+
/** Called when the open state changes. */
|
|
500
|
+
onOpenChange?: (open: boolean) => void;
|
|
501
|
+
/** @deprecated Use `onOpenChange`. */
|
|
502
|
+
setOpen?: (open: boolean) => void;
|
|
503
|
+
placement?: "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
|
|
504
|
+
/**
|
|
505
|
+
* Move focus into the panel on open and restore it to the trigger on close.
|
|
506
|
+
* Default: false — opt in, since many consumers manage focus themselves
|
|
507
|
+
* (e.g. a popover acting as a custom menu).
|
|
508
|
+
*/
|
|
509
|
+
manageFocus?: boolean;
|
|
510
|
+
animated?: boolean;
|
|
511
|
+
/** Render the panel in a portal (escapes `overflow`/`transform` clipping).
|
|
512
|
+
* Default: false. */
|
|
513
|
+
portal?: boolean;
|
|
514
|
+
/** Portal mount target (element or element id). Defaults to document.body.
|
|
515
|
+
* Point this inside a themed subtree (e.g. opt-shell `[data-harness]`) to
|
|
516
|
+
* keep scoped design tokens applied. */
|
|
517
|
+
portalRoot?: PortalRoot;
|
|
467
518
|
}
|
|
468
519
|
/** Renders the `PopoverRoot` component. */
|
|
469
|
-
declare function PopoverRoot({ children, open: controlledOpen, defaultOpen, onOpenChange, setOpen: setOpenDeprecated, placement, manageFocus, animated, portal, portalRoot
|
|
520
|
+
declare function PopoverRoot({ children, open: controlledOpen, defaultOpen, onOpenChange, setOpen: setOpenDeprecated, placement, manageFocus, animated, portal, portalRoot }: PopoverRootProps): import("react").JSX.Element;
|
|
470
521
|
/** Props for `PopoverTrigger`. */
|
|
471
|
-
interface PopoverTriggerProps extends ComponentPropsWithoutRef<"button"> {
|
|
472
|
-
|
|
473
|
-
declare const PopoverTrigger: react.ForwardRefExoticComponent<PopoverTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
522
|
+
interface PopoverTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
523
|
+
declare const PopoverTrigger: import("react").ForwardRefExoticComponent<PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
474
524
|
/** Props for `PopoverContent`. */
|
|
475
525
|
interface PopoverContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
526
|
+
/** Render a custom element instead of the default `div`. */
|
|
527
|
+
render?: RenderProp;
|
|
476
528
|
}
|
|
477
529
|
/** Renders the `PopoverContent` component. */
|
|
478
|
-
declare function PopoverContent({ children, ...props }: PopoverContentProps):
|
|
530
|
+
declare function PopoverContent({ children, render, ...props }: PopoverContentProps): import("react").JSX.Element | null;
|
|
479
531
|
/** Props for `PopoverClose`. */
|
|
480
|
-
interface PopoverCloseProps extends ComponentPropsWithoutRef<"button"> {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
532
|
+
interface PopoverCloseProps extends ComponentPropsWithoutRef<"button"> {}
|
|
533
|
+
declare const PopoverClose: import("react").ForwardRefExoticComponent<PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
534
|
+
//#endregion
|
|
535
|
+
//#region src/primitives/select.d.ts
|
|
484
536
|
/** Props for `SelectRoot`. */
|
|
485
537
|
interface SelectRootProps {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
538
|
+
children: ReactNode;
|
|
539
|
+
/** Selected value(s). `string` in single mode, `string[]` when `multiple`. */
|
|
540
|
+
value?: string | string[];
|
|
541
|
+
defaultValue?: string | string[];
|
|
542
|
+
/** Called when the selected value changes. */
|
|
543
|
+
onValueChange?: (value: string | string[]) => void;
|
|
544
|
+
/** @deprecated Use `onValueChange`. */
|
|
545
|
+
setValue?: (value: string | string[]) => void;
|
|
546
|
+
/** Allow selecting more than one option. The value becomes a `string[]`. */
|
|
547
|
+
multiple?: boolean;
|
|
548
|
+
/**
|
|
549
|
+
* Present the current value without allowing changes. Unlike `disabled` the
|
|
550
|
+
* trigger stays focusable and the listbox still OPENS and can be browsed —
|
|
551
|
+
* only committing a new value is blocked. Reflected as `aria-readonly`.
|
|
552
|
+
*/
|
|
553
|
+
readOnly?: boolean;
|
|
554
|
+
/** Form field name. Renders hidden input(s) so the value submits with a form. */
|
|
555
|
+
name?: string;
|
|
556
|
+
open?: boolean;
|
|
557
|
+
/** Called when the open state changes. */
|
|
558
|
+
onOpenChange?: (open: boolean) => void;
|
|
559
|
+
/** @deprecated Use `onOpenChange`. */
|
|
560
|
+
setOpen?: (open: boolean) => void;
|
|
561
|
+
animated?: boolean;
|
|
562
|
+
/** Render the listbox in a portal (escapes clipping). Default: false. */
|
|
563
|
+
portal?: boolean;
|
|
564
|
+
/** Portal mount target (element or element id). Defaults to document.body. */
|
|
565
|
+
portalRoot?: PortalRoot;
|
|
508
566
|
}
|
|
509
567
|
/** Renders the `SelectRoot` component. */
|
|
510
|
-
declare function SelectRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, multiple, name, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot
|
|
568
|
+
declare function SelectRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, multiple, readOnly, name, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: SelectRootProps): import("react").JSX.Element;
|
|
511
569
|
/** Props for `SelectLabel`. */
|
|
512
|
-
interface SelectLabelProps extends ComponentPropsWithoutRef<"label"> {
|
|
513
|
-
}
|
|
570
|
+
interface SelectLabelProps extends ComponentPropsWithoutRef<"label"> {}
|
|
514
571
|
/** Renders the `SelectLabel` component. */
|
|
515
|
-
declare function SelectLabel(props: SelectLabelProps):
|
|
572
|
+
declare function SelectLabel(props: SelectLabelProps): import("react").JSX.Element;
|
|
516
573
|
/** Props for `SelectTrigger`. */
|
|
517
|
-
interface SelectTriggerProps extends ComponentPropsWithoutRef<"button"> {
|
|
518
|
-
|
|
519
|
-
declare const SelectTrigger: react.ForwardRefExoticComponent<SelectTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
574
|
+
interface SelectTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
575
|
+
declare const SelectTrigger: import("react").ForwardRefExoticComponent<SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
520
576
|
/** Props for `SelectPopover`. */
|
|
521
577
|
interface SelectPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
578
|
+
/** Render a custom element instead of the default `div`. */
|
|
579
|
+
render?: RenderProp;
|
|
522
580
|
}
|
|
523
581
|
/** Renders the `SelectPopover` component. */
|
|
524
|
-
declare function SelectPopover({ children, ...props }: SelectPopoverProps):
|
|
582
|
+
declare function SelectPopover({ children, render, ...props }: SelectPopoverProps): import("react").JSX.Element | null;
|
|
525
583
|
/** Props for `SelectItem`. */
|
|
526
584
|
interface SelectItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
527
|
-
|
|
528
|
-
|
|
585
|
+
value: string;
|
|
586
|
+
disabled?: boolean;
|
|
529
587
|
}
|
|
530
588
|
/** Renders the `SelectItem` component. */
|
|
531
|
-
declare function SelectItem({ value: itemValue, disabled, onClick, children, ...props }: SelectItemProps):
|
|
532
|
-
|
|
589
|
+
declare function SelectItem({ value: itemValue, disabled, onClick, children, ...props }: SelectItemProps): import("react").JSX.Element;
|
|
590
|
+
//#endregion
|
|
591
|
+
//#region src/primitives/combobox.d.ts
|
|
533
592
|
/** Props for `ComboboxRoot`. */
|
|
534
593
|
interface ComboboxRootProps {
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
594
|
+
children: ReactNode;
|
|
595
|
+
value?: string;
|
|
596
|
+
defaultValue?: string;
|
|
597
|
+
/** Called when the selected value changes. */
|
|
598
|
+
onValueChange?: (value: string) => void;
|
|
599
|
+
/** @deprecated Use `onValueChange`. */
|
|
600
|
+
setValue?: (value: string) => void;
|
|
601
|
+
/**
|
|
602
|
+
* Present the current value without allowing changes. Unlike `disabled` the
|
|
603
|
+
* input stays focusable and the listbox still OPENS and can be browsed —
|
|
604
|
+
* only editing the query and committing a new value are blocked. Reflected
|
|
605
|
+
* as the input's native `readonly` plus `aria-readonly`.
|
|
606
|
+
*/
|
|
607
|
+
readOnly?: boolean;
|
|
608
|
+
open?: boolean;
|
|
609
|
+
/** Called when the open state changes. */
|
|
610
|
+
onOpenChange?: (open: boolean) => void;
|
|
611
|
+
/** @deprecated Use `onOpenChange`. */
|
|
612
|
+
setOpen?: (open: boolean) => void;
|
|
613
|
+
animated?: boolean;
|
|
614
|
+
/** Render the listbox in a portal (escapes clipping). Default: false. */
|
|
615
|
+
portal?: boolean;
|
|
616
|
+
/** Portal mount target (element or element id). Defaults to document.body. */
|
|
617
|
+
portalRoot?: PortalRoot;
|
|
552
618
|
}
|
|
553
619
|
/** Renders the `ComboboxRoot` component. */
|
|
554
|
-
declare function ComboboxRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot
|
|
620
|
+
declare function ComboboxRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, readOnly, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: ComboboxRootProps): import("react").JSX.Element;
|
|
555
621
|
/** Props for `ComboboxInput`. */
|
|
556
|
-
interface ComboboxInputProps extends Omit<ComponentPropsWithoutRef<"input">, "value" | "onChange"> {
|
|
557
|
-
|
|
558
|
-
declare const ComboboxInput: react.ForwardRefExoticComponent<ComboboxInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
622
|
+
interface ComboboxInputProps extends Omit<ComponentPropsWithoutRef<"input">, "value" | "onChange"> {}
|
|
623
|
+
declare const ComboboxInput: import("react").ForwardRefExoticComponent<ComboboxInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
559
624
|
/** Props for `ComboboxPopover`. */
|
|
560
625
|
interface ComboboxPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
626
|
+
/** Render a custom element instead of the default `div`. */
|
|
627
|
+
render?: RenderProp;
|
|
561
628
|
}
|
|
562
629
|
/** Renders the `ComboboxPopover` component. */
|
|
563
|
-
declare function ComboboxPopover({ children, ...props }: ComboboxPopoverProps):
|
|
630
|
+
declare function ComboboxPopover({ children, render, ...props }: ComboboxPopoverProps): import("react").JSX.Element | null;
|
|
564
631
|
/** Props for `ComboboxItem`. */
|
|
565
632
|
interface ComboboxItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
566
|
-
|
|
567
|
-
|
|
633
|
+
value: string;
|
|
634
|
+
disabled?: boolean;
|
|
568
635
|
}
|
|
569
636
|
/** Renders the `ComboboxItem` component. */
|
|
570
|
-
declare function ComboboxItem({ value: itemValue, disabled, onClick, children, ...props }: ComboboxItemProps):
|
|
637
|
+
declare function ComboboxItem({ value: itemValue, disabled, onClick, children, ...props }: ComboboxItemProps): import("react").JSX.Element;
|
|
571
638
|
/** Props for `ComboboxGroup`. */
|
|
572
|
-
interface ComboboxGroupProps extends ComponentPropsWithoutRef<"div"> {
|
|
573
|
-
}
|
|
639
|
+
interface ComboboxGroupProps extends ComponentPropsWithoutRef<"div"> {}
|
|
574
640
|
/** Renders the `ComboboxGroup` component. */
|
|
575
|
-
declare function ComboboxGroup({ children, ...props }: ComboboxGroupProps):
|
|
641
|
+
declare function ComboboxGroup({ children, ...props }: ComboboxGroupProps): import("react").JSX.Element;
|
|
576
642
|
/** Props for `ComboboxGroupLabel`. */
|
|
577
|
-
interface ComboboxGroupLabelProps extends ComponentPropsWithoutRef<"div"> {
|
|
578
|
-
}
|
|
643
|
+
interface ComboboxGroupLabelProps extends ComponentPropsWithoutRef<"div"> {}
|
|
579
644
|
/** Renders the `ComboboxGroupLabel` component. */
|
|
580
|
-
declare function ComboboxGroupLabel(props: ComboboxGroupLabelProps):
|
|
581
|
-
|
|
645
|
+
declare function ComboboxGroupLabel(props: ComboboxGroupLabelProps): import("react").JSX.Element;
|
|
646
|
+
//#endregion
|
|
647
|
+
//#region src/primitives/command.d.ts
|
|
582
648
|
/** Props for `CommandRoot`. */
|
|
583
649
|
interface CommandRootProps extends ComponentPropsWithoutRef<"div"> {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
650
|
+
value?: string;
|
|
651
|
+
defaultValue?: string;
|
|
652
|
+
onValueChange?: (value: string) => void;
|
|
653
|
+
/** Whether items auto-filter based on `search`. Default: true. */
|
|
654
|
+
shouldFilter?: boolean;
|
|
655
|
+
/** Custom filter function. Default: case-insensitive substring match. */
|
|
656
|
+
filter?: (value: string, search: string, keywords: string[]) => boolean;
|
|
657
|
+
/** Called on Escape in the input — e.g. dismiss a host dialog. */
|
|
658
|
+
onEscape?: () => void;
|
|
593
659
|
}
|
|
594
660
|
/** Renders the `CommandRoot` component. */
|
|
595
|
-
declare function CommandRoot({ children, value: controlledValue, defaultValue, onValueChange, shouldFilter, filter, onEscape, ...props }: CommandRootProps):
|
|
661
|
+
declare function CommandRoot({ children, value: controlledValue, defaultValue, onValueChange, shouldFilter, filter, onEscape, ...props }: CommandRootProps): import("react").JSX.Element;
|
|
596
662
|
/** Props for `CommandInput`. */
|
|
597
663
|
interface CommandInputProps extends Omit<ComponentPropsWithoutRef<"input">, "value" | "onChange"> {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
664
|
+
/** Optional controlled value. Falls back to root search state. */
|
|
665
|
+
value?: string;
|
|
666
|
+
/** Notified on every keystroke (in addition to root search update). */
|
|
667
|
+
onValueChange?: (value: string) => void;
|
|
602
668
|
}
|
|
603
|
-
declare const CommandInput: react.ForwardRefExoticComponent<CommandInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
669
|
+
declare const CommandInput: import("react").ForwardRefExoticComponent<CommandInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
604
670
|
/** Props for `CommandList`. */
|
|
605
|
-
interface CommandListProps extends ComponentPropsWithoutRef<"div"> {
|
|
606
|
-
}
|
|
671
|
+
interface CommandListProps extends ComponentPropsWithoutRef<"div"> {}
|
|
607
672
|
/** Renders the `CommandList` component. */
|
|
608
|
-
declare function CommandList({ children, ...props }: CommandListProps):
|
|
673
|
+
declare function CommandList({ children, ...props }: CommandListProps): import("react").JSX.Element;
|
|
609
674
|
/** Props for `CommandEmpty`. */
|
|
610
|
-
interface CommandEmptyProps extends ComponentPropsWithoutRef<"div"> {
|
|
611
|
-
}
|
|
675
|
+
interface CommandEmptyProps extends ComponentPropsWithoutRef<"div"> {}
|
|
612
676
|
/** Renders the `CommandEmpty` component. Hidden while any item is visible. */
|
|
613
|
-
declare function CommandEmpty({ children, ...props }: CommandEmptyProps):
|
|
677
|
+
declare function CommandEmpty({ children, ...props }: CommandEmptyProps): import("react").JSX.Element | null;
|
|
614
678
|
/** Props for `CommandGroup`. */
|
|
615
679
|
interface CommandGroupProps extends ComponentPropsWithoutRef<"div"> {
|
|
616
|
-
|
|
617
|
-
|
|
680
|
+
/** Optional heading rendered as group label. */
|
|
681
|
+
heading?: ReactNode;
|
|
618
682
|
}
|
|
619
683
|
/** Renders the `CommandGroup` component. */
|
|
620
|
-
declare function CommandGroup({ heading, children, ...props }: CommandGroupProps):
|
|
684
|
+
declare function CommandGroup({ heading, children, ...props }: CommandGroupProps): import("react").JSX.Element;
|
|
621
685
|
/** Props for `CommandSeparator`. */
|
|
622
|
-
interface CommandSeparatorProps extends ComponentPropsWithoutRef<"div"> {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
686
|
+
interface CommandSeparatorProps extends ComponentPropsWithoutRef<"div"> {}
|
|
687
|
+
/**
|
|
688
|
+
* Renders the `CommandSeparator` component.
|
|
689
|
+
*
|
|
690
|
+
* Rendered with `role="presentation"`: the separator is a child of
|
|
691
|
+
* `CommandList` (`role="listbox"`), whose only permitted children are `option`
|
|
692
|
+
* and `group`. A real `role="separator"` there fails
|
|
693
|
+
* `aria-required-children` and corrupts the option count announced by screen
|
|
694
|
+
* readers. (Menu separators keep `role="separator"` — `menu` permits it.)
|
|
695
|
+
*/
|
|
696
|
+
declare function CommandSeparator(props: CommandSeparatorProps): import("react").JSX.Element;
|
|
626
697
|
/** Props for `CommandItem`. */
|
|
627
698
|
interface CommandItemProps extends Omit<ComponentPropsWithoutRef<"div">, "onSelect"> {
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
}
|
|
636
|
-
declare const CommandItem: react.ForwardRefExoticComponent<CommandItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
699
|
+
/** Searchable value for this item. Falls back to the rendered label. */
|
|
700
|
+
value: string;
|
|
701
|
+
/** Additional terms to match the search input against. */
|
|
702
|
+
keywords?: string[];
|
|
703
|
+
disabled?: boolean;
|
|
704
|
+
/** Fired on click or Enter when this item is active. */
|
|
705
|
+
onSelect?: (value: string) => void;
|
|
706
|
+
}
|
|
707
|
+
declare const CommandItem: import("react").ForwardRefExoticComponent<CommandItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
637
708
|
/** Read live command state (search, active, value) inside descendants. */
|
|
638
709
|
declare function useCommandState(): {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
710
|
+
search: string;
|
|
711
|
+
value: string;
|
|
712
|
+
activeValue: string;
|
|
713
|
+
visibleValues: string[];
|
|
643
714
|
};
|
|
644
|
-
|
|
715
|
+
//#endregion
|
|
716
|
+
//#region src/primitives/menu.d.ts
|
|
645
717
|
interface MenubarContextValue {
|
|
646
|
-
|
|
647
|
-
|
|
718
|
+
activeMenuId: string | null;
|
|
719
|
+
setActiveMenuId: (id: string | null) => void;
|
|
648
720
|
}
|
|
649
721
|
/** Returns the active `MenubarContext` value. */
|
|
650
722
|
declare function useMenubarContext(): MenubarContextValue | null;
|
|
651
723
|
/** Props for `MenubarRoot`. */
|
|
652
724
|
interface MenubarRootProps {
|
|
653
|
-
|
|
725
|
+
children: ReactNode;
|
|
654
726
|
}
|
|
655
727
|
/** Renders the `MenubarRoot` component. */
|
|
656
|
-
declare function MenubarRoot({ children }: MenubarRootProps):
|
|
728
|
+
declare function MenubarRoot({ children }: MenubarRootProps): import("react").JSX.Element;
|
|
657
729
|
/** Props for `MenubarContainer`. */
|
|
658
|
-
interface MenubarContainerProps extends ComponentPropsWithoutRef<"div"> {
|
|
659
|
-
}
|
|
730
|
+
interface MenubarContainerProps extends ComponentPropsWithoutRef<"div"> {}
|
|
660
731
|
/** Renders the `MenubarContainer` component. Arrow keys rove between triggers. */
|
|
661
|
-
declare function MenubarContainer({ onKeyDown, ...props }: MenubarContainerProps):
|
|
732
|
+
declare function MenubarContainer({ onKeyDown, ...props }: MenubarContainerProps): import("react").JSX.Element;
|
|
662
733
|
/** Props for `MenuRoot`. */
|
|
663
734
|
interface MenuRootProps {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
735
|
+
children: ReactNode;
|
|
736
|
+
open?: boolean;
|
|
737
|
+
/** Called when the open state changes. */
|
|
738
|
+
onOpenChange?: (open: boolean) => void;
|
|
739
|
+
/** @deprecated Use `onOpenChange`. */
|
|
740
|
+
setOpen?: (open: boolean) => void;
|
|
741
|
+
animated?: boolean;
|
|
742
|
+
/** Render the menu in a portal (escapes clipping). Default: false. */
|
|
743
|
+
portal?: boolean;
|
|
744
|
+
/** Portal mount target (element or element id). Defaults to document.body. */
|
|
745
|
+
portalRoot?: PortalRoot;
|
|
675
746
|
}
|
|
676
747
|
/** Renders the `MenuRoot` component. */
|
|
677
|
-
declare function MenuRoot({ children, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot
|
|
748
|
+
declare function MenuRoot({ children, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: MenuRootProps): import("react").JSX.Element;
|
|
678
749
|
/** Props for `MenuTrigger`. */
|
|
679
|
-
interface MenuTriggerProps extends ComponentPropsWithoutRef<"button"> {
|
|
680
|
-
|
|
681
|
-
declare const MenuTrigger: react.ForwardRefExoticComponent<MenuTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
750
|
+
interface MenuTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
751
|
+
declare const MenuTrigger: import("react").ForwardRefExoticComponent<MenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
682
752
|
/** Props for `MenuPopover`. */
|
|
683
753
|
interface MenuPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
754
|
+
/** Render a custom element instead of the default `div`. */
|
|
755
|
+
render?: RenderProp;
|
|
684
756
|
}
|
|
685
757
|
/** Renders the `MenuPopover` component. */
|
|
686
|
-
declare function MenuPopover({ children, onKeyDown, ...props }: MenuPopoverProps):
|
|
758
|
+
declare function MenuPopover({ children, onKeyDown, render, ...props }: MenuPopoverProps): import("react").JSX.Element | null;
|
|
687
759
|
/** Props for `MenuItem`. */
|
|
688
760
|
interface MenuItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
689
|
-
|
|
690
|
-
|
|
761
|
+
disabled?: boolean;
|
|
762
|
+
hideOnClick?: boolean;
|
|
691
763
|
}
|
|
692
764
|
/** Renders the `MenuItem` component. */
|
|
693
|
-
declare function MenuItem({ disabled, hideOnClick, onClick, children, ...props }: MenuItemProps):
|
|
765
|
+
declare function MenuItem({ disabled, hideOnClick, onClick, children, ...props }: MenuItemProps): import("react").JSX.Element;
|
|
694
766
|
/** Props for `MenuItemCheckbox`. */
|
|
695
767
|
interface MenuItemCheckboxProps extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
768
|
+
checked?: boolean;
|
|
769
|
+
onChange?: (checked: boolean) => void;
|
|
770
|
+
disabled?: boolean;
|
|
771
|
+
name?: string;
|
|
772
|
+
value?: string;
|
|
701
773
|
}
|
|
702
774
|
/** Renders the `MenuItemCheckbox` component. */
|
|
703
|
-
declare function MenuItemCheckbox({ checked, onChange, disabled, onClick, children, ...props }: MenuItemCheckboxProps):
|
|
775
|
+
declare function MenuItemCheckbox({ checked, onChange, disabled, onClick, children, ...props }: MenuItemCheckboxProps): import("react").JSX.Element;
|
|
704
776
|
/** Props for `MenuItemRadio`. */
|
|
705
777
|
interface MenuItemRadioProps extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
778
|
+
checked?: boolean;
|
|
779
|
+
onChange?: (checked: boolean) => void;
|
|
780
|
+
disabled?: boolean;
|
|
781
|
+
name?: string;
|
|
782
|
+
value?: string;
|
|
711
783
|
}
|
|
712
784
|
/** Renders the `MenuItemRadio` component. */
|
|
713
|
-
declare function MenuItemRadio({ checked, onChange, disabled, onClick, children, ...props }: MenuItemRadioProps):
|
|
785
|
+
declare function MenuItemRadio({ checked, onChange, disabled, onClick, children, ...props }: MenuItemRadioProps): import("react").JSX.Element;
|
|
714
786
|
/** Props for `MenuSeparator`. */
|
|
715
|
-
interface MenuSeparatorProps extends ComponentPropsWithoutRef<"hr"> {
|
|
716
|
-
}
|
|
787
|
+
interface MenuSeparatorProps extends ComponentPropsWithoutRef<"hr"> {}
|
|
717
788
|
/** Renders the `MenuSeparator` component. */
|
|
718
|
-
declare function MenuSeparator(props: MenuSeparatorProps):
|
|
789
|
+
declare function MenuSeparator(props: MenuSeparatorProps): import("react").JSX.Element;
|
|
719
790
|
/** Props for `MenuButtonArrow`. */
|
|
720
|
-
interface MenuButtonArrowProps extends ComponentPropsWithoutRef<"span"> {
|
|
721
|
-
}
|
|
791
|
+
interface MenuButtonArrowProps extends ComponentPropsWithoutRef<"span"> {}
|
|
722
792
|
/** Renders the `MenuButtonArrow` component. */
|
|
723
|
-
declare function MenuButtonArrow(props: MenuButtonArrowProps):
|
|
724
|
-
|
|
793
|
+
declare function MenuButtonArrow(props: MenuButtonArrowProps): import("react").JSX.Element;
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region src/primitives/toolbar.d.ts
|
|
725
796
|
/** Props for `ToolbarRoot`. */
|
|
726
797
|
interface ToolbarRootProps {
|
|
727
|
-
|
|
728
|
-
|
|
798
|
+
children: ReactNode;
|
|
799
|
+
orientation?: "horizontal" | "vertical";
|
|
729
800
|
}
|
|
730
801
|
/** Renders the `ToolbarRoot` component. */
|
|
731
|
-
declare function ToolbarRoot({ children, orientation
|
|
802
|
+
declare function ToolbarRoot({ children, orientation }: ToolbarRootProps): import("react").JSX.Element;
|
|
732
803
|
/** Props for `ToolbarContainer`. */
|
|
733
|
-
interface ToolbarContainerProps extends ComponentPropsWithoutRef<"div"> {
|
|
734
|
-
}
|
|
804
|
+
interface ToolbarContainerProps extends ComponentPropsWithoutRef<"div"> {}
|
|
735
805
|
/** Renders the `ToolbarContainer` component. */
|
|
736
|
-
declare function ToolbarContainer({ onKeyDown, ...props }: ToolbarContainerProps):
|
|
806
|
+
declare function ToolbarContainer({ onKeyDown, ...props }: ToolbarContainerProps): import("react").JSX.Element;
|
|
737
807
|
/** Props for `ToolbarButton`. */
|
|
738
|
-
interface ToolbarButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
739
|
-
}
|
|
808
|
+
interface ToolbarButtonProps extends ComponentPropsWithoutRef<"button"> {}
|
|
740
809
|
/** Renders the `ToolbarButton` component. */
|
|
741
|
-
declare function ToolbarButton({ disabled, onFocus, ...props }: ToolbarButtonProps):
|
|
810
|
+
declare function ToolbarButton({ disabled, onFocus, ...props }: ToolbarButtonProps): import("react").JSX.Element;
|
|
742
811
|
/** Props for `ToolbarSeparator`. */
|
|
743
|
-
interface ToolbarSeparatorProps extends ComponentPropsWithoutRef<"hr"> {
|
|
744
|
-
}
|
|
812
|
+
interface ToolbarSeparatorProps extends ComponentPropsWithoutRef<"hr"> {}
|
|
745
813
|
/** Renders the `ToolbarSeparator` component. */
|
|
746
|
-
declare function ToolbarSeparator(props: ToolbarSeparatorProps):
|
|
747
|
-
|
|
814
|
+
declare function ToolbarSeparator(props: ToolbarSeparatorProps): import("react").JSX.Element;
|
|
815
|
+
//#endregion
|
|
816
|
+
//#region src/primitives/composite.d.ts
|
|
748
817
|
/** Props for `CompositeProvider`. */
|
|
749
818
|
interface CompositeProviderProps {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
819
|
+
children: ReactNode;
|
|
820
|
+
focusLoop?: boolean;
|
|
821
|
+
focusWrap?: boolean;
|
|
822
|
+
orientation?: "horizontal" | "vertical" | "both";
|
|
823
|
+
activeId?: string | null;
|
|
824
|
+
/** Called when the active item changes. */
|
|
825
|
+
onActiveIdChange?: (id: string) => void;
|
|
826
|
+
/** @deprecated Use `onActiveIdChange`. */
|
|
827
|
+
setActiveId?: (id: string) => void;
|
|
759
828
|
}
|
|
760
829
|
/** Renders the `CompositeProvider` component. */
|
|
761
|
-
declare function CompositeProvider({ children, focusLoop, focusWrap, orientation, activeId: controlledActiveId, onActiveIdChange, setActiveId: setActiveIdDeprecated
|
|
830
|
+
declare function CompositeProvider({ children, focusLoop, focusWrap, orientation, activeId: controlledActiveId, onActiveIdChange, setActiveId: setActiveIdDeprecated }: CompositeProviderProps): import("react").JSX.Element;
|
|
762
831
|
/** Props for `Composite`. */
|
|
763
832
|
interface CompositeProps extends ComponentPropsWithoutRef<"div"> {
|
|
764
|
-
|
|
833
|
+
render?: ReactElement;
|
|
765
834
|
}
|
|
766
835
|
/** Renders the `Composite` component. */
|
|
767
|
-
declare function Composite({ onKeyDown, render, ...props }: CompositeProps):
|
|
836
|
+
declare function Composite({ onKeyDown, render, ...props }: CompositeProps): import("react").JSX.Element;
|
|
768
837
|
/** Props for `CompositeRow`. */
|
|
769
838
|
interface CompositeRowProps extends ComponentPropsWithoutRef<"div"> {
|
|
770
|
-
|
|
839
|
+
render?: ReactElement;
|
|
771
840
|
}
|
|
772
841
|
/** Renders the `CompositeRow` component. */
|
|
773
|
-
declare function CompositeRow({ render, ...props }: CompositeRowProps):
|
|
842
|
+
declare function CompositeRow({ render, ...props }: CompositeRowProps): import("react").JSX.Element;
|
|
774
843
|
/** Props for `CompositeItem`. */
|
|
775
844
|
interface CompositeItemProps extends ComponentPropsWithoutRef<"button"> {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
845
|
+
id?: string;
|
|
846
|
+
row?: number;
|
|
847
|
+
col?: number;
|
|
848
|
+
disabled?: boolean;
|
|
849
|
+
render?: ReactElement;
|
|
781
850
|
}
|
|
782
851
|
/** Renders the `CompositeItem` component. */
|
|
783
|
-
declare function CompositeItem({ id: providedId, row, col, disabled, render, onFocus, ...props }: CompositeItemProps):
|
|
784
|
-
|
|
852
|
+
declare function CompositeItem({ id: providedId, row, col, disabled, render, onFocus, ...props }: CompositeItemProps): import("react").JSX.Element;
|
|
853
|
+
//#endregion
|
|
854
|
+
//#region src/primitives/separator.d.ts
|
|
785
855
|
/** Props for the headless separator primitive. */
|
|
786
856
|
interface SeparatorProps extends ComponentPropsWithoutRef<"div"> {
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
857
|
+
/** Visual/semantic axis of the separator. Defaults to `"horizontal"`. */
|
|
858
|
+
orientation?: "horizontal" | "vertical";
|
|
859
|
+
/**
|
|
860
|
+
* When `true`, the separator is purely visual: it exposes no role to the
|
|
861
|
+
* accessibility tree (use when an adjacent label already conveys the break).
|
|
862
|
+
*/
|
|
863
|
+
decorative?: boolean;
|
|
794
864
|
}
|
|
795
865
|
/**
|
|
796
866
|
* Headless separator: renders a `<div>` with the correct WAI-ARIA semantics
|
|
797
867
|
* (`role="separator"` + `aria-orientation`) unless `decorative`. Carries a
|
|
798
868
|
* `data-orientation` attribute so consumers can style each axis.
|
|
799
869
|
*/
|
|
800
|
-
declare const Separator: react.ForwardRefExoticComponent<SeparatorProps & react.RefAttributes<HTMLDivElement>>;
|
|
801
|
-
|
|
870
|
+
declare const Separator: import("react").ForwardRefExoticComponent<SeparatorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
871
|
+
//#endregion
|
|
872
|
+
//#region src/primitives/toggle.d.ts
|
|
802
873
|
/** Props for `ToggleGroup`. */
|
|
803
874
|
interface ToggleGroupProps extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue" | "onChange"> {
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
875
|
+
/** Selected value(s). String for single mode, string[] for `toggleMultiple`. */
|
|
876
|
+
value?: string | string[];
|
|
877
|
+
defaultValue?: string | string[];
|
|
878
|
+
onValueChange?: (value: string | string[]) => void;
|
|
879
|
+
/** Allow more than one item pressed at once. */
|
|
880
|
+
toggleMultiple?: boolean;
|
|
881
|
+
orientation?: "horizontal" | "vertical";
|
|
882
|
+
disabled?: boolean;
|
|
812
883
|
}
|
|
813
884
|
/**
|
|
814
885
|
* Groups related `Toggle`s with roving-tabindex keyboard navigation and shared
|
|
815
886
|
* pressed-state selection (single by default, or multiple via `toggleMultiple`).
|
|
816
887
|
* Renders a `role="group"` element and provides selection context to children.
|
|
817
888
|
*/
|
|
818
|
-
declare function ToggleGroup({ value: controlledValue, defaultValue, onValueChange, toggleMultiple, orientation, disabled, onKeyDown, ...props }: ToggleGroupProps):
|
|
889
|
+
declare function ToggleGroup({ value: controlledValue, defaultValue, onValueChange, toggleMultiple, orientation, disabled, onKeyDown, ...props }: ToggleGroupProps): import("react").JSX.Element;
|
|
819
890
|
/** Props for `Toggle`. */
|
|
820
891
|
interface ToggleProps extends Omit<ComponentPropsWithoutRef<"button">, "value" | "onChange"> {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
892
|
+
/** Controlled pressed state (standalone use only). */
|
|
893
|
+
pressed?: boolean;
|
|
894
|
+
/** Initial pressed state when uncontrolled (standalone use only). */
|
|
895
|
+
defaultPressed?: boolean;
|
|
896
|
+
/** Pressed-state change callback (standalone use only). */
|
|
897
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
898
|
+
/** Identifies this toggle inside a `ToggleGroup`. Required within a group. */
|
|
899
|
+
value?: string;
|
|
829
900
|
}
|
|
830
901
|
/**
|
|
831
902
|
* A two-state button (`aria-pressed`). Works standalone or, when rendered
|
|
832
903
|
* inside a `ToggleGroup`, derives its pressed state from the group selection
|
|
833
904
|
* and participates in roving-tabindex navigation.
|
|
834
905
|
*/
|
|
835
|
-
declare function Toggle({ pressed: pressedProp, defaultPressed, onPressedChange, value, disabled, onClick, onFocus, ...props }: ToggleProps):
|
|
836
|
-
|
|
906
|
+
declare function Toggle({ pressed: pressedProp, defaultPressed, onPressedChange, value, disabled, onClick, onFocus, ...props }: ToggleProps): import("react").JSX.Element;
|
|
907
|
+
//#endregion
|
|
908
|
+
//#region src/primitives/switch.d.ts
|
|
837
909
|
/** Props for `Switch`. */
|
|
838
910
|
interface SwitchProps extends Omit<ComponentPropsWithoutRef<"button">, "onChange" | "value" | "type" | "checked"> {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
911
|
+
checked?: boolean;
|
|
912
|
+
defaultChecked?: boolean;
|
|
913
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
914
|
+
disabled?: boolean;
|
|
915
|
+
/** Emit a hidden native checkbox so the switch participates in form submit. */
|
|
916
|
+
name?: string;
|
|
917
|
+
value?: string;
|
|
918
|
+
required?: boolean;
|
|
847
919
|
}
|
|
848
920
|
/**
|
|
849
921
|
* Toggle switch primitive (`role="switch"`). Controlled or uncontrolled, with
|
|
850
922
|
* an optional hidden native input for form submission. Exposes `data-state`
|
|
851
923
|
* (checked/unchecked) and `data-disabled` for Core to style — no visuals here.
|
|
852
924
|
*/
|
|
853
|
-
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
854
|
-
|
|
925
|
+
declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
926
|
+
//#endregion
|
|
927
|
+
//#region src/primitives/checkbox.d.ts
|
|
855
928
|
/** Props for `Checkbox`. */
|
|
856
929
|
interface CheckboxProps extends Omit<ComponentPropsWithoutRef<"button">, "onChange" | "value" | "type" | "checked"> {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
930
|
+
checked?: boolean;
|
|
931
|
+
defaultChecked?: boolean;
|
|
932
|
+
/** Tri-state "mixed" — announced as `aria-checked="mixed"`. */
|
|
933
|
+
indeterminate?: boolean;
|
|
934
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
935
|
+
disabled?: boolean;
|
|
936
|
+
/** Emit a hidden native checkbox so it participates in form submit. */
|
|
937
|
+
name?: string;
|
|
938
|
+
value?: string;
|
|
939
|
+
required?: boolean;
|
|
867
940
|
}
|
|
868
941
|
/**
|
|
869
942
|
* Checkbox primitive (`role="checkbox"`) supporting an indeterminate tri-state
|
|
@@ -871,17 +944,18 @@ interface CheckboxProps extends Omit<ComponentPropsWithoutRef<"button">, "onChan
|
|
|
871
944
|
* native input for form submission. Exposes `data-state`
|
|
872
945
|
* (checked/unchecked/indeterminate) for Core to render the check/indicator.
|
|
873
946
|
*/
|
|
874
|
-
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLButtonElement>>;
|
|
875
|
-
|
|
947
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
948
|
+
//#endregion
|
|
949
|
+
//#region src/primitives/progress.d.ts
|
|
876
950
|
/** Props for `Progress`. */
|
|
877
951
|
interface ProgressProps extends Omit<ComponentPropsWithoutRef<"div">, "children"> {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
952
|
+
/** Current value; `null` (or omitted) renders an indeterminate progressbar. */
|
|
953
|
+
value?: number | null;
|
|
954
|
+
min?: number;
|
|
955
|
+
max?: number;
|
|
956
|
+
/** Override the localized `aria-valuetext`. */
|
|
957
|
+
getValueLabel?: (value: number, min: number, max: number) => string;
|
|
958
|
+
children?: React.ReactNode;
|
|
885
959
|
}
|
|
886
960
|
/**
|
|
887
961
|
* Progressbar primitive (`role="progressbar"`). Reports value/min/max and a
|
|
@@ -889,132 +963,142 @@ interface ProgressProps extends Omit<ComponentPropsWithoutRef<"div">, "children"
|
|
|
889
963
|
* indeterminate state. Exposes `data-state`
|
|
890
964
|
* (indeterminate/loading/complete) — no visuals here.
|
|
891
965
|
*/
|
|
892
|
-
declare const Progress: react.ForwardRefExoticComponent<ProgressProps & react.RefAttributes<HTMLDivElement>>;
|
|
893
|
-
|
|
966
|
+
declare const Progress: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
967
|
+
//#endregion
|
|
968
|
+
//#region src/primitives/meter.d.ts
|
|
894
969
|
/** Props for `Meter`. */
|
|
895
970
|
interface MeterProps extends Omit<ComponentPropsWithoutRef<"div">, "children"> {
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
971
|
+
/** Current value within [min, max]. */
|
|
972
|
+
value: number;
|
|
973
|
+
min?: number;
|
|
974
|
+
max?: number;
|
|
975
|
+
/** Override the localized `aria-valuetext`. */
|
|
976
|
+
getValueLabel?: (value: number, min: number, max: number) => string;
|
|
977
|
+
children?: React.ReactNode;
|
|
903
978
|
}
|
|
904
979
|
/**
|
|
905
980
|
* Meter primitive (`role="meter"`) — a scalar measurement within a known range
|
|
906
981
|
* (e.g. disk usage, score), distinct from Progress (task completion). Reports
|
|
907
982
|
* value/min/max and a localized `aria-valuetext`; exposes `data-value`.
|
|
908
983
|
*/
|
|
909
|
-
declare const Meter: react.ForwardRefExoticComponent<MeterProps & react.RefAttributes<HTMLDivElement>>;
|
|
910
|
-
|
|
984
|
+
declare const Meter: import("react").ForwardRefExoticComponent<MeterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
985
|
+
//#endregion
|
|
986
|
+
//#region src/primitives/accordion.d.ts
|
|
911
987
|
/** Props for `AccordionRoot`. */
|
|
912
988
|
interface AccordionRootProps {
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
989
|
+
children: ReactNode;
|
|
990
|
+
/** `"single"` allows one open panel, `"multiple"` allows many. */
|
|
991
|
+
type?: "single" | "multiple";
|
|
992
|
+
/** Selected value(s). `string | null` for single, `string[]` for multiple. */
|
|
993
|
+
value?: string | string[] | null;
|
|
994
|
+
defaultValue?: string | string[] | null;
|
|
995
|
+
onValueChange?: (value: string | string[] | null) => void;
|
|
996
|
+
/** Single mode: allow closing the open panel (so none is open). */
|
|
997
|
+
collapsible?: boolean;
|
|
998
|
+
disabled?: boolean;
|
|
999
|
+
/** Animate content enter/leave (default `true`). */
|
|
1000
|
+
animated?: boolean;
|
|
925
1001
|
}
|
|
926
1002
|
/** Renders the `AccordionRoot` component. */
|
|
927
|
-
declare function AccordionRoot({ children, type, value: controlledValue, defaultValue, onValueChange, collapsible, disabled, animated
|
|
1003
|
+
declare function AccordionRoot({ children, type, value: controlledValue, defaultValue, onValueChange, collapsible, disabled, animated }: AccordionRootProps): import("react").JSX.Element;
|
|
928
1004
|
/** Props for `AccordionItem`. */
|
|
929
1005
|
interface AccordionItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
1006
|
+
/** Unique value identifying this item within the accordion. */
|
|
1007
|
+
value: string;
|
|
1008
|
+
disabled?: boolean;
|
|
933
1009
|
}
|
|
934
1010
|
/** Renders the `AccordionItem` component. */
|
|
935
|
-
declare function AccordionItem({ value, disabled, ...props }: AccordionItemProps):
|
|
1011
|
+
declare function AccordionItem({ value, disabled, ...props }: AccordionItemProps): import("react").JSX.Element;
|
|
936
1012
|
/** Props for `AccordionTrigger`. */
|
|
937
|
-
interface AccordionTriggerProps extends ComponentPropsWithoutRef<"button"> {
|
|
938
|
-
}
|
|
1013
|
+
interface AccordionTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
939
1014
|
/** Renders the `AccordionTrigger` component. */
|
|
940
|
-
declare function AccordionTrigger({ onClick, disabled, ...props }: AccordionTriggerProps):
|
|
1015
|
+
declare function AccordionTrigger({ onClick, disabled, ...props }: AccordionTriggerProps): import("react").JSX.Element;
|
|
941
1016
|
/** Props for `AccordionContent`. */
|
|
942
1017
|
interface AccordionContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
1018
|
+
/**
|
|
1019
|
+
* When collapsed, keep the content in the DOM as `hidden="until-found"`
|
|
1020
|
+
* (instead of unmounting) so browser find-in-page can reveal it. Chromium
|
|
1021
|
+
* progressive enhancement; disables the enter/leave animation for this
|
|
1022
|
+
* content. On reveal a `beforematch` event expands the item so state stays
|
|
1023
|
+
* consistent.
|
|
1024
|
+
*/
|
|
1025
|
+
hiddenUntilFound?: boolean;
|
|
943
1026
|
}
|
|
944
1027
|
/** Renders the `AccordionContent` component. */
|
|
945
|
-
declare function AccordionContent({ style, ...props }: AccordionContentProps):
|
|
946
|
-
|
|
1028
|
+
declare function AccordionContent({ hiddenUntilFound, style, ...props }: AccordionContentProps): import("react").JSX.Element | null;
|
|
1029
|
+
//#endregion
|
|
1030
|
+
//#region src/form/form-store.d.ts
|
|
947
1031
|
/** Field name → error message map. Keys can be dot-paths (e.g. "items.0"). */
|
|
948
1032
|
type FormErrors = Partial<Record<string, string>>;
|
|
949
1033
|
/** Controls when the `validate` callback is invoked. */
|
|
950
1034
|
type ValidateOn = "change" | "blur" | "submit";
|
|
951
1035
|
/** Configuration for {@link useFormStore}. */
|
|
952
1036
|
interface FormStoreOptions<V extends Record<string, unknown> = Record<string, unknown>> {
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1037
|
+
/** Initial field values. Also used by `reset()` and `isDirty()`. */
|
|
1038
|
+
defaultValues: V;
|
|
1039
|
+
/** Return an errors object keyed by field name. Invoked based on `validateOn`. */
|
|
1040
|
+
validate?: (values: V) => FormErrors | void;
|
|
1041
|
+
/** Called after successful validation on submit. Supports async (enables `isSubmitting`). */
|
|
1042
|
+
onSubmit?: (values: V) => void | Promise<void>;
|
|
1043
|
+
/** When to run `validate`. `"change"` (default) | `"blur"` | `"submit"` */
|
|
1044
|
+
validateOn?: ValidateOn;
|
|
961
1045
|
}
|
|
962
1046
|
/** Reactive form store returned by {@link useFormStore}. Provides typed field access, validation, dirty tracking, and async submit. */
|
|
963
1047
|
interface FormStoreInstance<V extends Record<string, unknown> = Record<string, unknown>> {
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1048
|
+
/** Get current values snapshot */
|
|
1049
|
+
getValues(): V;
|
|
1050
|
+
/** Get a field value by key (type-safe when V is specific) */
|
|
1051
|
+
getValue<K extends keyof V & string>(name: K): V[K];
|
|
1052
|
+
/** Get a field value by dot-path */
|
|
1053
|
+
getValue(name: string): unknown;
|
|
1054
|
+
/** Set a field value (type-safe when V is specific) */
|
|
1055
|
+
setValue<K extends keyof V & string>(name: K, value: V[K]): void;
|
|
1056
|
+
/** Set a field value by dot-path */
|
|
1057
|
+
setValue(name: string, value: unknown): void;
|
|
1058
|
+
/** Get all current errors */
|
|
1059
|
+
getErrors(): FormErrors;
|
|
1060
|
+
/** Get validation error for a field */
|
|
1061
|
+
getError(name: string): string | undefined;
|
|
1062
|
+
/** Set validation error for a specific field */
|
|
1063
|
+
setError(name: string, error: string | undefined): void;
|
|
1064
|
+
/** Check if a field has been touched */
|
|
1065
|
+
getFieldTouched(name: string): boolean;
|
|
1066
|
+
/** Mark a field as touched */
|
|
1067
|
+
setFieldTouched(name: string, touched: boolean): void;
|
|
1068
|
+
/** Check if any field differs from default */
|
|
1069
|
+
isDirty(): boolean;
|
|
1070
|
+
/** Check if a specific field differs from default */
|
|
1071
|
+
isFieldDirty(name: string): boolean;
|
|
1072
|
+
/** Run validation and return errors */
|
|
1073
|
+
validate(): FormErrors;
|
|
1074
|
+
/** Reset entire form to default values */
|
|
1075
|
+
reset(): void;
|
|
1076
|
+
/** Reset a single field to its default value */
|
|
1077
|
+
resetField(name: string): void;
|
|
1078
|
+
/** Submit handler (supports async onSubmit) */
|
|
1079
|
+
submit(e?: {
|
|
1080
|
+
preventDefault?(): void;
|
|
1081
|
+
}): void;
|
|
1082
|
+
/**
|
|
1083
|
+
* Register a control element for a field so `submit()` can move focus to the
|
|
1084
|
+
* first invalid control (WCAG-critical error recovery). Returns an
|
|
1085
|
+
* unregister function; registration order approximates DOM order.
|
|
1086
|
+
*/
|
|
1087
|
+
registerControl(name: string, getElement: () => HTMLElement | null): () => void;
|
|
1088
|
+
/** Whether an async submit is in progress */
|
|
1089
|
+
isSubmitting(): boolean;
|
|
1090
|
+
/** Error thrown by the last async onSubmit (cleared on next submit or reset) */
|
|
1091
|
+
getSubmitError(): unknown;
|
|
1092
|
+
/** Push item to array field */
|
|
1093
|
+
push<K extends keyof V & string>(name: K, item: V[K] extends (infer U)[] ? U : unknown): void;
|
|
1094
|
+
/** Push item to array field by dot-path */
|
|
1095
|
+
push(name: string, item: unknown): void;
|
|
1096
|
+
/** Remove item from array field by index */
|
|
1097
|
+
remove(name: string, index: number): void;
|
|
1098
|
+
/** Subscribe for re-renders */
|
|
1099
|
+
subscribe(listener: () => void): () => void;
|
|
1100
|
+
/** Get snapshot version for useSyncExternalStore */
|
|
1101
|
+
getSnapshot(): number;
|
|
1018
1102
|
}
|
|
1019
1103
|
/**
|
|
1020
1104
|
* Creates and manages a form store with type-safe field access.
|
|
@@ -1057,130 +1141,127 @@ declare function useFormStore<V extends Record<string, unknown>>(options: FormSt
|
|
|
1057
1141
|
* ```
|
|
1058
1142
|
*/
|
|
1059
1143
|
declare function useFieldValue<T = unknown>(store: FormStoreInstance, name: string): T;
|
|
1060
|
-
|
|
1144
|
+
//#endregion
|
|
1145
|
+
//#region src/form/form-context.d.ts
|
|
1061
1146
|
/**
|
|
1062
1147
|
* Provides form store to descendant form components.
|
|
1063
1148
|
* Form provider for the current typed FormStore stack.
|
|
1064
1149
|
*/
|
|
1065
|
-
declare function FormProvider({ store, children
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
}):
|
|
1150
|
+
declare function FormProvider({ store, children }: {
|
|
1151
|
+
store: FormStoreInstance;
|
|
1152
|
+
children: ReactNode;
|
|
1153
|
+
}): import("react").JSX.Element;
|
|
1069
1154
|
/**
|
|
1070
1155
|
* Access the form store from any descendant component.
|
|
1071
1156
|
* Typed form context hook for the current FormStore stack.
|
|
1072
1157
|
*/
|
|
1073
1158
|
declare function useFormContext(): FormStoreInstance | null;
|
|
1074
|
-
|
|
1159
|
+
//#endregion
|
|
1160
|
+
//#region src/form/form-primitives.d.ts
|
|
1075
1161
|
/** Props for `FormRoot`. */
|
|
1076
|
-
interface FormRootProps extends ComponentPropsWithoutRef<"form"> {
|
|
1077
|
-
}
|
|
1162
|
+
interface FormRootProps extends ComponentPropsWithoutRef<"form"> {}
|
|
1078
1163
|
/** Renders the `FormRoot` component. */
|
|
1079
|
-
declare function FormRoot({ onSubmit, ...props }: FormRootProps):
|
|
1164
|
+
declare function FormRoot({ onSubmit, ...props }: FormRootProps): import("react").JSX.Element;
|
|
1080
1165
|
/** Props for `FormField`. */
|
|
1081
1166
|
interface FormFieldProps extends ComponentPropsWithoutRef<"div"> {
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1167
|
+
/** Field name. When set, descendant label/control/error/description are
|
|
1168
|
+
* automatically wired together (htmlFor/id/aria-describedby). */
|
|
1169
|
+
name?: string;
|
|
1085
1170
|
}
|
|
1086
1171
|
/** Renders the `FormField` component. */
|
|
1087
|
-
declare function FormField({ name, ...props }: FormFieldProps):
|
|
1172
|
+
declare function FormField({ name, ...props }: FormFieldProps): import("react").JSX.Element;
|
|
1088
1173
|
/** Props for `FormLabel`. */
|
|
1089
1174
|
interface FormLabelProps extends ComponentPropsWithoutRef<"label"> {
|
|
1090
|
-
|
|
1091
|
-
|
|
1175
|
+
/** @deprecated Field association is derived from the enclosing `FormField`. */
|
|
1176
|
+
name?: string;
|
|
1092
1177
|
}
|
|
1093
1178
|
/** Renders the `FormLabel` component. */
|
|
1094
|
-
declare function FormLabel({ htmlFor, name: _name, ...props }: FormLabelProps):
|
|
1179
|
+
declare function FormLabel({ htmlFor, name: _name, ...props }: FormLabelProps): import("react").JSX.Element;
|
|
1095
1180
|
/** Props for `FormInput`. */
|
|
1096
1181
|
interface FormInputProps extends Omit<ComponentPropsWithoutRef<"input">, "name"> {
|
|
1097
|
-
|
|
1182
|
+
name: string;
|
|
1098
1183
|
}
|
|
1099
|
-
declare const FormInput: react.ForwardRefExoticComponent<FormInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1184
|
+
declare const FormInput: import("react").ForwardRefExoticComponent<FormInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
1100
1185
|
/** Props for `FormTextarea`. */
|
|
1101
1186
|
interface FormTextareaProps extends Omit<ComponentPropsWithoutRef<"textarea">, "name"> {
|
|
1102
|
-
|
|
1187
|
+
name: string;
|
|
1103
1188
|
}
|
|
1104
|
-
declare const FormTextarea: react.ForwardRefExoticComponent<FormTextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
1189
|
+
declare const FormTextarea: import("react").ForwardRefExoticComponent<FormTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
1105
1190
|
/** Props for `FormSelect`. */
|
|
1106
1191
|
interface FormSelectProps extends Omit<ComponentPropsWithoutRef<"select">, "name"> {
|
|
1107
|
-
|
|
1192
|
+
name: string;
|
|
1108
1193
|
}
|
|
1109
|
-
declare const FormSelect: react.ForwardRefExoticComponent<FormSelectProps & react.RefAttributes<HTMLSelectElement>>;
|
|
1194
|
+
declare const FormSelect: import("react").ForwardRefExoticComponent<FormSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
1110
1195
|
/** Props for `FormSwitch`. */
|
|
1111
1196
|
interface FormSwitchProps extends Omit<ComponentPropsWithoutRef<"button">, "name" | "onChange" | "type"> {
|
|
1112
|
-
|
|
1197
|
+
name: string;
|
|
1113
1198
|
}
|
|
1114
|
-
declare const FormSwitch: react.ForwardRefExoticComponent<FormSwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1199
|
+
declare const FormSwitch: import("react").ForwardRefExoticComponent<FormSwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
1115
1200
|
/** Props for `FormCheckbox`. */
|
|
1116
1201
|
interface FormCheckboxProps extends Omit<ComponentPropsWithoutRef<"input">, "name" | "type"> {
|
|
1117
|
-
|
|
1118
|
-
|
|
1202
|
+
name: string;
|
|
1203
|
+
value?: string;
|
|
1119
1204
|
}
|
|
1120
|
-
declare const FormCheckbox: react.ForwardRefExoticComponent<FormCheckboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
1205
|
+
declare const FormCheckbox: import("react").ForwardRefExoticComponent<FormCheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
1121
1206
|
/** Props for `FormRadioGroup`. */
|
|
1122
1207
|
interface FormRadioGroupProps extends ComponentPropsWithoutRef<"div"> {
|
|
1123
|
-
|
|
1124
|
-
|
|
1208
|
+
/** @deprecated Pass `name` to each `FormRadio` instead. */
|
|
1209
|
+
name?: string;
|
|
1125
1210
|
}
|
|
1126
1211
|
/** Renders the `FormRadioGroup` component. */
|
|
1127
|
-
declare function FormRadioGroup({ name: _name, ...props }: FormRadioGroupProps):
|
|
1212
|
+
declare function FormRadioGroup({ name: _name, ...props }: FormRadioGroupProps): import("react").JSX.Element;
|
|
1128
1213
|
/** Props for `FormRadio`. */
|
|
1129
1214
|
interface FormRadioProps extends Omit<ComponentPropsWithoutRef<"input">, "name" | "type"> {
|
|
1130
|
-
|
|
1131
|
-
|
|
1215
|
+
name: string;
|
|
1216
|
+
value: string;
|
|
1132
1217
|
}
|
|
1133
|
-
declare const FormRadio: react.ForwardRefExoticComponent<FormRadioProps & react.RefAttributes<HTMLInputElement>>;
|
|
1218
|
+
declare const FormRadio: import("react").ForwardRefExoticComponent<FormRadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
1134
1219
|
/** Props for `FormDescription`. */
|
|
1135
1220
|
interface FormDescriptionProps extends ComponentPropsWithoutRef<"p"> {
|
|
1136
|
-
|
|
1137
|
-
|
|
1221
|
+
/** @deprecated Association is derived from the enclosing `FormField`. */
|
|
1222
|
+
name?: string;
|
|
1138
1223
|
}
|
|
1139
1224
|
/** Renders the `FormDescription` component. */
|
|
1140
|
-
declare function FormDescription({ name: _name, ...props }: FormDescriptionProps):
|
|
1225
|
+
declare function FormDescription({ name: _name, ...props }: FormDescriptionProps): import("react").JSX.Element;
|
|
1141
1226
|
/** Props for `FormError`. */
|
|
1142
1227
|
interface FormErrorProps extends ComponentPropsWithoutRef<"p"> {
|
|
1143
|
-
|
|
1228
|
+
name: string;
|
|
1144
1229
|
}
|
|
1145
1230
|
/** Renders the `FormError` component. */
|
|
1146
|
-
declare function FormError({ name, children, ...props }: FormErrorProps):
|
|
1231
|
+
declare function FormError({ name, children, ...props }: FormErrorProps): import("react").JSX.Element | null;
|
|
1147
1232
|
/** Props for `FormControl`. */
|
|
1148
1233
|
type FormControlProps = FormInputProps;
|
|
1149
1234
|
/** Alias of {@link FormInput}. */
|
|
1150
|
-
declare const FormControl: react.ForwardRefExoticComponent<FormInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1235
|
+
declare const FormControl: import("react").ForwardRefExoticComponent<FormInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
1151
1236
|
/** Props for `FormSubmit`. */
|
|
1152
|
-
interface FormSubmitProps extends ComponentPropsWithoutRef<"button"> {
|
|
1153
|
-
}
|
|
1237
|
+
interface FormSubmitProps extends ComponentPropsWithoutRef<"button"> {}
|
|
1154
1238
|
/** Renders the `FormSubmit` component. Auto-disables during async submit. */
|
|
1155
|
-
declare function FormSubmit({ type, disabled, ...props }: FormSubmitProps):
|
|
1239
|
+
declare function FormSubmit({ type, disabled, ...props }: FormSubmitProps): import("react").JSX.Element;
|
|
1156
1240
|
/** Props for `FormReset`. */
|
|
1157
|
-
interface FormResetProps extends ComponentPropsWithoutRef<"button"> {
|
|
1158
|
-
}
|
|
1241
|
+
interface FormResetProps extends ComponentPropsWithoutRef<"button"> {}
|
|
1159
1242
|
/** Renders the `FormReset` component. */
|
|
1160
|
-
declare function FormReset({ onClick, ...props }: FormResetProps):
|
|
1243
|
+
declare function FormReset({ onClick, ...props }: FormResetProps): import("react").JSX.Element;
|
|
1161
1244
|
/** Props for `FormPush`. */
|
|
1162
1245
|
interface FormPushProps extends Omit<ComponentPropsWithoutRef<"button">, "value"> {
|
|
1163
|
-
|
|
1164
|
-
|
|
1246
|
+
name: string;
|
|
1247
|
+
value: unknown;
|
|
1165
1248
|
}
|
|
1166
1249
|
/** Renders the `FormPush` component. */
|
|
1167
|
-
declare function FormPush({ name, value, onClick, ...props }: FormPushProps):
|
|
1250
|
+
declare function FormPush({ name, value, onClick, ...props }: FormPushProps): import("react").JSX.Element;
|
|
1168
1251
|
/** Props for `FormRemove`. */
|
|
1169
1252
|
interface FormRemoveProps extends ComponentPropsWithoutRef<"button"> {
|
|
1170
|
-
|
|
1171
|
-
|
|
1253
|
+
name: string;
|
|
1254
|
+
index: number;
|
|
1172
1255
|
}
|
|
1173
1256
|
/** Renders the `FormRemove` component. */
|
|
1174
|
-
declare function FormRemove({ name, index, onClick, ...props }: FormRemoveProps):
|
|
1257
|
+
declare function FormRemove({ name, index, onClick, ...props }: FormRemoveProps): import("react").JSX.Element;
|
|
1175
1258
|
/** Props for `FormGroup`. */
|
|
1176
|
-
interface FormGroupProps extends ComponentPropsWithoutRef<"fieldset"> {
|
|
1177
|
-
}
|
|
1259
|
+
interface FormGroupProps extends ComponentPropsWithoutRef<"fieldset"> {}
|
|
1178
1260
|
/** Renders the `FormGroup` component. */
|
|
1179
|
-
declare function FormGroup(props: FormGroupProps):
|
|
1261
|
+
declare function FormGroup(props: FormGroupProps): import("react").JSX.Element;
|
|
1180
1262
|
/** Props for `FormGroupLabel`. */
|
|
1181
|
-
interface FormGroupLabelProps extends ComponentPropsWithoutRef<"legend"> {
|
|
1182
|
-
}
|
|
1263
|
+
interface FormGroupLabelProps extends ComponentPropsWithoutRef<"legend"> {}
|
|
1183
1264
|
/** Renders the `FormGroupLabel` component. */
|
|
1184
|
-
declare function FormGroupLabel(props: FormGroupLabelProps):
|
|
1185
|
-
|
|
1186
|
-
export { AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionRoot, type AccordionRootProps, AccordionTrigger, type AccordionTriggerProps, AlertDialogPanel, type AlertDialogPanelProps, type Align, Button, type ButtonProps, Checkbox, type CheckboxProps, ComboboxGroup, ComboboxGroupLabel, type ComboboxGroupLabelProps, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxPopover, type ComboboxPopoverProps, ComboboxRoot, type ComboboxRootProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, CommandRoot, type CommandRootProps, CommandSeparator, type CommandSeparatorProps, Composite, CompositeItem, type CompositeItemProps, type CompositeProps, CompositeProvider, type CompositeProviderProps, CompositeRow, type CompositeRowProps, DialogDescription, type DialogDescriptionProps, DialogDisclosure, type DialogDisclosureProps, DialogDismiss, type DialogDismissProps, DialogHeading, type DialogHeadingProps, DialogPanel, type DialogPanelProps, DialogRoot, type DialogRootProps, DisclosureContent, type DisclosureContentProps, DisclosureRoot, type DisclosureRootProps, DisclosureTrigger, type DisclosureTriggerProps, type FocusableWhenDisabledOptions, type FocusableWhenDisabledProps, FormCheckbox, type FormCheckboxProps, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormErrors, FormField, type FormFieldProps, FormGroup, FormGroupLabel, type FormGroupLabelProps, type FormGroupProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormProvider, FormPush, type FormPushProps, FormRadio, FormRadioGroup, type FormRadioGroupProps, type FormRadioProps, FormRemove, type FormRemoveProps, FormReset, type FormResetProps, FormRoot, type FormRootProps, FormSelect, type FormSelectProps, type FormStoreInstance, type FormStoreOptions, FormSubmit, type FormSubmitProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, MenuButtonArrow, type MenuButtonArrowProps, MenuItem, MenuItemCheckbox, type MenuItemCheckboxProps, type MenuItemProps, MenuItemRadio, type MenuItemRadioProps, MenuPopover, type MenuPopoverProps, MenuRoot, type MenuRootProps, MenuSeparator, type MenuSeparatorProps, MenuTrigger, type MenuTriggerProps, MenubarContainer, type MenubarContainerProps, MenubarRoot, type MenubarRootProps, Meter, type MeterProps, type OffsetArgs, type OffsetValue, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Radio, RadioGroupRoot, type RadioGroupRootProps, type RadioProps, type RovingTabindexOptions, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectPopover, type SelectPopoverProps, SelectRoot, type SelectRootProps, SelectTrigger, type SelectTriggerProps, Separator, type SeparatorProps, type Side, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, TabsRoot, type TabsRootProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, ToolbarButton, type ToolbarButtonProps, ToolbarContainer, type ToolbarContainerProps, ToolbarRoot, type ToolbarRootProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipAnchor, type TooltipAnchorProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, type UseFloatingOptions, type ValidateOn, useCommandState, useControllableState, useDialogClose, useEnterLeave, useFieldValue, useFloating, useFocusVisible, useFocusableWhenDisabled, useFormContext, useFormStore, useId, useMenubarContext, useRadioGroupContext, useRovingTabindex, useScrollActiveDescendantIntoView };
|
|
1265
|
+
declare function FormGroupLabel(props: FormGroupLabelProps): import("react").JSX.Element;
|
|
1266
|
+
//#endregion
|
|
1267
|
+
export { AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionRoot, type AccordionRootProps, AccordionTrigger, type AccordionTriggerProps, AlertDialogPanel, type AlertDialogPanelProps, type Align, Button, type ButtonProps, Checkbox, type CheckboxProps, ComboboxGroup, ComboboxGroupLabel, type ComboboxGroupLabelProps, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxPopover, type ComboboxPopoverProps, ComboboxRoot, type ComboboxRootProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, CommandRoot, type CommandRootProps, CommandSeparator, type CommandSeparatorProps, Composite, CompositeItem, type CompositeItemProps, type CompositeProps, CompositeProvider, type CompositeProviderProps, CompositeRow, type CompositeRowProps, DialogDescription, type DialogDescriptionProps, DialogDisclosure, type DialogDisclosureProps, DialogDismiss, type DialogDismissProps, DialogHeading, type DialogHeadingProps, DialogPanel, type DialogPanelProps, DialogRoot, type DialogRootProps, DisclosureContent, type DisclosureContentProps, DisclosureRoot, type DisclosureRootProps, DisclosureTrigger, type DisclosureTriggerProps, type FocusableWhenDisabledOptions, type FocusableWhenDisabledProps, FormCheckbox, type FormCheckboxProps, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormErrors, FormField, type FormFieldProps, FormGroup, FormGroupLabel, type FormGroupLabelProps, type FormGroupProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormProvider, FormPush, type FormPushProps, FormRadio, FormRadioGroup, type FormRadioGroupProps, type FormRadioProps, FormRemove, type FormRemoveProps, FormReset, type FormResetProps, FormRoot, type FormRootProps, FormSelect, type FormSelectProps, type FormStoreInstance, type FormStoreOptions, FormSubmit, type FormSubmitProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, MenuButtonArrow, type MenuButtonArrowProps, MenuItem, MenuItemCheckbox, type MenuItemCheckboxProps, type MenuItemProps, MenuItemRadio, type MenuItemRadioProps, MenuPopover, type MenuPopoverProps, MenuRoot, type MenuRootProps, MenuSeparator, type MenuSeparatorProps, MenuTrigger, type MenuTriggerProps, MenubarContainer, type MenubarContainerProps, MenubarRoot, type MenubarRootProps, Meter, type MeterProps, type OffsetArgs, type OffsetValue, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Radio, RadioGroupRoot, type RadioGroupRootProps, type RadioProps, type RovingTabindexOptions, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectPopover, type SelectPopoverProps, SelectRoot, type SelectRootProps, SelectTrigger, type SelectTriggerProps, Separator, type SeparatorProps, type Side, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, TabsRoot, type TabsRootProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, ToolbarButton, type ToolbarButtonProps, ToolbarContainer, type ToolbarContainerProps, ToolbarRoot, type ToolbarRootProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipAnchor, type TooltipAnchorProps, TooltipGroup, type TooltipGroupProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipRoot, type TooltipRootProps, type UseFloatingOptions, type ValidateOn, useCommandState, useControllableState, useDialogClose, useEnterLeave, useFieldValue, useFloating, useFocusVisible, useFocusableWhenDisabled, useFormContext, useFormStore, useId, useMenubarContext, useRadioGroupContext, useRovingTabindex, useScrollActiveDescendantIntoView };
|