@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.cjs
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
|
*
|
|
@@ -75,6 +75,11 @@ __export(index_exports, {
|
|
|
75
75
|
RadioGroup: () => RadioGroup,
|
|
76
76
|
RadioMenuItem: () => RadioMenuItem,
|
|
77
77
|
ScreenReaderOnly: () => ScreenReaderOnly,
|
|
78
|
+
SegmentedControl: () => SegmentedControl,
|
|
79
|
+
SegmentedControlItem: () => SegmentedControlItem,
|
|
80
|
+
Select: () => Select,
|
|
81
|
+
SelectOption: () => SelectOption,
|
|
82
|
+
SelectOptionGroup: () => SelectOptionGroup,
|
|
78
83
|
Stack: () => Stack,
|
|
79
84
|
SubMenu: () => SubMenu,
|
|
80
85
|
Tag: () => Tag,
|
|
@@ -5468,12 +5473,25 @@ var generateHref = (href, type, disabled) => {
|
|
|
5468
5473
|
var isButton = (props) => (0, import_type_guards10.isUndefined)(props.href);
|
|
5469
5474
|
var isLink = (props) => (0, import_type_guards10.isNotUndefined)(props.href);
|
|
5470
5475
|
var StyledLink = import_styled_components17.default.a`
|
|
5476
|
+
--link-icon-size: 14px;
|
|
5477
|
+
|
|
5471
5478
|
${({ href }) => (0, import_type_guards10.isNil)(href) && buttonResetCss};
|
|
5472
5479
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
5473
5480
|
cursor: pointer;
|
|
5474
5481
|
font-family: var(--wui-typography-family-default);
|
|
5475
5482
|
color: var(--wui-color-text-link);
|
|
5476
5483
|
text-decoration: ${({ $underline }) => $underline ? "underline" : "none"};
|
|
5484
|
+
display: inline-flex;
|
|
5485
|
+
align-items: baseline;
|
|
5486
|
+
gap: var(--wui-space-01);
|
|
5487
|
+
|
|
5488
|
+
/* This ensure that the icon is the corect color when the style is solid or the button is disabled */
|
|
5489
|
+
&& {
|
|
5490
|
+
svg {
|
|
5491
|
+
width: var(--link-icon-size);
|
|
5492
|
+
height: var(--link-icon-size);
|
|
5493
|
+
}
|
|
5494
|
+
}
|
|
5477
5495
|
`;
|
|
5478
5496
|
var Link = (0, import_react11.forwardRef)(
|
|
5479
5497
|
({
|
|
@@ -5483,6 +5501,8 @@ var Link = (0, import_react11.forwardRef)(
|
|
|
5483
5501
|
disabled = false,
|
|
5484
5502
|
colorScheme = "inherit",
|
|
5485
5503
|
underline = false,
|
|
5504
|
+
leftIcon,
|
|
5505
|
+
rightIcon,
|
|
5486
5506
|
...props
|
|
5487
5507
|
}, ref) => {
|
|
5488
5508
|
const inRouterContext = (0, import_react_router_dom.useInRouterContext)();
|
|
@@ -5541,13 +5561,17 @@ var Link = (0, import_react11.forwardRef)(
|
|
|
5541
5561
|
to: to ?? "",
|
|
5542
5562
|
children
|
|
5543
5563
|
}
|
|
5544
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime161.
|
|
5564
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(
|
|
5545
5565
|
StyledLink,
|
|
5546
5566
|
{
|
|
5547
5567
|
as: "a",
|
|
5548
5568
|
...combinedProps,
|
|
5549
5569
|
href: to,
|
|
5550
|
-
children
|
|
5570
|
+
children: [
|
|
5571
|
+
leftIcon ?? null,
|
|
5572
|
+
children,
|
|
5573
|
+
rightIcon ?? null
|
|
5574
|
+
]
|
|
5551
5575
|
}
|
|
5552
5576
|
);
|
|
5553
5577
|
}
|
|
@@ -6020,7 +6044,7 @@ var StyledBadge = import_styled_components22.default.div`
|
|
|
6020
6044
|
padding: var(--wui-space-01) var(--wui-space-02);
|
|
6021
6045
|
width: fit-content;
|
|
6022
6046
|
|
|
6023
|
-
/*
|
|
6047
|
+
/* Icon component size */
|
|
6024
6048
|
svg {
|
|
6025
6049
|
height: 12px;
|
|
6026
6050
|
width: 12px;
|
|
@@ -7821,8 +7845,8 @@ var StyledSubTrigger = (0, import_styled_components43.default)(import_react_drop
|
|
|
7821
7845
|
`;
|
|
7822
7846
|
var SubMenuTrigger = (props) => {
|
|
7823
7847
|
const { isSmAndUp } = useMq();
|
|
7824
|
-
const
|
|
7825
|
-
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
7848
|
+
const Trigger3 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
|
|
7849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Trigger3, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
7826
7850
|
MenuItemButton,
|
|
7827
7851
|
{
|
|
7828
7852
|
...props,
|
|
@@ -8434,12 +8458,143 @@ var Radio = (0, import_react39.forwardRef)(
|
|
|
8434
8458
|
);
|
|
8435
8459
|
Radio.displayName = "Radio";
|
|
8436
8460
|
|
|
8437
|
-
// src/components/
|
|
8461
|
+
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
8438
8462
|
var import_react40 = require("react");
|
|
8439
8463
|
var import_styled_components51 = __toESM(require("styled-components"));
|
|
8464
|
+
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
8440
8465
|
var import_type_guards30 = require("@wistia/type-guards");
|
|
8441
8466
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
8442
|
-
var
|
|
8467
|
+
var StyledSegmentedControl = (0, import_styled_components51.default)(import_react_toggle_group.Root)`
|
|
8468
|
+
display: inline-flex;
|
|
8469
|
+
background-color: var(--wui-color-bg-surface-secondary);
|
|
8470
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
8471
|
+
border: 2px solid var(--wui-color-bg-surface-secondary);
|
|
8472
|
+
gap: var(--wui-space-01);
|
|
8473
|
+
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
8474
|
+
`;
|
|
8475
|
+
var SegmentedControl = (0, import_react40.forwardRef)(
|
|
8476
|
+
({
|
|
8477
|
+
children,
|
|
8478
|
+
disabled = false,
|
|
8479
|
+
fullWidth = false,
|
|
8480
|
+
selectedValue,
|
|
8481
|
+
onSelectedValueChange,
|
|
8482
|
+
...props
|
|
8483
|
+
}, ref) => {
|
|
8484
|
+
if ((0, import_type_guards30.isNil)(children)) {
|
|
8485
|
+
return null;
|
|
8486
|
+
}
|
|
8487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
8488
|
+
StyledSegmentedControl,
|
|
8489
|
+
{
|
|
8490
|
+
ref,
|
|
8491
|
+
$fullWidth: fullWidth,
|
|
8492
|
+
disabled,
|
|
8493
|
+
loop: true,
|
|
8494
|
+
onValueChange: onSelectedValueChange,
|
|
8495
|
+
rovingFocus: true,
|
|
8496
|
+
type: "single",
|
|
8497
|
+
value: selectedValue,
|
|
8498
|
+
...props,
|
|
8499
|
+
children
|
|
8500
|
+
}
|
|
8501
|
+
);
|
|
8502
|
+
}
|
|
8503
|
+
);
|
|
8504
|
+
SegmentedControl.displayName = "SegmentedControl";
|
|
8505
|
+
|
|
8506
|
+
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
8507
|
+
var import_react41 = require("react");
|
|
8508
|
+
var import_styled_components52 = __toESM(require("styled-components"));
|
|
8509
|
+
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
8510
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
8511
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
8512
|
+
var StyledSegmentedControlItem = (0, import_styled_components52.default)(import_react_toggle_group2.Item)`
|
|
8513
|
+
all: unset; /* ToggleGroupItem is a button element */
|
|
8514
|
+
align-items: center;
|
|
8515
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
8516
|
+
color: var(--wui-color-text-secondary);
|
|
8517
|
+
cursor: pointer;
|
|
8518
|
+
display: flex;
|
|
8519
|
+
flex-grow: 1;
|
|
8520
|
+
flex-shrink: 1;
|
|
8521
|
+
font-size: var(--wui-typography-label-3-size);
|
|
8522
|
+
justify-content: center;
|
|
8523
|
+
padding: 6px 8px;
|
|
8524
|
+
user-select: none;
|
|
8525
|
+
|
|
8526
|
+
/* Icon component */
|
|
8527
|
+
svg {
|
|
8528
|
+
height: 16px;
|
|
8529
|
+
width: 16px;
|
|
8530
|
+
|
|
8531
|
+
/* add right margin if there's a label and an icon */
|
|
8532
|
+
${({ $hasLabel }) => $hasLabel ? "margin-right: var(--wui-space-01)" : ""}
|
|
8533
|
+
}
|
|
8534
|
+
|
|
8535
|
+
&:hover {
|
|
8536
|
+
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
8537
|
+
}
|
|
8538
|
+
|
|
8539
|
+
&:focus-visible {
|
|
8540
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
8541
|
+
}
|
|
8542
|
+
|
|
8543
|
+
&[data-state='on'] {
|
|
8544
|
+
background-color: var(--wui-color-bg-fill-white);
|
|
8545
|
+
color: var(--wui-color-text-selected);
|
|
8546
|
+
cursor: default;
|
|
8547
|
+
}
|
|
8548
|
+
|
|
8549
|
+
&:focus-visible,
|
|
8550
|
+
&[data-state='on'] {
|
|
8551
|
+
svg path {
|
|
8552
|
+
fill: var(--wui-color-focus-ring);
|
|
8553
|
+
}
|
|
8554
|
+
}
|
|
8555
|
+
|
|
8556
|
+
&[data-disabled] {
|
|
8557
|
+
cursor: not-allowed;
|
|
8558
|
+
|
|
8559
|
+
&:hover {
|
|
8560
|
+
background-color: inherit;
|
|
8561
|
+
}
|
|
8562
|
+
}
|
|
8563
|
+
`;
|
|
8564
|
+
var SegmentedControlItem = (0, import_react41.forwardRef)(
|
|
8565
|
+
({ disabled, icon, label, "aria-label": ariaLabel, value }, ref) => {
|
|
8566
|
+
const handleClick = (event) => {
|
|
8567
|
+
const target = event.target;
|
|
8568
|
+
const { state } = target.dataset;
|
|
8569
|
+
if (state === "on") {
|
|
8570
|
+
event.preventDefault();
|
|
8571
|
+
}
|
|
8572
|
+
};
|
|
8573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
|
|
8574
|
+
StyledSegmentedControlItem,
|
|
8575
|
+
{
|
|
8576
|
+
ref,
|
|
8577
|
+
$hasLabel: (0, import_type_guards31.isNotNil)(label),
|
|
8578
|
+
"aria-label": (0, import_type_guards31.isNotNil)(label) ? void 0 : ariaLabel,
|
|
8579
|
+
disabled,
|
|
8580
|
+
onClick: handleClick,
|
|
8581
|
+
value,
|
|
8582
|
+
children: [
|
|
8583
|
+
icon,
|
|
8584
|
+
label
|
|
8585
|
+
]
|
|
8586
|
+
}
|
|
8587
|
+
);
|
|
8588
|
+
}
|
|
8589
|
+
);
|
|
8590
|
+
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
8591
|
+
|
|
8592
|
+
// src/components/Tag/Tag.tsx
|
|
8593
|
+
var import_react42 = require("react");
|
|
8594
|
+
var import_styled_components53 = __toESM(require("styled-components"));
|
|
8595
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
8596
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
8597
|
+
var TagLabel = import_styled_components53.default.a`
|
|
8443
8598
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8444
8599
|
font-size: var(--wui-typography-label-4-size);
|
|
8445
8600
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -8467,14 +8622,14 @@ var TagLabel = import_styled_components51.default.a`
|
|
|
8467
8622
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8468
8623
|
}
|
|
8469
8624
|
`;
|
|
8470
|
-
var TagDivider =
|
|
8625
|
+
var TagDivider = import_styled_components53.default.div`
|
|
8471
8626
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8472
8627
|
border-left: 1px solid var(--wui-color-border);
|
|
8473
8628
|
display: flex;
|
|
8474
8629
|
height: 14px;
|
|
8475
8630
|
width: 1px;
|
|
8476
8631
|
`;
|
|
8477
|
-
var StyledRemoveButton =
|
|
8632
|
+
var StyledRemoveButton = import_styled_components53.default.button`
|
|
8478
8633
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8479
8634
|
all: unset;
|
|
8480
8635
|
cursor: pointer;
|
|
@@ -8502,7 +8657,7 @@ var StyledRemoveButton = import_styled_components51.default.button`
|
|
|
8502
8657
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8503
8658
|
}
|
|
8504
8659
|
`;
|
|
8505
|
-
var StyledTag =
|
|
8660
|
+
var StyledTag = import_styled_components53.default.div`
|
|
8506
8661
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8507
8662
|
align-items: center;
|
|
8508
8663
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -8511,47 +8666,47 @@ var StyledTag = import_styled_components51.default.div`
|
|
|
8511
8666
|
overflow: hidden;
|
|
8512
8667
|
`;
|
|
8513
8668
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
8514
|
-
if ((0,
|
|
8669
|
+
if ((0, import_type_guards32.isNil)(onClickRemove)) {
|
|
8515
8670
|
return null;
|
|
8516
8671
|
}
|
|
8517
|
-
if ((0,
|
|
8672
|
+
if ((0, import_type_guards32.isNil)(onClickRemoveLabel)) {
|
|
8518
8673
|
throw new Error(
|
|
8519
8674
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
8520
8675
|
);
|
|
8521
8676
|
}
|
|
8522
|
-
return /* @__PURE__ */ (0,
|
|
8523
|
-
/* @__PURE__ */ (0,
|
|
8524
|
-
/* @__PURE__ */ (0,
|
|
8677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(import_jsx_runtime205.Fragment, { children: [
|
|
8678
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
8679
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
|
|
8525
8680
|
StyledRemoveButton,
|
|
8526
8681
|
{
|
|
8527
8682
|
$colorScheme: colorScheme,
|
|
8528
8683
|
onClick: onClickRemove,
|
|
8529
8684
|
type: "button",
|
|
8530
8685
|
children: [
|
|
8531
|
-
/* @__PURE__ */ (0,
|
|
8686
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8532
8687
|
Icon,
|
|
8533
8688
|
{
|
|
8534
8689
|
size: "sm",
|
|
8535
8690
|
type: "close"
|
|
8536
8691
|
}
|
|
8537
8692
|
),
|
|
8538
|
-
/* @__PURE__ */ (0,
|
|
8693
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
8539
8694
|
]
|
|
8540
8695
|
}
|
|
8541
8696
|
)
|
|
8542
8697
|
] });
|
|
8543
8698
|
};
|
|
8544
|
-
var Tag = (0,
|
|
8699
|
+
var Tag = (0, import_react42.forwardRef)(
|
|
8545
8700
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
8546
|
-
const labelProps = (0,
|
|
8547
|
-
return /* @__PURE__ */ (0,
|
|
8701
|
+
const labelProps = (0, import_type_guards32.isNotNil)(href) && (0, import_type_guards32.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
8702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
|
|
8548
8703
|
StyledTag,
|
|
8549
8704
|
{
|
|
8550
8705
|
ref,
|
|
8551
8706
|
$colorScheme: colorScheme,
|
|
8552
8707
|
...otherProps,
|
|
8553
8708
|
children: [
|
|
8554
|
-
/* @__PURE__ */ (0,
|
|
8709
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8555
8710
|
TagLabel,
|
|
8556
8711
|
{
|
|
8557
8712
|
...labelProps,
|
|
@@ -8559,7 +8714,7 @@ var Tag = (0, import_react40.forwardRef)(
|
|
|
8559
8714
|
children: label
|
|
8560
8715
|
}
|
|
8561
8716
|
),
|
|
8562
|
-
/* @__PURE__ */ (0,
|
|
8717
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8563
8718
|
RemoveButton,
|
|
8564
8719
|
{
|
|
8565
8720
|
colorScheme,
|
|
@@ -8576,16 +8731,16 @@ Tag.displayName = "Tag";
|
|
|
8576
8731
|
|
|
8577
8732
|
// src/components/Tooltip/Tooltip.tsx
|
|
8578
8733
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8579
|
-
var
|
|
8580
|
-
var
|
|
8581
|
-
var CompactTooltipStyles =
|
|
8734
|
+
var import_styled_components54 = __toESM(require("styled-components"));
|
|
8735
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
8736
|
+
var CompactTooltipStyles = import_styled_components54.css`
|
|
8582
8737
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8583
8738
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8584
8739
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8585
8740
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8586
8741
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8587
8742
|
`;
|
|
8588
|
-
var StyledContent = (0,
|
|
8743
|
+
var StyledContent = (0, import_styled_components54.default)(import_react_tooltip2.Content)`
|
|
8589
8744
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8590
8745
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8591
8746
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8643,14 +8798,14 @@ var Tooltip = ({
|
|
|
8643
8798
|
if (forceOpen === true) {
|
|
8644
8799
|
rootProps.open = true;
|
|
8645
8800
|
}
|
|
8646
|
-
return /* @__PURE__ */ (0,
|
|
8801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
8647
8802
|
import_react_tooltip2.Root,
|
|
8648
8803
|
{
|
|
8649
8804
|
delayDuration: delay,
|
|
8650
8805
|
...rootProps,
|
|
8651
8806
|
children: [
|
|
8652
|
-
/* @__PURE__ */ (0,
|
|
8653
|
-
/* @__PURE__ */ (0,
|
|
8807
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
8808
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
8654
8809
|
StyledContent,
|
|
8655
8810
|
{
|
|
8656
8811
|
$compact: compact,
|
|
@@ -8658,7 +8813,7 @@ var Tooltip = ({
|
|
|
8658
8813
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8659
8814
|
children: [
|
|
8660
8815
|
content,
|
|
8661
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
8816
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
8662
8817
|
"svg",
|
|
8663
8818
|
{
|
|
8664
8819
|
fill: "var(--tooltip-bg)",
|
|
@@ -8667,7 +8822,7 @@ var Tooltip = ({
|
|
|
8667
8822
|
viewBox: "0 0 12 8",
|
|
8668
8823
|
width: "12",
|
|
8669
8824
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8670
|
-
children: /* @__PURE__ */ (0,
|
|
8825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
8671
8826
|
}
|
|
8672
8827
|
) }) : null
|
|
8673
8828
|
]
|
|
@@ -8680,26 +8835,26 @@ var Tooltip = ({
|
|
|
8680
8835
|
Tooltip.displayName = "Tooltip";
|
|
8681
8836
|
|
|
8682
8837
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
8683
|
-
var
|
|
8684
|
-
var
|
|
8685
|
-
var
|
|
8838
|
+
var import_styled_components55 = __toESM(require("styled-components"));
|
|
8839
|
+
var import_type_guards33 = require("@wistia/type-guards");
|
|
8840
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
8686
8841
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
8687
8842
|
if (iconOnly) {
|
|
8688
|
-
return /* @__PURE__ */ (0,
|
|
8843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8689
8844
|
"g",
|
|
8690
8845
|
{
|
|
8691
8846
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8692
8847
|
fill: brandmarkColor,
|
|
8693
|
-
children: /* @__PURE__ */ (0,
|
|
8848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
8694
8849
|
}
|
|
8695
8850
|
);
|
|
8696
8851
|
}
|
|
8697
|
-
return /* @__PURE__ */ (0,
|
|
8852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8698
8853
|
"g",
|
|
8699
8854
|
{
|
|
8700
8855
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8701
8856
|
fill: brandmarkColor,
|
|
8702
|
-
children: /* @__PURE__ */ (0,
|
|
8857
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
8703
8858
|
}
|
|
8704
8859
|
);
|
|
8705
8860
|
};
|
|
@@ -8707,12 +8862,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
8707
8862
|
if (iconOnly) {
|
|
8708
8863
|
return null;
|
|
8709
8864
|
}
|
|
8710
|
-
return /* @__PURE__ */ (0,
|
|
8865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8711
8866
|
"g",
|
|
8712
8867
|
{
|
|
8713
8868
|
"data-testid": "ui-wistia-logo-logotype",
|
|
8714
8869
|
fill: logotypeColor,
|
|
8715
|
-
children: /* @__PURE__ */ (0,
|
|
8870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
|
|
8716
8871
|
}
|
|
8717
8872
|
);
|
|
8718
8873
|
};
|
|
@@ -8722,7 +8877,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
8722
8877
|
}
|
|
8723
8878
|
return "0 0 144 31.47";
|
|
8724
8879
|
};
|
|
8725
|
-
var WistiaLogoComponent =
|
|
8880
|
+
var WistiaLogoComponent = import_styled_components55.default.svg`
|
|
8726
8881
|
height: ${({ height }) => `${height}px`};
|
|
8727
8882
|
|
|
8728
8883
|
/* ensure it will always fit on mobile */
|
|
@@ -8764,7 +8919,7 @@ var WistiaLogo = ({
|
|
|
8764
8919
|
};
|
|
8765
8920
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
8766
8921
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
8767
|
-
const Logo = /* @__PURE__ */ (0,
|
|
8922
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(
|
|
8768
8923
|
WistiaLogoComponent,
|
|
8769
8924
|
{
|
|
8770
8925
|
$hoverColor: hoverColor,
|
|
@@ -8774,16 +8929,200 @@ var WistiaLogo = ({
|
|
|
8774
8929
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8775
8930
|
...otherProps,
|
|
8776
8931
|
children: [
|
|
8777
|
-
/* @__PURE__ */ (0,
|
|
8778
|
-
(0,
|
|
8932
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("title", { children: title }),
|
|
8933
|
+
(0, import_type_guards33.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("desc", { children: description }) : null,
|
|
8779
8934
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
8780
8935
|
renderLogotype(logotypeColor, iconOnly)
|
|
8781
8936
|
]
|
|
8782
8937
|
}
|
|
8783
8938
|
);
|
|
8784
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
8939
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("a", { href, children: Logo }) : Logo;
|
|
8785
8940
|
};
|
|
8786
8941
|
WistiaLogo.displayName = "WistiaLogo";
|
|
8942
|
+
|
|
8943
|
+
// src/components/Select/Select.tsx
|
|
8944
|
+
var import_react_select = require("@radix-ui/react-select");
|
|
8945
|
+
var import_react43 = require("react");
|
|
8946
|
+
var import_styled_components56 = __toESM(require("styled-components"));
|
|
8947
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8948
|
+
var StyledTrigger = (0, import_styled_components56.default)(import_react_select.Trigger)`
|
|
8949
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8950
|
+
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
8951
|
+
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
8952
|
+
--wui-select-color-border: var(--wui-color-border);
|
|
8953
|
+
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
8954
|
+
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
8955
|
+
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
8956
|
+
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
8957
|
+
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
8958
|
+
--wui-select-vertical-padding: var(--wui-space-02);
|
|
8959
|
+
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
8960
|
+
--wui-select-placeholder: var(--wui-gray-10);
|
|
8961
|
+
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
8962
|
+
|
|
8963
|
+
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
8964
|
+
background-color: var(--wui-select-color-bg);
|
|
8965
|
+
border: 1px solid var(--wui-select-color-border);
|
|
8966
|
+
border-radius: var(--wui-select-border-radius);
|
|
8967
|
+
min-width: 200px;
|
|
8968
|
+
text-align: left;
|
|
8969
|
+
display: inline-flex;
|
|
8970
|
+
align-items: center;
|
|
8971
|
+
justify-content: space-between;
|
|
8972
|
+
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
8973
|
+
|
|
8974
|
+
&[aria-expanded='true'],
|
|
8975
|
+
&:focus {
|
|
8976
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
8977
|
+
}
|
|
8978
|
+
|
|
8979
|
+
&[aria-invalid='true'] {
|
|
8980
|
+
outline: 2px solid var(--wui-select-color-border-error);
|
|
8981
|
+
color: var(--wui-select-color-text-error);
|
|
8982
|
+
}
|
|
8983
|
+
|
|
8984
|
+
&:disabled {
|
|
8985
|
+
border-color: var(--wui-color-bg-surface-disabled);
|
|
8986
|
+
background-color: var(--wui-color-bg-surface-disabled);
|
|
8987
|
+
}
|
|
8988
|
+
`;
|
|
8989
|
+
var StyledContent2 = (0, import_styled_components56.default)(import_react_select.Content)`
|
|
8990
|
+
--wui-select-content-border: var(--wui-color-border);
|
|
8991
|
+
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
8992
|
+
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
8993
|
+
--wui-select-option-padding: var(--wui-space-02);
|
|
8994
|
+
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
8995
|
+
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
8996
|
+
|
|
8997
|
+
overflow: hidden;
|
|
8998
|
+
transform: translateY(8px);
|
|
8999
|
+
background-color: var(--wui-select-content-bg);
|
|
9000
|
+
border: 1px solid var(--wui-select-content-border);
|
|
9001
|
+
border-radius: var(--wui-select-content-border-radius);
|
|
9002
|
+
padding: var(--wui-select-option-padding);
|
|
9003
|
+
min-width: 200px;
|
|
9004
|
+
`;
|
|
9005
|
+
var Select = (0, import_react43.forwardRef)(
|
|
9006
|
+
({
|
|
9007
|
+
colorScheme = "inherit",
|
|
9008
|
+
children,
|
|
9009
|
+
onChange = () => null,
|
|
9010
|
+
placeholder = "Select...",
|
|
9011
|
+
fullWidth = false,
|
|
9012
|
+
...props
|
|
9013
|
+
}, forwardedRef) => {
|
|
9014
|
+
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
9015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(
|
|
9016
|
+
import_react_select.Root,
|
|
9017
|
+
{
|
|
9018
|
+
...props,
|
|
9019
|
+
onValueChange: onChange,
|
|
9020
|
+
children: [
|
|
9021
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(
|
|
9022
|
+
StyledTrigger,
|
|
9023
|
+
{
|
|
9024
|
+
ref: forwardedRef,
|
|
9025
|
+
$colorScheme: colorScheme,
|
|
9026
|
+
$fullWidth: responsiveFullWidth,
|
|
9027
|
+
...props,
|
|
9028
|
+
children: [
|
|
9029
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Value, { placeholder }),
|
|
9030
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
9031
|
+
Icon,
|
|
9032
|
+
{
|
|
9033
|
+
size: "md",
|
|
9034
|
+
type: "caret-down"
|
|
9035
|
+
}
|
|
9036
|
+
)
|
|
9037
|
+
]
|
|
9038
|
+
}
|
|
9039
|
+
),
|
|
9040
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledContent2, { position: "popper", children: [
|
|
9041
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Icon, { type: "caret-up" }) }),
|
|
9042
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Viewport, { children }),
|
|
9043
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Icon, { type: "caret-down" }) })
|
|
9044
|
+
] }) })
|
|
9045
|
+
]
|
|
9046
|
+
}
|
|
9047
|
+
);
|
|
9048
|
+
}
|
|
9049
|
+
);
|
|
9050
|
+
Select.displayName = "Select";
|
|
9051
|
+
|
|
9052
|
+
// src/components/Select/SelectOption.tsx
|
|
9053
|
+
var import_react_select2 = require("@radix-ui/react-select");
|
|
9054
|
+
var import_react44 = require("react");
|
|
9055
|
+
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9056
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
9057
|
+
var StyledItem = (0, import_styled_components57.default)(import_react_select2.Item)`
|
|
9058
|
+
${variantStyleMap2.body3};
|
|
9059
|
+
display: flex;
|
|
9060
|
+
padding: var(--wui-select-option-padding);
|
|
9061
|
+
gap: var(--wui-select-option-inner-gap);
|
|
9062
|
+
font-size: var(--font-size);
|
|
9063
|
+
font-weight: var(--font-weight);
|
|
9064
|
+
border-radius: var(--wui-border-radius-01);
|
|
9065
|
+
|
|
9066
|
+
&:hover,
|
|
9067
|
+
&:focus-visible {
|
|
9068
|
+
background-color: var(--wui-select-option-bg-hover);
|
|
9069
|
+
outline: none;
|
|
9070
|
+
}
|
|
9071
|
+
|
|
9072
|
+
&[aria-disabled='true'] {
|
|
9073
|
+
color: var(--wui-color-text-disabled);
|
|
9074
|
+
}
|
|
9075
|
+
|
|
9076
|
+
&[aria-disabled='true']:hover {
|
|
9077
|
+
background-color: transparent;
|
|
9078
|
+
}
|
|
9079
|
+
`;
|
|
9080
|
+
var StyledIconContainer = import_styled_components57.default.span`
|
|
9081
|
+
width: 12px;
|
|
9082
|
+
`;
|
|
9083
|
+
var SelectOption = (0, import_react44.forwardRef)(
|
|
9084
|
+
({ children, ...props }, forwardedRef) => {
|
|
9085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
|
|
9086
|
+
StyledItem,
|
|
9087
|
+
{
|
|
9088
|
+
...props,
|
|
9089
|
+
ref: forwardedRef,
|
|
9090
|
+
children: [
|
|
9091
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
|
|
9092
|
+
Icon,
|
|
9093
|
+
{
|
|
9094
|
+
size: "sm",
|
|
9095
|
+
type: "checkmark"
|
|
9096
|
+
}
|
|
9097
|
+
) }) }),
|
|
9098
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_select2.ItemText, { children })
|
|
9099
|
+
]
|
|
9100
|
+
}
|
|
9101
|
+
);
|
|
9102
|
+
}
|
|
9103
|
+
);
|
|
9104
|
+
SelectOption.displayName = "Option";
|
|
9105
|
+
|
|
9106
|
+
// src/components/Select/SelectOptionGroup.tsx
|
|
9107
|
+
var import_react_select3 = require("@radix-ui/react-select");
|
|
9108
|
+
var import_styled_components58 = __toESM(require("styled-components"));
|
|
9109
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
9110
|
+
var StyledLabel3 = (0, import_styled_components58.default)(import_react_select3.Label)`
|
|
9111
|
+
padding: var(--wui-select-option-padding);
|
|
9112
|
+
`;
|
|
9113
|
+
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
9114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
9115
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(StyledLabel3, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
9116
|
+
Text,
|
|
9117
|
+
{
|
|
9118
|
+
prominence: "secondary",
|
|
9119
|
+
variant: "body3",
|
|
9120
|
+
children: label
|
|
9121
|
+
}
|
|
9122
|
+
) }),
|
|
9123
|
+
children
|
|
9124
|
+
] });
|
|
9125
|
+
};
|
|
8787
9126
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8788
9127
|
0 && (module.exports = {
|
|
8789
9128
|
ActionButton,
|
|
@@ -8822,6 +9161,11 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
8822
9161
|
RadioGroup,
|
|
8823
9162
|
RadioMenuItem,
|
|
8824
9163
|
ScreenReaderOnly,
|
|
9164
|
+
SegmentedControl,
|
|
9165
|
+
SegmentedControlItem,
|
|
9166
|
+
Select,
|
|
9167
|
+
SelectOption,
|
|
9168
|
+
SelectOptionGroup,
|
|
8825
9169
|
Stack,
|
|
8826
9170
|
SubMenu,
|
|
8827
9171
|
Tag,
|