@wistia/ui 0.18.10 → 0.18.11

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.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, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, PropsWithChildren, ReactElement, InputHTMLAttributes, Ref, SyntheticEvent, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
3
+ import { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, AnchorHTMLAttributes, MouseEvent, ReactElement, ElementType, ChangeEvent, PropsWithChildren, InputHTMLAttributes, Ref, SyntheticEvent, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentProps } 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 { CollapsibleContentProps as CollapsibleContentProps$1 } from '@radix-ui/react-collapsible';
@@ -123,11 +123,11 @@ declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) =>
123
123
  declare const useForceUpdate: () => (() => void);
124
124
 
125
125
  type HoverProps = {
126
- onFocus: (event: React.FocusEvent) => void;
127
- onMouseEnter: (event: React.MouseEvent) => void;
128
- onBlur: (event: React.FocusEvent) => void;
129
- onMouseLeave: (event: React.MouseEvent) => void;
130
- onMouseMove?: (event: React.MouseEvent) => void;
126
+ onFocus: () => void;
127
+ onMouseEnter: () => void;
128
+ onBlur: () => void;
129
+ onMouseLeave: () => void;
130
+ onMouseMove?: () => void;
131
131
  };
132
132
  declare const useIsHovered: () => [boolean, HoverProps, (hovered: boolean) => void];
133
133
 
@@ -198,7 +198,7 @@ declare const ColorSchemeWrapper: {
198
198
  type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
199
199
 
200
200
  type LinkTypes = 'default' | 'email' | 'external' | 'phone';
201
- type ReactRouterLinkProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> & {
201
+ type ReactRouterLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> & {
202
202
  reloadDocument?: boolean;
203
203
  replace?: boolean;
204
204
  state?: any;
@@ -432,7 +432,7 @@ type ToastProps = ComponentPropsWithoutRef<'div'> & {
432
432
  /**
433
433
  * Action can be undefined (default dismiss button), a Button component or false to hide the dismiss button
434
434
  */
435
- action?: React.ReactElement<typeof Button> | undefined;
435
+ action?: ReactElement<typeof Button> | undefined;
436
436
  /**
437
437
  * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
438
438
  */
@@ -2195,7 +2195,7 @@ type EditableTextCancelButtonProps = {
2195
2195
  */
2196
2196
  children: ReactElement;
2197
2197
  };
2198
- declare const EditableTextCancelButton: ({ children, }: EditableTextCancelButtonProps) => React.JSX.Element | null;
2198
+ declare const EditableTextCancelButton: ({ children, }: EditableTextCancelButtonProps) => JSX.Element | null;
2199
2199
 
2200
2200
  type EditableTextTriggerProps = {
2201
2201
  /**
@@ -3181,7 +3181,7 @@ type ModalCalloutsProps = {
3181
3181
  /**
3182
3182
  * The content to be displayed in the modal callout.
3183
3183
  */
3184
- children?: React.ReactNode;
3184
+ children?: ReactNode;
3185
3185
  };
3186
3186
  declare const ModalCallouts: {
3187
3187
  ({ children }: ModalCalloutsProps): react_jsx_runtime.JSX.Element;
@@ -3193,7 +3193,7 @@ type ModalCalloutProps = {
3193
3193
  /**
3194
3194
  * The content to be displayed in the modal callout.
3195
3195
  */
3196
- children?: React.ReactNode;
3196
+ children?: ReactNode;
3197
3197
  };
3198
3198
  declare const ModalCallout: {
3199
3199
  ({ title, image, children }: ModalCalloutProps): react_jsx_runtime.JSX.Element;
@@ -3926,23 +3926,23 @@ declare const Switch: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHT
3926
3926
  hideLabel?: boolean;
3927
3927
  } & react.RefAttributes<HTMLInputElement>>;
3928
3928
 
3929
- type TableBodyProps = react__default.HTMLAttributes<HTMLTableSectionElement> & {
3929
+ type TableBodyProps = HTMLAttributes<HTMLTableSectionElement> & {
3930
3930
  children?: ReactNode;
3931
3931
  };
3932
3932
  declare const TableBody: ({ children, ...props }: TableBodyProps) => JSX.Element;
3933
3933
 
3934
- type CellAttrs = Omit<react__default.TdHTMLAttributes<HTMLTableCellElement>, 'ref'> & Omit<react__default.ThHTMLAttributes<HTMLTableCellElement>, 'ref'>;
3934
+ type CellAttrs = Omit<TdHTMLAttributes<HTMLTableCellElement>, 'ref'> & Omit<ThHTMLAttributes<HTMLTableCellElement>, 'ref'>;
3935
3935
  type TableCellProps = CellAttrs & {
3936
3936
  children?: ReactNode;
3937
3937
  };
3938
3938
  declare const TableCell: ({ children, ...props }: TableCellProps) => JSX.Element;
3939
3939
 
3940
- type TableFootProps = react__default.HTMLAttributes<HTMLTableSectionElement> & {
3940
+ type TableFootProps = HTMLAttributes<HTMLTableSectionElement> & {
3941
3941
  children?: ReactNode;
3942
3942
  };
3943
3943
  declare const TableFoot: ({ children, ...props }: TableFootProps) => JSX.Element;
3944
3944
 
3945
- type TableHeadProps = react__default.HTMLAttributes<HTMLTableSectionElement> & {
3945
+ type TableHeadProps = HTMLAttributes<HTMLTableSectionElement> & {
3946
3946
  children?: ReactNode;
3947
3947
  };
3948
3948
  declare const TableHead: ({ children, ...props }: TableHeadProps) => JSX.Element;
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, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, PropsWithChildren, ReactElement, InputHTMLAttributes, Ref, SyntheticEvent, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
3
+ import { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, AnchorHTMLAttributes, MouseEvent, ReactElement, ElementType, ChangeEvent, PropsWithChildren, InputHTMLAttributes, Ref, SyntheticEvent, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentProps } 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 { CollapsibleContentProps as CollapsibleContentProps$1 } from '@radix-ui/react-collapsible';
@@ -123,11 +123,11 @@ declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) =>
123
123
  declare const useForceUpdate: () => (() => void);
124
124
 
125
125
  type HoverProps = {
126
- onFocus: (event: React.FocusEvent) => void;
127
- onMouseEnter: (event: React.MouseEvent) => void;
128
- onBlur: (event: React.FocusEvent) => void;
129
- onMouseLeave: (event: React.MouseEvent) => void;
130
- onMouseMove?: (event: React.MouseEvent) => void;
126
+ onFocus: () => void;
127
+ onMouseEnter: () => void;
128
+ onBlur: () => void;
129
+ onMouseLeave: () => void;
130
+ onMouseMove?: () => void;
131
131
  };
132
132
  declare const useIsHovered: () => [boolean, HoverProps, (hovered: boolean) => void];
133
133
 
@@ -198,7 +198,7 @@ declare const ColorSchemeWrapper: {
198
198
  type ButtonVariants = 'ghost' | 'outline' | 'soft' | 'solid';
199
199
 
200
200
  type LinkTypes = 'default' | 'email' | 'external' | 'phone';
201
- type ReactRouterLinkProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> & {
201
+ type ReactRouterLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> & {
202
202
  reloadDocument?: boolean;
203
203
  replace?: boolean;
204
204
  state?: any;
@@ -432,7 +432,7 @@ type ToastProps = ComponentPropsWithoutRef<'div'> & {
432
432
  /**
433
433
  * Action can be undefined (default dismiss button), a Button component or false to hide the dismiss button
434
434
  */
435
- action?: React.ReactElement<typeof Button> | undefined;
435
+ action?: ReactElement<typeof Button> | undefined;
436
436
  /**
437
437
  * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
438
438
  */
@@ -2195,7 +2195,7 @@ type EditableTextCancelButtonProps = {
2195
2195
  */
2196
2196
  children: ReactElement;
2197
2197
  };
2198
- declare const EditableTextCancelButton: ({ children, }: EditableTextCancelButtonProps) => React.JSX.Element | null;
2198
+ declare const EditableTextCancelButton: ({ children, }: EditableTextCancelButtonProps) => JSX.Element | null;
2199
2199
 
2200
2200
  type EditableTextTriggerProps = {
2201
2201
  /**
@@ -3181,7 +3181,7 @@ type ModalCalloutsProps = {
3181
3181
  /**
3182
3182
  * The content to be displayed in the modal callout.
3183
3183
  */
3184
- children?: React.ReactNode;
3184
+ children?: ReactNode;
3185
3185
  };
3186
3186
  declare const ModalCallouts: {
3187
3187
  ({ children }: ModalCalloutsProps): react_jsx_runtime.JSX.Element;
@@ -3193,7 +3193,7 @@ type ModalCalloutProps = {
3193
3193
  /**
3194
3194
  * The content to be displayed in the modal callout.
3195
3195
  */
3196
- children?: React.ReactNode;
3196
+ children?: ReactNode;
3197
3197
  };
3198
3198
  declare const ModalCallout: {
3199
3199
  ({ title, image, children }: ModalCalloutProps): react_jsx_runtime.JSX.Element;
@@ -3926,23 +3926,23 @@ declare const Switch: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHT
3926
3926
  hideLabel?: boolean;
3927
3927
  } & react.RefAttributes<HTMLInputElement>>;
3928
3928
 
3929
- type TableBodyProps = react__default.HTMLAttributes<HTMLTableSectionElement> & {
3929
+ type TableBodyProps = HTMLAttributes<HTMLTableSectionElement> & {
3930
3930
  children?: ReactNode;
3931
3931
  };
3932
3932
  declare const TableBody: ({ children, ...props }: TableBodyProps) => JSX.Element;
3933
3933
 
3934
- type CellAttrs = Omit<react__default.TdHTMLAttributes<HTMLTableCellElement>, 'ref'> & Omit<react__default.ThHTMLAttributes<HTMLTableCellElement>, 'ref'>;
3934
+ type CellAttrs = Omit<TdHTMLAttributes<HTMLTableCellElement>, 'ref'> & Omit<ThHTMLAttributes<HTMLTableCellElement>, 'ref'>;
3935
3935
  type TableCellProps = CellAttrs & {
3936
3936
  children?: ReactNode;
3937
3937
  };
3938
3938
  declare const TableCell: ({ children, ...props }: TableCellProps) => JSX.Element;
3939
3939
 
3940
- type TableFootProps = react__default.HTMLAttributes<HTMLTableSectionElement> & {
3940
+ type TableFootProps = HTMLAttributes<HTMLTableSectionElement> & {
3941
3941
  children?: ReactNode;
3942
3942
  };
3943
3943
  declare const TableFoot: ({ children, ...props }: TableFootProps) => JSX.Element;
3944
3944
 
3945
- type TableHeadProps = react__default.HTMLAttributes<HTMLTableSectionElement> & {
3945
+ type TableHeadProps = HTMLAttributes<HTMLTableSectionElement> & {
3946
3946
  children?: ReactNode;
3947
3947
  };
3948
3948
  declare const TableHead: ({ children, ...props }: TableHeadProps) => JSX.Element;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.18.10
3
+ * @license @wistia/ui v0.18.11
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -2807,26 +2807,11 @@ var useForceUpdate = () => {
2807
2807
  import { useState as useState6 } from "react";
2808
2808
  var useIsHovered = () => {
2809
2809
  const [isHovered, setIsHovered] = useState6(false);
2810
- const onFocus = (event) => {
2811
- if (event.target !== event.currentTarget) return;
2812
- setIsHovered(true);
2813
- };
2814
- const onMouseEnter = (event) => {
2815
- if (event.target !== event.currentTarget) return;
2816
- setIsHovered(true);
2817
- };
2818
- const onMouseMove = (event) => {
2819
- if (event.target !== event.currentTarget) return;
2820
- setIsHovered(true);
2821
- };
2822
- const onBlur = (event) => {
2823
- if (event.target !== event.currentTarget) return;
2824
- setIsHovered(false);
2825
- };
2826
- const onMouseLeave = (event) => {
2827
- if (event.target !== event.currentTarget) return;
2828
- setIsHovered(false);
2829
- };
2810
+ const onFocus = () => setIsHovered(true);
2811
+ const onMouseEnter = () => setIsHovered(true);
2812
+ const onMouseMove = () => setIsHovered(true);
2813
+ const onBlur = () => setIsHovered(false);
2814
+ const onMouseLeave = () => setIsHovered(false);
2830
2815
  const hoverProps = {
2831
2816
  onFocus,
2832
2817
  onMouseEnter,
@@ -17549,7 +17534,6 @@ var Table = ({
17549
17534
  };
17550
17535
 
17551
17536
  // src/components/Table/TableBody.tsx
17552
- import "react";
17553
17537
  import { styled as styled97 } from "styled-components";
17554
17538
 
17555
17539
  // src/components/Table/TableSectionContext.ts
@@ -17593,7 +17577,6 @@ var TableCell = ({ children, ...props }) => {
17593
17577
  };
17594
17578
 
17595
17579
  // src/components/Table/TableFoot.tsx
17596
- import "react";
17597
17580
  import { styled as styled99 } from "styled-components";
17598
17581
  import { jsx as jsx321 } from "react/jsx-runtime";
17599
17582
  var StyledTableFoot = styled99.tfoot``;
@@ -17602,7 +17585,6 @@ var TableFoot = ({ children, ...props }) => {
17602
17585
  };
17603
17586
 
17604
17587
  // src/components/Table/TableHead.tsx
17605
- import "react";
17606
17588
  import { styled as styled100 } from "styled-components";
17607
17589
  import { jsx as jsx322 } from "react/jsx-runtime";
17608
17590
  var StyledThead = styled100.thead``;
@@ -18334,7 +18316,7 @@ var Thumbnail = forwardRef37(
18334
18316
  Thumbnail.displayName = "Thumbnail_UI";
18335
18317
 
18336
18318
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
18337
- import React5 from "react";
18319
+ import { cloneElement as cloneElement9, Children as Children11 } from "react";
18338
18320
  import { styled as styled108 } from "styled-components";
18339
18321
  import { isNonEmptyArray } from "@wistia/type-guards";
18340
18322
  import { jsx as jsx331 } from "react/jsx-runtime";
@@ -18393,10 +18375,10 @@ var ThumbnailCollage = ({
18393
18375
  gradientBackground = "defaultMidOne",
18394
18376
  ...props
18395
18377
  }) => {
18396
- const thumbnailArray = React5.Children.toArray(children);
18378
+ const thumbnailArray = Children11.toArray(children);
18397
18379
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
18398
18380
  const thumbnails = isNonEmptyArray(thumbnailArray) ? truncatedThumbnails.map((child) => {
18399
- return React5.cloneElement(child, {
18381
+ return cloneElement9(child, {
18400
18382
  ...child.props,
18401
18383
  children: void 0
18402
18384
  });
@@ -18550,7 +18532,7 @@ WistiaLogo.displayName = "WistiaLogo_UI";
18550
18532
  // src/components/SplitButton/SplitButton.tsx
18551
18533
  import { styled as styled110 } from "styled-components";
18552
18534
  import { isNotNil as isNotNil45 } from "@wistia/type-guards";
18553
- import { cloneElement as cloneElement9 } from "react";
18535
+ import { cloneElement as cloneElement10 } from "react";
18554
18536
  import { jsx as jsx333, jsxs as jsxs74 } from "react/jsx-runtime";
18555
18537
  var StyledSplitButton = styled110.span`
18556
18538
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
@@ -18615,7 +18597,7 @@ var SplitButton = ({
18615
18597
  children: menuItems
18616
18598
  }
18617
18599
  ),
18618
- isNotNil45(secondaryAction) && cloneElement9(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18600
+ isNotNil45(secondaryAction) && cloneElement10(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18619
18601
  ] });
18620
18602
  };
18621
18603
  SplitButton.displayName = "SplitButton_UI";