@wistia/ui 0.19.4-beta.9622bd7f.70f808c → 0.19.4-beta.cecd222b.f0029a9

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.19.4-beta.9622bd7f.70f808c
3
+ * @license @wistia/ui v0.19.4-beta.cecd222b.f0029a9
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -31,6 +31,7 @@ var globalStyleAdjustmentsCss = css`
31
31
  -webkit-tap-highlight-color: rgb(0 0 0 / 0%); /* 2 */
32
32
  -moz-text-size-adjust: none; /* 3 */
33
33
  -webkit-text-size-adjust: none;
34
+ /* stylelint-disable-next-line plugin/use-baseline */
34
35
  text-size-adjust: none;
35
36
  height: -webkit-fill-available; /* 4 */
36
37
  }
@@ -2335,7 +2336,9 @@ var differenceInCalendarDays = (dateLeft, dateRight) => {
2335
2336
 
2336
2337
  // src/helpers/dateTime/timeAgoString.ts
2337
2338
  var timeAgoString = (date, { nowAnchor = /* @__PURE__ */ new Date(), includeTime = true } = {}) => {
2338
- if (isInvalidDate(date)) return "";
2339
+ if (isInvalidDate(date)) {
2340
+ return "";
2341
+ }
2339
2342
  const minutesAgo = (nowAnchor.valueOf() - date.valueOf()) / (secondsInMinute * milisecondsInSecond);
2340
2343
  const minutesAgoRounded = Math.round(minutesAgo);
2341
2344
  const differenceInDays = differenceInCalendarDays(nowAnchor, date);
@@ -8600,7 +8603,9 @@ var getFillViewportStyle = (fillViewport) => {
8600
8603
  return void 0;
8601
8604
  };
8602
8605
  var getFlexStyle = (flexMode) => {
8603
- if (!flexMode) return null;
8606
+ if (!flexMode) {
8607
+ return null;
8608
+ }
8604
8609
  switch (flexMode) {
8605
8610
  // grows to fill space, won't shrink, starts at 0
8606
8611
  case "grow":
@@ -9327,13 +9332,19 @@ var Banner = ({
9327
9332
  const hasImage = isNotNil13(image);
9328
9333
  const shouldShowImage = hasImage && (isVerticalLayout || width >= MIN_IMAGE_WIDTH);
9329
9334
  const iconPosition = useMemo5(() => {
9330
- if (isNil11(icon)) return "none";
9331
- if (isSmallContainer) return shouldShowImage ? "inline" : "above";
9335
+ if (isNil11(icon)) {
9336
+ return "none";
9337
+ }
9338
+ if (isSmallContainer) {
9339
+ return shouldShowImage ? "inline" : "above";
9340
+ }
9332
9341
  return prominence === "secondary" ? "inline" : "above";
9333
9342
  }, [icon, isSmallContainer, shouldShowImage, prominence]);
9334
9343
  const hasActions = isNotNil13(primaryAction) || isNotNil13(secondaryAction);
9335
9344
  const contentDirection = useMemo5(() => {
9336
- if (orientation === "horizontal" && !hasActions) return "row";
9345
+ if (orientation === "horizontal" && !hasActions) {
9346
+ return "row";
9347
+ }
9337
9348
  return !shouldShowImage && prominence === "primary" && !isSmallContainer && !isVerticalLayout ? "row" : "column";
9338
9349
  }, [orientation, shouldShowImage, prominence, isSmallContainer, isVerticalLayout, hasActions]);
9339
9350
  const headingVariant = isSmallContainer || prominence === "primary" ? "heading5" : "heading3";
@@ -10077,8 +10088,12 @@ var sizeLarge = css26`
10077
10088
  --wui-checkbox-icon-size: 11px;
10078
10089
  `;
10079
10090
  var getSizeCss = (size) => {
10080
- if (size === "sm") return sizeSmall;
10081
- if (size === "lg") return sizeLarge;
10091
+ if (size === "sm") {
10092
+ return sizeSmall;
10093
+ }
10094
+ if (size === "lg") {
10095
+ return sizeLarge;
10096
+ }
10082
10097
  return sizeMedium;
10083
10098
  };
10084
10099
  var StyledCheckboxWrapper = styled29.div`
@@ -10223,7 +10238,9 @@ Checkbox.displayName = "Checkbox_UI";
10223
10238
  // src/components/ClickRegion/ClickRegion.tsx
10224
10239
  import { Children as Children3, cloneElement as cloneElement3, useCallback as useCallback8, useEffect as useEffect9 } from "react";
10225
10240
  var isClickableElement = (element) => {
10226
- if (!element) return false;
10241
+ if (!element) {
10242
+ return false;
10243
+ }
10227
10244
  const el = element;
10228
10245
  return el.closest("button") !== null || el.closest("a") !== null || el.closest("input") !== null || el.closest("select") !== null || el.closest("textarea") !== null || el.closest("label") !== null || el.closest("[data-wui-faux-input]") !== null;
10229
10246
  };
@@ -14483,7 +14500,9 @@ var EditableHeading = ({
14483
14500
  const [headingHeight, setHeadingHeight] = useState18("60");
14484
14501
  const headingRef = useRef16(null);
14485
14502
  const handleSetEditing = (editing) => {
14486
- if (editingDisabled) return;
14503
+ if (editingDisabled) {
14504
+ return;
14505
+ }
14487
14506
  if (editing && headingRef.current) {
14488
14507
  setHeadingHeight(`${headingRef.current.offsetHeight}`);
14489
14508
  }
@@ -14765,7 +14784,7 @@ var EditableTextDisplayComponent = forwardRef21(
14765
14784
  };
14766
14785
  const elementType = renderAs ?? getDefaultTypographicElement(typographicVariant);
14767
14786
  const displayText = value.length > 0 ? value : placeholder;
14768
- const isPlaceholderVisible = value.length === 0 && !!placeholder;
14787
+ const isPlaceholderVisible = value.length === 0 && Boolean(placeholder);
14769
14788
  if (isEditing) {
14770
14789
  return null;
14771
14790
  }
@@ -14910,7 +14929,9 @@ var EditableTextInput = (props) => {
14910
14929
  }, 0);
14911
14930
  }
14912
14931
  };
14913
- if (!isEditing) return null;
14932
+ if (!isEditing) {
14933
+ return null;
14934
+ }
14914
14935
  return /* @__PURE__ */ jsx289(
14915
14936
  StyledInput2,
14916
14937
  {
@@ -14991,7 +15012,9 @@ var EditableTextSubmitButton = ({
14991
15012
  onClick: handleClick,
14992
15013
  "data-wui-editable-text-submit": true
14993
15014
  };
14994
- if (!isEditing) return null;
15015
+ if (!isEditing) {
15016
+ return null;
15017
+ }
14995
15018
  return cloneElement5(onlyChild, triggerProps);
14996
15019
  };
14997
15020
 
@@ -15021,7 +15044,9 @@ var EditableTextCancelButton = ({
15021
15044
  onClick: handleClick,
15022
15045
  "data-wui-editable-text-cancel": true
15023
15046
  };
15024
- if (!isEditing) return null;
15047
+ if (!isEditing) {
15048
+ return null;
15049
+ }
15025
15050
  return cloneElement6(onlyChild, triggerProps);
15026
15051
  };
15027
15052
 
@@ -15045,7 +15070,9 @@ var EditableTextTrigger = ({
15045
15070
  "data-wui-editable-text-trigger": true,
15046
15071
  ...props
15047
15072
  };
15048
- if (isEditing) return null;
15073
+ if (isEditing) {
15074
+ return null;
15075
+ }
15049
15076
  return cloneElement7(onlyChild, triggerProps);
15050
15077
  };
15051
15078
 
@@ -16470,8 +16497,12 @@ var sizeLarge2 = css42`
16470
16497
  --wui-radio-icon-size: 10px;
16471
16498
  `;
16472
16499
  var getSizeCss3 = (size) => {
16473
- if (size === "sm") return sizeSmall2;
16474
- if (size === "lg") return sizeLarge2;
16500
+ if (size === "sm") {
16501
+ return sizeSmall2;
16502
+ }
16503
+ if (size === "lg") {
16504
+ return sizeLarge2;
16505
+ }
16475
16506
  return sizeMedium2;
16476
16507
  };
16477
16508
  var StyledRadioWrapper = styled84.div`
@@ -18434,7 +18465,9 @@ var Thumbnail = forwardRef37(
18434
18465
  }, [storyboard]);
18435
18466
  const handleMouseMove = useCallback20(
18436
18467
  (mouseEvent) => {
18437
- if (!isScrubbable) return;
18468
+ if (!isScrubbable) {
18469
+ return;
18470
+ }
18438
18471
  const elem = mouseEvent.currentTarget;
18439
18472
  const relMousePos = getRelativeMousePosition(elem, mouseEvent);
18440
18473
  const newPercent = relMousePos.left / elem.clientWidth;
@@ -18446,7 +18479,9 @@ var Thumbnail = forwardRef37(
18446
18479
  [isScrubbable, trackStoryboardLoadStatus]
18447
18480
  );
18448
18481
  const handleMouseOut = useCallback20(() => {
18449
- if (!isScrubbable) return;
18482
+ if (!isScrubbable) {
18483
+ return;
18484
+ }
18450
18485
  setIsMouseOver(false);
18451
18486
  setCursorPosition(null);
18452
18487
  }, [isScrubbable]);