@wistia/ui 0.6.10 → 0.6.11-beta.0e21fde4.8ec0099
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +690 -564
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +170 -121
- package/dist/index.d.ts +170 -121
- package/dist/index.mjs +687 -567
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.11-beta.0e21fde4.8ec0099
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -9059,15 +9059,64 @@ var IconButton = forwardRef12(
|
|
|
9059
9059
|
);
|
|
9060
9060
|
IconButton.displayName = "IconButton";
|
|
9061
9061
|
|
|
9062
|
+
// src/components/Image/Image.tsx
|
|
9063
|
+
import styled35 from "styled-components";
|
|
9064
|
+
import { isNotNil as isNotNil12 } from "@wistia/type-guards";
|
|
9065
|
+
import { jsx as jsx223 } from "react/jsx-runtime";
|
|
9066
|
+
var getFillStyle2 = (fillContainer) => {
|
|
9067
|
+
if (fillContainer === "horizontal") {
|
|
9068
|
+
return "width: 100%;";
|
|
9069
|
+
}
|
|
9070
|
+
if (fillContainer === "vertical") {
|
|
9071
|
+
return "height: 100%;";
|
|
9072
|
+
}
|
|
9073
|
+
if (fillContainer === true) {
|
|
9074
|
+
return `
|
|
9075
|
+
width: 100%;
|
|
9076
|
+
height: 100%;
|
|
9077
|
+
`;
|
|
9078
|
+
}
|
|
9079
|
+
return void 0;
|
|
9080
|
+
};
|
|
9081
|
+
var StyledImage = styled35.img`
|
|
9082
|
+
border-radius: ${({ $borderRadius }) => isNotNil12($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
9083
|
+
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
9084
|
+
object-fit: ${({ $objFit }) => $objFit};
|
|
9085
|
+
object-position: ${({ $objPosition }) => $objPosition};
|
|
9086
|
+
`;
|
|
9087
|
+
var Image = ({
|
|
9088
|
+
src,
|
|
9089
|
+
alt,
|
|
9090
|
+
borderRadius,
|
|
9091
|
+
fill: fillContainer = false,
|
|
9092
|
+
fit: objFit,
|
|
9093
|
+
loading = "lazy",
|
|
9094
|
+
position: objPosition,
|
|
9095
|
+
...otherProps
|
|
9096
|
+
}) => /* @__PURE__ */ jsx223(
|
|
9097
|
+
StyledImage,
|
|
9098
|
+
{
|
|
9099
|
+
$borderRadius: borderRadius,
|
|
9100
|
+
$fillContainer: fillContainer,
|
|
9101
|
+
$objFit: objFit,
|
|
9102
|
+
$objPosition: objPosition,
|
|
9103
|
+
alt,
|
|
9104
|
+
loading,
|
|
9105
|
+
src,
|
|
9106
|
+
...otherProps
|
|
9107
|
+
}
|
|
9108
|
+
);
|
|
9109
|
+
Image.displayName = "Image";
|
|
9110
|
+
|
|
9062
9111
|
// src/components/Menu/Menu.tsx
|
|
9063
|
-
import
|
|
9112
|
+
import styled36, { css as css24, keyframes as keyframes2 } from "styled-components";
|
|
9064
9113
|
import {
|
|
9065
9114
|
DropdownMenu,
|
|
9066
9115
|
DropdownMenuTrigger,
|
|
9067
9116
|
DropdownMenuPortal,
|
|
9068
9117
|
DropdownMenuContent
|
|
9069
9118
|
} from "@radix-ui/react-dropdown-menu";
|
|
9070
|
-
import { isNotNil as
|
|
9119
|
+
import { isNotNil as isNotNil13, isNotUndefined as isNotUndefined8 } from "@wistia/type-guards";
|
|
9071
9120
|
import { useMemo as useMemo7 } from "react";
|
|
9072
9121
|
|
|
9073
9122
|
// src/components/Menu/MenuContext.tsx
|
|
@@ -9076,7 +9125,7 @@ var MenuContext = createContext5({ compact: false });
|
|
|
9076
9125
|
var useMenuContext = () => useContext4(MenuContext);
|
|
9077
9126
|
|
|
9078
9127
|
// src/components/Menu/Menu.tsx
|
|
9079
|
-
import { jsx as
|
|
9128
|
+
import { jsx as jsx224, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
9080
9129
|
var open = keyframes2`
|
|
9081
9130
|
from {
|
|
9082
9131
|
opacity: 0;
|
|
@@ -9161,7 +9210,7 @@ var menuContentCss = css24`
|
|
|
9161
9210
|
margin: var(--menu-divider-margin) 0;
|
|
9162
9211
|
}
|
|
9163
9212
|
`;
|
|
9164
|
-
var MenuContent =
|
|
9213
|
+
var MenuContent = styled36(DropdownMenuContent)`
|
|
9165
9214
|
${menuContentCss}
|
|
9166
9215
|
`;
|
|
9167
9216
|
var Menu = ({
|
|
@@ -9179,7 +9228,7 @@ var Menu = ({
|
|
|
9179
9228
|
}) => {
|
|
9180
9229
|
const contextValue = useMemo7(() => ({ compact }), [compact]);
|
|
9181
9230
|
let controlProps = {
|
|
9182
|
-
...
|
|
9231
|
+
...isNotNil13(onOpenChange) && isNotNil13(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
9183
9232
|
};
|
|
9184
9233
|
if (disabled) {
|
|
9185
9234
|
controlProps = {
|
|
@@ -9187,24 +9236,24 @@ var Menu = ({
|
|
|
9187
9236
|
onOpenChange: () => null
|
|
9188
9237
|
};
|
|
9189
9238
|
}
|
|
9190
|
-
return /* @__PURE__ */
|
|
9239
|
+
return /* @__PURE__ */ jsx224(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs22(
|
|
9191
9240
|
DropdownMenu,
|
|
9192
9241
|
{
|
|
9193
9242
|
modal: false,
|
|
9194
9243
|
...controlProps,
|
|
9195
9244
|
children: [
|
|
9196
|
-
/* @__PURE__ */
|
|
9245
|
+
/* @__PURE__ */ jsx224(DropdownMenuTrigger, { asChild: true, children: isNotUndefined8(trigger) ? trigger : /* @__PURE__ */ jsx224(
|
|
9197
9246
|
Button,
|
|
9198
9247
|
{
|
|
9199
9248
|
"aria-expanded": isOpen,
|
|
9200
9249
|
disabled,
|
|
9201
9250
|
forceState: isOpen ? "active" : void 0,
|
|
9202
|
-
rightIcon: /* @__PURE__ */
|
|
9251
|
+
rightIcon: /* @__PURE__ */ jsx224(Icon, { type: "caret-down" }),
|
|
9203
9252
|
...triggerProps,
|
|
9204
9253
|
children: label
|
|
9205
9254
|
}
|
|
9206
9255
|
) }),
|
|
9207
|
-
/* @__PURE__ */
|
|
9256
|
+
/* @__PURE__ */ jsx224(DropdownMenuPortal, { children: /* @__PURE__ */ jsx224(
|
|
9208
9257
|
MenuContent,
|
|
9209
9258
|
{
|
|
9210
9259
|
...props,
|
|
@@ -9224,19 +9273,19 @@ var Menu = ({
|
|
|
9224
9273
|
Menu.displayName = "Menu";
|
|
9225
9274
|
|
|
9226
9275
|
// src/components/Menu/MenuLabel.tsx
|
|
9227
|
-
import
|
|
9276
|
+
import styled37 from "styled-components";
|
|
9228
9277
|
import { DropdownMenuLabel } from "@radix-ui/react-dropdown-menu";
|
|
9229
|
-
import { jsx as
|
|
9230
|
-
var StyledMenuLabel =
|
|
9278
|
+
import { jsx as jsx225 } from "react/jsx-runtime";
|
|
9279
|
+
var StyledMenuLabel = styled37(DropdownMenuLabel)`
|
|
9231
9280
|
padding: var(--wui-space-02);
|
|
9232
9281
|
`;
|
|
9233
9282
|
var MenuLabel = ({ children, ...props }) => {
|
|
9234
|
-
return /* @__PURE__ */
|
|
9283
|
+
return /* @__PURE__ */ jsx225(
|
|
9235
9284
|
StyledMenuLabel,
|
|
9236
9285
|
{
|
|
9237
9286
|
asChild: true,
|
|
9238
9287
|
...props,
|
|
9239
|
-
children: /* @__PURE__ */
|
|
9288
|
+
children: /* @__PURE__ */ jsx225(
|
|
9240
9289
|
Heading,
|
|
9241
9290
|
{
|
|
9242
9291
|
renderAs: "span",
|
|
@@ -9252,7 +9301,7 @@ MenuLabel.displayName = "MenuLabel";
|
|
|
9252
9301
|
|
|
9253
9302
|
// src/components/Menu/SubMenu.tsx
|
|
9254
9303
|
import { useState as useState8 } from "react";
|
|
9255
|
-
import
|
|
9304
|
+
import styled40 from "styled-components";
|
|
9256
9305
|
import {
|
|
9257
9306
|
DropdownMenuPortal as DropdownMenuPortal2,
|
|
9258
9307
|
DropdownMenuSub,
|
|
@@ -9261,14 +9310,14 @@ import {
|
|
|
9261
9310
|
DropdownMenuSubTrigger,
|
|
9262
9311
|
DropdownMenuItem
|
|
9263
9312
|
} from "@radix-ui/react-dropdown-menu";
|
|
9264
|
-
import { isNotNil as
|
|
9313
|
+
import { isNotNil as isNotNil15 } from "@wistia/type-guards";
|
|
9265
9314
|
|
|
9266
9315
|
// src/components/Menu/MenuItemButton.tsx
|
|
9267
9316
|
import { forwardRef as forwardRef13 } from "react";
|
|
9268
|
-
import
|
|
9269
|
-
import { isNotNil as
|
|
9270
|
-
import { jsx as
|
|
9271
|
-
var StyledButton3 =
|
|
9317
|
+
import styled38 from "styled-components";
|
|
9318
|
+
import { isNotNil as isNotNil14, isNotUndefined as isNotUndefined9 } from "@wistia/type-guards";
|
|
9319
|
+
import { jsx as jsx226, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
9320
|
+
var StyledButton3 = styled38(Button)`
|
|
9272
9321
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
9273
9322
|
|
|
9274
9323
|
display: flex;
|
|
@@ -9307,7 +9356,7 @@ var StyledButton3 = styled37(Button)`
|
|
|
9307
9356
|
padding-left: var(--wui-space-04);
|
|
9308
9357
|
}
|
|
9309
9358
|
`;
|
|
9310
|
-
var StyledLeftIconContainer =
|
|
9359
|
+
var StyledLeftIconContainer = styled38.div`
|
|
9311
9360
|
height: var(--menu-item-left-icon-size);
|
|
9312
9361
|
width: var(--menu-item-left-icon-size);
|
|
9313
9362
|
|
|
@@ -9318,7 +9367,7 @@ var StyledLeftIconContainer = styled37.div`
|
|
|
9318
9367
|
}
|
|
9319
9368
|
}
|
|
9320
9369
|
`;
|
|
9321
|
-
var StyledRightIconContainer =
|
|
9370
|
+
var StyledRightIconContainer = styled38.div`
|
|
9322
9371
|
height: var(--menu-item-right-icon-size);
|
|
9323
9372
|
width: var(--menu-item-right-icon-size);
|
|
9324
9373
|
|
|
@@ -9329,13 +9378,13 @@ var StyledRightIconContainer = styled37.div`
|
|
|
9329
9378
|
}
|
|
9330
9379
|
}
|
|
9331
9380
|
`;
|
|
9332
|
-
var StyledLabelAndDescriptionContainer =
|
|
9381
|
+
var StyledLabelAndDescriptionContainer = styled38.div`
|
|
9333
9382
|
display: flex;
|
|
9334
9383
|
flex-direction: column;
|
|
9335
9384
|
gap: var(--menu-label-description-gap);
|
|
9336
9385
|
flex-basis: 100%;
|
|
9337
9386
|
`;
|
|
9338
|
-
var StyledBadgeContainer =
|
|
9387
|
+
var StyledBadgeContainer = styled38.div`
|
|
9339
9388
|
align-self: start;
|
|
9340
9389
|
justify-self: end;
|
|
9341
9390
|
font-size: var(--wui-typography-label-4-size);
|
|
@@ -9350,7 +9399,7 @@ var MenuItemButton = forwardRef13(({ children, appearance, command, icon, ...pro
|
|
|
9350
9399
|
colorScheme = "error";
|
|
9351
9400
|
}
|
|
9352
9401
|
if (appearance === "gated") {
|
|
9353
|
-
badge = /* @__PURE__ */
|
|
9402
|
+
badge = /* @__PURE__ */ jsx226(
|
|
9354
9403
|
Icon,
|
|
9355
9404
|
{
|
|
9356
9405
|
colorScheme: "purple",
|
|
@@ -9372,10 +9421,10 @@ var MenuItemButton = forwardRef13(({ children, appearance, command, icon, ...pro
|
|
|
9372
9421
|
fullWidth: true,
|
|
9373
9422
|
unstyled: true,
|
|
9374
9423
|
children: [
|
|
9375
|
-
props.leftIcon ? /* @__PURE__ */
|
|
9376
|
-
/* @__PURE__ */
|
|
9377
|
-
|
|
9378
|
-
props.rightIcon ? /* @__PURE__ */
|
|
9424
|
+
props.leftIcon ? /* @__PURE__ */ jsx226(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
9425
|
+
/* @__PURE__ */ jsx226(StyledLabelAndDescriptionContainer, { children }),
|
|
9426
|
+
isNotNil14(badge) || isNotNil14(command) ? /* @__PURE__ */ jsx226(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
9427
|
+
props.rightIcon ? /* @__PURE__ */ jsx226(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
9379
9428
|
]
|
|
9380
9429
|
}
|
|
9381
9430
|
);
|
|
@@ -9383,33 +9432,33 @@ var MenuItemButton = forwardRef13(({ children, appearance, command, icon, ...pro
|
|
|
9383
9432
|
MenuItemButton.displayName = "MenuItemButton";
|
|
9384
9433
|
|
|
9385
9434
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
9386
|
-
import
|
|
9387
|
-
import { jsx as
|
|
9388
|
-
var StyledMenuItemLabel =
|
|
9389
|
-
var StyledMenuItemDescription =
|
|
9435
|
+
import styled39 from "styled-components";
|
|
9436
|
+
import { jsx as jsx227 } from "react/jsx-runtime";
|
|
9437
|
+
var StyledMenuItemLabel = styled39.span``;
|
|
9438
|
+
var StyledMenuItemDescription = styled39(Text).attrs({
|
|
9390
9439
|
variant: "body4",
|
|
9391
9440
|
prominence: "secondary"
|
|
9392
9441
|
})``;
|
|
9393
9442
|
var MenuItemLabel = ({ children }) => {
|
|
9394
|
-
return /* @__PURE__ */
|
|
9443
|
+
return /* @__PURE__ */ jsx227(StyledMenuItemLabel, { children });
|
|
9395
9444
|
};
|
|
9396
9445
|
var MenuItemDescription = ({ children }) => {
|
|
9397
|
-
return /* @__PURE__ */
|
|
9446
|
+
return /* @__PURE__ */ jsx227(StyledMenuItemDescription, { children });
|
|
9398
9447
|
};
|
|
9399
9448
|
|
|
9400
9449
|
// src/components/Menu/SubMenu.tsx
|
|
9401
|
-
import { jsx as
|
|
9402
|
-
var SubMenuContent =
|
|
9450
|
+
import { jsx as jsx228, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
9451
|
+
var SubMenuContent = styled40(DropdownMenuSubContent)`
|
|
9403
9452
|
${menuContentCss}
|
|
9404
9453
|
|
|
9405
9454
|
${mq.smAndDown} {
|
|
9406
9455
|
transform: translateX(-100%) !important;
|
|
9407
9456
|
}
|
|
9408
9457
|
`;
|
|
9409
|
-
var StyledMobileSubMenuItems =
|
|
9458
|
+
var StyledMobileSubMenuItems = styled40.div`
|
|
9410
9459
|
margin-left: var(--wui-space-04);
|
|
9411
9460
|
`;
|
|
9412
|
-
var StyledSubTrigger =
|
|
9461
|
+
var StyledSubTrigger = styled40(DropdownMenuSubTrigger)`
|
|
9413
9462
|
outline: none;
|
|
9414
9463
|
|
|
9415
9464
|
&[data-state='open'],
|
|
@@ -9420,11 +9469,11 @@ var StyledSubTrigger = styled39(DropdownMenuSubTrigger)`
|
|
|
9420
9469
|
var SubMenuTrigger = (props) => {
|
|
9421
9470
|
const { isSmAndUp } = useMq();
|
|
9422
9471
|
const Trigger4 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
|
|
9423
|
-
return /* @__PURE__ */
|
|
9472
|
+
return /* @__PURE__ */ jsx228(Trigger4, { asChild: true, children: /* @__PURE__ */ jsx228(
|
|
9424
9473
|
MenuItemButton,
|
|
9425
9474
|
{
|
|
9426
9475
|
...props,
|
|
9427
|
-
rightIcon: /* @__PURE__ */
|
|
9476
|
+
rightIcon: /* @__PURE__ */ jsx228(Icon, { type: "caret-right" })
|
|
9428
9477
|
}
|
|
9429
9478
|
) });
|
|
9430
9479
|
};
|
|
@@ -9440,10 +9489,10 @@ var SubMenu = ({
|
|
|
9440
9489
|
const { compact } = useMenuContext();
|
|
9441
9490
|
return isSmAndUp ? /* @__PURE__ */ jsxs24(DropdownMenuSub, { onOpenChange, children: [
|
|
9442
9491
|
/* @__PURE__ */ jsxs24(SubMenuTrigger, { ...props, children: [
|
|
9443
|
-
/* @__PURE__ */
|
|
9444
|
-
|
|
9492
|
+
/* @__PURE__ */ jsx228(MenuItemLabel, { children: label }),
|
|
9493
|
+
isNotNil15(description) ? /* @__PURE__ */ jsx228(MenuItemDescription, { children: description }) : null
|
|
9445
9494
|
] }),
|
|
9446
|
-
/* @__PURE__ */
|
|
9495
|
+
/* @__PURE__ */ jsx228(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx228(SubMenuContent, { $compact: compact, children }) })
|
|
9447
9496
|
] }) : /* @__PURE__ */ jsxs24(DropdownMenuGroup, { children: [
|
|
9448
9497
|
/* @__PURE__ */ jsxs24(
|
|
9449
9498
|
SubMenuTrigger,
|
|
@@ -9454,12 +9503,12 @@ var SubMenu = ({
|
|
|
9454
9503
|
setIsExpanded((prev) => !prev);
|
|
9455
9504
|
},
|
|
9456
9505
|
children: [
|
|
9457
|
-
/* @__PURE__ */
|
|
9458
|
-
/* @__PURE__ */
|
|
9506
|
+
/* @__PURE__ */ jsx228(MenuItemLabel, { children: label }),
|
|
9507
|
+
/* @__PURE__ */ jsx228(MenuItemDescription, { children: description })
|
|
9459
9508
|
]
|
|
9460
9509
|
}
|
|
9461
9510
|
),
|
|
9462
|
-
/* @__PURE__ */
|
|
9511
|
+
/* @__PURE__ */ jsx228(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
9463
9512
|
] });
|
|
9464
9513
|
};
|
|
9465
9514
|
SubMenu.displayName = "SubMenu";
|
|
@@ -9467,15 +9516,15 @@ SubMenu.displayName = "SubMenu";
|
|
|
9467
9516
|
// src/components/Menu/MenuItem.tsx
|
|
9468
9517
|
import { forwardRef as forwardRef14 } from "react";
|
|
9469
9518
|
import { DropdownMenuItem as DropdownMenuItem2 } from "@radix-ui/react-dropdown-menu";
|
|
9470
|
-
import { jsx as
|
|
9519
|
+
import { jsx as jsx229 } from "react/jsx-runtime";
|
|
9471
9520
|
var MenuItem = forwardRef14(
|
|
9472
9521
|
({ onSelect = () => null, ...props }, ref) => {
|
|
9473
|
-
return /* @__PURE__ */
|
|
9522
|
+
return /* @__PURE__ */ jsx229(
|
|
9474
9523
|
DropdownMenuItem2,
|
|
9475
9524
|
{
|
|
9476
9525
|
asChild: true,
|
|
9477
9526
|
onSelect,
|
|
9478
|
-
children: /* @__PURE__ */
|
|
9527
|
+
children: /* @__PURE__ */ jsx229(
|
|
9479
9528
|
MenuItemButton,
|
|
9480
9529
|
{
|
|
9481
9530
|
...props,
|
|
@@ -9493,10 +9542,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
9493
9542
|
import {
|
|
9494
9543
|
DropdownMenuRadioGroup
|
|
9495
9544
|
} from "@radix-ui/react-dropdown-menu";
|
|
9496
|
-
import { jsx as
|
|
9545
|
+
import { jsx as jsx230, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
9497
9546
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
9498
9547
|
return /* @__PURE__ */ jsxs25(DropdownMenuRadioGroup, { ...props, children: [
|
|
9499
|
-
/* @__PURE__ */
|
|
9548
|
+
/* @__PURE__ */ jsx230(MenuLabel, { children: label }),
|
|
9500
9549
|
children
|
|
9501
9550
|
] });
|
|
9502
9551
|
};
|
|
@@ -9507,11 +9556,11 @@ import {
|
|
|
9507
9556
|
DropdownMenuItemIndicator,
|
|
9508
9557
|
DropdownMenuRadioItem
|
|
9509
9558
|
} from "@radix-ui/react-dropdown-menu";
|
|
9510
|
-
import { jsx as
|
|
9559
|
+
import { jsx as jsx231 } from "react/jsx-runtime";
|
|
9511
9560
|
var RadioMenuItem = ({
|
|
9512
9561
|
onSelect,
|
|
9513
9562
|
value,
|
|
9514
|
-
indicator = /* @__PURE__ */
|
|
9563
|
+
indicator = /* @__PURE__ */ jsx231(
|
|
9515
9564
|
Icon,
|
|
9516
9565
|
{
|
|
9517
9566
|
size: "sm",
|
|
@@ -9521,17 +9570,17 @@ var RadioMenuItem = ({
|
|
|
9521
9570
|
...props
|
|
9522
9571
|
}) => {
|
|
9523
9572
|
const extraProps = onSelect ? { onSelect } : {};
|
|
9524
|
-
return /* @__PURE__ */
|
|
9573
|
+
return /* @__PURE__ */ jsx231(
|
|
9525
9574
|
DropdownMenuRadioItem,
|
|
9526
9575
|
{
|
|
9527
9576
|
...extraProps,
|
|
9528
9577
|
asChild: true,
|
|
9529
9578
|
value,
|
|
9530
|
-
children: /* @__PURE__ */
|
|
9579
|
+
children: /* @__PURE__ */ jsx231(
|
|
9531
9580
|
MenuItemButton,
|
|
9532
9581
|
{
|
|
9533
9582
|
...props,
|
|
9534
|
-
rightIcon: /* @__PURE__ */
|
|
9583
|
+
rightIcon: /* @__PURE__ */ jsx231(DropdownMenuItemIndicator, { children: indicator })
|
|
9535
9584
|
}
|
|
9536
9585
|
)
|
|
9537
9586
|
}
|
|
@@ -9543,7 +9592,7 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
9543
9592
|
import {
|
|
9544
9593
|
DropdownMenuCheckboxItem
|
|
9545
9594
|
} from "@radix-ui/react-dropdown-menu";
|
|
9546
|
-
import { jsx as
|
|
9595
|
+
import { jsx as jsx232, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
9547
9596
|
var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
9548
9597
|
return checked ? /* @__PURE__ */ jsxs26(
|
|
9549
9598
|
"svg",
|
|
@@ -9555,14 +9604,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
9555
9604
|
width: "24",
|
|
9556
9605
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9557
9606
|
children: [
|
|
9558
|
-
/* @__PURE__ */
|
|
9607
|
+
/* @__PURE__ */ jsx232(
|
|
9559
9608
|
"path",
|
|
9560
9609
|
{
|
|
9561
9610
|
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",
|
|
9562
9611
|
fill: "#2949e5"
|
|
9563
9612
|
}
|
|
9564
9613
|
),
|
|
9565
|
-
/* @__PURE__ */
|
|
9614
|
+
/* @__PURE__ */ jsx232(
|
|
9566
9615
|
"path",
|
|
9567
9616
|
{
|
|
9568
9617
|
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",
|
|
@@ -9581,14 +9630,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
9581
9630
|
width: "24",
|
|
9582
9631
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9583
9632
|
children: [
|
|
9584
|
-
/* @__PURE__ */
|
|
9633
|
+
/* @__PURE__ */ jsx232(
|
|
9585
9634
|
"path",
|
|
9586
9635
|
{
|
|
9587
9636
|
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",
|
|
9588
9637
|
fill: "#fcfcfd"
|
|
9589
9638
|
}
|
|
9590
9639
|
),
|
|
9591
|
-
/* @__PURE__ */
|
|
9640
|
+
/* @__PURE__ */ jsx232(
|
|
9592
9641
|
"path",
|
|
9593
9642
|
{
|
|
9594
9643
|
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",
|
|
@@ -9605,18 +9654,18 @@ var CheckboxMenuItem = ({
|
|
|
9605
9654
|
onCheckedChange,
|
|
9606
9655
|
...props
|
|
9607
9656
|
}) => {
|
|
9608
|
-
return /* @__PURE__ */
|
|
9657
|
+
return /* @__PURE__ */ jsx232(
|
|
9609
9658
|
DropdownMenuCheckboxItem,
|
|
9610
9659
|
{
|
|
9611
9660
|
asChild: true,
|
|
9612
9661
|
checked,
|
|
9613
9662
|
onCheckedChange,
|
|
9614
9663
|
onSelect,
|
|
9615
|
-
children: /* @__PURE__ */
|
|
9664
|
+
children: /* @__PURE__ */ jsx232(
|
|
9616
9665
|
MenuItemButton,
|
|
9617
9666
|
{
|
|
9618
9667
|
...props,
|
|
9619
|
-
leftIcon: /* @__PURE__ */
|
|
9668
|
+
leftIcon: /* @__PURE__ */ jsx232(CheckboxIndicator2, { checked })
|
|
9620
9669
|
}
|
|
9621
9670
|
)
|
|
9622
9671
|
}
|
|
@@ -9626,36 +9675,36 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
|
9626
9675
|
|
|
9627
9676
|
// src/components/Modal/Modal.tsx
|
|
9628
9677
|
import { forwardRef as forwardRef17 } from "react";
|
|
9629
|
-
import
|
|
9678
|
+
import styled45 from "styled-components";
|
|
9630
9679
|
import { Root as DialogRoot, Portal as DialogPortal } from "@radix-ui/react-dialog";
|
|
9631
|
-
import { isNotNil as
|
|
9680
|
+
import { isNotNil as isNotNil17 } from "@wistia/type-guards";
|
|
9632
9681
|
|
|
9633
9682
|
// src/components/Modal/ModalHeader.tsx
|
|
9634
|
-
import
|
|
9683
|
+
import styled42 from "styled-components";
|
|
9635
9684
|
import { Title as DialogTitle } from "@radix-ui/react-dialog";
|
|
9636
9685
|
|
|
9637
9686
|
// src/components/Modal/ModalCloseButton.tsx
|
|
9638
|
-
import
|
|
9687
|
+
import styled41 from "styled-components";
|
|
9639
9688
|
import { Close as DialogClose } from "@radix-ui/react-dialog";
|
|
9640
|
-
import { jsx as
|
|
9641
|
-
var CloseButton =
|
|
9689
|
+
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
9690
|
+
var CloseButton = styled41(DialogClose)`
|
|
9642
9691
|
align-self: start;
|
|
9643
9692
|
`;
|
|
9644
9693
|
var ModalCloseButton = () => {
|
|
9645
|
-
return /* @__PURE__ */
|
|
9694
|
+
return /* @__PURE__ */ jsx233(CloseButton, { asChild: true, children: /* @__PURE__ */ jsx233(
|
|
9646
9695
|
IconButton,
|
|
9647
9696
|
{
|
|
9648
9697
|
label: "Dismiss modal",
|
|
9649
9698
|
size: "sm",
|
|
9650
9699
|
variant: "ghost",
|
|
9651
|
-
children: /* @__PURE__ */
|
|
9700
|
+
children: /* @__PURE__ */ jsx233(Icon, { type: "close" })
|
|
9652
9701
|
}
|
|
9653
9702
|
) });
|
|
9654
9703
|
};
|
|
9655
9704
|
|
|
9656
9705
|
// src/components/Modal/ModalHeader.tsx
|
|
9657
|
-
import { jsx as
|
|
9658
|
-
var Header =
|
|
9706
|
+
import { jsx as jsx234, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
9707
|
+
var Header = styled42.header`
|
|
9659
9708
|
display: flex;
|
|
9660
9709
|
order: 1;
|
|
9661
9710
|
gap: var(--wui-space-01);
|
|
@@ -9667,7 +9716,7 @@ var Header = styled41.header`
|
|
|
9667
9716
|
margin-top: 0;
|
|
9668
9717
|
}
|
|
9669
9718
|
`;
|
|
9670
|
-
var Title =
|
|
9719
|
+
var Title = styled42(DialogTitle)`
|
|
9671
9720
|
font-family: var(--wui-typography-heading-2-family);
|
|
9672
9721
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
9673
9722
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -9680,19 +9729,19 @@ var ModalHeader = ({
|
|
|
9680
9729
|
}) => {
|
|
9681
9730
|
const TitleWrapper = hideTitle ? ScreenReaderOnly : Title;
|
|
9682
9731
|
return /* @__PURE__ */ jsxs27(Header, { children: [
|
|
9683
|
-
/* @__PURE__ */
|
|
9684
|
-
hideCloseButton ? null : /* @__PURE__ */
|
|
9732
|
+
/* @__PURE__ */ jsx234(TitleWrapper, { children: title }),
|
|
9733
|
+
hideCloseButton ? null : /* @__PURE__ */ jsx234(ModalCloseButton, {})
|
|
9685
9734
|
] });
|
|
9686
9735
|
};
|
|
9687
9736
|
|
|
9688
9737
|
// src/components/Modal/ModalContent.tsx
|
|
9689
9738
|
import { forwardRef as forwardRef15 } from "react";
|
|
9690
|
-
import
|
|
9739
|
+
import styled43 from "styled-components";
|
|
9691
9740
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
9692
9741
|
|
|
9693
9742
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
9694
9743
|
import { useRef as useRef8, useEffect as useEffect4 } from "react";
|
|
9695
|
-
import { isNotNil as
|
|
9744
|
+
import { isNotNil as isNotNil16 } from "@wistia/type-guards";
|
|
9696
9745
|
var useFocusRestore = () => {
|
|
9697
9746
|
const previouslyFocusedRef = useRef8(null);
|
|
9698
9747
|
useEffect4(() => {
|
|
@@ -9700,7 +9749,7 @@ var useFocusRestore = () => {
|
|
|
9700
9749
|
}, []);
|
|
9701
9750
|
useEffect4(() => {
|
|
9702
9751
|
return () => {
|
|
9703
|
-
if (
|
|
9752
|
+
if (isNotNil16(previouslyFocusedRef.current)) {
|
|
9704
9753
|
setTimeout(() => {
|
|
9705
9754
|
previouslyFocusedRef.current?.focus();
|
|
9706
9755
|
}, 0);
|
|
@@ -9710,8 +9759,8 @@ var useFocusRestore = () => {
|
|
|
9710
9759
|
};
|
|
9711
9760
|
|
|
9712
9761
|
// src/components/Modal/ModalContent.tsx
|
|
9713
|
-
import { jsx as
|
|
9714
|
-
var StyledModalContent =
|
|
9762
|
+
import { jsx as jsx235 } from "react/jsx-runtime";
|
|
9763
|
+
var StyledModalContent = styled43(DialogContent)`
|
|
9715
9764
|
background-color: var(--wui-color-bg-app);
|
|
9716
9765
|
box-sizing: border-box;
|
|
9717
9766
|
display: flex;
|
|
@@ -9755,7 +9804,7 @@ var StyledModalContent = styled42(DialogContent)`
|
|
|
9755
9804
|
var ModalContent = forwardRef15(
|
|
9756
9805
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
9757
9806
|
useFocusRestore();
|
|
9758
|
-
return /* @__PURE__ */
|
|
9807
|
+
return /* @__PURE__ */ jsx235(
|
|
9759
9808
|
StyledModalContent,
|
|
9760
9809
|
{
|
|
9761
9810
|
ref,
|
|
@@ -9771,8 +9820,8 @@ var ModalContent = forwardRef15(
|
|
|
9771
9820
|
|
|
9772
9821
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
9773
9822
|
import { forwardRef as forwardRef16 } from "react";
|
|
9774
|
-
import
|
|
9775
|
-
import { jsx as
|
|
9823
|
+
import styled44 from "styled-components";
|
|
9824
|
+
import { jsx as jsx236 } from "react/jsx-runtime";
|
|
9776
9825
|
var backdropAnimationDuration = 150;
|
|
9777
9826
|
var alignVerticalMap = {
|
|
9778
9827
|
stretch: "normal",
|
|
@@ -9785,7 +9834,7 @@ var alignHorizontalMap = {
|
|
|
9785
9834
|
center: "center",
|
|
9786
9835
|
right: "end"
|
|
9787
9836
|
};
|
|
9788
|
-
var BackdropComponent =
|
|
9837
|
+
var BackdropComponent = styled44.div`
|
|
9789
9838
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
9790
9839
|
animation-name: backdropShow;
|
|
9791
9840
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -9809,7 +9858,7 @@ var BackdropComponent = styled43.div`
|
|
|
9809
9858
|
}
|
|
9810
9859
|
`;
|
|
9811
9860
|
var Backdrop = forwardRef16(
|
|
9812
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */
|
|
9861
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ jsx236(
|
|
9813
9862
|
BackdropComponent,
|
|
9814
9863
|
{
|
|
9815
9864
|
ref,
|
|
@@ -9823,9 +9872,9 @@ var Backdrop = forwardRef16(
|
|
|
9823
9872
|
Backdrop.displayName = "Backdrop";
|
|
9824
9873
|
|
|
9825
9874
|
// src/components/Modal/Modal.tsx
|
|
9826
|
-
import { jsx as
|
|
9875
|
+
import { jsx as jsx237, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
9827
9876
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
9828
|
-
var ModalBody =
|
|
9877
|
+
var ModalBody = styled45.div`
|
|
9829
9878
|
flex-direction: column;
|
|
9830
9879
|
display: flex;
|
|
9831
9880
|
order: 2;
|
|
@@ -9843,24 +9892,24 @@ var Modal = forwardRef17(
|
|
|
9843
9892
|
width = DEFAULT_MODAL_WIDTH,
|
|
9844
9893
|
...props
|
|
9845
9894
|
}, ref) => {
|
|
9846
|
-
return /* @__PURE__ */
|
|
9895
|
+
return /* @__PURE__ */ jsx237(
|
|
9847
9896
|
DialogRoot,
|
|
9848
9897
|
{
|
|
9849
9898
|
onOpenChange: (open2) => {
|
|
9850
|
-
if (!open2 &&
|
|
9899
|
+
if (!open2 && isNotNil17(onRequestClose)) {
|
|
9851
9900
|
onRequestClose();
|
|
9852
9901
|
}
|
|
9853
9902
|
},
|
|
9854
9903
|
open: isOpen,
|
|
9855
9904
|
children: /* @__PURE__ */ jsxs28(DialogPortal, { children: [
|
|
9856
|
-
/* @__PURE__ */
|
|
9905
|
+
/* @__PURE__ */ jsx237(Backdrop, {}),
|
|
9857
9906
|
/* @__PURE__ */ jsxs28(
|
|
9858
9907
|
ModalContent,
|
|
9859
9908
|
{
|
|
9860
9909
|
ref,
|
|
9861
9910
|
fullHeight,
|
|
9862
9911
|
onOpenAutoFocus: (event) => {
|
|
9863
|
-
if (
|
|
9912
|
+
if (isNotNil17(initialFocusRef) && initialFocusRef.current) {
|
|
9864
9913
|
event.preventDefault();
|
|
9865
9914
|
requestAnimationFrame(() => {
|
|
9866
9915
|
initialFocusRef.current?.focus();
|
|
@@ -9870,8 +9919,8 @@ var Modal = forwardRef17(
|
|
|
9870
9919
|
width,
|
|
9871
9920
|
...props,
|
|
9872
9921
|
children: [
|
|
9873
|
-
/* @__PURE__ */
|
|
9874
|
-
/* @__PURE__ */
|
|
9922
|
+
/* @__PURE__ */ jsx237(ModalBody, { children }),
|
|
9923
|
+
/* @__PURE__ */ jsx237(
|
|
9875
9924
|
ModalHeader,
|
|
9876
9925
|
{
|
|
9877
9926
|
hideCloseButton,
|
|
@@ -9890,24 +9939,26 @@ var Modal = forwardRef17(
|
|
|
9890
9939
|
Modal.displayName = "Modal";
|
|
9891
9940
|
|
|
9892
9941
|
// src/components/Popover/Popover.tsx
|
|
9893
|
-
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close
|
|
9894
|
-
import
|
|
9942
|
+
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close } from "@radix-ui/react-popover";
|
|
9943
|
+
import styled46, { css as css25 } from "styled-components";
|
|
9895
9944
|
|
|
9896
9945
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
9897
|
-
import { isNotNil as
|
|
9946
|
+
import { isNotNil as isNotNil18 } from "@wistia/type-guards";
|
|
9898
9947
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
9899
|
-
return
|
|
9948
|
+
return isNotNil18(onOpenChange) && isNotNil18(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
9900
9949
|
};
|
|
9901
9950
|
|
|
9902
9951
|
// src/components/Popover/Popover.tsx
|
|
9903
|
-
import { jsx as
|
|
9904
|
-
var StyledContent2 =
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9952
|
+
import { jsx as jsx238, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9953
|
+
var StyledContent2 = styled46(Content2)`
|
|
9954
|
+
${({ $unstyled }) => !$unstyled && css25`
|
|
9955
|
+
border-radius: var(--wui-border-radius-02);
|
|
9956
|
+
padding: var(--wui-space-04);
|
|
9957
|
+
max-width: 320px;
|
|
9958
|
+
background-color: var(--wui-color-bg-surface);
|
|
9959
|
+
box-shadow: var(--wui-elevation-01);
|
|
9960
|
+
border: 1px solid var(--wui-color-border);
|
|
9961
|
+
`}
|
|
9911
9962
|
|
|
9912
9963
|
[data-wui-popover-close] {
|
|
9913
9964
|
position: absolute;
|
|
@@ -9915,37 +9966,34 @@ var StyledContent2 = styled45(Content2)`
|
|
|
9915
9966
|
right: var(--wui-space-02);
|
|
9916
9967
|
}
|
|
9917
9968
|
`;
|
|
9918
|
-
var StyledArrow = styled45(Arrow)`
|
|
9919
|
-
fill: white;
|
|
9920
|
-
display: none;
|
|
9921
|
-
`;
|
|
9922
9969
|
var Popover = ({
|
|
9923
9970
|
children,
|
|
9924
9971
|
trigger,
|
|
9925
9972
|
isOpen = false,
|
|
9926
9973
|
hideCloseButton = false,
|
|
9927
9974
|
onOpenChange,
|
|
9975
|
+
unstyled = false,
|
|
9928
9976
|
...props
|
|
9929
9977
|
}) => {
|
|
9930
9978
|
return /* @__PURE__ */ jsxs29(Root2, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
9931
|
-
/* @__PURE__ */
|
|
9932
|
-
/* @__PURE__ */
|
|
9979
|
+
/* @__PURE__ */ jsx238(Trigger2, { asChild: true, children: trigger }),
|
|
9980
|
+
/* @__PURE__ */ jsx238(Portal, { children: /* @__PURE__ */ jsxs29(
|
|
9933
9981
|
StyledContent2,
|
|
9934
9982
|
{
|
|
9935
|
-
sideOffset:
|
|
9983
|
+
sideOffset: 8,
|
|
9936
9984
|
...props,
|
|
9985
|
+
$unstyled: unstyled,
|
|
9937
9986
|
children: [
|
|
9938
|
-
/* @__PURE__ */
|
|
9939
|
-
!hideCloseButton && /* @__PURE__ */ jsx237(Close, { asChild: true, children: /* @__PURE__ */ jsx237(
|
|
9987
|
+
!hideCloseButton && /* @__PURE__ */ jsx238(Close, { asChild: true, children: /* @__PURE__ */ jsx238(
|
|
9940
9988
|
IconButton,
|
|
9941
9989
|
{
|
|
9942
9990
|
"data-wui-popover-close": true,
|
|
9943
9991
|
label: "Close",
|
|
9944
9992
|
variant: "ghost",
|
|
9945
|
-
children: /* @__PURE__ */
|
|
9993
|
+
children: /* @__PURE__ */ jsx238(Icon, { type: "close" })
|
|
9946
9994
|
}
|
|
9947
9995
|
) }),
|
|
9948
|
-
/* @__PURE__ */
|
|
9996
|
+
/* @__PURE__ */ jsx238("div", { children })
|
|
9949
9997
|
]
|
|
9950
9998
|
}
|
|
9951
9999
|
) })
|
|
@@ -9955,15 +10003,15 @@ Popover.displayName = "Popover";
|
|
|
9955
10003
|
|
|
9956
10004
|
// src/components/Radio/Radio.tsx
|
|
9957
10005
|
import { forwardRef as forwardRef18, useId as useId3 } from "react";
|
|
9958
|
-
import
|
|
10006
|
+
import styled47, { css as css26 } from "styled-components";
|
|
9959
10007
|
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
9960
|
-
import { jsx as
|
|
9961
|
-
var StyledLabelWrapper2 =
|
|
10008
|
+
import { jsx as jsx239, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
10009
|
+
var StyledLabelWrapper2 = styled47.div`
|
|
9962
10010
|
display: flex;
|
|
9963
10011
|
flex-direction: column;
|
|
9964
10012
|
padding-left: var(--wui-space-02);
|
|
9965
10013
|
`;
|
|
9966
|
-
var StyledRadio =
|
|
10014
|
+
var StyledRadio = styled47.input`
|
|
9967
10015
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
9968
10016
|
appearance: none;
|
|
9969
10017
|
margin: 0;
|
|
@@ -9989,11 +10037,11 @@ var StyledRadio = styled46.input`
|
|
|
9989
10037
|
transform: scale(1);
|
|
9990
10038
|
}
|
|
9991
10039
|
`;
|
|
9992
|
-
var disabledStyle2 =
|
|
10040
|
+
var disabledStyle2 = css26`
|
|
9993
10041
|
cursor: not-allowed;
|
|
9994
10042
|
opacity: 0.5;
|
|
9995
10043
|
`;
|
|
9996
|
-
var errorStyle =
|
|
10044
|
+
var errorStyle = css26`
|
|
9997
10045
|
/* TODO Lamp to design error state */
|
|
9998
10046
|
&:hover,
|
|
9999
10047
|
&:focus,
|
|
@@ -10001,11 +10049,11 @@ var errorStyle = css25`
|
|
|
10001
10049
|
border-color: transparent !important;
|
|
10002
10050
|
}
|
|
10003
10051
|
`;
|
|
10004
|
-
var defaultHoverStyle =
|
|
10052
|
+
var defaultHoverStyle = css26`
|
|
10005
10053
|
/* TODO Lamp to design hover state */
|
|
10006
10054
|
cursor: pointer;
|
|
10007
10055
|
`;
|
|
10008
|
-
var StyledRadioWrapper =
|
|
10056
|
+
var StyledRadioWrapper = styled47.div`
|
|
10009
10057
|
align-items: baseline;
|
|
10010
10058
|
border: 1px solid transparent;
|
|
10011
10059
|
border-radius: 4px;
|
|
@@ -10049,7 +10097,7 @@ var Radio = forwardRef18(
|
|
|
10049
10097
|
"aria-invalid": otherProps["aria-invalid"],
|
|
10050
10098
|
disabled,
|
|
10051
10099
|
children: [
|
|
10052
|
-
/* @__PURE__ */
|
|
10100
|
+
/* @__PURE__ */ jsx239(
|
|
10053
10101
|
StyledRadio,
|
|
10054
10102
|
{
|
|
10055
10103
|
ref,
|
|
@@ -10065,7 +10113,7 @@ var Radio = forwardRef18(
|
|
|
10065
10113
|
}
|
|
10066
10114
|
),
|
|
10067
10115
|
/* @__PURE__ */ jsxs30(StyledLabelWrapper2, { children: [
|
|
10068
|
-
/* @__PURE__ */
|
|
10116
|
+
/* @__PURE__ */ jsx239(
|
|
10069
10117
|
Label,
|
|
10070
10118
|
{
|
|
10071
10119
|
disabled,
|
|
@@ -10074,7 +10122,7 @@ var Radio = forwardRef18(
|
|
|
10074
10122
|
children: label
|
|
10075
10123
|
}
|
|
10076
10124
|
),
|
|
10077
|
-
/* @__PURE__ */
|
|
10125
|
+
/* @__PURE__ */ jsx239(LabelDescription, { children: description })
|
|
10078
10126
|
] })
|
|
10079
10127
|
]
|
|
10080
10128
|
}
|
|
@@ -10085,13 +10133,13 @@ Radio.displayName = "Radio";
|
|
|
10085
10133
|
|
|
10086
10134
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10087
10135
|
import { forwardRef as forwardRef19 } from "react";
|
|
10088
|
-
import
|
|
10136
|
+
import styled49, { css as css27 } from "styled-components";
|
|
10089
10137
|
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
10090
10138
|
import { isNil as isNil13 } from "@wistia/type-guards";
|
|
10091
10139
|
|
|
10092
10140
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10093
10141
|
import { createContext as createContext6, useContext as useContext5, useMemo as useMemo8, useState as useState9 } from "react";
|
|
10094
|
-
import { jsx as
|
|
10142
|
+
import { jsx as jsx240 } from "react/jsx-runtime";
|
|
10095
10143
|
var SelectedItemMeasurementsContext = createContext6(
|
|
10096
10144
|
null
|
|
10097
10145
|
);
|
|
@@ -10106,7 +10154,7 @@ var SelectedItemMeasurementsProvider = ({
|
|
|
10106
10154
|
}),
|
|
10107
10155
|
[selectedItemMeasurements]
|
|
10108
10156
|
);
|
|
10109
|
-
return /* @__PURE__ */
|
|
10157
|
+
return /* @__PURE__ */ jsx240(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10110
10158
|
};
|
|
10111
10159
|
var useSelectedItemMeasurements = () => {
|
|
10112
10160
|
const context = useContext5(SelectedItemMeasurementsContext);
|
|
@@ -10120,7 +10168,7 @@ var useSelectedItemMeasurements = () => {
|
|
|
10120
10168
|
|
|
10121
10169
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10122
10170
|
import { useMemo as useMemo9 } from "react";
|
|
10123
|
-
import
|
|
10171
|
+
import styled48 from "styled-components";
|
|
10124
10172
|
|
|
10125
10173
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
10126
10174
|
import { createContext as createContext7, useContext as useContext6 } from "react";
|
|
@@ -10135,8 +10183,8 @@ var useSegmentedControlValue = () => {
|
|
|
10135
10183
|
};
|
|
10136
10184
|
|
|
10137
10185
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10138
|
-
import { jsx as
|
|
10139
|
-
var SelectedItemIndicatorDiv =
|
|
10186
|
+
import { jsx as jsx241 } from "react/jsx-runtime";
|
|
10187
|
+
var SelectedItemIndicatorDiv = styled48.div`
|
|
10140
10188
|
background-color: var(--wui-color-bg-fill-white);
|
|
10141
10189
|
border-radius: var(--wui-border-radius-rounded);
|
|
10142
10190
|
left: 0;
|
|
@@ -10162,7 +10210,7 @@ var SelectedItemIndicator = () => {
|
|
|
10162
10210
|
if (!selectedValue) {
|
|
10163
10211
|
return null;
|
|
10164
10212
|
}
|
|
10165
|
-
return /* @__PURE__ */
|
|
10213
|
+
return /* @__PURE__ */ jsx241(
|
|
10166
10214
|
SelectedItemIndicatorDiv,
|
|
10167
10215
|
{
|
|
10168
10216
|
style: {
|
|
@@ -10175,8 +10223,8 @@ var SelectedItemIndicator = () => {
|
|
|
10175
10223
|
};
|
|
10176
10224
|
|
|
10177
10225
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10178
|
-
import { jsx as
|
|
10179
|
-
var segmentedControlStyles =
|
|
10226
|
+
import { jsx as jsx242, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10227
|
+
var segmentedControlStyles = css27`
|
|
10180
10228
|
display: inline-flex;
|
|
10181
10229
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10182
10230
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10186,7 +10234,7 @@ var segmentedControlStyles = css26`
|
|
|
10186
10234
|
position: relative;
|
|
10187
10235
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
10188
10236
|
`;
|
|
10189
|
-
var StyledSegmentedControl =
|
|
10237
|
+
var StyledSegmentedControl = styled49(ToggleGroupRoot)`
|
|
10190
10238
|
${segmentedControlStyles}
|
|
10191
10239
|
`;
|
|
10192
10240
|
var SegmentedControl = forwardRef19(
|
|
@@ -10201,7 +10249,7 @@ var SegmentedControl = forwardRef19(
|
|
|
10201
10249
|
if (isNil13(children)) {
|
|
10202
10250
|
return null;
|
|
10203
10251
|
}
|
|
10204
|
-
return /* @__PURE__ */
|
|
10252
|
+
return /* @__PURE__ */ jsx242(
|
|
10205
10253
|
StyledSegmentedControl,
|
|
10206
10254
|
{
|
|
10207
10255
|
ref,
|
|
@@ -10213,8 +10261,8 @@ var SegmentedControl = forwardRef19(
|
|
|
10213
10261
|
type: "single",
|
|
10214
10262
|
value: selectedValue,
|
|
10215
10263
|
...props,
|
|
10216
|
-
children: /* @__PURE__ */
|
|
10217
|
-
/* @__PURE__ */
|
|
10264
|
+
children: /* @__PURE__ */ jsx242(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs31(SelectedItemMeasurementsProvider, { children: [
|
|
10265
|
+
/* @__PURE__ */ jsx242(SelectedItemIndicator, {}),
|
|
10218
10266
|
children
|
|
10219
10267
|
] }) })
|
|
10220
10268
|
}
|
|
@@ -10225,19 +10273,19 @@ SegmentedControl.displayName = "SegmentedControl";
|
|
|
10225
10273
|
|
|
10226
10274
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10227
10275
|
import { forwardRef as forwardRef20, useEffect as useEffect5, useRef as useRef9 } from "react";
|
|
10228
|
-
import
|
|
10276
|
+
import styled50, { css as css28 } from "styled-components";
|
|
10229
10277
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
10230
|
-
import { isNotNil as
|
|
10278
|
+
import { isNotNil as isNotNil20 } from "@wistia/type-guards";
|
|
10231
10279
|
|
|
10232
10280
|
// src/private/helpers/mergeRefs/mergeRefs.ts
|
|
10233
|
-
import { isNotNil as
|
|
10281
|
+
import { isNotNil as isNotNil19, isFunction as isFunction2 } from "@wistia/type-guards";
|
|
10234
10282
|
var mergeRefs = (refs) => (value) => {
|
|
10235
10283
|
refs.forEach((ref) => {
|
|
10236
10284
|
if (isFunction2(ref)) {
|
|
10237
10285
|
ref(value);
|
|
10238
10286
|
return;
|
|
10239
10287
|
}
|
|
10240
|
-
if (
|
|
10288
|
+
if (isNotNil19(ref)) {
|
|
10241
10289
|
ref.current = value;
|
|
10242
10290
|
}
|
|
10243
10291
|
});
|
|
@@ -10245,7 +10293,7 @@ var mergeRefs = (refs) => (value) => {
|
|
|
10245
10293
|
|
|
10246
10294
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10247
10295
|
import { jsxs as jsxs32 } from "react/jsx-runtime";
|
|
10248
|
-
var segmentedControlItemStyles =
|
|
10296
|
+
var segmentedControlItemStyles = css28`
|
|
10249
10297
|
all: unset; /* ToggleGroupItem is a button element */
|
|
10250
10298
|
align-items: center;
|
|
10251
10299
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10304,7 +10352,7 @@ var segmentedControlItemStyles = css27`
|
|
|
10304
10352
|
}
|
|
10305
10353
|
}
|
|
10306
10354
|
`;
|
|
10307
|
-
var StyledSegmentedControlItem =
|
|
10355
|
+
var StyledSegmentedControlItem = styled50(ToggleGroupItem)`
|
|
10308
10356
|
${segmentedControlItemStyles}
|
|
10309
10357
|
`;
|
|
10310
10358
|
var SegmentedControlItem = forwardRef20(
|
|
@@ -10349,8 +10397,8 @@ var SegmentedControlItem = forwardRef20(
|
|
|
10349
10397
|
StyledSegmentedControlItem,
|
|
10350
10398
|
{
|
|
10351
10399
|
ref: combinedRef,
|
|
10352
|
-
$hasLabel:
|
|
10353
|
-
"aria-label":
|
|
10400
|
+
$hasLabel: isNotNil20(label),
|
|
10401
|
+
"aria-label": isNotNil20(label) ? void 0 : ariaLabel,
|
|
10354
10402
|
disabled,
|
|
10355
10403
|
onClick: handleClick,
|
|
10356
10404
|
value,
|
|
@@ -10364,124 +10412,441 @@ var SegmentedControlItem = forwardRef20(
|
|
|
10364
10412
|
);
|
|
10365
10413
|
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
10366
10414
|
|
|
10367
|
-
// src/components/
|
|
10368
|
-
import {
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
`;
|
|
10380
|
-
var TabPanel = ({ children, value, ...props }) => {
|
|
10381
|
-
return /* @__PURE__ */ jsx242(
|
|
10382
|
-
StyledTabPanel,
|
|
10383
|
-
{
|
|
10384
|
-
value,
|
|
10385
|
-
...props,
|
|
10386
|
-
children
|
|
10387
|
-
}
|
|
10388
|
-
);
|
|
10389
|
-
};
|
|
10390
|
-
TabPanel.displayName = "TabPanel";
|
|
10391
|
-
|
|
10392
|
-
// src/components/Tabs/TabList.tsx
|
|
10415
|
+
// src/components/Select/Select.tsx
|
|
10416
|
+
import {
|
|
10417
|
+
Root as Root3,
|
|
10418
|
+
Trigger as Trigger3,
|
|
10419
|
+
Portal as Portal2,
|
|
10420
|
+
Content as Content3,
|
|
10421
|
+
ScrollUpButton,
|
|
10422
|
+
Viewport,
|
|
10423
|
+
Value,
|
|
10424
|
+
ScrollDownButton
|
|
10425
|
+
} from "@radix-ui/react-select";
|
|
10426
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
10393
10427
|
import styled51 from "styled-components";
|
|
10394
|
-
import {
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10428
|
+
import { jsx as jsx243, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
10429
|
+
var StyledTrigger = styled51(Trigger3)`
|
|
10430
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10431
|
+
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10432
|
+
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
10433
|
+
--wui-select-color-border: var(--wui-color-border);
|
|
10434
|
+
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
10435
|
+
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
10436
|
+
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
10437
|
+
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
10438
|
+
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
10439
|
+
--wui-select-vertical-padding: var(--wui-space-02);
|
|
10440
|
+
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
10441
|
+
--wui-select-placeholder: var(--wui-gray-10);
|
|
10442
|
+
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
10398
10443
|
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
$fullWidth: fullWidth,
|
|
10411
|
-
"aria-label": ariaLabel,
|
|
10412
|
-
...props,
|
|
10413
|
-
children
|
|
10414
|
-
}
|
|
10415
|
-
);
|
|
10416
|
-
};
|
|
10417
|
-
TabList.displayName = "TabList";
|
|
10444
|
+
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
10445
|
+
background-color: var(--wui-select-color-bg);
|
|
10446
|
+
border: 1px solid var(--wui-select-color-border);
|
|
10447
|
+
border-radius: var(--wui-select-border-radius);
|
|
10448
|
+
min-width: 200px;
|
|
10449
|
+
text-align: left;
|
|
10450
|
+
display: inline-flex;
|
|
10451
|
+
align-items: center;
|
|
10452
|
+
justify-content: space-between;
|
|
10453
|
+
max-width: 100%;
|
|
10454
|
+
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
10418
10455
|
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10456
|
+
> span {
|
|
10457
|
+
white-space: nowrap;
|
|
10458
|
+
text-overflow: ellipsis;
|
|
10459
|
+
overflow: hidden;
|
|
10460
|
+
}
|
|
10424
10461
|
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
var TabsValueProvider = TabsValueContext.Provider;
|
|
10429
|
-
var useTabsValue = () => {
|
|
10430
|
-
const context = useContext7(TabsValueContext);
|
|
10431
|
-
if (context === null) {
|
|
10432
|
-
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
10462
|
+
&[aria-expanded='true'],
|
|
10463
|
+
&:focus {
|
|
10464
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
10433
10465
|
}
|
|
10434
|
-
return context;
|
|
10435
|
-
};
|
|
10436
10466
|
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
var
|
|
10440
|
-
|
|
10467
|
+
&[aria-invalid='true'] {
|
|
10468
|
+
outline: 2px solid var(--wui-select-color-border-error);
|
|
10469
|
+
color: var(--wui-select-color-text-error);
|
|
10470
|
+
}
|
|
10441
10471
|
|
|
10442
|
-
&:
|
|
10443
|
-
|
|
10472
|
+
&:disabled {
|
|
10473
|
+
border-color: var(--wui-color-bg-surface-disabled);
|
|
10474
|
+
background-color: var(--wui-color-bg-surface-disabled);
|
|
10444
10475
|
}
|
|
10445
10476
|
`;
|
|
10446
|
-
var
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
resizeObserver.disconnect();
|
|
10475
|
-
};
|
|
10476
|
-
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10477
|
+
var StyledContent3 = styled51(Content3)`
|
|
10478
|
+
--wui-select-content-border: var(--wui-color-border);
|
|
10479
|
+
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
10480
|
+
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
10481
|
+
--wui-select-option-padding: var(--wui-space-02);
|
|
10482
|
+
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
10483
|
+
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
10484
|
+
|
|
10485
|
+
overflow: hidden;
|
|
10486
|
+
transform: translateY(8px);
|
|
10487
|
+
background-color: var(--wui-select-content-bg);
|
|
10488
|
+
border: 1px solid var(--wui-select-content-border);
|
|
10489
|
+
border-radius: var(--wui-select-content-border-radius);
|
|
10490
|
+
padding: var(--wui-select-option-padding);
|
|
10491
|
+
min-width: var(--radix-select-trigger-width);
|
|
10492
|
+
max-height: var(--radix-select-content-available-height);
|
|
10493
|
+
z-index: var(--wui-zindex-select);
|
|
10494
|
+
`;
|
|
10495
|
+
var Select = forwardRef21(
|
|
10496
|
+
({
|
|
10497
|
+
colorScheme = "inherit",
|
|
10498
|
+
children,
|
|
10499
|
+
onChange = () => null,
|
|
10500
|
+
placeholder = "Select...",
|
|
10501
|
+
fullWidth = false,
|
|
10502
|
+
...props
|
|
10503
|
+
}, forwardedRef) => {
|
|
10504
|
+
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
10477
10505
|
return /* @__PURE__ */ jsxs33(
|
|
10478
|
-
|
|
10506
|
+
Root3,
|
|
10479
10507
|
{
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10508
|
+
...props,
|
|
10509
|
+
onValueChange: onChange,
|
|
10510
|
+
children: [
|
|
10511
|
+
/* @__PURE__ */ jsxs33(
|
|
10512
|
+
StyledTrigger,
|
|
10513
|
+
{
|
|
10514
|
+
ref: forwardedRef,
|
|
10515
|
+
$colorScheme: colorScheme,
|
|
10516
|
+
$fullWidth: responsiveFullWidth,
|
|
10517
|
+
...props,
|
|
10518
|
+
children: [
|
|
10519
|
+
/* @__PURE__ */ jsx243(Value, { placeholder }),
|
|
10520
|
+
/* @__PURE__ */ jsx243(
|
|
10521
|
+
Icon,
|
|
10522
|
+
{
|
|
10523
|
+
size: "md",
|
|
10524
|
+
type: "caret-down"
|
|
10525
|
+
}
|
|
10526
|
+
)
|
|
10527
|
+
]
|
|
10528
|
+
}
|
|
10529
|
+
),
|
|
10530
|
+
/* @__PURE__ */ jsx243(Portal2, { children: /* @__PURE__ */ jsxs33(StyledContent3, { position: "popper", children: [
|
|
10531
|
+
/* @__PURE__ */ jsx243(ScrollUpButton, { children: /* @__PURE__ */ jsx243(Icon, { type: "caret-up" }) }),
|
|
10532
|
+
/* @__PURE__ */ jsx243(Viewport, { children }),
|
|
10533
|
+
/* @__PURE__ */ jsx243(ScrollDownButton, { children: /* @__PURE__ */ jsx243(Icon, { type: "caret-down" }) })
|
|
10534
|
+
] }) })
|
|
10535
|
+
]
|
|
10536
|
+
}
|
|
10537
|
+
);
|
|
10538
|
+
}
|
|
10539
|
+
);
|
|
10540
|
+
Select.displayName = "Select";
|
|
10541
|
+
|
|
10542
|
+
// src/components/Select/SelectOption.tsx
|
|
10543
|
+
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
10544
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
10545
|
+
import styled52 from "styled-components";
|
|
10546
|
+
import { jsx as jsx244, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10547
|
+
var StyledItem = styled52(Item)`
|
|
10548
|
+
${variantStyleMap2.body3};
|
|
10549
|
+
display: flex;
|
|
10550
|
+
padding: var(--wui-select-option-padding);
|
|
10551
|
+
gap: var(--wui-select-option-inner-gap);
|
|
10552
|
+
font-size: var(--font-size);
|
|
10553
|
+
font-weight: var(--font-weight);
|
|
10554
|
+
border-radius: var(--wui-border-radius-01);
|
|
10555
|
+
|
|
10556
|
+
&:hover,
|
|
10557
|
+
&:focus-visible {
|
|
10558
|
+
background-color: var(--wui-select-option-bg-hover);
|
|
10559
|
+
outline: none;
|
|
10560
|
+
}
|
|
10561
|
+
|
|
10562
|
+
&[aria-disabled='true'] {
|
|
10563
|
+
color: var(--wui-color-text-disabled);
|
|
10564
|
+
}
|
|
10565
|
+
|
|
10566
|
+
&[aria-disabled='true']:hover {
|
|
10567
|
+
background-color: transparent;
|
|
10568
|
+
}
|
|
10569
|
+
`;
|
|
10570
|
+
var StyledIconContainer = styled52.span`
|
|
10571
|
+
width: 12px;
|
|
10572
|
+
`;
|
|
10573
|
+
var SelectOption = forwardRef22(
|
|
10574
|
+
({ children, ...props }, forwardedRef) => {
|
|
10575
|
+
return /* @__PURE__ */ jsxs34(
|
|
10576
|
+
StyledItem,
|
|
10577
|
+
{
|
|
10578
|
+
...props,
|
|
10579
|
+
ref: forwardedRef,
|
|
10580
|
+
children: [
|
|
10581
|
+
/* @__PURE__ */ jsx244(StyledIconContainer, { children: /* @__PURE__ */ jsx244(ItemIndicator, { children: /* @__PURE__ */ jsx244(
|
|
10582
|
+
Icon,
|
|
10583
|
+
{
|
|
10584
|
+
size: "sm",
|
|
10585
|
+
type: "checkmark"
|
|
10586
|
+
}
|
|
10587
|
+
) }) }),
|
|
10588
|
+
/* @__PURE__ */ jsx244(ItemText, { children })
|
|
10589
|
+
]
|
|
10590
|
+
}
|
|
10591
|
+
);
|
|
10592
|
+
}
|
|
10593
|
+
);
|
|
10594
|
+
SelectOption.displayName = "Option";
|
|
10595
|
+
|
|
10596
|
+
// src/components/Select/SelectOptionGroup.tsx
|
|
10597
|
+
import { Group, Label as Label2 } from "@radix-ui/react-select";
|
|
10598
|
+
import styled53 from "styled-components";
|
|
10599
|
+
import { jsx as jsx245, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
10600
|
+
var StyledLabel4 = styled53(Label2)`
|
|
10601
|
+
padding: var(--wui-select-option-padding);
|
|
10602
|
+
`;
|
|
10603
|
+
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
10604
|
+
return /* @__PURE__ */ jsxs35(Group, { ...props, children: [
|
|
10605
|
+
/* @__PURE__ */ jsx245(StyledLabel4, { children: /* @__PURE__ */ jsx245(
|
|
10606
|
+
Text,
|
|
10607
|
+
{
|
|
10608
|
+
prominence: "secondary",
|
|
10609
|
+
variant: "body3",
|
|
10610
|
+
children: label
|
|
10611
|
+
}
|
|
10612
|
+
) }),
|
|
10613
|
+
children
|
|
10614
|
+
] });
|
|
10615
|
+
};
|
|
10616
|
+
|
|
10617
|
+
// src/components/Table/Table.tsx
|
|
10618
|
+
import { useMemo as useMemo10 } from "react";
|
|
10619
|
+
import styled54, { css as css29 } from "styled-components";
|
|
10620
|
+
|
|
10621
|
+
// src/components/Table/TableContext.tsx
|
|
10622
|
+
import React from "react";
|
|
10623
|
+
var TableContext = React.createContext({ divided: false });
|
|
10624
|
+
|
|
10625
|
+
// src/components/Table/Table.tsx
|
|
10626
|
+
import { jsx as jsx246 } from "react/jsx-runtime";
|
|
10627
|
+
var StyledTable = styled54.table`
|
|
10628
|
+
width: 100%;
|
|
10629
|
+
border-collapse: collapse;
|
|
10630
|
+
|
|
10631
|
+
${({ $striped }) => $striped && css29`
|
|
10632
|
+
tbody tr:nth-child(even) {
|
|
10633
|
+
background-color: var(--wui-color-bg-surface-secondary);
|
|
10634
|
+
}
|
|
10635
|
+
`}
|
|
10636
|
+
`;
|
|
10637
|
+
var Table = ({
|
|
10638
|
+
children,
|
|
10639
|
+
striped = false,
|
|
10640
|
+
divided = false,
|
|
10641
|
+
...props
|
|
10642
|
+
}) => {
|
|
10643
|
+
const contextValue = useMemo10(() => ({ divided }), [divided]);
|
|
10644
|
+
return /* @__PURE__ */ jsx246(TableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx246(
|
|
10645
|
+
StyledTable,
|
|
10646
|
+
{
|
|
10647
|
+
$striped: striped,
|
|
10648
|
+
...props,
|
|
10649
|
+
children
|
|
10650
|
+
}
|
|
10651
|
+
) });
|
|
10652
|
+
};
|
|
10653
|
+
|
|
10654
|
+
// src/components/Table/TableBody.tsx
|
|
10655
|
+
import styled55 from "styled-components";
|
|
10656
|
+
|
|
10657
|
+
// src/components/Table/TableSectionContext.ts
|
|
10658
|
+
import { createContext as createContext8 } from "react";
|
|
10659
|
+
var TableSectionContext = createContext8(null);
|
|
10660
|
+
|
|
10661
|
+
// src/components/Table/TableBody.tsx
|
|
10662
|
+
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
10663
|
+
var StyledTbody = styled55.tbody``;
|
|
10664
|
+
var TableBody = ({ children, ...props }) => {
|
|
10665
|
+
return /* @__PURE__ */ jsx247(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx247(StyledTbody, { ...props, children }) });
|
|
10666
|
+
};
|
|
10667
|
+
|
|
10668
|
+
// src/components/Table/TableCell.tsx
|
|
10669
|
+
import { useContext as useContext7 } from "react";
|
|
10670
|
+
import styled56, { css as css30 } from "styled-components";
|
|
10671
|
+
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
10672
|
+
var sharedStyles = css30`
|
|
10673
|
+
color: var(--wui-color-text);
|
|
10674
|
+
padding: var(--wui-space-02);
|
|
10675
|
+
text-align: left;
|
|
10676
|
+
`;
|
|
10677
|
+
var StyledTh = styled56.th`
|
|
10678
|
+
${sharedStyles}
|
|
10679
|
+
font-size: var(--wui-typography-body-4-size);
|
|
10680
|
+
font-weight: var(--wui-typography-weight-label-bold);
|
|
10681
|
+
line-height: var(--wui-typography-body-4-line-height);
|
|
10682
|
+
`;
|
|
10683
|
+
var StyledTd = styled56.td`
|
|
10684
|
+
${sharedStyles}
|
|
10685
|
+
font-size: var(--wui-typography-body-2-size);
|
|
10686
|
+
font-weight: var(--wui-typography-body-2-weight);
|
|
10687
|
+
line-height: var(--wui-typography-body-2-line-height);
|
|
10688
|
+
`;
|
|
10689
|
+
var TableCell = ({ children, ...props }) => {
|
|
10690
|
+
const section = useContext7(TableSectionContext);
|
|
10691
|
+
if (section === "head") {
|
|
10692
|
+
return /* @__PURE__ */ jsx248(StyledTh, { ...props, children });
|
|
10693
|
+
}
|
|
10694
|
+
return /* @__PURE__ */ jsx248(StyledTd, { ...props, children });
|
|
10695
|
+
};
|
|
10696
|
+
|
|
10697
|
+
// src/components/Table/TableFooter.tsx
|
|
10698
|
+
import styled57 from "styled-components";
|
|
10699
|
+
import { jsx as jsx249 } from "react/jsx-runtime";
|
|
10700
|
+
var StyledTfoot = styled57.tfoot``;
|
|
10701
|
+
var TableFooter = ({ children, ...props }) => {
|
|
10702
|
+
return /* @__PURE__ */ jsx249(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx249(StyledTfoot, { ...props, children }) });
|
|
10703
|
+
};
|
|
10704
|
+
|
|
10705
|
+
// src/components/Table/TableHead.tsx
|
|
10706
|
+
import styled58 from "styled-components";
|
|
10707
|
+
import { jsx as jsx250 } from "react/jsx-runtime";
|
|
10708
|
+
var StyledThead = styled58.thead``;
|
|
10709
|
+
var TableHead = ({ children, ...props }) => {
|
|
10710
|
+
return /* @__PURE__ */ jsx250(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx250(StyledThead, { ...props, children }) });
|
|
10711
|
+
};
|
|
10712
|
+
|
|
10713
|
+
// src/components/Table/TableRow.tsx
|
|
10714
|
+
import { useContext as useContext8 } from "react";
|
|
10715
|
+
import styled59 from "styled-components";
|
|
10716
|
+
import { jsx as jsx251 } from "react/jsx-runtime";
|
|
10717
|
+
var StyledTr = styled59.tr`
|
|
10718
|
+
${({ $divided }) => $divided && `border-bottom: 1px solid var(--wui-color-border);`}
|
|
10719
|
+
`;
|
|
10720
|
+
var TableRow = ({ children, ...props }) => {
|
|
10721
|
+
const { divided = false } = useContext8(TableContext);
|
|
10722
|
+
return /* @__PURE__ */ jsx251(
|
|
10723
|
+
StyledTr,
|
|
10724
|
+
{
|
|
10725
|
+
$divided: divided,
|
|
10726
|
+
...props,
|
|
10727
|
+
children
|
|
10728
|
+
}
|
|
10729
|
+
);
|
|
10730
|
+
};
|
|
10731
|
+
|
|
10732
|
+
// src/components/Tabs/Tabs.tsx
|
|
10733
|
+
import { forwardRef as forwardRef24, useState as useState10 } from "react";
|
|
10734
|
+
import { Root as TabsRoot } from "@radix-ui/react-tabs";
|
|
10735
|
+
import { isNotNil as isNotNil22, isNil as isNil14 } from "@wistia/type-guards";
|
|
10736
|
+
|
|
10737
|
+
// src/components/Tabs/TabPanel.tsx
|
|
10738
|
+
import styled60 from "styled-components";
|
|
10739
|
+
import { Content as TabsContent } from "@radix-ui/react-tabs";
|
|
10740
|
+
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
10741
|
+
var StyledTabPanel = styled60(TabsContent)`
|
|
10742
|
+
display: flex;
|
|
10743
|
+
flex-direction: column;
|
|
10744
|
+
`;
|
|
10745
|
+
var TabPanel = ({ children, value, ...props }) => {
|
|
10746
|
+
return /* @__PURE__ */ jsx252(
|
|
10747
|
+
StyledTabPanel,
|
|
10748
|
+
{
|
|
10749
|
+
value,
|
|
10750
|
+
...props,
|
|
10751
|
+
children
|
|
10752
|
+
}
|
|
10753
|
+
);
|
|
10754
|
+
};
|
|
10755
|
+
TabPanel.displayName = "TabPanel";
|
|
10756
|
+
|
|
10757
|
+
// src/components/Tabs/TabList.tsx
|
|
10758
|
+
import styled61 from "styled-components";
|
|
10759
|
+
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
10760
|
+
import { jsx as jsx253 } from "react/jsx-runtime";
|
|
10761
|
+
var StyledTabList = styled61(RadixTabList)`
|
|
10762
|
+
${segmentedControlStyles}
|
|
10763
|
+
|
|
10764
|
+
margin-bottom: var(--wui-space-04);
|
|
10765
|
+
`;
|
|
10766
|
+
var TabList = ({
|
|
10767
|
+
children,
|
|
10768
|
+
fullWidth,
|
|
10769
|
+
ariaLabel,
|
|
10770
|
+
...props
|
|
10771
|
+
}) => {
|
|
10772
|
+
return /* @__PURE__ */ jsx253(
|
|
10773
|
+
StyledTabList,
|
|
10774
|
+
{
|
|
10775
|
+
$fullWidth: fullWidth,
|
|
10776
|
+
"aria-label": ariaLabel,
|
|
10777
|
+
...props,
|
|
10778
|
+
children
|
|
10779
|
+
}
|
|
10780
|
+
);
|
|
10781
|
+
};
|
|
10782
|
+
TabList.displayName = "TabList";
|
|
10783
|
+
|
|
10784
|
+
// src/components/Tabs/TabItem.tsx
|
|
10785
|
+
import { forwardRef as forwardRef23, useEffect as useEffect6, useRef as useRef10 } from "react";
|
|
10786
|
+
import styled62 from "styled-components";
|
|
10787
|
+
import { Trigger as RadixTab } from "@radix-ui/react-tabs";
|
|
10788
|
+
import { isNotNil as isNotNil21 } from "@wistia/type-guards";
|
|
10789
|
+
|
|
10790
|
+
// src/components/Tabs/useTabsValue.tsx
|
|
10791
|
+
import { createContext as createContext9, useContext as useContext9 } from "react";
|
|
10792
|
+
var TabsValueContext = createContext9(null);
|
|
10793
|
+
var TabsValueProvider = TabsValueContext.Provider;
|
|
10794
|
+
var useTabsValue = () => {
|
|
10795
|
+
const context = useContext9(TabsValueContext);
|
|
10796
|
+
if (context === null) {
|
|
10797
|
+
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
10798
|
+
}
|
|
10799
|
+
return context;
|
|
10800
|
+
};
|
|
10801
|
+
|
|
10802
|
+
// src/components/Tabs/TabItem.tsx
|
|
10803
|
+
import { jsxs as jsxs36 } from "react/jsx-runtime";
|
|
10804
|
+
var StyledTabItem = styled62(RadixTab)`
|
|
10805
|
+
${segmentedControlItemStyles}
|
|
10806
|
+
|
|
10807
|
+
&:focus-visible {
|
|
10808
|
+
outline: none;
|
|
10809
|
+
}
|
|
10810
|
+
`;
|
|
10811
|
+
var TabItem = forwardRef23(
|
|
10812
|
+
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
10813
|
+
const selectedValue = useTabsValue();
|
|
10814
|
+
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10815
|
+
const buttonRef = useRef10(null);
|
|
10816
|
+
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
10817
|
+
useEffect6(() => {
|
|
10818
|
+
const buttonElem = buttonRef.current;
|
|
10819
|
+
if (!buttonElem) {
|
|
10820
|
+
return void 0;
|
|
10821
|
+
}
|
|
10822
|
+
if (selectedValue !== value) {
|
|
10823
|
+
return void 0;
|
|
10824
|
+
}
|
|
10825
|
+
setSelectedItemMeasurements({
|
|
10826
|
+
offsetLeft: buttonElem.offsetLeft,
|
|
10827
|
+
offsetWidth: buttonElem.offsetWidth,
|
|
10828
|
+
offsetHeight: buttonElem.offsetHeight
|
|
10829
|
+
});
|
|
10830
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
10831
|
+
setSelectedItemMeasurements({
|
|
10832
|
+
offsetLeft: buttonElem.offsetLeft,
|
|
10833
|
+
offsetWidth: buttonElem.offsetWidth,
|
|
10834
|
+
offsetHeight: buttonElem.offsetHeight
|
|
10835
|
+
});
|
|
10836
|
+
});
|
|
10837
|
+
resizeObserver.observe(buttonElem);
|
|
10838
|
+
return () => {
|
|
10839
|
+
resizeObserver.disconnect();
|
|
10840
|
+
};
|
|
10841
|
+
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10842
|
+
return /* @__PURE__ */ jsxs36(
|
|
10843
|
+
StyledTabItem,
|
|
10844
|
+
{
|
|
10845
|
+
ref: combinedRef,
|
|
10846
|
+
$hasLabel: isNotNil21(label),
|
|
10847
|
+
"aria-label": isNotNil21(label) ? void 0 : ariaLabel,
|
|
10848
|
+
disabled,
|
|
10849
|
+
value,
|
|
10485
10850
|
children: [
|
|
10486
10851
|
icon,
|
|
10487
10852
|
label
|
|
@@ -10515,10 +10880,10 @@ var extractTabItems = (children) => {
|
|
|
10515
10880
|
};
|
|
10516
10881
|
|
|
10517
10882
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
10518
|
-
import { useMemo as
|
|
10519
|
-
import
|
|
10520
|
-
import { jsx as
|
|
10521
|
-
var TabsSelectedItemIndicatorDiv =
|
|
10883
|
+
import { useMemo as useMemo11 } from "react";
|
|
10884
|
+
import styled63 from "styled-components";
|
|
10885
|
+
import { jsx as jsx254 } from "react/jsx-runtime";
|
|
10886
|
+
var TabsSelectedItemIndicatorDiv = styled63(SelectedItemIndicatorDiv)`
|
|
10522
10887
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
10523
10888
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
10524
10889
|
}
|
|
@@ -10526,7 +10891,7 @@ var TabsSelectedItemIndicatorDiv = styled53(SelectedItemIndicatorDiv)`
|
|
|
10526
10891
|
var SelectedItemIndicator2 = () => {
|
|
10527
10892
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10528
10893
|
const selectedValue = useTabsValue();
|
|
10529
|
-
const selectedItemIndicatorStyle =
|
|
10894
|
+
const selectedItemIndicatorStyle = useMemo11(
|
|
10530
10895
|
() => selectedItemMeasurements != null ? {
|
|
10531
10896
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
10532
10897
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -10537,7 +10902,7 @@ var SelectedItemIndicator2 = () => {
|
|
|
10537
10902
|
if (selectedValue == null) {
|
|
10538
10903
|
return null;
|
|
10539
10904
|
}
|
|
10540
|
-
return /* @__PURE__ */
|
|
10905
|
+
return /* @__PURE__ */ jsx254(
|
|
10541
10906
|
TabsSelectedItemIndicatorDiv,
|
|
10542
10907
|
{
|
|
10543
10908
|
style: {
|
|
@@ -10550,8 +10915,8 @@ var SelectedItemIndicator2 = () => {
|
|
|
10550
10915
|
};
|
|
10551
10916
|
|
|
10552
10917
|
// src/components/Tabs/Tabs.tsx
|
|
10553
|
-
import { jsx as
|
|
10554
|
-
var Tabs =
|
|
10918
|
+
import { jsx as jsx255, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10919
|
+
var Tabs = forwardRef24(
|
|
10555
10920
|
({
|
|
10556
10921
|
children,
|
|
10557
10922
|
fullWidth = true,
|
|
@@ -10567,25 +10932,25 @@ var Tabs = forwardRef22(
|
|
|
10567
10932
|
defaultValue: defaultSelectedValue,
|
|
10568
10933
|
onValueChange: setInternalSelectedValue
|
|
10569
10934
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
10570
|
-
return /* @__PURE__ */
|
|
10935
|
+
return /* @__PURE__ */ jsx255(
|
|
10571
10936
|
TabsRoot,
|
|
10572
10937
|
{
|
|
10573
10938
|
ref,
|
|
10574
10939
|
activationMode: "automatic",
|
|
10575
10940
|
...otherProps,
|
|
10576
10941
|
...modeProps,
|
|
10577
|
-
children: /* @__PURE__ */
|
|
10942
|
+
children: /* @__PURE__ */ jsx255(
|
|
10578
10943
|
TabsValueProvider,
|
|
10579
10944
|
{
|
|
10580
10945
|
value: defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue,
|
|
10581
|
-
children: /* @__PURE__ */
|
|
10582
|
-
/* @__PURE__ */
|
|
10946
|
+
children: /* @__PURE__ */ jsxs37(SelectedItemMeasurementsProvider, { children: [
|
|
10947
|
+
/* @__PURE__ */ jsxs37(
|
|
10583
10948
|
TabList,
|
|
10584
10949
|
{
|
|
10585
10950
|
ariaLabel,
|
|
10586
10951
|
fullWidth,
|
|
10587
10952
|
children: [
|
|
10588
|
-
/* @__PURE__ */
|
|
10953
|
+
/* @__PURE__ */ jsx255(SelectedItemIndicator2, {}),
|
|
10589
10954
|
tabItems.map((tab) => {
|
|
10590
10955
|
const {
|
|
10591
10956
|
value,
|
|
@@ -10595,7 +10960,7 @@ var Tabs = forwardRef22(
|
|
|
10595
10960
|
"aria-label": ariaLabelForTab
|
|
10596
10961
|
} = tab.props;
|
|
10597
10962
|
if (isNil14(icon)) {
|
|
10598
|
-
return /* @__PURE__ */
|
|
10963
|
+
return /* @__PURE__ */ jsx255(
|
|
10599
10964
|
TabItem,
|
|
10600
10965
|
{
|
|
10601
10966
|
disabled,
|
|
@@ -10605,8 +10970,8 @@ var Tabs = forwardRef22(
|
|
|
10605
10970
|
value
|
|
10606
10971
|
);
|
|
10607
10972
|
}
|
|
10608
|
-
if (
|
|
10609
|
-
return /* @__PURE__ */
|
|
10973
|
+
if (isNotNil22(label)) {
|
|
10974
|
+
return /* @__PURE__ */ jsx255(
|
|
10610
10975
|
TabItem,
|
|
10611
10976
|
{
|
|
10612
10977
|
disabled,
|
|
@@ -10617,8 +10982,8 @@ var Tabs = forwardRef22(
|
|
|
10617
10982
|
value
|
|
10618
10983
|
);
|
|
10619
10984
|
}
|
|
10620
|
-
if (
|
|
10621
|
-
return /* @__PURE__ */
|
|
10985
|
+
if (isNotNil22(ariaLabelForTab)) {
|
|
10986
|
+
return /* @__PURE__ */ jsx255(
|
|
10622
10987
|
TabItem,
|
|
10623
10988
|
{
|
|
10624
10989
|
"aria-label": ariaLabelForTab,
|
|
@@ -10634,7 +10999,7 @@ var Tabs = forwardRef22(
|
|
|
10634
10999
|
]
|
|
10635
11000
|
}
|
|
10636
11001
|
),
|
|
10637
|
-
tabItems.map((tab) => /* @__PURE__ */
|
|
11002
|
+
tabItems.map((tab) => /* @__PURE__ */ jsx255(
|
|
10638
11003
|
TabPanel,
|
|
10639
11004
|
{
|
|
10640
11005
|
value: tab.props.value,
|
|
@@ -10652,19 +11017,19 @@ var Tabs = forwardRef22(
|
|
|
10652
11017
|
Tabs.displayName = "Tabs";
|
|
10653
11018
|
|
|
10654
11019
|
// src/components/Tabs/Tab.tsx
|
|
10655
|
-
import { forwardRef as
|
|
10656
|
-
import { jsx as
|
|
10657
|
-
var Tab =
|
|
10658
|
-
return /* @__PURE__ */
|
|
11020
|
+
import { forwardRef as forwardRef25 } from "react";
|
|
11021
|
+
import { jsx as jsx256 } from "react/jsx-runtime";
|
|
11022
|
+
var Tab = forwardRef25(({ children }, ref) => {
|
|
11023
|
+
return /* @__PURE__ */ jsx256("div", { ref, children });
|
|
10659
11024
|
});
|
|
10660
11025
|
Tab.displayName = "Tab";
|
|
10661
11026
|
|
|
10662
11027
|
// src/components/Tag/Tag.tsx
|
|
10663
|
-
import { forwardRef as
|
|
10664
|
-
import
|
|
10665
|
-
import { isNil as isNil15, isNotNil as
|
|
10666
|
-
import { Fragment as Fragment8, jsx as
|
|
10667
|
-
var TagLabel =
|
|
11028
|
+
import { forwardRef as forwardRef26 } from "react";
|
|
11029
|
+
import styled64 from "styled-components";
|
|
11030
|
+
import { isNil as isNil15, isNotNil as isNotNil23, isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
11031
|
+
import { Fragment as Fragment8, jsx as jsx257, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11032
|
+
var TagLabel = styled64.a`
|
|
10668
11033
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10669
11034
|
font-size: var(--wui-typography-label-4-size);
|
|
10670
11035
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -10692,14 +11057,14 @@ var TagLabel = styled54.a`
|
|
|
10692
11057
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
10693
11058
|
}
|
|
10694
11059
|
`;
|
|
10695
|
-
var TagDivider =
|
|
11060
|
+
var TagDivider = styled64.div`
|
|
10696
11061
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10697
11062
|
border-left: 1px solid var(--wui-color-border);
|
|
10698
11063
|
display: flex;
|
|
10699
11064
|
height: 14px;
|
|
10700
11065
|
width: 1px;
|
|
10701
11066
|
`;
|
|
10702
|
-
var StyledRemoveButton =
|
|
11067
|
+
var StyledRemoveButton = styled64.button`
|
|
10703
11068
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10704
11069
|
all: unset;
|
|
10705
11070
|
cursor: pointer;
|
|
@@ -10727,7 +11092,7 @@ var StyledRemoveButton = styled54.button`
|
|
|
10727
11092
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
10728
11093
|
}
|
|
10729
11094
|
`;
|
|
10730
|
-
var StyledTag =
|
|
11095
|
+
var StyledTag = styled64.div`
|
|
10731
11096
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10732
11097
|
align-items: center;
|
|
10733
11098
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10748,39 +11113,39 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
10748
11113
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
10749
11114
|
);
|
|
10750
11115
|
}
|
|
10751
|
-
return /* @__PURE__ */
|
|
10752
|
-
/* @__PURE__ */
|
|
10753
|
-
/* @__PURE__ */
|
|
11116
|
+
return /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
11117
|
+
/* @__PURE__ */ jsx257(TagDivider, { $colorScheme: colorScheme }),
|
|
11118
|
+
/* @__PURE__ */ jsxs38(
|
|
10754
11119
|
StyledRemoveButton,
|
|
10755
11120
|
{
|
|
10756
11121
|
$colorScheme: colorScheme,
|
|
10757
11122
|
onClick: onClickRemove,
|
|
10758
11123
|
type: "button",
|
|
10759
11124
|
children: [
|
|
10760
|
-
/* @__PURE__ */
|
|
11125
|
+
/* @__PURE__ */ jsx257(
|
|
10761
11126
|
Icon,
|
|
10762
11127
|
{
|
|
10763
11128
|
size: "sm",
|
|
10764
11129
|
type: "close"
|
|
10765
11130
|
}
|
|
10766
11131
|
),
|
|
10767
|
-
/* @__PURE__ */
|
|
11132
|
+
/* @__PURE__ */ jsx257(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
10768
11133
|
]
|
|
10769
11134
|
}
|
|
10770
11135
|
)
|
|
10771
11136
|
] });
|
|
10772
11137
|
};
|
|
10773
|
-
var Tag =
|
|
11138
|
+
var Tag = forwardRef26(
|
|
10774
11139
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
10775
|
-
const labelProps =
|
|
10776
|
-
return /* @__PURE__ */
|
|
11140
|
+
const labelProps = isNotNil23(href) && isNonEmptyString4(href) ? { href, as: "a" } : { as: "span" };
|
|
11141
|
+
return /* @__PURE__ */ jsxs38(
|
|
10777
11142
|
StyledTag,
|
|
10778
11143
|
{
|
|
10779
11144
|
ref,
|
|
10780
11145
|
$colorScheme: colorScheme,
|
|
10781
11146
|
...otherProps,
|
|
10782
11147
|
children: [
|
|
10783
|
-
/* @__PURE__ */
|
|
11148
|
+
/* @__PURE__ */ jsx257(
|
|
10784
11149
|
TagLabel,
|
|
10785
11150
|
{
|
|
10786
11151
|
...labelProps,
|
|
@@ -10788,7 +11153,7 @@ var Tag = forwardRef24(
|
|
|
10788
11153
|
children: label
|
|
10789
11154
|
}
|
|
10790
11155
|
),
|
|
10791
|
-
/* @__PURE__ */
|
|
11156
|
+
/* @__PURE__ */ jsx257(
|
|
10792
11157
|
RemoveButton,
|
|
10793
11158
|
{
|
|
10794
11159
|
colorScheme,
|
|
@@ -10804,26 +11169,26 @@ var Tag = forwardRef24(
|
|
|
10804
11169
|
Tag.displayName = "Tag";
|
|
10805
11170
|
|
|
10806
11171
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
10807
|
-
import
|
|
10808
|
-
import { isNotNil as
|
|
10809
|
-
import { jsx as
|
|
11172
|
+
import styled65, { css as css31 } from "styled-components";
|
|
11173
|
+
import { isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
11174
|
+
import { jsx as jsx258, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
10810
11175
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
10811
11176
|
if (iconOnly) {
|
|
10812
|
-
return /* @__PURE__ */
|
|
11177
|
+
return /* @__PURE__ */ jsx258(
|
|
10813
11178
|
"g",
|
|
10814
11179
|
{
|
|
10815
11180
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
10816
11181
|
fill: brandmarkColor,
|
|
10817
|
-
children: /* @__PURE__ */
|
|
11182
|
+
children: /* @__PURE__ */ jsx258("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" })
|
|
10818
11183
|
}
|
|
10819
11184
|
);
|
|
10820
11185
|
}
|
|
10821
|
-
return /* @__PURE__ */
|
|
11186
|
+
return /* @__PURE__ */ jsx258(
|
|
10822
11187
|
"g",
|
|
10823
11188
|
{
|
|
10824
11189
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
10825
11190
|
fill: brandmarkColor,
|
|
10826
|
-
children: /* @__PURE__ */
|
|
11191
|
+
children: /* @__PURE__ */ jsx258("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" })
|
|
10827
11192
|
}
|
|
10828
11193
|
);
|
|
10829
11194
|
};
|
|
@@ -10831,12 +11196,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
10831
11196
|
if (iconOnly) {
|
|
10832
11197
|
return null;
|
|
10833
11198
|
}
|
|
10834
|
-
return /* @__PURE__ */
|
|
11199
|
+
return /* @__PURE__ */ jsx258(
|
|
10835
11200
|
"g",
|
|
10836
11201
|
{
|
|
10837
11202
|
"data-testid": "ui-wistia-logo-logotype",
|
|
10838
11203
|
fill: logotypeColor,
|
|
10839
|
-
children: /* @__PURE__ */
|
|
11204
|
+
children: /* @__PURE__ */ jsx258("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" })
|
|
10840
11205
|
}
|
|
10841
11206
|
);
|
|
10842
11207
|
};
|
|
@@ -10846,7 +11211,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
10846
11211
|
}
|
|
10847
11212
|
return "0 0 144 31.47";
|
|
10848
11213
|
};
|
|
10849
|
-
var WistiaLogoComponent =
|
|
11214
|
+
var WistiaLogoComponent = styled65.svg`
|
|
10850
11215
|
height: ${({ height }) => `${height}px`};
|
|
10851
11216
|
|
|
10852
11217
|
/* ensure it will always fit on mobile */
|
|
@@ -10862,12 +11227,12 @@ var WistiaLogoComponent = styled55.svg`
|
|
|
10862
11227
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
10863
11228
|
if ($opticallyCentered) {
|
|
10864
11229
|
if ($iconOnly) {
|
|
10865
|
-
return
|
|
11230
|
+
return css31`
|
|
10866
11231
|
aspect-ratio: 1;
|
|
10867
11232
|
padding: 11.85% 3.12% 13.91%;
|
|
10868
11233
|
`;
|
|
10869
11234
|
}
|
|
10870
|
-
return
|
|
11235
|
+
return css31`
|
|
10871
11236
|
aspect-ratio: 127 / 32;
|
|
10872
11237
|
`;
|
|
10873
11238
|
}
|
|
@@ -10904,7 +11269,7 @@ var WistiaLogo = ({
|
|
|
10904
11269
|
};
|
|
10905
11270
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
10906
11271
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
10907
|
-
const Logo = /* @__PURE__ */
|
|
11272
|
+
const Logo = /* @__PURE__ */ jsxs39(
|
|
10908
11273
|
WistiaLogoComponent,
|
|
10909
11274
|
{
|
|
10910
11275
|
$hoverColor: hoverColor,
|
|
@@ -10917,267 +11282,16 @@ var WistiaLogo = ({
|
|
|
10917
11282
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10918
11283
|
...otherProps,
|
|
10919
11284
|
children: [
|
|
10920
|
-
/* @__PURE__ */
|
|
10921
|
-
|
|
11285
|
+
/* @__PURE__ */ jsx258("title", { children: title }),
|
|
11286
|
+
isNotNil24(description) ? /* @__PURE__ */ jsx258("desc", { children: description }) : null,
|
|
10922
11287
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
10923
11288
|
renderLogotype(logotypeColor, iconOnly)
|
|
10924
11289
|
]
|
|
10925
11290
|
}
|
|
10926
11291
|
);
|
|
10927
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
11292
|
+
return href !== void 0 ? /* @__PURE__ */ jsx258("a", { href, children: Logo }) : Logo;
|
|
10928
11293
|
};
|
|
10929
11294
|
WistiaLogo.displayName = "WistiaLogo";
|
|
10930
|
-
|
|
10931
|
-
// src/components/Select/Select.tsx
|
|
10932
|
-
import {
|
|
10933
|
-
Root as Root3,
|
|
10934
|
-
Trigger as Trigger3,
|
|
10935
|
-
Portal as Portal2,
|
|
10936
|
-
Content as Content3,
|
|
10937
|
-
ScrollUpButton,
|
|
10938
|
-
Viewport,
|
|
10939
|
-
Value,
|
|
10940
|
-
ScrollDownButton
|
|
10941
|
-
} from "@radix-ui/react-select";
|
|
10942
|
-
import { forwardRef as forwardRef25 } from "react";
|
|
10943
|
-
import styled56 from "styled-components";
|
|
10944
|
-
import { jsx as jsx249, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10945
|
-
var StyledTrigger = styled56(Trigger3)`
|
|
10946
|
-
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10947
|
-
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10948
|
-
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
10949
|
-
--wui-select-color-border: var(--wui-color-border);
|
|
10950
|
-
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
10951
|
-
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
10952
|
-
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
10953
|
-
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
10954
|
-
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
10955
|
-
--wui-select-vertical-padding: var(--wui-space-02);
|
|
10956
|
-
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
10957
|
-
--wui-select-placeholder: var(--wui-gray-10);
|
|
10958
|
-
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
10959
|
-
|
|
10960
|
-
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
10961
|
-
background-color: var(--wui-select-color-bg);
|
|
10962
|
-
border: 1px solid var(--wui-select-color-border);
|
|
10963
|
-
border-radius: var(--wui-select-border-radius);
|
|
10964
|
-
min-width: 200px;
|
|
10965
|
-
text-align: left;
|
|
10966
|
-
display: inline-flex;
|
|
10967
|
-
align-items: center;
|
|
10968
|
-
justify-content: space-between;
|
|
10969
|
-
max-width: 100%;
|
|
10970
|
-
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
10971
|
-
|
|
10972
|
-
> span {
|
|
10973
|
-
white-space: nowrap;
|
|
10974
|
-
text-overflow: ellipsis;
|
|
10975
|
-
overflow: hidden;
|
|
10976
|
-
}
|
|
10977
|
-
|
|
10978
|
-
&[aria-expanded='true'],
|
|
10979
|
-
&:focus {
|
|
10980
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
10981
|
-
}
|
|
10982
|
-
|
|
10983
|
-
&[aria-invalid='true'] {
|
|
10984
|
-
outline: 2px solid var(--wui-select-color-border-error);
|
|
10985
|
-
color: var(--wui-select-color-text-error);
|
|
10986
|
-
}
|
|
10987
|
-
|
|
10988
|
-
&:disabled {
|
|
10989
|
-
border-color: var(--wui-color-bg-surface-disabled);
|
|
10990
|
-
background-color: var(--wui-color-bg-surface-disabled);
|
|
10991
|
-
}
|
|
10992
|
-
`;
|
|
10993
|
-
var StyledContent3 = styled56(Content3)`
|
|
10994
|
-
--wui-select-content-border: var(--wui-color-border);
|
|
10995
|
-
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
10996
|
-
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
10997
|
-
--wui-select-option-padding: var(--wui-space-02);
|
|
10998
|
-
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
10999
|
-
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
11000
|
-
|
|
11001
|
-
overflow: hidden;
|
|
11002
|
-
transform: translateY(8px);
|
|
11003
|
-
background-color: var(--wui-select-content-bg);
|
|
11004
|
-
border: 1px solid var(--wui-select-content-border);
|
|
11005
|
-
border-radius: var(--wui-select-content-border-radius);
|
|
11006
|
-
padding: var(--wui-select-option-padding);
|
|
11007
|
-
min-width: var(--radix-select-trigger-width);
|
|
11008
|
-
max-height: var(--radix-select-content-available-height);
|
|
11009
|
-
z-index: var(--wui-zindex-select);
|
|
11010
|
-
`;
|
|
11011
|
-
var Select = forwardRef25(
|
|
11012
|
-
({
|
|
11013
|
-
colorScheme = "inherit",
|
|
11014
|
-
children,
|
|
11015
|
-
onChange = () => null,
|
|
11016
|
-
placeholder = "Select...",
|
|
11017
|
-
fullWidth = false,
|
|
11018
|
-
...props
|
|
11019
|
-
}, forwardedRef) => {
|
|
11020
|
-
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
11021
|
-
return /* @__PURE__ */ jsxs37(
|
|
11022
|
-
Root3,
|
|
11023
|
-
{
|
|
11024
|
-
...props,
|
|
11025
|
-
onValueChange: onChange,
|
|
11026
|
-
children: [
|
|
11027
|
-
/* @__PURE__ */ jsxs37(
|
|
11028
|
-
StyledTrigger,
|
|
11029
|
-
{
|
|
11030
|
-
ref: forwardedRef,
|
|
11031
|
-
$colorScheme: colorScheme,
|
|
11032
|
-
$fullWidth: responsiveFullWidth,
|
|
11033
|
-
...props,
|
|
11034
|
-
children: [
|
|
11035
|
-
/* @__PURE__ */ jsx249(Value, { placeholder }),
|
|
11036
|
-
/* @__PURE__ */ jsx249(
|
|
11037
|
-
Icon,
|
|
11038
|
-
{
|
|
11039
|
-
size: "md",
|
|
11040
|
-
type: "caret-down"
|
|
11041
|
-
}
|
|
11042
|
-
)
|
|
11043
|
-
]
|
|
11044
|
-
}
|
|
11045
|
-
),
|
|
11046
|
-
/* @__PURE__ */ jsx249(Portal2, { children: /* @__PURE__ */ jsxs37(StyledContent3, { position: "popper", children: [
|
|
11047
|
-
/* @__PURE__ */ jsx249(ScrollUpButton, { children: /* @__PURE__ */ jsx249(Icon, { type: "caret-up" }) }),
|
|
11048
|
-
/* @__PURE__ */ jsx249(Viewport, { children }),
|
|
11049
|
-
/* @__PURE__ */ jsx249(ScrollDownButton, { children: /* @__PURE__ */ jsx249(Icon, { type: "caret-down" }) })
|
|
11050
|
-
] }) })
|
|
11051
|
-
]
|
|
11052
|
-
}
|
|
11053
|
-
);
|
|
11054
|
-
}
|
|
11055
|
-
);
|
|
11056
|
-
Select.displayName = "Select";
|
|
11057
|
-
|
|
11058
|
-
// src/components/Select/SelectOption.tsx
|
|
11059
|
-
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
11060
|
-
import { forwardRef as forwardRef26 } from "react";
|
|
11061
|
-
import styled57 from "styled-components";
|
|
11062
|
-
import { jsx as jsx250, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11063
|
-
var StyledItem = styled57(Item)`
|
|
11064
|
-
${variantStyleMap2.body3};
|
|
11065
|
-
display: flex;
|
|
11066
|
-
padding: var(--wui-select-option-padding);
|
|
11067
|
-
gap: var(--wui-select-option-inner-gap);
|
|
11068
|
-
font-size: var(--font-size);
|
|
11069
|
-
font-weight: var(--font-weight);
|
|
11070
|
-
border-radius: var(--wui-border-radius-01);
|
|
11071
|
-
|
|
11072
|
-
&:hover,
|
|
11073
|
-
&:focus-visible {
|
|
11074
|
-
background-color: var(--wui-select-option-bg-hover);
|
|
11075
|
-
outline: none;
|
|
11076
|
-
}
|
|
11077
|
-
|
|
11078
|
-
&[aria-disabled='true'] {
|
|
11079
|
-
color: var(--wui-color-text-disabled);
|
|
11080
|
-
}
|
|
11081
|
-
|
|
11082
|
-
&[aria-disabled='true']:hover {
|
|
11083
|
-
background-color: transparent;
|
|
11084
|
-
}
|
|
11085
|
-
`;
|
|
11086
|
-
var StyledIconContainer = styled57.span`
|
|
11087
|
-
width: 12px;
|
|
11088
|
-
`;
|
|
11089
|
-
var SelectOption = forwardRef26(
|
|
11090
|
-
({ children, ...props }, forwardedRef) => {
|
|
11091
|
-
return /* @__PURE__ */ jsxs38(
|
|
11092
|
-
StyledItem,
|
|
11093
|
-
{
|
|
11094
|
-
...props,
|
|
11095
|
-
ref: forwardedRef,
|
|
11096
|
-
children: [
|
|
11097
|
-
/* @__PURE__ */ jsx250(StyledIconContainer, { children: /* @__PURE__ */ jsx250(ItemIndicator, { children: /* @__PURE__ */ jsx250(
|
|
11098
|
-
Icon,
|
|
11099
|
-
{
|
|
11100
|
-
size: "sm",
|
|
11101
|
-
type: "checkmark"
|
|
11102
|
-
}
|
|
11103
|
-
) }) }),
|
|
11104
|
-
/* @__PURE__ */ jsx250(ItemText, { children })
|
|
11105
|
-
]
|
|
11106
|
-
}
|
|
11107
|
-
);
|
|
11108
|
-
}
|
|
11109
|
-
);
|
|
11110
|
-
SelectOption.displayName = "Option";
|
|
11111
|
-
|
|
11112
|
-
// src/components/Select/SelectOptionGroup.tsx
|
|
11113
|
-
import { Group, Label as Label2 } from "@radix-ui/react-select";
|
|
11114
|
-
import styled58 from "styled-components";
|
|
11115
|
-
import { jsx as jsx251, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11116
|
-
var StyledLabel4 = styled58(Label2)`
|
|
11117
|
-
padding: var(--wui-select-option-padding);
|
|
11118
|
-
`;
|
|
11119
|
-
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
11120
|
-
return /* @__PURE__ */ jsxs39(Group, { ...props, children: [
|
|
11121
|
-
/* @__PURE__ */ jsx251(StyledLabel4, { children: /* @__PURE__ */ jsx251(
|
|
11122
|
-
Text,
|
|
11123
|
-
{
|
|
11124
|
-
prominence: "secondary",
|
|
11125
|
-
variant: "body3",
|
|
11126
|
-
children: label
|
|
11127
|
-
}
|
|
11128
|
-
) }),
|
|
11129
|
-
children
|
|
11130
|
-
] });
|
|
11131
|
-
};
|
|
11132
|
-
|
|
11133
|
-
// src/components/Image/Image.tsx
|
|
11134
|
-
import styled59 from "styled-components";
|
|
11135
|
-
import { isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
11136
|
-
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
11137
|
-
var getFillStyle2 = (fillContainer) => {
|
|
11138
|
-
if (fillContainer === "horizontal") {
|
|
11139
|
-
return "width: 100%;";
|
|
11140
|
-
}
|
|
11141
|
-
if (fillContainer === "vertical") {
|
|
11142
|
-
return "height: 100%;";
|
|
11143
|
-
}
|
|
11144
|
-
if (fillContainer === true) {
|
|
11145
|
-
return `
|
|
11146
|
-
width: 100%;
|
|
11147
|
-
height: 100%;
|
|
11148
|
-
`;
|
|
11149
|
-
}
|
|
11150
|
-
return void 0;
|
|
11151
|
-
};
|
|
11152
|
-
var StyledImage = styled59.img`
|
|
11153
|
-
border-radius: ${({ $borderRadius }) => isNotNil24($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
11154
|
-
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
11155
|
-
object-fit: ${({ $objFit }) => $objFit};
|
|
11156
|
-
object-position: ${({ $objPosition }) => $objPosition};
|
|
11157
|
-
`;
|
|
11158
|
-
var Image = ({
|
|
11159
|
-
src,
|
|
11160
|
-
alt,
|
|
11161
|
-
borderRadius,
|
|
11162
|
-
fill: fillContainer = false,
|
|
11163
|
-
fit: objFit,
|
|
11164
|
-
loading = "lazy",
|
|
11165
|
-
position: objPosition,
|
|
11166
|
-
...otherProps
|
|
11167
|
-
}) => /* @__PURE__ */ jsx252(
|
|
11168
|
-
StyledImage,
|
|
11169
|
-
{
|
|
11170
|
-
$borderRadius: borderRadius,
|
|
11171
|
-
$fillContainer: fillContainer,
|
|
11172
|
-
$objFit: objFit,
|
|
11173
|
-
$objPosition: objPosition,
|
|
11174
|
-
alt,
|
|
11175
|
-
loading,
|
|
11176
|
-
src,
|
|
11177
|
-
...otherProps
|
|
11178
|
-
}
|
|
11179
|
-
);
|
|
11180
|
-
Image.displayName = "Image";
|
|
11181
11295
|
export {
|
|
11182
11296
|
ActionButton,
|
|
11183
11297
|
Avatar,
|
|
@@ -11237,6 +11351,12 @@ export {
|
|
|
11237
11351
|
Stack,
|
|
11238
11352
|
SubMenu,
|
|
11239
11353
|
Tab,
|
|
11354
|
+
Table,
|
|
11355
|
+
TableBody,
|
|
11356
|
+
TableCell,
|
|
11357
|
+
TableFooter,
|
|
11358
|
+
TableHead,
|
|
11359
|
+
TableRow,
|
|
11240
11360
|
Tabs,
|
|
11241
11361
|
Tag,
|
|
11242
11362
|
Text,
|