@sanity/ui 5.0.0-alpha.10 → 5.0.0-alpha.11
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/LazyRefractor-CQ22IeXB.js +19 -0
- package/dist/LazyRefractor-CQ22IeXB.js.map +1 -0
- package/dist/index.d.ts +405 -825
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2033 -1972
- package/dist/index.js.map +1 -1
- package/dist/polyfills.d.ts +1 -1
- package/dist/polyfills.js +4 -4
- package/dist/polyfills.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -7
- package/src/components/box/Box.tsx +1 -6
- package/src/components/box/box.css +5 -0
- package/src/components/checkbox/Checkbox.tsx +1 -1
- package/src/components/container/Container.tsx +5 -1
- package/src/components/container/container.css +4 -0
- package/src/components/flex/Flex.tsx +1 -6
- package/src/components/flex/flex.css +5 -0
- package/src/components/grid/Grid.tsx +1 -6
- package/src/components/grid/grid.css +5 -0
- package/src/components/h-stack/HStack.tsx +8 -14
- package/src/components/h-stack/hStack.props.ts +5 -15
- package/src/components/index.css +1 -0
- package/src/components/select/Select.tsx +47 -0
- package/src/components/select/select.css +67 -0
- package/src/components/select/select.props.ts +25 -0
- package/src/components/v-stack/VStack.tsx +8 -14
- package/src/components/v-stack/vStack.props.ts +5 -15
- package/src/css/classes/system/shadow.css +6 -6
- package/src/css/global/reset.css +12 -1
- package/src/css/tokens/surface.css +2 -0
- package/src/index.ts +3 -0
- package/src/polyfills.ts +2 -0
- package/src/props/formElement.ts +34 -0
- package/src/types/FormElement.ts +2 -0
- package/src/utils/getProps.ts +1 -1
- package/src/version.ts +2 -2
- package/dist/_chunks-es/LazyRefractor.js +0 -20
- package/dist/_chunks-es/LazyRefractor.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,47 +1,22 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export declare function Badge<T extends ElementType = "span">({
|
|
21
|
-
tone,
|
|
22
|
-
...props
|
|
23
|
-
}: BadgeProps<T> &
|
|
24
|
-
Omit<ComponentPropsWithRef<T>, keyof BadgeProps<T>>): JSX.Element;
|
|
25
|
-
|
|
26
|
-
/** @public */
|
|
27
|
-
export declare interface BadgeProps<
|
|
28
|
-
T extends React.ElementType = "span",
|
|
29
|
-
> extends ToneProps {
|
|
30
|
-
/**
|
|
31
|
-
* HTML element to render.
|
|
32
|
-
*/
|
|
33
|
-
as?: T;
|
|
34
|
-
/**
|
|
35
|
-
* Shows an icon in the start position (left side in left-to-right languages).
|
|
36
|
-
*/
|
|
37
|
-
iconStart?: React.ElementType | React.ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* Sets Badge's text label. Use instead of children unless you have a special use case.
|
|
40
|
-
*/
|
|
41
|
-
text?: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
declare type BorderProps = {
|
|
1
|
+
import React$1, { ComponentProps, ComponentPropsWithRef, ElementType, SVGProps } from "react";
|
|
2
|
+
declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6, "full"];
|
|
3
|
+
/** @public */
|
|
4
|
+
type Radius = (typeof RADIUS)[number];
|
|
5
|
+
/** @public */
|
|
6
|
+
type Responsive<T> = T | [] | ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
7
|
+
length: 1;
|
|
8
|
+
}) | ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
9
|
+
length: 2;
|
|
10
|
+
}) | ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
11
|
+
length: 3;
|
|
12
|
+
}) | ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
13
|
+
length: 4;
|
|
14
|
+
}) | ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
15
|
+
length: 5;
|
|
16
|
+
}) | ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
17
|
+
length: 6;
|
|
18
|
+
});
|
|
19
|
+
type BorderProps = {
|
|
45
20
|
/** CSS **border** property */
|
|
46
21
|
border?: Responsive<boolean>;
|
|
47
22
|
/** CSS **border-top** property */
|
|
@@ -55,20 +30,149 @@ declare type BorderProps = {
|
|
|
55
30
|
/** CSS **border-radius** property */
|
|
56
31
|
radius?: Responsive<Radius>;
|
|
57
32
|
};
|
|
58
|
-
|
|
33
|
+
type FlexChildProps = {
|
|
34
|
+
/** CSS **flex-basis** property */
|
|
35
|
+
flexBasis?: Responsive<string>;
|
|
36
|
+
/** CSS **flex-grow** property */
|
|
37
|
+
flexGrow?: Responsive<number>;
|
|
38
|
+
/** CSS **flex-shrink** property */
|
|
39
|
+
flexShrink?: Responsive<number>;
|
|
40
|
+
};
|
|
41
|
+
type GridChildProps = {
|
|
42
|
+
/** CSS **grid-column** property */
|
|
43
|
+
gridColumn?: Responsive<string>;
|
|
44
|
+
/** CSS **grid-column-start** property */
|
|
45
|
+
gridColumnStart?: Responsive<string>;
|
|
46
|
+
/** CSS **grid-column-end** property */
|
|
47
|
+
gridColumnEnd?: Responsive<string>;
|
|
48
|
+
/** CSS **grid-row** property */
|
|
49
|
+
gridRow?: Responsive<string>;
|
|
50
|
+
/** CSS **grid-row-start** property */
|
|
51
|
+
gridRowStart?: Responsive<string>;
|
|
52
|
+
/** CSS **grid-row-end** property */
|
|
53
|
+
gridRowEnd?: Responsive<string>;
|
|
54
|
+
};
|
|
55
|
+
type HeightProps = {
|
|
56
|
+
/** CSS **height** property */
|
|
57
|
+
height?: Responsive<string>;
|
|
58
|
+
/** CSS **min-height** property */
|
|
59
|
+
minHeight?: Responsive<string>;
|
|
60
|
+
/** CSS **max-height** property */
|
|
61
|
+
maxHeight?: Responsive<string>;
|
|
62
|
+
};
|
|
63
|
+
declare const SPACE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
64
|
+
/** @public */
|
|
65
|
+
type Space = (typeof SPACE)[number];
|
|
66
|
+
declare const SPACE_AUTO: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "auto"];
|
|
59
67
|
/** @public */
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
minHeight,
|
|
63
|
-
minWidth,
|
|
64
|
-
...props
|
|
65
|
-
}: BoxProps<T> &
|
|
66
|
-
Omit<ComponentPropsWithRef<T>, keyof BoxProps<T>>): JSX.Element;
|
|
67
|
-
|
|
68
|
+
type SpaceAuto = (typeof SPACE_AUTO)[number];
|
|
69
|
+
declare const SPACE_INHERIT: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "inherit"];
|
|
68
70
|
/** @public */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
type SpaceInherit = (typeof SPACE_INHERIT)[number];
|
|
72
|
+
declare const SPACE_AUTO_NEGATIVE: readonly [-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "auto"];
|
|
73
|
+
/** @public */
|
|
74
|
+
type SpaceAutoNegative = (typeof SPACE_AUTO_NEGATIVE)[number];
|
|
75
|
+
/** @public */
|
|
76
|
+
type MarginProps = {
|
|
77
|
+
/** CSS **margin** property */
|
|
78
|
+
margin?: Responsive<SpaceAutoNegative>;
|
|
79
|
+
/** CSS **margin-left** and **margin-right** properties */
|
|
80
|
+
marginX?: Responsive<SpaceAutoNegative>;
|
|
81
|
+
/** CSS **margin-top** and **margin-bottom** properties */
|
|
82
|
+
marginY?: Responsive<SpaceAutoNegative>;
|
|
83
|
+
/** CSS **margin-top** property */
|
|
84
|
+
marginTop?: Responsive<SpaceAutoNegative>;
|
|
85
|
+
/** CSS **margin-right** property */
|
|
86
|
+
marginRight?: Responsive<SpaceAutoNegative>;
|
|
87
|
+
/** CSS **margin-bottom** property */
|
|
88
|
+
marginBottom?: Responsive<SpaceAutoNegative>;
|
|
89
|
+
/** CSS **margin-left** property */
|
|
90
|
+
marginLeft?: Responsive<SpaceAutoNegative>;
|
|
91
|
+
};
|
|
92
|
+
declare const OVERFLOW: readonly ["visible", "hidden", "auto", "scroll", "clip"];
|
|
93
|
+
/** @public */
|
|
94
|
+
type Overflow = (typeof OVERFLOW)[number];
|
|
95
|
+
type OverflowProps = {
|
|
96
|
+
/** CSS **overflow** property */
|
|
97
|
+
overflow?: Responsive<Overflow>;
|
|
98
|
+
/** CSS **overflow-x** property */
|
|
99
|
+
overflowX?: Responsive<Overflow>;
|
|
100
|
+
/** CSS **overflow-y** property */
|
|
101
|
+
overflowY?: Responsive<Overflow>;
|
|
102
|
+
};
|
|
103
|
+
/** @public */
|
|
104
|
+
interface PaddingProps {
|
|
105
|
+
/** CSS **padding** property */
|
|
106
|
+
padding?: Responsive<Space>;
|
|
107
|
+
/** CSS **padding-left** and **padding-right** properties */
|
|
108
|
+
paddingX?: Responsive<Space>;
|
|
109
|
+
/** CSS **padding-top** and **padding-bottom** properties */
|
|
110
|
+
paddingY?: Responsive<Space>;
|
|
111
|
+
/** CSS **padding-top** property */
|
|
112
|
+
paddingTop?: Responsive<Space>;
|
|
113
|
+
/** CSS **padding-right** property */
|
|
114
|
+
paddingRight?: Responsive<Space>;
|
|
115
|
+
/** CSS **padding-bottom** property */
|
|
116
|
+
paddingBottom?: Responsive<Space>;
|
|
117
|
+
/** CSS **padding-left** property */
|
|
118
|
+
paddingLeft?: Responsive<Space>;
|
|
119
|
+
}
|
|
120
|
+
declare const POSITION: readonly ["absolute", "fixed", "relative", "static", "sticky"];
|
|
121
|
+
/** @public */
|
|
122
|
+
type Position = (typeof POSITION)[number];
|
|
123
|
+
type PositionProps = {
|
|
124
|
+
/** CSS **position** property */
|
|
125
|
+
position?: Responsive<Position>;
|
|
126
|
+
/** CSS **inset** property */
|
|
127
|
+
inset?: Responsive<SpaceAuto>;
|
|
128
|
+
/** CSS **top** property */
|
|
129
|
+
top?: Responsive<SpaceAuto>;
|
|
130
|
+
/** CSS **right** property */
|
|
131
|
+
right?: Responsive<SpaceAuto>;
|
|
132
|
+
/** CSS **bottom** property */
|
|
133
|
+
bottom?: Responsive<SpaceAuto>;
|
|
134
|
+
/** CSS **left** property */
|
|
135
|
+
left?: Responsive<SpaceAuto>;
|
|
136
|
+
};
|
|
137
|
+
declare const SHADOW: readonly [0, 1, 2, 3, 4, 5];
|
|
138
|
+
/** @public */
|
|
139
|
+
type Shadow = (typeof SHADOW)[number];
|
|
140
|
+
type ShadowProps = {
|
|
141
|
+
/** CSS **box-shadow** property */
|
|
142
|
+
shadow?: Shadow;
|
|
143
|
+
};
|
|
144
|
+
declare const TONE: readonly ["neutral", "positive", "suggest", "caution", "critical"];
|
|
145
|
+
/** @public */
|
|
146
|
+
type Tone = (typeof TONE)[number];
|
|
147
|
+
type ToneProps = {
|
|
148
|
+
/** CSS **background-color** property */
|
|
149
|
+
tone?: Tone;
|
|
150
|
+
};
|
|
151
|
+
type WidthProps = {
|
|
152
|
+
/** CSS **width** property */
|
|
153
|
+
width?: Responsive<string>;
|
|
154
|
+
/** CSS **min-width** property */
|
|
155
|
+
minWidth?: Responsive<string>;
|
|
156
|
+
/** CSS **max-width** property */
|
|
157
|
+
maxWidth?: Responsive<string>;
|
|
158
|
+
};
|
|
159
|
+
type ZIndexProps = {
|
|
160
|
+
/** CSS z-index property */
|
|
161
|
+
zIndex?: Responsive<number>;
|
|
162
|
+
};
|
|
163
|
+
/** @public */
|
|
164
|
+
interface LayoutProps extends ToneProps, WidthProps, HeightProps, MarginProps, BorderProps, PaddingProps, PositionProps, OverflowProps, FlexChildProps, GridChildProps, ZIndexProps, ShadowProps {}
|
|
165
|
+
declare const DISPLAY_BLOCK: readonly ["block", "inline-block", "none"];
|
|
166
|
+
/** @public */
|
|
167
|
+
type DisplayBlock = (typeof DISPLAY_BLOCK)[number];
|
|
168
|
+
declare const DISPLAY_FLEX: readonly ["flex", "inline-flex", "none"];
|
|
169
|
+
/** @public */
|
|
170
|
+
type DisplayFlex = (typeof DISPLAY_FLEX)[number];
|
|
171
|
+
declare const DISPLAY_GRID: readonly ["grid", "inline-grid", "none"];
|
|
172
|
+
/** @public */
|
|
173
|
+
type DisplayGrid = (typeof DISPLAY_GRID)[number];
|
|
174
|
+
/** @public */
|
|
175
|
+
interface BoxProps<T extends React.ElementType = 'div'> extends LayoutProps {
|
|
72
176
|
/**
|
|
73
177
|
* HTML element or component to render.
|
|
74
178
|
*/
|
|
@@ -79,28 +183,19 @@ export declare interface BoxProps<
|
|
|
79
183
|
*/
|
|
80
184
|
display?: Responsive<DisplayBlock>;
|
|
81
185
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
export declare function Button<T extends ElementType = "button">({
|
|
85
|
-
density,
|
|
86
|
-
level,
|
|
87
|
-
tone,
|
|
88
|
-
...props
|
|
89
|
-
}: ButtonProps<T> &
|
|
90
|
-
Omit<ComponentPropsWithRef<T>, keyof ButtonProps<T>>): JSX.Element;
|
|
91
|
-
|
|
186
|
+
/** @public */
|
|
187
|
+
export declare function Box<T extends ElementType = 'div'>({ display, ...props }: BoxProps<T> & Omit<ComponentPropsWithRef<T>, keyof BoxProps<T>>): import("react").JSX.Element;
|
|
92
188
|
declare const BUTTON_DENSITY: readonly ["regular", "loose"];
|
|
93
|
-
|
|
189
|
+
type ButtonDensity = (typeof BUTTON_DENSITY)[number];
|
|
94
190
|
declare const BUTTON_LEVEL: readonly ["primary", "secondary", "tertiary"];
|
|
95
|
-
|
|
191
|
+
type ButtonLevel = (typeof BUTTON_LEVEL)[number];
|
|
96
192
|
declare const BUTTON_TONE: readonly ["neutral", "critical"];
|
|
97
|
-
|
|
98
|
-
declare
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
193
|
+
type ButtonTone = (typeof BUTTON_TONE)[number];
|
|
194
|
+
declare const INTERACTIVE_TAG: readonly ["button", "a"];
|
|
195
|
+
type InteractiveTag = (typeof INTERACTIVE_TAG)[number];
|
|
196
|
+
type InteractiveAs<T extends React.ElementType> = T extends InteractiveTag ? T : T extends string ? never : T;
|
|
102
197
|
/** @public */
|
|
103
|
-
|
|
198
|
+
interface ButtonProps<T extends React.ElementType = 'button'> {
|
|
104
199
|
/**
|
|
105
200
|
* HTML element to render.
|
|
106
201
|
*/
|
|
@@ -138,20 +233,13 @@ export declare interface ButtonProps<T extends React.ElementType = "button"> {
|
|
|
138
233
|
*/
|
|
139
234
|
tone?: ButtonTone;
|
|
140
235
|
}
|
|
141
|
-
|
|
142
|
-
declare type ButtonTone = (typeof BUTTON_TONE)[number];
|
|
143
|
-
|
|
144
236
|
/** @public */
|
|
145
|
-
export declare function
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}: CardProps<T> &
|
|
150
|
-
Omit<ComponentPropsWithRef<T>, keyof CardProps<T>>): JSX.Element;
|
|
151
|
-
|
|
237
|
+
export declare function Button<T extends ElementType = 'button'>({ density, level, tone, ...props }: ButtonProps<T> & Omit<ComponentPropsWithRef<T>, keyof ButtonProps<T>>): import("react").JSX.Element;
|
|
238
|
+
declare const DENSITY: readonly ["compact", "regular", "loose"];
|
|
239
|
+
/** @public */
|
|
240
|
+
type Density = (typeof DENSITY)[number];
|
|
152
241
|
/** @public */
|
|
153
|
-
|
|
154
|
-
extends MarginProps, ToneProps {
|
|
242
|
+
interface CardProps<T extends React.ElementType = 'div'> extends MarginProps, ToneProps {
|
|
155
243
|
/**
|
|
156
244
|
* HTML element or component to render.
|
|
157
245
|
*/
|
|
@@ -161,13 +249,10 @@ export declare interface CardProps<T extends React.ElementType = "div">
|
|
|
161
249
|
*/
|
|
162
250
|
density?: Responsive<Density>;
|
|
163
251
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
export declare function Checkbox(props: CheckboxProps): JSX.Element;
|
|
167
|
-
|
|
252
|
+
/** @public */
|
|
253
|
+
export declare function Card<T extends ElementType = 'div'>({ density, tone, ...props }: CardProps<T> & Omit<ComponentPropsWithRef<T>, keyof CardProps<T>>): import("react").JSX.Element;
|
|
168
254
|
/** @beta */
|
|
169
|
-
|
|
170
|
-
extends React.ComponentProps<"input">, MarginProps {
|
|
255
|
+
interface CheckboxProps extends React.ComponentProps<'input'>, MarginProps {
|
|
171
256
|
/**
|
|
172
257
|
* Applies error styling to the checkbox mark.
|
|
173
258
|
* @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
|
|
@@ -183,23 +268,34 @@ export declare interface CheckboxProps
|
|
|
183
268
|
*/
|
|
184
269
|
label: React.ReactNode;
|
|
185
270
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
export declare function Code<T extends CodeTag = "pre">({
|
|
189
|
-
size,
|
|
190
|
-
...props
|
|
191
|
-
}: CodeProps<T> &
|
|
192
|
-
Omit<ComponentPropsWithRef<T>, keyof CodeProps<T>>): JSX.Element;
|
|
193
|
-
|
|
194
|
-
declare const CODE_SIZE: readonly [0, 1, 2, 3, 4];
|
|
195
|
-
|
|
271
|
+
/** @beta */
|
|
272
|
+
export declare function Checkbox(props: CheckboxProps): import("react").JSX.Element;
|
|
196
273
|
declare const CODE_TAG: readonly ["pre", "span"];
|
|
197
|
-
|
|
274
|
+
type CodeTag = (typeof CODE_TAG)[number];
|
|
275
|
+
declare const CODE_SIZE: readonly [0, 1, 2, 3, 4];
|
|
276
|
+
/** @public */
|
|
277
|
+
type CodeSize = (typeof CODE_SIZE)[number];
|
|
278
|
+
declare const FONT_WEIGHT: readonly ["regular", "medium", "semibold", "bold"];
|
|
198
279
|
/** @public */
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
280
|
+
type FontWeight = (typeof FONT_WEIGHT)[number];
|
|
281
|
+
declare const TEXT_ALIGN: readonly ["left", "center", "right", "justify"];
|
|
282
|
+
/** @public */
|
|
283
|
+
type TextAlign = (typeof TEXT_ALIGN)[number];
|
|
284
|
+
/** @public */
|
|
285
|
+
interface TypographyProps extends MarginProps, ToneProps {
|
|
286
|
+
/** CSS **text-align** property */
|
|
287
|
+
align?: Responsive<TextAlign>;
|
|
288
|
+
/** CSS **color** property */
|
|
289
|
+
muted?: boolean;
|
|
290
|
+
/** CSS **text-box-trim** property */
|
|
291
|
+
trim?: boolean;
|
|
292
|
+
/** Number of lines to truncate */
|
|
293
|
+
truncate?: Responsive<number>;
|
|
294
|
+
/** CSS **font-weight** property */
|
|
295
|
+
weight?: FontWeight;
|
|
296
|
+
}
|
|
297
|
+
/** @public */
|
|
298
|
+
interface CodeProps<T extends CodeTag = 'pre'> extends Omit<TypographyProps, 'align' | 'truncate' | 'tone'> {
|
|
203
299
|
/**
|
|
204
300
|
* HTML element or component to render.
|
|
205
301
|
* @remarks The defined element wraps an inner `<code>` tag.
|
|
@@ -214,25 +310,13 @@ export declare interface CodeProps<T extends CodeTag = "pre"> extends Omit<
|
|
|
214
310
|
*/
|
|
215
311
|
size?: Responsive<CodeSize>;
|
|
216
312
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
export declare type CodeSize = (typeof CODE_SIZE)[number];
|
|
220
|
-
|
|
221
|
-
declare type CodeTag = (typeof CODE_TAG)[number];
|
|
222
|
-
|
|
223
|
-
/** @public */
|
|
224
|
-
export declare function Container<T extends ElementType = "div">({
|
|
225
|
-
marginX,
|
|
226
|
-
...props
|
|
227
|
-
}: ContainerProps<T> &
|
|
228
|
-
Omit<ComponentPropsWithRef<T>, keyof ContainerProps<T>>): JSX.Element;
|
|
229
|
-
|
|
313
|
+
/** @public */
|
|
314
|
+
export declare function Code<T extends CodeTag = 'pre'>({ size, ...props }: CodeProps<T> & Omit<ComponentPropsWithRef<T>, keyof CodeProps<T>>): import("react").JSX.Element;
|
|
230
315
|
declare const CONTAINER_SIZE: readonly [0, 1, 2, 3, 4, 5];
|
|
231
|
-
|
|
232
316
|
/** @public */
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
> extends LayoutProps {
|
|
317
|
+
type ContainerSize = (typeof CONTAINER_SIZE)[number];
|
|
318
|
+
/** @public */
|
|
319
|
+
interface ContainerProps<T extends React.ElementType = 'div'> extends LayoutProps {
|
|
236
320
|
/**
|
|
237
321
|
* HTML element or component to render.
|
|
238
322
|
*/
|
|
@@ -242,38 +326,10 @@ export declare interface ContainerProps<
|
|
|
242
326
|
*/
|
|
243
327
|
size?: Responsive<ContainerSize>;
|
|
244
328
|
}
|
|
245
|
-
|
|
246
329
|
/** @public */
|
|
247
|
-
export declare
|
|
248
|
-
|
|
249
|
-
declare const DENSITY: readonly ["compact", "regular", "loose"];
|
|
250
|
-
|
|
251
|
-
/** @public */
|
|
252
|
-
export declare type Density = (typeof DENSITY)[number];
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* @beta
|
|
256
|
-
*
|
|
257
|
-
* Renders a modal dialog element — should not be used for nonmodal dialogs.
|
|
258
|
-
* Modal dialogs make their containing documents inert, and render on the topmost
|
|
259
|
-
* layer within that containing document; they must be dimissed before the containing
|
|
260
|
-
* document and its contents become unblocked. They also trap focus within the bounds
|
|
261
|
-
* of the dialog element and its descendants.
|
|
262
|
-
*
|
|
263
|
-
* For more on dialogs and modality, refer to the HTML specification for the dialog element:
|
|
264
|
-
* https://html.spec.whatwg.org/dev/interactive-elements.html#the-dialog-element
|
|
265
|
-
*/
|
|
266
|
-
export declare const Dialog: typeof DialogRoot;
|
|
267
|
-
|
|
268
|
-
declare function DialogContent(props: ComponentProps<"div">): JSX.Element;
|
|
269
|
-
|
|
270
|
-
declare function DialogFooter(props: ComponentProps<"div">): JSX.Element;
|
|
271
|
-
|
|
330
|
+
export declare function Container<T extends ElementType = 'div'>({ marginX, size, ...props }: ContainerProps<T> & Omit<ComponentPropsWithRef<T>, keyof ContainerProps<T>>): import("react").JSX.Element;
|
|
272
331
|
/** @beta */
|
|
273
|
-
|
|
274
|
-
React.ComponentProps<"dialog">,
|
|
275
|
-
"open"
|
|
276
|
-
> {
|
|
332
|
+
interface DialogProps extends Omit<React.ComponentProps<'dialog'>, 'open'> {
|
|
277
333
|
/**
|
|
278
334
|
* Text for the dialog heading.
|
|
279
335
|
* @remarks Recommended for accessibility. The component sets `aria-labelledby` to the heading when you give this prop.
|
|
@@ -294,51 +350,36 @@ export declare interface DialogProps extends Omit<
|
|
|
294
350
|
/** CSS length value used to set the Dialog’s distance from the top of the viewport; Dialog is centered if not provided */
|
|
295
351
|
topAnchor?: string;
|
|
296
352
|
}
|
|
297
|
-
|
|
298
|
-
declare function DialogRoot({ open, size, ...props }: DialogProps): JSX.Element;
|
|
299
|
-
|
|
353
|
+
declare function DialogRoot({ open, size, ...props }: DialogProps): import("react").JSX.Element;
|
|
300
354
|
declare namespace DialogRoot {
|
|
301
355
|
var displayName: string;
|
|
302
356
|
var Content: typeof DialogContent;
|
|
303
357
|
var Footer: typeof DialogFooter;
|
|
304
358
|
}
|
|
305
|
-
|
|
306
|
-
declare
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
export declare
|
|
320
|
-
|
|
321
|
-
/** @public */
|
|
322
|
-
export declare function Divider(props: DividerProps): JSX.Element;
|
|
323
|
-
|
|
359
|
+
declare function DialogContent(props: ComponentProps<'div'>): import("react").JSX.Element;
|
|
360
|
+
declare function DialogFooter(props: ComponentProps<'div'>): import("react").JSX.Element;
|
|
361
|
+
/**
|
|
362
|
+
* @beta
|
|
363
|
+
*
|
|
364
|
+
* Renders a modal dialog element — should not be used for nonmodal dialogs.
|
|
365
|
+
* Modal dialogs make their containing documents inert, and render on the topmost
|
|
366
|
+
* layer within that containing document; they must be dimissed before the containing
|
|
367
|
+
* document and its contents become unblocked. They also trap focus within the bounds
|
|
368
|
+
* of the dialog element and its descendants.
|
|
369
|
+
*
|
|
370
|
+
* For more on dialogs and modality, refer to the HTML specification for the dialog element:
|
|
371
|
+
* https://html.spec.whatwg.org/dev/interactive-elements.html#the-dialog-element
|
|
372
|
+
*/
|
|
373
|
+
export declare const Dialog: typeof DialogRoot;
|
|
324
374
|
/** @public */
|
|
325
|
-
|
|
326
|
-
extends React.ComponentProps<"hr">, MarginProps {}
|
|
327
|
-
|
|
375
|
+
interface DividerProps extends React.ComponentProps<'hr'>, MarginProps {}
|
|
328
376
|
/** @public */
|
|
329
|
-
export declare function
|
|
330
|
-
size,
|
|
331
|
-
weight,
|
|
332
|
-
...props
|
|
333
|
-
}: EyebrowProps<T> &
|
|
334
|
-
Omit<ComponentPropsWithRef<T>, keyof EyebrowProps<T>>): JSX.Element;
|
|
335
|
-
|
|
377
|
+
export declare function Divider(props: DividerProps): import("react").JSX.Element;
|
|
336
378
|
declare const EYEBROW_SIZE: readonly [0, 1, 2, 3, 4];
|
|
337
|
-
|
|
338
379
|
/** @public */
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
> extends TypographyProps {
|
|
380
|
+
type EyebrowSize = (typeof EYEBROW_SIZE)[number];
|
|
381
|
+
/** @public */
|
|
382
|
+
interface EyebrowProps<T extends React.ElementType = 'span'> extends TypographyProps {
|
|
342
383
|
/**
|
|
343
384
|
* HTML element to render.
|
|
344
385
|
*/
|
|
@@ -348,42 +389,22 @@ export declare interface EyebrowProps<
|
|
|
348
389
|
*/
|
|
349
390
|
size?: Responsive<EyebrowSize>;
|
|
350
391
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
Omit<ComponentPropsWithRef<T>, keyof FlexProps<T>>): JSX.Element;
|
|
363
|
-
|
|
364
|
-
declare const FLEX_DIRECTION: readonly [
|
|
365
|
-
"row",
|
|
366
|
-
"row-reverse",
|
|
367
|
-
"column",
|
|
368
|
-
"column-reverse",
|
|
369
|
-
];
|
|
370
|
-
|
|
392
|
+
/** @public */
|
|
393
|
+
export declare function Eyebrow<T extends ElementType = 'span'>({ size, weight, ...props }: EyebrowProps<T> & Omit<ComponentPropsWithRef<T>, keyof EyebrowProps<T>>): import("react").JSX.Element;
|
|
394
|
+
declare const ALIGN_ITEMS: readonly ["baseline", "center", "flex-end", "flex-start", "stretch"];
|
|
395
|
+
/** @public */
|
|
396
|
+
type AlignItems = (typeof ALIGN_ITEMS)[number];
|
|
397
|
+
declare const JUSTIFY_CONTENT: readonly ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"];
|
|
398
|
+
/** @public */
|
|
399
|
+
type JustifyContent = (typeof JUSTIFY_CONTENT)[number];
|
|
400
|
+
declare const FLEX_DIRECTION: readonly ["row", "row-reverse", "column", "column-reverse"];
|
|
401
|
+
/** @public */
|
|
402
|
+
type FlexDirection = (typeof FLEX_DIRECTION)[number];
|
|
371
403
|
declare const FLEX_WRAP: readonly ["wrap", "wrap-reverse", "nowrap"];
|
|
372
|
-
|
|
373
|
-
declare type FlexChildProps = {
|
|
374
|
-
/** CSS **flex-basis** property */
|
|
375
|
-
flexBasis?: Responsive<string>;
|
|
376
|
-
/** CSS **flex-grow** property */
|
|
377
|
-
flexGrow?: Responsive<number>;
|
|
378
|
-
/** CSS **flex-shrink** property */
|
|
379
|
-
flexShrink?: Responsive<number>;
|
|
380
|
-
};
|
|
381
|
-
|
|
382
404
|
/** @public */
|
|
383
|
-
|
|
384
|
-
|
|
405
|
+
type FlexWrap = (typeof FLEX_WRAP)[number];
|
|
385
406
|
/** @public */
|
|
386
|
-
|
|
407
|
+
type FlexParentProps = {
|
|
387
408
|
/** CSS **align-items** property */
|
|
388
409
|
alignItems?: Responsive<AlignItems>;
|
|
389
410
|
/** CSS **justify-content** property */
|
|
@@ -393,10 +414,17 @@ export declare type FlexParentProps = {
|
|
|
393
414
|
/** CSS **flex-wrap** property */
|
|
394
415
|
flexWrap?: Responsive<FlexWrap>;
|
|
395
416
|
};
|
|
396
|
-
|
|
397
417
|
/** @public */
|
|
398
|
-
|
|
399
|
-
|
|
418
|
+
type GapProps = {
|
|
419
|
+
/** CSS **gap** property */
|
|
420
|
+
gap?: Responsive<SpaceInherit>;
|
|
421
|
+
/** CSS **row-gap** property */
|
|
422
|
+
rowGap?: Responsive<SpaceInherit>;
|
|
423
|
+
/** CSS **column-gap** property */
|
|
424
|
+
columnGap?: Responsive<SpaceInherit>;
|
|
425
|
+
};
|
|
426
|
+
/** @public */
|
|
427
|
+
interface FlexProps<T extends React.ElementType = 'div'> extends FlexParentProps, GapProps, LayoutProps {
|
|
400
428
|
/**
|
|
401
429
|
* HTML element or component to render.
|
|
402
430
|
*/
|
|
@@ -406,62 +434,13 @@ export declare interface FlexProps<T extends React.ElementType = "div">
|
|
|
406
434
|
*/
|
|
407
435
|
display?: Responsive<DisplayFlex>;
|
|
408
436
|
}
|
|
409
|
-
|
|
410
437
|
/** @public */
|
|
411
|
-
export declare
|
|
412
|
-
|
|
413
|
-
declare const FONT_WEIGHT: readonly ["regular", "medium", "semibold", "bold"];
|
|
414
|
-
|
|
438
|
+
export declare function Flex<T extends ElementType = 'div'>({ display, ...props }: FlexProps<T> & Omit<ComponentPropsWithRef<T>, keyof FlexProps<T>>): import("react").JSX.Element;
|
|
439
|
+
declare const GRID_AUTO_FLOW: readonly ["row", "column", "row dense", "column dense", "dense"];
|
|
415
440
|
/** @public */
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
/** @public */
|
|
419
|
-
export declare type GapProps = {
|
|
420
|
-
/** CSS **gap** property */
|
|
421
|
-
gap?: Responsive<SpaceInherit>;
|
|
422
|
-
/** CSS **row-gap** property */
|
|
423
|
-
rowGap?: Responsive<SpaceInherit>;
|
|
424
|
-
/** CSS **column-gap** property */
|
|
425
|
-
columnGap?: Responsive<SpaceInherit>;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
/** @public */
|
|
429
|
-
export declare function Grid<T extends ElementType = "div">({
|
|
430
|
-
display,
|
|
431
|
-
minHeight,
|
|
432
|
-
minWidth,
|
|
433
|
-
...props
|
|
434
|
-
}: GridProps<T> &
|
|
435
|
-
Omit<ComponentPropsWithRef<T>, keyof GridProps<T>>): JSX.Element;
|
|
436
|
-
|
|
437
|
-
declare const GRID_AUTO_FLOW: readonly [
|
|
438
|
-
"row",
|
|
439
|
-
"column",
|
|
440
|
-
"row dense",
|
|
441
|
-
"column dense",
|
|
442
|
-
"dense",
|
|
443
|
-
];
|
|
444
|
-
|
|
445
|
-
/** @public */
|
|
446
|
-
export declare type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number];
|
|
447
|
-
|
|
448
|
-
declare type GridChildProps = {
|
|
449
|
-
/** CSS **grid-column** property */
|
|
450
|
-
gridColumn?: Responsive<string>;
|
|
451
|
-
/** CSS **grid-column-start** property */
|
|
452
|
-
gridColumnStart?: Responsive<string>;
|
|
453
|
-
/** CSS **grid-column-end** property */
|
|
454
|
-
gridColumnEnd?: Responsive<string>;
|
|
455
|
-
/** CSS **grid-row** property */
|
|
456
|
-
gridRow?: Responsive<string>;
|
|
457
|
-
/** CSS **grid-row-start** property */
|
|
458
|
-
gridRowStart?: Responsive<string>;
|
|
459
|
-
/** CSS **grid-row-end** property */
|
|
460
|
-
gridRowEnd?: Responsive<string>;
|
|
461
|
-
};
|
|
462
|
-
|
|
441
|
+
type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number];
|
|
463
442
|
/** @public */
|
|
464
|
-
|
|
443
|
+
type GridParentProps = {
|
|
465
444
|
/** CSS **grid-auto-flow** property */
|
|
466
445
|
gridAutoFlow?: Responsive<GridAutoFlow>;
|
|
467
446
|
/** CSS **grid-auto-columns** property */
|
|
@@ -473,10 +452,8 @@ export declare type GridParentProps = {
|
|
|
473
452
|
/** CSS **grid-template-rows** property */
|
|
474
453
|
gridTemplateRows?: Responsive<string>;
|
|
475
454
|
};
|
|
476
|
-
|
|
477
455
|
/** @public */
|
|
478
|
-
|
|
479
|
-
extends GridParentProps, GapProps, LayoutProps {
|
|
456
|
+
interface GridProps<T extends React.ElementType = 'div'> extends GridParentProps, GapProps, LayoutProps {
|
|
480
457
|
/**
|
|
481
458
|
* HTML element or component to render.
|
|
482
459
|
*/
|
|
@@ -486,21 +463,19 @@ export declare interface GridProps<T extends React.ElementType = "div">
|
|
|
486
463
|
*/
|
|
487
464
|
display?: Responsive<DisplayGrid>;
|
|
488
465
|
}
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
}: HeadingProps &
|
|
496
|
-
Omit<ComponentPropsWithRef<T>, keyof HeadingProps>): JSX.Element;
|
|
497
|
-
|
|
498
|
-
declare const HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
499
|
-
|
|
466
|
+
/** @public */
|
|
467
|
+
export declare function Grid<T extends ElementType = 'div'>({ display, ...props }: GridProps<T> & Omit<ComponentPropsWithRef<T>, keyof GridProps<T>>): import("react").JSX.Element;
|
|
468
|
+
/** @public */
|
|
469
|
+
interface HStackProps<T extends React.ElementType = 'div'> extends Pick<FlexProps<T>, 'as' | 'gap'> {}
|
|
470
|
+
/** @public */
|
|
471
|
+
export declare function HStack<T extends ElementType = 'div'>({ className, ...props }: HStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof HStackProps<T>>): import("react").JSX.Element;
|
|
500
472
|
declare const HEADING_TAG: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
501
|
-
|
|
473
|
+
type HeadingTag = (typeof HEADING_TAG)[number];
|
|
474
|
+
declare const HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
475
|
+
/** @public */
|
|
476
|
+
type HeadingSize = (typeof HEADING_SIZE)[number];
|
|
502
477
|
/** @public */
|
|
503
|
-
|
|
478
|
+
interface HeadingProps extends TypographyProps {
|
|
504
479
|
/**
|
|
505
480
|
* Semantic heading element to render.
|
|
506
481
|
* @remarks Always set this explicitly.
|
|
@@ -512,96 +487,40 @@ export declare interface HeadingProps extends TypographyProps {
|
|
|
512
487
|
*/
|
|
513
488
|
size?: Responsive<HeadingSize>;
|
|
514
489
|
}
|
|
515
|
-
|
|
516
490
|
/** @public */
|
|
517
|
-
export declare
|
|
518
|
-
|
|
519
|
-
declare type HeadingTag = (typeof HEADING_TAG)[number];
|
|
520
|
-
|
|
521
|
-
declare type HeightProps = {
|
|
522
|
-
/** CSS **height** property */
|
|
523
|
-
height?: Responsive<string>;
|
|
524
|
-
/** CSS **min-height** property */
|
|
525
|
-
minHeight?: Responsive<string>;
|
|
526
|
-
/** CSS **max-height** property */
|
|
527
|
-
maxHeight?: Responsive<string>;
|
|
528
|
-
};
|
|
529
|
-
|
|
491
|
+
export declare function Heading<T extends ElementType = 'h2'>({ size, weight, ...props }: HeadingProps & Omit<ComponentPropsWithRef<T>, keyof HeadingProps>): import("react").JSX.Element;
|
|
492
|
+
declare const ICON_SIZE: readonly [0, 1, 2, 3, 4];
|
|
530
493
|
/** @public */
|
|
531
|
-
|
|
532
|
-
props: HStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof HStackProps<T>>,
|
|
533
|
-
): JSX.Element;
|
|
534
|
-
|
|
494
|
+
type IconSize = (typeof ICON_SIZE)[number];
|
|
535
495
|
/** @public */
|
|
536
|
-
|
|
537
|
-
T extends React.ElementType = "div",
|
|
538
|
-
> extends Pick<GapProps, "gap"> {
|
|
496
|
+
interface IconProps extends ComponentProps<'svg'>, Pick<TypographyProps, 'muted'>, MarginProps, ToneProps {
|
|
539
497
|
/**
|
|
540
|
-
*
|
|
498
|
+
* The icon component to render.
|
|
541
499
|
*/
|
|
542
|
-
|
|
500
|
+
icon: React.ComponentType<SVGProps<SVGSVGElement>>;
|
|
501
|
+
/**
|
|
502
|
+
* Sets icon size.
|
|
503
|
+
*/
|
|
504
|
+
size?: Responsive<IconSize>;
|
|
543
505
|
}
|
|
544
|
-
|
|
545
|
-
/** @public */
|
|
546
|
-
export declare function Icon({ size, ...props }: IconProps): JSX.Element;
|
|
547
|
-
|
|
548
|
-
declare const ICON_SIZE: readonly [0, 1, 2, 3, 4];
|
|
549
|
-
|
|
550
506
|
/** @public */
|
|
551
|
-
export declare function
|
|
552
|
-
props: IconButtonProps<T> &
|
|
553
|
-
Omit<ComponentPropsWithRef<T>, keyof IconButtonProps<T>>,
|
|
554
|
-
): JSX.Element;
|
|
555
|
-
|
|
507
|
+
export declare function Icon({ size, ...props }: IconProps): import("react").JSX.Element;
|
|
556
508
|
/** @public */
|
|
557
|
-
|
|
558
|
-
T extends React_2.ElementType = "button",
|
|
559
|
-
> extends Pick<
|
|
560
|
-
ButtonProps<T>,
|
|
561
|
-
"as" | "density" | "level" | "loading" | "tone"
|
|
562
|
-
> {
|
|
509
|
+
interface IconButtonProps<T extends React$1.ElementType = 'button'> extends Pick<ButtonProps<T>, 'as' | 'density' | 'level' | 'loading' | 'tone'> {
|
|
563
510
|
/**
|
|
564
511
|
* Accessible name for the button.
|
|
565
512
|
* @remarks Because IconButtons have no visible text, this is required.
|
|
566
513
|
*/
|
|
567
|
-
|
|
514
|
+
'aria-label': string;
|
|
568
515
|
/**
|
|
569
516
|
* Icon to render.
|
|
570
517
|
*/
|
|
571
|
-
icon:
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/** @public */
|
|
575
|
-
export declare interface IconProps
|
|
576
|
-
extends
|
|
577
|
-
ComponentProps<"svg">,
|
|
578
|
-
Pick<TypographyProps, "muted">,
|
|
579
|
-
MarginProps,
|
|
580
|
-
ToneProps {
|
|
581
|
-
/**
|
|
582
|
-
* The icon component to render.
|
|
583
|
-
*/
|
|
584
|
-
icon: React.ComponentType<SVGProps<SVGSVGElement>>;
|
|
585
|
-
/**
|
|
586
|
-
* Sets icon size.
|
|
587
|
-
*/
|
|
588
|
-
size?: Responsive<IconSize>;
|
|
518
|
+
'icon': React$1.ComponentType<SVGProps<SVGSVGElement>>;
|
|
589
519
|
}
|
|
590
|
-
|
|
591
520
|
/** @public */
|
|
592
|
-
export declare
|
|
593
|
-
|
|
521
|
+
export declare function IconButton<T extends ElementType = 'button'>(props: IconButtonProps<T> & Omit<ComponentPropsWithRef<T>, keyof IconButtonProps<T>>): import("react").JSX.Element;
|
|
594
522
|
/** @beta */
|
|
595
|
-
|
|
596
|
-
tone,
|
|
597
|
-
...props
|
|
598
|
-
}: IndicatorProps<T> &
|
|
599
|
-
Omit<ComponentPropsWithRef<T>, keyof IndicatorProps<T>>): JSX.Element;
|
|
600
|
-
|
|
601
|
-
/** @beta */
|
|
602
|
-
export declare interface IndicatorProps<
|
|
603
|
-
T extends React.ElementType = "span",
|
|
604
|
-
> extends ToneProps {
|
|
523
|
+
interface IndicatorProps<T extends React.ElementType = 'span'> extends ToneProps {
|
|
605
524
|
/**
|
|
606
525
|
* HTML element to render.
|
|
607
526
|
*/
|
|
@@ -611,34 +530,20 @@ export declare interface IndicatorProps<
|
|
|
611
530
|
*/
|
|
612
531
|
label?: string;
|
|
613
532
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
export declare function IndicatorStack<T extends ElementType = "div">(
|
|
617
|
-
props: IndicatorStackProps<T> &
|
|
618
|
-
Omit<ComponentPropsWithRef<T>, keyof IndicatorStackProps<T>>,
|
|
619
|
-
): JSX.Element;
|
|
620
|
-
|
|
533
|
+
/** @beta */
|
|
534
|
+
export declare function Indicator<T extends ElementType = 'span'>({ tone, ...props }: IndicatorProps<T> & Omit<ComponentPropsWithRef<T>, keyof IndicatorProps<T>>): import("react").JSX.Element;
|
|
621
535
|
/** @public */
|
|
622
|
-
|
|
623
|
-
T extends React.ElementType = "div",
|
|
624
|
-
> {
|
|
536
|
+
interface IndicatorStackProps<T extends React.ElementType = 'div'> {
|
|
625
537
|
/**
|
|
626
538
|
* HTML element to render.
|
|
627
539
|
*/
|
|
628
540
|
as?: T;
|
|
629
541
|
}
|
|
630
|
-
|
|
631
|
-
/** @deprecated Use HStack component instead */
|
|
632
542
|
/** @public */
|
|
633
|
-
export declare function
|
|
634
|
-
props: InlineProps<T> & Omit<ComponentPropsWithRef<T>, keyof InlineProps<T>>,
|
|
635
|
-
): JSX.Element;
|
|
636
|
-
|
|
543
|
+
export declare function IndicatorStack<T extends ElementType = 'div'>(props: IndicatorStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof IndicatorStackProps<T>>): import("react").JSX.Element;
|
|
637
544
|
/** @deprecated Use HStack component instead */
|
|
638
545
|
/** @public */
|
|
639
|
-
|
|
640
|
-
T extends React.ElementType = "div",
|
|
641
|
-
> extends PaddingProps {
|
|
546
|
+
interface InlineProps<T extends React.ElementType = 'div'> extends PaddingProps {
|
|
642
547
|
/**
|
|
643
548
|
* HTML element or component to render.
|
|
644
549
|
*/
|
|
@@ -648,32 +553,11 @@ export declare interface InlineProps<
|
|
|
648
553
|
*/
|
|
649
554
|
gap?: Responsive<SpaceInherit>;
|
|
650
555
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
declare type InteractiveAs<T extends React.ElementType> =
|
|
655
|
-
T extends InteractiveTag ? T : T extends string ? never : T;
|
|
656
|
-
|
|
657
|
-
declare type InteractiveTag = (typeof INTERACTIVE_TAG)[number];
|
|
658
|
-
|
|
659
|
-
declare const JUSTIFY_CONTENT: readonly [
|
|
660
|
-
"flex-start",
|
|
661
|
-
"flex-end",
|
|
662
|
-
"center",
|
|
663
|
-
"space-between",
|
|
664
|
-
"space-around",
|
|
665
|
-
"space-evenly",
|
|
666
|
-
];
|
|
667
|
-
|
|
668
|
-
/** @public */
|
|
669
|
-
export declare type JustifyContent = (typeof JUSTIFY_CONTENT)[number];
|
|
670
|
-
|
|
671
|
-
/** @beta */
|
|
672
|
-
export declare function Label(props: LabelProps): JSX.Element;
|
|
673
|
-
|
|
556
|
+
/** @deprecated Use HStack component instead */
|
|
557
|
+
/** @public */
|
|
558
|
+
export declare function Inline<T extends ElementType = 'div'>(props: InlineProps<T> & Omit<ComponentPropsWithRef<T>, keyof InlineProps<T>>): import("react").JSX.Element;
|
|
674
559
|
/** @beta */
|
|
675
|
-
|
|
676
|
-
extends React.ComponentProps<"label">, MarginProps {
|
|
560
|
+
interface LabelProps extends React.ComponentProps<'label'>, MarginProps {
|
|
677
561
|
/**
|
|
678
562
|
* Renders the label in a muted color.
|
|
679
563
|
*/
|
|
@@ -684,28 +568,10 @@ export declare interface LabelProps
|
|
|
684
568
|
*/
|
|
685
569
|
error?: boolean;
|
|
686
570
|
}
|
|
687
|
-
|
|
688
|
-
/** @public */
|
|
689
|
-
export declare interface LayoutProps
|
|
690
|
-
extends
|
|
691
|
-
ToneProps,
|
|
692
|
-
WidthProps,
|
|
693
|
-
HeightProps,
|
|
694
|
-
MarginProps,
|
|
695
|
-
BorderProps,
|
|
696
|
-
PaddingProps,
|
|
697
|
-
PositionProps,
|
|
698
|
-
OverflowProps,
|
|
699
|
-
FlexChildProps,
|
|
700
|
-
GridChildProps,
|
|
701
|
-
ZIndexProps,
|
|
702
|
-
ShadowProps {}
|
|
703
|
-
|
|
704
571
|
/** @beta */
|
|
705
|
-
export declare function
|
|
706
|
-
|
|
572
|
+
export declare function Label(props: LabelProps): import("react").JSX.Element;
|
|
707
573
|
/** @beta */
|
|
708
|
-
|
|
574
|
+
interface LinkProps extends React.ComponentProps<'a'> {
|
|
709
575
|
/**
|
|
710
576
|
* Sets the link to `target="_blank"` and `rel="noopener noreferrer"`.
|
|
711
577
|
*/
|
|
@@ -715,38 +581,19 @@ export declare interface LinkProps extends React.ComponentProps<"a"> {
|
|
|
715
581
|
*/
|
|
716
582
|
underlined?: boolean;
|
|
717
583
|
}
|
|
718
|
-
|
|
719
584
|
/** @beta */
|
|
720
|
-
export declare
|
|
721
|
-
|
|
585
|
+
export declare function Link({ underlined, ...props }: LinkProps): import("react").JSX.Element;
|
|
722
586
|
declare const LIST_TAG: readonly ["ol", "ul"];
|
|
723
|
-
|
|
724
|
-
declare function ListButtonItem<T extends ElementType = "button">({
|
|
725
|
-
density,
|
|
726
|
-
...props
|
|
727
|
-
}: ListButtonItemProps<T> &
|
|
728
|
-
Omit<ComponentPropsWithRef<T>, keyof ListButtonItemProps<T>>): JSX.Element;
|
|
729
|
-
|
|
587
|
+
type ListTag = (typeof LIST_TAG)[number];
|
|
730
588
|
/** @beta */
|
|
731
|
-
|
|
732
|
-
T extends React_2.ElementType = "button",
|
|
733
|
-
> extends ListItemProps {
|
|
589
|
+
interface ListProps<T extends ListTag = 'ul'> extends Pick<GapProps, 'gap'> {
|
|
734
590
|
/**
|
|
735
|
-
*
|
|
736
|
-
*/
|
|
737
|
-
as?: InteractiveAs<T>;
|
|
738
|
-
/**
|
|
739
|
-
* Marks the row as the current selection.
|
|
591
|
+
* HTML element to render.
|
|
740
592
|
*/
|
|
741
|
-
|
|
593
|
+
as?: T;
|
|
742
594
|
}
|
|
743
|
-
|
|
744
|
-
declare function ListItem({ density, ...props }: ListItemProps): JSX.Element;
|
|
745
|
-
|
|
746
|
-
declare function ListItemImage(props: ComponentProps<"img">): JSX.Element;
|
|
747
|
-
|
|
748
595
|
/** @beta */
|
|
749
|
-
|
|
596
|
+
interface ListItemProps extends React$1.ComponentProps<'li'> {
|
|
750
597
|
/**
|
|
751
598
|
* Sets horizontal padding, gap, and minimum row height together.
|
|
752
599
|
*/
|
|
@@ -754,51 +601,39 @@ export declare interface ListItemProps extends React_2.ComponentProps<"li"> {
|
|
|
754
601
|
/**
|
|
755
602
|
* Slot at the left edge of the row.
|
|
756
603
|
*/
|
|
757
|
-
start?:
|
|
604
|
+
start?: React$1.ReactNode;
|
|
758
605
|
/**
|
|
759
606
|
* Slot at the right edge of the row.
|
|
760
607
|
*/
|
|
761
|
-
end?:
|
|
608
|
+
end?: React$1.ReactNode;
|
|
762
609
|
}
|
|
763
|
-
|
|
764
|
-
declare function ListItemText<T extends ElementType = "div">(
|
|
765
|
-
props: ListItemTextProps<T> &
|
|
766
|
-
Omit<ComponentPropsWithRef<T>, keyof ListItemTextProps<T>>,
|
|
767
|
-
): JSX.Element;
|
|
768
|
-
|
|
769
610
|
/** @beta */
|
|
770
|
-
|
|
771
|
-
T extends React_2.ElementType = "div",
|
|
772
|
-
> {
|
|
611
|
+
interface ListButtonItemProps<T extends React$1.ElementType = 'button'> extends ListItemProps {
|
|
773
612
|
/**
|
|
774
|
-
*
|
|
775
|
-
*/
|
|
776
|
-
as?: T;
|
|
777
|
-
/**
|
|
778
|
-
* Main label.
|
|
613
|
+
* Element or component to render for the press target.
|
|
779
614
|
*/
|
|
780
|
-
|
|
615
|
+
as?: InteractiveAs<T>;
|
|
781
616
|
/**
|
|
782
|
-
*
|
|
617
|
+
* Marks the row as the current selection.
|
|
783
618
|
*/
|
|
784
|
-
|
|
619
|
+
selected?: boolean;
|
|
785
620
|
}
|
|
786
|
-
|
|
787
621
|
/** @beta */
|
|
788
|
-
|
|
789
|
-
GapProps,
|
|
790
|
-
"gap"
|
|
791
|
-
> {
|
|
622
|
+
interface ListItemTextProps<T extends React$1.ElementType = 'div'> {
|
|
792
623
|
/**
|
|
793
624
|
* HTML element to render.
|
|
794
625
|
*/
|
|
795
626
|
as?: T;
|
|
627
|
+
/**
|
|
628
|
+
* Main label.
|
|
629
|
+
*/
|
|
630
|
+
title?: React$1.ReactNode;
|
|
631
|
+
/**
|
|
632
|
+
* Text below the title.
|
|
633
|
+
*/
|
|
634
|
+
subtitle?: React$1.ReactNode;
|
|
796
635
|
}
|
|
797
|
-
|
|
798
|
-
declare function ListRoot<T extends ListTag = "ul">(
|
|
799
|
-
props: ListProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListProps<T>>,
|
|
800
|
-
): JSX.Element;
|
|
801
|
-
|
|
636
|
+
declare function ListRoot<T extends ListTag = 'ul'>(props: ListProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListProps<T>>): import("react").JSX.Element;
|
|
802
637
|
declare namespace ListRoot {
|
|
803
638
|
var displayName: string;
|
|
804
639
|
var Item: typeof ListItem;
|
|
@@ -806,99 +641,22 @@ declare namespace ListRoot {
|
|
|
806
641
|
var ItemText: typeof ListItemText;
|
|
807
642
|
var ItemImage: typeof ListItemImage;
|
|
808
643
|
}
|
|
809
|
-
|
|
810
|
-
declare
|
|
811
|
-
|
|
644
|
+
declare function ListItem({ density, ...props }: ListItemProps): import("react").JSX.Element;
|
|
645
|
+
declare function ListButtonItem<T extends ElementType = 'button'>({ density, ...props }: ListButtonItemProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListButtonItemProps<T>>): import("react").JSX.Element;
|
|
646
|
+
declare function ListItemText<T extends ElementType = 'div'>(props: ListItemTextProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListItemTextProps<T>>): import("react").JSX.Element;
|
|
647
|
+
declare function ListItemImage(props: ComponentProps<'img'>): import("react").JSX.Element;
|
|
648
|
+
/** @beta */
|
|
649
|
+
export declare const List: typeof ListRoot;
|
|
650
|
+
declare const PLACEMENT: readonly ["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end"];
|
|
812
651
|
/** @public */
|
|
813
|
-
|
|
814
|
-
/** CSS **margin** property */
|
|
815
|
-
margin?: Responsive<SpaceAutoNegative>;
|
|
816
|
-
/** CSS **margin-left** and **margin-right** properties */
|
|
817
|
-
marginX?: Responsive<SpaceAutoNegative>;
|
|
818
|
-
/** CSS **margin-top** and **margin-bottom** properties */
|
|
819
|
-
marginY?: Responsive<SpaceAutoNegative>;
|
|
820
|
-
/** CSS **margin-top** property */
|
|
821
|
-
marginTop?: Responsive<SpaceAutoNegative>;
|
|
822
|
-
/** CSS **margin-right** property */
|
|
823
|
-
marginRight?: Responsive<SpaceAutoNegative>;
|
|
824
|
-
/** CSS **margin-bottom** property */
|
|
825
|
-
marginBottom?: Responsive<SpaceAutoNegative>;
|
|
826
|
-
/** CSS **margin-left** property */
|
|
827
|
-
marginLeft?: Responsive<SpaceAutoNegative>;
|
|
828
|
-
};
|
|
829
|
-
|
|
830
|
-
declare const OVERFLOW: readonly [
|
|
831
|
-
"visible",
|
|
832
|
-
"hidden",
|
|
833
|
-
"auto",
|
|
834
|
-
"scroll",
|
|
835
|
-
"clip",
|
|
836
|
-
];
|
|
837
|
-
|
|
838
|
-
/** @public */
|
|
839
|
-
export declare type Overflow = (typeof OVERFLOW)[number];
|
|
840
|
-
|
|
841
|
-
declare type OverflowProps = {
|
|
842
|
-
/** CSS **overflow** property */
|
|
843
|
-
overflow?: Responsive<Overflow>;
|
|
844
|
-
/** CSS **overflow-x** property */
|
|
845
|
-
overflowX?: Responsive<Overflow>;
|
|
846
|
-
/** CSS **overflow-y** property */
|
|
847
|
-
overflowY?: Responsive<Overflow>;
|
|
848
|
-
};
|
|
849
|
-
|
|
652
|
+
type Placement = (typeof PLACEMENT)[number];
|
|
850
653
|
/** @public */
|
|
851
|
-
|
|
852
|
-
/** CSS **padding** property */
|
|
853
|
-
padding?: Responsive<Space>;
|
|
854
|
-
/** CSS **padding-left** and **padding-right** properties */
|
|
855
|
-
paddingX?: Responsive<Space>;
|
|
856
|
-
/** CSS **padding-top** and **padding-bottom** properties */
|
|
857
|
-
paddingY?: Responsive<Space>;
|
|
858
|
-
/** CSS **padding-top** property */
|
|
859
|
-
paddingTop?: Responsive<Space>;
|
|
860
|
-
/** CSS **padding-right** property */
|
|
861
|
-
paddingRight?: Responsive<Space>;
|
|
862
|
-
/** CSS **padding-bottom** property */
|
|
863
|
-
paddingBottom?: Responsive<Space>;
|
|
864
|
-
/** CSS **padding-left** property */
|
|
865
|
-
paddingLeft?: Responsive<Space>;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
declare const PLACEMENT: readonly [
|
|
869
|
-
"top",
|
|
870
|
-
"top-start",
|
|
871
|
-
"top-end",
|
|
872
|
-
"right",
|
|
873
|
-
"right-start",
|
|
874
|
-
"right-end",
|
|
875
|
-
"bottom",
|
|
876
|
-
"bottom-start",
|
|
877
|
-
"bottom-end",
|
|
878
|
-
"left",
|
|
879
|
-
"left-start",
|
|
880
|
-
"left-end",
|
|
881
|
-
];
|
|
882
|
-
|
|
883
|
-
/** @public */
|
|
884
|
-
export declare type Placement = (typeof PLACEMENT)[number];
|
|
885
|
-
|
|
886
|
-
/** @public */
|
|
887
|
-
export declare type PlacementProps = {
|
|
654
|
+
type PlacementProps = {
|
|
888
655
|
/** Placement relative to anchor */
|
|
889
656
|
placement?: Placement;
|
|
890
657
|
};
|
|
891
|
-
|
|
892
658
|
/** @beta */
|
|
893
|
-
|
|
894
|
-
forwardsTriggerProps: boolean;
|
|
895
|
-
};
|
|
896
|
-
|
|
897
|
-
/** @beta */
|
|
898
|
-
export declare interface PopoverProps
|
|
899
|
-
extends
|
|
900
|
-
Omit<React.ComponentProps<"div">, "children" | "content">,
|
|
901
|
-
PlacementProps {
|
|
659
|
+
interface PopoverProps extends Omit<React.ComponentProps<'div'>, 'children' | 'content'>, PlacementProps {
|
|
902
660
|
/**
|
|
903
661
|
* Shared anchor identifier.
|
|
904
662
|
* @remarks Set the same value on a Tooltip and a Popover to point both at one trigger.
|
|
@@ -918,62 +676,24 @@ export declare interface PopoverProps
|
|
|
918
676
|
*/
|
|
919
677
|
portal?: boolean;
|
|
920
678
|
}
|
|
921
|
-
|
|
922
|
-
declare function PopoverRoot({
|
|
923
|
-
placement,
|
|
924
|
-
...props
|
|
925
|
-
}: PopoverProps & {
|
|
679
|
+
declare function PopoverRoot({ placement, ...props }: PopoverProps & {
|
|
926
680
|
triggerProps?: Record<string, unknown>;
|
|
927
|
-
}): JSX.Element;
|
|
928
|
-
|
|
929
|
-
declare const
|
|
930
|
-
|
|
931
|
-
"fixed",
|
|
932
|
-
"relative",
|
|
933
|
-
"static",
|
|
934
|
-
"sticky",
|
|
935
|
-
];
|
|
936
|
-
|
|
937
|
-
/** @public */
|
|
938
|
-
export declare type Position = (typeof POSITION)[number];
|
|
939
|
-
|
|
940
|
-
declare type PositionProps = {
|
|
941
|
-
/** CSS **position** property */
|
|
942
|
-
position?: Responsive<Position>;
|
|
943
|
-
/** CSS **inset** property */
|
|
944
|
-
inset?: Responsive<SpaceAuto>;
|
|
945
|
-
/** CSS **top** property */
|
|
946
|
-
top?: Responsive<SpaceAuto>;
|
|
947
|
-
/** CSS **right** property */
|
|
948
|
-
right?: Responsive<SpaceAuto>;
|
|
949
|
-
/** CSS **bottom** property */
|
|
950
|
-
bottom?: Responsive<SpaceAuto>;
|
|
951
|
-
/** CSS **left** property */
|
|
952
|
-
left?: Responsive<SpaceAuto>;
|
|
681
|
+
}): import("react").JSX.Element;
|
|
682
|
+
/** @beta */
|
|
683
|
+
export declare const Popover: typeof PopoverRoot & {
|
|
684
|
+
forwardsTriggerProps: boolean;
|
|
953
685
|
};
|
|
954
|
-
|
|
955
|
-
/** @public */
|
|
956
|
-
export declare function PressArea<T extends ElementType = "button">(
|
|
957
|
-
props: PressAreaProps<T> &
|
|
958
|
-
Omit<ComponentPropsWithRef<T>, keyof PressAreaProps<T>>,
|
|
959
|
-
): JSX.Element;
|
|
960
|
-
|
|
961
686
|
/** @public */
|
|
962
|
-
|
|
963
|
-
T extends React.ElementType = "button",
|
|
964
|
-
> {
|
|
687
|
+
interface PressAreaProps<T extends React.ElementType = 'button'> {
|
|
965
688
|
/**
|
|
966
689
|
* Element or component to render.
|
|
967
690
|
*/
|
|
968
691
|
as?: InteractiveAs<T>;
|
|
969
692
|
}
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
export declare function Radio(props: RadioProps): JSX.Element;
|
|
973
|
-
|
|
693
|
+
/** @public */
|
|
694
|
+
export declare function PressArea<T extends ElementType = 'button'>(props: PressAreaProps<T> & Omit<ComponentPropsWithRef<T>, keyof PressAreaProps<T>>): import("react").JSX.Element;
|
|
974
695
|
/** @beta */
|
|
975
|
-
|
|
976
|
-
extends React.ComponentProps<"input">, MarginProps {
|
|
696
|
+
interface RadioProps extends React.ComponentProps<'input'>, MarginProps {
|
|
977
697
|
/**
|
|
978
698
|
* Applies error styling to the radio mark.
|
|
979
699
|
* @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
|
|
@@ -984,50 +704,32 @@ export declare interface RadioProps
|
|
|
984
704
|
*/
|
|
985
705
|
label: React.ReactNode;
|
|
986
706
|
}
|
|
987
|
-
|
|
988
|
-
declare
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
export declare type Radius = (typeof RADIUS)[number];
|
|
992
|
-
|
|
993
|
-
/** @public */
|
|
994
|
-
export declare type Responsive<T> =
|
|
995
|
-
| T
|
|
996
|
-
| []
|
|
997
|
-
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
998
|
-
length: 1;
|
|
999
|
-
})
|
|
1000
|
-
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1001
|
-
length: 2;
|
|
1002
|
-
})
|
|
1003
|
-
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1004
|
-
length: 3;
|
|
1005
|
-
})
|
|
1006
|
-
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1007
|
-
length: 4;
|
|
1008
|
-
})
|
|
1009
|
-
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1010
|
-
length: 5;
|
|
1011
|
-
})
|
|
1012
|
-
| ([T | undefined | null, ...(T | undefined | null)[]] & {
|
|
1013
|
-
length: 6;
|
|
1014
|
-
});
|
|
1015
|
-
|
|
1016
|
-
declare const SHADOW: readonly [0, 1, 2, 3, 4, 5];
|
|
1017
|
-
|
|
707
|
+
/** @beta */
|
|
708
|
+
export declare function Radio(props: RadioProps): import("react").JSX.Element;
|
|
709
|
+
declare const FORM_ELEMENT_DENSITY: readonly ["regular", "loose"];
|
|
710
|
+
type FormElementDensity = (typeof FORM_ELEMENT_DENSITY)[number];
|
|
1018
711
|
/** @public */
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
712
|
+
type FormElementDensityProps = {
|
|
713
|
+
/**
|
|
714
|
+
* Sets padding, gap, and other spacing values on the form element.
|
|
715
|
+
*/
|
|
716
|
+
density?: FormElementDensity;
|
|
1024
717
|
};
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
718
|
+
/** @public */
|
|
719
|
+
type SelectProps = React.ComponentProps<'select'> & FormElementDensityProps & {
|
|
720
|
+
/**
|
|
721
|
+
* Disables the select element, blocking interactions and hiding it from screen readers.
|
|
722
|
+
*/
|
|
723
|
+
disabled?: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* Used to trigger styling for invalid states.
|
|
726
|
+
*/
|
|
727
|
+
hasError?: boolean;
|
|
728
|
+
};
|
|
729
|
+
/** @public */
|
|
730
|
+
export declare function Select({ density, hasError, ...props }: SelectProps): import("react").JSX.Element;
|
|
1029
731
|
/** @beta */
|
|
1030
|
-
|
|
732
|
+
interface SkipToContentProps extends React.ComponentProps<'a'> {
|
|
1031
733
|
/**
|
|
1032
734
|
* Same-page fragment to jump to.
|
|
1033
735
|
* @remarks Note: The hash character # is required for proper linking.
|
|
@@ -1043,65 +745,19 @@ export declare interface SkipToContentProps extends React.ComponentProps<"a"> {
|
|
|
1043
745
|
*/
|
|
1044
746
|
children?: never;
|
|
1045
747
|
}
|
|
1046
|
-
|
|
1047
|
-
declare
|
|
1048
|
-
|
|
1049
|
-
/** @public */
|
|
1050
|
-
export declare type Space = (typeof SPACE)[number];
|
|
1051
|
-
|
|
1052
|
-
declare const SPACE_AUTO: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "auto"];
|
|
1053
|
-
|
|
1054
|
-
declare const SPACE_AUTO_NEGATIVE: readonly [
|
|
1055
|
-
-9,
|
|
1056
|
-
-8,
|
|
1057
|
-
-7,
|
|
1058
|
-
-6,
|
|
1059
|
-
-5,
|
|
1060
|
-
-4,
|
|
1061
|
-
-3,
|
|
1062
|
-
-2,
|
|
1063
|
-
-1,
|
|
1064
|
-
0,
|
|
1065
|
-
1,
|
|
1066
|
-
2,
|
|
1067
|
-
3,
|
|
1068
|
-
4,
|
|
1069
|
-
5,
|
|
1070
|
-
6,
|
|
1071
|
-
7,
|
|
1072
|
-
8,
|
|
1073
|
-
9,
|
|
1074
|
-
"auto",
|
|
1075
|
-
];
|
|
1076
|
-
|
|
1077
|
-
declare const SPACE_INHERIT: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "inherit"];
|
|
1078
|
-
|
|
1079
|
-
/** @public */
|
|
1080
|
-
export declare type SpaceAuto = (typeof SPACE_AUTO)[number];
|
|
1081
|
-
|
|
1082
|
-
/** @public */
|
|
1083
|
-
export declare type SpaceAutoNegative = (typeof SPACE_AUTO_NEGATIVE)[number];
|
|
1084
|
-
|
|
1085
|
-
/** @public */
|
|
1086
|
-
export declare type SpaceInherit = (typeof SPACE_INHERIT)[number];
|
|
1087
|
-
|
|
1088
|
-
/** @public */
|
|
1089
|
-
export declare function Spinner({ size, ...props }: SpinnerProps): JSX.Element;
|
|
1090
|
-
|
|
748
|
+
/** @beta */
|
|
749
|
+
export declare function SkipToContent(props: SkipToContentProps): import("react").JSX.Element;
|
|
1091
750
|
/** @public */
|
|
1092
|
-
|
|
751
|
+
interface SpinnerProps extends React.ComponentProps<'svg'> {
|
|
1093
752
|
/**
|
|
1094
753
|
* Size of the spinner icon.
|
|
1095
754
|
*/
|
|
1096
755
|
size?: Responsive<IconSize>;
|
|
1097
756
|
}
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
export declare function Switch(props: SwitchProps): JSX.Element;
|
|
1101
|
-
|
|
757
|
+
/** @public */
|
|
758
|
+
export declare function Spinner({ size, ...props }: SpinnerProps): import("react").JSX.Element;
|
|
1102
759
|
/** @beta */
|
|
1103
|
-
|
|
1104
|
-
extends React.ComponentProps<"input">, MarginProps {
|
|
760
|
+
interface SwitchProps extends React.ComponentProps<'input'>, MarginProps {
|
|
1105
761
|
/**
|
|
1106
762
|
* Applies error styling to the switch track.
|
|
1107
763
|
* @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
|
|
@@ -1112,26 +768,13 @@ export declare interface SwitchProps
|
|
|
1112
768
|
*/
|
|
1113
769
|
label: React.ReactNode;
|
|
1114
770
|
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
declare function Text_2<T extends ElementType = "span">({
|
|
1118
|
-
size,
|
|
1119
|
-
...props
|
|
1120
|
-
}: TextProps<T> &
|
|
1121
|
-
Omit<ComponentPropsWithRef<T>, keyof TextProps<T>>): JSX.Element;
|
|
1122
|
-
export { Text_2 as Text };
|
|
1123
|
-
|
|
1124
|
-
declare const TEXT_ALIGN: readonly ["left", "center", "right", "justify"];
|
|
1125
|
-
|
|
771
|
+
/** @beta */
|
|
772
|
+
export declare function Switch(props: SwitchProps): import("react").JSX.Element;
|
|
1126
773
|
declare const TEXT_SIZE: readonly [0, 1, 2, 3, 4];
|
|
1127
|
-
|
|
1128
774
|
/** @public */
|
|
1129
|
-
|
|
1130
|
-
|
|
775
|
+
type TextSize = (typeof TEXT_SIZE)[number];
|
|
1131
776
|
/** @public */
|
|
1132
|
-
|
|
1133
|
-
T extends React.ElementType = "span",
|
|
1134
|
-
> extends TypographyProps {
|
|
777
|
+
interface TextProps<T extends React.ElementType = 'span'> extends TypographyProps {
|
|
1135
778
|
/**
|
|
1136
779
|
* HTML element to render.
|
|
1137
780
|
*/
|
|
@@ -1141,50 +784,10 @@ export declare interface TextProps<
|
|
|
1141
784
|
*/
|
|
1142
785
|
size?: Responsive<TextSize>;
|
|
1143
786
|
}
|
|
1144
|
-
|
|
1145
|
-
/** @public */
|
|
1146
|
-
export declare type TextSize = (typeof TEXT_SIZE)[number];
|
|
1147
|
-
|
|
1148
|
-
declare const TONE: readonly [
|
|
1149
|
-
"neutral",
|
|
1150
|
-
"positive",
|
|
1151
|
-
"suggest",
|
|
1152
|
-
"caution",
|
|
1153
|
-
"critical",
|
|
1154
|
-
];
|
|
1155
|
-
|
|
1156
|
-
/** @public */
|
|
1157
|
-
export declare type Tone = (typeof TONE)[number];
|
|
1158
|
-
|
|
1159
|
-
declare type ToneProps = {
|
|
1160
|
-
/** CSS **background-color** property */
|
|
1161
|
-
tone?: Tone;
|
|
1162
|
-
};
|
|
1163
|
-
|
|
1164
|
-
/** @beta */
|
|
1165
|
-
export declare const Tooltip: typeof TooltipRoot;
|
|
1166
|
-
|
|
1167
|
-
/** @public */
|
|
1168
|
-
export declare function TooltipGroup<T extends ElementType = "div">(
|
|
1169
|
-
props: TooltipGroupProps<T> &
|
|
1170
|
-
Omit<ComponentPropsWithRef<T>, keyof TooltipGroupProps<T>>,
|
|
1171
|
-
): JSX.Element;
|
|
1172
|
-
|
|
1173
787
|
/** @public */
|
|
1174
|
-
export declare
|
|
1175
|
-
T extends React.ElementType = "div",
|
|
1176
|
-
> {
|
|
1177
|
-
/**
|
|
1178
|
-
* HTML element to render.
|
|
1179
|
-
*/
|
|
1180
|
-
as?: T;
|
|
1181
|
-
}
|
|
1182
|
-
|
|
788
|
+
export declare function Text<T extends ElementType = 'span'>({ size, ...props }: TextProps<T> & Omit<ComponentPropsWithRef<T>, keyof TextProps<T>>): import("react").JSX.Element;
|
|
1183
789
|
/** @beta */
|
|
1184
|
-
|
|
1185
|
-
extends
|
|
1186
|
-
Omit<React.ComponentProps<"div">, "children" | "content">,
|
|
1187
|
-
PlacementProps {
|
|
790
|
+
interface TooltipProps extends Omit<React.ComponentProps<'div'>, 'children' | 'content'>, PlacementProps {
|
|
1188
791
|
/**
|
|
1189
792
|
* Shared anchor identifier.
|
|
1190
793
|
*/
|
|
@@ -1202,41 +805,26 @@ export declare interface TooltipProps
|
|
|
1202
805
|
*/
|
|
1203
806
|
portal?: boolean;
|
|
1204
807
|
}
|
|
1205
|
-
|
|
1206
|
-
declare function TooltipRoot({
|
|
1207
|
-
placement,
|
|
1208
|
-
...props
|
|
1209
|
-
}: TooltipProps & {
|
|
808
|
+
declare function TooltipRoot({ placement, ...props }: TooltipProps & {
|
|
1210
809
|
triggerProps?: Record<string, unknown>;
|
|
1211
|
-
}): JSX.Element;
|
|
1212
|
-
|
|
810
|
+
}): import("react").JSX.Element;
|
|
811
|
+
/** @beta */
|
|
812
|
+
export declare const Tooltip: typeof TooltipRoot;
|
|
1213
813
|
/** @public */
|
|
1214
|
-
|
|
1215
|
-
/**
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
/** CSS **text-box-trim** property */
|
|
1220
|
-
trim?: boolean;
|
|
1221
|
-
/** Number of lines to truncate */
|
|
1222
|
-
truncate?: Responsive<number>;
|
|
1223
|
-
/** CSS **font-weight** property */
|
|
1224
|
-
weight?: FontWeight;
|
|
814
|
+
interface TooltipGroupProps<T extends React.ElementType = 'div'> {
|
|
815
|
+
/**
|
|
816
|
+
* HTML element to render.
|
|
817
|
+
*/
|
|
818
|
+
as?: T;
|
|
1225
819
|
}
|
|
1226
|
-
|
|
1227
820
|
/** @public */
|
|
1228
|
-
export declare function
|
|
1229
|
-
|
|
821
|
+
export declare function TooltipGroup<T extends ElementType = 'div'>(props: TooltipGroupProps<T> & Omit<ComponentPropsWithRef<T>, keyof TooltipGroupProps<T>>): import("react").JSX.Element;
|
|
822
|
+
/** @public */
|
|
823
|
+
interface VStackProps<T extends React.ElementType = 'div'> extends Pick<FlexProps<T>, 'as' | 'gap'> {}
|
|
1230
824
|
/** @public */
|
|
1231
|
-
export declare function
|
|
1232
|
-
props: VisuallyHiddenProps<T> &
|
|
1233
|
-
Omit<ComponentPropsWithRef<T>, keyof VisuallyHiddenProps<T>>,
|
|
1234
|
-
): JSX.Element;
|
|
1235
|
-
|
|
825
|
+
export declare function VStack<T extends ElementType = 'div'>({ className, ...props }: VStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof VStackProps<T>>): import("react").JSX.Element;
|
|
1236
826
|
/** @public */
|
|
1237
|
-
|
|
1238
|
-
T extends React.ElementType = "span",
|
|
1239
|
-
> {
|
|
827
|
+
interface VisuallyHiddenProps<T extends React.ElementType = 'span'> {
|
|
1240
828
|
/**
|
|
1241
829
|
* HTML element to render.
|
|
1242
830
|
*/
|
|
@@ -1246,34 +834,26 @@ export declare interface VisuallyHiddenProps<
|
|
|
1246
834
|
*/
|
|
1247
835
|
visibleOnFocus?: boolean;
|
|
1248
836
|
}
|
|
1249
|
-
|
|
1250
837
|
/** @public */
|
|
1251
|
-
export declare function
|
|
1252
|
-
props: VStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof VStackProps<T>>,
|
|
1253
|
-
): JSX.Element;
|
|
1254
|
-
|
|
838
|
+
export declare function VisuallyHidden<T extends ElementType = 'span'>(props: VisuallyHiddenProps<T> & Omit<ComponentPropsWithRef<T>, keyof VisuallyHiddenProps<T>>): import("react").JSX.Element;
|
|
1255
839
|
/** @public */
|
|
1256
|
-
export declare
|
|
1257
|
-
|
|
1258
|
-
|
|
840
|
+
export declare function useIsClient(): boolean;
|
|
841
|
+
/** @public */
|
|
842
|
+
interface BadgeProps<T extends React.ElementType = 'span'> extends ToneProps {
|
|
1259
843
|
/**
|
|
1260
|
-
* HTML element
|
|
844
|
+
* HTML element to render.
|
|
1261
845
|
*/
|
|
1262
846
|
as?: T;
|
|
847
|
+
/**
|
|
848
|
+
* Shows an icon in the start position (left side in left-to-right languages).
|
|
849
|
+
*/
|
|
850
|
+
iconStart?: React.ElementType | React.ReactNode;
|
|
851
|
+
/**
|
|
852
|
+
* Sets Badge's text label. Use instead of children unless you have a special use case.
|
|
853
|
+
*/
|
|
854
|
+
text?: string;
|
|
1263
855
|
}
|
|
1264
|
-
|
|
1265
|
-
declare
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
/** CSS **min-width** property */
|
|
1269
|
-
minWidth?: Responsive<string>;
|
|
1270
|
-
/** CSS **max-width** property */
|
|
1271
|
-
maxWidth?: Responsive<string>;
|
|
1272
|
-
};
|
|
1273
|
-
|
|
1274
|
-
declare type ZIndexProps = {
|
|
1275
|
-
/** CSS z-index property */
|
|
1276
|
-
zIndex?: Responsive<number>;
|
|
1277
|
-
};
|
|
1278
|
-
|
|
1279
|
-
export {};
|
|
856
|
+
/** @public */
|
|
857
|
+
export declare function Badge<T extends ElementType = 'span'>({ tone, ...props }: BadgeProps<T> & Omit<ComponentPropsWithRef<T>, keyof BadgeProps<T>>): import("react").JSX.Element;
|
|
858
|
+
export type { AlignItems, BadgeProps, BoxProps, ButtonProps, CardProps, CheckboxProps, CodeProps, CodeSize, ContainerProps, ContainerSize, Density, DialogProps, DisplayBlock, DisplayFlex, DisplayGrid, DividerProps, EyebrowProps, EyebrowSize, FlexDirection, FlexParentProps, FlexProps, FlexWrap, FontWeight, GapProps, GridAutoFlow, GridParentProps, GridProps, HStackProps, HeadingProps, HeadingSize, IconButtonProps, IconProps, IconSize, IndicatorProps, IndicatorStackProps, InlineProps, JustifyContent, LabelProps, LayoutProps, LinkProps, ListButtonItemProps, ListItemProps, ListItemTextProps, ListProps, MarginProps, Overflow, PaddingProps, Placement, PlacementProps, PopoverProps, Position, PressAreaProps, RadioProps, Radius, Responsive, SelectProps, Shadow, SkipToContentProps, Space, SpaceAuto, SpaceAutoNegative, SpaceInherit, SpinnerProps, SwitchProps, TextAlign, TextProps, TextSize, Tone, TooltipGroupProps, TooltipProps, TypographyProps, VStackProps, VisuallyHiddenProps };
|
|
859
|
+
//# sourceMappingURL=index.d.ts.map
|