@wistia/ui 0.18.1-beta.341b7714.c1c1bd7 → 0.18.2-beta.055fa0b4.dbaa6cc
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 +43 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +43 -51
- 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.18.
|
|
3
|
+
* @license @wistia/ui v0.18.2-beta.055fa0b4.dbaa6cc
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -17724,7 +17724,7 @@ var StyledThumbnailBadge = import_styled_components123.styled.div`
|
|
|
17724
17724
|
align-items: center;
|
|
17725
17725
|
background-color: rgb(0 0 0 / 50%);
|
|
17726
17726
|
border-radius: var(--wui-border-radius-01);
|
|
17727
|
-
bottom: var(--wui-
|
|
17727
|
+
bottom: var(--wui-thumbnail-badge-offset);
|
|
17728
17728
|
color: var(--wui-color-text-on-fill);
|
|
17729
17729
|
display: flex;
|
|
17730
17730
|
font-size: var(--wui-typography-body-4-size);
|
|
@@ -17732,7 +17732,7 @@ var StyledThumbnailBadge = import_styled_components123.styled.div`
|
|
|
17732
17732
|
gap: var(--wui-space-01);
|
|
17733
17733
|
padding: 0 var(--wui-space-01);
|
|
17734
17734
|
position: absolute;
|
|
17735
|
-
right: var(--wui-
|
|
17735
|
+
right: var(--wui-thumbnail-badge-offset);
|
|
17736
17736
|
z-index: 1;
|
|
17737
17737
|
|
|
17738
17738
|
svg {
|
|
@@ -18065,7 +18065,17 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
18065
18065
|
}
|
|
18066
18066
|
);
|
|
18067
18067
|
};
|
|
18068
|
+
var StyledThumbnailContainer = import_styled_components126.styled.div`
|
|
18069
|
+
container-type: size;
|
|
18070
|
+
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
18071
|
+
width: ${({ $width }) => $width};
|
|
18072
|
+
display: flex;
|
|
18073
|
+
overflow: hidden;
|
|
18074
|
+
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
18075
|
+
`;
|
|
18068
18076
|
var StyledThumbnail = import_styled_components126.styled.div`
|
|
18077
|
+
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
18078
|
+
|
|
18069
18079
|
background-image: ${({ $backgroundUrl }) => (0, import_type_guards74.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
18070
18080
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
18071
18081
|
// if we don't have $backgroundUrl show a gradient
|
|
@@ -18073,21 +18083,14 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18073
18083
|
)};
|
|
18074
18084
|
background-position: center center;
|
|
18075
18085
|
background-size: cover;
|
|
18076
|
-
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
18077
18086
|
display: flex;
|
|
18087
|
+
width: 100%;
|
|
18078
18088
|
overflow: hidden;
|
|
18079
18089
|
position: relative;
|
|
18080
|
-
|
|
18081
|
-
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
18090
|
+
border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
|
|
18082
18091
|
|
|
18083
|
-
|
|
18084
|
-
|
|
18085
|
-
border-radius: ${({ $aspectRatio }) => {
|
|
18086
|
-
if ($aspectRatio === "square") {
|
|
18087
|
-
return "8%";
|
|
18088
|
-
}
|
|
18089
|
-
return `calc(8% * (9 / 16)) / 8%`;
|
|
18090
|
-
}};
|
|
18092
|
+
@container (min-width: 200px) {
|
|
18093
|
+
--wui-thumbnail-badge-offset: var(--wui-space-02);
|
|
18091
18094
|
}
|
|
18092
18095
|
`;
|
|
18093
18096
|
var StoryboardRenderer = ({
|
|
@@ -18206,24 +18209,31 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18206
18209
|
} else {
|
|
18207
18210
|
thumbnailContent = null;
|
|
18208
18211
|
}
|
|
18209
|
-
return /* @__PURE__ */ (0, import_jsx_runtime327.
|
|
18210
|
-
|
|
18212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18213
|
+
StyledThumbnailContainer,
|
|
18211
18214
|
{
|
|
18212
18215
|
ref,
|
|
18213
|
-
...props,
|
|
18214
18216
|
$aspectRatio: aspectRatio,
|
|
18215
|
-
$backgroundUrl: backgroundUrl,
|
|
18216
|
-
$gradientBackground: gradientBackground,
|
|
18217
18217
|
$isScrubbable: isScrubbable,
|
|
18218
18218
|
$width: width,
|
|
18219
|
+
"data-wui-thumbnail-container": true,
|
|
18219
18220
|
onBlur: handleMouseOut,
|
|
18220
18221
|
onMouseMove: handleMouseMove,
|
|
18221
18222
|
onMouseOut: handleMouseOut,
|
|
18222
18223
|
role: "presentation",
|
|
18223
|
-
|
|
18224
|
-
|
|
18225
|
-
|
|
18226
|
-
|
|
18224
|
+
...props,
|
|
18225
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
|
|
18226
|
+
StyledThumbnail,
|
|
18227
|
+
{
|
|
18228
|
+
$backgroundUrl: backgroundUrl,
|
|
18229
|
+
$gradientBackground: gradientBackground,
|
|
18230
|
+
"data-testid": "thumbnail-inner",
|
|
18231
|
+
children: [
|
|
18232
|
+
(0, import_type_guards74.isNotNil)(children) ? children : null,
|
|
18233
|
+
thumbnailContent
|
|
18234
|
+
]
|
|
18235
|
+
}
|
|
18236
|
+
)
|
|
18227
18237
|
}
|
|
18228
18238
|
);
|
|
18229
18239
|
}
|
|
@@ -18238,72 +18248,54 @@ var import_jsx_runtime328 = (
|
|
|
18238
18248
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
18239
18249
|
require("react/jsx-runtime")
|
|
18240
18250
|
);
|
|
18251
|
+
var ThumbnailCollageContainer = import_styled_components127.styled.div`
|
|
18252
|
+
container-type: size;
|
|
18253
|
+
width: 100%;
|
|
18254
|
+
aspect-ratio: 16 / 9;
|
|
18255
|
+
display: flex;
|
|
18256
|
+
`;
|
|
18241
18257
|
var StyledThumbnailCollage = import_styled_components127.styled.div`
|
|
18242
18258
|
display: grid;
|
|
18243
18259
|
gap: var(--wui-space-01);
|
|
18244
18260
|
width: 100%;
|
|
18245
18261
|
grid-template-columns: 3fr 2fr;
|
|
18246
18262
|
grid-template-rows: 1fr 1fr;
|
|
18247
|
-
aspect-ratio: 16 / 9;
|
|
18248
18263
|
|
|
18249
18264
|
&:has(:nth-child(1)) {
|
|
18250
|
-
--wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
|
|
18251
|
-
|
|
18252
18265
|
grid-template-areas:
|
|
18253
18266
|
'a a'
|
|
18254
18267
|
'a a';
|
|
18255
18268
|
}
|
|
18256
18269
|
|
|
18257
18270
|
&:has(:nth-child(2)) {
|
|
18258
|
-
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
18259
|
-
--wui-collage-thumbnail-second-border-radius: 11.5% / 8%;
|
|
18260
|
-
|
|
18261
18271
|
grid-template-areas:
|
|
18262
18272
|
'a b'
|
|
18263
18273
|
'a b';
|
|
18264
18274
|
}
|
|
18265
18275
|
|
|
18266
18276
|
&:has(:nth-child(3)) {
|
|
18267
|
-
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
18268
|
-
--wui-collage-thumbnail-second-border-radius: 11.5% / 16%;
|
|
18269
|
-
--wui-collage-thumbnail-third-border-radius: 11.5% / 16%;
|
|
18270
|
-
|
|
18271
18277
|
grid-template-areas:
|
|
18272
18278
|
'a b'
|
|
18273
18279
|
'a c';
|
|
18274
18280
|
}
|
|
18275
18281
|
|
|
18276
18282
|
> :nth-child(1) {
|
|
18277
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
|
|
18278
|
-
|
|
18279
18283
|
grid-area: a;
|
|
18280
18284
|
}
|
|
18281
18285
|
|
|
18282
18286
|
> :nth-child(2) {
|
|
18283
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
|
|
18284
|
-
|
|
18285
18287
|
grid-area: b;
|
|
18286
18288
|
}
|
|
18287
18289
|
|
|
18288
18290
|
> :nth-child(3) {
|
|
18289
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
|
|
18290
|
-
|
|
18291
18291
|
grid-area: c;
|
|
18292
18292
|
}
|
|
18293
18293
|
|
|
18294
|
-
|
|
18294
|
+
[data-thumbnail-container] {
|
|
18295
|
+
container-type: unset;
|
|
18295
18296
|
aspect-ratio: unset;
|
|
18296
18297
|
height: 100%;
|
|
18297
18298
|
width: 100%;
|
|
18298
|
-
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
18299
|
-
|
|
18300
|
-
img {
|
|
18301
|
-
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
18302
|
-
}
|
|
18303
|
-
|
|
18304
|
-
> :not(img) {
|
|
18305
|
-
display: none;
|
|
18306
|
-
}
|
|
18307
18299
|
}
|
|
18308
18300
|
`;
|
|
18309
18301
|
var ThumbnailCollage = ({
|
|
@@ -18328,7 +18320,7 @@ var ThumbnailCollage = ({
|
|
|
18328
18320
|
"fallback"
|
|
18329
18321
|
)
|
|
18330
18322
|
];
|
|
18331
|
-
return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(ThumbnailCollageContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18332
18324
|
StyledThumbnailCollage,
|
|
18333
18325
|
{
|
|
18334
18326
|
$gradientBackground: gradientBackground,
|
|
@@ -18336,7 +18328,7 @@ var ThumbnailCollage = ({
|
|
|
18336
18328
|
...props,
|
|
18337
18329
|
children: thumbnails
|
|
18338
18330
|
}
|
|
18339
|
-
);
|
|
18331
|
+
) });
|
|
18340
18332
|
};
|
|
18341
18333
|
|
|
18342
18334
|
// src/components/WistiaLogo/WistiaLogo.tsx
|