UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

171 lines 7.63 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.OverlayStyled = exports.ButtonsSkeletonContainerStyled = exports.VideoSkeletonContainerStyled = exports.LinkContainerStyled = exports.BottomContainerStyled = exports.ButtonsBarSecondSubontainerStyled = exports.ButtonsBarFirstSubcontainerStyled = exports.VolumeContainerStyled = exports.ButtonsContainerStyled = exports.ControlsContainerStyled = exports.ScreenIconContainerStyled = exports.VideoElement = exports.VideoContainerStyled = exports.ContainerStyled = void 0; const styled_components_1 = __importStar(require("styled-components")); const getStyles_1 = require("../../utils/getStyles/getStyles"); exports.ContainerStyled = styled_components_1.default.div ` ${({ styles }) => (0, getStyles_1.getStyles)(styles?.container)} `; exports.VideoContainerStyled = styled_components_1.default.div ` ${({ styles }) => (0, getStyles_1.getStyles)(styles?.videoContainer)} `; exports.VideoElement = styled_components_1.default.video ` // Allow to set aspect radio to 16:9 position: absolute; width: 100%; height: 100%; top: 0; left: 0; object-fit: ${({ isFullScreen }) => (isFullScreen ? 'content' : 'fill')}; ${({ styles }) => (0, getStyles_1.getStyles)(styles?.videoElement)}; //Style text subtitles ::cue { ${({ styles, theme: { MEDIA_QUERIES: { onlyDesktop, onlyTablet, onlyMobile }, }, }) => (0, styled_components_1.css) ` ${onlyDesktop} { color: ${styles?.subtitles?.color}; font-size: ${styles?.subtitles?.DESKTOP?.font_size}; line-height: ${styles?.subtitles?.DESKTOP?.line_height}; font-weight: ${styles?.subtitles?.font_weight}; background-color: ${styles?.subtitles?.background_color}; } ${onlyTablet} { color: ${styles?.subtitles?.color}; font-size: ${styles?.subtitles?.TABLET?.font_size}; line-height: ${styles?.subtitles?.TABLET?.line_height}; font-weight: ${styles?.subtitles?.font_weight}; background-color: ${styles?.subtitles?.background_color}; margin-bottom: ${styles?.subtitles?.margin_bottom}; } ${onlyMobile} { color: ${styles?.subtitles?.color}; font-size: ${styles?.subtitles?.MOBILE?.font_size}; line-height: ${styles?.subtitles?.MOBILE?.line_height}; font-weight: ${styles?.subtitles?.font_weight}; background-color: ${styles?.subtitles?.background_color}; margin-bottom: ${styles?.subtitles?.margin_bottom}; } `}; } ::-webkit-media-text-track-display { padding-bottom: ${({ paddingBottomSubtitles }) => paddingBottomSubtitles}; } // Safari: get margins/paddings for subtitles containers ::-webkit-media-text-track-container { padding-bottom: ${({ paddingBottomSubtitles }) => paddingBottomSubtitles}; } //Safari. If "::cue" doesnt work, use this /* ::-webkit-media-text-track-display-backdrop { ${({ styles, theme: { MEDIA_QUERIES: { onlyDesktop, onlyTablet, onlyMobile }, }, }) => (0, styled_components_1.css) ` ${onlyDesktop} { color: ${styles?.subtitles?.color}; font-size: ${styles?.subtitles?.DESKTOP?.font_size}; line-height: ${styles?.subtitles?.DESKTOP?.line_height}; font-weight: ${styles?.subtitles?.font_weight}; background-color: ${styles?.subtitles?.background_color}; } ${onlyTablet} { color: ${styles?.subtitles?.color}; font-size: ${styles?.subtitles?.TABLET?.font_size}; line-height: ${styles?.subtitles?.TABLET?.line_height}; font-weight: ${styles?.subtitles?.font_weight}; background-color: ${styles?.subtitles?.background_color}; margin-bottom: ${styles?.subtitles?.margin_bottom}; } ${onlyMobile} { color: ${styles?.subtitles?.color}; font-size: ${styles?.subtitles?.MOBILE?.font_size}; line-height: ${styles?.subtitles?.MOBILE?.line_height}; font-weight: ${styles?.subtitles?.font_weight}; background-color: ${styles?.subtitles?.background_color}; margin-bottom: ${styles?.subtitles?.margin_bottom}; } `}; } */ `; exports.ScreenIconContainerStyled = styled_components_1.default.div ` position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); ${({ styles }) => (0, getStyles_1.getStyles)(styles?.screenIconContainer)} `; exports.ControlsContainerStyled = styled_components_1.default.div ` position: absolute; bottom: 0; left: 0; width: 100%; opacity: 1; transition: opacity 0.2s ease-in-out; ${({ styles }) => (0, getStyles_1.getStyles)(styles?.controlsContainer)} opacity: ${({ showControls }) => (!showControls ? '0' : undefined)}; `; exports.ButtonsContainerStyled = styled_components_1.default.div ` display: flex; ${({ styles }) => (0, getStyles_1.getStyles)(styles?.buttonsContainer)} `; exports.VolumeContainerStyled = styled_components_1.default.input ` ${({ styles }) => (0, getStyles_1.getStyles)(styles?.volumeBar)} `; exports.ButtonsBarFirstSubcontainerStyled = styled_components_1.default.div ` display: flex; ${({ styles }) => (0, getStyles_1.getStyles)(styles?.buttonsBarFirstSubcontainer)} `; exports.ButtonsBarSecondSubontainerStyled = styled_components_1.default.div ` display: flex; ${({ styles }) => (0, getStyles_1.getStyles)(styles?.buttonsBarSecondSubcontainer)} `; exports.BottomContainerStyled = styled_components_1.default.div ` display: flex; justify-content: ${({ linkAndActionButtonAlignment }) => linkAndActionButtonAlignment ?? 'flex-end'}; width: 100%; ${({ styles }) => (0, getStyles_1.getStyles)(styles?.bottomContainer)} `; exports.LinkContainerStyled = styled_components_1.default.div ` > * { ${({ styles }) => (0, getStyles_1.getStyles)(styles?.linkContainer)} } `; exports.VideoSkeletonContainerStyled = styled_components_1.default.div ` ${({ styles }) => (0, getStyles_1.getStyles)(styles?.videoSkeletonContainer)} `; exports.ButtonsSkeletonContainerStyled = styled_components_1.default.div ` display: flex; ${({ styles }) => (0, getStyles_1.getStyles)(styles?.buttonsSkeletonContainer)} `; exports.OverlayStyled = styled_components_1.default.div ` ${({ styles }) => (0, getStyles_1.getStyles)(styles?.overlay)} `; //# sourceMappingURL=video.styled.js.map