@wistia/ui 0.14.18 → 0.14.19-beta.9fc714e3.4e17182
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.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +22 -36
- package/dist/index.d.ts +22 -36
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
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,
|
|
3
|
+
import react__default, { ReactNode, Ref, RefObject, RefCallback, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, MutableRefObject, PropsWithChildren, SyntheticEvent, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, ReactElement } 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 * as react_router from 'react-router';
|
|
@@ -59,7 +59,7 @@ declare const dateTime: {
|
|
|
59
59
|
timeOnlyString: (date: unknown, { timeZone }?: DateOnlyStringOptions) => string;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
declare const mergeRefs: <T = unknown>(refs: (
|
|
62
|
+
declare const mergeRefs: <T = unknown>(refs: (Ref<T> | RefObject<T | null> | null | undefined)[]) => RefCallback<T>;
|
|
63
63
|
|
|
64
64
|
declare const mq: {
|
|
65
65
|
xsAndUp: () => string;
|
|
@@ -100,7 +100,7 @@ type Rect = {
|
|
|
100
100
|
x: number;
|
|
101
101
|
y: number;
|
|
102
102
|
};
|
|
103
|
-
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T>, Rect];
|
|
103
|
+
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T | null>, Rect];
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Hook that wraps `useFilePicker` from the use-file-picker library
|
|
@@ -117,7 +117,7 @@ declare const useImperativeFilePicker: <T extends useImperativeFilePickerConfig
|
|
|
117
117
|
|
|
118
118
|
type UseFocusTrapOptions = {
|
|
119
119
|
disableAriaHider?: boolean;
|
|
120
|
-
focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
|
|
120
|
+
focusSelector?: HTMLElement | RefObject<HTMLElement | null> | string | null | undefined;
|
|
121
121
|
};
|
|
122
122
|
declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
|
|
123
123
|
|
|
@@ -358,9 +358,7 @@ type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
|
|
|
358
358
|
* action, or performing a delete operation. It replaces the HTML `<button>` element,
|
|
359
359
|
* unless an `href` attribute is passed, in which it will render an `<a>` element.
|
|
360
360
|
*/
|
|
361
|
-
declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps &
|
|
362
|
-
ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
|
|
363
|
-
} & {
|
|
361
|
+
declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
364
362
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
365
363
|
children: ReactNode;
|
|
366
364
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -385,9 +383,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
385
383
|
* @ignore
|
|
386
384
|
*/
|
|
387
385
|
type?: LinkTypes;
|
|
388
|
-
}, "ref"> | Omit<BaseButtonProps &
|
|
389
|
-
ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
|
|
390
|
-
} & {
|
|
386
|
+
}, "ref"> | Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
391
387
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
392
388
|
children: ReactNode;
|
|
393
389
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -396,9 +392,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
396
392
|
rightIcon?: JSX.Element | undefined;
|
|
397
393
|
type?: LinkTypes | undefined;
|
|
398
394
|
underline?: "always" | "hover" | "none";
|
|
399
|
-
} &
|
|
400
|
-
ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
|
|
401
|
-
} & {
|
|
395
|
+
} & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
402
396
|
href?: never;
|
|
403
397
|
type?: "button" | "reset" | "submit";
|
|
404
398
|
} & {
|
|
@@ -843,7 +837,7 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
|
|
|
843
837
|
/**
|
|
844
838
|
* Box is a layout container using [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox).
|
|
845
839
|
*/
|
|
846
|
-
declare const Box: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, BoxProps>) => react.ReactElement | null) & UnknownRecord;
|
|
840
|
+
declare const Box: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, BoxProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
847
841
|
|
|
848
842
|
type BreadcrumbsProps = ComponentPropsWithoutRef<'div'> & {
|
|
849
843
|
/**
|
|
@@ -1056,7 +1050,7 @@ declare const Center: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLPro
|
|
|
1056
1050
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
1057
1051
|
|
|
1058
1052
|
type CheckboxSizeType = 'lg' | 'md' | 'sm';
|
|
1059
|
-
declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "
|
|
1053
|
+
declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "size" | "onChange" | "hideLabel"> & {
|
|
1060
1054
|
/**
|
|
1061
1055
|
* Indicates the state of the checkbox
|
|
1062
1056
|
*/
|
|
@@ -1752,7 +1746,7 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
|
|
|
1752
1746
|
/**
|
|
1753
1747
|
* Displaying heading text, both visually and semantically
|
|
1754
1748
|
*/
|
|
1755
|
-
declare const Heading: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement | null) & UnknownRecord;
|
|
1749
|
+
declare const Heading: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
1756
1750
|
|
|
1757
1751
|
type EditableHeadingProps = {
|
|
1758
1752
|
/**
|
|
@@ -2005,7 +1999,7 @@ type GridProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2005
1999
|
expandItems?: boolean;
|
|
2006
2000
|
renderAs?: ElementType;
|
|
2007
2001
|
};
|
|
2008
|
-
declare const Grid: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, GridProps>) => react.ReactElement | null) & UnknownRecord;
|
|
2002
|
+
declare const Grid: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, GridProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
2009
2003
|
|
|
2010
2004
|
type IconButtonProps = {
|
|
2011
2005
|
/**
|
|
@@ -2178,7 +2172,7 @@ type InputClickToCopyProps = Omit<InputProps, 'autoSelect' | 'disabled' | 'right
|
|
|
2178
2172
|
/**
|
|
2179
2173
|
* Provides a readonly input that copies the text to the clipboard when clicked.
|
|
2180
2174
|
*/
|
|
2181
|
-
declare const InputClickToCopy: react.ForwardRefExoticComponent<Omit<InputProps, "type" | "
|
|
2175
|
+
declare const InputClickToCopy: react.ForwardRefExoticComponent<Omit<InputProps, "type" | "value" | "disabled" | "rightIcon" | "autoSelect"> & {
|
|
2182
2176
|
/**
|
|
2183
2177
|
* When disabled, the copy action will not be triggered
|
|
2184
2178
|
*/
|
|
@@ -2421,9 +2415,7 @@ type MenuItemButtonProps = ButtonProps & {
|
|
|
2421
2415
|
unstyled?: never;
|
|
2422
2416
|
};
|
|
2423
2417
|
|
|
2424
|
-
declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2425
|
-
ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
|
|
2426
|
-
} & {
|
|
2418
|
+
declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
2427
2419
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
2428
2420
|
children: react.ReactNode;
|
|
2429
2421
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -2458,9 +2450,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2458
2450
|
* Treats the menu item as a link when provided
|
|
2459
2451
|
*/
|
|
2460
2452
|
href?: MenuItemButtonProps["href"];
|
|
2461
|
-
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2462
|
-
ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
|
|
2463
|
-
} & {
|
|
2453
|
+
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
2464
2454
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
2465
2455
|
children: react.ReactNode;
|
|
2466
2456
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -2469,9 +2459,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2469
2459
|
rightIcon?: react.JSX.Element | undefined;
|
|
2470
2460
|
type?: LinkTypes | undefined;
|
|
2471
2461
|
underline?: "always" | "hover" | "none";
|
|
2472
|
-
} &
|
|
2473
|
-
ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
|
|
2474
|
-
} & {
|
|
2462
|
+
} & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
2475
2463
|
href?: never;
|
|
2476
2464
|
type?: "button" | "reset" | "submit";
|
|
2477
2465
|
} & {
|
|
@@ -2497,9 +2485,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2497
2485
|
* Treats the menu item as a link when provided
|
|
2498
2486
|
*/
|
|
2499
2487
|
href?: MenuItemButtonProps["href"];
|
|
2500
|
-
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2501
|
-
ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
|
|
2502
|
-
} & {
|
|
2488
|
+
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
2503
2489
|
href?: never;
|
|
2504
2490
|
type?: "button" | "reset" | "submit";
|
|
2505
2491
|
children: react.ReactNode;
|
|
@@ -2588,7 +2574,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2588
2574
|
/**
|
|
2589
2575
|
* Used for rending paragraphs and inline text.
|
|
2590
2576
|
*/
|
|
2591
|
-
declare const Text: (<C extends ElementType = "p">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & UnknownRecord;
|
|
2577
|
+
declare const Text: (<C extends ElementType = "p">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
2592
2578
|
|
|
2593
2579
|
type MenuItemLabelProps = {
|
|
2594
2580
|
/**
|
|
@@ -2719,7 +2705,7 @@ type ModalProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2719
2705
|
/**
|
|
2720
2706
|
* Ref to the element that should receive focus when the modal opens
|
|
2721
2707
|
*/
|
|
2722
|
-
initialFocusRef?: RefObject<HTMLElement>;
|
|
2708
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
2723
2709
|
/**
|
|
2724
2710
|
* Determines if the modal is currently open
|
|
2725
2711
|
*/
|
|
@@ -2763,7 +2749,7 @@ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
2763
2749
|
/**
|
|
2764
2750
|
* Ref to the element that should receive focus when the modal opens
|
|
2765
2751
|
*/
|
|
2766
|
-
initialFocusRef?: RefObject<HTMLElement>;
|
|
2752
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
2767
2753
|
/**
|
|
2768
2754
|
* Determines if the modal is currently open
|
|
2769
2755
|
*/
|
|
@@ -2934,7 +2920,7 @@ type RadioProps = Omit<ComponentPropsWithoutRef<'input'>, 'hideLabel' | 'label'
|
|
|
2934
2920
|
*/
|
|
2935
2921
|
hideLabel?: boolean;
|
|
2936
2922
|
};
|
|
2937
|
-
declare const Radio: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "
|
|
2923
|
+
declare const Radio: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "value" | "size" | "onChange" | "hideLabel"> & {
|
|
2938
2924
|
/**
|
|
2939
2925
|
* Indicates the state of the radio
|
|
2940
2926
|
*/
|
|
@@ -3388,7 +3374,7 @@ type StackProps = {
|
|
|
3388
3374
|
* Used to layout its children in a vertical or horizontal stack. The gap between each item in the stack can be customized.
|
|
3389
3375
|
* This allows for layouting children in a consistent way without needing to manually add margins or padding.
|
|
3390
3376
|
*/
|
|
3391
|
-
declare const Stack: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement | null) & UnknownRecord;
|
|
3377
|
+
declare const Stack: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
3392
3378
|
|
|
3393
3379
|
type SwitchSizeType = 'lg' | 'md' | 'sm';
|
|
3394
3380
|
type SwitchProps = Omit<ComponentPropsWithoutRef<'input'>, 'hideLabel' | 'label' | 'size'> & {
|
|
@@ -3901,7 +3887,7 @@ type ContextMenuProps = {
|
|
|
3901
3887
|
triggerRef?: never;
|
|
3902
3888
|
} | {
|
|
3903
3889
|
position?: never;
|
|
3904
|
-
triggerRef: RefObject<HTMLElement>;
|
|
3890
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
3905
3891
|
});
|
|
3906
3892
|
/**
|
|
3907
3893
|
* The ContextMenu is an extended implementation of the [Menu]() component that allows for right-click context menus.
|
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,
|
|
3
|
+
import react__default, { ReactNode, Ref, RefObject, RefCallback, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, MutableRefObject, PropsWithChildren, SyntheticEvent, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, ReactElement } 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 * as react_router from 'react-router';
|
|
@@ -59,7 +59,7 @@ declare const dateTime: {
|
|
|
59
59
|
timeOnlyString: (date: unknown, { timeZone }?: DateOnlyStringOptions) => string;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
declare const mergeRefs: <T = unknown>(refs: (
|
|
62
|
+
declare const mergeRefs: <T = unknown>(refs: (Ref<T> | RefObject<T | null> | null | undefined)[]) => RefCallback<T>;
|
|
63
63
|
|
|
64
64
|
declare const mq: {
|
|
65
65
|
xsAndUp: () => string;
|
|
@@ -100,7 +100,7 @@ type Rect = {
|
|
|
100
100
|
x: number;
|
|
101
101
|
y: number;
|
|
102
102
|
};
|
|
103
|
-
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T>, Rect];
|
|
103
|
+
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T | null>, Rect];
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Hook that wraps `useFilePicker` from the use-file-picker library
|
|
@@ -117,7 +117,7 @@ declare const useImperativeFilePicker: <T extends useImperativeFilePickerConfig
|
|
|
117
117
|
|
|
118
118
|
type UseFocusTrapOptions = {
|
|
119
119
|
disableAriaHider?: boolean;
|
|
120
|
-
focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
|
|
120
|
+
focusSelector?: HTMLElement | RefObject<HTMLElement | null> | string | null | undefined;
|
|
121
121
|
};
|
|
122
122
|
declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
|
|
123
123
|
|
|
@@ -358,9 +358,7 @@ type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
|
|
|
358
358
|
* action, or performing a delete operation. It replaces the HTML `<button>` element,
|
|
359
359
|
* unless an `href` attribute is passed, in which it will render an `<a>` element.
|
|
360
360
|
*/
|
|
361
|
-
declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps &
|
|
362
|
-
ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
|
|
363
|
-
} & {
|
|
361
|
+
declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
364
362
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
365
363
|
children: ReactNode;
|
|
366
364
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -385,9 +383,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
385
383
|
* @ignore
|
|
386
384
|
*/
|
|
387
385
|
type?: LinkTypes;
|
|
388
|
-
}, "ref"> | Omit<BaseButtonProps &
|
|
389
|
-
ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
|
|
390
|
-
} & {
|
|
386
|
+
}, "ref"> | Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
391
387
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
392
388
|
children: ReactNode;
|
|
393
389
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -396,9 +392,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
396
392
|
rightIcon?: JSX.Element | undefined;
|
|
397
393
|
type?: LinkTypes | undefined;
|
|
398
394
|
underline?: "always" | "hover" | "none";
|
|
399
|
-
} &
|
|
400
|
-
ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
|
|
401
|
-
} & {
|
|
395
|
+
} & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
402
396
|
href?: never;
|
|
403
397
|
type?: "button" | "reset" | "submit";
|
|
404
398
|
} & {
|
|
@@ -843,7 +837,7 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
|
|
|
843
837
|
/**
|
|
844
838
|
* Box is a layout container using [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox).
|
|
845
839
|
*/
|
|
846
|
-
declare const Box: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, BoxProps>) => react.ReactElement | null) & UnknownRecord;
|
|
840
|
+
declare const Box: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, BoxProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
847
841
|
|
|
848
842
|
type BreadcrumbsProps = ComponentPropsWithoutRef<'div'> & {
|
|
849
843
|
/**
|
|
@@ -1056,7 +1050,7 @@ declare const Center: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLPro
|
|
|
1056
1050
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
1057
1051
|
|
|
1058
1052
|
type CheckboxSizeType = 'lg' | 'md' | 'sm';
|
|
1059
|
-
declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "
|
|
1053
|
+
declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "size" | "onChange" | "hideLabel"> & {
|
|
1060
1054
|
/**
|
|
1061
1055
|
* Indicates the state of the checkbox
|
|
1062
1056
|
*/
|
|
@@ -1752,7 +1746,7 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
|
|
|
1752
1746
|
/**
|
|
1753
1747
|
* Displaying heading text, both visually and semantically
|
|
1754
1748
|
*/
|
|
1755
|
-
declare const Heading: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement | null) & UnknownRecord;
|
|
1749
|
+
declare const Heading: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
1756
1750
|
|
|
1757
1751
|
type EditableHeadingProps = {
|
|
1758
1752
|
/**
|
|
@@ -2005,7 +1999,7 @@ type GridProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2005
1999
|
expandItems?: boolean;
|
|
2006
2000
|
renderAs?: ElementType;
|
|
2007
2001
|
};
|
|
2008
|
-
declare const Grid: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, GridProps>) => react.ReactElement | null) & UnknownRecord;
|
|
2002
|
+
declare const Grid: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, GridProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
2009
2003
|
|
|
2010
2004
|
type IconButtonProps = {
|
|
2011
2005
|
/**
|
|
@@ -2178,7 +2172,7 @@ type InputClickToCopyProps = Omit<InputProps, 'autoSelect' | 'disabled' | 'right
|
|
|
2178
2172
|
/**
|
|
2179
2173
|
* Provides a readonly input that copies the text to the clipboard when clicked.
|
|
2180
2174
|
*/
|
|
2181
|
-
declare const InputClickToCopy: react.ForwardRefExoticComponent<Omit<InputProps, "type" | "
|
|
2175
|
+
declare const InputClickToCopy: react.ForwardRefExoticComponent<Omit<InputProps, "type" | "value" | "disabled" | "rightIcon" | "autoSelect"> & {
|
|
2182
2176
|
/**
|
|
2183
2177
|
* When disabled, the copy action will not be triggered
|
|
2184
2178
|
*/
|
|
@@ -2421,9 +2415,7 @@ type MenuItemButtonProps = ButtonProps & {
|
|
|
2421
2415
|
unstyled?: never;
|
|
2422
2416
|
};
|
|
2423
2417
|
|
|
2424
|
-
declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2425
|
-
ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
|
|
2426
|
-
} & {
|
|
2418
|
+
declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
2427
2419
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
2428
2420
|
children: react.ReactNode;
|
|
2429
2421
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -2458,9 +2450,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2458
2450
|
* Treats the menu item as a link when provided
|
|
2459
2451
|
*/
|
|
2460
2452
|
href?: MenuItemButtonProps["href"];
|
|
2461
|
-
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2462
|
-
ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
|
|
2463
|
-
} & {
|
|
2453
|
+
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
2464
2454
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
2465
2455
|
children: react.ReactNode;
|
|
2466
2456
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -2469,9 +2459,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2469
2459
|
rightIcon?: react.JSX.Element | undefined;
|
|
2470
2460
|
type?: LinkTypes | undefined;
|
|
2471
2461
|
underline?: "always" | "hover" | "none";
|
|
2472
|
-
} &
|
|
2473
|
-
ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
|
|
2474
|
-
} & {
|
|
2462
|
+
} & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
2475
2463
|
href?: never;
|
|
2476
2464
|
type?: "button" | "reset" | "submit";
|
|
2477
2465
|
} & {
|
|
@@ -2497,9 +2485,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2497
2485
|
* Treats the menu item as a link when provided
|
|
2498
2486
|
*/
|
|
2499
2487
|
href?: MenuItemButtonProps["href"];
|
|
2500
|
-
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2501
|
-
ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
|
|
2502
|
-
} & {
|
|
2488
|
+
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
2503
2489
|
href?: never;
|
|
2504
2490
|
type?: "button" | "reset" | "submit";
|
|
2505
2491
|
children: react.ReactNode;
|
|
@@ -2588,7 +2574,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2588
2574
|
/**
|
|
2589
2575
|
* Used for rending paragraphs and inline text.
|
|
2590
2576
|
*/
|
|
2591
|
-
declare const Text: (<C extends ElementType = "p">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & UnknownRecord;
|
|
2577
|
+
declare const Text: (<C extends ElementType = "p">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
2592
2578
|
|
|
2593
2579
|
type MenuItemLabelProps = {
|
|
2594
2580
|
/**
|
|
@@ -2719,7 +2705,7 @@ type ModalProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2719
2705
|
/**
|
|
2720
2706
|
* Ref to the element that should receive focus when the modal opens
|
|
2721
2707
|
*/
|
|
2722
|
-
initialFocusRef?: RefObject<HTMLElement>;
|
|
2708
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
2723
2709
|
/**
|
|
2724
2710
|
* Determines if the modal is currently open
|
|
2725
2711
|
*/
|
|
@@ -2763,7 +2749,7 @@ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
2763
2749
|
/**
|
|
2764
2750
|
* Ref to the element that should receive focus when the modal opens
|
|
2765
2751
|
*/
|
|
2766
|
-
initialFocusRef?: RefObject<HTMLElement>;
|
|
2752
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
2767
2753
|
/**
|
|
2768
2754
|
* Determines if the modal is currently open
|
|
2769
2755
|
*/
|
|
@@ -2934,7 +2920,7 @@ type RadioProps = Omit<ComponentPropsWithoutRef<'input'>, 'hideLabel' | 'label'
|
|
|
2934
2920
|
*/
|
|
2935
2921
|
hideLabel?: boolean;
|
|
2936
2922
|
};
|
|
2937
|
-
declare const Radio: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "
|
|
2923
|
+
declare const Radio: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "label" | "value" | "size" | "onChange" | "hideLabel"> & {
|
|
2938
2924
|
/**
|
|
2939
2925
|
* Indicates the state of the radio
|
|
2940
2926
|
*/
|
|
@@ -3388,7 +3374,7 @@ type StackProps = {
|
|
|
3388
3374
|
* Used to layout its children in a vertical or horizontal stack. The gap between each item in the stack can be customized.
|
|
3389
3375
|
* This allows for layouting children in a consistent way without needing to manually add margins or padding.
|
|
3390
3376
|
*/
|
|
3391
|
-
declare const Stack: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement | null) & UnknownRecord;
|
|
3377
|
+
declare const Stack: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement<any> | null) & UnknownRecord;
|
|
3392
3378
|
|
|
3393
3379
|
type SwitchSizeType = 'lg' | 'md' | 'sm';
|
|
3394
3380
|
type SwitchProps = Omit<ComponentPropsWithoutRef<'input'>, 'hideLabel' | 'label' | 'size'> & {
|
|
@@ -3901,7 +3887,7 @@ type ContextMenuProps = {
|
|
|
3901
3887
|
triggerRef?: never;
|
|
3902
3888
|
} | {
|
|
3903
3889
|
position?: never;
|
|
3904
|
-
triggerRef: RefObject<HTMLElement>;
|
|
3890
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
3905
3891
|
});
|
|
3906
3892
|
/**
|
|
3907
3893
|
* The ContextMenu is an extended implementation of the [Menu]() component that allows for right-click context menus.
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.14.
|
|
3
|
+
* @license @wistia/ui v0.14.19-beta.9fc714e3.4e17182
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -1979,7 +1979,7 @@ import { useCallback as useCallback3 } from "react";
|
|
|
1979
1979
|
import { useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
|
|
1980
1980
|
var useTimedToggle = (initialValue) => {
|
|
1981
1981
|
const [value, setValue] = useState3(false);
|
|
1982
|
-
const timeoutRef = useRef2();
|
|
1982
|
+
const timeoutRef = useRef2(void 0);
|
|
1983
1983
|
const initialValueRef = useRef2(initialValue);
|
|
1984
1984
|
const toggleValue = (timeout) => {
|
|
1985
1985
|
clearTimeout(timeoutRef.current);
|
|
@@ -2354,8 +2354,8 @@ var isEventTargetSupported = (eventTarget) => (
|
|
|
2354
2354
|
Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener)
|
|
2355
2355
|
);
|
|
2356
2356
|
var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
2357
|
-
const savedEventHandler = useRef5();
|
|
2358
|
-
const savedEventOptions = useRef5();
|
|
2357
|
+
const savedEventHandler = useRef5(void 0);
|
|
2358
|
+
const savedEventOptions = useRef5(void 0);
|
|
2359
2359
|
useEffect4(() => {
|
|
2360
2360
|
savedEventHandler.current = eventHandler;
|
|
2361
2361
|
}, [eventHandler]);
|
|
@@ -2548,7 +2548,7 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
|
|
|
2548
2548
|
// src/hooks/usePreviousValue/usePreviousValue.ts
|
|
2549
2549
|
import { useEffect as useEffect6, useRef as useRef6 } from "react";
|
|
2550
2550
|
var usePreviousValue = (value) => {
|
|
2551
|
-
const ref = useRef6();
|
|
2551
|
+
const ref = useRef6(void 0);
|
|
2552
2552
|
useEffect6(() => {
|
|
2553
2553
|
ref.current = value;
|
|
2554
2554
|
});
|
|
@@ -11141,7 +11141,7 @@ var Input = forwardRef15(
|
|
|
11141
11141
|
rightIcon,
|
|
11142
11142
|
...props
|
|
11143
11143
|
}, externalRef) => {
|
|
11144
|
-
const internalRef = useRef9();
|
|
11144
|
+
const internalRef = useRef9(null);
|
|
11145
11145
|
const ref = isNotNil18(externalRef) && isRecord4(externalRef) && "current" in externalRef ? externalRef : internalRef;
|
|
11146
11146
|
let leftIconToDisplay = leftIcon;
|
|
11147
11147
|
if (isNil13(leftIcon) && type === "search") {
|
|
@@ -11164,7 +11164,7 @@ var Input = forwardRef15(
|
|
|
11164
11164
|
if (isNotNil18(props.onFocus)) {
|
|
11165
11165
|
props.onFocus(event);
|
|
11166
11166
|
}
|
|
11167
|
-
if (autoSelect &&
|
|
11167
|
+
if (autoSelect && type !== "multiline" && ref.current instanceof HTMLInputElement) {
|
|
11168
11168
|
requestAnimationFrame(() => {
|
|
11169
11169
|
ref.current?.select();
|
|
11170
11170
|
});
|