@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
|
@@ -10,18 +10,18 @@ const StyledMiddleControlButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
10
10
|
componentId: "components-web__sc-1um2s37-0"
|
|
11
11
|
})(_ref => {
|
|
12
12
|
let {
|
|
13
|
-
isHidden,
|
|
14
|
-
width,
|
|
15
|
-
height,
|
|
16
|
-
background
|
|
13
|
+
$isHidden,
|
|
14
|
+
$width,
|
|
15
|
+
$height,
|
|
16
|
+
$background
|
|
17
17
|
} = _ref;
|
|
18
18
|
return {
|
|
19
|
-
width,
|
|
20
|
-
height,
|
|
19
|
+
width: $width,
|
|
20
|
+
height: $height,
|
|
21
21
|
borderRadius: '50%',
|
|
22
22
|
transition: 'opacity 0.4s',
|
|
23
|
-
opacity: isHidden ? 0 : 1,
|
|
24
|
-
background,
|
|
23
|
+
opacity: $isHidden ? 0 : 1,
|
|
24
|
+
background: $background,
|
|
25
25
|
display: 'flex',
|
|
26
26
|
justifyContent: 'center',
|
|
27
27
|
border: 'none',
|
|
@@ -31,7 +31,7 @@ const StyledMiddleControlButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
31
31
|
alignItems: 'center'
|
|
32
32
|
};
|
|
33
33
|
});
|
|
34
|
-
const MiddleControlButton = _ref2 => {
|
|
34
|
+
export const MiddleControlButton = _ref2 => {
|
|
35
35
|
let {
|
|
36
36
|
icon: Icon,
|
|
37
37
|
isHidden = false,
|
|
@@ -48,12 +48,12 @@ const MiddleControlButton = _ref2 => {
|
|
|
48
48
|
iconColor
|
|
49
49
|
} = useThemeTokens('VideoMiddleControlButton', tokens, variant);
|
|
50
50
|
return /*#__PURE__*/_jsx(StyledMiddleControlButton, {
|
|
51
|
-
isHidden: isHidden,
|
|
51
|
+
$isHidden: isHidden,
|
|
52
52
|
onClick: onClick,
|
|
53
53
|
onFocus: onFocus,
|
|
54
|
-
width: width,
|
|
55
|
-
height: height,
|
|
56
|
-
background: background,
|
|
54
|
+
$width: width,
|
|
55
|
+
$height: height,
|
|
56
|
+
$background: background,
|
|
57
57
|
...selectProps(rest),
|
|
58
58
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
59
59
|
color: iconColor,
|
|
@@ -67,5 +67,4 @@ MiddleControlButton.propTypes = {
|
|
|
67
67
|
isHidden: PropTypes.bool,
|
|
68
68
|
onClick: PropTypes.func,
|
|
69
69
|
onFocus: PropTypes.func
|
|
70
|
-
};
|
|
71
|
-
export default MiddleControlButton;
|
|
70
|
+
};
|
package/lib/esm/Video/Video.js
CHANGED
|
@@ -3,12 +3,12 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import fscreen from 'fscreen';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { useThemeTokens, selectSystemProps, getTokensPropType, variantProp } from '@telus-uds/components-base';
|
|
6
|
-
import Spinner from '../Spinner';
|
|
6
|
+
import { Spinner } from '../Spinner/Spinner';
|
|
7
7
|
import { warn, htmlAttrs } from '../utils';
|
|
8
|
-
import VideoSplash from '../shared/VideoSplash/VideoSplash';
|
|
9
|
-
import MiddleControlButton from './MiddleControlButton/MiddleControlButton';
|
|
10
|
-
import ControlBar from './ControlBar/ControlBar';
|
|
11
|
-
import videoText from './videoText';
|
|
8
|
+
import { VideoSplash } from '../shared/VideoSplash/VideoSplash';
|
|
9
|
+
import { MiddleControlButton } from './MiddleControlButton/MiddleControlButton';
|
|
10
|
+
import { ControlBar } from './ControlBar/ControlBar';
|
|
11
|
+
import { videoText } from './videoText';
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
14
14
|
|
|
@@ -18,14 +18,14 @@ const VideoPlayerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
18
18
|
componentId: "components-web__sc-12ltnuw-0"
|
|
19
19
|
})(_ref => {
|
|
20
20
|
let {
|
|
21
|
-
videoBorder,
|
|
22
|
-
borderColor
|
|
21
|
+
$videoBorder,
|
|
22
|
+
$borderColor
|
|
23
23
|
} = _ref;
|
|
24
24
|
return {
|
|
25
25
|
width: '100%',
|
|
26
26
|
outline: 'none',
|
|
27
27
|
position: 'relative',
|
|
28
|
-
border: videoBorder ? `20px solid ${borderColor}` : undefined
|
|
28
|
+
border: $videoBorder ? `20px solid ${$borderColor}` : undefined
|
|
29
29
|
};
|
|
30
30
|
});
|
|
31
31
|
const VideoElementContainer = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -49,13 +49,13 @@ const VideoOverlayContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
49
49
|
componentId: "components-web__sc-12ltnuw-3"
|
|
50
50
|
})(_ref2 => {
|
|
51
51
|
let {
|
|
52
|
-
mouseInactive
|
|
52
|
+
$mouseInactive
|
|
53
53
|
} = _ref2;
|
|
54
54
|
return {
|
|
55
55
|
width: '100%',
|
|
56
56
|
height: '100%',
|
|
57
57
|
position: 'absolute',
|
|
58
|
-
cursor: mouseInactive ? 'none' : 'pointer'
|
|
58
|
+
cursor: $mouseInactive ? 'none' : 'pointer'
|
|
59
59
|
};
|
|
60
60
|
});
|
|
61
61
|
const VideoSplashContainer = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -79,7 +79,7 @@ const VideoOverlayElementContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
79
79
|
width: '100%',
|
|
80
80
|
height: '100%'
|
|
81
81
|
});
|
|
82
|
-
const Video = _ref3 => {
|
|
82
|
+
export const Video = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
83
83
|
let {
|
|
84
84
|
analyticsTracking,
|
|
85
85
|
videoTitle,
|
|
@@ -769,8 +769,8 @@ const Video = _ref3 => {
|
|
|
769
769
|
return /*#__PURE__*/_jsxs(VideoPlayerContainer, {
|
|
770
770
|
...safeRest,
|
|
771
771
|
ref: refVideoPlayerContainer,
|
|
772
|
-
videoBorder: videoBorder,
|
|
773
|
-
borderColor: borderColor,
|
|
772
|
+
$videoBorder: videoBorder,
|
|
773
|
+
$borderColor: borderColor,
|
|
774
774
|
onMouseMove: resetInactivityTimer,
|
|
775
775
|
onClick: handleClick,
|
|
776
776
|
onKeyDown: handleKeyboard,
|
|
@@ -779,7 +779,7 @@ const Video = _ref3 => {
|
|
|
779
779
|
"data-testid": "videoPlayer",
|
|
780
780
|
...selectProps(rest),
|
|
781
781
|
children: [/*#__PURE__*/_jsxs(VideoOverlayContainer, {
|
|
782
|
-
mouseInactive: mouseInactive,
|
|
782
|
+
$mouseInactive: mouseInactive,
|
|
783
783
|
onClick: () => {
|
|
784
784
|
closeSubMenus();
|
|
785
785
|
togglePlayPause();
|
|
@@ -807,14 +807,12 @@ const Video = _ref3 => {
|
|
|
807
807
|
})]
|
|
808
808
|
})]
|
|
809
809
|
}), /*#__PURE__*/_jsx(VideoElementContainer, {
|
|
810
|
-
|
|
811
|
-
mouseInactive: mouseInactive,
|
|
810
|
+
ref: ref,
|
|
812
811
|
children: /*#__PURE__*/_jsxs(VideoPlayer, {
|
|
813
812
|
ref: refVideoPlayer,
|
|
814
813
|
controls: isMobile,
|
|
815
|
-
videoIsFullscreen: videoIsFullscreen,
|
|
816
814
|
crossOrigin: crossOrigin,
|
|
817
|
-
|
|
815
|
+
playsInline: true,
|
|
818
816
|
children: [loadedSources, loadedTracks, "Your browser does not support the video tag."]
|
|
819
817
|
})
|
|
820
818
|
}), !simpleMode && /*#__PURE__*/_jsx(ControlBar, {
|
|
@@ -862,7 +860,8 @@ const Video = _ref3 => {
|
|
|
862
860
|
role: "note"
|
|
863
861
|
})]
|
|
864
862
|
});
|
|
865
|
-
};
|
|
863
|
+
});
|
|
864
|
+
Video.displayName = 'Video';
|
|
866
865
|
Video.propTypes = {
|
|
867
866
|
...selectedSystemPropTypes,
|
|
868
867
|
/**
|
|
@@ -953,5 +952,4 @@ Video.propTypes = {
|
|
|
953
952
|
videoTitle: PropTypes.string,
|
|
954
953
|
tokens: getTokensPropType('Video'),
|
|
955
954
|
variant: variantProp.propType
|
|
956
|
-
};
|
|
957
|
-
export default Video;
|
|
955
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const videoText = {
|
|
1
|
+
export const videoText = {
|
|
2
2
|
en: {
|
|
3
3
|
videoPlayer: 'Press the space bar or K to toggle play and pause. Use the left and right arrow keys or the comma and period keys to scrub through the video. Use the up and down arrow keys, the dash and equal keys, or the add and subtract number pad keys to increase and decrease volume. Press M to toggle mute. Press F to toggle fullscreen. Press escape to exit instructions and return to video.',
|
|
4
4
|
videoSelected: 'Video selected. Press Q to listen to controls.',
|
|
@@ -51,5 +51,4 @@ const videoText = {
|
|
|
51
51
|
en: 'Anglais',
|
|
52
52
|
fr: 'Français'
|
|
53
53
|
}
|
|
54
|
-
};
|
|
55
|
-
export default videoText;
|
|
54
|
+
};
|
|
@@ -4,60 +4,60 @@ import { viewports } from '@telus-uds/system-constants';
|
|
|
4
4
|
import { selectSystemProps, StackView, useThemeTokens, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
6
|
import { VideoPropType } from './videoPropType';
|
|
7
|
-
import VideoPickerThumbnail from './VideoPickerThumbnail';
|
|
8
|
-
import VideoPickerPlayer from './VideoPickerPlayer';
|
|
9
|
-
import VideoSlider from './VideoSlider';
|
|
7
|
+
import { VideoPickerThumbnail } from './VideoPickerThumbnail';
|
|
8
|
+
import { VideoPickerPlayer } from './VideoPickerPlayer';
|
|
9
|
+
import { VideoSlider } from './VideoSlider';
|
|
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]);
|
|
13
13
|
const framedContainerStyles = _ref => {
|
|
14
14
|
let {
|
|
15
|
-
framedContainerBackgroundColor,
|
|
16
|
-
framedContainerBorderWidth,
|
|
17
|
-
framedContainerBorderColor,
|
|
18
|
-
framedContainerBorderRadius,
|
|
19
|
-
framedMaxHeight
|
|
15
|
+
$framedContainerBackgroundColor,
|
|
16
|
+
$framedContainerBorderWidth,
|
|
17
|
+
$framedContainerBorderColor,
|
|
18
|
+
$framedContainerBorderRadius,
|
|
19
|
+
$framedMaxHeight
|
|
20
20
|
} = _ref;
|
|
21
|
-
return css(["background-color:", ";border:", "px solid ", ";border-radius:", "px;& > div{max-height:", "px;}"], framedContainerBackgroundColor, framedContainerBorderWidth, framedContainerBorderColor, framedContainerBorderRadius, framedMaxHeight);
|
|
21
|
+
return css(["background-color:", ";border:", "px solid ", ";border-radius:", "px;& > div{max-height:", "px;}"], $framedContainerBackgroundColor, $framedContainerBorderWidth, $framedContainerBorderColor, $framedContainerBorderRadius, $framedMaxHeight);
|
|
22
22
|
};
|
|
23
23
|
const VideoPickerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
24
24
|
displayName: "VideoPicker__VideoPickerContainer",
|
|
25
25
|
componentId: "components-web__sc-x6lxp0-0"
|
|
26
26
|
})(["", ""], _ref2 => {
|
|
27
27
|
let {
|
|
28
|
-
isFramed,
|
|
28
|
+
$isFramed,
|
|
29
29
|
...tokens
|
|
30
30
|
} = _ref2;
|
|
31
|
-
return isFramed && framedContainerStyles(tokens);
|
|
31
|
+
return $isFramed && framedContainerStyles(tokens);
|
|
32
32
|
});
|
|
33
33
|
const framedPlayerContainerStyles = _ref3 => {
|
|
34
34
|
let {
|
|
35
|
-
framedMaxHeight,
|
|
36
|
-
framedContainerPadding
|
|
35
|
+
$framedMaxHeight,
|
|
36
|
+
$framedContainerPadding
|
|
37
37
|
} = _ref3;
|
|
38
|
-
return css(["width:66.67%;padding:", "px;max-height:", "px;flex-shrink:0;box-sizing:border-box;"], framedContainerPadding, framedMaxHeight);
|
|
38
|
+
return css(["width:66.67%;padding:", "px;max-height:", "px;flex-shrink:0;box-sizing:border-box;"], $framedContainerPadding, $framedMaxHeight);
|
|
39
39
|
};
|
|
40
40
|
const VideoPlayerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
41
41
|
displayName: "VideoPicker__VideoPlayerContainer",
|
|
42
42
|
componentId: "components-web__sc-x6lxp0-1"
|
|
43
43
|
})(["", " overflow:auto;"], _ref4 => {
|
|
44
44
|
let {
|
|
45
|
-
isFramed,
|
|
45
|
+
$isFramed,
|
|
46
46
|
...tokens
|
|
47
47
|
} = _ref4;
|
|
48
|
-
return isFramed && framedPlayerContainerStyles(tokens);
|
|
48
|
+
return $isFramed && framedPlayerContainerStyles(tokens);
|
|
49
49
|
});
|
|
50
50
|
const framedVideoListContainerStyle = /*#__PURE__*/css(["max-height:", "px;overflow:auto;flex-direction:column;"], _ref5 => {
|
|
51
51
|
let {
|
|
52
|
-
framedMaxHeight
|
|
52
|
+
$framedMaxHeight
|
|
53
53
|
} = _ref5;
|
|
54
|
-
return framedMaxHeight;
|
|
54
|
+
return $framedMaxHeight;
|
|
55
55
|
});
|
|
56
56
|
const VideoListContainer = /*#__PURE__*/styled.div.withConfig({
|
|
57
57
|
displayName: "VideoPicker__VideoListContainer",
|
|
58
58
|
componentId: "components-web__sc-x6lxp0-2"
|
|
59
|
-
})(["display:flex;justify-content:flex-start;position:relative;flex-grow:1;flex-direction:column;", ""], props => props
|
|
60
|
-
const VideoPicker = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
59
|
+
})(["display:flex;justify-content:flex-start;position:relative;flex-grow:1;flex-direction:column;", ""], props => props.$isFramed && framedVideoListContainerStyle);
|
|
60
|
+
export const VideoPicker = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
61
61
|
let {
|
|
62
62
|
videoList = [],
|
|
63
63
|
selectedVideo = videoList[0]?.videoId,
|
|
@@ -108,9 +108,13 @@ const VideoPicker = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
|
108
108
|
}, video.videoId));
|
|
109
109
|
return /*#__PURE__*/_jsx(VideoPickerContainer, {
|
|
110
110
|
ref: ref,
|
|
111
|
-
isFramed: isFramed,
|
|
111
|
+
$isFramed: isFramed,
|
|
112
|
+
$framedContainerBackgroundColor: themeTokens.framedContainerBackgroundColor,
|
|
113
|
+
$framedContainerBorderWidth: themeTokens.framedContainerBorderWidth,
|
|
114
|
+
$framedContainerBorderColor: themeTokens.framedContainerBorderColor,
|
|
115
|
+
$framedContainerBorderRadius: themeTokens.framedContainerBorderRadius,
|
|
116
|
+
$framedMaxHeight: themeTokens.framedMaxHeight,
|
|
112
117
|
...selectProps(rest),
|
|
113
|
-
...themeTokens,
|
|
114
118
|
children: /*#__PURE__*/_jsxs(StackView, {
|
|
115
119
|
divider: isFramed ? {
|
|
116
120
|
tokens: {
|
|
@@ -125,8 +129,9 @@ const VideoPicker = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
|
125
129
|
,
|
|
126
130
|
direction: isFramed ? 'row' : 'column',
|
|
127
131
|
children: [/*#__PURE__*/_jsx(VideoPlayerContainer, {
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
$isFramed: isFramed,
|
|
133
|
+
$framedMaxHeight: themeTokens.framedMaxHeight,
|
|
134
|
+
$framedContainerPadding: themeTokens.framedContainerPadding,
|
|
130
135
|
children: /*#__PURE__*/_jsx(VideoPickerPlayer, {
|
|
131
136
|
video: addVideoEventHandlers(currentVideo),
|
|
132
137
|
videoPlayerRef: videoPlayerRef,
|
|
@@ -137,7 +142,8 @@ const VideoPicker = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
|
137
142
|
}) : /*#__PURE__*/_jsx(VideoListContainer, {
|
|
138
143
|
viewport: viewport,
|
|
139
144
|
"data-testid": "video-list-container",
|
|
140
|
-
isFramed: isFramed,
|
|
145
|
+
$isFramed: isFramed,
|
|
146
|
+
$framedMaxHeight: themeTokens.framedMaxHeight,
|
|
141
147
|
children: listElements
|
|
142
148
|
})]
|
|
143
149
|
})
|
|
@@ -184,5 +190,4 @@ VideoPicker.propTypes = {
|
|
|
184
190
|
* @param {object} event - The event object.
|
|
185
191
|
*/
|
|
186
192
|
onPause: PropTypes.func
|
|
187
|
-
};
|
|
188
|
-
export default VideoPicker;
|
|
193
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StackView, Typography } from '@telus-uds/components-base';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import WebVideo from '../WebVideo/WebVideo';
|
|
4
|
+
import { WebVideo } from '../WebVideo/WebVideo';
|
|
5
5
|
import { VideoPropType, RefPropType } from './videoPropType';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const VideoPickerPlayer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
7
|
+
export const VideoPickerPlayer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
8
8
|
let {
|
|
9
9
|
video = {},
|
|
10
10
|
videoPlayerRef,
|
|
@@ -43,5 +43,4 @@ VideoPickerPlayer.propTypes = {
|
|
|
43
43
|
video: VideoPropType,
|
|
44
44
|
videoPlayerRef: RefPropType,
|
|
45
45
|
onStartVideo: PropTypes.func
|
|
46
|
-
};
|
|
47
|
-
export default VideoPickerPlayer;
|
|
46
|
+
};
|
|
@@ -7,7 +7,7 @@ import { StackView, Typography, useViewport, horizontalScrollUtils, useThemeToke
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { getTimestamp } from '../shared/VideoSplash/helpers';
|
|
9
9
|
import { VideoPropType, RefPropType } from './videoPropType';
|
|
10
|
-
import VideoSplash from '../shared/VideoSplash/VideoSplash';
|
|
10
|
+
import { VideoSplash } from '../shared/VideoSplash/VideoSplash';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const {
|
|
13
13
|
getItemPositionLayoutHandler,
|
|
@@ -44,41 +44,41 @@ const createReactNativeStyles = _ref => {
|
|
|
44
44
|
const ImageContainer = /*#__PURE__*/styled.div.withConfig({
|
|
45
45
|
displayName: "VideoPickerThumbnail__ImageContainer",
|
|
46
46
|
componentId: "components-web__sc-1glxurq-0"
|
|
47
|
-
})(["padding:", ";border:", ";border-radius:", "px;"], props => `${props
|
|
47
|
+
})(["padding:", ";border:", ";border-radius:", "px;"], props => `${props.$outerBorderGap}px`, props => `${props.$outerBorderWidth}px solid ${props.$outerBorderColor}`, _ref2 => {
|
|
48
48
|
let {
|
|
49
|
-
outerBorderRadius
|
|
49
|
+
$outerBorderRadius
|
|
50
50
|
} = _ref2;
|
|
51
|
-
return outerBorderRadius;
|
|
51
|
+
return $outerBorderRadius;
|
|
52
52
|
});
|
|
53
53
|
const VideoThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
54
54
|
displayName: "VideoPickerThumbnail__VideoThumbnail",
|
|
55
55
|
componentId: "components-web__sc-1glxurq-1"
|
|
56
|
-
})(["position:relative;width:", ";flex-shrink:0;* button{display:none;}&::before{content:'';display:block;padding-bottom:56.25%;}&::after{content:'';border:", "px solid;border-color:", ";border-radius:", "px;position:absolute;top:0;left:0;right:0;bottom:0;}& > div{border-radius:", "px;}"], props => props
|
|
56
|
+
})(["position:relative;width:", ";flex-shrink:0;* button{display:none;}&::before{content:'';display:block;padding-bottom:56.25%;}&::after{content:'';border:", "px solid;border-color:", ";border-radius:", "px;position:absolute;top:0;left:0;right:0;bottom:0;}& > div{border-radius:", "px;}"], props => props.$layout === 'vertical' ? '100%' : '144px', _ref3 => {
|
|
57
57
|
let {
|
|
58
|
-
borderWidth
|
|
58
|
+
$borderWidth
|
|
59
59
|
} = _ref3;
|
|
60
|
-
return borderWidth;
|
|
60
|
+
return $borderWidth;
|
|
61
61
|
}, _ref4 => {
|
|
62
62
|
let {
|
|
63
|
-
borderColor
|
|
63
|
+
$borderColor
|
|
64
64
|
} = _ref4;
|
|
65
|
-
return borderColor;
|
|
65
|
+
return $borderColor;
|
|
66
66
|
}, _ref5 => {
|
|
67
67
|
let {
|
|
68
|
-
borderRadius
|
|
68
|
+
$borderRadius
|
|
69
69
|
} = _ref5;
|
|
70
|
-
return borderRadius;
|
|
70
|
+
return $borderRadius;
|
|
71
71
|
}, _ref6 => {
|
|
72
72
|
let {
|
|
73
|
-
borderRadius
|
|
73
|
+
$borderRadius
|
|
74
74
|
} = _ref6;
|
|
75
|
-
return borderRadius;
|
|
75
|
+
return $borderRadius;
|
|
76
76
|
});
|
|
77
77
|
const ThumbnailTitleContainer = /*#__PURE__*/styled.div.withConfig({
|
|
78
78
|
displayName: "VideoPickerThumbnail__ThumbnailTitleContainer",
|
|
79
79
|
componentId: "components-web__sc-1glxurq-2"
|
|
80
80
|
})(["display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;"]);
|
|
81
|
-
const VideoPickerThumbnail = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
81
|
+
export const VideoPickerThumbnail = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
82
82
|
let {
|
|
83
83
|
videoPlayerRef,
|
|
84
84
|
selectedVideoId,
|
|
@@ -98,9 +98,11 @@ const VideoPickerThumbnail = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
|
98
98
|
const isPlaying = selectedVideoId === video.videoId;
|
|
99
99
|
const renderThumbnailImage = themeTokens => {
|
|
100
100
|
return /*#__PURE__*/_jsx(VideoThumbnail, {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
$borderWidth: themeTokens.borderWidth,
|
|
102
|
+
$borderColor: themeTokens.borderColor,
|
|
103
|
+
$borderRadius: themeTokens.borderRadius,
|
|
104
|
+
$isPlaying: isPlaying,
|
|
105
|
+
$layout: layout,
|
|
104
106
|
children: /*#__PURE__*/_jsx(VideoSplash, {
|
|
105
107
|
simpleMode: true,
|
|
106
108
|
poster: video.posterSrc || `https://img.youtube.com/vi/${video.videoId}/maxresdefault.jpg`,
|
|
@@ -120,7 +122,6 @@ const VideoPickerThumbnail = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
|
120
122
|
flexShrink: 1
|
|
121
123
|
},
|
|
122
124
|
children: [/*#__PURE__*/_jsx(ThumbnailTitleContainer, {
|
|
123
|
-
viewport: viewport,
|
|
124
125
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
125
126
|
variant: {
|
|
126
127
|
bold: true
|
|
@@ -178,12 +179,12 @@ const VideoPickerThumbnail = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
|
178
179
|
}];
|
|
179
180
|
},
|
|
180
181
|
ref: ref,
|
|
181
|
-
children:
|
|
182
|
+
children: _ref0 => {
|
|
182
183
|
let {
|
|
183
184
|
hovered: hover,
|
|
184
185
|
focused: focus,
|
|
185
186
|
pressed
|
|
186
|
-
} =
|
|
187
|
+
} = _ref0;
|
|
187
188
|
const themeTokens = getTokens({
|
|
188
189
|
hover,
|
|
189
190
|
focus,
|
|
@@ -194,7 +195,10 @@ const VideoPickerThumbnail = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
|
194
195
|
space: layout === 'vertical' ? 2 : 3,
|
|
195
196
|
direction: layout === 'vertical' ? 'column' : 'row',
|
|
196
197
|
children: [/*#__PURE__*/_jsx(ImageContainer, {
|
|
197
|
-
|
|
198
|
+
$outerBorderGap: themeTokens.outerBorderGap,
|
|
199
|
+
$outerBorderWidth: themeTokens.outerBorderWidth,
|
|
200
|
+
$outerBorderColor: themeTokens.outerBorderColor,
|
|
201
|
+
$outerBorderRadius: themeTokens.outerBorderRadius,
|
|
198
202
|
children: renderThumbnailImage(themeTokens)
|
|
199
203
|
}), renderThumbnailInfo(themeTokens)]
|
|
200
204
|
});
|
|
@@ -212,5 +216,4 @@ VideoPickerThumbnail.propTypes = {
|
|
|
212
216
|
itemPositions: itemPositionsPropType,
|
|
213
217
|
index: PropTypes.number,
|
|
214
218
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
215
|
-
};
|
|
216
|
-
export default VideoPickerThumbnail;
|
|
219
|
+
};
|
|
@@ -6,7 +6,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
const {
|
|
7
7
|
useItemPositions
|
|
8
8
|
} = horizontalScrollUtils;
|
|
9
|
-
const VideoSlider = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
9
|
+
export const VideoSlider = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
10
10
|
let {
|
|
11
11
|
children
|
|
12
12
|
} = _ref;
|
|
@@ -77,5 +77,4 @@ const VideoSlider = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
77
77
|
VideoSlider.displayName = 'VideoSlider';
|
|
78
78
|
VideoSlider.propTypes = {
|
|
79
79
|
children: PropTypes.node
|
|
80
|
-
};
|
|
81
|
-
export default VideoSlider;
|
|
80
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Link, responsiveProps, selectSystemProps, useResponsiveProp, useThemeTokens, withLinkRouter, useViewport, Typography, getTokensPropType } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import OrderedListBase from '../OrderedList/OrderedListBase';
|
|
6
|
-
import
|
|
7
|
-
import Image from '../Image';
|
|
5
|
+
import { OrderedListBase } from '../OrderedList/OrderedListBase';
|
|
6
|
+
import { OrderedListItemBase } from '../OrderedList/OrderedListItemBase';
|
|
7
|
+
import { Image } from '../Image/Image';
|
|
8
8
|
import { htmlAttrs } from '../utils';
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
11
11
|
const row = (rowSize, rowBorderWidth) => ({
|
|
12
12
|
flexBasis: `calc(100% / ${rowSize})`,
|
|
13
|
-
[
|
|
13
|
+
[`&:not(:nth-of-type(${rowSize}n + 1))`]: {
|
|
14
14
|
borderLeftWidth: `${rowBorderWidth}px`
|
|
15
15
|
},
|
|
16
|
-
[
|
|
16
|
+
[`&:nth-of-type(n+${rowSize + 1})`]: {
|
|
17
17
|
borderTopWidth: `${rowBorderWidth}px`
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -24,17 +24,18 @@ const Container = /*#__PURE__*/styled(OrderedListBase).withConfig({
|
|
|
24
24
|
display: 'flex',
|
|
25
25
|
flexDirection: 'row',
|
|
26
26
|
flexWrap: 'wrap',
|
|
27
|
+
alignContent: 'stretch',
|
|
27
28
|
justifyContent: 'flex-start'
|
|
28
29
|
});
|
|
29
|
-
const Item = /*#__PURE__*/styled(
|
|
30
|
+
const Item = /*#__PURE__*/styled(OrderedListItemBase).withConfig({
|
|
30
31
|
displayName: "WaffleGrid__Item",
|
|
31
32
|
componentId: "components-web__sc-ec8g0a-1"
|
|
32
33
|
})(_ref => {
|
|
33
34
|
let {
|
|
34
|
-
rowSize,
|
|
35
|
-
itemPadding,
|
|
36
|
-
itemBorderColor,
|
|
37
|
-
rowBorderWidth
|
|
35
|
+
$rowSize,
|
|
36
|
+
$itemPadding,
|
|
37
|
+
$itemBorderColor,
|
|
38
|
+
$rowBorderWidth
|
|
38
39
|
} = _ref;
|
|
39
40
|
return {
|
|
40
41
|
display: 'flex',
|
|
@@ -43,15 +44,16 @@ const Item = /*#__PURE__*/styled(ItemBase).withConfig({
|
|
|
43
44
|
justifyContent: 'center',
|
|
44
45
|
flexGrow: 1,
|
|
45
46
|
flexShrink: 1,
|
|
46
|
-
padding: `${itemPadding}px`,
|
|
47
|
+
padding: `${$itemPadding}px`,
|
|
47
48
|
boxSizing: 'border-box',
|
|
48
49
|
borderStyle: 'solid',
|
|
49
|
-
borderColor: itemBorderColor,
|
|
50
|
+
borderColor: $itemBorderColor,
|
|
50
51
|
borderWidth: 0,
|
|
51
52
|
'& > a': {
|
|
52
|
-
alignSelf: 'center'
|
|
53
|
+
alignSelf: 'center',
|
|
54
|
+
width: '100%'
|
|
53
55
|
},
|
|
54
|
-
...row(rowSize, rowBorderWidth)
|
|
56
|
+
...row($rowSize, $rowBorderWidth)
|
|
55
57
|
};
|
|
56
58
|
});
|
|
57
59
|
const Center = /*#__PURE__*/styled('div').withConfig({
|
|
@@ -67,7 +69,7 @@ const Center = /*#__PURE__*/styled('div').withConfig({
|
|
|
67
69
|
/**
|
|
68
70
|
* The WaffleGrid is used to show items in a waffle like manner with borders surrounding the element
|
|
69
71
|
*/
|
|
70
|
-
const WaffleGrid = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
72
|
+
export const WaffleGrid = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
71
73
|
let {
|
|
72
74
|
items,
|
|
73
75
|
rowSize = null,
|
|
@@ -85,35 +87,37 @@ const WaffleGrid = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
85
87
|
return /*#__PURE__*/_jsx(Container, {
|
|
86
88
|
ref: ref,
|
|
87
89
|
...selectProps(rest),
|
|
88
|
-
children: items.map(child => /*#__PURE__*/
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
children:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
90
|
+
children: items.map(child => /*#__PURE__*/_jsx(Item, {
|
|
91
|
+
$rowSize: rowSize ? currentRowSize : themeTokens.rowSize,
|
|
92
|
+
$itemPadding: themeTokens.itemPadding,
|
|
93
|
+
$itemBorderColor: themeTokens.itemBorderColor,
|
|
94
|
+
$rowBorderWidth: themeTokens.rowBorderWidth,
|
|
95
|
+
children: /*#__PURE__*/_jsx(Link, {
|
|
96
|
+
href: child.href,
|
|
97
|
+
LinkRouter: child.LinkRouter || LinkRouter,
|
|
98
|
+
linkRouterProps: {
|
|
99
|
+
...linkRouterProps,
|
|
100
|
+
...child.linkRouterProps
|
|
101
|
+
},
|
|
102
|
+
children: /*#__PURE__*/_jsxs(Center, {
|
|
103
|
+
children: [typeof child.image === 'string' ?
|
|
104
|
+
/*#__PURE__*/
|
|
105
|
+
// Assuming that string passed is the image URL
|
|
106
|
+
_jsx(Image, {
|
|
107
|
+
src: child.image,
|
|
108
|
+
alt: child.imageAltText,
|
|
109
|
+
width: 96
|
|
110
|
+
}) :
|
|
111
|
+
// Otherwise it must be an arbitrary content, which we just display by itself
|
|
112
|
+
child.image, /*#__PURE__*/_jsx(Typography, {
|
|
113
|
+
variant: {
|
|
114
|
+
weight: 'semibold'
|
|
115
|
+
},
|
|
116
|
+
children: child.text
|
|
117
|
+
})]
|
|
118
|
+
})
|
|
115
119
|
})
|
|
116
|
-
}))
|
|
120
|
+
}, child.href))
|
|
117
121
|
});
|
|
118
122
|
});
|
|
119
123
|
WaffleGrid.displayName = 'WaffleGrid';
|
|
@@ -151,5 +155,4 @@ WaffleGrid.propTypes = {
|
|
|
151
155
|
*/
|
|
152
156
|
rowSize: responsiveProps.getTypeOptionallyByViewport(PropTypes.number),
|
|
153
157
|
...withLinkRouter.propTypes
|
|
154
|
-
};
|
|
155
|
-
export default WaffleGrid;
|
|
158
|
+
};
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import YouTube from 'react-youtube';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
-
import VideoSplash from '../shared/VideoSplash/VideoSplash';
|
|
6
|
+
import { VideoSplash } from '../shared/VideoSplash/VideoSplash';
|
|
7
7
|
import { htmlAttrs } from '../utils';
|
|
8
8
|
import { triggerInProgressVideoIntervals, YoutubePlayerState } from './utils';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -41,10 +41,10 @@ const AspectLimiter = /*#__PURE__*/styled.div.withConfig({
|
|
|
41
41
|
displayName: "WebVideo__AspectLimiter",
|
|
42
42
|
componentId: "components-web__sc-327a6k-2"
|
|
43
43
|
})(props => ({
|
|
44
|
-
...aspectRatios[props
|
|
44
|
+
...aspectRatios[props.$aspectRatio],
|
|
45
45
|
position: 'relative'
|
|
46
46
|
}));
|
|
47
|
-
const WebVideo = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
47
|
+
export const WebVideo = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
48
48
|
let {
|
|
49
49
|
videoId,
|
|
50
50
|
aspectRatio = '16:9',
|
|
@@ -102,7 +102,7 @@ const WebVideo = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
102
102
|
"data-testid": "web-video-container",
|
|
103
103
|
...selectProps(rest),
|
|
104
104
|
children: /*#__PURE__*/_jsx(AspectLimiter, {
|
|
105
|
-
aspectRatio: aspectRatio,
|
|
105
|
+
$aspectRatio: aspectRatio,
|
|
106
106
|
children: started ? /*#__PURE__*/_jsx(StyledYoutubePlayer, {
|
|
107
107
|
videoId: videoId,
|
|
108
108
|
opts: {
|
|
@@ -186,5 +186,4 @@ export const VideoProps = {
|
|
|
186
186
|
*/
|
|
187
187
|
onProgress: PropTypes.func
|
|
188
188
|
};
|
|
189
|
-
WebVideo.propTypes = VideoProps;
|
|
190
|
-
export default WebVideo;
|
|
189
|
+
WebVideo.propTypes = VideoProps;
|