@wistia/ui 0.15.12-beta.bbcd8471.64c2d83 → 0.15.12-beta.e10a1dcd.8034c36

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-beta.bbcd8471.64c2d83
3
+ * @license @wistia/ui v0.15.12-beta.e10a1dcd.8034c36
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,13 +13037,12 @@ 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");
13000
- var import_react_dom = require("react-dom");
13001
13042
 
13002
13043
  // src/components/Menu/Menu.tsx
13003
13044
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
13004
- var import_type_guards38 = require("@wistia/type-guards");
13045
+ var import_type_guards39 = require("@wistia/type-guards");
13005
13046
  var import_react56 = require("react");
13006
13047
  var import_styled_components70 = __toESM(require("styled-components"));
13007
13048
 
@@ -13116,7 +13157,7 @@ var Menu = (0, import_react56.forwardRef)(
13116
13157
  }, ref) => {
13117
13158
  const contextValue = (0, import_react56.useMemo)(() => ({ compact }), [compact]);
13118
13159
  let controlProps = {
13119
- ...(0, import_type_guards38.isNotNil)(onOpenChange) && (0, import_type_guards38.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
13160
+ ...(0, import_type_guards39.isNotNil)(onOpenChange) && (0, import_type_guards39.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
13120
13161
  };
13121
13162
  if (disabled) {
13122
13163
  controlProps = {
@@ -13130,7 +13171,7 @@ var Menu = (0, import_react56.forwardRef)(
13130
13171
  modal: false,
13131
13172
  ...controlProps,
13132
13173
  children: [
13133
- /* @__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)(
13174
+ /* @__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)(
13134
13175
  Button,
13135
13176
  {
13136
13177
  ref,
@@ -13196,12 +13237,12 @@ MenuLabel.displayName = "MenuLabel_UI";
13196
13237
  var import_react58 = require("react");
13197
13238
  var import_styled_components74 = __toESM(require("styled-components"));
13198
13239
  var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
13199
- var import_type_guards40 = require("@wistia/type-guards");
13240
+ var import_type_guards41 = require("@wistia/type-guards");
13200
13241
 
13201
13242
  // src/components/Menu/MenuItemButton.tsx
13202
13243
  var import_react57 = require("react");
13203
13244
  var import_styled_components72 = __toESM(require("styled-components"));
13204
- var import_type_guards39 = require("@wistia/type-guards");
13245
+ var import_type_guards40 = require("@wistia/type-guards");
13205
13246
  var import_jsx_runtime259 = require("react/jsx-runtime");
13206
13247
  var StyledButton3 = (0, import_styled_components72.default)(Button)`
13207
13248
  ${({ colorScheme }) => getColorScheme(colorScheme)};
@@ -13281,7 +13322,7 @@ var StyledBadgeContainer = import_styled_components72.default.div`
13281
13322
  var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
13282
13323
  let { colorScheme, badge } = props;
13283
13324
  if (appearance === "dangerous") {
13284
- if ((0, import_type_guards39.isNotUndefined)(colorScheme)) {
13325
+ if ((0, import_type_guards40.isNotUndefined)(colorScheme)) {
13285
13326
  console.warn("colorScheme prop is ignored when appearance is dangerous");
13286
13327
  }
13287
13328
  colorScheme = "error";
@@ -13309,10 +13350,10 @@ var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, com
13309
13350
  fullWidth: true,
13310
13351
  unstyled: true,
13311
13352
  children: [
13312
- (0, import_type_guards39.isNotNil)(props.leftIcon) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
13353
+ (0, import_type_guards40.isNotNil)(props.leftIcon) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
13313
13354
  /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledLabelAndDescriptionContainer, { children }),
13314
- (0, import_type_guards39.isNotNil)(badge) || (0, import_type_guards39.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
13315
- (0, import_type_guards39.isNotNil)(props.rightIcon) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
13355
+ (0, import_type_guards40.isNotNil)(badge) || (0, import_type_guards40.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
13356
+ (0, import_type_guards40.isNotNil)(props.rightIcon) ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
13316
13357
  ]
13317
13358
  }
13318
13359
  );
@@ -13383,7 +13424,7 @@ var SubMenu = ({
13383
13424
  return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
13384
13425
  /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(SubMenuTrigger, { ...props, children: [
13385
13426
  /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(MenuItemLabel, { children: label }),
13386
- (0, import_type_guards40.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(MenuItemDescription, { children: description }) : null
13427
+ (0, import_type_guards41.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(MenuItemDescription, { children: description }) : null
13387
13428
  ] }),
13388
13429
  /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(SubMenuContent, { $compact: compact, children }) })
13389
13430
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
@@ -13475,7 +13516,7 @@ RadioMenuItem.displayName = "RadioMenuItem_UI";
13475
13516
 
13476
13517
  // src/components/Menu/CheckboxMenuItem.tsx
13477
13518
  var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
13478
- var import_type_guards41 = require("@wistia/type-guards");
13519
+ var import_type_guards42 = require("@wistia/type-guards");
13479
13520
  var import_jsx_runtime265 = require("react/jsx-runtime");
13480
13521
  var CheckboxIndicator = ({ checked, ...props }) => {
13481
13522
  return checked ? /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(
@@ -13549,8 +13590,8 @@ var CheckboxMenuItem = ({
13549
13590
  MenuItemButton,
13550
13591
  {
13551
13592
  ...props,
13552
- leftIcon: (0, import_type_guards41.isNotNil)(props.icon) ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(CheckboxIndicator, { checked }),
13553
- 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
13593
+ leftIcon: (0, import_type_guards42.isNotNil)(props.icon) ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(CheckboxIndicator, { checked }),
13594
+ 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
13554
13595
  }
13555
13596
  )
13556
13597
  }
@@ -13672,7 +13713,7 @@ var ContextMenu = ({
13672
13713
  const [isRightClicked, setIsRightClicked] = (0, import_react61.useState)(false);
13673
13714
  const [menuPosition, setMenuPosition] = (0, import_react61.useState)(position ?? { x: 0, y: 0 });
13674
13715
  (0, import_react61.useEffect)(() => {
13675
- if ((0, import_type_guards42.isNil)(position)) {
13716
+ if ((0, import_type_guards43.isNil)(position)) {
13676
13717
  const onContextMenu = (event) => {
13677
13718
  event.preventDefault();
13678
13719
  setMenuPosition({ x: event.clientX, y: event.clientY });
@@ -13686,11 +13727,8 @@ var ContextMenu = ({
13686
13727
  }
13687
13728
  return () => null;
13688
13729
  }, [position, triggerRef]);
13689
- const isOpen = (0, import_type_guards42.isNotNil)(position) || isRightClicked;
13690
- if (!isOpen) {
13691
- return null;
13692
- }
13693
- const menu = /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
13730
+ const isOpen = (0, import_type_guards43.isNotNil)(position) || isRightClicked;
13731
+ return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
13694
13732
  Menu,
13695
13733
  {
13696
13734
  isOpen,
@@ -13718,17 +13756,13 @@ var ContextMenu = ({
13718
13756
  ),
13719
13757
  children
13720
13758
  }
13721
- );
13722
- if ((0, import_type_guards42.isNotNil)(triggerRef)) {
13723
- return (0, import_react_dom.createPortal)(menu, document.body);
13724
- }
13725
- return menu;
13759
+ ) : null;
13726
13760
  };
13727
13761
 
13728
13762
  // src/components/DataCards/DataCard.tsx
13729
13763
  var import_react62 = require("react");
13730
13764
  var import_styled_components75 = __toESM(require("styled-components"));
13731
- var import_type_guards43 = require("@wistia/type-guards");
13765
+ var import_type_guards44 = require("@wistia/type-guards");
13732
13766
  var import_jsx_runtime268 = require("react/jsx-runtime");
13733
13767
  var StyledDataCard = import_styled_components75.default.div`
13734
13768
  --wui-data-card-text: var(--wui-color-text-button);
@@ -13882,8 +13916,8 @@ var DataCardInner = ({
13882
13916
  children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledLoadingValue, {}) : value
13883
13917
  }
13884
13918
  ),
13885
- (0, import_type_guards43.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledSlot, { children: upperRightSlot }),
13886
- (0, import_type_guards43.isNotNil)(subtitle) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
13919
+ (0, import_type_guards44.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledSlot, { children: upperRightSlot }),
13920
+ (0, import_type_guards44.isNotNil)(subtitle) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
13887
13921
  StyledSubtitle,
13888
13922
  {
13889
13923
  "data-wui-data-card-subtitle": true,
@@ -13891,13 +13925,13 @@ var DataCardInner = ({
13891
13925
  children: subtitle
13892
13926
  }
13893
13927
  ),
13894
- (0, import_type_guards43.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledDataCardTrendContainer, { children: trend })
13928
+ (0, import_type_guards44.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledDataCardTrendContainer, { children: trend })
13895
13929
  ]
13896
13930
  }
13897
13931
  );
13898
13932
  var DataCard = (props) => {
13899
13933
  const ref = (0, import_react62.useRef)(null);
13900
- if ((0, import_type_guards43.isNotNil)(props.href) || (0, import_type_guards43.isNotNil)(props.onClick)) {
13934
+ if ((0, import_type_guards44.isNotNil)(props.href) || (0, import_type_guards44.isNotNil)(props.onClick)) {
13901
13935
  const { "aria-pressed": ariaPressed, ...dataCardProps } = props;
13902
13936
  return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
13903
13937
  DataCardInner,
@@ -13908,8 +13942,8 @@ var DataCard = (props) => {
13908
13942
  Button,
13909
13943
  {
13910
13944
  ref,
13911
- ...(0, import_type_guards43.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
13912
- ...(0, import_type_guards43.isNotNil)(props.reloadDocument) ? { reloadDocument: props.reloadDocument } : {},
13945
+ ...(0, import_type_guards44.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
13946
+ ...(0, import_type_guards44.isNotNil)(props.reloadDocument) ? { reloadDocument: props.reloadDocument } : {},
13913
13947
  "aria-pressed": ariaPressed,
13914
13948
  disabled: props.disabled ?? false,
13915
13949
  href: props.href,
@@ -14277,11 +14311,11 @@ var EditableHeading = ({
14277
14311
  // src/components/EditableText/EditableTextDisplay.tsx
14278
14312
  var import_react65 = require("react");
14279
14313
  var import_styled_components83 = __toESM(require("styled-components"));
14280
- var import_type_guards45 = require("@wistia/type-guards");
14314
+ var import_type_guards46 = require("@wistia/type-guards");
14281
14315
 
14282
14316
  // src/components/EditableText/EditableTextRoot.tsx
14283
14317
  var import_react64 = require("react");
14284
- var import_type_guards44 = require("@wistia/type-guards");
14318
+ var import_type_guards45 = require("@wistia/type-guards");
14285
14319
  var import_styled_components82 = __toESM(require("styled-components"));
14286
14320
  var import_jsx_runtime277 = require("react/jsx-runtime");
14287
14321
  var StyledEditableTextRoot = import_styled_components82.default.div`
@@ -14316,7 +14350,7 @@ var EditableTextRoot = ({
14316
14350
  const [isEditing, setIsEditing] = (0, import_react64.useState)(false);
14317
14351
  const value = isControlled ? controlledValue : internalValue;
14318
14352
  const generatedId = (0, import_react64.useId)();
14319
- const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
14353
+ const computedId = (0, import_type_guards45.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
14320
14354
  const handleSetIsEditing = (0, import_react64.useCallback)(
14321
14355
  (editing) => {
14322
14356
  if (editing && !isEditing) {
@@ -14403,7 +14437,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
14403
14437
  margin: 0;
14404
14438
  transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
14405
14439
  ${({ $maxLines }) => {
14406
- if ((0, import_type_guards45.isNotNil)($maxLines)) {
14440
+ if ((0, import_type_guards46.isNotNil)($maxLines)) {
14407
14441
  return import_styled_components83.css`
14408
14442
  ${ellipsisStyle};
14409
14443
  ${lineClampCss($maxLines)};
@@ -14411,7 +14445,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
14411
14445
  }
14412
14446
  return void 0;
14413
14447
  }}
14414
- ${({ $minLines }) => (0, import_type_guards45.isNotNil)($minLines) && import_styled_components83.css`
14448
+ ${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && import_styled_components83.css`
14415
14449
  min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
14416
14450
  `}
14417
14451
  word-break: break-word;
@@ -14498,12 +14532,12 @@ var EditableTextDisplay = makePolymorphic(
14498
14532
  // src/components/EditableText/EditableTextInput.tsx
14499
14533
  var import_react66 = require("react");
14500
14534
  var import_styled_components84 = __toESM(require("styled-components"));
14501
- var import_type_guards46 = require("@wistia/type-guards");
14535
+ var import_type_guards47 = require("@wistia/type-guards");
14502
14536
  var import_jsx_runtime279 = require("react/jsx-runtime");
14503
14537
  var StyledInput2 = (0, import_styled_components84.default)(Input)`
14504
14538
  && {
14505
- ${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && `min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14506
- ${({ $maxLines }) => (0, import_type_guards46.isNotNil)($maxLines) && `max-height: calc(${$maxLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14539
+ ${({ $minLines }) => (0, import_type_guards47.isNotNil)($minLines) && `min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14540
+ ${({ $maxLines }) => (0, import_type_guards47.isNotNil)($maxLines) && `max-height: calc(${$maxLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14507
14541
  ${({ $typographicVariant }) => getTypographicStyles($typographicVariant)}
14508
14542
  background-color: var(--wui-color-bg-surface);
14509
14543
  border-radius: var(--wui-editable-text-border-radius);
@@ -14764,7 +14798,7 @@ var useFormState = (action, initialData = {}) => {
14764
14798
 
14765
14799
  // src/components/Form/FormErrorSummary.tsx
14766
14800
  var import_react72 = require("react");
14767
- var import_type_guards47 = require("@wistia/type-guards");
14801
+ var import_type_guards48 = require("@wistia/type-guards");
14768
14802
  var import_jsx_runtime282 = require("react/jsx-runtime");
14769
14803
  var ErrorItem = ({ name, error, formId }) => {
14770
14804
  return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
@@ -14778,8 +14812,8 @@ var FormErrorSummary = ({ description }) => {
14778
14812
  }
14779
14813
  return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)("div", { ref, children: [
14780
14814
  /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("p", { children: description }),
14781
- /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards47.isNotUndefined)(error)).map(
14782
- ([name, error]) => (0, import_type_guards47.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
14815
+ /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards48.isNotUndefined)(error)).map(
14816
+ ([name, error]) => (0, import_type_guards48.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
14783
14817
  ErrorItem,
14784
14818
  {
14785
14819
  error: err,
@@ -14803,7 +14837,7 @@ var FormErrorSummary = ({ description }) => {
14803
14837
  // src/components/FormField/FormField.tsx
14804
14838
  var import_react73 = require("react");
14805
14839
  var import_styled_components85 = __toESM(require("styled-components"));
14806
- var import_type_guards48 = require("@wistia/type-guards");
14840
+ var import_type_guards49 = require("@wistia/type-guards");
14807
14841
  var import_jsx_runtime283 = require("react/jsx-runtime");
14808
14842
  var StyledFormField = import_styled_components85.default.div`
14809
14843
  --form-field-spacing: var(--wui-space-01);
@@ -14844,7 +14878,7 @@ var StyledErrorList = import_styled_components85.default.ul`
14844
14878
  gap: var(--wui-space-01);
14845
14879
  `;
14846
14880
  var ErrorMessages = ({ errors, id }) => {
14847
- const isErrorArray = (0, import_type_guards48.isArray)(errors);
14881
+ const isErrorArray = (0, import_type_guards49.isArray)(errors);
14848
14882
  const isMultipleErrors = isErrorArray && errors.length > 1;
14849
14883
  if (!isErrorArray) {
14850
14884
  return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
@@ -14912,19 +14946,19 @@ var FormField = ({
14912
14946
  "aria-describedby": ariaDescribedby,
14913
14947
  ...props
14914
14948
  };
14915
- if ((0, import_type_guards48.isUndefined)(value) && (0, import_type_guards48.isNotUndefined)(defaultValue)) {
14949
+ if ((0, import_type_guards49.isUndefined)(value) && (0, import_type_guards49.isNotUndefined)(defaultValue)) {
14916
14950
  childProps = {
14917
14951
  ...childProps,
14918
14952
  defaultValue
14919
14953
  };
14920
14954
  }
14921
- if ((0, import_type_guards48.isNotNil)(checkboxGroup)) {
14922
- const computedName = (0, import_type_guards48.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
14955
+ if ((0, import_type_guards49.isNotNil)(checkboxGroup)) {
14956
+ const computedName = (0, import_type_guards49.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
14923
14957
  const handleChange = (event) => {
14924
- if ((0, import_type_guards48.isNotUndefined)(props.onChange)) {
14958
+ if ((0, import_type_guards49.isNotUndefined)(props.onChange)) {
14925
14959
  props.onChange(event);
14926
14960
  }
14927
- if ((0, import_type_guards48.isNotUndefined)(checkboxGroup.onChange)) {
14961
+ if ((0, import_type_guards49.isNotUndefined)(checkboxGroup.onChange)) {
14928
14962
  checkboxGroup.onChange(event);
14929
14963
  }
14930
14964
  };
@@ -14932,7 +14966,7 @@ var FormField = ({
14932
14966
  ...childProps,
14933
14967
  name: computedName,
14934
14968
  onChange: handleChange,
14935
- "aria-invalid": (0, import_type_guards48.isNotNil)(error)
14969
+ "aria-invalid": (0, import_type_guards49.isNotNil)(error)
14936
14970
  };
14937
14971
  }
14938
14972
  import_react73.Children.only(children);
@@ -14943,9 +14977,9 @@ var FormField = ({
14943
14977
  "data-label-position": labelPosition ?? formState.labelPosition,
14944
14978
  children: [
14945
14979
  !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(Label, { htmlFor: computedId, children: label }),
14946
- (0, import_type_guards48.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
14980
+ (0, import_type_guards49.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
14947
14981
  (0, import_react73.cloneElement)(children, childProps),
14948
- (0, import_type_guards48.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
14982
+ (0, import_type_guards49.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
14949
14983
  /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("div", {}),
14950
14984
  /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
14951
14985
  ErrorMessages,
@@ -14991,7 +15025,7 @@ RadioGroup.displayName = "RadioGroup_UI";
14991
15025
  // src/components/Grid/Grid.tsx
14992
15026
  var import_react75 = require("react");
14993
15027
  var import_styled_components86 = __toESM(require("styled-components"));
14994
- var import_type_guards49 = require("@wistia/type-guards");
15028
+ var import_type_guards50 = require("@wistia/type-guards");
14995
15029
  var import_jsx_runtime285 = require("react/jsx-runtime");
14996
15030
  var DEFAULT_ELEMENT5 = "div";
14997
15031
  var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
@@ -15041,7 +15075,7 @@ var GridComponent = (0, import_react75.forwardRef)(
15041
15075
  ...props
15042
15076
  }, ref) => {
15043
15077
  const responsiveGap = useResponsiveProp(gap);
15044
- const { column, row } = (0, import_type_guards49.isRecord)(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
15078
+ const { column, row } = (0, import_type_guards50.isRecord)(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
15045
15079
  const responsiveColumns = useResponsiveProp(columns);
15046
15080
  const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
15047
15081
  return /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
@@ -15066,7 +15100,7 @@ var Grid = makePolymorphic(GridComponent);
15066
15100
  // src/components/InputClickToCopy/InputClickToCopy.tsx
15067
15101
  var import_styled_components87 = __toESM(require("styled-components"));
15068
15102
  var import_react76 = require("react");
15069
- var import_type_guards50 = require("@wistia/type-guards");
15103
+ var import_type_guards51 = require("@wistia/type-guards");
15070
15104
  var import_jsx_runtime286 = require("react/jsx-runtime");
15071
15105
  var StyledIconButton = (0, import_styled_components87.default)(IconButton)`
15072
15106
  /* override size for icon button since prop gets changed by Input */
@@ -15096,12 +15130,12 @@ var InputClickToCopy = (0, import_react76.forwardRef)(
15096
15130
  if (disabled) {
15097
15131
  return;
15098
15132
  }
15099
- if ((0, import_type_guards50.isFunction)(props.onClick)) {
15133
+ if ((0, import_type_guards51.isFunction)(props.onClick)) {
15100
15134
  props.onClick(event);
15101
15135
  }
15102
15136
  void copyToClipboard(value).then(() => {
15103
15137
  setIsCopied(true);
15104
- if ((0, import_type_guards50.isFunction)(onCopy)) {
15138
+ if ((0, import_type_guards51.isFunction)(onCopy)) {
15105
15139
  onCopy(value);
15106
15140
  }
15107
15141
  return value;
@@ -15136,7 +15170,7 @@ InputClickToCopy.displayName = "InputClickToCopy_UI";
15136
15170
  // src/components/InputPassword/InputPassword.tsx
15137
15171
  var import_styled_components88 = __toESM(require("styled-components"));
15138
15172
  var import_react77 = require("react");
15139
- var import_type_guards51 = require("@wistia/type-guards");
15173
+ var import_type_guards52 = require("@wistia/type-guards");
15140
15174
  var import_jsx_runtime287 = require("react/jsx-runtime");
15141
15175
  var StyledIconButton2 = (0, import_styled_components88.default)(IconButton)`
15142
15176
  /* override size for icon button since prop gets changed by Input */
@@ -15152,7 +15186,7 @@ var InputPassword = (0, import_react77.forwardRef)(
15152
15186
  const handleClick = () => {
15153
15187
  const newVisibility = !isVisible;
15154
15188
  setIsVisible(newVisibility);
15155
- if ((0, import_type_guards51.isFunction)(onVisibilityToggle)) {
15189
+ if ((0, import_type_guards52.isFunction)(onVisibilityToggle)) {
15156
15190
  onVisibilityToggle(newVisibility);
15157
15191
  }
15158
15192
  };
@@ -15182,7 +15216,7 @@ InputPassword.displayName = "InputPassword_UI";
15182
15216
 
15183
15217
  // src/components/KeyboardShortcut/KeyboardShortcut.tsx
15184
15218
  var import_styled_components89 = __toESM(require("styled-components"));
15185
- var import_type_guards52 = require("@wistia/type-guards");
15219
+ var import_type_guards53 = require("@wistia/type-guards");
15186
15220
  var import_jsx_runtime288 = require("react/jsx-runtime");
15187
15221
  var StyledKeyboardShortcut = import_styled_components89.default.div`
15188
15222
  align-items: center;
@@ -15276,7 +15310,7 @@ var KeyboardShortcut = ({
15276
15310
  $fullWidth: fullWidth,
15277
15311
  ...otherProps,
15278
15312
  children: [
15279
- (0, import_type_guards52.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Label2, { children: label }),
15313
+ (0, import_type_guards53.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Label2, { children: label }),
15280
15314
  /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
15281
15315
  StyledKey,
15282
15316
  {
@@ -15290,18 +15324,18 @@ var KeyboardShortcut = ({
15290
15324
  KeyboardShortcut.displayName = "KeyboardShortcut_UI";
15291
15325
 
15292
15326
  // src/components/List/List.tsx
15293
- var import_type_guards54 = require("@wistia/type-guards");
15327
+ var import_type_guards55 = require("@wistia/type-guards");
15294
15328
  var import_styled_components91 = __toESM(require("styled-components"));
15295
15329
 
15296
15330
  // src/components/List/ListItem.tsx
15297
15331
  var import_styled_components90 = __toESM(require("styled-components"));
15298
- var import_type_guards53 = require("@wistia/type-guards");
15332
+ var import_type_guards54 = require("@wistia/type-guards");
15299
15333
  var import_jsx_runtime289 = require("react/jsx-runtime");
15300
15334
  var ListItemComponent = import_styled_components90.default.li`
15301
15335
  margin-bottom: var(--wui-space-02);
15302
15336
  `;
15303
15337
  var ListItem = ({ children }) => {
15304
- if ((0, import_type_guards53.isNil)(children)) {
15338
+ if ((0, import_type_guards54.isNil)(children)) {
15305
15339
  return null;
15306
15340
  }
15307
15341
  return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(ListItemComponent, { children });
@@ -15431,13 +15465,13 @@ var List = ({
15431
15465
  ...otherProps
15432
15466
  }) => {
15433
15467
  const listVariant = variant ?? "bullets";
15434
- if ((0, import_type_guards54.isNotNil)(children)) {
15468
+ if ((0, import_type_guards55.isNotNil)(children)) {
15435
15469
  if (Array.isArray(children) && !children.length) {
15436
15470
  return null;
15437
15471
  }
15438
15472
  return renderListComponent(children, listVariant, otherProps);
15439
15473
  }
15440
- if ((0, import_type_guards54.isNotNil)(items)) {
15474
+ if ((0, import_type_guards55.isNotNil)(items)) {
15441
15475
  if (!items.length) {
15442
15476
  return null;
15443
15477
  }
@@ -15472,7 +15506,7 @@ Mark.displayName = "Mark_UI";
15472
15506
  var import_react80 = require("react");
15473
15507
  var import_styled_components97 = __toESM(require("styled-components"));
15474
15508
  var import_react_dialog5 = require("@radix-ui/react-dialog");
15475
- var import_type_guards56 = require("@wistia/type-guards");
15509
+ var import_type_guards57 = require("@wistia/type-guards");
15476
15510
 
15477
15511
  // src/components/Modal/ModalHeader.tsx
15478
15512
  var import_styled_components94 = __toESM(require("styled-components"));
@@ -15551,7 +15585,7 @@ var import_react_dialog3 = require("@radix-ui/react-dialog");
15551
15585
 
15552
15586
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
15553
15587
  var import_react78 = require("react");
15554
- var import_type_guards55 = require("@wistia/type-guards");
15588
+ var import_type_guards56 = require("@wistia/type-guards");
15555
15589
  var useFocusRestore = () => {
15556
15590
  const previouslyFocusedRef = (0, import_react78.useRef)(null);
15557
15591
  (0, import_react78.useEffect)(() => {
@@ -15559,7 +15593,7 @@ var useFocusRestore = () => {
15559
15593
  }, []);
15560
15594
  (0, import_react78.useEffect)(() => {
15561
15595
  return () => {
15562
- if ((0, import_type_guards55.isNotNil)(previouslyFocusedRef.current)) {
15596
+ if ((0, import_type_guards56.isNotNil)(previouslyFocusedRef.current)) {
15563
15597
  setTimeout(() => {
15564
15598
  previouslyFocusedRef.current?.focus();
15565
15599
  }, 0);
@@ -15781,7 +15815,7 @@ var Modal = (0, import_react80.forwardRef)(
15781
15815
  import_react_dialog5.Root,
15782
15816
  {
15783
15817
  onOpenChange: (open2) => {
15784
- if (!open2 && (0, import_type_guards56.isNotNil)(onRequestClose)) {
15818
+ if (!open2 && (0, import_type_guards57.isNotNil)(onRequestClose)) {
15785
15819
  onRequestClose();
15786
15820
  }
15787
15821
  },
@@ -15793,7 +15827,7 @@ var Modal = (0, import_react80.forwardRef)(
15793
15827
  {
15794
15828
  ref,
15795
15829
  onOpenAutoFocus: (event) => {
15796
- if ((0, import_type_guards56.isNotNil)(initialFocusRef) && initialFocusRef.current) {
15830
+ if ((0, import_type_guards57.isNotNil)(initialFocusRef) && initialFocusRef.current) {
15797
15831
  event.preventDefault();
15798
15832
  requestAnimationFrame(() => {
15799
15833
  initialFocusRef.current?.focus();
@@ -15805,7 +15839,7 @@ var Modal = (0, import_react80.forwardRef)(
15805
15839
  ...props,
15806
15840
  children: [
15807
15841
  /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalScrollArea, { children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalBody, { children }) }),
15808
- (0, import_type_guards56.isNotNil)(footer) ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalFooter, { children: footer }) : null,
15842
+ (0, import_type_guards57.isNotNil)(footer) ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalFooter, { children: footer }) : null,
15809
15843
  hideCloseButton && hideTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
15810
15844
  ModalHeader,
15811
15845
  {
@@ -15851,9 +15885,9 @@ var import_react_popover5 = require("@radix-ui/react-popover");
15851
15885
  var import_styled_components99 = __toESM(require("styled-components"));
15852
15886
 
15853
15887
  // src/private/helpers/getControls/getControlProps.tsx
15854
- var import_type_guards57 = require("@wistia/type-guards");
15888
+ var import_type_guards58 = require("@wistia/type-guards");
15855
15889
  var getControlProps = (isOpen, onOpenChange) => {
15856
- return (0, import_type_guards57.isNotNil)(onOpenChange) && (0, import_type_guards57.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
15890
+ return (0, import_type_guards58.isNotNil)(onOpenChange) && (0, import_type_guards58.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
15857
15891
  };
15858
15892
 
15859
15893
  // src/components/Popover/PopoverArrow.tsx
@@ -16009,7 +16043,7 @@ Popover.displayName = "Popover_UI";
16009
16043
  // src/components/ProgressBar/ProgressBar.tsx
16010
16044
  var import_styled_components100 = __toESM(require("styled-components"));
16011
16045
  var import_react_progress = require("@radix-ui/react-progress");
16012
- var import_type_guards58 = require("@wistia/type-guards");
16046
+ var import_type_guards59 = require("@wistia/type-guards");
16013
16047
  var import_jsx_runtime299 = require("react/jsx-runtime");
16014
16048
  var ProgressBarWrapper = import_styled_components100.default.div`
16015
16049
  --progress-bar-height: 8px;
@@ -16065,7 +16099,7 @@ var ProgressBar = ({
16065
16099
  ...props
16066
16100
  }) => {
16067
16101
  return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(ProgressBarWrapper, { children: [
16068
- (0, import_type_guards58.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
16102
+ (0, import_type_guards59.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
16069
16103
  /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
16070
16104
  StyledProgressBar,
16071
16105
  {
@@ -16083,13 +16117,13 @@ var ProgressBar = ({
16083
16117
  )
16084
16118
  }
16085
16119
  ),
16086
- (0, import_type_guards58.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelRight }) : null
16120
+ (0, import_type_guards59.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelRight }) : null
16087
16121
  ] });
16088
16122
  };
16089
16123
  ProgressBar.displayName = "ProgressBar_UI";
16090
16124
 
16091
16125
  // src/components/Radio/Radio.tsx
16092
- var import_type_guards59 = require("@wistia/type-guards");
16126
+ var import_type_guards60 = require("@wistia/type-guards");
16093
16127
  var import_react81 = require("react");
16094
16128
  var import_styled_components101 = __toESM(require("styled-components"));
16095
16129
  var import_jsx_runtime300 = require("react/jsx-runtime");
@@ -16189,14 +16223,14 @@ var Radio = (0, import_react81.forwardRef)(
16189
16223
  ...props
16190
16224
  }, ref) => {
16191
16225
  const generatedId = (0, import_react81.useId)();
16192
- const computedId = (0, import_type_guards59.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16226
+ const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16193
16227
  const radioGroupContext = useRadioGroup();
16194
16228
  const contextName = radioGroupContext?.name;
16195
16229
  const contextOnChange = radioGroupContext?.onChange;
16196
16230
  const contextValue = radioGroupContext?.value;
16197
16231
  const radioName = name ?? contextName;
16198
16232
  const handleOnChange = onChange ?? contextOnChange;
16199
- const isChecked = (0, import_type_guards59.isNotUndefined)(value) && (0, import_type_guards59.isNotUndefined)(contextValue) ? contextValue === value : checked;
16233
+ const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
16200
16234
  return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
16201
16235
  StyledRadioWrapper,
16202
16236
  {
@@ -16243,7 +16277,7 @@ var import_react83 = require("react");
16243
16277
  // src/components/RadioCard/RadioCardRoot.tsx
16244
16278
  var import_react82 = require("react");
16245
16279
  var import_styled_components102 = __toESM(require("styled-components"));
16246
- var import_type_guards60 = require("@wistia/type-guards");
16280
+ var import_type_guards61 = require("@wistia/type-guards");
16247
16281
  var import_jsx_runtime301 = require("react/jsx-runtime");
16248
16282
  var checkedStyles = import_styled_components102.css`
16249
16283
  --wui-radio-card-border-color: var(--wui-color-focus-ring);
@@ -16365,14 +16399,14 @@ var RadioCardRoot = (0, import_react82.forwardRef)(
16365
16399
  ...props
16366
16400
  }, ref) => {
16367
16401
  const generatedId = (0, import_react82.useId)();
16368
- const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16402
+ const computedId = (0, import_type_guards61.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16369
16403
  const radioGroupContext = useRadioGroup();
16370
16404
  const contextName = radioGroupContext?.name;
16371
16405
  const contextOnChange = radioGroupContext?.onChange;
16372
16406
  const contextValue = radioGroupContext?.value;
16373
16407
  const radioName = name ?? contextName;
16374
16408
  const handleOnChange = onChange ?? contextOnChange;
16375
- const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
16409
+ const isChecked = (0, import_type_guards61.isNotUndefined)(value) && (0, import_type_guards61.isNotUndefined)(contextValue) ? contextValue === value : checked;
16376
16410
  return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
16377
16411
  StyledCard2,
16378
16412
  {
@@ -16404,7 +16438,7 @@ RadioCardRoot.displayName = "RadioCardRoot_UI";
16404
16438
 
16405
16439
  // src/components/RadioCard/RadioCardDefaultLayout.tsx
16406
16440
  var import_styled_components104 = __toESM(require("styled-components"));
16407
- var import_type_guards61 = require("@wistia/type-guards");
16441
+ var import_type_guards62 = require("@wistia/type-guards");
16408
16442
 
16409
16443
  // src/components/RadioCard/RadioCardIndicator.tsx
16410
16444
  var import_styled_components103 = __toESM(require("styled-components"));
@@ -16478,17 +16512,17 @@ var RadioCardDefaultLayout = ({
16478
16512
  showIndicator = true
16479
16513
  }) => {
16480
16514
  return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(StyledCardContent, { children: [
16481
- 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,
16515
+ 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,
16482
16516
  /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(Stack, { gap: "space-02", children: [
16483
- (0, import_type_guards61.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
16517
+ (0, import_type_guards62.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
16484
16518
  /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(
16485
16519
  Stack,
16486
16520
  {
16487
16521
  gap: "space-01",
16488
- style: (0, import_type_guards61.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
16522
+ style: (0, import_type_guards62.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
16489
16523
  children: [
16490
- (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 }) }),
16491
- (0, import_type_guards61.isNotNil)(description) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
16524
+ (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 }) }),
16525
+ (0, import_type_guards62.isNotNil)(description) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
16492
16526
  Text,
16493
16527
  {
16494
16528
  prominence: "secondary",
@@ -16671,7 +16705,7 @@ ScrollArea.displayName = "ScrollArea_UI";
16671
16705
  var import_react88 = require("react");
16672
16706
  var import_styled_components108 = __toESM(require("styled-components"));
16673
16707
  var import_react_toggle_group3 = require("@radix-ui/react-toggle-group");
16674
- var import_type_guards63 = require("@wistia/type-guards");
16708
+ var import_type_guards64 = require("@wistia/type-guards");
16675
16709
 
16676
16710
  // src/components/SegmentedControl/useSelectedItemStyle.tsx
16677
16711
  var import_react86 = require("react");
@@ -16708,7 +16742,7 @@ var useSelectedItemStyle = () => {
16708
16742
 
16709
16743
  // src/components/SegmentedControl/SelectedItemIndicator.tsx
16710
16744
  var import_styled_components107 = __toESM(require("styled-components"));
16711
- var import_type_guards62 = require("@wistia/type-guards");
16745
+ var import_type_guards63 = require("@wistia/type-guards");
16712
16746
 
16713
16747
  // src/components/SegmentedControl/useSegmentedControlValue.tsx
16714
16748
  var import_react87 = require("react");
@@ -16742,7 +16776,7 @@ var SelectedItemIndicatorDiv = import_styled_components107.default.div`
16742
16776
  var SelectedItemIndicator = () => {
16743
16777
  const selectedValue = useSegmentedControlValue();
16744
16778
  const { selectedItemIndicatorStyle } = useSelectedItemStyle();
16745
- if (!selectedValue || (0, import_type_guards62.isUndefined)(selectedItemIndicatorStyle)) {
16779
+ if (!selectedValue || (0, import_type_guards63.isUndefined)(selectedItemIndicatorStyle)) {
16746
16780
  return null;
16747
16781
  }
16748
16782
  return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
@@ -16779,7 +16813,7 @@ var SegmentedControl = (0, import_react88.forwardRef)(
16779
16813
  onSelectedValueChange,
16780
16814
  ...props
16781
16815
  }, ref) => {
16782
- if ((0, import_type_guards63.isNil)(children)) {
16816
+ if ((0, import_type_guards64.isNil)(children)) {
16783
16817
  return null;
16784
16818
  }
16785
16819
  return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
@@ -16808,7 +16842,7 @@ SegmentedControl.displayName = "SegmentedControl_UI";
16808
16842
  var import_react89 = require("react");
16809
16843
  var import_styled_components109 = __toESM(require("styled-components"));
16810
16844
  var import_react_toggle_group4 = require("@radix-ui/react-toggle-group");
16811
- var import_type_guards64 = require("@wistia/type-guards");
16845
+ var import_type_guards65 = require("@wistia/type-guards");
16812
16846
  var import_jsx_runtime309 = require("react/jsx-runtime");
16813
16847
  var segmentedControlItemStyles = import_styled_components109.css`
16814
16848
  all: unset; /* ToggleGroupItem is a button element */
@@ -16924,8 +16958,8 @@ var SegmentedControlItem = (0, import_react89.forwardRef)(
16924
16958
  {
16925
16959
  ref: combinedRef,
16926
16960
  ...otherProps,
16927
- $hasLabel: (0, import_type_guards64.isNotNil)(label),
16928
- "aria-label": (0, import_type_guards64.isNotNil)(label) ? void 0 : ariaLabel,
16961
+ $hasLabel: (0, import_type_guards65.isNotNil)(label),
16962
+ "aria-label": (0, import_type_guards65.isNotNil)(label) ? void 0 : ariaLabel,
16929
16963
  disabled,
16930
16964
  onClick: handleClick,
16931
16965
  value,
@@ -17090,7 +17124,7 @@ Select.displayName = "Select_UI";
17090
17124
  var import_react_select2 = require("@radix-ui/react-select");
17091
17125
  var import_react91 = require("react");
17092
17126
  var import_styled_components111 = __toESM(require("styled-components"));
17093
- var import_type_guards65 = require("@wistia/type-guards");
17127
+ var import_type_guards66 = require("@wistia/type-guards");
17094
17128
  var import_jsx_runtime311 = require("react/jsx-runtime");
17095
17129
  var StyledItem = (0, import_styled_components111.default)(import_react_select2.Item)`
17096
17130
  ${getTypographicStyles("label3")}
@@ -17127,7 +17161,7 @@ var SelectOption = (0, import_react91.forwardRef)(
17127
17161
  ref: forwardedRef,
17128
17162
  $checkmarkVerticalAlign: checkmarkVerticalAlign,
17129
17163
  children: [
17130
- (0, import_type_guards65.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { children: [
17164
+ (0, import_type_guards66.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { children: [
17131
17165
  children,
17132
17166
  /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
17133
17167
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(import_react_select2.ItemText, { children }),
@@ -17169,7 +17203,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
17169
17203
  // src/components/Slider/Slider.tsx
17170
17204
  var import_react_slider2 = require("@radix-ui/react-slider");
17171
17205
  var import_styled_components113 = __toESM(require("styled-components"));
17172
- var import_type_guards66 = require("@wistia/type-guards");
17206
+ var import_type_guards67 = require("@wistia/type-guards");
17173
17207
  var import_jsx_runtime313 = require("react/jsx-runtime");
17174
17208
  var SliderContainer = import_styled_components113.default.div`
17175
17209
  --wui-slider-track-color: var(--wui-gray-6);
@@ -17248,7 +17282,7 @@ var Slider = ({
17248
17282
  "data-testid": dataTestId = "ui-slider",
17249
17283
  ...otherProps
17250
17284
  }) => {
17251
- if (!((0, import_type_guards66.isNonEmptyString)(ariaLabel) || (0, import_type_guards66.isNonEmptyString)(ariaLabelledby))) {
17285
+ if (!((0, import_type_guards67.isNonEmptyString)(ariaLabel) || (0, import_type_guards67.isNonEmptyString)(ariaLabelledby))) {
17252
17286
  throw new Error(
17253
17287
  "UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop."
17254
17288
  );
@@ -17410,7 +17444,7 @@ var TableRow = ({ children, ...props }) => {
17410
17444
  // src/components/Tabs/Tabs.tsx
17411
17445
  var import_react_tabs = require("@radix-ui/react-tabs");
17412
17446
  var import_react98 = require("react");
17413
- var import_type_guards67 = require("@wistia/type-guards");
17447
+ var import_type_guards68 = require("@wistia/type-guards");
17414
17448
 
17415
17449
  // src/components/Tabs/useTabsValue.tsx
17416
17450
  var import_react97 = require("react");
@@ -17447,10 +17481,10 @@ var Tabs = ({
17447
17481
  ...props,
17448
17482
  onValueChange
17449
17483
  };
17450
- if ((0, import_type_guards67.isNotNil)(value)) {
17484
+ if ((0, import_type_guards68.isNotNil)(value)) {
17451
17485
  rootProps.value = value;
17452
17486
  }
17453
- if ((0, import_type_guards67.isNotNil)(defaultValue)) {
17487
+ if ((0, import_type_guards68.isNotNil)(defaultValue)) {
17454
17488
  rootProps.defaultValue = defaultValue;
17455
17489
  }
17456
17490
  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 }) }) });
@@ -17470,7 +17504,7 @@ var import_react_tabs3 = require("@radix-ui/react-tabs");
17470
17504
  var import_styled_components121 = __toESM(require("styled-components"));
17471
17505
 
17472
17506
  // src/components/Tabs/SelectedTabIndicator.tsx
17473
- var import_type_guards68 = require("@wistia/type-guards");
17507
+ var import_type_guards69 = require("@wistia/type-guards");
17474
17508
 
17475
17509
  // src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
17476
17510
  var import_styled_components120 = __toESM(require("styled-components"));
@@ -17485,7 +17519,7 @@ var import_jsx_runtime322 = require("react/jsx-runtime");
17485
17519
  var SelectedTabIndicator = () => {
17486
17520
  const { selectedItemIndicatorStyle } = useSelectedItemStyle();
17487
17521
  const selectedValue = useTabsValue();
17488
- if (selectedValue == null || (0, import_type_guards68.isUndefined)(selectedItemIndicatorStyle)) {
17522
+ if (selectedValue == null || (0, import_type_guards69.isUndefined)(selectedItemIndicatorStyle)) {
17489
17523
  return null;
17490
17524
  }
17491
17525
  return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
@@ -17519,7 +17553,7 @@ TabsList.displayName = "TabsList_UI";
17519
17553
 
17520
17554
  // src/components/Tabs/TabsTrigger.tsx
17521
17555
  var import_react99 = require("react");
17522
- var import_type_guards69 = require("@wistia/type-guards");
17556
+ var import_type_guards70 = require("@wistia/type-guards");
17523
17557
 
17524
17558
  // src/components/Tabs/StyledRadixTabsTrigger.tsx
17525
17559
  var import_styled_components122 = __toESM(require("styled-components"));
@@ -17570,8 +17604,8 @@ var TabsTrigger = (0, import_react99.forwardRef)(
17570
17604
  {
17571
17605
  ...otherProps,
17572
17606
  ref: combinedRef,
17573
- $hasLabel: (0, import_type_guards69.isNotNil)(label),
17574
- "aria-label": (0, import_type_guards69.isNotNil)(label) ? void 0 : ariaLabel,
17607
+ $hasLabel: (0, import_type_guards70.isNotNil)(label),
17608
+ "aria-label": (0, import_type_guards70.isNotNil)(label) ? void 0 : ariaLabel,
17575
17609
  disabled,
17576
17610
  value,
17577
17611
  children: [
@@ -17586,7 +17620,7 @@ TabsTrigger.displayName = "TabsTrigger_UI";
17586
17620
 
17587
17621
  // src/components/Thumbnail/ThumbnailBadge.tsx
17588
17622
  var import_styled_components123 = __toESM(require("styled-components"));
17589
- var import_type_guards70 = require("@wistia/type-guards");
17623
+ var import_type_guards71 = require("@wistia/type-guards");
17590
17624
  var import_jsx_runtime325 = require("react/jsx-runtime");
17591
17625
  var StyledThumbnailBadge = import_styled_components123.default.div`
17592
17626
  align-items: center;
@@ -17615,7 +17649,7 @@ var StyledThumbnailBadge = import_styled_components123.default.div`
17615
17649
  `;
17616
17650
  var ThumbnailBadge = ({ icon, label, ...props }) => {
17617
17651
  return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(StyledThumbnailBadge, { ...props, children: [
17618
- (0, import_type_guards70.isNotNil)(icon) && icon,
17652
+ (0, import_type_guards71.isNotNil)(icon) && icon,
17619
17653
  /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("span", { children: label })
17620
17654
  ] });
17621
17655
  };
@@ -17624,10 +17658,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge_UI";
17624
17658
  // src/components/Thumbnail/Thumbnail.tsx
17625
17659
  var import_react100 = require("react");
17626
17660
  var import_styled_components126 = __toESM(require("styled-components"));
17627
- var import_type_guards73 = require("@wistia/type-guards");
17661
+ var import_type_guards74 = require("@wistia/type-guards");
17628
17662
 
17629
17663
  // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
17630
- var import_type_guards71 = require("@wistia/type-guards");
17664
+ var import_type_guards72 = require("@wistia/type-guards");
17631
17665
  var import_styled_components124 = require("styled-components");
17632
17666
  var gradients = {
17633
17667
  defaultDarkOne: import_styled_components124.css`
@@ -17755,12 +17789,12 @@ var gradients = {
17755
17789
  };
17756
17790
  var gradientMap = Object.keys(gradients);
17757
17791
  var getBackgroundGradient = (gradientName = void 0) => {
17758
- return (0, import_type_guards71.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
17792
+ return (0, import_type_guards72.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
17759
17793
  };
17760
17794
 
17761
17795
  // src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
17762
17796
  var import_styled_components125 = __toESM(require("styled-components"));
17763
- var import_type_guards72 = require("@wistia/type-guards");
17797
+ var import_type_guards73 = require("@wistia/type-guards");
17764
17798
  var import_jsx_runtime326 = require("react/jsx-runtime");
17765
17799
  var ScrubLine = import_styled_components125.default.div`
17766
17800
  position: absolute;
@@ -17854,8 +17888,8 @@ var ThumbnailStoryboardViewer = ({
17854
17888
  );
17855
17889
  const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
17856
17890
  const backgroundImage = `url(${storyboardUrl})`;
17857
- const showScrubLine = (0, import_type_guards72.isNotNil)(cursorPosition);
17858
- const scrubLinePosition = (0, import_type_guards72.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
17891
+ const showScrubLine = (0, import_type_guards73.isNotNil)(cursorPosition);
17892
+ const scrubLinePosition = (0, import_type_guards73.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
17859
17893
  const viewerStyles = {
17860
17894
  position: "relative",
17861
17895
  overflow: "hidden",
@@ -17926,10 +17960,10 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
17926
17960
  );
17927
17961
  };
17928
17962
  var StyledThumbnail = import_styled_components126.default.div`
17929
- background-image: ${({ $backgroundUrl }) => (0, import_type_guards73.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17963
+ background-image: ${({ $backgroundUrl }) => (0, import_type_guards74.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17930
17964
  ${({ $backgroundUrl, $gradientBackground }) => (
17931
17965
  // if we don't have $backgroundUrl show a gradient
17932
- (0, import_type_guards73.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
17966
+ (0, import_type_guards74.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
17933
17967
  )};
17934
17968
  background-position: center center;
17935
17969
  background-size: cover;
@@ -17961,7 +17995,7 @@ var StoryboardRenderer = ({
17961
17995
  frameCount,
17962
17996
  aspectRatio
17963
17997
  } = storyboard;
17964
- const targetWidth = (0, import_type_guards73.isString)(width) ? parseInt(width, 10) : Number(width);
17998
+ const targetWidth = (0, import_type_guards74.isString)(width) ? parseInt(width, 10) : Number(width);
17965
17999
  const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
17966
18000
  return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
17967
18001
  ThumbnailStoryboardViewer,
@@ -18005,10 +18039,10 @@ var Thumbnail = (0, import_react100.forwardRef)(
18005
18039
  const storyboardElementRef = (0, import_react100.useRef)(null);
18006
18040
  const [cursorPosition, setCursorPosition] = (0, import_react100.useState)(null);
18007
18041
  const backgroundUrl = (0, import_react100.useMemo)(
18008
- () => thumbnailImageType === "square" && (0, import_type_guards73.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
18042
+ () => thumbnailImageType === "square" && (0, import_type_guards74.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
18009
18043
  [thumbnailImageType, thumbnailUrl]
18010
18044
  );
18011
- const isScrubbable = (0, import_type_guards73.isNotNil)(storyboard);
18045
+ const isScrubbable = (0, import_type_guards74.isNotNil)(storyboard);
18012
18046
  const trackStoryboardLoadStatus = (0, import_react100.useCallback)(() => {
18013
18047
  if (storyboardElementRef.current || !storyboard) {
18014
18048
  return storyboardElementRef.current;
@@ -18038,7 +18072,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18038
18072
  setCursorPosition(null);
18039
18073
  }, [isScrubbable]);
18040
18074
  const shouldRenderStoryboard = (0, import_react100.useMemo)(() => {
18041
- if ((0, import_type_guards73.isNil)(storyboard) || (0, import_type_guards73.isUndefined)(height) || (0, import_type_guards73.isEmptyString)(height)) {
18075
+ if ((0, import_type_guards74.isNil)(storyboard) || (0, import_type_guards74.isUndefined)(height) || (0, import_type_guards74.isEmptyString)(height)) {
18042
18076
  return false;
18043
18077
  }
18044
18078
  return isScrubbable && isMouseOver && isStoryboardReady;
@@ -18055,7 +18089,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18055
18089
  width
18056
18090
  }
18057
18091
  );
18058
- } else if ((0, import_type_guards73.isNotNil)(thumbnailUrl)) {
18092
+ } else if ((0, import_type_guards74.isNotNil)(thumbnailUrl)) {
18059
18093
  thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
18060
18094
  ThumbnailImage,
18061
18095
  {
@@ -18080,7 +18114,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18080
18114
  onMouseOut: handleMouseOut,
18081
18115
  role: "presentation",
18082
18116
  children: [
18083
- (0, import_type_guards73.isNotNil)(children) ? children : null,
18117
+ (0, import_type_guards74.isNotNil)(children) ? children : null,
18084
18118
  thumbnailContent
18085
18119
  ]
18086
18120
  }
@@ -18092,7 +18126,7 @@ Thumbnail.displayName = "Thumbnail_UI";
18092
18126
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
18093
18127
  var import_react101 = __toESM(require("react"));
18094
18128
  var import_styled_components127 = __toESM(require("styled-components"));
18095
- var import_type_guards74 = require("@wistia/type-guards");
18129
+ var import_type_guards75 = require("@wistia/type-guards");
18096
18130
  var import_jsx_runtime328 = (
18097
18131
  // ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
18098
18132
  require("react/jsx-runtime")
@@ -18172,7 +18206,7 @@ var ThumbnailCollage = ({
18172
18206
  }) => {
18173
18207
  const thumbnailArray = import_react101.default.Children.toArray(children);
18174
18208
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
18175
- const thumbnails = (0, import_type_guards74.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
18209
+ const thumbnails = (0, import_type_guards75.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
18176
18210
  return import_react101.default.cloneElement(child, {
18177
18211
  ...child.props,
18178
18212
  children: void 0
@@ -18200,7 +18234,7 @@ var ThumbnailCollage = ({
18200
18234
 
18201
18235
  // src/components/WistiaLogo/WistiaLogo.tsx
18202
18236
  var import_styled_components128 = __toESM(require("styled-components"));
18203
- var import_type_guards75 = require("@wistia/type-guards");
18237
+ var import_type_guards76 = require("@wistia/type-guards");
18204
18238
  var import_jsx_runtime329 = require("react/jsx-runtime");
18205
18239
  var renderBrandmark = (brandmarkColor, iconOnly) => {
18206
18240
  if (iconOnly) {
@@ -18313,7 +18347,7 @@ var WistiaLogo = ({
18313
18347
  ...props,
18314
18348
  children: [
18315
18349
  /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("title", { children: title }),
18316
- (0, import_type_guards75.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("desc", { children: description }) : null,
18350
+ (0, import_type_guards76.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("desc", { children: description }) : null,
18317
18351
  renderBrandmark(brandmarkColor, iconOnly),
18318
18352
  renderLogotype(logotypeColor, iconOnly)
18319
18353
  ]
@@ -18325,7 +18359,7 @@ WistiaLogo.displayName = "WistiaLogo_UI";
18325
18359
 
18326
18360
  // src/components/SplitButton/SplitButton.tsx
18327
18361
  var import_styled_components129 = __toESM(require("styled-components"));
18328
- var import_type_guards76 = require("@wistia/type-guards");
18362
+ var import_type_guards77 = require("@wistia/type-guards");
18329
18363
  var import_react102 = require("react");
18330
18364
  var import_jsx_runtime330 = require("react/jsx-runtime");
18331
18365
  var StyledSplitButton = import_styled_components129.default.span`
@@ -18372,7 +18406,7 @@ var SplitButton = ({
18372
18406
  children
18373
18407
  }
18374
18408
  ),
18375
- (0, import_type_guards76.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
18409
+ (0, import_type_guards77.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
18376
18410
  Menu,
18377
18411
  {
18378
18412
  ...menuProps,
@@ -18391,7 +18425,7 @@ var SplitButton = ({
18391
18425
  children: menuItems
18392
18426
  }
18393
18427
  ),
18394
- (0, import_type_guards76.isNotNil)(secondaryAction) && (0, import_react102.cloneElement)(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18428
+ (0, import_type_guards77.isNotNil)(secondaryAction) && (0, import_react102.cloneElement)(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18395
18429
  ] });
18396
18430
  };
18397
18431
  SplitButton.displayName = "SplitButton_UI";