@wistia/ui 0.10.10 → 0.10.11

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.10.10
3
+ * @license @wistia/ui v0.10.11
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7468,7 +7468,7 @@ var StyledActionButton = (0, import_styled_components22.default)(Button)`
7468
7468
  }
7469
7469
 
7470
7470
  &:hover,
7471
- :focus-visible {
7471
+ &:focus-visible {
7472
7472
  --wui-color-text: var(--wui-color-text-button);
7473
7473
 
7474
7474
  ${({ $hoverColorScheme }) => getColorScheme($hoverColorScheme)};
@@ -7976,24 +7976,25 @@ var getFlexStyle = (flexMode) => {
7976
7976
  }
7977
7977
  };
7978
7978
  var StyledBoxComponent = import_styled_components27.default.div`
7979
+ /* properties meant for Box parent (flex container) */
7979
7980
  align-content: ${({ $alignContent }) => $alignContent};
7980
7981
  align-items: ${({ $alignItems }) => $alignItems};
7981
- align-self: ${({ $alignSelf }) => $alignSelf ?? null};
7982
7982
  display: ${({ $inline }) => (0, import_type_guards20.isNotNil)($inline) && $inline ? "inline-flex" : "flex"};
7983
- flex-basis: ${({ $basis }) => (0, import_type_guards20.isNotNil)($basis) ? $basis : null};
7984
7983
  flex-direction: ${({ $flexDirection }) => $flexDirection};
7984
+ flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
7985
+ justify-content: ${({ $justifyContent }) => $justifyContent};
7986
+ height: ${({ $height }) => $height ?? null};
7987
+ width: ${({ $width }) => $width ?? null};
7985
7988
  ${({ $fillBox: fill }) => getFillStyle2(fill)};
7986
7989
  ${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
7987
7990
  ${({ $flexMode }) => getFlexStyle($flexMode)};
7988
7991
  ${({ $gap }) => getGapStyle($gap)};
7989
- height: ${({ $height }) => $height ?? null};
7990
- width: ${({ $width }) => $width ?? null};
7991
7992
 
7992
- /* Box children styles */
7993
+ /* properties meant for Box children (flex items) */
7994
+ align-self: ${({ $alignSelf }) => $alignSelf ?? null};
7995
+ flex-basis: ${({ $basis }) => (0, import_type_guards20.isNotNil)($basis) ? $basis : null};
7993
7996
  flex-grow: ${({ $grow }) => (0, import_type_guards20.isNotNil)($grow) ? $grow : null};
7994
7997
  flex-shrink: ${({ $shrink }) => (0, import_type_guards20.isNotNil)($shrink) ? $shrink : null};
7995
- flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
7996
- justify-content: ${({ $justifyContent }) => $justifyContent};
7997
7998
  order: ${({ $order }) => (0, import_type_guards20.isNotNil)($order) ? $order : null};
7998
7999
  `;
7999
8000
  var DEFAULT_ELEMENT = "div";
@@ -8880,9 +8881,9 @@ var Center = (0, import_react33.forwardRef)(
8880
8881
  Center.displayName = "Center";
8881
8882
 
8882
8883
  // src/components/Checkbox/Checkbox.tsx
8883
- var import_react37 = require("react");
8884
- var import_styled_components42 = __toESM(require("styled-components"));
8885
- var import_type_guards28 = require("@wistia/type-guards");
8884
+ var import_react38 = require("react");
8885
+ var import_styled_components43 = __toESM(require("styled-components"));
8886
+ var import_type_guards30 = require("@wistia/type-guards");
8886
8887
 
8887
8888
  // src/private/components/FormControlLabel/FormControlLabel.tsx
8888
8889
  var import_styled_components39 = __toESM(require("styled-components"));
@@ -9001,7 +9002,8 @@ var FormControlLabel = ({
9001
9002
  FormControlLabel.displayName = "FormControlLabel";
9002
9003
 
9003
9004
  // src/components/FormGroup/CheckboxGroup.tsx
9004
- var import_react36 = require("react");
9005
+ var import_react37 = require("react");
9006
+ var import_type_guards29 = require("@wistia/type-guards");
9005
9007
 
9006
9008
  // src/components/FormGroup/FormGroup.tsx
9007
9009
  var import_styled_components41 = __toESM(require("styled-components"));
@@ -9071,11 +9073,132 @@ var FormGroup = ({ children, label, ...props }) => {
9071
9073
  };
9072
9074
  FormGroup.displayName = "FormGroup";
9073
9075
 
9074
- // src/components/FormGroup/CheckboxGroup.tsx
9076
+ // src/components/Form/Form.tsx
9077
+ var import_react36 = require("react");
9078
+ var import_styled_components42 = __toESM(require("styled-components"));
9079
+ var import_type_guards28 = require("@wistia/type-guards");
9080
+
9081
+ // src/components/Form/serializeFormData.tsx
9082
+ var ARRAY_SUFFIX = "[]";
9083
+ var serializeFormData = (formData) => {
9084
+ const data = {};
9085
+ formData.forEach((value, key) => {
9086
+ if (key.endsWith(ARRAY_SUFFIX)) {
9087
+ const newKey = key.slice(0, -ARRAY_SUFFIX.length);
9088
+ data[newKey] = formData.getAll(key);
9089
+ } else {
9090
+ data[key] = value;
9091
+ }
9092
+ });
9093
+ return data;
9094
+ };
9095
+
9096
+ // src/components/Form/Form.tsx
9075
9097
  var import_jsx_runtime216 = require("react/jsx-runtime");
9076
- var CheckboxGroupContext = (0, import_react36.createContext)(null);
9098
+ var StyledForm = import_styled_components42.default.form`
9099
+ --form-default-width: 690px;
9100
+
9101
+ max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
9102
+ `;
9103
+ var FormContext = (0, import_react36.createContext)({
9104
+ values: {},
9105
+ errors: {},
9106
+ hasSubmitted: false,
9107
+ formId: "NO_FORM",
9108
+ labelPosition: "block"
9109
+ });
9110
+ var FormComponent = ({
9111
+ children,
9112
+ action,
9113
+ values = {},
9114
+ labelPosition = "block",
9115
+ validate,
9116
+ fullWidth = false,
9117
+ ...props
9118
+ }, forwardedRef) => {
9119
+ const [errors, setErrors] = (0, import_react36.useState)({});
9120
+ const [hasSubmitted, setHasSubmitted] = (0, import_react36.useState)(false);
9121
+ const innerRef = (0, import_react36.useRef)();
9122
+ const ref = forwardedRef ?? innerRef;
9123
+ const autoId = (0, import_react36.useId)();
9124
+ const id = props.id ?? autoId;
9125
+ const handleValidate = (nextFormData) => {
9126
+ const nextData = serializeFormData(nextFormData);
9127
+ if ((0, import_type_guards28.isUndefined)(validate)) {
9128
+ return {};
9129
+ }
9130
+ return validate(nextData);
9131
+ };
9132
+ const handleBlur2 = (event) => {
9133
+ if (props.onBlur) {
9134
+ props.onBlur(event);
9135
+ }
9136
+ const formData = new FormData(event.currentTarget);
9137
+ if ((0, import_type_guards28.isNotUndefined)(validate)) {
9138
+ handleValidate(formData);
9139
+ }
9140
+ };
9141
+ const handleSubmit = (event) => {
9142
+ event.preventDefault();
9143
+ const formData = new FormData(event.currentTarget);
9144
+ const nextErrors = handleValidate(formData);
9145
+ const isValid = Object.keys(nextErrors).length === 0;
9146
+ setErrors(nextErrors);
9147
+ setHasSubmitted(true);
9148
+ if (isValid && props.onSubmit) {
9149
+ props.onSubmit(event);
9150
+ }
9151
+ if (isValid && action) {
9152
+ void action(formData);
9153
+ }
9154
+ };
9155
+ const handleReset = (event) => {
9156
+ setErrors({});
9157
+ setHasSubmitted(false);
9158
+ if (props.onReset) {
9159
+ props.onReset(event);
9160
+ }
9161
+ if (action) {
9162
+ void action(null);
9163
+ }
9164
+ };
9165
+ const context = (0, import_react36.useMemo)(() => {
9166
+ return {
9167
+ values,
9168
+ errors,
9169
+ hasSubmitted,
9170
+ formId: id,
9171
+ labelPosition
9172
+ };
9173
+ }, [labelPosition, values, errors, id, hasSubmitted]);
9174
+ return (
9175
+ // @ts-expect-error - generic context providers are a giant pain
9176
+ /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
9177
+ Stack,
9178
+ {
9179
+ ...props,
9180
+ ref,
9181
+ $fullWidth: fullWidth,
9182
+ alignItems: fullWidth ? "stretch" : "flex-start",
9183
+ as: StyledForm,
9184
+ gap: "space-05",
9185
+ id,
9186
+ onBlur: handleBlur2,
9187
+ onReset: handleReset,
9188
+ onSubmit: handleSubmit,
9189
+ children
9190
+ }
9191
+ ) })
9192
+ );
9193
+ };
9194
+ FormComponent.displayName = "Form";
9195
+ var Form = (0, import_react36.forwardRef)(FormComponent);
9196
+
9197
+ // src/components/FormGroup/CheckboxGroup.tsx
9198
+ var import_jsx_runtime217 = require("react/jsx-runtime");
9199
+ var CheckboxGroupContext = (0, import_react37.createContext)(null);
9077
9200
  var useCheckboxGroup = () => {
9078
- return (0, import_react36.useContext)(CheckboxGroupContext);
9201
+ return (0, import_react37.useContext)(CheckboxGroupContext);
9079
9202
  };
9080
9203
  var CheckboxGroup = ({
9081
9204
  children,
@@ -9084,19 +9207,22 @@ var CheckboxGroup = ({
9084
9207
  value,
9085
9208
  ...props
9086
9209
  }) => {
9087
- const context = (0, import_react36.useMemo)(() => {
9210
+ const formState = (0, import_react37.useContext)(FormContext);
9211
+ const derivedValue = (0, import_type_guards29.isArray)(formState.values[name]) ? formState.values[name] : value;
9212
+ const context = (0, import_react37.useMemo)(() => {
9088
9213
  return {
9089
- name,
9090
- onChange
9214
+ name: `${name}[]`,
9215
+ onChange,
9216
+ value: derivedValue
9091
9217
  };
9092
- }, [name, onChange]);
9093
- return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(FormGroup, { ...props, children }) });
9218
+ }, [name, derivedValue, onChange]);
9219
+ return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(FormGroup, { ...props, children }) });
9094
9220
  };
9095
9221
  CheckboxGroup.displayName = "CheckboxGroup";
9096
9222
 
9097
9223
  // src/components/Checkbox/Checkbox.tsx
9098
- var import_jsx_runtime217 = require("react/jsx-runtime");
9099
- var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
9224
+ var import_jsx_runtime218 = require("react/jsx-runtime");
9225
+ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
9100
9226
  "svg",
9101
9227
  {
9102
9228
  fill: "inherit",
@@ -9104,7 +9230,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
9104
9230
  viewBox: "0 0 10 8",
9105
9231
  width: "10",
9106
9232
  xmlns: "http://www.w3.org/2000/svg",
9107
- children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
9233
+ children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
9108
9234
  "path",
9109
9235
  {
9110
9236
  d: "M3.47281 7.19303L0.377565 4.07999C0.191609 3.89297 0.191609 3.58973 0.377565 3.40268L1.05098 2.72537C1.23694 2.53833 1.53847 2.53833 1.72442 2.72537L3.80953 4.82245L8.27558 0.330729C8.46154 0.143704 8.76306 0.143704 8.94902 0.330729L9.62244 1.00804C9.8084 1.19506 9.8084 1.49831 9.62244 1.68535L4.14624 7.19305C3.96027 7.38008 3.65876 7.38008 3.47281 7.19303Z",
@@ -9113,7 +9239,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
9113
9239
  )
9114
9240
  }
9115
9241
  );
9116
- var sizeSmall = import_styled_components42.css`
9242
+ var sizeSmall = import_styled_components43.css`
9117
9243
  width: 14px;
9118
9244
  height: 14px;
9119
9245
  min-width: 14px;
@@ -9124,7 +9250,7 @@ var sizeSmall = import_styled_components42.css`
9124
9250
  height: 7px;
9125
9251
  }
9126
9252
  `;
9127
- var sizeMedium = import_styled_components42.css`
9253
+ var sizeMedium = import_styled_components43.css`
9128
9254
  width: 16px;
9129
9255
  height: 16px;
9130
9256
  min-width: 16px;
@@ -9135,7 +9261,7 @@ var sizeMedium = import_styled_components42.css`
9135
9261
  height: 9px;
9136
9262
  }
9137
9263
  `;
9138
- var sizeLarge = import_styled_components42.css`
9264
+ var sizeLarge = import_styled_components43.css`
9139
9265
  width: 20px;
9140
9266
  height: 20px;
9141
9267
  min-width: 20px;
@@ -9151,14 +9277,14 @@ var getSizeCss = (size) => {
9151
9277
  if (size === "lg") return sizeLarge;
9152
9278
  return sizeMedium;
9153
9279
  };
9154
- var StyledCheckboxWrapper = import_styled_components42.default.div`
9280
+ var StyledCheckboxWrapper = import_styled_components43.default.div`
9155
9281
  display: flex;
9156
9282
  margin: 0;
9157
9283
 
9158
9284
  /* TODO this solves a problem but potentially causes and a11y issue */
9159
9285
  user-select: none;
9160
9286
  `;
9161
- var StyledCheckboxInput = import_styled_components42.default.div`
9287
+ var StyledCheckboxInput = import_styled_components43.default.div`
9162
9288
  ${({ $size }) => getSizeCss($size)}
9163
9289
  line-height: 0;
9164
9290
  margin: 0;
@@ -9180,7 +9306,7 @@ var StyledCheckboxInput = import_styled_components42.default.div`
9180
9306
  }
9181
9307
  }
9182
9308
  `;
9183
- var StyledHiddenCheckboxInput = import_styled_components42.default.input`
9309
+ var StyledHiddenCheckboxInput = import_styled_components43.default.input`
9184
9310
  ${visuallyHiddenStyle}
9185
9311
 
9186
9312
  /* toggles display of faux-input background-color */
@@ -9194,7 +9320,7 @@ var StyledHiddenCheckboxInput = import_styled_components42.default.input`
9194
9320
  display: block;
9195
9321
  }
9196
9322
  `;
9197
- var Checkbox = (0, import_react37.forwardRef)(
9323
+ var Checkbox = (0, import_react38.forwardRef)(
9198
9324
  ({
9199
9325
  checked,
9200
9326
  disabled = false,
@@ -9209,20 +9335,22 @@ var Checkbox = (0, import_react37.forwardRef)(
9209
9335
  hideLabel = false,
9210
9336
  ...props
9211
9337
  }, ref) => {
9212
- const generatedId = (0, import_react37.useId)();
9213
- const computedId = (0, import_type_guards28.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
9338
+ const generatedId = (0, import_react38.useId)();
9339
+ const computedId = (0, import_type_guards30.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
9214
9340
  const checkboxGroupContext = useCheckboxGroup();
9215
9341
  const contextName = checkboxGroupContext?.name;
9216
9342
  const contextOnChange = checkboxGroupContext?.onChange;
9343
+ const contextValue = checkboxGroupContext?.value;
9217
9344
  const checkboxName = name ?? contextName;
9218
9345
  const handleOnChange = onChange ?? contextOnChange;
9219
- return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(StyledCheckboxWrapper, { disabled, children: [
9220
- /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
9346
+ const defaultChecked = (0, import_type_guards30.isNotUndefined)(value) && contextValue ? contextValue.includes(value) : void 0;
9347
+ return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(StyledCheckboxWrapper, { disabled, children: [
9348
+ /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
9221
9349
  StyledHiddenCheckboxInput,
9222
9350
  {
9223
9351
  ...props,
9224
9352
  ref,
9225
- checked,
9353
+ ...(0, import_type_guards30.isNotUndefined)(defaultChecked) ? { defaultChecked } : { checked },
9226
9354
  disabled,
9227
9355
  id: computedId,
9228
9356
  name: checkboxName,
@@ -9232,16 +9360,16 @@ var Checkbox = (0, import_react37.forwardRef)(
9232
9360
  value
9233
9361
  }
9234
9362
  ),
9235
- /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
9363
+ /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
9236
9364
  FormControlLabel,
9237
9365
  {
9238
- controlSlot: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
9366
+ controlSlot: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
9239
9367
  StyledCheckboxInput,
9240
9368
  {
9241
9369
  $disabled: disabled,
9242
9370
  $size: size,
9243
9371
  "data-wui-faux-input": "true",
9244
- children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(CheckIcon, {})
9372
+ children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(CheckIcon, {})
9245
9373
  }
9246
9374
  ),
9247
9375
  description,
@@ -9257,14 +9385,14 @@ var Checkbox = (0, import_react37.forwardRef)(
9257
9385
  Checkbox.displayName = "Checkbox";
9258
9386
 
9259
9387
  // src/components/ClickRegion/ClickRegion.tsx
9260
- var import_react38 = require("react");
9388
+ var import_react39 = require("react");
9261
9389
  var isClickableElement = (element) => {
9262
9390
  if (!element) return false;
9263
9391
  const el = element;
9264
9392
  return el.closest("button") !== null || el.closest("a") !== null || el.closest("input") !== null || el.closest("select") !== null || el.closest("textarea") !== null || el.closest("label") !== null || el.closest("[data-wui-faux-input]") !== null;
9265
9393
  };
9266
9394
  var ClickRegion = ({ children, targetRef }) => {
9267
- (0, import_react38.useEffect)(() => {
9395
+ (0, import_react39.useEffect)(() => {
9268
9396
  if (targetRef.current && targetRef.current.tagName === "A") {
9269
9397
  targetRef.current.setAttribute("data-click-region-target-link", "");
9270
9398
  } else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
@@ -9272,7 +9400,7 @@ var ClickRegion = ({ children, targetRef }) => {
9272
9400
  } else {
9273
9401
  }
9274
9402
  }, [targetRef]);
9275
- const handleClick = (0, import_react38.useCallback)(
9403
+ const handleClick = (0, import_react39.useCallback)(
9276
9404
  (event) => {
9277
9405
  const node = targetRef.current;
9278
9406
  if (event.target === node) {
@@ -9292,7 +9420,7 @@ var ClickRegion = ({ children, targetRef }) => {
9292
9420
  },
9293
9421
  [targetRef]
9294
9422
  );
9295
- return (0, import_react38.cloneElement)(import_react38.Children.only(children), {
9423
+ return (0, import_react39.cloneElement)(import_react39.Children.only(children), {
9296
9424
  "data-click-region": true,
9297
9425
  onClick: handleClick
9298
9426
  });
@@ -9301,10 +9429,10 @@ ClickRegion.displayName = "ClickRegion";
9301
9429
 
9302
9430
  // src/components/Collapsible/Collapsible.tsx
9303
9431
  var import_react_collapsible = require("@radix-ui/react-collapsible");
9304
- var import_type_guards29 = require("@wistia/type-guards");
9305
- var import_styled_components43 = __toESM(require("styled-components"));
9306
- var import_jsx_runtime218 = require("react/jsx-runtime");
9307
- var StyledRoot = (0, import_styled_components43.default)(import_react_collapsible.Root)`
9432
+ var import_type_guards31 = require("@wistia/type-guards");
9433
+ var import_styled_components44 = __toESM(require("styled-components"));
9434
+ var import_jsx_runtime219 = require("react/jsx-runtime");
9435
+ var StyledRoot = (0, import_styled_components44.default)(import_react_collapsible.Root)`
9308
9436
  &[data-state='closed'] [data-wui-collapsible-content] {
9309
9437
  display: -webkit-box;
9310
9438
  -webkit-box-orient: vertical;
@@ -9318,18 +9446,18 @@ var Collapsible = ({
9318
9446
  onOpenChange
9319
9447
  }) => {
9320
9448
  const controlProps = {
9321
- ...(0, import_type_guards29.isNotNil)(onOpenChange) && (0, import_type_guards29.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
9449
+ ...(0, import_type_guards31.isNotNil)(onOpenChange) && (0, import_type_guards31.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
9322
9450
  };
9323
- return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(StyledRoot, { ...controlProps, children });
9451
+ return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(StyledRoot, { ...controlProps, children });
9324
9452
  };
9325
9453
  Collapsible.displayName = "Collapsible";
9326
9454
 
9327
9455
  // src/components/Collapsible/CollapsibleTrigger.tsx
9328
- var import_react39 = require("react");
9456
+ var import_react40 = require("react");
9329
9457
  var import_react_collapsible2 = require("@radix-ui/react-collapsible");
9330
- var import_styled_components44 = __toESM(require("styled-components"));
9331
- var import_jsx_runtime219 = require("react/jsx-runtime");
9332
- var StyledTrigger = (0, import_styled_components44.default)(import_react_collapsible2.Trigger)`
9458
+ var import_styled_components45 = __toESM(require("styled-components"));
9459
+ var import_jsx_runtime220 = require("react/jsx-runtime");
9460
+ var StyledTrigger = (0, import_styled_components45.default)(import_react_collapsible2.Trigger)`
9333
9461
  [data-wui-collapsible-icon] {
9334
9462
  transition: transform var(--wui-motion-duration-03) ease-in-out;
9335
9463
  }
@@ -9351,12 +9479,12 @@ var StyledTrigger = (0, import_styled_components44.default)(import_react_collaps
9351
9479
  }
9352
9480
  `;
9353
9481
  var CollapsibleTrigger = ({ children }) => {
9354
- import_react39.Children.only(children);
9355
- return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(StyledTrigger, { asChild: true, children });
9482
+ import_react40.Children.only(children);
9483
+ return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(StyledTrigger, { asChild: true, children });
9356
9484
  };
9357
9485
 
9358
9486
  // src/components/Collapsible/CollapsibleTriggerIcon.tsx
9359
- var import_jsx_runtime220 = require("react/jsx-runtime");
9487
+ var import_jsx_runtime221 = require("react/jsx-runtime");
9360
9488
  var iconRotationMap = {
9361
9489
  "caret-left-strong": "-90",
9362
9490
  "caret-left": "-90",
@@ -9365,7 +9493,7 @@ var iconRotationMap = {
9365
9493
  plus: "45"
9366
9494
  };
9367
9495
  var CollapsibleTriggerIcon = ({ type, ...props }) => {
9368
- return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
9496
+ return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9369
9497
  Icon,
9370
9498
  {
9371
9499
  ...props,
@@ -9378,16 +9506,16 @@ var CollapsibleTriggerIcon = ({ type, ...props }) => {
9378
9506
  CollapsibleTriggerIcon.displayName = "CollapsibleTriggerIcon";
9379
9507
 
9380
9508
  // src/components/Collapsible/CollapsibleContent.tsx
9381
- var import_styled_components45 = __toESM(require("styled-components"));
9509
+ var import_styled_components46 = __toESM(require("styled-components"));
9382
9510
  var import_react_collapsible3 = require("@radix-ui/react-collapsible");
9383
- var import_type_guards30 = require("@wistia/type-guards");
9384
- var import_jsx_runtime221 = require("react/jsx-runtime");
9385
- var ClampedContent = import_styled_components45.default.div`
9511
+ var import_type_guards32 = require("@wistia/type-guards");
9512
+ var import_jsx_runtime222 = require("react/jsx-runtime");
9513
+ var ClampedContent = import_styled_components46.default.div`
9386
9514
  --wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
9387
9515
  `;
9388
9516
  var CollapsibleContent = ({ clamp, children }) => {
9389
- if ((0, import_type_guards30.isNotUndefined)(clamp)) {
9390
- return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9517
+ if ((0, import_type_guards32.isNotUndefined)(clamp)) {
9518
+ return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
9391
9519
  ClampedContent,
9392
9520
  {
9393
9521
  $clamp: clamp,
@@ -9396,7 +9524,7 @@ var CollapsibleContent = ({ clamp, children }) => {
9396
9524
  }
9397
9525
  );
9398
9526
  }
9399
- return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(import_react_collapsible3.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(import_jsx_runtime221.Fragment, { children: [
9527
+ return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_react_collapsible3.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(import_jsx_runtime222.Fragment, { children: [
9400
9528
  children,
9401
9529
  " "
9402
9530
  ] }) });
@@ -9404,16 +9532,16 @@ var CollapsibleContent = ({ clamp, children }) => {
9404
9532
 
9405
9533
  // src/components/Combobox/Combobox.tsx
9406
9534
  var Ariakit = __toESM(require("@ariakit/react"));
9407
- var import_react41 = require("react");
9535
+ var import_react42 = require("react");
9408
9536
  var import_match_sorter = require("match-sorter");
9409
- var import_styled_components48 = __toESM(require("styled-components"));
9537
+ var import_styled_components49 = __toESM(require("styled-components"));
9410
9538
 
9411
9539
  // src/components/Tag/Tag.tsx
9412
- var import_react40 = require("react");
9413
- var import_styled_components46 = __toESM(require("styled-components"));
9414
- var import_type_guards31 = require("@wistia/type-guards");
9415
- var import_jsx_runtime222 = require("react/jsx-runtime");
9416
- var TagLabel = import_styled_components46.default.a`
9540
+ var import_react41 = require("react");
9541
+ var import_styled_components47 = __toESM(require("styled-components"));
9542
+ var import_type_guards33 = require("@wistia/type-guards");
9543
+ var import_jsx_runtime223 = require("react/jsx-runtime");
9544
+ var TagLabel = import_styled_components47.default.a`
9417
9545
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
9418
9546
  font-size: var(--wui-typography-label-4-size);
9419
9547
  font-weight: var(--wui-typography-label-4-weight);
@@ -9431,31 +9559,31 @@ var TagLabel = import_styled_components46.default.a`
9431
9559
  width: 12px;
9432
9560
  }
9433
9561
 
9434
- :not(:only-child) {
9562
+ &:focus-visible {
9563
+ outline: unset;
9564
+ box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
9565
+ }
9566
+
9567
+ &:not(:only-child) {
9435
9568
  padding-right: var(--wui-space-01);
9436
9569
  }
9437
9570
 
9438
- :is(a):hover {
9571
+ &:is(a):hover {
9439
9572
  background: var(--wui-color-bg-surface-secondary-hover);
9440
9573
  }
9441
9574
 
9442
- :is(a):active {
9575
+ &:is(a):active {
9443
9576
  background: var(--wui-color-bg-surface-secondary-active);
9444
9577
  }
9445
-
9446
- :focus-visible {
9447
- outline: unset;
9448
- box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
9449
- }
9450
9578
  `;
9451
- var TagDivider = import_styled_components46.default.div`
9579
+ var TagDivider = import_styled_components47.default.div`
9452
9580
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
9453
9581
  border-left: 1px solid var(--wui-color-border);
9454
9582
  display: flex;
9455
9583
  height: 14px;
9456
9584
  width: 1px;
9457
9585
  `;
9458
- var StyledRemoveButton = import_styled_components46.default.button`
9586
+ var StyledRemoveButton = import_styled_components47.default.button`
9459
9587
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
9460
9588
  all: unset;
9461
9589
  cursor: pointer;
@@ -9470,20 +9598,20 @@ var StyledRemoveButton = import_styled_components46.default.button`
9470
9598
  fill: var(--wui-color-icon);
9471
9599
  }
9472
9600
 
9473
- :hover {
9601
+ &:hover {
9474
9602
  background: var(--wui-color-bg-surface-secondary-hover);
9475
9603
  }
9476
9604
 
9477
- :active {
9605
+ &:active {
9478
9606
  background: var(--wui-color-bg-surface-secondary-active);
9479
9607
  }
9480
9608
 
9481
- :focus-visible {
9609
+ &:focus-visible {
9482
9610
  outline: unset;
9483
9611
  box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
9484
9612
  }
9485
9613
  `;
9486
- var StyledTag = import_styled_components46.default.div`
9614
+ var StyledTag = import_styled_components47.default.div`
9487
9615
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
9488
9616
  align-items: center;
9489
9617
  background-color: var(--wui-color-bg-surface-secondary);
@@ -9496,48 +9624,48 @@ var StyledTag = import_styled_components46.default.div`
9496
9624
  }
9497
9625
  `;
9498
9626
  var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
9499
- if ((0, import_type_guards31.isNil)(onClickRemove)) {
9627
+ if ((0, import_type_guards33.isNil)(onClickRemove)) {
9500
9628
  return null;
9501
9629
  }
9502
- if ((0, import_type_guards31.isNil)(onClickRemoveLabel)) {
9630
+ if ((0, import_type_guards33.isNil)(onClickRemoveLabel)) {
9503
9631
  throw new Error(
9504
9632
  "for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
9505
9633
  );
9506
9634
  }
9507
- return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(import_jsx_runtime222.Fragment, { children: [
9508
- /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(TagDivider, { $colorScheme: colorScheme }),
9509
- /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(
9635
+ return /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(import_jsx_runtime223.Fragment, { children: [
9636
+ /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(TagDivider, { $colorScheme: colorScheme }),
9637
+ /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(
9510
9638
  StyledRemoveButton,
9511
9639
  {
9512
9640
  $colorScheme: colorScheme,
9513
9641
  onClick: onClickRemove,
9514
9642
  type: "button",
9515
9643
  children: [
9516
- /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
9644
+ /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
9517
9645
  Icon,
9518
9646
  {
9519
9647
  size: "sm",
9520
9648
  type: "close"
9521
9649
  }
9522
9650
  ),
9523
- /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
9651
+ /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
9524
9652
  ]
9525
9653
  }
9526
9654
  )
9527
9655
  ] });
9528
9656
  };
9529
- var Tag = (0, import_react40.forwardRef)(
9657
+ var Tag = (0, import_react41.forwardRef)(
9530
9658
  ({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
9531
- const hasIcon = (0, import_type_guards31.isNotNil)(icon);
9532
- const labelProps = (0, import_type_guards31.isNotNil)(href) && (0, import_type_guards31.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
9533
- return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(
9659
+ const hasIcon = (0, import_type_guards33.isNotNil)(icon);
9660
+ const labelProps = (0, import_type_guards33.isNotNil)(href) && (0, import_type_guards33.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
9661
+ return /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(
9534
9662
  StyledTag,
9535
9663
  {
9536
9664
  ref,
9537
9665
  $colorScheme: colorScheme,
9538
9666
  ...props,
9539
9667
  children: [
9540
- /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(
9668
+ /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(
9541
9669
  TagLabel,
9542
9670
  {
9543
9671
  ...labelProps,
@@ -9548,7 +9676,7 @@ var Tag = (0, import_react40.forwardRef)(
9548
9676
  ]
9549
9677
  }
9550
9678
  ),
9551
- /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
9679
+ /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
9552
9680
  RemoveButton,
9553
9681
  {
9554
9682
  colorScheme,
@@ -9564,8 +9692,8 @@ var Tag = (0, import_react40.forwardRef)(
9564
9692
  Tag.displayName = "Tag";
9565
9693
 
9566
9694
  // src/css/inputCss.ts
9567
- var import_styled_components47 = require("styled-components");
9568
- var inputCss = import_styled_components47.css`
9695
+ var import_styled_components48 = require("styled-components");
9696
+ var inputCss = import_styled_components48.css`
9569
9697
  /* Colors */
9570
9698
  --wui-input-color-bg: var(--wui-color-bg-surface);
9571
9699
  --wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
@@ -9591,8 +9719,8 @@ var inputCss = import_styled_components47.css`
9591
9719
  `;
9592
9720
 
9593
9721
  // src/components/Combobox/Combobox.tsx
9594
- var import_jsx_runtime223 = require("react/jsx-runtime");
9595
- var ComboboxWapper = import_styled_components48.default.div`
9722
+ var import_jsx_runtime224 = require("react/jsx-runtime");
9723
+ var ComboboxWapper = import_styled_components49.default.div`
9596
9724
  ${inputCss};
9597
9725
  width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
9598
9726
  padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
@@ -9641,7 +9769,7 @@ var ComboboxWapper = import_styled_components48.default.div`
9641
9769
  }
9642
9770
  }
9643
9771
  `;
9644
- var ComboboxInput = (0, import_styled_components48.default)(Ariakit.Combobox)`
9772
+ var ComboboxInput = (0, import_styled_components49.default)(Ariakit.Combobox)`
9645
9773
  appearance: none;
9646
9774
  padding: 0;
9647
9775
  width: 100%;
@@ -9656,7 +9784,7 @@ var ComboboxInput = (0, import_styled_components48.default)(Ariakit.Combobox)`
9656
9784
  outline-width: 2px;
9657
9785
  }
9658
9786
  `;
9659
- var ComboboxPopover = (0, import_styled_components48.default)(Ariakit.Popover)`
9787
+ var ComboboxPopover = (0, import_styled_components49.default)(Ariakit.Popover)`
9660
9788
  --wui-combobox-content-border: var(--wui-color-border);
9661
9789
  --wui-combobox-content-bg: var(--wui-color-bg-surface);
9662
9790
  --wui-combobox-content-border-radius: var(--wui-border-radius-02);
@@ -9681,7 +9809,7 @@ var ComboboxPopover = (0, import_styled_components48.default)(Ariakit.Popover)`
9681
9809
  --item-opacity: 0.5;
9682
9810
  }
9683
9811
  `;
9684
- var ComboboxItem2 = (0, import_styled_components48.default)(Ariakit.ComboboxItem)`
9812
+ var ComboboxItem2 = (0, import_styled_components49.default)(Ariakit.ComboboxItem)`
9685
9813
  ${variantStyleMap2.body3};
9686
9814
  display: flex;
9687
9815
  padding: var(--wui-combobox-option-padding);
@@ -9706,12 +9834,12 @@ var ComboboxItem2 = (0, import_styled_components48.default)(Ariakit.ComboboxItem
9706
9834
  background-color: transparent;
9707
9835
  }
9708
9836
  `;
9709
- var NoResults = import_styled_components48.default.div`
9837
+ var NoResults = import_styled_components49.default.div`
9710
9838
  gap: var(--wui-space-02);
9711
9839
  `;
9712
9840
  var POPOVER_WIDTH_OFFSET = 20;
9713
9841
  var ComboboxOption = ({ value, children }) => {
9714
- return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
9842
+ return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
9715
9843
  ComboboxItem2,
9716
9844
  {
9717
9845
  className: "combobox-item",
@@ -9723,8 +9851,8 @@ var ComboboxOption = ({ value, children }) => {
9723
9851
  };
9724
9852
  var extractOptions = (children) => {
9725
9853
  const options = {};
9726
- import_react41.Children.forEach(children, (child) => {
9727
- if ((0, import_react41.isValidElement)(child) && "value" in child.props && "children" in child.props) {
9854
+ import_react42.Children.forEach(children, (child) => {
9855
+ if ((0, import_react42.isValidElement)(child) && "value" in child.props && "children" in child.props) {
9728
9856
  options[child.props.value] = child.props.children ?? child.props.value;
9729
9857
  }
9730
9858
  });
@@ -9739,11 +9867,11 @@ var Combobox2 = ({
9739
9867
  children,
9740
9868
  fullWidth = true
9741
9869
  }) => {
9742
- const [isPending, startTransition] = (0, import_react41.useTransition)();
9743
- const [wrapperWidth, setWrapperWidth] = (0, import_react41.useState)("auto");
9744
- const comboboxWrapperRef = (0, import_react41.useRef)(null);
9745
- const options = (0, import_react41.useMemo)(() => extractOptions(children), [children]);
9746
- (0, import_react41.useEffect)(() => {
9870
+ const [isPending, startTransition] = (0, import_react42.useTransition)();
9871
+ const [wrapperWidth, setWrapperWidth] = (0, import_react42.useState)("auto");
9872
+ const comboboxWrapperRef = (0, import_react42.useRef)(null);
9873
+ const options = (0, import_react42.useMemo)(() => extractOptions(children), [children]);
9874
+ (0, import_react42.useEffect)(() => {
9747
9875
  const comboboxWrapper = comboboxWrapperRef.current;
9748
9876
  if (comboboxWrapper) {
9749
9877
  const updateWidthVariable = () => {
@@ -9761,10 +9889,10 @@ var Combobox2 = ({
9761
9889
  const handleRemoveValue = (valueToRemove) => {
9762
9890
  onChange(value.filter((val) => val !== valueToRemove));
9763
9891
  };
9764
- const matches = (0, import_react41.useMemo)(() => {
9892
+ const matches = (0, import_react42.useMemo)(() => {
9765
9893
  return (0, import_match_sorter.matchSorter)(Object.keys(options), searchValue);
9766
9894
  }, [options, searchValue]);
9767
- return /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(
9895
+ return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
9768
9896
  Ariakit.ComboboxProvider,
9769
9897
  {
9770
9898
  selectedValue: value,
@@ -9775,13 +9903,13 @@ var Combobox2 = ({
9775
9903
  });
9776
9904
  },
9777
9905
  children: [
9778
- /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(
9906
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
9779
9907
  ComboboxWapper,
9780
9908
  {
9781
9909
  ref: comboboxWrapperRef,
9782
9910
  $fullWidth: fullWidth,
9783
9911
  children: [
9784
- value.map((selectedValue) => /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
9912
+ value.map((selectedValue) => /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
9785
9913
  Tag,
9786
9914
  {
9787
9915
  href: "https://example.com",
@@ -9791,11 +9919,11 @@ var Combobox2 = ({
9791
9919
  },
9792
9920
  selectedValue
9793
9921
  )),
9794
- /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(ComboboxInput, { placeholder })
9922
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(ComboboxInput, { placeholder })
9795
9923
  ]
9796
9924
  }
9797
9925
  ),
9798
- /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(
9926
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
9799
9927
  ComboboxPopover,
9800
9928
  {
9801
9929
  "aria-busy": isPending,
@@ -9805,14 +9933,14 @@ var Combobox2 = ({
9805
9933
  width: wrapperWidth
9806
9934
  },
9807
9935
  children: [
9808
- matches.map((match) => /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(
9936
+ matches.map((match) => /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
9809
9937
  ComboboxItem2,
9810
9938
  {
9811
9939
  className: "combobox-item",
9812
9940
  focusOnHover: true,
9813
9941
  value: match,
9814
9942
  children: [
9815
- /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
9943
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
9816
9944
  Icon,
9817
9945
  {
9818
9946
  size: "sm",
@@ -9827,7 +9955,7 @@ var Combobox2 = ({
9827
9955
  },
9828
9956
  match
9829
9957
  )),
9830
- !matches.length && /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(NoResults, { children: "No results found" })
9958
+ !matches.length && /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(NoResults, { children: "No results found" })
9831
9959
  ]
9832
9960
  }
9833
9961
  )
@@ -9837,11 +9965,11 @@ var Combobox2 = ({
9837
9965
  };
9838
9966
 
9839
9967
  // src/components/DataCards/DataCard.tsx
9840
- var import_react42 = require("react");
9841
- var import_styled_components49 = __toESM(require("styled-components"));
9842
- var import_type_guards32 = require("@wistia/type-guards");
9843
- var import_jsx_runtime224 = require("react/jsx-runtime");
9844
- var StyledDataCard = import_styled_components49.default.div`
9968
+ var import_react43 = require("react");
9969
+ var import_styled_components50 = __toESM(require("styled-components"));
9970
+ var import_type_guards34 = require("@wistia/type-guards");
9971
+ var import_jsx_runtime225 = require("react/jsx-runtime");
9972
+ var StyledDataCard = import_styled_components50.default.div`
9845
9973
  display: grid;
9846
9974
  grid-template-areas: 'label slot' 'value value';
9847
9975
  grid-template-rows: auto auto;
@@ -9896,7 +10024,7 @@ var StyledDataCard = import_styled_components49.default.div`
9896
10024
  ${({ $colorScheme }) => getColorScheme($colorScheme)}
9897
10025
  }
9898
10026
  `;
9899
- var shimmer = import_styled_components49.keyframes`
10027
+ var shimmer = import_styled_components50.keyframes`
9900
10028
  0% {
9901
10029
  background-position: 200% 0;
9902
10030
  }
@@ -9904,7 +10032,7 @@ var shimmer = import_styled_components49.keyframes`
9904
10032
  background-position: -200% 0;
9905
10033
  }
9906
10034
  `;
9907
- var LoadingBackground = import_styled_components49.default.div`
10035
+ var LoadingBackground = import_styled_components50.default.div`
9908
10036
  background: linear-gradient(
9909
10037
  90deg,
9910
10038
  var(--wui-color-bg-surface-tertiary) 25%,
@@ -9915,27 +10043,27 @@ var LoadingBackground = import_styled_components49.default.div`
9915
10043
  animation: ${shimmer} 1.5s infinite;
9916
10044
  border-radius: var(--wui-border-radius-01);
9917
10045
  `;
9918
- var StyledLoadingLabel = (0, import_styled_components49.default)(LoadingBackground)`
10046
+ var StyledLoadingLabel = (0, import_styled_components50.default)(LoadingBackground)`
9919
10047
  width: 80px;
9920
10048
  height: var(--wui-typography-heading-6-line-height);
9921
10049
  `;
9922
- var StyledLoadingValue = (0, import_styled_components49.default)(LoadingBackground)`
10050
+ var StyledLoadingValue = (0, import_styled_components50.default)(LoadingBackground)`
9923
10051
  width: 90%;
9924
10052
  height: var(--wui-typography-heading-3-line-height);
9925
10053
  `;
9926
- var StyledLabel2 = (0, import_styled_components49.default)(Heading)`
10054
+ var StyledLabel2 = (0, import_styled_components50.default)(Heading)`
9927
10055
  grid-area: label;
9928
10056
  `;
9929
- var StyledValue = (0, import_styled_components49.default)(Heading)`
10057
+ var StyledValue = (0, import_styled_components50.default)(Heading)`
9930
10058
  grid-area: value;
9931
10059
  `;
9932
- var StyledSlot = import_styled_components49.default.div`
10060
+ var StyledSlot = import_styled_components50.default.div`
9933
10061
  display: flex;
9934
10062
  justify-content: flex-end;
9935
10063
  grid-area: slot;
9936
10064
  align-self: center;
9937
10065
  `;
9938
- var StyledDataCardTrendContainer = import_styled_components49.default.div`
10066
+ var StyledDataCardTrendContainer = import_styled_components50.default.div`
9939
10067
  position: absolute;
9940
10068
  bottom: var(--wui-space-01);
9941
10069
  right: var(--wui-space-01);
@@ -9948,34 +10076,34 @@ var DataCardInner = ({
9948
10076
  isLoading = false,
9949
10077
  trend,
9950
10078
  ...props
9951
- }) => /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
10079
+ }) => /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
9952
10080
  StyledDataCard,
9953
10081
  {
9954
10082
  $colorScheme: colorScheme,
9955
10083
  ...props,
9956
10084
  children: [
9957
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
10085
+ /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
9958
10086
  StyledLabel2,
9959
10087
  {
9960
10088
  renderAs: "dt",
9961
10089
  variant: "heading6",
9962
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(StyledLoadingLabel, {}) : label
10090
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(StyledLoadingLabel, {}) : label
9963
10091
  }
9964
10092
  ),
9965
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
10093
+ /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
9966
10094
  StyledValue,
9967
10095
  {
9968
10096
  renderAs: "dd",
9969
10097
  variant: "heading3",
9970
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(StyledLoadingValue, {}) : value
10098
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(StyledLoadingValue, {}) : value
9971
10099
  }
9972
10100
  ),
9973
- (0, import_type_guards32.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(StyledSlot, { children: upperRightSlot }),
9974
- (0, import_type_guards32.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(StyledDataCardTrendContainer, { children: trend })
10101
+ (0, import_type_guards34.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(StyledSlot, { children: upperRightSlot }),
10102
+ (0, import_type_guards34.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(StyledDataCardTrendContainer, { children: trend })
9975
10103
  ]
9976
10104
  }
9977
10105
  );
9978
- var DataCardArrowIcon = /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
10106
+ var DataCardArrowIcon = /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
9979
10107
  Icon,
9980
10108
  {
9981
10109
  "data-wui-data-card-hover-icon": true,
@@ -9983,18 +10111,18 @@ var DataCardArrowIcon = /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
9983
10111
  }
9984
10112
  );
9985
10113
  var DataCard = (props) => {
9986
- const ref = (0, import_react42.useRef)(null);
9987
- if ((0, import_type_guards32.isNotNil)(props.href) || (0, import_type_guards32.isNotNil)(props.onClick)) {
9988
- return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
10114
+ const ref = (0, import_react43.useRef)(null);
10115
+ if ((0, import_type_guards34.isNotNil)(props.href) || (0, import_type_guards34.isNotNil)(props.onClick)) {
10116
+ return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
9989
10117
  DataCardInner,
9990
10118
  {
9991
10119
  upperRightSlot: props.upperRightSlot ?? DataCardArrowIcon,
9992
10120
  ...props,
9993
- label: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
10121
+ label: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
9994
10122
  Button,
9995
10123
  {
9996
10124
  ref,
9997
- ...(0, import_type_guards32.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
10125
+ ...(0, import_type_guards34.isNotNil)(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
9998
10126
  disabled: props.disabled ?? false,
9999
10127
  href: props.href,
10000
10128
  onClick: props.onClick,
@@ -10005,14 +10133,14 @@ var DataCard = (props) => {
10005
10133
  }
10006
10134
  ) });
10007
10135
  }
10008
- return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(DataCardInner, { ...props });
10136
+ return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(DataCardInner, { ...props });
10009
10137
  };
10010
10138
  DataCard.displayName = "DataCard";
10011
10139
 
10012
10140
  // src/components/DataCards/DataCards.tsx
10013
- var import_styled_components50 = __toESM(require("styled-components"));
10014
- var import_jsx_runtime225 = require("react/jsx-runtime");
10015
- var StyledDataCards = (0, import_styled_components50.default)(Box)`
10141
+ var import_styled_components51 = __toESM(require("styled-components"));
10142
+ var import_jsx_runtime226 = require("react/jsx-runtime");
10143
+ var StyledDataCards = (0, import_styled_components51.default)(Box)`
10016
10144
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
10017
10145
  margin-top: 0; /* Remove default <dl> style */
10018
10146
  > * {
@@ -10026,7 +10154,7 @@ var DataCards = ({
10026
10154
  colorScheme = "inherit",
10027
10155
  ...props
10028
10156
  }) => {
10029
- return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
10157
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
10030
10158
  StyledDataCards,
10031
10159
  {
10032
10160
  ...props,
@@ -10044,9 +10172,9 @@ var DataCards = ({
10044
10172
  DataCards.displayName = "DataCards";
10045
10173
 
10046
10174
  // src/components/DataCards/DataCardTrend.tsx
10047
- var import_styled_components51 = __toESM(require("styled-components"));
10048
- var import_jsx_runtime226 = require("react/jsx-runtime");
10049
- var StyledDataCardTrend = import_styled_components51.default.div`
10175
+ var import_styled_components52 = __toESM(require("styled-components"));
10176
+ var import_jsx_runtime227 = require("react/jsx-runtime");
10177
+ var StyledDataCardTrend = import_styled_components52.default.div`
10050
10178
  ${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
10051
10179
  background: var(--wui-color-bg-app);
10052
10180
  border-radius: var(--wui-border-radius-rounded);
@@ -10061,8 +10189,8 @@ var DataCardTrend = ({
10061
10189
  children,
10062
10190
  ...props
10063
10191
  }) => {
10064
- return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
10065
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
10192
+ return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
10193
+ /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
10066
10194
  Icon,
10067
10195
  {
10068
10196
  size: "md",
@@ -10070,7 +10198,7 @@ var DataCardTrend = ({
10070
10198
  ...props
10071
10199
  }
10072
10200
  ),
10073
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
10201
+ /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
10074
10202
  Text,
10075
10203
  {
10076
10204
  prominence: "secondary",
@@ -10082,22 +10210,22 @@ var DataCardTrend = ({
10082
10210
  };
10083
10211
 
10084
10212
  // src/components/Divider/Divider.tsx
10085
- var import_styled_components52 = __toESM(require("styled-components"));
10086
- var import_jsx_runtime227 = require("react/jsx-runtime");
10087
- var horizontalBorderCss = import_styled_components52.css`
10213
+ var import_styled_components53 = __toESM(require("styled-components"));
10214
+ var import_jsx_runtime228 = require("react/jsx-runtime");
10215
+ var horizontalBorderCss = import_styled_components53.css`
10088
10216
  border-top-color: var(--wui-color-border);
10089
10217
  border-top-style: solid;
10090
10218
  border-top-width: 1px;
10091
10219
  clear: both; /* for horizontal dividers, ensure it clears any floats */
10092
10220
  height: 0;
10093
10221
  `;
10094
- var verticalBorderCss = import_styled_components52.css`
10222
+ var verticalBorderCss = import_styled_components53.css`
10095
10223
  background-color: var(--wui-color-border);
10096
10224
  max-width: 1px;
10097
10225
  min-height: 100%;
10098
10226
  width: 1px;
10099
10227
  `;
10100
- var DividerComponent = import_styled_components52.default.div`
10228
+ var DividerComponent = import_styled_components53.default.div`
10101
10229
  ${({ $orientation }) => {
10102
10230
  switch ($orientation) {
10103
10231
  case "vertical":
@@ -10109,7 +10237,7 @@ var DividerComponent = import_styled_components52.default.div`
10109
10237
  }}
10110
10238
  `;
10111
10239
  var Divider = ({ orientation = "horizontal", ...props }) => {
10112
- return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
10240
+ return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
10113
10241
  DividerComponent,
10114
10242
  {
10115
10243
  $orientation: orientation,
@@ -10122,14 +10250,14 @@ var Divider = ({ orientation = "horizontal", ...props }) => {
10122
10250
  Divider.displayName = "Divider";
10123
10251
 
10124
10252
  // src/components/EditableHeading/EditableHeading.tsx
10125
- var import_styled_components55 = __toESM(require("styled-components"));
10126
- var import_react44 = require("react");
10253
+ var import_styled_components56 = __toESM(require("styled-components"));
10254
+ var import_react45 = require("react");
10127
10255
 
10128
10256
  // src/components/Tooltip/Tooltip.tsx
10129
10257
  var import_react_tooltip2 = require("@radix-ui/react-tooltip");
10130
- var import_styled_components53 = __toESM(require("styled-components"));
10131
- var import_jsx_runtime228 = require("react/jsx-runtime");
10132
- var hide = import_styled_components53.keyframes`
10258
+ var import_styled_components54 = __toESM(require("styled-components"));
10259
+ var import_jsx_runtime229 = require("react/jsx-runtime");
10260
+ var hide = import_styled_components54.keyframes`
10133
10261
  from {
10134
10262
  opacity: 1;
10135
10263
  }
@@ -10137,7 +10265,7 @@ var hide = import_styled_components53.keyframes`
10137
10265
  opacity: 0;
10138
10266
  }
10139
10267
  `;
10140
- var slideDownAndFade = import_styled_components53.keyframes`
10268
+ var slideDownAndFade = import_styled_components54.keyframes`
10141
10269
  from {
10142
10270
  opacity: 0;
10143
10271
  transform: translateY(-6px);
@@ -10147,7 +10275,7 @@ var slideDownAndFade = import_styled_components53.keyframes`
10147
10275
  transform: translateY(0);
10148
10276
  }
10149
10277
  `;
10150
- var slideLeftAndFade = import_styled_components53.keyframes`
10278
+ var slideLeftAndFade = import_styled_components54.keyframes`
10151
10279
  from {
10152
10280
  opacity: 0;
10153
10281
  transform: translateX(6px);
@@ -10157,7 +10285,7 @@ var slideLeftAndFade = import_styled_components53.keyframes`
10157
10285
  transform: translateX(0);
10158
10286
  }
10159
10287
  `;
10160
- var slideUpAndFade = import_styled_components53.keyframes`
10288
+ var slideUpAndFade = import_styled_components54.keyframes`
10161
10289
  from {
10162
10290
  opacity: 0;
10163
10291
  transform: translateY(6px);
@@ -10167,7 +10295,7 @@ var slideUpAndFade = import_styled_components53.keyframes`
10167
10295
  transform: translateY(0);
10168
10296
  }
10169
10297
  `;
10170
- var slideRightAndFade = import_styled_components53.keyframes`
10298
+ var slideRightAndFade = import_styled_components54.keyframes`
10171
10299
  from {
10172
10300
  opacity: 0;
10173
10301
  transform: translateX(-6px);
@@ -10177,7 +10305,7 @@ var slideRightAndFade = import_styled_components53.keyframes`
10177
10305
  transform: translateX(0);
10178
10306
  }
10179
10307
  `;
10180
- var StyledContent = (0, import_styled_components53.default)(import_react_tooltip2.Content)`
10308
+ var StyledContent = (0, import_styled_components54.default)(import_react_tooltip2.Content)`
10181
10309
  --tooltip-font-family: var(--wui-typography-family-default);
10182
10310
  --tooltip-border-radius: var(--wui-border-radius-05);
10183
10311
  --tooltip-bg: var(--wui-color-bg-tooltip);
@@ -10239,21 +10367,21 @@ var Tooltip = ({
10239
10367
  if (forceOpen === true) {
10240
10368
  rootProps.open = true;
10241
10369
  }
10242
- return /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(
10370
+ return /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(
10243
10371
  import_react_tooltip2.Root,
10244
10372
  {
10245
10373
  delayDuration: delay,
10246
10374
  ...rootProps,
10247
10375
  children: [
10248
- /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
10249
- /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(
10376
+ /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
10377
+ /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(
10250
10378
  StyledContent,
10251
10379
  {
10252
10380
  side: direction,
10253
10381
  sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
10254
10382
  children: [
10255
10383
  content,
10256
- !hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
10384
+ !hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
10257
10385
  "svg",
10258
10386
  {
10259
10387
  fill: "var(--tooltip-bg)",
@@ -10262,7 +10390,7 @@ var Tooltip = ({
10262
10390
  viewBox: "0 0 12 8",
10263
10391
  width: "12",
10264
10392
  xmlns: "http://www.w3.org/2000/svg",
10265
- children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
10393
+ children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
10266
10394
  }
10267
10395
  ) }) : null
10268
10396
  ]
@@ -10275,11 +10403,11 @@ var Tooltip = ({
10275
10403
  Tooltip.displayName = "Tooltip";
10276
10404
 
10277
10405
  // src/components/Input/Input.tsx
10278
- var import_react43 = require("react");
10279
- var import_styled_components54 = __toESM(require("styled-components"));
10280
- var import_type_guards33 = require("@wistia/type-guards");
10281
- var import_jsx_runtime229 = require("react/jsx-runtime");
10282
- var inputStyles = import_styled_components54.css`
10406
+ var import_react44 = require("react");
10407
+ var import_styled_components55 = __toESM(require("styled-components"));
10408
+ var import_type_guards35 = require("@wistia/type-guards");
10409
+ var import_jsx_runtime230 = require("react/jsx-runtime");
10410
+ var inputStyles = import_styled_components55.css`
10283
10411
  ${inputCss}
10284
10412
  input,
10285
10413
  textarea {
@@ -10314,7 +10442,7 @@ var inputStyles = import_styled_components54.css`
10314
10442
  }
10315
10443
  }
10316
10444
  `;
10317
- var StyledInputContainer = import_styled_components54.default.div`
10445
+ var StyledInputContainer = import_styled_components55.default.div`
10318
10446
  display: inline-flex;
10319
10447
  position: relative;
10320
10448
  ${inputStyles};
@@ -10362,8 +10490,8 @@ var StyledInputContainer = import_styled_components54.default.div`
10362
10490
  transform: translateY(-50%);
10363
10491
  }
10364
10492
 
10365
- :has(.wui-input-left-icon) input,
10366
- :has(.wui-input-left-icon) textarea {
10493
+ &:has(.wui-input-left-icon) input,
10494
+ &:has(.wui-input-left-icon) textarea {
10367
10495
  padding-left: 32px;
10368
10496
  }
10369
10497
 
@@ -10376,12 +10504,12 @@ var StyledInputContainer = import_styled_components54.default.div`
10376
10504
  transform: translateY(-50%);
10377
10505
  }
10378
10506
 
10379
- :has(.wui-input-right-icon) input,
10380
- :has(.wui-input-right-icon) textarea {
10507
+ &:has(.wui-input-right-icon) input,
10508
+ &:has(.wui-input-right-icon) textarea {
10381
10509
  padding-right: 32px;
10382
10510
  }
10383
10511
  `;
10384
- var Input = (0, import_react43.forwardRef)(
10512
+ var Input = (0, import_react44.forwardRef)(
10385
10513
  ({
10386
10514
  fullWidth = true,
10387
10515
  monospace = false,
@@ -10391,30 +10519,30 @@ var Input = (0, import_react43.forwardRef)(
10391
10519
  rightIcon,
10392
10520
  ...props
10393
10521
  }, externalRef) => {
10394
- const internalRef = (0, import_react43.useRef)();
10522
+ const internalRef = (0, import_react44.useRef)();
10395
10523
  const ref = (
10396
10524
  // eslint-disable-next-line react-compiler/react-compiler
10397
- (0, import_type_guards33.isNotNil)(externalRef) && (0, import_type_guards33.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
10525
+ (0, import_type_guards35.isNotNil)(externalRef) && (0, import_type_guards35.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
10398
10526
  );
10399
10527
  let leftIconToDisplay = leftIcon;
10400
- if ((0, import_type_guards33.isNil)(leftIcon) && type === "search") {
10401
- leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(Icon, { type: "search" });
10528
+ if ((0, import_type_guards35.isNil)(leftIcon) && type === "search") {
10529
+ leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(Icon, { type: "search" });
10402
10530
  }
10403
- if ((0, import_type_guards33.isNotNil)(leftIconToDisplay)) {
10404
- leftIconToDisplay = (0, import_react43.cloneElement)(leftIconToDisplay, {
10531
+ if ((0, import_type_guards35.isNotNil)(leftIconToDisplay)) {
10532
+ leftIconToDisplay = (0, import_react44.cloneElement)(leftIconToDisplay, {
10405
10533
  size: "md",
10406
10534
  className: "wui-input-left-icon"
10407
10535
  });
10408
10536
  }
10409
10537
  let rightIconToDisplay = rightIcon;
10410
- if ((0, import_type_guards33.isNotNil)(rightIconToDisplay)) {
10411
- rightIconToDisplay = (0, import_react43.cloneElement)(rightIconToDisplay, {
10538
+ if ((0, import_type_guards35.isNotNil)(rightIconToDisplay)) {
10539
+ rightIconToDisplay = (0, import_react44.cloneElement)(rightIconToDisplay, {
10412
10540
  size: "md",
10413
10541
  className: "wui-input-right-icon"
10414
10542
  });
10415
10543
  }
10416
10544
  const handleFocus2 = (event) => {
10417
- if ((0, import_type_guards33.isNotNil)(props.onFocus)) {
10545
+ if ((0, import_type_guards35.isNotNil)(props.onFocus)) {
10418
10546
  props.onFocus(event);
10419
10547
  }
10420
10548
  if (autoSelect && isValidRef(ref) && "current" in ref) {
@@ -10423,21 +10551,21 @@ var Input = (0, import_react43.forwardRef)(
10423
10551
  });
10424
10552
  }
10425
10553
  };
10426
- return /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(
10554
+ return /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(
10427
10555
  StyledInputContainer,
10428
10556
  {
10429
10557
  $fullWidth: fullWidth,
10430
10558
  $monospace: monospace,
10431
10559
  children: [
10432
10560
  leftIconToDisplay ?? null,
10433
- type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
10561
+ type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
10434
10562
  "textarea",
10435
10563
  {
10436
10564
  ...props,
10437
10565
  ref,
10438
10566
  onFocus: handleFocus2
10439
10567
  }
10440
- ) : /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
10568
+ ) : /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
10441
10569
  "input",
10442
10570
  {
10443
10571
  ...props,
@@ -10455,8 +10583,8 @@ var Input = (0, import_react43.forwardRef)(
10455
10583
  Input.displayName = "Input";
10456
10584
 
10457
10585
  // src/components/EditableHeading/EditableHeading.tsx
10458
- var import_jsx_runtime230 = require("react/jsx-runtime");
10459
- var StyledInput = (0, import_styled_components55.default)(Input)`
10586
+ var import_jsx_runtime231 = require("react/jsx-runtime");
10587
+ var StyledInput = (0, import_styled_components56.default)(Input)`
10460
10588
  :not([rows]) {
10461
10589
  min-height: unset;
10462
10590
  }
@@ -10471,9 +10599,10 @@ var StyledInput = (0, import_styled_components55.default)(Input)`
10471
10599
  padding: var(--wui-space-02);
10472
10600
  border: none;
10473
10601
  height: ${({ $height }) => `${$height}px`};
10602
+ min-height: ${({ $height }) => `${$height}px`};
10474
10603
  }
10475
10604
  `;
10476
- var editableStyles = import_styled_components55.css`
10605
+ var editableStyles = import_styled_components56.css`
10477
10606
  &:has(+ :focus-within) {
10478
10607
  background: var(--wui-color-bg-surface-hover);
10479
10608
  }
@@ -10483,7 +10612,7 @@ var editableStyles = import_styled_components55.css`
10483
10612
  cursor: pointer;
10484
10613
  }
10485
10614
  `;
10486
- var StyledHeading2 = (0, import_styled_components55.default)(Heading)`
10615
+ var StyledHeading2 = (0, import_styled_components56.default)(Heading)`
10487
10616
  width: 100%;
10488
10617
  border-radius: var(--wui-border-radius-02);
10489
10618
  padding: var(--wui-space-02);
@@ -10500,11 +10629,11 @@ var EditableHeading = ({
10500
10629
  __forceEditing = false,
10501
10630
  editingDisabled = false
10502
10631
  }) => {
10503
- const [isEditing, setIsEditing] = (0, import_react44.useState)(false);
10504
- const [value, setValue] = (0, import_react44.useState)(children);
10505
- const [previousValue, setPreviousValue] = (0, import_react44.useState)(children);
10506
- const [headingHeight, setHeadingHeight] = (0, import_react44.useState)("60");
10507
- const headingRef = (0, import_react44.useRef)(null);
10632
+ const [isEditing, setIsEditing] = (0, import_react45.useState)(false);
10633
+ const [value, setValue] = (0, import_react45.useState)(children);
10634
+ const [previousValue, setPreviousValue] = (0, import_react45.useState)(children);
10635
+ const [headingHeight, setHeadingHeight] = (0, import_react45.useState)("60");
10636
+ const headingRef = (0, import_react45.useRef)(null);
10508
10637
  const handleSetEditing = (editing) => {
10509
10638
  if (editingDisabled) return;
10510
10639
  if (editing && headingRef.current) {
@@ -10537,7 +10666,7 @@ var EditableHeading = ({
10537
10666
  handleSetEditing(false);
10538
10667
  }
10539
10668
  };
10540
- const HeadingComponent2 = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
10669
+ const HeadingComponent2 = /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
10541
10670
  StyledHeading2,
10542
10671
  {
10543
10672
  ref: headingRef,
@@ -10551,7 +10680,7 @@ var EditableHeading = ({
10551
10680
  return HeadingComponent2;
10552
10681
  }
10553
10682
  if (isEditing || __forceEditing) {
10554
- return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
10683
+ return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
10555
10684
  StyledInput,
10556
10685
  {
10557
10686
  $height: headingHeight,
@@ -10569,9 +10698,9 @@ var EditableHeading = ({
10569
10698
  }
10570
10699
  );
10571
10700
  }
10572
- return /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(import_jsx_runtime230.Fragment, { children: [
10573
- /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(Tooltip, { content: tooltipText, children: HeadingComponent2 }),
10574
- /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
10701
+ return /* @__PURE__ */ (0, import_jsx_runtime231.jsxs)(import_jsx_runtime231.Fragment, { children: [
10702
+ /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(Tooltip, { content: tooltipText, children: HeadingComponent2 }),
10703
+ /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
10575
10704
  "button",
10576
10705
  {
10577
10706
  "aria-label": ariaLabel,
@@ -10582,110 +10711,6 @@ var EditableHeading = ({
10582
10711
  ] });
10583
10712
  };
10584
10713
 
10585
- // src/components/Form/Form.tsx
10586
- var import_react45 = require("react");
10587
- var import_styled_components56 = __toESM(require("styled-components"));
10588
- var import_type_guards34 = require("@wistia/type-guards");
10589
- var import_jsx_runtime231 = require("react/jsx-runtime");
10590
- var StyledForm = import_styled_components56.default.form`
10591
- --form-default-width: 690px;
10592
-
10593
- max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
10594
- align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
10595
- `;
10596
- var FormContext = (0, import_react45.createContext)({
10597
- values: {},
10598
- errors: {},
10599
- hasSubmitted: false,
10600
- formId: "NO_FORM",
10601
- labelPosition: "block"
10602
- });
10603
- var FormComponent = ({
10604
- children,
10605
- action,
10606
- values = {},
10607
- labelPosition = "block",
10608
- validate,
10609
- fullWidth = false,
10610
- ...props
10611
- }, forwardedRef) => {
10612
- const [errors, setErrors] = (0, import_react45.useState)({});
10613
- const [hasSubmitted, setHasSubmitted] = (0, import_react45.useState)(false);
10614
- const innerRef = (0, import_react45.useRef)();
10615
- const ref = forwardedRef ?? innerRef;
10616
- const autoId = (0, import_react45.useId)();
10617
- const id = props.id ?? autoId;
10618
- const handleValidate = (nextFormData) => {
10619
- const nextData = Object.fromEntries(nextFormData.entries());
10620
- if ((0, import_type_guards34.isUndefined)(validate)) {
10621
- return {};
10622
- }
10623
- return validate(nextData);
10624
- };
10625
- const handleBlur2 = (event) => {
10626
- if (props.onBlur) {
10627
- props.onBlur(event);
10628
- }
10629
- const formData = new FormData(event.currentTarget);
10630
- if ((0, import_type_guards34.isNotUndefined)(validate)) {
10631
- handleValidate(formData);
10632
- }
10633
- };
10634
- const handleSubmit = (event) => {
10635
- event.preventDefault();
10636
- const formData = new FormData(event.currentTarget);
10637
- const nextErrors = handleValidate(formData);
10638
- const isValid = Object.keys(nextErrors).length === 0;
10639
- setErrors(nextErrors);
10640
- setHasSubmitted(true);
10641
- if (isValid && props.onSubmit) {
10642
- props.onSubmit(event);
10643
- }
10644
- if (isValid && action) {
10645
- void action(formData);
10646
- }
10647
- };
10648
- const handleReset = (event) => {
10649
- setErrors({});
10650
- setHasSubmitted(false);
10651
- if (props.onReset) {
10652
- props.onReset(event);
10653
- }
10654
- if (action) {
10655
- void action(null);
10656
- }
10657
- };
10658
- const context = (0, import_react45.useMemo)(() => {
10659
- return {
10660
- values,
10661
- errors,
10662
- hasSubmitted,
10663
- formId: id,
10664
- labelPosition
10665
- };
10666
- }, [labelPosition, values, errors, id, hasSubmitted]);
10667
- return (
10668
- // @ts-expect-error - generic context providers are a giant pain
10669
- /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
10670
- Stack,
10671
- {
10672
- ...props,
10673
- ref,
10674
- $fullWidth: fullWidth,
10675
- as: StyledForm,
10676
- gap: "space-05",
10677
- id,
10678
- onBlur: handleBlur2,
10679
- onReset: handleReset,
10680
- onSubmit: handleSubmit,
10681
- children
10682
- }
10683
- ) })
10684
- );
10685
- };
10686
- FormComponent.displayName = "Form";
10687
- var Form = (0, import_react45.forwardRef)(FormComponent);
10688
-
10689
10714
  // src/components/Form/useFormState.tsx
10690
10715
  var import_react46 = require("react");
10691
10716
  var useFormState = (action, initialData = {}) => {
@@ -10699,7 +10724,7 @@ var useFormState = (action, initialData = {}) => {
10699
10724
  setError(null);
10700
10725
  return;
10701
10726
  }
10702
- const nextData = Object.fromEntries(nextFormData.entries());
10727
+ const nextData = serializeFormData(nextFormData);
10703
10728
  setIsPending(true);
10704
10729
  try {
10705
10730
  const result = await action(data, nextData);
@@ -10724,7 +10749,7 @@ var useFormState = (action, initialData = {}) => {
10724
10749
 
10725
10750
  // src/components/Form/FormErrorSummary.tsx
10726
10751
  var import_react47 = require("react");
10727
- var import_type_guards35 = require("@wistia/type-guards");
10752
+ var import_type_guards36 = require("@wistia/type-guards");
10728
10753
  var import_jsx_runtime232 = require("react/jsx-runtime");
10729
10754
  var ErrorItem = ({ name, error, formId }) => {
10730
10755
  return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
@@ -10738,8 +10763,8 @@ var FormErrorSummary = ({ description }) => {
10738
10763
  }
10739
10764
  return /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)("div", { ref, children: [
10740
10765
  /* @__PURE__ */ (0, import_jsx_runtime232.jsx)("p", { children: description }),
10741
- /* @__PURE__ */ (0, import_jsx_runtime232.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards35.isNotUndefined)(error)).map(
10742
- ([name, error]) => (0, import_type_guards35.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
10766
+ /* @__PURE__ */ (0, import_jsx_runtime232.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards36.isNotUndefined)(error)).map(
10767
+ ([name, error]) => (0, import_type_guards36.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
10743
10768
  ErrorItem,
10744
10769
  {
10745
10770
  error: err,
@@ -10763,7 +10788,7 @@ var FormErrorSummary = ({ description }) => {
10763
10788
  // src/components/FormField/FormField.tsx
10764
10789
  var import_react48 = require("react");
10765
10790
  var import_styled_components58 = __toESM(require("styled-components"));
10766
- var import_type_guards36 = require("@wistia/type-guards");
10791
+ var import_type_guards37 = require("@wistia/type-guards");
10767
10792
 
10768
10793
  // src/components/Label/Label.tsx
10769
10794
  var import_styled_components57 = __toESM(require("styled-components"));
@@ -10866,7 +10891,7 @@ var StyledErrorList = import_styled_components58.default.ul`
10866
10891
  gap: var(--wui-space-01);
10867
10892
  `;
10868
10893
  var ErrorMessages = ({ errors, id }) => {
10869
- const isMultipleErrors = (0, import_type_guards36.isArray)(errors);
10894
+ const isMultipleErrors = (0, import_type_guards37.isArray)(errors);
10870
10895
  return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
10871
10896
  Text,
10872
10897
  {
@@ -10916,19 +10941,19 @@ var FormField = ({
10916
10941
  "aria-describedby": ariaDescribedby,
10917
10942
  ...props
10918
10943
  };
10919
- if ((0, import_type_guards36.isUndefined)(value) && (0, import_type_guards36.isNotUndefined)(defaultValue)) {
10944
+ if ((0, import_type_guards37.isUndefined)(value) && (0, import_type_guards37.isNotUndefined)(defaultValue)) {
10920
10945
  childProps = {
10921
10946
  ...childProps,
10922
10947
  defaultValue
10923
10948
  };
10924
10949
  }
10925
- if ((0, import_type_guards36.isNotNil)(checkboxGroup)) {
10926
- const computedName = (0, import_type_guards36.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
10950
+ if ((0, import_type_guards37.isNotNil)(checkboxGroup)) {
10951
+ const computedName = (0, import_type_guards37.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
10927
10952
  const handleChange = (event) => {
10928
- if ((0, import_type_guards36.isNotUndefined)(props.onChange)) {
10953
+ if ((0, import_type_guards37.isNotUndefined)(props.onChange)) {
10929
10954
  props.onChange(event);
10930
10955
  }
10931
- if ((0, import_type_guards36.isNotUndefined)(checkboxGroup.onChange)) {
10956
+ if ((0, import_type_guards37.isNotUndefined)(checkboxGroup.onChange)) {
10932
10957
  checkboxGroup.onChange(event);
10933
10958
  }
10934
10959
  };
@@ -10936,7 +10961,7 @@ var FormField = ({
10936
10961
  ...childProps,
10937
10962
  name: computedName,
10938
10963
  onChange: handleChange,
10939
- "aria-invalid": (0, import_type_guards36.isNotNil)(error)
10964
+ "aria-invalid": (0, import_type_guards37.isNotNil)(error)
10940
10965
  };
10941
10966
  }
10942
10967
  import_react48.Children.only(children);
@@ -10947,9 +10972,9 @@ var FormField = ({
10947
10972
  "data-label-position": labelPosition ?? formState.labelPosition,
10948
10973
  children: [
10949
10974
  !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Label, { htmlFor: computedId, children: label }),
10950
- (0, import_type_guards36.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
10975
+ (0, import_type_guards37.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
10951
10976
  (0, import_react48.cloneElement)(children, childProps),
10952
- (0, import_type_guards36.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_jsx_runtime234.Fragment, { children: [
10977
+ (0, import_type_guards37.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_jsx_runtime234.Fragment, { children: [
10953
10978
  /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", {}),
10954
10979
  /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
10955
10980
  ErrorMessages,
@@ -10979,12 +11004,15 @@ var RadioGroup = ({
10979
11004
  value,
10980
11005
  ...props
10981
11006
  }) => {
11007
+ const formState = (0, import_react49.useContext)(FormContext);
11008
+ const derivedValue = typeof formState.values[name] === "string" ? formState.values[name] : value;
10982
11009
  const context = (0, import_react49.useMemo)(() => {
10983
11010
  return {
10984
11011
  name,
10985
- onChange
11012
+ onChange,
11013
+ value: derivedValue
10986
11014
  };
10987
- }, [name, onChange]);
11015
+ }, [name, derivedValue, onChange]);
10988
11016
  return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(FormGroup, { ...props, children }) });
10989
11017
  };
10990
11018
  RadioGroup.displayName = "RadioGroup";
@@ -10992,7 +11020,7 @@ RadioGroup.displayName = "RadioGroup";
10992
11020
  // src/components/InputClickToCopy/InputClickToCopy.tsx
10993
11021
  var import_styled_components59 = __toESM(require("styled-components"));
10994
11022
  var import_react50 = require("react");
10995
- var import_type_guards37 = require("@wistia/type-guards");
11023
+ var import_type_guards38 = require("@wistia/type-guards");
10996
11024
  var import_jsx_runtime236 = require("react/jsx-runtime");
10997
11025
  var StyledInput2 = (0, import_styled_components59.default)(Input)`
10998
11026
  &:not([aria-disabled='true']) {
@@ -11020,12 +11048,12 @@ var InputClickToCopy = (0, import_react50.forwardRef)(
11020
11048
  }, [isCopied]);
11021
11049
  const handleClick = (event) => {
11022
11050
  event.preventDefault();
11023
- if ((0, import_type_guards37.isFunction)(props.onClick)) {
11051
+ if ((0, import_type_guards38.isFunction)(props.onClick)) {
11024
11052
  props.onClick(event);
11025
11053
  }
11026
11054
  void copyToClipboard(value).then(() => {
11027
11055
  setIsCopied(true);
11028
- if ((0, import_type_guards37.isFunction)(onCopy)) {
11056
+ if ((0, import_type_guards38.isFunction)(onCopy)) {
11029
11057
  onCopy(value);
11030
11058
  }
11031
11059
  return value;
@@ -11055,7 +11083,7 @@ InputClickToCopy.displayName = "InputClickToCopy";
11055
11083
 
11056
11084
  // src/components/KeyboardShortcut/KeyboardShortcut.tsx
11057
11085
  var import_styled_components60 = __toESM(require("styled-components"));
11058
- var import_type_guards38 = require("@wistia/type-guards");
11086
+ var import_type_guards39 = require("@wistia/type-guards");
11059
11087
  var import_jsx_runtime237 = require("react/jsx-runtime");
11060
11088
  var StyledKeyboardShortcut = import_styled_components60.default.div`
11061
11089
  align-items: center;
@@ -11149,7 +11177,7 @@ var KeyboardShortcut = ({
11149
11177
  $fullWidth: fullWidth,
11150
11178
  ...otherProps,
11151
11179
  children: [
11152
- (0, import_type_guards38.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(Label2, { children: label }),
11180
+ (0, import_type_guards39.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(Label2, { children: label }),
11153
11181
  /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
11154
11182
  StyledKey,
11155
11183
  {
@@ -11163,18 +11191,18 @@ var KeyboardShortcut = ({
11163
11191
  KeyboardShortcut.displayName = "KeyboardShortcut";
11164
11192
 
11165
11193
  // src/components/List/List.tsx
11166
- var import_type_guards40 = require("@wistia/type-guards");
11194
+ var import_type_guards41 = require("@wistia/type-guards");
11167
11195
  var import_styled_components62 = __toESM(require("styled-components"));
11168
11196
 
11169
11197
  // src/components/List/ListItem.tsx
11170
11198
  var import_styled_components61 = __toESM(require("styled-components"));
11171
- var import_type_guards39 = require("@wistia/type-guards");
11199
+ var import_type_guards40 = require("@wistia/type-guards");
11172
11200
  var import_jsx_runtime238 = require("react/jsx-runtime");
11173
11201
  var ListItemComponent = import_styled_components61.default.li`
11174
11202
  margin-bottom: var(--wui-space-02);
11175
11203
  `;
11176
11204
  var ListItem = ({ children }) => {
11177
- if ((0, import_type_guards39.isNil)(children)) {
11205
+ if ((0, import_type_guards40.isNil)(children)) {
11178
11206
  return null;
11179
11207
  }
11180
11208
  return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(ListItemComponent, { children });
@@ -11304,13 +11332,13 @@ var List = ({
11304
11332
  ...otherProps
11305
11333
  }) => {
11306
11334
  const listVariant = variant ?? "bullets";
11307
- if ((0, import_type_guards40.isNotNil)(children)) {
11335
+ if ((0, import_type_guards41.isNotNil)(children)) {
11308
11336
  if (Array.isArray(children) && !children.length) {
11309
11337
  return null;
11310
11338
  }
11311
11339
  return renderListComponent(children, listVariant, otherProps);
11312
11340
  }
11313
- if ((0, import_type_guards40.isNotNil)(items)) {
11341
+ if ((0, import_type_guards41.isNotNil)(items)) {
11314
11342
  if (!items.length) {
11315
11343
  return null;
11316
11344
  }
@@ -11323,7 +11351,7 @@ List.displayName = "List";
11323
11351
  // src/components/Menu/Menu.tsx
11324
11352
  var import_styled_components63 = __toESM(require("styled-components"));
11325
11353
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
11326
- var import_type_guards41 = require("@wistia/type-guards");
11354
+ var import_type_guards42 = require("@wistia/type-guards");
11327
11355
  var import_react52 = require("react");
11328
11356
 
11329
11357
  // src/components/Menu/MenuContext.tsx
@@ -11435,7 +11463,7 @@ var Menu = ({
11435
11463
  }) => {
11436
11464
  const contextValue = (0, import_react52.useMemo)(() => ({ compact }), [compact]);
11437
11465
  let controlProps = {
11438
- ...(0, import_type_guards41.isNotNil)(onOpenChange) && (0, import_type_guards41.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
11466
+ ...(0, import_type_guards42.isNotNil)(onOpenChange) && (0, import_type_guards42.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
11439
11467
  };
11440
11468
  if (disabled) {
11441
11469
  controlProps = {
@@ -11449,7 +11477,7 @@ var Menu = ({
11449
11477
  modal: false,
11450
11478
  ...controlProps,
11451
11479
  children: [
11452
- /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards41.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
11480
+ /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards42.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
11453
11481
  Button,
11454
11482
  {
11455
11483
  "aria-expanded": isOpen,
@@ -11511,12 +11539,12 @@ MenuLabel.displayName = "MenuLabel";
11511
11539
  var import_react54 = require("react");
11512
11540
  var import_styled_components67 = __toESM(require("styled-components"));
11513
11541
  var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
11514
- var import_type_guards43 = require("@wistia/type-guards");
11542
+ var import_type_guards44 = require("@wistia/type-guards");
11515
11543
 
11516
11544
  // src/components/Menu/MenuItemButton.tsx
11517
11545
  var import_react53 = require("react");
11518
11546
  var import_styled_components65 = __toESM(require("styled-components"));
11519
- var import_type_guards42 = require("@wistia/type-guards");
11547
+ var import_type_guards43 = require("@wistia/type-guards");
11520
11548
  var import_jsx_runtime242 = require("react/jsx-runtime");
11521
11549
  var StyledButton3 = (0, import_styled_components65.default)(Button)`
11522
11550
  ${({ colorScheme }) => getColorScheme(colorScheme)};
@@ -11533,7 +11561,7 @@ var StyledButton3 = (0, import_styled_components65.default)(Button)`
11533
11561
  line-height: var(--menu-label-line-height);
11534
11562
  transition: background-color var(--wui-motion-duration-01) var(--wui-motion-ease);
11535
11563
 
11536
- :active {
11564
+ &:active {
11537
11565
  background-color: var(--wui-color-bg-surface-active);
11538
11566
  }
11539
11567
 
@@ -11594,7 +11622,7 @@ var StyledBadgeContainer = import_styled_components65.default.div`
11594
11622
  var MenuItemButton = (0, import_react53.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
11595
11623
  let { colorScheme, badge } = props;
11596
11624
  if (appearance === "dangerous") {
11597
- if ((0, import_type_guards42.isNotUndefined)(colorScheme)) {
11625
+ if ((0, import_type_guards43.isNotUndefined)(colorScheme)) {
11598
11626
  console.warn("colorScheme prop is ignored when appearance is dangerous");
11599
11627
  }
11600
11628
  colorScheme = "error";
@@ -11624,7 +11652,7 @@ var MenuItemButton = (0, import_react53.forwardRef)(({ children, appearance, com
11624
11652
  children: [
11625
11653
  props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
11626
11654
  /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(StyledLabelAndDescriptionContainer, { children }),
11627
- (0, import_type_guards42.isNotNil)(badge) || (0, import_type_guards42.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
11655
+ (0, import_type_guards43.isNotNil)(badge) || (0, import_type_guards43.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
11628
11656
  props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
11629
11657
  ]
11630
11658
  }
@@ -11696,7 +11724,7 @@ var SubMenu = ({
11696
11724
  return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
11697
11725
  /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(SubMenuTrigger, { ...props, children: [
11698
11726
  /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(MenuItemLabel, { children: label }),
11699
- (0, import_type_guards43.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(MenuItemDescription, { children: description }) : null
11727
+ (0, import_type_guards44.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(MenuItemDescription, { children: description }) : null
11700
11728
  ] }),
11701
11729
  /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(SubMenuContent, { $compact: compact, children }) })
11702
11730
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
@@ -11788,7 +11816,7 @@ RadioMenuItem.displayName = "RadioMenuItem";
11788
11816
 
11789
11817
  // src/components/Menu/CheckboxMenuItem.tsx
11790
11818
  var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
11791
- var import_type_guards44 = require("@wistia/type-guards");
11819
+ var import_type_guards45 = require("@wistia/type-guards");
11792
11820
  var import_jsx_runtime248 = require("react/jsx-runtime");
11793
11821
  var CheckboxIndicator = ({ checked, ...props }) => {
11794
11822
  return checked ? /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(
@@ -11862,8 +11890,8 @@ var CheckboxMenuItem = ({
11862
11890
  MenuItemButton,
11863
11891
  {
11864
11892
  ...props,
11865
- leftIcon: (0, import_type_guards44.isNotNil)(props.icon) ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(CheckboxIndicator, { checked }),
11866
- rightIcon: (0, import_type_guards44.isNotNil)(props.icon) ? /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_react_dropdown_menu7.DropdownMenuItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Icon, { type: "checkmark" }) }) : void 0
11893
+ leftIcon: (0, import_type_guards45.isNotNil)(props.icon) ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(CheckboxIndicator, { checked }),
11894
+ rightIcon: (0, import_type_guards45.isNotNil)(props.icon) ? /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_react_dropdown_menu7.DropdownMenuItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Icon, { type: "checkmark" }) }) : void 0
11867
11895
  }
11868
11896
  )
11869
11897
  }
@@ -11875,7 +11903,7 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem";
11875
11903
  var import_react59 = require("react");
11876
11904
  var import_styled_components72 = __toESM(require("styled-components"));
11877
11905
  var import_react_dialog4 = require("@radix-ui/react-dialog");
11878
- var import_type_guards46 = require("@wistia/type-guards");
11906
+ var import_type_guards47 = require("@wistia/type-guards");
11879
11907
 
11880
11908
  // src/components/Modal/ModalHeader.tsx
11881
11909
  var import_styled_components69 = __toESM(require("styled-components"));
@@ -11938,7 +11966,7 @@ var import_react_dialog3 = require("@radix-ui/react-dialog");
11938
11966
 
11939
11967
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
11940
11968
  var import_react56 = require("react");
11941
- var import_type_guards45 = require("@wistia/type-guards");
11969
+ var import_type_guards46 = require("@wistia/type-guards");
11942
11970
  var useFocusRestore = () => {
11943
11971
  const previouslyFocusedRef = (0, import_react56.useRef)(null);
11944
11972
  (0, import_react56.useEffect)(() => {
@@ -11946,7 +11974,7 @@ var useFocusRestore = () => {
11946
11974
  }, []);
11947
11975
  (0, import_react56.useEffect)(() => {
11948
11976
  return () => {
11949
- if ((0, import_type_guards45.isNotNil)(previouslyFocusedRef.current)) {
11977
+ if ((0, import_type_guards46.isNotNil)(previouslyFocusedRef.current)) {
11950
11978
  setTimeout(() => {
11951
11979
  previouslyFocusedRef.current?.focus();
11952
11980
  }, 0);
@@ -12137,7 +12165,7 @@ var Modal = (0, import_react59.forwardRef)(
12137
12165
  import_react_dialog4.Root,
12138
12166
  {
12139
12167
  onOpenChange: (open2) => {
12140
- if (!open2 && (0, import_type_guards46.isNotNil)(onRequestClose)) {
12168
+ if (!open2 && (0, import_type_guards47.isNotNil)(onRequestClose)) {
12141
12169
  onRequestClose();
12142
12170
  }
12143
12171
  },
@@ -12152,7 +12180,7 @@ var Modal = (0, import_react59.forwardRef)(
12152
12180
  alignVertical,
12153
12181
  fullHeight,
12154
12182
  onOpenAutoFocus: (event) => {
12155
- if ((0, import_type_guards46.isNotNil)(initialFocusRef) && initialFocusRef.current) {
12183
+ if ((0, import_type_guards47.isNotNil)(initialFocusRef) && initialFocusRef.current) {
12156
12184
  event.preventDefault();
12157
12185
  requestAnimationFrame(() => {
12158
12186
  initialFocusRef.current?.focus();
@@ -12186,9 +12214,9 @@ var import_react_popover2 = require("@radix-ui/react-popover");
12186
12214
  var import_styled_components74 = __toESM(require("styled-components"));
12187
12215
 
12188
12216
  // src/private/helpers/getControls/getControlProps.tsx
12189
- var import_type_guards47 = require("@wistia/type-guards");
12217
+ var import_type_guards48 = require("@wistia/type-guards");
12190
12218
  var getControlProps = (isOpen, onOpenChange) => {
12191
- return (0, import_type_guards47.isNotNil)(onOpenChange) && (0, import_type_guards47.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
12219
+ return (0, import_type_guards48.isNotNil)(onOpenChange) && (0, import_type_guards48.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
12192
12220
  };
12193
12221
 
12194
12222
  // src/components/Popover/PopoverArrow.tsx
@@ -12343,7 +12371,7 @@ Popover2.displayName = "Popover";
12343
12371
  // src/components/ProgressBar/ProgressBar.tsx
12344
12372
  var import_styled_components75 = __toESM(require("styled-components"));
12345
12373
  var import_react_progress = require("@radix-ui/react-progress");
12346
- var import_type_guards48 = require("@wistia/type-guards");
12374
+ var import_type_guards49 = require("@wistia/type-guards");
12347
12375
  var import_jsx_runtime256 = require("react/jsx-runtime");
12348
12376
  var ProgressBarWrapper = import_styled_components75.default.div`
12349
12377
  --progress-bar-height: 8px;
@@ -12398,7 +12426,7 @@ var ProgressBar = ({
12398
12426
  ...props
12399
12427
  }) => {
12400
12428
  return /* @__PURE__ */ (0, import_jsx_runtime256.jsxs)(ProgressBarWrapper, { children: [
12401
- (0, import_type_guards48.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
12429
+ (0, import_type_guards49.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
12402
12430
  /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
12403
12431
  StyledProgressBar,
12404
12432
  {
@@ -12414,7 +12442,7 @@ var ProgressBar = ({
12414
12442
  )
12415
12443
  }
12416
12444
  ),
12417
- (0, import_type_guards48.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(ProgressBarLabel, { children: labelRight }) : null
12445
+ (0, import_type_guards49.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(ProgressBarLabel, { children: labelRight }) : null
12418
12446
  ] });
12419
12447
  };
12420
12448
  ProgressBar.displayName = "ProgressBar";
@@ -12422,7 +12450,7 @@ ProgressBar.displayName = "ProgressBar";
12422
12450
  // src/components/Radio/Radio.tsx
12423
12451
  var import_react60 = require("react");
12424
12452
  var import_styled_components76 = __toESM(require("styled-components"));
12425
- var import_type_guards49 = require("@wistia/type-guards");
12453
+ var import_type_guards50 = require("@wistia/type-guards");
12426
12454
  var import_jsx_runtime257 = require("react/jsx-runtime");
12427
12455
  var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
12428
12456
  "svg",
@@ -12539,12 +12567,14 @@ var Radio = (0, import_react60.forwardRef)(
12539
12567
  ...props
12540
12568
  }, ref) => {
12541
12569
  const generatedId = (0, import_react60.useId)();
12542
- const computedId = (0, import_type_guards49.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
12570
+ const computedId = (0, import_type_guards50.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
12543
12571
  const radioGroupContext = useRadioGroup();
12544
12572
  const contextName = radioGroupContext?.name;
12545
12573
  const contextOnChange = radioGroupContext?.onChange;
12574
+ const contextValue = radioGroupContext?.value;
12546
12575
  const radioName = name ?? contextName;
12547
12576
  const handleOnChange = onChange ?? contextOnChange;
12577
+ const defaultChecked = (0, import_type_guards50.isNotUndefined)(value) && (0, import_type_guards50.isNotUndefined)(contextValue) ? contextValue.includes(value) : void 0;
12548
12578
  return /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(
12549
12579
  StyledRadioWrapper,
12550
12580
  {
@@ -12556,14 +12586,14 @@ var Radio = (0, import_react60.forwardRef)(
12556
12586
  {
12557
12587
  ...props,
12558
12588
  ref,
12559
- checked,
12560
12589
  disabled,
12561
12590
  id: computedId,
12562
12591
  name: radioName,
12563
12592
  onChange: handleOnChange,
12564
12593
  required,
12565
12594
  type: "radio",
12566
- value
12595
+ value,
12596
+ ...(0, import_type_guards50.isNotUndefined)(defaultChecked) ? { defaultChecked } : { checked }
12567
12597
  }
12568
12598
  ),
12569
12599
  /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
@@ -12596,7 +12626,7 @@ Radio.displayName = "Radio";
12596
12626
  var import_react63 = require("react");
12597
12627
  var import_styled_components78 = __toESM(require("styled-components"));
12598
12628
  var import_react_toggle_group = require("@radix-ui/react-toggle-group");
12599
- var import_type_guards50 = require("@wistia/type-guards");
12629
+ var import_type_guards51 = require("@wistia/type-guards");
12600
12630
 
12601
12631
  // src/components/SegmentedControl/useSelectedItemStyle.tsx
12602
12632
  var import_react61 = require("react");
@@ -12696,7 +12726,7 @@ var SegmentedControl = (0, import_react63.forwardRef)(
12696
12726
  onSelectedValueChange,
12697
12727
  ...props
12698
12728
  }, ref) => {
12699
- if ((0, import_type_guards50.isNil)(children)) {
12729
+ if ((0, import_type_guards51.isNil)(children)) {
12700
12730
  return null;
12701
12731
  }
12702
12732
  return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
@@ -12725,7 +12755,7 @@ SegmentedControl.displayName = "SegmentedControl";
12725
12755
  var import_react64 = require("react");
12726
12756
  var import_styled_components79 = __toESM(require("styled-components"));
12727
12757
  var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
12728
- var import_type_guards51 = require("@wistia/type-guards");
12758
+ var import_type_guards52 = require("@wistia/type-guards");
12729
12759
  var import_jsx_runtime261 = require("react/jsx-runtime");
12730
12760
  var segmentedControlItemStyles = import_styled_components79.css`
12731
12761
  all: unset; /* ToggleGroupItem is a button element */
@@ -12833,8 +12863,8 @@ var SegmentedControlItem = (0, import_react64.forwardRef)(
12833
12863
  {
12834
12864
  ref: combinedRef,
12835
12865
  ...otherProps,
12836
- $hasLabel: (0, import_type_guards51.isNotNil)(label),
12837
- "aria-label": (0, import_type_guards51.isNotNil)(label) ? void 0 : ariaLabel,
12866
+ $hasLabel: (0, import_type_guards52.isNotNil)(label),
12867
+ "aria-label": (0, import_type_guards52.isNotNil)(label) ? void 0 : ariaLabel,
12838
12868
  disabled,
12839
12869
  onClick: handleClick,
12840
12870
  value,
@@ -12966,7 +12996,7 @@ Select.displayName = "Select";
12966
12996
  var import_react_select2 = require("@radix-ui/react-select");
12967
12997
  var import_react66 = require("react");
12968
12998
  var import_styled_components81 = __toESM(require("styled-components"));
12969
- var import_type_guards52 = require("@wistia/type-guards");
12999
+ var import_type_guards53 = require("@wistia/type-guards");
12970
13000
  var import_jsx_runtime263 = require("react/jsx-runtime");
12971
13001
  var StyledItem = (0, import_styled_components81.default)(import_react_select2.Item)`
12972
13002
  ${variantStyleMap2.body3};
@@ -13010,7 +13040,7 @@ var SelectOption = (0, import_react66.forwardRef)(
13010
13040
  type: "checkmark"
13011
13041
  }
13012
13042
  ) }) }),
13013
- (0, import_type_guards52.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)("div", { children: [
13043
+ (0, import_type_guards53.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)("div", { children: [
13014
13044
  children,
13015
13045
  /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
13016
13046
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_select2.ItemText, { children })
@@ -13045,7 +13075,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
13045
13075
  // src/components/Slider/Slider.tsx
13046
13076
  var import_react_slider = require("@radix-ui/react-slider");
13047
13077
  var import_styled_components83 = __toESM(require("styled-components"));
13048
- var import_type_guards53 = require("@wistia/type-guards");
13078
+ var import_type_guards54 = require("@wistia/type-guards");
13049
13079
  var import_jsx_runtime265 = require("react/jsx-runtime");
13050
13080
  var SliderContainer = import_styled_components83.default.div`
13051
13081
  --wui-slider-track-color: var(--wui-gray-6);
@@ -13124,7 +13154,7 @@ var Slider = ({
13124
13154
  "data-testid": dataTestId = "ui-slider",
13125
13155
  ...otherProps
13126
13156
  }) => {
13127
- if (!((0, import_type_guards53.isNonEmptyString)(ariaLabel) || (0, import_type_guards53.isNonEmptyString)(ariaLabelledby))) {
13157
+ if (!((0, import_type_guards54.isNonEmptyString)(ariaLabel) || (0, import_type_guards54.isNonEmptyString)(ariaLabelledby))) {
13128
13158
  throw new Error(
13129
13159
  "UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop."
13130
13160
  );
@@ -13172,7 +13202,7 @@ Slider.displayName = "Slider";
13172
13202
  // src/components/Switch/Switch.tsx
13173
13203
  var import_react67 = require("react");
13174
13204
  var import_styled_components84 = __toESM(require("styled-components"));
13175
- var import_type_guards54 = require("@wistia/type-guards");
13205
+ var import_type_guards55 = require("@wistia/type-guards");
13176
13206
  var import_jsx_runtime266 = require("react/jsx-runtime");
13177
13207
  var sizeSmall3 = import_styled_components84.css`
13178
13208
  --wui-size-small-width: 24px;
@@ -13291,7 +13321,7 @@ var Switch = (0, import_react67.forwardRef)(
13291
13321
  ...props
13292
13322
  }, ref) => {
13293
13323
  const generatedId = (0, import_react67.useId)();
13294
- const computedId = (0, import_type_guards54.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
13324
+ const computedId = (0, import_type_guards55.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
13295
13325
  return /* @__PURE__ */ (0, import_jsx_runtime266.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
13296
13326
  /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
13297
13327
  StyledHiddenSwitchInput,
@@ -13446,7 +13476,7 @@ var TableRow = ({ children, ...props }) => {
13446
13476
  // src/components/Tabs/Tabs.tsx
13447
13477
  var import_react_tabs = require("@radix-ui/react-tabs");
13448
13478
  var import_react71 = require("react");
13449
- var import_type_guards55 = require("@wistia/type-guards");
13479
+ var import_type_guards56 = require("@wistia/type-guards");
13450
13480
 
13451
13481
  // src/components/Tabs/useTabsValue.tsx
13452
13482
  var import_react70 = require("react");
@@ -13483,10 +13513,10 @@ var Tabs = ({
13483
13513
  ...props,
13484
13514
  onValueChange
13485
13515
  };
13486
- if ((0, import_type_guards55.isNotNil)(value)) {
13516
+ if ((0, import_type_guards56.isNotNil)(value)) {
13487
13517
  rootProps.value = value;
13488
13518
  }
13489
- if ((0, import_type_guards55.isNotNil)(defaultValue)) {
13519
+ if ((0, import_type_guards56.isNotNil)(defaultValue)) {
13490
13520
  rootProps.defaultValue = defaultValue;
13491
13521
  }
13492
13522
  return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(import_react_tabs.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(SelectedItemStyleProvider, { children }) }) });
@@ -13546,7 +13576,7 @@ TabsList.displayName = "TabsList";
13546
13576
 
13547
13577
  // src/components/Tabs/TabsTrigger.tsx
13548
13578
  var import_react72 = require("react");
13549
- var import_type_guards56 = require("@wistia/type-guards");
13579
+ var import_type_guards57 = require("@wistia/type-guards");
13550
13580
 
13551
13581
  // src/components/Tabs/StyledRadixTabsTrigger.tsx
13552
13582
  var import_styled_components93 = __toESM(require("styled-components"));
@@ -13597,8 +13627,8 @@ var TabsTrigger = (0, import_react72.forwardRef)(
13597
13627
  {
13598
13628
  ...otherProps,
13599
13629
  ref: combinedRef,
13600
- $hasLabel: (0, import_type_guards56.isNotNil)(label),
13601
- "aria-label": (0, import_type_guards56.isNotNil)(label) ? void 0 : ariaLabel,
13630
+ $hasLabel: (0, import_type_guards57.isNotNil)(label),
13631
+ "aria-label": (0, import_type_guards57.isNotNil)(label) ? void 0 : ariaLabel,
13602
13632
  disabled,
13603
13633
  value,
13604
13634
  children: [
@@ -13613,7 +13643,7 @@ TabsTrigger.displayName = "TabsTrigger";
13613
13643
 
13614
13644
  // src/components/Thumbnail/ThumbnailBadge.tsx
13615
13645
  var import_styled_components94 = __toESM(require("styled-components"));
13616
- var import_type_guards57 = require("@wistia/type-guards");
13646
+ var import_type_guards58 = require("@wistia/type-guards");
13617
13647
  var import_jsx_runtime278 = require("react/jsx-runtime");
13618
13648
  var StyledThumbnailBadge = import_styled_components94.default.div`
13619
13649
  align-items: center;
@@ -13641,7 +13671,7 @@ var StyledThumbnailBadge = import_styled_components94.default.div`
13641
13671
  `;
13642
13672
  var ThumbnailBadge = ({ icon, label, ...props }) => {
13643
13673
  return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(StyledThumbnailBadge, { ...props, children: [
13644
- (0, import_type_guards57.isNotNil)(icon) && icon,
13674
+ (0, import_type_guards58.isNotNil)(icon) && icon,
13645
13675
  /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("span", { children: label })
13646
13676
  ] });
13647
13677
  };
@@ -13650,10 +13680,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge";
13650
13680
  // src/components/Thumbnail/Thumbnail.tsx
13651
13681
  var import_react73 = require("react");
13652
13682
  var import_styled_components97 = __toESM(require("styled-components"));
13653
- var import_type_guards60 = require("@wistia/type-guards");
13683
+ var import_type_guards61 = require("@wistia/type-guards");
13654
13684
 
13655
13685
  // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
13656
- var import_type_guards58 = require("@wistia/type-guards");
13686
+ var import_type_guards59 = require("@wistia/type-guards");
13657
13687
  var import_styled_components95 = require("styled-components");
13658
13688
  var gradients = {
13659
13689
  defaultDarkOne: import_styled_components95.css`
@@ -13781,12 +13811,12 @@ var gradients = {
13781
13811
  };
13782
13812
  var gradientMap = Object.keys(gradients);
13783
13813
  var getBackgroundGradient = (gradientName = void 0) => {
13784
- return (0, import_type_guards58.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
13814
+ return (0, import_type_guards59.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
13785
13815
  };
13786
13816
 
13787
13817
  // src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
13788
13818
  var import_styled_components96 = __toESM(require("styled-components"));
13789
- var import_type_guards59 = require("@wistia/type-guards");
13819
+ var import_type_guards60 = require("@wistia/type-guards");
13790
13820
  var import_jsx_runtime279 = require("react/jsx-runtime");
13791
13821
  var ScrubLine = import_styled_components96.default.div`
13792
13822
  position: absolute;
@@ -13872,8 +13902,8 @@ var ThumbnailStoryboardViewer = ({
13872
13902
  );
13873
13903
  const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
13874
13904
  const backgroundImage = `url(${storyboardUrl})`;
13875
- const showScrubLine = (0, import_type_guards59.isNotNil)(cursorPosition);
13876
- const scrubLinePosition = (0, import_type_guards59.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
13905
+ const showScrubLine = (0, import_type_guards60.isNotNil)(cursorPosition);
13906
+ const scrubLinePosition = (0, import_type_guards60.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
13877
13907
  const viewerStyles = {
13878
13908
  position: "relative",
13879
13909
  overflow: "hidden",
@@ -13943,10 +13973,10 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
13943
13973
  );
13944
13974
  };
13945
13975
  var StyledThumbnail = import_styled_components97.default.div`
13946
- background-image: ${({ $backgroundUrl }) => (0, import_type_guards60.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
13976
+ background-image: ${({ $backgroundUrl }) => (0, import_type_guards61.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
13947
13977
  ${({ $backgroundUrl, $gradientBackground }) => (
13948
13978
  // if we don't have $backgroundUrl show a gradient
13949
- (0, import_type_guards60.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
13979
+ (0, import_type_guards61.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
13950
13980
  )};
13951
13981
  background-position: center center;
13952
13982
  background-size: cover;
@@ -13988,10 +14018,10 @@ var Thumbnail = (0, import_react73.forwardRef)(
13988
14018
  const storyboardElementRef = (0, import_react73.useRef)(null);
13989
14019
  const [cursorPosition, setCursorPosition] = (0, import_react73.useState)(null);
13990
14020
  const backgroundUrl = (0, import_react73.useMemo)(
13991
- () => thumbnailImageType === "square" && (0, import_type_guards60.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
14021
+ () => thumbnailImageType === "square" && (0, import_type_guards61.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
13992
14022
  [thumbnailImageType, thumbnailUrl]
13993
14023
  );
13994
- const isScrubbable = (0, import_type_guards60.isNotNil)(storyboard);
14024
+ const isScrubbable = (0, import_type_guards61.isNotNil)(storyboard);
13995
14025
  const trackStoryboardLoadStatus = (0, import_react73.useCallback)(() => {
13996
14026
  if (storyboardElementRef.current || !storyboard) {
13997
14027
  return storyboardElementRef.current;
@@ -14024,7 +14054,7 @@ var Thumbnail = (0, import_react73.forwardRef)(
14024
14054
  return Boolean(isScrubbable && isMouseOver && isStoryboardReady);
14025
14055
  }, [isScrubbable, isMouseOver, isStoryboardReady]);
14026
14056
  const renderStoryboard = (0, import_react73.useCallback)(() => {
14027
- if (!storyboard || (0, import_type_guards60.isUndefined)(height) || (0, import_type_guards60.isEmptyString)(height)) return null;
14057
+ if (!storyboard || (0, import_type_guards61.isUndefined)(height) || (0, import_type_guards61.isEmptyString)(height)) return null;
14028
14058
  const {
14029
14059
  url,
14030
14060
  width: sbWidth,
@@ -14034,7 +14064,7 @@ var Thumbnail = (0, import_react73.forwardRef)(
14034
14064
  frameCount,
14035
14065
  aspectRatio
14036
14066
  } = storyboard;
14037
- const targetWidth = (0, import_type_guards60.isString)(width) ? parseInt(width, 10) : Number(width);
14067
+ const targetWidth = (0, import_type_guards61.isString)(width) ? parseInt(width, 10) : Number(width);
14038
14068
  const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
14039
14069
  return /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
14040
14070
  ThumbnailStoryboardViewer,
@@ -14055,7 +14085,7 @@ var Thumbnail = (0, import_react73.forwardRef)(
14055
14085
  let thumbnailContent = null;
14056
14086
  if (shouldRenderStoryboard) {
14057
14087
  thumbnailContent = renderStoryboard();
14058
- } else if ((0, import_type_guards60.isNotNil)(thumbnailUrl)) {
14088
+ } else if ((0, import_type_guards61.isNotNil)(thumbnailUrl)) {
14059
14089
  thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
14060
14090
  ThumbnailImage,
14061
14091
  {
@@ -14080,7 +14110,7 @@ var Thumbnail = (0, import_react73.forwardRef)(
14080
14110
  onMouseOut: handleMouseOut,
14081
14111
  role: "presentation",
14082
14112
  children: [
14083
- (0, import_type_guards60.isNotNil)(children) ? children : null,
14113
+ (0, import_type_guards61.isNotNil)(children) ? children : null,
14084
14114
  thumbnailContent
14085
14115
  ]
14086
14116
  }
@@ -14092,7 +14122,7 @@ Thumbnail.displayName = "Thumbnail";
14092
14122
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
14093
14123
  var import_react74 = __toESM(require("react"));
14094
14124
  var import_styled_components98 = __toESM(require("styled-components"));
14095
- var import_type_guards61 = require("@wistia/type-guards");
14125
+ var import_type_guards62 = require("@wistia/type-guards");
14096
14126
  var import_jsx_runtime281 = (
14097
14127
  // ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
14098
14128
  require("react/jsx-runtime")
@@ -14172,7 +14202,7 @@ var ThumbnailCollage = ({
14172
14202
  }) => {
14173
14203
  const thumbnailArray = import_react74.default.Children.toArray(children);
14174
14204
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
14175
- const thumbnails = (0, import_type_guards61.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
14205
+ const thumbnails = (0, import_type_guards62.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
14176
14206
  return import_react74.default.cloneElement(child, {
14177
14207
  ...child.props,
14178
14208
  children: void 0
@@ -14200,7 +14230,7 @@ var ThumbnailCollage = ({
14200
14230
 
14201
14231
  // src/components/WistiaLogo/WistiaLogo.tsx
14202
14232
  var import_styled_components99 = __toESM(require("styled-components"));
14203
- var import_type_guards62 = require("@wistia/type-guards");
14233
+ var import_type_guards63 = require("@wistia/type-guards");
14204
14234
  var import_jsx_runtime282 = require("react/jsx-runtime");
14205
14235
  var renderBrandmark = (brandmarkColor, iconOnly) => {
14206
14236
  if (iconOnly) {
@@ -14313,7 +14343,7 @@ var WistiaLogo = ({
14313
14343
  ...props,
14314
14344
  children: [
14315
14345
  /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("title", { children: title }),
14316
- (0, import_type_guards62.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("desc", { children: description }) : null,
14346
+ (0, import_type_guards63.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("desc", { children: description }) : null,
14317
14347
  renderBrandmark(brandmarkColor, iconOnly),
14318
14348
  renderLogotype(logotypeColor, iconOnly)
14319
14349
  ]