@wistia/ui 0.18.2-beta.4003271.cf839cf → 0.18.2
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 +56 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +56 -50
- 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.2
|
|
3
|
+
* @license @wistia/ui v0.18.2
|
|
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-space-01);
|
|
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-space-01);
|
|
17600
17600
|
z-index: 1;
|
|
17601
17601
|
|
|
17602
17602
|
svg {
|
|
@@ -17929,15 +17929,7 @@ 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
|
-
`;
|
|
17939
17932
|
var StyledThumbnail = styled106.div`
|
|
17940
|
-
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
17941
17933
|
background-image: ${({ $backgroundUrl }) => isNotNil43($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
17942
17934
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
17943
17935
|
// if we don't have $backgroundUrl show a gradient
|
|
@@ -17945,19 +17937,22 @@ var StyledThumbnail = styled106.div`
|
|
|
17945
17937
|
)};
|
|
17946
17938
|
background-position: center center;
|
|
17947
17939
|
background-size: cover;
|
|
17948
|
-
|
|
17940
|
+
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
17949
17941
|
display: flex;
|
|
17950
|
-
width: 100%;
|
|
17951
17942
|
overflow: hidden;
|
|
17952
17943
|
position: relative;
|
|
17953
|
-
|
|
17954
|
-
|
|
17944
|
+
width: ${({ $width }) => $width};
|
|
17945
|
+
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
17955
17946
|
|
|
17956
|
-
|
|
17957
|
-
|
|
17947
|
+
&,
|
|
17948
|
+
img {
|
|
17949
|
+
border-radius: ${({ $aspectRatio }) => {
|
|
17950
|
+
if ($aspectRatio === "square") {
|
|
17951
|
+
return "8%";
|
|
17952
|
+
}
|
|
17953
|
+
return `calc(8% * (9 / 16)) / 8%`;
|
|
17954
|
+
}};
|
|
17958
17955
|
}
|
|
17959
|
-
|
|
17960
|
-
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
17961
17956
|
`;
|
|
17962
17957
|
var StoryboardRenderer = ({
|
|
17963
17958
|
storyboard,
|
|
@@ -18075,30 +18070,24 @@ var Thumbnail = forwardRef37(
|
|
|
18075
18070
|
} else {
|
|
18076
18071
|
thumbnailContent = null;
|
|
18077
18072
|
}
|
|
18078
|
-
return /* @__PURE__ */
|
|
18079
|
-
|
|
18073
|
+
return /* @__PURE__ */ jsxs69(
|
|
18074
|
+
StyledThumbnail,
|
|
18080
18075
|
{
|
|
18081
18076
|
ref,
|
|
18077
|
+
...props,
|
|
18082
18078
|
$aspectRatio: aspectRatio,
|
|
18079
|
+
$backgroundUrl: backgroundUrl,
|
|
18080
|
+
$gradientBackground: gradientBackground,
|
|
18081
|
+
$isScrubbable: isScrubbable,
|
|
18083
18082
|
$width: width,
|
|
18084
|
-
|
|
18085
|
-
|
|
18086
|
-
|
|
18087
|
-
|
|
18088
|
-
|
|
18089
|
-
|
|
18090
|
-
|
|
18091
|
-
|
|
18092
|
-
onBlur: handleMouseOut,
|
|
18093
|
-
onMouseMove: handleMouseMove,
|
|
18094
|
-
onMouseOut: handleMouseOut,
|
|
18095
|
-
role: "presentation",
|
|
18096
|
-
children: [
|
|
18097
|
-
isNotNil43(children) ? children : null,
|
|
18098
|
-
thumbnailContent
|
|
18099
|
-
]
|
|
18100
|
-
}
|
|
18101
|
-
)
|
|
18083
|
+
onBlur: handleMouseOut,
|
|
18084
|
+
onMouseMove: handleMouseMove,
|
|
18085
|
+
onMouseOut: handleMouseOut,
|
|
18086
|
+
role: "presentation",
|
|
18087
|
+
children: [
|
|
18088
|
+
isNotNil43(children) ? children : null,
|
|
18089
|
+
thumbnailContent
|
|
18090
|
+
]
|
|
18102
18091
|
}
|
|
18103
18092
|
);
|
|
18104
18093
|
}
|
|
@@ -18110,55 +18099,72 @@ import React5 from "react";
|
|
|
18110
18099
|
import { styled as styled107 } from "styled-components";
|
|
18111
18100
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
18112
18101
|
import { jsx as jsx326 } from "react/jsx-runtime";
|
|
18113
|
-
var ThumbnailCollageContainer = styled107.div`
|
|
18114
|
-
container-type: size;
|
|
18115
|
-
width: 100%;
|
|
18116
|
-
aspect-ratio: 16 / 9;
|
|
18117
|
-
display: flex;
|
|
18118
|
-
`;
|
|
18119
18102
|
var StyledThumbnailCollage = styled107.div`
|
|
18120
18103
|
display: grid;
|
|
18121
18104
|
gap: var(--wui-space-01);
|
|
18122
18105
|
width: 100%;
|
|
18123
18106
|
grid-template-columns: 3fr 2fr;
|
|
18124
18107
|
grid-template-rows: 1fr 1fr;
|
|
18108
|
+
aspect-ratio: 16 / 9;
|
|
18125
18109
|
|
|
18126
18110
|
&:has(:nth-child(1)) {
|
|
18111
|
+
--wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
|
|
18112
|
+
|
|
18127
18113
|
grid-template-areas:
|
|
18128
18114
|
'a a'
|
|
18129
18115
|
'a a';
|
|
18130
18116
|
}
|
|
18131
18117
|
|
|
18132
18118
|
&: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
|
+
|
|
18133
18122
|
grid-template-areas:
|
|
18134
18123
|
'a b'
|
|
18135
18124
|
'a b';
|
|
18136
18125
|
}
|
|
18137
18126
|
|
|
18138
18127
|
&: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
|
+
|
|
18139
18132
|
grid-template-areas:
|
|
18140
18133
|
'a b'
|
|
18141
18134
|
'a c';
|
|
18142
18135
|
}
|
|
18143
18136
|
|
|
18144
18137
|
> :nth-child(1) {
|
|
18138
|
+
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
|
|
18139
|
+
|
|
18145
18140
|
grid-area: a;
|
|
18146
18141
|
}
|
|
18147
18142
|
|
|
18148
18143
|
> :nth-child(2) {
|
|
18144
|
+
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
|
|
18145
|
+
|
|
18149
18146
|
grid-area: b;
|
|
18150
18147
|
}
|
|
18151
18148
|
|
|
18152
18149
|
> :nth-child(3) {
|
|
18150
|
+
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
|
|
18151
|
+
|
|
18153
18152
|
grid-area: c;
|
|
18154
18153
|
}
|
|
18155
18154
|
|
|
18156
|
-
|
|
18157
|
-
//allows for the border radius to be based off the collage's dimensions
|
|
18158
|
-
container-type: unset;
|
|
18155
|
+
> * {
|
|
18159
18156
|
aspect-ratio: unset;
|
|
18160
18157
|
height: 100%;
|
|
18161
18158
|
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
|
+
}
|
|
18162
18168
|
}
|
|
18163
18169
|
`;
|
|
18164
18170
|
var ThumbnailCollage = ({
|
|
@@ -18184,7 +18190,7 @@ var ThumbnailCollage = ({
|
|
|
18184
18190
|
"fallback"
|
|
18185
18191
|
)
|
|
18186
18192
|
];
|
|
18187
|
-
return /* @__PURE__ */ jsx326(
|
|
18193
|
+
return /* @__PURE__ */ jsx326(
|
|
18188
18194
|
StyledThumbnailCollage,
|
|
18189
18195
|
{
|
|
18190
18196
|
$gradientBackground: gradientBackground,
|
|
@@ -18192,7 +18198,7 @@ var ThumbnailCollage = ({
|
|
|
18192
18198
|
...props,
|
|
18193
18199
|
children: thumbnails
|
|
18194
18200
|
}
|
|
18195
|
-
)
|
|
18201
|
+
);
|
|
18196
18202
|
};
|
|
18197
18203
|
|
|
18198
18204
|
// src/components/WistiaLogo/WistiaLogo.tsx
|