@wistia/ui 0.0.8 → 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 +767 -696
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +66 -7
- package/dist/index.d.ts +66 -7
- package/dist/index.mjs +708 -639
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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';
|
|
@@ -166,8 +203,6 @@ declare const Box: {
|
|
|
166
203
|
type ButtonSizes = 'hero' | 'large' | 'medium' | 'small';
|
|
167
204
|
type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
|
|
168
205
|
|
|
169
|
-
type ColorSchemeTypes = 'inherit' | 'default' | 'info' | 'success' | 'warning' | 'error' | 'blue' | 'green' | 'orange' | 'pink' | 'purple' | 'yellow';
|
|
170
|
-
|
|
171
206
|
type LinkTypes = 'default' | 'email' | 'external' | 'phone';
|
|
172
207
|
type BaseProps = {
|
|
173
208
|
/**
|
|
@@ -732,7 +767,9 @@ type IconButtonProps = {
|
|
|
732
767
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
733
768
|
*/
|
|
734
769
|
label: string;
|
|
735
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* Disable the tooltip
|
|
772
|
+
*/
|
|
736
773
|
disableTooltip?: boolean;
|
|
737
774
|
/**
|
|
738
775
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -748,7 +785,9 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
748
785
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
749
786
|
*/
|
|
750
787
|
label: string;
|
|
751
|
-
/**
|
|
788
|
+
/**
|
|
789
|
+
* Disable the tooltip
|
|
790
|
+
*/
|
|
752
791
|
disableTooltip?: boolean;
|
|
753
792
|
/**
|
|
754
793
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -759,7 +798,9 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
759
798
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
760
799
|
*/
|
|
761
800
|
label: string;
|
|
762
|
-
/**
|
|
801
|
+
/**
|
|
802
|
+
* Disable the tooltip
|
|
803
|
+
*/
|
|
763
804
|
disableTooltip?: boolean;
|
|
764
805
|
/**
|
|
765
806
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -1057,4 +1098,22 @@ declare const WistiaLogo: {
|
|
|
1057
1098
|
displayName: string;
|
|
1058
1099
|
};
|
|
1059
1100
|
|
|
1060
|
-
|
|
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';
|
|
@@ -166,8 +203,6 @@ declare const Box: {
|
|
|
166
203
|
type ButtonSizes = 'hero' | 'large' | 'medium' | 'small';
|
|
167
204
|
type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
|
|
168
205
|
|
|
169
|
-
type ColorSchemeTypes = 'inherit' | 'default' | 'info' | 'success' | 'warning' | 'error' | 'blue' | 'green' | 'orange' | 'pink' | 'purple' | 'yellow';
|
|
170
|
-
|
|
171
206
|
type LinkTypes = 'default' | 'email' | 'external' | 'phone';
|
|
172
207
|
type BaseProps = {
|
|
173
208
|
/**
|
|
@@ -732,7 +767,9 @@ type IconButtonProps = {
|
|
|
732
767
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
733
768
|
*/
|
|
734
769
|
label: string;
|
|
735
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* Disable the tooltip
|
|
772
|
+
*/
|
|
736
773
|
disableTooltip?: boolean;
|
|
737
774
|
/**
|
|
738
775
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -748,7 +785,9 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
748
785
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
749
786
|
*/
|
|
750
787
|
label: string;
|
|
751
|
-
/**
|
|
788
|
+
/**
|
|
789
|
+
* Disable the tooltip
|
|
790
|
+
*/
|
|
752
791
|
disableTooltip?: boolean;
|
|
753
792
|
/**
|
|
754
793
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -759,7 +798,9 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
759
798
|
* Accessible text for screen readers. Also shows up in a tooltip unless `disableTooltip` is true.
|
|
760
799
|
*/
|
|
761
800
|
label: string;
|
|
762
|
-
/**
|
|
801
|
+
/**
|
|
802
|
+
* Disable the tooltip
|
|
803
|
+
*/
|
|
763
804
|
disableTooltip?: boolean;
|
|
764
805
|
/**
|
|
765
806
|
* The Icon component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -1057,4 +1098,22 @@ declare const WistiaLogo: {
|
|
|
1057
1098
|
displayName: string;
|
|
1058
1099
|
};
|
|
1059
1100
|
|
|
1060
|
-
|
|
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 };
|