@wistia/ui 0.15.12 → 0.15.13-beta.a8953353.4dacd3e

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.15.12
3
+ * @license @wistia/ui v0.15.13-beta.a8953353.4dacd3e
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -8487,7 +8487,7 @@ Badge.displayName = "Badge_UI";
8487
8487
  // src/components/Banner/Banner.tsx
8488
8488
  var import_react31 = require("react");
8489
8489
  var import_styled_components33 = __toESM(require("styled-components"));
8490
- var import_type_guards24 = require("@wistia/type-guards");
8490
+ var import_type_guards25 = require("@wistia/type-guards");
8491
8491
 
8492
8492
  // src/components/Box/Box.tsx
8493
8493
  var import_react27 = require("react");
@@ -8689,7 +8689,39 @@ var Box = makePolymorphic(BoxComponent);
8689
8689
  // src/components/Heading/Heading.tsx
8690
8690
  var import_react28 = require("react");
8691
8691
  var import_styled_components29 = __toESM(require("styled-components"));
8692
+ var import_type_guards22 = require("@wistia/type-guards");
8693
+
8694
+ // src/private/helpers/applyMaxCharsToChildren/applyMaxCharsToChildren.ts
8692
8695
  var import_type_guards21 = require("@wistia/type-guards");
8696
+
8697
+ // src/private/helpers/truncateString/truncateString.ts
8698
+ var truncateString = (text, maxChars) => {
8699
+ if (maxChars < 1) {
8700
+ throw new Error("maxChars must be >= 1");
8701
+ }
8702
+ if (text.length <= maxChars) {
8703
+ return text;
8704
+ }
8705
+ return text.slice(0, maxChars);
8706
+ };
8707
+
8708
+ // src/private/helpers/applyMaxCharsToChildren/applyMaxCharsToChildren.ts
8709
+ var applyMaxCharsToChildren = (children, maxChars) => {
8710
+ if ((0, import_type_guards21.isNil)(maxChars)) {
8711
+ return children;
8712
+ }
8713
+ if ((0, import_type_guards21.isString)(children)) {
8714
+ return truncateString(children, maxChars);
8715
+ }
8716
+ if ((0, import_type_guards21.isNumber)(children)) {
8717
+ const numberString = String(children);
8718
+ return truncateString(numberString, maxChars);
8719
+ }
8720
+ const textContent = typeof children === "object" ? JSON.stringify(children) : String(children);
8721
+ return truncateString(textContent, maxChars);
8722
+ };
8723
+
8724
+ // src/components/Heading/Heading.tsx
8693
8725
  var import_jsx_runtime207 = require("react/jsx-runtime");
8694
8726
  var heroStyle = import_styled_components29.css`
8695
8727
  --font-family: var(--wui-typography-heading-hero-family);
@@ -8765,7 +8797,7 @@ var StyledHeading = import_styled_components29.default.div`
8765
8797
  color: var(--text-color);
8766
8798
  ${({ $variant }) => variantStyleMap[$variant]}
8767
8799
  ${({ $truncate }) => {
8768
- if ((0, import_type_guards21.isNotNil)($truncate)) {
8800
+ if ((0, import_type_guards22.isNotNil)($truncate)) {
8769
8801
  return import_styled_components29.css`
8770
8802
  ${ellipsisStyle};
8771
8803
  ${lineClampCss($truncate)};
@@ -8798,31 +8830,37 @@ var variantElementMap = {
8798
8830
  var HeadingComponent = (0, import_react28.forwardRef)(
8799
8831
  ({
8800
8832
  align = "left",
8833
+ children,
8801
8834
  colorScheme = "inherit",
8802
8835
  disabled = false,
8803
8836
  inline = false,
8837
+ maxChars,
8804
8838
  preventUserSelect = false,
8805
8839
  prominence = "primary",
8806
8840
  truncate,
8807
8841
  variant = "heading1",
8808
8842
  renderAs,
8809
8843
  ...props
8810
- }, ref) => /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
8811
- StyledHeading,
8812
- {
8813
- ref,
8814
- $align: align,
8815
- $colorScheme: colorScheme,
8816
- $disabled: disabled,
8817
- $inline: inline,
8818
- $preventUserSelect: preventUserSelect,
8819
- $prominence: prominence,
8820
- $truncate: truncate,
8821
- $variant: variant,
8822
- as: renderAs ?? variantElementMap[variant] ?? DEFAULT_ELEMENT2,
8823
- ...props
8824
- }
8825
- )
8844
+ }, ref) => {
8845
+ const processedChildren = applyMaxCharsToChildren(children, maxChars);
8846
+ return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
8847
+ StyledHeading,
8848
+ {
8849
+ ref,
8850
+ $align: align,
8851
+ $colorScheme: colorScheme,
8852
+ $disabled: disabled,
8853
+ $inline: inline,
8854
+ $preventUserSelect: preventUserSelect,
8855
+ $prominence: prominence,
8856
+ $truncate: truncate,
8857
+ $variant: variant,
8858
+ as: renderAs ?? variantElementMap[variant] ?? DEFAULT_ELEMENT2,
8859
+ ...props,
8860
+ children: processedChildren
8861
+ }
8862
+ );
8863
+ }
8826
8864
  );
8827
8865
  HeadingComponent.displayName = "Heading_UI";
8828
8866
  var Heading = makePolymorphic(HeadingComponent);
@@ -8830,7 +8868,7 @@ var Heading = makePolymorphic(HeadingComponent);
8830
8868
  // src/components/Text/Text.tsx
8831
8869
  var import_react29 = require("react");
8832
8870
  var import_styled_components30 = __toESM(require("styled-components"));
8833
- var import_type_guards22 = require("@wistia/type-guards");
8871
+ var import_type_guards23 = require("@wistia/type-guards");
8834
8872
  var import_jsx_runtime208 = require("react/jsx-runtime");
8835
8873
  var sharedBodyStyle = import_styled_components30.css`
8836
8874
  > strong,
@@ -8984,7 +9022,7 @@ var StyledText = import_styled_components30.default.div`
8984
9022
  margin: 0;
8985
9023
  ${({ $variant }) => variantStyleMap2[$variant]}
8986
9024
  ${({ $truncate }) => {
8987
- if ((0, import_type_guards22.isNotNil)($truncate)) {
9025
+ if ((0, import_type_guards23.isNotNil)($truncate)) {
8988
9026
  return import_styled_components30.css`
8989
9027
  ${ellipsisStyle};
8990
9028
  ${lineClampCss($truncate)};
@@ -9015,9 +9053,11 @@ var StyledText = import_styled_components30.default.div`
9015
9053
  var TextComponent = (0, import_react29.forwardRef)(
9016
9054
  ({
9017
9055
  align = "left",
9056
+ children,
9018
9057
  colorScheme = "inherit",
9019
9058
  disabled = false,
9020
9059
  inline = false,
9060
+ maxChars,
9021
9061
  preventUserSelect = false,
9022
9062
  prominence = "primary",
9023
9063
  truncate,
@@ -9025,6 +9065,7 @@ var TextComponent = (0, import_react29.forwardRef)(
9025
9065
  renderAs,
9026
9066
  ...props
9027
9067
  }, ref) => {
9068
+ const processedChildren = applyMaxCharsToChildren(children, maxChars);
9028
9069
  return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
9029
9070
  StyledText,
9030
9071
  {
@@ -9038,7 +9079,8 @@ var TextComponent = (0, import_react29.forwardRef)(
9038
9079
  $truncate: truncate,
9039
9080
  $variant: variant,
9040
9081
  as: renderAs ?? variantElementMap2[variant] ?? DEFAULT_ELEMENT3,
9041
- ...props
9082
+ ...props,
9083
+ children: processedChildren
9042
9084
  }
9043
9085
  );
9044
9086
  }
@@ -9048,7 +9090,7 @@ var Text = makePolymorphic(TextComponent);
9048
9090
 
9049
9091
  // src/components/ButtonGroup/ButtonGroup.tsx
9050
9092
  var import_styled_components31 = __toESM(require("styled-components"));
9051
- var import_type_guards23 = require("@wistia/type-guards");
9093
+ var import_type_guards24 = require("@wistia/type-guards");
9052
9094
  var import_jsx_runtime209 = require("react/jsx-runtime");
9053
9095
  var getAlignment = (align) => {
9054
9096
  if (align === "center") {
@@ -9108,7 +9150,7 @@ var ButtonGroup = ({
9108
9150
  ...props
9109
9151
  }) => {
9110
9152
  const responsiveButtonSize = useResponsiveProp(buttonSize);
9111
- if ((0, import_type_guards23.isNil)(children)) {
9153
+ if ((0, import_type_guards24.isNil)(children)) {
9112
9154
  return null;
9113
9155
  }
9114
9156
  return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
@@ -9225,14 +9267,14 @@ var Banner = ({
9225
9267
  setIsVerticalLayout(width <= BREAKPOINT_WIDTH);
9226
9268
  }
9227
9269
  }, [width, orientation]);
9228
- const hasImage = (0, import_type_guards24.isNotNil)(image);
9270
+ const hasImage = (0, import_type_guards25.isNotNil)(image);
9229
9271
  const shouldShowImage = hasImage && (isVerticalLayout || width >= MIN_IMAGE_WIDTH);
9230
9272
  const iconPosition = (0, import_react31.useMemo)(() => {
9231
- if ((0, import_type_guards24.isNil)(icon)) return "none";
9273
+ if ((0, import_type_guards25.isNil)(icon)) return "none";
9232
9274
  if (isSmallContainer) return shouldShowImage ? "inline" : "above";
9233
9275
  return prominence === "secondary" ? "inline" : "above";
9234
9276
  }, [icon, isSmallContainer, shouldShowImage, prominence]);
9235
- const hasActions = (0, import_type_guards24.isNotNil)(primaryAction) || (0, import_type_guards24.isNotNil)(secondaryAction);
9277
+ const hasActions = (0, import_type_guards25.isNotNil)(primaryAction) || (0, import_type_guards25.isNotNil)(secondaryAction);
9236
9278
  const contentDirection = (0, import_react31.useMemo)(() => {
9237
9279
  if (orientation === "horizontal" && !hasActions) return "row";
9238
9280
  return !shouldShowImage && prominence === "default" && !isSmallContainer && !isVerticalLayout ? "row" : "column";
@@ -9279,7 +9321,7 @@ var Banner = ({
9279
9321
  gap: iconPosition === "inline" ? "space-01" : "space-00",
9280
9322
  justifyContent: "center",
9281
9323
  children: [
9282
- (0, import_type_guards24.isNotNil)(headingText) ? /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(Heading, { variant: headingVariant, children: [
9324
+ (0, import_type_guards25.isNotNil)(headingText) ? /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(Heading, { variant: headingVariant, children: [
9283
9325
  iconPosition === "inline" && /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(import_jsx_runtime211.Fragment, { children: [
9284
9326
  icon,
9285
9327
  " "
@@ -9297,15 +9339,15 @@ var Banner = ({
9297
9339
  collapseOnSmallScreens: false,
9298
9340
  style: { paddingRight: "var(--wui-space-02)" },
9299
9341
  children: [
9300
- (0, import_type_guards24.isNotNil)(primaryAction) && primaryAction,
9301
- (0, import_type_guards24.isNotNil)(secondaryAction) && secondaryAction
9342
+ (0, import_type_guards25.isNotNil)(primaryAction) && primaryAction,
9343
+ (0, import_type_guards25.isNotNil)(secondaryAction) && secondaryAction
9302
9344
  ]
9303
9345
  }
9304
9346
  ) : null
9305
9347
  ]
9306
9348
  }
9307
9349
  ),
9308
- (0, import_type_guards24.isNotNil)(onClose) && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
9350
+ (0, import_type_guards25.isNotNil)(onClose) && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
9309
9351
  IconButton,
9310
9352
  {
9311
9353
  label: "Close",
@@ -9499,17 +9541,17 @@ var Center = (0, import_react33.forwardRef)(
9499
9541
  Center.displayName = "Center_UI";
9500
9542
 
9501
9543
  // src/components/Checkbox/Checkbox.tsx
9502
- var import_type_guards31 = require("@wistia/type-guards");
9544
+ var import_type_guards32 = require("@wistia/type-guards");
9503
9545
  var import_react38 = require("react");
9504
9546
  var import_styled_components44 = __toESM(require("styled-components"));
9505
9547
 
9506
9548
  // src/private/components/FormControlLabel/FormControlLabel.tsx
9507
- var import_type_guards27 = require("@wistia/type-guards");
9549
+ var import_type_guards28 = require("@wistia/type-guards");
9508
9550
  var import_styled_components40 = __toESM(require("styled-components"));
9509
9551
 
9510
9552
  // src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
9511
9553
  var import_styled_components38 = __toESM(require("styled-components"));
9512
- var import_type_guards25 = require("@wistia/type-guards");
9554
+ var import_type_guards26 = require("@wistia/type-guards");
9513
9555
  var import_jsx_runtime216 = require("react/jsx-runtime");
9514
9556
  var VisuallyHidden = import_styled_components38.default.div({ ...visuallyHiddenStyle });
9515
9557
  var VisuallyHiddenButFocusable = import_styled_components38.default.div({
@@ -9521,7 +9563,7 @@ var ScreenReaderOnly = ({
9521
9563
  focusable = false,
9522
9564
  ...props
9523
9565
  }) => {
9524
- const accessibleText = (0, import_type_guards25.isNotNil)(text) ? text : children;
9566
+ const accessibleText = (0, import_type_guards26.isNotNil)(text) ? text : children;
9525
9567
  if (focusable) {
9526
9568
  return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(VisuallyHiddenButFocusable, { ...props, children: accessibleText });
9527
9569
  }
@@ -9531,7 +9573,7 @@ ScreenReaderOnly.displayName = "ScreenReaderOnly_UI";
9531
9573
 
9532
9574
  // src/private/components/FormControlLabel/FormControlLabelDescription.tsx
9533
9575
  var import_styled_components39 = __toESM(require("styled-components"));
9534
- var import_type_guards26 = require("@wistia/type-guards");
9576
+ var import_type_guards27 = require("@wistia/type-guards");
9535
9577
  var import_jsx_runtime217 = require("react/jsx-runtime");
9536
9578
  var disabledStyle = import_styled_components39.css`
9537
9579
  color: var(--wui-color-text-disabled);
@@ -9550,7 +9592,7 @@ var FormControlLabelDescription = ({
9550
9592
  disabled = false,
9551
9593
  ...props
9552
9594
  }) => {
9553
- if ((0, import_type_guards26.isNil)(children)) {
9595
+ if ((0, import_type_guards27.isNil)(children)) {
9554
9596
  return null;
9555
9597
  }
9556
9598
  return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
@@ -9598,14 +9640,14 @@ var FormControlLabel = ({
9598
9640
  hideLabel = false,
9599
9641
  ...props
9600
9642
  }) => {
9601
- if ((0, import_type_guards27.isNil)(label)) {
9643
+ if ((0, import_type_guards28.isNil)(label)) {
9602
9644
  return null;
9603
9645
  }
9604
9646
  const labelContent = hideLabel ? /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(ScreenReaderOnly, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(StyledLabelWrapper, { children: [
9605
9647
  label,
9606
9648
  /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(FormControlLabelDescription, { children: description })
9607
9649
  ] });
9608
- const slot = (0, import_type_guards27.isNotNil)(controlSlot) ? controlSlot : null;
9650
+ const slot = (0, import_type_guards28.isNotNil)(controlSlot) ? controlSlot : null;
9609
9651
  return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
9610
9652
  StyledFormControlLabel,
9611
9653
  {
@@ -9624,12 +9666,12 @@ FormControlLabel.displayName = "FormControlLabel";
9624
9666
 
9625
9667
  // src/components/FormGroup/CheckboxGroup.tsx
9626
9668
  var import_react37 = require("react");
9627
- var import_type_guards30 = require("@wistia/type-guards");
9669
+ var import_type_guards31 = require("@wistia/type-guards");
9628
9670
 
9629
9671
  // src/components/FormGroup/FormGroup.tsx
9630
9672
  var import_styled_components42 = __toESM(require("styled-components"));
9631
9673
  var import_react35 = require("react");
9632
- var import_type_guards28 = require("@wistia/type-guards");
9674
+ var import_type_guards29 = require("@wistia/type-guards");
9633
9675
 
9634
9676
  // src/components/Stack/Stack.tsx
9635
9677
  var import_react34 = require("react");
@@ -9684,8 +9726,8 @@ var FormGroup = ({
9684
9726
  ...props
9685
9727
  }) => {
9686
9728
  const ref = (0, import_react35.useRef)(null);
9687
- const hasLabel = (0, import_type_guards28.isNotNil)(label) && (0, import_type_guards28.isNonEmptyString)(label);
9688
- const hasDescription = (0, import_type_guards28.isNotNil)(description) && (0, import_type_guards28.isNonEmptyString)(description);
9729
+ const hasLabel = (0, import_type_guards29.isNotNil)(label) && (0, import_type_guards29.isNonEmptyString)(label);
9730
+ const hasDescription = (0, import_type_guards29.isNotNil)(description) && (0, import_type_guards29.isNonEmptyString)(description);
9689
9731
  return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(
9690
9732
  Stack,
9691
9733
  {
@@ -9723,7 +9765,7 @@ FormGroup.displayName = "FormGroup_UI";
9723
9765
  // src/components/Form/Form.tsx
9724
9766
  var import_react36 = require("react");
9725
9767
  var import_styled_components43 = __toESM(require("styled-components"));
9726
- var import_type_guards29 = require("@wistia/type-guards");
9768
+ var import_type_guards30 = require("@wistia/type-guards");
9727
9769
 
9728
9770
  // src/components/Form/serializeFormData.tsx
9729
9771
  var ARRAY_SUFFIX = "[]";
@@ -9772,7 +9814,7 @@ var Form = (0, import_react36.forwardRef)(
9772
9814
  const id = props.id ?? autoId;
9773
9815
  const handleValidate = (nextFormData) => {
9774
9816
  const nextData = serializeFormData(nextFormData);
9775
- if ((0, import_type_guards29.isUndefined)(validate)) {
9817
+ if ((0, import_type_guards30.isUndefined)(validate)) {
9776
9818
  return {};
9777
9819
  }
9778
9820
  return validate(nextData);
@@ -9782,7 +9824,7 @@ var Form = (0, import_react36.forwardRef)(
9782
9824
  props.onBlur(event);
9783
9825
  }
9784
9826
  const formData = new FormData(event.currentTarget);
9785
- if ((0, import_type_guards29.isNotUndefined)(validate)) {
9827
+ if ((0, import_type_guards30.isNotUndefined)(validate)) {
9786
9828
  handleValidate(formData);
9787
9829
  }
9788
9830
  };
@@ -9855,7 +9897,7 @@ var CheckboxGroup = ({
9855
9897
  ...props
9856
9898
  }) => {
9857
9899
  const formState = (0, import_react37.useContext)(FormContext);
9858
- const derivedValue = (0, import_type_guards30.isArray)(formState.values[name]) ? formState.values[name] : value;
9900
+ const derivedValue = (0, import_type_guards31.isArray)(formState.values[name]) ? formState.values[name] : value;
9859
9901
  const context = (0, import_react37.useMemo)(() => {
9860
9902
  return {
9861
9903
  name: `${name}[]`,
@@ -9987,14 +10029,14 @@ var Checkbox = (0, import_react38.forwardRef)(
9987
10029
  ...props
9988
10030
  }, ref) => {
9989
10031
  const generatedId = (0, import_react38.useId)();
9990
- const computedId = (0, import_type_guards31.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
10032
+ const computedId = (0, import_type_guards32.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
9991
10033
  const checkboxGroupContext = useCheckboxGroup();
9992
10034
  const contextName = checkboxGroupContext?.name;
9993
10035
  const contextOnChange = checkboxGroupContext?.onChange;
9994
10036
  const contextValue = checkboxGroupContext?.value;
9995
10037
  const checkboxName = name ?? contextName;
9996
10038
  const handleOnChange = onChange ?? contextOnChange;
9997
- const isChecked = (0, import_type_guards31.isNotUndefined)(value) && contextValue ? contextValue.includes(value) : checked;
10039
+ const isChecked = (0, import_type_guards32.isNotUndefined)(value) && contextValue ? contextValue.includes(value) : checked;
9998
10040
  return /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(
9999
10041
  StyledCheckboxWrapper,
10000
10042
  {
@@ -10087,7 +10129,7 @@ ClickRegion.displayName = "ClickRegion_UI";
10087
10129
 
10088
10130
  // src/components/Collapsible/Collapsible.tsx
10089
10131
  var import_react_collapsible = require("@radix-ui/react-collapsible");
10090
- var import_type_guards32 = require("@wistia/type-guards");
10132
+ var import_type_guards33 = require("@wistia/type-guards");
10091
10133
  var import_styled_components45 = __toESM(require("styled-components"));
10092
10134
  var import_jsx_runtime224 = require("react/jsx-runtime");
10093
10135
  var StyledRoot = (0, import_styled_components45.default)(import_react_collapsible.Root)`
@@ -10104,7 +10146,7 @@ var Collapsible = ({
10104
10146
  onOpenChange
10105
10147
  }) => {
10106
10148
  const controlProps = {
10107
- ...(0, import_type_guards32.isNotNil)(onOpenChange) && (0, import_type_guards32.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
10149
+ ...(0, import_type_guards33.isNotNil)(onOpenChange) && (0, import_type_guards33.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
10108
10150
  };
10109
10151
  return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(StyledRoot, { ...controlProps, children });
10110
10152
  };
@@ -10166,13 +10208,13 @@ CollapsibleTriggerIcon.displayName = "CollapsibleTriggerIcon_UI";
10166
10208
  // src/components/Collapsible/CollapsibleContent.tsx
10167
10209
  var import_styled_components47 = __toESM(require("styled-components"));
10168
10210
  var import_react_collapsible3 = require("@radix-ui/react-collapsible");
10169
- var import_type_guards33 = require("@wistia/type-guards");
10211
+ var import_type_guards34 = require("@wistia/type-guards");
10170
10212
  var import_jsx_runtime227 = require("react/jsx-runtime");
10171
10213
  var ClampedContent = import_styled_components47.default.div`
10172
10214
  --wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
10173
10215
  `;
10174
10216
  var CollapsibleContent = ({ clamp, children }) => {
10175
- if ((0, import_type_guards33.isNotUndefined)(clamp)) {
10217
+ if ((0, import_type_guards34.isNotUndefined)(clamp)) {
10176
10218
  return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
10177
10219
  ClampedContent,
10178
10220
  {
@@ -11450,7 +11492,7 @@ var import_react46 = require("react");
11450
11492
  // src/components/Switch/Switch.tsx
11451
11493
  var import_react45 = require("react");
11452
11494
  var import_styled_components60 = __toESM(require("styled-components"));
11453
- var import_type_guards34 = require("@wistia/type-guards");
11495
+ var import_type_guards35 = require("@wistia/type-guards");
11454
11496
  var import_jsx_runtime245 = require("react/jsx-runtime");
11455
11497
  var switchHeightMap = {
11456
11498
  sm: 16,
@@ -11542,7 +11584,7 @@ var Switch = (0, import_react45.forwardRef)(
11542
11584
  ...props
11543
11585
  }, ref) => {
11544
11586
  const generatedId = (0, import_react45.useId)();
11545
- const computedId = (0, import_type_guards34.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
11587
+ const computedId = (0, import_type_guards35.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
11546
11588
  return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(
11547
11589
  StyledSwitchWrapper,
11548
11590
  {
@@ -11661,7 +11703,7 @@ var import_fn7 = require("culori/fn");
11661
11703
  // src/components/Input/Input.tsx
11662
11704
  var import_react47 = require("react");
11663
11705
  var import_styled_components62 = __toESM(require("styled-components"));
11664
- var import_type_guards35 = require("@wistia/type-guards");
11706
+ var import_type_guards36 = require("@wistia/type-guards");
11665
11707
 
11666
11708
  // src/css/inputCss.ts
11667
11709
  var import_styled_components61 = require("styled-components");
@@ -11810,26 +11852,26 @@ var Input = (0, import_react47.forwardRef)(
11810
11852
  ...props
11811
11853
  }, externalRef) => {
11812
11854
  const internalRef = (0, import_react47.useRef)(null);
11813
- const ref = (0, import_type_guards35.isNotNil)(externalRef) && (0, import_type_guards35.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef;
11855
+ const ref = (0, import_type_guards36.isNotNil)(externalRef) && (0, import_type_guards36.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef;
11814
11856
  let leftIconToDisplay = leftIcon;
11815
- if ((0, import_type_guards35.isNil)(leftIcon) && type === "search") {
11857
+ if ((0, import_type_guards36.isNil)(leftIcon) && type === "search") {
11816
11858
  leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(Icon, { type: "search" });
11817
11859
  }
11818
- if ((0, import_type_guards35.isNotNil)(leftIconToDisplay) && (0, import_react47.isValidElement)(leftIconToDisplay)) {
11860
+ if ((0, import_type_guards36.isNotNil)(leftIconToDisplay) && (0, import_react47.isValidElement)(leftIconToDisplay)) {
11819
11861
  leftIconToDisplay = (0, import_react47.cloneElement)(leftIconToDisplay, {
11820
11862
  size: "md",
11821
11863
  className: "wui-input-left-icon"
11822
11864
  });
11823
11865
  }
11824
11866
  let rightIconToDisplay = rightIcon;
11825
- if ((0, import_type_guards35.isNotNil)(rightIconToDisplay) && (0, import_react47.isValidElement)(rightIconToDisplay)) {
11867
+ if ((0, import_type_guards36.isNotNil)(rightIconToDisplay) && (0, import_react47.isValidElement)(rightIconToDisplay)) {
11826
11868
  rightIconToDisplay = (0, import_react47.cloneElement)(rightIconToDisplay, {
11827
11869
  size: "md",
11828
11870
  className: "wui-input-right-icon"
11829
11871
  });
11830
11872
  }
11831
11873
  const handleFocus2 = (event) => {
11832
- if ((0, import_type_guards35.isNotNil)(props.onFocus)) {
11874
+ if ((0, import_type_guards36.isNotNil)(props.onFocus)) {
11833
11875
  props.onFocus(event);
11834
11876
  }
11835
11877
  if (autoSelect && type !== "multiline" && ref.current instanceof HTMLInputElement) {
@@ -12548,12 +12590,12 @@ var Ariakit = __toESM(require("@ariakit/react"));
12548
12590
  var import_react54 = require("react");
12549
12591
  var import_match_sorter = require("match-sorter");
12550
12592
  var import_styled_components69 = __toESM(require("styled-components"));
12551
- var import_type_guards37 = require("@wistia/type-guards");
12593
+ var import_type_guards38 = require("@wistia/type-guards");
12552
12594
 
12553
12595
  // src/components/Tag/Tag.tsx
12554
12596
  var import_react53 = require("react");
12555
12597
  var import_styled_components67 = __toESM(require("styled-components"));
12556
- var import_type_guards36 = require("@wistia/type-guards");
12598
+ var import_type_guards37 = require("@wistia/type-guards");
12557
12599
  var import_jsx_runtime255 = require("react/jsx-runtime");
12558
12600
  var TagLabel = import_styled_components67.default.a`
12559
12601
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
@@ -12639,10 +12681,10 @@ var StyledTag = import_styled_components67.default.div`
12639
12681
  }
12640
12682
  `;
12641
12683
  var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
12642
- if ((0, import_type_guards36.isNil)(onClickRemove)) {
12684
+ if ((0, import_type_guards37.isNil)(onClickRemove)) {
12643
12685
  return null;
12644
12686
  }
12645
- if ((0, import_type_guards36.isNil)(onClickRemoveLabel)) {
12687
+ if ((0, import_type_guards37.isNil)(onClickRemoveLabel)) {
12646
12688
  throw new Error(
12647
12689
  "for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
12648
12690
  );
@@ -12671,8 +12713,8 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
12671
12713
  };
12672
12714
  var Tag = (0, import_react53.forwardRef)(
12673
12715
  ({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
12674
- const hasIcon = (0, import_type_guards36.isNotNil)(icon);
12675
- const labelProps = (0, import_type_guards36.isNotNil)(href) && (0, import_type_guards36.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
12716
+ const hasIcon = (0, import_type_guards37.isNotNil)(icon);
12717
+ const labelProps = (0, import_type_guards37.isNotNil)(href) && (0, import_type_guards37.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
12676
12718
  return /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(
12677
12719
  StyledTag,
12678
12720
  {
@@ -12895,7 +12937,7 @@ var Combobox2 = ({
12895
12937
  const [wrapperWidth, setWrapperWidth] = (0, import_react54.useState)("auto");
12896
12938
  const comboboxWrapperRef = (0, import_react54.useRef)(null);
12897
12939
  const options = (0, import_react54.useMemo)(() => extractOptions(children), [children]);
12898
- const isMultiSelect = (0, import_type_guards37.isArray)(value);
12940
+ const isMultiSelect = (0, import_type_guards38.isArray)(value);
12899
12941
  (0, import_react54.useEffect)(() => {
12900
12942
  const comboboxWrapper = comboboxWrapperRef.current;
12901
12943
  if (comboboxWrapper) {
@@ -12912,11 +12954,11 @@ var Combobox2 = ({
12912
12954
  return () => null;
12913
12955
  }, []);
12914
12956
  const handleRemoveValue = (valueToRemove) => {
12915
- if ((0, import_type_guards37.isString)(value)) {
12957
+ if ((0, import_type_guards38.isString)(value)) {
12916
12958
  onChange("");
12917
12959
  return;
12918
12960
  }
12919
- onChange((0, import_type_guards37.isString)(value) ? "" : value.filter((val) => val !== valueToRemove));
12961
+ onChange((0, import_type_guards38.isString)(value) ? "" : value.filter((val) => val !== valueToRemove));
12920
12962
  };
12921
12963
  const matches = (0, import_react54.useMemo)(() => {
12922
12964
  return (0, import_match_sorter.matchSorter)(Object.keys(options), searchValue);
@@ -12995,12 +13037,13 @@ var Combobox2 = ({
12995
13037
  };
12996
13038
 
12997
13039
  // src/components/ContextMenu/ContextMenu.tsx
12998
- var import_type_guards42 = require("@wistia/type-guards");
13040
+ var import_type_guards43 = require("@wistia/type-guards");
12999
13041
  var import_react61 = require("react");
13042
+ var import_react_dom = require("react-dom");
13000
13043
 
13001
13044
  // src/components/Menu/Menu.tsx
13002
13045
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
13003
- var import_type_guards38 = require("@wistia/type-guards");
13046
+ var import_type_guards39 = require("@wistia/type-guards");
13004
13047
  var import_react56 = require("react");
13005
13048
  var import_styled_components70 = __toESM(require("styled-components"));
13006
13049
 
@@ -13115,7 +13158,7 @@ var Menu = (0, import_react56.forwardRef)(
13115
13158
  }, ref) => {
13116
13159
  const contextValue = (0, import_react56.useMemo)(() => ({ compact }), [compact]);
13117
13160
  let controlProps = {
13118
- ...(0, import_type_guards38.isNotNil)(onOpenChange) && (0, import_type_guards38.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
13161
+ ...(0, import_type_guards39.isNotNil)(onOpenChange) && (0, import_type_guards39.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
13119
13162
  };
13120
13163
  if (disabled) {
13121
13164
  controlProps = {
@@ -13129,7 +13172,7 @@ var Menu = (0, import_react56.forwardRef)(
13129
13172
  modal: false,
13130
13173
  ...controlProps,
13131
13174
  children: [
13132
- /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards38.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
13175
+ /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards39.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
13133
13176
  Button,
13134
13177
  {
13135
13178
  ref,
@@ -13195,12 +13238,12 @@ MenuLabel.displayName = "MenuLabel_UI";
13195
13238
  var import_react58 = require("react");
13196
13239
  var import_styled_components74 = __toESM(require("styled-components"));
13197
13240
  var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
13198
- var import_type_guards40 = require("@wistia/type-guards");
13241
+ var import_type_guards41 = require("@wistia/type-guards");
13199
13242
 
13200
13243
  // src/components/Menu/MenuItemButton.tsx
13201
13244
  var import_react57 = require("react");
13202
13245
  var import_styled_components72 = __toESM(require("styled-components"));
13203
- var import_type_guards39 = require("@wistia/type-guards");
13246
+ var import_type_guards40 = require("@wistia/type-guards");
13204
13247
  var import_jsx_runtime259 = require("react/jsx-runtime");
13205
13248
  var StyledButton3 = (0, import_styled_components72.default)(Button)`
13206
13249
  ${({ colorScheme }) => getColorScheme(colorScheme)};
@@ -13280,7 +13323,7 @@ var StyledBadgeContainer = import_styled_components72.default.div`
13280
13323
  var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
13281
13324
  let { colorScheme, badge } = props;
13282
13325
  if (appearance === "dangerous") {
13283
- if ((0, import_type_guards39.isNotUndefined)(colorScheme)) {
13326
+ if ((0, import_type_guards40.isNotUndefined)(colorScheme)) {
13284
13327
  console.warn("colorScheme prop is ignored when appearance is dangerous");
13285
13328
  }
13286
13329
  colorScheme = "error";
@@ -13308,10 +13351,10 @@ var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, com
13308
13351
  fullWidth: true,
13309
13352
  unstyled: true,
13310
13353
  children: [
13311
- (0, import_type_guards39.isNotNil)(props.leftIcon) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
13354
+ (0, import_type_guards40.isNotNil)(props.leftIcon) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
13312
13355
  /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledLabelAndDescriptionContainer, { children }),
13313
- (0, import_type_guards39.isNotNil)(badge) || (0, import_type_guards39.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
13314
- (0, import_type_guards39.isNotNil)(props.rightIcon) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
13356
+ (0, import_type_guards40.isNotNil)(badge) || (0, import_type_guards40.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
13357
+ (0, import_type_guards40.isNotNil)(props.rightIcon) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
13315
13358
  ]
13316
13359
  }
13317
13360
  );
@@ -13382,7 +13425,7 @@ var SubMenu = ({
13382
13425
  return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
13383
13426
  /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(SubMenuTrigger, { ...props, children: [
13384
13427
  /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(MenuItemLabel, { children: label }),
13385
- (0, import_type_guards40.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(MenuItemDescription, { children: description }) : null
13428
+ (0, import_type_guards41.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(MenuItemDescription, { children: description }) : null
13386
13429
  ] }),
13387
13430
  /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(SubMenuContent, { $compact: compact, children }) })
13388
13431
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
@@ -13474,7 +13517,7 @@ RadioMenuItem.displayName = "RadioMenuItem_UI";
13474
13517
 
13475
13518
  // src/components/Menu/CheckboxMenuItem.tsx
13476
13519
  var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
13477
- var import_type_guards41 = require("@wistia/type-guards");
13520
+ var import_type_guards42 = require("@wistia/type-guards");
13478
13521
  var import_jsx_runtime265 = require("react/jsx-runtime");
13479
13522
  var CheckboxIndicator = ({ checked, ...props }) => {
13480
13523
  return checked ? /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(
@@ -13548,8 +13591,8 @@ var CheckboxMenuItem = ({
13548
13591
  MenuItemButton,
13549
13592
  {
13550
13593
  ...props,
13551
- leftIcon: (0, import_type_guards41.isNotNil)(props.icon) ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(CheckboxIndicator, { checked }),
13552
- rightIcon: (0, import_type_guards41.isNotNil)(props.icon) ? /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_react_dropdown_menu7.DropdownMenuItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(Icon, { type: "checkmark" }) }) : void 0
13594
+ leftIcon: (0, import_type_guards42.isNotNil)(props.icon) ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(CheckboxIndicator, { checked }),
13595
+ rightIcon: (0, import_type_guards42.isNotNil)(props.icon) ? /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_react_dropdown_menu7.DropdownMenuItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(Icon, { type: "checkmark" }) }) : void 0
13553
13596
  }
13554
13597
  )
13555
13598
  }
@@ -13671,7 +13714,7 @@ var ContextMenu = ({
13671
13714
  const [isRightClicked, setIsRightClicked] = (0, import_react61.useState)(false);
13672
13715
  const [menuPosition, setMenuPosition] = (0, import_react61.useState)(position ?? { x: 0, y: 0 });
13673
13716
  (0, import_react61.useEffect)(() => {
13674
- if ((0, import_type_guards42.isNil)(position)) {
13717
+ if ((0, import_type_guards43.isNil)(position)) {
13675
13718
  const onContextMenu = (event) => {
13676
13719
  event.preventDefault();
13677
13720
  setMenuPosition({ x: event.clientX, y: event.clientY });
@@ -13685,8 +13728,11 @@ var ContextMenu = ({
13685
13728
  }
13686
13729
  return () => null;
13687
13730
  }, [position, triggerRef]);
13688
- const isOpen = (0, import_type_guards42.isNotNil)(position) || isRightClicked;
13689
- return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
13731
+ const isOpen = (0, import_type_guards43.isNotNil)(position) || isRightClicked;
13732
+ if (!isOpen) {
13733
+ return null;
13734
+ }
13735
+ const menu = /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
13690
13736
  Menu,
13691
13737
  {
13692
13738
  isOpen,
@@ -13714,13 +13760,17 @@ var ContextMenu = ({
13714
13760
  ),
13715
13761
  children
13716
13762
  }
13717
- ) : null;
13763
+ );
13764
+ if ((0, import_type_guards43.isNotNil)(triggerRef)) {
13765
+ return (0, import_react_dom.createPortal)(menu, document.body);
13766
+ }
13767
+ return menu;
13718
13768
  };
13719
13769
 
13720
13770
  // src/components/DataCards/DataCard.tsx
13721
13771
  var import_react62 = require("react");
13722
13772
  var import_styled_components75 = __toESM(require("styled-components"));
13723
- var import_type_guards43 = require("@wistia/type-guards");
13773
+ var import_type_guards44 = require("@wistia/type-guards");
13724
13774
  var import_jsx_runtime268 = require("react/jsx-runtime");
13725
13775
  var StyledDataCard = import_styled_components75.default.div`
13726
13776
  --wui-data-card-text: var(--wui-color-text-button);
@@ -13874,8 +13924,8 @@ var DataCardInner = ({
13874
13924
  children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledLoadingValue, {}) : value
13875
13925
  }
13876
13926
  ),
13877
- (0, import_type_guards43.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledSlot, { children: upperRightSlot }),
13878
- (0, import_type_guards43.isNotNil)(subtitle) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
13927
+ (0, import_type_guards44.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledSlot, { children: upperRightSlot }),
13928
+ (0, import_type_guards44.isNotNil)(subtitle) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
13879
13929
  StyledSubtitle,
13880
13930
  {
13881
13931
  "data-wui-data-card-subtitle": true,
@@ -13883,13 +13933,13 @@ var DataCardInner = ({
13883
13933
  children: subtitle
13884
13934
  }
13885
13935
  ),
13886
- (0, import_type_guards43.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledDataCardTrendContainer, { children: trend })
13936
+ (0, import_type_guards44.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledDataCardTrendContainer, { children: trend })
13887
13937
  ]
13888
13938
  }
13889
13939
  );
13890
13940
  var DataCard = (props) => {
13891
13941
  const ref = (0, import_react62.useRef)(null);
13892
- if ((0, import_type_guards43.isNotNil)(props.href) || (0, import_type_guards43.isNotNil)(props.onClick)) {
13942
+ if ((0, import_type_guards44.isNotNil)(props.href) || (0, import_type_guards44.isNotNil)(props.onClick)) {
13893
13943
  const { "aria-pressed": ariaPressed, ...dataCardProps } = props;
13894
13944
  return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
13895
13945
  DataCardInner,
@@ -13900,8 +13950,8 @@ var DataCard = (props) => {
13900
13950
  Button,
13901
13951
  {
13902
13952
  ref,
13903
- ...(0, import_type_guards43.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
13904
- ...(0, import_type_guards43.isNotNil)(props.reloadDocument) ? { reloadDocument: props.reloadDocument } : {},
13953
+ ...(0, import_type_guards44.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
13954
+ ...(0, import_type_guards44.isNotNil)(props.reloadDocument) ? { reloadDocument: props.reloadDocument } : {},
13905
13955
  "aria-pressed": ariaPressed,
13906
13956
  disabled: props.disabled ?? false,
13907
13957
  href: props.href,
@@ -14269,11 +14319,11 @@ var EditableHeading = ({
14269
14319
  // src/components/EditableText/EditableTextDisplay.tsx
14270
14320
  var import_react65 = require("react");
14271
14321
  var import_styled_components83 = __toESM(require("styled-components"));
14272
- var import_type_guards45 = require("@wistia/type-guards");
14322
+ var import_type_guards46 = require("@wistia/type-guards");
14273
14323
 
14274
14324
  // src/components/EditableText/EditableTextRoot.tsx
14275
14325
  var import_react64 = require("react");
14276
- var import_type_guards44 = require("@wistia/type-guards");
14326
+ var import_type_guards45 = require("@wistia/type-guards");
14277
14327
  var import_styled_components82 = __toESM(require("styled-components"));
14278
14328
  var import_jsx_runtime277 = require("react/jsx-runtime");
14279
14329
  var StyledEditableTextRoot = import_styled_components82.default.div`
@@ -14308,7 +14358,7 @@ var EditableTextRoot = ({
14308
14358
  const [isEditing, setIsEditing] = (0, import_react64.useState)(false);
14309
14359
  const value = isControlled ? controlledValue : internalValue;
14310
14360
  const generatedId = (0, import_react64.useId)();
14311
- const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
14361
+ const computedId = (0, import_type_guards45.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
14312
14362
  const handleSetIsEditing = (0, import_react64.useCallback)(
14313
14363
  (editing) => {
14314
14364
  if (editing && !isEditing) {
@@ -14395,7 +14445,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
14395
14445
  margin: 0;
14396
14446
  transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
14397
14447
  ${({ $maxLines }) => {
14398
- if ((0, import_type_guards45.isNotNil)($maxLines)) {
14448
+ if ((0, import_type_guards46.isNotNil)($maxLines)) {
14399
14449
  return import_styled_components83.css`
14400
14450
  ${ellipsisStyle};
14401
14451
  ${lineClampCss($maxLines)};
@@ -14403,7 +14453,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
14403
14453
  }
14404
14454
  return void 0;
14405
14455
  }}
14406
- ${({ $minLines }) => (0, import_type_guards45.isNotNil)($minLines) && import_styled_components83.css`
14456
+ ${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && import_styled_components83.css`
14407
14457
  min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
14408
14458
  `}
14409
14459
  word-break: break-word;
@@ -14490,12 +14540,12 @@ var EditableTextDisplay = makePolymorphic(
14490
14540
  // src/components/EditableText/EditableTextInput.tsx
14491
14541
  var import_react66 = require("react");
14492
14542
  var import_styled_components84 = __toESM(require("styled-components"));
14493
- var import_type_guards46 = require("@wistia/type-guards");
14543
+ var import_type_guards47 = require("@wistia/type-guards");
14494
14544
  var import_jsx_runtime279 = require("react/jsx-runtime");
14495
14545
  var StyledInput2 = (0, import_styled_components84.default)(Input)`
14496
14546
  && {
14497
- ${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && `min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14498
- ${({ $maxLines }) => (0, import_type_guards46.isNotNil)($maxLines) && `max-height: calc(${$maxLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14547
+ ${({ $minLines }) => (0, import_type_guards47.isNotNil)($minLines) && `min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14548
+ ${({ $maxLines }) => (0, import_type_guards47.isNotNil)($maxLines) && `max-height: calc(${$maxLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14499
14549
  ${({ $typographicVariant }) => getTypographicStyles($typographicVariant)}
14500
14550
  background-color: var(--wui-color-bg-surface);
14501
14551
  border-radius: var(--wui-editable-text-border-radius);
@@ -14756,7 +14806,7 @@ var useFormState = (action, initialData = {}) => {
14756
14806
 
14757
14807
  // src/components/Form/FormErrorSummary.tsx
14758
14808
  var import_react72 = require("react");
14759
- var import_type_guards47 = require("@wistia/type-guards");
14809
+ var import_type_guards48 = require("@wistia/type-guards");
14760
14810
  var import_jsx_runtime282 = require("react/jsx-runtime");
14761
14811
  var ErrorItem = ({ name, error, formId }) => {
14762
14812
  return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
@@ -14770,8 +14820,8 @@ var FormErrorSummary = ({ description }) => {
14770
14820
  }
14771
14821
  return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)("div", { ref, children: [
14772
14822
  /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("p", { children: description }),
14773
- /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards47.isNotUndefined)(error)).map(
14774
- ([name, error]) => (0, import_type_guards47.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
14823
+ /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards48.isNotUndefined)(error)).map(
14824
+ ([name, error]) => (0, import_type_guards48.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
14775
14825
  ErrorItem,
14776
14826
  {
14777
14827
  error: err,
@@ -14795,7 +14845,7 @@ var FormErrorSummary = ({ description }) => {
14795
14845
  // src/components/FormField/FormField.tsx
14796
14846
  var import_react73 = require("react");
14797
14847
  var import_styled_components85 = __toESM(require("styled-components"));
14798
- var import_type_guards48 = require("@wistia/type-guards");
14848
+ var import_type_guards49 = require("@wistia/type-guards");
14799
14849
  var import_jsx_runtime283 = require("react/jsx-runtime");
14800
14850
  var StyledFormField = import_styled_components85.default.div`
14801
14851
  --form-field-spacing: var(--wui-space-01);
@@ -14836,7 +14886,7 @@ var StyledErrorList = import_styled_components85.default.ul`
14836
14886
  gap: var(--wui-space-01);
14837
14887
  `;
14838
14888
  var ErrorMessages = ({ errors, id }) => {
14839
- const isErrorArray = (0, import_type_guards48.isArray)(errors);
14889
+ const isErrorArray = (0, import_type_guards49.isArray)(errors);
14840
14890
  const isMultipleErrors = isErrorArray && errors.length > 1;
14841
14891
  if (!isErrorArray) {
14842
14892
  return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
@@ -14904,19 +14954,19 @@ var FormField = ({
14904
14954
  "aria-describedby": ariaDescribedby,
14905
14955
  ...props
14906
14956
  };
14907
- if ((0, import_type_guards48.isUndefined)(value) && (0, import_type_guards48.isNotUndefined)(defaultValue)) {
14957
+ if ((0, import_type_guards49.isUndefined)(value) && (0, import_type_guards49.isNotUndefined)(defaultValue)) {
14908
14958
  childProps = {
14909
14959
  ...childProps,
14910
14960
  defaultValue
14911
14961
  };
14912
14962
  }
14913
- if ((0, import_type_guards48.isNotNil)(checkboxGroup)) {
14914
- const computedName = (0, import_type_guards48.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
14963
+ if ((0, import_type_guards49.isNotNil)(checkboxGroup)) {
14964
+ const computedName = (0, import_type_guards49.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
14915
14965
  const handleChange = (event) => {
14916
- if ((0, import_type_guards48.isNotUndefined)(props.onChange)) {
14966
+ if ((0, import_type_guards49.isNotUndefined)(props.onChange)) {
14917
14967
  props.onChange(event);
14918
14968
  }
14919
- if ((0, import_type_guards48.isNotUndefined)(checkboxGroup.onChange)) {
14969
+ if ((0, import_type_guards49.isNotUndefined)(checkboxGroup.onChange)) {
14920
14970
  checkboxGroup.onChange(event);
14921
14971
  }
14922
14972
  };
@@ -14924,7 +14974,7 @@ var FormField = ({
14924
14974
  ...childProps,
14925
14975
  name: computedName,
14926
14976
  onChange: handleChange,
14927
- "aria-invalid": (0, import_type_guards48.isNotNil)(error)
14977
+ "aria-invalid": (0, import_type_guards49.isNotNil)(error)
14928
14978
  };
14929
14979
  }
14930
14980
  import_react73.Children.only(children);
@@ -14935,9 +14985,9 @@ var FormField = ({
14935
14985
  "data-label-position": labelPosition ?? formState.labelPosition,
14936
14986
  children: [
14937
14987
  !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(Label, { htmlFor: computedId, children: label }),
14938
- (0, import_type_guards48.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
14988
+ (0, import_type_guards49.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
14939
14989
  (0, import_react73.cloneElement)(children, childProps),
14940
- (0, import_type_guards48.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
14990
+ (0, import_type_guards49.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
14941
14991
  /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("div", {}),
14942
14992
  /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
14943
14993
  ErrorMessages,
@@ -14983,7 +15033,7 @@ RadioGroup.displayName = "RadioGroup_UI";
14983
15033
  // src/components/Grid/Grid.tsx
14984
15034
  var import_react75 = require("react");
14985
15035
  var import_styled_components86 = __toESM(require("styled-components"));
14986
- var import_type_guards49 = require("@wistia/type-guards");
15036
+ var import_type_guards50 = require("@wistia/type-guards");
14987
15037
  var import_jsx_runtime285 = require("react/jsx-runtime");
14988
15038
  var DEFAULT_ELEMENT5 = "div";
14989
15039
  var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
@@ -15033,7 +15083,7 @@ var GridComponent = (0, import_react75.forwardRef)(
15033
15083
  ...props
15034
15084
  }, ref) => {
15035
15085
  const responsiveGap = useResponsiveProp(gap);
15036
- const { column, row } = (0, import_type_guards49.isRecord)(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
15086
+ const { column, row } = (0, import_type_guards50.isRecord)(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
15037
15087
  const responsiveColumns = useResponsiveProp(columns);
15038
15088
  const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
15039
15089
  return /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
@@ -15058,7 +15108,7 @@ var Grid = makePolymorphic(GridComponent);
15058
15108
  // src/components/InputClickToCopy/InputClickToCopy.tsx
15059
15109
  var import_styled_components87 = __toESM(require("styled-components"));
15060
15110
  var import_react76 = require("react");
15061
- var import_type_guards50 = require("@wistia/type-guards");
15111
+ var import_type_guards51 = require("@wistia/type-guards");
15062
15112
  var import_jsx_runtime286 = require("react/jsx-runtime");
15063
15113
  var StyledIconButton = (0, import_styled_components87.default)(IconButton)`
15064
15114
  /* override size for icon button since prop gets changed by Input */
@@ -15088,12 +15138,12 @@ var InputClickToCopy = (0, import_react76.forwardRef)(
15088
15138
  if (disabled) {
15089
15139
  return;
15090
15140
  }
15091
- if ((0, import_type_guards50.isFunction)(props.onClick)) {
15141
+ if ((0, import_type_guards51.isFunction)(props.onClick)) {
15092
15142
  props.onClick(event);
15093
15143
  }
15094
15144
  void copyToClipboard(value).then(() => {
15095
15145
  setIsCopied(true);
15096
- if ((0, import_type_guards50.isFunction)(onCopy)) {
15146
+ if ((0, import_type_guards51.isFunction)(onCopy)) {
15097
15147
  onCopy(value);
15098
15148
  }
15099
15149
  return value;
@@ -15128,7 +15178,7 @@ InputClickToCopy.displayName = "InputClickToCopy_UI";
15128
15178
  // src/components/InputPassword/InputPassword.tsx
15129
15179
  var import_styled_components88 = __toESM(require("styled-components"));
15130
15180
  var import_react77 = require("react");
15131
- var import_type_guards51 = require("@wistia/type-guards");
15181
+ var import_type_guards52 = require("@wistia/type-guards");
15132
15182
  var import_jsx_runtime287 = require("react/jsx-runtime");
15133
15183
  var StyledIconButton2 = (0, import_styled_components88.default)(IconButton)`
15134
15184
  /* override size for icon button since prop gets changed by Input */
@@ -15144,7 +15194,7 @@ var InputPassword = (0, import_react77.forwardRef)(
15144
15194
  const handleClick = () => {
15145
15195
  const newVisibility = !isVisible;
15146
15196
  setIsVisible(newVisibility);
15147
- if ((0, import_type_guards51.isFunction)(onVisibilityToggle)) {
15197
+ if ((0, import_type_guards52.isFunction)(onVisibilityToggle)) {
15148
15198
  onVisibilityToggle(newVisibility);
15149
15199
  }
15150
15200
  };
@@ -15174,7 +15224,7 @@ InputPassword.displayName = "InputPassword_UI";
15174
15224
 
15175
15225
  // src/components/KeyboardShortcut/KeyboardShortcut.tsx
15176
15226
  var import_styled_components89 = __toESM(require("styled-components"));
15177
- var import_type_guards52 = require("@wistia/type-guards");
15227
+ var import_type_guards53 = require("@wistia/type-guards");
15178
15228
  var import_jsx_runtime288 = require("react/jsx-runtime");
15179
15229
  var StyledKeyboardShortcut = import_styled_components89.default.div`
15180
15230
  align-items: center;
@@ -15268,7 +15318,7 @@ var KeyboardShortcut = ({
15268
15318
  $fullWidth: fullWidth,
15269
15319
  ...otherProps,
15270
15320
  children: [
15271
- (0, import_type_guards52.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Label2, { children: label }),
15321
+ (0, import_type_guards53.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Label2, { children: label }),
15272
15322
  /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
15273
15323
  StyledKey,
15274
15324
  {
@@ -15282,18 +15332,18 @@ var KeyboardShortcut = ({
15282
15332
  KeyboardShortcut.displayName = "KeyboardShortcut_UI";
15283
15333
 
15284
15334
  // src/components/List/List.tsx
15285
- var import_type_guards54 = require("@wistia/type-guards");
15335
+ var import_type_guards55 = require("@wistia/type-guards");
15286
15336
  var import_styled_components91 = __toESM(require("styled-components"));
15287
15337
 
15288
15338
  // src/components/List/ListItem.tsx
15289
15339
  var import_styled_components90 = __toESM(require("styled-components"));
15290
- var import_type_guards53 = require("@wistia/type-guards");
15340
+ var import_type_guards54 = require("@wistia/type-guards");
15291
15341
  var import_jsx_runtime289 = require("react/jsx-runtime");
15292
15342
  var ListItemComponent = import_styled_components90.default.li`
15293
15343
  margin-bottom: var(--wui-space-02);
15294
15344
  `;
15295
15345
  var ListItem = ({ children }) => {
15296
- if ((0, import_type_guards53.isNil)(children)) {
15346
+ if ((0, import_type_guards54.isNil)(children)) {
15297
15347
  return null;
15298
15348
  }
15299
15349
  return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(ListItemComponent, { children });
@@ -15423,13 +15473,13 @@ var List = ({
15423
15473
  ...otherProps
15424
15474
  }) => {
15425
15475
  const listVariant = variant ?? "bullets";
15426
- if ((0, import_type_guards54.isNotNil)(children)) {
15476
+ if ((0, import_type_guards55.isNotNil)(children)) {
15427
15477
  if (Array.isArray(children) && !children.length) {
15428
15478
  return null;
15429
15479
  }
15430
15480
  return renderListComponent(children, listVariant, otherProps);
15431
15481
  }
15432
- if ((0, import_type_guards54.isNotNil)(items)) {
15482
+ if ((0, import_type_guards55.isNotNil)(items)) {
15433
15483
  if (!items.length) {
15434
15484
  return null;
15435
15485
  }
@@ -15464,7 +15514,7 @@ Mark.displayName = "Mark_UI";
15464
15514
  var import_react80 = require("react");
15465
15515
  var import_styled_components97 = __toESM(require("styled-components"));
15466
15516
  var import_react_dialog5 = require("@radix-ui/react-dialog");
15467
- var import_type_guards56 = require("@wistia/type-guards");
15517
+ var import_type_guards57 = require("@wistia/type-guards");
15468
15518
 
15469
15519
  // src/components/Modal/ModalHeader.tsx
15470
15520
  var import_styled_components94 = __toESM(require("styled-components"));
@@ -15543,7 +15593,7 @@ var import_react_dialog3 = require("@radix-ui/react-dialog");
15543
15593
 
15544
15594
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
15545
15595
  var import_react78 = require("react");
15546
- var import_type_guards55 = require("@wistia/type-guards");
15596
+ var import_type_guards56 = require("@wistia/type-guards");
15547
15597
  var useFocusRestore = () => {
15548
15598
  const previouslyFocusedRef = (0, import_react78.useRef)(null);
15549
15599
  (0, import_react78.useEffect)(() => {
@@ -15551,7 +15601,7 @@ var useFocusRestore = () => {
15551
15601
  }, []);
15552
15602
  (0, import_react78.useEffect)(() => {
15553
15603
  return () => {
15554
- if ((0, import_type_guards55.isNotNil)(previouslyFocusedRef.current)) {
15604
+ if ((0, import_type_guards56.isNotNil)(previouslyFocusedRef.current)) {
15555
15605
  setTimeout(() => {
15556
15606
  previouslyFocusedRef.current?.focus();
15557
15607
  }, 0);
@@ -15773,7 +15823,7 @@ var Modal = (0, import_react80.forwardRef)(
15773
15823
  import_react_dialog5.Root,
15774
15824
  {
15775
15825
  onOpenChange: (open2) => {
15776
- if (!open2 && (0, import_type_guards56.isNotNil)(onRequestClose)) {
15826
+ if (!open2 && (0, import_type_guards57.isNotNil)(onRequestClose)) {
15777
15827
  onRequestClose();
15778
15828
  }
15779
15829
  },
@@ -15785,7 +15835,7 @@ var Modal = (0, import_react80.forwardRef)(
15785
15835
  {
15786
15836
  ref,
15787
15837
  onOpenAutoFocus: (event) => {
15788
- if ((0, import_type_guards56.isNotNil)(initialFocusRef) && initialFocusRef.current) {
15838
+ if ((0, import_type_guards57.isNotNil)(initialFocusRef) && initialFocusRef.current) {
15789
15839
  event.preventDefault();
15790
15840
  requestAnimationFrame(() => {
15791
15841
  initialFocusRef.current?.focus();
@@ -15797,7 +15847,7 @@ var Modal = (0, import_react80.forwardRef)(
15797
15847
  ...props,
15798
15848
  children: [
15799
15849
  /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalScrollArea, { children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalBody, { children }) }),
15800
- (0, import_type_guards56.isNotNil)(footer) ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalFooter, { children: footer }) : null,
15850
+ (0, import_type_guards57.isNotNil)(footer) ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalFooter, { children: footer }) : null,
15801
15851
  hideCloseButton && hideTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
15802
15852
  ModalHeader,
15803
15853
  {
@@ -15843,9 +15893,9 @@ var import_react_popover5 = require("@radix-ui/react-popover");
15843
15893
  var import_styled_components99 = __toESM(require("styled-components"));
15844
15894
 
15845
15895
  // src/private/helpers/getControls/getControlProps.tsx
15846
- var import_type_guards57 = require("@wistia/type-guards");
15896
+ var import_type_guards58 = require("@wistia/type-guards");
15847
15897
  var getControlProps = (isOpen, onOpenChange) => {
15848
- return (0, import_type_guards57.isNotNil)(onOpenChange) && (0, import_type_guards57.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
15898
+ return (0, import_type_guards58.isNotNil)(onOpenChange) && (0, import_type_guards58.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
15849
15899
  };
15850
15900
 
15851
15901
  // src/components/Popover/PopoverArrow.tsx
@@ -16001,7 +16051,7 @@ Popover.displayName = "Popover_UI";
16001
16051
  // src/components/ProgressBar/ProgressBar.tsx
16002
16052
  var import_styled_components100 = __toESM(require("styled-components"));
16003
16053
  var import_react_progress = require("@radix-ui/react-progress");
16004
- var import_type_guards58 = require("@wistia/type-guards");
16054
+ var import_type_guards59 = require("@wistia/type-guards");
16005
16055
  var import_jsx_runtime299 = require("react/jsx-runtime");
16006
16056
  var ProgressBarWrapper = import_styled_components100.default.div`
16007
16057
  --progress-bar-height: 8px;
@@ -16057,7 +16107,7 @@ var ProgressBar = ({
16057
16107
  ...props
16058
16108
  }) => {
16059
16109
  return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(ProgressBarWrapper, { children: [
16060
- (0, import_type_guards58.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
16110
+ (0, import_type_guards59.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
16061
16111
  /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
16062
16112
  StyledProgressBar,
16063
16113
  {
@@ -16075,13 +16125,13 @@ var ProgressBar = ({
16075
16125
  )
16076
16126
  }
16077
16127
  ),
16078
- (0, import_type_guards58.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelRight }) : null
16128
+ (0, import_type_guards59.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelRight }) : null
16079
16129
  ] });
16080
16130
  };
16081
16131
  ProgressBar.displayName = "ProgressBar_UI";
16082
16132
 
16083
16133
  // src/components/Radio/Radio.tsx
16084
- var import_type_guards59 = require("@wistia/type-guards");
16134
+ var import_type_guards60 = require("@wistia/type-guards");
16085
16135
  var import_react81 = require("react");
16086
16136
  var import_styled_components101 = __toESM(require("styled-components"));
16087
16137
  var import_jsx_runtime300 = require("react/jsx-runtime");
@@ -16181,14 +16231,14 @@ var Radio = (0, import_react81.forwardRef)(
16181
16231
  ...props
16182
16232
  }, ref) => {
16183
16233
  const generatedId = (0, import_react81.useId)();
16184
- const computedId = (0, import_type_guards59.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16234
+ const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16185
16235
  const radioGroupContext = useRadioGroup();
16186
16236
  const contextName = radioGroupContext?.name;
16187
16237
  const contextOnChange = radioGroupContext?.onChange;
16188
16238
  const contextValue = radioGroupContext?.value;
16189
16239
  const radioName = name ?? contextName;
16190
16240
  const handleOnChange = onChange ?? contextOnChange;
16191
- const isChecked = (0, import_type_guards59.isNotUndefined)(value) && (0, import_type_guards59.isNotUndefined)(contextValue) ? contextValue === value : checked;
16241
+ const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
16192
16242
  return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
16193
16243
  StyledRadioWrapper,
16194
16244
  {
@@ -16235,7 +16285,7 @@ var import_react83 = require("react");
16235
16285
  // src/components/RadioCard/RadioCardRoot.tsx
16236
16286
  var import_react82 = require("react");
16237
16287
  var import_styled_components102 = __toESM(require("styled-components"));
16238
- var import_type_guards60 = require("@wistia/type-guards");
16288
+ var import_type_guards61 = require("@wistia/type-guards");
16239
16289
  var import_jsx_runtime301 = require("react/jsx-runtime");
16240
16290
  var checkedStyles = import_styled_components102.css`
16241
16291
  --wui-radio-card-border-color: var(--wui-color-focus-ring);
@@ -16357,14 +16407,14 @@ var RadioCardRoot = (0, import_react82.forwardRef)(
16357
16407
  ...props
16358
16408
  }, ref) => {
16359
16409
  const generatedId = (0, import_react82.useId)();
16360
- const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16410
+ const computedId = (0, import_type_guards61.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16361
16411
  const radioGroupContext = useRadioGroup();
16362
16412
  const contextName = radioGroupContext?.name;
16363
16413
  const contextOnChange = radioGroupContext?.onChange;
16364
16414
  const contextValue = radioGroupContext?.value;
16365
16415
  const radioName = name ?? contextName;
16366
16416
  const handleOnChange = onChange ?? contextOnChange;
16367
- const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
16417
+ const isChecked = (0, import_type_guards61.isNotUndefined)(value) && (0, import_type_guards61.isNotUndefined)(contextValue) ? contextValue === value : checked;
16368
16418
  return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
16369
16419
  StyledCard2,
16370
16420
  {
@@ -16396,7 +16446,7 @@ RadioCardRoot.displayName = "RadioCardRoot_UI";
16396
16446
 
16397
16447
  // src/components/RadioCard/RadioCardDefaultLayout.tsx
16398
16448
  var import_styled_components104 = __toESM(require("styled-components"));
16399
- var import_type_guards61 = require("@wistia/type-guards");
16449
+ var import_type_guards62 = require("@wistia/type-guards");
16400
16450
 
16401
16451
  // src/components/RadioCard/RadioCardIndicator.tsx
16402
16452
  var import_styled_components103 = __toESM(require("styled-components"));
@@ -16470,17 +16520,17 @@ var RadioCardDefaultLayout = ({
16470
16520
  showIndicator = true
16471
16521
  }) => {
16472
16522
  return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(StyledCardContent, { children: [
16473
- showIndicator ? /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledIndicatorContainer, { $hasIcon: (0, import_type_guards61.isNotNil)(icon), children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
16523
+ showIndicator ? /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledIndicatorContainer, { $hasIcon: (0, import_type_guards62.isNotNil)(icon), children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
16474
16524
  /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(Stack, { gap: "space-02", children: [
16475
- (0, import_type_guards61.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
16525
+ (0, import_type_guards62.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
16476
16526
  /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(
16477
16527
  Stack,
16478
16528
  {
16479
16529
  gap: "space-01",
16480
- style: (0, import_type_guards61.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
16530
+ style: (0, import_type_guards62.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
16481
16531
  children: [
16482
- (0, import_type_guards61.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(Text, { variant: "label3", children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("strong", { children: label }) }),
16483
- (0, import_type_guards61.isNotNil)(description) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
16532
+ (0, import_type_guards62.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(Text, { variant: "label3", children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("strong", { children: label }) }),
16533
+ (0, import_type_guards62.isNotNil)(description) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
16484
16534
  Text,
16485
16535
  {
16486
16536
  prominence: "secondary",
@@ -16663,7 +16713,7 @@ ScrollArea.displayName = "ScrollArea_UI";
16663
16713
  var import_react88 = require("react");
16664
16714
  var import_styled_components108 = __toESM(require("styled-components"));
16665
16715
  var import_react_toggle_group3 = require("@radix-ui/react-toggle-group");
16666
- var import_type_guards63 = require("@wistia/type-guards");
16716
+ var import_type_guards64 = require("@wistia/type-guards");
16667
16717
 
16668
16718
  // src/components/SegmentedControl/useSelectedItemStyle.tsx
16669
16719
  var import_react86 = require("react");
@@ -16700,7 +16750,7 @@ var useSelectedItemStyle = () => {
16700
16750
 
16701
16751
  // src/components/SegmentedControl/SelectedItemIndicator.tsx
16702
16752
  var import_styled_components107 = __toESM(require("styled-components"));
16703
- var import_type_guards62 = require("@wistia/type-guards");
16753
+ var import_type_guards63 = require("@wistia/type-guards");
16704
16754
 
16705
16755
  // src/components/SegmentedControl/useSegmentedControlValue.tsx
16706
16756
  var import_react87 = require("react");
@@ -16734,7 +16784,7 @@ var SelectedItemIndicatorDiv = import_styled_components107.default.div`
16734
16784
  var SelectedItemIndicator = () => {
16735
16785
  const selectedValue = useSegmentedControlValue();
16736
16786
  const { selectedItemIndicatorStyle } = useSelectedItemStyle();
16737
- if (!selectedValue || (0, import_type_guards62.isUndefined)(selectedItemIndicatorStyle)) {
16787
+ if (!selectedValue || (0, import_type_guards63.isUndefined)(selectedItemIndicatorStyle)) {
16738
16788
  return null;
16739
16789
  }
16740
16790
  return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
@@ -16771,7 +16821,7 @@ var SegmentedControl = (0, import_react88.forwardRef)(
16771
16821
  onSelectedValueChange,
16772
16822
  ...props
16773
16823
  }, ref) => {
16774
- if ((0, import_type_guards63.isNil)(children)) {
16824
+ if ((0, import_type_guards64.isNil)(children)) {
16775
16825
  return null;
16776
16826
  }
16777
16827
  return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
@@ -16800,7 +16850,7 @@ SegmentedControl.displayName = "SegmentedControl_UI";
16800
16850
  var import_react89 = require("react");
16801
16851
  var import_styled_components109 = __toESM(require("styled-components"));
16802
16852
  var import_react_toggle_group4 = require("@radix-ui/react-toggle-group");
16803
- var import_type_guards64 = require("@wistia/type-guards");
16853
+ var import_type_guards65 = require("@wistia/type-guards");
16804
16854
  var import_jsx_runtime309 = require("react/jsx-runtime");
16805
16855
  var segmentedControlItemStyles = import_styled_components109.css`
16806
16856
  all: unset; /* ToggleGroupItem is a button element */
@@ -16916,8 +16966,8 @@ var SegmentedControlItem = (0, import_react89.forwardRef)(
16916
16966
  {
16917
16967
  ref: combinedRef,
16918
16968
  ...otherProps,
16919
- $hasLabel: (0, import_type_guards64.isNotNil)(label),
16920
- "aria-label": (0, import_type_guards64.isNotNil)(label) ? void 0 : ariaLabel,
16969
+ $hasLabel: (0, import_type_guards65.isNotNil)(label),
16970
+ "aria-label": (0, import_type_guards65.isNotNil)(label) ? void 0 : ariaLabel,
16921
16971
  disabled,
16922
16972
  onClick: handleClick,
16923
16973
  value,
@@ -17082,7 +17132,7 @@ Select.displayName = "Select_UI";
17082
17132
  var import_react_select2 = require("@radix-ui/react-select");
17083
17133
  var import_react91 = require("react");
17084
17134
  var import_styled_components111 = __toESM(require("styled-components"));
17085
- var import_type_guards65 = require("@wistia/type-guards");
17135
+ var import_type_guards66 = require("@wistia/type-guards");
17086
17136
  var import_jsx_runtime311 = require("react/jsx-runtime");
17087
17137
  var StyledItem = (0, import_styled_components111.default)(import_react_select2.Item)`
17088
17138
  ${getTypographicStyles("label3")}
@@ -17119,7 +17169,7 @@ var SelectOption = (0, import_react91.forwardRef)(
17119
17169
  ref: forwardedRef,
17120
17170
  $checkmarkVerticalAlign: checkmarkVerticalAlign,
17121
17171
  children: [
17122
- (0, import_type_guards65.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { children: [
17172
+ (0, import_type_guards66.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { children: [
17123
17173
  children,
17124
17174
  /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
17125
17175
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(import_react_select2.ItemText, { children }),
@@ -17161,7 +17211,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
17161
17211
  // src/components/Slider/Slider.tsx
17162
17212
  var import_react_slider2 = require("@radix-ui/react-slider");
17163
17213
  var import_styled_components113 = __toESM(require("styled-components"));
17164
- var import_type_guards66 = require("@wistia/type-guards");
17214
+ var import_type_guards67 = require("@wistia/type-guards");
17165
17215
  var import_jsx_runtime313 = require("react/jsx-runtime");
17166
17216
  var SliderContainer = import_styled_components113.default.div`
17167
17217
  --wui-slider-track-color: var(--wui-gray-6);
@@ -17240,7 +17290,7 @@ var Slider = ({
17240
17290
  "data-testid": dataTestId = "ui-slider",
17241
17291
  ...otherProps
17242
17292
  }) => {
17243
- if (!((0, import_type_guards66.isNonEmptyString)(ariaLabel) || (0, import_type_guards66.isNonEmptyString)(ariaLabelledby))) {
17293
+ if (!((0, import_type_guards67.isNonEmptyString)(ariaLabel) || (0, import_type_guards67.isNonEmptyString)(ariaLabelledby))) {
17244
17294
  throw new Error(
17245
17295
  "UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop."
17246
17296
  );
@@ -17402,7 +17452,7 @@ var TableRow = ({ children, ...props }) => {
17402
17452
  // src/components/Tabs/Tabs.tsx
17403
17453
  var import_react_tabs = require("@radix-ui/react-tabs");
17404
17454
  var import_react98 = require("react");
17405
- var import_type_guards67 = require("@wistia/type-guards");
17455
+ var import_type_guards68 = require("@wistia/type-guards");
17406
17456
 
17407
17457
  // src/components/Tabs/useTabsValue.tsx
17408
17458
  var import_react97 = require("react");
@@ -17439,10 +17489,10 @@ var Tabs = ({
17439
17489
  ...props,
17440
17490
  onValueChange
17441
17491
  };
17442
- if ((0, import_type_guards67.isNotNil)(value)) {
17492
+ if ((0, import_type_guards68.isNotNil)(value)) {
17443
17493
  rootProps.value = value;
17444
17494
  }
17445
- if ((0, import_type_guards67.isNotNil)(defaultValue)) {
17495
+ if ((0, import_type_guards68.isNotNil)(defaultValue)) {
17446
17496
  rootProps.defaultValue = defaultValue;
17447
17497
  }
17448
17498
  return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(import_react_tabs.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(SelectedItemStyleProvider, { children }) }) });
@@ -17462,7 +17512,7 @@ var import_react_tabs3 = require("@radix-ui/react-tabs");
17462
17512
  var import_styled_components121 = __toESM(require("styled-components"));
17463
17513
 
17464
17514
  // src/components/Tabs/SelectedTabIndicator.tsx
17465
- var import_type_guards68 = require("@wistia/type-guards");
17515
+ var import_type_guards69 = require("@wistia/type-guards");
17466
17516
 
17467
17517
  // src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
17468
17518
  var import_styled_components120 = __toESM(require("styled-components"));
@@ -17477,7 +17527,7 @@ var import_jsx_runtime322 = require("react/jsx-runtime");
17477
17527
  var SelectedTabIndicator = () => {
17478
17528
  const { selectedItemIndicatorStyle } = useSelectedItemStyle();
17479
17529
  const selectedValue = useTabsValue();
17480
- if (selectedValue == null || (0, import_type_guards68.isUndefined)(selectedItemIndicatorStyle)) {
17530
+ if (selectedValue == null || (0, import_type_guards69.isUndefined)(selectedItemIndicatorStyle)) {
17481
17531
  return null;
17482
17532
  }
17483
17533
  return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
@@ -17511,7 +17561,7 @@ TabsList.displayName = "TabsList_UI";
17511
17561
 
17512
17562
  // src/components/Tabs/TabsTrigger.tsx
17513
17563
  var import_react99 = require("react");
17514
- var import_type_guards69 = require("@wistia/type-guards");
17564
+ var import_type_guards70 = require("@wistia/type-guards");
17515
17565
 
17516
17566
  // src/components/Tabs/StyledRadixTabsTrigger.tsx
17517
17567
  var import_styled_components122 = __toESM(require("styled-components"));
@@ -17562,8 +17612,8 @@ var TabsTrigger = (0, import_react99.forwardRef)(
17562
17612
  {
17563
17613
  ...otherProps,
17564
17614
  ref: combinedRef,
17565
- $hasLabel: (0, import_type_guards69.isNotNil)(label),
17566
- "aria-label": (0, import_type_guards69.isNotNil)(label) ? void 0 : ariaLabel,
17615
+ $hasLabel: (0, import_type_guards70.isNotNil)(label),
17616
+ "aria-label": (0, import_type_guards70.isNotNil)(label) ? void 0 : ariaLabel,
17567
17617
  disabled,
17568
17618
  value,
17569
17619
  children: [
@@ -17578,7 +17628,7 @@ TabsTrigger.displayName = "TabsTrigger_UI";
17578
17628
 
17579
17629
  // src/components/Thumbnail/ThumbnailBadge.tsx
17580
17630
  var import_styled_components123 = __toESM(require("styled-components"));
17581
- var import_type_guards70 = require("@wistia/type-guards");
17631
+ var import_type_guards71 = require("@wistia/type-guards");
17582
17632
  var import_jsx_runtime325 = require("react/jsx-runtime");
17583
17633
  var StyledThumbnailBadge = import_styled_components123.default.div`
17584
17634
  align-items: center;
@@ -17607,7 +17657,7 @@ var StyledThumbnailBadge = import_styled_components123.default.div`
17607
17657
  `;
17608
17658
  var ThumbnailBadge = ({ icon, label, ...props }) => {
17609
17659
  return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(StyledThumbnailBadge, { ...props, children: [
17610
- (0, import_type_guards70.isNotNil)(icon) && icon,
17660
+ (0, import_type_guards71.isNotNil)(icon) && icon,
17611
17661
  /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("span", { children: label })
17612
17662
  ] });
17613
17663
  };
@@ -17616,10 +17666,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge_UI";
17616
17666
  // src/components/Thumbnail/Thumbnail.tsx
17617
17667
  var import_react100 = require("react");
17618
17668
  var import_styled_components126 = __toESM(require("styled-components"));
17619
- var import_type_guards73 = require("@wistia/type-guards");
17669
+ var import_type_guards74 = require("@wistia/type-guards");
17620
17670
 
17621
17671
  // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
17622
- var import_type_guards71 = require("@wistia/type-guards");
17672
+ var import_type_guards72 = require("@wistia/type-guards");
17623
17673
  var import_styled_components124 = require("styled-components");
17624
17674
  var gradients = {
17625
17675
  defaultDarkOne: import_styled_components124.css`
@@ -17747,12 +17797,12 @@ var gradients = {
17747
17797
  };
17748
17798
  var gradientMap = Object.keys(gradients);
17749
17799
  var getBackgroundGradient = (gradientName = void 0) => {
17750
- return (0, import_type_guards71.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
17800
+ return (0, import_type_guards72.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
17751
17801
  };
17752
17802
 
17753
17803
  // src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
17754
17804
  var import_styled_components125 = __toESM(require("styled-components"));
17755
- var import_type_guards72 = require("@wistia/type-guards");
17805
+ var import_type_guards73 = require("@wistia/type-guards");
17756
17806
  var import_jsx_runtime326 = require("react/jsx-runtime");
17757
17807
  var ScrubLine = import_styled_components125.default.div`
17758
17808
  position: absolute;
@@ -17846,8 +17896,8 @@ var ThumbnailStoryboardViewer = ({
17846
17896
  );
17847
17897
  const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
17848
17898
  const backgroundImage = `url(${storyboardUrl})`;
17849
- const showScrubLine = (0, import_type_guards72.isNotNil)(cursorPosition);
17850
- const scrubLinePosition = (0, import_type_guards72.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
17899
+ const showScrubLine = (0, import_type_guards73.isNotNil)(cursorPosition);
17900
+ const scrubLinePosition = (0, import_type_guards73.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
17851
17901
  const viewerStyles = {
17852
17902
  position: "relative",
17853
17903
  overflow: "hidden",
@@ -17918,10 +17968,10 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
17918
17968
  );
17919
17969
  };
17920
17970
  var StyledThumbnail = import_styled_components126.default.div`
17921
- background-image: ${({ $backgroundUrl }) => (0, import_type_guards73.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17971
+ background-image: ${({ $backgroundUrl }) => (0, import_type_guards74.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17922
17972
  ${({ $backgroundUrl, $gradientBackground }) => (
17923
17973
  // if we don't have $backgroundUrl show a gradient
17924
- (0, import_type_guards73.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
17974
+ (0, import_type_guards74.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
17925
17975
  )};
17926
17976
  background-position: center center;
17927
17977
  background-size: cover;
@@ -17953,7 +18003,7 @@ var StoryboardRenderer = ({
17953
18003
  frameCount,
17954
18004
  aspectRatio
17955
18005
  } = storyboard;
17956
- const targetWidth = (0, import_type_guards73.isString)(width) ? parseInt(width, 10) : Number(width);
18006
+ const targetWidth = (0, import_type_guards74.isString)(width) ? parseInt(width, 10) : Number(width);
17957
18007
  const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
17958
18008
  return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
17959
18009
  ThumbnailStoryboardViewer,
@@ -17997,10 +18047,10 @@ var Thumbnail = (0, import_react100.forwardRef)(
17997
18047
  const storyboardElementRef = (0, import_react100.useRef)(null);
17998
18048
  const [cursorPosition, setCursorPosition] = (0, import_react100.useState)(null);
17999
18049
  const backgroundUrl = (0, import_react100.useMemo)(
18000
- () => thumbnailImageType === "square" && (0, import_type_guards73.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
18050
+ () => thumbnailImageType === "square" && (0, import_type_guards74.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
18001
18051
  [thumbnailImageType, thumbnailUrl]
18002
18052
  );
18003
- const isScrubbable = (0, import_type_guards73.isNotNil)(storyboard);
18053
+ const isScrubbable = (0, import_type_guards74.isNotNil)(storyboard);
18004
18054
  const trackStoryboardLoadStatus = (0, import_react100.useCallback)(() => {
18005
18055
  if (storyboardElementRef.current || !storyboard) {
18006
18056
  return storyboardElementRef.current;
@@ -18030,7 +18080,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18030
18080
  setCursorPosition(null);
18031
18081
  }, [isScrubbable]);
18032
18082
  const shouldRenderStoryboard = (0, import_react100.useMemo)(() => {
18033
- if ((0, import_type_guards73.isNil)(storyboard) || (0, import_type_guards73.isUndefined)(height) || (0, import_type_guards73.isEmptyString)(height)) {
18083
+ if ((0, import_type_guards74.isNil)(storyboard) || (0, import_type_guards74.isUndefined)(height) || (0, import_type_guards74.isEmptyString)(height)) {
18034
18084
  return false;
18035
18085
  }
18036
18086
  return isScrubbable && isMouseOver && isStoryboardReady;
@@ -18047,7 +18097,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18047
18097
  width
18048
18098
  }
18049
18099
  );
18050
- } else if ((0, import_type_guards73.isNotNil)(thumbnailUrl)) {
18100
+ } else if ((0, import_type_guards74.isNotNil)(thumbnailUrl)) {
18051
18101
  thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
18052
18102
  ThumbnailImage,
18053
18103
  {
@@ -18072,7 +18122,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18072
18122
  onMouseOut: handleMouseOut,
18073
18123
  role: "presentation",
18074
18124
  children: [
18075
- (0, import_type_guards73.isNotNil)(children) ? children : null,
18125
+ (0, import_type_guards74.isNotNil)(children) ? children : null,
18076
18126
  thumbnailContent
18077
18127
  ]
18078
18128
  }
@@ -18084,7 +18134,7 @@ Thumbnail.displayName = "Thumbnail_UI";
18084
18134
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
18085
18135
  var import_react101 = __toESM(require("react"));
18086
18136
  var import_styled_components127 = __toESM(require("styled-components"));
18087
- var import_type_guards74 = require("@wistia/type-guards");
18137
+ var import_type_guards75 = require("@wistia/type-guards");
18088
18138
  var import_jsx_runtime328 = (
18089
18139
  // ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
18090
18140
  require("react/jsx-runtime")
@@ -18164,7 +18214,7 @@ var ThumbnailCollage = ({
18164
18214
  }) => {
18165
18215
  const thumbnailArray = import_react101.default.Children.toArray(children);
18166
18216
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
18167
- const thumbnails = (0, import_type_guards74.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
18217
+ const thumbnails = (0, import_type_guards75.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
18168
18218
  return import_react101.default.cloneElement(child, {
18169
18219
  ...child.props,
18170
18220
  children: void 0
@@ -18192,7 +18242,7 @@ var ThumbnailCollage = ({
18192
18242
 
18193
18243
  // src/components/WistiaLogo/WistiaLogo.tsx
18194
18244
  var import_styled_components128 = __toESM(require("styled-components"));
18195
- var import_type_guards75 = require("@wistia/type-guards");
18245
+ var import_type_guards76 = require("@wistia/type-guards");
18196
18246
  var import_jsx_runtime329 = require("react/jsx-runtime");
18197
18247
  var renderBrandmark = (brandmarkColor, iconOnly) => {
18198
18248
  if (iconOnly) {
@@ -18305,7 +18355,7 @@ var WistiaLogo = ({
18305
18355
  ...props,
18306
18356
  children: [
18307
18357
  /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("title", { children: title }),
18308
- (0, import_type_guards75.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("desc", { children: description }) : null,
18358
+ (0, import_type_guards76.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("desc", { children: description }) : null,
18309
18359
  renderBrandmark(brandmarkColor, iconOnly),
18310
18360
  renderLogotype(logotypeColor, iconOnly)
18311
18361
  ]
@@ -18317,7 +18367,7 @@ WistiaLogo.displayName = "WistiaLogo_UI";
18317
18367
 
18318
18368
  // src/components/SplitButton/SplitButton.tsx
18319
18369
  var import_styled_components129 = __toESM(require("styled-components"));
18320
- var import_type_guards76 = require("@wistia/type-guards");
18370
+ var import_type_guards77 = require("@wistia/type-guards");
18321
18371
  var import_react102 = require("react");
18322
18372
  var import_jsx_runtime330 = require("react/jsx-runtime");
18323
18373
  var StyledSplitButton = import_styled_components129.default.span`
@@ -18364,7 +18414,7 @@ var SplitButton = ({
18364
18414
  children
18365
18415
  }
18366
18416
  ),
18367
- (0, import_type_guards76.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
18417
+ (0, import_type_guards77.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
18368
18418
  Menu,
18369
18419
  {
18370
18420
  ...menuProps,
@@ -18383,7 +18433,7 @@ var SplitButton = ({
18383
18433
  children: menuItems
18384
18434
  }
18385
18435
  ),
18386
- (0, import_type_guards76.isNotNil)(secondaryAction) && (0, import_react102.cloneElement)(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18436
+ (0, import_type_guards77.isNotNil)(secondaryAction) && (0, import_react102.cloneElement)(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18387
18437
  ] });
18388
18438
  };
18389
18439
  SplitButton.displayName = "SplitButton_UI";