@sanity/ui 4.0.0-next.0 → 4.0.0-next.3
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/{_chunks/getScopedTheme.js → getScopedTheme-CqaSCfTH.js} +1 -1
- package/dist/getScopedTheme-CqaSCfTH.js.map +1 -0
- package/dist/index.d.ts +1105 -48
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3580 -352
- package/dist/index.js.map +1 -1
- package/dist/{_chunks/refractor.js → refractor-CC48DwHi.js} +2 -2
- package/dist/refractor-CC48DwHi.js.map +1 -0
- package/dist/{_chunks/rgba.d.cts → rgba-LmTDhX0u.d.ts} +1 -1
- package/dist/rgba-LmTDhX0u.d.ts.map +1 -0
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -1
- package/package.json +7 -30
- package/dist/_chunks/getScopedTheme.cjs +0 -4043
- package/dist/_chunks/getScopedTheme.cjs.map +0 -1
- package/dist/_chunks/getScopedTheme.js.map +0 -1
- package/dist/_chunks/portalProvider.cjs +0 -3750
- package/dist/_chunks/portalProvider.cjs.map +0 -1
- package/dist/_chunks/portalProvider.d.cts +0 -1067
- package/dist/_chunks/portalProvider.d.cts.map +0 -1
- package/dist/_chunks/portalProvider.d.ts +0 -1067
- package/dist/_chunks/portalProvider.d.ts.map +0 -1
- package/dist/_chunks/portalProvider.js +0 -3300
- package/dist/_chunks/portalProvider.js.map +0 -1
- package/dist/_chunks/refractor.cjs +0 -18
- package/dist/_chunks/refractor.cjs.map +0 -1
- package/dist/_chunks/refractor.js.map +0 -1
- package/dist/_chunks/rgba.d.cts.map +0 -1
- package/dist/_chunks/rgba.d.ts +0 -929
- package/dist/_chunks/rgba.d.ts.map +0 -1
- package/dist/_visual-editing.cjs +0 -4
- package/dist/_visual-editing.d.cts +0 -2
- package/dist/_visual-editing.d.ts +0 -2
- package/dist/_visual-editing.js +0 -3
- package/dist/index.cjs +0 -3007
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -1275
- package/dist/index.d.cts.map +0 -1
- package/dist/theme.cjs +0 -54
- package/dist/theme.cjs.map +0 -1
- package/dist/theme.d.cts +0 -278
- package/dist/theme.d.cts.map +0 -1
package/dist/index.d.cts
DELETED
|
@@ -1,1275 +0,0 @@
|
|
|
1
|
-
import { A as ThemeColorMutedTone, At as ThemeColorSchemeKey$1, B as ThemeColorBase, C as ThemeColorSpotKey, D as ThemeColorSelectableState, Dt as ThemeColorCardToneKey, E as ThemeColorSelectable, F as ThemeColorCardState, H as ThemeColorToneKey, I as ThemeColorButton, L as ThemeColorButtonState, M as ThemeColorInputState, Mt as ThemeColorStateToneKey, N as ThemeColorInputStates, O as ThemeColorSelectableStates, P as ThemeColorCard, R as ThemeColorButtonStates, S as ThemeColorSpot, T as ThemeColorSolidTone, U as ThemeColorGenericState, V as ThemeColorName, W as ThemeAvatar, b as ThemeColorScheme, d as ThemeColorBuilderOpts, g as Theme$1, j as ThemeColorInput, k as ThemeColorMuted, m as RootTheme$1, pt as CSSObject, u as PartialThemeColorBuilderOpts, v as ThemeInput, w as ThemeColorSolid, wt as ThemeColorAvatarColorKey, x as ThemeColorSchemes, xt as ThemeFontWeightKey$1, y as ThemeColor, z as ThemeColorButtonTones } from "./_chunks/rgba.cjs";
|
|
2
|
-
import { $ as BoxOwnProps, $t as GridAutoRows, A as FlexOwnProps, An as createColorTheme, At as TagType, B as containsOrEqualsElement, Bt as ResponsiveMarginProps, C as StackProps, Cn as ThemeFontKey, Ct as MenuDivider, D as GridOwnProps, Dn as ThemeFonts, Dt as ElementType, E as Grid, En as ThemeFontWeightKey, Et as ComponentType, F as Button, Fn as rgbToHex, Ft as ResponsiveBoxProps, G as isHTMLSelectElement, Gt as GridItemColumn, H as isHTMLButtonElement, Ht as ResponsiveRadiusProps, I as ButtonOwnProps, In as rgbToHsl, It as ResponsiveFlexItemProps, J as TabListProps, Jt as GridItemRow, K as isHTMLTextAreaElement, Kt as GridItemColumnEnd, L as ButtonProps, Ln as rgba, Lt as ResponsiveFlexProps, M as Card, Mn as hslToRgb, Mt as MenuProps, N as CardOwnProps, Nn as multiply, Nt as Delay, O as GridProps, On as ThemeLayer, Ot as EmptyProps, P as CardProps, Pn as parseColor, Pt as ResponsiveBorderProps, Q as Box, Qt as GridAutoFlow, R as usePrefersDark, Rn as screen, Rt as ResponsiveGridItemProps, S as StackOwnProps, Sn as ThemeFont, St as CardTone, T as SpinnerProps, Tn as ThemeFontWeight, Tt as Assign, U as isHTMLElement, Ut as ResponsiveShadowProps, V as isHTMLAnchorElement, Vt as ResponsivePaddingProps, W as isHTMLInputElement, Wt as ResponsiveWidthProps, X as InlineOwnProps, Xt as GridItemRowStart, Y as Inline, Yt as GridItemRowEnd, Z as InlineProps, Zt as GridAutoCols, _ as Text, _n as Styles, _t as PopoverWidth, a as LayerProvider, an as BoxDisplay, at as ButtonTone, b as TextAlign, bn as ThemeColorSchemeKey, bt as PopoverMargins, c as useTheme_v2, cn as BoxSizing, ct as MenuItemOwnProps, d as Tooltip, dn as Radius, dt as MenuGroupOwnProps, en as FlexAlign, et as BoxProps, f as TooltipProps, fn as BaseTheme, ft as MenuGroupProps, g as TextInputType, gn as RootTheme, gt as PopoverUpdateCallback, h as TextInputProps, hn as RGB, ht as PopoverProps, i as PortalProps, in as FlexWrap, it as ButtonTextAlign, j as FlexProps, jn as hexToRgb, jt as Menu, k as Flex, kn as ThemeShadow, kt as Props, l as ThemeProvider, ln as Hotkeys, lt as MenuItemProps, m as TextInputClearButtonProps, mn as HSL, mt as Popover, n as PortalProviderProps, nn as FlexJustify, nt as TabProps, o as LayerProviderProps, on as BoxHeight, ot as ButtonWidth, p as TextInput, pn as BoxShadow, pt as SelectableTone, q as TabList, qt as GridItemColumnStart, r as Portal, rn as FlexValue, rt as ButtonMode, s as useTheme, sn as BoxOverflow, st as MenuItem, t as PortalProvider, tn as FlexDirection, tt as Tab, u as ThemeProviderProps, un as HotkeysProps, ut as MenuGroup, v as TextOwnProps, vn as Theme, vt as Layer, w as Spinner, wn as ThemeFontSize, wt as MenuDividerProps, x as Stack, xn as ThemeColorSyntax, xt as Placement, y as TextProps, yn as ThemeColorButtonModeKey, yt as LayerProps, z as _isEnterToClickElement, zn as studioTheme, zt as ResponsiveGridProps } from "./_chunks/portalProvider.cjs";
|
|
3
|
-
import { Component, ElementType as ElementType$1, HTMLProps, PropsWithChildren, ReactNode, Ref } from "react";
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
type AutocompleteOpenButtonProps = ButtonOwnProps & Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'ref'>;
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
interface BaseAutocompleteOption {
|
|
12
|
-
value: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
interface AutocompleteState {
|
|
18
|
-
activeValue: string | null;
|
|
19
|
-
focused: boolean;
|
|
20
|
-
listFocused: boolean;
|
|
21
|
-
query: string | null;
|
|
22
|
-
value: string | null;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
interface AutocompleteRootBlurMsg {
|
|
28
|
-
type: 'root/blur';
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
interface AutocompleteRootClearMsg {
|
|
34
|
-
type: 'root/clear';
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @internal
|
|
38
|
-
*/
|
|
39
|
-
interface AutocompleteRootEscapeMsg {
|
|
40
|
-
type: 'root/escape';
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
interface AutocompleteRootOpenMsg {
|
|
46
|
-
type: 'root/open';
|
|
47
|
-
query: string | null;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
*/
|
|
52
|
-
interface AutocompleteRootSetActiveValueMsg {
|
|
53
|
-
type: 'root/setActiveValue';
|
|
54
|
-
value: string;
|
|
55
|
-
listFocused?: boolean;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
interface AutocompleteRootSetListFocusedMsg {
|
|
61
|
-
type: 'root/setListFocused';
|
|
62
|
-
listFocused: boolean;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
interface AutocompleteInputChangeMsg {
|
|
68
|
-
type: 'input/change';
|
|
69
|
-
query: string | null;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @internal
|
|
73
|
-
*/
|
|
74
|
-
interface AutocompleteInputFoocusMsg {
|
|
75
|
-
type: 'input/focus';
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @internal
|
|
79
|
-
*/
|
|
80
|
-
interface AutocompleteValueChangeMsg {
|
|
81
|
-
type: 'value/change';
|
|
82
|
-
value: string | null;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
type AutocompleteMsg = AutocompleteRootBlurMsg | AutocompleteRootClearMsg | AutocompleteRootEscapeMsg | AutocompleteRootOpenMsg | AutocompleteRootSetActiveValueMsg | AutocompleteRootSetListFocusedMsg | AutocompleteInputChangeMsg | AutocompleteInputFoocusMsg | AutocompleteValueChangeMsg;
|
|
88
|
-
/**
|
|
89
|
-
* @public
|
|
90
|
-
*/
|
|
91
|
-
interface AutocompleteProps<Option extends BaseAutocompleteOption = BaseAutocompleteOption> {
|
|
92
|
-
border?: boolean;
|
|
93
|
-
customValidity?: string;
|
|
94
|
-
filterOption?: (query: string, option: Option) => boolean;
|
|
95
|
-
fontSize?: number | number[];
|
|
96
|
-
icon?: ElementType$1 | ReactNode;
|
|
97
|
-
id: string;
|
|
98
|
-
/** @beta */
|
|
99
|
-
listBox?: BoxProps;
|
|
100
|
-
loading?: boolean;
|
|
101
|
-
onChange?: (value: string) => void;
|
|
102
|
-
onQueryChange?: (query: string | null) => void;
|
|
103
|
-
onSelect?: (value: string) => void;
|
|
104
|
-
/** @beta */
|
|
105
|
-
openButton?: boolean | AutocompleteOpenButtonProps;
|
|
106
|
-
/** @beta */
|
|
107
|
-
openOnFocus?: boolean;
|
|
108
|
-
/** The options to render. */
|
|
109
|
-
options?: Option[];
|
|
110
|
-
padding?: number | number[];
|
|
111
|
-
popover?: Omit<PopoverProps, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'> & Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'ref' | 'width'>;
|
|
112
|
-
prefix?: ReactNode;
|
|
113
|
-
radius?: Radius | Radius[];
|
|
114
|
-
/** @beta */
|
|
115
|
-
relatedElements?: HTMLElement[];
|
|
116
|
-
/** The callback function for rendering each option. */
|
|
117
|
-
renderOption?: (option: Option) => React.JSX.Element;
|
|
118
|
-
/** @beta */
|
|
119
|
-
renderPopover?: (props: {
|
|
120
|
-
content: React.JSX.Element | null;
|
|
121
|
-
hidden: boolean;
|
|
122
|
-
inputElement: HTMLInputElement | null;
|
|
123
|
-
onMouseEnter: () => void;
|
|
124
|
-
onMouseLeave: () => void;
|
|
125
|
-
}, ref: Ref<HTMLDivElement>) => ReactNode;
|
|
126
|
-
renderValue?: (value: string, option?: Option) => string;
|
|
127
|
-
suffix?: ReactNode;
|
|
128
|
-
/** The current value. */
|
|
129
|
-
value?: string;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* The Autocomplete component is typically used for search components.
|
|
133
|
-
* It consists of a text input for writing a query, and properties for rendering suggestions.
|
|
134
|
-
*
|
|
135
|
-
* @public
|
|
136
|
-
*/
|
|
137
|
-
declare const Autocomplete: <Option extends BaseAutocompleteOption>(props: AutocompleteProps<Option> & Omit<HTMLProps<HTMLInputElement>, 'aria-activedescendant' | 'aria-autocomplete' | 'aria-expanded' | 'aria-owns' | 'as' | 'autoCapitalize' | 'autoComplete' | 'autoCorrect' | 'id' | 'inputMode' | 'onChange' | 'onSelect' | 'popover' | 'prefix' | 'ref' | 'role' | 'spellCheck' | 'type' | 'value'> & {
|
|
138
|
-
ref?: Ref<HTMLInputElement>;
|
|
139
|
-
}) => React.JSX.Element;
|
|
140
|
-
/**
|
|
141
|
-
* @beta
|
|
142
|
-
*/
|
|
143
|
-
interface BreadcrumbsProps {
|
|
144
|
-
maxLength?: number;
|
|
145
|
-
separator?: React.ReactNode;
|
|
146
|
-
gap?: number | number[];
|
|
147
|
-
/**
|
|
148
|
-
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
149
|
-
*/
|
|
150
|
-
space?: number | number[];
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* @beta
|
|
154
|
-
*/
|
|
155
|
-
declare const Breadcrumbs: import("react").ForwardRefExoticComponent<BreadcrumbsProps & Omit<import("react").HTMLProps<HTMLOListElement>, "as" | "ref" | "type"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
156
|
-
/**
|
|
157
|
-
* @public
|
|
158
|
-
*/
|
|
159
|
-
type DialogPosition = 'absolute' | 'fixed';
|
|
160
|
-
/**
|
|
161
|
-
* @public
|
|
162
|
-
*/
|
|
163
|
-
interface DialogProps extends ResponsivePaddingProps, ResponsiveWidthProps {
|
|
164
|
-
/**
|
|
165
|
-
* @beta
|
|
166
|
-
*/
|
|
167
|
-
__unstable_autoFocus?: boolean;
|
|
168
|
-
/**
|
|
169
|
-
* @beta
|
|
170
|
-
*/
|
|
171
|
-
__unstable_hideCloseButton?: boolean;
|
|
172
|
-
cardRadius?: Radius | Radius[];
|
|
173
|
-
cardShadow?: number | number[];
|
|
174
|
-
contentRef?: React.ForwardedRef<HTMLDivElement>;
|
|
175
|
-
footer?: React.ReactNode;
|
|
176
|
-
header?: React.ReactNode;
|
|
177
|
-
id: string;
|
|
178
|
-
/** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
|
|
179
|
-
onActivate?: LayerProps['onActivate'];
|
|
180
|
-
onClickOutside?: () => void;
|
|
181
|
-
onClose?: () => void;
|
|
182
|
-
portal?: string;
|
|
183
|
-
position?: DialogPosition | DialogPosition[];
|
|
184
|
-
scheme?: ThemeColorSchemeKey$1;
|
|
185
|
-
zOffset?: number | number[];
|
|
186
|
-
/**
|
|
187
|
-
* Whether the dialog should animate in on mount.
|
|
188
|
-
*
|
|
189
|
-
* @beta
|
|
190
|
-
* @defaultValue false
|
|
191
|
-
*/
|
|
192
|
-
animate?: boolean;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* The Dialog component.
|
|
196
|
-
*
|
|
197
|
-
* @public
|
|
198
|
-
*/
|
|
199
|
-
declare const Dialog: import("react").ForwardRefExoticComponent<Omit<DialogProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "id" | "width">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
200
|
-
/**
|
|
201
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
202
|
-
* @beta
|
|
203
|
-
*/
|
|
204
|
-
interface DialogContextValue {
|
|
205
|
-
version: 0.0;
|
|
206
|
-
position?: DialogPosition | DialogPosition[];
|
|
207
|
-
zOffset?: number | number[];
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* @internal
|
|
211
|
-
*/
|
|
212
|
-
declare const DialogContext: import("react").Context<DialogContextValue>;
|
|
213
|
-
/**
|
|
214
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
215
|
-
* @beta
|
|
216
|
-
*/
|
|
217
|
-
interface DialogProviderProps {
|
|
218
|
-
children?: React.ReactNode;
|
|
219
|
-
position?: DialogPosition | DialogPosition[];
|
|
220
|
-
zOffset?: number | number[];
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
224
|
-
* @beta
|
|
225
|
-
*/
|
|
226
|
-
declare function DialogProvider(props: DialogProviderProps): React.JSX.Element;
|
|
227
|
-
/**
|
|
228
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
229
|
-
* @beta
|
|
230
|
-
*/
|
|
231
|
-
declare function useDialog(): DialogContextValue;
|
|
232
|
-
/**
|
|
233
|
-
* @public
|
|
234
|
-
*/
|
|
235
|
-
interface MenuButtonProps {
|
|
236
|
-
/**
|
|
237
|
-
* @beta Do not use in production.
|
|
238
|
-
*/
|
|
239
|
-
__unstable_disableRestoreFocusOnClose?: boolean;
|
|
240
|
-
/**
|
|
241
|
-
* @deprecated Use `popover={{boundaryElement: element}}` instead.
|
|
242
|
-
*/
|
|
243
|
-
boundaryElement?: HTMLElement;
|
|
244
|
-
button: React.JSX.Element;
|
|
245
|
-
id: string;
|
|
246
|
-
menu?: React.JSX.Element;
|
|
247
|
-
onClose?: () => void;
|
|
248
|
-
onOpen?: () => void;
|
|
249
|
-
/**
|
|
250
|
-
* @deprecated Use `popover={{placement: 'top'}}` instead.
|
|
251
|
-
*/
|
|
252
|
-
placement?: Placement;
|
|
253
|
-
popover?: Omit<PopoverProps, 'content' | 'open'>;
|
|
254
|
-
/**
|
|
255
|
-
* @deprecated Use `popover={{scheme: 'dark'}}` instead.
|
|
256
|
-
*/
|
|
257
|
-
popoverScheme?: ThemeColorSchemeKey$1;
|
|
258
|
-
/**
|
|
259
|
-
* @deprecated Use `popover={{radius: 2}}` instead.
|
|
260
|
-
*/
|
|
261
|
-
popoverRadius?: Radius | Radius[];
|
|
262
|
-
/**
|
|
263
|
-
* @beta Do not use in production.
|
|
264
|
-
* @deprecated Use `popover={{portal: true}}` instead.
|
|
265
|
-
*/
|
|
266
|
-
portal?: boolean;
|
|
267
|
-
/**
|
|
268
|
-
* @deprecated Use `popover={{preventOverflow: true}}` instead.
|
|
269
|
-
*/
|
|
270
|
-
preventOverflow?: boolean;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
|
|
274
|
-
*
|
|
275
|
-
* @public
|
|
276
|
-
*/
|
|
277
|
-
declare const MenuButton: import("react").ForwardRefExoticComponent<MenuButtonProps & import("react").RefAttributes<HTMLButtonElement | null>>;
|
|
278
|
-
/**
|
|
279
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
280
|
-
* @beta
|
|
281
|
-
*/
|
|
282
|
-
interface SkeletonProps extends ResponsiveRadiusProps, Omit<BoxOwnProps, 'children'> {
|
|
283
|
-
animated?: boolean;
|
|
284
|
-
delay?: number;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
288
|
-
* @beta
|
|
289
|
-
*/
|
|
290
|
-
declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<SkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "height">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
291
|
-
/**
|
|
292
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
293
|
-
* @beta
|
|
294
|
-
*/
|
|
295
|
-
interface TextSkeletonProps extends SkeletonProps {
|
|
296
|
-
size?: number | number[];
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
300
|
-
* @beta
|
|
301
|
-
*/
|
|
302
|
-
interface LabelSkeletonProps extends SkeletonProps {
|
|
303
|
-
size?: number | number[];
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
307
|
-
* @beta
|
|
308
|
-
*/
|
|
309
|
-
interface HeadingSkeletonProps extends SkeletonProps {
|
|
310
|
-
size?: number | number[];
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
314
|
-
* @beta
|
|
315
|
-
*/
|
|
316
|
-
interface CodeSkeletonProps extends SkeletonProps {
|
|
317
|
-
size?: number | number[];
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
321
|
-
* @beta
|
|
322
|
-
*/
|
|
323
|
-
declare const TextSkeleton: import("react").ForwardRefExoticComponent<Omit<TextSkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "children" | "height" | "size">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
324
|
-
/**
|
|
325
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
326
|
-
* @beta
|
|
327
|
-
*/
|
|
328
|
-
declare const LabelSkeleton: import("react").ForwardRefExoticComponent<Omit<LabelSkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "children" | "height" | "size">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
329
|
-
/**
|
|
330
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
331
|
-
* @beta
|
|
332
|
-
*/
|
|
333
|
-
declare const HeadingSkeleton: import("react").ForwardRefExoticComponent<Omit<HeadingSkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "children" | "height" | "size">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
334
|
-
/**
|
|
335
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
336
|
-
* @beta
|
|
337
|
-
*/
|
|
338
|
-
declare const CodeSkeleton: import("react").ForwardRefExoticComponent<Omit<CodeSkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "children" | "height" | "size">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
339
|
-
/**
|
|
340
|
-
* @public
|
|
341
|
-
*/
|
|
342
|
-
interface TabPanelProps extends BoxOwnProps {
|
|
343
|
-
/**
|
|
344
|
-
* The `id` of the correlating `Tab` component.
|
|
345
|
-
*/
|
|
346
|
-
'aria-labelledby': string;
|
|
347
|
-
'id': string;
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* @public
|
|
351
|
-
*/
|
|
352
|
-
declare const TabPanel: import("react").ForwardRefExoticComponent<Omit<TabPanelProps & Omit<import("react").HTMLProps<HTMLDivElement>, "aria-labelledby" | "as" | "id" | "role">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
353
|
-
/**
|
|
354
|
-
* @public
|
|
355
|
-
*/
|
|
356
|
-
interface ToastProps {
|
|
357
|
-
closable?: boolean;
|
|
358
|
-
description?: React.ReactNode;
|
|
359
|
-
onClose: () => void;
|
|
360
|
-
radius?: number | number[];
|
|
361
|
-
title?: React.ReactNode;
|
|
362
|
-
status?: 'error' | 'warning' | 'success' | 'info';
|
|
363
|
-
duration?: number;
|
|
364
|
-
updatedAt?: number;
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* The `Toast` component gives feedback to users when an action has taken place.
|
|
368
|
-
*
|
|
369
|
-
* Toasts can be closed with a close button, or auto-dismiss after a certain timeout.
|
|
370
|
-
*
|
|
371
|
-
* @public
|
|
372
|
-
*/
|
|
373
|
-
declare function Toast(props: ToastProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'ref' | 'title' | 'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'>): React.JSX.Element;
|
|
374
|
-
/**
|
|
375
|
-
* @public
|
|
376
|
-
*/
|
|
377
|
-
interface ToastLayerProps {
|
|
378
|
-
children: React.ReactNode;
|
|
379
|
-
padding?: number | number[];
|
|
380
|
-
paddingX?: number | number[];
|
|
381
|
-
paddingY?: number | number[];
|
|
382
|
-
gap?: number | number[];
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* @public
|
|
386
|
-
*/
|
|
387
|
-
interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
|
|
388
|
-
children?: React.ReactNode;
|
|
389
|
-
zOffset?: number | number[];
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* @public
|
|
393
|
-
*/
|
|
394
|
-
declare function ToastProvider(props: ToastProviderProps): React.JSX.Element;
|
|
395
|
-
/**
|
|
396
|
-
* @public
|
|
397
|
-
*/
|
|
398
|
-
interface ToastParams {
|
|
399
|
-
closable?: boolean;
|
|
400
|
-
description?: React.ReactNode;
|
|
401
|
-
duration?: number;
|
|
402
|
-
id?: string;
|
|
403
|
-
onClose?: () => void;
|
|
404
|
-
title?: React.ReactNode;
|
|
405
|
-
status?: 'error' | 'warning' | 'success' | 'info';
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* @public
|
|
409
|
-
*/
|
|
410
|
-
interface ToastContextValue {
|
|
411
|
-
version: 0.0;
|
|
412
|
-
/**
|
|
413
|
-
* Creates or updates a toast notification.
|
|
414
|
-
* If a toast with the same ID already exists, it will be updated.
|
|
415
|
-
* If an ID is not provided, a random one will be generated.
|
|
416
|
-
* The returned ID can be used to programatically update a toast.
|
|
417
|
-
*/
|
|
418
|
-
push: (params: ToastParams) => string;
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* @public
|
|
422
|
-
*/
|
|
423
|
-
declare function useToast(): ToastContextValue;
|
|
424
|
-
/**
|
|
425
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
426
|
-
* @beta
|
|
427
|
-
*/
|
|
428
|
-
interface TreeProps {
|
|
429
|
-
gap?: number | number[];
|
|
430
|
-
/**
|
|
431
|
-
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
432
|
-
*/
|
|
433
|
-
space?: number | number[];
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
437
|
-
* @beta
|
|
438
|
-
*/
|
|
439
|
-
declare const Tree: import("react").ForwardRefExoticComponent<TreeProps & Omit<import("react").HTMLProps<HTMLUListElement>, "align" | "as" | "height" | "ref" | "role" | "wrap"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
440
|
-
/**
|
|
441
|
-
* @beta
|
|
442
|
-
*/
|
|
443
|
-
interface TreeItemProps {
|
|
444
|
-
expanded?: boolean;
|
|
445
|
-
fontSize?: number | number[];
|
|
446
|
-
icon?: React.ElementType;
|
|
447
|
-
/**
|
|
448
|
-
* Allows passing a custom element type to the link component
|
|
449
|
-
*/
|
|
450
|
-
linkAs?: ElementType;
|
|
451
|
-
/**
|
|
452
|
-
* Additional props for the link element that is rendered when `href` is set — e.g. `next/link`'s
|
|
453
|
-
* `prefetch` together with `linkAs={Link}`. Props controlled by `TreeItem` itself (`href`,
|
|
454
|
-
* `role`, `tabIndex`, `aria-expanded` and the ref) take precedence.
|
|
455
|
-
*/
|
|
456
|
-
linkProps?: React.HTMLProps<HTMLAnchorElement> & Record<string, unknown>;
|
|
457
|
-
padding?: number | number[];
|
|
458
|
-
gap?: number | number[];
|
|
459
|
-
/**
|
|
460
|
-
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
461
|
-
*/
|
|
462
|
-
space?: number | number[];
|
|
463
|
-
text?: React.ReactNode;
|
|
464
|
-
weight?: ThemeFontWeightKey$1;
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
468
|
-
* @beta
|
|
469
|
-
*/
|
|
470
|
-
declare function TreeItem(props: TreeItemProps & Omit<React.HTMLProps<HTMLLIElement>, 'as' | 'ref' | 'role'>): React.JSX.Element;
|
|
471
|
-
/**
|
|
472
|
-
* @beta
|
|
473
|
-
*/
|
|
474
|
-
interface TreeState {
|
|
475
|
-
[key: string]: {
|
|
476
|
-
element: HTMLElement;
|
|
477
|
-
expanded: boolean;
|
|
478
|
-
} | undefined;
|
|
479
|
-
}
|
|
480
|
-
/**
|
|
481
|
-
* @beta
|
|
482
|
-
*/
|
|
483
|
-
interface TreeContextValue {
|
|
484
|
-
version: 0.0;
|
|
485
|
-
focusedElement: HTMLElement | null;
|
|
486
|
-
level: number;
|
|
487
|
-
path: string[];
|
|
488
|
-
registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void;
|
|
489
|
-
setExpanded: (path: string, expanded: boolean) => void;
|
|
490
|
-
setFocusedElement: (focusedElement: HTMLElement | null) => void;
|
|
491
|
-
gap: number | number[];
|
|
492
|
-
/**
|
|
493
|
-
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
494
|
-
*/
|
|
495
|
-
space: number | number[];
|
|
496
|
-
state: TreeState;
|
|
497
|
-
}
|
|
498
|
-
/**
|
|
499
|
-
* @beta
|
|
500
|
-
*/
|
|
501
|
-
declare function useTree(): TreeContextValue;
|
|
502
|
-
/**
|
|
503
|
-
* @internal
|
|
504
|
-
*/
|
|
505
|
-
declare function _raf(fn: () => void): () => void;
|
|
506
|
-
/**
|
|
507
|
-
* @internal
|
|
508
|
-
*/
|
|
509
|
-
declare function _raf2(fn: () => void): () => void;
|
|
510
|
-
/**
|
|
511
|
-
* @internal
|
|
512
|
-
*/
|
|
513
|
-
declare function _hasFocus(element: HTMLElement): boolean;
|
|
514
|
-
/**
|
|
515
|
-
* @internal
|
|
516
|
-
*/
|
|
517
|
-
declare function isFocusable(element: HTMLElement): boolean;
|
|
518
|
-
/**
|
|
519
|
-
* @internal
|
|
520
|
-
*/
|
|
521
|
-
declare function attemptFocus(element: HTMLElement): boolean;
|
|
522
|
-
/**
|
|
523
|
-
* @internal
|
|
524
|
-
*/
|
|
525
|
-
declare function focusFirstDescendant(element: HTMLElement): boolean;
|
|
526
|
-
/**
|
|
527
|
-
* @internal
|
|
528
|
-
*/
|
|
529
|
-
declare function focusLastDescendant(element: HTMLElement): boolean;
|
|
530
|
-
/**
|
|
531
|
-
* @internal
|
|
532
|
-
*/
|
|
533
|
-
declare function _isScrollable(el: Node): boolean;
|
|
534
|
-
/** @beta */
|
|
535
|
-
type ArrayPropPrimitive = string | number | boolean | undefined | null;
|
|
536
|
-
/**
|
|
537
|
-
* @deprecated instead of `useArrayProp(width)` use `Array.isArray(width) ? width : [width]` instead
|
|
538
|
-
* @beta
|
|
539
|
-
*/
|
|
540
|
-
declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(val: T | T[] | undefined, defaultVal?: T[]): T[];
|
|
541
|
-
/**
|
|
542
|
-
* @public
|
|
543
|
-
*/
|
|
544
|
-
type ClickOutsideListener = (event: MouseEvent) => void;
|
|
545
|
-
/**
|
|
546
|
-
* @public
|
|
547
|
-
*/
|
|
548
|
-
type ClickOutsideElements = (HTMLElement | null | (HTMLElement | null)[])[];
|
|
549
|
-
/**
|
|
550
|
-
* @public
|
|
551
|
-
* @deprecated replaced by the new `useClickOutsideEvent` hook, instead of:
|
|
552
|
-
* ```tsx
|
|
553
|
-
* const [button, setButtonElement] = useState(null)
|
|
554
|
-
* useClickOutside((event) => {}, [button])
|
|
555
|
-
* return <button ref={setButtonElement} />
|
|
556
|
-
* ```
|
|
557
|
-
* do:
|
|
558
|
-
* ```tsx
|
|
559
|
-
* const buttonRef = useRef()
|
|
560
|
-
* useClickOutsideEvent((event) => {}, () => [buttonRef.current])
|
|
561
|
-
* return <button ref={buttonRef} />
|
|
562
|
-
* ```
|
|
563
|
-
*/
|
|
564
|
-
declare function useClickOutside(listener: ClickOutsideListener, elementsArg?: ClickOutsideElements, boundaryElement?: HTMLElement | null): (el: HTMLElement | null) => void;
|
|
565
|
-
/**
|
|
566
|
-
* @public
|
|
567
|
-
*/
|
|
568
|
-
type ClickOutsideEventListener = (event: MouseEvent) => void;
|
|
569
|
-
/**
|
|
570
|
-
* @public
|
|
571
|
-
*/
|
|
572
|
-
type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[];
|
|
573
|
-
/**
|
|
574
|
-
* @public
|
|
575
|
-
*/
|
|
576
|
-
declare function useClickOutsideEvent(listener: ClickOutsideEventListener | false | undefined, elementsArg?: () => ClickOutsideEventElements, boundaryElement?: () => HTMLElement | null): void;
|
|
577
|
-
/**
|
|
578
|
-
* @beta
|
|
579
|
-
*/
|
|
580
|
-
declare function useCustomValidity(ref: {
|
|
581
|
-
current: null | {
|
|
582
|
-
setCustomValidity: (validity: string) => void;
|
|
583
|
-
};
|
|
584
|
-
}, customValidity: string | undefined): void;
|
|
585
|
-
/**
|
|
586
|
-
* Subscribe to the rect of a DOM element.
|
|
587
|
-
* @beta
|
|
588
|
-
*
|
|
589
|
-
* @deprecated Use `useElementSize` instead
|
|
590
|
-
*/
|
|
591
|
-
declare function useElementRect(element: HTMLElement | null): DOMRectReadOnly | null;
|
|
592
|
-
/**
|
|
593
|
-
* @beta
|
|
594
|
-
*/
|
|
595
|
-
interface ElementRectValue {
|
|
596
|
-
width: number;
|
|
597
|
-
height: number;
|
|
598
|
-
}
|
|
599
|
-
/**
|
|
600
|
-
* @beta
|
|
601
|
-
*/
|
|
602
|
-
interface ElementSize {
|
|
603
|
-
content: ElementRectValue;
|
|
604
|
-
border: ElementRectValue;
|
|
605
|
-
/** @deprecated INTERNAL ONLY */
|
|
606
|
-
_contentRect: DOMRectReadOnly;
|
|
607
|
-
}
|
|
608
|
-
/**
|
|
609
|
-
* @internal
|
|
610
|
-
*/
|
|
611
|
-
type _ElementSizeSubscriber = (elementRect: ElementSize) => void;
|
|
612
|
-
/**
|
|
613
|
-
* @internal
|
|
614
|
-
*/
|
|
615
|
-
interface _ElementSizeObserver {
|
|
616
|
-
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void;
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* @internal
|
|
620
|
-
*/
|
|
621
|
-
interface _ElementSizeListener {
|
|
622
|
-
subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void;
|
|
623
|
-
}
|
|
624
|
-
/**
|
|
625
|
-
* @internal
|
|
626
|
-
*/
|
|
627
|
-
declare const _elementSizeObserver: _ElementSizeObserver;
|
|
628
|
-
/**
|
|
629
|
-
* Subscribe to the size of a DOM element.
|
|
630
|
-
* @beta
|
|
631
|
-
*/
|
|
632
|
-
declare function useElementSize(element: HTMLElement | null): ElementSize | null;
|
|
633
|
-
/**
|
|
634
|
-
* @beta
|
|
635
|
-
* @deprecated use `useImperativeHandle` instead
|
|
636
|
-
* @example
|
|
637
|
-
* ```diff
|
|
638
|
-
* -const ref = useForwardedRef(forwardedRef)
|
|
639
|
-
* +const ref = useRef(null)
|
|
640
|
-
* +useImperativeHandle(forwardedRef, () => ref.current)
|
|
641
|
-
* ```
|
|
642
|
-
*/
|
|
643
|
-
declare function useForwardedRef<T>(ref: React.ForwardedRef<T>): React.RefObject<T | null>;
|
|
644
|
-
/**
|
|
645
|
-
* Adds global keydown event listener to the window.
|
|
646
|
-
*
|
|
647
|
-
* @param onKeyDown - The function to call when a keydown event is triggered.
|
|
648
|
-
* @param options - The options to pass to the addEventListener function (example, capture: true)
|
|
649
|
-
* @beta
|
|
650
|
-
*/
|
|
651
|
-
declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void, options?: AddEventListenerOptions): void;
|
|
652
|
-
/**
|
|
653
|
-
* Efficiently subscribes to `window.matchMedia` queries
|
|
654
|
-
*
|
|
655
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
656
|
-
*
|
|
657
|
-
* @public
|
|
658
|
-
*/
|
|
659
|
-
declare function useMatchMedia(mediaQueryString: `(${string})`, getServerSnapshot?: () => boolean): boolean;
|
|
660
|
-
/**
|
|
661
|
-
* @internal
|
|
662
|
-
*/
|
|
663
|
-
interface _MediaStore {
|
|
664
|
-
subscribe: (onStoreChange: () => void) => () => void;
|
|
665
|
-
getSnapshot: () => number;
|
|
666
|
-
}
|
|
667
|
-
/**
|
|
668
|
-
* This API might change. DO NOT USE IN PRODUCTION.
|
|
669
|
-
* @beta
|
|
670
|
-
*/
|
|
671
|
-
declare function useMediaIndex(): number;
|
|
672
|
-
/**
|
|
673
|
-
* Returns true if motion should be reduced
|
|
674
|
-
*
|
|
675
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-reduced-motion: no-preference)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
676
|
-
*
|
|
677
|
-
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
678
|
-
* Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion
|
|
679
|
-
* @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b
|
|
680
|
-
*
|
|
681
|
-
* @public
|
|
682
|
-
*/
|
|
683
|
-
declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean;
|
|
684
|
-
/**
|
|
685
|
-
* @internal
|
|
686
|
-
*/
|
|
687
|
-
declare const _ResizeObserver: typeof ResizeObserver;
|
|
688
|
-
/**
|
|
689
|
-
* @public
|
|
690
|
-
*/
|
|
691
|
-
type AvatarPosition = 'top' | 'bottom' | 'inside';
|
|
692
|
-
/**
|
|
693
|
-
* @public
|
|
694
|
-
*/
|
|
695
|
-
type AvatarSize = 0 | 1 | 2 | 3;
|
|
696
|
-
/**
|
|
697
|
-
* @public
|
|
698
|
-
*/
|
|
699
|
-
type AvatarStatus = 'online' | 'editing' | 'inactive';
|
|
700
|
-
/**
|
|
701
|
-
* @public
|
|
702
|
-
*/
|
|
703
|
-
interface AvatarOwnProps {
|
|
704
|
-
/** @beta */
|
|
705
|
-
__unstable_hideInnerStroke?: boolean;
|
|
706
|
-
animateArrowFrom?: AvatarPosition;
|
|
707
|
-
arrowPosition?: AvatarPosition;
|
|
708
|
-
color?: ThemeColorAvatarColorKey;
|
|
709
|
-
initials?: string;
|
|
710
|
-
onImageLoadError?: (event: Error) => void;
|
|
711
|
-
size?: AvatarSize | AvatarSize[];
|
|
712
|
-
src?: string;
|
|
713
|
-
/**
|
|
714
|
-
* The status of the entity this Avatar represents.
|
|
715
|
-
* @alpha
|
|
716
|
-
*/
|
|
717
|
-
status?: AvatarStatus;
|
|
718
|
-
title?: string;
|
|
719
|
-
}
|
|
720
|
-
/**
|
|
721
|
-
* @public
|
|
722
|
-
*/
|
|
723
|
-
type AvatarProps<E extends ElementType = 'div'> = Props<AvatarOwnProps, E>;
|
|
724
|
-
/**
|
|
725
|
-
* Avatars are used to represent people and other agents (e.g. bots).
|
|
726
|
-
*
|
|
727
|
-
* @public
|
|
728
|
-
*/
|
|
729
|
-
declare const Avatar: <E extends ElementType = 'div'>(props: AvatarProps<E>) => React.JSX.Element;
|
|
730
|
-
/**
|
|
731
|
-
* @public
|
|
732
|
-
*/
|
|
733
|
-
interface AvatarCounterProps {
|
|
734
|
-
count: number;
|
|
735
|
-
size?: AvatarSize | AvatarSize[];
|
|
736
|
-
/** @deprecated No longer supported. */
|
|
737
|
-
tone?: 'navbar';
|
|
738
|
-
}
|
|
739
|
-
/**
|
|
740
|
-
* @public
|
|
741
|
-
*/
|
|
742
|
-
declare const AvatarCounter: import("react").ForwardRefExoticComponent<AvatarCounterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
743
|
-
/**
|
|
744
|
-
* @public
|
|
745
|
-
*/
|
|
746
|
-
interface AvatarStackProps {
|
|
747
|
-
children: React.ReactNode;
|
|
748
|
-
maxLength?: number;
|
|
749
|
-
size?: AvatarSize | AvatarSize[];
|
|
750
|
-
/** @deprecated No longer supported. */
|
|
751
|
-
tone?: 'navbar';
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
|
-
* @public
|
|
755
|
-
*/
|
|
756
|
-
declare const AvatarStack: import("react").ForwardRefExoticComponent<AvatarStackProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
757
|
-
/**
|
|
758
|
-
* @internal
|
|
759
|
-
*/
|
|
760
|
-
interface AvatarRootStyleProps {
|
|
761
|
-
$color: ThemeColorAvatarColorKey;
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* @internal
|
|
765
|
-
*/
|
|
766
|
-
interface ResponsiveAvatarSizeStyleProps {
|
|
767
|
-
$size: AvatarSize[];
|
|
768
|
-
}
|
|
769
|
-
/**
|
|
770
|
-
* @public
|
|
771
|
-
* @deprecated No longer used
|
|
772
|
-
*/
|
|
773
|
-
type BadgeMode = 'default' | 'outline';
|
|
774
|
-
/**
|
|
775
|
-
* @public
|
|
776
|
-
*/
|
|
777
|
-
type BadgeTone = ThemeColorStateToneKey;
|
|
778
|
-
/**
|
|
779
|
-
* @public
|
|
780
|
-
*/
|
|
781
|
-
interface BadgeOwnProps extends BoxOwnProps, ResponsiveRadiusProps {
|
|
782
|
-
fontSize?: number | number[];
|
|
783
|
-
/** @deprecated No longer used. */
|
|
784
|
-
mode?: BadgeMode;
|
|
785
|
-
tone?: BadgeTone;
|
|
786
|
-
}
|
|
787
|
-
/**
|
|
788
|
-
* @public
|
|
789
|
-
*/
|
|
790
|
-
type BadgeProps<E extends ElementType = 'div'> = Props<BadgeOwnProps, E>;
|
|
791
|
-
/**
|
|
792
|
-
* Badges are used to tag resources.
|
|
793
|
-
*
|
|
794
|
-
* @public
|
|
795
|
-
*/
|
|
796
|
-
declare const Badge: <E extends ElementType = 'div'>(props: BadgeProps<E>) => React.JSX.Element;
|
|
797
|
-
/**
|
|
798
|
-
* @internal
|
|
799
|
-
*/
|
|
800
|
-
interface CardStyleProps {
|
|
801
|
-
$checkered: boolean;
|
|
802
|
-
$focusRing: boolean;
|
|
803
|
-
$muted: boolean;
|
|
804
|
-
$tone: ThemeColorToneKey;
|
|
805
|
-
}
|
|
806
|
-
/**
|
|
807
|
-
* @public
|
|
808
|
-
*/
|
|
809
|
-
interface CheckboxProps {
|
|
810
|
-
indeterminate?: boolean;
|
|
811
|
-
customValidity?: string;
|
|
812
|
-
}
|
|
813
|
-
/**
|
|
814
|
-
* Checkboxes allow the user to select one or more items from a set.
|
|
815
|
-
*
|
|
816
|
-
* @public
|
|
817
|
-
*/
|
|
818
|
-
declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
819
|
-
/**
|
|
820
|
-
* @public
|
|
821
|
-
*/
|
|
822
|
-
interface CodeOwnProps {
|
|
823
|
-
/** Define the language to use for syntax highlighting. */
|
|
824
|
-
language?: string;
|
|
825
|
-
size?: number | number[];
|
|
826
|
-
weight?: string;
|
|
827
|
-
}
|
|
828
|
-
/**
|
|
829
|
-
* @public
|
|
830
|
-
*/
|
|
831
|
-
type CodeProps<E extends ElementType = 'pre'> = Props<CodeOwnProps, E>;
|
|
832
|
-
/**
|
|
833
|
-
* @public
|
|
834
|
-
*/
|
|
835
|
-
declare const Code: <E extends ElementType = 'pre'>(props: CodeProps<E>) => React.JSX.Element;
|
|
836
|
-
/**
|
|
837
|
-
* @public
|
|
838
|
-
*/
|
|
839
|
-
interface ContainerOwnProps extends BoxOwnProps, ResponsiveWidthProps {}
|
|
840
|
-
/**
|
|
841
|
-
* @public
|
|
842
|
-
*/
|
|
843
|
-
type ContainerProps<E extends ElementType = 'div'> = Props<ContainerOwnProps, E>;
|
|
844
|
-
/**
|
|
845
|
-
* The `Container` component wraps content layout in a defined set of widths.
|
|
846
|
-
*
|
|
847
|
-
* @public
|
|
848
|
-
*/
|
|
849
|
-
declare const Container: <E extends ElementType = 'div'>(props: ContainerProps<E>) => React.JSX.Element;
|
|
850
|
-
/**
|
|
851
|
-
* @internal
|
|
852
|
-
*/
|
|
853
|
-
interface ResponsiveWidthStyleProps {
|
|
854
|
-
$width: (number | 'auto')[];
|
|
855
|
-
}
|
|
856
|
-
/**
|
|
857
|
-
* @public
|
|
858
|
-
*/
|
|
859
|
-
interface HeadingOwnProps {
|
|
860
|
-
accent?: boolean;
|
|
861
|
-
align?: TextAlign | TextAlign[];
|
|
862
|
-
muted?: boolean;
|
|
863
|
-
size?: number | number[];
|
|
864
|
-
/**
|
|
865
|
-
* Controls how overflowing text is treated.
|
|
866
|
-
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
867
|
-
* @beta
|
|
868
|
-
*/
|
|
869
|
-
textOverflow?: 'ellipsis';
|
|
870
|
-
weight?: ThemeFontWeightKey$1;
|
|
871
|
-
}
|
|
872
|
-
/**
|
|
873
|
-
* @public
|
|
874
|
-
*/
|
|
875
|
-
type HeadingProps<E extends ElementType = 'div'> = Props<HeadingOwnProps, E>;
|
|
876
|
-
/**
|
|
877
|
-
* Typographic headings.
|
|
878
|
-
*
|
|
879
|
-
* @public
|
|
880
|
-
*/
|
|
881
|
-
declare const Heading: <E extends ElementType = 'div'>(props: HeadingProps<E>) => React.JSX.Element;
|
|
882
|
-
/**
|
|
883
|
-
* @public
|
|
884
|
-
*/
|
|
885
|
-
interface KBDOwnProps {
|
|
886
|
-
fontSize?: number | number[];
|
|
887
|
-
padding?: number | number[];
|
|
888
|
-
radius?: Radius | Radius[];
|
|
889
|
-
}
|
|
890
|
-
/**
|
|
891
|
-
* @public
|
|
892
|
-
*/
|
|
893
|
-
type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>;
|
|
894
|
-
/**
|
|
895
|
-
* Used to define some text as keyboard input.
|
|
896
|
-
*
|
|
897
|
-
* @public
|
|
898
|
-
*/
|
|
899
|
-
declare const KBD: <E extends ElementType = 'kbd'>(props: KBDProps<E>) => React.JSX.Element;
|
|
900
|
-
/**
|
|
901
|
-
* @public
|
|
902
|
-
*/
|
|
903
|
-
interface LabelOwnProps {
|
|
904
|
-
accent?: boolean;
|
|
905
|
-
align?: TextAlign | TextAlign[];
|
|
906
|
-
muted?: boolean;
|
|
907
|
-
size?: number | number[];
|
|
908
|
-
/**
|
|
909
|
-
* Controls how overflowing text is treated.
|
|
910
|
-
* Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
|
|
911
|
-
* @beta
|
|
912
|
-
*/
|
|
913
|
-
textOverflow?: 'ellipsis';
|
|
914
|
-
weight?: ThemeFontWeightKey$1;
|
|
915
|
-
}
|
|
916
|
-
/**
|
|
917
|
-
* @public
|
|
918
|
-
*/
|
|
919
|
-
type LabelProps<E extends ElementType = 'div'> = Props<LabelOwnProps, E>;
|
|
920
|
-
/**
|
|
921
|
-
* Typographic labels.
|
|
922
|
-
*
|
|
923
|
-
* @public
|
|
924
|
-
*/
|
|
925
|
-
declare const Label: <E extends ElementType = 'div'>(props: LabelProps<E>) => React.JSX.Element;
|
|
926
|
-
/**
|
|
927
|
-
* @public
|
|
928
|
-
*/
|
|
929
|
-
interface RadioProps {
|
|
930
|
-
customValidity?: string;
|
|
931
|
-
}
|
|
932
|
-
/**
|
|
933
|
-
* The `Radio` component allows the user to select one option from a set.
|
|
934
|
-
*
|
|
935
|
-
* @public
|
|
936
|
-
*/
|
|
937
|
-
declare const Radio: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
938
|
-
/**
|
|
939
|
-
* @public
|
|
940
|
-
*/
|
|
941
|
-
interface SelectProps {
|
|
942
|
-
fontSize?: number | number[];
|
|
943
|
-
gap?: number | number[];
|
|
944
|
-
padding?: number | number[];
|
|
945
|
-
radius?: Radius | Radius[];
|
|
946
|
-
/**
|
|
947
|
-
* @deprecated Use `gap` instead. `space` will be removed in v4.
|
|
948
|
-
*/
|
|
949
|
-
space?: number | number[];
|
|
950
|
-
customValidity?: string;
|
|
951
|
-
}
|
|
952
|
-
/**
|
|
953
|
-
* The `Select` component provides control of options.
|
|
954
|
-
*
|
|
955
|
-
* @public
|
|
956
|
-
*/
|
|
957
|
-
declare const Select: import("react").ForwardRefExoticComponent<Omit<SelectProps & Omit<import("react").HTMLProps<HTMLSelectElement>, "as">, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
958
|
-
/**
|
|
959
|
-
* @public
|
|
960
|
-
*/
|
|
961
|
-
interface SwitchProps {
|
|
962
|
-
indeterminate?: boolean;
|
|
963
|
-
}
|
|
964
|
-
/**
|
|
965
|
-
* The `Switch` component allows the user to toggle a setting on and off.
|
|
966
|
-
*
|
|
967
|
-
* Extends all properties of an `<input type="checkbox" />` element, except type.
|
|
968
|
-
*
|
|
969
|
-
* @public
|
|
970
|
-
*/
|
|
971
|
-
declare const Switch: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & SwitchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
972
|
-
/**
|
|
973
|
-
* @public
|
|
974
|
-
*/
|
|
975
|
-
interface TextAreaProps extends ResponsiveRadiusProps {
|
|
976
|
-
/**
|
|
977
|
-
* @beta
|
|
978
|
-
*/
|
|
979
|
-
__unstable_disableFocusRing?: boolean;
|
|
980
|
-
border?: boolean;
|
|
981
|
-
customValidity?: string;
|
|
982
|
-
fontSize?: number | number[];
|
|
983
|
-
padding?: number | number[];
|
|
984
|
-
weight?: ThemeFontWeightKey$1;
|
|
985
|
-
}
|
|
986
|
-
/**
|
|
987
|
-
* A multiline text input.
|
|
988
|
-
*
|
|
989
|
-
* @public
|
|
990
|
-
*/
|
|
991
|
-
declare const TextArea: import("react").ForwardRefExoticComponent<Omit<TextAreaProps & Omit<import("react").HTMLProps<HTMLTextAreaElement>, "as">, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
992
|
-
/**
|
|
993
|
-
* @beta
|
|
994
|
-
*/
|
|
995
|
-
interface TooltipDelayGroupContextValue {
|
|
996
|
-
setIsGroupActive: (nextState: React.SetStateAction<boolean>, delay?: number | undefined) => void;
|
|
997
|
-
setOpenTooltipId: (nextId: string | null, delay?: number | undefined) => void;
|
|
998
|
-
openDelay: number;
|
|
999
|
-
closeDelay: number;
|
|
1000
|
-
openTooltipId: string | null;
|
|
1001
|
-
}
|
|
1002
|
-
/**
|
|
1003
|
-
* @beta
|
|
1004
|
-
*/
|
|
1005
|
-
declare const TooltipDelayGroupContext: import("react").Context<TooltipDelayGroupContextValue | null>;
|
|
1006
|
-
/**
|
|
1007
|
-
* @public
|
|
1008
|
-
* */
|
|
1009
|
-
interface TooltipDelayGroupProviderProps {
|
|
1010
|
-
children?: React.ReactNode;
|
|
1011
|
-
/**
|
|
1012
|
-
* Handles the delays to open or close a tooltip inside a group
|
|
1013
|
-
*
|
|
1014
|
-
* If only a `number` is passed, it will be used for both opening and closing.
|
|
1015
|
-
*
|
|
1016
|
-
* If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
|
|
1017
|
-
*
|
|
1018
|
-
* @public
|
|
1019
|
-
*/
|
|
1020
|
-
delay: Delay;
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* @public
|
|
1024
|
-
* Provides context for a group of tooltip elements that should share a delay
|
|
1025
|
-
* which temporarily becomes 1 ms after the first floating element of the group opens.
|
|
1026
|
-
*/
|
|
1027
|
-
declare function TooltipDelayGroupProvider(props: TooltipDelayGroupProviderProps): React.JSX.Element;
|
|
1028
|
-
/**
|
|
1029
|
-
* @beta
|
|
1030
|
-
*/
|
|
1031
|
-
declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue | null;
|
|
1032
|
-
/**
|
|
1033
|
-
* @internal
|
|
1034
|
-
*/
|
|
1035
|
-
interface ThemeProps {
|
|
1036
|
-
theme: Theme$1;
|
|
1037
|
-
}
|
|
1038
|
-
/**
|
|
1039
|
-
* @internal
|
|
1040
|
-
*/
|
|
1041
|
-
interface ResponsiveFontSizeStyleProps {
|
|
1042
|
-
$size: number[];
|
|
1043
|
-
}
|
|
1044
|
-
/**
|
|
1045
|
-
* @internal
|
|
1046
|
-
*/
|
|
1047
|
-
interface FontWeightStyleProps {
|
|
1048
|
-
$weight?: ThemeFontWeightKey$1;
|
|
1049
|
-
}
|
|
1050
|
-
/**
|
|
1051
|
-
* @internal
|
|
1052
|
-
*/
|
|
1053
|
-
interface ResponsiveTextAlignStyleProps {
|
|
1054
|
-
$align: TextAlign[];
|
|
1055
|
-
}
|
|
1056
|
-
/**
|
|
1057
|
-
* @internal
|
|
1058
|
-
*/
|
|
1059
|
-
interface ResponsiveFontStyleProps extends FontWeightStyleProps, ResponsiveFontSizeStyleProps, ResponsiveTextAlignStyleProps {
|
|
1060
|
-
$accent?: boolean;
|
|
1061
|
-
$muted?: boolean;
|
|
1062
|
-
}
|
|
1063
|
-
/**
|
|
1064
|
-
* Get responsive CSS for the `code` font style.
|
|
1065
|
-
* @internal
|
|
1066
|
-
*/
|
|
1067
|
-
declare function responsiveCodeFontStyle(props: FontWeightStyleProps & ResponsiveFontSizeStyleProps & ThemeProps): CSSObject[];
|
|
1068
|
-
/**
|
|
1069
|
-
* Get responsive CSS for the `heading` font style.
|
|
1070
|
-
* @internal
|
|
1071
|
-
*/
|
|
1072
|
-
declare function responsiveHeadingFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1073
|
-
/**
|
|
1074
|
-
* Get responsive CSS for the `label` font style.
|
|
1075
|
-
* @internal
|
|
1076
|
-
*/
|
|
1077
|
-
declare function responsiveLabelFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1078
|
-
/**
|
|
1079
|
-
* Get responsive text align styles.
|
|
1080
|
-
* @internal
|
|
1081
|
-
*/
|
|
1082
|
-
declare function responsiveTextAlignStyle(props: ResponsiveTextAlignStyleProps & ThemeProps): CSSObject[];
|
|
1083
|
-
/**
|
|
1084
|
-
* Get responsive CSS for the `text` font style.
|
|
1085
|
-
* @internal
|
|
1086
|
-
*/
|
|
1087
|
-
declare function responsiveTextFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
|
|
1088
|
-
/**
|
|
1089
|
-
* @internal
|
|
1090
|
-
*/
|
|
1091
|
-
declare function _fillCSSObject(keys: string[], value: string | number | CSSObject): CSSObject;
|
|
1092
|
-
/**
|
|
1093
|
-
* @public
|
|
1094
|
-
*/
|
|
1095
|
-
declare function rem(pixelValue: number): string | 0;
|
|
1096
|
-
/**
|
|
1097
|
-
* @internal
|
|
1098
|
-
*/
|
|
1099
|
-
declare function _responsive<T>(media: number[], values: T[], callback: (value: T, index: number, array: T[]) => CSSObject): CSSObject[];
|
|
1100
|
-
/**
|
|
1101
|
-
* @internal
|
|
1102
|
-
*/
|
|
1103
|
-
declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[];
|
|
1104
|
-
/**
|
|
1105
|
-
* @internal
|
|
1106
|
-
*/
|
|
1107
|
-
declare function _getResponsiveSpace(theme: Theme$1, props: string[], spaceIndexes?: number[]): CSSObject[] | null;
|
|
1108
|
-
/**
|
|
1109
|
-
* @public
|
|
1110
|
-
*/
|
|
1111
|
-
interface ThemeColorProviderProps {
|
|
1112
|
-
children?: React.ReactNode;
|
|
1113
|
-
scheme?: ThemeColorSchemeKey$1;
|
|
1114
|
-
tone?: ThemeColorCardToneKey;
|
|
1115
|
-
}
|
|
1116
|
-
/**
|
|
1117
|
-
* @public
|
|
1118
|
-
*/
|
|
1119
|
-
declare function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element;
|
|
1120
|
-
/**
|
|
1121
|
-
* @public
|
|
1122
|
-
*/
|
|
1123
|
-
interface ThemeContextValue {
|
|
1124
|
-
/** @deprecated No longer used */
|
|
1125
|
-
version: 0.0;
|
|
1126
|
-
scheme: ThemeColorSchemeKey$1;
|
|
1127
|
-
theme: RootTheme$1;
|
|
1128
|
-
tone: ThemeColorCardToneKey;
|
|
1129
|
-
}
|
|
1130
|
-
/**
|
|
1131
|
-
* @public
|
|
1132
|
-
*/
|
|
1133
|
-
declare function useRootTheme(): ThemeContextValue;
|
|
1134
|
-
/** @internal */
|
|
1135
|
-
declare const Arrow: import("react").ForwardRefExoticComponent<Omit<{
|
|
1136
|
-
width: number;
|
|
1137
|
-
height: number;
|
|
1138
|
-
radius?: number;
|
|
1139
|
-
} & Omit<HTMLProps<HTMLDivElement>, "height" | "width">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1140
|
-
/**
|
|
1141
|
-
* @public
|
|
1142
|
-
*/
|
|
1143
|
-
interface BoundaryElementProviderProps {
|
|
1144
|
-
children: React.ReactNode;
|
|
1145
|
-
element: HTMLElement | null;
|
|
1146
|
-
}
|
|
1147
|
-
/**
|
|
1148
|
-
* @public
|
|
1149
|
-
*/
|
|
1150
|
-
declare function BoundaryElementProvider(props: BoundaryElementProviderProps): React.JSX.Element;
|
|
1151
|
-
/**
|
|
1152
|
-
* @public
|
|
1153
|
-
*/
|
|
1154
|
-
interface BoundaryElementContextValue {
|
|
1155
|
-
version: 0.0;
|
|
1156
|
-
element: HTMLElement | null;
|
|
1157
|
-
}
|
|
1158
|
-
/**
|
|
1159
|
-
* @public
|
|
1160
|
-
*/
|
|
1161
|
-
declare function useBoundaryElement(): BoundaryElementContextValue;
|
|
1162
|
-
/**
|
|
1163
|
-
* @internal
|
|
1164
|
-
* @deprecated this component will be removed in the next major release
|
|
1165
|
-
*/
|
|
1166
|
-
declare function ConditionalWrapper({ children, condition, wrapper }: {
|
|
1167
|
-
children: React.ReactNode;
|
|
1168
|
-
condition: boolean;
|
|
1169
|
-
wrapper: (children: React.ReactNode) => React.ReactNode;
|
|
1170
|
-
}): React.ReactNode;
|
|
1171
|
-
/**
|
|
1172
|
-
* DO NOT USE IN PRODUCTION.
|
|
1173
|
-
* @beta
|
|
1174
|
-
*/
|
|
1175
|
-
interface MediaQueryProps {
|
|
1176
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1177
|
-
media?: number[];
|
|
1178
|
-
}
|
|
1179
|
-
/**
|
|
1180
|
-
* DO NOT USE IN PRODUCTION.
|
|
1181
|
-
* @beta
|
|
1182
|
-
*/
|
|
1183
|
-
declare const ElementQuery: import("react").ForwardRefExoticComponent<Omit<MediaQueryProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "media">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1184
|
-
/**
|
|
1185
|
-
* DO NOT USE IN PRODUCTION
|
|
1186
|
-
* @beta
|
|
1187
|
-
*/
|
|
1188
|
-
type ErrorBoundaryProps = PropsWithChildren<{
|
|
1189
|
-
onCatch: (params: {
|
|
1190
|
-
error: Error;
|
|
1191
|
-
info: React.ErrorInfo;
|
|
1192
|
-
}) => void;
|
|
1193
|
-
}>;
|
|
1194
|
-
/**
|
|
1195
|
-
* DO NOT USE IN PRODUCTION
|
|
1196
|
-
* @beta
|
|
1197
|
-
*/
|
|
1198
|
-
interface ErrorBoundaryState {
|
|
1199
|
-
error: Error | null;
|
|
1200
|
-
}
|
|
1201
|
-
/**
|
|
1202
|
-
* DO NOT USE IN PRODUCTION
|
|
1203
|
-
* @beta
|
|
1204
|
-
*/
|
|
1205
|
-
declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
1206
|
-
state: ErrorBoundaryState;
|
|
1207
|
-
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
1208
|
-
componentDidCatch(error: Error, info: React.ErrorInfo): void;
|
|
1209
|
-
render(): React.ReactNode;
|
|
1210
|
-
}
|
|
1211
|
-
/** @public */
|
|
1212
|
-
interface LayerContextValue {
|
|
1213
|
-
version: 0.0;
|
|
1214
|
-
isTopLayer: boolean;
|
|
1215
|
-
level?: number;
|
|
1216
|
-
registerChild: (childLevel?: number) => () => void;
|
|
1217
|
-
size: number;
|
|
1218
|
-
zIndex: number;
|
|
1219
|
-
}
|
|
1220
|
-
/**
|
|
1221
|
-
* @public
|
|
1222
|
-
*/
|
|
1223
|
-
declare function useLayer(): LayerContextValue;
|
|
1224
|
-
/**
|
|
1225
|
-
* @public
|
|
1226
|
-
*/
|
|
1227
|
-
interface PortalContextValue {
|
|
1228
|
-
version: 0.0;
|
|
1229
|
-
boundaryElement: HTMLElement | null;
|
|
1230
|
-
element: HTMLElement | null;
|
|
1231
|
-
elements?: Record<string, HTMLElement | null | undefined>;
|
|
1232
|
-
}
|
|
1233
|
-
/**
|
|
1234
|
-
* @public
|
|
1235
|
-
*/
|
|
1236
|
-
declare function usePortal(): PortalContextValue;
|
|
1237
|
-
/**
|
|
1238
|
-
* @public
|
|
1239
|
-
*/
|
|
1240
|
-
interface SrOnlyProps {
|
|
1241
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1242
|
-
children?: React.ReactNode;
|
|
1243
|
-
}
|
|
1244
|
-
/**
|
|
1245
|
-
* @public
|
|
1246
|
-
*/
|
|
1247
|
-
declare const SrOnly: import("react").ForwardRefExoticComponent<Omit<SrOnlyProps & Omit<import("react").HTMLProps<HTMLDivElement>, "aria-hidden" | "as">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1248
|
-
/**
|
|
1249
|
-
* @beta
|
|
1250
|
-
*/
|
|
1251
|
-
interface VirtualListChangeOpts {
|
|
1252
|
-
fromIndex: number;
|
|
1253
|
-
gap: number;
|
|
1254
|
-
itemHeight: number;
|
|
1255
|
-
scrollHeight: number;
|
|
1256
|
-
scrollTop: number;
|
|
1257
|
-
toIndex: number;
|
|
1258
|
-
}
|
|
1259
|
-
/**
|
|
1260
|
-
* @beta
|
|
1261
|
-
*/
|
|
1262
|
-
interface VirtualListProps<Item = any> {
|
|
1263
|
-
as?: React.ElementType | keyof React.JSX.IntrinsicElements;
|
|
1264
|
-
gap?: number;
|
|
1265
|
-
getItemKey?: (item: Item, itemIndex: number) => string;
|
|
1266
|
-
items?: Item[];
|
|
1267
|
-
onChange?: (opts: VirtualListChangeOpts) => void;
|
|
1268
|
-
renderItem?: (item: Item) => React.ReactNode;
|
|
1269
|
-
}
|
|
1270
|
-
/**
|
|
1271
|
-
* @beta
|
|
1272
|
-
*/
|
|
1273
|
-
declare const VirtualList: import("react").ForwardRefExoticComponent<VirtualListProps<any> & StackOwnProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "children" | "onChange" | "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1274
|
-
export { type ArrayPropPrimitive, Arrow, type Assign, Autocomplete, type AutocompleteInputChangeMsg, type AutocompleteInputFoocusMsg, type AutocompleteMsg, type AutocompleteOpenButtonProps, type AutocompleteProps, type AutocompleteRootBlurMsg, type AutocompleteRootClearMsg, type AutocompleteRootEscapeMsg, type AutocompleteRootOpenMsg, type AutocompleteRootSetActiveValueMsg, type AutocompleteRootSetListFocusedMsg, type AutocompleteState, type AutocompleteValueChangeMsg, Avatar, AvatarCounter, type AvatarCounterProps, type AvatarOwnProps, type AvatarPosition, type AvatarProps, type AvatarRootStyleProps, type AvatarSize, AvatarStack, type AvatarStackProps, type AvatarStatus, Badge, type BadgeMode, type BadgeOwnProps, type BadgeProps, type BadgeTone, type BaseAutocompleteOption, type BaseTheme, type BoundaryElementContextValue, BoundaryElementProvider, type BoundaryElementProviderProps, Box, type BoxDisplay, type BoxHeight, type BoxOverflow, type BoxOwnProps, type BoxProps, type BoxShadow, type BoxSizing, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonMode, type ButtonOwnProps, type ButtonProps, type ButtonTextAlign, type ButtonTone, type ButtonWidth, Card, type CardOwnProps, type CardProps, type CardStyleProps, type CardTone, Checkbox, type CheckboxProps, type ClickOutsideElements, type ClickOutsideEventElements, type ClickOutsideEventListener, type ClickOutsideListener, Code, type CodeOwnProps, type CodeProps, CodeSkeleton, type CodeSkeletonProps, type ComponentType, ConditionalWrapper, Container, type ContainerOwnProps, type ContainerProps, type Delay, Dialog, DialogContext, type DialogContextValue, type DialogPosition, type DialogProps, DialogProvider, type DialogProviderProps, ElementQuery, type ElementRectValue, type ElementSize, type ElementType, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, type ErrorBoundaryState, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexOwnProps, type FlexProps, type FlexValue, type FlexWrap, type FontWeightStyleProps, Grid, type GridAutoCols, type GridAutoFlow, type GridAutoRows, type GridItemColumn, type GridItemColumnEnd, type GridItemColumnStart, type GridItemRow, type GridItemRowEnd, type GridItemRowStart, type GridOwnProps, type GridProps, type HSL, Heading, type HeadingOwnProps, type HeadingProps, HeadingSkeleton, type HeadingSkeletonProps, Hotkeys, type HotkeysProps, Inline, type InlineOwnProps, type InlineProps, KBD, type KBDOwnProps, type KBDProps, Label, type LabelOwnProps, type LabelProps, LabelSkeleton, type LabelSkeletonProps, Layer, type LayerContextValue, type LayerProps, LayerProvider, type LayerProviderProps, type MediaQueryProps, Menu, MenuButton, type MenuButtonProps, MenuDivider, type MenuDividerProps, MenuGroup, type MenuGroupOwnProps, type MenuGroupProps, MenuItem, type MenuItemOwnProps, type MenuItemProps, type MenuProps, type PartialThemeColorBuilderOpts, type Placement, Popover, type PopoverMargins, type PopoverProps, type PopoverUpdateCallback, type PopoverWidth, Portal, type PortalContextValue, type PortalProps, PortalProvider, type PortalProviderProps, type Props, type RGB, Radio, type RadioProps, type Radius, type ResponsiveAvatarSizeStyleProps, type ResponsiveBorderProps, type ResponsiveBoxProps, type ResponsiveFlexItemProps, type ResponsiveFlexProps, type ResponsiveFontSizeStyleProps, type ResponsiveFontStyleProps, type ResponsiveGridItemProps, type ResponsiveGridProps, type ResponsiveMarginProps, type ResponsivePaddingProps, type ResponsiveRadiusProps, type ResponsiveShadowProps, type ResponsiveTextAlignStyleProps, type ResponsiveWidthProps, type ResponsiveWidthStyleProps, type RootTheme, Select, type SelectProps, type SelectableTone, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, SrOnly, type SrOnlyProps, Stack, type StackOwnProps, type StackProps, type Styles, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, type TagType, Text, type TextAlign, TextArea, type TextAreaProps, TextInput, type TextInputClearButtonProps, type TextInputProps, type TextInputType, type TextOwnProps, type TextProps, TextSkeleton, type TextSkeletonProps, type Theme, type ThemeAvatar, type ThemeColor, type ThemeColorBase, type ThemeColorBuilderOpts, type ThemeColorButton, type ThemeColorButtonModeKey, type ThemeColorButtonState, type ThemeColorButtonStates, type ThemeColorButtonTones, type ThemeColorCard, type ThemeColorCardState, type ThemeColorGenericState, type ThemeColorInput, type ThemeColorInputState, type ThemeColorInputStates, type ThemeColorMuted, type ThemeColorMutedTone, type ThemeColorName, ThemeColorProvider, type ThemeColorProviderProps, type ThemeColorScheme, type ThemeColorSchemeKey, type ThemeColorSchemes, type ThemeColorSelectable, type ThemeColorSelectableState, type ThemeColorSelectableStates, type ThemeColorSolid, type ThemeColorSolidTone, type ThemeColorSpot, type ThemeColorSpotKey, type ThemeColorSyntax, type ThemeColorToneKey, type ThemeContextValue, type ThemeFont, type ThemeFontKey, type ThemeFontSize, type ThemeFontWeight, type ThemeFontWeightKey, type ThemeFonts, type ThemeInput, type ThemeLayer, type ThemeProps, ThemeProvider, type ThemeProviderProps, type ThemeShadow, Toast, type ToastContextValue, type ToastParams, type ToastProps, ToastProvider, type ToastProviderProps, Tooltip, TooltipDelayGroupContext, type TooltipDelayGroupContextValue, TooltipDelayGroupProvider, type TooltipDelayGroupProviderProps, type TooltipProps, Tree, type TreeContextValue, TreeItem, type TreeItemProps, type TreeProps, type TreeState, VirtualList, type VirtualListChangeOpts, type VirtualListProps, type _ElementSizeListener, type _ElementSizeObserver, type _ElementSizeSubscriber, type _MediaStore, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useClickOutsideEvent, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMatchMedia, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };
|
|
1275
|
-
//# sourceMappingURL=index.d.cts.map
|