@wistia/ui 0.6.13 → 0.6.14-beta.3f97cbfa.3a5d72d
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 +626 -483
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +57 -2
- package/dist/index.d.ts +57 -2
- package/dist/index.mjs +396 -255
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.14-beta.3f97cbfa.3a5d72d
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -1350,11 +1350,39 @@ var designTokens = css11`
|
|
|
1350
1350
|
}
|
|
1351
1351
|
`;
|
|
1352
1352
|
|
|
1353
|
+
// src/components/ClickRegion/globalStyles.tsx
|
|
1354
|
+
import { css as css12 } from "styled-components";
|
|
1355
|
+
var clickRegionGlobalStyles = css12`
|
|
1356
|
+
[data-click-region] {
|
|
1357
|
+
position: relative;
|
|
1358
|
+
cursor: pointer;
|
|
1359
|
+
z-index: 1;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
[data-click-region] a:not([data-click-region-target-link]),
|
|
1363
|
+
[data-click-region] button:not([data-click-region-target-button]) {
|
|
1364
|
+
z-index: 2;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
[data-click-region-target-link]::before {
|
|
1368
|
+
content: '';
|
|
1369
|
+
cursor: inherit;
|
|
1370
|
+
display: block;
|
|
1371
|
+
position: absolute;
|
|
1372
|
+
top: 0;
|
|
1373
|
+
left: 0;
|
|
1374
|
+
z-index: 0;
|
|
1375
|
+
width: 100%;
|
|
1376
|
+
height: 100%;
|
|
1377
|
+
}
|
|
1378
|
+
`;
|
|
1379
|
+
|
|
1353
1380
|
// src/css/GlobalStyle.tsx
|
|
1354
1381
|
var GlobalStyle = createGlobalStyle`
|
|
1355
1382
|
${resetCss}
|
|
1356
1383
|
${globalStyleAdjustmentsCss}
|
|
1357
1384
|
${designTokens}
|
|
1385
|
+
${clickRegionGlobalStyles}
|
|
1358
1386
|
`;
|
|
1359
1387
|
|
|
1360
1388
|
// src/providers/AriaLiveProvider/AriaLiveProvider.tsx
|
|
@@ -2082,9 +2110,9 @@ import { isNotNil as isNotNil3 } from "@wistia/type-guards";
|
|
|
2082
2110
|
|
|
2083
2111
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
2084
2112
|
import { isNotNil as isNotNil2 } from "@wistia/type-guards";
|
|
2085
|
-
import styled, { css as
|
|
2113
|
+
import styled, { css as css13 } from "styled-components";
|
|
2086
2114
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
2087
|
-
var ellipsisStyle =
|
|
2115
|
+
var ellipsisStyle = css13`
|
|
2088
2116
|
overflow: hidden;
|
|
2089
2117
|
text-overflow: ellipsis;
|
|
2090
2118
|
white-space: nowrap;
|
|
@@ -2107,14 +2135,14 @@ var ellipsisStyle = css12`
|
|
|
2107
2135
|
}
|
|
2108
2136
|
}
|
|
2109
2137
|
`;
|
|
2110
|
-
var ellipsisFlexParentStyle =
|
|
2138
|
+
var ellipsisFlexParentStyle = css13`
|
|
2111
2139
|
min-width: 0;
|
|
2112
2140
|
`;
|
|
2113
2141
|
var EllipsisComponent = styled.div`
|
|
2114
2142
|
${ellipsisStyle};
|
|
2115
2143
|
${({ $lines }) => {
|
|
2116
2144
|
if (isNotNil2($lines)) {
|
|
2117
|
-
return
|
|
2145
|
+
return css13`
|
|
2118
2146
|
-webkit-box-orient: vertical;
|
|
2119
2147
|
-webkit-line-clamp: ${$lines};
|
|
2120
2148
|
display: -webkit-box;
|
|
@@ -2135,7 +2163,7 @@ var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ jsx4(
|
|
|
2135
2163
|
Ellipsis.displayName = "Ellipsis";
|
|
2136
2164
|
|
|
2137
2165
|
// src/private/helpers/getColorScheme/getColorScheme.ts
|
|
2138
|
-
import { css as
|
|
2166
|
+
import { css as css14 } from "styled-components";
|
|
2139
2167
|
var colorSchemeSchema = [
|
|
2140
2168
|
{ token: "bg-surface", step: "2" },
|
|
2141
2169
|
{ token: "bg-surface-hover", step: "3" },
|
|
@@ -2162,7 +2190,7 @@ var colorSchemeSchema = [
|
|
|
2162
2190
|
{ token: "icon-on-fill", step: "contrast" },
|
|
2163
2191
|
{ token: "focus-ring", step: "9" }
|
|
2164
2192
|
];
|
|
2165
|
-
var defaultScheme =
|
|
2193
|
+
var defaultScheme = css14`
|
|
2166
2194
|
--wui-color-bg-surface: var(--wui-gray-1);
|
|
2167
2195
|
--wui-color-bg-surface-hover: var(--wui-gray-3);
|
|
2168
2196
|
--wui-color-bg-surface-active: var(--wui-gray-4);
|
|
@@ -2188,7 +2216,7 @@ var defaultScheme = css13`
|
|
|
2188
2216
|
--wui-color-icon-on-fill: var(--wui-gray-contrast);
|
|
2189
2217
|
--wui-color-focus-ring: var(--wui-blue-9);
|
|
2190
2218
|
`;
|
|
2191
|
-
var navScheme =
|
|
2219
|
+
var navScheme = css14`
|
|
2192
2220
|
--wui-color-bg-app: #1e3399;
|
|
2193
2221
|
|
|
2194
2222
|
--wui-color-bg-fill: var(--wui-blue-1);
|
|
@@ -2249,7 +2277,7 @@ var getColorScheme = (colorScheme) => {
|
|
|
2249
2277
|
if (colorScheme === "default") {
|
|
2250
2278
|
return defaultScheme;
|
|
2251
2279
|
}
|
|
2252
|
-
return
|
|
2280
|
+
return css14`
|
|
2253
2281
|
${colorSchemeSchema.map(({ token, step }) => {
|
|
2254
2282
|
return `--wui-color-${token}: var(--wui-${colorScheme === "info" ? "blue" : colorScheme}-${step});`;
|
|
2255
2283
|
}).join("")}
|
|
@@ -2365,7 +2393,7 @@ var useToast = () => {
|
|
|
2365
2393
|
|
|
2366
2394
|
// src/components/ActionButton/ActionButton.tsx
|
|
2367
2395
|
import { forwardRef as forwardRef3 } from "react";
|
|
2368
|
-
import styled6, { css as
|
|
2396
|
+
import styled6, { css as css17 } from "styled-components";
|
|
2369
2397
|
|
|
2370
2398
|
// src/components/Button/Button.tsx
|
|
2371
2399
|
import { forwardRef as forwardRef2 } from "react";
|
|
@@ -2373,8 +2401,8 @@ import styled5 from "styled-components";
|
|
|
2373
2401
|
import { isNotNil as isNotNil5, isNotUndefined as isNotUndefined3 } from "@wistia/type-guards";
|
|
2374
2402
|
|
|
2375
2403
|
// src/css/buttonResetCss.tsx
|
|
2376
|
-
import { css as
|
|
2377
|
-
var buttonResetCss =
|
|
2404
|
+
import { css as css15 } from "styled-components";
|
|
2405
|
+
var buttonResetCss = css15`
|
|
2378
2406
|
align-items: center;
|
|
2379
2407
|
background-color: transparent;
|
|
2380
2408
|
background-image: none;
|
|
@@ -2419,8 +2447,8 @@ var buttonResetCss = css14`
|
|
|
2419
2447
|
`;
|
|
2420
2448
|
|
|
2421
2449
|
// src/components/Button/buttonStyles.tsx
|
|
2422
|
-
import { css as
|
|
2423
|
-
var buttonSmallStyles =
|
|
2450
|
+
import { css as css16 } from "styled-components";
|
|
2451
|
+
var buttonSmallStyles = css16`
|
|
2424
2452
|
--button-padding-vertical: var(--wui-space-01);
|
|
2425
2453
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2426
2454
|
--button-label-padding-horizontal: var(--wui-space-01);
|
|
@@ -2431,7 +2459,7 @@ var buttonSmallStyles = css15`
|
|
|
2431
2459
|
--button-icon-size: 12px;
|
|
2432
2460
|
--button-label-gap: 4px;
|
|
2433
2461
|
`;
|
|
2434
|
-
var buttonMediumStyles =
|
|
2462
|
+
var buttonMediumStyles = css16`
|
|
2435
2463
|
--button-padding-vertical: var(--wui-space-02);
|
|
2436
2464
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2437
2465
|
--button-label-padding-horizontal: 6px;
|
|
@@ -2442,7 +2470,7 @@ var buttonMediumStyles = css15`
|
|
|
2442
2470
|
--button-icon-size: 16px;
|
|
2443
2471
|
--button-label-gap: 6px;
|
|
2444
2472
|
`;
|
|
2445
|
-
var buttonLargeStyles =
|
|
2473
|
+
var buttonLargeStyles = css16`
|
|
2446
2474
|
--button-padding-vertical: var(--wui-space-02);
|
|
2447
2475
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2448
2476
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2453,7 +2481,7 @@ var buttonLargeStyles = css15`
|
|
|
2453
2481
|
--button-icon-size: 24px;
|
|
2454
2482
|
--button-label-gap: 8px;
|
|
2455
2483
|
`;
|
|
2456
|
-
var buttonExtraLargeStyles =
|
|
2484
|
+
var buttonExtraLargeStyles = css16`
|
|
2457
2485
|
--button-padding-vertical: var(--wui-space-03);
|
|
2458
2486
|
--button-padding-horizontal: var(--wui-space-03);
|
|
2459
2487
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2464,34 +2492,34 @@ var buttonExtraLargeStyles = css15`
|
|
|
2464
2492
|
--button-icon-size: 24px;
|
|
2465
2493
|
--button-label-gap: 8px;
|
|
2466
2494
|
`;
|
|
2467
|
-
var ghostButtonVariant =
|
|
2495
|
+
var ghostButtonVariant = css16`
|
|
2468
2496
|
--button-color-bg: transparent;
|
|
2469
2497
|
--button-color-bg-hover: var(--wui-color-bg-surface-hover);
|
|
2470
2498
|
--button-color-bg-active: var(--wui-color-bg-surface-active);
|
|
2471
2499
|
--button-color-text: var(--wui-color-text-button);
|
|
2472
2500
|
--button-color-icon: var(--wui-color-icon);
|
|
2473
2501
|
`;
|
|
2474
|
-
var outlineButtonVariant =
|
|
2502
|
+
var outlineButtonVariant = css16`
|
|
2475
2503
|
${ghostButtonVariant};
|
|
2476
2504
|
--button-color-border: var(--wui-color-border);
|
|
2477
2505
|
|
|
2478
2506
|
box-shadow: 0 0 0 2px var(--button-color-border) inset;
|
|
2479
2507
|
`;
|
|
2480
|
-
var softButtonVariant =
|
|
2508
|
+
var softButtonVariant = css16`
|
|
2481
2509
|
--button-color-bg: var(--wui-color-bg-surface-secondary);
|
|
2482
2510
|
--button-color-bg-hover: var(--wui-color-bg-surface-secondary-hover);
|
|
2483
2511
|
--button-color-bg-active: var(--wui-color-bg-surface-secondary-active);
|
|
2484
2512
|
--button-color-text: var(--wui-color-text-button);
|
|
2485
2513
|
--button-color-icon: var(--wui-color-icon);
|
|
2486
2514
|
`;
|
|
2487
|
-
var solidButtonVariant =
|
|
2515
|
+
var solidButtonVariant = css16`
|
|
2488
2516
|
--button-color-bg: var(--wui-color-bg-fill);
|
|
2489
2517
|
--button-color-bg-hover: var(--wui-color-bg-fill-hover);
|
|
2490
2518
|
--button-color-bg-active: var(--wui-color-bg-fill-active);
|
|
2491
2519
|
--button-color-text: var(--wui-color-text-on-fill);
|
|
2492
2520
|
--button-color-icon: var(--wui-color-icon-on-fill);
|
|
2493
2521
|
`;
|
|
2494
|
-
var disabledButtonVariant =
|
|
2522
|
+
var disabledButtonVariant = css16`
|
|
2495
2523
|
--button-color-bg: var(--wui-color-bg-surface-disabled);
|
|
2496
2524
|
--button-color-bg-hover: var(--wui-color-bg-surface-disabled);
|
|
2497
2525
|
--button-color-bg-active: var(--wui-color-bg-surface-disabled);
|
|
@@ -2499,7 +2527,7 @@ var disabledButtonVariant = css15`
|
|
|
2499
2527
|
--button-color-icon: var(--wui-color-icon-disabled);
|
|
2500
2528
|
--button-color-border: var(--wui-color-border-disabled);
|
|
2501
2529
|
`;
|
|
2502
|
-
var pressedButtonVariant =
|
|
2530
|
+
var pressedButtonVariant = css16`
|
|
2503
2531
|
--button-color-bg: var(--wui-color-bg-surface-selected);
|
|
2504
2532
|
--button-color-bg-hover: var(--wui-color-bg-surface-selected-hover);
|
|
2505
2533
|
--button-color-bg-active: var(--wui-color-bg-surface-selected-active);
|
|
@@ -2507,7 +2535,7 @@ var pressedButtonVariant = css15`
|
|
|
2507
2535
|
--button-color-icon: var(--wui-color-icon-selected);
|
|
2508
2536
|
--button-color-border: var(--wui-color-border-selected);
|
|
2509
2537
|
`;
|
|
2510
|
-
var buttonBaseStyles =
|
|
2538
|
+
var buttonBaseStyles = css16`
|
|
2511
2539
|
border-radius: var(--wui-border-radius-rounded);
|
|
2512
2540
|
font-family: var(--button-typography-family);
|
|
2513
2541
|
font-size: var(--button-typography-size);
|
|
@@ -6530,7 +6558,6 @@ var StyledButton = styled5.button`
|
|
|
6530
6558
|
${({ $variant }) => buttonVariantsStyles[$variant]}
|
|
6531
6559
|
${({ $unstyled }) => !$unstyled && buttonBaseStyles}
|
|
6532
6560
|
${({ $fullWidth }) => $fullWidth && "width: 100%;"}
|
|
6533
|
-
position: relative;
|
|
6534
6561
|
text-align: center;
|
|
6535
6562
|
`;
|
|
6536
6563
|
var StyledButtonContent = styled5.div`
|
|
@@ -6726,7 +6753,7 @@ var StyledSecondaryIcon = styled6.div`
|
|
|
6726
6753
|
justify-content: flex-end;
|
|
6727
6754
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease-in);
|
|
6728
6755
|
|
|
6729
|
-
${({ $hideUntilHover }) => $hideUntilHover &&
|
|
6756
|
+
${({ $hideUntilHover }) => $hideUntilHover && css17`
|
|
6730
6757
|
will-change: transform;
|
|
6731
6758
|
opacity: 0;
|
|
6732
6759
|
transform: translateX(-16px);
|
|
@@ -7360,49 +7387,49 @@ import styled18 from "styled-components";
|
|
|
7360
7387
|
import { isNonEmptyString as isNonEmptyString2 } from "@wistia/type-guards";
|
|
7361
7388
|
|
|
7362
7389
|
// src/components/Label/Label.tsx
|
|
7363
|
-
import styled16, { css as
|
|
7390
|
+
import styled16, { css as css19 } from "styled-components";
|
|
7364
7391
|
|
|
7365
7392
|
// src/components/Heading/Heading.tsx
|
|
7366
7393
|
import { forwardRef as forwardRef6 } from "react";
|
|
7367
|
-
import styled15, { css as
|
|
7394
|
+
import styled15, { css as css18 } from "styled-components";
|
|
7368
7395
|
import { jsx as jsx199 } from "react/jsx-runtime";
|
|
7369
|
-
var heroStyle =
|
|
7396
|
+
var heroStyle = css18`
|
|
7370
7397
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
7371
7398
|
--font-size: var(--wui-typography-heading-hero-size);
|
|
7372
7399
|
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
7373
7400
|
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
7374
7401
|
`;
|
|
7375
|
-
var heading1TextStyle =
|
|
7402
|
+
var heading1TextStyle = css18`
|
|
7376
7403
|
--font-family: var(--wui-typography-heading-1-family);
|
|
7377
7404
|
--font-size: var(--wui-typography-heading-1-size);
|
|
7378
7405
|
--font-weight: var(--wui-typography-heading-1-weight);
|
|
7379
7406
|
--line-height: var(--wui-typography-heading-1-line-height);
|
|
7380
7407
|
`;
|
|
7381
|
-
var heading2TextStyle =
|
|
7408
|
+
var heading2TextStyle = css18`
|
|
7382
7409
|
--font-family: var(--wui-typography-heading-2-family);
|
|
7383
7410
|
--font-size: var(--wui-typography-heading-2-size);
|
|
7384
7411
|
--font-weight: var(--wui-typography-heading-2-weight);
|
|
7385
7412
|
--line-height: var(--wui-typography-heading-2-line-height);
|
|
7386
7413
|
`;
|
|
7387
|
-
var heading3TextStyle =
|
|
7414
|
+
var heading3TextStyle = css18`
|
|
7388
7415
|
--font-family: var(--wui-typography-heading-3-family);
|
|
7389
7416
|
--font-size: var(--wui-typography-heading-3-size);
|
|
7390
7417
|
--font-weight: var(--wui-typography-heading-3-weight);
|
|
7391
7418
|
--line-height: var(--wui-typography-heading-3-line-height);
|
|
7392
7419
|
`;
|
|
7393
|
-
var heading4TextStyle =
|
|
7420
|
+
var heading4TextStyle = css18`
|
|
7394
7421
|
--font-family: var(--wui-typography-heading-4-family);
|
|
7395
7422
|
--font-size: var(--wui-typography-heading-4-size);
|
|
7396
7423
|
--font-weight: var(--wui-typography-heading-4-weight);
|
|
7397
7424
|
--line-height: var(--wui-typography-heading-4-line-height);
|
|
7398
7425
|
`;
|
|
7399
|
-
var heading5TextStyle =
|
|
7426
|
+
var heading5TextStyle = css18`
|
|
7400
7427
|
--font-family: var(--wui-typography-heading-5-family);
|
|
7401
7428
|
--font-size: var(--wui-typography-heading-5-size);
|
|
7402
7429
|
--font-weight: var(--wui-typography-heading-5-weight);
|
|
7403
7430
|
--line-height: var(--wui-typography-heading-5-line-height);
|
|
7404
7431
|
`;
|
|
7405
|
-
var heading6TextStyle =
|
|
7432
|
+
var heading6TextStyle = css18`
|
|
7406
7433
|
--font-family: var(--wui-typography-heading-6-family);
|
|
7407
7434
|
--font-size: var(--wui-typography-heading-6-size);
|
|
7408
7435
|
--font-weight: var(--wui-typography-heading-6-weight);
|
|
@@ -7427,16 +7454,16 @@ var StyledHeading = styled15.div`
|
|
|
7427
7454
|
color: var(--wui-color-text);
|
|
7428
7455
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
7429
7456
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
7430
|
-
${({ $inline }) => $inline &&
|
|
7457
|
+
${({ $inline }) => $inline && css18`
|
|
7431
7458
|
display: inline-block;
|
|
7432
7459
|
`}
|
|
7433
|
-
${({ $disabled }) => $disabled &&
|
|
7460
|
+
${({ $disabled }) => $disabled && css18`
|
|
7434
7461
|
color: var(--wui-color-text-disabled);
|
|
7435
7462
|
`}
|
|
7436
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
7463
|
+
${({ $preventUserSelect }) => $preventUserSelect && css18`
|
|
7437
7464
|
user-select: none;
|
|
7438
7465
|
`}
|
|
7439
|
-
${({ $align }) =>
|
|
7466
|
+
${({ $align }) => css18`
|
|
7440
7467
|
text-align: ${$align};
|
|
7441
7468
|
`}
|
|
7442
7469
|
margin: 0;
|
|
@@ -7482,7 +7509,7 @@ var Heading = makePolymorphic(HeadingComponent);
|
|
|
7482
7509
|
|
|
7483
7510
|
// src/components/Label/Label.tsx
|
|
7484
7511
|
import { jsx as jsx200 } from "react/jsx-runtime";
|
|
7485
|
-
var requiredStyle =
|
|
7512
|
+
var requiredStyle = css19`
|
|
7486
7513
|
&::after {
|
|
7487
7514
|
color: var(--wui-color-text-error);
|
|
7488
7515
|
display: inline;
|
|
@@ -7490,7 +7517,7 @@ var requiredStyle = css18`
|
|
|
7490
7517
|
content: '*';
|
|
7491
7518
|
}
|
|
7492
7519
|
`;
|
|
7493
|
-
var disabledStyle =
|
|
7520
|
+
var disabledStyle = css19`
|
|
7494
7521
|
color: var(--wui-color-text-disabled);
|
|
7495
7522
|
`;
|
|
7496
7523
|
var StyledLabel2 = styled16(Heading).attrs({
|
|
@@ -7693,6 +7720,41 @@ var Checkbox = forwardRef7(
|
|
|
7693
7720
|
);
|
|
7694
7721
|
Checkbox.displayName = "Checkbox";
|
|
7695
7722
|
|
|
7723
|
+
// src/components/ClickRegion/ClickRegion.tsx
|
|
7724
|
+
import { Children as Children3, cloneElement as cloneElement3, useCallback as useCallback5, useEffect as useEffect4 } from "react";
|
|
7725
|
+
var ClickRegion = ({ children, targetRef }) => {
|
|
7726
|
+
useEffect4(() => {
|
|
7727
|
+
if (targetRef.current && targetRef.current.tagName === "A") {
|
|
7728
|
+
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
7729
|
+
} else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
|
|
7730
|
+
targetRef.current.setAttribute("data-click-region-target-button", "");
|
|
7731
|
+
} else {
|
|
7732
|
+
}
|
|
7733
|
+
}, [targetRef]);
|
|
7734
|
+
const handleClick = useCallback5(
|
|
7735
|
+
(event) => {
|
|
7736
|
+
const node = targetRef.current;
|
|
7737
|
+
if (event.target instanceof HTMLAnchorElement && !event.target.hasAttribute("data-click-region-target-link") || event.target instanceof HTMLButtonElement && !event.target.hasAttribute("data-click-region-target-button")) {
|
|
7738
|
+
event.stopPropagation();
|
|
7739
|
+
return;
|
|
7740
|
+
}
|
|
7741
|
+
if (node === null || event.defaultPrevented || !node.hasAttribute("data-click-region-target-button")) {
|
|
7742
|
+
return;
|
|
7743
|
+
}
|
|
7744
|
+
event.stopPropagation();
|
|
7745
|
+
event.preventDefault();
|
|
7746
|
+
node.focus();
|
|
7747
|
+
node.click();
|
|
7748
|
+
},
|
|
7749
|
+
[targetRef]
|
|
7750
|
+
);
|
|
7751
|
+
return cloneElement3(Children3.only(children), {
|
|
7752
|
+
"data-click-region": true,
|
|
7753
|
+
onClick: handleClick
|
|
7754
|
+
});
|
|
7755
|
+
};
|
|
7756
|
+
ClickRegion.displayName = "ClickRegion";
|
|
7757
|
+
|
|
7696
7758
|
// src/components/Collapsible/Collapsible.tsx
|
|
7697
7759
|
import { Root } from "@radix-ui/react-collapsible";
|
|
7698
7760
|
import { isNotNil as isNotNil8 } from "@wistia/type-guards";
|
|
@@ -7719,11 +7781,11 @@ var Collapsible = ({
|
|
|
7719
7781
|
Collapsible.displayName = "Collapsible";
|
|
7720
7782
|
|
|
7721
7783
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
7722
|
-
import { Children as
|
|
7784
|
+
import { Children as Children4 } from "react";
|
|
7723
7785
|
import { Trigger } from "@radix-ui/react-collapsible";
|
|
7724
7786
|
import { jsx as jsx204 } from "react/jsx-runtime";
|
|
7725
7787
|
var CollapsibleTrigger = ({ children }) => {
|
|
7726
|
-
|
|
7788
|
+
Children4.only(children);
|
|
7727
7789
|
return /* @__PURE__ */ jsx204(Trigger, { asChild: true, children });
|
|
7728
7790
|
};
|
|
7729
7791
|
|
|
@@ -7882,21 +7944,21 @@ import styled24 from "styled-components";
|
|
|
7882
7944
|
|
|
7883
7945
|
// src/components/Text/Text.tsx
|
|
7884
7946
|
import { forwardRef as forwardRef8 } from "react";
|
|
7885
|
-
import styled23, { css as
|
|
7947
|
+
import styled23, { css as css20 } from "styled-components";
|
|
7886
7948
|
import { jsx as jsx208 } from "react/jsx-runtime";
|
|
7887
|
-
var bodyBoldStyles =
|
|
7949
|
+
var bodyBoldStyles = css20`
|
|
7888
7950
|
> strong,
|
|
7889
7951
|
b {
|
|
7890
7952
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
7891
7953
|
}
|
|
7892
7954
|
`;
|
|
7893
|
-
var labelBoldStyles =
|
|
7955
|
+
var labelBoldStyles = css20`
|
|
7894
7956
|
> strong,
|
|
7895
7957
|
b {
|
|
7896
7958
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
7897
7959
|
}
|
|
7898
7960
|
`;
|
|
7899
|
-
var body1TextStyle =
|
|
7961
|
+
var body1TextStyle = css20`
|
|
7900
7962
|
--font-family: var(--wui-typography-body-1-family);
|
|
7901
7963
|
--font-size: var(--wui-typography-body-1-size);
|
|
7902
7964
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
@@ -7904,7 +7966,7 @@ var body1TextStyle = css19`
|
|
|
7904
7966
|
--paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
|
|
7905
7967
|
${bodyBoldStyles}
|
|
7906
7968
|
`;
|
|
7907
|
-
var body2TextStyle =
|
|
7969
|
+
var body2TextStyle = css20`
|
|
7908
7970
|
--font-family: var(--wui-typography-body-2-family);
|
|
7909
7971
|
--font-size: var(--wui-typography-body-2-size);
|
|
7910
7972
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -7912,7 +7974,7 @@ var body2TextStyle = css19`
|
|
|
7912
7974
|
--paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
|
|
7913
7975
|
${bodyBoldStyles}
|
|
7914
7976
|
`;
|
|
7915
|
-
var body3TextStyle =
|
|
7977
|
+
var body3TextStyle = css20`
|
|
7916
7978
|
--font-family: var(--wui-typography-body-3-family);
|
|
7917
7979
|
--font-size: var(--wui-typography-body-3-size);
|
|
7918
7980
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
@@ -7920,7 +7982,7 @@ var body3TextStyle = css19`
|
|
|
7920
7982
|
--paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
|
|
7921
7983
|
${bodyBoldStyles}
|
|
7922
7984
|
`;
|
|
7923
|
-
var body4TextStyle =
|
|
7985
|
+
var body4TextStyle = css20`
|
|
7924
7986
|
--font-family: var(--wui-typography-body-4-family);
|
|
7925
7987
|
--font-size: var(--wui-typography-body-4-size);
|
|
7926
7988
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -7928,47 +7990,47 @@ var body4TextStyle = css19`
|
|
|
7928
7990
|
--paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
|
|
7929
7991
|
${bodyBoldStyles}
|
|
7930
7992
|
`;
|
|
7931
|
-
var label1TextStyle =
|
|
7993
|
+
var label1TextStyle = css20`
|
|
7932
7994
|
--font-family: var(--wui-typography-label-1-family);
|
|
7933
7995
|
--font-size: var(--wui-typography-label-1-size);
|
|
7934
7996
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
7935
7997
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
7936
7998
|
${labelBoldStyles}
|
|
7937
7999
|
`;
|
|
7938
|
-
var label2TextStyle =
|
|
8000
|
+
var label2TextStyle = css20`
|
|
7939
8001
|
--font-family: var(--wui-typography-label-2-family);
|
|
7940
8002
|
--font-size: var(--wui-typography-label-2-size);
|
|
7941
8003
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
7942
8004
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
7943
8005
|
${labelBoldStyles}
|
|
7944
8006
|
`;
|
|
7945
|
-
var label3TextStyle =
|
|
8007
|
+
var label3TextStyle = css20`
|
|
7946
8008
|
--font-family: var(--wui-typography-label-3-family);
|
|
7947
8009
|
--font-size: var(--wui-typography-label-3-size);
|
|
7948
8010
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
7949
8011
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
7950
8012
|
${labelBoldStyles}
|
|
7951
8013
|
`;
|
|
7952
|
-
var label4TextStyle =
|
|
8014
|
+
var label4TextStyle = css20`
|
|
7953
8015
|
--font-family: var(--wui-typography-label-4-family);
|
|
7954
8016
|
--font-size: var(--wui-typography-label-4-size);
|
|
7955
8017
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
7956
8018
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
7957
8019
|
${labelBoldStyles}
|
|
7958
8020
|
`;
|
|
7959
|
-
var body1MonoTextStyle =
|
|
8021
|
+
var body1MonoTextStyle = css20`
|
|
7960
8022
|
${body1TextStyle};
|
|
7961
8023
|
--font-family: var(--wui-typography-family-mono);
|
|
7962
8024
|
`;
|
|
7963
|
-
var body2MonoTextStyle =
|
|
8025
|
+
var body2MonoTextStyle = css20`
|
|
7964
8026
|
${body2TextStyle};
|
|
7965
8027
|
--font-family: var(--wui-typography-family-mono);
|
|
7966
8028
|
`;
|
|
7967
|
-
var body3MonoTextStyle =
|
|
8029
|
+
var body3MonoTextStyle = css20`
|
|
7968
8030
|
${body3TextStyle};
|
|
7969
8031
|
--font-family: var(--wui-typography-family-mono);
|
|
7970
8032
|
`;
|
|
7971
|
-
var body4MonoTextStyle =
|
|
8033
|
+
var body4MonoTextStyle = css20`
|
|
7972
8034
|
${body4TextStyle};
|
|
7973
8035
|
--font-family: var(--wui-typography-family-mono);
|
|
7974
8036
|
`;
|
|
@@ -8027,19 +8089,19 @@ var StyledText = styled23.div`
|
|
|
8027
8089
|
margin: 0;
|
|
8028
8090
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
8029
8091
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8030
|
-
${({ $inline }) => $inline &&
|
|
8092
|
+
${({ $inline }) => $inline && css20`
|
|
8031
8093
|
display: inline-block;
|
|
8032
8094
|
`}
|
|
8033
|
-
${({ $disabled }) => $disabled &&
|
|
8095
|
+
${({ $disabled }) => $disabled && css20`
|
|
8034
8096
|
--text-color: var(--wui-color-text-disabled);
|
|
8035
8097
|
`}
|
|
8036
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8098
|
+
${({ $preventUserSelect }) => $preventUserSelect && css20`
|
|
8037
8099
|
user-select: none;
|
|
8038
8100
|
`}
|
|
8039
|
-
${({ $align }) =>
|
|
8101
|
+
${({ $align }) => css20`
|
|
8040
8102
|
text-align: ${$align};
|
|
8041
8103
|
`}
|
|
8042
|
-
${({ as }) => as === "p" &&
|
|
8104
|
+
${({ as }) => as === "p" && css20`
|
|
8043
8105
|
display: block;
|
|
8044
8106
|
|
|
8045
8107
|
+ p {
|
|
@@ -8119,16 +8181,16 @@ var DataCardTrend = ({
|
|
|
8119
8181
|
};
|
|
8120
8182
|
|
|
8121
8183
|
// src/components/Divider/Divider.tsx
|
|
8122
|
-
import styled25, { css as
|
|
8184
|
+
import styled25, { css as css21 } from "styled-components";
|
|
8123
8185
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
8124
|
-
var horizontalBorderCss =
|
|
8186
|
+
var horizontalBorderCss = css21`
|
|
8125
8187
|
border-top-color: var(--wui-color-border);
|
|
8126
8188
|
border-top-style: solid;
|
|
8127
8189
|
border-top-width: 1px;
|
|
8128
8190
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
8129
8191
|
height: 0;
|
|
8130
8192
|
`;
|
|
8131
|
-
var verticalBorderCss =
|
|
8193
|
+
var verticalBorderCss = css21`
|
|
8132
8194
|
background-color: var(--wui-color-border);
|
|
8133
8195
|
max-width: 1px;
|
|
8134
8196
|
min-height: 100%;
|
|
@@ -8162,7 +8224,7 @@ var Divider = ({
|
|
|
8162
8224
|
Divider.displayName = "Divider";
|
|
8163
8225
|
|
|
8164
8226
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8165
|
-
import styled29, { css as
|
|
8227
|
+
import styled29, { css as css24 } from "styled-components";
|
|
8166
8228
|
import { useState as useState5, useRef as useRef4 } from "react";
|
|
8167
8229
|
|
|
8168
8230
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
@@ -8195,9 +8257,9 @@ import {
|
|
|
8195
8257
|
Portal as TooltipPortal,
|
|
8196
8258
|
Arrow as TooltipArrow
|
|
8197
8259
|
} from "@radix-ui/react-tooltip";
|
|
8198
|
-
import styled27, { css as
|
|
8260
|
+
import styled27, { css as css22 } from "styled-components";
|
|
8199
8261
|
import { jsx as jsx212, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
8200
|
-
var CompactTooltipStyles =
|
|
8262
|
+
var CompactTooltipStyles = css22`
|
|
8201
8263
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8202
8264
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8203
8265
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -8300,11 +8362,11 @@ var Tooltip = ({
|
|
|
8300
8362
|
Tooltip.displayName = "Tooltip";
|
|
8301
8363
|
|
|
8302
8364
|
// src/components/Input/Input.tsx
|
|
8303
|
-
import { forwardRef as forwardRef9, cloneElement as
|
|
8304
|
-
import styled28, { css as
|
|
8365
|
+
import { forwardRef as forwardRef9, cloneElement as cloneElement4, useRef as useRef3 } from "react";
|
|
8366
|
+
import styled28, { css as css23 } from "styled-components";
|
|
8305
8367
|
import { isNil as isNil12, isNotNil as isNotNil10, isRecord as isRecord4 } from "@wistia/type-guards";
|
|
8306
8368
|
import { jsx as jsx213, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
8307
|
-
var inputStyles =
|
|
8369
|
+
var inputStyles = css23`
|
|
8308
8370
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
8309
8371
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
8310
8372
|
--wui-input-color-border: var(--wui-color-border);
|
|
@@ -8409,14 +8471,14 @@ var Input = forwardRef9(
|
|
|
8409
8471
|
leftIconToDisplay = /* @__PURE__ */ jsx213(Icon, { type: "search" });
|
|
8410
8472
|
}
|
|
8411
8473
|
if (isNotNil10(leftIconToDisplay)) {
|
|
8412
|
-
leftIconToDisplay =
|
|
8474
|
+
leftIconToDisplay = cloneElement4(leftIconToDisplay, {
|
|
8413
8475
|
size: "md",
|
|
8414
8476
|
className: "wui-input-left-icon"
|
|
8415
8477
|
});
|
|
8416
8478
|
}
|
|
8417
8479
|
let rightIconToDisplay = rightIcon;
|
|
8418
8480
|
if (isNotNil10(rightIconToDisplay)) {
|
|
8419
|
-
rightIconToDisplay =
|
|
8481
|
+
rightIconToDisplay = cloneElement4(rightIconToDisplay, {
|
|
8420
8482
|
size: "md",
|
|
8421
8483
|
className: "wui-input-right-icon"
|
|
8422
8484
|
});
|
|
@@ -8484,7 +8546,7 @@ var StyledInput = styled29(Input)`
|
|
|
8484
8546
|
height: ${({ $height }) => `${$height}px`};
|
|
8485
8547
|
}
|
|
8486
8548
|
`;
|
|
8487
|
-
var editableStyles =
|
|
8549
|
+
var editableStyles = css24`
|
|
8488
8550
|
&:has(+ :focus-within) {
|
|
8489
8551
|
background: var(--wui-color-bg-surface-hover);
|
|
8490
8552
|
}
|
|
@@ -8736,12 +8798,12 @@ FormComponent.displayName = "Form";
|
|
|
8736
8798
|
var Form = forwardRef11(FormComponent);
|
|
8737
8799
|
|
|
8738
8800
|
// src/components/Form/useFormState.tsx
|
|
8739
|
-
import { useCallback as
|
|
8801
|
+
import { useCallback as useCallback6, useState as useState7 } from "react";
|
|
8740
8802
|
var useFormState = (action, initialData = {}) => {
|
|
8741
8803
|
const [data, setData] = useState7(initialData);
|
|
8742
8804
|
const [isPending, setIsPending] = useState7(false);
|
|
8743
8805
|
const [error, setError] = useState7(null);
|
|
8744
|
-
const formAction =
|
|
8806
|
+
const formAction = useCallback6(
|
|
8745
8807
|
async (nextFormData) => {
|
|
8746
8808
|
if (nextFormData === null) {
|
|
8747
8809
|
setData(initialData);
|
|
@@ -8810,7 +8872,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
8810
8872
|
};
|
|
8811
8873
|
|
|
8812
8874
|
// src/components/FormField/FormField.tsx
|
|
8813
|
-
import { Children as
|
|
8875
|
+
import { Children as Children5, cloneElement as cloneElement5, useContext as useContext3 } from "react";
|
|
8814
8876
|
import styled33 from "styled-components";
|
|
8815
8877
|
import { isArray as isArray2, isNotNil as isNotNil11, isNotUndefined as isNotUndefined7, isUndefined as isUndefined4 } from "@wistia/type-guards";
|
|
8816
8878
|
|
|
@@ -8975,7 +9037,7 @@ var FormField = ({
|
|
|
8975
9037
|
"aria-describedby": isNotNil11(error) ? `${computedId}-error` : void 0
|
|
8976
9038
|
};
|
|
8977
9039
|
}
|
|
8978
|
-
|
|
9040
|
+
Children5.only(children);
|
|
8979
9041
|
return /* @__PURE__ */ jsxs21(
|
|
8980
9042
|
StyledFormField,
|
|
8981
9043
|
{
|
|
@@ -8983,7 +9045,7 @@ var FormField = ({
|
|
|
8983
9045
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
8984
9046
|
children: [
|
|
8985
9047
|
!isIntegratedLabel && /* @__PURE__ */ jsx220(Label, { htmlFor: computedId, children: label }),
|
|
8986
|
-
|
|
9048
|
+
cloneElement5(children, childProps),
|
|
8987
9049
|
isNotNil11(computedError) ? /* @__PURE__ */ jsxs21(Fragment6, { children: [
|
|
8988
9050
|
/* @__PURE__ */ jsx220("div", {}),
|
|
8989
9051
|
/* @__PURE__ */ jsx220(
|
|
@@ -9022,7 +9084,7 @@ var RadioGroup = ({
|
|
|
9022
9084
|
RadioGroup.displayName = "RadioGroup";
|
|
9023
9085
|
|
|
9024
9086
|
// src/components/IconButton/IconButton.tsx
|
|
9025
|
-
import { Children as
|
|
9087
|
+
import { Children as Children6, cloneElement as cloneElement6, forwardRef as forwardRef12 } from "react";
|
|
9026
9088
|
import styled34 from "styled-components";
|
|
9027
9089
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
9028
9090
|
var StyledButton2 = styled34(Button)`
|
|
@@ -9050,7 +9112,7 @@ var IconButton = forwardRef12(
|
|
|
9050
9112
|
"aria-label": label,
|
|
9051
9113
|
"data-wistia-ui-icon-button": true,
|
|
9052
9114
|
size: responsiveSize,
|
|
9053
|
-
children:
|
|
9115
|
+
children: cloneElement6(Children6.only(children), {
|
|
9054
9116
|
size: responsiveSize
|
|
9055
9117
|
})
|
|
9056
9118
|
}
|
|
@@ -9109,7 +9171,7 @@ var Image = ({
|
|
|
9109
9171
|
Image.displayName = "Image";
|
|
9110
9172
|
|
|
9111
9173
|
// src/components/Menu/Menu.tsx
|
|
9112
|
-
import styled36, { css as
|
|
9174
|
+
import styled36, { css as css25, keyframes as keyframes2 } from "styled-components";
|
|
9113
9175
|
import {
|
|
9114
9176
|
DropdownMenu,
|
|
9115
9177
|
DropdownMenuTrigger,
|
|
@@ -9146,7 +9208,7 @@ var close = keyframes2`
|
|
|
9146
9208
|
transform: scale(.97) translateY(-8px);
|
|
9147
9209
|
}
|
|
9148
9210
|
`;
|
|
9149
|
-
var menuItemCss =
|
|
9211
|
+
var menuItemCss = css25`
|
|
9150
9212
|
--menu-label-description-gap: var(--wui-space-01);
|
|
9151
9213
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
9152
9214
|
--menu-item-left-icon-size: 24px;
|
|
@@ -9157,7 +9219,7 @@ var menuItemCss = css24`
|
|
|
9157
9219
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
9158
9220
|
--menu-divider-margin: var(--wui-space-02);
|
|
9159
9221
|
`;
|
|
9160
|
-
var compactMenuItemCss =
|
|
9222
|
+
var compactMenuItemCss = css25`
|
|
9161
9223
|
--menu-label-description-gap: 0;
|
|
9162
9224
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
9163
9225
|
--menu-item-left-icon-size: 16px;
|
|
@@ -9168,7 +9230,7 @@ var compactMenuItemCss = css24`
|
|
|
9168
9230
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
9169
9231
|
--menu-divider-margin: var(--wui-space-01);
|
|
9170
9232
|
`;
|
|
9171
|
-
var menuContentCss =
|
|
9233
|
+
var menuContentCss = css25`
|
|
9172
9234
|
--menu-font-family: var(--wui-typography-family-default);
|
|
9173
9235
|
--menu-bg: var(--wui-color-bg-surface);
|
|
9174
9236
|
--menu-shadow: var(--wui-elevation-01);
|
|
@@ -9466,13 +9528,14 @@ var StyledSubTrigger = styled40(DropdownMenuSubTrigger)`
|
|
|
9466
9528
|
background-color: var(--wui-color-bg-surface-hover);
|
|
9467
9529
|
}
|
|
9468
9530
|
`;
|
|
9469
|
-
var SubMenuTrigger = (props) => {
|
|
9531
|
+
var SubMenuTrigger = ({ icon, ...props }) => {
|
|
9470
9532
|
const { isSmAndUp } = useMq();
|
|
9471
9533
|
const Trigger4 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
|
|
9472
9534
|
return /* @__PURE__ */ jsx228(Trigger4, { asChild: true, children: /* @__PURE__ */ jsx228(
|
|
9473
9535
|
MenuItemButton,
|
|
9474
9536
|
{
|
|
9475
9537
|
...props,
|
|
9538
|
+
leftIcon: icon,
|
|
9476
9539
|
rightIcon: /* @__PURE__ */ jsx228(Icon, { type: "caret-right" })
|
|
9477
9540
|
}
|
|
9478
9541
|
) });
|
|
@@ -9740,14 +9803,14 @@ import styled43 from "styled-components";
|
|
|
9740
9803
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
9741
9804
|
|
|
9742
9805
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
9743
|
-
import { useRef as useRef8, useEffect as
|
|
9806
|
+
import { useRef as useRef8, useEffect as useEffect5 } from "react";
|
|
9744
9807
|
import { isNotNil as isNotNil16 } from "@wistia/type-guards";
|
|
9745
9808
|
var useFocusRestore = () => {
|
|
9746
9809
|
const previouslyFocusedRef = useRef8(null);
|
|
9747
|
-
|
|
9810
|
+
useEffect5(() => {
|
|
9748
9811
|
previouslyFocusedRef.current = document.activeElement;
|
|
9749
9812
|
}, []);
|
|
9750
|
-
|
|
9813
|
+
useEffect5(() => {
|
|
9751
9814
|
return () => {
|
|
9752
9815
|
if (isNotNil16(previouslyFocusedRef.current)) {
|
|
9753
9816
|
setTimeout(() => {
|
|
@@ -9940,7 +10003,7 @@ Modal.displayName = "Modal";
|
|
|
9940
10003
|
|
|
9941
10004
|
// src/components/Popover/Popover.tsx
|
|
9942
10005
|
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close } from "@radix-ui/react-popover";
|
|
9943
|
-
import styled46, { css as
|
|
10006
|
+
import styled46, { css as css26 } from "styled-components";
|
|
9944
10007
|
|
|
9945
10008
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
9946
10009
|
import { isNotNil as isNotNil18 } from "@wistia/type-guards";
|
|
@@ -9951,7 +10014,7 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
9951
10014
|
// src/components/Popover/Popover.tsx
|
|
9952
10015
|
import { jsx as jsx238, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9953
10016
|
var StyledContent2 = styled46(Content2)`
|
|
9954
|
-
${({ $unstyled }) => !$unstyled &&
|
|
10017
|
+
${({ $unstyled }) => !$unstyled && css26`
|
|
9955
10018
|
border-radius: var(--wui-border-radius-02);
|
|
9956
10019
|
padding: var(--wui-space-04);
|
|
9957
10020
|
max-width: 320px;
|
|
@@ -10001,17 +10064,93 @@ var Popover = ({
|
|
|
10001
10064
|
};
|
|
10002
10065
|
Popover.displayName = "Popover";
|
|
10003
10066
|
|
|
10067
|
+
// src/components/ProgressBar/ProgressBar.tsx
|
|
10068
|
+
import styled47 from "styled-components";
|
|
10069
|
+
import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
|
|
10070
|
+
import { isNotNil as isNotNil19 } from "@wistia/type-guards";
|
|
10071
|
+
import { jsx as jsx239, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
10072
|
+
var ProgressBarWrapper = styled47.div`
|
|
10073
|
+
display: flex;
|
|
10074
|
+
align-items: center;
|
|
10075
|
+
gap: var(--wui-space-02);
|
|
10076
|
+
`;
|
|
10077
|
+
var getTranslateValue = (progress, max) => {
|
|
10078
|
+
if (progress === 0) {
|
|
10079
|
+
return "translateX(-101%)";
|
|
10080
|
+
}
|
|
10081
|
+
const progressPercentage = progress / max * 100;
|
|
10082
|
+
return `translateX(-${100 - progressPercentage}%)`;
|
|
10083
|
+
};
|
|
10084
|
+
var ProgressBarLabel = styled47.div`
|
|
10085
|
+
display: flex;
|
|
10086
|
+
line-height: var(--wui-typography-label-3-line-height);
|
|
10087
|
+
font-size: var(--wui-typography-label-3-size);
|
|
10088
|
+
font-weight: var(--wui-typography-weight-label);
|
|
10089
|
+
color: var(--wui-color-text-secondary);
|
|
10090
|
+
flex-shrink: 0;
|
|
10091
|
+
`;
|
|
10092
|
+
var StyledProgressIndicator = styled47(ProgressIndicator)`
|
|
10093
|
+
background-color: var(--wui-color-bg-fill);
|
|
10094
|
+
width: 100%;
|
|
10095
|
+
height: 100%;
|
|
10096
|
+
border-top-right-radius: var(--wui-border-radius-rounded);
|
|
10097
|
+
border-bottom-right-radius: var(--wui-border-radius-rounded);
|
|
10098
|
+
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
10099
|
+
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
10100
|
+
`;
|
|
10101
|
+
var StyledProgressBar = styled47(ProgressRoot)`
|
|
10102
|
+
--progress-bar-height: 8px;
|
|
10103
|
+
position: relative;
|
|
10104
|
+
overflow: hidden;
|
|
10105
|
+
background: var(--wui-color-bg-surface-secondary);
|
|
10106
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
10107
|
+
width: 100%;
|
|
10108
|
+
height: var(--progress-bar-height);
|
|
10109
|
+
|
|
10110
|
+
/* Fix overflow clipping in Safari: https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */
|
|
10111
|
+
transform: translateZ(0);
|
|
10112
|
+
`;
|
|
10113
|
+
var ProgressBar = ({
|
|
10114
|
+
progress,
|
|
10115
|
+
max = 100,
|
|
10116
|
+
children,
|
|
10117
|
+
labelLeft,
|
|
10118
|
+
labelRight,
|
|
10119
|
+
...props
|
|
10120
|
+
}) => {
|
|
10121
|
+
return /* @__PURE__ */ jsxs30(ProgressBarWrapper, { children: [
|
|
10122
|
+
isNotNil19(labelLeft) ? /* @__PURE__ */ jsx239(ProgressBarLabel, { children: labelLeft }) : null,
|
|
10123
|
+
/* @__PURE__ */ jsx239(
|
|
10124
|
+
StyledProgressBar,
|
|
10125
|
+
{
|
|
10126
|
+
max,
|
|
10127
|
+
value: progress,
|
|
10128
|
+
...props,
|
|
10129
|
+
children: /* @__PURE__ */ jsx239(
|
|
10130
|
+
StyledProgressIndicator,
|
|
10131
|
+
{
|
|
10132
|
+
$max: max,
|
|
10133
|
+
$progress: progress
|
|
10134
|
+
}
|
|
10135
|
+
)
|
|
10136
|
+
}
|
|
10137
|
+
),
|
|
10138
|
+
isNotNil19(labelRight) ? /* @__PURE__ */ jsx239(ProgressBarLabel, { children: labelRight }) : null
|
|
10139
|
+
] });
|
|
10140
|
+
};
|
|
10141
|
+
ProgressBar.displayName = "ProgressBar";
|
|
10142
|
+
|
|
10004
10143
|
// src/components/Radio/Radio.tsx
|
|
10005
10144
|
import { forwardRef as forwardRef18, useId as useId3 } from "react";
|
|
10006
|
-
import
|
|
10145
|
+
import styled48, { css as css27 } from "styled-components";
|
|
10007
10146
|
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
10008
|
-
import { jsx as
|
|
10009
|
-
var StyledLabelWrapper2 =
|
|
10147
|
+
import { jsx as jsx240, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10148
|
+
var StyledLabelWrapper2 = styled48.div`
|
|
10010
10149
|
display: flex;
|
|
10011
10150
|
flex-direction: column;
|
|
10012
10151
|
padding-left: var(--wui-space-02);
|
|
10013
10152
|
`;
|
|
10014
|
-
var StyledRadio =
|
|
10153
|
+
var StyledRadio = styled48.input`
|
|
10015
10154
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
10016
10155
|
appearance: none;
|
|
10017
10156
|
margin: 0;
|
|
@@ -10037,11 +10176,11 @@ var StyledRadio = styled47.input`
|
|
|
10037
10176
|
transform: scale(1);
|
|
10038
10177
|
}
|
|
10039
10178
|
`;
|
|
10040
|
-
var disabledStyle2 =
|
|
10179
|
+
var disabledStyle2 = css27`
|
|
10041
10180
|
cursor: not-allowed;
|
|
10042
10181
|
opacity: 0.5;
|
|
10043
10182
|
`;
|
|
10044
|
-
var errorStyle =
|
|
10183
|
+
var errorStyle = css27`
|
|
10045
10184
|
/* TODO Lamp to design error state */
|
|
10046
10185
|
&:hover,
|
|
10047
10186
|
&:focus,
|
|
@@ -10049,11 +10188,11 @@ var errorStyle = css26`
|
|
|
10049
10188
|
border-color: transparent !important;
|
|
10050
10189
|
}
|
|
10051
10190
|
`;
|
|
10052
|
-
var defaultHoverStyle =
|
|
10191
|
+
var defaultHoverStyle = css27`
|
|
10053
10192
|
/* TODO Lamp to design hover state */
|
|
10054
10193
|
cursor: pointer;
|
|
10055
10194
|
`;
|
|
10056
|
-
var StyledRadioWrapper =
|
|
10195
|
+
var StyledRadioWrapper = styled48.div`
|
|
10057
10196
|
align-items: baseline;
|
|
10058
10197
|
border: 1px solid transparent;
|
|
10059
10198
|
border-radius: 4px;
|
|
@@ -10091,13 +10230,13 @@ var Radio = forwardRef18(
|
|
|
10091
10230
|
}, ref) => {
|
|
10092
10231
|
const generatedId = useId3();
|
|
10093
10232
|
const computedId = isNonEmptyString3(id) ? id : `ui-radio-${generatedId}`;
|
|
10094
|
-
return /* @__PURE__ */
|
|
10233
|
+
return /* @__PURE__ */ jsxs31(
|
|
10095
10234
|
StyledRadioWrapper,
|
|
10096
10235
|
{
|
|
10097
10236
|
"aria-invalid": otherProps["aria-invalid"],
|
|
10098
10237
|
disabled,
|
|
10099
10238
|
children: [
|
|
10100
|
-
/* @__PURE__ */
|
|
10239
|
+
/* @__PURE__ */ jsx240(
|
|
10101
10240
|
StyledRadio,
|
|
10102
10241
|
{
|
|
10103
10242
|
ref,
|
|
@@ -10112,8 +10251,8 @@ var Radio = forwardRef18(
|
|
|
10112
10251
|
...otherProps
|
|
10113
10252
|
}
|
|
10114
10253
|
),
|
|
10115
|
-
/* @__PURE__ */
|
|
10116
|
-
/* @__PURE__ */
|
|
10254
|
+
/* @__PURE__ */ jsxs31(StyledLabelWrapper2, { children: [
|
|
10255
|
+
/* @__PURE__ */ jsx240(
|
|
10117
10256
|
Label,
|
|
10118
10257
|
{
|
|
10119
10258
|
disabled,
|
|
@@ -10122,7 +10261,7 @@ var Radio = forwardRef18(
|
|
|
10122
10261
|
children: label
|
|
10123
10262
|
}
|
|
10124
10263
|
),
|
|
10125
|
-
/* @__PURE__ */
|
|
10264
|
+
/* @__PURE__ */ jsx240(LabelDescription, { children: description })
|
|
10126
10265
|
] })
|
|
10127
10266
|
]
|
|
10128
10267
|
}
|
|
@@ -10133,13 +10272,13 @@ Radio.displayName = "Radio";
|
|
|
10133
10272
|
|
|
10134
10273
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10135
10274
|
import { forwardRef as forwardRef19 } from "react";
|
|
10136
|
-
import
|
|
10275
|
+
import styled50, { css as css28 } from "styled-components";
|
|
10137
10276
|
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
10138
10277
|
import { isNil as isNil13 } from "@wistia/type-guards";
|
|
10139
10278
|
|
|
10140
10279
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10141
10280
|
import { createContext as createContext6, useContext as useContext5, useMemo as useMemo8, useState as useState9 } from "react";
|
|
10142
|
-
import { jsx as
|
|
10281
|
+
import { jsx as jsx241 } from "react/jsx-runtime";
|
|
10143
10282
|
var SelectedItemMeasurementsContext = createContext6(
|
|
10144
10283
|
null
|
|
10145
10284
|
);
|
|
@@ -10154,7 +10293,7 @@ var SelectedItemMeasurementsProvider = ({
|
|
|
10154
10293
|
}),
|
|
10155
10294
|
[selectedItemMeasurements]
|
|
10156
10295
|
);
|
|
10157
|
-
return /* @__PURE__ */
|
|
10296
|
+
return /* @__PURE__ */ jsx241(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10158
10297
|
};
|
|
10159
10298
|
var useSelectedItemMeasurements = () => {
|
|
10160
10299
|
const context = useContext5(SelectedItemMeasurementsContext);
|
|
@@ -10168,7 +10307,7 @@ var useSelectedItemMeasurements = () => {
|
|
|
10168
10307
|
|
|
10169
10308
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10170
10309
|
import { useMemo as useMemo9 } from "react";
|
|
10171
|
-
import
|
|
10310
|
+
import styled49 from "styled-components";
|
|
10172
10311
|
|
|
10173
10312
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
10174
10313
|
import { createContext as createContext7, useContext as useContext6 } from "react";
|
|
@@ -10183,8 +10322,8 @@ var useSegmentedControlValue = () => {
|
|
|
10183
10322
|
};
|
|
10184
10323
|
|
|
10185
10324
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10186
|
-
import { jsx as
|
|
10187
|
-
var SelectedItemIndicatorDiv =
|
|
10325
|
+
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
10326
|
+
var SelectedItemIndicatorDiv = styled49.div`
|
|
10188
10327
|
background-color: var(--wui-color-bg-fill-white);
|
|
10189
10328
|
border-radius: var(--wui-border-radius-rounded);
|
|
10190
10329
|
left: 0;
|
|
@@ -10210,7 +10349,7 @@ var SelectedItemIndicator = () => {
|
|
|
10210
10349
|
if (!selectedValue) {
|
|
10211
10350
|
return null;
|
|
10212
10351
|
}
|
|
10213
|
-
return /* @__PURE__ */
|
|
10352
|
+
return /* @__PURE__ */ jsx242(
|
|
10214
10353
|
SelectedItemIndicatorDiv,
|
|
10215
10354
|
{
|
|
10216
10355
|
style: {
|
|
@@ -10223,8 +10362,8 @@ var SelectedItemIndicator = () => {
|
|
|
10223
10362
|
};
|
|
10224
10363
|
|
|
10225
10364
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10226
|
-
import { jsx as
|
|
10227
|
-
var segmentedControlStyles =
|
|
10365
|
+
import { jsx as jsx243, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
10366
|
+
var segmentedControlStyles = css28`
|
|
10228
10367
|
display: inline-flex;
|
|
10229
10368
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10230
10369
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10234,7 +10373,7 @@ var segmentedControlStyles = css27`
|
|
|
10234
10373
|
position: relative;
|
|
10235
10374
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
10236
10375
|
`;
|
|
10237
|
-
var StyledSegmentedControl =
|
|
10376
|
+
var StyledSegmentedControl = styled50(ToggleGroupRoot)`
|
|
10238
10377
|
${segmentedControlStyles}
|
|
10239
10378
|
`;
|
|
10240
10379
|
var SegmentedControl = forwardRef19(
|
|
@@ -10249,7 +10388,7 @@ var SegmentedControl = forwardRef19(
|
|
|
10249
10388
|
if (isNil13(children)) {
|
|
10250
10389
|
return null;
|
|
10251
10390
|
}
|
|
10252
|
-
return /* @__PURE__ */
|
|
10391
|
+
return /* @__PURE__ */ jsx243(
|
|
10253
10392
|
StyledSegmentedControl,
|
|
10254
10393
|
{
|
|
10255
10394
|
ref,
|
|
@@ -10261,8 +10400,8 @@ var SegmentedControl = forwardRef19(
|
|
|
10261
10400
|
type: "single",
|
|
10262
10401
|
value: selectedValue,
|
|
10263
10402
|
...props,
|
|
10264
|
-
children: /* @__PURE__ */
|
|
10265
|
-
/* @__PURE__ */
|
|
10403
|
+
children: /* @__PURE__ */ jsx243(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs32(SelectedItemMeasurementsProvider, { children: [
|
|
10404
|
+
/* @__PURE__ */ jsx243(SelectedItemIndicator, {}),
|
|
10266
10405
|
children
|
|
10267
10406
|
] }) })
|
|
10268
10407
|
}
|
|
@@ -10272,28 +10411,28 @@ var SegmentedControl = forwardRef19(
|
|
|
10272
10411
|
SegmentedControl.displayName = "SegmentedControl";
|
|
10273
10412
|
|
|
10274
10413
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10275
|
-
import { forwardRef as forwardRef20, useEffect as
|
|
10276
|
-
import
|
|
10414
|
+
import { forwardRef as forwardRef20, useEffect as useEffect6, useRef as useRef9 } from "react";
|
|
10415
|
+
import styled51, { css as css29 } from "styled-components";
|
|
10277
10416
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
10278
|
-
import { isNotNil as
|
|
10417
|
+
import { isNotNil as isNotNil21 } from "@wistia/type-guards";
|
|
10279
10418
|
|
|
10280
10419
|
// src/private/helpers/mergeRefs/mergeRefs.ts
|
|
10281
|
-
import { isNotNil as
|
|
10420
|
+
import { isNotNil as isNotNil20, isFunction as isFunction2 } from "@wistia/type-guards";
|
|
10282
10421
|
var mergeRefs = (refs) => (value) => {
|
|
10283
10422
|
refs.forEach((ref) => {
|
|
10284
10423
|
if (isFunction2(ref)) {
|
|
10285
10424
|
ref(value);
|
|
10286
10425
|
return;
|
|
10287
10426
|
}
|
|
10288
|
-
if (
|
|
10427
|
+
if (isNotNil20(ref)) {
|
|
10289
10428
|
ref.current = value;
|
|
10290
10429
|
}
|
|
10291
10430
|
});
|
|
10292
10431
|
};
|
|
10293
10432
|
|
|
10294
10433
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10295
|
-
import { jsxs as
|
|
10296
|
-
var segmentedControlItemStyles =
|
|
10434
|
+
import { jsxs as jsxs33 } from "react/jsx-runtime";
|
|
10435
|
+
var segmentedControlItemStyles = css29`
|
|
10297
10436
|
all: unset; /* ToggleGroupItem is a button element */
|
|
10298
10437
|
align-items: center;
|
|
10299
10438
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10352,7 +10491,7 @@ var segmentedControlItemStyles = css28`
|
|
|
10352
10491
|
}
|
|
10353
10492
|
}
|
|
10354
10493
|
`;
|
|
10355
|
-
var StyledSegmentedControlItem =
|
|
10494
|
+
var StyledSegmentedControlItem = styled51(ToggleGroupItem)`
|
|
10356
10495
|
${segmentedControlItemStyles}
|
|
10357
10496
|
`;
|
|
10358
10497
|
var SegmentedControlItem = forwardRef20(
|
|
@@ -10368,7 +10507,7 @@ var SegmentedControlItem = forwardRef20(
|
|
|
10368
10507
|
event.preventDefault();
|
|
10369
10508
|
}
|
|
10370
10509
|
};
|
|
10371
|
-
|
|
10510
|
+
useEffect6(() => {
|
|
10372
10511
|
const buttonElem = buttonRef.current;
|
|
10373
10512
|
if (!buttonElem) {
|
|
10374
10513
|
return void 0;
|
|
@@ -10393,12 +10532,12 @@ var SegmentedControlItem = forwardRef20(
|
|
|
10393
10532
|
resizeObserver.disconnect();
|
|
10394
10533
|
};
|
|
10395
10534
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10396
|
-
return /* @__PURE__ */
|
|
10535
|
+
return /* @__PURE__ */ jsxs33(
|
|
10397
10536
|
StyledSegmentedControlItem,
|
|
10398
10537
|
{
|
|
10399
10538
|
ref: combinedRef,
|
|
10400
|
-
$hasLabel:
|
|
10401
|
-
"aria-label":
|
|
10539
|
+
$hasLabel: isNotNil21(label),
|
|
10540
|
+
"aria-label": isNotNil21(label) ? void 0 : ariaLabel,
|
|
10402
10541
|
disabled,
|
|
10403
10542
|
onClick: handleClick,
|
|
10404
10543
|
value,
|
|
@@ -10424,9 +10563,9 @@ import {
|
|
|
10424
10563
|
ScrollDownButton
|
|
10425
10564
|
} from "@radix-ui/react-select";
|
|
10426
10565
|
import { forwardRef as forwardRef21 } from "react";
|
|
10427
|
-
import
|
|
10428
|
-
import { jsx as
|
|
10429
|
-
var StyledTrigger =
|
|
10566
|
+
import styled52 from "styled-components";
|
|
10567
|
+
import { jsx as jsx244, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10568
|
+
var StyledTrigger = styled52(Trigger3)`
|
|
10430
10569
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10431
10570
|
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10432
10571
|
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -10474,7 +10613,7 @@ var StyledTrigger = styled51(Trigger3)`
|
|
|
10474
10613
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
10475
10614
|
}
|
|
10476
10615
|
`;
|
|
10477
|
-
var StyledContent3 =
|
|
10616
|
+
var StyledContent3 = styled52(Content3)`
|
|
10478
10617
|
--wui-select-content-border: var(--wui-color-border);
|
|
10479
10618
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
10480
10619
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -10502,13 +10641,13 @@ var Select = forwardRef21(
|
|
|
10502
10641
|
...props
|
|
10503
10642
|
}, forwardedRef) => {
|
|
10504
10643
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
10505
|
-
return /* @__PURE__ */
|
|
10644
|
+
return /* @__PURE__ */ jsxs34(
|
|
10506
10645
|
Root3,
|
|
10507
10646
|
{
|
|
10508
10647
|
...props,
|
|
10509
10648
|
onValueChange: onChange,
|
|
10510
10649
|
children: [
|
|
10511
|
-
/* @__PURE__ */
|
|
10650
|
+
/* @__PURE__ */ jsxs34(
|
|
10512
10651
|
StyledTrigger,
|
|
10513
10652
|
{
|
|
10514
10653
|
ref: forwardedRef,
|
|
@@ -10516,8 +10655,8 @@ var Select = forwardRef21(
|
|
|
10516
10655
|
$fullWidth: responsiveFullWidth,
|
|
10517
10656
|
...props,
|
|
10518
10657
|
children: [
|
|
10519
|
-
/* @__PURE__ */
|
|
10520
|
-
/* @__PURE__ */
|
|
10658
|
+
/* @__PURE__ */ jsx244(Value, { placeholder }),
|
|
10659
|
+
/* @__PURE__ */ jsx244(
|
|
10521
10660
|
Icon,
|
|
10522
10661
|
{
|
|
10523
10662
|
size: "md",
|
|
@@ -10527,10 +10666,10 @@ var Select = forwardRef21(
|
|
|
10527
10666
|
]
|
|
10528
10667
|
}
|
|
10529
10668
|
),
|
|
10530
|
-
/* @__PURE__ */
|
|
10531
|
-
/* @__PURE__ */
|
|
10532
|
-
/* @__PURE__ */
|
|
10533
|
-
/* @__PURE__ */
|
|
10669
|
+
/* @__PURE__ */ jsx244(Portal2, { children: /* @__PURE__ */ jsxs34(StyledContent3, { position: "popper", children: [
|
|
10670
|
+
/* @__PURE__ */ jsx244(ScrollUpButton, { children: /* @__PURE__ */ jsx244(Icon, { type: "caret-up" }) }),
|
|
10671
|
+
/* @__PURE__ */ jsx244(Viewport, { children }),
|
|
10672
|
+
/* @__PURE__ */ jsx244(ScrollDownButton, { children: /* @__PURE__ */ jsx244(Icon, { type: "caret-down" }) })
|
|
10534
10673
|
] }) })
|
|
10535
10674
|
]
|
|
10536
10675
|
}
|
|
@@ -10542,9 +10681,9 @@ Select.displayName = "Select";
|
|
|
10542
10681
|
// src/components/Select/SelectOption.tsx
|
|
10543
10682
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
10544
10683
|
import { forwardRef as forwardRef22 } from "react";
|
|
10545
|
-
import
|
|
10546
|
-
import { jsx as
|
|
10547
|
-
var StyledItem =
|
|
10684
|
+
import styled53 from "styled-components";
|
|
10685
|
+
import { jsx as jsx245, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
10686
|
+
var StyledItem = styled53(Item)`
|
|
10548
10687
|
${variantStyleMap2.body3};
|
|
10549
10688
|
display: flex;
|
|
10550
10689
|
padding: var(--wui-select-option-padding);
|
|
@@ -10567,25 +10706,25 @@ var StyledItem = styled52(Item)`
|
|
|
10567
10706
|
background-color: transparent;
|
|
10568
10707
|
}
|
|
10569
10708
|
`;
|
|
10570
|
-
var StyledIconContainer =
|
|
10709
|
+
var StyledIconContainer = styled53.span`
|
|
10571
10710
|
width: 12px;
|
|
10572
10711
|
`;
|
|
10573
10712
|
var SelectOption = forwardRef22(
|
|
10574
10713
|
({ children, ...props }, forwardedRef) => {
|
|
10575
|
-
return /* @__PURE__ */
|
|
10714
|
+
return /* @__PURE__ */ jsxs35(
|
|
10576
10715
|
StyledItem,
|
|
10577
10716
|
{
|
|
10578
10717
|
...props,
|
|
10579
10718
|
ref: forwardedRef,
|
|
10580
10719
|
children: [
|
|
10581
|
-
/* @__PURE__ */
|
|
10720
|
+
/* @__PURE__ */ jsx245(StyledIconContainer, { children: /* @__PURE__ */ jsx245(ItemIndicator, { children: /* @__PURE__ */ jsx245(
|
|
10582
10721
|
Icon,
|
|
10583
10722
|
{
|
|
10584
10723
|
size: "sm",
|
|
10585
10724
|
type: "checkmark"
|
|
10586
10725
|
}
|
|
10587
10726
|
) }) }),
|
|
10588
|
-
/* @__PURE__ */
|
|
10727
|
+
/* @__PURE__ */ jsx245(ItemText, { children })
|
|
10589
10728
|
]
|
|
10590
10729
|
}
|
|
10591
10730
|
);
|
|
@@ -10595,14 +10734,14 @@ SelectOption.displayName = "Option";
|
|
|
10595
10734
|
|
|
10596
10735
|
// src/components/Select/SelectOptionGroup.tsx
|
|
10597
10736
|
import { Group, Label as Label2 } from "@radix-ui/react-select";
|
|
10598
|
-
import
|
|
10599
|
-
import { jsx as
|
|
10600
|
-
var StyledLabel4 =
|
|
10737
|
+
import styled54 from "styled-components";
|
|
10738
|
+
import { jsx as jsx246, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
10739
|
+
var StyledLabel4 = styled54(Label2)`
|
|
10601
10740
|
padding: var(--wui-select-option-padding);
|
|
10602
10741
|
`;
|
|
10603
10742
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
10604
|
-
return /* @__PURE__ */
|
|
10605
|
-
/* @__PURE__ */
|
|
10743
|
+
return /* @__PURE__ */ jsxs36(Group, { ...props, children: [
|
|
10744
|
+
/* @__PURE__ */ jsx246(StyledLabel4, { children: /* @__PURE__ */ jsx246(
|
|
10606
10745
|
Text,
|
|
10607
10746
|
{
|
|
10608
10747
|
prominence: "secondary",
|
|
@@ -10616,19 +10755,19 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
10616
10755
|
|
|
10617
10756
|
// src/components/Table/Table.tsx
|
|
10618
10757
|
import { useMemo as useMemo10 } from "react";
|
|
10619
|
-
import
|
|
10758
|
+
import styled55, { css as css30 } from "styled-components";
|
|
10620
10759
|
|
|
10621
10760
|
// src/components/Table/TableContext.tsx
|
|
10622
10761
|
import React from "react";
|
|
10623
10762
|
var TableContext = React.createContext({ divided: false });
|
|
10624
10763
|
|
|
10625
10764
|
// src/components/Table/Table.tsx
|
|
10626
|
-
import { jsx as
|
|
10627
|
-
var StyledTable =
|
|
10765
|
+
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
10766
|
+
var StyledTable = styled55.table`
|
|
10628
10767
|
width: 100%;
|
|
10629
10768
|
border-collapse: collapse;
|
|
10630
10769
|
|
|
10631
|
-
${({ $striped }) => $striped &&
|
|
10770
|
+
${({ $striped }) => $striped && css30`
|
|
10632
10771
|
tbody tr:nth-child(even) {
|
|
10633
10772
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10634
10773
|
}
|
|
@@ -10641,7 +10780,7 @@ var Table = ({
|
|
|
10641
10780
|
...props
|
|
10642
10781
|
}) => {
|
|
10643
10782
|
const contextValue = useMemo10(() => ({ divided }), [divided]);
|
|
10644
|
-
return /* @__PURE__ */
|
|
10783
|
+
return /* @__PURE__ */ jsx247(TableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx247(
|
|
10645
10784
|
StyledTable,
|
|
10646
10785
|
{
|
|
10647
10786
|
$striped: striped,
|
|
@@ -10652,35 +10791,35 @@ var Table = ({
|
|
|
10652
10791
|
};
|
|
10653
10792
|
|
|
10654
10793
|
// src/components/Table/TableBody.tsx
|
|
10655
|
-
import
|
|
10794
|
+
import styled56 from "styled-components";
|
|
10656
10795
|
|
|
10657
10796
|
// src/components/Table/TableSectionContext.ts
|
|
10658
10797
|
import { createContext as createContext8 } from "react";
|
|
10659
10798
|
var TableSectionContext = createContext8(null);
|
|
10660
10799
|
|
|
10661
10800
|
// src/components/Table/TableBody.tsx
|
|
10662
|
-
import { jsx as
|
|
10663
|
-
var StyledTbody =
|
|
10801
|
+
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
10802
|
+
var StyledTbody = styled56.tbody``;
|
|
10664
10803
|
var TableBody = ({ children, ...props }) => {
|
|
10665
|
-
return /* @__PURE__ */
|
|
10804
|
+
return /* @__PURE__ */ jsx248(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx248(StyledTbody, { ...props, children }) });
|
|
10666
10805
|
};
|
|
10667
10806
|
|
|
10668
10807
|
// src/components/Table/TableCell.tsx
|
|
10669
10808
|
import { useContext as useContext7 } from "react";
|
|
10670
|
-
import
|
|
10671
|
-
import { jsx as
|
|
10672
|
-
var sharedStyles =
|
|
10809
|
+
import styled57, { css as css31 } from "styled-components";
|
|
10810
|
+
import { jsx as jsx249 } from "react/jsx-runtime";
|
|
10811
|
+
var sharedStyles = css31`
|
|
10673
10812
|
color: var(--wui-color-text);
|
|
10674
10813
|
padding: var(--wui-space-02);
|
|
10675
10814
|
text-align: left;
|
|
10676
10815
|
`;
|
|
10677
|
-
var StyledTh =
|
|
10816
|
+
var StyledTh = styled57.th`
|
|
10678
10817
|
${sharedStyles}
|
|
10679
10818
|
font-size: var(--wui-typography-body-4-size);
|
|
10680
10819
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
10681
10820
|
line-height: var(--wui-typography-body-4-line-height);
|
|
10682
10821
|
`;
|
|
10683
|
-
var StyledTd =
|
|
10822
|
+
var StyledTd = styled57.td`
|
|
10684
10823
|
${sharedStyles}
|
|
10685
10824
|
font-size: var(--wui-typography-body-2-size);
|
|
10686
10825
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -10689,37 +10828,37 @@ var StyledTd = styled56.td`
|
|
|
10689
10828
|
var TableCell = ({ children, ...props }) => {
|
|
10690
10829
|
const section = useContext7(TableSectionContext);
|
|
10691
10830
|
if (section === "head") {
|
|
10692
|
-
return /* @__PURE__ */
|
|
10831
|
+
return /* @__PURE__ */ jsx249(StyledTh, { ...props, children });
|
|
10693
10832
|
}
|
|
10694
|
-
return /* @__PURE__ */
|
|
10833
|
+
return /* @__PURE__ */ jsx249(StyledTd, { ...props, children });
|
|
10695
10834
|
};
|
|
10696
10835
|
|
|
10697
10836
|
// src/components/Table/TableFooter.tsx
|
|
10698
|
-
import
|
|
10699
|
-
import { jsx as
|
|
10700
|
-
var StyledTfoot =
|
|
10837
|
+
import styled58 from "styled-components";
|
|
10838
|
+
import { jsx as jsx250 } from "react/jsx-runtime";
|
|
10839
|
+
var StyledTfoot = styled58.tfoot``;
|
|
10701
10840
|
var TableFooter = ({ children, ...props }) => {
|
|
10702
|
-
return /* @__PURE__ */
|
|
10841
|
+
return /* @__PURE__ */ jsx250(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx250(StyledTfoot, { ...props, children }) });
|
|
10703
10842
|
};
|
|
10704
10843
|
|
|
10705
10844
|
// src/components/Table/TableHead.tsx
|
|
10706
|
-
import
|
|
10707
|
-
import { jsx as
|
|
10708
|
-
var StyledThead =
|
|
10845
|
+
import styled59 from "styled-components";
|
|
10846
|
+
import { jsx as jsx251 } from "react/jsx-runtime";
|
|
10847
|
+
var StyledThead = styled59.thead``;
|
|
10709
10848
|
var TableHead = ({ children, ...props }) => {
|
|
10710
|
-
return /* @__PURE__ */
|
|
10849
|
+
return /* @__PURE__ */ jsx251(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx251(StyledThead, { ...props, children }) });
|
|
10711
10850
|
};
|
|
10712
10851
|
|
|
10713
10852
|
// src/components/Table/TableRow.tsx
|
|
10714
10853
|
import { useContext as useContext8 } from "react";
|
|
10715
|
-
import
|
|
10716
|
-
import { jsx as
|
|
10717
|
-
var StyledTr =
|
|
10854
|
+
import styled60 from "styled-components";
|
|
10855
|
+
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
10856
|
+
var StyledTr = styled60.tr`
|
|
10718
10857
|
${({ $divided }) => $divided && `border-bottom: 1px solid var(--wui-color-border);`}
|
|
10719
10858
|
`;
|
|
10720
10859
|
var TableRow = ({ children, ...props }) => {
|
|
10721
10860
|
const { divided = false } = useContext8(TableContext);
|
|
10722
|
-
return /* @__PURE__ */
|
|
10861
|
+
return /* @__PURE__ */ jsx252(
|
|
10723
10862
|
StyledTr,
|
|
10724
10863
|
{
|
|
10725
10864
|
$divided: divided,
|
|
@@ -10732,19 +10871,19 @@ var TableRow = ({ children, ...props }) => {
|
|
|
10732
10871
|
// src/components/Tabs/Tabs.tsx
|
|
10733
10872
|
import { forwardRef as forwardRef24, useState as useState10 } from "react";
|
|
10734
10873
|
import { Root as TabsRoot } from "@radix-ui/react-tabs";
|
|
10735
|
-
import { isNotNil as
|
|
10736
|
-
import
|
|
10874
|
+
import { isNotNil as isNotNil23, isNil as isNil14 } from "@wistia/type-guards";
|
|
10875
|
+
import styled65 from "styled-components";
|
|
10737
10876
|
|
|
10738
10877
|
// src/components/Tabs/TabPanel.tsx
|
|
10739
|
-
import
|
|
10878
|
+
import styled61 from "styled-components";
|
|
10740
10879
|
import { Content as TabsContent } from "@radix-ui/react-tabs";
|
|
10741
|
-
import { jsx as
|
|
10742
|
-
var StyledTabPanel =
|
|
10880
|
+
import { jsx as jsx253 } from "react/jsx-runtime";
|
|
10881
|
+
var StyledTabPanel = styled61(TabsContent)`
|
|
10743
10882
|
display: flex;
|
|
10744
10883
|
flex-direction: column;
|
|
10745
10884
|
`;
|
|
10746
10885
|
var TabPanel = ({ children, value, ...props }) => {
|
|
10747
|
-
return /* @__PURE__ */
|
|
10886
|
+
return /* @__PURE__ */ jsx253(
|
|
10748
10887
|
StyledTabPanel,
|
|
10749
10888
|
{
|
|
10750
10889
|
value,
|
|
@@ -10756,10 +10895,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
10756
10895
|
TabPanel.displayName = "TabPanel";
|
|
10757
10896
|
|
|
10758
10897
|
// src/components/Tabs/TabList.tsx
|
|
10759
|
-
import
|
|
10898
|
+
import styled62 from "styled-components";
|
|
10760
10899
|
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
10761
|
-
import { jsx as
|
|
10762
|
-
var StyledTabList =
|
|
10900
|
+
import { jsx as jsx254 } from "react/jsx-runtime";
|
|
10901
|
+
var StyledTabList = styled62(RadixTabList)`
|
|
10763
10902
|
${segmentedControlStyles}
|
|
10764
10903
|
|
|
10765
10904
|
margin-bottom: var(--wui-space-04);
|
|
@@ -10772,7 +10911,7 @@ var TabList = ({
|
|
|
10772
10911
|
ariaLabel,
|
|
10773
10912
|
...props
|
|
10774
10913
|
}) => {
|
|
10775
|
-
return /* @__PURE__ */
|
|
10914
|
+
return /* @__PURE__ */ jsx254(
|
|
10776
10915
|
StyledTabList,
|
|
10777
10916
|
{
|
|
10778
10917
|
$fullWidth: fullWidth,
|
|
@@ -10785,10 +10924,10 @@ var TabList = ({
|
|
|
10785
10924
|
TabList.displayName = "TabList";
|
|
10786
10925
|
|
|
10787
10926
|
// src/components/Tabs/TabItem.tsx
|
|
10788
|
-
import { forwardRef as forwardRef23, useEffect as
|
|
10789
|
-
import
|
|
10927
|
+
import { forwardRef as forwardRef23, useEffect as useEffect7, useRef as useRef10 } from "react";
|
|
10928
|
+
import styled63 from "styled-components";
|
|
10790
10929
|
import { Trigger as RadixTab } from "@radix-ui/react-tabs";
|
|
10791
|
-
import { isNotNil as
|
|
10930
|
+
import { isNotNil as isNotNil22 } from "@wistia/type-guards";
|
|
10792
10931
|
|
|
10793
10932
|
// src/components/Tabs/useTabsValue.tsx
|
|
10794
10933
|
import { createContext as createContext9, useContext as useContext9 } from "react";
|
|
@@ -10803,8 +10942,8 @@ var useTabsValue = () => {
|
|
|
10803
10942
|
};
|
|
10804
10943
|
|
|
10805
10944
|
// src/components/Tabs/TabItem.tsx
|
|
10806
|
-
import { jsxs as
|
|
10807
|
-
var StyledTabItem =
|
|
10945
|
+
import { jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10946
|
+
var StyledTabItem = styled63(RadixTab)`
|
|
10808
10947
|
${segmentedControlItemStyles}
|
|
10809
10948
|
|
|
10810
10949
|
&:focus-visible {
|
|
@@ -10817,7 +10956,7 @@ var TabItem = forwardRef23(
|
|
|
10817
10956
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10818
10957
|
const buttonRef = useRef10(null);
|
|
10819
10958
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
10820
|
-
|
|
10959
|
+
useEffect7(() => {
|
|
10821
10960
|
const buttonElem = buttonRef.current;
|
|
10822
10961
|
if (!buttonElem) {
|
|
10823
10962
|
return void 0;
|
|
@@ -10842,12 +10981,12 @@ var TabItem = forwardRef23(
|
|
|
10842
10981
|
resizeObserver.disconnect();
|
|
10843
10982
|
};
|
|
10844
10983
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10845
|
-
return /* @__PURE__ */
|
|
10984
|
+
return /* @__PURE__ */ jsxs37(
|
|
10846
10985
|
StyledTabItem,
|
|
10847
10986
|
{
|
|
10848
10987
|
ref: combinedRef,
|
|
10849
|
-
$hasLabel:
|
|
10850
|
-
"aria-label":
|
|
10988
|
+
$hasLabel: isNotNil22(label),
|
|
10989
|
+
"aria-label": isNotNil22(label) ? void 0 : ariaLabel,
|
|
10851
10990
|
disabled,
|
|
10852
10991
|
value,
|
|
10853
10992
|
children: [
|
|
@@ -10861,10 +11000,10 @@ var TabItem = forwardRef23(
|
|
|
10861
11000
|
TabItem.displayName = "TabItem";
|
|
10862
11001
|
|
|
10863
11002
|
// src/components/Tabs/extractTabItems.ts
|
|
10864
|
-
import { Children as
|
|
11003
|
+
import { Children as Children7, Fragment as Fragment7, isValidElement as isValidElement2 } from "react";
|
|
10865
11004
|
var extractTabItems = (children) => {
|
|
10866
11005
|
const tabItems = [];
|
|
10867
|
-
|
|
11006
|
+
Children7.forEach(children, (child) => {
|
|
10868
11007
|
if (!isValidElement2(child)) {
|
|
10869
11008
|
return;
|
|
10870
11009
|
}
|
|
@@ -10884,9 +11023,9 @@ var extractTabItems = (children) => {
|
|
|
10884
11023
|
|
|
10885
11024
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
10886
11025
|
import { useMemo as useMemo11 } from "react";
|
|
10887
|
-
import
|
|
10888
|
-
import { jsx as
|
|
10889
|
-
var TabsSelectedItemIndicatorDiv =
|
|
11026
|
+
import styled64 from "styled-components";
|
|
11027
|
+
import { jsx as jsx255 } from "react/jsx-runtime";
|
|
11028
|
+
var TabsSelectedItemIndicatorDiv = styled64(SelectedItemIndicatorDiv)`
|
|
10890
11029
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
10891
11030
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
10892
11031
|
}
|
|
@@ -10905,7 +11044,7 @@ var SelectedItemIndicator2 = () => {
|
|
|
10905
11044
|
if (selectedValue == null) {
|
|
10906
11045
|
return null;
|
|
10907
11046
|
}
|
|
10908
|
-
return /* @__PURE__ */
|
|
11047
|
+
return /* @__PURE__ */ jsx255(
|
|
10909
11048
|
TabsSelectedItemIndicatorDiv,
|
|
10910
11049
|
{
|
|
10911
11050
|
style: {
|
|
@@ -10918,19 +11057,19 @@ var SelectedItemIndicator2 = () => {
|
|
|
10918
11057
|
};
|
|
10919
11058
|
|
|
10920
11059
|
// src/components/Tabs/Tabs.tsx
|
|
10921
|
-
import { jsx as
|
|
10922
|
-
var TabsContainer =
|
|
11060
|
+
import { jsx as jsx256, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11061
|
+
var TabsContainer = styled65.div`
|
|
10923
11062
|
display: flex;
|
|
10924
11063
|
flex-direction: column;
|
|
10925
11064
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
10926
11065
|
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
10927
11066
|
`;
|
|
10928
|
-
var StickyTabContent =
|
|
11067
|
+
var StickyTabContent = styled65.div`
|
|
10929
11068
|
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
10930
11069
|
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
10931
11070
|
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
10932
11071
|
`;
|
|
10933
|
-
var StyledTabsRoot =
|
|
11072
|
+
var StyledTabsRoot = styled65(TabsRoot)`
|
|
10934
11073
|
display: flex;
|
|
10935
11074
|
flex-direction: column;
|
|
10936
11075
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
@@ -10953,7 +11092,7 @@ var Tabs = forwardRef24(
|
|
|
10953
11092
|
onValueChange: setInternalSelectedValue
|
|
10954
11093
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
10955
11094
|
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
10956
|
-
return /* @__PURE__ */
|
|
11095
|
+
return /* @__PURE__ */ jsx256(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ jsx256(
|
|
10957
11096
|
StyledTabsRoot,
|
|
10958
11097
|
{
|
|
10959
11098
|
ref,
|
|
@@ -10961,14 +11100,14 @@ var Tabs = forwardRef24(
|
|
|
10961
11100
|
activationMode: "automatic",
|
|
10962
11101
|
...otherProps,
|
|
10963
11102
|
...modeProps,
|
|
10964
|
-
children: /* @__PURE__ */
|
|
10965
|
-
/* @__PURE__ */
|
|
11103
|
+
children: /* @__PURE__ */ jsx256(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ jsxs38(SelectedItemMeasurementsProvider, { children: [
|
|
11104
|
+
/* @__PURE__ */ jsxs38(
|
|
10966
11105
|
TabList,
|
|
10967
11106
|
{
|
|
10968
11107
|
ariaLabel,
|
|
10969
11108
|
fullWidth,
|
|
10970
11109
|
children: [
|
|
10971
|
-
/* @__PURE__ */
|
|
11110
|
+
/* @__PURE__ */ jsx256(SelectedItemIndicator2, {}),
|
|
10972
11111
|
tabItems.map((tab) => {
|
|
10973
11112
|
const {
|
|
10974
11113
|
value,
|
|
@@ -10978,7 +11117,7 @@ var Tabs = forwardRef24(
|
|
|
10978
11117
|
"aria-label": ariaLabelForTab
|
|
10979
11118
|
} = tab.props;
|
|
10980
11119
|
if (isNil14(icon)) {
|
|
10981
|
-
return /* @__PURE__ */
|
|
11120
|
+
return /* @__PURE__ */ jsx256(
|
|
10982
11121
|
TabItem,
|
|
10983
11122
|
{
|
|
10984
11123
|
disabled,
|
|
@@ -10988,8 +11127,8 @@ var Tabs = forwardRef24(
|
|
|
10988
11127
|
value
|
|
10989
11128
|
);
|
|
10990
11129
|
}
|
|
10991
|
-
if (
|
|
10992
|
-
return /* @__PURE__ */
|
|
11130
|
+
if (isNotNil23(label)) {
|
|
11131
|
+
return /* @__PURE__ */ jsx256(
|
|
10993
11132
|
TabItem,
|
|
10994
11133
|
{
|
|
10995
11134
|
disabled,
|
|
@@ -11000,8 +11139,8 @@ var Tabs = forwardRef24(
|
|
|
11000
11139
|
value
|
|
11001
11140
|
);
|
|
11002
11141
|
}
|
|
11003
|
-
if (
|
|
11004
|
-
return /* @__PURE__ */
|
|
11142
|
+
if (isNotNil23(ariaLabelForTab)) {
|
|
11143
|
+
return /* @__PURE__ */ jsx256(
|
|
11005
11144
|
TabItem,
|
|
11006
11145
|
{
|
|
11007
11146
|
"aria-label": ariaLabelForTab,
|
|
@@ -11017,7 +11156,7 @@ var Tabs = forwardRef24(
|
|
|
11017
11156
|
]
|
|
11018
11157
|
}
|
|
11019
11158
|
),
|
|
11020
|
-
/* @__PURE__ */
|
|
11159
|
+
/* @__PURE__ */ jsx256(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ jsx256(
|
|
11021
11160
|
TabPanel,
|
|
11022
11161
|
{
|
|
11023
11162
|
value: tab.props.value,
|
|
@@ -11034,18 +11173,18 @@ Tabs.displayName = "Tabs";
|
|
|
11034
11173
|
|
|
11035
11174
|
// src/components/Tabs/Tab.tsx
|
|
11036
11175
|
import { forwardRef as forwardRef25 } from "react";
|
|
11037
|
-
import { jsx as
|
|
11176
|
+
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
11038
11177
|
var Tab = forwardRef25(({ children }, ref) => {
|
|
11039
|
-
return /* @__PURE__ */
|
|
11178
|
+
return /* @__PURE__ */ jsx257("div", { ref, children });
|
|
11040
11179
|
});
|
|
11041
11180
|
Tab.displayName = "Tab";
|
|
11042
11181
|
|
|
11043
11182
|
// src/components/Tag/Tag.tsx
|
|
11044
11183
|
import { forwardRef as forwardRef26 } from "react";
|
|
11045
|
-
import
|
|
11046
|
-
import { isNil as isNil15, isNotNil as
|
|
11047
|
-
import { Fragment as Fragment8, jsx as
|
|
11048
|
-
var TagLabel =
|
|
11184
|
+
import styled66 from "styled-components";
|
|
11185
|
+
import { isNil as isNil15, isNotNil as isNotNil24, isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
11186
|
+
import { Fragment as Fragment8, jsx as jsx258, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11187
|
+
var TagLabel = styled66.a`
|
|
11049
11188
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11050
11189
|
font-size: var(--wui-typography-label-4-size);
|
|
11051
11190
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -11073,14 +11212,14 @@ var TagLabel = styled65.a`
|
|
|
11073
11212
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11074
11213
|
}
|
|
11075
11214
|
`;
|
|
11076
|
-
var TagDivider =
|
|
11215
|
+
var TagDivider = styled66.div`
|
|
11077
11216
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11078
11217
|
border-left: 1px solid var(--wui-color-border);
|
|
11079
11218
|
display: flex;
|
|
11080
11219
|
height: 14px;
|
|
11081
11220
|
width: 1px;
|
|
11082
11221
|
`;
|
|
11083
|
-
var StyledRemoveButton =
|
|
11222
|
+
var StyledRemoveButton = styled66.button`
|
|
11084
11223
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11085
11224
|
all: unset;
|
|
11086
11225
|
cursor: pointer;
|
|
@@ -11108,7 +11247,7 @@ var StyledRemoveButton = styled65.button`
|
|
|
11108
11247
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11109
11248
|
}
|
|
11110
11249
|
`;
|
|
11111
|
-
var StyledTag =
|
|
11250
|
+
var StyledTag = styled66.div`
|
|
11112
11251
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11113
11252
|
align-items: center;
|
|
11114
11253
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -11129,23 +11268,23 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
11129
11268
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
11130
11269
|
);
|
|
11131
11270
|
}
|
|
11132
|
-
return /* @__PURE__ */
|
|
11133
|
-
/* @__PURE__ */
|
|
11134
|
-
/* @__PURE__ */
|
|
11271
|
+
return /* @__PURE__ */ jsxs39(Fragment8, { children: [
|
|
11272
|
+
/* @__PURE__ */ jsx258(TagDivider, { $colorScheme: colorScheme }),
|
|
11273
|
+
/* @__PURE__ */ jsxs39(
|
|
11135
11274
|
StyledRemoveButton,
|
|
11136
11275
|
{
|
|
11137
11276
|
$colorScheme: colorScheme,
|
|
11138
11277
|
onClick: onClickRemove,
|
|
11139
11278
|
type: "button",
|
|
11140
11279
|
children: [
|
|
11141
|
-
/* @__PURE__ */
|
|
11280
|
+
/* @__PURE__ */ jsx258(
|
|
11142
11281
|
Icon,
|
|
11143
11282
|
{
|
|
11144
11283
|
size: "sm",
|
|
11145
11284
|
type: "close"
|
|
11146
11285
|
}
|
|
11147
11286
|
),
|
|
11148
|
-
/* @__PURE__ */
|
|
11287
|
+
/* @__PURE__ */ jsx258(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
11149
11288
|
]
|
|
11150
11289
|
}
|
|
11151
11290
|
)
|
|
@@ -11153,15 +11292,15 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
11153
11292
|
};
|
|
11154
11293
|
var Tag = forwardRef26(
|
|
11155
11294
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
11156
|
-
const labelProps =
|
|
11157
|
-
return /* @__PURE__ */
|
|
11295
|
+
const labelProps = isNotNil24(href) && isNonEmptyString4(href) ? { href, as: "a" } : { as: "span" };
|
|
11296
|
+
return /* @__PURE__ */ jsxs39(
|
|
11158
11297
|
StyledTag,
|
|
11159
11298
|
{
|
|
11160
11299
|
ref,
|
|
11161
11300
|
$colorScheme: colorScheme,
|
|
11162
11301
|
...otherProps,
|
|
11163
11302
|
children: [
|
|
11164
|
-
/* @__PURE__ */
|
|
11303
|
+
/* @__PURE__ */ jsx258(
|
|
11165
11304
|
TagLabel,
|
|
11166
11305
|
{
|
|
11167
11306
|
...labelProps,
|
|
@@ -11169,7 +11308,7 @@ var Tag = forwardRef26(
|
|
|
11169
11308
|
children: label
|
|
11170
11309
|
}
|
|
11171
11310
|
),
|
|
11172
|
-
/* @__PURE__ */
|
|
11311
|
+
/* @__PURE__ */ jsx258(
|
|
11173
11312
|
RemoveButton,
|
|
11174
11313
|
{
|
|
11175
11314
|
colorScheme,
|
|
@@ -11185,26 +11324,26 @@ var Tag = forwardRef26(
|
|
|
11185
11324
|
Tag.displayName = "Tag";
|
|
11186
11325
|
|
|
11187
11326
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
11188
|
-
import
|
|
11189
|
-
import { isNotNil as
|
|
11190
|
-
import { jsx as
|
|
11327
|
+
import styled67, { css as css32 } from "styled-components";
|
|
11328
|
+
import { isNotNil as isNotNil25 } from "@wistia/type-guards";
|
|
11329
|
+
import { jsx as jsx259, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
11191
11330
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
11192
11331
|
if (iconOnly) {
|
|
11193
|
-
return /* @__PURE__ */
|
|
11332
|
+
return /* @__PURE__ */ jsx259(
|
|
11194
11333
|
"g",
|
|
11195
11334
|
{
|
|
11196
11335
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11197
11336
|
fill: brandmarkColor,
|
|
11198
|
-
children: /* @__PURE__ */
|
|
11337
|
+
children: /* @__PURE__ */ jsx259("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" })
|
|
11199
11338
|
}
|
|
11200
11339
|
);
|
|
11201
11340
|
}
|
|
11202
|
-
return /* @__PURE__ */
|
|
11341
|
+
return /* @__PURE__ */ jsx259(
|
|
11203
11342
|
"g",
|
|
11204
11343
|
{
|
|
11205
11344
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11206
11345
|
fill: brandmarkColor,
|
|
11207
|
-
children: /* @__PURE__ */
|
|
11346
|
+
children: /* @__PURE__ */ jsx259("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" })
|
|
11208
11347
|
}
|
|
11209
11348
|
);
|
|
11210
11349
|
};
|
|
@@ -11212,12 +11351,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
11212
11351
|
if (iconOnly) {
|
|
11213
11352
|
return null;
|
|
11214
11353
|
}
|
|
11215
|
-
return /* @__PURE__ */
|
|
11354
|
+
return /* @__PURE__ */ jsx259(
|
|
11216
11355
|
"g",
|
|
11217
11356
|
{
|
|
11218
11357
|
"data-testid": "ui-wistia-logo-logotype",
|
|
11219
11358
|
fill: logotypeColor,
|
|
11220
|
-
children: /* @__PURE__ */
|
|
11359
|
+
children: /* @__PURE__ */ jsx259("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" })
|
|
11221
11360
|
}
|
|
11222
11361
|
);
|
|
11223
11362
|
};
|
|
@@ -11227,7 +11366,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
11227
11366
|
}
|
|
11228
11367
|
return "0 0 144 31.47";
|
|
11229
11368
|
};
|
|
11230
|
-
var WistiaLogoComponent =
|
|
11369
|
+
var WistiaLogoComponent = styled67.svg`
|
|
11231
11370
|
height: ${({ height }) => `${height}px`};
|
|
11232
11371
|
|
|
11233
11372
|
/* ensure it will always fit on mobile */
|
|
@@ -11243,12 +11382,12 @@ var WistiaLogoComponent = styled66.svg`
|
|
|
11243
11382
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
11244
11383
|
if ($opticallyCentered) {
|
|
11245
11384
|
if ($iconOnly) {
|
|
11246
|
-
return
|
|
11385
|
+
return css32`
|
|
11247
11386
|
aspect-ratio: 1;
|
|
11248
11387
|
padding: 11.85% 3.12% 13.91%;
|
|
11249
11388
|
`;
|
|
11250
11389
|
}
|
|
11251
|
-
return
|
|
11390
|
+
return css32`
|
|
11252
11391
|
aspect-ratio: 127 / 32;
|
|
11253
11392
|
`;
|
|
11254
11393
|
}
|
|
@@ -11285,7 +11424,7 @@ var WistiaLogo = ({
|
|
|
11285
11424
|
};
|
|
11286
11425
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
11287
11426
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
11288
|
-
const Logo = /* @__PURE__ */
|
|
11427
|
+
const Logo = /* @__PURE__ */ jsxs40(
|
|
11289
11428
|
WistiaLogoComponent,
|
|
11290
11429
|
{
|
|
11291
11430
|
$hoverColor: hoverColor,
|
|
@@ -11298,14 +11437,14 @@ var WistiaLogo = ({
|
|
|
11298
11437
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11299
11438
|
...otherProps,
|
|
11300
11439
|
children: [
|
|
11301
|
-
/* @__PURE__ */
|
|
11302
|
-
|
|
11440
|
+
/* @__PURE__ */ jsx259("title", { children: title }),
|
|
11441
|
+
isNotNil25(description) ? /* @__PURE__ */ jsx259("desc", { children: description }) : null,
|
|
11303
11442
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
11304
11443
|
renderLogotype(logotypeColor, iconOnly)
|
|
11305
11444
|
]
|
|
11306
11445
|
}
|
|
11307
11446
|
);
|
|
11308
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
11447
|
+
return href !== void 0 ? /* @__PURE__ */ jsx259("a", { href, children: Logo }) : Logo;
|
|
11309
11448
|
};
|
|
11310
11449
|
WistiaLogo.displayName = "WistiaLogo";
|
|
11311
11450
|
export {
|
|
@@ -11321,6 +11460,7 @@ export {
|
|
|
11321
11460
|
Checkbox,
|
|
11322
11461
|
CheckboxGroup,
|
|
11323
11462
|
CheckboxMenuItem,
|
|
11463
|
+
ClickRegion,
|
|
11324
11464
|
Collapsible,
|
|
11325
11465
|
CollapsibleContent,
|
|
11326
11466
|
CollapsibleTrigger,
|
|
@@ -11355,6 +11495,7 @@ export {
|
|
|
11355
11495
|
Modal,
|
|
11356
11496
|
PersistentFileAmountLimitValidator,
|
|
11357
11497
|
Popover,
|
|
11498
|
+
ProgressBar,
|
|
11358
11499
|
Radio,
|
|
11359
11500
|
RadioGroup,
|
|
11360
11501
|
RadioMenuItem,
|