@wistia/ui 0.20.16 → 0.20.17

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.ts CHANGED
@@ -1729,6 +1729,20 @@ type ContextMenuProps = {
1729
1729
  */
1730
1730
  declare const ContextMenu: ({ position, triggerRef, children, side, onRequestClose, compact, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
1731
1731
 
1732
+ type CustomizableTokens = '--wui-color-backdrop' | '--wui-color-bg-app' | '--wui-color-bg-fill-active' | '--wui-color-bg-fill-hover' | '--wui-color-bg-fill-white ' | '--wui-color-bg-fill' | '--wui-color-bg-surface-active' | '--wui-color-bg-surface-disabled' | '--wui-color-bg-surface-hover' | '--wui-color-bg-surface-secondary-active' | '--wui-color-bg-surface-secondary-hover' | '--wui-color-bg-surface-secondary' | '--wui-color-bg-surface-selected-active' | '--wui-color-bg-surface-selected-hover' | '--wui-color-bg-surface-selected' | '--wui-color-bg-surface-tertiary' | '--wui-color-bg-surface' | '--wui-color-bg-tooltip' | '--wui-color-border-active-selected' | '--wui-color-border-active' | '--wui-color-border-disabled' | '--wui-color-border-hover-selected' | '--wui-color-border-hover' | '--wui-color-border-secondary-active' | '--wui-color-border-secondary-hover' | '--wui-color-border-secondary' | '--wui-color-border-selected' | '--wui-color-border' | '--wui-color-drop-shadow' | '--wui-color-focus-color' | '--wui-color-focus-ring-disabled' | '--wui-color-focus-ring' | '--wui-color-icon-disabled' | '--wui-color-icon-on-fill' | '--wui-color-icon-selected' | '--wui-color-icon' | '--wui-color-invalid-indicator' | '--wui-color-notification-pill-color' | '--wui-color-segmented-control-checked-background' | '--wui-color-text-button' | '--wui-color-text-disabled' | '--wui-color-text-link' | '--wui-color-text-on-fill-white-selected' | '--wui-color-text-on-fill' | '--wui-color-text-secondary' | '--wui-color-text-selected' | '--wui-color-text' | '--wui-typography-family-brand' | '--wui-typography-family-default' | '--wui-typography-family-mono' | '--wui-typography-weight-body-bold' | '--wui-typography-weight-body' | '--wui-typography-weight-heading' | '--wui-typography-weight-label-bold' | '--wui-typography-weight-label';
1733
+ type CustomizableThemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
1734
+ children: ReactNode;
1735
+ overrides: Partial<Record<CustomizableTokens, number | string>>;
1736
+ };
1737
+ /**
1738
+ * Used for overriding the default theme tokens with custom values.
1739
+ * This should only be used when the ui systems team has been consulted first.
1740
+ */
1741
+ declare const CustomizableThemeWrapper: {
1742
+ ({ children, overrides, ...props }: CustomizableThemeWrapperProps): JSX.Element;
1743
+ displayName: string;
1744
+ };
1745
+
1732
1746
  type DataCardProps = ComponentPropsWithoutRef<'div'> & Partial<Pick<ButtonAsLinkProps, 'beforeAction' | 'disabled' | 'href' | 'onClick' | 'type'>> & {
1733
1747
  /**
1734
1748
  * Label text displayed above the value
@@ -3160,6 +3174,58 @@ declare const FilterMenuItem: {
3160
3174
  };
3161
3175
  declare const FilterMenu: react.ForwardRefExoticComponent<FilterMenuProps & react.RefAttributes<HTMLButtonElement>>;
3162
3176
 
3177
+ type MeterSegment = {
3178
+ /**
3179
+ * The percentage value this segment represents (0-100)
3180
+ */
3181
+ value: number;
3182
+ /**
3183
+ * The color for this segment using design token names (e.g., 'blue-9', 'green-9', 'red-9')
3184
+ */
3185
+ color: string;
3186
+ /**
3187
+ * Optional label for this segment shown in the key. Can be a string or React node for rich formatting.
3188
+ */
3189
+ label?: ReactNode;
3190
+ };
3191
+ type MeterProps = ComponentPropsWithoutRef<'div'> & {
3192
+ /**
3193
+ * Array of segments to display in the meter
3194
+ */
3195
+ segments: MeterSegment[];
3196
+ /**
3197
+ * Optional label displayed above the meter bar
3198
+ */
3199
+ label?: ReactNode;
3200
+ /**
3201
+ * Optional meta information displayed to the right of the label (e.g., "45 / 50", "100 / 200GB")
3202
+ */
3203
+ labelMeta?: ReactNode;
3204
+ /**
3205
+ * Optional description displayed underneath the meter bar
3206
+ */
3207
+ description?: ReactNode;
3208
+ /**
3209
+ * Whether to hide the key below the meter bar with segment labels and colors
3210
+ */
3211
+ hideKey?: boolean;
3212
+ /**
3213
+ * Optional accessible description for screen readers. If not provided, one will be generated from the segments.
3214
+ */
3215
+ 'aria-label'?: string;
3216
+ /**
3217
+ * The maximum value that the meter represents (defaults to 100)
3218
+ */
3219
+ max?: number;
3220
+ };
3221
+ /**
3222
+ * A meter component that visually represents one to many segments as portions of a whole
3223
+ */
3224
+ declare const Meter: {
3225
+ ({ segments, label, labelMeta, description, hideKey, max, "aria-label": ariaLabel, ...props }: MeterProps): JSX.Element;
3226
+ displayName: string;
3227
+ };
3228
+
3163
3229
  type ModalProps = ComponentPropsWithoutRef<'div'> & {
3164
3230
  /**
3165
3231
  * The content of the modal.
@@ -3873,6 +3939,50 @@ declare const Slider: {
3873
3939
  displayName: string;
3874
3940
  };
3875
3941
 
3942
+ type SplitButtonProps = {
3943
+ /**
3944
+ * The text for the primary button
3945
+ */
3946
+ children?: ButtonProps['children'];
3947
+ colorScheme?: ButtonProps['colorScheme'];
3948
+ /**
3949
+ * The icon to use for the menu toggle, defaults to a down caret
3950
+ * @default <Icon type="caret-down" />
3951
+ */
3952
+ menuIcon?: JSX.Element;
3953
+ /**
3954
+ * The menu items to render within the menu. If the secondary behavior of `SplitButton` should be a button, rather than a menu, omit `menuItems` and use `secondaryAction` instead.
3955
+ */
3956
+ menuItems?: ReactNode;
3957
+ /**
3958
+ * The label to use for the menu, only for screenreaders
3959
+ */
3960
+ menuLabel?: string;
3961
+ /**
3962
+ * If using `menuItems`, any additional props to pass to the `Menu` component
3963
+ */
3964
+ menuProps?: Omit<ComponentProps<typeof Menu>, 'children' | 'disabled' | 'trigger'>;
3965
+ /**
3966
+ * Secondary action should not be used when menuItems is set
3967
+ */
3968
+ secondaryAction?: JSX.Element;
3969
+ /**
3970
+ * The size of button to display. Can be used as a [responsive prop](/docs/ui-docs-responsive-props--docs)
3971
+ */
3972
+ size?: ButtonSizes | ResponsiveObject<ButtonSizes>;
3973
+ /**
3974
+ * A visual style for the button
3975
+ */
3976
+ variant?: ButtonVariants;
3977
+ } & (ButtonAsButtonProps | ButtonAsLinkProps);
3978
+ /**
3979
+ * A SplitButton is an extension of [Button]() that adds a menu to the right hand side of the button.
3980
+ */
3981
+ declare const SplitButton: {
3982
+ ({ children, menuLabel, menuIcon, menuItems, disabled, colorScheme, variant, secondaryAction, size, unstyled, menuProps, ...props }: SplitButtonProps): JSX.Element;
3983
+ displayName: string;
3984
+ };
3985
+
3876
3986
  type StackProps = {
3877
3987
  /**
3878
3988
  * Optional children
@@ -4405,62 +4515,4 @@ declare const WistiaLogo: {
4405
4515
  displayName: string;
4406
4516
  };
4407
4517
 
4408
- type SplitButtonProps = {
4409
- /**
4410
- * The text for the primary button
4411
- */
4412
- children?: ButtonProps['children'];
4413
- colorScheme?: ButtonProps['colorScheme'];
4414
- /**
4415
- * The icon to use for the menu toggle, defaults to a down caret
4416
- * @default <Icon type="caret-down" />
4417
- */
4418
- menuIcon?: JSX.Element;
4419
- /**
4420
- * The menu items to render within the menu. If the secondary behavior of `SplitButton` should be a button, rather than a menu, omit `menuItems` and use `secondaryAction` instead.
4421
- */
4422
- menuItems?: ReactNode;
4423
- /**
4424
- * The label to use for the menu, only for screenreaders
4425
- */
4426
- menuLabel?: string;
4427
- /**
4428
- * If using `menuItems`, any additional props to pass to the `Menu` component
4429
- */
4430
- menuProps?: Omit<ComponentProps<typeof Menu>, 'children' | 'disabled' | 'trigger'>;
4431
- /**
4432
- * Secondary action should not be used when menuItems is set
4433
- */
4434
- secondaryAction?: JSX.Element;
4435
- /**
4436
- * The size of button to display. Can be used as a [responsive prop](/docs/ui-docs-responsive-props--docs)
4437
- */
4438
- size?: ButtonSizes | ResponsiveObject<ButtonSizes>;
4439
- /**
4440
- * A visual style for the button
4441
- */
4442
- variant?: ButtonVariants;
4443
- } & (ButtonAsButtonProps | ButtonAsLinkProps);
4444
- /**
4445
- * A SplitButton is an extension of [Button]() that adds a menu to the right hand side of the button.
4446
- */
4447
- declare const SplitButton: {
4448
- ({ children, menuLabel, menuIcon, menuItems, disabled, colorScheme, variant, secondaryAction, size, unstyled, menuProps, ...props }: SplitButtonProps): JSX.Element;
4449
- displayName: string;
4450
- };
4451
-
4452
- type CustomizableTokens = '--wui-color-backdrop' | '--wui-color-bg-app' | '--wui-color-bg-fill-active' | '--wui-color-bg-fill-hover' | '--wui-color-bg-fill-white ' | '--wui-color-bg-fill' | '--wui-color-bg-surface-active' | '--wui-color-bg-surface-disabled' | '--wui-color-bg-surface-hover' | '--wui-color-bg-surface-secondary-active' | '--wui-color-bg-surface-secondary-hover' | '--wui-color-bg-surface-secondary' | '--wui-color-bg-surface-selected-active' | '--wui-color-bg-surface-selected-hover' | '--wui-color-bg-surface-selected' | '--wui-color-bg-surface-tertiary' | '--wui-color-bg-surface' | '--wui-color-bg-tooltip' | '--wui-color-border-active-selected' | '--wui-color-border-active' | '--wui-color-border-disabled' | '--wui-color-border-hover-selected' | '--wui-color-border-hover' | '--wui-color-border-secondary-active' | '--wui-color-border-secondary-hover' | '--wui-color-border-secondary' | '--wui-color-border-selected' | '--wui-color-border' | '--wui-color-drop-shadow' | '--wui-color-focus-color' | '--wui-color-focus-ring-disabled' | '--wui-color-focus-ring' | '--wui-color-icon-disabled' | '--wui-color-icon-on-fill' | '--wui-color-icon-selected' | '--wui-color-icon' | '--wui-color-invalid-indicator' | '--wui-color-notification-pill-color' | '--wui-color-segmented-control-checked-background' | '--wui-color-text-button' | '--wui-color-text-disabled' | '--wui-color-text-link' | '--wui-color-text-on-fill-white-selected' | '--wui-color-text-on-fill' | '--wui-color-text-secondary' | '--wui-color-text-selected' | '--wui-color-text' | '--wui-typography-family-brand' | '--wui-typography-family-default' | '--wui-typography-family-mono' | '--wui-typography-weight-body-bold' | '--wui-typography-weight-body' | '--wui-typography-weight-heading' | '--wui-typography-weight-label-bold' | '--wui-typography-weight-label';
4453
- type CustomizableThemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
4454
- children: ReactNode;
4455
- overrides: Partial<Record<CustomizableTokens, number | string>>;
4456
- };
4457
- /**
4458
- * Used for overriding the default theme tokens with custom values.
4459
- * This should only be used when the ui systems team has been consulted first.
4460
- */
4461
- declare const CustomizableThemeWrapper: {
4462
- ({ children, overrides, ...props }: CustomizableThemeWrapperProps): JSX.Element;
4463
- displayName: string;
4464
- };
4465
-
4466
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, BannerImage, 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, CustomizableThemeWrapper, type CustomizableThemeWrapperProps, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, type EditableTextProps, EditableTextRoot, type EditableTextRootProps, EditableTextSubmitButton, EditableTextTrigger, 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, ListItem, type ListItemProps, type ListProps, Mark, type MarkProps, Markdown, type MarkdownProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, ModalCallout, ModalCallouts, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, SplitButton, type SplitButtonProps, 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 UseActiveMqReturnType, type UseIsHoveredReturnType, type UseMqReturnType, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, coerceToBoolean, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useKeyPress, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };
4518
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, BannerImage, 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, CustomizableThemeWrapper, type CustomizableThemeWrapperProps, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, type EditableTextProps, EditableTextRoot, type EditableTextRootProps, EditableTextSubmitButton, EditableTextTrigger, 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, ListItem, type ListItemProps, type ListProps, Mark, type MarkProps, Markdown, type MarkdownProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Meter, type MeterProps, type MeterSegment, Modal, ModalCallout, ModalCallouts, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, SplitButton, type SplitButtonProps, 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 UseActiveMqReturnType, type UseIsHoveredReturnType, type UseMqReturnType, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, coerceToBoolean, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useKeyPress, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };