@wistia/ui 0.18.0-beta.9dd31b7e.fa98d59 → 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 +25 -16
- 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 +25 -16
- 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
|
*
|
|
@@ -14990,7 +14990,6 @@ var FormField = ({
|
|
|
14990
14990
|
id: computedId,
|
|
14991
14991
|
label: isIntegratedLabel ? label : void 0,
|
|
14992
14992
|
"aria-describedby": ariaDescribedby,
|
|
14993
|
-
"aria-invalid": (0, import_type_guards49.isNotNil)(computedError),
|
|
14994
14993
|
...props
|
|
14995
14994
|
};
|
|
14996
14995
|
if ((0, import_type_guards49.isUndefined)(value) && (0, import_type_guards49.isNotUndefined)(defaultValue)) {
|
|
@@ -15012,7 +15011,8 @@ var FormField = ({
|
|
|
15012
15011
|
childProps = {
|
|
15013
15012
|
...childProps,
|
|
15014
15013
|
name: computedName,
|
|
15015
|
-
onChange: handleChange
|
|
15014
|
+
onChange: handleChange,
|
|
15015
|
+
"aria-invalid": (0, import_type_guards49.isNotNil)(error)
|
|
15016
15016
|
};
|
|
15017
15017
|
}
|
|
15018
15018
|
import_react73.Children.only(children);
|
|
@@ -17981,6 +17981,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17981
17981
|
|
|
17982
17982
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17983
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
|
+
};
|
|
17984
17992
|
var WideThumbnailImage = import_styled_components126.styled.img`
|
|
17985
17993
|
height: 100%;
|
|
17986
17994
|
object-fit: cover;
|
|
@@ -18019,7 +18027,7 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18019
18027
|
)};
|
|
18020
18028
|
background-position: center center;
|
|
18021
18029
|
background-size: cover;
|
|
18022
|
-
aspect-ratio:
|
|
18030
|
+
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
18023
18031
|
display: flex;
|
|
18024
18032
|
overflow: hidden;
|
|
18025
18033
|
position: relative;
|
|
@@ -18028,7 +18036,12 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18028
18036
|
|
|
18029
18037
|
&,
|
|
18030
18038
|
img {
|
|
18031
|
-
border-radius:
|
|
18039
|
+
border-radius: ${({ $aspectRatio }) => {
|
|
18040
|
+
if ($aspectRatio === "square") {
|
|
18041
|
+
return "8%";
|
|
18042
|
+
}
|
|
18043
|
+
return `calc(8% * (9 / 16)) / 8%`;
|
|
18044
|
+
}};
|
|
18032
18045
|
}
|
|
18033
18046
|
`;
|
|
18034
18047
|
var StoryboardRenderer = ({
|
|
@@ -18036,17 +18049,10 @@ var StoryboardRenderer = ({
|
|
|
18036
18049
|
width,
|
|
18037
18050
|
percent,
|
|
18038
18051
|
cursorPosition,
|
|
18039
|
-
isStoryboardReady
|
|
18052
|
+
isStoryboardReady,
|
|
18053
|
+
aspectRatio
|
|
18040
18054
|
}) => {
|
|
18041
|
-
const {
|
|
18042
|
-
url,
|
|
18043
|
-
width: sbWidth,
|
|
18044
|
-
height: sbHeight,
|
|
18045
|
-
frameHeight,
|
|
18046
|
-
frameWidth,
|
|
18047
|
-
frameCount,
|
|
18048
|
-
aspectRatio
|
|
18049
|
-
} = storyboard;
|
|
18055
|
+
const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
|
|
18050
18056
|
const targetWidth = (0, import_type_guards74.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
18051
18057
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
18052
18058
|
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
@@ -18060,7 +18066,7 @@ var StoryboardRenderer = ({
|
|
|
18060
18066
|
storyboardHeight: sbHeight,
|
|
18061
18067
|
storyboardUrl: url,
|
|
18062
18068
|
storyboardWidth: sbWidth,
|
|
18063
|
-
targetAspectRatio: aspectRatio,
|
|
18069
|
+
targetAspectRatio: getAspectRatioValue(aspectRatio),
|
|
18064
18070
|
targetWidth
|
|
18065
18071
|
}
|
|
18066
18072
|
);
|
|
@@ -18083,6 +18089,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18083
18089
|
children,
|
|
18084
18090
|
storyboard,
|
|
18085
18091
|
height,
|
|
18092
|
+
aspectRatio = "wide",
|
|
18086
18093
|
...props
|
|
18087
18094
|
}, ref) => {
|
|
18088
18095
|
const [percent, setPercent] = (0, import_react100.useState)(0);
|
|
@@ -18134,6 +18141,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18134
18141
|
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18135
18142
|
StoryboardRenderer,
|
|
18136
18143
|
{
|
|
18144
|
+
aspectRatio,
|
|
18137
18145
|
cursorPosition,
|
|
18138
18146
|
isStoryboardReady,
|
|
18139
18147
|
percent,
|
|
@@ -18157,6 +18165,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18157
18165
|
{
|
|
18158
18166
|
ref,
|
|
18159
18167
|
...props,
|
|
18168
|
+
$aspectRatio: aspectRatio,
|
|
18160
18169
|
$backgroundUrl: backgroundUrl,
|
|
18161
18170
|
$gradientBackground: gradientBackground,
|
|
18162
18171
|
$isScrubbable: isScrubbable,
|