@telus-uds/components-web 4.19.0 → 5.0.0-alpha.0
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/.eslintrc.cjs +12 -0
- package/CHANGELOG.md +24 -1
- package/lib/cjs/Badge/Badge.js +26 -27
- package/lib/cjs/BlockQuote/BlockQuote.js +24 -25
- package/lib/cjs/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +36 -37
- package/lib/cjs/Breadcrumbs/Breadcrumbs.js +8 -10
- package/lib/cjs/Callout/Callout.js +24 -25
- package/lib/cjs/Card/Card.js +79 -89
- package/lib/cjs/Card/CardContent.js +53 -29
- package/lib/cjs/Card/CardFooter.js +28 -18
- package/lib/cjs/Countdown/Countdown.js +7 -8
- package/lib/cjs/Countdown/Segment.js +10 -11
- package/lib/cjs/Countdown/dictionary.js +2 -2
- package/lib/cjs/Countdown/types.js +2 -6
- package/lib/cjs/Countdown/useCountdown.js +2 -2
- package/lib/cjs/DatePicker/CalendarContainer.js +66 -67
- package/lib/cjs/DatePicker/DatePicker.js +27 -28
- package/lib/cjs/DatePicker/dictionary.js +3 -4
- package/lib/cjs/DatePicker/reactDatesCss.js +2 -3
- package/lib/cjs/Disclaimer/Disclaimer.js +28 -13
- package/lib/cjs/Footnote/Footnote.js +108 -109
- package/lib/cjs/Footnote/FootnoteLink.js +28 -19
- package/lib/cjs/Footnote/dictionary.js +2 -2
- package/lib/cjs/IconButton/IconButton.js +3 -4
- package/lib/cjs/Image/Image.js +9 -3
- package/lib/cjs/Image/server.js +4 -6
- package/lib/cjs/List/List.js +7 -3
- package/lib/cjs/List/ListItem.js +3 -4
- package/lib/cjs/NavigationBar/NavigationBar.js +8 -9
- package/lib/cjs/NavigationBar/NavigationItem.js +10 -11
- package/lib/cjs/NavigationBar/NavigationSubMenu.js +10 -11
- package/lib/cjs/NavigationBar/collapseItems.js +2 -2
- package/lib/cjs/NavigationBar/resolveItemSelection.js +2 -2
- package/lib/cjs/OptimizeImage/OptimizeImage.js +6 -8
- package/lib/cjs/OptimizeImage/utils/getFallbackUrl.js +3 -4
- package/lib/cjs/OptimizeImage/utils/getImageUrls.js +9 -10
- package/lib/cjs/OptimizeImage/utils/getOptimizedUrl.js +3 -4
- package/lib/cjs/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/lib/cjs/OptimizeImage/utils/index.js +8 -9
- package/lib/cjs/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/lib/cjs/OrderedList/OrderedList.js +6 -9
- package/lib/cjs/OrderedList/OrderedListBase.js +4 -7
- package/lib/cjs/OrderedList/{Item.js → OrderedListItem.js} +46 -39
- package/lib/cjs/OrderedList/{ItemBase.js → OrderedListItemBase.js} +7 -7
- package/lib/cjs/OrderedList/constants.js +0 -1
- package/lib/cjs/Paragraph/Paragraph.js +10 -11
- package/lib/cjs/PreviewCard/PreviewCard.js +18 -27
- package/lib/cjs/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +6 -6
- package/lib/cjs/PriceLockup/PriceLockup.js +61 -60
- package/lib/cjs/PriceLockup/dictionary.js +2 -2
- package/lib/cjs/PriceLockup/tokens.js +3 -3
- package/lib/cjs/Progress/ProgressBar.js +14 -17
- package/lib/cjs/QuantitySelector/QuantitySelector.js +8 -9
- package/lib/cjs/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +5 -6
- package/lib/cjs/QuantitySelector/dictionary.js +2 -2
- package/lib/cjs/ResponsiveImage/ResponsiveImage.js +3 -4
- package/lib/cjs/Ribbon/Ribbon.js +56 -65
- package/lib/cjs/SkeletonProvider/SkeletonImage.js +3 -4
- package/lib/cjs/SkeletonProvider/SkeletonProvider.js +10 -10
- package/lib/cjs/SkeletonProvider/SkeletonTypography.js +3 -4
- package/lib/cjs/Span/Span.js +6 -7
- package/lib/cjs/Spinner/Spinner.js +29 -29
- package/lib/cjs/Spinner/SpinnerContent.js +6 -7
- package/lib/cjs/StoryCard/StoryCard.js +17 -22
- package/lib/cjs/Table/Table.js +32 -25
- package/lib/cjs/Table/{Body.js → TableBody.js} +5 -6
- package/lib/cjs/Table/{Cell.js → TableCell.js} +59 -61
- package/lib/cjs/Table/{Header.js → TableHeader.js} +7 -8
- package/lib/cjs/Table/{Row.js → TableRow.js} +18 -19
- package/lib/cjs/Table/{SubHeading.js → TableSubHeading.js} +7 -8
- package/lib/cjs/TermsAndConditions/ExpandCollapse.js +18 -19
- package/lib/cjs/TermsAndConditions/TermsAndConditions.js +44 -44
- package/lib/cjs/TermsAndConditions/dictionary.js +2 -2
- package/lib/cjs/Testimonial/Testimonial.js +24 -31
- package/lib/cjs/Toast/Toast.js +28 -30
- package/lib/cjs/Video/ControlBar/ControlBar.js +48 -47
- package/lib/cjs/Video/ControlBar/Controls/VideoButton/VideoButton.js +6 -6
- package/lib/cjs/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +30 -32
- package/lib/cjs/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +35 -35
- package/lib/cjs/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +42 -42
- package/lib/cjs/Video/MiddleControlButton/MiddleControlButton.js +15 -15
- package/lib/cjs/Video/Video.js +27 -29
- package/lib/cjs/Video/videoText.js +3 -4
- package/lib/cjs/VideoPicker/VideoPicker.js +37 -33
- package/lib/cjs/VideoPicker/VideoPickerPlayer.js +5 -6
- package/lib/cjs/VideoPicker/VideoPickerThumbnail.js +28 -25
- package/lib/cjs/VideoPicker/VideoSlider.js +3 -4
- package/lib/cjs/WaffleGrid/WaffleGrid.js +51 -50
- package/lib/cjs/WebVideo/WebVideo.js +7 -8
- package/lib/cjs/baseExports.js +84 -0
- package/lib/cjs/index.js +179 -105
- package/lib/cjs/server.js +2 -3
- package/lib/cjs/shared/ConditionalWrapper/ConditionalWrapper.js +3 -3
- package/lib/cjs/shared/FullBleedContent/FullBleedContent.js +28 -22
- package/lib/cjs/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -2
- package/lib/cjs/shared/FullBleedContent/index.js +11 -10
- package/lib/cjs/shared/FullBleedContent/useFullBleedContentProps.js +2 -2
- package/lib/cjs/shared/VideoSplash/SplashButton/SplashButton.js +9 -9
- package/lib/cjs/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +50 -50
- package/lib/cjs/shared/VideoSplash/VideoSplash.js +12 -12
- package/lib/cjs/shared/VideoSplash/helpers.js +2 -3
- package/lib/cjs/utils/index.js +14 -15
- package/lib/cjs/utils/isElementFocusable.js +2 -2
- package/lib/cjs/utils/logger.js +2 -6
- package/lib/cjs/utils/media.js +1 -1
- package/lib/cjs/utils/renderStructuredContent.js +3 -4
- package/lib/cjs/utils/scrollToAnchor.js +2 -2
- package/lib/cjs/utils/ssr.js +2 -2
- package/lib/cjs/utils/theming/get-theme-from-server.js +2 -3
- package/lib/cjs/utils/theming/with-client-theme.js +2 -2
- package/lib/cjs/utils/theming/with-server-theme.js +4 -4
- package/lib/cjs/utils/transforms.js +2 -5
- package/lib/cjs/utils/useOverlaidPosition.js +2 -2
- package/lib/cjs/utils/useTypographyTheme.js +2 -2
- package/lib/esm/Badge/Badge.js +25 -26
- package/lib/esm/BlockQuote/BlockQuote.js +23 -24
- package/lib/esm/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +35 -36
- package/lib/esm/Breadcrumbs/Breadcrumbs.js +6 -7
- package/lib/esm/Callout/Callout.js +23 -24
- package/lib/esm/Card/Card.js +63 -71
- package/lib/esm/Card/CardContent.js +52 -28
- package/lib/esm/Card/CardFooter.js +27 -18
- package/lib/esm/Countdown/Countdown.js +4 -5
- package/lib/esm/Countdown/Segment.js +8 -9
- package/lib/esm/Countdown/dictionary.js +1 -1
- package/lib/esm/Countdown/types.js +1 -5
- package/lib/esm/Countdown/useCountdown.js +2 -3
- package/lib/esm/DatePicker/CalendarContainer.js +64 -65
- package/lib/esm/DatePicker/DatePicker.js +18 -19
- package/lib/esm/DatePicker/dictionary.js +2 -3
- package/lib/esm/DatePicker/reactDatesCss.js +1 -2
- package/lib/esm/Disclaimer/Disclaimer.js +27 -12
- package/lib/esm/Footnote/Footnote.js +104 -104
- package/lib/esm/Footnote/FootnoteLink.js +26 -17
- package/lib/esm/Footnote/dictionary.js +1 -1
- package/lib/esm/IconButton/IconButton.js +2 -3
- package/lib/esm/Image/Image.js +10 -1
- package/lib/esm/Image/server.js +4 -4
- package/lib/esm/List/List.js +2 -2
- package/lib/esm/List/ListItem.js +2 -3
- package/lib/esm/NavigationBar/NavigationBar.js +5 -6
- package/lib/esm/NavigationBar/NavigationItem.js +9 -10
- package/lib/esm/NavigationBar/NavigationSubMenu.js +7 -8
- package/lib/esm/NavigationBar/collapseItems.js +2 -3
- package/lib/esm/NavigationBar/resolveItemSelection.js +2 -3
- package/lib/esm/OptimizeImage/OptimizeImage.js +4 -6
- package/lib/esm/OptimizeImage/utils/getFallbackUrl.js +2 -2
- package/lib/esm/OptimizeImage/utils/getImageUrls.js +3 -3
- package/lib/esm/OptimizeImage/utils/getOptimizedUrl.js +2 -2
- package/lib/esm/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/lib/esm/OptimizeImage/utils/index.js +4 -4
- package/lib/esm/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/lib/esm/OrderedList/OrderedList.js +4 -7
- package/lib/esm/OrderedList/OrderedListBase.js +3 -6
- package/lib/esm/OrderedList/{Item.js → OrderedListItem.js} +45 -38
- package/lib/esm/OrderedList/{ItemBase.js → OrderedListItemBase.js} +5 -6
- package/lib/esm/OrderedList/constants.js +0 -1
- package/lib/esm/Paragraph/Paragraph.js +9 -10
- package/lib/esm/PreviewCard/PreviewCard.js +16 -21
- package/lib/esm/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +4 -5
- package/lib/esm/PriceLockup/PriceLockup.js +57 -56
- package/lib/esm/PriceLockup/dictionary.js +1 -1
- package/lib/esm/PriceLockup/tokens.js +1 -1
- package/lib/esm/Progress/ProgressBar.js +13 -16
- package/lib/esm/QuantitySelector/QuantitySelector.js +6 -7
- package/lib/esm/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +4 -5
- package/lib/esm/QuantitySelector/dictionary.js +1 -1
- package/lib/esm/ResponsiveImage/ResponsiveImage.js +2 -3
- package/lib/esm/Ribbon/Ribbon.js +55 -64
- package/lib/esm/SkeletonProvider/SkeletonImage.js +2 -3
- package/lib/esm/SkeletonProvider/SkeletonProvider.js +6 -7
- package/lib/esm/SkeletonProvider/SkeletonTypography.js +2 -3
- package/lib/esm/Span/Span.js +5 -6
- package/lib/esm/Spinner/Spinner.js +24 -24
- package/lib/esm/Spinner/SpinnerContent.js +5 -6
- package/lib/esm/StoryCard/StoryCard.js +15 -16
- package/lib/esm/Table/Table.js +31 -24
- package/lib/esm/Table/{Body.js → TableBody.js} +4 -5
- package/lib/esm/Table/{Cell.js → TableCell.js} +57 -58
- package/lib/esm/Table/{Header.js → TableHeader.js} +6 -7
- package/lib/esm/Table/{Row.js → TableRow.js} +17 -18
- package/lib/esm/Table/{SubHeading.js → TableSubHeading.js} +6 -7
- package/lib/esm/TermsAndConditions/ExpandCollapse.js +18 -19
- package/lib/esm/TermsAndConditions/TermsAndConditions.js +40 -40
- package/lib/esm/TermsAndConditions/dictionary.js +1 -1
- package/lib/esm/Testimonial/Testimonial.js +22 -29
- package/lib/esm/Toast/Toast.js +26 -27
- package/lib/esm/Video/ControlBar/ControlBar.js +33 -33
- package/lib/esm/Video/ControlBar/Controls/VideoButton/VideoButton.js +5 -6
- package/lib/esm/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +28 -31
- package/lib/esm/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +33 -34
- package/lib/esm/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +38 -39
- package/lib/esm/Video/MiddleControlButton/MiddleControlButton.js +14 -15
- package/lib/esm/Video/Video.js +19 -21
- package/lib/esm/Video/videoText.js +2 -3
- package/lib/esm/VideoPicker/VideoPicker.js +32 -27
- package/lib/esm/VideoPicker/VideoPickerPlayer.js +3 -4
- package/lib/esm/VideoPicker/VideoPickerThumbnail.js +26 -23
- package/lib/esm/VideoPicker/VideoSlider.js +2 -3
- package/lib/esm/WaffleGrid/WaffleGrid.js +49 -46
- package/lib/esm/WebVideo/WebVideo.js +5 -6
- package/lib/esm/baseExports.js +1 -1
- package/lib/esm/index.js +46 -37
- package/lib/esm/server.js +1 -2
- package/lib/esm/shared/ConditionalWrapper/ConditionalWrapper.js +2 -3
- package/lib/esm/shared/FullBleedContent/FullBleedContent.js +25 -20
- package/lib/esm/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -3
- package/lib/esm/shared/FullBleedContent/index.js +3 -4
- package/lib/esm/shared/FullBleedContent/useFullBleedContentProps.js +3 -5
- package/lib/esm/shared/VideoSplash/SplashButton/SplashButton.js +8 -9
- package/lib/esm/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +48 -49
- package/lib/esm/shared/VideoSplash/VideoSplash.js +8 -9
- package/lib/esm/shared/VideoSplash/helpers.js +1 -1
- package/lib/esm/utils/index.js +7 -7
- package/lib/esm/utils/isElementFocusable.js +2 -3
- package/lib/esm/utils/logger.js +0 -4
- package/lib/esm/utils/media.js +1 -1
- package/lib/esm/utils/renderStructuredContent.js +2 -3
- package/lib/esm/utils/scrollToAnchor.js +2 -3
- package/lib/esm/utils/ssr.js +2 -3
- package/lib/esm/utils/theming/get-theme-from-server.js +1 -1
- package/lib/esm/utils/theming/with-client-theme.js +2 -3
- package/lib/esm/utils/theming/with-server-theme.js +3 -4
- package/lib/esm/utils/transforms.js +1 -4
- package/lib/esm/utils/useOverlaidPosition.js +2 -3
- package/lib/esm/utils/useTypographyTheme.js +2 -3
- package/package.json +13 -22
- package/src/Badge/Badge.jsx +18 -20
- package/src/BlockQuote/BlockQuote.jsx +16 -18
- package/src/Breadcrumbs/{Item/Item.jsx → BreadcrumbItem.jsx} +20 -21
- package/src/Breadcrumbs/Breadcrumbs.jsx +6 -9
- package/src/Callout/Callout.jsx +16 -18
- package/src/Card/Card.jsx +59 -80
- package/src/Card/CardContent.jsx +52 -28
- package/src/Card/CardFooter.jsx +26 -12
- package/src/Countdown/Countdown.jsx +3 -5
- package/src/Countdown/Segment.jsx +6 -8
- package/src/Countdown/dictionary.js +1 -1
- package/src/Countdown/types.js +0 -2
- package/src/Countdown/useCountdown.js +1 -3
- package/src/DatePicker/CalendarContainer.jsx +65 -67
- package/src/DatePicker/DatePicker.jsx +17 -19
- package/src/DatePicker/dictionary.js +1 -3
- package/src/DatePicker/reactDatesCss.js +1 -3
- package/src/Disclaimer/Disclaimer.jsx +15 -8
- package/src/Footnote/Footnote.jsx +104 -93
- package/src/Footnote/FootnoteLink.jsx +16 -13
- package/src/Footnote/dictionary.js +1 -1
- package/src/IconButton/IconButton.jsx +1 -3
- package/src/Image/Image.jsx +9 -1
- package/src/Image/server.js +4 -4
- package/src/List/List.jsx +2 -2
- package/src/List/ListItem.jsx +1 -3
- package/src/NavigationBar/NavigationBar.jsx +4 -6
- package/src/NavigationBar/NavigationItem.jsx +6 -8
- package/src/NavigationBar/NavigationSubMenu.jsx +7 -8
- package/src/NavigationBar/collapseItems.js +1 -3
- package/src/NavigationBar/resolveItemSelection.js +1 -3
- package/src/OptimizeImage/OptimizeImage.jsx +3 -6
- package/src/OptimizeImage/utils/getFallbackUrl.js +2 -2
- package/src/OptimizeImage/utils/getImageUrls.js +3 -3
- package/src/OptimizeImage/utils/getOptimizedUrl.js +2 -9
- package/src/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/src/OptimizeImage/utils/index.js +4 -4
- package/src/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/src/OrderedList/OrderedList.jsx +3 -8
- package/src/OrderedList/OrderedListBase.jsx +2 -7
- package/src/OrderedList/{Item.jsx → OrderedListItem.jsx} +44 -32
- package/src/OrderedList/{ItemBase.jsx → OrderedListItemBase.jsx} +4 -4
- package/src/OrderedList/constants.js +0 -1
- package/src/Paragraph/Paragraph.jsx +7 -9
- package/src/PreviewCard/PreviewCard.jsx +16 -32
- package/src/PreviewCard/{AuthorDate.jsx → PreviewCardAuthorDate.jsx} +3 -5
- package/src/PriceLockup/PriceLockup.jsx +33 -31
- package/src/PriceLockup/dictionary.js +1 -1
- package/src/PriceLockup/tokens.js +1 -1
- package/src/Progress/ProgressBar.jsx +33 -30
- package/src/QuantitySelector/QuantitySelector.jsx +5 -7
- package/src/QuantitySelector/{SideButton.jsx → QuantitySelectorSideButton.jsx} +3 -4
- package/src/QuantitySelector/dictionary.js +1 -1
- package/src/ResponsiveImage/ResponsiveImage.jsx +1 -3
- package/src/Ribbon/Ribbon.jsx +35 -44
- package/src/SkeletonProvider/SkeletonImage.jsx +1 -3
- package/src/SkeletonProvider/SkeletonProvider.jsx +5 -9
- package/src/SkeletonProvider/SkeletonTypography.jsx +1 -3
- package/src/Span/Span.jsx +11 -11
- package/src/Spinner/Spinner.jsx +17 -19
- package/src/Spinner/SpinnerContent.jsx +4 -6
- package/src/StoryCard/StoryCard.jsx +15 -16
- package/src/Table/Table.jsx +81 -75
- package/src/Table/{Body.jsx → TableBody.jsx} +3 -5
- package/src/Table/{Cell.jsx → TableCell.jsx} +69 -65
- package/src/Table/{Header.jsx → TableHeader.jsx} +6 -8
- package/src/Table/{Row.jsx → TableRow.jsx} +11 -12
- package/src/Table/{SubHeading.jsx → TableSubHeading.jsx} +6 -8
- package/src/TermsAndConditions/ExpandCollapse.jsx +18 -19
- package/src/TermsAndConditions/TermsAndConditions.jsx +37 -37
- package/src/TermsAndConditions/dictionary.js +1 -1
- package/src/Testimonial/Testimonial.jsx +20 -28
- package/src/Toast/Toast.jsx +36 -35
- package/src/Video/ControlBar/ControlBar.jsx +28 -25
- package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +4 -6
- package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +26 -30
- package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +31 -33
- package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +40 -40
- package/src/Video/MiddleControlButton/MiddleControlButton.jsx +10 -12
- package/src/Video/Video.jsx +697 -683
- package/src/Video/videoText.js +1 -3
- package/src/VideoPicker/VideoPicker.jsx +37 -25
- package/src/VideoPicker/VideoPickerPlayer.jsx +2 -4
- package/src/VideoPicker/VideoPickerThumbnail.jsx +26 -15
- package/src/VideoPicker/VideoSlider.jsx +1 -3
- package/src/WaffleGrid/WaffleGrid.jsx +31 -27
- package/src/WebVideo/WebVideo.jsx +4 -6
- package/src/baseExports.js +27 -13
- package/src/index.js +46 -37
- package/src/server.js +1 -2
- package/src/shared/ConditionalWrapper/ConditionalWrapper.jsx +1 -3
- package/src/shared/FullBleedContent/FullBleedContent.jsx +26 -19
- package/src/shared/FullBleedContent/getFullBleedBorderRadius.js +1 -3
- package/src/shared/FullBleedContent/index.js +3 -8
- package/src/shared/FullBleedContent/useFullBleedContentProps.js +2 -5
- package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +5 -7
- package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +25 -25
- package/src/shared/VideoSplash/VideoSplash.jsx +7 -9
- package/src/shared/VideoSplash/helpers.js +1 -1
- package/src/utils/index.js +7 -7
- package/src/utils/isElementFocusable.js +1 -3
- package/src/utils/logger.js +0 -5
- package/src/utils/media.js +1 -1
- package/src/utils/renderStructuredContent.jsx +1 -3
- package/src/utils/scrollToAnchor.js +1 -3
- package/src/utils/ssr.js +1 -3
- package/src/utils/theming/get-theme-from-server.js +1 -1
- package/src/utils/theming/with-client-theme.jsx +1 -3
- package/src/utils/theming/with-server-theme.jsx +2 -4
- package/src/utils/transforms.js +0 -2
- package/src/utils/useOverlaidPosition.js +1 -3
- package/src/utils/useTypographyTheme.js +1 -3
- package/types/Autocomplete.d.ts +1 -3
- package/types/Badge.d.ts +1 -3
- package/types/BaseProvider.d.ts +1 -3
- package/types/BlockQuote.d.ts +1 -3
- package/types/Box.d.ts +1 -3
- package/types/BreadcrumbItem.d.ts +1 -3
- package/types/Breadcrumbs.d.ts +2 -4
- package/types/Callout.d.ts +1 -3
- package/types/Card.d.ts +1 -3
- package/types/Cell.d.ts +1 -3
- package/types/ControlBar.d.ts +1 -3
- package/types/Countdown.d.ts +1 -3
- package/types/DatePicker.d.ts +1 -3
- package/types/FileUpload.d.ts +1 -3
- package/types/Footnote.d.ts +1 -3
- package/types/FootnoteLink.d.ts +1 -3
- package/types/Listbox.d.ts +1 -3
- package/types/MiddleControlButton.d.ts +1 -3
- package/types/MultiSelectFilter.d.ts +1 -3
- package/types/PriceLockup.d.ts +1 -3
- package/types/QuantitySelector.d.ts +1 -3
- package/types/Ribbon.d.ts +1 -3
- package/types/Spinner.d.ts +1 -3
- package/types/Table.d.ts +1 -3
- package/types/Tooltip.d.ts +1 -3
- package/types/TooltipButton.d.ts +1 -3
- package/types/Typography.d.ts +1 -3
- package/types/Video.d.ts +1 -3
- package/types/VideoButton.d.ts +1 -3
- package/types/VideoMenu.d.ts +1 -3
- package/types/VideoProgressBar.d.ts +1 -3
- package/types/VolumeSlider.d.ts +1 -3
- package/types/WebVideo.d.ts +1 -3
- package/lib/cjs/Badge/index.js +0 -9
- package/lib/cjs/BlockQuote/index.js +0 -9
- package/lib/cjs/Breadcrumbs/index.js +0 -13
- package/lib/cjs/Callout/index.js +0 -9
- package/lib/cjs/Card/index.js +0 -9
- package/lib/cjs/Countdown/index.js +0 -9
- package/lib/cjs/DatePicker/index.js +0 -9
- package/lib/cjs/Disclaimer/index.js +0 -13
- package/lib/cjs/Footnote/index.js +0 -11
- package/lib/cjs/IconButton/index.js +0 -9
- package/lib/cjs/Image/index.js +0 -20
- package/lib/cjs/List/index.js +0 -17
- package/lib/cjs/NavigationBar/index.js +0 -11
- package/lib/cjs/OptimizeImage/index.js +0 -9
- package/lib/cjs/OrderedList/index.js +0 -17
- package/lib/cjs/Paragraph/index.js +0 -9
- package/lib/cjs/PreviewCard/index.js +0 -9
- package/lib/cjs/PriceLockup/index.js +0 -9
- package/lib/cjs/Progress/index.js +0 -11
- package/lib/cjs/QuantitySelector/index.js +0 -9
- package/lib/cjs/ResponsiveImage/index.js +0 -9
- package/lib/cjs/Ribbon/index.js +0 -9
- package/lib/cjs/SkeletonProvider/index.js +0 -9
- package/lib/cjs/Span/index.js +0 -9
- package/lib/cjs/Spinner/index.js +0 -9
- package/lib/cjs/StoryCard/index.js +0 -9
- package/lib/cjs/Table/index.js +0 -24
- package/lib/cjs/TermsAndConditions/index.js +0 -13
- package/lib/cjs/Testimonial/index.js +0 -9
- package/lib/cjs/Toast/index.js +0 -9
- package/lib/cjs/Video/index.js +0 -9
- package/lib/cjs/VideoPicker/index.js +0 -9
- package/lib/cjs/WaffleGrid/index.js +0 -9
- package/lib/cjs/WebVideo/index.js +0 -9
- package/lib/cjs/shared/ConditionalWrapper/index.js +0 -9
- package/lib/esm/Badge/index.js +0 -2
- package/lib/esm/BlockQuote/index.js +0 -2
- package/lib/esm/Breadcrumbs/index.js +0 -1
- package/lib/esm/Callout/index.js +0 -2
- package/lib/esm/Card/index.js +0 -2
- package/lib/esm/Countdown/index.js +0 -2
- package/lib/esm/DatePicker/index.js +0 -2
- package/lib/esm/Disclaimer/index.js +0 -1
- package/lib/esm/Footnote/index.js +0 -4
- package/lib/esm/IconButton/index.js +0 -2
- package/lib/esm/Image/index.js +0 -9
- package/lib/esm/List/index.js +0 -5
- package/lib/esm/NavigationBar/index.js +0 -4
- package/lib/esm/OptimizeImage/index.js +0 -2
- package/lib/esm/OrderedList/index.js +0 -5
- package/lib/esm/Paragraph/index.js +0 -2
- package/lib/esm/PreviewCard/index.js +0 -2
- package/lib/esm/PriceLockup/index.js +0 -2
- package/lib/esm/Progress/index.js +0 -4
- package/lib/esm/QuantitySelector/index.js +0 -2
- package/lib/esm/ResponsiveImage/index.js +0 -2
- package/lib/esm/Ribbon/index.js +0 -2
- package/lib/esm/SkeletonProvider/index.js +0 -2
- package/lib/esm/Span/index.js +0 -2
- package/lib/esm/Spinner/index.js +0 -2
- package/lib/esm/StoryCard/index.js +0 -2
- package/lib/esm/Table/index.js +0 -17
- package/lib/esm/TermsAndConditions/index.js +0 -1
- package/lib/esm/Testimonial/index.js +0 -2
- package/lib/esm/Toast/index.js +0 -2
- package/lib/esm/Video/index.js +0 -2
- package/lib/esm/VideoPicker/index.js +0 -2
- package/lib/esm/WaffleGrid/index.js +0 -2
- package/lib/esm/WebVideo/index.js +0 -2
- package/lib/esm/shared/ConditionalWrapper/index.js +0 -2
- package/src/Badge/index.js +0 -3
- package/src/BlockQuote/index.js +0 -3
- package/src/Breadcrumbs/index.js +0 -1
- package/src/Callout/index.js +0 -3
- package/src/Card/index.js +0 -3
- package/src/Countdown/index.js +0 -3
- package/src/DatePicker/index.js +0 -3
- package/src/Disclaimer/index.js +0 -1
- package/src/Footnote/index.js +0 -6
- package/src/IconButton/index.js +0 -3
- package/src/Image/index.js +0 -10
- package/src/List/index.js +0 -8
- package/src/NavigationBar/index.js +0 -6
- package/src/OptimizeImage/index.js +0 -3
- package/src/OrderedList/index.js +0 -8
- package/src/Paragraph/index.js +0 -3
- package/src/PreviewCard/index.js +0 -3
- package/src/PriceLockup/index.js +0 -3
- package/src/Progress/index.js +0 -6
- package/src/QuantitySelector/index.js +0 -3
- package/src/ResponsiveImage/index.js +0 -3
- package/src/Ribbon/index.js +0 -3
- package/src/SkeletonProvider/index.js +0 -3
- package/src/Span/index.js +0 -3
- package/src/Spinner/index.js +0 -3
- package/src/StoryCard/index.js +0 -3
- package/src/Table/index.js +0 -20
- package/src/TermsAndConditions/index.js +0 -1
- package/src/Testimonial/index.js +0 -3
- package/src/Toast/index.js +0 -3
- package/src/Video/index.js +0 -3
- package/src/VideoPicker/index.js +0 -3
- package/src/WaffleGrid/index.js +0 -3
- package/src/WebVideo/index.js +0 -3
- package/src/shared/ConditionalWrapper/index.js +0 -3
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { Typography, useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
|
|
4
4
|
import styled from 'styled-components'
|
|
5
|
-
import videoText from '../../../videoText'
|
|
5
|
+
import { videoText } from '../../../videoText'
|
|
6
6
|
import { htmlAttrs } from '../../../../utils'
|
|
7
7
|
|
|
8
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
@@ -14,18 +14,18 @@ const ProgressBarContainer = styled.div({
|
|
|
14
14
|
})
|
|
15
15
|
|
|
16
16
|
const sharedStyles = ({
|
|
17
|
-
thumbHeight,
|
|
18
|
-
thumbWidth,
|
|
19
|
-
thumbBackground,
|
|
20
|
-
trackGradientStart,
|
|
21
|
-
trackGradientEnd
|
|
17
|
+
$thumbHeight,
|
|
18
|
+
$thumbWidth,
|
|
19
|
+
$thumbBackground,
|
|
20
|
+
$trackGradientStart,
|
|
21
|
+
$trackGradientEnd
|
|
22
22
|
}) => ({
|
|
23
23
|
thumb: {
|
|
24
24
|
appearance: 'none',
|
|
25
|
-
height: thumbHeight,
|
|
26
|
-
width: thumbWidth,
|
|
25
|
+
height: $thumbHeight,
|
|
26
|
+
width: $thumbWidth,
|
|
27
27
|
borderRadius: '50%',
|
|
28
|
-
background: thumbBackground,
|
|
28
|
+
background: $thumbBackground,
|
|
29
29
|
cursor: 'pointer',
|
|
30
30
|
marginTop: -3,
|
|
31
31
|
|
|
@@ -38,22 +38,22 @@ const sharedStyles = ({
|
|
|
38
38
|
height: 2,
|
|
39
39
|
cursor: 'pointer',
|
|
40
40
|
borderRadius: 1.3,
|
|
41
|
-
background: `linear-gradient(to right, ${trackGradientStart} 0%,${trackGradientEnd} ${
|
|
41
|
+
background: `linear-gradient(to right, ${$trackGradientStart} 0%,${$trackGradientEnd} ${
|
|
42
42
|
videoBufferDisplay - 0.01
|
|
43
43
|
}% ,rgba(255,255,255,0.5) ${videoBufferDisplay}%)` // TODO: replace with opaque white from palette
|
|
44
44
|
})
|
|
45
45
|
})
|
|
46
46
|
|
|
47
|
-
const StyledProgressBar = styled.input.attrs(({ videoCurrentTime }) => ({
|
|
48
|
-
value: videoCurrentTime
|
|
49
|
-
}))(({ videoBufferDisplay, rangeBackground, ...sharedProps }) => ({
|
|
47
|
+
const StyledProgressBar = styled.input.attrs(({ $videoCurrentTime }) => ({
|
|
48
|
+
value: $videoCurrentTime
|
|
49
|
+
}))(({ $videoBufferDisplay, $rangeBackground, ...sharedProps }) => ({
|
|
50
50
|
width: '100%',
|
|
51
51
|
cursor: 'pointer',
|
|
52
52
|
padding: '5px 0',
|
|
53
53
|
'input[type=range]&': {
|
|
54
54
|
appearance: 'none',
|
|
55
55
|
width: '100%',
|
|
56
|
-
background: rangeBackground
|
|
56
|
+
background: $rangeBackground
|
|
57
57
|
},
|
|
58
58
|
|
|
59
59
|
'input[type=range]&:focus': {
|
|
@@ -72,24 +72,24 @@ const StyledProgressBar = styled.input.attrs(({ videoCurrentTime }) => ({
|
|
|
72
72
|
},
|
|
73
73
|
|
|
74
74
|
'input[type=range]&::-webkit-slider-runnable-track':
|
|
75
|
-
sharedStyles(sharedProps).track(videoBufferDisplay),
|
|
76
|
-
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track(videoBufferDisplay),
|
|
75
|
+
sharedStyles(sharedProps).track($videoBufferDisplay),
|
|
76
|
+
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track($videoBufferDisplay),
|
|
77
77
|
'input[type=range]&::-ms-track': {
|
|
78
|
-
...sharedStyles(sharedProps).track(videoBufferDisplay),
|
|
78
|
+
...sharedStyles(sharedProps).track($videoBufferDisplay),
|
|
79
79
|
margin: '6px 0',
|
|
80
80
|
border: 'none'
|
|
81
81
|
},
|
|
82
82
|
|
|
83
83
|
'input[type=range]&::-ms-fill-lower': {
|
|
84
|
-
background: rangeBackground
|
|
84
|
+
background: $rangeBackground
|
|
85
85
|
},
|
|
86
86
|
'input[type=range]&::-ms-tooltip': {
|
|
87
87
|
display: 'none'
|
|
88
88
|
}
|
|
89
89
|
}))
|
|
90
90
|
|
|
91
|
-
const StyledTimestamp = styled.span(({ margin }) => ({
|
|
92
|
-
margin
|
|
91
|
+
const StyledTimestamp = styled.span(({ $margin }) => ({
|
|
92
|
+
margin: $margin
|
|
93
93
|
}))
|
|
94
94
|
// TODO: unify with the helper from `VideoSplash`
|
|
95
95
|
function getTimestamp(duration) {
|
|
@@ -99,7 +99,7 @@ function getTimestamp(duration) {
|
|
|
99
99
|
return `${minutes}:${seconds < 10 ? 0 : ''}${seconds}`
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
const VideoProgressBar = ({
|
|
102
|
+
export const VideoProgressBar = ({
|
|
103
103
|
copy = 'en',
|
|
104
104
|
videoLength,
|
|
105
105
|
videoCurrentTime,
|
|
@@ -140,17 +140,16 @@ const VideoProgressBar = ({
|
|
|
140
140
|
const remainingTimestamp = getTimestamp(remainingTime)
|
|
141
141
|
|
|
142
142
|
const sharedProps = {
|
|
143
|
-
thumbWidth,
|
|
144
|
-
thumbHeight,
|
|
145
|
-
thumbBackground,
|
|
146
|
-
trackGradientStart,
|
|
147
|
-
trackGradientEnd
|
|
148
|
-
rangeBackground
|
|
143
|
+
$thumbWidth: thumbWidth,
|
|
144
|
+
$thumbHeight: thumbHeight,
|
|
145
|
+
$thumbBackground: thumbBackground,
|
|
146
|
+
$trackGradientStart: trackGradientStart,
|
|
147
|
+
$trackGradientEnd: trackGradientEnd
|
|
149
148
|
}
|
|
150
149
|
|
|
151
150
|
return (
|
|
152
151
|
<ProgressBarContainer {...selectProps(rest)}>
|
|
153
|
-
<StyledTimestamp margin={`0 ${timestampMarginRight}px 0 ${timestampMarginLeft}px`}>
|
|
152
|
+
<StyledTimestamp $margin={`0 ${timestampMarginRight}px 0 ${timestampMarginLeft}px`}>
|
|
154
153
|
<Typography variant={{ inverse: true }}>{currentTimestamp}</Typography>
|
|
155
154
|
</StyledTimestamp>
|
|
156
155
|
<StyledProgressBar
|
|
@@ -158,16 +157,17 @@ const VideoProgressBar = ({
|
|
|
158
157
|
type="range"
|
|
159
158
|
step="any"
|
|
160
159
|
max={videoLength}
|
|
161
|
-
videoCurrentTime={videoCurrentTime}
|
|
160
|
+
$videoCurrentTime={videoCurrentTime}
|
|
162
161
|
onChange={handleVideoSkip}
|
|
163
162
|
onFocus={resetInactivityTimer}
|
|
164
|
-
videoBufferDisplay={videoBufferDisplay}
|
|
163
|
+
$videoBufferDisplay={videoBufferDisplay}
|
|
164
|
+
$rangeBackground={rangeBackground}
|
|
165
165
|
ref={videoProgressBar}
|
|
166
166
|
tabIndex="-1"
|
|
167
167
|
{...sharedProps}
|
|
168
168
|
/>
|
|
169
169
|
<StyledTimestamp
|
|
170
|
-
margin={`0 ${remainingTimestampMarginRight}px 0 ${remainingTimestampMarginLeft}px`}
|
|
170
|
+
$margin={`0 ${remainingTimestampMarginRight}px 0 ${remainingTimestampMarginLeft}px`}
|
|
171
171
|
>
|
|
172
172
|
<Typography variant={{ inverse: true }}>{remainingTimestamp}</Typography>
|
|
173
173
|
</StyledTimestamp>
|
|
@@ -184,5 +184,3 @@ VideoProgressBar.propTypes = {
|
|
|
184
184
|
setSeek: PropTypes.func.isRequired,
|
|
185
185
|
resetInactivityTimer: PropTypes.func.isRequired
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
export default VideoProgressBar
|
|
@@ -2,33 +2,35 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { Icon, useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
|
|
4
4
|
import styled from 'styled-components'
|
|
5
|
-
import VideoButton from '../VideoButton/VideoButton'
|
|
6
|
-
import videoText from '../../../videoText'
|
|
5
|
+
import { VideoButton } from '../VideoButton/VideoButton'
|
|
6
|
+
import { videoText } from '../../../videoText'
|
|
7
7
|
import { htmlAttrs } from '../../../../utils'
|
|
8
8
|
|
|
9
9
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
10
10
|
|
|
11
|
-
const VolumeSliderContainer = styled.div(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
const VolumeSliderContainer = styled.div(
|
|
12
|
+
({ $videoPlayerWidth, $compactModeThreshold, $margin }) => ({
|
|
13
|
+
display: 'flex',
|
|
14
|
+
width: $videoPlayerWidth > $compactModeThreshold ? '12%' : '20%',
|
|
15
|
+
maxWidth: 120,
|
|
16
|
+
margin: $margin,
|
|
17
|
+
alignItems: 'center'
|
|
18
|
+
})
|
|
19
|
+
)
|
|
18
20
|
|
|
19
21
|
const sharedStyles = ({
|
|
20
|
-
thumbHeight,
|
|
21
|
-
thumbWidth,
|
|
22
|
-
thumbBackground,
|
|
23
|
-
trackGradientStart,
|
|
24
|
-
trackGradientEnd
|
|
22
|
+
$thumbHeight,
|
|
23
|
+
$thumbWidth,
|
|
24
|
+
$thumbBackground,
|
|
25
|
+
$trackGradientStart,
|
|
26
|
+
$trackGradientEnd
|
|
25
27
|
}) => ({
|
|
26
28
|
thumb: {
|
|
27
29
|
appearance: 'none',
|
|
28
|
-
height: thumbHeight,
|
|
29
|
-
width: thumbWidth,
|
|
30
|
+
height: $thumbHeight,
|
|
31
|
+
width: $thumbWidth,
|
|
30
32
|
borderRadius: '50%',
|
|
31
|
-
background: thumbBackground,
|
|
33
|
+
background: $thumbBackground,
|
|
32
34
|
cursor: 'pointer',
|
|
33
35
|
marginTop: -3,
|
|
34
36
|
|
|
@@ -41,15 +43,15 @@ const sharedStyles = ({
|
|
|
41
43
|
height: 2,
|
|
42
44
|
cursor: 'pointer',
|
|
43
45
|
borderRadius: 1.3,
|
|
44
|
-
background: `linear-gradient(to right, ${trackGradientStart} 0%, ${trackGradientEnd} ${
|
|
46
|
+
background: `linear-gradient(to right, ${$trackGradientStart} 0%, ${$trackGradientEnd} ${
|
|
45
47
|
videoCurrentVolume * 100 - 0.01
|
|
46
48
|
}%, rgba(255,255,255,0.5) ${videoCurrentVolume * 100}%)`
|
|
47
49
|
})
|
|
48
50
|
})
|
|
49
51
|
|
|
50
|
-
const StyledVolumeSlider = styled.input.attrs(({ videoCurrentVolume }) => ({
|
|
51
|
-
value: videoCurrentVolume
|
|
52
|
-
}))(({ videoCurrentVolume, rangeBackground, ...sharedProps }) => {
|
|
52
|
+
const StyledVolumeSlider = styled.input.attrs(({ $videoCurrentVolume }) => ({
|
|
53
|
+
value: $videoCurrentVolume
|
|
54
|
+
}))(({ $videoCurrentVolume, $rangeBackground, ...sharedProps }) => {
|
|
53
55
|
return {
|
|
54
56
|
width: '100%',
|
|
55
57
|
cursor: 'pointer',
|
|
@@ -58,7 +60,7 @@ const StyledVolumeSlider = styled.input.attrs(({ videoCurrentVolume }) => ({
|
|
|
58
60
|
'input[type=range]&': {
|
|
59
61
|
appearance: 'none',
|
|
60
62
|
width: '100%',
|
|
61
|
-
background: rangeBackground
|
|
63
|
+
background: $rangeBackground
|
|
62
64
|
},
|
|
63
65
|
|
|
64
66
|
'input[type=range]&:focus': {
|
|
@@ -67,20 +69,20 @@ const StyledVolumeSlider = styled.input.attrs(({ videoCurrentVolume }) => ({
|
|
|
67
69
|
|
|
68
70
|
'input[type=range]&::-webkit-slider-thumb': sharedStyles(sharedProps).thumb,
|
|
69
71
|
'input[type=range]&::-moz-range-thumb': {
|
|
70
|
-
...sharedStyles.thumb,
|
|
72
|
+
...sharedStyles(sharedProps).thumb,
|
|
71
73
|
border: 'none'
|
|
72
74
|
},
|
|
73
75
|
'input[type=range]&::-ms-thumb': {
|
|
74
|
-
...sharedStyles.thumb,
|
|
76
|
+
...sharedStyles(sharedProps).thumb,
|
|
75
77
|
margin: 0,
|
|
76
78
|
border: 'none'
|
|
77
79
|
},
|
|
78
80
|
|
|
79
81
|
'input[type=range]&::-webkit-slider-runnable-track':
|
|
80
|
-
sharedStyles(sharedProps).track(videoCurrentVolume),
|
|
81
|
-
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track(videoCurrentVolume),
|
|
82
|
+
sharedStyles(sharedProps).track($videoCurrentVolume),
|
|
83
|
+
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track($videoCurrentVolume),
|
|
82
84
|
'input[type=range]&::-ms-track': {
|
|
83
|
-
...sharedStyles(sharedProps).track(videoCurrentVolume),
|
|
85
|
+
...sharedStyles(sharedProps).track($videoCurrentVolume),
|
|
84
86
|
margin: '6px 0',
|
|
85
87
|
border: 'none'
|
|
86
88
|
},
|
|
@@ -94,7 +96,7 @@ const StyledVolumeSlider = styled.input.attrs(({ videoCurrentVolume }) => ({
|
|
|
94
96
|
}
|
|
95
97
|
})
|
|
96
98
|
|
|
97
|
-
const VolumeSlider = ({
|
|
99
|
+
export const VolumeSlider = ({
|
|
98
100
|
setVolume,
|
|
99
101
|
compactModeThreshold,
|
|
100
102
|
disableFocus,
|
|
@@ -124,21 +126,20 @@ const VolumeSlider = ({
|
|
|
124
126
|
} = useThemeTokens('VideoVolumeSlider', tokens, variant)
|
|
125
127
|
|
|
126
128
|
const sharedProps = {
|
|
127
|
-
thumbHeight,
|
|
128
|
-
thumbWidth,
|
|
129
|
-
thumbBackground,
|
|
130
|
-
trackGradientStart,
|
|
131
|
-
trackGradientEnd
|
|
132
|
-
rangeBackground
|
|
129
|
+
$thumbHeight: thumbHeight,
|
|
130
|
+
$thumbWidth: thumbWidth,
|
|
131
|
+
$thumbBackground: thumbBackground,
|
|
132
|
+
$trackGradientStart: trackGradientStart,
|
|
133
|
+
$trackGradientEnd: trackGradientEnd
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
const handleVolumeChange = () => setVolume(refVolumeSlider.current.value)
|
|
136
137
|
|
|
137
138
|
return (
|
|
138
139
|
<VolumeSliderContainer
|
|
139
|
-
compactModeThreshold={compactModeThreshold}
|
|
140
|
-
videoPlayerWidth={videoPlayerWidth}
|
|
141
|
-
margin={`0 ${marginRight}px 0 ${marginLeft}px`}
|
|
140
|
+
$compactModeThreshold={compactModeThreshold}
|
|
141
|
+
$videoPlayerWidth={videoPlayerWidth}
|
|
142
|
+
$margin={`0 ${marginRight}px 0 ${marginLeft}px`}
|
|
142
143
|
{...selectProps(rest)}
|
|
143
144
|
>
|
|
144
145
|
<VideoButton
|
|
@@ -154,7 +155,8 @@ const VolumeSlider = ({
|
|
|
154
155
|
max="1"
|
|
155
156
|
step="any"
|
|
156
157
|
value={videoCurrentVolume}
|
|
157
|
-
videoCurrentVolume={videoCurrentVolume}
|
|
158
|
+
$videoCurrentVolume={videoCurrentVolume}
|
|
159
|
+
$rangeBackground={rangeBackground}
|
|
158
160
|
ref={refVolumeSlider}
|
|
159
161
|
onChange={handleVolumeChange}
|
|
160
162
|
onFocus={resetInactivityTimer}
|
|
@@ -178,5 +180,3 @@ VolumeSlider.propTypes = {
|
|
|
178
180
|
videoPlayerWidth: PropTypes.number.isRequired,
|
|
179
181
|
disableFocus: PropTypes.bool.isRequired
|
|
180
182
|
}
|
|
181
|
-
|
|
182
|
-
export default VolumeSlider
|
|
@@ -6,13 +6,13 @@ import { htmlAttrs } from '../../utils'
|
|
|
6
6
|
|
|
7
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
8
8
|
|
|
9
|
-
const StyledMiddleControlButton = styled.button(({ isHidden, width, height, background }) => ({
|
|
10
|
-
width,
|
|
11
|
-
height,
|
|
9
|
+
const StyledMiddleControlButton = styled.button(({ $isHidden, $width, $height, $background }) => ({
|
|
10
|
+
width: $width,
|
|
11
|
+
height: $height,
|
|
12
12
|
borderRadius: '50%',
|
|
13
13
|
transition: 'opacity 0.4s',
|
|
14
|
-
opacity: isHidden ? 0 : 1,
|
|
15
|
-
background,
|
|
14
|
+
opacity: $isHidden ? 0 : 1,
|
|
15
|
+
background: $background,
|
|
16
16
|
display: 'flex',
|
|
17
17
|
justifyContent: 'center',
|
|
18
18
|
border: 'none',
|
|
@@ -22,7 +22,7 @@ const StyledMiddleControlButton = styled.button(({ isHidden, width, height, back
|
|
|
22
22
|
alignItems: 'center'
|
|
23
23
|
}))
|
|
24
24
|
|
|
25
|
-
const MiddleControlButton = ({
|
|
25
|
+
export const MiddleControlButton = ({
|
|
26
26
|
icon: Icon,
|
|
27
27
|
isHidden = false,
|
|
28
28
|
onClick,
|
|
@@ -39,12 +39,12 @@ const MiddleControlButton = ({
|
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<StyledMiddleControlButton
|
|
42
|
-
isHidden={isHidden}
|
|
42
|
+
$isHidden={isHidden}
|
|
43
43
|
onClick={onClick}
|
|
44
44
|
onFocus={onFocus}
|
|
45
|
-
width={width}
|
|
46
|
-
height={height}
|
|
47
|
-
background={background}
|
|
45
|
+
$width={width}
|
|
46
|
+
$height={height}
|
|
47
|
+
$background={background}
|
|
48
48
|
{...selectProps(rest)}
|
|
49
49
|
>
|
|
50
50
|
<Icon color={iconColor} size={24} />
|
|
@@ -59,5 +59,3 @@ MiddleControlButton.propTypes = {
|
|
|
59
59
|
onClick: PropTypes.func,
|
|
60
60
|
onFocus: PropTypes.func
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
export default MiddleControlButton
|