@wistia/ui 0.18.0-beta.9dd31b7e.fa98d59 → 0.18.0-beta.aa424735.cbb1970

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.18.0-beta.9dd31b7e.fa98d59
3
+ * @license @wistia/ui v0.18.0-beta.aa424735.cbb1970
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -14990,7 +14990,6 @@ var FormField = ({
14990
14990
  id: computedId,
14991
14991
  label: isIntegratedLabel ? label : void 0,
14992
14992
  "aria-describedby": ariaDescribedby,
14993
- "aria-invalid": (0, import_type_guards49.isNotNil)(computedError),
14994
14993
  ...props
14995
14994
  };
14996
14995
  if ((0, import_type_guards49.isUndefined)(value) && (0, import_type_guards49.isNotUndefined)(defaultValue)) {
@@ -15012,7 +15011,8 @@ var FormField = ({
15012
15011
  childProps = {
15013
15012
  ...childProps,
15014
15013
  name: computedName,
15015
- onChange: handleChange
15014
+ onChange: handleChange,
15015
+ "aria-invalid": (0, import_type_guards49.isNotNil)(error)
15016
15016
  };
15017
15017
  }
15018
15018
  import_react73.Children.only(children);
@@ -17678,7 +17678,7 @@ var StyledThumbnailBadge = import_styled_components123.styled.div`
17678
17678
  align-items: center;
17679
17679
  background-color: rgb(0 0 0 / 50%);
17680
17680
  border-radius: var(--wui-border-radius-01);
17681
- bottom: var(--wui-space-01);
17681
+ bottom: var(--wui-thumbnail-badge-offset);
17682
17682
  color: var(--wui-color-text-on-fill);
17683
17683
  display: flex;
17684
17684
  font-size: var(--wui-typography-body-4-size);
@@ -17686,7 +17686,7 @@ var StyledThumbnailBadge = import_styled_components123.styled.div`
17686
17686
  gap: var(--wui-space-01);
17687
17687
  padding: 0 var(--wui-space-01);
17688
17688
  position: absolute;
17689
- right: var(--wui-space-01);
17689
+ right: var(--wui-thumbnail-badge-offset);
17690
17690
  z-index: 1;
17691
17691
 
17692
17692
  svg {
@@ -18011,7 +18011,15 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
18011
18011
  }
18012
18012
  );
18013
18013
  };
18014
+ var StyledThumbnailContainer = import_styled_components126.styled.div`
18015
+ container-type: size;
18016
+ aspect-ratio: 16 / 9;
18017
+ width: ${({ $width }) => $width};
18018
+ display: flex;
18019
+ clip-path: inset(0 0 0 0 round var(--wui-collage-border-radius));
18020
+ `;
18014
18021
  var StyledThumbnail = import_styled_components126.styled.div`
18022
+ --wui-thumbnail-badge-offset: var(--wui-space-01);
18015
18023
  background-image: ${({ $backgroundUrl }) => (0, import_type_guards74.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
18016
18024
  ${({ $backgroundUrl, $gradientBackground }) => (
18017
18025
  // if we don't have $backgroundUrl show a gradient
@@ -18019,17 +18027,20 @@ var StyledThumbnail = import_styled_components126.styled.div`
18019
18027
  )};
18020
18028
  background-position: center center;
18021
18029
  background-size: cover;
18030
+ width: 100%;
18022
18031
  aspect-ratio: 16 / 9;
18023
- display: flex;
18024
18032
  overflow: hidden;
18025
18033
  position: relative;
18026
- width: ${({ $width }) => $width};
18027
- ${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
18034
+ display: flex;
18035
+ clip-path: inset(
18036
+ 0 0 0 0 round clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05))
18037
+ );
18028
18038
 
18029
- &,
18030
- img {
18031
- border-radius: calc(8% * (9 / 16)) / 8%;
18039
+ @container (min-width: 200px) {
18040
+ --wui-thumbnail-badge-offset: var(--wui-space-02);
18032
18041
  }
18042
+
18043
+ ${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
18033
18044
  `;
18034
18045
  var StoryboardRenderer = ({
18035
18046
  storyboard,
@@ -18152,23 +18163,30 @@ var Thumbnail = (0, import_react100.forwardRef)(
18152
18163
  } else {
18153
18164
  thumbnailContent = null;
18154
18165
  }
18155
- return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
18156
- StyledThumbnail,
18166
+ return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
18167
+ StyledThumbnailContainer,
18157
18168
  {
18158
- ref,
18159
- ...props,
18160
- $backgroundUrl: backgroundUrl,
18161
- $gradientBackground: gradientBackground,
18162
- $isScrubbable: isScrubbable,
18163
18169
  $width: width,
18164
- onBlur: handleMouseOut,
18165
- onMouseMove: handleMouseMove,
18166
- onMouseOut: handleMouseOut,
18167
- role: "presentation",
18168
- children: [
18169
- (0, import_type_guards74.isNotNil)(children) ? children : null,
18170
- thumbnailContent
18171
- ]
18170
+ "data-thumbnail-container": true,
18171
+ children: /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
18172
+ StyledThumbnail,
18173
+ {
18174
+ ref,
18175
+ ...props,
18176
+ $backgroundUrl: backgroundUrl,
18177
+ $gradientBackground: gradientBackground,
18178
+ $isScrubbable: isScrubbable,
18179
+ $width: width,
18180
+ onBlur: handleMouseOut,
18181
+ onMouseMove: handleMouseMove,
18182
+ onMouseOut: handleMouseOut,
18183
+ role: "presentation",
18184
+ children: [
18185
+ (0, import_type_guards74.isNotNil)(children) ? children : null,
18186
+ thumbnailContent
18187
+ ]
18188
+ }
18189
+ )
18172
18190
  }
18173
18191
  );
18174
18192
  }
@@ -18183,6 +18201,13 @@ var import_jsx_runtime328 = (
18183
18201
  // ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
18184
18202
  require("react/jsx-runtime")
18185
18203
  );
18204
+ var ThumbnailCollageContainer = import_styled_components127.styled.div`
18205
+ container-type: size;
18206
+ container-name: thumbnail-collage;
18207
+ width: 100%;
18208
+ aspect-ratio: 16 / 9;
18209
+ display: flex;
18210
+ `;
18186
18211
  var StyledThumbnailCollage = import_styled_components127.styled.div`
18187
18212
  display: grid;
18188
18213
  gap: var(--wui-space-01);
@@ -18190,49 +18215,39 @@ var StyledThumbnailCollage = import_styled_components127.styled.div`
18190
18215
  grid-template-columns: 3fr 2fr;
18191
18216
  grid-template-rows: 1fr 1fr;
18192
18217
  aspect-ratio: 16 / 9;
18218
+ --wui-collage-border-radius: clamp(
18219
+ var(--wui-border-radius-01),
18220
+ 8cqh,
18221
+ var(--wui-border-radius-05)
18222
+ );
18193
18223
 
18194
18224
  &:has(:nth-child(1)) {
18195
- --wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
18196
-
18197
18225
  grid-template-areas:
18198
18226
  'a a'
18199
18227
  'a a';
18200
18228
  }
18201
18229
 
18202
18230
  &:has(:nth-child(2)) {
18203
- --wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
18204
- --wui-collage-thumbnail-second-border-radius: 11.5% / 8%;
18205
-
18206
18231
  grid-template-areas:
18207
18232
  'a b'
18208
18233
  'a b';
18209
18234
  }
18210
18235
 
18211
18236
  &:has(:nth-child(3)) {
18212
- --wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
18213
- --wui-collage-thumbnail-second-border-radius: 11.5% / 16%;
18214
- --wui-collage-thumbnail-third-border-radius: 11.5% / 16%;
18215
-
18216
18237
  grid-template-areas:
18217
18238
  'a b'
18218
18239
  'a c';
18219
18240
  }
18220
18241
 
18221
18242
  > :nth-child(1) {
18222
- --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
18223
-
18224
18243
  grid-area: a;
18225
18244
  }
18226
18245
 
18227
18246
  > :nth-child(2) {
18228
- --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
18229
-
18230
18247
  grid-area: b;
18231
18248
  }
18232
18249
 
18233
18250
  > :nth-child(3) {
18234
- --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
18235
-
18236
18251
  grid-area: c;
18237
18252
  }
18238
18253
 
@@ -18240,15 +18255,6 @@ var StyledThumbnailCollage = import_styled_components127.styled.div`
18240
18255
  aspect-ratio: unset;
18241
18256
  height: 100%;
18242
18257
  width: 100%;
18243
- border-radius: var(--wui-collage-thumbnail-border-radius);
18244
-
18245
- img {
18246
- border-radius: var(--wui-collage-thumbnail-border-radius);
18247
- }
18248
-
18249
- > :not(img) {
18250
- display: none;
18251
- }
18252
18258
  }
18253
18259
  `;
18254
18260
  var ThumbnailCollage = ({
@@ -18273,7 +18279,7 @@ var ThumbnailCollage = ({
18273
18279
  "fallback"
18274
18280
  )
18275
18281
  ];
18276
- return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
18282
+ return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(ThumbnailCollageContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
18277
18283
  StyledThumbnailCollage,
18278
18284
  {
18279
18285
  $gradientBackground: gradientBackground,
@@ -18281,7 +18287,7 @@ var ThumbnailCollage = ({
18281
18287
  ...props,
18282
18288
  children: thumbnails
18283
18289
  }
18284
- );
18290
+ ) });
18285
18291
  };
18286
18292
 
18287
18293
  // src/components/WistiaLogo/WistiaLogo.tsx