@wistia/ui 0.6.40 → 0.6.41-beta.303ca968.b880931
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 +289 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +99 -2
- package/dist/index.d.ts +99 -2
- package/dist/index.mjs +282 -16
- 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.6.
|
|
3
|
+
* @license @wistia/ui v0.6.41-beta.303ca968.b880931
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -110,6 +110,8 @@ __export(index_exports, {
|
|
|
110
110
|
Tabs: () => Tabs,
|
|
111
111
|
Tag: () => Tag,
|
|
112
112
|
Text: () => Text,
|
|
113
|
+
Thumbnail: () => Thumbnail,
|
|
114
|
+
ThumbnailBadge: () => ThumbnailBadge,
|
|
113
115
|
Tooltip: () => Tooltip,
|
|
114
116
|
UIProvider: () => UIProvider,
|
|
115
117
|
WistiaLogo: () => WistiaLogo,
|
|
@@ -10754,10 +10756,12 @@ var StyledContent2 = (0, import_styled_components63.default)(import_react_popove
|
|
|
10754
10756
|
${({ $unstyled }) => !$unstyled && import_styled_components63.css`
|
|
10755
10757
|
border-radius: var(--wui-border-radius-02);
|
|
10756
10758
|
padding: var(--wui-space-04);
|
|
10757
|
-
max-width: 320px;
|
|
10759
|
+
max-width: var(--wui-popover-max-width, 320px);
|
|
10760
|
+
max-height: var(--wui-popover-max-height, auto);
|
|
10758
10761
|
background-color: var(--wui-color-bg-surface);
|
|
10759
10762
|
box-shadow: var(--wui-elevation-01);
|
|
10760
10763
|
border: 1px solid var(--wui-color-border);
|
|
10764
|
+
overflow: auto;
|
|
10761
10765
|
`}
|
|
10762
10766
|
|
|
10763
10767
|
[data-wui-popover-close] {
|
|
@@ -10771,10 +10775,16 @@ var Popover = ({
|
|
|
10771
10775
|
trigger,
|
|
10772
10776
|
isOpen = false,
|
|
10773
10777
|
hideCloseButton = false,
|
|
10778
|
+
maxWidth = "320px",
|
|
10779
|
+
maxHeight = "auto",
|
|
10774
10780
|
onOpenChange,
|
|
10775
10781
|
unstyled = false,
|
|
10776
10782
|
...props
|
|
10777
10783
|
}) => {
|
|
10784
|
+
const style = {
|
|
10785
|
+
"--wui-popover-max-width": maxWidth,
|
|
10786
|
+
"--wui-popover-max-height": maxHeight
|
|
10787
|
+
};
|
|
10778
10788
|
return /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(import_react_popover.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
10779
10789
|
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_popover.Trigger, { asChild: true, children: trigger }),
|
|
10780
10790
|
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(
|
|
@@ -10783,6 +10793,7 @@ var Popover = ({
|
|
|
10783
10793
|
sideOffset: 8,
|
|
10784
10794
|
...props,
|
|
10785
10795
|
$unstyled: unstyled,
|
|
10796
|
+
style,
|
|
10786
10797
|
children: [
|
|
10787
10798
|
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_popover.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
10788
10799
|
IconButton,
|
|
@@ -11436,6 +11447,7 @@ Select.displayName = "Select";
|
|
|
11436
11447
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
11437
11448
|
var import_react55 = require("react");
|
|
11438
11449
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
11450
|
+
var import_type_guards43 = require("@wistia/type-guards");
|
|
11439
11451
|
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11440
11452
|
var StyledItem = (0, import_styled_components70.default)(import_react_select2.Item)`
|
|
11441
11453
|
${variantStyleMap2.body3};
|
|
@@ -11464,21 +11476,24 @@ var StyledIconContainer = import_styled_components70.default.span`
|
|
|
11464
11476
|
width: 12px;
|
|
11465
11477
|
`;
|
|
11466
11478
|
var SelectOption = (0, import_react55.forwardRef)(
|
|
11467
|
-
({ children, ...props }, forwardedRef) => {
|
|
11479
|
+
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
11468
11480
|
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
11469
11481
|
StyledItem,
|
|
11470
11482
|
{
|
|
11471
11483
|
...props,
|
|
11472
11484
|
ref: forwardedRef,
|
|
11473
11485
|
children: [
|
|
11474
|
-
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
11486
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledIconContainer, { "data-indicator": true, children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
11475
11487
|
Icon,
|
|
11476
11488
|
{
|
|
11477
11489
|
size: "sm",
|
|
11478
11490
|
type: "checkmark"
|
|
11479
11491
|
}
|
|
11480
11492
|
) }) }),
|
|
11481
|
-
/* @__PURE__ */ (0, import_jsx_runtime252.
|
|
11493
|
+
(0, import_type_guards43.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)("div", { children: [
|
|
11494
|
+
children,
|
|
11495
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
|
|
11496
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children })
|
|
11482
11497
|
]
|
|
11483
11498
|
}
|
|
11484
11499
|
);
|
|
@@ -11510,7 +11525,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11510
11525
|
// src/components/Switch/Switch.tsx
|
|
11511
11526
|
var import_react56 = require("react");
|
|
11512
11527
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
11513
|
-
var
|
|
11528
|
+
var import_type_guards44 = require("@wistia/type-guards");
|
|
11514
11529
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
11515
11530
|
var sizeSmall3 = import_styled_components72.css`
|
|
11516
11531
|
--wui-size-small-width: 24px;
|
|
@@ -11629,7 +11644,7 @@ var Switch = (0, import_react56.forwardRef)(
|
|
|
11629
11644
|
...props
|
|
11630
11645
|
}, ref) => {
|
|
11631
11646
|
const generatedId = (0, import_react56.useId)();
|
|
11632
|
-
const computedId = (0,
|
|
11647
|
+
const computedId = (0, import_type_guards44.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11633
11648
|
return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11634
11649
|
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11635
11650
|
StyledHiddenSwitchInput,
|
|
@@ -11776,7 +11791,7 @@ var TableRow = ({ children, ...props }) => {
|
|
|
11776
11791
|
// src/components/Tabs/Tabs.tsx
|
|
11777
11792
|
var import_react63 = require("react");
|
|
11778
11793
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
11779
|
-
var
|
|
11794
|
+
var import_type_guards46 = require("@wistia/type-guards");
|
|
11780
11795
|
var import_styled_components83 = __toESM(require("styled-components"));
|
|
11781
11796
|
|
|
11782
11797
|
// src/components/Tabs/TabPanel.tsx
|
|
@@ -11832,7 +11847,7 @@ TabList.displayName = "TabList";
|
|
|
11832
11847
|
var import_react60 = require("react");
|
|
11833
11848
|
var import_styled_components81 = __toESM(require("styled-components"));
|
|
11834
11849
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
11835
|
-
var
|
|
11850
|
+
var import_type_guards45 = require("@wistia/type-guards");
|
|
11836
11851
|
|
|
11837
11852
|
// src/components/Tabs/useTabsValue.tsx
|
|
11838
11853
|
var import_react59 = require("react");
|
|
@@ -11890,8 +11905,8 @@ var TabItem = (0, import_react60.forwardRef)(
|
|
|
11890
11905
|
StyledTabItem,
|
|
11891
11906
|
{
|
|
11892
11907
|
ref: combinedRef,
|
|
11893
|
-
$hasLabel: (0,
|
|
11894
|
-
"aria-label": (0,
|
|
11908
|
+
$hasLabel: (0, import_type_guards45.isNotNil)(label),
|
|
11909
|
+
"aria-label": (0, import_type_guards45.isNotNil)(label) ? void 0 : ariaLabel,
|
|
11895
11910
|
disabled,
|
|
11896
11911
|
value,
|
|
11897
11912
|
children: [
|
|
@@ -12021,7 +12036,7 @@ var Tabs = (0, import_react63.forwardRef)(
|
|
|
12021
12036
|
label,
|
|
12022
12037
|
"aria-label": ariaLabelForTab
|
|
12023
12038
|
} = tab.props;
|
|
12024
|
-
if ((0,
|
|
12039
|
+
if ((0, import_type_guards46.isNil)(icon)) {
|
|
12025
12040
|
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
12026
12041
|
TabItem,
|
|
12027
12042
|
{
|
|
@@ -12032,7 +12047,7 @@ var Tabs = (0, import_react63.forwardRef)(
|
|
|
12032
12047
|
value
|
|
12033
12048
|
);
|
|
12034
12049
|
}
|
|
12035
|
-
if ((0,
|
|
12050
|
+
if ((0, import_type_guards46.isNotNil)(label)) {
|
|
12036
12051
|
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
12037
12052
|
TabItem,
|
|
12038
12053
|
{
|
|
@@ -12044,7 +12059,7 @@ var Tabs = (0, import_react63.forwardRef)(
|
|
|
12044
12059
|
value
|
|
12045
12060
|
);
|
|
12046
12061
|
}
|
|
12047
|
-
if ((0,
|
|
12062
|
+
if ((0, import_type_guards46.isNotNil)(ariaLabelForTab)) {
|
|
12048
12063
|
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
12049
12064
|
TabItem,
|
|
12050
12065
|
{
|
|
@@ -12087,7 +12102,7 @@ Tab.displayName = "Tab";
|
|
|
12087
12102
|
// src/components/Tag/Tag.tsx
|
|
12088
12103
|
var import_react65 = require("react");
|
|
12089
12104
|
var import_styled_components84 = __toESM(require("styled-components"));
|
|
12090
|
-
var
|
|
12105
|
+
var import_type_guards47 = require("@wistia/type-guards");
|
|
12091
12106
|
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
12092
12107
|
var TagLabel = import_styled_components84.default.a`
|
|
12093
12108
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
@@ -12172,10 +12187,10 @@ var StyledTag = import_styled_components84.default.div`
|
|
|
12172
12187
|
}
|
|
12173
12188
|
`;
|
|
12174
12189
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
12175
|
-
if ((0,
|
|
12190
|
+
if ((0, import_type_guards47.isNil)(onClickRemove)) {
|
|
12176
12191
|
return null;
|
|
12177
12192
|
}
|
|
12178
|
-
if ((0,
|
|
12193
|
+
if ((0, import_type_guards47.isNil)(onClickRemoveLabel)) {
|
|
12179
12194
|
throw new Error(
|
|
12180
12195
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
12181
12196
|
);
|
|
@@ -12212,8 +12227,8 @@ var Tag = (0, import_react65.forwardRef)(
|
|
|
12212
12227
|
onClickRemoveLabel,
|
|
12213
12228
|
...otherProps
|
|
12214
12229
|
}, ref) => {
|
|
12215
|
-
const hasIcon = (0,
|
|
12216
|
-
const labelProps = (0,
|
|
12230
|
+
const hasIcon = (0, import_type_guards47.isNotNil)(icon);
|
|
12231
|
+
const labelProps = (0, import_type_guards47.isNotNil)(href) && (0, import_type_guards47.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
12217
12232
|
return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
12218
12233
|
StyledTag,
|
|
12219
12234
|
{
|
|
@@ -12249,7 +12264,7 @@ Tag.displayName = "Tag";
|
|
|
12249
12264
|
|
|
12250
12265
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
12251
12266
|
var import_styled_components85 = __toESM(require("styled-components"));
|
|
12252
|
-
var
|
|
12267
|
+
var import_type_guards48 = require("@wistia/type-guards");
|
|
12253
12268
|
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
12254
12269
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
12255
12270
|
if (iconOnly) {
|
|
@@ -12362,7 +12377,7 @@ var WistiaLogo = ({
|
|
|
12362
12377
|
...otherProps,
|
|
12363
12378
|
children: [
|
|
12364
12379
|
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)("title", { children: title }),
|
|
12365
|
-
(0,
|
|
12380
|
+
(0, import_type_guards48.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("desc", { children: description }) : null,
|
|
12366
12381
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
12367
12382
|
renderLogotype(logotypeColor, iconOnly)
|
|
12368
12383
|
]
|
|
@@ -12371,6 +12386,257 @@ var WistiaLogo = ({
|
|
|
12371
12386
|
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("a", { href, children: Logo }) : Logo;
|
|
12372
12387
|
};
|
|
12373
12388
|
WistiaLogo.displayName = "WistiaLogo";
|
|
12389
|
+
|
|
12390
|
+
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
12391
|
+
var import_styled_components86 = __toESM(require("styled-components"));
|
|
12392
|
+
var import_type_guards49 = require("@wistia/type-guards");
|
|
12393
|
+
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
12394
|
+
var StyledThumbnailBadge = import_styled_components86.default.div`
|
|
12395
|
+
align-items: center;
|
|
12396
|
+
background-color: rgb(0 0 0 / 50%);
|
|
12397
|
+
border-radius: var(--wui-border-radius-01);
|
|
12398
|
+
bottom: var(--wui-space-01);
|
|
12399
|
+
color: var(--wui-color-text-on-fill);
|
|
12400
|
+
display: flex;
|
|
12401
|
+
font-size: var(--wui-typography-body-4-size);
|
|
12402
|
+
font-weight: var(--wui-typography-weight-body-bold);
|
|
12403
|
+
gap: var(--wui-space-01);
|
|
12404
|
+
padding: 0 var(--wui-space-01);
|
|
12405
|
+
position: absolute;
|
|
12406
|
+
right: var(--wui-space-01);
|
|
12407
|
+
z-index: 1;
|
|
12408
|
+
|
|
12409
|
+
svg {
|
|
12410
|
+
height: 12px;
|
|
12411
|
+
width: 12px;
|
|
12412
|
+
|
|
12413
|
+
path {
|
|
12414
|
+
color: var(--wui-color-icon-on-fill);
|
|
12415
|
+
}
|
|
12416
|
+
}
|
|
12417
|
+
`;
|
|
12418
|
+
var ThumbnailBadge = ({
|
|
12419
|
+
icon,
|
|
12420
|
+
label,
|
|
12421
|
+
...otherProps
|
|
12422
|
+
}) => {
|
|
12423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(StyledThumbnailBadge, { ...otherProps, children: [
|
|
12424
|
+
(0, import_type_guards49.isNotNil)(icon) && icon,
|
|
12425
|
+
/* @__PURE__ */ (0, import_jsx_runtime269.jsx)("span", { children: label })
|
|
12426
|
+
] });
|
|
12427
|
+
};
|
|
12428
|
+
ThumbnailBadge.displayName = "ThumbnailBadge";
|
|
12429
|
+
|
|
12430
|
+
// src/components/Thumbnail/Thumbnail.tsx
|
|
12431
|
+
var import_react66 = require("react");
|
|
12432
|
+
var import_styled_components88 = __toESM(require("styled-components"));
|
|
12433
|
+
var import_type_guards51 = require("@wistia/type-guards");
|
|
12434
|
+
|
|
12435
|
+
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
12436
|
+
var import_type_guards50 = require("@wistia/type-guards");
|
|
12437
|
+
var import_styled_components87 = require("styled-components");
|
|
12438
|
+
var gradients = {
|
|
12439
|
+
defaultDarkOne: import_styled_components87.css`
|
|
12440
|
+
background-color: #222d66;
|
|
12441
|
+
background-image:
|
|
12442
|
+
radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
|
|
12443
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12444
|
+
radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
|
|
12445
|
+
radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
|
|
12446
|
+
`,
|
|
12447
|
+
defaultDarkTwo: import_styled_components87.css`
|
|
12448
|
+
background-color: #222d66;
|
|
12449
|
+
background-image:
|
|
12450
|
+
radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
|
|
12451
|
+
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%),
|
|
12452
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12453
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12454
|
+
`,
|
|
12455
|
+
defaultLightOne: import_styled_components87.css`
|
|
12456
|
+
background-color: #ccd5ff;
|
|
12457
|
+
background-image:
|
|
12458
|
+
radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
|
|
12459
|
+
radial-gradient(farthest-corner at top left, #ccd5ff, transparent 65%),
|
|
12460
|
+
radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
|
|
12461
|
+
radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
|
|
12462
|
+
`,
|
|
12463
|
+
defaultLightTwo: import_styled_components87.css`
|
|
12464
|
+
background-color: #ccd5ff;
|
|
12465
|
+
background-image:
|
|
12466
|
+
radial-gradient(ellipse at top, #ccd5ff, transparent),
|
|
12467
|
+
radial-gradient(ellipse at bottom, #6b84ff, transparent);
|
|
12468
|
+
`,
|
|
12469
|
+
defaultMidOne: import_styled_components87.css`
|
|
12470
|
+
background-color: #6b84ff;
|
|
12471
|
+
background-image:
|
|
12472
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
|
|
12473
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12474
|
+
radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
|
|
12475
|
+
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
|
|
12476
|
+
`,
|
|
12477
|
+
defaultMidTwo: import_styled_components87.css`
|
|
12478
|
+
background-color: #6b84ff;
|
|
12479
|
+
background-image:
|
|
12480
|
+
radial-gradient(ellipse at top, #2949e5, transparent),
|
|
12481
|
+
radial-gradient(ellipse at bottom, #ccd5ff, transparent);
|
|
12482
|
+
`,
|
|
12483
|
+
green: import_styled_components87.css`
|
|
12484
|
+
background-color: #fafffa;
|
|
12485
|
+
background-image:
|
|
12486
|
+
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
12487
|
+
radial-gradient(farthest-corner at top right, #268713, transparent 50%),
|
|
12488
|
+
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12489
|
+
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12490
|
+
`,
|
|
12491
|
+
greenWithPop: import_styled_components87.css`
|
|
12492
|
+
background-color: #fafffa;
|
|
12493
|
+
background-image:
|
|
12494
|
+
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
12495
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 50%),
|
|
12496
|
+
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12497
|
+
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12498
|
+
`,
|
|
12499
|
+
pink: import_styled_components87.css`
|
|
12500
|
+
background-color: #fffff0;
|
|
12501
|
+
background-image:
|
|
12502
|
+
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
|
|
12503
|
+
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
12504
|
+
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
12505
|
+
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
|
|
12506
|
+
`,
|
|
12507
|
+
pinkWithPop: import_styled_components87.css`
|
|
12508
|
+
background-color: #fffff0;
|
|
12509
|
+
background-image:
|
|
12510
|
+
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
12511
|
+
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
12512
|
+
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
|
|
12513
|
+
radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
|
|
12514
|
+
`,
|
|
12515
|
+
playfulGradientOne: import_styled_components87.css`
|
|
12516
|
+
background-color: #f7f8ff;
|
|
12517
|
+
background-image:
|
|
12518
|
+
radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
|
|
12519
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12520
|
+
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
|
|
12521
|
+
radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
|
|
12522
|
+
`,
|
|
12523
|
+
playfulGradientTwo: import_styled_components87.css`
|
|
12524
|
+
background-color: #f7f8ff;
|
|
12525
|
+
background-image:
|
|
12526
|
+
radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
|
|
12527
|
+
radial-gradient(farthest-corner at bottom right, #eff18d, transparent 50%),
|
|
12528
|
+
radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
|
|
12529
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12530
|
+
`,
|
|
12531
|
+
purple: import_styled_components87.css`
|
|
12532
|
+
background-color: #f2caff;
|
|
12533
|
+
background-image:
|
|
12534
|
+
radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
|
|
12535
|
+
radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
|
|
12536
|
+
`,
|
|
12537
|
+
purpleWithPop: import_styled_components87.css`
|
|
12538
|
+
background-color: #f2caff;
|
|
12539
|
+
background-image:
|
|
12540
|
+
radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
|
|
12541
|
+
radial-gradient(farthest-corner at top left, #d65cff, transparent 65%),
|
|
12542
|
+
radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
|
|
12543
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12544
|
+
`,
|
|
12545
|
+
yellow: import_styled_components87.css`
|
|
12546
|
+
background-color: #fffff0;
|
|
12547
|
+
background-image:
|
|
12548
|
+
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
12549
|
+
radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
|
|
12550
|
+
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
12551
|
+
radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
|
|
12552
|
+
`,
|
|
12553
|
+
yellowWithPop: import_styled_components87.css`
|
|
12554
|
+
background-color: #fffff0;
|
|
12555
|
+
background-image:
|
|
12556
|
+
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
12557
|
+
radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
|
|
12558
|
+
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
12559
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 55%);
|
|
12560
|
+
`
|
|
12561
|
+
};
|
|
12562
|
+
var gradientMap = Object.keys(gradients);
|
|
12563
|
+
var getBackgroundGradient = (gradientName = void 0) => {
|
|
12564
|
+
return (0, import_type_guards50.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
12565
|
+
};
|
|
12566
|
+
|
|
12567
|
+
// src/components/Thumbnail/Thumbnail.tsx
|
|
12568
|
+
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
12569
|
+
var WideThumbnailImage = import_styled_components88.default.img`
|
|
12570
|
+
height: 100%;
|
|
12571
|
+
object-fit: cover;
|
|
12572
|
+
width: 100%;
|
|
12573
|
+
`;
|
|
12574
|
+
var SquareThumbnailImage = import_styled_components88.default.img`
|
|
12575
|
+
backdrop-filter: blur(8px);
|
|
12576
|
+
object-fit: contain;
|
|
12577
|
+
width: 100%;
|
|
12578
|
+
`;
|
|
12579
|
+
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
12580
|
+
if (thumbnailImageType === "wide") {
|
|
12581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
|
|
12582
|
+
WideThumbnailImage,
|
|
12583
|
+
{
|
|
12584
|
+
alt: "",
|
|
12585
|
+
src: thumbnailUrl
|
|
12586
|
+
}
|
|
12587
|
+
);
|
|
12588
|
+
}
|
|
12589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
|
|
12590
|
+
SquareThumbnailImage,
|
|
12591
|
+
{
|
|
12592
|
+
alt: "",
|
|
12593
|
+
src: thumbnailUrl
|
|
12594
|
+
}
|
|
12595
|
+
);
|
|
12596
|
+
};
|
|
12597
|
+
var StyledThumbnail = import_styled_components88.default.div`
|
|
12598
|
+
${({ $gradientBackground }) => getBackgroundGradient($gradientBackground)};
|
|
12599
|
+
aspect-ratio: 16 / 9;
|
|
12600
|
+
background: ${({ $backgroundUrl }) => (0, import_type_guards51.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}') center / cover` : void 0};
|
|
12601
|
+
border-radius: 4px;
|
|
12602
|
+
display: flex;
|
|
12603
|
+
overflow: hidden;
|
|
12604
|
+
position: relative;
|
|
12605
|
+
width: ${({ $width }) => $width};
|
|
12606
|
+
`;
|
|
12607
|
+
var Thumbnail = (0, import_react66.forwardRef)(
|
|
12608
|
+
({
|
|
12609
|
+
gradientBackground = "defaultMidOne",
|
|
12610
|
+
thumbnailImageType = "square",
|
|
12611
|
+
thumbnailUrl,
|
|
12612
|
+
width = "100%",
|
|
12613
|
+
children,
|
|
12614
|
+
...otherProps
|
|
12615
|
+
}, ref) => {
|
|
12616
|
+
const backgroundUrl = thumbnailImageType === "square" && (0, import_type_guards51.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0;
|
|
12617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(
|
|
12618
|
+
StyledThumbnail,
|
|
12619
|
+
{
|
|
12620
|
+
ref,
|
|
12621
|
+
$backgroundUrl: backgroundUrl,
|
|
12622
|
+
$gradientBackground: gradientBackground,
|
|
12623
|
+
$width: width,
|
|
12624
|
+
...otherProps,
|
|
12625
|
+
children: [
|
|
12626
|
+
(0, import_type_guards51.isNotNil)(children) && children,
|
|
12627
|
+
(0, import_type_guards51.isNotNil)(thumbnailUrl) && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
|
|
12628
|
+
ThumbnailImage,
|
|
12629
|
+
{
|
|
12630
|
+
thumbnailImageType,
|
|
12631
|
+
thumbnailUrl
|
|
12632
|
+
}
|
|
12633
|
+
)
|
|
12634
|
+
]
|
|
12635
|
+
}
|
|
12636
|
+
);
|
|
12637
|
+
}
|
|
12638
|
+
);
|
|
12639
|
+
Thumbnail.displayName = "Thumbnail";
|
|
12374
12640
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12375
12641
|
0 && (module.exports = {
|
|
12376
12642
|
ActionButton,
|
|
@@ -12444,6 +12710,8 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
12444
12710
|
Tabs,
|
|
12445
12711
|
Tag,
|
|
12446
12712
|
Text,
|
|
12713
|
+
Thumbnail,
|
|
12714
|
+
ThumbnailBadge,
|
|
12447
12715
|
Tooltip,
|
|
12448
12716
|
UIProvider,
|
|
12449
12717
|
WistiaLogo,
|