@wistia/ui 0.18.14-beta.3d78b4cc.f1b5721 → 0.18.14-beta.3fb5e567.ffae32b

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 { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, AnchorHTMLAttributes, ForwardRefExoticComponent, RefAttributes, MouseEvent, ReactElement, ElementType, ChangeEvent, PropsWithChildren, InputHTMLAttributes, Ref, SyntheticEvent, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, 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';
@@ -268,7 +268,7 @@ type LinkProps = LinkAsButtonProps | LinkAsLinkProps;
268
268
  * This means in addition to its own props, `Link` can use props from `react-router`'s `Link` component. View their documentation [here](https://reactrouter.com/en/main/components/link).
269
269
  * The one prop we ignore from react-router is `to`. We use `href` instead and map it under the hood.
270
270
  */
271
- declare const Link: ForwardRefExoticComponent<(Omit<LinkAsLinkProps, "ref"> | Omit<LinkAsButtonProps, "ref">) & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
271
+ declare const Link: react.ForwardRefExoticComponent<(Omit<LinkAsLinkProps, "ref"> | Omit<LinkAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
272
272
 
273
273
  type Breakpoints = 'isLgAndDown' | 'isLgAndUp' | 'isMdAndDown' | 'isMdAndUp' | 'isSmAndDown' | 'isSmAndUp' | 'isXlAndDown' | 'isXlAndUp' | 'isXsAndDown' | 'isXsAndUp';
274
274
  type AtLeastOneBreakpoint<T, U = {
@@ -1723,7 +1723,7 @@ declare const DataCard: {
1723
1723
  displayName: string;
1724
1724
  };
1725
1725
 
1726
- type DataCardsProps = ComponentPropsWithoutRef<'dl'> & {
1726
+ type DataCardsProps = ComponentPropsWithoutRef<'div'> & {
1727
1727
  /**
1728
1728
  * Should be at least one `DataCard` component
1729
1729
  */
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, AnchorHTMLAttributes, ForwardRefExoticComponent, RefAttributes, MouseEvent, ReactElement, ElementType, ChangeEvent, PropsWithChildren, InputHTMLAttributes, Ref, SyntheticEvent, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, 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';
@@ -268,7 +268,7 @@ type LinkProps = LinkAsButtonProps | LinkAsLinkProps;
268
268
  * This means in addition to its own props, `Link` can use props from `react-router`'s `Link` component. View their documentation [here](https://reactrouter.com/en/main/components/link).
269
269
  * The one prop we ignore from react-router is `to`. We use `href` instead and map it under the hood.
270
270
  */
271
- declare const Link: ForwardRefExoticComponent<(Omit<LinkAsLinkProps, "ref"> | Omit<LinkAsButtonProps, "ref">) & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
271
+ declare const Link: react.ForwardRefExoticComponent<(Omit<LinkAsLinkProps, "ref"> | Omit<LinkAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
272
272
 
273
273
  type Breakpoints = 'isLgAndDown' | 'isLgAndUp' | 'isMdAndDown' | 'isMdAndUp' | 'isSmAndDown' | 'isSmAndUp' | 'isXlAndDown' | 'isXlAndUp' | 'isXsAndDown' | 'isXsAndUp';
274
274
  type AtLeastOneBreakpoint<T, U = {
@@ -1723,7 +1723,7 @@ declare const DataCard: {
1723
1723
  displayName: string;
1724
1724
  };
1725
1725
 
1726
- type DataCardsProps = ComponentPropsWithoutRef<'dl'> & {
1726
+ type DataCardsProps = ComponentPropsWithoutRef<'div'> & {
1727
1727
  /**
1728
1728
  * Should be at least one `DataCard` component
1729
1729
  */
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.18.14-beta.3d78b4cc.f1b5721
3
+ * @license @wistia/ui v0.18.14-beta.3fb5e567.ffae32b
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7762,19 +7762,9 @@ Icon.displayName = "Icon_UI";
7762
7762
  // src/components/Link/Link.tsx
7763
7763
  import { forwardRef } from "react";
7764
7764
  import { styled as styled5 } from "styled-components";
7765
+ import { Link as RouterLink, useInRouterContext } from "react-router";
7765
7766
  import { isFunction as isFunction2, isNil as isNil6, isNotNil as isNotNil5, isNotUndefined as isNotUndefined3, isUndefined as isUndefined2 } from "@wistia/type-guards";
7766
7767
  import { jsx as jsx207, jsxs as jsxs10 } from "react/jsx-runtime";
7767
- var RouterLink = null;
7768
- var useInRouterContext = () => false;
7769
- var isRouterEnabled = false;
7770
- import("react-router").then((module) => {
7771
- RouterLink = module.Link;
7772
- useInRouterContext = module.useInRouterContext;
7773
- isRouterEnabled = true;
7774
- return module;
7775
- }).catch(() => {
7776
- isRouterEnabled = false;
7777
- });
7778
7768
  var generateHref = (href, type, disabled) => {
7779
7769
  if (disabled || isNil6(href)) {
7780
7770
  return void 0;
@@ -7833,9 +7823,9 @@ var Link = forwardRef(
7833
7823
  role,
7834
7824
  ...props
7835
7825
  }, ref) => {
7836
- const isInRouterContext = useInRouterContext();
7826
+ const inRouterContext = useInRouterContext();
7837
7827
  const to = generateHref(props.href, type, disabled);
7838
- const shouldUseReactRouterLink = isInRouterContext && isRouterEnabled && type !== "external" && !to?.startsWith("http");
7828
+ const shouldUseReactRouterLink = inRouterContext && type !== "external" && !to?.startsWith("http");
7839
7829
  const handleClick = async (event) => {
7840
7830
  if (disabled) {
7841
7831
  event.preventDefault();
@@ -7884,6 +7874,7 @@ var Link = forwardRef(
7884
7874
  const externalLinkProps = type === "external" ? { target: "_blank", rel: "noopener noreferrer" } : null;
7885
7875
  const routerSpecificProps = shouldUseReactRouterLink ? {
7886
7876
  // TODO: Using 'any' here due to styled-components typing limitations with RouterLink
7877
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
7887
7878
  as: RouterLink,
7888
7879
  to: to ?? ""
7889
7880
  } : {
@@ -10193,9 +10184,9 @@ var isClickableElement = (element) => {
10193
10184
  };
10194
10185
  var ClickRegion = ({ children, targetRef }) => {
10195
10186
  useEffect9(() => {
10196
- if (targetRef.current && targetRef.current.tagName === "A") {
10187
+ if (targetRef.current?.tagName === "A") {
10197
10188
  targetRef.current.setAttribute("data-click-region-target-link", "");
10198
- } else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
10189
+ } else if (targetRef.current?.tagName === "BUTTON") {
10199
10190
  targetRef.current.setAttribute("data-click-region-target-button", "");
10200
10191
  } else {
10201
10192
  }