@wistia/ui 0.18.4 → 0.18.5-beta.9ab561d6.6f99781
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 +38 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +46 -6
- 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.5-beta.9ab561d6.6f99781
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -18155,6 +18155,11 @@ var StyledThumbnailContainer = import_styled_components127.styled.div`
|
|
|
18155
18155
|
`;
|
|
18156
18156
|
var StyledThumbnail = import_styled_components127.styled.div`
|
|
18157
18157
|
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
18158
|
+
--wui-thumbnail-border-radius: clamp(
|
|
18159
|
+
var(--wui-border-radius-01),
|
|
18160
|
+
calc(8cqh - var(--wui-thumbnail-collage-padding, 0px)),
|
|
18161
|
+
var(--wui-border-radius-05)
|
|
18162
|
+
);
|
|
18158
18163
|
|
|
18159
18164
|
background-image: ${({ $backgroundUrl }) => (0, import_type_guards74.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
18160
18165
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
@@ -18167,7 +18172,22 @@ var StyledThumbnail = import_styled_components127.styled.div`
|
|
|
18167
18172
|
width: 100%;
|
|
18168
18173
|
overflow: hidden;
|
|
18169
18174
|
position: relative;
|
|
18170
|
-
border-radius:
|
|
18175
|
+
border-radius: var(--wui-thumbnail-border-radius);
|
|
18176
|
+
box-shadow: inset 0 0 0 1px var(--wui-thumbnail-collage-border-color);
|
|
18177
|
+
|
|
18178
|
+
&,
|
|
18179
|
+
img,
|
|
18180
|
+
&::after {
|
|
18181
|
+
border-radius: var(--wui-thumbnail-border-radius);
|
|
18182
|
+
}
|
|
18183
|
+
|
|
18184
|
+
&::after {
|
|
18185
|
+
content: '';
|
|
18186
|
+
position: absolute;
|
|
18187
|
+
inset: 0;
|
|
18188
|
+
box-shadow: inset 0 0 0 1px var(--wui-thumbnail-collage-border-color);
|
|
18189
|
+
border-radius: var(--wui-thumbnail-border-radius);
|
|
18190
|
+
}
|
|
18171
18191
|
|
|
18172
18192
|
@container (min-width: 200px) {
|
|
18173
18193
|
--wui-thumbnail-badge-offset: var(--wui-space-02);
|
|
@@ -18209,6 +18229,9 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
18209
18229
|
left: relativeLeft
|
|
18210
18230
|
};
|
|
18211
18231
|
};
|
|
18232
|
+
var hasValidThumbnailUrl = (thumbnailUrl) => {
|
|
18233
|
+
return (0, import_type_guards74.isNotNil)(thumbnailUrl) && (0, import_type_guards74.isNonEmptyString)(thumbnailUrl);
|
|
18234
|
+
};
|
|
18212
18235
|
var Thumbnail = (0, import_react100.forwardRef)(
|
|
18213
18236
|
({
|
|
18214
18237
|
gradientBackground = "defaultMidOne",
|
|
@@ -18227,7 +18250,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18227
18250
|
const storyboardElementRef = (0, import_react100.useRef)(null);
|
|
18228
18251
|
const [cursorPosition, setCursorPosition] = (0, import_react100.useState)(null);
|
|
18229
18252
|
const backgroundUrl = (0, import_react100.useMemo)(
|
|
18230
|
-
() => thumbnailImageType === "square" && (
|
|
18253
|
+
() => thumbnailImageType === "square" && hasValidThumbnailUrl(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
18231
18254
|
[thumbnailImageType, thumbnailUrl]
|
|
18232
18255
|
);
|
|
18233
18256
|
const isScrubbable = (0, import_type_guards74.isNotNil)(storyboard);
|
|
@@ -18278,7 +18301,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18278
18301
|
width
|
|
18279
18302
|
}
|
|
18280
18303
|
);
|
|
18281
|
-
} else if ((
|
|
18304
|
+
} else if (hasValidThumbnailUrl(thumbnailUrl)) {
|
|
18282
18305
|
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18283
18306
|
ThumbnailImage,
|
|
18284
18307
|
{
|
|
@@ -18335,11 +18358,17 @@ var ThumbnailCollageContainer = import_styled_components128.styled.div`
|
|
|
18335
18358
|
display: flex;
|
|
18336
18359
|
`;
|
|
18337
18360
|
var StyledThumbnailCollage = import_styled_components128.styled.div`
|
|
18361
|
+
--wui-thumbnail-collage-border-color: rgba(0, 0, 0, 0.05);
|
|
18362
|
+
--wui-thumbnail-collage-padding: var(--wui-space-01);
|
|
18363
|
+
padding: var(--wui-thumbnail-collage-padding);
|
|
18364
|
+
background-color: var(--wui-color-bg-surface-tertiary);
|
|
18365
|
+
border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
|
|
18338
18366
|
display: grid;
|
|
18339
|
-
gap: var(--wui-
|
|
18367
|
+
gap: var(--wui-thumbnail-collage-padding);
|
|
18340
18368
|
width: 100%;
|
|
18341
18369
|
grid-template-columns: 3fr 2fr;
|
|
18342
18370
|
grid-template-rows: 1fr 1fr;
|
|
18371
|
+
border: 1px solid var(--wui-thumbnail-collage-border-color);
|
|
18343
18372
|
|
|
18344
18373
|
&:has(:nth-child(1)) {
|
|
18345
18374
|
grid-template-areas:
|
|
@@ -18377,6 +18406,10 @@ var StyledThumbnailCollage = import_styled_components128.styled.div`
|
|
|
18377
18406
|
height: 100%;
|
|
18378
18407
|
width: 100%;
|
|
18379
18408
|
}
|
|
18409
|
+
|
|
18410
|
+
@container (min-width: 200px) {
|
|
18411
|
+
--wui-thumbnail-collage-padding: var(--wui-space-02);
|
|
18412
|
+
}
|
|
18380
18413
|
`;
|
|
18381
18414
|
var ThumbnailCollage = ({
|
|
18382
18415
|
children = [],
|