@wistia/ui 0.6.24 → 0.6.25-beta.1f654e88.549f946
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 +463 -268
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +123 -2
- package/dist/index.d.ts +123 -2
- package/dist/index.mjs +326 -133
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.25-beta.1f654e88.549f946
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -98,6 +98,7 @@ __export(index_exports, {
|
|
|
98
98
|
SelectOptionGroup: () => SelectOptionGroup,
|
|
99
99
|
Stack: () => Stack,
|
|
100
100
|
SubMenu: () => SubMenu,
|
|
101
|
+
Switch: () => Switch,
|
|
101
102
|
Tab: () => Tab,
|
|
102
103
|
Table: () => Table,
|
|
103
104
|
TableBody: () => TableBody,
|
|
@@ -125,6 +126,7 @@ __export(index_exports, {
|
|
|
125
126
|
useFormState: () => useFormState,
|
|
126
127
|
useImperativeFilePicker: () => import_use_file_picker.useImperativeFilePicker,
|
|
127
128
|
useKey: () => useKey,
|
|
129
|
+
useLocalStorage: () => useLocalStorage,
|
|
128
130
|
useMq: () => useMq,
|
|
129
131
|
useToast: () => useToast,
|
|
130
132
|
useWindowSize: () => useWindowSize
|
|
@@ -2150,11 +2152,39 @@ var useKey = (key, eventHandler, { eventName = "keydown", eventTarget, eventOpti
|
|
|
2150
2152
|
useEvent(eventName, memoizedEventHandler, eventTarget, eventOptions);
|
|
2151
2153
|
};
|
|
2152
2154
|
|
|
2155
|
+
// src/hooks/useLocalStorage/useLocalStorage.ts
|
|
2156
|
+
var import_react7 = require("react");
|
|
2157
|
+
var useLocalStorage = (key, initialValue, storage = window.localStorage) => {
|
|
2158
|
+
const [storedValue, setStoredValue] = (0, import_react7.useState)(() => {
|
|
2159
|
+
try {
|
|
2160
|
+
const item = storage.getItem(key);
|
|
2161
|
+
return item !== null && !!item ? JSON.parse(item) : initialValue;
|
|
2162
|
+
} catch (error) {
|
|
2163
|
+
console.log(error);
|
|
2164
|
+
return initialValue;
|
|
2165
|
+
}
|
|
2166
|
+
});
|
|
2167
|
+
const setValue = (value) => {
|
|
2168
|
+
try {
|
|
2169
|
+
const valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
2170
|
+
setStoredValue(valueToStore);
|
|
2171
|
+
storage.setItem(key, JSON.stringify(valueToStore));
|
|
2172
|
+
} catch (error) {
|
|
2173
|
+
console.error(error);
|
|
2174
|
+
}
|
|
2175
|
+
};
|
|
2176
|
+
const removeValue = () => {
|
|
2177
|
+
storage.removeItem(key);
|
|
2178
|
+
setStoredValue(void 0);
|
|
2179
|
+
};
|
|
2180
|
+
return [storedValue, setValue, removeValue];
|
|
2181
|
+
};
|
|
2182
|
+
|
|
2153
2183
|
// src/hooks/useMq/useMq.ts
|
|
2154
2184
|
var import_type_guards7 = require("@wistia/type-guards");
|
|
2155
2185
|
|
|
2156
2186
|
// src/hooks/useWindowSize/useWindowSize.ts
|
|
2157
|
-
var
|
|
2187
|
+
var import_react8 = require("react");
|
|
2158
2188
|
var import_throttle_debounce = require("throttle-debounce");
|
|
2159
2189
|
|
|
2160
2190
|
// src/private/helpers/isClient/isClient.ts
|
|
@@ -2162,11 +2192,11 @@ var isClient = () => typeof window !== "undefined" && typeof document !== "undef
|
|
|
2162
2192
|
|
|
2163
2193
|
// src/hooks/useWindowSize/useWindowSize.ts
|
|
2164
2194
|
var useWindowSize = (interval = 0) => {
|
|
2165
|
-
const [dimensions, setDimensions] = (0,
|
|
2195
|
+
const [dimensions, setDimensions] = (0, import_react8.useState)({
|
|
2166
2196
|
width: isClient() ? window.innerWidth : 0,
|
|
2167
2197
|
height: isClient() ? window.innerHeight : 0
|
|
2168
2198
|
});
|
|
2169
|
-
(0,
|
|
2199
|
+
(0, import_react8.useLayoutEffect)(() => {
|
|
2170
2200
|
const handleResize = (0, import_throttle_debounce.debounce)(
|
|
2171
2201
|
interval,
|
|
2172
2202
|
() => setDimensions({
|
|
@@ -2218,11 +2248,11 @@ var useActiveMq = () => {
|
|
|
2218
2248
|
};
|
|
2219
2249
|
|
|
2220
2250
|
// src/hooks/useToast/useToast.tsx
|
|
2221
|
-
var
|
|
2251
|
+
var import_react10 = require("react");
|
|
2222
2252
|
var import_sonner2 = require("sonner");
|
|
2223
2253
|
|
|
2224
2254
|
// src/private/components/Toast/Toast.tsx
|
|
2225
|
-
var
|
|
2255
|
+
var import_react9 = require("react");
|
|
2226
2256
|
var import_styled_components16 = __toESM(require("styled-components"));
|
|
2227
2257
|
var import_type_guards9 = require("@wistia/type-guards");
|
|
2228
2258
|
|
|
@@ -2452,8 +2482,8 @@ var StyledToast = import_styled_components16.default.div`
|
|
|
2452
2482
|
}
|
|
2453
2483
|
`;
|
|
2454
2484
|
var Action = ({ actionButton }) => {
|
|
2455
|
-
if ((0, import_type_guards9.isNotNil)(actionButton) && (0,
|
|
2456
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0,
|
|
2485
|
+
if ((0, import_type_guards9.isNotNil)(actionButton) && (0, import_react9.isValidElement)(actionButton)) {
|
|
2486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react9.cloneElement)(actionButton, {
|
|
2457
2487
|
variant: "soft",
|
|
2458
2488
|
// force Button variant
|
|
2459
2489
|
size: "sm"
|
|
@@ -2489,7 +2519,7 @@ Toast.displayName = "Toast";
|
|
|
2489
2519
|
// src/hooks/useToast/useToast.tsx
|
|
2490
2520
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2491
2521
|
var useToast = () => {
|
|
2492
|
-
return (0,
|
|
2522
|
+
return (0, import_react10.useCallback)(
|
|
2493
2523
|
({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
|
|
2494
2524
|
import_sonner2.toast.custom(
|
|
2495
2525
|
() => {
|
|
@@ -2511,11 +2541,11 @@ var useToast = () => {
|
|
|
2511
2541
|
};
|
|
2512
2542
|
|
|
2513
2543
|
// src/components/ActionButton/ActionButton.tsx
|
|
2514
|
-
var
|
|
2544
|
+
var import_react14 = require("react");
|
|
2515
2545
|
var import_styled_components22 = __toESM(require("styled-components"));
|
|
2516
2546
|
|
|
2517
2547
|
// src/components/Button/Button.tsx
|
|
2518
|
-
var
|
|
2548
|
+
var import_react13 = require("react");
|
|
2519
2549
|
var import_styled_components21 = __toESM(require("styled-components"));
|
|
2520
2550
|
var import_type_guards13 = require("@wistia/type-guards");
|
|
2521
2551
|
|
|
@@ -6463,13 +6493,13 @@ var iconMap = {
|
|
|
6463
6493
|
|
|
6464
6494
|
// src/private/hooks/useResponsiveProp/useResponsiveProp.ts
|
|
6465
6495
|
var import_type_guards10 = require("@wistia/type-guards");
|
|
6466
|
-
var
|
|
6496
|
+
var import_react11 = require("react");
|
|
6467
6497
|
var isResponsiveObject = (values) => {
|
|
6468
6498
|
return typeof values === "object" && values !== null && !Array.isArray(values) && "base" in values;
|
|
6469
6499
|
};
|
|
6470
6500
|
var useResponsiveProp = (values) => {
|
|
6471
6501
|
const activeMediaQueries = useActiveMq();
|
|
6472
|
-
return (0,
|
|
6502
|
+
return (0, import_react11.useMemo)(() => {
|
|
6473
6503
|
if ((0, import_type_guards10.isRecord)(values) && isResponsiveObject(values)) {
|
|
6474
6504
|
const mq2 = activeMediaQueries.find((key) => key in values);
|
|
6475
6505
|
return (0, import_type_guards10.isNotUndefined)(mq2) && (0, import_type_guards10.isNotUndefined)(values[mq2]) ? values[mq2] : values.base;
|
|
@@ -6536,7 +6566,7 @@ var Icon = ({
|
|
|
6536
6566
|
Icon.displayName = "Icon";
|
|
6537
6567
|
|
|
6538
6568
|
// src/components/Link/Link.tsx
|
|
6539
|
-
var
|
|
6569
|
+
var import_react12 = require("react");
|
|
6540
6570
|
var import_type_guards12 = require("@wistia/type-guards");
|
|
6541
6571
|
var import_styled_components20 = __toESM(require("styled-components"));
|
|
6542
6572
|
var import_react_router_dom = require("react-router-dom");
|
|
@@ -6576,7 +6606,7 @@ var StyledLink = import_styled_components20.default.a`
|
|
|
6576
6606
|
}
|
|
6577
6607
|
}
|
|
6578
6608
|
`;
|
|
6579
|
-
var Link = (0,
|
|
6609
|
+
var Link = (0, import_react12.forwardRef)(
|
|
6580
6610
|
({
|
|
6581
6611
|
beforeAction,
|
|
6582
6612
|
children,
|
|
@@ -6721,7 +6751,7 @@ var ButtonContent = ({
|
|
|
6721
6751
|
)
|
|
6722
6752
|
] });
|
|
6723
6753
|
};
|
|
6724
|
-
var Button = (0,
|
|
6754
|
+
var Button = (0, import_react13.forwardRef)(
|
|
6725
6755
|
({
|
|
6726
6756
|
children,
|
|
6727
6757
|
forceState,
|
|
@@ -6900,7 +6930,7 @@ var StyledLabel = import_styled_components22.default.span`
|
|
|
6900
6930
|
grid-row: 2;
|
|
6901
6931
|
text-align: left;
|
|
6902
6932
|
`;
|
|
6903
|
-
var ActionButton = (0,
|
|
6933
|
+
var ActionButton = (0, import_react14.forwardRef)(
|
|
6904
6934
|
({
|
|
6905
6935
|
icon,
|
|
6906
6936
|
colorScheme = "default",
|
|
@@ -6944,7 +6974,7 @@ var ActionButton = (0, import_react13.forwardRef)(
|
|
|
6944
6974
|
ActionButton.displayName = "ActionButton";
|
|
6945
6975
|
|
|
6946
6976
|
// src/components/Avatar/Avatar.tsx
|
|
6947
|
-
var
|
|
6977
|
+
var import_react15 = require("react");
|
|
6948
6978
|
var import_type_guards15 = require("@wistia/type-guards");
|
|
6949
6979
|
var import_styled_components24 = __toESM(require("styled-components"));
|
|
6950
6980
|
|
|
@@ -7076,8 +7106,8 @@ var Avatar = ({
|
|
|
7076
7106
|
onImageLoad,
|
|
7077
7107
|
...otherProps
|
|
7078
7108
|
}) => {
|
|
7079
|
-
const [imageLoadState, setImageLoadState] = (0,
|
|
7080
|
-
(0,
|
|
7109
|
+
const [imageLoadState, setImageLoadState] = (0, import_react15.useState)("loading");
|
|
7110
|
+
(0, import_react15.useEffect)(() => {
|
|
7081
7111
|
setImageLoadState("loading");
|
|
7082
7112
|
}, [imageUrl]);
|
|
7083
7113
|
const handleImageLoad = () => {
|
|
@@ -7089,7 +7119,7 @@ var Avatar = ({
|
|
|
7089
7119
|
onImageLoad?.({ state: "error", type: "initials" });
|
|
7090
7120
|
};
|
|
7091
7121
|
const avatarSize = heightAndWidth ?? avatarSizeMap[size];
|
|
7092
|
-
const avatarColor = (0,
|
|
7122
|
+
const avatarColor = (0, import_react15.useMemo)(() => chooseColorScheme(name), [name]);
|
|
7093
7123
|
const showInitials = (0, import_type_guards15.isNil)(imageUrl) || imageLoadState === "error";
|
|
7094
7124
|
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
7095
7125
|
AvatarWrapper,
|
|
@@ -7119,7 +7149,7 @@ var Avatar = ({
|
|
|
7119
7149
|
Avatar.displayName = "Avatar";
|
|
7120
7150
|
|
|
7121
7151
|
// src/components/Badge/Badge.tsx
|
|
7122
|
-
var
|
|
7152
|
+
var import_react16 = require("react");
|
|
7123
7153
|
var import_styled_components25 = __toESM(require("styled-components"));
|
|
7124
7154
|
var import_type_guards16 = require("@wistia/type-guards");
|
|
7125
7155
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
@@ -7143,7 +7173,7 @@ var StyledBadge = import_styled_components25.default.div`
|
|
|
7143
7173
|
width: 12px;
|
|
7144
7174
|
}
|
|
7145
7175
|
`;
|
|
7146
|
-
var Badge = (0,
|
|
7176
|
+
var Badge = (0, import_react16.forwardRef)(
|
|
7147
7177
|
({ colorScheme = "inherit", label, icon, ...otherProps }, ref) => {
|
|
7148
7178
|
const hasIcon = (0, import_type_guards16.isNotNil)(icon);
|
|
7149
7179
|
return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
|
|
@@ -7164,7 +7194,7 @@ var Badge = (0, import_react15.forwardRef)(
|
|
|
7164
7194
|
Badge.displayName = "Badge";
|
|
7165
7195
|
|
|
7166
7196
|
// src/components/Box/Box.tsx
|
|
7167
|
-
var
|
|
7197
|
+
var import_react17 = require("react");
|
|
7168
7198
|
var import_styled_components26 = __toESM(require("styled-components"));
|
|
7169
7199
|
var import_type_guards17 = require("@wistia/type-guards");
|
|
7170
7200
|
|
|
@@ -7240,13 +7270,13 @@ var StyledBoxComponent = import_styled_components26.default.div`
|
|
|
7240
7270
|
var wrapChildren = (children) => {
|
|
7241
7271
|
if ((0, import_type_guards17.isNotNil)(children)) {
|
|
7242
7272
|
if (typeof children === "object" && isDev) {
|
|
7243
|
-
return
|
|
7273
|
+
return import_react17.Children.map(children, (child) => {
|
|
7244
7274
|
if ((0, import_type_guards17.isNil)(child)) return null;
|
|
7245
7275
|
const elementParams = {};
|
|
7246
7276
|
if (child.type?.displayName === "Box" || child.type?.displayName === "Box_UI") {
|
|
7247
7277
|
elementParams.hasBoxParent = true;
|
|
7248
7278
|
}
|
|
7249
|
-
return (0,
|
|
7279
|
+
return (0, import_react17.cloneElement)(child, elementParams);
|
|
7250
7280
|
});
|
|
7251
7281
|
}
|
|
7252
7282
|
return children;
|
|
@@ -7254,7 +7284,7 @@ var wrapChildren = (children) => {
|
|
|
7254
7284
|
return null;
|
|
7255
7285
|
};
|
|
7256
7286
|
var DEFAULT_ELEMENT = "div";
|
|
7257
|
-
var BoxComponent = (0,
|
|
7287
|
+
var BoxComponent = (0, import_react17.forwardRef)(
|
|
7258
7288
|
({
|
|
7259
7289
|
alignContent = "stretch",
|
|
7260
7290
|
alignItems = "flex-start",
|
|
@@ -7329,7 +7359,7 @@ BoxComponent.displayName = "Box";
|
|
|
7329
7359
|
var Box = makePolymorphic(BoxComponent);
|
|
7330
7360
|
|
|
7331
7361
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
7332
|
-
var
|
|
7362
|
+
var import_react18 = require("react");
|
|
7333
7363
|
var import_styled_components27 = __toESM(require("styled-components"));
|
|
7334
7364
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
7335
7365
|
var StyledBreadcrumbs = import_styled_components27.default.nav`
|
|
@@ -7345,7 +7375,7 @@ var StyledBreadcrumbs = import_styled_components27.default.nav`
|
|
|
7345
7375
|
var BUFFER_WIDTH = 10;
|
|
7346
7376
|
var Breadcrumbs = ({ children, ...props }) => {
|
|
7347
7377
|
const { isXsAndDown } = useMq();
|
|
7348
|
-
let crumbs =
|
|
7378
|
+
let crumbs = import_react18.Children.toArray(children);
|
|
7349
7379
|
if (isXsAndDown) {
|
|
7350
7380
|
crumbs = crumbs.slice(-1);
|
|
7351
7381
|
}
|
|
@@ -7532,7 +7562,7 @@ var Card = ({
|
|
|
7532
7562
|
Card.displayName = "Card";
|
|
7533
7563
|
|
|
7534
7564
|
// src/components/Checkbox/Checkbox.tsx
|
|
7535
|
-
var
|
|
7565
|
+
var import_react19 = require("react");
|
|
7536
7566
|
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7537
7567
|
var import_type_guards22 = require("@wistia/type-guards");
|
|
7538
7568
|
|
|
@@ -7671,7 +7701,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
|
7671
7701
|
)
|
|
7672
7702
|
}
|
|
7673
7703
|
);
|
|
7674
|
-
var
|
|
7704
|
+
var sizeSmall = import_styled_components34.css`
|
|
7675
7705
|
width: 14px;
|
|
7676
7706
|
height: 14px;
|
|
7677
7707
|
min-width: 14px;
|
|
@@ -7682,7 +7712,7 @@ var inputSizeSmall = import_styled_components34.css`
|
|
|
7682
7712
|
height: 7px;
|
|
7683
7713
|
}
|
|
7684
7714
|
`;
|
|
7685
|
-
var
|
|
7715
|
+
var sizeMedium = import_styled_components34.css`
|
|
7686
7716
|
width: 16px;
|
|
7687
7717
|
height: 16px;
|
|
7688
7718
|
min-width: 16px;
|
|
@@ -7693,7 +7723,7 @@ var inputSizeMedium = import_styled_components34.css`
|
|
|
7693
7723
|
height: 9px;
|
|
7694
7724
|
}
|
|
7695
7725
|
`;
|
|
7696
|
-
var
|
|
7726
|
+
var sizeLarge = import_styled_components34.css`
|
|
7697
7727
|
width: 20px;
|
|
7698
7728
|
height: 20px;
|
|
7699
7729
|
min-width: 20px;
|
|
@@ -7705,9 +7735,9 @@ var inputSizeLarge = import_styled_components34.css`
|
|
|
7705
7735
|
}
|
|
7706
7736
|
`;
|
|
7707
7737
|
var getSizeCss = (size) => {
|
|
7708
|
-
if (size === "sm") return
|
|
7709
|
-
if (size === "lg") return
|
|
7710
|
-
return
|
|
7738
|
+
if (size === "sm") return sizeSmall;
|
|
7739
|
+
if (size === "lg") return sizeLarge;
|
|
7740
|
+
return sizeMedium;
|
|
7711
7741
|
};
|
|
7712
7742
|
var StyledCheckboxWrapper = import_styled_components34.default.div`
|
|
7713
7743
|
display: flex;
|
|
@@ -7752,7 +7782,7 @@ var StyledHiddenCheckboxInput = import_styled_components34.default.input`
|
|
|
7752
7782
|
display: block;
|
|
7753
7783
|
}
|
|
7754
7784
|
`;
|
|
7755
|
-
var Checkbox = (0,
|
|
7785
|
+
var Checkbox = (0, import_react19.forwardRef)(
|
|
7756
7786
|
({
|
|
7757
7787
|
checked,
|
|
7758
7788
|
disabled = false,
|
|
@@ -7767,7 +7797,7 @@ var Checkbox = (0, import_react18.forwardRef)(
|
|
|
7767
7797
|
hideLabel = false,
|
|
7768
7798
|
...props
|
|
7769
7799
|
}, ref) => {
|
|
7770
|
-
const generatedId = (0,
|
|
7800
|
+
const generatedId = (0, import_react19.useId)();
|
|
7771
7801
|
const computedId = (0, import_type_guards22.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
7772
7802
|
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(StyledCheckboxWrapper, { disabled, children: [
|
|
7773
7803
|
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
@@ -7810,9 +7840,9 @@ var Checkbox = (0, import_react18.forwardRef)(
|
|
|
7810
7840
|
Checkbox.displayName = "Checkbox";
|
|
7811
7841
|
|
|
7812
7842
|
// src/components/ClickRegion/ClickRegion.tsx
|
|
7813
|
-
var
|
|
7843
|
+
var import_react20 = require("react");
|
|
7814
7844
|
var ClickRegion = ({ children, targetRef }) => {
|
|
7815
|
-
(0,
|
|
7845
|
+
(0, import_react20.useEffect)(() => {
|
|
7816
7846
|
if (targetRef.current && targetRef.current.tagName === "A") {
|
|
7817
7847
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
7818
7848
|
} else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
|
|
@@ -7820,7 +7850,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7820
7850
|
} else {
|
|
7821
7851
|
}
|
|
7822
7852
|
}, [targetRef]);
|
|
7823
|
-
const handleClick = (0,
|
|
7853
|
+
const handleClick = (0, import_react20.useCallback)(
|
|
7824
7854
|
(event) => {
|
|
7825
7855
|
const node = targetRef.current;
|
|
7826
7856
|
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")) {
|
|
@@ -7837,7 +7867,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7837
7867
|
},
|
|
7838
7868
|
[targetRef]
|
|
7839
7869
|
);
|
|
7840
|
-
return (0,
|
|
7870
|
+
return (0, import_react20.cloneElement)(import_react20.Children.only(children), {
|
|
7841
7871
|
"data-click-region": true,
|
|
7842
7872
|
onClick: handleClick
|
|
7843
7873
|
});
|
|
@@ -7870,11 +7900,11 @@ var Collapsible = ({
|
|
|
7870
7900
|
Collapsible.displayName = "Collapsible";
|
|
7871
7901
|
|
|
7872
7902
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
7873
|
-
var
|
|
7903
|
+
var import_react21 = require("react");
|
|
7874
7904
|
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
7875
7905
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
7876
7906
|
var CollapsibleTrigger = ({ children }) => {
|
|
7877
|
-
|
|
7907
|
+
import_react21.Children.only(children);
|
|
7878
7908
|
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
7879
7909
|
};
|
|
7880
7910
|
|
|
@@ -7901,7 +7931,7 @@ var import_styled_components38 = __toESM(require("styled-components"));
|
|
|
7901
7931
|
var import_type_guards25 = require("@wistia/type-guards");
|
|
7902
7932
|
|
|
7903
7933
|
// src/components/Heading/Heading.tsx
|
|
7904
|
-
var
|
|
7934
|
+
var import_react22 = require("react");
|
|
7905
7935
|
var import_styled_components37 = __toESM(require("styled-components"));
|
|
7906
7936
|
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
7907
7937
|
var heroStyle = import_styled_components37.css`
|
|
@@ -7988,7 +8018,7 @@ var variantElementMap = {
|
|
|
7988
8018
|
heading5: "h5",
|
|
7989
8019
|
heading6: "h6"
|
|
7990
8020
|
};
|
|
7991
|
-
var HeadingComponent = (0,
|
|
8021
|
+
var HeadingComponent = (0, import_react22.forwardRef)(
|
|
7992
8022
|
({
|
|
7993
8023
|
align = "left",
|
|
7994
8024
|
colorScheme = "inherit",
|
|
@@ -8152,7 +8182,7 @@ DataCards.displayName = "DataCards";
|
|
|
8152
8182
|
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8153
8183
|
|
|
8154
8184
|
// src/components/Text/Text.tsx
|
|
8155
|
-
var
|
|
8185
|
+
var import_react23 = require("react");
|
|
8156
8186
|
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8157
8187
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8158
8188
|
var bodyBoldStyles = import_styled_components40.css`
|
|
@@ -8318,7 +8348,7 @@ var StyledText = import_styled_components40.default.div`
|
|
|
8318
8348
|
}
|
|
8319
8349
|
`}
|
|
8320
8350
|
`;
|
|
8321
|
-
var TextComponent = (0,
|
|
8351
|
+
var TextComponent = (0, import_react23.forwardRef)(
|
|
8322
8352
|
({
|
|
8323
8353
|
align = "left",
|
|
8324
8354
|
colorScheme = "inherit",
|
|
@@ -8434,7 +8464,7 @@ Divider.displayName = "Divider";
|
|
|
8434
8464
|
|
|
8435
8465
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8436
8466
|
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8437
|
-
var
|
|
8467
|
+
var import_react25 = require("react");
|
|
8438
8468
|
|
|
8439
8469
|
// src/components/Tooltip/Tooltip.tsx
|
|
8440
8470
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
@@ -8543,7 +8573,7 @@ var Tooltip = ({
|
|
|
8543
8573
|
Tooltip.displayName = "Tooltip";
|
|
8544
8574
|
|
|
8545
8575
|
// src/components/Input/Input.tsx
|
|
8546
|
-
var
|
|
8576
|
+
var import_react24 = require("react");
|
|
8547
8577
|
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8548
8578
|
var import_type_guards26 = require("@wistia/type-guards");
|
|
8549
8579
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
@@ -8632,7 +8662,7 @@ var StyledInputContainer = import_styled_components44.default.div`
|
|
|
8632
8662
|
padding-right: 32px;
|
|
8633
8663
|
}
|
|
8634
8664
|
`;
|
|
8635
|
-
var Input = (0,
|
|
8665
|
+
var Input = (0, import_react24.forwardRef)(
|
|
8636
8666
|
({
|
|
8637
8667
|
fullWidth = true,
|
|
8638
8668
|
monospace = false,
|
|
@@ -8642,7 +8672,7 @@ var Input = (0, import_react23.forwardRef)(
|
|
|
8642
8672
|
rightIcon,
|
|
8643
8673
|
...props
|
|
8644
8674
|
}, externalRef) => {
|
|
8645
|
-
const internalRef = (0,
|
|
8675
|
+
const internalRef = (0, import_react24.useRef)();
|
|
8646
8676
|
const ref = (
|
|
8647
8677
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
8648
8678
|
(0, import_type_guards26.isNotNil)(externalRef) && (0, import_type_guards26.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
|
|
@@ -8652,14 +8682,14 @@ var Input = (0, import_react23.forwardRef)(
|
|
|
8652
8682
|
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Icon, { type: "search" });
|
|
8653
8683
|
}
|
|
8654
8684
|
if ((0, import_type_guards26.isNotNil)(leftIconToDisplay)) {
|
|
8655
|
-
leftIconToDisplay = (0,
|
|
8685
|
+
leftIconToDisplay = (0, import_react24.cloneElement)(leftIconToDisplay, {
|
|
8656
8686
|
size: "md",
|
|
8657
8687
|
className: "wui-input-left-icon"
|
|
8658
8688
|
});
|
|
8659
8689
|
}
|
|
8660
8690
|
let rightIconToDisplay = rightIcon;
|
|
8661
8691
|
if ((0, import_type_guards26.isNotNil)(rightIconToDisplay)) {
|
|
8662
|
-
rightIconToDisplay = (0,
|
|
8692
|
+
rightIconToDisplay = (0, import_react24.cloneElement)(rightIconToDisplay, {
|
|
8663
8693
|
size: "md",
|
|
8664
8694
|
className: "wui-input-right-icon"
|
|
8665
8695
|
});
|
|
@@ -8754,11 +8784,11 @@ var EditableHeading = ({
|
|
|
8754
8784
|
forceEditing = false,
|
|
8755
8785
|
editingDisabled = false
|
|
8756
8786
|
}) => {
|
|
8757
|
-
const [isEditing, setIsEditing] = (0,
|
|
8758
|
-
const [value, setValue] = (0,
|
|
8759
|
-
const [previousValue, setPreviousValue] = (0,
|
|
8760
|
-
const [headingHeight, setHeadingHeight] = (0,
|
|
8761
|
-
const headingRef = (0,
|
|
8787
|
+
const [isEditing, setIsEditing] = (0, import_react25.useState)(false);
|
|
8788
|
+
const [value, setValue] = (0, import_react25.useState)(children);
|
|
8789
|
+
const [previousValue, setPreviousValue] = (0, import_react25.useState)(children);
|
|
8790
|
+
const [headingHeight, setHeadingHeight] = (0, import_react25.useState)("60");
|
|
8791
|
+
const headingRef = (0, import_react25.useRef)(null);
|
|
8762
8792
|
const handleSetEditing = (editing) => {
|
|
8763
8793
|
if (editingDisabled) return;
|
|
8764
8794
|
if (editing && headingRef.current) {
|
|
@@ -8844,12 +8874,12 @@ var EditableHeading = ({
|
|
|
8844
8874
|
};
|
|
8845
8875
|
|
|
8846
8876
|
// src/components/Form/Form.tsx
|
|
8847
|
-
var
|
|
8877
|
+
var import_react27 = require("react");
|
|
8848
8878
|
var import_styled_components47 = __toESM(require("styled-components"));
|
|
8849
8879
|
var import_type_guards27 = require("@wistia/type-guards");
|
|
8850
8880
|
|
|
8851
8881
|
// src/components/Stack/Stack.tsx
|
|
8852
|
-
var
|
|
8882
|
+
var import_react26 = require("react");
|
|
8853
8883
|
var import_styled_components46 = __toESM(require("styled-components"));
|
|
8854
8884
|
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
8855
8885
|
var DEFAULT_ELEMENT4 = "div";
|
|
@@ -8859,7 +8889,7 @@ var StyledStack = import_styled_components46.default.div`
|
|
|
8859
8889
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
8860
8890
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
8861
8891
|
`;
|
|
8862
|
-
var StackComponent = (0,
|
|
8892
|
+
var StackComponent = (0, import_react26.forwardRef)(
|
|
8863
8893
|
({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
|
|
8864
8894
|
const responsiveGap = useResponsiveProp(gap);
|
|
8865
8895
|
const responsiveDirection = useResponsiveProp(direction);
|
|
@@ -8888,7 +8918,7 @@ var StyledForm = import_styled_components47.default.form`
|
|
|
8888
8918
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
8889
8919
|
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
8890
8920
|
`;
|
|
8891
|
-
var FormContext = (0,
|
|
8921
|
+
var FormContext = (0, import_react27.createContext)({
|
|
8892
8922
|
values: {},
|
|
8893
8923
|
errors: {},
|
|
8894
8924
|
hasSubmitted: false,
|
|
@@ -8904,11 +8934,11 @@ var FormComponent = ({
|
|
|
8904
8934
|
fullWidth = false,
|
|
8905
8935
|
...props
|
|
8906
8936
|
}, forwardedRef) => {
|
|
8907
|
-
const [errors, setErrors] = (0,
|
|
8908
|
-
const [hasSubmitted, setHasSubmitted] = (0,
|
|
8909
|
-
const innerRef = (0,
|
|
8937
|
+
const [errors, setErrors] = (0, import_react27.useState)({});
|
|
8938
|
+
const [hasSubmitted, setHasSubmitted] = (0, import_react27.useState)(false);
|
|
8939
|
+
const innerRef = (0, import_react27.useRef)();
|
|
8910
8940
|
const ref = forwardedRef ?? innerRef;
|
|
8911
|
-
const autoId = (0,
|
|
8941
|
+
const autoId = (0, import_react27.useId)();
|
|
8912
8942
|
const id = props.id ?? autoId;
|
|
8913
8943
|
const handleValidate = (nextFormData) => {
|
|
8914
8944
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
@@ -8950,7 +8980,7 @@ var FormComponent = ({
|
|
|
8950
8980
|
void action(null);
|
|
8951
8981
|
}
|
|
8952
8982
|
};
|
|
8953
|
-
const context = (0,
|
|
8983
|
+
const context = (0, import_react27.useMemo)(() => {
|
|
8954
8984
|
return {
|
|
8955
8985
|
values,
|
|
8956
8986
|
errors,
|
|
@@ -8979,15 +9009,15 @@ var FormComponent = ({
|
|
|
8979
9009
|
);
|
|
8980
9010
|
};
|
|
8981
9011
|
FormComponent.displayName = "Form";
|
|
8982
|
-
var Form = (0,
|
|
9012
|
+
var Form = (0, import_react27.forwardRef)(FormComponent);
|
|
8983
9013
|
|
|
8984
9014
|
// src/components/Form/useFormState.tsx
|
|
8985
|
-
var
|
|
9015
|
+
var import_react28 = require("react");
|
|
8986
9016
|
var useFormState = (action, initialData = {}) => {
|
|
8987
|
-
const [data, setData] = (0,
|
|
8988
|
-
const [isPending, setIsPending] = (0,
|
|
8989
|
-
const [error, setError] = (0,
|
|
8990
|
-
const formAction = (0,
|
|
9017
|
+
const [data, setData] = (0, import_react28.useState)(initialData);
|
|
9018
|
+
const [isPending, setIsPending] = (0, import_react28.useState)(false);
|
|
9019
|
+
const [error, setError] = (0, import_react28.useState)(null);
|
|
9020
|
+
const formAction = (0, import_react28.useCallback)(
|
|
8991
9021
|
async (nextFormData) => {
|
|
8992
9022
|
if (nextFormData === null) {
|
|
8993
9023
|
setData(initialData);
|
|
@@ -9018,15 +9048,15 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9018
9048
|
};
|
|
9019
9049
|
|
|
9020
9050
|
// src/components/Form/FormErrorSummary.tsx
|
|
9021
|
-
var
|
|
9051
|
+
var import_react29 = require("react");
|
|
9022
9052
|
var import_type_guards28 = require("@wistia/type-guards");
|
|
9023
9053
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
9024
9054
|
var ErrorItem = ({ name, error, formId }) => {
|
|
9025
9055
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
9026
9056
|
};
|
|
9027
9057
|
var FormErrorSummary = ({ description }) => {
|
|
9028
|
-
const ref = (0,
|
|
9029
|
-
const { formId, errors, hasSubmitted } = (0,
|
|
9058
|
+
const ref = (0, import_react29.useRef)(null);
|
|
9059
|
+
const { formId, errors, hasSubmitted } = (0, import_react29.useContext)(FormContext);
|
|
9030
9060
|
const isValid = Object.keys(errors).length === 0;
|
|
9031
9061
|
if (isValid || !hasSubmitted) {
|
|
9032
9062
|
return null;
|
|
@@ -9056,7 +9086,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9056
9086
|
};
|
|
9057
9087
|
|
|
9058
9088
|
// src/components/FormField/FormField.tsx
|
|
9059
|
-
var
|
|
9089
|
+
var import_react32 = require("react");
|
|
9060
9090
|
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9061
9091
|
var import_type_guards29 = require("@wistia/type-guards");
|
|
9062
9092
|
|
|
@@ -9121,11 +9151,11 @@ var Label = ({
|
|
|
9121
9151
|
Label.displayName = "Label";
|
|
9122
9152
|
|
|
9123
9153
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9124
|
-
var
|
|
9154
|
+
var import_react31 = require("react");
|
|
9125
9155
|
|
|
9126
9156
|
// src/components/FormGroup/FormGroup.tsx
|
|
9127
9157
|
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9128
|
-
var
|
|
9158
|
+
var import_react30 = require("react");
|
|
9129
9159
|
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
9130
9160
|
var StyledFieldset = import_styled_components49.default.fieldset`
|
|
9131
9161
|
border: 0;
|
|
@@ -9134,7 +9164,7 @@ var StyledLegend = import_styled_components49.default.legend`
|
|
|
9134
9164
|
margin-bottom: var(--space-01);
|
|
9135
9165
|
`;
|
|
9136
9166
|
var FormGroup = ({ children, label, ...props }) => {
|
|
9137
|
-
const ref = (0,
|
|
9167
|
+
const ref = (0, import_react30.useRef)();
|
|
9138
9168
|
return /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(
|
|
9139
9169
|
Stack,
|
|
9140
9170
|
{
|
|
@@ -9159,7 +9189,7 @@ FormGroup.displayName = "FormGroup";
|
|
|
9159
9189
|
|
|
9160
9190
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9161
9191
|
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
9162
|
-
var CheckboxGroupContext = (0,
|
|
9192
|
+
var CheckboxGroupContext = (0, import_react31.createContext)(null);
|
|
9163
9193
|
var CheckboxGroup = ({
|
|
9164
9194
|
children,
|
|
9165
9195
|
name,
|
|
@@ -9167,7 +9197,7 @@ var CheckboxGroup = ({
|
|
|
9167
9197
|
value,
|
|
9168
9198
|
...props
|
|
9169
9199
|
}) => {
|
|
9170
|
-
const context = (0,
|
|
9200
|
+
const context = (0, import_react31.useMemo)(() => {
|
|
9171
9201
|
return {
|
|
9172
9202
|
name,
|
|
9173
9203
|
onChange
|
|
@@ -9245,8 +9275,8 @@ var FormField = ({
|
|
|
9245
9275
|
id,
|
|
9246
9276
|
...props
|
|
9247
9277
|
}) => {
|
|
9248
|
-
const formState = (0,
|
|
9249
|
-
const checkboxGroup = (0,
|
|
9278
|
+
const formState = (0, import_react32.useContext)(FormContext);
|
|
9279
|
+
const checkboxGroup = (0, import_react32.useContext)(CheckboxGroupContext);
|
|
9250
9280
|
const isIntegratedLabel = children.type === Checkbox;
|
|
9251
9281
|
const computedId = id ?? `${formState.formId}-${name}`;
|
|
9252
9282
|
const computedError = error ?? formState.errors[name];
|
|
@@ -9281,7 +9311,7 @@ var FormField = ({
|
|
|
9281
9311
|
"aria-describedby": (0, import_type_guards29.isNotNil)(error) ? `${computedId}-error` : void 0
|
|
9282
9312
|
};
|
|
9283
9313
|
}
|
|
9284
|
-
|
|
9314
|
+
import_react32.Children.only(children);
|
|
9285
9315
|
return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
|
|
9286
9316
|
StyledFormField,
|
|
9287
9317
|
{
|
|
@@ -9289,7 +9319,7 @@ var FormField = ({
|
|
|
9289
9319
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
9290
9320
|
children: [
|
|
9291
9321
|
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
9292
|
-
(0,
|
|
9322
|
+
(0, import_react32.cloneElement)(children, childProps),
|
|
9293
9323
|
(0, import_type_guards29.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(import_jsx_runtime221.Fragment, { children: [
|
|
9294
9324
|
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", {}),
|
|
9295
9325
|
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
@@ -9307,9 +9337,9 @@ var FormField = ({
|
|
|
9307
9337
|
FormField.displayName = "FormField";
|
|
9308
9338
|
|
|
9309
9339
|
// src/components/FormGroup/RadioGroup.tsx
|
|
9310
|
-
var
|
|
9340
|
+
var import_react33 = require("react");
|
|
9311
9341
|
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
9312
|
-
var RadioGroupContext = (0,
|
|
9342
|
+
var RadioGroupContext = (0, import_react33.createContext)(null);
|
|
9313
9343
|
var RadioGroup = ({
|
|
9314
9344
|
children,
|
|
9315
9345
|
name,
|
|
@@ -9317,7 +9347,7 @@ var RadioGroup = ({
|
|
|
9317
9347
|
value,
|
|
9318
9348
|
...props
|
|
9319
9349
|
}) => {
|
|
9320
|
-
const context = (0,
|
|
9350
|
+
const context = (0, import_react33.useMemo)(() => {
|
|
9321
9351
|
return {
|
|
9322
9352
|
name,
|
|
9323
9353
|
onChange
|
|
@@ -9328,7 +9358,7 @@ var RadioGroup = ({
|
|
|
9328
9358
|
RadioGroup.displayName = "RadioGroup";
|
|
9329
9359
|
|
|
9330
9360
|
// src/components/IconButton/IconButton.tsx
|
|
9331
|
-
var
|
|
9361
|
+
var import_react34 = require("react");
|
|
9332
9362
|
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9333
9363
|
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
9334
9364
|
var StyledButton2 = (0, import_styled_components51.default)(Button)`
|
|
@@ -9345,7 +9375,7 @@ var StyledButton2 = (0, import_styled_components51.default)(Button)`
|
|
|
9345
9375
|
align-items: center;
|
|
9346
9376
|
line-height: 1;
|
|
9347
9377
|
`;
|
|
9348
|
-
var IconButton = (0,
|
|
9378
|
+
var IconButton = (0, import_react34.forwardRef)(
|
|
9349
9379
|
({ children, label, size = "md", ...props }, ref) => {
|
|
9350
9380
|
const responsiveSize = useResponsiveProp(size);
|
|
9351
9381
|
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
@@ -9356,7 +9386,7 @@ var IconButton = (0, import_react33.forwardRef)(
|
|
|
9356
9386
|
"aria-label": label,
|
|
9357
9387
|
"data-wistia-ui-icon-button": true,
|
|
9358
9388
|
size: responsiveSize,
|
|
9359
|
-
children: (0,
|
|
9389
|
+
children: (0, import_react34.cloneElement)(import_react34.Children.only(children), {
|
|
9360
9390
|
size: responsiveSize
|
|
9361
9391
|
})
|
|
9362
9392
|
}
|
|
@@ -9418,12 +9448,12 @@ Image.displayName = "Image";
|
|
|
9418
9448
|
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9419
9449
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
9420
9450
|
var import_type_guards31 = require("@wistia/type-guards");
|
|
9421
|
-
var
|
|
9451
|
+
var import_react36 = require("react");
|
|
9422
9452
|
|
|
9423
9453
|
// src/components/Menu/MenuContext.tsx
|
|
9424
|
-
var
|
|
9425
|
-
var MenuContext = (0,
|
|
9426
|
-
var useMenuContext = () => (0,
|
|
9454
|
+
var import_react35 = require("react");
|
|
9455
|
+
var MenuContext = (0, import_react35.createContext)({ compact: false });
|
|
9456
|
+
var useMenuContext = () => (0, import_react35.useContext)(MenuContext);
|
|
9427
9457
|
|
|
9428
9458
|
// src/components/Menu/Menu.tsx
|
|
9429
9459
|
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
@@ -9527,7 +9557,7 @@ var Menu = ({
|
|
|
9527
9557
|
onInteractOutside,
|
|
9528
9558
|
...props
|
|
9529
9559
|
}) => {
|
|
9530
|
-
const contextValue = (0,
|
|
9560
|
+
const contextValue = (0, import_react36.useMemo)(() => ({ compact }), [compact]);
|
|
9531
9561
|
let controlProps = {
|
|
9532
9562
|
...(0, import_type_guards31.isNotNil)(onOpenChange) && (0, import_type_guards31.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
9533
9563
|
};
|
|
@@ -9601,13 +9631,13 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
9601
9631
|
MenuLabel.displayName = "MenuLabel";
|
|
9602
9632
|
|
|
9603
9633
|
// src/components/Menu/SubMenu.tsx
|
|
9604
|
-
var
|
|
9634
|
+
var import_react38 = require("react");
|
|
9605
9635
|
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9606
9636
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
9607
9637
|
var import_type_guards33 = require("@wistia/type-guards");
|
|
9608
9638
|
|
|
9609
9639
|
// src/components/Menu/MenuItemButton.tsx
|
|
9610
|
-
var
|
|
9640
|
+
var import_react37 = require("react");
|
|
9611
9641
|
var import_styled_components55 = __toESM(require("styled-components"));
|
|
9612
9642
|
var import_type_guards32 = require("@wistia/type-guards");
|
|
9613
9643
|
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
@@ -9684,7 +9714,7 @@ var StyledBadgeContainer = import_styled_components55.default.div`
|
|
|
9684
9714
|
font-size: var(--wui-typography-label-4-size);
|
|
9685
9715
|
color: var(--wui-color-text-secondary);
|
|
9686
9716
|
`;
|
|
9687
|
-
var MenuItemButton = (0,
|
|
9717
|
+
var MenuItemButton = (0, import_react37.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
9688
9718
|
let { colorScheme, badge } = props;
|
|
9689
9719
|
if (appearance === "dangerous") {
|
|
9690
9720
|
if ((0, import_type_guards32.isNotUndefined)(colorScheme)) {
|
|
@@ -9780,7 +9810,7 @@ var SubMenu = ({
|
|
|
9780
9810
|
...props
|
|
9781
9811
|
}) => {
|
|
9782
9812
|
const { isSmAndUp } = useMq();
|
|
9783
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
9813
|
+
const [isExpanded, setIsExpanded] = (0, import_react38.useState)(false);
|
|
9784
9814
|
const { compact } = useMenuContext();
|
|
9785
9815
|
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
9786
9816
|
/* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
@@ -9809,10 +9839,10 @@ var SubMenu = ({
|
|
|
9809
9839
|
SubMenu.displayName = "SubMenu";
|
|
9810
9840
|
|
|
9811
9841
|
// src/components/Menu/MenuItem.tsx
|
|
9812
|
-
var
|
|
9842
|
+
var import_react39 = require("react");
|
|
9813
9843
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
9814
9844
|
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
9815
|
-
var MenuItem = (0,
|
|
9845
|
+
var MenuItem = (0, import_react39.forwardRef)(
|
|
9816
9846
|
({ onSelect = () => null, ...props }, ref) => {
|
|
9817
9847
|
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
9818
9848
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
@@ -9962,7 +9992,7 @@ var CheckboxMenuItem = ({
|
|
|
9962
9992
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
9963
9993
|
|
|
9964
9994
|
// src/components/Modal/Modal.tsx
|
|
9965
|
-
var
|
|
9995
|
+
var import_react43 = require("react");
|
|
9966
9996
|
var import_styled_components62 = __toESM(require("styled-components"));
|
|
9967
9997
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
9968
9998
|
var import_type_guards35 = require("@wistia/type-guards");
|
|
@@ -10022,19 +10052,19 @@ var ModalHeader = ({
|
|
|
10022
10052
|
};
|
|
10023
10053
|
|
|
10024
10054
|
// src/components/Modal/ModalContent.tsx
|
|
10025
|
-
var
|
|
10055
|
+
var import_react41 = require("react");
|
|
10026
10056
|
var import_styled_components60 = __toESM(require("styled-components"));
|
|
10027
10057
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
10028
10058
|
|
|
10029
10059
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
10030
|
-
var
|
|
10060
|
+
var import_react40 = require("react");
|
|
10031
10061
|
var import_type_guards34 = require("@wistia/type-guards");
|
|
10032
10062
|
var useFocusRestore = () => {
|
|
10033
|
-
const previouslyFocusedRef = (0,
|
|
10034
|
-
(0,
|
|
10063
|
+
const previouslyFocusedRef = (0, import_react40.useRef)(null);
|
|
10064
|
+
(0, import_react40.useEffect)(() => {
|
|
10035
10065
|
previouslyFocusedRef.current = document.activeElement;
|
|
10036
10066
|
}, []);
|
|
10037
|
-
(0,
|
|
10067
|
+
(0, import_react40.useEffect)(() => {
|
|
10038
10068
|
return () => {
|
|
10039
10069
|
if ((0, import_type_guards34.isNotNil)(previouslyFocusedRef.current)) {
|
|
10040
10070
|
setTimeout(() => {
|
|
@@ -10088,7 +10118,7 @@ var StyledModalContent = (0, import_styled_components60.default)(import_react_di
|
|
|
10088
10118
|
}
|
|
10089
10119
|
}
|
|
10090
10120
|
`;
|
|
10091
|
-
var ModalContent = (0,
|
|
10121
|
+
var ModalContent = (0, import_react41.forwardRef)(
|
|
10092
10122
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
10093
10123
|
useFocusRestore();
|
|
10094
10124
|
return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
|
|
@@ -10106,7 +10136,7 @@ var ModalContent = (0, import_react40.forwardRef)(
|
|
|
10106
10136
|
);
|
|
10107
10137
|
|
|
10108
10138
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
10109
|
-
var
|
|
10139
|
+
var import_react42 = require("react");
|
|
10110
10140
|
var import_styled_components61 = __toESM(require("styled-components"));
|
|
10111
10141
|
var import_jsx_runtime237 = require("react/jsx-runtime");
|
|
10112
10142
|
var backdropAnimationDuration = 150;
|
|
@@ -10144,7 +10174,7 @@ var BackdropComponent = import_styled_components61.default.div`
|
|
|
10144
10174
|
}
|
|
10145
10175
|
}
|
|
10146
10176
|
`;
|
|
10147
|
-
var Backdrop = (0,
|
|
10177
|
+
var Backdrop = (0, import_react42.forwardRef)(
|
|
10148
10178
|
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
10149
10179
|
BackdropComponent,
|
|
10150
10180
|
{
|
|
@@ -10166,7 +10196,7 @@ var ModalBody = import_styled_components62.default.div`
|
|
|
10166
10196
|
display: flex;
|
|
10167
10197
|
order: 2;
|
|
10168
10198
|
`;
|
|
10169
|
-
var Modal = (0,
|
|
10199
|
+
var Modal = (0, import_react43.forwardRef)(
|
|
10170
10200
|
({
|
|
10171
10201
|
children,
|
|
10172
10202
|
fullHeight = false,
|
|
@@ -10368,7 +10398,7 @@ var ProgressBar = ({
|
|
|
10368
10398
|
ProgressBar.displayName = "ProgressBar";
|
|
10369
10399
|
|
|
10370
10400
|
// src/components/Radio/Radio.tsx
|
|
10371
|
-
var
|
|
10401
|
+
var import_react44 = require("react");
|
|
10372
10402
|
var import_styled_components65 = __toESM(require("styled-components"));
|
|
10373
10403
|
var import_type_guards38 = require("@wistia/type-guards");
|
|
10374
10404
|
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
@@ -10391,7 +10421,7 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
|
10391
10421
|
)
|
|
10392
10422
|
}
|
|
10393
10423
|
);
|
|
10394
|
-
var
|
|
10424
|
+
var sizeSmall2 = import_styled_components65.css`
|
|
10395
10425
|
width: 14px;
|
|
10396
10426
|
height: 14px;
|
|
10397
10427
|
min-width: 14px;
|
|
@@ -10402,7 +10432,7 @@ var inputSizeSmall2 = import_styled_components65.css`
|
|
|
10402
10432
|
height: 7px;
|
|
10403
10433
|
}
|
|
10404
10434
|
`;
|
|
10405
|
-
var
|
|
10435
|
+
var sizeMedium2 = import_styled_components65.css`
|
|
10406
10436
|
width: 16px;
|
|
10407
10437
|
height: 16px;
|
|
10408
10438
|
min-width: 16px;
|
|
@@ -10413,7 +10443,7 @@ var inputSizeMedium2 = import_styled_components65.css`
|
|
|
10413
10443
|
height: 8px;
|
|
10414
10444
|
}
|
|
10415
10445
|
`;
|
|
10416
|
-
var
|
|
10446
|
+
var sizeLarge2 = import_styled_components65.css`
|
|
10417
10447
|
width: 20px;
|
|
10418
10448
|
height: 20px;
|
|
10419
10449
|
min-width: 20px;
|
|
@@ -10425,9 +10455,9 @@ var inputSizeLarge2 = import_styled_components65.css`
|
|
|
10425
10455
|
}
|
|
10426
10456
|
`;
|
|
10427
10457
|
var getSizeCss2 = (size) => {
|
|
10428
|
-
if (size === "sm") return
|
|
10429
|
-
if (size === "lg") return
|
|
10430
|
-
return
|
|
10458
|
+
if (size === "sm") return sizeSmall2;
|
|
10459
|
+
if (size === "lg") return sizeLarge2;
|
|
10460
|
+
return sizeMedium2;
|
|
10431
10461
|
};
|
|
10432
10462
|
var StyledRadioWrapper = import_styled_components65.default.div`
|
|
10433
10463
|
display: flex;
|
|
@@ -10471,7 +10501,7 @@ var StyledHiddenRadioInput = import_styled_components65.default.input`
|
|
|
10471
10501
|
display: block;
|
|
10472
10502
|
}
|
|
10473
10503
|
`;
|
|
10474
|
-
var Radio = (0,
|
|
10504
|
+
var Radio = (0, import_react44.forwardRef)(
|
|
10475
10505
|
({
|
|
10476
10506
|
checked,
|
|
10477
10507
|
disabled = false,
|
|
@@ -10486,7 +10516,7 @@ var Radio = (0, import_react43.forwardRef)(
|
|
|
10486
10516
|
hideLabel = false,
|
|
10487
10517
|
...props
|
|
10488
10518
|
}, ref) => {
|
|
10489
|
-
const generatedId = (0,
|
|
10519
|
+
const generatedId = (0, import_react44.useId)();
|
|
10490
10520
|
const computedId = (0, import_type_guards38.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
10491
10521
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsxs)(
|
|
10492
10522
|
StyledRadioWrapper,
|
|
@@ -10536,22 +10566,22 @@ var Radio = (0, import_react43.forwardRef)(
|
|
|
10536
10566
|
Radio.displayName = "Radio";
|
|
10537
10567
|
|
|
10538
10568
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10539
|
-
var
|
|
10569
|
+
var import_react48 = require("react");
|
|
10540
10570
|
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10541
10571
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
10542
10572
|
var import_type_guards39 = require("@wistia/type-guards");
|
|
10543
10573
|
|
|
10544
10574
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10545
|
-
var
|
|
10575
|
+
var import_react45 = require("react");
|
|
10546
10576
|
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
10547
|
-
var SelectedItemMeasurementsContext = (0,
|
|
10577
|
+
var SelectedItemMeasurementsContext = (0, import_react45.createContext)(
|
|
10548
10578
|
null
|
|
10549
10579
|
);
|
|
10550
10580
|
var SelectedItemMeasurementsProvider = ({
|
|
10551
10581
|
children
|
|
10552
10582
|
}) => {
|
|
10553
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0,
|
|
10554
|
-
const contextValue = (0,
|
|
10583
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react45.useState)(null);
|
|
10584
|
+
const contextValue = (0, import_react45.useMemo)(
|
|
10555
10585
|
() => ({
|
|
10556
10586
|
setSelectedItemMeasurements,
|
|
10557
10587
|
selectedItemMeasurements
|
|
@@ -10561,7 +10591,7 @@ var SelectedItemMeasurementsProvider = ({
|
|
|
10561
10591
|
return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10562
10592
|
};
|
|
10563
10593
|
var useSelectedItemMeasurements = () => {
|
|
10564
|
-
const context = (0,
|
|
10594
|
+
const context = (0, import_react45.useContext)(SelectedItemMeasurementsContext);
|
|
10565
10595
|
if (context === null) {
|
|
10566
10596
|
throw new Error(
|
|
10567
10597
|
"useSelectedItemMeasurements must be used within a SelectedItemMeasurementsProvider"
|
|
@@ -10571,15 +10601,15 @@ var useSelectedItemMeasurements = () => {
|
|
|
10571
10601
|
};
|
|
10572
10602
|
|
|
10573
10603
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10574
|
-
var
|
|
10604
|
+
var import_react47 = require("react");
|
|
10575
10605
|
var import_styled_components66 = __toESM(require("styled-components"));
|
|
10576
10606
|
|
|
10577
10607
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
10578
|
-
var
|
|
10579
|
-
var SegmentedControlValueContext = (0,
|
|
10608
|
+
var import_react46 = require("react");
|
|
10609
|
+
var SegmentedControlValueContext = (0, import_react46.createContext)(null);
|
|
10580
10610
|
var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
|
|
10581
10611
|
var useSegmentedControlValue = () => {
|
|
10582
|
-
const context = (0,
|
|
10612
|
+
const context = (0, import_react46.useContext)(SegmentedControlValueContext);
|
|
10583
10613
|
if (context === null) {
|
|
10584
10614
|
throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
|
|
10585
10615
|
}
|
|
@@ -10603,7 +10633,7 @@ var SelectedItemIndicatorDiv = import_styled_components66.default.div`
|
|
|
10603
10633
|
var SelectedItemIndicator = () => {
|
|
10604
10634
|
const selectedValue = useSegmentedControlValue();
|
|
10605
10635
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10606
|
-
const selectedItemIndicatorStyle = (0,
|
|
10636
|
+
const selectedItemIndicatorStyle = (0, import_react47.useMemo)(
|
|
10607
10637
|
() => selectedItemMeasurements != null ? {
|
|
10608
10638
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
10609
10639
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -10641,7 +10671,7 @@ var segmentedControlStyles = import_styled_components67.css`
|
|
|
10641
10671
|
var StyledSegmentedControl = (0, import_styled_components67.default)(import_react_toggle_group.Root)`
|
|
10642
10672
|
${segmentedControlStyles}
|
|
10643
10673
|
`;
|
|
10644
|
-
var SegmentedControl = (0,
|
|
10674
|
+
var SegmentedControl = (0, import_react48.forwardRef)(
|
|
10645
10675
|
({
|
|
10646
10676
|
children,
|
|
10647
10677
|
disabled = false,
|
|
@@ -10676,7 +10706,7 @@ var SegmentedControl = (0, import_react47.forwardRef)(
|
|
|
10676
10706
|
SegmentedControl.displayName = "SegmentedControl";
|
|
10677
10707
|
|
|
10678
10708
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10679
|
-
var
|
|
10709
|
+
var import_react49 = require("react");
|
|
10680
10710
|
var import_styled_components68 = __toESM(require("styled-components"));
|
|
10681
10711
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
10682
10712
|
var import_type_guards41 = require("@wistia/type-guards");
|
|
@@ -10759,11 +10789,11 @@ var segmentedControlItemStyles = import_styled_components68.css`
|
|
|
10759
10789
|
var StyledSegmentedControlItem = (0, import_styled_components68.default)(import_react_toggle_group2.Item)`
|
|
10760
10790
|
${segmentedControlItemStyles}
|
|
10761
10791
|
`;
|
|
10762
|
-
var SegmentedControlItem = (0,
|
|
10792
|
+
var SegmentedControlItem = (0, import_react49.forwardRef)(
|
|
10763
10793
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
10764
10794
|
const selectedValue = useSegmentedControlValue();
|
|
10765
10795
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10766
|
-
const buttonRef = (0,
|
|
10796
|
+
const buttonRef = (0, import_react49.useRef)(null);
|
|
10767
10797
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
10768
10798
|
const handleClick = (event) => {
|
|
10769
10799
|
const target = event.target;
|
|
@@ -10772,7 +10802,7 @@ var SegmentedControlItem = (0, import_react48.forwardRef)(
|
|
|
10772
10802
|
event.preventDefault();
|
|
10773
10803
|
}
|
|
10774
10804
|
};
|
|
10775
|
-
(0,
|
|
10805
|
+
(0, import_react49.useEffect)(() => {
|
|
10776
10806
|
const buttonElem = buttonRef.current;
|
|
10777
10807
|
if (!buttonElem) {
|
|
10778
10808
|
return void 0;
|
|
@@ -10818,7 +10848,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
|
10818
10848
|
|
|
10819
10849
|
// src/components/Select/Select.tsx
|
|
10820
10850
|
var import_react_select = require("@radix-ui/react-select");
|
|
10821
|
-
var
|
|
10851
|
+
var import_react50 = require("react");
|
|
10822
10852
|
var import_styled_components69 = __toESM(require("styled-components"));
|
|
10823
10853
|
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
10824
10854
|
var StyledTrigger = (0, import_styled_components69.default)(import_react_select.Trigger)`
|
|
@@ -10887,7 +10917,7 @@ var StyledContent3 = (0, import_styled_components69.default)(import_react_select
|
|
|
10887
10917
|
max-height: var(--radix-select-content-available-height);
|
|
10888
10918
|
z-index: var(--wui-zindex-select);
|
|
10889
10919
|
`;
|
|
10890
|
-
var Select = (0,
|
|
10920
|
+
var Select = (0, import_react50.forwardRef)(
|
|
10891
10921
|
({
|
|
10892
10922
|
colorScheme = "inherit",
|
|
10893
10923
|
children,
|
|
@@ -10936,7 +10966,7 @@ Select.displayName = "Select";
|
|
|
10936
10966
|
|
|
10937
10967
|
// src/components/Select/SelectOption.tsx
|
|
10938
10968
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
10939
|
-
var
|
|
10969
|
+
var import_react51 = require("react");
|
|
10940
10970
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
10941
10971
|
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
10942
10972
|
var StyledItem = (0, import_styled_components70.default)(import_react_select2.Item)`
|
|
@@ -10965,7 +10995,7 @@ var StyledItem = (0, import_styled_components70.default)(import_react_select2.It
|
|
|
10965
10995
|
var StyledIconContainer = import_styled_components70.default.span`
|
|
10966
10996
|
width: 12px;
|
|
10967
10997
|
`;
|
|
10968
|
-
var SelectOption = (0,
|
|
10998
|
+
var SelectOption = (0, import_react51.forwardRef)(
|
|
10969
10999
|
({ children, ...props }, forwardedRef) => {
|
|
10970
11000
|
return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(
|
|
10971
11001
|
StyledItem,
|
|
@@ -11009,20 +11039,183 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11009
11039
|
] });
|
|
11010
11040
|
};
|
|
11011
11041
|
|
|
11012
|
-
// src/components/
|
|
11042
|
+
// src/components/Switch/Switch.tsx
|
|
11043
|
+
var import_react52 = require("react");
|
|
11013
11044
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
11045
|
+
var import_type_guards42 = require("@wistia/type-guards");
|
|
11014
11046
|
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
11015
|
-
var
|
|
11047
|
+
var sizeSmall3 = import_styled_components72.css`
|
|
11048
|
+
--wui-size-small-width: 24px;
|
|
11049
|
+
--wui-size-small-height: 14px;
|
|
11050
|
+
|
|
11051
|
+
width: var(--wui-size-small-width);
|
|
11052
|
+
height: var(--wui-size-small-height);
|
|
11053
|
+
min-width: var(--wui-size-small-width);
|
|
11054
|
+
min-height: var(--wui-size-small-height);
|
|
11055
|
+
border-radius: calc(var(--wui-size-small-height) / 2);
|
|
11056
|
+
|
|
11057
|
+
&::after {
|
|
11058
|
+
width: calc(var(--wui-size-small-width) / 2);
|
|
11059
|
+
height: calc(var(--wui-size-small-width) / 2);
|
|
11060
|
+
}
|
|
11061
|
+
`;
|
|
11062
|
+
var sizeMedium3 = import_styled_components72.css`
|
|
11063
|
+
--wui-size-medium-width: 32px;
|
|
11064
|
+
--wui-size-medium-height: 18px;
|
|
11065
|
+
|
|
11066
|
+
width: var(--wui-size-medium-width);
|
|
11067
|
+
height: var(--wui-size-medium-height);
|
|
11068
|
+
min-width: var(--wui-size-medium-width);
|
|
11069
|
+
min-height: var(--wui-size-medium-height);
|
|
11070
|
+
border-radius: calc(var(--wui-size-medium-height) / 2);
|
|
11071
|
+
|
|
11072
|
+
&::after {
|
|
11073
|
+
width: calc(var(--wui-size-medium-width) / 2);
|
|
11074
|
+
height: calc(var(--wui-size-medium-width) / 2);
|
|
11075
|
+
}
|
|
11076
|
+
`;
|
|
11077
|
+
var sizeLarge3 = import_styled_components72.css`
|
|
11078
|
+
--wui-size-large-width: 40px;
|
|
11079
|
+
--wui-size-large-height: 22px;
|
|
11080
|
+
|
|
11081
|
+
width: var(--wui-size-large-width);
|
|
11082
|
+
height: var(--wui-size-large-height);
|
|
11083
|
+
min-width: var(--wui-size-large-width);
|
|
11084
|
+
min-height: var(--wui-size-large-height);
|
|
11085
|
+
border-radius: calc(var(--wui-size-large-height) / 2);
|
|
11086
|
+
|
|
11087
|
+
&::after {
|
|
11088
|
+
width: calc(var(--wui-size-large-width) / 2);
|
|
11089
|
+
height: calc(var(--wui-size-large-width) / 2);
|
|
11090
|
+
}
|
|
11091
|
+
`;
|
|
11092
|
+
var getSizeCss3 = (size) => {
|
|
11093
|
+
if (size === "sm") return sizeSmall3;
|
|
11094
|
+
if (size === "lg") return sizeLarge3;
|
|
11095
|
+
return sizeMedium3;
|
|
11096
|
+
};
|
|
11097
|
+
var StyledSwitchWrapper = import_styled_components72.default.div`
|
|
11098
|
+
display: flex;
|
|
11099
|
+
margin: 0;
|
|
11100
|
+
|
|
11101
|
+
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
11102
|
+
user-select: none;
|
|
11103
|
+
`;
|
|
11104
|
+
var StyledSwitchInput = import_styled_components72.default.div`
|
|
11105
|
+
${({ $size }) => getSizeCss3($size)}
|
|
11106
|
+
line-height: 0;
|
|
11107
|
+
margin: 0;
|
|
11108
|
+
display: grid;
|
|
11109
|
+
place-content: center;
|
|
11110
|
+
align-self: flex-start;
|
|
11111
|
+
position: relative;
|
|
11112
|
+
transition: all 0.2s ease-in-out;
|
|
11113
|
+
border-width: 1px;
|
|
11114
|
+
border-style: solid;
|
|
11115
|
+
border-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-border-disabled)" : "var(--wui-color-border)"}; /* "off state" border */
|
|
11116
|
+
|
|
11117
|
+
background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-surface-secondary)"}; /* "off state" background */
|
|
11118
|
+
|
|
11119
|
+
&::after {
|
|
11120
|
+
content: '';
|
|
11121
|
+
position: absolute;
|
|
11122
|
+
left: 0;
|
|
11123
|
+
top: 50%;
|
|
11124
|
+
transform: translateY(-50%);
|
|
11125
|
+
border-radius: 50%;
|
|
11126
|
+
box-shadow: 1px 0 1px rgb(0 0 0 / 10%); /* "off state" shadow - cast horizontally right */
|
|
11127
|
+
background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill-white)"}; /* "off state" dot color */
|
|
11128
|
+
|
|
11129
|
+
transition: all 0.2s ease-in-out;
|
|
11130
|
+
}
|
|
11131
|
+
`;
|
|
11132
|
+
var StyledHiddenSwitchInput = import_styled_components72.default.input`
|
|
11133
|
+
${visuallyHiddenStyle}
|
|
11134
|
+
|
|
11135
|
+
/* toggles display of faux-input background-color and toggle position */
|
|
11136
|
+
&:checked + label [data-wui-faux-input='true'] {
|
|
11137
|
+
border-color: ${({ disabled }) => disabled ? void 0 : "var(--wui-color-bg-fill)"}; /* "on state" border */
|
|
11138
|
+
|
|
11139
|
+
background-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill)"}; /* "on state" background */
|
|
11140
|
+
|
|
11141
|
+
&::after {
|
|
11142
|
+
transform: translate(calc(100% - 2px), -50%); /* 2px is the border width */
|
|
11143
|
+
box-shadow: -1px 0 1px rgb(0 0 0 / 10%); /* "on state" shadow - cast horizontally left */
|
|
11144
|
+
background-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill-white)"}; /* "on state" dot color */
|
|
11145
|
+
}
|
|
11146
|
+
}
|
|
11147
|
+
`;
|
|
11148
|
+
var Switch = (0, import_react52.forwardRef)(
|
|
11149
|
+
({
|
|
11150
|
+
checked,
|
|
11151
|
+
disabled = false,
|
|
11152
|
+
id,
|
|
11153
|
+
label,
|
|
11154
|
+
description,
|
|
11155
|
+
name,
|
|
11156
|
+
onChange,
|
|
11157
|
+
size = "md",
|
|
11158
|
+
value,
|
|
11159
|
+
required = false,
|
|
11160
|
+
hideLabel = false,
|
|
11161
|
+
...props
|
|
11162
|
+
}, ref) => {
|
|
11163
|
+
const generatedId = (0, import_react52.useId)();
|
|
11164
|
+
const computedId = (0, import_type_guards42.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11166
|
+
/* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
11167
|
+
StyledHiddenSwitchInput,
|
|
11168
|
+
{
|
|
11169
|
+
...props,
|
|
11170
|
+
ref,
|
|
11171
|
+
checked,
|
|
11172
|
+
disabled,
|
|
11173
|
+
id: computedId,
|
|
11174
|
+
name,
|
|
11175
|
+
onChange,
|
|
11176
|
+
required,
|
|
11177
|
+
type: "checkbox",
|
|
11178
|
+
value
|
|
11179
|
+
}
|
|
11180
|
+
),
|
|
11181
|
+
/* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
11182
|
+
FormControlLabel,
|
|
11183
|
+
{
|
|
11184
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
11185
|
+
StyledSwitchInput,
|
|
11186
|
+
{
|
|
11187
|
+
$disabled: disabled,
|
|
11188
|
+
$size: size,
|
|
11189
|
+
"data-testid": "wui-faux-input",
|
|
11190
|
+
"data-wui-faux-input": "true"
|
|
11191
|
+
}
|
|
11192
|
+
),
|
|
11193
|
+
description,
|
|
11194
|
+
disabled,
|
|
11195
|
+
hideLabel,
|
|
11196
|
+
htmlFor: computedId,
|
|
11197
|
+
label
|
|
11198
|
+
}
|
|
11199
|
+
)
|
|
11200
|
+
] });
|
|
11201
|
+
}
|
|
11202
|
+
);
|
|
11203
|
+
Switch.displayName = "Switch";
|
|
11204
|
+
|
|
11205
|
+
// src/components/Table/Table.tsx
|
|
11206
|
+
var import_styled_components73 = __toESM(require("styled-components"));
|
|
11207
|
+
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
11208
|
+
var StyledTable = import_styled_components73.default.table`
|
|
11016
11209
|
width: 100%;
|
|
11017
11210
|
border-collapse: collapse;
|
|
11018
11211
|
|
|
11019
|
-
${({ $striped }) => $striped &&
|
|
11212
|
+
${({ $striped }) => $striped && import_styled_components73.css`
|
|
11020
11213
|
tbody tr:nth-child(even) {
|
|
11021
11214
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
11022
11215
|
}
|
|
11023
11216
|
`}
|
|
11024
11217
|
|
|
11025
|
-
${({ $divided }) => $divided &&
|
|
11218
|
+
${({ $divided }) => $divided && import_styled_components73.css`
|
|
11026
11219
|
tr {
|
|
11027
11220
|
border-bottom: 1px solid var(--wui-color-border);
|
|
11028
11221
|
}
|
|
@@ -11034,7 +11227,7 @@ var Table = ({
|
|
|
11034
11227
|
divided = false,
|
|
11035
11228
|
...props
|
|
11036
11229
|
}) => {
|
|
11037
|
-
return /* @__PURE__ */ (0,
|
|
11230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
|
|
11038
11231
|
StyledTable,
|
|
11039
11232
|
{
|
|
11040
11233
|
$divided: divided,
|
|
@@ -11046,88 +11239,88 @@ var Table = ({
|
|
|
11046
11239
|
};
|
|
11047
11240
|
|
|
11048
11241
|
// src/components/Table/TableBody.tsx
|
|
11049
|
-
var
|
|
11242
|
+
var import_styled_components74 = __toESM(require("styled-components"));
|
|
11050
11243
|
|
|
11051
11244
|
// src/components/Table/TableSectionContext.ts
|
|
11052
|
-
var
|
|
11053
|
-
var TableSectionContext = (0,
|
|
11245
|
+
var import_react53 = require("react");
|
|
11246
|
+
var TableSectionContext = (0, import_react53.createContext)(null);
|
|
11054
11247
|
|
|
11055
11248
|
// src/components/Table/TableBody.tsx
|
|
11056
|
-
var
|
|
11057
|
-
var StyledTbody =
|
|
11249
|
+
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
11250
|
+
var StyledTbody = import_styled_components74.default.tbody``;
|
|
11058
11251
|
var TableBody = ({ children, ...props }) => {
|
|
11059
|
-
return /* @__PURE__ */ (0,
|
|
11252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(StyledTbody, { ...props, children }) });
|
|
11060
11253
|
};
|
|
11061
11254
|
|
|
11062
11255
|
// src/components/Table/TableCell.tsx
|
|
11063
|
-
var
|
|
11064
|
-
var
|
|
11065
|
-
var
|
|
11066
|
-
var sharedStyles =
|
|
11256
|
+
var import_react54 = require("react");
|
|
11257
|
+
var import_styled_components75 = __toESM(require("styled-components"));
|
|
11258
|
+
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11259
|
+
var sharedStyles = import_styled_components75.css`
|
|
11067
11260
|
color: var(--wui-color-text);
|
|
11068
11261
|
padding: var(--wui-space-02);
|
|
11069
11262
|
text-align: left;
|
|
11070
11263
|
`;
|
|
11071
|
-
var StyledTh =
|
|
11264
|
+
var StyledTh = import_styled_components75.default.th`
|
|
11072
11265
|
${sharedStyles}
|
|
11073
11266
|
font-size: var(--wui-typography-body-4-size);
|
|
11074
11267
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
11075
11268
|
line-height: var(--wui-typography-body-4-line-height);
|
|
11076
11269
|
`;
|
|
11077
|
-
var StyledTd =
|
|
11270
|
+
var StyledTd = import_styled_components75.default.td`
|
|
11078
11271
|
${sharedStyles}
|
|
11079
11272
|
font-size: var(--wui-typography-body-2-size);
|
|
11080
11273
|
font-weight: var(--wui-typography-body-2-weight);
|
|
11081
11274
|
line-height: var(--wui-typography-body-2-line-height);
|
|
11082
11275
|
`;
|
|
11083
11276
|
var TableCell = ({ children, ...props }) => {
|
|
11084
|
-
const section = (0,
|
|
11277
|
+
const section = (0, import_react54.useContext)(TableSectionContext);
|
|
11085
11278
|
if (section === "head") {
|
|
11086
|
-
return /* @__PURE__ */ (0,
|
|
11279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledTh, { ...props, children });
|
|
11087
11280
|
}
|
|
11088
|
-
return /* @__PURE__ */ (0,
|
|
11281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledTd, { ...props, children });
|
|
11089
11282
|
};
|
|
11090
11283
|
|
|
11091
11284
|
// src/components/Table/TableFooter.tsx
|
|
11092
|
-
var
|
|
11093
|
-
var
|
|
11094
|
-
var StyledTfoot =
|
|
11285
|
+
var import_styled_components76 = __toESM(require("styled-components"));
|
|
11286
|
+
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
11287
|
+
var StyledTfoot = import_styled_components76.default.tfoot``;
|
|
11095
11288
|
var TableFooter = ({ children, ...props }) => {
|
|
11096
|
-
return /* @__PURE__ */ (0,
|
|
11289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledTfoot, { ...props, children }) });
|
|
11097
11290
|
};
|
|
11098
11291
|
|
|
11099
11292
|
// src/components/Table/TableHead.tsx
|
|
11100
|
-
var
|
|
11101
|
-
var
|
|
11102
|
-
var StyledThead =
|
|
11293
|
+
var import_styled_components77 = __toESM(require("styled-components"));
|
|
11294
|
+
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
11295
|
+
var StyledThead = import_styled_components77.default.thead``;
|
|
11103
11296
|
var TableHead = ({ children, ...props }) => {
|
|
11104
|
-
return /* @__PURE__ */ (0,
|
|
11297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(StyledThead, { ...props, children }) });
|
|
11105
11298
|
};
|
|
11106
11299
|
|
|
11107
11300
|
// src/components/Table/TableRow.tsx
|
|
11108
|
-
var
|
|
11109
|
-
var
|
|
11110
|
-
var StyledTr =
|
|
11301
|
+
var import_styled_components78 = __toESM(require("styled-components"));
|
|
11302
|
+
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
11303
|
+
var StyledTr = import_styled_components78.default.tr``;
|
|
11111
11304
|
var TableRow = ({ children, ...props }) => {
|
|
11112
|
-
return /* @__PURE__ */ (0,
|
|
11305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(StyledTr, { ...props, children });
|
|
11113
11306
|
};
|
|
11114
11307
|
|
|
11115
11308
|
// src/components/Tabs/Tabs.tsx
|
|
11116
|
-
var
|
|
11309
|
+
var import_react59 = require("react");
|
|
11117
11310
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
11118
|
-
var
|
|
11119
|
-
var
|
|
11311
|
+
var import_type_guards44 = require("@wistia/type-guards");
|
|
11312
|
+
var import_styled_components83 = __toESM(require("styled-components"));
|
|
11120
11313
|
|
|
11121
11314
|
// src/components/Tabs/TabPanel.tsx
|
|
11122
|
-
var
|
|
11315
|
+
var import_styled_components79 = __toESM(require("styled-components"));
|
|
11123
11316
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
11124
|
-
var
|
|
11125
|
-
var StyledTabPanel = (0,
|
|
11317
|
+
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
11318
|
+
var StyledTabPanel = (0, import_styled_components79.default)(import_react_tabs.Content)`
|
|
11126
11319
|
display: flex;
|
|
11127
11320
|
flex-direction: column;
|
|
11128
11321
|
`;
|
|
11129
11322
|
var TabPanel = ({ children, value, ...props }) => {
|
|
11130
|
-
return /* @__PURE__ */ (0,
|
|
11323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
|
|
11131
11324
|
StyledTabPanel,
|
|
11132
11325
|
{
|
|
11133
11326
|
value,
|
|
@@ -11139,10 +11332,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
11139
11332
|
TabPanel.displayName = "TabPanel";
|
|
11140
11333
|
|
|
11141
11334
|
// src/components/Tabs/TabList.tsx
|
|
11142
|
-
var
|
|
11335
|
+
var import_styled_components80 = __toESM(require("styled-components"));
|
|
11143
11336
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
11144
|
-
var
|
|
11145
|
-
var StyledTabList = (0,
|
|
11337
|
+
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
11338
|
+
var StyledTabList = (0, import_styled_components80.default)(import_react_tabs2.List)`
|
|
11146
11339
|
${segmentedControlStyles}
|
|
11147
11340
|
|
|
11148
11341
|
margin-bottom: var(--wui-space-04);
|
|
@@ -11155,7 +11348,7 @@ var TabList = ({
|
|
|
11155
11348
|
ariaLabel,
|
|
11156
11349
|
...props
|
|
11157
11350
|
}) => {
|
|
11158
|
-
return /* @__PURE__ */ (0,
|
|
11351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
11159
11352
|
StyledTabList,
|
|
11160
11353
|
{
|
|
11161
11354
|
$fullWidth: fullWidth,
|
|
@@ -11168,17 +11361,17 @@ var TabList = ({
|
|
|
11168
11361
|
TabList.displayName = "TabList";
|
|
11169
11362
|
|
|
11170
11363
|
// src/components/Tabs/TabItem.tsx
|
|
11171
|
-
var
|
|
11172
|
-
var
|
|
11364
|
+
var import_react56 = require("react");
|
|
11365
|
+
var import_styled_components81 = __toESM(require("styled-components"));
|
|
11173
11366
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
11174
|
-
var
|
|
11367
|
+
var import_type_guards43 = require("@wistia/type-guards");
|
|
11175
11368
|
|
|
11176
11369
|
// src/components/Tabs/useTabsValue.tsx
|
|
11177
|
-
var
|
|
11178
|
-
var TabsValueContext = (0,
|
|
11370
|
+
var import_react55 = require("react");
|
|
11371
|
+
var TabsValueContext = (0, import_react55.createContext)(null);
|
|
11179
11372
|
var TabsValueProvider = TabsValueContext.Provider;
|
|
11180
11373
|
var useTabsValue = () => {
|
|
11181
|
-
const context = (0,
|
|
11374
|
+
const context = (0, import_react55.useContext)(TabsValueContext);
|
|
11182
11375
|
if (context === null) {
|
|
11183
11376
|
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
11184
11377
|
}
|
|
@@ -11186,21 +11379,21 @@ var useTabsValue = () => {
|
|
|
11186
11379
|
};
|
|
11187
11380
|
|
|
11188
11381
|
// src/components/Tabs/TabItem.tsx
|
|
11189
|
-
var
|
|
11190
|
-
var StyledTabItem = (0,
|
|
11382
|
+
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
11383
|
+
var StyledTabItem = (0, import_styled_components81.default)(import_react_tabs3.Trigger)`
|
|
11191
11384
|
${segmentedControlItemStyles}
|
|
11192
11385
|
|
|
11193
11386
|
&:focus-visible {
|
|
11194
11387
|
outline: none;
|
|
11195
11388
|
}
|
|
11196
11389
|
`;
|
|
11197
|
-
var TabItem = (0,
|
|
11390
|
+
var TabItem = (0, import_react56.forwardRef)(
|
|
11198
11391
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11199
11392
|
const selectedValue = useTabsValue();
|
|
11200
11393
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11201
|
-
const buttonRef = (0,
|
|
11394
|
+
const buttonRef = (0, import_react56.useRef)(null);
|
|
11202
11395
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11203
|
-
(0,
|
|
11396
|
+
(0, import_react56.useEffect)(() => {
|
|
11204
11397
|
const buttonElem = buttonRef.current;
|
|
11205
11398
|
if (!buttonElem) {
|
|
11206
11399
|
return void 0;
|
|
@@ -11225,12 +11418,12 @@ var TabItem = (0, import_react54.forwardRef)(
|
|
|
11225
11418
|
resizeObserver.disconnect();
|
|
11226
11419
|
};
|
|
11227
11420
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
11228
|
-
return /* @__PURE__ */ (0,
|
|
11421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)(
|
|
11229
11422
|
StyledTabItem,
|
|
11230
11423
|
{
|
|
11231
11424
|
ref: combinedRef,
|
|
11232
|
-
$hasLabel: (0,
|
|
11233
|
-
"aria-label": (0,
|
|
11425
|
+
$hasLabel: (0, import_type_guards43.isNotNil)(label),
|
|
11426
|
+
"aria-label": (0, import_type_guards43.isNotNil)(label) ? void 0 : ariaLabel,
|
|
11234
11427
|
disabled,
|
|
11235
11428
|
value,
|
|
11236
11429
|
children: [
|
|
@@ -11244,16 +11437,16 @@ var TabItem = (0, import_react54.forwardRef)(
|
|
|
11244
11437
|
TabItem.displayName = "TabItem";
|
|
11245
11438
|
|
|
11246
11439
|
// src/components/Tabs/extractTabItems.ts
|
|
11247
|
-
var
|
|
11440
|
+
var import_react57 = require("react");
|
|
11248
11441
|
var extractTabItems = (children) => {
|
|
11249
11442
|
const tabItems = [];
|
|
11250
|
-
|
|
11251
|
-
if (!(0,
|
|
11443
|
+
import_react57.Children.forEach(children, (child) => {
|
|
11444
|
+
if (!(0, import_react57.isValidElement)(child)) {
|
|
11252
11445
|
return;
|
|
11253
11446
|
}
|
|
11254
11447
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
11255
11448
|
tabItems.push(child);
|
|
11256
|
-
} else if (child.type ===
|
|
11449
|
+
} else if (child.type === import_react57.Fragment) {
|
|
11257
11450
|
const fragmentElement = child;
|
|
11258
11451
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
11259
11452
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -11266,10 +11459,10 @@ var extractTabItems = (children) => {
|
|
|
11266
11459
|
};
|
|
11267
11460
|
|
|
11268
11461
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
11269
|
-
var
|
|
11270
|
-
var
|
|
11271
|
-
var
|
|
11272
|
-
var TabsSelectedItemIndicatorDiv = (0,
|
|
11462
|
+
var import_react58 = require("react");
|
|
11463
|
+
var import_styled_components82 = __toESM(require("styled-components"));
|
|
11464
|
+
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
11465
|
+
var TabsSelectedItemIndicatorDiv = (0, import_styled_components82.default)(SelectedItemIndicatorDiv)`
|
|
11273
11466
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
11274
11467
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
11275
11468
|
}
|
|
@@ -11277,7 +11470,7 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components81.default)(Selec
|
|
|
11277
11470
|
var SelectedItemIndicator2 = () => {
|
|
11278
11471
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11279
11472
|
const selectedValue = useTabsValue();
|
|
11280
|
-
const selectedItemIndicatorStyle = (0,
|
|
11473
|
+
const selectedItemIndicatorStyle = (0, import_react58.useMemo)(
|
|
11281
11474
|
() => selectedItemMeasurements != null ? {
|
|
11282
11475
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11283
11476
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -11288,7 +11481,7 @@ var SelectedItemIndicator2 = () => {
|
|
|
11288
11481
|
if (selectedValue == null) {
|
|
11289
11482
|
return null;
|
|
11290
11483
|
}
|
|
11291
|
-
return /* @__PURE__ */ (0,
|
|
11484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
11292
11485
|
TabsSelectedItemIndicatorDiv,
|
|
11293
11486
|
{
|
|
11294
11487
|
style: {
|
|
@@ -11301,24 +11494,24 @@ var SelectedItemIndicator2 = () => {
|
|
|
11301
11494
|
};
|
|
11302
11495
|
|
|
11303
11496
|
// src/components/Tabs/Tabs.tsx
|
|
11304
|
-
var
|
|
11305
|
-
var TabsContainer =
|
|
11497
|
+
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
11498
|
+
var TabsContainer = import_styled_components83.default.div`
|
|
11306
11499
|
display: flex;
|
|
11307
11500
|
flex-direction: column;
|
|
11308
11501
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11309
11502
|
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11310
11503
|
`;
|
|
11311
|
-
var StickyTabContent =
|
|
11504
|
+
var StickyTabContent = import_styled_components83.default.div`
|
|
11312
11505
|
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
11313
11506
|
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
11314
11507
|
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11315
11508
|
`;
|
|
11316
|
-
var StyledTabsRoot = (0,
|
|
11509
|
+
var StyledTabsRoot = (0, import_styled_components83.default)(import_react_tabs4.Root)`
|
|
11317
11510
|
display: flex;
|
|
11318
11511
|
flex-direction: column;
|
|
11319
11512
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11320
11513
|
`;
|
|
11321
|
-
var Tabs = (0,
|
|
11514
|
+
var Tabs = (0, import_react59.forwardRef)(
|
|
11322
11515
|
({
|
|
11323
11516
|
children,
|
|
11324
11517
|
fullWidth = true,
|
|
@@ -11330,13 +11523,13 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11330
11523
|
...otherProps
|
|
11331
11524
|
}, ref) => {
|
|
11332
11525
|
const tabItems = extractTabItems(children);
|
|
11333
|
-
const [internalSelectedValue, setInternalSelectedValue] = (0,
|
|
11526
|
+
const [internalSelectedValue, setInternalSelectedValue] = (0, import_react59.useState)(defaultSelectedValue);
|
|
11334
11527
|
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
11335
11528
|
defaultValue: defaultSelectedValue,
|
|
11336
11529
|
onValueChange: setInternalSelectedValue
|
|
11337
11530
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
11338
11531
|
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
11339
|
-
return /* @__PURE__ */ (0,
|
|
11532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
|
|
11340
11533
|
StyledTabsRoot,
|
|
11341
11534
|
{
|
|
11342
11535
|
ref,
|
|
@@ -11344,14 +11537,14 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11344
11537
|
activationMode: "automatic",
|
|
11345
11538
|
...otherProps,
|
|
11346
11539
|
...modeProps,
|
|
11347
|
-
children: /* @__PURE__ */ (0,
|
|
11348
|
-
/* @__PURE__ */ (0,
|
|
11540
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
11541
|
+
/* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(
|
|
11349
11542
|
TabList,
|
|
11350
11543
|
{
|
|
11351
11544
|
ariaLabel,
|
|
11352
11545
|
fullWidth,
|
|
11353
11546
|
children: [
|
|
11354
|
-
/* @__PURE__ */ (0,
|
|
11547
|
+
/* @__PURE__ */ (0, import_jsx_runtime260.jsx)(SelectedItemIndicator2, {}),
|
|
11355
11548
|
tabItems.map((tab) => {
|
|
11356
11549
|
const {
|
|
11357
11550
|
value,
|
|
@@ -11360,8 +11553,8 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11360
11553
|
label,
|
|
11361
11554
|
"aria-label": ariaLabelForTab
|
|
11362
11555
|
} = tab.props;
|
|
11363
|
-
if ((0,
|
|
11364
|
-
return /* @__PURE__ */ (0,
|
|
11556
|
+
if ((0, import_type_guards44.isNil)(icon)) {
|
|
11557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
|
|
11365
11558
|
TabItem,
|
|
11366
11559
|
{
|
|
11367
11560
|
disabled,
|
|
@@ -11371,8 +11564,8 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11371
11564
|
value
|
|
11372
11565
|
);
|
|
11373
11566
|
}
|
|
11374
|
-
if ((0,
|
|
11375
|
-
return /* @__PURE__ */ (0,
|
|
11567
|
+
if ((0, import_type_guards44.isNotNil)(label)) {
|
|
11568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
|
|
11376
11569
|
TabItem,
|
|
11377
11570
|
{
|
|
11378
11571
|
disabled,
|
|
@@ -11383,8 +11576,8 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11383
11576
|
value
|
|
11384
11577
|
);
|
|
11385
11578
|
}
|
|
11386
|
-
if ((0,
|
|
11387
|
-
return /* @__PURE__ */ (0,
|
|
11579
|
+
if ((0, import_type_guards44.isNotNil)(ariaLabelForTab)) {
|
|
11580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
|
|
11388
11581
|
TabItem,
|
|
11389
11582
|
{
|
|
11390
11583
|
"aria-label": ariaLabelForTab,
|
|
@@ -11400,7 +11593,7 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11400
11593
|
]
|
|
11401
11594
|
}
|
|
11402
11595
|
),
|
|
11403
|
-
/* @__PURE__ */ (0,
|
|
11596
|
+
/* @__PURE__ */ (0, import_jsx_runtime260.jsx)(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
|
|
11404
11597
|
TabPanel,
|
|
11405
11598
|
{
|
|
11406
11599
|
value: tab.props.value,
|
|
@@ -11416,19 +11609,19 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11416
11609
|
Tabs.displayName = "Tabs";
|
|
11417
11610
|
|
|
11418
11611
|
// src/components/Tabs/Tab.tsx
|
|
11419
|
-
var
|
|
11420
|
-
var
|
|
11421
|
-
var Tab = (0,
|
|
11422
|
-
return /* @__PURE__ */ (0,
|
|
11612
|
+
var import_react60 = require("react");
|
|
11613
|
+
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
11614
|
+
var Tab = (0, import_react60.forwardRef)(({ children }, ref) => {
|
|
11615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)("div", { ref, children });
|
|
11423
11616
|
});
|
|
11424
11617
|
Tab.displayName = "Tab";
|
|
11425
11618
|
|
|
11426
11619
|
// src/components/Tag/Tag.tsx
|
|
11427
|
-
var
|
|
11428
|
-
var
|
|
11429
|
-
var
|
|
11430
|
-
var
|
|
11431
|
-
var TagLabel =
|
|
11620
|
+
var import_react61 = require("react");
|
|
11621
|
+
var import_styled_components84 = __toESM(require("styled-components"));
|
|
11622
|
+
var import_type_guards45 = require("@wistia/type-guards");
|
|
11623
|
+
var import_jsx_runtime262 = require("react/jsx-runtime");
|
|
11624
|
+
var TagLabel = import_styled_components84.default.a`
|
|
11432
11625
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11433
11626
|
font-size: var(--wui-typography-label-4-size);
|
|
11434
11627
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -11463,14 +11656,14 @@ var TagLabel = import_styled_components83.default.a`
|
|
|
11463
11656
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11464
11657
|
}
|
|
11465
11658
|
`;
|
|
11466
|
-
var TagDivider =
|
|
11659
|
+
var TagDivider = import_styled_components84.default.div`
|
|
11467
11660
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11468
11661
|
border-left: 1px solid var(--wui-color-border);
|
|
11469
11662
|
display: flex;
|
|
11470
11663
|
height: 14px;
|
|
11471
11664
|
width: 1px;
|
|
11472
11665
|
`;
|
|
11473
|
-
var StyledRemoveButton =
|
|
11666
|
+
var StyledRemoveButton = import_styled_components84.default.button`
|
|
11474
11667
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11475
11668
|
all: unset;
|
|
11476
11669
|
cursor: pointer;
|
|
@@ -11498,7 +11691,7 @@ var StyledRemoveButton = import_styled_components83.default.button`
|
|
|
11498
11691
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11499
11692
|
}
|
|
11500
11693
|
`;
|
|
11501
|
-
var StyledTag =
|
|
11694
|
+
var StyledTag = import_styled_components84.default.div`
|
|
11502
11695
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11503
11696
|
align-items: center;
|
|
11504
11697
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -11511,37 +11704,37 @@ var StyledTag = import_styled_components83.default.div`
|
|
|
11511
11704
|
}
|
|
11512
11705
|
`;
|
|
11513
11706
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
11514
|
-
if ((0,
|
|
11707
|
+
if ((0, import_type_guards45.isNil)(onClickRemove)) {
|
|
11515
11708
|
return null;
|
|
11516
11709
|
}
|
|
11517
|
-
if ((0,
|
|
11710
|
+
if ((0, import_type_guards45.isNil)(onClickRemoveLabel)) {
|
|
11518
11711
|
throw new Error(
|
|
11519
11712
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
11520
11713
|
);
|
|
11521
11714
|
}
|
|
11522
|
-
return /* @__PURE__ */ (0,
|
|
11523
|
-
/* @__PURE__ */ (0,
|
|
11524
|
-
/* @__PURE__ */ (0,
|
|
11715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(import_jsx_runtime262.Fragment, { children: [
|
|
11716
|
+
/* @__PURE__ */ (0, import_jsx_runtime262.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
11717
|
+
/* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
|
|
11525
11718
|
StyledRemoveButton,
|
|
11526
11719
|
{
|
|
11527
11720
|
$colorScheme: colorScheme,
|
|
11528
11721
|
onClick: onClickRemove,
|
|
11529
11722
|
type: "button",
|
|
11530
11723
|
children: [
|
|
11531
|
-
/* @__PURE__ */ (0,
|
|
11724
|
+
/* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
|
|
11532
11725
|
Icon,
|
|
11533
11726
|
{
|
|
11534
11727
|
size: "sm",
|
|
11535
11728
|
type: "close"
|
|
11536
11729
|
}
|
|
11537
11730
|
),
|
|
11538
|
-
/* @__PURE__ */ (0,
|
|
11731
|
+
/* @__PURE__ */ (0, import_jsx_runtime262.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
11539
11732
|
]
|
|
11540
11733
|
}
|
|
11541
11734
|
)
|
|
11542
11735
|
] });
|
|
11543
11736
|
};
|
|
11544
|
-
var Tag = (0,
|
|
11737
|
+
var Tag = (0, import_react61.forwardRef)(
|
|
11545
11738
|
({
|
|
11546
11739
|
onClickRemove,
|
|
11547
11740
|
colorScheme = "inherit",
|
|
@@ -11551,16 +11744,16 @@ var Tag = (0, import_react59.forwardRef)(
|
|
|
11551
11744
|
onClickRemoveLabel,
|
|
11552
11745
|
...otherProps
|
|
11553
11746
|
}, ref) => {
|
|
11554
|
-
const hasIcon = (0,
|
|
11555
|
-
const labelProps = (0,
|
|
11556
|
-
return /* @__PURE__ */ (0,
|
|
11747
|
+
const hasIcon = (0, import_type_guards45.isNotNil)(icon);
|
|
11748
|
+
const labelProps = (0, import_type_guards45.isNotNil)(href) && (0, import_type_guards45.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
11749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
|
|
11557
11750
|
StyledTag,
|
|
11558
11751
|
{
|
|
11559
11752
|
ref,
|
|
11560
11753
|
$colorScheme: colorScheme,
|
|
11561
11754
|
...otherProps,
|
|
11562
11755
|
children: [
|
|
11563
|
-
/* @__PURE__ */ (0,
|
|
11756
|
+
/* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
|
|
11564
11757
|
TagLabel,
|
|
11565
11758
|
{
|
|
11566
11759
|
...labelProps,
|
|
@@ -11571,7 +11764,7 @@ var Tag = (0, import_react59.forwardRef)(
|
|
|
11571
11764
|
]
|
|
11572
11765
|
}
|
|
11573
11766
|
),
|
|
11574
|
-
/* @__PURE__ */ (0,
|
|
11767
|
+
/* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
|
|
11575
11768
|
RemoveButton,
|
|
11576
11769
|
{
|
|
11577
11770
|
colorScheme,
|
|
@@ -11587,26 +11780,26 @@ var Tag = (0, import_react59.forwardRef)(
|
|
|
11587
11780
|
Tag.displayName = "Tag";
|
|
11588
11781
|
|
|
11589
11782
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
11590
|
-
var
|
|
11591
|
-
var
|
|
11592
|
-
var
|
|
11783
|
+
var import_styled_components85 = __toESM(require("styled-components"));
|
|
11784
|
+
var import_type_guards46 = require("@wistia/type-guards");
|
|
11785
|
+
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
11593
11786
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
11594
11787
|
if (iconOnly) {
|
|
11595
|
-
return /* @__PURE__ */ (0,
|
|
11788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
11596
11789
|
"g",
|
|
11597
11790
|
{
|
|
11598
11791
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11599
11792
|
fill: brandmarkColor,
|
|
11600
|
-
children: /* @__PURE__ */ (0,
|
|
11793
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime263.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" })
|
|
11601
11794
|
}
|
|
11602
11795
|
);
|
|
11603
11796
|
}
|
|
11604
|
-
return /* @__PURE__ */ (0,
|
|
11797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
11605
11798
|
"g",
|
|
11606
11799
|
{
|
|
11607
11800
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11608
11801
|
fill: brandmarkColor,
|
|
11609
|
-
children: /* @__PURE__ */ (0,
|
|
11802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime263.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" })
|
|
11610
11803
|
}
|
|
11611
11804
|
);
|
|
11612
11805
|
};
|
|
@@ -11614,12 +11807,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
11614
11807
|
if (iconOnly) {
|
|
11615
11808
|
return null;
|
|
11616
11809
|
}
|
|
11617
|
-
return /* @__PURE__ */ (0,
|
|
11810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
11618
11811
|
"g",
|
|
11619
11812
|
{
|
|
11620
11813
|
"data-testid": "ui-wistia-logo-logotype",
|
|
11621
11814
|
fill: logotypeColor,
|
|
11622
|
-
children: /* @__PURE__ */ (0,
|
|
11815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime263.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" })
|
|
11623
11816
|
}
|
|
11624
11817
|
);
|
|
11625
11818
|
};
|
|
@@ -11629,7 +11822,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
11629
11822
|
}
|
|
11630
11823
|
return "0 0 144 31.47";
|
|
11631
11824
|
};
|
|
11632
|
-
var WistiaLogoComponent =
|
|
11825
|
+
var WistiaLogoComponent = import_styled_components85.default.svg`
|
|
11633
11826
|
height: ${({ height }) => `${height}px`};
|
|
11634
11827
|
|
|
11635
11828
|
/* ensure it will always fit on mobile */
|
|
@@ -11645,12 +11838,12 @@ var WistiaLogoComponent = import_styled_components84.default.svg`
|
|
|
11645
11838
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
11646
11839
|
if ($opticallyCentered) {
|
|
11647
11840
|
if ($iconOnly) {
|
|
11648
|
-
return
|
|
11841
|
+
return import_styled_components85.css`
|
|
11649
11842
|
aspect-ratio: 1;
|
|
11650
11843
|
padding: 11.85% 3.12% 13.91%;
|
|
11651
11844
|
`;
|
|
11652
11845
|
}
|
|
11653
|
-
return
|
|
11846
|
+
return import_styled_components85.css`
|
|
11654
11847
|
aspect-ratio: 127 / 32;
|
|
11655
11848
|
`;
|
|
11656
11849
|
}
|
|
@@ -11687,7 +11880,7 @@ var WistiaLogo = ({
|
|
|
11687
11880
|
};
|
|
11688
11881
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
11689
11882
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
11690
|
-
const Logo = /* @__PURE__ */ (0,
|
|
11883
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
11691
11884
|
WistiaLogoComponent,
|
|
11692
11885
|
{
|
|
11693
11886
|
$hoverColor: hoverColor,
|
|
@@ -11700,14 +11893,14 @@ var WistiaLogo = ({
|
|
|
11700
11893
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11701
11894
|
...otherProps,
|
|
11702
11895
|
children: [
|
|
11703
|
-
/* @__PURE__ */ (0,
|
|
11704
|
-
(0,
|
|
11896
|
+
/* @__PURE__ */ (0, import_jsx_runtime263.jsx)("title", { children: title }),
|
|
11897
|
+
(0, import_type_guards46.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("desc", { children: description }) : null,
|
|
11705
11898
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
11706
11899
|
renderLogotype(logotypeColor, iconOnly)
|
|
11707
11900
|
]
|
|
11708
11901
|
}
|
|
11709
11902
|
);
|
|
11710
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
11903
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("a", { href, children: Logo }) : Logo;
|
|
11711
11904
|
};
|
|
11712
11905
|
WistiaLogo.displayName = "WistiaLogo";
|
|
11713
11906
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -11771,6 +11964,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
11771
11964
|
SelectOptionGroup,
|
|
11772
11965
|
Stack,
|
|
11773
11966
|
SubMenu,
|
|
11967
|
+
Switch,
|
|
11774
11968
|
Tab,
|
|
11775
11969
|
Table,
|
|
11776
11970
|
TableBody,
|
|
@@ -11798,6 +11992,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
11798
11992
|
useFormState,
|
|
11799
11993
|
useImperativeFilePicker,
|
|
11800
11994
|
useKey,
|
|
11995
|
+
useLocalStorage,
|
|
11801
11996
|
useMq,
|
|
11802
11997
|
useToast,
|
|
11803
11998
|
useWindowSize
|