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

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