@wistia/ui 0.18.2-beta.547ab1c7.fdb1aa5 → 0.18.2-beta.ac1bbb95.dea3e8b

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.547ab1c7.fdb1aa5
3
+ * @license @wistia/ui v0.18.2-beta.ac1bbb95.dea3e8b
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__ */ jsx169(
6693
+ var SpinnerIcon = (props) => /* @__PURE__ */ jsxs7(
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: /* @__PURE__ */ jsxs7("g", { children: [
6699
+ children: [
6700
6700
  /* @__PURE__ */ jsx169(
6701
6701
  "path",
6702
6702
  {
@@ -6714,10 +6714,10 @@ var SpinnerIcon = (props) => /* @__PURE__ */ jsx169(
6714
6714
  keyTimes: "0;1",
6715
6715
  repeatCount: "indefinite",
6716
6716
  type: "rotate",
6717
- values: "0 12 12;360 12 12"
6717
+ values: "0 0 0;360 0 0"
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-space-01);
17591
+ bottom: var(--wui-thumbnail-badge-offset);
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-space-01);
17599
+ right: var(--wui-thumbnail-badge-offset);
17600
17600
  z-index: 1;
17601
17601
 
17602
17602
  svg {
@@ -17929,7 +17929,17 @@ 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
+ `;
17932
17940
  var StyledThumbnail = styled106.div`
17941
+ --wui-thumbnail-badge-offset: var(--wui-space-01);
17942
+
17933
17943
  background-image: ${({ $backgroundUrl }) => isNotNil43($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17934
17944
  ${({ $backgroundUrl, $gradientBackground }) => (
17935
17945
  // if we don't have $backgroundUrl show a gradient
@@ -17937,21 +17947,14 @@ var StyledThumbnail = styled106.div`
17937
17947
  )};
17938
17948
  background-position: center center;
17939
17949
  background-size: cover;
17940
- aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
17941
17950
  display: flex;
17951
+ width: 100%;
17942
17952
  overflow: hidden;
17943
17953
  position: relative;
17944
- width: ${({ $width }) => $width};
17945
- ${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
17954
+ border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
17946
17955
 
17947
- &,
17948
- img {
17949
- border-radius: ${({ $aspectRatio }) => {
17950
- if ($aspectRatio === "square") {
17951
- return "8%";
17952
- }
17953
- return `calc(8% * (9 / 16)) / 8%`;
17954
- }};
17956
+ @container (min-width: 200px) {
17957
+ --wui-thumbnail-badge-offset: var(--wui-space-02);
17955
17958
  }
17956
17959
  `;
17957
17960
  var StoryboardRenderer = ({
@@ -18070,24 +18073,31 @@ var Thumbnail = forwardRef37(
18070
18073
  } else {
18071
18074
  thumbnailContent = null;
18072
18075
  }
18073
- return /* @__PURE__ */ jsxs69(
18074
- StyledThumbnail,
18076
+ return /* @__PURE__ */ jsx325(
18077
+ StyledThumbnailContainer,
18075
18078
  {
18076
18079
  ref,
18077
- ...props,
18078
18080
  $aspectRatio: aspectRatio,
18079
- $backgroundUrl: backgroundUrl,
18080
- $gradientBackground: gradientBackground,
18081
18081
  $isScrubbable: isScrubbable,
18082
18082
  $width: width,
18083
+ "data-wui-thumbnail-container": true,
18083
18084
  onBlur: handleMouseOut,
18084
18085
  onMouseMove: handleMouseMove,
18085
18086
  onMouseOut: handleMouseOut,
18086
18087
  role: "presentation",
18087
- children: [
18088
- isNotNil43(children) ? children : null,
18089
- thumbnailContent
18090
- ]
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
+ )
18091
18101
  }
18092
18102
  );
18093
18103
  }
@@ -18099,72 +18109,55 @@ import React5 from "react";
18099
18109
  import { styled as styled107 } from "styled-components";
18100
18110
  import { isNonEmptyArray } from "@wistia/type-guards";
18101
18111
  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
+ `;
18102
18118
  var StyledThumbnailCollage = styled107.div`
18103
18119
  display: grid;
18104
18120
  gap: var(--wui-space-01);
18105
18121
  width: 100%;
18106
18122
  grid-template-columns: 3fr 2fr;
18107
18123
  grid-template-rows: 1fr 1fr;
18108
- aspect-ratio: 16 / 9;
18109
18124
 
18110
18125
  &:has(:nth-child(1)) {
18111
- --wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
18112
-
18113
18126
  grid-template-areas:
18114
18127
  'a a'
18115
18128
  'a a';
18116
18129
  }
18117
18130
 
18118
18131
  &: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
-
18122
18132
  grid-template-areas:
18123
18133
  'a b'
18124
18134
  'a b';
18125
18135
  }
18126
18136
 
18127
18137
  &: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
-
18132
18138
  grid-template-areas:
18133
18139
  'a b'
18134
18140
  'a c';
18135
18141
  }
18136
18142
 
18137
18143
  > :nth-child(1) {
18138
- --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
18139
-
18140
18144
  grid-area: a;
18141
18145
  }
18142
18146
 
18143
18147
  > :nth-child(2) {
18144
- --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
18145
-
18146
18148
  grid-area: b;
18147
18149
  }
18148
18150
 
18149
18151
  > :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
- > * {
18155
+ [data-thumbnail-container] {
18156
+ /* allows for the border radius to be based off the collage dimensions */
18157
+ container-type: unset;
18156
18158
  aspect-ratio: unset;
18157
18159
  height: 100%;
18158
18160
  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
- }
18168
18161
  }
18169
18162
  `;
18170
18163
  var ThumbnailCollage = ({
@@ -18190,7 +18183,7 @@ var ThumbnailCollage = ({
18190
18183
  "fallback"
18191
18184
  )
18192
18185
  ];
18193
- return /* @__PURE__ */ jsx326(
18186
+ return /* @__PURE__ */ jsx326(ThumbnailCollageContainer, { children: /* @__PURE__ */ jsx326(
18194
18187
  StyledThumbnailCollage,
18195
18188
  {
18196
18189
  $gradientBackground: gradientBackground,
@@ -18198,7 +18191,7 @@ var ThumbnailCollage = ({
18198
18191
  ...props,
18199
18192
  children: thumbnails
18200
18193
  }
18201
- );
18194
+ ) });
18202
18195
  };
18203
18196
 
18204
18197
  // src/components/WistiaLogo/WistiaLogo.tsx