@wistia/ui 0.5.2 → 0.5.3-beta.237d1185.e755523

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.5.2
3
+ * @license @wistia/ui v0.5.3-beta.237d1185.e755523
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -56,6 +56,7 @@ __export(index_exports, {
56
56
  DataCardTrend: () => DataCardTrend,
57
57
  DataCards: () => DataCards,
58
58
  Divider: () => Divider,
59
+ EditableHeading: () => EditableHeading,
59
60
  Ellipsis: () => Ellipsis,
60
61
  Form: () => Form,
61
62
  FormErrorSummary: () => FormErrorSummary,
@@ -85,6 +86,8 @@ __export(index_exports, {
85
86
  SelectOptionGroup: () => SelectOptionGroup,
86
87
  Stack: () => Stack,
87
88
  SubMenu: () => SubMenu,
89
+ Tab: () => Tab,
90
+ Tabs: () => Tabs,
88
91
  Tag: () => Tag,
89
92
  Text: () => Text,
90
93
  Tooltip: () => Tooltip,
@@ -2080,9 +2083,9 @@ var import_react6 = require("react");
2080
2083
  // src/private/hooks/useEvent/useEvent.ts
2081
2084
  var import_react5 = require("react");
2082
2085
 
2083
- // src/private/helpers/isObjectRef/isObjectRef.ts
2086
+ // src/private/helpers/isValidRef/isValidRef.ts
2084
2087
  var import_type_guards6 = require("@wistia/type-guards");
2085
- var isObjectRef = (value) => {
2088
+ var isValidRef = (value) => {
2086
2089
  return (0, import_type_guards6.isNotNil)(value) && (0, import_type_guards6.isRecord)(value) && "current" in value;
2087
2090
  };
2088
2091
 
@@ -2102,7 +2105,7 @@ var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}
2102
2105
  savedEventOptions.current = eventOptions;
2103
2106
  }, [eventOptions]);
2104
2107
  (0, import_react5.useEffect)(() => {
2105
- const target = isObjectRef(eventTarget) ? eventTarget.current : eventTarget;
2108
+ const target = isValidRef(eventTarget) ? eventTarget.current : eventTarget;
2106
2109
  if (!eventName || !isEventTargetSupported(target)) {
2107
2110
  return;
2108
2111
  }
@@ -7173,75 +7176,856 @@ var Checkbox = (0, import_react19.forwardRef)(
7173
7176
  );
7174
7177
  Checkbox.displayName = "Checkbox";
7175
7178
 
7176
- // src/components/Divider/Divider.tsx
7179
+ // src/components/DataCards/DataCard.tsx
7177
7180
  var import_styled_components34 = __toESM(require("styled-components"));
7181
+ var import_type_guards21 = require("@wistia/type-guards");
7178
7182
  var import_jsx_runtime176 = require("react/jsx-runtime");
7179
- var horizontalBorderCss = import_styled_components34.css`
7180
- border-top-color: var(--wui-color-border);
7181
- border-top-style: solid;
7182
- border-top-width: 1px;
7183
- clear: both; /* for horizontal dividers, ensure it clears any floats */
7184
- height: 0;
7183
+ var StyledDataCard = import_styled_components34.default.div`
7184
+ ${({ $colorScheme }) => getColorScheme($colorScheme)}
7185
+ display: grid;
7186
+ grid-template-areas: 'label slot' 'value value';
7187
+ grid-template-rows: auto auto;
7188
+ grid-template-columns: auto auto;
7189
+ gap: var(--wui-space-01);
7190
+ padding: var(--wui-space-03);
7191
+ background: var(--wui-color-bg-surface-secondary);
7192
+ flex: 1;
7193
+ border-radius: var(--wui-border-radius-02);
7194
+ position: relative;
7185
7195
  `;
7186
- var verticalBorderCss = import_styled_components34.css`
7187
- background-color: var(--wui-color-border);
7188
- max-width: 1px;
7189
- min-height: 100%;
7190
- width: 1px;
7196
+ var shimmer = import_styled_components34.keyframes`
7197
+ 0% {
7198
+ background-position: 200% 0;
7199
+ }
7200
+ 100% {
7201
+ background-position: -200% 0;
7202
+ }
7203
+ `;
7204
+ var LoadingBackground = import_styled_components34.default.div`
7205
+ background: linear-gradient(
7206
+ 90deg,
7207
+ var(--wui-color-bg-surface-tertiary) 25%,
7208
+ var(--wui-color-bg-surface-secondary) 37%,
7209
+ var(--wui-color-bg-surface-tertiary) 63%
7210
+ );
7211
+ background-size: 200% 100%;
7212
+ animation: ${shimmer} 1.5s infinite;
7213
+ border-radius: var(--wui-border-radius-01);
7214
+ `;
7215
+ var StyledLoadingLabel = (0, import_styled_components34.default)(LoadingBackground)`
7216
+ width: 80px;
7217
+ height: var(--wui-typography-heading-6-line-height);
7218
+ `;
7219
+ var StyledLoadingValue = (0, import_styled_components34.default)(LoadingBackground)`
7220
+ width: 90%;
7221
+ height: var(--wui-typography-heading-3-line-height);
7222
+ `;
7223
+ var StyledLabel3 = (0, import_styled_components34.default)(Heading)`
7224
+ grid-area: label;
7225
+ `;
7226
+ var StyledValue = (0, import_styled_components34.default)(Heading)`
7227
+ grid-area: value;
7228
+ `;
7229
+ var StyledSlot = import_styled_components34.default.div`
7230
+ display: flex;
7231
+ justify-content: flex-end;
7232
+ grid-area: slot;
7233
+ align-self: center;
7234
+ `;
7235
+ var StyledDataCardTrendContainer = import_styled_components34.default.div`
7236
+ position: absolute;
7237
+ bottom: var(--wui-space-01);
7238
+ right: var(--wui-space-01);
7239
+ `;
7240
+ var DataCard = ({
7241
+ label,
7242
+ value,
7243
+ upperRightSlot,
7244
+ colorScheme = "inherit",
7245
+ isLoading = false,
7246
+ trend,
7247
+ ...props
7248
+ }) => /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
7249
+ StyledDataCard,
7250
+ {
7251
+ $colorScheme: colorScheme,
7252
+ ...props,
7253
+ children: [
7254
+ /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
7255
+ StyledLabel3,
7256
+ {
7257
+ renderAs: "dt",
7258
+ variant: "heading6",
7259
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(StyledLoadingLabel, {}) : label
7260
+ }
7261
+ ),
7262
+ /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
7263
+ StyledValue,
7264
+ {
7265
+ renderAs: "dd",
7266
+ variant: "heading3",
7267
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(StyledLoadingValue, {}) : value
7268
+ }
7269
+ ),
7270
+ (0, import_type_guards21.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(StyledSlot, { children: upperRightSlot }),
7271
+ (0, import_type_guards21.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(StyledDataCardTrendContainer, { children: trend })
7272
+ ]
7273
+ }
7274
+ );
7275
+ DataCard.displayName = "DataCard";
7276
+
7277
+ // src/components/DataCards/DataCards.tsx
7278
+ var import_styled_components35 = __toESM(require("styled-components"));
7279
+ var import_jsx_runtime177 = require("react/jsx-runtime");
7280
+ var StyledDataCards = (0, import_styled_components35.default)(Box)`
7281
+ ${({ $colorScheme }) => getColorScheme($colorScheme)};
7282
+ margin-top: 0; /* Remove default <dl> style */
7283
+ > * {
7284
+ min-width: 120px;
7285
+ max-width: ${({ $cardMaxWidth }) => $cardMaxWidth};
7286
+ }
7287
+ `;
7288
+ var DataCards = ({
7289
+ children,
7290
+ cardMaxWidth = "none",
7291
+ colorScheme = "inherit",
7292
+ ...props
7293
+ }) => {
7294
+ return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
7295
+ StyledDataCards,
7296
+ {
7297
+ ...props,
7298
+ $cardMaxWidth: cardMaxWidth,
7299
+ $colorScheme: colorScheme,
7300
+ direction: "row",
7301
+ fill: "horizontal",
7302
+ gap: "space-02",
7303
+ renderAs: "dl",
7304
+ wrapItems: true,
7305
+ children
7306
+ }
7307
+ );
7308
+ };
7309
+ DataCards.displayName = "DataCards";
7310
+
7311
+ // src/components/DataCards/DataCardTrend.tsx
7312
+ var import_styled_components37 = __toESM(require("styled-components"));
7313
+
7314
+ // src/components/Text/Text.tsx
7315
+ var import_react20 = require("react");
7316
+ var import_styled_components36 = __toESM(require("styled-components"));
7317
+ var import_jsx_runtime178 = require("react/jsx-runtime");
7318
+ var bodyBoldStyles = import_styled_components36.css`
7319
+ > strong,
7320
+ b {
7321
+ font-weight: var(--wui-typography-weight-body-bold);
7322
+ }
7323
+ `;
7324
+ var labelBoldStyles = import_styled_components36.css`
7325
+ > strong,
7326
+ b {
7327
+ font-weight: var(--wui-typography-weight-label-bold);
7328
+ }
7329
+ `;
7330
+ var body1TextStyle = import_styled_components36.css`
7331
+ --font-family: var(--wui-typography-body-1-family);
7332
+ --font-size: var(--wui-typography-body-1-size);
7333
+ --font-weight: var(--wui-typography-body-1-weight);
7334
+ --line-height: var(--wui-typography-body-1-line-height);
7335
+ ${bodyBoldStyles}
7336
+ `;
7337
+ var body2TextStyle = import_styled_components36.css`
7338
+ --font-family: var(--wui-typography-body-2-family);
7339
+ --font-size: var(--wui-typography-body-2-size);
7340
+ --font-weight: var(--wui-typography-body-2-weight);
7341
+ --line-height: var(--wui-typography-body-2-line-height);
7342
+ ${bodyBoldStyles}
7343
+ `;
7344
+ var body3TextStyle = import_styled_components36.css`
7345
+ --font-family: var(--wui-typography-body-3-family);
7346
+ --font-size: var(--wui-typography-body-3-size);
7347
+ --font-weight: var(--wui-typography-body-3-weight);
7348
+ --line-height: var(--wui-typography-body-3-line-height);
7349
+ ${bodyBoldStyles}
7350
+ `;
7351
+ var body4TextStyle = import_styled_components36.css`
7352
+ --font-family: var(--wui-typography-body-4-family);
7353
+ --font-size: var(--wui-typography-body-4-size);
7354
+ --font-weight: var(--wui-typography-body-4-weight);
7355
+ --line-height: var(--wui-typography-body-4-line-height);
7356
+ ${bodyBoldStyles}
7357
+ `;
7358
+ var label1TextStyle = import_styled_components36.css`
7359
+ --font-family: var(--wui-typography-label-1-family);
7360
+ --font-size: var(--wui-typography-label-1-size);
7361
+ --font-weight: var(--wui-typography-label-1-weight);
7362
+ --line-height: var(--wui-typography-label-1-line-height);
7363
+ ${labelBoldStyles}
7364
+ `;
7365
+ var label2TextStyle = import_styled_components36.css`
7366
+ --font-family: var(--wui-typography-label-2-family);
7367
+ --font-size: var(--wui-typography-label-2-size);
7368
+ --font-weight: var(--wui-typography-label-2-weight);
7369
+ --line-height: var(--wui-typography-label-2-line-height);
7370
+ ${labelBoldStyles}
7371
+ `;
7372
+ var label3TextStyle = import_styled_components36.css`
7373
+ --font-family: var(--wui-typography-label-3-family);
7374
+ --font-size: var(--wui-typography-label-3-size);
7375
+ --font-weight: var(--wui-typography-label-3-weight);
7376
+ --line-height: var(--wui-typography-label-3-line-height);
7377
+ ${labelBoldStyles}
7378
+ `;
7379
+ var label4TextStyle = import_styled_components36.css`
7380
+ --font-family: var(--wui-typography-label-4-family);
7381
+ --font-size: var(--wui-typography-label-4-size);
7382
+ --font-weight: var(--wui-typography-label-4-weight);
7383
+ --line-height: var(--wui-typography-label-4-line-height);
7384
+ ${labelBoldStyles}
7385
+ `;
7386
+ var body1MonoTextStyle = import_styled_components36.css`
7387
+ ${body1TextStyle};
7388
+ --font-family: var(--wui-typography-family-mono);
7389
+ `;
7390
+ var body2MonoTextStyle = import_styled_components36.css`
7391
+ ${body2TextStyle};
7392
+ --font-family: var(--wui-typography-family-mono);
7393
+ `;
7394
+ var body3MonoTextStyle = import_styled_components36.css`
7395
+ ${body3TextStyle};
7396
+ --font-family: var(--wui-typography-family-mono);
7397
+ `;
7398
+ var body4MonoTextStyle = import_styled_components36.css`
7399
+ ${body4TextStyle};
7400
+ --font-family: var(--wui-typography-family-mono);
7401
+ `;
7402
+ var variantStyleMap2 = {
7403
+ body1: body1TextStyle,
7404
+ body2: body2TextStyle,
7405
+ body3: body3TextStyle,
7406
+ body4: body4TextStyle,
7407
+ body1Mono: body1MonoTextStyle,
7408
+ body2Mono: body2MonoTextStyle,
7409
+ body3Mono: body3MonoTextStyle,
7410
+ body4Mono: body4MonoTextStyle,
7411
+ label1: label1TextStyle,
7412
+ label2: label2TextStyle,
7413
+ label3: label3TextStyle,
7414
+ label4: label4TextStyle
7415
+ };
7416
+ var StyledText = import_styled_components36.default.div`
7417
+ ${({ $colorScheme }) => getColorScheme($colorScheme)};
7418
+ --text-color: ${({ $prominence, $disabled }) => {
7419
+ if ($disabled) {
7420
+ return "var(--wui-color-text-disabled)";
7421
+ }
7422
+ if ($prominence === "secondary") {
7423
+ return "var(--wui-color-text-secondary)";
7424
+ }
7425
+ if ($prominence === "button") {
7426
+ return "var(--wui-color-text-button)";
7427
+ }
7428
+ return "var(--wui-color-text)";
7429
+ }};
7430
+
7431
+ color: var(--text-color);
7432
+ font-family: var(--font-family);
7433
+ font-size: var(--font-size);
7434
+ font-weight: var(--font-weight);
7435
+ line-height: var(--line-height);
7436
+ font-style: normal;
7437
+ margin: 0;
7438
+ ${({ $variant }) => variantStyleMap2[$variant]}
7439
+ ${({ $ellipsis }) => $ellipsis && ellipsisStyle};
7440
+ ${({ $inline }) => $inline && import_styled_components36.css`
7441
+ display: inline-block;
7442
+ `}
7443
+ ${({ $disabled }) => $disabled && import_styled_components36.css`
7444
+ --text-color: var(--wui-color-text-disabled);
7445
+ `}
7446
+ ${({ $preventUserSelect }) => $preventUserSelect && import_styled_components36.css`
7447
+ user-select: none;
7448
+ `}
7449
+ ${({ $align }) => import_styled_components36.css`
7450
+ text-align: ${$align};
7451
+ `}
7452
+ ${({ as }) => as === "p" && import_styled_components36.css`
7453
+ display: block;
7454
+ `}
7455
+ `;
7456
+ var DEFAULT_ELEMENT3 = "div";
7457
+ var TextComponent = (0, import_react20.forwardRef)(
7458
+ ({
7459
+ align = "left",
7460
+ colorScheme = "inherit",
7461
+ disabled = false,
7462
+ ellipsis = false,
7463
+ inline = false,
7464
+ preventUserSelect = false,
7465
+ prominence = "primary",
7466
+ variant = "body2",
7467
+ renderAs,
7468
+ ...otherProps
7469
+ }, ref) => {
7470
+ return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
7471
+ StyledText,
7472
+ {
7473
+ ref,
7474
+ $align: align,
7475
+ $colorScheme: colorScheme,
7476
+ $disabled: disabled,
7477
+ $ellipsis: ellipsis,
7478
+ $inline: inline,
7479
+ $preventUserSelect: preventUserSelect,
7480
+ $prominence: prominence,
7481
+ $variant: variant,
7482
+ as: renderAs ?? DEFAULT_ELEMENT3,
7483
+ ...otherProps
7484
+ }
7485
+ );
7486
+ }
7487
+ );
7488
+ TextComponent.displayName = "Text";
7489
+ var Text = makePolymorphic(TextComponent);
7490
+
7491
+ // src/components/DataCards/DataCardTrend.tsx
7492
+ var import_jsx_runtime179 = require("react/jsx-runtime");
7493
+ var StyledDataCardTrend = import_styled_components37.default.div`
7494
+ ${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
7495
+ background: var(--wui-color-bg-app);
7496
+ border-radius: var(--wui-border-radius-rounded);
7497
+ padding: var(--wui-space-01);
7498
+ display: flex;
7499
+ align-items: center;
7500
+ gap: 2px;
7501
+ `;
7502
+ var DataCardTrend = ({
7503
+ direction = "up",
7504
+ outlook = "positive",
7505
+ children,
7506
+ ...props
7507
+ }) => {
7508
+ return /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
7509
+ /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
7510
+ Icon,
7511
+ {
7512
+ size: "md",
7513
+ type: direction === "up" ? "arrow-up" : "arrow-down",
7514
+ ...props
7515
+ }
7516
+ ),
7517
+ /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
7518
+ Text,
7519
+ {
7520
+ prominence: "secondary",
7521
+ variant: "label4",
7522
+ children
7523
+ }
7524
+ )
7525
+ ] });
7526
+ };
7527
+
7528
+ // src/components/Divider/Divider.tsx
7529
+ var import_styled_components38 = __toESM(require("styled-components"));
7530
+ var import_jsx_runtime180 = require("react/jsx-runtime");
7531
+ var horizontalBorderCss = import_styled_components38.css`
7532
+ border-top-color: var(--wui-color-border);
7533
+ border-top-style: solid;
7534
+ border-top-width: 1px;
7535
+ clear: both; /* for horizontal dividers, ensure it clears any floats */
7536
+ height: 0;
7537
+ `;
7538
+ var verticalBorderCss = import_styled_components38.css`
7539
+ background-color: var(--wui-color-border);
7540
+ max-width: 1px;
7541
+ min-height: 100%;
7542
+ width: 1px;
7543
+ `;
7544
+ var DividerComponent = import_styled_components38.default.div`
7545
+ ${({ $orientation }) => {
7546
+ switch ($orientation) {
7547
+ case "vertical":
7548
+ return verticalBorderCss;
7549
+ case "horizontal":
7550
+ default:
7551
+ return horizontalBorderCss;
7552
+ }
7553
+ }}
7554
+ `;
7555
+ var Divider = ({
7556
+ orientation = "horizontal",
7557
+ ...otherProps
7558
+ }) => {
7559
+ return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
7560
+ DividerComponent,
7561
+ {
7562
+ $orientation: orientation,
7563
+ "aria-orientation": orientation,
7564
+ role: "separator",
7565
+ ...otherProps
7566
+ }
7567
+ );
7568
+ };
7569
+ Divider.displayName = "Divider";
7570
+
7571
+ // src/components/EditableHeading/EditableHeading.tsx
7572
+ var import_styled_components42 = __toESM(require("styled-components"));
7573
+ var import_react22 = require("react");
7574
+
7575
+ // src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
7576
+ var import_styled_components39 = __toESM(require("styled-components"));
7577
+ var import_type_guards22 = require("@wistia/type-guards");
7578
+ var import_jsx_runtime181 = require("react/jsx-runtime");
7579
+ var VisuallyHidden = import_styled_components39.default.div({ ...visuallyHiddenStyle });
7580
+ var VisuallyHiddenButFocusable = import_styled_components39.default.div({
7581
+ "&:not(:focus-within)": visuallyHiddenStyle
7582
+ });
7583
+ var ScreenReaderOnly = ({
7584
+ text,
7585
+ children,
7586
+ focusable = false,
7587
+ ...otherProps
7588
+ }) => {
7589
+ const accessibleText = (0, import_type_guards22.isNotNil)(text) ? text : children;
7590
+ if (focusable) {
7591
+ return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
7592
+ }
7593
+ return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
7594
+ };
7595
+ ScreenReaderOnly.displayName = "ScreenReaderOnly";
7596
+
7597
+ // src/components/Tooltip/Tooltip.tsx
7598
+ var import_react_tooltip2 = require("@radix-ui/react-tooltip");
7599
+ var import_styled_components40 = __toESM(require("styled-components"));
7600
+ var import_jsx_runtime182 = require("react/jsx-runtime");
7601
+ var CompactTooltipStyles = import_styled_components40.css`
7602
+ --tooltip-font-size: var(--wui-typography-label-4-size);
7603
+ --tooltip-line-height: var(--wui-typography-label-4-line-height);
7604
+ --tooltip-font-weight: var(--wui-typography-label-4-weight);
7605
+ --tooltip-horizontal-padding: var(--wui-space-02);
7606
+ --tooltip-vertical-padding: var(--wui-space-03);
7607
+ `;
7608
+ var StyledContent = (0, import_styled_components40.default)(import_react_tooltip2.Content)`
7609
+ --tooltip-font-family: var(--wui-typography-family-default);
7610
+ --tooltip-border-radius: var(--wui-border-radius-05);
7611
+ --tooltip-bg: var(--wui-color-bg-tooltip);
7612
+ --tooltip-color: var(--wui-color-text-on-fill);
7613
+ --tooltip-font-size: var(--wui-typography-label-3-size);
7614
+ --tooltip-line-height: var(--wui-typography-label-3-line-height);
7615
+ --tooltip-font-weight: var(--wui-typography-label-3-weight);
7616
+ --tooltip-horizontal-padding: var(--wui-space-03);
7617
+ --tooltip-vertical-padding: var(--wui-space-03);
7618
+
7619
+ ${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
7620
+
7621
+ font-family: var(--tooltip-font-family);
7622
+ font-size: var(--tooltip-font-size);
7623
+ border-radius: var(--tooltip-border-radius);
7624
+ padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
7625
+ background-color: var(--tooltip-bg);
7626
+ color: var(--tooltip-color);
7627
+ user-select: none;
7628
+ animation-duration: 400ms;
7629
+ animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
7630
+ will-change: transform, opacity;
7631
+ max-width: 30em;
7632
+
7633
+ &[data-state='delayed-open'][data-side='top'] {
7634
+ animation-name: slideDownAndFade;
7635
+ }
7636
+
7637
+ &[data-state='delayed-open'][data-side='right'] {
7638
+ animation-name: slideLeftAndFade;
7639
+ }
7640
+
7641
+ &[data-state='delayed-open'][data-side='bottom'] {
7642
+ animation-name: slideUpAndFade;
7643
+ }
7644
+
7645
+ &[data-state='delayed-open'][data-side='left'] {
7646
+ animation-name: slideRightAndFade;
7647
+ }
7648
+ `;
7649
+ var VISUAL_OFFSET = 6;
7650
+ var Tooltip = ({
7651
+ delay = 700,
7652
+ direction = "top",
7653
+ content,
7654
+ children,
7655
+ forceOpen,
7656
+ compact = false,
7657
+ hideArrow = false
7658
+ }) => {
7659
+ const rootProps = {};
7660
+ if (content === "" || content === null) {
7661
+ rootProps.open = false;
7662
+ }
7663
+ if (forceOpen === true) {
7664
+ rootProps.open = true;
7665
+ }
7666
+ return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
7667
+ import_react_tooltip2.Root,
7668
+ {
7669
+ delayDuration: delay,
7670
+ ...rootProps,
7671
+ children: [
7672
+ /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
7673
+ /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
7674
+ StyledContent,
7675
+ {
7676
+ $compact: compact,
7677
+ side: direction,
7678
+ sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
7679
+ children: [
7680
+ content,
7681
+ !hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
7682
+ "svg",
7683
+ {
7684
+ fill: "var(--tooltip-bg)",
7685
+ height: "8",
7686
+ style: { transform: "translateY(-2px)" },
7687
+ viewBox: "0 0 12 8",
7688
+ width: "12",
7689
+ xmlns: "http://www.w3.org/2000/svg",
7690
+ children: /* @__PURE__ */ (0, import_jsx_runtime182.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" })
7691
+ }
7692
+ ) }) : null
7693
+ ]
7694
+ }
7695
+ ) })
7696
+ ]
7697
+ }
7698
+ );
7699
+ };
7700
+ Tooltip.displayName = "Tooltip";
7701
+
7702
+ // src/components/Input/Input.tsx
7703
+ var import_react21 = require("react");
7704
+ var import_styled_components41 = __toESM(require("styled-components"));
7705
+ var import_type_guards23 = require("@wistia/type-guards");
7706
+ var import_jsx_runtime183 = require("react/jsx-runtime");
7707
+ var inputStyles = import_styled_components41.css`
7708
+ --wui-input-color-bg: var(--wui-color-bg-surface);
7709
+ --wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
7710
+ --wui-input-color-border: var(--wui-color-border);
7711
+ --wui-input-color-border-focus: var(--wui-color-border-active);
7712
+ --wui-input-color-border-error: var(--wui-color-border-error);
7713
+ --wui-input-color-border-disabled: var(--wui-color-border-disabled);
7714
+ --wui-input-border-radius: var(--wui-border-radius-rounded);
7715
+ --wui-input-multiline-border-radius: var(--wui-border-radius-02);
7716
+ --wui-input-vertical-padding: var(--wui-space-02);
7717
+ --wui-input-horizontal-padding: var(--wui-space-03);
7718
+ --wui-input-placeholder: var(--wui-gray-10);
7719
+ --wui-input-color-text-error: var(--wui-color-text-error);
7720
+
7721
+ input,
7722
+ textarea {
7723
+ padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
7724
+ background-color: var(--wui-input-color-bg);
7725
+ border: 1px solid var(--wui-input-color-border);
7726
+ border-radius: var(--wui-input-border-radius);
7727
+
7728
+ &::placeholder {
7729
+ color: var(--wui-input-placeholder);
7730
+ opacity: 1; /* Firefox */
7731
+ }
7732
+
7733
+ &:focus {
7734
+ border-color: var(--wui-input-color-border-focus);
7735
+ }
7736
+
7737
+ &[aria-invalid='true'] {
7738
+ border-color: var(--wui-input-color-border-error);
7739
+ color: var(--wui-input-color-text-error);
7740
+ }
7741
+
7742
+ &:disabled {
7743
+ border-color: var(--wui-color-bg-surface-disabled);
7744
+ background-color: var(--wui-color-bg-surface-disabled);
7745
+ }
7746
+ }
7747
+ `;
7748
+ var StyledInputContainer = import_styled_components41.default.div`
7749
+ display: inline-flex;
7750
+ position: relative;
7751
+ ${inputStyles};
7752
+ width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
7753
+
7754
+ input,
7755
+ textarea {
7756
+ width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
7757
+ ${({ $monospace }) => $monospace && "font-family: var(--wui-typography-family-mono);"}
7758
+ }
7759
+
7760
+ textarea {
7761
+ border-radius: var(--wui-input-multiline-border-radius);
7762
+ }
7763
+
7764
+ .wui-input-left-icon {
7765
+ display: flex;
7766
+ align-items: center;
7767
+ position: absolute;
7768
+ top: 50%;
7769
+ left: var(--wui-input-horizontal-padding);
7770
+ transform: translateY(-50%);
7771
+ }
7772
+
7773
+ :has(.wui-input-left-icon) input,
7774
+ :has(.wui-input-left-icon) textarea {
7775
+ padding-left: 32px;
7776
+ }
7777
+
7778
+ .wui-input-right-icon {
7779
+ display: flex;
7780
+ align-items: center;
7781
+ position: absolute;
7782
+ top: 50%;
7783
+ right: var(--wui-input-horizontal-padding);
7784
+ transform: translateY(-50%);
7785
+ }
7786
+
7787
+ :has(.wui-input-right-icon) input,
7788
+ :has(.wui-input-right-icon) textarea {
7789
+ padding-right: 32px;
7790
+ }
7791
+ `;
7792
+ var isValidRef2 = (ref) => {
7793
+ return typeof ref === "object" && ref !== null && "current" in ref && (0, import_type_guards23.isNotNil)(ref.current);
7794
+ };
7795
+ var Input = (0, import_react21.forwardRef)(
7796
+ ({
7797
+ fullWidth = false,
7798
+ monospace = false,
7799
+ type = "text",
7800
+ autoSelect = false,
7801
+ leftIcon,
7802
+ rightIcon,
7803
+ ...props
7804
+ }, externalRef) => {
7805
+ const internalRef = (0, import_react21.useRef)();
7806
+ const ref = isValidRef2(externalRef) ? externalRef : internalRef;
7807
+ let leftIconToDisplay = leftIcon;
7808
+ if ((0, import_type_guards23.isNil)(leftIcon) && type === "search") {
7809
+ leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(Icon, { type: "search" });
7810
+ }
7811
+ if ((0, import_type_guards23.isNotNil)(leftIconToDisplay)) {
7812
+ leftIconToDisplay = (0, import_react21.cloneElement)(leftIconToDisplay, {
7813
+ size: "md",
7814
+ className: "wui-input-left-icon"
7815
+ });
7816
+ }
7817
+ let rightIconToDisplay = rightIcon;
7818
+ if ((0, import_type_guards23.isNotNil)(rightIconToDisplay)) {
7819
+ rightIconToDisplay = (0, import_react21.cloneElement)(rightIconToDisplay, {
7820
+ size: "md",
7821
+ className: "wui-input-right-icon"
7822
+ });
7823
+ }
7824
+ const handleFocus = (event) => {
7825
+ if ((0, import_type_guards23.isNotNil)(props.onFocus)) {
7826
+ props.onFocus(event);
7827
+ }
7828
+ if (autoSelect && ref && "current" in ref) {
7829
+ requestAnimationFrame(() => {
7830
+ ref.current?.select();
7831
+ });
7832
+ }
7833
+ };
7834
+ return /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(
7835
+ StyledInputContainer,
7836
+ {
7837
+ $fullWidth: fullWidth,
7838
+ $monospace: monospace,
7839
+ children: [
7840
+ leftIconToDisplay ?? null,
7841
+ type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
7842
+ "textarea",
7843
+ {
7844
+ ...props,
7845
+ ref,
7846
+ onFocus: handleFocus
7847
+ }
7848
+ ) : /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
7849
+ "input",
7850
+ {
7851
+ ...props,
7852
+ ref,
7853
+ onFocus: handleFocus,
7854
+ type
7855
+ }
7856
+ ),
7857
+ rightIconToDisplay ?? null
7858
+ ]
7859
+ }
7860
+ );
7861
+ }
7862
+ );
7863
+ Input.displayName = "Input";
7864
+
7865
+ // src/components/EditableHeading/EditableHeading.tsx
7866
+ var import_jsx_runtime184 = require("react/jsx-runtime");
7867
+ var StyledInput = (0, import_styled_components42.default)(Input)`
7868
+ :not([rows]) {
7869
+ min-height: unset;
7870
+ }
7871
+
7872
+ resize: vertical;
7873
+ font-size: var(--wui-typography-heading-1-size);
7874
+ font-weight: var(--wui-typography-heading-1-weight);
7875
+ line-height: var(--wui-typography-heading-1-line-height);
7876
+ font-family: var(--wui-typography-heading-1-family);
7877
+ outline: 2px solid var(--wui-color-focus-ring);
7878
+ outline-offset: -2px;
7879
+
7880
+ && {
7881
+ width: 100%;
7882
+ padding: var(--wui-space-02);
7883
+ border: none;
7884
+ height: ${({ $height }) => `${$height}px`};
7885
+ }
7191
7886
  `;
7192
- var DividerComponent = import_styled_components34.default.div`
7193
- ${({ $orientation }) => {
7194
- switch ($orientation) {
7195
- case "vertical":
7196
- return verticalBorderCss;
7197
- case "horizontal":
7198
- default:
7199
- return horizontalBorderCss;
7887
+ var editableStyles = import_styled_components42.css`
7888
+ &:has(+ :focus-within) {
7889
+ background: var(--wui-color-bg-surface-hover);
7890
+ }
7891
+
7892
+ &:hover {
7893
+ background: var(--wui-color-bg-surface-hover);
7894
+ cursor: pointer;
7200
7895
  }
7201
- }}
7202
7896
  `;
7203
- var Divider = ({
7204
- orientation = "horizontal",
7205
- ...otherProps
7897
+ var StyledHeading2 = (0, import_styled_components42.default)(Heading)`
7898
+ width: 100%;
7899
+ border-radius: var(--wui-border-radius-02);
7900
+ padding: var(--wui-space-02);
7901
+ overflow-wrap: anywhere;
7902
+ transition: all var(--wui-motion-duration-01) var(--wui-motion-ease);
7903
+ ${({ $editingDisabled }) => !$editingDisabled && editableStyles}
7904
+ `;
7905
+ var EditableHeading = ({
7906
+ children,
7907
+ onValueChange,
7908
+ onEditingChange,
7909
+ tooltipText = "Click to edit title",
7910
+ ariaLabel = "Edit title",
7911
+ forceEditing = false,
7912
+ editingDisabled = false
7206
7913
  }) => {
7207
- return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
7208
- DividerComponent,
7914
+ const [isEditing, setIsEditing] = (0, import_react22.useState)(false);
7915
+ const [value, setValue] = (0, import_react22.useState)(children);
7916
+ const [previousValue, setPreviousValue] = (0, import_react22.useState)(children);
7917
+ const [headingHeight, setHeadingHeight] = (0, import_react22.useState)("60");
7918
+ const headingRef = (0, import_react22.useRef)(null);
7919
+ const handleSetEditing = (editing) => {
7920
+ if (editingDisabled) return;
7921
+ if (editing && headingRef.current) {
7922
+ setHeadingHeight(`${headingRef.current.offsetHeight}`);
7923
+ }
7924
+ if (editing) {
7925
+ setPreviousValue(value);
7926
+ }
7927
+ setIsEditing(editing);
7928
+ onEditingChange?.(editing);
7929
+ };
7930
+ const handleFinishEditing = () => {
7931
+ const trimmedValue = value.trim();
7932
+ if (trimmedValue === "") {
7933
+ setValue(previousValue);
7934
+ } else if (trimmedValue !== previousValue && onValueChange) {
7935
+ onValueChange(trimmedValue);
7936
+ } else {
7937
+ setValue(trimmedValue);
7938
+ }
7939
+ handleSetEditing(false);
7940
+ };
7941
+ const handleKeyDown = (event) => {
7942
+ if (event.key === "Enter" && !event.shiftKey) {
7943
+ event.preventDefault();
7944
+ handleFinishEditing();
7945
+ }
7946
+ if (event.key === "Escape") {
7947
+ setValue(previousValue);
7948
+ handleSetEditing(false);
7949
+ }
7950
+ };
7951
+ const HeadingComponent2 = /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
7952
+ StyledHeading2,
7209
7953
  {
7210
- $orientation: orientation,
7211
- "aria-orientation": orientation,
7212
- role: "separator",
7213
- ...otherProps
7954
+ ref: headingRef,
7955
+ $editingDisabled: editingDisabled,
7956
+ onClick: () => handleSetEditing(true),
7957
+ variant: "heading1",
7958
+ children: value
7214
7959
  }
7215
7960
  );
7961
+ if (editingDisabled) {
7962
+ return HeadingComponent2;
7963
+ }
7964
+ if (isEditing || forceEditing) {
7965
+ return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
7966
+ StyledInput,
7967
+ {
7968
+ $height: headingHeight,
7969
+ autoFocus: true,
7970
+ fullWidth: true,
7971
+ onBlur: handleFinishEditing,
7972
+ onChange: (event) => setValue(event.target.value),
7973
+ onFocus: (event) => {
7974
+ const { length } = event.currentTarget.value;
7975
+ event.currentTarget.setSelectionRange(length, length);
7976
+ },
7977
+ onKeyDown: handleKeyDown,
7978
+ type: "multiline",
7979
+ value
7980
+ }
7981
+ );
7982
+ }
7983
+ return /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(import_jsx_runtime184.Fragment, { children: [
7984
+ /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
7985
+ Tooltip,
7986
+ {
7987
+ compact: true,
7988
+ content: tooltipText,
7989
+ children: HeadingComponent2
7990
+ }
7991
+ ),
7992
+ /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
7993
+ "button",
7994
+ {
7995
+ "aria-label": ariaLabel,
7996
+ onClick: () => handleSetEditing(true),
7997
+ type: "button"
7998
+ }
7999
+ ) })
8000
+ ] });
7216
8001
  };
7217
- Divider.displayName = "Divider";
7218
8002
 
7219
8003
  // src/components/Form/Form.tsx
7220
- var import_react21 = require("react");
7221
- var import_styled_components36 = __toESM(require("styled-components"));
7222
- var import_type_guards21 = require("@wistia/type-guards");
8004
+ var import_react24 = require("react");
8005
+ var import_styled_components44 = __toESM(require("styled-components"));
8006
+ var import_type_guards24 = require("@wistia/type-guards");
7223
8007
 
7224
8008
  // src/components/Stack/Stack.tsx
7225
- var import_react20 = require("react");
7226
- var import_styled_components35 = __toESM(require("styled-components"));
7227
- var import_jsx_runtime177 = require("react/jsx-runtime");
7228
- var DEFAULT_ELEMENT3 = "div";
7229
- var StyledStack = import_styled_components35.default.div`
8009
+ var import_react23 = require("react");
8010
+ var import_styled_components43 = __toESM(require("styled-components"));
8011
+ var import_jsx_runtime185 = require("react/jsx-runtime");
8012
+ var DEFAULT_ELEMENT4 = "div";
8013
+ var StyledStack = import_styled_components43.default.div`
7230
8014
  display: flex;
7231
8015
  flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
7232
8016
  gap: ${({ $gap }) => `var(--wui-${$gap})`};
7233
8017
  `;
7234
- var StackComponent = (0, import_react20.forwardRef)(
8018
+ var StackComponent = (0, import_react23.forwardRef)(
7235
8019
  ({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
7236
8020
  const responsiveGap = useResponsiveProp(gap);
7237
8021
  const responsiveDirection = useResponsiveProp(direction);
7238
- return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
8022
+ return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
7239
8023
  StyledStack,
7240
8024
  {
7241
8025
  ref,
7242
8026
  $direction: responsiveDirection,
7243
8027
  $gap: responsiveGap,
7244
- as: renderAs ?? DEFAULT_ELEMENT3,
8028
+ as: renderAs ?? DEFAULT_ELEMENT4,
7245
8029
  ...props
7246
8030
  }
7247
8031
  );
@@ -7251,29 +8035,29 @@ StackComponent.displayName = "Stack";
7251
8035
  var Stack = makePolymorphic(StackComponent);
7252
8036
 
7253
8037
  // src/components/Form/Form.tsx
7254
- var import_jsx_runtime178 = require("react/jsx-runtime");
7255
- var StyledForm = import_styled_components36.default.form`
8038
+ var import_jsx_runtime186 = require("react/jsx-runtime");
8039
+ var StyledForm = import_styled_components44.default.form`
7256
8040
  --form-default-width: 690px;
7257
8041
 
7258
8042
  max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
7259
8043
  align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
7260
8044
  `;
7261
- var FormContext = (0, import_react21.createContext)({
8045
+ var FormContext = (0, import_react24.createContext)({
7262
8046
  values: {},
7263
8047
  errors: {},
7264
8048
  hasSubmitted: false,
7265
8049
  formId: ""
7266
8050
  });
7267
8051
  var FormComponent = ({ children, action, values = {}, validate, fullWidth = false, ...props }, forwardedRef) => {
7268
- const [errors, setErrors] = (0, import_react21.useState)({});
7269
- const [hasSubmitted, setHasSubmitted] = (0, import_react21.useState)(false);
7270
- const innerRef = (0, import_react21.useRef)();
8052
+ const [errors, setErrors] = (0, import_react24.useState)({});
8053
+ const [hasSubmitted, setHasSubmitted] = (0, import_react24.useState)(false);
8054
+ const innerRef = (0, import_react24.useRef)();
7271
8055
  const ref = forwardedRef ?? innerRef;
7272
- const autoId = (0, import_react21.useId)();
8056
+ const autoId = (0, import_react24.useId)();
7273
8057
  const id = props.id ?? autoId;
7274
8058
  const handleValidate = (nextFormData) => {
7275
8059
  const nextData = Object.fromEntries(nextFormData.entries());
7276
- if ((0, import_type_guards21.isUndefined)(validate)) {
8060
+ if ((0, import_type_guards24.isUndefined)(validate)) {
7277
8061
  return {};
7278
8062
  }
7279
8063
  return validate(nextData);
@@ -7283,7 +8067,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
7283
8067
  props.onBlur(event);
7284
8068
  }
7285
8069
  const formData = new FormData(event.currentTarget);
7286
- if ((0, import_type_guards21.isNotUndefined)(validate)) {
8070
+ if ((0, import_type_guards24.isNotUndefined)(validate)) {
7287
8071
  handleValidate(formData);
7288
8072
  }
7289
8073
  };
@@ -7311,7 +8095,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
7311
8095
  void action(null);
7312
8096
  }
7313
8097
  };
7314
- const context = (0, import_react21.useMemo)(() => {
8098
+ const context = (0, import_react24.useMemo)(() => {
7315
8099
  return {
7316
8100
  values,
7317
8101
  errors,
@@ -7321,7 +8105,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
7321
8105
  }, [values, errors, id, hasSubmitted]);
7322
8106
  return (
7323
8107
  // @ts-expect-error - generic context providers are a giant pain
7324
- /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
8108
+ /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
7325
8109
  Stack,
7326
8110
  {
7327
8111
  gap: "space-05",
@@ -7339,15 +8123,15 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
7339
8123
  );
7340
8124
  };
7341
8125
  FormComponent.displayName = "Form";
7342
- var Form = (0, import_react21.forwardRef)(FormComponent);
8126
+ var Form = (0, import_react24.forwardRef)(FormComponent);
7343
8127
 
7344
8128
  // src/components/Form/useFormState.tsx
7345
- var import_react22 = require("react");
8129
+ var import_react25 = require("react");
7346
8130
  var useFormState = (action, initialData = {}) => {
7347
- const [data, setData] = (0, import_react22.useState)(initialData);
7348
- const [isPending, setIsPending] = (0, import_react22.useState)(false);
7349
- const [error, setError] = (0, import_react22.useState)(null);
7350
- const formAction = (0, import_react22.useCallback)(
8131
+ const [data, setData] = (0, import_react25.useState)(initialData);
8132
+ const [isPending, setIsPending] = (0, import_react25.useState)(false);
8133
+ const [error, setError] = (0, import_react25.useState)(null);
8134
+ const formAction = (0, import_react25.useCallback)(
7351
8135
  async (nextFormData) => {
7352
8136
  if (nextFormData === null) {
7353
8137
  setData(initialData);
@@ -7378,23 +8162,23 @@ var useFormState = (action, initialData = {}) => {
7378
8162
  };
7379
8163
 
7380
8164
  // src/components/Form/FormErrorSummary.tsx
7381
- var import_react23 = require("react");
7382
- var import_type_guards22 = require("@wistia/type-guards");
7383
- var import_jsx_runtime179 = require("react/jsx-runtime");
8165
+ var import_react26 = require("react");
8166
+ var import_type_guards25 = require("@wistia/type-guards");
8167
+ var import_jsx_runtime187 = require("react/jsx-runtime");
7384
8168
  var ErrorItem = ({ name, error, formId }) => {
7385
- return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Link, { href: `${formId}-${name}`, children: error }) }, name);
8169
+ return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Link, { href: `${formId}-${name}`, children: error }) }, name);
7386
8170
  };
7387
8171
  var FormErrorSummary = ({ description }) => {
7388
- const ref = (0, import_react23.useRef)(null);
7389
- const { formId, errors, hasSubmitted } = (0, import_react23.useContext)(FormContext);
8172
+ const ref = (0, import_react26.useRef)(null);
8173
+ const { formId, errors, hasSubmitted } = (0, import_react26.useContext)(FormContext);
7390
8174
  const isValid = Object.keys(errors).length === 0;
7391
8175
  if (isValid || !hasSubmitted) {
7392
8176
  return null;
7393
8177
  }
7394
- return /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)("div", { ref, children: [
7395
- /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("p", { children: description }),
7396
- /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards22.isNotUndefined)(error)).map(
7397
- ([name, error]) => (0, import_type_guards22.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
8178
+ return /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)("div", { ref, children: [
8179
+ /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("p", { children: description }),
8180
+ /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards25.isNotUndefined)(error)).map(
8181
+ ([name, error]) => (0, import_type_guards25.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
7398
8182
  ErrorItem,
7399
8183
  {
7400
8184
  error: err,
@@ -7402,7 +8186,7 @@ var FormErrorSummary = ({ description }) => {
7402
8186
  name
7403
8187
  },
7404
8188
  err
7405
- )) : /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
8189
+ )) : /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
7406
8190
  ErrorItem,
7407
8191
  {
7408
8192
  error: error ?? "",
@@ -7416,210 +8200,33 @@ var FormErrorSummary = ({ description }) => {
7416
8200
  };
7417
8201
 
7418
8202
  // src/components/FormField/FormField.tsx
7419
- var import_react27 = require("react");
7420
- var import_styled_components39 = __toESM(require("styled-components"));
7421
- var import_type_guards23 = require("@wistia/type-guards");
7422
-
7423
- // src/components/Text/Text.tsx
7424
- var import_react24 = require("react");
7425
- var import_styled_components37 = __toESM(require("styled-components"));
7426
- var import_jsx_runtime180 = require("react/jsx-runtime");
7427
- var bodyBoldStyles = import_styled_components37.css`
7428
- > strong,
7429
- b {
7430
- font-weight: var(--wui-typography-weight-body-bold);
7431
- }
7432
- `;
7433
- var labelBoldStyles = import_styled_components37.css`
7434
- > strong,
7435
- b {
7436
- font-weight: var(--wui-typography-weight-label-bold);
7437
- }
7438
- `;
7439
- var body1TextStyle = import_styled_components37.css`
7440
- --font-family: var(--wui-typography-body-1-family);
7441
- --font-size: var(--wui-typography-body-1-size);
7442
- --font-weight: var(--wui-typography-body-1-weight);
7443
- --line-height: var(--wui-typography-body-1-line-height);
7444
- ${bodyBoldStyles}
7445
- `;
7446
- var body2TextStyle = import_styled_components37.css`
7447
- --font-family: var(--wui-typography-body-2-family);
7448
- --font-size: var(--wui-typography-body-2-size);
7449
- --font-weight: var(--wui-typography-body-2-weight);
7450
- --line-height: var(--wui-typography-body-2-line-height);
7451
- ${bodyBoldStyles}
7452
- `;
7453
- var body3TextStyle = import_styled_components37.css`
7454
- --font-family: var(--wui-typography-body-3-family);
7455
- --font-size: var(--wui-typography-body-3-size);
7456
- --font-weight: var(--wui-typography-body-3-weight);
7457
- --line-height: var(--wui-typography-body-3-line-height);
7458
- ${bodyBoldStyles}
7459
- `;
7460
- var body4TextStyle = import_styled_components37.css`
7461
- --font-family: var(--wui-typography-body-4-family);
7462
- --font-size: var(--wui-typography-body-4-size);
7463
- --font-weight: var(--wui-typography-body-4-weight);
7464
- --line-height: var(--wui-typography-body-4-line-height);
7465
- ${bodyBoldStyles}
7466
- `;
7467
- var label1TextStyle = import_styled_components37.css`
7468
- --font-family: var(--wui-typography-label-1-family);
7469
- --font-size: var(--wui-typography-label-1-size);
7470
- --font-weight: var(--wui-typography-label-1-weight);
7471
- --line-height: var(--wui-typography-label-1-line-height);
7472
- ${labelBoldStyles}
7473
- `;
7474
- var label2TextStyle = import_styled_components37.css`
7475
- --font-family: var(--wui-typography-label-2-family);
7476
- --font-size: var(--wui-typography-label-2-size);
7477
- --font-weight: var(--wui-typography-label-2-weight);
7478
- --line-height: var(--wui-typography-label-2-line-height);
7479
- ${labelBoldStyles}
7480
- `;
7481
- var label3TextStyle = import_styled_components37.css`
7482
- --font-family: var(--wui-typography-label-3-family);
7483
- --font-size: var(--wui-typography-label-3-size);
7484
- --font-weight: var(--wui-typography-label-3-weight);
7485
- --line-height: var(--wui-typography-label-3-line-height);
7486
- ${labelBoldStyles}
7487
- `;
7488
- var label4TextStyle = import_styled_components37.css`
7489
- --font-family: var(--wui-typography-label-4-family);
7490
- --font-size: var(--wui-typography-label-4-size);
7491
- --font-weight: var(--wui-typography-label-4-weight);
7492
- --line-height: var(--wui-typography-label-4-line-height);
7493
- ${labelBoldStyles}
7494
- `;
7495
- var body1MonoTextStyle = import_styled_components37.css`
7496
- ${body1TextStyle};
7497
- --font-family: var(--wui-typography-family-mono);
7498
- `;
7499
- var body2MonoTextStyle = import_styled_components37.css`
7500
- ${body2TextStyle};
7501
- --font-family: var(--wui-typography-family-mono);
7502
- `;
7503
- var body3MonoTextStyle = import_styled_components37.css`
7504
- ${body3TextStyle};
7505
- --font-family: var(--wui-typography-family-mono);
7506
- `;
7507
- var body4MonoTextStyle = import_styled_components37.css`
7508
- ${body4TextStyle};
7509
- --font-family: var(--wui-typography-family-mono);
7510
- `;
7511
- var variantStyleMap2 = {
7512
- body1: body1TextStyle,
7513
- body2: body2TextStyle,
7514
- body3: body3TextStyle,
7515
- body4: body4TextStyle,
7516
- body1Mono: body1MonoTextStyle,
7517
- body2Mono: body2MonoTextStyle,
7518
- body3Mono: body3MonoTextStyle,
7519
- body4Mono: body4MonoTextStyle,
7520
- label1: label1TextStyle,
7521
- label2: label2TextStyle,
7522
- label3: label3TextStyle,
7523
- label4: label4TextStyle
7524
- };
7525
- var StyledText = import_styled_components37.default.div`
7526
- ${({ $colorScheme }) => getColorScheme($colorScheme)};
7527
- --text-color: ${({ $prominence, $disabled }) => {
7528
- if ($disabled) {
7529
- return "var(--wui-color-text-disabled)";
7530
- }
7531
- if ($prominence === "secondary") {
7532
- return "var(--wui-color-text-secondary)";
7533
- }
7534
- if ($prominence === "button") {
7535
- return "var(--wui-color-text-button)";
7536
- }
7537
- return "var(--wui-color-text)";
7538
- }};
7539
-
7540
- color: var(--text-color);
7541
- font-family: var(--font-family);
7542
- font-size: var(--font-size);
7543
- font-weight: var(--font-weight);
7544
- line-height: var(--line-height);
7545
- font-style: normal;
7546
- margin: 0;
7547
- ${({ $variant }) => variantStyleMap2[$variant]}
7548
- ${({ $ellipsis }) => $ellipsis && ellipsisStyle};
7549
- ${({ $inline }) => $inline && import_styled_components37.css`
7550
- display: inline-block;
7551
- `}
7552
- ${({ $disabled }) => $disabled && import_styled_components37.css`
7553
- --text-color: var(--wui-color-text-disabled);
7554
- `}
7555
- ${({ $preventUserSelect }) => $preventUserSelect && import_styled_components37.css`
7556
- user-select: none;
7557
- `}
7558
- ${({ $align }) => import_styled_components37.css`
7559
- text-align: ${$align};
7560
- `}
7561
- ${({ as }) => as === "p" && import_styled_components37.css`
7562
- display: block;
7563
- `}
7564
- `;
7565
- var DEFAULT_ELEMENT4 = "div";
7566
- var TextComponent = (0, import_react24.forwardRef)(
7567
- ({
7568
- align = "left",
7569
- colorScheme = "inherit",
7570
- disabled = false,
7571
- ellipsis = false,
7572
- inline = false,
7573
- preventUserSelect = false,
7574
- prominence = "primary",
7575
- variant = "body2",
7576
- renderAs,
7577
- ...otherProps
7578
- }, ref) => {
7579
- return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
7580
- StyledText,
7581
- {
7582
- ref,
7583
- $align: align,
7584
- $colorScheme: colorScheme,
7585
- $disabled: disabled,
7586
- $ellipsis: ellipsis,
7587
- $inline: inline,
7588
- $preventUserSelect: preventUserSelect,
7589
- $prominence: prominence,
7590
- $variant: variant,
7591
- as: renderAs ?? DEFAULT_ELEMENT4,
7592
- ...otherProps
7593
- }
7594
- );
7595
- }
7596
- );
7597
- TextComponent.displayName = "Text";
7598
- var Text = makePolymorphic(TextComponent);
8203
+ var import_react29 = require("react");
8204
+ var import_styled_components46 = __toESM(require("styled-components"));
8205
+ var import_type_guards26 = require("@wistia/type-guards");
7599
8206
 
7600
8207
  // src/components/FormGroup/CheckboxGroup.tsx
7601
- var import_react26 = require("react");
8208
+ var import_react28 = require("react");
7602
8209
 
7603
8210
  // src/components/FormGroup/FormGroup.tsx
7604
- var import_styled_components38 = __toESM(require("styled-components"));
7605
- var import_react25 = require("react");
7606
- var import_jsx_runtime181 = require("react/jsx-runtime");
7607
- var StyledFieldset = import_styled_components38.default.fieldset`
8211
+ var import_styled_components45 = __toESM(require("styled-components"));
8212
+ var import_react27 = require("react");
8213
+ var import_jsx_runtime188 = require("react/jsx-runtime");
8214
+ var StyledFieldset = import_styled_components45.default.fieldset`
7608
8215
  border: 0;
7609
8216
  `;
7610
- var StyledLegend = import_styled_components38.default.legend`
8217
+ var StyledLegend = import_styled_components45.default.legend`
7611
8218
  margin-bottom: var(--space-01);
7612
8219
  `;
7613
8220
  var FormGroup = ({ children, label, ...props }) => {
7614
- const ref = (0, import_react25.useRef)();
7615
- return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
8221
+ const ref = (0, import_react27.useRef)();
8222
+ return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(
7616
8223
  Stack,
7617
8224
  {
7618
8225
  ...props,
7619
8226
  ref,
7620
8227
  renderAs: StyledFieldset,
7621
8228
  children: [
7622
- /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
8229
+ /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
7623
8230
  Heading,
7624
8231
  {
7625
8232
  renderAs: StyledLegend,
@@ -7635,8 +8242,8 @@ var FormGroup = ({ children, label, ...props }) => {
7635
8242
  FormGroup.displayName = "FormGroup";
7636
8243
 
7637
8244
  // src/components/FormGroup/CheckboxGroup.tsx
7638
- var import_jsx_runtime182 = require("react/jsx-runtime");
7639
- var CheckboxGroupContext = (0, import_react26.createContext)(null);
8245
+ var import_jsx_runtime189 = require("react/jsx-runtime");
8246
+ var CheckboxGroupContext = (0, import_react28.createContext)(null);
7640
8247
  var CheckboxGroup = ({
7641
8248
  children,
7642
8249
  name,
@@ -7644,19 +8251,19 @@ var CheckboxGroup = ({
7644
8251
  value,
7645
8252
  ...props
7646
8253
  }) => {
7647
- const context = (0, import_react26.useMemo)(() => {
8254
+ const context = (0, import_react28.useMemo)(() => {
7648
8255
  return {
7649
8256
  name,
7650
8257
  onChange
7651
8258
  };
7652
8259
  }, [name, onChange]);
7653
- return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(FormGroup, { ...props, children }) });
8260
+ return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(FormGroup, { ...props, children }) });
7654
8261
  };
7655
8262
  CheckboxGroup.displayName = "CheckboxGroup";
7656
8263
 
7657
8264
  // src/components/FormField/FormField.tsx
7658
- var import_jsx_runtime183 = require("react/jsx-runtime");
7659
- var StyledFormField = import_styled_components39.default.div`
8265
+ var import_jsx_runtime190 = require("react/jsx-runtime");
8266
+ var StyledFormField = import_styled_components46.default.div`
7660
8267
  --form-field-spacing: var(--wui-space-01);
7661
8268
  --form-field-error-color: var(--wui-color-text-secondary-error);
7662
8269
 
@@ -7664,7 +8271,7 @@ var StyledFormField = import_styled_components39.default.div`
7664
8271
  flex-direction: column;
7665
8272
  gap: var(--form-field-spacing);
7666
8273
  `;
7667
- var StyledErrorList = import_styled_components39.default.ul`
8274
+ var StyledErrorList = import_styled_components46.default.ul`
7668
8275
  margin: 0;
7669
8276
  padding: 0;
7670
8277
  padding-left: var(--wui-space-04);
@@ -7673,8 +8280,8 @@ var StyledErrorList = import_styled_components39.default.ul`
7673
8280
  gap: var(--wui-space-01);
7674
8281
  `;
7675
8282
  var ErrorMessages = ({ errors, id }) => {
7676
- const isMultipleErrors = (0, import_type_guards23.isArray)(errors);
7677
- return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
8283
+ const isMultipleErrors = (0, import_type_guards26.isArray)(errors);
8284
+ return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
7678
8285
  Text,
7679
8286
  {
7680
8287
  colorScheme: "error",
@@ -7684,7 +8291,7 @@ var ErrorMessages = ({ errors, id }) => {
7684
8291
  children: error
7685
8292
  },
7686
8293
  `${id}-${index}`
7687
- )) }) : /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
8294
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
7688
8295
  Text,
7689
8296
  {
7690
8297
  colorScheme: "error",
@@ -7704,8 +8311,8 @@ var FormField = ({
7704
8311
  value,
7705
8312
  ...props
7706
8313
  }) => {
7707
- const formState = (0, import_react27.useContext)(FormContext);
7708
- const checkboxGroup = (0, import_react27.useContext)(CheckboxGroupContext);
8314
+ const formState = (0, import_react29.useContext)(FormContext);
8315
+ const checkboxGroup = (0, import_react29.useContext)(CheckboxGroupContext);
7709
8316
  const id = props.id ?? `${formState.formId}-${name}`;
7710
8317
  const isInlineLabel = children.type === Checkbox;
7711
8318
  const computedError = error ?? formState.errors[name];
@@ -7716,19 +8323,19 @@ var FormField = ({
7716
8323
  label: isInlineLabel ? label : void 0,
7717
8324
  ...props
7718
8325
  };
7719
- if ((0, import_type_guards23.isUndefined)(value) && (0, import_type_guards23.isNotUndefined)(defaultValue)) {
8326
+ if ((0, import_type_guards26.isUndefined)(value) && (0, import_type_guards26.isNotUndefined)(defaultValue)) {
7720
8327
  childProps = {
7721
8328
  ...childProps,
7722
8329
  defaultValue
7723
8330
  };
7724
8331
  }
7725
- if ((0, import_type_guards23.isNotNil)(checkboxGroup)) {
7726
- const computedName = (0, import_type_guards23.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
8332
+ if ((0, import_type_guards26.isNotNil)(checkboxGroup)) {
8333
+ const computedName = (0, import_type_guards26.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
7727
8334
  const handleChange = (event) => {
7728
- if ((0, import_type_guards23.isNotUndefined)(props.onChange)) {
8335
+ if ((0, import_type_guards26.isNotUndefined)(props.onChange)) {
7729
8336
  props.onChange(event);
7730
8337
  }
7731
- if ((0, import_type_guards23.isNotUndefined)(checkboxGroup.onChange)) {
8338
+ if ((0, import_type_guards26.isNotUndefined)(checkboxGroup.onChange)) {
7732
8339
  checkboxGroup.onChange(event);
7733
8340
  }
7734
8341
  };
@@ -7736,15 +8343,15 @@ var FormField = ({
7736
8343
  ...childProps,
7737
8344
  name: computedName,
7738
8345
  onChange: handleChange,
7739
- "aria-invalid": (0, import_type_guards23.isNotNil)(error),
7740
- "aria-describedby": (0, import_type_guards23.isNotNil)(error) ? `${id}-error` : void 0
8346
+ "aria-invalid": (0, import_type_guards26.isNotNil)(error),
8347
+ "aria-describedby": (0, import_type_guards26.isNotNil)(error) ? `${id}-error` : void 0
7741
8348
  };
7742
8349
  }
7743
- import_react27.Children.only(children);
7744
- return /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(StyledFormField, { ...props, children: [
7745
- !isInlineLabel && /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(Label, { htmlFor: id, children: label }),
7746
- (0, import_react27.cloneElement)(children, childProps),
7747
- (0, import_type_guards23.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
8350
+ import_react29.Children.only(children);
8351
+ return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(StyledFormField, { ...props, children: [
8352
+ !isInlineLabel && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Label, { htmlFor: id, children: label }),
8353
+ (0, import_react29.cloneElement)(children, childProps),
8354
+ (0, import_type_guards26.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
7748
8355
  ErrorMessages,
7749
8356
  {
7750
8357
  errors: computedError,
@@ -7756,9 +8363,9 @@ var FormField = ({
7756
8363
  FormField.displayName = "FormField";
7757
8364
 
7758
8365
  // src/components/FormGroup/RadioGroup.tsx
7759
- var import_react28 = require("react");
7760
- var import_jsx_runtime184 = require("react/jsx-runtime");
7761
- var RadioGroupContext = (0, import_react28.createContext)(null);
8366
+ var import_react30 = require("react");
8367
+ var import_jsx_runtime191 = require("react/jsx-runtime");
8368
+ var RadioGroupContext = (0, import_react30.createContext)(null);
7762
8369
  var RadioGroup = ({
7763
8370
  children,
7764
8371
  name,
@@ -7766,21 +8373,21 @@ var RadioGroup = ({
7766
8373
  value,
7767
8374
  ...props
7768
8375
  }) => {
7769
- const context = (0, import_react28.useMemo)(() => {
8376
+ const context = (0, import_react30.useMemo)(() => {
7770
8377
  return {
7771
8378
  name,
7772
8379
  onChange
7773
8380
  };
7774
8381
  }, [name, onChange]);
7775
- return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(FormGroup, { ...props, children }) });
8382
+ return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(FormGroup, { ...props, children }) });
7776
8383
  };
7777
8384
  RadioGroup.displayName = "RadioGroup";
7778
8385
 
7779
8386
  // src/components/IconButton/IconButton.tsx
7780
- var import_react29 = require("react");
7781
- var import_styled_components40 = __toESM(require("styled-components"));
7782
- var import_jsx_runtime185 = require("react/jsx-runtime");
7783
- var StyledButton2 = (0, import_styled_components40.default)(Button)`
8387
+ var import_react31 = require("react");
8388
+ var import_styled_components47 = __toESM(require("styled-components"));
8389
+ var import_jsx_runtime192 = require("react/jsx-runtime");
8390
+ var StyledButton2 = (0, import_styled_components47.default)(Button)`
7784
8391
  --icon-button-size-sm: 24px;
7785
8392
  --icon-button-size-md: 32px;
7786
8393
  --icon-button-size-lg: 40px;
@@ -7794,10 +8401,10 @@ var StyledButton2 = (0, import_styled_components40.default)(Button)`
7794
8401
  align-items: center;
7795
8402
  line-height: 1;
7796
8403
  `;
7797
- var IconButton = (0, import_react29.forwardRef)(
8404
+ var IconButton = (0, import_react31.forwardRef)(
7798
8405
  ({ children, label, size = "md", ...props }, ref) => {
7799
8406
  const responsiveSize = useResponsiveProp(size);
7800
- return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
8407
+ return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
7801
8408
  StyledButton2,
7802
8409
  {
7803
8410
  ...props,
@@ -7805,7 +8412,7 @@ var IconButton = (0, import_react29.forwardRef)(
7805
8412
  "aria-label": label,
7806
8413
  "data-wistia-ui-icon-button": true,
7807
8414
  size: responsiveSize,
7808
- children: (0, import_react29.cloneElement)(import_react29.Children.only(children), {
8415
+ children: (0, import_react31.cloneElement)(import_react31.Children.only(children), {
7809
8416
  size: responsiveSize
7810
8417
  })
7811
8418
  }
@@ -7814,183 +8421,20 @@ var IconButton = (0, import_react29.forwardRef)(
7814
8421
  );
7815
8422
  IconButton.displayName = "IconButton";
7816
8423
 
7817
- // src/components/Input/Input.tsx
7818
- var import_react30 = require("react");
7819
- var import_styled_components41 = __toESM(require("styled-components"));
7820
- var import_type_guards24 = require("@wistia/type-guards");
7821
- var import_jsx_runtime186 = require("react/jsx-runtime");
7822
- var inputStyles = import_styled_components41.css`
7823
- --wui-input-color-bg: var(--wui-color-bg-surface);
7824
- --wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
7825
- --wui-input-color-border: var(--wui-color-border);
7826
- --wui-input-color-border-focus: var(--wui-color-border-active);
7827
- --wui-input-color-border-error: var(--wui-color-border-error);
7828
- --wui-input-color-border-disabled: var(--wui-color-border-disabled);
7829
- --wui-input-border-radius: var(--wui-border-radius-rounded);
7830
- --wui-input-multiline-border-radius: var(--wui-border-radius-02);
7831
- --wui-input-vertical-padding: var(--wui-space-02);
7832
- --wui-input-horizontal-padding: var(--wui-space-03);
7833
- --wui-input-placeholder: var(--wui-gray-10);
7834
- --wui-input-color-text-error: var(--wui-color-text-error);
7835
-
7836
- input,
7837
- textarea {
7838
- padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
7839
- background-color: var(--wui-input-color-bg);
7840
- border: 1px solid var(--wui-input-color-border);
7841
- border-radius: var(--wui-input-border-radius);
7842
-
7843
- &::placeholder {
7844
- color: var(--wui-input-placeholder);
7845
- opacity: 1; /* Firefox */
7846
- }
7847
-
7848
- &:focus {
7849
- border-color: var(--wui-input-color-border-focus);
7850
- }
7851
-
7852
- &[aria-invalid='true'] {
7853
- border-color: var(--wui-input-color-border-error);
7854
- color: var(--wui-input-color-text-error);
7855
- }
7856
-
7857
- &:disabled {
7858
- border-color: var(--wui-color-bg-surface-disabled);
7859
- background-color: var(--wui-color-bg-surface-disabled);
7860
- }
7861
- }
7862
- `;
7863
- var StyledInputContainer = import_styled_components41.default.div`
7864
- display: inline-flex;
7865
- position: relative;
7866
- ${inputStyles};
7867
- width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
7868
-
7869
- input,
7870
- textarea {
7871
- width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
7872
- ${({ $monospace }) => $monospace && "font-family: var(--wui-typography-family-mono);"}
7873
- }
7874
-
7875
- textarea {
7876
- border-radius: var(--wui-input-multiline-border-radius);
7877
- }
7878
-
7879
- .wui-input-left-icon {
7880
- display: flex;
7881
- align-items: center;
7882
- position: absolute;
7883
- top: 50%;
7884
- left: var(--wui-input-horizontal-padding);
7885
- transform: translateY(-50%);
7886
- }
7887
-
7888
- :has(.wui-input-left-icon) input,
7889
- :has(.wui-input-left-icon) textarea {
7890
- padding-left: 32px;
7891
- }
7892
-
7893
- .wui-input-right-icon {
7894
- display: flex;
7895
- align-items: center;
7896
- position: absolute;
7897
- top: 50%;
7898
- right: var(--wui-input-horizontal-padding);
7899
- transform: translateY(-50%);
7900
- }
7901
-
7902
- :has(.wui-input-right-icon) input,
7903
- :has(.wui-input-right-icon) textarea {
7904
- padding-right: 32px;
7905
- }
7906
- `;
7907
- var isValidRef = (ref) => {
7908
- return typeof ref === "object" && ref !== null && "current" in ref && (0, import_type_guards24.isNotNil)(ref.current);
7909
- };
7910
- var Input = (0, import_react30.forwardRef)(
7911
- ({
7912
- fullWidth = false,
7913
- monospace = false,
7914
- type = "text",
7915
- autoSelect = false,
7916
- leftIcon,
7917
- rightIcon,
7918
- ...props
7919
- }, externalRef) => {
7920
- const internalRef = (0, import_react30.useRef)();
7921
- const ref = isValidRef(externalRef) ? externalRef : internalRef;
7922
- let leftIconToDisplay = leftIcon;
7923
- if ((0, import_type_guards24.isNil)(leftIcon) && type === "search") {
7924
- leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(Icon, { type: "search" });
7925
- }
7926
- if ((0, import_type_guards24.isNotNil)(leftIconToDisplay)) {
7927
- leftIconToDisplay = (0, import_react30.cloneElement)(leftIconToDisplay, {
7928
- size: "md",
7929
- className: "wui-input-left-icon"
7930
- });
7931
- }
7932
- let rightIconToDisplay = rightIcon;
7933
- if ((0, import_type_guards24.isNotNil)(rightIconToDisplay)) {
7934
- rightIconToDisplay = (0, import_react30.cloneElement)(rightIconToDisplay, {
7935
- size: "md",
7936
- className: "wui-input-right-icon"
7937
- });
7938
- }
7939
- const handleFocus = (event) => {
7940
- if ((0, import_type_guards24.isNotNil)(props.onFocus)) {
7941
- props.onFocus(event);
7942
- }
7943
- if (autoSelect && ref && "current" in ref) {
7944
- requestAnimationFrame(() => {
7945
- ref.current?.select();
7946
- });
7947
- }
7948
- };
7949
- return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
7950
- StyledInputContainer,
7951
- {
7952
- $fullWidth: fullWidth,
7953
- $monospace: monospace,
7954
- children: [
7955
- leftIconToDisplay ?? null,
7956
- type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
7957
- "textarea",
7958
- {
7959
- ...props,
7960
- ref,
7961
- onFocus: handleFocus
7962
- }
7963
- ) : /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
7964
- "input",
7965
- {
7966
- ...props,
7967
- ref,
7968
- onFocus: handleFocus,
7969
- type
7970
- }
7971
- ),
7972
- rightIconToDisplay ?? null
7973
- ]
7974
- }
7975
- );
7976
- }
7977
- );
7978
- Input.displayName = "Input";
7979
-
7980
8424
  // src/components/Menu/Menu.tsx
7981
- var import_styled_components42 = __toESM(require("styled-components"));
8425
+ var import_styled_components48 = __toESM(require("styled-components"));
7982
8426
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
7983
- var import_type_guards25 = require("@wistia/type-guards");
7984
- var import_react32 = require("react");
8427
+ var import_type_guards27 = require("@wistia/type-guards");
8428
+ var import_react33 = require("react");
7985
8429
 
7986
8430
  // src/components/Menu/MenuContext.tsx
7987
- var import_react31 = require("react");
7988
- var MenuContext = (0, import_react31.createContext)({ compact: false });
7989
- var useMenuContext = () => (0, import_react31.useContext)(MenuContext);
8431
+ var import_react32 = require("react");
8432
+ var MenuContext = (0, import_react32.createContext)({ compact: false });
8433
+ var useMenuContext = () => (0, import_react32.useContext)(MenuContext);
7990
8434
 
7991
8435
  // src/components/Menu/Menu.tsx
7992
- var import_jsx_runtime187 = require("react/jsx-runtime");
7993
- var open = import_styled_components42.keyframes`
8436
+ var import_jsx_runtime193 = require("react/jsx-runtime");
8437
+ var open = import_styled_components48.keyframes`
7994
8438
  from {
7995
8439
  opacity: 0;
7996
8440
  transform: scale(.97) translateY(-8px);
@@ -8000,7 +8444,7 @@ var open = import_styled_components42.keyframes`
8000
8444
  transform: scale(1);
8001
8445
  }
8002
8446
  `;
8003
- var close = import_styled_components42.keyframes`
8447
+ var close = import_styled_components48.keyframes`
8004
8448
  from {
8005
8449
  opacity: 1;
8006
8450
  transform: scale(1);
@@ -8010,7 +8454,7 @@ var close = import_styled_components42.keyframes`
8010
8454
  transform: scale(.97) translateY(-8px);
8011
8455
  }
8012
8456
  `;
8013
- var menuItemCss = import_styled_components42.css`
8457
+ var menuItemCss = import_styled_components48.css`
8014
8458
  --menu-label-description-gap: var(--wui-space-01);
8015
8459
  --menu-item-inner-gap: var(--wui-space-03);
8016
8460
  --menu-item-left-icon-size: 24px;
@@ -8021,7 +8465,7 @@ var menuItemCss = import_styled_components42.css`
8021
8465
  --menu-label-line-height: var(--wui-typography-label-3-line-height);
8022
8466
  --menu-divider-margin: var(--wui-space-02);
8023
8467
  `;
8024
- var compactMenuItemCss = import_styled_components42.css`
8468
+ var compactMenuItemCss = import_styled_components48.css`
8025
8469
  --menu-label-description-gap: 0;
8026
8470
  --menu-item-inner-gap: var(--wui-space-02);
8027
8471
  --menu-item-left-icon-size: 16px;
@@ -8032,7 +8476,7 @@ var compactMenuItemCss = import_styled_components42.css`
8032
8476
  --menu-label-line-height: var(--wui-typography-label-4-line-height);
8033
8477
  --menu-divider-margin: var(--wui-space-01);
8034
8478
  `;
8035
- var menuContentCss = import_styled_components42.css`
8479
+ var menuContentCss = import_styled_components48.css`
8036
8480
  --menu-font-family: var(--wui-typography-family-default);
8037
8481
  --menu-bg: var(--wui-color-bg-surface);
8038
8482
  --menu-shadow: var(--wui-elevation-01);
@@ -8074,7 +8518,7 @@ var menuContentCss = import_styled_components42.css`
8074
8518
  margin: var(--menu-divider-margin) 0;
8075
8519
  }
8076
8520
  `;
8077
- var MenuContent = (0, import_styled_components42.default)(import_react_dropdown_menu.DropdownMenuContent)`
8521
+ var MenuContent = (0, import_styled_components48.default)(import_react_dropdown_menu.DropdownMenuContent)`
8078
8522
  ${menuContentCss}
8079
8523
  `;
8080
8524
  var Menu = ({
@@ -8090,9 +8534,9 @@ var Menu = ({
8090
8534
  onInteractOutside,
8091
8535
  ...props
8092
8536
  }) => {
8093
- const contextValue = (0, import_react32.useMemo)(() => ({ compact }), [compact]);
8537
+ const contextValue = (0, import_react33.useMemo)(() => ({ compact }), [compact]);
8094
8538
  let controlProps = {
8095
- ...(0, import_type_guards25.isNotNil)(onOpenChange) && (0, import_type_guards25.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
8539
+ ...(0, import_type_guards27.isNotNil)(onOpenChange) && (0, import_type_guards27.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
8096
8540
  };
8097
8541
  if (disabled) {
8098
8542
  controlProps = {
@@ -8100,24 +8544,24 @@ var Menu = ({
8100
8544
  onOpenChange: () => null
8101
8545
  };
8102
8546
  }
8103
- return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(
8547
+ return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
8104
8548
  import_react_dropdown_menu.DropdownMenu,
8105
8549
  {
8106
8550
  modal: false,
8107
8551
  ...controlProps,
8108
8552
  children: [
8109
- /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards25.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
8553
+ /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards27.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
8110
8554
  Button,
8111
8555
  {
8112
8556
  "aria-expanded": isOpen,
8113
8557
  disabled,
8114
8558
  forceState: isOpen ? "active" : void 0,
8115
- rightIcon: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Icon, { type: "caret-down" }),
8559
+ rightIcon: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Icon, { type: "caret-down" }),
8116
8560
  ...triggerProps,
8117
8561
  children: label
8118
8562
  }
8119
8563
  ) }),
8120
- /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
8564
+ /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
8121
8565
  MenuContent,
8122
8566
  {
8123
8567
  ...props,
@@ -8137,19 +8581,19 @@ var Menu = ({
8137
8581
  Menu.displayName = "Menu";
8138
8582
 
8139
8583
  // src/components/Menu/MenuLabel.tsx
8140
- var import_styled_components43 = __toESM(require("styled-components"));
8584
+ var import_styled_components49 = __toESM(require("styled-components"));
8141
8585
  var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
8142
- var import_jsx_runtime188 = require("react/jsx-runtime");
8143
- var StyledMenuLabel = (0, import_styled_components43.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
8586
+ var import_jsx_runtime194 = require("react/jsx-runtime");
8587
+ var StyledMenuLabel = (0, import_styled_components49.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
8144
8588
  padding: var(--wui-space-02);
8145
8589
  `;
8146
8590
  var MenuLabel = ({ children, ...props }) => {
8147
- return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
8591
+ return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
8148
8592
  StyledMenuLabel,
8149
8593
  {
8150
8594
  asChild: true,
8151
8595
  ...props,
8152
- children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
8596
+ children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
8153
8597
  Heading,
8154
8598
  {
8155
8599
  renderAs: "span",
@@ -8164,17 +8608,17 @@ var MenuLabel = ({ children, ...props }) => {
8164
8608
  MenuLabel.displayName = "MenuLabel";
8165
8609
 
8166
8610
  // src/components/Menu/SubMenu.tsx
8167
- var import_react34 = require("react");
8168
- var import_styled_components46 = __toESM(require("styled-components"));
8611
+ var import_react35 = require("react");
8612
+ var import_styled_components52 = __toESM(require("styled-components"));
8169
8613
  var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
8170
- var import_type_guards27 = require("@wistia/type-guards");
8614
+ var import_type_guards29 = require("@wistia/type-guards");
8171
8615
 
8172
8616
  // src/components/Menu/MenuItemButton.tsx
8173
- var import_react33 = require("react");
8174
- var import_styled_components44 = __toESM(require("styled-components"));
8175
- var import_type_guards26 = require("@wistia/type-guards");
8176
- var import_jsx_runtime189 = require("react/jsx-runtime");
8177
- var StyledButton3 = (0, import_styled_components44.default)(Button)`
8617
+ var import_react34 = require("react");
8618
+ var import_styled_components50 = __toESM(require("styled-components"));
8619
+ var import_type_guards28 = require("@wistia/type-guards");
8620
+ var import_jsx_runtime195 = require("react/jsx-runtime");
8621
+ var StyledButton3 = (0, import_styled_components50.default)(Button)`
8178
8622
  ${({ colorScheme }) => getColorScheme(colorScheme)};
8179
8623
 
8180
8624
  display: flex;
@@ -8213,7 +8657,7 @@ var StyledButton3 = (0, import_styled_components44.default)(Button)`
8213
8657
  padding-left: var(--wui-space-04);
8214
8658
  }
8215
8659
  `;
8216
- var StyledLeftIconContainer = import_styled_components44.default.div`
8660
+ var StyledLeftIconContainer = import_styled_components50.default.div`
8217
8661
  height: var(--menu-item-left-icon-size);
8218
8662
  width: var(--menu-item-left-icon-size);
8219
8663
 
@@ -8222,7 +8666,7 @@ var StyledLeftIconContainer = import_styled_components44.default.div`
8222
8666
  width: var(--menu-item-left-icon-size);
8223
8667
  }
8224
8668
  `;
8225
- var StyledRightIconContainer = import_styled_components44.default.div`
8669
+ var StyledRightIconContainer = import_styled_components50.default.div`
8226
8670
  height: var(--menu-item-right-icon-size);
8227
8671
  width: var(--menu-item-right-icon-size);
8228
8672
 
@@ -8231,28 +8675,28 @@ var StyledRightIconContainer = import_styled_components44.default.div`
8231
8675
  width: var(--menu-item-right-icon-size);
8232
8676
  }
8233
8677
  `;
8234
- var StyledLabelAndDescriptionContainer = import_styled_components44.default.div`
8678
+ var StyledLabelAndDescriptionContainer = import_styled_components50.default.div`
8235
8679
  display: flex;
8236
8680
  flex-direction: column;
8237
8681
  gap: var(--menu-label-description-gap);
8238
8682
  flex-basis: 100%;
8239
8683
  `;
8240
- var StyledBadgeContainer = import_styled_components44.default.div`
8684
+ var StyledBadgeContainer = import_styled_components50.default.div`
8241
8685
  align-self: start;
8242
8686
  justify-self: end;
8243
8687
  font-size: var(--wui-typography-label-4-size);
8244
8688
  color: var(--wui-color-text-secondary);
8245
8689
  `;
8246
- var MenuItemButton = (0, import_react33.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
8690
+ var MenuItemButton = (0, import_react34.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
8247
8691
  let { colorScheme, badge } = props;
8248
8692
  if (appearance === "dangerous") {
8249
- if ((0, import_type_guards26.isNotUndefined)(colorScheme)) {
8693
+ if ((0, import_type_guards28.isNotUndefined)(colorScheme)) {
8250
8694
  console.warn("colorScheme prop is ignored when appearance is dangerous");
8251
8695
  }
8252
8696
  colorScheme = "error";
8253
8697
  }
8254
8698
  if (appearance === "gated") {
8255
- badge = /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
8699
+ badge = /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
8256
8700
  Icon,
8257
8701
  {
8258
8702
  colorScheme: "purple",
@@ -8264,7 +8708,7 @@ var MenuItemButton = (0, import_react33.forwardRef)(({ children, appearance, com
8264
8708
  }
8265
8709
  );
8266
8710
  }
8267
- return /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(
8711
+ return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
8268
8712
  StyledButton3,
8269
8713
  {
8270
8714
  ...props,
@@ -8274,10 +8718,10 @@ var MenuItemButton = (0, import_react33.forwardRef)(({ children, appearance, com
8274
8718
  fullWidth: true,
8275
8719
  unstyled: true,
8276
8720
  children: [
8277
- props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
8278
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(StyledLabelAndDescriptionContainer, { children }),
8279
- (0, import_type_guards26.isNotNil)(badge) || (0, import_type_guards26.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
8280
- props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
8721
+ props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
8722
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(StyledLabelAndDescriptionContainer, { children }),
8723
+ (0, import_type_guards28.isNotNil)(badge) || (0, import_type_guards28.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
8724
+ props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
8281
8725
  ]
8282
8726
  }
8283
8727
  );
@@ -8285,33 +8729,33 @@ var MenuItemButton = (0, import_react33.forwardRef)(({ children, appearance, com
8285
8729
  MenuItemButton.displayName = "MenuItemButton";
8286
8730
 
8287
8731
  // src/components/Menu/MenuItemLabelDescription.tsx
8288
- var import_styled_components45 = __toESM(require("styled-components"));
8289
- var import_jsx_runtime190 = require("react/jsx-runtime");
8290
- var StyledMenuItemLabel = import_styled_components45.default.span``;
8291
- var StyledMenuItemDescription = (0, import_styled_components45.default)(Text).attrs({
8732
+ var import_styled_components51 = __toESM(require("styled-components"));
8733
+ var import_jsx_runtime196 = require("react/jsx-runtime");
8734
+ var StyledMenuItemLabel = import_styled_components51.default.span``;
8735
+ var StyledMenuItemDescription = (0, import_styled_components51.default)(Text).attrs({
8292
8736
  variant: "body4",
8293
8737
  prominence: "secondary"
8294
8738
  })``;
8295
8739
  var MenuItemLabel = ({ children }) => {
8296
- return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(StyledMenuItemLabel, { children });
8740
+ return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(StyledMenuItemLabel, { children });
8297
8741
  };
8298
8742
  var MenuItemDescription = ({ children }) => {
8299
- return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(StyledMenuItemDescription, { children });
8743
+ return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(StyledMenuItemDescription, { children });
8300
8744
  };
8301
8745
 
8302
8746
  // src/components/Menu/SubMenu.tsx
8303
- var import_jsx_runtime191 = require("react/jsx-runtime");
8304
- var SubMenuContent = (0, import_styled_components46.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
8747
+ var import_jsx_runtime197 = require("react/jsx-runtime");
8748
+ var SubMenuContent = (0, import_styled_components52.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
8305
8749
  ${menuContentCss}
8306
8750
 
8307
8751
  ${mq.smAndDown} {
8308
8752
  transform: translateX(-100%) !important;
8309
8753
  }
8310
8754
  `;
8311
- var StyledMobileSubMenuItems = import_styled_components46.default.div`
8755
+ var StyledMobileSubMenuItems = import_styled_components52.default.div`
8312
8756
  margin-left: var(--wui-space-04);
8313
8757
  `;
8314
- var StyledSubTrigger = (0, import_styled_components46.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
8758
+ var StyledSubTrigger = (0, import_styled_components52.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
8315
8759
  outline: none;
8316
8760
 
8317
8761
  &[data-state='open'],
@@ -8322,11 +8766,11 @@ var StyledSubTrigger = (0, import_styled_components46.default)(import_react_drop
8322
8766
  var SubMenuTrigger = (props) => {
8323
8767
  const { isSmAndUp } = useMq();
8324
8768
  const Trigger3 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
8325
- return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Trigger3, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
8769
+ return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(Trigger3, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
8326
8770
  MenuItemButton,
8327
8771
  {
8328
8772
  ...props,
8329
- rightIcon: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Icon, { type: "caret-right" })
8773
+ rightIcon: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(Icon, { type: "caret-right" })
8330
8774
  }
8331
8775
  ) });
8332
8776
  };
@@ -8338,16 +8782,16 @@ var SubMenu = ({
8338
8782
  ...props
8339
8783
  }) => {
8340
8784
  const { isSmAndUp } = useMq();
8341
- const [isExpanded, setIsExpanded] = (0, import_react34.useState)(false);
8785
+ const [isExpanded, setIsExpanded] = (0, import_react35.useState)(false);
8342
8786
  const { compact } = useMenuContext();
8343
- return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
8344
- /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(SubMenuTrigger, { ...props, children: [
8345
- /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(MenuItemLabel, { children: label }),
8346
- (0, import_type_guards27.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(MenuItemDescription, { children: description }) : null
8787
+ return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
8788
+ /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(SubMenuTrigger, { ...props, children: [
8789
+ /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(MenuItemLabel, { children: label }),
8790
+ (0, import_type_guards29.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(MenuItemDescription, { children: description }) : null
8347
8791
  ] }),
8348
- /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(SubMenuContent, { $compact: compact, children }) })
8349
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
8350
- /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
8792
+ /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(SubMenuContent, { $compact: compact, children }) })
8793
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
8794
+ /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
8351
8795
  SubMenuTrigger,
8352
8796
  {
8353
8797
  ...props,
@@ -8356,28 +8800,28 @@ var SubMenu = ({
8356
8800
  setIsExpanded((prev) => !prev);
8357
8801
  },
8358
8802
  children: [
8359
- /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(MenuItemLabel, { children: label }),
8360
- /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(MenuItemDescription, { children: description })
8803
+ /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(MenuItemLabel, { children: label }),
8804
+ /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(MenuItemDescription, { children: description })
8361
8805
  ]
8362
8806
  }
8363
8807
  ),
8364
- /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
8808
+ /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
8365
8809
  ] });
8366
8810
  };
8367
8811
  SubMenu.displayName = "SubMenu";
8368
8812
 
8369
8813
  // src/components/Menu/MenuItem.tsx
8370
- var import_react35 = require("react");
8814
+ var import_react36 = require("react");
8371
8815
  var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
8372
- var import_jsx_runtime192 = require("react/jsx-runtime");
8373
- var MenuItem = (0, import_react35.forwardRef)(
8816
+ var import_jsx_runtime198 = require("react/jsx-runtime");
8817
+ var MenuItem = (0, import_react36.forwardRef)(
8374
8818
  ({ onSelect = () => null, ...props }, ref) => {
8375
- return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
8819
+ return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
8376
8820
  import_react_dropdown_menu4.DropdownMenuItem,
8377
8821
  {
8378
8822
  asChild: true,
8379
8823
  onSelect,
8380
- children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
8824
+ children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
8381
8825
  MenuItemButton,
8382
8826
  {
8383
8827
  ...props,
@@ -8393,10 +8837,10 @@ MenuItem.displayName = "MenuItem";
8393
8837
 
8394
8838
  // src/components/Menu/MenuRadioGroup.tsx
8395
8839
  var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
8396
- var import_jsx_runtime193 = require("react/jsx-runtime");
8840
+ var import_jsx_runtime199 = require("react/jsx-runtime");
8397
8841
  var MenuRadioGroup = ({ children, label, ...props }) => {
8398
- return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
8399
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(MenuLabel, { children: label }),
8842
+ return /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
8843
+ /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(MenuLabel, { children: label }),
8400
8844
  children
8401
8845
  ] });
8402
8846
  };
@@ -8404,11 +8848,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
8404
8848
 
8405
8849
  // src/components/Menu/RadioMenuItem.tsx
8406
8850
  var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
8407
- var import_jsx_runtime194 = require("react/jsx-runtime");
8851
+ var import_jsx_runtime200 = require("react/jsx-runtime");
8408
8852
  var RadioMenuItem = ({
8409
8853
  onSelect,
8410
8854
  value,
8411
- indicator = /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
8855
+ indicator = /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
8412
8856
  Icon,
8413
8857
  {
8414
8858
  size: "sm",
@@ -8418,17 +8862,17 @@ var RadioMenuItem = ({
8418
8862
  ...props
8419
8863
  }) => {
8420
8864
  const extraProps = onSelect ? { onSelect } : {};
8421
- return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
8865
+ return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
8422
8866
  import_react_dropdown_menu6.DropdownMenuRadioItem,
8423
8867
  {
8424
8868
  ...extraProps,
8425
8869
  asChild: true,
8426
8870
  value,
8427
- children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
8871
+ children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
8428
8872
  MenuItemButton,
8429
8873
  {
8430
8874
  ...props,
8431
- rightIcon: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
8875
+ rightIcon: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
8432
8876
  }
8433
8877
  )
8434
8878
  }
@@ -8438,9 +8882,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
8438
8882
 
8439
8883
  // src/components/Menu/CheckboxMenuItem.tsx
8440
8884
  var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
8441
- var import_jsx_runtime195 = require("react/jsx-runtime");
8885
+ var import_jsx_runtime201 = require("react/jsx-runtime");
8442
8886
  var CheckboxIndicator2 = ({ checked, ...props }) => {
8443
- return checked ? /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
8887
+ return checked ? /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
8444
8888
  "svg",
8445
8889
  {
8446
8890
  ...props,
@@ -8450,14 +8894,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
8450
8894
  width: "24",
8451
8895
  xmlns: "http://www.w3.org/2000/svg",
8452
8896
  children: [
8453
- /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
8897
+ /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
8454
8898
  "path",
8455
8899
  {
8456
8900
  d: "m4 8c0-2.20914 1.79086-4 4-4h8c2.2091 0 4 1.79086 4 4v8c0 2.2091-1.7909 4-4 4h-8c-2.20914 0-4-1.7909-4-4z",
8457
8901
  fill: "#2949e5"
8458
8902
  }
8459
8903
  ),
8460
- /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
8904
+ /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
8461
8905
  "path",
8462
8906
  {
8463
8907
  d: "m10.4728 15.1931-3.09523-3.1131c-.18596-.187-.18596-.4902 0-.6773l.67341-.6773c.18596-.187.48749-.187.67344 0l2.08508 2.0971 4.4661-4.49174c.1859-.18703.4875-.18703.6734 0l.6734.67731c.186.18703.186.49027 0 .67731l-5.4762 5.50772c-.1859.187-.4874.187-.6734 0z",
@@ -8466,7 +8910,7 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
8466
8910
  )
8467
8911
  ]
8468
8912
  }
8469
- ) : /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
8913
+ ) : /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
8470
8914
  "svg",
8471
8915
  {
8472
8916
  ...props,
@@ -8476,14 +8920,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
8476
8920
  width: "24",
8477
8921
  xmlns: "http://www.w3.org/2000/svg",
8478
8922
  children: [
8479
- /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
8923
+ /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
8480
8924
  "path",
8481
8925
  {
8482
8926
  d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
8483
8927
  fill: "#fcfcfd"
8484
8928
  }
8485
8929
  ),
8486
- /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
8930
+ /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
8487
8931
  "path",
8488
8932
  {
8489
8933
  d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
@@ -8500,18 +8944,18 @@ var CheckboxMenuItem = ({
8500
8944
  onCheckedChange,
8501
8945
  ...props
8502
8946
  }) => {
8503
- return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
8947
+ return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
8504
8948
  import_react_dropdown_menu7.DropdownMenuCheckboxItem,
8505
8949
  {
8506
8950
  asChild: true,
8507
8951
  checked,
8508
8952
  onCheckedChange,
8509
8953
  onSelect,
8510
- children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
8954
+ children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
8511
8955
  MenuItemButton,
8512
8956
  {
8513
8957
  ...props,
8514
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(CheckboxIndicator2, { checked })
8958
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(CheckboxIndicator2, { checked })
8515
8959
  }
8516
8960
  )
8517
8961
  }
@@ -8520,59 +8964,37 @@ var CheckboxMenuItem = ({
8520
8964
  CheckboxMenuItem.displayName = "CheckboxMenuItem";
8521
8965
 
8522
8966
  // src/components/Modal/Modal.tsx
8523
- var import_react39 = require("react");
8524
- var import_styled_components52 = __toESM(require("styled-components"));
8967
+ var import_react40 = require("react");
8968
+ var import_styled_components57 = __toESM(require("styled-components"));
8525
8969
  var import_react_dialog4 = require("@radix-ui/react-dialog");
8526
- var import_type_guards30 = require("@wistia/type-guards");
8970
+ var import_type_guards31 = require("@wistia/type-guards");
8527
8971
 
8528
8972
  // src/components/Modal/ModalHeader.tsx
8529
- var import_styled_components49 = __toESM(require("styled-components"));
8973
+ var import_styled_components54 = __toESM(require("styled-components"));
8530
8974
  var import_react_dialog2 = require("@radix-ui/react-dialog");
8531
8975
 
8532
8976
  // src/components/Modal/ModalCloseButton.tsx
8533
- var import_styled_components47 = __toESM(require("styled-components"));
8977
+ var import_styled_components53 = __toESM(require("styled-components"));
8534
8978
  var import_react_dialog = require("@radix-ui/react-dialog");
8535
- var import_jsx_runtime196 = require("react/jsx-runtime");
8536
- var CloseButton = (0, import_styled_components47.default)(import_react_dialog.Close)`
8979
+ var import_jsx_runtime202 = require("react/jsx-runtime");
8980
+ var CloseButton = (0, import_styled_components53.default)(import_react_dialog.Close)`
8537
8981
  align-self: start;
8538
8982
  `;
8539
8983
  var ModalCloseButton = () => {
8540
- return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
8984
+ return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
8541
8985
  IconButton,
8542
8986
  {
8543
8987
  label: "Dismiss modal",
8544
8988
  size: "sm",
8545
8989
  variant: "ghost",
8546
- children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Icon, { type: "close" })
8990
+ children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(Icon, { type: "close" })
8547
8991
  }
8548
8992
  ) });
8549
8993
  };
8550
8994
 
8551
- // src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
8552
- var import_styled_components48 = __toESM(require("styled-components"));
8553
- var import_type_guards28 = require("@wistia/type-guards");
8554
- var import_jsx_runtime197 = require("react/jsx-runtime");
8555
- var VisuallyHidden = import_styled_components48.default.div({ ...visuallyHiddenStyle });
8556
- var VisuallyHiddenButFocusable = import_styled_components48.default.div({
8557
- "&:not(:focus-within)": visuallyHiddenStyle
8558
- });
8559
- var ScreenReaderOnly = ({
8560
- text,
8561
- children,
8562
- focusable = false,
8563
- ...otherProps
8564
- }) => {
8565
- const accessibleText = (0, import_type_guards28.isNotNil)(text) ? text : children;
8566
- if (focusable) {
8567
- return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
8568
- }
8569
- return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
8570
- };
8571
- ScreenReaderOnly.displayName = "ScreenReaderOnly";
8572
-
8573
8995
  // src/components/Modal/ModalHeader.tsx
8574
- var import_jsx_runtime198 = require("react/jsx-runtime");
8575
- var Header = import_styled_components49.default.header`
8996
+ var import_jsx_runtime203 = require("react/jsx-runtime");
8997
+ var Header = import_styled_components54.default.header`
8576
8998
  display: flex;
8577
8999
  order: 1;
8578
9000
  gap: var(--wui-space-01);
@@ -8584,7 +9006,7 @@ var Header = import_styled_components49.default.header`
8584
9006
  margin-top: 0;
8585
9007
  }
8586
9008
  `;
8587
- var Title = (0, import_styled_components49.default)(import_react_dialog2.Title)`
9009
+ var Title = (0, import_styled_components54.default)(import_react_dialog2.Title)`
8588
9010
  font-family: var(--wui-typography-heading-2-family);
8589
9011
  line-height: var(--wui-typography-heading-2-line-height);
8590
9012
  font-size: var(--wui-typography-heading-2-size);
@@ -8596,28 +9018,28 @@ var ModalHeader = ({
8596
9018
  hideCloseButton
8597
9019
  }) => {
8598
9020
  const TitleWrapper = hideTitle ? ScreenReaderOnly : Title;
8599
- return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(Header, { children: [
8600
- /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(TitleWrapper, { children: title }),
8601
- hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ModalCloseButton, {})
9021
+ return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(Header, { children: [
9022
+ /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(TitleWrapper, { children: title }),
9023
+ hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(ModalCloseButton, {})
8602
9024
  ] });
8603
9025
  };
8604
9026
 
8605
9027
  // src/components/Modal/ModalContent.tsx
8606
- var import_react37 = require("react");
8607
- var import_styled_components50 = __toESM(require("styled-components"));
9028
+ var import_react38 = require("react");
9029
+ var import_styled_components55 = __toESM(require("styled-components"));
8608
9030
  var import_react_dialog3 = require("@radix-ui/react-dialog");
8609
9031
 
8610
9032
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
8611
- var import_react36 = require("react");
8612
- var import_type_guards29 = require("@wistia/type-guards");
9033
+ var import_react37 = require("react");
9034
+ var import_type_guards30 = require("@wistia/type-guards");
8613
9035
  var useFocusRestore = () => {
8614
- const previouslyFocusedRef = (0, import_react36.useRef)(null);
8615
- (0, import_react36.useEffect)(() => {
9036
+ const previouslyFocusedRef = (0, import_react37.useRef)(null);
9037
+ (0, import_react37.useEffect)(() => {
8616
9038
  previouslyFocusedRef.current = document.activeElement;
8617
9039
  }, []);
8618
- (0, import_react36.useEffect)(() => {
9040
+ (0, import_react37.useEffect)(() => {
8619
9041
  return () => {
8620
- if ((0, import_type_guards29.isNotNil)(previouslyFocusedRef.current)) {
9042
+ if ((0, import_type_guards30.isNotNil)(previouslyFocusedRef.current)) {
8621
9043
  setTimeout(() => {
8622
9044
  previouslyFocusedRef.current?.focus();
8623
9045
  }, 0);
@@ -8627,8 +9049,8 @@ var useFocusRestore = () => {
8627
9049
  };
8628
9050
 
8629
9051
  // src/components/Modal/ModalContent.tsx
8630
- var import_jsx_runtime199 = require("react/jsx-runtime");
8631
- var StyledModalContent = (0, import_styled_components50.default)(import_react_dialog3.Content)`
9052
+ var import_jsx_runtime204 = require("react/jsx-runtime");
9053
+ var StyledModalContent = (0, import_styled_components55.default)(import_react_dialog3.Content)`
8632
9054
  background-color: var(--wui-color-bg-app);
8633
9055
  box-sizing: border-box;
8634
9056
  display: flex;
@@ -8669,10 +9091,10 @@ var StyledModalContent = (0, import_styled_components50.default)(import_react_di
8669
9091
  }
8670
9092
  }
8671
9093
  `;
8672
- var ModalContent = (0, import_react37.forwardRef)(
9094
+ var ModalContent = (0, import_react38.forwardRef)(
8673
9095
  ({ fullHeight, width, children, ...otherProps }, ref) => {
8674
9096
  useFocusRestore();
8675
- return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
9097
+ return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
8676
9098
  StyledModalContent,
8677
9099
  {
8678
9100
  ref,
@@ -8687,9 +9109,9 @@ var ModalContent = (0, import_react37.forwardRef)(
8687
9109
  );
8688
9110
 
8689
9111
  // src/private/components/Backdrop/Backdrop.tsx
8690
- var import_react38 = require("react");
8691
- var import_styled_components51 = __toESM(require("styled-components"));
8692
- var import_jsx_runtime200 = require("react/jsx-runtime");
9112
+ var import_react39 = require("react");
9113
+ var import_styled_components56 = __toESM(require("styled-components"));
9114
+ var import_jsx_runtime205 = require("react/jsx-runtime");
8693
9115
  var backdropAnimationDuration = 150;
8694
9116
  var alignVerticalMap = {
8695
9117
  stretch: "normal",
@@ -8702,7 +9124,7 @@ var alignHorizontalMap = {
8702
9124
  center: "center",
8703
9125
  right: "end"
8704
9126
  };
8705
- var BackdropComponent = import_styled_components51.default.div`
9127
+ var BackdropComponent = import_styled_components56.default.div`
8706
9128
  align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
8707
9129
  animation-name: backdropShow;
8708
9130
  animation-duration: ${() => `${backdropAnimationDuration}ms`};
@@ -8725,8 +9147,8 @@ var BackdropComponent = import_styled_components51.default.div`
8725
9147
  }
8726
9148
  }
8727
9149
  `;
8728
- var Backdrop = (0, import_react38.forwardRef)(
8729
- ({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
9150
+ var Backdrop = (0, import_react39.forwardRef)(
9151
+ ({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
8730
9152
  BackdropComponent,
8731
9153
  {
8732
9154
  ref,
@@ -8740,14 +9162,14 @@ var Backdrop = (0, import_react38.forwardRef)(
8740
9162
  Backdrop.displayName = "Backdrop";
8741
9163
 
8742
9164
  // src/components/Modal/Modal.tsx
8743
- var import_jsx_runtime201 = require("react/jsx-runtime");
9165
+ var import_jsx_runtime206 = require("react/jsx-runtime");
8744
9166
  var DEFAULT_MODAL_WIDTH = "532px";
8745
- var ModalBody = import_styled_components52.default.div`
9167
+ var ModalBody = import_styled_components57.default.div`
8746
9168
  flex-direction: column;
8747
9169
  display: flex;
8748
9170
  order: 2;
8749
9171
  `;
8750
- var Modal = (0, import_react39.forwardRef)(
9172
+ var Modal = (0, import_react40.forwardRef)(
8751
9173
  ({
8752
9174
  children,
8753
9175
  fullHeight = false,
@@ -8760,24 +9182,24 @@ var Modal = (0, import_react39.forwardRef)(
8760
9182
  width = DEFAULT_MODAL_WIDTH,
8761
9183
  ...props
8762
9184
  }, ref) => {
8763
- return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
9185
+ return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
8764
9186
  import_react_dialog4.Root,
8765
9187
  {
8766
9188
  onOpenChange: (open2) => {
8767
- if (!open2 && (0, import_type_guards30.isNotNil)(onRequestClose)) {
9189
+ if (!open2 && (0, import_type_guards31.isNotNil)(onRequestClose)) {
8768
9190
  onRequestClose();
8769
9191
  }
8770
9192
  },
8771
9193
  open: isOpen,
8772
- children: /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(import_react_dialog4.Portal, { children: [
8773
- /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(Backdrop, {}),
8774
- /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
9194
+ children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(import_react_dialog4.Portal, { children: [
9195
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(Backdrop, {}),
9196
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
8775
9197
  ModalContent,
8776
9198
  {
8777
9199
  ref,
8778
9200
  fullHeight,
8779
9201
  onOpenAutoFocus: (event) => {
8780
- if ((0, import_type_guards30.isNotNil)(initialFocusRef) && initialFocusRef.current) {
9202
+ if ((0, import_type_guards31.isNotNil)(initialFocusRef) && initialFocusRef.current) {
8781
9203
  event.preventDefault();
8782
9204
  requestAnimationFrame(() => {
8783
9205
  initialFocusRef.current?.focus();
@@ -8787,8 +9209,8 @@ var Modal = (0, import_react39.forwardRef)(
8787
9209
  width,
8788
9210
  ...props,
8789
9211
  children: [
8790
- /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(ModalBody, { children }),
8791
- /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
9212
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(ModalBody, { children }),
9213
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
8792
9214
  ModalHeader,
8793
9215
  {
8794
9216
  hideCloseButton,
@@ -8807,16 +9229,16 @@ var Modal = (0, import_react39.forwardRef)(
8807
9229
  Modal.displayName = "Modal";
8808
9230
 
8809
9231
  // src/components/Radio/Radio.tsx
8810
- var import_react40 = require("react");
8811
- var import_styled_components53 = __toESM(require("styled-components"));
8812
- var import_type_guards31 = require("@wistia/type-guards");
8813
- var import_jsx_runtime202 = require("react/jsx-runtime");
8814
- var StyledLabelWrapper2 = import_styled_components53.default.div`
9232
+ var import_react41 = require("react");
9233
+ var import_styled_components58 = __toESM(require("styled-components"));
9234
+ var import_type_guards32 = require("@wistia/type-guards");
9235
+ var import_jsx_runtime207 = require("react/jsx-runtime");
9236
+ var StyledLabelWrapper2 = import_styled_components58.default.div`
8815
9237
  display: flex;
8816
9238
  flex-direction: column;
8817
9239
  padding-left: var(--wui-space-02);
8818
9240
  `;
8819
- var StyledRadio = import_styled_components53.default.input`
9241
+ var StyledRadio = import_styled_components58.default.input`
8820
9242
  box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
8821
9243
  appearance: none;
8822
9244
  margin: 0;
@@ -8842,11 +9264,11 @@ var StyledRadio = import_styled_components53.default.input`
8842
9264
  transform: scale(1);
8843
9265
  }
8844
9266
  `;
8845
- var disabledStyle2 = import_styled_components53.css`
9267
+ var disabledStyle2 = import_styled_components58.css`
8846
9268
  cursor: not-allowed;
8847
9269
  opacity: 0.5;
8848
9270
  `;
8849
- var errorStyle = import_styled_components53.css`
9271
+ var errorStyle = import_styled_components58.css`
8850
9272
  /* TODO Lamp to design error state */
8851
9273
  &:hover,
8852
9274
  &:focus,
@@ -8854,11 +9276,11 @@ var errorStyle = import_styled_components53.css`
8854
9276
  border-color: transparent !important;
8855
9277
  }
8856
9278
  `;
8857
- var defaultHoverStyle = import_styled_components53.css`
9279
+ var defaultHoverStyle = import_styled_components58.css`
8858
9280
  /* TODO Lamp to design hover state */
8859
9281
  cursor: pointer;
8860
9282
  `;
8861
- var StyledRadioWrapper = import_styled_components53.default.div`
9283
+ var StyledRadioWrapper = import_styled_components58.default.div`
8862
9284
  align-items: baseline;
8863
9285
  border: 1px solid transparent;
8864
9286
  border-radius: 4px;
@@ -8881,7 +9303,7 @@ var StyledRadioWrapper = import_styled_components53.default.div`
8881
9303
 
8882
9304
  ${({ disabled }) => disabled && disabledStyle2};
8883
9305
  `;
8884
- var Radio = (0, import_react40.forwardRef)(
9306
+ var Radio = (0, import_react41.forwardRef)(
8885
9307
  ({
8886
9308
  checked,
8887
9309
  disabled = false,
@@ -8894,15 +9316,15 @@ var Radio = (0, import_react40.forwardRef)(
8894
9316
  value = "false",
8895
9317
  ...otherProps
8896
9318
  }, ref) => {
8897
- const generatedId = (0, import_react40.useId)();
8898
- const computedId = (0, import_type_guards31.isNonEmptyString)(id) ? id : `ui-radio-${generatedId}`;
8899
- return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(
9319
+ const generatedId = (0, import_react41.useId)();
9320
+ const computedId = (0, import_type_guards32.isNonEmptyString)(id) ? id : `ui-radio-${generatedId}`;
9321
+ return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(
8900
9322
  StyledRadioWrapper,
8901
9323
  {
8902
9324
  "aria-invalid": otherProps["aria-invalid"],
8903
9325
  disabled,
8904
9326
  children: [
8905
- /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
9327
+ /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
8906
9328
  StyledRadio,
8907
9329
  {
8908
9330
  ref,
@@ -8917,517 +9339,171 @@ var Radio = (0, import_react40.forwardRef)(
8917
9339
  ...otherProps
8918
9340
  }
8919
9341
  ),
8920
- /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(StyledLabelWrapper2, { children: [
8921
- /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
9342
+ /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(StyledLabelWrapper2, { children: [
9343
+ /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
8922
9344
  Label,
8923
9345
  {
8924
- disabled,
8925
- htmlFor: computedId,
8926
- required,
8927
- children: label
8928
- }
8929
- ),
8930
- /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(LabelDescription, { children: description })
8931
- ] })
8932
- ]
8933
- }
8934
- );
8935
- }
8936
- );
8937
- Radio.displayName = "Radio";
8938
-
8939
- // src/components/SegmentedControl/SegmentedControl.tsx
8940
- var import_react41 = require("react");
8941
- var import_styled_components54 = __toESM(require("styled-components"));
8942
- var import_react_toggle_group = require("@radix-ui/react-toggle-group");
8943
- var import_type_guards32 = require("@wistia/type-guards");
8944
- var import_jsx_runtime203 = require("react/jsx-runtime");
8945
- var StyledSegmentedControl = (0, import_styled_components54.default)(import_react_toggle_group.Root)`
8946
- display: inline-flex;
8947
- background-color: var(--wui-color-bg-surface-secondary);
8948
- border-radius: var(--wui-border-radius-rounded);
8949
- border: 2px solid var(--wui-color-bg-surface-secondary);
8950
- gap: var(--wui-space-01);
8951
- width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
8952
- `;
8953
- var SegmentedControl = (0, import_react41.forwardRef)(
8954
- ({
8955
- children,
8956
- disabled = false,
8957
- fullWidth = false,
8958
- selectedValue,
8959
- onSelectedValueChange,
8960
- ...props
8961
- }, ref) => {
8962
- if ((0, import_type_guards32.isNil)(children)) {
8963
- return null;
8964
- }
8965
- return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
8966
- StyledSegmentedControl,
8967
- {
8968
- ref,
8969
- $fullWidth: fullWidth,
8970
- disabled,
8971
- loop: true,
8972
- onValueChange: onSelectedValueChange,
8973
- rovingFocus: true,
8974
- type: "single",
8975
- value: selectedValue,
8976
- ...props,
8977
- children
8978
- }
8979
- );
8980
- }
8981
- );
8982
- SegmentedControl.displayName = "SegmentedControl";
8983
-
8984
- // src/components/SegmentedControl/SegmentedControlItem.tsx
8985
- var import_react42 = require("react");
8986
- var import_styled_components55 = __toESM(require("styled-components"));
8987
- var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
8988
- var import_type_guards33 = require("@wistia/type-guards");
8989
- var import_jsx_runtime204 = require("react/jsx-runtime");
8990
- var StyledSegmentedControlItem = (0, import_styled_components55.default)(import_react_toggle_group2.Item)`
8991
- all: unset; /* ToggleGroupItem is a button element */
8992
- align-items: center;
8993
- border-radius: var(--wui-border-radius-rounded);
8994
- color: var(--wui-color-text-secondary);
8995
- cursor: pointer;
8996
- display: flex;
8997
- flex-grow: 1;
8998
- flex-shrink: 1;
8999
- font-size: var(--wui-typography-label-3-size);
9000
- justify-content: center;
9001
- padding: 6px 8px;
9002
- user-select: none;
9003
-
9004
- /* Icon component */
9005
- svg {
9006
- height: 16px;
9007
- width: 16px;
9008
-
9009
- /* add right margin if there's a label and an icon */
9010
- ${({ $hasLabel }) => $hasLabel ? "margin-right: var(--wui-space-01)" : ""}
9011
- }
9012
-
9013
- &:hover {
9014
- background-color: var(--wui-color-bg-surface-secondary-hover);
9015
- }
9016
-
9017
- &:focus-visible {
9018
- outline: 2px solid var(--wui-color-focus-ring);
9019
- }
9020
-
9021
- &[data-state='on'] {
9022
- background-color: var(--wui-color-bg-fill-white);
9023
- color: var(--wui-color-text-selected);
9024
- cursor: default;
9025
- }
9026
-
9027
- &:focus-visible,
9028
- &[data-state='on'] {
9029
- svg path {
9030
- fill: var(--wui-color-focus-ring);
9031
- }
9032
- }
9033
-
9034
- &[data-disabled] {
9035
- cursor: not-allowed;
9036
-
9037
- &:hover {
9038
- background-color: inherit;
9039
- }
9040
- }
9041
- `;
9042
- var SegmentedControlItem = (0, import_react42.forwardRef)(
9043
- ({ disabled, icon, label, "aria-label": ariaLabel, value }, ref) => {
9044
- const handleClick = (event) => {
9045
- const target = event.target;
9046
- const { state } = target.dataset;
9047
- if (state === "on") {
9048
- event.preventDefault();
9049
- }
9050
- };
9051
- return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
9052
- StyledSegmentedControlItem,
9053
- {
9054
- ref,
9055
- $hasLabel: (0, import_type_guards33.isNotNil)(label),
9056
- "aria-label": (0, import_type_guards33.isNotNil)(label) ? void 0 : ariaLabel,
9057
- disabled,
9058
- onClick: handleClick,
9059
- value,
9060
- children: [
9061
- icon,
9062
- label
9063
- ]
9064
- }
9065
- );
9066
- }
9067
- );
9068
- SegmentedControlItem.displayName = "SegmentedControlItem";
9069
-
9070
- // src/components/Tag/Tag.tsx
9071
- var import_react43 = require("react");
9072
- var import_styled_components56 = __toESM(require("styled-components"));
9073
- var import_type_guards34 = require("@wistia/type-guards");
9074
- var import_jsx_runtime205 = require("react/jsx-runtime");
9075
- var TagLabel = import_styled_components56.default.a`
9076
- ${({ $colorScheme }) => getColorScheme($colorScheme)};
9077
- font-size: var(--wui-typography-label-4-size);
9078
- font-weight: var(--wui-typography-label-4-weight);
9079
- line-height: var(--wui-typography-label-4-line-height);
9080
- border-radius: var(--wui-border-radius-01);
9081
- align-items: center;
9082
- color: var(--wui-color-text);
9083
- text-decoration: none;
9084
- padding: var(--wui-space-01);
9085
-
9086
- :not(:only-child) {
9087
- padding-right: var(--wui-space-01);
9088
- }
9089
-
9090
- :is(a):hover {
9091
- background: var(--wui-color-bg-surface-secondary-hover);
9092
- }
9093
-
9094
- :is(a):active {
9095
- background: var(--wui-color-bg-surface-secondary-active);
9096
- }
9097
-
9098
- :focus-visible {
9099
- outline: unset;
9100
- box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
9101
- }
9102
- `;
9103
- var TagDivider = import_styled_components56.default.div`
9104
- ${({ $colorScheme }) => getColorScheme($colorScheme)};
9105
- border-left: 1px solid var(--wui-color-border);
9106
- display: flex;
9107
- height: 14px;
9108
- width: 1px;
9109
- `;
9110
- var StyledRemoveButton = import_styled_components56.default.button`
9111
- ${({ $colorScheme }) => getColorScheme($colorScheme)};
9112
- all: unset;
9113
- cursor: pointer;
9114
- display: flex;
9115
- height: 22px;
9116
- width: 12px;
9117
- align-items: center;
9118
- padding: 0 var(--wui-space-01);
9119
- border-radius: var(--wui-border-radius-01);
9120
-
9121
- svg path {
9122
- fill: var(--wui-color-icon);
9123
- }
9124
-
9125
- :hover {
9126
- background: var(--wui-color-bg-surface-secondary-hover);
9127
- }
9128
-
9129
- :active {
9130
- background: var(--wui-color-bg-surface-secondary-active);
9131
- }
9132
-
9133
- :focus-visible {
9134
- outline: unset;
9135
- box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
9136
- }
9137
- `;
9138
- var StyledTag = import_styled_components56.default.div`
9139
- ${({ $colorScheme }) => getColorScheme($colorScheme)};
9140
- align-items: center;
9141
- background-color: var(--wui-color-bg-surface-secondary);
9142
- border-radius: var(--wui-border-radius-01);
9143
- display: inline-flex;
9144
- overflow: hidden;
9145
-
9146
- > * {
9147
- transition: background var(--wui-duration-01) var(--wui-motion-ease);
9148
- }
9149
- `;
9150
- var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
9151
- if ((0, import_type_guards34.isNil)(onClickRemove)) {
9152
- return null;
9153
- }
9154
- if ((0, import_type_guards34.isNil)(onClickRemoveLabel)) {
9155
- throw new Error(
9156
- "for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
9157
- );
9158
- }
9159
- return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(import_jsx_runtime205.Fragment, { children: [
9160
- /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(TagDivider, { $colorScheme: colorScheme }),
9161
- /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
9162
- StyledRemoveButton,
9163
- {
9164
- $colorScheme: colorScheme,
9165
- onClick: onClickRemove,
9166
- type: "button",
9167
- children: [
9168
- /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
9169
- Icon,
9170
- {
9171
- size: "sm",
9172
- type: "close"
9173
- }
9174
- ),
9175
- /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
9176
- ]
9177
- }
9178
- )
9179
- ] });
9180
- };
9181
- var Tag = (0, import_react43.forwardRef)(
9182
- ({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
9183
- const labelProps = (0, import_type_guards34.isNotNil)(href) && (0, import_type_guards34.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
9184
- return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
9185
- StyledTag,
9186
- {
9187
- ref,
9188
- $colorScheme: colorScheme,
9189
- ...otherProps,
9190
- children: [
9191
- /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
9192
- TagLabel,
9193
- {
9194
- ...labelProps,
9195
- $colorScheme: colorScheme,
9196
- children: label
9197
- }
9198
- ),
9199
- /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
9200
- RemoveButton,
9201
- {
9202
- colorScheme,
9203
- onClickRemove,
9204
- onClickRemoveLabel
9205
- }
9206
- )
9346
+ disabled,
9347
+ htmlFor: computedId,
9348
+ required,
9349
+ children: label
9350
+ }
9351
+ ),
9352
+ /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(LabelDescription, { children: description })
9353
+ ] })
9207
9354
  ]
9208
9355
  }
9209
9356
  );
9210
9357
  }
9211
9358
  );
9212
- Tag.displayName = "Tag";
9359
+ Radio.displayName = "Radio";
9213
9360
 
9214
- // src/components/Tooltip/Tooltip.tsx
9215
- var import_react_tooltip2 = require("@radix-ui/react-tooltip");
9216
- var import_styled_components57 = __toESM(require("styled-components"));
9217
- var import_jsx_runtime206 = require("react/jsx-runtime");
9218
- var CompactTooltipStyles = import_styled_components57.css`
9219
- --tooltip-font-size: var(--wui-typography-label-4-size);
9220
- --tooltip-line-height: var(--wui-typography-label-4-line-height);
9221
- --tooltip-font-weight: var(--wui-typography-label-4-weight);
9222
- --tooltip-horizontal-padding: var(--wui-space-02);
9223
- --tooltip-vertical-padding: var(--wui-space-03);
9361
+ // src/components/SegmentedControl/SegmentedControl.tsx
9362
+ var import_react42 = require("react");
9363
+ var import_styled_components59 = __toESM(require("styled-components"));
9364
+ var import_react_toggle_group = require("@radix-ui/react-toggle-group");
9365
+ var import_type_guards33 = require("@wistia/type-guards");
9366
+ var import_jsx_runtime208 = require("react/jsx-runtime");
9367
+ var segmentedControlStyles = import_styled_components59.css`
9368
+ display: inline-flex;
9369
+ background-color: var(--wui-color-bg-surface-secondary);
9370
+ border-radius: var(--wui-border-radius-rounded);
9371
+ border: 2px solid var(--wui-color-bg-surface-secondary);
9372
+ gap: var(--wui-space-01);
9373
+ width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
9224
9374
  `;
9225
- var StyledContent = (0, import_styled_components57.default)(import_react_tooltip2.Content)`
9226
- --tooltip-font-family: var(--wui-typography-family-default);
9227
- --tooltip-border-radius: var(--wui-border-radius-05);
9228
- --tooltip-bg: var(--wui-color-bg-tooltip);
9229
- --tooltip-color: var(--wui-color-text-on-fill);
9230
- --tooltip-font-size: var(--wui-typography-label-3-size);
9231
- --tooltip-line-height: var(--wui-typography-label-3-line-height);
9232
- --tooltip-font-weight: var(--wui-typography-label-3-weight);
9233
- --tooltip-horizontal-padding: var(--wui-space-03);
9234
- --tooltip-vertical-padding: var(--wui-space-03);
9235
-
9236
- ${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
9237
-
9238
- font-family: var(--tooltip-font-family);
9239
- font-size: var(--tooltip-font-size);
9240
- border-radius: var(--tooltip-border-radius);
9241
- padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
9242
- background-color: var(--tooltip-bg);
9243
- color: var(--tooltip-color);
9244
- user-select: none;
9245
- animation-duration: 400ms;
9246
- animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
9247
- will-change: transform, opacity;
9248
- max-width: 30em;
9249
-
9250
- &[data-state='delayed-open'][data-side='top'] {
9251
- animation-name: slideDownAndFade;
9252
- }
9253
-
9254
- &[data-state='delayed-open'][data-side='right'] {
9255
- animation-name: slideLeftAndFade;
9256
- }
9257
-
9258
- &[data-state='delayed-open'][data-side='bottom'] {
9259
- animation-name: slideUpAndFade;
9260
- }
9261
-
9262
- &[data-state='delayed-open'][data-side='left'] {
9263
- animation-name: slideRightAndFade;
9264
- }
9375
+ var StyledSegmentedControl = (0, import_styled_components59.default)(import_react_toggle_group.Root)`
9376
+ ${segmentedControlStyles}
9265
9377
  `;
9266
- var VISUAL_OFFSET = 6;
9267
- var Tooltip = ({
9268
- delay = 700,
9269
- direction = "top",
9270
- content,
9271
- children,
9272
- forceOpen,
9273
- compact = false,
9274
- hideArrow = false
9275
- }) => {
9276
- const rootProps = {};
9277
- if (content === "" || content === null) {
9278
- rootProps.open = false;
9279
- }
9280
- if (forceOpen === true) {
9281
- rootProps.open = true;
9282
- }
9283
- return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
9284
- import_react_tooltip2.Root,
9285
- {
9286
- delayDuration: delay,
9287
- ...rootProps,
9288
- children: [
9289
- /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
9290
- /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
9291
- StyledContent,
9292
- {
9293
- $compact: compact,
9294
- side: direction,
9295
- sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
9296
- children: [
9297
- content,
9298
- !hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
9299
- "svg",
9300
- {
9301
- fill: "var(--tooltip-bg)",
9302
- height: "8",
9303
- style: { transform: "translateY(-2px)" },
9304
- viewBox: "0 0 12 8",
9305
- width: "12",
9306
- xmlns: "http://www.w3.org/2000/svg",
9307
- children: /* @__PURE__ */ (0, import_jsx_runtime206.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" })
9308
- }
9309
- ) }) : null
9310
- ]
9311
- }
9312
- ) })
9313
- ]
9378
+ var SegmentedControl = (0, import_react42.forwardRef)(
9379
+ ({
9380
+ children,
9381
+ disabled = false,
9382
+ fullWidth = false,
9383
+ selectedValue,
9384
+ onSelectedValueChange,
9385
+ ...props
9386
+ }, ref) => {
9387
+ if ((0, import_type_guards33.isNil)(children)) {
9388
+ return null;
9314
9389
  }
9315
- );
9316
- };
9317
- Tooltip.displayName = "Tooltip";
9318
-
9319
- // src/components/WistiaLogo/WistiaLogo.tsx
9320
- var import_styled_components58 = __toESM(require("styled-components"));
9321
- var import_type_guards35 = require("@wistia/type-guards");
9322
- var import_jsx_runtime207 = require("react/jsx-runtime");
9323
- var renderBrandmark = (brandmarkColor, iconOnly) => {
9324
- if (iconOnly) {
9325
- return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
9326
- "g",
9390
+ return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
9391
+ StyledSegmentedControl,
9327
9392
  {
9328
- "data-testid": "ui-wistia-logo-brandmark",
9329
- fill: brandmarkColor,
9330
- children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
9393
+ ref,
9394
+ $fullWidth: fullWidth,
9395
+ disabled,
9396
+ loop: true,
9397
+ onValueChange: onSelectedValueChange,
9398
+ rovingFocus: true,
9399
+ type: "single",
9400
+ value: selectedValue,
9401
+ ...props,
9402
+ children
9331
9403
  }
9332
9404
  );
9333
9405
  }
9334
- return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
9335
- "g",
9336
- {
9337
- "data-testid": "ui-wistia-logo-brandmark",
9338
- fill: brandmarkColor,
9339
- children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
9340
- }
9341
- );
9342
- };
9343
- var renderLogotype = (logotypeColor, iconOnly) => {
9344
- if (iconOnly) {
9345
- return null;
9346
- }
9347
- return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
9348
- "g",
9349
- {
9350
- "data-testid": "ui-wistia-logo-logotype",
9351
- fill: logotypeColor,
9352
- children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
9353
- }
9354
- );
9355
- };
9356
- var computedViewBox = (iconOnly) => {
9357
- if (iconOnly) {
9358
- return "0 0 34.4 26.78";
9359
- }
9360
- return "0 0 144 31.47";
9361
- };
9362
- var WistiaLogoComponent = import_styled_components58.default.svg`
9363
- height: ${({ height }) => `${height}px`};
9406
+ );
9407
+ SegmentedControl.displayName = "SegmentedControl";
9364
9408
 
9365
- /* ensure it will always fit on mobile */
9366
- max-height: 22vw;
9367
- max-width: 100%;
9409
+ // src/components/SegmentedControl/SegmentedControlItem.tsx
9410
+ var import_react43 = require("react");
9411
+ var import_styled_components60 = __toESM(require("styled-components"));
9412
+ var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
9413
+ var import_type_guards34 = require("@wistia/type-guards");
9414
+ var import_jsx_runtime209 = require("react/jsx-runtime");
9415
+ var segmentedControlItemStyles = import_styled_components60.css`
9416
+ all: unset; /* ToggleGroupItem is a button element */
9417
+ align-items: center;
9418
+ border-radius: var(--wui-border-radius-rounded);
9419
+ color: var(--wui-color-text-secondary);
9420
+ cursor: pointer;
9421
+ display: flex;
9422
+ flex-grow: 1;
9423
+ flex-shrink: 1;
9424
+ font-size: var(--wui-typography-label-3-size);
9425
+ justify-content: center;
9426
+ padding: 6px 8px;
9427
+ user-select: none;
9428
+
9429
+ /* Icon component */
9430
+ svg {
9431
+ height: 16px;
9432
+ width: 16px;
9433
+
9434
+ /* add right margin if there's a label and an icon */
9435
+ ${({ $hasLabel }) => $hasLabel ? "margin-right: var(--wui-space-01)" : ""}
9436
+ }
9368
9437
 
9369
9438
  &:hover {
9370
- path {
9371
- ${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
9372
- }
9439
+ background-color: var(--wui-color-bg-surface-secondary-hover);
9373
9440
  }
9374
- `;
9375
- var WistiaLogo = ({
9376
- description = void 0,
9377
- height = 100,
9378
- hoverColor = void 0,
9379
- href = void 0,
9380
- iconOnly = false,
9381
- title = "Wistia Logo",
9382
- variant = "standard",
9383
- ...otherProps
9384
- }) => {
9385
- const primaryColor = "#2949e5";
9386
- const darkColor = "#000934";
9387
- const lightColor = "#ffffff";
9388
- const VARIANT_COLORS = {
9389
- standard: {
9390
- brandmark: primaryColor,
9391
- logotype: darkColor
9392
- },
9393
- dark: {
9394
- brandmark: darkColor,
9395
- logotype: darkColor
9396
- },
9397
- light: {
9398
- brandmark: lightColor,
9399
- logotype: lightColor
9400
- }
9401
- };
9402
- const brandmarkColor = VARIANT_COLORS[variant].brandmark;
9403
- const logotypeColor = VARIANT_COLORS[variant].logotype;
9404
- const Logo = /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(
9405
- WistiaLogoComponent,
9406
- {
9407
- $hoverColor: hoverColor,
9408
- height,
9409
- role: "img",
9410
- viewBox: computedViewBox(iconOnly),
9411
- xmlns: "http://www.w3.org/2000/svg",
9412
- ...otherProps,
9413
- children: [
9414
- /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("title", { children: title }),
9415
- (0, import_type_guards35.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("desc", { children: description }) : null,
9416
- renderBrandmark(brandmarkColor, iconOnly),
9417
- renderLogotype(logotypeColor, iconOnly)
9418
- ]
9441
+
9442
+ &:focus-visible {
9443
+ outline: 2px solid var(--wui-color-focus-ring);
9444
+ }
9445
+
9446
+ /* note: react-toggle-group uses "on" and react-tabs uses "active" */
9447
+ &[data-state='on'],
9448
+ &[data-state='active'] {
9449
+ background-color: var(--wui-color-bg-fill-white);
9450
+ color: var(--wui-color-text-selected);
9451
+ cursor: default;
9452
+ }
9453
+
9454
+ &:focus-visible,
9455
+ &[data-state='on'],
9456
+ &[data-state='active'] {
9457
+ svg path {
9458
+ fill: var(--wui-color-focus-ring);
9419
9459
  }
9420
- );
9421
- return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("a", { href, children: Logo }) : Logo;
9422
- };
9423
- WistiaLogo.displayName = "WistiaLogo";
9460
+ }
9461
+
9462
+ &[data-disabled] {
9463
+ cursor: not-allowed;
9464
+
9465
+ &:hover {
9466
+ background-color: inherit;
9467
+ }
9468
+ }
9469
+ `;
9470
+ var StyledSegmentedControlItem = (0, import_styled_components60.default)(import_react_toggle_group2.Item)`
9471
+ ${segmentedControlItemStyles}
9472
+ `;
9473
+ var SegmentedControlItem = (0, import_react43.forwardRef)(
9474
+ ({ disabled, icon, label, "aria-label": ariaLabel, value }, ref) => {
9475
+ const handleClick = (event) => {
9476
+ const target = event.target;
9477
+ const { state } = target.dataset;
9478
+ if (state === "on") {
9479
+ event.preventDefault();
9480
+ }
9481
+ };
9482
+ return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
9483
+ StyledSegmentedControlItem,
9484
+ {
9485
+ ref,
9486
+ $hasLabel: (0, import_type_guards34.isNotNil)(label),
9487
+ "aria-label": (0, import_type_guards34.isNotNil)(label) ? void 0 : ariaLabel,
9488
+ disabled,
9489
+ onClick: handleClick,
9490
+ value,
9491
+ children: [
9492
+ icon,
9493
+ label
9494
+ ]
9495
+ }
9496
+ );
9497
+ }
9498
+ );
9499
+ SegmentedControlItem.displayName = "SegmentedControlItem";
9424
9500
 
9425
9501
  // src/components/Select/Select.tsx
9426
9502
  var import_react_select = require("@radix-ui/react-select");
9427
9503
  var import_react44 = require("react");
9428
- var import_styled_components59 = __toESM(require("styled-components"));
9429
- var import_jsx_runtime208 = require("react/jsx-runtime");
9430
- var StyledTrigger = (0, import_styled_components59.default)(import_react_select.Trigger)`
9504
+ var import_styled_components61 = __toESM(require("styled-components"));
9505
+ var import_jsx_runtime210 = require("react/jsx-runtime");
9506
+ var StyledTrigger = (0, import_styled_components61.default)(import_react_select.Trigger)`
9431
9507
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
9432
9508
  --wui-select-color-bg: var(--wui-color-bg-surface);
9433
9509
  --wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
@@ -9468,7 +9544,7 @@ var StyledTrigger = (0, import_styled_components59.default)(import_react_select.
9468
9544
  background-color: var(--wui-color-bg-surface-disabled);
9469
9545
  }
9470
9546
  `;
9471
- var StyledContent2 = (0, import_styled_components59.default)(import_react_select.Content)`
9547
+ var StyledContent2 = (0, import_styled_components61.default)(import_react_select.Content)`
9472
9548
  --wui-select-content-border: var(--wui-color-border);
9473
9549
  --wui-select-content-bg: var(--wui-color-bg-surface);
9474
9550
  --wui-select-content-border-radius: var(--wui-border-radius-02);
@@ -9494,13 +9570,13 @@ var Select = (0, import_react44.forwardRef)(
9494
9570
  ...props
9495
9571
  }, forwardedRef) => {
9496
9572
  const responsiveFullWidth = useResponsiveProp(fullWidth);
9497
- return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(
9573
+ return /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(
9498
9574
  import_react_select.Root,
9499
9575
  {
9500
9576
  ...props,
9501
9577
  onValueChange: onChange,
9502
9578
  children: [
9503
- /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(
9579
+ /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(
9504
9580
  StyledTrigger,
9505
9581
  {
9506
9582
  ref: forwardedRef,
@@ -9508,8 +9584,8 @@ var Select = (0, import_react44.forwardRef)(
9508
9584
  $fullWidth: responsiveFullWidth,
9509
9585
  ...props,
9510
9586
  children: [
9511
- /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Value, { placeholder }),
9512
- /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
9587
+ /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.Value, { placeholder }),
9588
+ /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
9513
9589
  Icon,
9514
9590
  {
9515
9591
  size: "md",
@@ -9519,10 +9595,10 @@ var Select = (0, import_react44.forwardRef)(
9519
9595
  ]
9520
9596
  }
9521
9597
  ),
9522
- /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledContent2, { position: "popper", children: [
9523
- /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Icon, { type: "caret-up" }) }),
9524
- /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Viewport, { children }),
9525
- /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Icon, { type: "caret-down" }) })
9598
+ /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(StyledContent2, { position: "popper", children: [
9599
+ /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(Icon, { type: "caret-up" }) }),
9600
+ /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.Viewport, { children }),
9601
+ /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(Icon, { type: "caret-down" }) })
9526
9602
  ] }) })
9527
9603
  ]
9528
9604
  }
@@ -9534,9 +9610,9 @@ Select.displayName = "Select";
9534
9610
  // src/components/Select/SelectOption.tsx
9535
9611
  var import_react_select2 = require("@radix-ui/react-select");
9536
9612
  var import_react45 = require("react");
9537
- var import_styled_components60 = __toESM(require("styled-components"));
9538
- var import_jsx_runtime209 = require("react/jsx-runtime");
9539
- var StyledItem = (0, import_styled_components60.default)(import_react_select2.Item)`
9613
+ var import_styled_components62 = __toESM(require("styled-components"));
9614
+ var import_jsx_runtime211 = require("react/jsx-runtime");
9615
+ var StyledItem = (0, import_styled_components62.default)(import_react_select2.Item)`
9540
9616
  ${variantStyleMap2.body3};
9541
9617
  display: flex;
9542
9618
  padding: var(--wui-select-option-padding);
@@ -9559,222 +9635,506 @@ var StyledItem = (0, import_styled_components60.default)(import_react_select2.It
9559
9635
  background-color: transparent;
9560
9636
  }
9561
9637
  `;
9562
- var StyledIconContainer = import_styled_components60.default.span`
9638
+ var StyledIconContainer = import_styled_components62.default.span`
9563
9639
  width: 12px;
9564
9640
  `;
9565
9641
  var SelectOption = (0, import_react45.forwardRef)(
9566
9642
  ({ children, ...props }, forwardedRef) => {
9567
- return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
9643
+ return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
9568
9644
  StyledItem,
9569
9645
  {
9570
- ...props,
9571
- ref: forwardedRef,
9646
+ ...props,
9647
+ ref: forwardedRef,
9648
+ children: [
9649
+ /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
9650
+ Icon,
9651
+ {
9652
+ size: "sm",
9653
+ type: "checkmark"
9654
+ }
9655
+ ) }) }),
9656
+ /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_select2.ItemText, { children })
9657
+ ]
9658
+ }
9659
+ );
9660
+ }
9661
+ );
9662
+ SelectOption.displayName = "Option";
9663
+
9664
+ // src/components/Select/SelectOptionGroup.tsx
9665
+ var import_react_select3 = require("@radix-ui/react-select");
9666
+ var import_styled_components63 = __toESM(require("styled-components"));
9667
+ var import_jsx_runtime212 = require("react/jsx-runtime");
9668
+ var StyledLabel4 = (0, import_styled_components63.default)(import_react_select3.Label)`
9669
+ padding: var(--wui-select-option-padding);
9670
+ `;
9671
+ var SelectOptionGroup = ({ children, label, ...props }) => {
9672
+ return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(import_react_select3.Group, { ...props, children: [
9673
+ /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
9674
+ Text,
9675
+ {
9676
+ prominence: "secondary",
9677
+ variant: "body3",
9678
+ children: label
9679
+ }
9680
+ ) }),
9681
+ children
9682
+ ] });
9683
+ };
9684
+
9685
+ // src/components/Tabs/Tabs.tsx
9686
+ var import_react48 = require("react");
9687
+ var import_react_tabs4 = require("@radix-ui/react-tabs");
9688
+ var import_type_guards36 = require("@wistia/type-guards");
9689
+
9690
+ // src/components/Tabs/TabPanel.tsx
9691
+ var import_styled_components64 = __toESM(require("styled-components"));
9692
+ var import_react_tabs = require("@radix-ui/react-tabs");
9693
+ var import_jsx_runtime213 = require("react/jsx-runtime");
9694
+ var StyledTabPanel = (0, import_styled_components64.default)(import_react_tabs.Content)`
9695
+ display: flex;
9696
+ flex-direction: column;
9697
+ `;
9698
+ var TabPanel = ({ children, value, ...props }) => {
9699
+ return /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
9700
+ StyledTabPanel,
9701
+ {
9702
+ value,
9703
+ ...props,
9704
+ children
9705
+ }
9706
+ );
9707
+ };
9708
+ TabPanel.displayName = "TabPanel";
9709
+
9710
+ // src/components/Tabs/TabList.tsx
9711
+ var import_styled_components65 = __toESM(require("styled-components"));
9712
+ var import_react_tabs2 = require("@radix-ui/react-tabs");
9713
+ var import_jsx_runtime214 = require("react/jsx-runtime");
9714
+ var StyledTabList = (0, import_styled_components65.default)(import_react_tabs2.List)`
9715
+ ${segmentedControlStyles}
9716
+
9717
+ margin-bottom: var(--wui-space-04);
9718
+ `;
9719
+ var TabList = ({
9720
+ children,
9721
+ fullWidth,
9722
+ ariaLabel,
9723
+ ...props
9724
+ }) => {
9725
+ return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
9726
+ StyledTabList,
9727
+ {
9728
+ $fullWidth: fullWidth,
9729
+ "aria-label": ariaLabel,
9730
+ ...props,
9731
+ children
9732
+ }
9733
+ );
9734
+ };
9735
+ TabList.displayName = "TabList";
9736
+
9737
+ // src/components/Tabs/TabItem.tsx
9738
+ var import_react46 = require("react");
9739
+ var import_styled_components66 = __toESM(require("styled-components"));
9740
+ var import_react_tabs3 = require("@radix-ui/react-tabs");
9741
+ var import_type_guards35 = require("@wistia/type-guards");
9742
+ var import_jsx_runtime215 = require("react/jsx-runtime");
9743
+ var StyledTabItem = (0, import_styled_components66.default)(import_react_tabs3.Trigger)`
9744
+ ${segmentedControlItemStyles}
9745
+
9746
+ &[data-state='active'] {
9747
+ background-color: white;
9748
+ }
9749
+ `;
9750
+ var TabItem = (0, import_react46.forwardRef)(
9751
+ ({ disabled = false, icon, label, "aria-label": ariaLabel, value }, ref) => {
9752
+ return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(
9753
+ StyledTabItem,
9754
+ {
9755
+ ref,
9756
+ $hasLabel: (0, import_type_guards35.isNotNil)(label),
9757
+ "aria-label": (0, import_type_guards35.isNotNil)(label) ? void 0 : ariaLabel,
9758
+ disabled,
9759
+ value,
9760
+ children: [
9761
+ icon,
9762
+ label
9763
+ ]
9764
+ }
9765
+ );
9766
+ }
9767
+ );
9768
+ TabItem.displayName = "TabItem";
9769
+
9770
+ // src/components/Tabs/extractTabItems.ts
9771
+ var import_react47 = require("react");
9772
+ var extractTabItems = (children) => {
9773
+ const tabItems = [];
9774
+ import_react47.Children.forEach(children, (child) => {
9775
+ if (!(0, import_react47.isValidElement)(child)) {
9776
+ return;
9777
+ }
9778
+ if (typeof child.type !== "string" && child.type.displayName === "Tab") {
9779
+ tabItems.push(child);
9780
+ } else if (child.type === import_react47.Fragment) {
9781
+ const fragmentElement = child;
9782
+ tabItems.push(...extractTabItems(fragmentElement.props.children));
9783
+ } else if ((child.props.children ?? null) != null) {
9784
+ const childChildren = child.props.children;
9785
+ tabItems.push(...extractTabItems(childChildren));
9786
+ } else {
9787
+ }
9788
+ });
9789
+ return tabItems;
9790
+ };
9791
+
9792
+ // src/components/Tabs/Tabs.tsx
9793
+ var import_jsx_runtime216 = require("react/jsx-runtime");
9794
+ var Tabs = (0, import_react48.forwardRef)(
9795
+ ({
9796
+ children,
9797
+ fullWidth = true,
9798
+ "aria-label": ariaLabel,
9799
+ defaultSelectedValue,
9800
+ selectedValue,
9801
+ onSelectedValueChange,
9802
+ ...otherProps
9803
+ }, ref) => {
9804
+ const tabItems = extractTabItems(children);
9805
+ const modeProps = defaultSelectedValue !== void 0 ? { defaultValue: defaultSelectedValue } : { value: selectedValue, onValueChange: onSelectedValueChange };
9806
+ return /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)(
9807
+ import_react_tabs4.Root,
9808
+ {
9809
+ ref,
9810
+ activationMode: "automatic",
9811
+ ...otherProps,
9812
+ ...modeProps,
9813
+ children: [
9814
+ /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
9815
+ TabList,
9816
+ {
9817
+ ariaLabel,
9818
+ fullWidth,
9819
+ children: tabItems.map((tab) => {
9820
+ const {
9821
+ value,
9822
+ disabled = false,
9823
+ icon,
9824
+ label,
9825
+ "aria-label": ariaLabelForTab
9826
+ } = tab.props;
9827
+ if ((0, import_type_guards36.isNil)(icon)) {
9828
+ return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
9829
+ TabItem,
9830
+ {
9831
+ disabled,
9832
+ label,
9833
+ value
9834
+ },
9835
+ value
9836
+ );
9837
+ }
9838
+ if ((0, import_type_guards36.isNotNil)(label)) {
9839
+ return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
9840
+ TabItem,
9841
+ {
9842
+ disabled,
9843
+ icon,
9844
+ label,
9845
+ value
9846
+ },
9847
+ value
9848
+ );
9849
+ }
9850
+ if ((0, import_type_guards36.isNotNil)(ariaLabelForTab)) {
9851
+ return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
9852
+ TabItem,
9853
+ {
9854
+ "aria-label": ariaLabelForTab,
9855
+ disabled,
9856
+ icon,
9857
+ value
9858
+ },
9859
+ value
9860
+ );
9861
+ }
9862
+ throw new Error("A `Tab` with an icon must have either label or aria-label");
9863
+ })
9864
+ }
9865
+ ),
9866
+ tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
9867
+ TabPanel,
9868
+ {
9869
+ value: tab.props.value,
9870
+ children: tab.props.children
9871
+ },
9872
+ tab.props.value
9873
+ ))
9874
+ ]
9875
+ }
9876
+ );
9877
+ }
9878
+ );
9879
+ Tabs.displayName = "Tabs";
9880
+
9881
+ // src/components/Tabs/Tab.tsx
9882
+ var import_react49 = require("react");
9883
+ var import_jsx_runtime217 = require("react/jsx-runtime");
9884
+ var Tab = (0, import_react49.forwardRef)(({ children }, ref) => {
9885
+ return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ref, children });
9886
+ });
9887
+ Tab.displayName = "Tab";
9888
+
9889
+ // src/components/Tag/Tag.tsx
9890
+ var import_react50 = require("react");
9891
+ var import_styled_components67 = __toESM(require("styled-components"));
9892
+ var import_type_guards37 = require("@wistia/type-guards");
9893
+ var import_jsx_runtime218 = require("react/jsx-runtime");
9894
+ var TagLabel = import_styled_components67.default.a`
9895
+ ${({ $colorScheme }) => getColorScheme($colorScheme)};
9896
+ font-size: var(--wui-typography-label-4-size);
9897
+ font-weight: var(--wui-typography-label-4-weight);
9898
+ line-height: var(--wui-typography-label-4-line-height);
9899
+ border-radius: var(--wui-border-radius-01);
9900
+ align-items: center;
9901
+ color: var(--wui-color-text);
9902
+ text-decoration: none;
9903
+ padding: var(--wui-space-01);
9904
+
9905
+ :not(:only-child) {
9906
+ padding-right: var(--wui-space-01);
9907
+ }
9908
+
9909
+ :is(a):hover {
9910
+ background: var(--wui-color-bg-surface-secondary-hover);
9911
+ }
9912
+
9913
+ :is(a):active {
9914
+ background: var(--wui-color-bg-surface-secondary-active);
9915
+ }
9916
+
9917
+ :focus-visible {
9918
+ outline: unset;
9919
+ box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
9920
+ }
9921
+ `;
9922
+ var TagDivider = import_styled_components67.default.div`
9923
+ ${({ $colorScheme }) => getColorScheme($colorScheme)};
9924
+ border-left: 1px solid var(--wui-color-border);
9925
+ display: flex;
9926
+ height: 14px;
9927
+ width: 1px;
9928
+ `;
9929
+ var StyledRemoveButton = import_styled_components67.default.button`
9930
+ ${({ $colorScheme }) => getColorScheme($colorScheme)};
9931
+ all: unset;
9932
+ cursor: pointer;
9933
+ display: flex;
9934
+ height: 22px;
9935
+ width: 12px;
9936
+ align-items: center;
9937
+ padding: 0 var(--wui-space-01);
9938
+ border-radius: var(--wui-border-radius-01);
9939
+
9940
+ svg path {
9941
+ fill: var(--wui-color-icon);
9942
+ }
9943
+
9944
+ :hover {
9945
+ background: var(--wui-color-bg-surface-secondary-hover);
9946
+ }
9947
+
9948
+ :active {
9949
+ background: var(--wui-color-bg-surface-secondary-active);
9950
+ }
9951
+
9952
+ :focus-visible {
9953
+ outline: unset;
9954
+ box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
9955
+ }
9956
+ `;
9957
+ var StyledTag = import_styled_components67.default.div`
9958
+ ${({ $colorScheme }) => getColorScheme($colorScheme)};
9959
+ align-items: center;
9960
+ background-color: var(--wui-color-bg-surface-secondary);
9961
+ border-radius: var(--wui-border-radius-01);
9962
+ display: inline-flex;
9963
+ overflow: hidden;
9964
+
9965
+ > * {
9966
+ transition: background var(--wui-duration-01) var(--wui-motion-ease);
9967
+ }
9968
+ `;
9969
+ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
9970
+ if ((0, import_type_guards37.isNil)(onClickRemove)) {
9971
+ return null;
9972
+ }
9973
+ if ((0, import_type_guards37.isNil)(onClickRemoveLabel)) {
9974
+ throw new Error(
9975
+ "for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
9976
+ );
9977
+ }
9978
+ return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(import_jsx_runtime218.Fragment, { children: [
9979
+ /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(TagDivider, { $colorScheme: colorScheme }),
9980
+ /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
9981
+ StyledRemoveButton,
9982
+ {
9983
+ $colorScheme: colorScheme,
9984
+ onClick: onClickRemove,
9985
+ type: "button",
9986
+ children: [
9987
+ /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
9988
+ Icon,
9989
+ {
9990
+ size: "sm",
9991
+ type: "close"
9992
+ }
9993
+ ),
9994
+ /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
9995
+ ]
9996
+ }
9997
+ )
9998
+ ] });
9999
+ };
10000
+ var Tag = (0, import_react50.forwardRef)(
10001
+ ({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
10002
+ const labelProps = (0, import_type_guards37.isNotNil)(href) && (0, import_type_guards37.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
10003
+ return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
10004
+ StyledTag,
10005
+ {
10006
+ ref,
10007
+ $colorScheme: colorScheme,
10008
+ ...otherProps,
9572
10009
  children: [
9573
- /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
9574
- Icon,
10010
+ /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
10011
+ TagLabel,
9575
10012
  {
9576
- size: "sm",
9577
- type: "checkmark"
10013
+ ...labelProps,
10014
+ $colorScheme: colorScheme,
10015
+ children: label
9578
10016
  }
9579
- ) }) }),
9580
- /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_select2.ItemText, { children })
10017
+ ),
10018
+ /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
10019
+ RemoveButton,
10020
+ {
10021
+ colorScheme,
10022
+ onClickRemove,
10023
+ onClickRemoveLabel
10024
+ }
10025
+ )
9581
10026
  ]
9582
10027
  }
9583
10028
  );
9584
10029
  }
9585
10030
  );
9586
- SelectOption.displayName = "Option";
10031
+ Tag.displayName = "Tag";
9587
10032
 
9588
- // src/components/Select/SelectOptionGroup.tsx
9589
- var import_react_select3 = require("@radix-ui/react-select");
9590
- var import_styled_components61 = __toESM(require("styled-components"));
9591
- var import_jsx_runtime210 = require("react/jsx-runtime");
9592
- var StyledLabel3 = (0, import_styled_components61.default)(import_react_select3.Label)`
9593
- padding: var(--wui-select-option-padding);
9594
- `;
9595
- var SelectOptionGroup = ({ children, label, ...props }) => {
9596
- return /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(import_react_select3.Group, { ...props, children: [
9597
- /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(StyledLabel3, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
9598
- Text,
10033
+ // src/components/WistiaLogo/WistiaLogo.tsx
10034
+ var import_styled_components68 = __toESM(require("styled-components"));
10035
+ var import_type_guards38 = require("@wistia/type-guards");
10036
+ var import_jsx_runtime219 = require("react/jsx-runtime");
10037
+ var renderBrandmark = (brandmarkColor, iconOnly) => {
10038
+ if (iconOnly) {
10039
+ return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
10040
+ "g",
9599
10041
  {
9600
- prominence: "secondary",
9601
- variant: "body3",
9602
- children: label
10042
+ "data-testid": "ui-wistia-logo-brandmark",
10043
+ fill: brandmarkColor,
10044
+ children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
9603
10045
  }
9604
- ) }),
9605
- children
9606
- ] });
9607
- };
9608
-
9609
- // src/components/DataCards/DataCard.tsx
9610
- var import_styled_components62 = __toESM(require("styled-components"));
9611
- var import_type_guards36 = require("@wistia/type-guards");
9612
- var import_jsx_runtime211 = require("react/jsx-runtime");
9613
- var StyledDataCard = import_styled_components62.default.div`
9614
- ${({ $colorScheme }) => getColorScheme($colorScheme)}
9615
- display: grid;
9616
- grid-template-areas: 'label slot' 'value value';
9617
- grid-template-rows: auto auto;
9618
- grid-template-columns: auto auto;
9619
- gap: var(--wui-space-01);
9620
- padding: var(--wui-space-03);
9621
- background: var(--wui-color-bg-surface-secondary);
9622
- flex: 1;
9623
- border-radius: var(--wui-border-radius-02);
9624
- position: relative;
9625
- `;
9626
- var shimmer = import_styled_components62.keyframes`
9627
- 0% {
9628
- background-position: 200% 0;
10046
+ );
9629
10047
  }
9630
- 100% {
9631
- background-position: -200% 0;
10048
+ return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
10049
+ "g",
10050
+ {
10051
+ "data-testid": "ui-wistia-logo-brandmark",
10052
+ fill: brandmarkColor,
10053
+ children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
10054
+ }
10055
+ );
10056
+ };
10057
+ var renderLogotype = (logotypeColor, iconOnly) => {
10058
+ if (iconOnly) {
10059
+ return null;
9632
10060
  }
9633
- `;
9634
- var LoadingBackground = import_styled_components62.default.div`
9635
- background: linear-gradient(
9636
- 90deg,
9637
- var(--wui-color-bg-surface-tertiary) 25%,
9638
- var(--wui-color-bg-surface-secondary) 37%,
9639
- var(--wui-color-bg-surface-tertiary) 63%
10061
+ return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
10062
+ "g",
10063
+ {
10064
+ "data-testid": "ui-wistia-logo-logotype",
10065
+ fill: logotypeColor,
10066
+ children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
10067
+ }
9640
10068
  );
9641
- background-size: 200% 100%;
9642
- animation: ${shimmer} 1.5s infinite;
9643
- border-radius: var(--wui-border-radius-01);
9644
- `;
9645
- var StyledLoadingLabel = (0, import_styled_components62.default)(LoadingBackground)`
9646
- width: 80px;
9647
- height: var(--wui-typography-heading-6-line-height);
9648
- `;
9649
- var StyledLoadingValue = (0, import_styled_components62.default)(LoadingBackground)`
9650
- width: 90%;
9651
- height: var(--wui-typography-heading-3-line-height);
9652
- `;
9653
- var StyledLabel4 = (0, import_styled_components62.default)(Heading)`
9654
- grid-area: label;
9655
- `;
9656
- var StyledValue = (0, import_styled_components62.default)(Heading)`
9657
- grid-area: value;
9658
- `;
9659
- var StyledSlot = import_styled_components62.default.div`
9660
- display: flex;
9661
- justify-content: flex-end;
9662
- grid-area: slot;
9663
- align-self: center;
9664
- `;
9665
- var StyledDataCardTrendContainer = import_styled_components62.default.div`
9666
- position: absolute;
9667
- bottom: var(--wui-space-01);
9668
- right: var(--wui-space-01);
9669
- `;
9670
- var DataCard = ({
9671
- label,
9672
- value,
9673
- upperRightSlot,
9674
- colorScheme = "inherit",
9675
- isLoading = false,
9676
- trend,
9677
- ...props
9678
- }) => /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
9679
- StyledDataCard,
9680
- {
9681
- $colorScheme: colorScheme,
9682
- ...props,
9683
- children: [
9684
- /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
9685
- StyledLabel4,
9686
- {
9687
- renderAs: "dt",
9688
- variant: "heading6",
9689
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledLoadingLabel, {}) : label
9690
- }
9691
- ),
9692
- /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
9693
- StyledValue,
9694
- {
9695
- renderAs: "dd",
9696
- variant: "heading3",
9697
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledLoadingValue, {}) : value
9698
- }
9699
- ),
9700
- (0, import_type_guards36.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledSlot, { children: upperRightSlot }),
9701
- (0, import_type_guards36.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledDataCardTrendContainer, { children: trend })
9702
- ]
10069
+ };
10070
+ var computedViewBox = (iconOnly) => {
10071
+ if (iconOnly) {
10072
+ return "0 0 34.4 26.78";
9703
10073
  }
9704
- );
9705
- DataCard.displayName = "DataCard";
10074
+ return "0 0 144 31.47";
10075
+ };
10076
+ var WistiaLogoComponent = import_styled_components68.default.svg`
10077
+ height: ${({ height }) => `${height}px`};
9706
10078
 
9707
- // src/components/DataCards/DataCards.tsx
9708
- var import_styled_components63 = __toESM(require("styled-components"));
9709
- var import_jsx_runtime212 = require("react/jsx-runtime");
9710
- var StyledDataCards = (0, import_styled_components63.default)(Box)`
9711
- ${({ $colorScheme }) => getColorScheme($colorScheme)};
9712
- margin-top: 0; /* Remove default <dl> style */
9713
- > * {
9714
- min-width: 120px;
9715
- max-width: ${({ $cardMaxWidth }) => $cardMaxWidth};
10079
+ /* ensure it will always fit on mobile */
10080
+ max-height: 22vw;
10081
+ max-width: 100%;
10082
+
10083
+ &:hover {
10084
+ path {
10085
+ ${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
10086
+ }
9716
10087
  }
9717
10088
  `;
9718
- var DataCards = ({
9719
- children,
9720
- cardMaxWidth = "none",
9721
- colorScheme = "inherit",
9722
- ...props
10089
+ var WistiaLogo = ({
10090
+ description = void 0,
10091
+ height = 100,
10092
+ hoverColor = void 0,
10093
+ href = void 0,
10094
+ iconOnly = false,
10095
+ title = "Wistia Logo",
10096
+ variant = "standard",
10097
+ ...otherProps
9723
10098
  }) => {
9724
- return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
9725
- StyledDataCards,
10099
+ const primaryColor = "#2949e5";
10100
+ const darkColor = "#000934";
10101
+ const lightColor = "#ffffff";
10102
+ const VARIANT_COLORS = {
10103
+ standard: {
10104
+ brandmark: primaryColor,
10105
+ logotype: darkColor
10106
+ },
10107
+ dark: {
10108
+ brandmark: darkColor,
10109
+ logotype: darkColor
10110
+ },
10111
+ light: {
10112
+ brandmark: lightColor,
10113
+ logotype: lightColor
10114
+ }
10115
+ };
10116
+ const brandmarkColor = VARIANT_COLORS[variant].brandmark;
10117
+ const logotypeColor = VARIANT_COLORS[variant].logotype;
10118
+ const Logo = /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(
10119
+ WistiaLogoComponent,
9726
10120
  {
9727
- ...props,
9728
- $cardMaxWidth: cardMaxWidth,
9729
- $colorScheme: colorScheme,
9730
- direction: "row",
9731
- fill: "horizontal",
9732
- gap: "space-02",
9733
- renderAs: "dl",
9734
- wrapItems: true,
9735
- children
10121
+ $hoverColor: hoverColor,
10122
+ height,
10123
+ role: "img",
10124
+ viewBox: computedViewBox(iconOnly),
10125
+ xmlns: "http://www.w3.org/2000/svg",
10126
+ ...otherProps,
10127
+ children: [
10128
+ /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("title", { children: title }),
10129
+ (0, import_type_guards38.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("desc", { children: description }) : null,
10130
+ renderBrandmark(brandmarkColor, iconOnly),
10131
+ renderLogotype(logotypeColor, iconOnly)
10132
+ ]
9736
10133
  }
9737
10134
  );
10135
+ return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("a", { href, children: Logo }) : Logo;
9738
10136
  };
9739
- DataCards.displayName = "DataCards";
9740
-
9741
- // src/components/DataCards/DataCardTrend.tsx
9742
- var import_styled_components64 = __toESM(require("styled-components"));
9743
- var import_jsx_runtime213 = require("react/jsx-runtime");
9744
- var StyledDataCardTrend = import_styled_components64.default.div`
9745
- ${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
9746
- background: var(--wui-color-bg-app);
9747
- border-radius: var(--wui-border-radius-rounded);
9748
- padding: var(--wui-space-01);
9749
- display: flex;
9750
- align-items: center;
9751
- gap: 2px;
9752
- `;
9753
- var DataCardTrend = ({
9754
- direction = "up",
9755
- outlook = "positive",
9756
- children,
9757
- ...props
9758
- }) => {
9759
- return /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
9760
- /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
9761
- Icon,
9762
- {
9763
- size: "md",
9764
- type: direction === "up" ? "arrow-up" : "arrow-down",
9765
- ...props
9766
- }
9767
- ),
9768
- /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
9769
- Text,
9770
- {
9771
- prominence: "secondary",
9772
- variant: "label4",
9773
- children
9774
- }
9775
- )
9776
- ] });
9777
- };
10137
+ WistiaLogo.displayName = "WistiaLogo";
9778
10138
  // Annotate the CommonJS export names for ESM import in node:
9779
10139
  0 && (module.exports = {
9780
10140
  ActionButton,
@@ -9794,6 +10154,7 @@ var DataCardTrend = ({
9794
10154
  DataCardTrend,
9795
10155
  DataCards,
9796
10156
  Divider,
10157
+ EditableHeading,
9797
10158
  Ellipsis,
9798
10159
  Form,
9799
10160
  FormErrorSummary,
@@ -9823,6 +10184,8 @@ var DataCardTrend = ({
9823
10184
  SelectOptionGroup,
9824
10185
  Stack,
9825
10186
  SubMenu,
10187
+ Tab,
10188
+ Tabs,
9826
10189
  Tag,
9827
10190
  Text,
9828
10191
  Tooltip,