@wistia/ui 0.18.14-beta.6abe6061.9b94192 → 0.18.14-beta.7e16d695.d729afa
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 +43 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +14 -28
- package/dist/index.d.ts +14 -28
- package/dist/index.mjs +43 -26
- 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
|
*/
|
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
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.14-beta.
|
|
3
|
+
* @license @wistia/ui v0.18.14-beta.7e16d695.d729afa
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -18,8 +18,6 @@ import { createGlobalStyle } from "styled-components";
|
|
|
18
18
|
// src/css/globalStyleAdjustmentsCss.tsx
|
|
19
19
|
import { css } from "styled-components";
|
|
20
20
|
var globalStyleAdjustmentsCss = css`
|
|
21
|
-
/* stylelint-disable property-no-vendor-prefix */
|
|
22
|
-
|
|
23
21
|
/**
|
|
24
22
|
* 1. Change from 'content-box' so that 'width' calculations are unaffected by 'padding' or 'border'
|
|
25
23
|
See: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
|
@@ -2385,17 +2383,20 @@ var dateTime = {
|
|
|
2385
2383
|
|
|
2386
2384
|
// src/helpers/mergeRefs/mergeRefs.ts
|
|
2387
2385
|
import { isNotNil, isFunction } from "@wistia/type-guards";
|
|
2388
|
-
var mergeRefs = (
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
}
|
|
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
|
+
);
|
|
2399
2400
|
|
|
2400
2401
|
// src/helpers/mq/mq.ts
|
|
2401
2402
|
import { getValueAndUnit } from "polished";
|
|
@@ -2471,7 +2472,7 @@ import { useCallback as useCallback3 } from "react";
|
|
|
2471
2472
|
import { useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
|
|
2472
2473
|
var useTimedToggle = (initialValue) => {
|
|
2473
2474
|
const [value, setValue] = useState3(false);
|
|
2474
|
-
const timeoutRef = useRef2();
|
|
2475
|
+
const timeoutRef = useRef2(void 0);
|
|
2475
2476
|
const initialValueRef = useRef2(initialValue);
|
|
2476
2477
|
const toggleValue = (timeout) => {
|
|
2477
2478
|
clearTimeout(timeoutRef.current);
|
|
@@ -2846,8 +2847,8 @@ var isEventTargetSupported = (eventTarget) => (
|
|
|
2846
2847
|
Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener)
|
|
2847
2848
|
);
|
|
2848
2849
|
var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
2849
|
-
const savedEventHandler = useRef5();
|
|
2850
|
-
const savedEventOptions = useRef5();
|
|
2850
|
+
const savedEventHandler = useRef5(void 0);
|
|
2851
|
+
const savedEventOptions = useRef5(void 0);
|
|
2851
2852
|
useEffect4(() => {
|
|
2852
2853
|
savedEventHandler.current = eventHandler;
|
|
2853
2854
|
}, [eventHandler]);
|
|
@@ -3040,7 +3041,7 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
|
|
|
3040
3041
|
// src/hooks/usePreviousValue/usePreviousValue.ts
|
|
3041
3042
|
import { useEffect as useEffect6, useRef as useRef6 } from "react";
|
|
3042
3043
|
var usePreviousValue = (value) => {
|
|
3043
|
-
const ref = useRef6();
|
|
3044
|
+
const ref = useRef6(void 0);
|
|
3044
3045
|
useEffect6(() => {
|
|
3045
3046
|
ref.current = value;
|
|
3046
3047
|
});
|
|
@@ -12294,7 +12295,9 @@ var Root = styled48(SliderRoot)`
|
|
|
12294
12295
|
var Track = styled48(SliderTrack)`
|
|
12295
12296
|
width: 100%;
|
|
12296
12297
|
`;
|
|
12297
|
-
var Thumb = styled48(SliderThumb)
|
|
12298
|
+
var Thumb = styled48(SliderThumb)`
|
|
12299
|
+
position: relative;
|
|
12300
|
+
`;
|
|
12298
12301
|
var ThumbInner = styled48.div`
|
|
12299
12302
|
cursor: pointer;
|
|
12300
12303
|
display: block;
|
|
@@ -13532,8 +13535,12 @@ MenuItemButton.displayName = "MenuItemButton_UI";
|
|
|
13532
13535
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
13533
13536
|
import { styled as styled56 } from "styled-components";
|
|
13534
13537
|
import { jsx as jsx269 } from "react/jsx-runtime";
|
|
13535
|
-
var StyledMenuItemLabel = styled56.span
|
|
13536
|
-
|
|
13538
|
+
var StyledMenuItemLabel = styled56.span`
|
|
13539
|
+
/* avoid no-empty-source rule */
|
|
13540
|
+
`;
|
|
13541
|
+
var StyledMenuItemDescription = styled56(Text)`
|
|
13542
|
+
/* avoid no-empty-source rule */
|
|
13543
|
+
`;
|
|
13537
13544
|
var MenuItemLabel = ({ children }) => {
|
|
13538
13545
|
return /* @__PURE__ */ jsx269(StyledMenuItemLabel, { children });
|
|
13539
13546
|
};
|
|
@@ -14665,7 +14672,8 @@ var StyledEditableTextDisplay = styled66.div`
|
|
|
14665
14672
|
${({ $minLines }) => isNotNil26($minLines) && css35`
|
|
14666
14673
|
min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
|
|
14667
14674
|
`}
|
|
14668
|
-
word-break:
|
|
14675
|
+
word-break: normal;
|
|
14676
|
+
overflow-wrap: anywhere;
|
|
14669
14677
|
|
|
14670
14678
|
&[data-wui-editable-text-display='placeholder'] {
|
|
14671
14679
|
color: var(--wui-color-text-secondary);
|
|
@@ -14743,6 +14751,7 @@ var EditableTextDisplayComponent = forwardRef21(
|
|
|
14743
14751
|
);
|
|
14744
14752
|
EditableTextDisplayComponent.displayName = "EditableTextDisplay_UI";
|
|
14745
14753
|
var EditableTextDisplay = makePolymorphic(
|
|
14754
|
+
// @ts-expect-error makePolymorphic is causing issues with types in R19
|
|
14746
14755
|
EditableTextDisplayComponent
|
|
14747
14756
|
);
|
|
14748
14757
|
|
|
@@ -17618,7 +17627,9 @@ var TableSectionContext = createContext11(null);
|
|
|
17618
17627
|
|
|
17619
17628
|
// src/components/Table/TableBody.tsx
|
|
17620
17629
|
import { jsx as jsx323 } from "react/jsx-runtime";
|
|
17621
|
-
var StyledTableBody = styled98.tbody
|
|
17630
|
+
var StyledTableBody = styled98.tbody`
|
|
17631
|
+
width: 100%;
|
|
17632
|
+
`;
|
|
17622
17633
|
var TableBody = ({ children, ...props }) => {
|
|
17623
17634
|
return /* @__PURE__ */ jsx323(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx323(StyledTableBody, { ...props, children }) });
|
|
17624
17635
|
};
|
|
@@ -17655,7 +17666,9 @@ var TableCell = ({ children, ...props }) => {
|
|
|
17655
17666
|
// src/components/Table/TableFoot.tsx
|
|
17656
17667
|
import { styled as styled100 } from "styled-components";
|
|
17657
17668
|
import { jsx as jsx325 } from "react/jsx-runtime";
|
|
17658
|
-
var StyledTableFoot = styled100.tfoot
|
|
17669
|
+
var StyledTableFoot = styled100.tfoot`
|
|
17670
|
+
width: 100%;
|
|
17671
|
+
`;
|
|
17659
17672
|
var TableFoot = ({ children, ...props }) => {
|
|
17660
17673
|
return /* @__PURE__ */ jsx325(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx325(StyledTableFoot, { ...props, children }) });
|
|
17661
17674
|
};
|
|
@@ -17663,7 +17676,9 @@ var TableFoot = ({ children, ...props }) => {
|
|
|
17663
17676
|
// src/components/Table/TableHead.tsx
|
|
17664
17677
|
import { styled as styled101 } from "styled-components";
|
|
17665
17678
|
import { jsx as jsx326 } from "react/jsx-runtime";
|
|
17666
|
-
var StyledThead = styled101.thead
|
|
17679
|
+
var StyledThead = styled101.thead`
|
|
17680
|
+
width: 100%;
|
|
17681
|
+
`;
|
|
17667
17682
|
var TableHead = ({ children, ...props }) => {
|
|
17668
17683
|
return /* @__PURE__ */ jsx326(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx326(StyledThead, { ...props, children }) });
|
|
17669
17684
|
};
|
|
@@ -17671,7 +17686,9 @@ var TableHead = ({ children, ...props }) => {
|
|
|
17671
17686
|
// src/components/Table/TableRow.tsx
|
|
17672
17687
|
import { styled as styled102 } from "styled-components";
|
|
17673
17688
|
import { jsx as jsx327 } from "react/jsx-runtime";
|
|
17674
|
-
var StyledTableRow = styled102.tr
|
|
17689
|
+
var StyledTableRow = styled102.tr`
|
|
17690
|
+
width: 100%;
|
|
17691
|
+
`;
|
|
17675
17692
|
var TableRow = ({ children, ...props }) => {
|
|
17676
17693
|
return /* @__PURE__ */ jsx327(StyledTableRow, { ...props, children });
|
|
17677
17694
|
};
|