@wistia/ui 0.0.1 → 0.0.3
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 +286 -265
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +136 -70
- package/dist/index.d.ts +136 -70
- package/dist/index.mjs +290 -271
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -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.3
|
|
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,
|
|
@@ -57,6 +58,7 @@ __export(src_exports, {
|
|
|
57
58
|
ellipsisFlexParentStyle: () => ellipsisFlexParentStyle,
|
|
58
59
|
ellipsisStyle: () => ellipsisStyle,
|
|
59
60
|
iconSizeMap: () => iconSizeMap,
|
|
61
|
+
mq: () => mq,
|
|
60
62
|
useActiveMq: () => useActiveMq,
|
|
61
63
|
useAriaLive: () => useAriaLive,
|
|
62
64
|
useMq: () => useMq,
|
|
@@ -1071,7 +1073,7 @@ var spacingTokens = import_styled_components6.css`
|
|
|
1071
1073
|
var import_styled_components7 = require("styled-components");
|
|
1072
1074
|
var typographyTokens = import_styled_components7.css`
|
|
1073
1075
|
--typography-family-default: intervariable, sans-serif;
|
|
1074
|
-
--typography-family-brand:
|
|
1076
|
+
--typography-family-brand: 'GT Walsheim', sans-serif;
|
|
1075
1077
|
--typography-family-mono: 'IBM Plex Mono', monospace;
|
|
1076
1078
|
|
|
1077
1079
|
/* Brand Weights */
|
|
@@ -1299,6 +1301,52 @@ var copyToClipboard = async (textToCopy) => {
|
|
|
1299
1301
|
});
|
|
1300
1302
|
};
|
|
1301
1303
|
|
|
1304
|
+
// src/helpers/mq/mq.ts
|
|
1305
|
+
var import_polished = require("polished");
|
|
1306
|
+
|
|
1307
|
+
// src/css/breakpoints.ts
|
|
1308
|
+
var breakpoints = {
|
|
1309
|
+
xs: "0em",
|
|
1310
|
+
// 0px
|
|
1311
|
+
sm: "37.5em",
|
|
1312
|
+
// 600px
|
|
1313
|
+
md: "56.5625em",
|
|
1314
|
+
// ~904px
|
|
1315
|
+
lg: "77.5em",
|
|
1316
|
+
// 1240px
|
|
1317
|
+
xl: "90em"
|
|
1318
|
+
// 1440px
|
|
1319
|
+
};
|
|
1320
|
+
|
|
1321
|
+
// src/helpers/mq/mq.ts
|
|
1322
|
+
var getMaxWidth = (breakpoint) => {
|
|
1323
|
+
const breakpointBuffer = 25e-4;
|
|
1324
|
+
const [value, unit] = (0, import_polished.getValueAndUnit)(breakpoint);
|
|
1325
|
+
return `@media (max-width: ${Math.max(value - breakpointBuffer, 0)}${unit})`;
|
|
1326
|
+
};
|
|
1327
|
+
var xsAndUp = () => `@media (min-width: ${breakpoints.xs})`;
|
|
1328
|
+
var smAndUp = () => `@media (min-width: ${breakpoints.sm})`;
|
|
1329
|
+
var mdAndUp = () => `@media (min-width: ${breakpoints.md})`;
|
|
1330
|
+
var lgAndUp = () => `@media (min-width: ${breakpoints.lg})`;
|
|
1331
|
+
var xlAndUp = () => `@media (min-width: ${breakpoints.xl})`;
|
|
1332
|
+
var xsAndDown = () => getMaxWidth(breakpoints.xs);
|
|
1333
|
+
var smAndDown = () => getMaxWidth(breakpoints.sm);
|
|
1334
|
+
var mdAndDown = () => getMaxWidth(breakpoints.md);
|
|
1335
|
+
var lgAndDown = () => getMaxWidth(breakpoints.lg);
|
|
1336
|
+
var xlAndDown = () => getMaxWidth(breakpoints.xl);
|
|
1337
|
+
var mq = {
|
|
1338
|
+
xsAndUp,
|
|
1339
|
+
smAndUp,
|
|
1340
|
+
mdAndUp,
|
|
1341
|
+
lgAndUp,
|
|
1342
|
+
xlAndUp,
|
|
1343
|
+
xsAndDown,
|
|
1344
|
+
smAndDown,
|
|
1345
|
+
mdAndDown,
|
|
1346
|
+
lgAndDown,
|
|
1347
|
+
xlAndDown
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1302
1350
|
// src/hooks/useMq/useMq.ts
|
|
1303
1351
|
var import_type_guards3 = require("@wistia/type-guards");
|
|
1304
1352
|
|
|
@@ -1329,20 +1377,6 @@ var useWindowSize = (interval = 0) => {
|
|
|
1329
1377
|
return dimensions;
|
|
1330
1378
|
};
|
|
1331
1379
|
|
|
1332
|
-
// src/css/breakpoints.ts
|
|
1333
|
-
var breakpoints = {
|
|
1334
|
-
xs: "0em",
|
|
1335
|
-
// 0px
|
|
1336
|
-
sm: "37.5em",
|
|
1337
|
-
// 600px
|
|
1338
|
-
md: "56.5625em",
|
|
1339
|
-
// ~904px
|
|
1340
|
-
lg: "77.5em",
|
|
1341
|
-
// 1240px
|
|
1342
|
-
xl: "90em"
|
|
1343
|
-
// 1440px
|
|
1344
|
-
};
|
|
1345
|
-
|
|
1346
1380
|
// src/hooks/useMq/useMq.ts
|
|
1347
1381
|
var REM_SIZE = 16;
|
|
1348
1382
|
var useMq = () => {
|
|
@@ -1717,7 +1751,7 @@ var buttonSizeStyles = {
|
|
|
1717
1751
|
hero: buttonHeroStyles
|
|
1718
1752
|
};
|
|
1719
1753
|
|
|
1720
|
-
// src/
|
|
1754
|
+
// src/private/getColorScheme/getColorScheme.ts
|
|
1721
1755
|
var import_styled_components13 = require("styled-components");
|
|
1722
1756
|
var colorSchemeSchema = [
|
|
1723
1757
|
{ token: "bg-surface", step: "surface" },
|
|
@@ -4997,7 +5031,7 @@ var isButton = (props) => (0, import_type_guards8.isUndefined)(props.href);
|
|
|
4997
5031
|
var isLink = (props) => (0, import_type_guards8.isNotUndefined)(props.href);
|
|
4998
5032
|
var StyledLink = import_styled_components14.default.a`
|
|
4999
5033
|
${({ href }) => (0, import_type_guards8.isNil)(href) && buttonResetCss};
|
|
5000
|
-
${({ colorScheme }) => getColorScheme(colorScheme)}
|
|
5034
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
5001
5035
|
cursor: pointer;
|
|
5002
5036
|
font-family: var(--typography-family-default);
|
|
5003
5037
|
color: var(--color-text-link);
|
|
@@ -5036,7 +5070,7 @@ var Link = (0, import_react7.forwardRef)(
|
|
|
5036
5070
|
}
|
|
5037
5071
|
};
|
|
5038
5072
|
const commonProps = {
|
|
5039
|
-
colorScheme,
|
|
5073
|
+
$colorScheme: colorScheme,
|
|
5040
5074
|
$underline: underline,
|
|
5041
5075
|
onClick: handleClick
|
|
5042
5076
|
};
|
|
@@ -5055,14 +5089,25 @@ var Link = (0, import_react7.forwardRef)(
|
|
|
5055
5089
|
}
|
|
5056
5090
|
if (isLink(props)) {
|
|
5057
5091
|
const externalLinkProps = type === "external" ? { target: "_blank", rel: "noopener noreferrer" } : null;
|
|
5058
|
-
|
|
5092
|
+
const combinedProps = {
|
|
5093
|
+
ref,
|
|
5094
|
+
...props,
|
|
5095
|
+
...commonProps,
|
|
5096
|
+
...externalLinkProps
|
|
5097
|
+
};
|
|
5098
|
+
return inRouterContext ? /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
5059
5099
|
StyledLink,
|
|
5060
5100
|
{
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5101
|
+
as: import_react_router_dom.Link,
|
|
5102
|
+
...combinedProps,
|
|
5103
|
+
to: to ?? "",
|
|
5104
|
+
children
|
|
5105
|
+
}
|
|
5106
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
5107
|
+
StyledLink,
|
|
5108
|
+
{
|
|
5109
|
+
as: "a",
|
|
5110
|
+
...combinedProps,
|
|
5066
5111
|
href: to,
|
|
5067
5112
|
children
|
|
5068
5113
|
}
|
|
@@ -5206,38 +5251,6 @@ Button.displayName = "Button";
|
|
|
5206
5251
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
5207
5252
|
var import_styled_components16 = __toESM(require("styled-components"), 1);
|
|
5208
5253
|
var import_type_guards10 = require("@wistia/type-guards");
|
|
5209
|
-
|
|
5210
|
-
// src/helpers/mq/mq.ts
|
|
5211
|
-
var import_polished = require("polished");
|
|
5212
|
-
var getMaxWidth = (breakpoint) => {
|
|
5213
|
-
const breakpointBuffer = 25e-4;
|
|
5214
|
-
const [value, unit] = (0, import_polished.getValueAndUnit)(breakpoint);
|
|
5215
|
-
return `@media (max-width: ${Math.max(value - breakpointBuffer, 0)}${unit})`;
|
|
5216
|
-
};
|
|
5217
|
-
var xsAndUp = () => `@media (min-width: ${breakpoints.xs})`;
|
|
5218
|
-
var smAndUp = () => `@media (min-width: ${breakpoints.sm})`;
|
|
5219
|
-
var mdAndUp = () => `@media (min-width: ${breakpoints.md})`;
|
|
5220
|
-
var lgAndUp = () => `@media (min-width: ${breakpoints.lg})`;
|
|
5221
|
-
var xlAndUp = () => `@media (min-width: ${breakpoints.xl})`;
|
|
5222
|
-
var xsAndDown = () => getMaxWidth(breakpoints.xs);
|
|
5223
|
-
var smAndDown = () => getMaxWidth(breakpoints.sm);
|
|
5224
|
-
var mdAndDown = () => getMaxWidth(breakpoints.md);
|
|
5225
|
-
var lgAndDown = () => getMaxWidth(breakpoints.lg);
|
|
5226
|
-
var xlAndDown = () => getMaxWidth(breakpoints.xl);
|
|
5227
|
-
var mq = {
|
|
5228
|
-
xsAndUp,
|
|
5229
|
-
smAndUp,
|
|
5230
|
-
mdAndUp,
|
|
5231
|
-
lgAndUp,
|
|
5232
|
-
xlAndUp,
|
|
5233
|
-
xsAndDown,
|
|
5234
|
-
smAndDown,
|
|
5235
|
-
mdAndDown,
|
|
5236
|
-
lgAndDown,
|
|
5237
|
-
xlAndDown
|
|
5238
|
-
};
|
|
5239
|
-
|
|
5240
|
-
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
5241
5254
|
var import_jsx_runtime159 = require("react/jsx-runtime");
|
|
5242
5255
|
var getAlignment = (align) => {
|
|
5243
5256
|
if (align === "center") {
|
|
@@ -5503,12 +5516,167 @@ var HeadingComponent = (0, import_react9.forwardRef)(
|
|
|
5503
5516
|
HeadingComponent.displayName = "Heading";
|
|
5504
5517
|
var Heading = makePolymorphic(HeadingComponent);
|
|
5505
5518
|
|
|
5506
|
-
// src/components/
|
|
5519
|
+
// src/components/IconButton/IconButton.tsx
|
|
5520
|
+
var import_react10 = require("react");
|
|
5521
|
+
var import_styled_components21 = __toESM(require("styled-components"), 1);
|
|
5522
|
+
|
|
5523
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
5524
|
+
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
5507
5525
|
var import_styled_components20 = __toESM(require("styled-components"), 1);
|
|
5508
|
-
var import_type_guards12 = require("@wistia/type-guards");
|
|
5509
5526
|
var import_jsx_runtime163 = require("react/jsx-runtime");
|
|
5510
|
-
var
|
|
5511
|
-
var
|
|
5527
|
+
var CompactTooltipStyles = import_styled_components20.css`
|
|
5528
|
+
--tooltip-font-size: var(--typography-label-4-size);
|
|
5529
|
+
--tooltip-line-height: var(--typography-label-4-line-height);
|
|
5530
|
+
--tooltip-font-weight: var(--typography-label-4-weight);
|
|
5531
|
+
--tooltip-horizontal-padding: var(--space-02);
|
|
5532
|
+
--tooltip-vertical-padding: var(--space-03);
|
|
5533
|
+
`;
|
|
5534
|
+
var StyledContent = (0, import_styled_components20.default)(import_react_tooltip2.Content)`
|
|
5535
|
+
--tooltip-font-family: var(--typography-family-default);
|
|
5536
|
+
--tooltip-border-radius: var(--border-radius-05);
|
|
5537
|
+
--tooltip-bg: var(--color-bg-tooltip);
|
|
5538
|
+
--tooltip-color: var(--color-text-on-fill);
|
|
5539
|
+
--tooltip-font-size: var(--typography-label-3-size);
|
|
5540
|
+
--tooltip-line-height: var(--typography-label-3-line-height);
|
|
5541
|
+
--tooltip-font-weight: var(--typography-label-3-weight);
|
|
5542
|
+
--tooltip-horizontal-padding: var(--space-03);
|
|
5543
|
+
--tooltip-vertical-padding: var(--space-03);
|
|
5544
|
+
|
|
5545
|
+
${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
|
|
5546
|
+
|
|
5547
|
+
font-family: var(--tooltip-font-family);
|
|
5548
|
+
font-size: var(--tooltip-font-size);
|
|
5549
|
+
border-radius: var(--tooltip-border-radius);
|
|
5550
|
+
padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
|
|
5551
|
+
background-color: var(--tooltip-bg);
|
|
5552
|
+
color: var(--tooltip-color);
|
|
5553
|
+
user-select: none;
|
|
5554
|
+
animation-duration: 400ms;
|
|
5555
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
5556
|
+
will-change: transform, opacity;
|
|
5557
|
+
max-width: 30em;
|
|
5558
|
+
|
|
5559
|
+
&[data-state='delayed-open'][data-side='top'] {
|
|
5560
|
+
animation-name: slideDownAndFade;
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5563
|
+
&[data-state='delayed-open'][data-side='right'] {
|
|
5564
|
+
animation-name: slideLeftAndFade;
|
|
5565
|
+
}
|
|
5566
|
+
|
|
5567
|
+
&[data-state='delayed-open'][data-side='bottom'] {
|
|
5568
|
+
animation-name: slideUpAndFade;
|
|
5569
|
+
}
|
|
5570
|
+
|
|
5571
|
+
&[data-state='delayed-open'][data-side='left'] {
|
|
5572
|
+
animation-name: slideRightAndFade;
|
|
5573
|
+
}
|
|
5574
|
+
`;
|
|
5575
|
+
var VISUAL_OFFSET = 6;
|
|
5576
|
+
var Tooltip = ({
|
|
5577
|
+
delay = 700,
|
|
5578
|
+
direction = "top",
|
|
5579
|
+
content,
|
|
5580
|
+
children,
|
|
5581
|
+
forceOpen,
|
|
5582
|
+
compact = false,
|
|
5583
|
+
hideArrow = false
|
|
5584
|
+
}) => {
|
|
5585
|
+
const rootProps = {};
|
|
5586
|
+
if (content === "" || content === null) {
|
|
5587
|
+
rootProps.open = false;
|
|
5588
|
+
}
|
|
5589
|
+
if (forceOpen === true) {
|
|
5590
|
+
rootProps.open = true;
|
|
5591
|
+
}
|
|
5592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(
|
|
5593
|
+
import_react_tooltip2.Root,
|
|
5594
|
+
{
|
|
5595
|
+
delayDuration: delay,
|
|
5596
|
+
...rootProps,
|
|
5597
|
+
children: [
|
|
5598
|
+
/* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
5599
|
+
/* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(
|
|
5600
|
+
StyledContent,
|
|
5601
|
+
{
|
|
5602
|
+
$compact: compact,
|
|
5603
|
+
side: direction,
|
|
5604
|
+
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
5605
|
+
children: [
|
|
5606
|
+
content,
|
|
5607
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
|
|
5608
|
+
"svg",
|
|
5609
|
+
{
|
|
5610
|
+
fill: "var(--tooltip-bg)",
|
|
5611
|
+
height: "8",
|
|
5612
|
+
style: { transform: "translateY(-2px)" },
|
|
5613
|
+
viewBox: "0 0 12 8",
|
|
5614
|
+
width: "12",
|
|
5615
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5616
|
+
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" })
|
|
5617
|
+
}
|
|
5618
|
+
) }) : null
|
|
5619
|
+
]
|
|
5620
|
+
}
|
|
5621
|
+
) })
|
|
5622
|
+
]
|
|
5623
|
+
}
|
|
5624
|
+
);
|
|
5625
|
+
};
|
|
5626
|
+
Tooltip.displayName = "Tooltip";
|
|
5627
|
+
|
|
5628
|
+
// src/components/IconButton/IconButton.tsx
|
|
5629
|
+
var import_jsx_runtime164 = require("react/jsx-runtime");
|
|
5630
|
+
var buttonIconSizeMap = {
|
|
5631
|
+
small: "sm",
|
|
5632
|
+
medium: "md",
|
|
5633
|
+
large: "lg",
|
|
5634
|
+
hero: "xl"
|
|
5635
|
+
};
|
|
5636
|
+
var StyledButton2 = (0, import_styled_components21.default)(Button)`
|
|
5637
|
+
--icon-button-size-small: 24px;
|
|
5638
|
+
--icon-button-size-medium: 32px;
|
|
5639
|
+
--icon-button-size-large: 40px;
|
|
5640
|
+
--icon-button-size-hero: 48px;
|
|
5641
|
+
|
|
5642
|
+
border-radius: 50%;
|
|
5643
|
+
height: ${({ size }) => `var(--icon-button-size-${size})`};
|
|
5644
|
+
width: ${({ size }) => `var(--icon-button-size-${size})`};
|
|
5645
|
+
display: flex;
|
|
5646
|
+
justify-content: center;
|
|
5647
|
+
align-items: center;
|
|
5648
|
+
line-height: 1;
|
|
5649
|
+
`;
|
|
5650
|
+
var IconButton = (0, import_react10.forwardRef)(
|
|
5651
|
+
({ children, label, disableTooltip = false, size = "medium", ...props }, ref) => {
|
|
5652
|
+
const responsiveSize = useResponsiveProp(size);
|
|
5653
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
|
|
5654
|
+
StyledButton2,
|
|
5655
|
+
{
|
|
5656
|
+
...props,
|
|
5657
|
+
ref,
|
|
5658
|
+
"aria-label": label,
|
|
5659
|
+
"data-wistia-ui-icon-button": true,
|
|
5660
|
+
size: responsiveSize,
|
|
5661
|
+
children: (0, import_react10.cloneElement)(import_react10.Children.only(children), {
|
|
5662
|
+
size: buttonIconSizeMap[responsiveSize]
|
|
5663
|
+
})
|
|
5664
|
+
}
|
|
5665
|
+
);
|
|
5666
|
+
if (disableTooltip) {
|
|
5667
|
+
return button;
|
|
5668
|
+
}
|
|
5669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(Tooltip, { content: label, children: button });
|
|
5670
|
+
}
|
|
5671
|
+
);
|
|
5672
|
+
IconButton.displayName = "IconButton";
|
|
5673
|
+
|
|
5674
|
+
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
5675
|
+
var import_styled_components22 = __toESM(require("styled-components"), 1);
|
|
5676
|
+
var import_type_guards12 = require("@wistia/type-guards");
|
|
5677
|
+
var import_jsx_runtime165 = require("react/jsx-runtime");
|
|
5678
|
+
var VisuallyHidden = import_styled_components22.default.div({ ...visuallyHiddenStyle });
|
|
5679
|
+
var VisuallyHiddenButFocusable = import_styled_components22.default.div({
|
|
5512
5680
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
5513
5681
|
});
|
|
5514
5682
|
var ScreenReaderOnly = ({
|
|
@@ -5519,18 +5687,18 @@ var ScreenReaderOnly = ({
|
|
|
5519
5687
|
}) => {
|
|
5520
5688
|
const accessibleText = (0, import_type_guards12.isNotNil)(text) ? text : children;
|
|
5521
5689
|
if (focusable) {
|
|
5522
|
-
return /* @__PURE__ */ (0,
|
|
5690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
5523
5691
|
}
|
|
5524
|
-
return /* @__PURE__ */ (0,
|
|
5692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
5525
5693
|
};
|
|
5526
5694
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
5527
5695
|
|
|
5528
5696
|
// src/components/Stack/Stack.tsx
|
|
5529
|
-
var
|
|
5530
|
-
var
|
|
5531
|
-
var
|
|
5697
|
+
var import_react11 = require("react");
|
|
5698
|
+
var import_styled_components23 = __toESM(require("styled-components"), 1);
|
|
5699
|
+
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
5532
5700
|
var DEFAULT_ELEMENT2 = "div";
|
|
5533
|
-
var StyledStack =
|
|
5701
|
+
var StyledStack = import_styled_components23.default.div`
|
|
5534
5702
|
display: flex;
|
|
5535
5703
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
5536
5704
|
gap: ${({ gap }) => `var(--${gap})`};
|
|
@@ -5539,11 +5707,11 @@ var StyledStack = import_styled_components21.default.div`
|
|
|
5539
5707
|
flex: 1;
|
|
5540
5708
|
}
|
|
5541
5709
|
`;
|
|
5542
|
-
var StackComponent = (0,
|
|
5710
|
+
var StackComponent = (0, import_react11.forwardRef)(
|
|
5543
5711
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
5544
5712
|
const responsiveGap = useResponsiveProp(gap);
|
|
5545
5713
|
const responsiveDirection = useResponsiveProp(direction);
|
|
5546
|
-
return /* @__PURE__ */ (0,
|
|
5714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
|
|
5547
5715
|
StyledStack,
|
|
5548
5716
|
{
|
|
5549
5717
|
ref,
|
|
@@ -5559,90 +5727,90 @@ StackComponent.displayName = "Stack";
|
|
|
5559
5727
|
var Stack = makePolymorphic(StackComponent);
|
|
5560
5728
|
|
|
5561
5729
|
// src/components/Text/Text.tsx
|
|
5562
|
-
var
|
|
5563
|
-
var
|
|
5564
|
-
var
|
|
5565
|
-
var bodyBoldStyles =
|
|
5730
|
+
var import_react12 = require("react");
|
|
5731
|
+
var import_styled_components24 = __toESM(require("styled-components"), 1);
|
|
5732
|
+
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
5733
|
+
var bodyBoldStyles = import_styled_components24.css`
|
|
5566
5734
|
> strong,
|
|
5567
5735
|
b {
|
|
5568
5736
|
font-weight: var(--typography-weight-body-bold);
|
|
5569
5737
|
}
|
|
5570
5738
|
`;
|
|
5571
|
-
var labelBoldStyles =
|
|
5739
|
+
var labelBoldStyles = import_styled_components24.css`
|
|
5572
5740
|
> strong,
|
|
5573
5741
|
b {
|
|
5574
5742
|
font-weight: var(--typography-weight-label-bold);
|
|
5575
5743
|
}
|
|
5576
5744
|
`;
|
|
5577
|
-
var body1TextStyle =
|
|
5745
|
+
var body1TextStyle = import_styled_components24.css`
|
|
5578
5746
|
--font-family: var(--typography-body-1-family);
|
|
5579
5747
|
--font-size: var(--typography-body-1-size);
|
|
5580
5748
|
--font-weight: var(--typography-body-1-weight);
|
|
5581
5749
|
--line-height: var(--typography-body-1-line-height);
|
|
5582
5750
|
${bodyBoldStyles}
|
|
5583
5751
|
`;
|
|
5584
|
-
var body2TextStyle =
|
|
5752
|
+
var body2TextStyle = import_styled_components24.css`
|
|
5585
5753
|
--font-family: var(--typography-body-2-family);
|
|
5586
5754
|
--font-size: var(--typography-body-2-size);
|
|
5587
5755
|
--font-weight: var(--typography-body-2-weight);
|
|
5588
5756
|
--line-height: var(--typography-body-2-line-height);
|
|
5589
5757
|
${bodyBoldStyles}
|
|
5590
5758
|
`;
|
|
5591
|
-
var body3TextStyle =
|
|
5759
|
+
var body3TextStyle = import_styled_components24.css`
|
|
5592
5760
|
--font-family: var(--typography-body-3-family);
|
|
5593
5761
|
--font-size: var(--typography-body-3-size);
|
|
5594
5762
|
--font-weight: var(--typography-body-3-weight);
|
|
5595
5763
|
--line-height: var(--typography-body-3-line-height);
|
|
5596
5764
|
${bodyBoldStyles}
|
|
5597
5765
|
`;
|
|
5598
|
-
var body4TextStyle =
|
|
5766
|
+
var body4TextStyle = import_styled_components24.css`
|
|
5599
5767
|
--font-family: var(--typography-body-4-family);
|
|
5600
5768
|
--font-size: var(--typography-body-4-size);
|
|
5601
5769
|
--font-weight: var(--typography-body-4-weight);
|
|
5602
5770
|
--line-height: var(--typography-body-4-line-height);
|
|
5603
5771
|
${bodyBoldStyles}
|
|
5604
5772
|
`;
|
|
5605
|
-
var label1TextStyle =
|
|
5773
|
+
var label1TextStyle = import_styled_components24.css`
|
|
5606
5774
|
--font-family: var(--typography-label-1-family);
|
|
5607
5775
|
--font-size: var(--typography-label-1-size);
|
|
5608
5776
|
--font-weight: var(--typography-label-1-weight);
|
|
5609
5777
|
--line-height: var(--typography-label-1-line-height);
|
|
5610
5778
|
${labelBoldStyles}
|
|
5611
5779
|
`;
|
|
5612
|
-
var label2TextStyle =
|
|
5780
|
+
var label2TextStyle = import_styled_components24.css`
|
|
5613
5781
|
--font-family: var(--typography-label-2-family);
|
|
5614
5782
|
--font-size: var(--typography-label-2-size);
|
|
5615
5783
|
--font-weight: var(--typography-label-2-weight);
|
|
5616
5784
|
--line-height: var(--typography-label-2-line-height);
|
|
5617
5785
|
${labelBoldStyles}
|
|
5618
5786
|
`;
|
|
5619
|
-
var label3TextStyle =
|
|
5787
|
+
var label3TextStyle = import_styled_components24.css`
|
|
5620
5788
|
--font-family: var(--typography-label-3-family);
|
|
5621
5789
|
--font-size: var(--typography-label-3-size);
|
|
5622
5790
|
--font-weight: var(--typography-label-3-weight);
|
|
5623
5791
|
--line-height: var(--typography-label-3-line-height);
|
|
5624
5792
|
${labelBoldStyles}
|
|
5625
5793
|
`;
|
|
5626
|
-
var label4TextStyle =
|
|
5794
|
+
var label4TextStyle = import_styled_components24.css`
|
|
5627
5795
|
--font-family: var(--typography-label-4-family);
|
|
5628
5796
|
--font-size: var(--typography-label-4-size);
|
|
5629
5797
|
--font-weight: var(--typography-label-4-weight);
|
|
5630
5798
|
--line-height: var(--typography-label-4-line-height);
|
|
5631
5799
|
${labelBoldStyles}
|
|
5632
5800
|
`;
|
|
5633
|
-
var body1MonoTextStyle =
|
|
5801
|
+
var body1MonoTextStyle = import_styled_components24.css`
|
|
5634
5802
|
${body1TextStyle};
|
|
5635
5803
|
--font-family: var(--typography-family-mono);
|
|
5636
5804
|
`;
|
|
5637
|
-
var body2MonoTextStyle =
|
|
5805
|
+
var body2MonoTextStyle = import_styled_components24.css`
|
|
5638
5806
|
${body2TextStyle};
|
|
5639
5807
|
--font-family: var(--typography-family-mono);
|
|
5640
5808
|
`;
|
|
5641
|
-
var body3MonoTextStyle =
|
|
5809
|
+
var body3MonoTextStyle = import_styled_components24.css`
|
|
5642
5810
|
${body3TextStyle};
|
|
5643
5811
|
--font-family: var(--typography-family-mono);
|
|
5644
5812
|
`;
|
|
5645
|
-
var body4MonoTextStyle =
|
|
5813
|
+
var body4MonoTextStyle = import_styled_components24.css`
|
|
5646
5814
|
${body4TextStyle};
|
|
5647
5815
|
--font-family: var(--typography-family-mono);
|
|
5648
5816
|
`;
|
|
@@ -5660,46 +5828,50 @@ var variantStyleMap2 = {
|
|
|
5660
5828
|
label3: label3TextStyle,
|
|
5661
5829
|
label4: label4TextStyle
|
|
5662
5830
|
};
|
|
5663
|
-
var
|
|
5664
|
-
--color
|
|
5831
|
+
var highContrastProminenceStyle = import_styled_components24.css`
|
|
5832
|
+
--text-color: var(--color-text-high-contrast);
|
|
5833
|
+
`;
|
|
5834
|
+
var vibrantProminenceStyle = import_styled_components24.css`
|
|
5835
|
+
--text-color: var(--color-text);
|
|
5665
5836
|
`;
|
|
5666
|
-
var secondaryProminenceStyle =
|
|
5667
|
-
--color
|
|
5837
|
+
var secondaryProminenceStyle = import_styled_components24.css`
|
|
5838
|
+
--text-color: var(--color-text-secondary);
|
|
5668
5839
|
`;
|
|
5669
5840
|
var prominenceMap = {
|
|
5670
|
-
|
|
5841
|
+
highContrast: highContrastProminenceStyle,
|
|
5842
|
+
vibrant: vibrantProminenceStyle,
|
|
5671
5843
|
secondary: secondaryProminenceStyle
|
|
5672
5844
|
};
|
|
5673
|
-
var StyledText =
|
|
5845
|
+
var StyledText = import_styled_components24.default.div`
|
|
5674
5846
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
5675
5847
|
font-family: var(--font-family);
|
|
5676
5848
|
font-size: var(--font-size);
|
|
5677
5849
|
font-weight: var(--font-weight);
|
|
5678
5850
|
line-height: var(--line-height);
|
|
5679
|
-
color: var(--color
|
|
5851
|
+
color: var(--text-color);
|
|
5680
5852
|
font-style: normal;
|
|
5681
5853
|
margin: 0;
|
|
5682
5854
|
${({ variant }) => variantStyleMap2[variant]}
|
|
5683
5855
|
${({ prominence }) => prominenceMap[prominence]}
|
|
5684
5856
|
${({ ellipsis }) => ellipsis && ellipsisStyle};
|
|
5685
|
-
${({ inline }) => inline &&
|
|
5857
|
+
${({ inline }) => inline && import_styled_components24.css`
|
|
5686
5858
|
display: inline-block;
|
|
5687
5859
|
`}
|
|
5688
|
-
${({ disabled }) => disabled &&
|
|
5689
|
-
--color
|
|
5860
|
+
${({ disabled }) => disabled && import_styled_components24.css`
|
|
5861
|
+
--text-color: var(--color-text-disabled);
|
|
5690
5862
|
`}
|
|
5691
|
-
${({ preventUserSelect }) => preventUserSelect &&
|
|
5863
|
+
${({ preventUserSelect }) => preventUserSelect && import_styled_components24.css`
|
|
5692
5864
|
user-select: none;
|
|
5693
5865
|
`}
|
|
5694
|
-
${({ align }) =>
|
|
5866
|
+
${({ align }) => import_styled_components24.css`
|
|
5695
5867
|
text-align: ${align};
|
|
5696
5868
|
`}
|
|
5697
|
-
${({ as }) => as === "p" &&
|
|
5869
|
+
${({ as }) => as === "p" && import_styled_components24.css`
|
|
5698
5870
|
display: block;
|
|
5699
5871
|
`}
|
|
5700
5872
|
`;
|
|
5701
5873
|
var DEFAULT_ELEMENT3 = "div";
|
|
5702
|
-
var TextComponent = (0,
|
|
5874
|
+
var TextComponent = (0, import_react12.forwardRef)(
|
|
5703
5875
|
({
|
|
5704
5876
|
align = "left",
|
|
5705
5877
|
colorScheme = "inherit",
|
|
@@ -5707,12 +5879,12 @@ var TextComponent = (0, import_react11.forwardRef)(
|
|
|
5707
5879
|
ellipsis = false,
|
|
5708
5880
|
inline = false,
|
|
5709
5881
|
preventUserSelect = false,
|
|
5710
|
-
prominence = "
|
|
5882
|
+
prominence = "highContrast",
|
|
5711
5883
|
variant = "body2",
|
|
5712
5884
|
renderAs,
|
|
5713
5885
|
...otherProps
|
|
5714
5886
|
}, ref) => {
|
|
5715
|
-
return /* @__PURE__ */ (0,
|
|
5887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
5716
5888
|
StyledText,
|
|
5717
5889
|
{
|
|
5718
5890
|
ref,
|
|
@@ -5734,20 +5906,20 @@ TextComponent.displayName = "Text";
|
|
|
5734
5906
|
var Text = makePolymorphic(TextComponent);
|
|
5735
5907
|
|
|
5736
5908
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
5737
|
-
var
|
|
5909
|
+
var import_styled_components25 = __toESM(require("styled-components"), 1);
|
|
5738
5910
|
var import_type_guards13 = require("@wistia/type-guards");
|
|
5739
|
-
var
|
|
5911
|
+
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
5740
5912
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
5741
5913
|
if (iconOnly) {
|
|
5742
|
-
return /* @__PURE__ */ (0,
|
|
5914
|
+
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
5915
|
}
|
|
5744
|
-
return /* @__PURE__ */ (0,
|
|
5916
|
+
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
5917
|
};
|
|
5746
5918
|
var renderLogotype = (logotypeColor, iconOnly) => {
|
|
5747
5919
|
if (iconOnly) {
|
|
5748
5920
|
return null;
|
|
5749
5921
|
}
|
|
5750
|
-
return /* @__PURE__ */ (0,
|
|
5922
|
+
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
5923
|
};
|
|
5752
5924
|
var computedViewBox = (iconOnly) => {
|
|
5753
5925
|
if (iconOnly) {
|
|
@@ -5755,7 +5927,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
5755
5927
|
}
|
|
5756
5928
|
return "0 0 144 31.47";
|
|
5757
5929
|
};
|
|
5758
|
-
var WistiaLogoComponent =
|
|
5930
|
+
var WistiaLogoComponent = import_styled_components25.default.svg`
|
|
5759
5931
|
height: ${({ height }) => `${height}px`};
|
|
5760
5932
|
|
|
5761
5933
|
/* ensure it will always fit on mobile */
|
|
@@ -5797,7 +5969,7 @@ var WistiaLogo = ({
|
|
|
5797
5969
|
};
|
|
5798
5970
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
5799
5971
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
5800
|
-
const Logo = /* @__PURE__ */ (0,
|
|
5972
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(
|
|
5801
5973
|
WistiaLogoComponent,
|
|
5802
5974
|
{
|
|
5803
5975
|
height,
|
|
@@ -5807,169 +5979,16 @@ var WistiaLogo = ({
|
|
|
5807
5979
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5808
5980
|
...otherProps,
|
|
5809
5981
|
children: [
|
|
5810
|
-
/* @__PURE__ */ (0,
|
|
5811
|
-
(0, import_type_guards13.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)("title", { children: title }),
|
|
5983
|
+
(0, import_type_guards13.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("desc", { children: description }) : null,
|
|
5812
5984
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
5813
5985
|
renderLogotype(logotypeColor, iconOnly)
|
|
5814
5986
|
]
|
|
5815
5987
|
}
|
|
5816
5988
|
);
|
|
5817
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
5989
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("a", { href, children: Logo }) : Logo;
|
|
5818
5990
|
};
|
|
5819
5991
|
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
5992
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5974
5993
|
0 && (module.exports = {
|
|
5975
5994
|
Box,
|
|
@@ -5980,6 +5999,7 @@ IconButton.displayName = "IconButton";
|
|
|
5980
5999
|
Heading,
|
|
5981
6000
|
Icon,
|
|
5982
6001
|
IconButton,
|
|
6002
|
+
Link,
|
|
5983
6003
|
ScreenReaderOnly,
|
|
5984
6004
|
Stack,
|
|
5985
6005
|
Text,
|
|
@@ -5990,6 +6010,7 @@ IconButton.displayName = "IconButton";
|
|
|
5990
6010
|
ellipsisFlexParentStyle,
|
|
5991
6011
|
ellipsisStyle,
|
|
5992
6012
|
iconSizeMap,
|
|
6013
|
+
mq,
|
|
5993
6014
|
useActiveMq,
|
|
5994
6015
|
useAriaLive,
|
|
5995
6016
|
useMq,
|