@wistia/ui 0.18.0-beta.af6ce7a5.9372ce9 → 0.18.0-beta.bf141d35.57288dc

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.d.mts CHANGED
@@ -4108,6 +4108,7 @@ declare const gradients: {
4108
4108
  };
4109
4109
  type GradientNameType = keyof typeof gradients;
4110
4110
 
4111
+ type AspectRatioType = 'square' | 'wide';
4111
4112
  type Storyboard = {
4112
4113
  __typename?: string;
4113
4114
  aspectRatio: number;
@@ -4150,6 +4151,11 @@ type ThumbnailProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
4150
4151
  * Example: '180px'
4151
4152
  */
4152
4153
  height?: string;
4154
+ /**
4155
+ * The aspect ratio of the thumbnail container.
4156
+ * 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
4157
+ */
4158
+ aspectRatio?: AspectRatioType;
4153
4159
  };
4154
4160
  /**
4155
4161
  * A `Thumbnail` is a small, reduced-size version of an image or video used as a preview or representative image.
@@ -4185,6 +4191,11 @@ declare const Thumbnail: react.ForwardRefExoticComponent<Omit<Omit<react.Detaile
4185
4191
  * Example: '180px'
4186
4192
  */
4187
4193
  height?: string;
4194
+ /**
4195
+ * The aspect ratio of the thumbnail container.
4196
+ * 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
4197
+ */
4198
+ aspectRatio?: AspectRatioType;
4188
4199
  } & react.RefAttributes<HTMLDivElement>>;
4189
4200
 
4190
4201
  type ThumbnailCollageProps = {
package/dist/index.d.ts CHANGED
@@ -4108,6 +4108,7 @@ declare const gradients: {
4108
4108
  };
4109
4109
  type GradientNameType = keyof typeof gradients;
4110
4110
 
4111
+ type AspectRatioType = 'square' | 'wide';
4111
4112
  type Storyboard = {
4112
4113
  __typename?: string;
4113
4114
  aspectRatio: number;
@@ -4150,6 +4151,11 @@ type ThumbnailProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
4150
4151
  * Example: '180px'
4151
4152
  */
4152
4153
  height?: string;
4154
+ /**
4155
+ * The aspect ratio of the thumbnail container.
4156
+ * 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
4157
+ */
4158
+ aspectRatio?: AspectRatioType;
4153
4159
  };
4154
4160
  /**
4155
4161
  * A `Thumbnail` is a small, reduced-size version of an image or video used as a preview or representative image.
@@ -4185,6 +4191,11 @@ declare const Thumbnail: react.ForwardRefExoticComponent<Omit<Omit<react.Detaile
4185
4191
  * Example: '180px'
4186
4192
  */
4187
4193
  height?: string;
4194
+ /**
4195
+ * The aspect ratio of the thumbnail container.
4196
+ * 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
4197
+ */
4198
+ aspectRatio?: AspectRatioType;
4188
4199
  } & react.RefAttributes<HTMLDivElement>>;
4189
4200
 
4190
4201
  type ThumbnailCollageProps = {
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.18.0-beta.af6ce7a5.9372ce9
3
+ * @license @wistia/ui v0.18.0-beta.bf141d35.57288dc
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7724,7 +7724,6 @@ var StyledButton = styled5.button`
7724
7724
  ${({ $variant }) => buttonVariantsStyles[$variant]}
7725
7725
  ${({ $unstyled }) => !$unstyled && buttonBaseStyles}
7726
7726
  ${({ $fullWidth }) => $fullWidth && "width: 100%;"}
7727
- align-self: flex-start;
7728
7727
  text-align: center;
7729
7728
  `;
7730
7729
  var StyledButtonContent = styled5.div`
@@ -8421,7 +8420,7 @@ var DEFAULT_ELEMENT = "div";
8421
8420
  var BoxComponent = forwardRef5(
8422
8421
  ({
8423
8422
  alignContent = "stretch",
8424
- alignItems = "stretch",
8423
+ alignItems = "flex-start",
8425
8424
  alignSelf,
8426
8425
  basis,
8427
8426
  children,
@@ -8940,10 +8939,6 @@ var ButtonGroupComponent = styled14.div`
8940
8939
  justify-content: ${({ $align }) => getAlignment($align)};
8941
8940
  width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
8942
8941
 
8943
- ${StyledButton} {
8944
- align-self: unset;
8945
- }
8946
-
8947
8942
  ${mq.smAndUp} {
8948
8943
  flex-direction: row;
8949
8944
  }
@@ -17850,6 +17845,14 @@ var ThumbnailStoryboardViewer = ({
17850
17845
 
17851
17846
  // src/components/Thumbnail/Thumbnail.tsx
17852
17847
  import { jsx as jsx325, jsxs as jsxs69 } from "react/jsx-runtime";
17848
+ var WIDE_ASPECT_RATIO = 16 / 9;
17849
+ var SQUARE_ASPECT_RATIO = 1;
17850
+ var getAspectRatioValue = (aspectRatio) => {
17851
+ if (aspectRatio === "square") {
17852
+ return SQUARE_ASPECT_RATIO;
17853
+ }
17854
+ return WIDE_ASPECT_RATIO;
17855
+ };
17853
17856
  var WideThumbnailImage = styled106.img`
17854
17857
  height: 100%;
17855
17858
  object-fit: cover;
@@ -17888,7 +17891,7 @@ var StyledThumbnail = styled106.div`
17888
17891
  )};
17889
17892
  background-position: center center;
17890
17893
  background-size: cover;
17891
- aspect-ratio: 16 / 9;
17894
+ aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
17892
17895
  display: flex;
17893
17896
  overflow: hidden;
17894
17897
  position: relative;
@@ -17897,7 +17900,12 @@ var StyledThumbnail = styled106.div`
17897
17900
 
17898
17901
  &,
17899
17902
  img {
17900
- border-radius: calc(8% * (9 / 16)) / 8%;
17903
+ border-radius: ${({ $aspectRatio }) => {
17904
+ if ($aspectRatio === "square") {
17905
+ return "8%";
17906
+ }
17907
+ return `calc(8% * (9 / 16)) / 8%`;
17908
+ }};
17901
17909
  }
17902
17910
  `;
17903
17911
  var StoryboardRenderer = ({
@@ -17905,17 +17913,10 @@ var StoryboardRenderer = ({
17905
17913
  width,
17906
17914
  percent,
17907
17915
  cursorPosition,
17908
- isStoryboardReady
17916
+ isStoryboardReady,
17917
+ aspectRatio
17909
17918
  }) => {
17910
- const {
17911
- url,
17912
- width: sbWidth,
17913
- height: sbHeight,
17914
- frameHeight,
17915
- frameWidth,
17916
- frameCount,
17917
- aspectRatio
17918
- } = storyboard;
17919
+ const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
17919
17920
  const targetWidth = isString4(width) ? parseInt(width, 10) : Number(width);
17920
17921
  const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
17921
17922
  return /* @__PURE__ */ jsx325(
@@ -17929,7 +17930,7 @@ var StoryboardRenderer = ({
17929
17930
  storyboardHeight: sbHeight,
17930
17931
  storyboardUrl: url,
17931
17932
  storyboardWidth: sbWidth,
17932
- targetAspectRatio: aspectRatio,
17933
+ targetAspectRatio: getAspectRatioValue(aspectRatio),
17933
17934
  targetWidth
17934
17935
  }
17935
17936
  );
@@ -17952,6 +17953,7 @@ var Thumbnail = forwardRef37(
17952
17953
  children,
17953
17954
  storyboard,
17954
17955
  height,
17956
+ aspectRatio = "wide",
17955
17957
  ...props
17956
17958
  }, ref) => {
17957
17959
  const [percent, setPercent] = useState26(0);
@@ -18003,6 +18005,7 @@ var Thumbnail = forwardRef37(
18003
18005
  thumbnailContent = /* @__PURE__ */ jsx325(
18004
18006
  StoryboardRenderer,
18005
18007
  {
18008
+ aspectRatio,
18006
18009
  cursorPosition,
18007
18010
  isStoryboardReady,
18008
18011
  percent,
@@ -18026,6 +18029,7 @@ var Thumbnail = forwardRef37(
18026
18029
  {
18027
18030
  ref,
18028
18031
  ...props,
18032
+ $aspectRatio: aspectRatio,
18029
18033
  $backgroundUrl: backgroundUrl,
18030
18034
  $gradientBackground: gradientBackground,
18031
18035
  $isScrubbable: isScrubbable,