@wistia/ui 0.9.4 → 0.9.5-beta.710b9e02.ea620db

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.9.4
3
+ * @license @wistia/ui v0.9.5-beta.710b9e02.ea620db
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -8076,8 +8076,8 @@ var Center = forwardRef6(
8076
8076
  Center.displayName = "Center";
8077
8077
 
8078
8078
  // src/components/Checkbox/Checkbox.tsx
8079
- import { forwardRef as forwardRef7, useId } from "react";
8080
- import styled20, { css as css21 } from "styled-components";
8079
+ import { forwardRef as forwardRef9, useId } from "react";
8080
+ import styled23, { css as css22 } from "styled-components";
8081
8081
  import { isNonEmptyString as isNonEmptyString2 } from "@wistia/type-guards";
8082
8082
 
8083
8083
  // src/private/components/FormControlLabel/FormControlLabel.tsx
@@ -8196,9 +8196,230 @@ var FormControlLabel = ({
8196
8196
  };
8197
8197
  FormControlLabel.displayName = "FormControlLabel";
8198
8198
 
8199
+ // src/components/FormGroup/CheckboxGroup.tsx
8200
+ import { createContext as createContext3, useMemo as useMemo4, useContext as useContext3 } from "react";
8201
+
8202
+ // src/components/FormGroup/FormGroup.tsx
8203
+ import styled22 from "styled-components";
8204
+ import { useRef as useRef6 } from "react";
8205
+
8206
+ // src/components/Stack/Stack.tsx
8207
+ import { forwardRef as forwardRef7 } from "react";
8208
+ import styled20 from "styled-components";
8209
+ import { jsx as jsx208 } from "react/jsx-runtime";
8210
+ var DEFAULT_ELEMENT2 = "div";
8211
+ var StyledStack = styled20.div`
8212
+ display: flex;
8213
+ flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
8214
+ gap: ${({ $gap }) => `var(--wui-${$gap})`};
8215
+ align-items: ${({ $alignItems }) => $alignItems};
8216
+ `;
8217
+ var StackComponent = forwardRef7(
8218
+ ({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
8219
+ const responsiveGap = useResponsiveProp(gap);
8220
+ const responsiveDirection = useResponsiveProp(direction);
8221
+ const responsiveAlignItems = useResponsiveProp(alignItems);
8222
+ return /* @__PURE__ */ jsx208(
8223
+ StyledStack,
8224
+ {
8225
+ ref,
8226
+ $alignItems: responsiveAlignItems,
8227
+ $direction: responsiveDirection,
8228
+ $gap: responsiveGap,
8229
+ as: renderAs ?? DEFAULT_ELEMENT2,
8230
+ ...props
8231
+ }
8232
+ );
8233
+ }
8234
+ );
8235
+ StackComponent.displayName = "Stack";
8236
+ var Stack = makePolymorphic(StackComponent);
8237
+
8238
+ // src/components/Heading/Heading.tsx
8239
+ import { forwardRef as forwardRef8 } from "react";
8240
+ import styled21, { css as css21 } from "styled-components";
8241
+ import { isNotNil as isNotNil13 } from "@wistia/type-guards";
8242
+ import { jsx as jsx209 } from "react/jsx-runtime";
8243
+ var heroStyle = css21`
8244
+ --font-family: var(--wui-typography-heading-hero-family);
8245
+ --font-size: var(--wui-typography-heading-hero-size);
8246
+ --font-weight: var(--wui-typography-heading-hero-weight);
8247
+ --line-height: var(--wui-typography-heading-hero-line-height);
8248
+ `;
8249
+ var heading1TextStyle = css21`
8250
+ --font-family: var(--wui-typography-heading-1-family);
8251
+ --font-size: var(--wui-typography-heading-1-size);
8252
+ --font-weight: var(--wui-typography-heading-1-weight);
8253
+ --line-height: var(--wui-typography-heading-1-line-height);
8254
+ `;
8255
+ var heading2TextStyle = css21`
8256
+ --font-family: var(--wui-typography-heading-2-family);
8257
+ --font-size: var(--wui-typography-heading-2-size);
8258
+ --font-weight: var(--wui-typography-heading-2-weight);
8259
+ --line-height: var(--wui-typography-heading-2-line-height);
8260
+ `;
8261
+ var heading3TextStyle = css21`
8262
+ --font-family: var(--wui-typography-heading-3-family);
8263
+ --font-size: var(--wui-typography-heading-3-size);
8264
+ --font-weight: var(--wui-typography-heading-3-weight);
8265
+ --line-height: var(--wui-typography-heading-3-line-height);
8266
+ `;
8267
+ var heading4TextStyle = css21`
8268
+ --font-family: var(--wui-typography-heading-4-family);
8269
+ --font-size: var(--wui-typography-heading-4-size);
8270
+ --font-weight: var(--wui-typography-heading-4-weight);
8271
+ --line-height: var(--wui-typography-heading-4-line-height);
8272
+ `;
8273
+ var heading5TextStyle = css21`
8274
+ --font-family: var(--wui-typography-heading-5-family);
8275
+ --font-size: var(--wui-typography-heading-5-size);
8276
+ --font-weight: var(--wui-typography-heading-5-weight);
8277
+ --line-height: var(--wui-typography-heading-5-line-height);
8278
+ `;
8279
+ var heading6TextStyle = css21`
8280
+ --font-family: var(--wui-typography-heading-6-family);
8281
+ --font-size: var(--wui-typography-heading-6-size);
8282
+ --font-weight: var(--wui-typography-heading-6-weight);
8283
+ --line-height: var(--wui-typography-heading-6-line-height);
8284
+ `;
8285
+ var variantStyleMap = {
8286
+ hero: heroStyle,
8287
+ heading1: heading1TextStyle,
8288
+ heading2: heading2TextStyle,
8289
+ heading3: heading3TextStyle,
8290
+ heading4: heading4TextStyle,
8291
+ heading5: heading5TextStyle,
8292
+ heading6: heading6TextStyle
8293
+ };
8294
+ var DEFAULT_ELEMENT3 = "h1";
8295
+ var StyledHeading = styled21.div`
8296
+ ${({ $colorScheme }) => getColorScheme($colorScheme)};
8297
+ font-family: var(--font-family);
8298
+ font-size: var(--font-size);
8299
+ font-weight: var(--font-weight);
8300
+ line-height: var(--line-height);
8301
+ color: var(--wui-color-text);
8302
+ ${({ $variant }) => variantStyleMap[$variant]}
8303
+ ${({ $truncate }) => {
8304
+ if (isNotNil13($truncate)) {
8305
+ return css21`
8306
+ ${ellipsisStyle};
8307
+ ${lineClampCss($truncate)};
8308
+ `;
8309
+ }
8310
+ return void 0;
8311
+ }}
8312
+ ${({ $inline }) => $inline && css21`
8313
+ display: inline-block;
8314
+ `}
8315
+ ${({ $disabled }) => $disabled && css21`
8316
+ color: var(--wui-color-text-disabled);
8317
+ `}
8318
+ ${({ $preventUserSelect }) => $preventUserSelect && css21`
8319
+ user-select: none;
8320
+ `}
8321
+ ${({ $align }) => css21`
8322
+ text-align: ${$align};
8323
+ `}
8324
+ margin: 0;
8325
+ `;
8326
+ var variantElementMap = {
8327
+ hero: DEFAULT_ELEMENT3,
8328
+ heading1: DEFAULT_ELEMENT3,
8329
+ heading2: "h2",
8330
+ heading3: "h3",
8331
+ heading4: "h4",
8332
+ heading5: "h5",
8333
+ heading6: "h6"
8334
+ };
8335
+ var HeadingComponent = forwardRef8(
8336
+ ({
8337
+ align = "left",
8338
+ colorScheme = "inherit",
8339
+ disabled = false,
8340
+ inline = false,
8341
+ preventUserSelect = false,
8342
+ truncate,
8343
+ variant = "heading1",
8344
+ renderAs,
8345
+ ...props
8346
+ }, ref) => /* @__PURE__ */ jsx209(
8347
+ StyledHeading,
8348
+ {
8349
+ ref,
8350
+ $align: align,
8351
+ $colorScheme: colorScheme,
8352
+ $disabled: disabled,
8353
+ $inline: inline,
8354
+ $preventUserSelect: preventUserSelect,
8355
+ $truncate: truncate,
8356
+ $variant: variant,
8357
+ as: renderAs ?? variantElementMap[variant],
8358
+ ...props
8359
+ }
8360
+ )
8361
+ );
8362
+ HeadingComponent.displayName = "Heading";
8363
+ var Heading = makePolymorphic(HeadingComponent);
8364
+
8365
+ // src/components/FormGroup/FormGroup.tsx
8366
+ import { jsx as jsx210, jsxs as jsxs15 } from "react/jsx-runtime";
8367
+ var StyledFieldset = styled22.fieldset`
8368
+ border: 0;
8369
+ `;
8370
+ var StyledLegend = styled22.legend`
8371
+ margin-bottom: var(--space-01);
8372
+ `;
8373
+ var FormGroup = ({ children, label, ...props }) => {
8374
+ const ref = useRef6();
8375
+ return /* @__PURE__ */ jsxs15(
8376
+ Stack,
8377
+ {
8378
+ ...props,
8379
+ ref,
8380
+ renderAs: StyledFieldset,
8381
+ children: [
8382
+ /* @__PURE__ */ jsx210(
8383
+ Heading,
8384
+ {
8385
+ renderAs: StyledLegend,
8386
+ variant: "heading5",
8387
+ children: label
8388
+ }
8389
+ ),
8390
+ children
8391
+ ]
8392
+ }
8393
+ );
8394
+ };
8395
+ FormGroup.displayName = "FormGroup";
8396
+
8397
+ // src/components/FormGroup/CheckboxGroup.tsx
8398
+ import { jsx as jsx211 } from "react/jsx-runtime";
8399
+ var CheckboxGroupContext = createContext3(null);
8400
+ var useCheckboxGroup = () => {
8401
+ return useContext3(CheckboxGroupContext);
8402
+ };
8403
+ var CheckboxGroup = ({
8404
+ children,
8405
+ name,
8406
+ onChange,
8407
+ value,
8408
+ ...props
8409
+ }) => {
8410
+ const context = useMemo4(() => {
8411
+ return {
8412
+ name,
8413
+ onChange
8414
+ };
8415
+ }, [name, onChange]);
8416
+ return /* @__PURE__ */ jsx211(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ jsx211(FormGroup, { ...props, children }) });
8417
+ };
8418
+ CheckboxGroup.displayName = "CheckboxGroup";
8419
+
8199
8420
  // src/components/Checkbox/Checkbox.tsx
8200
- import { jsx as jsx208, jsxs as jsxs15 } from "react/jsx-runtime";
8201
- var CheckIcon = () => /* @__PURE__ */ jsx208(
8421
+ import { jsx as jsx212, jsxs as jsxs16 } from "react/jsx-runtime";
8422
+ var CheckIcon = () => /* @__PURE__ */ jsx212(
8202
8423
  "svg",
8203
8424
  {
8204
8425
  fill: "inherit",
@@ -8206,7 +8427,7 @@ var CheckIcon = () => /* @__PURE__ */ jsx208(
8206
8427
  viewBox: "0 0 10 8",
8207
8428
  width: "10",
8208
8429
  xmlns: "http://www.w3.org/2000/svg",
8209
- children: /* @__PURE__ */ jsx208(
8430
+ children: /* @__PURE__ */ jsx212(
8210
8431
  "path",
8211
8432
  {
8212
8433
  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",
@@ -8215,7 +8436,7 @@ var CheckIcon = () => /* @__PURE__ */ jsx208(
8215
8436
  )
8216
8437
  }
8217
8438
  );
8218
- var sizeSmall = css21`
8439
+ var sizeSmall = css22`
8219
8440
  width: 14px;
8220
8441
  height: 14px;
8221
8442
  min-width: 14px;
@@ -8226,7 +8447,7 @@ var sizeSmall = css21`
8226
8447
  height: 7px;
8227
8448
  }
8228
8449
  `;
8229
- var sizeMedium = css21`
8450
+ var sizeMedium = css22`
8230
8451
  width: 16px;
8231
8452
  height: 16px;
8232
8453
  min-width: 16px;
@@ -8237,7 +8458,7 @@ var sizeMedium = css21`
8237
8458
  height: 9px;
8238
8459
  }
8239
8460
  `;
8240
- var sizeLarge = css21`
8461
+ var sizeLarge = css22`
8241
8462
  width: 20px;
8242
8463
  height: 20px;
8243
8464
  min-width: 20px;
@@ -8253,14 +8474,14 @@ var getSizeCss = (size) => {
8253
8474
  if (size === "lg") return sizeLarge;
8254
8475
  return sizeMedium;
8255
8476
  };
8256
- var StyledCheckboxWrapper = styled20.div`
8477
+ var StyledCheckboxWrapper = styled23.div`
8257
8478
  display: flex;
8258
8479
  margin: 0;
8259
8480
 
8260
8481
  /* TODO this solves a problem but potentially causes and a11y issue */
8261
8482
  user-select: none;
8262
8483
  `;
8263
- var StyledCheckboxInput = styled20.div`
8484
+ var StyledCheckboxInput = styled23.div`
8264
8485
  ${({ $size }) => getSizeCss($size)}
8265
8486
  line-height: 0;
8266
8487
  margin: 0;
@@ -8282,7 +8503,7 @@ var StyledCheckboxInput = styled20.div`
8282
8503
  }
8283
8504
  }
8284
8505
  `;
8285
- var StyledHiddenCheckboxInput = styled20.input`
8506
+ var StyledHiddenCheckboxInput = styled23.input`
8286
8507
  ${visuallyHiddenStyle}
8287
8508
 
8288
8509
  /* toggles display of faux-input background-color */
@@ -8296,7 +8517,7 @@ var StyledHiddenCheckboxInput = styled20.input`
8296
8517
  display: block;
8297
8518
  }
8298
8519
  `;
8299
- var Checkbox = forwardRef7(
8520
+ var Checkbox = forwardRef9(
8300
8521
  ({
8301
8522
  checked,
8302
8523
  disabled = false,
@@ -8313,8 +8534,13 @@ var Checkbox = forwardRef7(
8313
8534
  }, ref) => {
8314
8535
  const generatedId = useId();
8315
8536
  const computedId = isNonEmptyString2(id) ? id : `wistia-ui-checkbox-${generatedId}`;
8316
- return /* @__PURE__ */ jsxs15(StyledCheckboxWrapper, { disabled, children: [
8317
- /* @__PURE__ */ jsx208(
8537
+ const checkboxGroupContext = useCheckboxGroup();
8538
+ const contextName = checkboxGroupContext?.name;
8539
+ const contextOnChange = checkboxGroupContext?.onChange;
8540
+ const checkboxName = name ?? contextName;
8541
+ const handleOnChange = onChange ?? contextOnChange;
8542
+ return /* @__PURE__ */ jsxs16(StyledCheckboxWrapper, { disabled, children: [
8543
+ /* @__PURE__ */ jsx212(
8318
8544
  StyledHiddenCheckboxInput,
8319
8545
  {
8320
8546
  ...props,
@@ -8322,23 +8548,23 @@ var Checkbox = forwardRef7(
8322
8548
  checked,
8323
8549
  disabled,
8324
8550
  id: computedId,
8325
- name,
8326
- onChange,
8551
+ name: checkboxName,
8552
+ onChange: handleOnChange,
8327
8553
  required,
8328
8554
  type: "checkbox",
8329
8555
  value
8330
8556
  }
8331
8557
  ),
8332
- /* @__PURE__ */ jsx208(
8558
+ /* @__PURE__ */ jsx212(
8333
8559
  FormControlLabel,
8334
8560
  {
8335
- controlSlot: /* @__PURE__ */ jsx208(
8561
+ controlSlot: /* @__PURE__ */ jsx212(
8336
8562
  StyledCheckboxInput,
8337
8563
  {
8338
8564
  $disabled: disabled,
8339
8565
  $size: size,
8340
8566
  "data-wui-faux-input": "true",
8341
- children: /* @__PURE__ */ jsx208(CheckIcon, {})
8567
+ children: /* @__PURE__ */ jsx212(CheckIcon, {})
8342
8568
  }
8343
8569
  ),
8344
8570
  description,
@@ -8398,10 +8624,10 @@ ClickRegion.displayName = "ClickRegion";
8398
8624
 
8399
8625
  // src/components/Collapsible/Collapsible.tsx
8400
8626
  import { Root as CollapsibleRoot } from "@radix-ui/react-collapsible";
8401
- import { isNotNil as isNotNil13 } from "@wistia/type-guards";
8402
- import styled21 from "styled-components";
8403
- import { jsx as jsx209 } from "react/jsx-runtime";
8404
- var StyledRoot = styled21(CollapsibleRoot)`
8627
+ import { isNotNil as isNotNil14 } from "@wistia/type-guards";
8628
+ import styled24 from "styled-components";
8629
+ import { jsx as jsx213 } from "react/jsx-runtime";
8630
+ var StyledRoot = styled24(CollapsibleRoot)`
8405
8631
  &[data-state='closed'] [data-wui-collapsible-content] {
8406
8632
  display: -webkit-box;
8407
8633
  -webkit-box-orient: vertical;
@@ -8415,32 +8641,32 @@ var Collapsible = ({
8415
8641
  onOpenChange
8416
8642
  }) => {
8417
8643
  const controlProps = {
8418
- ...isNotNil13(onOpenChange) && isNotNil13(isOpen) ? { open: isOpen, onOpenChange } : {}
8644
+ ...isNotNil14(onOpenChange) && isNotNil14(isOpen) ? { open: isOpen, onOpenChange } : {}
8419
8645
  };
8420
- return /* @__PURE__ */ jsx209(StyledRoot, { ...controlProps, children });
8646
+ return /* @__PURE__ */ jsx213(StyledRoot, { ...controlProps, children });
8421
8647
  };
8422
8648
  Collapsible.displayName = "Collapsible";
8423
8649
 
8424
8650
  // src/components/Collapsible/CollapsibleTrigger.tsx
8425
8651
  import { Children as Children3 } from "react";
8426
8652
  import { Trigger } from "@radix-ui/react-collapsible";
8427
- import { jsx as jsx210 } from "react/jsx-runtime";
8653
+ import { jsx as jsx214 } from "react/jsx-runtime";
8428
8654
  var CollapsibleTrigger = ({ children }) => {
8429
8655
  Children3.only(children);
8430
- return /* @__PURE__ */ jsx210(Trigger, { asChild: true, children });
8656
+ return /* @__PURE__ */ jsx214(Trigger, { asChild: true, children });
8431
8657
  };
8432
8658
 
8433
8659
  // src/components/Collapsible/CollapsibleContent.tsx
8434
- import styled22 from "styled-components";
8660
+ import styled25 from "styled-components";
8435
8661
  import { Content } from "@radix-ui/react-collapsible";
8436
8662
  import { isNotUndefined as isNotUndefined6 } from "@wistia/type-guards";
8437
- import { Fragment as Fragment4, jsx as jsx211, jsxs as jsxs16 } from "react/jsx-runtime";
8438
- var ClampedContent = styled22.div`
8663
+ import { Fragment as Fragment4, jsx as jsx215, jsxs as jsxs17 } from "react/jsx-runtime";
8664
+ var ClampedContent = styled25.div`
8439
8665
  --wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
8440
8666
  `;
8441
8667
  var CollapsibleContent = ({ clamp, children }) => {
8442
8668
  if (isNotUndefined6(clamp)) {
8443
- return /* @__PURE__ */ jsx211(
8669
+ return /* @__PURE__ */ jsx215(
8444
8670
  ClampedContent,
8445
8671
  {
8446
8672
  $clamp: clamp,
@@ -8449,147 +8675,18 @@ var CollapsibleContent = ({ clamp, children }) => {
8449
8675
  }
8450
8676
  );
8451
8677
  }
8452
- return /* @__PURE__ */ jsx211(Content, { children: /* @__PURE__ */ jsxs16(Fragment4, { children: [
8678
+ return /* @__PURE__ */ jsx215(Content, { children: /* @__PURE__ */ jsxs17(Fragment4, { children: [
8453
8679
  children,
8454
8680
  " "
8455
8681
  ] }) });
8456
8682
  };
8457
8683
 
8458
8684
  // src/components/DataCards/DataCard.tsx
8459
- import { useRef as useRef6 } from "react";
8460
- import styled24, { keyframes } from "styled-components";
8685
+ import { useRef as useRef7 } from "react";
8686
+ import styled26, { keyframes } from "styled-components";
8461
8687
  import { isNotNil as isNotNil15, isNotNull } from "@wistia/type-guards";
8462
-
8463
- // src/components/Heading/Heading.tsx
8464
- import { forwardRef as forwardRef8 } from "react";
8465
- import styled23, { css as css22 } from "styled-components";
8466
- import { isNotNil as isNotNil14 } from "@wistia/type-guards";
8467
- import { jsx as jsx212 } from "react/jsx-runtime";
8468
- var heroStyle = css22`
8469
- --font-family: var(--wui-typography-heading-hero-family);
8470
- --font-size: var(--wui-typography-heading-hero-size);
8471
- --font-weight: var(--wui-typography-heading-hero-weight);
8472
- --line-height: var(--wui-typography-heading-hero-line-height);
8473
- `;
8474
- var heading1TextStyle = css22`
8475
- --font-family: var(--wui-typography-heading-1-family);
8476
- --font-size: var(--wui-typography-heading-1-size);
8477
- --font-weight: var(--wui-typography-heading-1-weight);
8478
- --line-height: var(--wui-typography-heading-1-line-height);
8479
- `;
8480
- var heading2TextStyle = css22`
8481
- --font-family: var(--wui-typography-heading-2-family);
8482
- --font-size: var(--wui-typography-heading-2-size);
8483
- --font-weight: var(--wui-typography-heading-2-weight);
8484
- --line-height: var(--wui-typography-heading-2-line-height);
8485
- `;
8486
- var heading3TextStyle = css22`
8487
- --font-family: var(--wui-typography-heading-3-family);
8488
- --font-size: var(--wui-typography-heading-3-size);
8489
- --font-weight: var(--wui-typography-heading-3-weight);
8490
- --line-height: var(--wui-typography-heading-3-line-height);
8491
- `;
8492
- var heading4TextStyle = css22`
8493
- --font-family: var(--wui-typography-heading-4-family);
8494
- --font-size: var(--wui-typography-heading-4-size);
8495
- --font-weight: var(--wui-typography-heading-4-weight);
8496
- --line-height: var(--wui-typography-heading-4-line-height);
8497
- `;
8498
- var heading5TextStyle = css22`
8499
- --font-family: var(--wui-typography-heading-5-family);
8500
- --font-size: var(--wui-typography-heading-5-size);
8501
- --font-weight: var(--wui-typography-heading-5-weight);
8502
- --line-height: var(--wui-typography-heading-5-line-height);
8503
- `;
8504
- var heading6TextStyle = css22`
8505
- --font-family: var(--wui-typography-heading-6-family);
8506
- --font-size: var(--wui-typography-heading-6-size);
8507
- --font-weight: var(--wui-typography-heading-6-weight);
8508
- --line-height: var(--wui-typography-heading-6-line-height);
8509
- `;
8510
- var variantStyleMap = {
8511
- hero: heroStyle,
8512
- heading1: heading1TextStyle,
8513
- heading2: heading2TextStyle,
8514
- heading3: heading3TextStyle,
8515
- heading4: heading4TextStyle,
8516
- heading5: heading5TextStyle,
8517
- heading6: heading6TextStyle
8518
- };
8519
- var DEFAULT_ELEMENT2 = "h1";
8520
- var StyledHeading = styled23.div`
8521
- ${({ $colorScheme }) => getColorScheme($colorScheme)};
8522
- font-family: var(--font-family);
8523
- font-size: var(--font-size);
8524
- font-weight: var(--font-weight);
8525
- line-height: var(--line-height);
8526
- color: var(--wui-color-text);
8527
- ${({ $variant }) => variantStyleMap[$variant]}
8528
- ${({ $truncate }) => {
8529
- if (isNotNil14($truncate)) {
8530
- return css22`
8531
- ${ellipsisStyle};
8532
- ${lineClampCss($truncate)};
8533
- `;
8534
- }
8535
- return void 0;
8536
- }}
8537
- ${({ $inline }) => $inline && css22`
8538
- display: inline-block;
8539
- `}
8540
- ${({ $disabled }) => $disabled && css22`
8541
- color: var(--wui-color-text-disabled);
8542
- `}
8543
- ${({ $preventUserSelect }) => $preventUserSelect && css22`
8544
- user-select: none;
8545
- `}
8546
- ${({ $align }) => css22`
8547
- text-align: ${$align};
8548
- `}
8549
- margin: 0;
8550
- `;
8551
- var variantElementMap = {
8552
- hero: DEFAULT_ELEMENT2,
8553
- heading1: DEFAULT_ELEMENT2,
8554
- heading2: "h2",
8555
- heading3: "h3",
8556
- heading4: "h4",
8557
- heading5: "h5",
8558
- heading6: "h6"
8559
- };
8560
- var HeadingComponent = forwardRef8(
8561
- ({
8562
- align = "left",
8563
- colorScheme = "inherit",
8564
- disabled = false,
8565
- inline = false,
8566
- preventUserSelect = false,
8567
- truncate,
8568
- variant = "heading1",
8569
- renderAs,
8570
- ...props
8571
- }, ref) => /* @__PURE__ */ jsx212(
8572
- StyledHeading,
8573
- {
8574
- ref,
8575
- $align: align,
8576
- $colorScheme: colorScheme,
8577
- $disabled: disabled,
8578
- $inline: inline,
8579
- $preventUserSelect: preventUserSelect,
8580
- $truncate: truncate,
8581
- $variant: variant,
8582
- as: renderAs ?? variantElementMap[variant],
8583
- ...props
8584
- }
8585
- )
8586
- );
8587
- HeadingComponent.displayName = "Heading";
8588
- var Heading = makePolymorphic(HeadingComponent);
8589
-
8590
- // src/components/DataCards/DataCard.tsx
8591
- import { jsx as jsx213, jsxs as jsxs17 } from "react/jsx-runtime";
8592
- var StyledDataCard = styled24.div`
8688
+ import { jsx as jsx216, jsxs as jsxs18 } from "react/jsx-runtime";
8689
+ var StyledDataCard = styled26.div`
8593
8690
  display: grid;
8594
8691
  grid-template-areas: 'label slot' 'value value';
8595
8692
  grid-template-rows: auto auto;
@@ -8652,7 +8749,7 @@ var shimmer = keyframes`
8652
8749
  background-position: -200% 0;
8653
8750
  }
8654
8751
  `;
8655
- var LoadingBackground = styled24.div`
8752
+ var LoadingBackground = styled26.div`
8656
8753
  background: linear-gradient(
8657
8754
  90deg,
8658
8755
  var(--wui-color-bg-surface-tertiary) 25%,
@@ -8663,27 +8760,27 @@ var LoadingBackground = styled24.div`
8663
8760
  animation: ${shimmer} 1.5s infinite;
8664
8761
  border-radius: var(--wui-border-radius-01);
8665
8762
  `;
8666
- var StyledLoadingLabel = styled24(LoadingBackground)`
8763
+ var StyledLoadingLabel = styled26(LoadingBackground)`
8667
8764
  width: 80px;
8668
8765
  height: var(--wui-typography-heading-6-line-height);
8669
8766
  `;
8670
- var StyledLoadingValue = styled24(LoadingBackground)`
8767
+ var StyledLoadingValue = styled26(LoadingBackground)`
8671
8768
  width: 90%;
8672
8769
  height: var(--wui-typography-heading-3-line-height);
8673
8770
  `;
8674
- var StyledLabel2 = styled24(Heading)`
8771
+ var StyledLabel2 = styled26(Heading)`
8675
8772
  grid-area: label;
8676
8773
  `;
8677
- var StyledValue = styled24(Heading)`
8774
+ var StyledValue = styled26(Heading)`
8678
8775
  grid-area: value;
8679
8776
  `;
8680
- var StyledSlot = styled24.div`
8777
+ var StyledSlot = styled26.div`
8681
8778
  display: flex;
8682
8779
  justify-content: flex-end;
8683
8780
  grid-area: slot;
8684
8781
  align-self: center;
8685
8782
  `;
8686
- var StyledDataCardTrendContainer = styled24.div`
8783
+ var StyledDataCardTrendContainer = styled26.div`
8687
8784
  position: absolute;
8688
8785
  bottom: var(--wui-space-01);
8689
8786
  right: var(--wui-space-01);
@@ -8696,34 +8793,34 @@ var DataCardInner = ({
8696
8793
  isLoading = false,
8697
8794
  trend,
8698
8795
  ...props
8699
- }) => /* @__PURE__ */ jsxs17(
8796
+ }) => /* @__PURE__ */ jsxs18(
8700
8797
  StyledDataCard,
8701
8798
  {
8702
8799
  $colorScheme: colorScheme,
8703
8800
  ...props,
8704
8801
  children: [
8705
- /* @__PURE__ */ jsx213(
8802
+ /* @__PURE__ */ jsx216(
8706
8803
  StyledLabel2,
8707
8804
  {
8708
8805
  renderAs: "dt",
8709
8806
  variant: "heading6",
8710
- children: isLoading ? /* @__PURE__ */ jsx213(StyledLoadingLabel, {}) : label
8807
+ children: isLoading ? /* @__PURE__ */ jsx216(StyledLoadingLabel, {}) : label
8711
8808
  }
8712
8809
  ),
8713
- /* @__PURE__ */ jsx213(
8810
+ /* @__PURE__ */ jsx216(
8714
8811
  StyledValue,
8715
8812
  {
8716
8813
  renderAs: "dd",
8717
8814
  variant: "heading3",
8718
- children: isLoading ? /* @__PURE__ */ jsx213(StyledLoadingValue, {}) : value
8815
+ children: isLoading ? /* @__PURE__ */ jsx216(StyledLoadingValue, {}) : value
8719
8816
  }
8720
8817
  ),
8721
- isNotNull(upperRightSlot) && !isLoading && /* @__PURE__ */ jsx213(StyledSlot, { children: upperRightSlot }),
8722
- isNotNull(trend) && !isLoading && /* @__PURE__ */ jsx213(StyledDataCardTrendContainer, { children: trend })
8818
+ isNotNull(upperRightSlot) && !isLoading && /* @__PURE__ */ jsx216(StyledSlot, { children: upperRightSlot }),
8819
+ isNotNull(trend) && !isLoading && /* @__PURE__ */ jsx216(StyledDataCardTrendContainer, { children: trend })
8723
8820
  ]
8724
8821
  }
8725
8822
  );
8726
- var DataCardArrowIcon = /* @__PURE__ */ jsx213(
8823
+ var DataCardArrowIcon = /* @__PURE__ */ jsx216(
8727
8824
  Icon,
8728
8825
  {
8729
8826
  "data-wui-data-card-hover-icon": true,
@@ -8731,14 +8828,14 @@ var DataCardArrowIcon = /* @__PURE__ */ jsx213(
8731
8828
  }
8732
8829
  );
8733
8830
  var DataCard = (props) => {
8734
- const ref = useRef6(null);
8831
+ const ref = useRef7(null);
8735
8832
  if (isNotNil15(props.href) || isNotNil15(props.onClick)) {
8736
- return /* @__PURE__ */ jsx213(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ jsx213(
8833
+ return /* @__PURE__ */ jsx216(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ jsx216(
8737
8834
  DataCardInner,
8738
8835
  {
8739
8836
  upperRightSlot: props.upperRightSlot ?? DataCardArrowIcon,
8740
8837
  ...props,
8741
- label: /* @__PURE__ */ jsx213(
8838
+ label: /* @__PURE__ */ jsx216(
8742
8839
  Button,
8743
8840
  {
8744
8841
  ref,
@@ -8753,14 +8850,14 @@ var DataCard = (props) => {
8753
8850
  }
8754
8851
  ) });
8755
8852
  }
8756
- return /* @__PURE__ */ jsx213(DataCardInner, { ...props });
8853
+ return /* @__PURE__ */ jsx216(DataCardInner, { ...props });
8757
8854
  };
8758
8855
  DataCard.displayName = "DataCard";
8759
8856
 
8760
8857
  // src/components/DataCards/DataCards.tsx
8761
- import styled25 from "styled-components";
8762
- import { jsx as jsx214 } from "react/jsx-runtime";
8763
- var StyledDataCards = styled25(Box)`
8858
+ import styled27 from "styled-components";
8859
+ import { jsx as jsx217 } from "react/jsx-runtime";
8860
+ var StyledDataCards = styled27(Box)`
8764
8861
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
8765
8862
  margin-top: 0; /* Remove default <dl> style */
8766
8863
  > * {
@@ -8774,7 +8871,7 @@ var DataCards = ({
8774
8871
  colorScheme = "inherit",
8775
8872
  ...props
8776
8873
  }) => {
8777
- return /* @__PURE__ */ jsx214(
8874
+ return /* @__PURE__ */ jsx217(
8778
8875
  StyledDataCards,
8779
8876
  {
8780
8877
  ...props,
@@ -8792,13 +8889,13 @@ var DataCards = ({
8792
8889
  DataCards.displayName = "DataCards";
8793
8890
 
8794
8891
  // src/components/DataCards/DataCardTrend.tsx
8795
- import styled27 from "styled-components";
8892
+ import styled29 from "styled-components";
8796
8893
 
8797
8894
  // src/components/Text/Text.tsx
8798
- import { forwardRef as forwardRef9 } from "react";
8799
- import styled26, { css as css23 } from "styled-components";
8895
+ import { forwardRef as forwardRef10 } from "react";
8896
+ import styled28, { css as css23 } from "styled-components";
8800
8897
  import { isNotNil as isNotNil16 } from "@wistia/type-guards";
8801
- import { jsx as jsx215 } from "react/jsx-runtime";
8898
+ import { jsx as jsx218 } from "react/jsx-runtime";
8802
8899
  var bodyBoldStyles = css23`
8803
8900
  > strong,
8804
8901
  b {
@@ -8903,22 +9000,22 @@ var variantStyleMap2 = {
8903
9000
  };
8904
9001
  var bodyElement = "p";
8905
9002
  var labelElement = "span";
8906
- var DEFAULT_ELEMENT3 = bodyElement;
9003
+ var DEFAULT_ELEMENT4 = bodyElement;
8907
9004
  var variantElementMap2 = {
8908
- body1: DEFAULT_ELEMENT3,
8909
- body2: DEFAULT_ELEMENT3,
8910
- body3: DEFAULT_ELEMENT3,
8911
- body4: DEFAULT_ELEMENT3,
8912
- body1Mono: DEFAULT_ELEMENT3,
8913
- body2Mono: DEFAULT_ELEMENT3,
8914
- body3Mono: DEFAULT_ELEMENT3,
8915
- body4Mono: DEFAULT_ELEMENT3,
9005
+ body1: DEFAULT_ELEMENT4,
9006
+ body2: DEFAULT_ELEMENT4,
9007
+ body3: DEFAULT_ELEMENT4,
9008
+ body4: DEFAULT_ELEMENT4,
9009
+ body1Mono: DEFAULT_ELEMENT4,
9010
+ body2Mono: DEFAULT_ELEMENT4,
9011
+ body3Mono: DEFAULT_ELEMENT4,
9012
+ body4Mono: DEFAULT_ELEMENT4,
8916
9013
  label1: labelElement,
8917
9014
  label2: labelElement,
8918
9015
  label3: labelElement,
8919
9016
  label4: labelElement
8920
9017
  };
8921
- var StyledText = styled26.div`
9018
+ var StyledText = styled28.div`
8922
9019
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
8923
9020
  --text-color: ${({ $prominence, $disabled }) => {
8924
9021
  if ($disabled) {
@@ -8970,7 +9067,7 @@ var StyledText = styled26.div`
8970
9067
  }
8971
9068
  `}
8972
9069
  `;
8973
- var TextComponent = forwardRef9(
9070
+ var TextComponent = forwardRef10(
8974
9071
  ({
8975
9072
  align = "left",
8976
9073
  colorScheme = "inherit",
@@ -8983,7 +9080,7 @@ var TextComponent = forwardRef9(
8983
9080
  renderAs,
8984
9081
  ...props
8985
9082
  }, ref) => {
8986
- return /* @__PURE__ */ jsx215(
9083
+ return /* @__PURE__ */ jsx218(
8987
9084
  StyledText,
8988
9085
  {
8989
9086
  ref,
@@ -9005,8 +9102,8 @@ TextComponent.displayName = "Text";
9005
9102
  var Text = makePolymorphic(TextComponent);
9006
9103
 
9007
9104
  // src/components/DataCards/DataCardTrend.tsx
9008
- import { jsx as jsx216, jsxs as jsxs18 } from "react/jsx-runtime";
9009
- var StyledDataCardTrend = styled27.div`
9105
+ import { jsx as jsx219, jsxs as jsxs19 } from "react/jsx-runtime";
9106
+ var StyledDataCardTrend = styled29.div`
9010
9107
  ${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
9011
9108
  background: var(--wui-color-bg-app);
9012
9109
  border-radius: var(--wui-border-radius-rounded);
@@ -9021,8 +9118,8 @@ var DataCardTrend = ({
9021
9118
  children,
9022
9119
  ...props
9023
9120
  }) => {
9024
- return /* @__PURE__ */ jsxs18(StyledDataCardTrend, { $outlook: outlook, children: [
9025
- /* @__PURE__ */ jsx216(
9121
+ return /* @__PURE__ */ jsxs19(StyledDataCardTrend, { $outlook: outlook, children: [
9122
+ /* @__PURE__ */ jsx219(
9026
9123
  Icon,
9027
9124
  {
9028
9125
  size: "md",
@@ -9030,7 +9127,7 @@ var DataCardTrend = ({
9030
9127
  ...props
9031
9128
  }
9032
9129
  ),
9033
- /* @__PURE__ */ jsx216(
9130
+ /* @__PURE__ */ jsx219(
9034
9131
  Text,
9035
9132
  {
9036
9133
  prominence: "secondary",
@@ -9042,8 +9139,8 @@ var DataCardTrend = ({
9042
9139
  };
9043
9140
 
9044
9141
  // src/components/Divider/Divider.tsx
9045
- import styled28, { css as css24 } from "styled-components";
9046
- import { jsx as jsx217 } from "react/jsx-runtime";
9142
+ import styled30, { css as css24 } from "styled-components";
9143
+ import { jsx as jsx220 } from "react/jsx-runtime";
9047
9144
  var horizontalBorderCss = css24`
9048
9145
  border-top-color: var(--wui-color-border);
9049
9146
  border-top-style: solid;
@@ -9057,7 +9154,7 @@ var verticalBorderCss = css24`
9057
9154
  min-height: 100%;
9058
9155
  width: 1px;
9059
9156
  `;
9060
- var DividerComponent = styled28.div`
9157
+ var DividerComponent = styled30.div`
9061
9158
  ${({ $orientation }) => {
9062
9159
  switch ($orientation) {
9063
9160
  case "vertical":
@@ -9069,7 +9166,7 @@ var DividerComponent = styled28.div`
9069
9166
  }}
9070
9167
  `;
9071
9168
  var Divider = ({ orientation = "horizontal", ...props }) => {
9072
- return /* @__PURE__ */ jsx217(
9169
+ return /* @__PURE__ */ jsx220(
9073
9170
  DividerComponent,
9074
9171
  {
9075
9172
  $orientation: orientation,
@@ -9082,8 +9179,8 @@ var Divider = ({ orientation = "horizontal", ...props }) => {
9082
9179
  Divider.displayName = "Divider";
9083
9180
 
9084
9181
  // src/components/EditableHeading/EditableHeading.tsx
9085
- import styled31, { css as css27 } from "styled-components";
9086
- import { useState as useState9, useRef as useRef8 } from "react";
9182
+ import styled33, { css as css27 } from "styled-components";
9183
+ import { useState as useState9, useRef as useRef9 } from "react";
9087
9184
 
9088
9185
  // src/components/Tooltip/Tooltip.tsx
9089
9186
  import {
@@ -9093,8 +9190,8 @@ import {
9093
9190
  Portal as TooltipPortal,
9094
9191
  Arrow as TooltipArrow
9095
9192
  } from "@radix-ui/react-tooltip";
9096
- import styled29, { keyframes as keyframes2 } from "styled-components";
9097
- import { jsx as jsx218, jsxs as jsxs19 } from "react/jsx-runtime";
9193
+ import styled31, { keyframes as keyframes2 } from "styled-components";
9194
+ import { jsx as jsx221, jsxs as jsxs20 } from "react/jsx-runtime";
9098
9195
  var hide = keyframes2`
9099
9196
  from {
9100
9197
  opacity: 1;
@@ -9143,7 +9240,7 @@ var slideRightAndFade = keyframes2`
9143
9240
  transform: translateX(0);
9144
9241
  }
9145
9242
  `;
9146
- var StyledContent = styled29(TooltipContent)`
9243
+ var StyledContent = styled31(TooltipContent)`
9147
9244
  --tooltip-font-family: var(--wui-typography-family-default);
9148
9245
  --tooltip-border-radius: var(--wui-border-radius-05);
9149
9246
  --tooltip-bg: var(--wui-color-bg-tooltip);
@@ -9205,21 +9302,21 @@ var Tooltip = ({
9205
9302
  if (forceOpen === true) {
9206
9303
  rootProps.open = true;
9207
9304
  }
9208
- return /* @__PURE__ */ jsxs19(
9305
+ return /* @__PURE__ */ jsxs20(
9209
9306
  TooltipRoot,
9210
9307
  {
9211
9308
  delayDuration: delay,
9212
9309
  ...rootProps,
9213
9310
  children: [
9214
- /* @__PURE__ */ jsx218(TooltipTrigger, { asChild: true, children }),
9215
- /* @__PURE__ */ jsx218(TooltipPortal, { children: /* @__PURE__ */ jsxs19(
9311
+ /* @__PURE__ */ jsx221(TooltipTrigger, { asChild: true, children }),
9312
+ /* @__PURE__ */ jsx221(TooltipPortal, { children: /* @__PURE__ */ jsxs20(
9216
9313
  StyledContent,
9217
9314
  {
9218
9315
  side: direction,
9219
9316
  sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
9220
9317
  children: [
9221
9318
  content,
9222
- !hideArrow ? /* @__PURE__ */ jsx218(TooltipArrow, { asChild: true, children: /* @__PURE__ */ jsx218(
9319
+ !hideArrow ? /* @__PURE__ */ jsx221(TooltipArrow, { asChild: true, children: /* @__PURE__ */ jsx221(
9223
9320
  "svg",
9224
9321
  {
9225
9322
  fill: "var(--tooltip-bg)",
@@ -9228,7 +9325,7 @@ var Tooltip = ({
9228
9325
  viewBox: "0 0 12 8",
9229
9326
  width: "12",
9230
9327
  xmlns: "http://www.w3.org/2000/svg",
9231
- children: /* @__PURE__ */ jsx218("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" })
9328
+ children: /* @__PURE__ */ jsx221("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" })
9232
9329
  }
9233
9330
  ) }) : null
9234
9331
  ]
@@ -9241,8 +9338,8 @@ var Tooltip = ({
9241
9338
  Tooltip.displayName = "Tooltip";
9242
9339
 
9243
9340
  // src/components/Input/Input.tsx
9244
- import { forwardRef as forwardRef10, cloneElement as cloneElement3, useRef as useRef7 } from "react";
9245
- import styled30, { css as css26 } from "styled-components";
9341
+ import { forwardRef as forwardRef11, cloneElement as cloneElement3, useRef as useRef8 } from "react";
9342
+ import styled32, { css as css26 } from "styled-components";
9246
9343
  import { isNil as isNil12, isNotNil as isNotNil17, isRecord as isRecord4 } from "@wistia/type-guards";
9247
9344
 
9248
9345
  // src/css/sharedStyles/inputCssVariables.ts
@@ -9273,7 +9370,7 @@ var inputCssVariables = css25`
9273
9370
  `;
9274
9371
 
9275
9372
  // src/components/Input/Input.tsx
9276
- import { jsx as jsx219, jsxs as jsxs20 } from "react/jsx-runtime";
9373
+ import { jsx as jsx222, jsxs as jsxs21 } from "react/jsx-runtime";
9277
9374
  var inputStyles = css26`
9278
9375
  ${inputCssVariables}
9279
9376
  input,
@@ -9309,7 +9406,7 @@ var inputStyles = css26`
9309
9406
  }
9310
9407
  }
9311
9408
  `;
9312
- var StyledInputContainer = styled30.div`
9409
+ var StyledInputContainer = styled32.div`
9313
9410
  display: inline-flex;
9314
9411
  position: relative;
9315
9412
  ${inputStyles};
@@ -9376,7 +9473,7 @@ var StyledInputContainer = styled30.div`
9376
9473
  padding-right: 32px;
9377
9474
  }
9378
9475
  `;
9379
- var Input = forwardRef10(
9476
+ var Input = forwardRef11(
9380
9477
  ({
9381
9478
  fullWidth = true,
9382
9479
  monospace = false,
@@ -9386,14 +9483,14 @@ var Input = forwardRef10(
9386
9483
  rightIcon,
9387
9484
  ...props
9388
9485
  }, externalRef) => {
9389
- const internalRef = useRef7();
9486
+ const internalRef = useRef8();
9390
9487
  const ref = (
9391
9488
  // eslint-disable-next-line react-compiler/react-compiler
9392
9489
  isNotNil17(externalRef) && isRecord4(externalRef) && "current" in externalRef ? externalRef : internalRef
9393
9490
  );
9394
9491
  let leftIconToDisplay = leftIcon;
9395
9492
  if (isNil12(leftIcon) && type === "search") {
9396
- leftIconToDisplay = /* @__PURE__ */ jsx219(Icon, { type: "search" });
9493
+ leftIconToDisplay = /* @__PURE__ */ jsx222(Icon, { type: "search" });
9397
9494
  }
9398
9495
  if (isNotNil17(leftIconToDisplay)) {
9399
9496
  leftIconToDisplay = cloneElement3(leftIconToDisplay, {
@@ -9418,21 +9515,21 @@ var Input = forwardRef10(
9418
9515
  });
9419
9516
  }
9420
9517
  };
9421
- return /* @__PURE__ */ jsxs20(
9518
+ return /* @__PURE__ */ jsxs21(
9422
9519
  StyledInputContainer,
9423
9520
  {
9424
9521
  $fullWidth: fullWidth,
9425
9522
  $monospace: monospace,
9426
9523
  children: [
9427
9524
  leftIconToDisplay ?? null,
9428
- type === "multiline" ? /* @__PURE__ */ jsx219(
9525
+ type === "multiline" ? /* @__PURE__ */ jsx222(
9429
9526
  "textarea",
9430
9527
  {
9431
9528
  ...props,
9432
9529
  ref,
9433
9530
  onFocus: handleFocus2
9434
9531
  }
9435
- ) : /* @__PURE__ */ jsx219(
9532
+ ) : /* @__PURE__ */ jsx222(
9436
9533
  "input",
9437
9534
  {
9438
9535
  ...props,
@@ -9450,8 +9547,8 @@ var Input = forwardRef10(
9450
9547
  Input.displayName = "Input";
9451
9548
 
9452
9549
  // src/components/EditableHeading/EditableHeading.tsx
9453
- import { Fragment as Fragment5, jsx as jsx220, jsxs as jsxs21 } from "react/jsx-runtime";
9454
- var StyledInput = styled31(Input)`
9550
+ import { Fragment as Fragment5, jsx as jsx223, jsxs as jsxs22 } from "react/jsx-runtime";
9551
+ var StyledInput = styled33(Input)`
9455
9552
  :not([rows]) {
9456
9553
  min-height: unset;
9457
9554
  }
@@ -9478,7 +9575,7 @@ var editableStyles = css27`
9478
9575
  cursor: pointer;
9479
9576
  }
9480
9577
  `;
9481
- var StyledHeading2 = styled31(Heading)`
9578
+ var StyledHeading2 = styled33(Heading)`
9482
9579
  width: 100%;
9483
9580
  border-radius: var(--wui-border-radius-02);
9484
9581
  padding: var(--wui-space-02);
@@ -9499,7 +9596,7 @@ var EditableHeading = ({
9499
9596
  const [value, setValue] = useState9(children);
9500
9597
  const [previousValue, setPreviousValue] = useState9(children);
9501
9598
  const [headingHeight, setHeadingHeight] = useState9("60");
9502
- const headingRef = useRef8(null);
9599
+ const headingRef = useRef9(null);
9503
9600
  const handleSetEditing = (editing) => {
9504
9601
  if (editingDisabled) return;
9505
9602
  if (editing && headingRef.current) {
@@ -9532,7 +9629,7 @@ var EditableHeading = ({
9532
9629
  handleSetEditing(false);
9533
9630
  }
9534
9631
  };
9535
- const HeadingComponent2 = /* @__PURE__ */ jsx220(
9632
+ const HeadingComponent2 = /* @__PURE__ */ jsx223(
9536
9633
  StyledHeading2,
9537
9634
  {
9538
9635
  ref: headingRef,
@@ -9546,7 +9643,7 @@ var EditableHeading = ({
9546
9643
  return HeadingComponent2;
9547
9644
  }
9548
9645
  if (isEditing || __forceEditing) {
9549
- return /* @__PURE__ */ jsx220(
9646
+ return /* @__PURE__ */ jsx223(
9550
9647
  StyledInput,
9551
9648
  {
9552
9649
  $height: headingHeight,
@@ -9564,9 +9661,9 @@ var EditableHeading = ({
9564
9661
  }
9565
9662
  );
9566
9663
  }
9567
- return /* @__PURE__ */ jsxs21(Fragment5, { children: [
9568
- /* @__PURE__ */ jsx220(Tooltip, { content: tooltipText, children: HeadingComponent2 }),
9569
- /* @__PURE__ */ jsx220(ScreenReaderOnly, { children: /* @__PURE__ */ jsx220(
9664
+ return /* @__PURE__ */ jsxs22(Fragment5, { children: [
9665
+ /* @__PURE__ */ jsx223(Tooltip, { content: tooltipText, children: HeadingComponent2 }),
9666
+ /* @__PURE__ */ jsx223(ScreenReaderOnly, { children: /* @__PURE__ */ jsx223(
9570
9667
  "button",
9571
9668
  {
9572
9669
  "aria-label": ariaLabel,
@@ -9578,51 +9675,17 @@ var EditableHeading = ({
9578
9675
  };
9579
9676
 
9580
9677
  // src/components/Form/Form.tsx
9581
- import { forwardRef as forwardRef12, useRef as useRef9, useMemo as useMemo4, createContext as createContext3, useState as useState10, useId as useId2 } from "react";
9582
- import styled33 from "styled-components";
9678
+ import { forwardRef as forwardRef12, useRef as useRef10, useMemo as useMemo5, createContext as createContext4, useState as useState10, useId as useId2 } from "react";
9679
+ import styled34 from "styled-components";
9583
9680
  import { isNotUndefined as isNotUndefined7, isUndefined as isUndefined3 } from "@wistia/type-guards";
9584
-
9585
- // src/components/Stack/Stack.tsx
9586
- import { forwardRef as forwardRef11 } from "react";
9587
- import styled32 from "styled-components";
9588
- import { jsx as jsx221 } from "react/jsx-runtime";
9589
- var DEFAULT_ELEMENT4 = "div";
9590
- var StyledStack = styled32.div`
9591
- display: flex;
9592
- flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
9593
- gap: ${({ $gap }) => `var(--wui-${$gap})`};
9594
- align-items: ${({ $alignItems }) => $alignItems};
9595
- `;
9596
- var StackComponent = forwardRef11(
9597
- ({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
9598
- const responsiveGap = useResponsiveProp(gap);
9599
- const responsiveDirection = useResponsiveProp(direction);
9600
- const responsiveAlignItems = useResponsiveProp(alignItems);
9601
- return /* @__PURE__ */ jsx221(
9602
- StyledStack,
9603
- {
9604
- ref,
9605
- $alignItems: responsiveAlignItems,
9606
- $direction: responsiveDirection,
9607
- $gap: responsiveGap,
9608
- as: renderAs ?? DEFAULT_ELEMENT4,
9609
- ...props
9610
- }
9611
- );
9612
- }
9613
- );
9614
- StackComponent.displayName = "Stack";
9615
- var Stack = makePolymorphic(StackComponent);
9616
-
9617
- // src/components/Form/Form.tsx
9618
- import { jsx as jsx222 } from "react/jsx-runtime";
9619
- var StyledForm = styled33.form`
9681
+ import { jsx as jsx224 } from "react/jsx-runtime";
9682
+ var StyledForm = styled34.form`
9620
9683
  --form-default-width: 690px;
9621
9684
 
9622
9685
  max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
9623
9686
  align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
9624
9687
  `;
9625
- var FormContext = createContext3({
9688
+ var FormContext = createContext4({
9626
9689
  values: {},
9627
9690
  errors: {},
9628
9691
  hasSubmitted: false,
@@ -9640,7 +9703,7 @@ var FormComponent = ({
9640
9703
  }, forwardedRef) => {
9641
9704
  const [errors, setErrors] = useState10({});
9642
9705
  const [hasSubmitted, setHasSubmitted] = useState10(false);
9643
- const innerRef = useRef9();
9706
+ const innerRef = useRef10();
9644
9707
  const ref = forwardedRef ?? innerRef;
9645
9708
  const autoId = useId2();
9646
9709
  const id = props.id ?? autoId;
@@ -9684,7 +9747,7 @@ var FormComponent = ({
9684
9747
  void action(null);
9685
9748
  }
9686
9749
  };
9687
- const context = useMemo4(() => {
9750
+ const context = useMemo5(() => {
9688
9751
  return {
9689
9752
  values,
9690
9753
  errors,
@@ -9695,7 +9758,7 @@ var FormComponent = ({
9695
9758
  }, [labelPosition, values, errors, id, hasSubmitted]);
9696
9759
  return (
9697
9760
  // @ts-expect-error - generic context providers are a giant pain
9698
- /* @__PURE__ */ jsx222(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx222(
9761
+ /* @__PURE__ */ jsx224(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx224(
9699
9762
  Stack,
9700
9763
  {
9701
9764
  ...props,
@@ -9752,23 +9815,23 @@ var useFormState = (action, initialData = {}) => {
9752
9815
  };
9753
9816
 
9754
9817
  // src/components/Form/FormErrorSummary.tsx
9755
- import { useContext as useContext3, useRef as useRef10 } from "react";
9818
+ import { useContext as useContext4, useRef as useRef11 } from "react";
9756
9819
  import { isArray, isNotUndefined as isNotUndefined8 } from "@wistia/type-guards";
9757
- import { jsx as jsx223, jsxs as jsxs22 } from "react/jsx-runtime";
9820
+ import { jsx as jsx225, jsxs as jsxs23 } from "react/jsx-runtime";
9758
9821
  var ErrorItem = ({ name, error, formId }) => {
9759
- return /* @__PURE__ */ jsx223("li", { children: /* @__PURE__ */ jsx223(Link, { href: `#${formId}-${name}`, children: error }) }, name);
9822
+ return /* @__PURE__ */ jsx225("li", { children: /* @__PURE__ */ jsx225(Link, { href: `#${formId}-${name}`, children: error }) }, name);
9760
9823
  };
9761
9824
  var FormErrorSummary = ({ description }) => {
9762
- const ref = useRef10(null);
9763
- const { formId, errors, hasSubmitted } = useContext3(FormContext);
9825
+ const ref = useRef11(null);
9826
+ const { formId, errors, hasSubmitted } = useContext4(FormContext);
9764
9827
  const isValid = Object.keys(errors).length === 0;
9765
9828
  if (isValid || !hasSubmitted) {
9766
9829
  return null;
9767
9830
  }
9768
- return /* @__PURE__ */ jsxs22("div", { ref, children: [
9769
- /* @__PURE__ */ jsx223("p", { children: description }),
9770
- /* @__PURE__ */ jsx223("ul", { children: Object.entries(errors).filter(([, error]) => isNotUndefined8(error)).map(
9771
- ([name, error]) => isArray(error) ? error.map((err) => /* @__PURE__ */ jsx223(
9831
+ return /* @__PURE__ */ jsxs23("div", { ref, children: [
9832
+ /* @__PURE__ */ jsx225("p", { children: description }),
9833
+ /* @__PURE__ */ jsx225("ul", { children: Object.entries(errors).filter(([, error]) => isNotUndefined8(error)).map(
9834
+ ([name, error]) => isArray(error) ? error.map((err) => /* @__PURE__ */ jsx225(
9772
9835
  ErrorItem,
9773
9836
  {
9774
9837
  error: err,
@@ -9776,7 +9839,7 @@ var FormErrorSummary = ({ description }) => {
9776
9839
  name
9777
9840
  },
9778
9841
  err
9779
- )) : /* @__PURE__ */ jsx223(
9842
+ )) : /* @__PURE__ */ jsx225(
9780
9843
  ErrorItem,
9781
9844
  {
9782
9845
  error: error ?? "",
@@ -9790,13 +9853,13 @@ var FormErrorSummary = ({ description }) => {
9790
9853
  };
9791
9854
 
9792
9855
  // src/components/FormField/FormField.tsx
9793
- import { Children as Children4, cloneElement as cloneElement4, useContext as useContext4 } from "react";
9856
+ import { Children as Children4, cloneElement as cloneElement4, useContext as useContext5 } from "react";
9794
9857
  import styled36 from "styled-components";
9795
9858
  import { isArray as isArray2, isNotNil as isNotNil18, isNotUndefined as isNotUndefined9, isUndefined as isUndefined4 } from "@wistia/type-guards";
9796
9859
 
9797
9860
  // src/components/Label/Label.tsx
9798
- import styled34, { css as css28 } from "styled-components";
9799
- import { jsx as jsx224 } from "react/jsx-runtime";
9861
+ import styled35, { css as css28 } from "styled-components";
9862
+ import { jsx as jsx226 } from "react/jsx-runtime";
9800
9863
  var requiredStyle = css28`
9801
9864
  &::after {
9802
9865
  color: var(--wui-color-text-error);
@@ -9808,7 +9871,7 @@ var requiredStyle = css28`
9808
9871
  var disabledStyle3 = css28`
9809
9872
  color: var(--wui-color-text-disabled);
9810
9873
  `;
9811
- var StyledLabel3 = styled34.label`
9874
+ var StyledLabel3 = styled35.label`
9812
9875
  display: block;
9813
9876
  width: 100%;
9814
9877
  color: var(--wui-color-text);
@@ -9840,7 +9903,7 @@ var Label = ({
9840
9903
  screenReaderOnly = false,
9841
9904
  ...props
9842
9905
  }) => {
9843
- return /* @__PURE__ */ jsx224(
9906
+ return /* @__PURE__ */ jsx226(
9844
9907
  StyledLabel3,
9845
9908
  {
9846
9909
  ...props,
@@ -9854,63 +9917,6 @@ var Label = ({
9854
9917
  };
9855
9918
  Label.displayName = "Label";
9856
9919
 
9857
- // src/components/FormGroup/CheckboxGroup.tsx
9858
- import { createContext as createContext4, useMemo as useMemo5 } from "react";
9859
-
9860
- // src/components/FormGroup/FormGroup.tsx
9861
- import styled35 from "styled-components";
9862
- import { useRef as useRef11 } from "react";
9863
- import { jsx as jsx225, jsxs as jsxs23 } from "react/jsx-runtime";
9864
- var StyledFieldset = styled35.fieldset`
9865
- border: 0;
9866
- `;
9867
- var StyledLegend = styled35.legend`
9868
- margin-bottom: var(--space-01);
9869
- `;
9870
- var FormGroup = ({ children, label, ...props }) => {
9871
- const ref = useRef11();
9872
- return /* @__PURE__ */ jsxs23(
9873
- Stack,
9874
- {
9875
- ...props,
9876
- ref,
9877
- renderAs: StyledFieldset,
9878
- children: [
9879
- /* @__PURE__ */ jsx225(
9880
- Heading,
9881
- {
9882
- renderAs: StyledLegend,
9883
- variant: "heading5",
9884
- children: label
9885
- }
9886
- ),
9887
- children
9888
- ]
9889
- }
9890
- );
9891
- };
9892
- FormGroup.displayName = "FormGroup";
9893
-
9894
- // src/components/FormGroup/CheckboxGroup.tsx
9895
- import { jsx as jsx226 } from "react/jsx-runtime";
9896
- var CheckboxGroupContext = createContext4(null);
9897
- var CheckboxGroup = ({
9898
- children,
9899
- name,
9900
- onChange,
9901
- value,
9902
- ...props
9903
- }) => {
9904
- const context = useMemo5(() => {
9905
- return {
9906
- name,
9907
- onChange
9908
- };
9909
- }, [name, onChange]);
9910
- return /* @__PURE__ */ jsx226(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ jsx226(FormGroup, { ...props, children }) });
9911
- };
9912
- CheckboxGroup.displayName = "CheckboxGroup";
9913
-
9914
9920
  // src/components/FormField/FormField.tsx
9915
9921
  import { Fragment as Fragment6, jsx as jsx227, jsxs as jsxs24 } from "react/jsx-runtime";
9916
9922
  var StyledFormField = styled36.div`
@@ -9986,8 +9992,8 @@ var FormField = ({
9986
9992
  value,
9987
9993
  ...props
9988
9994
  }) => {
9989
- const formState = useContext4(FormContext);
9990
- const checkboxGroup = useContext4(CheckboxGroupContext);
9995
+ const formState = useContext5(FormContext);
9996
+ const checkboxGroup = useContext5(CheckboxGroupContext);
9991
9997
  const defaultValue = formState.values[name];
9992
9998
  const isIntegratedLabel = children.type === Checkbox;
9993
9999
  const computedId = id ?? `${formState.formId}-${name}`;
@@ -10052,9 +10058,12 @@ var FormField = ({
10052
10058
  FormField.displayName = "FormField";
10053
10059
 
10054
10060
  // src/components/FormGroup/RadioGroup.tsx
10055
- import { createContext as createContext5, useMemo as useMemo6 } from "react";
10061
+ import { createContext as createContext5, useMemo as useMemo6, useContext as useContext6 } from "react";
10056
10062
  import { jsx as jsx228 } from "react/jsx-runtime";
10057
10063
  var RadioGroupContext = createContext5(null);
10064
+ var useRadioGroup = () => {
10065
+ return useContext6(RadioGroupContext);
10066
+ };
10058
10067
  var RadioGroup = ({
10059
10068
  children,
10060
10069
  name,
@@ -10295,9 +10304,9 @@ import { isNotNil as isNotNil20, isNotUndefined as isNotUndefined10 } from "@wis
10295
10304
  import { useMemo as useMemo7 } from "react";
10296
10305
 
10297
10306
  // src/components/Menu/MenuContext.tsx
10298
- import { createContext as createContext6, useContext as useContext5 } from "react";
10307
+ import { createContext as createContext6, useContext as useContext7 } from "react";
10299
10308
  var MenuContext = createContext6({ compact: false });
10300
- var useMenuContext = () => useContext5(MenuContext);
10309
+ var useMenuContext = () => useContext7(MenuContext);
10301
10310
 
10302
10311
  // src/components/Menu/Menu.tsx
10303
10312
  import { jsx as jsx232, jsxs as jsxs26 } from "react/jsx-runtime";
@@ -11523,6 +11532,11 @@ var Radio = forwardRef20(
11523
11532
  }, ref) => {
11524
11533
  const generatedId = useId3();
11525
11534
  const computedId = isNonEmptyString3(id) ? id : `wistia-ui-radio-${generatedId}`;
11535
+ const radioGroupContext = useRadioGroup();
11536
+ const contextName = radioGroupContext?.name;
11537
+ const contextOnChange = radioGroupContext?.onChange;
11538
+ const radioName = name ?? contextName;
11539
+ const handleOnChange = onChange ?? contextOnChange;
11526
11540
  return /* @__PURE__ */ jsxs35(
11527
11541
  StyledRadioWrapper,
11528
11542
  {
@@ -11537,8 +11551,8 @@ var Radio = forwardRef20(
11537
11551
  checked,
11538
11552
  disabled,
11539
11553
  id: computedId,
11540
- name,
11541
- onChange,
11554
+ name: radioName,
11555
+ onChange: handleOnChange,
11542
11556
  required,
11543
11557
  type: "radio",
11544
11558
  value
@@ -11577,7 +11591,7 @@ import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
11577
11591
  import { isNil as isNil13 } from "@wistia/type-guards";
11578
11592
 
11579
11593
  // src/components/SegmentedControl/useSelectedItemStyle.tsx
11580
- import { createContext as createContext7, useContext as useContext6, useMemo as useMemo8, useState as useState14 } from "react";
11594
+ import { createContext as createContext7, useContext as useContext8, useMemo as useMemo8, useState as useState14 } from "react";
11581
11595
  import { jsx as jsx250 } from "react/jsx-runtime";
11582
11596
  var SelectedItemStyleContext = createContext7(null);
11583
11597
  var SelectedItemStyleProvider = ({
@@ -11604,7 +11618,7 @@ var SelectedItemStyleProvider = ({
11604
11618
  return /* @__PURE__ */ jsx250(SelectedItemStyleContext.Provider, { value: contextValue, children });
11605
11619
  };
11606
11620
  var useSelectedItemStyle = () => {
11607
- const context = useContext6(SelectedItemStyleContext);
11621
+ const context = useContext8(SelectedItemStyleContext);
11608
11622
  if (context === null) {
11609
11623
  throw new Error("useSelectedItemStyle must be used within a SelectedItemStyleProvider");
11610
11624
  }
@@ -11615,11 +11629,11 @@ var useSelectedItemStyle = () => {
11615
11629
  import styled54 from "styled-components";
11616
11630
 
11617
11631
  // src/components/SegmentedControl/useSegmentedControlValue.tsx
11618
- import { createContext as createContext8, useContext as useContext7 } from "react";
11632
+ import { createContext as createContext8, useContext as useContext9 } from "react";
11619
11633
  var SegmentedControlValueContext = createContext8(null);
11620
11634
  var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
11621
11635
  var useSegmentedControlValue = () => {
11622
- const context = useContext7(SegmentedControlValueContext);
11636
+ const context = useContext9(SegmentedControlValueContext);
11623
11637
  if (context === null) {
11624
11638
  throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
11625
11639
  }
@@ -11769,7 +11783,7 @@ var StyledSegmentedControlItem = styled56(ToggleGroupItem)`
11769
11783
  ${segmentedControlItemStyles}
11770
11784
  `;
11771
11785
  var SegmentedControlItem = forwardRef22(
11772
- ({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11786
+ ({ disabled, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
11773
11787
  const selectedValue = useSegmentedControlValue();
11774
11788
  const { setSelectedItemMeasurements } = useSelectedItemStyle();
11775
11789
  const buttonRef = useRef13(null);
@@ -11810,6 +11824,7 @@ var SegmentedControlItem = forwardRef22(
11810
11824
  StyledSegmentedControlItem,
11811
11825
  {
11812
11826
  ref: combinedRef,
11827
+ ...otherProps,
11813
11828
  $hasLabel: isNotNil28(label),
11814
11829
  "aria-label": isNotNil28(label) ? void 0 : ariaLabel,
11815
11830
  disabled,
@@ -12250,7 +12265,7 @@ var TableBody = ({ children, ...props }) => {
12250
12265
  };
12251
12266
 
12252
12267
  // src/components/Table/TableCell.tsx
12253
- import { useContext as useContext8 } from "react";
12268
+ import { useContext as useContext10 } from "react";
12254
12269
  import styled63, { css as css38 } from "styled-components";
12255
12270
  import { jsx as jsx259 } from "react/jsx-runtime";
12256
12271
  var sharedStyles = css38`
@@ -12271,7 +12286,7 @@ var StyledTd = styled63.td`
12271
12286
  line-height: var(--wui-typography-body-2-line-height);
12272
12287
  `;
12273
12288
  var TableCell = ({ children, ...props }) => {
12274
- const section = useContext8(TableSectionContext);
12289
+ const section = useContext10(TableSectionContext);
12275
12290
  if (section === "head") {
12276
12291
  return /* @__PURE__ */ jsx259(StyledTh, { ...props, children });
12277
12292
  }
@@ -12364,11 +12379,11 @@ import { Trigger as RadixTab } from "@radix-ui/react-tabs";
12364
12379
  import { isNotNil as isNotNil30 } from "@wistia/type-guards";
12365
12380
 
12366
12381
  // src/components/Tabs/useTabsValue.tsx
12367
- import { createContext as createContext10, useContext as useContext9 } from "react";
12382
+ import { createContext as createContext10, useContext as useContext11 } from "react";
12368
12383
  var TabsValueContext = createContext10(null);
12369
12384
  var TabsValueProvider = TabsValueContext.Provider;
12370
12385
  var useTabsValue = () => {
12371
- const context = useContext9(TabsValueContext);
12386
+ const context = useContext11(TabsValueContext);
12372
12387
  if (context === null) {
12373
12388
  throw new Error("useTabsValue must be used within a TabsValueProvider");
12374
12389
  }