@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
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var _withLinkRouter$propT, _withLinkRouter$propT2, _withLinkRouter$propT3, _withLinkRouter$propT4;
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import { selectSystemProps, StackView, Typography, useHash, useInputValue, useResponsiveProp, withLinkRouter } from '@telus-uds/components-base';
|
|
5
|
-
import
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { htmlAttrs, scrollToAnchor } from '../utils';
|
|
6
6
|
import NavigationItem from './NavigationItem';
|
|
7
7
|
import NavigationSubMenu from './NavigationSubMenu';
|
|
8
8
|
import collapseItems from './collapseItems';
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
const {
|
|
11
|
-
styled
|
|
12
|
-
} = styledComponents;
|
|
13
10
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
14
|
-
const Heading = styled.div({
|
|
11
|
+
const Heading = /*#__PURE__*/styled.div.withConfig({
|
|
12
|
+
displayName: "NavigationBar__Heading",
|
|
13
|
+
componentId: "components-web__sc-1vis1gt-0"
|
|
14
|
+
})({
|
|
15
15
|
alignItems: 'center',
|
|
16
16
|
display: 'flex',
|
|
17
17
|
flex: 1,
|
|
@@ -59,14 +59,14 @@ const NavigationBar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
59
59
|
let {
|
|
60
60
|
items: parentItems
|
|
61
61
|
} = _ref3;
|
|
62
|
-
return parentItems
|
|
62
|
+
return parentItems?.some(_ref4 => {
|
|
63
63
|
let {
|
|
64
64
|
href
|
|
65
65
|
} = _ref4;
|
|
66
66
|
return hash === href;
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
|
-
hashItem = parentItem
|
|
69
|
+
hashItem = parentItem?.items.find(_ref5 => {
|
|
70
70
|
let {
|
|
71
71
|
href
|
|
72
72
|
} = _ref5;
|
|
@@ -87,14 +87,13 @@ const NavigationBar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
87
87
|
const openOverlayRef = React.useRef(null);
|
|
88
88
|
const [openSubMenuId, setOpenSubMenuId] = React.useState(null);
|
|
89
89
|
const handleSubMenuClose = event => {
|
|
90
|
-
var _openOverlayRef$curre, _openOverlayRef$curre2;
|
|
91
90
|
if (event.type === 'keydown') {
|
|
92
91
|
if (event.key === 'Escape' || event.key === 27) {
|
|
93
92
|
setOpenSubMenuId(null);
|
|
94
93
|
}
|
|
95
|
-
} else if (event.type === 'click' && openOverlayRef
|
|
94
|
+
} else if (event.type === 'click' && openOverlayRef?.current && event.target && !openOverlayRef?.current?.contains(event.target)) {
|
|
96
95
|
setOpenSubMenuId(null);
|
|
97
|
-
} else if (event.type === 'touchstart' && openOverlayRef
|
|
96
|
+
} else if (event.type === 'touchstart' && openOverlayRef?.current && event.touches[0].target && !openOverlayRef?.current?.contains(event.touches[0].target)) {
|
|
98
97
|
setOpenSubMenuId(null);
|
|
99
98
|
}
|
|
100
99
|
};
|
|
@@ -155,7 +154,7 @@ const NavigationBar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
155
154
|
heading: headingLevel,
|
|
156
155
|
children: heading
|
|
157
156
|
})
|
|
158
|
-
}), itemsForViewport
|
|
157
|
+
}), itemsForViewport?.map((_ref6, index) => {
|
|
159
158
|
let {
|
|
160
159
|
href,
|
|
161
160
|
label,
|
|
@@ -173,22 +172,22 @@ const NavigationBar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
173
172
|
setOpenSubMenuId(openSubMenuId !== itemId ? itemId : null);
|
|
174
173
|
return;
|
|
175
174
|
}
|
|
176
|
-
if (href
|
|
175
|
+
if (href?.startsWith('#')) {
|
|
177
176
|
scrollToAnchor(href, event, () => setValue(itemId, event));
|
|
178
177
|
} else {
|
|
179
178
|
setValue(itemId, event);
|
|
180
179
|
}
|
|
181
|
-
onClick
|
|
180
|
+
onClick?.(event);
|
|
182
181
|
};
|
|
183
182
|
const ItemComponent = nestedItems ? NavigationSubMenu : NavigationItem;
|
|
184
183
|
const isOpen = itemId === openSubMenuId;
|
|
185
|
-
const scrollableNestedItems =
|
|
184
|
+
const scrollableNestedItems = nestedItems?.map(item => ({
|
|
186
185
|
...item,
|
|
187
186
|
onPress: event => {
|
|
188
187
|
const nestedItemId = item.id ?? item.label;
|
|
189
188
|
scrollToAnchor(item.href, event, () => setValue(nestedItemId, event));
|
|
190
189
|
}
|
|
191
|
-
}))
|
|
190
|
+
})) ?? nestedItems;
|
|
192
191
|
return /*#__PURE__*/_jsx(ItemComponent, {
|
|
193
192
|
ref: itemRef,
|
|
194
193
|
href: href,
|
|
@@ -235,8 +234,8 @@ NavigationBar.propTypes = {
|
|
|
235
234
|
id: PropTypes.string.isRequired,
|
|
236
235
|
onClick: PropTypes.func,
|
|
237
236
|
selected: PropTypes.bool,
|
|
238
|
-
LinkRouter:
|
|
239
|
-
linkRouterProps:
|
|
237
|
+
LinkRouter: withLinkRouter.propTypes?.LinkRouter,
|
|
238
|
+
linkRouterProps: withLinkRouter.propTypes?.linkRouterProps,
|
|
240
239
|
// One layer of nested links is allowed
|
|
241
240
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
242
241
|
label: PropTypes.string.isRequired,
|
|
@@ -244,8 +243,8 @@ NavigationBar.propTypes = {
|
|
|
244
243
|
id: PropTypes.string.isRequired,
|
|
245
244
|
onClick: PropTypes.func,
|
|
246
245
|
selected: PropTypes.bool,
|
|
247
|
-
LinkRouter:
|
|
248
|
-
linkRouterProps:
|
|
246
|
+
LinkRouter: withLinkRouter.propTypes?.LinkRouter,
|
|
247
|
+
linkRouterProps: withLinkRouter.propTypes?.linkRouterProps
|
|
249
248
|
}))
|
|
250
249
|
})).isRequired,
|
|
251
250
|
/**
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Button, selectSystemProps, useResponsiveProp, useViewport, useThemeTokensCallback, getTokensPropType } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { htmlAttrs } from '../utils';
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const {
|
|
7
|
-
styled
|
|
8
|
-
} = styledComponents;
|
|
9
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
10
8
|
const defaultMaxWidth = 192;
|
|
11
|
-
const ItemContainer = styled.div(
|
|
9
|
+
const ItemContainer = /*#__PURE__*/styled.div.withConfig({
|
|
10
|
+
displayName: "NavigationItem__ItemContainer",
|
|
11
|
+
componentId: "components-web__sc-ql9x7c-0"
|
|
12
|
+
})(_ref => {
|
|
12
13
|
let {
|
|
13
14
|
targetWidth
|
|
14
15
|
} = _ref;
|
|
@@ -99,7 +99,6 @@ const NavigationSubMenu = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
99
99
|
icon: icoMenu,
|
|
100
100
|
tokens: tokens,
|
|
101
101
|
children: _ref2 => {
|
|
102
|
-
var _textStyles$;
|
|
103
102
|
let {
|
|
104
103
|
textStyles
|
|
105
104
|
} = _ref2;
|
|
@@ -109,7 +108,7 @@ const NavigationSubMenu = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
109
108
|
size: 'micro'
|
|
110
109
|
},
|
|
111
110
|
tokens: {
|
|
112
|
-
color:
|
|
111
|
+
color: textStyles[0]?.color
|
|
113
112
|
}
|
|
114
113
|
}, `${id}_icon`)];
|
|
115
114
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make a list of items into a one-item list where all items are nested under the first item
|
|
3
|
+
*/
|
|
4
|
+
const collapseItems = (items, selectedId) => {
|
|
5
|
+
if (!items?.length) return items;
|
|
6
|
+
|
|
7
|
+
// Give the root item the label of the current active link
|
|
8
|
+
// (or the first item if for some reason there's no match on the selectedId)
|
|
9
|
+
let rootLabel = items[0].label;
|
|
10
|
+
const isSelected = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
label,
|
|
13
|
+
id
|
|
14
|
+
} = _ref;
|
|
15
|
+
return selectedId === id ?? label;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// Linter doesn't like for loops, simulate loop that breaks
|
|
19
|
+
items.some(item => {
|
|
20
|
+
if (isSelected(item)) {
|
|
21
|
+
rootLabel = item.label;
|
|
22
|
+
return true; // break
|
|
23
|
+
}
|
|
24
|
+
const nestedMatch = item.items?.find(isSelected);
|
|
25
|
+
if (nestedMatch) {
|
|
26
|
+
rootLabel = nestedMatch.label;
|
|
27
|
+
return true; // break
|
|
28
|
+
}
|
|
29
|
+
return false; // continue
|
|
30
|
+
});
|
|
31
|
+
return [{
|
|
32
|
+
id: 'navigation-bar-root',
|
|
33
|
+
label: rootLabel,
|
|
34
|
+
items
|
|
35
|
+
}];
|
|
36
|
+
};
|
|
37
|
+
export default collapseItems;
|
|
@@ -7,7 +7,7 @@ const resolveItemSelection = (_ref, selectedId) => {
|
|
|
7
7
|
const itemId = id ?? label;
|
|
8
8
|
|
|
9
9
|
// Treat item as selected if it or any nested child matches the selected id
|
|
10
|
-
const selected = Boolean(selectedId === itemId ||
|
|
10
|
+
const selected = Boolean(selectedId === itemId || items?.some(item => resolveItemSelection(item, selectedId).selected));
|
|
11
11
|
return {
|
|
12
12
|
itemId,
|
|
13
13
|
selected
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { applyTextStyles, getTokensPropType, selectSystemProps, StackView, Typography, useTheme, useThemeTokens, wrapStringsInText } from '@telus-uds/components-base';
|
|
4
|
+
import styled from 'styled-components';
|
|
4
5
|
import ItemBase from './ItemBase';
|
|
5
|
-
import { htmlAttrs
|
|
6
|
+
import { htmlAttrs } from '../utils';
|
|
6
7
|
import { OL_COUNTER_NAME } from './constants';
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
const {
|
|
9
|
-
styled
|
|
10
|
-
} = styledComponents;
|
|
11
9
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
12
10
|
const selectItemTextStyles = (_ref, themeOptions) => {
|
|
13
11
|
let {
|
|
@@ -27,7 +25,10 @@ const selectItemTextStyles = (_ref, themeOptions) => {
|
|
|
27
25
|
lineHeight: itemLineHeight
|
|
28
26
|
});
|
|
29
27
|
};
|
|
30
|
-
const StyledItemBase = styled(ItemBase)(
|
|
28
|
+
const StyledItemBase = /*#__PURE__*/styled(ItemBase).withConfig({
|
|
29
|
+
displayName: "Item__StyledItemBase",
|
|
30
|
+
componentId: "components-web__sc-7jzwcq-0"
|
|
31
|
+
})(_ref2 => {
|
|
31
32
|
let {
|
|
32
33
|
interItemMargin,
|
|
33
34
|
itemBulletContainerWidth,
|
|
@@ -66,7 +67,10 @@ const StyledItemBase = styled(ItemBase)(_ref2 => {
|
|
|
66
67
|
}
|
|
67
68
|
};
|
|
68
69
|
});
|
|
69
|
-
const ItemContent = styled.div({
|
|
70
|
+
const ItemContent = /*#__PURE__*/styled.div.withConfig({
|
|
71
|
+
displayName: "Item__ItemContent",
|
|
72
|
+
componentId: "components-web__sc-7jzwcq-1"
|
|
73
|
+
})({
|
|
70
74
|
display: 'flex',
|
|
71
75
|
flexDirection: 'column',
|
|
72
76
|
gap: 0
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import styled from 'styled-components';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const StyledItem = /*#__PURE__*/styled.li.withConfig({
|
|
6
|
+
displayName: "ItemBase__StyledItem",
|
|
7
|
+
componentId: "components-web__sc-o0oiv5-0"
|
|
8
|
+
})({
|
|
9
9
|
display: 'flex'
|
|
10
10
|
});
|
|
11
11
|
const Item = _ref => {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { getTokensPropType, selectSystemProps, variantProp } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { htmlAttrs } from '../utils';
|
|
5
6
|
import OrderedListBase from './OrderedListBase';
|
|
6
7
|
import Item from './Item';
|
|
7
8
|
import { OL_COUNTER_NAME } from './constants';
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const {
|
|
10
|
-
styled
|
|
11
|
-
} = styledComponents;
|
|
12
10
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
13
|
-
const StyledOrderedListBase = styled(OrderedListBase)(
|
|
11
|
+
const StyledOrderedListBase = /*#__PURE__*/styled(OrderedListBase).withConfig({
|
|
12
|
+
displayName: "OrderedList__StyledOrderedListBase",
|
|
13
|
+
componentId: "components-web__sc-t5az8z-0"
|
|
14
|
+
})(_ref => {
|
|
14
15
|
let {
|
|
15
16
|
start
|
|
16
17
|
} = _ref;
|
|
@@ -38,9 +39,8 @@ const OrderedList = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
38
39
|
// Pass any variants and tokens "OrderedList" receives down to the individual list items.
|
|
39
40
|
const childrenWithParentVariantsAndTokens = React.useMemo(() => {
|
|
40
41
|
const addVariantAndTokensToProps = child => {
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
const existingChildTokens = ((_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.tokens) ?? {};
|
|
42
|
+
const existingChildVariants = child.props?.variant ?? {};
|
|
43
|
+
const existingChildTokens = child.props?.tokens ?? {};
|
|
44
44
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
45
45
|
variant: {
|
|
46
46
|
...existingChildVariants,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import styled from 'styled-components';
|
|
4
4
|
import ItemBase from './ItemBase';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const StyledList = /*#__PURE__*/styled.ol.withConfig({
|
|
7
|
+
displayName: "OrderedListBase__StyledList",
|
|
8
|
+
componentId: "components-web__sc-4m9lgj-0"
|
|
9
|
+
})({
|
|
10
10
|
display: 'flex',
|
|
11
11
|
flexDirection: 'column',
|
|
12
12
|
listStylePosition: 'inside',
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { getTokensPropType, selectSystemProps } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { htmlAttrs, useTypographyTheme } from '../utils';
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const {
|
|
7
|
-
styled
|
|
8
|
-
} = styledComponents;
|
|
9
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
10
|
-
const StyledParagraph = styled.p
|
|
11
|
-
|
|
8
|
+
const StyledParagraph = /*#__PURE__*/styled.p.withConfig({
|
|
9
|
+
displayName: "Paragraph__StyledParagraph",
|
|
10
|
+
componentId: "components-web__sc-1bg9r8p-0"
|
|
11
|
+
})(["", " ", " &:first-child{margin-block-start:0em;}&:last-child{margin-block-end:0em;}"], _ref => {
|
|
12
12
|
let {
|
|
13
13
|
align
|
|
14
14
|
} = _ref;
|
|
15
15
|
return align ? `text-align: ${align};` : '';
|
|
16
|
-
}
|
|
17
|
-
${_ref2 => {
|
|
16
|
+
}, _ref2 => {
|
|
18
17
|
let {
|
|
19
18
|
linesBetween
|
|
20
19
|
} = _ref2;
|
|
@@ -22,14 +21,7 @@ const StyledParagraph = styled.p`
|
|
|
22
21
|
margin-block-start: ${linesBetween}em;
|
|
23
22
|
margin-block-end: ${linesBetween}em;
|
|
24
23
|
`;
|
|
25
|
-
}
|
|
26
|
-
&:first-child {
|
|
27
|
-
margin-block-start: 0em;
|
|
28
|
-
}
|
|
29
|
-
&:last-child {
|
|
30
|
-
margin-block-end: 0em;
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
24
|
+
});
|
|
33
25
|
|
|
34
26
|
/**
|
|
35
27
|
* Block text as an HTML ```<p>``` element.
|
|
@@ -2,20 +2,20 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import omit from 'lodash.omit';
|
|
4
4
|
import { Box, getThemeTokens, hrefAttrsProp, PressableCardBase, selectSystemProps, Spacer, StackView, Typography, a11yProps, focusHandlerProps, viewProps, withLinkRouter, useTheme, getTokensPropType } from '@telus-uds/components-base';
|
|
5
|
-
import
|
|
5
|
+
import styled from 'styled-components';
|
|
6
6
|
import FullBleedContent, { getFullBleedBorderRadius, useFullBleedContentProps } from '../shared/FullBleedContent';
|
|
7
7
|
import AuthorDate from './AuthorDate';
|
|
8
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
const {
|
|
10
|
-
styled
|
|
11
|
-
} = styledComponents;
|
|
12
8
|
|
|
13
9
|
// Passes React Native-oriented system props through UDS PressableCardBase
|
|
10
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
11
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, focusHandlerProps, viewProps]);
|
|
15
12
|
|
|
16
13
|
// Stop changes to the card's inner border width causing the size and
|
|
17
14
|
// apparent position of the full bleed image to change.
|
|
18
|
-
const FullBleedOffsetOuter = styled.div(
|
|
15
|
+
const FullBleedOffsetOuter = /*#__PURE__*/styled.div.withConfig({
|
|
16
|
+
displayName: "PreviewCard__FullBleedOffsetOuter",
|
|
17
|
+
componentId: "components-web__sc-1yfz4de-0"
|
|
18
|
+
})(_ref => {
|
|
19
19
|
let {
|
|
20
20
|
borderOffset
|
|
21
21
|
} = _ref;
|
|
@@ -24,7 +24,10 @@ const FullBleedOffsetOuter = styled.div(_ref => {
|
|
|
24
24
|
marginTop: borderOffset * 2
|
|
25
25
|
};
|
|
26
26
|
});
|
|
27
|
-
const FullBleedOffsetInner = styled.div(
|
|
27
|
+
const FullBleedOffsetInner = /*#__PURE__*/styled.div.withConfig({
|
|
28
|
+
displayName: "PreviewCard__FullBleedOffsetInner",
|
|
29
|
+
componentId: "components-web__sc-1yfz4de-1"
|
|
30
|
+
})(_ref2 => {
|
|
28
31
|
let {
|
|
29
32
|
borderOffset
|
|
30
33
|
} = _ref2;
|
|
@@ -1,131 +1,121 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { A11yText, Divider, selectSystemProps, Typography, useThemeTokens, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
4
|
+
import styled from 'styled-components';
|
|
4
5
|
import FootnoteLink from '../Footnote/FootnoteLink';
|
|
5
6
|
import getTypographyTokens from './tokens';
|
|
6
|
-
import { htmlAttrs, warn
|
|
7
|
+
import { htmlAttrs, warn } from '../utils';
|
|
7
8
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
const {
|
|
9
|
-
styled
|
|
10
|
-
} = styledComponents;
|
|
11
9
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
12
|
-
const PriceLockupContainer = styled.div
|
|
13
|
-
|
|
10
|
+
const PriceLockupContainer = /*#__PURE__*/styled.div.withConfig({
|
|
11
|
+
displayName: "PriceLockup__PriceLockupContainer",
|
|
12
|
+
componentId: "components-web__sc-1x6duay-0"
|
|
13
|
+
})(["align-items:", ";display:flex;flex-direction:column;width:fit-content;"], _ref => {
|
|
14
14
|
let {
|
|
15
15
|
alignItemsText
|
|
16
16
|
} = _ref;
|
|
17
17
|
return alignItemsText;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const PriceContainer = styled.div`
|
|
24
|
-
display: flex;
|
|
25
|
-
margin-bottom: ${_ref2 => {
|
|
18
|
+
});
|
|
19
|
+
const PriceContainer = /*#__PURE__*/styled.div.withConfig({
|
|
20
|
+
displayName: "PriceLockup__PriceContainer",
|
|
21
|
+
componentId: "components-web__sc-1x6duay-1"
|
|
22
|
+
})(["display:flex;margin-bottom:", ";"], _ref2 => {
|
|
26
23
|
let {
|
|
27
24
|
priceMarginBottom
|
|
28
25
|
} = _ref2;
|
|
29
26
|
return priceMarginBottom;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
});
|
|
28
|
+
const FootnoteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
29
|
+
displayName: "PriceLockup__FootnoteContainer",
|
|
30
|
+
componentId: "components-web__sc-1x6duay-2"
|
|
31
|
+
})(["display:flex;margin-top:", ";gap:", ";"], _ref3 => {
|
|
35
32
|
let {
|
|
36
33
|
footnoteMarginTop
|
|
37
34
|
} = _ref3;
|
|
38
35
|
return footnoteMarginTop;
|
|
39
|
-
}
|
|
40
|
-
gap: ${_ref4 => {
|
|
36
|
+
}, _ref4 => {
|
|
41
37
|
let {
|
|
42
38
|
footnoteGap
|
|
43
39
|
} = _ref4;
|
|
44
40
|
return footnoteGap;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
});
|
|
42
|
+
const BottomTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
43
|
+
displayName: "PriceLockup__BottomTextContainer",
|
|
44
|
+
componentId: "components-web__sc-1x6duay-3"
|
|
45
|
+
})(["margin-top:", ";"], _ref5 => {
|
|
49
46
|
let {
|
|
50
47
|
bottomTextMarginTop
|
|
51
48
|
} = _ref5;
|
|
52
49
|
return bottomTextMarginTop;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
});
|
|
51
|
+
const BottomLinksContainer = /*#__PURE__*/styled.div.withConfig({
|
|
52
|
+
displayName: "PriceLockup__BottomLinksContainer",
|
|
53
|
+
componentId: "components-web__sc-1x6duay-4"
|
|
54
|
+
})(["align-self:center;margin-left:", ";"], _ref6 => {
|
|
58
55
|
let {
|
|
59
56
|
bottomLinksMarginLeft
|
|
60
57
|
} = _ref6;
|
|
61
58
|
return bottomLinksMarginLeft;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
});
|
|
60
|
+
const TopTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
61
|
+
displayName: "PriceLockup__TopTextContainer",
|
|
62
|
+
componentId: "components-web__sc-1x6duay-5"
|
|
63
|
+
})(["margin-bottom:", ";"], _ref7 => {
|
|
66
64
|
let {
|
|
67
65
|
topTextMarginBottom
|
|
68
66
|
} = _ref7;
|
|
69
67
|
return topTextMarginBottom;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
});
|
|
69
|
+
const PriceTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
70
|
+
displayName: "PriceLockup__PriceTextContainer",
|
|
71
|
+
componentId: "components-web__sc-1x6duay-6"
|
|
72
|
+
})(["display:flex;flex-direction:", ";"], _ref8 => {
|
|
75
73
|
let {
|
|
76
74
|
ratePosition
|
|
77
75
|
} = _ref8;
|
|
78
76
|
return ratePosition === 'bottom' ? 'column' : 'row';
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const RateTextContainer = styled.div
|
|
85
|
-
|
|
77
|
+
});
|
|
78
|
+
const RateContainer = /*#__PURE__*/styled.div.withConfig({
|
|
79
|
+
displayName: "PriceLockup__RateContainer",
|
|
80
|
+
componentId: "components-web__sc-1x6duay-7"
|
|
81
|
+
})(["display:flex;"]);
|
|
82
|
+
const RateTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
83
|
+
displayName: "PriceLockup__RateTextContainer",
|
|
84
|
+
componentId: "components-web__sc-1x6duay-8"
|
|
85
|
+
})(["align-self:", ";"], _ref9 => {
|
|
86
86
|
let {
|
|
87
87
|
ratePosition
|
|
88
88
|
} = _ref9;
|
|
89
89
|
return ratePosition === 'bottom' ? 'flex-start' : 'flex-end';
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
align-items: center;
|
|
96
|
-
::before {
|
|
97
|
-
content: '';
|
|
98
|
-
width: 100%;
|
|
99
|
-
top: ${_ref10 => {
|
|
90
|
+
});
|
|
91
|
+
const StrikeThroughContainer = /*#__PURE__*/styled.div.withConfig({
|
|
92
|
+
displayName: "PriceLockup__StrikeThroughContainer",
|
|
93
|
+
componentId: "components-web__sc-1x6duay-9"
|
|
94
|
+
})(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"], _ref10 => {
|
|
100
95
|
let {
|
|
101
96
|
strikeThroughPosition
|
|
102
97
|
} = _ref10;
|
|
103
98
|
return `${strikeThroughPosition}px`;
|
|
104
|
-
}
|
|
105
|
-
height: ${_ref11 => {
|
|
99
|
+
}, _ref11 => {
|
|
106
100
|
let {
|
|
107
101
|
strikeThroughHeight
|
|
108
102
|
} = _ref11;
|
|
109
103
|
return `${strikeThroughHeight}px`;
|
|
110
|
-
}
|
|
111
|
-
background: ${_ref12 => {
|
|
104
|
+
}, _ref12 => {
|
|
112
105
|
let {
|
|
113
106
|
strikeThroughColor
|
|
114
107
|
} = _ref12;
|
|
115
108
|
return strikeThroughColor;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
display: flex;
|
|
122
|
-
padding-top: ${_ref13 => {
|
|
109
|
+
});
|
|
110
|
+
const TypographyContainer = /*#__PURE__*/styled.div.withConfig({
|
|
111
|
+
displayName: "PriceLockup__TypographyContainer",
|
|
112
|
+
componentId: "components-web__sc-1x6duay-10"
|
|
113
|
+
})(["display:flex;padding-top:", ";"], _ref13 => {
|
|
123
114
|
let {
|
|
124
115
|
paddingTop
|
|
125
116
|
} = _ref13;
|
|
126
117
|
return `${paddingTop || 0}px`;
|
|
127
|
-
}
|
|
128
|
-
`;
|
|
118
|
+
});
|
|
129
119
|
const selectFootnoteLinkStyles = _ref14 => {
|
|
130
120
|
let {
|
|
131
121
|
footnoteLinkColor,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { getTokensPropType, Progress, selectSystemProps, useThemeTokens, a11yProps, viewProps, variantProp, applyShadowToken } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const {
|
|
7
|
-
styled
|
|
8
|
-
} = styledComponents;
|
|
4
|
+
import styled from 'styled-components';
|
|
9
5
|
|
|
10
6
|
// Passes React Native-oriented system props through UDS Progress
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps]);
|
|
12
9
|
const {
|
|
13
10
|
Bar: ProgressBarBase
|
|
14
11
|
} = Progress;
|
|
15
|
-
const Gradient = styled.div.attrs({
|
|
12
|
+
const Gradient = /*#__PURE__*/styled.div.attrs({
|
|
16
13
|
'data-testid': 'ProgressBar-Gradient'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "ProgressBar__Gradient",
|
|
16
|
+
componentId: "components-web__sc-1vmzyq5-0"
|
|
17
17
|
})(_ref => {
|
|
18
18
|
let {
|
|
19
19
|
gradient: {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const InputField = /*#__PURE__*/styled.div.withConfig({
|
|
3
|
+
displayName: "styles__InputField",
|
|
4
|
+
componentId: "components-web__sc-1lrz1xk-0"
|
|
5
|
+
})(["order:1;text-align:center;z-index:10;input{text-align:center;}"]);
|
|
6
|
+
export const InputWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
7
|
+
displayName: "styles__InputWrapper",
|
|
8
|
+
componentId: "components-web__sc-1lrz1xk-1"
|
|
9
|
+
})(["text-align:start;display:flex;flex-direction:row;flex-wrap:nowrap;"]);
|