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