@wistia/ui 0.15.12 → 0.15.13-beta.e65c0481.a780530

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.e65c0481.a780530
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
  }
@@ -13666,12 +13709,13 @@ var ContextMenu = ({
13666
13709
  triggerRef,
13667
13710
  children,
13668
13711
  side = "bottom",
13669
- onRequestClose = () => null
13712
+ onRequestClose = () => null,
13713
+ compact = false
13670
13714
  }) => {
13671
13715
  const [isRightClicked, setIsRightClicked] = (0, import_react61.useState)(false);
13672
13716
  const [menuPosition, setMenuPosition] = (0, import_react61.useState)(position ?? { x: 0, y: 0 });
13673
13717
  (0, import_react61.useEffect)(() => {
13674
- if ((0, import_type_guards42.isNil)(position)) {
13718
+ if ((0, import_type_guards43.isNil)(position)) {
13675
13719
  const onContextMenu = (event) => {
13676
13720
  event.preventDefault();
13677
13721
  setMenuPosition({ x: event.clientX, y: event.clientY });
@@ -13685,10 +13729,14 @@ var ContextMenu = ({
13685
13729
  }
13686
13730
  return () => null;
13687
13731
  }, [position, triggerRef]);
13688
- const isOpen = (0, import_type_guards42.isNotNil)(position) || isRightClicked;
13689
- return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
13732
+ const isOpen = (0, import_type_guards43.isNotNil)(position) || isRightClicked;
13733
+ if (!isOpen) {
13734
+ return null;
13735
+ }
13736
+ const menu = /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
13690
13737
  Menu,
13691
13738
  {
13739
+ compact,
13692
13740
  isOpen,
13693
13741
  onOpenChange: (next) => {
13694
13742
  setIsRightClicked(next);
@@ -13714,13 +13762,17 @@ var ContextMenu = ({
13714
13762
  ),
13715
13763
  children
13716
13764
  }
13717
- ) : null;
13765
+ );
13766
+ if ((0, import_type_guards43.isNotNil)(triggerRef)) {
13767
+ return (0, import_react_dom.createPortal)(menu, document.body);
13768
+ }
13769
+ return menu;
13718
13770
  };
13719
13771
 
13720
13772
  // src/components/DataCards/DataCard.tsx
13721
13773
  var import_react62 = require("react");
13722
13774
  var import_styled_components75 = __toESM(require("styled-components"));
13723
- var import_type_guards43 = require("@wistia/type-guards");
13775
+ var import_type_guards44 = require("@wistia/type-guards");
13724
13776
  var import_jsx_runtime268 = require("react/jsx-runtime");
13725
13777
  var StyledDataCard = import_styled_components75.default.div`
13726
13778
  --wui-data-card-text: var(--wui-color-text-button);
@@ -13874,8 +13926,8 @@ var DataCardInner = ({
13874
13926
  children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledLoadingValue, {}) : value
13875
13927
  }
13876
13928
  ),
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)(
13929
+ (0, import_type_guards44.isNotNil)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledSlot, { children: upperRightSlot }),
13930
+ (0, import_type_guards44.isNotNil)(subtitle) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
13879
13931
  StyledSubtitle,
13880
13932
  {
13881
13933
  "data-wui-data-card-subtitle": true,
@@ -13883,13 +13935,13 @@ var DataCardInner = ({
13883
13935
  children: subtitle
13884
13936
  }
13885
13937
  ),
13886
- (0, import_type_guards43.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledDataCardTrendContainer, { children: trend })
13938
+ (0, import_type_guards44.isNotNil)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(StyledDataCardTrendContainer, { children: trend })
13887
13939
  ]
13888
13940
  }
13889
13941
  );
13890
13942
  var DataCard = (props) => {
13891
13943
  const ref = (0, import_react62.useRef)(null);
13892
- if ((0, import_type_guards43.isNotNil)(props.href) || (0, import_type_guards43.isNotNil)(props.onClick)) {
13944
+ if ((0, import_type_guards44.isNotNil)(props.href) || (0, import_type_guards44.isNotNil)(props.onClick)) {
13893
13945
  const { "aria-pressed": ariaPressed, ...dataCardProps } = props;
13894
13946
  return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
13895
13947
  DataCardInner,
@@ -13900,8 +13952,8 @@ var DataCard = (props) => {
13900
13952
  Button,
13901
13953
  {
13902
13954
  ref,
13903
- ...(0, import_type_guards43.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
13904
- ...(0, import_type_guards43.isNotNil)(props.reloadDocument) ? { reloadDocument: props.reloadDocument } : {},
13955
+ ...(0, import_type_guards44.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
13956
+ ...(0, import_type_guards44.isNotNil)(props.reloadDocument) ? { reloadDocument: props.reloadDocument } : {},
13905
13957
  "aria-pressed": ariaPressed,
13906
13958
  disabled: props.disabled ?? false,
13907
13959
  href: props.href,
@@ -14269,11 +14321,11 @@ var EditableHeading = ({
14269
14321
  // src/components/EditableText/EditableTextDisplay.tsx
14270
14322
  var import_react65 = require("react");
14271
14323
  var import_styled_components83 = __toESM(require("styled-components"));
14272
- var import_type_guards45 = require("@wistia/type-guards");
14324
+ var import_type_guards46 = require("@wistia/type-guards");
14273
14325
 
14274
14326
  // src/components/EditableText/EditableTextRoot.tsx
14275
14327
  var import_react64 = require("react");
14276
- var import_type_guards44 = require("@wistia/type-guards");
14328
+ var import_type_guards45 = require("@wistia/type-guards");
14277
14329
  var import_styled_components82 = __toESM(require("styled-components"));
14278
14330
  var import_jsx_runtime277 = require("react/jsx-runtime");
14279
14331
  var StyledEditableTextRoot = import_styled_components82.default.div`
@@ -14308,7 +14360,7 @@ var EditableTextRoot = ({
14308
14360
  const [isEditing, setIsEditing] = (0, import_react64.useState)(false);
14309
14361
  const value = isControlled ? controlledValue : internalValue;
14310
14362
  const generatedId = (0, import_react64.useId)();
14311
- const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
14363
+ const computedId = (0, import_type_guards45.isNonEmptyString)(id) ? id : `wistia-ui-editable-text-${generatedId}`;
14312
14364
  const handleSetIsEditing = (0, import_react64.useCallback)(
14313
14365
  (editing) => {
14314
14366
  if (editing && !isEditing) {
@@ -14395,7 +14447,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
14395
14447
  margin: 0;
14396
14448
  transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
14397
14449
  ${({ $maxLines }) => {
14398
- if ((0, import_type_guards45.isNotNil)($maxLines)) {
14450
+ if ((0, import_type_guards46.isNotNil)($maxLines)) {
14399
14451
  return import_styled_components83.css`
14400
14452
  ${ellipsisStyle};
14401
14453
  ${lineClampCss($maxLines)};
@@ -14403,7 +14455,7 @@ var StyledEditableTextDisplay = import_styled_components83.default.div`
14403
14455
  }
14404
14456
  return void 0;
14405
14457
  }}
14406
- ${({ $minLines }) => (0, import_type_guards45.isNotNil)($minLines) && import_styled_components83.css`
14458
+ ${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && import_styled_components83.css`
14407
14459
  min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
14408
14460
  `}
14409
14461
  word-break: break-word;
@@ -14490,12 +14542,12 @@ var EditableTextDisplay = makePolymorphic(
14490
14542
  // src/components/EditableText/EditableTextInput.tsx
14491
14543
  var import_react66 = require("react");
14492
14544
  var import_styled_components84 = __toESM(require("styled-components"));
14493
- var import_type_guards46 = require("@wistia/type-guards");
14545
+ var import_type_guards47 = require("@wistia/type-guards");
14494
14546
  var import_jsx_runtime279 = require("react/jsx-runtime");
14495
14547
  var StyledInput2 = (0, import_styled_components84.default)(Input)`
14496
14548
  && {
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));`}
14549
+ ${({ $minLines }) => (0, import_type_guards47.isNotNil)($minLines) && `min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14550
+ ${({ $maxLines }) => (0, import_type_guards47.isNotNil)($maxLines) && `max-height: calc(${$maxLines}lh + calc(var(--wui-editable-text-padding) * 2));`}
14499
14551
  ${({ $typographicVariant }) => getTypographicStyles($typographicVariant)}
14500
14552
  background-color: var(--wui-color-bg-surface);
14501
14553
  border-radius: var(--wui-editable-text-border-radius);
@@ -14756,7 +14808,7 @@ var useFormState = (action, initialData = {}) => {
14756
14808
 
14757
14809
  // src/components/Form/FormErrorSummary.tsx
14758
14810
  var import_react72 = require("react");
14759
- var import_type_guards47 = require("@wistia/type-guards");
14811
+ var import_type_guards48 = require("@wistia/type-guards");
14760
14812
  var import_jsx_runtime282 = require("react/jsx-runtime");
14761
14813
  var ErrorItem = ({ name, error, formId }) => {
14762
14814
  return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
@@ -14770,8 +14822,8 @@ var FormErrorSummary = ({ description }) => {
14770
14822
  }
14771
14823
  return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)("div", { ref, children: [
14772
14824
  /* @__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)(
14825
+ /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards48.isNotUndefined)(error)).map(
14826
+ ([name, error]) => (0, import_type_guards48.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
14775
14827
  ErrorItem,
14776
14828
  {
14777
14829
  error: err,
@@ -14795,7 +14847,7 @@ var FormErrorSummary = ({ description }) => {
14795
14847
  // src/components/FormField/FormField.tsx
14796
14848
  var import_react73 = require("react");
14797
14849
  var import_styled_components85 = __toESM(require("styled-components"));
14798
- var import_type_guards48 = require("@wistia/type-guards");
14850
+ var import_type_guards49 = require("@wistia/type-guards");
14799
14851
  var import_jsx_runtime283 = require("react/jsx-runtime");
14800
14852
  var StyledFormField = import_styled_components85.default.div`
14801
14853
  --form-field-spacing: var(--wui-space-01);
@@ -14836,7 +14888,7 @@ var StyledErrorList = import_styled_components85.default.ul`
14836
14888
  gap: var(--wui-space-01);
14837
14889
  `;
14838
14890
  var ErrorMessages = ({ errors, id }) => {
14839
- const isErrorArray = (0, import_type_guards48.isArray)(errors);
14891
+ const isErrorArray = (0, import_type_guards49.isArray)(errors);
14840
14892
  const isMultipleErrors = isErrorArray && errors.length > 1;
14841
14893
  if (!isErrorArray) {
14842
14894
  return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
@@ -14904,19 +14956,19 @@ var FormField = ({
14904
14956
  "aria-describedby": ariaDescribedby,
14905
14957
  ...props
14906
14958
  };
14907
- if ((0, import_type_guards48.isUndefined)(value) && (0, import_type_guards48.isNotUndefined)(defaultValue)) {
14959
+ if ((0, import_type_guards49.isUndefined)(value) && (0, import_type_guards49.isNotUndefined)(defaultValue)) {
14908
14960
  childProps = {
14909
14961
  ...childProps,
14910
14962
  defaultValue
14911
14963
  };
14912
14964
  }
14913
- if ((0, import_type_guards48.isNotNil)(checkboxGroup)) {
14914
- const computedName = (0, import_type_guards48.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
14965
+ if ((0, import_type_guards49.isNotNil)(checkboxGroup)) {
14966
+ const computedName = (0, import_type_guards49.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
14915
14967
  const handleChange = (event) => {
14916
- if ((0, import_type_guards48.isNotUndefined)(props.onChange)) {
14968
+ if ((0, import_type_guards49.isNotUndefined)(props.onChange)) {
14917
14969
  props.onChange(event);
14918
14970
  }
14919
- if ((0, import_type_guards48.isNotUndefined)(checkboxGroup.onChange)) {
14971
+ if ((0, import_type_guards49.isNotUndefined)(checkboxGroup.onChange)) {
14920
14972
  checkboxGroup.onChange(event);
14921
14973
  }
14922
14974
  };
@@ -14924,7 +14976,7 @@ var FormField = ({
14924
14976
  ...childProps,
14925
14977
  name: computedName,
14926
14978
  onChange: handleChange,
14927
- "aria-invalid": (0, import_type_guards48.isNotNil)(error)
14979
+ "aria-invalid": (0, import_type_guards49.isNotNil)(error)
14928
14980
  };
14929
14981
  }
14930
14982
  import_react73.Children.only(children);
@@ -14935,9 +14987,9 @@ var FormField = ({
14935
14987
  "data-label-position": labelPosition ?? formState.labelPosition,
14936
14988
  children: [
14937
14989
  !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,
14990
+ (0, import_type_guards49.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
14939
14991
  (0, import_react73.cloneElement)(children, childProps),
14940
- (0, import_type_guards48.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
14992
+ (0, import_type_guards49.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
14941
14993
  /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("div", {}),
14942
14994
  /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
14943
14995
  ErrorMessages,
@@ -14983,7 +15035,7 @@ RadioGroup.displayName = "RadioGroup_UI";
14983
15035
  // src/components/Grid/Grid.tsx
14984
15036
  var import_react75 = require("react");
14985
15037
  var import_styled_components86 = __toESM(require("styled-components"));
14986
- var import_type_guards49 = require("@wistia/type-guards");
15038
+ var import_type_guards50 = require("@wistia/type-guards");
14987
15039
  var import_jsx_runtime285 = require("react/jsx-runtime");
14988
15040
  var DEFAULT_ELEMENT5 = "div";
14989
15041
  var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
@@ -15033,7 +15085,7 @@ var GridComponent = (0, import_react75.forwardRef)(
15033
15085
  ...props
15034
15086
  }, ref) => {
15035
15087
  const responsiveGap = useResponsiveProp(gap);
15036
- const { column, row } = (0, import_type_guards49.isRecord)(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
15088
+ const { column, row } = (0, import_type_guards50.isRecord)(responsiveGap) ? responsiveGap : { column: responsiveGap, row: responsiveGap };
15037
15089
  const responsiveColumns = useResponsiveProp(columns);
15038
15090
  const responsiveMinChildWidth = useResponsiveProp(minChildWidth);
15039
15091
  return /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
@@ -15058,7 +15110,7 @@ var Grid = makePolymorphic(GridComponent);
15058
15110
  // src/components/InputClickToCopy/InputClickToCopy.tsx
15059
15111
  var import_styled_components87 = __toESM(require("styled-components"));
15060
15112
  var import_react76 = require("react");
15061
- var import_type_guards50 = require("@wistia/type-guards");
15113
+ var import_type_guards51 = require("@wistia/type-guards");
15062
15114
  var import_jsx_runtime286 = require("react/jsx-runtime");
15063
15115
  var StyledIconButton = (0, import_styled_components87.default)(IconButton)`
15064
15116
  /* override size for icon button since prop gets changed by Input */
@@ -15088,12 +15140,12 @@ var InputClickToCopy = (0, import_react76.forwardRef)(
15088
15140
  if (disabled) {
15089
15141
  return;
15090
15142
  }
15091
- if ((0, import_type_guards50.isFunction)(props.onClick)) {
15143
+ if ((0, import_type_guards51.isFunction)(props.onClick)) {
15092
15144
  props.onClick(event);
15093
15145
  }
15094
15146
  void copyToClipboard(value).then(() => {
15095
15147
  setIsCopied(true);
15096
- if ((0, import_type_guards50.isFunction)(onCopy)) {
15148
+ if ((0, import_type_guards51.isFunction)(onCopy)) {
15097
15149
  onCopy(value);
15098
15150
  }
15099
15151
  return value;
@@ -15128,7 +15180,7 @@ InputClickToCopy.displayName = "InputClickToCopy_UI";
15128
15180
  // src/components/InputPassword/InputPassword.tsx
15129
15181
  var import_styled_components88 = __toESM(require("styled-components"));
15130
15182
  var import_react77 = require("react");
15131
- var import_type_guards51 = require("@wistia/type-guards");
15183
+ var import_type_guards52 = require("@wistia/type-guards");
15132
15184
  var import_jsx_runtime287 = require("react/jsx-runtime");
15133
15185
  var StyledIconButton2 = (0, import_styled_components88.default)(IconButton)`
15134
15186
  /* override size for icon button since prop gets changed by Input */
@@ -15144,7 +15196,7 @@ var InputPassword = (0, import_react77.forwardRef)(
15144
15196
  const handleClick = () => {
15145
15197
  const newVisibility = !isVisible;
15146
15198
  setIsVisible(newVisibility);
15147
- if ((0, import_type_guards51.isFunction)(onVisibilityToggle)) {
15199
+ if ((0, import_type_guards52.isFunction)(onVisibilityToggle)) {
15148
15200
  onVisibilityToggle(newVisibility);
15149
15201
  }
15150
15202
  };
@@ -15174,7 +15226,7 @@ InputPassword.displayName = "InputPassword_UI";
15174
15226
 
15175
15227
  // src/components/KeyboardShortcut/KeyboardShortcut.tsx
15176
15228
  var import_styled_components89 = __toESM(require("styled-components"));
15177
- var import_type_guards52 = require("@wistia/type-guards");
15229
+ var import_type_guards53 = require("@wistia/type-guards");
15178
15230
  var import_jsx_runtime288 = require("react/jsx-runtime");
15179
15231
  var StyledKeyboardShortcut = import_styled_components89.default.div`
15180
15232
  align-items: center;
@@ -15268,7 +15320,7 @@ var KeyboardShortcut = ({
15268
15320
  $fullWidth: fullWidth,
15269
15321
  ...otherProps,
15270
15322
  children: [
15271
- (0, import_type_guards52.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Label2, { children: label }),
15323
+ (0, import_type_guards53.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Label2, { children: label }),
15272
15324
  /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
15273
15325
  StyledKey,
15274
15326
  {
@@ -15282,18 +15334,18 @@ var KeyboardShortcut = ({
15282
15334
  KeyboardShortcut.displayName = "KeyboardShortcut_UI";
15283
15335
 
15284
15336
  // src/components/List/List.tsx
15285
- var import_type_guards54 = require("@wistia/type-guards");
15337
+ var import_type_guards55 = require("@wistia/type-guards");
15286
15338
  var import_styled_components91 = __toESM(require("styled-components"));
15287
15339
 
15288
15340
  // src/components/List/ListItem.tsx
15289
15341
  var import_styled_components90 = __toESM(require("styled-components"));
15290
- var import_type_guards53 = require("@wistia/type-guards");
15342
+ var import_type_guards54 = require("@wistia/type-guards");
15291
15343
  var import_jsx_runtime289 = require("react/jsx-runtime");
15292
15344
  var ListItemComponent = import_styled_components90.default.li`
15293
15345
  margin-bottom: var(--wui-space-02);
15294
15346
  `;
15295
15347
  var ListItem = ({ children }) => {
15296
- if ((0, import_type_guards53.isNil)(children)) {
15348
+ if ((0, import_type_guards54.isNil)(children)) {
15297
15349
  return null;
15298
15350
  }
15299
15351
  return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(ListItemComponent, { children });
@@ -15423,13 +15475,13 @@ var List = ({
15423
15475
  ...otherProps
15424
15476
  }) => {
15425
15477
  const listVariant = variant ?? "bullets";
15426
- if ((0, import_type_guards54.isNotNil)(children)) {
15478
+ if ((0, import_type_guards55.isNotNil)(children)) {
15427
15479
  if (Array.isArray(children) && !children.length) {
15428
15480
  return null;
15429
15481
  }
15430
15482
  return renderListComponent(children, listVariant, otherProps);
15431
15483
  }
15432
- if ((0, import_type_guards54.isNotNil)(items)) {
15484
+ if ((0, import_type_guards55.isNotNil)(items)) {
15433
15485
  if (!items.length) {
15434
15486
  return null;
15435
15487
  }
@@ -15464,7 +15516,7 @@ Mark.displayName = "Mark_UI";
15464
15516
  var import_react80 = require("react");
15465
15517
  var import_styled_components97 = __toESM(require("styled-components"));
15466
15518
  var import_react_dialog5 = require("@radix-ui/react-dialog");
15467
- var import_type_guards56 = require("@wistia/type-guards");
15519
+ var import_type_guards57 = require("@wistia/type-guards");
15468
15520
 
15469
15521
  // src/components/Modal/ModalHeader.tsx
15470
15522
  var import_styled_components94 = __toESM(require("styled-components"));
@@ -15543,7 +15595,7 @@ var import_react_dialog3 = require("@radix-ui/react-dialog");
15543
15595
 
15544
15596
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
15545
15597
  var import_react78 = require("react");
15546
- var import_type_guards55 = require("@wistia/type-guards");
15598
+ var import_type_guards56 = require("@wistia/type-guards");
15547
15599
  var useFocusRestore = () => {
15548
15600
  const previouslyFocusedRef = (0, import_react78.useRef)(null);
15549
15601
  (0, import_react78.useEffect)(() => {
@@ -15551,7 +15603,7 @@ var useFocusRestore = () => {
15551
15603
  }, []);
15552
15604
  (0, import_react78.useEffect)(() => {
15553
15605
  return () => {
15554
- if ((0, import_type_guards55.isNotNil)(previouslyFocusedRef.current)) {
15606
+ if ((0, import_type_guards56.isNotNil)(previouslyFocusedRef.current)) {
15555
15607
  setTimeout(() => {
15556
15608
  previouslyFocusedRef.current?.focus();
15557
15609
  }, 0);
@@ -15773,7 +15825,7 @@ var Modal = (0, import_react80.forwardRef)(
15773
15825
  import_react_dialog5.Root,
15774
15826
  {
15775
15827
  onOpenChange: (open2) => {
15776
- if (!open2 && (0, import_type_guards56.isNotNil)(onRequestClose)) {
15828
+ if (!open2 && (0, import_type_guards57.isNotNil)(onRequestClose)) {
15777
15829
  onRequestClose();
15778
15830
  }
15779
15831
  },
@@ -15785,7 +15837,7 @@ var Modal = (0, import_react80.forwardRef)(
15785
15837
  {
15786
15838
  ref,
15787
15839
  onOpenAutoFocus: (event) => {
15788
- if ((0, import_type_guards56.isNotNil)(initialFocusRef) && initialFocusRef.current) {
15840
+ if ((0, import_type_guards57.isNotNil)(initialFocusRef) && initialFocusRef.current) {
15789
15841
  event.preventDefault();
15790
15842
  requestAnimationFrame(() => {
15791
15843
  initialFocusRef.current?.focus();
@@ -15797,7 +15849,7 @@ var Modal = (0, import_react80.forwardRef)(
15797
15849
  ...props,
15798
15850
  children: [
15799
15851
  /* @__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,
15852
+ (0, import_type_guards57.isNotNil)(footer) ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalFooter, { children: footer }) : null,
15801
15853
  hideCloseButton && hideTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
15802
15854
  ModalHeader,
15803
15855
  {
@@ -15843,9 +15895,9 @@ var import_react_popover5 = require("@radix-ui/react-popover");
15843
15895
  var import_styled_components99 = __toESM(require("styled-components"));
15844
15896
 
15845
15897
  // src/private/helpers/getControls/getControlProps.tsx
15846
- var import_type_guards57 = require("@wistia/type-guards");
15898
+ var import_type_guards58 = require("@wistia/type-guards");
15847
15899
  var getControlProps = (isOpen, onOpenChange) => {
15848
- return (0, import_type_guards57.isNotNil)(onOpenChange) && (0, import_type_guards57.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
15900
+ return (0, import_type_guards58.isNotNil)(onOpenChange) && (0, import_type_guards58.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
15849
15901
  };
15850
15902
 
15851
15903
  // src/components/Popover/PopoverArrow.tsx
@@ -16001,7 +16053,7 @@ Popover.displayName = "Popover_UI";
16001
16053
  // src/components/ProgressBar/ProgressBar.tsx
16002
16054
  var import_styled_components100 = __toESM(require("styled-components"));
16003
16055
  var import_react_progress = require("@radix-ui/react-progress");
16004
- var import_type_guards58 = require("@wistia/type-guards");
16056
+ var import_type_guards59 = require("@wistia/type-guards");
16005
16057
  var import_jsx_runtime299 = require("react/jsx-runtime");
16006
16058
  var ProgressBarWrapper = import_styled_components100.default.div`
16007
16059
  --progress-bar-height: 8px;
@@ -16057,7 +16109,7 @@ var ProgressBar = ({
16057
16109
  ...props
16058
16110
  }) => {
16059
16111
  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,
16112
+ (0, import_type_guards59.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
16061
16113
  /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
16062
16114
  StyledProgressBar,
16063
16115
  {
@@ -16075,13 +16127,13 @@ var ProgressBar = ({
16075
16127
  )
16076
16128
  }
16077
16129
  ),
16078
- (0, import_type_guards58.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelRight }) : null
16130
+ (0, import_type_guards59.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelRight }) : null
16079
16131
  ] });
16080
16132
  };
16081
16133
  ProgressBar.displayName = "ProgressBar_UI";
16082
16134
 
16083
16135
  // src/components/Radio/Radio.tsx
16084
- var import_type_guards59 = require("@wistia/type-guards");
16136
+ var import_type_guards60 = require("@wistia/type-guards");
16085
16137
  var import_react81 = require("react");
16086
16138
  var import_styled_components101 = __toESM(require("styled-components"));
16087
16139
  var import_jsx_runtime300 = require("react/jsx-runtime");
@@ -16181,14 +16233,14 @@ var Radio = (0, import_react81.forwardRef)(
16181
16233
  ...props
16182
16234
  }, ref) => {
16183
16235
  const generatedId = (0, import_react81.useId)();
16184
- const computedId = (0, import_type_guards59.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16236
+ const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16185
16237
  const radioGroupContext = useRadioGroup();
16186
16238
  const contextName = radioGroupContext?.name;
16187
16239
  const contextOnChange = radioGroupContext?.onChange;
16188
16240
  const contextValue = radioGroupContext?.value;
16189
16241
  const radioName = name ?? contextName;
16190
16242
  const handleOnChange = onChange ?? contextOnChange;
16191
- const isChecked = (0, import_type_guards59.isNotUndefined)(value) && (0, import_type_guards59.isNotUndefined)(contextValue) ? contextValue === value : checked;
16243
+ const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
16192
16244
  return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
16193
16245
  StyledRadioWrapper,
16194
16246
  {
@@ -16235,7 +16287,7 @@ var import_react83 = require("react");
16235
16287
  // src/components/RadioCard/RadioCardRoot.tsx
16236
16288
  var import_react82 = require("react");
16237
16289
  var import_styled_components102 = __toESM(require("styled-components"));
16238
- var import_type_guards60 = require("@wistia/type-guards");
16290
+ var import_type_guards61 = require("@wistia/type-guards");
16239
16291
  var import_jsx_runtime301 = require("react/jsx-runtime");
16240
16292
  var checkedStyles = import_styled_components102.css`
16241
16293
  --wui-radio-card-border-color: var(--wui-color-focus-ring);
@@ -16357,14 +16409,14 @@ var RadioCardRoot = (0, import_react82.forwardRef)(
16357
16409
  ...props
16358
16410
  }, ref) => {
16359
16411
  const generatedId = (0, import_react82.useId)();
16360
- const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16412
+ const computedId = (0, import_type_guards61.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16361
16413
  const radioGroupContext = useRadioGroup();
16362
16414
  const contextName = radioGroupContext?.name;
16363
16415
  const contextOnChange = radioGroupContext?.onChange;
16364
16416
  const contextValue = radioGroupContext?.value;
16365
16417
  const radioName = name ?? contextName;
16366
16418
  const handleOnChange = onChange ?? contextOnChange;
16367
- const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
16419
+ const isChecked = (0, import_type_guards61.isNotUndefined)(value) && (0, import_type_guards61.isNotUndefined)(contextValue) ? contextValue === value : checked;
16368
16420
  return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
16369
16421
  StyledCard2,
16370
16422
  {
@@ -16396,7 +16448,7 @@ RadioCardRoot.displayName = "RadioCardRoot_UI";
16396
16448
 
16397
16449
  // src/components/RadioCard/RadioCardDefaultLayout.tsx
16398
16450
  var import_styled_components104 = __toESM(require("styled-components"));
16399
- var import_type_guards61 = require("@wistia/type-guards");
16451
+ var import_type_guards62 = require("@wistia/type-guards");
16400
16452
 
16401
16453
  // src/components/RadioCard/RadioCardIndicator.tsx
16402
16454
  var import_styled_components103 = __toESM(require("styled-components"));
@@ -16470,17 +16522,17 @@ var RadioCardDefaultLayout = ({
16470
16522
  showIndicator = true
16471
16523
  }) => {
16472
16524
  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,
16525
+ 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
16526
  /* @__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 }),
16527
+ (0, import_type_guards62.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
16476
16528
  /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(
16477
16529
  Stack,
16478
16530
  {
16479
16531
  gap: "space-01",
16480
- style: (0, import_type_guards61.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
16532
+ style: (0, import_type_guards62.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
16481
16533
  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)(
16534
+ (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 }) }),
16535
+ (0, import_type_guards62.isNotNil)(description) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
16484
16536
  Text,
16485
16537
  {
16486
16538
  prominence: "secondary",
@@ -16663,7 +16715,7 @@ ScrollArea.displayName = "ScrollArea_UI";
16663
16715
  var import_react88 = require("react");
16664
16716
  var import_styled_components108 = __toESM(require("styled-components"));
16665
16717
  var import_react_toggle_group3 = require("@radix-ui/react-toggle-group");
16666
- var import_type_guards63 = require("@wistia/type-guards");
16718
+ var import_type_guards64 = require("@wistia/type-guards");
16667
16719
 
16668
16720
  // src/components/SegmentedControl/useSelectedItemStyle.tsx
16669
16721
  var import_react86 = require("react");
@@ -16700,7 +16752,7 @@ var useSelectedItemStyle = () => {
16700
16752
 
16701
16753
  // src/components/SegmentedControl/SelectedItemIndicator.tsx
16702
16754
  var import_styled_components107 = __toESM(require("styled-components"));
16703
- var import_type_guards62 = require("@wistia/type-guards");
16755
+ var import_type_guards63 = require("@wistia/type-guards");
16704
16756
 
16705
16757
  // src/components/SegmentedControl/useSegmentedControlValue.tsx
16706
16758
  var import_react87 = require("react");
@@ -16734,7 +16786,7 @@ var SelectedItemIndicatorDiv = import_styled_components107.default.div`
16734
16786
  var SelectedItemIndicator = () => {
16735
16787
  const selectedValue = useSegmentedControlValue();
16736
16788
  const { selectedItemIndicatorStyle } = useSelectedItemStyle();
16737
- if (!selectedValue || (0, import_type_guards62.isUndefined)(selectedItemIndicatorStyle)) {
16789
+ if (!selectedValue || (0, import_type_guards63.isUndefined)(selectedItemIndicatorStyle)) {
16738
16790
  return null;
16739
16791
  }
16740
16792
  return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
@@ -16771,7 +16823,7 @@ var SegmentedControl = (0, import_react88.forwardRef)(
16771
16823
  onSelectedValueChange,
16772
16824
  ...props
16773
16825
  }, ref) => {
16774
- if ((0, import_type_guards63.isNil)(children)) {
16826
+ if ((0, import_type_guards64.isNil)(children)) {
16775
16827
  return null;
16776
16828
  }
16777
16829
  return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
@@ -16800,7 +16852,7 @@ SegmentedControl.displayName = "SegmentedControl_UI";
16800
16852
  var import_react89 = require("react");
16801
16853
  var import_styled_components109 = __toESM(require("styled-components"));
16802
16854
  var import_react_toggle_group4 = require("@radix-ui/react-toggle-group");
16803
- var import_type_guards64 = require("@wistia/type-guards");
16855
+ var import_type_guards65 = require("@wistia/type-guards");
16804
16856
  var import_jsx_runtime309 = require("react/jsx-runtime");
16805
16857
  var segmentedControlItemStyles = import_styled_components109.css`
16806
16858
  all: unset; /* ToggleGroupItem is a button element */
@@ -16916,8 +16968,8 @@ var SegmentedControlItem = (0, import_react89.forwardRef)(
16916
16968
  {
16917
16969
  ref: combinedRef,
16918
16970
  ...otherProps,
16919
- $hasLabel: (0, import_type_guards64.isNotNil)(label),
16920
- "aria-label": (0, import_type_guards64.isNotNil)(label) ? void 0 : ariaLabel,
16971
+ $hasLabel: (0, import_type_guards65.isNotNil)(label),
16972
+ "aria-label": (0, import_type_guards65.isNotNil)(label) ? void 0 : ariaLabel,
16921
16973
  disabled,
16922
16974
  onClick: handleClick,
16923
16975
  value,
@@ -17082,7 +17134,7 @@ Select.displayName = "Select_UI";
17082
17134
  var import_react_select2 = require("@radix-ui/react-select");
17083
17135
  var import_react91 = require("react");
17084
17136
  var import_styled_components111 = __toESM(require("styled-components"));
17085
- var import_type_guards65 = require("@wistia/type-guards");
17137
+ var import_type_guards66 = require("@wistia/type-guards");
17086
17138
  var import_jsx_runtime311 = require("react/jsx-runtime");
17087
17139
  var StyledItem = (0, import_styled_components111.default)(import_react_select2.Item)`
17088
17140
  ${getTypographicStyles("label3")}
@@ -17119,7 +17171,7 @@ var SelectOption = (0, import_react91.forwardRef)(
17119
17171
  ref: forwardedRef,
17120
17172
  $checkmarkVerticalAlign: checkmarkVerticalAlign,
17121
17173
  children: [
17122
- (0, import_type_guards65.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { children: [
17174
+ (0, import_type_guards66.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { children: [
17123
17175
  children,
17124
17176
  /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
17125
17177
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(import_react_select2.ItemText, { children }),
@@ -17161,7 +17213,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
17161
17213
  // src/components/Slider/Slider.tsx
17162
17214
  var import_react_slider2 = require("@radix-ui/react-slider");
17163
17215
  var import_styled_components113 = __toESM(require("styled-components"));
17164
- var import_type_guards66 = require("@wistia/type-guards");
17216
+ var import_type_guards67 = require("@wistia/type-guards");
17165
17217
  var import_jsx_runtime313 = require("react/jsx-runtime");
17166
17218
  var SliderContainer = import_styled_components113.default.div`
17167
17219
  --wui-slider-track-color: var(--wui-gray-6);
@@ -17240,7 +17292,7 @@ var Slider = ({
17240
17292
  "data-testid": dataTestId = "ui-slider",
17241
17293
  ...otherProps
17242
17294
  }) => {
17243
- if (!((0, import_type_guards66.isNonEmptyString)(ariaLabel) || (0, import_type_guards66.isNonEmptyString)(ariaLabelledby))) {
17295
+ if (!((0, import_type_guards67.isNonEmptyString)(ariaLabel) || (0, import_type_guards67.isNonEmptyString)(ariaLabelledby))) {
17244
17296
  throw new Error(
17245
17297
  "UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop."
17246
17298
  );
@@ -17402,7 +17454,7 @@ var TableRow = ({ children, ...props }) => {
17402
17454
  // src/components/Tabs/Tabs.tsx
17403
17455
  var import_react_tabs = require("@radix-ui/react-tabs");
17404
17456
  var import_react98 = require("react");
17405
- var import_type_guards67 = require("@wistia/type-guards");
17457
+ var import_type_guards68 = require("@wistia/type-guards");
17406
17458
 
17407
17459
  // src/components/Tabs/useTabsValue.tsx
17408
17460
  var import_react97 = require("react");
@@ -17439,10 +17491,10 @@ var Tabs = ({
17439
17491
  ...props,
17440
17492
  onValueChange
17441
17493
  };
17442
- if ((0, import_type_guards67.isNotNil)(value)) {
17494
+ if ((0, import_type_guards68.isNotNil)(value)) {
17443
17495
  rootProps.value = value;
17444
17496
  }
17445
- if ((0, import_type_guards67.isNotNil)(defaultValue)) {
17497
+ if ((0, import_type_guards68.isNotNil)(defaultValue)) {
17446
17498
  rootProps.defaultValue = defaultValue;
17447
17499
  }
17448
17500
  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 +17514,7 @@ var import_react_tabs3 = require("@radix-ui/react-tabs");
17462
17514
  var import_styled_components121 = __toESM(require("styled-components"));
17463
17515
 
17464
17516
  // src/components/Tabs/SelectedTabIndicator.tsx
17465
- var import_type_guards68 = require("@wistia/type-guards");
17517
+ var import_type_guards69 = require("@wistia/type-guards");
17466
17518
 
17467
17519
  // src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
17468
17520
  var import_styled_components120 = __toESM(require("styled-components"));
@@ -17477,7 +17529,7 @@ var import_jsx_runtime322 = require("react/jsx-runtime");
17477
17529
  var SelectedTabIndicator = () => {
17478
17530
  const { selectedItemIndicatorStyle } = useSelectedItemStyle();
17479
17531
  const selectedValue = useTabsValue();
17480
- if (selectedValue == null || (0, import_type_guards68.isUndefined)(selectedItemIndicatorStyle)) {
17532
+ if (selectedValue == null || (0, import_type_guards69.isUndefined)(selectedItemIndicatorStyle)) {
17481
17533
  return null;
17482
17534
  }
17483
17535
  return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
@@ -17511,7 +17563,7 @@ TabsList.displayName = "TabsList_UI";
17511
17563
 
17512
17564
  // src/components/Tabs/TabsTrigger.tsx
17513
17565
  var import_react99 = require("react");
17514
- var import_type_guards69 = require("@wistia/type-guards");
17566
+ var import_type_guards70 = require("@wistia/type-guards");
17515
17567
 
17516
17568
  // src/components/Tabs/StyledRadixTabsTrigger.tsx
17517
17569
  var import_styled_components122 = __toESM(require("styled-components"));
@@ -17562,8 +17614,8 @@ var TabsTrigger = (0, import_react99.forwardRef)(
17562
17614
  {
17563
17615
  ...otherProps,
17564
17616
  ref: combinedRef,
17565
- $hasLabel: (0, import_type_guards69.isNotNil)(label),
17566
- "aria-label": (0, import_type_guards69.isNotNil)(label) ? void 0 : ariaLabel,
17617
+ $hasLabel: (0, import_type_guards70.isNotNil)(label),
17618
+ "aria-label": (0, import_type_guards70.isNotNil)(label) ? void 0 : ariaLabel,
17567
17619
  disabled,
17568
17620
  value,
17569
17621
  children: [
@@ -17578,7 +17630,7 @@ TabsTrigger.displayName = "TabsTrigger_UI";
17578
17630
 
17579
17631
  // src/components/Thumbnail/ThumbnailBadge.tsx
17580
17632
  var import_styled_components123 = __toESM(require("styled-components"));
17581
- var import_type_guards70 = require("@wistia/type-guards");
17633
+ var import_type_guards71 = require("@wistia/type-guards");
17582
17634
  var import_jsx_runtime325 = require("react/jsx-runtime");
17583
17635
  var StyledThumbnailBadge = import_styled_components123.default.div`
17584
17636
  align-items: center;
@@ -17607,7 +17659,7 @@ var StyledThumbnailBadge = import_styled_components123.default.div`
17607
17659
  `;
17608
17660
  var ThumbnailBadge = ({ icon, label, ...props }) => {
17609
17661
  return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(StyledThumbnailBadge, { ...props, children: [
17610
- (0, import_type_guards70.isNotNil)(icon) && icon,
17662
+ (0, import_type_guards71.isNotNil)(icon) && icon,
17611
17663
  /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("span", { children: label })
17612
17664
  ] });
17613
17665
  };
@@ -17616,10 +17668,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge_UI";
17616
17668
  // src/components/Thumbnail/Thumbnail.tsx
17617
17669
  var import_react100 = require("react");
17618
17670
  var import_styled_components126 = __toESM(require("styled-components"));
17619
- var import_type_guards73 = require("@wistia/type-guards");
17671
+ var import_type_guards74 = require("@wistia/type-guards");
17620
17672
 
17621
17673
  // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
17622
- var import_type_guards71 = require("@wistia/type-guards");
17674
+ var import_type_guards72 = require("@wistia/type-guards");
17623
17675
  var import_styled_components124 = require("styled-components");
17624
17676
  var gradients = {
17625
17677
  defaultDarkOne: import_styled_components124.css`
@@ -17747,12 +17799,12 @@ var gradients = {
17747
17799
  };
17748
17800
  var gradientMap = Object.keys(gradients);
17749
17801
  var getBackgroundGradient = (gradientName = void 0) => {
17750
- return (0, import_type_guards71.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
17802
+ return (0, import_type_guards72.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
17751
17803
  };
17752
17804
 
17753
17805
  // src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
17754
17806
  var import_styled_components125 = __toESM(require("styled-components"));
17755
- var import_type_guards72 = require("@wistia/type-guards");
17807
+ var import_type_guards73 = require("@wistia/type-guards");
17756
17808
  var import_jsx_runtime326 = require("react/jsx-runtime");
17757
17809
  var ScrubLine = import_styled_components125.default.div`
17758
17810
  position: absolute;
@@ -17846,8 +17898,8 @@ var ThumbnailStoryboardViewer = ({
17846
17898
  );
17847
17899
  const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
17848
17900
  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";
17901
+ const showScrubLine = (0, import_type_guards73.isNotNil)(cursorPosition);
17902
+ const scrubLinePosition = (0, import_type_guards73.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
17851
17903
  const viewerStyles = {
17852
17904
  position: "relative",
17853
17905
  overflow: "hidden",
@@ -17918,10 +17970,10 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
17918
17970
  );
17919
17971
  };
17920
17972
  var StyledThumbnail = import_styled_components126.default.div`
17921
- background-image: ${({ $backgroundUrl }) => (0, import_type_guards73.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17973
+ background-image: ${({ $backgroundUrl }) => (0, import_type_guards74.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17922
17974
  ${({ $backgroundUrl, $gradientBackground }) => (
17923
17975
  // if we don't have $backgroundUrl show a gradient
17924
- (0, import_type_guards73.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
17976
+ (0, import_type_guards74.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
17925
17977
  )};
17926
17978
  background-position: center center;
17927
17979
  background-size: cover;
@@ -17953,7 +18005,7 @@ var StoryboardRenderer = ({
17953
18005
  frameCount,
17954
18006
  aspectRatio
17955
18007
  } = storyboard;
17956
- const targetWidth = (0, import_type_guards73.isString)(width) ? parseInt(width, 10) : Number(width);
18008
+ const targetWidth = (0, import_type_guards74.isString)(width) ? parseInt(width, 10) : Number(width);
17957
18009
  const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
17958
18010
  return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
17959
18011
  ThumbnailStoryboardViewer,
@@ -17997,10 +18049,10 @@ var Thumbnail = (0, import_react100.forwardRef)(
17997
18049
  const storyboardElementRef = (0, import_react100.useRef)(null);
17998
18050
  const [cursorPosition, setCursorPosition] = (0, import_react100.useState)(null);
17999
18051
  const backgroundUrl = (0, import_react100.useMemo)(
18000
- () => thumbnailImageType === "square" && (0, import_type_guards73.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
18052
+ () => thumbnailImageType === "square" && (0, import_type_guards74.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
18001
18053
  [thumbnailImageType, thumbnailUrl]
18002
18054
  );
18003
- const isScrubbable = (0, import_type_guards73.isNotNil)(storyboard);
18055
+ const isScrubbable = (0, import_type_guards74.isNotNil)(storyboard);
18004
18056
  const trackStoryboardLoadStatus = (0, import_react100.useCallback)(() => {
18005
18057
  if (storyboardElementRef.current || !storyboard) {
18006
18058
  return storyboardElementRef.current;
@@ -18030,7 +18082,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18030
18082
  setCursorPosition(null);
18031
18083
  }, [isScrubbable]);
18032
18084
  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)) {
18085
+ if ((0, import_type_guards74.isNil)(storyboard) || (0, import_type_guards74.isUndefined)(height) || (0, import_type_guards74.isEmptyString)(height)) {
18034
18086
  return false;
18035
18087
  }
18036
18088
  return isScrubbable && isMouseOver && isStoryboardReady;
@@ -18047,7 +18099,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18047
18099
  width
18048
18100
  }
18049
18101
  );
18050
- } else if ((0, import_type_guards73.isNotNil)(thumbnailUrl)) {
18102
+ } else if ((0, import_type_guards74.isNotNil)(thumbnailUrl)) {
18051
18103
  thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
18052
18104
  ThumbnailImage,
18053
18105
  {
@@ -18072,7 +18124,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18072
18124
  onMouseOut: handleMouseOut,
18073
18125
  role: "presentation",
18074
18126
  children: [
18075
- (0, import_type_guards73.isNotNil)(children) ? children : null,
18127
+ (0, import_type_guards74.isNotNil)(children) ? children : null,
18076
18128
  thumbnailContent
18077
18129
  ]
18078
18130
  }
@@ -18084,7 +18136,7 @@ Thumbnail.displayName = "Thumbnail_UI";
18084
18136
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
18085
18137
  var import_react101 = __toESM(require("react"));
18086
18138
  var import_styled_components127 = __toESM(require("styled-components"));
18087
- var import_type_guards74 = require("@wistia/type-guards");
18139
+ var import_type_guards75 = require("@wistia/type-guards");
18088
18140
  var import_jsx_runtime328 = (
18089
18141
  // ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
18090
18142
  require("react/jsx-runtime")
@@ -18164,7 +18216,7 @@ var ThumbnailCollage = ({
18164
18216
  }) => {
18165
18217
  const thumbnailArray = import_react101.default.Children.toArray(children);
18166
18218
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
18167
- const thumbnails = (0, import_type_guards74.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
18219
+ const thumbnails = (0, import_type_guards75.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
18168
18220
  return import_react101.default.cloneElement(child, {
18169
18221
  ...child.props,
18170
18222
  children: void 0
@@ -18192,7 +18244,7 @@ var ThumbnailCollage = ({
18192
18244
 
18193
18245
  // src/components/WistiaLogo/WistiaLogo.tsx
18194
18246
  var import_styled_components128 = __toESM(require("styled-components"));
18195
- var import_type_guards75 = require("@wistia/type-guards");
18247
+ var import_type_guards76 = require("@wistia/type-guards");
18196
18248
  var import_jsx_runtime329 = require("react/jsx-runtime");
18197
18249
  var renderBrandmark = (brandmarkColor, iconOnly) => {
18198
18250
  if (iconOnly) {
@@ -18305,7 +18357,7 @@ var WistiaLogo = ({
18305
18357
  ...props,
18306
18358
  children: [
18307
18359
  /* @__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,
18360
+ (0, import_type_guards76.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("desc", { children: description }) : null,
18309
18361
  renderBrandmark(brandmarkColor, iconOnly),
18310
18362
  renderLogotype(logotypeColor, iconOnly)
18311
18363
  ]
@@ -18317,7 +18369,7 @@ WistiaLogo.displayName = "WistiaLogo_UI";
18317
18369
 
18318
18370
  // src/components/SplitButton/SplitButton.tsx
18319
18371
  var import_styled_components129 = __toESM(require("styled-components"));
18320
- var import_type_guards76 = require("@wistia/type-guards");
18372
+ var import_type_guards77 = require("@wistia/type-guards");
18321
18373
  var import_react102 = require("react");
18322
18374
  var import_jsx_runtime330 = require("react/jsx-runtime");
18323
18375
  var StyledSplitButton = import_styled_components129.default.span`
@@ -18364,7 +18416,7 @@ var SplitButton = ({
18364
18416
  children
18365
18417
  }
18366
18418
  ),
18367
- (0, import_type_guards76.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
18419
+ (0, import_type_guards77.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
18368
18420
  Menu,
18369
18421
  {
18370
18422
  ...menuProps,
@@ -18383,7 +18435,7 @@ var SplitButton = ({
18383
18435
  children: menuItems
18384
18436
  }
18385
18437
  ),
18386
- (0, import_type_guards76.isNotNil)(secondaryAction) && (0, import_react102.cloneElement)(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18438
+ (0, import_type_guards77.isNotNil)(secondaryAction) && (0, import_react102.cloneElement)(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18387
18439
  ] });
18388
18440
  };
18389
18441
  SplitButton.displayName = "SplitButton_UI";