@wistia/ui 0.0.7 → 0.0.9
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/index.cjs +788 -702
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +106 -9
- package/dist/index.d.ts +106 -9
- package/dist/index.mjs +721 -637
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ReactNode,
|
|
3
|
+
import { ReactNode, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, JSXElementConstructor, ElementType as ElementType$1 } from 'react';
|
|
4
4
|
import { LinkProps as LinkProps$1 } from 'react-router-dom';
|
|
5
5
|
import * as styled_components from 'styled-components';
|
|
6
6
|
|
|
@@ -56,6 +56,43 @@ type AriaLiveContextType = {
|
|
|
56
56
|
};
|
|
57
57
|
declare const useAriaLive: () => AriaLiveContextType;
|
|
58
58
|
|
|
59
|
+
declare const colorSchemeValues: readonly ["inherit", "default", "info", "success", "warning", "error", "blue", "green", "orange", "pink", "purple", "yellow"];
|
|
60
|
+
type ColorSchemeTypes = (typeof colorSchemeValues)[number];
|
|
61
|
+
|
|
62
|
+
type BadgeProps = ComponentPropsWithoutRef<'div'> & {
|
|
63
|
+
/**
|
|
64
|
+
* Set the color scheme of the `Badge`
|
|
65
|
+
* TODO - link to a color scheme page
|
|
66
|
+
*/
|
|
67
|
+
colorScheme?: ColorSchemeTypes;
|
|
68
|
+
/**
|
|
69
|
+
* The `Icon` component to use. Must be an instance of [Icon](/?path=/docs/components-icon--docs)
|
|
70
|
+
*/
|
|
71
|
+
icon?: JSX.Element;
|
|
72
|
+
/**
|
|
73
|
+
* The text to display in the `Badge`
|
|
74
|
+
*/
|
|
75
|
+
label: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* A badge is a compact label, with optional icon, to convey status or context.
|
|
79
|
+
*/
|
|
80
|
+
declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
81
|
+
/**
|
|
82
|
+
* Set the color scheme of the `Badge`
|
|
83
|
+
* TODO - link to a color scheme page
|
|
84
|
+
*/
|
|
85
|
+
colorScheme?: ColorSchemeTypes;
|
|
86
|
+
/**
|
|
87
|
+
* The `Icon` component to use. Must be an instance of [Icon](/?path=/docs/components-icon--docs)
|
|
88
|
+
*/
|
|
89
|
+
icon?: JSX.Element;
|
|
90
|
+
/**
|
|
91
|
+
* The text to display in the `Badge`
|
|
92
|
+
*/
|
|
93
|
+
label: string;
|
|
94
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
95
|
+
|
|
59
96
|
type JustifyContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'space-evenly';
|
|
60
97
|
type AlignContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'stretch';
|
|
61
98
|
type AlignItemsType = 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch';
|
|
@@ -155,6 +192,9 @@ type BoxProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
155
192
|
*/
|
|
156
193
|
wrapItems?: boolean;
|
|
157
194
|
};
|
|
195
|
+
/**
|
|
196
|
+
* Box is a layout container using [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox).
|
|
197
|
+
*/
|
|
158
198
|
declare const Box: {
|
|
159
199
|
({ alignContent, alignItems, children, direction, hasBoxParent, fill, fillViewport, inline, justifyContent, wrapItems, ...otherProps }: BoxProps): JSX.Element;
|
|
160
200
|
displayName: string;
|
|
@@ -163,8 +203,6 @@ declare const Box: {
|
|
|
163
203
|
type ButtonSizes = 'hero' | 'large' | 'medium' | 'small';
|
|
164
204
|
type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
|
|
165
205
|
|
|
166
|
-
type ColorSchemeTypes = 'inherit' | 'default' | 'info' | 'success' | 'warning' | 'error' | 'blue' | 'green' | 'orange' | 'pink' | 'purple' | 'yellow';
|
|
167
|
-
|
|
168
206
|
type LinkTypes = 'default' | 'email' | 'external' | 'phone';
|
|
169
207
|
type BaseProps = {
|
|
170
208
|
/**
|
|
@@ -328,6 +366,10 @@ type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
328
366
|
*/
|
|
329
367
|
fullWidth?: boolean;
|
|
330
368
|
};
|
|
369
|
+
/**
|
|
370
|
+
* ButtonGroup is a layout component that groups buttons together,
|
|
371
|
+
* with a standardized gap between them.
|
|
372
|
+
*/
|
|
331
373
|
declare const ButtonGroup: {
|
|
332
374
|
({ children, align, fullWidth, ...otherProps }: ButtonGroupProps): JSX.Element | null;
|
|
333
375
|
displayName: string;
|
|
@@ -341,6 +383,9 @@ type DividerProps = ComponentPropsWithoutRef<'hr'> & {
|
|
|
341
383
|
*/
|
|
342
384
|
size?: ResponsiveObject<'lg' | 'sm'> | 'lg' | 'sm';
|
|
343
385
|
};
|
|
386
|
+
/**
|
|
387
|
+
* A line used to visually separate content
|
|
388
|
+
*/
|
|
344
389
|
declare const Divider: {
|
|
345
390
|
({ size, ...otherProps }: DividerProps): JSX.Element;
|
|
346
391
|
displayName: string;
|
|
@@ -358,6 +403,9 @@ type EllipsisProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
358
403
|
*/
|
|
359
404
|
lines?: number;
|
|
360
405
|
};
|
|
406
|
+
/**
|
|
407
|
+
* Truncate text with an ellispsis visble at the end
|
|
408
|
+
*/
|
|
361
409
|
declare const Ellipsis: {
|
|
362
410
|
({ children, lines, ...otherProps }: EllipsisProps): JSX.Element;
|
|
363
411
|
displayName: string;
|
|
@@ -432,6 +480,9 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
|
|
|
432
480
|
*/
|
|
433
481
|
variant?: keyof typeof variantStyleMap$1;
|
|
434
482
|
};
|
|
483
|
+
/**
|
|
484
|
+
* Displaying heading text, both visually and semantically
|
|
485
|
+
*/
|
|
435
486
|
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"> & {
|
|
436
487
|
renderAs?: any;
|
|
437
488
|
} & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
|
|
@@ -680,6 +731,11 @@ declare const iconSizeMap: {
|
|
|
680
731
|
xxl: string;
|
|
681
732
|
};
|
|
682
733
|
type IconProps = ComponentPropsWithoutRef<'svg'> & {
|
|
734
|
+
/**
|
|
735
|
+
* Set the color scheme of the button
|
|
736
|
+
* TODO - link to a color scheme page
|
|
737
|
+
*/
|
|
738
|
+
colorScheme?: ColorSchemeTypes;
|
|
683
739
|
/**
|
|
684
740
|
* Is Icon on a filled background?
|
|
685
741
|
*/
|
|
@@ -697,8 +753,12 @@ type IconProps = ComponentPropsWithoutRef<'svg'> & {
|
|
|
697
753
|
*/
|
|
698
754
|
type: IconNameType;
|
|
699
755
|
};
|
|
756
|
+
/**
|
|
757
|
+
* A component that renders any of our available icons. Note that icons should not be used directly
|
|
758
|
+
* for interactivity. If you need an interactive element, use [IconButton](?path=/docs/ui-components-iconbutton--docs).
|
|
759
|
+
*/
|
|
700
760
|
declare const Icon: {
|
|
701
|
-
({ invertColor, size, style, type, ...otherProps }: IconProps): JSX.Element;
|
|
761
|
+
({ invertColor, colorScheme, size, style, type, ...otherProps }: IconProps): JSX.Element;
|
|
702
762
|
displayName: string;
|
|
703
763
|
};
|
|
704
764
|
|
|
@@ -707,7 +767,9 @@ type IconButtonProps = {
|
|
|
707
767
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
708
768
|
*/
|
|
709
769
|
label: string;
|
|
710
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* Disable the tooltip
|
|
772
|
+
*/
|
|
711
773
|
disableTooltip?: boolean;
|
|
712
774
|
/**
|
|
713
775
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -715,14 +777,17 @@ type IconButtonProps = {
|
|
|
715
777
|
children: JSX.Element;
|
|
716
778
|
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
717
779
|
/**
|
|
718
|
-
* IconButton behaves like a [Button](?path=/docs/ui-components-button--docs),
|
|
780
|
+
* IconButton behaves like a [Button](?path=/docs/ui-components-button--docs),
|
|
781
|
+
* but only accepts an [Icon](?path=/docs/ui-components-icon--docs) as a child.
|
|
719
782
|
*/
|
|
720
783
|
declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
721
784
|
/**
|
|
722
785
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
723
786
|
*/
|
|
724
787
|
label: string;
|
|
725
|
-
/**
|
|
788
|
+
/**
|
|
789
|
+
* Disable the tooltip
|
|
790
|
+
*/
|
|
726
791
|
disableTooltip?: boolean;
|
|
727
792
|
/**
|
|
728
793
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -733,7 +798,9 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
733
798
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
734
799
|
*/
|
|
735
800
|
label: string;
|
|
736
|
-
/**
|
|
801
|
+
/**
|
|
802
|
+
* Disable the tooltip
|
|
803
|
+
*/
|
|
737
804
|
disableTooltip?: boolean;
|
|
738
805
|
/**
|
|
739
806
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -756,6 +823,9 @@ type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
756
823
|
*/
|
|
757
824
|
text?: ReactNode;
|
|
758
825
|
};
|
|
826
|
+
/**
|
|
827
|
+
* Used to hide content from the visual client, but keep it readable for screen readers.
|
|
828
|
+
*/
|
|
759
829
|
declare const ScreenReaderOnly: {
|
|
760
830
|
({ text, children, focusable, ...otherProps }: ScreenReaderOnlyProps): react_jsx_runtime.JSX.Element;
|
|
761
831
|
displayName: string;
|
|
@@ -779,6 +849,10 @@ type StackProps = {
|
|
|
779
849
|
direction?: 'horizontal' | 'vertical';
|
|
780
850
|
renderAs?: ElementType$1;
|
|
781
851
|
};
|
|
852
|
+
/**
|
|
853
|
+
* Used to layout its children in a vertical or horizontal stack. The gap between each item in the stack can be customized.
|
|
854
|
+
* This allows for layouting children in a consistent way without needing to manually add margins or padding.
|
|
855
|
+
*/
|
|
782
856
|
declare const Stack: (<C = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, keyof StackProps> & {
|
|
783
857
|
renderAs?: any;
|
|
784
858
|
} & StackProps & {
|
|
@@ -850,6 +924,9 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
850
924
|
*/
|
|
851
925
|
variant?: keyof typeof variantStyleMap | undefined;
|
|
852
926
|
};
|
|
927
|
+
/**
|
|
928
|
+
* Used for rending paragraphs and inline text.
|
|
929
|
+
*/
|
|
853
930
|
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"> & {
|
|
854
931
|
renderAs?: any;
|
|
855
932
|
} & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -975,6 +1052,8 @@ type TooltipProps = {
|
|
|
975
1052
|
};
|
|
976
1053
|
/**
|
|
977
1054
|
* Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
|
|
1055
|
+
* For elements that are not interactive, consider using a [Popover](/docs/ui-docs-popover--docs) instead.
|
|
1056
|
+
* TODO - add link to Popover docs when they exist
|
|
978
1057
|
*/
|
|
979
1058
|
declare const Tooltip: {
|
|
980
1059
|
({ delay, direction, content, children, forceOpen, compact, hideArrow, }: TooltipProps): JSX.Element;
|
|
@@ -1019,4 +1098,22 @@ declare const WistiaLogo: {
|
|
|
1019
1098
|
displayName: string;
|
|
1020
1099
|
};
|
|
1021
1100
|
|
|
1022
|
-
|
|
1101
|
+
type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
|
|
1102
|
+
/**
|
|
1103
|
+
* The color scheme to apply
|
|
1104
|
+
*/
|
|
1105
|
+
colorScheme: ColorSchemeTypes;
|
|
1106
|
+
/**
|
|
1107
|
+
* Children
|
|
1108
|
+
*/
|
|
1109
|
+
children: ReactNode;
|
|
1110
|
+
};
|
|
1111
|
+
/**
|
|
1112
|
+
* A wrapper to apply a color scheme to its children.
|
|
1113
|
+
*/
|
|
1114
|
+
declare const ColorSchemeWrapper: {
|
|
1115
|
+
({ colorScheme, children, ...otherProps }: ColorSchemeWrapperProps): JSX.Element;
|
|
1116
|
+
displayName: string;
|
|
1117
|
+
};
|
|
1118
|
+
|
|
1119
|
+
export { Badge, type BadgeProps, Box, Button, ButtonGroup, type ButtonProps, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Link, type LinkProps, ScreenReaderOnly, Stack, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ReactNode,
|
|
3
|
+
import { ReactNode, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, JSXElementConstructor, ElementType as ElementType$1 } from 'react';
|
|
4
4
|
import { LinkProps as LinkProps$1 } from 'react-router-dom';
|
|
5
5
|
import * as styled_components from 'styled-components';
|
|
6
6
|
|
|
@@ -56,6 +56,43 @@ type AriaLiveContextType = {
|
|
|
56
56
|
};
|
|
57
57
|
declare const useAriaLive: () => AriaLiveContextType;
|
|
58
58
|
|
|
59
|
+
declare const colorSchemeValues: readonly ["inherit", "default", "info", "success", "warning", "error", "blue", "green", "orange", "pink", "purple", "yellow"];
|
|
60
|
+
type ColorSchemeTypes = (typeof colorSchemeValues)[number];
|
|
61
|
+
|
|
62
|
+
type BadgeProps = ComponentPropsWithoutRef<'div'> & {
|
|
63
|
+
/**
|
|
64
|
+
* Set the color scheme of the `Badge`
|
|
65
|
+
* TODO - link to a color scheme page
|
|
66
|
+
*/
|
|
67
|
+
colorScheme?: ColorSchemeTypes;
|
|
68
|
+
/**
|
|
69
|
+
* The `Icon` component to use. Must be an instance of [Icon](/?path=/docs/components-icon--docs)
|
|
70
|
+
*/
|
|
71
|
+
icon?: JSX.Element;
|
|
72
|
+
/**
|
|
73
|
+
* The text to display in the `Badge`
|
|
74
|
+
*/
|
|
75
|
+
label: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* A badge is a compact label, with optional icon, to convey status or context.
|
|
79
|
+
*/
|
|
80
|
+
declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
81
|
+
/**
|
|
82
|
+
* Set the color scheme of the `Badge`
|
|
83
|
+
* TODO - link to a color scheme page
|
|
84
|
+
*/
|
|
85
|
+
colorScheme?: ColorSchemeTypes;
|
|
86
|
+
/**
|
|
87
|
+
* The `Icon` component to use. Must be an instance of [Icon](/?path=/docs/components-icon--docs)
|
|
88
|
+
*/
|
|
89
|
+
icon?: JSX.Element;
|
|
90
|
+
/**
|
|
91
|
+
* The text to display in the `Badge`
|
|
92
|
+
*/
|
|
93
|
+
label: string;
|
|
94
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
95
|
+
|
|
59
96
|
type JustifyContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'space-evenly';
|
|
60
97
|
type AlignContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'stretch';
|
|
61
98
|
type AlignItemsType = 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch';
|
|
@@ -155,6 +192,9 @@ type BoxProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
155
192
|
*/
|
|
156
193
|
wrapItems?: boolean;
|
|
157
194
|
};
|
|
195
|
+
/**
|
|
196
|
+
* Box is a layout container using [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox).
|
|
197
|
+
*/
|
|
158
198
|
declare const Box: {
|
|
159
199
|
({ alignContent, alignItems, children, direction, hasBoxParent, fill, fillViewport, inline, justifyContent, wrapItems, ...otherProps }: BoxProps): JSX.Element;
|
|
160
200
|
displayName: string;
|
|
@@ -163,8 +203,6 @@ declare const Box: {
|
|
|
163
203
|
type ButtonSizes = 'hero' | 'large' | 'medium' | 'small';
|
|
164
204
|
type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
|
|
165
205
|
|
|
166
|
-
type ColorSchemeTypes = 'inherit' | 'default' | 'info' | 'success' | 'warning' | 'error' | 'blue' | 'green' | 'orange' | 'pink' | 'purple' | 'yellow';
|
|
167
|
-
|
|
168
206
|
type LinkTypes = 'default' | 'email' | 'external' | 'phone';
|
|
169
207
|
type BaseProps = {
|
|
170
208
|
/**
|
|
@@ -328,6 +366,10 @@ type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
328
366
|
*/
|
|
329
367
|
fullWidth?: boolean;
|
|
330
368
|
};
|
|
369
|
+
/**
|
|
370
|
+
* ButtonGroup is a layout component that groups buttons together,
|
|
371
|
+
* with a standardized gap between them.
|
|
372
|
+
*/
|
|
331
373
|
declare const ButtonGroup: {
|
|
332
374
|
({ children, align, fullWidth, ...otherProps }: ButtonGroupProps): JSX.Element | null;
|
|
333
375
|
displayName: string;
|
|
@@ -341,6 +383,9 @@ type DividerProps = ComponentPropsWithoutRef<'hr'> & {
|
|
|
341
383
|
*/
|
|
342
384
|
size?: ResponsiveObject<'lg' | 'sm'> | 'lg' | 'sm';
|
|
343
385
|
};
|
|
386
|
+
/**
|
|
387
|
+
* A line used to visually separate content
|
|
388
|
+
*/
|
|
344
389
|
declare const Divider: {
|
|
345
390
|
({ size, ...otherProps }: DividerProps): JSX.Element;
|
|
346
391
|
displayName: string;
|
|
@@ -358,6 +403,9 @@ type EllipsisProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
358
403
|
*/
|
|
359
404
|
lines?: number;
|
|
360
405
|
};
|
|
406
|
+
/**
|
|
407
|
+
* Truncate text with an ellispsis visble at the end
|
|
408
|
+
*/
|
|
361
409
|
declare const Ellipsis: {
|
|
362
410
|
({ children, lines, ...otherProps }: EllipsisProps): JSX.Element;
|
|
363
411
|
displayName: string;
|
|
@@ -432,6 +480,9 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
|
|
|
432
480
|
*/
|
|
433
481
|
variant?: keyof typeof variantStyleMap$1;
|
|
434
482
|
};
|
|
483
|
+
/**
|
|
484
|
+
* Displaying heading text, both visually and semantically
|
|
485
|
+
*/
|
|
435
486
|
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"> & {
|
|
436
487
|
renderAs?: any;
|
|
437
488
|
} & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
|
|
@@ -680,6 +731,11 @@ declare const iconSizeMap: {
|
|
|
680
731
|
xxl: string;
|
|
681
732
|
};
|
|
682
733
|
type IconProps = ComponentPropsWithoutRef<'svg'> & {
|
|
734
|
+
/**
|
|
735
|
+
* Set the color scheme of the button
|
|
736
|
+
* TODO - link to a color scheme page
|
|
737
|
+
*/
|
|
738
|
+
colorScheme?: ColorSchemeTypes;
|
|
683
739
|
/**
|
|
684
740
|
* Is Icon on a filled background?
|
|
685
741
|
*/
|
|
@@ -697,8 +753,12 @@ type IconProps = ComponentPropsWithoutRef<'svg'> & {
|
|
|
697
753
|
*/
|
|
698
754
|
type: IconNameType;
|
|
699
755
|
};
|
|
756
|
+
/**
|
|
757
|
+
* A component that renders any of our available icons. Note that icons should not be used directly
|
|
758
|
+
* for interactivity. If you need an interactive element, use [IconButton](?path=/docs/ui-components-iconbutton--docs).
|
|
759
|
+
*/
|
|
700
760
|
declare const Icon: {
|
|
701
|
-
({ invertColor, size, style, type, ...otherProps }: IconProps): JSX.Element;
|
|
761
|
+
({ invertColor, colorScheme, size, style, type, ...otherProps }: IconProps): JSX.Element;
|
|
702
762
|
displayName: string;
|
|
703
763
|
};
|
|
704
764
|
|
|
@@ -707,7 +767,9 @@ type IconButtonProps = {
|
|
|
707
767
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
708
768
|
*/
|
|
709
769
|
label: string;
|
|
710
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* Disable the tooltip
|
|
772
|
+
*/
|
|
711
773
|
disableTooltip?: boolean;
|
|
712
774
|
/**
|
|
713
775
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -715,14 +777,17 @@ type IconButtonProps = {
|
|
|
715
777
|
children: JSX.Element;
|
|
716
778
|
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
717
779
|
/**
|
|
718
|
-
* IconButton behaves like a [Button](?path=/docs/ui-components-button--docs),
|
|
780
|
+
* IconButton behaves like a [Button](?path=/docs/ui-components-button--docs),
|
|
781
|
+
* but only accepts an [Icon](?path=/docs/ui-components-icon--docs) as a child.
|
|
719
782
|
*/
|
|
720
783
|
declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
721
784
|
/**
|
|
722
785
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
723
786
|
*/
|
|
724
787
|
label: string;
|
|
725
|
-
/**
|
|
788
|
+
/**
|
|
789
|
+
* Disable the tooltip
|
|
790
|
+
*/
|
|
726
791
|
disableTooltip?: boolean;
|
|
727
792
|
/**
|
|
728
793
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -733,7 +798,9 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
733
798
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
734
799
|
*/
|
|
735
800
|
label: string;
|
|
736
|
-
/**
|
|
801
|
+
/**
|
|
802
|
+
* Disable the tooltip
|
|
803
|
+
*/
|
|
737
804
|
disableTooltip?: boolean;
|
|
738
805
|
/**
|
|
739
806
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -756,6 +823,9 @@ type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
756
823
|
*/
|
|
757
824
|
text?: ReactNode;
|
|
758
825
|
};
|
|
826
|
+
/**
|
|
827
|
+
* Used to hide content from the visual client, but keep it readable for screen readers.
|
|
828
|
+
*/
|
|
759
829
|
declare const ScreenReaderOnly: {
|
|
760
830
|
({ text, children, focusable, ...otherProps }: ScreenReaderOnlyProps): react_jsx_runtime.JSX.Element;
|
|
761
831
|
displayName: string;
|
|
@@ -779,6 +849,10 @@ type StackProps = {
|
|
|
779
849
|
direction?: 'horizontal' | 'vertical';
|
|
780
850
|
renderAs?: ElementType$1;
|
|
781
851
|
};
|
|
852
|
+
/**
|
|
853
|
+
* Used to layout its children in a vertical or horizontal stack. The gap between each item in the stack can be customized.
|
|
854
|
+
* This allows for layouting children in a consistent way without needing to manually add margins or padding.
|
|
855
|
+
*/
|
|
782
856
|
declare const Stack: (<C = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, keyof StackProps> & {
|
|
783
857
|
renderAs?: any;
|
|
784
858
|
} & StackProps & {
|
|
@@ -850,6 +924,9 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
850
924
|
*/
|
|
851
925
|
variant?: keyof typeof variantStyleMap | undefined;
|
|
852
926
|
};
|
|
927
|
+
/**
|
|
928
|
+
* Used for rending paragraphs and inline text.
|
|
929
|
+
*/
|
|
853
930
|
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"> & {
|
|
854
931
|
renderAs?: any;
|
|
855
932
|
} & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -975,6 +1052,8 @@ type TooltipProps = {
|
|
|
975
1052
|
};
|
|
976
1053
|
/**
|
|
977
1054
|
* Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
|
|
1055
|
+
* For elements that are not interactive, consider using a [Popover](/docs/ui-docs-popover--docs) instead.
|
|
1056
|
+
* TODO - add link to Popover docs when they exist
|
|
978
1057
|
*/
|
|
979
1058
|
declare const Tooltip: {
|
|
980
1059
|
({ delay, direction, content, children, forceOpen, compact, hideArrow, }: TooltipProps): JSX.Element;
|
|
@@ -1019,4 +1098,22 @@ declare const WistiaLogo: {
|
|
|
1019
1098
|
displayName: string;
|
|
1020
1099
|
};
|
|
1021
1100
|
|
|
1022
|
-
|
|
1101
|
+
type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
|
|
1102
|
+
/**
|
|
1103
|
+
* The color scheme to apply
|
|
1104
|
+
*/
|
|
1105
|
+
colorScheme: ColorSchemeTypes;
|
|
1106
|
+
/**
|
|
1107
|
+
* Children
|
|
1108
|
+
*/
|
|
1109
|
+
children: ReactNode;
|
|
1110
|
+
};
|
|
1111
|
+
/**
|
|
1112
|
+
* A wrapper to apply a color scheme to its children.
|
|
1113
|
+
*/
|
|
1114
|
+
declare const ColorSchemeWrapper: {
|
|
1115
|
+
({ colorScheme, children, ...otherProps }: ColorSchemeWrapperProps): JSX.Element;
|
|
1116
|
+
displayName: string;
|
|
1117
|
+
};
|
|
1118
|
+
|
|
1119
|
+
export { Badge, type BadgeProps, Box, Button, ButtonGroup, type ButtonProps, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Link, type LinkProps, ScreenReaderOnly, Stack, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
|