@wistia/ui 0.18.2-beta.ac1bbb95.dea3e8b → 0.18.2-beta.e261b797.373c862

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.18.2-beta.ac1bbb95.dea3e8b
3
+ * @license @wistia/ui v0.18.2-beta.e261b797.373c862
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -6690,13 +6690,13 @@ var SpeedIcon = (props) => /* @__PURE__ */ jsx168(
6690
6690
 
6691
6691
  // src/components/Icon/icons/SpinnerIcon.tsx
6692
6692
  import { jsx as jsx169, jsxs as jsxs7 } from "react/jsx-runtime";
6693
- var SpinnerIcon = (props) => /* @__PURE__ */ jsxs7(
6693
+ var SpinnerIcon = (props) => /* @__PURE__ */ jsx169(
6694
6694
  "svg",
6695
6695
  {
6696
6696
  ...props,
6697
6697
  viewBox: "0 0 24 24",
6698
6698
  xmlns: "http://www.w3.org/2000/svg",
6699
- children: [
6699
+ children: /* @__PURE__ */ jsxs7("g", { children: [
6700
6700
  /* @__PURE__ */ jsx169(
6701
6701
  "path",
6702
6702
  {
@@ -6714,10 +6714,10 @@ var SpinnerIcon = (props) => /* @__PURE__ */ jsxs7(
6714
6714
  keyTimes: "0;1",
6715
6715
  repeatCount: "indefinite",
6716
6716
  type: "rotate",
6717
- values: "0 0 0;360 0 0"
6717
+ values: "0 12 12;360 12 12"
6718
6718
  }
6719
6719
  )
6720
- ]
6720
+ ] })
6721
6721
  }
6722
6722
  );
6723
6723
 
@@ -17588,7 +17588,7 @@ var StyledThumbnailBadge = styled104.div`
17588
17588
  align-items: center;
17589
17589
  background-color: rgb(0 0 0 / 50%);
17590
17590
  border-radius: var(--wui-border-radius-01);
17591
- bottom: var(--wui-thumbnail-badge-offset);
17591
+ bottom: var(--wui-space-01);
17592
17592
  color: var(--wui-color-text-on-fill);
17593
17593
  display: flex;
17594
17594
  font-size: var(--wui-typography-body-4-size);
@@ -17596,7 +17596,7 @@ var StyledThumbnailBadge = styled104.div`
17596
17596
  gap: var(--wui-space-01);
17597
17597
  padding: 0 var(--wui-space-01);
17598
17598
  position: absolute;
17599
- right: var(--wui-thumbnail-badge-offset);
17599
+ right: var(--wui-space-01);
17600
17600
  z-index: 1;
17601
17601
 
17602
17602
  svg {
@@ -17929,17 +17929,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
17929
17929
  }
17930
17930
  );
17931
17931
  };
17932
- var StyledThumbnailContainer = styled106.div`
17933
- container-type: size;
17934
- aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
17935
- width: ${({ $width }) => $width};
17936
- display: flex;
17937
- overflow: hidden;
17938
- ${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
17939
- `;
17940
17932
  var StyledThumbnail = styled106.div`
17941
- --wui-thumbnail-badge-offset: var(--wui-space-01);
17942
-
17943
17933
  background-image: ${({ $backgroundUrl }) => isNotNil43($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17944
17934
  ${({ $backgroundUrl, $gradientBackground }) => (
17945
17935
  // if we don't have $backgroundUrl show a gradient
@@ -17947,14 +17937,21 @@ var StyledThumbnail = styled106.div`
17947
17937
  )};
17948
17938
  background-position: center center;
17949
17939
  background-size: cover;
17940
+ aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
17950
17941
  display: flex;
17951
- width: 100%;
17952
17942
  overflow: hidden;
17953
17943
  position: relative;
17954
- border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
17944
+ width: ${({ $width }) => $width};
17945
+ ${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
17955
17946
 
17956
- @container (min-width: 200px) {
17957
- --wui-thumbnail-badge-offset: var(--wui-space-02);
17947
+ &,
17948
+ img {
17949
+ border-radius: ${({ $aspectRatio }) => {
17950
+ if ($aspectRatio === "square") {
17951
+ return "8%";
17952
+ }
17953
+ return `calc(8% * (9 / 16)) / 8%`;
17954
+ }};
17958
17955
  }
17959
17956
  `;
17960
17957
  var StoryboardRenderer = ({
@@ -18073,31 +18070,24 @@ var Thumbnail = forwardRef37(
18073
18070
  } else {
18074
18071
  thumbnailContent = null;
18075
18072
  }
18076
- return /* @__PURE__ */ jsx325(
18077
- StyledThumbnailContainer,
18073
+ return /* @__PURE__ */ jsxs69(
18074
+ StyledThumbnail,
18078
18075
  {
18079
18076
  ref,
18077
+ ...props,
18080
18078
  $aspectRatio: aspectRatio,
18079
+ $backgroundUrl: backgroundUrl,
18080
+ $gradientBackground: gradientBackground,
18081
18081
  $isScrubbable: isScrubbable,
18082
18082
  $width: width,
18083
- "data-wui-thumbnail-container": true,
18084
18083
  onBlur: handleMouseOut,
18085
18084
  onMouseMove: handleMouseMove,
18086
18085
  onMouseOut: handleMouseOut,
18087
18086
  role: "presentation",
18088
- ...props,
18089
- children: /* @__PURE__ */ jsxs69(
18090
- StyledThumbnail,
18091
- {
18092
- $backgroundUrl: backgroundUrl,
18093
- $gradientBackground: gradientBackground,
18094
- "data-testid": "thumbnail-inner",
18095
- children: [
18096
- isNotNil43(children) ? children : null,
18097
- thumbnailContent
18098
- ]
18099
- }
18100
- )
18087
+ children: [
18088
+ isNotNil43(children) ? children : null,
18089
+ thumbnailContent
18090
+ ]
18101
18091
  }
18102
18092
  );
18103
18093
  }
@@ -18109,55 +18099,72 @@ import React5 from "react";
18109
18099
  import { styled as styled107 } from "styled-components";
18110
18100
  import { isNonEmptyArray } from "@wistia/type-guards";
18111
18101
  import { jsx as jsx326 } from "react/jsx-runtime";
18112
- var ThumbnailCollageContainer = styled107.div`
18113
- container-type: size;
18114
- width: 100%;
18115
- aspect-ratio: 16 / 9;
18116
- display: flex;
18117
- `;
18118
18102
  var StyledThumbnailCollage = styled107.div`
18119
18103
  display: grid;
18120
18104
  gap: var(--wui-space-01);
18121
18105
  width: 100%;
18122
18106
  grid-template-columns: 3fr 2fr;
18123
18107
  grid-template-rows: 1fr 1fr;
18108
+ aspect-ratio: 16 / 9;
18124
18109
 
18125
18110
  &:has(:nth-child(1)) {
18111
+ --wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
18112
+
18126
18113
  grid-template-areas:
18127
18114
  'a a'
18128
18115
  'a a';
18129
18116
  }
18130
18117
 
18131
18118
  &:has(:nth-child(2)) {
18119
+ --wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
18120
+ --wui-collage-thumbnail-second-border-radius: 11.5% / 8%;
18121
+
18132
18122
  grid-template-areas:
18133
18123
  'a b'
18134
18124
  'a b';
18135
18125
  }
18136
18126
 
18137
18127
  &:has(:nth-child(3)) {
18128
+ --wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
18129
+ --wui-collage-thumbnail-second-border-radius: 11.5% / 16%;
18130
+ --wui-collage-thumbnail-third-border-radius: 11.5% / 16%;
18131
+
18138
18132
  grid-template-areas:
18139
18133
  'a b'
18140
18134
  'a c';
18141
18135
  }
18142
18136
 
18143
18137
  > :nth-child(1) {
18138
+ --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
18139
+
18144
18140
  grid-area: a;
18145
18141
  }
18146
18142
 
18147
18143
  > :nth-child(2) {
18144
+ --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
18145
+
18148
18146
  grid-area: b;
18149
18147
  }
18150
18148
 
18151
18149
  > :nth-child(3) {
18150
+ --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
18151
+
18152
18152
  grid-area: c;
18153
18153
  }
18154
18154
 
18155
- [data-thumbnail-container] {
18156
- /* allows for the border radius to be based off the collage dimensions */
18157
- container-type: unset;
18155
+ > * {
18158
18156
  aspect-ratio: unset;
18159
18157
  height: 100%;
18160
18158
  width: 100%;
18159
+ border-radius: var(--wui-collage-thumbnail-border-radius);
18160
+
18161
+ img {
18162
+ border-radius: var(--wui-collage-thumbnail-border-radius);
18163
+ }
18164
+
18165
+ > :not(img) {
18166
+ display: none;
18167
+ }
18161
18168
  }
18162
18169
  `;
18163
18170
  var ThumbnailCollage = ({
@@ -18183,7 +18190,7 @@ var ThumbnailCollage = ({
18183
18190
  "fallback"
18184
18191
  )
18185
18192
  ];
18186
- return /* @__PURE__ */ jsx326(ThumbnailCollageContainer, { children: /* @__PURE__ */ jsx326(
18193
+ return /* @__PURE__ */ jsx326(
18187
18194
  StyledThumbnailCollage,
18188
18195
  {
18189
18196
  $gradientBackground: gradientBackground,
@@ -18191,7 +18198,7 @@ var ThumbnailCollage = ({
18191
18198
  ...props,
18192
18199
  children: thumbnails
18193
18200
  }
18194
- ) });
18201
+ );
18195
18202
  };
18196
18203
 
18197
18204
  // src/components/WistiaLogo/WistiaLogo.tsx