@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,283 @@
|
|
|
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 _ExpandCollapse = _interopRequireDefault(require("./ExpandCollapse"));
|
|
12
|
+
var _OrderedListBase = _interopRequireDefault(require("../OrderedList/OrderedListBase"));
|
|
13
|
+
var _utils = require("../utils");
|
|
14
|
+
var _dictionary = _interopRequireDefault(require("./dictionary"));
|
|
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 ContentContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
19
|
+
displayName: "TermsAndConditions__ContentContainer",
|
|
20
|
+
componentId: "components-web__sc-1199epn-0"
|
|
21
|
+
})(_ref => {
|
|
22
|
+
let {
|
|
23
|
+
tokens
|
|
24
|
+
} = _ref;
|
|
25
|
+
return {
|
|
26
|
+
paddingBottom: tokens.contentPaddingBottom,
|
|
27
|
+
paddingLeft: tokens.contentPaddingLeft,
|
|
28
|
+
...(0, _utils.media)().from('md').css({
|
|
29
|
+
paddingBottom: tokens.mdContentPaddingBottom,
|
|
30
|
+
paddingLeft: tokens.mdContentPaddingLeft
|
|
31
|
+
})
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
const Ordered = /*#__PURE__*/(0, _styledComponents.default)(_OrderedListBase.default).withConfig({
|
|
35
|
+
displayName: "TermsAndConditions__Ordered",
|
|
36
|
+
componentId: "components-web__sc-1199epn-1"
|
|
37
|
+
})(_ref2 => {
|
|
38
|
+
let {
|
|
39
|
+
tokens
|
|
40
|
+
} = _ref2;
|
|
41
|
+
return {
|
|
42
|
+
listStylePosition: 'outside',
|
|
43
|
+
padding: tokens.orderedPadding
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
const Unordered = /*#__PURE__*/_styledComponents.default.ul.withConfig({
|
|
47
|
+
displayName: "TermsAndConditions__Unordered",
|
|
48
|
+
componentId: "components-web__sc-1199epn-2"
|
|
49
|
+
})(_ref3 => {
|
|
50
|
+
let {
|
|
51
|
+
tokens
|
|
52
|
+
} = _ref3;
|
|
53
|
+
return {
|
|
54
|
+
listStyleType: 'none',
|
|
55
|
+
margin: 0,
|
|
56
|
+
padding: 0,
|
|
57
|
+
paddingTop: tokens.unorderedPadding
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
const ListItem = /*#__PURE__*/(0, _styledComponents.default)(_OrderedListBase.default.Item).withConfig({
|
|
61
|
+
displayName: "TermsAndConditions__ListItem",
|
|
62
|
+
componentId: "components-web__sc-1199epn-3"
|
|
63
|
+
})(_ref4 => {
|
|
64
|
+
let {
|
|
65
|
+
tokens
|
|
66
|
+
} = _ref4;
|
|
67
|
+
return {
|
|
68
|
+
display: 'list-item',
|
|
69
|
+
'&::marker': {
|
|
70
|
+
fontFamily: `${tokens.listFontName}${tokens.listFontWeight}normal`,
|
|
71
|
+
fontSize: tokens.listFontSize,
|
|
72
|
+
lineHeight: tokens.listLineHeight,
|
|
73
|
+
textAlign: 'end !important'
|
|
74
|
+
},
|
|
75
|
+
color: tokens.listColor,
|
|
76
|
+
fontFamily: `${tokens.listFontName}${tokens.listFontWeight}normal`,
|
|
77
|
+
fontSize: tokens.listFontSize,
|
|
78
|
+
lineHeight: tokens.listLineHeight,
|
|
79
|
+
marginBottom: tokens.listMarginBottom,
|
|
80
|
+
marginLeft: tokens.listMarginLeft,
|
|
81
|
+
wordBreak: 'break-word'
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
const NonIndexedContentTitle = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
85
|
+
displayName: "TermsAndConditions__NonIndexedContentTitle",
|
|
86
|
+
componentId: "components-web__sc-1199epn-4"
|
|
87
|
+
})(_ref5 => {
|
|
88
|
+
let {
|
|
89
|
+
tokens
|
|
90
|
+
} = _ref5;
|
|
91
|
+
return {
|
|
92
|
+
color: tokens.titleColor,
|
|
93
|
+
fontSize: tokens.titleFontSize,
|
|
94
|
+
lineHeight: tokens.titleLineHeight,
|
|
95
|
+
paddingLeft: tokens.titlePaddingLeft
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Use `TermsAndConditions` to display important legal content.
|
|
101
|
+
*
|
|
102
|
+
* ## Usage Criteria
|
|
103
|
+
*
|
|
104
|
+
* - Display before the page footer, except for call-to-action callback cards
|
|
105
|
+
* - Responsive display based on breakpoints
|
|
106
|
+
* - Use `copy` to set language, ‘en’ for English or ‘fr’ for French
|
|
107
|
+
*/
|
|
108
|
+
const TermsAndConditions = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
|
|
109
|
+
let {
|
|
110
|
+
copy = 'en',
|
|
111
|
+
indexedContent = [],
|
|
112
|
+
nonIndexedContent = [],
|
|
113
|
+
tokens = {},
|
|
114
|
+
variant = {},
|
|
115
|
+
dictionary = _dictionary.default,
|
|
116
|
+
...rest
|
|
117
|
+
} = _ref6;
|
|
118
|
+
const getCopy = (0, _componentsBase.useCopy)({
|
|
119
|
+
dictionary,
|
|
120
|
+
copy
|
|
121
|
+
});
|
|
122
|
+
const hasIndexedContent = indexedContent.length > 0;
|
|
123
|
+
const hasNonIndexedContent = nonIndexedContent.length > 0;
|
|
124
|
+
const viewport = (0, _componentsBase.useViewport)();
|
|
125
|
+
const {
|
|
126
|
+
themeOptions
|
|
127
|
+
} = (0, _componentsBase.useTheme)();
|
|
128
|
+
const {
|
|
129
|
+
enableMediaQueryStyleSheet
|
|
130
|
+
} = themeOptions;
|
|
131
|
+
const useTokens = enableMediaQueryStyleSheet ? _componentsBase.useResponsiveThemeTokens : _componentsBase.useThemeTokens;
|
|
132
|
+
const themeTokens = useTokens('TermsAndConditions', tokens, variant, !enableMediaQueryStyleSheet && {
|
|
133
|
+
viewport
|
|
134
|
+
});
|
|
135
|
+
let listItemStyles;
|
|
136
|
+
let listItemMediaIds;
|
|
137
|
+
let nonIndexedContentStyles;
|
|
138
|
+
let nonIndexedContentMediaIds;
|
|
139
|
+
if (enableMediaQueryStyleSheet) {
|
|
140
|
+
const {
|
|
141
|
+
transformedListItemThemeTokens,
|
|
142
|
+
transformedNonIndexedContentThemeTokens
|
|
143
|
+
} = Object.entries(themeTokens).reduce((acc, _ref7) => {
|
|
144
|
+
let [vp, viewportTokens] = _ref7;
|
|
145
|
+
acc.transformedListItemThemeTokens[vp] = {
|
|
146
|
+
marginLeft: viewportTokens.listMarginLeft
|
|
147
|
+
};
|
|
148
|
+
acc.transformedNonIndexedContentThemeTokens[vp] = {
|
|
149
|
+
paddingLeft: viewportTokens.titlePaddingLeft
|
|
150
|
+
};
|
|
151
|
+
return acc;
|
|
152
|
+
}, {
|
|
153
|
+
transformedListItemThemeTokens: {},
|
|
154
|
+
transformedNonIndexedContentThemeTokens: {}
|
|
155
|
+
});
|
|
156
|
+
const listItemMediaQueryStyles = (0, _componentsBase.createMediaQueryStyles)(transformedListItemThemeTokens);
|
|
157
|
+
const nonIndexedContentMediaQueryStyles = (0, _componentsBase.createMediaQueryStyles)(transformedNonIndexedContentThemeTokens);
|
|
158
|
+
const {
|
|
159
|
+
ids,
|
|
160
|
+
styles
|
|
161
|
+
} = _componentsBase.StyleSheet.create({
|
|
162
|
+
listItem: {
|
|
163
|
+
...themeTokens[viewport],
|
|
164
|
+
...listItemMediaQueryStyles
|
|
165
|
+
},
|
|
166
|
+
nonIndexedContent: {
|
|
167
|
+
...themeTokens[viewport],
|
|
168
|
+
...nonIndexedContentMediaQueryStyles
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
listItemStyles = styles.listItem;
|
|
172
|
+
listItemMediaIds = ids.listItem;
|
|
173
|
+
nonIndexedContentStyles = styles.nonIndexedContent;
|
|
174
|
+
nonIndexedContentMediaIds = ids.nonIndexedContent;
|
|
175
|
+
} else {
|
|
176
|
+
listItemStyles = themeTokens;
|
|
177
|
+
nonIndexedContentStyles = themeTokens;
|
|
178
|
+
}
|
|
179
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
180
|
+
...selectProps(rest),
|
|
181
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
|
|
182
|
+
tokens: {
|
|
183
|
+
color: themeTokens.dividerColor
|
|
184
|
+
}
|
|
185
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandCollapse.default, {
|
|
186
|
+
collapseTitle: getCopy('headingView'),
|
|
187
|
+
expandTitle: getCopy('headingHide'),
|
|
188
|
+
collapseLabel: getCopy('collapseLabel'),
|
|
189
|
+
expandLabel: getCopy('expandLabel'),
|
|
190
|
+
ref: ref,
|
|
191
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(ContentContainer, {
|
|
192
|
+
tokens: themeTokens,
|
|
193
|
+
children: [hasIndexedContent && /*#__PURE__*/(0, _jsxRuntime.jsx)(Ordered, {
|
|
194
|
+
tokens: themeTokens,
|
|
195
|
+
children: indexedContent.map((contentItem, idx) =>
|
|
196
|
+
/*#__PURE__*/
|
|
197
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
198
|
+
(0, _jsxRuntime.jsx)(ListItem, {
|
|
199
|
+
tokens: listItemStyles,
|
|
200
|
+
media: listItemMediaIds,
|
|
201
|
+
children: (0, _utils.renderStructuredContent)(contentItem)
|
|
202
|
+
}, idx))
|
|
203
|
+
}), hasNonIndexedContent && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.Box, {
|
|
204
|
+
between: 3,
|
|
205
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(NonIndexedContentTitle, {
|
|
206
|
+
tokens: nonIndexedContentStyles,
|
|
207
|
+
media: nonIndexedContentMediaIds,
|
|
208
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
209
|
+
block: true,
|
|
210
|
+
heading: true,
|
|
211
|
+
tokens: {
|
|
212
|
+
fontName: themeTokens.expandTitleFontName,
|
|
213
|
+
fontWeight: themeTokens.expandTitleFontWeight,
|
|
214
|
+
fontSize: themeTokens.titleFontSize,
|
|
215
|
+
lineHeight: themeTokens.titleLineHeight
|
|
216
|
+
},
|
|
217
|
+
children: getCopy('nonIndexedTitle')
|
|
218
|
+
})
|
|
219
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Unordered, {
|
|
220
|
+
tokens: themeTokens,
|
|
221
|
+
children: nonIndexedContent.map((contentItem, idx) =>
|
|
222
|
+
/*#__PURE__*/
|
|
223
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
224
|
+
(0, _jsxRuntime.jsx)(ListItem, {
|
|
225
|
+
tokens: listItemStyles,
|
|
226
|
+
media: listItemMediaIds,
|
|
227
|
+
children: (0, _utils.renderStructuredContent)(contentItem)
|
|
228
|
+
}, idx))
|
|
229
|
+
})]
|
|
230
|
+
})]
|
|
231
|
+
})
|
|
232
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
|
|
233
|
+
tokens: {
|
|
234
|
+
color: themeTokens.dividerColor
|
|
235
|
+
}
|
|
236
|
+
})]
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
TermsAndConditions.displayName = 'TermsAndConditions';
|
|
240
|
+
|
|
241
|
+
// If a language dictionary entry is provided, it must contain every key
|
|
242
|
+
const dictionaryContentShape = _propTypes.default.shape({
|
|
243
|
+
headingHide: _propTypes.default.string.isRequired,
|
|
244
|
+
headingView: _propTypes.default.string.isRequired,
|
|
245
|
+
nonIndexedTitle: _propTypes.default.string.isRequired
|
|
246
|
+
});
|
|
247
|
+
TermsAndConditions.propTypes = {
|
|
248
|
+
...selectedSystemPropTypes,
|
|
249
|
+
/**
|
|
250
|
+
* Use the `copy` prop to either select provided English or French copy by passing 'en' or 'fr' respectively.
|
|
251
|
+
*
|
|
252
|
+
* To provide your own, pass a JSON object with the keys `headingView`, `headingHide`, and `nonIndexedTitle`.
|
|
253
|
+
*/
|
|
254
|
+
copy: _propTypes.default.oneOfType([_propTypes.default.oneOf(['en', 'fr']), _propTypes.default.shape({
|
|
255
|
+
headingView: _propTypes.default.string,
|
|
256
|
+
headingHide: _propTypes.default.string,
|
|
257
|
+
nonIndexedTitle: _propTypes.default.string
|
|
258
|
+
})]),
|
|
259
|
+
/**
|
|
260
|
+
* Sets the tokens for TermsAndConditions element.
|
|
261
|
+
*/
|
|
262
|
+
tokens: (0, _componentsBase.getTokensPropType)('TermsAndConditions'),
|
|
263
|
+
/**
|
|
264
|
+
* An array of nodes, strings, or a combination to be displayed in an ordered list.
|
|
265
|
+
*
|
|
266
|
+
* Each item in the array must have a corresponding superscript in the page.
|
|
267
|
+
*/
|
|
268
|
+
indexedContent: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.string])),
|
|
269
|
+
/**
|
|
270
|
+
* An array of nodes, strings, or a combination to be displayed in an unordered list.
|
|
271
|
+
*
|
|
272
|
+
* nonIndexedContent do not have a corresponding superscript and instead apply to the page as a whole.
|
|
273
|
+
*/
|
|
274
|
+
nonIndexedContent: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.string])),
|
|
275
|
+
/**
|
|
276
|
+
* Custom dictionary containing the labels to use for `TermsAndConditions`
|
|
277
|
+
*/
|
|
278
|
+
dictionary: _propTypes.default.shape({
|
|
279
|
+
en: dictionaryContentShape,
|
|
280
|
+
fr: dictionaryContentShape
|
|
281
|
+
})
|
|
282
|
+
};
|
|
283
|
+
var _default = exports.default = TermsAndConditions;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = exports.default = {
|
|
8
|
+
en: {
|
|
9
|
+
headingHide: 'Hide terms and conditions',
|
|
10
|
+
headingView: 'View terms and conditions',
|
|
11
|
+
nonIndexedTitle: 'The following applies to all terms and conditions above',
|
|
12
|
+
expandLabel: 'Expand',
|
|
13
|
+
collapseLabel: 'Collapse'
|
|
14
|
+
},
|
|
15
|
+
fr: {
|
|
16
|
+
headingHide: 'Masquer les modalités et conditions',
|
|
17
|
+
headingView: 'Voir les modalités et conditions',
|
|
18
|
+
nonIndexedTitle: 'Ce qui suit s’applique aux modalités et conditions ci-dessus',
|
|
19
|
+
expandLabel: 'Détailler',
|
|
20
|
+
collapseLabel: 'Réduire'
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _TermsAndConditions.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _TermsAndConditions = _interopRequireDefault(require("./TermsAndConditions"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -0,0 +1,240 @@
|
|
|
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 _Image = _interopRequireDefault(require("../Image"));
|
|
12
|
+
var _utils = require("../utils");
|
|
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 TestimonialContainer = /*#__PURE__*/_styledComponents.default.figure.withConfig({
|
|
17
|
+
displayName: "Testimonial__TestimonialContainer",
|
|
18
|
+
componentId: "components-web__sc-1az53gr-0"
|
|
19
|
+
})(_ref => {
|
|
20
|
+
let {
|
|
21
|
+
testimonialContainerGap
|
|
22
|
+
} = _ref;
|
|
23
|
+
return {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'column',
|
|
26
|
+
gap: testimonialContainerGap,
|
|
27
|
+
margin: 0
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
const QuoteContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
31
|
+
displayName: "Testimonial__QuoteContainer",
|
|
32
|
+
componentId: "components-web__sc-1az53gr-1"
|
|
33
|
+
})(_ref2 => {
|
|
34
|
+
let {
|
|
35
|
+
quoteContainerGap
|
|
36
|
+
} = _ref2;
|
|
37
|
+
return {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
gap: quoteContainerGap
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
const Divider = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
44
|
+
displayName: "Testimonial__Divider",
|
|
45
|
+
componentId: "components-web__sc-1az53gr-2"
|
|
46
|
+
})(_ref3 => {
|
|
47
|
+
let {
|
|
48
|
+
dividerBorder,
|
|
49
|
+
dividerBackgroundColor
|
|
50
|
+
} = _ref3;
|
|
51
|
+
return {
|
|
52
|
+
height: dividerBorder,
|
|
53
|
+
background: dividerBackgroundColor,
|
|
54
|
+
width: '100%'
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
const BlockQuote = /*#__PURE__*/_styledComponents.default.blockquote.withConfig({
|
|
58
|
+
displayName: "Testimonial__BlockQuote",
|
|
59
|
+
componentId: "components-web__sc-1az53gr-3"
|
|
60
|
+
})({
|
|
61
|
+
margin: 0
|
|
62
|
+
});
|
|
63
|
+
const AuthorInfoContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
64
|
+
displayName: "Testimonial__AuthorInfoContainer",
|
|
65
|
+
componentId: "components-web__sc-1az53gr-4"
|
|
66
|
+
})({
|
|
67
|
+
display: 'flex',
|
|
68
|
+
flexDirection: 'column'
|
|
69
|
+
});
|
|
70
|
+
const Figcaption = /*#__PURE__*/_styledComponents.default.figcaption.withConfig({
|
|
71
|
+
displayName: "Testimonial__Figcaption",
|
|
72
|
+
componentId: "components-web__sc-1az53gr-5"
|
|
73
|
+
})(_ref4 => {
|
|
74
|
+
let {
|
|
75
|
+
figcaptionGap
|
|
76
|
+
} = _ref4;
|
|
77
|
+
return {
|
|
78
|
+
display: 'flex',
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
gap: figcaptionGap
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
const Testimonial = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
84
|
+
let {
|
|
85
|
+
showDivider,
|
|
86
|
+
testimonial,
|
|
87
|
+
title,
|
|
88
|
+
imageSrc,
|
|
89
|
+
image = imageSrc,
|
|
90
|
+
additionalInfo,
|
|
91
|
+
testimonialStyle = 'large',
|
|
92
|
+
tokens,
|
|
93
|
+
copy = 'en',
|
|
94
|
+
variant = {},
|
|
95
|
+
...rest
|
|
96
|
+
} = _ref5;
|
|
97
|
+
const viewport = (0, _componentsBase.useViewport)();
|
|
98
|
+
const {
|
|
99
|
+
testimonialContainerGap,
|
|
100
|
+
quoteContainerGap,
|
|
101
|
+
dividerBorder,
|
|
102
|
+
dividerBackgroundColor,
|
|
103
|
+
figcaptionGap,
|
|
104
|
+
textColor,
|
|
105
|
+
icon,
|
|
106
|
+
iconFr,
|
|
107
|
+
iconColor,
|
|
108
|
+
imageSize,
|
|
109
|
+
testimonialFontSizeLarge,
|
|
110
|
+
testimonialLineHeightLarge,
|
|
111
|
+
testimonialFontWeightLarge,
|
|
112
|
+
testimonialFontSizeHeading,
|
|
113
|
+
testimonialLineHeightHeading,
|
|
114
|
+
testimonialFontNameHeading,
|
|
115
|
+
testimonialFontWeightHeading,
|
|
116
|
+
authorFontSize,
|
|
117
|
+
authorLineHeight,
|
|
118
|
+
authorFontName,
|
|
119
|
+
authorFontWeight,
|
|
120
|
+
additionalFontSize,
|
|
121
|
+
additionalLineHeight,
|
|
122
|
+
additionalFontName,
|
|
123
|
+
additionalFontWeight
|
|
124
|
+
} = (0, _componentsBase.useThemeTokens)('Testimonial', tokens, variant, {
|
|
125
|
+
viewport
|
|
126
|
+
});
|
|
127
|
+
const getQuoteTestimonial = open => {
|
|
128
|
+
let quote = '';
|
|
129
|
+
if (copy === 'en') quote = open ? '\u201C' : '\u201D';else quote = open ? '\u00AB ' : ' \u00BB';
|
|
130
|
+
return quote;
|
|
131
|
+
};
|
|
132
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TestimonialContainer, {
|
|
133
|
+
testimonialContainerGap: testimonialContainerGap,
|
|
134
|
+
ref: ref,
|
|
135
|
+
...selectProps(rest),
|
|
136
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(QuoteContainer, {
|
|
137
|
+
quoteContainerGap: quoteContainerGap,
|
|
138
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Icon, {
|
|
139
|
+
tokens: {
|
|
140
|
+
color: iconColor
|
|
141
|
+
},
|
|
142
|
+
variant: {
|
|
143
|
+
size: 'micro'
|
|
144
|
+
},
|
|
145
|
+
icon: copy === 'en' ? icon : iconFr
|
|
146
|
+
}), showDivider && /*#__PURE__*/(0, _jsxRuntime.jsx)(Divider, {
|
|
147
|
+
dividerBackgroundColor: dividerBackgroundColor,
|
|
148
|
+
dividerBorder: dividerBorder,
|
|
149
|
+
role: "separator"
|
|
150
|
+
})]
|
|
151
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(BlockQuote, {
|
|
152
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
153
|
+
variant: {
|
|
154
|
+
size: testimonialStyle === 'large' ? 'large' : 'h3'
|
|
155
|
+
},
|
|
156
|
+
tokens: {
|
|
157
|
+
color: textColor,
|
|
158
|
+
fontSize: testimonialStyle === 'heading' ? testimonialFontSizeHeading : testimonialFontSizeLarge,
|
|
159
|
+
lineHeight: testimonialStyle === 'heading' ? testimonialLineHeightHeading : testimonialLineHeightLarge,
|
|
160
|
+
fontName: testimonialFontNameHeading,
|
|
161
|
+
fontWeight: testimonialStyle === 'heading' ? testimonialFontWeightHeading : testimonialFontWeightLarge
|
|
162
|
+
},
|
|
163
|
+
children: `${getQuoteTestimonial(true)}${testimonial}${getQuoteTestimonial()}`
|
|
164
|
+
})
|
|
165
|
+
}), (image || title || additionalInfo) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(Figcaption, {
|
|
166
|
+
figcaptionGap: figcaptionGap,
|
|
167
|
+
children: [image && (typeof image === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
|
|
168
|
+
rounded: "circle",
|
|
169
|
+
src: image,
|
|
170
|
+
alt: title,
|
|
171
|
+
width: imageSize,
|
|
172
|
+
height: imageSize
|
|
173
|
+
}) : image), (title || additionalInfo) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(AuthorInfoContainer, {
|
|
174
|
+
children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
175
|
+
variant: {
|
|
176
|
+
size: 'small'
|
|
177
|
+
},
|
|
178
|
+
tokens: {
|
|
179
|
+
color: textColor,
|
|
180
|
+
fontSize: authorFontSize,
|
|
181
|
+
lineHeight: authorLineHeight,
|
|
182
|
+
fontName: authorFontName,
|
|
183
|
+
fontWeight: authorFontWeight
|
|
184
|
+
},
|
|
185
|
+
children: title
|
|
186
|
+
}), additionalInfo && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
187
|
+
variant: {
|
|
188
|
+
size: 'small'
|
|
189
|
+
},
|
|
190
|
+
tokens: {
|
|
191
|
+
color: textColor,
|
|
192
|
+
fontSize: additionalFontSize,
|
|
193
|
+
lineHeight: additionalLineHeight,
|
|
194
|
+
fontName: additionalFontName,
|
|
195
|
+
fontWeight: additionalFontWeight
|
|
196
|
+
},
|
|
197
|
+
children: additionalInfo
|
|
198
|
+
})]
|
|
199
|
+
})]
|
|
200
|
+
}), showDivider && /*#__PURE__*/(0, _jsxRuntime.jsx)(Divider, {
|
|
201
|
+
dividerBackgroundColor: dividerBackgroundColor,
|
|
202
|
+
dividerBorder: dividerBorder,
|
|
203
|
+
role: "separator"
|
|
204
|
+
})]
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
Testimonial.displayName = 'Testimonial';
|
|
208
|
+
Testimonial.propTypes = {
|
|
209
|
+
...selectedSystemPropTypes,
|
|
210
|
+
tokens: (0, _componentsBase.getTokensPropType)('Testimonial'),
|
|
211
|
+
/**
|
|
212
|
+
* Testimonial content
|
|
213
|
+
*/
|
|
214
|
+
testimonial: _propTypes.default.string.isRequired,
|
|
215
|
+
/**
|
|
216
|
+
* Testimonial author or source
|
|
217
|
+
*/
|
|
218
|
+
title: _propTypes.default.string,
|
|
219
|
+
/**
|
|
220
|
+
* Additional information on the author or source
|
|
221
|
+
*/
|
|
222
|
+
additionalInfo: _propTypes.default.string,
|
|
223
|
+
/**
|
|
224
|
+
* Testimonial style
|
|
225
|
+
*/
|
|
226
|
+
testimonialStyle: _propTypes.default.oneOf(['large', 'heading']),
|
|
227
|
+
/**
|
|
228
|
+
* Whether to show or not dividers at the top and the bottom of the testimonial
|
|
229
|
+
showDivider: PropTypes.bool,
|
|
230
|
+
/**
|
|
231
|
+
* The src attribute for the Image component or custom JSX content to render instead
|
|
232
|
+
*/
|
|
233
|
+
image: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
|
|
234
|
+
/**
|
|
235
|
+
* The src attribute for the `Image` component to be displayed on the testimonial
|
|
236
|
+
* @deprecated please use the `image` prop instead
|
|
237
|
+
*/
|
|
238
|
+
imageSrc: _propTypes.default.string
|
|
239
|
+
};
|
|
240
|
+
var _default = exports.default = Testimonial;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Testimonial = _interopRequireDefault(require("./Testimonial"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _Testimonial.default;
|