@wistia/ui 0.4.8-beta.25eae1b2.b10e708 → 0.4.8-beta.2b6f4638.29587ac
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 +127 -226
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +38 -95
- package/dist/index.d.ts +38 -95
- package/dist/index.mjs +170 -268
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.4.8-beta.
|
|
3
|
+
* @license @wistia/ui v0.4.8-beta.2b6f4638.29587ac
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -5360,7 +5360,7 @@ import { forwardRef } from "react";
|
|
|
5360
5360
|
import { isNil as isNil4, isNotNil as isNotNil4, isNotUndefined as isNotUndefined2, isUndefined as isUndefined2 } from "@wistia/type-guards";
|
|
5361
5361
|
import styled4 from "styled-components";
|
|
5362
5362
|
import { Link as RouterLink, useInRouterContext } from "react-router-dom";
|
|
5363
|
-
import { jsx as jsx161
|
|
5363
|
+
import { jsx as jsx161 } from "react/jsx-runtime";
|
|
5364
5364
|
var generateHref = (href, type, disabled) => {
|
|
5365
5365
|
if (disabled || isNil4(href)) {
|
|
5366
5366
|
return void 0;
|
|
@@ -5377,25 +5377,12 @@ var generateHref = (href, type, disabled) => {
|
|
|
5377
5377
|
var isButton = (props) => isUndefined2(props.href);
|
|
5378
5378
|
var isLink = (props) => isNotUndefined2(props.href);
|
|
5379
5379
|
var StyledLink = styled4.a`
|
|
5380
|
-
--link-icon-size: 14px;
|
|
5381
|
-
|
|
5382
5380
|
${({ href }) => isNil4(href) && buttonResetCss};
|
|
5383
5381
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
5384
5382
|
cursor: pointer;
|
|
5385
5383
|
font-family: var(--wui-typography-family-default);
|
|
5386
5384
|
color: var(--wui-color-text-link);
|
|
5387
5385
|
text-decoration: ${({ $underline }) => $underline ? "underline" : "none"};
|
|
5388
|
-
display: inline-flex;
|
|
5389
|
-
align-items: baseline;
|
|
5390
|
-
gap: var(--wui-space-01);
|
|
5391
|
-
|
|
5392
|
-
/* This ensure that the icon is the corect color when the style is solid or the button is disabled */
|
|
5393
|
-
&& {
|
|
5394
|
-
svg {
|
|
5395
|
-
width: var(--link-icon-size);
|
|
5396
|
-
height: var(--link-icon-size);
|
|
5397
|
-
}
|
|
5398
|
-
}
|
|
5399
5386
|
`;
|
|
5400
5387
|
var Link = forwardRef(
|
|
5401
5388
|
({
|
|
@@ -5405,8 +5392,6 @@ var Link = forwardRef(
|
|
|
5405
5392
|
disabled = false,
|
|
5406
5393
|
colorScheme = "inherit",
|
|
5407
5394
|
underline = false,
|
|
5408
|
-
leftIcon,
|
|
5409
|
-
rightIcon,
|
|
5410
5395
|
...props
|
|
5411
5396
|
}, ref) => {
|
|
5412
5397
|
const inRouterContext = useInRouterContext();
|
|
@@ -5465,17 +5450,13 @@ var Link = forwardRef(
|
|
|
5465
5450
|
to: to ?? "",
|
|
5466
5451
|
children
|
|
5467
5452
|
}
|
|
5468
|
-
) : /* @__PURE__ */
|
|
5453
|
+
) : /* @__PURE__ */ jsx161(
|
|
5469
5454
|
StyledLink,
|
|
5470
5455
|
{
|
|
5471
5456
|
as: "a",
|
|
5472
5457
|
...combinedProps,
|
|
5473
5458
|
href: to,
|
|
5474
|
-
children
|
|
5475
|
-
leftIcon ?? null,
|
|
5476
|
-
children,
|
|
5477
|
-
rightIcon ?? null
|
|
5478
|
-
]
|
|
5459
|
+
children
|
|
5479
5460
|
}
|
|
5480
5461
|
);
|
|
5481
5462
|
}
|
|
@@ -5485,7 +5466,7 @@ var Link = forwardRef(
|
|
|
5485
5466
|
Link.displayName = "Link";
|
|
5486
5467
|
|
|
5487
5468
|
// src/components/Button/Button.tsx
|
|
5488
|
-
import { Fragment, jsx as jsx162, jsxs as
|
|
5469
|
+
import { Fragment, jsx as jsx162, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
5489
5470
|
var isLink2 = (props) => isNotUndefined3(props.href);
|
|
5490
5471
|
var StyledButton = styled5.button`
|
|
5491
5472
|
${buttonResetCss}
|
|
@@ -5522,9 +5503,9 @@ var ButtonContent = ({
|
|
|
5522
5503
|
rightIcon,
|
|
5523
5504
|
children
|
|
5524
5505
|
}) => {
|
|
5525
|
-
return /* @__PURE__ */
|
|
5506
|
+
return /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
5526
5507
|
isLoading ? /* @__PURE__ */ jsx162(StyledButtonLoading, { children: /* @__PURE__ */ jsx162(Icon, { type: "spinner" }) }) : null,
|
|
5527
|
-
/* @__PURE__ */
|
|
5508
|
+
/* @__PURE__ */ jsxs5(
|
|
5528
5509
|
StyledButtonContent,
|
|
5529
5510
|
{
|
|
5530
5511
|
$hasLeftIcon: isNotNil5(leftIcon),
|
|
@@ -5624,7 +5605,7 @@ var Button = forwardRef2(
|
|
|
5624
5605
|
Button.displayName = "Button";
|
|
5625
5606
|
|
|
5626
5607
|
// src/components/ActionButton/ActionButton.tsx
|
|
5627
|
-
import { jsx as jsx163, jsxs as
|
|
5608
|
+
import { jsx as jsx163, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
5628
5609
|
var StyledActionButton = styled6(Button)`
|
|
5629
5610
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
5630
5611
|
display: grid;
|
|
@@ -5729,7 +5710,7 @@ var ActionButton = forwardRef3(
|
|
|
5729
5710
|
"menu-up": "caret-up",
|
|
5730
5711
|
"menu-down": "caret-down"
|
|
5731
5712
|
};
|
|
5732
|
-
return /* @__PURE__ */
|
|
5713
|
+
return /* @__PURE__ */ jsxs6(
|
|
5733
5714
|
StyledActionButton,
|
|
5734
5715
|
{
|
|
5735
5716
|
...props,
|
|
@@ -5933,7 +5914,7 @@ Avatar.displayName = "Avatar";
|
|
|
5933
5914
|
import { forwardRef as forwardRef4 } from "react";
|
|
5934
5915
|
import styled9 from "styled-components";
|
|
5935
5916
|
import { isNotNil as isNotNil6 } from "@wistia/type-guards";
|
|
5936
|
-
import { jsx as jsx166, jsxs as
|
|
5917
|
+
import { jsx as jsx166, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
5937
5918
|
var StyledBadge = styled9.div`
|
|
5938
5919
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
5939
5920
|
align-items: center;
|
|
@@ -5948,7 +5929,7 @@ var StyledBadge = styled9.div`
|
|
|
5948
5929
|
padding: var(--wui-space-01) var(--wui-space-02);
|
|
5949
5930
|
width: fit-content;
|
|
5950
5931
|
|
|
5951
|
-
/*
|
|
5932
|
+
/* TODO should these be a token? */
|
|
5952
5933
|
svg {
|
|
5953
5934
|
height: 12px;
|
|
5954
5935
|
width: 12px;
|
|
@@ -5957,7 +5938,7 @@ var StyledBadge = styled9.div`
|
|
|
5957
5938
|
var Badge = forwardRef4(
|
|
5958
5939
|
({ colorScheme = "inherit", label, icon, ...otherProps }, ref) => {
|
|
5959
5940
|
const hasIcon = isNotNil6(icon);
|
|
5960
|
-
return /* @__PURE__ */
|
|
5941
|
+
return /* @__PURE__ */ jsxs7(
|
|
5961
5942
|
StyledBadge,
|
|
5962
5943
|
{
|
|
5963
5944
|
ref,
|
|
@@ -6125,9 +6106,9 @@ var Breadcrumbs = ({ children, ...props }) => {
|
|
|
6125
6106
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
6126
6107
|
|
|
6127
6108
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
6128
|
-
import { Fragment as Fragment2, jsx as jsx169, jsxs as
|
|
6109
|
+
import { Fragment as Fragment2, jsx as jsx169, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
6129
6110
|
var Breadcrumb = ({ icon, href, children, ...props }) => {
|
|
6130
|
-
return /* @__PURE__ */
|
|
6111
|
+
return /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
6131
6112
|
/* @__PURE__ */ jsx169(
|
|
6132
6113
|
Button,
|
|
6133
6114
|
{
|
|
@@ -6467,7 +6448,7 @@ var LabelDescription = ({
|
|
|
6467
6448
|
LabelDescription.displayName = "LabelDescription";
|
|
6468
6449
|
|
|
6469
6450
|
// src/components/Checkbox/Checkbox.tsx
|
|
6470
|
-
import { jsx as jsx175, jsxs as
|
|
6451
|
+
import { jsx as jsx175, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
6471
6452
|
var CheckIcon = () => /* @__PURE__ */ jsx175(
|
|
6472
6453
|
"svg",
|
|
6473
6454
|
{
|
|
@@ -6557,7 +6538,7 @@ var Checkbox = forwardRef6(
|
|
|
6557
6538
|
}, ref) => {
|
|
6558
6539
|
const generatedId = useId();
|
|
6559
6540
|
const computedId = isNonEmptyString2(id) ? id : `wistia-ui-checkbox-group-${generatedId}`;
|
|
6560
|
-
return /* @__PURE__ */
|
|
6541
|
+
return /* @__PURE__ */ jsxs9(StyledCheckboxWrapper, { children: [
|
|
6561
6542
|
/* @__PURE__ */ jsx175(
|
|
6562
6543
|
StyledCheckboxRoot,
|
|
6563
6544
|
{
|
|
@@ -6586,7 +6567,7 @@ var Checkbox = forwardRef6(
|
|
|
6586
6567
|
children: /* @__PURE__ */ jsx175(StyledCheckboxIndicator, { children: /* @__PURE__ */ jsx175(CheckIcon, {}) })
|
|
6587
6568
|
}
|
|
6588
6569
|
),
|
|
6589
|
-
/* @__PURE__ */
|
|
6570
|
+
/* @__PURE__ */ jsxs9(StyledLabelWrapper, { children: [
|
|
6590
6571
|
/* @__PURE__ */ jsx175(
|
|
6591
6572
|
Label,
|
|
6592
6573
|
{
|
|
@@ -6810,7 +6791,7 @@ var useFormState = (action, initialData = {}) => {
|
|
|
6810
6791
|
// src/components/Form/FormErrorSummary.tsx
|
|
6811
6792
|
import { useContext as useContext2, useRef as useRef4 } from "react";
|
|
6812
6793
|
import { isArray, isNotUndefined as isNotUndefined5 } from "@wistia/type-guards";
|
|
6813
|
-
import { jsx as jsx179, jsxs as
|
|
6794
|
+
import { jsx as jsx179, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
6814
6795
|
var ErrorItem = ({ name, error, formId }) => {
|
|
6815
6796
|
return /* @__PURE__ */ jsx179("li", { children: /* @__PURE__ */ jsx179(Link, { href: `${formId}-${name}`, children: error }) }, name);
|
|
6816
6797
|
};
|
|
@@ -6821,7 +6802,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
6821
6802
|
if (isValid || !hasSubmitted) {
|
|
6822
6803
|
return null;
|
|
6823
6804
|
}
|
|
6824
|
-
return /* @__PURE__ */
|
|
6805
|
+
return /* @__PURE__ */ jsxs10("div", { ref, children: [
|
|
6825
6806
|
/* @__PURE__ */ jsx179("p", { children: description }),
|
|
6826
6807
|
/* @__PURE__ */ jsx179("ul", { children: Object.entries(errors).filter(([, error]) => isNotUndefined5(error)).map(
|
|
6827
6808
|
([name, error]) => isArray(error) ? error.map((err) => /* @__PURE__ */ jsx179(
|
|
@@ -7033,7 +7014,7 @@ import { createContext as createContext3, useMemo as useMemo5 } from "react";
|
|
|
7033
7014
|
// src/components/FormGroup/FormGroup.tsx
|
|
7034
7015
|
import styled22 from "styled-components";
|
|
7035
7016
|
import { useRef as useRef5 } from "react";
|
|
7036
|
-
import { jsx as jsx181, jsxs as
|
|
7017
|
+
import { jsx as jsx181, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
7037
7018
|
var StyledFieldset = styled22.fieldset`
|
|
7038
7019
|
border: 0;
|
|
7039
7020
|
`;
|
|
@@ -7042,7 +7023,7 @@ var StyledLegend = styled22.legend`
|
|
|
7042
7023
|
`;
|
|
7043
7024
|
var FormGroup = ({ children, label, ...props }) => {
|
|
7044
7025
|
const ref = useRef5();
|
|
7045
|
-
return /* @__PURE__ */
|
|
7026
|
+
return /* @__PURE__ */ jsxs11(
|
|
7046
7027
|
Stack,
|
|
7047
7028
|
{
|
|
7048
7029
|
...props,
|
|
@@ -7085,7 +7066,7 @@ var CheckboxGroup = ({
|
|
|
7085
7066
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
7086
7067
|
|
|
7087
7068
|
// src/components/FormField/FormField.tsx
|
|
7088
|
-
import { jsx as jsx183, jsxs as
|
|
7069
|
+
import { jsx as jsx183, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
7089
7070
|
var StyledFormField = styled23.div`
|
|
7090
7071
|
--form-field-spacing: var(--wui-space-01);
|
|
7091
7072
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -7171,7 +7152,7 @@ var FormField = ({
|
|
|
7171
7152
|
};
|
|
7172
7153
|
}
|
|
7173
7154
|
Children2.only(children);
|
|
7174
|
-
return /* @__PURE__ */
|
|
7155
|
+
return /* @__PURE__ */ jsxs12(StyledFormField, { ...props, children: [
|
|
7175
7156
|
!isInlineLabel && /* @__PURE__ */ jsx183(Label, { htmlFor: id, children: label }),
|
|
7176
7157
|
cloneElement3(children, childProps),
|
|
7177
7158
|
isNotNil8(computedError) ? /* @__PURE__ */ jsx183(
|
|
@@ -7248,7 +7229,7 @@ IconButton.displayName = "IconButton";
|
|
|
7248
7229
|
import { forwardRef as forwardRef11, cloneElement as cloneElement5, useRef as useRef6 } from "react";
|
|
7249
7230
|
import styled25, { css as css19 } from "styled-components";
|
|
7250
7231
|
import { isNil as isNil10, isNotNil as isNotNil9 } from "@wistia/type-guards";
|
|
7251
|
-
import { jsx as jsx186, jsxs as
|
|
7232
|
+
import { jsx as jsx186, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7252
7233
|
var inputStyles = css19`
|
|
7253
7234
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
7254
7235
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -7376,7 +7357,7 @@ var Input = forwardRef11(
|
|
|
7376
7357
|
});
|
|
7377
7358
|
}
|
|
7378
7359
|
};
|
|
7379
|
-
return /* @__PURE__ */
|
|
7360
|
+
return /* @__PURE__ */ jsxs13(
|
|
7380
7361
|
StyledInputContainer,
|
|
7381
7362
|
{
|
|
7382
7363
|
$fullWidth: fullWidth,
|
|
@@ -7424,7 +7405,7 @@ var MenuContext = createContext5({ compact: false });
|
|
|
7424
7405
|
var useMenuContext = () => useContext4(MenuContext);
|
|
7425
7406
|
|
|
7426
7407
|
// src/components/Menu/Menu.tsx
|
|
7427
|
-
import { jsx as jsx187, jsxs as
|
|
7408
|
+
import { jsx as jsx187, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
7428
7409
|
var open = keyframes`
|
|
7429
7410
|
from {
|
|
7430
7411
|
opacity: 0;
|
|
@@ -7534,7 +7515,7 @@ var Menu = ({
|
|
|
7534
7515
|
onOpenChange: () => null
|
|
7535
7516
|
};
|
|
7536
7517
|
}
|
|
7537
|
-
return /* @__PURE__ */ jsx187(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */
|
|
7518
|
+
return /* @__PURE__ */ jsx187(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs14(
|
|
7538
7519
|
DropdownMenu,
|
|
7539
7520
|
{
|
|
7540
7521
|
modal: false,
|
|
@@ -7614,7 +7595,7 @@ import { isNotNil as isNotNil12 } from "@wistia/type-guards";
|
|
|
7614
7595
|
import { forwardRef as forwardRef12 } from "react";
|
|
7615
7596
|
import styled28 from "styled-components";
|
|
7616
7597
|
import { isNotNil as isNotNil11, isNotUndefined as isNotUndefined8 } from "@wistia/type-guards";
|
|
7617
|
-
import { jsx as jsx189, jsxs as
|
|
7598
|
+
import { jsx as jsx189, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
7618
7599
|
var StyledButton3 = styled28(Button)`
|
|
7619
7600
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
7620
7601
|
|
|
@@ -7704,7 +7685,7 @@ var MenuItemButton = forwardRef12(({ children, appearance, command, icon, ...pro
|
|
|
7704
7685
|
}
|
|
7705
7686
|
);
|
|
7706
7687
|
}
|
|
7707
|
-
return /* @__PURE__ */
|
|
7688
|
+
return /* @__PURE__ */ jsxs15(
|
|
7708
7689
|
StyledButton3,
|
|
7709
7690
|
{
|
|
7710
7691
|
...props,
|
|
@@ -7740,7 +7721,7 @@ var MenuItemDescription = ({ children }) => {
|
|
|
7740
7721
|
};
|
|
7741
7722
|
|
|
7742
7723
|
// src/components/Menu/SubMenu.tsx
|
|
7743
|
-
import { jsx as jsx191, jsxs as
|
|
7724
|
+
import { jsx as jsx191, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
7744
7725
|
var SubMenuContent = styled30(DropdownMenuSubContent)`
|
|
7745
7726
|
${menuContentCss}
|
|
7746
7727
|
|
|
@@ -7780,14 +7761,14 @@ var SubMenu = ({
|
|
|
7780
7761
|
const { isSmAndUp } = useMq();
|
|
7781
7762
|
const [isExpanded, setIsExpanded] = useState7(false);
|
|
7782
7763
|
const { compact } = useMenuContext();
|
|
7783
|
-
return isSmAndUp ? /* @__PURE__ */
|
|
7784
|
-
/* @__PURE__ */
|
|
7764
|
+
return isSmAndUp ? /* @__PURE__ */ jsxs16(DropdownMenuSub, { onOpenChange, children: [
|
|
7765
|
+
/* @__PURE__ */ jsxs16(SubMenuTrigger, { ...props, children: [
|
|
7785
7766
|
/* @__PURE__ */ jsx191(MenuItemLabel, { children: label }),
|
|
7786
7767
|
isNotNil12(description) ? /* @__PURE__ */ jsx191(MenuItemDescription, { children: description }) : null
|
|
7787
7768
|
] }),
|
|
7788
7769
|
/* @__PURE__ */ jsx191(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx191(SubMenuContent, { $compact: compact, children }) })
|
|
7789
|
-
] }) : /* @__PURE__ */
|
|
7790
|
-
/* @__PURE__ */
|
|
7770
|
+
] }) : /* @__PURE__ */ jsxs16(DropdownMenuGroup, { children: [
|
|
7771
|
+
/* @__PURE__ */ jsxs16(
|
|
7791
7772
|
SubMenuTrigger,
|
|
7792
7773
|
{
|
|
7793
7774
|
...props,
|
|
@@ -7835,9 +7816,9 @@ MenuItem.displayName = "MenuItem";
|
|
|
7835
7816
|
import {
|
|
7836
7817
|
DropdownMenuRadioGroup
|
|
7837
7818
|
} from "@radix-ui/react-dropdown-menu";
|
|
7838
|
-
import { jsx as jsx193, jsxs as
|
|
7819
|
+
import { jsx as jsx193, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7839
7820
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
7840
|
-
return /* @__PURE__ */
|
|
7821
|
+
return /* @__PURE__ */ jsxs17(DropdownMenuRadioGroup, { ...props, children: [
|
|
7841
7822
|
/* @__PURE__ */ jsx193(MenuLabel, { children: label }),
|
|
7842
7823
|
children
|
|
7843
7824
|
] });
|
|
@@ -7885,9 +7866,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
7885
7866
|
import {
|
|
7886
7867
|
DropdownMenuCheckboxItem
|
|
7887
7868
|
} from "@radix-ui/react-dropdown-menu";
|
|
7888
|
-
import { jsx as jsx195, jsxs as
|
|
7869
|
+
import { jsx as jsx195, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7889
7870
|
var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
7890
|
-
return checked ? /* @__PURE__ */
|
|
7871
|
+
return checked ? /* @__PURE__ */ jsxs18(
|
|
7891
7872
|
"svg",
|
|
7892
7873
|
{
|
|
7893
7874
|
...props,
|
|
@@ -7913,7 +7894,7 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
7913
7894
|
)
|
|
7914
7895
|
]
|
|
7915
7896
|
}
|
|
7916
|
-
) : /* @__PURE__ */
|
|
7897
|
+
) : /* @__PURE__ */ jsxs18(
|
|
7917
7898
|
"svg",
|
|
7918
7899
|
{
|
|
7919
7900
|
...props,
|
|
@@ -8018,7 +7999,7 @@ var ScreenReaderOnly = ({
|
|
|
8018
7999
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
8019
8000
|
|
|
8020
8001
|
// src/components/Modal/ModalHeader.tsx
|
|
8021
|
-
import { jsx as jsx198, jsxs as
|
|
8002
|
+
import { jsx as jsx198, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
8022
8003
|
var Header = styled33.header`
|
|
8023
8004
|
display: flex;
|
|
8024
8005
|
order: 1;
|
|
@@ -8043,7 +8024,7 @@ var ModalHeader = ({
|
|
|
8043
8024
|
hideCloseButton
|
|
8044
8025
|
}) => {
|
|
8045
8026
|
const TitleWrapper = hideTitle ? ScreenReaderOnly : Title;
|
|
8046
|
-
return /* @__PURE__ */
|
|
8027
|
+
return /* @__PURE__ */ jsxs19(Header, { children: [
|
|
8047
8028
|
/* @__PURE__ */ jsx198(TitleWrapper, { children: title }),
|
|
8048
8029
|
hideCloseButton ? null : /* @__PURE__ */ jsx198(ModalCloseButton, {})
|
|
8049
8030
|
] });
|
|
@@ -8185,7 +8166,7 @@ var Backdrop = forwardRef15(
|
|
|
8185
8166
|
Backdrop.displayName = "Backdrop";
|
|
8186
8167
|
|
|
8187
8168
|
// src/components/Modal/Modal.tsx
|
|
8188
|
-
import { jsx as jsx201, jsxs as
|
|
8169
|
+
import { jsx as jsx201, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
8189
8170
|
var ModalBody = styled36.div`
|
|
8190
8171
|
flex-direction: column;
|
|
8191
8172
|
display: flex;
|
|
@@ -8213,9 +8194,9 @@ var Modal = forwardRef16(
|
|
|
8213
8194
|
}
|
|
8214
8195
|
},
|
|
8215
8196
|
open: isOpen,
|
|
8216
|
-
children: /* @__PURE__ */
|
|
8197
|
+
children: /* @__PURE__ */ jsxs20(DialogPortal, { children: [
|
|
8217
8198
|
/* @__PURE__ */ jsx201(Backdrop, {}),
|
|
8218
|
-
/* @__PURE__ */
|
|
8199
|
+
/* @__PURE__ */ jsxs20(
|
|
8219
8200
|
ModalContent,
|
|
8220
8201
|
{
|
|
8221
8202
|
ref,
|
|
@@ -8255,7 +8236,7 @@ Modal.displayName = "Modal";
|
|
|
8255
8236
|
import { forwardRef as forwardRef17, useId as useId3 } from "react";
|
|
8256
8237
|
import styled37, { css as css21 } from "styled-components";
|
|
8257
8238
|
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
8258
|
-
import { jsx as jsx202, jsxs as
|
|
8239
|
+
import { jsx as jsx202, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8259
8240
|
var StyledLabelWrapper2 = styled37.div`
|
|
8260
8241
|
display: flex;
|
|
8261
8242
|
flex-direction: column;
|
|
@@ -8341,7 +8322,7 @@ var Radio = forwardRef17(
|
|
|
8341
8322
|
}, ref) => {
|
|
8342
8323
|
const generatedId = useId3();
|
|
8343
8324
|
const computedId = isNonEmptyString3(id) ? id : `ui-radio-${generatedId}`;
|
|
8344
|
-
return /* @__PURE__ */
|
|
8325
|
+
return /* @__PURE__ */ jsxs21(
|
|
8345
8326
|
StyledRadioWrapper,
|
|
8346
8327
|
{
|
|
8347
8328
|
"aria-invalid": otherProps["aria-invalid"],
|
|
@@ -8362,7 +8343,7 @@ var Radio = forwardRef17(
|
|
|
8362
8343
|
...otherProps
|
|
8363
8344
|
}
|
|
8364
8345
|
),
|
|
8365
|
-
/* @__PURE__ */
|
|
8346
|
+
/* @__PURE__ */ jsxs21(StyledLabelWrapper2, { children: [
|
|
8366
8347
|
/* @__PURE__ */ jsx202(
|
|
8367
8348
|
Label,
|
|
8368
8349
|
{
|
|
@@ -8381,143 +8362,12 @@ var Radio = forwardRef17(
|
|
|
8381
8362
|
);
|
|
8382
8363
|
Radio.displayName = "Radio";
|
|
8383
8364
|
|
|
8384
|
-
// src/components/
|
|
8365
|
+
// src/components/Tag/Tag.tsx
|
|
8385
8366
|
import { forwardRef as forwardRef18 } from "react";
|
|
8386
8367
|
import styled38 from "styled-components";
|
|
8387
|
-
import {
|
|
8388
|
-
import {
|
|
8389
|
-
|
|
8390
|
-
var StyledSegmentedControl = styled38(ToggleGroupRoot)`
|
|
8391
|
-
display: inline-flex;
|
|
8392
|
-
background-color: var(--wui-color-bg-surface-secondary);
|
|
8393
|
-
border-radius: var(--wui-border-radius-rounded);
|
|
8394
|
-
border: 2px solid var(--wui-color-bg-surface-secondary);
|
|
8395
|
-
gap: var(--wui-space-01);
|
|
8396
|
-
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
8397
|
-
`;
|
|
8398
|
-
var SegmentedControl = forwardRef18(
|
|
8399
|
-
({
|
|
8400
|
-
children,
|
|
8401
|
-
disabled = false,
|
|
8402
|
-
fullWidth = false,
|
|
8403
|
-
selectedValue,
|
|
8404
|
-
onSelectedValueChange,
|
|
8405
|
-
...props
|
|
8406
|
-
}, ref) => {
|
|
8407
|
-
if (isNil11(children)) {
|
|
8408
|
-
return null;
|
|
8409
|
-
}
|
|
8410
|
-
return /* @__PURE__ */ jsx203(
|
|
8411
|
-
StyledSegmentedControl,
|
|
8412
|
-
{
|
|
8413
|
-
ref,
|
|
8414
|
-
$fullWidth: fullWidth,
|
|
8415
|
-
disabled,
|
|
8416
|
-
loop: true,
|
|
8417
|
-
onValueChange: onSelectedValueChange,
|
|
8418
|
-
rovingFocus: true,
|
|
8419
|
-
type: "single",
|
|
8420
|
-
value: selectedValue,
|
|
8421
|
-
...props,
|
|
8422
|
-
children
|
|
8423
|
-
}
|
|
8424
|
-
);
|
|
8425
|
-
}
|
|
8426
|
-
);
|
|
8427
|
-
SegmentedControl.displayName = "SegmentedControl";
|
|
8428
|
-
|
|
8429
|
-
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
8430
|
-
import { forwardRef as forwardRef19 } from "react";
|
|
8431
|
-
import styled39 from "styled-components";
|
|
8432
|
-
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
8433
|
-
import { isNotNil as isNotNil16 } from "@wistia/type-guards";
|
|
8434
|
-
import { jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8435
|
-
var StyledSegmentedControlItem = styled39(ToggleGroupItem)`
|
|
8436
|
-
all: unset; /* ToggleGroupItem is a button element */
|
|
8437
|
-
align-items: center;
|
|
8438
|
-
border-radius: var(--wui-border-radius-rounded);
|
|
8439
|
-
color: var(--wui-color-text-secondary);
|
|
8440
|
-
cursor: pointer;
|
|
8441
|
-
display: flex;
|
|
8442
|
-
flex-grow: 1;
|
|
8443
|
-
flex-shrink: 1;
|
|
8444
|
-
font-size: var(--wui-typography-label-3-size);
|
|
8445
|
-
justify-content: center;
|
|
8446
|
-
padding: 6px 8px;
|
|
8447
|
-
user-select: none;
|
|
8448
|
-
|
|
8449
|
-
/* Icon component */
|
|
8450
|
-
svg {
|
|
8451
|
-
height: 16px;
|
|
8452
|
-
width: 16px;
|
|
8453
|
-
|
|
8454
|
-
/* add right margin if there's a label and an icon */
|
|
8455
|
-
${({ $hasLabel }) => $hasLabel ? "margin-right: var(--wui-space-01)" : ""}
|
|
8456
|
-
}
|
|
8457
|
-
|
|
8458
|
-
&:hover {
|
|
8459
|
-
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
8460
|
-
}
|
|
8461
|
-
|
|
8462
|
-
&:focus-visible {
|
|
8463
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
8464
|
-
}
|
|
8465
|
-
|
|
8466
|
-
&[data-state='on'] {
|
|
8467
|
-
background-color: var(--wui-color-bg-fill-white);
|
|
8468
|
-
color: var(--wui-color-text-selected);
|
|
8469
|
-
cursor: default;
|
|
8470
|
-
}
|
|
8471
|
-
|
|
8472
|
-
&:focus-visible,
|
|
8473
|
-
&[data-state='on'] {
|
|
8474
|
-
svg path {
|
|
8475
|
-
fill: var(--wui-color-focus-ring);
|
|
8476
|
-
}
|
|
8477
|
-
}
|
|
8478
|
-
|
|
8479
|
-
&[data-disabled] {
|
|
8480
|
-
cursor: not-allowed;
|
|
8481
|
-
|
|
8482
|
-
&:hover {
|
|
8483
|
-
background-color: inherit;
|
|
8484
|
-
}
|
|
8485
|
-
}
|
|
8486
|
-
`;
|
|
8487
|
-
var SegmentedControlItem = forwardRef19(
|
|
8488
|
-
({ disabled, icon, label, "aria-label": ariaLabel, value }, ref) => {
|
|
8489
|
-
const handleClick = (event) => {
|
|
8490
|
-
const target = event.target;
|
|
8491
|
-
const { state } = target.dataset;
|
|
8492
|
-
if (state === "on") {
|
|
8493
|
-
event.preventDefault();
|
|
8494
|
-
}
|
|
8495
|
-
};
|
|
8496
|
-
return /* @__PURE__ */ jsxs23(
|
|
8497
|
-
StyledSegmentedControlItem,
|
|
8498
|
-
{
|
|
8499
|
-
ref,
|
|
8500
|
-
$hasLabel: isNotNil16(label),
|
|
8501
|
-
"aria-label": isNotNil16(label) ? void 0 : ariaLabel,
|
|
8502
|
-
disabled,
|
|
8503
|
-
onClick: handleClick,
|
|
8504
|
-
value,
|
|
8505
|
-
children: [
|
|
8506
|
-
icon,
|
|
8507
|
-
label
|
|
8508
|
-
]
|
|
8509
|
-
}
|
|
8510
|
-
);
|
|
8511
|
-
}
|
|
8512
|
-
);
|
|
8513
|
-
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
8514
|
-
|
|
8515
|
-
// src/components/Tag/Tag.tsx
|
|
8516
|
-
import { forwardRef as forwardRef20 } from "react";
|
|
8517
|
-
import styled40 from "styled-components";
|
|
8518
|
-
import { isNil as isNil12, isNotNil as isNotNil17, isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
8519
|
-
import { Fragment as Fragment3, jsx as jsx204, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8520
|
-
var TagLabel = styled40.a`
|
|
8368
|
+
import { isNil as isNil11, isNotNil as isNotNil16, isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
8369
|
+
import { Fragment as Fragment3, jsx as jsx203, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
8370
|
+
var TagLabel = styled38.a`
|
|
8521
8371
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8522
8372
|
font-size: var(--wui-typography-label-4-size);
|
|
8523
8373
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -8545,14 +8395,14 @@ var TagLabel = styled40.a`
|
|
|
8545
8395
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8546
8396
|
}
|
|
8547
8397
|
`;
|
|
8548
|
-
var TagDivider =
|
|
8398
|
+
var TagDivider = styled38.div`
|
|
8549
8399
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8550
8400
|
border-left: 1px solid var(--wui-color-border);
|
|
8551
8401
|
display: flex;
|
|
8552
8402
|
height: 14px;
|
|
8553
8403
|
width: 1px;
|
|
8554
8404
|
`;
|
|
8555
|
-
var StyledRemoveButton =
|
|
8405
|
+
var StyledRemoveButton = styled38.button`
|
|
8556
8406
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8557
8407
|
all: unset;
|
|
8558
8408
|
cursor: pointer;
|
|
@@ -8580,7 +8430,7 @@ var StyledRemoveButton = styled40.button`
|
|
|
8580
8430
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8581
8431
|
}
|
|
8582
8432
|
`;
|
|
8583
|
-
var StyledTag =
|
|
8433
|
+
var StyledTag = styled38.div`
|
|
8584
8434
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8585
8435
|
align-items: center;
|
|
8586
8436
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -8589,47 +8439,47 @@ var StyledTag = styled40.div`
|
|
|
8589
8439
|
overflow: hidden;
|
|
8590
8440
|
`;
|
|
8591
8441
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
8592
|
-
if (
|
|
8442
|
+
if (isNil11(onClickRemove)) {
|
|
8593
8443
|
return null;
|
|
8594
8444
|
}
|
|
8595
|
-
if (
|
|
8445
|
+
if (isNil11(onClickRemoveLabel)) {
|
|
8596
8446
|
throw new Error(
|
|
8597
8447
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
8598
8448
|
);
|
|
8599
8449
|
}
|
|
8600
|
-
return /* @__PURE__ */
|
|
8601
|
-
/* @__PURE__ */
|
|
8602
|
-
/* @__PURE__ */
|
|
8450
|
+
return /* @__PURE__ */ jsxs22(Fragment3, { children: [
|
|
8451
|
+
/* @__PURE__ */ jsx203(TagDivider, { $colorScheme: colorScheme }),
|
|
8452
|
+
/* @__PURE__ */ jsxs22(
|
|
8603
8453
|
StyledRemoveButton,
|
|
8604
8454
|
{
|
|
8605
8455
|
$colorScheme: colorScheme,
|
|
8606
8456
|
onClick: onClickRemove,
|
|
8607
8457
|
type: "button",
|
|
8608
8458
|
children: [
|
|
8609
|
-
/* @__PURE__ */
|
|
8459
|
+
/* @__PURE__ */ jsx203(
|
|
8610
8460
|
Icon,
|
|
8611
8461
|
{
|
|
8612
8462
|
size: "sm",
|
|
8613
8463
|
type: "close"
|
|
8614
8464
|
}
|
|
8615
8465
|
),
|
|
8616
|
-
/* @__PURE__ */
|
|
8466
|
+
/* @__PURE__ */ jsx203(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
8617
8467
|
]
|
|
8618
8468
|
}
|
|
8619
8469
|
)
|
|
8620
8470
|
] });
|
|
8621
8471
|
};
|
|
8622
|
-
var Tag =
|
|
8472
|
+
var Tag = forwardRef18(
|
|
8623
8473
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
8624
|
-
const labelProps =
|
|
8625
|
-
return /* @__PURE__ */
|
|
8474
|
+
const labelProps = isNotNil16(href) && isNonEmptyString4(href) ? { href, as: "a" } : { as: "span" };
|
|
8475
|
+
return /* @__PURE__ */ jsxs22(
|
|
8626
8476
|
StyledTag,
|
|
8627
8477
|
{
|
|
8628
8478
|
ref,
|
|
8629
8479
|
$colorScheme: colorScheme,
|
|
8630
8480
|
...otherProps,
|
|
8631
8481
|
children: [
|
|
8632
|
-
/* @__PURE__ */
|
|
8482
|
+
/* @__PURE__ */ jsx203(
|
|
8633
8483
|
TagLabel,
|
|
8634
8484
|
{
|
|
8635
8485
|
...labelProps,
|
|
@@ -8637,7 +8487,7 @@ var Tag = forwardRef20(
|
|
|
8637
8487
|
children: label
|
|
8638
8488
|
}
|
|
8639
8489
|
),
|
|
8640
|
-
/* @__PURE__ */
|
|
8490
|
+
/* @__PURE__ */ jsx203(
|
|
8641
8491
|
RemoveButton,
|
|
8642
8492
|
{
|
|
8643
8493
|
colorScheme,
|
|
@@ -8660,8 +8510,8 @@ import {
|
|
|
8660
8510
|
Portal,
|
|
8661
8511
|
Arrow
|
|
8662
8512
|
} from "@radix-ui/react-tooltip";
|
|
8663
|
-
import
|
|
8664
|
-
import { jsx as
|
|
8513
|
+
import styled39, { css as css22 } from "styled-components";
|
|
8514
|
+
import { jsx as jsx204, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8665
8515
|
var CompactTooltipStyles = css22`
|
|
8666
8516
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8667
8517
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
@@ -8669,7 +8519,7 @@ var CompactTooltipStyles = css22`
|
|
|
8669
8519
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8670
8520
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8671
8521
|
`;
|
|
8672
|
-
var StyledContent =
|
|
8522
|
+
var StyledContent = styled39(Content)`
|
|
8673
8523
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8674
8524
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8675
8525
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8727,14 +8577,14 @@ var Tooltip = ({
|
|
|
8727
8577
|
if (forceOpen === true) {
|
|
8728
8578
|
rootProps.open = true;
|
|
8729
8579
|
}
|
|
8730
|
-
return /* @__PURE__ */
|
|
8580
|
+
return /* @__PURE__ */ jsxs23(
|
|
8731
8581
|
Root,
|
|
8732
8582
|
{
|
|
8733
8583
|
delayDuration: delay,
|
|
8734
8584
|
...rootProps,
|
|
8735
8585
|
children: [
|
|
8736
|
-
/* @__PURE__ */
|
|
8737
|
-
/* @__PURE__ */
|
|
8586
|
+
/* @__PURE__ */ jsx204(Trigger, { asChild: true, children }),
|
|
8587
|
+
/* @__PURE__ */ jsx204(Portal, { children: /* @__PURE__ */ jsxs23(
|
|
8738
8588
|
StyledContent,
|
|
8739
8589
|
{
|
|
8740
8590
|
$compact: compact,
|
|
@@ -8742,7 +8592,7 @@ var Tooltip = ({
|
|
|
8742
8592
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8743
8593
|
children: [
|
|
8744
8594
|
content,
|
|
8745
|
-
!hideArrow ? /* @__PURE__ */
|
|
8595
|
+
!hideArrow ? /* @__PURE__ */ jsx204(Arrow, { asChild: true, children: /* @__PURE__ */ jsx204(
|
|
8746
8596
|
"svg",
|
|
8747
8597
|
{
|
|
8748
8598
|
fill: "var(--tooltip-bg)",
|
|
@@ -8751,7 +8601,7 @@ var Tooltip = ({
|
|
|
8751
8601
|
viewBox: "0 0 12 8",
|
|
8752
8602
|
width: "12",
|
|
8753
8603
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8754
|
-
children: /* @__PURE__ */
|
|
8604
|
+
children: /* @__PURE__ */ jsx204("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" })
|
|
8755
8605
|
}
|
|
8756
8606
|
) }) : null
|
|
8757
8607
|
]
|
|
@@ -8764,26 +8614,26 @@ var Tooltip = ({
|
|
|
8764
8614
|
Tooltip.displayName = "Tooltip";
|
|
8765
8615
|
|
|
8766
8616
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
8767
|
-
import
|
|
8768
|
-
import { isNotNil as
|
|
8769
|
-
import { jsx as
|
|
8617
|
+
import styled40 from "styled-components";
|
|
8618
|
+
import { isNotNil as isNotNil17 } from "@wistia/type-guards";
|
|
8619
|
+
import { jsx as jsx205, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8770
8620
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
8771
8621
|
if (iconOnly) {
|
|
8772
|
-
return /* @__PURE__ */
|
|
8622
|
+
return /* @__PURE__ */ jsx205(
|
|
8773
8623
|
"g",
|
|
8774
8624
|
{
|
|
8775
8625
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8776
8626
|
fill: brandmarkColor,
|
|
8777
|
-
children: /* @__PURE__ */
|
|
8627
|
+
children: /* @__PURE__ */ jsx205("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" })
|
|
8778
8628
|
}
|
|
8779
8629
|
);
|
|
8780
8630
|
}
|
|
8781
|
-
return /* @__PURE__ */
|
|
8631
|
+
return /* @__PURE__ */ jsx205(
|
|
8782
8632
|
"g",
|
|
8783
8633
|
{
|
|
8784
8634
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8785
8635
|
fill: brandmarkColor,
|
|
8786
|
-
children: /* @__PURE__ */
|
|
8636
|
+
children: /* @__PURE__ */ jsx205("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" })
|
|
8787
8637
|
}
|
|
8788
8638
|
);
|
|
8789
8639
|
};
|
|
@@ -8791,12 +8641,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
8791
8641
|
if (iconOnly) {
|
|
8792
8642
|
return null;
|
|
8793
8643
|
}
|
|
8794
|
-
return /* @__PURE__ */
|
|
8644
|
+
return /* @__PURE__ */ jsx205(
|
|
8795
8645
|
"g",
|
|
8796
8646
|
{
|
|
8797
8647
|
"data-testid": "ui-wistia-logo-logotype",
|
|
8798
8648
|
fill: logotypeColor,
|
|
8799
|
-
children: /* @__PURE__ */
|
|
8649
|
+
children: /* @__PURE__ */ jsx205("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" })
|
|
8800
8650
|
}
|
|
8801
8651
|
);
|
|
8802
8652
|
};
|
|
@@ -8806,7 +8656,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
8806
8656
|
}
|
|
8807
8657
|
return "0 0 144 31.47";
|
|
8808
8658
|
};
|
|
8809
|
-
var WistiaLogoComponent =
|
|
8659
|
+
var WistiaLogoComponent = styled40.svg`
|
|
8810
8660
|
height: ${({ height }) => `${height}px`};
|
|
8811
8661
|
|
|
8812
8662
|
/* ensure it will always fit on mobile */
|
|
@@ -8848,7 +8698,7 @@ var WistiaLogo = ({
|
|
|
8848
8698
|
};
|
|
8849
8699
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
8850
8700
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
8851
|
-
const Logo = /* @__PURE__ */
|
|
8701
|
+
const Logo = /* @__PURE__ */ jsxs24(
|
|
8852
8702
|
WistiaLogoComponent,
|
|
8853
8703
|
{
|
|
8854
8704
|
$hoverColor: hoverColor,
|
|
@@ -8858,14 +8708,14 @@ var WistiaLogo = ({
|
|
|
8858
8708
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8859
8709
|
...otherProps,
|
|
8860
8710
|
children: [
|
|
8861
|
-
/* @__PURE__ */
|
|
8862
|
-
|
|
8711
|
+
/* @__PURE__ */ jsx205("title", { children: title }),
|
|
8712
|
+
isNotNil17(description) ? /* @__PURE__ */ jsx205("desc", { children: description }) : null,
|
|
8863
8713
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
8864
8714
|
renderLogotype(logotypeColor, iconOnly)
|
|
8865
8715
|
]
|
|
8866
8716
|
}
|
|
8867
8717
|
);
|
|
8868
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
8718
|
+
return href !== void 0 ? /* @__PURE__ */ jsx205("a", { href, children: Logo }) : Logo;
|
|
8869
8719
|
};
|
|
8870
8720
|
WistiaLogo.displayName = "WistiaLogo";
|
|
8871
8721
|
|
|
@@ -8880,10 +8730,10 @@ import {
|
|
|
8880
8730
|
Value,
|
|
8881
8731
|
ScrollDownButton
|
|
8882
8732
|
} from "@radix-ui/react-select";
|
|
8883
|
-
import { forwardRef as
|
|
8884
|
-
import
|
|
8885
|
-
import { jsx as
|
|
8886
|
-
var StyledTrigger =
|
|
8733
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
8734
|
+
import styled41 from "styled-components";
|
|
8735
|
+
import { jsx as jsx206, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
8736
|
+
var StyledTrigger = styled41(Trigger2)`
|
|
8887
8737
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8888
8738
|
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
8889
8739
|
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -8924,7 +8774,7 @@ var StyledTrigger = styled43(Trigger2)`
|
|
|
8924
8774
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
8925
8775
|
}
|
|
8926
8776
|
`;
|
|
8927
|
-
var StyledContent2 =
|
|
8777
|
+
var StyledContent2 = styled41(Content2)`
|
|
8928
8778
|
--wui-select-content-border: var(--wui-color-border);
|
|
8929
8779
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
8930
8780
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -8940,7 +8790,7 @@ var StyledContent2 = styled43(Content2)`
|
|
|
8940
8790
|
padding: var(--wui-select-option-padding);
|
|
8941
8791
|
min-width: 200px;
|
|
8942
8792
|
`;
|
|
8943
|
-
var Select =
|
|
8793
|
+
var Select = forwardRef19(
|
|
8944
8794
|
({
|
|
8945
8795
|
colorScheme = "inherit",
|
|
8946
8796
|
children,
|
|
@@ -8950,13 +8800,13 @@ var Select = forwardRef21(
|
|
|
8950
8800
|
...props
|
|
8951
8801
|
}, forwardedRef) => {
|
|
8952
8802
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
8953
|
-
return /* @__PURE__ */
|
|
8803
|
+
return /* @__PURE__ */ jsxs25(
|
|
8954
8804
|
Root2,
|
|
8955
8805
|
{
|
|
8956
8806
|
...props,
|
|
8957
8807
|
onValueChange: onChange,
|
|
8958
8808
|
children: [
|
|
8959
|
-
/* @__PURE__ */
|
|
8809
|
+
/* @__PURE__ */ jsxs25(
|
|
8960
8810
|
StyledTrigger,
|
|
8961
8811
|
{
|
|
8962
8812
|
ref: forwardedRef,
|
|
@@ -8964,8 +8814,8 @@ var Select = forwardRef21(
|
|
|
8964
8814
|
$fullWidth: responsiveFullWidth,
|
|
8965
8815
|
...props,
|
|
8966
8816
|
children: [
|
|
8967
|
-
/* @__PURE__ */
|
|
8968
|
-
/* @__PURE__ */
|
|
8817
|
+
/* @__PURE__ */ jsx206(Value, { placeholder }),
|
|
8818
|
+
/* @__PURE__ */ jsx206(
|
|
8969
8819
|
Icon,
|
|
8970
8820
|
{
|
|
8971
8821
|
size: "md",
|
|
@@ -8975,10 +8825,10 @@ var Select = forwardRef21(
|
|
|
8975
8825
|
]
|
|
8976
8826
|
}
|
|
8977
8827
|
),
|
|
8978
|
-
/* @__PURE__ */
|
|
8979
|
-
/* @__PURE__ */
|
|
8980
|
-
/* @__PURE__ */
|
|
8981
|
-
/* @__PURE__ */
|
|
8828
|
+
/* @__PURE__ */ jsx206(Portal2, { children: /* @__PURE__ */ jsxs25(StyledContent2, { position: "popper", children: [
|
|
8829
|
+
/* @__PURE__ */ jsx206(ScrollUpButton, { children: /* @__PURE__ */ jsx206(Icon, { type: "caret-up" }) }),
|
|
8830
|
+
/* @__PURE__ */ jsx206(Viewport, { children }),
|
|
8831
|
+
/* @__PURE__ */ jsx206(ScrollDownButton, { children: /* @__PURE__ */ jsx206(Icon, { type: "caret-down" }) })
|
|
8982
8832
|
] }) })
|
|
8983
8833
|
]
|
|
8984
8834
|
}
|
|
@@ -8989,10 +8839,10 @@ Select.displayName = "Select";
|
|
|
8989
8839
|
|
|
8990
8840
|
// src/components/Select/SelectOption.tsx
|
|
8991
8841
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
8992
|
-
import { forwardRef as
|
|
8993
|
-
import
|
|
8994
|
-
import { jsx as
|
|
8995
|
-
var StyledItem =
|
|
8842
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
8843
|
+
import styled42 from "styled-components";
|
|
8844
|
+
import { jsx as jsx207, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
8845
|
+
var StyledItem = styled42(Item)`
|
|
8996
8846
|
${variantStyleMap2.body3};
|
|
8997
8847
|
display: flex;
|
|
8998
8848
|
padding: var(--wui-select-option-padding);
|
|
@@ -9015,25 +8865,25 @@ var StyledItem = styled44(Item)`
|
|
|
9015
8865
|
background-color: transparent;
|
|
9016
8866
|
}
|
|
9017
8867
|
`;
|
|
9018
|
-
var StyledIconContainer =
|
|
8868
|
+
var StyledIconContainer = styled42.span`
|
|
9019
8869
|
width: 12px;
|
|
9020
8870
|
`;
|
|
9021
|
-
var SelectOption =
|
|
8871
|
+
var SelectOption = forwardRef20(
|
|
9022
8872
|
({ children, ...props }, forwardedRef) => {
|
|
9023
|
-
return /* @__PURE__ */
|
|
8873
|
+
return /* @__PURE__ */ jsxs26(
|
|
9024
8874
|
StyledItem,
|
|
9025
8875
|
{
|
|
9026
8876
|
...props,
|
|
9027
8877
|
ref: forwardedRef,
|
|
9028
8878
|
children: [
|
|
9029
|
-
/* @__PURE__ */
|
|
8879
|
+
/* @__PURE__ */ jsx207(StyledIconContainer, { children: /* @__PURE__ */ jsx207(ItemIndicator, { children: /* @__PURE__ */ jsx207(
|
|
9030
8880
|
Icon,
|
|
9031
8881
|
{
|
|
9032
8882
|
size: "sm",
|
|
9033
8883
|
type: "checkmark"
|
|
9034
8884
|
}
|
|
9035
8885
|
) }) }),
|
|
9036
|
-
/* @__PURE__ */
|
|
8886
|
+
/* @__PURE__ */ jsx207(ItemText, { children })
|
|
9037
8887
|
]
|
|
9038
8888
|
}
|
|
9039
8889
|
);
|
|
@@ -9043,14 +8893,14 @@ SelectOption.displayName = "Option";
|
|
|
9043
8893
|
|
|
9044
8894
|
// src/components/Select/SelectOptionGroup.tsx
|
|
9045
8895
|
import { Group, Label as Label2 } from "@radix-ui/react-select";
|
|
9046
|
-
import
|
|
9047
|
-
import { jsx as
|
|
9048
|
-
var StyledLabel3 =
|
|
8896
|
+
import styled43 from "styled-components";
|
|
8897
|
+
import { jsx as jsx208, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
8898
|
+
var StyledLabel3 = styled43(Label2)`
|
|
9049
8899
|
padding: var(--wui-select-option-padding);
|
|
9050
8900
|
`;
|
|
9051
8901
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
9052
|
-
return /* @__PURE__ */
|
|
9053
|
-
/* @__PURE__ */
|
|
8902
|
+
return /* @__PURE__ */ jsxs27(Group, { ...props, children: [
|
|
8903
|
+
/* @__PURE__ */ jsx208(StyledLabel3, { children: /* @__PURE__ */ jsx208(
|
|
9054
8904
|
Text,
|
|
9055
8905
|
{
|
|
9056
8906
|
prominence: "secondary",
|
|
@@ -9061,8 +8911,62 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
9061
8911
|
children
|
|
9062
8912
|
] });
|
|
9063
8913
|
};
|
|
8914
|
+
|
|
8915
|
+
// src/components/AnalyticsCards/AnalyticsCard.tsx
|
|
8916
|
+
import styled44 from "styled-components";
|
|
8917
|
+
import { isNotNull } from "@wistia/type-guards";
|
|
8918
|
+
import { jsx as jsx209, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
8919
|
+
var StyledAnalyticsCard = styled44.div`
|
|
8920
|
+
display: grid;
|
|
8921
|
+
grid-template-areas: 'label slot' 'value value';
|
|
8922
|
+
grid-template-rows: auto auto;
|
|
8923
|
+
grid-template-columns: auto auto;
|
|
8924
|
+
gap: var(--wui-space-01);
|
|
8925
|
+
padding: var(--wui-space-03);
|
|
8926
|
+
background: var(--wui-color-bg-surface-secondary);
|
|
8927
|
+
flex: 1;
|
|
8928
|
+
border-radius: var(--wui-border-radius-02);
|
|
8929
|
+
`;
|
|
8930
|
+
var StyledLabel4 = styled44(Heading)`
|
|
8931
|
+
grid-area: label;
|
|
8932
|
+
`;
|
|
8933
|
+
var StyledValue = styled44(Heading)`
|
|
8934
|
+
grid-area: value;
|
|
8935
|
+
`;
|
|
8936
|
+
var StyledSlot = styled44.div`
|
|
8937
|
+
display: flex;
|
|
8938
|
+
justify-content: flex-end;
|
|
8939
|
+
grid-area: slot;
|
|
8940
|
+
align-self: center;
|
|
8941
|
+
`;
|
|
8942
|
+
var AnalyticsCard = ({
|
|
8943
|
+
label,
|
|
8944
|
+
value,
|
|
8945
|
+
slot,
|
|
8946
|
+
...props
|
|
8947
|
+
}) => /* @__PURE__ */ jsxs28(StyledAnalyticsCard, { ...props, children: [
|
|
8948
|
+
/* @__PURE__ */ jsx209(
|
|
8949
|
+
StyledLabel4,
|
|
8950
|
+
{
|
|
8951
|
+
renderAs: "dt",
|
|
8952
|
+
variant: "heading6",
|
|
8953
|
+
children: label
|
|
8954
|
+
}
|
|
8955
|
+
),
|
|
8956
|
+
/* @__PURE__ */ jsx209(
|
|
8957
|
+
StyledValue,
|
|
8958
|
+
{
|
|
8959
|
+
renderAs: "dd",
|
|
8960
|
+
variant: "heading3",
|
|
8961
|
+
children: value
|
|
8962
|
+
}
|
|
8963
|
+
),
|
|
8964
|
+
isNotNull(slot) && /* @__PURE__ */ jsx209(StyledSlot, { children: slot })
|
|
8965
|
+
] });
|
|
8966
|
+
AnalyticsCard.displayName = "AnalyticsCard";
|
|
9064
8967
|
export {
|
|
9065
8968
|
ActionButton,
|
|
8969
|
+
AnalyticsCard,
|
|
9066
8970
|
Avatar,
|
|
9067
8971
|
Badge,
|
|
9068
8972
|
Box,
|
|
@@ -9098,8 +9002,6 @@ export {
|
|
|
9098
9002
|
RadioGroup,
|
|
9099
9003
|
RadioMenuItem,
|
|
9100
9004
|
ScreenReaderOnly,
|
|
9101
|
-
SegmentedControl,
|
|
9102
|
-
SegmentedControlItem,
|
|
9103
9005
|
Select,
|
|
9104
9006
|
SelectOption,
|
|
9105
9007
|
SelectOptionGroup,
|