@wistia/ui 0.6.40-beta.d3a0b63e.a55d26a → 0.6.40
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 +1 -256
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -82
- package/dist/index.d.ts +1 -82
- package/dist/index.mjs +1 -254
- 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.40
|
|
3
|
+
* @license @wistia/ui v0.6.40
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -110,8 +110,6 @@ __export(index_exports, {
|
|
|
110
110
|
Tabs: () => Tabs,
|
|
111
111
|
Tag: () => Tag,
|
|
112
112
|
Text: () => Text,
|
|
113
|
-
Thumbnail: () => Thumbnail,
|
|
114
|
-
ThumbnailOverlay: () => ThumbnailOverlay,
|
|
115
113
|
Tooltip: () => Tooltip,
|
|
116
114
|
UIProvider: () => UIProvider,
|
|
117
115
|
WistiaLogo: () => WistiaLogo,
|
|
@@ -12373,257 +12371,6 @@ var WistiaLogo = ({
|
|
|
12373
12371
|
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("a", { href, children: Logo }) : Logo;
|
|
12374
12372
|
};
|
|
12375
12373
|
WistiaLogo.displayName = "WistiaLogo";
|
|
12376
|
-
|
|
12377
|
-
// src/components/Thumbnail/Thumbnail.tsx
|
|
12378
|
-
var import_react66 = require("react");
|
|
12379
|
-
var import_styled_components87 = __toESM(require("styled-components"));
|
|
12380
|
-
var import_type_guards49 = require("@wistia/type-guards");
|
|
12381
|
-
|
|
12382
|
-
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
12383
|
-
var import_type_guards48 = require("@wistia/type-guards");
|
|
12384
|
-
var import_styled_components86 = require("styled-components");
|
|
12385
|
-
var gradients = {
|
|
12386
|
-
defaultDarkOne: import_styled_components86.css`
|
|
12387
|
-
background-color: #222d66;
|
|
12388
|
-
background-image:
|
|
12389
|
-
radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
|
|
12390
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12391
|
-
radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
|
|
12392
|
-
radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
|
|
12393
|
-
`,
|
|
12394
|
-
defaultDarkTwo: import_styled_components86.css`
|
|
12395
|
-
background-color: #222d66;
|
|
12396
|
-
background-image:
|
|
12397
|
-
radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
|
|
12398
|
-
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%),
|
|
12399
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12400
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12401
|
-
`,
|
|
12402
|
-
defaultLightOne: import_styled_components86.css`
|
|
12403
|
-
background-color: #ccd5ff;
|
|
12404
|
-
background-image:
|
|
12405
|
-
radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
|
|
12406
|
-
radial-gradient(farthest-corner at top left, #ccd5ff, transparent 65%),
|
|
12407
|
-
radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
|
|
12408
|
-
radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
|
|
12409
|
-
`,
|
|
12410
|
-
defaultLightTwo: import_styled_components86.css`
|
|
12411
|
-
background-color: #ccd5ff;
|
|
12412
|
-
background-image:
|
|
12413
|
-
radial-gradient(ellipse at top, #ccd5ff, transparent),
|
|
12414
|
-
radial-gradient(ellipse at bottom, #6b84ff, transparent);
|
|
12415
|
-
`,
|
|
12416
|
-
defaultMidOne: import_styled_components86.css`
|
|
12417
|
-
background-color: #6b84ff;
|
|
12418
|
-
background-image:
|
|
12419
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
|
|
12420
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12421
|
-
radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
|
|
12422
|
-
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
|
|
12423
|
-
`,
|
|
12424
|
-
defaultMidTwo: import_styled_components86.css`
|
|
12425
|
-
background-color: #6b84ff;
|
|
12426
|
-
background-image:
|
|
12427
|
-
radial-gradient(ellipse at top, #2949e5, transparent),
|
|
12428
|
-
radial-gradient(ellipse at bottom, #ccd5ff, transparent);
|
|
12429
|
-
`,
|
|
12430
|
-
green: import_styled_components86.css`
|
|
12431
|
-
background-color: #fafffa;
|
|
12432
|
-
background-image:
|
|
12433
|
-
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
12434
|
-
radial-gradient(farthest-corner at top right, #268713, transparent 50%),
|
|
12435
|
-
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12436
|
-
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12437
|
-
`,
|
|
12438
|
-
greenWithPop: import_styled_components86.css`
|
|
12439
|
-
background-color: #fafffa;
|
|
12440
|
-
background-image:
|
|
12441
|
-
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
12442
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 50%),
|
|
12443
|
-
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
12444
|
-
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
12445
|
-
`,
|
|
12446
|
-
pink: import_styled_components86.css`
|
|
12447
|
-
background-color: #fffff0;
|
|
12448
|
-
background-image:
|
|
12449
|
-
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
|
|
12450
|
-
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
12451
|
-
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
12452
|
-
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
|
|
12453
|
-
`,
|
|
12454
|
-
pinkWithPop: import_styled_components86.css`
|
|
12455
|
-
background-color: #fffff0;
|
|
12456
|
-
background-image:
|
|
12457
|
-
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
12458
|
-
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
12459
|
-
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
|
|
12460
|
-
radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
|
|
12461
|
-
`,
|
|
12462
|
-
playfulGradientOne: import_styled_components86.css`
|
|
12463
|
-
background-color: #f7f8ff;
|
|
12464
|
-
background-image:
|
|
12465
|
-
radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
|
|
12466
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
12467
|
-
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
|
|
12468
|
-
radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
|
|
12469
|
-
`,
|
|
12470
|
-
playfulGradientTwo: import_styled_components86.css`
|
|
12471
|
-
background-color: #f7f8ff;
|
|
12472
|
-
background-image:
|
|
12473
|
-
radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
|
|
12474
|
-
radial-gradient(farthest-corner at bottom right, #eff18d, transparent 50%),
|
|
12475
|
-
radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
|
|
12476
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12477
|
-
`,
|
|
12478
|
-
purple: import_styled_components86.css`
|
|
12479
|
-
background-color: #f2caff;
|
|
12480
|
-
background-image:
|
|
12481
|
-
radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
|
|
12482
|
-
radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
|
|
12483
|
-
`,
|
|
12484
|
-
purpleWithPop: import_styled_components86.css`
|
|
12485
|
-
background-color: #f2caff;
|
|
12486
|
-
background-image:
|
|
12487
|
-
radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
|
|
12488
|
-
radial-gradient(farthest-corner at top left, #d65cff, transparent 65%),
|
|
12489
|
-
radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
|
|
12490
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
12491
|
-
`,
|
|
12492
|
-
yellow: import_styled_components86.css`
|
|
12493
|
-
background-color: #fffff0;
|
|
12494
|
-
background-image:
|
|
12495
|
-
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
12496
|
-
radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
|
|
12497
|
-
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
12498
|
-
radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
|
|
12499
|
-
`,
|
|
12500
|
-
yellowWithPop: import_styled_components86.css`
|
|
12501
|
-
background-color: #fffff0;
|
|
12502
|
-
background-image:
|
|
12503
|
-
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
12504
|
-
radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
|
|
12505
|
-
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
12506
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 55%);
|
|
12507
|
-
`
|
|
12508
|
-
};
|
|
12509
|
-
var gradientMap = Object.keys(gradients);
|
|
12510
|
-
var getBackgroundGradient = (gradientName = void 0) => {
|
|
12511
|
-
return (0, import_type_guards48.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
12512
|
-
};
|
|
12513
|
-
|
|
12514
|
-
// src/components/Thumbnail/Thumbnail.tsx
|
|
12515
|
-
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
12516
|
-
var WideThumbnailImage = import_styled_components87.default.img`
|
|
12517
|
-
height: 100%;
|
|
12518
|
-
object-fit: cover;
|
|
12519
|
-
width: 100%;
|
|
12520
|
-
`;
|
|
12521
|
-
var SquareThumbnailImage = import_styled_components87.default.img`
|
|
12522
|
-
backdrop-filter: blur(8px);
|
|
12523
|
-
object-fit: contain;
|
|
12524
|
-
width: 100%;
|
|
12525
|
-
`;
|
|
12526
|
-
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
12527
|
-
if (thumbnailImageType === "wide") {
|
|
12528
|
-
return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
|
|
12529
|
-
WideThumbnailImage,
|
|
12530
|
-
{
|
|
12531
|
-
alt: "",
|
|
12532
|
-
src: thumbnailUrl
|
|
12533
|
-
}
|
|
12534
|
-
);
|
|
12535
|
-
}
|
|
12536
|
-
return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
|
|
12537
|
-
SquareThumbnailImage,
|
|
12538
|
-
{
|
|
12539
|
-
alt: "",
|
|
12540
|
-
src: thumbnailUrl
|
|
12541
|
-
}
|
|
12542
|
-
);
|
|
12543
|
-
};
|
|
12544
|
-
var StyledThumbnail = import_styled_components87.default.div`
|
|
12545
|
-
${({ $gradientBackground }) => getBackgroundGradient($gradientBackground)};
|
|
12546
|
-
aspect-ratio: 16 / 9;
|
|
12547
|
-
background: ${({ $backgroundUrl }) => (0, import_type_guards49.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}') center / cover` : void 0};
|
|
12548
|
-
border-radius: 4px;
|
|
12549
|
-
display: flex;
|
|
12550
|
-
overflow: hidden;
|
|
12551
|
-
position: relative;
|
|
12552
|
-
width: ${({ $width }) => $width};
|
|
12553
|
-
`;
|
|
12554
|
-
var Thumbnail = (0, import_react66.forwardRef)(
|
|
12555
|
-
({
|
|
12556
|
-
gradientBackground = "defaultMidOne",
|
|
12557
|
-
thumbnailImageType = "square",
|
|
12558
|
-
thumbnailUrl,
|
|
12559
|
-
width = "100%",
|
|
12560
|
-
children,
|
|
12561
|
-
...otherProps
|
|
12562
|
-
}, ref) => {
|
|
12563
|
-
const backgroundUrl = thumbnailImageType === "square" && (0, import_type_guards49.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0;
|
|
12564
|
-
return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
|
|
12565
|
-
StyledThumbnail,
|
|
12566
|
-
{
|
|
12567
|
-
ref,
|
|
12568
|
-
$backgroundUrl: backgroundUrl,
|
|
12569
|
-
$gradientBackground: gradientBackground,
|
|
12570
|
-
$width: width,
|
|
12571
|
-
...otherProps,
|
|
12572
|
-
children: [
|
|
12573
|
-
(0, import_type_guards49.isNotNil)(children) && children,
|
|
12574
|
-
(0, import_type_guards49.isNotNil)(thumbnailUrl) && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
|
|
12575
|
-
ThumbnailImage,
|
|
12576
|
-
{
|
|
12577
|
-
thumbnailImageType,
|
|
12578
|
-
thumbnailUrl
|
|
12579
|
-
}
|
|
12580
|
-
)
|
|
12581
|
-
]
|
|
12582
|
-
}
|
|
12583
|
-
);
|
|
12584
|
-
}
|
|
12585
|
-
);
|
|
12586
|
-
Thumbnail.displayName = "Thumbnail";
|
|
12587
|
-
|
|
12588
|
-
// src/components/Thumbnail/ThumbnailOverlay.tsx
|
|
12589
|
-
var import_styled_components88 = __toESM(require("styled-components"));
|
|
12590
|
-
var import_type_guards50 = require("@wistia/type-guards");
|
|
12591
|
-
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
12592
|
-
var StyledThumbnailOverlay = import_styled_components88.default.div`
|
|
12593
|
-
align-items: center;
|
|
12594
|
-
background-color: rgb(0 0 0 / 50%);
|
|
12595
|
-
border-radius: var(--wui-border-radius-01);
|
|
12596
|
-
bottom: var(--wui-space-01);
|
|
12597
|
-
color: var(--wui-color-text-on-fill);
|
|
12598
|
-
display: flex;
|
|
12599
|
-
font-size: var(--wui-typography-body-4-size);
|
|
12600
|
-
font-weight: var(--wui-typography-weight-body-bold);
|
|
12601
|
-
gap: var(--wui-space-01);
|
|
12602
|
-
padding: 0 var(--wui-space-01);
|
|
12603
|
-
position: absolute;
|
|
12604
|
-
right: var(--wui-space-01);
|
|
12605
|
-
z-index: 1;
|
|
12606
|
-
|
|
12607
|
-
svg {
|
|
12608
|
-
height: 12px;
|
|
12609
|
-
width: 12px;
|
|
12610
|
-
|
|
12611
|
-
path {
|
|
12612
|
-
color: var(--wui-color-icon-on-fill);
|
|
12613
|
-
}
|
|
12614
|
-
}
|
|
12615
|
-
`;
|
|
12616
|
-
var ThumbnailOverlay = ({
|
|
12617
|
-
icon,
|
|
12618
|
-
label,
|
|
12619
|
-
...otherProps
|
|
12620
|
-
}) => {
|
|
12621
|
-
return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(StyledThumbnailOverlay, { ...otherProps, children: [
|
|
12622
|
-
(0, import_type_guards50.isNotNil)(icon) && icon,
|
|
12623
|
-
/* @__PURE__ */ (0, import_jsx_runtime270.jsx)("span", { children: label })
|
|
12624
|
-
] });
|
|
12625
|
-
};
|
|
12626
|
-
ThumbnailOverlay.displayName = "ThumbnailOverlay";
|
|
12627
12374
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12628
12375
|
0 && (module.exports = {
|
|
12629
12376
|
ActionButton,
|
|
@@ -12697,8 +12444,6 @@ ThumbnailOverlay.displayName = "ThumbnailOverlay";
|
|
|
12697
12444
|
Tabs,
|
|
12698
12445
|
Tag,
|
|
12699
12446
|
Text,
|
|
12700
|
-
Thumbnail,
|
|
12701
|
-
ThumbnailOverlay,
|
|
12702
12447
|
Tooltip,
|
|
12703
12448
|
UIProvider,
|
|
12704
12449
|
WistiaLogo,
|