@telus-uds/components-web 3.4.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 +22 -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/cjs/NavigationBar/collapseItems.js +43 -0
- 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 -21
- 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 +5 -5
- 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 +18 -12
- package/lib/esm/DatePicker/reactDatesCss.js +3 -0
- package/lib/{Disclaimer → esm/Disclaimer}/Disclaimer.js +6 -5
- package/lib/{Footnote → esm/Footnote}/Footnote.js +39 -15
- package/lib/{Footnote → esm/Footnote}/FootnoteLink.js +6 -5
- package/lib/{NavigationBar → esm/NavigationBar}/NavigationBar.js +6 -5
- package/lib/{NavigationBar → esm/NavigationBar}/NavigationItem.js +6 -5
- 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 +6 -5
- 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/{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 +16 -17
- package/lib/{TermsAndConditions → esm/TermsAndConditions}/ExpandCollapse.js +13 -7
- 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 +13 -64
- package/lib/{Video → esm/Video}/ControlBar/ControlBar.js +18 -8
- package/lib/{Video → esm/Video}/ControlBar/Controls/VideoButton/VideoButton.js +6 -5
- 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 +26 -10
- package/lib/{VideoPicker → esm/VideoPicker}/VideoPicker.js +20 -44
- package/lib/{VideoPicker → esm/VideoPicker}/VideoPickerThumbnail.js +18 -52
- package/lib/{WaffleGrid → esm/WaffleGrid}/WaffleGrid.js +14 -7
- package/lib/{WebVideo → esm/WebVideo}/WebVideo.js +14 -9
- package/lib/{index.js → esm/index.js} +1 -1
- 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}/ssr.js +1 -4
- package/package.json +17 -16
- package/src/Badge/Badge.jsx +2 -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 +1 -3
- 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/index.js +1 -1
- 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 +1 -2
- package/lib/DatePicker/reactDatesCss.js +0 -830
- package/lib/QuantitySelector/styles.js +0 -18
- package/lib/Table/Row.js +0 -19
- package/lib/utils/theming/styled-components.js +0 -26
- 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}/NavigationSubMenu.js +0 -0
- /package/lib/{NavigationBar → esm/NavigationBar}/collapseItems.js +0 -0
- /package/lib/{NavigationBar → esm/NavigationBar}/index.js +0 -0
- /package/lib/{NavigationBar → esm/NavigationBar}/resolveItemSelection.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}/SkeletonImage.js +0 -0
- /package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonProvider.js +0 -0
- /package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonTypography.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/{baseExports.js → esm/baseExports.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}/scrollToAnchor.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}/useOverlaidPosition.js +0 -0
- /package/lib/{utils → esm/utils}/useTypographyTheme.js +0 -0
package/.eslintrc.cjs
CHANGED
|
@@ -18,7 +18,13 @@ base.settings = {
|
|
|
18
18
|
},
|
|
19
19
|
exports: true,
|
|
20
20
|
alias: {
|
|
21
|
-
map: [
|
|
21
|
+
map: [
|
|
22
|
+
[
|
|
23
|
+
'@telus-uds/components-base/server',
|
|
24
|
+
'../components-base/lib/cjs/server.js',
|
|
25
|
+
'../components-base/lib/esm/server.js'
|
|
26
|
+
]
|
|
27
|
+
]
|
|
22
28
|
}
|
|
23
29
|
}
|
|
24
30
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 31 Jan 2025 20:49:19 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 4.0.0
|
|
8
|
+
|
|
9
|
+
Fri, 31 Jan 2025 20:49:19 GMT
|
|
10
|
+
|
|
11
|
+
### Major changes
|
|
12
|
+
|
|
13
|
+
- Add CommonJS builds along with ESM (shahzaibkhalidmalik@outlook.com)
|
|
14
|
+
- Bump @telus-uds/components-base to v3.0.0
|
|
15
|
+
- Bump @telus-uds/system-constants to v3.0.0
|
|
16
|
+
- Bump @telus-uds/system-theme-tokens to v4.0.0
|
|
17
|
+
|
|
18
|
+
### Minor changes
|
|
19
|
+
|
|
20
|
+
- `Countdown`: units prop added (guillermo.peitzner@telus.com)
|
|
21
|
+
- `Table`: add row background color on hover (guillermo.peitzner@telus.com)
|
|
22
|
+
|
|
23
|
+
### Patches
|
|
24
|
+
|
|
25
|
+
- `TextArea`: minLines token issue when value size changes fixed (35577399+JoshHC@users.noreply.github.com)
|
|
26
|
+
|
|
7
27
|
## 3.4.0
|
|
8
28
|
|
|
9
|
-
Wed, 22 Jan 2025 21:
|
|
29
|
+
Wed, 22 Jan 2025 21:08:36 GMT
|
|
10
30
|
|
|
11
31
|
### Minor changes
|
|
12
32
|
|
package/jest.config.cjs
CHANGED
|
@@ -13,7 +13,7 @@ module.exports = {
|
|
|
13
13
|
// mock icon imports as in https://jestjs.io/docs/webpack#mocking-css-modules
|
|
14
14
|
'\\.icon.svg': '<rootDir>/__mocks__/iconMock.jsx',
|
|
15
15
|
'\\.css': '<rootDir>/__mocks__/styleMock.js',
|
|
16
|
-
'^@telus-uds/components-base/server$': '<rootDir>/../components-base/lib/server.js'
|
|
16
|
+
'^@telus-uds/components-base/server$': '<rootDir>/../components-base/lib/cjs/server.js'
|
|
17
17
|
},
|
|
18
18
|
testMatch: [`<rootDir>/__tests__/**/*.test.js?(x)`],
|
|
19
19
|
transformIgnorePatterns: [
|
|
@@ -0,0 +1,128 @@
|
|
|
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 _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
15
|
+
const BadgeContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
16
|
+
displayName: "Badge__BadgeContainer",
|
|
17
|
+
componentId: "components-web__sc-tsiuo2-0"
|
|
18
|
+
})(["background:", ";border:", ";display:inline-flex;justify-content:center;align-items:center;height:fit-content;padding:", ";border-radius:", ";width:fit-content;", ""], _ref => {
|
|
19
|
+
let {
|
|
20
|
+
background
|
|
21
|
+
} = _ref;
|
|
22
|
+
return background;
|
|
23
|
+
}, _ref2 => {
|
|
24
|
+
let {
|
|
25
|
+
border
|
|
26
|
+
} = _ref2;
|
|
27
|
+
return border;
|
|
28
|
+
}, _ref3 => {
|
|
29
|
+
let {
|
|
30
|
+
padding
|
|
31
|
+
} = _ref3;
|
|
32
|
+
return padding;
|
|
33
|
+
}, _ref4 => {
|
|
34
|
+
let {
|
|
35
|
+
radius
|
|
36
|
+
} = _ref4;
|
|
37
|
+
return radius;
|
|
38
|
+
}, _ref5 => {
|
|
39
|
+
let {
|
|
40
|
+
isOutlineOffer,
|
|
41
|
+
isAlternative,
|
|
42
|
+
gradient
|
|
43
|
+
} = _ref5;
|
|
44
|
+
return (isOutlineOffer || isAlternative) && `
|
|
45
|
+
> div {
|
|
46
|
+
background: ${gradient};
|
|
47
|
+
-webkit-background-clip: text;
|
|
48
|
+
${gradient && '-webkit-text-fill-color: transparent;'}
|
|
49
|
+
}`;
|
|
50
|
+
});
|
|
51
|
+
const fontSizeMapping = {
|
|
52
|
+
12: 'micro',
|
|
53
|
+
14: 'small',
|
|
54
|
+
16: 'h6'
|
|
55
|
+
};
|
|
56
|
+
const Badge = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
|
|
57
|
+
let {
|
|
58
|
+
children,
|
|
59
|
+
tokens,
|
|
60
|
+
variant = {},
|
|
61
|
+
...rest
|
|
62
|
+
} = _ref6;
|
|
63
|
+
const {
|
|
64
|
+
backgroundColor,
|
|
65
|
+
gradient,
|
|
66
|
+
borderColor,
|
|
67
|
+
borderRadius,
|
|
68
|
+
borderWidth,
|
|
69
|
+
color,
|
|
70
|
+
paddingLeft,
|
|
71
|
+
paddingRight,
|
|
72
|
+
paddingTop,
|
|
73
|
+
paddingBottom,
|
|
74
|
+
fontName,
|
|
75
|
+
fontWeight,
|
|
76
|
+
fontSize
|
|
77
|
+
} = (0, _componentsBase.useThemeTokens)('Badge', tokens, variant);
|
|
78
|
+
const semanticGradient = gradient && (0, _utils.transformGradient)(gradient);
|
|
79
|
+
const {
|
|
80
|
+
outline,
|
|
81
|
+
purpose,
|
|
82
|
+
alternative
|
|
83
|
+
} = variant;
|
|
84
|
+
let background = backgroundColor;
|
|
85
|
+
const isOutlineOffer = purpose === 'offer' && outline;
|
|
86
|
+
if ((isOutlineOffer || alternative) && gradient) {
|
|
87
|
+
background = `linear-gradient(#fff 0 0) padding-box, ${semanticGradient} border-box`;
|
|
88
|
+
} else if (purpose === 'offer' && gradient) {
|
|
89
|
+
background = semanticGradient;
|
|
90
|
+
}
|
|
91
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeContainer, {
|
|
92
|
+
isOutlineOffer: isOutlineOffer,
|
|
93
|
+
isAlternative: alternative,
|
|
94
|
+
padding: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
|
|
95
|
+
radius: `${borderRadius}px`,
|
|
96
|
+
background: background,
|
|
97
|
+
fontName: fontName,
|
|
98
|
+
fontWeight: fontWeight,
|
|
99
|
+
gradient: semanticGradient,
|
|
100
|
+
border: `${borderWidth}px solid ${borderColor}`,
|
|
101
|
+
ref: ref,
|
|
102
|
+
...selectProps(rest),
|
|
103
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
104
|
+
tokens: {
|
|
105
|
+
fontName,
|
|
106
|
+
fontWeight,
|
|
107
|
+
color
|
|
108
|
+
},
|
|
109
|
+
variant: {
|
|
110
|
+
size: fontSizeMapping[fontSize]
|
|
111
|
+
},
|
|
112
|
+
children: children
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
Badge.displayName = 'Badge';
|
|
117
|
+
Badge.propTypes = {
|
|
118
|
+
...selectedSystemPropTypes,
|
|
119
|
+
children: _propTypes.default.node,
|
|
120
|
+
tokens: (0, _componentsBase.getTokensPropType)('Badge'),
|
|
121
|
+
variant: _propTypes.default.exact({
|
|
122
|
+
outline: _propTypes.default.bool,
|
|
123
|
+
purpose: _propTypes.default.oneOf(['offer', 'editorial']),
|
|
124
|
+
alternative: _propTypes.default.bool,
|
|
125
|
+
inverse: _propTypes.default.bool
|
|
126
|
+
})
|
|
127
|
+
};
|
|
128
|
+
var _default = exports.default = Badge;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Badge = _interopRequireDefault(require("./Badge"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _Badge.default;
|
|
@@ -0,0 +1,256 @@
|
|
|
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 _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
15
|
+
const BlockQuoteContainer = /*#__PURE__*/_styledComponents.default.blockquote.withConfig({
|
|
16
|
+
displayName: "BlockQuote__BlockQuoteContainer",
|
|
17
|
+
componentId: "components-web__sc-vals3u-0"
|
|
18
|
+
})(["margin:0;position:relative;padding-left:", ";padding-right:", ";padding-bottom:", ";padding-top:", ";&::before{content:'';left:0;top:0;position:absolute;height:100%;width:", ";background:", ";}"], _ref => {
|
|
19
|
+
let {
|
|
20
|
+
paddingLeft
|
|
21
|
+
} = _ref;
|
|
22
|
+
return `${paddingLeft}px`;
|
|
23
|
+
}, _ref2 => {
|
|
24
|
+
let {
|
|
25
|
+
paddingRight
|
|
26
|
+
} = _ref2;
|
|
27
|
+
return `${paddingRight}px`;
|
|
28
|
+
}, _ref3 => {
|
|
29
|
+
let {
|
|
30
|
+
paddingBottom
|
|
31
|
+
} = _ref3;
|
|
32
|
+
return `${paddingBottom}px`;
|
|
33
|
+
}, _ref4 => {
|
|
34
|
+
let {
|
|
35
|
+
paddingTop
|
|
36
|
+
} = _ref4;
|
|
37
|
+
return `${paddingTop}px`;
|
|
38
|
+
}, _ref5 => {
|
|
39
|
+
let {
|
|
40
|
+
width
|
|
41
|
+
} = _ref5;
|
|
42
|
+
return `${width}px`;
|
|
43
|
+
}, _ref6 => {
|
|
44
|
+
let {
|
|
45
|
+
backgroundGradient
|
|
46
|
+
} = _ref6;
|
|
47
|
+
return backgroundGradient && (0, _utils.transformGradient)(backgroundGradient);
|
|
48
|
+
});
|
|
49
|
+
const QuoteContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
50
|
+
displayName: "BlockQuote__QuoteContainer",
|
|
51
|
+
componentId: "components-web__sc-vals3u-1"
|
|
52
|
+
})(["margin-bottom:", ";"], _ref7 => {
|
|
53
|
+
let {
|
|
54
|
+
marginBottom
|
|
55
|
+
} = _ref7;
|
|
56
|
+
return `${marginBottom}px`;
|
|
57
|
+
});
|
|
58
|
+
const selectTitleHeadingTokens = themeTokens => ({
|
|
59
|
+
fontSize: themeTokens.titleHeadingFontSize,
|
|
60
|
+
fontName: themeTokens.titleHeadingFontName,
|
|
61
|
+
fontWeight: themeTokens.titleHeadingFontWeight,
|
|
62
|
+
lineHeight: themeTokens.titleHeadingLineHeight
|
|
63
|
+
});
|
|
64
|
+
const BlockQuote = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
65
|
+
let {
|
|
66
|
+
children,
|
|
67
|
+
link,
|
|
68
|
+
additionalInfo,
|
|
69
|
+
linkHref,
|
|
70
|
+
textStyle = 'large',
|
|
71
|
+
LinkRouter,
|
|
72
|
+
linkRouterProps,
|
|
73
|
+
tokens,
|
|
74
|
+
variant,
|
|
75
|
+
...rest
|
|
76
|
+
} = _ref8;
|
|
77
|
+
const viewport = (0, _componentsBase.useViewport)();
|
|
78
|
+
const {
|
|
79
|
+
themeOptions: {
|
|
80
|
+
enableMediaQueryStyleSheet
|
|
81
|
+
}
|
|
82
|
+
} = (0, _componentsBase.useTheme)();
|
|
83
|
+
const useTokens = enableMediaQueryStyleSheet ? _componentsBase.useResponsiveThemeTokens : _componentsBase.useThemeTokens;
|
|
84
|
+
const themeTokens = useTokens('BlockQuote', tokens, variant, !enableMediaQueryStyleSheet && {
|
|
85
|
+
viewport
|
|
86
|
+
});
|
|
87
|
+
const {
|
|
88
|
+
color,
|
|
89
|
+
paddingTop,
|
|
90
|
+
paddingBottom,
|
|
91
|
+
paddingLeft,
|
|
92
|
+
paddingRight,
|
|
93
|
+
marginBottom,
|
|
94
|
+
width,
|
|
95
|
+
backgroundGradient,
|
|
96
|
+
titleHeadingFontSize,
|
|
97
|
+
titleHeadingFontName,
|
|
98
|
+
titleHeadingFontWeight,
|
|
99
|
+
titleHeadingLineHeight,
|
|
100
|
+
titleFontSize,
|
|
101
|
+
titleFontName,
|
|
102
|
+
titleFontWeight,
|
|
103
|
+
titleLineHeight,
|
|
104
|
+
linkFontSize,
|
|
105
|
+
linkFontName,
|
|
106
|
+
linkFontWeight,
|
|
107
|
+
linkLineHeight
|
|
108
|
+
} = themeTokens;
|
|
109
|
+
let titleHeadingStyles;
|
|
110
|
+
let titleHeadingMediaIds;
|
|
111
|
+
if (enableMediaQueryStyleSheet) {
|
|
112
|
+
const {
|
|
113
|
+
transformedTitleHeadingThemeTokens
|
|
114
|
+
} = Object.entries(themeTokens).reduce((acc, _ref9) => {
|
|
115
|
+
let [vp, viewportTokens] = _ref9;
|
|
116
|
+
acc.transformedTitleHeadingThemeTokens[vp] = {
|
|
117
|
+
fontSize: viewportTokens.titleHeadingFontSize,
|
|
118
|
+
fontName: viewportTokens.titleHeadingFontName,
|
|
119
|
+
fontWeight: viewportTokens.titleHeadingFontWeight,
|
|
120
|
+
lineHeight: viewportTokens.titleHeadingLineHeight
|
|
121
|
+
};
|
|
122
|
+
return acc;
|
|
123
|
+
}, {
|
|
124
|
+
transformedTitleHeadingThemeTokens: {}
|
|
125
|
+
});
|
|
126
|
+
const titleHeadingMediaQueryStyles = (0, _componentsBase.createMediaQueryStyles)(transformedTitleHeadingThemeTokens);
|
|
127
|
+
const {
|
|
128
|
+
ids,
|
|
129
|
+
styles
|
|
130
|
+
} = _componentsBase.StyleSheet.create({
|
|
131
|
+
titleHeading: {
|
|
132
|
+
...selectTitleHeadingTokens(themeTokens[viewport]),
|
|
133
|
+
...titleHeadingMediaQueryStyles
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
titleHeadingStyles = styles.titleHeading;
|
|
137
|
+
titleHeadingMediaIds = ids.titleHeading;
|
|
138
|
+
} else {
|
|
139
|
+
titleHeadingStyles = {
|
|
140
|
+
fontSize: titleHeadingFontSize,
|
|
141
|
+
fontName: titleHeadingFontName,
|
|
142
|
+
fontWeight: titleHeadingFontWeight,
|
|
143
|
+
lineHeight: titleHeadingLineHeight
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
const mappedTextSize = textStyle === 'heading' ? 'h3' : textStyle;
|
|
147
|
+
const titleTokens = textStyle === 'heading' ? titleHeadingStyles : {
|
|
148
|
+
fontSize: titleFontSize,
|
|
149
|
+
fontName: titleFontName,
|
|
150
|
+
fontWeight: titleFontWeight,
|
|
151
|
+
lineHeight: titleLineHeight
|
|
152
|
+
};
|
|
153
|
+
const renderLink = () => {
|
|
154
|
+
if (linkHref) {
|
|
155
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Link, {
|
|
156
|
+
href: linkHref,
|
|
157
|
+
tokens: {
|
|
158
|
+
blockFontSize: linkFontSize,
|
|
159
|
+
blockFontName: linkFontName,
|
|
160
|
+
blockFontWeight: linkFontWeight,
|
|
161
|
+
blockLineHeight: linkLineHeight,
|
|
162
|
+
color
|
|
163
|
+
},
|
|
164
|
+
variant: {
|
|
165
|
+
alternative: true
|
|
166
|
+
},
|
|
167
|
+
LinkRouter: LinkRouter,
|
|
168
|
+
linkRouterProps: linkRouterProps,
|
|
169
|
+
children: link
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
173
|
+
tokens: {
|
|
174
|
+
color,
|
|
175
|
+
fontName: linkFontName,
|
|
176
|
+
fontSize: linkFontSize,
|
|
177
|
+
fontWeight: linkFontWeight,
|
|
178
|
+
lineHeight: linkLineHeight
|
|
179
|
+
},
|
|
180
|
+
children: link
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
const renderQuote = () => {
|
|
184
|
+
const quote = /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
185
|
+
tokens: {
|
|
186
|
+
color,
|
|
187
|
+
...titleTokens
|
|
188
|
+
},
|
|
189
|
+
media: titleHeadingMediaIds,
|
|
190
|
+
variant: {
|
|
191
|
+
size: mappedTextSize
|
|
192
|
+
},
|
|
193
|
+
children: children
|
|
194
|
+
});
|
|
195
|
+
if (additionalInfo || link) {
|
|
196
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(QuoteContainer, {
|
|
197
|
+
marginBottom: marginBottom,
|
|
198
|
+
children: quote
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
return quote;
|
|
202
|
+
};
|
|
203
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(BlockQuoteContainer, {
|
|
204
|
+
...selectProps(rest),
|
|
205
|
+
paddingTop: paddingTop,
|
|
206
|
+
paddingBottom: paddingBottom,
|
|
207
|
+
paddingLeft: paddingLeft,
|
|
208
|
+
paddingRight: paddingRight,
|
|
209
|
+
width: width,
|
|
210
|
+
backgroundGradient: backgroundGradient,
|
|
211
|
+
ref: ref,
|
|
212
|
+
children: [renderQuote(), (additionalInfo || link) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
|
|
213
|
+
space: 0,
|
|
214
|
+
children: [link && renderLink(), additionalInfo && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
215
|
+
tokens: {
|
|
216
|
+
color
|
|
217
|
+
},
|
|
218
|
+
variant: {
|
|
219
|
+
size: 'small'
|
|
220
|
+
},
|
|
221
|
+
children: additionalInfo
|
|
222
|
+
})]
|
|
223
|
+
})]
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
BlockQuote.displayName = 'BlockQuote';
|
|
227
|
+
BlockQuote.propTypes = {
|
|
228
|
+
...selectedSystemPropTypes,
|
|
229
|
+
..._componentsBase.withLinkRouter.propTypes,
|
|
230
|
+
tokens: (0, _componentsBase.getTokensPropType)('BlockQuote'),
|
|
231
|
+
variant: _propTypes.default.exact({
|
|
232
|
+
alternative: _propTypes.default.bool,
|
|
233
|
+
size: _propTypes.default.string
|
|
234
|
+
}),
|
|
235
|
+
/**
|
|
236
|
+
* Children nodes that can be added
|
|
237
|
+
*/
|
|
238
|
+
children: _propTypes.default.node.isRequired,
|
|
239
|
+
/**
|
|
240
|
+
* External source's identifier (e.g. author's name)
|
|
241
|
+
*/
|
|
242
|
+
link: _propTypes.default.string,
|
|
243
|
+
/**
|
|
244
|
+
* External source's URL
|
|
245
|
+
*/
|
|
246
|
+
linkHref: _propTypes.default.string,
|
|
247
|
+
/**
|
|
248
|
+
* To provide additional information about the source, rendered underneath `link`
|
|
249
|
+
*/
|
|
250
|
+
additionalInfo: _propTypes.default.string,
|
|
251
|
+
/**
|
|
252
|
+
* Whether to render BlockQuote as a heading size of `h3` or large text size
|
|
253
|
+
*/
|
|
254
|
+
textStyle: _propTypes.default.oneOf(['large', 'heading'])
|
|
255
|
+
};
|
|
256
|
+
var _default = exports.default = BlockQuote;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _BlockQuote = _interopRequireDefault(require("./BlockQuote"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _BlockQuote.default;
|