@wistia/ui 0.0.9 → 0.0.10
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 +291 -206
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +67 -28
- package/dist/index.d.ts +67 -28
- package/dist/index.mjs +282 -199
- 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.10
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2024, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -49,6 +49,7 @@ __export(src_exports, {
|
|
|
49
49
|
Heading: () => Heading,
|
|
50
50
|
Icon: () => Icon,
|
|
51
51
|
IconButton: () => IconButton,
|
|
52
|
+
Label: () => Label,
|
|
52
53
|
Link: () => Link,
|
|
53
54
|
ScreenReaderOnly: () => ScreenReaderOnly,
|
|
54
55
|
Stack: () => Stack,
|
|
@@ -56,6 +57,7 @@ __export(src_exports, {
|
|
|
56
57
|
Tooltip: () => Tooltip,
|
|
57
58
|
UIProvider: () => UIProvider,
|
|
58
59
|
WistiaLogo: () => WistiaLogo,
|
|
60
|
+
colorSchemeOptions: () => colorSchemeOptions,
|
|
59
61
|
copyToClipboard: () => copyToClipboard,
|
|
60
62
|
ellipsisFlexParentStyle: () => ellipsisFlexParentStyle,
|
|
61
63
|
ellipsisStyle: () => ellipsisStyle,
|
|
@@ -1576,22 +1578,22 @@ var getFillViewportStyle = (fillViewport) => {
|
|
|
1576
1578
|
return void 0;
|
|
1577
1579
|
};
|
|
1578
1580
|
var BoxComponent = import_styled_components12.default.div`
|
|
1579
|
-
align-content: ${({ alignContent }) => alignContent};
|
|
1580
|
-
align-items: ${({ alignItems }) => alignItems};
|
|
1581
|
-
align-self: ${({ alignSelf }) => alignSelf ?? null};
|
|
1582
|
-
display: ${({ inline }) => (0, import_type_guards6.isNotNil)(inline) && inline ? "inline-flex" : "flex"};
|
|
1583
|
-
flex-basis: ${({ basis }) => (0, import_type_guards6.isNotNil)(basis) ? basis : null};
|
|
1584
|
-
flex-direction: ${({ flexDirection }) => flexDirection};
|
|
1585
|
-
${({ fillBox: fill }) => getFillStyle(fill)};
|
|
1586
|
-
${({ fillViewport }) => getFillViewportStyle(fillViewport)};
|
|
1581
|
+
align-content: ${({ $alignContent }) => $alignContent};
|
|
1582
|
+
align-items: ${({ $alignItems }) => $alignItems};
|
|
1583
|
+
align-self: ${({ $alignSelf }) => $alignSelf ?? null};
|
|
1584
|
+
display: ${({ $inline }) => (0, import_type_guards6.isNotNil)($inline) && $inline ? "inline-flex" : "flex"};
|
|
1585
|
+
flex-basis: ${({ $basis }) => (0, import_type_guards6.isNotNil)($basis) ? $basis : null};
|
|
1586
|
+
flex-direction: ${({ $flexDirection }) => $flexDirection};
|
|
1587
|
+
${({ $fillBox: fill }) => getFillStyle(fill)};
|
|
1588
|
+
${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
|
|
1587
1589
|
|
|
1588
1590
|
/* Box children styles */
|
|
1589
|
-
flex-grow: ${({ grow }) => (0, import_type_guards6.isNotNil)(grow) ? grow : null};
|
|
1590
|
-
flex-shrink: ${({ shrink }) => (0, import_type_guards6.isNotNil)(shrink) ? shrink : null};
|
|
1591
|
-
flex-wrap: ${({ wrapItems }) => wrapItems ? "wrap" : "nowrap"};
|
|
1592
|
-
${({ gap }) => getGapStyle(gap)};
|
|
1593
|
-
justify-content: ${({ justifyContent }) => justifyContent};
|
|
1594
|
-
order: ${({ order }) => (0, import_type_guards6.isNotNil)(order) ? order : null};
|
|
1591
|
+
flex-grow: ${({ $grow }) => (0, import_type_guards6.isNotNil)($grow) ? $grow : null};
|
|
1592
|
+
flex-shrink: ${({ $shrink }) => (0, import_type_guards6.isNotNil)($shrink) ? $shrink : null};
|
|
1593
|
+
flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
|
|
1594
|
+
${({ $gap }) => getGapStyle($gap)};
|
|
1595
|
+
justify-content: ${({ $justifyContent }) => $justifyContent};
|
|
1596
|
+
order: ${({ $order }) => (0, import_type_guards6.isNotNil)($order) ? $order : null};
|
|
1595
1597
|
`;
|
|
1596
1598
|
var wrapChildren = (children) => {
|
|
1597
1599
|
if ((0, import_type_guards6.isNotNil)(children)) {
|
|
@@ -1617,6 +1619,7 @@ var Box = ({
|
|
|
1617
1619
|
hasBoxParent = false,
|
|
1618
1620
|
fill = false,
|
|
1619
1621
|
fillViewport = false,
|
|
1622
|
+
gap,
|
|
1620
1623
|
inline = false,
|
|
1621
1624
|
justifyContent = "flex-start",
|
|
1622
1625
|
wrapItems = false,
|
|
@@ -1632,15 +1635,16 @@ var Box = ({
|
|
|
1632
1635
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1633
1636
|
BoxComponent,
|
|
1634
1637
|
{
|
|
1635
|
-
alignContent,
|
|
1636
|
-
alignItems,
|
|
1638
|
+
$alignContent: alignContent,
|
|
1639
|
+
$alignItems: alignItems,
|
|
1640
|
+
$fillBox: fill,
|
|
1641
|
+
$fillViewport: fillViewport,
|
|
1642
|
+
$flexDirection: direction,
|
|
1643
|
+
$gap: gap,
|
|
1644
|
+
$inline: inline,
|
|
1645
|
+
$justifyContent: justifyContent,
|
|
1646
|
+
$wrapItems: wrapItems,
|
|
1637
1647
|
as: "div",
|
|
1638
|
-
fillBox: fill,
|
|
1639
|
-
fillViewport,
|
|
1640
|
-
flexDirection: direction,
|
|
1641
|
-
inline,
|
|
1642
|
-
justifyContent,
|
|
1643
|
-
wrapItems,
|
|
1644
1648
|
...otherProps,
|
|
1645
1649
|
children: wrapChildren(children)
|
|
1646
1650
|
}
|
|
@@ -1650,8 +1654,8 @@ Box.displayName = "Box";
|
|
|
1650
1654
|
|
|
1651
1655
|
// src/components/Button/Button.tsx
|
|
1652
1656
|
var import_react9 = require("react");
|
|
1653
|
-
var import_type_guards10 = require("@wistia/type-guards");
|
|
1654
1657
|
var import_styled_components17 = __toESM(require("styled-components"));
|
|
1658
|
+
var import_type_guards10 = require("@wistia/type-guards");
|
|
1655
1659
|
|
|
1656
1660
|
// src/css/buttonResetCss.tsx
|
|
1657
1661
|
var import_styled_components13 = require("styled-components");
|
|
@@ -1734,7 +1738,7 @@ var buttonLargeStyles = import_styled_components14.css`
|
|
|
1734
1738
|
--button-icon-size: 24px;
|
|
1735
1739
|
--button-label-gap: 8px;
|
|
1736
1740
|
`;
|
|
1737
|
-
var
|
|
1741
|
+
var buttonExtraLargeStyles = import_styled_components14.css`
|
|
1738
1742
|
--button-padding-vertical: var(--space-03);
|
|
1739
1743
|
--button-padding-horizontal: var(--space-03);
|
|
1740
1744
|
--button-label-padding-horizontal: var(--space-02);
|
|
@@ -1849,10 +1853,10 @@ var buttonVariantsStyles = {
|
|
|
1849
1853
|
solid: solidButtonVariant
|
|
1850
1854
|
};
|
|
1851
1855
|
var buttonSizeStyles = {
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
+
sm: buttonSmallStyles,
|
|
1857
|
+
md: buttonMediumStyles,
|
|
1858
|
+
lg: buttonLargeStyles,
|
|
1859
|
+
xl: buttonExtraLargeStyles
|
|
1856
1860
|
};
|
|
1857
1861
|
|
|
1858
1862
|
// src/components/Icon/Icon.tsx
|
|
@@ -4397,21 +4401,34 @@ var SparkleIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
|
4397
4401
|
|
|
4398
4402
|
// src/components/Icon/icons/SpinnerIcon.tsx
|
|
4399
4403
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
4400
|
-
var SpinnerIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime135.
|
|
4404
|
+
var SpinnerIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
4401
4405
|
"svg",
|
|
4402
4406
|
{
|
|
4403
4407
|
...props,
|
|
4404
4408
|
viewBox: "0 0 24 24",
|
|
4405
4409
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4406
|
-
children:
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4410
|
+
children: [
|
|
4411
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
4412
|
+
"path",
|
|
4413
|
+
{
|
|
4414
|
+
clipRule: "evenodd",
|
|
4415
|
+
d: "M11.9999 5.33314C8.31802 5.33314 5.33326 8.31788 5.33326 11.9998C5.33326 15.6817 8.31802 18.6664 11.9999 18.6664C15.6818 18.6664 18.6666 15.6817 18.6666 11.9998C18.6666 11.0793 19.4127 10.3331 20.3332 10.3331C21.2537 10.3331 21.9999 11.0793 21.9999 11.9998C21.9999 17.5226 17.5227 21.9998 11.9999 21.9998C6.47708 21.9998 1.99994 17.5226 1.99994 11.9998C1.99994 6.47697 6.47708 1.99981 11.9999 1.99981C12.9204 1.99981 13.6666 2.74598 13.6666 3.66647C13.6666 4.58697 12.9204 5.33314 11.9999 5.33314Z",
|
|
4416
|
+
fill: "currentColor",
|
|
4417
|
+
fillRule: "evenodd"
|
|
4418
|
+
}
|
|
4419
|
+
),
|
|
4420
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
4421
|
+
"animateTransform",
|
|
4422
|
+
{
|
|
4423
|
+
attributeName: "transform",
|
|
4424
|
+
dur: "1.5s",
|
|
4425
|
+
keyTimes: "0;1",
|
|
4426
|
+
repeatCount: "indefinite",
|
|
4427
|
+
type: "rotate",
|
|
4428
|
+
values: "0 0 0;360 0 0"
|
|
4429
|
+
}
|
|
4430
|
+
)
|
|
4431
|
+
]
|
|
4415
4432
|
}
|
|
4416
4433
|
);
|
|
4417
4434
|
|
|
@@ -5176,11 +5193,11 @@ var import_jsx_runtime159 = require("react/jsx-runtime");
|
|
|
5176
5193
|
var isLink2 = (props) => (0, import_type_guards10.isNotUndefined)(props.href);
|
|
5177
5194
|
var StyledButton = import_styled_components17.default.button`
|
|
5178
5195
|
${buttonResetCss}
|
|
5179
|
-
${({ colorScheme }) => getColorScheme(colorScheme)}
|
|
5180
|
-
${({ size }) => buttonSizeStyles[size]}
|
|
5181
|
-
${({ variant }) => buttonVariantsStyles[variant]}
|
|
5182
|
-
${({ unstyled }) =>
|
|
5183
|
-
${({ fullWidth }) => fullWidth && "width: 100%;"}
|
|
5196
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
5197
|
+
${({ $size }) => buttonSizeStyles[$size]}
|
|
5198
|
+
${({ $variant }) => buttonVariantsStyles[$variant]}
|
|
5199
|
+
${({ $unstyled }) => !$unstyled && buttonBaseStyles}
|
|
5200
|
+
${({ $fullWidth }) => $fullWidth && "width: 100%;"}
|
|
5184
5201
|
position: relative;
|
|
5185
5202
|
`;
|
|
5186
5203
|
var StyledButtonContent = import_styled_components17.default.div`
|
|
@@ -5239,7 +5256,7 @@ var Button = (0, import_react9.forwardRef)(
|
|
|
5239
5256
|
unstyled = false,
|
|
5240
5257
|
onClick,
|
|
5241
5258
|
fullWidth = false,
|
|
5242
|
-
size = "
|
|
5259
|
+
size = "md",
|
|
5243
5260
|
variant = "solid",
|
|
5244
5261
|
...props
|
|
5245
5262
|
}, ref) => {
|
|
@@ -5248,14 +5265,14 @@ var Button = (0, import_react9.forwardRef)(
|
|
|
5248
5265
|
const isAriaDisabled = () => isLoading || disabled;
|
|
5249
5266
|
const commonProps = {
|
|
5250
5267
|
"aria-disabled": isAriaDisabled() || void 0,
|
|
5251
|
-
colorScheme,
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
unstyled,
|
|
5268
|
+
$colorScheme: colorScheme,
|
|
5269
|
+
$fullWidth: responsiveFullWidth,
|
|
5270
|
+
$size: responsiveSize,
|
|
5271
|
+
$unstyled: unstyled,
|
|
5272
|
+
$variant: variant,
|
|
5255
5273
|
className,
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
fullWidth: responsiveFullWidth
|
|
5274
|
+
forceState,
|
|
5275
|
+
isLoading
|
|
5259
5276
|
};
|
|
5260
5277
|
if (forceState) {
|
|
5261
5278
|
commonProps.className = `${className ?? ""} force-state-${forceState}`;
|
|
@@ -5332,11 +5349,11 @@ var ButtonGroupComponent = import_styled_components18.default.div`
|
|
|
5332
5349
|
display: flex;
|
|
5333
5350
|
|
|
5334
5351
|
/* this helps ensure that primary buttons appear at the top of the column */
|
|
5335
|
-
flex-direction: ${({ align }) => align === "right" ? "column-reverse" : "column"};
|
|
5352
|
+
flex-direction: ${({ $align }) => $align === "right" ? "column-reverse" : "column"};
|
|
5336
5353
|
gap: var(--space-04);
|
|
5337
5354
|
align-items: center;
|
|
5338
|
-
justify-content: ${({ align }) => getAlignment(align)};
|
|
5339
|
-
width: ${({ fullWidth }) => fullWidth ? "100%" : "auto"};
|
|
5355
|
+
justify-content: ${({ $align }) => getAlignment($align)};
|
|
5356
|
+
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
5340
5357
|
|
|
5341
5358
|
${mq.smAndUp} {
|
|
5342
5359
|
flex-direction: row;
|
|
@@ -5360,8 +5377,8 @@ var ButtonGroup = ({
|
|
|
5360
5377
|
return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
|
|
5361
5378
|
ButtonGroupComponent,
|
|
5362
5379
|
{
|
|
5363
|
-
align,
|
|
5364
|
-
fullWidth,
|
|
5380
|
+
$align: align,
|
|
5381
|
+
$fullWidth: fullWidth,
|
|
5365
5382
|
...otherProps,
|
|
5366
5383
|
children
|
|
5367
5384
|
}
|
|
@@ -5369,21 +5386,55 @@ var ButtonGroup = ({
|
|
|
5369
5386
|
};
|
|
5370
5387
|
ButtonGroup.displayName = "ButtonGroup";
|
|
5371
5388
|
|
|
5372
|
-
// src/components/
|
|
5389
|
+
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
5373
5390
|
var import_styled_components19 = __toESM(require("styled-components"));
|
|
5374
5391
|
var import_jsx_runtime161 = require("react/jsx-runtime");
|
|
5392
|
+
var colorSchemeOptions = [
|
|
5393
|
+
"inherit",
|
|
5394
|
+
"default",
|
|
5395
|
+
"info",
|
|
5396
|
+
"success",
|
|
5397
|
+
"warning",
|
|
5398
|
+
"error",
|
|
5399
|
+
"blue",
|
|
5400
|
+
"green",
|
|
5401
|
+
"orange",
|
|
5402
|
+
"pink",
|
|
5403
|
+
"purple",
|
|
5404
|
+
"yellow"
|
|
5405
|
+
];
|
|
5406
|
+
var StyledColorSchemeWrapper = import_styled_components19.default.div`
|
|
5407
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
5408
|
+
`;
|
|
5409
|
+
var ColorSchemeWrapper = ({
|
|
5410
|
+
colorScheme,
|
|
5411
|
+
children,
|
|
5412
|
+
...otherProps
|
|
5413
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
|
|
5414
|
+
StyledColorSchemeWrapper,
|
|
5415
|
+
{
|
|
5416
|
+
$colorScheme: colorScheme,
|
|
5417
|
+
...otherProps,
|
|
5418
|
+
children
|
|
5419
|
+
}
|
|
5420
|
+
);
|
|
5421
|
+
ColorSchemeWrapper.displayName = "ColorSchemeWrapper";
|
|
5422
|
+
|
|
5423
|
+
// src/components/Divider/Divider.tsx
|
|
5424
|
+
var import_styled_components20 = __toESM(require("styled-components"));
|
|
5425
|
+
var import_jsx_runtime162 = require("react/jsx-runtime");
|
|
5375
5426
|
var sizeToPixelMap = {
|
|
5376
5427
|
lg: 4,
|
|
5377
5428
|
sm: 1
|
|
5378
5429
|
};
|
|
5379
|
-
var DividerComponent =
|
|
5430
|
+
var DividerComponent = import_styled_components20.default.hr`
|
|
5380
5431
|
background: none;
|
|
5381
5432
|
border-bottom: none;
|
|
5382
5433
|
border-left: none;
|
|
5383
5434
|
border-right: none;
|
|
5384
5435
|
border-top-color: var(--color-border);
|
|
5385
5436
|
border-top-style: solid;
|
|
5386
|
-
border-top-width: ${({ borderHeight }) => `${borderHeight}px`};
|
|
5437
|
+
border-top-width: ${({ $borderHeight }) => `${$borderHeight}px`};
|
|
5387
5438
|
clear: both;
|
|
5388
5439
|
height: 0;
|
|
5389
5440
|
line-height: 0;
|
|
@@ -5391,10 +5442,10 @@ var DividerComponent = import_styled_components19.default.hr`
|
|
|
5391
5442
|
`;
|
|
5392
5443
|
var Divider = ({ size = "sm", ...otherProps }) => {
|
|
5393
5444
|
const responsiveSize = useResponsiveProp(size);
|
|
5394
|
-
return /* @__PURE__ */ (0,
|
|
5445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
|
|
5395
5446
|
DividerComponent,
|
|
5396
5447
|
{
|
|
5397
|
-
borderHeight: sizeToPixelMap[responsiveSize],
|
|
5448
|
+
$borderHeight: sizeToPixelMap[responsiveSize],
|
|
5398
5449
|
...otherProps
|
|
5399
5450
|
}
|
|
5400
5451
|
);
|
|
@@ -5403,9 +5454,9 @@ Divider.displayName = "Divider";
|
|
|
5403
5454
|
|
|
5404
5455
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
5405
5456
|
var import_type_guards12 = require("@wistia/type-guards");
|
|
5406
|
-
var
|
|
5407
|
-
var
|
|
5408
|
-
var ellipsisStyle =
|
|
5457
|
+
var import_styled_components21 = __toESM(require("styled-components"));
|
|
5458
|
+
var import_jsx_runtime163 = require("react/jsx-runtime");
|
|
5459
|
+
var ellipsisStyle = import_styled_components21.css`
|
|
5409
5460
|
overflow: hidden;
|
|
5410
5461
|
text-overflow: ellipsis;
|
|
5411
5462
|
white-space: nowrap;
|
|
@@ -5428,16 +5479,16 @@ var ellipsisStyle = import_styled_components20.css`
|
|
|
5428
5479
|
}
|
|
5429
5480
|
}
|
|
5430
5481
|
`;
|
|
5431
|
-
var ellipsisFlexParentStyle =
|
|
5482
|
+
var ellipsisFlexParentStyle = import_styled_components21.css`
|
|
5432
5483
|
min-width: 0;
|
|
5433
5484
|
`;
|
|
5434
|
-
var EllipsisComponent =
|
|
5485
|
+
var EllipsisComponent = import_styled_components21.default.div`
|
|
5435
5486
|
${ellipsisStyle};
|
|
5436
|
-
${({ lines }) => {
|
|
5437
|
-
if ((0, import_type_guards12.isNotNil)(lines)) {
|
|
5438
|
-
return
|
|
5487
|
+
${({ $lines }) => {
|
|
5488
|
+
if ((0, import_type_guards12.isNotNil)($lines)) {
|
|
5489
|
+
return import_styled_components21.css`
|
|
5439
5490
|
-webkit-box-orient: vertical;
|
|
5440
|
-
-webkit-line-clamp: ${lines};
|
|
5491
|
+
-webkit-line-clamp: ${$lines};
|
|
5441
5492
|
display: -webkit-box;
|
|
5442
5493
|
white-space: initial;
|
|
5443
5494
|
`;
|
|
@@ -5445,10 +5496,10 @@ var EllipsisComponent = import_styled_components20.default.div`
|
|
|
5445
5496
|
return void 0;
|
|
5446
5497
|
}}
|
|
5447
5498
|
`;
|
|
5448
|
-
var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ (0,
|
|
5499
|
+
var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
|
|
5449
5500
|
EllipsisComponent,
|
|
5450
5501
|
{
|
|
5451
|
-
lines,
|
|
5502
|
+
$lines: lines,
|
|
5452
5503
|
...otherProps,
|
|
5453
5504
|
children
|
|
5454
5505
|
}
|
|
@@ -5457,7 +5508,7 @@ Ellipsis.displayName = "Ellipsis";
|
|
|
5457
5508
|
|
|
5458
5509
|
// src/components/Heading/Heading.tsx
|
|
5459
5510
|
var import_react10 = require("react");
|
|
5460
|
-
var
|
|
5511
|
+
var import_styled_components22 = __toESM(require("styled-components"));
|
|
5461
5512
|
|
|
5462
5513
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
5463
5514
|
var makePolymorphic = (component) => {
|
|
@@ -5465,44 +5516,44 @@ var makePolymorphic = (component) => {
|
|
|
5465
5516
|
};
|
|
5466
5517
|
|
|
5467
5518
|
// src/components/Heading/Heading.tsx
|
|
5468
|
-
var
|
|
5469
|
-
var heroStyle =
|
|
5519
|
+
var import_jsx_runtime164 = require("react/jsx-runtime");
|
|
5520
|
+
var heroStyle = import_styled_components22.css`
|
|
5470
5521
|
--font-family: var(--typography-heading-hero-family);
|
|
5471
5522
|
--font-size: var(--typography-heading-hero-size);
|
|
5472
5523
|
--font-weight: var(--typography-heading-hero-weight);
|
|
5473
5524
|
--line-height: var(--typography-heading-hero-line-height);
|
|
5474
5525
|
`;
|
|
5475
|
-
var heading1TextStyle =
|
|
5526
|
+
var heading1TextStyle = import_styled_components22.css`
|
|
5476
5527
|
--font-family: var(--typography-heading-1-family);
|
|
5477
5528
|
--font-size: var(--typography-heading-1-size);
|
|
5478
5529
|
--font-weight: var(--typography-heading-1-weight);
|
|
5479
5530
|
--line-height: var(--typography-heading-1-line-height);
|
|
5480
5531
|
`;
|
|
5481
|
-
var heading2TextStyle =
|
|
5532
|
+
var heading2TextStyle = import_styled_components22.css`
|
|
5482
5533
|
--font-family: var(--typography-heading-2-family);
|
|
5483
5534
|
--font-size: var(--typography-heading-2-size);
|
|
5484
5535
|
--font-weight: var(--typography-heading-2-weight);
|
|
5485
5536
|
--line-height: var(--typography-heading-2-line-height);
|
|
5486
5537
|
`;
|
|
5487
|
-
var heading3TextStyle =
|
|
5538
|
+
var heading3TextStyle = import_styled_components22.css`
|
|
5488
5539
|
--font-family: var(--typography-heading-3-family);
|
|
5489
5540
|
--font-size: var(--typography-heading-3-size);
|
|
5490
5541
|
--font-weight: var(--typography-heading-3-weight);
|
|
5491
5542
|
--line-height: var(--typography-heading-3-line-height);
|
|
5492
5543
|
`;
|
|
5493
|
-
var heading4TextStyle =
|
|
5544
|
+
var heading4TextStyle = import_styled_components22.css`
|
|
5494
5545
|
--font-family: var(--typography-heading-4-family);
|
|
5495
5546
|
--font-size: var(--typography-heading-4-size);
|
|
5496
5547
|
--font-weight: var(--typography-heading-4-weight);
|
|
5497
5548
|
--line-height: var(--typography-heading-4-line-height);
|
|
5498
5549
|
`;
|
|
5499
|
-
var heading5TextStyle =
|
|
5550
|
+
var heading5TextStyle = import_styled_components22.css`
|
|
5500
5551
|
--font-family: var(--typography-heading-5-family);
|
|
5501
5552
|
--font-size: var(--typography-heading-5-size);
|
|
5502
5553
|
--font-weight: var(--typography-heading-5-weight);
|
|
5503
5554
|
--line-height: var(--typography-heading-5-line-height);
|
|
5504
5555
|
`;
|
|
5505
|
-
var heading6TextStyle =
|
|
5556
|
+
var heading6TextStyle = import_styled_components22.css`
|
|
5506
5557
|
--font-family: var(--typography-heading-6-family);
|
|
5507
5558
|
--font-size: var(--typography-heading-6-size);
|
|
5508
5559
|
--font-weight: var(--typography-heading-6-weight);
|
|
@@ -5518,26 +5569,26 @@ var variantStyleMap = {
|
|
|
5518
5569
|
heading6: heading6TextStyle
|
|
5519
5570
|
};
|
|
5520
5571
|
var DEFAULT_ELEMENT = "h1";
|
|
5521
|
-
var StyledHeading =
|
|
5522
|
-
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
5572
|
+
var StyledHeading = import_styled_components22.default.div`
|
|
5573
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
5523
5574
|
font-family: var(--font-family);
|
|
5524
5575
|
font-size: var(--font-size);
|
|
5525
5576
|
font-weight: var(--font-weight);
|
|
5526
5577
|
line-height: var(--line-height);
|
|
5527
5578
|
color: var(--color-text);
|
|
5528
|
-
${({ variant }) => variantStyleMap[variant]}
|
|
5529
|
-
${({ ellipsis }) => ellipsis && ellipsisStyle};
|
|
5530
|
-
${({ inline }) => inline &&
|
|
5579
|
+
${({ $variant }) => variantStyleMap[$variant]}
|
|
5580
|
+
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
5581
|
+
${({ $inline }) => $inline && import_styled_components22.css`
|
|
5531
5582
|
display: inline-block;
|
|
5532
5583
|
`}
|
|
5533
|
-
${({ disabled }) => disabled &&
|
|
5584
|
+
${({ $disabled }) => $disabled && import_styled_components22.css`
|
|
5534
5585
|
color: var(--color-text-disabled);
|
|
5535
5586
|
`}
|
|
5536
|
-
${({ preventUserSelect }) => preventUserSelect &&
|
|
5587
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components22.css`
|
|
5537
5588
|
user-select: none;
|
|
5538
5589
|
`}
|
|
5539
|
-
${({ align }) =>
|
|
5540
|
-
text-align: ${align};
|
|
5590
|
+
${({ $align }) => import_styled_components22.css`
|
|
5591
|
+
text-align: ${$align};
|
|
5541
5592
|
`}
|
|
5542
5593
|
margin: 0;
|
|
5543
5594
|
`;
|
|
@@ -5561,18 +5612,18 @@ var HeadingComponent = (0, import_react10.forwardRef)(
|
|
|
5561
5612
|
variant = "heading1",
|
|
5562
5613
|
renderAs,
|
|
5563
5614
|
...otherProps
|
|
5564
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
5615
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
|
|
5565
5616
|
StyledHeading,
|
|
5566
5617
|
{
|
|
5567
5618
|
ref,
|
|
5568
|
-
align,
|
|
5619
|
+
$align: align,
|
|
5620
|
+
$colorScheme: colorScheme,
|
|
5621
|
+
$disabled: disabled,
|
|
5622
|
+
$ellipsis: ellipsis,
|
|
5623
|
+
$inline: inline,
|
|
5624
|
+
$preventUserSelect: preventUserSelect,
|
|
5625
|
+
$variant: variant,
|
|
5569
5626
|
as: renderAs ?? variantElementMap[variant],
|
|
5570
|
-
colorScheme,
|
|
5571
|
-
disabled,
|
|
5572
|
-
ellipsis,
|
|
5573
|
-
inline,
|
|
5574
|
-
preventUserSelect,
|
|
5575
|
-
variant,
|
|
5576
5627
|
...otherProps
|
|
5577
5628
|
}
|
|
5578
5629
|
)
|
|
@@ -5582,20 +5633,20 @@ var Heading = makePolymorphic(HeadingComponent);
|
|
|
5582
5633
|
|
|
5583
5634
|
// src/components/IconButton/IconButton.tsx
|
|
5584
5635
|
var import_react11 = require("react");
|
|
5585
|
-
var
|
|
5636
|
+
var import_styled_components24 = __toESM(require("styled-components"));
|
|
5586
5637
|
|
|
5587
5638
|
// src/components/Tooltip/Tooltip.tsx
|
|
5588
5639
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
5589
|
-
var
|
|
5590
|
-
var
|
|
5591
|
-
var CompactTooltipStyles =
|
|
5640
|
+
var import_styled_components23 = __toESM(require("styled-components"));
|
|
5641
|
+
var import_jsx_runtime165 = require("react/jsx-runtime");
|
|
5642
|
+
var CompactTooltipStyles = import_styled_components23.css`
|
|
5592
5643
|
--tooltip-font-size: var(--typography-label-4-size);
|
|
5593
5644
|
--tooltip-line-height: var(--typography-label-4-line-height);
|
|
5594
5645
|
--tooltip-font-weight: var(--typography-label-4-weight);
|
|
5595
5646
|
--tooltip-horizontal-padding: var(--space-02);
|
|
5596
5647
|
--tooltip-vertical-padding: var(--space-03);
|
|
5597
5648
|
`;
|
|
5598
|
-
var StyledContent = (0,
|
|
5649
|
+
var StyledContent = (0, import_styled_components23.default)(import_react_tooltip2.Content)`
|
|
5599
5650
|
--tooltip-font-family: var(--typography-family-default);
|
|
5600
5651
|
--tooltip-border-radius: var(--border-radius-05);
|
|
5601
5652
|
--tooltip-bg: var(--color-bg-tooltip);
|
|
@@ -5653,14 +5704,14 @@ var Tooltip = ({
|
|
|
5653
5704
|
if (forceOpen === true) {
|
|
5654
5705
|
rootProps.open = true;
|
|
5655
5706
|
}
|
|
5656
|
-
return /* @__PURE__ */ (0,
|
|
5707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)(
|
|
5657
5708
|
import_react_tooltip2.Root,
|
|
5658
5709
|
{
|
|
5659
5710
|
delayDuration: delay,
|
|
5660
5711
|
...rootProps,
|
|
5661
5712
|
children: [
|
|
5662
|
-
/* @__PURE__ */ (0,
|
|
5663
|
-
/* @__PURE__ */ (0,
|
|
5713
|
+
/* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
5714
|
+
/* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)(
|
|
5664
5715
|
StyledContent,
|
|
5665
5716
|
{
|
|
5666
5717
|
$compact: compact,
|
|
@@ -5668,7 +5719,7 @@ var Tooltip = ({
|
|
|
5668
5719
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
5669
5720
|
children: [
|
|
5670
5721
|
content,
|
|
5671
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
5722
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
|
|
5672
5723
|
"svg",
|
|
5673
5724
|
{
|
|
5674
5725
|
fill: "var(--tooltip-bg)",
|
|
@@ -5677,7 +5728,7 @@ var Tooltip = ({
|
|
|
5677
5728
|
viewBox: "0 0 12 8",
|
|
5678
5729
|
width: "12",
|
|
5679
5730
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5680
|
-
children: /* @__PURE__ */ (0,
|
|
5731
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime165.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" })
|
|
5681
5732
|
}
|
|
5682
5733
|
) }) : null
|
|
5683
5734
|
]
|
|
@@ -5690,18 +5741,12 @@ var Tooltip = ({
|
|
|
5690
5741
|
Tooltip.displayName = "Tooltip";
|
|
5691
5742
|
|
|
5692
5743
|
// src/components/IconButton/IconButton.tsx
|
|
5693
|
-
var
|
|
5694
|
-
var
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
};
|
|
5700
|
-
var StyledButton2 = (0, import_styled_components23.default)(Button)`
|
|
5701
|
-
--icon-button-size-small: 24px;
|
|
5702
|
-
--icon-button-size-medium: 32px;
|
|
5703
|
-
--icon-button-size-large: 40px;
|
|
5704
|
-
--icon-button-size-hero: 48px;
|
|
5744
|
+
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
5745
|
+
var StyledButton2 = (0, import_styled_components24.default)(Button)`
|
|
5746
|
+
--icon-button-size-sm: 24px;
|
|
5747
|
+
--icon-button-size-md: 32px;
|
|
5748
|
+
--icon-button-size-lg: 40px;
|
|
5749
|
+
--icon-button-size-xl: 48px;
|
|
5705
5750
|
|
|
5706
5751
|
border-radius: 50%;
|
|
5707
5752
|
height: ${({ size }) => `var(--icon-button-size-${size})`};
|
|
@@ -5712,9 +5757,9 @@ var StyledButton2 = (0, import_styled_components23.default)(Button)`
|
|
|
5712
5757
|
line-height: 1;
|
|
5713
5758
|
`;
|
|
5714
5759
|
var IconButton = (0, import_react11.forwardRef)(
|
|
5715
|
-
({ children, label, disableTooltip = false, size = "
|
|
5760
|
+
({ children, label, disableTooltip = false, size = "md", ...props }, ref) => {
|
|
5716
5761
|
const responsiveSize = useResponsiveProp(size);
|
|
5717
|
-
const button = /* @__PURE__ */ (0,
|
|
5762
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
|
|
5718
5763
|
StyledButton2,
|
|
5719
5764
|
{
|
|
5720
5765
|
...props,
|
|
@@ -5723,24 +5768,82 @@ var IconButton = (0, import_react11.forwardRef)(
|
|
|
5723
5768
|
"data-wistia-ui-icon-button": true,
|
|
5724
5769
|
size: responsiveSize,
|
|
5725
5770
|
children: (0, import_react11.cloneElement)(import_react11.Children.only(children), {
|
|
5726
|
-
size:
|
|
5771
|
+
size: responsiveSize
|
|
5727
5772
|
})
|
|
5728
5773
|
}
|
|
5729
5774
|
);
|
|
5730
5775
|
if (disableTooltip) {
|
|
5731
5776
|
return button;
|
|
5732
5777
|
}
|
|
5733
|
-
return /* @__PURE__ */ (0,
|
|
5778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(Tooltip, { content: label, children: button });
|
|
5734
5779
|
}
|
|
5735
5780
|
);
|
|
5736
5781
|
IconButton.displayName = "IconButton";
|
|
5737
5782
|
|
|
5783
|
+
// src/components/Label/Label.tsx
|
|
5784
|
+
var import_styled_components25 = __toESM(require("styled-components"));
|
|
5785
|
+
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
5786
|
+
var requiredStyle = import_styled_components25.css`
|
|
5787
|
+
&::after {
|
|
5788
|
+
color: red; /* TODO need a color for this */
|
|
5789
|
+
display: inline;
|
|
5790
|
+
padding-left: var(--space-01);
|
|
5791
|
+
content: '*';
|
|
5792
|
+
}
|
|
5793
|
+
`;
|
|
5794
|
+
var disabledStyle = import_styled_components25.css`
|
|
5795
|
+
color: var(--color-text-disabled);
|
|
5796
|
+
`;
|
|
5797
|
+
var SPACE_BETWEEN_LABEL_AND_INPUT = "var(--space-02)";
|
|
5798
|
+
var StyledLabel = import_styled_components25.default.label`
|
|
5799
|
+
display: block;
|
|
5800
|
+
font-size: var(--typography-label-1-size);
|
|
5801
|
+
font-weight: var(--typography-label-1-weight);
|
|
5802
|
+
line-height: var(--typography-label-1-line-height);
|
|
5803
|
+
margin-bottom: ${SPACE_BETWEEN_LABEL_AND_INPUT};
|
|
5804
|
+
width: 100%;
|
|
5805
|
+
|
|
5806
|
+
/* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
|
|
5807
|
+
> input,
|
|
5808
|
+
> textarea,
|
|
5809
|
+
> select {
|
|
5810
|
+
display: block;
|
|
5811
|
+
margin-top: ${SPACE_BETWEEN_LABEL_AND_INPUT};
|
|
5812
|
+
}
|
|
5813
|
+
|
|
5814
|
+
> label {
|
|
5815
|
+
font-weight: normal;
|
|
5816
|
+
}
|
|
5817
|
+
|
|
5818
|
+
${({ screenReaderOnly }) => screenReaderOnly && visuallyHiddenStyle}
|
|
5819
|
+
${({ disabled }) => disabled && disabledStyle}
|
|
5820
|
+
${({ required }) => required && requiredStyle}
|
|
5821
|
+
`;
|
|
5822
|
+
var Label = ({
|
|
5823
|
+
children,
|
|
5824
|
+
disabled = false,
|
|
5825
|
+
htmlFor,
|
|
5826
|
+
required = false,
|
|
5827
|
+
screenReaderOnly = false,
|
|
5828
|
+
...otherProps
|
|
5829
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
5830
|
+
StyledLabel,
|
|
5831
|
+
{
|
|
5832
|
+
disabled,
|
|
5833
|
+
required,
|
|
5834
|
+
screenReaderOnly,
|
|
5835
|
+
...otherProps,
|
|
5836
|
+
children
|
|
5837
|
+
}
|
|
5838
|
+
);
|
|
5839
|
+
Label.displayName = "Label";
|
|
5840
|
+
|
|
5738
5841
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
5739
|
-
var
|
|
5842
|
+
var import_styled_components26 = __toESM(require("styled-components"));
|
|
5740
5843
|
var import_type_guards13 = require("@wistia/type-guards");
|
|
5741
|
-
var
|
|
5742
|
-
var VisuallyHidden =
|
|
5743
|
-
var VisuallyHiddenButFocusable =
|
|
5844
|
+
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
5845
|
+
var VisuallyHidden = import_styled_components26.default.div({ ...visuallyHiddenStyle });
|
|
5846
|
+
var VisuallyHiddenButFocusable = import_styled_components26.default.div({
|
|
5744
5847
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
5745
5848
|
});
|
|
5746
5849
|
var ScreenReaderOnly = ({
|
|
@@ -5751,21 +5854,21 @@ var ScreenReaderOnly = ({
|
|
|
5751
5854
|
}) => {
|
|
5752
5855
|
const accessibleText = (0, import_type_guards13.isNotNil)(text) ? text : children;
|
|
5753
5856
|
if (focusable) {
|
|
5754
|
-
return /* @__PURE__ */ (0,
|
|
5857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
5755
5858
|
}
|
|
5756
|
-
return /* @__PURE__ */ (0,
|
|
5859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
5757
5860
|
};
|
|
5758
5861
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
5759
5862
|
|
|
5760
5863
|
// src/components/Stack/Stack.tsx
|
|
5761
5864
|
var import_react12 = require("react");
|
|
5762
|
-
var
|
|
5763
|
-
var
|
|
5865
|
+
var import_styled_components27 = __toESM(require("styled-components"));
|
|
5866
|
+
var import_jsx_runtime169 = require("react/jsx-runtime");
|
|
5764
5867
|
var DEFAULT_ELEMENT2 = "div";
|
|
5765
|
-
var StyledStack =
|
|
5868
|
+
var StyledStack = import_styled_components27.default.div`
|
|
5766
5869
|
display: flex;
|
|
5767
5870
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
5768
|
-
gap: ${({ gap }) => `var(--${gap})`};
|
|
5871
|
+
gap: ${({ $gap }) => `var(--${$gap})`};
|
|
5769
5872
|
|
|
5770
5873
|
> * {
|
|
5771
5874
|
flex: 1;
|
|
@@ -5775,13 +5878,13 @@ var StackComponent = (0, import_react12.forwardRef)(
|
|
|
5775
5878
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
5776
5879
|
const responsiveGap = useResponsiveProp(gap);
|
|
5777
5880
|
const responsiveDirection = useResponsiveProp(direction);
|
|
5778
|
-
return /* @__PURE__ */ (0,
|
|
5881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
5779
5882
|
StyledStack,
|
|
5780
5883
|
{
|
|
5781
5884
|
ref,
|
|
5782
5885
|
$direction: responsiveDirection,
|
|
5886
|
+
$gap: responsiveGap,
|
|
5783
5887
|
as: renderAs ?? DEFAULT_ELEMENT2,
|
|
5784
|
-
gap: responsiveGap,
|
|
5785
5888
|
...props
|
|
5786
5889
|
}
|
|
5787
5890
|
);
|
|
@@ -5792,89 +5895,89 @@ var Stack = makePolymorphic(StackComponent);
|
|
|
5792
5895
|
|
|
5793
5896
|
// src/components/Text/Text.tsx
|
|
5794
5897
|
var import_react13 = require("react");
|
|
5795
|
-
var
|
|
5796
|
-
var
|
|
5797
|
-
var bodyBoldStyles =
|
|
5898
|
+
var import_styled_components28 = __toESM(require("styled-components"));
|
|
5899
|
+
var import_jsx_runtime170 = require("react/jsx-runtime");
|
|
5900
|
+
var bodyBoldStyles = import_styled_components28.css`
|
|
5798
5901
|
> strong,
|
|
5799
5902
|
b {
|
|
5800
5903
|
font-weight: var(--typography-weight-body-bold);
|
|
5801
5904
|
}
|
|
5802
5905
|
`;
|
|
5803
|
-
var labelBoldStyles =
|
|
5906
|
+
var labelBoldStyles = import_styled_components28.css`
|
|
5804
5907
|
> strong,
|
|
5805
5908
|
b {
|
|
5806
5909
|
font-weight: var(--typography-weight-label-bold);
|
|
5807
5910
|
}
|
|
5808
5911
|
`;
|
|
5809
|
-
var body1TextStyle =
|
|
5912
|
+
var body1TextStyle = import_styled_components28.css`
|
|
5810
5913
|
--font-family: var(--typography-body-1-family);
|
|
5811
5914
|
--font-size: var(--typography-body-1-size);
|
|
5812
5915
|
--font-weight: var(--typography-body-1-weight);
|
|
5813
5916
|
--line-height: var(--typography-body-1-line-height);
|
|
5814
5917
|
${bodyBoldStyles}
|
|
5815
5918
|
`;
|
|
5816
|
-
var body2TextStyle =
|
|
5919
|
+
var body2TextStyle = import_styled_components28.css`
|
|
5817
5920
|
--font-family: var(--typography-body-2-family);
|
|
5818
5921
|
--font-size: var(--typography-body-2-size);
|
|
5819
5922
|
--font-weight: var(--typography-body-2-weight);
|
|
5820
5923
|
--line-height: var(--typography-body-2-line-height);
|
|
5821
5924
|
${bodyBoldStyles}
|
|
5822
5925
|
`;
|
|
5823
|
-
var body3TextStyle =
|
|
5926
|
+
var body3TextStyle = import_styled_components28.css`
|
|
5824
5927
|
--font-family: var(--typography-body-3-family);
|
|
5825
5928
|
--font-size: var(--typography-body-3-size);
|
|
5826
5929
|
--font-weight: var(--typography-body-3-weight);
|
|
5827
5930
|
--line-height: var(--typography-body-3-line-height);
|
|
5828
5931
|
${bodyBoldStyles}
|
|
5829
5932
|
`;
|
|
5830
|
-
var body4TextStyle =
|
|
5933
|
+
var body4TextStyle = import_styled_components28.css`
|
|
5831
5934
|
--font-family: var(--typography-body-4-family);
|
|
5832
5935
|
--font-size: var(--typography-body-4-size);
|
|
5833
5936
|
--font-weight: var(--typography-body-4-weight);
|
|
5834
5937
|
--line-height: var(--typography-body-4-line-height);
|
|
5835
5938
|
${bodyBoldStyles}
|
|
5836
5939
|
`;
|
|
5837
|
-
var label1TextStyle =
|
|
5940
|
+
var label1TextStyle = import_styled_components28.css`
|
|
5838
5941
|
--font-family: var(--typography-label-1-family);
|
|
5839
5942
|
--font-size: var(--typography-label-1-size);
|
|
5840
5943
|
--font-weight: var(--typography-label-1-weight);
|
|
5841
5944
|
--line-height: var(--typography-label-1-line-height);
|
|
5842
5945
|
${labelBoldStyles}
|
|
5843
5946
|
`;
|
|
5844
|
-
var label2TextStyle =
|
|
5947
|
+
var label2TextStyle = import_styled_components28.css`
|
|
5845
5948
|
--font-family: var(--typography-label-2-family);
|
|
5846
5949
|
--font-size: var(--typography-label-2-size);
|
|
5847
5950
|
--font-weight: var(--typography-label-2-weight);
|
|
5848
5951
|
--line-height: var(--typography-label-2-line-height);
|
|
5849
5952
|
${labelBoldStyles}
|
|
5850
5953
|
`;
|
|
5851
|
-
var label3TextStyle =
|
|
5954
|
+
var label3TextStyle = import_styled_components28.css`
|
|
5852
5955
|
--font-family: var(--typography-label-3-family);
|
|
5853
5956
|
--font-size: var(--typography-label-3-size);
|
|
5854
5957
|
--font-weight: var(--typography-label-3-weight);
|
|
5855
5958
|
--line-height: var(--typography-label-3-line-height);
|
|
5856
5959
|
${labelBoldStyles}
|
|
5857
5960
|
`;
|
|
5858
|
-
var label4TextStyle =
|
|
5961
|
+
var label4TextStyle = import_styled_components28.css`
|
|
5859
5962
|
--font-family: var(--typography-label-4-family);
|
|
5860
5963
|
--font-size: var(--typography-label-4-size);
|
|
5861
5964
|
--font-weight: var(--typography-label-4-weight);
|
|
5862
5965
|
--line-height: var(--typography-label-4-line-height);
|
|
5863
5966
|
${labelBoldStyles}
|
|
5864
5967
|
`;
|
|
5865
|
-
var body1MonoTextStyle =
|
|
5968
|
+
var body1MonoTextStyle = import_styled_components28.css`
|
|
5866
5969
|
${body1TextStyle};
|
|
5867
5970
|
--font-family: var(--typography-family-mono);
|
|
5868
5971
|
`;
|
|
5869
|
-
var body2MonoTextStyle =
|
|
5972
|
+
var body2MonoTextStyle = import_styled_components28.css`
|
|
5870
5973
|
${body2TextStyle};
|
|
5871
5974
|
--font-family: var(--typography-family-mono);
|
|
5872
5975
|
`;
|
|
5873
|
-
var body3MonoTextStyle =
|
|
5976
|
+
var body3MonoTextStyle = import_styled_components28.css`
|
|
5874
5977
|
${body3TextStyle};
|
|
5875
5978
|
--font-family: var(--typography-family-mono);
|
|
5876
5979
|
`;
|
|
5877
|
-
var body4MonoTextStyle =
|
|
5980
|
+
var body4MonoTextStyle = import_styled_components28.css`
|
|
5878
5981
|
${body4TextStyle};
|
|
5879
5982
|
--font-family: var(--typography-family-mono);
|
|
5880
5983
|
`;
|
|
@@ -5892,13 +5995,13 @@ var variantStyleMap2 = {
|
|
|
5892
5995
|
label3: label3TextStyle,
|
|
5893
5996
|
label4: label4TextStyle
|
|
5894
5997
|
};
|
|
5895
|
-
var highContrastProminenceStyle =
|
|
5998
|
+
var highContrastProminenceStyle = import_styled_components28.css`
|
|
5896
5999
|
--text-color: var(--color-text-high-contrast);
|
|
5897
6000
|
`;
|
|
5898
|
-
var vibrantProminenceStyle =
|
|
6001
|
+
var vibrantProminenceStyle = import_styled_components28.css`
|
|
5899
6002
|
--text-color: var(--color-text);
|
|
5900
6003
|
`;
|
|
5901
|
-
var secondaryProminenceStyle =
|
|
6004
|
+
var secondaryProminenceStyle = import_styled_components28.css`
|
|
5902
6005
|
--text-color: var(--color-text-secondary);
|
|
5903
6006
|
`;
|
|
5904
6007
|
var prominenceMap = {
|
|
@@ -5906,8 +6009,8 @@ var prominenceMap = {
|
|
|
5906
6009
|
vibrant: vibrantProminenceStyle,
|
|
5907
6010
|
secondary: secondaryProminenceStyle
|
|
5908
6011
|
};
|
|
5909
|
-
var StyledText =
|
|
5910
|
-
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
6012
|
+
var StyledText = import_styled_components28.default.div`
|
|
6013
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
5911
6014
|
font-family: var(--font-family);
|
|
5912
6015
|
font-size: var(--font-size);
|
|
5913
6016
|
font-weight: var(--font-weight);
|
|
@@ -5915,22 +6018,22 @@ var StyledText = import_styled_components26.default.div`
|
|
|
5915
6018
|
color: var(--text-color);
|
|
5916
6019
|
font-style: normal;
|
|
5917
6020
|
margin: 0;
|
|
5918
|
-
${({ variant }) => variantStyleMap2[variant]}
|
|
5919
|
-
${({ prominence }) => prominenceMap[prominence]}
|
|
5920
|
-
${({ ellipsis }) => ellipsis && ellipsisStyle};
|
|
5921
|
-
${({ inline }) => inline &&
|
|
6021
|
+
${({ $variant }) => variantStyleMap2[$variant]}
|
|
6022
|
+
${({ $prominence }) => prominenceMap[$prominence]}
|
|
6023
|
+
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
6024
|
+
${({ $inline }) => $inline && import_styled_components28.css`
|
|
5922
6025
|
display: inline-block;
|
|
5923
6026
|
`}
|
|
5924
|
-
${({ disabled }) => disabled &&
|
|
6027
|
+
${({ $disabled }) => $disabled && import_styled_components28.css`
|
|
5925
6028
|
--text-color: var(--color-text-disabled);
|
|
5926
6029
|
`}
|
|
5927
|
-
${({ preventUserSelect }) => preventUserSelect &&
|
|
6030
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components28.css`
|
|
5928
6031
|
user-select: none;
|
|
5929
6032
|
`}
|
|
5930
|
-
${({ align }) =>
|
|
6033
|
+
${({ align }) => import_styled_components28.css`
|
|
5931
6034
|
text-align: ${align};
|
|
5932
6035
|
`}
|
|
5933
|
-
${({ as }) => as === "p" &&
|
|
6036
|
+
${({ as }) => as === "p" && import_styled_components28.css`
|
|
5934
6037
|
display: block;
|
|
5935
6038
|
`}
|
|
5936
6039
|
`;
|
|
@@ -5948,19 +6051,19 @@ var TextComponent = (0, import_react13.forwardRef)(
|
|
|
5948
6051
|
renderAs,
|
|
5949
6052
|
...otherProps
|
|
5950
6053
|
}, ref) => {
|
|
5951
|
-
return /* @__PURE__ */ (0,
|
|
6054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
|
|
5952
6055
|
StyledText,
|
|
5953
6056
|
{
|
|
5954
6057
|
ref,
|
|
6058
|
+
$colorScheme: colorScheme,
|
|
6059
|
+
$disabled: disabled,
|
|
6060
|
+
$ellipsis: ellipsis,
|
|
6061
|
+
$inline: inline,
|
|
6062
|
+
$preventUserSelect: preventUserSelect,
|
|
6063
|
+
$prominence: prominence,
|
|
6064
|
+
$variant: variant,
|
|
5955
6065
|
align,
|
|
5956
6066
|
as: renderAs ?? DEFAULT_ELEMENT3,
|
|
5957
|
-
colorScheme,
|
|
5958
|
-
disabled,
|
|
5959
|
-
ellipsis,
|
|
5960
|
-
inline,
|
|
5961
|
-
preventUserSelect,
|
|
5962
|
-
prominence,
|
|
5963
|
-
variant,
|
|
5964
6067
|
...otherProps
|
|
5965
6068
|
}
|
|
5966
6069
|
);
|
|
@@ -5970,20 +6073,20 @@ TextComponent.displayName = "Text";
|
|
|
5970
6073
|
var Text = makePolymorphic(TextComponent);
|
|
5971
6074
|
|
|
5972
6075
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
5973
|
-
var
|
|
6076
|
+
var import_styled_components29 = __toESM(require("styled-components"));
|
|
5974
6077
|
var import_type_guards14 = require("@wistia/type-guards");
|
|
5975
|
-
var
|
|
6078
|
+
var import_jsx_runtime171 = require("react/jsx-runtime");
|
|
5976
6079
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
5977
6080
|
if (iconOnly) {
|
|
5978
|
-
return /* @__PURE__ */ (0,
|
|
6081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("g", { fill: brandmarkColor, children: /* @__PURE__ */ (0, import_jsx_runtime171.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" }) });
|
|
5979
6082
|
}
|
|
5980
|
-
return /* @__PURE__ */ (0,
|
|
6083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("g", { fill: brandmarkColor, children: /* @__PURE__ */ (0, import_jsx_runtime171.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" }) });
|
|
5981
6084
|
};
|
|
5982
6085
|
var renderLogotype = (logotypeColor, iconOnly) => {
|
|
5983
6086
|
if (iconOnly) {
|
|
5984
6087
|
return null;
|
|
5985
6088
|
}
|
|
5986
|
-
return /* @__PURE__ */ (0,
|
|
6089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("g", { fill: logotypeColor, children: /* @__PURE__ */ (0, import_jsx_runtime171.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" }) });
|
|
5987
6090
|
};
|
|
5988
6091
|
var computedViewBox = (iconOnly) => {
|
|
5989
6092
|
if (iconOnly) {
|
|
@@ -5991,7 +6094,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
5991
6094
|
}
|
|
5992
6095
|
return "0 0 144 31.47";
|
|
5993
6096
|
};
|
|
5994
|
-
var WistiaLogoComponent =
|
|
6097
|
+
var WistiaLogoComponent = import_styled_components29.default.svg`
|
|
5995
6098
|
height: ${({ height }) => `${height}px`};
|
|
5996
6099
|
|
|
5997
6100
|
/* ensure it will always fit on mobile */
|
|
@@ -6000,7 +6103,7 @@ var WistiaLogoComponent = import_styled_components27.default.svg`
|
|
|
6000
6103
|
|
|
6001
6104
|
&:hover {
|
|
6002
6105
|
path {
|
|
6003
|
-
${({ hoverColor }) => hoverColor !== void 0 ? `fill: ${hoverColor}` : null};
|
|
6106
|
+
${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
|
|
6004
6107
|
}
|
|
6005
6108
|
}
|
|
6006
6109
|
`;
|
|
@@ -6033,46 +6136,26 @@ var WistiaLogo = ({
|
|
|
6033
6136
|
};
|
|
6034
6137
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
6035
6138
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
6036
|
-
const Logo = /* @__PURE__ */ (0,
|
|
6139
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(
|
|
6037
6140
|
WistiaLogoComponent,
|
|
6038
6141
|
{
|
|
6142
|
+
$hoverColor: hoverColor,
|
|
6039
6143
|
height,
|
|
6040
|
-
hoverColor,
|
|
6041
6144
|
role: "img",
|
|
6042
6145
|
viewBox: computedViewBox(iconOnly),
|
|
6043
6146
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6044
6147
|
...otherProps,
|
|
6045
6148
|
children: [
|
|
6046
|
-
/* @__PURE__ */ (0,
|
|
6047
|
-
(0, import_type_guards14.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
6149
|
+
/* @__PURE__ */ (0, import_jsx_runtime171.jsx)("title", { children: title }),
|
|
6150
|
+
(0, import_type_guards14.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("desc", { children: description }) : null,
|
|
6048
6151
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
6049
6152
|
renderLogotype(logotypeColor, iconOnly)
|
|
6050
6153
|
]
|
|
6051
6154
|
}
|
|
6052
6155
|
);
|
|
6053
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
6156
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("a", { href, children: Logo }) : Logo;
|
|
6054
6157
|
};
|
|
6055
6158
|
WistiaLogo.displayName = "WistiaLogo";
|
|
6056
|
-
|
|
6057
|
-
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
6058
|
-
var import_styled_components28 = __toESM(require("styled-components"));
|
|
6059
|
-
var import_jsx_runtime170 = require("react/jsx-runtime");
|
|
6060
|
-
var StyledColorSchemeWrapper = import_styled_components28.default.div`
|
|
6061
|
-
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
6062
|
-
`;
|
|
6063
|
-
var ColorSchemeWrapper = ({
|
|
6064
|
-
colorScheme,
|
|
6065
|
-
children,
|
|
6066
|
-
...otherProps
|
|
6067
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
|
|
6068
|
-
StyledColorSchemeWrapper,
|
|
6069
|
-
{
|
|
6070
|
-
colorScheme,
|
|
6071
|
-
...otherProps,
|
|
6072
|
-
children
|
|
6073
|
-
}
|
|
6074
|
-
);
|
|
6075
|
-
ColorSchemeWrapper.displayName = "ColorSchemeWrapper";
|
|
6076
6159
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6077
6160
|
0 && (module.exports = {
|
|
6078
6161
|
Badge,
|
|
@@ -6085,6 +6168,7 @@ ColorSchemeWrapper.displayName = "ColorSchemeWrapper";
|
|
|
6085
6168
|
Heading,
|
|
6086
6169
|
Icon,
|
|
6087
6170
|
IconButton,
|
|
6171
|
+
Label,
|
|
6088
6172
|
Link,
|
|
6089
6173
|
ScreenReaderOnly,
|
|
6090
6174
|
Stack,
|
|
@@ -6092,6 +6176,7 @@ ColorSchemeWrapper.displayName = "ColorSchemeWrapper";
|
|
|
6092
6176
|
Tooltip,
|
|
6093
6177
|
UIProvider,
|
|
6094
6178
|
WistiaLogo,
|
|
6179
|
+
colorSchemeOptions,
|
|
6095
6180
|
copyToClipboard,
|
|
6096
6181
|
ellipsisFlexParentStyle,
|
|
6097
6182
|
ellipsisStyle,
|