@wistia/ui 0.8.21 → 0.8.22
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 +521 -389
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.mjs +476 -345
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
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.22
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -1309,13 +1309,13 @@ var motionTokens = css9`
|
|
|
1309
1309
|
--wui-motion-duration-05: 400ms;
|
|
1310
1310
|
--wui-motion-duration-06: 700ms;
|
|
1311
1311
|
|
|
1312
|
-
@media (prefers-reduced-motion) {
|
|
1313
|
-
--wui-motion-duration-01:
|
|
1314
|
-
--wui-motion-duration-02:
|
|
1315
|
-
--wui-motion-duration-03:
|
|
1316
|
-
--wui-motion-duration-04:
|
|
1317
|
-
--wui-motion-duration-05:
|
|
1318
|
-
--wui-motion-duration-06:
|
|
1312
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1313
|
+
--wui-motion-duration-01: 0.01ms;
|
|
1314
|
+
--wui-motion-duration-02: 0.01ms;
|
|
1315
|
+
--wui-motion-duration-03: 0.01ms;
|
|
1316
|
+
--wui-motion-duration-04: 0.01ms;
|
|
1317
|
+
--wui-motion-duration-05: 0.01ms;
|
|
1318
|
+
--wui-motion-duration-06: 0.01ms;
|
|
1319
1319
|
}
|
|
1320
1320
|
|
|
1321
1321
|
/* Easings */
|
|
@@ -6987,6 +6987,8 @@ var Link = forwardRef(
|
|
|
6987
6987
|
underline = false,
|
|
6988
6988
|
leftIcon,
|
|
6989
6989
|
rightIcon,
|
|
6990
|
+
"aria-disabled": ariaDisabled,
|
|
6991
|
+
role,
|
|
6990
6992
|
...props
|
|
6991
6993
|
}, ref) => {
|
|
6992
6994
|
const inRouterContext = useInRouterContext();
|
|
@@ -7020,7 +7022,8 @@ var Link = forwardRef(
|
|
|
7020
7022
|
$colorScheme: colorScheme,
|
|
7021
7023
|
$disabled: disabled,
|
|
7022
7024
|
$underline: underline,
|
|
7023
|
-
onClick: handleClick
|
|
7025
|
+
onClick: handleClick,
|
|
7026
|
+
"aria-disabled": ariaDisabled ?? (disabled ? "true" : void 0)
|
|
7024
7027
|
};
|
|
7025
7028
|
if (isButton(props)) {
|
|
7026
7029
|
return /* @__PURE__ */ jsx192(
|
|
@@ -7053,11 +7056,18 @@ var Link = forwardRef(
|
|
|
7053
7056
|
...externalLinkProps,
|
|
7054
7057
|
...routerSpecificProps
|
|
7055
7058
|
};
|
|
7056
|
-
return /* @__PURE__ */ jsxs7(
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7059
|
+
return /* @__PURE__ */ jsxs7(
|
|
7060
|
+
StyledLink,
|
|
7061
|
+
{
|
|
7062
|
+
...combinedProps,
|
|
7063
|
+
role: role ?? (disabled ? "link" : void 0),
|
|
7064
|
+
children: [
|
|
7065
|
+
leftIcon ?? null,
|
|
7066
|
+
children,
|
|
7067
|
+
rightIcon ?? null
|
|
7068
|
+
]
|
|
7069
|
+
}
|
|
7070
|
+
);
|
|
7061
7071
|
}
|
|
7062
7072
|
return null;
|
|
7063
7073
|
}
|
|
@@ -8392,11 +8402,11 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
8392
8402
|
ClickRegion.displayName = "ClickRegion";
|
|
8393
8403
|
|
|
8394
8404
|
// src/components/Collapsible/Collapsible.tsx
|
|
8395
|
-
import { Root } from "@radix-ui/react-collapsible";
|
|
8405
|
+
import { Root as CollapsibleRoot } from "@radix-ui/react-collapsible";
|
|
8396
8406
|
import { isNotNil as isNotNil13 } from "@wistia/type-guards";
|
|
8397
8407
|
import styled21 from "styled-components";
|
|
8398
8408
|
import { jsx as jsx209 } from "react/jsx-runtime";
|
|
8399
|
-
var StyledRoot = styled21(
|
|
8409
|
+
var StyledRoot = styled21(CollapsibleRoot)`
|
|
8400
8410
|
&[data-state='closed'] [data-wui-collapsible-content] {
|
|
8401
8411
|
display: -webkit-box;
|
|
8402
8412
|
-webkit-box-orient: vertical;
|
|
@@ -8430,12 +8440,19 @@ import styled22 from "styled-components";
|
|
|
8430
8440
|
import { Content } from "@radix-ui/react-collapsible";
|
|
8431
8441
|
import { isNotUndefined as isNotUndefined6 } from "@wistia/type-guards";
|
|
8432
8442
|
import { Fragment as Fragment4, jsx as jsx211, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
8433
|
-
var ClampedContent = styled22.div
|
|
8443
|
+
var ClampedContent = styled22.div`
|
|
8434
8444
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
8435
8445
|
`;
|
|
8436
8446
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
8437
8447
|
if (isNotUndefined6(clamp)) {
|
|
8438
|
-
return /* @__PURE__ */ jsx211(
|
|
8448
|
+
return /* @__PURE__ */ jsx211(
|
|
8449
|
+
ClampedContent,
|
|
8450
|
+
{
|
|
8451
|
+
$clamp: clamp,
|
|
8452
|
+
"data-wui-collapsible-content": "true",
|
|
8453
|
+
children
|
|
8454
|
+
}
|
|
8455
|
+
);
|
|
8439
8456
|
}
|
|
8440
8457
|
return /* @__PURE__ */ jsx211(Content, { children: /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
8441
8458
|
children,
|
|
@@ -10087,15 +10104,124 @@ var InputClickToCopy = forwardRef14(
|
|
|
10087
10104
|
);
|
|
10088
10105
|
InputClickToCopy.displayName = "InputClickToCopy";
|
|
10089
10106
|
|
|
10107
|
+
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
10108
|
+
import styled39 from "styled-components";
|
|
10109
|
+
import { isNotNil as isNotNil18 } from "@wistia/type-guards";
|
|
10110
|
+
import { jsx as jsx231, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
10111
|
+
var StyledKeyboardShortcut = styled39.div`
|
|
10112
|
+
align-items: center;
|
|
10113
|
+
display: flex;
|
|
10114
|
+
gap: var(--wui-space-02);
|
|
10115
|
+
${({ $fullWidth }) => $fullWidth && "width: 100%; justify-content: space-between;"}
|
|
10116
|
+
`;
|
|
10117
|
+
var StyledKey = styled39.kbd`
|
|
10118
|
+
align-items: center;
|
|
10119
|
+
background: var(--wui-color-bg-surface-secondary);
|
|
10120
|
+
border-bottom: 1px solid var(--wui-color-border-secondary);
|
|
10121
|
+
border-radius: 4px;
|
|
10122
|
+
color: var(--wui-color-text);
|
|
10123
|
+
display: flex;
|
|
10124
|
+
font-family: InterVariable, sans-serif;
|
|
10125
|
+
|
|
10126
|
+
/* Adds serif to uppercase "I" to distinguish it from "l": https://rsms.me/inter/glyphs/?g=I.1 */
|
|
10127
|
+
font-feature-settings: 'cv08' on;
|
|
10128
|
+
font-size: 10px;
|
|
10129
|
+
|
|
10130
|
+
/* Adds a slash to the zero to distinguish it from the letter "O": https://rsms.me/inter/glyphs/?g=zero.tf.slash */
|
|
10131
|
+
|
|
10132
|
+
/* Adds tabular numbers to ensure the width of the key is consistent */
|
|
10133
|
+
font-variant-numeric: slashed-zero tabular-nums;
|
|
10134
|
+
height: 20px;
|
|
10135
|
+
justify-content: center;
|
|
10136
|
+
line-height: 20px;
|
|
10137
|
+
min-width: 20px;
|
|
10138
|
+
padding: 0 var(--wui-space-01);
|
|
10139
|
+
`;
|
|
10140
|
+
var Label2 = styled39.span`
|
|
10141
|
+
color: var(--wui-color-text);
|
|
10142
|
+
font-size: 12px;
|
|
10143
|
+
`;
|
|
10144
|
+
var KeysContainer = styled39.div`
|
|
10145
|
+
display: flex;
|
|
10146
|
+
gap: var(--wui-space-01);
|
|
10147
|
+
`;
|
|
10148
|
+
var keyToString = (key) => {
|
|
10149
|
+
switch (key) {
|
|
10150
|
+
// Arrow Keys
|
|
10151
|
+
case "ArrowDown":
|
|
10152
|
+
return "\u2193";
|
|
10153
|
+
case "ArrowLeft":
|
|
10154
|
+
return "\u2190";
|
|
10155
|
+
case "ArrowRight":
|
|
10156
|
+
return "\u2192";
|
|
10157
|
+
case "ArrowUp":
|
|
10158
|
+
return "\u2191";
|
|
10159
|
+
// Modifier Keys
|
|
10160
|
+
case "Alt":
|
|
10161
|
+
return "Alt";
|
|
10162
|
+
case "Cmd":
|
|
10163
|
+
case "Meta":
|
|
10164
|
+
if (/Mac|iPhone|iPad/.test(window.navigator.userAgent)) {
|
|
10165
|
+
return "\u2318";
|
|
10166
|
+
}
|
|
10167
|
+
if (window.navigator.userAgent.includes("Win")) {
|
|
10168
|
+
return "\u229E";
|
|
10169
|
+
}
|
|
10170
|
+
return "^";
|
|
10171
|
+
case "Ctrl":
|
|
10172
|
+
return "Ctrl";
|
|
10173
|
+
case "Option":
|
|
10174
|
+
return "\u2325";
|
|
10175
|
+
case "Shift":
|
|
10176
|
+
return "\u21E7";
|
|
10177
|
+
// Whitespace Keys
|
|
10178
|
+
case "Enter":
|
|
10179
|
+
return "\u21B5";
|
|
10180
|
+
case "Space":
|
|
10181
|
+
return "Space";
|
|
10182
|
+
case "Tab":
|
|
10183
|
+
return "Tab";
|
|
10184
|
+
case "Backspace":
|
|
10185
|
+
return "Del";
|
|
10186
|
+
case "Esc":
|
|
10187
|
+
return "Esc";
|
|
10188
|
+
default:
|
|
10189
|
+
return key.toUpperCase();
|
|
10190
|
+
}
|
|
10191
|
+
};
|
|
10192
|
+
var KeyboardShortcut = ({
|
|
10193
|
+
label,
|
|
10194
|
+
keyboardKeys,
|
|
10195
|
+
fullWidth = false,
|
|
10196
|
+
...otherProps
|
|
10197
|
+
}) => /* @__PURE__ */ jsxs25(
|
|
10198
|
+
StyledKeyboardShortcut,
|
|
10199
|
+
{
|
|
10200
|
+
$fullWidth: fullWidth,
|
|
10201
|
+
...otherProps,
|
|
10202
|
+
children: [
|
|
10203
|
+
isNotNil18(label) && /* @__PURE__ */ jsx231(Label2, { children: label }),
|
|
10204
|
+
/* @__PURE__ */ jsx231(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ jsx231(
|
|
10205
|
+
StyledKey,
|
|
10206
|
+
{
|
|
10207
|
+
children: keyToString(keyboardKey)
|
|
10208
|
+
},
|
|
10209
|
+
index
|
|
10210
|
+
)) })
|
|
10211
|
+
]
|
|
10212
|
+
}
|
|
10213
|
+
);
|
|
10214
|
+
KeyboardShortcut.displayName = "KeyboardShortcut";
|
|
10215
|
+
|
|
10090
10216
|
// src/components/Menu/Menu.tsx
|
|
10091
|
-
import
|
|
10217
|
+
import styled40, { css as css29, keyframes as keyframes3 } from "styled-components";
|
|
10092
10218
|
import {
|
|
10093
10219
|
DropdownMenu,
|
|
10094
10220
|
DropdownMenuTrigger,
|
|
10095
10221
|
DropdownMenuPortal,
|
|
10096
10222
|
DropdownMenuContent
|
|
10097
10223
|
} from "@radix-ui/react-dropdown-menu";
|
|
10098
|
-
import { isNotNil as
|
|
10224
|
+
import { isNotNil as isNotNil19, isNotUndefined as isNotUndefined10 } from "@wistia/type-guards";
|
|
10099
10225
|
import { useMemo as useMemo7 } from "react";
|
|
10100
10226
|
|
|
10101
10227
|
// src/components/Menu/MenuContext.tsx
|
|
@@ -10104,7 +10230,7 @@ var MenuContext = createContext6({ compact: false });
|
|
|
10104
10230
|
var useMenuContext = () => useContext5(MenuContext);
|
|
10105
10231
|
|
|
10106
10232
|
// src/components/Menu/Menu.tsx
|
|
10107
|
-
import { jsx as
|
|
10233
|
+
import { jsx as jsx232, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
10108
10234
|
var open = keyframes3`
|
|
10109
10235
|
from {
|
|
10110
10236
|
opacity: 0;
|
|
@@ -10189,7 +10315,7 @@ var menuContentCss = css29`
|
|
|
10189
10315
|
margin: var(--menu-divider-margin) 0;
|
|
10190
10316
|
}
|
|
10191
10317
|
`;
|
|
10192
|
-
var MenuContent =
|
|
10318
|
+
var MenuContent = styled40(DropdownMenuContent)`
|
|
10193
10319
|
${menuContentCss}
|
|
10194
10320
|
`;
|
|
10195
10321
|
var Menu = ({
|
|
@@ -10207,7 +10333,7 @@ var Menu = ({
|
|
|
10207
10333
|
}) => {
|
|
10208
10334
|
const contextValue = useMemo7(() => ({ compact }), [compact]);
|
|
10209
10335
|
let controlProps = {
|
|
10210
|
-
...
|
|
10336
|
+
...isNotNil19(onOpenChange) && isNotNil19(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
10211
10337
|
};
|
|
10212
10338
|
if (disabled) {
|
|
10213
10339
|
controlProps = {
|
|
@@ -10215,24 +10341,24 @@ var Menu = ({
|
|
|
10215
10341
|
onOpenChange: () => null
|
|
10216
10342
|
};
|
|
10217
10343
|
}
|
|
10218
|
-
return /* @__PURE__ */
|
|
10344
|
+
return /* @__PURE__ */ jsx232(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs26(
|
|
10219
10345
|
DropdownMenu,
|
|
10220
10346
|
{
|
|
10221
10347
|
modal: false,
|
|
10222
10348
|
...controlProps,
|
|
10223
10349
|
children: [
|
|
10224
|
-
/* @__PURE__ */
|
|
10350
|
+
/* @__PURE__ */ jsx232(DropdownMenuTrigger, { asChild: true, children: isNotUndefined10(trigger) ? trigger : /* @__PURE__ */ jsx232(
|
|
10225
10351
|
Button,
|
|
10226
10352
|
{
|
|
10227
10353
|
"aria-expanded": isOpen,
|
|
10228
10354
|
disabled,
|
|
10229
10355
|
forceState: isOpen ? "active" : void 0,
|
|
10230
|
-
rightIcon: /* @__PURE__ */
|
|
10356
|
+
rightIcon: /* @__PURE__ */ jsx232(Icon, { type: "caret-down" }),
|
|
10231
10357
|
...triggerProps,
|
|
10232
10358
|
children: label
|
|
10233
10359
|
}
|
|
10234
10360
|
) }),
|
|
10235
|
-
/* @__PURE__ */
|
|
10361
|
+
/* @__PURE__ */ jsx232(DropdownMenuPortal, { children: /* @__PURE__ */ jsx232(
|
|
10236
10362
|
MenuContent,
|
|
10237
10363
|
{
|
|
10238
10364
|
...props,
|
|
@@ -10252,19 +10378,19 @@ var Menu = ({
|
|
|
10252
10378
|
Menu.displayName = "Menu";
|
|
10253
10379
|
|
|
10254
10380
|
// src/components/Menu/MenuLabel.tsx
|
|
10255
|
-
import
|
|
10381
|
+
import styled41 from "styled-components";
|
|
10256
10382
|
import { DropdownMenuLabel } from "@radix-ui/react-dropdown-menu";
|
|
10257
|
-
import { jsx as
|
|
10258
|
-
var StyledMenuLabel =
|
|
10383
|
+
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
10384
|
+
var StyledMenuLabel = styled41(DropdownMenuLabel)`
|
|
10259
10385
|
padding: var(--wui-space-02);
|
|
10260
10386
|
`;
|
|
10261
10387
|
var MenuLabel = ({ children, ...props }) => {
|
|
10262
|
-
return /* @__PURE__ */
|
|
10388
|
+
return /* @__PURE__ */ jsx233(
|
|
10263
10389
|
StyledMenuLabel,
|
|
10264
10390
|
{
|
|
10265
10391
|
asChild: true,
|
|
10266
10392
|
...props,
|
|
10267
|
-
children: /* @__PURE__ */
|
|
10393
|
+
children: /* @__PURE__ */ jsx233(
|
|
10268
10394
|
Heading,
|
|
10269
10395
|
{
|
|
10270
10396
|
renderAs: "span",
|
|
@@ -10280,7 +10406,7 @@ MenuLabel.displayName = "MenuLabel";
|
|
|
10280
10406
|
|
|
10281
10407
|
// src/components/Menu/SubMenu.tsx
|
|
10282
10408
|
import { useState as useState13 } from "react";
|
|
10283
|
-
import
|
|
10409
|
+
import styled44 from "styled-components";
|
|
10284
10410
|
import {
|
|
10285
10411
|
DropdownMenuPortal as DropdownMenuPortal2,
|
|
10286
10412
|
DropdownMenuSub,
|
|
@@ -10289,14 +10415,14 @@ import {
|
|
|
10289
10415
|
DropdownMenuSubTrigger,
|
|
10290
10416
|
DropdownMenuItem
|
|
10291
10417
|
} from "@radix-ui/react-dropdown-menu";
|
|
10292
|
-
import { isNotNil as
|
|
10418
|
+
import { isNotNil as isNotNil21 } from "@wistia/type-guards";
|
|
10293
10419
|
|
|
10294
10420
|
// src/components/Menu/MenuItemButton.tsx
|
|
10295
10421
|
import { forwardRef as forwardRef15 } from "react";
|
|
10296
|
-
import
|
|
10297
|
-
import { isNotNil as
|
|
10298
|
-
import { jsx as
|
|
10299
|
-
var StyledButton3 =
|
|
10422
|
+
import styled42 from "styled-components";
|
|
10423
|
+
import { isNotNil as isNotNil20, isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
|
|
10424
|
+
import { jsx as jsx234, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
10425
|
+
var StyledButton3 = styled42(Button)`
|
|
10300
10426
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
10301
10427
|
|
|
10302
10428
|
display: flex;
|
|
@@ -10335,7 +10461,7 @@ var StyledButton3 = styled41(Button)`
|
|
|
10335
10461
|
padding-left: var(--wui-space-04);
|
|
10336
10462
|
}
|
|
10337
10463
|
`;
|
|
10338
|
-
var StyledLeftIconContainer =
|
|
10464
|
+
var StyledLeftIconContainer = styled42.div`
|
|
10339
10465
|
height: var(--menu-item-left-icon-size);
|
|
10340
10466
|
width: var(--menu-item-left-icon-size);
|
|
10341
10467
|
|
|
@@ -10346,7 +10472,7 @@ var StyledLeftIconContainer = styled41.div`
|
|
|
10346
10472
|
}
|
|
10347
10473
|
}
|
|
10348
10474
|
`;
|
|
10349
|
-
var StyledRightIconContainer =
|
|
10475
|
+
var StyledRightIconContainer = styled42.div`
|
|
10350
10476
|
height: var(--menu-item-right-icon-size);
|
|
10351
10477
|
width: var(--menu-item-right-icon-size);
|
|
10352
10478
|
|
|
@@ -10357,13 +10483,13 @@ var StyledRightIconContainer = styled41.div`
|
|
|
10357
10483
|
}
|
|
10358
10484
|
}
|
|
10359
10485
|
`;
|
|
10360
|
-
var StyledLabelAndDescriptionContainer =
|
|
10486
|
+
var StyledLabelAndDescriptionContainer = styled42.div`
|
|
10361
10487
|
display: flex;
|
|
10362
10488
|
flex-direction: column;
|
|
10363
10489
|
gap: var(--menu-label-description-gap);
|
|
10364
10490
|
flex-basis: 100%;
|
|
10365
10491
|
`;
|
|
10366
|
-
var StyledBadgeContainer =
|
|
10492
|
+
var StyledBadgeContainer = styled42.div`
|
|
10367
10493
|
align-self: start;
|
|
10368
10494
|
justify-self: end;
|
|
10369
10495
|
font-size: var(--wui-typography-label-4-size);
|
|
@@ -10378,7 +10504,7 @@ var MenuItemButton = forwardRef15(({ children, appearance, command, icon, ...pro
|
|
|
10378
10504
|
colorScheme = "error";
|
|
10379
10505
|
}
|
|
10380
10506
|
if (appearance === "gated") {
|
|
10381
|
-
badge = /* @__PURE__ */
|
|
10507
|
+
badge = /* @__PURE__ */ jsx234(
|
|
10382
10508
|
Icon,
|
|
10383
10509
|
{
|
|
10384
10510
|
colorScheme: "purple",
|
|
@@ -10390,7 +10516,7 @@ var MenuItemButton = forwardRef15(({ children, appearance, command, icon, ...pro
|
|
|
10390
10516
|
}
|
|
10391
10517
|
);
|
|
10392
10518
|
}
|
|
10393
|
-
return /* @__PURE__ */
|
|
10519
|
+
return /* @__PURE__ */ jsxs27(
|
|
10394
10520
|
StyledButton3,
|
|
10395
10521
|
{
|
|
10396
10522
|
...props,
|
|
@@ -10400,10 +10526,10 @@ var MenuItemButton = forwardRef15(({ children, appearance, command, icon, ...pro
|
|
|
10400
10526
|
fullWidth: true,
|
|
10401
10527
|
unstyled: true,
|
|
10402
10528
|
children: [
|
|
10403
|
-
props.leftIcon ? /* @__PURE__ */
|
|
10404
|
-
/* @__PURE__ */
|
|
10405
|
-
|
|
10406
|
-
props.rightIcon ? /* @__PURE__ */
|
|
10529
|
+
props.leftIcon ? /* @__PURE__ */ jsx234(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
10530
|
+
/* @__PURE__ */ jsx234(StyledLabelAndDescriptionContainer, { children }),
|
|
10531
|
+
isNotNil20(badge) || isNotNil20(command) ? /* @__PURE__ */ jsx234(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
10532
|
+
props.rightIcon ? /* @__PURE__ */ jsx234(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
10407
10533
|
]
|
|
10408
10534
|
}
|
|
10409
10535
|
);
|
|
@@ -10411,33 +10537,37 @@ var MenuItemButton = forwardRef15(({ children, appearance, command, icon, ...pro
|
|
|
10411
10537
|
MenuItemButton.displayName = "MenuItemButton";
|
|
10412
10538
|
|
|
10413
10539
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
10414
|
-
import
|
|
10415
|
-
import { jsx as
|
|
10416
|
-
var StyledMenuItemLabel =
|
|
10417
|
-
var StyledMenuItemDescription =
|
|
10418
|
-
variant: "body4",
|
|
10419
|
-
prominence: "secondary"
|
|
10420
|
-
})``;
|
|
10540
|
+
import styled43 from "styled-components";
|
|
10541
|
+
import { jsx as jsx235 } from "react/jsx-runtime";
|
|
10542
|
+
var StyledMenuItemLabel = styled43.span``;
|
|
10543
|
+
var StyledMenuItemDescription = styled43(Text)``;
|
|
10421
10544
|
var MenuItemLabel = ({ children }) => {
|
|
10422
|
-
return /* @__PURE__ */
|
|
10545
|
+
return /* @__PURE__ */ jsx235(StyledMenuItemLabel, { children });
|
|
10423
10546
|
};
|
|
10424
10547
|
var MenuItemDescription = ({ children }) => {
|
|
10425
|
-
return /* @__PURE__ */
|
|
10548
|
+
return /* @__PURE__ */ jsx235(
|
|
10549
|
+
StyledMenuItemDescription,
|
|
10550
|
+
{
|
|
10551
|
+
prominence: "secondary",
|
|
10552
|
+
variant: "body4",
|
|
10553
|
+
children
|
|
10554
|
+
}
|
|
10555
|
+
);
|
|
10426
10556
|
};
|
|
10427
10557
|
|
|
10428
10558
|
// src/components/Menu/SubMenu.tsx
|
|
10429
|
-
import { jsx as
|
|
10430
|
-
var SubMenuContent =
|
|
10559
|
+
import { jsx as jsx236, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
10560
|
+
var SubMenuContent = styled44(DropdownMenuSubContent)`
|
|
10431
10561
|
${menuContentCss}
|
|
10432
10562
|
|
|
10433
10563
|
${mq.smAndDown} {
|
|
10434
10564
|
transform: translateX(-100%) !important;
|
|
10435
10565
|
}
|
|
10436
10566
|
`;
|
|
10437
|
-
var StyledMobileSubMenuItems =
|
|
10567
|
+
var StyledMobileSubMenuItems = styled44.div`
|
|
10438
10568
|
margin-left: var(--wui-space-04);
|
|
10439
10569
|
`;
|
|
10440
|
-
var StyledSubTrigger =
|
|
10570
|
+
var StyledSubTrigger = styled44(DropdownMenuSubTrigger)`
|
|
10441
10571
|
outline: none;
|
|
10442
10572
|
|
|
10443
10573
|
&[data-state='open'],
|
|
@@ -10448,12 +10578,12 @@ var StyledSubTrigger = styled43(DropdownMenuSubTrigger)`
|
|
|
10448
10578
|
var SubMenuTrigger = ({ icon, ...props }) => {
|
|
10449
10579
|
const { isSmAndUp } = useMq();
|
|
10450
10580
|
const Trigger4 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
|
|
10451
|
-
return /* @__PURE__ */
|
|
10581
|
+
return /* @__PURE__ */ jsx236(Trigger4, { asChild: true, children: /* @__PURE__ */ jsx236(
|
|
10452
10582
|
MenuItemButton,
|
|
10453
10583
|
{
|
|
10454
10584
|
...props,
|
|
10455
10585
|
leftIcon: icon,
|
|
10456
|
-
rightIcon: /* @__PURE__ */
|
|
10586
|
+
rightIcon: /* @__PURE__ */ jsx236(Icon, { type: "caret-right" })
|
|
10457
10587
|
}
|
|
10458
10588
|
) });
|
|
10459
10589
|
};
|
|
@@ -10467,14 +10597,14 @@ var SubMenu = ({
|
|
|
10467
10597
|
const { isSmAndUp } = useMq();
|
|
10468
10598
|
const [isExpanded, setIsExpanded] = useState13(false);
|
|
10469
10599
|
const { compact } = useMenuContext();
|
|
10470
|
-
return isSmAndUp ? /* @__PURE__ */
|
|
10471
|
-
/* @__PURE__ */
|
|
10472
|
-
/* @__PURE__ */
|
|
10473
|
-
|
|
10600
|
+
return isSmAndUp ? /* @__PURE__ */ jsxs28(DropdownMenuSub, { onOpenChange, children: [
|
|
10601
|
+
/* @__PURE__ */ jsxs28(SubMenuTrigger, { ...props, children: [
|
|
10602
|
+
/* @__PURE__ */ jsx236(MenuItemLabel, { children: label }),
|
|
10603
|
+
isNotNil21(description) ? /* @__PURE__ */ jsx236(MenuItemDescription, { children: description }) : null
|
|
10474
10604
|
] }),
|
|
10475
|
-
/* @__PURE__ */
|
|
10476
|
-
] }) : /* @__PURE__ */
|
|
10477
|
-
/* @__PURE__ */
|
|
10605
|
+
/* @__PURE__ */ jsx236(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx236(SubMenuContent, { $compact: compact, children }) })
|
|
10606
|
+
] }) : /* @__PURE__ */ jsxs28(DropdownMenuGroup, { children: [
|
|
10607
|
+
/* @__PURE__ */ jsxs28(
|
|
10478
10608
|
SubMenuTrigger,
|
|
10479
10609
|
{
|
|
10480
10610
|
...props,
|
|
@@ -10483,12 +10613,12 @@ var SubMenu = ({
|
|
|
10483
10613
|
setIsExpanded((prev) => !prev);
|
|
10484
10614
|
},
|
|
10485
10615
|
children: [
|
|
10486
|
-
/* @__PURE__ */
|
|
10487
|
-
/* @__PURE__ */
|
|
10616
|
+
/* @__PURE__ */ jsx236(MenuItemLabel, { children: label }),
|
|
10617
|
+
/* @__PURE__ */ jsx236(MenuItemDescription, { children: description })
|
|
10488
10618
|
]
|
|
10489
10619
|
}
|
|
10490
10620
|
),
|
|
10491
|
-
/* @__PURE__ */
|
|
10621
|
+
/* @__PURE__ */ jsx236(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
10492
10622
|
] });
|
|
10493
10623
|
};
|
|
10494
10624
|
SubMenu.displayName = "SubMenu";
|
|
@@ -10496,15 +10626,15 @@ SubMenu.displayName = "SubMenu";
|
|
|
10496
10626
|
// src/components/Menu/MenuItem.tsx
|
|
10497
10627
|
import { forwardRef as forwardRef16 } from "react";
|
|
10498
10628
|
import { DropdownMenuItem as DropdownMenuItem2 } from "@radix-ui/react-dropdown-menu";
|
|
10499
|
-
import { jsx as
|
|
10629
|
+
import { jsx as jsx237 } from "react/jsx-runtime";
|
|
10500
10630
|
var MenuItem = forwardRef16(
|
|
10501
10631
|
({ onSelect = () => null, ...props }, ref) => {
|
|
10502
|
-
return /* @__PURE__ */
|
|
10632
|
+
return /* @__PURE__ */ jsx237(
|
|
10503
10633
|
DropdownMenuItem2,
|
|
10504
10634
|
{
|
|
10505
10635
|
asChild: true,
|
|
10506
10636
|
onSelect,
|
|
10507
|
-
children: /* @__PURE__ */
|
|
10637
|
+
children: /* @__PURE__ */ jsx237(
|
|
10508
10638
|
MenuItemButton,
|
|
10509
10639
|
{
|
|
10510
10640
|
...props,
|
|
@@ -10522,10 +10652,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
10522
10652
|
import {
|
|
10523
10653
|
DropdownMenuRadioGroup
|
|
10524
10654
|
} from "@radix-ui/react-dropdown-menu";
|
|
10525
|
-
import { jsx as
|
|
10655
|
+
import { jsx as jsx238, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
10526
10656
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
10527
|
-
return /* @__PURE__ */
|
|
10528
|
-
/* @__PURE__ */
|
|
10657
|
+
return /* @__PURE__ */ jsxs29(DropdownMenuRadioGroup, { ...props, children: [
|
|
10658
|
+
/* @__PURE__ */ jsx238(MenuLabel, { children: label }),
|
|
10529
10659
|
children
|
|
10530
10660
|
] });
|
|
10531
10661
|
};
|
|
@@ -10536,11 +10666,11 @@ import {
|
|
|
10536
10666
|
DropdownMenuItemIndicator,
|
|
10537
10667
|
DropdownMenuRadioItem
|
|
10538
10668
|
} from "@radix-ui/react-dropdown-menu";
|
|
10539
|
-
import { jsx as
|
|
10669
|
+
import { jsx as jsx239 } from "react/jsx-runtime";
|
|
10540
10670
|
var RadioMenuItem = ({
|
|
10541
10671
|
onSelect,
|
|
10542
10672
|
value,
|
|
10543
|
-
indicator = /* @__PURE__ */
|
|
10673
|
+
indicator = /* @__PURE__ */ jsx239(
|
|
10544
10674
|
Icon,
|
|
10545
10675
|
{
|
|
10546
10676
|
size: "sm",
|
|
@@ -10550,17 +10680,17 @@ var RadioMenuItem = ({
|
|
|
10550
10680
|
...props
|
|
10551
10681
|
}) => {
|
|
10552
10682
|
const extraProps = onSelect ? { onSelect } : {};
|
|
10553
|
-
return /* @__PURE__ */
|
|
10683
|
+
return /* @__PURE__ */ jsx239(
|
|
10554
10684
|
DropdownMenuRadioItem,
|
|
10555
10685
|
{
|
|
10556
10686
|
...extraProps,
|
|
10557
10687
|
asChild: true,
|
|
10558
10688
|
value,
|
|
10559
|
-
children: /* @__PURE__ */
|
|
10689
|
+
children: /* @__PURE__ */ jsx239(
|
|
10560
10690
|
MenuItemButton,
|
|
10561
10691
|
{
|
|
10562
10692
|
...props,
|
|
10563
|
-
rightIcon: /* @__PURE__ */
|
|
10693
|
+
rightIcon: /* @__PURE__ */ jsx239(DropdownMenuItemIndicator, { children: indicator })
|
|
10564
10694
|
}
|
|
10565
10695
|
)
|
|
10566
10696
|
}
|
|
@@ -10573,10 +10703,10 @@ import {
|
|
|
10573
10703
|
DropdownMenuCheckboxItem,
|
|
10574
10704
|
DropdownMenuItemIndicator as DropdownMenuItemIndicator2
|
|
10575
10705
|
} from "@radix-ui/react-dropdown-menu";
|
|
10576
|
-
import { isNotNil as
|
|
10577
|
-
import { jsx as
|
|
10706
|
+
import { isNotNil as isNotNil22 } from "@wistia/type-guards";
|
|
10707
|
+
import { jsx as jsx240, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
10578
10708
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
10579
|
-
return checked ? /* @__PURE__ */
|
|
10709
|
+
return checked ? /* @__PURE__ */ jsxs30(
|
|
10580
10710
|
"svg",
|
|
10581
10711
|
{
|
|
10582
10712
|
...props,
|
|
@@ -10586,14 +10716,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10586
10716
|
width: "24",
|
|
10587
10717
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10588
10718
|
children: [
|
|
10589
|
-
/* @__PURE__ */
|
|
10719
|
+
/* @__PURE__ */ jsx240(
|
|
10590
10720
|
"path",
|
|
10591
10721
|
{
|
|
10592
10722
|
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",
|
|
10593
10723
|
fill: "#2949e5"
|
|
10594
10724
|
}
|
|
10595
10725
|
),
|
|
10596
|
-
/* @__PURE__ */
|
|
10726
|
+
/* @__PURE__ */ jsx240(
|
|
10597
10727
|
"path",
|
|
10598
10728
|
{
|
|
10599
10729
|
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",
|
|
@@ -10602,7 +10732,7 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10602
10732
|
)
|
|
10603
10733
|
]
|
|
10604
10734
|
}
|
|
10605
|
-
) : /* @__PURE__ */
|
|
10735
|
+
) : /* @__PURE__ */ jsxs30(
|
|
10606
10736
|
"svg",
|
|
10607
10737
|
{
|
|
10608
10738
|
...props,
|
|
@@ -10612,14 +10742,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10612
10742
|
width: "24",
|
|
10613
10743
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10614
10744
|
children: [
|
|
10615
|
-
/* @__PURE__ */
|
|
10745
|
+
/* @__PURE__ */ jsx240(
|
|
10616
10746
|
"path",
|
|
10617
10747
|
{
|
|
10618
10748
|
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",
|
|
10619
10749
|
fill: "#fcfcfd"
|
|
10620
10750
|
}
|
|
10621
10751
|
),
|
|
10622
|
-
/* @__PURE__ */
|
|
10752
|
+
/* @__PURE__ */ jsx240(
|
|
10623
10753
|
"path",
|
|
10624
10754
|
{
|
|
10625
10755
|
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",
|
|
@@ -10636,19 +10766,19 @@ var CheckboxMenuItem = ({
|
|
|
10636
10766
|
onCheckedChange,
|
|
10637
10767
|
...props
|
|
10638
10768
|
}) => {
|
|
10639
|
-
return /* @__PURE__ */
|
|
10769
|
+
return /* @__PURE__ */ jsx240(
|
|
10640
10770
|
DropdownMenuCheckboxItem,
|
|
10641
10771
|
{
|
|
10642
10772
|
asChild: true,
|
|
10643
10773
|
checked,
|
|
10644
10774
|
onCheckedChange,
|
|
10645
10775
|
onSelect,
|
|
10646
|
-
children: /* @__PURE__ */
|
|
10776
|
+
children: /* @__PURE__ */ jsx240(
|
|
10647
10777
|
MenuItemButton,
|
|
10648
10778
|
{
|
|
10649
10779
|
...props,
|
|
10650
|
-
leftIcon:
|
|
10651
|
-
rightIcon:
|
|
10780
|
+
leftIcon: isNotNil22(props.icon) ? props.icon : /* @__PURE__ */ jsx240(CheckboxIndicator, { checked }),
|
|
10781
|
+
rightIcon: isNotNil22(props.icon) ? /* @__PURE__ */ jsx240(DropdownMenuItemIndicator2, { children: /* @__PURE__ */ jsx240(Icon, { type: "checkmark" }) }) : void 0
|
|
10652
10782
|
}
|
|
10653
10783
|
)
|
|
10654
10784
|
}
|
|
@@ -10658,36 +10788,36 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
|
10658
10788
|
|
|
10659
10789
|
// src/components/Modal/Modal.tsx
|
|
10660
10790
|
import { forwardRef as forwardRef19 } from "react";
|
|
10661
|
-
import
|
|
10791
|
+
import styled49 from "styled-components";
|
|
10662
10792
|
import { Root as DialogRoot, Portal as DialogPortal } from "@radix-ui/react-dialog";
|
|
10663
|
-
import { isNotNil as
|
|
10793
|
+
import { isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
10664
10794
|
|
|
10665
10795
|
// src/components/Modal/ModalHeader.tsx
|
|
10666
|
-
import
|
|
10796
|
+
import styled46 from "styled-components";
|
|
10667
10797
|
import { Title as DialogTitle } from "@radix-ui/react-dialog";
|
|
10668
10798
|
|
|
10669
10799
|
// src/components/Modal/ModalCloseButton.tsx
|
|
10670
|
-
import
|
|
10800
|
+
import styled45 from "styled-components";
|
|
10671
10801
|
import { Close as DialogClose } from "@radix-ui/react-dialog";
|
|
10672
|
-
import { jsx as
|
|
10673
|
-
var CloseButton =
|
|
10802
|
+
import { jsx as jsx241 } from "react/jsx-runtime";
|
|
10803
|
+
var CloseButton = styled45(DialogClose)`
|
|
10674
10804
|
align-self: start;
|
|
10675
10805
|
`;
|
|
10676
10806
|
var ModalCloseButton = () => {
|
|
10677
|
-
return /* @__PURE__ */
|
|
10807
|
+
return /* @__PURE__ */ jsx241(CloseButton, { asChild: true, children: /* @__PURE__ */ jsx241(
|
|
10678
10808
|
IconButton,
|
|
10679
10809
|
{
|
|
10680
10810
|
label: "Dismiss modal",
|
|
10681
10811
|
size: "sm",
|
|
10682
10812
|
variant: "ghost",
|
|
10683
|
-
children: /* @__PURE__ */
|
|
10813
|
+
children: /* @__PURE__ */ jsx241(Icon, { type: "close" })
|
|
10684
10814
|
}
|
|
10685
10815
|
) });
|
|
10686
10816
|
};
|
|
10687
10817
|
|
|
10688
10818
|
// src/components/Modal/ModalHeader.tsx
|
|
10689
|
-
import { jsx as
|
|
10690
|
-
var Header =
|
|
10819
|
+
import { jsx as jsx242, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10820
|
+
var Header = styled46.header`
|
|
10691
10821
|
display: flex;
|
|
10692
10822
|
order: 1;
|
|
10693
10823
|
gap: var(--wui-space-01);
|
|
@@ -10698,7 +10828,7 @@ var Header = styled45.header`
|
|
|
10698
10828
|
margin: 0 0 var(--wui-space-03);
|
|
10699
10829
|
}
|
|
10700
10830
|
`;
|
|
10701
|
-
var Title =
|
|
10831
|
+
var Title = styled46(DialogTitle)`
|
|
10702
10832
|
font-family: var(--wui-typography-heading-2-family);
|
|
10703
10833
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
10704
10834
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -10709,21 +10839,21 @@ var ModalHeader = ({
|
|
|
10709
10839
|
hideTitle,
|
|
10710
10840
|
hideCloseButton
|
|
10711
10841
|
}) => {
|
|
10712
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */
|
|
10713
|
-
return /* @__PURE__ */
|
|
10842
|
+
const TitleComponent = hideTitle ? /* @__PURE__ */ jsx242(ScreenReaderOnly, { children: /* @__PURE__ */ jsx242(Title, { children: title }) }) : /* @__PURE__ */ jsx242(Title, { children: title });
|
|
10843
|
+
return /* @__PURE__ */ jsxs31(Header, { $hideTitle: hideTitle, children: [
|
|
10714
10844
|
TitleComponent,
|
|
10715
|
-
hideCloseButton ? null : /* @__PURE__ */
|
|
10845
|
+
hideCloseButton ? null : /* @__PURE__ */ jsx242(ModalCloseButton, {})
|
|
10716
10846
|
] });
|
|
10717
10847
|
};
|
|
10718
10848
|
|
|
10719
10849
|
// src/components/Modal/ModalContent.tsx
|
|
10720
10850
|
import { forwardRef as forwardRef17 } from "react";
|
|
10721
|
-
import
|
|
10851
|
+
import styled47 from "styled-components";
|
|
10722
10852
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
10723
10853
|
|
|
10724
10854
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
10725
10855
|
import { useRef as useRef11, useEffect as useEffect10 } from "react";
|
|
10726
|
-
import { isNotNil as
|
|
10856
|
+
import { isNotNil as isNotNil23 } from "@wistia/type-guards";
|
|
10727
10857
|
var useFocusRestore = () => {
|
|
10728
10858
|
const previouslyFocusedRef = useRef11(null);
|
|
10729
10859
|
useEffect10(() => {
|
|
@@ -10731,7 +10861,7 @@ var useFocusRestore = () => {
|
|
|
10731
10861
|
}, []);
|
|
10732
10862
|
useEffect10(() => {
|
|
10733
10863
|
return () => {
|
|
10734
|
-
if (
|
|
10864
|
+
if (isNotNil23(previouslyFocusedRef.current)) {
|
|
10735
10865
|
setTimeout(() => {
|
|
10736
10866
|
previouslyFocusedRef.current?.focus();
|
|
10737
10867
|
}, 0);
|
|
@@ -10741,8 +10871,8 @@ var useFocusRestore = () => {
|
|
|
10741
10871
|
};
|
|
10742
10872
|
|
|
10743
10873
|
// src/components/Modal/ModalContent.tsx
|
|
10744
|
-
import { jsx as
|
|
10745
|
-
var StyledModalContent =
|
|
10874
|
+
import { jsx as jsx243 } from "react/jsx-runtime";
|
|
10875
|
+
var StyledModalContent = styled47(DialogContent)`
|
|
10746
10876
|
background-color: var(--wui-color-bg-app);
|
|
10747
10877
|
box-sizing: border-box;
|
|
10748
10878
|
display: flex;
|
|
@@ -10786,7 +10916,7 @@ var StyledModalContent = styled46(DialogContent)`
|
|
|
10786
10916
|
var ModalContent = forwardRef17(
|
|
10787
10917
|
({ fullHeight, width, children, ...props }, ref) => {
|
|
10788
10918
|
useFocusRestore();
|
|
10789
|
-
return /* @__PURE__ */
|
|
10919
|
+
return /* @__PURE__ */ jsx243(
|
|
10790
10920
|
StyledModalContent,
|
|
10791
10921
|
{
|
|
10792
10922
|
ref,
|
|
@@ -10802,8 +10932,8 @@ var ModalContent = forwardRef17(
|
|
|
10802
10932
|
|
|
10803
10933
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
10804
10934
|
import { forwardRef as forwardRef18 } from "react";
|
|
10805
|
-
import
|
|
10806
|
-
import { jsx as
|
|
10935
|
+
import styled48 from "styled-components";
|
|
10936
|
+
import { jsx as jsx244 } from "react/jsx-runtime";
|
|
10807
10937
|
var backdropAnimationDuration = 150;
|
|
10808
10938
|
var alignVerticalMap = {
|
|
10809
10939
|
stretch: "normal",
|
|
@@ -10816,7 +10946,7 @@ var alignHorizontalMap = {
|
|
|
10816
10946
|
center: "center",
|
|
10817
10947
|
right: "end"
|
|
10818
10948
|
};
|
|
10819
|
-
var BackdropComponent =
|
|
10949
|
+
var BackdropComponent = styled48.div`
|
|
10820
10950
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
10821
10951
|
animation-name: backdropShow;
|
|
10822
10952
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -10845,7 +10975,7 @@ var BackdropComponent = styled47.div`
|
|
|
10845
10975
|
}
|
|
10846
10976
|
`;
|
|
10847
10977
|
var Backdrop = forwardRef18(
|
|
10848
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */
|
|
10978
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ jsx244(
|
|
10849
10979
|
BackdropComponent,
|
|
10850
10980
|
{
|
|
10851
10981
|
ref,
|
|
@@ -10859,9 +10989,9 @@ var Backdrop = forwardRef18(
|
|
|
10859
10989
|
Backdrop.displayName = "Backdrop";
|
|
10860
10990
|
|
|
10861
10991
|
// src/components/Modal/Modal.tsx
|
|
10862
|
-
import { jsx as
|
|
10992
|
+
import { jsx as jsx245, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
10863
10993
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
10864
|
-
var ModalBody =
|
|
10994
|
+
var ModalBody = styled49.div`
|
|
10865
10995
|
flex-direction: column;
|
|
10866
10996
|
display: flex;
|
|
10867
10997
|
order: 2;
|
|
@@ -10879,24 +11009,24 @@ var Modal = forwardRef19(
|
|
|
10879
11009
|
width = DEFAULT_MODAL_WIDTH,
|
|
10880
11010
|
...props
|
|
10881
11011
|
}, ref) => {
|
|
10882
|
-
return /* @__PURE__ */
|
|
11012
|
+
return /* @__PURE__ */ jsx245(
|
|
10883
11013
|
DialogRoot,
|
|
10884
11014
|
{
|
|
10885
11015
|
onOpenChange: (open2) => {
|
|
10886
|
-
if (!open2 &&
|
|
11016
|
+
if (!open2 && isNotNil24(onRequestClose)) {
|
|
10887
11017
|
onRequestClose();
|
|
10888
11018
|
}
|
|
10889
11019
|
},
|
|
10890
11020
|
open: isOpen,
|
|
10891
|
-
children: /* @__PURE__ */
|
|
10892
|
-
/* @__PURE__ */
|
|
10893
|
-
/* @__PURE__ */
|
|
11021
|
+
children: /* @__PURE__ */ jsxs32(DialogPortal, { children: [
|
|
11022
|
+
/* @__PURE__ */ jsx245(Backdrop, {}),
|
|
11023
|
+
/* @__PURE__ */ jsxs32(
|
|
10894
11024
|
ModalContent,
|
|
10895
11025
|
{
|
|
10896
11026
|
ref,
|
|
10897
11027
|
fullHeight,
|
|
10898
11028
|
onOpenAutoFocus: (event) => {
|
|
10899
|
-
if (
|
|
11029
|
+
if (isNotNil24(initialFocusRef) && initialFocusRef.current) {
|
|
10900
11030
|
event.preventDefault();
|
|
10901
11031
|
requestAnimationFrame(() => {
|
|
10902
11032
|
initialFocusRef.current?.focus();
|
|
@@ -10906,8 +11036,8 @@ var Modal = forwardRef19(
|
|
|
10906
11036
|
width,
|
|
10907
11037
|
...props,
|
|
10908
11038
|
children: [
|
|
10909
|
-
/* @__PURE__ */
|
|
10910
|
-
/* @__PURE__ */
|
|
11039
|
+
/* @__PURE__ */ jsx245(ModalBody, { children }),
|
|
11040
|
+
/* @__PURE__ */ jsx245(
|
|
10911
11041
|
ModalHeader,
|
|
10912
11042
|
{
|
|
10913
11043
|
hideCloseButton,
|
|
@@ -10926,18 +11056,18 @@ var Modal = forwardRef19(
|
|
|
10926
11056
|
Modal.displayName = "Modal";
|
|
10927
11057
|
|
|
10928
11058
|
// src/components/Popover/Popover.tsx
|
|
10929
|
-
import { Root
|
|
10930
|
-
import
|
|
11059
|
+
import { Root, Trigger as Trigger2, Portal, Content as Content2, Close } from "@radix-ui/react-popover";
|
|
11060
|
+
import styled50, { css as css30 } from "styled-components";
|
|
10931
11061
|
|
|
10932
11062
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
10933
|
-
import { isNotNil as
|
|
11063
|
+
import { isNotNil as isNotNil25 } from "@wistia/type-guards";
|
|
10934
11064
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
10935
|
-
return
|
|
11065
|
+
return isNotNil25(onOpenChange) && isNotNil25(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
10936
11066
|
};
|
|
10937
11067
|
|
|
10938
11068
|
// src/components/Popover/Popover.tsx
|
|
10939
|
-
import { jsx as
|
|
10940
|
-
var StyledContent2 =
|
|
11069
|
+
import { jsx as jsx246, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
11070
|
+
var StyledContent2 = styled50(Content2)`
|
|
10941
11071
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10942
11072
|
${({ $unstyled }) => !$unstyled && css30`
|
|
10943
11073
|
border-radius: var(--wui-border-radius-02);
|
|
@@ -10972,9 +11102,9 @@ var Popover = ({
|
|
|
10972
11102
|
"--wui-popover-max-width": maxWidth,
|
|
10973
11103
|
"--wui-popover-max-height": maxHeight
|
|
10974
11104
|
};
|
|
10975
|
-
return /* @__PURE__ */
|
|
10976
|
-
/* @__PURE__ */
|
|
10977
|
-
/* @__PURE__ */
|
|
11105
|
+
return /* @__PURE__ */ jsxs33(Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
11106
|
+
/* @__PURE__ */ jsx246(Trigger2, { asChild: true, children: trigger }),
|
|
11107
|
+
/* @__PURE__ */ jsx246(Portal, { children: /* @__PURE__ */ jsxs33(
|
|
10978
11108
|
StyledContent2,
|
|
10979
11109
|
{
|
|
10980
11110
|
$colorScheme: colorScheme,
|
|
@@ -10983,16 +11113,16 @@ var Popover = ({
|
|
|
10983
11113
|
$unstyled: unstyled,
|
|
10984
11114
|
style,
|
|
10985
11115
|
children: [
|
|
10986
|
-
!hideCloseButton && /* @__PURE__ */
|
|
11116
|
+
!hideCloseButton && /* @__PURE__ */ jsx246(Close, { asChild: true, children: /* @__PURE__ */ jsx246(
|
|
10987
11117
|
IconButton,
|
|
10988
11118
|
{
|
|
10989
11119
|
"data-wui-popover-close": true,
|
|
10990
11120
|
label: "Close",
|
|
10991
11121
|
variant: "ghost",
|
|
10992
|
-
children: /* @__PURE__ */
|
|
11122
|
+
children: /* @__PURE__ */ jsx246(Icon, { type: "close" })
|
|
10993
11123
|
}
|
|
10994
11124
|
) }),
|
|
10995
|
-
/* @__PURE__ */
|
|
11125
|
+
/* @__PURE__ */ jsx246("div", { children })
|
|
10996
11126
|
]
|
|
10997
11127
|
}
|
|
10998
11128
|
) })
|
|
@@ -11001,11 +11131,11 @@ var Popover = ({
|
|
|
11001
11131
|
Popover.displayName = "Popover";
|
|
11002
11132
|
|
|
11003
11133
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
11004
|
-
import
|
|
11134
|
+
import styled51 from "styled-components";
|
|
11005
11135
|
import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
|
|
11006
|
-
import { isNotNil as
|
|
11007
|
-
import { jsx as
|
|
11008
|
-
var ProgressBarWrapper =
|
|
11136
|
+
import { isNotNil as isNotNil26 } from "@wistia/type-guards";
|
|
11137
|
+
import { jsx as jsx247, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
11138
|
+
var ProgressBarWrapper = styled51.div`
|
|
11009
11139
|
--progress-bar-height: 8px;
|
|
11010
11140
|
--progress-bar-indicator-color: var(--wui-color-bg-fill);
|
|
11011
11141
|
--progress-bar-background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -11021,7 +11151,7 @@ var getTranslateValue = (progress, max) => {
|
|
|
11021
11151
|
const progressPercentage = progress / max * 100;
|
|
11022
11152
|
return `translateX(-${100 - progressPercentage}%)`;
|
|
11023
11153
|
};
|
|
11024
|
-
var ProgressBarLabel =
|
|
11154
|
+
var ProgressBarLabel = styled51.div`
|
|
11025
11155
|
display: flex;
|
|
11026
11156
|
line-height: var(--wui-typography-label-3-line-height);
|
|
11027
11157
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -11029,7 +11159,7 @@ var ProgressBarLabel = styled50.div`
|
|
|
11029
11159
|
color: var(--wui-color-text-secondary);
|
|
11030
11160
|
flex-shrink: 0;
|
|
11031
11161
|
`;
|
|
11032
|
-
var StyledProgressIndicator =
|
|
11162
|
+
var StyledProgressIndicator = styled51(ProgressIndicator)`
|
|
11033
11163
|
background-color: var(--progress-bar-indicator-color);
|
|
11034
11164
|
width: 100%;
|
|
11035
11165
|
height: 100%;
|
|
@@ -11038,7 +11168,7 @@ var StyledProgressIndicator = styled50(ProgressIndicator)`
|
|
|
11038
11168
|
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
11039
11169
|
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
11040
11170
|
`;
|
|
11041
|
-
var StyledProgressBar =
|
|
11171
|
+
var StyledProgressBar = styled51(ProgressRoot)`
|
|
11042
11172
|
position: relative;
|
|
11043
11173
|
overflow: hidden;
|
|
11044
11174
|
background: var(--progress-bar-background-color);
|
|
@@ -11057,15 +11187,15 @@ var ProgressBar = ({
|
|
|
11057
11187
|
labelRight,
|
|
11058
11188
|
...props
|
|
11059
11189
|
}) => {
|
|
11060
|
-
return /* @__PURE__ */
|
|
11061
|
-
|
|
11062
|
-
/* @__PURE__ */
|
|
11190
|
+
return /* @__PURE__ */ jsxs34(ProgressBarWrapper, { children: [
|
|
11191
|
+
isNotNil26(labelLeft) ? /* @__PURE__ */ jsx247(ProgressBarLabel, { children: labelLeft }) : null,
|
|
11192
|
+
/* @__PURE__ */ jsx247(
|
|
11063
11193
|
StyledProgressBar,
|
|
11064
11194
|
{
|
|
11065
11195
|
max,
|
|
11066
11196
|
value: progress,
|
|
11067
11197
|
...props,
|
|
11068
|
-
children: /* @__PURE__ */
|
|
11198
|
+
children: /* @__PURE__ */ jsx247(
|
|
11069
11199
|
StyledProgressIndicator,
|
|
11070
11200
|
{
|
|
11071
11201
|
$max: max,
|
|
@@ -11074,17 +11204,17 @@ var ProgressBar = ({
|
|
|
11074
11204
|
)
|
|
11075
11205
|
}
|
|
11076
11206
|
),
|
|
11077
|
-
|
|
11207
|
+
isNotNil26(labelRight) ? /* @__PURE__ */ jsx247(ProgressBarLabel, { children: labelRight }) : null
|
|
11078
11208
|
] });
|
|
11079
11209
|
};
|
|
11080
11210
|
ProgressBar.displayName = "ProgressBar";
|
|
11081
11211
|
|
|
11082
11212
|
// src/components/Radio/Radio.tsx
|
|
11083
11213
|
import { forwardRef as forwardRef20, useId as useId3 } from "react";
|
|
11084
|
-
import
|
|
11214
|
+
import styled52, { css as css31 } from "styled-components";
|
|
11085
11215
|
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
11086
|
-
import { jsx as
|
|
11087
|
-
var RadioIcon = () => /* @__PURE__ */
|
|
11216
|
+
import { jsx as jsx248, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
11217
|
+
var RadioIcon = () => /* @__PURE__ */ jsx248(
|
|
11088
11218
|
"svg",
|
|
11089
11219
|
{
|
|
11090
11220
|
fill: "inherit",
|
|
@@ -11092,7 +11222,7 @@ var RadioIcon = () => /* @__PURE__ */ jsx247(
|
|
|
11092
11222
|
viewBox: "0 0 1 1",
|
|
11093
11223
|
width: "1",
|
|
11094
11224
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11095
|
-
children: /* @__PURE__ */
|
|
11225
|
+
children: /* @__PURE__ */ jsx248(
|
|
11096
11226
|
"circle",
|
|
11097
11227
|
{
|
|
11098
11228
|
cx: "0.5",
|
|
@@ -11141,14 +11271,14 @@ var getSizeCss2 = (size) => {
|
|
|
11141
11271
|
if (size === "lg") return sizeLarge2;
|
|
11142
11272
|
return sizeMedium2;
|
|
11143
11273
|
};
|
|
11144
|
-
var StyledRadioWrapper =
|
|
11274
|
+
var StyledRadioWrapper = styled52.div`
|
|
11145
11275
|
display: flex;
|
|
11146
11276
|
margin: 0;
|
|
11147
11277
|
|
|
11148
11278
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
11149
11279
|
user-select: none;
|
|
11150
11280
|
`;
|
|
11151
|
-
var StyledRadioInput =
|
|
11281
|
+
var StyledRadioInput = styled52.div`
|
|
11152
11282
|
${({ $size }) => getSizeCss2($size)}
|
|
11153
11283
|
line-height: 0;
|
|
11154
11284
|
margin: 0;
|
|
@@ -11170,7 +11300,7 @@ var StyledRadioInput = styled51.div`
|
|
|
11170
11300
|
}
|
|
11171
11301
|
}
|
|
11172
11302
|
`;
|
|
11173
|
-
var StyledHiddenRadioInput =
|
|
11303
|
+
var StyledHiddenRadioInput = styled52.input`
|
|
11174
11304
|
${visuallyHiddenStyle}
|
|
11175
11305
|
|
|
11176
11306
|
/* toggles display of faux-input border-color */
|
|
@@ -11200,13 +11330,13 @@ var Radio = forwardRef20(
|
|
|
11200
11330
|
}, ref) => {
|
|
11201
11331
|
const generatedId = useId3();
|
|
11202
11332
|
const computedId = isNonEmptyString3(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
11203
|
-
return /* @__PURE__ */
|
|
11333
|
+
return /* @__PURE__ */ jsxs35(
|
|
11204
11334
|
StyledRadioWrapper,
|
|
11205
11335
|
{
|
|
11206
11336
|
$disabled: disabled,
|
|
11207
11337
|
"aria-invalid": props["aria-invalid"],
|
|
11208
11338
|
children: [
|
|
11209
|
-
/* @__PURE__ */
|
|
11339
|
+
/* @__PURE__ */ jsx248(
|
|
11210
11340
|
StyledHiddenRadioInput,
|
|
11211
11341
|
{
|
|
11212
11342
|
...props,
|
|
@@ -11221,16 +11351,16 @@ var Radio = forwardRef20(
|
|
|
11221
11351
|
value
|
|
11222
11352
|
}
|
|
11223
11353
|
),
|
|
11224
|
-
/* @__PURE__ */
|
|
11354
|
+
/* @__PURE__ */ jsx248(
|
|
11225
11355
|
FormControlLabel,
|
|
11226
11356
|
{
|
|
11227
|
-
controlSlot: /* @__PURE__ */
|
|
11357
|
+
controlSlot: /* @__PURE__ */ jsx248(
|
|
11228
11358
|
StyledRadioInput,
|
|
11229
11359
|
{
|
|
11230
11360
|
$disabled: disabled,
|
|
11231
11361
|
$size: size,
|
|
11232
11362
|
"data-wui-faux-input": "true",
|
|
11233
|
-
children: /* @__PURE__ */
|
|
11363
|
+
children: /* @__PURE__ */ jsx248(RadioIcon, {})
|
|
11234
11364
|
}
|
|
11235
11365
|
),
|
|
11236
11366
|
description,
|
|
@@ -11249,13 +11379,13 @@ Radio.displayName = "Radio";
|
|
|
11249
11379
|
|
|
11250
11380
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
11251
11381
|
import { forwardRef as forwardRef21 } from "react";
|
|
11252
|
-
import
|
|
11382
|
+
import styled54, { css as css32 } from "styled-components";
|
|
11253
11383
|
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
11254
11384
|
import { isNil as isNil14 } from "@wistia/type-guards";
|
|
11255
11385
|
|
|
11256
11386
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
11257
11387
|
import { createContext as createContext7, useContext as useContext6, useMemo as useMemo8, useState as useState14 } from "react";
|
|
11258
|
-
import { jsx as
|
|
11388
|
+
import { jsx as jsx249 } from "react/jsx-runtime";
|
|
11259
11389
|
var SelectedItemStyleContext = createContext7(null);
|
|
11260
11390
|
var SelectedItemStyleProvider = ({
|
|
11261
11391
|
children
|
|
@@ -11278,7 +11408,7 @@ var SelectedItemStyleProvider = ({
|
|
|
11278
11408
|
}),
|
|
11279
11409
|
[selectedItemIndicatorStyle]
|
|
11280
11410
|
);
|
|
11281
|
-
return /* @__PURE__ */
|
|
11411
|
+
return /* @__PURE__ */ jsx249(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
11282
11412
|
};
|
|
11283
11413
|
var useSelectedItemStyle = () => {
|
|
11284
11414
|
const context = useContext6(SelectedItemStyleContext);
|
|
@@ -11289,7 +11419,7 @@ var useSelectedItemStyle = () => {
|
|
|
11289
11419
|
};
|
|
11290
11420
|
|
|
11291
11421
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
11292
|
-
import
|
|
11422
|
+
import styled53 from "styled-components";
|
|
11293
11423
|
|
|
11294
11424
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
11295
11425
|
import { createContext as createContext8, useContext as useContext7 } from "react";
|
|
@@ -11304,8 +11434,8 @@ var useSegmentedControlValue = () => {
|
|
|
11304
11434
|
};
|
|
11305
11435
|
|
|
11306
11436
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
11307
|
-
import { jsx as
|
|
11308
|
-
var SelectedItemIndicatorDiv =
|
|
11437
|
+
import { jsx as jsx250 } from "react/jsx-runtime";
|
|
11438
|
+
var SelectedItemIndicatorDiv = styled53.div`
|
|
11309
11439
|
background-color: var(--wui-color-bg-fill-white);
|
|
11310
11440
|
border-radius: var(--wui-border-radius-rounded);
|
|
11311
11441
|
left: 0;
|
|
@@ -11323,11 +11453,11 @@ var SelectedItemIndicator = () => {
|
|
|
11323
11453
|
if (!selectedValue) {
|
|
11324
11454
|
return null;
|
|
11325
11455
|
}
|
|
11326
|
-
return /* @__PURE__ */
|
|
11456
|
+
return /* @__PURE__ */ jsx250(SelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
11327
11457
|
};
|
|
11328
11458
|
|
|
11329
11459
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
11330
|
-
import { jsx as
|
|
11460
|
+
import { jsx as jsx251, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
11331
11461
|
var segmentedControlStyles = css32`
|
|
11332
11462
|
display: inline-flex;
|
|
11333
11463
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -11339,7 +11469,7 @@ var segmentedControlStyles = css32`
|
|
|
11339
11469
|
position: relative;
|
|
11340
11470
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
11341
11471
|
`;
|
|
11342
|
-
var StyledSegmentedControl =
|
|
11472
|
+
var StyledSegmentedControl = styled54(ToggleGroupRoot)`
|
|
11343
11473
|
${segmentedControlStyles}
|
|
11344
11474
|
`;
|
|
11345
11475
|
var SegmentedControl = forwardRef21(
|
|
@@ -11354,7 +11484,7 @@ var SegmentedControl = forwardRef21(
|
|
|
11354
11484
|
if (isNil14(children)) {
|
|
11355
11485
|
return null;
|
|
11356
11486
|
}
|
|
11357
|
-
return /* @__PURE__ */
|
|
11487
|
+
return /* @__PURE__ */ jsx251(
|
|
11358
11488
|
StyledSegmentedControl,
|
|
11359
11489
|
{
|
|
11360
11490
|
ref,
|
|
@@ -11366,8 +11496,8 @@ var SegmentedControl = forwardRef21(
|
|
|
11366
11496
|
type: "single",
|
|
11367
11497
|
value: selectedValue,
|
|
11368
11498
|
...props,
|
|
11369
|
-
children: /* @__PURE__ */
|
|
11370
|
-
/* @__PURE__ */
|
|
11499
|
+
children: /* @__PURE__ */ jsx251(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs36(SelectedItemStyleProvider, { children: [
|
|
11500
|
+
/* @__PURE__ */ jsx251(SelectedItemIndicator, {}),
|
|
11371
11501
|
children
|
|
11372
11502
|
] }) })
|
|
11373
11503
|
}
|
|
@@ -11378,10 +11508,10 @@ SegmentedControl.displayName = "SegmentedControl";
|
|
|
11378
11508
|
|
|
11379
11509
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
11380
11510
|
import { forwardRef as forwardRef22, useEffect as useEffect11, useRef as useRef12 } from "react";
|
|
11381
|
-
import
|
|
11511
|
+
import styled55, { css as css33 } from "styled-components";
|
|
11382
11512
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
11383
|
-
import { isNotNil as
|
|
11384
|
-
import { jsxs as
|
|
11513
|
+
import { isNotNil as isNotNil27 } from "@wistia/type-guards";
|
|
11514
|
+
import { jsxs as jsxs37 } from "react/jsx-runtime";
|
|
11385
11515
|
var segmentedControlItemStyles = css33`
|
|
11386
11516
|
all: unset; /* ToggleGroupItem is a button element */
|
|
11387
11517
|
align-items: center;
|
|
@@ -11442,7 +11572,7 @@ var segmentedControlItemStyles = css33`
|
|
|
11442
11572
|
}
|
|
11443
11573
|
}
|
|
11444
11574
|
`;
|
|
11445
|
-
var StyledSegmentedControlItem =
|
|
11575
|
+
var StyledSegmentedControlItem = styled55(ToggleGroupItem)`
|
|
11446
11576
|
${segmentedControlItemStyles}
|
|
11447
11577
|
`;
|
|
11448
11578
|
var SegmentedControlItem = forwardRef22(
|
|
@@ -11483,12 +11613,12 @@ var SegmentedControlItem = forwardRef22(
|
|
|
11483
11613
|
resizeObserver.disconnect();
|
|
11484
11614
|
};
|
|
11485
11615
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
11486
|
-
return /* @__PURE__ */
|
|
11616
|
+
return /* @__PURE__ */ jsxs37(
|
|
11487
11617
|
StyledSegmentedControlItem,
|
|
11488
11618
|
{
|
|
11489
11619
|
ref: combinedRef,
|
|
11490
|
-
$hasLabel:
|
|
11491
|
-
"aria-label":
|
|
11620
|
+
$hasLabel: isNotNil27(label),
|
|
11621
|
+
"aria-label": isNotNil27(label) ? void 0 : ariaLabel,
|
|
11492
11622
|
disabled,
|
|
11493
11623
|
onClick: handleClick,
|
|
11494
11624
|
value,
|
|
@@ -11504,7 +11634,7 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
|
11504
11634
|
|
|
11505
11635
|
// src/components/Select/Select.tsx
|
|
11506
11636
|
import {
|
|
11507
|
-
Root as
|
|
11637
|
+
Root as Root2,
|
|
11508
11638
|
Trigger as Trigger3,
|
|
11509
11639
|
Portal as Portal2,
|
|
11510
11640
|
Content as Content3,
|
|
@@ -11514,9 +11644,9 @@ import {
|
|
|
11514
11644
|
ScrollDownButton
|
|
11515
11645
|
} from "@radix-ui/react-select";
|
|
11516
11646
|
import { forwardRef as forwardRef23 } from "react";
|
|
11517
|
-
import
|
|
11518
|
-
import { jsx as
|
|
11519
|
-
var StyledTrigger =
|
|
11647
|
+
import styled56 from "styled-components";
|
|
11648
|
+
import { jsx as jsx252, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11649
|
+
var StyledTrigger = styled56(Trigger3)`
|
|
11520
11650
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11521
11651
|
${inputCssVariables};
|
|
11522
11652
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -11560,7 +11690,7 @@ var StyledTrigger = styled55(Trigger3)`
|
|
|
11560
11690
|
color: var(--wui-input-placeholder);
|
|
11561
11691
|
}
|
|
11562
11692
|
`;
|
|
11563
|
-
var StyledContent3 =
|
|
11693
|
+
var StyledContent3 = styled56(Content3)`
|
|
11564
11694
|
--wui-select-content-border: var(--wui-color-border);
|
|
11565
11695
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
11566
11696
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -11588,13 +11718,13 @@ var Select = forwardRef23(
|
|
|
11588
11718
|
...props
|
|
11589
11719
|
}, forwardedRef) => {
|
|
11590
11720
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
11591
|
-
return /* @__PURE__ */
|
|
11592
|
-
|
|
11721
|
+
return /* @__PURE__ */ jsxs38(
|
|
11722
|
+
Root2,
|
|
11593
11723
|
{
|
|
11594
11724
|
...props,
|
|
11595
11725
|
onValueChange: onChange,
|
|
11596
11726
|
children: [
|
|
11597
|
-
/* @__PURE__ */
|
|
11727
|
+
/* @__PURE__ */ jsxs38(
|
|
11598
11728
|
StyledTrigger,
|
|
11599
11729
|
{
|
|
11600
11730
|
ref: forwardedRef,
|
|
@@ -11602,8 +11732,8 @@ var Select = forwardRef23(
|
|
|
11602
11732
|
$fullWidth: responsiveFullWidth,
|
|
11603
11733
|
...props,
|
|
11604
11734
|
children: [
|
|
11605
|
-
/* @__PURE__ */
|
|
11606
|
-
/* @__PURE__ */
|
|
11735
|
+
/* @__PURE__ */ jsx252(Value, { placeholder }),
|
|
11736
|
+
/* @__PURE__ */ jsx252(
|
|
11607
11737
|
Icon,
|
|
11608
11738
|
{
|
|
11609
11739
|
size: "md",
|
|
@@ -11613,10 +11743,10 @@ var Select = forwardRef23(
|
|
|
11613
11743
|
]
|
|
11614
11744
|
}
|
|
11615
11745
|
),
|
|
11616
|
-
/* @__PURE__ */
|
|
11617
|
-
/* @__PURE__ */
|
|
11618
|
-
/* @__PURE__ */
|
|
11619
|
-
/* @__PURE__ */
|
|
11746
|
+
/* @__PURE__ */ jsx252(Portal2, { children: /* @__PURE__ */ jsxs38(StyledContent3, { position: "popper", children: [
|
|
11747
|
+
/* @__PURE__ */ jsx252(ScrollUpButton, { children: /* @__PURE__ */ jsx252(Icon, { type: "caret-up" }) }),
|
|
11748
|
+
/* @__PURE__ */ jsx252(Viewport, { children }),
|
|
11749
|
+
/* @__PURE__ */ jsx252(ScrollDownButton, { children: /* @__PURE__ */ jsx252(Icon, { type: "caret-down" }) })
|
|
11620
11750
|
] }) })
|
|
11621
11751
|
]
|
|
11622
11752
|
}
|
|
@@ -11628,10 +11758,10 @@ Select.displayName = "Select";
|
|
|
11628
11758
|
// src/components/Select/SelectOption.tsx
|
|
11629
11759
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
11630
11760
|
import { forwardRef as forwardRef24 } from "react";
|
|
11631
|
-
import
|
|
11632
|
-
import { isNotNil as
|
|
11633
|
-
import { jsx as
|
|
11634
|
-
var StyledItem =
|
|
11761
|
+
import styled57 from "styled-components";
|
|
11762
|
+
import { isNotNil as isNotNil28 } from "@wistia/type-guards";
|
|
11763
|
+
import { jsx as jsx253, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11764
|
+
var StyledItem = styled57(Item)`
|
|
11635
11765
|
${variantStyleMap2.body3};
|
|
11636
11766
|
display: flex;
|
|
11637
11767
|
padding: var(--wui-select-option-padding);
|
|
@@ -11655,28 +11785,28 @@ var StyledItem = styled56(Item)`
|
|
|
11655
11785
|
background-color: transparent;
|
|
11656
11786
|
}
|
|
11657
11787
|
`;
|
|
11658
|
-
var StyledIconContainer =
|
|
11788
|
+
var StyledIconContainer = styled57.span`
|
|
11659
11789
|
width: 12px;
|
|
11660
11790
|
`;
|
|
11661
11791
|
var SelectOption = forwardRef24(
|
|
11662
11792
|
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
11663
|
-
return /* @__PURE__ */
|
|
11793
|
+
return /* @__PURE__ */ jsxs39(
|
|
11664
11794
|
StyledItem,
|
|
11665
11795
|
{
|
|
11666
11796
|
...props,
|
|
11667
11797
|
ref: forwardedRef,
|
|
11668
11798
|
children: [
|
|
11669
|
-
/* @__PURE__ */
|
|
11799
|
+
/* @__PURE__ */ jsx253(StyledIconContainer, { "data-indicator": true, children: /* @__PURE__ */ jsx253(ItemIndicator, { children: /* @__PURE__ */ jsx253(
|
|
11670
11800
|
Icon,
|
|
11671
11801
|
{
|
|
11672
11802
|
size: "sm",
|
|
11673
11803
|
type: "checkmark"
|
|
11674
11804
|
}
|
|
11675
11805
|
) }) }),
|
|
11676
|
-
|
|
11806
|
+
isNotNil28(selectedDisplayValue) ? /* @__PURE__ */ jsxs39("div", { children: [
|
|
11677
11807
|
children,
|
|
11678
|
-
/* @__PURE__ */
|
|
11679
|
-
] }) : /* @__PURE__ */
|
|
11808
|
+
/* @__PURE__ */ jsx253("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx253(ItemText, { children: selectedDisplayValue }) })
|
|
11809
|
+
] }) : /* @__PURE__ */ jsx253(ItemText, { children })
|
|
11680
11810
|
]
|
|
11681
11811
|
}
|
|
11682
11812
|
);
|
|
@@ -11685,15 +11815,15 @@ var SelectOption = forwardRef24(
|
|
|
11685
11815
|
SelectOption.displayName = "SelectOption";
|
|
11686
11816
|
|
|
11687
11817
|
// src/components/Select/SelectOptionGroup.tsx
|
|
11688
|
-
import { Group, Label as
|
|
11689
|
-
import
|
|
11690
|
-
import { jsx as
|
|
11691
|
-
var StyledLabel4 =
|
|
11818
|
+
import { Group, Label as Label3 } from "@radix-ui/react-select";
|
|
11819
|
+
import styled58 from "styled-components";
|
|
11820
|
+
import { jsx as jsx254, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
11821
|
+
var StyledLabel4 = styled58(Label3)`
|
|
11692
11822
|
padding: var(--wui-select-option-padding);
|
|
11693
11823
|
`;
|
|
11694
11824
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
11695
|
-
return /* @__PURE__ */
|
|
11696
|
-
/* @__PURE__ */
|
|
11825
|
+
return /* @__PURE__ */ jsxs40(Group, { ...props, children: [
|
|
11826
|
+
/* @__PURE__ */ jsx254(StyledLabel4, { children: /* @__PURE__ */ jsx254(
|
|
11697
11827
|
Text,
|
|
11698
11828
|
{
|
|
11699
11829
|
prominence: "secondary",
|
|
@@ -11707,9 +11837,9 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11707
11837
|
|
|
11708
11838
|
// src/components/Switch/Switch.tsx
|
|
11709
11839
|
import { forwardRef as forwardRef25, useId as useId4 } from "react";
|
|
11710
|
-
import
|
|
11840
|
+
import styled59, { css as css34 } from "styled-components";
|
|
11711
11841
|
import { isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
11712
|
-
import { jsx as
|
|
11842
|
+
import { jsx as jsx255, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
11713
11843
|
var sizeSmall3 = css34`
|
|
11714
11844
|
--wui-size-small-width: 24px;
|
|
11715
11845
|
--wui-size-small-height: 14px;
|
|
@@ -11760,14 +11890,14 @@ var getSizeCss3 = (size) => {
|
|
|
11760
11890
|
if (size === "lg") return sizeLarge3;
|
|
11761
11891
|
return sizeMedium3;
|
|
11762
11892
|
};
|
|
11763
|
-
var StyledSwitchWrapper =
|
|
11893
|
+
var StyledSwitchWrapper = styled59.div`
|
|
11764
11894
|
display: flex;
|
|
11765
11895
|
margin: 0;
|
|
11766
11896
|
|
|
11767
11897
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
11768
11898
|
user-select: none;
|
|
11769
11899
|
`;
|
|
11770
|
-
var StyledSwitchInput =
|
|
11900
|
+
var StyledSwitchInput = styled59.div`
|
|
11771
11901
|
${({ $size }) => getSizeCss3($size)}
|
|
11772
11902
|
line-height: 0;
|
|
11773
11903
|
margin: 0;
|
|
@@ -11795,7 +11925,7 @@ var StyledSwitchInput = styled58.div`
|
|
|
11795
11925
|
transition: all 0.2s ease-in-out;
|
|
11796
11926
|
}
|
|
11797
11927
|
`;
|
|
11798
|
-
var StyledHiddenSwitchInput =
|
|
11928
|
+
var StyledHiddenSwitchInput = styled59.input`
|
|
11799
11929
|
${visuallyHiddenStyle}
|
|
11800
11930
|
|
|
11801
11931
|
/* toggles display of faux-input background-color and toggle position */
|
|
@@ -11828,8 +11958,8 @@ var Switch = forwardRef25(
|
|
|
11828
11958
|
}, ref) => {
|
|
11829
11959
|
const generatedId = useId4();
|
|
11830
11960
|
const computedId = isNonEmptyString4(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11831
|
-
return /* @__PURE__ */
|
|
11832
|
-
/* @__PURE__ */
|
|
11961
|
+
return /* @__PURE__ */ jsxs41(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11962
|
+
/* @__PURE__ */ jsx255(
|
|
11833
11963
|
StyledHiddenSwitchInput,
|
|
11834
11964
|
{
|
|
11835
11965
|
...props,
|
|
@@ -11844,10 +11974,10 @@ var Switch = forwardRef25(
|
|
|
11844
11974
|
value
|
|
11845
11975
|
}
|
|
11846
11976
|
),
|
|
11847
|
-
/* @__PURE__ */
|
|
11977
|
+
/* @__PURE__ */ jsx255(
|
|
11848
11978
|
FormControlLabel,
|
|
11849
11979
|
{
|
|
11850
|
-
controlSlot: /* @__PURE__ */
|
|
11980
|
+
controlSlot: /* @__PURE__ */ jsx255(
|
|
11851
11981
|
StyledSwitchInput,
|
|
11852
11982
|
{
|
|
11853
11983
|
$disabled: disabled,
|
|
@@ -11869,9 +11999,9 @@ var Switch = forwardRef25(
|
|
|
11869
11999
|
Switch.displayName = "Switch";
|
|
11870
12000
|
|
|
11871
12001
|
// src/components/Table/Table.tsx
|
|
11872
|
-
import
|
|
11873
|
-
import { jsx as
|
|
11874
|
-
var StyledTable =
|
|
12002
|
+
import styled60, { css as css35 } from "styled-components";
|
|
12003
|
+
import { jsx as jsx256 } from "react/jsx-runtime";
|
|
12004
|
+
var StyledTable = styled60.table`
|
|
11875
12005
|
width: 100%;
|
|
11876
12006
|
border-collapse: collapse;
|
|
11877
12007
|
|
|
@@ -11900,7 +12030,7 @@ var Table = ({
|
|
|
11900
12030
|
visuallyHiddenHeader = false,
|
|
11901
12031
|
...props
|
|
11902
12032
|
}) => {
|
|
11903
|
-
return /* @__PURE__ */
|
|
12033
|
+
return /* @__PURE__ */ jsx256(
|
|
11904
12034
|
StyledTable,
|
|
11905
12035
|
{
|
|
11906
12036
|
$divided: divided,
|
|
@@ -11913,35 +12043,35 @@ var Table = ({
|
|
|
11913
12043
|
};
|
|
11914
12044
|
|
|
11915
12045
|
// src/components/Table/TableBody.tsx
|
|
11916
|
-
import
|
|
12046
|
+
import styled61 from "styled-components";
|
|
11917
12047
|
|
|
11918
12048
|
// src/components/Table/TableSectionContext.ts
|
|
11919
12049
|
import { createContext as createContext9 } from "react";
|
|
11920
12050
|
var TableSectionContext = createContext9(null);
|
|
11921
12051
|
|
|
11922
12052
|
// src/components/Table/TableBody.tsx
|
|
11923
|
-
import { jsx as
|
|
11924
|
-
var StyledTableBody =
|
|
12053
|
+
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
12054
|
+
var StyledTableBody = styled61.tbody``;
|
|
11925
12055
|
var TableBody = ({ children, ...props }) => {
|
|
11926
|
-
return /* @__PURE__ */
|
|
12056
|
+
return /* @__PURE__ */ jsx257(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx257(StyledTableBody, { ...props, children }) });
|
|
11927
12057
|
};
|
|
11928
12058
|
|
|
11929
12059
|
// src/components/Table/TableCell.tsx
|
|
11930
12060
|
import { useContext as useContext8 } from "react";
|
|
11931
|
-
import
|
|
11932
|
-
import { jsx as
|
|
12061
|
+
import styled62, { css as css36 } from "styled-components";
|
|
12062
|
+
import { jsx as jsx258 } from "react/jsx-runtime";
|
|
11933
12063
|
var sharedStyles = css36`
|
|
11934
12064
|
color: var(--wui-color-text);
|
|
11935
12065
|
padding: var(--wui-space-02);
|
|
11936
12066
|
text-align: left;
|
|
11937
12067
|
`;
|
|
11938
|
-
var StyledTh =
|
|
12068
|
+
var StyledTh = styled62.th`
|
|
11939
12069
|
${sharedStyles}
|
|
11940
12070
|
font-size: var(--wui-typography-body-4-size);
|
|
11941
12071
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
11942
12072
|
line-height: var(--wui-typography-body-4-line-height);
|
|
11943
12073
|
`;
|
|
11944
|
-
var StyledTd =
|
|
12074
|
+
var StyledTd = styled62.td`
|
|
11945
12075
|
${sharedStyles}
|
|
11946
12076
|
font-size: var(--wui-typography-body-2-size);
|
|
11947
12077
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -11950,51 +12080,51 @@ var StyledTd = styled61.td`
|
|
|
11950
12080
|
var TableCell = ({ children, ...props }) => {
|
|
11951
12081
|
const section = useContext8(TableSectionContext);
|
|
11952
12082
|
if (section === "head") {
|
|
11953
|
-
return /* @__PURE__ */
|
|
12083
|
+
return /* @__PURE__ */ jsx258(StyledTh, { ...props, children });
|
|
11954
12084
|
}
|
|
11955
|
-
return /* @__PURE__ */
|
|
12085
|
+
return /* @__PURE__ */ jsx258(StyledTd, { ...props, children });
|
|
11956
12086
|
};
|
|
11957
12087
|
|
|
11958
12088
|
// src/components/Table/TableFoot.tsx
|
|
11959
|
-
import
|
|
11960
|
-
import { jsx as
|
|
11961
|
-
var StyledTableFoot =
|
|
12089
|
+
import styled63 from "styled-components";
|
|
12090
|
+
import { jsx as jsx259 } from "react/jsx-runtime";
|
|
12091
|
+
var StyledTableFoot = styled63.tfoot``;
|
|
11962
12092
|
var TableFoot = ({ children, ...props }) => {
|
|
11963
|
-
return /* @__PURE__ */
|
|
12093
|
+
return /* @__PURE__ */ jsx259(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx259(StyledTableFoot, { ...props, children }) });
|
|
11964
12094
|
};
|
|
11965
12095
|
|
|
11966
12096
|
// src/components/Table/TableHead.tsx
|
|
11967
|
-
import
|
|
11968
|
-
import { jsx as
|
|
11969
|
-
var StyledThead =
|
|
12097
|
+
import styled64 from "styled-components";
|
|
12098
|
+
import { jsx as jsx260 } from "react/jsx-runtime";
|
|
12099
|
+
var StyledThead = styled64.thead``;
|
|
11970
12100
|
var TableHead = ({ children, ...props }) => {
|
|
11971
|
-
return /* @__PURE__ */
|
|
12101
|
+
return /* @__PURE__ */ jsx260(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx260(StyledThead, { ...props, children }) });
|
|
11972
12102
|
};
|
|
11973
12103
|
|
|
11974
12104
|
// src/components/Table/TableRow.tsx
|
|
11975
|
-
import
|
|
11976
|
-
import { jsx as
|
|
11977
|
-
var StyledTableRow =
|
|
12105
|
+
import styled65 from "styled-components";
|
|
12106
|
+
import { jsx as jsx261 } from "react/jsx-runtime";
|
|
12107
|
+
var StyledTableRow = styled65.tr``;
|
|
11978
12108
|
var TableRow = ({ children, ...props }) => {
|
|
11979
|
-
return /* @__PURE__ */
|
|
12109
|
+
return /* @__PURE__ */ jsx261(StyledTableRow, { ...props, children });
|
|
11980
12110
|
};
|
|
11981
12111
|
|
|
11982
12112
|
// src/components/Tabs/Tabs.tsx
|
|
11983
12113
|
import { forwardRef as forwardRef27, useState as useState15 } from "react";
|
|
11984
12114
|
import { Root as TabsRoot } from "@radix-ui/react-tabs";
|
|
11985
|
-
import { isNotNil as
|
|
11986
|
-
import
|
|
12115
|
+
import { isNotNil as isNotNil30, isNil as isNil15 } from "@wistia/type-guards";
|
|
12116
|
+
import styled70 from "styled-components";
|
|
11987
12117
|
|
|
11988
12118
|
// src/components/Tabs/TabPanel.tsx
|
|
11989
|
-
import
|
|
12119
|
+
import styled66 from "styled-components";
|
|
11990
12120
|
import { Content as TabsContent } from "@radix-ui/react-tabs";
|
|
11991
|
-
import { jsx as
|
|
11992
|
-
var StyledTabPanel =
|
|
12121
|
+
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
12122
|
+
var StyledTabPanel = styled66(TabsContent)`
|
|
11993
12123
|
display: flex;
|
|
11994
12124
|
flex-direction: column;
|
|
11995
12125
|
`;
|
|
11996
12126
|
var TabPanel = ({ children, value, ...props }) => {
|
|
11997
|
-
return /* @__PURE__ */
|
|
12127
|
+
return /* @__PURE__ */ jsx262(
|
|
11998
12128
|
StyledTabPanel,
|
|
11999
12129
|
{
|
|
12000
12130
|
value,
|
|
@@ -12006,10 +12136,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
12006
12136
|
TabPanel.displayName = "TabPanel";
|
|
12007
12137
|
|
|
12008
12138
|
// src/components/Tabs/TabList.tsx
|
|
12009
|
-
import
|
|
12139
|
+
import styled67 from "styled-components";
|
|
12010
12140
|
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
12011
|
-
import { jsx as
|
|
12012
|
-
var StyledTabList =
|
|
12141
|
+
import { jsx as jsx263 } from "react/jsx-runtime";
|
|
12142
|
+
var StyledTabList = styled67(RadixTabList)`
|
|
12013
12143
|
${segmentedControlStyles}
|
|
12014
12144
|
|
|
12015
12145
|
margin-bottom: var(--wui-space-04);
|
|
@@ -12022,7 +12152,7 @@ var TabList = ({
|
|
|
12022
12152
|
ariaLabel,
|
|
12023
12153
|
...props
|
|
12024
12154
|
}) => {
|
|
12025
|
-
return /* @__PURE__ */
|
|
12155
|
+
return /* @__PURE__ */ jsx263(
|
|
12026
12156
|
StyledTabList,
|
|
12027
12157
|
{
|
|
12028
12158
|
$fullWidth: fullWidth,
|
|
@@ -12036,9 +12166,9 @@ TabList.displayName = "TabList";
|
|
|
12036
12166
|
|
|
12037
12167
|
// src/components/Tabs/TabItem.tsx
|
|
12038
12168
|
import { forwardRef as forwardRef26, useEffect as useEffect12, useRef as useRef13 } from "react";
|
|
12039
|
-
import
|
|
12169
|
+
import styled68 from "styled-components";
|
|
12040
12170
|
import { Trigger as RadixTab } from "@radix-ui/react-tabs";
|
|
12041
|
-
import { isNotNil as
|
|
12171
|
+
import { isNotNil as isNotNil29 } from "@wistia/type-guards";
|
|
12042
12172
|
|
|
12043
12173
|
// src/components/Tabs/useTabsValue.tsx
|
|
12044
12174
|
import { createContext as createContext10, useContext as useContext9 } from "react";
|
|
@@ -12053,8 +12183,8 @@ var useTabsValue = () => {
|
|
|
12053
12183
|
};
|
|
12054
12184
|
|
|
12055
12185
|
// src/components/Tabs/TabItem.tsx
|
|
12056
|
-
import { jsxs as
|
|
12057
|
-
var StyledTabItem =
|
|
12186
|
+
import { jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12187
|
+
var StyledTabItem = styled68(RadixTab)`
|
|
12058
12188
|
${segmentedControlItemStyles}
|
|
12059
12189
|
|
|
12060
12190
|
&:focus-visible {
|
|
@@ -12092,12 +12222,12 @@ var TabItem = forwardRef26(
|
|
|
12092
12222
|
resizeObserver.disconnect();
|
|
12093
12223
|
};
|
|
12094
12224
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
12095
|
-
return /* @__PURE__ */
|
|
12225
|
+
return /* @__PURE__ */ jsxs42(
|
|
12096
12226
|
StyledTabItem,
|
|
12097
12227
|
{
|
|
12098
12228
|
ref: combinedRef,
|
|
12099
|
-
$hasLabel:
|
|
12100
|
-
"aria-label":
|
|
12229
|
+
$hasLabel: isNotNil29(label),
|
|
12230
|
+
"aria-label": isNotNil29(label) ? void 0 : ariaLabel,
|
|
12101
12231
|
disabled,
|
|
12102
12232
|
value,
|
|
12103
12233
|
children: [
|
|
@@ -12133,9 +12263,9 @@ var extractTabItems = (children) => {
|
|
|
12133
12263
|
};
|
|
12134
12264
|
|
|
12135
12265
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
12136
|
-
import
|
|
12137
|
-
import { jsx as
|
|
12138
|
-
var TabsSelectedItemIndicatorDiv =
|
|
12266
|
+
import styled69 from "styled-components";
|
|
12267
|
+
import { jsx as jsx264 } from "react/jsx-runtime";
|
|
12268
|
+
var TabsSelectedItemIndicatorDiv = styled69(SelectedItemIndicatorDiv)`
|
|
12139
12269
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
12140
12270
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
12141
12271
|
}
|
|
@@ -12146,23 +12276,23 @@ var SelectedItemIndicator2 = () => {
|
|
|
12146
12276
|
if (selectedValue == null) {
|
|
12147
12277
|
return null;
|
|
12148
12278
|
}
|
|
12149
|
-
return /* @__PURE__ */
|
|
12279
|
+
return /* @__PURE__ */ jsx264(TabsSelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
12150
12280
|
};
|
|
12151
12281
|
|
|
12152
12282
|
// src/components/Tabs/Tabs.tsx
|
|
12153
|
-
import { jsx as
|
|
12154
|
-
var TabsContainer =
|
|
12283
|
+
import { jsx as jsx265, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
12284
|
+
var TabsContainer = styled70.div`
|
|
12155
12285
|
display: flex;
|
|
12156
12286
|
flex-direction: column;
|
|
12157
12287
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
12158
12288
|
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
12159
12289
|
`;
|
|
12160
|
-
var StickyTabContent =
|
|
12290
|
+
var StickyTabContent = styled70.div`
|
|
12161
12291
|
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
12162
12292
|
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
12163
12293
|
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
12164
12294
|
`;
|
|
12165
|
-
var StyledTabsRoot =
|
|
12295
|
+
var StyledTabsRoot = styled70(TabsRoot)`
|
|
12166
12296
|
display: flex;
|
|
12167
12297
|
flex-direction: column;
|
|
12168
12298
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
@@ -12185,7 +12315,7 @@ var Tabs = forwardRef27(
|
|
|
12185
12315
|
onValueChange: setInternalSelectedValue
|
|
12186
12316
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
12187
12317
|
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
12188
|
-
return /* @__PURE__ */
|
|
12318
|
+
return /* @__PURE__ */ jsx265(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ jsx265(
|
|
12189
12319
|
StyledTabsRoot,
|
|
12190
12320
|
{
|
|
12191
12321
|
ref,
|
|
@@ -12193,14 +12323,14 @@ var Tabs = forwardRef27(
|
|
|
12193
12323
|
activationMode: "automatic",
|
|
12194
12324
|
...props,
|
|
12195
12325
|
...modeProps,
|
|
12196
|
-
children: /* @__PURE__ */
|
|
12197
|
-
/* @__PURE__ */
|
|
12326
|
+
children: /* @__PURE__ */ jsx265(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ jsxs43(SelectedItemStyleProvider, { children: [
|
|
12327
|
+
/* @__PURE__ */ jsxs43(
|
|
12198
12328
|
TabList,
|
|
12199
12329
|
{
|
|
12200
12330
|
ariaLabel,
|
|
12201
12331
|
fullWidth,
|
|
12202
12332
|
children: [
|
|
12203
|
-
/* @__PURE__ */
|
|
12333
|
+
/* @__PURE__ */ jsx265(SelectedItemIndicator2, {}),
|
|
12204
12334
|
tabItems.map((tab) => {
|
|
12205
12335
|
const {
|
|
12206
12336
|
value,
|
|
@@ -12210,7 +12340,7 @@ var Tabs = forwardRef27(
|
|
|
12210
12340
|
"aria-label": ariaLabelForTab
|
|
12211
12341
|
} = tab.props;
|
|
12212
12342
|
if (isNil15(icon)) {
|
|
12213
|
-
return /* @__PURE__ */
|
|
12343
|
+
return /* @__PURE__ */ jsx265(
|
|
12214
12344
|
TabItem,
|
|
12215
12345
|
{
|
|
12216
12346
|
disabled,
|
|
@@ -12220,8 +12350,8 @@ var Tabs = forwardRef27(
|
|
|
12220
12350
|
value
|
|
12221
12351
|
);
|
|
12222
12352
|
}
|
|
12223
|
-
if (
|
|
12224
|
-
return /* @__PURE__ */
|
|
12353
|
+
if (isNotNil30(label)) {
|
|
12354
|
+
return /* @__PURE__ */ jsx265(
|
|
12225
12355
|
TabItem,
|
|
12226
12356
|
{
|
|
12227
12357
|
disabled,
|
|
@@ -12232,8 +12362,8 @@ var Tabs = forwardRef27(
|
|
|
12232
12362
|
value
|
|
12233
12363
|
);
|
|
12234
12364
|
}
|
|
12235
|
-
if (
|
|
12236
|
-
return /* @__PURE__ */
|
|
12365
|
+
if (isNotNil30(ariaLabelForTab)) {
|
|
12366
|
+
return /* @__PURE__ */ jsx265(
|
|
12237
12367
|
TabItem,
|
|
12238
12368
|
{
|
|
12239
12369
|
"aria-label": ariaLabelForTab,
|
|
@@ -12249,7 +12379,7 @@ var Tabs = forwardRef27(
|
|
|
12249
12379
|
]
|
|
12250
12380
|
}
|
|
12251
12381
|
),
|
|
12252
|
-
/* @__PURE__ */
|
|
12382
|
+
/* @__PURE__ */ jsx265(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ jsx265(
|
|
12253
12383
|
TabPanel,
|
|
12254
12384
|
{
|
|
12255
12385
|
value: tab.props.value,
|
|
@@ -12266,18 +12396,18 @@ Tabs.displayName = "Tabs";
|
|
|
12266
12396
|
|
|
12267
12397
|
// src/components/Tabs/Tab.tsx
|
|
12268
12398
|
import { forwardRef as forwardRef28 } from "react";
|
|
12269
|
-
import { jsx as
|
|
12399
|
+
import { jsx as jsx266 } from "react/jsx-runtime";
|
|
12270
12400
|
var Tab = forwardRef28(({ children }, ref) => {
|
|
12271
|
-
return /* @__PURE__ */
|
|
12401
|
+
return /* @__PURE__ */ jsx266("div", { ref, children });
|
|
12272
12402
|
});
|
|
12273
12403
|
Tab.displayName = "Tab";
|
|
12274
12404
|
|
|
12275
12405
|
// src/components/Tag/Tag.tsx
|
|
12276
12406
|
import { forwardRef as forwardRef29 } from "react";
|
|
12277
|
-
import
|
|
12278
|
-
import { isNil as isNil16, isNotNil as
|
|
12279
|
-
import { Fragment as Fragment8, jsx as
|
|
12280
|
-
var TagLabel =
|
|
12407
|
+
import styled71 from "styled-components";
|
|
12408
|
+
import { isNil as isNil16, isNotNil as isNotNil31, isNonEmptyString as isNonEmptyString5 } from "@wistia/type-guards";
|
|
12409
|
+
import { Fragment as Fragment8, jsx as jsx267, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12410
|
+
var TagLabel = styled71.a`
|
|
12281
12411
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12282
12412
|
font-size: var(--wui-typography-label-4-size);
|
|
12283
12413
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -12312,14 +12442,14 @@ var TagLabel = styled70.a`
|
|
|
12312
12442
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12313
12443
|
}
|
|
12314
12444
|
`;
|
|
12315
|
-
var TagDivider =
|
|
12445
|
+
var TagDivider = styled71.div`
|
|
12316
12446
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12317
12447
|
border-left: 1px solid var(--wui-color-border);
|
|
12318
12448
|
display: flex;
|
|
12319
12449
|
height: 14px;
|
|
12320
12450
|
width: 1px;
|
|
12321
12451
|
`;
|
|
12322
|
-
var StyledRemoveButton =
|
|
12452
|
+
var StyledRemoveButton = styled71.button`
|
|
12323
12453
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12324
12454
|
all: unset;
|
|
12325
12455
|
cursor: pointer;
|
|
@@ -12347,7 +12477,7 @@ var StyledRemoveButton = styled70.button`
|
|
|
12347
12477
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12348
12478
|
}
|
|
12349
12479
|
`;
|
|
12350
|
-
var StyledTag =
|
|
12480
|
+
var StyledTag = styled71.div`
|
|
12351
12481
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12352
12482
|
align-items: center;
|
|
12353
12483
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -12368,23 +12498,23 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
12368
12498
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
12369
12499
|
);
|
|
12370
12500
|
}
|
|
12371
|
-
return /* @__PURE__ */
|
|
12372
|
-
/* @__PURE__ */
|
|
12373
|
-
/* @__PURE__ */
|
|
12501
|
+
return /* @__PURE__ */ jsxs44(Fragment8, { children: [
|
|
12502
|
+
/* @__PURE__ */ jsx267(TagDivider, { $colorScheme: colorScheme }),
|
|
12503
|
+
/* @__PURE__ */ jsxs44(
|
|
12374
12504
|
StyledRemoveButton,
|
|
12375
12505
|
{
|
|
12376
12506
|
$colorScheme: colorScheme,
|
|
12377
12507
|
onClick: onClickRemove,
|
|
12378
12508
|
type: "button",
|
|
12379
12509
|
children: [
|
|
12380
|
-
/* @__PURE__ */
|
|
12510
|
+
/* @__PURE__ */ jsx267(
|
|
12381
12511
|
Icon,
|
|
12382
12512
|
{
|
|
12383
12513
|
size: "sm",
|
|
12384
12514
|
type: "close"
|
|
12385
12515
|
}
|
|
12386
12516
|
),
|
|
12387
|
-
/* @__PURE__ */
|
|
12517
|
+
/* @__PURE__ */ jsx267(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
12388
12518
|
]
|
|
12389
12519
|
}
|
|
12390
12520
|
)
|
|
@@ -12392,16 +12522,16 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
12392
12522
|
};
|
|
12393
12523
|
var Tag = forwardRef29(
|
|
12394
12524
|
({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
|
|
12395
|
-
const hasIcon =
|
|
12396
|
-
const labelProps =
|
|
12397
|
-
return /* @__PURE__ */
|
|
12525
|
+
const hasIcon = isNotNil31(icon);
|
|
12526
|
+
const labelProps = isNotNil31(href) && isNonEmptyString5(href) ? { href, as: "a" } : { as: "span" };
|
|
12527
|
+
return /* @__PURE__ */ jsxs44(
|
|
12398
12528
|
StyledTag,
|
|
12399
12529
|
{
|
|
12400
12530
|
ref,
|
|
12401
12531
|
$colorScheme: colorScheme,
|
|
12402
12532
|
...props,
|
|
12403
12533
|
children: [
|
|
12404
|
-
/* @__PURE__ */
|
|
12534
|
+
/* @__PURE__ */ jsxs44(
|
|
12405
12535
|
TagLabel,
|
|
12406
12536
|
{
|
|
12407
12537
|
...labelProps,
|
|
@@ -12412,7 +12542,7 @@ var Tag = forwardRef29(
|
|
|
12412
12542
|
]
|
|
12413
12543
|
}
|
|
12414
12544
|
),
|
|
12415
|
-
/* @__PURE__ */
|
|
12545
|
+
/* @__PURE__ */ jsx267(
|
|
12416
12546
|
RemoveButton,
|
|
12417
12547
|
{
|
|
12418
12548
|
colorScheme,
|
|
@@ -12428,10 +12558,10 @@ var Tag = forwardRef29(
|
|
|
12428
12558
|
Tag.displayName = "Tag";
|
|
12429
12559
|
|
|
12430
12560
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
12431
|
-
import
|
|
12432
|
-
import { isNotNil as
|
|
12433
|
-
import { jsx as
|
|
12434
|
-
var StyledThumbnailBadge =
|
|
12561
|
+
import styled72 from "styled-components";
|
|
12562
|
+
import { isNotNil as isNotNil32 } from "@wistia/type-guards";
|
|
12563
|
+
import { jsx as jsx268, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
12564
|
+
var StyledThumbnailBadge = styled72.div`
|
|
12435
12565
|
align-items: center;
|
|
12436
12566
|
background-color: rgb(0 0 0 / 50%);
|
|
12437
12567
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -12456,20 +12586,20 @@ var StyledThumbnailBadge = styled71.div`
|
|
|
12456
12586
|
}
|
|
12457
12587
|
`;
|
|
12458
12588
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
12459
|
-
return /* @__PURE__ */
|
|
12460
|
-
|
|
12461
|
-
/* @__PURE__ */
|
|
12589
|
+
return /* @__PURE__ */ jsxs45(StyledThumbnailBadge, { ...props, children: [
|
|
12590
|
+
isNotNil32(icon) && icon,
|
|
12591
|
+
/* @__PURE__ */ jsx268("span", { children: label })
|
|
12462
12592
|
] });
|
|
12463
12593
|
};
|
|
12464
12594
|
ThumbnailBadge.displayName = "ThumbnailBadge";
|
|
12465
12595
|
|
|
12466
12596
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12467
12597
|
import { forwardRef as forwardRef30 } from "react";
|
|
12468
|
-
import
|
|
12469
|
-
import { isNil as isNil17, isNotNil as
|
|
12598
|
+
import styled73 from "styled-components";
|
|
12599
|
+
import { isNil as isNil17, isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
12470
12600
|
|
|
12471
12601
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
12472
|
-
import { isNotNil as
|
|
12602
|
+
import { isNotNil as isNotNil33 } from "@wistia/type-guards";
|
|
12473
12603
|
import { css as css37 } from "styled-components";
|
|
12474
12604
|
var gradients = {
|
|
12475
12605
|
defaultDarkOne: css37`
|
|
@@ -12597,24 +12727,24 @@ var gradients = {
|
|
|
12597
12727
|
};
|
|
12598
12728
|
var gradientMap = Object.keys(gradients);
|
|
12599
12729
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
12600
|
-
return
|
|
12730
|
+
return isNotNil33(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
12601
12731
|
};
|
|
12602
12732
|
|
|
12603
12733
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12604
|
-
import { jsx as
|
|
12605
|
-
var WideThumbnailImage =
|
|
12734
|
+
import { jsx as jsx269, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
12735
|
+
var WideThumbnailImage = styled73.img`
|
|
12606
12736
|
height: 100%;
|
|
12607
12737
|
object-fit: cover;
|
|
12608
12738
|
width: 100%;
|
|
12609
12739
|
`;
|
|
12610
|
-
var SquareThumbnailImage =
|
|
12740
|
+
var SquareThumbnailImage = styled73.img`
|
|
12611
12741
|
backdrop-filter: blur(8px);
|
|
12612
12742
|
object-fit: contain;
|
|
12613
12743
|
width: 100%;
|
|
12614
12744
|
`;
|
|
12615
12745
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
12616
12746
|
if (thumbnailImageType === "wide") {
|
|
12617
|
-
return /* @__PURE__ */
|
|
12747
|
+
return /* @__PURE__ */ jsx269(
|
|
12618
12748
|
WideThumbnailImage,
|
|
12619
12749
|
{
|
|
12620
12750
|
alt: "",
|
|
@@ -12623,7 +12753,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
12623
12753
|
}
|
|
12624
12754
|
);
|
|
12625
12755
|
}
|
|
12626
|
-
return /* @__PURE__ */
|
|
12756
|
+
return /* @__PURE__ */ jsx269(
|
|
12627
12757
|
SquareThumbnailImage,
|
|
12628
12758
|
{
|
|
12629
12759
|
alt: "",
|
|
@@ -12632,8 +12762,8 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
12632
12762
|
}
|
|
12633
12763
|
);
|
|
12634
12764
|
};
|
|
12635
|
-
var StyledThumbnail =
|
|
12636
|
-
background-image: ${({ $backgroundUrl }) =>
|
|
12765
|
+
var StyledThumbnail = styled73.div`
|
|
12766
|
+
background-image: ${({ $backgroundUrl }) => isNotNil34($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
12637
12767
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
12638
12768
|
// if we don't have $backgroundUrl show a gradient
|
|
12639
12769
|
isNil17($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
@@ -12660,8 +12790,8 @@ var Thumbnail = forwardRef30(
|
|
|
12660
12790
|
children,
|
|
12661
12791
|
...props
|
|
12662
12792
|
}, ref) => {
|
|
12663
|
-
const backgroundUrl = thumbnailImageType === "square" &&
|
|
12664
|
-
return /* @__PURE__ */
|
|
12793
|
+
const backgroundUrl = thumbnailImageType === "square" && isNotNil34(thumbnailUrl) ? thumbnailUrl : void 0;
|
|
12794
|
+
return /* @__PURE__ */ jsxs46(
|
|
12665
12795
|
StyledThumbnail,
|
|
12666
12796
|
{
|
|
12667
12797
|
ref,
|
|
@@ -12671,8 +12801,8 @@ var Thumbnail = forwardRef30(
|
|
|
12671
12801
|
$width: width,
|
|
12672
12802
|
role: "presentation",
|
|
12673
12803
|
children: [
|
|
12674
|
-
|
|
12675
|
-
|
|
12804
|
+
isNotNil34(children) ? children : null,
|
|
12805
|
+
isNotNil34(thumbnailUrl) ? /* @__PURE__ */ jsx269(
|
|
12676
12806
|
ThumbnailImage,
|
|
12677
12807
|
{
|
|
12678
12808
|
thumbnailImageType,
|
|
@@ -12688,10 +12818,10 @@ Thumbnail.displayName = "Thumbnail";
|
|
|
12688
12818
|
|
|
12689
12819
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
12690
12820
|
import React2 from "react";
|
|
12691
|
-
import
|
|
12821
|
+
import styled74 from "styled-components";
|
|
12692
12822
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
12693
|
-
import { jsx as
|
|
12694
|
-
var StyledThumbnailCollage =
|
|
12823
|
+
import { jsx as jsx270 } from "react/jsx-runtime";
|
|
12824
|
+
var StyledThumbnailCollage = styled74.div`
|
|
12695
12825
|
display: grid;
|
|
12696
12826
|
gap: var(--wui-space-01);
|
|
12697
12827
|
width: 100%;
|
|
@@ -12773,7 +12903,7 @@ var ThumbnailCollage = ({
|
|
|
12773
12903
|
});
|
|
12774
12904
|
}) : [
|
|
12775
12905
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
12776
|
-
/* @__PURE__ */
|
|
12906
|
+
/* @__PURE__ */ jsx270(
|
|
12777
12907
|
Thumbnail,
|
|
12778
12908
|
{
|
|
12779
12909
|
gradientBackground,
|
|
@@ -12782,7 +12912,7 @@ var ThumbnailCollage = ({
|
|
|
12782
12912
|
"fallback"
|
|
12783
12913
|
)
|
|
12784
12914
|
];
|
|
12785
|
-
return /* @__PURE__ */
|
|
12915
|
+
return /* @__PURE__ */ jsx270(
|
|
12786
12916
|
StyledThumbnailCollage,
|
|
12787
12917
|
{
|
|
12788
12918
|
$gradientBackground: gradientBackground,
|
|
@@ -12794,26 +12924,26 @@ var ThumbnailCollage = ({
|
|
|
12794
12924
|
};
|
|
12795
12925
|
|
|
12796
12926
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
12797
|
-
import
|
|
12798
|
-
import { isNotNil as
|
|
12799
|
-
import { jsx as
|
|
12927
|
+
import styled75, { css as css38 } from "styled-components";
|
|
12928
|
+
import { isNotNil as isNotNil35 } from "@wistia/type-guards";
|
|
12929
|
+
import { jsx as jsx271, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
12800
12930
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
12801
12931
|
if (iconOnly) {
|
|
12802
|
-
return /* @__PURE__ */
|
|
12932
|
+
return /* @__PURE__ */ jsx271(
|
|
12803
12933
|
"g",
|
|
12804
12934
|
{
|
|
12805
12935
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
12806
12936
|
fill: brandmarkColor,
|
|
12807
|
-
children: /* @__PURE__ */
|
|
12937
|
+
children: /* @__PURE__ */ jsx271("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" })
|
|
12808
12938
|
}
|
|
12809
12939
|
);
|
|
12810
12940
|
}
|
|
12811
|
-
return /* @__PURE__ */
|
|
12941
|
+
return /* @__PURE__ */ jsx271(
|
|
12812
12942
|
"g",
|
|
12813
12943
|
{
|
|
12814
12944
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
12815
12945
|
fill: brandmarkColor,
|
|
12816
|
-
children: /* @__PURE__ */
|
|
12946
|
+
children: /* @__PURE__ */ jsx271("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" })
|
|
12817
12947
|
}
|
|
12818
12948
|
);
|
|
12819
12949
|
};
|
|
@@ -12821,12 +12951,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
12821
12951
|
if (iconOnly) {
|
|
12822
12952
|
return null;
|
|
12823
12953
|
}
|
|
12824
|
-
return /* @__PURE__ */
|
|
12954
|
+
return /* @__PURE__ */ jsx271(
|
|
12825
12955
|
"g",
|
|
12826
12956
|
{
|
|
12827
12957
|
"data-testid": "ui-wistia-logo-logotype",
|
|
12828
12958
|
fill: logotypeColor,
|
|
12829
|
-
children: /* @__PURE__ */
|
|
12959
|
+
children: /* @__PURE__ */ jsx271("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" })
|
|
12830
12960
|
}
|
|
12831
12961
|
);
|
|
12832
12962
|
};
|
|
@@ -12836,7 +12966,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
12836
12966
|
}
|
|
12837
12967
|
return "0 0 144 31.47";
|
|
12838
12968
|
};
|
|
12839
|
-
var WistiaLogoComponent =
|
|
12969
|
+
var WistiaLogoComponent = styled75.svg`
|
|
12840
12970
|
height: ${({ height }) => `${height}px`};
|
|
12841
12971
|
|
|
12842
12972
|
/* ensure it will always fit on mobile */
|
|
@@ -12894,7 +13024,7 @@ var WistiaLogo = ({
|
|
|
12894
13024
|
};
|
|
12895
13025
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
12896
13026
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
12897
|
-
const Logo = /* @__PURE__ */
|
|
13027
|
+
const Logo = /* @__PURE__ */ jsxs47(
|
|
12898
13028
|
WistiaLogoComponent,
|
|
12899
13029
|
{
|
|
12900
13030
|
$hoverColor: hoverColor,
|
|
@@ -12907,14 +13037,14 @@ var WistiaLogo = ({
|
|
|
12907
13037
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12908
13038
|
...props,
|
|
12909
13039
|
children: [
|
|
12910
|
-
/* @__PURE__ */
|
|
12911
|
-
|
|
13040
|
+
/* @__PURE__ */ jsx271("title", { children: title }),
|
|
13041
|
+
isNotNil35(description) ? /* @__PURE__ */ jsx271("desc", { children: description }) : null,
|
|
12912
13042
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
12913
13043
|
renderLogotype(logotypeColor, iconOnly)
|
|
12914
13044
|
]
|
|
12915
13045
|
}
|
|
12916
13046
|
);
|
|
12917
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
13047
|
+
return href !== void 0 ? /* @__PURE__ */ jsx271("a", { href, children: Logo }) : Logo;
|
|
12918
13048
|
};
|
|
12919
13049
|
WistiaLogo.displayName = "WistiaLogo";
|
|
12920
13050
|
export {
|
|
@@ -12956,6 +13086,7 @@ export {
|
|
|
12956
13086
|
ImageDimensionsValidator,
|
|
12957
13087
|
Input,
|
|
12958
13088
|
InputClickToCopy,
|
|
13089
|
+
KeyboardShortcut,
|
|
12959
13090
|
Label,
|
|
12960
13091
|
Link,
|
|
12961
13092
|
Menu,
|