@wistia/ui 0.18.14-beta.3d78b4cc.f1b5721 → 0.18.14-beta.4c71661a.d6acc83

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 = {
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 = {
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.4c71661a.d6acc83
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/
@@ -7762,19 +7760,9 @@ Icon.displayName = "Icon_UI";
7762
7760
  // src/components/Link/Link.tsx
7763
7761
  import { forwardRef } from "react";
7764
7762
  import { styled as styled5 } from "styled-components";
7763
+ import { Link as RouterLink, useInRouterContext } from "react-router";
7765
7764
  import { isFunction as isFunction2, isNil as isNil6, isNotNil as isNotNil5, isNotUndefined as isNotUndefined3, isUndefined as isUndefined2 } from "@wistia/type-guards";
7766
7765
  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
7766
  var generateHref = (href, type, disabled) => {
7779
7767
  if (disabled || isNil6(href)) {
7780
7768
  return void 0;
@@ -7833,9 +7821,9 @@ var Link = forwardRef(
7833
7821
  role,
7834
7822
  ...props
7835
7823
  }, ref) => {
7836
- const isInRouterContext = useInRouterContext();
7824
+ const inRouterContext = useInRouterContext();
7837
7825
  const to = generateHref(props.href, type, disabled);
7838
- const shouldUseReactRouterLink = isInRouterContext && isRouterEnabled && type !== "external" && !to?.startsWith("http");
7826
+ const shouldUseReactRouterLink = inRouterContext && type !== "external" && !to?.startsWith("http");
7839
7827
  const handleClick = async (event) => {
7840
7828
  if (disabled) {
7841
7829
  event.preventDefault();
@@ -7884,6 +7872,7 @@ var Link = forwardRef(
7884
7872
  const externalLinkProps = type === "external" ? { target: "_blank", rel: "noopener noreferrer" } : null;
7885
7873
  const routerSpecificProps = shouldUseReactRouterLink ? {
7886
7874
  // TODO: Using 'any' here due to styled-components typing limitations with RouterLink
7875
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
7887
7876
  as: RouterLink,
7888
7877
  to: to ?? ""
7889
7878
  } : {
@@ -8070,7 +8059,7 @@ var StyledActionButton = styled7(Button)`
8070
8059
  min-width: 96px;
8071
8060
  padding: var(--wui-space-03);
8072
8061
  background: var(--wui-color-bg-surface-secondary);
8073
- grid-row-gap: var(--wui-space-02);
8062
+ row-gap: var(--wui-space-02);
8074
8063
  border-radius: var(--wui-border-radius-03);
8075
8064
  flex: 0 0 auto;
8076
8065
  transition: background-color var(--wui-motion-duration-02) var(--wui-motion-ease);
@@ -10193,9 +10182,9 @@ var isClickableElement = (element) => {
10193
10182
  };
10194
10183
  var ClickRegion = ({ children, targetRef }) => {
10195
10184
  useEffect9(() => {
10196
- if (targetRef.current && targetRef.current.tagName === "A") {
10185
+ if (targetRef.current?.tagName === "A") {
10197
10186
  targetRef.current.setAttribute("data-click-region-target-link", "");
10198
- } else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
10187
+ } else if (targetRef.current?.tagName === "BUTTON") {
10199
10188
  targetRef.current.setAttribute("data-click-region-target-button", "");
10200
10189
  } else {
10201
10190
  }
@@ -12303,7 +12292,9 @@ var Root = styled48(SliderRoot)`
12303
12292
  var Track = styled48(SliderTrack)`
12304
12293
  width: 100%;
12305
12294
  `;
12306
- var Thumb = styled48(SliderThumb)``;
12295
+ var Thumb = styled48(SliderThumb)`
12296
+ position: relative;
12297
+ `;
12307
12298
  var ThumbInner = styled48.div`
12308
12299
  cursor: pointer;
12309
12300
  display: block;
@@ -13541,8 +13532,12 @@ MenuItemButton.displayName = "MenuItemButton_UI";
13541
13532
  // src/components/Menu/MenuItemLabelDescription.tsx
13542
13533
  import { styled as styled56 } from "styled-components";
13543
13534
  import { jsx as jsx269 } from "react/jsx-runtime";
13544
- var StyledMenuItemLabel = styled56.span``;
13545
- var StyledMenuItemDescription = styled56(Text)``;
13535
+ var StyledMenuItemLabel = styled56.span`
13536
+ /* avoid no-empty-source rule */
13537
+ `;
13538
+ var StyledMenuItemDescription = styled56(Text)`
13539
+ /* avoid no-empty-source rule */
13540
+ `;
13546
13541
  var MenuItemLabel = ({ children }) => {
13547
13542
  return /* @__PURE__ */ jsx269(StyledMenuItemLabel, { children });
13548
13543
  };
@@ -14674,7 +14669,8 @@ var StyledEditableTextDisplay = styled66.div`
14674
14669
  ${({ $minLines }) => isNotNil26($minLines) && css35`
14675
14670
  min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
14676
14671
  `}
14677
- word-break: break-word;
14672
+ word-break: normal;
14673
+ overflow-wrap: anywhere;
14678
14674
 
14679
14675
  &[data-wui-editable-text-display='placeholder'] {
14680
14676
  color: var(--wui-color-text-secondary);
@@ -17627,7 +17623,9 @@ var TableSectionContext = createContext11(null);
17627
17623
 
17628
17624
  // src/components/Table/TableBody.tsx
17629
17625
  import { jsx as jsx323 } from "react/jsx-runtime";
17630
- var StyledTableBody = styled98.tbody``;
17626
+ var StyledTableBody = styled98.tbody`
17627
+ width: 100%;
17628
+ `;
17631
17629
  var TableBody = ({ children, ...props }) => {
17632
17630
  return /* @__PURE__ */ jsx323(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx323(StyledTableBody, { ...props, children }) });
17633
17631
  };
@@ -17664,7 +17662,9 @@ var TableCell = ({ children, ...props }) => {
17664
17662
  // src/components/Table/TableFoot.tsx
17665
17663
  import { styled as styled100 } from "styled-components";
17666
17664
  import { jsx as jsx325 } from "react/jsx-runtime";
17667
- var StyledTableFoot = styled100.tfoot``;
17665
+ var StyledTableFoot = styled100.tfoot`
17666
+ width: 100%;
17667
+ `;
17668
17668
  var TableFoot = ({ children, ...props }) => {
17669
17669
  return /* @__PURE__ */ jsx325(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx325(StyledTableFoot, { ...props, children }) });
17670
17670
  };
@@ -17672,7 +17672,9 @@ var TableFoot = ({ children, ...props }) => {
17672
17672
  // src/components/Table/TableHead.tsx
17673
17673
  import { styled as styled101 } from "styled-components";
17674
17674
  import { jsx as jsx326 } from "react/jsx-runtime";
17675
- var StyledThead = styled101.thead``;
17675
+ var StyledThead = styled101.thead`
17676
+ width: 100%;
17677
+ `;
17676
17678
  var TableHead = ({ children, ...props }) => {
17677
17679
  return /* @__PURE__ */ jsx326(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx326(StyledThead, { ...props, children }) });
17678
17680
  };
@@ -17680,7 +17682,9 @@ var TableHead = ({ children, ...props }) => {
17680
17682
  // src/components/Table/TableRow.tsx
17681
17683
  import { styled as styled102 } from "styled-components";
17682
17684
  import { jsx as jsx327 } from "react/jsx-runtime";
17683
- var StyledTableRow = styled102.tr``;
17685
+ var StyledTableRow = styled102.tr`
17686
+ width: 100%;
17687
+ `;
17684
17688
  var TableRow = ({ children, ...props }) => {
17685
17689
  return /* @__PURE__ */ jsx327(StyledTableRow, { ...props, children });
17686
17690
  };