@wistia/ui 0.9.0 → 0.9.1-beta.1aa29885.edae61a

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.9.0
3
+ * @license @wistia/ui v0.9.1-beta.1aa29885.edae61a
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -12809,8 +12809,8 @@ ThumbnailBadge.displayName = "ThumbnailBadge";
12809
12809
 
12810
12810
  // src/components/Thumbnail/Thumbnail.tsx
12811
12811
  var import_react71 = require("react");
12812
- var import_styled_components92 = __toESM(require("styled-components"));
12813
- var import_type_guards55 = require("@wistia/type-guards");
12812
+ var import_styled_components93 = __toESM(require("styled-components"));
12813
+ var import_type_guards56 = require("@wistia/type-guards");
12814
12814
 
12815
12815
  // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
12816
12816
  var import_type_guards54 = require("@wistia/type-guards");
@@ -12944,21 +12944,147 @@ var getBackgroundGradient = (gradientName = void 0) => {
12944
12944
  return (0, import_type_guards54.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
12945
12945
  };
12946
12946
 
12947
- // src/components/Thumbnail/Thumbnail.tsx
12947
+ // src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
12948
+ var import_styled_components92 = __toESM(require("styled-components"));
12949
+ var import_type_guards55 = require("@wistia/type-guards");
12948
12950
  var import_jsx_runtime272 = require("react/jsx-runtime");
12949
- var WideThumbnailImage = import_styled_components92.default.img`
12951
+ var ScrubLine = import_styled_components92.default.div`
12952
+ position: absolute;
12953
+ top: 0;
12954
+ height: 100%;
12955
+ width: 2px;
12956
+ background-color: var(--wui-color-bg-surface-selected-active);
12957
+ z-index: 1;
12958
+ `;
12959
+ var getScaledDimensions = (originalAspectRatio, targetAspectRatio, viewerWidth, viewerHeight) => {
12960
+ let scaledHeight = viewerHeight;
12961
+ let scaledWidth = viewerWidth;
12962
+ if (targetAspectRatio > originalAspectRatio) {
12963
+ scaledHeight = viewerWidth / originalAspectRatio;
12964
+ } else {
12965
+ scaledWidth = viewerHeight * originalAspectRatio;
12966
+ }
12967
+ return { scaledHeight, scaledWidth };
12968
+ };
12969
+ var getCoverProps = (viewerWidth, viewerHeight, scaledWidth, scaledHeight) => {
12970
+ const top = (viewerHeight - scaledHeight) / 2;
12971
+ const left = (viewerWidth - scaledWidth) / 2;
12972
+ return {
12973
+ width: scaledWidth,
12974
+ height: scaledHeight,
12975
+ top,
12976
+ left
12977
+ };
12978
+ };
12979
+ var getFramePosition = (frameIndex, framesPerRow, width, height, scaleFactor) => {
12980
+ const col = frameIndex % framesPerRow;
12981
+ const row = Math.floor(frameIndex / framesPerRow);
12982
+ const imageX = -width * col * scaleFactor;
12983
+ const imageY = -height * row * scaleFactor;
12984
+ return `${imageX}px ${imageY}px`;
12985
+ };
12986
+ var ThumbnailStoryboardViewer = ({
12987
+ storyboardUrl,
12988
+ storyboardHeight,
12989
+ storyboardWidth,
12990
+ frameWidth,
12991
+ frameHeight,
12992
+ frameCount,
12993
+ percent,
12994
+ targetWidth = 200,
12995
+ targetAspectRatio,
12996
+ scaleFactor = 1,
12997
+ framesPerRow = 10,
12998
+ cursorPosition,
12999
+ ...props
13000
+ }) => {
13001
+ const originalAspectRatio = frameWidth / frameHeight;
13002
+ const effectiveTargetAspectRatio = targetAspectRatio ?? originalAspectRatio;
13003
+ const targetHeight = targetWidth / effectiveTargetAspectRatio;
13004
+ const viewerDimensions = {
13005
+ viewerWidth: targetWidth,
13006
+ viewerHeight: targetHeight
13007
+ };
13008
+ const { scaledHeight, scaledWidth } = getScaledDimensions(
13009
+ originalAspectRatio,
13010
+ effectiveTargetAspectRatio,
13011
+ viewerDimensions.viewerWidth,
13012
+ viewerDimensions.viewerHeight
13013
+ );
13014
+ const coverProps = getCoverProps(
13015
+ viewerDimensions.viewerWidth,
13016
+ viewerDimensions.viewerHeight,
13017
+ scaledWidth,
13018
+ scaledHeight
13019
+ );
13020
+ const frameIndex = Math.floor(percent * frameCount);
13021
+ const backgroundPosition = getFramePosition(
13022
+ frameIndex,
13023
+ framesPerRow,
13024
+ coverProps.width,
13025
+ coverProps.height,
13026
+ scaleFactor
13027
+ );
13028
+ const scaleFactorFromAspectRatioFit = coverProps.height / frameHeight;
13029
+ const scaledStoryboardWidth = storyboardWidth * scaleFactorFromAspectRatioFit * scaleFactor;
13030
+ const scaledStoryboardHeight = Math.floor(
13031
+ storyboardHeight * scaleFactorFromAspectRatioFit * scaleFactor
13032
+ );
13033
+ const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
13034
+ const backgroundImage = `url(${storyboardUrl})`;
13035
+ const showScrubLine = (0, import_type_guards55.isNotNil)(cursorPosition);
13036
+ const scrubLinePosition = (0, import_type_guards55.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
13037
+ const viewerStyles = {
13038
+ position: "relative",
13039
+ overflow: "hidden",
13040
+ width: `${viewerDimensions.viewerWidth * scaleFactor}px`,
13041
+ height: `${viewerDimensions.viewerHeight * scaleFactor}px`
13042
+ };
13043
+ const storyboardStyles = {
13044
+ position: "absolute",
13045
+ width: coverProps.width,
13046
+ height: coverProps.height,
13047
+ left: coverProps.left,
13048
+ top: coverProps.top,
13049
+ backgroundImage,
13050
+ backgroundPosition,
13051
+ backgroundSize
13052
+ };
13053
+ return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
13054
+ "div",
13055
+ {
13056
+ ...props,
13057
+ style: viewerStyles,
13058
+ children: [
13059
+ /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("div", { style: storyboardStyles }),
13060
+ showScrubLine ? /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
13061
+ ScrubLine,
13062
+ {
13063
+ style: {
13064
+ left: scrubLinePosition
13065
+ }
13066
+ }
13067
+ ) : null
13068
+ ]
13069
+ }
13070
+ );
13071
+ };
13072
+
13073
+ // src/components/Thumbnail/Thumbnail.tsx
13074
+ var import_jsx_runtime273 = require("react/jsx-runtime");
13075
+ var WideThumbnailImage = import_styled_components93.default.img`
12950
13076
  height: 100%;
12951
13077
  object-fit: cover;
12952
13078
  width: 100%;
12953
13079
  `;
12954
- var SquareThumbnailImage = import_styled_components92.default.img`
13080
+ var SquareThumbnailImage = import_styled_components93.default.img`
12955
13081
  backdrop-filter: blur(8px);
12956
13082
  object-fit: contain;
12957
13083
  width: 100%;
12958
13084
  `;
12959
13085
  var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
12960
13086
  if (thumbnailImageType === "wide") {
12961
- return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
13087
+ return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
12962
13088
  WideThumbnailImage,
12963
13089
  {
12964
13090
  alt: "",
@@ -12967,7 +13093,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
12967
13093
  }
12968
13094
  );
12969
13095
  }
12970
- return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
13096
+ return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
12971
13097
  SquareThumbnailImage,
12972
13098
  {
12973
13099
  alt: "",
@@ -12976,11 +13102,11 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
12976
13102
  }
12977
13103
  );
12978
13104
  };
12979
- var StyledThumbnail = import_styled_components92.default.div`
12980
- background-image: ${({ $backgroundUrl }) => (0, import_type_guards55.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
13105
+ var StyledThumbnail = import_styled_components93.default.div`
13106
+ background-image: ${({ $backgroundUrl }) => (0, import_type_guards56.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
12981
13107
  ${({ $backgroundUrl, $gradientBackground }) => (
12982
13108
  // if we don't have $backgroundUrl show a gradient
12983
- (0, import_type_guards55.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
13109
+ (0, import_type_guards56.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
12984
13110
  )};
12985
13111
  background-position: center center;
12986
13112
  background-size: cover;
@@ -12989,12 +13115,22 @@ var StyledThumbnail = import_styled_components92.default.div`
12989
13115
  overflow: hidden;
12990
13116
  position: relative;
12991
13117
  width: ${({ $width }) => $width};
13118
+ ${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
12992
13119
 
12993
13120
  &,
12994
13121
  img {
12995
13122
  border-radius: calc(8% * (9 / 16)) / 8%;
12996
13123
  }
12997
13124
  `;
13125
+ var getRelativeMousePosition = (elem, mouseEvent) => {
13126
+ const rect = elem.getBoundingClientRect();
13127
+ const relativeLeft = mouseEvent.clientX - rect.left;
13128
+ const relativeTop = mouseEvent.clientY - rect.top;
13129
+ return {
13130
+ top: relativeTop,
13131
+ left: relativeLeft
13132
+ };
13133
+ };
12998
13134
  var Thumbnail = (0, import_react71.forwardRef)(
12999
13135
  ({
13000
13136
  gradientBackground = "defaultMidOne",
@@ -13002,27 +13138,110 @@ var Thumbnail = (0, import_react71.forwardRef)(
13002
13138
  thumbnailUrl,
13003
13139
  width = "100%",
13004
13140
  children,
13141
+ storyboard,
13142
+ height,
13005
13143
  ...props
13006
13144
  }, ref) => {
13007
- const backgroundUrl = thumbnailImageType === "square" && (0, import_type_guards55.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0;
13008
- return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
13145
+ const [percent, setPercent] = (0, import_react71.useState)(0);
13146
+ const [isMouseOver, setIsMouseOver] = (0, import_react71.useState)(false);
13147
+ const [isStoryboardReady, setIsStoryboardReady] = (0, import_react71.useState)(false);
13148
+ const storyboardElementRef = (0, import_react71.useRef)(null);
13149
+ const [cursorPosition, setCursorPosition] = (0, import_react71.useState)(null);
13150
+ const backgroundUrl = (0, import_react71.useMemo)(
13151
+ () => thumbnailImageType === "square" && (0, import_type_guards56.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
13152
+ [thumbnailImageType, thumbnailUrl]
13153
+ );
13154
+ const isScrubbable = (0, import_type_guards56.isNotNil)(storyboard);
13155
+ const trackStoryboardLoadStatus = (0, import_react71.useCallback)(() => {
13156
+ if (storyboardElementRef.current || !storyboard) {
13157
+ return storyboardElementRef.current;
13158
+ }
13159
+ const asset = document.createElement("img");
13160
+ asset.onload = () => setIsStoryboardReady(true);
13161
+ asset.src = storyboard.url;
13162
+ storyboardElementRef.current = asset;
13163
+ return storyboardElementRef.current;
13164
+ }, [storyboard]);
13165
+ const handleMouseMove = (0, import_react71.useCallback)(
13166
+ (mouseEvent) => {
13167
+ if (!isScrubbable) return;
13168
+ const elem = mouseEvent.currentTarget;
13169
+ const relMousePos = getRelativeMousePosition(elem, mouseEvent);
13170
+ const newPercent = relMousePos.left / elem.clientWidth;
13171
+ trackStoryboardLoadStatus();
13172
+ setPercent(newPercent);
13173
+ setCursorPosition(relMousePos.left);
13174
+ setIsMouseOver(true);
13175
+ },
13176
+ [isScrubbable, trackStoryboardLoadStatus]
13177
+ );
13178
+ const handleMouseOut = (0, import_react71.useCallback)(() => {
13179
+ if (!isScrubbable) return;
13180
+ setIsMouseOver(false);
13181
+ setCursorPosition(null);
13182
+ }, [isScrubbable]);
13183
+ const shouldRenderStoryboard = (0, import_react71.useMemo)(() => {
13184
+ return Boolean(isScrubbable && isMouseOver && isStoryboardReady);
13185
+ }, [isScrubbable, isMouseOver, isStoryboardReady]);
13186
+ const renderStoryboard = (0, import_react71.useCallback)(() => {
13187
+ if (!storyboard || (0, import_type_guards56.isUndefined)(height) || (0, import_type_guards56.isEmptyString)(height)) return null;
13188
+ const {
13189
+ url,
13190
+ width: sbWidth,
13191
+ height: sbHeight,
13192
+ frameHeight,
13193
+ frameWidth,
13194
+ frameCount,
13195
+ aspectRatio
13196
+ } = storyboard;
13197
+ const targetWidth = (0, import_type_guards56.isString)(width) ? parseInt(width, 10) : Number(width);
13198
+ const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
13199
+ return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
13200
+ ThumbnailStoryboardViewer,
13201
+ {
13202
+ cursorPosition: effectiveCursorPosition,
13203
+ frameCount,
13204
+ frameHeight,
13205
+ frameWidth,
13206
+ percent,
13207
+ storyboardHeight: sbHeight,
13208
+ storyboardUrl: url,
13209
+ storyboardWidth: sbWidth,
13210
+ targetAspectRatio: aspectRatio,
13211
+ targetWidth
13212
+ }
13213
+ );
13214
+ }, [storyboard, percent, width, height, cursorPosition, isStoryboardReady]);
13215
+ let thumbnailContent = null;
13216
+ if (shouldRenderStoryboard) {
13217
+ thumbnailContent = renderStoryboard();
13218
+ } else if ((0, import_type_guards56.isNotNil)(thumbnailUrl)) {
13219
+ thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
13220
+ ThumbnailImage,
13221
+ {
13222
+ thumbnailImageType,
13223
+ thumbnailUrl
13224
+ }
13225
+ );
13226
+ } else {
13227
+ thumbnailContent = null;
13228
+ }
13229
+ return /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)(
13009
13230
  StyledThumbnail,
13010
13231
  {
13011
13232
  ref,
13012
13233
  ...props,
13013
13234
  $backgroundUrl: backgroundUrl,
13014
13235
  $gradientBackground: gradientBackground,
13236
+ $isScrubbable: isScrubbable,
13015
13237
  $width: width,
13238
+ onBlur: handleMouseOut,
13239
+ onMouseMove: handleMouseMove,
13240
+ onMouseOut: handleMouseOut,
13016
13241
  role: "presentation",
13017
13242
  children: [
13018
- (0, import_type_guards55.isNotNil)(children) ? children : null,
13019
- (0, import_type_guards55.isNotNil)(thumbnailUrl) ? /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
13020
- ThumbnailImage,
13021
- {
13022
- thumbnailImageType,
13023
- thumbnailUrl
13024
- }
13025
- ) : null
13243
+ (0, import_type_guards56.isNotNil)(children) ? children : null,
13244
+ thumbnailContent
13026
13245
  ]
13027
13246
  }
13028
13247
  );
@@ -13032,13 +13251,13 @@ Thumbnail.displayName = "Thumbnail";
13032
13251
 
13033
13252
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
13034
13253
  var import_react72 = __toESM(require("react"));
13035
- var import_styled_components93 = __toESM(require("styled-components"));
13036
- var import_type_guards56 = require("@wistia/type-guards");
13037
- var import_jsx_runtime273 = (
13254
+ var import_styled_components94 = __toESM(require("styled-components"));
13255
+ var import_type_guards57 = require("@wistia/type-guards");
13256
+ var import_jsx_runtime274 = (
13038
13257
  // ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
13039
13258
  require("react/jsx-runtime")
13040
13259
  );
13041
- var StyledThumbnailCollage = import_styled_components93.default.div`
13260
+ var StyledThumbnailCollage = import_styled_components94.default.div`
13042
13261
  display: grid;
13043
13262
  gap: var(--wui-space-01);
13044
13263
  width: 100%;
@@ -13113,13 +13332,13 @@ var ThumbnailCollage = ({
13113
13332
  }) => {
13114
13333
  const thumbnailArray = import_react72.default.Children.toArray(children);
13115
13334
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
13116
- const thumbnails = (0, import_type_guards56.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
13335
+ const thumbnails = (0, import_type_guards57.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
13117
13336
  return import_react72.default.cloneElement(child, {
13118
13337
  ...child.props,
13119
13338
  children: void 0
13120
13339
  });
13121
13340
  }) : [
13122
- /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
13341
+ /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
13123
13342
  Thumbnail,
13124
13343
  {
13125
13344
  gradientBackground,
@@ -13128,7 +13347,7 @@ var ThumbnailCollage = ({
13128
13347
  "fallback"
13129
13348
  )
13130
13349
  ];
13131
- return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
13350
+ return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
13132
13351
  StyledThumbnailCollage,
13133
13352
  {
13134
13353
  $gradientBackground: gradientBackground,
@@ -13140,26 +13359,26 @@ var ThumbnailCollage = ({
13140
13359
  };
13141
13360
 
13142
13361
  // src/components/WistiaLogo/WistiaLogo.tsx
13143
- var import_styled_components94 = __toESM(require("styled-components"));
13144
- var import_type_guards57 = require("@wistia/type-guards");
13145
- var import_jsx_runtime274 = require("react/jsx-runtime");
13362
+ var import_styled_components95 = __toESM(require("styled-components"));
13363
+ var import_type_guards58 = require("@wistia/type-guards");
13364
+ var import_jsx_runtime275 = require("react/jsx-runtime");
13146
13365
  var renderBrandmark = (brandmarkColor, iconOnly) => {
13147
13366
  if (iconOnly) {
13148
- return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
13367
+ return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
13149
13368
  "g",
13150
13369
  {
13151
13370
  "data-testid": "ui-wistia-logo-brandmark",
13152
13371
  fill: brandmarkColor,
13153
- children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
13372
+ children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
13154
13373
  }
13155
13374
  );
13156
13375
  }
13157
- return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
13376
+ return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
13158
13377
  "g",
13159
13378
  {
13160
13379
  "data-testid": "ui-wistia-logo-brandmark",
13161
13380
  fill: brandmarkColor,
13162
- children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
13381
+ children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
13163
13382
  }
13164
13383
  );
13165
13384
  };
@@ -13167,12 +13386,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
13167
13386
  if (iconOnly) {
13168
13387
  return null;
13169
13388
  }
13170
- return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
13389
+ return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
13171
13390
  "g",
13172
13391
  {
13173
13392
  "data-testid": "ui-wistia-logo-logotype",
13174
13393
  fill: logotypeColor,
13175
- children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
13394
+ children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
13176
13395
  }
13177
13396
  );
13178
13397
  };
@@ -13182,7 +13401,7 @@ var computedViewBox = (iconOnly) => {
13182
13401
  }
13183
13402
  return "0 0 144 31.47";
13184
13403
  };
13185
- var WistiaLogoComponent = import_styled_components94.default.svg`
13404
+ var WistiaLogoComponent = import_styled_components95.default.svg`
13186
13405
  height: ${({ height }) => `${height}px`};
13187
13406
 
13188
13407
  /* ensure it will always fit on mobile */
@@ -13198,12 +13417,12 @@ var WistiaLogoComponent = import_styled_components94.default.svg`
13198
13417
  ${({ $opticallyCentered, $iconOnly }) => {
13199
13418
  if ($opticallyCentered) {
13200
13419
  if ($iconOnly) {
13201
- return import_styled_components94.css`
13420
+ return import_styled_components95.css`
13202
13421
  aspect-ratio: 1;
13203
13422
  padding: 11.85% 3.12% 13.91%;
13204
13423
  `;
13205
13424
  }
13206
- return import_styled_components94.css`
13425
+ return import_styled_components95.css`
13207
13426
  aspect-ratio: 127 / 32;
13208
13427
  `;
13209
13428
  }
@@ -13240,7 +13459,7 @@ var WistiaLogo = ({
13240
13459
  };
13241
13460
  const brandmarkColor = VARIANT_COLORS[variant].brandmark;
13242
13461
  const logotypeColor = VARIANT_COLORS[variant].logotype;
13243
- const Logo = /* @__PURE__ */ (0, import_jsx_runtime274.jsxs)(
13462
+ const Logo = /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(
13244
13463
  WistiaLogoComponent,
13245
13464
  {
13246
13465
  $hoverColor: hoverColor,
@@ -13253,39 +13472,39 @@ var WistiaLogo = ({
13253
13472
  xmlns: "http://www.w3.org/2000/svg",
13254
13473
  ...props,
13255
13474
  children: [
13256
- /* @__PURE__ */ (0, import_jsx_runtime274.jsx)("title", { children: title }),
13257
- (0, import_type_guards57.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime274.jsx)("desc", { children: description }) : null,
13475
+ /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("title", { children: title }),
13476
+ (0, import_type_guards58.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("desc", { children: description }) : null,
13258
13477
  renderBrandmark(brandmarkColor, iconOnly),
13259
13478
  renderLogotype(logotypeColor, iconOnly)
13260
13479
  ]
13261
13480
  }
13262
13481
  );
13263
- return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime274.jsx)("a", { href, children: Logo }) : Logo;
13482
+ return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("a", { href, children: Logo }) : Logo;
13264
13483
  };
13265
13484
  WistiaLogo.displayName = "WistiaLogo";
13266
13485
 
13267
13486
  // src/components/List/List.tsx
13268
- var import_type_guards59 = require("@wistia/type-guards");
13269
- var import_styled_components96 = __toESM(require("styled-components"));
13487
+ var import_type_guards60 = require("@wistia/type-guards");
13488
+ var import_styled_components97 = __toESM(require("styled-components"));
13270
13489
 
13271
13490
  // src/components/List/ListItem.tsx
13272
- var import_styled_components95 = __toESM(require("styled-components"));
13273
- var import_type_guards58 = require("@wistia/type-guards");
13274
- var import_jsx_runtime275 = require("react/jsx-runtime");
13275
- var ListItemComponent = import_styled_components95.default.li`
13491
+ var import_styled_components96 = __toESM(require("styled-components"));
13492
+ var import_type_guards59 = require("@wistia/type-guards");
13493
+ var import_jsx_runtime276 = require("react/jsx-runtime");
13494
+ var ListItemComponent = import_styled_components96.default.li`
13276
13495
  margin-bottom: var(--wui-space-02);
13277
13496
  `;
13278
13497
  var ListItem = ({ children }) => {
13279
- if ((0, import_type_guards58.isNil)(children)) {
13498
+ if ((0, import_type_guards59.isNil)(children)) {
13280
13499
  return null;
13281
13500
  }
13282
- return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(ListItemComponent, { children });
13501
+ return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(ListItemComponent, { children });
13283
13502
  };
13284
13503
  ListItem.displayName = "ListItem";
13285
13504
 
13286
13505
  // src/components/List/List.tsx
13287
- var import_jsx_runtime276 = require("react/jsx-runtime");
13288
- var spacesStyle = import_styled_components96.css`
13506
+ var import_jsx_runtime277 = require("react/jsx-runtime");
13507
+ var spacesStyle = import_styled_components97.css`
13289
13508
  overflow: hidden;
13290
13509
  padding-left: 0;
13291
13510
  vertical-align: bottom;
@@ -13307,7 +13526,7 @@ var spacesStyle = import_styled_components96.css`
13307
13526
  }
13308
13527
  }
13309
13528
  `;
13310
- var commasStyle = import_styled_components96.css`
13529
+ var commasStyle = import_styled_components97.css`
13311
13530
  ${spacesStyle};
13312
13531
 
13313
13532
  li {
@@ -13317,7 +13536,7 @@ var commasStyle = import_styled_components96.css`
13317
13536
  }
13318
13537
  }
13319
13538
  `;
13320
- var slashesStyle = import_styled_components96.css`
13539
+ var slashesStyle = import_styled_components97.css`
13321
13540
  ${spacesStyle};
13322
13541
 
13323
13542
  li {
@@ -13328,7 +13547,7 @@ var slashesStyle = import_styled_components96.css`
13328
13547
  }
13329
13548
  }
13330
13549
  `;
13331
- var breadcrumbsStyle = import_styled_components96.css`
13550
+ var breadcrumbsStyle = import_styled_components97.css`
13332
13551
  ${spacesStyle};
13333
13552
 
13334
13553
  li {
@@ -13339,11 +13558,11 @@ var breadcrumbsStyle = import_styled_components96.css`
13339
13558
  }
13340
13559
  }
13341
13560
  `;
13342
- var unbulletedStyle = import_styled_components96.css`
13561
+ var unbulletedStyle = import_styled_components97.css`
13343
13562
  list-style: none;
13344
13563
  padding-left: 0;
13345
13564
  `;
13346
- var ListComponent = import_styled_components96.default.ul`
13565
+ var ListComponent = import_styled_components97.default.ul`
13347
13566
  list-style-position: outside;
13348
13567
  margin: 0 0 var(--wui-space-01);
13349
13568
  padding: 0 0 0 var(--wui-space-04);
@@ -13370,7 +13589,7 @@ var ListComponent = import_styled_components96.default.ul`
13370
13589
  `;
13371
13590
  var renderListComponent = (listItems, variant, { ...otherProps }) => {
13372
13591
  const elementType = variant === "ordered" ? "ol" : "ul";
13373
- return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
13592
+ return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
13374
13593
  ListComponent,
13375
13594
  {
13376
13595
  as: elementType,
@@ -13387,7 +13606,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
13387
13606
  const nextItem = listItems[i + 1];
13388
13607
  const key = `item-${itemCount += 1}`;
13389
13608
  if (Array.isArray(nextItem)) {
13390
- return /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(ListItem, { children: [
13609
+ return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)(ListItem, { children: [
13391
13610
  item,
13392
13611
  renderListFromArray(nextItem, variant, otherProps)
13393
13612
  ] }, key);
@@ -13395,7 +13614,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
13395
13614
  if (Array.isArray(item)) {
13396
13615
  return null;
13397
13616
  }
13398
- return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(ListItem, { children: item }, key);
13617
+ return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(ListItem, { children: item }, key);
13399
13618
  });
13400
13619
  return renderListComponent(items, variant, otherProps);
13401
13620
  };
@@ -13406,13 +13625,13 @@ var List = ({
13406
13625
  ...otherProps
13407
13626
  }) => {
13408
13627
  const listVariant = variant ?? "bullets";
13409
- if ((0, import_type_guards59.isNotNil)(children)) {
13628
+ if ((0, import_type_guards60.isNotNil)(children)) {
13410
13629
  if (Array.isArray(children) && !children.length) {
13411
13630
  return null;
13412
13631
  }
13413
13632
  return renderListComponent(children, listVariant, otherProps);
13414
13633
  }
13415
- if ((0, import_type_guards59.isNotNil)(items)) {
13634
+ if ((0, import_type_guards60.isNotNil)(items)) {
13416
13635
  if (!items.length) {
13417
13636
  return null;
13418
13637
  }