@wistia/ui 0.8.8 → 0.8.9-beta.8e513df6.87f52b0
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 +1027 -914
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +135 -122
- package/dist/index.d.ts +135 -122
- package/dist/index.mjs +746 -636
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.8.
|
|
3
|
+
* @license @wistia/ui v0.8.9-beta.8e513df6.87f52b0
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -113,6 +113,7 @@ __export(index_exports, {
|
|
|
113
113
|
Text: () => Text,
|
|
114
114
|
Thumbnail: () => Thumbnail,
|
|
115
115
|
ThumbnailBadge: () => ThumbnailBadge,
|
|
116
|
+
ThumbnailCollage: () => ThumbnailCollage,
|
|
116
117
|
Tooltip: () => Tooltip,
|
|
117
118
|
UIProvider: () => UIProvider,
|
|
118
119
|
WistiaLogo: () => WistiaLogo,
|
|
@@ -141,6 +142,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
141
142
|
|
|
142
143
|
// src/providers/UIProvider/UIProvider.tsx
|
|
143
144
|
var import_react_tooltip = require("@radix-ui/react-tooltip");
|
|
145
|
+
var import_react3 = require("react");
|
|
144
146
|
|
|
145
147
|
// src/css/GlobalStyle.tsx
|
|
146
148
|
var import_styled_components12 = require("styled-components");
|
|
@@ -1599,12 +1601,17 @@ var ToastProvider = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_so
|
|
|
1599
1601
|
|
|
1600
1602
|
// src/providers/UIProvider/UIProvider.tsx
|
|
1601
1603
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1604
|
+
var UIProviderNestingContext = (0, import_react3.createContext)(false);
|
|
1602
1605
|
var UIProvider = ({ children }) => {
|
|
1603
|
-
|
|
1606
|
+
const isNested = (0, import_react3.useContext)(UIProviderNestingContext);
|
|
1607
|
+
if (isNested) {
|
|
1608
|
+
console.warn("UIProvider is nested. Only one instance of UIProvider.");
|
|
1609
|
+
}
|
|
1610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(UIProviderNestingContext.Provider, { value: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AriaLiveProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_tooltip.Provider, { children: [
|
|
1604
1611
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(GlobalStyle, {}),
|
|
1605
1612
|
children,
|
|
1606
1613
|
process.env["NODE_ENV"] !== "test" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ToastProvider, {})
|
|
1607
|
-
] }) });
|
|
1614
|
+
] }) }) });
|
|
1608
1615
|
};
|
|
1609
1616
|
|
|
1610
1617
|
// src/helpers/copyToClipboard/copyToClipboard.ts
|
|
@@ -2072,10 +2079,10 @@ var mq = {
|
|
|
2072
2079
|
};
|
|
2073
2080
|
|
|
2074
2081
|
// src/hooks/useAriaLive/useAriaLive.tsx
|
|
2075
|
-
var
|
|
2082
|
+
var import_react4 = require("react");
|
|
2076
2083
|
var import_type_guards6 = require("@wistia/type-guards");
|
|
2077
2084
|
var useAriaLive = () => {
|
|
2078
|
-
const context = (0,
|
|
2085
|
+
const context = (0, import_react4.useContext)(AriaLiveContext);
|
|
2079
2086
|
if ((0, import_type_guards6.isNil)(context)) {
|
|
2080
2087
|
throw new Error("useAriaLive must be used within an AriaLiveProvider");
|
|
2081
2088
|
}
|
|
@@ -2083,12 +2090,12 @@ var useAriaLive = () => {
|
|
|
2083
2090
|
};
|
|
2084
2091
|
|
|
2085
2092
|
// src/hooks/useBoolean/useBoolean.ts
|
|
2086
|
-
var
|
|
2093
|
+
var import_react5 = require("react");
|
|
2087
2094
|
var useBoolean = (initialValue = false) => {
|
|
2088
|
-
const [value, setValue] = (0,
|
|
2089
|
-
const toggle = (0,
|
|
2090
|
-
const setTrue = (0,
|
|
2091
|
-
const setFalse = (0,
|
|
2095
|
+
const [value, setValue] = (0, import_react5.useState)(initialValue);
|
|
2096
|
+
const toggle = (0, import_react5.useCallback)(() => setValue((val) => !val), []);
|
|
2097
|
+
const setTrue = (0, import_react5.useCallback)(() => setValue(true), []);
|
|
2098
|
+
const setFalse = (0, import_react5.useCallback)(() => setValue(false), []);
|
|
2092
2099
|
return [value, toggle, setTrue, setFalse, setValue];
|
|
2093
2100
|
};
|
|
2094
2101
|
|
|
@@ -2097,10 +2104,10 @@ var import_use_file_picker = require("use-file-picker");
|
|
|
2097
2104
|
var import_validators = require("use-file-picker/validators");
|
|
2098
2105
|
|
|
2099
2106
|
// src/hooks/useKey/useKey.ts
|
|
2100
|
-
var
|
|
2107
|
+
var import_react7 = require("react");
|
|
2101
2108
|
|
|
2102
2109
|
// src/private/hooks/useEvent/useEvent.ts
|
|
2103
|
-
var
|
|
2110
|
+
var import_react6 = require("react");
|
|
2104
2111
|
|
|
2105
2112
|
// src/private/helpers/isValidRef/isValidRef.ts
|
|
2106
2113
|
var import_type_guards7 = require("@wistia/type-guards");
|
|
@@ -2119,15 +2126,15 @@ var isEventTargetSupported = (eventTarget) => (
|
|
|
2119
2126
|
!!(typeof eventTarget === "object" && eventTarget?.addEventListener)
|
|
2120
2127
|
);
|
|
2121
2128
|
var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
2122
|
-
const savedEventHandler = (0,
|
|
2123
|
-
const savedEventOptions = (0,
|
|
2124
|
-
(0,
|
|
2129
|
+
const savedEventHandler = (0, import_react6.useRef)();
|
|
2130
|
+
const savedEventOptions = (0, import_react6.useRef)();
|
|
2131
|
+
(0, import_react6.useEffect)(() => {
|
|
2125
2132
|
savedEventHandler.current = eventHandler;
|
|
2126
2133
|
}, [eventHandler]);
|
|
2127
|
-
(0,
|
|
2134
|
+
(0, import_react6.useEffect)(() => {
|
|
2128
2135
|
savedEventOptions.current = eventOptions;
|
|
2129
2136
|
}, [eventOptions]);
|
|
2130
|
-
(0,
|
|
2137
|
+
(0, import_react6.useEffect)(() => {
|
|
2131
2138
|
const target = isValidRef(eventTarget) ? eventTarget.current : eventTarget;
|
|
2132
2139
|
if (!eventName || !isEventTargetSupported(target)) {
|
|
2133
2140
|
return;
|
|
@@ -2147,7 +2154,7 @@ var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}
|
|
|
2147
2154
|
|
|
2148
2155
|
// src/hooks/useKey/useKey.ts
|
|
2149
2156
|
var useKey = (key, eventHandler, { eventName = "keydown", eventTarget, eventOptions } = {}) => {
|
|
2150
|
-
const memoizedEventHandler = (0,
|
|
2157
|
+
const memoizedEventHandler = (0, import_react7.useCallback)(
|
|
2151
2158
|
(handlerEvent) => {
|
|
2152
2159
|
if (["INPUT", "TEXTAREA", "SELECT"].includes(document.activeElement?.nodeName ?? "") || document.activeElement?.isContentEditable) {
|
|
2153
2160
|
return;
|
|
@@ -2172,9 +2179,9 @@ var useKey = (key, eventHandler, { eventName = "keydown", eventTarget, eventOpti
|
|
|
2172
2179
|
};
|
|
2173
2180
|
|
|
2174
2181
|
// src/hooks/useLocalStorage/useLocalStorage.ts
|
|
2175
|
-
var
|
|
2182
|
+
var import_react8 = require("react");
|
|
2176
2183
|
var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
|
|
2177
|
-
const [storedValue, setStoredValue] = (0,
|
|
2184
|
+
const [storedValue, setStoredValue] = (0, import_react8.useState)(() => {
|
|
2178
2185
|
try {
|
|
2179
2186
|
const item = storage.getItem(key);
|
|
2180
2187
|
return item !== null && !!item ? JSON.parse(item) : initialValue;
|
|
@@ -2200,9 +2207,9 @@ var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
|
|
|
2200
2207
|
};
|
|
2201
2208
|
|
|
2202
2209
|
// src/hooks/useLockBodyScroll/useLockBodyScroll.ts
|
|
2203
|
-
var
|
|
2210
|
+
var import_react9 = require("react");
|
|
2204
2211
|
var useLockBodyScroll = (locked) => {
|
|
2205
|
-
(0,
|
|
2212
|
+
(0, import_react9.useLayoutEffect)(() => {
|
|
2206
2213
|
if (locked) {
|
|
2207
2214
|
const originalStyle = window.getComputedStyle(document.body).overflow;
|
|
2208
2215
|
document.body.style.overflow = "hidden";
|
|
@@ -2215,9 +2222,9 @@ var useLockBodyScroll = (locked) => {
|
|
|
2215
2222
|
};
|
|
2216
2223
|
|
|
2217
2224
|
// src/hooks/useOnClickOutside/useOnClickOutside.ts
|
|
2218
|
-
var
|
|
2225
|
+
var import_react10 = require("react");
|
|
2219
2226
|
var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) => {
|
|
2220
|
-
(0,
|
|
2227
|
+
(0, import_react10.useEffect)(() => {
|
|
2221
2228
|
const listener = (event) => {
|
|
2222
2229
|
if (!ref.current || ref.current.contains(event.target)) {
|
|
2223
2230
|
return;
|
|
@@ -2247,7 +2254,7 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
|
|
|
2247
2254
|
var import_type_guards8 = require("@wistia/type-guards");
|
|
2248
2255
|
|
|
2249
2256
|
// src/hooks/useWindowSize/useWindowSize.ts
|
|
2250
|
-
var
|
|
2257
|
+
var import_react11 = require("react");
|
|
2251
2258
|
var import_throttle_debounce = require("throttle-debounce");
|
|
2252
2259
|
|
|
2253
2260
|
// src/private/helpers/isClient/isClient.ts
|
|
@@ -2255,11 +2262,11 @@ var isClient = () => typeof window !== "undefined" && typeof document !== "undef
|
|
|
2255
2262
|
|
|
2256
2263
|
// src/hooks/useWindowSize/useWindowSize.ts
|
|
2257
2264
|
var useWindowSize = (interval = 0) => {
|
|
2258
|
-
const [dimensions, setDimensions] = (0,
|
|
2265
|
+
const [dimensions, setDimensions] = (0, import_react11.useState)({
|
|
2259
2266
|
width: isClient() ? window.innerWidth : 0,
|
|
2260
2267
|
height: isClient() ? window.innerHeight : 0
|
|
2261
2268
|
});
|
|
2262
|
-
(0,
|
|
2269
|
+
(0, import_react11.useLayoutEffect)(() => {
|
|
2263
2270
|
const handleResize = (0, import_throttle_debounce.debounce)(
|
|
2264
2271
|
interval,
|
|
2265
2272
|
() => setDimensions({
|
|
@@ -2311,19 +2318,30 @@ var useActiveMq = () => {
|
|
|
2311
2318
|
};
|
|
2312
2319
|
|
|
2313
2320
|
// src/hooks/useToast/useToast.tsx
|
|
2314
|
-
var
|
|
2321
|
+
var import_react13 = require("react");
|
|
2315
2322
|
var import_sonner2 = require("sonner");
|
|
2316
2323
|
|
|
2317
2324
|
// src/private/components/Toast/Toast.tsx
|
|
2318
|
-
var
|
|
2319
|
-
var
|
|
2325
|
+
var import_react12 = require("react");
|
|
2326
|
+
var import_styled_components16 = __toESM(require("styled-components"));
|
|
2320
2327
|
var import_type_guards10 = require("@wistia/type-guards");
|
|
2321
2328
|
|
|
2322
2329
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
2323
2330
|
var import_type_guards9 = require("@wistia/type-guards");
|
|
2324
|
-
var
|
|
2331
|
+
var import_styled_components14 = __toESM(require("styled-components"));
|
|
2332
|
+
|
|
2333
|
+
// src/css/lineClampCss.tsx
|
|
2334
|
+
var import_styled_components13 = require("styled-components");
|
|
2335
|
+
var lineClampCss = ($lines = 1) => import_styled_components13.css`
|
|
2336
|
+
-webkit-box-orient: vertical;
|
|
2337
|
+
-webkit-line-clamp: ${$lines};
|
|
2338
|
+
display: -webkit-box !important;
|
|
2339
|
+
white-space: initial;
|
|
2340
|
+
`;
|
|
2341
|
+
|
|
2342
|
+
// src/components/Ellipsis/Ellipsis.tsx
|
|
2325
2343
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
2326
|
-
var ellipsisStyle =
|
|
2344
|
+
var ellipsisStyle = import_styled_components14.css`
|
|
2327
2345
|
overflow: hidden;
|
|
2328
2346
|
text-overflow: ellipsis;
|
|
2329
2347
|
white-space: nowrap;
|
|
@@ -2347,23 +2365,14 @@ var ellipsisStyle = import_styled_components13.css`
|
|
|
2347
2365
|
}
|
|
2348
2366
|
}
|
|
2349
2367
|
`;
|
|
2350
|
-
var
|
|
2351
|
-
-webkit-box-orient: vertical;
|
|
2352
|
-
-webkit-line-clamp: 1;
|
|
2353
|
-
display: -webkit-box !important;
|
|
2354
|
-
white-space: initial;
|
|
2355
|
-
`;
|
|
2356
|
-
var ellipsisFlexParentStyle = import_styled_components13.css`
|
|
2368
|
+
var ellipsisFlexParentStyle = import_styled_components14.css`
|
|
2357
2369
|
min-width: 0;
|
|
2358
2370
|
`;
|
|
2359
|
-
var EllipsisComponent =
|
|
2371
|
+
var EllipsisComponent = import_styled_components14.default.span`
|
|
2360
2372
|
${ellipsisStyle};
|
|
2361
2373
|
${({ $lines }) => {
|
|
2362
2374
|
if ((0, import_type_guards9.isNotNil)($lines)) {
|
|
2363
|
-
return
|
|
2364
|
-
${lineClampStyle};
|
|
2365
|
-
-webkit-line-clamp: ${$lines};
|
|
2366
|
-
`;
|
|
2375
|
+
return lineClampCss($lines);
|
|
2367
2376
|
}
|
|
2368
2377
|
return void 0;
|
|
2369
2378
|
}}
|
|
@@ -2379,7 +2388,7 @@ var Ellipsis = ({ children, lines, ...props }) => /* @__PURE__ */ (0, import_jsx
|
|
|
2379
2388
|
Ellipsis.displayName = "Ellipsis";
|
|
2380
2389
|
|
|
2381
2390
|
// src/private/helpers/getColorScheme/getColorScheme.ts
|
|
2382
|
-
var
|
|
2391
|
+
var import_styled_components15 = require("styled-components");
|
|
2383
2392
|
var colorSchemeSchema = [
|
|
2384
2393
|
{ token: "bg-surface", step: "2" },
|
|
2385
2394
|
{ token: "bg-surface-hover", step: "3" },
|
|
@@ -2406,7 +2415,7 @@ var colorSchemeSchema = [
|
|
|
2406
2415
|
{ token: "icon-on-fill", step: "contrast" },
|
|
2407
2416
|
{ token: "focus-ring", step: "9" }
|
|
2408
2417
|
];
|
|
2409
|
-
var defaultScheme =
|
|
2418
|
+
var defaultScheme = import_styled_components15.css`
|
|
2410
2419
|
--wui-color-bg-surface: var(--wui-gray-1);
|
|
2411
2420
|
--wui-color-bg-surface-hover: var(--wui-gray-3);
|
|
2412
2421
|
--wui-color-bg-surface-active: var(--wui-gray-4);
|
|
@@ -2432,7 +2441,7 @@ var defaultScheme = import_styled_components14.css`
|
|
|
2432
2441
|
--wui-color-icon-on-fill: var(--wui-gray-contrast);
|
|
2433
2442
|
--wui-color-focus-ring: var(--wui-blue-9);
|
|
2434
2443
|
`;
|
|
2435
|
-
var navScheme =
|
|
2444
|
+
var navScheme = import_styled_components15.css`
|
|
2436
2445
|
--wui-color-bg-app: #1e3399;
|
|
2437
2446
|
|
|
2438
2447
|
--wui-color-bg-fill: var(--wui-blue-1);
|
|
@@ -2493,7 +2502,7 @@ var getColorScheme = (colorScheme) => {
|
|
|
2493
2502
|
if (colorScheme === "default") {
|
|
2494
2503
|
return defaultScheme;
|
|
2495
2504
|
}
|
|
2496
|
-
return
|
|
2505
|
+
return import_styled_components15.css`
|
|
2497
2506
|
${colorSchemeSchema.map(({ token, step }) => {
|
|
2498
2507
|
return `--wui-color-${token}: var(--wui-${colorScheme === "info" ? "blue" : colorScheme}-${step});`;
|
|
2499
2508
|
}).join("")}
|
|
@@ -2502,12 +2511,14 @@ var getColorScheme = (colorScheme) => {
|
|
|
2502
2511
|
|
|
2503
2512
|
// src/private/components/Toast/Toast.tsx
|
|
2504
2513
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2505
|
-
var Message = (0,
|
|
2514
|
+
var Message = (0, import_styled_components16.default)(Ellipsis)`
|
|
2506
2515
|
line-height: var(--wui-typography-label-3-line-height);
|
|
2507
2516
|
font-size: var(--wui-typography-label-3-size);
|
|
2508
2517
|
font-weight: var(--wui-typography-label-3-weight);
|
|
2518
|
+
|
|
2519
|
+
${lineClampCss(3)}
|
|
2509
2520
|
`;
|
|
2510
|
-
var MessageWrapper =
|
|
2521
|
+
var MessageWrapper = import_styled_components16.default.div`
|
|
2511
2522
|
display: flex;
|
|
2512
2523
|
flex-grow: 1;
|
|
2513
2524
|
flex-shrink: 1;
|
|
@@ -2520,13 +2531,13 @@ var MessageWrapper = import_styled_components15.default.div`
|
|
|
2520
2531
|
margin-right: var(--wui-space-02); /* space between icon & message */
|
|
2521
2532
|
}
|
|
2522
2533
|
`;
|
|
2523
|
-
var ActionWrapper =
|
|
2534
|
+
var ActionWrapper = import_styled_components16.default.div`
|
|
2524
2535
|
flex-grow: 0;
|
|
2525
2536
|
flex-shrink: 0;
|
|
2526
2537
|
flex-basis: auto;
|
|
2527
2538
|
margin-right: var(--wui-space-03);
|
|
2528
2539
|
`;
|
|
2529
|
-
var StyledToast =
|
|
2540
|
+
var StyledToast = import_styled_components16.default.div`
|
|
2530
2541
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
2531
2542
|
display: flex;
|
|
2532
2543
|
align-items: center;
|
|
@@ -2549,8 +2560,8 @@ var StyledToast = import_styled_components15.default.div`
|
|
|
2549
2560
|
}
|
|
2550
2561
|
`;
|
|
2551
2562
|
var Action = ({ actionButton }) => {
|
|
2552
|
-
if ((0, import_type_guards10.isNotNil)(actionButton) && (0,
|
|
2553
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0,
|
|
2563
|
+
if ((0, import_type_guards10.isNotNil)(actionButton) && (0, import_react12.isValidElement)(actionButton)) {
|
|
2564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react12.cloneElement)(actionButton, {
|
|
2554
2565
|
variant: "soft",
|
|
2555
2566
|
// force Button variant
|
|
2556
2567
|
size: "sm"
|
|
@@ -2586,7 +2597,7 @@ Toast.displayName = "Toast";
|
|
|
2586
2597
|
// src/hooks/useToast/useToast.tsx
|
|
2587
2598
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2588
2599
|
var useToast = () => {
|
|
2589
|
-
return (0,
|
|
2600
|
+
return (0, import_react13.useCallback)(
|
|
2590
2601
|
({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
|
|
2591
2602
|
import_sonner2.toast.custom(
|
|
2592
2603
|
() => {
|
|
@@ -2608,7 +2619,7 @@ var useToast = () => {
|
|
|
2608
2619
|
};
|
|
2609
2620
|
|
|
2610
2621
|
// src/hooks/useFocusTrap/useFocusTrap.ts
|
|
2611
|
-
var
|
|
2622
|
+
var import_react14 = require("react");
|
|
2612
2623
|
var import_type_guards11 = require("@wistia/type-guards");
|
|
2613
2624
|
|
|
2614
2625
|
// src/hooks/useFocusTrap/helpers.ts
|
|
@@ -2758,9 +2769,9 @@ var isRef = (val) => {
|
|
|
2758
2769
|
return val !== null && typeof val === "object" && "current" in val;
|
|
2759
2770
|
};
|
|
2760
2771
|
var useFocusTrap = (active = true, options = {}) => {
|
|
2761
|
-
const ref = (0,
|
|
2762
|
-
const restoreAriaRef = (0,
|
|
2763
|
-
const setRef = (0,
|
|
2772
|
+
const ref = (0, import_react14.useRef)(null);
|
|
2773
|
+
const restoreAriaRef = (0, import_react14.useRef)(null);
|
|
2774
|
+
const setRef = (0, import_react14.useCallback)(
|
|
2764
2775
|
(node) => {
|
|
2765
2776
|
if (restoreAriaRef.current !== null) {
|
|
2766
2777
|
restoreAriaRef.current();
|
|
@@ -2822,7 +2833,7 @@ var useFocusTrap = (active = true, options = {}) => {
|
|
|
2822
2833
|
},
|
|
2823
2834
|
[active, options.focusSelector, options.disableAriaHider]
|
|
2824
2835
|
);
|
|
2825
|
-
(0,
|
|
2836
|
+
(0, import_react14.useEffect)(() => {
|
|
2826
2837
|
if (!active) {
|
|
2827
2838
|
return void 0;
|
|
2828
2839
|
}
|
|
@@ -2840,17 +2851,17 @@ var useFocusTrap = (active = true, options = {}) => {
|
|
|
2840
2851
|
};
|
|
2841
2852
|
|
|
2842
2853
|
// src/components/ActionButton/ActionButton.tsx
|
|
2843
|
-
var
|
|
2844
|
-
var
|
|
2854
|
+
var import_react18 = require("react");
|
|
2855
|
+
var import_styled_components22 = __toESM(require("styled-components"));
|
|
2845
2856
|
|
|
2846
2857
|
// src/components/Button/Button.tsx
|
|
2847
|
-
var
|
|
2848
|
-
var
|
|
2858
|
+
var import_react17 = require("react");
|
|
2859
|
+
var import_styled_components21 = __toESM(require("styled-components"));
|
|
2849
2860
|
var import_type_guards15 = require("@wistia/type-guards");
|
|
2850
2861
|
|
|
2851
2862
|
// src/css/buttonResetCss.tsx
|
|
2852
|
-
var
|
|
2853
|
-
var buttonResetCss =
|
|
2863
|
+
var import_styled_components17 = require("styled-components");
|
|
2864
|
+
var buttonResetCss = import_styled_components17.css`
|
|
2854
2865
|
align-items: center;
|
|
2855
2866
|
background-color: transparent;
|
|
2856
2867
|
background-image: none;
|
|
@@ -2895,8 +2906,8 @@ var buttonResetCss = import_styled_components16.css`
|
|
|
2895
2906
|
`;
|
|
2896
2907
|
|
|
2897
2908
|
// src/components/Button/buttonStyles.tsx
|
|
2898
|
-
var
|
|
2899
|
-
var buttonSmallStyles =
|
|
2909
|
+
var import_styled_components18 = require("styled-components");
|
|
2910
|
+
var buttonSmallStyles = import_styled_components18.css`
|
|
2900
2911
|
--button-padding-vertical: var(--wui-space-01);
|
|
2901
2912
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2902
2913
|
--button-label-padding-horizontal: var(--wui-space-01);
|
|
@@ -2907,7 +2918,7 @@ var buttonSmallStyles = import_styled_components17.css`
|
|
|
2907
2918
|
--button-icon-size: 12px;
|
|
2908
2919
|
--button-label-gap: 4px;
|
|
2909
2920
|
`;
|
|
2910
|
-
var buttonMediumStyles =
|
|
2921
|
+
var buttonMediumStyles = import_styled_components18.css`
|
|
2911
2922
|
--button-padding-vertical: var(--wui-space-02);
|
|
2912
2923
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2913
2924
|
--button-label-padding-horizontal: 6px;
|
|
@@ -2918,7 +2929,7 @@ var buttonMediumStyles = import_styled_components17.css`
|
|
|
2918
2929
|
--button-icon-size: 16px;
|
|
2919
2930
|
--button-label-gap: 6px;
|
|
2920
2931
|
`;
|
|
2921
|
-
var buttonLargeStyles =
|
|
2932
|
+
var buttonLargeStyles = import_styled_components18.css`
|
|
2922
2933
|
--button-padding-vertical: var(--wui-space-02);
|
|
2923
2934
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2924
2935
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2929,7 +2940,7 @@ var buttonLargeStyles = import_styled_components17.css`
|
|
|
2929
2940
|
--button-icon-size: 24px;
|
|
2930
2941
|
--button-label-gap: 8px;
|
|
2931
2942
|
`;
|
|
2932
|
-
var buttonExtraLargeStyles =
|
|
2943
|
+
var buttonExtraLargeStyles = import_styled_components18.css`
|
|
2933
2944
|
--button-padding-vertical: var(--wui-space-03);
|
|
2934
2945
|
--button-padding-horizontal: var(--wui-space-03);
|
|
2935
2946
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2940,34 +2951,34 @@ var buttonExtraLargeStyles = import_styled_components17.css`
|
|
|
2940
2951
|
--button-icon-size: 24px;
|
|
2941
2952
|
--button-label-gap: 8px;
|
|
2942
2953
|
`;
|
|
2943
|
-
var ghostButtonVariant =
|
|
2954
|
+
var ghostButtonVariant = import_styled_components18.css`
|
|
2944
2955
|
--button-color-bg: transparent;
|
|
2945
2956
|
--button-color-bg-hover: var(--wui-color-bg-surface-hover);
|
|
2946
2957
|
--button-color-bg-active: var(--wui-color-bg-surface-active);
|
|
2947
2958
|
--button-color-text: var(--wui-color-text-button);
|
|
2948
2959
|
--button-color-icon: var(--wui-color-icon);
|
|
2949
2960
|
`;
|
|
2950
|
-
var outlineButtonVariant =
|
|
2961
|
+
var outlineButtonVariant = import_styled_components18.css`
|
|
2951
2962
|
${ghostButtonVariant};
|
|
2952
2963
|
--button-color-border: var(--wui-color-border);
|
|
2953
2964
|
|
|
2954
2965
|
box-shadow: 0 0 0 2px var(--button-color-border) inset;
|
|
2955
2966
|
`;
|
|
2956
|
-
var softButtonVariant =
|
|
2967
|
+
var softButtonVariant = import_styled_components18.css`
|
|
2957
2968
|
--button-color-bg: var(--wui-color-bg-surface-secondary);
|
|
2958
2969
|
--button-color-bg-hover: var(--wui-color-bg-surface-secondary-hover);
|
|
2959
2970
|
--button-color-bg-active: var(--wui-color-bg-surface-secondary-active);
|
|
2960
2971
|
--button-color-text: var(--wui-color-text-button);
|
|
2961
2972
|
--button-color-icon: var(--wui-color-icon);
|
|
2962
2973
|
`;
|
|
2963
|
-
var solidButtonVariant =
|
|
2974
|
+
var solidButtonVariant = import_styled_components18.css`
|
|
2964
2975
|
--button-color-bg: var(--wui-color-bg-fill);
|
|
2965
2976
|
--button-color-bg-hover: var(--wui-color-bg-fill-hover);
|
|
2966
2977
|
--button-color-bg-active: var(--wui-color-bg-fill-active);
|
|
2967
2978
|
--button-color-text: var(--wui-color-text-on-fill);
|
|
2968
2979
|
--button-color-icon: var(--wui-color-icon-on-fill);
|
|
2969
2980
|
`;
|
|
2970
|
-
var disabledButtonVariant =
|
|
2981
|
+
var disabledButtonVariant = import_styled_components18.css`
|
|
2971
2982
|
--button-color-bg: var(--wui-color-bg-surface-disabled);
|
|
2972
2983
|
--button-color-bg-hover: var(--wui-color-bg-surface-disabled);
|
|
2973
2984
|
--button-color-bg-active: var(--wui-color-bg-surface-disabled);
|
|
@@ -2975,7 +2986,7 @@ var disabledButtonVariant = import_styled_components17.css`
|
|
|
2975
2986
|
--button-color-icon: var(--wui-color-icon-disabled);
|
|
2976
2987
|
--button-color-border: var(--wui-color-border-disabled);
|
|
2977
2988
|
`;
|
|
2978
|
-
var pressedButtonVariant =
|
|
2989
|
+
var pressedButtonVariant = import_styled_components18.css`
|
|
2979
2990
|
--button-color-bg: var(--wui-color-bg-surface-selected);
|
|
2980
2991
|
--button-color-bg-hover: var(--wui-color-bg-surface-selected-hover);
|
|
2981
2992
|
--button-color-bg-active: var(--wui-color-bg-surface-selected-active);
|
|
@@ -2983,7 +2994,7 @@ var pressedButtonVariant = import_styled_components17.css`
|
|
|
2983
2994
|
--button-color-icon: var(--wui-color-icon-selected);
|
|
2984
2995
|
--button-color-border: var(--wui-color-border-selected);
|
|
2985
2996
|
`;
|
|
2986
|
-
var buttonBaseStyles =
|
|
2997
|
+
var buttonBaseStyles = import_styled_components18.css`
|
|
2987
2998
|
border-radius: var(--wui-border-radius-rounded);
|
|
2988
2999
|
font-family: var(--button-typography-family);
|
|
2989
3000
|
font-size: var(--button-typography-size);
|
|
@@ -3051,7 +3062,7 @@ var buttonSizeStyles = {
|
|
|
3051
3062
|
|
|
3052
3063
|
// src/components/Icon/Icon.tsx
|
|
3053
3064
|
var import_type_guards13 = require("@wistia/type-guards");
|
|
3054
|
-
var
|
|
3065
|
+
var import_styled_components19 = __toESM(require("styled-components"));
|
|
3055
3066
|
|
|
3056
3067
|
// src/components/Icon/icons/AbTestIcon.tsx
|
|
3057
3068
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
@@ -6906,13 +6917,13 @@ var iconMap = {
|
|
|
6906
6917
|
|
|
6907
6918
|
// src/private/hooks/useResponsiveProp/useResponsiveProp.ts
|
|
6908
6919
|
var import_type_guards12 = require("@wistia/type-guards");
|
|
6909
|
-
var
|
|
6920
|
+
var import_react15 = require("react");
|
|
6910
6921
|
var isResponsiveObject = (values) => {
|
|
6911
6922
|
return typeof values === "object" && values !== null && !Array.isArray(values) && "base" in values;
|
|
6912
6923
|
};
|
|
6913
6924
|
var useResponsiveProp = (values) => {
|
|
6914
6925
|
const activeMediaQueries = useActiveMq();
|
|
6915
|
-
return (0,
|
|
6926
|
+
return (0, import_react15.useMemo)(() => {
|
|
6916
6927
|
if ((0, import_type_guards12.isRecord)(values) && isResponsiveObject(values)) {
|
|
6917
6928
|
const mq2 = activeMediaQueries.find((key) => key in values);
|
|
6918
6929
|
return (0, import_type_guards12.isNotUndefined)(mq2) && (0, import_type_guards12.isNotUndefined)(values[mq2]) ? values[mq2] : values.base;
|
|
@@ -6930,7 +6941,7 @@ var iconSizeMap = {
|
|
|
6930
6941
|
xl: "32",
|
|
6931
6942
|
xxl: "48"
|
|
6932
6943
|
};
|
|
6933
|
-
var StyledIcon =
|
|
6944
|
+
var StyledIcon = import_styled_components19.default.svg`
|
|
6934
6945
|
${({ $colorScheme }) => getColorScheme($colorScheme ?? "inherit")}
|
|
6935
6946
|
`;
|
|
6936
6947
|
var Icon = ({
|
|
@@ -6979,32 +6990,30 @@ var Icon = ({
|
|
|
6979
6990
|
Icon.displayName = "Icon";
|
|
6980
6991
|
|
|
6981
6992
|
// src/components/Link/Link.tsx
|
|
6982
|
-
var
|
|
6983
|
-
var
|
|
6984
|
-
var import_styled_components19 = __toESM(require("styled-components"));
|
|
6993
|
+
var import_react16 = require("react");
|
|
6994
|
+
var import_styled_components20 = __toESM(require("styled-components"));
|
|
6985
6995
|
var import_react_router_dom = require("react-router-dom");
|
|
6996
|
+
var import_type_guards14 = require("@wistia/type-guards");
|
|
6986
6997
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
6987
6998
|
var generateHref = (href, type, disabled) => {
|
|
6988
6999
|
if (disabled || (0, import_type_guards14.isNil)(href)) {
|
|
6989
7000
|
return void 0;
|
|
6990
7001
|
}
|
|
6991
|
-
let
|
|
7002
|
+
let modifiedHref = href;
|
|
6992
7003
|
if (type === "phone") {
|
|
6993
|
-
|
|
7004
|
+
modifiedHref = `tel:${href}`;
|
|
6994
7005
|
}
|
|
6995
7006
|
if (type === "email") {
|
|
6996
|
-
|
|
7007
|
+
modifiedHref = `mailto:${href}`;
|
|
6997
7008
|
}
|
|
6998
|
-
return
|
|
7009
|
+
return modifiedHref;
|
|
6999
7010
|
};
|
|
7000
7011
|
var isButton = (props) => (0, import_type_guards14.isUndefined)(props.href);
|
|
7001
7012
|
var isLink = (props) => (0, import_type_guards14.isNotUndefined)(props.href);
|
|
7002
|
-
var StyledLink =
|
|
7003
|
-
--link-icon-size: 14px;
|
|
7004
|
-
|
|
7013
|
+
var StyledLink = import_styled_components20.default.a`
|
|
7005
7014
|
${({ href }) => (0, import_type_guards14.isNil)(href) && buttonResetCss};
|
|
7006
7015
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
7007
|
-
cursor: pointer;
|
|
7016
|
+
cursor: ${({ $disabled }) => $disabled ? "not-allowed" : "pointer"};
|
|
7008
7017
|
font-family: var(--wui-typography-family-default);
|
|
7009
7018
|
color: var(--wui-color-text-link);
|
|
7010
7019
|
text-decoration: ${({ $underline }) => $underline ? "underline" : "none"};
|
|
@@ -7014,12 +7023,12 @@ var StyledLink = import_styled_components19.default.a`
|
|
|
7014
7023
|
|
|
7015
7024
|
&& {
|
|
7016
7025
|
svg {
|
|
7017
|
-
width:
|
|
7018
|
-
height:
|
|
7026
|
+
width: 14px;
|
|
7027
|
+
height: 14px;
|
|
7019
7028
|
}
|
|
7020
7029
|
}
|
|
7021
7030
|
`;
|
|
7022
|
-
var Link = (0,
|
|
7031
|
+
var Link = (0, import_react16.forwardRef)(
|
|
7023
7032
|
({
|
|
7024
7033
|
beforeAction,
|
|
7025
7034
|
children,
|
|
@@ -7060,6 +7069,7 @@ var Link = (0, import_react15.forwardRef)(
|
|
|
7060
7069
|
};
|
|
7061
7070
|
const commonProps = {
|
|
7062
7071
|
$colorScheme: colorScheme,
|
|
7072
|
+
$disabled: disabled,
|
|
7063
7073
|
$underline: underline,
|
|
7064
7074
|
onClick: handleClick
|
|
7065
7075
|
};
|
|
@@ -7078,33 +7088,27 @@ var Link = (0, import_react15.forwardRef)(
|
|
|
7078
7088
|
}
|
|
7079
7089
|
if (isLink(props)) {
|
|
7080
7090
|
const externalLinkProps = type === "external" ? { target: "_blank", rel: "noopener noreferrer" } : null;
|
|
7091
|
+
const routerSpecificProps = shouldUseReactRouterLink ? {
|
|
7092
|
+
// TODO: Using 'any' here due to styled-components typing limitations with RouterLink
|
|
7093
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
|
|
7094
|
+
as: import_react_router_dom.Link,
|
|
7095
|
+
to: to ?? ""
|
|
7096
|
+
} : {
|
|
7097
|
+
as: "a",
|
|
7098
|
+
href: to
|
|
7099
|
+
};
|
|
7081
7100
|
const combinedProps = {
|
|
7082
7101
|
ref,
|
|
7083
7102
|
...props,
|
|
7084
7103
|
...commonProps,
|
|
7085
|
-
...externalLinkProps
|
|
7104
|
+
...externalLinkProps,
|
|
7105
|
+
...routerSpecificProps
|
|
7086
7106
|
};
|
|
7087
|
-
return
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
to: to ?? "",
|
|
7093
|
-
children
|
|
7094
|
-
}
|
|
7095
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(
|
|
7096
|
-
StyledLink,
|
|
7097
|
-
{
|
|
7098
|
-
as: "a",
|
|
7099
|
-
...combinedProps,
|
|
7100
|
-
href: to,
|
|
7101
|
-
children: [
|
|
7102
|
-
leftIcon ?? null,
|
|
7103
|
-
children,
|
|
7104
|
-
rightIcon ?? null
|
|
7105
|
-
]
|
|
7106
|
-
}
|
|
7107
|
-
);
|
|
7107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(StyledLink, { ...combinedProps, children: [
|
|
7108
|
+
leftIcon ?? null,
|
|
7109
|
+
children,
|
|
7110
|
+
rightIcon ?? null
|
|
7111
|
+
] });
|
|
7108
7112
|
}
|
|
7109
7113
|
return null;
|
|
7110
7114
|
}
|
|
@@ -7114,7 +7118,7 @@ Link.displayName = "Link";
|
|
|
7114
7118
|
// src/components/Button/Button.tsx
|
|
7115
7119
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
7116
7120
|
var isLink2 = (props) => (0, import_type_guards15.isNotUndefined)(props.href);
|
|
7117
|
-
var StyledButton =
|
|
7121
|
+
var StyledButton = import_styled_components21.default.button`
|
|
7118
7122
|
${buttonResetCss}
|
|
7119
7123
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
7120
7124
|
${({ $size }) => buttonSizeStyles[$size]}
|
|
@@ -7123,7 +7127,7 @@ var StyledButton = import_styled_components20.default.button`
|
|
|
7123
7127
|
${({ $fullWidth }) => $fullWidth && "width: 100%;"}
|
|
7124
7128
|
text-align: center;
|
|
7125
7129
|
`;
|
|
7126
|
-
var StyledButtonContent =
|
|
7130
|
+
var StyledButtonContent = import_styled_components21.default.div`
|
|
7127
7131
|
align-items: center;
|
|
7128
7132
|
display: inline-flex;
|
|
7129
7133
|
flex-grow: 1;
|
|
@@ -7135,10 +7139,10 @@ var StyledButtonContent = import_styled_components20.default.div`
|
|
|
7135
7139
|
${({ $hasLeftIcon }) => $hasLeftIcon && "padding-left: 0;"}
|
|
7136
7140
|
${({ $hasRightIcon }) => $hasRightIcon && "padding-right: 0;"}
|
|
7137
7141
|
`;
|
|
7138
|
-
var StyledButtonContentLabel =
|
|
7142
|
+
var StyledButtonContentLabel = import_styled_components21.default.span`
|
|
7139
7143
|
flex: 1;
|
|
7140
7144
|
`;
|
|
7141
|
-
var StyledButtonLoading =
|
|
7145
|
+
var StyledButtonLoading = import_styled_components21.default.div`
|
|
7142
7146
|
position: absolute;
|
|
7143
7147
|
display: flex;
|
|
7144
7148
|
`;
|
|
@@ -7165,7 +7169,7 @@ var ButtonContent = ({
|
|
|
7165
7169
|
)
|
|
7166
7170
|
] });
|
|
7167
7171
|
};
|
|
7168
|
-
var Button = (0,
|
|
7172
|
+
var Button = (0, import_react17.forwardRef)(
|
|
7169
7173
|
({
|
|
7170
7174
|
children,
|
|
7171
7175
|
forceState,
|
|
@@ -7251,7 +7255,7 @@ Button.displayName = "Button";
|
|
|
7251
7255
|
|
|
7252
7256
|
// src/components/ActionButton/ActionButton.tsx
|
|
7253
7257
|
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
7254
|
-
var StyledActionButton = (0,
|
|
7258
|
+
var StyledActionButton = (0, import_styled_components22.default)(Button)`
|
|
7255
7259
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7256
7260
|
display: grid;
|
|
7257
7261
|
grid-template-columns: 24px 1fr;
|
|
@@ -7294,7 +7298,7 @@ var StyledActionButton = (0, import_styled_components21.default)(Button)`
|
|
|
7294
7298
|
}
|
|
7295
7299
|
}
|
|
7296
7300
|
`;
|
|
7297
|
-
var StyledMainIcon =
|
|
7301
|
+
var StyledMainIcon = import_styled_components22.default.div`
|
|
7298
7302
|
grid-column: 1;
|
|
7299
7303
|
grid-row: 1;
|
|
7300
7304
|
width: 24px;
|
|
@@ -7308,7 +7312,7 @@ var StyledMainIcon = import_styled_components21.default.div`
|
|
|
7308
7312
|
}
|
|
7309
7313
|
}
|
|
7310
7314
|
`;
|
|
7311
|
-
var StyledSecondaryIcon =
|
|
7315
|
+
var StyledSecondaryIcon = import_styled_components22.default.div`
|
|
7312
7316
|
grid-column: 2;
|
|
7313
7317
|
grid-row: 1;
|
|
7314
7318
|
width: 100%;
|
|
@@ -7316,7 +7320,7 @@ var StyledSecondaryIcon = import_styled_components21.default.div`
|
|
|
7316
7320
|
justify-content: flex-end;
|
|
7317
7321
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease-in);
|
|
7318
7322
|
|
|
7319
|
-
${({ $hideUntilHover }) => $hideUntilHover &&
|
|
7323
|
+
${({ $hideUntilHover }) => $hideUntilHover && import_styled_components22.css`
|
|
7320
7324
|
will-change: transform;
|
|
7321
7325
|
opacity: 0;
|
|
7322
7326
|
transform: translateX(-16px);
|
|
@@ -7334,7 +7338,7 @@ var StyledSecondaryIcon = import_styled_components21.default.div`
|
|
|
7334
7338
|
}
|
|
7335
7339
|
}
|
|
7336
7340
|
`;
|
|
7337
|
-
var StyledLabel =
|
|
7341
|
+
var StyledLabel = import_styled_components22.default.span`
|
|
7338
7342
|
font-family: var(--wui-typography-heading-4-family);
|
|
7339
7343
|
font-size: var(--wui-typography-heading-4-size);
|
|
7340
7344
|
font-weight: var(--wui-typography-heading-4-weight);
|
|
@@ -7344,7 +7348,7 @@ var StyledLabel = import_styled_components21.default.span`
|
|
|
7344
7348
|
grid-row: 2;
|
|
7345
7349
|
text-align: left;
|
|
7346
7350
|
`;
|
|
7347
|
-
var ActionButton = (0,
|
|
7351
|
+
var ActionButton = (0, import_react18.forwardRef)(
|
|
7348
7352
|
({
|
|
7349
7353
|
icon,
|
|
7350
7354
|
colorScheme = "default",
|
|
@@ -7388,9 +7392,9 @@ var ActionButton = (0, import_react17.forwardRef)(
|
|
|
7388
7392
|
ActionButton.displayName = "ActionButton";
|
|
7389
7393
|
|
|
7390
7394
|
// src/components/Avatar/Avatar.tsx
|
|
7391
|
-
var
|
|
7395
|
+
var import_react19 = require("react");
|
|
7392
7396
|
var import_type_guards18 = require("@wistia/type-guards");
|
|
7393
|
-
var
|
|
7397
|
+
var import_styled_components25 = __toESM(require("styled-components"));
|
|
7394
7398
|
|
|
7395
7399
|
// src/components/Avatar/formatNameForDisplay.tsx
|
|
7396
7400
|
var import_type_guards16 = require("@wistia/type-guards");
|
|
@@ -7407,7 +7411,7 @@ var formatNameForDisplay = (name) => {
|
|
|
7407
7411
|
};
|
|
7408
7412
|
|
|
7409
7413
|
// src/components/Image/Image.tsx
|
|
7410
|
-
var
|
|
7414
|
+
var import_styled_components23 = __toESM(require("styled-components"));
|
|
7411
7415
|
var import_type_guards17 = require("@wistia/type-guards");
|
|
7412
7416
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
7413
7417
|
var getFillStyle = (fillContainer) => {
|
|
@@ -7425,7 +7429,7 @@ var getFillStyle = (fillContainer) => {
|
|
|
7425
7429
|
}
|
|
7426
7430
|
return void 0;
|
|
7427
7431
|
};
|
|
7428
|
-
var StyledImage =
|
|
7432
|
+
var StyledImage = import_styled_components23.default.img`
|
|
7429
7433
|
border-radius: ${({ $borderRadius }) => (0, import_type_guards17.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
7430
7434
|
${({ $fillContainer }) => getFillStyle($fillContainer)};
|
|
7431
7435
|
object-fit: ${({ $objFit }) => $objFit};
|
|
@@ -7460,7 +7464,7 @@ var Image = ({
|
|
|
7460
7464
|
Image.displayName = "Image";
|
|
7461
7465
|
|
|
7462
7466
|
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
7463
|
-
var
|
|
7467
|
+
var import_styled_components24 = __toESM(require("styled-components"));
|
|
7464
7468
|
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
7465
7469
|
var defaultColorSchemeOptions = ["default", "inherit"];
|
|
7466
7470
|
var semanticColorSchemeOptions = ["error", "info", "success", "warning"];
|
|
@@ -7483,7 +7487,7 @@ var colorSchemeOptions = [
|
|
|
7483
7487
|
...brandColorSchemeOptions,
|
|
7484
7488
|
...vendorColorSchemeOptions
|
|
7485
7489
|
];
|
|
7486
|
-
var StyledColorSchemeWrapper =
|
|
7490
|
+
var StyledColorSchemeWrapper = import_styled_components24.default.div`
|
|
7487
7491
|
${({ $colorScheme, $nav }) => getColorScheme($nav ? "nav" : $colorScheme)};
|
|
7488
7492
|
`;
|
|
7489
7493
|
var ColorSchemeWrapper = ({
|
|
@@ -7539,7 +7543,7 @@ var Initial = ({ initial }) => /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
|
|
|
7539
7543
|
]
|
|
7540
7544
|
}
|
|
7541
7545
|
);
|
|
7542
|
-
var AvatarWrapper =
|
|
7546
|
+
var AvatarWrapper = import_styled_components25.default.div`
|
|
7543
7547
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7544
7548
|
width: ${({ $heightAndWidth }) => $heightAndWidth}px;
|
|
7545
7549
|
height: ${({ $heightAndWidth }) => $heightAndWidth}px;
|
|
@@ -7596,8 +7600,8 @@ var Avatar = ({
|
|
|
7596
7600
|
onImageLoad,
|
|
7597
7601
|
...props
|
|
7598
7602
|
}) => {
|
|
7599
|
-
const [imageLoadState, setImageLoadState] = (0,
|
|
7600
|
-
(0,
|
|
7603
|
+
const [imageLoadState, setImageLoadState] = (0, import_react19.useState)("loading");
|
|
7604
|
+
(0, import_react19.useEffect)(() => {
|
|
7601
7605
|
setImageLoadState("loading");
|
|
7602
7606
|
}, [imageUrl]);
|
|
7603
7607
|
const handleImageLoad = () => {
|
|
@@ -7609,7 +7613,7 @@ var Avatar = ({
|
|
|
7609
7613
|
onImageLoad?.({ state: "error", type: "initials" });
|
|
7610
7614
|
};
|
|
7611
7615
|
const avatarSize = heightAndWidth ?? avatarSizeMap[size];
|
|
7612
|
-
const avatarColor = (0,
|
|
7616
|
+
const avatarColor = (0, import_react19.useMemo)(() => chooseColorScheme(name), [name]);
|
|
7613
7617
|
return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
|
|
7614
7618
|
AvatarWrapper,
|
|
7615
7619
|
{
|
|
@@ -7636,11 +7640,11 @@ var Avatar = ({
|
|
|
7636
7640
|
Avatar.displayName = "Avatar";
|
|
7637
7641
|
|
|
7638
7642
|
// src/components/Badge/Badge.tsx
|
|
7639
|
-
var
|
|
7640
|
-
var
|
|
7643
|
+
var import_react20 = require("react");
|
|
7644
|
+
var import_styled_components26 = __toESM(require("styled-components"));
|
|
7641
7645
|
var import_type_guards19 = require("@wistia/type-guards");
|
|
7642
7646
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
7643
|
-
var StyledBadge =
|
|
7647
|
+
var StyledBadge = import_styled_components26.default.div`
|
|
7644
7648
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7645
7649
|
align-items: center;
|
|
7646
7650
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -7660,7 +7664,7 @@ var StyledBadge = import_styled_components25.default.div`
|
|
|
7660
7664
|
width: 12px;
|
|
7661
7665
|
}
|
|
7662
7666
|
`;
|
|
7663
|
-
var Badge = (0,
|
|
7667
|
+
var Badge = (0, import_react20.forwardRef)(
|
|
7664
7668
|
({ colorScheme = "inherit", label, icon, ...props }, ref) => {
|
|
7665
7669
|
const hasIcon = (0, import_type_guards19.isNotNil)(icon);
|
|
7666
7670
|
return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
@@ -7681,8 +7685,8 @@ var Badge = (0, import_react19.forwardRef)(
|
|
|
7681
7685
|
Badge.displayName = "Badge";
|
|
7682
7686
|
|
|
7683
7687
|
// src/components/Box/Box.tsx
|
|
7684
|
-
var
|
|
7685
|
-
var
|
|
7688
|
+
var import_react21 = require("react");
|
|
7689
|
+
var import_styled_components27 = __toESM(require("styled-components"));
|
|
7686
7690
|
var import_type_guards20 = require("@wistia/type-guards");
|
|
7687
7691
|
|
|
7688
7692
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
@@ -7739,34 +7743,34 @@ var getFlexStyle = (flexMode) => {
|
|
|
7739
7743
|
switch (flexMode) {
|
|
7740
7744
|
// grows to fill space, won't shrink, starts at 0
|
|
7741
7745
|
case "grow":
|
|
7742
|
-
return
|
|
7746
|
+
return import_styled_components27.css`
|
|
7743
7747
|
flex: 1 0 0;
|
|
7744
7748
|
`;
|
|
7745
7749
|
// default behavior, can shrink but won't grow
|
|
7746
7750
|
case "initial":
|
|
7747
|
-
return
|
|
7751
|
+
return import_styled_components27.css`
|
|
7748
7752
|
flex: 0 1 auto;
|
|
7749
7753
|
`;
|
|
7750
7754
|
// equal distribution of space
|
|
7751
7755
|
case "equal":
|
|
7752
|
-
return
|
|
7756
|
+
return import_styled_components27.css`
|
|
7753
7757
|
flex: 1;
|
|
7754
7758
|
`;
|
|
7755
7759
|
// won't grow or shrink
|
|
7756
7760
|
case "rigid":
|
|
7757
|
-
return
|
|
7761
|
+
return import_styled_components27.css`
|
|
7758
7762
|
flex: 0 0 auto;
|
|
7759
7763
|
`;
|
|
7760
7764
|
// can grow and shrink from content size
|
|
7761
7765
|
case "fluid":
|
|
7762
|
-
return
|
|
7766
|
+
return import_styled_components27.css`
|
|
7763
7767
|
flex: 1 1 auto;
|
|
7764
7768
|
`;
|
|
7765
7769
|
default:
|
|
7766
7770
|
return null;
|
|
7767
7771
|
}
|
|
7768
7772
|
};
|
|
7769
|
-
var StyledBoxComponent =
|
|
7773
|
+
var StyledBoxComponent = import_styled_components27.default.div`
|
|
7770
7774
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
7771
7775
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
7772
7776
|
align-self: ${({ $alignSelf }) => $alignSelf ?? null};
|
|
@@ -7790,13 +7794,13 @@ var StyledBoxComponent = import_styled_components26.default.div`
|
|
|
7790
7794
|
var wrapChildren = (children) => {
|
|
7791
7795
|
if ((0, import_type_guards20.isNotNil)(children)) {
|
|
7792
7796
|
if (typeof children === "object" && isDev) {
|
|
7793
|
-
return
|
|
7797
|
+
return import_react21.Children.map(children, (child) => {
|
|
7794
7798
|
if ((0, import_type_guards20.isNil)(child)) return null;
|
|
7795
7799
|
const elementParams = {};
|
|
7796
7800
|
if (child.type?.displayName === "Box" || child.type?.displayName === "Box_UI") {
|
|
7797
7801
|
elementParams.hasBoxParent = true;
|
|
7798
7802
|
}
|
|
7799
|
-
return (0,
|
|
7803
|
+
return (0, import_react21.cloneElement)(child, elementParams);
|
|
7800
7804
|
});
|
|
7801
7805
|
}
|
|
7802
7806
|
return children;
|
|
@@ -7804,7 +7808,7 @@ var wrapChildren = (children) => {
|
|
|
7804
7808
|
return null;
|
|
7805
7809
|
};
|
|
7806
7810
|
var DEFAULT_ELEMENT = "div";
|
|
7807
|
-
var BoxComponent = (0,
|
|
7811
|
+
var BoxComponent = (0, import_react21.forwardRef)(
|
|
7808
7812
|
({
|
|
7809
7813
|
alignContent = "stretch",
|
|
7810
7814
|
alignItems = "flex-start",
|
|
@@ -7881,10 +7885,10 @@ BoxComponent.displayName = "Box";
|
|
|
7881
7885
|
var Box = makePolymorphic(BoxComponent);
|
|
7882
7886
|
|
|
7883
7887
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
7884
|
-
var
|
|
7885
|
-
var
|
|
7888
|
+
var import_react22 = require("react");
|
|
7889
|
+
var import_styled_components28 = __toESM(require("styled-components"));
|
|
7886
7890
|
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
7887
|
-
var StyledBreadcrumbs =
|
|
7891
|
+
var StyledBreadcrumbs = import_styled_components28.default.nav`
|
|
7888
7892
|
display: flex;
|
|
7889
7893
|
align-items: center;
|
|
7890
7894
|
gap: var(--wui-space-01);
|
|
@@ -7897,7 +7901,7 @@ var StyledBreadcrumbs = import_styled_components27.default.nav`
|
|
|
7897
7901
|
var BUFFER_WIDTH = 10;
|
|
7898
7902
|
var Breadcrumbs = ({ children, ...props }) => {
|
|
7899
7903
|
const { isXsAndDown } = useMq();
|
|
7900
|
-
let crumbs =
|
|
7904
|
+
let crumbs = import_react22.Children.toArray(children);
|
|
7901
7905
|
if (isXsAndDown) {
|
|
7902
7906
|
crumbs = crumbs.slice(-1);
|
|
7903
7907
|
}
|
|
@@ -7929,9 +7933,9 @@ var Breadcrumbs = ({ children, ...props }) => {
|
|
|
7929
7933
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
7930
7934
|
|
|
7931
7935
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
7932
|
-
var
|
|
7936
|
+
var import_styled_components29 = __toESM(require("styled-components"));
|
|
7933
7937
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
7934
|
-
var BreadcrumbContent =
|
|
7938
|
+
var BreadcrumbContent = import_styled_components29.default.span`
|
|
7935
7939
|
overflow: hidden;
|
|
7936
7940
|
white-space: nowrap;
|
|
7937
7941
|
display: block;
|
|
@@ -7963,7 +7967,7 @@ var Breadcrumb = ({ icon, href, children, ...props }) => {
|
|
|
7963
7967
|
};
|
|
7964
7968
|
|
|
7965
7969
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
7966
|
-
var
|
|
7970
|
+
var import_styled_components30 = __toESM(require("styled-components"));
|
|
7967
7971
|
var import_type_guards21 = require("@wistia/type-guards");
|
|
7968
7972
|
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
7969
7973
|
var getAlignment = (align) => {
|
|
@@ -7978,7 +7982,7 @@ var getAlignment = (align) => {
|
|
|
7978
7982
|
}
|
|
7979
7983
|
return "flex-start";
|
|
7980
7984
|
};
|
|
7981
|
-
var ButtonGroupComponent =
|
|
7985
|
+
var ButtonGroupComponent = import_styled_components30.default.div`
|
|
7982
7986
|
display: flex;
|
|
7983
7987
|
|
|
7984
7988
|
/* this helps ensure that primary buttons appear at the top of the column */
|
|
@@ -8027,9 +8031,9 @@ var ButtonGroup = ({
|
|
|
8027
8031
|
ButtonGroup.displayName = "ButtonGroup";
|
|
8028
8032
|
|
|
8029
8033
|
// src/components/Card/Card.tsx
|
|
8030
|
-
var
|
|
8034
|
+
var import_styled_components31 = __toESM(require("styled-components"));
|
|
8031
8035
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
8032
|
-
var StyledCard = (0,
|
|
8036
|
+
var StyledCard = (0, import_styled_components31.default)(Box)`
|
|
8033
8037
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8034
8038
|
box-sizing: border-box;
|
|
8035
8039
|
padding: ${({ $paddingSize }) => `var(--wui-${$paddingSize})`};
|
|
@@ -8084,10 +8088,10 @@ var Card = ({
|
|
|
8084
8088
|
Card.displayName = "Card";
|
|
8085
8089
|
|
|
8086
8090
|
// src/components/Center/Center.tsx
|
|
8087
|
-
var
|
|
8088
|
-
var
|
|
8091
|
+
var import_react23 = require("react");
|
|
8092
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
8089
8093
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
8090
|
-
var StyledCenter =
|
|
8094
|
+
var StyledCenter = import_styled_components32.default.div`
|
|
8091
8095
|
box-sizing: border-box;
|
|
8092
8096
|
margin-left: auto;
|
|
8093
8097
|
margin-right: auto;
|
|
@@ -8099,7 +8103,7 @@ var StyledCenter = import_styled_components31.default.div`
|
|
|
8099
8103
|
align-items: center;
|
|
8100
8104
|
`}
|
|
8101
8105
|
`;
|
|
8102
|
-
var Center = (0,
|
|
8106
|
+
var Center = (0, import_react23.forwardRef)(
|
|
8103
8107
|
({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8104
8108
|
StyledCenter,
|
|
8105
8109
|
{
|
|
@@ -8115,22 +8119,22 @@ var Center = (0, import_react22.forwardRef)(
|
|
|
8115
8119
|
Center.displayName = "Center";
|
|
8116
8120
|
|
|
8117
8121
|
// src/components/Checkbox/Checkbox.tsx
|
|
8118
|
-
var
|
|
8119
|
-
var
|
|
8122
|
+
var import_react24 = require("react");
|
|
8123
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
8120
8124
|
var import_type_guards25 = require("@wistia/type-guards");
|
|
8121
8125
|
|
|
8122
8126
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
8123
|
-
var
|
|
8127
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
8124
8128
|
var import_type_guards24 = require("@wistia/type-guards");
|
|
8125
8129
|
|
|
8126
8130
|
// src/private/components/FormControlLabel/FormControlLabelDescription.tsx
|
|
8127
|
-
var
|
|
8131
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
8128
8132
|
var import_type_guards22 = require("@wistia/type-guards");
|
|
8129
8133
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
8130
|
-
var disabledStyle =
|
|
8134
|
+
var disabledStyle = import_styled_components33.css`
|
|
8131
8135
|
color: var(--wui-color-text-disabled);
|
|
8132
8136
|
`;
|
|
8133
|
-
var StyledFormControlLabelDescription =
|
|
8137
|
+
var StyledFormControlLabelDescription = import_styled_components33.default.div`
|
|
8134
8138
|
color: var(--wui-color-text-secondary);
|
|
8135
8139
|
display: block;
|
|
8136
8140
|
font-size: var(--wui-typography-body-4-size);
|
|
@@ -8160,11 +8164,11 @@ var FormControlLabelDescription = ({
|
|
|
8160
8164
|
FormControlLabelDescription.displayName = "FormControlLabelDescription";
|
|
8161
8165
|
|
|
8162
8166
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
8163
|
-
var
|
|
8167
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
8164
8168
|
var import_type_guards23 = require("@wistia/type-guards");
|
|
8165
8169
|
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
8166
|
-
var VisuallyHidden =
|
|
8167
|
-
var VisuallyHiddenButFocusable =
|
|
8170
|
+
var VisuallyHidden = import_styled_components34.default.div({ ...visuallyHiddenStyle });
|
|
8171
|
+
var VisuallyHiddenButFocusable = import_styled_components34.default.div({
|
|
8168
8172
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
8169
8173
|
});
|
|
8170
8174
|
var ScreenReaderOnly = ({
|
|
@@ -8183,15 +8187,15 @@ ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
|
8183
8187
|
|
|
8184
8188
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
8185
8189
|
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
8186
|
-
var disabledStyle2 =
|
|
8190
|
+
var disabledStyle2 = import_styled_components35.css`
|
|
8187
8191
|
cursor: not-allowed;
|
|
8188
8192
|
color: var(--wui-color-text-disabled);
|
|
8189
8193
|
`;
|
|
8190
|
-
var StyledLabelWrapper =
|
|
8194
|
+
var StyledLabelWrapper = import_styled_components35.default.div`
|
|
8191
8195
|
display: flex;
|
|
8192
8196
|
flex-direction: column;
|
|
8193
8197
|
`;
|
|
8194
|
-
var StyledFormControlLabel =
|
|
8198
|
+
var StyledFormControlLabel = import_styled_components35.default.label`
|
|
8195
8199
|
cursor: pointer;
|
|
8196
8200
|
display: flex;
|
|
8197
8201
|
align-items: center;
|
|
@@ -8254,7 +8258,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
|
8254
8258
|
)
|
|
8255
8259
|
}
|
|
8256
8260
|
);
|
|
8257
|
-
var sizeSmall =
|
|
8261
|
+
var sizeSmall = import_styled_components36.css`
|
|
8258
8262
|
width: 14px;
|
|
8259
8263
|
height: 14px;
|
|
8260
8264
|
min-width: 14px;
|
|
@@ -8265,7 +8269,7 @@ var sizeSmall = import_styled_components35.css`
|
|
|
8265
8269
|
height: 7px;
|
|
8266
8270
|
}
|
|
8267
8271
|
`;
|
|
8268
|
-
var sizeMedium =
|
|
8272
|
+
var sizeMedium = import_styled_components36.css`
|
|
8269
8273
|
width: 16px;
|
|
8270
8274
|
height: 16px;
|
|
8271
8275
|
min-width: 16px;
|
|
@@ -8276,7 +8280,7 @@ var sizeMedium = import_styled_components35.css`
|
|
|
8276
8280
|
height: 9px;
|
|
8277
8281
|
}
|
|
8278
8282
|
`;
|
|
8279
|
-
var sizeLarge =
|
|
8283
|
+
var sizeLarge = import_styled_components36.css`
|
|
8280
8284
|
width: 20px;
|
|
8281
8285
|
height: 20px;
|
|
8282
8286
|
min-width: 20px;
|
|
@@ -8292,14 +8296,14 @@ var getSizeCss = (size) => {
|
|
|
8292
8296
|
if (size === "lg") return sizeLarge;
|
|
8293
8297
|
return sizeMedium;
|
|
8294
8298
|
};
|
|
8295
|
-
var StyledCheckboxWrapper =
|
|
8299
|
+
var StyledCheckboxWrapper = import_styled_components36.default.div`
|
|
8296
8300
|
display: flex;
|
|
8297
8301
|
margin: 0;
|
|
8298
8302
|
|
|
8299
8303
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
8300
8304
|
user-select: none;
|
|
8301
8305
|
`;
|
|
8302
|
-
var StyledCheckboxInput =
|
|
8306
|
+
var StyledCheckboxInput = import_styled_components36.default.div`
|
|
8303
8307
|
${({ $size }) => getSizeCss($size)}
|
|
8304
8308
|
line-height: 0;
|
|
8305
8309
|
margin: 0;
|
|
@@ -8321,7 +8325,7 @@ var StyledCheckboxInput = import_styled_components35.default.div`
|
|
|
8321
8325
|
}
|
|
8322
8326
|
}
|
|
8323
8327
|
`;
|
|
8324
|
-
var StyledHiddenCheckboxInput =
|
|
8328
|
+
var StyledHiddenCheckboxInput = import_styled_components36.default.input`
|
|
8325
8329
|
${visuallyHiddenStyle}
|
|
8326
8330
|
|
|
8327
8331
|
/* toggles display of faux-input background-color */
|
|
@@ -8335,7 +8339,7 @@ var StyledHiddenCheckboxInput = import_styled_components35.default.input`
|
|
|
8335
8339
|
display: block;
|
|
8336
8340
|
}
|
|
8337
8341
|
`;
|
|
8338
|
-
var Checkbox = (0,
|
|
8342
|
+
var Checkbox = (0, import_react24.forwardRef)(
|
|
8339
8343
|
({
|
|
8340
8344
|
checked,
|
|
8341
8345
|
disabled = false,
|
|
@@ -8350,7 +8354,7 @@ var Checkbox = (0, import_react23.forwardRef)(
|
|
|
8350
8354
|
hideLabel = false,
|
|
8351
8355
|
...props
|
|
8352
8356
|
}, ref) => {
|
|
8353
|
-
const generatedId = (0,
|
|
8357
|
+
const generatedId = (0, import_react24.useId)();
|
|
8354
8358
|
const computedId = (0, import_type_guards25.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
8355
8359
|
return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledCheckboxWrapper, { disabled, children: [
|
|
8356
8360
|
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
@@ -8393,9 +8397,9 @@ var Checkbox = (0, import_react23.forwardRef)(
|
|
|
8393
8397
|
Checkbox.displayName = "Checkbox";
|
|
8394
8398
|
|
|
8395
8399
|
// src/components/ClickRegion/ClickRegion.tsx
|
|
8396
|
-
var
|
|
8400
|
+
var import_react25 = require("react");
|
|
8397
8401
|
var ClickRegion = ({ children, targetRef }) => {
|
|
8398
|
-
(0,
|
|
8402
|
+
(0, import_react25.useEffect)(() => {
|
|
8399
8403
|
if (targetRef.current && targetRef.current.tagName === "A") {
|
|
8400
8404
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
8401
8405
|
} else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
|
|
@@ -8403,7 +8407,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
8403
8407
|
} else {
|
|
8404
8408
|
}
|
|
8405
8409
|
}, [targetRef]);
|
|
8406
|
-
const handleClick = (0,
|
|
8410
|
+
const handleClick = (0, import_react25.useCallback)(
|
|
8407
8411
|
(event) => {
|
|
8408
8412
|
const node = targetRef.current;
|
|
8409
8413
|
if (event.target instanceof HTMLAnchorElement && !event.target.hasAttribute("data-click-region-target-link") || event.target instanceof HTMLButtonElement && !event.target.hasAttribute("data-click-region-target-button")) {
|
|
@@ -8420,7 +8424,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
8420
8424
|
},
|
|
8421
8425
|
[targetRef]
|
|
8422
8426
|
);
|
|
8423
|
-
return (0,
|
|
8427
|
+
return (0, import_react25.cloneElement)(import_react25.Children.only(children), {
|
|
8424
8428
|
"data-click-region": true,
|
|
8425
8429
|
onClick: handleClick
|
|
8426
8430
|
});
|
|
@@ -8430,9 +8434,9 @@ ClickRegion.displayName = "ClickRegion";
|
|
|
8430
8434
|
// src/components/Collapsible/Collapsible.tsx
|
|
8431
8435
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
8432
8436
|
var import_type_guards26 = require("@wistia/type-guards");
|
|
8433
|
-
var
|
|
8437
|
+
var import_styled_components37 = __toESM(require("styled-components"));
|
|
8434
8438
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8435
|
-
var StyledRoot = (0,
|
|
8439
|
+
var StyledRoot = (0, import_styled_components37.default)(import_react_collapsible.Root)`
|
|
8436
8440
|
&[data-state='closed'] [data-wui-collapsible-content] {
|
|
8437
8441
|
display: -webkit-box;
|
|
8438
8442
|
-webkit-box-orient: vertical;
|
|
@@ -8453,20 +8457,20 @@ var Collapsible = ({
|
|
|
8453
8457
|
Collapsible.displayName = "Collapsible";
|
|
8454
8458
|
|
|
8455
8459
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
8456
|
-
var
|
|
8460
|
+
var import_react26 = require("react");
|
|
8457
8461
|
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
8458
8462
|
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
8459
8463
|
var CollapsibleTrigger = ({ children }) => {
|
|
8460
|
-
|
|
8464
|
+
import_react26.Children.only(children);
|
|
8461
8465
|
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
8462
8466
|
};
|
|
8463
8467
|
|
|
8464
8468
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
8465
|
-
var
|
|
8469
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
8466
8470
|
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
8467
8471
|
var import_type_guards27 = require("@wistia/type-guards");
|
|
8468
8472
|
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8469
|
-
var ClampedContent =
|
|
8473
|
+
var ClampedContent = import_styled_components38.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
8470
8474
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
8471
8475
|
`;
|
|
8472
8476
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
@@ -8480,51 +8484,51 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
8480
8484
|
};
|
|
8481
8485
|
|
|
8482
8486
|
// src/components/DataCards/DataCard.tsx
|
|
8483
|
-
var
|
|
8487
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8484
8488
|
var import_type_guards29 = require("@wistia/type-guards");
|
|
8485
8489
|
|
|
8486
8490
|
// src/components/Heading/Heading.tsx
|
|
8487
|
-
var
|
|
8488
|
-
var
|
|
8491
|
+
var import_react27 = require("react");
|
|
8492
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
8489
8493
|
var import_type_guards28 = require("@wistia/type-guards");
|
|
8490
8494
|
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
8491
|
-
var heroStyle =
|
|
8495
|
+
var heroStyle = import_styled_components39.css`
|
|
8492
8496
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
8493
8497
|
--font-size: var(--wui-typography-heading-hero-size);
|
|
8494
8498
|
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
8495
8499
|
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
8496
8500
|
`;
|
|
8497
|
-
var heading1TextStyle =
|
|
8501
|
+
var heading1TextStyle = import_styled_components39.css`
|
|
8498
8502
|
--font-family: var(--wui-typography-heading-1-family);
|
|
8499
8503
|
--font-size: var(--wui-typography-heading-1-size);
|
|
8500
8504
|
--font-weight: var(--wui-typography-heading-1-weight);
|
|
8501
8505
|
--line-height: var(--wui-typography-heading-1-line-height);
|
|
8502
8506
|
`;
|
|
8503
|
-
var heading2TextStyle =
|
|
8507
|
+
var heading2TextStyle = import_styled_components39.css`
|
|
8504
8508
|
--font-family: var(--wui-typography-heading-2-family);
|
|
8505
8509
|
--font-size: var(--wui-typography-heading-2-size);
|
|
8506
8510
|
--font-weight: var(--wui-typography-heading-2-weight);
|
|
8507
8511
|
--line-height: var(--wui-typography-heading-2-line-height);
|
|
8508
8512
|
`;
|
|
8509
|
-
var heading3TextStyle =
|
|
8513
|
+
var heading3TextStyle = import_styled_components39.css`
|
|
8510
8514
|
--font-family: var(--wui-typography-heading-3-family);
|
|
8511
8515
|
--font-size: var(--wui-typography-heading-3-size);
|
|
8512
8516
|
--font-weight: var(--wui-typography-heading-3-weight);
|
|
8513
8517
|
--line-height: var(--wui-typography-heading-3-line-height);
|
|
8514
8518
|
`;
|
|
8515
|
-
var heading4TextStyle =
|
|
8519
|
+
var heading4TextStyle = import_styled_components39.css`
|
|
8516
8520
|
--font-family: var(--wui-typography-heading-4-family);
|
|
8517
8521
|
--font-size: var(--wui-typography-heading-4-size);
|
|
8518
8522
|
--font-weight: var(--wui-typography-heading-4-weight);
|
|
8519
8523
|
--line-height: var(--wui-typography-heading-4-line-height);
|
|
8520
8524
|
`;
|
|
8521
|
-
var heading5TextStyle =
|
|
8525
|
+
var heading5TextStyle = import_styled_components39.css`
|
|
8522
8526
|
--font-family: var(--wui-typography-heading-5-family);
|
|
8523
8527
|
--font-size: var(--wui-typography-heading-5-size);
|
|
8524
8528
|
--font-weight: var(--wui-typography-heading-5-weight);
|
|
8525
8529
|
--line-height: var(--wui-typography-heading-5-line-height);
|
|
8526
8530
|
`;
|
|
8527
|
-
var heading6TextStyle =
|
|
8531
|
+
var heading6TextStyle = import_styled_components39.css`
|
|
8528
8532
|
--font-family: var(--wui-typography-heading-6-family);
|
|
8529
8533
|
--font-size: var(--wui-typography-heading-6-size);
|
|
8530
8534
|
--font-weight: var(--wui-typography-heading-6-weight);
|
|
@@ -8540,7 +8544,7 @@ var variantStyleMap = {
|
|
|
8540
8544
|
heading6: heading6TextStyle
|
|
8541
8545
|
};
|
|
8542
8546
|
var DEFAULT_ELEMENT2 = "h1";
|
|
8543
|
-
var StyledHeading =
|
|
8547
|
+
var StyledHeading = import_styled_components39.default.div`
|
|
8544
8548
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8545
8549
|
font-family: var(--font-family);
|
|
8546
8550
|
font-size: var(--font-size);
|
|
@@ -8550,26 +8554,23 @@ var StyledHeading = import_styled_components38.default.div`
|
|
|
8550
8554
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
8551
8555
|
${({ $truncate }) => {
|
|
8552
8556
|
if ((0, import_type_guards28.isNotNil)($truncate)) {
|
|
8553
|
-
return
|
|
8557
|
+
return import_styled_components39.css`
|
|
8554
8558
|
${ellipsisStyle};
|
|
8555
|
-
|
|
8556
|
-
-webkit-line-clamp: ${$truncate};
|
|
8557
|
-
display: -webkit-box;
|
|
8558
|
-
white-space: initial;
|
|
8559
|
+
${lineClampCss($truncate)};
|
|
8559
8560
|
`;
|
|
8560
8561
|
}
|
|
8561
8562
|
return void 0;
|
|
8562
8563
|
}}
|
|
8563
|
-
${({ $inline }) => $inline &&
|
|
8564
|
+
${({ $inline }) => $inline && import_styled_components39.css`
|
|
8564
8565
|
display: inline-block;
|
|
8565
8566
|
`}
|
|
8566
|
-
${({ $disabled }) => $disabled &&
|
|
8567
|
+
${({ $disabled }) => $disabled && import_styled_components39.css`
|
|
8567
8568
|
color: var(--wui-color-text-disabled);
|
|
8568
8569
|
`}
|
|
8569
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8570
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components39.css`
|
|
8570
8571
|
user-select: none;
|
|
8571
8572
|
`}
|
|
8572
|
-
${({ $align }) =>
|
|
8573
|
+
${({ $align }) => import_styled_components39.css`
|
|
8573
8574
|
text-align: ${$align};
|
|
8574
8575
|
`}
|
|
8575
8576
|
margin: 0;
|
|
@@ -8583,7 +8584,7 @@ var variantElementMap = {
|
|
|
8583
8584
|
heading5: "h5",
|
|
8584
8585
|
heading6: "h6"
|
|
8585
8586
|
};
|
|
8586
|
-
var HeadingComponent = (0,
|
|
8587
|
+
var HeadingComponent = (0, import_react27.forwardRef)(
|
|
8587
8588
|
({
|
|
8588
8589
|
align = "left",
|
|
8589
8590
|
colorScheme = "inherit",
|
|
@@ -8615,7 +8616,7 @@ var Heading = makePolymorphic(HeadingComponent);
|
|
|
8615
8616
|
|
|
8616
8617
|
// src/components/DataCards/DataCard.tsx
|
|
8617
8618
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
8618
|
-
var StyledDataCard =
|
|
8619
|
+
var StyledDataCard = import_styled_components40.default.div`
|
|
8619
8620
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
8620
8621
|
display: grid;
|
|
8621
8622
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -8628,7 +8629,7 @@ var StyledDataCard = import_styled_components39.default.div`
|
|
|
8628
8629
|
border-radius: var(--wui-border-radius-02);
|
|
8629
8630
|
position: relative;
|
|
8630
8631
|
`;
|
|
8631
|
-
var shimmer =
|
|
8632
|
+
var shimmer = import_styled_components40.keyframes`
|
|
8632
8633
|
0% {
|
|
8633
8634
|
background-position: 200% 0;
|
|
8634
8635
|
}
|
|
@@ -8636,7 +8637,7 @@ var shimmer = import_styled_components39.keyframes`
|
|
|
8636
8637
|
background-position: -200% 0;
|
|
8637
8638
|
}
|
|
8638
8639
|
`;
|
|
8639
|
-
var LoadingBackground =
|
|
8640
|
+
var LoadingBackground = import_styled_components40.default.div`
|
|
8640
8641
|
background: linear-gradient(
|
|
8641
8642
|
90deg,
|
|
8642
8643
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -8647,27 +8648,27 @@ var LoadingBackground = import_styled_components39.default.div`
|
|
|
8647
8648
|
animation: ${shimmer} 1.5s infinite;
|
|
8648
8649
|
border-radius: var(--wui-border-radius-01);
|
|
8649
8650
|
`;
|
|
8650
|
-
var StyledLoadingLabel = (0,
|
|
8651
|
+
var StyledLoadingLabel = (0, import_styled_components40.default)(LoadingBackground)`
|
|
8651
8652
|
width: 80px;
|
|
8652
8653
|
height: var(--wui-typography-heading-6-line-height);
|
|
8653
8654
|
`;
|
|
8654
|
-
var StyledLoadingValue = (0,
|
|
8655
|
+
var StyledLoadingValue = (0, import_styled_components40.default)(LoadingBackground)`
|
|
8655
8656
|
width: 90%;
|
|
8656
8657
|
height: var(--wui-typography-heading-3-line-height);
|
|
8657
8658
|
`;
|
|
8658
|
-
var StyledLabel2 = (0,
|
|
8659
|
+
var StyledLabel2 = (0, import_styled_components40.default)(Heading)`
|
|
8659
8660
|
grid-area: label;
|
|
8660
8661
|
`;
|
|
8661
|
-
var StyledValue = (0,
|
|
8662
|
+
var StyledValue = (0, import_styled_components40.default)(Heading)`
|
|
8662
8663
|
grid-area: value;
|
|
8663
8664
|
`;
|
|
8664
|
-
var StyledSlot =
|
|
8665
|
+
var StyledSlot = import_styled_components40.default.div`
|
|
8665
8666
|
display: flex;
|
|
8666
8667
|
justify-content: flex-end;
|
|
8667
8668
|
grid-area: slot;
|
|
8668
8669
|
align-self: center;
|
|
8669
8670
|
`;
|
|
8670
|
-
var StyledDataCardTrendContainer =
|
|
8671
|
+
var StyledDataCardTrendContainer = import_styled_components40.default.div`
|
|
8671
8672
|
position: absolute;
|
|
8672
8673
|
bottom: var(--wui-space-01);
|
|
8673
8674
|
right: var(--wui-space-01);
|
|
@@ -8710,9 +8711,9 @@ var DataCard = ({
|
|
|
8710
8711
|
DataCard.displayName = "DataCard";
|
|
8711
8712
|
|
|
8712
8713
|
// src/components/DataCards/DataCards.tsx
|
|
8713
|
-
var
|
|
8714
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8714
8715
|
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
8715
|
-
var StyledDataCards = (0,
|
|
8716
|
+
var StyledDataCards = (0, import_styled_components41.default)(Box)`
|
|
8716
8717
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8717
8718
|
margin-top: 0; /* Remove default <dl> style */
|
|
8718
8719
|
> * {
|
|
@@ -8744,26 +8745,26 @@ var DataCards = ({
|
|
|
8744
8745
|
DataCards.displayName = "DataCards";
|
|
8745
8746
|
|
|
8746
8747
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8747
|
-
var
|
|
8748
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
8748
8749
|
|
|
8749
8750
|
// src/components/Text/Text.tsx
|
|
8750
|
-
var
|
|
8751
|
-
var
|
|
8751
|
+
var import_react28 = require("react");
|
|
8752
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
8752
8753
|
var import_type_guards30 = require("@wistia/type-guards");
|
|
8753
8754
|
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
8754
|
-
var bodyBoldStyles =
|
|
8755
|
+
var bodyBoldStyles = import_styled_components42.css`
|
|
8755
8756
|
> strong,
|
|
8756
8757
|
b {
|
|
8757
8758
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
8758
8759
|
}
|
|
8759
8760
|
`;
|
|
8760
|
-
var labelBoldStyles =
|
|
8761
|
+
var labelBoldStyles = import_styled_components42.css`
|
|
8761
8762
|
> strong,
|
|
8762
8763
|
b {
|
|
8763
8764
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
8764
8765
|
}
|
|
8765
8766
|
`;
|
|
8766
|
-
var body1TextStyle =
|
|
8767
|
+
var body1TextStyle = import_styled_components42.css`
|
|
8767
8768
|
--font-family: var(--wui-typography-body-1-family);
|
|
8768
8769
|
--font-size: var(--wui-typography-body-1-size);
|
|
8769
8770
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
@@ -8771,7 +8772,7 @@ var body1TextStyle = import_styled_components41.css`
|
|
|
8771
8772
|
--paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
|
|
8772
8773
|
${bodyBoldStyles}
|
|
8773
8774
|
`;
|
|
8774
|
-
var body2TextStyle =
|
|
8775
|
+
var body2TextStyle = import_styled_components42.css`
|
|
8775
8776
|
--font-family: var(--wui-typography-body-2-family);
|
|
8776
8777
|
--font-size: var(--wui-typography-body-2-size);
|
|
8777
8778
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -8779,7 +8780,7 @@ var body2TextStyle = import_styled_components41.css`
|
|
|
8779
8780
|
--paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
|
|
8780
8781
|
${bodyBoldStyles}
|
|
8781
8782
|
`;
|
|
8782
|
-
var body3TextStyle =
|
|
8783
|
+
var body3TextStyle = import_styled_components42.css`
|
|
8783
8784
|
--font-family: var(--wui-typography-body-3-family);
|
|
8784
8785
|
--font-size: var(--wui-typography-body-3-size);
|
|
8785
8786
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
@@ -8787,7 +8788,7 @@ var body3TextStyle = import_styled_components41.css`
|
|
|
8787
8788
|
--paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
|
|
8788
8789
|
${bodyBoldStyles}
|
|
8789
8790
|
`;
|
|
8790
|
-
var body4TextStyle =
|
|
8791
|
+
var body4TextStyle = import_styled_components42.css`
|
|
8791
8792
|
--font-family: var(--wui-typography-body-4-family);
|
|
8792
8793
|
--font-size: var(--wui-typography-body-4-size);
|
|
8793
8794
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -8795,47 +8796,47 @@ var body4TextStyle = import_styled_components41.css`
|
|
|
8795
8796
|
--paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
|
|
8796
8797
|
${bodyBoldStyles}
|
|
8797
8798
|
`;
|
|
8798
|
-
var label1TextStyle =
|
|
8799
|
+
var label1TextStyle = import_styled_components42.css`
|
|
8799
8800
|
--font-family: var(--wui-typography-label-1-family);
|
|
8800
8801
|
--font-size: var(--wui-typography-label-1-size);
|
|
8801
8802
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
8802
8803
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
8803
8804
|
${labelBoldStyles}
|
|
8804
8805
|
`;
|
|
8805
|
-
var label2TextStyle =
|
|
8806
|
+
var label2TextStyle = import_styled_components42.css`
|
|
8806
8807
|
--font-family: var(--wui-typography-label-2-family);
|
|
8807
8808
|
--font-size: var(--wui-typography-label-2-size);
|
|
8808
8809
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
8809
8810
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
8810
8811
|
${labelBoldStyles}
|
|
8811
8812
|
`;
|
|
8812
|
-
var label3TextStyle =
|
|
8813
|
+
var label3TextStyle = import_styled_components42.css`
|
|
8813
8814
|
--font-family: var(--wui-typography-label-3-family);
|
|
8814
8815
|
--font-size: var(--wui-typography-label-3-size);
|
|
8815
8816
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
8816
8817
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
8817
8818
|
${labelBoldStyles}
|
|
8818
8819
|
`;
|
|
8819
|
-
var label4TextStyle =
|
|
8820
|
+
var label4TextStyle = import_styled_components42.css`
|
|
8820
8821
|
--font-family: var(--wui-typography-label-4-family);
|
|
8821
8822
|
--font-size: var(--wui-typography-label-4-size);
|
|
8822
8823
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
8823
8824
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
8824
8825
|
${labelBoldStyles}
|
|
8825
8826
|
`;
|
|
8826
|
-
var body1MonoTextStyle =
|
|
8827
|
+
var body1MonoTextStyle = import_styled_components42.css`
|
|
8827
8828
|
${body1TextStyle};
|
|
8828
8829
|
--font-family: var(--wui-typography-family-mono);
|
|
8829
8830
|
`;
|
|
8830
|
-
var body2MonoTextStyle =
|
|
8831
|
+
var body2MonoTextStyle = import_styled_components42.css`
|
|
8831
8832
|
${body2TextStyle};
|
|
8832
8833
|
--font-family: var(--wui-typography-family-mono);
|
|
8833
8834
|
`;
|
|
8834
|
-
var body3MonoTextStyle =
|
|
8835
|
+
var body3MonoTextStyle = import_styled_components42.css`
|
|
8835
8836
|
${body3TextStyle};
|
|
8836
8837
|
--font-family: var(--wui-typography-family-mono);
|
|
8837
8838
|
`;
|
|
8838
|
-
var body4MonoTextStyle =
|
|
8839
|
+
var body4MonoTextStyle = import_styled_components42.css`
|
|
8839
8840
|
${body4TextStyle};
|
|
8840
8841
|
--font-family: var(--wui-typography-family-mono);
|
|
8841
8842
|
`;
|
|
@@ -8870,7 +8871,7 @@ var variantElementMap2 = {
|
|
|
8870
8871
|
label3: labelElement,
|
|
8871
8872
|
label4: labelElement
|
|
8872
8873
|
};
|
|
8873
|
-
var StyledText =
|
|
8874
|
+
var StyledText = import_styled_components42.default.div`
|
|
8874
8875
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8875
8876
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
8876
8877
|
if ($disabled) {
|
|
@@ -8895,27 +8896,26 @@ var StyledText = import_styled_components41.default.div`
|
|
|
8895
8896
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
8896
8897
|
${({ $truncate }) => {
|
|
8897
8898
|
if ((0, import_type_guards30.isNotNil)($truncate)) {
|
|
8898
|
-
return
|
|
8899
|
+
return import_styled_components42.css`
|
|
8899
8900
|
${ellipsisStyle};
|
|
8900
|
-
${
|
|
8901
|
-
-webkit-line-clamp: ${$truncate};
|
|
8901
|
+
${lineClampCss($truncate)};
|
|
8902
8902
|
`;
|
|
8903
8903
|
}
|
|
8904
8904
|
return void 0;
|
|
8905
8905
|
}}
|
|
8906
|
-
${({ $inline }) => $inline &&
|
|
8906
|
+
${({ $inline }) => $inline && import_styled_components42.css`
|
|
8907
8907
|
display: inline-block;
|
|
8908
8908
|
`}
|
|
8909
|
-
${({ $disabled }) => $disabled &&
|
|
8909
|
+
${({ $disabled }) => $disabled && import_styled_components42.css`
|
|
8910
8910
|
--text-color: var(--wui-color-text-disabled);
|
|
8911
8911
|
`}
|
|
8912
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8912
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components42.css`
|
|
8913
8913
|
user-select: none;
|
|
8914
8914
|
`}
|
|
8915
|
-
${({ $align }) =>
|
|
8915
|
+
${({ $align }) => import_styled_components42.css`
|
|
8916
8916
|
text-align: ${$align};
|
|
8917
8917
|
`}
|
|
8918
|
-
${({ as }) => as === "p" &&
|
|
8918
|
+
${({ as }) => as === "p" && import_styled_components42.css`
|
|
8919
8919
|
display: block;
|
|
8920
8920
|
|
|
8921
8921
|
+ p {
|
|
@@ -8923,7 +8923,7 @@ var StyledText = import_styled_components41.default.div`
|
|
|
8923
8923
|
}
|
|
8924
8924
|
`}
|
|
8925
8925
|
`;
|
|
8926
|
-
var TextComponent = (0,
|
|
8926
|
+
var TextComponent = (0, import_react28.forwardRef)(
|
|
8927
8927
|
({
|
|
8928
8928
|
align = "left",
|
|
8929
8929
|
colorScheme = "inherit",
|
|
@@ -8959,7 +8959,7 @@ var Text = makePolymorphic(TextComponent);
|
|
|
8959
8959
|
|
|
8960
8960
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8961
8961
|
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
8962
|
-
var StyledDataCardTrend =
|
|
8962
|
+
var StyledDataCardTrend = import_styled_components43.default.div`
|
|
8963
8963
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
8964
8964
|
background: var(--wui-color-bg-app);
|
|
8965
8965
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -8995,22 +8995,22 @@ var DataCardTrend = ({
|
|
|
8995
8995
|
};
|
|
8996
8996
|
|
|
8997
8997
|
// src/components/Divider/Divider.tsx
|
|
8998
|
-
var
|
|
8998
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8999
8999
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
9000
|
-
var horizontalBorderCss =
|
|
9000
|
+
var horizontalBorderCss = import_styled_components44.css`
|
|
9001
9001
|
border-top-color: var(--wui-color-border);
|
|
9002
9002
|
border-top-style: solid;
|
|
9003
9003
|
border-top-width: 1px;
|
|
9004
9004
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
9005
9005
|
height: 0;
|
|
9006
9006
|
`;
|
|
9007
|
-
var verticalBorderCss =
|
|
9007
|
+
var verticalBorderCss = import_styled_components44.css`
|
|
9008
9008
|
background-color: var(--wui-color-border);
|
|
9009
9009
|
max-width: 1px;
|
|
9010
9010
|
min-height: 100%;
|
|
9011
9011
|
width: 1px;
|
|
9012
9012
|
`;
|
|
9013
|
-
var DividerComponent =
|
|
9013
|
+
var DividerComponent = import_styled_components44.default.div`
|
|
9014
9014
|
${({ $orientation }) => {
|
|
9015
9015
|
switch ($orientation) {
|
|
9016
9016
|
case "vertical":
|
|
@@ -9035,14 +9035,14 @@ var Divider = ({ orientation = "horizontal", ...props }) => {
|
|
|
9035
9035
|
Divider.displayName = "Divider";
|
|
9036
9036
|
|
|
9037
9037
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
9038
|
-
var
|
|
9039
|
-
var
|
|
9038
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
9039
|
+
var import_react30 = require("react");
|
|
9040
9040
|
|
|
9041
9041
|
// src/components/Tooltip/Tooltip.tsx
|
|
9042
9042
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
9043
|
-
var
|
|
9043
|
+
var import_styled_components45 = __toESM(require("styled-components"));
|
|
9044
9044
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
9045
|
-
var StyledContent = (0,
|
|
9045
|
+
var StyledContent = (0, import_styled_components45.default)(import_react_tooltip2.Content)`
|
|
9046
9046
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
9047
9047
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
9048
9048
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -9134,13 +9134,13 @@ var Tooltip = ({
|
|
|
9134
9134
|
Tooltip.displayName = "Tooltip";
|
|
9135
9135
|
|
|
9136
9136
|
// src/components/Input/Input.tsx
|
|
9137
|
-
var
|
|
9138
|
-
var
|
|
9137
|
+
var import_react29 = require("react");
|
|
9138
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
9139
9139
|
var import_type_guards31 = require("@wistia/type-guards");
|
|
9140
9140
|
|
|
9141
9141
|
// src/css/sharedStyles/inputCssVariables.ts
|
|
9142
|
-
var
|
|
9143
|
-
var inputCssVariables =
|
|
9142
|
+
var import_styled_components46 = require("styled-components");
|
|
9143
|
+
var inputCssVariables = import_styled_components46.css`
|
|
9144
9144
|
/* Colors */
|
|
9145
9145
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
9146
9146
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -9167,7 +9167,7 @@ var inputCssVariables = import_styled_components45.css`
|
|
|
9167
9167
|
|
|
9168
9168
|
// src/components/Input/Input.tsx
|
|
9169
9169
|
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
9170
|
-
var inputStyles =
|
|
9170
|
+
var inputStyles = import_styled_components47.css`
|
|
9171
9171
|
${inputCssVariables}
|
|
9172
9172
|
input,
|
|
9173
9173
|
textarea {
|
|
@@ -9202,7 +9202,7 @@ var inputStyles = import_styled_components46.css`
|
|
|
9202
9202
|
}
|
|
9203
9203
|
}
|
|
9204
9204
|
`;
|
|
9205
|
-
var StyledInputContainer =
|
|
9205
|
+
var StyledInputContainer = import_styled_components47.default.div`
|
|
9206
9206
|
display: inline-flex;
|
|
9207
9207
|
position: relative;
|
|
9208
9208
|
${inputStyles};
|
|
@@ -9269,7 +9269,7 @@ var StyledInputContainer = import_styled_components46.default.div`
|
|
|
9269
9269
|
padding-right: 32px;
|
|
9270
9270
|
}
|
|
9271
9271
|
`;
|
|
9272
|
-
var Input = (0,
|
|
9272
|
+
var Input = (0, import_react29.forwardRef)(
|
|
9273
9273
|
({
|
|
9274
9274
|
fullWidth = true,
|
|
9275
9275
|
monospace = false,
|
|
@@ -9279,7 +9279,7 @@ var Input = (0, import_react28.forwardRef)(
|
|
|
9279
9279
|
rightIcon,
|
|
9280
9280
|
...props
|
|
9281
9281
|
}, externalRef) => {
|
|
9282
|
-
const internalRef = (0,
|
|
9282
|
+
const internalRef = (0, import_react29.useRef)();
|
|
9283
9283
|
const ref = (
|
|
9284
9284
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
9285
9285
|
(0, import_type_guards31.isNotNil)(externalRef) && (0, import_type_guards31.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
|
|
@@ -9289,14 +9289,14 @@ var Input = (0, import_react28.forwardRef)(
|
|
|
9289
9289
|
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(Icon, { type: "search" });
|
|
9290
9290
|
}
|
|
9291
9291
|
if ((0, import_type_guards31.isNotNil)(leftIconToDisplay)) {
|
|
9292
|
-
leftIconToDisplay = (0,
|
|
9292
|
+
leftIconToDisplay = (0, import_react29.cloneElement)(leftIconToDisplay, {
|
|
9293
9293
|
size: "md",
|
|
9294
9294
|
className: "wui-input-left-icon"
|
|
9295
9295
|
});
|
|
9296
9296
|
}
|
|
9297
9297
|
let rightIconToDisplay = rightIcon;
|
|
9298
9298
|
if ((0, import_type_guards31.isNotNil)(rightIconToDisplay)) {
|
|
9299
|
-
rightIconToDisplay = (0,
|
|
9299
|
+
rightIconToDisplay = (0, import_react29.cloneElement)(rightIconToDisplay, {
|
|
9300
9300
|
size: "md",
|
|
9301
9301
|
className: "wui-input-right-icon"
|
|
9302
9302
|
});
|
|
@@ -9344,7 +9344,7 @@ Input.displayName = "Input";
|
|
|
9344
9344
|
|
|
9345
9345
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
9346
9346
|
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
9347
|
-
var StyledInput = (0,
|
|
9347
|
+
var StyledInput = (0, import_styled_components48.default)(Input)`
|
|
9348
9348
|
:not([rows]) {
|
|
9349
9349
|
min-height: unset;
|
|
9350
9350
|
}
|
|
@@ -9361,7 +9361,7 @@ var StyledInput = (0, import_styled_components47.default)(Input)`
|
|
|
9361
9361
|
height: ${({ $height }) => `${$height}px`};
|
|
9362
9362
|
}
|
|
9363
9363
|
`;
|
|
9364
|
-
var editableStyles =
|
|
9364
|
+
var editableStyles = import_styled_components48.css`
|
|
9365
9365
|
&:has(+ :focus-within) {
|
|
9366
9366
|
background: var(--wui-color-bg-surface-hover);
|
|
9367
9367
|
}
|
|
@@ -9371,7 +9371,7 @@ var editableStyles = import_styled_components47.css`
|
|
|
9371
9371
|
cursor: pointer;
|
|
9372
9372
|
}
|
|
9373
9373
|
`;
|
|
9374
|
-
var StyledHeading2 = (0,
|
|
9374
|
+
var StyledHeading2 = (0, import_styled_components48.default)(Heading)`
|
|
9375
9375
|
width: 100%;
|
|
9376
9376
|
border-radius: var(--wui-border-radius-02);
|
|
9377
9377
|
padding: var(--wui-space-02);
|
|
@@ -9388,11 +9388,11 @@ var EditableHeading = ({
|
|
|
9388
9388
|
__forceEditing = false,
|
|
9389
9389
|
editingDisabled = false
|
|
9390
9390
|
}) => {
|
|
9391
|
-
const [isEditing, setIsEditing] = (0,
|
|
9392
|
-
const [value, setValue] = (0,
|
|
9393
|
-
const [previousValue, setPreviousValue] = (0,
|
|
9394
|
-
const [headingHeight, setHeadingHeight] = (0,
|
|
9395
|
-
const headingRef = (0,
|
|
9391
|
+
const [isEditing, setIsEditing] = (0, import_react30.useState)(false);
|
|
9392
|
+
const [value, setValue] = (0, import_react30.useState)(children);
|
|
9393
|
+
const [previousValue, setPreviousValue] = (0, import_react30.useState)(children);
|
|
9394
|
+
const [headingHeight, setHeadingHeight] = (0, import_react30.useState)("60");
|
|
9395
|
+
const headingRef = (0, import_react30.useRef)(null);
|
|
9396
9396
|
const handleSetEditing = (editing) => {
|
|
9397
9397
|
if (editingDisabled) return;
|
|
9398
9398
|
if (editing && headingRef.current) {
|
|
@@ -9471,22 +9471,22 @@ var EditableHeading = ({
|
|
|
9471
9471
|
};
|
|
9472
9472
|
|
|
9473
9473
|
// src/components/Form/Form.tsx
|
|
9474
|
-
var
|
|
9475
|
-
var
|
|
9474
|
+
var import_react32 = require("react");
|
|
9475
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9476
9476
|
var import_type_guards32 = require("@wistia/type-guards");
|
|
9477
9477
|
|
|
9478
9478
|
// src/components/Stack/Stack.tsx
|
|
9479
|
-
var
|
|
9480
|
-
var
|
|
9479
|
+
var import_react31 = require("react");
|
|
9480
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9481
9481
|
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
9482
9482
|
var DEFAULT_ELEMENT4 = "div";
|
|
9483
|
-
var StyledStack =
|
|
9483
|
+
var StyledStack = import_styled_components49.default.div`
|
|
9484
9484
|
display: flex;
|
|
9485
9485
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
9486
9486
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
9487
9487
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
9488
9488
|
`;
|
|
9489
|
-
var StackComponent = (0,
|
|
9489
|
+
var StackComponent = (0, import_react31.forwardRef)(
|
|
9490
9490
|
({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
|
|
9491
9491
|
const responsiveGap = useResponsiveProp(gap);
|
|
9492
9492
|
const responsiveDirection = useResponsiveProp(direction);
|
|
@@ -9509,13 +9509,13 @@ var Stack = makePolymorphic(StackComponent);
|
|
|
9509
9509
|
|
|
9510
9510
|
// src/components/Form/Form.tsx
|
|
9511
9511
|
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
9512
|
-
var StyledForm =
|
|
9512
|
+
var StyledForm = import_styled_components50.default.form`
|
|
9513
9513
|
--form-default-width: 690px;
|
|
9514
9514
|
|
|
9515
9515
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
9516
9516
|
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
9517
9517
|
`;
|
|
9518
|
-
var FormContext = (0,
|
|
9518
|
+
var FormContext = (0, import_react32.createContext)({
|
|
9519
9519
|
values: {},
|
|
9520
9520
|
errors: {},
|
|
9521
9521
|
hasSubmitted: false,
|
|
@@ -9531,11 +9531,11 @@ var FormComponent = ({
|
|
|
9531
9531
|
fullWidth = false,
|
|
9532
9532
|
...props
|
|
9533
9533
|
}, forwardedRef) => {
|
|
9534
|
-
const [errors, setErrors] = (0,
|
|
9535
|
-
const [hasSubmitted, setHasSubmitted] = (0,
|
|
9536
|
-
const innerRef = (0,
|
|
9534
|
+
const [errors, setErrors] = (0, import_react32.useState)({});
|
|
9535
|
+
const [hasSubmitted, setHasSubmitted] = (0, import_react32.useState)(false);
|
|
9536
|
+
const innerRef = (0, import_react32.useRef)();
|
|
9537
9537
|
const ref = forwardedRef ?? innerRef;
|
|
9538
|
-
const autoId = (0,
|
|
9538
|
+
const autoId = (0, import_react32.useId)();
|
|
9539
9539
|
const id = props.id ?? autoId;
|
|
9540
9540
|
const handleValidate = (nextFormData) => {
|
|
9541
9541
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
@@ -9577,7 +9577,7 @@ var FormComponent = ({
|
|
|
9577
9577
|
void action(null);
|
|
9578
9578
|
}
|
|
9579
9579
|
};
|
|
9580
|
-
const context = (0,
|
|
9580
|
+
const context = (0, import_react32.useMemo)(() => {
|
|
9581
9581
|
return {
|
|
9582
9582
|
values,
|
|
9583
9583
|
errors,
|
|
@@ -9606,15 +9606,15 @@ var FormComponent = ({
|
|
|
9606
9606
|
);
|
|
9607
9607
|
};
|
|
9608
9608
|
FormComponent.displayName = "Form";
|
|
9609
|
-
var Form = (0,
|
|
9609
|
+
var Form = (0, import_react32.forwardRef)(FormComponent);
|
|
9610
9610
|
|
|
9611
9611
|
// src/components/Form/useFormState.tsx
|
|
9612
|
-
var
|
|
9612
|
+
var import_react33 = require("react");
|
|
9613
9613
|
var useFormState = (action, initialData = {}) => {
|
|
9614
|
-
const [data, setData] = (0,
|
|
9615
|
-
const [isPending, setIsPending] = (0,
|
|
9616
|
-
const [error, setError] = (0,
|
|
9617
|
-
const formAction = (0,
|
|
9614
|
+
const [data, setData] = (0, import_react33.useState)(initialData);
|
|
9615
|
+
const [isPending, setIsPending] = (0, import_react33.useState)(false);
|
|
9616
|
+
const [error, setError] = (0, import_react33.useState)(null);
|
|
9617
|
+
const formAction = (0, import_react33.useCallback)(
|
|
9618
9618
|
async (nextFormData) => {
|
|
9619
9619
|
if (nextFormData === null) {
|
|
9620
9620
|
setData(initialData);
|
|
@@ -9627,7 +9627,7 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9627
9627
|
const result = await action(data, nextData);
|
|
9628
9628
|
setData(result);
|
|
9629
9629
|
} catch (err) {
|
|
9630
|
-
setError(err);
|
|
9630
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
9631
9631
|
} finally {
|
|
9632
9632
|
setIsPending(false);
|
|
9633
9633
|
}
|
|
@@ -9645,15 +9645,15 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9645
9645
|
};
|
|
9646
9646
|
|
|
9647
9647
|
// src/components/Form/FormErrorSummary.tsx
|
|
9648
|
-
var
|
|
9648
|
+
var import_react34 = require("react");
|
|
9649
9649
|
var import_type_guards33 = require("@wistia/type-guards");
|
|
9650
9650
|
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
9651
9651
|
var ErrorItem = ({ name, error, formId }) => {
|
|
9652
9652
|
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
9653
9653
|
};
|
|
9654
9654
|
var FormErrorSummary = ({ description }) => {
|
|
9655
|
-
const ref = (0,
|
|
9656
|
-
const { formId, errors, hasSubmitted } = (0,
|
|
9655
|
+
const ref = (0, import_react34.useRef)(null);
|
|
9656
|
+
const { formId, errors, hasSubmitted } = (0, import_react34.useContext)(FormContext);
|
|
9657
9657
|
const isValid = Object.keys(errors).length === 0;
|
|
9658
9658
|
if (isValid || !hasSubmitted) {
|
|
9659
9659
|
return null;
|
|
@@ -9683,14 +9683,14 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9683
9683
|
};
|
|
9684
9684
|
|
|
9685
9685
|
// src/components/FormField/FormField.tsx
|
|
9686
|
-
var
|
|
9687
|
-
var
|
|
9686
|
+
var import_react37 = require("react");
|
|
9687
|
+
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9688
9688
|
var import_type_guards34 = require("@wistia/type-guards");
|
|
9689
9689
|
|
|
9690
9690
|
// src/components/Label/Label.tsx
|
|
9691
|
-
var
|
|
9691
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9692
9692
|
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
9693
|
-
var requiredStyle =
|
|
9693
|
+
var requiredStyle = import_styled_components51.css`
|
|
9694
9694
|
&::after {
|
|
9695
9695
|
color: var(--wui-color-text-error);
|
|
9696
9696
|
display: inline;
|
|
@@ -9698,10 +9698,10 @@ var requiredStyle = import_styled_components50.css`
|
|
|
9698
9698
|
content: '*';
|
|
9699
9699
|
}
|
|
9700
9700
|
`;
|
|
9701
|
-
var disabledStyle3 =
|
|
9701
|
+
var disabledStyle3 = import_styled_components51.css`
|
|
9702
9702
|
color: var(--wui-color-text-disabled);
|
|
9703
9703
|
`;
|
|
9704
|
-
var StyledLabel3 =
|
|
9704
|
+
var StyledLabel3 = import_styled_components51.default.label`
|
|
9705
9705
|
display: block;
|
|
9706
9706
|
width: 100%;
|
|
9707
9707
|
color: var(--wui-color-text);
|
|
@@ -9748,20 +9748,20 @@ var Label = ({
|
|
|
9748
9748
|
Label.displayName = "Label";
|
|
9749
9749
|
|
|
9750
9750
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9751
|
-
var
|
|
9751
|
+
var import_react36 = require("react");
|
|
9752
9752
|
|
|
9753
9753
|
// src/components/FormGroup/FormGroup.tsx
|
|
9754
|
-
var
|
|
9755
|
-
var
|
|
9754
|
+
var import_styled_components52 = __toESM(require("styled-components"));
|
|
9755
|
+
var import_react35 = require("react");
|
|
9756
9756
|
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
9757
|
-
var StyledFieldset =
|
|
9757
|
+
var StyledFieldset = import_styled_components52.default.fieldset`
|
|
9758
9758
|
border: 0;
|
|
9759
9759
|
`;
|
|
9760
|
-
var StyledLegend =
|
|
9760
|
+
var StyledLegend = import_styled_components52.default.legend`
|
|
9761
9761
|
margin-bottom: var(--space-01);
|
|
9762
9762
|
`;
|
|
9763
9763
|
var FormGroup = ({ children, label, ...props }) => {
|
|
9764
|
-
const ref = (0,
|
|
9764
|
+
const ref = (0, import_react35.useRef)();
|
|
9765
9765
|
return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
|
|
9766
9766
|
Stack,
|
|
9767
9767
|
{
|
|
@@ -9786,7 +9786,7 @@ FormGroup.displayName = "FormGroup";
|
|
|
9786
9786
|
|
|
9787
9787
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9788
9788
|
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
9789
|
-
var CheckboxGroupContext = (0,
|
|
9789
|
+
var CheckboxGroupContext = (0, import_react36.createContext)(null);
|
|
9790
9790
|
var CheckboxGroup = ({
|
|
9791
9791
|
children,
|
|
9792
9792
|
name,
|
|
@@ -9794,7 +9794,7 @@ var CheckboxGroup = ({
|
|
|
9794
9794
|
value,
|
|
9795
9795
|
...props
|
|
9796
9796
|
}) => {
|
|
9797
|
-
const context = (0,
|
|
9797
|
+
const context = (0, import_react36.useMemo)(() => {
|
|
9798
9798
|
return {
|
|
9799
9799
|
name,
|
|
9800
9800
|
onChange
|
|
@@ -9806,7 +9806,7 @@ CheckboxGroup.displayName = "CheckboxGroup";
|
|
|
9806
9806
|
|
|
9807
9807
|
// src/components/FormField/FormField.tsx
|
|
9808
9808
|
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
9809
|
-
var StyledFormField =
|
|
9809
|
+
var StyledFormField = import_styled_components53.default.div`
|
|
9810
9810
|
--form-field-spacing: var(--wui-space-01);
|
|
9811
9811
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
9812
9812
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -9836,7 +9836,7 @@ var StyledFormField = import_styled_components52.default.div`
|
|
|
9836
9836
|
grid-template-rows: 1fr;
|
|
9837
9837
|
}
|
|
9838
9838
|
`;
|
|
9839
|
-
var StyledErrorList =
|
|
9839
|
+
var StyledErrorList = import_styled_components53.default.ul`
|
|
9840
9840
|
margin: 0;
|
|
9841
9841
|
padding: 0;
|
|
9842
9842
|
padding-left: var(--wui-space-04);
|
|
@@ -9879,8 +9879,8 @@ var FormField = ({
|
|
|
9879
9879
|
value,
|
|
9880
9880
|
...props
|
|
9881
9881
|
}) => {
|
|
9882
|
-
const formState = (0,
|
|
9883
|
-
const checkboxGroup = (0,
|
|
9882
|
+
const formState = (0, import_react37.useContext)(FormContext);
|
|
9883
|
+
const checkboxGroup = (0, import_react37.useContext)(CheckboxGroupContext);
|
|
9884
9884
|
const defaultValue = formState.values[name];
|
|
9885
9885
|
const isIntegratedLabel = children.type === Checkbox;
|
|
9886
9886
|
const computedId = id ?? `${formState.formId}-${name}`;
|
|
@@ -9918,7 +9918,7 @@ var FormField = ({
|
|
|
9918
9918
|
"aria-invalid": (0, import_type_guards34.isNotNil)(error)
|
|
9919
9919
|
};
|
|
9920
9920
|
}
|
|
9921
|
-
|
|
9921
|
+
import_react37.Children.only(children);
|
|
9922
9922
|
return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
|
|
9923
9923
|
StyledFormField,
|
|
9924
9924
|
{
|
|
@@ -9927,7 +9927,7 @@ var FormField = ({
|
|
|
9927
9927
|
children: [
|
|
9928
9928
|
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
9929
9929
|
(0, import_type_guards34.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
9930
|
-
(0,
|
|
9930
|
+
(0, import_react37.cloneElement)(children, childProps),
|
|
9931
9931
|
(0, import_type_guards34.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(import_jsx_runtime227.Fragment, { children: [
|
|
9932
9932
|
/* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", {}),
|
|
9933
9933
|
/* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
|
|
@@ -9945,9 +9945,9 @@ var FormField = ({
|
|
|
9945
9945
|
FormField.displayName = "FormField";
|
|
9946
9946
|
|
|
9947
9947
|
// src/components/FormGroup/RadioGroup.tsx
|
|
9948
|
-
var
|
|
9948
|
+
var import_react38 = require("react");
|
|
9949
9949
|
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
9950
|
-
var RadioGroupContext = (0,
|
|
9950
|
+
var RadioGroupContext = (0, import_react38.createContext)(null);
|
|
9951
9951
|
var RadioGroup = ({
|
|
9952
9952
|
children,
|
|
9953
9953
|
name,
|
|
@@ -9955,7 +9955,7 @@ var RadioGroup = ({
|
|
|
9955
9955
|
value,
|
|
9956
9956
|
...props
|
|
9957
9957
|
}) => {
|
|
9958
|
-
const context = (0,
|
|
9958
|
+
const context = (0, import_react38.useMemo)(() => {
|
|
9959
9959
|
return {
|
|
9960
9960
|
name,
|
|
9961
9961
|
onChange
|
|
@@ -9966,10 +9966,10 @@ var RadioGroup = ({
|
|
|
9966
9966
|
RadioGroup.displayName = "RadioGroup";
|
|
9967
9967
|
|
|
9968
9968
|
// src/components/IconButton/IconButton.tsx
|
|
9969
|
-
var
|
|
9970
|
-
var
|
|
9969
|
+
var import_react39 = require("react");
|
|
9970
|
+
var import_styled_components54 = __toESM(require("styled-components"));
|
|
9971
9971
|
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
9972
|
-
var StyledButton2 = (0,
|
|
9972
|
+
var StyledButton2 = (0, import_styled_components54.default)(Button)`
|
|
9973
9973
|
--icon-button-size-sm: 24px;
|
|
9974
9974
|
--icon-button-size-md: 32px;
|
|
9975
9975
|
--icon-button-size-lg: 40px;
|
|
@@ -9983,7 +9983,7 @@ var StyledButton2 = (0, import_styled_components53.default)(Button)`
|
|
|
9983
9983
|
align-items: center;
|
|
9984
9984
|
line-height: 1;
|
|
9985
9985
|
`;
|
|
9986
|
-
var IconButton = (0,
|
|
9986
|
+
var IconButton = (0, import_react39.forwardRef)(
|
|
9987
9987
|
({ children, label, size = "md", ...props }, ref) => {
|
|
9988
9988
|
const responsiveSize = useResponsiveProp(size);
|
|
9989
9989
|
return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
|
|
@@ -9994,7 +9994,7 @@ var IconButton = (0, import_react38.forwardRef)(
|
|
|
9994
9994
|
"aria-label": label,
|
|
9995
9995
|
"data-wistia-ui-icon-button": true,
|
|
9996
9996
|
size: responsiveSize,
|
|
9997
|
-
children: (0,
|
|
9997
|
+
children: (0, import_react39.cloneElement)(import_react39.Children.only(children), {
|
|
9998
9998
|
size: responsiveSize
|
|
9999
9999
|
})
|
|
10000
10000
|
}
|
|
@@ -10003,20 +10003,84 @@ var IconButton = (0, import_react38.forwardRef)(
|
|
|
10003
10003
|
);
|
|
10004
10004
|
IconButton.displayName = "IconButton";
|
|
10005
10005
|
|
|
10006
|
+
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
10007
|
+
var import_styled_components55 = __toESM(require("styled-components"));
|
|
10008
|
+
var import_react40 = require("react");
|
|
10009
|
+
var import_type_guards35 = require("@wistia/type-guards");
|
|
10010
|
+
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
10011
|
+
var StyledInput2 = (0, import_styled_components55.default)(Input)`
|
|
10012
|
+
&:not([aria-disabled='true']) {
|
|
10013
|
+
cursor: pointer;
|
|
10014
|
+
}
|
|
10015
|
+
|
|
10016
|
+
&::selection {
|
|
10017
|
+
background-color: transparent;
|
|
10018
|
+
}
|
|
10019
|
+
`;
|
|
10020
|
+
var COPY_SUCCESS_DURATION = 2e3;
|
|
10021
|
+
var InputClickToCopy = (0, import_react40.forwardRef)(
|
|
10022
|
+
({ value, onCopy, ...props }, ref) => {
|
|
10023
|
+
const [isCopied, setIsCopied] = (0, import_react40.useState)(false);
|
|
10024
|
+
(0, import_react40.useEffect)(() => {
|
|
10025
|
+
if (isCopied) {
|
|
10026
|
+
const timeout = setTimeout(() => {
|
|
10027
|
+
setIsCopied(false);
|
|
10028
|
+
}, COPY_SUCCESS_DURATION);
|
|
10029
|
+
return () => {
|
|
10030
|
+
clearTimeout(timeout);
|
|
10031
|
+
};
|
|
10032
|
+
}
|
|
10033
|
+
return () => null;
|
|
10034
|
+
}, [isCopied]);
|
|
10035
|
+
const handleClick = (event) => {
|
|
10036
|
+
event.preventDefault();
|
|
10037
|
+
if ((0, import_type_guards35.isFunction)(props.onClick)) {
|
|
10038
|
+
props.onClick(event);
|
|
10039
|
+
}
|
|
10040
|
+
void copyToClipboard(value).then(() => {
|
|
10041
|
+
setIsCopied(true);
|
|
10042
|
+
if ((0, import_type_guards35.isFunction)(onCopy)) {
|
|
10043
|
+
onCopy(value);
|
|
10044
|
+
}
|
|
10045
|
+
return value;
|
|
10046
|
+
});
|
|
10047
|
+
};
|
|
10048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
10049
|
+
StyledInput2,
|
|
10050
|
+
{
|
|
10051
|
+
"aria-label": "Click to Copy",
|
|
10052
|
+
...props,
|
|
10053
|
+
ref,
|
|
10054
|
+
onClick: handleClick,
|
|
10055
|
+
readOnly: true,
|
|
10056
|
+
rightIcon: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
10057
|
+
Icon,
|
|
10058
|
+
{
|
|
10059
|
+
colorScheme: "success",
|
|
10060
|
+
type: "checkmark-circle"
|
|
10061
|
+
}
|
|
10062
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(Icon, { type: "save-as-copy" }),
|
|
10063
|
+
value
|
|
10064
|
+
}
|
|
10065
|
+
);
|
|
10066
|
+
}
|
|
10067
|
+
);
|
|
10068
|
+
InputClickToCopy.displayName = "InputClickToCopy";
|
|
10069
|
+
|
|
10006
10070
|
// src/components/Menu/Menu.tsx
|
|
10007
|
-
var
|
|
10071
|
+
var import_styled_components56 = __toESM(require("styled-components"));
|
|
10008
10072
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
10009
|
-
var
|
|
10010
|
-
var
|
|
10073
|
+
var import_type_guards36 = require("@wistia/type-guards");
|
|
10074
|
+
var import_react42 = require("react");
|
|
10011
10075
|
|
|
10012
10076
|
// src/components/Menu/MenuContext.tsx
|
|
10013
|
-
var
|
|
10014
|
-
var MenuContext = (0,
|
|
10015
|
-
var useMenuContext = () => (0,
|
|
10077
|
+
var import_react41 = require("react");
|
|
10078
|
+
var MenuContext = (0, import_react41.createContext)({ compact: false });
|
|
10079
|
+
var useMenuContext = () => (0, import_react41.useContext)(MenuContext);
|
|
10016
10080
|
|
|
10017
10081
|
// src/components/Menu/Menu.tsx
|
|
10018
|
-
var
|
|
10019
|
-
var open =
|
|
10082
|
+
var import_jsx_runtime231 = require("react/jsx-runtime");
|
|
10083
|
+
var open = import_styled_components56.keyframes`
|
|
10020
10084
|
from {
|
|
10021
10085
|
opacity: 0;
|
|
10022
10086
|
transform: scale(.97) translateY(-8px);
|
|
@@ -10026,7 +10090,7 @@ var open = import_styled_components54.keyframes`
|
|
|
10026
10090
|
transform: scale(1);
|
|
10027
10091
|
}
|
|
10028
10092
|
`;
|
|
10029
|
-
var close =
|
|
10093
|
+
var close = import_styled_components56.keyframes`
|
|
10030
10094
|
from {
|
|
10031
10095
|
opacity: 1;
|
|
10032
10096
|
transform: scale(1);
|
|
@@ -10036,7 +10100,7 @@ var close = import_styled_components54.keyframes`
|
|
|
10036
10100
|
transform: scale(.97) translateY(-8px);
|
|
10037
10101
|
}
|
|
10038
10102
|
`;
|
|
10039
|
-
var menuItemCss =
|
|
10103
|
+
var menuItemCss = import_styled_components56.css`
|
|
10040
10104
|
--menu-label-description-gap: var(--wui-space-01);
|
|
10041
10105
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
10042
10106
|
--menu-item-left-icon-size: 24px;
|
|
@@ -10047,7 +10111,7 @@ var menuItemCss = import_styled_components54.css`
|
|
|
10047
10111
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
10048
10112
|
--menu-divider-margin: var(--wui-space-02);
|
|
10049
10113
|
`;
|
|
10050
|
-
var compactMenuItemCss =
|
|
10114
|
+
var compactMenuItemCss = import_styled_components56.css`
|
|
10051
10115
|
--menu-label-description-gap: 0;
|
|
10052
10116
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
10053
10117
|
--menu-item-left-icon-size: 16px;
|
|
@@ -10058,7 +10122,7 @@ var compactMenuItemCss = import_styled_components54.css`
|
|
|
10058
10122
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
10059
10123
|
--menu-divider-margin: var(--wui-space-01);
|
|
10060
10124
|
`;
|
|
10061
|
-
var menuContentCss =
|
|
10125
|
+
var menuContentCss = import_styled_components56.css`
|
|
10062
10126
|
--menu-font-family: var(--wui-typography-family-default);
|
|
10063
10127
|
--menu-bg: var(--wui-color-bg-surface);
|
|
10064
10128
|
--menu-shadow: var(--wui-elevation-01);
|
|
@@ -10100,7 +10164,7 @@ var menuContentCss = import_styled_components54.css`
|
|
|
10100
10164
|
margin: var(--menu-divider-margin) 0;
|
|
10101
10165
|
}
|
|
10102
10166
|
`;
|
|
10103
|
-
var MenuContent = (0,
|
|
10167
|
+
var MenuContent = (0, import_styled_components56.default)(import_react_dropdown_menu.DropdownMenuContent)`
|
|
10104
10168
|
${menuContentCss}
|
|
10105
10169
|
`;
|
|
10106
10170
|
var Menu = ({
|
|
@@ -10116,9 +10180,9 @@ var Menu = ({
|
|
|
10116
10180
|
onInteractOutside,
|
|
10117
10181
|
...props
|
|
10118
10182
|
}) => {
|
|
10119
|
-
const contextValue = (0,
|
|
10183
|
+
const contextValue = (0, import_react42.useMemo)(() => ({ compact }), [compact]);
|
|
10120
10184
|
let controlProps = {
|
|
10121
|
-
...(0,
|
|
10185
|
+
...(0, import_type_guards36.isNotNil)(onOpenChange) && (0, import_type_guards36.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
10122
10186
|
};
|
|
10123
10187
|
if (disabled) {
|
|
10124
10188
|
controlProps = {
|
|
@@ -10126,24 +10190,24 @@ var Menu = ({
|
|
|
10126
10190
|
onOpenChange: () => null
|
|
10127
10191
|
};
|
|
10128
10192
|
}
|
|
10129
|
-
return /* @__PURE__ */ (0,
|
|
10193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime231.jsxs)(
|
|
10130
10194
|
import_react_dropdown_menu.DropdownMenu,
|
|
10131
10195
|
{
|
|
10132
10196
|
modal: false,
|
|
10133
10197
|
...controlProps,
|
|
10134
10198
|
children: [
|
|
10135
|
-
/* @__PURE__ */ (0,
|
|
10199
|
+
/* @__PURE__ */ (0, import_jsx_runtime231.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards36.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
10136
10200
|
Button,
|
|
10137
10201
|
{
|
|
10138
10202
|
"aria-expanded": isOpen,
|
|
10139
10203
|
disabled,
|
|
10140
10204
|
forceState: isOpen ? "active" : void 0,
|
|
10141
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
10205
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(Icon, { type: "caret-down" }),
|
|
10142
10206
|
...triggerProps,
|
|
10143
10207
|
children: label
|
|
10144
10208
|
}
|
|
10145
10209
|
) }),
|
|
10146
|
-
/* @__PURE__ */ (0,
|
|
10210
|
+
/* @__PURE__ */ (0, import_jsx_runtime231.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
10147
10211
|
MenuContent,
|
|
10148
10212
|
{
|
|
10149
10213
|
...props,
|
|
@@ -10163,19 +10227,19 @@ var Menu = ({
|
|
|
10163
10227
|
Menu.displayName = "Menu";
|
|
10164
10228
|
|
|
10165
10229
|
// src/components/Menu/MenuLabel.tsx
|
|
10166
|
-
var
|
|
10230
|
+
var import_styled_components57 = __toESM(require("styled-components"));
|
|
10167
10231
|
var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
|
|
10168
|
-
var
|
|
10169
|
-
var StyledMenuLabel = (0,
|
|
10232
|
+
var import_jsx_runtime232 = require("react/jsx-runtime");
|
|
10233
|
+
var StyledMenuLabel = (0, import_styled_components57.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
|
|
10170
10234
|
padding: var(--wui-space-02);
|
|
10171
10235
|
`;
|
|
10172
10236
|
var MenuLabel = ({ children, ...props }) => {
|
|
10173
|
-
return /* @__PURE__ */ (0,
|
|
10237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
10174
10238
|
StyledMenuLabel,
|
|
10175
10239
|
{
|
|
10176
10240
|
asChild: true,
|
|
10177
10241
|
...props,
|
|
10178
|
-
children: /* @__PURE__ */ (0,
|
|
10242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
10179
10243
|
Heading,
|
|
10180
10244
|
{
|
|
10181
10245
|
renderAs: "span",
|
|
@@ -10190,17 +10254,17 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
10190
10254
|
MenuLabel.displayName = "MenuLabel";
|
|
10191
10255
|
|
|
10192
10256
|
// src/components/Menu/SubMenu.tsx
|
|
10193
|
-
var
|
|
10194
|
-
var
|
|
10257
|
+
var import_react44 = require("react");
|
|
10258
|
+
var import_styled_components60 = __toESM(require("styled-components"));
|
|
10195
10259
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
10196
|
-
var
|
|
10260
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
10197
10261
|
|
|
10198
10262
|
// src/components/Menu/MenuItemButton.tsx
|
|
10199
|
-
var
|
|
10200
|
-
var
|
|
10201
|
-
var
|
|
10202
|
-
var
|
|
10203
|
-
var StyledButton3 = (0,
|
|
10263
|
+
var import_react43 = require("react");
|
|
10264
|
+
var import_styled_components58 = __toESM(require("styled-components"));
|
|
10265
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
10266
|
+
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
10267
|
+
var StyledButton3 = (0, import_styled_components58.default)(Button)`
|
|
10204
10268
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
10205
10269
|
|
|
10206
10270
|
display: flex;
|
|
@@ -10239,7 +10303,7 @@ var StyledButton3 = (0, import_styled_components56.default)(Button)`
|
|
|
10239
10303
|
padding-left: var(--wui-space-04);
|
|
10240
10304
|
}
|
|
10241
10305
|
`;
|
|
10242
|
-
var StyledLeftIconContainer =
|
|
10306
|
+
var StyledLeftIconContainer = import_styled_components58.default.div`
|
|
10243
10307
|
height: var(--menu-item-left-icon-size);
|
|
10244
10308
|
width: var(--menu-item-left-icon-size);
|
|
10245
10309
|
|
|
@@ -10250,7 +10314,7 @@ var StyledLeftIconContainer = import_styled_components56.default.div`
|
|
|
10250
10314
|
}
|
|
10251
10315
|
}
|
|
10252
10316
|
`;
|
|
10253
|
-
var StyledRightIconContainer =
|
|
10317
|
+
var StyledRightIconContainer = import_styled_components58.default.div`
|
|
10254
10318
|
height: var(--menu-item-right-icon-size);
|
|
10255
10319
|
width: var(--menu-item-right-icon-size);
|
|
10256
10320
|
|
|
@@ -10261,28 +10325,28 @@ var StyledRightIconContainer = import_styled_components56.default.div`
|
|
|
10261
10325
|
}
|
|
10262
10326
|
}
|
|
10263
10327
|
`;
|
|
10264
|
-
var StyledLabelAndDescriptionContainer =
|
|
10328
|
+
var StyledLabelAndDescriptionContainer = import_styled_components58.default.div`
|
|
10265
10329
|
display: flex;
|
|
10266
10330
|
flex-direction: column;
|
|
10267
10331
|
gap: var(--menu-label-description-gap);
|
|
10268
10332
|
flex-basis: 100%;
|
|
10269
10333
|
`;
|
|
10270
|
-
var StyledBadgeContainer =
|
|
10334
|
+
var StyledBadgeContainer = import_styled_components58.default.div`
|
|
10271
10335
|
align-self: start;
|
|
10272
10336
|
justify-self: end;
|
|
10273
10337
|
font-size: var(--wui-typography-label-4-size);
|
|
10274
10338
|
color: var(--wui-color-text-secondary);
|
|
10275
10339
|
`;
|
|
10276
|
-
var MenuItemButton = (0,
|
|
10340
|
+
var MenuItemButton = (0, import_react43.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
10277
10341
|
let { colorScheme, badge } = props;
|
|
10278
10342
|
if (appearance === "dangerous") {
|
|
10279
|
-
if ((0,
|
|
10343
|
+
if ((0, import_type_guards37.isNotUndefined)(colorScheme)) {
|
|
10280
10344
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
10281
10345
|
}
|
|
10282
10346
|
colorScheme = "error";
|
|
10283
10347
|
}
|
|
10284
10348
|
if (appearance === "gated") {
|
|
10285
|
-
badge = /* @__PURE__ */ (0,
|
|
10349
|
+
badge = /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
10286
10350
|
Icon,
|
|
10287
10351
|
{
|
|
10288
10352
|
colorScheme: "purple",
|
|
@@ -10294,7 +10358,7 @@ var MenuItemButton = (0, import_react41.forwardRef)(({ children, appearance, com
|
|
|
10294
10358
|
}
|
|
10295
10359
|
);
|
|
10296
10360
|
}
|
|
10297
|
-
return /* @__PURE__ */ (0,
|
|
10361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)(
|
|
10298
10362
|
StyledButton3,
|
|
10299
10363
|
{
|
|
10300
10364
|
...props,
|
|
@@ -10304,10 +10368,10 @@ var MenuItemButton = (0, import_react41.forwardRef)(({ children, appearance, com
|
|
|
10304
10368
|
fullWidth: true,
|
|
10305
10369
|
unstyled: true,
|
|
10306
10370
|
children: [
|
|
10307
|
-
props.leftIcon ? /* @__PURE__ */ (0,
|
|
10308
|
-
/* @__PURE__ */ (0,
|
|
10309
|
-
(0,
|
|
10310
|
-
props.rightIcon ? /* @__PURE__ */ (0,
|
|
10371
|
+
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
10372
|
+
/* @__PURE__ */ (0, import_jsx_runtime233.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
10373
|
+
(0, import_type_guards37.isNotNil)(badge) || (0, import_type_guards37.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
10374
|
+
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
10311
10375
|
]
|
|
10312
10376
|
}
|
|
10313
10377
|
);
|
|
@@ -10315,33 +10379,33 @@ var MenuItemButton = (0, import_react41.forwardRef)(({ children, appearance, com
|
|
|
10315
10379
|
MenuItemButton.displayName = "MenuItemButton";
|
|
10316
10380
|
|
|
10317
10381
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
10318
|
-
var
|
|
10319
|
-
var
|
|
10320
|
-
var StyledMenuItemLabel =
|
|
10321
|
-
var StyledMenuItemDescription = (0,
|
|
10382
|
+
var import_styled_components59 = __toESM(require("styled-components"));
|
|
10383
|
+
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
10384
|
+
var StyledMenuItemLabel = import_styled_components59.default.span``;
|
|
10385
|
+
var StyledMenuItemDescription = (0, import_styled_components59.default)(Text).attrs({
|
|
10322
10386
|
variant: "body4",
|
|
10323
10387
|
prominence: "secondary"
|
|
10324
10388
|
})``;
|
|
10325
10389
|
var MenuItemLabel = ({ children }) => {
|
|
10326
|
-
return /* @__PURE__ */ (0,
|
|
10390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(StyledMenuItemLabel, { children });
|
|
10327
10391
|
};
|
|
10328
10392
|
var MenuItemDescription = ({ children }) => {
|
|
10329
|
-
return /* @__PURE__ */ (0,
|
|
10393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(StyledMenuItemDescription, { children });
|
|
10330
10394
|
};
|
|
10331
10395
|
|
|
10332
10396
|
// src/components/Menu/SubMenu.tsx
|
|
10333
|
-
var
|
|
10334
|
-
var SubMenuContent = (0,
|
|
10397
|
+
var import_jsx_runtime235 = require("react/jsx-runtime");
|
|
10398
|
+
var SubMenuContent = (0, import_styled_components60.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
|
|
10335
10399
|
${menuContentCss}
|
|
10336
10400
|
|
|
10337
10401
|
${mq.smAndDown} {
|
|
10338
10402
|
transform: translateX(-100%) !important;
|
|
10339
10403
|
}
|
|
10340
10404
|
`;
|
|
10341
|
-
var StyledMobileSubMenuItems =
|
|
10405
|
+
var StyledMobileSubMenuItems = import_styled_components60.default.div`
|
|
10342
10406
|
margin-left: var(--wui-space-04);
|
|
10343
10407
|
`;
|
|
10344
|
-
var StyledSubTrigger = (0,
|
|
10408
|
+
var StyledSubTrigger = (0, import_styled_components60.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
|
|
10345
10409
|
outline: none;
|
|
10346
10410
|
|
|
10347
10411
|
&[data-state='open'],
|
|
@@ -10352,12 +10416,12 @@ var StyledSubTrigger = (0, import_styled_components58.default)(import_react_drop
|
|
|
10352
10416
|
var SubMenuTrigger = ({ icon, ...props }) => {
|
|
10353
10417
|
const { isSmAndUp } = useMq();
|
|
10354
10418
|
const Trigger4 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
|
|
10355
|
-
return /* @__PURE__ */ (0,
|
|
10419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(Trigger4, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
|
|
10356
10420
|
MenuItemButton,
|
|
10357
10421
|
{
|
|
10358
10422
|
...props,
|
|
10359
10423
|
leftIcon: icon,
|
|
10360
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
10424
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(Icon, { type: "caret-right" })
|
|
10361
10425
|
}
|
|
10362
10426
|
) });
|
|
10363
10427
|
};
|
|
@@ -10369,16 +10433,16 @@ var SubMenu = ({
|
|
|
10369
10433
|
...props
|
|
10370
10434
|
}) => {
|
|
10371
10435
|
const { isSmAndUp } = useMq();
|
|
10372
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
10436
|
+
const [isExpanded, setIsExpanded] = (0, import_react44.useState)(false);
|
|
10373
10437
|
const { compact } = useMenuContext();
|
|
10374
|
-
return isSmAndUp ? /* @__PURE__ */ (0,
|
|
10375
|
-
/* @__PURE__ */ (0,
|
|
10376
|
-
/* @__PURE__ */ (0,
|
|
10377
|
-
(0,
|
|
10438
|
+
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
10439
|
+
/* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
10440
|
+
/* @__PURE__ */ (0, import_jsx_runtime235.jsx)(MenuItemLabel, { children: label }),
|
|
10441
|
+
(0, import_type_guards38.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(MenuItemDescription, { children: description }) : null
|
|
10378
10442
|
] }),
|
|
10379
|
-
/* @__PURE__ */ (0,
|
|
10380
|
-
] }) : /* @__PURE__ */ (0,
|
|
10381
|
-
/* @__PURE__ */ (0,
|
|
10443
|
+
/* @__PURE__ */ (0, import_jsx_runtime235.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
10444
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
10445
|
+
/* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(
|
|
10382
10446
|
SubMenuTrigger,
|
|
10383
10447
|
{
|
|
10384
10448
|
...props,
|
|
@@ -10387,28 +10451,28 @@ var SubMenu = ({
|
|
|
10387
10451
|
setIsExpanded((prev) => !prev);
|
|
10388
10452
|
},
|
|
10389
10453
|
children: [
|
|
10390
|
-
/* @__PURE__ */ (0,
|
|
10391
|
-
/* @__PURE__ */ (0,
|
|
10454
|
+
/* @__PURE__ */ (0, import_jsx_runtime235.jsx)(MenuItemLabel, { children: label }),
|
|
10455
|
+
/* @__PURE__ */ (0, import_jsx_runtime235.jsx)(MenuItemDescription, { children: description })
|
|
10392
10456
|
]
|
|
10393
10457
|
}
|
|
10394
10458
|
),
|
|
10395
|
-
/* @__PURE__ */ (0,
|
|
10459
|
+
/* @__PURE__ */ (0, import_jsx_runtime235.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
10396
10460
|
] });
|
|
10397
10461
|
};
|
|
10398
10462
|
SubMenu.displayName = "SubMenu";
|
|
10399
10463
|
|
|
10400
10464
|
// src/components/Menu/MenuItem.tsx
|
|
10401
|
-
var
|
|
10465
|
+
var import_react45 = require("react");
|
|
10402
10466
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
10403
|
-
var
|
|
10404
|
-
var MenuItem = (0,
|
|
10467
|
+
var import_jsx_runtime236 = require("react/jsx-runtime");
|
|
10468
|
+
var MenuItem = (0, import_react45.forwardRef)(
|
|
10405
10469
|
({ onSelect = () => null, ...props }, ref) => {
|
|
10406
|
-
return /* @__PURE__ */ (0,
|
|
10470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
|
|
10407
10471
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
10408
10472
|
{
|
|
10409
10473
|
asChild: true,
|
|
10410
10474
|
onSelect,
|
|
10411
|
-
children: /* @__PURE__ */ (0,
|
|
10475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
|
|
10412
10476
|
MenuItemButton,
|
|
10413
10477
|
{
|
|
10414
10478
|
...props,
|
|
@@ -10424,10 +10488,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
10424
10488
|
|
|
10425
10489
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
10426
10490
|
var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
|
|
10427
|
-
var
|
|
10491
|
+
var import_jsx_runtime237 = require("react/jsx-runtime");
|
|
10428
10492
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
10429
|
-
return /* @__PURE__ */ (0,
|
|
10430
|
-
/* @__PURE__ */ (0,
|
|
10493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
|
|
10494
|
+
/* @__PURE__ */ (0, import_jsx_runtime237.jsx)(MenuLabel, { children: label }),
|
|
10431
10495
|
children
|
|
10432
10496
|
] });
|
|
10433
10497
|
};
|
|
@@ -10435,11 +10499,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
|
10435
10499
|
|
|
10436
10500
|
// src/components/Menu/RadioMenuItem.tsx
|
|
10437
10501
|
var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
|
|
10438
|
-
var
|
|
10502
|
+
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
10439
10503
|
var RadioMenuItem = ({
|
|
10440
10504
|
onSelect,
|
|
10441
10505
|
value,
|
|
10442
|
-
indicator = /* @__PURE__ */ (0,
|
|
10506
|
+
indicator = /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10443
10507
|
Icon,
|
|
10444
10508
|
{
|
|
10445
10509
|
size: "sm",
|
|
@@ -10449,17 +10513,17 @@ var RadioMenuItem = ({
|
|
|
10449
10513
|
...props
|
|
10450
10514
|
}) => {
|
|
10451
10515
|
const extraProps = onSelect ? { onSelect } : {};
|
|
10452
|
-
return /* @__PURE__ */ (0,
|
|
10516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10453
10517
|
import_react_dropdown_menu6.DropdownMenuRadioItem,
|
|
10454
10518
|
{
|
|
10455
10519
|
...extraProps,
|
|
10456
10520
|
asChild: true,
|
|
10457
10521
|
value,
|
|
10458
|
-
children: /* @__PURE__ */ (0,
|
|
10522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10459
10523
|
MenuItemButton,
|
|
10460
10524
|
{
|
|
10461
10525
|
...props,
|
|
10462
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
10526
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
|
|
10463
10527
|
}
|
|
10464
10528
|
)
|
|
10465
10529
|
}
|
|
@@ -10469,10 +10533,10 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
10469
10533
|
|
|
10470
10534
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
10471
10535
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
10472
|
-
var
|
|
10473
|
-
var
|
|
10536
|
+
var import_type_guards39 = require("@wistia/type-guards");
|
|
10537
|
+
var import_jsx_runtime239 = require("react/jsx-runtime");
|
|
10474
10538
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
10475
|
-
return checked ? /* @__PURE__ */ (0,
|
|
10539
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(
|
|
10476
10540
|
"svg",
|
|
10477
10541
|
{
|
|
10478
10542
|
...props,
|
|
@@ -10482,14 +10546,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10482
10546
|
width: "24",
|
|
10483
10547
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10484
10548
|
children: [
|
|
10485
|
-
/* @__PURE__ */ (0,
|
|
10549
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10486
10550
|
"path",
|
|
10487
10551
|
{
|
|
10488
10552
|
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",
|
|
10489
10553
|
fill: "#2949e5"
|
|
10490
10554
|
}
|
|
10491
10555
|
),
|
|
10492
|
-
/* @__PURE__ */ (0,
|
|
10556
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10493
10557
|
"path",
|
|
10494
10558
|
{
|
|
10495
10559
|
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",
|
|
@@ -10498,7 +10562,7 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10498
10562
|
)
|
|
10499
10563
|
]
|
|
10500
10564
|
}
|
|
10501
|
-
) : /* @__PURE__ */ (0,
|
|
10565
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(
|
|
10502
10566
|
"svg",
|
|
10503
10567
|
{
|
|
10504
10568
|
...props,
|
|
@@ -10508,14 +10572,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10508
10572
|
width: "24",
|
|
10509
10573
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10510
10574
|
children: [
|
|
10511
|
-
/* @__PURE__ */ (0,
|
|
10575
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10512
10576
|
"path",
|
|
10513
10577
|
{
|
|
10514
10578
|
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",
|
|
10515
10579
|
fill: "#fcfcfd"
|
|
10516
10580
|
}
|
|
10517
10581
|
),
|
|
10518
|
-
/* @__PURE__ */ (0,
|
|
10582
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10519
10583
|
"path",
|
|
10520
10584
|
{
|
|
10521
10585
|
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",
|
|
@@ -10532,19 +10596,19 @@ var CheckboxMenuItem = ({
|
|
|
10532
10596
|
onCheckedChange,
|
|
10533
10597
|
...props
|
|
10534
10598
|
}) => {
|
|
10535
|
-
return /* @__PURE__ */ (0,
|
|
10599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10536
10600
|
import_react_dropdown_menu7.DropdownMenuCheckboxItem,
|
|
10537
10601
|
{
|
|
10538
10602
|
asChild: true,
|
|
10539
10603
|
checked,
|
|
10540
10604
|
onCheckedChange,
|
|
10541
10605
|
onSelect,
|
|
10542
|
-
children: /* @__PURE__ */ (0,
|
|
10606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10543
10607
|
MenuItemButton,
|
|
10544
10608
|
{
|
|
10545
10609
|
...props,
|
|
10546
|
-
leftIcon: (0,
|
|
10547
|
-
rightIcon: (0,
|
|
10610
|
+
leftIcon: (0, import_type_guards39.isNotNil)(props.icon) ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(CheckboxIndicator, { checked }),
|
|
10611
|
+
rightIcon: (0, import_type_guards39.isNotNil)(props.icon) ? /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_react_dropdown_menu7.DropdownMenuItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Icon, { type: "checkmark" }) }) : void 0
|
|
10548
10612
|
}
|
|
10549
10613
|
)
|
|
10550
10614
|
}
|
|
@@ -10553,37 +10617,37 @@ var CheckboxMenuItem = ({
|
|
|
10553
10617
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
10554
10618
|
|
|
10555
10619
|
// src/components/Modal/Modal.tsx
|
|
10556
|
-
var
|
|
10557
|
-
var
|
|
10620
|
+
var import_react49 = require("react");
|
|
10621
|
+
var import_styled_components65 = __toESM(require("styled-components"));
|
|
10558
10622
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
10559
|
-
var
|
|
10623
|
+
var import_type_guards41 = require("@wistia/type-guards");
|
|
10560
10624
|
|
|
10561
10625
|
// src/components/Modal/ModalHeader.tsx
|
|
10562
|
-
var
|
|
10626
|
+
var import_styled_components62 = __toESM(require("styled-components"));
|
|
10563
10627
|
var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
10564
10628
|
|
|
10565
10629
|
// src/components/Modal/ModalCloseButton.tsx
|
|
10566
|
-
var
|
|
10630
|
+
var import_styled_components61 = __toESM(require("styled-components"));
|
|
10567
10631
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
10568
|
-
var
|
|
10569
|
-
var CloseButton = (0,
|
|
10632
|
+
var import_jsx_runtime240 = require("react/jsx-runtime");
|
|
10633
|
+
var CloseButton = (0, import_styled_components61.default)(import_react_dialog.Close)`
|
|
10570
10634
|
align-self: start;
|
|
10571
10635
|
`;
|
|
10572
10636
|
var ModalCloseButton = () => {
|
|
10573
|
-
return /* @__PURE__ */ (0,
|
|
10637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
|
|
10574
10638
|
IconButton,
|
|
10575
10639
|
{
|
|
10576
10640
|
label: "Dismiss modal",
|
|
10577
10641
|
size: "sm",
|
|
10578
10642
|
variant: "ghost",
|
|
10579
|
-
children: /* @__PURE__ */ (0,
|
|
10643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(Icon, { type: "close" })
|
|
10580
10644
|
}
|
|
10581
10645
|
) });
|
|
10582
10646
|
};
|
|
10583
10647
|
|
|
10584
10648
|
// src/components/Modal/ModalHeader.tsx
|
|
10585
|
-
var
|
|
10586
|
-
var Header =
|
|
10649
|
+
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
10650
|
+
var Header = import_styled_components62.default.header`
|
|
10587
10651
|
display: flex;
|
|
10588
10652
|
order: 1;
|
|
10589
10653
|
gap: var(--wui-space-01);
|
|
@@ -10594,7 +10658,7 @@ var Header = import_styled_components60.default.header`
|
|
|
10594
10658
|
margin: 0 0 var(--wui-space-03);
|
|
10595
10659
|
}
|
|
10596
10660
|
`;
|
|
10597
|
-
var Title = (0,
|
|
10661
|
+
var Title = (0, import_styled_components62.default)(import_react_dialog2.Title)`
|
|
10598
10662
|
font-family: var(--wui-typography-heading-2-family);
|
|
10599
10663
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
10600
10664
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -10605,29 +10669,29 @@ var ModalHeader = ({
|
|
|
10605
10669
|
hideTitle,
|
|
10606
10670
|
hideCloseButton
|
|
10607
10671
|
}) => {
|
|
10608
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */ (0,
|
|
10609
|
-
return /* @__PURE__ */ (0,
|
|
10672
|
+
const TitleComponent = hideTitle ? /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(Title, { children: title }) }) : /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(Title, { children: title });
|
|
10673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime241.jsxs)(Header, { $hideTitle: hideTitle, children: [
|
|
10610
10674
|
TitleComponent,
|
|
10611
|
-
hideCloseButton ? null : /* @__PURE__ */ (0,
|
|
10675
|
+
hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(ModalCloseButton, {})
|
|
10612
10676
|
] });
|
|
10613
10677
|
};
|
|
10614
10678
|
|
|
10615
10679
|
// src/components/Modal/ModalContent.tsx
|
|
10616
|
-
var
|
|
10617
|
-
var
|
|
10680
|
+
var import_react47 = require("react");
|
|
10681
|
+
var import_styled_components63 = __toESM(require("styled-components"));
|
|
10618
10682
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
10619
10683
|
|
|
10620
10684
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
10621
|
-
var
|
|
10622
|
-
var
|
|
10685
|
+
var import_react46 = require("react");
|
|
10686
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
10623
10687
|
var useFocusRestore = () => {
|
|
10624
|
-
const previouslyFocusedRef = (0,
|
|
10625
|
-
(0,
|
|
10688
|
+
const previouslyFocusedRef = (0, import_react46.useRef)(null);
|
|
10689
|
+
(0, import_react46.useEffect)(() => {
|
|
10626
10690
|
previouslyFocusedRef.current = document.activeElement;
|
|
10627
10691
|
}, []);
|
|
10628
|
-
(0,
|
|
10692
|
+
(0, import_react46.useEffect)(() => {
|
|
10629
10693
|
return () => {
|
|
10630
|
-
if ((0,
|
|
10694
|
+
if ((0, import_type_guards40.isNotNil)(previouslyFocusedRef.current)) {
|
|
10631
10695
|
setTimeout(() => {
|
|
10632
10696
|
previouslyFocusedRef.current?.focus();
|
|
10633
10697
|
}, 0);
|
|
@@ -10637,8 +10701,8 @@ var useFocusRestore = () => {
|
|
|
10637
10701
|
};
|
|
10638
10702
|
|
|
10639
10703
|
// src/components/Modal/ModalContent.tsx
|
|
10640
|
-
var
|
|
10641
|
-
var StyledModalContent = (0,
|
|
10704
|
+
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
10705
|
+
var StyledModalContent = (0, import_styled_components63.default)(import_react_dialog3.Content)`
|
|
10642
10706
|
background-color: var(--wui-color-bg-app);
|
|
10643
10707
|
box-sizing: border-box;
|
|
10644
10708
|
display: flex;
|
|
@@ -10679,10 +10743,10 @@ var StyledModalContent = (0, import_styled_components61.default)(import_react_di
|
|
|
10679
10743
|
}
|
|
10680
10744
|
}
|
|
10681
10745
|
`;
|
|
10682
|
-
var ModalContent = (0,
|
|
10746
|
+
var ModalContent = (0, import_react47.forwardRef)(
|
|
10683
10747
|
({ fullHeight, width, children, ...props }, ref) => {
|
|
10684
10748
|
useFocusRestore();
|
|
10685
|
-
return /* @__PURE__ */ (0,
|
|
10749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
|
|
10686
10750
|
StyledModalContent,
|
|
10687
10751
|
{
|
|
10688
10752
|
ref,
|
|
@@ -10697,9 +10761,9 @@ var ModalContent = (0, import_react45.forwardRef)(
|
|
|
10697
10761
|
);
|
|
10698
10762
|
|
|
10699
10763
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
10700
|
-
var
|
|
10701
|
-
var
|
|
10702
|
-
var
|
|
10764
|
+
var import_react48 = require("react");
|
|
10765
|
+
var import_styled_components64 = __toESM(require("styled-components"));
|
|
10766
|
+
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
10703
10767
|
var backdropAnimationDuration = 150;
|
|
10704
10768
|
var alignVerticalMap = {
|
|
10705
10769
|
stretch: "normal",
|
|
@@ -10712,7 +10776,7 @@ var alignHorizontalMap = {
|
|
|
10712
10776
|
center: "center",
|
|
10713
10777
|
right: "end"
|
|
10714
10778
|
};
|
|
10715
|
-
var BackdropComponent =
|
|
10779
|
+
var BackdropComponent = import_styled_components64.default.div`
|
|
10716
10780
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
10717
10781
|
animation-name: backdropShow;
|
|
10718
10782
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -10735,8 +10799,8 @@ var BackdropComponent = import_styled_components62.default.div`
|
|
|
10735
10799
|
}
|
|
10736
10800
|
}
|
|
10737
10801
|
`;
|
|
10738
|
-
var Backdrop = (0,
|
|
10739
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0,
|
|
10802
|
+
var Backdrop = (0, import_react48.forwardRef)(
|
|
10803
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
|
|
10740
10804
|
BackdropComponent,
|
|
10741
10805
|
{
|
|
10742
10806
|
ref,
|
|
@@ -10750,14 +10814,14 @@ var Backdrop = (0, import_react46.forwardRef)(
|
|
|
10750
10814
|
Backdrop.displayName = "Backdrop";
|
|
10751
10815
|
|
|
10752
10816
|
// src/components/Modal/Modal.tsx
|
|
10753
|
-
var
|
|
10817
|
+
var import_jsx_runtime244 = require("react/jsx-runtime");
|
|
10754
10818
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
10755
|
-
var ModalBody =
|
|
10819
|
+
var ModalBody = import_styled_components65.default.div`
|
|
10756
10820
|
flex-direction: column;
|
|
10757
10821
|
display: flex;
|
|
10758
10822
|
order: 2;
|
|
10759
10823
|
`;
|
|
10760
|
-
var Modal = (0,
|
|
10824
|
+
var Modal = (0, import_react49.forwardRef)(
|
|
10761
10825
|
({
|
|
10762
10826
|
children,
|
|
10763
10827
|
fullHeight = false,
|
|
@@ -10770,24 +10834,24 @@ var Modal = (0, import_react47.forwardRef)(
|
|
|
10770
10834
|
width = DEFAULT_MODAL_WIDTH,
|
|
10771
10835
|
...props
|
|
10772
10836
|
}, ref) => {
|
|
10773
|
-
return /* @__PURE__ */ (0,
|
|
10837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
10774
10838
|
import_react_dialog4.Root,
|
|
10775
10839
|
{
|
|
10776
10840
|
onOpenChange: (open2) => {
|
|
10777
|
-
if (!open2 && (0,
|
|
10841
|
+
if (!open2 && (0, import_type_guards41.isNotNil)(onRequestClose)) {
|
|
10778
10842
|
onRequestClose();
|
|
10779
10843
|
}
|
|
10780
10844
|
},
|
|
10781
10845
|
open: isOpen,
|
|
10782
|
-
children: /* @__PURE__ */ (0,
|
|
10783
|
-
/* @__PURE__ */ (0,
|
|
10784
|
-
/* @__PURE__ */ (0,
|
|
10846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(import_react_dialog4.Portal, { children: [
|
|
10847
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(Backdrop, {}),
|
|
10848
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(
|
|
10785
10849
|
ModalContent,
|
|
10786
10850
|
{
|
|
10787
10851
|
ref,
|
|
10788
10852
|
fullHeight,
|
|
10789
10853
|
onOpenAutoFocus: (event) => {
|
|
10790
|
-
if ((0,
|
|
10854
|
+
if ((0, import_type_guards41.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
10791
10855
|
event.preventDefault();
|
|
10792
10856
|
requestAnimationFrame(() => {
|
|
10793
10857
|
initialFocusRef.current?.focus();
|
|
@@ -10797,8 +10861,8 @@ var Modal = (0, import_react47.forwardRef)(
|
|
|
10797
10861
|
width,
|
|
10798
10862
|
...props,
|
|
10799
10863
|
children: [
|
|
10800
|
-
/* @__PURE__ */ (0,
|
|
10801
|
-
/* @__PURE__ */ (0,
|
|
10864
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(ModalBody, { children }),
|
|
10865
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
10802
10866
|
ModalHeader,
|
|
10803
10867
|
{
|
|
10804
10868
|
hideCloseButton,
|
|
@@ -10818,19 +10882,19 @@ Modal.displayName = "Modal";
|
|
|
10818
10882
|
|
|
10819
10883
|
// src/components/Popover/Popover.tsx
|
|
10820
10884
|
var import_react_popover = require("@radix-ui/react-popover");
|
|
10821
|
-
var
|
|
10885
|
+
var import_styled_components66 = __toESM(require("styled-components"));
|
|
10822
10886
|
|
|
10823
10887
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
10824
|
-
var
|
|
10888
|
+
var import_type_guards42 = require("@wistia/type-guards");
|
|
10825
10889
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
10826
|
-
return (0,
|
|
10890
|
+
return (0, import_type_guards42.isNotNil)(onOpenChange) && (0, import_type_guards42.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
10827
10891
|
};
|
|
10828
10892
|
|
|
10829
10893
|
// src/components/Popover/Popover.tsx
|
|
10830
|
-
var
|
|
10831
|
-
var StyledContent2 = (0,
|
|
10894
|
+
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
10895
|
+
var StyledContent2 = (0, import_styled_components66.default)(import_react_popover.Content)`
|
|
10832
10896
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10833
|
-
${({ $unstyled }) => !$unstyled &&
|
|
10897
|
+
${({ $unstyled }) => !$unstyled && import_styled_components66.css`
|
|
10834
10898
|
border-radius: var(--wui-border-radius-02);
|
|
10835
10899
|
padding: var(--wui-space-04);
|
|
10836
10900
|
max-width: var(--wui-popover-max-width, 320px);
|
|
@@ -10863,9 +10927,9 @@ var Popover = ({
|
|
|
10863
10927
|
"--wui-popover-max-width": maxWidth,
|
|
10864
10928
|
"--wui-popover-max-height": maxHeight
|
|
10865
10929
|
};
|
|
10866
|
-
return /* @__PURE__ */ (0,
|
|
10867
|
-
/* @__PURE__ */ (0,
|
|
10868
|
-
/* @__PURE__ */ (0,
|
|
10930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(import_react_popover.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
10931
|
+
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_react_popover.Trigger, { asChild: true, children: trigger }),
|
|
10932
|
+
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_react_popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(
|
|
10869
10933
|
StyledContent2,
|
|
10870
10934
|
{
|
|
10871
10935
|
$colorScheme: colorScheme,
|
|
@@ -10874,16 +10938,16 @@ var Popover = ({
|
|
|
10874
10938
|
$unstyled: unstyled,
|
|
10875
10939
|
style,
|
|
10876
10940
|
children: [
|
|
10877
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
10941
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_react_popover.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
10878
10942
|
IconButton,
|
|
10879
10943
|
{
|
|
10880
10944
|
"data-wui-popover-close": true,
|
|
10881
10945
|
label: "Close",
|
|
10882
10946
|
variant: "ghost",
|
|
10883
|
-
children: /* @__PURE__ */ (0,
|
|
10947
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(Icon, { type: "close" })
|
|
10884
10948
|
}
|
|
10885
10949
|
) }),
|
|
10886
|
-
/* @__PURE__ */ (0,
|
|
10950
|
+
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)("div", { children })
|
|
10887
10951
|
]
|
|
10888
10952
|
}
|
|
10889
10953
|
) })
|
|
@@ -10892,11 +10956,11 @@ var Popover = ({
|
|
|
10892
10956
|
Popover.displayName = "Popover";
|
|
10893
10957
|
|
|
10894
10958
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10895
|
-
var
|
|
10959
|
+
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10896
10960
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
10897
|
-
var
|
|
10898
|
-
var
|
|
10899
|
-
var ProgressBarWrapper =
|
|
10961
|
+
var import_type_guards43 = require("@wistia/type-guards");
|
|
10962
|
+
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
10963
|
+
var ProgressBarWrapper = import_styled_components67.default.div`
|
|
10900
10964
|
--progress-bar-height: 8px;
|
|
10901
10965
|
--progress-bar-indicator-color: var(--wui-color-bg-fill);
|
|
10902
10966
|
--progress-bar-background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10912,7 +10976,7 @@ var getTranslateValue = (progress, max) => {
|
|
|
10912
10976
|
const progressPercentage = progress / max * 100;
|
|
10913
10977
|
return `translateX(-${100 - progressPercentage}%)`;
|
|
10914
10978
|
};
|
|
10915
|
-
var ProgressBarLabel =
|
|
10979
|
+
var ProgressBarLabel = import_styled_components67.default.div`
|
|
10916
10980
|
display: flex;
|
|
10917
10981
|
line-height: var(--wui-typography-label-3-line-height);
|
|
10918
10982
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -10920,7 +10984,7 @@ var ProgressBarLabel = import_styled_components65.default.div`
|
|
|
10920
10984
|
color: var(--wui-color-text-secondary);
|
|
10921
10985
|
flex-shrink: 0;
|
|
10922
10986
|
`;
|
|
10923
|
-
var StyledProgressIndicator = (0,
|
|
10987
|
+
var StyledProgressIndicator = (0, import_styled_components67.default)(import_react_progress.Indicator)`
|
|
10924
10988
|
background-color: var(--progress-bar-indicator-color);
|
|
10925
10989
|
width: 100%;
|
|
10926
10990
|
height: 100%;
|
|
@@ -10929,7 +10993,7 @@ var StyledProgressIndicator = (0, import_styled_components65.default)(import_rea
|
|
|
10929
10993
|
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
10930
10994
|
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
10931
10995
|
`;
|
|
10932
|
-
var StyledProgressBar = (0,
|
|
10996
|
+
var StyledProgressBar = (0, import_styled_components67.default)(import_react_progress.Root)`
|
|
10933
10997
|
position: relative;
|
|
10934
10998
|
overflow: hidden;
|
|
10935
10999
|
background: var(--progress-bar-background-color);
|
|
@@ -10948,15 +11012,15 @@ var ProgressBar = ({
|
|
|
10948
11012
|
labelRight,
|
|
10949
11013
|
...props
|
|
10950
11014
|
}) => {
|
|
10951
|
-
return /* @__PURE__ */ (0,
|
|
10952
|
-
(0,
|
|
10953
|
-
/* @__PURE__ */ (0,
|
|
11015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(ProgressBarWrapper, { children: [
|
|
11016
|
+
(0, import_type_guards43.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
11017
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10954
11018
|
StyledProgressBar,
|
|
10955
11019
|
{
|
|
10956
11020
|
max,
|
|
10957
11021
|
value: progress,
|
|
10958
11022
|
...props,
|
|
10959
|
-
children: /* @__PURE__ */ (0,
|
|
11023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10960
11024
|
StyledProgressIndicator,
|
|
10961
11025
|
{
|
|
10962
11026
|
$max: max,
|
|
@@ -10965,17 +11029,17 @@ var ProgressBar = ({
|
|
|
10965
11029
|
)
|
|
10966
11030
|
}
|
|
10967
11031
|
),
|
|
10968
|
-
(0,
|
|
11032
|
+
(0, import_type_guards43.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
10969
11033
|
] });
|
|
10970
11034
|
};
|
|
10971
11035
|
ProgressBar.displayName = "ProgressBar";
|
|
10972
11036
|
|
|
10973
11037
|
// src/components/Radio/Radio.tsx
|
|
10974
|
-
var
|
|
10975
|
-
var
|
|
10976
|
-
var
|
|
10977
|
-
var
|
|
10978
|
-
var RadioIcon = () => /* @__PURE__ */ (0,
|
|
11038
|
+
var import_react50 = require("react");
|
|
11039
|
+
var import_styled_components68 = __toESM(require("styled-components"));
|
|
11040
|
+
var import_type_guards44 = require("@wistia/type-guards");
|
|
11041
|
+
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
11042
|
+
var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
10979
11043
|
"svg",
|
|
10980
11044
|
{
|
|
10981
11045
|
fill: "inherit",
|
|
@@ -10983,7 +11047,7 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
|
10983
11047
|
viewBox: "0 0 1 1",
|
|
10984
11048
|
width: "1",
|
|
10985
11049
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10986
|
-
children: /* @__PURE__ */ (0,
|
|
11050
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
10987
11051
|
"circle",
|
|
10988
11052
|
{
|
|
10989
11053
|
cx: "0.5",
|
|
@@ -10994,7 +11058,7 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
|
10994
11058
|
)
|
|
10995
11059
|
}
|
|
10996
11060
|
);
|
|
10997
|
-
var sizeSmall2 =
|
|
11061
|
+
var sizeSmall2 = import_styled_components68.css`
|
|
10998
11062
|
width: 14px;
|
|
10999
11063
|
height: 14px;
|
|
11000
11064
|
min-width: 14px;
|
|
@@ -11005,7 +11069,7 @@ var sizeSmall2 = import_styled_components66.css`
|
|
|
11005
11069
|
height: 7px;
|
|
11006
11070
|
}
|
|
11007
11071
|
`;
|
|
11008
|
-
var sizeMedium2 =
|
|
11072
|
+
var sizeMedium2 = import_styled_components68.css`
|
|
11009
11073
|
width: 16px;
|
|
11010
11074
|
height: 16px;
|
|
11011
11075
|
min-width: 16px;
|
|
@@ -11016,7 +11080,7 @@ var sizeMedium2 = import_styled_components66.css`
|
|
|
11016
11080
|
height: 8px;
|
|
11017
11081
|
}
|
|
11018
11082
|
`;
|
|
11019
|
-
var sizeLarge2 =
|
|
11083
|
+
var sizeLarge2 = import_styled_components68.css`
|
|
11020
11084
|
width: 20px;
|
|
11021
11085
|
height: 20px;
|
|
11022
11086
|
min-width: 20px;
|
|
@@ -11032,14 +11096,14 @@ var getSizeCss2 = (size) => {
|
|
|
11032
11096
|
if (size === "lg") return sizeLarge2;
|
|
11033
11097
|
return sizeMedium2;
|
|
11034
11098
|
};
|
|
11035
|
-
var StyledRadioWrapper =
|
|
11099
|
+
var StyledRadioWrapper = import_styled_components68.default.div`
|
|
11036
11100
|
display: flex;
|
|
11037
11101
|
margin: 0;
|
|
11038
11102
|
|
|
11039
11103
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
11040
11104
|
user-select: none;
|
|
11041
11105
|
`;
|
|
11042
|
-
var StyledRadioInput =
|
|
11106
|
+
var StyledRadioInput = import_styled_components68.default.div`
|
|
11043
11107
|
${({ $size }) => getSizeCss2($size)}
|
|
11044
11108
|
line-height: 0;
|
|
11045
11109
|
margin: 0;
|
|
@@ -11061,7 +11125,7 @@ var StyledRadioInput = import_styled_components66.default.div`
|
|
|
11061
11125
|
}
|
|
11062
11126
|
}
|
|
11063
11127
|
`;
|
|
11064
|
-
var StyledHiddenRadioInput =
|
|
11128
|
+
var StyledHiddenRadioInput = import_styled_components68.default.input`
|
|
11065
11129
|
${visuallyHiddenStyle}
|
|
11066
11130
|
|
|
11067
11131
|
/* toggles display of faux-input border-color */
|
|
@@ -11074,7 +11138,7 @@ var StyledHiddenRadioInput = import_styled_components66.default.input`
|
|
|
11074
11138
|
display: block;
|
|
11075
11139
|
}
|
|
11076
11140
|
`;
|
|
11077
|
-
var Radio = (0,
|
|
11141
|
+
var Radio = (0, import_react50.forwardRef)(
|
|
11078
11142
|
({
|
|
11079
11143
|
checked,
|
|
11080
11144
|
disabled = false,
|
|
@@ -11089,15 +11153,15 @@ var Radio = (0, import_react48.forwardRef)(
|
|
|
11089
11153
|
hideLabel = false,
|
|
11090
11154
|
...props
|
|
11091
11155
|
}, ref) => {
|
|
11092
|
-
const generatedId = (0,
|
|
11093
|
-
const computedId = (0,
|
|
11094
|
-
return /* @__PURE__ */ (0,
|
|
11156
|
+
const generatedId = (0, import_react50.useId)();
|
|
11157
|
+
const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
11158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(
|
|
11095
11159
|
StyledRadioWrapper,
|
|
11096
11160
|
{
|
|
11097
11161
|
$disabled: disabled,
|
|
11098
11162
|
"aria-invalid": props["aria-invalid"],
|
|
11099
11163
|
children: [
|
|
11100
|
-
/* @__PURE__ */ (0,
|
|
11164
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
11101
11165
|
StyledHiddenRadioInput,
|
|
11102
11166
|
{
|
|
11103
11167
|
...props,
|
|
@@ -11112,16 +11176,16 @@ var Radio = (0, import_react48.forwardRef)(
|
|
|
11112
11176
|
value
|
|
11113
11177
|
}
|
|
11114
11178
|
),
|
|
11115
|
-
/* @__PURE__ */ (0,
|
|
11179
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
11116
11180
|
FormControlLabel,
|
|
11117
11181
|
{
|
|
11118
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
11182
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
11119
11183
|
StyledRadioInput,
|
|
11120
11184
|
{
|
|
11121
11185
|
$disabled: disabled,
|
|
11122
11186
|
$size: size,
|
|
11123
11187
|
"data-wui-faux-input": "true",
|
|
11124
|
-
children: /* @__PURE__ */ (0,
|
|
11188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(RadioIcon, {})
|
|
11125
11189
|
}
|
|
11126
11190
|
),
|
|
11127
11191
|
description,
|
|
@@ -11139,20 +11203,20 @@ var Radio = (0, import_react48.forwardRef)(
|
|
|
11139
11203
|
Radio.displayName = "Radio";
|
|
11140
11204
|
|
|
11141
11205
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
11142
|
-
var
|
|
11143
|
-
var
|
|
11206
|
+
var import_react53 = require("react");
|
|
11207
|
+
var import_styled_components70 = __toESM(require("styled-components"));
|
|
11144
11208
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
11145
|
-
var
|
|
11209
|
+
var import_type_guards45 = require("@wistia/type-guards");
|
|
11146
11210
|
|
|
11147
11211
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
11148
|
-
var
|
|
11149
|
-
var
|
|
11150
|
-
var SelectedItemStyleContext = (0,
|
|
11212
|
+
var import_react51 = require("react");
|
|
11213
|
+
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
11214
|
+
var SelectedItemStyleContext = (0, import_react51.createContext)(null);
|
|
11151
11215
|
var SelectedItemStyleProvider = ({
|
|
11152
11216
|
children
|
|
11153
11217
|
}) => {
|
|
11154
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0,
|
|
11155
|
-
const selectedItemIndicatorStyle = (0,
|
|
11218
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react51.useState)(null);
|
|
11219
|
+
const selectedItemIndicatorStyle = (0, import_react51.useMemo)(
|
|
11156
11220
|
() => selectedItemMeasurements != null ? {
|
|
11157
11221
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11158
11222
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
|
|
@@ -11162,17 +11226,17 @@ var SelectedItemStyleProvider = ({
|
|
|
11162
11226
|
},
|
|
11163
11227
|
[selectedItemMeasurements]
|
|
11164
11228
|
);
|
|
11165
|
-
const contextValue = (0,
|
|
11229
|
+
const contextValue = (0, import_react51.useMemo)(
|
|
11166
11230
|
() => ({
|
|
11167
11231
|
setSelectedItemMeasurements,
|
|
11168
11232
|
selectedItemIndicatorStyle
|
|
11169
11233
|
}),
|
|
11170
11234
|
[selectedItemIndicatorStyle]
|
|
11171
11235
|
);
|
|
11172
|
-
return /* @__PURE__ */ (0,
|
|
11236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
11173
11237
|
};
|
|
11174
11238
|
var useSelectedItemStyle = () => {
|
|
11175
|
-
const context = (0,
|
|
11239
|
+
const context = (0, import_react51.useContext)(SelectedItemStyleContext);
|
|
11176
11240
|
if (context === null) {
|
|
11177
11241
|
throw new Error("useSelectedItemStyle must be used within a SelectedItemStyleProvider");
|
|
11178
11242
|
}
|
|
@@ -11180,14 +11244,14 @@ var useSelectedItemStyle = () => {
|
|
|
11180
11244
|
};
|
|
11181
11245
|
|
|
11182
11246
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
11183
|
-
var
|
|
11247
|
+
var import_styled_components69 = __toESM(require("styled-components"));
|
|
11184
11248
|
|
|
11185
11249
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
11186
|
-
var
|
|
11187
|
-
var SegmentedControlValueContext = (0,
|
|
11250
|
+
var import_react52 = require("react");
|
|
11251
|
+
var SegmentedControlValueContext = (0, import_react52.createContext)(null);
|
|
11188
11252
|
var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
|
|
11189
11253
|
var useSegmentedControlValue = () => {
|
|
11190
|
-
const context = (0,
|
|
11254
|
+
const context = (0, import_react52.useContext)(SegmentedControlValueContext);
|
|
11191
11255
|
if (context === null) {
|
|
11192
11256
|
throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
|
|
11193
11257
|
}
|
|
@@ -11195,8 +11259,8 @@ var useSegmentedControlValue = () => {
|
|
|
11195
11259
|
};
|
|
11196
11260
|
|
|
11197
11261
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
11198
|
-
var
|
|
11199
|
-
var SelectedItemIndicatorDiv =
|
|
11262
|
+
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
11263
|
+
var SelectedItemIndicatorDiv = import_styled_components69.default.div`
|
|
11200
11264
|
background-color: var(--wui-color-bg-fill-white);
|
|
11201
11265
|
border-radius: var(--wui-border-radius-rounded);
|
|
11202
11266
|
left: 0;
|
|
@@ -11214,12 +11278,12 @@ var SelectedItemIndicator = () => {
|
|
|
11214
11278
|
if (!selectedValue) {
|
|
11215
11279
|
return null;
|
|
11216
11280
|
}
|
|
11217
|
-
return /* @__PURE__ */ (0,
|
|
11281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(SelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
11218
11282
|
};
|
|
11219
11283
|
|
|
11220
11284
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
11221
|
-
var
|
|
11222
|
-
var segmentedControlStyles =
|
|
11285
|
+
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
11286
|
+
var segmentedControlStyles = import_styled_components70.css`
|
|
11223
11287
|
display: inline-flex;
|
|
11224
11288
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
11225
11289
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -11230,10 +11294,10 @@ var segmentedControlStyles = import_styled_components68.css`
|
|
|
11230
11294
|
position: relative;
|
|
11231
11295
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
11232
11296
|
`;
|
|
11233
|
-
var StyledSegmentedControl = (0,
|
|
11297
|
+
var StyledSegmentedControl = (0, import_styled_components70.default)(import_react_toggle_group.Root)`
|
|
11234
11298
|
${segmentedControlStyles}
|
|
11235
11299
|
`;
|
|
11236
|
-
var SegmentedControl = (0,
|
|
11300
|
+
var SegmentedControl = (0, import_react53.forwardRef)(
|
|
11237
11301
|
({
|
|
11238
11302
|
children,
|
|
11239
11303
|
disabled = false,
|
|
@@ -11242,10 +11306,10 @@ var SegmentedControl = (0, import_react51.forwardRef)(
|
|
|
11242
11306
|
onSelectedValueChange,
|
|
11243
11307
|
...props
|
|
11244
11308
|
}, ref) => {
|
|
11245
|
-
if ((0,
|
|
11309
|
+
if ((0, import_type_guards45.isNil)(children)) {
|
|
11246
11310
|
return null;
|
|
11247
11311
|
}
|
|
11248
|
-
return /* @__PURE__ */ (0,
|
|
11312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
|
|
11249
11313
|
StyledSegmentedControl,
|
|
11250
11314
|
{
|
|
11251
11315
|
ref,
|
|
@@ -11257,8 +11321,8 @@ var SegmentedControl = (0, import_react51.forwardRef)(
|
|
|
11257
11321
|
type: "single",
|
|
11258
11322
|
value: selectedValue,
|
|
11259
11323
|
...props,
|
|
11260
|
-
children: /* @__PURE__ */ (0,
|
|
11261
|
-
/* @__PURE__ */ (0,
|
|
11324
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ (0, import_jsx_runtime250.jsxs)(SelectedItemStyleProvider, { children: [
|
|
11325
|
+
/* @__PURE__ */ (0, import_jsx_runtime250.jsx)(SelectedItemIndicator, {}),
|
|
11262
11326
|
children
|
|
11263
11327
|
] }) })
|
|
11264
11328
|
}
|
|
@@ -11268,12 +11332,12 @@ var SegmentedControl = (0, import_react51.forwardRef)(
|
|
|
11268
11332
|
SegmentedControl.displayName = "SegmentedControl";
|
|
11269
11333
|
|
|
11270
11334
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
11271
|
-
var
|
|
11272
|
-
var
|
|
11335
|
+
var import_react54 = require("react");
|
|
11336
|
+
var import_styled_components71 = __toESM(require("styled-components"));
|
|
11273
11337
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
11274
|
-
var
|
|
11275
|
-
var
|
|
11276
|
-
var segmentedControlItemStyles =
|
|
11338
|
+
var import_type_guards46 = require("@wistia/type-guards");
|
|
11339
|
+
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
11340
|
+
var segmentedControlItemStyles = import_styled_components71.css`
|
|
11277
11341
|
all: unset; /* ToggleGroupItem is a button element */
|
|
11278
11342
|
align-items: center;
|
|
11279
11343
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -11333,14 +11397,14 @@ var segmentedControlItemStyles = import_styled_components69.css`
|
|
|
11333
11397
|
}
|
|
11334
11398
|
}
|
|
11335
11399
|
`;
|
|
11336
|
-
var StyledSegmentedControlItem = (0,
|
|
11400
|
+
var StyledSegmentedControlItem = (0, import_styled_components71.default)(import_react_toggle_group2.Item)`
|
|
11337
11401
|
${segmentedControlItemStyles}
|
|
11338
11402
|
`;
|
|
11339
|
-
var SegmentedControlItem = (0,
|
|
11403
|
+
var SegmentedControlItem = (0, import_react54.forwardRef)(
|
|
11340
11404
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11341
11405
|
const selectedValue = useSegmentedControlValue();
|
|
11342
11406
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
11343
|
-
const buttonRef = (0,
|
|
11407
|
+
const buttonRef = (0, import_react54.useRef)(null);
|
|
11344
11408
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11345
11409
|
const handleClick = (event) => {
|
|
11346
11410
|
const target = event.target;
|
|
@@ -11349,7 +11413,7 @@ var SegmentedControlItem = (0, import_react52.forwardRef)(
|
|
|
11349
11413
|
event.preventDefault();
|
|
11350
11414
|
}
|
|
11351
11415
|
};
|
|
11352
|
-
(0,
|
|
11416
|
+
(0, import_react54.useEffect)(() => {
|
|
11353
11417
|
const buttonElem = buttonRef.current;
|
|
11354
11418
|
if (!buttonElem) {
|
|
11355
11419
|
return void 0;
|
|
@@ -11374,12 +11438,12 @@ var SegmentedControlItem = (0, import_react52.forwardRef)(
|
|
|
11374
11438
|
resizeObserver.disconnect();
|
|
11375
11439
|
};
|
|
11376
11440
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
11377
|
-
return /* @__PURE__ */ (0,
|
|
11441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(
|
|
11378
11442
|
StyledSegmentedControlItem,
|
|
11379
11443
|
{
|
|
11380
11444
|
ref: combinedRef,
|
|
11381
|
-
$hasLabel: (0,
|
|
11382
|
-
"aria-label": (0,
|
|
11445
|
+
$hasLabel: (0, import_type_guards46.isNotNil)(label),
|
|
11446
|
+
"aria-label": (0, import_type_guards46.isNotNil)(label) ? void 0 : ariaLabel,
|
|
11383
11447
|
disabled,
|
|
11384
11448
|
onClick: handleClick,
|
|
11385
11449
|
value,
|
|
@@ -11395,10 +11459,10 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
|
11395
11459
|
|
|
11396
11460
|
// src/components/Select/Select.tsx
|
|
11397
11461
|
var import_react_select = require("@radix-ui/react-select");
|
|
11398
|
-
var
|
|
11399
|
-
var
|
|
11400
|
-
var
|
|
11401
|
-
var StyledTrigger = (0,
|
|
11462
|
+
var import_react55 = require("react");
|
|
11463
|
+
var import_styled_components72 = __toESM(require("styled-components"));
|
|
11464
|
+
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11465
|
+
var StyledTrigger = (0, import_styled_components72.default)(import_react_select.Trigger)`
|
|
11402
11466
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11403
11467
|
${inputCssVariables};
|
|
11404
11468
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -11442,7 +11506,7 @@ var StyledTrigger = (0, import_styled_components70.default)(import_react_select.
|
|
|
11442
11506
|
color: var(--wui-input-placeholder);
|
|
11443
11507
|
}
|
|
11444
11508
|
`;
|
|
11445
|
-
var StyledContent3 = (0,
|
|
11509
|
+
var StyledContent3 = (0, import_styled_components72.default)(import_react_select.Content)`
|
|
11446
11510
|
--wui-select-content-border: var(--wui-color-border);
|
|
11447
11511
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
11448
11512
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -11460,7 +11524,7 @@ var StyledContent3 = (0, import_styled_components70.default)(import_react_select
|
|
|
11460
11524
|
max-height: var(--radix-select-content-available-height);
|
|
11461
11525
|
z-index: var(--wui-zindex-select);
|
|
11462
11526
|
`;
|
|
11463
|
-
var Select = (0,
|
|
11527
|
+
var Select = (0, import_react55.forwardRef)(
|
|
11464
11528
|
({
|
|
11465
11529
|
colorScheme = "inherit",
|
|
11466
11530
|
children,
|
|
@@ -11470,13 +11534,13 @@ var Select = (0, import_react53.forwardRef)(
|
|
|
11470
11534
|
...props
|
|
11471
11535
|
}, forwardedRef) => {
|
|
11472
11536
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
11473
|
-
return /* @__PURE__ */ (0,
|
|
11537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
11474
11538
|
import_react_select.Root,
|
|
11475
11539
|
{
|
|
11476
11540
|
...props,
|
|
11477
11541
|
onValueChange: onChange,
|
|
11478
11542
|
children: [
|
|
11479
|
-
/* @__PURE__ */ (0,
|
|
11543
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
11480
11544
|
StyledTrigger,
|
|
11481
11545
|
{
|
|
11482
11546
|
ref: forwardedRef,
|
|
@@ -11484,8 +11548,8 @@ var Select = (0, import_react53.forwardRef)(
|
|
|
11484
11548
|
$fullWidth: responsiveFullWidth,
|
|
11485
11549
|
...props,
|
|
11486
11550
|
children: [
|
|
11487
|
-
/* @__PURE__ */ (0,
|
|
11488
|
-
/* @__PURE__ */ (0,
|
|
11551
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select.Value, { placeholder }),
|
|
11552
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
11489
11553
|
Icon,
|
|
11490
11554
|
{
|
|
11491
11555
|
size: "md",
|
|
@@ -11495,10 +11559,10 @@ var Select = (0, import_react53.forwardRef)(
|
|
|
11495
11559
|
]
|
|
11496
11560
|
}
|
|
11497
11561
|
),
|
|
11498
|
-
/* @__PURE__ */ (0,
|
|
11499
|
-
/* @__PURE__ */ (0,
|
|
11500
|
-
/* @__PURE__ */ (0,
|
|
11501
|
-
/* @__PURE__ */ (0,
|
|
11562
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(StyledContent3, { position: "popper", children: [
|
|
11563
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(Icon, { type: "caret-up" }) }),
|
|
11564
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select.Viewport, { children }),
|
|
11565
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(Icon, { type: "caret-down" }) })
|
|
11502
11566
|
] }) })
|
|
11503
11567
|
]
|
|
11504
11568
|
}
|
|
@@ -11509,11 +11573,11 @@ Select.displayName = "Select";
|
|
|
11509
11573
|
|
|
11510
11574
|
// src/components/Select/SelectOption.tsx
|
|
11511
11575
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
11512
|
-
var
|
|
11513
|
-
var
|
|
11514
|
-
var
|
|
11515
|
-
var
|
|
11516
|
-
var StyledItem = (0,
|
|
11576
|
+
var import_react56 = require("react");
|
|
11577
|
+
var import_styled_components73 = __toESM(require("styled-components"));
|
|
11578
|
+
var import_type_guards47 = require("@wistia/type-guards");
|
|
11579
|
+
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
11580
|
+
var StyledItem = (0, import_styled_components73.default)(import_react_select2.Item)`
|
|
11517
11581
|
${variantStyleMap2.body3};
|
|
11518
11582
|
display: flex;
|
|
11519
11583
|
padding: var(--wui-select-option-padding);
|
|
@@ -11537,28 +11601,28 @@ var StyledItem = (0, import_styled_components71.default)(import_react_select2.It
|
|
|
11537
11601
|
background-color: transparent;
|
|
11538
11602
|
}
|
|
11539
11603
|
`;
|
|
11540
|
-
var StyledIconContainer =
|
|
11604
|
+
var StyledIconContainer = import_styled_components73.default.span`
|
|
11541
11605
|
width: 12px;
|
|
11542
11606
|
`;
|
|
11543
|
-
var SelectOption = (0,
|
|
11607
|
+
var SelectOption = (0, import_react56.forwardRef)(
|
|
11544
11608
|
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
11545
|
-
return /* @__PURE__ */ (0,
|
|
11609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(
|
|
11546
11610
|
StyledItem,
|
|
11547
11611
|
{
|
|
11548
11612
|
...props,
|
|
11549
11613
|
ref: forwardedRef,
|
|
11550
11614
|
children: [
|
|
11551
|
-
/* @__PURE__ */ (0,
|
|
11615
|
+
/* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledIconContainer, { "data-indicator": true, children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
|
|
11552
11616
|
Icon,
|
|
11553
11617
|
{
|
|
11554
11618
|
size: "sm",
|
|
11555
11619
|
type: "checkmark"
|
|
11556
11620
|
}
|
|
11557
11621
|
) }) }),
|
|
11558
|
-
(0,
|
|
11622
|
+
(0, import_type_guards47.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)("div", { children: [
|
|
11559
11623
|
children,
|
|
11560
|
-
/* @__PURE__ */ (0,
|
|
11561
|
-
] }) : /* @__PURE__ */ (0,
|
|
11624
|
+
/* @__PURE__ */ (0, import_jsx_runtime253.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
|
|
11625
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(import_react_select2.ItemText, { children })
|
|
11562
11626
|
]
|
|
11563
11627
|
}
|
|
11564
11628
|
);
|
|
@@ -11568,14 +11632,14 @@ SelectOption.displayName = "Option";
|
|
|
11568
11632
|
|
|
11569
11633
|
// src/components/Select/SelectOptionGroup.tsx
|
|
11570
11634
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
11571
|
-
var
|
|
11572
|
-
var
|
|
11573
|
-
var StyledLabel4 = (0,
|
|
11635
|
+
var import_styled_components74 = __toESM(require("styled-components"));
|
|
11636
|
+
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
11637
|
+
var StyledLabel4 = (0, import_styled_components74.default)(import_react_select3.Label)`
|
|
11574
11638
|
padding: var(--wui-select-option-padding);
|
|
11575
11639
|
`;
|
|
11576
11640
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
11577
|
-
return /* @__PURE__ */ (0,
|
|
11578
|
-
/* @__PURE__ */ (0,
|
|
11641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
11642
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11579
11643
|
Text,
|
|
11580
11644
|
{
|
|
11581
11645
|
prominence: "secondary",
|
|
@@ -11588,11 +11652,11 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11588
11652
|
};
|
|
11589
11653
|
|
|
11590
11654
|
// src/components/Switch/Switch.tsx
|
|
11591
|
-
var
|
|
11592
|
-
var
|
|
11593
|
-
var
|
|
11594
|
-
var
|
|
11595
|
-
var sizeSmall3 =
|
|
11655
|
+
var import_react57 = require("react");
|
|
11656
|
+
var import_styled_components75 = __toESM(require("styled-components"));
|
|
11657
|
+
var import_type_guards48 = require("@wistia/type-guards");
|
|
11658
|
+
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
11659
|
+
var sizeSmall3 = import_styled_components75.css`
|
|
11596
11660
|
--wui-size-small-width: 24px;
|
|
11597
11661
|
--wui-size-small-height: 14px;
|
|
11598
11662
|
|
|
@@ -11607,7 +11671,7 @@ var sizeSmall3 = import_styled_components73.css`
|
|
|
11607
11671
|
height: calc(var(--wui-size-small-width) / 2);
|
|
11608
11672
|
}
|
|
11609
11673
|
`;
|
|
11610
|
-
var sizeMedium3 =
|
|
11674
|
+
var sizeMedium3 = import_styled_components75.css`
|
|
11611
11675
|
--wui-size-medium-width: 32px;
|
|
11612
11676
|
--wui-size-medium-height: 18px;
|
|
11613
11677
|
|
|
@@ -11622,7 +11686,7 @@ var sizeMedium3 = import_styled_components73.css`
|
|
|
11622
11686
|
height: calc(var(--wui-size-medium-width) / 2);
|
|
11623
11687
|
}
|
|
11624
11688
|
`;
|
|
11625
|
-
var sizeLarge3 =
|
|
11689
|
+
var sizeLarge3 = import_styled_components75.css`
|
|
11626
11690
|
--wui-size-large-width: 40px;
|
|
11627
11691
|
--wui-size-large-height: 22px;
|
|
11628
11692
|
|
|
@@ -11642,14 +11706,14 @@ var getSizeCss3 = (size) => {
|
|
|
11642
11706
|
if (size === "lg") return sizeLarge3;
|
|
11643
11707
|
return sizeMedium3;
|
|
11644
11708
|
};
|
|
11645
|
-
var StyledSwitchWrapper =
|
|
11709
|
+
var StyledSwitchWrapper = import_styled_components75.default.div`
|
|
11646
11710
|
display: flex;
|
|
11647
11711
|
margin: 0;
|
|
11648
11712
|
|
|
11649
11713
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
11650
11714
|
user-select: none;
|
|
11651
11715
|
`;
|
|
11652
|
-
var StyledSwitchInput =
|
|
11716
|
+
var StyledSwitchInput = import_styled_components75.default.div`
|
|
11653
11717
|
${({ $size }) => getSizeCss3($size)}
|
|
11654
11718
|
line-height: 0;
|
|
11655
11719
|
margin: 0;
|
|
@@ -11677,7 +11741,7 @@ var StyledSwitchInput = import_styled_components73.default.div`
|
|
|
11677
11741
|
transition: all 0.2s ease-in-out;
|
|
11678
11742
|
}
|
|
11679
11743
|
`;
|
|
11680
|
-
var StyledHiddenSwitchInput =
|
|
11744
|
+
var StyledHiddenSwitchInput = import_styled_components75.default.input`
|
|
11681
11745
|
${visuallyHiddenStyle}
|
|
11682
11746
|
|
|
11683
11747
|
/* toggles display of faux-input background-color and toggle position */
|
|
@@ -11693,7 +11757,7 @@ var StyledHiddenSwitchInput = import_styled_components73.default.input`
|
|
|
11693
11757
|
}
|
|
11694
11758
|
}
|
|
11695
11759
|
`;
|
|
11696
|
-
var Switch = (0,
|
|
11760
|
+
var Switch = (0, import_react57.forwardRef)(
|
|
11697
11761
|
({
|
|
11698
11762
|
checked,
|
|
11699
11763
|
disabled = false,
|
|
@@ -11708,10 +11772,10 @@ var Switch = (0, import_react55.forwardRef)(
|
|
|
11708
11772
|
hideLabel = false,
|
|
11709
11773
|
...props
|
|
11710
11774
|
}, ref) => {
|
|
11711
|
-
const generatedId = (0,
|
|
11712
|
-
const computedId = (0,
|
|
11713
|
-
return /* @__PURE__ */ (0,
|
|
11714
|
-
/* @__PURE__ */ (0,
|
|
11775
|
+
const generatedId = (0, import_react57.useId)();
|
|
11776
|
+
const computedId = (0, import_type_guards48.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11778
|
+
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
11715
11779
|
StyledHiddenSwitchInput,
|
|
11716
11780
|
{
|
|
11717
11781
|
...props,
|
|
@@ -11726,10 +11790,10 @@ var Switch = (0, import_react55.forwardRef)(
|
|
|
11726
11790
|
value
|
|
11727
11791
|
}
|
|
11728
11792
|
),
|
|
11729
|
-
/* @__PURE__ */ (0,
|
|
11793
|
+
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
11730
11794
|
FormControlLabel,
|
|
11731
11795
|
{
|
|
11732
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
11796
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
11733
11797
|
StyledSwitchInput,
|
|
11734
11798
|
{
|
|
11735
11799
|
$disabled: disabled,
|
|
@@ -11751,19 +11815,19 @@ var Switch = (0, import_react55.forwardRef)(
|
|
|
11751
11815
|
Switch.displayName = "Switch";
|
|
11752
11816
|
|
|
11753
11817
|
// src/components/Table/Table.tsx
|
|
11754
|
-
var
|
|
11755
|
-
var
|
|
11756
|
-
var StyledTable =
|
|
11818
|
+
var import_styled_components76 = __toESM(require("styled-components"));
|
|
11819
|
+
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
11820
|
+
var StyledTable = import_styled_components76.default.table`
|
|
11757
11821
|
width: 100%;
|
|
11758
11822
|
border-collapse: collapse;
|
|
11759
11823
|
|
|
11760
|
-
${({ $striped }) => $striped &&
|
|
11824
|
+
${({ $striped }) => $striped && import_styled_components76.css`
|
|
11761
11825
|
tbody tr:nth-child(even) {
|
|
11762
11826
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
11763
11827
|
}
|
|
11764
11828
|
`}
|
|
11765
11829
|
|
|
11766
|
-
${({ $divided }) => $divided &&
|
|
11830
|
+
${({ $divided }) => $divided && import_styled_components76.css`
|
|
11767
11831
|
tr {
|
|
11768
11832
|
border-bottom: 1px solid var(--wui-color-border);
|
|
11769
11833
|
}
|
|
@@ -11775,7 +11839,7 @@ var Table = ({
|
|
|
11775
11839
|
divided = false,
|
|
11776
11840
|
...props
|
|
11777
11841
|
}) => {
|
|
11778
|
-
return /* @__PURE__ */ (0,
|
|
11842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
|
|
11779
11843
|
StyledTable,
|
|
11780
11844
|
{
|
|
11781
11845
|
$divided: divided,
|
|
@@ -11787,88 +11851,88 @@ var Table = ({
|
|
|
11787
11851
|
};
|
|
11788
11852
|
|
|
11789
11853
|
// src/components/Table/TableBody.tsx
|
|
11790
|
-
var
|
|
11854
|
+
var import_styled_components77 = __toESM(require("styled-components"));
|
|
11791
11855
|
|
|
11792
11856
|
// src/components/Table/TableSectionContext.ts
|
|
11793
|
-
var
|
|
11794
|
-
var TableSectionContext = (0,
|
|
11857
|
+
var import_react58 = require("react");
|
|
11858
|
+
var TableSectionContext = (0, import_react58.createContext)(null);
|
|
11795
11859
|
|
|
11796
11860
|
// src/components/Table/TableBody.tsx
|
|
11797
|
-
var
|
|
11798
|
-
var StyledTbody =
|
|
11861
|
+
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
11862
|
+
var StyledTbody = import_styled_components77.default.tbody``;
|
|
11799
11863
|
var TableBody = ({ children, ...props }) => {
|
|
11800
|
-
return /* @__PURE__ */ (0,
|
|
11864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledTbody, { ...props, children }) });
|
|
11801
11865
|
};
|
|
11802
11866
|
|
|
11803
11867
|
// src/components/Table/TableCell.tsx
|
|
11804
|
-
var
|
|
11805
|
-
var
|
|
11806
|
-
var
|
|
11807
|
-
var sharedStyles =
|
|
11868
|
+
var import_react59 = require("react");
|
|
11869
|
+
var import_styled_components78 = __toESM(require("styled-components"));
|
|
11870
|
+
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
11871
|
+
var sharedStyles = import_styled_components78.css`
|
|
11808
11872
|
color: var(--wui-color-text);
|
|
11809
11873
|
padding: var(--wui-space-02);
|
|
11810
11874
|
text-align: left;
|
|
11811
11875
|
`;
|
|
11812
|
-
var StyledTh =
|
|
11876
|
+
var StyledTh = import_styled_components78.default.th`
|
|
11813
11877
|
${sharedStyles}
|
|
11814
11878
|
font-size: var(--wui-typography-body-4-size);
|
|
11815
11879
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
11816
11880
|
line-height: var(--wui-typography-body-4-line-height);
|
|
11817
11881
|
`;
|
|
11818
|
-
var StyledTd =
|
|
11882
|
+
var StyledTd = import_styled_components78.default.td`
|
|
11819
11883
|
${sharedStyles}
|
|
11820
11884
|
font-size: var(--wui-typography-body-2-size);
|
|
11821
11885
|
font-weight: var(--wui-typography-body-2-weight);
|
|
11822
11886
|
line-height: var(--wui-typography-body-2-line-height);
|
|
11823
11887
|
`;
|
|
11824
11888
|
var TableCell = ({ children, ...props }) => {
|
|
11825
|
-
const section = (0,
|
|
11889
|
+
const section = (0, import_react59.useContext)(TableSectionContext);
|
|
11826
11890
|
if (section === "head") {
|
|
11827
|
-
return /* @__PURE__ */ (0,
|
|
11891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(StyledTh, { ...props, children });
|
|
11828
11892
|
}
|
|
11829
|
-
return /* @__PURE__ */ (0,
|
|
11893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(StyledTd, { ...props, children });
|
|
11830
11894
|
};
|
|
11831
11895
|
|
|
11832
11896
|
// src/components/Table/TableFooter.tsx
|
|
11833
|
-
var
|
|
11834
|
-
var
|
|
11835
|
-
var StyledTfoot =
|
|
11897
|
+
var import_styled_components79 = __toESM(require("styled-components"));
|
|
11898
|
+
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
11899
|
+
var StyledTfoot = import_styled_components79.default.tfoot``;
|
|
11836
11900
|
var TableFooter = ({ children, ...props }) => {
|
|
11837
|
-
return /* @__PURE__ */ (0,
|
|
11901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledTfoot, { ...props, children }) });
|
|
11838
11902
|
};
|
|
11839
11903
|
|
|
11840
11904
|
// src/components/Table/TableHead.tsx
|
|
11841
|
-
var
|
|
11842
|
-
var
|
|
11843
|
-
var StyledThead =
|
|
11905
|
+
var import_styled_components80 = __toESM(require("styled-components"));
|
|
11906
|
+
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
11907
|
+
var StyledThead = import_styled_components80.default.thead``;
|
|
11844
11908
|
var TableHead = ({ children, ...props }) => {
|
|
11845
|
-
return /* @__PURE__ */ (0,
|
|
11909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(StyledThead, { ...props, children }) });
|
|
11846
11910
|
};
|
|
11847
11911
|
|
|
11848
11912
|
// src/components/Table/TableRow.tsx
|
|
11849
|
-
var
|
|
11850
|
-
var
|
|
11851
|
-
var StyledTr =
|
|
11913
|
+
var import_styled_components81 = __toESM(require("styled-components"));
|
|
11914
|
+
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
11915
|
+
var StyledTr = import_styled_components81.default.tr``;
|
|
11852
11916
|
var TableRow = ({ children, ...props }) => {
|
|
11853
|
-
return /* @__PURE__ */ (0,
|
|
11917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(StyledTr, { ...props, children });
|
|
11854
11918
|
};
|
|
11855
11919
|
|
|
11856
11920
|
// src/components/Tabs/Tabs.tsx
|
|
11857
|
-
var
|
|
11921
|
+
var import_react63 = require("react");
|
|
11858
11922
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
11859
|
-
var
|
|
11860
|
-
var
|
|
11923
|
+
var import_type_guards50 = require("@wistia/type-guards");
|
|
11924
|
+
var import_styled_components86 = __toESM(require("styled-components"));
|
|
11861
11925
|
|
|
11862
11926
|
// src/components/Tabs/TabPanel.tsx
|
|
11863
|
-
var
|
|
11927
|
+
var import_styled_components82 = __toESM(require("styled-components"));
|
|
11864
11928
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
11865
|
-
var
|
|
11866
|
-
var StyledTabPanel = (0,
|
|
11929
|
+
var import_jsx_runtime262 = require("react/jsx-runtime");
|
|
11930
|
+
var StyledTabPanel = (0, import_styled_components82.default)(import_react_tabs.Content)`
|
|
11867
11931
|
display: flex;
|
|
11868
11932
|
flex-direction: column;
|
|
11869
11933
|
`;
|
|
11870
11934
|
var TabPanel = ({ children, value, ...props }) => {
|
|
11871
|
-
return /* @__PURE__ */ (0,
|
|
11935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
|
|
11872
11936
|
StyledTabPanel,
|
|
11873
11937
|
{
|
|
11874
11938
|
value,
|
|
@@ -11880,10 +11944,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
11880
11944
|
TabPanel.displayName = "TabPanel";
|
|
11881
11945
|
|
|
11882
11946
|
// src/components/Tabs/TabList.tsx
|
|
11883
|
-
var
|
|
11947
|
+
var import_styled_components83 = __toESM(require("styled-components"));
|
|
11884
11948
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
11885
|
-
var
|
|
11886
|
-
var StyledTabList = (0,
|
|
11949
|
+
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
11950
|
+
var StyledTabList = (0, import_styled_components83.default)(import_react_tabs2.List)`
|
|
11887
11951
|
${segmentedControlStyles}
|
|
11888
11952
|
|
|
11889
11953
|
margin-bottom: var(--wui-space-04);
|
|
@@ -11896,7 +11960,7 @@ var TabList = ({
|
|
|
11896
11960
|
ariaLabel,
|
|
11897
11961
|
...props
|
|
11898
11962
|
}) => {
|
|
11899
|
-
return /* @__PURE__ */ (0,
|
|
11963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
11900
11964
|
StyledTabList,
|
|
11901
11965
|
{
|
|
11902
11966
|
$fullWidth: fullWidth,
|
|
@@ -11909,17 +11973,17 @@ var TabList = ({
|
|
|
11909
11973
|
TabList.displayName = "TabList";
|
|
11910
11974
|
|
|
11911
11975
|
// src/components/Tabs/TabItem.tsx
|
|
11912
|
-
var
|
|
11913
|
-
var
|
|
11976
|
+
var import_react61 = require("react");
|
|
11977
|
+
var import_styled_components84 = __toESM(require("styled-components"));
|
|
11914
11978
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
11915
|
-
var
|
|
11979
|
+
var import_type_guards49 = require("@wistia/type-guards");
|
|
11916
11980
|
|
|
11917
11981
|
// src/components/Tabs/useTabsValue.tsx
|
|
11918
|
-
var
|
|
11919
|
-
var TabsValueContext = (0,
|
|
11982
|
+
var import_react60 = require("react");
|
|
11983
|
+
var TabsValueContext = (0, import_react60.createContext)(null);
|
|
11920
11984
|
var TabsValueProvider = TabsValueContext.Provider;
|
|
11921
11985
|
var useTabsValue = () => {
|
|
11922
|
-
const context = (0,
|
|
11986
|
+
const context = (0, import_react60.useContext)(TabsValueContext);
|
|
11923
11987
|
if (context === null) {
|
|
11924
11988
|
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
11925
11989
|
}
|
|
@@ -11927,21 +11991,21 @@ var useTabsValue = () => {
|
|
|
11927
11991
|
};
|
|
11928
11992
|
|
|
11929
11993
|
// src/components/Tabs/TabItem.tsx
|
|
11930
|
-
var
|
|
11931
|
-
var StyledTabItem = (0,
|
|
11994
|
+
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
11995
|
+
var StyledTabItem = (0, import_styled_components84.default)(import_react_tabs3.Trigger)`
|
|
11932
11996
|
${segmentedControlItemStyles}
|
|
11933
11997
|
|
|
11934
11998
|
&:focus-visible {
|
|
11935
11999
|
outline: none;
|
|
11936
12000
|
}
|
|
11937
12001
|
`;
|
|
11938
|
-
var TabItem = (0,
|
|
12002
|
+
var TabItem = (0, import_react61.forwardRef)(
|
|
11939
12003
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11940
12004
|
const selectedValue = useTabsValue();
|
|
11941
12005
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
11942
|
-
const buttonRef = (0,
|
|
12006
|
+
const buttonRef = (0, import_react61.useRef)(null);
|
|
11943
12007
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11944
|
-
(0,
|
|
12008
|
+
(0, import_react61.useEffect)(() => {
|
|
11945
12009
|
const buttonElem = buttonRef.current;
|
|
11946
12010
|
if (!buttonElem) {
|
|
11947
12011
|
return void 0;
|
|
@@ -11966,12 +12030,12 @@ var TabItem = (0, import_react59.forwardRef)(
|
|
|
11966
12030
|
resizeObserver.disconnect();
|
|
11967
12031
|
};
|
|
11968
12032
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
11969
|
-
return /* @__PURE__ */ (0,
|
|
12033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(
|
|
11970
12034
|
StyledTabItem,
|
|
11971
12035
|
{
|
|
11972
12036
|
ref: combinedRef,
|
|
11973
|
-
$hasLabel: (0,
|
|
11974
|
-
"aria-label": (0,
|
|
12037
|
+
$hasLabel: (0, import_type_guards49.isNotNil)(label),
|
|
12038
|
+
"aria-label": (0, import_type_guards49.isNotNil)(label) ? void 0 : ariaLabel,
|
|
11975
12039
|
disabled,
|
|
11976
12040
|
value,
|
|
11977
12041
|
children: [
|
|
@@ -11985,16 +12049,16 @@ var TabItem = (0, import_react59.forwardRef)(
|
|
|
11985
12049
|
TabItem.displayName = "TabItem";
|
|
11986
12050
|
|
|
11987
12051
|
// src/components/Tabs/extractTabItems.ts
|
|
11988
|
-
var
|
|
12052
|
+
var import_react62 = require("react");
|
|
11989
12053
|
var extractTabItems = (children) => {
|
|
11990
12054
|
const tabItems = [];
|
|
11991
|
-
|
|
11992
|
-
if (!(0,
|
|
12055
|
+
import_react62.Children.forEach(children, (child) => {
|
|
12056
|
+
if (!(0, import_react62.isValidElement)(child)) {
|
|
11993
12057
|
return;
|
|
11994
12058
|
}
|
|
11995
12059
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
11996
12060
|
tabItems.push(child);
|
|
11997
|
-
} else if (child.type ===
|
|
12061
|
+
} else if (child.type === import_react62.Fragment) {
|
|
11998
12062
|
const fragmentElement = child;
|
|
11999
12063
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
12000
12064
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -12007,9 +12071,9 @@ var extractTabItems = (children) => {
|
|
|
12007
12071
|
};
|
|
12008
12072
|
|
|
12009
12073
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
12010
|
-
var
|
|
12011
|
-
var
|
|
12012
|
-
var TabsSelectedItemIndicatorDiv = (0,
|
|
12074
|
+
var import_styled_components85 = __toESM(require("styled-components"));
|
|
12075
|
+
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
12076
|
+
var TabsSelectedItemIndicatorDiv = (0, import_styled_components85.default)(SelectedItemIndicatorDiv)`
|
|
12013
12077
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
12014
12078
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
12015
12079
|
}
|
|
@@ -12020,28 +12084,28 @@ var SelectedItemIndicator2 = () => {
|
|
|
12020
12084
|
if (selectedValue == null) {
|
|
12021
12085
|
return null;
|
|
12022
12086
|
}
|
|
12023
|
-
return /* @__PURE__ */ (0,
|
|
12087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(TabsSelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
12024
12088
|
};
|
|
12025
12089
|
|
|
12026
12090
|
// src/components/Tabs/Tabs.tsx
|
|
12027
|
-
var
|
|
12028
|
-
var TabsContainer =
|
|
12091
|
+
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
12092
|
+
var TabsContainer = import_styled_components86.default.div`
|
|
12029
12093
|
display: flex;
|
|
12030
12094
|
flex-direction: column;
|
|
12031
12095
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
12032
12096
|
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
12033
12097
|
`;
|
|
12034
|
-
var StickyTabContent =
|
|
12098
|
+
var StickyTabContent = import_styled_components86.default.div`
|
|
12035
12099
|
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
12036
12100
|
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
12037
12101
|
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
12038
12102
|
`;
|
|
12039
|
-
var StyledTabsRoot = (0,
|
|
12103
|
+
var StyledTabsRoot = (0, import_styled_components86.default)(import_react_tabs4.Root)`
|
|
12040
12104
|
display: flex;
|
|
12041
12105
|
flex-direction: column;
|
|
12042
12106
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
12043
12107
|
`;
|
|
12044
|
-
var Tabs = (0,
|
|
12108
|
+
var Tabs = (0, import_react63.forwardRef)(
|
|
12045
12109
|
({
|
|
12046
12110
|
children,
|
|
12047
12111
|
fullWidth = true,
|
|
@@ -12053,13 +12117,13 @@ var Tabs = (0, import_react61.forwardRef)(
|
|
|
12053
12117
|
...props
|
|
12054
12118
|
}, ref) => {
|
|
12055
12119
|
const tabItems = extractTabItems(children);
|
|
12056
|
-
const [internalSelectedValue, setInternalSelectedValue] = (0,
|
|
12120
|
+
const [internalSelectedValue, setInternalSelectedValue] = (0, import_react63.useState)(defaultSelectedValue);
|
|
12057
12121
|
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
12058
12122
|
defaultValue: defaultSelectedValue,
|
|
12059
12123
|
onValueChange: setInternalSelectedValue
|
|
12060
12124
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
12061
12125
|
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
12062
|
-
return /* @__PURE__ */ (0,
|
|
12126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
12063
12127
|
StyledTabsRoot,
|
|
12064
12128
|
{
|
|
12065
12129
|
ref,
|
|
@@ -12067,14 +12131,14 @@ var Tabs = (0, import_react61.forwardRef)(
|
|
|
12067
12131
|
activationMode: "automatic",
|
|
12068
12132
|
...props,
|
|
12069
12133
|
...modeProps,
|
|
12070
|
-
children: /* @__PURE__ */ (0,
|
|
12071
|
-
/* @__PURE__ */ (0,
|
|
12134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime266.jsxs)(SelectedItemStyleProvider, { children: [
|
|
12135
|
+
/* @__PURE__ */ (0, import_jsx_runtime266.jsxs)(
|
|
12072
12136
|
TabList,
|
|
12073
12137
|
{
|
|
12074
12138
|
ariaLabel,
|
|
12075
12139
|
fullWidth,
|
|
12076
12140
|
children: [
|
|
12077
|
-
/* @__PURE__ */ (0,
|
|
12141
|
+
/* @__PURE__ */ (0, import_jsx_runtime266.jsx)(SelectedItemIndicator2, {}),
|
|
12078
12142
|
tabItems.map((tab) => {
|
|
12079
12143
|
const {
|
|
12080
12144
|
value,
|
|
@@ -12083,8 +12147,8 @@ var Tabs = (0, import_react61.forwardRef)(
|
|
|
12083
12147
|
label,
|
|
12084
12148
|
"aria-label": ariaLabelForTab
|
|
12085
12149
|
} = tab.props;
|
|
12086
|
-
if ((0,
|
|
12087
|
-
return /* @__PURE__ */ (0,
|
|
12150
|
+
if ((0, import_type_guards50.isNil)(icon)) {
|
|
12151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
12088
12152
|
TabItem,
|
|
12089
12153
|
{
|
|
12090
12154
|
disabled,
|
|
@@ -12094,8 +12158,8 @@ var Tabs = (0, import_react61.forwardRef)(
|
|
|
12094
12158
|
value
|
|
12095
12159
|
);
|
|
12096
12160
|
}
|
|
12097
|
-
if ((0,
|
|
12098
|
-
return /* @__PURE__ */ (0,
|
|
12161
|
+
if ((0, import_type_guards50.isNotNil)(label)) {
|
|
12162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
12099
12163
|
TabItem,
|
|
12100
12164
|
{
|
|
12101
12165
|
disabled,
|
|
@@ -12106,8 +12170,8 @@ var Tabs = (0, import_react61.forwardRef)(
|
|
|
12106
12170
|
value
|
|
12107
12171
|
);
|
|
12108
12172
|
}
|
|
12109
|
-
if ((0,
|
|
12110
|
-
return /* @__PURE__ */ (0,
|
|
12173
|
+
if ((0, import_type_guards50.isNotNil)(ariaLabelForTab)) {
|
|
12174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
12111
12175
|
TabItem,
|
|
12112
12176
|
{
|
|
12113
12177
|
"aria-label": ariaLabelForTab,
|
|
@@ -12123,7 +12187,7 @@ var Tabs = (0, import_react61.forwardRef)(
|
|
|
12123
12187
|
]
|
|
12124
12188
|
}
|
|
12125
12189
|
),
|
|
12126
|
-
/* @__PURE__ */ (0,
|
|
12190
|
+
/* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
12127
12191
|
TabPanel,
|
|
12128
12192
|
{
|
|
12129
12193
|
value: tab.props.value,
|
|
@@ -12139,19 +12203,19 @@ var Tabs = (0, import_react61.forwardRef)(
|
|
|
12139
12203
|
Tabs.displayName = "Tabs";
|
|
12140
12204
|
|
|
12141
12205
|
// src/components/Tabs/Tab.tsx
|
|
12142
|
-
var
|
|
12143
|
-
var
|
|
12144
|
-
var Tab = (0,
|
|
12145
|
-
return /* @__PURE__ */ (0,
|
|
12206
|
+
var import_react64 = require("react");
|
|
12207
|
+
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
12208
|
+
var Tab = (0, import_react64.forwardRef)(({ children }, ref) => {
|
|
12209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime267.jsx)("div", { ref, children });
|
|
12146
12210
|
});
|
|
12147
12211
|
Tab.displayName = "Tab";
|
|
12148
12212
|
|
|
12149
12213
|
// src/components/Tag/Tag.tsx
|
|
12150
|
-
var
|
|
12151
|
-
var
|
|
12152
|
-
var
|
|
12153
|
-
var
|
|
12154
|
-
var TagLabel =
|
|
12214
|
+
var import_react65 = require("react");
|
|
12215
|
+
var import_styled_components87 = __toESM(require("styled-components"));
|
|
12216
|
+
var import_type_guards51 = require("@wistia/type-guards");
|
|
12217
|
+
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
12218
|
+
var TagLabel = import_styled_components87.default.a`
|
|
12155
12219
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12156
12220
|
font-size: var(--wui-typography-label-4-size);
|
|
12157
12221
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -12186,14 +12250,14 @@ var TagLabel = import_styled_components85.default.a`
|
|
|
12186
12250
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12187
12251
|
}
|
|
12188
12252
|
`;
|
|
12189
|
-
var TagDivider =
|
|
12253
|
+
var TagDivider = import_styled_components87.default.div`
|
|
12190
12254
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12191
12255
|
border-left: 1px solid var(--wui-color-border);
|
|
12192
12256
|
display: flex;
|
|
12193
12257
|
height: 14px;
|
|
12194
12258
|
width: 1px;
|
|
12195
12259
|
`;
|
|
12196
|
-
var StyledRemoveButton =
|
|
12260
|
+
var StyledRemoveButton = import_styled_components87.default.button`
|
|
12197
12261
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12198
12262
|
all: unset;
|
|
12199
12263
|
cursor: pointer;
|
|
@@ -12221,7 +12285,7 @@ var StyledRemoveButton = import_styled_components85.default.button`
|
|
|
12221
12285
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12222
12286
|
}
|
|
12223
12287
|
`;
|
|
12224
|
-
var StyledTag =
|
|
12288
|
+
var StyledTag = import_styled_components87.default.div`
|
|
12225
12289
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12226
12290
|
align-items: center;
|
|
12227
12291
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -12234,48 +12298,48 @@ var StyledTag = import_styled_components85.default.div`
|
|
|
12234
12298
|
}
|
|
12235
12299
|
`;
|
|
12236
12300
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
12237
|
-
if ((0,
|
|
12301
|
+
if ((0, import_type_guards51.isNil)(onClickRemove)) {
|
|
12238
12302
|
return null;
|
|
12239
12303
|
}
|
|
12240
|
-
if ((0,
|
|
12304
|
+
if ((0, import_type_guards51.isNil)(onClickRemoveLabel)) {
|
|
12241
12305
|
throw new Error(
|
|
12242
12306
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
12243
12307
|
);
|
|
12244
12308
|
}
|
|
12245
|
-
return /* @__PURE__ */ (0,
|
|
12246
|
-
/* @__PURE__ */ (0,
|
|
12247
|
-
/* @__PURE__ */ (0,
|
|
12309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(import_jsx_runtime268.Fragment, { children: [
|
|
12310
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
12311
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(
|
|
12248
12312
|
StyledRemoveButton,
|
|
12249
12313
|
{
|
|
12250
12314
|
$colorScheme: colorScheme,
|
|
12251
12315
|
onClick: onClickRemove,
|
|
12252
12316
|
type: "button",
|
|
12253
12317
|
children: [
|
|
12254
|
-
/* @__PURE__ */ (0,
|
|
12318
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12255
12319
|
Icon,
|
|
12256
12320
|
{
|
|
12257
12321
|
size: "sm",
|
|
12258
12322
|
type: "close"
|
|
12259
12323
|
}
|
|
12260
12324
|
),
|
|
12261
|
-
/* @__PURE__ */ (0,
|
|
12325
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
12262
12326
|
]
|
|
12263
12327
|
}
|
|
12264
12328
|
)
|
|
12265
12329
|
] });
|
|
12266
12330
|
};
|
|
12267
|
-
var Tag = (0,
|
|
12331
|
+
var Tag = (0, import_react65.forwardRef)(
|
|
12268
12332
|
({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
|
|
12269
|
-
const hasIcon = (0,
|
|
12270
|
-
const labelProps = (0,
|
|
12271
|
-
return /* @__PURE__ */ (0,
|
|
12333
|
+
const hasIcon = (0, import_type_guards51.isNotNil)(icon);
|
|
12334
|
+
const labelProps = (0, import_type_guards51.isNotNil)(href) && (0, import_type_guards51.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
12335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(
|
|
12272
12336
|
StyledTag,
|
|
12273
12337
|
{
|
|
12274
12338
|
ref,
|
|
12275
12339
|
$colorScheme: colorScheme,
|
|
12276
12340
|
...props,
|
|
12277
12341
|
children: [
|
|
12278
|
-
/* @__PURE__ */ (0,
|
|
12342
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(
|
|
12279
12343
|
TagLabel,
|
|
12280
12344
|
{
|
|
12281
12345
|
...labelProps,
|
|
@@ -12286,7 +12350,7 @@ var Tag = (0, import_react63.forwardRef)(
|
|
|
12286
12350
|
]
|
|
12287
12351
|
}
|
|
12288
12352
|
),
|
|
12289
|
-
/* @__PURE__ */ (0,
|
|
12353
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12290
12354
|
RemoveButton,
|
|
12291
12355
|
{
|
|
12292
12356
|
colorScheme,
|
|
@@ -12301,136 +12365,11 @@ var Tag = (0, import_react63.forwardRef)(
|
|
|
12301
12365
|
);
|
|
12302
12366
|
Tag.displayName = "Tag";
|
|
12303
12367
|
|
|
12304
|
-
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
12305
|
-
var import_styled_components86 = __toESM(require("styled-components"));
|
|
12306
|
-
var import_type_guards51 = require("@wistia/type-guards");
|
|
12307
|
-
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
12308
|
-
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
12309
|
-
if (iconOnly) {
|
|
12310
|
-
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12311
|
-
"g",
|
|
12312
|
-
{
|
|
12313
|
-
"data-testid": "ui-wistia-logo-brandmark",
|
|
12314
|
-
fill: brandmarkColor,
|
|
12315
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime268.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" })
|
|
12316
|
-
}
|
|
12317
|
-
);
|
|
12318
|
-
}
|
|
12319
|
-
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12320
|
-
"g",
|
|
12321
|
-
{
|
|
12322
|
-
"data-testid": "ui-wistia-logo-brandmark",
|
|
12323
|
-
fill: brandmarkColor,
|
|
12324
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime268.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" })
|
|
12325
|
-
}
|
|
12326
|
-
);
|
|
12327
|
-
};
|
|
12328
|
-
var renderLogotype = (logotypeColor, iconOnly) => {
|
|
12329
|
-
if (iconOnly) {
|
|
12330
|
-
return null;
|
|
12331
|
-
}
|
|
12332
|
-
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
12333
|
-
"g",
|
|
12334
|
-
{
|
|
12335
|
-
"data-testid": "ui-wistia-logo-logotype",
|
|
12336
|
-
fill: logotypeColor,
|
|
12337
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime268.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" })
|
|
12338
|
-
}
|
|
12339
|
-
);
|
|
12340
|
-
};
|
|
12341
|
-
var computedViewBox = (iconOnly) => {
|
|
12342
|
-
if (iconOnly) {
|
|
12343
|
-
return "0 0 34.4 26.78";
|
|
12344
|
-
}
|
|
12345
|
-
return "0 0 144 31.47";
|
|
12346
|
-
};
|
|
12347
|
-
var WistiaLogoComponent = import_styled_components86.default.svg`
|
|
12348
|
-
height: ${({ height }) => `${height}px`};
|
|
12349
|
-
|
|
12350
|
-
/* ensure it will always fit on mobile */
|
|
12351
|
-
max-height: 22vw;
|
|
12352
|
-
max-width: 100%;
|
|
12353
|
-
|
|
12354
|
-
&:hover {
|
|
12355
|
-
path {
|
|
12356
|
-
${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
|
|
12357
|
-
}
|
|
12358
|
-
}
|
|
12359
|
-
|
|
12360
|
-
${({ $opticallyCentered, $iconOnly }) => {
|
|
12361
|
-
if ($opticallyCentered) {
|
|
12362
|
-
if ($iconOnly) {
|
|
12363
|
-
return import_styled_components86.css`
|
|
12364
|
-
aspect-ratio: 1;
|
|
12365
|
-
padding: 11.85% 3.12% 13.91%;
|
|
12366
|
-
`;
|
|
12367
|
-
}
|
|
12368
|
-
return import_styled_components86.css`
|
|
12369
|
-
aspect-ratio: 127 / 32;
|
|
12370
|
-
`;
|
|
12371
|
-
}
|
|
12372
|
-
return null;
|
|
12373
|
-
}}
|
|
12374
|
-
`;
|
|
12375
|
-
var WistiaLogo = ({
|
|
12376
|
-
description = void 0,
|
|
12377
|
-
height = 100,
|
|
12378
|
-
hoverColor = void 0,
|
|
12379
|
-
href = void 0,
|
|
12380
|
-
iconOnly = false,
|
|
12381
|
-
opticallyCentered = false,
|
|
12382
|
-
title = "Wistia Logo",
|
|
12383
|
-
variant = "standard",
|
|
12384
|
-
...props
|
|
12385
|
-
}) => {
|
|
12386
|
-
const primaryColor = "#2949e5";
|
|
12387
|
-
const darkColor = "#000934";
|
|
12388
|
-
const lightColor = "#ffffff";
|
|
12389
|
-
const VARIANT_COLORS = {
|
|
12390
|
-
standard: {
|
|
12391
|
-
brandmark: primaryColor,
|
|
12392
|
-
logotype: darkColor
|
|
12393
|
-
},
|
|
12394
|
-
dark: {
|
|
12395
|
-
brandmark: darkColor,
|
|
12396
|
-
logotype: darkColor
|
|
12397
|
-
},
|
|
12398
|
-
light: {
|
|
12399
|
-
brandmark: lightColor,
|
|
12400
|
-
logotype: lightColor
|
|
12401
|
-
}
|
|
12402
|
-
};
|
|
12403
|
-
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
12404
|
-
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
12405
|
-
const Logo = /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(
|
|
12406
|
-
WistiaLogoComponent,
|
|
12407
|
-
{
|
|
12408
|
-
$hoverColor: hoverColor,
|
|
12409
|
-
$iconOnly: iconOnly,
|
|
12410
|
-
$opticallyCentered: opticallyCentered,
|
|
12411
|
-
height,
|
|
12412
|
-
preserveAspectRatio: opticallyCentered ? "xMidYMin" : void 0,
|
|
12413
|
-
role: "img",
|
|
12414
|
-
viewBox: computedViewBox(iconOnly),
|
|
12415
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
12416
|
-
...props,
|
|
12417
|
-
children: [
|
|
12418
|
-
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)("title", { children: title }),
|
|
12419
|
-
(0, import_type_guards51.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("desc", { children: description }) : null,
|
|
12420
|
-
renderBrandmark(brandmarkColor, iconOnly),
|
|
12421
|
-
renderLogotype(logotypeColor, iconOnly)
|
|
12422
|
-
]
|
|
12423
|
-
}
|
|
12424
|
-
);
|
|
12425
|
-
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("a", { href, children: Logo }) : Logo;
|
|
12426
|
-
};
|
|
12427
|
-
WistiaLogo.displayName = "WistiaLogo";
|
|
12428
|
-
|
|
12429
12368
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
12430
|
-
var
|
|
12369
|
+
var import_styled_components88 = __toESM(require("styled-components"));
|
|
12431
12370
|
var import_type_guards52 = require("@wistia/type-guards");
|
|
12432
12371
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
12433
|
-
var StyledThumbnailBadge =
|
|
12372
|
+
var StyledThumbnailBadge = import_styled_components88.default.div`
|
|
12434
12373
|
align-items: center;
|
|
12435
12374
|
background-color: rgb(0 0 0 / 50%);
|
|
12436
12375
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -12463,15 +12402,15 @@ var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
|
12463
12402
|
ThumbnailBadge.displayName = "ThumbnailBadge";
|
|
12464
12403
|
|
|
12465
12404
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12466
|
-
var
|
|
12467
|
-
var
|
|
12405
|
+
var import_react66 = require("react");
|
|
12406
|
+
var import_styled_components90 = __toESM(require("styled-components"));
|
|
12468
12407
|
var import_type_guards54 = require("@wistia/type-guards");
|
|
12469
12408
|
|
|
12470
12409
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
12471
12410
|
var import_type_guards53 = require("@wistia/type-guards");
|
|
12472
|
-
var
|
|
12411
|
+
var import_styled_components89 = require("styled-components");
|
|
12473
12412
|
var gradients = {
|
|
12474
|
-
defaultDarkOne:
|
|
12413
|
+
defaultDarkOne: import_styled_components89.css`
|
|
12475
12414
|
background-color: #222d66;
|
|
12476
12415
|
background-image:
|
|
12477
12416
|
radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
|
|
@@ -12479,7 +12418,7 @@ var gradients = {
|
|
|
12479
12418
|
radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
|
|
12480
12419
|
radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
|
|
12481
12420
|
`,
|
|
12482
|
-
defaultDarkTwo:
|
|
12421
|
+
defaultDarkTwo: import_styled_components89.css`
|
|
12483
12422
|
background-color: #222d66;
|
|
12484
12423
|
background-image:
|
|
12485
12424
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
|
|
@@ -12487,7 +12426,7 @@ var gradients = {
|
|
|
12487
12426
|
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12488
12427
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12489
12428
|
`,
|
|
12490
|
-
defaultLightOne:
|
|
12429
|
+
defaultLightOne: import_styled_components89.css`
|
|
12491
12430
|
background-color: #ccd5ff;
|
|
12492
12431
|
background-image:
|
|
12493
12432
|
radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
|
|
@@ -12495,13 +12434,13 @@ var gradients = {
|
|
|
12495
12434
|
radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
|
|
12496
12435
|
radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
|
|
12497
12436
|
`,
|
|
12498
|
-
defaultLightTwo:
|
|
12437
|
+
defaultLightTwo: import_styled_components89.css`
|
|
12499
12438
|
background-color: #ccd5ff;
|
|
12500
12439
|
background-image:
|
|
12501
12440
|
radial-gradient(ellipse at top, #ccd5ff, transparent),
|
|
12502
12441
|
radial-gradient(ellipse at bottom, #6b84ff, transparent);
|
|
12503
12442
|
`,
|
|
12504
|
-
defaultMidOne:
|
|
12443
|
+
defaultMidOne: import_styled_components89.css`
|
|
12505
12444
|
background-color: #6b84ff;
|
|
12506
12445
|
background-image:
|
|
12507
12446
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
|
|
@@ -12509,13 +12448,13 @@ var gradients = {
|
|
|
12509
12448
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
|
|
12510
12449
|
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
|
|
12511
12450
|
`,
|
|
12512
|
-
defaultMidTwo:
|
|
12451
|
+
defaultMidTwo: import_styled_components89.css`
|
|
12513
12452
|
background-color: #6b84ff;
|
|
12514
12453
|
background-image:
|
|
12515
12454
|
radial-gradient(ellipse at top, #2949e5, transparent),
|
|
12516
12455
|
radial-gradient(ellipse at bottom, #ccd5ff, transparent);
|
|
12517
12456
|
`,
|
|
12518
|
-
green:
|
|
12457
|
+
green: import_styled_components89.css`
|
|
12519
12458
|
background-color: #fafffa;
|
|
12520
12459
|
background-image:
|
|
12521
12460
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -12523,7 +12462,7 @@ var gradients = {
|
|
|
12523
12462
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12524
12463
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12525
12464
|
`,
|
|
12526
|
-
greenWithPop:
|
|
12465
|
+
greenWithPop: import_styled_components89.css`
|
|
12527
12466
|
background-color: #fafffa;
|
|
12528
12467
|
background-image:
|
|
12529
12468
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -12531,7 +12470,7 @@ var gradients = {
|
|
|
12531
12470
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12532
12471
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12533
12472
|
`,
|
|
12534
|
-
pink:
|
|
12473
|
+
pink: import_styled_components89.css`
|
|
12535
12474
|
background-color: #fffff0;
|
|
12536
12475
|
background-image:
|
|
12537
12476
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
|
|
@@ -12539,7 +12478,7 @@ var gradients = {
|
|
|
12539
12478
|
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
12540
12479
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
|
|
12541
12480
|
`,
|
|
12542
|
-
pinkWithPop:
|
|
12481
|
+
pinkWithPop: import_styled_components89.css`
|
|
12543
12482
|
background-color: #fffff0;
|
|
12544
12483
|
background-image:
|
|
12545
12484
|
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
@@ -12547,7 +12486,7 @@ var gradients = {
|
|
|
12547
12486
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
|
|
12548
12487
|
radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
|
|
12549
12488
|
`,
|
|
12550
|
-
playfulGradientOne:
|
|
12489
|
+
playfulGradientOne: import_styled_components89.css`
|
|
12551
12490
|
background-color: #f7f8ff;
|
|
12552
12491
|
background-image:
|
|
12553
12492
|
radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
|
|
@@ -12555,7 +12494,7 @@ var gradients = {
|
|
|
12555
12494
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
|
|
12556
12495
|
radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
|
|
12557
12496
|
`,
|
|
12558
|
-
playfulGradientTwo:
|
|
12497
|
+
playfulGradientTwo: import_styled_components89.css`
|
|
12559
12498
|
background-color: #f7f8ff;
|
|
12560
12499
|
background-image:
|
|
12561
12500
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
|
|
@@ -12563,13 +12502,13 @@ var gradients = {
|
|
|
12563
12502
|
radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
|
|
12564
12503
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12565
12504
|
`,
|
|
12566
|
-
purple:
|
|
12505
|
+
purple: import_styled_components89.css`
|
|
12567
12506
|
background-color: #f2caff;
|
|
12568
12507
|
background-image:
|
|
12569
12508
|
radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
|
|
12570
12509
|
radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
|
|
12571
12510
|
`,
|
|
12572
|
-
purpleWithPop:
|
|
12511
|
+
purpleWithPop: import_styled_components89.css`
|
|
12573
12512
|
background-color: #f2caff;
|
|
12574
12513
|
background-image:
|
|
12575
12514
|
radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
|
|
@@ -12577,7 +12516,7 @@ var gradients = {
|
|
|
12577
12516
|
radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
|
|
12578
12517
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12579
12518
|
`,
|
|
12580
|
-
yellow:
|
|
12519
|
+
yellow: import_styled_components89.css`
|
|
12581
12520
|
background-color: #fffff0;
|
|
12582
12521
|
background-image:
|
|
12583
12522
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -12585,7 +12524,7 @@ var gradients = {
|
|
|
12585
12524
|
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
12586
12525
|
radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
|
|
12587
12526
|
`,
|
|
12588
|
-
yellowWithPop:
|
|
12527
|
+
yellowWithPop: import_styled_components89.css`
|
|
12589
12528
|
background-color: #fffff0;
|
|
12590
12529
|
background-image:
|
|
12591
12530
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -12601,12 +12540,12 @@ var getBackgroundGradient = (gradientName = void 0) => {
|
|
|
12601
12540
|
|
|
12602
12541
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12603
12542
|
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
12604
|
-
var WideThumbnailImage =
|
|
12543
|
+
var WideThumbnailImage = import_styled_components90.default.img`
|
|
12605
12544
|
height: 100%;
|
|
12606
12545
|
object-fit: cover;
|
|
12607
12546
|
width: 100%;
|
|
12608
12547
|
`;
|
|
12609
|
-
var SquareThumbnailImage =
|
|
12548
|
+
var SquareThumbnailImage = import_styled_components90.default.img`
|
|
12610
12549
|
backdrop-filter: blur(8px);
|
|
12611
12550
|
object-fit: contain;
|
|
12612
12551
|
width: 100%;
|
|
@@ -12617,6 +12556,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
12617
12556
|
WideThumbnailImage,
|
|
12618
12557
|
{
|
|
12619
12558
|
alt: "",
|
|
12559
|
+
role: "img",
|
|
12620
12560
|
src: thumbnailUrl
|
|
12621
12561
|
}
|
|
12622
12562
|
);
|
|
@@ -12625,11 +12565,12 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
12625
12565
|
SquareThumbnailImage,
|
|
12626
12566
|
{
|
|
12627
12567
|
alt: "",
|
|
12568
|
+
role: "img",
|
|
12628
12569
|
src: thumbnailUrl
|
|
12629
12570
|
}
|
|
12630
12571
|
);
|
|
12631
12572
|
};
|
|
12632
|
-
var StyledThumbnail =
|
|
12573
|
+
var StyledThumbnail = import_styled_components90.default.div`
|
|
12633
12574
|
background-image: ${({ $backgroundUrl }) => (0, import_type_guards54.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
12634
12575
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
12635
12576
|
// if we don't have $backgroundUrl show a gradient
|
|
@@ -12648,7 +12589,7 @@ var StyledThumbnail = import_styled_components89.default.div`
|
|
|
12648
12589
|
border-radius: calc(8% * (9 / 16)) / 8%;
|
|
12649
12590
|
}
|
|
12650
12591
|
`;
|
|
12651
|
-
var Thumbnail = (0,
|
|
12592
|
+
var Thumbnail = (0, import_react66.forwardRef)(
|
|
12652
12593
|
({
|
|
12653
12594
|
gradientBackground = "defaultMidOne",
|
|
12654
12595
|
thumbnailImageType = "square",
|
|
@@ -12662,10 +12603,11 @@ var Thumbnail = (0, import_react64.forwardRef)(
|
|
|
12662
12603
|
StyledThumbnail,
|
|
12663
12604
|
{
|
|
12664
12605
|
ref,
|
|
12606
|
+
...props,
|
|
12665
12607
|
$backgroundUrl: backgroundUrl,
|
|
12666
12608
|
$gradientBackground: gradientBackground,
|
|
12667
12609
|
$width: width,
|
|
12668
|
-
|
|
12610
|
+
role: "presentation",
|
|
12669
12611
|
children: [
|
|
12670
12612
|
(0, import_type_guards54.isNotNil)(children) ? children : null,
|
|
12671
12613
|
(0, import_type_guards54.isNotNil)(thumbnailUrl) ? /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
|
|
@@ -12682,69 +12624,239 @@ var Thumbnail = (0, import_react64.forwardRef)(
|
|
|
12682
12624
|
);
|
|
12683
12625
|
Thumbnail.displayName = "Thumbnail";
|
|
12684
12626
|
|
|
12685
|
-
// src/components/
|
|
12686
|
-
var
|
|
12687
|
-
var
|
|
12627
|
+
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
12628
|
+
var import_react67 = __toESM(require("react"));
|
|
12629
|
+
var import_styled_components91 = __toESM(require("styled-components"));
|
|
12688
12630
|
var import_type_guards55 = require("@wistia/type-guards");
|
|
12689
|
-
var import_jsx_runtime271 =
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12631
|
+
var import_jsx_runtime271 = (
|
|
12632
|
+
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
12633
|
+
require("react/jsx-runtime")
|
|
12634
|
+
);
|
|
12635
|
+
var StyledThumbnailCollage = import_styled_components91.default.div`
|
|
12636
|
+
display: grid;
|
|
12637
|
+
gap: var(--wui-space-01);
|
|
12638
|
+
width: 100%;
|
|
12639
|
+
grid-template-columns: 3fr 2fr;
|
|
12640
|
+
grid-template-rows: 1fr 1fr;
|
|
12641
|
+
aspect-ratio: 16 / 9;
|
|
12642
|
+
|
|
12643
|
+
&:has(:nth-child(1)) {
|
|
12644
|
+
--wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
|
|
12645
|
+
|
|
12646
|
+
grid-template-areas:
|
|
12647
|
+
'a a'
|
|
12648
|
+
'a a';
|
|
12693
12649
|
}
|
|
12694
12650
|
|
|
12695
|
-
|
|
12696
|
-
|
|
12651
|
+
&:has(:nth-child(2)) {
|
|
12652
|
+
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
12653
|
+
--wui-collage-thumbnail-second-border-radius: 11.5% / 8%;
|
|
12654
|
+
|
|
12655
|
+
grid-template-areas:
|
|
12656
|
+
'a b'
|
|
12657
|
+
'a b';
|
|
12658
|
+
}
|
|
12659
|
+
|
|
12660
|
+
&:has(:nth-child(3)) {
|
|
12661
|
+
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
12662
|
+
--wui-collage-thumbnail-second-border-radius: 11.5% / 16%;
|
|
12663
|
+
--wui-collage-thumbnail-third-border-radius: 11.5% / 16%;
|
|
12664
|
+
|
|
12665
|
+
grid-template-areas:
|
|
12666
|
+
'a b'
|
|
12667
|
+
'a c';
|
|
12668
|
+
}
|
|
12669
|
+
|
|
12670
|
+
> :nth-child(1) {
|
|
12671
|
+
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
|
|
12672
|
+
|
|
12673
|
+
grid-area: a;
|
|
12674
|
+
}
|
|
12675
|
+
|
|
12676
|
+
> :nth-child(2) {
|
|
12677
|
+
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
|
|
12678
|
+
|
|
12679
|
+
grid-area: b;
|
|
12680
|
+
}
|
|
12681
|
+
|
|
12682
|
+
> :nth-child(3) {
|
|
12683
|
+
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
|
|
12684
|
+
|
|
12685
|
+
grid-area: c;
|
|
12686
|
+
}
|
|
12687
|
+
|
|
12688
|
+
> * {
|
|
12689
|
+
aspect-ratio: unset;
|
|
12690
|
+
height: 100%;
|
|
12691
|
+
width: 100%;
|
|
12692
|
+
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
12693
|
+
|
|
12694
|
+
img {
|
|
12695
|
+
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
12696
|
+
}
|
|
12697
|
+
|
|
12698
|
+
> :not(img) {
|
|
12699
|
+
display: none;
|
|
12700
|
+
}
|
|
12697
12701
|
}
|
|
12698
12702
|
`;
|
|
12699
|
-
var
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
const handleClick = (event) => {
|
|
12715
|
-
event.preventDefault();
|
|
12716
|
-
if ((0, import_type_guards55.isFunction)(props.onClick)) {
|
|
12717
|
-
props.onClick(event);
|
|
12718
|
-
}
|
|
12719
|
-
void copyToClipboard(value).then(() => {
|
|
12720
|
-
setIsCopied(true);
|
|
12721
|
-
if ((0, import_type_guards55.isFunction)(onCopy)) {
|
|
12722
|
-
onCopy(value);
|
|
12723
|
-
}
|
|
12724
|
-
return value;
|
|
12725
|
-
});
|
|
12726
|
-
};
|
|
12727
|
-
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
12728
|
-
StyledInput2,
|
|
12703
|
+
var ThumbnailCollage = ({
|
|
12704
|
+
children = [],
|
|
12705
|
+
gradientBackground = "defaultMidOne",
|
|
12706
|
+
...props
|
|
12707
|
+
}) => {
|
|
12708
|
+
const thumbnailArray = import_react67.default.Children.toArray(children);
|
|
12709
|
+
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
12710
|
+
const thumbnails = (0, import_type_guards55.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
12711
|
+
return import_react67.default.cloneElement(child, {
|
|
12712
|
+
...child.props,
|
|
12713
|
+
children: void 0
|
|
12714
|
+
});
|
|
12715
|
+
}) : [
|
|
12716
|
+
/* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
12717
|
+
Thumbnail,
|
|
12729
12718
|
{
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12719
|
+
gradientBackground,
|
|
12720
|
+
thumbnailUrl: null
|
|
12721
|
+
},
|
|
12722
|
+
"fallback"
|
|
12723
|
+
)
|
|
12724
|
+
];
|
|
12725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
|
|
12726
|
+
StyledThumbnailCollage,
|
|
12727
|
+
{
|
|
12728
|
+
$gradientBackground: gradientBackground,
|
|
12729
|
+
"data-wui-thumbnail-collage": true,
|
|
12730
|
+
...props,
|
|
12731
|
+
children: thumbnails
|
|
12732
|
+
}
|
|
12733
|
+
);
|
|
12734
|
+
};
|
|
12735
|
+
|
|
12736
|
+
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
12737
|
+
var import_styled_components92 = __toESM(require("styled-components"));
|
|
12738
|
+
var import_type_guards56 = require("@wistia/type-guards");
|
|
12739
|
+
var import_jsx_runtime272 = require("react/jsx-runtime");
|
|
12740
|
+
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
12741
|
+
if (iconOnly) {
|
|
12742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
|
|
12743
|
+
"g",
|
|
12744
|
+
{
|
|
12745
|
+
"data-testid": "ui-wistia-logo-brandmark",
|
|
12746
|
+
fill: brandmarkColor,
|
|
12747
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime272.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" })
|
|
12743
12748
|
}
|
|
12744
12749
|
);
|
|
12745
12750
|
}
|
|
12746
|
-
)
|
|
12747
|
-
|
|
12751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
|
|
12752
|
+
"g",
|
|
12753
|
+
{
|
|
12754
|
+
"data-testid": "ui-wistia-logo-brandmark",
|
|
12755
|
+
fill: brandmarkColor,
|
|
12756
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime272.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" })
|
|
12757
|
+
}
|
|
12758
|
+
);
|
|
12759
|
+
};
|
|
12760
|
+
var renderLogotype = (logotypeColor, iconOnly) => {
|
|
12761
|
+
if (iconOnly) {
|
|
12762
|
+
return null;
|
|
12763
|
+
}
|
|
12764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
|
|
12765
|
+
"g",
|
|
12766
|
+
{
|
|
12767
|
+
"data-testid": "ui-wistia-logo-logotype",
|
|
12768
|
+
fill: logotypeColor,
|
|
12769
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime272.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" })
|
|
12770
|
+
}
|
|
12771
|
+
);
|
|
12772
|
+
};
|
|
12773
|
+
var computedViewBox = (iconOnly) => {
|
|
12774
|
+
if (iconOnly) {
|
|
12775
|
+
return "0 0 34.4 26.78";
|
|
12776
|
+
}
|
|
12777
|
+
return "0 0 144 31.47";
|
|
12778
|
+
};
|
|
12779
|
+
var WistiaLogoComponent = import_styled_components92.default.svg`
|
|
12780
|
+
height: ${({ height }) => `${height}px`};
|
|
12781
|
+
|
|
12782
|
+
/* ensure it will always fit on mobile */
|
|
12783
|
+
max-height: 22vw;
|
|
12784
|
+
max-width: 100%;
|
|
12785
|
+
|
|
12786
|
+
&:hover {
|
|
12787
|
+
path {
|
|
12788
|
+
${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
|
|
12789
|
+
}
|
|
12790
|
+
}
|
|
12791
|
+
|
|
12792
|
+
${({ $opticallyCentered, $iconOnly }) => {
|
|
12793
|
+
if ($opticallyCentered) {
|
|
12794
|
+
if ($iconOnly) {
|
|
12795
|
+
return import_styled_components92.css`
|
|
12796
|
+
aspect-ratio: 1;
|
|
12797
|
+
padding: 11.85% 3.12% 13.91%;
|
|
12798
|
+
`;
|
|
12799
|
+
}
|
|
12800
|
+
return import_styled_components92.css`
|
|
12801
|
+
aspect-ratio: 127 / 32;
|
|
12802
|
+
`;
|
|
12803
|
+
}
|
|
12804
|
+
return null;
|
|
12805
|
+
}}
|
|
12806
|
+
`;
|
|
12807
|
+
var WistiaLogo = ({
|
|
12808
|
+
description = void 0,
|
|
12809
|
+
height = 100,
|
|
12810
|
+
hoverColor = void 0,
|
|
12811
|
+
href = void 0,
|
|
12812
|
+
iconOnly = false,
|
|
12813
|
+
opticallyCentered = false,
|
|
12814
|
+
title = "Wistia Logo",
|
|
12815
|
+
variant = "standard",
|
|
12816
|
+
...props
|
|
12817
|
+
}) => {
|
|
12818
|
+
const primaryColor = "#2949e5";
|
|
12819
|
+
const darkColor = "#000934";
|
|
12820
|
+
const lightColor = "#ffffff";
|
|
12821
|
+
const VARIANT_COLORS = {
|
|
12822
|
+
standard: {
|
|
12823
|
+
brandmark: primaryColor,
|
|
12824
|
+
logotype: darkColor
|
|
12825
|
+
},
|
|
12826
|
+
dark: {
|
|
12827
|
+
brandmark: darkColor,
|
|
12828
|
+
logotype: darkColor
|
|
12829
|
+
},
|
|
12830
|
+
light: {
|
|
12831
|
+
brandmark: lightColor,
|
|
12832
|
+
logotype: lightColor
|
|
12833
|
+
}
|
|
12834
|
+
};
|
|
12835
|
+
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
12836
|
+
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
12837
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
|
|
12838
|
+
WistiaLogoComponent,
|
|
12839
|
+
{
|
|
12840
|
+
$hoverColor: hoverColor,
|
|
12841
|
+
$iconOnly: iconOnly,
|
|
12842
|
+
$opticallyCentered: opticallyCentered,
|
|
12843
|
+
height,
|
|
12844
|
+
preserveAspectRatio: opticallyCentered ? "xMidYMin" : void 0,
|
|
12845
|
+
role: "img",
|
|
12846
|
+
viewBox: computedViewBox(iconOnly),
|
|
12847
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12848
|
+
...props,
|
|
12849
|
+
children: [
|
|
12850
|
+
/* @__PURE__ */ (0, import_jsx_runtime272.jsx)("title", { children: title }),
|
|
12851
|
+
(0, import_type_guards56.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("desc", { children: description }) : null,
|
|
12852
|
+
renderBrandmark(brandmarkColor, iconOnly),
|
|
12853
|
+
renderLogotype(logotypeColor, iconOnly)
|
|
12854
|
+
]
|
|
12855
|
+
}
|
|
12856
|
+
);
|
|
12857
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("a", { href, children: Logo }) : Logo;
|
|
12858
|
+
};
|
|
12859
|
+
WistiaLogo.displayName = "WistiaLogo";
|
|
12748
12860
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12749
12861
|
0 && (module.exports = {
|
|
12750
12862
|
ActionButton,
|
|
@@ -12821,6 +12933,7 @@ InputClickToCopy.displayName = "InputClickToCopy";
|
|
|
12821
12933
|
Text,
|
|
12822
12934
|
Thumbnail,
|
|
12823
12935
|
ThumbnailBadge,
|
|
12936
|
+
ThumbnailCollage,
|
|
12824
12937
|
Tooltip,
|
|
12825
12938
|
UIProvider,
|
|
12826
12939
|
WistiaLogo,
|