@telus-uds/components-web 3.3.0 → 4.0.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 +7 -1
- package/CHANGELOG.md +38 -2
- package/jest.config.cjs +1 -1
- package/lib/cjs/Badge/Badge.js +128 -0
- package/lib/cjs/Badge/index.js +9 -0
- package/lib/cjs/BlockQuote/BlockQuote.js +256 -0
- package/lib/cjs/BlockQuote/index.js +9 -0
- package/lib/cjs/Breadcrumbs/Breadcrumbs.js +264 -0
- package/lib/cjs/Breadcrumbs/Item/Item.js +180 -0
- package/lib/cjs/Breadcrumbs/index.js +13 -0
- package/lib/cjs/Callout/Callout.js +141 -0
- package/lib/cjs/Callout/index.js +9 -0
- package/lib/cjs/Card/Card.js +257 -0
- package/lib/cjs/Card/CardContent.js +97 -0
- package/lib/cjs/Card/CardFooter.js +85 -0
- package/lib/cjs/Card/index.js +9 -0
- package/lib/cjs/Countdown/Countdown.js +268 -0
- package/lib/cjs/Countdown/Segment.js +108 -0
- package/lib/cjs/Countdown/constants.js +10 -0
- package/lib/cjs/Countdown/dictionary.js +28 -0
- package/lib/cjs/Countdown/index.js +9 -0
- package/lib/cjs/Countdown/types.js +31 -0
- package/lib/cjs/Countdown/useCountdown.js +32 -0
- package/lib/cjs/DatePicker/CalendarContainer.js +214 -0
- package/lib/cjs/DatePicker/DatePicker.js +525 -0
- package/lib/cjs/DatePicker/dictionary.js +125 -0
- package/lib/cjs/DatePicker/index.js +9 -0
- package/lib/cjs/DatePicker/reactDatesCss.js +9 -0
- package/lib/cjs/Disclaimer/Disclaimer.js +61 -0
- package/lib/cjs/Disclaimer/index.js +13 -0
- package/lib/cjs/Footnote/Footnote.js +637 -0
- package/lib/cjs/Footnote/FootnoteLink.js +125 -0
- package/lib/cjs/Footnote/dictionary.js +18 -0
- package/lib/cjs/Footnote/index.js +11 -0
- package/lib/cjs/IconButton/IconButton.js +62 -0
- package/lib/cjs/IconButton/index.js +9 -0
- package/lib/cjs/Image/Image.js +90 -0
- package/lib/cjs/Image/index.js +20 -0
- package/lib/cjs/Image/server.js +11 -0
- package/lib/cjs/List/List.js +8 -0
- package/lib/cjs/List/ListItem.js +34 -0
- package/lib/cjs/List/index.js +11 -0
- package/lib/cjs/NavigationBar/NavigationBar.js +282 -0
- package/lib/cjs/NavigationBar/NavigationItem.js +94 -0
- package/lib/cjs/NavigationBar/NavigationSubMenu.js +164 -0
- package/lib/{NavigationBar → cjs/NavigationBar}/collapseItems.js +9 -4
- package/lib/cjs/NavigationBar/index.js +11 -0
- package/lib/cjs/NavigationBar/resolveItemSelection.js +22 -0
- package/lib/cjs/OptimizeImage/OptimizeImage.js +99 -0
- package/lib/cjs/OptimizeImage/index.js +9 -0
- package/lib/cjs/OptimizeImage/utils/getFallbackUrl.js +14 -0
- package/lib/cjs/OptimizeImage/utils/getImageUrls.js +19 -0
- package/lib/cjs/OptimizeImage/utils/getOptimizedUrl.js +24 -0
- package/lib/cjs/OptimizeImage/utils/hasWebpSupport.js +34 -0
- package/lib/cjs/OptimizeImage/utils/index.js +34 -0
- package/lib/cjs/OptimizeImage/utils/isSvgUrl.js +9 -0
- package/lib/cjs/OrderedList/Item.js +151 -0
- package/lib/cjs/OrderedList/ItemBase.js +34 -0
- package/lib/cjs/OrderedList/OrderedList.js +92 -0
- package/lib/cjs/OrderedList/OrderedListBase.js +52 -0
- package/lib/cjs/OrderedList/constants.js +8 -0
- package/lib/cjs/OrderedList/index.js +11 -0
- package/lib/cjs/Paragraph/Paragraph.js +97 -0
- package/lib/cjs/Paragraph/index.js +9 -0
- package/lib/cjs/PreviewCard/AuthorDate.js +63 -0
- package/lib/cjs/PreviewCard/PreviewCard.js +215 -0
- package/lib/cjs/PreviewCard/index.js +9 -0
- package/lib/cjs/PriceLockup/PriceLockup.js +356 -0
- package/lib/cjs/PriceLockup/index.js +9 -0
- package/lib/cjs/PriceLockup/tokens.js +66 -0
- package/lib/cjs/Progress/ProgressBar.js +99 -0
- package/lib/cjs/Progress/index.js +11 -0
- package/lib/cjs/QuantitySelector/QuantitySelector.js +267 -0
- package/lib/cjs/QuantitySelector/SideButton.js +77 -0
- package/lib/cjs/QuantitySelector/dictionary.js +32 -0
- package/lib/cjs/QuantitySelector/index.js +9 -0
- package/lib/cjs/QuantitySelector/styles.js +16 -0
- package/lib/cjs/ResponsiveImage/ResponsiveImage.js +107 -0
- package/lib/cjs/ResponsiveImage/index.js +9 -0
- package/lib/cjs/Ribbon/Ribbon.js +222 -0
- package/lib/cjs/Ribbon/index.js +9 -0
- package/lib/cjs/SkeletonProvider/SkeletonImage.js +45 -0
- package/lib/cjs/SkeletonProvider/SkeletonProvider.js +63 -0
- package/lib/cjs/SkeletonProvider/SkeletonTypography.js +44 -0
- package/lib/cjs/SkeletonProvider/index.js +9 -0
- package/lib/cjs/Span/Span.js +79 -0
- package/lib/cjs/Span/index.js +9 -0
- package/lib/cjs/Spinner/Spinner.js +221 -0
- package/lib/cjs/Spinner/SpinnerContent.js +100 -0
- package/lib/cjs/Spinner/constants.js +10 -0
- package/lib/cjs/Spinner/index.js +9 -0
- package/lib/cjs/StoryCard/StoryCard.js +219 -0
- package/lib/cjs/StoryCard/index.js +9 -0
- package/lib/cjs/Table/Body.js +24 -0
- package/lib/cjs/Table/Cell.js +187 -0
- package/lib/cjs/Table/Header.js +32 -0
- package/lib/cjs/Table/Row.js +41 -0
- package/lib/cjs/Table/SubHeading.js +30 -0
- package/lib/cjs/Table/Table.js +124 -0
- package/lib/cjs/Table/index.js +19 -0
- package/lib/cjs/TermsAndConditions/ExpandCollapse.js +160 -0
- package/lib/cjs/TermsAndConditions/TermsAndConditions.js +283 -0
- package/lib/cjs/TermsAndConditions/dictionary.js +22 -0
- package/lib/cjs/TermsAndConditions/index.js +13 -0
- package/lib/cjs/Testimonial/Testimonial.js +240 -0
- package/lib/cjs/Testimonial/index.js +9 -0
- package/lib/cjs/Toast/Toast.js +165 -0
- package/lib/cjs/Toast/index.js +9 -0
- package/lib/cjs/Video/ControlBar/ControlBar.js +294 -0
- package/lib/cjs/Video/ControlBar/Controls/VideoButton/VideoButton.js +76 -0
- package/lib/cjs/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +169 -0
- package/lib/cjs/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +211 -0
- package/lib/cjs/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +197 -0
- package/lib/cjs/Video/MiddleControlButton/MiddleControlButton.js +78 -0
- package/lib/cjs/Video/Video.js +964 -0
- package/lib/cjs/Video/index.js +9 -0
- package/lib/cjs/Video/videoText.js +61 -0
- package/lib/cjs/VideoPicker/VideoPicker.js +197 -0
- package/lib/cjs/VideoPicker/VideoPickerPlayer.js +54 -0
- package/lib/cjs/VideoPicker/VideoPickerThumbnail.js +223 -0
- package/lib/cjs/VideoPicker/VideoSlider.js +88 -0
- package/lib/cjs/VideoPicker/index.js +9 -0
- package/lib/cjs/VideoPicker/videoPropType.js +17 -0
- package/lib/cjs/WaffleGrid/WaffleGrid.js +164 -0
- package/lib/cjs/WaffleGrid/index.js +9 -0
- package/lib/cjs/WebVideo/WebVideo.js +197 -0
- package/lib/cjs/WebVideo/index.js +9 -0
- package/lib/cjs/WebVideo/utils/index.js +57 -0
- package/lib/cjs/baseExports.js +438 -0
- package/lib/cjs/index.js +317 -0
- package/lib/cjs/server.js +13 -0
- package/lib/cjs/shared/ConditionalWrapper/ConditionalWrapper.js +29 -0
- package/lib/cjs/shared/ConditionalWrapper/index.js +9 -0
- package/lib/cjs/shared/FullBleedContent/FullBleedContent.js +108 -0
- package/lib/cjs/shared/FullBleedContent/getFullBleedBorderRadius.js +61 -0
- package/lib/cjs/shared/FullBleedContent/index.js +23 -0
- package/lib/cjs/shared/FullBleedContent/useFullBleedContentProps.js +61 -0
- package/lib/cjs/shared/VideoSplash/SplashButton/SplashButton.js +91 -0
- package/lib/cjs/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +229 -0
- package/lib/cjs/shared/VideoSplash/VideoSplash.js +72 -0
- package/lib/cjs/shared/VideoSplash/helpers.js +32 -0
- package/lib/cjs/utils/index.js +88 -0
- package/lib/cjs/utils/isElementFocusable.js +14 -0
- package/lib/cjs/utils/logger.js +24 -0
- package/lib/cjs/utils/media.js +45 -0
- package/lib/cjs/utils/renderStructuredContent.js +71 -0
- package/lib/cjs/utils/scrollToAnchor.js +25 -0
- package/lib/cjs/utils/ssr.js +50 -0
- package/lib/cjs/utils/theming/get-theme-from-server.js +24 -0
- package/lib/cjs/utils/theming/with-client-theme.js +31 -0
- package/lib/cjs/utils/theming/with-server-theme.js +33 -0
- package/lib/cjs/utils/transforms.js +11 -0
- package/lib/cjs/utils/useOverlaidPosition.js +222 -0
- package/lib/cjs/utils/useTypographyTheme.js +30 -0
- package/lib/{Badge → esm/Badge}/Badge.js +11 -19
- package/lib/{BlockQuote → esm/BlockQuote}/BlockQuote.js +17 -31
- package/lib/{Breadcrumbs → esm/Breadcrumbs}/Breadcrumbs.js +6 -5
- package/lib/{Breadcrumbs → esm/Breadcrumbs}/Item/Item.js +10 -6
- package/lib/{Callout → esm/Callout}/Callout.js +6 -5
- package/lib/{Card → esm/Card}/Card.js +10 -10
- package/lib/{Card → esm/Card}/CardContent.js +6 -5
- package/lib/{Card → esm/Card}/CardFooter.js +6 -5
- package/lib/{Countdown → esm/Countdown}/Countdown.js +53 -32
- package/lib/{Countdown → esm/Countdown}/Segment.js +6 -6
- package/lib/{DatePicker → esm/DatePicker}/CalendarContainer.js +5 -5
- package/lib/{DatePicker → esm/DatePicker}/DatePicker.js +24 -20
- package/lib/esm/DatePicker/reactDatesCss.js +3 -0
- package/lib/{Disclaimer → esm/Disclaimer}/Disclaimer.js +6 -5
- package/lib/{Footnote → esm/Footnote}/Footnote.js +43 -22
- package/lib/{Footnote → esm/Footnote}/FootnoteLink.js +6 -5
- package/lib/{NavigationBar → esm/NavigationBar}/NavigationBar.js +19 -20
- package/lib/{NavigationBar → esm/NavigationBar}/NavigationItem.js +6 -5
- package/lib/{NavigationBar → esm/NavigationBar}/NavigationSubMenu.js +1 -2
- package/lib/esm/NavigationBar/collapseItems.js +37 -0
- package/lib/{NavigationBar → esm/NavigationBar}/resolveItemSelection.js +1 -1
- package/lib/{OrderedList → esm/OrderedList}/Item.js +10 -6
- package/lib/{OrderedList → esm/OrderedList}/ItemBase.js +5 -5
- package/lib/{OrderedList → esm/OrderedList}/OrderedList.js +8 -8
- package/lib/{OrderedList → esm/OrderedList}/OrderedListBase.js +5 -5
- package/lib/{Paragraph → esm/Paragraph}/Paragraph.js +8 -16
- package/lib/{PreviewCard → esm/PreviewCard}/PreviewCard.js +10 -7
- package/lib/{PriceLockup → esm/PriceLockup}/PriceLockup.js +59 -69
- package/lib/{Progress → esm/Progress}/ProgressBar.js +6 -6
- package/lib/esm/QuantitySelector/styles.js +9 -0
- package/lib/{Ribbon → esm/Ribbon}/Ribbon.js +31 -57
- package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonImage.js +3 -4
- package/lib/esm/SkeletonProvider/SkeletonTypography.js +37 -0
- package/lib/{Span → esm/Span}/Span.js +7 -6
- package/lib/{Spinner → esm/Spinner}/Spinner.js +18 -8
- package/lib/{Spinner → esm/Spinner}/SpinnerContent.js +6 -5
- package/lib/{StoryCard → esm/StoryCard}/StoryCard.js +10 -7
- package/lib/{Table → esm/Table}/Cell.js +16 -45
- package/lib/esm/Table/Row.js +34 -0
- package/lib/{Table → esm/Table}/Table.js +18 -20
- package/lib/{TermsAndConditions → esm/TermsAndConditions}/ExpandCollapse.js +15 -8
- package/lib/{TermsAndConditions → esm/TermsAndConditions}/TermsAndConditions.js +22 -9
- package/lib/{Testimonial → esm/Testimonial}/Testimonial.js +26 -10
- package/lib/{Toast → esm/Toast}/Toast.js +15 -67
- package/lib/{Video → esm/Video}/ControlBar/ControlBar.js +18 -8
- package/lib/{Video → esm/Video}/ControlBar/Controls/VideoButton/VideoButton.js +7 -7
- package/lib/{Video → esm/Video}/ControlBar/Controls/VideoMenu/VideoMenu.js +14 -7
- package/lib/{Video → esm/Video}/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +14 -7
- package/lib/{Video → esm/Video}/ControlBar/Controls/VolumeSlider/VolumeSlider.js +10 -6
- package/lib/{Video → esm/Video}/MiddleControlButton/MiddleControlButton.js +6 -5
- package/lib/{Video → esm/Video}/Video.js +28 -12
- package/lib/{VideoPicker → esm/VideoPicker}/VideoPicker.js +21 -46
- package/lib/{VideoPicker → esm/VideoPicker}/VideoPickerThumbnail.js +19 -54
- package/lib/{WaffleGrid → esm/WaffleGrid}/WaffleGrid.js +14 -7
- package/lib/{WebVideo → esm/WebVideo}/WebVideo.js +14 -9
- package/lib/{baseExports.js → esm/baseExports.js} +1 -1
- package/lib/{index.js → esm/index.js} +1 -2
- package/lib/{shared → esm/shared}/FullBleedContent/FullBleedContent.js +5 -5
- package/lib/{shared → esm/shared}/VideoSplash/SplashButton/SplashButton.js +9 -6
- package/lib/{shared → esm/shared}/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +17 -8
- package/lib/{shared → esm/shared}/VideoSplash/VideoSplash.js +6 -5
- package/lib/{utils → esm/utils}/index.js +1 -2
- package/lib/{utils → esm/utils}/scrollToAnchor.js +2 -2
- package/lib/{utils → esm/utils}/ssr.js +8 -4
- package/lib/{utils → esm/utils}/useOverlaidPosition.js +2 -4
- package/package.json +17 -16
- package/src/Badge/Badge.jsx +4 -3
- package/src/BlockQuote/BlockQuote.jsx +2 -3
- package/src/Breadcrumbs/Breadcrumbs.jsx +2 -3
- package/src/Breadcrumbs/Item/Item.jsx +2 -3
- package/src/Callout/Callout.jsx +2 -4
- package/src/Card/Card.jsx +1 -3
- package/src/Card/CardContent.jsx +2 -3
- package/src/Card/CardFooter.jsx +2 -3
- package/src/Countdown/Countdown.jsx +62 -36
- package/src/Countdown/Segment.jsx +1 -3
- package/src/DatePicker/CalendarContainer.jsx +1 -3
- package/src/DatePicker/DatePicker.jsx +2 -3
- package/src/DatePicker/reactDatesCss.js +1 -3
- package/src/Disclaimer/Disclaimer.jsx +2 -3
- package/src/Footnote/Footnote.jsx +2 -10
- package/src/Footnote/FootnoteLink.jsx +2 -3
- package/src/NavigationBar/NavigationBar.jsx +2 -3
- package/src/NavigationBar/NavigationItem.jsx +2 -3
- package/src/OrderedList/Item.jsx +2 -3
- package/src/OrderedList/ItemBase.jsx +1 -3
- package/src/OrderedList/OrderedList.jsx +2 -3
- package/src/OrderedList/OrderedListBase.jsx +1 -3
- package/src/Paragraph/Paragraph.jsx +2 -4
- package/src/PreviewCard/PreviewCard.jsx +1 -3
- package/src/PriceLockup/PriceLockup.jsx +2 -3
- package/src/Progress/ProgressBar.jsx +1 -3
- package/src/QuantitySelector/styles.js +1 -3
- package/src/Ribbon/Ribbon.jsx +2 -3
- package/src/Span/Span.jsx +2 -4
- package/src/Spinner/Spinner.jsx +2 -3
- package/src/Spinner/SpinnerContent.jsx +2 -3
- package/src/StoryCard/StoryCard.jsx +1 -3
- package/src/Table/Cell.jsx +4 -5
- package/src/Table/Row.jsx +13 -2
- package/src/Table/Table.jsx +14 -5
- package/src/TermsAndConditions/ExpandCollapse.jsx +6 -4
- package/src/TermsAndConditions/TermsAndConditions.jsx +2 -3
- package/src/Testimonial/Testimonial.jsx +2 -3
- package/src/Toast/Toast.jsx +2 -3
- package/src/Video/ControlBar/ControlBar.jsx +2 -4
- package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +2 -4
- package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +2 -4
- package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +2 -4
- package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +2 -4
- package/src/Video/MiddleControlButton/MiddleControlButton.jsx +2 -4
- package/src/Video/Video.jsx +2 -4
- package/src/VideoPicker/VideoPicker.jsx +2 -4
- package/src/VideoPicker/VideoPickerThumbnail.jsx +1 -3
- package/src/WaffleGrid/WaffleGrid.jsx +2 -3
- package/src/WebVideo/WebVideo.jsx +3 -4
- package/src/baseExports.js +1 -0
- package/src/index.js +1 -2
- package/src/shared/FullBleedContent/FullBleedContent.jsx +1 -3
- package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +1 -3
- package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +1 -4
- package/src/shared/VideoSplash/VideoSplash.jsx +2 -3
- package/src/utils/index.js +1 -3
- package/src/utils/ssr.js +10 -3
- package/types/Callout.d.ts +2 -1
- package/types/Tooltip.d.ts +1 -0
- package/lib/DatePicker/reactDatesCss.js +0 -830
- package/lib/ExpandCollapseMini/ExpandCollapseMini.js +0 -73
- package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +0 -116
- package/lib/ExpandCollapseMini/index.js +0 -2
- package/lib/QuantitySelector/styles.js +0 -18
- package/lib/SkeletonProvider/SkeletonTypography.js +0 -38
- package/lib/Table/Row.js +0 -19
- package/lib/utils/theming/styled-components.js +0 -26
- package/src/ExpandCollapseMini/ExpandCollapseMini.jsx +0 -72
- package/src/ExpandCollapseMini/ExpandCollapseMiniControl.jsx +0 -104
- package/src/ExpandCollapseMini/index.js +0 -3
- package/src/utils/theming/styled-components.js +0 -23
- /package/lib/{Badge → esm/Badge}/index.js +0 -0
- /package/lib/{BlockQuote → esm/BlockQuote}/index.js +0 -0
- /package/lib/{Breadcrumbs → esm/Breadcrumbs}/index.js +0 -0
- /package/lib/{Callout → esm/Callout}/index.js +0 -0
- /package/lib/{Card → esm/Card}/index.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/constants.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/dictionary.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/index.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/types.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/useCountdown.js +0 -0
- /package/lib/{DatePicker → esm/DatePicker}/dictionary.js +0 -0
- /package/lib/{DatePicker → esm/DatePicker}/index.js +0 -0
- /package/lib/{Disclaimer → esm/Disclaimer}/index.js +0 -0
- /package/lib/{Footnote → esm/Footnote}/dictionary.js +0 -0
- /package/lib/{Footnote → esm/Footnote}/index.js +0 -0
- /package/lib/{IconButton → esm/IconButton}/IconButton.js +0 -0
- /package/lib/{IconButton → esm/IconButton}/index.js +0 -0
- /package/lib/{Image → esm/Image}/Image.js +0 -0
- /package/lib/{Image → esm/Image}/index.js +0 -0
- /package/lib/{Image → esm/Image}/server.js +0 -0
- /package/lib/{List → esm/List}/List.js +0 -0
- /package/lib/{List → esm/List}/ListItem.js +0 -0
- /package/lib/{List → esm/List}/index.js +0 -0
- /package/lib/{NavigationBar → esm/NavigationBar}/index.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/OptimizeImage.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/index.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/getFallbackUrl.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/getImageUrls.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/getOptimizedUrl.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/hasWebpSupport.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/index.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/isSvgUrl.js +0 -0
- /package/lib/{OrderedList → esm/OrderedList}/constants.js +0 -0
- /package/lib/{OrderedList → esm/OrderedList}/index.js +0 -0
- /package/lib/{Paragraph → esm/Paragraph}/index.js +0 -0
- /package/lib/{PreviewCard → esm/PreviewCard}/AuthorDate.js +0 -0
- /package/lib/{PreviewCard → esm/PreviewCard}/index.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/index.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/tokens.js +0 -0
- /package/lib/{Progress → esm/Progress}/index.js +0 -0
- /package/lib/{QuantitySelector → esm/QuantitySelector}/QuantitySelector.js +0 -0
- /package/lib/{QuantitySelector → esm/QuantitySelector}/SideButton.js +0 -0
- /package/lib/{QuantitySelector → esm/QuantitySelector}/dictionary.js +0 -0
- /package/lib/{QuantitySelector → esm/QuantitySelector}/index.js +0 -0
- /package/lib/{ResponsiveImage → esm/ResponsiveImage}/ResponsiveImage.js +0 -0
- /package/lib/{ResponsiveImage → esm/ResponsiveImage}/index.js +0 -0
- /package/lib/{Ribbon → esm/Ribbon}/index.js +0 -0
- /package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonProvider.js +0 -0
- /package/lib/{SkeletonProvider → esm/SkeletonProvider}/index.js +0 -0
- /package/lib/{Span → esm/Span}/index.js +0 -0
- /package/lib/{Spinner → esm/Spinner}/constants.js +0 -0
- /package/lib/{Spinner → esm/Spinner}/index.js +0 -0
- /package/lib/{StoryCard → esm/StoryCard}/index.js +0 -0
- /package/lib/{Table → esm/Table}/Body.js +0 -0
- /package/lib/{Table → esm/Table}/Header.js +0 -0
- /package/lib/{Table → esm/Table}/SubHeading.js +0 -0
- /package/lib/{Table → esm/Table}/index.js +0 -0
- /package/lib/{TermsAndConditions → esm/TermsAndConditions}/dictionary.js +0 -0
- /package/lib/{TermsAndConditions → esm/TermsAndConditions}/index.js +0 -0
- /package/lib/{Testimonial → esm/Testimonial}/index.js +0 -0
- /package/lib/{Toast → esm/Toast}/index.js +0 -0
- /package/lib/{Video → esm/Video}/index.js +0 -0
- /package/lib/{Video → esm/Video}/videoText.js +0 -0
- /package/lib/{VideoPicker → esm/VideoPicker}/VideoPickerPlayer.js +0 -0
- /package/lib/{VideoPicker → esm/VideoPicker}/VideoSlider.js +0 -0
- /package/lib/{VideoPicker → esm/VideoPicker}/index.js +0 -0
- /package/lib/{VideoPicker → esm/VideoPicker}/videoPropType.js +0 -0
- /package/lib/{WaffleGrid → esm/WaffleGrid}/index.js +0 -0
- /package/lib/{WebVideo → esm/WebVideo}/index.js +0 -0
- /package/lib/{WebVideo → esm/WebVideo}/utils/index.js +0 -0
- /package/lib/{server.js → esm/server.js} +0 -0
- /package/lib/{shared → esm/shared}/ConditionalWrapper/ConditionalWrapper.js +0 -0
- /package/lib/{shared → esm/shared}/ConditionalWrapper/index.js +0 -0
- /package/lib/{shared → esm/shared}/FullBleedContent/getFullBleedBorderRadius.js +0 -0
- /package/lib/{shared → esm/shared}/FullBleedContent/index.js +0 -0
- /package/lib/{shared → esm/shared}/FullBleedContent/useFullBleedContentProps.js +0 -0
- /package/lib/{shared → esm/shared}/VideoSplash/helpers.js +0 -0
- /package/lib/{utils → esm/utils}/isElementFocusable.js +0 -0
- /package/lib/{utils → esm/utils}/logger.js +0 -0
- /package/lib/{utils → esm/utils}/media.js +0 -0
- /package/lib/{utils → esm/utils}/renderStructuredContent.js +0 -0
- /package/lib/{utils → esm/utils}/theming/get-theme-from-server.js +0 -0
- /package/lib/{utils → esm/utils}/theming/with-client-theme.js +0 -0
- /package/lib/{utils → esm/utils}/theming/with-server-theme.js +0 -0
- /package/lib/{utils → esm/utils}/transforms.js +0 -0
- /package/lib/{utils → esm/utils}/useTypographyTheme.js +0 -0
|
@@ -2,16 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { viewports } from '@telus-uds/system-constants';
|
|
4
4
|
import { selectSystemProps, StackView, useThemeTokens, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
5
|
+
import styled, { css } from 'styled-components';
|
|
5
6
|
import { VideoPropType } from './videoPropType';
|
|
6
7
|
import VideoPickerThumbnail from './VideoPickerThumbnail';
|
|
7
8
|
import VideoPickerPlayer from './VideoPickerPlayer';
|
|
8
9
|
import VideoSlider from './VideoSlider';
|
|
9
|
-
import { htmlAttrs
|
|
10
|
+
import { htmlAttrs } from '../utils';
|
|
10
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
const {
|
|
12
|
-
styled,
|
|
13
|
-
css
|
|
14
|
-
} = styledComponents;
|
|
15
12
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
16
13
|
const framedContainerStyles = _ref => {
|
|
17
14
|
let {
|
|
@@ -21,71 +18,49 @@ const framedContainerStyles = _ref => {
|
|
|
21
18
|
framedContainerBorderRadius,
|
|
22
19
|
framedMaxHeight
|
|
23
20
|
} = _ref;
|
|
24
|
-
return css
|
|
25
|
-
background-color: ${framedContainerBackgroundColor};
|
|
26
|
-
border: ${framedContainerBorderWidth}px solid ${framedContainerBorderColor};
|
|
27
|
-
border-radius: ${framedContainerBorderRadius}px;
|
|
28
|
-
|
|
29
|
-
& > div {
|
|
30
|
-
max-height: ${framedMaxHeight}px;
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
21
|
+
return css(["background-color:", ";border:", "px solid ", ";border-radius:", "px;& > div{max-height:", "px;}"], framedContainerBackgroundColor, framedContainerBorderWidth, framedContainerBorderColor, framedContainerBorderRadius, framedMaxHeight);
|
|
33
22
|
};
|
|
34
|
-
const VideoPickerContainer = styled.div
|
|
35
|
-
|
|
23
|
+
const VideoPickerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
24
|
+
displayName: "VideoPicker__VideoPickerContainer",
|
|
25
|
+
componentId: "components-web__sc-x6lxp0-0"
|
|
26
|
+
})(["", ""], _ref2 => {
|
|
36
27
|
let {
|
|
37
28
|
isFramed,
|
|
38
29
|
...tokens
|
|
39
30
|
} = _ref2;
|
|
40
31
|
return isFramed && framedContainerStyles(tokens);
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
32
|
+
});
|
|
43
33
|
const framedPlayerContainerStyles = _ref3 => {
|
|
44
34
|
let {
|
|
45
35
|
framedMaxHeight,
|
|
46
36
|
framedContainerPadding
|
|
47
37
|
} = _ref3;
|
|
48
|
-
return css
|
|
49
|
-
width: 66.67%;
|
|
50
|
-
padding: ${framedContainerPadding}px;
|
|
51
|
-
max-height: ${framedMaxHeight}px;
|
|
52
|
-
flex-shrink: 0;
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
`;
|
|
38
|
+
return css(["width:66.67%;padding:", "px;max-height:", "px;flex-shrink:0;box-sizing:border-box;"], framedContainerPadding, framedMaxHeight);
|
|
55
39
|
};
|
|
56
|
-
const VideoPlayerContainer = styled.div
|
|
57
|
-
|
|
40
|
+
const VideoPlayerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
41
|
+
displayName: "VideoPicker__VideoPlayerContainer",
|
|
42
|
+
componentId: "components-web__sc-x6lxp0-1"
|
|
43
|
+
})(["", " overflow:auto;"], _ref4 => {
|
|
58
44
|
let {
|
|
59
45
|
isFramed,
|
|
60
46
|
...tokens
|
|
61
47
|
} = _ref4;
|
|
62
48
|
return isFramed && framedPlayerContainerStyles(tokens);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
`;
|
|
66
|
-
const framedVideoListContainerStyle = css`
|
|
67
|
-
max-height: ${_ref5 => {
|
|
49
|
+
});
|
|
50
|
+
const framedVideoListContainerStyle = /*#__PURE__*/css(["max-height:", "px;overflow:auto;flex-direction:column;"], _ref5 => {
|
|
68
51
|
let {
|
|
69
52
|
framedMaxHeight
|
|
70
53
|
} = _ref5;
|
|
71
54
|
return framedMaxHeight;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
display: flex;
|
|
78
|
-
justify-content: flex-start;
|
|
79
|
-
position: relative;
|
|
80
|
-
flex-grow: 1;
|
|
81
|
-
flex-direction: column;
|
|
82
|
-
${props => props.isFramed && framedVideoListContainerStyle}
|
|
83
|
-
`;
|
|
55
|
+
});
|
|
56
|
+
const VideoListContainer = /*#__PURE__*/styled.div.withConfig({
|
|
57
|
+
displayName: "VideoPicker__VideoListContainer",
|
|
58
|
+
componentId: "components-web__sc-x6lxp0-2"
|
|
59
|
+
})(["display:flex;justify-content:flex-start;position:relative;flex-grow:1;flex-direction:column;", ""], props => props.isFramed && framedVideoListContainerStyle);
|
|
84
60
|
const VideoPicker = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
85
|
-
var _videoList$;
|
|
86
61
|
let {
|
|
87
62
|
videoList = [],
|
|
88
|
-
selectedVideo =
|
|
63
|
+
selectedVideo = videoList[0]?.videoId,
|
|
89
64
|
frame,
|
|
90
65
|
onStartVideo = () => {},
|
|
91
66
|
onSelectVideo = () => {},
|
|
@@ -4,14 +4,11 @@ import StyleSheet from "react-native-web/dist/exports/StyleSheet";
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { viewports } from '@telus-uds/system-constants';
|
|
6
6
|
import { StackView, Typography, useViewport, horizontalScrollUtils, useThemeTokensCallback } from '@telus-uds/components-base';
|
|
7
|
-
import
|
|
7
|
+
import styled from 'styled-components';
|
|
8
8
|
import { getTimestamp } from '../shared/VideoSplash/helpers';
|
|
9
9
|
import { VideoPropType, RefPropType } from './videoPropType';
|
|
10
10
|
import VideoSplash from '../shared/VideoSplash/VideoSplash';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const {
|
|
13
|
-
styled
|
|
14
|
-
} = styledComponents;
|
|
15
12
|
const {
|
|
16
13
|
getItemPositionLayoutHandler,
|
|
17
14
|
itemPositionsPropType
|
|
@@ -44,74 +41,43 @@ const createReactNativeStyles = _ref => {
|
|
|
44
41
|
}
|
|
45
42
|
});
|
|
46
43
|
};
|
|
47
|
-
const ImageContainer = styled.div
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
const ImageContainer = /*#__PURE__*/styled.div.withConfig({
|
|
45
|
+
displayName: "VideoPickerThumbnail__ImageContainer",
|
|
46
|
+
componentId: "components-web__sc-1glxurq-0"
|
|
47
|
+
})(["padding:", ";border:", ";border-radius:", "px;"], props => `${props.outerBorderGap}px`, props => `${props.outerBorderWidth}px solid ${props.outerBorderColor}`, _ref2 => {
|
|
51
48
|
let {
|
|
52
49
|
outerBorderRadius
|
|
53
50
|
} = _ref2;
|
|
54
51
|
return outerBorderRadius;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
flex-shrink: 0;
|
|
61
|
-
|
|
62
|
-
* button {
|
|
63
|
-
display: none;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// use a pseudo-element to ensure aspect ratio
|
|
67
|
-
&::before {
|
|
68
|
-
content: '';
|
|
69
|
-
display: block;
|
|
70
|
-
padding-bottom: 56.25%;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&::after {
|
|
74
|
-
content: '';
|
|
75
|
-
border: ${_ref3 => {
|
|
52
|
+
});
|
|
53
|
+
const VideoThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
54
|
+
displayName: "VideoPickerThumbnail__VideoThumbnail",
|
|
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.layout === 'vertical' ? '100%' : '144px', _ref3 => {
|
|
76
57
|
let {
|
|
77
58
|
borderWidth
|
|
78
59
|
} = _ref3;
|
|
79
60
|
return borderWidth;
|
|
80
|
-
}
|
|
81
|
-
border-color: ${_ref4 => {
|
|
61
|
+
}, _ref4 => {
|
|
82
62
|
let {
|
|
83
63
|
borderColor
|
|
84
64
|
} = _ref4;
|
|
85
65
|
return borderColor;
|
|
86
|
-
}
|
|
87
|
-
border-radius: ${_ref5 => {
|
|
66
|
+
}, _ref5 => {
|
|
88
67
|
let {
|
|
89
68
|
borderRadius
|
|
90
69
|
} = _ref5;
|
|
91
70
|
return borderRadius;
|
|
92
|
-
}
|
|
93
|
-
position: absolute;
|
|
94
|
-
top: 0;
|
|
95
|
-
left: 0;
|
|
96
|
-
right: 0;
|
|
97
|
-
bottom: 0;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
& > div {
|
|
101
|
-
border-radius: ${_ref6 => {
|
|
71
|
+
}, _ref6 => {
|
|
102
72
|
let {
|
|
103
73
|
borderRadius
|
|
104
74
|
} = _ref6;
|
|
105
75
|
return borderRadius;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-webkit-line-clamp: 2;
|
|
112
|
-
-webkit-box-orient: vertical;
|
|
113
|
-
overflow: hidden;
|
|
114
|
-
`;
|
|
76
|
+
});
|
|
77
|
+
const ThumbnailTitleContainer = /*#__PURE__*/styled.div.withConfig({
|
|
78
|
+
displayName: "VideoPickerThumbnail__ThumbnailTitleContainer",
|
|
79
|
+
componentId: "components-web__sc-1glxurq-2"
|
|
80
|
+
})(["display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;"]);
|
|
115
81
|
const VideoPickerThumbnail = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
116
82
|
let {
|
|
117
83
|
videoPlayerRef,
|
|
@@ -178,9 +144,8 @@ const VideoPickerThumbnail = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
|
178
144
|
const handleLayout = itemPositions !== undefined ? getItemPositionLayoutHandler(itemPositions.positions, index) : undefined;
|
|
179
145
|
const onKeyPress = event => {
|
|
180
146
|
if (['Space', 'Enter'].includes(event.key)) {
|
|
181
|
-
var _videoPlayerRef$curre;
|
|
182
147
|
onSelectVideo(video);
|
|
183
|
-
const splashButton =
|
|
148
|
+
const splashButton = videoPlayerRef.current?.querySelector('button');
|
|
184
149
|
if (splashButton) splashButton.focus();
|
|
185
150
|
}
|
|
186
151
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React, { createElement as _createElement } 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
|
+
import styled from 'styled-components';
|
|
4
5
|
import OrderedListBase from '../OrderedList/OrderedListBase';
|
|
5
6
|
import ItemBase from '../OrderedList/ItemBase';
|
|
6
7
|
import Image from '../Image';
|
|
7
|
-
import { htmlAttrs
|
|
8
|
+
import { htmlAttrs } from '../utils';
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
const {
|
|
10
|
-
styled
|
|
11
|
-
} = styledComponents;
|
|
12
10
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
13
11
|
const row = (rowSize, rowBorderWidth) => ({
|
|
14
12
|
flexBasis: `calc(100% / ${rowSize})`,
|
|
@@ -19,13 +17,19 @@ const row = (rowSize, rowBorderWidth) => ({
|
|
|
19
17
|
borderTopWidth: `${rowBorderWidth}px`
|
|
20
18
|
}
|
|
21
19
|
});
|
|
22
|
-
const Container = styled(OrderedListBase)({
|
|
20
|
+
const Container = /*#__PURE__*/styled(OrderedListBase).withConfig({
|
|
21
|
+
displayName: "WaffleGrid__Container",
|
|
22
|
+
componentId: "components-web__sc-ec8g0a-0"
|
|
23
|
+
})({
|
|
23
24
|
display: 'flex',
|
|
24
25
|
flexDirection: 'row',
|
|
25
26
|
flexWrap: 'wrap',
|
|
26
27
|
justifyContent: 'flex-start'
|
|
27
28
|
});
|
|
28
|
-
const Item = styled(ItemBase)(
|
|
29
|
+
const Item = /*#__PURE__*/styled(ItemBase).withConfig({
|
|
30
|
+
displayName: "WaffleGrid__Item",
|
|
31
|
+
componentId: "components-web__sc-ec8g0a-1"
|
|
32
|
+
})(_ref => {
|
|
29
33
|
let {
|
|
30
34
|
rowSize,
|
|
31
35
|
itemPadding,
|
|
@@ -50,7 +54,10 @@ const Item = styled(ItemBase)(_ref => {
|
|
|
50
54
|
...row(rowSize, rowBorderWidth)
|
|
51
55
|
};
|
|
52
56
|
});
|
|
53
|
-
const Center = styled('div')({
|
|
57
|
+
const Center = /*#__PURE__*/styled('div').withConfig({
|
|
58
|
+
displayName: "WaffleGrid__Center",
|
|
59
|
+
componentId: "components-web__sc-ec8g0a-2"
|
|
60
|
+
})({
|
|
54
61
|
display: 'flex',
|
|
55
62
|
flexDirection: 'column',
|
|
56
63
|
alignItems: 'center',
|
|
@@ -2,22 +2,24 @@ import { selectSystemProps } from '@telus-uds/components-base';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import YouTube from 'react-youtube';
|
|
5
|
+
import styled from 'styled-components';
|
|
5
6
|
import VideoSplash from '../shared/VideoSplash/VideoSplash';
|
|
6
|
-
import { htmlAttrs
|
|
7
|
+
import { htmlAttrs } from '../utils';
|
|
7
8
|
import { triggerInProgressVideoIntervals, YoutubePlayerState } from './utils';
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const {
|
|
10
|
-
styled
|
|
11
|
-
} = styledComponents;
|
|
12
10
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
13
|
-
const StyledPlayerContainer = styled.div({
|
|
11
|
+
const StyledPlayerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
12
|
+
displayName: "WebVideo__StyledPlayerContainer",
|
|
13
|
+
componentId: "components-web__sc-327a6k-0"
|
|
14
|
+
})({
|
|
14
15
|
width: '100%',
|
|
15
16
|
minWidth: 288,
|
|
16
17
|
outline: 'none'
|
|
17
18
|
});
|
|
18
|
-
const StyledYoutubePlayer =
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const StyledYoutubePlayer = /*#__PURE__*/styled(YouTube).withConfig({
|
|
20
|
+
displayName: "WebVideo__StyledYoutubePlayer",
|
|
21
|
+
componentId: "components-web__sc-327a6k-1"
|
|
22
|
+
})({
|
|
21
23
|
position: 'absolute',
|
|
22
24
|
top: 0,
|
|
23
25
|
left: 0,
|
|
@@ -35,7 +37,10 @@ const aspectRatios = {
|
|
|
35
37
|
paddingTop: '100%'
|
|
36
38
|
}
|
|
37
39
|
};
|
|
38
|
-
const AspectLimiter = styled.div(
|
|
40
|
+
const AspectLimiter = /*#__PURE__*/styled.div.withConfig({
|
|
41
|
+
displayName: "WebVideo__AspectLimiter",
|
|
42
|
+
componentId: "components-web__sc-327a6k-2"
|
|
43
|
+
})(props => ({
|
|
39
44
|
...aspectRatios[props.aspectRatio],
|
|
40
45
|
position: 'relative'
|
|
41
46
|
}));
|
|
@@ -5,7 +5,7 @@ export {
|
|
|
5
5
|
/**
|
|
6
6
|
* Most base components should be re-exported as-is.
|
|
7
7
|
*/
|
|
8
|
-
ActionCard, A11yText, ActivityIndicator, Autocomplete, Box, Button, BaseProvider, A11yInfoProvider, ViewportProvider, ThemeProvider, ButtonDropdown, ButtonGroup, ButtonLink, CardGroup, Carousel, CarouselTabs, Checkbox, CheckboxGroup, ChevronLink, ColourToggle, Divider, DownloadApp, ExpandCollapse, Feedback, FlexGrid, FileUpload, Icon, InputLabel, InputSupports, Link, Listbox, Modal, MultiSelectFilter, Notification, Pagination, Portal, QuickLinks, QuickLinksFeature, Radio, RadioGroup, RadioCard, RadioCardGroup, Responsive, Search, Select, SideNav, Skeleton, SkipLink, Spacer, StackView, StackWrap, StepTracker, Status, Tabs, TabBar, Tags, TextButton, TextArea, TextInput, Timeline, ToggleSwitch, ToggleSwitchGroup, TooltipButton, Tooltip, Typography, Validator,
|
|
8
|
+
ActionCard, A11yText, ActivityIndicator, Autocomplete, Box, Button, BaseProvider, A11yInfoProvider, ViewportProvider, ThemeProvider, ButtonDropdown, ButtonGroup, ButtonLink, CardGroup, Carousel, CarouselTabs, Checkbox, CheckboxGroup, ChevronLink, ColourToggle, Divider, DownloadApp, ExpandCollapse, ExpandCollapseMini, Feedback, FlexGrid, FileUpload, Icon, InputLabel, InputSupports, Link, Listbox, Modal, MultiSelectFilter, Notification, Pagination, Portal, QuickLinks, QuickLinksFeature, Radio, RadioGroup, RadioCard, RadioCardGroup, Responsive, Search, Select, SideNav, Skeleton, SkipLink, Spacer, StackView, StackWrap, StepTracker, Status, Tabs, TabBar, Tags, TextButton, TextArea, TextInput, Timeline, ToggleSwitch, ToggleSwitchGroup, TooltipButton, Tooltip, Typography, Validator,
|
|
9
9
|
/*
|
|
10
10
|
* Most utilities exported from @telus-uds/components-base are for building systems, not apps.
|
|
11
11
|
* Re-export only those utilities with a stable API and known use cases within apps / pages.
|
|
@@ -9,7 +9,6 @@ export { default as Countdown } from './Countdown';
|
|
|
9
9
|
export { default as DatePicker } from './DatePicker';
|
|
10
10
|
export { default as Paragraph } from './Paragraph';
|
|
11
11
|
export { default as Span } from './Span';
|
|
12
|
-
export { default as ExpandCollapseMini } from './ExpandCollapseMini';
|
|
13
12
|
export { default as Callout } from './Callout';
|
|
14
13
|
export { default as PriceLockup } from './PriceLockup';
|
|
15
14
|
export { default as Footnote } from './Footnote';
|
|
@@ -36,5 +35,5 @@ export { default as TermsAndConditions } from './TermsAndConditions';
|
|
|
36
35
|
export { default as NavigationBar } from './NavigationBar';
|
|
37
36
|
export { default as Progress } from './Progress';
|
|
38
37
|
export { default as SkeletonProvider } from './SkeletonProvider';
|
|
39
|
-
export { ssrStyles
|
|
38
|
+
export { ssrStyles } from './utils';
|
|
40
39
|
export * from './baseExports';
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import styled from 'styled-components';
|
|
4
4
|
import ResponsiveImage from '../../ResponsiveImage';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const {
|
|
7
|
-
styled
|
|
8
|
-
} = styledComponents;
|
|
9
6
|
const selectFullBleedContentProps = _ref => {
|
|
10
7
|
let {
|
|
11
8
|
alt,
|
|
@@ -34,7 +31,10 @@ const selectFullBleedContentProps = _ref => {
|
|
|
34
31
|
xsSrc
|
|
35
32
|
};
|
|
36
33
|
};
|
|
37
|
-
const FullBleedContentContainer = styled.div(
|
|
34
|
+
const FullBleedContentContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35
|
+
displayName: "FullBleedContent__FullBleedContentContainer",
|
|
36
|
+
componentId: "components-web__sc-1130ea5-0"
|
|
37
|
+
})(_ref2 => {
|
|
38
38
|
let {
|
|
39
39
|
borderBottomLeftRadius,
|
|
40
40
|
borderBottomRightRadius,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useThemeTokens } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import styled from 'styled-components';
|
|
5
5
|
import { getAriaLabel, getTimestamp } from '../helpers';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const ButtonContainer = /*#__PURE__*/styled.button.withConfig({
|
|
8
|
+
displayName: "SplashButton__ButtonContainer",
|
|
9
|
+
componentId: "components-web__sc-1oe22fk-0"
|
|
10
|
+
})({
|
|
11
11
|
background: 'none',
|
|
12
12
|
border: 0,
|
|
13
13
|
padding: 0,
|
|
@@ -19,7 +19,10 @@ const ButtonContainer = styled.button({
|
|
|
19
19
|
alignItems: 'center',
|
|
20
20
|
cursor: 'pointer'
|
|
21
21
|
});
|
|
22
|
-
const ButtonContent = styled.div({
|
|
22
|
+
const ButtonContent = /*#__PURE__*/styled.div.withConfig({
|
|
23
|
+
displayName: "SplashButton__ButtonContent",
|
|
24
|
+
componentId: "components-web__sc-1oe22fk-1"
|
|
25
|
+
})({
|
|
23
26
|
display: 'flex',
|
|
24
27
|
justifyContent: 'center',
|
|
25
28
|
alignItems: 'center',
|
package/lib/{shared → esm/shared}/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Typography, useThemeTokens } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import styled from 'styled-components';
|
|
5
5
|
import { getAriaLabel, getTimestamp } from '../helpers';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const ButtonContainer = /*#__PURE__*/styled.button.withConfig({
|
|
8
|
+
displayName: "SplashButtonWithDetails__ButtonContainer",
|
|
9
|
+
componentId: "components-web__sc-1edwy9o-0"
|
|
10
|
+
})({
|
|
11
11
|
background: 'none',
|
|
12
12
|
border: 0,
|
|
13
13
|
position: 'absolute',
|
|
@@ -16,7 +16,10 @@ const ButtonContainer = styled.button({
|
|
|
16
16
|
padding: 0,
|
|
17
17
|
cursor: 'pointer'
|
|
18
18
|
});
|
|
19
|
-
const ButtonContent = styled.div({
|
|
19
|
+
const ButtonContent = /*#__PURE__*/styled.div.withConfig({
|
|
20
|
+
displayName: "SplashButtonWithDetails__ButtonContent",
|
|
21
|
+
componentId: "components-web__sc-1edwy9o-1"
|
|
22
|
+
})({
|
|
20
23
|
background: _ref => {
|
|
21
24
|
let {
|
|
22
25
|
buttonBackground
|
|
@@ -79,7 +82,10 @@ const ButtonContent = styled.div({
|
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
});
|
|
82
|
-
const PlayIconContainer = styled.div({
|
|
85
|
+
const PlayIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
86
|
+
displayName: "SplashButtonWithDetails__PlayIconContainer",
|
|
87
|
+
componentId: "components-web__sc-1edwy9o-2"
|
|
88
|
+
})({
|
|
83
89
|
display: 'flex',
|
|
84
90
|
justifyContent: 'center',
|
|
85
91
|
alignItems: 'center',
|
|
@@ -94,7 +100,10 @@ const PlayIconContainer = styled.div({
|
|
|
94
100
|
borderRadius: '100%',
|
|
95
101
|
transition: 'background 0.2s ease-in-out'
|
|
96
102
|
});
|
|
97
|
-
const DetailsContainer = styled.div({
|
|
103
|
+
const DetailsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
104
|
+
displayName: "SplashButtonWithDetails__DetailsContainer",
|
|
105
|
+
componentId: "components-web__sc-1edwy9o-3"
|
|
106
|
+
})({
|
|
98
107
|
display: 'flex',
|
|
99
108
|
flexDirection: 'column',
|
|
100
109
|
alignItems: 'flex-start',
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { selectSystemProps, useViewport } from '@telus-uds/components-base';
|
|
4
|
+
import styled from 'styled-components';
|
|
4
5
|
import { viewports } from '@telus-uds/system-constants';
|
|
5
6
|
import SplashButton from './SplashButton/SplashButton';
|
|
6
7
|
import SplashButtonWithDetails from './SplashButtonWithDetails/SplashButtonWithDetails';
|
|
7
8
|
import videoText from '../../Video/videoText';
|
|
8
|
-
import { htmlAttrs
|
|
9
|
+
import { htmlAttrs } from '../../utils';
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
const {
|
|
11
|
-
styled
|
|
12
|
-
} = styledComponents;
|
|
13
11
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
14
|
-
const SplashBackground = styled.div(
|
|
12
|
+
const SplashBackground = /*#__PURE__*/styled.div.withConfig({
|
|
13
|
+
displayName: "VideoSplash__SplashBackground",
|
|
14
|
+
componentId: "components-web__sc-1ejxt6-0"
|
|
15
|
+
})(_ref => {
|
|
15
16
|
let {
|
|
16
17
|
videoPoster
|
|
17
18
|
} = _ref;
|
|
@@ -8,5 +8,4 @@ import isElementFocusable from './isElementFocusable';
|
|
|
8
8
|
import renderStructuredContent from './renderStructuredContent';
|
|
9
9
|
import useOverlaidPosition from './useOverlaidPosition';
|
|
10
10
|
import scrollToAnchor from './scrollToAnchor';
|
|
11
|
-
|
|
12
|
-
export { deprecate, htmlAttrs, contentfulProps, transformGradient, useTypographyTheme, warn, media, renderStructuredContent, ssrStyles, isElementFocusable, useOverlaidPosition, scrollToAnchor, styledComponents };
|
|
11
|
+
export { deprecate, htmlAttrs, contentfulProps, transformGradient, useTypographyTheme, warn, media, renderStructuredContent, ssrStyles, isElementFocusable, useOverlaidPosition, scrollToAnchor };
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @param {Function} onAfterScroll - A callback function to be executed after the scroll action is completed.
|
|
7
7
|
*/
|
|
8
8
|
const scrollToAnchor = (href, event, onAfterScroll) => {
|
|
9
|
-
if (href
|
|
9
|
+
if (href?.startsWith('#')) {
|
|
10
10
|
event.preventDefault();
|
|
11
11
|
const target = document.getElementById(href.slice(1));
|
|
12
|
-
target
|
|
12
|
+
target?.scrollIntoView({
|
|
13
13
|
behavior: 'smooth'
|
|
14
14
|
});
|
|
15
15
|
window.location.hash = href;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ServerStyleSheet } from 'styled-components';
|
|
1
2
|
import { ssrStyles as baseSsrStyles } from '@telus-uds/components-base';
|
|
2
|
-
import styledComponents from './theming/styled-components';
|
|
3
3
|
/**
|
|
4
4
|
* Returns object with `renderApp` and `getStyles` functions.
|
|
5
5
|
* Weave these into your app's server-side render process:
|
|
@@ -23,15 +23,19 @@ const ssrStyles = function () {
|
|
|
23
23
|
styleGetters = [],
|
|
24
24
|
collectStyles = renderedApp => renderedApp
|
|
25
25
|
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
26
|
-
|
|
27
|
-
ServerStyleSheet
|
|
28
|
-
} = styledComponents;
|
|
26
|
+
let router = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'pages';
|
|
29
27
|
const sheet = new ServerStyleSheet();
|
|
30
28
|
const getStyledComponentsStyles = () => {
|
|
31
29
|
const styles = sheet.getStyleElement();
|
|
32
30
|
sheet.seal();
|
|
33
31
|
return styles;
|
|
34
32
|
};
|
|
33
|
+
if (router === 'app') {
|
|
34
|
+
return baseSsrStyles(appName, {
|
|
35
|
+
styleGetters: [...styleGetters],
|
|
36
|
+
collectStyles
|
|
37
|
+
});
|
|
38
|
+
}
|
|
35
39
|
return baseSsrStyles(appName, {
|
|
36
40
|
styleGetters: [getStyledComponentsStyles, ...styleGetters],
|
|
37
41
|
collectStyles: renderedApp => collectStyles(sheet.collectStyles(renderedApp))
|
|
@@ -159,11 +159,10 @@ const useOverlaidPosition = _ref3 => {
|
|
|
159
159
|
const readyToShow = Boolean(isShown && sourceRef.current);
|
|
160
160
|
useEffect(() => {
|
|
161
161
|
const handleDimensionsChange = _ref5 => {
|
|
162
|
-
var _sourceRef$current;
|
|
163
162
|
let {
|
|
164
163
|
window
|
|
165
164
|
} = _ref5;
|
|
166
|
-
|
|
165
|
+
sourceRef.current?.measureInWindow((x, y, width, height) => {
|
|
167
166
|
// Could add a debouncer here if there's too many rerenders during gradual resizes
|
|
168
167
|
setWindowDimensions(window);
|
|
169
168
|
setSourceLayout({
|
|
@@ -176,8 +175,7 @@ const useOverlaidPosition = _ref3 => {
|
|
|
176
175
|
};
|
|
177
176
|
let subscription;
|
|
178
177
|
const unsubscribe = () => {
|
|
179
|
-
|
|
180
|
-
if (typeof ((_subscription = subscription) === null || _subscription === void 0 ? void 0 : _subscription.remove) === 'function') {
|
|
178
|
+
if (typeof subscription?.remove === 'function') {
|
|
181
179
|
// React Native >=0.65.0
|
|
182
180
|
subscription.remove();
|
|
183
181
|
} else if (typeof Dimensions.remove === 'function') {
|
package/package.json
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "TELUS Digital",
|
|
3
|
-
"type": "module",
|
|
4
3
|
"browserslist": [
|
|
5
4
|
"extends @telus-uds/browserslist-config"
|
|
6
5
|
],
|
|
7
6
|
"dependencies": {
|
|
8
7
|
"@gorhom/portal": "^1.0.14",
|
|
9
|
-
"@telus-uds/components-base": "^
|
|
10
|
-
"@telus-uds/system-constants": "^
|
|
8
|
+
"@telus-uds/components-base": "^3.0.0",
|
|
9
|
+
"@telus-uds/system-constants": "^3.0.0",
|
|
11
10
|
"fscreen": "^1.2.0",
|
|
12
11
|
"lodash.omit": "^4.5.0",
|
|
13
12
|
"moment": "2.29.4",
|
|
14
13
|
"react-dates": "^21.8.0",
|
|
15
14
|
"react-helmet-async": "^1.3.0",
|
|
16
15
|
"react-moment-proptypes": "^1.8.1",
|
|
17
|
-
"@telus-uds/system-theme-tokens": "^
|
|
16
|
+
"@telus-uds/system-theme-tokens": "^4.0.0",
|
|
18
17
|
"prop-types": "^15.7.2",
|
|
19
18
|
"lodash.throttle": "^4.1.1",
|
|
20
19
|
"react-youtube": "^10.1.0",
|
|
@@ -22,20 +21,20 @@
|
|
|
22
21
|
},
|
|
23
22
|
"exports": {
|
|
24
23
|
".": {
|
|
25
|
-
"import": "./lib/index.js",
|
|
26
|
-
"
|
|
24
|
+
"import": "./lib/esm/index.js",
|
|
25
|
+
"require": "./lib/cjs/index.js"
|
|
27
26
|
},
|
|
28
27
|
"./*": {
|
|
29
|
-
"import": "./lib/*/index.js",
|
|
30
|
-
"
|
|
28
|
+
"import": "./lib/esm/*/index.js",
|
|
29
|
+
"require": "./lib/cjs/*/index.js"
|
|
31
30
|
},
|
|
32
31
|
"./server": {
|
|
33
|
-
"import": "./lib/server.js",
|
|
34
|
-
"
|
|
32
|
+
"import": "./lib/esm/server.js",
|
|
33
|
+
"require": "./lib/cjs/server.js"
|
|
35
34
|
},
|
|
36
35
|
"./server/*": {
|
|
37
|
-
"import": "./lib/*/server.js",
|
|
38
|
-
"
|
|
36
|
+
"import": "./lib/esm/*/server.js",
|
|
37
|
+
"require": "./lib/cjs/*/server.js"
|
|
39
38
|
}
|
|
40
39
|
},
|
|
41
40
|
"description": "UDS mult-brand web components",
|
|
@@ -56,8 +55,8 @@
|
|
|
56
55
|
},
|
|
57
56
|
"homepage": "https://github.com/telus/universal-design-system#readme",
|
|
58
57
|
"license": "MIT",
|
|
59
|
-
"main": "lib/index.js",
|
|
60
|
-
"module": "lib/index.js",
|
|
58
|
+
"main": "lib/cjs/index.js",
|
|
59
|
+
"module": "lib/esm/index.js",
|
|
61
60
|
"name": "@telus-uds/components-web",
|
|
62
61
|
"peerDependencies": {
|
|
63
62
|
"react": "^18.2.0",
|
|
@@ -70,7 +69,9 @@
|
|
|
70
69
|
"url": "git+https://github.com/telus/universal-design-system.git"
|
|
71
70
|
},
|
|
72
71
|
"scripts": {
|
|
73
|
-
"build": "babel src -d lib
|
|
72
|
+
"build:cjs": "babel src -d lib/cjs",
|
|
73
|
+
"build:esm": "babel src -d lib/esm --env-name module",
|
|
74
|
+
"build": "npm run build:cjs && npm run build:esm",
|
|
74
75
|
"format": "prettier --write .",
|
|
75
76
|
"lint": "telus-standard",
|
|
76
77
|
"lint:fix": "telus-standard --fix",
|
|
@@ -81,5 +82,5 @@
|
|
|
81
82
|
"skip": true
|
|
82
83
|
},
|
|
83
84
|
"types": "types/index.d.ts",
|
|
84
|
-
"version": "
|
|
85
|
+
"version": "4.0.0"
|
|
85
86
|
}
|