@wistia/ui 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +286 -265
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +136 -70
- package/dist/index.d.ts +136 -70
- package/dist/index.mjs +290 -271
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, JSX, ComponentPropsWithoutRef, ComponentPropsWithRef, MouseEvent, JSXElementConstructor, ElementType as ElementType$1 } from 'react';
|
|
4
|
+
import { LinkProps as LinkProps$1 } from 'react-router-dom';
|
|
4
5
|
import * as styled_components from 'styled-components';
|
|
5
6
|
|
|
6
7
|
type UIProviderProps = {
|
|
@@ -16,6 +17,19 @@ declare const UIProvider: ({ children }: UIProviderProps) => react_jsx_runtime.J
|
|
|
16
17
|
*/
|
|
17
18
|
declare const copyToClipboard: (textToCopy: string) => Promise<void>;
|
|
18
19
|
|
|
20
|
+
declare const mq: {
|
|
21
|
+
xsAndUp: () => string;
|
|
22
|
+
smAndUp: () => string;
|
|
23
|
+
mdAndUp: () => string;
|
|
24
|
+
lgAndUp: () => string;
|
|
25
|
+
xlAndUp: () => string;
|
|
26
|
+
xsAndDown: () => string;
|
|
27
|
+
smAndDown: () => string;
|
|
28
|
+
mdAndDown: () => string;
|
|
29
|
+
lgAndDown: () => string;
|
|
30
|
+
xlAndDown: () => string;
|
|
31
|
+
};
|
|
32
|
+
|
|
19
33
|
type MediaQueryBooleans = {
|
|
20
34
|
isXlAndUp: boolean;
|
|
21
35
|
isLgAndUp: boolean;
|
|
@@ -151,7 +165,58 @@ type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
|
|
|
151
165
|
|
|
152
166
|
type ColorSchemeTypes = 'inherit' | 'default' | 'info' | 'success' | 'warning' | 'error' | 'blue' | 'green' | 'orange' | 'pink' | 'purple' | 'yellow';
|
|
153
167
|
|
|
154
|
-
type LinkTypes = 'default' | 'email' | 'external' | 'phone';
|
|
168
|
+
type LinkTypes = 'default' | 'email' | 'external' | 'phone';
|
|
169
|
+
type BaseProps = {
|
|
170
|
+
/**
|
|
171
|
+
* A Promise to invoke before navigating to location.
|
|
172
|
+
* _Caution: if used with `external` type prop a new window will **not** be opened_
|
|
173
|
+
*/
|
|
174
|
+
beforeAction?: (() => Promise<void>) | (() => void);
|
|
175
|
+
/**
|
|
176
|
+
* Text that appears inside of the link
|
|
177
|
+
*
|
|
178
|
+
* @type ReactNode
|
|
179
|
+
*/
|
|
180
|
+
children: ReactNode;
|
|
181
|
+
/**
|
|
182
|
+
* Set the color scheme of the button
|
|
183
|
+
* TODO - link to a color scheme page
|
|
184
|
+
*/
|
|
185
|
+
colorScheme?: ColorSchemeTypes;
|
|
186
|
+
/**
|
|
187
|
+
* Disables the link
|
|
188
|
+
*/
|
|
189
|
+
disabled?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Type of link to display
|
|
192
|
+
*
|
|
193
|
+
* * `email` creates a mailto
|
|
194
|
+
* * `phone` creates a telephone number
|
|
195
|
+
* * `external` will open links in a new window
|
|
196
|
+
*/
|
|
197
|
+
type?: LinkTypes | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* Whether the link should be underlined
|
|
200
|
+
*/
|
|
201
|
+
underline?: boolean;
|
|
202
|
+
};
|
|
203
|
+
type LinkAsLinkProps = BaseProps & ComponentPropsWithRef<'a'> & Omit<LinkProps$1, 'to'> & {
|
|
204
|
+
href: string | undefined;
|
|
205
|
+
type?: LinkTypes;
|
|
206
|
+
};
|
|
207
|
+
type LinkAsButtonProps = BaseProps & ComponentPropsWithRef<'button'> & {
|
|
208
|
+
href?: never;
|
|
209
|
+
type?: 'button' | 'reset' | 'submit';
|
|
210
|
+
};
|
|
211
|
+
type LinkProps = LinkAsButtonProps | LinkAsLinkProps;
|
|
212
|
+
/**
|
|
213
|
+
* Links are used for navigation. If no `href` is supplied, a button that is visually styled to apper as a link
|
|
214
|
+
* is used. If used in a react-router context, their [Link](https://reactrouter.com/en/main/components/link). component is used, otherwise a native a tag.
|
|
215
|
+
* This means in addition to its own props, `Link` can use props from `react-router-dom`'s `Link` component. View their documentation [here](https://reactrouter.com/en/main/components/link).
|
|
216
|
+
* The one prop we ignore from react-router is `to`. We use `href` instead and map it under the hood.
|
|
217
|
+
*
|
|
218
|
+
*/
|
|
219
|
+
declare const Link: react.ForwardRefExoticComponent<(Omit<LinkAsLinkProps, "ref"> | Omit<LinkAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
155
220
|
|
|
156
221
|
type Breakpoints = 'isLgAndDown' | 'isLgAndUp' | 'isMdAndDown' | 'isMdAndUp' | 'isSmAndDown' | 'isSmAndUp' | 'isXlAndDown' | 'isXlAndUp' | 'isXsAndDown' | 'isXsAndUp';
|
|
157
222
|
type AtLeastOneBreakpoint<T, U = {
|
|
@@ -637,6 +702,45 @@ declare const Icon: {
|
|
|
637
702
|
displayName: string;
|
|
638
703
|
};
|
|
639
704
|
|
|
705
|
+
type IconButtonProps = {
|
|
706
|
+
/**
|
|
707
|
+
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
708
|
+
*/
|
|
709
|
+
label: string;
|
|
710
|
+
/** Disable the tooltip */
|
|
711
|
+
disableTooltip?: boolean;
|
|
712
|
+
/**
|
|
713
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
714
|
+
*/
|
|
715
|
+
children: JSX.Element;
|
|
716
|
+
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
717
|
+
/**
|
|
718
|
+
* IconButton behaves like a [Button](?path=/docs/ui-components-button--docs), but only accepts an Icon as a child.
|
|
719
|
+
*/
|
|
720
|
+
declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
721
|
+
/**
|
|
722
|
+
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
723
|
+
*/
|
|
724
|
+
label: string;
|
|
725
|
+
/** Disable the tooltip */
|
|
726
|
+
disableTooltip?: boolean;
|
|
727
|
+
/**
|
|
728
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
729
|
+
*/
|
|
730
|
+
children: JSX.Element;
|
|
731
|
+
} & Omit<ButtonAsButtonProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref"> | Omit<{
|
|
732
|
+
/**
|
|
733
|
+
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
734
|
+
*/
|
|
735
|
+
label: string;
|
|
736
|
+
/** Disable the tooltip */
|
|
737
|
+
disableTooltip?: boolean;
|
|
738
|
+
/**
|
|
739
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
740
|
+
*/
|
|
741
|
+
children: JSX.Element;
|
|
742
|
+
} & Omit<ButtonAsLinkProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
743
|
+
|
|
640
744
|
type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
|
|
641
745
|
/**
|
|
642
746
|
* Pass an arbitrary child node
|
|
@@ -699,7 +803,8 @@ declare const variantStyleMap: {
|
|
|
699
803
|
label4: styled_components.FlattenSimpleInterpolation;
|
|
700
804
|
};
|
|
701
805
|
declare const prominenceMap: {
|
|
702
|
-
|
|
806
|
+
highContrast: styled_components.FlattenSimpleInterpolation;
|
|
807
|
+
vibrant: styled_components.FlattenSimpleInterpolation;
|
|
703
808
|
secondary: styled_components.FlattenSimpleInterpolation;
|
|
704
809
|
};
|
|
705
810
|
type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
@@ -736,7 +841,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
736
841
|
*/
|
|
737
842
|
preventUserSelect?: boolean;
|
|
738
843
|
/**
|
|
739
|
-
*
|
|
844
|
+
* Text prominence affects color. Use 'highContrast' for main non-interactive text, 'vibrant' for interactive elements, and 'secondary' for less important or supplementary content.
|
|
740
845
|
*/
|
|
741
846
|
prominence?: keyof typeof prominenceMap;
|
|
742
847
|
renderAs?: ElementType$1;
|
|
@@ -781,7 +886,7 @@ declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>)
|
|
|
781
886
|
*/
|
|
782
887
|
preventUserSelect?: boolean;
|
|
783
888
|
/**
|
|
784
|
-
*
|
|
889
|
+
* Text prominence affects color. Use 'highContrast' for main non-interactive text, 'vibrant' for interactive elements, and 'secondary' for less important or supplementary content.
|
|
785
890
|
*/
|
|
786
891
|
prominence?: keyof typeof prominenceMap;
|
|
787
892
|
renderAs?: ElementType$1;
|
|
@@ -825,7 +930,7 @@ declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>)
|
|
|
825
930
|
*/
|
|
826
931
|
preventUserSelect?: boolean;
|
|
827
932
|
/**
|
|
828
|
-
*
|
|
933
|
+
* Text prominence affects color. Use 'highContrast' for main non-interactive text, 'vibrant' for interactive elements, and 'secondary' for less important or supplementary content.
|
|
829
934
|
*/
|
|
830
935
|
prominence?: keyof typeof prominenceMap;
|
|
831
936
|
renderAs?: ElementType$1;
|
|
@@ -837,44 +942,6 @@ declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>)
|
|
|
837
942
|
renderAs: react.JSXElementConstructor<any> | keyof react.JSX.IntrinsicElements;
|
|
838
943
|
})>, never> & Record<string, never>;
|
|
839
944
|
|
|
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
945
|
type TooltipProps = {
|
|
879
946
|
/**
|
|
880
947
|
* The content of the tooltip
|
|
@@ -914,43 +981,42 @@ declare const Tooltip: {
|
|
|
914
981
|
displayName: string;
|
|
915
982
|
};
|
|
916
983
|
|
|
917
|
-
type
|
|
984
|
+
type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'href'> & {
|
|
918
985
|
/**
|
|
919
|
-
*
|
|
986
|
+
* An optional accessible description for the logo
|
|
920
987
|
*/
|
|
921
|
-
|
|
922
|
-
/** Disable the tooltip */
|
|
923
|
-
disableTooltip?: boolean;
|
|
988
|
+
description?: string;
|
|
924
989
|
/**
|
|
925
|
-
*
|
|
990
|
+
* Height, in pixels, of the logo
|
|
926
991
|
*/
|
|
927
|
-
|
|
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<{
|
|
992
|
+
height?: number;
|
|
933
993
|
/**
|
|
934
|
-
*
|
|
994
|
+
* @ignore
|
|
995
|
+
* Change the color when hovering over the logo
|
|
935
996
|
*/
|
|
936
|
-
|
|
937
|
-
/** Disable the tooltip */
|
|
938
|
-
disableTooltip?: boolean;
|
|
997
|
+
hoverColor?: string;
|
|
939
998
|
/**
|
|
940
|
-
*
|
|
999
|
+
* Display just the icon portion of the logo (ie. hide `Wistia` text)
|
|
1000
|
+
* note: there is no analogue to this because by brand guidelines, the
|
|
1001
|
+
* `Wistia` text must not be displayed without the "flags" iconography
|
|
941
1002
|
*/
|
|
942
|
-
|
|
943
|
-
} & Omit<ButtonAsButtonProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref"> | Omit<{
|
|
1003
|
+
iconOnly?: boolean;
|
|
944
1004
|
/**
|
|
945
|
-
*
|
|
1005
|
+
* If provided, will wrap the logo in a link
|
|
946
1006
|
*/
|
|
947
|
-
|
|
948
|
-
/** Disable the tooltip */
|
|
949
|
-
disableTooltip?: boolean;
|
|
1007
|
+
href?: string;
|
|
950
1008
|
/**
|
|
951
|
-
*
|
|
1009
|
+
* An accessible title for the logo (defaults to "Wistia Logo")
|
|
952
1010
|
*/
|
|
953
|
-
|
|
954
|
-
|
|
1011
|
+
title?: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* Style of the logo
|
|
1014
|
+
*/
|
|
1015
|
+
variant?: 'dark' | 'light' | 'standard';
|
|
1016
|
+
};
|
|
1017
|
+
declare const WistiaLogo: {
|
|
1018
|
+
({ description, height, hoverColor, href, iconOnly, title, variant, ...otherProps }: WistiaLogoProps): react_jsx_runtime.JSX.Element;
|
|
1019
|
+
displayName: string;
|
|
1020
|
+
};
|
|
955
1021
|
|
|
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 };
|
|
1022
|
+
export { Box, Button, ButtonGroup, type ButtonProps, 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,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, JSX, ComponentPropsWithoutRef, ComponentPropsWithRef, MouseEvent, JSXElementConstructor, ElementType as ElementType$1 } from 'react';
|
|
4
|
+
import { LinkProps as LinkProps$1 } from 'react-router-dom';
|
|
4
5
|
import * as styled_components from 'styled-components';
|
|
5
6
|
|
|
6
7
|
type UIProviderProps = {
|
|
@@ -16,6 +17,19 @@ declare const UIProvider: ({ children }: UIProviderProps) => react_jsx_runtime.J
|
|
|
16
17
|
*/
|
|
17
18
|
declare const copyToClipboard: (textToCopy: string) => Promise<void>;
|
|
18
19
|
|
|
20
|
+
declare const mq: {
|
|
21
|
+
xsAndUp: () => string;
|
|
22
|
+
smAndUp: () => string;
|
|
23
|
+
mdAndUp: () => string;
|
|
24
|
+
lgAndUp: () => string;
|
|
25
|
+
xlAndUp: () => string;
|
|
26
|
+
xsAndDown: () => string;
|
|
27
|
+
smAndDown: () => string;
|
|
28
|
+
mdAndDown: () => string;
|
|
29
|
+
lgAndDown: () => string;
|
|
30
|
+
xlAndDown: () => string;
|
|
31
|
+
};
|
|
32
|
+
|
|
19
33
|
type MediaQueryBooleans = {
|
|
20
34
|
isXlAndUp: boolean;
|
|
21
35
|
isLgAndUp: boolean;
|
|
@@ -151,7 +165,58 @@ type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
|
|
|
151
165
|
|
|
152
166
|
type ColorSchemeTypes = 'inherit' | 'default' | 'info' | 'success' | 'warning' | 'error' | 'blue' | 'green' | 'orange' | 'pink' | 'purple' | 'yellow';
|
|
153
167
|
|
|
154
|
-
type LinkTypes = 'default' | 'email' | 'external' | 'phone';
|
|
168
|
+
type LinkTypes = 'default' | 'email' | 'external' | 'phone';
|
|
169
|
+
type BaseProps = {
|
|
170
|
+
/**
|
|
171
|
+
* A Promise to invoke before navigating to location.
|
|
172
|
+
* _Caution: if used with `external` type prop a new window will **not** be opened_
|
|
173
|
+
*/
|
|
174
|
+
beforeAction?: (() => Promise<void>) | (() => void);
|
|
175
|
+
/**
|
|
176
|
+
* Text that appears inside of the link
|
|
177
|
+
*
|
|
178
|
+
* @type ReactNode
|
|
179
|
+
*/
|
|
180
|
+
children: ReactNode;
|
|
181
|
+
/**
|
|
182
|
+
* Set the color scheme of the button
|
|
183
|
+
* TODO - link to a color scheme page
|
|
184
|
+
*/
|
|
185
|
+
colorScheme?: ColorSchemeTypes;
|
|
186
|
+
/**
|
|
187
|
+
* Disables the link
|
|
188
|
+
*/
|
|
189
|
+
disabled?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Type of link to display
|
|
192
|
+
*
|
|
193
|
+
* * `email` creates a mailto
|
|
194
|
+
* * `phone` creates a telephone number
|
|
195
|
+
* * `external` will open links in a new window
|
|
196
|
+
*/
|
|
197
|
+
type?: LinkTypes | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* Whether the link should be underlined
|
|
200
|
+
*/
|
|
201
|
+
underline?: boolean;
|
|
202
|
+
};
|
|
203
|
+
type LinkAsLinkProps = BaseProps & ComponentPropsWithRef<'a'> & Omit<LinkProps$1, 'to'> & {
|
|
204
|
+
href: string | undefined;
|
|
205
|
+
type?: LinkTypes;
|
|
206
|
+
};
|
|
207
|
+
type LinkAsButtonProps = BaseProps & ComponentPropsWithRef<'button'> & {
|
|
208
|
+
href?: never;
|
|
209
|
+
type?: 'button' | 'reset' | 'submit';
|
|
210
|
+
};
|
|
211
|
+
type LinkProps = LinkAsButtonProps | LinkAsLinkProps;
|
|
212
|
+
/**
|
|
213
|
+
* Links are used for navigation. If no `href` is supplied, a button that is visually styled to apper as a link
|
|
214
|
+
* is used. If used in a react-router context, their [Link](https://reactrouter.com/en/main/components/link). component is used, otherwise a native a tag.
|
|
215
|
+
* This means in addition to its own props, `Link` can use props from `react-router-dom`'s `Link` component. View their documentation [here](https://reactrouter.com/en/main/components/link).
|
|
216
|
+
* The one prop we ignore from react-router is `to`. We use `href` instead and map it under the hood.
|
|
217
|
+
*
|
|
218
|
+
*/
|
|
219
|
+
declare const Link: react.ForwardRefExoticComponent<(Omit<LinkAsLinkProps, "ref"> | Omit<LinkAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
155
220
|
|
|
156
221
|
type Breakpoints = 'isLgAndDown' | 'isLgAndUp' | 'isMdAndDown' | 'isMdAndUp' | 'isSmAndDown' | 'isSmAndUp' | 'isXlAndDown' | 'isXlAndUp' | 'isXsAndDown' | 'isXsAndUp';
|
|
157
222
|
type AtLeastOneBreakpoint<T, U = {
|
|
@@ -637,6 +702,45 @@ declare const Icon: {
|
|
|
637
702
|
displayName: string;
|
|
638
703
|
};
|
|
639
704
|
|
|
705
|
+
type IconButtonProps = {
|
|
706
|
+
/**
|
|
707
|
+
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
708
|
+
*/
|
|
709
|
+
label: string;
|
|
710
|
+
/** Disable the tooltip */
|
|
711
|
+
disableTooltip?: boolean;
|
|
712
|
+
/**
|
|
713
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
714
|
+
*/
|
|
715
|
+
children: JSX.Element;
|
|
716
|
+
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
717
|
+
/**
|
|
718
|
+
* IconButton behaves like a [Button](?path=/docs/ui-components-button--docs), but only accepts an Icon as a child.
|
|
719
|
+
*/
|
|
720
|
+
declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
721
|
+
/**
|
|
722
|
+
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
723
|
+
*/
|
|
724
|
+
label: string;
|
|
725
|
+
/** Disable the tooltip */
|
|
726
|
+
disableTooltip?: boolean;
|
|
727
|
+
/**
|
|
728
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
729
|
+
*/
|
|
730
|
+
children: JSX.Element;
|
|
731
|
+
} & Omit<ButtonAsButtonProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref"> | Omit<{
|
|
732
|
+
/**
|
|
733
|
+
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
734
|
+
*/
|
|
735
|
+
label: string;
|
|
736
|
+
/** Disable the tooltip */
|
|
737
|
+
disableTooltip?: boolean;
|
|
738
|
+
/**
|
|
739
|
+
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
740
|
+
*/
|
|
741
|
+
children: JSX.Element;
|
|
742
|
+
} & Omit<ButtonAsLinkProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
743
|
+
|
|
640
744
|
type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
|
|
641
745
|
/**
|
|
642
746
|
* Pass an arbitrary child node
|
|
@@ -699,7 +803,8 @@ declare const variantStyleMap: {
|
|
|
699
803
|
label4: styled_components.FlattenSimpleInterpolation;
|
|
700
804
|
};
|
|
701
805
|
declare const prominenceMap: {
|
|
702
|
-
|
|
806
|
+
highContrast: styled_components.FlattenSimpleInterpolation;
|
|
807
|
+
vibrant: styled_components.FlattenSimpleInterpolation;
|
|
703
808
|
secondary: styled_components.FlattenSimpleInterpolation;
|
|
704
809
|
};
|
|
705
810
|
type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
@@ -736,7 +841,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
736
841
|
*/
|
|
737
842
|
preventUserSelect?: boolean;
|
|
738
843
|
/**
|
|
739
|
-
*
|
|
844
|
+
* Text prominence affects color. Use 'highContrast' for main non-interactive text, 'vibrant' for interactive elements, and 'secondary' for less important or supplementary content.
|
|
740
845
|
*/
|
|
741
846
|
prominence?: keyof typeof prominenceMap;
|
|
742
847
|
renderAs?: ElementType$1;
|
|
@@ -781,7 +886,7 @@ declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>)
|
|
|
781
886
|
*/
|
|
782
887
|
preventUserSelect?: boolean;
|
|
783
888
|
/**
|
|
784
|
-
*
|
|
889
|
+
* Text prominence affects color. Use 'highContrast' for main non-interactive text, 'vibrant' for interactive elements, and 'secondary' for less important or supplementary content.
|
|
785
890
|
*/
|
|
786
891
|
prominence?: keyof typeof prominenceMap;
|
|
787
892
|
renderAs?: ElementType$1;
|
|
@@ -825,7 +930,7 @@ declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>)
|
|
|
825
930
|
*/
|
|
826
931
|
preventUserSelect?: boolean;
|
|
827
932
|
/**
|
|
828
|
-
*
|
|
933
|
+
* Text prominence affects color. Use 'highContrast' for main non-interactive text, 'vibrant' for interactive elements, and 'secondary' for less important or supplementary content.
|
|
829
934
|
*/
|
|
830
935
|
prominence?: keyof typeof prominenceMap;
|
|
831
936
|
renderAs?: ElementType$1;
|
|
@@ -837,44 +942,6 @@ declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>)
|
|
|
837
942
|
renderAs: react.JSXElementConstructor<any> | keyof react.JSX.IntrinsicElements;
|
|
838
943
|
})>, never> & Record<string, never>;
|
|
839
944
|
|
|
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
945
|
type TooltipProps = {
|
|
879
946
|
/**
|
|
880
947
|
* The content of the tooltip
|
|
@@ -914,43 +981,42 @@ declare const Tooltip: {
|
|
|
914
981
|
displayName: string;
|
|
915
982
|
};
|
|
916
983
|
|
|
917
|
-
type
|
|
984
|
+
type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'href'> & {
|
|
918
985
|
/**
|
|
919
|
-
*
|
|
986
|
+
* An optional accessible description for the logo
|
|
920
987
|
*/
|
|
921
|
-
|
|
922
|
-
/** Disable the tooltip */
|
|
923
|
-
disableTooltip?: boolean;
|
|
988
|
+
description?: string;
|
|
924
989
|
/**
|
|
925
|
-
*
|
|
990
|
+
* Height, in pixels, of the logo
|
|
926
991
|
*/
|
|
927
|
-
|
|
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<{
|
|
992
|
+
height?: number;
|
|
933
993
|
/**
|
|
934
|
-
*
|
|
994
|
+
* @ignore
|
|
995
|
+
* Change the color when hovering over the logo
|
|
935
996
|
*/
|
|
936
|
-
|
|
937
|
-
/** Disable the tooltip */
|
|
938
|
-
disableTooltip?: boolean;
|
|
997
|
+
hoverColor?: string;
|
|
939
998
|
/**
|
|
940
|
-
*
|
|
999
|
+
* Display just the icon portion of the logo (ie. hide `Wistia` text)
|
|
1000
|
+
* note: there is no analogue to this because by brand guidelines, the
|
|
1001
|
+
* `Wistia` text must not be displayed without the "flags" iconography
|
|
941
1002
|
*/
|
|
942
|
-
|
|
943
|
-
} & Omit<ButtonAsButtonProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref"> | Omit<{
|
|
1003
|
+
iconOnly?: boolean;
|
|
944
1004
|
/**
|
|
945
|
-
*
|
|
1005
|
+
* If provided, will wrap the logo in a link
|
|
946
1006
|
*/
|
|
947
|
-
|
|
948
|
-
/** Disable the tooltip */
|
|
949
|
-
disableTooltip?: boolean;
|
|
1007
|
+
href?: string;
|
|
950
1008
|
/**
|
|
951
|
-
*
|
|
1009
|
+
* An accessible title for the logo (defaults to "Wistia Logo")
|
|
952
1010
|
*/
|
|
953
|
-
|
|
954
|
-
|
|
1011
|
+
title?: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* Style of the logo
|
|
1014
|
+
*/
|
|
1015
|
+
variant?: 'dark' | 'light' | 'standard';
|
|
1016
|
+
};
|
|
1017
|
+
declare const WistiaLogo: {
|
|
1018
|
+
({ description, height, hoverColor, href, iconOnly, title, variant, ...otherProps }: WistiaLogoProps): react_jsx_runtime.JSX.Element;
|
|
1019
|
+
displayName: string;
|
|
1020
|
+
};
|
|
955
1021
|
|
|
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 };
|
|
1022
|
+
export { Box, Button, ButtonGroup, type ButtonProps, 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 };
|