@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,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { StackView, useThemeTokens, selectSystemProps, Icon, useViewport } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import VideoProgressBar from './Controls/VideoProgressBar/VideoProgressBar';
|
|
6
|
-
import VolumeSlider from './Controls/VolumeSlider/VolumeSlider';
|
|
7
|
-
import VideoButton from './Controls/VideoButton/VideoButton';
|
|
8
|
-
import VideoMenu from './Controls/VideoMenu/VideoMenu';
|
|
9
|
-
import videoText from '../videoText';
|
|
5
|
+
import { VideoProgressBar } from './Controls/VideoProgressBar/VideoProgressBar';
|
|
6
|
+
import { VolumeSlider } from './Controls/VolumeSlider/VolumeSlider';
|
|
7
|
+
import { VideoButton } from './Controls/VideoButton/VideoButton';
|
|
8
|
+
import { VideoMenu } from './Controls/VideoMenu/VideoMenu';
|
|
9
|
+
import { videoText } from '../videoText';
|
|
10
10
|
import { htmlAttrs } from '../../utils';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
@@ -18,15 +18,15 @@ const ControlBarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
18
18
|
componentId: "components-web__sc-13y61ky-0"
|
|
19
19
|
})(_ref => {
|
|
20
20
|
let {
|
|
21
|
-
isHidden,
|
|
22
|
-
isMobile
|
|
21
|
+
$isHidden,
|
|
22
|
+
$isMobile
|
|
23
23
|
} = _ref;
|
|
24
24
|
return {
|
|
25
25
|
width: '100%',
|
|
26
26
|
position: 'relative',
|
|
27
27
|
transition: 'opacity 0.4s',
|
|
28
|
-
opacity: isHidden ? 0 : 1,
|
|
29
|
-
display: isMobile ? 'none' : undefined
|
|
28
|
+
opacity: $isHidden ? 0 : 1,
|
|
29
|
+
display: $isMobile ? 'none' : undefined
|
|
30
30
|
};
|
|
31
31
|
});
|
|
32
32
|
const StyledControlBar = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -34,15 +34,15 @@ const StyledControlBar = /*#__PURE__*/styled.div.withConfig({
|
|
|
34
34
|
componentId: "components-web__sc-13y61ky-1"
|
|
35
35
|
})(_ref2 => {
|
|
36
36
|
let {
|
|
37
|
-
padding,
|
|
38
|
-
height
|
|
37
|
+
$padding,
|
|
38
|
+
$height
|
|
39
39
|
} = _ref2;
|
|
40
40
|
return {
|
|
41
41
|
boxSizing: 'border-box',
|
|
42
42
|
position: 'absolute',
|
|
43
43
|
width: '100%',
|
|
44
|
-
height,
|
|
45
|
-
padding,
|
|
44
|
+
height: $height,
|
|
45
|
+
padding: $padding,
|
|
46
46
|
bottom: 0,
|
|
47
47
|
backgroundColor: 'rgba(42, 44, 46, 0.85)',
|
|
48
48
|
// TODO: replace with opaque greyThunder
|
|
@@ -64,20 +64,20 @@ const MenuContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
64
64
|
componentId: "components-web__sc-13y61ky-3"
|
|
65
65
|
})(_ref3 => {
|
|
66
66
|
let {
|
|
67
|
-
isOpen,
|
|
68
|
-
menuBottom,
|
|
69
|
-
menuRight,
|
|
70
|
-
menuMarginLeft
|
|
67
|
+
$isOpen,
|
|
68
|
+
$menuBottom,
|
|
69
|
+
$menuRight,
|
|
70
|
+
$menuMarginLeft
|
|
71
71
|
} = _ref3;
|
|
72
72
|
return {
|
|
73
73
|
position: 'absolute',
|
|
74
|
-
bottom: menuBottom,
|
|
75
|
-
right: menuRight,
|
|
76
|
-
display: isOpen ? 'block' : 'none',
|
|
77
|
-
marginLeft: menuMarginLeft
|
|
74
|
+
bottom: $menuBottom,
|
|
75
|
+
right: $menuRight,
|
|
76
|
+
display: $isOpen ? 'block' : 'none',
|
|
77
|
+
marginLeft: $menuMarginLeft
|
|
78
78
|
};
|
|
79
79
|
});
|
|
80
|
-
const ControlBar = _ref4 => {
|
|
80
|
+
export const ControlBar = _ref4 => {
|
|
81
81
|
let {
|
|
82
82
|
videoPlayer,
|
|
83
83
|
videoPlayerContainer,
|
|
@@ -158,17 +158,18 @@ const ControlBar = _ref4 => {
|
|
|
158
158
|
return parsed;
|
|
159
159
|
};
|
|
160
160
|
const menuContainerStyleProps = {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
$isOpen: false,
|
|
162
|
+
$menuBottom: menuBottom,
|
|
163
|
+
$menuRight: menuRight,
|
|
164
|
+
$menuMarginLeft: menuMarginLeft
|
|
164
165
|
};
|
|
165
166
|
return /*#__PURE__*/_jsx(ControlBarContainer, {
|
|
166
|
-
isHidden: isHidden,
|
|
167
|
-
isMobile: isMobile,
|
|
167
|
+
$isHidden: isHidden,
|
|
168
|
+
$isMobile: isMobile,
|
|
168
169
|
...selectProps(rest),
|
|
169
170
|
children: /*#__PURE__*/_jsxs(StyledControlBar, {
|
|
170
|
-
padding: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
|
|
171
|
-
height: `${height}px`,
|
|
171
|
+
$padding: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
|
|
172
|
+
$height: `${height}px`,
|
|
172
173
|
children: [/*#__PURE__*/_jsx(VideoProgressBarContainer, {
|
|
173
174
|
children: /*#__PURE__*/_jsx(VideoProgressBar, {
|
|
174
175
|
copy: copy,
|
|
@@ -225,8 +226,8 @@ const ControlBar = _ref4 => {
|
|
|
225
226
|
onBlur: resetInactivityTimer
|
|
226
227
|
})]
|
|
227
228
|
}), captionsMenuOpen && /*#__PURE__*/_jsx(MenuContainer, {
|
|
228
|
-
isOpen: captionsMenuOpen,
|
|
229
229
|
...menuContainerStyleProps,
|
|
230
|
+
$isOpen: captionsMenuOpen,
|
|
230
231
|
children: /*#__PURE__*/_jsx(VideoMenu, {
|
|
231
232
|
menuLabel: videoText[copy].captionsDialogue,
|
|
232
233
|
menuOptions: parseTracks(),
|
|
@@ -235,8 +236,8 @@ const ControlBar = _ref4 => {
|
|
|
235
236
|
copy: copy
|
|
236
237
|
})
|
|
237
238
|
}), qualityMenuOpen && /*#__PURE__*/_jsx(MenuContainer, {
|
|
238
|
-
isOpen: qualityMenuOpen,
|
|
239
239
|
...menuContainerStyleProps,
|
|
240
|
+
$isOpen: qualityMenuOpen,
|
|
240
241
|
children: /*#__PURE__*/_jsx(VideoMenu, {
|
|
241
242
|
menuLabel: videoText[copy].qualityDialogue,
|
|
242
243
|
menuOptions: parseVideoQuality(),
|
|
@@ -283,5 +284,4 @@ ControlBar.propTypes = {
|
|
|
283
284
|
copy: PropTypes.oneOf(['en', 'fr']).isRequired,
|
|
284
285
|
compactModeThreshold: PropTypes.number.isRequired,
|
|
285
286
|
videoPlayerWidth: PropTypes.number.isRequired
|
|
286
|
-
};
|
|
287
|
-
export default ControlBar;
|
|
287
|
+
};
|
|
@@ -10,7 +10,7 @@ const StyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
10
10
|
componentId: "components-web__sc-kfw0tr-0"
|
|
11
11
|
})(_ref => {
|
|
12
12
|
let {
|
|
13
|
-
color
|
|
13
|
+
$color
|
|
14
14
|
} = _ref;
|
|
15
15
|
return {
|
|
16
16
|
background: 'none',
|
|
@@ -20,11 +20,11 @@ const StyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
20
20
|
display: 'inline-flex',
|
|
21
21
|
alignItems: 'stretch',
|
|
22
22
|
'svg path': {
|
|
23
|
-
fill: color
|
|
23
|
+
fill: $color
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
});
|
|
27
|
-
const VideoButton = _ref2 => {
|
|
27
|
+
export const VideoButton = _ref2 => {
|
|
28
28
|
let {
|
|
29
29
|
icon,
|
|
30
30
|
label,
|
|
@@ -53,7 +53,7 @@ const VideoButton = _ref2 => {
|
|
|
53
53
|
"aria-label": label,
|
|
54
54
|
onKeyDown: handleOnKeyDown,
|
|
55
55
|
tabIndex: disableFocus ? '-1' : undefined,
|
|
56
|
-
color: color,
|
|
56
|
+
$color: color,
|
|
57
57
|
...selectProps(rest),
|
|
58
58
|
onClick: handleClick,
|
|
59
59
|
children: [icon, children]
|
|
@@ -65,5 +65,4 @@ VideoButton.propTypes = {
|
|
|
65
65
|
label: PropTypes.string.isRequired,
|
|
66
66
|
disableFocus: PropTypes.bool.isRequired,
|
|
67
67
|
children: PropTypes.node
|
|
68
|
-
};
|
|
69
|
-
export default VideoButton;
|
|
68
|
+
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { StackView, Typography, useThemeTokens, selectSystemProps, Icon } 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
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
@@ -11,13 +11,13 @@ const MenuContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
11
11
|
componentId: "components-web__sc-nllbhw-0"
|
|
12
12
|
})(_ref => {
|
|
13
13
|
let {
|
|
14
|
-
padding,
|
|
15
|
-
background
|
|
14
|
+
$padding,
|
|
15
|
+
$background
|
|
16
16
|
} = _ref;
|
|
17
17
|
return {
|
|
18
18
|
width: 114,
|
|
19
|
-
padding,
|
|
20
|
-
backgroundColor: background,
|
|
19
|
+
padding: $padding,
|
|
20
|
+
backgroundColor: $background,
|
|
21
21
|
borderRadius: 5
|
|
22
22
|
};
|
|
23
23
|
});
|
|
@@ -39,31 +39,31 @@ const CheckmarkContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
39
39
|
componentId: "components-web__sc-nllbhw-2"
|
|
40
40
|
})(_ref2 => {
|
|
41
41
|
let {
|
|
42
|
-
isSelectedItem,
|
|
43
|
-
checkMarkWidth,
|
|
44
|
-
checkMarkHeight,
|
|
45
|
-
checkMarkSelectedColor,
|
|
46
|
-
checkMarkHoverColor,
|
|
47
|
-
checkMarkFocusColor,
|
|
48
|
-
checkMarkUnselectedColor
|
|
42
|
+
$isSelectedItem,
|
|
43
|
+
$checkMarkWidth,
|
|
44
|
+
$checkMarkHeight,
|
|
45
|
+
$checkMarkSelectedColor,
|
|
46
|
+
$checkMarkHoverColor,
|
|
47
|
+
$checkMarkFocusColor,
|
|
48
|
+
$checkMarkUnselectedColor
|
|
49
49
|
} = _ref2;
|
|
50
50
|
return {
|
|
51
|
-
width: checkMarkWidth,
|
|
52
|
-
height: checkMarkHeight,
|
|
51
|
+
width: $checkMarkWidth,
|
|
52
|
+
height: $checkMarkHeight,
|
|
53
53
|
marginTop: 2,
|
|
54
54
|
outline: 'none',
|
|
55
55
|
[`${MenuButton} && svg`]: {
|
|
56
|
-
fill: isSelectedItem ? checkMarkSelectedColor : checkMarkUnselectedColor
|
|
56
|
+
fill: $isSelectedItem ? $checkMarkSelectedColor : $checkMarkUnselectedColor
|
|
57
57
|
},
|
|
58
58
|
[`${MenuButton}:hover && svg`]: {
|
|
59
|
-
fill: isSelectedItem ? checkMarkSelectedColor : checkMarkHoverColor
|
|
59
|
+
fill: $isSelectedItem ? $checkMarkSelectedColor : $checkMarkHoverColor
|
|
60
60
|
},
|
|
61
61
|
[`${MenuButton}:focus && svg`]: {
|
|
62
|
-
fill: isSelectedItem ? checkMarkSelectedColor : checkMarkFocusColor
|
|
62
|
+
fill: $isSelectedItem ? $checkMarkSelectedColor : $checkMarkFocusColor
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
});
|
|
66
|
-
const VideoMenu = _ref3 => {
|
|
66
|
+
export const VideoMenu = _ref3 => {
|
|
67
67
|
let {
|
|
68
68
|
menuLabel,
|
|
69
69
|
menuOptions,
|
|
@@ -92,8 +92,6 @@ const VideoMenu = _ref3 => {
|
|
|
92
92
|
"aria-haspopup": "true",
|
|
93
93
|
role: "menuitem",
|
|
94
94
|
"aria-label": `${option.name} ${menuLabel}. ${selectedItem === option.value ? videoText[copy].itemSelected : videoText[copy].itemUnselected}`,
|
|
95
|
-
selectedItem: selectedItem,
|
|
96
|
-
itemValue: option.value,
|
|
97
95
|
onClick: () => {
|
|
98
96
|
if (selectedItem !== option.value) {
|
|
99
97
|
setSelection(option.value);
|
|
@@ -106,13 +104,13 @@ const VideoMenu = _ref3 => {
|
|
|
106
104
|
},
|
|
107
105
|
children: option.name
|
|
108
106
|
}), /*#__PURE__*/_jsx(CheckmarkContainer, {
|
|
109
|
-
isSelectedItem: option.value === selectedItem,
|
|
110
|
-
checkMarkWidth: checkMarkWidth,
|
|
111
|
-
checkMarkHeight: checkMarkHeight,
|
|
112
|
-
checkMarkSelectedColor: checkMarkSelectedColor,
|
|
113
|
-
checkMarkHoverColor: checkMarkHoverColor,
|
|
114
|
-
checkMarkFocusColor: checkMarkFocusColor,
|
|
115
|
-
checkMarkUnselectedColor: checkMarkUnselectedColor,
|
|
107
|
+
$isSelectedItem: option.value === selectedItem,
|
|
108
|
+
$checkMarkWidth: checkMarkWidth,
|
|
109
|
+
$checkMarkHeight: checkMarkHeight,
|
|
110
|
+
$checkMarkSelectedColor: checkMarkSelectedColor,
|
|
111
|
+
$checkMarkHoverColor: checkMarkHoverColor,
|
|
112
|
+
$checkMarkFocusColor: checkMarkFocusColor,
|
|
113
|
+
$checkMarkUnselectedColor: checkMarkUnselectedColor,
|
|
116
114
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
117
115
|
icon: checkMarkIcon
|
|
118
116
|
})
|
|
@@ -132,8 +130,8 @@ const VideoMenu = _ref3 => {
|
|
|
132
130
|
};
|
|
133
131
|
return /*#__PURE__*/_jsx(MenuContainer, {
|
|
134
132
|
onKeyDown: handleOnKeyDown,
|
|
135
|
-
padding: padding,
|
|
136
|
-
background: background,
|
|
133
|
+
$padding: padding,
|
|
134
|
+
$background: background,
|
|
137
135
|
...selectProps(rest),
|
|
138
136
|
children: /*#__PURE__*/_jsxs(StackView, {
|
|
139
137
|
space: 2,
|
|
@@ -158,5 +156,4 @@ VideoMenu.propTypes = {
|
|
|
158
156
|
setSelection: PropTypes.func.isRequired,
|
|
159
157
|
selectedItem: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
160
158
|
copy: PropTypes.oneOf(['en', 'fr']).isRequired
|
|
161
|
-
};
|
|
162
|
-
export default VideoMenu;
|
|
159
|
+
};
|
|
@@ -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
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
@@ -16,19 +16,19 @@ const ProgressBarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
16
16
|
});
|
|
17
17
|
const sharedStyles = _ref => {
|
|
18
18
|
let {
|
|
19
|
-
thumbHeight,
|
|
20
|
-
thumbWidth,
|
|
21
|
-
thumbBackground,
|
|
22
|
-
trackGradientStart,
|
|
23
|
-
trackGradientEnd
|
|
19
|
+
$thumbHeight,
|
|
20
|
+
$thumbWidth,
|
|
21
|
+
$thumbBackground,
|
|
22
|
+
$trackGradientStart,
|
|
23
|
+
$trackGradientEnd
|
|
24
24
|
} = _ref;
|
|
25
25
|
return {
|
|
26
26
|
thumb: {
|
|
27
27
|
appearance: 'none',
|
|
28
|
-
height: thumbHeight,
|
|
29
|
-
width: thumbWidth,
|
|
28
|
+
height: $thumbHeight,
|
|
29
|
+
width: $thumbWidth,
|
|
30
30
|
borderRadius: '50%',
|
|
31
|
-
background: thumbBackground,
|
|
31
|
+
background: $thumbBackground,
|
|
32
32
|
cursor: 'pointer',
|
|
33
33
|
marginTop: -3,
|
|
34
34
|
'&:hover': {
|
|
@@ -40,24 +40,24 @@ const sharedStyles = _ref => {
|
|
|
40
40
|
height: 2,
|
|
41
41
|
cursor: 'pointer',
|
|
42
42
|
borderRadius: 1.3,
|
|
43
|
-
background: `linear-gradient(to right, ${trackGradientStart} 0%,${trackGradientEnd} ${videoBufferDisplay - 0.01}% ,rgba(255,255,255,0.5) ${videoBufferDisplay}%)` // TODO: replace with opaque white from palette
|
|
43
|
+
background: `linear-gradient(to right, ${$trackGradientStart} 0%,${$trackGradientEnd} ${videoBufferDisplay - 0.01}% ,rgba(255,255,255,0.5) ${videoBufferDisplay}%)` // TODO: replace with opaque white from palette
|
|
44
44
|
})
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
const StyledProgressBar = /*#__PURE__*/styled.input.attrs(_ref2 => {
|
|
48
48
|
let {
|
|
49
|
-
videoCurrentTime
|
|
49
|
+
$videoCurrentTime
|
|
50
50
|
} = _ref2;
|
|
51
51
|
return {
|
|
52
|
-
value: videoCurrentTime
|
|
52
|
+
value: $videoCurrentTime
|
|
53
53
|
};
|
|
54
54
|
}).withConfig({
|
|
55
55
|
displayName: "VideoProgressBar__StyledProgressBar",
|
|
56
56
|
componentId: "components-web__sc-d9tm07-1"
|
|
57
57
|
})(_ref3 => {
|
|
58
58
|
let {
|
|
59
|
-
videoBufferDisplay,
|
|
60
|
-
rangeBackground,
|
|
59
|
+
$videoBufferDisplay,
|
|
60
|
+
$rangeBackground,
|
|
61
61
|
...sharedProps
|
|
62
62
|
} = _ref3;
|
|
63
63
|
return {
|
|
@@ -67,7 +67,7 @@ const StyledProgressBar = /*#__PURE__*/styled.input.attrs(_ref2 => {
|
|
|
67
67
|
'input[type=range]&': {
|
|
68
68
|
appearance: 'none',
|
|
69
69
|
width: '100%',
|
|
70
|
-
background: rangeBackground
|
|
70
|
+
background: $rangeBackground
|
|
71
71
|
},
|
|
72
72
|
'input[type=range]&:focus': {
|
|
73
73
|
outline: 'none'
|
|
@@ -82,15 +82,15 @@ const StyledProgressBar = /*#__PURE__*/styled.input.attrs(_ref2 => {
|
|
|
82
82
|
margin: 0,
|
|
83
83
|
border: 'none'
|
|
84
84
|
},
|
|
85
|
-
'input[type=range]&::-webkit-slider-runnable-track': sharedStyles(sharedProps).track(videoBufferDisplay),
|
|
86
|
-
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track(videoBufferDisplay),
|
|
85
|
+
'input[type=range]&::-webkit-slider-runnable-track': sharedStyles(sharedProps).track($videoBufferDisplay),
|
|
86
|
+
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track($videoBufferDisplay),
|
|
87
87
|
'input[type=range]&::-ms-track': {
|
|
88
|
-
...sharedStyles(sharedProps).track(videoBufferDisplay),
|
|
88
|
+
...sharedStyles(sharedProps).track($videoBufferDisplay),
|
|
89
89
|
margin: '6px 0',
|
|
90
90
|
border: 'none'
|
|
91
91
|
},
|
|
92
92
|
'input[type=range]&::-ms-fill-lower': {
|
|
93
|
-
background: rangeBackground
|
|
93
|
+
background: $rangeBackground
|
|
94
94
|
},
|
|
95
95
|
'input[type=range]&::-ms-tooltip': {
|
|
96
96
|
display: 'none'
|
|
@@ -102,10 +102,10 @@ const StyledTimestamp = /*#__PURE__*/styled.span.withConfig({
|
|
|
102
102
|
componentId: "components-web__sc-d9tm07-2"
|
|
103
103
|
})(_ref4 => {
|
|
104
104
|
let {
|
|
105
|
-
margin
|
|
105
|
+
$margin
|
|
106
106
|
} = _ref4;
|
|
107
107
|
return {
|
|
108
|
-
margin
|
|
108
|
+
margin: $margin
|
|
109
109
|
};
|
|
110
110
|
});
|
|
111
111
|
// TODO: unify with the helper from `VideoSplash`
|
|
@@ -114,7 +114,7 @@ function getTimestamp(duration) {
|
|
|
114
114
|
const seconds = Math.floor(duration - 60 * minutes);
|
|
115
115
|
return `${minutes}:${seconds < 10 ? 0 : ''}${seconds}`;
|
|
116
116
|
}
|
|
117
|
-
const VideoProgressBar = _ref5 => {
|
|
117
|
+
export const VideoProgressBar = _ref5 => {
|
|
118
118
|
let {
|
|
119
119
|
copy = 'en',
|
|
120
120
|
videoLength,
|
|
@@ -152,17 +152,16 @@ const VideoProgressBar = _ref5 => {
|
|
|
152
152
|
const currentTimestamp = getTimestamp(currentTime);
|
|
153
153
|
const remainingTimestamp = getTimestamp(remainingTime);
|
|
154
154
|
const sharedProps = {
|
|
155
|
-
thumbWidth,
|
|
156
|
-
thumbHeight,
|
|
157
|
-
thumbBackground,
|
|
158
|
-
trackGradientStart,
|
|
159
|
-
trackGradientEnd
|
|
160
|
-
rangeBackground
|
|
155
|
+
$thumbWidth: thumbWidth,
|
|
156
|
+
$thumbHeight: thumbHeight,
|
|
157
|
+
$thumbBackground: thumbBackground,
|
|
158
|
+
$trackGradientStart: trackGradientStart,
|
|
159
|
+
$trackGradientEnd: trackGradientEnd
|
|
161
160
|
};
|
|
162
161
|
return /*#__PURE__*/_jsxs(ProgressBarContainer, {
|
|
163
162
|
...selectProps(rest),
|
|
164
163
|
children: [/*#__PURE__*/_jsx(StyledTimestamp, {
|
|
165
|
-
margin: `0 ${timestampMarginRight}px 0 ${timestampMarginLeft}px`,
|
|
164
|
+
$margin: `0 ${timestampMarginRight}px 0 ${timestampMarginLeft}px`,
|
|
166
165
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
167
166
|
variant: {
|
|
168
167
|
inverse: true
|
|
@@ -174,15 +173,16 @@ const VideoProgressBar = _ref5 => {
|
|
|
174
173
|
type: "range",
|
|
175
174
|
step: "any",
|
|
176
175
|
max: videoLength,
|
|
177
|
-
videoCurrentTime: videoCurrentTime,
|
|
176
|
+
$videoCurrentTime: videoCurrentTime,
|
|
178
177
|
onChange: handleVideoSkip,
|
|
179
178
|
onFocus: resetInactivityTimer,
|
|
180
|
-
videoBufferDisplay: videoBufferDisplay,
|
|
179
|
+
$videoBufferDisplay: videoBufferDisplay,
|
|
180
|
+
$rangeBackground: rangeBackground,
|
|
181
181
|
ref: videoProgressBar,
|
|
182
182
|
tabIndex: "-1",
|
|
183
183
|
...sharedProps
|
|
184
184
|
}), /*#__PURE__*/_jsx(StyledTimestamp, {
|
|
185
|
-
margin: `0 ${remainingTimestampMarginRight}px 0 ${remainingTimestampMarginLeft}px`,
|
|
185
|
+
$margin: `0 ${remainingTimestampMarginRight}px 0 ${remainingTimestampMarginLeft}px`,
|
|
186
186
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
187
187
|
variant: {
|
|
188
188
|
inverse: true
|
|
@@ -200,5 +200,4 @@ VideoProgressBar.propTypes = {
|
|
|
200
200
|
videoBufferEnd: PropTypes.number.isRequired,
|
|
201
201
|
setSeek: PropTypes.func.isRequired,
|
|
202
202
|
resetInactivityTimer: PropTypes.func.isRequired
|
|
203
|
-
};
|
|
204
|
-
export default VideoProgressBar;
|
|
203
|
+
};
|
|
@@ -2,8 +2,8 @@ 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
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
@@ -12,33 +12,33 @@ const VolumeSliderContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
12
12
|
componentId: "components-web__sc-apixz4-0"
|
|
13
13
|
})(_ref => {
|
|
14
14
|
let {
|
|
15
|
-
videoPlayerWidth,
|
|
16
|
-
compactModeThreshold,
|
|
17
|
-
margin
|
|
15
|
+
$videoPlayerWidth,
|
|
16
|
+
$compactModeThreshold,
|
|
17
|
+
$margin
|
|
18
18
|
} = _ref;
|
|
19
19
|
return {
|
|
20
20
|
display: 'flex',
|
|
21
|
-
width: videoPlayerWidth > compactModeThreshold ? '12%' : '20%',
|
|
21
|
+
width: $videoPlayerWidth > $compactModeThreshold ? '12%' : '20%',
|
|
22
22
|
maxWidth: 120,
|
|
23
|
-
margin,
|
|
23
|
+
margin: $margin,
|
|
24
24
|
alignItems: 'center'
|
|
25
25
|
};
|
|
26
26
|
});
|
|
27
27
|
const sharedStyles = _ref2 => {
|
|
28
28
|
let {
|
|
29
|
-
thumbHeight,
|
|
30
|
-
thumbWidth,
|
|
31
|
-
thumbBackground,
|
|
32
|
-
trackGradientStart,
|
|
33
|
-
trackGradientEnd
|
|
29
|
+
$thumbHeight,
|
|
30
|
+
$thumbWidth,
|
|
31
|
+
$thumbBackground,
|
|
32
|
+
$trackGradientStart,
|
|
33
|
+
$trackGradientEnd
|
|
34
34
|
} = _ref2;
|
|
35
35
|
return {
|
|
36
36
|
thumb: {
|
|
37
37
|
appearance: 'none',
|
|
38
|
-
height: thumbHeight,
|
|
39
|
-
width: thumbWidth,
|
|
38
|
+
height: $thumbHeight,
|
|
39
|
+
width: $thumbWidth,
|
|
40
40
|
borderRadius: '50%',
|
|
41
|
-
background: thumbBackground,
|
|
41
|
+
background: $thumbBackground,
|
|
42
42
|
cursor: 'pointer',
|
|
43
43
|
marginTop: -3,
|
|
44
44
|
'&:hover': {
|
|
@@ -50,24 +50,24 @@ const sharedStyles = _ref2 => {
|
|
|
50
50
|
height: 2,
|
|
51
51
|
cursor: 'pointer',
|
|
52
52
|
borderRadius: 1.3,
|
|
53
|
-
background: `linear-gradient(to right, ${trackGradientStart} 0%, ${trackGradientEnd} ${videoCurrentVolume * 100 - 0.01}%, rgba(255,255,255,0.5) ${videoCurrentVolume * 100}%)`
|
|
53
|
+
background: `linear-gradient(to right, ${$trackGradientStart} 0%, ${$trackGradientEnd} ${videoCurrentVolume * 100 - 0.01}%, rgba(255,255,255,0.5) ${videoCurrentVolume * 100}%)`
|
|
54
54
|
})
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
const StyledVolumeSlider = /*#__PURE__*/styled.input.attrs(_ref3 => {
|
|
58
58
|
let {
|
|
59
|
-
videoCurrentVolume
|
|
59
|
+
$videoCurrentVolume
|
|
60
60
|
} = _ref3;
|
|
61
61
|
return {
|
|
62
|
-
value: videoCurrentVolume
|
|
62
|
+
value: $videoCurrentVolume
|
|
63
63
|
};
|
|
64
64
|
}).withConfig({
|
|
65
65
|
displayName: "VolumeSlider__StyledVolumeSlider",
|
|
66
66
|
componentId: "components-web__sc-apixz4-1"
|
|
67
67
|
})(_ref4 => {
|
|
68
68
|
let {
|
|
69
|
-
videoCurrentVolume,
|
|
70
|
-
rangeBackground,
|
|
69
|
+
$videoCurrentVolume,
|
|
70
|
+
$rangeBackground,
|
|
71
71
|
...sharedProps
|
|
72
72
|
} = _ref4;
|
|
73
73
|
return {
|
|
@@ -77,25 +77,25 @@ const StyledVolumeSlider = /*#__PURE__*/styled.input.attrs(_ref3 => {
|
|
|
77
77
|
'input[type=range]&': {
|
|
78
78
|
appearance: 'none',
|
|
79
79
|
width: '100%',
|
|
80
|
-
background: rangeBackground
|
|
80
|
+
background: $rangeBackground
|
|
81
81
|
},
|
|
82
82
|
'input[type=range]&:focus': {
|
|
83
83
|
outline: 'none'
|
|
84
84
|
},
|
|
85
85
|
'input[type=range]&::-webkit-slider-thumb': sharedStyles(sharedProps).thumb,
|
|
86
86
|
'input[type=range]&::-moz-range-thumb': {
|
|
87
|
-
...sharedStyles.thumb,
|
|
87
|
+
...sharedStyles(sharedProps).thumb,
|
|
88
88
|
border: 'none'
|
|
89
89
|
},
|
|
90
90
|
'input[type=range]&::-ms-thumb': {
|
|
91
|
-
...sharedStyles.thumb,
|
|
91
|
+
...sharedStyles(sharedProps).thumb,
|
|
92
92
|
margin: 0,
|
|
93
93
|
border: 'none'
|
|
94
94
|
},
|
|
95
|
-
'input[type=range]&::-webkit-slider-runnable-track': sharedStyles(sharedProps).track(videoCurrentVolume),
|
|
96
|
-
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track(videoCurrentVolume),
|
|
95
|
+
'input[type=range]&::-webkit-slider-runnable-track': sharedStyles(sharedProps).track($videoCurrentVolume),
|
|
96
|
+
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track($videoCurrentVolume),
|
|
97
97
|
'input[type=range]&::-ms-track': {
|
|
98
|
-
...sharedStyles(sharedProps).track(videoCurrentVolume),
|
|
98
|
+
...sharedStyles(sharedProps).track($videoCurrentVolume),
|
|
99
99
|
margin: '6px 0',
|
|
100
100
|
border: 'none'
|
|
101
101
|
},
|
|
@@ -107,7 +107,7 @@ const StyledVolumeSlider = /*#__PURE__*/styled.input.attrs(_ref3 => {
|
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
});
|
|
110
|
-
const VolumeSlider = _ref5 => {
|
|
110
|
+
export const VolumeSlider = _ref5 => {
|
|
111
111
|
let {
|
|
112
112
|
setVolume,
|
|
113
113
|
compactModeThreshold,
|
|
@@ -136,18 +136,17 @@ const VolumeSlider = _ref5 => {
|
|
|
136
136
|
unmutedIcon
|
|
137
137
|
} = useThemeTokens('VideoVolumeSlider', tokens, variant);
|
|
138
138
|
const sharedProps = {
|
|
139
|
-
thumbHeight,
|
|
140
|
-
thumbWidth,
|
|
141
|
-
thumbBackground,
|
|
142
|
-
trackGradientStart,
|
|
143
|
-
trackGradientEnd
|
|
144
|
-
rangeBackground
|
|
139
|
+
$thumbHeight: thumbHeight,
|
|
140
|
+
$thumbWidth: thumbWidth,
|
|
141
|
+
$thumbBackground: thumbBackground,
|
|
142
|
+
$trackGradientStart: trackGradientStart,
|
|
143
|
+
$trackGradientEnd: trackGradientEnd
|
|
145
144
|
};
|
|
146
145
|
const handleVolumeChange = () => setVolume(refVolumeSlider.current.value);
|
|
147
146
|
return /*#__PURE__*/_jsxs(VolumeSliderContainer, {
|
|
148
|
-
compactModeThreshold: compactModeThreshold,
|
|
149
|
-
videoPlayerWidth: videoPlayerWidth,
|
|
150
|
-
margin: `0 ${marginRight}px 0 ${marginLeft}px`,
|
|
147
|
+
$compactModeThreshold: compactModeThreshold,
|
|
148
|
+
$videoPlayerWidth: videoPlayerWidth,
|
|
149
|
+
$margin: `0 ${marginRight}px 0 ${marginLeft}px`,
|
|
151
150
|
...selectProps(rest),
|
|
152
151
|
children: [/*#__PURE__*/_jsx(VideoButton, {
|
|
153
152
|
icon: videoIsMuted ? /*#__PURE__*/_jsx(Icon, {
|
|
@@ -165,7 +164,8 @@ const VolumeSlider = _ref5 => {
|
|
|
165
164
|
max: "1",
|
|
166
165
|
step: "any",
|
|
167
166
|
value: videoCurrentVolume,
|
|
168
|
-
videoCurrentVolume: videoCurrentVolume,
|
|
167
|
+
$videoCurrentVolume: videoCurrentVolume,
|
|
168
|
+
$rangeBackground: rangeBackground,
|
|
169
169
|
ref: refVolumeSlider,
|
|
170
170
|
onChange: handleVolumeChange,
|
|
171
171
|
onFocus: resetInactivityTimer,
|
|
@@ -186,5 +186,4 @@ VolumeSlider.propTypes = {
|
|
|
186
186
|
compactModeThreshold: PropTypes.number.isRequired,
|
|
187
187
|
videoPlayerWidth: PropTypes.number.isRequired,
|
|
188
188
|
disableFocus: PropTypes.bool.isRequired
|
|
189
|
-
};
|
|
190
|
-
export default VolumeSlider;
|
|
189
|
+
};
|