@wistia/ui 0.1.2 → 0.2.1
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 +316 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +24 -26
- package/dist/index.d.ts +24 -26
- package/dist/index.mjs +324 -243
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.1
|
|
3
|
+
* @license @wistia/ui v0.2.1
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -6485,29 +6485,40 @@ Checkbox.displayName = "Checkbox";
|
|
|
6485
6485
|
// src/components/Divider/Divider.tsx
|
|
6486
6486
|
var import_styled_components29 = __toESM(require("styled-components"));
|
|
6487
6487
|
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
6488
|
-
var
|
|
6489
|
-
lg: 4,
|
|
6490
|
-
sm: 1
|
|
6491
|
-
};
|
|
6492
|
-
var DividerComponent = import_styled_components29.default.hr`
|
|
6493
|
-
background: none;
|
|
6494
|
-
border-bottom: none;
|
|
6495
|
-
border-left: none;
|
|
6496
|
-
border-right: none;
|
|
6488
|
+
var horizontalBorderCss = import_styled_components29.css`
|
|
6497
6489
|
border-top-color: var(--wui-color-border);
|
|
6498
6490
|
border-top-style: solid;
|
|
6499
|
-
border-top-width:
|
|
6500
|
-
clear: both;
|
|
6491
|
+
border-top-width: 1px;
|
|
6492
|
+
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
6501
6493
|
height: 0;
|
|
6502
|
-
line-height: 0;
|
|
6503
|
-
margin: 0;
|
|
6504
6494
|
`;
|
|
6505
|
-
var
|
|
6506
|
-
|
|
6495
|
+
var verticalBorderCss = import_styled_components29.css`
|
|
6496
|
+
background-color: var(--wui-color-border);
|
|
6497
|
+
max-width: 1px;
|
|
6498
|
+
min-height: 100%;
|
|
6499
|
+
width: 1px;
|
|
6500
|
+
`;
|
|
6501
|
+
var DividerComponent = import_styled_components29.default.div`
|
|
6502
|
+
${({ $orientation }) => {
|
|
6503
|
+
switch ($orientation) {
|
|
6504
|
+
case "vertical":
|
|
6505
|
+
return verticalBorderCss;
|
|
6506
|
+
case "horizontal":
|
|
6507
|
+
default:
|
|
6508
|
+
return horizontalBorderCss;
|
|
6509
|
+
}
|
|
6510
|
+
}}
|
|
6511
|
+
`;
|
|
6512
|
+
var Divider = ({
|
|
6513
|
+
orientation = "horizontal",
|
|
6514
|
+
...otherProps
|
|
6515
|
+
}) => {
|
|
6507
6516
|
return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
|
|
6508
6517
|
DividerComponent,
|
|
6509
6518
|
{
|
|
6510
|
-
$
|
|
6519
|
+
$orientation: orientation,
|
|
6520
|
+
"aria-orientation": orientation,
|
|
6521
|
+
role: "separator",
|
|
6511
6522
|
...otherProps
|
|
6512
6523
|
}
|
|
6513
6524
|
);
|
|
@@ -6528,10 +6539,6 @@ var StyledStack = import_styled_components30.default.div`
|
|
|
6528
6539
|
display: flex;
|
|
6529
6540
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
6530
6541
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
6531
|
-
|
|
6532
|
-
> * {
|
|
6533
|
-
flex: 1;
|
|
6534
|
-
}
|
|
6535
6542
|
`;
|
|
6536
6543
|
var StackComponent = (0, import_react16.forwardRef)(
|
|
6537
6544
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
@@ -7289,10 +7296,10 @@ var close = import_styled_components37.keyframes`
|
|
|
7289
7296
|
`;
|
|
7290
7297
|
var menuContentCss = import_styled_components37.css`
|
|
7291
7298
|
--menu-font-family: var(--wui-typography-family-default);
|
|
7292
|
-
--menu-bg: var(--wui-color-bg-
|
|
7299
|
+
--menu-bg: var(--wui-color-bg-surface);
|
|
7293
7300
|
--menu-shadow: 0 0 64px 0 rgba(0 0 0 / 8%); /* TODO - Need a box-shadow token */
|
|
7294
|
-
--menu-border-radius: var(--wui-border-radius-
|
|
7295
|
-
--menu-padding: var(--wui-space-
|
|
7301
|
+
--menu-border-radius: var(--wui-border-radius-02);
|
|
7302
|
+
--menu-padding: var(--wui-space-02);
|
|
7296
7303
|
--menu-min-width: 120px;
|
|
7297
7304
|
--menu-max-width: 284px;
|
|
7298
7305
|
|
|
@@ -7308,6 +7315,7 @@ var menuContentCss = import_styled_components37.css`
|
|
|
7308
7315
|
padding: var(--menu-padding);
|
|
7309
7316
|
transform-origin: var(--radix-dropdown-menu-content-transform-origin);
|
|
7310
7317
|
z-index: var(--wui-zindex-menu);
|
|
7318
|
+
border: 1px solid var(--wui-color-border);
|
|
7311
7319
|
|
|
7312
7320
|
&[data-state='closed'] {
|
|
7313
7321
|
animation: ${close}; /* TODO - need easing tokens */
|
|
@@ -7325,12 +7333,35 @@ var menuContentCss = import_styled_components37.css`
|
|
|
7325
7333
|
margin: var(--wui-space-02) 0;
|
|
7326
7334
|
}
|
|
7327
7335
|
`;
|
|
7336
|
+
var menuItemCss = import_styled_components37.css`
|
|
7337
|
+
--menu-label-description-gap: var(--wui-space-01);
|
|
7338
|
+
--menu-item-inner-gap: var(--wui-space-03);
|
|
7339
|
+
--menu-item-left-icon-size: 24px;
|
|
7340
|
+
--menu-item-right-icon-size: 16px;
|
|
7341
|
+
--menu-item-padding: var(--wui-space-02);
|
|
7342
|
+
--menu-label-font-size: var(--wui-typography-label-3-size);
|
|
7343
|
+
--menu-label-font-weight: var(--wui-typography-label-3-weight);
|
|
7344
|
+
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
7345
|
+
`;
|
|
7346
|
+
var compactMenuItemCss = import_styled_components37.css`
|
|
7347
|
+
--menu-label-description-gap: 0;
|
|
7348
|
+
--menu-item-inner-gap: var(--wui-space-02);
|
|
7349
|
+
--menu-item-left-icon-size: 16px;
|
|
7350
|
+
--menu-item-right-icon-size: 12px;
|
|
7351
|
+
--menu-item-padding: 6px;
|
|
7352
|
+
--menu-label-font-size: var(--wui-typography-label-4-size);
|
|
7353
|
+
--menu-label-font-weight: var(--wui-typography-label-4-weight);
|
|
7354
|
+
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
7355
|
+
`;
|
|
7328
7356
|
var MenuContent = (0, import_styled_components37.default)(import_react_dropdown_menu.DropdownMenuContent)`
|
|
7329
7357
|
${menuContentCss}
|
|
7358
|
+
${({ $compact }) => $compact ? compactMenuItemCss : menuItemCss}
|
|
7330
7359
|
`;
|
|
7331
7360
|
var Menu = ({
|
|
7332
7361
|
align = "start",
|
|
7333
7362
|
children,
|
|
7363
|
+
disabled = false,
|
|
7364
|
+
compact = false,
|
|
7334
7365
|
trigger,
|
|
7335
7366
|
label,
|
|
7336
7367
|
isOpen,
|
|
@@ -7339,16 +7370,26 @@ var Menu = ({
|
|
|
7339
7370
|
onInteractOutside,
|
|
7340
7371
|
...props
|
|
7341
7372
|
}) => {
|
|
7373
|
+
let controlProps = {
|
|
7374
|
+
...(0, import_type_guards22.isNotNil)(onOpenChange) && (0, import_type_guards22.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
7375
|
+
};
|
|
7376
|
+
if (disabled) {
|
|
7377
|
+
controlProps = {
|
|
7378
|
+
open: false,
|
|
7379
|
+
onOpenChange: () => null
|
|
7380
|
+
};
|
|
7381
|
+
}
|
|
7342
7382
|
return /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(
|
|
7343
7383
|
import_react_dropdown_menu.DropdownMenu,
|
|
7344
7384
|
{
|
|
7345
7385
|
modal: false,
|
|
7346
|
-
...
|
|
7386
|
+
...controlProps,
|
|
7347
7387
|
children: [
|
|
7348
7388
|
/* @__PURE__ */ (0, import_jsx_runtime184.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards22.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
7349
7389
|
Button,
|
|
7350
7390
|
{
|
|
7351
7391
|
"aria-expanded": isOpen,
|
|
7392
|
+
disabled,
|
|
7352
7393
|
forceState: isOpen ? "active" : void 0,
|
|
7353
7394
|
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(Icon, { type: "caret-down" }),
|
|
7354
7395
|
...triggerProps,
|
|
@@ -7359,11 +7400,12 @@ var Menu = ({
|
|
|
7359
7400
|
MenuContent,
|
|
7360
7401
|
{
|
|
7361
7402
|
...props,
|
|
7403
|
+
$compact: compact,
|
|
7362
7404
|
align,
|
|
7405
|
+
sideOffset: 6,
|
|
7363
7406
|
onFocusOutside: (event) => {
|
|
7364
7407
|
event.preventDefault();
|
|
7365
7408
|
},
|
|
7366
|
-
sideOffset: 6,
|
|
7367
7409
|
children
|
|
7368
7410
|
}
|
|
7369
7411
|
) })
|
|
@@ -7387,9 +7429,10 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
7387
7429
|
asChild: true,
|
|
7388
7430
|
...props,
|
|
7389
7431
|
children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
7390
|
-
|
|
7432
|
+
Heading,
|
|
7391
7433
|
{
|
|
7392
|
-
|
|
7434
|
+
renderAs: "span",
|
|
7435
|
+
variant: "heading6",
|
|
7393
7436
|
...props,
|
|
7394
7437
|
children
|
|
7395
7438
|
}
|
|
@@ -7403,6 +7446,7 @@ MenuLabel.displayName = "MenuLabel";
|
|
|
7403
7446
|
var import_react28 = require("react");
|
|
7404
7447
|
var import_styled_components41 = __toESM(require("styled-components"));
|
|
7405
7448
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
7449
|
+
var import_type_guards24 = require("@wistia/type-guards");
|
|
7406
7450
|
|
|
7407
7451
|
// src/components/Menu/MenuItemButton.tsx
|
|
7408
7452
|
var import_react27 = require("react");
|
|
@@ -7410,38 +7454,74 @@ var import_styled_components39 = __toESM(require("styled-components"));
|
|
|
7410
7454
|
var import_type_guards23 = require("@wistia/type-guards");
|
|
7411
7455
|
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
7412
7456
|
var StyledButton3 = (0, import_styled_components39.default)(Button)`
|
|
7413
|
-
|
|
7414
|
-
--menu-item-gap: var(--wui-space-01);
|
|
7415
|
-
--menu-item-inner-gap: var(--wui-space-04);
|
|
7416
|
-
--menu-item-disabled-bg: var(--wui-color-white);
|
|
7457
|
+
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
7417
7458
|
|
|
7418
|
-
text-align: left;
|
|
7419
|
-
align-items: left;
|
|
7420
|
-
border-radius: var(--menu-item-border-radius);
|
|
7421
7459
|
display: flex;
|
|
7460
|
+
flex-direction: row;
|
|
7461
|
+
gap: var(--menu-item-inner-gap);
|
|
7462
|
+
padding: var(--menu-item-padding);
|
|
7463
|
+
border-radius: var(--wui-border-radius-01);
|
|
7464
|
+
text-align: left;
|
|
7465
|
+
color: var(--wui-color-text);
|
|
7466
|
+
font-size: var(--menu-label-font-size);
|
|
7467
|
+
font-weight: var(--menu-label-font-weight);
|
|
7468
|
+
line-height: var(--menu-label-line-height);
|
|
7469
|
+
|
|
7470
|
+
:active {
|
|
7471
|
+
background-color: var(--wui-color-bg-surface-active);
|
|
7472
|
+
}
|
|
7473
|
+
|
|
7474
|
+
&[data-highlighted] {
|
|
7475
|
+
outline: none;
|
|
7476
|
+
${({ $isGated }) => $isGated && getColorScheme("purple")};
|
|
7477
|
+
background-color: var(--wui-color-bg-surface-hover);
|
|
7478
|
+
}
|
|
7422
7479
|
|
|
7423
7480
|
&[aria-disabled='true'] {
|
|
7424
|
-
|
|
7481
|
+
--wui-color-text: var(--wui-color-text-disabled);
|
|
7482
|
+
--wui-color-text-secondary: var(--wui-color-text-disabled);
|
|
7483
|
+
--wui-color-icon: var(--wui-color-icon-disabled);
|
|
7484
|
+
|
|
7485
|
+
&[data-highlighted] {
|
|
7486
|
+
background-color: transparent;
|
|
7487
|
+
}
|
|
7425
7488
|
}
|
|
7426
7489
|
|
|
7427
|
-
|
|
7490
|
+
&[role='menuitemradio'] {
|
|
7491
|
+
padding-left: var(--wui-space-04);
|
|
7492
|
+
}
|
|
7428
7493
|
`;
|
|
7429
|
-
var
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7494
|
+
var StyledLeftIconContainer = import_styled_components39.default.div`
|
|
7495
|
+
height: var(--menu-item-left-icon-size);
|
|
7496
|
+
width: var(--menu-item-left-icon-size);
|
|
7497
|
+
|
|
7498
|
+
svg {
|
|
7499
|
+
height: var(--menu-item-left-icon-size);
|
|
7500
|
+
width: var(--menu-item-left-icon-size);
|
|
7501
|
+
}
|
|
7502
|
+
`;
|
|
7503
|
+
var StyledRightIconContainer = import_styled_components39.default.div`
|
|
7504
|
+
height: var(--menu-item-right-icon-size);
|
|
7505
|
+
width: var(--menu-item-right-icon-size);
|
|
7506
|
+
|
|
7507
|
+
svg {
|
|
7508
|
+
height: var(--menu-item-right-icon-size);
|
|
7509
|
+
width: var(--menu-item-right-icon-size);
|
|
7510
|
+
}
|
|
7511
|
+
`;
|
|
7512
|
+
var StyledLabelAndDescriptionContainer = import_styled_components39.default.div`
|
|
7513
|
+
display: flex;
|
|
7514
|
+
flex-direction: column;
|
|
7515
|
+
gap: var(--menu-label-description-gap);
|
|
7516
|
+
flex-basis: 100%;
|
|
7437
7517
|
`;
|
|
7438
7518
|
var StyledBadgeContainer = import_styled_components39.default.div`
|
|
7439
|
-
grid-area: badge;
|
|
7440
7519
|
align-self: start;
|
|
7441
7520
|
justify-self: end;
|
|
7442
|
-
|
|
7521
|
+
font-size: var(--wui-typography-label-4-size);
|
|
7522
|
+
color: var(--wui-color-text-secondary);
|
|
7443
7523
|
`;
|
|
7444
|
-
var MenuItemButton = (0, import_react27.forwardRef)(({ children, appearance, command, ...props }, ref) => {
|
|
7524
|
+
var MenuItemButton = (0, import_react27.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
7445
7525
|
let { colorScheme, badge } = props;
|
|
7446
7526
|
if (appearance === "dangerous") {
|
|
7447
7527
|
if ((0, import_type_guards23.isNotUndefined)(colorScheme)) {
|
|
@@ -7450,13 +7530,19 @@ var MenuItemButton = (0, import_react27.forwardRef)(({ children, appearance, com
|
|
|
7450
7530
|
colorScheme = "error";
|
|
7451
7531
|
}
|
|
7452
7532
|
if (appearance === "gated") {
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7533
|
+
badge = /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
7534
|
+
Icon,
|
|
7535
|
+
{
|
|
7536
|
+
colorScheme: "purple",
|
|
7537
|
+
style: {
|
|
7538
|
+
height: "16px",
|
|
7539
|
+
width: "16px"
|
|
7540
|
+
},
|
|
7541
|
+
type: "sparkle"
|
|
7542
|
+
}
|
|
7543
|
+
);
|
|
7458
7544
|
}
|
|
7459
|
-
return /* @__PURE__ */ (0, import_jsx_runtime186.
|
|
7545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
|
|
7460
7546
|
StyledButton3,
|
|
7461
7547
|
{
|
|
7462
7548
|
...props,
|
|
@@ -7464,11 +7550,13 @@ var MenuItemButton = (0, import_react27.forwardRef)(({ children, appearance, com
|
|
|
7464
7550
|
$isGated: appearance === "gated",
|
|
7465
7551
|
colorScheme: colorScheme ?? "default",
|
|
7466
7552
|
fullWidth: true,
|
|
7467
|
-
|
|
7468
|
-
children:
|
|
7469
|
-
children,
|
|
7470
|
-
|
|
7471
|
-
|
|
7553
|
+
unstyled: true,
|
|
7554
|
+
children: [
|
|
7555
|
+
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
7556
|
+
/* @__PURE__ */ (0, import_jsx_runtime186.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
7557
|
+
(0, import_type_guards23.isNotNil)(badge) || (0, import_type_guards23.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
7558
|
+
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
7559
|
+
]
|
|
7472
7560
|
}
|
|
7473
7561
|
);
|
|
7474
7562
|
});
|
|
@@ -7477,16 +7565,11 @@ MenuItemButton.displayName = "MenuItemButton";
|
|
|
7477
7565
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
7478
7566
|
var import_styled_components40 = __toESM(require("styled-components"));
|
|
7479
7567
|
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
7480
|
-
var StyledMenuItemLabel =
|
|
7481
|
-
grid-area: label;
|
|
7482
|
-
`;
|
|
7568
|
+
var StyledMenuItemLabel = import_styled_components40.default.span``;
|
|
7483
7569
|
var StyledMenuItemDescription = (0, import_styled_components40.default)(Text).attrs({
|
|
7484
|
-
variant: "
|
|
7570
|
+
variant: "body4",
|
|
7485
7571
|
prominence: "secondary"
|
|
7486
|
-
})
|
|
7487
|
-
margin-top: var(--menu-item-gap);
|
|
7488
|
-
grid-area: description;
|
|
7489
|
-
`;
|
|
7572
|
+
})``;
|
|
7490
7573
|
var MenuItemLabel = ({ children }) => {
|
|
7491
7574
|
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(StyledMenuItemLabel, { children });
|
|
7492
7575
|
};
|
|
@@ -7512,7 +7595,7 @@ var StyledSubTrigger = (0, import_styled_components41.default)(import_react_drop
|
|
|
7512
7595
|
|
|
7513
7596
|
&[data-state='open'],
|
|
7514
7597
|
&[data-highlighted] {
|
|
7515
|
-
background-color: var(--
|
|
7598
|
+
background-color: var(--wui-color-bg-surface-hover);
|
|
7516
7599
|
}
|
|
7517
7600
|
`;
|
|
7518
7601
|
var SubMenuTrigger = (props) => {
|
|
@@ -7538,7 +7621,7 @@ var SubMenu = ({
|
|
|
7538
7621
|
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
7539
7622
|
/* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
7540
7623
|
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(MenuItemLabel, { children: label }),
|
|
7541
|
-
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(MenuItemDescription, { children: description })
|
|
7624
|
+
(0, import_type_guards24.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(MenuItemDescription, { children: description }) : null
|
|
7542
7625
|
] }),
|
|
7543
7626
|
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(SubMenuContent, { children }) })
|
|
7544
7627
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
@@ -7617,6 +7700,7 @@ var RadioMenuItem = ({
|
|
|
7617
7700
|
import_react_dropdown_menu6.DropdownMenuRadioItem,
|
|
7618
7701
|
{
|
|
7619
7702
|
...extraProps,
|
|
7703
|
+
asChild: true,
|
|
7620
7704
|
value,
|
|
7621
7705
|
children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
7622
7706
|
MenuItemButton,
|
|
@@ -7639,30 +7723,23 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
7639
7723
|
{
|
|
7640
7724
|
...props,
|
|
7641
7725
|
fill: "none",
|
|
7642
|
-
height: "
|
|
7643
|
-
viewBox: "0 0
|
|
7644
|
-
width: "
|
|
7726
|
+
height: "24",
|
|
7727
|
+
viewBox: "0 0 24 24",
|
|
7728
|
+
width: "24",
|
|
7645
7729
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7646
7730
|
children: [
|
|
7647
7731
|
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
7648
7732
|
"path",
|
|
7649
7733
|
{
|
|
7650
|
-
d: "
|
|
7651
|
-
fill: "#
|
|
7652
|
-
}
|
|
7653
|
-
),
|
|
7654
|
-
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
7655
|
-
"path",
|
|
7656
|
-
{
|
|
7657
|
-
d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z",
|
|
7658
|
-
stroke: "#D9D9DE"
|
|
7734
|
+
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",
|
|
7735
|
+
fill: "#2949e5"
|
|
7659
7736
|
}
|
|
7660
7737
|
),
|
|
7661
7738
|
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
7662
7739
|
"path",
|
|
7663
7740
|
{
|
|
7664
|
-
d: "
|
|
7665
|
-
fill: "
|
|
7741
|
+
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",
|
|
7742
|
+
fill: "#fff"
|
|
7666
7743
|
}
|
|
7667
7744
|
)
|
|
7668
7745
|
]
|
|
@@ -7672,23 +7749,23 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
7672
7749
|
{
|
|
7673
7750
|
...props,
|
|
7674
7751
|
fill: "none",
|
|
7675
|
-
height: "
|
|
7676
|
-
viewBox: "0 0
|
|
7677
|
-
width: "
|
|
7752
|
+
height: "24",
|
|
7753
|
+
viewBox: "0 0 24 24",
|
|
7754
|
+
width: "24",
|
|
7678
7755
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7679
7756
|
children: [
|
|
7680
7757
|
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
7681
7758
|
"path",
|
|
7682
7759
|
{
|
|
7683
|
-
d: "
|
|
7684
|
-
fill: "#
|
|
7760
|
+
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",
|
|
7761
|
+
fill: "#fcfcfd"
|
|
7685
7762
|
}
|
|
7686
7763
|
),
|
|
7687
7764
|
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
7688
7765
|
"path",
|
|
7689
7766
|
{
|
|
7690
|
-
d: "
|
|
7691
|
-
stroke: "#
|
|
7767
|
+
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",
|
|
7768
|
+
stroke: "#bbbbc4"
|
|
7692
7769
|
}
|
|
7693
7770
|
)
|
|
7694
7771
|
]
|
|
@@ -7704,6 +7781,7 @@ var CheckboxMenuItem = ({
|
|
|
7704
7781
|
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
7705
7782
|
import_react_dropdown_menu7.DropdownMenuCheckboxItem,
|
|
7706
7783
|
{
|
|
7784
|
+
asChild: true,
|
|
7707
7785
|
checked,
|
|
7708
7786
|
onCheckedChange,
|
|
7709
7787
|
onSelect,
|
|
@@ -7720,10 +7798,10 @@ var CheckboxMenuItem = ({
|
|
|
7720
7798
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
7721
7799
|
|
|
7722
7800
|
// src/components/Modal/Modal.tsx
|
|
7723
|
-
var
|
|
7724
|
-
var
|
|
7725
|
-
var
|
|
7726
|
-
var
|
|
7801
|
+
var import_react33 = require("react");
|
|
7802
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
7803
|
+
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
7804
|
+
var import_type_guards27 = require("@wistia/type-guards");
|
|
7727
7805
|
|
|
7728
7806
|
// src/components/Modal/ModalHeader.tsx
|
|
7729
7807
|
var import_styled_components44 = __toESM(require("styled-components"));
|
|
@@ -7750,7 +7828,7 @@ var ModalCloseButton = () => {
|
|
|
7750
7828
|
|
|
7751
7829
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7752
7830
|
var import_styled_components43 = __toESM(require("styled-components"));
|
|
7753
|
-
var
|
|
7831
|
+
var import_type_guards25 = require("@wistia/type-guards");
|
|
7754
7832
|
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
7755
7833
|
var VisuallyHidden = import_styled_components43.default.div({ ...visuallyHiddenStyle });
|
|
7756
7834
|
var VisuallyHiddenButFocusable = import_styled_components43.default.div({
|
|
@@ -7762,7 +7840,7 @@ var ScreenReaderOnly = ({
|
|
|
7762
7840
|
focusable = false,
|
|
7763
7841
|
...otherProps
|
|
7764
7842
|
}) => {
|
|
7765
|
-
const accessibleText = (0,
|
|
7843
|
+
const accessibleText = (0, import_type_guards25.isNotNil)(text) ? text : children;
|
|
7766
7844
|
if (focusable) {
|
|
7767
7845
|
return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7768
7846
|
}
|
|
@@ -7802,70 +7880,22 @@ var ModalHeader = ({
|
|
|
7802
7880
|
] });
|
|
7803
7881
|
};
|
|
7804
7882
|
|
|
7805
|
-
// src/
|
|
7806
|
-
var
|
|
7883
|
+
// src/components/Modal/ModalContent.tsx
|
|
7884
|
+
var import_react31 = require("react");
|
|
7807
7885
|
var import_styled_components45 = __toESM(require("styled-components"));
|
|
7808
|
-
var
|
|
7809
|
-
var backdropAnimationDuration = 150;
|
|
7810
|
-
var alignVerticalMap = {
|
|
7811
|
-
stretch: "normal",
|
|
7812
|
-
top: "start",
|
|
7813
|
-
center: "center",
|
|
7814
|
-
bottom: "end"
|
|
7815
|
-
};
|
|
7816
|
-
var alignHorizontalMap = {
|
|
7817
|
-
left: "start",
|
|
7818
|
-
center: "center",
|
|
7819
|
-
right: "end"
|
|
7820
|
-
};
|
|
7821
|
-
var BackdropComponent = import_styled_components45.default.div`
|
|
7822
|
-
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
7823
|
-
animation-name: backdropShow;
|
|
7824
|
-
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
7825
|
-
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
7826
|
-
background: var(--wui-color-backdrop);
|
|
7827
|
-
display: flex;
|
|
7828
|
-
inset: 0;
|
|
7829
|
-
justify-content: ${({ $alignHorizontal }) => alignHorizontalMap[$alignHorizontal]};
|
|
7830
|
-
overflow-y: auto;
|
|
7831
|
-
position: fixed;
|
|
7832
|
-
z-index: var(--wui-zindex-backdrop);
|
|
7833
|
-
|
|
7834
|
-
@keyframes backdropShow {
|
|
7835
|
-
from {
|
|
7836
|
-
opacity: 0;
|
|
7837
|
-
}
|
|
7838
|
-
|
|
7839
|
-
to {
|
|
7840
|
-
opacity: 1;
|
|
7841
|
-
}
|
|
7842
|
-
}
|
|
7843
|
-
`;
|
|
7844
|
-
var Backdrop = (0, import_react30.forwardRef)(
|
|
7845
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7846
|
-
BackdropComponent,
|
|
7847
|
-
{
|
|
7848
|
-
ref,
|
|
7849
|
-
$alignHorizontal: alignHorizontal,
|
|
7850
|
-
$alignVertical: alignVertical,
|
|
7851
|
-
...otherProps,
|
|
7852
|
-
children
|
|
7853
|
-
}
|
|
7854
|
-
)
|
|
7855
|
-
);
|
|
7856
|
-
Backdrop.displayName = "Backdrop";
|
|
7886
|
+
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
7857
7887
|
|
|
7858
7888
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
7859
|
-
var
|
|
7860
|
-
var
|
|
7889
|
+
var import_react30 = require("react");
|
|
7890
|
+
var import_type_guards26 = require("@wistia/type-guards");
|
|
7861
7891
|
var useFocusRestore = () => {
|
|
7862
|
-
const previouslyFocusedRef = (0,
|
|
7863
|
-
(0,
|
|
7892
|
+
const previouslyFocusedRef = (0, import_react30.useRef)(null);
|
|
7893
|
+
(0, import_react30.useEffect)(() => {
|
|
7864
7894
|
previouslyFocusedRef.current = document.activeElement;
|
|
7865
7895
|
}, []);
|
|
7866
|
-
(0,
|
|
7896
|
+
(0, import_react30.useEffect)(() => {
|
|
7867
7897
|
return () => {
|
|
7868
|
-
if ((0,
|
|
7898
|
+
if ((0, import_type_guards26.isNotNil)(previouslyFocusedRef.current)) {
|
|
7869
7899
|
setTimeout(() => {
|
|
7870
7900
|
previouslyFocusedRef.current?.focus();
|
|
7871
7901
|
}, 0);
|
|
@@ -7874,9 +7904,9 @@ var useFocusRestore = () => {
|
|
|
7874
7904
|
}, []);
|
|
7875
7905
|
};
|
|
7876
7906
|
|
|
7877
|
-
// src/components/Modal/
|
|
7878
|
-
var
|
|
7879
|
-
var StyledModalContent = (0,
|
|
7907
|
+
// src/components/Modal/ModalContent.tsx
|
|
7908
|
+
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
7909
|
+
var StyledModalContent = (0, import_styled_components45.default)(import_react_dialog3.Content)`
|
|
7880
7910
|
background-color: var(--wui-color-bg-app);
|
|
7881
7911
|
box-sizing: border-box;
|
|
7882
7912
|
display: flex;
|
|
@@ -7916,10 +7946,10 @@ var StyledModalContent = (0, import_styled_components46.default)(import_react_di
|
|
|
7916
7946
|
}
|
|
7917
7947
|
}
|
|
7918
7948
|
`;
|
|
7919
|
-
var ModalContent = (0,
|
|
7949
|
+
var ModalContent = (0, import_react31.forwardRef)(
|
|
7920
7950
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
7921
7951
|
useFocusRestore();
|
|
7922
|
-
return /* @__PURE__ */ (0,
|
|
7952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7923
7953
|
StyledModalContent,
|
|
7924
7954
|
{
|
|
7925
7955
|
ref,
|
|
@@ -7931,13 +7961,68 @@ var ModalContent = (0, import_react32.forwardRef)(
|
|
|
7931
7961
|
);
|
|
7932
7962
|
}
|
|
7933
7963
|
);
|
|
7934
|
-
|
|
7935
|
-
|
|
7964
|
+
|
|
7965
|
+
// src/private/components/Backdrop/Backdrop.tsx
|
|
7966
|
+
var import_react32 = require("react");
|
|
7967
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
7968
|
+
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
7969
|
+
var backdropAnimationDuration = 150;
|
|
7970
|
+
var alignVerticalMap = {
|
|
7971
|
+
stretch: "normal",
|
|
7972
|
+
top: "start",
|
|
7973
|
+
center: "center",
|
|
7974
|
+
bottom: "end"
|
|
7975
|
+
};
|
|
7976
|
+
var alignHorizontalMap = {
|
|
7977
|
+
left: "start",
|
|
7978
|
+
center: "center",
|
|
7979
|
+
right: "end"
|
|
7980
|
+
};
|
|
7981
|
+
var BackdropComponent = import_styled_components46.default.div`
|
|
7982
|
+
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
7983
|
+
animation-name: backdropShow;
|
|
7984
|
+
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
7985
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
7986
|
+
background: var(--wui-color-backdrop);
|
|
7987
|
+
display: flex;
|
|
7988
|
+
inset: 0;
|
|
7989
|
+
justify-content: ${({ $alignHorizontal }) => alignHorizontalMap[$alignHorizontal]};
|
|
7990
|
+
overflow-y: auto;
|
|
7991
|
+
position: fixed;
|
|
7992
|
+
z-index: var(--wui-zindex-backdrop);
|
|
7993
|
+
|
|
7994
|
+
@keyframes backdropShow {
|
|
7995
|
+
from {
|
|
7996
|
+
opacity: 0;
|
|
7997
|
+
}
|
|
7998
|
+
|
|
7999
|
+
to {
|
|
8000
|
+
opacity: 1;
|
|
8001
|
+
}
|
|
8002
|
+
}
|
|
8003
|
+
`;
|
|
8004
|
+
var Backdrop = (0, import_react32.forwardRef)(
|
|
8005
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
8006
|
+
BackdropComponent,
|
|
8007
|
+
{
|
|
8008
|
+
ref,
|
|
8009
|
+
$alignHorizontal: alignHorizontal,
|
|
8010
|
+
$alignVertical: alignVertical,
|
|
8011
|
+
...otherProps,
|
|
8012
|
+
children
|
|
8013
|
+
}
|
|
8014
|
+
)
|
|
8015
|
+
);
|
|
8016
|
+
Backdrop.displayName = "Backdrop";
|
|
8017
|
+
|
|
8018
|
+
// src/components/Modal/Modal.tsx
|
|
8019
|
+
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
8020
|
+
var ModalBody = import_styled_components47.default.div`
|
|
7936
8021
|
flex-direction: column;
|
|
7937
8022
|
display: flex;
|
|
7938
8023
|
order: 2;
|
|
7939
8024
|
`;
|
|
7940
|
-
var Modal = (0,
|
|
8025
|
+
var Modal = (0, import_react33.forwardRef)(
|
|
7941
8026
|
({
|
|
7942
8027
|
children,
|
|
7943
8028
|
fullHeight = false,
|
|
@@ -7950,25 +8035,25 @@ var Modal = (0, import_react32.forwardRef)(
|
|
|
7950
8035
|
width,
|
|
7951
8036
|
...props
|
|
7952
8037
|
}, ref) => {
|
|
7953
|
-
return /* @__PURE__ */ (0,
|
|
7954
|
-
|
|
8038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
8039
|
+
import_react_dialog4.Root,
|
|
7955
8040
|
{
|
|
7956
8041
|
onOpenChange: (open2) => {
|
|
7957
|
-
if (!open2 && (0,
|
|
8042
|
+
if (!open2 && (0, import_type_guards27.isNotNil)(onRequestClose)) {
|
|
7958
8043
|
onRequestClose();
|
|
7959
8044
|
}
|
|
7960
8045
|
},
|
|
7961
8046
|
open: isOpen,
|
|
7962
|
-
children: /* @__PURE__ */ (0,
|
|
7963
|
-
/* @__PURE__ */ (0,
|
|
7964
|
-
/* @__PURE__ */ (0,
|
|
8047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_react_dialog4.Portal, { children: [
|
|
8048
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(Backdrop, {}),
|
|
8049
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
7965
8050
|
ModalContent,
|
|
7966
8051
|
{
|
|
7967
8052
|
ref,
|
|
7968
8053
|
"aria-describedby": void 0,
|
|
7969
8054
|
fullHeight,
|
|
7970
8055
|
onOpenAutoFocus: (event) => {
|
|
7971
|
-
if ((0,
|
|
8056
|
+
if ((0, import_type_guards27.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
7972
8057
|
event.preventDefault();
|
|
7973
8058
|
requestAnimationFrame(() => {
|
|
7974
8059
|
initialFocusRef.current?.focus();
|
|
@@ -7978,8 +8063,8 @@ var Modal = (0, import_react32.forwardRef)(
|
|
|
7978
8063
|
width,
|
|
7979
8064
|
...props,
|
|
7980
8065
|
children: [
|
|
7981
|
-
/* @__PURE__ */ (0,
|
|
7982
|
-
/* @__PURE__ */ (0,
|
|
8066
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ModalBody, { children }),
|
|
8067
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
7983
8068
|
ModalHeader,
|
|
7984
8069
|
{
|
|
7985
8070
|
hideCloseButton,
|
|
@@ -7998,16 +8083,16 @@ var Modal = (0, import_react32.forwardRef)(
|
|
|
7998
8083
|
Modal.displayName = "Modal";
|
|
7999
8084
|
|
|
8000
8085
|
// src/components/Radio/Radio.tsx
|
|
8001
|
-
var
|
|
8002
|
-
var
|
|
8003
|
-
var
|
|
8004
|
-
var
|
|
8005
|
-
var StyledLabelWrapper2 =
|
|
8086
|
+
var import_react34 = require("react");
|
|
8087
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
8088
|
+
var import_type_guards28 = require("@wistia/type-guards");
|
|
8089
|
+
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
8090
|
+
var StyledLabelWrapper2 = import_styled_components48.default.div`
|
|
8006
8091
|
display: flex;
|
|
8007
8092
|
flex-direction: column;
|
|
8008
8093
|
padding-left: var(--wui-space-02);
|
|
8009
8094
|
`;
|
|
8010
|
-
var StyledRadio =
|
|
8095
|
+
var StyledRadio = import_styled_components48.default.input`
|
|
8011
8096
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
8012
8097
|
appearance: none;
|
|
8013
8098
|
margin: 0;
|
|
@@ -8033,11 +8118,11 @@ var StyledRadio = import_styled_components47.default.input`
|
|
|
8033
8118
|
transform: scale(1);
|
|
8034
8119
|
}
|
|
8035
8120
|
`;
|
|
8036
|
-
var disabledStyle2 =
|
|
8121
|
+
var disabledStyle2 = import_styled_components48.css`
|
|
8037
8122
|
cursor: not-allowed;
|
|
8038
8123
|
opacity: 0.5;
|
|
8039
8124
|
`;
|
|
8040
|
-
var errorStyle =
|
|
8125
|
+
var errorStyle = import_styled_components48.css`
|
|
8041
8126
|
/* TODO Lamp to design error state */
|
|
8042
8127
|
&:hover,
|
|
8043
8128
|
&:focus,
|
|
@@ -8045,11 +8130,11 @@ var errorStyle = import_styled_components47.css`
|
|
|
8045
8130
|
border-color: transparent !important;
|
|
8046
8131
|
}
|
|
8047
8132
|
`;
|
|
8048
|
-
var defaultHoverStyle =
|
|
8133
|
+
var defaultHoverStyle = import_styled_components48.css`
|
|
8049
8134
|
/* TODO Lamp to design hover state */
|
|
8050
8135
|
cursor: pointer;
|
|
8051
8136
|
`;
|
|
8052
|
-
var StyledRadioWrapper =
|
|
8137
|
+
var StyledRadioWrapper = import_styled_components48.default.div`
|
|
8053
8138
|
align-items: baseline;
|
|
8054
8139
|
border: 1px solid transparent;
|
|
8055
8140
|
border-radius: 4px;
|
|
@@ -8072,7 +8157,7 @@ var StyledRadioWrapper = import_styled_components47.default.div`
|
|
|
8072
8157
|
|
|
8073
8158
|
${({ disabled }) => disabled && disabledStyle2};
|
|
8074
8159
|
`;
|
|
8075
|
-
var Radio = (0,
|
|
8160
|
+
var Radio = (0, import_react34.forwardRef)(
|
|
8076
8161
|
({
|
|
8077
8162
|
checked,
|
|
8078
8163
|
disabled = false,
|
|
@@ -8085,15 +8170,15 @@ var Radio = (0, import_react33.forwardRef)(
|
|
|
8085
8170
|
value = "false",
|
|
8086
8171
|
...otherProps
|
|
8087
8172
|
}, ref) => {
|
|
8088
|
-
const generatedId = (0,
|
|
8089
|
-
const computedId = (0,
|
|
8090
|
-
return /* @__PURE__ */ (0,
|
|
8173
|
+
const generatedId = (0, import_react34.useId)();
|
|
8174
|
+
const computedId = (0, import_type_guards28.isNonEmptyString)(id) ? id : `ui-radio-${generatedId}`;
|
|
8175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(
|
|
8091
8176
|
StyledRadioWrapper,
|
|
8092
8177
|
{
|
|
8093
8178
|
"aria-invalid": otherProps["aria-invalid"],
|
|
8094
8179
|
disabled,
|
|
8095
8180
|
children: [
|
|
8096
|
-
/* @__PURE__ */ (0,
|
|
8181
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
8097
8182
|
StyledRadio,
|
|
8098
8183
|
{
|
|
8099
8184
|
ref,
|
|
@@ -8108,8 +8193,8 @@ var Radio = (0, import_react33.forwardRef)(
|
|
|
8108
8193
|
...otherProps
|
|
8109
8194
|
}
|
|
8110
8195
|
),
|
|
8111
|
-
/* @__PURE__ */ (0,
|
|
8112
|
-
/* @__PURE__ */ (0,
|
|
8196
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(StyledLabelWrapper2, { children: [
|
|
8197
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
8113
8198
|
Label,
|
|
8114
8199
|
{
|
|
8115
8200
|
disabled,
|
|
@@ -8118,7 +8203,7 @@ var Radio = (0, import_react33.forwardRef)(
|
|
|
8118
8203
|
children: label
|
|
8119
8204
|
}
|
|
8120
8205
|
),
|
|
8121
|
-
/* @__PURE__ */ (0,
|
|
8206
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)(LabelDescription, { children: description })
|
|
8122
8207
|
] })
|
|
8123
8208
|
]
|
|
8124
8209
|
}
|
|
@@ -8128,11 +8213,11 @@ var Radio = (0, import_react33.forwardRef)(
|
|
|
8128
8213
|
Radio.displayName = "Radio";
|
|
8129
8214
|
|
|
8130
8215
|
// src/components/Tag/Tag.tsx
|
|
8131
|
-
var
|
|
8132
|
-
var
|
|
8133
|
-
var
|
|
8134
|
-
var
|
|
8135
|
-
var TagLabel =
|
|
8216
|
+
var import_react35 = require("react");
|
|
8217
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
8218
|
+
var import_type_guards29 = require("@wistia/type-guards");
|
|
8219
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
8220
|
+
var TagLabel = import_styled_components49.default.a`
|
|
8136
8221
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8137
8222
|
font-size: var(--wui-typography-label-4-size);
|
|
8138
8223
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -8160,14 +8245,14 @@ var TagLabel = import_styled_components48.default.a`
|
|
|
8160
8245
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8161
8246
|
}
|
|
8162
8247
|
`;
|
|
8163
|
-
var TagDivider =
|
|
8248
|
+
var TagDivider = import_styled_components49.default.div`
|
|
8164
8249
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8165
8250
|
border-left: 1px solid var(--wui-color-border);
|
|
8166
8251
|
display: flex;
|
|
8167
8252
|
height: 14px;
|
|
8168
8253
|
width: 1px;
|
|
8169
8254
|
`;
|
|
8170
|
-
var StyledRemoveButton =
|
|
8255
|
+
var StyledRemoveButton = import_styled_components49.default.button`
|
|
8171
8256
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8172
8257
|
all: unset;
|
|
8173
8258
|
cursor: pointer;
|
|
@@ -8195,7 +8280,7 @@ var StyledRemoveButton = import_styled_components48.default.button`
|
|
|
8195
8280
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8196
8281
|
}
|
|
8197
8282
|
`;
|
|
8198
|
-
var StyledTag =
|
|
8283
|
+
var StyledTag = import_styled_components49.default.div`
|
|
8199
8284
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8200
8285
|
align-items: center;
|
|
8201
8286
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -8204,47 +8289,47 @@ var StyledTag = import_styled_components48.default.div`
|
|
|
8204
8289
|
overflow: hidden;
|
|
8205
8290
|
`;
|
|
8206
8291
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
8207
|
-
if ((0,
|
|
8292
|
+
if ((0, import_type_guards29.isNil)(onClickRemove)) {
|
|
8208
8293
|
return null;
|
|
8209
8294
|
}
|
|
8210
|
-
if ((0,
|
|
8295
|
+
if ((0, import_type_guards29.isNil)(onClickRemoveLabel)) {
|
|
8211
8296
|
throw new Error(
|
|
8212
8297
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
8213
8298
|
);
|
|
8214
8299
|
}
|
|
8215
|
-
return /* @__PURE__ */ (0,
|
|
8216
|
-
/* @__PURE__ */ (0,
|
|
8217
|
-
/* @__PURE__ */ (0,
|
|
8300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
|
|
8301
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
8302
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(
|
|
8218
8303
|
StyledRemoveButton,
|
|
8219
8304
|
{
|
|
8220
8305
|
$colorScheme: colorScheme,
|
|
8221
8306
|
onClick: onClickRemove,
|
|
8222
8307
|
type: "button",
|
|
8223
8308
|
children: [
|
|
8224
|
-
/* @__PURE__ */ (0,
|
|
8309
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8225
8310
|
Icon,
|
|
8226
8311
|
{
|
|
8227
8312
|
size: "sm",
|
|
8228
8313
|
type: "close"
|
|
8229
8314
|
}
|
|
8230
8315
|
),
|
|
8231
|
-
/* @__PURE__ */ (0,
|
|
8316
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
8232
8317
|
]
|
|
8233
8318
|
}
|
|
8234
8319
|
)
|
|
8235
8320
|
] });
|
|
8236
8321
|
};
|
|
8237
|
-
var Tag = (0,
|
|
8322
|
+
var Tag = (0, import_react35.forwardRef)(
|
|
8238
8323
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
8239
|
-
const labelProps = (0,
|
|
8240
|
-
return /* @__PURE__ */ (0,
|
|
8324
|
+
const labelProps = (0, import_type_guards29.isNotNil)(href) && (0, import_type_guards29.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
8325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(
|
|
8241
8326
|
StyledTag,
|
|
8242
8327
|
{
|
|
8243
8328
|
ref,
|
|
8244
8329
|
$colorScheme: colorScheme,
|
|
8245
8330
|
...otherProps,
|
|
8246
8331
|
children: [
|
|
8247
|
-
/* @__PURE__ */ (0,
|
|
8332
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8248
8333
|
TagLabel,
|
|
8249
8334
|
{
|
|
8250
8335
|
...labelProps,
|
|
@@ -8252,7 +8337,7 @@ var Tag = (0, import_react34.forwardRef)(
|
|
|
8252
8337
|
children: label
|
|
8253
8338
|
}
|
|
8254
8339
|
),
|
|
8255
|
-
/* @__PURE__ */ (0,
|
|
8340
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8256
8341
|
RemoveButton,
|
|
8257
8342
|
{
|
|
8258
8343
|
colorScheme,
|
|
@@ -8269,16 +8354,16 @@ Tag.displayName = "Tag";
|
|
|
8269
8354
|
|
|
8270
8355
|
// src/components/Tooltip/Tooltip.tsx
|
|
8271
8356
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8272
|
-
var
|
|
8273
|
-
var
|
|
8274
|
-
var CompactTooltipStyles =
|
|
8357
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
8358
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
8359
|
+
var CompactTooltipStyles = import_styled_components50.css`
|
|
8275
8360
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8276
8361
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8277
8362
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8278
8363
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8279
8364
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8280
8365
|
`;
|
|
8281
|
-
var StyledContent = (0,
|
|
8366
|
+
var StyledContent = (0, import_styled_components50.default)(import_react_tooltip2.Content)`
|
|
8282
8367
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8283
8368
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8284
8369
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8336,14 +8421,14 @@ var Tooltip = ({
|
|
|
8336
8421
|
if (forceOpen === true) {
|
|
8337
8422
|
rootProps.open = true;
|
|
8338
8423
|
}
|
|
8339
|
-
return /* @__PURE__ */ (0,
|
|
8424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
|
|
8340
8425
|
import_react_tooltip2.Root,
|
|
8341
8426
|
{
|
|
8342
8427
|
delayDuration: delay,
|
|
8343
8428
|
...rootProps,
|
|
8344
8429
|
children: [
|
|
8345
|
-
/* @__PURE__ */ (0,
|
|
8346
|
-
/* @__PURE__ */ (0,
|
|
8430
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
8431
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
|
|
8347
8432
|
StyledContent,
|
|
8348
8433
|
{
|
|
8349
8434
|
$compact: compact,
|
|
@@ -8351,7 +8436,7 @@ var Tooltip = ({
|
|
|
8351
8436
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8352
8437
|
children: [
|
|
8353
8438
|
content,
|
|
8354
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
8439
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
8355
8440
|
"svg",
|
|
8356
8441
|
{
|
|
8357
8442
|
fill: "var(--tooltip-bg)",
|
|
@@ -8360,7 +8445,7 @@ var Tooltip = ({
|
|
|
8360
8445
|
viewBox: "0 0 12 8",
|
|
8361
8446
|
width: "12",
|
|
8362
8447
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8363
|
-
children: /* @__PURE__ */ (0,
|
|
8448
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
8364
8449
|
}
|
|
8365
8450
|
) }) : null
|
|
8366
8451
|
]
|
|
@@ -8373,26 +8458,26 @@ var Tooltip = ({
|
|
|
8373
8458
|
Tooltip.displayName = "Tooltip";
|
|
8374
8459
|
|
|
8375
8460
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
8376
|
-
var
|
|
8377
|
-
var
|
|
8378
|
-
var
|
|
8461
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
8462
|
+
var import_type_guards30 = require("@wistia/type-guards");
|
|
8463
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
8379
8464
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
8380
8465
|
if (iconOnly) {
|
|
8381
|
-
return /* @__PURE__ */ (0,
|
|
8466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
8382
8467
|
"g",
|
|
8383
8468
|
{
|
|
8384
8469
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8385
8470
|
fill: brandmarkColor,
|
|
8386
|
-
children: /* @__PURE__ */ (0,
|
|
8471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
8387
8472
|
}
|
|
8388
8473
|
);
|
|
8389
8474
|
}
|
|
8390
|
-
return /* @__PURE__ */ (0,
|
|
8475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
8391
8476
|
"g",
|
|
8392
8477
|
{
|
|
8393
8478
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8394
8479
|
fill: brandmarkColor,
|
|
8395
|
-
children: /* @__PURE__ */ (0,
|
|
8480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
8396
8481
|
}
|
|
8397
8482
|
);
|
|
8398
8483
|
};
|
|
@@ -8400,12 +8485,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
8400
8485
|
if (iconOnly) {
|
|
8401
8486
|
return null;
|
|
8402
8487
|
}
|
|
8403
|
-
return /* @__PURE__ */ (0,
|
|
8488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
8404
8489
|
"g",
|
|
8405
8490
|
{
|
|
8406
8491
|
"data-testid": "ui-wistia-logo-logotype",
|
|
8407
8492
|
fill: logotypeColor,
|
|
8408
|
-
children: /* @__PURE__ */ (0,
|
|
8493
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
|
|
8409
8494
|
}
|
|
8410
8495
|
);
|
|
8411
8496
|
};
|
|
@@ -8415,7 +8500,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
8415
8500
|
}
|
|
8416
8501
|
return "0 0 144 31.47";
|
|
8417
8502
|
};
|
|
8418
|
-
var WistiaLogoComponent =
|
|
8503
|
+
var WistiaLogoComponent = import_styled_components51.default.svg`
|
|
8419
8504
|
height: ${({ height }) => `${height}px`};
|
|
8420
8505
|
|
|
8421
8506
|
/* ensure it will always fit on mobile */
|
|
@@ -8457,7 +8542,7 @@ var WistiaLogo = ({
|
|
|
8457
8542
|
};
|
|
8458
8543
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
8459
8544
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
8460
|
-
const Logo = /* @__PURE__ */ (0,
|
|
8545
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(
|
|
8461
8546
|
WistiaLogoComponent,
|
|
8462
8547
|
{
|
|
8463
8548
|
$hoverColor: hoverColor,
|
|
@@ -8467,14 +8552,14 @@ var WistiaLogo = ({
|
|
|
8467
8552
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8468
8553
|
...otherProps,
|
|
8469
8554
|
children: [
|
|
8470
|
-
/* @__PURE__ */ (0,
|
|
8471
|
-
(0,
|
|
8555
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)("title", { children: title }),
|
|
8556
|
+
(0, import_type_guards30.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("desc", { children: description }) : null,
|
|
8472
8557
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
8473
8558
|
renderLogotype(logotypeColor, iconOnly)
|
|
8474
8559
|
]
|
|
8475
8560
|
}
|
|
8476
8561
|
);
|
|
8477
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
8562
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("a", { href, children: Logo }) : Logo;
|
|
8478
8563
|
};
|
|
8479
8564
|
WistiaLogo.displayName = "WistiaLogo";
|
|
8480
8565
|
// Annotate the CommonJS export names for ESM import in node:
|