@wistia/vhs 3.0.0 → 3.0.1-beta.5af3ebb3.c232538

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 CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/vhs v3.0.0
3
+ * @license @wistia/vhs v3.0.1-beta.5af3ebb3.c232538
4
4
  *
5
5
  * Copyright (c) 2021-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -6682,45 +6682,39 @@ var ButtonLink = (0, import_react35.forwardRef)(
6682
6682
  }
6683
6683
  return null;
6684
6684
  };
6685
- return (
6686
- // @ts-expect-error FIXME
6687
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
6688
- StyledButtonLink,
6689
- {
6690
- ref,
6691
- $buttonColor: buttonColor,
6692
- $forceState: forceState,
6693
- $fullWidth: fullWidth,
6694
- $icon: icon,
6695
- $iconPosition: iconPosition,
6696
- $isLoading: false,
6697
- $labelWrap: labelWrap,
6698
- $size: size,
6699
- $square: square,
6700
- $textAlign: textAlign,
6701
- $variant: variant,
6702
- beforeAction,
6703
- disabled,
6704
- href,
6705
- params,
6706
- type,
6707
- unstyled: true,
6708
- ...otherProps,
6709
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
6710
- ButtonContent,
6711
- {
6712
- icon,
6713
- iconName,
6714
- iconPosition,
6715
- isLoading: false,
6716
- size,
6717
- textAlign,
6718
- children: getContent()
6719
- }
6720
- )
6721
- }
6722
- )
6723
- );
6685
+ const styledProps = {
6686
+ ref,
6687
+ $buttonColor: buttonColor,
6688
+ $forceState: forceState,
6689
+ $fullWidth: fullWidth,
6690
+ $icon: icon,
6691
+ $iconPosition: iconPosition,
6692
+ $isLoading: false,
6693
+ $labelWrap: labelWrap,
6694
+ $size: size,
6695
+ $square: square,
6696
+ $textAlign: textAlign,
6697
+ $variant: variant,
6698
+ beforeAction,
6699
+ disabled,
6700
+ href,
6701
+ params,
6702
+ type,
6703
+ unstyled: true,
6704
+ ...otherProps
6705
+ };
6706
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(StyledButtonLink, { ...styledProps, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
6707
+ ButtonContent,
6708
+ {
6709
+ icon,
6710
+ iconName,
6711
+ iconPosition,
6712
+ isLoading: false,
6713
+ size,
6714
+ textAlign,
6715
+ children: getContent()
6716
+ }
6717
+ ) });
6724
6718
  }
6725
6719
  );
6726
6720
  ButtonLink.displayName = "ButtonLink_VHS";
@@ -11075,10 +11069,7 @@ var MenuItem = ({
11075
11069
  variant = "primary",
11076
11070
  ...props
11077
11071
  }) => {
11078
- let as = renderAs;
11079
- if ((0, import_type_guards58.isUndefined)(renderAs)) {
11080
- as = (0, import_type_guards58.isNotUndefined)(href) ? "a" : "div";
11081
- }
11072
+ const as = renderAs ?? ((0, import_type_guards58.isNotUndefined)(href) ? "a" : "div");
11082
11073
  const targetProp = as === "a" && (0, import_type_guards58.isNonEmptyString)(target) ? { target } : {};
11083
11074
  return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
11084
11075
  import_react_dropdown_menu2.DropdownMenuItem,
@@ -13479,32 +13470,26 @@ var Slider = ({
13479
13470
  );
13480
13471
  },
13481
13472
  renderThumb: (thumbProps, thumbState) => {
13482
- const { key, ...restProps } = thumbProps;
13483
- return (
13484
- // @ts-expect-error complains about styled-components `as` prop
13485
- /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
13486
- StyledThumb,
13487
- {
13488
- ...restProps,
13489
- "data-testid": `${dataTestId}-thumb-${thumbState.index}`
13490
- },
13491
- key
13492
- )
13473
+ const { key, as, ...restProps } = thumbProps;
13474
+ return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
13475
+ StyledThumb,
13476
+ {
13477
+ ...restProps,
13478
+ "data-testid": `${dataTestId}-thumb-${thumbState.index}`
13479
+ },
13480
+ key
13493
13481
  );
13494
13482
  },
13495
13483
  renderTrack: (trackProps, trackState) => {
13496
- const { key, ...restProps } = trackProps;
13497
- return (
13498
- // @ts-expect-error complains about styled-components `as` prop
13499
- /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
13500
- StyledTrack,
13501
- {
13502
- ...restProps,
13503
- $isFilledTrack: checkIfFilledTrack(trackState),
13504
- "data-testid": `${dataTestId}-track-${trackState.index}`
13505
- },
13506
- key
13507
- )
13484
+ const { key, as, ...restProps } = trackProps;
13485
+ return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
13486
+ StyledTrack,
13487
+ {
13488
+ ...restProps,
13489
+ $isFilledTrack: checkIfFilledTrack(trackState),
13490
+ "data-testid": `${dataTestId}-track-${trackState.index}`
13491
+ },
13492
+ key
13508
13493
  );
13509
13494
  },
13510
13495
  step,