@wistia/ui 0.5.3 → 0.5.4-beta.31b8aad1.95d4301

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