@wistia/ui 1.0.0-beta.7e3f4bc4.ad9b5a1 → 1.0.0-beta.db6bcdef.bed5fc6

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v1.0.0-beta.7e3f4bc4.ad9b5a1
3
+ * @license @wistia/ui v1.0.0-beta.db6bcdef.bed5fc6
4
4
  *
5
5
  * Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
6
6
  *
@@ -243,7 +243,7 @@ const AriaLiveProvider = ({ children, debug = false }) => {
243
243
  liveRegion.setAttribute("aria-live", "polite");
244
244
  liveRegion.setAttribute("aria-atomic", "true");
245
245
  Object.assign(liveRegion.style, debug ? debugStyle : visuallyHiddenStyle);
246
- document.body.appendChild(liveRegion);
246
+ document.body.append(liveRegion);
247
247
  liveRegionRef.current = liveRegion;
248
248
  return () => {
249
249
  if (liveRegionRef.current) document.body.removeChild(liveRegionRef.current);
@@ -727,7 +727,7 @@ const parseDateString = (str) => {
727
727
  if (lower === "today") return startOfToday();
728
728
  if (lower === "tomorrow") return startOfTomorrow();
729
729
  const monthIndex = MONTH_NAMES.findIndex((name) => name.toLowerCase().startsWith(lower));
730
- if (monthIndex > -1) {
730
+ if (monthIndex !== -1) {
731
731
  const today = startOfToday();
732
732
  let date = new Date(today.getFullYear(), monthIndex, 1);
733
733
  if (isPast(date)) date = new Date(today.getFullYear() + 1, monthIndex, 1);
@@ -775,9 +775,9 @@ const getLocalDateParts = (date) => {
775
775
  const dayPart = parts.find((part) => part.type === "day");
776
776
  if (isNil(yearPart) || isNil(monthPart) || isNil(dayPart)) throw new Error("Failed to parse date parts");
777
777
  return {
778
- year: parseInt(yearPart.value, 10),
779
- month: parseInt(monthPart.value, 10),
780
- day: parseInt(dayPart.value, 10)
778
+ year: Number.parseInt(yearPart.value, 10),
779
+ month: Number.parseInt(monthPart.value, 10),
780
+ day: Number.parseInt(dayPart.value, 10)
781
781
  };
782
782
  };
783
783
  //#endregion
@@ -1338,7 +1338,7 @@ const teardownScopedFocus = () => {
1338
1338
  };
1339
1339
  const scopeTab = (node, event) => {
1340
1340
  const tabbable = findTabbableDescendants(node);
1341
- if (!tabbable.length) {
1341
+ if (!isNonEmptyArray(tabbable)) {
1342
1342
  event.preventDefault();
1343
1343
  return;
1344
1344
  }
@@ -8850,7 +8850,7 @@ const isValidHexChar = (char) => {
8850
8850
  const normalizeHexInput = (input) => {
8851
8851
  let cleaned = input.trim();
8852
8852
  if (!cleaned.startsWith("#")) cleaned = `#${cleaned}`;
8853
- cleaned = `#${cleaned.slice(1).replace(/#/g, "")}`;
8853
+ cleaned = `#${cleaned.slice(1).replaceAll("#", "")}`;
8854
8854
  return cleaned.slice(0, SIX_DIGIT_HEX_CODE_LENGTH).toLocaleLowerCase();
8855
8855
  };
8856
8856
  /**
@@ -9752,7 +9752,7 @@ const Combobox = ({ placeholder, value, onChange, searchValue, onSearchValueChan
9752
9752
  style: { opacity: value.includes(match) ? 1 : 0 },
9753
9753
  type: "checkmark"
9754
9754
  })]
9755
- }, match)), !matches.length && /* @__PURE__ */ jsx(NoResults, { children: "No results found" })]
9755
+ }, match)), !isNonEmptyArray(matches) && /* @__PURE__ */ jsx(NoResults, { children: "No results found" })]
9756
9756
  })]
9757
9757
  });
9758
9758
  };
@@ -13504,11 +13504,11 @@ const renderListFromArray = (listItems, variant, otherProps) => {
13504
13504
  const List = ({ children, items, variant, ...otherProps }) => {
13505
13505
  const listVariant = variant ?? "bullets";
13506
13506
  if (isNotNil(children)) {
13507
- if (Array.isArray(children) && !children.length) return null;
13507
+ if (Array.isArray(children) && !isNonEmptyArray(children)) return null;
13508
13508
  return renderListComponent(children, listVariant, otherProps);
13509
13509
  }
13510
13510
  if (isNotNil(items)) {
13511
- if (!items.length) return null;
13511
+ if (!isNonEmptyArray(items)) return null;
13512
13512
  return renderListFromArray(items, listVariant, otherProps);
13513
13513
  }
13514
13514
  return null;
@@ -16269,7 +16269,7 @@ const StyledThumbnail = styled.div`
16269
16269
  `;
16270
16270
  const StoryboardRenderer = ({ storyboard, width, percent, cursorPosition, isStoryboardReady, aspectRatio }) => {
16271
16271
  const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
16272
- const targetWidth = isString(width) ? parseInt(width, 10) : Number(width);
16272
+ const targetWidth = isString(width) ? Number.parseInt(width, 10) : Number(width);
16273
16273
  return /* @__PURE__ */ jsx(ThumbnailStoryboardViewer, {
16274
16274
  cursorPosition: isStoryboardReady ? cursorPosition : null,
16275
16275
  frameCount,