@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.mjs
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
|
*
|
|
@@ -1516,22 +1516,22 @@ var getFillViewportStyle = (fillViewport) => {
|
|
|
1516
1516
|
return void 0;
|
|
1517
1517
|
};
|
|
1518
1518
|
var BoxComponent = styled2.div`
|
|
1519
|
-
align-content: ${({ alignContent }) => alignContent};
|
|
1520
|
-
align-items: ${({ alignItems }) => alignItems};
|
|
1521
|
-
align-self: ${({ alignSelf }) => alignSelf ?? null};
|
|
1522
|
-
display: ${({ inline }) => isNotNil2(inline) && inline ? "inline-flex" : "flex"};
|
|
1523
|
-
flex-basis: ${({ basis }) => isNotNil2(basis) ? basis : null};
|
|
1524
|
-
flex-direction: ${({ flexDirection }) => flexDirection};
|
|
1525
|
-
${({ fillBox: fill }) => getFillStyle(fill)};
|
|
1526
|
-
${({ fillViewport }) => getFillViewportStyle(fillViewport)};
|
|
1519
|
+
align-content: ${({ $alignContent }) => $alignContent};
|
|
1520
|
+
align-items: ${({ $alignItems }) => $alignItems};
|
|
1521
|
+
align-self: ${({ $alignSelf }) => $alignSelf ?? null};
|
|
1522
|
+
display: ${({ $inline }) => isNotNil2($inline) && $inline ? "inline-flex" : "flex"};
|
|
1523
|
+
flex-basis: ${({ $basis }) => isNotNil2($basis) ? $basis : null};
|
|
1524
|
+
flex-direction: ${({ $flexDirection }) => $flexDirection};
|
|
1525
|
+
${({ $fillBox: fill }) => getFillStyle(fill)};
|
|
1526
|
+
${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
|
|
1527
1527
|
|
|
1528
1528
|
/* Box children styles */
|
|
1529
|
-
flex-grow: ${({ grow }) => isNotNil2(grow) ? grow : null};
|
|
1530
|
-
flex-shrink: ${({ shrink }) => isNotNil2(shrink) ? shrink : null};
|
|
1531
|
-
flex-wrap: ${({ wrapItems }) => wrapItems ? "wrap" : "nowrap"};
|
|
1532
|
-
${({ gap }) => getGapStyle(gap)};
|
|
1533
|
-
justify-content: ${({ justifyContent }) => justifyContent};
|
|
1534
|
-
order: ${({ order }) => isNotNil2(order) ? order : null};
|
|
1529
|
+
flex-grow: ${({ $grow }) => isNotNil2($grow) ? $grow : null};
|
|
1530
|
+
flex-shrink: ${({ $shrink }) => isNotNil2($shrink) ? $shrink : null};
|
|
1531
|
+
flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
|
|
1532
|
+
${({ $gap }) => getGapStyle($gap)};
|
|
1533
|
+
justify-content: ${({ $justifyContent }) => $justifyContent};
|
|
1534
|
+
order: ${({ $order }) => isNotNil2($order) ? $order : null};
|
|
1535
1535
|
`;
|
|
1536
1536
|
var wrapChildren = (children) => {
|
|
1537
1537
|
if (isNotNil2(children)) {
|
|
@@ -1557,6 +1557,7 @@ var Box = ({
|
|
|
1557
1557
|
hasBoxParent = false,
|
|
1558
1558
|
fill = false,
|
|
1559
1559
|
fillViewport = false,
|
|
1560
|
+
gap,
|
|
1560
1561
|
inline = false,
|
|
1561
1562
|
justifyContent = "flex-start",
|
|
1562
1563
|
wrapItems = false,
|
|
@@ -1572,15 +1573,16 @@ var Box = ({
|
|
|
1572
1573
|
return /* @__PURE__ */ jsx4(
|
|
1573
1574
|
BoxComponent,
|
|
1574
1575
|
{
|
|
1575
|
-
alignContent,
|
|
1576
|
-
alignItems,
|
|
1576
|
+
$alignContent: alignContent,
|
|
1577
|
+
$alignItems: alignItems,
|
|
1578
|
+
$fillBox: fill,
|
|
1579
|
+
$fillViewport: fillViewport,
|
|
1580
|
+
$flexDirection: direction,
|
|
1581
|
+
$gap: gap,
|
|
1582
|
+
$inline: inline,
|
|
1583
|
+
$justifyContent: justifyContent,
|
|
1584
|
+
$wrapItems: wrapItems,
|
|
1577
1585
|
as: "div",
|
|
1578
|
-
fillBox: fill,
|
|
1579
|
-
fillViewport,
|
|
1580
|
-
flexDirection: direction,
|
|
1581
|
-
inline,
|
|
1582
|
-
justifyContent,
|
|
1583
|
-
wrapItems,
|
|
1584
1586
|
...otherProps,
|
|
1585
1587
|
children: wrapChildren(children)
|
|
1586
1588
|
}
|
|
@@ -1590,8 +1592,8 @@ Box.displayName = "Box";
|
|
|
1590
1592
|
|
|
1591
1593
|
// src/components/Button/Button.tsx
|
|
1592
1594
|
import { forwardRef as forwardRef3 } from "react";
|
|
1593
|
-
import { isNotNil as isNotNil4, isNotUndefined as isNotUndefined3 } from "@wistia/type-guards";
|
|
1594
1595
|
import styled5 from "styled-components";
|
|
1596
|
+
import { isNotNil as isNotNil4, isNotUndefined as isNotUndefined3 } from "@wistia/type-guards";
|
|
1595
1597
|
|
|
1596
1598
|
// src/css/buttonResetCss.tsx
|
|
1597
1599
|
import { css as css10 } from "styled-components";
|
|
@@ -1674,7 +1676,7 @@ var buttonLargeStyles = css11`
|
|
|
1674
1676
|
--button-icon-size: 24px;
|
|
1675
1677
|
--button-label-gap: 8px;
|
|
1676
1678
|
`;
|
|
1677
|
-
var
|
|
1679
|
+
var buttonExtraLargeStyles = css11`
|
|
1678
1680
|
--button-padding-vertical: var(--space-03);
|
|
1679
1681
|
--button-padding-horizontal: var(--space-03);
|
|
1680
1682
|
--button-label-padding-horizontal: var(--space-02);
|
|
@@ -1789,10 +1791,10 @@ var buttonVariantsStyles = {
|
|
|
1789
1791
|
solid: solidButtonVariant
|
|
1790
1792
|
};
|
|
1791
1793
|
var buttonSizeStyles = {
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1794
|
+
sm: buttonSmallStyles,
|
|
1795
|
+
md: buttonMediumStyles,
|
|
1796
|
+
lg: buttonLargeStyles,
|
|
1797
|
+
xl: buttonExtraLargeStyles
|
|
1796
1798
|
};
|
|
1797
1799
|
|
|
1798
1800
|
// src/components/Icon/Icon.tsx
|
|
@@ -4336,22 +4338,35 @@ var SparkleIcon = (props) => /* @__PURE__ */ jsx134(
|
|
|
4336
4338
|
);
|
|
4337
4339
|
|
|
4338
4340
|
// src/components/Icon/icons/SpinnerIcon.tsx
|
|
4339
|
-
import { jsx as jsx135 } from "react/jsx-runtime";
|
|
4340
|
-
var SpinnerIcon = (props) => /* @__PURE__ */
|
|
4341
|
+
import { jsx as jsx135, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
4342
|
+
var SpinnerIcon = (props) => /* @__PURE__ */ jsxs4(
|
|
4341
4343
|
"svg",
|
|
4342
4344
|
{
|
|
4343
4345
|
...props,
|
|
4344
4346
|
viewBox: "0 0 24 24",
|
|
4345
4347
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4346
|
-
children:
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4348
|
+
children: [
|
|
4349
|
+
/* @__PURE__ */ jsx135(
|
|
4350
|
+
"path",
|
|
4351
|
+
{
|
|
4352
|
+
clipRule: "evenodd",
|
|
4353
|
+
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",
|
|
4354
|
+
fill: "currentColor",
|
|
4355
|
+
fillRule: "evenodd"
|
|
4356
|
+
}
|
|
4357
|
+
),
|
|
4358
|
+
/* @__PURE__ */ jsx135(
|
|
4359
|
+
"animateTransform",
|
|
4360
|
+
{
|
|
4361
|
+
attributeName: "transform",
|
|
4362
|
+
dur: "1.5s",
|
|
4363
|
+
keyTimes: "0;1",
|
|
4364
|
+
repeatCount: "indefinite",
|
|
4365
|
+
type: "rotate",
|
|
4366
|
+
values: "0 0 0;360 0 0"
|
|
4367
|
+
}
|
|
4368
|
+
)
|
|
4369
|
+
]
|
|
4355
4370
|
}
|
|
4356
4371
|
);
|
|
4357
4372
|
|
|
@@ -5112,15 +5127,15 @@ var Link = forwardRef2(
|
|
|
5112
5127
|
Link.displayName = "Link";
|
|
5113
5128
|
|
|
5114
5129
|
// src/components/Button/Button.tsx
|
|
5115
|
-
import { Fragment, jsx as jsx159, jsxs as
|
|
5130
|
+
import { Fragment, jsx as jsx159, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
5116
5131
|
var isLink2 = (props) => isNotUndefined3(props.href);
|
|
5117
5132
|
var StyledButton = styled5.button`
|
|
5118
5133
|
${buttonResetCss}
|
|
5119
|
-
${({ colorScheme }) => getColorScheme(colorScheme)}
|
|
5120
|
-
${({ size }) => buttonSizeStyles[size]}
|
|
5121
|
-
${({ variant }) => buttonVariantsStyles[variant]}
|
|
5122
|
-
${({ unstyled }) =>
|
|
5123
|
-
${({ fullWidth }) => fullWidth && "width: 100%;"}
|
|
5134
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
5135
|
+
${({ $size }) => buttonSizeStyles[$size]}
|
|
5136
|
+
${({ $variant }) => buttonVariantsStyles[$variant]}
|
|
5137
|
+
${({ $unstyled }) => !$unstyled && buttonBaseStyles}
|
|
5138
|
+
${({ $fullWidth }) => $fullWidth && "width: 100%;"}
|
|
5124
5139
|
position: relative;
|
|
5125
5140
|
`;
|
|
5126
5141
|
var StyledButtonContent = styled5.div`
|
|
@@ -5149,9 +5164,9 @@ var ButtonContent = ({
|
|
|
5149
5164
|
rightIcon,
|
|
5150
5165
|
children
|
|
5151
5166
|
}) => {
|
|
5152
|
-
return /* @__PURE__ */
|
|
5167
|
+
return /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
5153
5168
|
isLoading ? /* @__PURE__ */ jsx159(StyledButtonLoading, { children: /* @__PURE__ */ jsx159(Icon, { type: "spinner" }) }) : null,
|
|
5154
|
-
/* @__PURE__ */
|
|
5169
|
+
/* @__PURE__ */ jsxs5(
|
|
5155
5170
|
StyledButtonContent,
|
|
5156
5171
|
{
|
|
5157
5172
|
$hasLeftIcon: isNotNil4(leftIcon),
|
|
@@ -5179,7 +5194,7 @@ var Button = forwardRef3(
|
|
|
5179
5194
|
unstyled = false,
|
|
5180
5195
|
onClick,
|
|
5181
5196
|
fullWidth = false,
|
|
5182
|
-
size = "
|
|
5197
|
+
size = "md",
|
|
5183
5198
|
variant = "solid",
|
|
5184
5199
|
...props
|
|
5185
5200
|
}, ref) => {
|
|
@@ -5188,14 +5203,14 @@ var Button = forwardRef3(
|
|
|
5188
5203
|
const isAriaDisabled = () => isLoading || disabled;
|
|
5189
5204
|
const commonProps = {
|
|
5190
5205
|
"aria-disabled": isAriaDisabled() || void 0,
|
|
5191
|
-
colorScheme,
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
unstyled,
|
|
5206
|
+
$colorScheme: colorScheme,
|
|
5207
|
+
$fullWidth: responsiveFullWidth,
|
|
5208
|
+
$size: responsiveSize,
|
|
5209
|
+
$unstyled: unstyled,
|
|
5210
|
+
$variant: variant,
|
|
5195
5211
|
className,
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
fullWidth: responsiveFullWidth
|
|
5212
|
+
forceState,
|
|
5213
|
+
isLoading
|
|
5199
5214
|
};
|
|
5200
5215
|
if (forceState) {
|
|
5201
5216
|
commonProps.className = `${className ?? ""} force-state-${forceState}`;
|
|
@@ -5272,11 +5287,11 @@ var ButtonGroupComponent = styled6.div`
|
|
|
5272
5287
|
display: flex;
|
|
5273
5288
|
|
|
5274
5289
|
/* this helps ensure that primary buttons appear at the top of the column */
|
|
5275
|
-
flex-direction: ${({ align }) => align === "right" ? "column-reverse" : "column"};
|
|
5290
|
+
flex-direction: ${({ $align }) => $align === "right" ? "column-reverse" : "column"};
|
|
5276
5291
|
gap: var(--space-04);
|
|
5277
5292
|
align-items: center;
|
|
5278
|
-
justify-content: ${({ align }) => getAlignment(align)};
|
|
5279
|
-
width: ${({ fullWidth }) => fullWidth ? "100%" : "auto"};
|
|
5293
|
+
justify-content: ${({ $align }) => getAlignment($align)};
|
|
5294
|
+
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
5280
5295
|
|
|
5281
5296
|
${mq.smAndUp} {
|
|
5282
5297
|
flex-direction: row;
|
|
@@ -5300,8 +5315,8 @@ var ButtonGroup = ({
|
|
|
5300
5315
|
return /* @__PURE__ */ jsx160(
|
|
5301
5316
|
ButtonGroupComponent,
|
|
5302
5317
|
{
|
|
5303
|
-
align,
|
|
5304
|
-
fullWidth,
|
|
5318
|
+
$align: align,
|
|
5319
|
+
$fullWidth: fullWidth,
|
|
5305
5320
|
...otherProps,
|
|
5306
5321
|
children
|
|
5307
5322
|
}
|
|
@@ -5309,21 +5324,55 @@ var ButtonGroup = ({
|
|
|
5309
5324
|
};
|
|
5310
5325
|
ButtonGroup.displayName = "ButtonGroup";
|
|
5311
5326
|
|
|
5312
|
-
// src/components/
|
|
5327
|
+
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
5313
5328
|
import styled7 from "styled-components";
|
|
5314
5329
|
import { jsx as jsx161 } from "react/jsx-runtime";
|
|
5330
|
+
var colorSchemeOptions = [
|
|
5331
|
+
"inherit",
|
|
5332
|
+
"default",
|
|
5333
|
+
"info",
|
|
5334
|
+
"success",
|
|
5335
|
+
"warning",
|
|
5336
|
+
"error",
|
|
5337
|
+
"blue",
|
|
5338
|
+
"green",
|
|
5339
|
+
"orange",
|
|
5340
|
+
"pink",
|
|
5341
|
+
"purple",
|
|
5342
|
+
"yellow"
|
|
5343
|
+
];
|
|
5344
|
+
var StyledColorSchemeWrapper = styled7.div`
|
|
5345
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
5346
|
+
`;
|
|
5347
|
+
var ColorSchemeWrapper = ({
|
|
5348
|
+
colorScheme,
|
|
5349
|
+
children,
|
|
5350
|
+
...otherProps
|
|
5351
|
+
}) => /* @__PURE__ */ jsx161(
|
|
5352
|
+
StyledColorSchemeWrapper,
|
|
5353
|
+
{
|
|
5354
|
+
$colorScheme: colorScheme,
|
|
5355
|
+
...otherProps,
|
|
5356
|
+
children
|
|
5357
|
+
}
|
|
5358
|
+
);
|
|
5359
|
+
ColorSchemeWrapper.displayName = "ColorSchemeWrapper";
|
|
5360
|
+
|
|
5361
|
+
// src/components/Divider/Divider.tsx
|
|
5362
|
+
import styled8 from "styled-components";
|
|
5363
|
+
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
5315
5364
|
var sizeToPixelMap = {
|
|
5316
5365
|
lg: 4,
|
|
5317
5366
|
sm: 1
|
|
5318
5367
|
};
|
|
5319
|
-
var DividerComponent =
|
|
5368
|
+
var DividerComponent = styled8.hr`
|
|
5320
5369
|
background: none;
|
|
5321
5370
|
border-bottom: none;
|
|
5322
5371
|
border-left: none;
|
|
5323
5372
|
border-right: none;
|
|
5324
5373
|
border-top-color: var(--color-border);
|
|
5325
5374
|
border-top-style: solid;
|
|
5326
|
-
border-top-width: ${({ borderHeight }) => `${borderHeight}px`};
|
|
5375
|
+
border-top-width: ${({ $borderHeight }) => `${$borderHeight}px`};
|
|
5327
5376
|
clear: both;
|
|
5328
5377
|
height: 0;
|
|
5329
5378
|
line-height: 0;
|
|
@@ -5331,10 +5380,10 @@ var DividerComponent = styled7.hr`
|
|
|
5331
5380
|
`;
|
|
5332
5381
|
var Divider = ({ size = "sm", ...otherProps }) => {
|
|
5333
5382
|
const responsiveSize = useResponsiveProp(size);
|
|
5334
|
-
return /* @__PURE__ */
|
|
5383
|
+
return /* @__PURE__ */ jsx162(
|
|
5335
5384
|
DividerComponent,
|
|
5336
5385
|
{
|
|
5337
|
-
borderHeight: sizeToPixelMap[responsiveSize],
|
|
5386
|
+
$borderHeight: sizeToPixelMap[responsiveSize],
|
|
5338
5387
|
...otherProps
|
|
5339
5388
|
}
|
|
5340
5389
|
);
|
|
@@ -5343,8 +5392,8 @@ Divider.displayName = "Divider";
|
|
|
5343
5392
|
|
|
5344
5393
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
5345
5394
|
import { isNotNil as isNotNil5 } from "@wistia/type-guards";
|
|
5346
|
-
import
|
|
5347
|
-
import { jsx as
|
|
5395
|
+
import styled9, { css as css12 } from "styled-components";
|
|
5396
|
+
import { jsx as jsx163 } from "react/jsx-runtime";
|
|
5348
5397
|
var ellipsisStyle = css12`
|
|
5349
5398
|
overflow: hidden;
|
|
5350
5399
|
text-overflow: ellipsis;
|
|
@@ -5371,13 +5420,13 @@ var ellipsisStyle = css12`
|
|
|
5371
5420
|
var ellipsisFlexParentStyle = css12`
|
|
5372
5421
|
min-width: 0;
|
|
5373
5422
|
`;
|
|
5374
|
-
var EllipsisComponent =
|
|
5423
|
+
var EllipsisComponent = styled9.div`
|
|
5375
5424
|
${ellipsisStyle};
|
|
5376
|
-
${({ lines }) => {
|
|
5377
|
-
if (isNotNil5(lines)) {
|
|
5425
|
+
${({ $lines }) => {
|
|
5426
|
+
if (isNotNil5($lines)) {
|
|
5378
5427
|
return css12`
|
|
5379
5428
|
-webkit-box-orient: vertical;
|
|
5380
|
-
-webkit-line-clamp: ${lines};
|
|
5429
|
+
-webkit-line-clamp: ${$lines};
|
|
5381
5430
|
display: -webkit-box;
|
|
5382
5431
|
white-space: initial;
|
|
5383
5432
|
`;
|
|
@@ -5385,10 +5434,10 @@ var EllipsisComponent = styled8.div`
|
|
|
5385
5434
|
return void 0;
|
|
5386
5435
|
}}
|
|
5387
5436
|
`;
|
|
5388
|
-
var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */
|
|
5437
|
+
var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ jsx163(
|
|
5389
5438
|
EllipsisComponent,
|
|
5390
5439
|
{
|
|
5391
|
-
lines,
|
|
5440
|
+
$lines: lines,
|
|
5392
5441
|
...otherProps,
|
|
5393
5442
|
children
|
|
5394
5443
|
}
|
|
@@ -5397,7 +5446,7 @@ Ellipsis.displayName = "Ellipsis";
|
|
|
5397
5446
|
|
|
5398
5447
|
// src/components/Heading/Heading.tsx
|
|
5399
5448
|
import { forwardRef as forwardRef4 } from "react";
|
|
5400
|
-
import
|
|
5449
|
+
import styled10, { css as css13 } from "styled-components";
|
|
5401
5450
|
|
|
5402
5451
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
5403
5452
|
var makePolymorphic = (component) => {
|
|
@@ -5405,7 +5454,7 @@ var makePolymorphic = (component) => {
|
|
|
5405
5454
|
};
|
|
5406
5455
|
|
|
5407
5456
|
// src/components/Heading/Heading.tsx
|
|
5408
|
-
import { jsx as
|
|
5457
|
+
import { jsx as jsx164 } from "react/jsx-runtime";
|
|
5409
5458
|
var heroStyle = css13`
|
|
5410
5459
|
--font-family: var(--typography-heading-hero-family);
|
|
5411
5460
|
--font-size: var(--typography-heading-hero-size);
|
|
@@ -5458,26 +5507,26 @@ var variantStyleMap = {
|
|
|
5458
5507
|
heading6: heading6TextStyle
|
|
5459
5508
|
};
|
|
5460
5509
|
var DEFAULT_ELEMENT = "h1";
|
|
5461
|
-
var StyledHeading =
|
|
5462
|
-
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
5510
|
+
var StyledHeading = styled10.div`
|
|
5511
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
5463
5512
|
font-family: var(--font-family);
|
|
5464
5513
|
font-size: var(--font-size);
|
|
5465
5514
|
font-weight: var(--font-weight);
|
|
5466
5515
|
line-height: var(--line-height);
|
|
5467
5516
|
color: var(--color-text);
|
|
5468
|
-
${({ variant }) => variantStyleMap[variant]}
|
|
5469
|
-
${({ ellipsis }) => ellipsis && ellipsisStyle};
|
|
5470
|
-
${({ inline }) => inline && css13`
|
|
5517
|
+
${({ $variant }) => variantStyleMap[$variant]}
|
|
5518
|
+
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
5519
|
+
${({ $inline }) => $inline && css13`
|
|
5471
5520
|
display: inline-block;
|
|
5472
5521
|
`}
|
|
5473
|
-
${({ disabled }) => disabled && css13`
|
|
5522
|
+
${({ $disabled }) => $disabled && css13`
|
|
5474
5523
|
color: var(--color-text-disabled);
|
|
5475
5524
|
`}
|
|
5476
|
-
${({ preventUserSelect }) => preventUserSelect && css13`
|
|
5525
|
+
${({ $preventUserSelect }) => $preventUserSelect && css13`
|
|
5477
5526
|
user-select: none;
|
|
5478
5527
|
`}
|
|
5479
|
-
${({ align }) => css13`
|
|
5480
|
-
text-align: ${align};
|
|
5528
|
+
${({ $align }) => css13`
|
|
5529
|
+
text-align: ${$align};
|
|
5481
5530
|
`}
|
|
5482
5531
|
margin: 0;
|
|
5483
5532
|
`;
|
|
@@ -5501,18 +5550,18 @@ var HeadingComponent = forwardRef4(
|
|
|
5501
5550
|
variant = "heading1",
|
|
5502
5551
|
renderAs,
|
|
5503
5552
|
...otherProps
|
|
5504
|
-
}, ref) => /* @__PURE__ */
|
|
5553
|
+
}, ref) => /* @__PURE__ */ jsx164(
|
|
5505
5554
|
StyledHeading,
|
|
5506
5555
|
{
|
|
5507
5556
|
ref,
|
|
5508
|
-
align,
|
|
5557
|
+
$align: align,
|
|
5558
|
+
$colorScheme: colorScheme,
|
|
5559
|
+
$disabled: disabled,
|
|
5560
|
+
$ellipsis: ellipsis,
|
|
5561
|
+
$inline: inline,
|
|
5562
|
+
$preventUserSelect: preventUserSelect,
|
|
5563
|
+
$variant: variant,
|
|
5509
5564
|
as: renderAs ?? variantElementMap[variant],
|
|
5510
|
-
colorScheme,
|
|
5511
|
-
disabled,
|
|
5512
|
-
ellipsis,
|
|
5513
|
-
inline,
|
|
5514
|
-
preventUserSelect,
|
|
5515
|
-
variant,
|
|
5516
5565
|
...otherProps
|
|
5517
5566
|
}
|
|
5518
5567
|
)
|
|
@@ -5522,7 +5571,7 @@ var Heading = makePolymorphic(HeadingComponent);
|
|
|
5522
5571
|
|
|
5523
5572
|
// src/components/IconButton/IconButton.tsx
|
|
5524
5573
|
import { Children as Children2, cloneElement as cloneElement2, forwardRef as forwardRef5 } from "react";
|
|
5525
|
-
import
|
|
5574
|
+
import styled12 from "styled-components";
|
|
5526
5575
|
|
|
5527
5576
|
// src/components/Tooltip/Tooltip.tsx
|
|
5528
5577
|
import {
|
|
@@ -5532,8 +5581,8 @@ import {
|
|
|
5532
5581
|
Portal,
|
|
5533
5582
|
Arrow
|
|
5534
5583
|
} from "@radix-ui/react-tooltip";
|
|
5535
|
-
import
|
|
5536
|
-
import { jsx as
|
|
5584
|
+
import styled11, { css as css14 } from "styled-components";
|
|
5585
|
+
import { jsx as jsx165, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
5537
5586
|
var CompactTooltipStyles = css14`
|
|
5538
5587
|
--tooltip-font-size: var(--typography-label-4-size);
|
|
5539
5588
|
--tooltip-line-height: var(--typography-label-4-line-height);
|
|
@@ -5541,7 +5590,7 @@ var CompactTooltipStyles = css14`
|
|
|
5541
5590
|
--tooltip-horizontal-padding: var(--space-02);
|
|
5542
5591
|
--tooltip-vertical-padding: var(--space-03);
|
|
5543
5592
|
`;
|
|
5544
|
-
var StyledContent =
|
|
5593
|
+
var StyledContent = styled11(Content)`
|
|
5545
5594
|
--tooltip-font-family: var(--typography-family-default);
|
|
5546
5595
|
--tooltip-border-radius: var(--border-radius-05);
|
|
5547
5596
|
--tooltip-bg: var(--color-bg-tooltip);
|
|
@@ -5599,14 +5648,14 @@ var Tooltip = ({
|
|
|
5599
5648
|
if (forceOpen === true) {
|
|
5600
5649
|
rootProps.open = true;
|
|
5601
5650
|
}
|
|
5602
|
-
return /* @__PURE__ */
|
|
5651
|
+
return /* @__PURE__ */ jsxs6(
|
|
5603
5652
|
Root,
|
|
5604
5653
|
{
|
|
5605
5654
|
delayDuration: delay,
|
|
5606
5655
|
...rootProps,
|
|
5607
5656
|
children: [
|
|
5608
|
-
/* @__PURE__ */
|
|
5609
|
-
/* @__PURE__ */
|
|
5657
|
+
/* @__PURE__ */ jsx165(Trigger, { asChild: true, children }),
|
|
5658
|
+
/* @__PURE__ */ jsx165(Portal, { children: /* @__PURE__ */ jsxs6(
|
|
5610
5659
|
StyledContent,
|
|
5611
5660
|
{
|
|
5612
5661
|
$compact: compact,
|
|
@@ -5614,7 +5663,7 @@ var Tooltip = ({
|
|
|
5614
5663
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
5615
5664
|
children: [
|
|
5616
5665
|
content,
|
|
5617
|
-
!hideArrow ? /* @__PURE__ */
|
|
5666
|
+
!hideArrow ? /* @__PURE__ */ jsx165(Arrow, { asChild: true, children: /* @__PURE__ */ jsx165(
|
|
5618
5667
|
"svg",
|
|
5619
5668
|
{
|
|
5620
5669
|
fill: "var(--tooltip-bg)",
|
|
@@ -5623,7 +5672,7 @@ var Tooltip = ({
|
|
|
5623
5672
|
viewBox: "0 0 12 8",
|
|
5624
5673
|
width: "12",
|
|
5625
5674
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5626
|
-
children: /* @__PURE__ */
|
|
5675
|
+
children: /* @__PURE__ */ jsx165("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" })
|
|
5627
5676
|
}
|
|
5628
5677
|
) }) : null
|
|
5629
5678
|
]
|
|
@@ -5636,18 +5685,12 @@ var Tooltip = ({
|
|
|
5636
5685
|
Tooltip.displayName = "Tooltip";
|
|
5637
5686
|
|
|
5638
5687
|
// src/components/IconButton/IconButton.tsx
|
|
5639
|
-
import { jsx as
|
|
5640
|
-
var
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
};
|
|
5646
|
-
var StyledButton2 = styled11(Button)`
|
|
5647
|
-
--icon-button-size-small: 24px;
|
|
5648
|
-
--icon-button-size-medium: 32px;
|
|
5649
|
-
--icon-button-size-large: 40px;
|
|
5650
|
-
--icon-button-size-hero: 48px;
|
|
5688
|
+
import { jsx as jsx166 } from "react/jsx-runtime";
|
|
5689
|
+
var StyledButton2 = styled12(Button)`
|
|
5690
|
+
--icon-button-size-sm: 24px;
|
|
5691
|
+
--icon-button-size-md: 32px;
|
|
5692
|
+
--icon-button-size-lg: 40px;
|
|
5693
|
+
--icon-button-size-xl: 48px;
|
|
5651
5694
|
|
|
5652
5695
|
border-radius: 50%;
|
|
5653
5696
|
height: ${({ size }) => `var(--icon-button-size-${size})`};
|
|
@@ -5658,9 +5701,9 @@ var StyledButton2 = styled11(Button)`
|
|
|
5658
5701
|
line-height: 1;
|
|
5659
5702
|
`;
|
|
5660
5703
|
var IconButton = forwardRef5(
|
|
5661
|
-
({ children, label, disableTooltip = false, size = "
|
|
5704
|
+
({ children, label, disableTooltip = false, size = "md", ...props }, ref) => {
|
|
5662
5705
|
const responsiveSize = useResponsiveProp(size);
|
|
5663
|
-
const button = /* @__PURE__ */
|
|
5706
|
+
const button = /* @__PURE__ */ jsx166(
|
|
5664
5707
|
StyledButton2,
|
|
5665
5708
|
{
|
|
5666
5709
|
...props,
|
|
@@ -5669,24 +5712,82 @@ var IconButton = forwardRef5(
|
|
|
5669
5712
|
"data-wistia-ui-icon-button": true,
|
|
5670
5713
|
size: responsiveSize,
|
|
5671
5714
|
children: cloneElement2(Children2.only(children), {
|
|
5672
|
-
size:
|
|
5715
|
+
size: responsiveSize
|
|
5673
5716
|
})
|
|
5674
5717
|
}
|
|
5675
5718
|
);
|
|
5676
5719
|
if (disableTooltip) {
|
|
5677
5720
|
return button;
|
|
5678
5721
|
}
|
|
5679
|
-
return /* @__PURE__ */
|
|
5722
|
+
return /* @__PURE__ */ jsx166(Tooltip, { content: label, children: button });
|
|
5680
5723
|
}
|
|
5681
5724
|
);
|
|
5682
5725
|
IconButton.displayName = "IconButton";
|
|
5683
5726
|
|
|
5727
|
+
// src/components/Label/Label.tsx
|
|
5728
|
+
import styled13, { css as css15 } from "styled-components";
|
|
5729
|
+
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
5730
|
+
var requiredStyle = css15`
|
|
5731
|
+
&::after {
|
|
5732
|
+
color: red; /* TODO need a color for this */
|
|
5733
|
+
display: inline;
|
|
5734
|
+
padding-left: var(--space-01);
|
|
5735
|
+
content: '*';
|
|
5736
|
+
}
|
|
5737
|
+
`;
|
|
5738
|
+
var disabledStyle = css15`
|
|
5739
|
+
color: var(--color-text-disabled);
|
|
5740
|
+
`;
|
|
5741
|
+
var SPACE_BETWEEN_LABEL_AND_INPUT = "var(--space-02)";
|
|
5742
|
+
var StyledLabel = styled13.label`
|
|
5743
|
+
display: block;
|
|
5744
|
+
font-size: var(--typography-label-1-size);
|
|
5745
|
+
font-weight: var(--typography-label-1-weight);
|
|
5746
|
+
line-height: var(--typography-label-1-line-height);
|
|
5747
|
+
margin-bottom: ${SPACE_BETWEEN_LABEL_AND_INPUT};
|
|
5748
|
+
width: 100%;
|
|
5749
|
+
|
|
5750
|
+
/* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
|
|
5751
|
+
> input,
|
|
5752
|
+
> textarea,
|
|
5753
|
+
> select {
|
|
5754
|
+
display: block;
|
|
5755
|
+
margin-top: ${SPACE_BETWEEN_LABEL_AND_INPUT};
|
|
5756
|
+
}
|
|
5757
|
+
|
|
5758
|
+
> label {
|
|
5759
|
+
font-weight: normal;
|
|
5760
|
+
}
|
|
5761
|
+
|
|
5762
|
+
${({ screenReaderOnly }) => screenReaderOnly && visuallyHiddenStyle}
|
|
5763
|
+
${({ disabled }) => disabled && disabledStyle}
|
|
5764
|
+
${({ required }) => required && requiredStyle}
|
|
5765
|
+
`;
|
|
5766
|
+
var Label = ({
|
|
5767
|
+
children,
|
|
5768
|
+
disabled = false,
|
|
5769
|
+
htmlFor,
|
|
5770
|
+
required = false,
|
|
5771
|
+
screenReaderOnly = false,
|
|
5772
|
+
...otherProps
|
|
5773
|
+
}) => /* @__PURE__ */ jsx167(
|
|
5774
|
+
StyledLabel,
|
|
5775
|
+
{
|
|
5776
|
+
disabled,
|
|
5777
|
+
required,
|
|
5778
|
+
screenReaderOnly,
|
|
5779
|
+
...otherProps,
|
|
5780
|
+
children
|
|
5781
|
+
}
|
|
5782
|
+
);
|
|
5783
|
+
Label.displayName = "Label";
|
|
5784
|
+
|
|
5684
5785
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
5685
|
-
import
|
|
5786
|
+
import styled14 from "styled-components";
|
|
5686
5787
|
import { isNotNil as isNotNil6 } from "@wistia/type-guards";
|
|
5687
|
-
import { jsx as
|
|
5688
|
-
var VisuallyHidden =
|
|
5689
|
-
var VisuallyHiddenButFocusable =
|
|
5788
|
+
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
5789
|
+
var VisuallyHidden = styled14.div({ ...visuallyHiddenStyle });
|
|
5790
|
+
var VisuallyHiddenButFocusable = styled14.div({
|
|
5690
5791
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
5691
5792
|
});
|
|
5692
5793
|
var ScreenReaderOnly = ({
|
|
@@ -5697,21 +5798,21 @@ var ScreenReaderOnly = ({
|
|
|
5697
5798
|
}) => {
|
|
5698
5799
|
const accessibleText = isNotNil6(text) ? text : children;
|
|
5699
5800
|
if (focusable) {
|
|
5700
|
-
return /* @__PURE__ */
|
|
5801
|
+
return /* @__PURE__ */ jsx168(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
5701
5802
|
}
|
|
5702
|
-
return /* @__PURE__ */
|
|
5803
|
+
return /* @__PURE__ */ jsx168(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
5703
5804
|
};
|
|
5704
5805
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
5705
5806
|
|
|
5706
5807
|
// src/components/Stack/Stack.tsx
|
|
5707
5808
|
import { forwardRef as forwardRef6 } from "react";
|
|
5708
|
-
import
|
|
5709
|
-
import { jsx as
|
|
5809
|
+
import styled15 from "styled-components";
|
|
5810
|
+
import { jsx as jsx169 } from "react/jsx-runtime";
|
|
5710
5811
|
var DEFAULT_ELEMENT2 = "div";
|
|
5711
|
-
var StyledStack =
|
|
5812
|
+
var StyledStack = styled15.div`
|
|
5712
5813
|
display: flex;
|
|
5713
5814
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
5714
|
-
gap: ${({ gap }) => `var(--${gap})`};
|
|
5815
|
+
gap: ${({ $gap }) => `var(--${$gap})`};
|
|
5715
5816
|
|
|
5716
5817
|
> * {
|
|
5717
5818
|
flex: 1;
|
|
@@ -5721,13 +5822,13 @@ var StackComponent = forwardRef6(
|
|
|
5721
5822
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
5722
5823
|
const responsiveGap = useResponsiveProp(gap);
|
|
5723
5824
|
const responsiveDirection = useResponsiveProp(direction);
|
|
5724
|
-
return /* @__PURE__ */
|
|
5825
|
+
return /* @__PURE__ */ jsx169(
|
|
5725
5826
|
StyledStack,
|
|
5726
5827
|
{
|
|
5727
5828
|
ref,
|
|
5728
5829
|
$direction: responsiveDirection,
|
|
5830
|
+
$gap: responsiveGap,
|
|
5729
5831
|
as: renderAs ?? DEFAULT_ELEMENT2,
|
|
5730
|
-
gap: responsiveGap,
|
|
5731
5832
|
...props
|
|
5732
5833
|
}
|
|
5733
5834
|
);
|
|
@@ -5738,89 +5839,89 @@ var Stack = makePolymorphic(StackComponent);
|
|
|
5738
5839
|
|
|
5739
5840
|
// src/components/Text/Text.tsx
|
|
5740
5841
|
import { forwardRef as forwardRef7 } from "react";
|
|
5741
|
-
import
|
|
5742
|
-
import { jsx as
|
|
5743
|
-
var bodyBoldStyles =
|
|
5842
|
+
import styled16, { css as css16 } from "styled-components";
|
|
5843
|
+
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
5844
|
+
var bodyBoldStyles = css16`
|
|
5744
5845
|
> strong,
|
|
5745
5846
|
b {
|
|
5746
5847
|
font-weight: var(--typography-weight-body-bold);
|
|
5747
5848
|
}
|
|
5748
5849
|
`;
|
|
5749
|
-
var labelBoldStyles =
|
|
5850
|
+
var labelBoldStyles = css16`
|
|
5750
5851
|
> strong,
|
|
5751
5852
|
b {
|
|
5752
5853
|
font-weight: var(--typography-weight-label-bold);
|
|
5753
5854
|
}
|
|
5754
5855
|
`;
|
|
5755
|
-
var body1TextStyle =
|
|
5856
|
+
var body1TextStyle = css16`
|
|
5756
5857
|
--font-family: var(--typography-body-1-family);
|
|
5757
5858
|
--font-size: var(--typography-body-1-size);
|
|
5758
5859
|
--font-weight: var(--typography-body-1-weight);
|
|
5759
5860
|
--line-height: var(--typography-body-1-line-height);
|
|
5760
5861
|
${bodyBoldStyles}
|
|
5761
5862
|
`;
|
|
5762
|
-
var body2TextStyle =
|
|
5863
|
+
var body2TextStyle = css16`
|
|
5763
5864
|
--font-family: var(--typography-body-2-family);
|
|
5764
5865
|
--font-size: var(--typography-body-2-size);
|
|
5765
5866
|
--font-weight: var(--typography-body-2-weight);
|
|
5766
5867
|
--line-height: var(--typography-body-2-line-height);
|
|
5767
5868
|
${bodyBoldStyles}
|
|
5768
5869
|
`;
|
|
5769
|
-
var body3TextStyle =
|
|
5870
|
+
var body3TextStyle = css16`
|
|
5770
5871
|
--font-family: var(--typography-body-3-family);
|
|
5771
5872
|
--font-size: var(--typography-body-3-size);
|
|
5772
5873
|
--font-weight: var(--typography-body-3-weight);
|
|
5773
5874
|
--line-height: var(--typography-body-3-line-height);
|
|
5774
5875
|
${bodyBoldStyles}
|
|
5775
5876
|
`;
|
|
5776
|
-
var body4TextStyle =
|
|
5877
|
+
var body4TextStyle = css16`
|
|
5777
5878
|
--font-family: var(--typography-body-4-family);
|
|
5778
5879
|
--font-size: var(--typography-body-4-size);
|
|
5779
5880
|
--font-weight: var(--typography-body-4-weight);
|
|
5780
5881
|
--line-height: var(--typography-body-4-line-height);
|
|
5781
5882
|
${bodyBoldStyles}
|
|
5782
5883
|
`;
|
|
5783
|
-
var label1TextStyle =
|
|
5884
|
+
var label1TextStyle = css16`
|
|
5784
5885
|
--font-family: var(--typography-label-1-family);
|
|
5785
5886
|
--font-size: var(--typography-label-1-size);
|
|
5786
5887
|
--font-weight: var(--typography-label-1-weight);
|
|
5787
5888
|
--line-height: var(--typography-label-1-line-height);
|
|
5788
5889
|
${labelBoldStyles}
|
|
5789
5890
|
`;
|
|
5790
|
-
var label2TextStyle =
|
|
5891
|
+
var label2TextStyle = css16`
|
|
5791
5892
|
--font-family: var(--typography-label-2-family);
|
|
5792
5893
|
--font-size: var(--typography-label-2-size);
|
|
5793
5894
|
--font-weight: var(--typography-label-2-weight);
|
|
5794
5895
|
--line-height: var(--typography-label-2-line-height);
|
|
5795
5896
|
${labelBoldStyles}
|
|
5796
5897
|
`;
|
|
5797
|
-
var label3TextStyle =
|
|
5898
|
+
var label3TextStyle = css16`
|
|
5798
5899
|
--font-family: var(--typography-label-3-family);
|
|
5799
5900
|
--font-size: var(--typography-label-3-size);
|
|
5800
5901
|
--font-weight: var(--typography-label-3-weight);
|
|
5801
5902
|
--line-height: var(--typography-label-3-line-height);
|
|
5802
5903
|
${labelBoldStyles}
|
|
5803
5904
|
`;
|
|
5804
|
-
var label4TextStyle =
|
|
5905
|
+
var label4TextStyle = css16`
|
|
5805
5906
|
--font-family: var(--typography-label-4-family);
|
|
5806
5907
|
--font-size: var(--typography-label-4-size);
|
|
5807
5908
|
--font-weight: var(--typography-label-4-weight);
|
|
5808
5909
|
--line-height: var(--typography-label-4-line-height);
|
|
5809
5910
|
${labelBoldStyles}
|
|
5810
5911
|
`;
|
|
5811
|
-
var body1MonoTextStyle =
|
|
5912
|
+
var body1MonoTextStyle = css16`
|
|
5812
5913
|
${body1TextStyle};
|
|
5813
5914
|
--font-family: var(--typography-family-mono);
|
|
5814
5915
|
`;
|
|
5815
|
-
var body2MonoTextStyle =
|
|
5916
|
+
var body2MonoTextStyle = css16`
|
|
5816
5917
|
${body2TextStyle};
|
|
5817
5918
|
--font-family: var(--typography-family-mono);
|
|
5818
5919
|
`;
|
|
5819
|
-
var body3MonoTextStyle =
|
|
5920
|
+
var body3MonoTextStyle = css16`
|
|
5820
5921
|
${body3TextStyle};
|
|
5821
5922
|
--font-family: var(--typography-family-mono);
|
|
5822
5923
|
`;
|
|
5823
|
-
var body4MonoTextStyle =
|
|
5924
|
+
var body4MonoTextStyle = css16`
|
|
5824
5925
|
${body4TextStyle};
|
|
5825
5926
|
--font-family: var(--typography-family-mono);
|
|
5826
5927
|
`;
|
|
@@ -5838,13 +5939,13 @@ var variantStyleMap2 = {
|
|
|
5838
5939
|
label3: label3TextStyle,
|
|
5839
5940
|
label4: label4TextStyle
|
|
5840
5941
|
};
|
|
5841
|
-
var highContrastProminenceStyle =
|
|
5942
|
+
var highContrastProminenceStyle = css16`
|
|
5842
5943
|
--text-color: var(--color-text-high-contrast);
|
|
5843
5944
|
`;
|
|
5844
|
-
var vibrantProminenceStyle =
|
|
5945
|
+
var vibrantProminenceStyle = css16`
|
|
5845
5946
|
--text-color: var(--color-text);
|
|
5846
5947
|
`;
|
|
5847
|
-
var secondaryProminenceStyle =
|
|
5948
|
+
var secondaryProminenceStyle = css16`
|
|
5848
5949
|
--text-color: var(--color-text-secondary);
|
|
5849
5950
|
`;
|
|
5850
5951
|
var prominenceMap = {
|
|
@@ -5852,8 +5953,8 @@ var prominenceMap = {
|
|
|
5852
5953
|
vibrant: vibrantProminenceStyle,
|
|
5853
5954
|
secondary: secondaryProminenceStyle
|
|
5854
5955
|
};
|
|
5855
|
-
var StyledText =
|
|
5856
|
-
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
5956
|
+
var StyledText = styled16.div`
|
|
5957
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
5857
5958
|
font-family: var(--font-family);
|
|
5858
5959
|
font-size: var(--font-size);
|
|
5859
5960
|
font-weight: var(--font-weight);
|
|
@@ -5861,22 +5962,22 @@ var StyledText = styled14.div`
|
|
|
5861
5962
|
color: var(--text-color);
|
|
5862
5963
|
font-style: normal;
|
|
5863
5964
|
margin: 0;
|
|
5864
|
-
${({ variant }) => variantStyleMap2[variant]}
|
|
5865
|
-
${({ prominence }) => prominenceMap[prominence]}
|
|
5866
|
-
${({ ellipsis }) => ellipsis && ellipsisStyle};
|
|
5867
|
-
${({ inline }) => inline &&
|
|
5965
|
+
${({ $variant }) => variantStyleMap2[$variant]}
|
|
5966
|
+
${({ $prominence }) => prominenceMap[$prominence]}
|
|
5967
|
+
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
5968
|
+
${({ $inline }) => $inline && css16`
|
|
5868
5969
|
display: inline-block;
|
|
5869
5970
|
`}
|
|
5870
|
-
${({ disabled }) => disabled &&
|
|
5971
|
+
${({ $disabled }) => $disabled && css16`
|
|
5871
5972
|
--text-color: var(--color-text-disabled);
|
|
5872
5973
|
`}
|
|
5873
|
-
${({ preventUserSelect }) => preventUserSelect &&
|
|
5974
|
+
${({ $preventUserSelect }) => $preventUserSelect && css16`
|
|
5874
5975
|
user-select: none;
|
|
5875
5976
|
`}
|
|
5876
|
-
${({ align }) =>
|
|
5977
|
+
${({ align }) => css16`
|
|
5877
5978
|
text-align: ${align};
|
|
5878
5979
|
`}
|
|
5879
|
-
${({ as }) => as === "p" &&
|
|
5980
|
+
${({ as }) => as === "p" && css16`
|
|
5880
5981
|
display: block;
|
|
5881
5982
|
`}
|
|
5882
5983
|
`;
|
|
@@ -5894,19 +5995,19 @@ var TextComponent = forwardRef7(
|
|
|
5894
5995
|
renderAs,
|
|
5895
5996
|
...otherProps
|
|
5896
5997
|
}, ref) => {
|
|
5897
|
-
return /* @__PURE__ */
|
|
5998
|
+
return /* @__PURE__ */ jsx170(
|
|
5898
5999
|
StyledText,
|
|
5899
6000
|
{
|
|
5900
6001
|
ref,
|
|
6002
|
+
$colorScheme: colorScheme,
|
|
6003
|
+
$disabled: disabled,
|
|
6004
|
+
$ellipsis: ellipsis,
|
|
6005
|
+
$inline: inline,
|
|
6006
|
+
$preventUserSelect: preventUserSelect,
|
|
6007
|
+
$prominence: prominence,
|
|
6008
|
+
$variant: variant,
|
|
5901
6009
|
align,
|
|
5902
6010
|
as: renderAs ?? DEFAULT_ELEMENT3,
|
|
5903
|
-
colorScheme,
|
|
5904
|
-
disabled,
|
|
5905
|
-
ellipsis,
|
|
5906
|
-
inline,
|
|
5907
|
-
preventUserSelect,
|
|
5908
|
-
prominence,
|
|
5909
|
-
variant,
|
|
5910
6011
|
...otherProps
|
|
5911
6012
|
}
|
|
5912
6013
|
);
|
|
@@ -5916,20 +6017,20 @@ TextComponent.displayName = "Text";
|
|
|
5916
6017
|
var Text = makePolymorphic(TextComponent);
|
|
5917
6018
|
|
|
5918
6019
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
5919
|
-
import
|
|
6020
|
+
import styled17 from "styled-components";
|
|
5920
6021
|
import { isNotNil as isNotNil7 } from "@wistia/type-guards";
|
|
5921
|
-
import { jsx as
|
|
6022
|
+
import { jsx as jsx171, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
5922
6023
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
5923
6024
|
if (iconOnly) {
|
|
5924
|
-
return /* @__PURE__ */
|
|
6025
|
+
return /* @__PURE__ */ jsx171("g", { fill: brandmarkColor, children: /* @__PURE__ */ jsx171("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" }) });
|
|
5925
6026
|
}
|
|
5926
|
-
return /* @__PURE__ */
|
|
6027
|
+
return /* @__PURE__ */ jsx171("g", { fill: brandmarkColor, children: /* @__PURE__ */ jsx171("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" }) });
|
|
5927
6028
|
};
|
|
5928
6029
|
var renderLogotype = (logotypeColor, iconOnly) => {
|
|
5929
6030
|
if (iconOnly) {
|
|
5930
6031
|
return null;
|
|
5931
6032
|
}
|
|
5932
|
-
return /* @__PURE__ */
|
|
6033
|
+
return /* @__PURE__ */ jsx171("g", { fill: logotypeColor, children: /* @__PURE__ */ jsx171("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" }) });
|
|
5933
6034
|
};
|
|
5934
6035
|
var computedViewBox = (iconOnly) => {
|
|
5935
6036
|
if (iconOnly) {
|
|
@@ -5937,7 +6038,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
5937
6038
|
}
|
|
5938
6039
|
return "0 0 144 31.47";
|
|
5939
6040
|
};
|
|
5940
|
-
var WistiaLogoComponent =
|
|
6041
|
+
var WistiaLogoComponent = styled17.svg`
|
|
5941
6042
|
height: ${({ height }) => `${height}px`};
|
|
5942
6043
|
|
|
5943
6044
|
/* ensure it will always fit on mobile */
|
|
@@ -5946,7 +6047,7 @@ var WistiaLogoComponent = styled15.svg`
|
|
|
5946
6047
|
|
|
5947
6048
|
&:hover {
|
|
5948
6049
|
path {
|
|
5949
|
-
${({ hoverColor }) => hoverColor !== void 0 ? `fill: ${hoverColor}` : null};
|
|
6050
|
+
${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
|
|
5950
6051
|
}
|
|
5951
6052
|
}
|
|
5952
6053
|
`;
|
|
@@ -5979,46 +6080,26 @@ var WistiaLogo = ({
|
|
|
5979
6080
|
};
|
|
5980
6081
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
5981
6082
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
5982
|
-
const Logo = /* @__PURE__ */
|
|
6083
|
+
const Logo = /* @__PURE__ */ jsxs7(
|
|
5983
6084
|
WistiaLogoComponent,
|
|
5984
6085
|
{
|
|
6086
|
+
$hoverColor: hoverColor,
|
|
5985
6087
|
height,
|
|
5986
|
-
hoverColor,
|
|
5987
6088
|
role: "img",
|
|
5988
6089
|
viewBox: computedViewBox(iconOnly),
|
|
5989
6090
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5990
6091
|
...otherProps,
|
|
5991
6092
|
children: [
|
|
5992
|
-
/* @__PURE__ */
|
|
5993
|
-
isNotNil7(description) ? /* @__PURE__ */
|
|
6093
|
+
/* @__PURE__ */ jsx171("title", { children: title }),
|
|
6094
|
+
isNotNil7(description) ? /* @__PURE__ */ jsx171("desc", { children: description }) : null,
|
|
5994
6095
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
5995
6096
|
renderLogotype(logotypeColor, iconOnly)
|
|
5996
6097
|
]
|
|
5997
6098
|
}
|
|
5998
6099
|
);
|
|
5999
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
6100
|
+
return href !== void 0 ? /* @__PURE__ */ jsx171("a", { href, children: Logo }) : Logo;
|
|
6000
6101
|
};
|
|
6001
6102
|
WistiaLogo.displayName = "WistiaLogo";
|
|
6002
|
-
|
|
6003
|
-
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
6004
|
-
import styled16 from "styled-components";
|
|
6005
|
-
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
6006
|
-
var StyledColorSchemeWrapper = styled16.div`
|
|
6007
|
-
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
6008
|
-
`;
|
|
6009
|
-
var ColorSchemeWrapper = ({
|
|
6010
|
-
colorScheme,
|
|
6011
|
-
children,
|
|
6012
|
-
...otherProps
|
|
6013
|
-
}) => /* @__PURE__ */ jsx170(
|
|
6014
|
-
StyledColorSchemeWrapper,
|
|
6015
|
-
{
|
|
6016
|
-
colorScheme,
|
|
6017
|
-
...otherProps,
|
|
6018
|
-
children
|
|
6019
|
-
}
|
|
6020
|
-
);
|
|
6021
|
-
ColorSchemeWrapper.displayName = "ColorSchemeWrapper";
|
|
6022
6103
|
export {
|
|
6023
6104
|
Badge,
|
|
6024
6105
|
Box,
|
|
@@ -6030,6 +6111,7 @@ export {
|
|
|
6030
6111
|
Heading,
|
|
6031
6112
|
Icon,
|
|
6032
6113
|
IconButton,
|
|
6114
|
+
Label,
|
|
6033
6115
|
Link,
|
|
6034
6116
|
ScreenReaderOnly,
|
|
6035
6117
|
Stack,
|
|
@@ -6037,6 +6119,7 @@ export {
|
|
|
6037
6119
|
Tooltip,
|
|
6038
6120
|
UIProvider,
|
|
6039
6121
|
WistiaLogo,
|
|
6122
|
+
colorSchemeOptions,
|
|
6040
6123
|
copyToClipboard,
|
|
6041
6124
|
ellipsisFlexParentStyle,
|
|
6042
6125
|
ellipsisStyle,
|