@wistia/ui 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.cjs +5998 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +956 -0
- package/dist/index.d.ts +956 -0
- package/dist/index.mjs +5947 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +115 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,956 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ReactNode, JSX, ComponentPropsWithoutRef, ComponentPropsWithRef, MouseEvent, JSXElementConstructor, ElementType as ElementType$1 } from 'react';
|
|
4
|
+
import * as styled_components from 'styled-components';
|
|
5
|
+
|
|
6
|
+
type UIProviderProps = {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
declare const UIProvider: ({ children }: UIProviderProps) => react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Copies a string to user's clipboard for easy pasting in another location
|
|
13
|
+
*
|
|
14
|
+
* @param {string} textToCopy - the string that will be copied to users clipboard
|
|
15
|
+
* @returns {Promise<void>} - Promise object that resolves when the text is copied
|
|
16
|
+
*/
|
|
17
|
+
declare const copyToClipboard: (textToCopy: string) => Promise<void>;
|
|
18
|
+
|
|
19
|
+
type MediaQueryBooleans = {
|
|
20
|
+
isXlAndUp: boolean;
|
|
21
|
+
isLgAndUp: boolean;
|
|
22
|
+
isMdAndUp: boolean;
|
|
23
|
+
isSmAndUp: boolean;
|
|
24
|
+
isXsAndUp: boolean;
|
|
25
|
+
isXsAndDown: boolean;
|
|
26
|
+
isSmAndDown: boolean;
|
|
27
|
+
isMdAndDown: boolean;
|
|
28
|
+
isLgAndDown: boolean;
|
|
29
|
+
isXlAndDown: boolean;
|
|
30
|
+
};
|
|
31
|
+
declare const useMq: () => MediaQueryBooleans;
|
|
32
|
+
type MediaQueryLabels = keyof MediaQueryBooleans;
|
|
33
|
+
declare const useActiveMq: () => MediaQueryLabels[];
|
|
34
|
+
|
|
35
|
+
declare const useWindowSize: (interval?: number) => {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type AriaLiveContextType = {
|
|
41
|
+
announce: (message: string, politeness?: 'assertive' | 'polite') => void;
|
|
42
|
+
};
|
|
43
|
+
declare const useAriaLive: () => AriaLiveContextType;
|
|
44
|
+
|
|
45
|
+
type JustifyContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'space-evenly';
|
|
46
|
+
type AlignContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'stretch';
|
|
47
|
+
type AlignItemsType = 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch';
|
|
48
|
+
type AlignSelfType = 'auto' | 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch';
|
|
49
|
+
type DirectionType = 'column-reverse' | 'column' | 'row-reverse' | 'row';
|
|
50
|
+
type FillType = boolean | 'horizontal' | 'vertical';
|
|
51
|
+
type Gap = {
|
|
52
|
+
column: number | string;
|
|
53
|
+
row: number | string;
|
|
54
|
+
};
|
|
55
|
+
type BoxProps = ComponentPropsWithoutRef<'div'> & {
|
|
56
|
+
/**
|
|
57
|
+
* Specifies how the browser distributes space between and around
|
|
58
|
+
* items along the cross-axis of their container; has no effect on
|
|
59
|
+
* single line flexible boxes
|
|
60
|
+
*/
|
|
61
|
+
alignContent?: AlignContentType;
|
|
62
|
+
/**
|
|
63
|
+
* Specifies how the browser distributes space between and around
|
|
64
|
+
* items along the cross-axis of their container; the difference
|
|
65
|
+
* to the alignContent prop is that alignItems specifies the
|
|
66
|
+
* alignment of the items within the current container's line,
|
|
67
|
+
* whereas alignContent specifies the alignment of the lines themselves
|
|
68
|
+
*/
|
|
69
|
+
alignItems?: AlignItemsType;
|
|
70
|
+
/**
|
|
71
|
+
* Specifies how the browser aligns items of the current line, overriding the
|
|
72
|
+
* alignItems value of parent; if any of the item's cross-axis margin is set to auto,
|
|
73
|
+
* then alignSelf is ignored
|
|
74
|
+
*
|
|
75
|
+
* *Note: only works for nested `<Box />`*
|
|
76
|
+
*/
|
|
77
|
+
alignSelf?: AlignSelfType;
|
|
78
|
+
/**
|
|
79
|
+
* Specifies the initial main size of an item
|
|
80
|
+
*
|
|
81
|
+
* *Note: only works for nested `<Box />`*
|
|
82
|
+
*/
|
|
83
|
+
basis?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Pass an arbitrary child node
|
|
86
|
+
*/
|
|
87
|
+
children?: ReactNode;
|
|
88
|
+
/**
|
|
89
|
+
* Specifies the main axis of the container
|
|
90
|
+
*/
|
|
91
|
+
direction?: DirectionType;
|
|
92
|
+
/**
|
|
93
|
+
* Specifies whether the width and/or height should fill the container
|
|
94
|
+
*/
|
|
95
|
+
fill?: FillType;
|
|
96
|
+
/**
|
|
97
|
+
* Specifies whether the width and/or height should fill the viewport
|
|
98
|
+
*/
|
|
99
|
+
fillViewport?: FillType;
|
|
100
|
+
/**
|
|
101
|
+
* Specifies the gaps (gutters) between rows and columns
|
|
102
|
+
*/
|
|
103
|
+
gap?: Gap | string;
|
|
104
|
+
/**
|
|
105
|
+
* Specifies what amount of space inside the flex container the item should take up
|
|
106
|
+
*
|
|
107
|
+
* *Note: only works for nested `<Box />`*
|
|
108
|
+
*/
|
|
109
|
+
grow?: number | string;
|
|
110
|
+
/**
|
|
111
|
+
* @ignore
|
|
112
|
+
* Used internally to track if a Box is a child of another Box component
|
|
113
|
+
*/
|
|
114
|
+
hasBoxParent?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Make Layout behave like an inline element but still lay out its content according to flexbox model
|
|
117
|
+
*/
|
|
118
|
+
inline?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Specifies how the browser distributes space between and around
|
|
121
|
+
* items along the main axis of their container
|
|
122
|
+
*/
|
|
123
|
+
justifyContent?: JustifyContentType;
|
|
124
|
+
/**
|
|
125
|
+
* Specifies the order used to lay out an item in its container. Items within the same
|
|
126
|
+
* container are rendered in ascending order according to their order values.
|
|
127
|
+
* Elements with the _same_ order value are rendered in the order in which they appear in code
|
|
128
|
+
*
|
|
129
|
+
* *Note: only works for nested `<Box />`*
|
|
130
|
+
*/
|
|
131
|
+
order?: number | 'inherit' | 'initial' | 'unset';
|
|
132
|
+
/**
|
|
133
|
+
* Specifies how items will shrink inside the container when the default size of
|
|
134
|
+
* items is larger than their container
|
|
135
|
+
*
|
|
136
|
+
* *Note: only works for nested `<Box />`*
|
|
137
|
+
*/
|
|
138
|
+
shrink?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Specifies whether items are forced into a single line or can be wrapped onto multiple lines
|
|
141
|
+
*/
|
|
142
|
+
wrapItems?: boolean;
|
|
143
|
+
};
|
|
144
|
+
declare const Box: {
|
|
145
|
+
({ alignContent, alignItems, children, direction, hasBoxParent, fill, fillViewport, inline, justifyContent, wrapItems, ...otherProps }: BoxProps): JSX.Element;
|
|
146
|
+
displayName: string;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
type ButtonSizes = 'hero' | 'large' | 'medium' | 'small';
|
|
150
|
+
type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
|
|
151
|
+
|
|
152
|
+
type ColorSchemeTypes = 'inherit' | 'default' | 'info' | 'success' | 'warning' | 'error' | 'blue' | 'green' | 'orange' | 'pink' | 'purple' | 'yellow';
|
|
153
|
+
|
|
154
|
+
type LinkTypes = 'default' | 'email' | 'external' | 'phone';
|
|
155
|
+
|
|
156
|
+
type Breakpoints = 'isLgAndDown' | 'isLgAndUp' | 'isMdAndDown' | 'isMdAndUp' | 'isSmAndDown' | 'isSmAndUp' | 'isXlAndDown' | 'isXlAndUp' | 'isXsAndDown' | 'isXsAndUp';
|
|
157
|
+
type AtLeastOneBreakpoint<T, U = {
|
|
158
|
+
[K in keyof T]: Pick<T, K>;
|
|
159
|
+
}> = Partial<T> & U[keyof U];
|
|
160
|
+
type ResponsiveObject<T> = AtLeastOneBreakpoint<Record<Breakpoints, T>> & {
|
|
161
|
+
base: T;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
type BaseButtonProps = {
|
|
165
|
+
/**
|
|
166
|
+
* Text that appears inside of the button
|
|
167
|
+
*
|
|
168
|
+
* @type ReactNode
|
|
169
|
+
*/
|
|
170
|
+
children?: ReactNode;
|
|
171
|
+
/**
|
|
172
|
+
* Set the color scheme of the button
|
|
173
|
+
* TODO - link to a color scheme page
|
|
174
|
+
*/
|
|
175
|
+
colorScheme?: ColorSchemeTypes;
|
|
176
|
+
/**
|
|
177
|
+
* Disables the button
|
|
178
|
+
*/
|
|
179
|
+
disabled?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Show a spinner when the button is in a loading state
|
|
182
|
+
*/
|
|
183
|
+
isLoading?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Icon to display on the left side of the button, Must be an instance of [Icon](?path=/docs/ui-components-icon--docs)
|
|
186
|
+
*/
|
|
187
|
+
leftIcon?: JSX.Element | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* Callback function invoked when the button is clicked
|
|
190
|
+
*
|
|
191
|
+
* @type (event: MouseEvent) => void
|
|
192
|
+
*/
|
|
193
|
+
onClick?: ((event: MouseEvent) => void) | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* @ignore
|
|
196
|
+
* Force a button into a particular css state (for debugging)
|
|
197
|
+
*/
|
|
198
|
+
forceState?: 'active' | 'focus' | 'hover' | undefined;
|
|
199
|
+
/**
|
|
200
|
+
* If true, the button will fill its container
|
|
201
|
+
*
|
|
202
|
+
* @type boolean | ResponsiveObject<boolean>
|
|
203
|
+
* */
|
|
204
|
+
fullWidth?: ResponsiveObject<boolean> | boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Provides a button without any styling (useful for wrapping another element)
|
|
207
|
+
*/
|
|
208
|
+
unstyled?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Icon to display on the right side of the button, Must be an instance of [Icon](?path=/docs/ui-components-icon--docs)
|
|
211
|
+
*/
|
|
212
|
+
rightIcon?: JSX.Element | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* The size of button to display. Can be used as a [responsive prop](/docs/ui-docs-responsive-props--docs)
|
|
215
|
+
*
|
|
216
|
+
* @type 'small' | 'medium' | 'large' | 'hero'
|
|
217
|
+
*/
|
|
218
|
+
size?: ButtonSizes | ResponsiveObject<ButtonSizes>;
|
|
219
|
+
/**
|
|
220
|
+
* A visual style for the button
|
|
221
|
+
*/
|
|
222
|
+
variant?: ButtonVariants;
|
|
223
|
+
};
|
|
224
|
+
type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & {
|
|
225
|
+
href: string;
|
|
226
|
+
children: ReactNode;
|
|
227
|
+
/**
|
|
228
|
+
* This just allows pathrough to beforeAction for link
|
|
229
|
+
* @ignore
|
|
230
|
+
*/
|
|
231
|
+
beforeAction?: (() => Promise<void>) | (() => void);
|
|
232
|
+
/**
|
|
233
|
+
* This just allows pathrough to beforeAction for link
|
|
234
|
+
* @ignore
|
|
235
|
+
*/
|
|
236
|
+
type?: LinkTypes;
|
|
237
|
+
};
|
|
238
|
+
type ButtonAsButtonProps = BaseButtonProps & ComponentPropsWithRef<'button'> & {
|
|
239
|
+
href?: never;
|
|
240
|
+
type?: 'button' | 'reset' | 'submit';
|
|
241
|
+
children: ReactNode;
|
|
242
|
+
};
|
|
243
|
+
type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
|
|
244
|
+
/**
|
|
245
|
+
* Button component is used to trigger an action or event,
|
|
246
|
+
* such as submitting a form, opening a Dialog, canceling an
|
|
247
|
+
* action, or performing a delete operation. It replaces the HTML `<button>` element,
|
|
248
|
+
* unless an `href` attribute is passed, in which it will render an `<a>` element.
|
|
249
|
+
*/
|
|
250
|
+
declare const Button: react.ForwardRefExoticComponent<(Omit<ButtonAsLinkProps, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
251
|
+
|
|
252
|
+
type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
|
|
253
|
+
/**
|
|
254
|
+
* Align buttons to the left or right of their container
|
|
255
|
+
*/
|
|
256
|
+
align?: 'center' | 'left' | 'right';
|
|
257
|
+
/**
|
|
258
|
+
* Buttons that will be rendered in grouping
|
|
259
|
+
*/
|
|
260
|
+
children?: ReactNode;
|
|
261
|
+
/**
|
|
262
|
+
* Force ButtonGroup to fill the width of it's container
|
|
263
|
+
*/
|
|
264
|
+
fullWidth?: boolean;
|
|
265
|
+
};
|
|
266
|
+
declare const ButtonGroup: {
|
|
267
|
+
({ children, align, fullWidth, ...otherProps }: ButtonGroupProps): JSX.Element | null;
|
|
268
|
+
displayName: string;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
type DividerProps = ComponentPropsWithoutRef<'hr'> & {
|
|
272
|
+
/**
|
|
273
|
+
* Size of the divider. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
274
|
+
*
|
|
275
|
+
* @type 'lg' | 'sm'
|
|
276
|
+
*/
|
|
277
|
+
size?: ResponsiveObject<'lg' | 'sm'> | 'lg' | 'sm';
|
|
278
|
+
};
|
|
279
|
+
declare const Divider: {
|
|
280
|
+
({ size, ...otherProps }: DividerProps): JSX.Element;
|
|
281
|
+
displayName: string;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
declare const ellipsisStyle: styled_components.FlattenSimpleInterpolation;
|
|
285
|
+
declare const ellipsisFlexParentStyle: styled_components.FlattenSimpleInterpolation;
|
|
286
|
+
type EllipsisProps = ComponentPropsWithoutRef<'div'> & {
|
|
287
|
+
/**
|
|
288
|
+
* The text that will be truncated with an ellipsis
|
|
289
|
+
*/
|
|
290
|
+
children?: ReactNode;
|
|
291
|
+
/**
|
|
292
|
+
* The number that will be truncated with an ellipsis
|
|
293
|
+
*/
|
|
294
|
+
lines?: number;
|
|
295
|
+
};
|
|
296
|
+
declare const Ellipsis: {
|
|
297
|
+
({ children, lines, ...otherProps }: EllipsisProps): JSX.Element;
|
|
298
|
+
displayName: string;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
type ExtendedProps<Props = Record<string, unknown>, OverrideProps = Record<string, unknown>> = Omit<Props, keyof OverrideProps> & OverrideProps;
|
|
302
|
+
type ElementType = JSXElementConstructor<any> | keyof JSX.IntrinsicElements;
|
|
303
|
+
type PropsOf<C extends ElementType> = JSX.LibraryManagedAttributes<C, ComponentPropsWithoutRef<C>>;
|
|
304
|
+
type ComponentProp<C> = {
|
|
305
|
+
/**
|
|
306
|
+
* Render a different element or component
|
|
307
|
+
*
|
|
308
|
+
* @type ElementType | ComponentType
|
|
309
|
+
*/
|
|
310
|
+
renderAs?: C;
|
|
311
|
+
};
|
|
312
|
+
type InheritedProps<C extends ElementType, Props = Record<string, unknown>> = ExtendedProps<PropsOf<C>, Props>;
|
|
313
|
+
type PolymorphicRef<C> = C extends ElementType ? ComponentPropsWithRef<C>['ref'] : never;
|
|
314
|
+
type PolymorphicComponentProps<C, Props = Record<string, unknown>> = C extends ElementType ? InheritedProps<C, ComponentProp<C> & Props> & {
|
|
315
|
+
ref?: PolymorphicRef<C>;
|
|
316
|
+
} : Props & {
|
|
317
|
+
renderAs: ElementType;
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
type AlignmentTypes$1 = 'center' | 'justify' | 'left' | 'right';
|
|
321
|
+
declare const variantStyleMap$1: {
|
|
322
|
+
hero: styled_components.FlattenSimpleInterpolation;
|
|
323
|
+
heading1: styled_components.FlattenSimpleInterpolation;
|
|
324
|
+
heading2: styled_components.FlattenSimpleInterpolation;
|
|
325
|
+
heading3: styled_components.FlattenSimpleInterpolation;
|
|
326
|
+
heading4: styled_components.FlattenSimpleInterpolation;
|
|
327
|
+
heading5: styled_components.FlattenSimpleInterpolation;
|
|
328
|
+
heading6: styled_components.FlattenSimpleInterpolation;
|
|
329
|
+
};
|
|
330
|
+
declare const DEFAULT_ELEMENT = "h1";
|
|
331
|
+
type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
|
|
332
|
+
/**
|
|
333
|
+
* The horizontal alignment
|
|
334
|
+
* <br />
|
|
335
|
+
* _Note: this only affects block elements_
|
|
336
|
+
*/
|
|
337
|
+
align?: AlignmentTypes$1;
|
|
338
|
+
/**
|
|
339
|
+
* The content of the heading
|
|
340
|
+
*/
|
|
341
|
+
children: ReactNode;
|
|
342
|
+
/**
|
|
343
|
+
* Sets the hue of the text
|
|
344
|
+
*/
|
|
345
|
+
colorScheme?: ColorSchemeTypes;
|
|
346
|
+
/**
|
|
347
|
+
* Styles to text as disabled
|
|
348
|
+
*/
|
|
349
|
+
disabled?: boolean;
|
|
350
|
+
/**
|
|
351
|
+
* Attempt to keep the text to a single line by truncating with an ellipsis
|
|
352
|
+
* <br />
|
|
353
|
+
* _Note: this only affects block elements_
|
|
354
|
+
*/
|
|
355
|
+
ellipsis?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Display the text as inline content
|
|
358
|
+
*/
|
|
359
|
+
inline?: boolean;
|
|
360
|
+
/**
|
|
361
|
+
* Prevents text from being highlighted and copied
|
|
362
|
+
*/
|
|
363
|
+
preventUserSelect?: boolean;
|
|
364
|
+
renderAs?: ElementType$1;
|
|
365
|
+
/**
|
|
366
|
+
* The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
|
|
367
|
+
*/
|
|
368
|
+
variant?: keyof typeof variantStyleMap$1;
|
|
369
|
+
};
|
|
370
|
+
declare const Heading: (<C = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, "key" | "disabled" | keyof react.HTMLAttributes<HTMLHeadingElement> | "align" | "ellipsis" | "inline" | "colorScheme" | "variant" | "renderAs" | "preventUserSelect"> & {
|
|
371
|
+
renderAs?: any;
|
|
372
|
+
} & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
|
|
373
|
+
/**
|
|
374
|
+
* The horizontal alignment
|
|
375
|
+
* <br />
|
|
376
|
+
* _Note: this only affects block elements_
|
|
377
|
+
*/
|
|
378
|
+
align?: AlignmentTypes$1;
|
|
379
|
+
/**
|
|
380
|
+
* The content of the heading
|
|
381
|
+
*/
|
|
382
|
+
children: ReactNode;
|
|
383
|
+
/**
|
|
384
|
+
* Sets the hue of the text
|
|
385
|
+
*/
|
|
386
|
+
colorScheme?: ColorSchemeTypes;
|
|
387
|
+
/**
|
|
388
|
+
* Styles to text as disabled
|
|
389
|
+
*/
|
|
390
|
+
disabled?: boolean;
|
|
391
|
+
/**
|
|
392
|
+
* Attempt to keep the text to a single line by truncating with an ellipsis
|
|
393
|
+
* <br />
|
|
394
|
+
* _Note: this only affects block elements_
|
|
395
|
+
*/
|
|
396
|
+
ellipsis?: boolean;
|
|
397
|
+
/**
|
|
398
|
+
* Display the text as inline content
|
|
399
|
+
*/
|
|
400
|
+
inline?: boolean;
|
|
401
|
+
/**
|
|
402
|
+
* Prevents text from being highlighted and copied
|
|
403
|
+
*/
|
|
404
|
+
preventUserSelect?: boolean;
|
|
405
|
+
renderAs?: ElementType$1;
|
|
406
|
+
/**
|
|
407
|
+
* The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
|
|
408
|
+
*/
|
|
409
|
+
variant?: keyof typeof variantStyleMap$1;
|
|
410
|
+
} & {
|
|
411
|
+
ref?: any;
|
|
412
|
+
}) | (Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
|
|
413
|
+
/**
|
|
414
|
+
* The horizontal alignment
|
|
415
|
+
* <br />
|
|
416
|
+
* _Note: this only affects block elements_
|
|
417
|
+
*/
|
|
418
|
+
align?: AlignmentTypes$1;
|
|
419
|
+
/**
|
|
420
|
+
* The content of the heading
|
|
421
|
+
*/
|
|
422
|
+
children: ReactNode;
|
|
423
|
+
/**
|
|
424
|
+
* Sets the hue of the text
|
|
425
|
+
*/
|
|
426
|
+
colorScheme?: ColorSchemeTypes;
|
|
427
|
+
/**
|
|
428
|
+
* Styles to text as disabled
|
|
429
|
+
*/
|
|
430
|
+
disabled?: boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Attempt to keep the text to a single line by truncating with an ellipsis
|
|
433
|
+
* <br />
|
|
434
|
+
* _Note: this only affects block elements_
|
|
435
|
+
*/
|
|
436
|
+
ellipsis?: boolean;
|
|
437
|
+
/**
|
|
438
|
+
* Display the text as inline content
|
|
439
|
+
*/
|
|
440
|
+
inline?: boolean;
|
|
441
|
+
/**
|
|
442
|
+
* Prevents text from being highlighted and copied
|
|
443
|
+
*/
|
|
444
|
+
preventUserSelect?: boolean;
|
|
445
|
+
renderAs?: ElementType$1;
|
|
446
|
+
/**
|
|
447
|
+
* The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
|
|
448
|
+
*/
|
|
449
|
+
variant?: keyof typeof variantStyleMap$1;
|
|
450
|
+
} & {
|
|
451
|
+
renderAs: react.JSXElementConstructor<any> | keyof react.JSX.IntrinsicElements;
|
|
452
|
+
})>, never> & Record<string, never>;
|
|
453
|
+
|
|
454
|
+
declare const iconMap: {
|
|
455
|
+
'ab-test': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
456
|
+
accessibility: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
457
|
+
activity: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
458
|
+
'add-media': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
459
|
+
'annotation-link': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
460
|
+
appearance: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
461
|
+
archive: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
462
|
+
'arrow-down': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
463
|
+
'arrow-left': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
464
|
+
'arrow-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
465
|
+
'arrow-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
466
|
+
'arrow-up-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
467
|
+
asterisk: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
468
|
+
'audio-description': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
469
|
+
'auto-scroll': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
470
|
+
background: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
471
|
+
bell: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
472
|
+
bolt: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
473
|
+
calendar: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
474
|
+
'call-to-action': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
475
|
+
camera: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
476
|
+
'camera-off': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
477
|
+
'caret-down': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
478
|
+
'caret-down-strong': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
479
|
+
'caret-left': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
480
|
+
'caret-left-strong': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
481
|
+
'caret-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
482
|
+
'caret-right-strong': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
483
|
+
'caret-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
484
|
+
'caret-up-strong': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
485
|
+
channel: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
486
|
+
chapters: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
487
|
+
'checkmark-circle': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
488
|
+
'checkmark-circle-outline': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
489
|
+
checkmark: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
490
|
+
'checkmark-three-quaters-circle': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
491
|
+
'circle-slashed': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
492
|
+
close: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
493
|
+
'close-octagon': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
494
|
+
'closed-captions': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
495
|
+
'collapse-diagonal': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
496
|
+
comments: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
497
|
+
company: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
498
|
+
compare: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
499
|
+
'content-library': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
500
|
+
controls: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
501
|
+
'cursor-click': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
502
|
+
delete: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
503
|
+
desktop: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
504
|
+
'dots-horizontal': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
505
|
+
download: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
506
|
+
'edit-transcript': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
507
|
+
'ellipses-vertical': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
508
|
+
embed: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
509
|
+
envelope: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
510
|
+
error: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
511
|
+
'expand-diagonal': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
512
|
+
expand: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
513
|
+
favorite: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
514
|
+
'favorite-outline': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
515
|
+
'file-tree': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
516
|
+
filter: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
517
|
+
fonts: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
518
|
+
'full-screen': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
519
|
+
gear: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
520
|
+
'getting-started': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
521
|
+
grid: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
522
|
+
'grip-dots-vertical': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
523
|
+
'help-center': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
524
|
+
hide: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
525
|
+
home: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
526
|
+
hourglass: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
527
|
+
info: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
528
|
+
integrations: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
529
|
+
leave: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
530
|
+
link: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
531
|
+
list: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
532
|
+
live: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
533
|
+
lock: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
534
|
+
logout: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
535
|
+
maximize: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
536
|
+
media: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
537
|
+
menu: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
538
|
+
mic: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
539
|
+
'mic-off': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
540
|
+
minimize: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
541
|
+
'minus-circle': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
542
|
+
mobile: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
543
|
+
'more-options': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
544
|
+
'move-left': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
545
|
+
'move-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
546
|
+
music: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
547
|
+
'open-new': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
548
|
+
overview: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
549
|
+
page: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
550
|
+
'panel-left': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
551
|
+
'panel-right': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
552
|
+
'panel-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
553
|
+
password: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
554
|
+
pencil: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
555
|
+
people: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
556
|
+
pin: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
557
|
+
'pin-slash': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
558
|
+
play: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
559
|
+
player: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
560
|
+
plus: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
561
|
+
podcast: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
562
|
+
preview: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
563
|
+
'private-user-sessions': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
564
|
+
project: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
565
|
+
properties: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
566
|
+
'question-mark': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
567
|
+
react: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
568
|
+
record: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
569
|
+
redo: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
570
|
+
replace: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
571
|
+
reply: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
572
|
+
'save-as-copy': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
573
|
+
save: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
574
|
+
scissors: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
575
|
+
'screenshare-off': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
576
|
+
'screenshare-on': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
577
|
+
search: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
578
|
+
send: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
579
|
+
shapes: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
580
|
+
share: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
581
|
+
'sharing-permissions': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
582
|
+
simulcast: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
583
|
+
sort: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
584
|
+
sparkle: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
585
|
+
spinner: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
586
|
+
stats: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
587
|
+
'switch-accounts': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
588
|
+
tag: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
589
|
+
thumbnail: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
590
|
+
'thumbs-down': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
591
|
+
'thumbs-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
592
|
+
transitions: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
593
|
+
trim: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
594
|
+
turnstile: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
595
|
+
undo: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
596
|
+
unlock: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
597
|
+
upload: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
598
|
+
'users-permissions': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
599
|
+
'view-stream': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
600
|
+
volume: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
601
|
+
'volume-off': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
602
|
+
'volume-up': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
603
|
+
'volume-x': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
604
|
+
wand: (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
605
|
+
'zoom-in': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
606
|
+
'zoom-out': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
607
|
+
};
|
|
608
|
+
type IconNameType = keyof typeof iconMap;
|
|
609
|
+
|
|
610
|
+
declare const iconSizeMap: {
|
|
611
|
+
sm: string;
|
|
612
|
+
md: string;
|
|
613
|
+
lg: string;
|
|
614
|
+
xl: string;
|
|
615
|
+
xxl: string;
|
|
616
|
+
};
|
|
617
|
+
type IconProps = ComponentPropsWithoutRef<'svg'> & {
|
|
618
|
+
/**
|
|
619
|
+
* Is Icon on a filled background?
|
|
620
|
+
*/
|
|
621
|
+
invertColor?: boolean;
|
|
622
|
+
/**
|
|
623
|
+
* The size of the icon to display
|
|
624
|
+
*/
|
|
625
|
+
size?: keyof typeof iconSizeMap;
|
|
626
|
+
/**
|
|
627
|
+
* @ignore
|
|
628
|
+
*/
|
|
629
|
+
style?: Record<string, unknown>;
|
|
630
|
+
/**
|
|
631
|
+
* Determines which icon to display
|
|
632
|
+
*/
|
|
633
|
+
type: IconNameType;
|
|
634
|
+
};
|
|
635
|
+
declare const Icon: {
|
|
636
|
+
({ invertColor, size, style, type, ...otherProps }: IconProps): JSX.Element;
|
|
637
|
+
displayName: string;
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
|
|
641
|
+
/**
|
|
642
|
+
* Pass an arbitrary child node
|
|
643
|
+
*/
|
|
644
|
+
children?: ReactNode;
|
|
645
|
+
/**
|
|
646
|
+
* Display content _only_ when it's focused.
|
|
647
|
+
*/
|
|
648
|
+
focusable?: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* The text that will appear to screenreaders but not be displayed on screen
|
|
651
|
+
* (alternatively you can pass children)
|
|
652
|
+
*/
|
|
653
|
+
text?: ReactNode;
|
|
654
|
+
};
|
|
655
|
+
declare const ScreenReaderOnly: {
|
|
656
|
+
({ text, children, focusable, ...otherProps }: ScreenReaderOnlyProps): react_jsx_runtime.JSX.Element;
|
|
657
|
+
displayName: string;
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
type Spacings = 'space-01' | 'space-02' | 'space-03' | 'space-04' | 'space-05' | 'space-06' | 'space-07' | 'space-08' | 'space-09' | 'space-10' | 'space-11';
|
|
661
|
+
|
|
662
|
+
type StackProps = {
|
|
663
|
+
children?: ReactNode | undefined;
|
|
664
|
+
/**
|
|
665
|
+
* The gap between each item in the stack. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
666
|
+
* TODO: add link to Spacing docs
|
|
667
|
+
*
|
|
668
|
+
*/
|
|
669
|
+
gap?: Spacings;
|
|
670
|
+
/**
|
|
671
|
+
* Vertical is equivalent to `flex-direction: column;`, horizontal is equivalent to `flex-direction: row;`.
|
|
672
|
+
* The default behavior is `vertical`. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
673
|
+
*
|
|
674
|
+
*/
|
|
675
|
+
direction?: 'horizontal' | 'vertical';
|
|
676
|
+
renderAs?: ElementType$1;
|
|
677
|
+
};
|
|
678
|
+
declare const Stack: (<C = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, keyof StackProps> & {
|
|
679
|
+
renderAs?: any;
|
|
680
|
+
} & StackProps & {
|
|
681
|
+
ref?: any;
|
|
682
|
+
}) | (StackProps & {
|
|
683
|
+
renderAs: react.JSXElementConstructor<any> | keyof react.JSX.IntrinsicElements;
|
|
684
|
+
})>, never> & Record<string, never>;
|
|
685
|
+
|
|
686
|
+
type AlignmentTypes = 'center' | 'justify' | 'left' | 'right';
|
|
687
|
+
declare const variantStyleMap: {
|
|
688
|
+
body1: styled_components.FlattenSimpleInterpolation;
|
|
689
|
+
body2: styled_components.FlattenSimpleInterpolation;
|
|
690
|
+
body3: styled_components.FlattenSimpleInterpolation;
|
|
691
|
+
body4: styled_components.FlattenSimpleInterpolation;
|
|
692
|
+
body1Mono: styled_components.FlattenSimpleInterpolation;
|
|
693
|
+
body2Mono: styled_components.FlattenSimpleInterpolation;
|
|
694
|
+
body3Mono: styled_components.FlattenSimpleInterpolation;
|
|
695
|
+
body4Mono: styled_components.FlattenSimpleInterpolation;
|
|
696
|
+
label1: styled_components.FlattenSimpleInterpolation;
|
|
697
|
+
label2: styled_components.FlattenSimpleInterpolation;
|
|
698
|
+
label3: styled_components.FlattenSimpleInterpolation;
|
|
699
|
+
label4: styled_components.FlattenSimpleInterpolation;
|
|
700
|
+
};
|
|
701
|
+
declare const prominenceMap: {
|
|
702
|
+
primary: styled_components.FlattenSimpleInterpolation;
|
|
703
|
+
secondary: styled_components.FlattenSimpleInterpolation;
|
|
704
|
+
};
|
|
705
|
+
type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
706
|
+
/**
|
|
707
|
+
* The horizontal alignment
|
|
708
|
+
* <br />
|
|
709
|
+
* _Note: this only affects block elements_
|
|
710
|
+
*/
|
|
711
|
+
align?: AlignmentTypes;
|
|
712
|
+
/**
|
|
713
|
+
* The text content
|
|
714
|
+
*/
|
|
715
|
+
children?: ReactNode | undefined;
|
|
716
|
+
/**
|
|
717
|
+
* Sets the hue of the text
|
|
718
|
+
*/
|
|
719
|
+
colorScheme?: ColorSchemeTypes;
|
|
720
|
+
/**
|
|
721
|
+
* Allows user to override default button colors
|
|
722
|
+
*/
|
|
723
|
+
disabled?: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* Attempt to keep the text to a single line by truncating with an ellipsis
|
|
726
|
+
* <br />
|
|
727
|
+
* _Note: this only affects block elements_
|
|
728
|
+
*/
|
|
729
|
+
ellipsis?: boolean;
|
|
730
|
+
/**
|
|
731
|
+
* Display the text as inline content
|
|
732
|
+
*/
|
|
733
|
+
inline?: boolean;
|
|
734
|
+
/**
|
|
735
|
+
* Prevents text from being highlighted and copied
|
|
736
|
+
*/
|
|
737
|
+
preventUserSelect?: boolean;
|
|
738
|
+
/**
|
|
739
|
+
* The prominence of the text. This affects the color of the text
|
|
740
|
+
*/
|
|
741
|
+
prominence?: keyof typeof prominenceMap;
|
|
742
|
+
renderAs?: ElementType$1;
|
|
743
|
+
/**
|
|
744
|
+
* The text style to display
|
|
745
|
+
*/
|
|
746
|
+
variant?: keyof typeof variantStyleMap | undefined;
|
|
747
|
+
};
|
|
748
|
+
declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, "key" | "disabled" | keyof react.HTMLAttributes<HTMLDivElement> | "align" | "ellipsis" | "inline" | "colorScheme" | "variant" | "renderAs" | "preventUserSelect" | "prominence"> & {
|
|
749
|
+
renderAs?: any;
|
|
750
|
+
} & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
751
|
+
/**
|
|
752
|
+
* The horizontal alignment
|
|
753
|
+
* <br />
|
|
754
|
+
* _Note: this only affects block elements_
|
|
755
|
+
*/
|
|
756
|
+
align?: AlignmentTypes;
|
|
757
|
+
/**
|
|
758
|
+
* The text content
|
|
759
|
+
*/
|
|
760
|
+
children?: ReactNode | undefined;
|
|
761
|
+
/**
|
|
762
|
+
* Sets the hue of the text
|
|
763
|
+
*/
|
|
764
|
+
colorScheme?: ColorSchemeTypes;
|
|
765
|
+
/**
|
|
766
|
+
* Allows user to override default button colors
|
|
767
|
+
*/
|
|
768
|
+
disabled?: boolean;
|
|
769
|
+
/**
|
|
770
|
+
* Attempt to keep the text to a single line by truncating with an ellipsis
|
|
771
|
+
* <br />
|
|
772
|
+
* _Note: this only affects block elements_
|
|
773
|
+
*/
|
|
774
|
+
ellipsis?: boolean;
|
|
775
|
+
/**
|
|
776
|
+
* Display the text as inline content
|
|
777
|
+
*/
|
|
778
|
+
inline?: boolean;
|
|
779
|
+
/**
|
|
780
|
+
* Prevents text from being highlighted and copied
|
|
781
|
+
*/
|
|
782
|
+
preventUserSelect?: boolean;
|
|
783
|
+
/**
|
|
784
|
+
* The prominence of the text. This affects the color of the text
|
|
785
|
+
*/
|
|
786
|
+
prominence?: keyof typeof prominenceMap;
|
|
787
|
+
renderAs?: ElementType$1;
|
|
788
|
+
/**
|
|
789
|
+
* The text style to display
|
|
790
|
+
*/
|
|
791
|
+
variant?: keyof typeof variantStyleMap | undefined;
|
|
792
|
+
} & {
|
|
793
|
+
ref?: any;
|
|
794
|
+
}) | (Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
795
|
+
/**
|
|
796
|
+
* The horizontal alignment
|
|
797
|
+
* <br />
|
|
798
|
+
* _Note: this only affects block elements_
|
|
799
|
+
*/
|
|
800
|
+
align?: AlignmentTypes;
|
|
801
|
+
/**
|
|
802
|
+
* The text content
|
|
803
|
+
*/
|
|
804
|
+
children?: ReactNode | undefined;
|
|
805
|
+
/**
|
|
806
|
+
* Sets the hue of the text
|
|
807
|
+
*/
|
|
808
|
+
colorScheme?: ColorSchemeTypes;
|
|
809
|
+
/**
|
|
810
|
+
* Allows user to override default button colors
|
|
811
|
+
*/
|
|
812
|
+
disabled?: boolean;
|
|
813
|
+
/**
|
|
814
|
+
* Attempt to keep the text to a single line by truncating with an ellipsis
|
|
815
|
+
* <br />
|
|
816
|
+
* _Note: this only affects block elements_
|
|
817
|
+
*/
|
|
818
|
+
ellipsis?: boolean;
|
|
819
|
+
/**
|
|
820
|
+
* Display the text as inline content
|
|
821
|
+
*/
|
|
822
|
+
inline?: boolean;
|
|
823
|
+
/**
|
|
824
|
+
* Prevents text from being highlighted and copied
|
|
825
|
+
*/
|
|
826
|
+
preventUserSelect?: boolean;
|
|
827
|
+
/**
|
|
828
|
+
* The prominence of the text. This affects the color of the text
|
|
829
|
+
*/
|
|
830
|
+
prominence?: keyof typeof prominenceMap;
|
|
831
|
+
renderAs?: ElementType$1;
|
|
832
|
+
/**
|
|
833
|
+
* The text style to display
|
|
834
|
+
*/
|
|
835
|
+
variant?: keyof typeof variantStyleMap | undefined;
|
|
836
|
+
} & {
|
|
837
|
+
renderAs: react.JSXElementConstructor<any> | keyof react.JSX.IntrinsicElements;
|
|
838
|
+
})>, never> & Record<string, never>;
|
|
839
|
+
|
|
840
|
+
type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'href'> & {
|
|
841
|
+
/**
|
|
842
|
+
* An optional accessible description for the logo
|
|
843
|
+
*/
|
|
844
|
+
description?: string;
|
|
845
|
+
/**
|
|
846
|
+
* Height, in pixels, of the logo
|
|
847
|
+
*/
|
|
848
|
+
height?: number;
|
|
849
|
+
/**
|
|
850
|
+
* @ignore
|
|
851
|
+
* Change the color when hovering over the logo
|
|
852
|
+
*/
|
|
853
|
+
hoverColor?: string;
|
|
854
|
+
/**
|
|
855
|
+
* Display just the icon portion of the logo (ie. hide `Wistia` text)
|
|
856
|
+
* note: there is no analogue to this because by brand guidelines, the
|
|
857
|
+
* `Wistia` text must not be displayed without the "flags" iconography
|
|
858
|
+
*/
|
|
859
|
+
iconOnly?: boolean;
|
|
860
|
+
/**
|
|
861
|
+
* If provided, will wrap the logo in a link
|
|
862
|
+
*/
|
|
863
|
+
href?: string;
|
|
864
|
+
/**
|
|
865
|
+
* An accessible title for the logo (defaults to "Wistia Logo")
|
|
866
|
+
*/
|
|
867
|
+
title?: string;
|
|
868
|
+
/**
|
|
869
|
+
* Style of the logo
|
|
870
|
+
*/
|
|
871
|
+
variant?: 'dark' | 'light' | 'standard';
|
|
872
|
+
};
|
|
873
|
+
declare const WistiaLogo: {
|
|
874
|
+
({ description, height, hoverColor, href, iconOnly, title, variant, ...otherProps }: WistiaLogoProps): react_jsx_runtime.JSX.Element;
|
|
875
|
+
displayName: string;
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
type TooltipProps = {
|
|
879
|
+
/**
|
|
880
|
+
* The content of the tooltip
|
|
881
|
+
*/
|
|
882
|
+
content: ReactNode;
|
|
883
|
+
/**
|
|
884
|
+
* The button or other interactive element that triggers the tooltip
|
|
885
|
+
*/
|
|
886
|
+
children: ReactNode;
|
|
887
|
+
/**
|
|
888
|
+
* The delay in milliseconds before the tooltip appears
|
|
889
|
+
*/
|
|
890
|
+
delay?: number;
|
|
891
|
+
/**
|
|
892
|
+
* The preferred direction to render the tooltip if no collisions prevent it
|
|
893
|
+
*/
|
|
894
|
+
direction?: 'bottom' | 'left' | 'right' | 'top';
|
|
895
|
+
/**
|
|
896
|
+
* @ignore
|
|
897
|
+
* Force the tooltip to be open without user interaction (for debugging and CI)
|
|
898
|
+
*/
|
|
899
|
+
forceOpen?: boolean;
|
|
900
|
+
/**
|
|
901
|
+
* The size of the tooltip
|
|
902
|
+
*/
|
|
903
|
+
compact?: boolean;
|
|
904
|
+
/**
|
|
905
|
+
* Hides the arrow
|
|
906
|
+
*/
|
|
907
|
+
hideArrow?: boolean;
|
|
908
|
+
};
|
|
909
|
+
/**
|
|
910
|
+
* Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
|
|
911
|
+
*/
|
|
912
|
+
declare const Tooltip: {
|
|
913
|
+
({ delay, direction, content, children, forceOpen, compact, hideArrow, }: TooltipProps): JSX.Element;
|
|
914
|
+
displayName: string;
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
type IconButtonProps = {
|
|
918
|
+
/**
|
|
919
|
+
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
920
|
+
*/
|
|
921
|
+
label: string;
|
|
922
|
+
/** Disable the tooltip */
|
|
923
|
+
disableTooltip?: boolean;
|
|
924
|
+
/**
|
|
925
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
926
|
+
*/
|
|
927
|
+
children: JSX.Element;
|
|
928
|
+
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
929
|
+
/**
|
|
930
|
+
* IconButton behaves like a [Button](?path=/docs/ui-components-button--docs), but only accepts an Icon as a child.
|
|
931
|
+
*/
|
|
932
|
+
declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
933
|
+
/**
|
|
934
|
+
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
935
|
+
*/
|
|
936
|
+
label: string;
|
|
937
|
+
/** Disable the tooltip */
|
|
938
|
+
disableTooltip?: boolean;
|
|
939
|
+
/**
|
|
940
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
941
|
+
*/
|
|
942
|
+
children: JSX.Element;
|
|
943
|
+
} & Omit<ButtonAsButtonProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref"> | Omit<{
|
|
944
|
+
/**
|
|
945
|
+
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
946
|
+
*/
|
|
947
|
+
label: string;
|
|
948
|
+
/** Disable the tooltip */
|
|
949
|
+
disableTooltip?: boolean;
|
|
950
|
+
/**
|
|
951
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
952
|
+
*/
|
|
953
|
+
children: JSX.Element;
|
|
954
|
+
} & Omit<ButtonAsLinkProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
955
|
+
|
|
956
|
+
export { Box, Button, ButtonGroup, type ButtonProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, ScreenReaderOnly, Stack, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, useActiveMq, useAriaLive, useMq, useWindowSize };
|