@wistia/ui 0.18.0-beta.af6ce7a5.9372ce9 → 0.18.0-beta.bf141d35.57288dc
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 +24 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.mjs +24 -20
- 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.0-beta.
|
|
3
|
+
* @license @wistia/ui v0.18.0-beta.bf141d35.57288dc
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -7904,7 +7904,6 @@ var StyledButton = import_styled_components22.styled.button`
|
|
|
7904
7904
|
${({ $variant }) => buttonVariantsStyles[$variant]}
|
|
7905
7905
|
${({ $unstyled }) => !$unstyled && buttonBaseStyles}
|
|
7906
7906
|
${({ $fullWidth }) => $fullWidth && "width: 100%;"}
|
|
7907
|
-
align-self: flex-start;
|
|
7908
7907
|
text-align: center;
|
|
7909
7908
|
`;
|
|
7910
7909
|
var StyledButtonContent = import_styled_components22.styled.div`
|
|
@@ -8601,7 +8600,7 @@ var DEFAULT_ELEMENT = "div";
|
|
|
8601
8600
|
var BoxComponent = (0, import_react27.forwardRef)(
|
|
8602
8601
|
({
|
|
8603
8602
|
alignContent = "stretch",
|
|
8604
|
-
alignItems = "
|
|
8603
|
+
alignItems = "flex-start",
|
|
8605
8604
|
alignSelf,
|
|
8606
8605
|
basis,
|
|
8607
8606
|
children,
|
|
@@ -9120,10 +9119,6 @@ var ButtonGroupComponent = import_styled_components31.styled.div`
|
|
|
9120
9119
|
justify-content: ${({ $align }) => getAlignment($align)};
|
|
9121
9120
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
9122
9121
|
|
|
9123
|
-
${StyledButton} {
|
|
9124
|
-
align-self: unset;
|
|
9125
|
-
}
|
|
9126
|
-
|
|
9127
9122
|
${mq.smAndUp} {
|
|
9128
9123
|
flex-direction: row;
|
|
9129
9124
|
}
|
|
@@ -17986,6 +17981,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17986
17981
|
|
|
17987
17982
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17988
17983
|
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
17984
|
+
var WIDE_ASPECT_RATIO = 16 / 9;
|
|
17985
|
+
var SQUARE_ASPECT_RATIO = 1;
|
|
17986
|
+
var getAspectRatioValue = (aspectRatio) => {
|
|
17987
|
+
if (aspectRatio === "square") {
|
|
17988
|
+
return SQUARE_ASPECT_RATIO;
|
|
17989
|
+
}
|
|
17990
|
+
return WIDE_ASPECT_RATIO;
|
|
17991
|
+
};
|
|
17989
17992
|
var WideThumbnailImage = import_styled_components126.styled.img`
|
|
17990
17993
|
height: 100%;
|
|
17991
17994
|
object-fit: cover;
|
|
@@ -18024,7 +18027,7 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18024
18027
|
)};
|
|
18025
18028
|
background-position: center center;
|
|
18026
18029
|
background-size: cover;
|
|
18027
|
-
aspect-ratio:
|
|
18030
|
+
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
18028
18031
|
display: flex;
|
|
18029
18032
|
overflow: hidden;
|
|
18030
18033
|
position: relative;
|
|
@@ -18033,7 +18036,12 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18033
18036
|
|
|
18034
18037
|
&,
|
|
18035
18038
|
img {
|
|
18036
|
-
border-radius:
|
|
18039
|
+
border-radius: ${({ $aspectRatio }) => {
|
|
18040
|
+
if ($aspectRatio === "square") {
|
|
18041
|
+
return "8%";
|
|
18042
|
+
}
|
|
18043
|
+
return `calc(8% * (9 / 16)) / 8%`;
|
|
18044
|
+
}};
|
|
18037
18045
|
}
|
|
18038
18046
|
`;
|
|
18039
18047
|
var StoryboardRenderer = ({
|
|
@@ -18041,17 +18049,10 @@ var StoryboardRenderer = ({
|
|
|
18041
18049
|
width,
|
|
18042
18050
|
percent,
|
|
18043
18051
|
cursorPosition,
|
|
18044
|
-
isStoryboardReady
|
|
18052
|
+
isStoryboardReady,
|
|
18053
|
+
aspectRatio
|
|
18045
18054
|
}) => {
|
|
18046
|
-
const {
|
|
18047
|
-
url,
|
|
18048
|
-
width: sbWidth,
|
|
18049
|
-
height: sbHeight,
|
|
18050
|
-
frameHeight,
|
|
18051
|
-
frameWidth,
|
|
18052
|
-
frameCount,
|
|
18053
|
-
aspectRatio
|
|
18054
|
-
} = storyboard;
|
|
18055
|
+
const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
|
|
18055
18056
|
const targetWidth = (0, import_type_guards74.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
18056
18057
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
18057
18058
|
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
@@ -18065,7 +18066,7 @@ var StoryboardRenderer = ({
|
|
|
18065
18066
|
storyboardHeight: sbHeight,
|
|
18066
18067
|
storyboardUrl: url,
|
|
18067
18068
|
storyboardWidth: sbWidth,
|
|
18068
|
-
targetAspectRatio: aspectRatio,
|
|
18069
|
+
targetAspectRatio: getAspectRatioValue(aspectRatio),
|
|
18069
18070
|
targetWidth
|
|
18070
18071
|
}
|
|
18071
18072
|
);
|
|
@@ -18088,6 +18089,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18088
18089
|
children,
|
|
18089
18090
|
storyboard,
|
|
18090
18091
|
height,
|
|
18092
|
+
aspectRatio = "wide",
|
|
18091
18093
|
...props
|
|
18092
18094
|
}, ref) => {
|
|
18093
18095
|
const [percent, setPercent] = (0, import_react100.useState)(0);
|
|
@@ -18139,6 +18141,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18139
18141
|
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18140
18142
|
StoryboardRenderer,
|
|
18141
18143
|
{
|
|
18144
|
+
aspectRatio,
|
|
18142
18145
|
cursorPosition,
|
|
18143
18146
|
isStoryboardReady,
|
|
18144
18147
|
percent,
|
|
@@ -18162,6 +18165,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18162
18165
|
{
|
|
18163
18166
|
ref,
|
|
18164
18167
|
...props,
|
|
18168
|
+
$aspectRatio: aspectRatio,
|
|
18165
18169
|
$backgroundUrl: backgroundUrl,
|
|
18166
18170
|
$gradientBackground: gradientBackground,
|
|
18167
18171
|
$isScrubbable: isScrubbable,
|