@wix/site-ui 1.30.0 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1268.js +99 -0
- package/dist/1279.js +7 -0
- package/dist/1457.js +10 -0
- package/dist/1477.js +106 -0
- package/dist/1500.js +111 -0
- package/dist/167.js +6 -0
- package/dist/2274.js +34 -0
- package/dist/2287.js +17 -0
- package/dist/2418.js +31 -0
- package/dist/2801.js +20 -0
- package/dist/285.js +86 -0
- package/dist/2861.js +6 -0
- package/dist/3020.js +7 -0
- package/dist/3021.js +72 -0
- package/dist/3056.js +229 -0
- package/dist/3140.js +4 -0
- package/dist/3248.js +307 -0
- package/dist/3296.js +4 -0
- package/dist/3319.js +400 -0
- package/dist/3395.js +4 -0
- package/dist/3485.js +854 -0
- package/dist/353.js +14 -0
- package/dist/3670.js +418 -0
- package/dist/3829.js +113 -0
- package/dist/4026.js +12 -0
- package/dist/4143.js +46 -0
- package/dist/42.js +32 -0
- package/dist/4281.js +30 -0
- package/dist/4346.js +2 -0
- package/dist/4388.js +418 -0
- package/dist/4490.js +32 -0
- package/dist/4495.js +9 -0
- package/dist/4549.js +24 -0
- package/dist/4586.js +41 -0
- package/dist/4586.js.LICENSE.txt +19 -0
- package/dist/4707.js +19 -0
- package/dist/4723.js +7 -0
- package/dist/4745.js +7 -0
- package/dist/4768.js +35 -0
- package/dist/4922.js +15 -0
- package/dist/5036.js +17 -0
- package/dist/5085.js +20 -0
- package/dist/5299.js +597 -0
- package/dist/5659.js +4 -0
- package/dist/5778.js +10 -0
- package/dist/5864.js +86 -0
- package/dist/5992.js +913 -0
- package/dist/5992.js.LICENSE.txt +19 -0
- package/dist/6003.js +10 -0
- package/dist/6046.js +29 -0
- package/dist/6089.js +2355 -0
- package/dist/6107.js +10 -0
- package/dist/6247.js +20 -0
- package/dist/6270.js +487 -0
- package/dist/6329.js +32 -0
- package/dist/6330.js +30 -0
- package/dist/6499.js +7 -0
- package/dist/6535.js +71 -0
- package/dist/6588.js +382 -0
- package/dist/6706.js +16 -0
- package/dist/6825.js +7 -0
- package/dist/6882.js +1562 -0
- package/dist/6914.js +30 -0
- package/dist/7021.js +13 -0
- package/dist/7366.js +83 -0
- package/dist/7373.js +25 -0
- package/dist/7541.js +25 -0
- package/dist/7564.js +10 -0
- package/dist/7642.js +20 -0
- package/dist/7725.js +10 -0
- package/dist/7871.js +38 -0
- package/dist/8052.js +352 -0
- package/dist/8106.js +238 -0
- package/dist/8171.js +346 -0
- package/dist/8225.js +21 -0
- package/dist/8272.js +333 -0
- package/dist/8527.js +58 -0
- package/dist/8724.js +10 -0
- package/dist/8750.js +1920 -0
- package/dist/8758.js +43 -0
- package/dist/880.js +149 -0
- package/dist/8935.js +8 -0
- package/dist/8960.js +22 -0
- package/dist/8971.js +40 -0
- package/dist/8979.js +10 -0
- package/dist/8996.js +71 -0
- package/dist/904.js +121 -0
- package/dist/9048.js +52 -0
- package/dist/9087.js +256 -0
- package/dist/9189.js +158 -0
- package/dist/9255.js +136 -0
- package/dist/9352.js +148 -0
- package/dist/951.js +22 -0
- package/dist/9635.js +22 -0
- package/dist/9829.js +4 -0
- package/dist/9863.js +8 -0
- package/dist/Accordion/index.d.ts +569 -12
- package/dist/Accordion/index.js +423 -8
- package/dist/AlertDialog/index.d.ts +1417 -18
- package/dist/AlertDialog/index.js +34 -14
- package/dist/Autocomplete/index.d.ts +1861 -38
- package/dist/Autocomplete/index.js +98 -24
- package/dist/Avatar/index.d.ts +129 -7
- package/dist/Avatar/index.js +149 -6
- package/dist/Breadcrumbs/index.d.ts +960 -7
- package/dist/Breadcrumbs/index.js +5 -5
- package/dist/Button/index.d.ts +88 -6
- package/dist/Button/index.js +27 -3
- package/dist/Checkbox/index.d.ts +425 -5
- package/dist/Checkbox/index.js +45 -5
- package/dist/CheckboxGroup/index.d.ts +318 -3
- package/dist/CheckboxGroup/index.js +166 -3
- package/dist/Collapsible/index.d.ts +377 -7
- package/dist/Collapsible/index.js +160 -6
- package/dist/Combobox/index.d.ts +1984 -48
- package/dist/Combobox/index.js +352 -29
- package/dist/ContextMenu/index.d.ts +2340 -36
- package/dist/ContextMenu/index.js +197 -22
- package/dist/Dialog/index.d.ts +1355 -18
- package/dist/Dialog/index.js +16 -14
- package/dist/Drawer/index.d.ts +1653 -18
- package/dist/Drawer/index.js +2797 -20
- package/dist/Field/index.d.ts +655 -15
- package/dist/Field/index.js +677 -10
- package/dist/Fieldset/index.d.ts +94 -5
- package/dist/Fieldset/index.js +68 -5
- package/dist/Form/index.d.ts +331 -2
- package/dist/Form/index.js +106 -3
- package/dist/Input/index.d.ts +692 -3
- package/dist/Input/index.js +10 -3
- package/dist/Menu/index.d.ts +2301 -36
- package/dist/Menu/index.js +365 -26
- package/dist/Menubar/index.d.ts +2301 -3
- package/dist/Menubar/index.js +105 -3
- package/dist/Meter/index.d.ts +175 -11
- package/dist/Meter/index.js +129 -9
- package/dist/NavigationMenu/index.d.ts +978 -28
- package/dist/NavigationMenu/index.js +1034 -17
- package/dist/NumberField/index.d.ts +612 -15
- package/dist/NumberField/index.js +1409 -11
- package/dist/Popover/index.d.ts +1655 -20
- package/dist/Popover/index.js +792 -17
- package/dist/PreviewCard/index.d.ts +1523 -14
- package/dist/PreviewCard/index.js +679 -14
- package/dist/Progress/index.d.ts +183 -11
- package/dist/Progress/index.js +181 -9
- package/dist/Radio/index.d.ts +185 -6
- package/dist/Radio/index.js +253 -6
- package/dist/RadioGroup/index.d.ts +341 -2
- package/dist/RadioGroup/index.js +154 -3
- package/dist/ScrollArea/index.d.ts +265 -13
- package/dist/ScrollArea/index.js +892 -10
- package/dist/Select/index.d.ts +1493 -38
- package/dist/Select/index.js +1824 -23
- package/dist/Separator/index.d.ts +80 -6
- package/dist/Separator/index.js +3 -3
- package/dist/Slider/index.d.ts +678 -16
- package/dist/Slider/index.js +1199 -11
- package/dist/Switch/index.d.ts +393 -5
- package/dist/Switch/index.js +208 -6
- package/dist/Tabs/index.d.ts +523 -12
- package/dist/Tabs/index.js +685 -9
- package/dist/Toggle/index.d.ts +305 -2
- package/dist/Toggle/index.js +76 -3
- package/dist/ToggleGroup/index.d.ts +316 -2
- package/dist/ToggleGroup/index.js +102 -3
- package/dist/Toolbar/index.d.ts +282 -13
- package/dist/Toolbar/index.js +230 -9
- package/dist/Tooltip/index.d.ts +1572 -14
- package/dist/Tooltip/index.js +965 -14
- package/dist/index.d.ts +12749 -652
- package/dist/rslib-runtime.js +18 -0
- package/package.json +3 -3
package/dist/Tabs/index.d.ts
CHANGED
|
@@ -1,17 +1,246 @@
|
|
|
1
1
|
import * as React_2 from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { TabsTabProps } from '@base-ui/react/tabs';
|
|
2
|
+
import { TabsIndicatorProps as TabsIndicatorProps_2 } from '@base-ui/react/tabs';
|
|
3
|
+
import { TabsPanelProps as TabsPanelProps_2 } from '@base-ui/react/tabs';
|
|
4
|
+
import { TabsRootProps as TabsRootProps_2 } from '@base-ui/react/tabs';
|
|
5
|
+
import { TabsTabProps as TabsTabProps_2 } from '@base-ui/react/tabs';
|
|
7
6
|
|
|
8
7
|
declare type BaseListProps = WithStringClassName<React_2.ComponentPropsWithoutRef<typeof Tabs_2.List>>;
|
|
9
8
|
|
|
9
|
+
declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
|
|
10
|
+
/**
|
|
11
|
+
* The reason for the event.
|
|
12
|
+
*/
|
|
13
|
+
reason: Reason;
|
|
14
|
+
/**
|
|
15
|
+
* The native event associated with the custom event.
|
|
16
|
+
*/
|
|
17
|
+
event: ReasonToEvent<Reason>;
|
|
18
|
+
/**
|
|
19
|
+
* Cancels Base UI from handling the event.
|
|
20
|
+
*/
|
|
21
|
+
cancel: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Allows the event to propagate in cases where Base UI will stop the propagation.
|
|
24
|
+
*/
|
|
25
|
+
allowPropagation: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates whether the event has been canceled.
|
|
28
|
+
*/
|
|
29
|
+
isCanceled: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Indicates whether the event is allowed to propagate.
|
|
32
|
+
*/
|
|
33
|
+
isPropagationAllowed: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The element that triggered the event, if applicable.
|
|
36
|
+
*/
|
|
37
|
+
trigger: Element | undefined;
|
|
38
|
+
} & CustomProperties;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Details of custom change events emitted by Base UI components.
|
|
42
|
+
*/
|
|
43
|
+
declare type BaseUIChangeEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIChangeEventDetail<Reason, CustomProperties> & {} : never;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Props shared by all Base UI components.
|
|
47
|
+
* Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
|
|
48
|
+
*/
|
|
49
|
+
declare type BaseUIComponentProps<ElementType extends React_2.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React_2.ComponentPropsWithRef<ElementType>>, 'className' | 'color' | 'defaultValue' | 'defaultChecked' | 'style'> & {
|
|
50
|
+
/**
|
|
51
|
+
* CSS class applied to the element, or a function that
|
|
52
|
+
* returns a class based on the component's state.
|
|
53
|
+
*/
|
|
54
|
+
className?: string | ((state: State) => string | undefined) | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Allows you to replace the component's HTML element
|
|
57
|
+
* with a different tag, or compose it with another component.
|
|
58
|
+
*
|
|
59
|
+
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
60
|
+
*/
|
|
61
|
+
render?: React_2.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Style applied to the element, or a function that
|
|
64
|
+
* returns a style object based on the component's state.
|
|
65
|
+
*/
|
|
66
|
+
style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E & {
|
|
70
|
+
preventBaseUIHandler: () => void;
|
|
71
|
+
readonly baseUIHandlerPrevented?: boolean | undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
declare const cancelOpen: "cancel-open";
|
|
75
|
+
|
|
76
|
+
declare const chipRemovePress: "chip-remove-press";
|
|
77
|
+
|
|
78
|
+
declare const clearPress: "clear-press";
|
|
79
|
+
|
|
80
|
+
declare const closePress: "close-press";
|
|
81
|
+
|
|
82
|
+
declare const closeWatcher: "close-watcher";
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
|
|
86
|
+
*
|
|
87
|
+
* @template Props Props to be spread on the rendered element.
|
|
88
|
+
* @template State Component's internal state.
|
|
89
|
+
*/
|
|
90
|
+
declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
|
|
91
|
+
|
|
92
|
+
declare const decrementPress: "decrement-press";
|
|
93
|
+
|
|
94
|
+
declare const disabled: "disabled";
|
|
95
|
+
|
|
96
|
+
declare const drag: "drag";
|
|
97
|
+
|
|
98
|
+
declare const escapeKey: "escape-key";
|
|
99
|
+
|
|
100
|
+
declare const focusOut: "focus-out";
|
|
101
|
+
|
|
102
|
+
declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
|
|
103
|
+
ref?: React_2.Ref<T> | undefined;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
declare const imperativeAction: "imperative-action";
|
|
107
|
+
|
|
108
|
+
declare const incrementPress: "increment-press";
|
|
109
|
+
|
|
110
|
+
declare const initial: "initial";
|
|
111
|
+
|
|
112
|
+
declare const inputBlur: "input-blur";
|
|
113
|
+
|
|
114
|
+
declare const inputChange: "input-change";
|
|
115
|
+
|
|
116
|
+
declare const inputClear: "input-clear";
|
|
117
|
+
|
|
118
|
+
declare const inputPaste: "input-paste";
|
|
119
|
+
|
|
120
|
+
declare const inputPress: "input-press";
|
|
121
|
+
|
|
122
|
+
declare const itemPress: "item-press";
|
|
123
|
+
|
|
124
|
+
declare const keyboard: "keyboard";
|
|
125
|
+
|
|
126
|
+
declare const linkPress: "link-press";
|
|
127
|
+
|
|
128
|
+
declare const listNavigation: "list-navigation";
|
|
129
|
+
|
|
10
130
|
declare interface ListProps extends BaseListProps {
|
|
11
131
|
underline?: TabListUnderlineType;
|
|
12
132
|
align?: TabListAlignType;
|
|
13
133
|
}
|
|
14
134
|
|
|
135
|
+
declare const missing: "missing";
|
|
136
|
+
|
|
137
|
+
declare interface NativeButtonProps {
|
|
138
|
+
/**
|
|
139
|
+
* Whether the component renders a native `<button>` element when replacing it
|
|
140
|
+
* via the `render` prop.
|
|
141
|
+
* Set to `false` if the rendered element is not a button (for example, `<div>`).
|
|
142
|
+
* @default true
|
|
143
|
+
*/
|
|
144
|
+
nativeButton?: boolean | undefined;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare const none: "none";
|
|
148
|
+
|
|
149
|
+
declare type Orientation = 'horizontal' | 'vertical';
|
|
150
|
+
|
|
151
|
+
declare const outsidePress: "outside-press";
|
|
152
|
+
|
|
153
|
+
declare const pointer: "pointer";
|
|
154
|
+
|
|
155
|
+
declare namespace REASONS {
|
|
156
|
+
export {
|
|
157
|
+
none,
|
|
158
|
+
triggerPress,
|
|
159
|
+
triggerHover,
|
|
160
|
+
triggerFocus,
|
|
161
|
+
outsidePress,
|
|
162
|
+
itemPress,
|
|
163
|
+
closePress,
|
|
164
|
+
linkPress,
|
|
165
|
+
clearPress,
|
|
166
|
+
chipRemovePress,
|
|
167
|
+
trackPress,
|
|
168
|
+
incrementPress,
|
|
169
|
+
decrementPress,
|
|
170
|
+
inputChange,
|
|
171
|
+
inputClear,
|
|
172
|
+
inputBlur,
|
|
173
|
+
inputPaste,
|
|
174
|
+
inputPress,
|
|
175
|
+
focusOut,
|
|
176
|
+
escapeKey,
|
|
177
|
+
closeWatcher,
|
|
178
|
+
listNavigation,
|
|
179
|
+
keyboard,
|
|
180
|
+
pointer,
|
|
181
|
+
drag,
|
|
182
|
+
wheel,
|
|
183
|
+
scrub,
|
|
184
|
+
cancelOpen,
|
|
185
|
+
siblingOpen,
|
|
186
|
+
disabled,
|
|
187
|
+
missing,
|
|
188
|
+
initial,
|
|
189
|
+
imperativeAction,
|
|
190
|
+
swipe,
|
|
191
|
+
windowResize
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Maps a change `reason` string to the corresponding native event type.
|
|
197
|
+
*/
|
|
198
|
+
declare type ReasonToEvent<Reason extends string> = Reason extends keyof ReasonToEventMap ? ReasonToEventMap[Reason] : Event;
|
|
199
|
+
|
|
200
|
+
declare interface ReasonToEventMap {
|
|
201
|
+
[REASONS.none]: Event;
|
|
202
|
+
[REASONS.triggerPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
|
|
203
|
+
[REASONS.triggerHover]: MouseEvent;
|
|
204
|
+
[REASONS.triggerFocus]: FocusEvent;
|
|
205
|
+
[REASONS.outsidePress]: MouseEvent | PointerEvent | TouchEvent;
|
|
206
|
+
[REASONS.itemPress]: MouseEvent | KeyboardEvent | PointerEvent;
|
|
207
|
+
[REASONS.closePress]: MouseEvent | KeyboardEvent | PointerEvent;
|
|
208
|
+
[REASONS.linkPress]: MouseEvent | PointerEvent;
|
|
209
|
+
[REASONS.clearPress]: PointerEvent | MouseEvent | KeyboardEvent;
|
|
210
|
+
[REASONS.chipRemovePress]: PointerEvent | MouseEvent | KeyboardEvent;
|
|
211
|
+
[REASONS.trackPress]: PointerEvent | MouseEvent | TouchEvent;
|
|
212
|
+
[REASONS.incrementPress]: PointerEvent | MouseEvent | TouchEvent;
|
|
213
|
+
[REASONS.decrementPress]: PointerEvent | MouseEvent | TouchEvent;
|
|
214
|
+
[REASONS.inputChange]: InputEvent | Event;
|
|
215
|
+
[REASONS.inputClear]: InputEvent | FocusEvent | Event;
|
|
216
|
+
[REASONS.inputBlur]: FocusEvent;
|
|
217
|
+
[REASONS.inputPaste]: ClipboardEvent;
|
|
218
|
+
[REASONS.inputPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
|
|
219
|
+
[REASONS.focusOut]: FocusEvent | KeyboardEvent;
|
|
220
|
+
[REASONS.escapeKey]: KeyboardEvent;
|
|
221
|
+
[REASONS.closeWatcher]: Event;
|
|
222
|
+
[REASONS.listNavigation]: KeyboardEvent;
|
|
223
|
+
[REASONS.keyboard]: KeyboardEvent;
|
|
224
|
+
[REASONS.pointer]: PointerEvent;
|
|
225
|
+
[REASONS.drag]: PointerEvent | TouchEvent;
|
|
226
|
+
[REASONS.swipe]: PointerEvent | TouchEvent;
|
|
227
|
+
[REASONS.wheel]: WheelEvent;
|
|
228
|
+
[REASONS.scrub]: PointerEvent;
|
|
229
|
+
[REASONS.cancelOpen]: MouseEvent;
|
|
230
|
+
[REASONS.siblingOpen]: Event;
|
|
231
|
+
[REASONS.disabled]: Event;
|
|
232
|
+
[REASONS.missing]: Event;
|
|
233
|
+
[REASONS.initial]: Event;
|
|
234
|
+
[REASONS.imperativeAction]: Event;
|
|
235
|
+
[REASONS.windowResize]: UIEvent;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
declare const scrub: "scrub";
|
|
239
|
+
|
|
240
|
+
declare const siblingOpen: "sibling-open";
|
|
241
|
+
|
|
242
|
+
declare const swipe: "swipe";
|
|
243
|
+
|
|
15
244
|
export declare const TabListAlign: {
|
|
16
245
|
readonly start: "start";
|
|
17
246
|
readonly center: "center";
|
|
@@ -29,26 +258,308 @@ export declare const TabListUnderline: {
|
|
|
29
258
|
declare type TabListUnderlineType = (typeof TabListUnderline)[keyof typeof TabListUnderline];
|
|
30
259
|
|
|
31
260
|
export declare const Tabs: {
|
|
32
|
-
Root: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
261
|
+
Root: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<TabsRootProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
33
262
|
className?: string | undefined;
|
|
34
263
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
35
|
-
Tab: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
264
|
+
Tab: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<TabsTabProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
|
|
36
265
|
className?: string | undefined;
|
|
37
266
|
} & React_2.RefAttributes<HTMLElement>>;
|
|
38
|
-
Indicator: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
267
|
+
Indicator: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<TabsIndicatorProps_2, "ref"> & React_2.RefAttributes<HTMLSpanElement>, "ref">, "className"> & {
|
|
39
268
|
className?: string | undefined;
|
|
40
269
|
} & React_2.RefAttributes<HTMLSpanElement>>;
|
|
41
|
-
Panel: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
270
|
+
Panel: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<TabsPanelProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
42
271
|
className?: string | undefined;
|
|
43
272
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
44
273
|
List: React_2.ForwardRefExoticComponent<ListProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
45
274
|
};
|
|
46
275
|
|
|
276
|
+
export declare namespace Tabs_2 {
|
|
277
|
+
export {
|
|
278
|
+
TabsRoot as Root,
|
|
279
|
+
TabsTab as Tab,
|
|
280
|
+
TabsIndicator as Indicator,
|
|
281
|
+
TabsPanel as Panel,
|
|
282
|
+
TabsList as List
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* A visual indicator that can be styled to match the position of the currently active tab.
|
|
288
|
+
* Renders a `<span>` element.
|
|
289
|
+
*
|
|
290
|
+
* Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)
|
|
291
|
+
*/
|
|
292
|
+
export declare const TabsIndicator: React_2.ForwardRefExoticComponent<Omit<TabsIndicatorProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
293
|
+
|
|
294
|
+
export declare namespace TabsIndicator {
|
|
295
|
+
export type State = TabsIndicatorState;
|
|
296
|
+
export type Props = TabsIndicatorProps;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export declare interface TabsIndicatorProps extends BaseUIComponentProps<'span', TabsIndicatorState> {
|
|
300
|
+
/**
|
|
301
|
+
* Whether to render itself before React hydrates.
|
|
302
|
+
* This minimizes the time that the indicator isn't visible after server-side rendering.
|
|
303
|
+
* @default false
|
|
304
|
+
*/
|
|
305
|
+
renderBeforeHydration?: boolean | undefined;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export declare interface TabsIndicatorState extends TabsRootState {
|
|
309
|
+
/**
|
|
310
|
+
* The active tab position.
|
|
311
|
+
*/
|
|
312
|
+
activeTabPosition: TabsTab.Position | null;
|
|
313
|
+
/**
|
|
314
|
+
* The active tab size.
|
|
315
|
+
*/
|
|
316
|
+
activeTabSize: TabsTab.Size | null;
|
|
317
|
+
/**
|
|
318
|
+
* The component orientation.
|
|
319
|
+
*/
|
|
320
|
+
orientation: TabsRoot.Orientation;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Groups the individual tab buttons.
|
|
325
|
+
* Renders a `<div>` element.
|
|
326
|
+
*
|
|
327
|
+
* Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)
|
|
328
|
+
*/
|
|
329
|
+
export declare const TabsList: React_2.ForwardRefExoticComponent<Omit<TabsListProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
330
|
+
|
|
331
|
+
export declare namespace TabsList {
|
|
332
|
+
export type State = TabsListState;
|
|
333
|
+
export type Props = TabsListProps;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export declare interface TabsListProps extends BaseUIComponentProps<'div', TabsListState> {
|
|
337
|
+
/**
|
|
338
|
+
* Whether to automatically change the active tab on arrow key focus.
|
|
339
|
+
* Otherwise, tabs will be activated using <kbd>Enter</kbd> or <kbd>Space</kbd> key press.
|
|
340
|
+
* @default false
|
|
341
|
+
*/
|
|
342
|
+
activateOnFocus?: boolean | undefined;
|
|
343
|
+
/**
|
|
344
|
+
* Whether to loop keyboard focus back to the first item
|
|
345
|
+
* when the end of the list is reached while using the arrow keys.
|
|
346
|
+
* @default true
|
|
347
|
+
*/
|
|
348
|
+
loopFocus?: boolean | undefined;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export declare interface TabsListState extends TabsRootState {}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* A panel displayed when the corresponding tab is active.
|
|
355
|
+
* Renders a `<div>` element.
|
|
356
|
+
*
|
|
357
|
+
* Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)
|
|
358
|
+
*/
|
|
359
|
+
export declare const TabsPanel: React_2.ForwardRefExoticComponent<Omit<TabsPanelProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
360
|
+
|
|
361
|
+
export declare namespace TabsPanel {
|
|
362
|
+
export type Metadata = TabsPanelMetadata;
|
|
363
|
+
export type State = TabsPanelState;
|
|
364
|
+
export type Props = TabsPanelProps;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export declare interface TabsPanelMetadata {
|
|
368
|
+
id?: string | undefined;
|
|
369
|
+
value: TabsTab.Value;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export declare interface TabsPanelProps extends BaseUIComponentProps<'div', TabsPanelState> {
|
|
373
|
+
/**
|
|
374
|
+
* The value of the TabPanel. It will be shown when the Tab with the corresponding value is active.
|
|
375
|
+
*/
|
|
376
|
+
value: TabsTab.Value;
|
|
377
|
+
/**
|
|
378
|
+
* Whether to keep the HTML element in the DOM while the panel is hidden.
|
|
379
|
+
* @default false
|
|
380
|
+
*/
|
|
381
|
+
keepMounted?: boolean | undefined;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export declare interface TabsPanelState extends TabsRootState {
|
|
385
|
+
/**
|
|
386
|
+
* Whether the component is hidden.
|
|
387
|
+
*/
|
|
388
|
+
hidden: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* The transition status of the component.
|
|
391
|
+
*/
|
|
392
|
+
transitionStatus: TransitionStatus;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Groups the tabs and the corresponding panels.
|
|
397
|
+
* Renders a `<div>` element.
|
|
398
|
+
*
|
|
399
|
+
* Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)
|
|
400
|
+
*/
|
|
401
|
+
export declare const TabsRoot: React_2.ForwardRefExoticComponent<Omit<TabsRootProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
402
|
+
|
|
403
|
+
export declare namespace TabsRoot {
|
|
404
|
+
export type State = TabsRootState;
|
|
405
|
+
export type Props = TabsRootProps;
|
|
406
|
+
export type Orientation = TabsRootOrientation;
|
|
407
|
+
export type ChangeEventReason = TabsRootChangeEventReason;
|
|
408
|
+
export type ChangeEventDetails = TabsRootChangeEventDetails;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export declare type TabsRootChangeEventDetails = BaseUIChangeEventDetails<TabsRoot.ChangeEventReason, {
|
|
412
|
+
activationDirection: TabsTab.ActivationDirection;
|
|
413
|
+
}>;
|
|
414
|
+
|
|
415
|
+
export declare type TabsRootChangeEventReason = typeof REASONS.none | typeof REASONS.disabled | typeof REASONS.missing | typeof REASONS.initial;
|
|
416
|
+
|
|
417
|
+
export declare type TabsRootOrientation = Orientation;
|
|
418
|
+
|
|
419
|
+
export declare interface TabsRootProps extends BaseUIComponentProps<'div', TabsRootState> {
|
|
420
|
+
/**
|
|
421
|
+
* The value of the currently active `Tab`. Use when the component is controlled.
|
|
422
|
+
* When the value is `null`, no Tab will be active.
|
|
423
|
+
*/
|
|
424
|
+
value?: TabsTab.Value | undefined;
|
|
425
|
+
/**
|
|
426
|
+
* The default value. Use when the component is not controlled.
|
|
427
|
+
* When the value is `null`, no Tab will be active.
|
|
428
|
+
* @default 0
|
|
429
|
+
*/
|
|
430
|
+
defaultValue?: TabsTab.Value | undefined;
|
|
431
|
+
/**
|
|
432
|
+
* The component orientation (layout flow direction).
|
|
433
|
+
* @default 'horizontal'
|
|
434
|
+
*/
|
|
435
|
+
orientation?: TabsRoot.Orientation | undefined;
|
|
436
|
+
/**
|
|
437
|
+
* Callback invoked when new value is being set.
|
|
438
|
+
*
|
|
439
|
+
* The event `reason` is `'none'` for user-initiated changes, such as a click
|
|
440
|
+
* or keyboard navigation; `'initial'` for the first automatic selection or
|
|
441
|
+
* fallback in uncontrolled roots when `defaultValue` is omitted or
|
|
442
|
+
* `undefined`, including when the implicit initial value is disabled or
|
|
443
|
+
* missing; `'disabled'` for automatic fallback when the selected tab becomes
|
|
444
|
+
* disabled in uncontrolled roots; or `'missing'` for automatic fallback when
|
|
445
|
+
* the selected tab is removed, or when an explicit `defaultValue` never
|
|
446
|
+
* matches a mounted tab in uncontrolled roots.
|
|
447
|
+
*
|
|
448
|
+
* For automatic changes, the selected value can be `null` when no enabled Tab
|
|
449
|
+
* is available as a fallback.
|
|
450
|
+
*
|
|
451
|
+
* Automatic changes cannot be canceled; calling `eventDetails.cancel()` for
|
|
452
|
+
* `'initial'`, `'disabled'`, or `'missing'` has no effect.
|
|
453
|
+
*/
|
|
454
|
+
onValueChange?: ((value: TabsTab.Value, eventDetails: TabsRoot.ChangeEventDetails) => void) | undefined;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export declare interface TabsRootState {
|
|
458
|
+
/**
|
|
459
|
+
* The component orientation.
|
|
460
|
+
*/
|
|
461
|
+
orientation: TabsRoot.Orientation;
|
|
462
|
+
/**
|
|
463
|
+
* The direction used for tab activation.
|
|
464
|
+
*/
|
|
465
|
+
tabActivationDirection: TabsTab.ActivationDirection;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* An individual interactive tab button that toggles the corresponding panel.
|
|
470
|
+
* Renders a `<button>` element.
|
|
471
|
+
*
|
|
472
|
+
* Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)
|
|
473
|
+
*/
|
|
474
|
+
export declare const TabsTab: React_2.ForwardRefExoticComponent<Omit<TabsTabProps, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
475
|
+
|
|
476
|
+
export declare namespace TabsTab {
|
|
477
|
+
export type Value = TabsTabValue;
|
|
478
|
+
export type ActivationDirection = TabsTabActivationDirection;
|
|
479
|
+
export type Position = TabsTabPosition;
|
|
480
|
+
export type Size = TabsTabSize;
|
|
481
|
+
export type Metadata = TabsTabMetadata;
|
|
482
|
+
export type State = TabsTabState;
|
|
483
|
+
export type Props = TabsTabProps;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export declare type TabsTabActivationDirection = 'left' | 'right' | 'up' | 'down' | 'none';
|
|
487
|
+
|
|
488
|
+
export declare interface TabsTabMetadata {
|
|
489
|
+
disabled: boolean;
|
|
490
|
+
id: string | undefined;
|
|
491
|
+
value: TabsTab.Value | undefined;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export declare interface TabsTabPosition {
|
|
495
|
+
left: number;
|
|
496
|
+
right: number;
|
|
497
|
+
top: number;
|
|
498
|
+
bottom: number;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export declare interface TabsTabProps extends NativeButtonProps, BaseUIComponentProps<'button', TabsTabState> {
|
|
502
|
+
/**
|
|
503
|
+
* The value of the Tab.
|
|
504
|
+
*/
|
|
505
|
+
value: TabsTab.Value;
|
|
506
|
+
/**
|
|
507
|
+
* Whether the Tab is disabled.
|
|
508
|
+
*
|
|
509
|
+
* If a first Tab on a `<Tabs.List>` is disabled, it won't initially be selected.
|
|
510
|
+
* Instead, the next enabled Tab will be selected.
|
|
511
|
+
* However, it does not work like this during server-side rendering, as it is not known
|
|
512
|
+
* during pre-rendering which Tabs are disabled.
|
|
513
|
+
* To work around it, ensure that `defaultValue` or `value` on `<Tabs.Root>` is set to an enabled Tab's value.
|
|
514
|
+
*/
|
|
515
|
+
disabled?: boolean | undefined;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export declare interface TabsTabSize {
|
|
519
|
+
width: number;
|
|
520
|
+
height: number;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export declare interface TabsTabState {
|
|
524
|
+
/**
|
|
525
|
+
* Whether the component should ignore user interaction.
|
|
526
|
+
*/
|
|
527
|
+
disabled: boolean;
|
|
528
|
+
/**
|
|
529
|
+
* Whether the component is active.
|
|
530
|
+
*/
|
|
531
|
+
active: boolean;
|
|
532
|
+
/**
|
|
533
|
+
* The component orientation.
|
|
534
|
+
*/
|
|
535
|
+
orientation: TabsRoot.Orientation;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export declare type TabsTabValue = any | null;
|
|
539
|
+
|
|
540
|
+
declare const trackPress: "track-press";
|
|
541
|
+
|
|
542
|
+
declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
|
|
543
|
+
|
|
544
|
+
declare const triggerFocus: "trigger-focus";
|
|
545
|
+
|
|
546
|
+
declare const triggerHover: "trigger-hover";
|
|
547
|
+
|
|
548
|
+
declare const triggerPress: "trigger-press";
|
|
549
|
+
|
|
550
|
+
declare const wheel: "wheel";
|
|
551
|
+
|
|
552
|
+
declare const windowResize: "window-resize";
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Adds a `preventBaseUIHandler` method to all event handlers.
|
|
556
|
+
*/
|
|
557
|
+
declare type WithBaseUIEvent<T> = { [K in keyof T]: WithPreventBaseUIHandler<T[K]> };
|
|
558
|
+
|
|
559
|
+
declare type WithPreventBaseUIHandler<T> = T extends ((event: infer E) => any) ? E extends React_2.SyntheticEvent<Element, Event> ? (event: BaseUIEvent<E>) => ReturnType<T> : T : T extends undefined ? undefined : T;
|
|
560
|
+
|
|
47
561
|
declare type WithStringClassName<P> = Omit<P, 'className'> & {
|
|
48
562
|
className?: string;
|
|
49
563
|
};
|
|
50
564
|
|
|
51
|
-
|
|
52
|
-
export * from "@base-ui/react/tabs";
|
|
53
|
-
|
|
54
565
|
export { }
|