@wistia/ui 0.6.10 → 0.6.11
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 +687 -560
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +165 -120
- package/dist/index.d.ts +165 -120
- package/dist/index.mjs +680 -559
- 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
|
|
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,
|
|
@@ -9891,17 +9940,17 @@ Modal.displayName = "Modal";
|
|
|
9891
9940
|
|
|
9892
9941
|
// src/components/Popover/Popover.tsx
|
|
9893
9942
|
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close, Arrow } from "@radix-ui/react-popover";
|
|
9894
|
-
import
|
|
9943
|
+
import styled46 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 =
|
|
9952
|
+
import { jsx as jsx238, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9953
|
+
var StyledContent2 = styled46(Content2)`
|
|
9905
9954
|
border-radius: var(--wui-border-radius-02);
|
|
9906
9955
|
padding: var(--wui-space-04);
|
|
9907
9956
|
max-width: 320px;
|
|
@@ -9915,7 +9964,7 @@ var StyledContent2 = styled45(Content2)`
|
|
|
9915
9964
|
right: var(--wui-space-02);
|
|
9916
9965
|
}
|
|
9917
9966
|
`;
|
|
9918
|
-
var StyledArrow =
|
|
9967
|
+
var StyledArrow = styled46(Arrow)`
|
|
9919
9968
|
fill: white;
|
|
9920
9969
|
display: none;
|
|
9921
9970
|
`;
|
|
@@ -9928,24 +9977,24 @@ var Popover = ({
|
|
|
9928
9977
|
...props
|
|
9929
9978
|
}) => {
|
|
9930
9979
|
return /* @__PURE__ */ jsxs29(Root2, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
9931
|
-
/* @__PURE__ */
|
|
9932
|
-
/* @__PURE__ */
|
|
9980
|
+
/* @__PURE__ */ jsx238(Trigger2, { asChild: true, children: trigger }),
|
|
9981
|
+
/* @__PURE__ */ jsx238(Portal, { children: /* @__PURE__ */ jsxs29(
|
|
9933
9982
|
StyledContent2,
|
|
9934
9983
|
{
|
|
9935
9984
|
sideOffset: 5,
|
|
9936
9985
|
...props,
|
|
9937
9986
|
children: [
|
|
9938
|
-
/* @__PURE__ */
|
|
9939
|
-
!hideCloseButton && /* @__PURE__ */
|
|
9987
|
+
/* @__PURE__ */ jsx238(StyledArrow, {}),
|
|
9988
|
+
!hideCloseButton && /* @__PURE__ */ jsx238(Close, { asChild: true, children: /* @__PURE__ */ jsx238(
|
|
9940
9989
|
IconButton,
|
|
9941
9990
|
{
|
|
9942
9991
|
"data-wui-popover-close": true,
|
|
9943
9992
|
label: "Close",
|
|
9944
9993
|
variant: "ghost",
|
|
9945
|
-
children: /* @__PURE__ */
|
|
9994
|
+
children: /* @__PURE__ */ jsx238(Icon, { type: "close" })
|
|
9946
9995
|
}
|
|
9947
9996
|
) }),
|
|
9948
|
-
/* @__PURE__ */
|
|
9997
|
+
/* @__PURE__ */ jsx238("div", { children })
|
|
9949
9998
|
]
|
|
9950
9999
|
}
|
|
9951
10000
|
) })
|
|
@@ -9955,15 +10004,15 @@ Popover.displayName = "Popover";
|
|
|
9955
10004
|
|
|
9956
10005
|
// src/components/Radio/Radio.tsx
|
|
9957
10006
|
import { forwardRef as forwardRef18, useId as useId3 } from "react";
|
|
9958
|
-
import
|
|
10007
|
+
import styled47, { css as css25 } from "styled-components";
|
|
9959
10008
|
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
9960
|
-
import { jsx as
|
|
9961
|
-
var StyledLabelWrapper2 =
|
|
10009
|
+
import { jsx as jsx239, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
10010
|
+
var StyledLabelWrapper2 = styled47.div`
|
|
9962
10011
|
display: flex;
|
|
9963
10012
|
flex-direction: column;
|
|
9964
10013
|
padding-left: var(--wui-space-02);
|
|
9965
10014
|
`;
|
|
9966
|
-
var StyledRadio =
|
|
10015
|
+
var StyledRadio = styled47.input`
|
|
9967
10016
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
9968
10017
|
appearance: none;
|
|
9969
10018
|
margin: 0;
|
|
@@ -10005,7 +10054,7 @@ var defaultHoverStyle = css25`
|
|
|
10005
10054
|
/* TODO Lamp to design hover state */
|
|
10006
10055
|
cursor: pointer;
|
|
10007
10056
|
`;
|
|
10008
|
-
var StyledRadioWrapper =
|
|
10057
|
+
var StyledRadioWrapper = styled47.div`
|
|
10009
10058
|
align-items: baseline;
|
|
10010
10059
|
border: 1px solid transparent;
|
|
10011
10060
|
border-radius: 4px;
|
|
@@ -10049,7 +10098,7 @@ var Radio = forwardRef18(
|
|
|
10049
10098
|
"aria-invalid": otherProps["aria-invalid"],
|
|
10050
10099
|
disabled,
|
|
10051
10100
|
children: [
|
|
10052
|
-
/* @__PURE__ */
|
|
10101
|
+
/* @__PURE__ */ jsx239(
|
|
10053
10102
|
StyledRadio,
|
|
10054
10103
|
{
|
|
10055
10104
|
ref,
|
|
@@ -10065,7 +10114,7 @@ var Radio = forwardRef18(
|
|
|
10065
10114
|
}
|
|
10066
10115
|
),
|
|
10067
10116
|
/* @__PURE__ */ jsxs30(StyledLabelWrapper2, { children: [
|
|
10068
|
-
/* @__PURE__ */
|
|
10117
|
+
/* @__PURE__ */ jsx239(
|
|
10069
10118
|
Label,
|
|
10070
10119
|
{
|
|
10071
10120
|
disabled,
|
|
@@ -10074,7 +10123,7 @@ var Radio = forwardRef18(
|
|
|
10074
10123
|
children: label
|
|
10075
10124
|
}
|
|
10076
10125
|
),
|
|
10077
|
-
/* @__PURE__ */
|
|
10126
|
+
/* @__PURE__ */ jsx239(LabelDescription, { children: description })
|
|
10078
10127
|
] })
|
|
10079
10128
|
]
|
|
10080
10129
|
}
|
|
@@ -10085,13 +10134,13 @@ Radio.displayName = "Radio";
|
|
|
10085
10134
|
|
|
10086
10135
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10087
10136
|
import { forwardRef as forwardRef19 } from "react";
|
|
10088
|
-
import
|
|
10137
|
+
import styled49, { css as css26 } from "styled-components";
|
|
10089
10138
|
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
10090
10139
|
import { isNil as isNil13 } from "@wistia/type-guards";
|
|
10091
10140
|
|
|
10092
10141
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10093
10142
|
import { createContext as createContext6, useContext as useContext5, useMemo as useMemo8, useState as useState9 } from "react";
|
|
10094
|
-
import { jsx as
|
|
10143
|
+
import { jsx as jsx240 } from "react/jsx-runtime";
|
|
10095
10144
|
var SelectedItemMeasurementsContext = createContext6(
|
|
10096
10145
|
null
|
|
10097
10146
|
);
|
|
@@ -10106,7 +10155,7 @@ var SelectedItemMeasurementsProvider = ({
|
|
|
10106
10155
|
}),
|
|
10107
10156
|
[selectedItemMeasurements]
|
|
10108
10157
|
);
|
|
10109
|
-
return /* @__PURE__ */
|
|
10158
|
+
return /* @__PURE__ */ jsx240(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10110
10159
|
};
|
|
10111
10160
|
var useSelectedItemMeasurements = () => {
|
|
10112
10161
|
const context = useContext5(SelectedItemMeasurementsContext);
|
|
@@ -10120,7 +10169,7 @@ var useSelectedItemMeasurements = () => {
|
|
|
10120
10169
|
|
|
10121
10170
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10122
10171
|
import { useMemo as useMemo9 } from "react";
|
|
10123
|
-
import
|
|
10172
|
+
import styled48 from "styled-components";
|
|
10124
10173
|
|
|
10125
10174
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
10126
10175
|
import { createContext as createContext7, useContext as useContext6 } from "react";
|
|
@@ -10135,8 +10184,8 @@ var useSegmentedControlValue = () => {
|
|
|
10135
10184
|
};
|
|
10136
10185
|
|
|
10137
10186
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10138
|
-
import { jsx as
|
|
10139
|
-
var SelectedItemIndicatorDiv =
|
|
10187
|
+
import { jsx as jsx241 } from "react/jsx-runtime";
|
|
10188
|
+
var SelectedItemIndicatorDiv = styled48.div`
|
|
10140
10189
|
background-color: var(--wui-color-bg-fill-white);
|
|
10141
10190
|
border-radius: var(--wui-border-radius-rounded);
|
|
10142
10191
|
left: 0;
|
|
@@ -10162,7 +10211,7 @@ var SelectedItemIndicator = () => {
|
|
|
10162
10211
|
if (!selectedValue) {
|
|
10163
10212
|
return null;
|
|
10164
10213
|
}
|
|
10165
|
-
return /* @__PURE__ */
|
|
10214
|
+
return /* @__PURE__ */ jsx241(
|
|
10166
10215
|
SelectedItemIndicatorDiv,
|
|
10167
10216
|
{
|
|
10168
10217
|
style: {
|
|
@@ -10175,7 +10224,7 @@ var SelectedItemIndicator = () => {
|
|
|
10175
10224
|
};
|
|
10176
10225
|
|
|
10177
10226
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10178
|
-
import { jsx as
|
|
10227
|
+
import { jsx as jsx242, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10179
10228
|
var segmentedControlStyles = css26`
|
|
10180
10229
|
display: inline-flex;
|
|
10181
10230
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10186,7 +10235,7 @@ var segmentedControlStyles = css26`
|
|
|
10186
10235
|
position: relative;
|
|
10187
10236
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
10188
10237
|
`;
|
|
10189
|
-
var StyledSegmentedControl =
|
|
10238
|
+
var StyledSegmentedControl = styled49(ToggleGroupRoot)`
|
|
10190
10239
|
${segmentedControlStyles}
|
|
10191
10240
|
`;
|
|
10192
10241
|
var SegmentedControl = forwardRef19(
|
|
@@ -10201,7 +10250,7 @@ var SegmentedControl = forwardRef19(
|
|
|
10201
10250
|
if (isNil13(children)) {
|
|
10202
10251
|
return null;
|
|
10203
10252
|
}
|
|
10204
|
-
return /* @__PURE__ */
|
|
10253
|
+
return /* @__PURE__ */ jsx242(
|
|
10205
10254
|
StyledSegmentedControl,
|
|
10206
10255
|
{
|
|
10207
10256
|
ref,
|
|
@@ -10213,8 +10262,8 @@ var SegmentedControl = forwardRef19(
|
|
|
10213
10262
|
type: "single",
|
|
10214
10263
|
value: selectedValue,
|
|
10215
10264
|
...props,
|
|
10216
|
-
children: /* @__PURE__ */
|
|
10217
|
-
/* @__PURE__ */
|
|
10265
|
+
children: /* @__PURE__ */ jsx242(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs31(SelectedItemMeasurementsProvider, { children: [
|
|
10266
|
+
/* @__PURE__ */ jsx242(SelectedItemIndicator, {}),
|
|
10218
10267
|
children
|
|
10219
10268
|
] }) })
|
|
10220
10269
|
}
|
|
@@ -10225,19 +10274,19 @@ SegmentedControl.displayName = "SegmentedControl";
|
|
|
10225
10274
|
|
|
10226
10275
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10227
10276
|
import { forwardRef as forwardRef20, useEffect as useEffect5, useRef as useRef9 } from "react";
|
|
10228
|
-
import
|
|
10277
|
+
import styled50, { css as css27 } from "styled-components";
|
|
10229
10278
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
10230
|
-
import { isNotNil as
|
|
10279
|
+
import { isNotNil as isNotNil20 } from "@wistia/type-guards";
|
|
10231
10280
|
|
|
10232
10281
|
// src/private/helpers/mergeRefs/mergeRefs.ts
|
|
10233
|
-
import { isNotNil as
|
|
10282
|
+
import { isNotNil as isNotNil19, isFunction as isFunction2 } from "@wistia/type-guards";
|
|
10234
10283
|
var mergeRefs = (refs) => (value) => {
|
|
10235
10284
|
refs.forEach((ref) => {
|
|
10236
10285
|
if (isFunction2(ref)) {
|
|
10237
10286
|
ref(value);
|
|
10238
10287
|
return;
|
|
10239
10288
|
}
|
|
10240
|
-
if (
|
|
10289
|
+
if (isNotNil19(ref)) {
|
|
10241
10290
|
ref.current = value;
|
|
10242
10291
|
}
|
|
10243
10292
|
});
|
|
@@ -10304,7 +10353,7 @@ var segmentedControlItemStyles = css27`
|
|
|
10304
10353
|
}
|
|
10305
10354
|
}
|
|
10306
10355
|
`;
|
|
10307
|
-
var StyledSegmentedControlItem =
|
|
10356
|
+
var StyledSegmentedControlItem = styled50(ToggleGroupItem)`
|
|
10308
10357
|
${segmentedControlItemStyles}
|
|
10309
10358
|
`;
|
|
10310
10359
|
var SegmentedControlItem = forwardRef20(
|
|
@@ -10349,8 +10398,8 @@ var SegmentedControlItem = forwardRef20(
|
|
|
10349
10398
|
StyledSegmentedControlItem,
|
|
10350
10399
|
{
|
|
10351
10400
|
ref: combinedRef,
|
|
10352
|
-
$hasLabel:
|
|
10353
|
-
"aria-label":
|
|
10401
|
+
$hasLabel: isNotNil20(label),
|
|
10402
|
+
"aria-label": isNotNil20(label) ? void 0 : ariaLabel,
|
|
10354
10403
|
disabled,
|
|
10355
10404
|
onClick: handleClick,
|
|
10356
10405
|
value,
|
|
@@ -10364,133 +10413,450 @@ var SegmentedControlItem = forwardRef20(
|
|
|
10364
10413
|
);
|
|
10365
10414
|
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
10366
10415
|
|
|
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
|
|
10416
|
+
// src/components/Select/Select.tsx
|
|
10417
|
+
import {
|
|
10418
|
+
Root as Root3,
|
|
10419
|
+
Trigger as Trigger3,
|
|
10420
|
+
Portal as Portal2,
|
|
10421
|
+
Content as Content3,
|
|
10422
|
+
ScrollUpButton,
|
|
10423
|
+
Viewport,
|
|
10424
|
+
Value,
|
|
10425
|
+
ScrollDownButton
|
|
10426
|
+
} from "@radix-ui/react-select";
|
|
10427
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
10393
10428
|
import styled51 from "styled-components";
|
|
10394
|
-
import {
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10429
|
+
import { jsx as jsx243, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
10430
|
+
var StyledTrigger = styled51(Trigger3)`
|
|
10431
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10432
|
+
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10433
|
+
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
10434
|
+
--wui-select-color-border: var(--wui-color-border);
|
|
10435
|
+
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
10436
|
+
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
10437
|
+
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
10438
|
+
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
10439
|
+
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
10440
|
+
--wui-select-vertical-padding: var(--wui-space-02);
|
|
10441
|
+
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
10442
|
+
--wui-select-placeholder: var(--wui-gray-10);
|
|
10443
|
+
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
10398
10444
|
|
|
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";
|
|
10445
|
+
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
10446
|
+
background-color: var(--wui-select-color-bg);
|
|
10447
|
+
border: 1px solid var(--wui-select-color-border);
|
|
10448
|
+
border-radius: var(--wui-select-border-radius);
|
|
10449
|
+
min-width: 200px;
|
|
10450
|
+
text-align: left;
|
|
10451
|
+
display: inline-flex;
|
|
10452
|
+
align-items: center;
|
|
10453
|
+
justify-content: space-between;
|
|
10454
|
+
max-width: 100%;
|
|
10455
|
+
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
10418
10456
|
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10457
|
+
> span {
|
|
10458
|
+
white-space: nowrap;
|
|
10459
|
+
text-overflow: ellipsis;
|
|
10460
|
+
overflow: hidden;
|
|
10461
|
+
}
|
|
10424
10462
|
|
|
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");
|
|
10463
|
+
&[aria-expanded='true'],
|
|
10464
|
+
&:focus {
|
|
10465
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
10433
10466
|
}
|
|
10434
|
-
return context;
|
|
10435
|
-
};
|
|
10436
10467
|
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
var
|
|
10440
|
-
|
|
10468
|
+
&[aria-invalid='true'] {
|
|
10469
|
+
outline: 2px solid var(--wui-select-color-border-error);
|
|
10470
|
+
color: var(--wui-select-color-text-error);
|
|
10471
|
+
}
|
|
10441
10472
|
|
|
10442
|
-
&:
|
|
10443
|
-
|
|
10473
|
+
&:disabled {
|
|
10474
|
+
border-color: var(--wui-color-bg-surface-disabled);
|
|
10475
|
+
background-color: var(--wui-color-bg-surface-disabled);
|
|
10444
10476
|
}
|
|
10445
10477
|
`;
|
|
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]);
|
|
10478
|
+
var StyledContent3 = styled51(Content3)`
|
|
10479
|
+
--wui-select-content-border: var(--wui-color-border);
|
|
10480
|
+
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
10481
|
+
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
10482
|
+
--wui-select-option-padding: var(--wui-space-02);
|
|
10483
|
+
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
10484
|
+
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
10485
|
+
|
|
10486
|
+
overflow: hidden;
|
|
10487
|
+
transform: translateY(8px);
|
|
10488
|
+
background-color: var(--wui-select-content-bg);
|
|
10489
|
+
border: 1px solid var(--wui-select-content-border);
|
|
10490
|
+
border-radius: var(--wui-select-content-border-radius);
|
|
10491
|
+
padding: var(--wui-select-option-padding);
|
|
10492
|
+
min-width: var(--radix-select-trigger-width);
|
|
10493
|
+
max-height: var(--radix-select-content-available-height);
|
|
10494
|
+
z-index: var(--wui-zindex-select);
|
|
10495
|
+
`;
|
|
10496
|
+
var Select = forwardRef21(
|
|
10497
|
+
({
|
|
10498
|
+
colorScheme = "inherit",
|
|
10499
|
+
children,
|
|
10500
|
+
onChange = () => null,
|
|
10501
|
+
placeholder = "Select...",
|
|
10502
|
+
fullWidth = false,
|
|
10503
|
+
...props
|
|
10504
|
+
}, forwardedRef) => {
|
|
10505
|
+
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
10477
10506
|
return /* @__PURE__ */ jsxs33(
|
|
10478
|
-
|
|
10507
|
+
Root3,
|
|
10479
10508
|
{
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
"aria-label": isNotNil20(label) ? void 0 : ariaLabel,
|
|
10483
|
-
disabled,
|
|
10484
|
-
value,
|
|
10509
|
+
...props,
|
|
10510
|
+
onValueChange: onChange,
|
|
10485
10511
|
children: [
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10512
|
+
/* @__PURE__ */ jsxs33(
|
|
10513
|
+
StyledTrigger,
|
|
10514
|
+
{
|
|
10515
|
+
ref: forwardedRef,
|
|
10516
|
+
$colorScheme: colorScheme,
|
|
10517
|
+
$fullWidth: responsiveFullWidth,
|
|
10518
|
+
...props,
|
|
10519
|
+
children: [
|
|
10520
|
+
/* @__PURE__ */ jsx243(Value, { placeholder }),
|
|
10521
|
+
/* @__PURE__ */ jsx243(
|
|
10522
|
+
Icon,
|
|
10523
|
+
{
|
|
10524
|
+
size: "md",
|
|
10525
|
+
type: "caret-down"
|
|
10526
|
+
}
|
|
10527
|
+
)
|
|
10528
|
+
]
|
|
10529
|
+
}
|
|
10530
|
+
),
|
|
10531
|
+
/* @__PURE__ */ jsx243(Portal2, { children: /* @__PURE__ */ jsxs33(StyledContent3, { position: "popper", children: [
|
|
10532
|
+
/* @__PURE__ */ jsx243(ScrollUpButton, { children: /* @__PURE__ */ jsx243(Icon, { type: "caret-up" }) }),
|
|
10533
|
+
/* @__PURE__ */ jsx243(Viewport, { children }),
|
|
10534
|
+
/* @__PURE__ */ jsx243(ScrollDownButton, { children: /* @__PURE__ */ jsx243(Icon, { type: "caret-down" }) })
|
|
10535
|
+
] }) })
|
|
10536
|
+
]
|
|
10537
|
+
}
|
|
10538
|
+
);
|
|
10539
|
+
}
|
|
10540
|
+
);
|
|
10541
|
+
Select.displayName = "Select";
|
|
10542
|
+
|
|
10543
|
+
// src/components/Select/SelectOption.tsx
|
|
10544
|
+
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
10545
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
10546
|
+
import styled52 from "styled-components";
|
|
10547
|
+
import { jsx as jsx244, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10548
|
+
var StyledItem = styled52(Item)`
|
|
10549
|
+
${variantStyleMap2.body3};
|
|
10550
|
+
display: flex;
|
|
10551
|
+
padding: var(--wui-select-option-padding);
|
|
10552
|
+
gap: var(--wui-select-option-inner-gap);
|
|
10553
|
+
font-size: var(--font-size);
|
|
10554
|
+
font-weight: var(--font-weight);
|
|
10555
|
+
border-radius: var(--wui-border-radius-01);
|
|
10556
|
+
|
|
10557
|
+
&:hover,
|
|
10558
|
+
&:focus-visible {
|
|
10559
|
+
background-color: var(--wui-select-option-bg-hover);
|
|
10560
|
+
outline: none;
|
|
10561
|
+
}
|
|
10562
|
+
|
|
10563
|
+
&[aria-disabled='true'] {
|
|
10564
|
+
color: var(--wui-color-text-disabled);
|
|
10565
|
+
}
|
|
10566
|
+
|
|
10567
|
+
&[aria-disabled='true']:hover {
|
|
10568
|
+
background-color: transparent;
|
|
10569
|
+
}
|
|
10570
|
+
`;
|
|
10571
|
+
var StyledIconContainer = styled52.span`
|
|
10572
|
+
width: 12px;
|
|
10573
|
+
`;
|
|
10574
|
+
var SelectOption = forwardRef22(
|
|
10575
|
+
({ children, ...props }, forwardedRef) => {
|
|
10576
|
+
return /* @__PURE__ */ jsxs34(
|
|
10577
|
+
StyledItem,
|
|
10578
|
+
{
|
|
10579
|
+
...props,
|
|
10580
|
+
ref: forwardedRef,
|
|
10581
|
+
children: [
|
|
10582
|
+
/* @__PURE__ */ jsx244(StyledIconContainer, { children: /* @__PURE__ */ jsx244(ItemIndicator, { children: /* @__PURE__ */ jsx244(
|
|
10583
|
+
Icon,
|
|
10584
|
+
{
|
|
10585
|
+
size: "sm",
|
|
10586
|
+
type: "checkmark"
|
|
10587
|
+
}
|
|
10588
|
+
) }) }),
|
|
10589
|
+
/* @__PURE__ */ jsx244(ItemText, { children })
|
|
10590
|
+
]
|
|
10591
|
+
}
|
|
10592
|
+
);
|
|
10593
|
+
}
|
|
10594
|
+
);
|
|
10595
|
+
SelectOption.displayName = "Option";
|
|
10596
|
+
|
|
10597
|
+
// src/components/Select/SelectOptionGroup.tsx
|
|
10598
|
+
import { Group, Label as Label2 } from "@radix-ui/react-select";
|
|
10599
|
+
import styled53 from "styled-components";
|
|
10600
|
+
import { jsx as jsx245, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
10601
|
+
var StyledLabel4 = styled53(Label2)`
|
|
10602
|
+
padding: var(--wui-select-option-padding);
|
|
10603
|
+
`;
|
|
10604
|
+
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
10605
|
+
return /* @__PURE__ */ jsxs35(Group, { ...props, children: [
|
|
10606
|
+
/* @__PURE__ */ jsx245(StyledLabel4, { children: /* @__PURE__ */ jsx245(
|
|
10607
|
+
Text,
|
|
10608
|
+
{
|
|
10609
|
+
prominence: "secondary",
|
|
10610
|
+
variant: "body3",
|
|
10611
|
+
children: label
|
|
10612
|
+
}
|
|
10613
|
+
) }),
|
|
10614
|
+
children
|
|
10615
|
+
] });
|
|
10616
|
+
};
|
|
10617
|
+
|
|
10618
|
+
// src/components/Table/Table.tsx
|
|
10619
|
+
import { useMemo as useMemo10 } from "react";
|
|
10620
|
+
import styled54, { css as css28 } from "styled-components";
|
|
10621
|
+
|
|
10622
|
+
// src/components/Table/TableContext.tsx
|
|
10623
|
+
import React from "react";
|
|
10624
|
+
var TableContext = React.createContext({ divided: false });
|
|
10625
|
+
|
|
10626
|
+
// src/components/Table/Table.tsx
|
|
10627
|
+
import { jsx as jsx246 } from "react/jsx-runtime";
|
|
10628
|
+
var StyledTable = styled54.table`
|
|
10629
|
+
width: 100%;
|
|
10630
|
+
border-collapse: collapse;
|
|
10631
|
+
|
|
10632
|
+
${({ $striped }) => $striped && css28`
|
|
10633
|
+
tbody tr:nth-child(even) {
|
|
10634
|
+
background-color: var(--wui-color-bg-surface-secondary);
|
|
10635
|
+
}
|
|
10636
|
+
`}
|
|
10637
|
+
`;
|
|
10638
|
+
var Table = ({
|
|
10639
|
+
children,
|
|
10640
|
+
striped = false,
|
|
10641
|
+
divided = false,
|
|
10642
|
+
...props
|
|
10643
|
+
}) => {
|
|
10644
|
+
const contextValue = useMemo10(() => ({ divided }), [divided]);
|
|
10645
|
+
return /* @__PURE__ */ jsx246(TableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx246(
|
|
10646
|
+
StyledTable,
|
|
10647
|
+
{
|
|
10648
|
+
$striped: striped,
|
|
10649
|
+
...props,
|
|
10650
|
+
children
|
|
10651
|
+
}
|
|
10652
|
+
) });
|
|
10653
|
+
};
|
|
10654
|
+
|
|
10655
|
+
// src/components/Table/TableBody.tsx
|
|
10656
|
+
import styled55 from "styled-components";
|
|
10657
|
+
|
|
10658
|
+
// src/components/Table/TableSectionContext.ts
|
|
10659
|
+
import { createContext as createContext8 } from "react";
|
|
10660
|
+
var TableSectionContext = createContext8(null);
|
|
10661
|
+
|
|
10662
|
+
// src/components/Table/TableBody.tsx
|
|
10663
|
+
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
10664
|
+
var StyledTbody = styled55.tbody``;
|
|
10665
|
+
var TableBody = ({ children, ...props }) => {
|
|
10666
|
+
return /* @__PURE__ */ jsx247(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx247(StyledTbody, { ...props, children }) });
|
|
10667
|
+
};
|
|
10668
|
+
|
|
10669
|
+
// src/components/Table/TableCell.tsx
|
|
10670
|
+
import { useContext as useContext7 } from "react";
|
|
10671
|
+
import styled56, { css as css29 } from "styled-components";
|
|
10672
|
+
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
10673
|
+
var sharedStyles = css29`
|
|
10674
|
+
color: var(--wui-color-text);
|
|
10675
|
+
padding: var(--wui-space-02);
|
|
10676
|
+
text-align: left;
|
|
10677
|
+
`;
|
|
10678
|
+
var StyledTh = styled56.th`
|
|
10679
|
+
${sharedStyles}
|
|
10680
|
+
font-size: var(--wui-typography-body-4-size);
|
|
10681
|
+
font-weight: var(--wui-typography-weight-label-bold);
|
|
10682
|
+
line-height: var(--wui-typography-body-4-line-height);
|
|
10683
|
+
`;
|
|
10684
|
+
var StyledTd = styled56.td`
|
|
10685
|
+
${sharedStyles}
|
|
10686
|
+
font-size: var(--wui-typography-body-2-size);
|
|
10687
|
+
font-weight: var(--wui-typography-body-2-weight);
|
|
10688
|
+
line-height: var(--wui-typography-body-2-line-height);
|
|
10689
|
+
`;
|
|
10690
|
+
var TableCell = ({ children, ...props }) => {
|
|
10691
|
+
const section = useContext7(TableSectionContext);
|
|
10692
|
+
if (section === "head") {
|
|
10693
|
+
return /* @__PURE__ */ jsx248(StyledTh, { ...props, children });
|
|
10694
|
+
}
|
|
10695
|
+
return /* @__PURE__ */ jsx248(StyledTd, { ...props, children });
|
|
10696
|
+
};
|
|
10697
|
+
|
|
10698
|
+
// src/components/Table/TableFooter.tsx
|
|
10699
|
+
import styled57 from "styled-components";
|
|
10700
|
+
import { jsx as jsx249 } from "react/jsx-runtime";
|
|
10701
|
+
var StyledTfoot = styled57.tfoot``;
|
|
10702
|
+
var TableFooter = ({ children, ...props }) => {
|
|
10703
|
+
return /* @__PURE__ */ jsx249(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx249(StyledTfoot, { ...props, children }) });
|
|
10704
|
+
};
|
|
10705
|
+
|
|
10706
|
+
// src/components/Table/TableHead.tsx
|
|
10707
|
+
import styled58 from "styled-components";
|
|
10708
|
+
import { jsx as jsx250 } from "react/jsx-runtime";
|
|
10709
|
+
var StyledThead = styled58.thead``;
|
|
10710
|
+
var TableHead = ({ children, ...props }) => {
|
|
10711
|
+
return /* @__PURE__ */ jsx250(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx250(StyledThead, { ...props, children }) });
|
|
10712
|
+
};
|
|
10713
|
+
|
|
10714
|
+
// src/components/Table/TableRow.tsx
|
|
10715
|
+
import { useContext as useContext8 } from "react";
|
|
10716
|
+
import styled59 from "styled-components";
|
|
10717
|
+
import { jsx as jsx251 } from "react/jsx-runtime";
|
|
10718
|
+
var StyledTr = styled59.tr`
|
|
10719
|
+
${({ $divided }) => $divided && `border-bottom: 1px solid var(--wui-color-border);`}
|
|
10720
|
+
`;
|
|
10721
|
+
var TableRow = ({ children, ...props }) => {
|
|
10722
|
+
const { divided = false } = useContext8(TableContext);
|
|
10723
|
+
return /* @__PURE__ */ jsx251(
|
|
10724
|
+
StyledTr,
|
|
10725
|
+
{
|
|
10726
|
+
$divided: divided,
|
|
10727
|
+
...props,
|
|
10728
|
+
children
|
|
10729
|
+
}
|
|
10730
|
+
);
|
|
10731
|
+
};
|
|
10732
|
+
|
|
10733
|
+
// src/components/Tabs/Tabs.tsx
|
|
10734
|
+
import { forwardRef as forwardRef24, useState as useState10 } from "react";
|
|
10735
|
+
import { Root as TabsRoot } from "@radix-ui/react-tabs";
|
|
10736
|
+
import { isNotNil as isNotNil22, isNil as isNil14 } from "@wistia/type-guards";
|
|
10737
|
+
|
|
10738
|
+
// src/components/Tabs/TabPanel.tsx
|
|
10739
|
+
import styled60 from "styled-components";
|
|
10740
|
+
import { Content as TabsContent } from "@radix-ui/react-tabs";
|
|
10741
|
+
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
10742
|
+
var StyledTabPanel = styled60(TabsContent)`
|
|
10743
|
+
display: flex;
|
|
10744
|
+
flex-direction: column;
|
|
10745
|
+
`;
|
|
10746
|
+
var TabPanel = ({ children, value, ...props }) => {
|
|
10747
|
+
return /* @__PURE__ */ jsx252(
|
|
10748
|
+
StyledTabPanel,
|
|
10749
|
+
{
|
|
10750
|
+
value,
|
|
10751
|
+
...props,
|
|
10752
|
+
children
|
|
10753
|
+
}
|
|
10754
|
+
);
|
|
10755
|
+
};
|
|
10756
|
+
TabPanel.displayName = "TabPanel";
|
|
10757
|
+
|
|
10758
|
+
// src/components/Tabs/TabList.tsx
|
|
10759
|
+
import styled61 from "styled-components";
|
|
10760
|
+
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
10761
|
+
import { jsx as jsx253 } from "react/jsx-runtime";
|
|
10762
|
+
var StyledTabList = styled61(RadixTabList)`
|
|
10763
|
+
${segmentedControlStyles}
|
|
10764
|
+
|
|
10765
|
+
margin-bottom: var(--wui-space-04);
|
|
10766
|
+
`;
|
|
10767
|
+
var TabList = ({
|
|
10768
|
+
children,
|
|
10769
|
+
fullWidth,
|
|
10770
|
+
ariaLabel,
|
|
10771
|
+
...props
|
|
10772
|
+
}) => {
|
|
10773
|
+
return /* @__PURE__ */ jsx253(
|
|
10774
|
+
StyledTabList,
|
|
10775
|
+
{
|
|
10776
|
+
$fullWidth: fullWidth,
|
|
10777
|
+
"aria-label": ariaLabel,
|
|
10778
|
+
...props,
|
|
10779
|
+
children
|
|
10780
|
+
}
|
|
10781
|
+
);
|
|
10782
|
+
};
|
|
10783
|
+
TabList.displayName = "TabList";
|
|
10784
|
+
|
|
10785
|
+
// src/components/Tabs/TabItem.tsx
|
|
10786
|
+
import { forwardRef as forwardRef23, useEffect as useEffect6, useRef as useRef10 } from "react";
|
|
10787
|
+
import styled62 from "styled-components";
|
|
10788
|
+
import { Trigger as RadixTab } from "@radix-ui/react-tabs";
|
|
10789
|
+
import { isNotNil as isNotNil21 } from "@wistia/type-guards";
|
|
10790
|
+
|
|
10791
|
+
// src/components/Tabs/useTabsValue.tsx
|
|
10792
|
+
import { createContext as createContext9, useContext as useContext9 } from "react";
|
|
10793
|
+
var TabsValueContext = createContext9(null);
|
|
10794
|
+
var TabsValueProvider = TabsValueContext.Provider;
|
|
10795
|
+
var useTabsValue = () => {
|
|
10796
|
+
const context = useContext9(TabsValueContext);
|
|
10797
|
+
if (context === null) {
|
|
10798
|
+
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
10799
|
+
}
|
|
10800
|
+
return context;
|
|
10801
|
+
};
|
|
10802
|
+
|
|
10803
|
+
// src/components/Tabs/TabItem.tsx
|
|
10804
|
+
import { jsxs as jsxs36 } from "react/jsx-runtime";
|
|
10805
|
+
var StyledTabItem = styled62(RadixTab)`
|
|
10806
|
+
${segmentedControlItemStyles}
|
|
10807
|
+
|
|
10808
|
+
&:focus-visible {
|
|
10809
|
+
outline: none;
|
|
10810
|
+
}
|
|
10811
|
+
`;
|
|
10812
|
+
var TabItem = forwardRef23(
|
|
10813
|
+
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
10814
|
+
const selectedValue = useTabsValue();
|
|
10815
|
+
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10816
|
+
const buttonRef = useRef10(null);
|
|
10817
|
+
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
10818
|
+
useEffect6(() => {
|
|
10819
|
+
const buttonElem = buttonRef.current;
|
|
10820
|
+
if (!buttonElem) {
|
|
10821
|
+
return void 0;
|
|
10822
|
+
}
|
|
10823
|
+
if (selectedValue !== value) {
|
|
10824
|
+
return void 0;
|
|
10825
|
+
}
|
|
10826
|
+
setSelectedItemMeasurements({
|
|
10827
|
+
offsetLeft: buttonElem.offsetLeft,
|
|
10828
|
+
offsetWidth: buttonElem.offsetWidth,
|
|
10829
|
+
offsetHeight: buttonElem.offsetHeight
|
|
10830
|
+
});
|
|
10831
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
10832
|
+
setSelectedItemMeasurements({
|
|
10833
|
+
offsetLeft: buttonElem.offsetLeft,
|
|
10834
|
+
offsetWidth: buttonElem.offsetWidth,
|
|
10835
|
+
offsetHeight: buttonElem.offsetHeight
|
|
10836
|
+
});
|
|
10837
|
+
});
|
|
10838
|
+
resizeObserver.observe(buttonElem);
|
|
10839
|
+
return () => {
|
|
10840
|
+
resizeObserver.disconnect();
|
|
10841
|
+
};
|
|
10842
|
+
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10843
|
+
return /* @__PURE__ */ jsxs36(
|
|
10844
|
+
StyledTabItem,
|
|
10845
|
+
{
|
|
10846
|
+
ref: combinedRef,
|
|
10847
|
+
$hasLabel: isNotNil21(label),
|
|
10848
|
+
"aria-label": isNotNil21(label) ? void 0 : ariaLabel,
|
|
10849
|
+
disabled,
|
|
10850
|
+
value,
|
|
10851
|
+
children: [
|
|
10852
|
+
icon,
|
|
10853
|
+
label
|
|
10854
|
+
]
|
|
10855
|
+
}
|
|
10856
|
+
);
|
|
10857
|
+
}
|
|
10858
|
+
);
|
|
10859
|
+
TabItem.displayName = "TabItem";
|
|
10494
10860
|
|
|
10495
10861
|
// src/components/Tabs/extractTabItems.ts
|
|
10496
10862
|
import { Children as Children6, Fragment as Fragment7, isValidElement as isValidElement2 } from "react";
|
|
@@ -10515,10 +10881,10 @@ var extractTabItems = (children) => {
|
|
|
10515
10881
|
};
|
|
10516
10882
|
|
|
10517
10883
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
10518
|
-
import { useMemo as
|
|
10519
|
-
import
|
|
10520
|
-
import { jsx as
|
|
10521
|
-
var TabsSelectedItemIndicatorDiv =
|
|
10884
|
+
import { useMemo as useMemo11 } from "react";
|
|
10885
|
+
import styled63 from "styled-components";
|
|
10886
|
+
import { jsx as jsx254 } from "react/jsx-runtime";
|
|
10887
|
+
var TabsSelectedItemIndicatorDiv = styled63(SelectedItemIndicatorDiv)`
|
|
10522
10888
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
10523
10889
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
10524
10890
|
}
|
|
@@ -10526,7 +10892,7 @@ var TabsSelectedItemIndicatorDiv = styled53(SelectedItemIndicatorDiv)`
|
|
|
10526
10892
|
var SelectedItemIndicator2 = () => {
|
|
10527
10893
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10528
10894
|
const selectedValue = useTabsValue();
|
|
10529
|
-
const selectedItemIndicatorStyle =
|
|
10895
|
+
const selectedItemIndicatorStyle = useMemo11(
|
|
10530
10896
|
() => selectedItemMeasurements != null ? {
|
|
10531
10897
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
10532
10898
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -10537,7 +10903,7 @@ var SelectedItemIndicator2 = () => {
|
|
|
10537
10903
|
if (selectedValue == null) {
|
|
10538
10904
|
return null;
|
|
10539
10905
|
}
|
|
10540
|
-
return /* @__PURE__ */
|
|
10906
|
+
return /* @__PURE__ */ jsx254(
|
|
10541
10907
|
TabsSelectedItemIndicatorDiv,
|
|
10542
10908
|
{
|
|
10543
10909
|
style: {
|
|
@@ -10550,8 +10916,8 @@ var SelectedItemIndicator2 = () => {
|
|
|
10550
10916
|
};
|
|
10551
10917
|
|
|
10552
10918
|
// src/components/Tabs/Tabs.tsx
|
|
10553
|
-
import { jsx as
|
|
10554
|
-
var Tabs =
|
|
10919
|
+
import { jsx as jsx255, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
10920
|
+
var Tabs = forwardRef24(
|
|
10555
10921
|
({
|
|
10556
10922
|
children,
|
|
10557
10923
|
fullWidth = true,
|
|
@@ -10567,25 +10933,25 @@ var Tabs = forwardRef22(
|
|
|
10567
10933
|
defaultValue: defaultSelectedValue,
|
|
10568
10934
|
onValueChange: setInternalSelectedValue
|
|
10569
10935
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
10570
|
-
return /* @__PURE__ */
|
|
10936
|
+
return /* @__PURE__ */ jsx255(
|
|
10571
10937
|
TabsRoot,
|
|
10572
10938
|
{
|
|
10573
10939
|
ref,
|
|
10574
10940
|
activationMode: "automatic",
|
|
10575
10941
|
...otherProps,
|
|
10576
10942
|
...modeProps,
|
|
10577
|
-
children: /* @__PURE__ */
|
|
10943
|
+
children: /* @__PURE__ */ jsx255(
|
|
10578
10944
|
TabsValueProvider,
|
|
10579
10945
|
{
|
|
10580
10946
|
value: defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue,
|
|
10581
|
-
children: /* @__PURE__ */
|
|
10582
|
-
/* @__PURE__ */
|
|
10947
|
+
children: /* @__PURE__ */ jsxs37(SelectedItemMeasurementsProvider, { children: [
|
|
10948
|
+
/* @__PURE__ */ jsxs37(
|
|
10583
10949
|
TabList,
|
|
10584
10950
|
{
|
|
10585
10951
|
ariaLabel,
|
|
10586
10952
|
fullWidth,
|
|
10587
10953
|
children: [
|
|
10588
|
-
/* @__PURE__ */
|
|
10954
|
+
/* @__PURE__ */ jsx255(SelectedItemIndicator2, {}),
|
|
10589
10955
|
tabItems.map((tab) => {
|
|
10590
10956
|
const {
|
|
10591
10957
|
value,
|
|
@@ -10595,7 +10961,7 @@ var Tabs = forwardRef22(
|
|
|
10595
10961
|
"aria-label": ariaLabelForTab
|
|
10596
10962
|
} = tab.props;
|
|
10597
10963
|
if (isNil14(icon)) {
|
|
10598
|
-
return /* @__PURE__ */
|
|
10964
|
+
return /* @__PURE__ */ jsx255(
|
|
10599
10965
|
TabItem,
|
|
10600
10966
|
{
|
|
10601
10967
|
disabled,
|
|
@@ -10605,8 +10971,8 @@ var Tabs = forwardRef22(
|
|
|
10605
10971
|
value
|
|
10606
10972
|
);
|
|
10607
10973
|
}
|
|
10608
|
-
if (
|
|
10609
|
-
return /* @__PURE__ */
|
|
10974
|
+
if (isNotNil22(label)) {
|
|
10975
|
+
return /* @__PURE__ */ jsx255(
|
|
10610
10976
|
TabItem,
|
|
10611
10977
|
{
|
|
10612
10978
|
disabled,
|
|
@@ -10617,8 +10983,8 @@ var Tabs = forwardRef22(
|
|
|
10617
10983
|
value
|
|
10618
10984
|
);
|
|
10619
10985
|
}
|
|
10620
|
-
if (
|
|
10621
|
-
return /* @__PURE__ */
|
|
10986
|
+
if (isNotNil22(ariaLabelForTab)) {
|
|
10987
|
+
return /* @__PURE__ */ jsx255(
|
|
10622
10988
|
TabItem,
|
|
10623
10989
|
{
|
|
10624
10990
|
"aria-label": ariaLabelForTab,
|
|
@@ -10634,7 +11000,7 @@ var Tabs = forwardRef22(
|
|
|
10634
11000
|
]
|
|
10635
11001
|
}
|
|
10636
11002
|
),
|
|
10637
|
-
tabItems.map((tab) => /* @__PURE__ */
|
|
11003
|
+
tabItems.map((tab) => /* @__PURE__ */ jsx255(
|
|
10638
11004
|
TabPanel,
|
|
10639
11005
|
{
|
|
10640
11006
|
value: tab.props.value,
|
|
@@ -10652,19 +11018,19 @@ var Tabs = forwardRef22(
|
|
|
10652
11018
|
Tabs.displayName = "Tabs";
|
|
10653
11019
|
|
|
10654
11020
|
// src/components/Tabs/Tab.tsx
|
|
10655
|
-
import { forwardRef as
|
|
10656
|
-
import { jsx as
|
|
10657
|
-
var Tab =
|
|
10658
|
-
return /* @__PURE__ */
|
|
11021
|
+
import { forwardRef as forwardRef25 } from "react";
|
|
11022
|
+
import { jsx as jsx256 } from "react/jsx-runtime";
|
|
11023
|
+
var Tab = forwardRef25(({ children }, ref) => {
|
|
11024
|
+
return /* @__PURE__ */ jsx256("div", { ref, children });
|
|
10659
11025
|
});
|
|
10660
11026
|
Tab.displayName = "Tab";
|
|
10661
11027
|
|
|
10662
11028
|
// 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 =
|
|
11029
|
+
import { forwardRef as forwardRef26 } from "react";
|
|
11030
|
+
import styled64 from "styled-components";
|
|
11031
|
+
import { isNil as isNil15, isNotNil as isNotNil23, isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
11032
|
+
import { Fragment as Fragment8, jsx as jsx257, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11033
|
+
var TagLabel = styled64.a`
|
|
10668
11034
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10669
11035
|
font-size: var(--wui-typography-label-4-size);
|
|
10670
11036
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -10692,14 +11058,14 @@ var TagLabel = styled54.a`
|
|
|
10692
11058
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
10693
11059
|
}
|
|
10694
11060
|
`;
|
|
10695
|
-
var TagDivider =
|
|
11061
|
+
var TagDivider = styled64.div`
|
|
10696
11062
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10697
11063
|
border-left: 1px solid var(--wui-color-border);
|
|
10698
11064
|
display: flex;
|
|
10699
11065
|
height: 14px;
|
|
10700
11066
|
width: 1px;
|
|
10701
11067
|
`;
|
|
10702
|
-
var StyledRemoveButton =
|
|
11068
|
+
var StyledRemoveButton = styled64.button`
|
|
10703
11069
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10704
11070
|
all: unset;
|
|
10705
11071
|
cursor: pointer;
|
|
@@ -10727,7 +11093,7 @@ var StyledRemoveButton = styled54.button`
|
|
|
10727
11093
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
10728
11094
|
}
|
|
10729
11095
|
`;
|
|
10730
|
-
var StyledTag =
|
|
11096
|
+
var StyledTag = styled64.div`
|
|
10731
11097
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10732
11098
|
align-items: center;
|
|
10733
11099
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10748,39 +11114,39 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
10748
11114
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
10749
11115
|
);
|
|
10750
11116
|
}
|
|
10751
|
-
return /* @__PURE__ */
|
|
10752
|
-
/* @__PURE__ */
|
|
10753
|
-
/* @__PURE__ */
|
|
11117
|
+
return /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
11118
|
+
/* @__PURE__ */ jsx257(TagDivider, { $colorScheme: colorScheme }),
|
|
11119
|
+
/* @__PURE__ */ jsxs38(
|
|
10754
11120
|
StyledRemoveButton,
|
|
10755
11121
|
{
|
|
10756
11122
|
$colorScheme: colorScheme,
|
|
10757
11123
|
onClick: onClickRemove,
|
|
10758
11124
|
type: "button",
|
|
10759
11125
|
children: [
|
|
10760
|
-
/* @__PURE__ */
|
|
11126
|
+
/* @__PURE__ */ jsx257(
|
|
10761
11127
|
Icon,
|
|
10762
11128
|
{
|
|
10763
11129
|
size: "sm",
|
|
10764
11130
|
type: "close"
|
|
10765
11131
|
}
|
|
10766
11132
|
),
|
|
10767
|
-
/* @__PURE__ */
|
|
11133
|
+
/* @__PURE__ */ jsx257(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
10768
11134
|
]
|
|
10769
11135
|
}
|
|
10770
11136
|
)
|
|
10771
11137
|
] });
|
|
10772
11138
|
};
|
|
10773
|
-
var Tag =
|
|
11139
|
+
var Tag = forwardRef26(
|
|
10774
11140
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
10775
|
-
const labelProps =
|
|
10776
|
-
return /* @__PURE__ */
|
|
11141
|
+
const labelProps = isNotNil23(href) && isNonEmptyString4(href) ? { href, as: "a" } : { as: "span" };
|
|
11142
|
+
return /* @__PURE__ */ jsxs38(
|
|
10777
11143
|
StyledTag,
|
|
10778
11144
|
{
|
|
10779
11145
|
ref,
|
|
10780
11146
|
$colorScheme: colorScheme,
|
|
10781
11147
|
...otherProps,
|
|
10782
11148
|
children: [
|
|
10783
|
-
/* @__PURE__ */
|
|
11149
|
+
/* @__PURE__ */ jsx257(
|
|
10784
11150
|
TagLabel,
|
|
10785
11151
|
{
|
|
10786
11152
|
...labelProps,
|
|
@@ -10788,7 +11154,7 @@ var Tag = forwardRef24(
|
|
|
10788
11154
|
children: label
|
|
10789
11155
|
}
|
|
10790
11156
|
),
|
|
10791
|
-
/* @__PURE__ */
|
|
11157
|
+
/* @__PURE__ */ jsx257(
|
|
10792
11158
|
RemoveButton,
|
|
10793
11159
|
{
|
|
10794
11160
|
colorScheme,
|
|
@@ -10804,26 +11170,26 @@ var Tag = forwardRef24(
|
|
|
10804
11170
|
Tag.displayName = "Tag";
|
|
10805
11171
|
|
|
10806
11172
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
10807
|
-
import
|
|
10808
|
-
import { isNotNil as
|
|
10809
|
-
import { jsx as
|
|
11173
|
+
import styled65, { css as css30 } from "styled-components";
|
|
11174
|
+
import { isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
11175
|
+
import { jsx as jsx258, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
10810
11176
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
10811
11177
|
if (iconOnly) {
|
|
10812
|
-
return /* @__PURE__ */
|
|
11178
|
+
return /* @__PURE__ */ jsx258(
|
|
10813
11179
|
"g",
|
|
10814
11180
|
{
|
|
10815
11181
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
10816
11182
|
fill: brandmarkColor,
|
|
10817
|
-
children: /* @__PURE__ */
|
|
11183
|
+
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
11184
|
}
|
|
10819
11185
|
);
|
|
10820
11186
|
}
|
|
10821
|
-
return /* @__PURE__ */
|
|
11187
|
+
return /* @__PURE__ */ jsx258(
|
|
10822
11188
|
"g",
|
|
10823
11189
|
{
|
|
10824
11190
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
10825
11191
|
fill: brandmarkColor,
|
|
10826
|
-
children: /* @__PURE__ */
|
|
11192
|
+
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
11193
|
}
|
|
10828
11194
|
);
|
|
10829
11195
|
};
|
|
@@ -10831,12 +11197,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
10831
11197
|
if (iconOnly) {
|
|
10832
11198
|
return null;
|
|
10833
11199
|
}
|
|
10834
|
-
return /* @__PURE__ */
|
|
11200
|
+
return /* @__PURE__ */ jsx258(
|
|
10835
11201
|
"g",
|
|
10836
11202
|
{
|
|
10837
11203
|
"data-testid": "ui-wistia-logo-logotype",
|
|
10838
11204
|
fill: logotypeColor,
|
|
10839
|
-
children: /* @__PURE__ */
|
|
11205
|
+
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
11206
|
}
|
|
10841
11207
|
);
|
|
10842
11208
|
};
|
|
@@ -10846,7 +11212,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
10846
11212
|
}
|
|
10847
11213
|
return "0 0 144 31.47";
|
|
10848
11214
|
};
|
|
10849
|
-
var WistiaLogoComponent =
|
|
11215
|
+
var WistiaLogoComponent = styled65.svg`
|
|
10850
11216
|
height: ${({ height }) => `${height}px`};
|
|
10851
11217
|
|
|
10852
11218
|
/* ensure it will always fit on mobile */
|
|
@@ -10862,12 +11228,12 @@ var WistiaLogoComponent = styled55.svg`
|
|
|
10862
11228
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
10863
11229
|
if ($opticallyCentered) {
|
|
10864
11230
|
if ($iconOnly) {
|
|
10865
|
-
return
|
|
11231
|
+
return css30`
|
|
10866
11232
|
aspect-ratio: 1;
|
|
10867
11233
|
padding: 11.85% 3.12% 13.91%;
|
|
10868
11234
|
`;
|
|
10869
11235
|
}
|
|
10870
|
-
return
|
|
11236
|
+
return css30`
|
|
10871
11237
|
aspect-ratio: 127 / 32;
|
|
10872
11238
|
`;
|
|
10873
11239
|
}
|
|
@@ -10904,7 +11270,7 @@ var WistiaLogo = ({
|
|
|
10904
11270
|
};
|
|
10905
11271
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
10906
11272
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
10907
|
-
const Logo = /* @__PURE__ */
|
|
11273
|
+
const Logo = /* @__PURE__ */ jsxs39(
|
|
10908
11274
|
WistiaLogoComponent,
|
|
10909
11275
|
{
|
|
10910
11276
|
$hoverColor: hoverColor,
|
|
@@ -10917,267 +11283,16 @@ var WistiaLogo = ({
|
|
|
10917
11283
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10918
11284
|
...otherProps,
|
|
10919
11285
|
children: [
|
|
10920
|
-
/* @__PURE__ */
|
|
10921
|
-
|
|
11286
|
+
/* @__PURE__ */ jsx258("title", { children: title }),
|
|
11287
|
+
isNotNil24(description) ? /* @__PURE__ */ jsx258("desc", { children: description }) : null,
|
|
10922
11288
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
10923
11289
|
renderLogotype(logotypeColor, iconOnly)
|
|
10924
11290
|
]
|
|
10925
11291
|
}
|
|
10926
11292
|
);
|
|
10927
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
11293
|
+
return href !== void 0 ? /* @__PURE__ */ jsx258("a", { href, children: Logo }) : Logo;
|
|
10928
11294
|
};
|
|
10929
11295
|
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
11296
|
export {
|
|
11182
11297
|
ActionButton,
|
|
11183
11298
|
Avatar,
|
|
@@ -11237,6 +11352,12 @@ export {
|
|
|
11237
11352
|
Stack,
|
|
11238
11353
|
SubMenu,
|
|
11239
11354
|
Tab,
|
|
11355
|
+
Table,
|
|
11356
|
+
TableBody,
|
|
11357
|
+
TableCell,
|
|
11358
|
+
TableFooter,
|
|
11359
|
+
TableHead,
|
|
11360
|
+
TableRow,
|
|
11240
11361
|
Tabs,
|
|
11241
11362
|
Tag,
|
|
11242
11363
|
Text,
|