@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.mjs 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
  *
@@ -14840,7 +14840,6 @@ var FormField = ({
14840
14840
  id: computedId,
14841
14841
  label: isIntegratedLabel ? label : void 0,
14842
14842
  "aria-describedby": ariaDescribedby,
14843
- "aria-invalid": isNotNil28(computedError),
14844
14843
  ...props
14845
14844
  };
14846
14845
  if (isUndefined4(value) && isNotUndefined12(defaultValue)) {
@@ -14862,7 +14861,8 @@ var FormField = ({
14862
14861
  childProps = {
14863
14862
  ...childProps,
14864
14863
  name: computedName,
14865
- onChange: handleChange
14864
+ onChange: handleChange,
14865
+ "aria-invalid": isNotNil28(error)
14866
14866
  };
14867
14867
  }
14868
14868
  Children10.only(children);
@@ -17542,7 +17542,7 @@ var StyledThumbnailBadge = styled104.div`
17542
17542
  align-items: center;
17543
17543
  background-color: rgb(0 0 0 / 50%);
17544
17544
  border-radius: var(--wui-border-radius-01);
17545
- bottom: var(--wui-space-01);
17545
+ bottom: var(--wui-thumbnail-badge-offset);
17546
17546
  color: var(--wui-color-text-on-fill);
17547
17547
  display: flex;
17548
17548
  font-size: var(--wui-typography-body-4-size);
@@ -17550,7 +17550,7 @@ var StyledThumbnailBadge = styled104.div`
17550
17550
  gap: var(--wui-space-01);
17551
17551
  padding: 0 var(--wui-space-01);
17552
17552
  position: absolute;
17553
- right: var(--wui-space-01);
17553
+ right: var(--wui-thumbnail-badge-offset);
17554
17554
  z-index: 1;
17555
17555
 
17556
17556
  svg {
@@ -17875,7 +17875,15 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
17875
17875
  }
17876
17876
  );
17877
17877
  };
17878
+ var StyledThumbnailContainer = styled106.div`
17879
+ container-type: size;
17880
+ aspect-ratio: 16 / 9;
17881
+ width: ${({ $width }) => $width};
17882
+ display: flex;
17883
+ clip-path: inset(0 0 0 0 round var(--wui-collage-border-radius));
17884
+ `;
17878
17885
  var StyledThumbnail = styled106.div`
17886
+ --wui-thumbnail-badge-offset: var(--wui-space-01);
17879
17887
  background-image: ${({ $backgroundUrl }) => isNotNil43($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17880
17888
  ${({ $backgroundUrl, $gradientBackground }) => (
17881
17889
  // if we don't have $backgroundUrl show a gradient
@@ -17883,17 +17891,20 @@ var StyledThumbnail = styled106.div`
17883
17891
  )};
17884
17892
  background-position: center center;
17885
17893
  background-size: cover;
17894
+ width: 100%;
17886
17895
  aspect-ratio: 16 / 9;
17887
- display: flex;
17888
17896
  overflow: hidden;
17889
17897
  position: relative;
17890
- width: ${({ $width }) => $width};
17891
- ${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
17898
+ display: flex;
17899
+ clip-path: inset(
17900
+ 0 0 0 0 round clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05))
17901
+ );
17892
17902
 
17893
- &,
17894
- img {
17895
- border-radius: calc(8% * (9 / 16)) / 8%;
17903
+ @container (min-width: 200px) {
17904
+ --wui-thumbnail-badge-offset: var(--wui-space-02);
17896
17905
  }
17906
+
17907
+ ${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
17897
17908
  `;
17898
17909
  var StoryboardRenderer = ({
17899
17910
  storyboard,
@@ -18016,23 +18027,30 @@ var Thumbnail = forwardRef37(
18016
18027
  } else {
18017
18028
  thumbnailContent = null;
18018
18029
  }
18019
- return /* @__PURE__ */ jsxs69(
18020
- StyledThumbnail,
18030
+ return /* @__PURE__ */ jsx325(
18031
+ StyledThumbnailContainer,
18021
18032
  {
18022
- ref,
18023
- ...props,
18024
- $backgroundUrl: backgroundUrl,
18025
- $gradientBackground: gradientBackground,
18026
- $isScrubbable: isScrubbable,
18027
18033
  $width: width,
18028
- onBlur: handleMouseOut,
18029
- onMouseMove: handleMouseMove,
18030
- onMouseOut: handleMouseOut,
18031
- role: "presentation",
18032
- children: [
18033
- isNotNil43(children) ? children : null,
18034
- thumbnailContent
18035
- ]
18034
+ "data-thumbnail-container": true,
18035
+ children: /* @__PURE__ */ jsxs69(
18036
+ StyledThumbnail,
18037
+ {
18038
+ ref,
18039
+ ...props,
18040
+ $backgroundUrl: backgroundUrl,
18041
+ $gradientBackground: gradientBackground,
18042
+ $isScrubbable: isScrubbable,
18043
+ $width: width,
18044
+ onBlur: handleMouseOut,
18045
+ onMouseMove: handleMouseMove,
18046
+ onMouseOut: handleMouseOut,
18047
+ role: "presentation",
18048
+ children: [
18049
+ isNotNil43(children) ? children : null,
18050
+ thumbnailContent
18051
+ ]
18052
+ }
18053
+ )
18036
18054
  }
18037
18055
  );
18038
18056
  }
@@ -18044,6 +18062,13 @@ import React5 from "react";
18044
18062
  import { styled as styled107 } from "styled-components";
18045
18063
  import { isNonEmptyArray } from "@wistia/type-guards";
18046
18064
  import { jsx as jsx326 } from "react/jsx-runtime";
18065
+ var ThumbnailCollageContainer = styled107.div`
18066
+ container-type: size;
18067
+ container-name: thumbnail-collage;
18068
+ width: 100%;
18069
+ aspect-ratio: 16 / 9;
18070
+ display: flex;
18071
+ `;
18047
18072
  var StyledThumbnailCollage = styled107.div`
18048
18073
  display: grid;
18049
18074
  gap: var(--wui-space-01);
@@ -18051,49 +18076,39 @@ var StyledThumbnailCollage = styled107.div`
18051
18076
  grid-template-columns: 3fr 2fr;
18052
18077
  grid-template-rows: 1fr 1fr;
18053
18078
  aspect-ratio: 16 / 9;
18079
+ --wui-collage-border-radius: clamp(
18080
+ var(--wui-border-radius-01),
18081
+ 8cqh,
18082
+ var(--wui-border-radius-05)
18083
+ );
18054
18084
 
18055
18085
  &:has(:nth-child(1)) {
18056
- --wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
18057
-
18058
18086
  grid-template-areas:
18059
18087
  'a a'
18060
18088
  'a a';
18061
18089
  }
18062
18090
 
18063
18091
  &:has(:nth-child(2)) {
18064
- --wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
18065
- --wui-collage-thumbnail-second-border-radius: 11.5% / 8%;
18066
-
18067
18092
  grid-template-areas:
18068
18093
  'a b'
18069
18094
  'a b';
18070
18095
  }
18071
18096
 
18072
18097
  &:has(:nth-child(3)) {
18073
- --wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
18074
- --wui-collage-thumbnail-second-border-radius: 11.5% / 16%;
18075
- --wui-collage-thumbnail-third-border-radius: 11.5% / 16%;
18076
-
18077
18098
  grid-template-areas:
18078
18099
  'a b'
18079
18100
  'a c';
18080
18101
  }
18081
18102
 
18082
18103
  > :nth-child(1) {
18083
- --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
18084
-
18085
18104
  grid-area: a;
18086
18105
  }
18087
18106
 
18088
18107
  > :nth-child(2) {
18089
- --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
18090
-
18091
18108
  grid-area: b;
18092
18109
  }
18093
18110
 
18094
18111
  > :nth-child(3) {
18095
- --wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
18096
-
18097
18112
  grid-area: c;
18098
18113
  }
18099
18114
 
@@ -18101,15 +18116,6 @@ var StyledThumbnailCollage = styled107.div`
18101
18116
  aspect-ratio: unset;
18102
18117
  height: 100%;
18103
18118
  width: 100%;
18104
- border-radius: var(--wui-collage-thumbnail-border-radius);
18105
-
18106
- img {
18107
- border-radius: var(--wui-collage-thumbnail-border-radius);
18108
- }
18109
-
18110
- > :not(img) {
18111
- display: none;
18112
- }
18113
18119
  }
18114
18120
  `;
18115
18121
  var ThumbnailCollage = ({
@@ -18135,7 +18141,7 @@ var ThumbnailCollage = ({
18135
18141
  "fallback"
18136
18142
  )
18137
18143
  ];
18138
- return /* @__PURE__ */ jsx326(
18144
+ return /* @__PURE__ */ jsx326(ThumbnailCollageContainer, { children: /* @__PURE__ */ jsx326(
18139
18145
  StyledThumbnailCollage,
18140
18146
  {
18141
18147
  $gradientBackground: gradientBackground,
@@ -18143,7 +18149,7 @@ var ThumbnailCollage = ({
18143
18149
  ...props,
18144
18150
  children: thumbnails
18145
18151
  }
18146
- );
18152
+ ) });
18147
18153
  };
18148
18154
 
18149
18155
  // src/components/WistiaLogo/WistiaLogo.tsx