@wistia/ui 0.0.1 → 0.0.2
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 +218 -210
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +123 -70
- package/dist/index.d.ts +123 -70
- package/dist/index.mjs +223 -216
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.0.
|
|
3
|
+
* @license @wistia/ui v0.0.2
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2024, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -47,6 +47,7 @@ __export(src_exports, {
|
|
|
47
47
|
Heading: () => Heading,
|
|
48
48
|
Icon: () => Icon,
|
|
49
49
|
IconButton: () => IconButton,
|
|
50
|
+
Link: () => Link,
|
|
50
51
|
ScreenReaderOnly: () => ScreenReaderOnly,
|
|
51
52
|
Stack: () => Stack,
|
|
52
53
|
Text: () => Text,
|
|
@@ -1071,7 +1072,7 @@ var spacingTokens = import_styled_components6.css`
|
|
|
1071
1072
|
var import_styled_components7 = require("styled-components");
|
|
1072
1073
|
var typographyTokens = import_styled_components7.css`
|
|
1073
1074
|
--typography-family-default: intervariable, sans-serif;
|
|
1074
|
-
--typography-family-brand:
|
|
1075
|
+
--typography-family-brand: 'GT Walsheim', sans-serif;
|
|
1075
1076
|
--typography-family-mono: 'IBM Plex Mono', monospace;
|
|
1076
1077
|
|
|
1077
1078
|
/* Brand Weights */
|
|
@@ -5503,12 +5504,167 @@ var HeadingComponent = (0, import_react9.forwardRef)(
|
|
|
5503
5504
|
HeadingComponent.displayName = "Heading";
|
|
5504
5505
|
var Heading = makePolymorphic(HeadingComponent);
|
|
5505
5506
|
|
|
5506
|
-
// src/components/
|
|
5507
|
+
// src/components/IconButton/IconButton.tsx
|
|
5508
|
+
var import_react10 = require("react");
|
|
5509
|
+
var import_styled_components21 = __toESM(require("styled-components"), 1);
|
|
5510
|
+
|
|
5511
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
5512
|
+
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
5507
5513
|
var import_styled_components20 = __toESM(require("styled-components"), 1);
|
|
5508
|
-
var import_type_guards12 = require("@wistia/type-guards");
|
|
5509
5514
|
var import_jsx_runtime163 = require("react/jsx-runtime");
|
|
5510
|
-
var
|
|
5511
|
-
var
|
|
5515
|
+
var CompactTooltipStyles = import_styled_components20.css`
|
|
5516
|
+
--tooltip-font-size: var(--typography-label-4-size);
|
|
5517
|
+
--tooltip-line-height: var(--typography-label-4-line-height);
|
|
5518
|
+
--tooltip-font-weight: var(--typography-label-4-weight);
|
|
5519
|
+
--tooltip-horizontal-padding: var(--space-02);
|
|
5520
|
+
--tooltip-vertical-padding: var(--space-03);
|
|
5521
|
+
`;
|
|
5522
|
+
var StyledContent = (0, import_styled_components20.default)(import_react_tooltip2.Content)`
|
|
5523
|
+
--tooltip-font-family: var(--typography-family-default);
|
|
5524
|
+
--tooltip-border-radius: var(--border-radius-05);
|
|
5525
|
+
--tooltip-bg: var(--color-bg-tooltip);
|
|
5526
|
+
--tooltip-color: var(--color-text-on-fill);
|
|
5527
|
+
--tooltip-font-size: var(--typography-label-3-size);
|
|
5528
|
+
--tooltip-line-height: var(--typography-label-3-line-height);
|
|
5529
|
+
--tooltip-font-weight: var(--typography-label-3-weight);
|
|
5530
|
+
--tooltip-horizontal-padding: var(--space-03);
|
|
5531
|
+
--tooltip-vertical-padding: var(--space-03);
|
|
5532
|
+
|
|
5533
|
+
${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
|
|
5534
|
+
|
|
5535
|
+
font-family: var(--tooltip-font-family);
|
|
5536
|
+
font-size: var(--tooltip-font-size);
|
|
5537
|
+
border-radius: var(--tooltip-border-radius);
|
|
5538
|
+
padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
|
|
5539
|
+
background-color: var(--tooltip-bg);
|
|
5540
|
+
color: var(--tooltip-color);
|
|
5541
|
+
user-select: none;
|
|
5542
|
+
animation-duration: 400ms;
|
|
5543
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
5544
|
+
will-change: transform, opacity;
|
|
5545
|
+
max-width: 30em;
|
|
5546
|
+
|
|
5547
|
+
&[data-state='delayed-open'][data-side='top'] {
|
|
5548
|
+
animation-name: slideDownAndFade;
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5551
|
+
&[data-state='delayed-open'][data-side='right'] {
|
|
5552
|
+
animation-name: slideLeftAndFade;
|
|
5553
|
+
}
|
|
5554
|
+
|
|
5555
|
+
&[data-state='delayed-open'][data-side='bottom'] {
|
|
5556
|
+
animation-name: slideUpAndFade;
|
|
5557
|
+
}
|
|
5558
|
+
|
|
5559
|
+
&[data-state='delayed-open'][data-side='left'] {
|
|
5560
|
+
animation-name: slideRightAndFade;
|
|
5561
|
+
}
|
|
5562
|
+
`;
|
|
5563
|
+
var VISUAL_OFFSET = 6;
|
|
5564
|
+
var Tooltip = ({
|
|
5565
|
+
delay = 700,
|
|
5566
|
+
direction = "top",
|
|
5567
|
+
content,
|
|
5568
|
+
children,
|
|
5569
|
+
forceOpen,
|
|
5570
|
+
compact = false,
|
|
5571
|
+
hideArrow = false
|
|
5572
|
+
}) => {
|
|
5573
|
+
const rootProps = {};
|
|
5574
|
+
if (content === "" || content === null) {
|
|
5575
|
+
rootProps.open = false;
|
|
5576
|
+
}
|
|
5577
|
+
if (forceOpen === true) {
|
|
5578
|
+
rootProps.open = true;
|
|
5579
|
+
}
|
|
5580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(
|
|
5581
|
+
import_react_tooltip2.Root,
|
|
5582
|
+
{
|
|
5583
|
+
delayDuration: delay,
|
|
5584
|
+
...rootProps,
|
|
5585
|
+
children: [
|
|
5586
|
+
/* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
5587
|
+
/* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(
|
|
5588
|
+
StyledContent,
|
|
5589
|
+
{
|
|
5590
|
+
$compact: compact,
|
|
5591
|
+
side: direction,
|
|
5592
|
+
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
5593
|
+
children: [
|
|
5594
|
+
content,
|
|
5595
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
|
|
5596
|
+
"svg",
|
|
5597
|
+
{
|
|
5598
|
+
fill: "var(--tooltip-bg)",
|
|
5599
|
+
height: "8",
|
|
5600
|
+
style: { transform: "translateY(-2px)" },
|
|
5601
|
+
viewBox: "0 0 12 8",
|
|
5602
|
+
width: "12",
|
|
5603
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5604
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime163.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" })
|
|
5605
|
+
}
|
|
5606
|
+
) }) : null
|
|
5607
|
+
]
|
|
5608
|
+
}
|
|
5609
|
+
) })
|
|
5610
|
+
]
|
|
5611
|
+
}
|
|
5612
|
+
);
|
|
5613
|
+
};
|
|
5614
|
+
Tooltip.displayName = "Tooltip";
|
|
5615
|
+
|
|
5616
|
+
// src/components/IconButton/IconButton.tsx
|
|
5617
|
+
var import_jsx_runtime164 = require("react/jsx-runtime");
|
|
5618
|
+
var buttonIconSizeMap = {
|
|
5619
|
+
small: "sm",
|
|
5620
|
+
medium: "md",
|
|
5621
|
+
large: "lg",
|
|
5622
|
+
hero: "xl"
|
|
5623
|
+
};
|
|
5624
|
+
var StyledButton2 = (0, import_styled_components21.default)(Button)`
|
|
5625
|
+
--icon-button-size-small: 24px;
|
|
5626
|
+
--icon-button-size-medium: 32px;
|
|
5627
|
+
--icon-button-size-large: 40px;
|
|
5628
|
+
--icon-button-size-hero: 48px;
|
|
5629
|
+
|
|
5630
|
+
border-radius: 50%;
|
|
5631
|
+
height: ${({ size }) => `var(--icon-button-size-${size})`};
|
|
5632
|
+
width: ${({ size }) => `var(--icon-button-size-${size})`};
|
|
5633
|
+
display: flex;
|
|
5634
|
+
justify-content: center;
|
|
5635
|
+
align-items: center;
|
|
5636
|
+
line-height: 1;
|
|
5637
|
+
`;
|
|
5638
|
+
var IconButton = (0, import_react10.forwardRef)(
|
|
5639
|
+
({ children, label, disableTooltip = false, size = "medium", ...props }, ref) => {
|
|
5640
|
+
const responsiveSize = useResponsiveProp(size);
|
|
5641
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
|
|
5642
|
+
StyledButton2,
|
|
5643
|
+
{
|
|
5644
|
+
...props,
|
|
5645
|
+
ref,
|
|
5646
|
+
"aria-label": label,
|
|
5647
|
+
"data-wistia-ui-icon-button": true,
|
|
5648
|
+
size: responsiveSize,
|
|
5649
|
+
children: (0, import_react10.cloneElement)(import_react10.Children.only(children), {
|
|
5650
|
+
size: buttonIconSizeMap[responsiveSize]
|
|
5651
|
+
})
|
|
5652
|
+
}
|
|
5653
|
+
);
|
|
5654
|
+
if (disableTooltip) {
|
|
5655
|
+
return button;
|
|
5656
|
+
}
|
|
5657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(Tooltip, { content: label, children: button });
|
|
5658
|
+
}
|
|
5659
|
+
);
|
|
5660
|
+
IconButton.displayName = "IconButton";
|
|
5661
|
+
|
|
5662
|
+
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
5663
|
+
var import_styled_components22 = __toESM(require("styled-components"), 1);
|
|
5664
|
+
var import_type_guards12 = require("@wistia/type-guards");
|
|
5665
|
+
var import_jsx_runtime165 = require("react/jsx-runtime");
|
|
5666
|
+
var VisuallyHidden = import_styled_components22.default.div({ ...visuallyHiddenStyle });
|
|
5667
|
+
var VisuallyHiddenButFocusable = import_styled_components22.default.div({
|
|
5512
5668
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
5513
5669
|
});
|
|
5514
5670
|
var ScreenReaderOnly = ({
|
|
@@ -5519,18 +5675,18 @@ var ScreenReaderOnly = ({
|
|
|
5519
5675
|
}) => {
|
|
5520
5676
|
const accessibleText = (0, import_type_guards12.isNotNil)(text) ? text : children;
|
|
5521
5677
|
if (focusable) {
|
|
5522
|
-
return /* @__PURE__ */ (0,
|
|
5678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
5523
5679
|
}
|
|
5524
|
-
return /* @__PURE__ */ (0,
|
|
5680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
5525
5681
|
};
|
|
5526
5682
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
5527
5683
|
|
|
5528
5684
|
// src/components/Stack/Stack.tsx
|
|
5529
|
-
var
|
|
5530
|
-
var
|
|
5531
|
-
var
|
|
5685
|
+
var import_react11 = require("react");
|
|
5686
|
+
var import_styled_components23 = __toESM(require("styled-components"), 1);
|
|
5687
|
+
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
5532
5688
|
var DEFAULT_ELEMENT2 = "div";
|
|
5533
|
-
var StyledStack =
|
|
5689
|
+
var StyledStack = import_styled_components23.default.div`
|
|
5534
5690
|
display: flex;
|
|
5535
5691
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
5536
5692
|
gap: ${({ gap }) => `var(--${gap})`};
|
|
@@ -5539,11 +5695,11 @@ var StyledStack = import_styled_components21.default.div`
|
|
|
5539
5695
|
flex: 1;
|
|
5540
5696
|
}
|
|
5541
5697
|
`;
|
|
5542
|
-
var StackComponent = (0,
|
|
5698
|
+
var StackComponent = (0, import_react11.forwardRef)(
|
|
5543
5699
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
5544
5700
|
const responsiveGap = useResponsiveProp(gap);
|
|
5545
5701
|
const responsiveDirection = useResponsiveProp(direction);
|
|
5546
|
-
return /* @__PURE__ */ (0,
|
|
5702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
|
|
5547
5703
|
StyledStack,
|
|
5548
5704
|
{
|
|
5549
5705
|
ref,
|
|
@@ -5559,90 +5715,90 @@ StackComponent.displayName = "Stack";
|
|
|
5559
5715
|
var Stack = makePolymorphic(StackComponent);
|
|
5560
5716
|
|
|
5561
5717
|
// src/components/Text/Text.tsx
|
|
5562
|
-
var
|
|
5563
|
-
var
|
|
5564
|
-
var
|
|
5565
|
-
var bodyBoldStyles =
|
|
5718
|
+
var import_react12 = require("react");
|
|
5719
|
+
var import_styled_components24 = __toESM(require("styled-components"), 1);
|
|
5720
|
+
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
5721
|
+
var bodyBoldStyles = import_styled_components24.css`
|
|
5566
5722
|
> strong,
|
|
5567
5723
|
b {
|
|
5568
5724
|
font-weight: var(--typography-weight-body-bold);
|
|
5569
5725
|
}
|
|
5570
5726
|
`;
|
|
5571
|
-
var labelBoldStyles =
|
|
5727
|
+
var labelBoldStyles = import_styled_components24.css`
|
|
5572
5728
|
> strong,
|
|
5573
5729
|
b {
|
|
5574
5730
|
font-weight: var(--typography-weight-label-bold);
|
|
5575
5731
|
}
|
|
5576
5732
|
`;
|
|
5577
|
-
var body1TextStyle =
|
|
5733
|
+
var body1TextStyle = import_styled_components24.css`
|
|
5578
5734
|
--font-family: var(--typography-body-1-family);
|
|
5579
5735
|
--font-size: var(--typography-body-1-size);
|
|
5580
5736
|
--font-weight: var(--typography-body-1-weight);
|
|
5581
5737
|
--line-height: var(--typography-body-1-line-height);
|
|
5582
5738
|
${bodyBoldStyles}
|
|
5583
5739
|
`;
|
|
5584
|
-
var body2TextStyle =
|
|
5740
|
+
var body2TextStyle = import_styled_components24.css`
|
|
5585
5741
|
--font-family: var(--typography-body-2-family);
|
|
5586
5742
|
--font-size: var(--typography-body-2-size);
|
|
5587
5743
|
--font-weight: var(--typography-body-2-weight);
|
|
5588
5744
|
--line-height: var(--typography-body-2-line-height);
|
|
5589
5745
|
${bodyBoldStyles}
|
|
5590
5746
|
`;
|
|
5591
|
-
var body3TextStyle =
|
|
5747
|
+
var body3TextStyle = import_styled_components24.css`
|
|
5592
5748
|
--font-family: var(--typography-body-3-family);
|
|
5593
5749
|
--font-size: var(--typography-body-3-size);
|
|
5594
5750
|
--font-weight: var(--typography-body-3-weight);
|
|
5595
5751
|
--line-height: var(--typography-body-3-line-height);
|
|
5596
5752
|
${bodyBoldStyles}
|
|
5597
5753
|
`;
|
|
5598
|
-
var body4TextStyle =
|
|
5754
|
+
var body4TextStyle = import_styled_components24.css`
|
|
5599
5755
|
--font-family: var(--typography-body-4-family);
|
|
5600
5756
|
--font-size: var(--typography-body-4-size);
|
|
5601
5757
|
--font-weight: var(--typography-body-4-weight);
|
|
5602
5758
|
--line-height: var(--typography-body-4-line-height);
|
|
5603
5759
|
${bodyBoldStyles}
|
|
5604
5760
|
`;
|
|
5605
|
-
var label1TextStyle =
|
|
5761
|
+
var label1TextStyle = import_styled_components24.css`
|
|
5606
5762
|
--font-family: var(--typography-label-1-family);
|
|
5607
5763
|
--font-size: var(--typography-label-1-size);
|
|
5608
5764
|
--font-weight: var(--typography-label-1-weight);
|
|
5609
5765
|
--line-height: var(--typography-label-1-line-height);
|
|
5610
5766
|
${labelBoldStyles}
|
|
5611
5767
|
`;
|
|
5612
|
-
var label2TextStyle =
|
|
5768
|
+
var label2TextStyle = import_styled_components24.css`
|
|
5613
5769
|
--font-family: var(--typography-label-2-family);
|
|
5614
5770
|
--font-size: var(--typography-label-2-size);
|
|
5615
5771
|
--font-weight: var(--typography-label-2-weight);
|
|
5616
5772
|
--line-height: var(--typography-label-2-line-height);
|
|
5617
5773
|
${labelBoldStyles}
|
|
5618
5774
|
`;
|
|
5619
|
-
var label3TextStyle =
|
|
5775
|
+
var label3TextStyle = import_styled_components24.css`
|
|
5620
5776
|
--font-family: var(--typography-label-3-family);
|
|
5621
5777
|
--font-size: var(--typography-label-3-size);
|
|
5622
5778
|
--font-weight: var(--typography-label-3-weight);
|
|
5623
5779
|
--line-height: var(--typography-label-3-line-height);
|
|
5624
5780
|
${labelBoldStyles}
|
|
5625
5781
|
`;
|
|
5626
|
-
var label4TextStyle =
|
|
5782
|
+
var label4TextStyle = import_styled_components24.css`
|
|
5627
5783
|
--font-family: var(--typography-label-4-family);
|
|
5628
5784
|
--font-size: var(--typography-label-4-size);
|
|
5629
5785
|
--font-weight: var(--typography-label-4-weight);
|
|
5630
5786
|
--line-height: var(--typography-label-4-line-height);
|
|
5631
5787
|
${labelBoldStyles}
|
|
5632
5788
|
`;
|
|
5633
|
-
var body1MonoTextStyle =
|
|
5789
|
+
var body1MonoTextStyle = import_styled_components24.css`
|
|
5634
5790
|
${body1TextStyle};
|
|
5635
5791
|
--font-family: var(--typography-family-mono);
|
|
5636
5792
|
`;
|
|
5637
|
-
var body2MonoTextStyle =
|
|
5793
|
+
var body2MonoTextStyle = import_styled_components24.css`
|
|
5638
5794
|
${body2TextStyle};
|
|
5639
5795
|
--font-family: var(--typography-family-mono);
|
|
5640
5796
|
`;
|
|
5641
|
-
var body3MonoTextStyle =
|
|
5797
|
+
var body3MonoTextStyle = import_styled_components24.css`
|
|
5642
5798
|
${body3TextStyle};
|
|
5643
5799
|
--font-family: var(--typography-family-mono);
|
|
5644
5800
|
`;
|
|
5645
|
-
var body4MonoTextStyle =
|
|
5801
|
+
var body4MonoTextStyle = import_styled_components24.css`
|
|
5646
5802
|
${body4TextStyle};
|
|
5647
5803
|
--font-family: var(--typography-family-mono);
|
|
5648
5804
|
`;
|
|
@@ -5660,46 +5816,50 @@ var variantStyleMap2 = {
|
|
|
5660
5816
|
label3: label3TextStyle,
|
|
5661
5817
|
label4: label4TextStyle
|
|
5662
5818
|
};
|
|
5663
|
-
var
|
|
5664
|
-
--color
|
|
5819
|
+
var highContrastProminenceStyle = import_styled_components24.css`
|
|
5820
|
+
--text-color: var(--color-text-high-contrast);
|
|
5821
|
+
`;
|
|
5822
|
+
var vibrantProminenceStyle = import_styled_components24.css`
|
|
5823
|
+
--text-color: var(--color-text);
|
|
5665
5824
|
`;
|
|
5666
|
-
var secondaryProminenceStyle =
|
|
5667
|
-
--color
|
|
5825
|
+
var secondaryProminenceStyle = import_styled_components24.css`
|
|
5826
|
+
--text-color: var(--color-text-secondary);
|
|
5668
5827
|
`;
|
|
5669
5828
|
var prominenceMap = {
|
|
5670
|
-
|
|
5829
|
+
highContrast: highContrastProminenceStyle,
|
|
5830
|
+
vibrant: vibrantProminenceStyle,
|
|
5671
5831
|
secondary: secondaryProminenceStyle
|
|
5672
5832
|
};
|
|
5673
|
-
var StyledText =
|
|
5833
|
+
var StyledText = import_styled_components24.default.div`
|
|
5674
5834
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
5675
5835
|
font-family: var(--font-family);
|
|
5676
5836
|
font-size: var(--font-size);
|
|
5677
5837
|
font-weight: var(--font-weight);
|
|
5678
5838
|
line-height: var(--line-height);
|
|
5679
|
-
color: var(--color
|
|
5839
|
+
color: var(--text-color);
|
|
5680
5840
|
font-style: normal;
|
|
5681
5841
|
margin: 0;
|
|
5682
5842
|
${({ variant }) => variantStyleMap2[variant]}
|
|
5683
5843
|
${({ prominence }) => prominenceMap[prominence]}
|
|
5684
5844
|
${({ ellipsis }) => ellipsis && ellipsisStyle};
|
|
5685
|
-
${({ inline }) => inline &&
|
|
5845
|
+
${({ inline }) => inline && import_styled_components24.css`
|
|
5686
5846
|
display: inline-block;
|
|
5687
5847
|
`}
|
|
5688
|
-
${({ disabled }) => disabled &&
|
|
5689
|
-
--color
|
|
5848
|
+
${({ disabled }) => disabled && import_styled_components24.css`
|
|
5849
|
+
--text-color: var(--color-text-disabled);
|
|
5690
5850
|
`}
|
|
5691
|
-
${({ preventUserSelect }) => preventUserSelect &&
|
|
5851
|
+
${({ preventUserSelect }) => preventUserSelect && import_styled_components24.css`
|
|
5692
5852
|
user-select: none;
|
|
5693
5853
|
`}
|
|
5694
|
-
${({ align }) =>
|
|
5854
|
+
${({ align }) => import_styled_components24.css`
|
|
5695
5855
|
text-align: ${align};
|
|
5696
5856
|
`}
|
|
5697
|
-
${({ as }) => as === "p" &&
|
|
5857
|
+
${({ as }) => as === "p" && import_styled_components24.css`
|
|
5698
5858
|
display: block;
|
|
5699
5859
|
`}
|
|
5700
5860
|
`;
|
|
5701
5861
|
var DEFAULT_ELEMENT3 = "div";
|
|
5702
|
-
var TextComponent = (0,
|
|
5862
|
+
var TextComponent = (0, import_react12.forwardRef)(
|
|
5703
5863
|
({
|
|
5704
5864
|
align = "left",
|
|
5705
5865
|
colorScheme = "inherit",
|
|
@@ -5707,12 +5867,12 @@ var TextComponent = (0, import_react11.forwardRef)(
|
|
|
5707
5867
|
ellipsis = false,
|
|
5708
5868
|
inline = false,
|
|
5709
5869
|
preventUserSelect = false,
|
|
5710
|
-
prominence = "
|
|
5870
|
+
prominence = "highContrast",
|
|
5711
5871
|
variant = "body2",
|
|
5712
5872
|
renderAs,
|
|
5713
5873
|
...otherProps
|
|
5714
5874
|
}, ref) => {
|
|
5715
|
-
return /* @__PURE__ */ (0,
|
|
5875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
5716
5876
|
StyledText,
|
|
5717
5877
|
{
|
|
5718
5878
|
ref,
|
|
@@ -5734,20 +5894,20 @@ TextComponent.displayName = "Text";
|
|
|
5734
5894
|
var Text = makePolymorphic(TextComponent);
|
|
5735
5895
|
|
|
5736
5896
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
5737
|
-
var
|
|
5897
|
+
var import_styled_components25 = __toESM(require("styled-components"), 1);
|
|
5738
5898
|
var import_type_guards13 = require("@wistia/type-guards");
|
|
5739
|
-
var
|
|
5899
|
+
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
5740
5900
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
5741
5901
|
if (iconOnly) {
|
|
5742
|
-
return /* @__PURE__ */ (0,
|
|
5902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("g", { fill: brandmarkColor, children: /* @__PURE__ */ (0, import_jsx_runtime168.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" }) });
|
|
5743
5903
|
}
|
|
5744
|
-
return /* @__PURE__ */ (0,
|
|
5904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("g", { fill: brandmarkColor, children: /* @__PURE__ */ (0, import_jsx_runtime168.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" }) });
|
|
5745
5905
|
};
|
|
5746
5906
|
var renderLogotype = (logotypeColor, iconOnly) => {
|
|
5747
5907
|
if (iconOnly) {
|
|
5748
5908
|
return null;
|
|
5749
5909
|
}
|
|
5750
|
-
return /* @__PURE__ */ (0,
|
|
5910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("g", { fill: logotypeColor, children: /* @__PURE__ */ (0, import_jsx_runtime168.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" }) });
|
|
5751
5911
|
};
|
|
5752
5912
|
var computedViewBox = (iconOnly) => {
|
|
5753
5913
|
if (iconOnly) {
|
|
@@ -5755,7 +5915,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
5755
5915
|
}
|
|
5756
5916
|
return "0 0 144 31.47";
|
|
5757
5917
|
};
|
|
5758
|
-
var WistiaLogoComponent =
|
|
5918
|
+
var WistiaLogoComponent = import_styled_components25.default.svg`
|
|
5759
5919
|
height: ${({ height }) => `${height}px`};
|
|
5760
5920
|
|
|
5761
5921
|
/* ensure it will always fit on mobile */
|
|
@@ -5797,7 +5957,7 @@ var WistiaLogo = ({
|
|
|
5797
5957
|
};
|
|
5798
5958
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
5799
5959
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
5800
|
-
const Logo = /* @__PURE__ */ (0,
|
|
5960
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(
|
|
5801
5961
|
WistiaLogoComponent,
|
|
5802
5962
|
{
|
|
5803
5963
|
height,
|
|
@@ -5807,169 +5967,16 @@ var WistiaLogo = ({
|
|
|
5807
5967
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5808
5968
|
...otherProps,
|
|
5809
5969
|
children: [
|
|
5810
|
-
/* @__PURE__ */ (0,
|
|
5811
|
-
(0, import_type_guards13.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
5970
|
+
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)("title", { children: title }),
|
|
5971
|
+
(0, import_type_guards13.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("desc", { children: description }) : null,
|
|
5812
5972
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
5813
5973
|
renderLogotype(logotypeColor, iconOnly)
|
|
5814
5974
|
]
|
|
5815
5975
|
}
|
|
5816
5976
|
);
|
|
5817
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
5977
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("a", { href, children: Logo }) : Logo;
|
|
5818
5978
|
};
|
|
5819
5979
|
WistiaLogo.displayName = "WistiaLogo";
|
|
5820
|
-
|
|
5821
|
-
// src/components/Tooltip/Tooltip.tsx
|
|
5822
|
-
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
5823
|
-
var import_styled_components24 = __toESM(require("styled-components"), 1);
|
|
5824
|
-
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
5825
|
-
var CompactTooltipStyles = import_styled_components24.css`
|
|
5826
|
-
--tooltip-font-size: var(--typography-label-4-size);
|
|
5827
|
-
--tooltip-line-height: var(--typography-label-4-line-height);
|
|
5828
|
-
--tooltip-font-weight: var(--typography-label-4-weight);
|
|
5829
|
-
--tooltip-horizontal-padding: var(--space-02);
|
|
5830
|
-
--tooltip-vertical-padding: var(--space-03);
|
|
5831
|
-
`;
|
|
5832
|
-
var StyledContent = (0, import_styled_components24.default)(import_react_tooltip2.Content)`
|
|
5833
|
-
--tooltip-font-family: var(--typography-family-default);
|
|
5834
|
-
--tooltip-border-radius: var(--border-radius-05);
|
|
5835
|
-
--tooltip-bg: var(--color-bg-tooltip);
|
|
5836
|
-
--tooltip-color: var(--color-text-on-fill);
|
|
5837
|
-
--tooltip-font-size: var(--typography-label-3-size);
|
|
5838
|
-
--tooltip-line-height: var(--typography-label-3-line-height);
|
|
5839
|
-
--tooltip-font-weight: var(--typography-label-3-weight);
|
|
5840
|
-
--tooltip-horizontal-padding: var(--space-03);
|
|
5841
|
-
--tooltip-vertical-padding: var(--space-03);
|
|
5842
|
-
|
|
5843
|
-
${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
|
|
5844
|
-
|
|
5845
|
-
font-family: var(--tooltip-font-family);
|
|
5846
|
-
font-size: var(--tooltip-font-size);
|
|
5847
|
-
border-radius: var(--tooltip-border-radius);
|
|
5848
|
-
padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
|
|
5849
|
-
background-color: var(--tooltip-bg);
|
|
5850
|
-
color: var(--tooltip-color);
|
|
5851
|
-
user-select: none;
|
|
5852
|
-
animation-duration: 400ms;
|
|
5853
|
-
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
5854
|
-
will-change: transform, opacity;
|
|
5855
|
-
max-width: 30em;
|
|
5856
|
-
|
|
5857
|
-
&[data-state='delayed-open'][data-side='top'] {
|
|
5858
|
-
animation-name: slideDownAndFade;
|
|
5859
|
-
}
|
|
5860
|
-
|
|
5861
|
-
&[data-state='delayed-open'][data-side='right'] {
|
|
5862
|
-
animation-name: slideLeftAndFade;
|
|
5863
|
-
}
|
|
5864
|
-
|
|
5865
|
-
&[data-state='delayed-open'][data-side='bottom'] {
|
|
5866
|
-
animation-name: slideUpAndFade;
|
|
5867
|
-
}
|
|
5868
|
-
|
|
5869
|
-
&[data-state='delayed-open'][data-side='left'] {
|
|
5870
|
-
animation-name: slideRightAndFade;
|
|
5871
|
-
}
|
|
5872
|
-
`;
|
|
5873
|
-
var VISUAL_OFFSET = 6;
|
|
5874
|
-
var Tooltip = ({
|
|
5875
|
-
delay = 700,
|
|
5876
|
-
direction = "top",
|
|
5877
|
-
content,
|
|
5878
|
-
children,
|
|
5879
|
-
forceOpen,
|
|
5880
|
-
compact = false,
|
|
5881
|
-
hideArrow = false
|
|
5882
|
-
}) => {
|
|
5883
|
-
const rootProps = {};
|
|
5884
|
-
if (content === "" || content === null) {
|
|
5885
|
-
rootProps.open = false;
|
|
5886
|
-
}
|
|
5887
|
-
if (forceOpen === true) {
|
|
5888
|
-
rootProps.open = true;
|
|
5889
|
-
}
|
|
5890
|
-
return /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(
|
|
5891
|
-
import_react_tooltip2.Root,
|
|
5892
|
-
{
|
|
5893
|
-
delayDuration: delay,
|
|
5894
|
-
...rootProps,
|
|
5895
|
-
children: [
|
|
5896
|
-
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
5897
|
-
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(
|
|
5898
|
-
StyledContent,
|
|
5899
|
-
{
|
|
5900
|
-
$compact: compact,
|
|
5901
|
-
side: direction,
|
|
5902
|
-
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
5903
|
-
children: [
|
|
5904
|
-
content,
|
|
5905
|
-
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
5906
|
-
"svg",
|
|
5907
|
-
{
|
|
5908
|
-
fill: "var(--tooltip-bg)",
|
|
5909
|
-
height: "8",
|
|
5910
|
-
style: { transform: "translateY(-2px)" },
|
|
5911
|
-
viewBox: "0 0 12 8",
|
|
5912
|
-
width: "12",
|
|
5913
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5914
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime167.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" })
|
|
5915
|
-
}
|
|
5916
|
-
) }) : null
|
|
5917
|
-
]
|
|
5918
|
-
}
|
|
5919
|
-
) })
|
|
5920
|
-
]
|
|
5921
|
-
}
|
|
5922
|
-
);
|
|
5923
|
-
};
|
|
5924
|
-
Tooltip.displayName = "Tooltip";
|
|
5925
|
-
|
|
5926
|
-
// src/components/IconButton/IconButton.tsx
|
|
5927
|
-
var import_react12 = require("react");
|
|
5928
|
-
var import_styled_components25 = __toESM(require("styled-components"), 1);
|
|
5929
|
-
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
5930
|
-
var buttonIconSizeMap = {
|
|
5931
|
-
small: "sm",
|
|
5932
|
-
medium: "md",
|
|
5933
|
-
large: "lg",
|
|
5934
|
-
hero: "xl"
|
|
5935
|
-
};
|
|
5936
|
-
var StyledButton2 = (0, import_styled_components25.default)(Button)`
|
|
5937
|
-
--icon-button-size-small: 24px;
|
|
5938
|
-
--icon-button-size-medium: 32px;
|
|
5939
|
-
--icon-button-size-large: 40px;
|
|
5940
|
-
--icon-button-size-hero: 48px;
|
|
5941
|
-
|
|
5942
|
-
border-radius: 50%;
|
|
5943
|
-
height: ${({ size }) => `var(--icon-button-size-${size})`};
|
|
5944
|
-
width: ${({ size }) => `var(--icon-button-size-${size})`};
|
|
5945
|
-
display: flex;
|
|
5946
|
-
justify-content: center;
|
|
5947
|
-
align-items: center;
|
|
5948
|
-
line-height: 1;
|
|
5949
|
-
`;
|
|
5950
|
-
var IconButton = (0, import_react12.forwardRef)(
|
|
5951
|
-
({ children, label, disableTooltip = false, size = "medium", ...props }, ref) => {
|
|
5952
|
-
const responsiveSize = useResponsiveProp(size);
|
|
5953
|
-
const button = /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
|
|
5954
|
-
StyledButton2,
|
|
5955
|
-
{
|
|
5956
|
-
...props,
|
|
5957
|
-
ref,
|
|
5958
|
-
"aria-label": label,
|
|
5959
|
-
"data-wistia-ui-icon-button": true,
|
|
5960
|
-
size: responsiveSize,
|
|
5961
|
-
children: (0, import_react12.cloneElement)(import_react12.Children.only(children), {
|
|
5962
|
-
size: buttonIconSizeMap[responsiveSize]
|
|
5963
|
-
})
|
|
5964
|
-
}
|
|
5965
|
-
);
|
|
5966
|
-
if (disableTooltip) {
|
|
5967
|
-
return button;
|
|
5968
|
-
}
|
|
5969
|
-
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(Tooltip, { content: label, children: button });
|
|
5970
|
-
}
|
|
5971
|
-
);
|
|
5972
|
-
IconButton.displayName = "IconButton";
|
|
5973
5980
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5974
5981
|
0 && (module.exports = {
|
|
5975
5982
|
Box,
|
|
@@ -5980,6 +5987,7 @@ IconButton.displayName = "IconButton";
|
|
|
5980
5987
|
Heading,
|
|
5981
5988
|
Icon,
|
|
5982
5989
|
IconButton,
|
|
5990
|
+
Link,
|
|
5983
5991
|
ScreenReaderOnly,
|
|
5984
5992
|
Stack,
|
|
5985
5993
|
Text,
|