@trafilea/afrodita-components 6.51.4 → 6.51.5

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.
@@ -7071,13 +7071,13 @@ var templateObject_1$1F, templateObject_2$1j, templateObject_3$14, templateObjec
7071
7071
 
7072
7072
  var Video$1 = function (_a) {
7073
7073
  var _b, _c, _d, _e;
7074
- var source = _a.source, thumbnail = _a.thumbnail, height = _a.height, className = _a.className, _f = _a.withProgressBar, withProgressBar = _f === void 0 ? true : _f, hasAudioControl = _a.hasAudioControl, muted = _a.muted, isSlideActive = _a.isSlideActive, rest = __rest(_a, ["source", "thumbnail", "height", "className", "withProgressBar", "hasAudioControl", "muted", "isSlideActive"]);
7074
+ var source = _a.source, thumbnail = _a.thumbnail, height = _a.height, className = _a.className, _f = _a.withProgressBar, withProgressBar = _f === void 0 ? true : _f, hasAudioControl = _a.hasAudioControl, muted = _a.muted, isSlideActive = _a.isSlideActive, _g = _a.onLoadedData, onLoadedData = _g === void 0 ? function () { return setIsLoading(false); } : _g, rest = __rest(_a, ["source", "thumbnail", "height", "className", "withProgressBar", "hasAudioControl", "muted", "isSlideActive", "onLoadedData"]);
7075
7075
  var videoRef = useRef(null);
7076
- var _g = useState(true), isLoading = _g[0], setIsLoading = _g[1];
7077
- var _h = useState(false), isPlaying = _h[0], setIsPlaying = _h[1];
7078
- var _j = useState(muted), isMuted = _j[0], setIsMuted = _j[1];
7079
- var _k = useState(0), videoProgress = _k[0], setVideoProgress = _k[1];
7080
- var _l = useState(false), debouncePlay = _l[0], setDebouncePlay = _l[1];
7076
+ var _h = useState(true), isLoading = _h[0], setIsLoading = _h[1];
7077
+ var _j = useState(false), isPlaying = _j[0], setIsPlaying = _j[1];
7078
+ var _k = useState(muted), isMuted = _k[0], setIsMuted = _k[1];
7079
+ var _l = useState(0), videoProgress = _l[0], setVideoProgress = _l[1];
7080
+ var _m = useState(false), debouncePlay = _m[0], setDebouncePlay = _m[1];
7081
7081
  var isStarted = videoProgress > 0;
7082
7082
  var progress = videoProgress / ((_c = (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.duration) !== null && _c !== void 0 ? _c : 0);
7083
7083
  var hideProgressBar = videoProgress === ((_e = (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.duration) !== null && _e !== void 0 ? _e : 0) || videoProgress === 0;
@@ -7117,7 +7117,7 @@ var Video$1 = function (_a) {
7117
7117
  setVideoProgress(videoRef.current.currentTime);
7118
7118
  }
7119
7119
  };
7120
- return (jsxs$1(Container$17, __assign$1({ className: className }, { children: [!isLoading && withProgressBar && jsx$1(ProgressBar$1, { progress: progress, hide: hideProgressBar }, void 0), !isPlaying ? (jsx$1(PlayContainer, __assign$1({ "data-testid": "play", onClick: handlePlayClick }, { children: isStarted && jsx$1(PlayIcon, {}, void 0) }), void 0)) : (jsx$1(PauseContainer, { "data-testid": "pause", onClick: handlePauseClick }, void 0)), hasAudioControl && (jsxs$1(MuteButton, __assign$1({ onClick: handleMuteToggle }, { children: [isMuted && jsx$1(Icon$1, { name: "custom/sound_off" }, void 0), !isMuted && jsx$1(Icon$1, { name: "custom/sound_on" }, void 0)] }), void 0)), jsxs$1(HTMLVideo, __assign$1({}, rest, { muted: isMuted, "data-testid": "video", poster: thumbnail, playsInline: true, ref: videoRef, onTimeUpdate: onTimeUpdate, onCanPlay: function () { return setIsLoading(false); }, onLoadedData: function () { return setIsLoading(false); }, onPause: function () { return setIsPlaying(false); }, onPlaying: function () { return setIsPlaying(true); }, height: height || 'auto' }, { children: [jsx$1("track", { kind: "captions" }, void 0), jsx$1("source", { src: source }, void 0)] }), void 0)] }), void 0));
7120
+ return (jsxs$1(Container$17, __assign$1({ className: className }, { children: [!isLoading && withProgressBar && jsx$1(ProgressBar$1, { progress: progress, hide: hideProgressBar }, void 0), !isPlaying ? (jsx$1(PlayContainer, __assign$1({ "data-testid": "play", onClick: handlePlayClick }, { children: isStarted && jsx$1(PlayIcon, {}, void 0) }), void 0)) : (jsx$1(PauseContainer, { "data-testid": "pause", onClick: handlePauseClick }, void 0)), hasAudioControl && (jsxs$1(MuteButton, __assign$1({ onClick: handleMuteToggle }, { children: [isMuted && jsx$1(Icon$1, { name: "custom/sound_off" }, void 0), !isMuted && jsx$1(Icon$1, { name: "custom/sound_on" }, void 0)] }), void 0)), jsxs$1(HTMLVideo, __assign$1({}, rest, { muted: isMuted, "data-testid": "video", poster: thumbnail, playsInline: true, ref: videoRef, onTimeUpdate: onTimeUpdate, onCanPlay: function () { return setIsLoading(false); }, onLoadedData: onLoadedData, onPause: function () { return setIsPlaying(false); }, onPlaying: function () { return setIsPlaying(true); }, height: height || 'auto' }, { children: [jsx$1("track", { kind: "captions" }, void 0), jsx$1("source", { src: source }, void 0)] }), void 0)] }), void 0));
7121
7121
  };
7122
7122
 
7123
7123
  var LikeCount = newStyled.span(templateObject_1$1E || (templateObject_1$1E = __makeTemplateObject(["\n font-size: 14px;\n line-height: 22px;\n color: ", ";\n font-weight: 600;\n\n &.like-count {\n transition: color 0.2s ease;\n }\n"], ["\n font-size: 14px;\n line-height: 22px;\n color: ", ";\n font-weight: 600;\n\n &.like-count {\n transition: color 0.2s ease;\n }\n"])), function (_a) {
package/build/index.js CHANGED
@@ -7097,13 +7097,13 @@ var templateObject_1$1F, templateObject_2$1j, templateObject_3$14, templateObjec
7097
7097
 
7098
7098
  var Video$1 = function (_a) {
7099
7099
  var _b, _c, _d, _e;
7100
- var source = _a.source, thumbnail = _a.thumbnail, height = _a.height, className = _a.className, _f = _a.withProgressBar, withProgressBar = _f === void 0 ? true : _f, hasAudioControl = _a.hasAudioControl, muted = _a.muted, isSlideActive = _a.isSlideActive, rest = __rest(_a, ["source", "thumbnail", "height", "className", "withProgressBar", "hasAudioControl", "muted", "isSlideActive"]);
7100
+ var source = _a.source, thumbnail = _a.thumbnail, height = _a.height, className = _a.className, _f = _a.withProgressBar, withProgressBar = _f === void 0 ? true : _f, hasAudioControl = _a.hasAudioControl, muted = _a.muted, isSlideActive = _a.isSlideActive, _g = _a.onLoadedData, onLoadedData = _g === void 0 ? function () { return setIsLoading(false); } : _g, rest = __rest(_a, ["source", "thumbnail", "height", "className", "withProgressBar", "hasAudioControl", "muted", "isSlideActive", "onLoadedData"]);
7101
7101
  var videoRef = React$2.useRef(null);
7102
- var _g = React$2.useState(true), isLoading = _g[0], setIsLoading = _g[1];
7103
- var _h = React$2.useState(false), isPlaying = _h[0], setIsPlaying = _h[1];
7104
- var _j = React$2.useState(muted), isMuted = _j[0], setIsMuted = _j[1];
7105
- var _k = React$2.useState(0), videoProgress = _k[0], setVideoProgress = _k[1];
7106
- var _l = React$2.useState(false), debouncePlay = _l[0], setDebouncePlay = _l[1];
7102
+ var _h = React$2.useState(true), isLoading = _h[0], setIsLoading = _h[1];
7103
+ var _j = React$2.useState(false), isPlaying = _j[0], setIsPlaying = _j[1];
7104
+ var _k = React$2.useState(muted), isMuted = _k[0], setIsMuted = _k[1];
7105
+ var _l = React$2.useState(0), videoProgress = _l[0], setVideoProgress = _l[1];
7106
+ var _m = React$2.useState(false), debouncePlay = _m[0], setDebouncePlay = _m[1];
7107
7107
  var isStarted = videoProgress > 0;
7108
7108
  var progress = videoProgress / ((_c = (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.duration) !== null && _c !== void 0 ? _c : 0);
7109
7109
  var hideProgressBar = videoProgress === ((_e = (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.duration) !== null && _e !== void 0 ? _e : 0) || videoProgress === 0;
@@ -7143,7 +7143,7 @@ var Video$1 = function (_a) {
7143
7143
  setVideoProgress(videoRef.current.currentTime);
7144
7144
  }
7145
7145
  };
7146
- return (jsxRuntime.jsxs(Container$17, __assign$1({ className: className }, { children: [!isLoading && withProgressBar && jsxRuntime.jsx(ProgressBar$1, { progress: progress, hide: hideProgressBar }, void 0), !isPlaying ? (jsxRuntime.jsx(PlayContainer, __assign$1({ "data-testid": "play", onClick: handlePlayClick }, { children: isStarted && jsxRuntime.jsx(PlayIcon, {}, void 0) }), void 0)) : (jsxRuntime.jsx(PauseContainer, { "data-testid": "pause", onClick: handlePauseClick }, void 0)), hasAudioControl && (jsxRuntime.jsxs(MuteButton, __assign$1({ onClick: handleMuteToggle }, { children: [isMuted && jsxRuntime.jsx(Icon$1, { name: "custom/sound_off" }, void 0), !isMuted && jsxRuntime.jsx(Icon$1, { name: "custom/sound_on" }, void 0)] }), void 0)), jsxRuntime.jsxs(HTMLVideo, __assign$1({}, rest, { muted: isMuted, "data-testid": "video", poster: thumbnail, playsInline: true, ref: videoRef, onTimeUpdate: onTimeUpdate, onCanPlay: function () { return setIsLoading(false); }, onLoadedData: function () { return setIsLoading(false); }, onPause: function () { return setIsPlaying(false); }, onPlaying: function () { return setIsPlaying(true); }, height: height || 'auto' }, { children: [jsxRuntime.jsx("track", { kind: "captions" }, void 0), jsxRuntime.jsx("source", { src: source }, void 0)] }), void 0)] }), void 0));
7146
+ return (jsxRuntime.jsxs(Container$17, __assign$1({ className: className }, { children: [!isLoading && withProgressBar && jsxRuntime.jsx(ProgressBar$1, { progress: progress, hide: hideProgressBar }, void 0), !isPlaying ? (jsxRuntime.jsx(PlayContainer, __assign$1({ "data-testid": "play", onClick: handlePlayClick }, { children: isStarted && jsxRuntime.jsx(PlayIcon, {}, void 0) }), void 0)) : (jsxRuntime.jsx(PauseContainer, { "data-testid": "pause", onClick: handlePauseClick }, void 0)), hasAudioControl && (jsxRuntime.jsxs(MuteButton, __assign$1({ onClick: handleMuteToggle }, { children: [isMuted && jsxRuntime.jsx(Icon$1, { name: "custom/sound_off" }, void 0), !isMuted && jsxRuntime.jsx(Icon$1, { name: "custom/sound_on" }, void 0)] }), void 0)), jsxRuntime.jsxs(HTMLVideo, __assign$1({}, rest, { muted: isMuted, "data-testid": "video", poster: thumbnail, playsInline: true, ref: videoRef, onTimeUpdate: onTimeUpdate, onCanPlay: function () { return setIsLoading(false); }, onLoadedData: onLoadedData, onPause: function () { return setIsPlaying(false); }, onPlaying: function () { return setIsPlaying(true); }, height: height || 'auto' }, { children: [jsxRuntime.jsx("track", { kind: "captions" }, void 0), jsxRuntime.jsx("source", { src: source }, void 0)] }), void 0)] }), void 0));
7147
7147
  };
7148
7148
 
7149
7149
  var LikeCount = newStyled.span(templateObject_1$1E || (templateObject_1$1E = __makeTemplateObject(["\n font-size: 14px;\n line-height: 22px;\n color: ", ";\n font-weight: 600;\n\n &.like-count {\n transition: color 0.2s ease;\n }\n"], ["\n font-size: 14px;\n line-height: 22px;\n color: ", ";\n font-weight: 600;\n\n &.like-count {\n transition: color 0.2s ease;\n }\n"])), function (_a) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Trafilea's Design System",
4
4
  "author": "Trafilea",
5
5
  "repository": "https://github.com/trafilea/afrodita-components",
6
- "version": "6.51.4",
6
+ "version": "6.51.5",
7
7
  "private": false,
8
8
  "main": "build/index.js",
9
9
  "style": "build/index.css",