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