@wistia/ui 0.13.10 → 0.13.11-beta.e83846c4.6d00a8f

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
@@ -6,6 +6,7 @@ export * from 'use-file-picker/types';
6
6
  import * as react_router from 'react-router';
7
7
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
8
8
  import { CollapsibleContentProps as CollapsibleContentProps$1 } from '@radix-ui/react-collapsible';
9
+ import { Color } from 'culori/fn';
9
10
  import * as styled_components from 'styled-components';
10
11
  import * as _radix_ui_react_dropdown_menu from '@radix-ui/react-dropdown-menu';
11
12
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
@@ -1362,12 +1363,17 @@ type IconProps = ComponentPropsWithoutRef<'svg'> & {
1362
1363
  * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1363
1364
  */
1364
1365
  colorScheme?: ColorSchemeTypes;
1366
+ /**
1367
+ * Determines if the icon should use inline styles when used with [Text]() and [Heading]() components
1368
+ */
1369
+ useInlineStyles?: boolean;
1365
1370
  /**
1366
1371
  * Is Icon on a filled background?
1367
1372
  */
1368
1373
  invertColor?: boolean;
1369
1374
  /**
1370
1375
  * The size of the icon to display
1376
+ *
1371
1377
  */
1372
1378
  size?: ResponsiveObject<keyof typeof iconSizeMap> | keyof typeof iconSizeMap;
1373
1379
  /**
@@ -1380,11 +1386,17 @@ type IconProps = ComponentPropsWithoutRef<'svg'> & {
1380
1386
  type: IconNameType;
1381
1387
  };
1382
1388
  /**
1383
- * A component that renders any of our available icons. Note that icons should not be used directly
1384
- * for interactivity. If you need an interactive element, use [IconButton](?path=/docs/components-iconbutton--docs).
1389
+ * A component that renders any of our available icons.
1390
+ *
1391
+ * For inline usage with text, wrap the Icon within a Text component
1392
+ * and set inline=true. The icon will automatically align with the text
1393
+ * using the typography-specific positioning.
1394
+ *
1395
+ * Note that icons should not be used directly for interactivity.
1396
+ * If you need an interactive element, use IconButton.
1385
1397
  */
1386
1398
  declare const Icon: {
1387
- ({ invertColor, colorScheme, size, style, type, ...props }: IconProps): JSX.Element;
1399
+ ({ useInlineStyles, invertColor, colorScheme, size, style, type, ...props }: IconProps): JSX.Element;
1388
1400
  displayName: string;
1389
1401
  };
1390
1402
 
@@ -1540,6 +1552,12 @@ declare const ValueSwatch: {
1540
1552
  displayName: string;
1541
1553
  };
1542
1554
 
1555
+ declare const calculateContrast: ({ backgroundColor, foregroundColor, backgroundOpacity, }: {
1556
+ backgroundColor: Color | string;
1557
+ foregroundColor?: Color | string;
1558
+ backgroundOpacity?: number;
1559
+ }) => number;
1560
+
1543
1561
  type ComboboxOptionProps = {
1544
1562
  value: string;
1545
1563
  children: ReactNode;
@@ -3897,4 +3915,4 @@ type ContextMenuProps = {
3897
3915
  */
3898
3916
  declare const ContextMenu: ({ position, triggerRef, children, onRequestClose, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
3899
3917
 
3900
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, 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, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, 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, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, 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, ValueNameOrHexCode, ValueSwatch, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
3918
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, 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, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, 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, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, 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, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from 'use-file-picker/types';
6
6
  import * as react_router from 'react-router';
7
7
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
8
8
  import { CollapsibleContentProps as CollapsibleContentProps$1 } from '@radix-ui/react-collapsible';
9
+ import { Color } from 'culori/fn';
9
10
  import * as styled_components from 'styled-components';
10
11
  import * as _radix_ui_react_dropdown_menu from '@radix-ui/react-dropdown-menu';
11
12
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
@@ -1362,12 +1363,17 @@ type IconProps = ComponentPropsWithoutRef<'svg'> & {
1362
1363
  * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1363
1364
  */
1364
1365
  colorScheme?: ColorSchemeTypes;
1366
+ /**
1367
+ * Determines if the icon should use inline styles when used with [Text]() and [Heading]() components
1368
+ */
1369
+ useInlineStyles?: boolean;
1365
1370
  /**
1366
1371
  * Is Icon on a filled background?
1367
1372
  */
1368
1373
  invertColor?: boolean;
1369
1374
  /**
1370
1375
  * The size of the icon to display
1376
+ *
1371
1377
  */
1372
1378
  size?: ResponsiveObject<keyof typeof iconSizeMap> | keyof typeof iconSizeMap;
1373
1379
  /**
@@ -1380,11 +1386,17 @@ type IconProps = ComponentPropsWithoutRef<'svg'> & {
1380
1386
  type: IconNameType;
1381
1387
  };
1382
1388
  /**
1383
- * A component that renders any of our available icons. Note that icons should not be used directly
1384
- * for interactivity. If you need an interactive element, use [IconButton](?path=/docs/components-iconbutton--docs).
1389
+ * A component that renders any of our available icons.
1390
+ *
1391
+ * For inline usage with text, wrap the Icon within a Text component
1392
+ * and set inline=true. The icon will automatically align with the text
1393
+ * using the typography-specific positioning.
1394
+ *
1395
+ * Note that icons should not be used directly for interactivity.
1396
+ * If you need an interactive element, use IconButton.
1385
1397
  */
1386
1398
  declare const Icon: {
1387
- ({ invertColor, colorScheme, size, style, type, ...props }: IconProps): JSX.Element;
1399
+ ({ useInlineStyles, invertColor, colorScheme, size, style, type, ...props }: IconProps): JSX.Element;
1388
1400
  displayName: string;
1389
1401
  };
1390
1402
 
@@ -1540,6 +1552,12 @@ declare const ValueSwatch: {
1540
1552
  displayName: string;
1541
1553
  };
1542
1554
 
1555
+ declare const calculateContrast: ({ backgroundColor, foregroundColor, backgroundOpacity, }: {
1556
+ backgroundColor: Color | string;
1557
+ foregroundColor?: Color | string;
1558
+ backgroundOpacity?: number;
1559
+ }) => number;
1560
+
1543
1561
  type ComboboxOptionProps = {
1544
1562
  value: string;
1545
1563
  children: ReactNode;
@@ -3897,4 +3915,4 @@ type ContextMenuProps = {
3897
3915
  */
3898
3916
  declare const ContextMenu: ({ position, triggerRef, children, onRequestClose, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
3899
3917
 
3900
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, 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, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, 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, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, 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, ValueNameOrHexCode, ValueSwatch, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
3918
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, 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, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, 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, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, 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, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };