@wistia/ui 0.8.12 → 0.8.13-beta.098b59ab.c299c8a

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.d.mts CHANGED
@@ -86,6 +86,14 @@ type UseBooleanReturn = [
86
86
  ];
87
87
  declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
88
88
 
89
+ declare const useClipboard: (textToCopy: string, timeout?: number) => [() => Promise<void>, boolean, boolean];
90
+
91
+ type UseFocusTrapOptions = {
92
+ disableAriaHider?: boolean;
93
+ focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
94
+ };
95
+ declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
96
+
89
97
  type AddEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
90
98
  type RemoveEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
91
99
  declare const useEvent: <T extends Event>(eventName: Parameters<AddEventListenerType>[0], eventHandler: (event: T) => unknown, eventTarget?: unknown, eventOptions?: Parameters<RemoveEventListenerType>[2]) => void;
@@ -105,9 +113,6 @@ declare const useLocalStorage: <T, _>(key: Parameters<SetItemType>[0], initialVa
105
113
 
106
114
  declare const useLockBodyScroll: (locked: boolean) => void;
107
115
 
108
- type EventType = 'focusin' | 'focusout' | 'mousedown' | 'mouseup' | 'touchend' | 'touchstart';
109
- declare const useOnClickOutside: (ref: RefObject<HTMLElement | null | undefined>, handler: (event: Event) => unknown, eventTypes?: EventType | EventType[]) => void;
110
-
111
116
  type MediaQueryBooleans = {
112
117
  isXlAndUp: boolean;
113
118
  isLgAndUp: boolean;
@@ -124,6 +129,9 @@ declare const useMq: () => MediaQueryBooleans;
124
129
  type MediaQueryLabels = keyof MediaQueryBooleans;
125
130
  declare const useActiveMq: () => MediaQueryLabels[];
126
131
 
132
+ type EventType = 'focusin' | 'focusout' | 'mousedown' | 'mouseup' | 'touchend' | 'touchstart';
133
+ declare const useOnClickOutside: (ref: RefObject<HTMLElement | null | undefined>, handler: (event: Event) => unknown, eventTypes?: EventType | EventType[]) => void;
134
+
127
135
  declare const colorSchemeOptions: readonly ["default", "inherit", "error", "info", "success", "warning", "blue", "green", "orange", "pink", "purple", "yellow", "vendor-hubspot", "vendor-marketo", "vendor-pardot"];
128
136
  type ColorSchemeTypes = (typeof colorSchemeOptions)[number];
129
137
  type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
@@ -395,12 +403,6 @@ declare const useWindowSize: (interval?: number) => {
395
403
  height: number;
396
404
  };
397
405
 
398
- type UseFocusTrapOptions = {
399
- disableAriaHider?: boolean;
400
- focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
401
- };
402
- declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
403
-
404
406
  type ActionButtonProps = {
405
407
  /**
406
408
  * @override
@@ -800,6 +802,8 @@ declare const ButtonGroup: {
800
802
  displayName: string;
801
803
  };
802
804
 
805
+ type BorderRadius = 'border-radius-00' | 'border-radius-01' | 'border-radius-02' | 'border-radius-03' | 'border-radius-04' | 'border-radius-05' | 'border-radius-rounded';
806
+
803
807
  type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
804
808
  /**
805
809
  * Content to be rendered inside the Card component
@@ -822,9 +826,9 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
822
826
  */
823
827
  border?: boolean;
824
828
  /**
825
- * Sets the flex direction of the card's contents.
829
+ * Border radius to apply to the Card
826
830
  */
827
- direction?: BoxProps['direction'];
831
+ borderRadius?: BorderRadius;
828
832
  /**
829
833
  * Specifies the gaps (gutters) between rows and columns
830
834
  */
@@ -853,6 +857,10 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
853
857
  * @ignore
854
858
  */
855
859
  basis?: BoxProps['basis'];
860
+ /**
861
+ * @ignore
862
+ */
863
+ direction?: BoxProps['direction'];
856
864
  /**
857
865
  * @ignore
858
866
  */
@@ -861,6 +869,10 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
861
869
  * @ignore
862
870
  */
863
871
  fillViewport?: BoxProps['fillViewport'];
872
+ /**
873
+ * @ignore
874
+ */
875
+ flexMode?: BoxProps['flexMode'];
864
876
  /**
865
877
  * @ignore
866
878
  */
@@ -891,7 +903,7 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
891
903
  * Cards can be used to visually distinguish content sections. Extends the [Box component.](https://wistia.github.io/vhs/storybook-ui/?path=/docs/components-box--docs)
892
904
  */
893
905
  declare const Card: {
894
- ({ children, paddingSize, gap, direction, colorScheme, prominence, border, height, width, ...props }: CardProps): JSX.Element;
906
+ ({ children, border, borderRadius, colorScheme, direction, gap, height, paddingSize, prominence, width, ...props }: CardProps): JSX.Element;
895
907
  displayName: string;
896
908
  };
897
909
 
@@ -1665,8 +1677,6 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
1665
1677
  children: JSX.Element;
1666
1678
  } & Omit<ButtonAsLinkProps, "leftIcon" | "rightIcon" | "fullWidth">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
1667
1679
 
1668
- type BorderRadius = 'border-radius-01' | 'border-radius-02' | 'border-radius-03' | 'border-radius-04' | 'border-radius-05' | 'border-radius-rounded';
1669
-
1670
1680
  type ImageProps = ComponentPropsWithoutRef<'img'> & {
1671
1681
  /**
1672
1682
  * Accessible text to apply to the image
@@ -3187,4 +3197,4 @@ declare const WistiaLogo: {
3187
3197
  displayName: string;
3188
3198
  };
3189
3199
 
3190
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useFocusTrap, useFormState, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, useToast, useWindowSize };
3200
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useFocusTrap, useFormState, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, useToast, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -86,6 +86,14 @@ type UseBooleanReturn = [
86
86
  ];
87
87
  declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
88
88
 
89
+ declare const useClipboard: (textToCopy: string, timeout?: number) => [() => Promise<void>, boolean, boolean];
90
+
91
+ type UseFocusTrapOptions = {
92
+ disableAriaHider?: boolean;
93
+ focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
94
+ };
95
+ declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
96
+
89
97
  type AddEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
90
98
  type RemoveEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
91
99
  declare const useEvent: <T extends Event>(eventName: Parameters<AddEventListenerType>[0], eventHandler: (event: T) => unknown, eventTarget?: unknown, eventOptions?: Parameters<RemoveEventListenerType>[2]) => void;
@@ -105,9 +113,6 @@ declare const useLocalStorage: <T, _>(key: Parameters<SetItemType>[0], initialVa
105
113
 
106
114
  declare const useLockBodyScroll: (locked: boolean) => void;
107
115
 
108
- type EventType = 'focusin' | 'focusout' | 'mousedown' | 'mouseup' | 'touchend' | 'touchstart';
109
- declare const useOnClickOutside: (ref: RefObject<HTMLElement | null | undefined>, handler: (event: Event) => unknown, eventTypes?: EventType | EventType[]) => void;
110
-
111
116
  type MediaQueryBooleans = {
112
117
  isXlAndUp: boolean;
113
118
  isLgAndUp: boolean;
@@ -124,6 +129,9 @@ declare const useMq: () => MediaQueryBooleans;
124
129
  type MediaQueryLabels = keyof MediaQueryBooleans;
125
130
  declare const useActiveMq: () => MediaQueryLabels[];
126
131
 
132
+ type EventType = 'focusin' | 'focusout' | 'mousedown' | 'mouseup' | 'touchend' | 'touchstart';
133
+ declare const useOnClickOutside: (ref: RefObject<HTMLElement | null | undefined>, handler: (event: Event) => unknown, eventTypes?: EventType | EventType[]) => void;
134
+
127
135
  declare const colorSchemeOptions: readonly ["default", "inherit", "error", "info", "success", "warning", "blue", "green", "orange", "pink", "purple", "yellow", "vendor-hubspot", "vendor-marketo", "vendor-pardot"];
128
136
  type ColorSchemeTypes = (typeof colorSchemeOptions)[number];
129
137
  type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
@@ -395,12 +403,6 @@ declare const useWindowSize: (interval?: number) => {
395
403
  height: number;
396
404
  };
397
405
 
398
- type UseFocusTrapOptions = {
399
- disableAriaHider?: boolean;
400
- focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
401
- };
402
- declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
403
-
404
406
  type ActionButtonProps = {
405
407
  /**
406
408
  * @override
@@ -800,6 +802,8 @@ declare const ButtonGroup: {
800
802
  displayName: string;
801
803
  };
802
804
 
805
+ type BorderRadius = 'border-radius-00' | 'border-radius-01' | 'border-radius-02' | 'border-radius-03' | 'border-radius-04' | 'border-radius-05' | 'border-radius-rounded';
806
+
803
807
  type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
804
808
  /**
805
809
  * Content to be rendered inside the Card component
@@ -822,9 +826,9 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
822
826
  */
823
827
  border?: boolean;
824
828
  /**
825
- * Sets the flex direction of the card's contents.
829
+ * Border radius to apply to the Card
826
830
  */
827
- direction?: BoxProps['direction'];
831
+ borderRadius?: BorderRadius;
828
832
  /**
829
833
  * Specifies the gaps (gutters) between rows and columns
830
834
  */
@@ -853,6 +857,10 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
853
857
  * @ignore
854
858
  */
855
859
  basis?: BoxProps['basis'];
860
+ /**
861
+ * @ignore
862
+ */
863
+ direction?: BoxProps['direction'];
856
864
  /**
857
865
  * @ignore
858
866
  */
@@ -861,6 +869,10 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
861
869
  * @ignore
862
870
  */
863
871
  fillViewport?: BoxProps['fillViewport'];
872
+ /**
873
+ * @ignore
874
+ */
875
+ flexMode?: BoxProps['flexMode'];
864
876
  /**
865
877
  * @ignore
866
878
  */
@@ -891,7 +903,7 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
891
903
  * Cards can be used to visually distinguish content sections. Extends the [Box component.](https://wistia.github.io/vhs/storybook-ui/?path=/docs/components-box--docs)
892
904
  */
893
905
  declare const Card: {
894
- ({ children, paddingSize, gap, direction, colorScheme, prominence, border, height, width, ...props }: CardProps): JSX.Element;
906
+ ({ children, border, borderRadius, colorScheme, direction, gap, height, paddingSize, prominence, width, ...props }: CardProps): JSX.Element;
895
907
  displayName: string;
896
908
  };
897
909
 
@@ -1665,8 +1677,6 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
1665
1677
  children: JSX.Element;
1666
1678
  } & Omit<ButtonAsLinkProps, "leftIcon" | "rightIcon" | "fullWidth">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
1667
1679
 
1668
- type BorderRadius = 'border-radius-01' | 'border-radius-02' | 'border-radius-03' | 'border-radius-04' | 'border-radius-05' | 'border-radius-rounded';
1669
-
1670
1680
  type ImageProps = ComponentPropsWithoutRef<'img'> & {
1671
1681
  /**
1672
1682
  * Accessible text to apply to the image
@@ -3187,4 +3197,4 @@ declare const WistiaLogo: {
3187
3197
  displayName: string;
3188
3198
  };
3189
3199
 
3190
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useFocusTrap, useFormState, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, useToast, useWindowSize };
3200
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useFocusTrap, useFormState, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, useToast, useWindowSize };