@wistia/ui 0.8.5 → 0.8.6-beta.5e32ee7a.d7d4d10
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 +662 -577
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +109 -97
- package/dist/index.d.ts +109 -97
- package/dist/index.mjs +611 -529
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.8.
|
|
3
|
+
* @license @wistia/ui v0.8.6-beta.5e32ee7a.d7d4d10
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -9884,8 +9884,72 @@ var IconButton = forwardRef13(
|
|
|
9884
9884
|
);
|
|
9885
9885
|
IconButton.displayName = "IconButton";
|
|
9886
9886
|
|
|
9887
|
+
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
9888
|
+
import styled38 from "styled-components";
|
|
9889
|
+
import { forwardRef as forwardRef14, useEffect as useEffect7, useState as useState9 } from "react";
|
|
9890
|
+
import { isFunction as isFunction3 } from "@wistia/type-guards";
|
|
9891
|
+
import { jsx as jsx230 } from "react/jsx-runtime";
|
|
9892
|
+
var StyledInput2 = styled38(Input)`
|
|
9893
|
+
&:not([aria-disabled='true']) {
|
|
9894
|
+
cursor: pointer;
|
|
9895
|
+
}
|
|
9896
|
+
|
|
9897
|
+
&::selection {
|
|
9898
|
+
background-color: transparent;
|
|
9899
|
+
}
|
|
9900
|
+
`;
|
|
9901
|
+
var COPY_SUCCESS_DURATION = 2e3;
|
|
9902
|
+
var InputClickToCopy = forwardRef14(
|
|
9903
|
+
({ value, onCopy, ...props }, ref) => {
|
|
9904
|
+
const [isCopied, setIsCopied] = useState9(false);
|
|
9905
|
+
useEffect7(() => {
|
|
9906
|
+
if (isCopied) {
|
|
9907
|
+
const timeout = setTimeout(() => {
|
|
9908
|
+
setIsCopied(false);
|
|
9909
|
+
}, COPY_SUCCESS_DURATION);
|
|
9910
|
+
return () => {
|
|
9911
|
+
clearTimeout(timeout);
|
|
9912
|
+
};
|
|
9913
|
+
}
|
|
9914
|
+
return () => null;
|
|
9915
|
+
}, [isCopied]);
|
|
9916
|
+
const handleClick = (event) => {
|
|
9917
|
+
event.preventDefault();
|
|
9918
|
+
if (isFunction3(props.onClick)) {
|
|
9919
|
+
props.onClick(event);
|
|
9920
|
+
}
|
|
9921
|
+
void copyToClipboard(value).then(() => {
|
|
9922
|
+
setIsCopied(true);
|
|
9923
|
+
if (isFunction3(onCopy)) {
|
|
9924
|
+
onCopy(value);
|
|
9925
|
+
}
|
|
9926
|
+
return value;
|
|
9927
|
+
});
|
|
9928
|
+
};
|
|
9929
|
+
return /* @__PURE__ */ jsx230(
|
|
9930
|
+
StyledInput2,
|
|
9931
|
+
{
|
|
9932
|
+
"aria-label": "Click to Copy",
|
|
9933
|
+
...props,
|
|
9934
|
+
ref,
|
|
9935
|
+
onClick: handleClick,
|
|
9936
|
+
readOnly: true,
|
|
9937
|
+
rightIcon: isCopied ? /* @__PURE__ */ jsx230(
|
|
9938
|
+
Icon,
|
|
9939
|
+
{
|
|
9940
|
+
colorScheme: "success",
|
|
9941
|
+
type: "checkmark-circle"
|
|
9942
|
+
}
|
|
9943
|
+
) : /* @__PURE__ */ jsx230(Icon, { type: "save-as-copy" }),
|
|
9944
|
+
value
|
|
9945
|
+
}
|
|
9946
|
+
);
|
|
9947
|
+
}
|
|
9948
|
+
);
|
|
9949
|
+
InputClickToCopy.displayName = "InputClickToCopy";
|
|
9950
|
+
|
|
9887
9951
|
// src/components/Menu/Menu.tsx
|
|
9888
|
-
import
|
|
9952
|
+
import styled39, { css as css28, keyframes as keyframes2 } from "styled-components";
|
|
9889
9953
|
import {
|
|
9890
9954
|
DropdownMenu,
|
|
9891
9955
|
DropdownMenuTrigger,
|
|
@@ -9901,7 +9965,7 @@ var MenuContext = createContext5({ compact: false });
|
|
|
9901
9965
|
var useMenuContext = () => useContext4(MenuContext);
|
|
9902
9966
|
|
|
9903
9967
|
// src/components/Menu/Menu.tsx
|
|
9904
|
-
import { jsx as
|
|
9968
|
+
import { jsx as jsx231, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
9905
9969
|
var open = keyframes2`
|
|
9906
9970
|
from {
|
|
9907
9971
|
opacity: 0;
|
|
@@ -9986,7 +10050,7 @@ var menuContentCss = css28`
|
|
|
9986
10050
|
margin: var(--menu-divider-margin) 0;
|
|
9987
10051
|
}
|
|
9988
10052
|
`;
|
|
9989
|
-
var MenuContent =
|
|
10053
|
+
var MenuContent = styled39(DropdownMenuContent)`
|
|
9990
10054
|
${menuContentCss}
|
|
9991
10055
|
`;
|
|
9992
10056
|
var Menu = ({
|
|
@@ -10012,24 +10076,24 @@ var Menu = ({
|
|
|
10012
10076
|
onOpenChange: () => null
|
|
10013
10077
|
};
|
|
10014
10078
|
}
|
|
10015
|
-
return /* @__PURE__ */
|
|
10079
|
+
return /* @__PURE__ */ jsx231(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs25(
|
|
10016
10080
|
DropdownMenu,
|
|
10017
10081
|
{
|
|
10018
10082
|
modal: false,
|
|
10019
10083
|
...controlProps,
|
|
10020
10084
|
children: [
|
|
10021
|
-
/* @__PURE__ */
|
|
10085
|
+
/* @__PURE__ */ jsx231(DropdownMenuTrigger, { asChild: true, children: isNotUndefined10(trigger) ? trigger : /* @__PURE__ */ jsx231(
|
|
10022
10086
|
Button,
|
|
10023
10087
|
{
|
|
10024
10088
|
"aria-expanded": isOpen,
|
|
10025
10089
|
disabled,
|
|
10026
10090
|
forceState: isOpen ? "active" : void 0,
|
|
10027
|
-
rightIcon: /* @__PURE__ */
|
|
10091
|
+
rightIcon: /* @__PURE__ */ jsx231(Icon, { type: "caret-down" }),
|
|
10028
10092
|
...triggerProps,
|
|
10029
10093
|
children: label
|
|
10030
10094
|
}
|
|
10031
10095
|
) }),
|
|
10032
|
-
/* @__PURE__ */
|
|
10096
|
+
/* @__PURE__ */ jsx231(DropdownMenuPortal, { children: /* @__PURE__ */ jsx231(
|
|
10033
10097
|
MenuContent,
|
|
10034
10098
|
{
|
|
10035
10099
|
...props,
|
|
@@ -10049,19 +10113,19 @@ var Menu = ({
|
|
|
10049
10113
|
Menu.displayName = "Menu";
|
|
10050
10114
|
|
|
10051
10115
|
// src/components/Menu/MenuLabel.tsx
|
|
10052
|
-
import
|
|
10116
|
+
import styled40 from "styled-components";
|
|
10053
10117
|
import { DropdownMenuLabel } from "@radix-ui/react-dropdown-menu";
|
|
10054
|
-
import { jsx as
|
|
10055
|
-
var StyledMenuLabel =
|
|
10118
|
+
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
10119
|
+
var StyledMenuLabel = styled40(DropdownMenuLabel)`
|
|
10056
10120
|
padding: var(--wui-space-02);
|
|
10057
10121
|
`;
|
|
10058
10122
|
var MenuLabel = ({ children, ...props }) => {
|
|
10059
|
-
return /* @__PURE__ */
|
|
10123
|
+
return /* @__PURE__ */ jsx232(
|
|
10060
10124
|
StyledMenuLabel,
|
|
10061
10125
|
{
|
|
10062
10126
|
asChild: true,
|
|
10063
10127
|
...props,
|
|
10064
|
-
children: /* @__PURE__ */
|
|
10128
|
+
children: /* @__PURE__ */ jsx232(
|
|
10065
10129
|
Heading,
|
|
10066
10130
|
{
|
|
10067
10131
|
renderAs: "span",
|
|
@@ -10076,8 +10140,8 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
10076
10140
|
MenuLabel.displayName = "MenuLabel";
|
|
10077
10141
|
|
|
10078
10142
|
// src/components/Menu/SubMenu.tsx
|
|
10079
|
-
import { useState as
|
|
10080
|
-
import
|
|
10143
|
+
import { useState as useState10 } from "react";
|
|
10144
|
+
import styled43 from "styled-components";
|
|
10081
10145
|
import {
|
|
10082
10146
|
DropdownMenuPortal as DropdownMenuPortal2,
|
|
10083
10147
|
DropdownMenuSub,
|
|
@@ -10089,11 +10153,11 @@ import {
|
|
|
10089
10153
|
import { isNotNil as isNotNil20 } from "@wistia/type-guards";
|
|
10090
10154
|
|
|
10091
10155
|
// src/components/Menu/MenuItemButton.tsx
|
|
10092
|
-
import { forwardRef as
|
|
10093
|
-
import
|
|
10156
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
10157
|
+
import styled41 from "styled-components";
|
|
10094
10158
|
import { isNotNil as isNotNil19, isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
|
|
10095
|
-
import { jsx as
|
|
10096
|
-
var StyledButton3 =
|
|
10159
|
+
import { jsx as jsx233, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
10160
|
+
var StyledButton3 = styled41(Button)`
|
|
10097
10161
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
10098
10162
|
|
|
10099
10163
|
display: flex;
|
|
@@ -10132,7 +10196,7 @@ var StyledButton3 = styled40(Button)`
|
|
|
10132
10196
|
padding-left: var(--wui-space-04);
|
|
10133
10197
|
}
|
|
10134
10198
|
`;
|
|
10135
|
-
var StyledLeftIconContainer =
|
|
10199
|
+
var StyledLeftIconContainer = styled41.div`
|
|
10136
10200
|
height: var(--menu-item-left-icon-size);
|
|
10137
10201
|
width: var(--menu-item-left-icon-size);
|
|
10138
10202
|
|
|
@@ -10143,7 +10207,7 @@ var StyledLeftIconContainer = styled40.div`
|
|
|
10143
10207
|
}
|
|
10144
10208
|
}
|
|
10145
10209
|
`;
|
|
10146
|
-
var StyledRightIconContainer =
|
|
10210
|
+
var StyledRightIconContainer = styled41.div`
|
|
10147
10211
|
height: var(--menu-item-right-icon-size);
|
|
10148
10212
|
width: var(--menu-item-right-icon-size);
|
|
10149
10213
|
|
|
@@ -10154,19 +10218,19 @@ var StyledRightIconContainer = styled40.div`
|
|
|
10154
10218
|
}
|
|
10155
10219
|
}
|
|
10156
10220
|
`;
|
|
10157
|
-
var StyledLabelAndDescriptionContainer =
|
|
10221
|
+
var StyledLabelAndDescriptionContainer = styled41.div`
|
|
10158
10222
|
display: flex;
|
|
10159
10223
|
flex-direction: column;
|
|
10160
10224
|
gap: var(--menu-label-description-gap);
|
|
10161
10225
|
flex-basis: 100%;
|
|
10162
10226
|
`;
|
|
10163
|
-
var StyledBadgeContainer =
|
|
10227
|
+
var StyledBadgeContainer = styled41.div`
|
|
10164
10228
|
align-self: start;
|
|
10165
10229
|
justify-self: end;
|
|
10166
10230
|
font-size: var(--wui-typography-label-4-size);
|
|
10167
10231
|
color: var(--wui-color-text-secondary);
|
|
10168
10232
|
`;
|
|
10169
|
-
var MenuItemButton =
|
|
10233
|
+
var MenuItemButton = forwardRef15(({ children, appearance, command, icon, ...props }, ref) => {
|
|
10170
10234
|
let { colorScheme, badge } = props;
|
|
10171
10235
|
if (appearance === "dangerous") {
|
|
10172
10236
|
if (isNotUndefined11(colorScheme)) {
|
|
@@ -10175,7 +10239,7 @@ var MenuItemButton = forwardRef14(({ children, appearance, command, icon, ...pro
|
|
|
10175
10239
|
colorScheme = "error";
|
|
10176
10240
|
}
|
|
10177
10241
|
if (appearance === "gated") {
|
|
10178
|
-
badge = /* @__PURE__ */
|
|
10242
|
+
badge = /* @__PURE__ */ jsx233(
|
|
10179
10243
|
Icon,
|
|
10180
10244
|
{
|
|
10181
10245
|
colorScheme: "purple",
|
|
@@ -10197,10 +10261,10 @@ var MenuItemButton = forwardRef14(({ children, appearance, command, icon, ...pro
|
|
|
10197
10261
|
fullWidth: true,
|
|
10198
10262
|
unstyled: true,
|
|
10199
10263
|
children: [
|
|
10200
|
-
props.leftIcon ? /* @__PURE__ */
|
|
10201
|
-
/* @__PURE__ */
|
|
10202
|
-
isNotNil19(badge) || isNotNil19(command) ? /* @__PURE__ */
|
|
10203
|
-
props.rightIcon ? /* @__PURE__ */
|
|
10264
|
+
props.leftIcon ? /* @__PURE__ */ jsx233(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
10265
|
+
/* @__PURE__ */ jsx233(StyledLabelAndDescriptionContainer, { children }),
|
|
10266
|
+
isNotNil19(badge) || isNotNil19(command) ? /* @__PURE__ */ jsx233(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
10267
|
+
props.rightIcon ? /* @__PURE__ */ jsx233(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
10204
10268
|
]
|
|
10205
10269
|
}
|
|
10206
10270
|
);
|
|
@@ -10208,33 +10272,33 @@ var MenuItemButton = forwardRef14(({ children, appearance, command, icon, ...pro
|
|
|
10208
10272
|
MenuItemButton.displayName = "MenuItemButton";
|
|
10209
10273
|
|
|
10210
10274
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
10211
|
-
import
|
|
10212
|
-
import { jsx as
|
|
10213
|
-
var StyledMenuItemLabel =
|
|
10214
|
-
var StyledMenuItemDescription =
|
|
10275
|
+
import styled42 from "styled-components";
|
|
10276
|
+
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
10277
|
+
var StyledMenuItemLabel = styled42.span``;
|
|
10278
|
+
var StyledMenuItemDescription = styled42(Text).attrs({
|
|
10215
10279
|
variant: "body4",
|
|
10216
10280
|
prominence: "secondary"
|
|
10217
10281
|
})``;
|
|
10218
10282
|
var MenuItemLabel = ({ children }) => {
|
|
10219
|
-
return /* @__PURE__ */
|
|
10283
|
+
return /* @__PURE__ */ jsx234(StyledMenuItemLabel, { children });
|
|
10220
10284
|
};
|
|
10221
10285
|
var MenuItemDescription = ({ children }) => {
|
|
10222
|
-
return /* @__PURE__ */
|
|
10286
|
+
return /* @__PURE__ */ jsx234(StyledMenuItemDescription, { children });
|
|
10223
10287
|
};
|
|
10224
10288
|
|
|
10225
10289
|
// src/components/Menu/SubMenu.tsx
|
|
10226
|
-
import { jsx as
|
|
10227
|
-
var SubMenuContent =
|
|
10290
|
+
import { jsx as jsx235, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
10291
|
+
var SubMenuContent = styled43(DropdownMenuSubContent)`
|
|
10228
10292
|
${menuContentCss}
|
|
10229
10293
|
|
|
10230
10294
|
${mq.smAndDown} {
|
|
10231
10295
|
transform: translateX(-100%) !important;
|
|
10232
10296
|
}
|
|
10233
10297
|
`;
|
|
10234
|
-
var StyledMobileSubMenuItems =
|
|
10298
|
+
var StyledMobileSubMenuItems = styled43.div`
|
|
10235
10299
|
margin-left: var(--wui-space-04);
|
|
10236
10300
|
`;
|
|
10237
|
-
var StyledSubTrigger =
|
|
10301
|
+
var StyledSubTrigger = styled43(DropdownMenuSubTrigger)`
|
|
10238
10302
|
outline: none;
|
|
10239
10303
|
|
|
10240
10304
|
&[data-state='open'],
|
|
@@ -10245,12 +10309,12 @@ var StyledSubTrigger = styled42(DropdownMenuSubTrigger)`
|
|
|
10245
10309
|
var SubMenuTrigger = ({ icon, ...props }) => {
|
|
10246
10310
|
const { isSmAndUp } = useMq();
|
|
10247
10311
|
const Trigger4 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
|
|
10248
|
-
return /* @__PURE__ */
|
|
10312
|
+
return /* @__PURE__ */ jsx235(Trigger4, { asChild: true, children: /* @__PURE__ */ jsx235(
|
|
10249
10313
|
MenuItemButton,
|
|
10250
10314
|
{
|
|
10251
10315
|
...props,
|
|
10252
10316
|
leftIcon: icon,
|
|
10253
|
-
rightIcon: /* @__PURE__ */
|
|
10317
|
+
rightIcon: /* @__PURE__ */ jsx235(Icon, { type: "caret-right" })
|
|
10254
10318
|
}
|
|
10255
10319
|
) });
|
|
10256
10320
|
};
|
|
@@ -10262,14 +10326,14 @@ var SubMenu = ({
|
|
|
10262
10326
|
...props
|
|
10263
10327
|
}) => {
|
|
10264
10328
|
const { isSmAndUp } = useMq();
|
|
10265
|
-
const [isExpanded, setIsExpanded] =
|
|
10329
|
+
const [isExpanded, setIsExpanded] = useState10(false);
|
|
10266
10330
|
const { compact } = useMenuContext();
|
|
10267
10331
|
return isSmAndUp ? /* @__PURE__ */ jsxs27(DropdownMenuSub, { onOpenChange, children: [
|
|
10268
10332
|
/* @__PURE__ */ jsxs27(SubMenuTrigger, { ...props, children: [
|
|
10269
|
-
/* @__PURE__ */
|
|
10270
|
-
isNotNil20(description) ? /* @__PURE__ */
|
|
10333
|
+
/* @__PURE__ */ jsx235(MenuItemLabel, { children: label }),
|
|
10334
|
+
isNotNil20(description) ? /* @__PURE__ */ jsx235(MenuItemDescription, { children: description }) : null
|
|
10271
10335
|
] }),
|
|
10272
|
-
/* @__PURE__ */
|
|
10336
|
+
/* @__PURE__ */ jsx235(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx235(SubMenuContent, { $compact: compact, children }) })
|
|
10273
10337
|
] }) : /* @__PURE__ */ jsxs27(DropdownMenuGroup, { children: [
|
|
10274
10338
|
/* @__PURE__ */ jsxs27(
|
|
10275
10339
|
SubMenuTrigger,
|
|
@@ -10280,28 +10344,28 @@ var SubMenu = ({
|
|
|
10280
10344
|
setIsExpanded((prev) => !prev);
|
|
10281
10345
|
},
|
|
10282
10346
|
children: [
|
|
10283
|
-
/* @__PURE__ */
|
|
10284
|
-
/* @__PURE__ */
|
|
10347
|
+
/* @__PURE__ */ jsx235(MenuItemLabel, { children: label }),
|
|
10348
|
+
/* @__PURE__ */ jsx235(MenuItemDescription, { children: description })
|
|
10285
10349
|
]
|
|
10286
10350
|
}
|
|
10287
10351
|
),
|
|
10288
|
-
/* @__PURE__ */
|
|
10352
|
+
/* @__PURE__ */ jsx235(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
10289
10353
|
] });
|
|
10290
10354
|
};
|
|
10291
10355
|
SubMenu.displayName = "SubMenu";
|
|
10292
10356
|
|
|
10293
10357
|
// src/components/Menu/MenuItem.tsx
|
|
10294
|
-
import { forwardRef as
|
|
10358
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
10295
10359
|
import { DropdownMenuItem as DropdownMenuItem2 } from "@radix-ui/react-dropdown-menu";
|
|
10296
|
-
import { jsx as
|
|
10297
|
-
var MenuItem =
|
|
10360
|
+
import { jsx as jsx236 } from "react/jsx-runtime";
|
|
10361
|
+
var MenuItem = forwardRef16(
|
|
10298
10362
|
({ onSelect = () => null, ...props }, ref) => {
|
|
10299
|
-
return /* @__PURE__ */
|
|
10363
|
+
return /* @__PURE__ */ jsx236(
|
|
10300
10364
|
DropdownMenuItem2,
|
|
10301
10365
|
{
|
|
10302
10366
|
asChild: true,
|
|
10303
10367
|
onSelect,
|
|
10304
|
-
children: /* @__PURE__ */
|
|
10368
|
+
children: /* @__PURE__ */ jsx236(
|
|
10305
10369
|
MenuItemButton,
|
|
10306
10370
|
{
|
|
10307
10371
|
...props,
|
|
@@ -10319,10 +10383,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
10319
10383
|
import {
|
|
10320
10384
|
DropdownMenuRadioGroup
|
|
10321
10385
|
} from "@radix-ui/react-dropdown-menu";
|
|
10322
|
-
import { jsx as
|
|
10386
|
+
import { jsx as jsx237, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
10323
10387
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
10324
10388
|
return /* @__PURE__ */ jsxs28(DropdownMenuRadioGroup, { ...props, children: [
|
|
10325
|
-
/* @__PURE__ */
|
|
10389
|
+
/* @__PURE__ */ jsx237(MenuLabel, { children: label }),
|
|
10326
10390
|
children
|
|
10327
10391
|
] });
|
|
10328
10392
|
};
|
|
@@ -10333,11 +10397,11 @@ import {
|
|
|
10333
10397
|
DropdownMenuItemIndicator,
|
|
10334
10398
|
DropdownMenuRadioItem
|
|
10335
10399
|
} from "@radix-ui/react-dropdown-menu";
|
|
10336
|
-
import { jsx as
|
|
10400
|
+
import { jsx as jsx238 } from "react/jsx-runtime";
|
|
10337
10401
|
var RadioMenuItem = ({
|
|
10338
10402
|
onSelect,
|
|
10339
10403
|
value,
|
|
10340
|
-
indicator = /* @__PURE__ */
|
|
10404
|
+
indicator = /* @__PURE__ */ jsx238(
|
|
10341
10405
|
Icon,
|
|
10342
10406
|
{
|
|
10343
10407
|
size: "sm",
|
|
@@ -10347,17 +10411,17 @@ var RadioMenuItem = ({
|
|
|
10347
10411
|
...props
|
|
10348
10412
|
}) => {
|
|
10349
10413
|
const extraProps = onSelect ? { onSelect } : {};
|
|
10350
|
-
return /* @__PURE__ */
|
|
10414
|
+
return /* @__PURE__ */ jsx238(
|
|
10351
10415
|
DropdownMenuRadioItem,
|
|
10352
10416
|
{
|
|
10353
10417
|
...extraProps,
|
|
10354
10418
|
asChild: true,
|
|
10355
10419
|
value,
|
|
10356
|
-
children: /* @__PURE__ */
|
|
10420
|
+
children: /* @__PURE__ */ jsx238(
|
|
10357
10421
|
MenuItemButton,
|
|
10358
10422
|
{
|
|
10359
10423
|
...props,
|
|
10360
|
-
rightIcon: /* @__PURE__ */
|
|
10424
|
+
rightIcon: /* @__PURE__ */ jsx238(DropdownMenuItemIndicator, { children: indicator })
|
|
10361
10425
|
}
|
|
10362
10426
|
)
|
|
10363
10427
|
}
|
|
@@ -10369,7 +10433,7 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
10369
10433
|
import {
|
|
10370
10434
|
DropdownMenuCheckboxItem
|
|
10371
10435
|
} from "@radix-ui/react-dropdown-menu";
|
|
10372
|
-
import { jsx as
|
|
10436
|
+
import { jsx as jsx239, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
10373
10437
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
10374
10438
|
return checked ? /* @__PURE__ */ jsxs29(
|
|
10375
10439
|
"svg",
|
|
@@ -10381,14 +10445,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10381
10445
|
width: "24",
|
|
10382
10446
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10383
10447
|
children: [
|
|
10384
|
-
/* @__PURE__ */
|
|
10448
|
+
/* @__PURE__ */ jsx239(
|
|
10385
10449
|
"path",
|
|
10386
10450
|
{
|
|
10387
10451
|
d: "m4 8c0-2.20914 1.79086-4 4-4h8c2.2091 0 4 1.79086 4 4v8c0 2.2091-1.7909 4-4 4h-8c-2.20914 0-4-1.7909-4-4z",
|
|
10388
10452
|
fill: "#2949e5"
|
|
10389
10453
|
}
|
|
10390
10454
|
),
|
|
10391
|
-
/* @__PURE__ */
|
|
10455
|
+
/* @__PURE__ */ jsx239(
|
|
10392
10456
|
"path",
|
|
10393
10457
|
{
|
|
10394
10458
|
d: "m10.4728 15.1931-3.09523-3.1131c-.18596-.187-.18596-.4902 0-.6773l.67341-.6773c.18596-.187.48749-.187.67344 0l2.08508 2.0971 4.4661-4.49174c.1859-.18703.4875-.18703.6734 0l.6734.67731c.186.18703.186.49027 0 .67731l-5.4762 5.50772c-.1859.187-.4874.187-.6734 0z",
|
|
@@ -10407,14 +10471,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10407
10471
|
width: "24",
|
|
10408
10472
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10409
10473
|
children: [
|
|
10410
|
-
/* @__PURE__ */
|
|
10474
|
+
/* @__PURE__ */ jsx239(
|
|
10411
10475
|
"path",
|
|
10412
10476
|
{
|
|
10413
10477
|
d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
|
|
10414
10478
|
fill: "#fcfcfd"
|
|
10415
10479
|
}
|
|
10416
10480
|
),
|
|
10417
|
-
/* @__PURE__ */
|
|
10481
|
+
/* @__PURE__ */ jsx239(
|
|
10418
10482
|
"path",
|
|
10419
10483
|
{
|
|
10420
10484
|
d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
|
|
@@ -10431,18 +10495,18 @@ var CheckboxMenuItem = ({
|
|
|
10431
10495
|
onCheckedChange,
|
|
10432
10496
|
...props
|
|
10433
10497
|
}) => {
|
|
10434
|
-
return /* @__PURE__ */
|
|
10498
|
+
return /* @__PURE__ */ jsx239(
|
|
10435
10499
|
DropdownMenuCheckboxItem,
|
|
10436
10500
|
{
|
|
10437
10501
|
asChild: true,
|
|
10438
10502
|
checked,
|
|
10439
10503
|
onCheckedChange,
|
|
10440
10504
|
onSelect,
|
|
10441
|
-
children: /* @__PURE__ */
|
|
10505
|
+
children: /* @__PURE__ */ jsx239(
|
|
10442
10506
|
MenuItemButton,
|
|
10443
10507
|
{
|
|
10444
10508
|
...props,
|
|
10445
|
-
leftIcon: /* @__PURE__ */
|
|
10509
|
+
leftIcon: /* @__PURE__ */ jsx239(CheckboxIndicator, { checked })
|
|
10446
10510
|
}
|
|
10447
10511
|
)
|
|
10448
10512
|
}
|
|
@@ -10451,37 +10515,37 @@ var CheckboxMenuItem = ({
|
|
|
10451
10515
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
10452
10516
|
|
|
10453
10517
|
// src/components/Modal/Modal.tsx
|
|
10454
|
-
import { forwardRef as
|
|
10455
|
-
import
|
|
10518
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
10519
|
+
import styled48 from "styled-components";
|
|
10456
10520
|
import { Root as DialogRoot, Portal as DialogPortal } from "@radix-ui/react-dialog";
|
|
10457
10521
|
import { isNotNil as isNotNil22 } from "@wistia/type-guards";
|
|
10458
10522
|
|
|
10459
10523
|
// src/components/Modal/ModalHeader.tsx
|
|
10460
|
-
import
|
|
10524
|
+
import styled45 from "styled-components";
|
|
10461
10525
|
import { Title as DialogTitle } from "@radix-ui/react-dialog";
|
|
10462
10526
|
|
|
10463
10527
|
// src/components/Modal/ModalCloseButton.tsx
|
|
10464
|
-
import
|
|
10528
|
+
import styled44 from "styled-components";
|
|
10465
10529
|
import { Close as DialogClose } from "@radix-ui/react-dialog";
|
|
10466
|
-
import { jsx as
|
|
10467
|
-
var CloseButton =
|
|
10530
|
+
import { jsx as jsx240 } from "react/jsx-runtime";
|
|
10531
|
+
var CloseButton = styled44(DialogClose)`
|
|
10468
10532
|
align-self: start;
|
|
10469
10533
|
`;
|
|
10470
10534
|
var ModalCloseButton = () => {
|
|
10471
|
-
return /* @__PURE__ */
|
|
10535
|
+
return /* @__PURE__ */ jsx240(CloseButton, { asChild: true, children: /* @__PURE__ */ jsx240(
|
|
10472
10536
|
IconButton,
|
|
10473
10537
|
{
|
|
10474
10538
|
label: "Dismiss modal",
|
|
10475
10539
|
size: "sm",
|
|
10476
10540
|
variant: "ghost",
|
|
10477
|
-
children: /* @__PURE__ */
|
|
10541
|
+
children: /* @__PURE__ */ jsx240(Icon, { type: "close" })
|
|
10478
10542
|
}
|
|
10479
10543
|
) });
|
|
10480
10544
|
};
|
|
10481
10545
|
|
|
10482
10546
|
// src/components/Modal/ModalHeader.tsx
|
|
10483
|
-
import { jsx as
|
|
10484
|
-
var Header =
|
|
10547
|
+
import { jsx as jsx241, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
10548
|
+
var Header = styled45.header`
|
|
10485
10549
|
display: flex;
|
|
10486
10550
|
order: 1;
|
|
10487
10551
|
gap: var(--wui-space-01);
|
|
@@ -10492,7 +10556,7 @@ var Header = styled44.header`
|
|
|
10492
10556
|
margin: 0 0 var(--wui-space-03);
|
|
10493
10557
|
}
|
|
10494
10558
|
`;
|
|
10495
|
-
var Title =
|
|
10559
|
+
var Title = styled45(DialogTitle)`
|
|
10496
10560
|
font-family: var(--wui-typography-heading-2-family);
|
|
10497
10561
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
10498
10562
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -10503,27 +10567,27 @@ var ModalHeader = ({
|
|
|
10503
10567
|
hideTitle,
|
|
10504
10568
|
hideCloseButton
|
|
10505
10569
|
}) => {
|
|
10506
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */
|
|
10570
|
+
const TitleComponent = hideTitle ? /* @__PURE__ */ jsx241(ScreenReaderOnly, { children: /* @__PURE__ */ jsx241(Title, { children: title }) }) : /* @__PURE__ */ jsx241(Title, { children: title });
|
|
10507
10571
|
return /* @__PURE__ */ jsxs30(Header, { $hideTitle: hideTitle, children: [
|
|
10508
10572
|
TitleComponent,
|
|
10509
|
-
hideCloseButton ? null : /* @__PURE__ */
|
|
10573
|
+
hideCloseButton ? null : /* @__PURE__ */ jsx241(ModalCloseButton, {})
|
|
10510
10574
|
] });
|
|
10511
10575
|
};
|
|
10512
10576
|
|
|
10513
10577
|
// src/components/Modal/ModalContent.tsx
|
|
10514
|
-
import { forwardRef as
|
|
10515
|
-
import
|
|
10578
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
10579
|
+
import styled46 from "styled-components";
|
|
10516
10580
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
10517
10581
|
|
|
10518
10582
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
10519
|
-
import { useRef as useRef9, useEffect as
|
|
10583
|
+
import { useRef as useRef9, useEffect as useEffect8 } from "react";
|
|
10520
10584
|
import { isNotNil as isNotNil21 } from "@wistia/type-guards";
|
|
10521
10585
|
var useFocusRestore = () => {
|
|
10522
10586
|
const previouslyFocusedRef = useRef9(null);
|
|
10523
|
-
|
|
10587
|
+
useEffect8(() => {
|
|
10524
10588
|
previouslyFocusedRef.current = document.activeElement;
|
|
10525
10589
|
}, []);
|
|
10526
|
-
|
|
10590
|
+
useEffect8(() => {
|
|
10527
10591
|
return () => {
|
|
10528
10592
|
if (isNotNil21(previouslyFocusedRef.current)) {
|
|
10529
10593
|
setTimeout(() => {
|
|
@@ -10535,8 +10599,8 @@ var useFocusRestore = () => {
|
|
|
10535
10599
|
};
|
|
10536
10600
|
|
|
10537
10601
|
// src/components/Modal/ModalContent.tsx
|
|
10538
|
-
import { jsx as
|
|
10539
|
-
var StyledModalContent =
|
|
10602
|
+
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
10603
|
+
var StyledModalContent = styled46(DialogContent)`
|
|
10540
10604
|
background-color: var(--wui-color-bg-app);
|
|
10541
10605
|
box-sizing: border-box;
|
|
10542
10606
|
display: flex;
|
|
@@ -10577,10 +10641,10 @@ var StyledModalContent = styled45(DialogContent)`
|
|
|
10577
10641
|
}
|
|
10578
10642
|
}
|
|
10579
10643
|
`;
|
|
10580
|
-
var ModalContent =
|
|
10644
|
+
var ModalContent = forwardRef17(
|
|
10581
10645
|
({ fullHeight, width, children, ...props }, ref) => {
|
|
10582
10646
|
useFocusRestore();
|
|
10583
|
-
return /* @__PURE__ */
|
|
10647
|
+
return /* @__PURE__ */ jsx242(
|
|
10584
10648
|
StyledModalContent,
|
|
10585
10649
|
{
|
|
10586
10650
|
ref,
|
|
@@ -10595,9 +10659,9 @@ var ModalContent = forwardRef16(
|
|
|
10595
10659
|
);
|
|
10596
10660
|
|
|
10597
10661
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
10598
|
-
import { forwardRef as
|
|
10599
|
-
import
|
|
10600
|
-
import { jsx as
|
|
10662
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
10663
|
+
import styled47 from "styled-components";
|
|
10664
|
+
import { jsx as jsx243 } from "react/jsx-runtime";
|
|
10601
10665
|
var backdropAnimationDuration = 150;
|
|
10602
10666
|
var alignVerticalMap = {
|
|
10603
10667
|
stretch: "normal",
|
|
@@ -10610,7 +10674,7 @@ var alignHorizontalMap = {
|
|
|
10610
10674
|
center: "center",
|
|
10611
10675
|
right: "end"
|
|
10612
10676
|
};
|
|
10613
|
-
var BackdropComponent =
|
|
10677
|
+
var BackdropComponent = styled47.div`
|
|
10614
10678
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
10615
10679
|
animation-name: backdropShow;
|
|
10616
10680
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -10633,8 +10697,8 @@ var BackdropComponent = styled46.div`
|
|
|
10633
10697
|
}
|
|
10634
10698
|
}
|
|
10635
10699
|
`;
|
|
10636
|
-
var Backdrop =
|
|
10637
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */
|
|
10700
|
+
var Backdrop = forwardRef18(
|
|
10701
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ jsx243(
|
|
10638
10702
|
BackdropComponent,
|
|
10639
10703
|
{
|
|
10640
10704
|
ref,
|
|
@@ -10648,14 +10712,14 @@ var Backdrop = forwardRef17(
|
|
|
10648
10712
|
Backdrop.displayName = "Backdrop";
|
|
10649
10713
|
|
|
10650
10714
|
// src/components/Modal/Modal.tsx
|
|
10651
|
-
import { jsx as
|
|
10715
|
+
import { jsx as jsx244, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10652
10716
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
10653
|
-
var ModalBody =
|
|
10717
|
+
var ModalBody = styled48.div`
|
|
10654
10718
|
flex-direction: column;
|
|
10655
10719
|
display: flex;
|
|
10656
10720
|
order: 2;
|
|
10657
10721
|
`;
|
|
10658
|
-
var Modal =
|
|
10722
|
+
var Modal = forwardRef19(
|
|
10659
10723
|
({
|
|
10660
10724
|
children,
|
|
10661
10725
|
fullHeight = false,
|
|
@@ -10668,7 +10732,7 @@ var Modal = forwardRef18(
|
|
|
10668
10732
|
width = DEFAULT_MODAL_WIDTH,
|
|
10669
10733
|
...props
|
|
10670
10734
|
}, ref) => {
|
|
10671
|
-
return /* @__PURE__ */
|
|
10735
|
+
return /* @__PURE__ */ jsx244(
|
|
10672
10736
|
DialogRoot,
|
|
10673
10737
|
{
|
|
10674
10738
|
onOpenChange: (open2) => {
|
|
@@ -10678,7 +10742,7 @@ var Modal = forwardRef18(
|
|
|
10678
10742
|
},
|
|
10679
10743
|
open: isOpen,
|
|
10680
10744
|
children: /* @__PURE__ */ jsxs31(DialogPortal, { children: [
|
|
10681
|
-
/* @__PURE__ */
|
|
10745
|
+
/* @__PURE__ */ jsx244(Backdrop, {}),
|
|
10682
10746
|
/* @__PURE__ */ jsxs31(
|
|
10683
10747
|
ModalContent,
|
|
10684
10748
|
{
|
|
@@ -10695,8 +10759,8 @@ var Modal = forwardRef18(
|
|
|
10695
10759
|
width,
|
|
10696
10760
|
...props,
|
|
10697
10761
|
children: [
|
|
10698
|
-
/* @__PURE__ */
|
|
10699
|
-
/* @__PURE__ */
|
|
10762
|
+
/* @__PURE__ */ jsx244(ModalBody, { children }),
|
|
10763
|
+
/* @__PURE__ */ jsx244(
|
|
10700
10764
|
ModalHeader,
|
|
10701
10765
|
{
|
|
10702
10766
|
hideCloseButton,
|
|
@@ -10716,7 +10780,7 @@ Modal.displayName = "Modal";
|
|
|
10716
10780
|
|
|
10717
10781
|
// src/components/Popover/Popover.tsx
|
|
10718
10782
|
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close } from "@radix-ui/react-popover";
|
|
10719
|
-
import
|
|
10783
|
+
import styled49, { css as css29 } from "styled-components";
|
|
10720
10784
|
|
|
10721
10785
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
10722
10786
|
import { isNotNil as isNotNil23 } from "@wistia/type-guards";
|
|
@@ -10725,8 +10789,8 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
10725
10789
|
};
|
|
10726
10790
|
|
|
10727
10791
|
// src/components/Popover/Popover.tsx
|
|
10728
|
-
import { jsx as
|
|
10729
|
-
var StyledContent2 =
|
|
10792
|
+
import { jsx as jsx245, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
10793
|
+
var StyledContent2 = styled49(Content2)`
|
|
10730
10794
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10731
10795
|
${({ $unstyled }) => !$unstyled && css29`
|
|
10732
10796
|
border-radius: var(--wui-border-radius-02);
|
|
@@ -10762,8 +10826,8 @@ var Popover = ({
|
|
|
10762
10826
|
"--wui-popover-max-height": maxHeight
|
|
10763
10827
|
};
|
|
10764
10828
|
return /* @__PURE__ */ jsxs32(Root2, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
10765
|
-
/* @__PURE__ */
|
|
10766
|
-
/* @__PURE__ */
|
|
10829
|
+
/* @__PURE__ */ jsx245(Trigger2, { asChild: true, children: trigger }),
|
|
10830
|
+
/* @__PURE__ */ jsx245(Portal, { children: /* @__PURE__ */ jsxs32(
|
|
10767
10831
|
StyledContent2,
|
|
10768
10832
|
{
|
|
10769
10833
|
$colorScheme: colorScheme,
|
|
@@ -10772,16 +10836,16 @@ var Popover = ({
|
|
|
10772
10836
|
$unstyled: unstyled,
|
|
10773
10837
|
style,
|
|
10774
10838
|
children: [
|
|
10775
|
-
!hideCloseButton && /* @__PURE__ */
|
|
10839
|
+
!hideCloseButton && /* @__PURE__ */ jsx245(Close, { asChild: true, children: /* @__PURE__ */ jsx245(
|
|
10776
10840
|
IconButton,
|
|
10777
10841
|
{
|
|
10778
10842
|
"data-wui-popover-close": true,
|
|
10779
10843
|
label: "Close",
|
|
10780
10844
|
variant: "ghost",
|
|
10781
|
-
children: /* @__PURE__ */
|
|
10845
|
+
children: /* @__PURE__ */ jsx245(Icon, { type: "close" })
|
|
10782
10846
|
}
|
|
10783
10847
|
) }),
|
|
10784
|
-
/* @__PURE__ */
|
|
10848
|
+
/* @__PURE__ */ jsx245("div", { children })
|
|
10785
10849
|
]
|
|
10786
10850
|
}
|
|
10787
10851
|
) })
|
|
@@ -10790,11 +10854,11 @@ var Popover = ({
|
|
|
10790
10854
|
Popover.displayName = "Popover";
|
|
10791
10855
|
|
|
10792
10856
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10793
|
-
import
|
|
10857
|
+
import styled50 from "styled-components";
|
|
10794
10858
|
import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
|
|
10795
10859
|
import { isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
10796
|
-
import { jsx as
|
|
10797
|
-
var ProgressBarWrapper =
|
|
10860
|
+
import { jsx as jsx246, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
10861
|
+
var ProgressBarWrapper = styled50.div`
|
|
10798
10862
|
--progress-bar-height: 8px;
|
|
10799
10863
|
--progress-bar-indicator-color: var(--wui-color-bg-fill);
|
|
10800
10864
|
--progress-bar-background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10810,7 +10874,7 @@ var getTranslateValue = (progress, max) => {
|
|
|
10810
10874
|
const progressPercentage = progress / max * 100;
|
|
10811
10875
|
return `translateX(-${100 - progressPercentage}%)`;
|
|
10812
10876
|
};
|
|
10813
|
-
var ProgressBarLabel =
|
|
10877
|
+
var ProgressBarLabel = styled50.div`
|
|
10814
10878
|
display: flex;
|
|
10815
10879
|
line-height: var(--wui-typography-label-3-line-height);
|
|
10816
10880
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -10818,7 +10882,7 @@ var ProgressBarLabel = styled49.div`
|
|
|
10818
10882
|
color: var(--wui-color-text-secondary);
|
|
10819
10883
|
flex-shrink: 0;
|
|
10820
10884
|
`;
|
|
10821
|
-
var StyledProgressIndicator =
|
|
10885
|
+
var StyledProgressIndicator = styled50(ProgressIndicator)`
|
|
10822
10886
|
background-color: var(--progress-bar-indicator-color);
|
|
10823
10887
|
width: 100%;
|
|
10824
10888
|
height: 100%;
|
|
@@ -10827,7 +10891,7 @@ var StyledProgressIndicator = styled49(ProgressIndicator)`
|
|
|
10827
10891
|
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
10828
10892
|
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
10829
10893
|
`;
|
|
10830
|
-
var StyledProgressBar =
|
|
10894
|
+
var StyledProgressBar = styled50(ProgressRoot)`
|
|
10831
10895
|
position: relative;
|
|
10832
10896
|
overflow: hidden;
|
|
10833
10897
|
background: var(--progress-bar-background-color);
|
|
@@ -10847,14 +10911,14 @@ var ProgressBar = ({
|
|
|
10847
10911
|
...props
|
|
10848
10912
|
}) => {
|
|
10849
10913
|
return /* @__PURE__ */ jsxs33(ProgressBarWrapper, { children: [
|
|
10850
|
-
isNotNil24(labelLeft) ? /* @__PURE__ */
|
|
10851
|
-
/* @__PURE__ */
|
|
10914
|
+
isNotNil24(labelLeft) ? /* @__PURE__ */ jsx246(ProgressBarLabel, { children: labelLeft }) : null,
|
|
10915
|
+
/* @__PURE__ */ jsx246(
|
|
10852
10916
|
StyledProgressBar,
|
|
10853
10917
|
{
|
|
10854
10918
|
max,
|
|
10855
10919
|
value: progress,
|
|
10856
10920
|
...props,
|
|
10857
|
-
children: /* @__PURE__ */
|
|
10921
|
+
children: /* @__PURE__ */ jsx246(
|
|
10858
10922
|
StyledProgressIndicator,
|
|
10859
10923
|
{
|
|
10860
10924
|
$max: max,
|
|
@@ -10863,17 +10927,17 @@ var ProgressBar = ({
|
|
|
10863
10927
|
)
|
|
10864
10928
|
}
|
|
10865
10929
|
),
|
|
10866
|
-
isNotNil24(labelRight) ? /* @__PURE__ */
|
|
10930
|
+
isNotNil24(labelRight) ? /* @__PURE__ */ jsx246(ProgressBarLabel, { children: labelRight }) : null
|
|
10867
10931
|
] });
|
|
10868
10932
|
};
|
|
10869
10933
|
ProgressBar.displayName = "ProgressBar";
|
|
10870
10934
|
|
|
10871
10935
|
// src/components/Radio/Radio.tsx
|
|
10872
|
-
import { forwardRef as
|
|
10873
|
-
import
|
|
10936
|
+
import { forwardRef as forwardRef20, useId as useId3 } from "react";
|
|
10937
|
+
import styled51, { css as css30 } from "styled-components";
|
|
10874
10938
|
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
10875
|
-
import { jsx as
|
|
10876
|
-
var RadioIcon = () => /* @__PURE__ */
|
|
10939
|
+
import { jsx as jsx247, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10940
|
+
var RadioIcon = () => /* @__PURE__ */ jsx247(
|
|
10877
10941
|
"svg",
|
|
10878
10942
|
{
|
|
10879
10943
|
fill: "inherit",
|
|
@@ -10881,7 +10945,7 @@ var RadioIcon = () => /* @__PURE__ */ jsx246(
|
|
|
10881
10945
|
viewBox: "0 0 1 1",
|
|
10882
10946
|
width: "1",
|
|
10883
10947
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10884
|
-
children: /* @__PURE__ */
|
|
10948
|
+
children: /* @__PURE__ */ jsx247(
|
|
10885
10949
|
"circle",
|
|
10886
10950
|
{
|
|
10887
10951
|
cx: "0.5",
|
|
@@ -10930,14 +10994,14 @@ var getSizeCss2 = (size) => {
|
|
|
10930
10994
|
if (size === "lg") return sizeLarge2;
|
|
10931
10995
|
return sizeMedium2;
|
|
10932
10996
|
};
|
|
10933
|
-
var StyledRadioWrapper =
|
|
10997
|
+
var StyledRadioWrapper = styled51.div`
|
|
10934
10998
|
display: flex;
|
|
10935
10999
|
margin: 0;
|
|
10936
11000
|
|
|
10937
11001
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
10938
11002
|
user-select: none;
|
|
10939
11003
|
`;
|
|
10940
|
-
var StyledRadioInput =
|
|
11004
|
+
var StyledRadioInput = styled51.div`
|
|
10941
11005
|
${({ $size }) => getSizeCss2($size)}
|
|
10942
11006
|
line-height: 0;
|
|
10943
11007
|
margin: 0;
|
|
@@ -10959,7 +11023,7 @@ var StyledRadioInput = styled50.div`
|
|
|
10959
11023
|
}
|
|
10960
11024
|
}
|
|
10961
11025
|
`;
|
|
10962
|
-
var StyledHiddenRadioInput =
|
|
11026
|
+
var StyledHiddenRadioInput = styled51.input`
|
|
10963
11027
|
${visuallyHiddenStyle}
|
|
10964
11028
|
|
|
10965
11029
|
/* toggles display of faux-input border-color */
|
|
@@ -10972,7 +11036,7 @@ var StyledHiddenRadioInput = styled50.input`
|
|
|
10972
11036
|
display: block;
|
|
10973
11037
|
}
|
|
10974
11038
|
`;
|
|
10975
|
-
var Radio =
|
|
11039
|
+
var Radio = forwardRef20(
|
|
10976
11040
|
({
|
|
10977
11041
|
checked,
|
|
10978
11042
|
disabled = false,
|
|
@@ -10995,7 +11059,7 @@ var Radio = forwardRef19(
|
|
|
10995
11059
|
$disabled: disabled,
|
|
10996
11060
|
"aria-invalid": props["aria-invalid"],
|
|
10997
11061
|
children: [
|
|
10998
|
-
/* @__PURE__ */
|
|
11062
|
+
/* @__PURE__ */ jsx247(
|
|
10999
11063
|
StyledHiddenRadioInput,
|
|
11000
11064
|
{
|
|
11001
11065
|
...props,
|
|
@@ -11010,16 +11074,16 @@ var Radio = forwardRef19(
|
|
|
11010
11074
|
value
|
|
11011
11075
|
}
|
|
11012
11076
|
),
|
|
11013
|
-
/* @__PURE__ */
|
|
11077
|
+
/* @__PURE__ */ jsx247(
|
|
11014
11078
|
FormControlLabel,
|
|
11015
11079
|
{
|
|
11016
|
-
controlSlot: /* @__PURE__ */
|
|
11080
|
+
controlSlot: /* @__PURE__ */ jsx247(
|
|
11017
11081
|
StyledRadioInput,
|
|
11018
11082
|
{
|
|
11019
11083
|
$disabled: disabled,
|
|
11020
11084
|
$size: size,
|
|
11021
11085
|
"data-wui-faux-input": "true",
|
|
11022
|
-
children: /* @__PURE__ */
|
|
11086
|
+
children: /* @__PURE__ */ jsx247(RadioIcon, {})
|
|
11023
11087
|
}
|
|
11024
11088
|
),
|
|
11025
11089
|
description,
|
|
@@ -11037,43 +11101,48 @@ var Radio = forwardRef19(
|
|
|
11037
11101
|
Radio.displayName = "Radio";
|
|
11038
11102
|
|
|
11039
11103
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
11040
|
-
import { forwardRef as
|
|
11041
|
-
import
|
|
11104
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
11105
|
+
import styled53, { css as css31 } from "styled-components";
|
|
11042
11106
|
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
11043
11107
|
import { isNil as isNil14 } from "@wistia/type-guards";
|
|
11044
11108
|
|
|
11045
|
-
// src/components/SegmentedControl/
|
|
11046
|
-
import { createContext as createContext6, useContext as useContext5, useMemo as useMemo8, useState as
|
|
11047
|
-
import { jsx as
|
|
11048
|
-
var
|
|
11049
|
-
|
|
11050
|
-
);
|
|
11051
|
-
var SelectedItemMeasurementsProvider = ({
|
|
11109
|
+
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
11110
|
+
import { createContext as createContext6, useContext as useContext5, useMemo as useMemo8, useState as useState11 } from "react";
|
|
11111
|
+
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
11112
|
+
var SelectedItemStyleContext = createContext6(null);
|
|
11113
|
+
var SelectedItemStyleProvider = ({
|
|
11052
11114
|
children
|
|
11053
11115
|
}) => {
|
|
11054
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] =
|
|
11116
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = useState11(null);
|
|
11117
|
+
const selectedItemIndicatorStyle = useMemo8(
|
|
11118
|
+
() => selectedItemMeasurements != null ? {
|
|
11119
|
+
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11120
|
+
transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
|
|
11121
|
+
width: `${selectedItemMeasurements.offsetWidth}px`
|
|
11122
|
+
} : {
|
|
11123
|
+
transform: "translateY(-50%)"
|
|
11124
|
+
},
|
|
11125
|
+
[selectedItemMeasurements]
|
|
11126
|
+
);
|
|
11055
11127
|
const contextValue = useMemo8(
|
|
11056
11128
|
() => ({
|
|
11057
11129
|
setSelectedItemMeasurements,
|
|
11058
|
-
|
|
11130
|
+
selectedItemIndicatorStyle
|
|
11059
11131
|
}),
|
|
11060
|
-
[
|
|
11132
|
+
[selectedItemIndicatorStyle]
|
|
11061
11133
|
);
|
|
11062
|
-
return /* @__PURE__ */
|
|
11134
|
+
return /* @__PURE__ */ jsx248(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
11063
11135
|
};
|
|
11064
|
-
var
|
|
11065
|
-
const context = useContext5(
|
|
11136
|
+
var useSelectedItemStyle = () => {
|
|
11137
|
+
const context = useContext5(SelectedItemStyleContext);
|
|
11066
11138
|
if (context === null) {
|
|
11067
|
-
throw new Error(
|
|
11068
|
-
"useSelectedItemMeasurements must be used within a SelectedItemMeasurementsProvider"
|
|
11069
|
-
);
|
|
11139
|
+
throw new Error("useSelectedItemStyle must be used within a SelectedItemStyleProvider");
|
|
11070
11140
|
}
|
|
11071
11141
|
return context;
|
|
11072
11142
|
};
|
|
11073
11143
|
|
|
11074
11144
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
11075
|
-
import
|
|
11076
|
-
import styled51 from "styled-components";
|
|
11145
|
+
import styled52 from "styled-components";
|
|
11077
11146
|
|
|
11078
11147
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
11079
11148
|
import { createContext as createContext7, useContext as useContext6 } from "react";
|
|
@@ -11088,13 +11157,13 @@ var useSegmentedControlValue = () => {
|
|
|
11088
11157
|
};
|
|
11089
11158
|
|
|
11090
11159
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
11091
|
-
import { jsx as
|
|
11092
|
-
var SelectedItemIndicatorDiv =
|
|
11160
|
+
import { jsx as jsx249 } from "react/jsx-runtime";
|
|
11161
|
+
var SelectedItemIndicatorDiv = styled52.div`
|
|
11093
11162
|
background-color: var(--wui-color-bg-fill-white);
|
|
11094
11163
|
border-radius: var(--wui-border-radius-rounded);
|
|
11095
11164
|
left: 0;
|
|
11096
11165
|
position: absolute;
|
|
11097
|
-
top:
|
|
11166
|
+
top: 50%;
|
|
11098
11167
|
box-shadow: var(--wui-elevation-01);
|
|
11099
11168
|
transition:
|
|
11100
11169
|
transform var(--wui-motion-duration-02) var(--wui-motion-ease-out),
|
|
@@ -11103,46 +11172,30 @@ var SelectedItemIndicatorDiv = styled51.div`
|
|
|
11103
11172
|
`;
|
|
11104
11173
|
var SelectedItemIndicator = () => {
|
|
11105
11174
|
const selectedValue = useSegmentedControlValue();
|
|
11106
|
-
const {
|
|
11107
|
-
const selectedItemIndicatorStyle = useMemo9(
|
|
11108
|
-
() => selectedItemMeasurements != null ? {
|
|
11109
|
-
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11110
|
-
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
11111
|
-
width: `${selectedItemMeasurements.offsetWidth}px`
|
|
11112
|
-
} : {},
|
|
11113
|
-
[selectedItemMeasurements]
|
|
11114
|
-
);
|
|
11175
|
+
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
11115
11176
|
if (!selectedValue) {
|
|
11116
11177
|
return null;
|
|
11117
11178
|
}
|
|
11118
|
-
return /* @__PURE__ */
|
|
11119
|
-
SelectedItemIndicatorDiv,
|
|
11120
|
-
{
|
|
11121
|
-
style: {
|
|
11122
|
-
width: selectedItemIndicatorStyle.width,
|
|
11123
|
-
transform: selectedItemIndicatorStyle.transform,
|
|
11124
|
-
height: selectedItemIndicatorStyle.height
|
|
11125
|
-
}
|
|
11126
|
-
}
|
|
11127
|
-
);
|
|
11179
|
+
return /* @__PURE__ */ jsx249(SelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
11128
11180
|
};
|
|
11129
11181
|
|
|
11130
11182
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
11131
|
-
import { jsx as
|
|
11183
|
+
import { jsx as jsx250, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
11132
11184
|
var segmentedControlStyles = css31`
|
|
11133
11185
|
display: inline-flex;
|
|
11134
11186
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
11135
11187
|
border-radius: var(--wui-border-radius-rounded);
|
|
11136
|
-
border: 2px solid var(--wui-color-bg-surface-secondary);
|
|
11137
11188
|
gap: var(--wui-space-01);
|
|
11138
11189
|
isolation: isolate;
|
|
11190
|
+
overflow: hidden;
|
|
11191
|
+
padding: 2px;
|
|
11139
11192
|
position: relative;
|
|
11140
11193
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
11141
11194
|
`;
|
|
11142
|
-
var StyledSegmentedControl =
|
|
11195
|
+
var StyledSegmentedControl = styled53(ToggleGroupRoot)`
|
|
11143
11196
|
${segmentedControlStyles}
|
|
11144
11197
|
`;
|
|
11145
|
-
var SegmentedControl =
|
|
11198
|
+
var SegmentedControl = forwardRef21(
|
|
11146
11199
|
({
|
|
11147
11200
|
children,
|
|
11148
11201
|
disabled = false,
|
|
@@ -11154,7 +11207,7 @@ var SegmentedControl = forwardRef20(
|
|
|
11154
11207
|
if (isNil14(children)) {
|
|
11155
11208
|
return null;
|
|
11156
11209
|
}
|
|
11157
|
-
return /* @__PURE__ */
|
|
11210
|
+
return /* @__PURE__ */ jsx250(
|
|
11158
11211
|
StyledSegmentedControl,
|
|
11159
11212
|
{
|
|
11160
11213
|
ref,
|
|
@@ -11166,8 +11219,8 @@ var SegmentedControl = forwardRef20(
|
|
|
11166
11219
|
type: "single",
|
|
11167
11220
|
value: selectedValue,
|
|
11168
11221
|
...props,
|
|
11169
|
-
children: /* @__PURE__ */
|
|
11170
|
-
/* @__PURE__ */
|
|
11222
|
+
children: /* @__PURE__ */ jsx250(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs35(SelectedItemStyleProvider, { children: [
|
|
11223
|
+
/* @__PURE__ */ jsx250(SelectedItemIndicator, {}),
|
|
11171
11224
|
children
|
|
11172
11225
|
] }) })
|
|
11173
11226
|
}
|
|
@@ -11177,8 +11230,8 @@ var SegmentedControl = forwardRef20(
|
|
|
11177
11230
|
SegmentedControl.displayName = "SegmentedControl";
|
|
11178
11231
|
|
|
11179
11232
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
11180
|
-
import { forwardRef as
|
|
11181
|
-
import
|
|
11233
|
+
import { forwardRef as forwardRef22, useEffect as useEffect9, useRef as useRef10 } from "react";
|
|
11234
|
+
import styled54, { css as css32 } from "styled-components";
|
|
11182
11235
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
11183
11236
|
import { isNotNil as isNotNil25 } from "@wistia/type-guards";
|
|
11184
11237
|
import { jsxs as jsxs36 } from "react/jsx-runtime";
|
|
@@ -11242,13 +11295,13 @@ var segmentedControlItemStyles = css32`
|
|
|
11242
11295
|
}
|
|
11243
11296
|
}
|
|
11244
11297
|
`;
|
|
11245
|
-
var StyledSegmentedControlItem =
|
|
11298
|
+
var StyledSegmentedControlItem = styled54(ToggleGroupItem)`
|
|
11246
11299
|
${segmentedControlItemStyles}
|
|
11247
11300
|
`;
|
|
11248
|
-
var SegmentedControlItem =
|
|
11301
|
+
var SegmentedControlItem = forwardRef22(
|
|
11249
11302
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11250
11303
|
const selectedValue = useSegmentedControlValue();
|
|
11251
|
-
const { setSelectedItemMeasurements } =
|
|
11304
|
+
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
11252
11305
|
const buttonRef = useRef10(null);
|
|
11253
11306
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11254
11307
|
const handleClick = (event) => {
|
|
@@ -11258,7 +11311,7 @@ var SegmentedControlItem = forwardRef21(
|
|
|
11258
11311
|
event.preventDefault();
|
|
11259
11312
|
}
|
|
11260
11313
|
};
|
|
11261
|
-
|
|
11314
|
+
useEffect9(() => {
|
|
11262
11315
|
const buttonElem = buttonRef.current;
|
|
11263
11316
|
if (!buttonElem) {
|
|
11264
11317
|
return void 0;
|
|
@@ -11313,10 +11366,10 @@ import {
|
|
|
11313
11366
|
Value,
|
|
11314
11367
|
ScrollDownButton
|
|
11315
11368
|
} from "@radix-ui/react-select";
|
|
11316
|
-
import { forwardRef as
|
|
11317
|
-
import
|
|
11318
|
-
import { jsx as
|
|
11319
|
-
var StyledTrigger =
|
|
11369
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
11370
|
+
import styled55 from "styled-components";
|
|
11371
|
+
import { jsx as jsx251, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
11372
|
+
var StyledTrigger = styled55(Trigger3)`
|
|
11320
11373
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11321
11374
|
${inputCssVariables};
|
|
11322
11375
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -11360,7 +11413,7 @@ var StyledTrigger = styled54(Trigger3)`
|
|
|
11360
11413
|
color: var(--wui-input-placeholder);
|
|
11361
11414
|
}
|
|
11362
11415
|
`;
|
|
11363
|
-
var StyledContent3 =
|
|
11416
|
+
var StyledContent3 = styled55(Content3)`
|
|
11364
11417
|
--wui-select-content-border: var(--wui-color-border);
|
|
11365
11418
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
11366
11419
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -11378,7 +11431,7 @@ var StyledContent3 = styled54(Content3)`
|
|
|
11378
11431
|
max-height: var(--radix-select-content-available-height);
|
|
11379
11432
|
z-index: var(--wui-zindex-select);
|
|
11380
11433
|
`;
|
|
11381
|
-
var Select =
|
|
11434
|
+
var Select = forwardRef23(
|
|
11382
11435
|
({
|
|
11383
11436
|
colorScheme = "inherit",
|
|
11384
11437
|
children,
|
|
@@ -11402,8 +11455,8 @@ var Select = forwardRef22(
|
|
|
11402
11455
|
$fullWidth: responsiveFullWidth,
|
|
11403
11456
|
...props,
|
|
11404
11457
|
children: [
|
|
11405
|
-
/* @__PURE__ */
|
|
11406
|
-
/* @__PURE__ */
|
|
11458
|
+
/* @__PURE__ */ jsx251(Value, { placeholder }),
|
|
11459
|
+
/* @__PURE__ */ jsx251(
|
|
11407
11460
|
Icon,
|
|
11408
11461
|
{
|
|
11409
11462
|
size: "md",
|
|
@@ -11413,10 +11466,10 @@ var Select = forwardRef22(
|
|
|
11413
11466
|
]
|
|
11414
11467
|
}
|
|
11415
11468
|
),
|
|
11416
|
-
/* @__PURE__ */
|
|
11417
|
-
/* @__PURE__ */
|
|
11418
|
-
/* @__PURE__ */
|
|
11419
|
-
/* @__PURE__ */
|
|
11469
|
+
/* @__PURE__ */ jsx251(Portal2, { children: /* @__PURE__ */ jsxs37(StyledContent3, { position: "popper", children: [
|
|
11470
|
+
/* @__PURE__ */ jsx251(ScrollUpButton, { children: /* @__PURE__ */ jsx251(Icon, { type: "caret-up" }) }),
|
|
11471
|
+
/* @__PURE__ */ jsx251(Viewport, { children }),
|
|
11472
|
+
/* @__PURE__ */ jsx251(ScrollDownButton, { children: /* @__PURE__ */ jsx251(Icon, { type: "caret-down" }) })
|
|
11420
11473
|
] }) })
|
|
11421
11474
|
]
|
|
11422
11475
|
}
|
|
@@ -11427,11 +11480,11 @@ Select.displayName = "Select";
|
|
|
11427
11480
|
|
|
11428
11481
|
// src/components/Select/SelectOption.tsx
|
|
11429
11482
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
11430
|
-
import { forwardRef as
|
|
11431
|
-
import
|
|
11483
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
11484
|
+
import styled56 from "styled-components";
|
|
11432
11485
|
import { isNotNil as isNotNil26 } from "@wistia/type-guards";
|
|
11433
|
-
import { jsx as
|
|
11434
|
-
var StyledItem =
|
|
11486
|
+
import { jsx as jsx252, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11487
|
+
var StyledItem = styled56(Item)`
|
|
11435
11488
|
${variantStyleMap2.body3};
|
|
11436
11489
|
display: flex;
|
|
11437
11490
|
padding: var(--wui-select-option-padding);
|
|
@@ -11455,10 +11508,10 @@ var StyledItem = styled55(Item)`
|
|
|
11455
11508
|
background-color: transparent;
|
|
11456
11509
|
}
|
|
11457
11510
|
`;
|
|
11458
|
-
var StyledIconContainer =
|
|
11511
|
+
var StyledIconContainer = styled56.span`
|
|
11459
11512
|
width: 12px;
|
|
11460
11513
|
`;
|
|
11461
|
-
var SelectOption =
|
|
11514
|
+
var SelectOption = forwardRef24(
|
|
11462
11515
|
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
11463
11516
|
return /* @__PURE__ */ jsxs38(
|
|
11464
11517
|
StyledItem,
|
|
@@ -11466,7 +11519,7 @@ var SelectOption = forwardRef23(
|
|
|
11466
11519
|
...props,
|
|
11467
11520
|
ref: forwardedRef,
|
|
11468
11521
|
children: [
|
|
11469
|
-
/* @__PURE__ */
|
|
11522
|
+
/* @__PURE__ */ jsx252(StyledIconContainer, { "data-indicator": true, children: /* @__PURE__ */ jsx252(ItemIndicator, { children: /* @__PURE__ */ jsx252(
|
|
11470
11523
|
Icon,
|
|
11471
11524
|
{
|
|
11472
11525
|
size: "sm",
|
|
@@ -11475,8 +11528,8 @@ var SelectOption = forwardRef23(
|
|
|
11475
11528
|
) }) }),
|
|
11476
11529
|
isNotNil26(selectedDisplayValue) ? /* @__PURE__ */ jsxs38("div", { children: [
|
|
11477
11530
|
children,
|
|
11478
|
-
/* @__PURE__ */
|
|
11479
|
-
] }) : /* @__PURE__ */
|
|
11531
|
+
/* @__PURE__ */ jsx252("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx252(ItemText, { children: selectedDisplayValue }) })
|
|
11532
|
+
] }) : /* @__PURE__ */ jsx252(ItemText, { children })
|
|
11480
11533
|
]
|
|
11481
11534
|
}
|
|
11482
11535
|
);
|
|
@@ -11486,14 +11539,14 @@ SelectOption.displayName = "Option";
|
|
|
11486
11539
|
|
|
11487
11540
|
// src/components/Select/SelectOptionGroup.tsx
|
|
11488
11541
|
import { Group, Label as Label2 } from "@radix-ui/react-select";
|
|
11489
|
-
import
|
|
11490
|
-
import { jsx as
|
|
11491
|
-
var StyledLabel4 =
|
|
11542
|
+
import styled57 from "styled-components";
|
|
11543
|
+
import { jsx as jsx253, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11544
|
+
var StyledLabel4 = styled57(Label2)`
|
|
11492
11545
|
padding: var(--wui-select-option-padding);
|
|
11493
11546
|
`;
|
|
11494
11547
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
11495
11548
|
return /* @__PURE__ */ jsxs39(Group, { ...props, children: [
|
|
11496
|
-
/* @__PURE__ */
|
|
11549
|
+
/* @__PURE__ */ jsx253(StyledLabel4, { children: /* @__PURE__ */ jsx253(
|
|
11497
11550
|
Text,
|
|
11498
11551
|
{
|
|
11499
11552
|
prominence: "secondary",
|
|
@@ -11506,10 +11559,10 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11506
11559
|
};
|
|
11507
11560
|
|
|
11508
11561
|
// src/components/Switch/Switch.tsx
|
|
11509
|
-
import { forwardRef as
|
|
11510
|
-
import
|
|
11562
|
+
import { forwardRef as forwardRef25, useId as useId4 } from "react";
|
|
11563
|
+
import styled58, { css as css33 } from "styled-components";
|
|
11511
11564
|
import { isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
11512
|
-
import { jsx as
|
|
11565
|
+
import { jsx as jsx254, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
11513
11566
|
var sizeSmall3 = css33`
|
|
11514
11567
|
--wui-size-small-width: 24px;
|
|
11515
11568
|
--wui-size-small-height: 14px;
|
|
@@ -11560,14 +11613,14 @@ var getSizeCss3 = (size) => {
|
|
|
11560
11613
|
if (size === "lg") return sizeLarge3;
|
|
11561
11614
|
return sizeMedium3;
|
|
11562
11615
|
};
|
|
11563
|
-
var StyledSwitchWrapper =
|
|
11616
|
+
var StyledSwitchWrapper = styled58.div`
|
|
11564
11617
|
display: flex;
|
|
11565
11618
|
margin: 0;
|
|
11566
11619
|
|
|
11567
11620
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
11568
11621
|
user-select: none;
|
|
11569
11622
|
`;
|
|
11570
|
-
var StyledSwitchInput =
|
|
11623
|
+
var StyledSwitchInput = styled58.div`
|
|
11571
11624
|
${({ $size }) => getSizeCss3($size)}
|
|
11572
11625
|
line-height: 0;
|
|
11573
11626
|
margin: 0;
|
|
@@ -11595,7 +11648,7 @@ var StyledSwitchInput = styled57.div`
|
|
|
11595
11648
|
transition: all 0.2s ease-in-out;
|
|
11596
11649
|
}
|
|
11597
11650
|
`;
|
|
11598
|
-
var StyledHiddenSwitchInput =
|
|
11651
|
+
var StyledHiddenSwitchInput = styled58.input`
|
|
11599
11652
|
${visuallyHiddenStyle}
|
|
11600
11653
|
|
|
11601
11654
|
/* toggles display of faux-input background-color and toggle position */
|
|
@@ -11611,7 +11664,7 @@ var StyledHiddenSwitchInput = styled57.input`
|
|
|
11611
11664
|
}
|
|
11612
11665
|
}
|
|
11613
11666
|
`;
|
|
11614
|
-
var Switch =
|
|
11667
|
+
var Switch = forwardRef25(
|
|
11615
11668
|
({
|
|
11616
11669
|
checked,
|
|
11617
11670
|
disabled = false,
|
|
@@ -11629,7 +11682,7 @@ var Switch = forwardRef24(
|
|
|
11629
11682
|
const generatedId = useId4();
|
|
11630
11683
|
const computedId = isNonEmptyString4(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11631
11684
|
return /* @__PURE__ */ jsxs40(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11632
|
-
/* @__PURE__ */
|
|
11685
|
+
/* @__PURE__ */ jsx254(
|
|
11633
11686
|
StyledHiddenSwitchInput,
|
|
11634
11687
|
{
|
|
11635
11688
|
...props,
|
|
@@ -11644,10 +11697,10 @@ var Switch = forwardRef24(
|
|
|
11644
11697
|
value
|
|
11645
11698
|
}
|
|
11646
11699
|
),
|
|
11647
|
-
/* @__PURE__ */
|
|
11700
|
+
/* @__PURE__ */ jsx254(
|
|
11648
11701
|
FormControlLabel,
|
|
11649
11702
|
{
|
|
11650
|
-
controlSlot: /* @__PURE__ */
|
|
11703
|
+
controlSlot: /* @__PURE__ */ jsx254(
|
|
11651
11704
|
StyledSwitchInput,
|
|
11652
11705
|
{
|
|
11653
11706
|
$disabled: disabled,
|
|
@@ -11669,9 +11722,9 @@ var Switch = forwardRef24(
|
|
|
11669
11722
|
Switch.displayName = "Switch";
|
|
11670
11723
|
|
|
11671
11724
|
// src/components/Table/Table.tsx
|
|
11672
|
-
import
|
|
11673
|
-
import { jsx as
|
|
11674
|
-
var StyledTable =
|
|
11725
|
+
import styled59, { css as css34 } from "styled-components";
|
|
11726
|
+
import { jsx as jsx255 } from "react/jsx-runtime";
|
|
11727
|
+
var StyledTable = styled59.table`
|
|
11675
11728
|
width: 100%;
|
|
11676
11729
|
border-collapse: collapse;
|
|
11677
11730
|
|
|
@@ -11693,7 +11746,7 @@ var Table = ({
|
|
|
11693
11746
|
divided = false,
|
|
11694
11747
|
...props
|
|
11695
11748
|
}) => {
|
|
11696
|
-
return /* @__PURE__ */
|
|
11749
|
+
return /* @__PURE__ */ jsx255(
|
|
11697
11750
|
StyledTable,
|
|
11698
11751
|
{
|
|
11699
11752
|
$divided: divided,
|
|
@@ -11705,35 +11758,35 @@ var Table = ({
|
|
|
11705
11758
|
};
|
|
11706
11759
|
|
|
11707
11760
|
// src/components/Table/TableBody.tsx
|
|
11708
|
-
import
|
|
11761
|
+
import styled60 from "styled-components";
|
|
11709
11762
|
|
|
11710
11763
|
// src/components/Table/TableSectionContext.ts
|
|
11711
11764
|
import { createContext as createContext8 } from "react";
|
|
11712
11765
|
var TableSectionContext = createContext8(null);
|
|
11713
11766
|
|
|
11714
11767
|
// src/components/Table/TableBody.tsx
|
|
11715
|
-
import { jsx as
|
|
11716
|
-
var StyledTbody =
|
|
11768
|
+
import { jsx as jsx256 } from "react/jsx-runtime";
|
|
11769
|
+
var StyledTbody = styled60.tbody``;
|
|
11717
11770
|
var TableBody = ({ children, ...props }) => {
|
|
11718
|
-
return /* @__PURE__ */
|
|
11771
|
+
return /* @__PURE__ */ jsx256(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx256(StyledTbody, { ...props, children }) });
|
|
11719
11772
|
};
|
|
11720
11773
|
|
|
11721
11774
|
// src/components/Table/TableCell.tsx
|
|
11722
11775
|
import { useContext as useContext7 } from "react";
|
|
11723
|
-
import
|
|
11724
|
-
import { jsx as
|
|
11776
|
+
import styled61, { css as css35 } from "styled-components";
|
|
11777
|
+
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
11725
11778
|
var sharedStyles = css35`
|
|
11726
11779
|
color: var(--wui-color-text);
|
|
11727
11780
|
padding: var(--wui-space-02);
|
|
11728
11781
|
text-align: left;
|
|
11729
11782
|
`;
|
|
11730
|
-
var StyledTh =
|
|
11783
|
+
var StyledTh = styled61.th`
|
|
11731
11784
|
${sharedStyles}
|
|
11732
11785
|
font-size: var(--wui-typography-body-4-size);
|
|
11733
11786
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
11734
11787
|
line-height: var(--wui-typography-body-4-line-height);
|
|
11735
11788
|
`;
|
|
11736
|
-
var StyledTd =
|
|
11789
|
+
var StyledTd = styled61.td`
|
|
11737
11790
|
${sharedStyles}
|
|
11738
11791
|
font-size: var(--wui-typography-body-2-size);
|
|
11739
11792
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -11742,51 +11795,51 @@ var StyledTd = styled60.td`
|
|
|
11742
11795
|
var TableCell = ({ children, ...props }) => {
|
|
11743
11796
|
const section = useContext7(TableSectionContext);
|
|
11744
11797
|
if (section === "head") {
|
|
11745
|
-
return /* @__PURE__ */
|
|
11798
|
+
return /* @__PURE__ */ jsx257(StyledTh, { ...props, children });
|
|
11746
11799
|
}
|
|
11747
|
-
return /* @__PURE__ */
|
|
11800
|
+
return /* @__PURE__ */ jsx257(StyledTd, { ...props, children });
|
|
11748
11801
|
};
|
|
11749
11802
|
|
|
11750
11803
|
// src/components/Table/TableFooter.tsx
|
|
11751
|
-
import
|
|
11752
|
-
import { jsx as
|
|
11753
|
-
var StyledTfoot =
|
|
11804
|
+
import styled62 from "styled-components";
|
|
11805
|
+
import { jsx as jsx258 } from "react/jsx-runtime";
|
|
11806
|
+
var StyledTfoot = styled62.tfoot``;
|
|
11754
11807
|
var TableFooter = ({ children, ...props }) => {
|
|
11755
|
-
return /* @__PURE__ */
|
|
11808
|
+
return /* @__PURE__ */ jsx258(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx258(StyledTfoot, { ...props, children }) });
|
|
11756
11809
|
};
|
|
11757
11810
|
|
|
11758
11811
|
// src/components/Table/TableHead.tsx
|
|
11759
|
-
import
|
|
11760
|
-
import { jsx as
|
|
11761
|
-
var StyledThead =
|
|
11812
|
+
import styled63 from "styled-components";
|
|
11813
|
+
import { jsx as jsx259 } from "react/jsx-runtime";
|
|
11814
|
+
var StyledThead = styled63.thead``;
|
|
11762
11815
|
var TableHead = ({ children, ...props }) => {
|
|
11763
|
-
return /* @__PURE__ */
|
|
11816
|
+
return /* @__PURE__ */ jsx259(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx259(StyledThead, { ...props, children }) });
|
|
11764
11817
|
};
|
|
11765
11818
|
|
|
11766
11819
|
// src/components/Table/TableRow.tsx
|
|
11767
|
-
import
|
|
11768
|
-
import { jsx as
|
|
11769
|
-
var StyledTr =
|
|
11820
|
+
import styled64 from "styled-components";
|
|
11821
|
+
import { jsx as jsx260 } from "react/jsx-runtime";
|
|
11822
|
+
var StyledTr = styled64.tr``;
|
|
11770
11823
|
var TableRow = ({ children, ...props }) => {
|
|
11771
|
-
return /* @__PURE__ */
|
|
11824
|
+
return /* @__PURE__ */ jsx260(StyledTr, { ...props, children });
|
|
11772
11825
|
};
|
|
11773
11826
|
|
|
11774
11827
|
// src/components/Tabs/Tabs.tsx
|
|
11775
|
-
import { forwardRef as
|
|
11828
|
+
import { forwardRef as forwardRef27, useState as useState12 } from "react";
|
|
11776
11829
|
import { Root as TabsRoot } from "@radix-ui/react-tabs";
|
|
11777
11830
|
import { isNotNil as isNotNil28, isNil as isNil15 } from "@wistia/type-guards";
|
|
11778
|
-
import
|
|
11831
|
+
import styled69 from "styled-components";
|
|
11779
11832
|
|
|
11780
11833
|
// src/components/Tabs/TabPanel.tsx
|
|
11781
|
-
import
|
|
11834
|
+
import styled65 from "styled-components";
|
|
11782
11835
|
import { Content as TabsContent } from "@radix-ui/react-tabs";
|
|
11783
|
-
import { jsx as
|
|
11784
|
-
var StyledTabPanel =
|
|
11836
|
+
import { jsx as jsx261 } from "react/jsx-runtime";
|
|
11837
|
+
var StyledTabPanel = styled65(TabsContent)`
|
|
11785
11838
|
display: flex;
|
|
11786
11839
|
flex-direction: column;
|
|
11787
11840
|
`;
|
|
11788
11841
|
var TabPanel = ({ children, value, ...props }) => {
|
|
11789
|
-
return /* @__PURE__ */
|
|
11842
|
+
return /* @__PURE__ */ jsx261(
|
|
11790
11843
|
StyledTabPanel,
|
|
11791
11844
|
{
|
|
11792
11845
|
value,
|
|
@@ -11798,10 +11851,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
11798
11851
|
TabPanel.displayName = "TabPanel";
|
|
11799
11852
|
|
|
11800
11853
|
// src/components/Tabs/TabList.tsx
|
|
11801
|
-
import
|
|
11854
|
+
import styled66 from "styled-components";
|
|
11802
11855
|
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
11803
|
-
import { jsx as
|
|
11804
|
-
var StyledTabList =
|
|
11856
|
+
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
11857
|
+
var StyledTabList = styled66(RadixTabList)`
|
|
11805
11858
|
${segmentedControlStyles}
|
|
11806
11859
|
|
|
11807
11860
|
margin-bottom: var(--wui-space-04);
|
|
@@ -11814,7 +11867,7 @@ var TabList = ({
|
|
|
11814
11867
|
ariaLabel,
|
|
11815
11868
|
...props
|
|
11816
11869
|
}) => {
|
|
11817
|
-
return /* @__PURE__ */
|
|
11870
|
+
return /* @__PURE__ */ jsx262(
|
|
11818
11871
|
StyledTabList,
|
|
11819
11872
|
{
|
|
11820
11873
|
$fullWidth: fullWidth,
|
|
@@ -11827,8 +11880,8 @@ var TabList = ({
|
|
|
11827
11880
|
TabList.displayName = "TabList";
|
|
11828
11881
|
|
|
11829
11882
|
// src/components/Tabs/TabItem.tsx
|
|
11830
|
-
import { forwardRef as
|
|
11831
|
-
import
|
|
11883
|
+
import { forwardRef as forwardRef26, useEffect as useEffect10, useRef as useRef11 } from "react";
|
|
11884
|
+
import styled67 from "styled-components";
|
|
11832
11885
|
import { Trigger as RadixTab } from "@radix-ui/react-tabs";
|
|
11833
11886
|
import { isNotNil as isNotNil27 } from "@wistia/type-guards";
|
|
11834
11887
|
|
|
@@ -11846,20 +11899,20 @@ var useTabsValue = () => {
|
|
|
11846
11899
|
|
|
11847
11900
|
// src/components/Tabs/TabItem.tsx
|
|
11848
11901
|
import { jsxs as jsxs41 } from "react/jsx-runtime";
|
|
11849
|
-
var StyledTabItem =
|
|
11902
|
+
var StyledTabItem = styled67(RadixTab)`
|
|
11850
11903
|
${segmentedControlItemStyles}
|
|
11851
11904
|
|
|
11852
11905
|
&:focus-visible {
|
|
11853
11906
|
outline: none;
|
|
11854
11907
|
}
|
|
11855
11908
|
`;
|
|
11856
|
-
var TabItem =
|
|
11909
|
+
var TabItem = forwardRef26(
|
|
11857
11910
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11858
11911
|
const selectedValue = useTabsValue();
|
|
11859
|
-
const { setSelectedItemMeasurements } =
|
|
11912
|
+
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
11860
11913
|
const buttonRef = useRef11(null);
|
|
11861
11914
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11862
|
-
|
|
11915
|
+
useEffect10(() => {
|
|
11863
11916
|
const buttonElem = buttonRef.current;
|
|
11864
11917
|
if (!buttonElem) {
|
|
11865
11918
|
return void 0;
|
|
@@ -11925,59 +11978,41 @@ var extractTabItems = (children) => {
|
|
|
11925
11978
|
};
|
|
11926
11979
|
|
|
11927
11980
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
11928
|
-
import
|
|
11929
|
-
import
|
|
11930
|
-
|
|
11931
|
-
var TabsSelectedItemIndicatorDiv = styled67(SelectedItemIndicatorDiv)`
|
|
11981
|
+
import styled68 from "styled-components";
|
|
11982
|
+
import { jsx as jsx263 } from "react/jsx-runtime";
|
|
11983
|
+
var TabsSelectedItemIndicatorDiv = styled68(SelectedItemIndicatorDiv)`
|
|
11932
11984
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
11933
11985
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
11934
11986
|
}
|
|
11935
11987
|
`;
|
|
11936
11988
|
var SelectedItemIndicator2 = () => {
|
|
11937
|
-
const {
|
|
11989
|
+
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
11938
11990
|
const selectedValue = useTabsValue();
|
|
11939
|
-
const selectedItemIndicatorStyle = useMemo10(
|
|
11940
|
-
() => selectedItemMeasurements != null ? {
|
|
11941
|
-
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11942
|
-
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
11943
|
-
width: `${selectedItemMeasurements.offsetWidth}px`
|
|
11944
|
-
} : {},
|
|
11945
|
-
[selectedItemMeasurements]
|
|
11946
|
-
);
|
|
11947
11991
|
if (selectedValue == null) {
|
|
11948
11992
|
return null;
|
|
11949
11993
|
}
|
|
11950
|
-
return /* @__PURE__ */
|
|
11951
|
-
TabsSelectedItemIndicatorDiv,
|
|
11952
|
-
{
|
|
11953
|
-
style: {
|
|
11954
|
-
width: selectedItemIndicatorStyle.width,
|
|
11955
|
-
transform: selectedItemIndicatorStyle.transform,
|
|
11956
|
-
height: selectedItemIndicatorStyle.height
|
|
11957
|
-
}
|
|
11958
|
-
}
|
|
11959
|
-
);
|
|
11994
|
+
return /* @__PURE__ */ jsx263(TabsSelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
11960
11995
|
};
|
|
11961
11996
|
|
|
11962
11997
|
// src/components/Tabs/Tabs.tsx
|
|
11963
|
-
import { jsx as
|
|
11964
|
-
var TabsContainer =
|
|
11998
|
+
import { jsx as jsx264, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
11999
|
+
var TabsContainer = styled69.div`
|
|
11965
12000
|
display: flex;
|
|
11966
12001
|
flex-direction: column;
|
|
11967
12002
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11968
12003
|
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11969
12004
|
`;
|
|
11970
|
-
var StickyTabContent =
|
|
12005
|
+
var StickyTabContent = styled69.div`
|
|
11971
12006
|
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
11972
12007
|
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
11973
12008
|
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11974
12009
|
`;
|
|
11975
|
-
var StyledTabsRoot =
|
|
12010
|
+
var StyledTabsRoot = styled69(TabsRoot)`
|
|
11976
12011
|
display: flex;
|
|
11977
12012
|
flex-direction: column;
|
|
11978
12013
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11979
12014
|
`;
|
|
11980
|
-
var Tabs =
|
|
12015
|
+
var Tabs = forwardRef27(
|
|
11981
12016
|
({
|
|
11982
12017
|
children,
|
|
11983
12018
|
fullWidth = true,
|
|
@@ -11989,13 +12024,13 @@ var Tabs = forwardRef26(
|
|
|
11989
12024
|
...props
|
|
11990
12025
|
}, ref) => {
|
|
11991
12026
|
const tabItems = extractTabItems(children);
|
|
11992
|
-
const [internalSelectedValue, setInternalSelectedValue] =
|
|
12027
|
+
const [internalSelectedValue, setInternalSelectedValue] = useState12(defaultSelectedValue);
|
|
11993
12028
|
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
11994
12029
|
defaultValue: defaultSelectedValue,
|
|
11995
12030
|
onValueChange: setInternalSelectedValue
|
|
11996
12031
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
11997
12032
|
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
11998
|
-
return /* @__PURE__ */
|
|
12033
|
+
return /* @__PURE__ */ jsx264(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ jsx264(
|
|
11999
12034
|
StyledTabsRoot,
|
|
12000
12035
|
{
|
|
12001
12036
|
ref,
|
|
@@ -12003,14 +12038,14 @@ var Tabs = forwardRef26(
|
|
|
12003
12038
|
activationMode: "automatic",
|
|
12004
12039
|
...props,
|
|
12005
12040
|
...modeProps,
|
|
12006
|
-
children: /* @__PURE__ */
|
|
12041
|
+
children: /* @__PURE__ */ jsx264(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ jsxs42(SelectedItemStyleProvider, { children: [
|
|
12007
12042
|
/* @__PURE__ */ jsxs42(
|
|
12008
12043
|
TabList,
|
|
12009
12044
|
{
|
|
12010
12045
|
ariaLabel,
|
|
12011
12046
|
fullWidth,
|
|
12012
12047
|
children: [
|
|
12013
|
-
/* @__PURE__ */
|
|
12048
|
+
/* @__PURE__ */ jsx264(SelectedItemIndicator2, {}),
|
|
12014
12049
|
tabItems.map((tab) => {
|
|
12015
12050
|
const {
|
|
12016
12051
|
value,
|
|
@@ -12020,7 +12055,7 @@ var Tabs = forwardRef26(
|
|
|
12020
12055
|
"aria-label": ariaLabelForTab
|
|
12021
12056
|
} = tab.props;
|
|
12022
12057
|
if (isNil15(icon)) {
|
|
12023
|
-
return /* @__PURE__ */
|
|
12058
|
+
return /* @__PURE__ */ jsx264(
|
|
12024
12059
|
TabItem,
|
|
12025
12060
|
{
|
|
12026
12061
|
disabled,
|
|
@@ -12031,7 +12066,7 @@ var Tabs = forwardRef26(
|
|
|
12031
12066
|
);
|
|
12032
12067
|
}
|
|
12033
12068
|
if (isNotNil28(label)) {
|
|
12034
|
-
return /* @__PURE__ */
|
|
12069
|
+
return /* @__PURE__ */ jsx264(
|
|
12035
12070
|
TabItem,
|
|
12036
12071
|
{
|
|
12037
12072
|
disabled,
|
|
@@ -12043,7 +12078,7 @@ var Tabs = forwardRef26(
|
|
|
12043
12078
|
);
|
|
12044
12079
|
}
|
|
12045
12080
|
if (isNotNil28(ariaLabelForTab)) {
|
|
12046
|
-
return /* @__PURE__ */
|
|
12081
|
+
return /* @__PURE__ */ jsx264(
|
|
12047
12082
|
TabItem,
|
|
12048
12083
|
{
|
|
12049
12084
|
"aria-label": ariaLabelForTab,
|
|
@@ -12059,7 +12094,7 @@ var Tabs = forwardRef26(
|
|
|
12059
12094
|
]
|
|
12060
12095
|
}
|
|
12061
12096
|
),
|
|
12062
|
-
/* @__PURE__ */
|
|
12097
|
+
/* @__PURE__ */ jsx264(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ jsx264(
|
|
12063
12098
|
TabPanel,
|
|
12064
12099
|
{
|
|
12065
12100
|
value: tab.props.value,
|
|
@@ -12075,19 +12110,19 @@ var Tabs = forwardRef26(
|
|
|
12075
12110
|
Tabs.displayName = "Tabs";
|
|
12076
12111
|
|
|
12077
12112
|
// src/components/Tabs/Tab.tsx
|
|
12078
|
-
import { forwardRef as
|
|
12079
|
-
import { jsx as
|
|
12080
|
-
var Tab =
|
|
12081
|
-
return /* @__PURE__ */
|
|
12113
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
12114
|
+
import { jsx as jsx265 } from "react/jsx-runtime";
|
|
12115
|
+
var Tab = forwardRef28(({ children }, ref) => {
|
|
12116
|
+
return /* @__PURE__ */ jsx265("div", { ref, children });
|
|
12082
12117
|
});
|
|
12083
12118
|
Tab.displayName = "Tab";
|
|
12084
12119
|
|
|
12085
12120
|
// src/components/Tag/Tag.tsx
|
|
12086
|
-
import { forwardRef as
|
|
12087
|
-
import
|
|
12121
|
+
import { forwardRef as forwardRef29 } from "react";
|
|
12122
|
+
import styled70 from "styled-components";
|
|
12088
12123
|
import { isNil as isNil16, isNotNil as isNotNil29, isNonEmptyString as isNonEmptyString5 } from "@wistia/type-guards";
|
|
12089
|
-
import { Fragment as Fragment8, jsx as
|
|
12090
|
-
var TagLabel =
|
|
12124
|
+
import { Fragment as Fragment8, jsx as jsx266, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
12125
|
+
var TagLabel = styled70.a`
|
|
12091
12126
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12092
12127
|
font-size: var(--wui-typography-label-4-size);
|
|
12093
12128
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -12122,14 +12157,14 @@ var TagLabel = styled69.a`
|
|
|
12122
12157
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12123
12158
|
}
|
|
12124
12159
|
`;
|
|
12125
|
-
var TagDivider =
|
|
12160
|
+
var TagDivider = styled70.div`
|
|
12126
12161
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12127
12162
|
border-left: 1px solid var(--wui-color-border);
|
|
12128
12163
|
display: flex;
|
|
12129
12164
|
height: 14px;
|
|
12130
12165
|
width: 1px;
|
|
12131
12166
|
`;
|
|
12132
|
-
var StyledRemoveButton =
|
|
12167
|
+
var StyledRemoveButton = styled70.button`
|
|
12133
12168
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12134
12169
|
all: unset;
|
|
12135
12170
|
cursor: pointer;
|
|
@@ -12157,7 +12192,7 @@ var StyledRemoveButton = styled69.button`
|
|
|
12157
12192
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12158
12193
|
}
|
|
12159
12194
|
`;
|
|
12160
|
-
var StyledTag =
|
|
12195
|
+
var StyledTag = styled70.div`
|
|
12161
12196
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12162
12197
|
align-items: center;
|
|
12163
12198
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -12179,7 +12214,7 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
12179
12214
|
);
|
|
12180
12215
|
}
|
|
12181
12216
|
return /* @__PURE__ */ jsxs43(Fragment8, { children: [
|
|
12182
|
-
/* @__PURE__ */
|
|
12217
|
+
/* @__PURE__ */ jsx266(TagDivider, { $colorScheme: colorScheme }),
|
|
12183
12218
|
/* @__PURE__ */ jsxs43(
|
|
12184
12219
|
StyledRemoveButton,
|
|
12185
12220
|
{
|
|
@@ -12187,20 +12222,20 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
12187
12222
|
onClick: onClickRemove,
|
|
12188
12223
|
type: "button",
|
|
12189
12224
|
children: [
|
|
12190
|
-
/* @__PURE__ */
|
|
12225
|
+
/* @__PURE__ */ jsx266(
|
|
12191
12226
|
Icon,
|
|
12192
12227
|
{
|
|
12193
12228
|
size: "sm",
|
|
12194
12229
|
type: "close"
|
|
12195
12230
|
}
|
|
12196
12231
|
),
|
|
12197
|
-
/* @__PURE__ */
|
|
12232
|
+
/* @__PURE__ */ jsx266(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
12198
12233
|
]
|
|
12199
12234
|
}
|
|
12200
12235
|
)
|
|
12201
12236
|
] });
|
|
12202
12237
|
};
|
|
12203
|
-
var Tag =
|
|
12238
|
+
var Tag = forwardRef29(
|
|
12204
12239
|
({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
|
|
12205
12240
|
const hasIcon = isNotNil29(icon);
|
|
12206
12241
|
const labelProps = isNotNil29(href) && isNonEmptyString5(href) ? { href, as: "a" } : { as: "span" };
|
|
@@ -12222,7 +12257,7 @@ var Tag = forwardRef28(
|
|
|
12222
12257
|
]
|
|
12223
12258
|
}
|
|
12224
12259
|
),
|
|
12225
|
-
/* @__PURE__ */
|
|
12260
|
+
/* @__PURE__ */ jsx266(
|
|
12226
12261
|
RemoveButton,
|
|
12227
12262
|
{
|
|
12228
12263
|
colorScheme,
|
|
@@ -12237,135 +12272,10 @@ var Tag = forwardRef28(
|
|
|
12237
12272
|
);
|
|
12238
12273
|
Tag.displayName = "Tag";
|
|
12239
12274
|
|
|
12240
|
-
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
12241
|
-
import styled70, { css as css36 } from "styled-components";
|
|
12242
|
-
import { isNotNil as isNotNil30 } from "@wistia/type-guards";
|
|
12243
|
-
import { jsx as jsx266, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12244
|
-
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
12245
|
-
if (iconOnly) {
|
|
12246
|
-
return /* @__PURE__ */ jsx266(
|
|
12247
|
-
"g",
|
|
12248
|
-
{
|
|
12249
|
-
"data-testid": "ui-wistia-logo-brandmark",
|
|
12250
|
-
fill: brandmarkColor,
|
|
12251
|
-
children: /* @__PURE__ */ jsx266("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" })
|
|
12252
|
-
}
|
|
12253
|
-
);
|
|
12254
|
-
}
|
|
12255
|
-
return /* @__PURE__ */ jsx266(
|
|
12256
|
-
"g",
|
|
12257
|
-
{
|
|
12258
|
-
"data-testid": "ui-wistia-logo-brandmark",
|
|
12259
|
-
fill: brandmarkColor,
|
|
12260
|
-
children: /* @__PURE__ */ jsx266("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" })
|
|
12261
|
-
}
|
|
12262
|
-
);
|
|
12263
|
-
};
|
|
12264
|
-
var renderLogotype = (logotypeColor, iconOnly) => {
|
|
12265
|
-
if (iconOnly) {
|
|
12266
|
-
return null;
|
|
12267
|
-
}
|
|
12268
|
-
return /* @__PURE__ */ jsx266(
|
|
12269
|
-
"g",
|
|
12270
|
-
{
|
|
12271
|
-
"data-testid": "ui-wistia-logo-logotype",
|
|
12272
|
-
fill: logotypeColor,
|
|
12273
|
-
children: /* @__PURE__ */ jsx266("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" })
|
|
12274
|
-
}
|
|
12275
|
-
);
|
|
12276
|
-
};
|
|
12277
|
-
var computedViewBox = (iconOnly) => {
|
|
12278
|
-
if (iconOnly) {
|
|
12279
|
-
return "0 0 34.4 26.78";
|
|
12280
|
-
}
|
|
12281
|
-
return "0 0 144 31.47";
|
|
12282
|
-
};
|
|
12283
|
-
var WistiaLogoComponent = styled70.svg`
|
|
12284
|
-
height: ${({ height }) => `${height}px`};
|
|
12285
|
-
|
|
12286
|
-
/* ensure it will always fit on mobile */
|
|
12287
|
-
max-height: 22vw;
|
|
12288
|
-
max-width: 100%;
|
|
12289
|
-
|
|
12290
|
-
&:hover {
|
|
12291
|
-
path {
|
|
12292
|
-
${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
|
|
12293
|
-
}
|
|
12294
|
-
}
|
|
12295
|
-
|
|
12296
|
-
${({ $opticallyCentered, $iconOnly }) => {
|
|
12297
|
-
if ($opticallyCentered) {
|
|
12298
|
-
if ($iconOnly) {
|
|
12299
|
-
return css36`
|
|
12300
|
-
aspect-ratio: 1;
|
|
12301
|
-
padding: 11.85% 3.12% 13.91%;
|
|
12302
|
-
`;
|
|
12303
|
-
}
|
|
12304
|
-
return css36`
|
|
12305
|
-
aspect-ratio: 127 / 32;
|
|
12306
|
-
`;
|
|
12307
|
-
}
|
|
12308
|
-
return null;
|
|
12309
|
-
}}
|
|
12310
|
-
`;
|
|
12311
|
-
var WistiaLogo = ({
|
|
12312
|
-
description = void 0,
|
|
12313
|
-
height = 100,
|
|
12314
|
-
hoverColor = void 0,
|
|
12315
|
-
href = void 0,
|
|
12316
|
-
iconOnly = false,
|
|
12317
|
-
opticallyCentered = false,
|
|
12318
|
-
title = "Wistia Logo",
|
|
12319
|
-
variant = "standard",
|
|
12320
|
-
...props
|
|
12321
|
-
}) => {
|
|
12322
|
-
const primaryColor = "#2949e5";
|
|
12323
|
-
const darkColor = "#000934";
|
|
12324
|
-
const lightColor = "#ffffff";
|
|
12325
|
-
const VARIANT_COLORS = {
|
|
12326
|
-
standard: {
|
|
12327
|
-
brandmark: primaryColor,
|
|
12328
|
-
logotype: darkColor
|
|
12329
|
-
},
|
|
12330
|
-
dark: {
|
|
12331
|
-
brandmark: darkColor,
|
|
12332
|
-
logotype: darkColor
|
|
12333
|
-
},
|
|
12334
|
-
light: {
|
|
12335
|
-
brandmark: lightColor,
|
|
12336
|
-
logotype: lightColor
|
|
12337
|
-
}
|
|
12338
|
-
};
|
|
12339
|
-
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
12340
|
-
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
12341
|
-
const Logo = /* @__PURE__ */ jsxs44(
|
|
12342
|
-
WistiaLogoComponent,
|
|
12343
|
-
{
|
|
12344
|
-
$hoverColor: hoverColor,
|
|
12345
|
-
$iconOnly: iconOnly,
|
|
12346
|
-
$opticallyCentered: opticallyCentered,
|
|
12347
|
-
height,
|
|
12348
|
-
preserveAspectRatio: opticallyCentered ? "xMidYMin" : void 0,
|
|
12349
|
-
role: "img",
|
|
12350
|
-
viewBox: computedViewBox(iconOnly),
|
|
12351
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
12352
|
-
...props,
|
|
12353
|
-
children: [
|
|
12354
|
-
/* @__PURE__ */ jsx266("title", { children: title }),
|
|
12355
|
-
isNotNil30(description) ? /* @__PURE__ */ jsx266("desc", { children: description }) : null,
|
|
12356
|
-
renderBrandmark(brandmarkColor, iconOnly),
|
|
12357
|
-
renderLogotype(logotypeColor, iconOnly)
|
|
12358
|
-
]
|
|
12359
|
-
}
|
|
12360
|
-
);
|
|
12361
|
-
return href !== void 0 ? /* @__PURE__ */ jsx266("a", { href, children: Logo }) : Logo;
|
|
12362
|
-
};
|
|
12363
|
-
WistiaLogo.displayName = "WistiaLogo";
|
|
12364
|
-
|
|
12365
12275
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
12366
12276
|
import styled71 from "styled-components";
|
|
12367
|
-
import { isNotNil as
|
|
12368
|
-
import { jsx as jsx267, jsxs as
|
|
12277
|
+
import { isNotNil as isNotNil30 } from "@wistia/type-guards";
|
|
12278
|
+
import { jsx as jsx267, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12369
12279
|
var StyledThumbnailBadge = styled71.div`
|
|
12370
12280
|
align-items: center;
|
|
12371
12281
|
background-color: rgb(0 0 0 / 50%);
|
|
@@ -12391,23 +12301,23 @@ var StyledThumbnailBadge = styled71.div`
|
|
|
12391
12301
|
}
|
|
12392
12302
|
`;
|
|
12393
12303
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
12394
|
-
return /* @__PURE__ */
|
|
12395
|
-
|
|
12304
|
+
return /* @__PURE__ */ jsxs44(StyledThumbnailBadge, { ...props, children: [
|
|
12305
|
+
isNotNil30(icon) && icon,
|
|
12396
12306
|
/* @__PURE__ */ jsx267("span", { children: label })
|
|
12397
12307
|
] });
|
|
12398
12308
|
};
|
|
12399
12309
|
ThumbnailBadge.displayName = "ThumbnailBadge";
|
|
12400
12310
|
|
|
12401
12311
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12402
|
-
import { forwardRef as
|
|
12312
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
12403
12313
|
import styled72 from "styled-components";
|
|
12404
|
-
import { isNil as isNil17, isNotNil as
|
|
12314
|
+
import { isNil as isNil17, isNotNil as isNotNil32 } from "@wistia/type-guards";
|
|
12405
12315
|
|
|
12406
12316
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
12407
|
-
import { isNotNil as
|
|
12408
|
-
import { css as
|
|
12317
|
+
import { isNotNil as isNotNil31 } from "@wistia/type-guards";
|
|
12318
|
+
import { css as css36 } from "styled-components";
|
|
12409
12319
|
var gradients = {
|
|
12410
|
-
defaultDarkOne:
|
|
12320
|
+
defaultDarkOne: css36`
|
|
12411
12321
|
background-color: #222d66;
|
|
12412
12322
|
background-image:
|
|
12413
12323
|
radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
|
|
@@ -12415,7 +12325,7 @@ var gradients = {
|
|
|
12415
12325
|
radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
|
|
12416
12326
|
radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
|
|
12417
12327
|
`,
|
|
12418
|
-
defaultDarkTwo:
|
|
12328
|
+
defaultDarkTwo: css36`
|
|
12419
12329
|
background-color: #222d66;
|
|
12420
12330
|
background-image:
|
|
12421
12331
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
|
|
@@ -12423,7 +12333,7 @@ var gradients = {
|
|
|
12423
12333
|
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12424
12334
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12425
12335
|
`,
|
|
12426
|
-
defaultLightOne:
|
|
12336
|
+
defaultLightOne: css36`
|
|
12427
12337
|
background-color: #ccd5ff;
|
|
12428
12338
|
background-image:
|
|
12429
12339
|
radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
|
|
@@ -12431,13 +12341,13 @@ var gradients = {
|
|
|
12431
12341
|
radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
|
|
12432
12342
|
radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
|
|
12433
12343
|
`,
|
|
12434
|
-
defaultLightTwo:
|
|
12344
|
+
defaultLightTwo: css36`
|
|
12435
12345
|
background-color: #ccd5ff;
|
|
12436
12346
|
background-image:
|
|
12437
12347
|
radial-gradient(ellipse at top, #ccd5ff, transparent),
|
|
12438
12348
|
radial-gradient(ellipse at bottom, #6b84ff, transparent);
|
|
12439
12349
|
`,
|
|
12440
|
-
defaultMidOne:
|
|
12350
|
+
defaultMidOne: css36`
|
|
12441
12351
|
background-color: #6b84ff;
|
|
12442
12352
|
background-image:
|
|
12443
12353
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
|
|
@@ -12445,13 +12355,13 @@ var gradients = {
|
|
|
12445
12355
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
|
|
12446
12356
|
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
|
|
12447
12357
|
`,
|
|
12448
|
-
defaultMidTwo:
|
|
12358
|
+
defaultMidTwo: css36`
|
|
12449
12359
|
background-color: #6b84ff;
|
|
12450
12360
|
background-image:
|
|
12451
12361
|
radial-gradient(ellipse at top, #2949e5, transparent),
|
|
12452
12362
|
radial-gradient(ellipse at bottom, #ccd5ff, transparent);
|
|
12453
12363
|
`,
|
|
12454
|
-
green:
|
|
12364
|
+
green: css36`
|
|
12455
12365
|
background-color: #fafffa;
|
|
12456
12366
|
background-image:
|
|
12457
12367
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -12459,7 +12369,7 @@ var gradients = {
|
|
|
12459
12369
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12460
12370
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12461
12371
|
`,
|
|
12462
|
-
greenWithPop:
|
|
12372
|
+
greenWithPop: css36`
|
|
12463
12373
|
background-color: #fafffa;
|
|
12464
12374
|
background-image:
|
|
12465
12375
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -12467,7 +12377,7 @@ var gradients = {
|
|
|
12467
12377
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12468
12378
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12469
12379
|
`,
|
|
12470
|
-
pink:
|
|
12380
|
+
pink: css36`
|
|
12471
12381
|
background-color: #fffff0;
|
|
12472
12382
|
background-image:
|
|
12473
12383
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
|
|
@@ -12475,7 +12385,7 @@ var gradients = {
|
|
|
12475
12385
|
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
12476
12386
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
|
|
12477
12387
|
`,
|
|
12478
|
-
pinkWithPop:
|
|
12388
|
+
pinkWithPop: css36`
|
|
12479
12389
|
background-color: #fffff0;
|
|
12480
12390
|
background-image:
|
|
12481
12391
|
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
@@ -12483,7 +12393,7 @@ var gradients = {
|
|
|
12483
12393
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
|
|
12484
12394
|
radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
|
|
12485
12395
|
`,
|
|
12486
|
-
playfulGradientOne:
|
|
12396
|
+
playfulGradientOne: css36`
|
|
12487
12397
|
background-color: #f7f8ff;
|
|
12488
12398
|
background-image:
|
|
12489
12399
|
radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
|
|
@@ -12491,7 +12401,7 @@ var gradients = {
|
|
|
12491
12401
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
|
|
12492
12402
|
radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
|
|
12493
12403
|
`,
|
|
12494
|
-
playfulGradientTwo:
|
|
12404
|
+
playfulGradientTwo: css36`
|
|
12495
12405
|
background-color: #f7f8ff;
|
|
12496
12406
|
background-image:
|
|
12497
12407
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
|
|
@@ -12499,13 +12409,13 @@ var gradients = {
|
|
|
12499
12409
|
radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
|
|
12500
12410
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12501
12411
|
`,
|
|
12502
|
-
purple:
|
|
12412
|
+
purple: css36`
|
|
12503
12413
|
background-color: #f2caff;
|
|
12504
12414
|
background-image:
|
|
12505
12415
|
radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
|
|
12506
12416
|
radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
|
|
12507
12417
|
`,
|
|
12508
|
-
purpleWithPop:
|
|
12418
|
+
purpleWithPop: css36`
|
|
12509
12419
|
background-color: #f2caff;
|
|
12510
12420
|
background-image:
|
|
12511
12421
|
radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
|
|
@@ -12513,7 +12423,7 @@ var gradients = {
|
|
|
12513
12423
|
radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
|
|
12514
12424
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12515
12425
|
`,
|
|
12516
|
-
yellow:
|
|
12426
|
+
yellow: css36`
|
|
12517
12427
|
background-color: #fffff0;
|
|
12518
12428
|
background-image:
|
|
12519
12429
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -12521,7 +12431,7 @@ var gradients = {
|
|
|
12521
12431
|
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
12522
12432
|
radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
|
|
12523
12433
|
`,
|
|
12524
|
-
yellowWithPop:
|
|
12434
|
+
yellowWithPop: css36`
|
|
12525
12435
|
background-color: #fffff0;
|
|
12526
12436
|
background-image:
|
|
12527
12437
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -12532,11 +12442,11 @@ var gradients = {
|
|
|
12532
12442
|
};
|
|
12533
12443
|
var gradientMap = Object.keys(gradients);
|
|
12534
12444
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
12535
|
-
return
|
|
12445
|
+
return isNotNil31(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
12536
12446
|
};
|
|
12537
12447
|
|
|
12538
12448
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12539
|
-
import { jsx as jsx268, jsxs as
|
|
12449
|
+
import { jsx as jsx268, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
12540
12450
|
var WideThumbnailImage = styled72.img`
|
|
12541
12451
|
height: 100%;
|
|
12542
12452
|
object-fit: cover;
|
|
@@ -12553,6 +12463,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
12553
12463
|
WideThumbnailImage,
|
|
12554
12464
|
{
|
|
12555
12465
|
alt: "",
|
|
12466
|
+
role: "img",
|
|
12556
12467
|
src: thumbnailUrl
|
|
12557
12468
|
}
|
|
12558
12469
|
);
|
|
@@ -12561,12 +12472,13 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
12561
12472
|
SquareThumbnailImage,
|
|
12562
12473
|
{
|
|
12563
12474
|
alt: "",
|
|
12475
|
+
role: "img",
|
|
12564
12476
|
src: thumbnailUrl
|
|
12565
12477
|
}
|
|
12566
12478
|
);
|
|
12567
12479
|
};
|
|
12568
12480
|
var StyledThumbnail = styled72.div`
|
|
12569
|
-
background-image: ${({ $backgroundUrl }) =>
|
|
12481
|
+
background-image: ${({ $backgroundUrl }) => isNotNil32($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
12570
12482
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
12571
12483
|
// if we don't have $backgroundUrl show a gradient
|
|
12572
12484
|
isNil17($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
@@ -12584,7 +12496,7 @@ var StyledThumbnail = styled72.div`
|
|
|
12584
12496
|
border-radius: calc(8% * (9 / 16)) / 8%;
|
|
12585
12497
|
}
|
|
12586
12498
|
`;
|
|
12587
|
-
var Thumbnail =
|
|
12499
|
+
var Thumbnail = forwardRef30(
|
|
12588
12500
|
({
|
|
12589
12501
|
gradientBackground = "defaultMidOne",
|
|
12590
12502
|
thumbnailImageType = "square",
|
|
@@ -12593,18 +12505,19 @@ var Thumbnail = forwardRef29(
|
|
|
12593
12505
|
children,
|
|
12594
12506
|
...props
|
|
12595
12507
|
}, ref) => {
|
|
12596
|
-
const backgroundUrl = thumbnailImageType === "square" &&
|
|
12597
|
-
return /* @__PURE__ */
|
|
12508
|
+
const backgroundUrl = thumbnailImageType === "square" && isNotNil32(thumbnailUrl) ? thumbnailUrl : void 0;
|
|
12509
|
+
return /* @__PURE__ */ jsxs45(
|
|
12598
12510
|
StyledThumbnail,
|
|
12599
12511
|
{
|
|
12600
12512
|
ref,
|
|
12513
|
+
...props,
|
|
12601
12514
|
$backgroundUrl: backgroundUrl,
|
|
12602
12515
|
$gradientBackground: gradientBackground,
|
|
12603
12516
|
$width: width,
|
|
12604
|
-
|
|
12517
|
+
role: "presentation",
|
|
12605
12518
|
children: [
|
|
12606
|
-
|
|
12607
|
-
|
|
12519
|
+
isNotNil32(children) ? children : null,
|
|
12520
|
+
isNotNil32(thumbnailUrl) ? /* @__PURE__ */ jsx268(
|
|
12608
12521
|
ThumbnailImage,
|
|
12609
12522
|
{
|
|
12610
12523
|
thumbnailImageType,
|
|
@@ -12618,69 +12531,237 @@ var Thumbnail = forwardRef29(
|
|
|
12618
12531
|
);
|
|
12619
12532
|
Thumbnail.displayName = "Thumbnail";
|
|
12620
12533
|
|
|
12621
|
-
// src/components/
|
|
12534
|
+
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
12535
|
+
import React2 from "react";
|
|
12622
12536
|
import styled73 from "styled-components";
|
|
12623
|
-
import {
|
|
12624
|
-
import { isFunction as isFunction3 } from "@wistia/type-guards";
|
|
12537
|
+
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
12625
12538
|
import { jsx as jsx269 } from "react/jsx-runtime";
|
|
12626
|
-
var
|
|
12627
|
-
|
|
12628
|
-
|
|
12539
|
+
var StyledThumbnailCollage = styled73.div`
|
|
12540
|
+
display: grid;
|
|
12541
|
+
gap: var(--wui-space-01);
|
|
12542
|
+
width: 100%;
|
|
12543
|
+
grid-template-columns: 3fr 2fr;
|
|
12544
|
+
grid-template-rows: 1fr 1fr;
|
|
12545
|
+
aspect-ratio: 16 / 9;
|
|
12546
|
+
|
|
12547
|
+
&:has(:nth-child(1)) {
|
|
12548
|
+
--wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
|
|
12549
|
+
|
|
12550
|
+
grid-template-areas:
|
|
12551
|
+
'a a'
|
|
12552
|
+
'a a';
|
|
12629
12553
|
}
|
|
12630
12554
|
|
|
12631
|
-
|
|
12632
|
-
|
|
12555
|
+
&:has(:nth-child(2)) {
|
|
12556
|
+
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
12557
|
+
--wui-collage-thumbnail-second-border-radius: 11.5% / 8%;
|
|
12558
|
+
|
|
12559
|
+
grid-template-areas:
|
|
12560
|
+
'a b'
|
|
12561
|
+
'a b';
|
|
12562
|
+
}
|
|
12563
|
+
|
|
12564
|
+
&:has(:nth-child(3)) {
|
|
12565
|
+
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
12566
|
+
--wui-collage-thumbnail-second-border-radius: 11.5% / 16%;
|
|
12567
|
+
--wui-collage-thumbnail-third-border-radius: 11.5% / 16%;
|
|
12568
|
+
|
|
12569
|
+
grid-template-areas:
|
|
12570
|
+
'a b'
|
|
12571
|
+
'a c';
|
|
12572
|
+
}
|
|
12573
|
+
|
|
12574
|
+
> :nth-child(1) {
|
|
12575
|
+
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
|
|
12576
|
+
|
|
12577
|
+
grid-area: a;
|
|
12578
|
+
}
|
|
12579
|
+
|
|
12580
|
+
> :nth-child(2) {
|
|
12581
|
+
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
|
|
12582
|
+
|
|
12583
|
+
grid-area: b;
|
|
12584
|
+
}
|
|
12585
|
+
|
|
12586
|
+
> :nth-child(3) {
|
|
12587
|
+
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
|
|
12588
|
+
|
|
12589
|
+
grid-area: c;
|
|
12590
|
+
}
|
|
12591
|
+
|
|
12592
|
+
> * {
|
|
12593
|
+
aspect-ratio: unset;
|
|
12594
|
+
height: 100%;
|
|
12595
|
+
width: 100%;
|
|
12596
|
+
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
12597
|
+
|
|
12598
|
+
img {
|
|
12599
|
+
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
12600
|
+
}
|
|
12601
|
+
|
|
12602
|
+
> :not(img) {
|
|
12603
|
+
display: none;
|
|
12604
|
+
}
|
|
12633
12605
|
}
|
|
12634
12606
|
`;
|
|
12635
|
-
var
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
event.preventDefault();
|
|
12652
|
-
if (isFunction3(props.onClick)) {
|
|
12653
|
-
props.onClick(event);
|
|
12654
|
-
}
|
|
12655
|
-
void copyToClipboard(value).then(() => {
|
|
12656
|
-
setIsCopied(true);
|
|
12657
|
-
if (isFunction3(onCopy)) {
|
|
12658
|
-
onCopy(value);
|
|
12659
|
-
}
|
|
12660
|
-
return value;
|
|
12661
|
-
});
|
|
12662
|
-
};
|
|
12663
|
-
return /* @__PURE__ */ jsx269(
|
|
12664
|
-
StyledInput2,
|
|
12607
|
+
var ThumbnailCollage = ({
|
|
12608
|
+
children = [],
|
|
12609
|
+
gradientBackground = "defaultMidOne",
|
|
12610
|
+
...props
|
|
12611
|
+
}) => {
|
|
12612
|
+
const thumbnailArray = React2.Children.toArray(children);
|
|
12613
|
+
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
12614
|
+
const thumbnails = isNonEmptyArray(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
12615
|
+
return React2.cloneElement(child, {
|
|
12616
|
+
...child.props,
|
|
12617
|
+
children: void 0
|
|
12618
|
+
});
|
|
12619
|
+
}) : [
|
|
12620
|
+
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
12621
|
+
/* @__PURE__ */ jsx269(
|
|
12622
|
+
Thumbnail,
|
|
12665
12623
|
{
|
|
12666
|
-
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12624
|
+
gradientBackground,
|
|
12625
|
+
thumbnailUrl: null
|
|
12626
|
+
},
|
|
12627
|
+
"fallback"
|
|
12628
|
+
)
|
|
12629
|
+
];
|
|
12630
|
+
return /* @__PURE__ */ jsx269(
|
|
12631
|
+
StyledThumbnailCollage,
|
|
12632
|
+
{
|
|
12633
|
+
$gradientBackground: gradientBackground,
|
|
12634
|
+
"data-wui-thumbnail-collage": true,
|
|
12635
|
+
...props,
|
|
12636
|
+
children: thumbnails
|
|
12637
|
+
}
|
|
12638
|
+
);
|
|
12639
|
+
};
|
|
12640
|
+
|
|
12641
|
+
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
12642
|
+
import styled74, { css as css37 } from "styled-components";
|
|
12643
|
+
import { isNotNil as isNotNil33 } from "@wistia/type-guards";
|
|
12644
|
+
import { jsx as jsx270, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
12645
|
+
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
12646
|
+
if (iconOnly) {
|
|
12647
|
+
return /* @__PURE__ */ jsx270(
|
|
12648
|
+
"g",
|
|
12649
|
+
{
|
|
12650
|
+
"data-testid": "ui-wistia-logo-brandmark",
|
|
12651
|
+
fill: brandmarkColor,
|
|
12652
|
+
children: /* @__PURE__ */ jsx270("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" })
|
|
12679
12653
|
}
|
|
12680
12654
|
);
|
|
12681
12655
|
}
|
|
12682
|
-
|
|
12683
|
-
|
|
12656
|
+
return /* @__PURE__ */ jsx270(
|
|
12657
|
+
"g",
|
|
12658
|
+
{
|
|
12659
|
+
"data-testid": "ui-wistia-logo-brandmark",
|
|
12660
|
+
fill: brandmarkColor,
|
|
12661
|
+
children: /* @__PURE__ */ jsx270("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" })
|
|
12662
|
+
}
|
|
12663
|
+
);
|
|
12664
|
+
};
|
|
12665
|
+
var renderLogotype = (logotypeColor, iconOnly) => {
|
|
12666
|
+
if (iconOnly) {
|
|
12667
|
+
return null;
|
|
12668
|
+
}
|
|
12669
|
+
return /* @__PURE__ */ jsx270(
|
|
12670
|
+
"g",
|
|
12671
|
+
{
|
|
12672
|
+
"data-testid": "ui-wistia-logo-logotype",
|
|
12673
|
+
fill: logotypeColor,
|
|
12674
|
+
children: /* @__PURE__ */ jsx270("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" })
|
|
12675
|
+
}
|
|
12676
|
+
);
|
|
12677
|
+
};
|
|
12678
|
+
var computedViewBox = (iconOnly) => {
|
|
12679
|
+
if (iconOnly) {
|
|
12680
|
+
return "0 0 34.4 26.78";
|
|
12681
|
+
}
|
|
12682
|
+
return "0 0 144 31.47";
|
|
12683
|
+
};
|
|
12684
|
+
var WistiaLogoComponent = styled74.svg`
|
|
12685
|
+
height: ${({ height }) => `${height}px`};
|
|
12686
|
+
|
|
12687
|
+
/* ensure it will always fit on mobile */
|
|
12688
|
+
max-height: 22vw;
|
|
12689
|
+
max-width: 100%;
|
|
12690
|
+
|
|
12691
|
+
&:hover {
|
|
12692
|
+
path {
|
|
12693
|
+
${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
|
|
12694
|
+
}
|
|
12695
|
+
}
|
|
12696
|
+
|
|
12697
|
+
${({ $opticallyCentered, $iconOnly }) => {
|
|
12698
|
+
if ($opticallyCentered) {
|
|
12699
|
+
if ($iconOnly) {
|
|
12700
|
+
return css37`
|
|
12701
|
+
aspect-ratio: 1;
|
|
12702
|
+
padding: 11.85% 3.12% 13.91%;
|
|
12703
|
+
`;
|
|
12704
|
+
}
|
|
12705
|
+
return css37`
|
|
12706
|
+
aspect-ratio: 127 / 32;
|
|
12707
|
+
`;
|
|
12708
|
+
}
|
|
12709
|
+
return null;
|
|
12710
|
+
}}
|
|
12711
|
+
`;
|
|
12712
|
+
var WistiaLogo = ({
|
|
12713
|
+
description = void 0,
|
|
12714
|
+
height = 100,
|
|
12715
|
+
hoverColor = void 0,
|
|
12716
|
+
href = void 0,
|
|
12717
|
+
iconOnly = false,
|
|
12718
|
+
opticallyCentered = false,
|
|
12719
|
+
title = "Wistia Logo",
|
|
12720
|
+
variant = "standard",
|
|
12721
|
+
...props
|
|
12722
|
+
}) => {
|
|
12723
|
+
const primaryColor = "#2949e5";
|
|
12724
|
+
const darkColor = "#000934";
|
|
12725
|
+
const lightColor = "#ffffff";
|
|
12726
|
+
const VARIANT_COLORS = {
|
|
12727
|
+
standard: {
|
|
12728
|
+
brandmark: primaryColor,
|
|
12729
|
+
logotype: darkColor
|
|
12730
|
+
},
|
|
12731
|
+
dark: {
|
|
12732
|
+
brandmark: darkColor,
|
|
12733
|
+
logotype: darkColor
|
|
12734
|
+
},
|
|
12735
|
+
light: {
|
|
12736
|
+
brandmark: lightColor,
|
|
12737
|
+
logotype: lightColor
|
|
12738
|
+
}
|
|
12739
|
+
};
|
|
12740
|
+
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
12741
|
+
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
12742
|
+
const Logo = /* @__PURE__ */ jsxs46(
|
|
12743
|
+
WistiaLogoComponent,
|
|
12744
|
+
{
|
|
12745
|
+
$hoverColor: hoverColor,
|
|
12746
|
+
$iconOnly: iconOnly,
|
|
12747
|
+
$opticallyCentered: opticallyCentered,
|
|
12748
|
+
height,
|
|
12749
|
+
preserveAspectRatio: opticallyCentered ? "xMidYMin" : void 0,
|
|
12750
|
+
role: "img",
|
|
12751
|
+
viewBox: computedViewBox(iconOnly),
|
|
12752
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12753
|
+
...props,
|
|
12754
|
+
children: [
|
|
12755
|
+
/* @__PURE__ */ jsx270("title", { children: title }),
|
|
12756
|
+
isNotNil33(description) ? /* @__PURE__ */ jsx270("desc", { children: description }) : null,
|
|
12757
|
+
renderBrandmark(brandmarkColor, iconOnly),
|
|
12758
|
+
renderLogotype(logotypeColor, iconOnly)
|
|
12759
|
+
]
|
|
12760
|
+
}
|
|
12761
|
+
);
|
|
12762
|
+
return href !== void 0 ? /* @__PURE__ */ jsx270("a", { href, children: Logo }) : Logo;
|
|
12763
|
+
};
|
|
12764
|
+
WistiaLogo.displayName = "WistiaLogo";
|
|
12684
12765
|
export {
|
|
12685
12766
|
ActionButton,
|
|
12686
12767
|
Avatar,
|
|
@@ -12756,6 +12837,7 @@ export {
|
|
|
12756
12837
|
Text,
|
|
12757
12838
|
Thumbnail,
|
|
12758
12839
|
ThumbnailBadge,
|
|
12840
|
+
ThumbnailCollage,
|
|
12759
12841
|
Tooltip,
|
|
12760
12842
|
UIProvider,
|
|
12761
12843
|
WistiaLogo,
|