@wistia/ui 0.6.14 → 0.6.15
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 +441 -377
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +27 -2
- package/dist/index.d.ts +27 -2
- package/dist/index.mjs +175 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -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.15
|
|
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);
|
|
@@ -9741,14 +9803,14 @@ import styled43 from "styled-components";
|
|
|
9741
9803
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
9742
9804
|
|
|
9743
9805
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
9744
|
-
import { useRef as useRef8, useEffect as
|
|
9806
|
+
import { useRef as useRef8, useEffect as useEffect5 } from "react";
|
|
9745
9807
|
import { isNotNil as isNotNil16 } from "@wistia/type-guards";
|
|
9746
9808
|
var useFocusRestore = () => {
|
|
9747
9809
|
const previouslyFocusedRef = useRef8(null);
|
|
9748
|
-
|
|
9810
|
+
useEffect5(() => {
|
|
9749
9811
|
previouslyFocusedRef.current = document.activeElement;
|
|
9750
9812
|
}, []);
|
|
9751
|
-
|
|
9813
|
+
useEffect5(() => {
|
|
9752
9814
|
return () => {
|
|
9753
9815
|
if (isNotNil16(previouslyFocusedRef.current)) {
|
|
9754
9816
|
setTimeout(() => {
|
|
@@ -9941,7 +10003,7 @@ Modal.displayName = "Modal";
|
|
|
9941
10003
|
|
|
9942
10004
|
// src/components/Popover/Popover.tsx
|
|
9943
10005
|
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close } from "@radix-ui/react-popover";
|
|
9944
|
-
import styled46, { css as
|
|
10006
|
+
import styled46, { css as css26 } from "styled-components";
|
|
9945
10007
|
|
|
9946
10008
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
9947
10009
|
import { isNotNil as isNotNil18 } from "@wistia/type-guards";
|
|
@@ -9952,7 +10014,7 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
9952
10014
|
// src/components/Popover/Popover.tsx
|
|
9953
10015
|
import { jsx as jsx238, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9954
10016
|
var StyledContent2 = styled46(Content2)`
|
|
9955
|
-
${({ $unstyled }) => !$unstyled &&
|
|
10017
|
+
${({ $unstyled }) => !$unstyled && css26`
|
|
9956
10018
|
border-radius: var(--wui-border-radius-02);
|
|
9957
10019
|
padding: var(--wui-space-04);
|
|
9958
10020
|
max-width: 320px;
|
|
@@ -10004,7 +10066,7 @@ Popover.displayName = "Popover";
|
|
|
10004
10066
|
|
|
10005
10067
|
// src/components/Radio/Radio.tsx
|
|
10006
10068
|
import { forwardRef as forwardRef18, useId as useId3 } from "react";
|
|
10007
|
-
import styled47, { css as
|
|
10069
|
+
import styled47, { css as css27 } from "styled-components";
|
|
10008
10070
|
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
10009
10071
|
import { jsx as jsx239, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
10010
10072
|
var StyledLabelWrapper2 = styled47.div`
|
|
@@ -10038,11 +10100,11 @@ var StyledRadio = styled47.input`
|
|
|
10038
10100
|
transform: scale(1);
|
|
10039
10101
|
}
|
|
10040
10102
|
`;
|
|
10041
|
-
var disabledStyle2 =
|
|
10103
|
+
var disabledStyle2 = css27`
|
|
10042
10104
|
cursor: not-allowed;
|
|
10043
10105
|
opacity: 0.5;
|
|
10044
10106
|
`;
|
|
10045
|
-
var errorStyle =
|
|
10107
|
+
var errorStyle = css27`
|
|
10046
10108
|
/* TODO Lamp to design error state */
|
|
10047
10109
|
&:hover,
|
|
10048
10110
|
&:focus,
|
|
@@ -10050,7 +10112,7 @@ var errorStyle = css26`
|
|
|
10050
10112
|
border-color: transparent !important;
|
|
10051
10113
|
}
|
|
10052
10114
|
`;
|
|
10053
|
-
var defaultHoverStyle =
|
|
10115
|
+
var defaultHoverStyle = css27`
|
|
10054
10116
|
/* TODO Lamp to design hover state */
|
|
10055
10117
|
cursor: pointer;
|
|
10056
10118
|
`;
|
|
@@ -10134,7 +10196,7 @@ Radio.displayName = "Radio";
|
|
|
10134
10196
|
|
|
10135
10197
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10136
10198
|
import { forwardRef as forwardRef19 } from "react";
|
|
10137
|
-
import styled49, { css as
|
|
10199
|
+
import styled49, { css as css28 } from "styled-components";
|
|
10138
10200
|
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
10139
10201
|
import { isNil as isNil13 } from "@wistia/type-guards";
|
|
10140
10202
|
|
|
@@ -10225,7 +10287,7 @@ var SelectedItemIndicator = () => {
|
|
|
10225
10287
|
|
|
10226
10288
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10227
10289
|
import { jsx as jsx242, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10228
|
-
var segmentedControlStyles =
|
|
10290
|
+
var segmentedControlStyles = css28`
|
|
10229
10291
|
display: inline-flex;
|
|
10230
10292
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10231
10293
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10273,8 +10335,8 @@ var SegmentedControl = forwardRef19(
|
|
|
10273
10335
|
SegmentedControl.displayName = "SegmentedControl";
|
|
10274
10336
|
|
|
10275
10337
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10276
|
-
import { forwardRef as forwardRef20, useEffect as
|
|
10277
|
-
import styled50, { css as
|
|
10338
|
+
import { forwardRef as forwardRef20, useEffect as useEffect6, useRef as useRef9 } from "react";
|
|
10339
|
+
import styled50, { css as css29 } from "styled-components";
|
|
10278
10340
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
10279
10341
|
import { isNotNil as isNotNil20 } from "@wistia/type-guards";
|
|
10280
10342
|
|
|
@@ -10294,7 +10356,7 @@ var mergeRefs = (refs) => (value) => {
|
|
|
10294
10356
|
|
|
10295
10357
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10296
10358
|
import { jsxs as jsxs32 } from "react/jsx-runtime";
|
|
10297
|
-
var segmentedControlItemStyles =
|
|
10359
|
+
var segmentedControlItemStyles = css29`
|
|
10298
10360
|
all: unset; /* ToggleGroupItem is a button element */
|
|
10299
10361
|
align-items: center;
|
|
10300
10362
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10369,7 +10431,7 @@ var SegmentedControlItem = forwardRef20(
|
|
|
10369
10431
|
event.preventDefault();
|
|
10370
10432
|
}
|
|
10371
10433
|
};
|
|
10372
|
-
|
|
10434
|
+
useEffect6(() => {
|
|
10373
10435
|
const buttonElem = buttonRef.current;
|
|
10374
10436
|
if (!buttonElem) {
|
|
10375
10437
|
return void 0;
|
|
@@ -10617,7 +10679,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
10617
10679
|
|
|
10618
10680
|
// src/components/Table/Table.tsx
|
|
10619
10681
|
import { useMemo as useMemo10 } from "react";
|
|
10620
|
-
import styled54, { css as
|
|
10682
|
+
import styled54, { css as css30 } from "styled-components";
|
|
10621
10683
|
|
|
10622
10684
|
// src/components/Table/TableContext.tsx
|
|
10623
10685
|
import React from "react";
|
|
@@ -10629,7 +10691,7 @@ var StyledTable = styled54.table`
|
|
|
10629
10691
|
width: 100%;
|
|
10630
10692
|
border-collapse: collapse;
|
|
10631
10693
|
|
|
10632
|
-
${({ $striped }) => $striped &&
|
|
10694
|
+
${({ $striped }) => $striped && css30`
|
|
10633
10695
|
tbody tr:nth-child(even) {
|
|
10634
10696
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10635
10697
|
}
|
|
@@ -10668,9 +10730,9 @@ var TableBody = ({ children, ...props }) => {
|
|
|
10668
10730
|
|
|
10669
10731
|
// src/components/Table/TableCell.tsx
|
|
10670
10732
|
import { useContext as useContext7 } from "react";
|
|
10671
|
-
import styled56, { css as
|
|
10733
|
+
import styled56, { css as css31 } from "styled-components";
|
|
10672
10734
|
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
10673
|
-
var sharedStyles =
|
|
10735
|
+
var sharedStyles = css31`
|
|
10674
10736
|
color: var(--wui-color-text);
|
|
10675
10737
|
padding: var(--wui-space-02);
|
|
10676
10738
|
text-align: left;
|
|
@@ -10786,7 +10848,7 @@ var TabList = ({
|
|
|
10786
10848
|
TabList.displayName = "TabList";
|
|
10787
10849
|
|
|
10788
10850
|
// src/components/Tabs/TabItem.tsx
|
|
10789
|
-
import { forwardRef as forwardRef23, useEffect as
|
|
10851
|
+
import { forwardRef as forwardRef23, useEffect as useEffect7, useRef as useRef10 } from "react";
|
|
10790
10852
|
import styled62 from "styled-components";
|
|
10791
10853
|
import { Trigger as RadixTab } from "@radix-ui/react-tabs";
|
|
10792
10854
|
import { isNotNil as isNotNil21 } from "@wistia/type-guards";
|
|
@@ -10818,7 +10880,7 @@ var TabItem = forwardRef23(
|
|
|
10818
10880
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10819
10881
|
const buttonRef = useRef10(null);
|
|
10820
10882
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
10821
|
-
|
|
10883
|
+
useEffect7(() => {
|
|
10822
10884
|
const buttonElem = buttonRef.current;
|
|
10823
10885
|
if (!buttonElem) {
|
|
10824
10886
|
return void 0;
|
|
@@ -10862,10 +10924,10 @@ var TabItem = forwardRef23(
|
|
|
10862
10924
|
TabItem.displayName = "TabItem";
|
|
10863
10925
|
|
|
10864
10926
|
// src/components/Tabs/extractTabItems.ts
|
|
10865
|
-
import { Children as
|
|
10927
|
+
import { Children as Children7, Fragment as Fragment7, isValidElement as isValidElement2 } from "react";
|
|
10866
10928
|
var extractTabItems = (children) => {
|
|
10867
10929
|
const tabItems = [];
|
|
10868
|
-
|
|
10930
|
+
Children7.forEach(children, (child) => {
|
|
10869
10931
|
if (!isValidElement2(child)) {
|
|
10870
10932
|
return;
|
|
10871
10933
|
}
|
|
@@ -11186,7 +11248,7 @@ var Tag = forwardRef26(
|
|
|
11186
11248
|
Tag.displayName = "Tag";
|
|
11187
11249
|
|
|
11188
11250
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
11189
|
-
import styled66, { css as
|
|
11251
|
+
import styled66, { css as css32 } from "styled-components";
|
|
11190
11252
|
import { isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
11191
11253
|
import { jsx as jsx258, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11192
11254
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
@@ -11244,12 +11306,12 @@ var WistiaLogoComponent = styled66.svg`
|
|
|
11244
11306
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
11245
11307
|
if ($opticallyCentered) {
|
|
11246
11308
|
if ($iconOnly) {
|
|
11247
|
-
return
|
|
11309
|
+
return css32`
|
|
11248
11310
|
aspect-ratio: 1;
|
|
11249
11311
|
padding: 11.85% 3.12% 13.91%;
|
|
11250
11312
|
`;
|
|
11251
11313
|
}
|
|
11252
|
-
return
|
|
11314
|
+
return css32`
|
|
11253
11315
|
aspect-ratio: 127 / 32;
|
|
11254
11316
|
`;
|
|
11255
11317
|
}
|
|
@@ -11322,6 +11384,7 @@ export {
|
|
|
11322
11384
|
Checkbox,
|
|
11323
11385
|
CheckboxGroup,
|
|
11324
11386
|
CheckboxMenuItem,
|
|
11387
|
+
ClickRegion,
|
|
11325
11388
|
Collapsible,
|
|
11326
11389
|
CollapsibleContent,
|
|
11327
11390
|
CollapsibleTrigger,
|