@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,135 +1,109 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { selectSystemProps, Typography, useThemeTokens, 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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
const {
|
|
7
|
-
styled
|
|
8
|
-
} = styledComponents;
|
|
9
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
10
|
-
const RibbonWrapper = styled.div
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const RibbonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
9
|
+
displayName: "Ribbon__RibbonWrapper",
|
|
10
|
+
componentId: "components-web__sc-186270k-0"
|
|
11
|
+
})(["width:fit-content;position:", ";z-index:1;left:", ";top:", ";"], _ref => {
|
|
13
12
|
let {
|
|
14
13
|
left,
|
|
15
14
|
top
|
|
16
15
|
} = _ref;
|
|
17
16
|
return left ?? top ? 'absolute' : 'relative';
|
|
18
|
-
}
|
|
19
|
-
z-index: 1;
|
|
20
|
-
left: ${_ref2 => {
|
|
17
|
+
}, _ref2 => {
|
|
21
18
|
let {
|
|
22
19
|
left
|
|
23
20
|
} = _ref2;
|
|
24
21
|
return left && `${left}px`;
|
|
25
|
-
}
|
|
26
|
-
top: ${_ref3 => {
|
|
22
|
+
}, _ref3 => {
|
|
27
23
|
let {
|
|
28
24
|
top
|
|
29
25
|
} = _ref3;
|
|
30
26
|
return top && `${top}px`;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
background: ${_ref4 => {
|
|
27
|
+
});
|
|
28
|
+
const RibbonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
29
|
+
displayName: "Ribbon__RibbonContainer",
|
|
30
|
+
componentId: "components-web__sc-186270k-1"
|
|
31
|
+
})(["display:flex;justify-content:center;background:", ";padding:", ";border-radius:", ";width:fit-content;box-shadow:", ";border-bottom-right-radius:", ";border-bottom-left-radius:", ";"], _ref4 => {
|
|
37
32
|
let {
|
|
38
33
|
backgroundColor
|
|
39
34
|
} = _ref4;
|
|
40
35
|
return backgroundColor;
|
|
41
|
-
}
|
|
42
|
-
padding: ${_ref5 => {
|
|
36
|
+
}, _ref5 => {
|
|
43
37
|
let {
|
|
44
38
|
padding
|
|
45
39
|
} = _ref5;
|
|
46
40
|
return `${padding}`;
|
|
47
|
-
}
|
|
48
|
-
border-radius: ${_ref6 => {
|
|
41
|
+
}, _ref6 => {
|
|
49
42
|
let {
|
|
50
43
|
borderRadius
|
|
51
44
|
} = _ref6;
|
|
52
45
|
return borderRadius;
|
|
53
|
-
}
|
|
54
|
-
width: fit-content;
|
|
55
|
-
box-shadow: ${_ref7 => {
|
|
46
|
+
}, _ref7 => {
|
|
56
47
|
let {
|
|
57
48
|
boxShadow,
|
|
58
49
|
shouldWrap
|
|
59
50
|
} = _ref7;
|
|
60
51
|
return shouldWrap && boxShadow;
|
|
61
|
-
}
|
|
62
|
-
border-bottom-right-radius: ${_ref8 => {
|
|
52
|
+
}, _ref8 => {
|
|
63
53
|
let {
|
|
64
54
|
borderRadiusBottomLeft
|
|
65
55
|
} = _ref8;
|
|
66
56
|
return borderRadiusBottomLeft;
|
|
67
|
-
}
|
|
68
|
-
border-bottom-left-radius: ${_ref9 => {
|
|
57
|
+
}, _ref9 => {
|
|
69
58
|
let {
|
|
70
59
|
borderRadiusBottomRight
|
|
71
60
|
} = _ref9;
|
|
72
61
|
return borderRadiusBottomRight;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
62
|
+
});
|
|
63
|
+
const RibbonCurve = /*#__PURE__*/styled.div.withConfig({
|
|
64
|
+
displayName: "Ribbon__RibbonCurve",
|
|
65
|
+
componentId: "components-web__sc-186270k-2"
|
|
66
|
+
})(["background:", ";width:", ";height:", ";margin-top:-", ";border-radius:0 0 0 100%;position:relative;z-index:-1;overflow:hidden;&::after{content:'';border-bottom-left-radius:", ";position:absolute;height:", ";background:", ";width:", ";}"], _ref10 => {
|
|
77
67
|
let {
|
|
78
68
|
curveBackgroundColor
|
|
79
69
|
} = _ref10;
|
|
80
70
|
return curveBackgroundColor;
|
|
81
|
-
}
|
|
82
|
-
width: ${_ref11 => {
|
|
71
|
+
}, _ref11 => {
|
|
83
72
|
let {
|
|
84
73
|
curveWidth
|
|
85
74
|
} = _ref11;
|
|
86
75
|
return curveWidth;
|
|
87
|
-
}
|
|
88
|
-
height: ${_ref12 => {
|
|
76
|
+
}, _ref12 => {
|
|
89
77
|
let {
|
|
90
78
|
curveHeight
|
|
91
79
|
} = _ref12;
|
|
92
80
|
return curveHeight;
|
|
93
|
-
}
|
|
94
|
-
margin-top: -${_ref13 => {
|
|
81
|
+
}, _ref13 => {
|
|
95
82
|
let {
|
|
96
83
|
curveMarginTop
|
|
97
84
|
} = _ref13;
|
|
98
85
|
return curveMarginTop;
|
|
99
|
-
}
|
|
100
|
-
border-radius: 0 0 0 100%;
|
|
101
|
-
position: relative;
|
|
102
|
-
z-index: -1;
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
&::after {
|
|
105
|
-
content: '';
|
|
106
|
-
border-bottom-left-radius: ${_ref14 => {
|
|
86
|
+
}, _ref14 => {
|
|
107
87
|
let {
|
|
108
88
|
curveAfterRadius
|
|
109
89
|
} = _ref14;
|
|
110
90
|
return curveAfterRadius;
|
|
111
|
-
}
|
|
112
|
-
position: absolute;
|
|
113
|
-
height: ${_ref15 => {
|
|
91
|
+
}, _ref15 => {
|
|
114
92
|
let {
|
|
115
93
|
curveAfterHeight
|
|
116
94
|
} = _ref15;
|
|
117
95
|
return curveAfterHeight;
|
|
118
|
-
}
|
|
119
|
-
background: ${_ref16 => {
|
|
96
|
+
}, _ref16 => {
|
|
120
97
|
let {
|
|
121
98
|
curveAfterBackgroundColor
|
|
122
99
|
} = _ref16;
|
|
123
100
|
return curveAfterBackgroundColor;
|
|
124
|
-
}
|
|
125
|
-
width: ${_ref17 => {
|
|
101
|
+
}, _ref17 => {
|
|
126
102
|
let {
|
|
127
103
|
curveAfterWidth
|
|
128
104
|
} = _ref17;
|
|
129
105
|
return curveAfterWidth;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
`;
|
|
106
|
+
});
|
|
133
107
|
const Ribbon = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
|
|
134
108
|
let {
|
|
135
109
|
children,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _Skeleton$propTypes, _Skeleton$propTypes2, _Skeleton$propTypes3;
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import { Skeleton } from '@telus-uds/components-base';
|
|
@@ -30,9 +29,9 @@ SkeletonImage.displayName = 'SkeletonImage';
|
|
|
30
29
|
SkeletonImage.propTypes = {
|
|
31
30
|
imgHeight: PropTypes.number,
|
|
32
31
|
rounded: PropTypes.oneOf(['circle', 'corners']),
|
|
33
|
-
size:
|
|
34
|
-
sizeIndex:
|
|
35
|
-
sizePixels:
|
|
32
|
+
size: Skeleton.propTypes?.size,
|
|
33
|
+
sizeIndex: Skeleton.propTypes?.sizeIndex,
|
|
34
|
+
sizePixels: Skeleton.propTypes?.sizePixels,
|
|
36
35
|
show: PropTypes.bool.isRequired,
|
|
37
36
|
children: PropTypes.node
|
|
38
37
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Skeleton } from '@telus-uds/components-base';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const SkeletonTypography = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
6
|
+
let {
|
|
7
|
+
show,
|
|
8
|
+
size,
|
|
9
|
+
sizeIndex,
|
|
10
|
+
sizePixels,
|
|
11
|
+
characters,
|
|
12
|
+
lines,
|
|
13
|
+
children
|
|
14
|
+
} = _ref;
|
|
15
|
+
if (!show) {
|
|
16
|
+
return children;
|
|
17
|
+
}
|
|
18
|
+
return /*#__PURE__*/_jsx(Skeleton, {
|
|
19
|
+
size: size,
|
|
20
|
+
sizeIndex: sizeIndex,
|
|
21
|
+
sizePixels: sizePixels,
|
|
22
|
+
characters: characters,
|
|
23
|
+
lines: lines,
|
|
24
|
+
ref: ref
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
SkeletonTypography.displayName = 'SkeletonTypography';
|
|
28
|
+
SkeletonTypography.propTypes = {
|
|
29
|
+
show: PropTypes.bool.isRequired,
|
|
30
|
+
children: PropTypes.node,
|
|
31
|
+
size: Skeleton.propTypes?.size,
|
|
32
|
+
sizeIndex: Skeleton.propTypes?.sizeIndex,
|
|
33
|
+
sizePixels: Skeleton.propTypes?.sizePixels,
|
|
34
|
+
characters: Skeleton.propTypes?.characters,
|
|
35
|
+
lines: Skeleton.propTypes?.lines
|
|
36
|
+
};
|
|
37
|
+
export default SkeletonTypography;
|
|
@@ -1,18 +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 StyledSpan = styled.span
|
|
8
|
+
const StyledSpan = /*#__PURE__*/styled.span.withConfig({
|
|
9
|
+
displayName: "Span__StyledSpan",
|
|
10
|
+
componentId: "components-web__sc-o7sihn-0"
|
|
11
|
+
})(["", "};"], _ref => {
|
|
11
12
|
let {
|
|
12
13
|
flex
|
|
13
14
|
} = _ref;
|
|
14
15
|
return flex ? 'display: inline-flex' : '';
|
|
15
|
-
}
|
|
16
|
+
});
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Text as an HTML ```<span>``` element.
|
|
@@ -2,15 +2,16 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { selectSystemProps, useScrollBlocking, useThemeTokens, getTokensPropType } from '@telus-uds/components-base';
|
|
4
4
|
import { Portal } from '@gorhom/portal';
|
|
5
|
+
import styled from 'styled-components';
|
|
5
6
|
import SpinnerContent from './SpinnerContent';
|
|
6
|
-
import { htmlAttrs, media
|
|
7
|
+
import { htmlAttrs, media } from '../utils';
|
|
7
8
|
import { BACKDROP_OPACITY, BACKDROP_Z_INDEX } from './constants';
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
const {
|
|
10
|
-
styled
|
|
11
|
-
} = styledComponents;
|
|
12
10
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
13
|
-
const SpinnerContainer = styled.div(
|
|
11
|
+
const SpinnerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
12
|
+
displayName: "Spinner__SpinnerContainer",
|
|
13
|
+
componentId: "components-web__sc-116rqck-0"
|
|
14
|
+
})(_ref => {
|
|
14
15
|
let {
|
|
15
16
|
inline,
|
|
16
17
|
fullScreen
|
|
@@ -29,13 +30,19 @@ const SpinnerContainer = styled.div(_ref => {
|
|
|
29
30
|
})
|
|
30
31
|
};
|
|
31
32
|
});
|
|
32
|
-
const ContentOverlay = styled.div({
|
|
33
|
+
const ContentOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
34
|
+
displayName: "Spinner__ContentOverlay",
|
|
35
|
+
componentId: "components-web__sc-116rqck-1"
|
|
36
|
+
})({
|
|
33
37
|
position: 'absolute',
|
|
34
38
|
width: '100%',
|
|
35
39
|
height: '100%',
|
|
36
40
|
zIndex: BACKDROP_Z_INDEX
|
|
37
41
|
});
|
|
38
|
-
const FullscreenOverlay = styled.div(
|
|
42
|
+
const FullscreenOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
43
|
+
displayName: "Spinner__FullscreenOverlay",
|
|
44
|
+
componentId: "components-web__sc-116rqck-2"
|
|
45
|
+
})(_ref2 => {
|
|
39
46
|
let {
|
|
40
47
|
fullScreenOverLayBackground
|
|
41
48
|
} = _ref2;
|
|
@@ -49,7 +56,10 @@ const FullscreenOverlay = styled.div(_ref2 => {
|
|
|
49
56
|
backgroundColor: fullScreenOverLayBackground
|
|
50
57
|
};
|
|
51
58
|
});
|
|
52
|
-
const OpaqueContainer = styled.div({
|
|
59
|
+
const OpaqueContainer = /*#__PURE__*/styled.div.withConfig({
|
|
60
|
+
displayName: "Spinner__OpaqueContainer",
|
|
61
|
+
componentId: "components-web__sc-116rqck-3"
|
|
62
|
+
})({
|
|
53
63
|
opacity: BACKDROP_OPACITY
|
|
54
64
|
});
|
|
55
65
|
const recursiveMap = (children, fn) => React.Children.map(children, child => {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ActivityIndicator, StackView, Typography, selectSystemProps } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { htmlAttrs } from '../utils';
|
|
5
6
|
import { BACKDROP_Z_INDEX, LARGE } from './constants';
|
|
6
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const {
|
|
8
|
-
styled
|
|
9
|
-
} = styledComponents;
|
|
10
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
11
|
-
const Container = styled.div(
|
|
9
|
+
const Container = /*#__PURE__*/styled.div.withConfig({
|
|
10
|
+
displayName: "SpinnerContent__Container",
|
|
11
|
+
componentId: "components-web__sc-1c8bd8e-0"
|
|
12
|
+
})(_ref => {
|
|
12
13
|
let {
|
|
13
14
|
overlay
|
|
14
15
|
} = _ref;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Box, Divider, PressableCardBase, selectSystemProps, Spacer, StackView, StackWrap, Typography, hrefAttrsProp, a11yProps, focusHandlerProps, viewProps, withLinkRouter, useThemeTokens, useThemeTokensCallback, getTokensPropType } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import styled from 'styled-components';
|
|
5
5
|
import FullBleedContent, { getFullBleedBorderRadius, useFullBleedContentProps } from '../shared/FullBleedContent';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const {
|
|
8
|
-
styled
|
|
9
|
-
} = styledComponents;
|
|
10
6
|
|
|
11
7
|
// Passes React Native-oriented system props through UDS PressableCardBase
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
9
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, focusHandlerProps, viewProps]);
|
|
13
10
|
|
|
14
11
|
// Stop changes to the card's inner border width causing the size and
|
|
15
12
|
// apparent position of the full bleed image to change.
|
|
16
|
-
const FullBleedOffsetOuter = styled.div(
|
|
13
|
+
const FullBleedOffsetOuter = /*#__PURE__*/styled.div.withConfig({
|
|
14
|
+
displayName: "StoryCard__FullBleedOffsetOuter",
|
|
15
|
+
componentId: "components-web__sc-yhvivu-0"
|
|
16
|
+
})(_ref => {
|
|
17
17
|
let {
|
|
18
18
|
borderOffset
|
|
19
19
|
} = _ref;
|
|
@@ -22,7 +22,10 @@ const FullBleedOffsetOuter = styled.div(_ref => {
|
|
|
22
22
|
marginTop: borderOffset * 2
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
|
-
const FullBleedOffsetInner = styled.div(
|
|
25
|
+
const FullBleedOffsetInner = /*#__PURE__*/styled.div.withConfig({
|
|
26
|
+
displayName: "StoryCard__FullBleedOffsetInner",
|
|
27
|
+
componentId: "components-web__sc-yhvivu-1"
|
|
28
|
+
})(_ref2 => {
|
|
26
29
|
let {
|
|
27
30
|
borderOffset
|
|
28
31
|
} = _ref2;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Typography, useThemeTokens, applyShadowToken } from '@telus-uds/components-base';
|
|
4
|
-
import {
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
5
|
import { useTableContext } from './Table';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const {
|
|
8
|
-
styled,
|
|
9
|
-
css
|
|
10
|
-
} = styledComponents;
|
|
11
7
|
const HEADER_TYPE = {
|
|
12
8
|
HEADING: 'heading',
|
|
13
9
|
SUBHEADING: 'subHeading',
|
|
@@ -19,28 +15,9 @@ const stickyStyles = _ref => {
|
|
|
19
15
|
stickyBackgroundColor,
|
|
20
16
|
type
|
|
21
17
|
} = _ref;
|
|
22
|
-
return css`
|
|
23
|
-
position: sticky;
|
|
24
|
-
left: 0; // needed for sticky to work
|
|
25
|
-
z-index: 2;
|
|
26
|
-
clip-path: inset(0 -8px 0 0); // use clip path to cut off the shadow rendered below
|
|
27
|
-
// Override default cell background with stickyBackgroundColor with an exception to subheading and heading
|
|
28
|
-
${type !== HEADER_TYPE.SUBHEADING && type !== HEADER_TYPE.HEADING ? `background-color: ${stickyBackgroundColor};` : undefined}
|
|
29
|
-
&::before {
|
|
30
|
-
// use a pseudo element for the sticky shadow, since we already use shadows for inner cells border
|
|
31
|
-
content: '';
|
|
32
|
-
box-shadow: ${cellStickyShadow};
|
|
33
|
-
position: absolute;
|
|
34
|
-
top: 0;
|
|
35
|
-
left: 0;
|
|
36
|
-
right: 0;
|
|
37
|
-
bottom: 0;
|
|
38
|
-
pointer-events: none;
|
|
39
|
-
}
|
|
40
|
-
`;
|
|
18
|
+
return css(["position:sticky;left:0;z-index:2;clip-path:inset(0 -8px 0 0);", " &::before{content:'';box-shadow:", ";position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;}"], type !== HEADER_TYPE.SUBHEADING && type !== HEADER_TYPE.HEADING ? `background-color: ${stickyBackgroundColor};` : undefined, cellStickyShadow);
|
|
41
19
|
};
|
|
42
|
-
const sharedStyles = css
|
|
43
|
-
${_ref2 => {
|
|
20
|
+
const sharedStyles = /*#__PURE__*/css(["", ""], _ref2 => {
|
|
44
21
|
let {
|
|
45
22
|
isSticky,
|
|
46
23
|
align,
|
|
@@ -54,37 +31,29 @@ const sharedStyles = css`
|
|
|
54
31
|
stickyBackgroundColor,
|
|
55
32
|
type
|
|
56
33
|
} = _ref2;
|
|
57
|
-
return css
|
|
58
|
-
text-align: ${align};
|
|
59
|
-
min-width: ${cellMinWidth}px;
|
|
60
|
-
padding: ${cellPaddingTop}px ${cellPaddingRight}px ${cellPaddingBottom}px ${cellPaddingLeft}px;
|
|
61
|
-
background-color: ${cellBackground};
|
|
62
|
-
${isSticky && stickyStyles({
|
|
34
|
+
return css(["text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;background-color:", ";", ";"], align, cellMinWidth, cellPaddingTop, cellPaddingRight, cellPaddingBottom, cellPaddingLeft, cellBackground, isSticky && stickyStyles({
|
|
63
35
|
type,
|
|
64
36
|
cellStickyShadow,
|
|
65
37
|
stickyBackgroundColor
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
box-shadow: ${_ref3 => {
|
|
38
|
+
}));
|
|
39
|
+
});
|
|
40
|
+
const createStyledCell = htmlElement => styled[htmlElement].withConfig({
|
|
41
|
+
displayName: "Cell__createStyledCell",
|
|
42
|
+
componentId: "components-web__sc-ltgfic-0"
|
|
43
|
+
})(["", ";box-shadow:", ";", ""], sharedStyles, _ref3 => {
|
|
73
44
|
let {
|
|
74
45
|
cellBoxShadowColor,
|
|
75
46
|
type
|
|
76
47
|
} = _ref3;
|
|
77
48
|
return type === HEADER_TYPE.HEADING ? `inset 0 1px 0 ${cellBoxShadowColor}, inset 0 -1px 0 ${cellBoxShadowColor}` : `inset 0 1px 0 ${cellBoxShadowColor}`;
|
|
78
|
-
}
|
|
79
|
-
${_ref4 => {
|
|
49
|
+
}, _ref4 => {
|
|
80
50
|
let {
|
|
81
51
|
display
|
|
82
52
|
} = _ref4;
|
|
83
53
|
return display && `*:not(:empty) {
|
|
84
54
|
display: ${display};
|
|
85
55
|
}`;
|
|
86
|
-
}
|
|
87
|
-
`;
|
|
56
|
+
});
|
|
88
57
|
const StyledHeaderCell = createStyledCell('th');
|
|
89
58
|
const StyledDataCell = createStyledCell('td');
|
|
90
59
|
const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
@@ -99,7 +68,8 @@ const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
99
68
|
text,
|
|
100
69
|
isScrollable: isTableScrollable,
|
|
101
70
|
tokens: tableTokens,
|
|
102
|
-
spacing
|
|
71
|
+
spacing,
|
|
72
|
+
variant
|
|
103
73
|
} = useTableContext();
|
|
104
74
|
const themeTokens = {
|
|
105
75
|
...tableTokens,
|
|
@@ -124,7 +94,8 @@ const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
124
94
|
} = useThemeTokens('Table', themeTokens, {
|
|
125
95
|
spacing,
|
|
126
96
|
type,
|
|
127
|
-
text
|
|
97
|
+
text,
|
|
98
|
+
...variant
|
|
128
99
|
});
|
|
129
100
|
const sharedProps = {
|
|
130
101
|
align,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { useTableContext } from './Table';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const StyledTR = /*#__PURE__*/styled.tr.withConfig({
|
|
7
|
+
displayName: "Row__StyledTR",
|
|
8
|
+
componentId: "components-web__sc-6pbb9a-0"
|
|
9
|
+
})(["&:hover{background-color:", " !important;}"], _ref => {
|
|
10
|
+
let {
|
|
11
|
+
rowHoverBackgroundColor
|
|
12
|
+
} = _ref;
|
|
13
|
+
return rowHoverBackgroundColor;
|
|
14
|
+
});
|
|
15
|
+
const Row = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
16
|
+
let {
|
|
17
|
+
children
|
|
18
|
+
} = _ref2;
|
|
19
|
+
const {
|
|
20
|
+
themeTokens
|
|
21
|
+
} = useTableContext();
|
|
22
|
+
return /*#__PURE__*/_jsx(StyledTR, {
|
|
23
|
+
ref: ref,
|
|
24
|
+
rowHoverBackgroundColor: themeTokens?.rowHoverBackgroundColor,
|
|
25
|
+
children: React.Children.map(children, (child, index) => /*#__PURE__*/React.cloneElement(child, {
|
|
26
|
+
isFirstInRow: index === 0
|
|
27
|
+
}))
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
Row.displayName = 'Row';
|
|
31
|
+
Row.propTypes = {
|
|
32
|
+
children: PropTypes.node
|
|
33
|
+
};
|
|
34
|
+
export default Row;
|
|
@@ -2,28 +2,24 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { selectSystemProps, useSafeLayoutEffect, useThemeTokens, getTokensPropType } from '@telus-uds/components-base';
|
|
4
4
|
import throttle from 'lodash.throttle';
|
|
5
|
-
import
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
import { htmlAttrs } from '../utils';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const {
|
|
8
|
-
styled
|
|
9
|
-
} = styledComponents;
|
|
10
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
11
|
-
const StyledContainer = styled.div
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const StyledTable = styled.table
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
const StyledContainer = /*#__PURE__*/styled.div.withConfig({
|
|
10
|
+
displayName: "Table__StyledContainer",
|
|
11
|
+
componentId: "components-web__sc-10d9q3m-0"
|
|
12
|
+
})(["overflow:auto;padding-bottom:", ";"], props => props.isScrollable ? `${props.tablePaddingBottom}px` : 0);
|
|
13
|
+
const StyledTable = /*#__PURE__*/styled.table.withConfig({
|
|
14
|
+
displayName: "Table__StyledTable",
|
|
15
|
+
componentId: "components-web__sc-10d9q3m-1"
|
|
16
|
+
})(["margin:0;padding:0;width:", ";border:", ";"], _ref => {
|
|
19
17
|
let {
|
|
20
18
|
fullWidth,
|
|
21
19
|
tableWidth
|
|
22
20
|
} = _ref;
|
|
23
21
|
return fullWidth ? '100%' : `${tableWidth}px`;
|
|
24
|
-
}};
|
|
25
|
-
border: ${props => `${props.borderWidth}px solid ${props.borderColor}`};
|
|
26
|
-
`;
|
|
22
|
+
}, props => `${props.borderWidth}px solid ${props.borderColor}`);
|
|
27
23
|
const TableContext = /*#__PURE__*/React.createContext({});
|
|
28
24
|
export const useTableContext = () => React.useContext(TableContext);
|
|
29
25
|
|
|
@@ -51,20 +47,20 @@ const Table = _ref2 => {
|
|
|
51
47
|
variant,
|
|
52
48
|
...rest
|
|
53
49
|
} = _ref2;
|
|
50
|
+
const themeTokens = useThemeTokens('Table', tokens, variant);
|
|
54
51
|
const {
|
|
55
52
|
tablePaddingBottom,
|
|
56
53
|
borderColor,
|
|
57
54
|
borderWidth
|
|
58
|
-
} =
|
|
55
|
+
} = themeTokens;
|
|
59
56
|
const containerRef = React.useRef();
|
|
60
57
|
const tableRef = React.useRef();
|
|
61
58
|
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
62
59
|
const [tableWidth, setTableWidth] = React.useState(0);
|
|
63
60
|
useSafeLayoutEffect(() => {
|
|
64
61
|
const updateDimensions = () => {
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
const responsiveTableWidth = fullWidth ? containerClientWidth : (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.clientWidth;
|
|
62
|
+
const containerClientWidth = containerRef.current?.clientWidth;
|
|
63
|
+
const responsiveTableWidth = fullWidth ? containerClientWidth : tableRef.current?.clientWidth;
|
|
68
64
|
setContainerWidth(containerClientWidth);
|
|
69
65
|
setTableWidth(responsiveTableWidth);
|
|
70
66
|
};
|
|
@@ -91,7 +87,9 @@ const Table = _ref2 => {
|
|
|
91
87
|
text,
|
|
92
88
|
isScrollable,
|
|
93
89
|
tokens,
|
|
94
|
-
spacing
|
|
90
|
+
spacing,
|
|
91
|
+
variant,
|
|
92
|
+
themeTokens
|
|
95
93
|
},
|
|
96
94
|
children: /*#__PURE__*/_jsx(StyledTable, {
|
|
97
95
|
borderColor: borderColor,
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ExpandCollapse as ExpandCollapseBase, IconButton, useThemeTokensCallback } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import styled from 'styled-components';
|
|
5
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
const {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const ExpandCollapseControl = /*#__PURE__*/styled.div.withConfig({
|
|
7
|
+
displayName: "ExpandCollapse__ExpandCollapseControl",
|
|
8
|
+
componentId: "components-web__sc-1l2mmq7-0"
|
|
9
|
+
})({
|
|
10
10
|
alignItems: 'center',
|
|
11
11
|
cursor: 'pointer',
|
|
12
12
|
display: 'flex',
|
|
13
13
|
flex: 1,
|
|
14
14
|
justifyContent: 'flex-start'
|
|
15
15
|
});
|
|
16
|
-
const ExpandCollapseIconContainer = styled.div(
|
|
16
|
+
const ExpandCollapseIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
17
|
+
displayName: "ExpandCollapse__ExpandCollapseIconContainer",
|
|
18
|
+
componentId: "components-web__sc-1l2mmq7-1"
|
|
19
|
+
})(_ref => {
|
|
17
20
|
let {
|
|
18
21
|
tokens
|
|
19
22
|
} = _ref;
|
|
@@ -25,7 +28,10 @@ const ExpandCollapseIconContainer = styled.div(_ref => {
|
|
|
25
28
|
width: tokens.expandIconContainerWidth
|
|
26
29
|
};
|
|
27
30
|
});
|
|
28
|
-
const ExpandCollapseTitle = styled.h4(
|
|
31
|
+
const ExpandCollapseTitle = /*#__PURE__*/styled.h4.withConfig({
|
|
32
|
+
displayName: "ExpandCollapse__ExpandCollapseTitle",
|
|
33
|
+
componentId: "components-web__sc-1l2mmq7-2"
|
|
34
|
+
})(_ref2 => {
|
|
29
35
|
let {
|
|
30
36
|
tokens
|
|
31
37
|
} = _ref2;
|
|
@@ -114,7 +120,8 @@ const ExpandCollapse = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
|
114
120
|
},
|
|
115
121
|
tokens: iconTokens,
|
|
116
122
|
focusable: false,
|
|
117
|
-
accessibilityLabel: label
|
|
123
|
+
accessibilityLabel: label,
|
|
124
|
+
accessibilityRole: "none"
|
|
118
125
|
})
|
|
119
126
|
}), /*#__PURE__*/_jsx(ExpandCollapseTitle, {
|
|
120
127
|
tokens: getTokens(),
|