@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
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _componentsBase = require("@telus-uds/components-base");
|
|
10
|
+
var _portal = require("@gorhom/portal");
|
|
11
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
|
+
var _SpinnerContent = _interopRequireDefault(require("./SpinnerContent"));
|
|
13
|
+
var _utils = require("../utils");
|
|
14
|
+
var _constants = require("./constants");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
18
|
+
const SpinnerContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
19
|
+
displayName: "Spinner__SpinnerContainer",
|
|
20
|
+
componentId: "components-web__sc-116rqck-0"
|
|
21
|
+
})(_ref => {
|
|
22
|
+
let {
|
|
23
|
+
inline,
|
|
24
|
+
fullScreen
|
|
25
|
+
} = _ref;
|
|
26
|
+
return {
|
|
27
|
+
position: 'relative',
|
|
28
|
+
...(inline && {
|
|
29
|
+
display: 'block',
|
|
30
|
+
...(0, _utils.media)().from('md').css({
|
|
31
|
+
display: 'inline-block'
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
...(fullScreen && {
|
|
35
|
+
top: '50%',
|
|
36
|
+
transform: 'translateY(-50%)'
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
const ContentOverlay = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
41
|
+
displayName: "Spinner__ContentOverlay",
|
|
42
|
+
componentId: "components-web__sc-116rqck-1"
|
|
43
|
+
})({
|
|
44
|
+
position: 'absolute',
|
|
45
|
+
width: '100%',
|
|
46
|
+
height: '100%',
|
|
47
|
+
zIndex: _constants.BACKDROP_Z_INDEX
|
|
48
|
+
});
|
|
49
|
+
const FullscreenOverlay = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
50
|
+
displayName: "Spinner__FullscreenOverlay",
|
|
51
|
+
componentId: "components-web__sc-116rqck-2"
|
|
52
|
+
})(_ref2 => {
|
|
53
|
+
let {
|
|
54
|
+
fullScreenOverLayBackground
|
|
55
|
+
} = _ref2;
|
|
56
|
+
return {
|
|
57
|
+
position: 'fixed',
|
|
58
|
+
width: '100vw',
|
|
59
|
+
height: '100vh',
|
|
60
|
+
top: 0,
|
|
61
|
+
left: 0,
|
|
62
|
+
zIndex: _constants.BACKDROP_Z_INDEX,
|
|
63
|
+
backgroundColor: fullScreenOverLayBackground
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
const OpaqueContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
67
|
+
displayName: "Spinner__OpaqueContainer",
|
|
68
|
+
componentId: "components-web__sc-116rqck-3"
|
|
69
|
+
})({
|
|
70
|
+
opacity: _constants.BACKDROP_OPACITY
|
|
71
|
+
});
|
|
72
|
+
const recursiveMap = (children, fn) => _react.default.Children.map(children, child => {
|
|
73
|
+
if (! /*#__PURE__*/_react.default.isValidElement(child)) {
|
|
74
|
+
return child;
|
|
75
|
+
}
|
|
76
|
+
if (child.props.children) {
|
|
77
|
+
return fn(/*#__PURE__*/_react.default.cloneElement(child, {
|
|
78
|
+
children: recursiveMap(child.props.children, fn)
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
return fn(child);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Loading indicator.
|
|
86
|
+
*/
|
|
87
|
+
const Spinner = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
88
|
+
let {
|
|
89
|
+
children,
|
|
90
|
+
fullScreen = false,
|
|
91
|
+
inline = false,
|
|
92
|
+
label,
|
|
93
|
+
labelPosition,
|
|
94
|
+
show = false,
|
|
95
|
+
isStatic = false,
|
|
96
|
+
tokens,
|
|
97
|
+
variant = {},
|
|
98
|
+
...rest
|
|
99
|
+
} = _ref3;
|
|
100
|
+
const {
|
|
101
|
+
fullScreenOverLayBackground,
|
|
102
|
+
size,
|
|
103
|
+
thickness
|
|
104
|
+
} = (0, _componentsBase.useThemeTokens)('Spinner', tokens, variant);
|
|
105
|
+
const {
|
|
106
|
+
size: sizeVariant = 'large'
|
|
107
|
+
} = variant;
|
|
108
|
+
(0, _componentsBase.useScrollBlocking)([fullScreen, show]);
|
|
109
|
+
if (!show) {
|
|
110
|
+
return children ?? null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Full screen spinner
|
|
114
|
+
if (fullScreen) {
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_portal.Portal, {
|
|
116
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(FullscreenOverlay, {
|
|
117
|
+
fullScreenOverLayBackground: fullScreenOverLayBackground,
|
|
118
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SpinnerContainer, {
|
|
119
|
+
inline: inline,
|
|
120
|
+
fullScreen: fullScreen,
|
|
121
|
+
"aria-live": "assertive",
|
|
122
|
+
...selectProps(rest),
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SpinnerContent.default, {
|
|
124
|
+
label: label,
|
|
125
|
+
labelPosition: labelPosition,
|
|
126
|
+
overlay: true,
|
|
127
|
+
size: size,
|
|
128
|
+
thickness: thickness,
|
|
129
|
+
sizeVariant: sizeVariant,
|
|
130
|
+
isStatic: isStatic
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Overlay spinner
|
|
138
|
+
if (children) {
|
|
139
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SpinnerContainer, {
|
|
140
|
+
inline: inline,
|
|
141
|
+
"aria-live": "assertive",
|
|
142
|
+
...selectProps(rest),
|
|
143
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SpinnerContent.default, {
|
|
144
|
+
label: label,
|
|
145
|
+
labelPosition: labelPosition,
|
|
146
|
+
overlay: true,
|
|
147
|
+
size: size,
|
|
148
|
+
thickness: thickness,
|
|
149
|
+
sizeVariant: sizeVariant,
|
|
150
|
+
isStatic: isStatic
|
|
151
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ContentOverlay, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(OpaqueContainer, {
|
|
152
|
+
inert: "true",
|
|
153
|
+
children: recursiveMap(children, c => {
|
|
154
|
+
if (c) {
|
|
155
|
+
return /*#__PURE__*/_react.default.cloneElement(c, {
|
|
156
|
+
tabIndex: '-1',
|
|
157
|
+
'aria-hidden': 'true'
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return undefined;
|
|
161
|
+
})
|
|
162
|
+
})]
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Standalone spinner
|
|
167
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SpinnerContainer, {
|
|
168
|
+
ref: ref,
|
|
169
|
+
...selectProps(rest),
|
|
170
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SpinnerContent.default, {
|
|
171
|
+
label: label,
|
|
172
|
+
labelPosition: labelPosition,
|
|
173
|
+
size: size,
|
|
174
|
+
thickness: thickness,
|
|
175
|
+
sizeVariant: sizeVariant,
|
|
176
|
+
isStatic: isStatic
|
|
177
|
+
})
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
Spinner.displayName = 'Spinner';
|
|
181
|
+
Spinner.propTypes = {
|
|
182
|
+
...selectedSystemPropTypes,
|
|
183
|
+
tokens: (0, _componentsBase.getTokensPropType)('Spinner'),
|
|
184
|
+
/**
|
|
185
|
+
* Content to be overlaid while the spinner is active. Can be text, any HTML element,
|
|
186
|
+
* or any component.
|
|
187
|
+
*/
|
|
188
|
+
children: _propTypes.default.node,
|
|
189
|
+
/**
|
|
190
|
+
* Enables body locking.
|
|
191
|
+
*/
|
|
192
|
+
fullScreen: _propTypes.default.bool,
|
|
193
|
+
/**
|
|
194
|
+
* Set the inline prop to true if the Spinner should only cover its children; if
|
|
195
|
+
* the Spinner should cover the full width of its parent regardless of the size of
|
|
196
|
+
* its children, inline should be set to false
|
|
197
|
+
*/
|
|
198
|
+
inline: _propTypes.default.bool,
|
|
199
|
+
/**
|
|
200
|
+
* Communicates a message to assistive technology while visible. This same message
|
|
201
|
+
* will appear underneath the spinner when its `size` is `large`.
|
|
202
|
+
*/
|
|
203
|
+
label: _propTypes.default.string.isRequired,
|
|
204
|
+
/**
|
|
205
|
+
* The size of the spinner
|
|
206
|
+
*/
|
|
207
|
+
// size: PropTypes.oneOf(['large', 'small']),
|
|
208
|
+
/**
|
|
209
|
+
* Whether or not to render the spinner.
|
|
210
|
+
*/
|
|
211
|
+
show: _propTypes.default.bool,
|
|
212
|
+
/**
|
|
213
|
+
* If true, it should render a static spinner
|
|
214
|
+
*/
|
|
215
|
+
isStatic: _propTypes.default.bool,
|
|
216
|
+
/**
|
|
217
|
+
* Determine where the label of the spinner should be placed, left, right, bottom or top.
|
|
218
|
+
*/
|
|
219
|
+
labelPosition: _propTypes.default.string
|
|
220
|
+
};
|
|
221
|
+
var _default = exports.default = Spinner;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _componentsBase = require("@telus-uds/components-base");
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
var _utils = require("../utils");
|
|
12
|
+
var _constants = require("./constants");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
16
|
+
const Container = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
17
|
+
displayName: "SpinnerContent__Container",
|
|
18
|
+
componentId: "components-web__sc-1c8bd8e-0"
|
|
19
|
+
})(_ref => {
|
|
20
|
+
let {
|
|
21
|
+
overlay
|
|
22
|
+
} = _ref;
|
|
23
|
+
return {
|
|
24
|
+
display: 'inline-flex',
|
|
25
|
+
flexDirection: 'column',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
...(overlay && {
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
top: '50%',
|
|
30
|
+
left: '50%',
|
|
31
|
+
transform: 'translate(-50%, -50%)',
|
|
32
|
+
zIndex: _constants.BACKDROP_Z_INDEX
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
const SpinnerContent = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
37
|
+
let {
|
|
38
|
+
label,
|
|
39
|
+
labelPosition,
|
|
40
|
+
overlay = false,
|
|
41
|
+
sizeVariant,
|
|
42
|
+
size,
|
|
43
|
+
thickness,
|
|
44
|
+
isStatic,
|
|
45
|
+
...rest
|
|
46
|
+
} = _ref2;
|
|
47
|
+
const labelMapping = {
|
|
48
|
+
top: 'column-reverse',
|
|
49
|
+
bottom: 'column',
|
|
50
|
+
left: 'row-reverse',
|
|
51
|
+
right: 'row'
|
|
52
|
+
};
|
|
53
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Container, {
|
|
54
|
+
overlay: overlay,
|
|
55
|
+
ref: ref,
|
|
56
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
|
|
57
|
+
space: 3,
|
|
58
|
+
tokens: {
|
|
59
|
+
alignItems: 'center'
|
|
60
|
+
},
|
|
61
|
+
direction: labelMapping[labelPosition],
|
|
62
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ActivityIndicator, {
|
|
63
|
+
label: label,
|
|
64
|
+
tokens: {
|
|
65
|
+
size,
|
|
66
|
+
thickness
|
|
67
|
+
},
|
|
68
|
+
isStatic: isStatic,
|
|
69
|
+
...selectProps(rest)
|
|
70
|
+
}), sizeVariant === _constants.LARGE && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
71
|
+
children: label
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
SpinnerContent.displayName = 'SpinnerContent';
|
|
77
|
+
SpinnerContent.propTypes = {
|
|
78
|
+
...selectedSystemPropTypes,
|
|
79
|
+
/**
|
|
80
|
+
* Communicates a message to assistive technology while visible. This same message will appear underneath the spinner when its `size` is `large`.
|
|
81
|
+
*/
|
|
82
|
+
label: _propTypes.default.string.isRequired,
|
|
83
|
+
/**
|
|
84
|
+
* Whether the container has to have an overlay styling.
|
|
85
|
+
*/
|
|
86
|
+
overlay: _propTypes.default.bool,
|
|
87
|
+
/**
|
|
88
|
+
* Size (width and height) of the spinner.
|
|
89
|
+
*/
|
|
90
|
+
size: _propTypes.default.number,
|
|
91
|
+
/**
|
|
92
|
+
* The size of the spinner
|
|
93
|
+
*/
|
|
94
|
+
sizeVariant: _propTypes.default.oneOf(['large', 'small']),
|
|
95
|
+
/**
|
|
96
|
+
* If true, it should render a static spinner
|
|
97
|
+
*/
|
|
98
|
+
isStatic: _propTypes.default.bool
|
|
99
|
+
};
|
|
100
|
+
var _default = exports.default = SpinnerContent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SMALL = exports.LARGE = exports.BACKDROP_Z_INDEX = exports.BACKDROP_OPACITY = void 0;
|
|
7
|
+
const BACKDROP_OPACITY = exports.BACKDROP_OPACITY = 0.06;
|
|
8
|
+
const BACKDROP_Z_INDEX = exports.BACKDROP_Z_INDEX = 1400;
|
|
9
|
+
const LARGE = exports.LARGE = 'large';
|
|
10
|
+
const SMALL = exports.SMALL = 'small';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Spinner = _interopRequireDefault(require("./Spinner"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _Spinner.default;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _componentsBase = require("@telus-uds/components-base");
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
var _FullBleedContent = _interopRequireWildcard(require("../shared/FullBleedContent"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
// Passes React Native-oriented system props through UDS PressableCardBase
|
|
17
|
+
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_componentsBase.a11yProps, _componentsBase.focusHandlerProps, _componentsBase.viewProps]);
|
|
18
|
+
|
|
19
|
+
// Stop changes to the card's inner border width causing the size and
|
|
20
|
+
// apparent position of the full bleed image to change.
|
|
21
|
+
const FullBleedOffsetOuter = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
22
|
+
displayName: "StoryCard__FullBleedOffsetOuter",
|
|
23
|
+
componentId: "components-web__sc-yhvivu-0"
|
|
24
|
+
})(_ref => {
|
|
25
|
+
let {
|
|
26
|
+
borderOffset
|
|
27
|
+
} = _ref;
|
|
28
|
+
return {
|
|
29
|
+
overflow: 'hidden',
|
|
30
|
+
marginTop: borderOffset * 2
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
const FullBleedOffsetInner = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
34
|
+
displayName: "StoryCard__FullBleedOffsetInner",
|
|
35
|
+
componentId: "components-web__sc-yhvivu-1"
|
|
36
|
+
})(_ref2 => {
|
|
37
|
+
let {
|
|
38
|
+
borderOffset
|
|
39
|
+
} = _ref2;
|
|
40
|
+
return {
|
|
41
|
+
position: 'relative',
|
|
42
|
+
margin: 0 - borderOffset
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Showcase and guide users to another page, offering a description of that page's story.
|
|
48
|
+
* Whole card is interactive, width expands based on column or container.
|
|
49
|
+
*
|
|
50
|
+
* - Use `tag` to show category of content
|
|
51
|
+
* - Use `date` to show when the story was published
|
|
52
|
+
* - Use `title` to show title of the story
|
|
53
|
+
* - Use `description` to show description of the story
|
|
54
|
+
* - Use `href` to set the target URL
|
|
55
|
+
* - Use `fullBleedContent` to set the thumbnail image
|
|
56
|
+
*/
|
|
57
|
+
const StoryCard = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
58
|
+
let {
|
|
59
|
+
tag,
|
|
60
|
+
date,
|
|
61
|
+
title,
|
|
62
|
+
description,
|
|
63
|
+
fullBleedImage,
|
|
64
|
+
fullBleedContent = fullBleedImage,
|
|
65
|
+
onPress,
|
|
66
|
+
href,
|
|
67
|
+
tokens,
|
|
68
|
+
variant = {},
|
|
69
|
+
...rest
|
|
70
|
+
} = _ref3;
|
|
71
|
+
const {
|
|
72
|
+
fullBleedContentPosition,
|
|
73
|
+
contentStackDirection,
|
|
74
|
+
fullBleedContentProps
|
|
75
|
+
} = (0, _FullBleedContent.useFullBleedContentProps)({
|
|
76
|
+
...fullBleedContent,
|
|
77
|
+
position: 'bottom'
|
|
78
|
+
});
|
|
79
|
+
const generalTokens = (0, _componentsBase.useThemeTokens)('StoryCard', tokens, variant);
|
|
80
|
+
const getTokens = (0, _componentsBase.useThemeTokensCallback)('StoryCard', tokens, variant);
|
|
81
|
+
const getPressableCardTokens = cardState => getTokens(cardState);
|
|
82
|
+
const {
|
|
83
|
+
hrefAttrs,
|
|
84
|
+
rest: unusedRest
|
|
85
|
+
} = _componentsBase.hrefAttrsProp.bundle(rest);
|
|
86
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.PressableCardBase, {
|
|
87
|
+
ref: ref,
|
|
88
|
+
onPress: onPress,
|
|
89
|
+
href: href,
|
|
90
|
+
hrefAttrs: hrefAttrs,
|
|
91
|
+
tokens: getPressableCardTokens,
|
|
92
|
+
...selectProps(unusedRest),
|
|
93
|
+
children: cardState => {
|
|
94
|
+
const {
|
|
95
|
+
borderRadius,
|
|
96
|
+
borderWidth
|
|
97
|
+
} = getPressableCardTokens(cardState);
|
|
98
|
+
|
|
99
|
+
// Stop content jumping around as border size changes
|
|
100
|
+
const borderOffset = borderWidth - generalTokens.borderWidth;
|
|
101
|
+
const fullBleedBorderRadius = (0, _FullBleedContent.getFullBleedBorderRadius)(borderRadius + borderOffset, fullBleedContentPosition);
|
|
102
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
|
|
103
|
+
direction: contentStackDirection,
|
|
104
|
+
tokens: {
|
|
105
|
+
justifyContent: 'space-between',
|
|
106
|
+
flexGrow: 1
|
|
107
|
+
},
|
|
108
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.Box, {
|
|
109
|
+
horizontal: {
|
|
110
|
+
xs: 4,
|
|
111
|
+
lg: 5,
|
|
112
|
+
options: {
|
|
113
|
+
subtract: borderOffset
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
vertical: {
|
|
117
|
+
xs: 5,
|
|
118
|
+
lg: 7,
|
|
119
|
+
options: {
|
|
120
|
+
subtract: borderOffset
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackWrap, {
|
|
124
|
+
space: 1,
|
|
125
|
+
tokens: {
|
|
126
|
+
justifyContent: 'space-between',
|
|
127
|
+
alignItems: 'baseline'
|
|
128
|
+
},
|
|
129
|
+
children: [Boolean(tag) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
130
|
+
variant: {
|
|
131
|
+
size: 'eyebrow'
|
|
132
|
+
},
|
|
133
|
+
children: tag
|
|
134
|
+
}), Boolean(date) &&
|
|
135
|
+
/*#__PURE__*/
|
|
136
|
+
// TODO: get user locale and apply date formatting: "MMM DD, YYYY" for `en` and "YYYY-MM-DD" for `fr`
|
|
137
|
+
// Get locale based on decision of https://github.com/telus/universal-design-system/issues/715
|
|
138
|
+
(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
139
|
+
variant: {
|
|
140
|
+
size: 'small'
|
|
141
|
+
},
|
|
142
|
+
children: date
|
|
143
|
+
})]
|
|
144
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Spacer, {
|
|
145
|
+
space: 2
|
|
146
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
|
|
147
|
+
variant: {
|
|
148
|
+
decorative: true
|
|
149
|
+
}
|
|
150
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Spacer, {
|
|
151
|
+
space: 3
|
|
152
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
153
|
+
variant: {
|
|
154
|
+
size: 'h3'
|
|
155
|
+
},
|
|
156
|
+
children: title
|
|
157
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Spacer, {
|
|
158
|
+
space: 2
|
|
159
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
160
|
+
children: description
|
|
161
|
+
})]
|
|
162
|
+
}), Boolean(fullBleedContentProps.src || fullBleedContentProps.content) && /*#__PURE__*/(0, _jsxRuntime.jsx)(FullBleedOffsetOuter, {
|
|
163
|
+
borderOffset: borderOffset,
|
|
164
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(FullBleedOffsetInner, {
|
|
165
|
+
borderOffset: borderOffset,
|
|
166
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullBleedContent.default, {
|
|
167
|
+
borderRadius: fullBleedBorderRadius,
|
|
168
|
+
...fullBleedContentProps
|
|
169
|
+
})
|
|
170
|
+
})
|
|
171
|
+
})]
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
StoryCard.displayName = 'StoryCard';
|
|
177
|
+
StoryCard.propTypes = {
|
|
178
|
+
...selectedSystemPropTypes,
|
|
179
|
+
tokens: (0, _componentsBase.getTokensPropType)('StoryCard'),
|
|
180
|
+
/**
|
|
181
|
+
* The URL of the story to be navigated to. Note that `Video` component does not play well when used within
|
|
182
|
+
* a `StoryCard` with `href` prop set (the volume and progress sliders can be clicked but are not draggable).
|
|
183
|
+
* Please use `onPress` prop instead `href` to organize navigation in cases like this.
|
|
184
|
+
*
|
|
185
|
+
* @see https://github.com/telus/allium-design-system/issues/6
|
|
186
|
+
*/
|
|
187
|
+
href: _propTypes.default.string,
|
|
188
|
+
/**
|
|
189
|
+
* Optional function to be called on press e.g. for within-page navigation.
|
|
190
|
+
*/
|
|
191
|
+
onPress: _propTypes.default.func,
|
|
192
|
+
/**
|
|
193
|
+
* Text stating the category of the content.
|
|
194
|
+
*/
|
|
195
|
+
tag: _propTypes.default.string,
|
|
196
|
+
/**
|
|
197
|
+
* Text stating the date a story was published.
|
|
198
|
+
*/
|
|
199
|
+
date: _propTypes.default.string.isRequired,
|
|
200
|
+
/**
|
|
201
|
+
* Text stating the title or headline of the story.
|
|
202
|
+
*/
|
|
203
|
+
title: _propTypes.default.string.isRequired,
|
|
204
|
+
/**
|
|
205
|
+
* Text giving a short description of the story. One paragraph of plain text.
|
|
206
|
+
*/
|
|
207
|
+
description: _propTypes.default.string.isRequired,
|
|
208
|
+
/**
|
|
209
|
+
* Full bleed image to be placed on the card, deprecated in favor of `fullBleedContent`.
|
|
210
|
+
*
|
|
211
|
+
* @deprecated
|
|
212
|
+
*/
|
|
213
|
+
fullBleedImage: _propTypes.default.exact(_FullBleedContent.default.propTypes || {}),
|
|
214
|
+
/**
|
|
215
|
+
* Full bleed image to be placed on the card.
|
|
216
|
+
*/
|
|
217
|
+
fullBleedContent: _propTypes.default.exact(_FullBleedContent.default.propTypes || {})
|
|
218
|
+
};
|
|
219
|
+
var _default = exports.default = (0, _componentsBase.withLinkRouter)(StoryCard);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _StoryCard = _interopRequireDefault(require("./StoryCard"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _StoryCard.default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const Body = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
12
|
+
let {
|
|
13
|
+
children
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("tbody", {
|
|
16
|
+
ref: ref,
|
|
17
|
+
children: children
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
Body.displayName = 'Body';
|
|
21
|
+
Body.propTypes = {
|
|
22
|
+
children: _propTypes.default.node
|
|
23
|
+
};
|
|
24
|
+
var _default = exports.default = Body;
|