@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.mjs
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
|
*
|
|
@@ -17588,7 +17588,7 @@ var StyledThumbnailBadge = styled104.div`
|
|
|
17588
17588
|
align-items: center;
|
|
17589
17589
|
background-color: rgb(0 0 0 / 50%);
|
|
17590
17590
|
border-radius: var(--wui-border-radius-01);
|
|
17591
|
-
bottom: var(--wui-
|
|
17591
|
+
bottom: var(--wui-thumbnail-badge-offset);
|
|
17592
17592
|
color: var(--wui-color-text-on-fill);
|
|
17593
17593
|
display: flex;
|
|
17594
17594
|
font-size: var(--wui-typography-body-4-size);
|
|
@@ -17596,7 +17596,7 @@ var StyledThumbnailBadge = styled104.div`
|
|
|
17596
17596
|
gap: var(--wui-space-01);
|
|
17597
17597
|
padding: 0 var(--wui-space-01);
|
|
17598
17598
|
position: absolute;
|
|
17599
|
-
right: var(--wui-
|
|
17599
|
+
right: var(--wui-thumbnail-badge-offset);
|
|
17600
17600
|
z-index: 1;
|
|
17601
17601
|
|
|
17602
17602
|
svg {
|
|
@@ -17929,7 +17929,17 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
17929
17929
|
}
|
|
17930
17930
|
);
|
|
17931
17931
|
};
|
|
17932
|
+
var StyledThumbnailContainer = styled106.div`
|
|
17933
|
+
container-type: size;
|
|
17934
|
+
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
17935
|
+
width: ${({ $width }) => $width};
|
|
17936
|
+
display: flex;
|
|
17937
|
+
overflow: hidden;
|
|
17938
|
+
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
17939
|
+
`;
|
|
17932
17940
|
var StyledThumbnail = styled106.div`
|
|
17941
|
+
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
17942
|
+
|
|
17933
17943
|
background-image: ${({ $backgroundUrl }) => isNotNil43($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
17934
17944
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
17935
17945
|
// if we don't have $backgroundUrl show a gradient
|
|
@@ -17937,21 +17947,14 @@ var StyledThumbnail = styled106.div`
|
|
|
17937
17947
|
)};
|
|
17938
17948
|
background-position: center center;
|
|
17939
17949
|
background-size: cover;
|
|
17940
|
-
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
17941
17950
|
display: flex;
|
|
17951
|
+
width: 100%;
|
|
17942
17952
|
overflow: hidden;
|
|
17943
17953
|
position: relative;
|
|
17944
|
-
|
|
17945
|
-
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
17954
|
+
border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
|
|
17946
17955
|
|
|
17947
|
-
|
|
17948
|
-
|
|
17949
|
-
border-radius: ${({ $aspectRatio }) => {
|
|
17950
|
-
if ($aspectRatio === "square") {
|
|
17951
|
-
return "8%";
|
|
17952
|
-
}
|
|
17953
|
-
return `calc(8% * (9 / 16)) / 8%`;
|
|
17954
|
-
}};
|
|
17956
|
+
@container (min-width: 200px) {
|
|
17957
|
+
--wui-thumbnail-badge-offset: var(--wui-space-02);
|
|
17955
17958
|
}
|
|
17956
17959
|
`;
|
|
17957
17960
|
var StoryboardRenderer = ({
|
|
@@ -18070,24 +18073,31 @@ var Thumbnail = forwardRef37(
|
|
|
18070
18073
|
} else {
|
|
18071
18074
|
thumbnailContent = null;
|
|
18072
18075
|
}
|
|
18073
|
-
return /* @__PURE__ */
|
|
18074
|
-
|
|
18076
|
+
return /* @__PURE__ */ jsx325(
|
|
18077
|
+
StyledThumbnailContainer,
|
|
18075
18078
|
{
|
|
18076
18079
|
ref,
|
|
18077
|
-
...props,
|
|
18078
18080
|
$aspectRatio: aspectRatio,
|
|
18079
|
-
$backgroundUrl: backgroundUrl,
|
|
18080
|
-
$gradientBackground: gradientBackground,
|
|
18081
18081
|
$isScrubbable: isScrubbable,
|
|
18082
18082
|
$width: width,
|
|
18083
|
+
"data-wui-thumbnail-container": true,
|
|
18083
18084
|
onBlur: handleMouseOut,
|
|
18084
18085
|
onMouseMove: handleMouseMove,
|
|
18085
18086
|
onMouseOut: handleMouseOut,
|
|
18086
18087
|
role: "presentation",
|
|
18087
|
-
|
|
18088
|
-
|
|
18089
|
-
|
|
18090
|
-
|
|
18088
|
+
...props,
|
|
18089
|
+
children: /* @__PURE__ */ jsxs69(
|
|
18090
|
+
StyledThumbnail,
|
|
18091
|
+
{
|
|
18092
|
+
$backgroundUrl: backgroundUrl,
|
|
18093
|
+
$gradientBackground: gradientBackground,
|
|
18094
|
+
"data-testid": "thumbnail-inner",
|
|
18095
|
+
children: [
|
|
18096
|
+
isNotNil43(children) ? children : null,
|
|
18097
|
+
thumbnailContent
|
|
18098
|
+
]
|
|
18099
|
+
}
|
|
18100
|
+
)
|
|
18091
18101
|
}
|
|
18092
18102
|
);
|
|
18093
18103
|
}
|
|
@@ -18099,72 +18109,54 @@ import React5 from "react";
|
|
|
18099
18109
|
import { styled as styled107 } from "styled-components";
|
|
18100
18110
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
18101
18111
|
import { jsx as jsx326 } from "react/jsx-runtime";
|
|
18112
|
+
var ThumbnailCollageContainer = styled107.div`
|
|
18113
|
+
container-type: size;
|
|
18114
|
+
width: 100%;
|
|
18115
|
+
aspect-ratio: 16 / 9;
|
|
18116
|
+
display: flex;
|
|
18117
|
+
`;
|
|
18102
18118
|
var StyledThumbnailCollage = styled107.div`
|
|
18103
18119
|
display: grid;
|
|
18104
18120
|
gap: var(--wui-space-01);
|
|
18105
18121
|
width: 100%;
|
|
18106
18122
|
grid-template-columns: 3fr 2fr;
|
|
18107
18123
|
grid-template-rows: 1fr 1fr;
|
|
18108
|
-
aspect-ratio: 16 / 9;
|
|
18109
18124
|
|
|
18110
18125
|
&:has(:nth-child(1)) {
|
|
18111
|
-
--wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
|
|
18112
|
-
|
|
18113
18126
|
grid-template-areas:
|
|
18114
18127
|
'a a'
|
|
18115
18128
|
'a a';
|
|
18116
18129
|
}
|
|
18117
18130
|
|
|
18118
18131
|
&:has(:nth-child(2)) {
|
|
18119
|
-
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
18120
|
-
--wui-collage-thumbnail-second-border-radius: 11.5% / 8%;
|
|
18121
|
-
|
|
18122
18132
|
grid-template-areas:
|
|
18123
18133
|
'a b'
|
|
18124
18134
|
'a b';
|
|
18125
18135
|
}
|
|
18126
18136
|
|
|
18127
18137
|
&:has(:nth-child(3)) {
|
|
18128
|
-
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
18129
|
-
--wui-collage-thumbnail-second-border-radius: 11.5% / 16%;
|
|
18130
|
-
--wui-collage-thumbnail-third-border-radius: 11.5% / 16%;
|
|
18131
|
-
|
|
18132
18138
|
grid-template-areas:
|
|
18133
18139
|
'a b'
|
|
18134
18140
|
'a c';
|
|
18135
18141
|
}
|
|
18136
18142
|
|
|
18137
18143
|
> :nth-child(1) {
|
|
18138
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
|
|
18139
|
-
|
|
18140
18144
|
grid-area: a;
|
|
18141
18145
|
}
|
|
18142
18146
|
|
|
18143
18147
|
> :nth-child(2) {
|
|
18144
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
|
|
18145
|
-
|
|
18146
18148
|
grid-area: b;
|
|
18147
18149
|
}
|
|
18148
18150
|
|
|
18149
18151
|
> :nth-child(3) {
|
|
18150
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
|
|
18151
|
-
|
|
18152
18152
|
grid-area: c;
|
|
18153
18153
|
}
|
|
18154
18154
|
|
|
18155
|
-
|
|
18155
|
+
[data-thumbnail-container] {
|
|
18156
|
+
container-type: unset;
|
|
18156
18157
|
aspect-ratio: unset;
|
|
18157
18158
|
height: 100%;
|
|
18158
18159
|
width: 100%;
|
|
18159
|
-
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
18160
|
-
|
|
18161
|
-
img {
|
|
18162
|
-
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
18163
|
-
}
|
|
18164
|
-
|
|
18165
|
-
> :not(img) {
|
|
18166
|
-
display: none;
|
|
18167
|
-
}
|
|
18168
18160
|
}
|
|
18169
18161
|
`;
|
|
18170
18162
|
var ThumbnailCollage = ({
|
|
@@ -18190,7 +18182,7 @@ var ThumbnailCollage = ({
|
|
|
18190
18182
|
"fallback"
|
|
18191
18183
|
)
|
|
18192
18184
|
];
|
|
18193
|
-
return /* @__PURE__ */ jsx326(
|
|
18185
|
+
return /* @__PURE__ */ jsx326(ThumbnailCollageContainer, { children: /* @__PURE__ */ jsx326(
|
|
18194
18186
|
StyledThumbnailCollage,
|
|
18195
18187
|
{
|
|
18196
18188
|
$gradientBackground: gradientBackground,
|
|
@@ -18198,7 +18190,7 @@ var ThumbnailCollage = ({
|
|
|
18198
18190
|
...props,
|
|
18199
18191
|
children: thumbnails
|
|
18200
18192
|
}
|
|
18201
|
-
);
|
|
18193
|
+
) });
|
|
18202
18194
|
};
|
|
18203
18195
|
|
|
18204
18196
|
// src/components/WistiaLogo/WistiaLogo.tsx
|