@wistia/ui 0.9.7 → 0.10.0-beta.26b4bee5.4f64bde

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, ReactElement } 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, PropsWithChildren, 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';
@@ -12,6 +12,7 @@ import { FlattenSimpleInterpolation } from 'styled-components';
12
12
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
13
13
  import { PopoverContentProps } from '@radix-ui/react-popover';
14
14
  import { ToggleGroupSingleProps } from '@radix-ui/react-toggle-group';
15
+ import { TabsProps as TabsProps$1, TabsContentProps as TabsContentProps$1, TabsListProps as TabsListProps$1, TabsTriggerProps as TabsTriggerProps$1 } from '@radix-ui/react-tabs';
15
16
 
16
17
  type UIProviderProps = {
17
18
  children: ReactNode;
@@ -2951,62 +2952,27 @@ type TableRowProps = HTMLAttributes<HTMLTableRowElement> & {
2951
2952
  };
2952
2953
  declare const TableRow: ({ children, ...props }: TableRowProps) => JSX.Element;
2953
2954
 
2954
- type BaseTabsProps = {
2955
- /**
2956
- * Accesible label to describe the `TabList`
2957
- */
2958
- 'aria-label': string;
2959
- /**
2960
- * `Tab` components that will be rendered
2961
- */
2962
- children: ReactNode;
2963
- /**
2964
- * When true, the tabs will span the full width of the container.
2965
- */
2955
+ type TabsProps = Pick<TabsProps$1, 'children' | 'defaultValue' | 'onValueChange' | 'value'>;
2956
+ declare const Tabs: {
2957
+ ({ children, value: valueProp, onValueChange: onValueChangeProp, defaultValue, ...props }: TabsProps): JSX.Element;
2958
+ displayName: string;
2959
+ };
2960
+
2961
+ type TabsContentProps = Pick<TabsContentProps$1, 'children' | 'value'>;
2962
+ declare const TabsContent: {
2963
+ ({ children, value }: TabsContentProps): JSX.Element;
2964
+ displayName: string;
2965
+ };
2966
+
2967
+ type TabsListProps = Pick<TabsListProps$1, 'aria-label'> & PropsWithChildren<{
2966
2968
  fullWidth?: boolean;
2967
- /**
2968
- * When true, the tab headers will remain fixed at the top while the content scrolls.
2969
- */
2970
- stickyHeaders?: boolean;
2971
- };
2972
- type ControlledTabsProps = BaseTabsProps & {
2973
- /**
2974
- * The value of the `Tab` which should be selected; used for controlled mode
2975
- */
2976
- selectedValue: string;
2977
- /**
2978
- * Callback invoked when the selected `Tab` value changes; used for controlled mode
2979
- */
2980
- onSelectedValueChange: (value: string) => void;
2981
- /**
2982
- * This prop should not be provided in controlled mode.
2983
- */
2984
- defaultSelectedValue?: never;
2985
- };
2986
- type UncontrolledTabsProps = BaseTabsProps & {
2987
- /**
2988
- * The `Tab` that will be initially selected; used for uncontrolled mode
2989
- */
2990
- defaultSelectedValue: string;
2991
- /**
2992
- * These props should not be provided in uncontrolled mode.
2993
- */
2994
- selectedValue?: never;
2995
- onSelectedValueChange?: never;
2996
- };
2997
- type TabsProps = ControlledTabsProps | UncontrolledTabsProps;
2998
- declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement>>;
2969
+ }>;
2970
+ declare const TabsList: {
2971
+ ({ children, fullWidth, ...props }: TabsListProps): JSX.Element;
2972
+ displayName: string;
2973
+ };
2999
2974
 
3000
- type BaseProps = {
3001
- /**
3002
- * Disable the `SegmentedControlItem`
3003
- */
3004
- disabled?: boolean;
3005
- /**
3006
- * The value of the item
3007
- */
3008
- value: string;
3009
- };
2975
+ type BaseProps = Pick<TabsTriggerProps$1, 'disabled' | 'value'>;
3010
2976
  type IconWithLabel = {
3011
2977
  /**
3012
2978
  * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
@@ -3037,14 +3003,8 @@ type NoIcon = {
3037
3003
  label?: ReactNode | string;
3038
3004
  'aria-label'?: never;
3039
3005
  };
3040
- type TabItemProps = BaseProps & (IconWithAriaLabel | IconWithLabel | NoIcon);
3041
-
3042
- type TabProps = Omit<TabItemProps, 'children'> & {
3043
- children?: ReactNode;
3044
- };
3045
- declare const Tab: react.ForwardRefExoticComponent<Omit<TabItemProps, "children"> & {
3046
- children?: ReactNode;
3047
- } & react.RefAttributes<HTMLDivElement>>;
3006
+ type TabsTriggerProps = BaseProps & (IconWithAriaLabel | IconWithLabel | NoIcon);
3007
+ declare const TabsTrigger: react.ForwardRefExoticComponent<TabsTriggerProps & react.RefAttributes<HTMLButtonElement>>;
3048
3008
 
3049
3009
  type TagProps = ComponentPropsWithoutRef<'div'> & {
3050
3010
  /**
@@ -3326,4 +3286,4 @@ declare const List: {
3326
3286
  displayName: string;
3327
3287
  };
3328
3288
 
3329
- 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, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, 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, TableFoot, type TableFootProps, 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, useForceUpdate, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
3289
+ 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, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, 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, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, 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, useForceUpdate, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, 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 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';
3
+ import react__default, { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, ForwardedRef, Ref, SyntheticEvent, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, PropsWithChildren, 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';
@@ -12,6 +12,7 @@ import { FlattenSimpleInterpolation } from 'styled-components';
12
12
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
13
13
  import { PopoverContentProps } from '@radix-ui/react-popover';
14
14
  import { ToggleGroupSingleProps } from '@radix-ui/react-toggle-group';
15
+ import { TabsProps as TabsProps$1, TabsContentProps as TabsContentProps$1, TabsListProps as TabsListProps$1, TabsTriggerProps as TabsTriggerProps$1 } from '@radix-ui/react-tabs';
15
16
 
16
17
  type UIProviderProps = {
17
18
  children: ReactNode;
@@ -2951,62 +2952,27 @@ type TableRowProps = HTMLAttributes<HTMLTableRowElement> & {
2951
2952
  };
2952
2953
  declare const TableRow: ({ children, ...props }: TableRowProps) => JSX.Element;
2953
2954
 
2954
- type BaseTabsProps = {
2955
- /**
2956
- * Accesible label to describe the `TabList`
2957
- */
2958
- 'aria-label': string;
2959
- /**
2960
- * `Tab` components that will be rendered
2961
- */
2962
- children: ReactNode;
2963
- /**
2964
- * When true, the tabs will span the full width of the container.
2965
- */
2955
+ type TabsProps = Pick<TabsProps$1, 'children' | 'defaultValue' | 'onValueChange' | 'value'>;
2956
+ declare const Tabs: {
2957
+ ({ children, value: valueProp, onValueChange: onValueChangeProp, defaultValue, ...props }: TabsProps): JSX.Element;
2958
+ displayName: string;
2959
+ };
2960
+
2961
+ type TabsContentProps = Pick<TabsContentProps$1, 'children' | 'value'>;
2962
+ declare const TabsContent: {
2963
+ ({ children, value }: TabsContentProps): JSX.Element;
2964
+ displayName: string;
2965
+ };
2966
+
2967
+ type TabsListProps = Pick<TabsListProps$1, 'aria-label'> & PropsWithChildren<{
2966
2968
  fullWidth?: boolean;
2967
- /**
2968
- * When true, the tab headers will remain fixed at the top while the content scrolls.
2969
- */
2970
- stickyHeaders?: boolean;
2971
- };
2972
- type ControlledTabsProps = BaseTabsProps & {
2973
- /**
2974
- * The value of the `Tab` which should be selected; used for controlled mode
2975
- */
2976
- selectedValue: string;
2977
- /**
2978
- * Callback invoked when the selected `Tab` value changes; used for controlled mode
2979
- */
2980
- onSelectedValueChange: (value: string) => void;
2981
- /**
2982
- * This prop should not be provided in controlled mode.
2983
- */
2984
- defaultSelectedValue?: never;
2985
- };
2986
- type UncontrolledTabsProps = BaseTabsProps & {
2987
- /**
2988
- * The `Tab` that will be initially selected; used for uncontrolled mode
2989
- */
2990
- defaultSelectedValue: string;
2991
- /**
2992
- * These props should not be provided in uncontrolled mode.
2993
- */
2994
- selectedValue?: never;
2995
- onSelectedValueChange?: never;
2996
- };
2997
- type TabsProps = ControlledTabsProps | UncontrolledTabsProps;
2998
- declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement>>;
2969
+ }>;
2970
+ declare const TabsList: {
2971
+ ({ children, fullWidth, ...props }: TabsListProps): JSX.Element;
2972
+ displayName: string;
2973
+ };
2999
2974
 
3000
- type BaseProps = {
3001
- /**
3002
- * Disable the `SegmentedControlItem`
3003
- */
3004
- disabled?: boolean;
3005
- /**
3006
- * The value of the item
3007
- */
3008
- value: string;
3009
- };
2975
+ type BaseProps = Pick<TabsTriggerProps$1, 'disabled' | 'value'>;
3010
2976
  type IconWithLabel = {
3011
2977
  /**
3012
2978
  * The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
@@ -3037,14 +3003,8 @@ type NoIcon = {
3037
3003
  label?: ReactNode | string;
3038
3004
  'aria-label'?: never;
3039
3005
  };
3040
- type TabItemProps = BaseProps & (IconWithAriaLabel | IconWithLabel | NoIcon);
3041
-
3042
- type TabProps = Omit<TabItemProps, 'children'> & {
3043
- children?: ReactNode;
3044
- };
3045
- declare const Tab: react.ForwardRefExoticComponent<Omit<TabItemProps, "children"> & {
3046
- children?: ReactNode;
3047
- } & react.RefAttributes<HTMLDivElement>>;
3006
+ type TabsTriggerProps = BaseProps & (IconWithAriaLabel | IconWithLabel | NoIcon);
3007
+ declare const TabsTrigger: react.ForwardRefExoticComponent<TabsTriggerProps & react.RefAttributes<HTMLButtonElement>>;
3048
3008
 
3049
3009
  type TagProps = ComponentPropsWithoutRef<'div'> & {
3050
3010
  /**
@@ -3326,4 +3286,4 @@ declare const List: {
3326
3286
  displayName: string;
3327
3287
  };
3328
3288
 
3329
- 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, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, 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, TableFoot, type TableFootProps, 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, useForceUpdate, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
3289
+ 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, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, 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, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, 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, useForceUpdate, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };