@wistia/ui 0.18.14-beta.e9acbfe3.e18434d → 0.18.15
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 +20 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +16 -29
- package/dist/index.d.ts +16 -29
- package/dist/index.mjs +20 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -17
package/dist/index.d.mts
CHANGED
|
@@ -99,7 +99,7 @@ type Rect = {
|
|
|
99
99
|
x: number;
|
|
100
100
|
y: number;
|
|
101
101
|
};
|
|
102
|
-
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T>, Rect];
|
|
102
|
+
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T | null>, Rect];
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* Hook that wraps `useFilePicker` from the use-file-picker library
|
|
@@ -116,7 +116,7 @@ declare const useImperativeFilePicker: <T extends useImperativeFilePickerConfig
|
|
|
116
116
|
|
|
117
117
|
type UseFocusTrapOptions = {
|
|
118
118
|
disableAriaHider?: boolean;
|
|
119
|
-
focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
|
|
119
|
+
focusSelector?: HTMLElement | RefObject<HTMLElement | null> | string | null | undefined;
|
|
120
120
|
};
|
|
121
121
|
declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
|
|
122
122
|
|
|
@@ -365,9 +365,7 @@ type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
|
|
|
365
365
|
* action, or performing a delete operation. It replaces the HTML `<button>` element,
|
|
366
366
|
* unless an `href` attribute is passed, in which it will render an `<a>` element.
|
|
367
367
|
*/
|
|
368
|
-
declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps &
|
|
369
|
-
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;
|
|
370
|
-
} & {
|
|
368
|
+
declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
371
369
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
372
370
|
children: ReactNode;
|
|
373
371
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -398,9 +396,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
398
396
|
* @ignore
|
|
399
397
|
*/
|
|
400
398
|
type?: LinkTypes;
|
|
401
|
-
}, "ref"> | Omit<BaseButtonProps &
|
|
402
|
-
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;
|
|
403
|
-
} & {
|
|
399
|
+
}, "ref"> | Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
404
400
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
405
401
|
children: ReactNode;
|
|
406
402
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -409,9 +405,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
409
405
|
rightIcon?: ReactNode | undefined;
|
|
410
406
|
type?: LinkTypes | undefined;
|
|
411
407
|
underline?: "always" | "hover" | "none";
|
|
412
|
-
} &
|
|
413
|
-
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;
|
|
414
|
-
} & {
|
|
408
|
+
} & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
415
409
|
href?: never;
|
|
416
410
|
type?: "button" | "reset" | "submit";
|
|
417
411
|
} & {
|
|
@@ -1144,7 +1138,7 @@ type ClickRegionProps = {
|
|
|
1144
1138
|
/**
|
|
1145
1139
|
* The ref to the button or link that should be clicked when the ClickRegion is clicked.
|
|
1146
1140
|
*/
|
|
1147
|
-
targetRef:
|
|
1141
|
+
targetRef: RefObject<HTMLAnchorElement | HTMLButtonElement | null>;
|
|
1148
1142
|
};
|
|
1149
1143
|
/**
|
|
1150
1144
|
* This allows larger elements to be interactive links or buttons while maintaining acessibility.
|
|
@@ -1674,7 +1668,7 @@ type ContextMenuProps = {
|
|
|
1674
1668
|
} | {
|
|
1675
1669
|
position?: never;
|
|
1676
1670
|
side?: never;
|
|
1677
|
-
triggerRef: RefObject<HTMLElement>;
|
|
1671
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
1678
1672
|
});
|
|
1679
1673
|
/**
|
|
1680
1674
|
* The ContextMenu is an extended implementation of the [Menu]() component that allows for right-click context menus.
|
|
@@ -1723,7 +1717,7 @@ declare const DataCard: {
|
|
|
1723
1717
|
displayName: string;
|
|
1724
1718
|
};
|
|
1725
1719
|
|
|
1726
|
-
type DataCardsProps = ComponentPropsWithoutRef<'
|
|
1720
|
+
type DataCardsProps = ComponentPropsWithoutRef<'div'> & {
|
|
1727
1721
|
/**
|
|
1728
1722
|
* Should be at least one `DataCard` component
|
|
1729
1723
|
*/
|
|
@@ -2865,9 +2859,7 @@ type MenuItemButtonProps = ButtonProps & {
|
|
|
2865
2859
|
unstyled?: never;
|
|
2866
2860
|
};
|
|
2867
2861
|
|
|
2868
|
-
declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2869
|
-
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;
|
|
2870
|
-
} & {
|
|
2862
|
+
declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
2871
2863
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
2872
2864
|
children: react.ReactNode;
|
|
2873
2865
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -2908,9 +2900,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2908
2900
|
* Treats the menu item as a link when provided
|
|
2909
2901
|
*/
|
|
2910
2902
|
href?: MenuItemButtonProps["href"];
|
|
2911
|
-
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2912
|
-
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;
|
|
2913
|
-
} & {
|
|
2903
|
+
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
2914
2904
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
2915
2905
|
children: react.ReactNode;
|
|
2916
2906
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -2919,9 +2909,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2919
2909
|
rightIcon?: react.ReactNode | undefined;
|
|
2920
2910
|
type?: LinkTypes | undefined;
|
|
2921
2911
|
underline?: "always" | "hover" | "none";
|
|
2922
|
-
} &
|
|
2923
|
-
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;
|
|
2924
|
-
} & {
|
|
2912
|
+
} & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
2925
2913
|
href?: never;
|
|
2926
2914
|
type?: "button" | "reset" | "submit";
|
|
2927
2915
|
} & {
|
|
@@ -2947,9 +2935,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2947
2935
|
* Treats the menu item as a link when provided
|
|
2948
2936
|
*/
|
|
2949
2937
|
href?: MenuItemButtonProps["href"];
|
|
2950
|
-
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2951
|
-
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;
|
|
2952
|
-
} & {
|
|
2938
|
+
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
2953
2939
|
href?: never;
|
|
2954
2940
|
type?: "button" | "reset" | "submit";
|
|
2955
2941
|
children: react.ReactNode;
|
|
@@ -3106,7 +3092,7 @@ type ModalProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
3106
3092
|
/**
|
|
3107
3093
|
* Ref to the element that should receive focus when the modal opens
|
|
3108
3094
|
*/
|
|
3109
|
-
initialFocusRef?: RefObject<HTMLElement>;
|
|
3095
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
3110
3096
|
/**
|
|
3111
3097
|
* Determines if the modal is currently open
|
|
3112
3098
|
*/
|
|
@@ -3154,7 +3140,7 @@ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
3154
3140
|
/**
|
|
3155
3141
|
* Ref to the element that should receive focus when the modal opens
|
|
3156
3142
|
*/
|
|
3157
|
-
initialFocusRef?: RefObject<HTMLElement>;
|
|
3143
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
3158
3144
|
/**
|
|
3159
3145
|
* Determines if the modal is currently open
|
|
3160
3146
|
*/
|
|
@@ -4373,7 +4359,8 @@ type CustomizableThemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
4373
4359
|
overrides: Partial<Record<CustomizableTokens, number | string>>;
|
|
4374
4360
|
};
|
|
4375
4361
|
/**
|
|
4376
|
-
*
|
|
4362
|
+
* Used for overriding the default theme tokens with custom values.
|
|
4363
|
+
* This should only be used when the ui systems team has been consulted first.
|
|
4377
4364
|
*/
|
|
4378
4365
|
declare const CustomizableThemeWrapper: {
|
|
4379
4366
|
({ children, overrides, ...props }: CustomizableThemeWrapperProps): JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ type Rect = {
|
|
|
99
99
|
x: number;
|
|
100
100
|
y: number;
|
|
101
101
|
};
|
|
102
|
-
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T>, Rect];
|
|
102
|
+
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T | null>, Rect];
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* Hook that wraps `useFilePicker` from the use-file-picker library
|
|
@@ -116,7 +116,7 @@ declare const useImperativeFilePicker: <T extends useImperativeFilePickerConfig
|
|
|
116
116
|
|
|
117
117
|
type UseFocusTrapOptions = {
|
|
118
118
|
disableAriaHider?: boolean;
|
|
119
|
-
focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
|
|
119
|
+
focusSelector?: HTMLElement | RefObject<HTMLElement | null> | string | null | undefined;
|
|
120
120
|
};
|
|
121
121
|
declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
|
|
122
122
|
|
|
@@ -365,9 +365,7 @@ type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
|
|
|
365
365
|
* action, or performing a delete operation. It replaces the HTML `<button>` element,
|
|
366
366
|
* unless an `href` attribute is passed, in which it will render an `<a>` element.
|
|
367
367
|
*/
|
|
368
|
-
declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps &
|
|
369
|
-
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;
|
|
370
|
-
} & {
|
|
368
|
+
declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
371
369
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
372
370
|
children: ReactNode;
|
|
373
371
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -398,9 +396,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
398
396
|
* @ignore
|
|
399
397
|
*/
|
|
400
398
|
type?: LinkTypes;
|
|
401
|
-
}, "ref"> | Omit<BaseButtonProps &
|
|
402
|
-
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;
|
|
403
|
-
} & {
|
|
399
|
+
}, "ref"> | Omit<BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
404
400
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
405
401
|
children: ReactNode;
|
|
406
402
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -409,9 +405,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
409
405
|
rightIcon?: ReactNode | undefined;
|
|
410
406
|
type?: LinkTypes | undefined;
|
|
411
407
|
underline?: "always" | "hover" | "none";
|
|
412
|
-
} &
|
|
413
|
-
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;
|
|
414
|
-
} & {
|
|
408
|
+
} & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
415
409
|
href?: never;
|
|
416
410
|
type?: "button" | "reset" | "submit";
|
|
417
411
|
} & {
|
|
@@ -1144,7 +1138,7 @@ type ClickRegionProps = {
|
|
|
1144
1138
|
/**
|
|
1145
1139
|
* The ref to the button or link that should be clicked when the ClickRegion is clicked.
|
|
1146
1140
|
*/
|
|
1147
|
-
targetRef:
|
|
1141
|
+
targetRef: RefObject<HTMLAnchorElement | HTMLButtonElement | null>;
|
|
1148
1142
|
};
|
|
1149
1143
|
/**
|
|
1150
1144
|
* This allows larger elements to be interactive links or buttons while maintaining acessibility.
|
|
@@ -1674,7 +1668,7 @@ type ContextMenuProps = {
|
|
|
1674
1668
|
} | {
|
|
1675
1669
|
position?: never;
|
|
1676
1670
|
side?: never;
|
|
1677
|
-
triggerRef: RefObject<HTMLElement>;
|
|
1671
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
1678
1672
|
});
|
|
1679
1673
|
/**
|
|
1680
1674
|
* The ContextMenu is an extended implementation of the [Menu]() component that allows for right-click context menus.
|
|
@@ -1723,7 +1717,7 @@ declare const DataCard: {
|
|
|
1723
1717
|
displayName: string;
|
|
1724
1718
|
};
|
|
1725
1719
|
|
|
1726
|
-
type DataCardsProps = ComponentPropsWithoutRef<'
|
|
1720
|
+
type DataCardsProps = ComponentPropsWithoutRef<'div'> & {
|
|
1727
1721
|
/**
|
|
1728
1722
|
* Should be at least one `DataCard` component
|
|
1729
1723
|
*/
|
|
@@ -2865,9 +2859,7 @@ type MenuItemButtonProps = ButtonProps & {
|
|
|
2865
2859
|
unstyled?: never;
|
|
2866
2860
|
};
|
|
2867
2861
|
|
|
2868
|
-
declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2869
|
-
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;
|
|
2870
|
-
} & {
|
|
2862
|
+
declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
2871
2863
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
2872
2864
|
children: react.ReactNode;
|
|
2873
2865
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -2908,9 +2900,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2908
2900
|
* Treats the menu item as a link when provided
|
|
2909
2901
|
*/
|
|
2910
2902
|
href?: MenuItemButtonProps["href"];
|
|
2911
|
-
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2912
|
-
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;
|
|
2913
|
-
} & {
|
|
2903
|
+
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
2914
2904
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
2915
2905
|
children: react.ReactNode;
|
|
2916
2906
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -2919,9 +2909,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2919
2909
|
rightIcon?: react.ReactNode | undefined;
|
|
2920
2910
|
type?: LinkTypes | undefined;
|
|
2921
2911
|
underline?: "always" | "hover" | "none";
|
|
2922
|
-
} &
|
|
2923
|
-
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;
|
|
2924
|
-
} & {
|
|
2912
|
+
} & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
2925
2913
|
href?: never;
|
|
2926
2914
|
type?: "button" | "reset" | "submit";
|
|
2927
2915
|
} & {
|
|
@@ -2947,9 +2935,7 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2947
2935
|
* Treats the menu item as a link when provided
|
|
2948
2936
|
*/
|
|
2949
2937
|
href?: MenuItemButtonProps["href"];
|
|
2950
|
-
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps &
|
|
2951
|
-
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;
|
|
2952
|
-
} & {
|
|
2938
|
+
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
2953
2939
|
href?: never;
|
|
2954
2940
|
type?: "button" | "reset" | "submit";
|
|
2955
2941
|
children: react.ReactNode;
|
|
@@ -3106,7 +3092,7 @@ type ModalProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
3106
3092
|
/**
|
|
3107
3093
|
* Ref to the element that should receive focus when the modal opens
|
|
3108
3094
|
*/
|
|
3109
|
-
initialFocusRef?: RefObject<HTMLElement>;
|
|
3095
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
3110
3096
|
/**
|
|
3111
3097
|
* Determines if the modal is currently open
|
|
3112
3098
|
*/
|
|
@@ -3154,7 +3140,7 @@ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
3154
3140
|
/**
|
|
3155
3141
|
* Ref to the element that should receive focus when the modal opens
|
|
3156
3142
|
*/
|
|
3157
|
-
initialFocusRef?: RefObject<HTMLElement>;
|
|
3143
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
3158
3144
|
/**
|
|
3159
3145
|
* Determines if the modal is currently open
|
|
3160
3146
|
*/
|
|
@@ -4373,7 +4359,8 @@ type CustomizableThemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
4373
4359
|
overrides: Partial<Record<CustomizableTokens, number | string>>;
|
|
4374
4360
|
};
|
|
4375
4361
|
/**
|
|
4376
|
-
*
|
|
4362
|
+
* Used for overriding the default theme tokens with custom values.
|
|
4363
|
+
* This should only be used when the ui systems team has been consulted first.
|
|
4377
4364
|
*/
|
|
4378
4365
|
declare const CustomizableThemeWrapper: {
|
|
4379
4366
|
({ children, overrides, ...props }: CustomizableThemeWrapperProps): JSX.Element;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.
|
|
3
|
+
* @license @wistia/ui v0.18.15
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2383,17 +2383,20 @@ var dateTime = {
|
|
|
2383
2383
|
|
|
2384
2384
|
// src/helpers/mergeRefs/mergeRefs.ts
|
|
2385
2385
|
import { isNotNil, isFunction } from "@wistia/type-guards";
|
|
2386
|
-
var mergeRefs = (
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
}
|
|
2386
|
+
var mergeRefs = (
|
|
2387
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
2388
|
+
(refs) => (value) => {
|
|
2389
|
+
refs.forEach((ref) => {
|
|
2390
|
+
if (isFunction(ref)) {
|
|
2391
|
+
ref(value);
|
|
2392
|
+
return;
|
|
2393
|
+
}
|
|
2394
|
+
if (isNotNil(ref)) {
|
|
2395
|
+
ref.current = value;
|
|
2396
|
+
}
|
|
2397
|
+
});
|
|
2398
|
+
}
|
|
2399
|
+
);
|
|
2397
2400
|
|
|
2398
2401
|
// src/helpers/mq/mq.ts
|
|
2399
2402
|
import { getValueAndUnit } from "polished";
|
|
@@ -2469,7 +2472,7 @@ import { useCallback as useCallback3 } from "react";
|
|
|
2469
2472
|
import { useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
|
|
2470
2473
|
var useTimedToggle = (initialValue) => {
|
|
2471
2474
|
const [value, setValue] = useState3(false);
|
|
2472
|
-
const timeoutRef = useRef2();
|
|
2475
|
+
const timeoutRef = useRef2(void 0);
|
|
2473
2476
|
const initialValueRef = useRef2(initialValue);
|
|
2474
2477
|
const toggleValue = (timeout) => {
|
|
2475
2478
|
clearTimeout(timeoutRef.current);
|
|
@@ -2844,8 +2847,8 @@ var isEventTargetSupported = (eventTarget) => (
|
|
|
2844
2847
|
Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener)
|
|
2845
2848
|
);
|
|
2846
2849
|
var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
2847
|
-
const savedEventHandler = useRef5();
|
|
2848
|
-
const savedEventOptions = useRef5();
|
|
2850
|
+
const savedEventHandler = useRef5(void 0);
|
|
2851
|
+
const savedEventOptions = useRef5(void 0);
|
|
2849
2852
|
useEffect4(() => {
|
|
2850
2853
|
savedEventHandler.current = eventHandler;
|
|
2851
2854
|
}, [eventHandler]);
|
|
@@ -3038,7 +3041,7 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
|
|
|
3038
3041
|
// src/hooks/usePreviousValue/usePreviousValue.ts
|
|
3039
3042
|
import { useEffect as useEffect6, useRef as useRef6 } from "react";
|
|
3040
3043
|
var usePreviousValue = (value) => {
|
|
3041
|
-
const ref = useRef6();
|
|
3044
|
+
const ref = useRef6(void 0);
|
|
3042
3045
|
useEffect6(() => {
|
|
3043
3046
|
ref.current = value;
|
|
3044
3047
|
});
|
|
@@ -14748,6 +14751,7 @@ var EditableTextDisplayComponent = forwardRef21(
|
|
|
14748
14751
|
);
|
|
14749
14752
|
EditableTextDisplayComponent.displayName = "EditableTextDisplay_UI";
|
|
14750
14753
|
var EditableTextDisplay = makePolymorphic(
|
|
14754
|
+
// @ts-expect-error makePolymorphic is causing issues with types in R19
|
|
14751
14755
|
EditableTextDisplayComponent
|
|
14752
14756
|
);
|
|
14753
14757
|
|