@wistia/ui 0.6.10-beta.d776f0f0.58bcf0c → 0.6.11-beta.0e21fde4.8ec0099
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 +776 -677
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +170 -121
- package/dist/index.d.ts +170 -121
- package/dist/index.mjs +767 -674
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.11-beta.0e21fde4.8ec0099
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -97,6 +97,12 @@ __export(index_exports, {
|
|
|
97
97
|
Stack: () => Stack,
|
|
98
98
|
SubMenu: () => SubMenu,
|
|
99
99
|
Tab: () => Tab,
|
|
100
|
+
Table: () => Table,
|
|
101
|
+
TableBody: () => TableBody,
|
|
102
|
+
TableCell: () => TableCell,
|
|
103
|
+
TableFooter: () => TableFooter,
|
|
104
|
+
TableHead: () => TableHead,
|
|
105
|
+
TableRow: () => TableRow,
|
|
100
106
|
Tabs: () => Tabs,
|
|
101
107
|
Tag: () => Tag,
|
|
102
108
|
Text: () => Text,
|
|
@@ -127,7 +133,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
127
133
|
var import_react_tooltip = require("@radix-ui/react-tooltip");
|
|
128
134
|
|
|
129
135
|
// src/css/GlobalStyle.tsx
|
|
130
|
-
var
|
|
136
|
+
var import_styled_components12 = require("styled-components");
|
|
131
137
|
|
|
132
138
|
// src/css/resetCss.tsx
|
|
133
139
|
var import_styled_components = require("styled-components");
|
|
@@ -1465,39 +1471,11 @@ var designTokens = import_styled_components11.css`
|
|
|
1465
1471
|
}
|
|
1466
1472
|
`;
|
|
1467
1473
|
|
|
1468
|
-
// src/components/ClickRegion/globalStyles.tsx
|
|
1469
|
-
var import_styled_components12 = require("styled-components");
|
|
1470
|
-
var clickRegionGlobalStyles = import_styled_components12.css`
|
|
1471
|
-
[data-click-region] {
|
|
1472
|
-
position: relative;
|
|
1473
|
-
cursor: pointer;
|
|
1474
|
-
z-index: 1;
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
[data-click-region] a:not([data-click-region-target-link]),
|
|
1478
|
-
[data-click-region] button:not([data-click-region-target-button]) {
|
|
1479
|
-
z-index: 2;
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
[data-click-region-target-link]::before {
|
|
1483
|
-
content: '';
|
|
1484
|
-
cursor: inherit;
|
|
1485
|
-
display: block;
|
|
1486
|
-
position: absolute;
|
|
1487
|
-
top: 0;
|
|
1488
|
-
left: 0;
|
|
1489
|
-
z-index: 0;
|
|
1490
|
-
width: 100%;
|
|
1491
|
-
height: 100%;
|
|
1492
|
-
}
|
|
1493
|
-
`;
|
|
1494
|
-
|
|
1495
1474
|
// src/css/GlobalStyle.tsx
|
|
1496
|
-
var GlobalStyle =
|
|
1475
|
+
var GlobalStyle = import_styled_components12.createGlobalStyle`
|
|
1497
1476
|
${resetCss}
|
|
1498
1477
|
${globalStyleAdjustmentsCss}
|
|
1499
1478
|
${designTokens}
|
|
1500
|
-
${clickRegionGlobalStyles}
|
|
1501
1479
|
`;
|
|
1502
1480
|
|
|
1503
1481
|
// src/providers/AriaLiveProvider/AriaLiveProvider.tsx
|
|
@@ -2214,14 +2192,14 @@ var import_sonner2 = require("sonner");
|
|
|
2214
2192
|
|
|
2215
2193
|
// src/private/components/Toast/Toast.tsx
|
|
2216
2194
|
var import_react8 = require("react");
|
|
2217
|
-
var
|
|
2195
|
+
var import_styled_components15 = __toESM(require("styled-components"));
|
|
2218
2196
|
var import_type_guards9 = require("@wistia/type-guards");
|
|
2219
2197
|
|
|
2220
2198
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
2221
2199
|
var import_type_guards8 = require("@wistia/type-guards");
|
|
2222
|
-
var
|
|
2200
|
+
var import_styled_components13 = __toESM(require("styled-components"));
|
|
2223
2201
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
2224
|
-
var ellipsisStyle =
|
|
2202
|
+
var ellipsisStyle = import_styled_components13.css`
|
|
2225
2203
|
overflow: hidden;
|
|
2226
2204
|
text-overflow: ellipsis;
|
|
2227
2205
|
white-space: nowrap;
|
|
@@ -2244,14 +2222,14 @@ var ellipsisStyle = import_styled_components14.css`
|
|
|
2244
2222
|
}
|
|
2245
2223
|
}
|
|
2246
2224
|
`;
|
|
2247
|
-
var ellipsisFlexParentStyle =
|
|
2225
|
+
var ellipsisFlexParentStyle = import_styled_components13.css`
|
|
2248
2226
|
min-width: 0;
|
|
2249
2227
|
`;
|
|
2250
|
-
var EllipsisComponent =
|
|
2228
|
+
var EllipsisComponent = import_styled_components13.default.div`
|
|
2251
2229
|
${ellipsisStyle};
|
|
2252
2230
|
${({ $lines }) => {
|
|
2253
2231
|
if ((0, import_type_guards8.isNotNil)($lines)) {
|
|
2254
|
-
return
|
|
2232
|
+
return import_styled_components13.css`
|
|
2255
2233
|
-webkit-box-orient: vertical;
|
|
2256
2234
|
-webkit-line-clamp: ${$lines};
|
|
2257
2235
|
display: -webkit-box;
|
|
@@ -2272,7 +2250,7 @@ var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ (0, impor
|
|
|
2272
2250
|
Ellipsis.displayName = "Ellipsis";
|
|
2273
2251
|
|
|
2274
2252
|
// src/private/helpers/getColorScheme/getColorScheme.ts
|
|
2275
|
-
var
|
|
2253
|
+
var import_styled_components14 = require("styled-components");
|
|
2276
2254
|
var colorSchemeSchema = [
|
|
2277
2255
|
{ token: "bg-surface", step: "2" },
|
|
2278
2256
|
{ token: "bg-surface-hover", step: "3" },
|
|
@@ -2299,7 +2277,7 @@ var colorSchemeSchema = [
|
|
|
2299
2277
|
{ token: "icon-on-fill", step: "contrast" },
|
|
2300
2278
|
{ token: "focus-ring", step: "9" }
|
|
2301
2279
|
];
|
|
2302
|
-
var defaultScheme =
|
|
2280
|
+
var defaultScheme = import_styled_components14.css`
|
|
2303
2281
|
--wui-color-bg-surface: var(--wui-gray-1);
|
|
2304
2282
|
--wui-color-bg-surface-hover: var(--wui-gray-3);
|
|
2305
2283
|
--wui-color-bg-surface-active: var(--wui-gray-4);
|
|
@@ -2325,7 +2303,7 @@ var defaultScheme = import_styled_components15.css`
|
|
|
2325
2303
|
--wui-color-icon-on-fill: var(--wui-gray-contrast);
|
|
2326
2304
|
--wui-color-focus-ring: var(--wui-blue-9);
|
|
2327
2305
|
`;
|
|
2328
|
-
var navScheme =
|
|
2306
|
+
var navScheme = import_styled_components14.css`
|
|
2329
2307
|
--wui-color-bg-app: #1e3399;
|
|
2330
2308
|
|
|
2331
2309
|
--wui-color-bg-fill: var(--wui-blue-1);
|
|
@@ -2386,7 +2364,7 @@ var getColorScheme = (colorScheme) => {
|
|
|
2386
2364
|
if (colorScheme === "default") {
|
|
2387
2365
|
return defaultScheme;
|
|
2388
2366
|
}
|
|
2389
|
-
return
|
|
2367
|
+
return import_styled_components14.css`
|
|
2390
2368
|
${colorSchemeSchema.map(({ token, step }) => {
|
|
2391
2369
|
return `--wui-color-${token}: var(--wui-${colorScheme === "info" ? "blue" : colorScheme}-${step});`;
|
|
2392
2370
|
}).join("")}
|
|
@@ -2395,12 +2373,12 @@ var getColorScheme = (colorScheme) => {
|
|
|
2395
2373
|
|
|
2396
2374
|
// src/private/components/Toast/Toast.tsx
|
|
2397
2375
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2398
|
-
var Message = (0,
|
|
2376
|
+
var Message = (0, import_styled_components15.default)(Ellipsis)`
|
|
2399
2377
|
line-height: var(--wui-typography-label-3-line-height);
|
|
2400
2378
|
font-size: var(--wui-typography-label-3-size);
|
|
2401
2379
|
font-weight: var(--wui-typography-label-3-weight);
|
|
2402
2380
|
`;
|
|
2403
|
-
var MessageWrapper =
|
|
2381
|
+
var MessageWrapper = import_styled_components15.default.div`
|
|
2404
2382
|
display: flex;
|
|
2405
2383
|
flex-grow: 1;
|
|
2406
2384
|
flex-shrink: 1;
|
|
@@ -2413,13 +2391,13 @@ var MessageWrapper = import_styled_components16.default.div`
|
|
|
2413
2391
|
margin-right: var(--wui-space-02); /* space between icon & message */
|
|
2414
2392
|
}
|
|
2415
2393
|
`;
|
|
2416
|
-
var ActionWrapper =
|
|
2394
|
+
var ActionWrapper = import_styled_components15.default.div`
|
|
2417
2395
|
flex-grow: 0;
|
|
2418
2396
|
flex-shrink: 0;
|
|
2419
2397
|
flex-basis: auto;
|
|
2420
2398
|
margin-right: var(--wui-space-03);
|
|
2421
2399
|
`;
|
|
2422
|
-
var StyledToast =
|
|
2400
|
+
var StyledToast = import_styled_components15.default.div`
|
|
2423
2401
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
2424
2402
|
display: flex;
|
|
2425
2403
|
align-items: center;
|
|
@@ -2502,16 +2480,16 @@ var useToast = () => {
|
|
|
2502
2480
|
|
|
2503
2481
|
// src/components/ActionButton/ActionButton.tsx
|
|
2504
2482
|
var import_react13 = require("react");
|
|
2505
|
-
var
|
|
2483
|
+
var import_styled_components21 = __toESM(require("styled-components"));
|
|
2506
2484
|
|
|
2507
2485
|
// src/components/Button/Button.tsx
|
|
2508
2486
|
var import_react12 = require("react");
|
|
2509
|
-
var
|
|
2487
|
+
var import_styled_components20 = __toESM(require("styled-components"));
|
|
2510
2488
|
var import_type_guards13 = require("@wistia/type-guards");
|
|
2511
2489
|
|
|
2512
2490
|
// src/css/buttonResetCss.tsx
|
|
2513
|
-
var
|
|
2514
|
-
var buttonResetCss =
|
|
2491
|
+
var import_styled_components16 = require("styled-components");
|
|
2492
|
+
var buttonResetCss = import_styled_components16.css`
|
|
2515
2493
|
align-items: center;
|
|
2516
2494
|
background-color: transparent;
|
|
2517
2495
|
background-image: none;
|
|
@@ -2556,8 +2534,8 @@ var buttonResetCss = import_styled_components17.css`
|
|
|
2556
2534
|
`;
|
|
2557
2535
|
|
|
2558
2536
|
// src/components/Button/buttonStyles.tsx
|
|
2559
|
-
var
|
|
2560
|
-
var buttonSmallStyles =
|
|
2537
|
+
var import_styled_components17 = require("styled-components");
|
|
2538
|
+
var buttonSmallStyles = import_styled_components17.css`
|
|
2561
2539
|
--button-padding-vertical: var(--wui-space-01);
|
|
2562
2540
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2563
2541
|
--button-label-padding-horizontal: var(--wui-space-01);
|
|
@@ -2568,7 +2546,7 @@ var buttonSmallStyles = import_styled_components18.css`
|
|
|
2568
2546
|
--button-icon-size: 12px;
|
|
2569
2547
|
--button-label-gap: 4px;
|
|
2570
2548
|
`;
|
|
2571
|
-
var buttonMediumStyles =
|
|
2549
|
+
var buttonMediumStyles = import_styled_components17.css`
|
|
2572
2550
|
--button-padding-vertical: var(--wui-space-02);
|
|
2573
2551
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2574
2552
|
--button-label-padding-horizontal: 6px;
|
|
@@ -2579,7 +2557,7 @@ var buttonMediumStyles = import_styled_components18.css`
|
|
|
2579
2557
|
--button-icon-size: 16px;
|
|
2580
2558
|
--button-label-gap: 6px;
|
|
2581
2559
|
`;
|
|
2582
|
-
var buttonLargeStyles =
|
|
2560
|
+
var buttonLargeStyles = import_styled_components17.css`
|
|
2583
2561
|
--button-padding-vertical: var(--wui-space-02);
|
|
2584
2562
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2585
2563
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2590,7 +2568,7 @@ var buttonLargeStyles = import_styled_components18.css`
|
|
|
2590
2568
|
--button-icon-size: 24px;
|
|
2591
2569
|
--button-label-gap: 8px;
|
|
2592
2570
|
`;
|
|
2593
|
-
var buttonExtraLargeStyles =
|
|
2571
|
+
var buttonExtraLargeStyles = import_styled_components17.css`
|
|
2594
2572
|
--button-padding-vertical: var(--wui-space-03);
|
|
2595
2573
|
--button-padding-horizontal: var(--wui-space-03);
|
|
2596
2574
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2601,34 +2579,34 @@ var buttonExtraLargeStyles = import_styled_components18.css`
|
|
|
2601
2579
|
--button-icon-size: 24px;
|
|
2602
2580
|
--button-label-gap: 8px;
|
|
2603
2581
|
`;
|
|
2604
|
-
var ghostButtonVariant =
|
|
2582
|
+
var ghostButtonVariant = import_styled_components17.css`
|
|
2605
2583
|
--button-color-bg: transparent;
|
|
2606
2584
|
--button-color-bg-hover: var(--wui-color-bg-surface-hover);
|
|
2607
2585
|
--button-color-bg-active: var(--wui-color-bg-surface-active);
|
|
2608
2586
|
--button-color-text: var(--wui-color-text-button);
|
|
2609
2587
|
--button-color-icon: var(--wui-color-icon);
|
|
2610
2588
|
`;
|
|
2611
|
-
var outlineButtonVariant =
|
|
2589
|
+
var outlineButtonVariant = import_styled_components17.css`
|
|
2612
2590
|
${ghostButtonVariant};
|
|
2613
2591
|
--button-color-border: var(--wui-color-border);
|
|
2614
2592
|
|
|
2615
2593
|
box-shadow: 0 0 0 2px var(--button-color-border) inset;
|
|
2616
2594
|
`;
|
|
2617
|
-
var softButtonVariant =
|
|
2595
|
+
var softButtonVariant = import_styled_components17.css`
|
|
2618
2596
|
--button-color-bg: var(--wui-color-bg-surface-secondary);
|
|
2619
2597
|
--button-color-bg-hover: var(--wui-color-bg-surface-secondary-hover);
|
|
2620
2598
|
--button-color-bg-active: var(--wui-color-bg-surface-secondary-active);
|
|
2621
2599
|
--button-color-text: var(--wui-color-text-button);
|
|
2622
2600
|
--button-color-icon: var(--wui-color-icon);
|
|
2623
2601
|
`;
|
|
2624
|
-
var solidButtonVariant =
|
|
2602
|
+
var solidButtonVariant = import_styled_components17.css`
|
|
2625
2603
|
--button-color-bg: var(--wui-color-bg-fill);
|
|
2626
2604
|
--button-color-bg-hover: var(--wui-color-bg-fill-hover);
|
|
2627
2605
|
--button-color-bg-active: var(--wui-color-bg-fill-active);
|
|
2628
2606
|
--button-color-text: var(--wui-color-text-on-fill);
|
|
2629
2607
|
--button-color-icon: var(--wui-color-icon-on-fill);
|
|
2630
2608
|
`;
|
|
2631
|
-
var disabledButtonVariant =
|
|
2609
|
+
var disabledButtonVariant = import_styled_components17.css`
|
|
2632
2610
|
--button-color-bg: var(--wui-color-bg-surface-disabled);
|
|
2633
2611
|
--button-color-bg-hover: var(--wui-color-bg-surface-disabled);
|
|
2634
2612
|
--button-color-bg-active: var(--wui-color-bg-surface-disabled);
|
|
@@ -2636,7 +2614,7 @@ var disabledButtonVariant = import_styled_components18.css`
|
|
|
2636
2614
|
--button-color-icon: var(--wui-color-icon-disabled);
|
|
2637
2615
|
--button-color-border: var(--wui-color-border-disabled);
|
|
2638
2616
|
`;
|
|
2639
|
-
var pressedButtonVariant =
|
|
2617
|
+
var pressedButtonVariant = import_styled_components17.css`
|
|
2640
2618
|
--button-color-bg: var(--wui-color-bg-surface-selected);
|
|
2641
2619
|
--button-color-bg-hover: var(--wui-color-bg-surface-selected-hover);
|
|
2642
2620
|
--button-color-bg-active: var(--wui-color-bg-surface-selected-active);
|
|
@@ -2644,7 +2622,7 @@ var pressedButtonVariant = import_styled_components18.css`
|
|
|
2644
2622
|
--button-color-icon: var(--wui-color-icon-selected);
|
|
2645
2623
|
--button-color-border: var(--wui-color-border-selected);
|
|
2646
2624
|
`;
|
|
2647
|
-
var buttonBaseStyles =
|
|
2625
|
+
var buttonBaseStyles = import_styled_components17.css`
|
|
2648
2626
|
border-radius: var(--wui-border-radius-rounded);
|
|
2649
2627
|
font-family: var(--button-typography-family);
|
|
2650
2628
|
font-size: var(--button-typography-size);
|
|
@@ -2712,7 +2690,7 @@ var buttonSizeStyles = {
|
|
|
2712
2690
|
|
|
2713
2691
|
// src/components/Icon/Icon.tsx
|
|
2714
2692
|
var import_type_guards11 = require("@wistia/type-guards");
|
|
2715
|
-
var
|
|
2693
|
+
var import_styled_components18 = __toESM(require("styled-components"));
|
|
2716
2694
|
|
|
2717
2695
|
// src/components/Icon/icons/AbTestIcon.tsx
|
|
2718
2696
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
@@ -6477,7 +6455,7 @@ var iconSizeMap = {
|
|
|
6477
6455
|
xl: "32",
|
|
6478
6456
|
xxl: "48"
|
|
6479
6457
|
};
|
|
6480
|
-
var StyledIcon =
|
|
6458
|
+
var StyledIcon = import_styled_components18.default.svg`
|
|
6481
6459
|
${({ $colorScheme }) => getColorScheme($colorScheme ?? "inherit")}
|
|
6482
6460
|
`;
|
|
6483
6461
|
var Icon = ({
|
|
@@ -6528,7 +6506,7 @@ Icon.displayName = "Icon";
|
|
|
6528
6506
|
// src/components/Link/Link.tsx
|
|
6529
6507
|
var import_react11 = require("react");
|
|
6530
6508
|
var import_type_guards12 = require("@wistia/type-guards");
|
|
6531
|
-
var
|
|
6509
|
+
var import_styled_components19 = __toESM(require("styled-components"));
|
|
6532
6510
|
var import_react_router_dom = require("react-router-dom");
|
|
6533
6511
|
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
6534
6512
|
var generateHref = (href, type, disabled) => {
|
|
@@ -6546,7 +6524,7 @@ var generateHref = (href, type, disabled) => {
|
|
|
6546
6524
|
};
|
|
6547
6525
|
var isButton = (props) => (0, import_type_guards12.isUndefined)(props.href);
|
|
6548
6526
|
var isLink = (props) => (0, import_type_guards12.isNotUndefined)(props.href);
|
|
6549
|
-
var StyledLink =
|
|
6527
|
+
var StyledLink = import_styled_components19.default.a`
|
|
6550
6528
|
--link-icon-size: 14px;
|
|
6551
6529
|
|
|
6552
6530
|
${({ href }) => (0, import_type_guards12.isNil)(href) && buttonResetCss};
|
|
@@ -6660,16 +6638,17 @@ Link.displayName = "Link";
|
|
|
6660
6638
|
// src/components/Button/Button.tsx
|
|
6661
6639
|
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
6662
6640
|
var isLink2 = (props) => (0, import_type_guards13.isNotUndefined)(props.href);
|
|
6663
|
-
var StyledButton =
|
|
6641
|
+
var StyledButton = import_styled_components20.default.button`
|
|
6664
6642
|
${buttonResetCss}
|
|
6665
6643
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
6666
6644
|
${({ $size }) => buttonSizeStyles[$size]}
|
|
6667
6645
|
${({ $variant }) => buttonVariantsStyles[$variant]}
|
|
6668
6646
|
${({ $unstyled }) => !$unstyled && buttonBaseStyles}
|
|
6669
6647
|
${({ $fullWidth }) => $fullWidth && "width: 100%;"}
|
|
6648
|
+
position: relative;
|
|
6670
6649
|
text-align: center;
|
|
6671
6650
|
`;
|
|
6672
|
-
var StyledButtonContent =
|
|
6651
|
+
var StyledButtonContent = import_styled_components20.default.div`
|
|
6673
6652
|
align-items: center;
|
|
6674
6653
|
display: inline-flex;
|
|
6675
6654
|
flex-grow: 1;
|
|
@@ -6681,10 +6660,10 @@ var StyledButtonContent = import_styled_components21.default.div`
|
|
|
6681
6660
|
${({ $hasLeftIcon }) => $hasLeftIcon && "padding-left: 0;"}
|
|
6682
6661
|
${({ $hasRightIcon }) => $hasRightIcon && "padding-right: 0;"}
|
|
6683
6662
|
`;
|
|
6684
|
-
var StyledButtonContentLabel =
|
|
6663
|
+
var StyledButtonContentLabel = import_styled_components20.default.span`
|
|
6685
6664
|
flex: 1;
|
|
6686
6665
|
`;
|
|
6687
|
-
var StyledButtonLoading =
|
|
6666
|
+
var StyledButtonLoading = import_styled_components20.default.div`
|
|
6688
6667
|
position: absolute;
|
|
6689
6668
|
display: flex;
|
|
6690
6669
|
`;
|
|
@@ -6797,7 +6776,7 @@ Button.displayName = "Button";
|
|
|
6797
6776
|
|
|
6798
6777
|
// src/components/ActionButton/ActionButton.tsx
|
|
6799
6778
|
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
6800
|
-
var StyledActionButton = (0,
|
|
6779
|
+
var StyledActionButton = (0, import_styled_components21.default)(Button)`
|
|
6801
6780
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6802
6781
|
display: grid;
|
|
6803
6782
|
grid-template-columns: 24px 1fr;
|
|
@@ -6840,7 +6819,7 @@ var StyledActionButton = (0, import_styled_components22.default)(Button)`
|
|
|
6840
6819
|
}
|
|
6841
6820
|
}
|
|
6842
6821
|
`;
|
|
6843
|
-
var StyledMainIcon =
|
|
6822
|
+
var StyledMainIcon = import_styled_components21.default.div`
|
|
6844
6823
|
grid-column: 1;
|
|
6845
6824
|
grid-row: 1;
|
|
6846
6825
|
width: 24px;
|
|
@@ -6854,7 +6833,7 @@ var StyledMainIcon = import_styled_components22.default.div`
|
|
|
6854
6833
|
}
|
|
6855
6834
|
}
|
|
6856
6835
|
`;
|
|
6857
|
-
var StyledSecondaryIcon =
|
|
6836
|
+
var StyledSecondaryIcon = import_styled_components21.default.div`
|
|
6858
6837
|
grid-column: 2;
|
|
6859
6838
|
grid-row: 1;
|
|
6860
6839
|
width: 100%;
|
|
@@ -6862,7 +6841,7 @@ var StyledSecondaryIcon = import_styled_components22.default.div`
|
|
|
6862
6841
|
justify-content: flex-end;
|
|
6863
6842
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease-in);
|
|
6864
6843
|
|
|
6865
|
-
${({ $hideUntilHover }) => $hideUntilHover &&
|
|
6844
|
+
${({ $hideUntilHover }) => $hideUntilHover && import_styled_components21.css`
|
|
6866
6845
|
will-change: transform;
|
|
6867
6846
|
opacity: 0;
|
|
6868
6847
|
transform: translateX(-16px);
|
|
@@ -6880,7 +6859,7 @@ var StyledSecondaryIcon = import_styled_components22.default.div`
|
|
|
6880
6859
|
}
|
|
6881
6860
|
}
|
|
6882
6861
|
`;
|
|
6883
|
-
var StyledLabel =
|
|
6862
|
+
var StyledLabel = import_styled_components21.default.span`
|
|
6884
6863
|
font-family: var(--wui-typography-heading-4-family);
|
|
6885
6864
|
font-size: var(--wui-typography-heading-4-size);
|
|
6886
6865
|
font-weight: var(--wui-typography-heading-4-weight);
|
|
@@ -6936,10 +6915,10 @@ ActionButton.displayName = "ActionButton";
|
|
|
6936
6915
|
// src/components/Avatar/Avatar.tsx
|
|
6937
6916
|
var import_react14 = require("react");
|
|
6938
6917
|
var import_type_guards15 = require("@wistia/type-guards");
|
|
6939
|
-
var
|
|
6918
|
+
var import_styled_components23 = __toESM(require("styled-components"));
|
|
6940
6919
|
|
|
6941
6920
|
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
6942
|
-
var
|
|
6921
|
+
var import_styled_components22 = __toESM(require("styled-components"));
|
|
6943
6922
|
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
6944
6923
|
var colorSchemeOptions = [
|
|
6945
6924
|
"inherit",
|
|
@@ -6958,7 +6937,7 @@ var colorSchemeOptions = [
|
|
|
6958
6937
|
"vendor-marketo",
|
|
6959
6938
|
"vendor-pardot"
|
|
6960
6939
|
];
|
|
6961
|
-
var StyledColorSchemeWrapper =
|
|
6940
|
+
var StyledColorSchemeWrapper = import_styled_components22.default.div`
|
|
6962
6941
|
${({ $colorScheme, $nav }) => getColorScheme($nav ? "nav" : $colorScheme)};
|
|
6963
6942
|
`;
|
|
6964
6943
|
var ColorSchemeWrapper = ({
|
|
@@ -6993,7 +6972,7 @@ var formatNameForDisplay = (name) => {
|
|
|
6993
6972
|
|
|
6994
6973
|
// src/components/Avatar/Avatar.tsx
|
|
6995
6974
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
6996
|
-
var AvatarImage =
|
|
6975
|
+
var AvatarImage = import_styled_components23.default.img`
|
|
6997
6976
|
align-items: center;
|
|
6998
6977
|
background-color: white;
|
|
6999
6978
|
border-radius: 50%;
|
|
@@ -7021,7 +7000,7 @@ var avatarSizeMap = {
|
|
|
7021
7000
|
lg: 32
|
|
7022
7001
|
};
|
|
7023
7002
|
var fontSizeScaleMultiplier = 0.55;
|
|
7024
|
-
var InitialsContainer =
|
|
7003
|
+
var InitialsContainer = import_styled_components23.default.div`
|
|
7025
7004
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7026
7005
|
align-items: center;
|
|
7027
7006
|
background-color: var(--wui-color-bg-fill);
|
|
@@ -7043,7 +7022,7 @@ var InitialsContainer = import_styled_components24.default.div`
|
|
|
7043
7022
|
box-shadow: inset 0 0 0 2px rgb(0 0 0 / 50%);
|
|
7044
7023
|
}
|
|
7045
7024
|
`;
|
|
7046
|
-
var AvatarWrapper =
|
|
7025
|
+
var AvatarWrapper = import_styled_components23.default.div`
|
|
7047
7026
|
max-height: ${({ $maxHeight }) => $maxHeight}px;
|
|
7048
7027
|
`;
|
|
7049
7028
|
var chooseColorScheme = (name) => {
|
|
@@ -7110,10 +7089,10 @@ Avatar.displayName = "Avatar";
|
|
|
7110
7089
|
|
|
7111
7090
|
// src/components/Badge/Badge.tsx
|
|
7112
7091
|
var import_react15 = require("react");
|
|
7113
|
-
var
|
|
7092
|
+
var import_styled_components24 = __toESM(require("styled-components"));
|
|
7114
7093
|
var import_type_guards16 = require("@wistia/type-guards");
|
|
7115
7094
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
7116
|
-
var StyledBadge =
|
|
7095
|
+
var StyledBadge = import_styled_components24.default.div`
|
|
7117
7096
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7118
7097
|
align-items: center;
|
|
7119
7098
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -7155,7 +7134,7 @@ Badge.displayName = "Badge";
|
|
|
7155
7134
|
|
|
7156
7135
|
// src/components/Box/Box.tsx
|
|
7157
7136
|
var import_react16 = require("react");
|
|
7158
|
-
var
|
|
7137
|
+
var import_styled_components25 = __toESM(require("styled-components"));
|
|
7159
7138
|
var import_type_guards17 = require("@wistia/type-guards");
|
|
7160
7139
|
|
|
7161
7140
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
@@ -7207,7 +7186,7 @@ var getFillViewportStyle = (fillViewport) => {
|
|
|
7207
7186
|
}
|
|
7208
7187
|
return void 0;
|
|
7209
7188
|
};
|
|
7210
|
-
var StyledBoxComponent =
|
|
7189
|
+
var StyledBoxComponent = import_styled_components25.default.div`
|
|
7211
7190
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
7212
7191
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
7213
7192
|
align-self: ${({ $alignSelf }) => $alignSelf ?? null};
|
|
@@ -7294,9 +7273,9 @@ var Box = makePolymorphic(BoxComponent);
|
|
|
7294
7273
|
|
|
7295
7274
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
7296
7275
|
var import_react17 = require("react");
|
|
7297
|
-
var
|
|
7276
|
+
var import_styled_components26 = __toESM(require("styled-components"));
|
|
7298
7277
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
7299
|
-
var StyledBreadcrumbs =
|
|
7278
|
+
var StyledBreadcrumbs = import_styled_components26.default.nav`
|
|
7300
7279
|
display: flex;
|
|
7301
7280
|
align-items: center;
|
|
7302
7281
|
gap: var(--wui-space-01);
|
|
@@ -7341,9 +7320,9 @@ var Breadcrumbs = ({ children, ...props }) => {
|
|
|
7341
7320
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
7342
7321
|
|
|
7343
7322
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
7344
|
-
var
|
|
7323
|
+
var import_styled_components27 = __toESM(require("styled-components"));
|
|
7345
7324
|
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
7346
|
-
var BreadcrumbContent =
|
|
7325
|
+
var BreadcrumbContent = import_styled_components27.default.span`
|
|
7347
7326
|
overflow: hidden;
|
|
7348
7327
|
white-space: nowrap;
|
|
7349
7328
|
display: block;
|
|
@@ -7375,7 +7354,7 @@ var Breadcrumb = ({ icon, href, children, ...props }) => {
|
|
|
7375
7354
|
};
|
|
7376
7355
|
|
|
7377
7356
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
7378
|
-
var
|
|
7357
|
+
var import_styled_components28 = __toESM(require("styled-components"));
|
|
7379
7358
|
var import_type_guards18 = require("@wistia/type-guards");
|
|
7380
7359
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
7381
7360
|
var getAlignment = (align) => {
|
|
@@ -7390,7 +7369,7 @@ var getAlignment = (align) => {
|
|
|
7390
7369
|
}
|
|
7391
7370
|
return "flex-start";
|
|
7392
7371
|
};
|
|
7393
|
-
var ButtonGroupComponent =
|
|
7372
|
+
var ButtonGroupComponent = import_styled_components28.default.div`
|
|
7394
7373
|
display: flex;
|
|
7395
7374
|
|
|
7396
7375
|
/* this helps ensure that primary buttons appear at the top of the column */
|
|
@@ -7439,9 +7418,9 @@ var ButtonGroup = ({
|
|
|
7439
7418
|
ButtonGroup.displayName = "ButtonGroup";
|
|
7440
7419
|
|
|
7441
7420
|
// src/components/Card/Card.tsx
|
|
7442
|
-
var
|
|
7421
|
+
var import_styled_components29 = __toESM(require("styled-components"));
|
|
7443
7422
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
7444
|
-
var StyledCard = (0,
|
|
7423
|
+
var StyledCard = (0, import_styled_components29.default)(Box)`
|
|
7445
7424
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7446
7425
|
box-sizing: border-box;
|
|
7447
7426
|
padding: ${({ $paddingSize }) => `var(--wui-${$paddingSize})`};
|
|
@@ -7492,53 +7471,53 @@ Card.displayName = "Card";
|
|
|
7492
7471
|
// src/components/Checkbox/Checkbox.tsx
|
|
7493
7472
|
var import_react19 = require("react");
|
|
7494
7473
|
var import_react_checkbox = require("@radix-ui/react-checkbox");
|
|
7495
|
-
var
|
|
7474
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
7496
7475
|
var import_type_guards20 = require("@wistia/type-guards");
|
|
7497
7476
|
|
|
7498
7477
|
// src/components/Label/Label.tsx
|
|
7499
|
-
var
|
|
7478
|
+
var import_styled_components31 = __toESM(require("styled-components"));
|
|
7500
7479
|
|
|
7501
7480
|
// src/components/Heading/Heading.tsx
|
|
7502
7481
|
var import_react18 = require("react");
|
|
7503
|
-
var
|
|
7482
|
+
var import_styled_components30 = __toESM(require("styled-components"));
|
|
7504
7483
|
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
7505
|
-
var heroStyle =
|
|
7484
|
+
var heroStyle = import_styled_components30.css`
|
|
7506
7485
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
7507
7486
|
--font-size: var(--wui-typography-heading-hero-size);
|
|
7508
7487
|
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
7509
7488
|
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
7510
7489
|
`;
|
|
7511
|
-
var heading1TextStyle =
|
|
7490
|
+
var heading1TextStyle = import_styled_components30.css`
|
|
7512
7491
|
--font-family: var(--wui-typography-heading-1-family);
|
|
7513
7492
|
--font-size: var(--wui-typography-heading-1-size);
|
|
7514
7493
|
--font-weight: var(--wui-typography-heading-1-weight);
|
|
7515
7494
|
--line-height: var(--wui-typography-heading-1-line-height);
|
|
7516
7495
|
`;
|
|
7517
|
-
var heading2TextStyle =
|
|
7496
|
+
var heading2TextStyle = import_styled_components30.css`
|
|
7518
7497
|
--font-family: var(--wui-typography-heading-2-family);
|
|
7519
7498
|
--font-size: var(--wui-typography-heading-2-size);
|
|
7520
7499
|
--font-weight: var(--wui-typography-heading-2-weight);
|
|
7521
7500
|
--line-height: var(--wui-typography-heading-2-line-height);
|
|
7522
7501
|
`;
|
|
7523
|
-
var heading3TextStyle =
|
|
7502
|
+
var heading3TextStyle = import_styled_components30.css`
|
|
7524
7503
|
--font-family: var(--wui-typography-heading-3-family);
|
|
7525
7504
|
--font-size: var(--wui-typography-heading-3-size);
|
|
7526
7505
|
--font-weight: var(--wui-typography-heading-3-weight);
|
|
7527
7506
|
--line-height: var(--wui-typography-heading-3-line-height);
|
|
7528
7507
|
`;
|
|
7529
|
-
var heading4TextStyle =
|
|
7508
|
+
var heading4TextStyle = import_styled_components30.css`
|
|
7530
7509
|
--font-family: var(--wui-typography-heading-4-family);
|
|
7531
7510
|
--font-size: var(--wui-typography-heading-4-size);
|
|
7532
7511
|
--font-weight: var(--wui-typography-heading-4-weight);
|
|
7533
7512
|
--line-height: var(--wui-typography-heading-4-line-height);
|
|
7534
7513
|
`;
|
|
7535
|
-
var heading5TextStyle =
|
|
7514
|
+
var heading5TextStyle = import_styled_components30.css`
|
|
7536
7515
|
--font-family: var(--wui-typography-heading-5-family);
|
|
7537
7516
|
--font-size: var(--wui-typography-heading-5-size);
|
|
7538
7517
|
--font-weight: var(--wui-typography-heading-5-weight);
|
|
7539
7518
|
--line-height: var(--wui-typography-heading-5-line-height);
|
|
7540
7519
|
`;
|
|
7541
|
-
var heading6TextStyle =
|
|
7520
|
+
var heading6TextStyle = import_styled_components30.css`
|
|
7542
7521
|
--font-family: var(--wui-typography-heading-6-family);
|
|
7543
7522
|
--font-size: var(--wui-typography-heading-6-size);
|
|
7544
7523
|
--font-weight: var(--wui-typography-heading-6-weight);
|
|
@@ -7554,7 +7533,7 @@ var variantStyleMap = {
|
|
|
7554
7533
|
heading6: heading6TextStyle
|
|
7555
7534
|
};
|
|
7556
7535
|
var DEFAULT_ELEMENT2 = "h1";
|
|
7557
|
-
var StyledHeading =
|
|
7536
|
+
var StyledHeading = import_styled_components30.default.div`
|
|
7558
7537
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7559
7538
|
font-family: var(--font-family);
|
|
7560
7539
|
font-size: var(--font-size);
|
|
@@ -7563,16 +7542,16 @@ var StyledHeading = import_styled_components31.default.div`
|
|
|
7563
7542
|
color: var(--wui-color-text);
|
|
7564
7543
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
7565
7544
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
7566
|
-
${({ $inline }) => $inline &&
|
|
7545
|
+
${({ $inline }) => $inline && import_styled_components30.css`
|
|
7567
7546
|
display: inline-block;
|
|
7568
7547
|
`}
|
|
7569
|
-
${({ $disabled }) => $disabled &&
|
|
7548
|
+
${({ $disabled }) => $disabled && import_styled_components30.css`
|
|
7570
7549
|
color: var(--wui-color-text-disabled);
|
|
7571
7550
|
`}
|
|
7572
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
7551
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components30.css`
|
|
7573
7552
|
user-select: none;
|
|
7574
7553
|
`}
|
|
7575
|
-
${({ $align }) =>
|
|
7554
|
+
${({ $align }) => import_styled_components30.css`
|
|
7576
7555
|
text-align: ${$align};
|
|
7577
7556
|
`}
|
|
7578
7557
|
margin: 0;
|
|
@@ -7618,7 +7597,7 @@ var Heading = makePolymorphic(HeadingComponent);
|
|
|
7618
7597
|
|
|
7619
7598
|
// src/components/Label/Label.tsx
|
|
7620
7599
|
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
7621
|
-
var requiredStyle =
|
|
7600
|
+
var requiredStyle = import_styled_components31.css`
|
|
7622
7601
|
&::after {
|
|
7623
7602
|
color: var(--wui-color-text-error);
|
|
7624
7603
|
display: inline;
|
|
@@ -7626,10 +7605,10 @@ var requiredStyle = import_styled_components32.css`
|
|
|
7626
7605
|
content: '*';
|
|
7627
7606
|
}
|
|
7628
7607
|
`;
|
|
7629
|
-
var disabledStyle =
|
|
7608
|
+
var disabledStyle = import_styled_components31.css`
|
|
7630
7609
|
color: var(--wui-color-text-disabled);
|
|
7631
7610
|
`;
|
|
7632
|
-
var StyledLabel2 = (0,
|
|
7611
|
+
var StyledLabel2 = (0, import_styled_components31.default)(Heading).attrs({
|
|
7633
7612
|
variant: "heading6",
|
|
7634
7613
|
renderAs: "label"
|
|
7635
7614
|
})`
|
|
@@ -7672,10 +7651,10 @@ var Label = ({
|
|
|
7672
7651
|
Label.displayName = "Label";
|
|
7673
7652
|
|
|
7674
7653
|
// src/components/Label/LabelDescription.tsx
|
|
7675
|
-
var
|
|
7654
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
7676
7655
|
var import_type_guards19 = require("@wistia/type-guards");
|
|
7677
7656
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
7678
|
-
var StyledLabelDescription =
|
|
7657
|
+
var StyledLabelDescription = import_styled_components32.default.div`
|
|
7679
7658
|
color: var(--wui-color-text-secondary);
|
|
7680
7659
|
font-size: var(--wui-typography-body-4-size);
|
|
7681
7660
|
font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -7711,7 +7690,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
|
7711
7690
|
)
|
|
7712
7691
|
}
|
|
7713
7692
|
);
|
|
7714
|
-
var StyledCheckboxWrapper =
|
|
7693
|
+
var StyledCheckboxWrapper = import_styled_components33.default.div`
|
|
7715
7694
|
display: flex;
|
|
7716
7695
|
align-items: center;
|
|
7717
7696
|
cursor: pointer;
|
|
@@ -7725,7 +7704,7 @@ var StyledCheckboxWrapper = import_styled_components34.default.div`
|
|
|
7725
7704
|
background-color: #efefef;
|
|
7726
7705
|
}
|
|
7727
7706
|
`;
|
|
7728
|
-
var StyledCheckboxRoot = (0,
|
|
7707
|
+
var StyledCheckboxRoot = (0, import_styled_components33.default)(import_react_checkbox.Root)`
|
|
7729
7708
|
all: unset; /* CheckboxRoot renders as a button element, so we need to reset all styles */
|
|
7730
7709
|
background-color: var(--wui-color-bg-fill-white);
|
|
7731
7710
|
min-width: 16px;
|
|
@@ -7759,10 +7738,10 @@ var StyledCheckboxRoot = (0, import_styled_components34.default)(import_react_ch
|
|
|
7759
7738
|
/* TODO Lamp to design focus state */
|
|
7760
7739
|
}
|
|
7761
7740
|
`;
|
|
7762
|
-
var StyledCheckboxIndicator = (0,
|
|
7741
|
+
var StyledCheckboxIndicator = (0, import_styled_components33.default)(import_react_checkbox.Indicator)`
|
|
7763
7742
|
display: flex;
|
|
7764
7743
|
`;
|
|
7765
|
-
var StyledLabelWrapper =
|
|
7744
|
+
var StyledLabelWrapper = import_styled_components33.default.div`
|
|
7766
7745
|
display: flex;
|
|
7767
7746
|
flex-direction: column;
|
|
7768
7747
|
margin-left: var(--wui-space-02);
|
|
@@ -7832,9 +7811,9 @@ Checkbox.displayName = "Checkbox";
|
|
|
7832
7811
|
// src/components/Collapsible/Collapsible.tsx
|
|
7833
7812
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
7834
7813
|
var import_type_guards21 = require("@wistia/type-guards");
|
|
7835
|
-
var
|
|
7814
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7836
7815
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
7837
|
-
var StyledRoot = (0,
|
|
7816
|
+
var StyledRoot = (0, import_styled_components34.default)(import_react_collapsible.Root)`
|
|
7838
7817
|
&[data-state='closed'] [data-wui-collapsible-content] {
|
|
7839
7818
|
display: -webkit-box;
|
|
7840
7819
|
-webkit-box-orient: vertical;
|
|
@@ -7864,11 +7843,11 @@ var CollapsibleTrigger = ({ children }) => {
|
|
|
7864
7843
|
};
|
|
7865
7844
|
|
|
7866
7845
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
7867
|
-
var
|
|
7846
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
7868
7847
|
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
7869
7848
|
var import_type_guards22 = require("@wistia/type-guards");
|
|
7870
7849
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
7871
|
-
var ClampedContent =
|
|
7850
|
+
var ClampedContent = import_styled_components35.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
7872
7851
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
7873
7852
|
`;
|
|
7874
7853
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
@@ -7882,10 +7861,10 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
7882
7861
|
};
|
|
7883
7862
|
|
|
7884
7863
|
// src/components/DataCards/DataCard.tsx
|
|
7885
|
-
var
|
|
7864
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
7886
7865
|
var import_type_guards23 = require("@wistia/type-guards");
|
|
7887
7866
|
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
7888
|
-
var StyledDataCard =
|
|
7867
|
+
var StyledDataCard = import_styled_components36.default.div`
|
|
7889
7868
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
7890
7869
|
display: grid;
|
|
7891
7870
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -7898,7 +7877,7 @@ var StyledDataCard = import_styled_components37.default.div`
|
|
|
7898
7877
|
border-radius: var(--wui-border-radius-02);
|
|
7899
7878
|
position: relative;
|
|
7900
7879
|
`;
|
|
7901
|
-
var shimmer =
|
|
7880
|
+
var shimmer = import_styled_components36.keyframes`
|
|
7902
7881
|
0% {
|
|
7903
7882
|
background-position: 200% 0;
|
|
7904
7883
|
}
|
|
@@ -7906,7 +7885,7 @@ var shimmer = import_styled_components37.keyframes`
|
|
|
7906
7885
|
background-position: -200% 0;
|
|
7907
7886
|
}
|
|
7908
7887
|
`;
|
|
7909
|
-
var LoadingBackground =
|
|
7888
|
+
var LoadingBackground = import_styled_components36.default.div`
|
|
7910
7889
|
background: linear-gradient(
|
|
7911
7890
|
90deg,
|
|
7912
7891
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -7917,27 +7896,27 @@ var LoadingBackground = import_styled_components37.default.div`
|
|
|
7917
7896
|
animation: ${shimmer} 1.5s infinite;
|
|
7918
7897
|
border-radius: var(--wui-border-radius-01);
|
|
7919
7898
|
`;
|
|
7920
|
-
var StyledLoadingLabel = (0,
|
|
7899
|
+
var StyledLoadingLabel = (0, import_styled_components36.default)(LoadingBackground)`
|
|
7921
7900
|
width: 80px;
|
|
7922
7901
|
height: var(--wui-typography-heading-6-line-height);
|
|
7923
7902
|
`;
|
|
7924
|
-
var StyledLoadingValue = (0,
|
|
7903
|
+
var StyledLoadingValue = (0, import_styled_components36.default)(LoadingBackground)`
|
|
7925
7904
|
width: 90%;
|
|
7926
7905
|
height: var(--wui-typography-heading-3-line-height);
|
|
7927
7906
|
`;
|
|
7928
|
-
var StyledLabel3 = (0,
|
|
7907
|
+
var StyledLabel3 = (0, import_styled_components36.default)(Heading)`
|
|
7929
7908
|
grid-area: label;
|
|
7930
7909
|
`;
|
|
7931
|
-
var StyledValue = (0,
|
|
7910
|
+
var StyledValue = (0, import_styled_components36.default)(Heading)`
|
|
7932
7911
|
grid-area: value;
|
|
7933
7912
|
`;
|
|
7934
|
-
var StyledSlot =
|
|
7913
|
+
var StyledSlot = import_styled_components36.default.div`
|
|
7935
7914
|
display: flex;
|
|
7936
7915
|
justify-content: flex-end;
|
|
7937
7916
|
grid-area: slot;
|
|
7938
7917
|
align-self: center;
|
|
7939
7918
|
`;
|
|
7940
|
-
var StyledDataCardTrendContainer =
|
|
7919
|
+
var StyledDataCardTrendContainer = import_styled_components36.default.div`
|
|
7941
7920
|
position: absolute;
|
|
7942
7921
|
bottom: var(--wui-space-01);
|
|
7943
7922
|
right: var(--wui-space-01);
|
|
@@ -7980,9 +7959,9 @@ var DataCard = ({
|
|
|
7980
7959
|
DataCard.displayName = "DataCard";
|
|
7981
7960
|
|
|
7982
7961
|
// src/components/DataCards/DataCards.tsx
|
|
7983
|
-
var
|
|
7962
|
+
var import_styled_components37 = __toESM(require("styled-components"));
|
|
7984
7963
|
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
7985
|
-
var StyledDataCards = (0,
|
|
7964
|
+
var StyledDataCards = (0, import_styled_components37.default)(Box)`
|
|
7986
7965
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7987
7966
|
margin-top: 0; /* Remove default <dl> style */
|
|
7988
7967
|
> * {
|
|
@@ -8014,25 +7993,25 @@ var DataCards = ({
|
|
|
8014
7993
|
DataCards.displayName = "DataCards";
|
|
8015
7994
|
|
|
8016
7995
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8017
|
-
var
|
|
7996
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
8018
7997
|
|
|
8019
7998
|
// src/components/Text/Text.tsx
|
|
8020
7999
|
var import_react21 = require("react");
|
|
8021
|
-
var
|
|
8000
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
8022
8001
|
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8023
|
-
var bodyBoldStyles =
|
|
8002
|
+
var bodyBoldStyles = import_styled_components38.css`
|
|
8024
8003
|
> strong,
|
|
8025
8004
|
b {
|
|
8026
8005
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
8027
8006
|
}
|
|
8028
8007
|
`;
|
|
8029
|
-
var labelBoldStyles =
|
|
8008
|
+
var labelBoldStyles = import_styled_components38.css`
|
|
8030
8009
|
> strong,
|
|
8031
8010
|
b {
|
|
8032
8011
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
8033
8012
|
}
|
|
8034
8013
|
`;
|
|
8035
|
-
var body1TextStyle =
|
|
8014
|
+
var body1TextStyle = import_styled_components38.css`
|
|
8036
8015
|
--font-family: var(--wui-typography-body-1-family);
|
|
8037
8016
|
--font-size: var(--wui-typography-body-1-size);
|
|
8038
8017
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
@@ -8040,7 +8019,7 @@ var body1TextStyle = import_styled_components39.css`
|
|
|
8040
8019
|
--paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
|
|
8041
8020
|
${bodyBoldStyles}
|
|
8042
8021
|
`;
|
|
8043
|
-
var body2TextStyle =
|
|
8022
|
+
var body2TextStyle = import_styled_components38.css`
|
|
8044
8023
|
--font-family: var(--wui-typography-body-2-family);
|
|
8045
8024
|
--font-size: var(--wui-typography-body-2-size);
|
|
8046
8025
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -8048,7 +8027,7 @@ var body2TextStyle = import_styled_components39.css`
|
|
|
8048
8027
|
--paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
|
|
8049
8028
|
${bodyBoldStyles}
|
|
8050
8029
|
`;
|
|
8051
|
-
var body3TextStyle =
|
|
8030
|
+
var body3TextStyle = import_styled_components38.css`
|
|
8052
8031
|
--font-family: var(--wui-typography-body-3-family);
|
|
8053
8032
|
--font-size: var(--wui-typography-body-3-size);
|
|
8054
8033
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
@@ -8056,7 +8035,7 @@ var body3TextStyle = import_styled_components39.css`
|
|
|
8056
8035
|
--paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
|
|
8057
8036
|
${bodyBoldStyles}
|
|
8058
8037
|
`;
|
|
8059
|
-
var body4TextStyle =
|
|
8038
|
+
var body4TextStyle = import_styled_components38.css`
|
|
8060
8039
|
--font-family: var(--wui-typography-body-4-family);
|
|
8061
8040
|
--font-size: var(--wui-typography-body-4-size);
|
|
8062
8041
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -8064,47 +8043,47 @@ var body4TextStyle = import_styled_components39.css`
|
|
|
8064
8043
|
--paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
|
|
8065
8044
|
${bodyBoldStyles}
|
|
8066
8045
|
`;
|
|
8067
|
-
var label1TextStyle =
|
|
8046
|
+
var label1TextStyle = import_styled_components38.css`
|
|
8068
8047
|
--font-family: var(--wui-typography-label-1-family);
|
|
8069
8048
|
--font-size: var(--wui-typography-label-1-size);
|
|
8070
8049
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
8071
8050
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
8072
8051
|
${labelBoldStyles}
|
|
8073
8052
|
`;
|
|
8074
|
-
var label2TextStyle =
|
|
8053
|
+
var label2TextStyle = import_styled_components38.css`
|
|
8075
8054
|
--font-family: var(--wui-typography-label-2-family);
|
|
8076
8055
|
--font-size: var(--wui-typography-label-2-size);
|
|
8077
8056
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
8078
8057
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
8079
8058
|
${labelBoldStyles}
|
|
8080
8059
|
`;
|
|
8081
|
-
var label3TextStyle =
|
|
8060
|
+
var label3TextStyle = import_styled_components38.css`
|
|
8082
8061
|
--font-family: var(--wui-typography-label-3-family);
|
|
8083
8062
|
--font-size: var(--wui-typography-label-3-size);
|
|
8084
8063
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
8085
8064
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
8086
8065
|
${labelBoldStyles}
|
|
8087
8066
|
`;
|
|
8088
|
-
var label4TextStyle =
|
|
8067
|
+
var label4TextStyle = import_styled_components38.css`
|
|
8089
8068
|
--font-family: var(--wui-typography-label-4-family);
|
|
8090
8069
|
--font-size: var(--wui-typography-label-4-size);
|
|
8091
8070
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
8092
8071
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
8093
8072
|
${labelBoldStyles}
|
|
8094
8073
|
`;
|
|
8095
|
-
var body1MonoTextStyle =
|
|
8074
|
+
var body1MonoTextStyle = import_styled_components38.css`
|
|
8096
8075
|
${body1TextStyle};
|
|
8097
8076
|
--font-family: var(--wui-typography-family-mono);
|
|
8098
8077
|
`;
|
|
8099
|
-
var body2MonoTextStyle =
|
|
8078
|
+
var body2MonoTextStyle = import_styled_components38.css`
|
|
8100
8079
|
${body2TextStyle};
|
|
8101
8080
|
--font-family: var(--wui-typography-family-mono);
|
|
8102
8081
|
`;
|
|
8103
|
-
var body3MonoTextStyle =
|
|
8082
|
+
var body3MonoTextStyle = import_styled_components38.css`
|
|
8104
8083
|
${body3TextStyle};
|
|
8105
8084
|
--font-family: var(--wui-typography-family-mono);
|
|
8106
8085
|
`;
|
|
8107
|
-
var body4MonoTextStyle =
|
|
8086
|
+
var body4MonoTextStyle = import_styled_components38.css`
|
|
8108
8087
|
${body4TextStyle};
|
|
8109
8088
|
--font-family: var(--wui-typography-family-mono);
|
|
8110
8089
|
`;
|
|
@@ -8139,7 +8118,7 @@ var variantElementMap2 = {
|
|
|
8139
8118
|
label3: labelElement,
|
|
8140
8119
|
label4: labelElement
|
|
8141
8120
|
};
|
|
8142
|
-
var StyledText =
|
|
8121
|
+
var StyledText = import_styled_components38.default.div`
|
|
8143
8122
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8144
8123
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
8145
8124
|
if ($disabled) {
|
|
@@ -8163,19 +8142,19 @@ var StyledText = import_styled_components39.default.div`
|
|
|
8163
8142
|
margin: 0;
|
|
8164
8143
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
8165
8144
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8166
|
-
${({ $inline }) => $inline &&
|
|
8145
|
+
${({ $inline }) => $inline && import_styled_components38.css`
|
|
8167
8146
|
display: inline-block;
|
|
8168
8147
|
`}
|
|
8169
|
-
${({ $disabled }) => $disabled &&
|
|
8148
|
+
${({ $disabled }) => $disabled && import_styled_components38.css`
|
|
8170
8149
|
--text-color: var(--wui-color-text-disabled);
|
|
8171
8150
|
`}
|
|
8172
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8151
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components38.css`
|
|
8173
8152
|
user-select: none;
|
|
8174
8153
|
`}
|
|
8175
|
-
${({ $align }) =>
|
|
8154
|
+
${({ $align }) => import_styled_components38.css`
|
|
8176
8155
|
text-align: ${$align};
|
|
8177
8156
|
`}
|
|
8178
|
-
${({ as }) => as === "p" &&
|
|
8157
|
+
${({ as }) => as === "p" && import_styled_components38.css`
|
|
8179
8158
|
display: block;
|
|
8180
8159
|
|
|
8181
8160
|
+ p {
|
|
@@ -8219,7 +8198,7 @@ var Text = makePolymorphic(TextComponent);
|
|
|
8219
8198
|
|
|
8220
8199
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8221
8200
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8222
|
-
var StyledDataCardTrend =
|
|
8201
|
+
var StyledDataCardTrend = import_styled_components39.default.div`
|
|
8223
8202
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
8224
8203
|
background: var(--wui-color-bg-app);
|
|
8225
8204
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -8255,22 +8234,22 @@ var DataCardTrend = ({
|
|
|
8255
8234
|
};
|
|
8256
8235
|
|
|
8257
8236
|
// src/components/Divider/Divider.tsx
|
|
8258
|
-
var
|
|
8237
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8259
8238
|
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
8260
|
-
var horizontalBorderCss =
|
|
8239
|
+
var horizontalBorderCss = import_styled_components40.css`
|
|
8261
8240
|
border-top-color: var(--wui-color-border);
|
|
8262
8241
|
border-top-style: solid;
|
|
8263
8242
|
border-top-width: 1px;
|
|
8264
8243
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
8265
8244
|
height: 0;
|
|
8266
8245
|
`;
|
|
8267
|
-
var verticalBorderCss =
|
|
8246
|
+
var verticalBorderCss = import_styled_components40.css`
|
|
8268
8247
|
background-color: var(--wui-color-border);
|
|
8269
8248
|
max-width: 1px;
|
|
8270
8249
|
min-height: 100%;
|
|
8271
8250
|
width: 1px;
|
|
8272
8251
|
`;
|
|
8273
|
-
var DividerComponent =
|
|
8252
|
+
var DividerComponent = import_styled_components40.default.div`
|
|
8274
8253
|
${({ $orientation }) => {
|
|
8275
8254
|
switch ($orientation) {
|
|
8276
8255
|
case "vertical":
|
|
@@ -8298,15 +8277,15 @@ var Divider = ({
|
|
|
8298
8277
|
Divider.displayName = "Divider";
|
|
8299
8278
|
|
|
8300
8279
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8301
|
-
var
|
|
8280
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8302
8281
|
var import_react23 = require("react");
|
|
8303
8282
|
|
|
8304
8283
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
8305
|
-
var
|
|
8284
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8306
8285
|
var import_type_guards24 = require("@wistia/type-guards");
|
|
8307
8286
|
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8308
|
-
var VisuallyHidden =
|
|
8309
|
-
var VisuallyHiddenButFocusable =
|
|
8287
|
+
var VisuallyHidden = import_styled_components41.default.div({ ...visuallyHiddenStyle });
|
|
8288
|
+
var VisuallyHiddenButFocusable = import_styled_components41.default.div({
|
|
8310
8289
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
8311
8290
|
});
|
|
8312
8291
|
var ScreenReaderOnly = ({
|
|
@@ -8325,16 +8304,16 @@ ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
|
8325
8304
|
|
|
8326
8305
|
// src/components/Tooltip/Tooltip.tsx
|
|
8327
8306
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8328
|
-
var
|
|
8307
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
8329
8308
|
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
8330
|
-
var CompactTooltipStyles =
|
|
8309
|
+
var CompactTooltipStyles = import_styled_components42.css`
|
|
8331
8310
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8332
8311
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8333
8312
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8334
8313
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8335
8314
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8336
8315
|
`;
|
|
8337
|
-
var StyledContent = (0,
|
|
8316
|
+
var StyledContent = (0, import_styled_components42.default)(import_react_tooltip2.Content)`
|
|
8338
8317
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8339
8318
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8340
8319
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8431,10 +8410,10 @@ Tooltip.displayName = "Tooltip";
|
|
|
8431
8410
|
|
|
8432
8411
|
// src/components/Input/Input.tsx
|
|
8433
8412
|
var import_react22 = require("react");
|
|
8434
|
-
var
|
|
8413
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
8435
8414
|
var import_type_guards25 = require("@wistia/type-guards");
|
|
8436
8415
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
8437
|
-
var inputStyles =
|
|
8416
|
+
var inputStyles = import_styled_components43.css`
|
|
8438
8417
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
8439
8418
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
8440
8419
|
--wui-input-color-border: var(--wui-color-border);
|
|
@@ -8475,7 +8454,7 @@ var inputStyles = import_styled_components44.css`
|
|
|
8475
8454
|
}
|
|
8476
8455
|
}
|
|
8477
8456
|
`;
|
|
8478
|
-
var StyledInputContainer =
|
|
8457
|
+
var StyledInputContainer = import_styled_components43.default.div`
|
|
8479
8458
|
display: inline-flex;
|
|
8480
8459
|
position: relative;
|
|
8481
8460
|
${inputStyles};
|
|
@@ -8594,7 +8573,7 @@ Input.displayName = "Input";
|
|
|
8594
8573
|
|
|
8595
8574
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8596
8575
|
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
8597
|
-
var StyledInput = (0,
|
|
8576
|
+
var StyledInput = (0, import_styled_components44.default)(Input)`
|
|
8598
8577
|
:not([rows]) {
|
|
8599
8578
|
min-height: unset;
|
|
8600
8579
|
}
|
|
@@ -8614,7 +8593,7 @@ var StyledInput = (0, import_styled_components45.default)(Input)`
|
|
|
8614
8593
|
height: ${({ $height }) => `${$height}px`};
|
|
8615
8594
|
}
|
|
8616
8595
|
`;
|
|
8617
|
-
var editableStyles =
|
|
8596
|
+
var editableStyles = import_styled_components44.css`
|
|
8618
8597
|
&:has(+ :focus-within) {
|
|
8619
8598
|
background: var(--wui-color-bg-surface-hover);
|
|
8620
8599
|
}
|
|
@@ -8624,7 +8603,7 @@ var editableStyles = import_styled_components45.css`
|
|
|
8624
8603
|
cursor: pointer;
|
|
8625
8604
|
}
|
|
8626
8605
|
`;
|
|
8627
|
-
var StyledHeading2 = (0,
|
|
8606
|
+
var StyledHeading2 = (0, import_styled_components44.default)(Heading)`
|
|
8628
8607
|
width: 100%;
|
|
8629
8608
|
border-radius: var(--wui-border-radius-02);
|
|
8630
8609
|
padding: var(--wui-space-02);
|
|
@@ -8732,15 +8711,15 @@ var EditableHeading = ({
|
|
|
8732
8711
|
|
|
8733
8712
|
// src/components/Form/Form.tsx
|
|
8734
8713
|
var import_react25 = require("react");
|
|
8735
|
-
var
|
|
8714
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
8736
8715
|
var import_type_guards26 = require("@wistia/type-guards");
|
|
8737
8716
|
|
|
8738
8717
|
// src/components/Stack/Stack.tsx
|
|
8739
8718
|
var import_react24 = require("react");
|
|
8740
|
-
var
|
|
8719
|
+
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8741
8720
|
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
8742
8721
|
var DEFAULT_ELEMENT4 = "div";
|
|
8743
|
-
var StyledStack =
|
|
8722
|
+
var StyledStack = import_styled_components45.default.div`
|
|
8744
8723
|
display: flex;
|
|
8745
8724
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
8746
8725
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
@@ -8766,7 +8745,7 @@ var Stack = makePolymorphic(StackComponent);
|
|
|
8766
8745
|
|
|
8767
8746
|
// src/components/Form/Form.tsx
|
|
8768
8747
|
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
8769
|
-
var StyledForm =
|
|
8748
|
+
var StyledForm = import_styled_components46.default.form`
|
|
8770
8749
|
--form-default-width: 690px;
|
|
8771
8750
|
|
|
8772
8751
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
@@ -8941,20 +8920,20 @@ var FormErrorSummary = ({ description }) => {
|
|
|
8941
8920
|
|
|
8942
8921
|
// src/components/FormField/FormField.tsx
|
|
8943
8922
|
var import_react30 = require("react");
|
|
8944
|
-
var
|
|
8923
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
8945
8924
|
var import_type_guards28 = require("@wistia/type-guards");
|
|
8946
8925
|
|
|
8947
8926
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
8948
8927
|
var import_react29 = require("react");
|
|
8949
8928
|
|
|
8950
8929
|
// src/components/FormGroup/FormGroup.tsx
|
|
8951
|
-
var
|
|
8930
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
8952
8931
|
var import_react28 = require("react");
|
|
8953
8932
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
8954
|
-
var StyledFieldset =
|
|
8933
|
+
var StyledFieldset = import_styled_components47.default.fieldset`
|
|
8955
8934
|
border: 0;
|
|
8956
8935
|
`;
|
|
8957
|
-
var StyledLegend =
|
|
8936
|
+
var StyledLegend = import_styled_components47.default.legend`
|
|
8958
8937
|
margin-bottom: var(--space-01);
|
|
8959
8938
|
`;
|
|
8960
8939
|
var FormGroup = ({ children, label, ...props }) => {
|
|
@@ -9003,7 +8982,7 @@ CheckboxGroup.displayName = "CheckboxGroup";
|
|
|
9003
8982
|
|
|
9004
8983
|
// src/components/FormField/FormField.tsx
|
|
9005
8984
|
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
9006
|
-
var StyledFormField =
|
|
8985
|
+
var StyledFormField = import_styled_components48.default.div`
|
|
9007
8986
|
--form-field-spacing: var(--wui-space-01);
|
|
9008
8987
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
9009
8988
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -9027,7 +9006,7 @@ var StyledFormField = import_styled_components49.default.div`
|
|
|
9027
9006
|
grid-template-rows: 1fr;
|
|
9028
9007
|
}
|
|
9029
9008
|
`;
|
|
9030
|
-
var StyledErrorList =
|
|
9009
|
+
var StyledErrorList = import_styled_components48.default.ul`
|
|
9031
9010
|
margin: 0;
|
|
9032
9011
|
padding: 0;
|
|
9033
9012
|
padding-left: var(--wui-space-04);
|
|
@@ -9153,9 +9132,9 @@ RadioGroup.displayName = "RadioGroup";
|
|
|
9153
9132
|
|
|
9154
9133
|
// src/components/IconButton/IconButton.tsx
|
|
9155
9134
|
var import_react32 = require("react");
|
|
9156
|
-
var
|
|
9135
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9157
9136
|
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
9158
|
-
var StyledButton2 = (0,
|
|
9137
|
+
var StyledButton2 = (0, import_styled_components49.default)(Button)`
|
|
9159
9138
|
--icon-button-size-sm: 24px;
|
|
9160
9139
|
--icon-button-size-md: 32px;
|
|
9161
9140
|
--icon-button-size-lg: 40px;
|
|
@@ -9189,10 +9168,59 @@ var IconButton = (0, import_react32.forwardRef)(
|
|
|
9189
9168
|
);
|
|
9190
9169
|
IconButton.displayName = "IconButton";
|
|
9191
9170
|
|
|
9171
|
+
// src/components/Image/Image.tsx
|
|
9172
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9173
|
+
var import_type_guards29 = require("@wistia/type-guards");
|
|
9174
|
+
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
9175
|
+
var getFillStyle2 = (fillContainer) => {
|
|
9176
|
+
if (fillContainer === "horizontal") {
|
|
9177
|
+
return "width: 100%;";
|
|
9178
|
+
}
|
|
9179
|
+
if (fillContainer === "vertical") {
|
|
9180
|
+
return "height: 100%;";
|
|
9181
|
+
}
|
|
9182
|
+
if (fillContainer === true) {
|
|
9183
|
+
return `
|
|
9184
|
+
width: 100%;
|
|
9185
|
+
height: 100%;
|
|
9186
|
+
`;
|
|
9187
|
+
}
|
|
9188
|
+
return void 0;
|
|
9189
|
+
};
|
|
9190
|
+
var StyledImage = import_styled_components50.default.img`
|
|
9191
|
+
border-radius: ${({ $borderRadius }) => (0, import_type_guards29.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
9192
|
+
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
9193
|
+
object-fit: ${({ $objFit }) => $objFit};
|
|
9194
|
+
object-position: ${({ $objPosition }) => $objPosition};
|
|
9195
|
+
`;
|
|
9196
|
+
var Image = ({
|
|
9197
|
+
src,
|
|
9198
|
+
alt,
|
|
9199
|
+
borderRadius,
|
|
9200
|
+
fill: fillContainer = false,
|
|
9201
|
+
fit: objFit,
|
|
9202
|
+
loading = "lazy",
|
|
9203
|
+
position: objPosition,
|
|
9204
|
+
...otherProps
|
|
9205
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
9206
|
+
StyledImage,
|
|
9207
|
+
{
|
|
9208
|
+
$borderRadius: borderRadius,
|
|
9209
|
+
$fillContainer: fillContainer,
|
|
9210
|
+
$objFit: objFit,
|
|
9211
|
+
$objPosition: objPosition,
|
|
9212
|
+
alt,
|
|
9213
|
+
loading,
|
|
9214
|
+
src,
|
|
9215
|
+
...otherProps
|
|
9216
|
+
}
|
|
9217
|
+
);
|
|
9218
|
+
Image.displayName = "Image";
|
|
9219
|
+
|
|
9192
9220
|
// src/components/Menu/Menu.tsx
|
|
9193
9221
|
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9194
9222
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
9195
|
-
var
|
|
9223
|
+
var import_type_guards30 = require("@wistia/type-guards");
|
|
9196
9224
|
var import_react34 = require("react");
|
|
9197
9225
|
|
|
9198
9226
|
// src/components/Menu/MenuContext.tsx
|
|
@@ -9201,7 +9229,7 @@ var MenuContext = (0, import_react33.createContext)({ compact: false });
|
|
|
9201
9229
|
var useMenuContext = () => (0, import_react33.useContext)(MenuContext);
|
|
9202
9230
|
|
|
9203
9231
|
// src/components/Menu/Menu.tsx
|
|
9204
|
-
var
|
|
9232
|
+
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
9205
9233
|
var open = import_styled_components51.keyframes`
|
|
9206
9234
|
from {
|
|
9207
9235
|
opacity: 0;
|
|
@@ -9304,7 +9332,7 @@ var Menu = ({
|
|
|
9304
9332
|
}) => {
|
|
9305
9333
|
const contextValue = (0, import_react34.useMemo)(() => ({ compact }), [compact]);
|
|
9306
9334
|
let controlProps = {
|
|
9307
|
-
...(0,
|
|
9335
|
+
...(0, import_type_guards30.isNotNil)(onOpenChange) && (0, import_type_guards30.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
9308
9336
|
};
|
|
9309
9337
|
if (disabled) {
|
|
9310
9338
|
controlProps = {
|
|
@@ -9312,24 +9340,24 @@ var Menu = ({
|
|
|
9312
9340
|
onOpenChange: () => null
|
|
9313
9341
|
};
|
|
9314
9342
|
}
|
|
9315
|
-
return /* @__PURE__ */ (0,
|
|
9343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
|
|
9316
9344
|
import_react_dropdown_menu.DropdownMenu,
|
|
9317
9345
|
{
|
|
9318
9346
|
modal: false,
|
|
9319
9347
|
...controlProps,
|
|
9320
9348
|
children: [
|
|
9321
|
-
/* @__PURE__ */ (0,
|
|
9349
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards30.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
|
|
9322
9350
|
Button,
|
|
9323
9351
|
{
|
|
9324
9352
|
"aria-expanded": isOpen,
|
|
9325
9353
|
disabled,
|
|
9326
9354
|
forceState: isOpen ? "active" : void 0,
|
|
9327
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9355
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Icon, { type: "caret-down" }),
|
|
9328
9356
|
...triggerProps,
|
|
9329
9357
|
children: label
|
|
9330
9358
|
}
|
|
9331
9359
|
) }),
|
|
9332
|
-
/* @__PURE__ */ (0,
|
|
9360
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
|
|
9333
9361
|
MenuContent,
|
|
9334
9362
|
{
|
|
9335
9363
|
...props,
|
|
@@ -9351,17 +9379,17 @@ Menu.displayName = "Menu";
|
|
|
9351
9379
|
// src/components/Menu/MenuLabel.tsx
|
|
9352
9380
|
var import_styled_components52 = __toESM(require("styled-components"));
|
|
9353
9381
|
var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
|
|
9354
|
-
var
|
|
9382
|
+
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
9355
9383
|
var StyledMenuLabel = (0, import_styled_components52.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
|
|
9356
9384
|
padding: var(--wui-space-02);
|
|
9357
9385
|
`;
|
|
9358
9386
|
var MenuLabel = ({ children, ...props }) => {
|
|
9359
|
-
return /* @__PURE__ */ (0,
|
|
9387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
|
|
9360
9388
|
StyledMenuLabel,
|
|
9361
9389
|
{
|
|
9362
9390
|
asChild: true,
|
|
9363
9391
|
...props,
|
|
9364
|
-
children: /* @__PURE__ */ (0,
|
|
9392
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
|
|
9365
9393
|
Heading,
|
|
9366
9394
|
{
|
|
9367
9395
|
renderAs: "span",
|
|
@@ -9379,13 +9407,13 @@ MenuLabel.displayName = "MenuLabel";
|
|
|
9379
9407
|
var import_react36 = require("react");
|
|
9380
9408
|
var import_styled_components55 = __toESM(require("styled-components"));
|
|
9381
9409
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
9382
|
-
var
|
|
9410
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
9383
9411
|
|
|
9384
9412
|
// src/components/Menu/MenuItemButton.tsx
|
|
9385
9413
|
var import_react35 = require("react");
|
|
9386
9414
|
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9387
|
-
var
|
|
9388
|
-
var
|
|
9415
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
9416
|
+
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
9389
9417
|
var StyledButton3 = (0, import_styled_components53.default)(Button)`
|
|
9390
9418
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
9391
9419
|
|
|
@@ -9462,13 +9490,13 @@ var StyledBadgeContainer = import_styled_components53.default.div`
|
|
|
9462
9490
|
var MenuItemButton = (0, import_react35.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
9463
9491
|
let { colorScheme, badge } = props;
|
|
9464
9492
|
if (appearance === "dangerous") {
|
|
9465
|
-
if ((0,
|
|
9493
|
+
if ((0, import_type_guards31.isNotUndefined)(colorScheme)) {
|
|
9466
9494
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
9467
9495
|
}
|
|
9468
9496
|
colorScheme = "error";
|
|
9469
9497
|
}
|
|
9470
9498
|
if (appearance === "gated") {
|
|
9471
|
-
badge = /* @__PURE__ */ (0,
|
|
9499
|
+
badge = /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9472
9500
|
Icon,
|
|
9473
9501
|
{
|
|
9474
9502
|
colorScheme: "purple",
|
|
@@ -9480,7 +9508,7 @@ var MenuItemButton = (0, import_react35.forwardRef)(({ children, appearance, com
|
|
|
9480
9508
|
}
|
|
9481
9509
|
);
|
|
9482
9510
|
}
|
|
9483
|
-
return /* @__PURE__ */ (0,
|
|
9511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
|
|
9484
9512
|
StyledButton3,
|
|
9485
9513
|
{
|
|
9486
9514
|
...props,
|
|
@@ -9490,10 +9518,10 @@ var MenuItemButton = (0, import_react35.forwardRef)(({ children, appearance, com
|
|
|
9490
9518
|
fullWidth: true,
|
|
9491
9519
|
unstyled: true,
|
|
9492
9520
|
children: [
|
|
9493
|
-
props.leftIcon ? /* @__PURE__ */ (0,
|
|
9494
|
-
/* @__PURE__ */ (0,
|
|
9495
|
-
(0,
|
|
9496
|
-
props.rightIcon ? /* @__PURE__ */ (0,
|
|
9521
|
+
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
9522
|
+
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
9523
|
+
(0, import_type_guards31.isNotNil)(badge) || (0, import_type_guards31.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
9524
|
+
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
9497
9525
|
]
|
|
9498
9526
|
}
|
|
9499
9527
|
);
|
|
@@ -9502,21 +9530,21 @@ MenuItemButton.displayName = "MenuItemButton";
|
|
|
9502
9530
|
|
|
9503
9531
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
9504
9532
|
var import_styled_components54 = __toESM(require("styled-components"));
|
|
9505
|
-
var
|
|
9533
|
+
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
9506
9534
|
var StyledMenuItemLabel = import_styled_components54.default.span``;
|
|
9507
9535
|
var StyledMenuItemDescription = (0, import_styled_components54.default)(Text).attrs({
|
|
9508
9536
|
variant: "body4",
|
|
9509
9537
|
prominence: "secondary"
|
|
9510
9538
|
})``;
|
|
9511
9539
|
var MenuItemLabel = ({ children }) => {
|
|
9512
|
-
return /* @__PURE__ */ (0,
|
|
9540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(StyledMenuItemLabel, { children });
|
|
9513
9541
|
};
|
|
9514
9542
|
var MenuItemDescription = ({ children }) => {
|
|
9515
|
-
return /* @__PURE__ */ (0,
|
|
9543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(StyledMenuItemDescription, { children });
|
|
9516
9544
|
};
|
|
9517
9545
|
|
|
9518
9546
|
// src/components/Menu/SubMenu.tsx
|
|
9519
|
-
var
|
|
9547
|
+
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
9520
9548
|
var SubMenuContent = (0, import_styled_components55.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
|
|
9521
9549
|
${menuContentCss}
|
|
9522
9550
|
|
|
@@ -9538,11 +9566,11 @@ var StyledSubTrigger = (0, import_styled_components55.default)(import_react_drop
|
|
|
9538
9566
|
var SubMenuTrigger = (props) => {
|
|
9539
9567
|
const { isSmAndUp } = useMq();
|
|
9540
9568
|
const Trigger4 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
|
|
9541
|
-
return /* @__PURE__ */ (0,
|
|
9569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(Trigger4, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
|
|
9542
9570
|
MenuItemButton,
|
|
9543
9571
|
{
|
|
9544
9572
|
...props,
|
|
9545
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9573
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(Icon, { type: "caret-right" })
|
|
9546
9574
|
}
|
|
9547
9575
|
) });
|
|
9548
9576
|
};
|
|
@@ -9556,14 +9584,14 @@ var SubMenu = ({
|
|
|
9556
9584
|
const { isSmAndUp } = useMq();
|
|
9557
9585
|
const [isExpanded, setIsExpanded] = (0, import_react36.useState)(false);
|
|
9558
9586
|
const { compact } = useMenuContext();
|
|
9559
|
-
return isSmAndUp ? /* @__PURE__ */ (0,
|
|
9560
|
-
/* @__PURE__ */ (0,
|
|
9561
|
-
/* @__PURE__ */ (0,
|
|
9562
|
-
(0,
|
|
9587
|
+
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
9588
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
9589
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsx)(MenuItemLabel, { children: label }),
|
|
9590
|
+
(0, import_type_guards32.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(MenuItemDescription, { children: description }) : null
|
|
9563
9591
|
] }),
|
|
9564
|
-
/* @__PURE__ */ (0,
|
|
9565
|
-
] }) : /* @__PURE__ */ (0,
|
|
9566
|
-
/* @__PURE__ */ (0,
|
|
9592
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
9593
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
9594
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(
|
|
9567
9595
|
SubMenuTrigger,
|
|
9568
9596
|
{
|
|
9569
9597
|
...props,
|
|
@@ -9572,12 +9600,12 @@ var SubMenu = ({
|
|
|
9572
9600
|
setIsExpanded((prev) => !prev);
|
|
9573
9601
|
},
|
|
9574
9602
|
children: [
|
|
9575
|
-
/* @__PURE__ */ (0,
|
|
9576
|
-
/* @__PURE__ */ (0,
|
|
9603
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsx)(MenuItemLabel, { children: label }),
|
|
9604
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsx)(MenuItemDescription, { children: description })
|
|
9577
9605
|
]
|
|
9578
9606
|
}
|
|
9579
9607
|
),
|
|
9580
|
-
/* @__PURE__ */ (0,
|
|
9608
|
+
/* @__PURE__ */ (0, import_jsx_runtime228.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
9581
9609
|
] });
|
|
9582
9610
|
};
|
|
9583
9611
|
SubMenu.displayName = "SubMenu";
|
|
@@ -9585,15 +9613,15 @@ SubMenu.displayName = "SubMenu";
|
|
|
9585
9613
|
// src/components/Menu/MenuItem.tsx
|
|
9586
9614
|
var import_react37 = require("react");
|
|
9587
9615
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
9588
|
-
var
|
|
9616
|
+
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
9589
9617
|
var MenuItem = (0, import_react37.forwardRef)(
|
|
9590
9618
|
({ onSelect = () => null, ...props }, ref) => {
|
|
9591
|
-
return /* @__PURE__ */ (0,
|
|
9619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
|
|
9592
9620
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
9593
9621
|
{
|
|
9594
9622
|
asChild: true,
|
|
9595
9623
|
onSelect,
|
|
9596
|
-
children: /* @__PURE__ */ (0,
|
|
9624
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
|
|
9597
9625
|
MenuItemButton,
|
|
9598
9626
|
{
|
|
9599
9627
|
...props,
|
|
@@ -9609,10 +9637,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
9609
9637
|
|
|
9610
9638
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
9611
9639
|
var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
|
|
9612
|
-
var
|
|
9640
|
+
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
9613
9641
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
9614
|
-
return /* @__PURE__ */ (0,
|
|
9615
|
-
/* @__PURE__ */ (0,
|
|
9642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
|
|
9643
|
+
/* @__PURE__ */ (0, import_jsx_runtime230.jsx)(MenuLabel, { children: label }),
|
|
9616
9644
|
children
|
|
9617
9645
|
] });
|
|
9618
9646
|
};
|
|
@@ -9620,11 +9648,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
|
9620
9648
|
|
|
9621
9649
|
// src/components/Menu/RadioMenuItem.tsx
|
|
9622
9650
|
var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
|
|
9623
|
-
var
|
|
9651
|
+
var import_jsx_runtime231 = require("react/jsx-runtime");
|
|
9624
9652
|
var RadioMenuItem = ({
|
|
9625
9653
|
onSelect,
|
|
9626
9654
|
value,
|
|
9627
|
-
indicator = /* @__PURE__ */ (0,
|
|
9655
|
+
indicator = /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
9628
9656
|
Icon,
|
|
9629
9657
|
{
|
|
9630
9658
|
size: "sm",
|
|
@@ -9634,17 +9662,17 @@ var RadioMenuItem = ({
|
|
|
9634
9662
|
...props
|
|
9635
9663
|
}) => {
|
|
9636
9664
|
const extraProps = onSelect ? { onSelect } : {};
|
|
9637
|
-
return /* @__PURE__ */ (0,
|
|
9665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
9638
9666
|
import_react_dropdown_menu6.DropdownMenuRadioItem,
|
|
9639
9667
|
{
|
|
9640
9668
|
...extraProps,
|
|
9641
9669
|
asChild: true,
|
|
9642
9670
|
value,
|
|
9643
|
-
children: /* @__PURE__ */ (0,
|
|
9671
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
9644
9672
|
MenuItemButton,
|
|
9645
9673
|
{
|
|
9646
9674
|
...props,
|
|
9647
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9675
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
|
|
9648
9676
|
}
|
|
9649
9677
|
)
|
|
9650
9678
|
}
|
|
@@ -9654,9 +9682,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
9654
9682
|
|
|
9655
9683
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
9656
9684
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
9657
|
-
var
|
|
9685
|
+
var import_jsx_runtime232 = require("react/jsx-runtime");
|
|
9658
9686
|
var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
9659
|
-
return checked ? /* @__PURE__ */ (0,
|
|
9687
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
|
|
9660
9688
|
"svg",
|
|
9661
9689
|
{
|
|
9662
9690
|
...props,
|
|
@@ -9666,14 +9694,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
9666
9694
|
width: "24",
|
|
9667
9695
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9668
9696
|
children: [
|
|
9669
|
-
/* @__PURE__ */ (0,
|
|
9697
|
+
/* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9670
9698
|
"path",
|
|
9671
9699
|
{
|
|
9672
9700
|
d: "m4 8c0-2.20914 1.79086-4 4-4h8c2.2091 0 4 1.79086 4 4v8c0 2.2091-1.7909 4-4 4h-8c-2.20914 0-4-1.7909-4-4z",
|
|
9673
9701
|
fill: "#2949e5"
|
|
9674
9702
|
}
|
|
9675
9703
|
),
|
|
9676
|
-
/* @__PURE__ */ (0,
|
|
9704
|
+
/* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9677
9705
|
"path",
|
|
9678
9706
|
{
|
|
9679
9707
|
d: "m10.4728 15.1931-3.09523-3.1131c-.18596-.187-.18596-.4902 0-.6773l.67341-.6773c.18596-.187.48749-.187.67344 0l2.08508 2.0971 4.4661-4.49174c.1859-.18703.4875-.18703.6734 0l.6734.67731c.186.18703.186.49027 0 .67731l-5.4762 5.50772c-.1859.187-.4874.187-.6734 0z",
|
|
@@ -9682,7 +9710,7 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
9682
9710
|
)
|
|
9683
9711
|
]
|
|
9684
9712
|
}
|
|
9685
|
-
) : /* @__PURE__ */ (0,
|
|
9713
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
|
|
9686
9714
|
"svg",
|
|
9687
9715
|
{
|
|
9688
9716
|
...props,
|
|
@@ -9692,14 +9720,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
9692
9720
|
width: "24",
|
|
9693
9721
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9694
9722
|
children: [
|
|
9695
|
-
/* @__PURE__ */ (0,
|
|
9723
|
+
/* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9696
9724
|
"path",
|
|
9697
9725
|
{
|
|
9698
9726
|
d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
|
|
9699
9727
|
fill: "#fcfcfd"
|
|
9700
9728
|
}
|
|
9701
9729
|
),
|
|
9702
|
-
/* @__PURE__ */ (0,
|
|
9730
|
+
/* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9703
9731
|
"path",
|
|
9704
9732
|
{
|
|
9705
9733
|
d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
|
|
@@ -9716,18 +9744,18 @@ var CheckboxMenuItem = ({
|
|
|
9716
9744
|
onCheckedChange,
|
|
9717
9745
|
...props
|
|
9718
9746
|
}) => {
|
|
9719
|
-
return /* @__PURE__ */ (0,
|
|
9747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9720
9748
|
import_react_dropdown_menu7.DropdownMenuCheckboxItem,
|
|
9721
9749
|
{
|
|
9722
9750
|
asChild: true,
|
|
9723
9751
|
checked,
|
|
9724
9752
|
onCheckedChange,
|
|
9725
9753
|
onSelect,
|
|
9726
|
-
children: /* @__PURE__ */ (0,
|
|
9754
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9727
9755
|
MenuItemButton,
|
|
9728
9756
|
{
|
|
9729
9757
|
...props,
|
|
9730
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
9758
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(CheckboxIndicator2, { checked })
|
|
9731
9759
|
}
|
|
9732
9760
|
)
|
|
9733
9761
|
}
|
|
@@ -9739,7 +9767,7 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
|
9739
9767
|
var import_react41 = require("react");
|
|
9740
9768
|
var import_styled_components60 = __toESM(require("styled-components"));
|
|
9741
9769
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
9742
|
-
var
|
|
9770
|
+
var import_type_guards34 = require("@wistia/type-guards");
|
|
9743
9771
|
|
|
9744
9772
|
// src/components/Modal/ModalHeader.tsx
|
|
9745
9773
|
var import_styled_components57 = __toESM(require("styled-components"));
|
|
@@ -9748,24 +9776,24 @@ var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
|
9748
9776
|
// src/components/Modal/ModalCloseButton.tsx
|
|
9749
9777
|
var import_styled_components56 = __toESM(require("styled-components"));
|
|
9750
9778
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
9751
|
-
var
|
|
9779
|
+
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
9752
9780
|
var CloseButton = (0, import_styled_components56.default)(import_react_dialog.Close)`
|
|
9753
9781
|
align-self: start;
|
|
9754
9782
|
`;
|
|
9755
9783
|
var ModalCloseButton = () => {
|
|
9756
|
-
return /* @__PURE__ */ (0,
|
|
9784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
9757
9785
|
IconButton,
|
|
9758
9786
|
{
|
|
9759
9787
|
label: "Dismiss modal",
|
|
9760
9788
|
size: "sm",
|
|
9761
9789
|
variant: "ghost",
|
|
9762
|
-
children: /* @__PURE__ */ (0,
|
|
9790
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Icon, { type: "close" })
|
|
9763
9791
|
}
|
|
9764
9792
|
) });
|
|
9765
9793
|
};
|
|
9766
9794
|
|
|
9767
9795
|
// src/components/Modal/ModalHeader.tsx
|
|
9768
|
-
var
|
|
9796
|
+
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
9769
9797
|
var Header = import_styled_components57.default.header`
|
|
9770
9798
|
display: flex;
|
|
9771
9799
|
order: 1;
|
|
@@ -9790,9 +9818,9 @@ var ModalHeader = ({
|
|
|
9790
9818
|
hideCloseButton
|
|
9791
9819
|
}) => {
|
|
9792
9820
|
const TitleWrapper = hideTitle ? ScreenReaderOnly : Title;
|
|
9793
|
-
return /* @__PURE__ */ (0,
|
|
9794
|
-
/* @__PURE__ */ (0,
|
|
9795
|
-
hideCloseButton ? null : /* @__PURE__ */ (0,
|
|
9821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(Header, { children: [
|
|
9822
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(TitleWrapper, { children: title }),
|
|
9823
|
+
hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(ModalCloseButton, {})
|
|
9796
9824
|
] });
|
|
9797
9825
|
};
|
|
9798
9826
|
|
|
@@ -9803,7 +9831,7 @@ var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
|
9803
9831
|
|
|
9804
9832
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
9805
9833
|
var import_react38 = require("react");
|
|
9806
|
-
var
|
|
9834
|
+
var import_type_guards33 = require("@wistia/type-guards");
|
|
9807
9835
|
var useFocusRestore = () => {
|
|
9808
9836
|
const previouslyFocusedRef = (0, import_react38.useRef)(null);
|
|
9809
9837
|
(0, import_react38.useEffect)(() => {
|
|
@@ -9811,7 +9839,7 @@ var useFocusRestore = () => {
|
|
|
9811
9839
|
}, []);
|
|
9812
9840
|
(0, import_react38.useEffect)(() => {
|
|
9813
9841
|
return () => {
|
|
9814
|
-
if ((0,
|
|
9842
|
+
if ((0, import_type_guards33.isNotNil)(previouslyFocusedRef.current)) {
|
|
9815
9843
|
setTimeout(() => {
|
|
9816
9844
|
previouslyFocusedRef.current?.focus();
|
|
9817
9845
|
}, 0);
|
|
@@ -9821,7 +9849,7 @@ var useFocusRestore = () => {
|
|
|
9821
9849
|
};
|
|
9822
9850
|
|
|
9823
9851
|
// src/components/Modal/ModalContent.tsx
|
|
9824
|
-
var
|
|
9852
|
+
var import_jsx_runtime235 = require("react/jsx-runtime");
|
|
9825
9853
|
var StyledModalContent = (0, import_styled_components58.default)(import_react_dialog3.Content)`
|
|
9826
9854
|
background-color: var(--wui-color-bg-app);
|
|
9827
9855
|
box-sizing: border-box;
|
|
@@ -9866,7 +9894,7 @@ var StyledModalContent = (0, import_styled_components58.default)(import_react_di
|
|
|
9866
9894
|
var ModalContent = (0, import_react39.forwardRef)(
|
|
9867
9895
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
9868
9896
|
useFocusRestore();
|
|
9869
|
-
return /* @__PURE__ */ (0,
|
|
9897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
|
|
9870
9898
|
StyledModalContent,
|
|
9871
9899
|
{
|
|
9872
9900
|
ref,
|
|
@@ -9883,7 +9911,7 @@ var ModalContent = (0, import_react39.forwardRef)(
|
|
|
9883
9911
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
9884
9912
|
var import_react40 = require("react");
|
|
9885
9913
|
var import_styled_components59 = __toESM(require("styled-components"));
|
|
9886
|
-
var
|
|
9914
|
+
var import_jsx_runtime236 = require("react/jsx-runtime");
|
|
9887
9915
|
var backdropAnimationDuration = 150;
|
|
9888
9916
|
var alignVerticalMap = {
|
|
9889
9917
|
stretch: "normal",
|
|
@@ -9920,7 +9948,7 @@ var BackdropComponent = import_styled_components59.default.div`
|
|
|
9920
9948
|
}
|
|
9921
9949
|
`;
|
|
9922
9950
|
var Backdrop = (0, import_react40.forwardRef)(
|
|
9923
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0,
|
|
9951
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
|
|
9924
9952
|
BackdropComponent,
|
|
9925
9953
|
{
|
|
9926
9954
|
ref,
|
|
@@ -9934,7 +9962,7 @@ var Backdrop = (0, import_react40.forwardRef)(
|
|
|
9934
9962
|
Backdrop.displayName = "Backdrop";
|
|
9935
9963
|
|
|
9936
9964
|
// src/components/Modal/Modal.tsx
|
|
9937
|
-
var
|
|
9965
|
+
var import_jsx_runtime237 = require("react/jsx-runtime");
|
|
9938
9966
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
9939
9967
|
var ModalBody = import_styled_components60.default.div`
|
|
9940
9968
|
flex-direction: column;
|
|
@@ -9954,24 +9982,24 @@ var Modal = (0, import_react41.forwardRef)(
|
|
|
9954
9982
|
width = DEFAULT_MODAL_WIDTH,
|
|
9955
9983
|
...props
|
|
9956
9984
|
}, ref) => {
|
|
9957
|
-
return /* @__PURE__ */ (0,
|
|
9985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
9958
9986
|
import_react_dialog4.Root,
|
|
9959
9987
|
{
|
|
9960
9988
|
onOpenChange: (open2) => {
|
|
9961
|
-
if (!open2 && (0,
|
|
9989
|
+
if (!open2 && (0, import_type_guards34.isNotNil)(onRequestClose)) {
|
|
9962
9990
|
onRequestClose();
|
|
9963
9991
|
}
|
|
9964
9992
|
},
|
|
9965
9993
|
open: isOpen,
|
|
9966
|
-
children: /* @__PURE__ */ (0,
|
|
9967
|
-
/* @__PURE__ */ (0,
|
|
9968
|
-
/* @__PURE__ */ (0,
|
|
9994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(import_react_dialog4.Portal, { children: [
|
|
9995
|
+
/* @__PURE__ */ (0, import_jsx_runtime237.jsx)(Backdrop, {}),
|
|
9996
|
+
/* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(
|
|
9969
9997
|
ModalContent,
|
|
9970
9998
|
{
|
|
9971
9999
|
ref,
|
|
9972
10000
|
fullHeight,
|
|
9973
10001
|
onOpenAutoFocus: (event) => {
|
|
9974
|
-
if ((0,
|
|
10002
|
+
if ((0, import_type_guards34.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
9975
10003
|
event.preventDefault();
|
|
9976
10004
|
requestAnimationFrame(() => {
|
|
9977
10005
|
initialFocusRef.current?.focus();
|
|
@@ -9981,8 +10009,8 @@ var Modal = (0, import_react41.forwardRef)(
|
|
|
9981
10009
|
width,
|
|
9982
10010
|
...props,
|
|
9983
10011
|
children: [
|
|
9984
|
-
/* @__PURE__ */ (0,
|
|
9985
|
-
/* @__PURE__ */ (0,
|
|
10012
|
+
/* @__PURE__ */ (0, import_jsx_runtime237.jsx)(ModalBody, { children }),
|
|
10013
|
+
/* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
9986
10014
|
ModalHeader,
|
|
9987
10015
|
{
|
|
9988
10016
|
hideCloseButton,
|
|
@@ -10005,20 +10033,22 @@ var import_react_popover = require("@radix-ui/react-popover");
|
|
|
10005
10033
|
var import_styled_components61 = __toESM(require("styled-components"));
|
|
10006
10034
|
|
|
10007
10035
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
10008
|
-
var
|
|
10036
|
+
var import_type_guards35 = require("@wistia/type-guards");
|
|
10009
10037
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
10010
|
-
return (0,
|
|
10038
|
+
return (0, import_type_guards35.isNotNil)(onOpenChange) && (0, import_type_guards35.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
10011
10039
|
};
|
|
10012
10040
|
|
|
10013
10041
|
// src/components/Popover/Popover.tsx
|
|
10014
|
-
var
|
|
10042
|
+
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
10015
10043
|
var StyledContent2 = (0, import_styled_components61.default)(import_react_popover.Content)`
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10044
|
+
${({ $unstyled }) => !$unstyled && import_styled_components61.css`
|
|
10045
|
+
border-radius: var(--wui-border-radius-02);
|
|
10046
|
+
padding: var(--wui-space-04);
|
|
10047
|
+
max-width: 320px;
|
|
10048
|
+
background-color: var(--wui-color-bg-surface);
|
|
10049
|
+
box-shadow: var(--wui-elevation-01);
|
|
10050
|
+
border: 1px solid var(--wui-color-border);
|
|
10051
|
+
`}
|
|
10022
10052
|
|
|
10023
10053
|
[data-wui-popover-close] {
|
|
10024
10054
|
position: absolute;
|
|
@@ -10026,37 +10056,34 @@ var StyledContent2 = (0, import_styled_components61.default)(import_react_popove
|
|
|
10026
10056
|
right: var(--wui-space-02);
|
|
10027
10057
|
}
|
|
10028
10058
|
`;
|
|
10029
|
-
var StyledArrow = (0, import_styled_components61.default)(import_react_popover.Arrow)`
|
|
10030
|
-
fill: white;
|
|
10031
|
-
display: none;
|
|
10032
|
-
`;
|
|
10033
10059
|
var Popover = ({
|
|
10034
10060
|
children,
|
|
10035
10061
|
trigger,
|
|
10036
10062
|
isOpen = false,
|
|
10037
10063
|
hideCloseButton = false,
|
|
10038
10064
|
onOpenChange,
|
|
10065
|
+
unstyled = false,
|
|
10039
10066
|
...props
|
|
10040
10067
|
}) => {
|
|
10041
|
-
return /* @__PURE__ */ (0,
|
|
10042
|
-
/* @__PURE__ */ (0,
|
|
10043
|
-
/* @__PURE__ */ (0,
|
|
10068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(import_react_popover.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
10069
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_react_popover.Trigger, { asChild: true, children: trigger }),
|
|
10070
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_react_popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(
|
|
10044
10071
|
StyledContent2,
|
|
10045
10072
|
{
|
|
10046
|
-
sideOffset:
|
|
10073
|
+
sideOffset: 8,
|
|
10047
10074
|
...props,
|
|
10075
|
+
$unstyled: unstyled,
|
|
10048
10076
|
children: [
|
|
10049
|
-
/* @__PURE__ */ (0,
|
|
10050
|
-
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_react_popover.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
10077
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_react_popover.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10051
10078
|
IconButton,
|
|
10052
10079
|
{
|
|
10053
10080
|
"data-wui-popover-close": true,
|
|
10054
10081
|
label: "Close",
|
|
10055
10082
|
variant: "ghost",
|
|
10056
|
-
children: /* @__PURE__ */ (0,
|
|
10083
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(Icon, { type: "close" })
|
|
10057
10084
|
}
|
|
10058
10085
|
) }),
|
|
10059
|
-
/* @__PURE__ */ (0,
|
|
10086
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)("div", { children })
|
|
10060
10087
|
]
|
|
10061
10088
|
}
|
|
10062
10089
|
) })
|
|
@@ -10067,8 +10094,8 @@ Popover.displayName = "Popover";
|
|
|
10067
10094
|
// src/components/Radio/Radio.tsx
|
|
10068
10095
|
var import_react42 = require("react");
|
|
10069
10096
|
var import_styled_components62 = __toESM(require("styled-components"));
|
|
10070
|
-
var
|
|
10071
|
-
var
|
|
10097
|
+
var import_type_guards36 = require("@wistia/type-guards");
|
|
10098
|
+
var import_jsx_runtime239 = require("react/jsx-runtime");
|
|
10072
10099
|
var StyledLabelWrapper2 = import_styled_components62.default.div`
|
|
10073
10100
|
display: flex;
|
|
10074
10101
|
flex-direction: column;
|
|
@@ -10153,14 +10180,14 @@ var Radio = (0, import_react42.forwardRef)(
|
|
|
10153
10180
|
...otherProps
|
|
10154
10181
|
}, ref) => {
|
|
10155
10182
|
const generatedId = (0, import_react42.useId)();
|
|
10156
|
-
const computedId = (0,
|
|
10157
|
-
return /* @__PURE__ */ (0,
|
|
10183
|
+
const computedId = (0, import_type_guards36.isNonEmptyString)(id) ? id : `ui-radio-${generatedId}`;
|
|
10184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(
|
|
10158
10185
|
StyledRadioWrapper,
|
|
10159
10186
|
{
|
|
10160
10187
|
"aria-invalid": otherProps["aria-invalid"],
|
|
10161
10188
|
disabled,
|
|
10162
10189
|
children: [
|
|
10163
|
-
/* @__PURE__ */ (0,
|
|
10190
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10164
10191
|
StyledRadio,
|
|
10165
10192
|
{
|
|
10166
10193
|
ref,
|
|
@@ -10175,8 +10202,8 @@ var Radio = (0, import_react42.forwardRef)(
|
|
|
10175
10202
|
...otherProps
|
|
10176
10203
|
}
|
|
10177
10204
|
),
|
|
10178
|
-
/* @__PURE__ */ (0,
|
|
10179
|
-
/* @__PURE__ */ (0,
|
|
10205
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(StyledLabelWrapper2, { children: [
|
|
10206
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10180
10207
|
Label,
|
|
10181
10208
|
{
|
|
10182
10209
|
disabled,
|
|
@@ -10185,7 +10212,7 @@ var Radio = (0, import_react42.forwardRef)(
|
|
|
10185
10212
|
children: label
|
|
10186
10213
|
}
|
|
10187
10214
|
),
|
|
10188
|
-
/* @__PURE__ */ (0,
|
|
10215
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)(LabelDescription, { children: description })
|
|
10189
10216
|
] })
|
|
10190
10217
|
]
|
|
10191
10218
|
}
|
|
@@ -10198,11 +10225,11 @@ Radio.displayName = "Radio";
|
|
|
10198
10225
|
var import_react46 = require("react");
|
|
10199
10226
|
var import_styled_components64 = __toESM(require("styled-components"));
|
|
10200
10227
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
10201
|
-
var
|
|
10228
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
10202
10229
|
|
|
10203
10230
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10204
10231
|
var import_react43 = require("react");
|
|
10205
|
-
var
|
|
10232
|
+
var import_jsx_runtime240 = require("react/jsx-runtime");
|
|
10206
10233
|
var SelectedItemMeasurementsContext = (0, import_react43.createContext)(
|
|
10207
10234
|
null
|
|
10208
10235
|
);
|
|
@@ -10217,7 +10244,7 @@ var SelectedItemMeasurementsProvider = ({
|
|
|
10217
10244
|
}),
|
|
10218
10245
|
[selectedItemMeasurements]
|
|
10219
10246
|
);
|
|
10220
|
-
return /* @__PURE__ */ (0,
|
|
10247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10221
10248
|
};
|
|
10222
10249
|
var useSelectedItemMeasurements = () => {
|
|
10223
10250
|
const context = (0, import_react43.useContext)(SelectedItemMeasurementsContext);
|
|
@@ -10246,7 +10273,7 @@ var useSegmentedControlValue = () => {
|
|
|
10246
10273
|
};
|
|
10247
10274
|
|
|
10248
10275
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10249
|
-
var
|
|
10276
|
+
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
10250
10277
|
var SelectedItemIndicatorDiv = import_styled_components63.default.div`
|
|
10251
10278
|
background-color: var(--wui-color-bg-fill-white);
|
|
10252
10279
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10273,7 +10300,7 @@ var SelectedItemIndicator = () => {
|
|
|
10273
10300
|
if (!selectedValue) {
|
|
10274
10301
|
return null;
|
|
10275
10302
|
}
|
|
10276
|
-
return /* @__PURE__ */ (0,
|
|
10303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10277
10304
|
SelectedItemIndicatorDiv,
|
|
10278
10305
|
{
|
|
10279
10306
|
style: {
|
|
@@ -10286,7 +10313,7 @@ var SelectedItemIndicator = () => {
|
|
|
10286
10313
|
};
|
|
10287
10314
|
|
|
10288
10315
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10289
|
-
var
|
|
10316
|
+
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
10290
10317
|
var segmentedControlStyles = import_styled_components64.css`
|
|
10291
10318
|
display: inline-flex;
|
|
10292
10319
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10309,10 +10336,10 @@ var SegmentedControl = (0, import_react46.forwardRef)(
|
|
|
10309
10336
|
onSelectedValueChange,
|
|
10310
10337
|
...props
|
|
10311
10338
|
}, ref) => {
|
|
10312
|
-
if ((0,
|
|
10339
|
+
if ((0, import_type_guards37.isNil)(children)) {
|
|
10313
10340
|
return null;
|
|
10314
10341
|
}
|
|
10315
|
-
return /* @__PURE__ */ (0,
|
|
10342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
|
|
10316
10343
|
StyledSegmentedControl,
|
|
10317
10344
|
{
|
|
10318
10345
|
ref,
|
|
@@ -10324,8 +10351,8 @@ var SegmentedControl = (0, import_react46.forwardRef)(
|
|
|
10324
10351
|
type: "single",
|
|
10325
10352
|
value: selectedValue,
|
|
10326
10353
|
...props,
|
|
10327
|
-
children: /* @__PURE__ */ (0,
|
|
10328
|
-
/* @__PURE__ */ (0,
|
|
10354
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
10355
|
+
/* @__PURE__ */ (0, import_jsx_runtime242.jsx)(SelectedItemIndicator, {}),
|
|
10329
10356
|
children
|
|
10330
10357
|
] }) })
|
|
10331
10358
|
}
|
|
@@ -10338,24 +10365,24 @@ SegmentedControl.displayName = "SegmentedControl";
|
|
|
10338
10365
|
var import_react47 = require("react");
|
|
10339
10366
|
var import_styled_components65 = __toESM(require("styled-components"));
|
|
10340
10367
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
10341
|
-
var
|
|
10368
|
+
var import_type_guards39 = require("@wistia/type-guards");
|
|
10342
10369
|
|
|
10343
10370
|
// src/private/helpers/mergeRefs/mergeRefs.ts
|
|
10344
|
-
var
|
|
10371
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
10345
10372
|
var mergeRefs = (refs) => (value) => {
|
|
10346
10373
|
refs.forEach((ref) => {
|
|
10347
|
-
if ((0,
|
|
10374
|
+
if ((0, import_type_guards38.isFunction)(ref)) {
|
|
10348
10375
|
ref(value);
|
|
10349
10376
|
return;
|
|
10350
10377
|
}
|
|
10351
|
-
if ((0,
|
|
10378
|
+
if ((0, import_type_guards38.isNotNil)(ref)) {
|
|
10352
10379
|
ref.current = value;
|
|
10353
10380
|
}
|
|
10354
10381
|
});
|
|
10355
10382
|
};
|
|
10356
10383
|
|
|
10357
10384
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10358
|
-
var
|
|
10385
|
+
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
10359
10386
|
var segmentedControlItemStyles = import_styled_components65.css`
|
|
10360
10387
|
all: unset; /* ToggleGroupItem is a button element */
|
|
10361
10388
|
align-items: center;
|
|
@@ -10456,12 +10483,12 @@ var SegmentedControlItem = (0, import_react47.forwardRef)(
|
|
|
10456
10483
|
resizeObserver.disconnect();
|
|
10457
10484
|
};
|
|
10458
10485
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10459
|
-
return /* @__PURE__ */ (0,
|
|
10486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(
|
|
10460
10487
|
StyledSegmentedControlItem,
|
|
10461
10488
|
{
|
|
10462
10489
|
ref: combinedRef,
|
|
10463
|
-
$hasLabel: (0,
|
|
10464
|
-
"aria-label": (0,
|
|
10490
|
+
$hasLabel: (0, import_type_guards39.isNotNil)(label),
|
|
10491
|
+
"aria-label": (0, import_type_guards39.isNotNil)(label) ? void 0 : ariaLabel,
|
|
10465
10492
|
disabled,
|
|
10466
10493
|
onClick: handleClick,
|
|
10467
10494
|
value,
|
|
@@ -10475,70 +10502,378 @@ var SegmentedControlItem = (0, import_react47.forwardRef)(
|
|
|
10475
10502
|
);
|
|
10476
10503
|
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
10477
10504
|
|
|
10478
|
-
// src/components/
|
|
10479
|
-
var
|
|
10480
|
-
var
|
|
10481
|
-
var import_type_guards40 = require("@wistia/type-guards");
|
|
10482
|
-
|
|
10483
|
-
// src/components/Tabs/TabPanel.tsx
|
|
10505
|
+
// src/components/Select/Select.tsx
|
|
10506
|
+
var import_react_select = require("@radix-ui/react-select");
|
|
10507
|
+
var import_react48 = require("react");
|
|
10484
10508
|
var import_styled_components66 = __toESM(require("styled-components"));
|
|
10485
|
-
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
10486
|
-
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
10487
|
-
var StyledTabPanel = (0, import_styled_components66.default)(import_react_tabs.Content)`
|
|
10488
|
-
display: flex;
|
|
10489
|
-
flex-direction: column;
|
|
10490
|
-
`;
|
|
10491
|
-
var TabPanel = ({ children, value, ...props }) => {
|
|
10492
|
-
return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
|
|
10493
|
-
StyledTabPanel,
|
|
10494
|
-
{
|
|
10495
|
-
value,
|
|
10496
|
-
...props,
|
|
10497
|
-
children
|
|
10498
|
-
}
|
|
10499
|
-
);
|
|
10500
|
-
};
|
|
10501
|
-
TabPanel.displayName = "TabPanel";
|
|
10502
|
-
|
|
10503
|
-
// src/components/Tabs/TabList.tsx
|
|
10504
|
-
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10505
|
-
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
10506
10509
|
var import_jsx_runtime244 = require("react/jsx-runtime");
|
|
10507
|
-
var
|
|
10508
|
-
${
|
|
10510
|
+
var StyledTrigger = (0, import_styled_components66.default)(import_react_select.Trigger)`
|
|
10511
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10512
|
+
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10513
|
+
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
10514
|
+
--wui-select-color-border: var(--wui-color-border);
|
|
10515
|
+
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
10516
|
+
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
10517
|
+
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
10518
|
+
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
10519
|
+
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
10520
|
+
--wui-select-vertical-padding: var(--wui-space-02);
|
|
10521
|
+
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
10522
|
+
--wui-select-placeholder: var(--wui-gray-10);
|
|
10523
|
+
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
10509
10524
|
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10525
|
+
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
10526
|
+
background-color: var(--wui-select-color-bg);
|
|
10527
|
+
border: 1px solid var(--wui-select-color-border);
|
|
10528
|
+
border-radius: var(--wui-select-border-radius);
|
|
10529
|
+
min-width: 200px;
|
|
10530
|
+
text-align: left;
|
|
10531
|
+
display: inline-flex;
|
|
10532
|
+
align-items: center;
|
|
10533
|
+
justify-content: space-between;
|
|
10534
|
+
max-width: 100%;
|
|
10535
|
+
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
10536
|
+
|
|
10537
|
+
> span {
|
|
10538
|
+
white-space: nowrap;
|
|
10539
|
+
text-overflow: ellipsis;
|
|
10540
|
+
overflow: hidden;
|
|
10541
|
+
}
|
|
10542
|
+
|
|
10543
|
+
&[aria-expanded='true'],
|
|
10544
|
+
&:focus {
|
|
10545
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
10546
|
+
}
|
|
10547
|
+
|
|
10548
|
+
&[aria-invalid='true'] {
|
|
10549
|
+
outline: 2px solid var(--wui-select-color-border-error);
|
|
10550
|
+
color: var(--wui-select-color-text-error);
|
|
10551
|
+
}
|
|
10552
|
+
|
|
10553
|
+
&:disabled {
|
|
10554
|
+
border-color: var(--wui-color-bg-surface-disabled);
|
|
10555
|
+
background-color: var(--wui-color-bg-surface-disabled);
|
|
10556
|
+
}
|
|
10557
|
+
`;
|
|
10558
|
+
var StyledContent3 = (0, import_styled_components66.default)(import_react_select.Content)`
|
|
10559
|
+
--wui-select-content-border: var(--wui-color-border);
|
|
10560
|
+
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
10561
|
+
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
10562
|
+
--wui-select-option-padding: var(--wui-space-02);
|
|
10563
|
+
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
10564
|
+
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
10565
|
+
|
|
10566
|
+
overflow: hidden;
|
|
10567
|
+
transform: translateY(8px);
|
|
10568
|
+
background-color: var(--wui-select-content-bg);
|
|
10569
|
+
border: 1px solid var(--wui-select-content-border);
|
|
10570
|
+
border-radius: var(--wui-select-content-border-radius);
|
|
10571
|
+
padding: var(--wui-select-option-padding);
|
|
10572
|
+
min-width: var(--radix-select-trigger-width);
|
|
10573
|
+
max-height: var(--radix-select-content-available-height);
|
|
10574
|
+
z-index: var(--wui-zindex-select);
|
|
10575
|
+
`;
|
|
10576
|
+
var Select = (0, import_react48.forwardRef)(
|
|
10577
|
+
({
|
|
10578
|
+
colorScheme = "inherit",
|
|
10579
|
+
children,
|
|
10580
|
+
onChange = () => null,
|
|
10581
|
+
placeholder = "Select...",
|
|
10582
|
+
fullWidth = false,
|
|
10583
|
+
...props
|
|
10584
|
+
}, forwardedRef) => {
|
|
10585
|
+
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
10586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(
|
|
10587
|
+
import_react_select.Root,
|
|
10588
|
+
{
|
|
10589
|
+
...props,
|
|
10590
|
+
onValueChange: onChange,
|
|
10591
|
+
children: [
|
|
10592
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(
|
|
10593
|
+
StyledTrigger,
|
|
10594
|
+
{
|
|
10595
|
+
ref: forwardedRef,
|
|
10596
|
+
$colorScheme: colorScheme,
|
|
10597
|
+
$fullWidth: responsiveFullWidth,
|
|
10598
|
+
...props,
|
|
10599
|
+
children: [
|
|
10600
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_select.Value, { placeholder }),
|
|
10601
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
10602
|
+
Icon,
|
|
10603
|
+
{
|
|
10604
|
+
size: "md",
|
|
10605
|
+
type: "caret-down"
|
|
10606
|
+
}
|
|
10607
|
+
)
|
|
10608
|
+
]
|
|
10609
|
+
}
|
|
10610
|
+
),
|
|
10611
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(StyledContent3, { position: "popper", children: [
|
|
10612
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(Icon, { type: "caret-up" }) }),
|
|
10613
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_select.Viewport, { children }),
|
|
10614
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(Icon, { type: "caret-down" }) })
|
|
10615
|
+
] }) })
|
|
10616
|
+
]
|
|
10617
|
+
}
|
|
10618
|
+
);
|
|
10619
|
+
}
|
|
10620
|
+
);
|
|
10621
|
+
Select.displayName = "Select";
|
|
10622
|
+
|
|
10623
|
+
// src/components/Select/SelectOption.tsx
|
|
10624
|
+
var import_react_select2 = require("@radix-ui/react-select");
|
|
10625
|
+
var import_react49 = require("react");
|
|
10626
|
+
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10627
|
+
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
10628
|
+
var StyledItem = (0, import_styled_components67.default)(import_react_select2.Item)`
|
|
10629
|
+
${variantStyleMap2.body3};
|
|
10630
|
+
display: flex;
|
|
10631
|
+
padding: var(--wui-select-option-padding);
|
|
10632
|
+
gap: var(--wui-select-option-inner-gap);
|
|
10633
|
+
font-size: var(--font-size);
|
|
10634
|
+
font-weight: var(--font-weight);
|
|
10635
|
+
border-radius: var(--wui-border-radius-01);
|
|
10636
|
+
|
|
10637
|
+
&:hover,
|
|
10638
|
+
&:focus-visible {
|
|
10639
|
+
background-color: var(--wui-select-option-bg-hover);
|
|
10640
|
+
outline: none;
|
|
10641
|
+
}
|
|
10642
|
+
|
|
10643
|
+
&[aria-disabled='true'] {
|
|
10644
|
+
color: var(--wui-color-text-disabled);
|
|
10645
|
+
}
|
|
10646
|
+
|
|
10647
|
+
&[aria-disabled='true']:hover {
|
|
10648
|
+
background-color: transparent;
|
|
10649
|
+
}
|
|
10650
|
+
`;
|
|
10651
|
+
var StyledIconContainer = import_styled_components67.default.span`
|
|
10652
|
+
width: 12px;
|
|
10653
|
+
`;
|
|
10654
|
+
var SelectOption = (0, import_react49.forwardRef)(
|
|
10655
|
+
({ children, ...props }, forwardedRef) => {
|
|
10656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(
|
|
10657
|
+
StyledItem,
|
|
10658
|
+
{
|
|
10659
|
+
...props,
|
|
10660
|
+
ref: forwardedRef,
|
|
10661
|
+
children: [
|
|
10662
|
+
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
10663
|
+
Icon,
|
|
10664
|
+
{
|
|
10665
|
+
size: "sm",
|
|
10666
|
+
type: "checkmark"
|
|
10667
|
+
}
|
|
10668
|
+
) }) }),
|
|
10669
|
+
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_react_select2.ItemText, { children })
|
|
10670
|
+
]
|
|
10671
|
+
}
|
|
10672
|
+
);
|
|
10673
|
+
}
|
|
10674
|
+
);
|
|
10675
|
+
SelectOption.displayName = "Option";
|
|
10676
|
+
|
|
10677
|
+
// src/components/Select/SelectOptionGroup.tsx
|
|
10678
|
+
var import_react_select3 = require("@radix-ui/react-select");
|
|
10679
|
+
var import_styled_components68 = __toESM(require("styled-components"));
|
|
10680
|
+
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
10681
|
+
var StyledLabel4 = (0, import_styled_components68.default)(import_react_select3.Label)`
|
|
10682
|
+
padding: var(--wui-select-option-padding);
|
|
10683
|
+
`;
|
|
10684
|
+
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
10685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
10686
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10687
|
+
Text,
|
|
10688
|
+
{
|
|
10689
|
+
prominence: "secondary",
|
|
10690
|
+
variant: "body3",
|
|
10691
|
+
children: label
|
|
10692
|
+
}
|
|
10693
|
+
) }),
|
|
10694
|
+
children
|
|
10695
|
+
] });
|
|
10696
|
+
};
|
|
10697
|
+
|
|
10698
|
+
// src/components/Table/Table.tsx
|
|
10699
|
+
var import_react51 = require("react");
|
|
10700
|
+
var import_styled_components69 = __toESM(require("styled-components"));
|
|
10701
|
+
|
|
10702
|
+
// src/components/Table/TableContext.tsx
|
|
10703
|
+
var import_react50 = __toESM(require("react"));
|
|
10704
|
+
var TableContext = import_react50.default.createContext({ divided: false });
|
|
10705
|
+
|
|
10706
|
+
// src/components/Table/Table.tsx
|
|
10707
|
+
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
10708
|
+
var StyledTable = import_styled_components69.default.table`
|
|
10709
|
+
width: 100%;
|
|
10710
|
+
border-collapse: collapse;
|
|
10711
|
+
|
|
10712
|
+
${({ $striped }) => $striped && import_styled_components69.css`
|
|
10713
|
+
tbody tr:nth-child(even) {
|
|
10714
|
+
background-color: var(--wui-color-bg-surface-secondary);
|
|
10715
|
+
}
|
|
10716
|
+
`}
|
|
10717
|
+
`;
|
|
10718
|
+
var Table = ({
|
|
10719
|
+
children,
|
|
10720
|
+
striped = false,
|
|
10721
|
+
divided = false,
|
|
10722
|
+
...props
|
|
10723
|
+
}) => {
|
|
10724
|
+
const contextValue = (0, import_react51.useMemo)(() => ({ divided }), [divided]);
|
|
10725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
10726
|
+
StyledTable,
|
|
10727
|
+
{
|
|
10728
|
+
$striped: striped,
|
|
10729
|
+
...props,
|
|
10730
|
+
children
|
|
10731
|
+
}
|
|
10732
|
+
) });
|
|
10733
|
+
};
|
|
10734
|
+
|
|
10735
|
+
// src/components/Table/TableBody.tsx
|
|
10736
|
+
var import_styled_components70 = __toESM(require("styled-components"));
|
|
10737
|
+
|
|
10738
|
+
// src/components/Table/TableSectionContext.ts
|
|
10739
|
+
var import_react52 = require("react");
|
|
10740
|
+
var TableSectionContext = (0, import_react52.createContext)(null);
|
|
10741
|
+
|
|
10742
|
+
// src/components/Table/TableBody.tsx
|
|
10743
|
+
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
10744
|
+
var StyledTbody = import_styled_components70.default.tbody``;
|
|
10745
|
+
var TableBody = ({ children, ...props }) => {
|
|
10746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(StyledTbody, { ...props, children }) });
|
|
10747
|
+
};
|
|
10748
|
+
|
|
10749
|
+
// src/components/Table/TableCell.tsx
|
|
10750
|
+
var import_react53 = require("react");
|
|
10751
|
+
var import_styled_components71 = __toESM(require("styled-components"));
|
|
10752
|
+
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
10753
|
+
var sharedStyles = import_styled_components71.css`
|
|
10754
|
+
color: var(--wui-color-text);
|
|
10755
|
+
padding: var(--wui-space-02);
|
|
10756
|
+
text-align: left;
|
|
10757
|
+
`;
|
|
10758
|
+
var StyledTh = import_styled_components71.default.th`
|
|
10759
|
+
${sharedStyles}
|
|
10760
|
+
font-size: var(--wui-typography-body-4-size);
|
|
10761
|
+
font-weight: var(--wui-typography-weight-label-bold);
|
|
10762
|
+
line-height: var(--wui-typography-body-4-line-height);
|
|
10763
|
+
`;
|
|
10764
|
+
var StyledTd = import_styled_components71.default.td`
|
|
10765
|
+
${sharedStyles}
|
|
10766
|
+
font-size: var(--wui-typography-body-2-size);
|
|
10767
|
+
font-weight: var(--wui-typography-body-2-weight);
|
|
10768
|
+
line-height: var(--wui-typography-body-2-line-height);
|
|
10769
|
+
`;
|
|
10770
|
+
var TableCell = ({ children, ...props }) => {
|
|
10771
|
+
const section = (0, import_react53.useContext)(TableSectionContext);
|
|
10772
|
+
if (section === "head") {
|
|
10773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(StyledTh, { ...props, children });
|
|
10774
|
+
}
|
|
10775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(StyledTd, { ...props, children });
|
|
10776
|
+
};
|
|
10777
|
+
|
|
10778
|
+
// src/components/Table/TableFooter.tsx
|
|
10779
|
+
var import_styled_components72 = __toESM(require("styled-components"));
|
|
10780
|
+
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
10781
|
+
var StyledTfoot = import_styled_components72.default.tfoot``;
|
|
10782
|
+
var TableFooter = ({ children, ...props }) => {
|
|
10783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(StyledTfoot, { ...props, children }) });
|
|
10784
|
+
};
|
|
10785
|
+
|
|
10786
|
+
// src/components/Table/TableHead.tsx
|
|
10787
|
+
var import_styled_components73 = __toESM(require("styled-components"));
|
|
10788
|
+
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
10789
|
+
var StyledThead = import_styled_components73.default.thead``;
|
|
10790
|
+
var TableHead = ({ children, ...props }) => {
|
|
10791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(StyledThead, { ...props, children }) });
|
|
10792
|
+
};
|
|
10793
|
+
|
|
10794
|
+
// src/components/Table/TableRow.tsx
|
|
10795
|
+
var import_react54 = require("react");
|
|
10796
|
+
var import_styled_components74 = __toESM(require("styled-components"));
|
|
10797
|
+
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
10798
|
+
var StyledTr = import_styled_components74.default.tr`
|
|
10799
|
+
${({ $divided }) => $divided && `border-bottom: 1px solid var(--wui-color-border);`}
|
|
10800
|
+
`;
|
|
10801
|
+
var TableRow = ({ children, ...props }) => {
|
|
10802
|
+
const { divided = false } = (0, import_react54.useContext)(TableContext);
|
|
10803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
10804
|
+
StyledTr,
|
|
10805
|
+
{
|
|
10806
|
+
$divided: divided,
|
|
10807
|
+
...props,
|
|
10808
|
+
children
|
|
10809
|
+
}
|
|
10810
|
+
);
|
|
10811
|
+
};
|
|
10812
|
+
|
|
10813
|
+
// src/components/Tabs/Tabs.tsx
|
|
10814
|
+
var import_react59 = require("react");
|
|
10815
|
+
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
10816
|
+
var import_type_guards41 = require("@wistia/type-guards");
|
|
10817
|
+
|
|
10818
|
+
// src/components/Tabs/TabPanel.tsx
|
|
10819
|
+
var import_styled_components75 = __toESM(require("styled-components"));
|
|
10820
|
+
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
10821
|
+
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
10822
|
+
var StyledTabPanel = (0, import_styled_components75.default)(import_react_tabs.Content)`
|
|
10823
|
+
display: flex;
|
|
10824
|
+
flex-direction: column;
|
|
10825
|
+
`;
|
|
10826
|
+
var TabPanel = ({ children, value, ...props }) => {
|
|
10827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
|
|
10828
|
+
StyledTabPanel,
|
|
10829
|
+
{
|
|
10830
|
+
value,
|
|
10831
|
+
...props,
|
|
10832
|
+
children
|
|
10833
|
+
}
|
|
10834
|
+
);
|
|
10835
|
+
};
|
|
10836
|
+
TabPanel.displayName = "TabPanel";
|
|
10837
|
+
|
|
10838
|
+
// src/components/Tabs/TabList.tsx
|
|
10839
|
+
var import_styled_components76 = __toESM(require("styled-components"));
|
|
10840
|
+
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
10841
|
+
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
10842
|
+
var StyledTabList = (0, import_styled_components76.default)(import_react_tabs2.List)`
|
|
10843
|
+
${segmentedControlStyles}
|
|
10844
|
+
|
|
10845
|
+
margin-bottom: var(--wui-space-04);
|
|
10846
|
+
`;
|
|
10847
|
+
var TabList = ({
|
|
10848
|
+
children,
|
|
10849
|
+
fullWidth,
|
|
10850
|
+
ariaLabel,
|
|
10851
|
+
...props
|
|
10852
|
+
}) => {
|
|
10853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
10854
|
+
StyledTabList,
|
|
10855
|
+
{
|
|
10856
|
+
$fullWidth: fullWidth,
|
|
10857
|
+
"aria-label": ariaLabel,
|
|
10858
|
+
...props,
|
|
10859
|
+
children
|
|
10860
|
+
}
|
|
10526
10861
|
);
|
|
10527
10862
|
};
|
|
10528
10863
|
TabList.displayName = "TabList";
|
|
10529
10864
|
|
|
10530
10865
|
// src/components/Tabs/TabItem.tsx
|
|
10531
|
-
var
|
|
10532
|
-
var
|
|
10866
|
+
var import_react56 = require("react");
|
|
10867
|
+
var import_styled_components77 = __toESM(require("styled-components"));
|
|
10533
10868
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
10534
|
-
var
|
|
10869
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
10535
10870
|
|
|
10536
10871
|
// src/components/Tabs/useTabsValue.tsx
|
|
10537
|
-
var
|
|
10538
|
-
var TabsValueContext = (0,
|
|
10872
|
+
var import_react55 = require("react");
|
|
10873
|
+
var TabsValueContext = (0, import_react55.createContext)(null);
|
|
10539
10874
|
var TabsValueProvider = TabsValueContext.Provider;
|
|
10540
10875
|
var useTabsValue = () => {
|
|
10541
|
-
const context = (0,
|
|
10876
|
+
const context = (0, import_react55.useContext)(TabsValueContext);
|
|
10542
10877
|
if (context === null) {
|
|
10543
10878
|
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
10544
10879
|
}
|
|
@@ -10546,21 +10881,21 @@ var useTabsValue = () => {
|
|
|
10546
10881
|
};
|
|
10547
10882
|
|
|
10548
10883
|
// src/components/Tabs/TabItem.tsx
|
|
10549
|
-
var
|
|
10550
|
-
var StyledTabItem = (0,
|
|
10884
|
+
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
10885
|
+
var StyledTabItem = (0, import_styled_components77.default)(import_react_tabs3.Trigger)`
|
|
10551
10886
|
${segmentedControlItemStyles}
|
|
10552
10887
|
|
|
10553
10888
|
&:focus-visible {
|
|
10554
10889
|
outline: none;
|
|
10555
10890
|
}
|
|
10556
10891
|
`;
|
|
10557
|
-
var TabItem = (0,
|
|
10892
|
+
var TabItem = (0, import_react56.forwardRef)(
|
|
10558
10893
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
10559
10894
|
const selectedValue = useTabsValue();
|
|
10560
10895
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10561
|
-
const buttonRef = (0,
|
|
10896
|
+
const buttonRef = (0, import_react56.useRef)(null);
|
|
10562
10897
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
10563
|
-
(0,
|
|
10898
|
+
(0, import_react56.useEffect)(() => {
|
|
10564
10899
|
const buttonElem = buttonRef.current;
|
|
10565
10900
|
if (!buttonElem) {
|
|
10566
10901
|
return void 0;
|
|
@@ -10585,12 +10920,12 @@ var TabItem = (0, import_react49.forwardRef)(
|
|
|
10585
10920
|
resizeObserver.disconnect();
|
|
10586
10921
|
};
|
|
10587
10922
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10588
|
-
return /* @__PURE__ */ (0,
|
|
10923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(
|
|
10589
10924
|
StyledTabItem,
|
|
10590
10925
|
{
|
|
10591
10926
|
ref: combinedRef,
|
|
10592
|
-
$hasLabel: (0,
|
|
10593
|
-
"aria-label": (0,
|
|
10927
|
+
$hasLabel: (0, import_type_guards40.isNotNil)(label),
|
|
10928
|
+
"aria-label": (0, import_type_guards40.isNotNil)(label) ? void 0 : ariaLabel,
|
|
10594
10929
|
disabled,
|
|
10595
10930
|
value,
|
|
10596
10931
|
children: [
|
|
@@ -10604,16 +10939,16 @@ var TabItem = (0, import_react49.forwardRef)(
|
|
|
10604
10939
|
TabItem.displayName = "TabItem";
|
|
10605
10940
|
|
|
10606
10941
|
// src/components/Tabs/extractTabItems.ts
|
|
10607
|
-
var
|
|
10942
|
+
var import_react57 = require("react");
|
|
10608
10943
|
var extractTabItems = (children) => {
|
|
10609
10944
|
const tabItems = [];
|
|
10610
|
-
|
|
10611
|
-
if (!(0,
|
|
10945
|
+
import_react57.Children.forEach(children, (child) => {
|
|
10946
|
+
if (!(0, import_react57.isValidElement)(child)) {
|
|
10612
10947
|
return;
|
|
10613
10948
|
}
|
|
10614
10949
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
10615
10950
|
tabItems.push(child);
|
|
10616
|
-
} else if (child.type ===
|
|
10951
|
+
} else if (child.type === import_react57.Fragment) {
|
|
10617
10952
|
const fragmentElement = child;
|
|
10618
10953
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
10619
10954
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -10626,10 +10961,10 @@ var extractTabItems = (children) => {
|
|
|
10626
10961
|
};
|
|
10627
10962
|
|
|
10628
10963
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
10629
|
-
var
|
|
10630
|
-
var
|
|
10631
|
-
var
|
|
10632
|
-
var TabsSelectedItemIndicatorDiv = (0,
|
|
10964
|
+
var import_react58 = require("react");
|
|
10965
|
+
var import_styled_components78 = __toESM(require("styled-components"));
|
|
10966
|
+
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
10967
|
+
var TabsSelectedItemIndicatorDiv = (0, import_styled_components78.default)(SelectedItemIndicatorDiv)`
|
|
10633
10968
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
10634
10969
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
10635
10970
|
}
|
|
@@ -10637,7 +10972,7 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components69.default)(Selec
|
|
|
10637
10972
|
var SelectedItemIndicator2 = () => {
|
|
10638
10973
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10639
10974
|
const selectedValue = useTabsValue();
|
|
10640
|
-
const selectedItemIndicatorStyle = (0,
|
|
10975
|
+
const selectedItemIndicatorStyle = (0, import_react58.useMemo)(
|
|
10641
10976
|
() => selectedItemMeasurements != null ? {
|
|
10642
10977
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
10643
10978
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -10648,7 +10983,7 @@ var SelectedItemIndicator2 = () => {
|
|
|
10648
10983
|
if (selectedValue == null) {
|
|
10649
10984
|
return null;
|
|
10650
10985
|
}
|
|
10651
|
-
return /* @__PURE__ */ (0,
|
|
10986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
|
|
10652
10987
|
TabsSelectedItemIndicatorDiv,
|
|
10653
10988
|
{
|
|
10654
10989
|
style: {
|
|
@@ -10661,8 +10996,8 @@ var SelectedItemIndicator2 = () => {
|
|
|
10661
10996
|
};
|
|
10662
10997
|
|
|
10663
10998
|
// src/components/Tabs/Tabs.tsx
|
|
10664
|
-
var
|
|
10665
|
-
var Tabs = (0,
|
|
10999
|
+
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
11000
|
+
var Tabs = (0, import_react59.forwardRef)(
|
|
10666
11001
|
({
|
|
10667
11002
|
children,
|
|
10668
11003
|
fullWidth = true,
|
|
@@ -10673,30 +11008,30 @@ var Tabs = (0, import_react52.forwardRef)(
|
|
|
10673
11008
|
...otherProps
|
|
10674
11009
|
}, ref) => {
|
|
10675
11010
|
const tabItems = extractTabItems(children);
|
|
10676
|
-
const [internalSelectedValue, setInternalSelectedValue] = (0,
|
|
11011
|
+
const [internalSelectedValue, setInternalSelectedValue] = (0, import_react59.useState)(defaultSelectedValue);
|
|
10677
11012
|
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
10678
11013
|
defaultValue: defaultSelectedValue,
|
|
10679
11014
|
onValueChange: setInternalSelectedValue
|
|
10680
11015
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
10681
|
-
return /* @__PURE__ */ (0,
|
|
11016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
10682
11017
|
import_react_tabs4.Root,
|
|
10683
11018
|
{
|
|
10684
11019
|
ref,
|
|
10685
11020
|
activationMode: "automatic",
|
|
10686
11021
|
...otherProps,
|
|
10687
11022
|
...modeProps,
|
|
10688
|
-
children: /* @__PURE__ */ (0,
|
|
11023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
10689
11024
|
TabsValueProvider,
|
|
10690
11025
|
{
|
|
10691
11026
|
value: defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue,
|
|
10692
|
-
children: /* @__PURE__ */ (0,
|
|
10693
|
-
/* @__PURE__ */ (0,
|
|
11027
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
11028
|
+
/* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(
|
|
10694
11029
|
TabList,
|
|
10695
11030
|
{
|
|
10696
11031
|
ariaLabel,
|
|
10697
11032
|
fullWidth,
|
|
10698
11033
|
children: [
|
|
10699
|
-
/* @__PURE__ */ (0,
|
|
11034
|
+
/* @__PURE__ */ (0, import_jsx_runtime257.jsx)(SelectedItemIndicator2, {}),
|
|
10700
11035
|
tabItems.map((tab) => {
|
|
10701
11036
|
const {
|
|
10702
11037
|
value,
|
|
@@ -10705,8 +11040,8 @@ var Tabs = (0, import_react52.forwardRef)(
|
|
|
10705
11040
|
label,
|
|
10706
11041
|
"aria-label": ariaLabelForTab
|
|
10707
11042
|
} = tab.props;
|
|
10708
|
-
if ((0,
|
|
10709
|
-
return /* @__PURE__ */ (0,
|
|
11043
|
+
if ((0, import_type_guards41.isNil)(icon)) {
|
|
11044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
10710
11045
|
TabItem,
|
|
10711
11046
|
{
|
|
10712
11047
|
disabled,
|
|
@@ -10716,8 +11051,8 @@ var Tabs = (0, import_react52.forwardRef)(
|
|
|
10716
11051
|
value
|
|
10717
11052
|
);
|
|
10718
11053
|
}
|
|
10719
|
-
if ((0,
|
|
10720
|
-
return /* @__PURE__ */ (0,
|
|
11054
|
+
if ((0, import_type_guards41.isNotNil)(label)) {
|
|
11055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
10721
11056
|
TabItem,
|
|
10722
11057
|
{
|
|
10723
11058
|
disabled,
|
|
@@ -10728,8 +11063,8 @@ var Tabs = (0, import_react52.forwardRef)(
|
|
|
10728
11063
|
value
|
|
10729
11064
|
);
|
|
10730
11065
|
}
|
|
10731
|
-
if ((0,
|
|
10732
|
-
return /* @__PURE__ */ (0,
|
|
11066
|
+
if ((0, import_type_guards41.isNotNil)(ariaLabelForTab)) {
|
|
11067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
10733
11068
|
TabItem,
|
|
10734
11069
|
{
|
|
10735
11070
|
"aria-label": ariaLabelForTab,
|
|
@@ -10745,7 +11080,7 @@ var Tabs = (0, import_react52.forwardRef)(
|
|
|
10745
11080
|
]
|
|
10746
11081
|
}
|
|
10747
11082
|
),
|
|
10748
|
-
tabItems.map((tab) => /* @__PURE__ */ (0,
|
|
11083
|
+
tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
10749
11084
|
TabPanel,
|
|
10750
11085
|
{
|
|
10751
11086
|
value: tab.props.value,
|
|
@@ -10763,19 +11098,19 @@ var Tabs = (0, import_react52.forwardRef)(
|
|
|
10763
11098
|
Tabs.displayName = "Tabs";
|
|
10764
11099
|
|
|
10765
11100
|
// src/components/Tabs/Tab.tsx
|
|
10766
|
-
var
|
|
10767
|
-
var
|
|
10768
|
-
var Tab = (0,
|
|
10769
|
-
return /* @__PURE__ */ (0,
|
|
11101
|
+
var import_react60 = require("react");
|
|
11102
|
+
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
11103
|
+
var Tab = (0, import_react60.forwardRef)(({ children }, ref) => {
|
|
11104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)("div", { ref, children });
|
|
10770
11105
|
});
|
|
10771
11106
|
Tab.displayName = "Tab";
|
|
10772
11107
|
|
|
10773
11108
|
// src/components/Tag/Tag.tsx
|
|
10774
|
-
var
|
|
10775
|
-
var
|
|
10776
|
-
var
|
|
10777
|
-
var
|
|
10778
|
-
var TagLabel =
|
|
11109
|
+
var import_react61 = require("react");
|
|
11110
|
+
var import_styled_components79 = __toESM(require("styled-components"));
|
|
11111
|
+
var import_type_guards42 = require("@wistia/type-guards");
|
|
11112
|
+
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
11113
|
+
var TagLabel = import_styled_components79.default.a`
|
|
10779
11114
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10780
11115
|
font-size: var(--wui-typography-label-4-size);
|
|
10781
11116
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -10803,14 +11138,14 @@ var TagLabel = import_styled_components70.default.a`
|
|
|
10803
11138
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
10804
11139
|
}
|
|
10805
11140
|
`;
|
|
10806
|
-
var TagDivider =
|
|
11141
|
+
var TagDivider = import_styled_components79.default.div`
|
|
10807
11142
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10808
11143
|
border-left: 1px solid var(--wui-color-border);
|
|
10809
11144
|
display: flex;
|
|
10810
11145
|
height: 14px;
|
|
10811
11146
|
width: 1px;
|
|
10812
11147
|
`;
|
|
10813
|
-
var StyledRemoveButton =
|
|
11148
|
+
var StyledRemoveButton = import_styled_components79.default.button`
|
|
10814
11149
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10815
11150
|
all: unset;
|
|
10816
11151
|
cursor: pointer;
|
|
@@ -10838,7 +11173,7 @@ var StyledRemoveButton = import_styled_components70.default.button`
|
|
|
10838
11173
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
10839
11174
|
}
|
|
10840
11175
|
`;
|
|
10841
|
-
var StyledTag =
|
|
11176
|
+
var StyledTag = import_styled_components79.default.div`
|
|
10842
11177
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10843
11178
|
align-items: center;
|
|
10844
11179
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10851,47 +11186,47 @@ var StyledTag = import_styled_components70.default.div`
|
|
|
10851
11186
|
}
|
|
10852
11187
|
`;
|
|
10853
11188
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
10854
|
-
if ((0,
|
|
11189
|
+
if ((0, import_type_guards42.isNil)(onClickRemove)) {
|
|
10855
11190
|
return null;
|
|
10856
11191
|
}
|
|
10857
|
-
if ((0,
|
|
11192
|
+
if ((0, import_type_guards42.isNil)(onClickRemoveLabel)) {
|
|
10858
11193
|
throw new Error(
|
|
10859
11194
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
10860
11195
|
);
|
|
10861
11196
|
}
|
|
10862
|
-
return /* @__PURE__ */ (0,
|
|
10863
|
-
/* @__PURE__ */ (0,
|
|
10864
|
-
/* @__PURE__ */ (0,
|
|
11197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(import_jsx_runtime259.Fragment, { children: [
|
|
11198
|
+
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
11199
|
+
/* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(
|
|
10865
11200
|
StyledRemoveButton,
|
|
10866
11201
|
{
|
|
10867
11202
|
$colorScheme: colorScheme,
|
|
10868
11203
|
onClick: onClickRemove,
|
|
10869
11204
|
type: "button",
|
|
10870
11205
|
children: [
|
|
10871
|
-
/* @__PURE__ */ (0,
|
|
11206
|
+
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
10872
11207
|
Icon,
|
|
10873
11208
|
{
|
|
10874
11209
|
size: "sm",
|
|
10875
11210
|
type: "close"
|
|
10876
11211
|
}
|
|
10877
11212
|
),
|
|
10878
|
-
/* @__PURE__ */ (0,
|
|
11213
|
+
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
10879
11214
|
]
|
|
10880
11215
|
}
|
|
10881
11216
|
)
|
|
10882
11217
|
] });
|
|
10883
11218
|
};
|
|
10884
|
-
var Tag = (0,
|
|
11219
|
+
var Tag = (0, import_react61.forwardRef)(
|
|
10885
11220
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
10886
|
-
const labelProps = (0,
|
|
10887
|
-
return /* @__PURE__ */ (0,
|
|
11221
|
+
const labelProps = (0, import_type_guards42.isNotNil)(href) && (0, import_type_guards42.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
11222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(
|
|
10888
11223
|
StyledTag,
|
|
10889
11224
|
{
|
|
10890
11225
|
ref,
|
|
10891
11226
|
$colorScheme: colorScheme,
|
|
10892
11227
|
...otherProps,
|
|
10893
11228
|
children: [
|
|
10894
|
-
/* @__PURE__ */ (0,
|
|
11229
|
+
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
10895
11230
|
TagLabel,
|
|
10896
11231
|
{
|
|
10897
11232
|
...labelProps,
|
|
@@ -10899,7 +11234,7 @@ var Tag = (0, import_react54.forwardRef)(
|
|
|
10899
11234
|
children: label
|
|
10900
11235
|
}
|
|
10901
11236
|
),
|
|
10902
|
-
/* @__PURE__ */ (0,
|
|
11237
|
+
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
10903
11238
|
RemoveButton,
|
|
10904
11239
|
{
|
|
10905
11240
|
colorScheme,
|
|
@@ -10915,26 +11250,26 @@ var Tag = (0, import_react54.forwardRef)(
|
|
|
10915
11250
|
Tag.displayName = "Tag";
|
|
10916
11251
|
|
|
10917
11252
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
10918
|
-
var
|
|
10919
|
-
var
|
|
10920
|
-
var
|
|
11253
|
+
var import_styled_components80 = __toESM(require("styled-components"));
|
|
11254
|
+
var import_type_guards43 = require("@wistia/type-guards");
|
|
11255
|
+
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
10921
11256
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
10922
11257
|
if (iconOnly) {
|
|
10923
|
-
return /* @__PURE__ */ (0,
|
|
11258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
|
|
10924
11259
|
"g",
|
|
10925
11260
|
{
|
|
10926
11261
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
10927
11262
|
fill: brandmarkColor,
|
|
10928
|
-
children: /* @__PURE__ */ (0,
|
|
11263
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
10929
11264
|
}
|
|
10930
11265
|
);
|
|
10931
11266
|
}
|
|
10932
|
-
return /* @__PURE__ */ (0,
|
|
11267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
|
|
10933
11268
|
"g",
|
|
10934
11269
|
{
|
|
10935
11270
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
10936
11271
|
fill: brandmarkColor,
|
|
10937
|
-
children: /* @__PURE__ */ (0,
|
|
11272
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
10938
11273
|
}
|
|
10939
11274
|
);
|
|
10940
11275
|
};
|
|
@@ -10942,12 +11277,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
10942
11277
|
if (iconOnly) {
|
|
10943
11278
|
return null;
|
|
10944
11279
|
}
|
|
10945
|
-
return /* @__PURE__ */ (0,
|
|
11280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
|
|
10946
11281
|
"g",
|
|
10947
11282
|
{
|
|
10948
11283
|
"data-testid": "ui-wistia-logo-logotype",
|
|
10949
11284
|
fill: logotypeColor,
|
|
10950
|
-
children: /* @__PURE__ */ (0,
|
|
11285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
|
|
10951
11286
|
}
|
|
10952
11287
|
);
|
|
10953
11288
|
};
|
|
@@ -10957,7 +11292,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
10957
11292
|
}
|
|
10958
11293
|
return "0 0 144 31.47";
|
|
10959
11294
|
};
|
|
10960
|
-
var WistiaLogoComponent =
|
|
11295
|
+
var WistiaLogoComponent = import_styled_components80.default.svg`
|
|
10961
11296
|
height: ${({ height }) => `${height}px`};
|
|
10962
11297
|
|
|
10963
11298
|
/* ensure it will always fit on mobile */
|
|
@@ -10973,12 +11308,12 @@ var WistiaLogoComponent = import_styled_components71.default.svg`
|
|
|
10973
11308
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
10974
11309
|
if ($opticallyCentered) {
|
|
10975
11310
|
if ($iconOnly) {
|
|
10976
|
-
return
|
|
11311
|
+
return import_styled_components80.css`
|
|
10977
11312
|
aspect-ratio: 1;
|
|
10978
11313
|
padding: 11.85% 3.12% 13.91%;
|
|
10979
11314
|
`;
|
|
10980
11315
|
}
|
|
10981
|
-
return
|
|
11316
|
+
return import_styled_components80.css`
|
|
10982
11317
|
aspect-ratio: 127 / 32;
|
|
10983
11318
|
`;
|
|
10984
11319
|
}
|
|
@@ -11015,7 +11350,7 @@ var WistiaLogo = ({
|
|
|
11015
11350
|
};
|
|
11016
11351
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
11017
11352
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
11018
|
-
const Logo = /* @__PURE__ */ (0,
|
|
11353
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(
|
|
11019
11354
|
WistiaLogoComponent,
|
|
11020
11355
|
{
|
|
11021
11356
|
$hoverColor: hoverColor,
|
|
@@ -11028,258 +11363,16 @@ var WistiaLogo = ({
|
|
|
11028
11363
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11029
11364
|
...otherProps,
|
|
11030
11365
|
children: [
|
|
11031
|
-
/* @__PURE__ */ (0,
|
|
11032
|
-
(0,
|
|
11366
|
+
/* @__PURE__ */ (0, import_jsx_runtime260.jsx)("title", { children: title }),
|
|
11367
|
+
(0, import_type_guards43.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("desc", { children: description }) : null,
|
|
11033
11368
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
11034
11369
|
renderLogotype(logotypeColor, iconOnly)
|
|
11035
11370
|
]
|
|
11036
11371
|
}
|
|
11037
11372
|
);
|
|
11038
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
11373
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("a", { href, children: Logo }) : Logo;
|
|
11039
11374
|
};
|
|
11040
11375
|
WistiaLogo.displayName = "WistiaLogo";
|
|
11041
|
-
|
|
11042
|
-
// src/components/Select/Select.tsx
|
|
11043
|
-
var import_react_select = require("@radix-ui/react-select");
|
|
11044
|
-
var import_react55 = require("react");
|
|
11045
|
-
var import_styled_components72 = __toESM(require("styled-components"));
|
|
11046
|
-
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
11047
|
-
var StyledTrigger = (0, import_styled_components72.default)(import_react_select.Trigger)`
|
|
11048
|
-
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11049
|
-
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
11050
|
-
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
11051
|
-
--wui-select-color-border: var(--wui-color-border);
|
|
11052
|
-
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
11053
|
-
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
11054
|
-
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
11055
|
-
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
11056
|
-
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
11057
|
-
--wui-select-vertical-padding: var(--wui-space-02);
|
|
11058
|
-
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
11059
|
-
--wui-select-placeholder: var(--wui-gray-10);
|
|
11060
|
-
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
11061
|
-
|
|
11062
|
-
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
11063
|
-
background-color: var(--wui-select-color-bg);
|
|
11064
|
-
border: 1px solid var(--wui-select-color-border);
|
|
11065
|
-
border-radius: var(--wui-select-border-radius);
|
|
11066
|
-
min-width: 200px;
|
|
11067
|
-
text-align: left;
|
|
11068
|
-
display: inline-flex;
|
|
11069
|
-
align-items: center;
|
|
11070
|
-
justify-content: space-between;
|
|
11071
|
-
max-width: 100%;
|
|
11072
|
-
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
11073
|
-
|
|
11074
|
-
> span {
|
|
11075
|
-
white-space: nowrap;
|
|
11076
|
-
text-overflow: ellipsis;
|
|
11077
|
-
overflow: hidden;
|
|
11078
|
-
}
|
|
11079
|
-
|
|
11080
|
-
&[aria-expanded='true'],
|
|
11081
|
-
&:focus {
|
|
11082
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
11083
|
-
}
|
|
11084
|
-
|
|
11085
|
-
&[aria-invalid='true'] {
|
|
11086
|
-
outline: 2px solid var(--wui-select-color-border-error);
|
|
11087
|
-
color: var(--wui-select-color-text-error);
|
|
11088
|
-
}
|
|
11089
|
-
|
|
11090
|
-
&:disabled {
|
|
11091
|
-
border-color: var(--wui-color-bg-surface-disabled);
|
|
11092
|
-
background-color: var(--wui-color-bg-surface-disabled);
|
|
11093
|
-
}
|
|
11094
|
-
`;
|
|
11095
|
-
var StyledContent3 = (0, import_styled_components72.default)(import_react_select.Content)`
|
|
11096
|
-
--wui-select-content-border: var(--wui-color-border);
|
|
11097
|
-
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
11098
|
-
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
11099
|
-
--wui-select-option-padding: var(--wui-space-02);
|
|
11100
|
-
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
11101
|
-
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
11102
|
-
|
|
11103
|
-
overflow: hidden;
|
|
11104
|
-
transform: translateY(8px);
|
|
11105
|
-
background-color: var(--wui-select-content-bg);
|
|
11106
|
-
border: 1px solid var(--wui-select-content-border);
|
|
11107
|
-
border-radius: var(--wui-select-content-border-radius);
|
|
11108
|
-
padding: var(--wui-select-option-padding);
|
|
11109
|
-
min-width: var(--radix-select-trigger-width);
|
|
11110
|
-
max-height: var(--radix-select-content-available-height);
|
|
11111
|
-
z-index: var(--wui-zindex-select);
|
|
11112
|
-
`;
|
|
11113
|
-
var Select = (0, import_react55.forwardRef)(
|
|
11114
|
-
({
|
|
11115
|
-
colorScheme = "inherit",
|
|
11116
|
-
children,
|
|
11117
|
-
onChange = () => null,
|
|
11118
|
-
placeholder = "Select...",
|
|
11119
|
-
fullWidth = false,
|
|
11120
|
-
...props
|
|
11121
|
-
}, forwardedRef) => {
|
|
11122
|
-
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
11123
|
-
return /* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(
|
|
11124
|
-
import_react_select.Root,
|
|
11125
|
-
{
|
|
11126
|
-
...props,
|
|
11127
|
-
onValueChange: onChange,
|
|
11128
|
-
children: [
|
|
11129
|
-
/* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(
|
|
11130
|
-
StyledTrigger,
|
|
11131
|
-
{
|
|
11132
|
-
ref: forwardedRef,
|
|
11133
|
-
$colorScheme: colorScheme,
|
|
11134
|
-
$fullWidth: responsiveFullWidth,
|
|
11135
|
-
...props,
|
|
11136
|
-
children: [
|
|
11137
|
-
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Value, { placeholder }),
|
|
11138
|
-
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
|
|
11139
|
-
Icon,
|
|
11140
|
-
{
|
|
11141
|
-
size: "md",
|
|
11142
|
-
type: "caret-down"
|
|
11143
|
-
}
|
|
11144
|
-
)
|
|
11145
|
-
]
|
|
11146
|
-
}
|
|
11147
|
-
),
|
|
11148
|
-
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(StyledContent3, { position: "popper", children: [
|
|
11149
|
-
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(Icon, { type: "caret-up" }) }),
|
|
11150
|
-
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Viewport, { children }),
|
|
11151
|
-
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(Icon, { type: "caret-down" }) })
|
|
11152
|
-
] }) })
|
|
11153
|
-
]
|
|
11154
|
-
}
|
|
11155
|
-
);
|
|
11156
|
-
}
|
|
11157
|
-
);
|
|
11158
|
-
Select.displayName = "Select";
|
|
11159
|
-
|
|
11160
|
-
// src/components/Select/SelectOption.tsx
|
|
11161
|
-
var import_react_select2 = require("@radix-ui/react-select");
|
|
11162
|
-
var import_react56 = require("react");
|
|
11163
|
-
var import_styled_components73 = __toESM(require("styled-components"));
|
|
11164
|
-
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11165
|
-
var StyledItem = (0, import_styled_components73.default)(import_react_select2.Item)`
|
|
11166
|
-
${variantStyleMap2.body3};
|
|
11167
|
-
display: flex;
|
|
11168
|
-
padding: var(--wui-select-option-padding);
|
|
11169
|
-
gap: var(--wui-select-option-inner-gap);
|
|
11170
|
-
font-size: var(--font-size);
|
|
11171
|
-
font-weight: var(--font-weight);
|
|
11172
|
-
border-radius: var(--wui-border-radius-01);
|
|
11173
|
-
|
|
11174
|
-
&:hover,
|
|
11175
|
-
&:focus-visible {
|
|
11176
|
-
background-color: var(--wui-select-option-bg-hover);
|
|
11177
|
-
outline: none;
|
|
11178
|
-
}
|
|
11179
|
-
|
|
11180
|
-
&[aria-disabled='true'] {
|
|
11181
|
-
color: var(--wui-color-text-disabled);
|
|
11182
|
-
}
|
|
11183
|
-
|
|
11184
|
-
&[aria-disabled='true']:hover {
|
|
11185
|
-
background-color: transparent;
|
|
11186
|
-
}
|
|
11187
|
-
`;
|
|
11188
|
-
var StyledIconContainer = import_styled_components73.default.span`
|
|
11189
|
-
width: 12px;
|
|
11190
|
-
`;
|
|
11191
|
-
var SelectOption = (0, import_react56.forwardRef)(
|
|
11192
|
-
({ children, ...props }, forwardedRef) => {
|
|
11193
|
-
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
11194
|
-
StyledItem,
|
|
11195
|
-
{
|
|
11196
|
-
...props,
|
|
11197
|
-
ref: forwardedRef,
|
|
11198
|
-
children: [
|
|
11199
|
-
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
11200
|
-
Icon,
|
|
11201
|
-
{
|
|
11202
|
-
size: "sm",
|
|
11203
|
-
type: "checkmark"
|
|
11204
|
-
}
|
|
11205
|
-
) }) }),
|
|
11206
|
-
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children })
|
|
11207
|
-
]
|
|
11208
|
-
}
|
|
11209
|
-
);
|
|
11210
|
-
}
|
|
11211
|
-
);
|
|
11212
|
-
SelectOption.displayName = "Option";
|
|
11213
|
-
|
|
11214
|
-
// src/components/Select/SelectOptionGroup.tsx
|
|
11215
|
-
var import_react_select3 = require("@radix-ui/react-select");
|
|
11216
|
-
var import_styled_components74 = __toESM(require("styled-components"));
|
|
11217
|
-
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
11218
|
-
var StyledLabel4 = (0, import_styled_components74.default)(import_react_select3.Label)`
|
|
11219
|
-
padding: var(--wui-select-option-padding);
|
|
11220
|
-
`;
|
|
11221
|
-
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
11222
|
-
return /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
11223
|
-
/* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
|
|
11224
|
-
Text,
|
|
11225
|
-
{
|
|
11226
|
-
prominence: "secondary",
|
|
11227
|
-
variant: "body3",
|
|
11228
|
-
children: label
|
|
11229
|
-
}
|
|
11230
|
-
) }),
|
|
11231
|
-
children
|
|
11232
|
-
] });
|
|
11233
|
-
};
|
|
11234
|
-
|
|
11235
|
-
// src/components/Image/Image.tsx
|
|
11236
|
-
var import_styled_components75 = __toESM(require("styled-components"));
|
|
11237
|
-
var import_type_guards43 = require("@wistia/type-guards");
|
|
11238
|
-
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
11239
|
-
var getFillStyle2 = (fillContainer) => {
|
|
11240
|
-
if (fillContainer === "horizontal") {
|
|
11241
|
-
return "width: 100%;";
|
|
11242
|
-
}
|
|
11243
|
-
if (fillContainer === "vertical") {
|
|
11244
|
-
return "height: 100%;";
|
|
11245
|
-
}
|
|
11246
|
-
if (fillContainer === true) {
|
|
11247
|
-
return `
|
|
11248
|
-
width: 100%;
|
|
11249
|
-
height: 100%;
|
|
11250
|
-
`;
|
|
11251
|
-
}
|
|
11252
|
-
return void 0;
|
|
11253
|
-
};
|
|
11254
|
-
var StyledImage = import_styled_components75.default.img`
|
|
11255
|
-
border-radius: ${({ $borderRadius }) => (0, import_type_guards43.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
11256
|
-
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
11257
|
-
object-fit: ${({ $objFit }) => $objFit};
|
|
11258
|
-
object-position: ${({ $objPosition }) => $objPosition};
|
|
11259
|
-
`;
|
|
11260
|
-
var Image = ({
|
|
11261
|
-
src,
|
|
11262
|
-
alt,
|
|
11263
|
-
borderRadius,
|
|
11264
|
-
fill: fillContainer = false,
|
|
11265
|
-
fit: objFit,
|
|
11266
|
-
loading = "lazy",
|
|
11267
|
-
position: objPosition,
|
|
11268
|
-
...otherProps
|
|
11269
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11270
|
-
StyledImage,
|
|
11271
|
-
{
|
|
11272
|
-
$borderRadius: borderRadius,
|
|
11273
|
-
$fillContainer: fillContainer,
|
|
11274
|
-
$objFit: objFit,
|
|
11275
|
-
$objPosition: objPosition,
|
|
11276
|
-
alt,
|
|
11277
|
-
loading,
|
|
11278
|
-
src,
|
|
11279
|
-
...otherProps
|
|
11280
|
-
}
|
|
11281
|
-
);
|
|
11282
|
-
Image.displayName = "Image";
|
|
11283
11376
|
// Annotate the CommonJS export names for ESM import in node:
|
|
11284
11377
|
0 && (module.exports = {
|
|
11285
11378
|
ActionButton,
|
|
@@ -11340,6 +11433,12 @@ Image.displayName = "Image";
|
|
|
11340
11433
|
Stack,
|
|
11341
11434
|
SubMenu,
|
|
11342
11435
|
Tab,
|
|
11436
|
+
Table,
|
|
11437
|
+
TableBody,
|
|
11438
|
+
TableCell,
|
|
11439
|
+
TableFooter,
|
|
11440
|
+
TableHead,
|
|
11441
|
+
TableRow,
|
|
11343
11442
|
Tabs,
|
|
11344
11443
|
Tag,
|
|
11345
11444
|
Text,
|