@wistia/ui 0.0.19 → 0.0.21
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 +182 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +88 -1
- package/dist/index.d.ts +88 -1
- package/dist/index.mjs +178 -50
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -25
package/dist/index.d.mts
CHANGED
|
@@ -1392,6 +1392,93 @@ declare const CheckboxMenuItem: {
|
|
|
1392
1392
|
displayName: string;
|
|
1393
1393
|
};
|
|
1394
1394
|
|
|
1395
|
+
type RadioProps = ComponentPropsWithoutRef<'input'> & {
|
|
1396
|
+
/**
|
|
1397
|
+
* Indicates the state of the radio
|
|
1398
|
+
*/
|
|
1399
|
+
checked?: boolean;
|
|
1400
|
+
/**
|
|
1401
|
+
* Disables input
|
|
1402
|
+
*/
|
|
1403
|
+
disabled?: boolean;
|
|
1404
|
+
/**
|
|
1405
|
+
* Indicates that there is an error with the input
|
|
1406
|
+
*/
|
|
1407
|
+
hasError?: boolean;
|
|
1408
|
+
/**
|
|
1409
|
+
* Provides an ID for the input
|
|
1410
|
+
*/
|
|
1411
|
+
id?: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* The label for the input
|
|
1414
|
+
*/
|
|
1415
|
+
label: JSX.Element | string;
|
|
1416
|
+
/**
|
|
1417
|
+
* The description for the radio
|
|
1418
|
+
*/
|
|
1419
|
+
description?: JSX.Element | string | undefined;
|
|
1420
|
+
/**
|
|
1421
|
+
* Should match the ID attribute of the radio.
|
|
1422
|
+
* Can be used to group together multiple radios
|
|
1423
|
+
*/
|
|
1424
|
+
name?: string;
|
|
1425
|
+
/**
|
|
1426
|
+
* Callback function invoked when the value changes
|
|
1427
|
+
*/
|
|
1428
|
+
onChange?: (event: ChangeEvent) => unknown;
|
|
1429
|
+
/**
|
|
1430
|
+
* Make Radio a required element
|
|
1431
|
+
*/
|
|
1432
|
+
required?: boolean;
|
|
1433
|
+
/**
|
|
1434
|
+
* The value attribute of the input
|
|
1435
|
+
*/
|
|
1436
|
+
value?: string;
|
|
1437
|
+
};
|
|
1438
|
+
declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
1439
|
+
/**
|
|
1440
|
+
* Indicates the state of the radio
|
|
1441
|
+
*/
|
|
1442
|
+
checked?: boolean;
|
|
1443
|
+
/**
|
|
1444
|
+
* Disables input
|
|
1445
|
+
*/
|
|
1446
|
+
disabled?: boolean;
|
|
1447
|
+
/**
|
|
1448
|
+
* Indicates that there is an error with the input
|
|
1449
|
+
*/
|
|
1450
|
+
hasError?: boolean;
|
|
1451
|
+
/**
|
|
1452
|
+
* Provides an ID for the input
|
|
1453
|
+
*/
|
|
1454
|
+
id?: string;
|
|
1455
|
+
/**
|
|
1456
|
+
* The label for the input
|
|
1457
|
+
*/
|
|
1458
|
+
label: JSX.Element | string;
|
|
1459
|
+
/**
|
|
1460
|
+
* The description for the radio
|
|
1461
|
+
*/
|
|
1462
|
+
description?: JSX.Element | string | undefined;
|
|
1463
|
+
/**
|
|
1464
|
+
* Should match the ID attribute of the radio.
|
|
1465
|
+
* Can be used to group together multiple radios
|
|
1466
|
+
*/
|
|
1467
|
+
name?: string;
|
|
1468
|
+
/**
|
|
1469
|
+
* Callback function invoked when the value changes
|
|
1470
|
+
*/
|
|
1471
|
+
onChange?: (event: ChangeEvent) => unknown;
|
|
1472
|
+
/**
|
|
1473
|
+
* Make Radio a required element
|
|
1474
|
+
*/
|
|
1475
|
+
required?: boolean;
|
|
1476
|
+
/**
|
|
1477
|
+
* The value attribute of the input
|
|
1478
|
+
*/
|
|
1479
|
+
value?: string;
|
|
1480
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
1481
|
+
|
|
1395
1482
|
type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
|
|
1396
1483
|
/**
|
|
1397
1484
|
* Pass an arbitrary child node
|
|
@@ -1573,4 +1660,4 @@ declare const WistiaLogo: {
|
|
|
1573
1660
|
displayName: string;
|
|
1574
1661
|
};
|
|
1575
1662
|
|
|
1576
|
-
export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, RadioMenuItem, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
|
|
1663
|
+
export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Radio, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -1392,6 +1392,93 @@ declare const CheckboxMenuItem: {
|
|
|
1392
1392
|
displayName: string;
|
|
1393
1393
|
};
|
|
1394
1394
|
|
|
1395
|
+
type RadioProps = ComponentPropsWithoutRef<'input'> & {
|
|
1396
|
+
/**
|
|
1397
|
+
* Indicates the state of the radio
|
|
1398
|
+
*/
|
|
1399
|
+
checked?: boolean;
|
|
1400
|
+
/**
|
|
1401
|
+
* Disables input
|
|
1402
|
+
*/
|
|
1403
|
+
disabled?: boolean;
|
|
1404
|
+
/**
|
|
1405
|
+
* Indicates that there is an error with the input
|
|
1406
|
+
*/
|
|
1407
|
+
hasError?: boolean;
|
|
1408
|
+
/**
|
|
1409
|
+
* Provides an ID for the input
|
|
1410
|
+
*/
|
|
1411
|
+
id?: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* The label for the input
|
|
1414
|
+
*/
|
|
1415
|
+
label: JSX.Element | string;
|
|
1416
|
+
/**
|
|
1417
|
+
* The description for the radio
|
|
1418
|
+
*/
|
|
1419
|
+
description?: JSX.Element | string | undefined;
|
|
1420
|
+
/**
|
|
1421
|
+
* Should match the ID attribute of the radio.
|
|
1422
|
+
* Can be used to group together multiple radios
|
|
1423
|
+
*/
|
|
1424
|
+
name?: string;
|
|
1425
|
+
/**
|
|
1426
|
+
* Callback function invoked when the value changes
|
|
1427
|
+
*/
|
|
1428
|
+
onChange?: (event: ChangeEvent) => unknown;
|
|
1429
|
+
/**
|
|
1430
|
+
* Make Radio a required element
|
|
1431
|
+
*/
|
|
1432
|
+
required?: boolean;
|
|
1433
|
+
/**
|
|
1434
|
+
* The value attribute of the input
|
|
1435
|
+
*/
|
|
1436
|
+
value?: string;
|
|
1437
|
+
};
|
|
1438
|
+
declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
1439
|
+
/**
|
|
1440
|
+
* Indicates the state of the radio
|
|
1441
|
+
*/
|
|
1442
|
+
checked?: boolean;
|
|
1443
|
+
/**
|
|
1444
|
+
* Disables input
|
|
1445
|
+
*/
|
|
1446
|
+
disabled?: boolean;
|
|
1447
|
+
/**
|
|
1448
|
+
* Indicates that there is an error with the input
|
|
1449
|
+
*/
|
|
1450
|
+
hasError?: boolean;
|
|
1451
|
+
/**
|
|
1452
|
+
* Provides an ID for the input
|
|
1453
|
+
*/
|
|
1454
|
+
id?: string;
|
|
1455
|
+
/**
|
|
1456
|
+
* The label for the input
|
|
1457
|
+
*/
|
|
1458
|
+
label: JSX.Element | string;
|
|
1459
|
+
/**
|
|
1460
|
+
* The description for the radio
|
|
1461
|
+
*/
|
|
1462
|
+
description?: JSX.Element | string | undefined;
|
|
1463
|
+
/**
|
|
1464
|
+
* Should match the ID attribute of the radio.
|
|
1465
|
+
* Can be used to group together multiple radios
|
|
1466
|
+
*/
|
|
1467
|
+
name?: string;
|
|
1468
|
+
/**
|
|
1469
|
+
* Callback function invoked when the value changes
|
|
1470
|
+
*/
|
|
1471
|
+
onChange?: (event: ChangeEvent) => unknown;
|
|
1472
|
+
/**
|
|
1473
|
+
* Make Radio a required element
|
|
1474
|
+
*/
|
|
1475
|
+
required?: boolean;
|
|
1476
|
+
/**
|
|
1477
|
+
* The value attribute of the input
|
|
1478
|
+
*/
|
|
1479
|
+
value?: string;
|
|
1480
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
1481
|
+
|
|
1395
1482
|
type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
|
|
1396
1483
|
/**
|
|
1397
1484
|
* Pass an arbitrary child node
|
|
@@ -1573,4 +1660,4 @@ declare const WistiaLogo: {
|
|
|
1573
1660
|
displayName: string;
|
|
1574
1661
|
};
|
|
1575
1662
|
|
|
1576
|
-
export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, RadioMenuItem, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
|
|
1663
|
+
export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Radio, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.0.
|
|
3
|
+
* @license @wistia/ui v0.0.21
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2024, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -3284,11 +3284,8 @@ var FavoriteOutlineIcon = (props) => /* @__PURE__ */ jsx66(
|
|
|
3284
3284
|
children: /* @__PURE__ */ jsx66(
|
|
3285
3285
|
"path",
|
|
3286
3286
|
{
|
|
3287
|
-
d: "M12
|
|
3288
|
-
|
|
3289
|
-
strokeLinecap: "round",
|
|
3290
|
-
strokeLinejoin: "round",
|
|
3291
|
-
strokeWidth: "1.99999"
|
|
3287
|
+
d: "M12 1.33321C12.3806 1.33321 12.7283 1.54931 12.8967 1.89066L15.6507 7.47119L21.8104 8.36625C22.1871 8.42098 22.5 8.68481 22.6177 9.0468C22.7353 9.4088 22.6372 9.80619 22.3647 10.0719L17.9078 14.4169L18.9602 20.5507C19.0246 20.9259 18.8704 21.305 18.5625 21.5288C18.2546 21.7525 17.8463 21.7821 17.5094 21.605L12 18.7095L6.49053 21.605C6.1536 21.7821 5.74536 21.7525 5.43745 21.5288C5.12954 21.305 4.97535 20.9259 5.03972 20.5507L6.09215 14.4169L1.63526 10.0719C1.36272 9.80619 1.26465 9.4088 1.38228 9.0468C1.49991 8.68481 1.81285 8.42098 2.18953 8.36625L8.34923 7.47119L11.1032 1.89066C11.2717 1.54931 11.6193 1.33321 12 1.33321ZM12 4.59286L9.91005 8.82773C9.76439 9.12289 9.48282 9.32746 9.15711 9.37479L4.4821 10.0541L7.86471 13.3518C8.10037 13.5816 8.2079 13.9126 8.15224 14.2369L7.35352 18.8921L11.5348 16.6946C11.826 16.5416 12.1739 16.5416 12.4652 16.6946L16.6464 18.8921L15.8477 14.2369C15.792 13.9126 15.8996 13.5816 16.1352 13.3518L19.5178 10.0541L14.8428 9.37479C14.5171 9.32746 14.2355 9.12289 14.0899 8.82773L12 4.59286Z",
|
|
3288
|
+
fill: "currentColor"
|
|
3292
3289
|
}
|
|
3293
3290
|
)
|
|
3294
3291
|
}
|
|
@@ -5851,7 +5848,7 @@ var Checkbox = forwardRef4(
|
|
|
5851
5848
|
...otherProps
|
|
5852
5849
|
}, ref) => {
|
|
5853
5850
|
const generatedId = useId();
|
|
5854
|
-
const computedId = isNonEmptyString2(id) ? id : `
|
|
5851
|
+
const computedId = isNonEmptyString2(id) ? id : `ui-checkbox-${generatedId}`;
|
|
5855
5852
|
return /* @__PURE__ */ jsxs6(StyledCheckboxWrapper, { children: [
|
|
5856
5853
|
/* @__PURE__ */ jsx166(
|
|
5857
5854
|
StyledCheckboxRoot,
|
|
@@ -6873,12 +6870,142 @@ var CheckboxMenuItem = ({
|
|
|
6873
6870
|
};
|
|
6874
6871
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
6875
6872
|
|
|
6873
|
+
// src/components/Radio/Radio.tsx
|
|
6874
|
+
import { forwardRef as forwardRef10, useId as useId2 } from "react";
|
|
6875
|
+
import styled23, { css as css18 } from "styled-components";
|
|
6876
|
+
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
6877
|
+
import { jsx as jsx182, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6878
|
+
var StyledLabelWrapper2 = styled23.div`
|
|
6879
|
+
display: flex;
|
|
6880
|
+
flex-direction: column;
|
|
6881
|
+
padding-left: var(--wui-space-02);
|
|
6882
|
+
`;
|
|
6883
|
+
var StyledRadio = styled23.input`
|
|
6884
|
+
align-self: flex-start;
|
|
6885
|
+
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
6886
|
+
appearance: none;
|
|
6887
|
+
margin: 0;
|
|
6888
|
+
color: currentcolor;
|
|
6889
|
+
width: 14px;
|
|
6890
|
+
min-width: 14px;
|
|
6891
|
+
height: 14px;
|
|
6892
|
+
border: 1px solid var(--wui-color-border);
|
|
6893
|
+
border-radius: 50%;
|
|
6894
|
+
transform: translateY(5px); /* visually center the radio button */
|
|
6895
|
+
display: grid;
|
|
6896
|
+
place-content: center;
|
|
6897
|
+
|
|
6898
|
+
&&::before {
|
|
6899
|
+
content: '';
|
|
6900
|
+
width: 10px;
|
|
6901
|
+
height: 10px;
|
|
6902
|
+
border-radius: 50%;
|
|
6903
|
+
transform: scale(0);
|
|
6904
|
+
box-shadow: inset 1em 1em var(--wui-color-bg-fill);
|
|
6905
|
+
}
|
|
6906
|
+
|
|
6907
|
+
&&:checked::before {
|
|
6908
|
+
transform: scale(1);
|
|
6909
|
+
}
|
|
6910
|
+
`;
|
|
6911
|
+
var disabledStyle2 = css18`
|
|
6912
|
+
cursor: not-allowed;
|
|
6913
|
+
opacity: 0.5;
|
|
6914
|
+
`;
|
|
6915
|
+
var errorStyle = css18`
|
|
6916
|
+
/* TODO Lamp to design error state */
|
|
6917
|
+
&:hover,
|
|
6918
|
+
&:focus,
|
|
6919
|
+
&:active {
|
|
6920
|
+
border-color: transparent !important;
|
|
6921
|
+
}
|
|
6922
|
+
`;
|
|
6923
|
+
var defaultHoverStyle = css18`
|
|
6924
|
+
/* TODO Lamp to design hover state */
|
|
6925
|
+
cursor: pointer;
|
|
6926
|
+
`;
|
|
6927
|
+
var StyledRadioWrapper = styled23.div`
|
|
6928
|
+
align-items: center;
|
|
6929
|
+
border: 1px solid transparent;
|
|
6930
|
+
border-radius: 4px;
|
|
6931
|
+
display: flex;
|
|
6932
|
+
gap: var(--wui-space-02);
|
|
6933
|
+
padding: var(--wui-space-02);
|
|
6934
|
+
|
|
6935
|
+
&:hover {
|
|
6936
|
+
${defaultHoverStyle}
|
|
6937
|
+
}
|
|
6938
|
+
|
|
6939
|
+
&:focus-within {
|
|
6940
|
+
/* TODO Lamp to design focus state */
|
|
6941
|
+
background-color: #efefef;
|
|
6942
|
+
}
|
|
6943
|
+
|
|
6944
|
+
${({ hasError }) => hasError && errorStyle};
|
|
6945
|
+
${({ disabled }) => disabled && disabledStyle2};
|
|
6946
|
+
`;
|
|
6947
|
+
var Radio = forwardRef10(
|
|
6948
|
+
({
|
|
6949
|
+
checked,
|
|
6950
|
+
disabled = false,
|
|
6951
|
+
hasError = false,
|
|
6952
|
+
id,
|
|
6953
|
+
label,
|
|
6954
|
+
description,
|
|
6955
|
+
name,
|
|
6956
|
+
onChange,
|
|
6957
|
+
required = false,
|
|
6958
|
+
value = "false",
|
|
6959
|
+
...otherProps
|
|
6960
|
+
}, ref) => {
|
|
6961
|
+
const generatedId = useId2();
|
|
6962
|
+
const computedId = isNonEmptyString3(id) ? id : `ui-radio-${generatedId}`;
|
|
6963
|
+
return /* @__PURE__ */ jsxs12(
|
|
6964
|
+
StyledRadioWrapper,
|
|
6965
|
+
{
|
|
6966
|
+
disabled,
|
|
6967
|
+
hasError,
|
|
6968
|
+
children: [
|
|
6969
|
+
/* @__PURE__ */ jsx182(
|
|
6970
|
+
StyledRadio,
|
|
6971
|
+
{
|
|
6972
|
+
ref,
|
|
6973
|
+
"aria-checked": checked,
|
|
6974
|
+
checked,
|
|
6975
|
+
disabled,
|
|
6976
|
+
id: computedId,
|
|
6977
|
+
name,
|
|
6978
|
+
onChange,
|
|
6979
|
+
type: "radio",
|
|
6980
|
+
value,
|
|
6981
|
+
...otherProps
|
|
6982
|
+
}
|
|
6983
|
+
),
|
|
6984
|
+
/* @__PURE__ */ jsxs12(StyledLabelWrapper2, { children: [
|
|
6985
|
+
/* @__PURE__ */ jsx182(
|
|
6986
|
+
Label,
|
|
6987
|
+
{
|
|
6988
|
+
disabled,
|
|
6989
|
+
htmlFor: computedId,
|
|
6990
|
+
required,
|
|
6991
|
+
children: label
|
|
6992
|
+
}
|
|
6993
|
+
),
|
|
6994
|
+
/* @__PURE__ */ jsx182(LabelDescription, { children: description })
|
|
6995
|
+
] })
|
|
6996
|
+
]
|
|
6997
|
+
}
|
|
6998
|
+
);
|
|
6999
|
+
}
|
|
7000
|
+
);
|
|
7001
|
+
Radio.displayName = "Radio";
|
|
7002
|
+
|
|
6876
7003
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
6877
|
-
import
|
|
7004
|
+
import styled24 from "styled-components";
|
|
6878
7005
|
import { isNotNil as isNotNil8 } from "@wistia/type-guards";
|
|
6879
|
-
import { jsx as
|
|
6880
|
-
var VisuallyHidden =
|
|
6881
|
-
var VisuallyHiddenButFocusable =
|
|
7006
|
+
import { jsx as jsx183 } from "react/jsx-runtime";
|
|
7007
|
+
var VisuallyHidden = styled24.div({ ...visuallyHiddenStyle });
|
|
7008
|
+
var VisuallyHiddenButFocusable = styled24.div({
|
|
6882
7009
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
6883
7010
|
});
|
|
6884
7011
|
var ScreenReaderOnly = ({
|
|
@@ -6889,18 +7016,18 @@ var ScreenReaderOnly = ({
|
|
|
6889
7016
|
}) => {
|
|
6890
7017
|
const accessibleText = isNotNil8(text) ? text : children;
|
|
6891
7018
|
if (focusable) {
|
|
6892
|
-
return /* @__PURE__ */
|
|
7019
|
+
return /* @__PURE__ */ jsx183(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
6893
7020
|
}
|
|
6894
|
-
return /* @__PURE__ */
|
|
7021
|
+
return /* @__PURE__ */ jsx183(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
6895
7022
|
};
|
|
6896
7023
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
6897
7024
|
|
|
6898
7025
|
// src/components/Stack/Stack.tsx
|
|
6899
|
-
import { forwardRef as
|
|
6900
|
-
import
|
|
6901
|
-
import { jsx as
|
|
7026
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
7027
|
+
import styled25 from "styled-components";
|
|
7028
|
+
import { jsx as jsx184 } from "react/jsx-runtime";
|
|
6902
7029
|
var DEFAULT_ELEMENT3 = "div";
|
|
6903
|
-
var StyledStack =
|
|
7030
|
+
var StyledStack = styled25.div`
|
|
6904
7031
|
display: flex;
|
|
6905
7032
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
6906
7033
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
@@ -6909,11 +7036,11 @@ var StyledStack = styled24.div`
|
|
|
6909
7036
|
flex: 1;
|
|
6910
7037
|
}
|
|
6911
7038
|
`;
|
|
6912
|
-
var StackComponent =
|
|
7039
|
+
var StackComponent = forwardRef11(
|
|
6913
7040
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
6914
7041
|
const responsiveGap = useResponsiveProp(gap);
|
|
6915
7042
|
const responsiveDirection = useResponsiveProp(direction);
|
|
6916
|
-
return /* @__PURE__ */
|
|
7043
|
+
return /* @__PURE__ */ jsx184(
|
|
6917
7044
|
StyledStack,
|
|
6918
7045
|
{
|
|
6919
7046
|
ref,
|
|
@@ -6929,11 +7056,11 @@ StackComponent.displayName = "Stack";
|
|
|
6929
7056
|
var Stack = makePolymorphic(StackComponent);
|
|
6930
7057
|
|
|
6931
7058
|
// src/components/Tag/Tag.tsx
|
|
6932
|
-
import { forwardRef as
|
|
6933
|
-
import
|
|
6934
|
-
import { isNil as isNil10, isNotNil as isNotNil9, isNonEmptyString as
|
|
6935
|
-
import { Fragment as Fragment2, jsx as
|
|
6936
|
-
var TagLabel =
|
|
7059
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
7060
|
+
import styled26 from "styled-components";
|
|
7061
|
+
import { isNil as isNil10, isNotNil as isNotNil9, isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
7062
|
+
import { Fragment as Fragment2, jsx as jsx185, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7063
|
+
var TagLabel = styled26.a`
|
|
6937
7064
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6938
7065
|
font-size: var(--wui-typography-label-4-size);
|
|
6939
7066
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -6961,14 +7088,14 @@ var TagLabel = styled25.a`
|
|
|
6961
7088
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
6962
7089
|
}
|
|
6963
7090
|
`;
|
|
6964
|
-
var TagDivider =
|
|
7091
|
+
var TagDivider = styled26.div`
|
|
6965
7092
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6966
7093
|
border-left: 1px solid var(--wui-color-border);
|
|
6967
7094
|
display: flex;
|
|
6968
7095
|
height: 14px;
|
|
6969
7096
|
width: 1px;
|
|
6970
7097
|
`;
|
|
6971
|
-
var StyledRemoveButton =
|
|
7098
|
+
var StyledRemoveButton = styled26.button`
|
|
6972
7099
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6973
7100
|
all: unset;
|
|
6974
7101
|
cursor: pointer;
|
|
@@ -6996,7 +7123,7 @@ var StyledRemoveButton = styled25.button`
|
|
|
6996
7123
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
6997
7124
|
}
|
|
6998
7125
|
`;
|
|
6999
|
-
var StyledTag =
|
|
7126
|
+
var StyledTag = styled26.div`
|
|
7000
7127
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7001
7128
|
align-items: center;
|
|
7002
7129
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -7013,39 +7140,39 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
7013
7140
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
7014
7141
|
);
|
|
7015
7142
|
}
|
|
7016
|
-
return /* @__PURE__ */
|
|
7017
|
-
/* @__PURE__ */
|
|
7018
|
-
/* @__PURE__ */
|
|
7143
|
+
return /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
7144
|
+
/* @__PURE__ */ jsx185(TagDivider, { $colorScheme: colorScheme }),
|
|
7145
|
+
/* @__PURE__ */ jsxs13(
|
|
7019
7146
|
StyledRemoveButton,
|
|
7020
7147
|
{
|
|
7021
7148
|
$colorScheme: colorScheme,
|
|
7022
7149
|
onClick: onClickRemove,
|
|
7023
7150
|
type: "button",
|
|
7024
7151
|
children: [
|
|
7025
|
-
/* @__PURE__ */
|
|
7152
|
+
/* @__PURE__ */ jsx185(
|
|
7026
7153
|
Icon,
|
|
7027
7154
|
{
|
|
7028
7155
|
size: "sm",
|
|
7029
7156
|
type: "close"
|
|
7030
7157
|
}
|
|
7031
7158
|
),
|
|
7032
|
-
/* @__PURE__ */
|
|
7159
|
+
/* @__PURE__ */ jsx185(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
7033
7160
|
]
|
|
7034
7161
|
}
|
|
7035
7162
|
)
|
|
7036
7163
|
] });
|
|
7037
7164
|
};
|
|
7038
|
-
var Tag =
|
|
7165
|
+
var Tag = forwardRef12(
|
|
7039
7166
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
7040
|
-
const labelProps = isNotNil9(href) &&
|
|
7041
|
-
return /* @__PURE__ */
|
|
7167
|
+
const labelProps = isNotNil9(href) && isNonEmptyString4(href) ? { href, as: "a" } : { as: "span" };
|
|
7168
|
+
return /* @__PURE__ */ jsxs13(
|
|
7042
7169
|
StyledTag,
|
|
7043
7170
|
{
|
|
7044
7171
|
ref,
|
|
7045
7172
|
$colorScheme: colorScheme,
|
|
7046
7173
|
...otherProps,
|
|
7047
7174
|
children: [
|
|
7048
|
-
/* @__PURE__ */
|
|
7175
|
+
/* @__PURE__ */ jsx185(
|
|
7049
7176
|
TagLabel,
|
|
7050
7177
|
{
|
|
7051
7178
|
...labelProps,
|
|
@@ -7053,7 +7180,7 @@ var Tag = forwardRef11(
|
|
|
7053
7180
|
children: label
|
|
7054
7181
|
}
|
|
7055
7182
|
),
|
|
7056
|
-
/* @__PURE__ */
|
|
7183
|
+
/* @__PURE__ */ jsx185(
|
|
7057
7184
|
RemoveButton,
|
|
7058
7185
|
{
|
|
7059
7186
|
colorScheme,
|
|
@@ -7069,26 +7196,26 @@ var Tag = forwardRef11(
|
|
|
7069
7196
|
Tag.displayName = "Tag";
|
|
7070
7197
|
|
|
7071
7198
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
7072
|
-
import
|
|
7199
|
+
import styled27 from "styled-components";
|
|
7073
7200
|
import { isNotNil as isNotNil10 } from "@wistia/type-guards";
|
|
7074
|
-
import { jsx as
|
|
7201
|
+
import { jsx as jsx186, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
7075
7202
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
7076
7203
|
if (iconOnly) {
|
|
7077
|
-
return /* @__PURE__ */
|
|
7204
|
+
return /* @__PURE__ */ jsx186(
|
|
7078
7205
|
"g",
|
|
7079
7206
|
{
|
|
7080
7207
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
7081
7208
|
fill: brandmarkColor,
|
|
7082
|
-
children: /* @__PURE__ */
|
|
7209
|
+
children: /* @__PURE__ */ jsx186("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" })
|
|
7083
7210
|
}
|
|
7084
7211
|
);
|
|
7085
7212
|
}
|
|
7086
|
-
return /* @__PURE__ */
|
|
7213
|
+
return /* @__PURE__ */ jsx186(
|
|
7087
7214
|
"g",
|
|
7088
7215
|
{
|
|
7089
7216
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
7090
7217
|
fill: brandmarkColor,
|
|
7091
|
-
children: /* @__PURE__ */
|
|
7218
|
+
children: /* @__PURE__ */ jsx186("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" })
|
|
7092
7219
|
}
|
|
7093
7220
|
);
|
|
7094
7221
|
};
|
|
@@ -7096,12 +7223,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
7096
7223
|
if (iconOnly) {
|
|
7097
7224
|
return null;
|
|
7098
7225
|
}
|
|
7099
|
-
return /* @__PURE__ */
|
|
7226
|
+
return /* @__PURE__ */ jsx186(
|
|
7100
7227
|
"g",
|
|
7101
7228
|
{
|
|
7102
7229
|
"data-testid": "ui-wistia-logo-logotype",
|
|
7103
7230
|
fill: logotypeColor,
|
|
7104
|
-
children: /* @__PURE__ */
|
|
7231
|
+
children: /* @__PURE__ */ jsx186("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" })
|
|
7105
7232
|
}
|
|
7106
7233
|
);
|
|
7107
7234
|
};
|
|
@@ -7111,7 +7238,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
7111
7238
|
}
|
|
7112
7239
|
return "0 0 144 31.47";
|
|
7113
7240
|
};
|
|
7114
|
-
var WistiaLogoComponent =
|
|
7241
|
+
var WistiaLogoComponent = styled27.svg`
|
|
7115
7242
|
height: ${({ height }) => `${height}px`};
|
|
7116
7243
|
|
|
7117
7244
|
/* ensure it will always fit on mobile */
|
|
@@ -7153,7 +7280,7 @@ var WistiaLogo = ({
|
|
|
7153
7280
|
};
|
|
7154
7281
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
7155
7282
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
7156
|
-
const Logo = /* @__PURE__ */
|
|
7283
|
+
const Logo = /* @__PURE__ */ jsxs14(
|
|
7157
7284
|
WistiaLogoComponent,
|
|
7158
7285
|
{
|
|
7159
7286
|
$hoverColor: hoverColor,
|
|
@@ -7163,14 +7290,14 @@ var WistiaLogo = ({
|
|
|
7163
7290
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7164
7291
|
...otherProps,
|
|
7165
7292
|
children: [
|
|
7166
|
-
/* @__PURE__ */
|
|
7167
|
-
isNotNil10(description) ? /* @__PURE__ */
|
|
7293
|
+
/* @__PURE__ */ jsx186("title", { children: title }),
|
|
7294
|
+
isNotNil10(description) ? /* @__PURE__ */ jsx186("desc", { children: description }) : null,
|
|
7168
7295
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
7169
7296
|
renderLogotype(logotypeColor, iconOnly)
|
|
7170
7297
|
]
|
|
7171
7298
|
}
|
|
7172
7299
|
);
|
|
7173
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
7300
|
+
return href !== void 0 ? /* @__PURE__ */ jsx186("a", { href, children: Logo }) : Logo;
|
|
7174
7301
|
};
|
|
7175
7302
|
WistiaLogo.displayName = "WistiaLogo";
|
|
7176
7303
|
export {
|
|
@@ -7195,6 +7322,7 @@ export {
|
|
|
7195
7322
|
MenuItemLabel,
|
|
7196
7323
|
MenuLabel,
|
|
7197
7324
|
MenuRadioGroup,
|
|
7325
|
+
Radio,
|
|
7198
7326
|
RadioMenuItem,
|
|
7199
7327
|
ScreenReaderOnly,
|
|
7200
7328
|
Stack,
|