@wistia/ui 0.8.8 → 0.8.9-beta.8e513df6.87f52b0

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
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import react__default, { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, ForwardedRef, Ref, SyntheticEvent, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from 'react';
3
+ import react__default, { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, ForwardedRef, Ref, SyntheticEvent, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, ReactElement } from 'react';
4
4
  export * from 'use-file-picker/types';
5
5
  export { useFilePicker, useImperativeFilePicker } from 'use-file-picker';
6
6
  export { FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, ImageDimensionsValidator, PersistentFileAmountLimitValidator } from 'use-file-picker/validators';
@@ -202,11 +202,12 @@ type LinkAsButtonProps = BaseProps$2 & ComponentPropsWithRef<'button'> & {
202
202
  };
203
203
  type LinkProps = LinkAsButtonProps | LinkAsLinkProps;
204
204
  /**
205
- * Links are used for navigation. If no `href` is supplied, a button that is visually styled to apper as a link
206
- * 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.
205
+ * Links are used for navigation. If no `href` is supplied, a button that is visually styled to appear as a link
206
+ * is rendered. If used in a `react-router` context, their [Link](https://reactrouter.com/en/main/components/link).
207
+ * component is used, otherwise a native `a` element.
208
+ *
207
209
  * 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).
208
210
  * The one prop we ignore from react-router is `to`. We use `href` instead and map it under the hood.
209
- *
210
211
  */
211
212
  declare const Link: react.ForwardRefExoticComponent<(Omit<LinkAsLinkProps, "ref"> | Omit<LinkAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
212
213
 
@@ -758,7 +759,7 @@ declare const Breadcrumbs: {
758
759
  type BreadcrumbProps = ButtonAsLinkProps & {
759
760
  /**
760
761
  * An [Icon](../?path=/docs/components-icon--docs) to show at the beginning of the breadcrumb
761
- * */
762
+ */
762
763
  icon?: ButtonAsLinkProps['leftIcon'];
763
764
  /**
764
765
  * The text of the breadcrumb link
@@ -838,51 +839,51 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
838
839
  width?: string;
839
840
  /**
840
841
  * @ignore
841
- * */
842
+ */
842
843
  alignContent?: BoxProps['alignContent'];
843
844
  /**
844
845
  * @ignore
845
- * */
846
+ */
846
847
  alignItems?: BoxProps['alignItems'];
847
848
  /**
848
849
  * @ignore
849
- * */
850
+ */
850
851
  alignSelf?: BoxProps['alignSelf'];
851
852
  /**
852
853
  * @ignore
853
- * */
854
+ */
854
855
  basis?: BoxProps['basis'];
855
856
  /**
856
857
  * @ignore
857
- * */
858
+ */
858
859
  fill?: BoxProps['fill'];
859
860
  /**
860
861
  * @ignore
861
- * */
862
+ */
862
863
  fillViewport?: BoxProps['fillViewport'];
863
864
  /**
864
865
  * @ignore
865
- * */
866
+ */
866
867
  grow?: BoxProps['grow'];
867
868
  /**
868
869
  * @ignore
869
- * */
870
+ */
870
871
  inline?: BoxProps['inline'];
871
872
  /**
872
873
  * @ignore
873
- * */
874
+ */
874
875
  justifyContent?: BoxProps['justifyContent'];
875
876
  /**
876
877
  * @ignore
877
- * */
878
+ */
878
879
  order?: BoxProps['order'];
879
880
  /**
880
881
  * @ignore
881
- * */
882
+ */
882
883
  shrink?: BoxProps['shrink'];
883
884
  /**
884
885
  * @ignore
885
- * */
886
+ */
886
887
  wrapItems?: BoxProps['wrapItems'];
887
888
  };
888
889
  /**
@@ -1786,6 +1787,38 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
1786
1787
  type?: "email" | "multiline" | "number" | "phone" | "search" | "text" | "url";
1787
1788
  } & react.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
1788
1789
 
1790
+ type InputClickToCopyProps = Omit<InputProps, 'autoSelect' | 'disabled' | 'rightIcon' | 'type' | 'value'> & {
1791
+ /**
1792
+ * When disabled, the copy action will not be triggered
1793
+ */
1794
+ disabled?: boolean;
1795
+ /**
1796
+ * Callback function that is called when the value is copied to the clipboard
1797
+ */
1798
+ onCopy?: (value: string) => void;
1799
+ /**
1800
+ * the value of what is copied
1801
+ */
1802
+ value: string;
1803
+ };
1804
+ /**
1805
+ * Provides a readonly input that copies the text to the clipboard when clicked.
1806
+ */
1807
+ declare const InputClickToCopy: react.ForwardRefExoticComponent<Omit<InputProps, "type" | "disabled" | "value" | "rightIcon" | "autoSelect"> & {
1808
+ /**
1809
+ * When disabled, the copy action will not be triggered
1810
+ */
1811
+ disabled?: boolean;
1812
+ /**
1813
+ * Callback function that is called when the value is copied to the clipboard
1814
+ */
1815
+ onCopy?: (value: string) => void;
1816
+ /**
1817
+ * the value of what is copied
1818
+ */
1819
+ value: string;
1820
+ } & react.RefAttributes<HTMLInputElement>>;
1821
+
1789
1822
  type LabelProps = ComponentPropsWithoutRef<'label'> & {
1790
1823
  /**
1791
1824
  * Pass an arbitrary child node
@@ -1821,7 +1854,7 @@ type ControlledMenuProps = {
1821
1854
  /**
1822
1855
  * Is the menu open.
1823
1856
  * Must be used with `onOpenChange`.
1824
- * */
1857
+ */
1825
1858
  isOpen: boolean;
1826
1859
  /** When an attempt to toggle the menu is triggered.
1827
1860
  * Must be used with `isOpen`.
@@ -1861,7 +1894,7 @@ type MenuProps = MenuControlProps & {
1861
1894
  onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
1862
1895
  /**
1863
1896
  * Replace the default trigger with a custom button or other element
1864
- * */
1897
+ */
1865
1898
  trigger?: ReactNode;
1866
1899
  /**
1867
1900
  * Props to pass to the trigger component, the default trigger is Button
@@ -1946,23 +1979,23 @@ type MenuItemButtonProps = ButtonProps & {
1946
1979
  rightIcon?: ButtonProps['rightIcon'];
1947
1980
  /**
1948
1981
  * @ignore
1949
- * */
1982
+ */
1950
1983
  fullWidth?: never;
1951
1984
  /**
1952
1985
  * @ignore
1953
- * */
1986
+ */
1954
1987
  asChild?: never;
1955
1988
  /**
1956
1989
  * @ignore
1957
- * */
1990
+ */
1958
1991
  variant?: never;
1959
1992
  /**
1960
1993
  * @ignore
1961
- * */
1994
+ */
1962
1995
  size?: never;
1963
1996
  /**
1964
1997
  * @ignore
1965
- * */
1998
+ */
1966
1999
  unstyled?: never;
1967
2000
  };
1968
2001
 
@@ -2310,7 +2343,7 @@ type ControlledPopoverProps = {
2310
2343
  /**
2311
2344
  * Is the popover open.
2312
2345
  * Must be used with `onOpenChange`.
2313
- * */
2346
+ */
2314
2347
  isOpen: boolean;
2315
2348
  /** When an attempt to toggle the popover is triggered.
2316
2349
  * Must be used with `isOpen`.
@@ -2342,7 +2375,7 @@ type PopoverProps = ContentProps & PopoverControlProps & {
2342
2375
  hideCloseButton?: boolean;
2343
2376
  /**
2344
2377
  * An interactive element. Most commonly a [Button](?path=/docs/components-button--docs) or [IconButton]([Button](?path=/docs/components-iconbutton--docs)).
2345
- * */
2378
+ */
2346
2379
  trigger: JSX.Element;
2347
2380
  /**
2348
2381
  * If true, the popover will use the unstyled Content component instead of StyledContent
@@ -2980,85 +3013,6 @@ declare const Tag: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<
2980
3013
  onClickRemoveLabel?: string | undefined;
2981
3014
  } & react.RefAttributes<HTMLDivElement>>;
2982
3015
 
2983
- type TooltipProps = {
2984
- /**
2985
- * The content of the tooltip
2986
- */
2987
- content: ReactNode;
2988
- /**
2989
- * The button or other interactive element that triggers the tooltip
2990
- */
2991
- children: ReactNode;
2992
- /**
2993
- * The delay in milliseconds before the tooltip appears
2994
- */
2995
- delay?: number;
2996
- /**
2997
- * The preferred direction to render the tooltip if no collisions prevent it
2998
- */
2999
- direction?: 'bottom' | 'left' | 'right' | 'top';
3000
- /**
3001
- * @ignore
3002
- * Force the tooltip to be open without user interaction (for debugging and CI)
3003
- */
3004
- forceOpen?: boolean;
3005
- /**
3006
- * Hides the arrow
3007
- */
3008
- hideArrow?: boolean;
3009
- };
3010
- /**
3011
- * Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
3012
- * For elements that are not interactive, consider using a [Popover](/docs/ui-docs-popover--docs) instead.
3013
- * TODO - add link to Popover docs when they exist
3014
- */
3015
- declare const Tooltip: {
3016
- ({ delay, direction, content, children, forceOpen, hideArrow, }: TooltipProps): JSX.Element;
3017
- displayName: string;
3018
- };
3019
-
3020
- type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'href'> & {
3021
- /**
3022
- * An optional accessible description for the logo
3023
- */
3024
- description?: string;
3025
- /**
3026
- * Height, in pixels, of the logo
3027
- */
3028
- height?: number;
3029
- /**
3030
- * @ignore
3031
- * Change the color when hovering over the logo
3032
- */
3033
- hoverColor?: string;
3034
- /**
3035
- * Display just the icon portion of the logo (ie. hide `Wistia` text)
3036
- * note: there is no analogue to this because by brand guidelines, the
3037
- * `Wistia` text must not be displayed without the "flags" iconography
3038
- */
3039
- iconOnly?: boolean;
3040
- /**
3041
- * If provided, will wrap the logo in a link
3042
- */
3043
- href?: string;
3044
- /**
3045
- * An accessible title for the logo (defaults to "Wistia Logo")
3046
- */
3047
- title?: string;
3048
- /**
3049
- * Style of the logo
3050
- */
3051
- variant?: 'dark' | 'light' | 'standard';
3052
- /**
3053
- * If true, the logo will be optically centered within its container
3054
- */
3055
- opticallyCentered?: boolean;
3056
- };
3057
- declare const WistiaLogo: {
3058
- ({ description, height, hoverColor, href, iconOnly, opticallyCentered, title, variant, ...props }: WistiaLogoProps): react_jsx_runtime.JSX.Element;
3059
- displayName: string;
3060
- };
3061
-
3062
3016
  type ThumbnailBadgeProps = {
3063
3017
  /**
3064
3018
  * Icon to display on the left side of the badge
@@ -3139,36 +3093,95 @@ declare const Thumbnail: react.ForwardRefExoticComponent<Omit<react.DetailedHTML
3139
3093
  children?: ReactNode;
3140
3094
  } & react.RefAttributes<HTMLDivElement>>;
3141
3095
 
3142
- type InputClickToCopyProps = Omit<InputProps, 'autoSelect' | 'disabled' | 'rightIcon' | 'type' | 'value'> & {
3096
+ type ThumbnailCollageProps = {
3143
3097
  /**
3144
- * When disabled, the copy action will not be triggered
3098
+ * An array of `Thumbnail` components to show in the collage. Supports up to 3 `Thumbnail`s.
3145
3099
  */
3146
- disabled?: boolean;
3100
+ children?: ReactElement<ThumbnailProps>[] | undefined;
3147
3101
  /**
3148
- * Callback function that is called when the value is copied to the clipboard
3102
+ * The type of gradient to show if no `Thumbnail`s are provided
3149
3103
  */
3150
- onCopy?: (value: string) => void;
3104
+ gradientBackground?: GradientNameType;
3105
+ };
3106
+ declare const ThumbnailCollage: ({ children, gradientBackground, ...props }: ThumbnailCollageProps) => JSX.Element;
3107
+
3108
+ type TooltipProps = {
3151
3109
  /**
3152
- * the value of what is copied
3110
+ * The content of the tooltip
3153
3111
  */
3154
- value: string;
3112
+ content: ReactNode;
3113
+ /**
3114
+ * The button or other interactive element that triggers the tooltip
3115
+ */
3116
+ children: ReactNode;
3117
+ /**
3118
+ * The delay in milliseconds before the tooltip appears
3119
+ */
3120
+ delay?: number;
3121
+ /**
3122
+ * The preferred direction to render the tooltip if no collisions prevent it
3123
+ */
3124
+ direction?: 'bottom' | 'left' | 'right' | 'top';
3125
+ /**
3126
+ * @ignore
3127
+ * Force the tooltip to be open without user interaction (for debugging and CI)
3128
+ */
3129
+ forceOpen?: boolean;
3130
+ /**
3131
+ * Hides the arrow
3132
+ */
3133
+ hideArrow?: boolean;
3155
3134
  };
3156
3135
  /**
3157
- * Provides a readonly input that copies the text to the clipboard when clicked.
3136
+ * Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
3137
+ * For elements that are not interactive, consider using a [Popover](/docs/ui-docs-popover--docs) instead.
3138
+ * TODO - add link to Popover docs when they exist
3158
3139
  */
3159
- declare const InputClickToCopy: react.ForwardRefExoticComponent<Omit<InputProps, "type" | "disabled" | "value" | "rightIcon" | "autoSelect"> & {
3140
+ declare const Tooltip: {
3141
+ ({ delay, direction, content, children, forceOpen, hideArrow, }: TooltipProps): JSX.Element;
3142
+ displayName: string;
3143
+ };
3144
+
3145
+ type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'href'> & {
3160
3146
  /**
3161
- * When disabled, the copy action will not be triggered
3147
+ * An optional accessible description for the logo
3162
3148
  */
3163
- disabled?: boolean;
3149
+ description?: string;
3164
3150
  /**
3165
- * Callback function that is called when the value is copied to the clipboard
3151
+ * Height, in pixels, of the logo
3166
3152
  */
3167
- onCopy?: (value: string) => void;
3153
+ height?: number;
3168
3154
  /**
3169
- * the value of what is copied
3155
+ * @ignore
3156
+ * Change the color when hovering over the logo
3170
3157
  */
3171
- value: string;
3172
- } & react.RefAttributes<HTMLInputElement>>;
3158
+ hoverColor?: string;
3159
+ /**
3160
+ * Display just the icon portion of the logo (ie. hide `Wistia` text)
3161
+ * note: there is no analogue to this because by brand guidelines, the
3162
+ * `Wistia` text must not be displayed without the "flags" iconography
3163
+ */
3164
+ iconOnly?: boolean;
3165
+ /**
3166
+ * If provided, will wrap the logo in a link
3167
+ */
3168
+ href?: string;
3169
+ /**
3170
+ * An accessible title for the logo (defaults to "Wistia Logo")
3171
+ */
3172
+ title?: string;
3173
+ /**
3174
+ * Style of the logo
3175
+ */
3176
+ variant?: 'dark' | 'light' | 'standard';
3177
+ /**
3178
+ * If true, the logo will be optically centered within its container
3179
+ */
3180
+ opticallyCentered?: boolean;
3181
+ };
3182
+ declare const WistiaLogo: {
3183
+ ({ description, height, hoverColor, href, iconOnly, opticallyCentered, title, variant, ...props }: WistiaLogoProps): react_jsx_runtime.JSX.Element;
3184
+ displayName: string;
3185
+ };
3173
3186
 
3174
- 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, 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 };
3187
+ 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 };