@wistia/ui 0.21.5-beta.da246d56.ebfe72f → 0.21.6-beta.14029db3.c005e65

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
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, AnchorHTMLAttributes, MouseEvent, ReactElement, ElementType, ChangeEvent, PropsWithChildren, InputHTMLAttributes, Ref, SyntheticEvent, ComponentProps, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
3
+ import { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, AnchorHTMLAttributes, MouseEvent, ReactElement, ElementType, ChangeEvent, PropsWithChildren, InputHTMLAttributes, Ref, SyntheticEvent, ComponentProps, CSSProperties, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
4
4
  import { UseFilePickerConfig, FilePickerReturnTypes, ExtractContentTypeFromConfig, useImperativeFilePickerConfig, ImperativeFilePickerReturnTypes } from 'use-file-picker/types';
5
5
  export * from 'use-file-picker/types';
6
6
  import { Color } from 'culori/fn';
@@ -3182,10 +3182,15 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<BaseButtonProps &
3182
3182
  * Treats the menu item as a link when provided
3183
3183
  */
3184
3184
  href?: MenuItemButtonProps["href"];
3185
+ /**
3186
+ * Whether the menu should close when this item is clicked
3187
+ * @default true
3188
+ */
3189
+ closeOnClick?: boolean;
3185
3190
  /**
3186
3191
  * Callback when the item is selected
3187
3192
  */
3188
- onSelect?: () => void;
3193
+ onSelect?: (event: Event | SyntheticEvent) => void;
3189
3194
  }, "ref"> | Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
3190
3195
  beforeAction?: (() => Promise<void>) | (() => void);
3191
3196
  children: react.ReactNode;
@@ -3222,10 +3227,15 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<BaseButtonProps &
3222
3227
  * Treats the menu item as a link when provided
3223
3228
  */
3224
3229
  href?: MenuItemButtonProps["href"];
3230
+ /**
3231
+ * Whether the menu should close when this item is clicked
3232
+ * @default true
3233
+ */
3234
+ closeOnClick?: boolean;
3225
3235
  /**
3226
3236
  * Callback when the item is selected
3227
3237
  */
3228
- onSelect?: () => void;
3238
+ onSelect?: (event: Event | SyntheticEvent) => void;
3229
3239
  }, "ref"> | Omit<BaseButtonProps & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
3230
3240
  href?: never;
3231
3241
  type?: "button" | "reset" | "submit";
@@ -3248,10 +3258,15 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<BaseButtonProps &
3248
3258
  * Treats the menu item as a link when provided
3249
3259
  */
3250
3260
  href?: MenuItemButtonProps["href"];
3261
+ /**
3262
+ * Whether the menu should close when this item is clicked
3263
+ * @default true
3264
+ */
3265
+ closeOnClick?: boolean;
3251
3266
  /**
3252
3267
  * Callback when the item is selected
3253
3268
  */
3254
- onSelect?: () => void;
3269
+ onSelect?: (event: Event | SyntheticEvent) => void;
3255
3270
  }, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
3256
3271
 
3257
3272
  type MenuItemLabelProps = {
@@ -3313,7 +3328,7 @@ type RadioMenuItemProps = MenuItemButtonProps & {
3313
3328
  /**
3314
3329
  * Callback when the item is selected
3315
3330
  */
3316
- onSelect?: () => void;
3331
+ onSelect?: (event: Event | SyntheticEvent) => void;
3317
3332
  };
3318
3333
  declare const RadioMenuItem: {
3319
3334
  ({ onSelect, value, indicator, ...props }: RadioMenuItemProps): react_jsx_runtime.JSX.Element;
@@ -3346,7 +3361,7 @@ type CheckboxMenuItemProps = MenuItemButtonProps & {
3346
3361
  /**
3347
3362
  * Callback when the item is selected
3348
3363
  */
3349
- onSelect?: () => void;
3364
+ onSelect?: (event: Event | SyntheticEvent) => void;
3350
3365
  };
3351
3366
  declare const CheckboxMenuItem: {
3352
3367
  ({ onSelect, checked, onCheckedChange, ...props }: CheckboxMenuItemProps): react_jsx_runtime.JSX.Element;
@@ -3566,6 +3581,10 @@ type PopoverProps = PopoverControlProps & {
3566
3581
  * The content of the popover
3567
3582
  */
3568
3583
  children: ReactNode;
3584
+ /**
3585
+ * Sets the [color scheme](/docs/color-schemes)
3586
+ */
3587
+ colorScheme?: ColorSchemeTypes;
3569
3588
  /**
3570
3589
  * The maximum width of the popover
3571
3590
  */
@@ -3594,7 +3613,11 @@ type PopoverProps = PopoverControlProps & {
3594
3613
  * Only works if `withArrow` is true, animates the hotspot attached to the arrow
3595
3614
  */
3596
3615
  isAnimated?: boolean;
3597
- colorScheme?: ColorSchemeTypes;
3616
+ /**
3617
+ * @ignore
3618
+ * Inline styles applied to the popover popup
3619
+ */
3620
+ style?: CSSProperties;
3598
3621
  /**
3599
3622
  * The preferred side of the trigger to render on
3600
3623
  */
@@ -3608,7 +3631,7 @@ type PopoverProps = PopoverControlProps & {
3608
3631
  * Displays rich content in a portal, triggered by a button.
3609
3632
  */
3610
3633
  declare const Popover: {
3611
- ({ children, trigger, isOpen, hideCloseButton, maxWidth, maxHeight, onOpenChange, unstyled, withArrow, isAnimated, colorScheme, side, align, ...props }: PopoverProps): JSX.Element;
3634
+ ({ children, trigger, isOpen, hideCloseButton, maxWidth, maxHeight, onOpenChange, unstyled, withArrow, isAnimated, colorScheme, style, side, align, ...props }: PopoverProps): JSX.Element;
3612
3635
  displayName: string;
3613
3636
  };
3614
3637
 
@@ -3974,7 +3997,7 @@ type SegmentedControlProps = {
3974
3997
  /**
3975
3998
  * Provides a horizontal set of segments for switching between different values
3976
3999
  */
3977
- declare const SegmentedControl: ForwardRefExoticComponent<RefAttributes<HTMLDivElement> & SegmentedControlProps>;
4000
+ declare const SegmentedControl: ForwardRefExoticComponent<RefAttributes<HTMLDivElement> & SegmentedControlProps & HTMLAttributes<HTMLDivElement>>;
3978
4001
 
3979
4002
  type BaseProps$1 = {
3980
4003
  /**
@@ -4152,7 +4175,7 @@ type SliderProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
4152
4175
  * (e.g. on mouseup, touchend, or keyup). Useful for analytics or
4153
4176
  * expensive operations where only the final value matters.
4154
4177
  */
4155
- onValueCommit?: (value: number[]) => void;
4178
+ onValueCommitted?: (value: number[]) => void;
4156
4179
  /**
4157
4180
  * Value to be added or subtracted on each step
4158
4181
  */
@@ -4164,7 +4187,7 @@ type SliderProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
4164
4187
  value?: number[];
4165
4188
  };
4166
4189
  declare const Slider: {
4167
- ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, disabled, initialValue, max, min, onChange, onValueCommit, step, value, "data-testid": dataTestId, ...otherProps }: SliderProps): JSX.Element;
4190
+ ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, disabled, initialValue, max, min, onChange, onValueCommitted, step, value, "data-testid": dataTestId, ...otherProps }: SliderProps): JSX.Element;
4168
4191
  displayName: string;
4169
4192
  };
4170
4193
 
@@ -4675,7 +4698,7 @@ type TooltipProps = {
4675
4698
  /**
4676
4699
  * The button or other interactive element that triggers the tooltip
4677
4700
  */
4678
- children: ReactElement;
4701
+ children: ReactNode;
4679
4702
  /**
4680
4703
  * The delay in milliseconds before the tooltip appears
4681
4704
  */