@wistia/ui 0.6.42 → 0.6.43-beta.093c5cd5.2322c72

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/ui v0.6.42
3
+ * @license @wistia/ui v0.6.43-beta.093c5cd5.2322c72
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -2363,11 +2363,11 @@ var EllipsisComponent = import_styled_components13.default.span`
2363
2363
  return void 0;
2364
2364
  }}
2365
2365
  `;
2366
- var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2366
+ var Ellipsis = ({ children, lines, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2367
2367
  EllipsisComponent,
2368
2368
  {
2369
2369
  $lines: lines,
2370
- ...otherProps,
2370
+ ...props,
2371
2371
  children
2372
2372
  }
2373
2373
  );
@@ -6934,7 +6934,7 @@ var Icon = ({
6934
6934
  size = "lg",
6935
6935
  style,
6936
6936
  type,
6937
- ...otherProps
6937
+ ...props
6938
6938
  }) => {
6939
6939
  const responsiveSize = useResponsiveProp(size);
6940
6940
  if ((0, import_type_guards13.isNil)(type)) {
@@ -6966,7 +6966,7 @@ var Icon = ({
6966
6966
  viewBox: "0 0 24 24",
6967
6967
  width: `${iconSizeMap[responsiveSize]}px`,
6968
6968
  xmlns: "http://www.w3.org/2000/svg",
6969
- ...otherProps,
6969
+ ...props,
6970
6970
  color: iconColor
6971
6971
  }
6972
6972
  );
@@ -7414,13 +7414,13 @@ var ColorSchemeWrapper = ({
7414
7414
  __nav = false,
7415
7415
  colorScheme = "inherit",
7416
7416
  children,
7417
- ...otherProps
7417
+ ...props
7418
7418
  }) => /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
7419
7419
  StyledColorSchemeWrapper,
7420
7420
  {
7421
7421
  $colorScheme: colorScheme,
7422
7422
  $nav: __nav,
7423
- ...otherProps,
7423
+ ...props,
7424
7424
  children
7425
7425
  }
7426
7426
  );
@@ -7513,7 +7513,7 @@ var Avatar = ({
7513
7513
  name,
7514
7514
  size = "md",
7515
7515
  onImageLoad,
7516
- ...otherProps
7516
+ ...props
7517
7517
  }) => {
7518
7518
  const [imageLoadState, setImageLoadState] = (0, import_react18.useState)("loading");
7519
7519
  (0, import_react18.useEffect)(() => {
@@ -7533,7 +7533,7 @@ var Avatar = ({
7533
7533
  return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
7534
7534
  AvatarWrapper,
7535
7535
  {
7536
- ...otherProps,
7536
+ ...props,
7537
7537
  $maxHeight: avatarSize,
7538
7538
  children: showInitials ? /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
7539
7539
  InitialsContainer,
@@ -7583,13 +7583,13 @@ var StyledBadge = import_styled_components24.default.div`
7583
7583
  }
7584
7584
  `;
7585
7585
  var Badge = (0, import_react19.forwardRef)(
7586
- ({ colorScheme = "inherit", label, icon, ...otherProps }, ref) => {
7586
+ ({ colorScheme = "inherit", label, icon, ...props }, ref) => {
7587
7587
  const hasIcon = (0, import_type_guards18.isNotNil)(icon);
7588
7588
  return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
7589
7589
  StyledBadge,
7590
7590
  {
7591
7591
  ref,
7592
- ...otherProps,
7592
+ ...props,
7593
7593
  $colorScheme: colorScheme,
7594
7594
  $hasIcon: hasIcon,
7595
7595
  children: [
@@ -7749,7 +7749,7 @@ var BoxComponent = (0, import_react20.forwardRef)(
7749
7749
  width,
7750
7750
  wrapItems = false,
7751
7751
  flexMode,
7752
- ...otherProps
7752
+ ...props
7753
7753
  }, ref) => {
7754
7754
  if ((0, import_type_guards19.isNotUndefined)(height)) {
7755
7755
  if (fill === true || fill === "vertical") {
@@ -7793,7 +7793,7 @@ var BoxComponent = (0, import_react20.forwardRef)(
7793
7793
  $width: width,
7794
7794
  $wrapItems: wrapItems,
7795
7795
  as: renderAs ?? DEFAULT_ELEMENT,
7796
- ...otherProps,
7796
+ ...props,
7797
7797
  children: wrapChildren(children)
7798
7798
  }
7799
7799
  );
@@ -7930,7 +7930,7 @@ var ButtonGroup = ({
7930
7930
  align = "left",
7931
7931
  fullWidth = false,
7932
7932
  collapseOnSmallScreens = true,
7933
- ...otherProps
7933
+ ...props
7934
7934
  }) => {
7935
7935
  if ((0, import_type_guards20.isNil)(children)) {
7936
7936
  return null;
@@ -7941,7 +7941,7 @@ var ButtonGroup = ({
7941
7941
  $align: align,
7942
7942
  $collapse: collapseOnSmallScreens,
7943
7943
  $fullWidth: fullWidth,
7944
- ...otherProps,
7944
+ ...props,
7945
7945
  children
7946
7946
  }
7947
7947
  );
@@ -8093,13 +8093,13 @@ var ScreenReaderOnly = ({
8093
8093
  text,
8094
8094
  children,
8095
8095
  focusable = false,
8096
- ...otherProps
8096
+ ...props
8097
8097
  }) => {
8098
8098
  const accessibleText = (0, import_type_guards22.isNotNil)(text) ? text : children;
8099
8099
  if (focusable) {
8100
- return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
8100
+ return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHiddenButFocusable, { ...props, children: accessibleText });
8101
8101
  }
8102
- return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
8102
+ return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHidden, { ...props, children: accessibleText });
8103
8103
  };
8104
8104
  ScreenReaderOnly.displayName = "ScreenReaderOnly";
8105
8105
 
@@ -8503,7 +8503,7 @@ var HeadingComponent = (0, import_react26.forwardRef)(
8503
8503
  preventUserSelect = false,
8504
8504
  variant = "heading1",
8505
8505
  renderAs,
8506
- ...otherProps
8506
+ ...props
8507
8507
  }, ref) => /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
8508
8508
  StyledHeading,
8509
8509
  {
@@ -8516,7 +8516,7 @@ var HeadingComponent = (0, import_react26.forwardRef)(
8516
8516
  $preventUserSelect: preventUserSelect,
8517
8517
  $variant: variant,
8518
8518
  as: renderAs ?? variantElementMap[variant],
8519
- ...otherProps
8519
+ ...props
8520
8520
  }
8521
8521
  )
8522
8522
  );
@@ -8834,7 +8834,7 @@ var TextComponent = (0, import_react27.forwardRef)(
8834
8834
  prominence = "primary",
8835
8835
  variant = "body2",
8836
8836
  renderAs,
8837
- ...otherProps
8837
+ ...props
8838
8838
  }, ref) => {
8839
8839
  return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
8840
8840
  StyledText,
@@ -8849,7 +8849,7 @@ var TextComponent = (0, import_react27.forwardRef)(
8849
8849
  $prominence: prominence,
8850
8850
  $variant: variant,
8851
8851
  as: renderAs ?? variantElementMap2[variant],
8852
- ...otherProps
8852
+ ...props
8853
8853
  }
8854
8854
  );
8855
8855
  }
@@ -8921,17 +8921,14 @@ var DividerComponent = import_styled_components42.default.div`
8921
8921
  }
8922
8922
  }}
8923
8923
  `;
8924
- var Divider = ({
8925
- orientation = "horizontal",
8926
- ...otherProps
8927
- }) => {
8924
+ var Divider = ({ orientation = "horizontal", ...props }) => {
8928
8925
  return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
8929
8926
  DividerComponent,
8930
8927
  {
8931
8928
  $orientation: orientation,
8932
8929
  "aria-orientation": orientation,
8933
8930
  role: "separator",
8934
- ...otherProps
8931
+ ...props
8935
8932
  }
8936
8933
  );
8937
8934
  };
@@ -9061,6 +9058,7 @@ var inputCssVariables = import_styled_components44.css`
9061
9058
  --wui-input-color-border-focus: var(--wui-color-focus-ring);
9062
9059
  --wui-input-color-border-error: var(--wui-color-invalid-indicator);
9063
9060
  --wui-input-color-border-disabled: var(--wui-color-border-disabled);
9061
+ --wui-input-color-text: var(--wui-color-text);
9064
9062
  --wui-input-border-radius: var(--wui-border-radius-03);
9065
9063
  --wui-input-multiline-border-radius: var(--wui-border-radius-02);
9066
9064
  --wui-input-vertical-padding: var(--wui-space-02);
@@ -9085,7 +9083,7 @@ var inputStyles = import_styled_components45.css`
9085
9083
  font-size: var(--wui-input-font-size);
9086
9084
  line-height: var(--wui-input-line-height);
9087
9085
  font-weight: var(--wui-typography-weight-body);
9088
- color: var(--wui-color-text-primary);
9086
+ color: var(--wui-input-color-text);
9089
9087
 
9090
9088
  &::placeholder {
9091
9089
  color: var(--wui-input-placeholder);
@@ -9646,12 +9644,12 @@ var Label = ({
9646
9644
  htmlFor,
9647
9645
  required = false,
9648
9646
  screenReaderOnly = false,
9649
- ...otherProps
9647
+ ...props
9650
9648
  }) => {
9651
9649
  return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
9652
9650
  StyledLabel3,
9653
9651
  {
9654
- ...otherProps,
9652
+ ...props,
9655
9653
  $disabled: disabled,
9656
9654
  $required: required,
9657
9655
  $screenReaderOnly: screenReaderOnly,
@@ -9951,7 +9949,7 @@ var Image = ({
9951
9949
  fit: objFit,
9952
9950
  loading = "lazy",
9953
9951
  position: objPosition,
9954
- ...otherProps
9952
+ ...props
9955
9953
  }) => /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
9956
9954
  StyledImage,
9957
9955
  {
@@ -9962,7 +9960,7 @@ var Image = ({
9962
9960
  alt,
9963
9961
  loading,
9964
9962
  src,
9965
- ...otherProps
9963
+ ...props
9966
9964
  }
9967
9965
  );
9968
9966
  Image.displayName = "Image";
@@ -10642,7 +10640,7 @@ var StyledModalContent = (0, import_styled_components61.default)(import_react_di
10642
10640
  }
10643
10641
  `;
10644
10642
  var ModalContent = (0, import_react45.forwardRef)(
10645
- ({ fullHeight, width, children, ...otherProps }, ref) => {
10643
+ ({ fullHeight, width, children, ...props }, ref) => {
10646
10644
  useFocusRestore();
10647
10645
  return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
10648
10646
  StyledModalContent,
@@ -10651,7 +10649,7 @@ var ModalContent = (0, import_react45.forwardRef)(
10651
10649
  $fullHeight: fullHeight,
10652
10650
  $width: width,
10653
10651
  "aria-describedby": void 0,
10654
- ...otherProps,
10652
+ ...props,
10655
10653
  children
10656
10654
  }
10657
10655
  );
@@ -11384,9 +11382,9 @@ var StyledTrigger = (0, import_styled_components70.default)(import_react_select.
11384
11382
  justify-content: space-between;
11385
11383
  max-width: 100%;
11386
11384
  width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
11387
- color: var(--wui-input-color-text);
11388
11385
  font-size: var(--wui-input-font-size);
11389
11386
  line-height: var(--wui-input-line-height);
11387
+ color: var(--wui-input-color-text);
11390
11388
 
11391
11389
  > span {
11392
11390
  white-space: nowrap;
@@ -11408,7 +11406,7 @@ var StyledTrigger = (0, import_styled_components70.default)(import_react_select.
11408
11406
  background-color: var(--wui-color-bg-surface-disabled);
11409
11407
  }
11410
11408
 
11411
- [data-placeholder] {
11409
+ &[data-placeholder] {
11412
11410
  color: var(--wui-input-placeholder);
11413
11411
  }
11414
11412
  `;
@@ -11454,13 +11452,7 @@ var Select = (0, import_react54.forwardRef)(
11454
11452
  $fullWidth: responsiveFullWidth,
11455
11453
  ...props,
11456
11454
  children: [
11457
- /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
11458
- import_react_select.Value,
11459
- {
11460
- "data-placeholder": placeholder,
11461
- placeholder
11462
- }
11463
- ),
11455
+ /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Value, { placeholder }),
11464
11456
  /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
11465
11457
  Icon,
11466
11458
  {
@@ -11487,6 +11479,7 @@ Select.displayName = "Select";
11487
11479
  var import_react_select2 = require("@radix-ui/react-select");
11488
11480
  var import_react55 = require("react");
11489
11481
  var import_styled_components71 = __toESM(require("styled-components"));
11482
+ var import_type_guards43 = require("@wistia/type-guards");
11490
11483
  var import_jsx_runtime252 = require("react/jsx-runtime");
11491
11484
  var StyledItem = (0, import_styled_components71.default)(import_react_select2.Item)`
11492
11485
  ${variantStyleMap2.body3};
@@ -11516,21 +11509,24 @@ var StyledIconContainer = import_styled_components71.default.span`
11516
11509
  width: 12px;
11517
11510
  `;
11518
11511
  var SelectOption = (0, import_react55.forwardRef)(
11519
- ({ children, ...props }, forwardedRef) => {
11512
+ ({ children, selectedDisplayValue, ...props }, forwardedRef) => {
11520
11513
  return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
11521
11514
  StyledItem,
11522
11515
  {
11523
11516
  ...props,
11524
11517
  ref: forwardedRef,
11525
11518
  children: [
11526
- /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
11519
+ /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledIconContainer, { "data-indicator": true, children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
11527
11520
  Icon,
11528
11521
  {
11529
11522
  size: "sm",
11530
11523
  type: "checkmark"
11531
11524
  }
11532
11525
  ) }) }),
11533
- /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children })
11526
+ (0, import_type_guards43.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)("div", { children: [
11527
+ children,
11528
+ /* @__PURE__ */ (0, import_jsx_runtime252.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
11529
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children })
11534
11530
  ]
11535
11531
  }
11536
11532
  );
@@ -11562,7 +11558,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
11562
11558
  // src/components/Switch/Switch.tsx
11563
11559
  var import_react56 = require("react");
11564
11560
  var import_styled_components73 = __toESM(require("styled-components"));
11565
- var import_type_guards43 = require("@wistia/type-guards");
11561
+ var import_type_guards44 = require("@wistia/type-guards");
11566
11562
  var import_jsx_runtime254 = require("react/jsx-runtime");
11567
11563
  var sizeSmall3 = import_styled_components73.css`
11568
11564
  --wui-size-small-width: 24px;
@@ -11681,7 +11677,7 @@ var Switch = (0, import_react56.forwardRef)(
11681
11677
  ...props
11682
11678
  }, ref) => {
11683
11679
  const generatedId = (0, import_react56.useId)();
11684
- const computedId = (0, import_type_guards43.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
11680
+ const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
11685
11681
  return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
11686
11682
  /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
11687
11683
  StyledHiddenSwitchInput,
@@ -11828,7 +11824,7 @@ var TableRow = ({ children, ...props }) => {
11828
11824
  // src/components/Tabs/Tabs.tsx
11829
11825
  var import_react63 = require("react");
11830
11826
  var import_react_tabs4 = require("@radix-ui/react-tabs");
11831
- var import_type_guards45 = require("@wistia/type-guards");
11827
+ var import_type_guards46 = require("@wistia/type-guards");
11832
11828
  var import_styled_components84 = __toESM(require("styled-components"));
11833
11829
 
11834
11830
  // src/components/Tabs/TabPanel.tsx
@@ -11884,7 +11880,7 @@ TabList.displayName = "TabList";
11884
11880
  var import_react60 = require("react");
11885
11881
  var import_styled_components82 = __toESM(require("styled-components"));
11886
11882
  var import_react_tabs3 = require("@radix-ui/react-tabs");
11887
- var import_type_guards44 = require("@wistia/type-guards");
11883
+ var import_type_guards45 = require("@wistia/type-guards");
11888
11884
 
11889
11885
  // src/components/Tabs/useTabsValue.tsx
11890
11886
  var import_react59 = require("react");
@@ -11942,8 +11938,8 @@ var TabItem = (0, import_react60.forwardRef)(
11942
11938
  StyledTabItem,
11943
11939
  {
11944
11940
  ref: combinedRef,
11945
- $hasLabel: (0, import_type_guards44.isNotNil)(label),
11946
- "aria-label": (0, import_type_guards44.isNotNil)(label) ? void 0 : ariaLabel,
11941
+ $hasLabel: (0, import_type_guards45.isNotNil)(label),
11942
+ "aria-label": (0, import_type_guards45.isNotNil)(label) ? void 0 : ariaLabel,
11947
11943
  disabled,
11948
11944
  value,
11949
11945
  children: [
@@ -12040,7 +12036,7 @@ var Tabs = (0, import_react63.forwardRef)(
12040
12036
  selectedValue,
12041
12037
  onSelectedValueChange,
12042
12038
  stickyHeaders = true,
12043
- ...otherProps
12039
+ ...props
12044
12040
  }, ref) => {
12045
12041
  const tabItems = extractTabItems(children);
12046
12042
  const [internalSelectedValue, setInternalSelectedValue] = (0, import_react63.useState)(defaultSelectedValue);
@@ -12055,7 +12051,7 @@ var Tabs = (0, import_react63.forwardRef)(
12055
12051
  ref,
12056
12052
  $stickyHeaders: stickyHeaders,
12057
12053
  activationMode: "automatic",
12058
- ...otherProps,
12054
+ ...props,
12059
12055
  ...modeProps,
12060
12056
  children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(SelectedItemMeasurementsProvider, { children: [
12061
12057
  /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(
@@ -12073,7 +12069,7 @@ var Tabs = (0, import_react63.forwardRef)(
12073
12069
  label,
12074
12070
  "aria-label": ariaLabelForTab
12075
12071
  } = tab.props;
12076
- if ((0, import_type_guards45.isNil)(icon)) {
12072
+ if ((0, import_type_guards46.isNil)(icon)) {
12077
12073
  return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
12078
12074
  TabItem,
12079
12075
  {
@@ -12084,7 +12080,7 @@ var Tabs = (0, import_react63.forwardRef)(
12084
12080
  value
12085
12081
  );
12086
12082
  }
12087
- if ((0, import_type_guards45.isNotNil)(label)) {
12083
+ if ((0, import_type_guards46.isNotNil)(label)) {
12088
12084
  return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
12089
12085
  TabItem,
12090
12086
  {
@@ -12096,7 +12092,7 @@ var Tabs = (0, import_react63.forwardRef)(
12096
12092
  value
12097
12093
  );
12098
12094
  }
12099
- if ((0, import_type_guards45.isNotNil)(ariaLabelForTab)) {
12095
+ if ((0, import_type_guards46.isNotNil)(ariaLabelForTab)) {
12100
12096
  return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
12101
12097
  TabItem,
12102
12098
  {
@@ -12139,7 +12135,7 @@ Tab.displayName = "Tab";
12139
12135
  // src/components/Tag/Tag.tsx
12140
12136
  var import_react65 = require("react");
12141
12137
  var import_styled_components85 = __toESM(require("styled-components"));
12142
- var import_type_guards46 = require("@wistia/type-guards");
12138
+ var import_type_guards47 = require("@wistia/type-guards");
12143
12139
  var import_jsx_runtime267 = require("react/jsx-runtime");
12144
12140
  var TagLabel = import_styled_components85.default.a`
12145
12141
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
@@ -12224,10 +12220,10 @@ var StyledTag = import_styled_components85.default.div`
12224
12220
  }
12225
12221
  `;
12226
12222
  var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
12227
- if ((0, import_type_guards46.isNil)(onClickRemove)) {
12223
+ if ((0, import_type_guards47.isNil)(onClickRemove)) {
12228
12224
  return null;
12229
12225
  }
12230
- if ((0, import_type_guards46.isNil)(onClickRemoveLabel)) {
12226
+ if ((0, import_type_guards47.isNil)(onClickRemoveLabel)) {
12231
12227
  throw new Error(
12232
12228
  "for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
12233
12229
  );
@@ -12255,23 +12251,15 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
12255
12251
  ] });
12256
12252
  };
12257
12253
  var Tag = (0, import_react65.forwardRef)(
12258
- ({
12259
- onClickRemove,
12260
- colorScheme = "inherit",
12261
- href,
12262
- icon,
12263
- label,
12264
- onClickRemoveLabel,
12265
- ...otherProps
12266
- }, ref) => {
12267
- const hasIcon = (0, import_type_guards46.isNotNil)(icon);
12268
- const labelProps = (0, import_type_guards46.isNotNil)(href) && (0, import_type_guards46.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
12254
+ ({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
12255
+ const hasIcon = (0, import_type_guards47.isNotNil)(icon);
12256
+ const labelProps = (0, import_type_guards47.isNotNil)(href) && (0, import_type_guards47.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
12269
12257
  return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
12270
12258
  StyledTag,
12271
12259
  {
12272
12260
  ref,
12273
12261
  $colorScheme: colorScheme,
12274
- ...otherProps,
12262
+ ...props,
12275
12263
  children: [
12276
12264
  /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
12277
12265
  TagLabel,
@@ -12301,7 +12289,7 @@ Tag.displayName = "Tag";
12301
12289
 
12302
12290
  // src/components/WistiaLogo/WistiaLogo.tsx
12303
12291
  var import_styled_components86 = __toESM(require("styled-components"));
12304
- var import_type_guards47 = require("@wistia/type-guards");
12292
+ var import_type_guards48 = require("@wistia/type-guards");
12305
12293
  var import_jsx_runtime268 = require("react/jsx-runtime");
12306
12294
  var renderBrandmark = (brandmarkColor, iconOnly) => {
12307
12295
  if (iconOnly) {
@@ -12379,7 +12367,7 @@ var WistiaLogo = ({
12379
12367
  opticallyCentered = false,
12380
12368
  title = "Wistia Logo",
12381
12369
  variant = "standard",
12382
- ...otherProps
12370
+ ...props
12383
12371
  }) => {
12384
12372
  const primaryColor = "#2949e5";
12385
12373
  const darkColor = "#000934";
@@ -12411,10 +12399,10 @@ var WistiaLogo = ({
12411
12399
  role: "img",
12412
12400
  viewBox: computedViewBox(iconOnly),
12413
12401
  xmlns: "http://www.w3.org/2000/svg",
12414
- ...otherProps,
12402
+ ...props,
12415
12403
  children: [
12416
12404
  /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("title", { children: title }),
12417
- (0, import_type_guards47.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("desc", { children: description }) : null,
12405
+ (0, import_type_guards48.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("desc", { children: description }) : null,
12418
12406
  renderBrandmark(brandmarkColor, iconOnly),
12419
12407
  renderLogotype(logotypeColor, iconOnly)
12420
12408
  ]
@@ -12426,7 +12414,7 @@ WistiaLogo.displayName = "WistiaLogo";
12426
12414
 
12427
12415
  // src/components/Thumbnail/ThumbnailBadge.tsx
12428
12416
  var import_styled_components87 = __toESM(require("styled-components"));
12429
- var import_type_guards48 = require("@wistia/type-guards");
12417
+ var import_type_guards49 = require("@wistia/type-guards");
12430
12418
  var import_jsx_runtime269 = require("react/jsx-runtime");
12431
12419
  var StyledThumbnailBadge = import_styled_components87.default.div`
12432
12420
  align-items: center;
@@ -12452,13 +12440,9 @@ var StyledThumbnailBadge = import_styled_components87.default.div`
12452
12440
  }
12453
12441
  }
12454
12442
  `;
12455
- var ThumbnailBadge = ({
12456
- icon,
12457
- label,
12458
- ...otherProps
12459
- }) => {
12460
- return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(StyledThumbnailBadge, { ...otherProps, children: [
12461
- (0, import_type_guards48.isNotNil)(icon) && icon,
12443
+ var ThumbnailBadge = ({ icon, label, ...props }) => {
12444
+ return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(StyledThumbnailBadge, { ...props, children: [
12445
+ (0, import_type_guards49.isNotNil)(icon) && icon,
12462
12446
  /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("span", { children: label })
12463
12447
  ] });
12464
12448
  };
@@ -12467,10 +12451,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge";
12467
12451
  // src/components/Thumbnail/Thumbnail.tsx
12468
12452
  var import_react66 = require("react");
12469
12453
  var import_styled_components89 = __toESM(require("styled-components"));
12470
- var import_type_guards50 = require("@wistia/type-guards");
12454
+ var import_type_guards51 = require("@wistia/type-guards");
12471
12455
 
12472
12456
  // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
12473
- var import_type_guards49 = require("@wistia/type-guards");
12457
+ var import_type_guards50 = require("@wistia/type-guards");
12474
12458
  var import_styled_components88 = require("styled-components");
12475
12459
  var gradients = {
12476
12460
  defaultDarkOne: import_styled_components88.css`
@@ -12598,7 +12582,7 @@ var gradients = {
12598
12582
  };
12599
12583
  var gradientMap = Object.keys(gradients);
12600
12584
  var getBackgroundGradient = (gradientName = void 0) => {
12601
- return (0, import_type_guards49.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
12585
+ return (0, import_type_guards50.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
12602
12586
  };
12603
12587
 
12604
12588
  // src/components/Thumbnail/Thumbnail.tsx
@@ -12632,10 +12616,15 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
12632
12616
  );
12633
12617
  };
12634
12618
  var StyledThumbnail = import_styled_components89.default.div`
12635
- ${({ $gradientBackground }) => getBackgroundGradient($gradientBackground)};
12619
+ background-image: ${({ $backgroundUrl }) => (0, import_type_guards51.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
12620
+ ${({ $backgroundUrl, $gradientBackground }) => (
12621
+ // if we don't have $backgroundUrl show a gradient
12622
+ (0, import_type_guards51.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
12623
+ )};
12624
+ background-position: center center;
12625
+ background-size: cover;
12636
12626
  aspect-ratio: 16 / 9;
12637
- background: ${({ $backgroundUrl }) => (0, import_type_guards50.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}') center / cover` : void 0};
12638
- border-radius: 4px;
12627
+ border-radius: var(--wui-border-radius-01);
12639
12628
  display: flex;
12640
12629
  overflow: hidden;
12641
12630
  position: relative;
@@ -12648,9 +12637,9 @@ var Thumbnail = (0, import_react66.forwardRef)(
12648
12637
  thumbnailUrl,
12649
12638
  width = "100%",
12650
12639
  children,
12651
- ...otherProps
12640
+ ...props
12652
12641
  }, ref) => {
12653
- const backgroundUrl = thumbnailImageType === "square" && (0, import_type_guards50.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0;
12642
+ const backgroundUrl = thumbnailImageType === "square" && (0, import_type_guards51.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0;
12654
12643
  return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(
12655
12644
  StyledThumbnail,
12656
12645
  {
@@ -12658,16 +12647,16 @@ var Thumbnail = (0, import_react66.forwardRef)(
12658
12647
  $backgroundUrl: backgroundUrl,
12659
12648
  $gradientBackground: gradientBackground,
12660
12649
  $width: width,
12661
- ...otherProps,
12650
+ ...props,
12662
12651
  children: [
12663
- (0, import_type_guards50.isNotNil)(children) && children,
12664
- (0, import_type_guards50.isNotNil)(thumbnailUrl) && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
12652
+ (0, import_type_guards51.isNotNil)(children) ? children : null,
12653
+ (0, import_type_guards51.isNotNil)(thumbnailUrl) ? /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
12665
12654
  ThumbnailImage,
12666
12655
  {
12667
12656
  thumbnailImageType,
12668
12657
  thumbnailUrl
12669
12658
  }
12670
- )
12659
+ ) : null
12671
12660
  ]
12672
12661
  }
12673
12662
  );