@wistia/ui 0.9.2-beta.e562f7d7.1a8cf9b → 0.9.2

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.9.2-beta.e562f7d7.1a8cf9b
3
+ * @license @wistia/ui v0.9.2
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7242,8 +7242,6 @@ var StyledActionButton = styled6(Button)`
7242
7242
 
7243
7243
  &:hover,
7244
7244
  :focus-visible {
7245
- --wui-color-text: var(--wui-color-text-button);
7246
-
7247
7245
  ${({ $hoverColorScheme }) => getColorScheme($hoverColorScheme)};
7248
7246
  background: var(--wui-color-bg-surface-tertiary);
7249
7247
  }
@@ -7286,7 +7284,7 @@ var StyledSecondaryIcon = styled6.div`
7286
7284
  width: 100%;
7287
7285
  display: flex;
7288
7286
  justify-content: flex-end;
7289
- transition: all var(--wui-motion-duration-02) var(--wui-motion-ease-out);
7287
+ transition: all var(--wui-motion-duration-02) var(--wui-motion-ease-in);
7290
7288
 
7291
7289
  ${({ $hideUntilHover }) => $hideUntilHover && css17`
7292
7290
  will-change: transform;
@@ -8456,9 +8454,8 @@ var CollapsibleContent = ({ clamp, children }) => {
8456
8454
  };
8457
8455
 
8458
8456
  // src/components/DataCards/DataCard.tsx
8459
- import { useRef as useRef6 } from "react";
8460
8457
  import styled24, { keyframes } from "styled-components";
8461
- import { isNotNil as isNotNil15, isNotNull } from "@wistia/type-guards";
8458
+ import { isNotNull } from "@wistia/type-guards";
8462
8459
 
8463
8460
  // src/components/Heading/Heading.tsx
8464
8461
  import { forwardRef as forwardRef8 } from "react";
@@ -8590,6 +8587,7 @@ var Heading = makePolymorphic(HeadingComponent);
8590
8587
  // src/components/DataCards/DataCard.tsx
8591
8588
  import { jsx as jsx213, jsxs as jsxs17 } from "react/jsx-runtime";
8592
8589
  var StyledDataCard = styled24.div`
8590
+ ${({ $colorScheme }) => getColorScheme($colorScheme)}
8593
8591
  display: grid;
8594
8592
  grid-template-areas: 'label slot' 'value value';
8595
8593
  grid-template-rows: auto auto;
@@ -8600,49 +8598,6 @@ var StyledDataCard = styled24.div`
8600
8598
  flex: 1;
8601
8599
  border-radius: var(--wui-border-radius-02);
8602
8600
  position: relative;
8603
- transition: background var(--wui-motion-duration-01) var(--wui-motion-ease);
8604
-
8605
- &[data-click-region] {
8606
- [data-wui-data-card-hover-icon] {
8607
- opacity: 0;
8608
- transform: translateX(-16px);
8609
- transition: all var(--wui-motion-duration-02) var(--wui-motion-ease-out);
8610
- }
8611
-
8612
- &:not([disabled]) {
8613
- cursor: pointer;
8614
-
8615
- &:hover,
8616
- &:has([data-click-region-target-button]:focus-visible),
8617
- &:has([data-click-region-target-link]:focus-visible) {
8618
- --wui-color-text: var(--wui-color-text-button);
8619
-
8620
- background: var(--wui-color-bg-surface-secondary-hover);
8621
-
8622
- [data-wui-data-card-hover-icon] {
8623
- opacity: 1;
8624
- transform: translateX(0);
8625
- }
8626
- }
8627
-
8628
- &:has([data-click-region-target-button]:active),
8629
- &:has([data-click-region-target-link]:active) {
8630
- background: var(--wui-color-bg-surface-secondary-active);
8631
- }
8632
-
8633
- &:has([data-click-region-target-button]:focus-visible),
8634
- &:has([data-click-region-target-link]:focus-visible) {
8635
- outline: 2px solid var(--wui-color-focus-ring);
8636
- outline-offset: 2px;
8637
- }
8638
- }
8639
-
8640
- &[disabled] {
8641
- pointer-events: none;
8642
- }
8643
-
8644
- ${({ $colorScheme }) => getColorScheme($colorScheme)}
8645
- }
8646
8601
  `;
8647
8602
  var shimmer = keyframes`
8648
8603
  0% {
@@ -8688,7 +8643,7 @@ var StyledDataCardTrendContainer = styled24.div`
8688
8643
  bottom: var(--wui-space-01);
8689
8644
  right: var(--wui-space-01);
8690
8645
  `;
8691
- var DataCardInner = ({
8646
+ var DataCard = ({
8692
8647
  label,
8693
8648
  value,
8694
8649
  upperRightSlot,
@@ -8723,38 +8678,6 @@ var DataCardInner = ({
8723
8678
  ]
8724
8679
  }
8725
8680
  );
8726
- var DataCardArrowIcon = /* @__PURE__ */ jsx213(
8727
- Icon,
8728
- {
8729
- "data-wui-data-card-hover-icon": true,
8730
- type: "arrow-right"
8731
- }
8732
- );
8733
- var DataCard = (props) => {
8734
- const ref = useRef6(null);
8735
- if (isNotNil15(props.href) || isNotNil15(props.onClick)) {
8736
- return /* @__PURE__ */ jsx213(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ jsx213(
8737
- DataCardInner,
8738
- {
8739
- upperRightSlot: props.upperRightSlot ?? DataCardArrowIcon,
8740
- ...props,
8741
- label: /* @__PURE__ */ jsx213(
8742
- Button,
8743
- {
8744
- ref,
8745
- ...isNotNil15(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
8746
- disabled: props.disabled ?? false,
8747
- href: props.href,
8748
- onClick: props.onClick,
8749
- unstyled: true,
8750
- children: props.label
8751
- }
8752
- )
8753
- }
8754
- ) });
8755
- }
8756
- return /* @__PURE__ */ jsx213(DataCardInner, { ...props });
8757
- };
8758
8681
  DataCard.displayName = "DataCard";
8759
8682
 
8760
8683
  // src/components/DataCards/DataCards.tsx
@@ -8797,7 +8720,7 @@ import styled27 from "styled-components";
8797
8720
  // src/components/Text/Text.tsx
8798
8721
  import { forwardRef as forwardRef9 } from "react";
8799
8722
  import styled26, { css as css23 } from "styled-components";
8800
- import { isNotNil as isNotNil16 } from "@wistia/type-guards";
8723
+ import { isNotNil as isNotNil15 } from "@wistia/type-guards";
8801
8724
  import { jsx as jsx215 } from "react/jsx-runtime";
8802
8725
  var bodyBoldStyles = css23`
8803
8726
  > strong,
@@ -8942,7 +8865,7 @@ var StyledText = styled26.div`
8942
8865
  margin: 0;
8943
8866
  ${({ $variant }) => variantStyleMap2[$variant]}
8944
8867
  ${({ $truncate }) => {
8945
- if (isNotNil16($truncate)) {
8868
+ if (isNotNil15($truncate)) {
8946
8869
  return css23`
8947
8870
  ${ellipsisStyle};
8948
8871
  ${lineClampCss($truncate)};
@@ -9083,7 +9006,7 @@ Divider.displayName = "Divider";
9083
9006
 
9084
9007
  // src/components/EditableHeading/EditableHeading.tsx
9085
9008
  import styled31, { css as css27 } from "styled-components";
9086
- import { useState as useState9, useRef as useRef8 } from "react";
9009
+ import { useState as useState9, useRef as useRef7 } from "react";
9087
9010
 
9088
9011
  // src/components/Tooltip/Tooltip.tsx
9089
9012
  import {
@@ -9241,9 +9164,9 @@ var Tooltip = ({
9241
9164
  Tooltip.displayName = "Tooltip";
9242
9165
 
9243
9166
  // src/components/Input/Input.tsx
9244
- import { forwardRef as forwardRef10, cloneElement as cloneElement3, useRef as useRef7 } from "react";
9167
+ import { forwardRef as forwardRef10, cloneElement as cloneElement3, useRef as useRef6 } from "react";
9245
9168
  import styled30, { css as css26 } from "styled-components";
9246
- import { isNil as isNil12, isNotNil as isNotNil17, isRecord as isRecord4 } from "@wistia/type-guards";
9169
+ import { isNil as isNil12, isNotNil as isNotNil16, isRecord as isRecord4 } from "@wistia/type-guards";
9247
9170
 
9248
9171
  // src/css/sharedStyles/inputCssVariables.ts
9249
9172
  import { css as css25 } from "styled-components";
@@ -9386,30 +9309,30 @@ var Input = forwardRef10(
9386
9309
  rightIcon,
9387
9310
  ...props
9388
9311
  }, externalRef) => {
9389
- const internalRef = useRef7();
9312
+ const internalRef = useRef6();
9390
9313
  const ref = (
9391
9314
  // eslint-disable-next-line react-compiler/react-compiler
9392
- isNotNil17(externalRef) && isRecord4(externalRef) && "current" in externalRef ? externalRef : internalRef
9315
+ isNotNil16(externalRef) && isRecord4(externalRef) && "current" in externalRef ? externalRef : internalRef
9393
9316
  );
9394
9317
  let leftIconToDisplay = leftIcon;
9395
9318
  if (isNil12(leftIcon) && type === "search") {
9396
9319
  leftIconToDisplay = /* @__PURE__ */ jsx219(Icon, { type: "search" });
9397
9320
  }
9398
- if (isNotNil17(leftIconToDisplay)) {
9321
+ if (isNotNil16(leftIconToDisplay)) {
9399
9322
  leftIconToDisplay = cloneElement3(leftIconToDisplay, {
9400
9323
  size: "md",
9401
9324
  className: "wui-input-left-icon"
9402
9325
  });
9403
9326
  }
9404
9327
  let rightIconToDisplay = rightIcon;
9405
- if (isNotNil17(rightIconToDisplay)) {
9328
+ if (isNotNil16(rightIconToDisplay)) {
9406
9329
  rightIconToDisplay = cloneElement3(rightIconToDisplay, {
9407
9330
  size: "md",
9408
9331
  className: "wui-input-right-icon"
9409
9332
  });
9410
9333
  }
9411
9334
  const handleFocus2 = (event) => {
9412
- if (isNotNil17(props.onFocus)) {
9335
+ if (isNotNil16(props.onFocus)) {
9413
9336
  props.onFocus(event);
9414
9337
  }
9415
9338
  if (autoSelect && isValidRef(ref) && "current" in ref) {
@@ -9499,7 +9422,7 @@ var EditableHeading = ({
9499
9422
  const [value, setValue] = useState9(children);
9500
9423
  const [previousValue, setPreviousValue] = useState9(children);
9501
9424
  const [headingHeight, setHeadingHeight] = useState9("60");
9502
- const headingRef = useRef8(null);
9425
+ const headingRef = useRef7(null);
9503
9426
  const handleSetEditing = (editing) => {
9504
9427
  if (editingDisabled) return;
9505
9428
  if (editing && headingRef.current) {
@@ -9578,7 +9501,7 @@ var EditableHeading = ({
9578
9501
  };
9579
9502
 
9580
9503
  // src/components/Form/Form.tsx
9581
- import { forwardRef as forwardRef12, useRef as useRef9, useMemo as useMemo4, createContext as createContext3, useState as useState10, useId as useId2 } from "react";
9504
+ import { forwardRef as forwardRef12, useRef as useRef8, useMemo as useMemo4, createContext as createContext3, useState as useState10, useId as useId2 } from "react";
9582
9505
  import styled33 from "styled-components";
9583
9506
  import { isNotUndefined as isNotUndefined7, isUndefined as isUndefined3 } from "@wistia/type-guards";
9584
9507
 
@@ -9640,7 +9563,7 @@ var FormComponent = ({
9640
9563
  }, forwardedRef) => {
9641
9564
  const [errors, setErrors] = useState10({});
9642
9565
  const [hasSubmitted, setHasSubmitted] = useState10(false);
9643
- const innerRef = useRef9();
9566
+ const innerRef = useRef8();
9644
9567
  const ref = forwardedRef ?? innerRef;
9645
9568
  const autoId = useId2();
9646
9569
  const id = props.id ?? autoId;
@@ -9752,14 +9675,14 @@ var useFormState = (action, initialData = {}) => {
9752
9675
  };
9753
9676
 
9754
9677
  // src/components/Form/FormErrorSummary.tsx
9755
- import { useContext as useContext3, useRef as useRef10 } from "react";
9678
+ import { useContext as useContext3, useRef as useRef9 } from "react";
9756
9679
  import { isArray, isNotUndefined as isNotUndefined8 } from "@wistia/type-guards";
9757
9680
  import { jsx as jsx223, jsxs as jsxs22 } from "react/jsx-runtime";
9758
9681
  var ErrorItem = ({ name, error, formId }) => {
9759
9682
  return /* @__PURE__ */ jsx223("li", { children: /* @__PURE__ */ jsx223(Link, { href: `#${formId}-${name}`, children: error }) }, name);
9760
9683
  };
9761
9684
  var FormErrorSummary = ({ description }) => {
9762
- const ref = useRef10(null);
9685
+ const ref = useRef9(null);
9763
9686
  const { formId, errors, hasSubmitted } = useContext3(FormContext);
9764
9687
  const isValid = Object.keys(errors).length === 0;
9765
9688
  if (isValid || !hasSubmitted) {
@@ -9792,7 +9715,7 @@ var FormErrorSummary = ({ description }) => {
9792
9715
  // src/components/FormField/FormField.tsx
9793
9716
  import { Children as Children4, cloneElement as cloneElement4, useContext as useContext4 } from "react";
9794
9717
  import styled36 from "styled-components";
9795
- import { isArray as isArray2, isNotNil as isNotNil18, isNotUndefined as isNotUndefined9, isUndefined as isUndefined4 } from "@wistia/type-guards";
9718
+ import { isArray as isArray2, isNotNil as isNotNil17, isNotUndefined as isNotUndefined9, isUndefined as isUndefined4 } from "@wistia/type-guards";
9796
9719
 
9797
9720
  // src/components/Label/Label.tsx
9798
9721
  import styled34, { css as css28 } from "styled-components";
@@ -9859,7 +9782,7 @@ import { createContext as createContext4, useMemo as useMemo5 } from "react";
9859
9782
 
9860
9783
  // src/components/FormGroup/FormGroup.tsx
9861
9784
  import styled35 from "styled-components";
9862
- import { useRef as useRef11 } from "react";
9785
+ import { useRef as useRef10 } from "react";
9863
9786
  import { jsx as jsx225, jsxs as jsxs23 } from "react/jsx-runtime";
9864
9787
  var StyledFieldset = styled35.fieldset`
9865
9788
  border: 0;
@@ -9868,7 +9791,7 @@ var StyledLegend = styled35.legend`
9868
9791
  margin-bottom: var(--space-01);
9869
9792
  `;
9870
9793
  var FormGroup = ({ children, label, ...props }) => {
9871
- const ref = useRef11();
9794
+ const ref = useRef10();
9872
9795
  return /* @__PURE__ */ jsxs23(
9873
9796
  Stack,
9874
9797
  {
@@ -10008,8 +9931,8 @@ var FormField = ({
10008
9931
  defaultValue
10009
9932
  };
10010
9933
  }
10011
- if (isNotNil18(checkboxGroup)) {
10012
- const computedName = isNotNil18(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
9934
+ if (isNotNil17(checkboxGroup)) {
9935
+ const computedName = isNotNil17(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
10013
9936
  const handleChange = (event) => {
10014
9937
  if (isNotUndefined9(props.onChange)) {
10015
9938
  props.onChange(event);
@@ -10022,7 +9945,7 @@ var FormField = ({
10022
9945
  ...childProps,
10023
9946
  name: computedName,
10024
9947
  onChange: handleChange,
10025
- "aria-invalid": isNotNil18(error)
9948
+ "aria-invalid": isNotNil17(error)
10026
9949
  };
10027
9950
  }
10028
9951
  Children4.only(children);
@@ -10033,9 +9956,9 @@ var FormField = ({
10033
9956
  "data-label-position": labelPosition ?? formState.labelPosition,
10034
9957
  children: [
10035
9958
  !isIntegratedLabel && /* @__PURE__ */ jsx227(Label, { htmlFor: computedId, children: label }),
10036
- isNotNil18(description) ? /* @__PURE__ */ jsx227(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
9959
+ isNotNil17(description) ? /* @__PURE__ */ jsx227(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
10037
9960
  cloneElement4(children, childProps),
10038
- isNotNil18(computedError) ? /* @__PURE__ */ jsxs24(Fragment6, { children: [
9961
+ isNotNil17(computedError) ? /* @__PURE__ */ jsxs24(Fragment6, { children: [
10039
9962
  /* @__PURE__ */ jsx227("div", {}),
10040
9963
  /* @__PURE__ */ jsx227(
10041
9964
  ErrorMessages,
@@ -10176,7 +10099,7 @@ InputClickToCopy.displayName = "InputClickToCopy";
10176
10099
 
10177
10100
  // src/components/KeyboardShortcut/KeyboardShortcut.tsx
10178
10101
  import styled39 from "styled-components";
10179
- import { isNotNil as isNotNil19 } from "@wistia/type-guards";
10102
+ import { isNotNil as isNotNil18 } from "@wistia/type-guards";
10180
10103
  import { jsx as jsx231, jsxs as jsxs25 } from "react/jsx-runtime";
10181
10104
  var StyledKeyboardShortcut = styled39.div`
10182
10105
  align-items: center;
@@ -10270,7 +10193,7 @@ var KeyboardShortcut = ({
10270
10193
  $fullWidth: fullWidth,
10271
10194
  ...otherProps,
10272
10195
  children: [
10273
- isNotNil19(label) && /* @__PURE__ */ jsx231(Label2, { children: label }),
10196
+ isNotNil18(label) && /* @__PURE__ */ jsx231(Label2, { children: label }),
10274
10197
  /* @__PURE__ */ jsx231(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ jsx231(
10275
10198
  StyledKey,
10276
10199
  {
@@ -10291,7 +10214,7 @@ import {
10291
10214
  DropdownMenuPortal,
10292
10215
  DropdownMenuContent
10293
10216
  } from "@radix-ui/react-dropdown-menu";
10294
- import { isNotNil as isNotNil20, isNotUndefined as isNotUndefined10 } from "@wistia/type-guards";
10217
+ import { isNotNil as isNotNil19, isNotUndefined as isNotUndefined10 } from "@wistia/type-guards";
10295
10218
  import { useMemo as useMemo7 } from "react";
10296
10219
 
10297
10220
  // src/components/Menu/MenuContext.tsx
@@ -10403,7 +10326,7 @@ var Menu = ({
10403
10326
  }) => {
10404
10327
  const contextValue = useMemo7(() => ({ compact }), [compact]);
10405
10328
  let controlProps = {
10406
- ...isNotNil20(onOpenChange) && isNotNil20(isOpen) ? { open: isOpen, onOpenChange } : {}
10329
+ ...isNotNil19(onOpenChange) && isNotNil19(isOpen) ? { open: isOpen, onOpenChange } : {}
10407
10330
  };
10408
10331
  if (disabled) {
10409
10332
  controlProps = {
@@ -10486,12 +10409,12 @@ import {
10486
10409
  DropdownMenuSubTrigger,
10487
10410
  DropdownMenuItem
10488
10411
  } from "@radix-ui/react-dropdown-menu";
10489
- import { isNotNil as isNotNil22 } from "@wistia/type-guards";
10412
+ import { isNotNil as isNotNil21 } from "@wistia/type-guards";
10490
10413
 
10491
10414
  // src/components/Menu/MenuItemButton.tsx
10492
10415
  import { forwardRef as forwardRef15 } from "react";
10493
10416
  import styled42 from "styled-components";
10494
- import { isNotNil as isNotNil21, isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
10417
+ import { isNotNil as isNotNil20, isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
10495
10418
  import { jsx as jsx234, jsxs as jsxs27 } from "react/jsx-runtime";
10496
10419
  var StyledButton3 = styled42(Button)`
10497
10420
  ${({ colorScheme }) => getColorScheme(colorScheme)};
@@ -10599,7 +10522,7 @@ var MenuItemButton = forwardRef15(({ children, appearance, command, icon, ...pro
10599
10522
  children: [
10600
10523
  props.leftIcon ? /* @__PURE__ */ jsx234(StyledLeftIconContainer, { children: props.leftIcon }) : null,
10601
10524
  /* @__PURE__ */ jsx234(StyledLabelAndDescriptionContainer, { children }),
10602
- isNotNil21(badge) || isNotNil21(command) ? /* @__PURE__ */ jsx234(StyledBadgeContainer, { children: badge ?? command }) : null,
10525
+ isNotNil20(badge) || isNotNil20(command) ? /* @__PURE__ */ jsx234(StyledBadgeContainer, { children: badge ?? command }) : null,
10603
10526
  props.rightIcon ? /* @__PURE__ */ jsx234(StyledRightIconContainer, { children: props.rightIcon }) : null
10604
10527
  ]
10605
10528
  }
@@ -10671,7 +10594,7 @@ var SubMenu = ({
10671
10594
  return isSmAndUp ? /* @__PURE__ */ jsxs28(DropdownMenuSub, { onOpenChange, children: [
10672
10595
  /* @__PURE__ */ jsxs28(SubMenuTrigger, { ...props, children: [
10673
10596
  /* @__PURE__ */ jsx236(MenuItemLabel, { children: label }),
10674
- isNotNil22(description) ? /* @__PURE__ */ jsx236(MenuItemDescription, { children: description }) : null
10597
+ isNotNil21(description) ? /* @__PURE__ */ jsx236(MenuItemDescription, { children: description }) : null
10675
10598
  ] }),
10676
10599
  /* @__PURE__ */ jsx236(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx236(SubMenuContent, { $compact: compact, children }) })
10677
10600
  ] }) : /* @__PURE__ */ jsxs28(DropdownMenuGroup, { children: [
@@ -10771,7 +10694,7 @@ import {
10771
10694
  DropdownMenuCheckboxItem,
10772
10695
  DropdownMenuItemIndicator as DropdownMenuItemIndicator2
10773
10696
  } from "@radix-ui/react-dropdown-menu";
10774
- import { isNotNil as isNotNil23 } from "@wistia/type-guards";
10697
+ import { isNotNil as isNotNil22 } from "@wistia/type-guards";
10775
10698
  import { jsx as jsx240, jsxs as jsxs29 } from "react/jsx-runtime";
10776
10699
  var CheckboxIndicator = ({ checked, ...props }) => {
10777
10700
  return checked ? /* @__PURE__ */ jsxs29(
@@ -10845,8 +10768,8 @@ var CheckboxMenuItem = ({
10845
10768
  MenuItemButton,
10846
10769
  {
10847
10770
  ...props,
10848
- leftIcon: isNotNil23(props.icon) ? props.icon : /* @__PURE__ */ jsx240(CheckboxIndicator, { checked }),
10849
- rightIcon: isNotNil23(props.icon) ? /* @__PURE__ */ jsx240(DropdownMenuItemIndicator2, { children: /* @__PURE__ */ jsx240(Icon, { type: "checkmark" }) }) : void 0
10771
+ leftIcon: isNotNil22(props.icon) ? props.icon : /* @__PURE__ */ jsx240(CheckboxIndicator, { checked }),
10772
+ rightIcon: isNotNil22(props.icon) ? /* @__PURE__ */ jsx240(DropdownMenuItemIndicator2, { children: /* @__PURE__ */ jsx240(Icon, { type: "checkmark" }) }) : void 0
10850
10773
  }
10851
10774
  )
10852
10775
  }
@@ -10858,7 +10781,7 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem";
10858
10781
  import { forwardRef as forwardRef19 } from "react";
10859
10782
  import styled49 from "styled-components";
10860
10783
  import { Root as DialogRoot, Portal as DialogPortal } from "@radix-ui/react-dialog";
10861
- import { isNotNil as isNotNil25 } from "@wistia/type-guards";
10784
+ import { isNotNil as isNotNil24 } from "@wistia/type-guards";
10862
10785
 
10863
10786
  // src/components/Modal/ModalHeader.tsx
10864
10787
  import styled46 from "styled-components";
@@ -10920,16 +10843,16 @@ import styled47, { css as css30 } from "styled-components";
10920
10843
  import { Content as DialogContent } from "@radix-ui/react-dialog";
10921
10844
 
10922
10845
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
10923
- import { useRef as useRef12, useEffect as useEffect10 } from "react";
10924
- import { isNotNil as isNotNil24 } from "@wistia/type-guards";
10846
+ import { useRef as useRef11, useEffect as useEffect10 } from "react";
10847
+ import { isNotNil as isNotNil23 } from "@wistia/type-guards";
10925
10848
  var useFocusRestore = () => {
10926
- const previouslyFocusedRef = useRef12(null);
10849
+ const previouslyFocusedRef = useRef11(null);
10927
10850
  useEffect10(() => {
10928
10851
  previouslyFocusedRef.current = document.activeElement;
10929
10852
  }, []);
10930
10853
  useEffect10(() => {
10931
10854
  return () => {
10932
- if (isNotNil24(previouslyFocusedRef.current)) {
10855
+ if (isNotNil23(previouslyFocusedRef.current)) {
10933
10856
  setTimeout(() => {
10934
10857
  previouslyFocusedRef.current?.focus();
10935
10858
  }, 0);
@@ -11120,7 +11043,7 @@ var Modal = forwardRef19(
11120
11043
  DialogRoot,
11121
11044
  {
11122
11045
  onOpenChange: (open2) => {
11123
- if (!open2 && isNotNil25(onRequestClose)) {
11046
+ if (!open2 && isNotNil24(onRequestClose)) {
11124
11047
  onRequestClose();
11125
11048
  }
11126
11049
  },
@@ -11135,7 +11058,7 @@ var Modal = forwardRef19(
11135
11058
  alignVertical,
11136
11059
  fullHeight,
11137
11060
  onOpenAutoFocus: (event) => {
11138
- if (isNotNil25(initialFocusRef) && initialFocusRef.current) {
11061
+ if (isNotNil24(initialFocusRef) && initialFocusRef.current) {
11139
11062
  event.preventDefault();
11140
11063
  requestAnimationFrame(() => {
11141
11064
  initialFocusRef.current?.focus();
@@ -11169,9 +11092,9 @@ import { Root, Trigger as Trigger2, Portal, Content as Content2, Close } from "@
11169
11092
  import styled51, { css as css32 } from "styled-components";
11170
11093
 
11171
11094
  // src/private/helpers/getControls/getControlProps.tsx
11172
- import { isNotNil as isNotNil26 } from "@wistia/type-guards";
11095
+ import { isNotNil as isNotNil25 } from "@wistia/type-guards";
11173
11096
  var getControlProps = (isOpen, onOpenChange) => {
11174
- return isNotNil26(onOpenChange) && isNotNil26(isOpen) ? { open: isOpen, onOpenChange } : {};
11097
+ return isNotNil25(onOpenChange) && isNotNil25(isOpen) ? { open: isOpen, onOpenChange } : {};
11175
11098
  };
11176
11099
 
11177
11100
  // src/components/Popover/PopoverArrow.tsx
@@ -11326,7 +11249,7 @@ Popover.displayName = "Popover";
11326
11249
  // src/components/ProgressBar/ProgressBar.tsx
11327
11250
  import styled52 from "styled-components";
11328
11251
  import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
11329
- import { isNotNil as isNotNil27 } from "@wistia/type-guards";
11252
+ import { isNotNil as isNotNil26 } from "@wistia/type-guards";
11330
11253
  import { jsx as jsx248, jsxs as jsxs34 } from "react/jsx-runtime";
11331
11254
  var ProgressBarWrapper = styled52.div`
11332
11255
  --progress-bar-height: 8px;
@@ -11381,7 +11304,7 @@ var ProgressBar = ({
11381
11304
  ...props
11382
11305
  }) => {
11383
11306
  return /* @__PURE__ */ jsxs34(ProgressBarWrapper, { children: [
11384
- isNotNil27(labelLeft) ? /* @__PURE__ */ jsx248(ProgressBarLabel, { children: labelLeft }) : null,
11307
+ isNotNil26(labelLeft) ? /* @__PURE__ */ jsx248(ProgressBarLabel, { children: labelLeft }) : null,
11385
11308
  /* @__PURE__ */ jsx248(
11386
11309
  StyledProgressBar,
11387
11310
  {
@@ -11397,7 +11320,7 @@ var ProgressBar = ({
11397
11320
  )
11398
11321
  }
11399
11322
  ),
11400
- isNotNil27(labelRight) ? /* @__PURE__ */ jsx248(ProgressBarLabel, { children: labelRight }) : null
11323
+ isNotNil26(labelRight) ? /* @__PURE__ */ jsx248(ProgressBarLabel, { children: labelRight }) : null
11401
11324
  ] });
11402
11325
  };
11403
11326
  ProgressBar.displayName = "ProgressBar";
@@ -11700,10 +11623,10 @@ var SegmentedControl = forwardRef21(
11700
11623
  SegmentedControl.displayName = "SegmentedControl";
11701
11624
 
11702
11625
  // src/components/SegmentedControl/SegmentedControlItem.tsx
11703
- import { forwardRef as forwardRef22, useEffect as useEffect11, useRef as useRef13 } from "react";
11626
+ import { forwardRef as forwardRef22, useEffect as useEffect11, useRef as useRef12 } from "react";
11704
11627
  import styled56, { css as css35 } from "styled-components";
11705
11628
  import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
11706
- import { isNotNil as isNotNil28 } from "@wistia/type-guards";
11629
+ import { isNotNil as isNotNil27 } from "@wistia/type-guards";
11707
11630
  import { jsxs as jsxs37 } from "react/jsx-runtime";
11708
11631
  var segmentedControlItemStyles = css35`
11709
11632
  all: unset; /* ToggleGroupItem is a button element */
@@ -11772,7 +11695,7 @@ var SegmentedControlItem = forwardRef22(
11772
11695
  ({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11773
11696
  const selectedValue = useSegmentedControlValue();
11774
11697
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
11775
- const buttonRef = useRef13(null);
11698
+ const buttonRef = useRef12(null);
11776
11699
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
11777
11700
  const handleClick = (event) => {
11778
11701
  const target = event.target;
@@ -11810,8 +11733,8 @@ var SegmentedControlItem = forwardRef22(
11810
11733
  StyledSegmentedControlItem,
11811
11734
  {
11812
11735
  ref: combinedRef,
11813
- $hasLabel: isNotNil28(label),
11814
- "aria-label": isNotNil28(label) ? void 0 : ariaLabel,
11736
+ $hasLabel: isNotNil27(label),
11737
+ "aria-label": isNotNil27(label) ? void 0 : ariaLabel,
11815
11738
  disabled,
11816
11739
  onClick: handleClick,
11817
11740
  value,
@@ -11952,7 +11875,7 @@ Select.displayName = "Select";
11952
11875
  import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
11953
11876
  import { forwardRef as forwardRef24 } from "react";
11954
11877
  import styled58 from "styled-components";
11955
- import { isNotNil as isNotNil29 } from "@wistia/type-guards";
11878
+ import { isNotNil as isNotNil28 } from "@wistia/type-guards";
11956
11879
  import { jsx as jsx254, jsxs as jsxs39 } from "react/jsx-runtime";
11957
11880
  var StyledItem = styled58(Item)`
11958
11881
  ${variantStyleMap2.body3};
@@ -11996,7 +11919,7 @@ var SelectOption = forwardRef24(
11996
11919
  type: "checkmark"
11997
11920
  }
11998
11921
  ) }) }),
11999
- isNotNil29(selectedDisplayValue) ? /* @__PURE__ */ jsxs39("div", { children: [
11922
+ isNotNil28(selectedDisplayValue) ? /* @__PURE__ */ jsxs39("div", { children: [
12000
11923
  children,
12001
11924
  /* @__PURE__ */ jsx254("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx254(ItemText, { children: selectedDisplayValue }) })
12002
11925
  ] }) : /* @__PURE__ */ jsx254(ItemText, { children })
@@ -12305,7 +12228,7 @@ var TableRow = ({ children, ...props }) => {
12305
12228
  // src/components/Tabs/Tabs.tsx
12306
12229
  import { forwardRef as forwardRef27, useState as useState15 } from "react";
12307
12230
  import { Root as TabsRoot } from "@radix-ui/react-tabs";
12308
- import { isNotNil as isNotNil31, isNil as isNil14 } from "@wistia/type-guards";
12231
+ import { isNotNil as isNotNil30, isNil as isNil14 } from "@wistia/type-guards";
12309
12232
  import styled71 from "styled-components";
12310
12233
 
12311
12234
  // src/components/Tabs/TabPanel.tsx
@@ -12358,10 +12281,10 @@ var TabList = ({
12358
12281
  TabList.displayName = "TabList";
12359
12282
 
12360
12283
  // src/components/Tabs/TabItem.tsx
12361
- import { forwardRef as forwardRef26, useEffect as useEffect12, useRef as useRef14 } from "react";
12284
+ import { forwardRef as forwardRef26, useEffect as useEffect12, useRef as useRef13 } from "react";
12362
12285
  import styled69 from "styled-components";
12363
12286
  import { Trigger as RadixTab } from "@radix-ui/react-tabs";
12364
- import { isNotNil as isNotNil30 } from "@wistia/type-guards";
12287
+ import { isNotNil as isNotNil29 } from "@wistia/type-guards";
12365
12288
 
12366
12289
  // src/components/Tabs/useTabsValue.tsx
12367
12290
  import { createContext as createContext10, useContext as useContext9 } from "react";
@@ -12388,7 +12311,7 @@ var TabItem = forwardRef26(
12388
12311
  ({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
12389
12312
  const selectedValue = useTabsValue();
12390
12313
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
12391
- const buttonRef = useRef14(null);
12314
+ const buttonRef = useRef13(null);
12392
12315
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
12393
12316
  useEffect12(() => {
12394
12317
  const buttonElem = buttonRef.current;
@@ -12419,8 +12342,8 @@ var TabItem = forwardRef26(
12419
12342
  StyledTabItem,
12420
12343
  {
12421
12344
  ref: combinedRef,
12422
- $hasLabel: isNotNil30(label),
12423
- "aria-label": isNotNil30(label) ? void 0 : ariaLabel,
12345
+ $hasLabel: isNotNil29(label),
12346
+ "aria-label": isNotNil29(label) ? void 0 : ariaLabel,
12424
12347
  disabled,
12425
12348
  value,
12426
12349
  children: [
@@ -12543,7 +12466,7 @@ var Tabs = forwardRef27(
12543
12466
  value
12544
12467
  );
12545
12468
  }
12546
- if (isNotNil31(label)) {
12469
+ if (isNotNil30(label)) {
12547
12470
  return /* @__PURE__ */ jsx266(
12548
12471
  TabItem,
12549
12472
  {
@@ -12555,7 +12478,7 @@ var Tabs = forwardRef27(
12555
12478
  value
12556
12479
  );
12557
12480
  }
12558
- if (isNotNil31(ariaLabelForTab)) {
12481
+ if (isNotNil30(ariaLabelForTab)) {
12559
12482
  return /* @__PURE__ */ jsx266(
12560
12483
  TabItem,
12561
12484
  {
@@ -12598,7 +12521,7 @@ Tab.displayName = "Tab";
12598
12521
  // src/components/Tag/Tag.tsx
12599
12522
  import { forwardRef as forwardRef29 } from "react";
12600
12523
  import styled72 from "styled-components";
12601
- import { isNil as isNil15, isNotNil as isNotNil32, isNonEmptyString as isNonEmptyString5 } from "@wistia/type-guards";
12524
+ import { isNil as isNil15, isNotNil as isNotNil31, isNonEmptyString as isNonEmptyString5 } from "@wistia/type-guards";
12602
12525
  import { Fragment as Fragment8, jsx as jsx268, jsxs as jsxs44 } from "react/jsx-runtime";
12603
12526
  var TagLabel = styled72.a`
12604
12527
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
@@ -12715,8 +12638,8 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
12715
12638
  };
12716
12639
  var Tag = forwardRef29(
12717
12640
  ({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
12718
- const hasIcon = isNotNil32(icon);
12719
- const labelProps = isNotNil32(href) && isNonEmptyString5(href) ? { href, as: "a" } : { as: "span" };
12641
+ const hasIcon = isNotNil31(icon);
12642
+ const labelProps = isNotNil31(href) && isNonEmptyString5(href) ? { href, as: "a" } : { as: "span" };
12720
12643
  return /* @__PURE__ */ jsxs44(
12721
12644
  StyledTag,
12722
12645
  {
@@ -12752,7 +12675,7 @@ Tag.displayName = "Tag";
12752
12675
 
12753
12676
  // src/components/Thumbnail/ThumbnailBadge.tsx
12754
12677
  import styled73 from "styled-components";
12755
- import { isNotNil as isNotNil33 } from "@wistia/type-guards";
12678
+ import { isNotNil as isNotNil32 } from "@wistia/type-guards";
12756
12679
  import { jsx as jsx269, jsxs as jsxs45 } from "react/jsx-runtime";
12757
12680
  var StyledThumbnailBadge = styled73.div`
12758
12681
  align-items: center;
@@ -12780,19 +12703,19 @@ var StyledThumbnailBadge = styled73.div`
12780
12703
  `;
12781
12704
  var ThumbnailBadge = ({ icon, label, ...props }) => {
12782
12705
  return /* @__PURE__ */ jsxs45(StyledThumbnailBadge, { ...props, children: [
12783
- isNotNil33(icon) && icon,
12706
+ isNotNil32(icon) && icon,
12784
12707
  /* @__PURE__ */ jsx269("span", { children: label })
12785
12708
  ] });
12786
12709
  };
12787
12710
  ThumbnailBadge.displayName = "ThumbnailBadge";
12788
12711
 
12789
12712
  // src/components/Thumbnail/Thumbnail.tsx
12790
- import { forwardRef as forwardRef30, useState as useState16, useRef as useRef15, useCallback as useCallback10, useMemo as useMemo9 } from "react";
12713
+ import { forwardRef as forwardRef30, useState as useState16, useRef as useRef14, useCallback as useCallback10, useMemo as useMemo9 } from "react";
12791
12714
  import styled74 from "styled-components";
12792
- import { isNil as isNil16, isNotNil as isNotNil35, isUndefined as isUndefined5, isEmptyString as isEmptyString2, isString as isString2 } from "@wistia/type-guards";
12715
+ import { isNil as isNil16, isNotNil as isNotNil34, isUndefined as isUndefined5, isEmptyString as isEmptyString2, isString as isString2 } from "@wistia/type-guards";
12793
12716
 
12794
12717
  // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
12795
- import { isNotNil as isNotNil34 } from "@wistia/type-guards";
12718
+ import { isNotNil as isNotNil33 } from "@wistia/type-guards";
12796
12719
  import { css as css39 } from "styled-components";
12797
12720
  var gradients = {
12798
12721
  defaultDarkOne: css39`
@@ -12920,7 +12843,7 @@ var gradients = {
12920
12843
  };
12921
12844
  var gradientMap = Object.keys(gradients);
12922
12845
  var getBackgroundGradient = (gradientName = void 0) => {
12923
- return isNotNil34(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
12846
+ return isNotNil33(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
12924
12847
  };
12925
12848
 
12926
12849
  // src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
@@ -13060,7 +12983,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
13060
12983
  );
13061
12984
  };
13062
12985
  var StyledThumbnail = styled74.div`
13063
- background-image: ${({ $backgroundUrl }) => isNotNil35($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
12986
+ background-image: ${({ $backgroundUrl }) => isNotNil34($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
13064
12987
  ${({ $backgroundUrl, $gradientBackground }) => (
13065
12988
  // if we don't have $backgroundUrl show a gradient
13066
12989
  isNil16($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
@@ -13102,12 +13025,12 @@ var Thumbnail = forwardRef30(
13102
13025
  const [percent, setPercent] = useState16(0);
13103
13026
  const [isMouseOver, setIsMouseOver] = useState16(false);
13104
13027
  const [isStoryboardReady, setIsStoryboardReady] = useState16(false);
13105
- const storyboardElementRef = useRef15(null);
13028
+ const storyboardElementRef = useRef14(null);
13106
13029
  const backgroundUrl = useMemo9(
13107
- () => thumbnailImageType === "square" && isNotNil35(thumbnailUrl) ? thumbnailUrl : void 0,
13030
+ () => thumbnailImageType === "square" && isNotNil34(thumbnailUrl) ? thumbnailUrl : void 0,
13108
13031
  [thumbnailImageType, thumbnailUrl]
13109
13032
  );
13110
- const isScrubbable = isNotNil35(storyboard);
13033
+ const isScrubbable = isNotNil34(storyboard);
13111
13034
  const trackStoryboardLoadStatus = useCallback10(() => {
13112
13035
  if (storyboardElementRef.current || !storyboard) {
13113
13036
  return storyboardElementRef.current;
@@ -13167,7 +13090,7 @@ var Thumbnail = forwardRef30(
13167
13090
  let thumbnailContent = null;
13168
13091
  if (shouldRenderStoryboard) {
13169
13092
  thumbnailContent = renderStoryboard();
13170
- } else if (isNotNil35(thumbnailUrl)) {
13093
+ } else if (isNotNil34(thumbnailUrl)) {
13171
13094
  thumbnailContent = /* @__PURE__ */ jsx271(
13172
13095
  ThumbnailImage,
13173
13096
  {
@@ -13192,7 +13115,7 @@ var Thumbnail = forwardRef30(
13192
13115
  onMouseOut: handleMouseOut,
13193
13116
  role: "presentation",
13194
13117
  children: [
13195
- isNotNil35(children) ? children : null,
13118
+ isNotNil34(children) ? children : null,
13196
13119
  thumbnailContent
13197
13120
  ]
13198
13121
  }
@@ -13310,7 +13233,7 @@ var ThumbnailCollage = ({
13310
13233
 
13311
13234
  // src/components/WistiaLogo/WistiaLogo.tsx
13312
13235
  import styled76, { css as css40 } from "styled-components";
13313
- import { isNotNil as isNotNil36 } from "@wistia/type-guards";
13236
+ import { isNotNil as isNotNil35 } from "@wistia/type-guards";
13314
13237
  import { jsx as jsx273, jsxs as jsxs47 } from "react/jsx-runtime";
13315
13238
  var renderBrandmark = (brandmarkColor, iconOnly) => {
13316
13239
  if (iconOnly) {
@@ -13423,7 +13346,7 @@ var WistiaLogo = ({
13423
13346
  ...props,
13424
13347
  children: [
13425
13348
  /* @__PURE__ */ jsx273("title", { children: title }),
13426
- isNotNil36(description) ? /* @__PURE__ */ jsx273("desc", { children: description }) : null,
13349
+ isNotNil35(description) ? /* @__PURE__ */ jsx273("desc", { children: description }) : null,
13427
13350
  renderBrandmark(brandmarkColor, iconOnly),
13428
13351
  renderLogotype(logotypeColor, iconOnly)
13429
13352
  ]
@@ -13434,7 +13357,7 @@ var WistiaLogo = ({
13434
13357
  WistiaLogo.displayName = "WistiaLogo";
13435
13358
 
13436
13359
  // src/components/List/List.tsx
13437
- import { isNotNil as isNotNil37 } from "@wistia/type-guards";
13360
+ import { isNotNil as isNotNil36 } from "@wistia/type-guards";
13438
13361
  import styled78, { css as css41 } from "styled-components";
13439
13362
 
13440
13363
  // src/components/List/ListItem.tsx
@@ -13575,13 +13498,13 @@ var List = ({
13575
13498
  ...otherProps
13576
13499
  }) => {
13577
13500
  const listVariant = variant ?? "bullets";
13578
- if (isNotNil37(children)) {
13501
+ if (isNotNil36(children)) {
13579
13502
  if (Array.isArray(children) && !children.length) {
13580
13503
  return null;
13581
13504
  }
13582
13505
  return renderListComponent(children, listVariant, otherProps);
13583
13506
  }
13584
- if (isNotNil37(items)) {
13507
+ if (isNotNil36(items)) {
13585
13508
  if (!items.length) {
13586
13509
  return null;
13587
13510
  }