@telus-uds/components-web 3.4.0 → 4.1.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/cjs/NavigationBar/collapseItems.js +43 -0
- package/lib/cjs/NavigationBar/index.js +11 -0
- package/lib/cjs/NavigationBar/resolveItemSelection.js +22 -0
- package/lib/cjs/OptimizeImage/OptimizeImage.js +99 -0
- package/lib/cjs/OptimizeImage/index.js +9 -0
- package/lib/cjs/OptimizeImage/utils/getFallbackUrl.js +14 -0
- package/lib/cjs/OptimizeImage/utils/getImageUrls.js +19 -0
- package/lib/cjs/OptimizeImage/utils/getOptimizedUrl.js +24 -0
- package/lib/cjs/OptimizeImage/utils/hasWebpSupport.js +34 -0
- package/lib/cjs/OptimizeImage/utils/index.js +34 -0
- package/lib/cjs/OptimizeImage/utils/isSvgUrl.js +9 -0
- package/lib/cjs/OrderedList/Item.js +151 -0
- package/lib/cjs/OrderedList/ItemBase.js +34 -0
- package/lib/cjs/OrderedList/OrderedList.js +92 -0
- package/lib/cjs/OrderedList/OrderedListBase.js +52 -0
- package/lib/cjs/OrderedList/constants.js +8 -0
- package/lib/cjs/OrderedList/index.js +11 -0
- package/lib/cjs/Paragraph/Paragraph.js +97 -0
- package/lib/cjs/Paragraph/index.js +9 -0
- package/lib/cjs/PreviewCard/AuthorDate.js +63 -0
- package/lib/cjs/PreviewCard/PreviewCard.js +215 -0
- package/lib/cjs/PreviewCard/index.js +9 -0
- package/lib/cjs/PriceLockup/PriceLockup.js +398 -0
- package/lib/cjs/PriceLockup/dictionary.js +18 -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 +196 -0
- package/lib/cjs/Table/Header.js +32 -0
- package/lib/cjs/Table/Row.js +74 -0
- package/lib/cjs/Table/SubHeading.js +30 -0
- package/lib/cjs/Table/Table.js +124 -0
- package/lib/cjs/Table/index.js +19 -0
- package/lib/cjs/TermsAndConditions/ExpandCollapse.js +160 -0
- package/lib/cjs/TermsAndConditions/TermsAndConditions.js +283 -0
- package/lib/cjs/TermsAndConditions/dictionary.js +22 -0
- package/lib/cjs/TermsAndConditions/index.js +13 -0
- package/lib/cjs/Testimonial/Testimonial.js +240 -0
- package/lib/cjs/Testimonial/index.js +9 -0
- package/lib/cjs/Toast/Toast.js +165 -0
- package/lib/cjs/Toast/index.js +9 -0
- package/lib/cjs/Video/ControlBar/ControlBar.js +294 -0
- package/lib/cjs/Video/ControlBar/Controls/VideoButton/VideoButton.js +76 -0
- package/lib/cjs/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +169 -0
- package/lib/cjs/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +211 -0
- package/lib/cjs/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +197 -0
- package/lib/cjs/Video/MiddleControlButton/MiddleControlButton.js +78 -0
- package/lib/cjs/Video/Video.js +964 -0
- package/lib/cjs/Video/index.js +9 -0
- package/lib/cjs/Video/videoText.js +61 -0
- package/lib/cjs/VideoPicker/VideoPicker.js +197 -0
- package/lib/cjs/VideoPicker/VideoPickerPlayer.js +54 -0
- package/lib/cjs/VideoPicker/VideoPickerThumbnail.js +223 -0
- package/lib/cjs/VideoPicker/VideoSlider.js +88 -0
- package/lib/cjs/VideoPicker/index.js +9 -0
- package/lib/cjs/VideoPicker/videoPropType.js +17 -0
- package/lib/cjs/WaffleGrid/WaffleGrid.js +164 -0
- package/lib/cjs/WaffleGrid/index.js +9 -0
- package/lib/cjs/WebVideo/WebVideo.js +197 -0
- package/lib/cjs/WebVideo/index.js +9 -0
- package/lib/cjs/WebVideo/utils/index.js +57 -0
- package/lib/cjs/baseExports.js +438 -0
- package/lib/cjs/index.js +317 -0
- package/lib/cjs/server.js +13 -0
- package/lib/cjs/shared/ConditionalWrapper/ConditionalWrapper.js +29 -0
- package/lib/cjs/shared/ConditionalWrapper/index.js +9 -0
- package/lib/cjs/shared/FullBleedContent/FullBleedContent.js +108 -0
- package/lib/cjs/shared/FullBleedContent/getFullBleedBorderRadius.js +61 -0
- package/lib/cjs/shared/FullBleedContent/index.js +23 -0
- package/lib/cjs/shared/FullBleedContent/useFullBleedContentProps.js +61 -0
- package/lib/cjs/shared/VideoSplash/SplashButton/SplashButton.js +91 -0
- package/lib/cjs/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +229 -0
- package/lib/cjs/shared/VideoSplash/VideoSplash.js +72 -0
- package/lib/cjs/shared/VideoSplash/helpers.js +32 -0
- package/lib/cjs/utils/index.js +88 -0
- package/lib/cjs/utils/isElementFocusable.js +14 -0
- package/lib/cjs/utils/logger.js +24 -0
- package/lib/cjs/utils/media.js +45 -0
- package/lib/cjs/utils/renderStructuredContent.js +71 -0
- package/lib/cjs/utils/scrollToAnchor.js +25 -0
- package/lib/cjs/utils/ssr.js +50 -0
- package/lib/cjs/utils/theming/get-theme-from-server.js +24 -0
- package/lib/cjs/utils/theming/with-client-theme.js +31 -0
- package/lib/cjs/utils/theming/with-server-theme.js +33 -0
- package/lib/cjs/utils/transforms.js +11 -0
- package/lib/cjs/utils/useOverlaidPosition.js +222 -0
- package/lib/cjs/utils/useTypographyTheme.js +30 -0
- package/lib/{Badge → esm/Badge}/Badge.js +11 -21
- package/lib/{BlockQuote → esm/BlockQuote}/BlockQuote.js +17 -31
- package/lib/{Breadcrumbs → esm/Breadcrumbs}/Breadcrumbs.js +6 -5
- package/lib/{Breadcrumbs → esm/Breadcrumbs}/Item/Item.js +10 -6
- package/lib/{Callout → esm/Callout}/Callout.js +6 -5
- package/lib/{Card → esm/Card}/Card.js +5 -5
- package/lib/{Card → esm/Card}/CardContent.js +6 -5
- package/lib/{Card → esm/Card}/CardFooter.js +6 -5
- package/lib/{Countdown → esm/Countdown}/Countdown.js +53 -32
- package/lib/{Countdown → esm/Countdown}/Segment.js +6 -6
- package/lib/{DatePicker → esm/DatePicker}/CalendarContainer.js +5 -5
- package/lib/{DatePicker → esm/DatePicker}/DatePicker.js +18 -12
- package/lib/esm/DatePicker/reactDatesCss.js +3 -0
- package/lib/{Disclaimer → esm/Disclaimer}/Disclaimer.js +6 -5
- package/lib/{Footnote → esm/Footnote}/Footnote.js +39 -15
- package/lib/{Footnote → esm/Footnote}/FootnoteLink.js +6 -5
- package/lib/{NavigationBar → esm/NavigationBar}/NavigationBar.js +6 -5
- package/lib/{NavigationBar → esm/NavigationBar}/NavigationItem.js +6 -5
- package/lib/{OrderedList → esm/OrderedList}/Item.js +10 -6
- package/lib/{OrderedList → esm/OrderedList}/ItemBase.js +5 -5
- package/lib/{OrderedList → esm/OrderedList}/OrderedList.js +6 -5
- package/lib/{OrderedList → esm/OrderedList}/OrderedListBase.js +5 -5
- package/lib/{Paragraph → esm/Paragraph}/Paragraph.js +8 -16
- package/lib/{PreviewCard → esm/PreviewCard}/PreviewCard.js +10 -7
- package/lib/{PriceLockup → esm/PriceLockup}/PriceLockup.js +103 -71
- package/lib/esm/PriceLockup/dictionary.js +12 -0
- package/lib/{Progress → esm/Progress}/ProgressBar.js +6 -6
- package/lib/esm/QuantitySelector/styles.js +9 -0
- package/lib/{Ribbon → esm/Ribbon}/Ribbon.js +31 -57
- package/lib/{Span → esm/Span}/Span.js +7 -6
- package/lib/{Spinner → esm/Spinner}/Spinner.js +18 -8
- package/lib/{Spinner → esm/Spinner}/SpinnerContent.js +6 -5
- package/lib/{StoryCard → esm/StoryCard}/StoryCard.js +10 -7
- package/lib/{Table → esm/Table}/Cell.js +25 -45
- package/lib/esm/Table/Row.js +67 -0
- package/lib/{Table → esm/Table}/Table.js +16 -17
- package/lib/{TermsAndConditions → esm/TermsAndConditions}/ExpandCollapse.js +13 -7
- package/lib/{TermsAndConditions → esm/TermsAndConditions}/TermsAndConditions.js +22 -9
- package/lib/{Testimonial → esm/Testimonial}/Testimonial.js +26 -10
- package/lib/{Toast → esm/Toast}/Toast.js +13 -64
- package/lib/{Video → esm/Video}/ControlBar/ControlBar.js +18 -8
- package/lib/{Video → esm/Video}/ControlBar/Controls/VideoButton/VideoButton.js +6 -5
- package/lib/{Video → esm/Video}/ControlBar/Controls/VideoMenu/VideoMenu.js +14 -7
- package/lib/{Video → esm/Video}/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +14 -7
- package/lib/{Video → esm/Video}/ControlBar/Controls/VolumeSlider/VolumeSlider.js +10 -6
- package/lib/{Video → esm/Video}/MiddleControlButton/MiddleControlButton.js +6 -5
- package/lib/{Video → esm/Video}/Video.js +26 -10
- package/lib/{VideoPicker → esm/VideoPicker}/VideoPicker.js +20 -44
- package/lib/{VideoPicker → esm/VideoPicker}/VideoPickerThumbnail.js +18 -52
- package/lib/{WaffleGrid → esm/WaffleGrid}/WaffleGrid.js +14 -7
- package/lib/{WebVideo → esm/WebVideo}/WebVideo.js +14 -9
- package/lib/{index.js → esm/index.js} +1 -1
- package/lib/{shared → esm/shared}/FullBleedContent/FullBleedContent.js +5 -5
- package/lib/{shared → esm/shared}/VideoSplash/SplashButton/SplashButton.js +9 -6
- package/lib/{shared → esm/shared}/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +17 -8
- package/lib/{shared → esm/shared}/VideoSplash/VideoSplash.js +6 -5
- package/lib/{utils → esm/utils}/index.js +1 -2
- package/lib/{utils → esm/utils}/ssr.js +1 -4
- package/package.json +17 -16
- package/src/Badge/Badge.jsx +2 -3
- package/src/BlockQuote/BlockQuote.jsx +2 -3
- package/src/Breadcrumbs/Breadcrumbs.jsx +2 -3
- package/src/Breadcrumbs/Item/Item.jsx +2 -3
- package/src/Callout/Callout.jsx +2 -4
- package/src/Card/Card.jsx +1 -3
- package/src/Card/CardContent.jsx +2 -3
- package/src/Card/CardFooter.jsx +2 -3
- package/src/Countdown/Countdown.jsx +62 -36
- package/src/Countdown/Segment.jsx +1 -3
- package/src/DatePicker/CalendarContainer.jsx +1 -3
- package/src/DatePicker/DatePicker.jsx +2 -3
- package/src/DatePicker/reactDatesCss.js +1 -3
- package/src/Disclaimer/Disclaimer.jsx +2 -3
- package/src/Footnote/Footnote.jsx +2 -10
- package/src/Footnote/FootnoteLink.jsx +2 -3
- package/src/NavigationBar/NavigationBar.jsx +2 -3
- package/src/NavigationBar/NavigationItem.jsx +2 -3
- package/src/OrderedList/Item.jsx +2 -3
- package/src/OrderedList/ItemBase.jsx +1 -3
- package/src/OrderedList/OrderedList.jsx +2 -3
- package/src/OrderedList/OrderedListBase.jsx +1 -3
- package/src/Paragraph/Paragraph.jsx +2 -4
- package/src/PreviewCard/PreviewCard.jsx +1 -3
- package/src/PriceLockup/PriceLockup.jsx +59 -10
- package/src/PriceLockup/dictionary.js +12 -0
- 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 +17 -5
- package/src/Table/Row.jsx +27 -3
- package/src/Table/Table.jsx +14 -5
- package/src/TermsAndConditions/ExpandCollapse.jsx +1 -3
- package/src/TermsAndConditions/TermsAndConditions.jsx +2 -3
- package/src/Testimonial/Testimonial.jsx +2 -3
- package/src/Toast/Toast.jsx +2 -3
- package/src/Video/ControlBar/ControlBar.jsx +2 -4
- package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +2 -4
- package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +2 -4
- package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +2 -4
- package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +2 -4
- package/src/Video/MiddleControlButton/MiddleControlButton.jsx +2 -4
- package/src/Video/Video.jsx +2 -4
- package/src/VideoPicker/VideoPicker.jsx +2 -4
- package/src/VideoPicker/VideoPickerThumbnail.jsx +1 -3
- package/src/WaffleGrid/WaffleGrid.jsx +2 -3
- package/src/WebVideo/WebVideo.jsx +3 -4
- package/src/index.js +1 -1
- package/src/shared/FullBleedContent/FullBleedContent.jsx +1 -3
- package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +1 -3
- package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +1 -4
- package/src/shared/VideoSplash/VideoSplash.jsx +2 -3
- package/src/utils/index.js +1 -3
- package/src/utils/ssr.js +1 -2
- package/types/Listbox.d.ts +67 -0
- package/types/index.d.ts +3 -0
- package/lib/DatePicker/reactDatesCss.js +0 -830
- package/lib/QuantitySelector/styles.js +0 -18
- package/lib/Table/Row.js +0 -19
- package/lib/utils/theming/styled-components.js +0 -26
- package/src/utils/theming/styled-components.js +0 -23
- /package/lib/{Badge → esm/Badge}/index.js +0 -0
- /package/lib/{BlockQuote → esm/BlockQuote}/index.js +0 -0
- /package/lib/{Breadcrumbs → esm/Breadcrumbs}/index.js +0 -0
- /package/lib/{Callout → esm/Callout}/index.js +0 -0
- /package/lib/{Card → esm/Card}/index.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/constants.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/dictionary.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/index.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/types.js +0 -0
- /package/lib/{Countdown → esm/Countdown}/useCountdown.js +0 -0
- /package/lib/{DatePicker → esm/DatePicker}/dictionary.js +0 -0
- /package/lib/{DatePicker → esm/DatePicker}/index.js +0 -0
- /package/lib/{Disclaimer → esm/Disclaimer}/index.js +0 -0
- /package/lib/{Footnote → esm/Footnote}/dictionary.js +0 -0
- /package/lib/{Footnote → esm/Footnote}/index.js +0 -0
- /package/lib/{IconButton → esm/IconButton}/IconButton.js +0 -0
- /package/lib/{IconButton → esm/IconButton}/index.js +0 -0
- /package/lib/{Image → esm/Image}/Image.js +0 -0
- /package/lib/{Image → esm/Image}/index.js +0 -0
- /package/lib/{Image → esm/Image}/server.js +0 -0
- /package/lib/{List → esm/List}/List.js +0 -0
- /package/lib/{List → esm/List}/ListItem.js +0 -0
- /package/lib/{List → esm/List}/index.js +0 -0
- /package/lib/{NavigationBar → esm/NavigationBar}/NavigationSubMenu.js +0 -0
- /package/lib/{NavigationBar → esm/NavigationBar}/collapseItems.js +0 -0
- /package/lib/{NavigationBar → esm/NavigationBar}/index.js +0 -0
- /package/lib/{NavigationBar → esm/NavigationBar}/resolveItemSelection.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/OptimizeImage.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/index.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/getFallbackUrl.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/getImageUrls.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/getOptimizedUrl.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/hasWebpSupport.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/index.js +0 -0
- /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/isSvgUrl.js +0 -0
- /package/lib/{OrderedList → esm/OrderedList}/constants.js +0 -0
- /package/lib/{OrderedList → esm/OrderedList}/index.js +0 -0
- /package/lib/{Paragraph → esm/Paragraph}/index.js +0 -0
- /package/lib/{PreviewCard → esm/PreviewCard}/AuthorDate.js +0 -0
- /package/lib/{PreviewCard → esm/PreviewCard}/index.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/index.js +0 -0
- /package/lib/{PriceLockup → esm/PriceLockup}/tokens.js +0 -0
- /package/lib/{Progress → esm/Progress}/index.js +0 -0
- /package/lib/{QuantitySelector → esm/QuantitySelector}/QuantitySelector.js +0 -0
- /package/lib/{QuantitySelector → esm/QuantitySelector}/SideButton.js +0 -0
- /package/lib/{QuantitySelector → esm/QuantitySelector}/dictionary.js +0 -0
- /package/lib/{QuantitySelector → esm/QuantitySelector}/index.js +0 -0
- /package/lib/{ResponsiveImage → esm/ResponsiveImage}/ResponsiveImage.js +0 -0
- /package/lib/{ResponsiveImage → esm/ResponsiveImage}/index.js +0 -0
- /package/lib/{Ribbon → esm/Ribbon}/index.js +0 -0
- /package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonImage.js +0 -0
- /package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonProvider.js +0 -0
- /package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonTypography.js +0 -0
- /package/lib/{SkeletonProvider → esm/SkeletonProvider}/index.js +0 -0
- /package/lib/{Span → esm/Span}/index.js +0 -0
- /package/lib/{Spinner → esm/Spinner}/constants.js +0 -0
- /package/lib/{Spinner → esm/Spinner}/index.js +0 -0
- /package/lib/{StoryCard → esm/StoryCard}/index.js +0 -0
- /package/lib/{Table → esm/Table}/Body.js +0 -0
- /package/lib/{Table → esm/Table}/Header.js +0 -0
- /package/lib/{Table → esm/Table}/SubHeading.js +0 -0
- /package/lib/{Table → esm/Table}/index.js +0 -0
- /package/lib/{TermsAndConditions → esm/TermsAndConditions}/dictionary.js +0 -0
- /package/lib/{TermsAndConditions → esm/TermsAndConditions}/index.js +0 -0
- /package/lib/{Testimonial → esm/Testimonial}/index.js +0 -0
- /package/lib/{Toast → esm/Toast}/index.js +0 -0
- /package/lib/{Video → esm/Video}/index.js +0 -0
- /package/lib/{Video → esm/Video}/videoText.js +0 -0
- /package/lib/{VideoPicker → esm/VideoPicker}/VideoPickerPlayer.js +0 -0
- /package/lib/{VideoPicker → esm/VideoPicker}/VideoSlider.js +0 -0
- /package/lib/{VideoPicker → esm/VideoPicker}/index.js +0 -0
- /package/lib/{VideoPicker → esm/VideoPicker}/videoPropType.js +0 -0
- /package/lib/{WaffleGrid → esm/WaffleGrid}/index.js +0 -0
- /package/lib/{WebVideo → esm/WebVideo}/index.js +0 -0
- /package/lib/{WebVideo → esm/WebVideo}/utils/index.js +0 -0
- /package/lib/{baseExports.js → esm/baseExports.js} +0 -0
- /package/lib/{server.js → esm/server.js} +0 -0
- /package/lib/{shared → esm/shared}/ConditionalWrapper/ConditionalWrapper.js +0 -0
- /package/lib/{shared → esm/shared}/ConditionalWrapper/index.js +0 -0
- /package/lib/{shared → esm/shared}/FullBleedContent/getFullBleedBorderRadius.js +0 -0
- /package/lib/{shared → esm/shared}/FullBleedContent/index.js +0 -0
- /package/lib/{shared → esm/shared}/FullBleedContent/useFullBleedContentProps.js +0 -0
- /package/lib/{shared → esm/shared}/VideoSplash/helpers.js +0 -0
- /package/lib/{utils → esm/utils}/isElementFocusable.js +0 -0
- /package/lib/{utils → esm/utils}/logger.js +0 -0
- /package/lib/{utils → esm/utils}/media.js +0 -0
- /package/lib/{utils → esm/utils}/renderStructuredContent.js +0 -0
- /package/lib/{utils → esm/utils}/scrollToAnchor.js +0 -0
- /package/lib/{utils → esm/utils}/theming/get-theme-from-server.js +0 -0
- /package/lib/{utils → esm/utils}/theming/with-client-theme.js +0 -0
- /package/lib/{utils → esm/utils}/theming/with-server-theme.js +0 -0
- /package/lib/{utils → esm/utils}/transforms.js +0 -0
- /package/lib/{utils → esm/utils}/useOverlaidPosition.js +0 -0
- /package/lib/{utils → esm/utils}/useTypographyTheme.js +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { getTokensPropType, selectSystemProps } from '@telus-uds/components-base'
|
|
4
|
-
|
|
5
|
-
import { htmlAttrs, useTypographyTheme
|
|
6
|
-
|
|
7
|
-
const { styled } = styledComponents
|
|
4
|
+
import styled from 'styled-components'
|
|
5
|
+
import { htmlAttrs, useTypographyTheme } from '../utils'
|
|
8
6
|
|
|
9
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
10
8
|
|
|
@@ -17,15 +17,13 @@ import {
|
|
|
17
17
|
useTheme,
|
|
18
18
|
getTokensPropType
|
|
19
19
|
} from '@telus-uds/components-base'
|
|
20
|
-
import
|
|
20
|
+
import styled from 'styled-components'
|
|
21
21
|
import FullBleedContent, {
|
|
22
22
|
getFullBleedBorderRadius,
|
|
23
23
|
useFullBleedContentProps
|
|
24
24
|
} from '../shared/FullBleedContent'
|
|
25
25
|
import AuthorDate from './AuthorDate'
|
|
26
26
|
|
|
27
|
-
const { styled } = styledComponents
|
|
28
|
-
|
|
29
27
|
// Passes React Native-oriented system props through UDS PressableCardBase
|
|
30
28
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([
|
|
31
29
|
a11yProps,
|
|
@@ -7,15 +7,16 @@ import {
|
|
|
7
7
|
Typography,
|
|
8
8
|
useThemeTokens,
|
|
9
9
|
useViewport,
|
|
10
|
-
getTokensPropType
|
|
10
|
+
getTokensPropType,
|
|
11
|
+
a11yProps
|
|
11
12
|
} from '@telus-uds/components-base'
|
|
13
|
+
import styled from 'styled-components'
|
|
12
14
|
import FootnoteLink from '../Footnote/FootnoteLink'
|
|
13
15
|
import getTypographyTokens from './tokens'
|
|
14
|
-
import { htmlAttrs, warn
|
|
16
|
+
import { htmlAttrs, warn } from '../utils'
|
|
17
|
+
import defaultDictionary from './dictionary'
|
|
15
18
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
19
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs, a11yProps])
|
|
19
20
|
|
|
20
21
|
const PriceLockupContainer = styled.div`
|
|
21
22
|
align-items: ${({ alignItemsText }) => alignItemsText};
|
|
@@ -23,12 +24,12 @@ const PriceLockupContainer = styled.div`
|
|
|
23
24
|
flex-direction: column;
|
|
24
25
|
width: fit-content;
|
|
25
26
|
`
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
const PriceContainer = styled.div.attrs({
|
|
28
|
+
'aria-hidden': 'true'
|
|
29
|
+
})`
|
|
28
30
|
display: flex;
|
|
29
31
|
margin-bottom: ${({ priceMarginBottom }) => priceMarginBottom};
|
|
30
32
|
`
|
|
31
|
-
|
|
32
33
|
const FootnoteContainer = styled.div`
|
|
33
34
|
display: flex;
|
|
34
35
|
margin-top: ${({ footnoteMarginTop }) => footnoteMarginTop};
|
|
@@ -44,7 +45,9 @@ const BottomLinksContainer = styled.div`
|
|
|
44
45
|
margin-left: ${({ bottomLinksMarginLeft }) => bottomLinksMarginLeft};
|
|
45
46
|
`
|
|
46
47
|
|
|
47
|
-
const TopTextContainer = styled.div
|
|
48
|
+
const TopTextContainer = styled.div.attrs({
|
|
49
|
+
'aria-hidden': 'true'
|
|
50
|
+
})`
|
|
48
51
|
margin-bottom: ${({ topTextMarginBottom }) => topTextMarginBottom};
|
|
49
52
|
`
|
|
50
53
|
|
|
@@ -120,6 +123,8 @@ const PriceLockup = React.forwardRef(
|
|
|
120
123
|
a11yText,
|
|
121
124
|
tokens: priceLockupTokens,
|
|
122
125
|
variant = {},
|
|
126
|
+
copy = 'en',
|
|
127
|
+
dictionary = defaultDictionary,
|
|
123
128
|
...rest
|
|
124
129
|
},
|
|
125
130
|
ref
|
|
@@ -246,8 +251,35 @@ const PriceLockup = React.forwardRef(
|
|
|
246
251
|
warn('PriceLockup', 'a11yText must be provided with strikethrough pricing')
|
|
247
252
|
}
|
|
248
253
|
|
|
254
|
+
const getAriaContent = () => {
|
|
255
|
+
const { dictionaryPrice = price, priceWithCents, rate } = dictionary[copy]
|
|
256
|
+
let ariaLabel = hasCents
|
|
257
|
+
? priceWithCents
|
|
258
|
+
.replace('%{amount}', amount)
|
|
259
|
+
.replace('%{cents}', cents)
|
|
260
|
+
.replace('%{currency}', currencySymbol)
|
|
261
|
+
: dictionaryPrice.replace('%{amount}', amount).replace('%{currency}', currencySymbol)
|
|
262
|
+
|
|
263
|
+
if (!ariaLabel.includes(currencySymbol)) {
|
|
264
|
+
ariaLabel = `${ariaLabel} ${currencySymbol}`
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
if (rateText) {
|
|
268
|
+
ariaLabel += ` ${rate.replace('%{rateText}', rateText.replace('/', ''))}`
|
|
269
|
+
}
|
|
270
|
+
return ariaLabel
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const ariaLabel = selectProps(rest)['aria-label'] ?? getAriaContent()
|
|
274
|
+
|
|
249
275
|
return (
|
|
250
|
-
<PriceLockupContainer
|
|
276
|
+
<PriceLockupContainer
|
|
277
|
+
{...selectProps(rest)}
|
|
278
|
+
alignItemsText={alignItemsText}
|
|
279
|
+
ref={ref}
|
|
280
|
+
role="group"
|
|
281
|
+
aria-label={ariaLabel}
|
|
282
|
+
>
|
|
251
283
|
{topText && (
|
|
252
284
|
<TopTextContainer topTextMarginBottom={`${topTextMarginBottom}px`}>
|
|
253
285
|
{renderTypography(topText, typographyTokens.topText)}
|
|
@@ -269,6 +301,13 @@ const PriceLockup = React.forwardRef(
|
|
|
269
301
|
|
|
270
302
|
PriceLockup.displayName = 'PriceLockup'
|
|
271
303
|
|
|
304
|
+
// If a language dictionary entry is provided, it must contain every key
|
|
305
|
+
const dictionaryContentShape = PropTypes.shape({
|
|
306
|
+
price: PropTypes.string.isRequired,
|
|
307
|
+
priceWithCents: PropTypes.string.isRequired,
|
|
308
|
+
rate: PropTypes.string.isRequired
|
|
309
|
+
})
|
|
310
|
+
|
|
272
311
|
PriceLockup.propTypes = {
|
|
273
312
|
...selectedSystemPropTypes,
|
|
274
313
|
/**
|
|
@@ -323,6 +362,16 @@ PriceLockup.propTypes = {
|
|
|
323
362
|
* **Note:** a11yText will override strikethrough price, so it must include price (ie. "was 50 dollars per month")
|
|
324
363
|
*/
|
|
325
364
|
a11yText: PropTypes.string,
|
|
365
|
+
/**
|
|
366
|
+
* Select English or French copy for the accessible label.
|
|
367
|
+
*/
|
|
368
|
+
copy: PropTypes.oneOf(['en', 'fr']),
|
|
369
|
+
/* Custom dictionary containing the labels
|
|
370
|
+
*/
|
|
371
|
+
dictionary: PropTypes.shape({
|
|
372
|
+
en: dictionaryContentShape,
|
|
373
|
+
fr: dictionaryContentShape
|
|
374
|
+
}),
|
|
326
375
|
/**
|
|
327
376
|
* `PriceLockup` tokens
|
|
328
377
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
en: {
|
|
3
|
+
price: '%{amount} %{currency}',
|
|
4
|
+
priceWithCents: '%{amount} %{currency} and %{cents} cents',
|
|
5
|
+
rate: 'per %{rateText}'
|
|
6
|
+
},
|
|
7
|
+
fr: {
|
|
8
|
+
price: '%{amount} %{currency}',
|
|
9
|
+
priceWithCents: '%{amount} %{currency} et %{cents} centimes',
|
|
10
|
+
rate: 'par %{rateText}'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -10,9 +10,7 @@ import {
|
|
|
10
10
|
variantProp,
|
|
11
11
|
applyShadowToken
|
|
12
12
|
} from '@telus-uds/components-base'
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
const { styled } = styledComponents
|
|
13
|
+
import styled from 'styled-components'
|
|
16
14
|
|
|
17
15
|
// Passes React Native-oriented system props through UDS Progress
|
|
18
16
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps])
|
package/src/Ribbon/Ribbon.jsx
CHANGED
|
@@ -6,9 +6,8 @@ import {
|
|
|
6
6
|
useThemeTokens,
|
|
7
7
|
getTokensPropType
|
|
8
8
|
} from '@telus-uds/components-base'
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
const { styled } = styledComponents
|
|
9
|
+
import styled from 'styled-components'
|
|
10
|
+
import { htmlAttrs } from '../utils'
|
|
12
11
|
|
|
13
12
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
14
13
|
|
package/src/Span/Span.jsx
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { getTokensPropType, selectSystemProps } from '@telus-uds/components-base'
|
|
4
|
-
|
|
5
|
-
import { htmlAttrs, useTypographyTheme
|
|
6
|
-
|
|
7
|
-
const { styled } = styledComponents
|
|
4
|
+
import styled from 'styled-components'
|
|
5
|
+
import { htmlAttrs, useTypographyTheme } from '../utils'
|
|
8
6
|
|
|
9
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
10
8
|
|
package/src/Spinner/Spinner.jsx
CHANGED
|
@@ -7,12 +7,11 @@ import {
|
|
|
7
7
|
getTokensPropType
|
|
8
8
|
} from '@telus-uds/components-base'
|
|
9
9
|
import { Portal } from '@gorhom/portal'
|
|
10
|
+
import styled from 'styled-components'
|
|
10
11
|
import SpinnerContent from './SpinnerContent'
|
|
11
|
-
import { htmlAttrs, media
|
|
12
|
+
import { htmlAttrs, media } from '../utils'
|
|
12
13
|
import { BACKDROP_OPACITY, BACKDROP_Z_INDEX } from './constants'
|
|
13
14
|
|
|
14
|
-
const { styled } = styledComponents
|
|
15
|
-
|
|
16
15
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
17
16
|
|
|
18
17
|
const SpinnerContainer = styled.div(({ inline, fullScreen }) => ({
|
|
@@ -6,11 +6,10 @@ import {
|
|
|
6
6
|
Typography,
|
|
7
7
|
selectSystemProps
|
|
8
8
|
} from '@telus-uds/components-base'
|
|
9
|
-
import
|
|
9
|
+
import styled from 'styled-components'
|
|
10
|
+
import { htmlAttrs } from '../utils'
|
|
10
11
|
import { BACKDROP_Z_INDEX, LARGE } from './constants'
|
|
11
12
|
|
|
12
|
-
const { styled } = styledComponents
|
|
13
|
-
|
|
14
13
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
15
14
|
|
|
16
15
|
const Container = styled.div(({ overlay }) => ({
|
|
@@ -18,14 +18,12 @@ import {
|
|
|
18
18
|
useThemeTokensCallback,
|
|
19
19
|
getTokensPropType
|
|
20
20
|
} from '@telus-uds/components-base'
|
|
21
|
-
import
|
|
21
|
+
import styled from 'styled-components'
|
|
22
22
|
import FullBleedContent, {
|
|
23
23
|
getFullBleedBorderRadius,
|
|
24
24
|
useFullBleedContentProps
|
|
25
25
|
} from '../shared/FullBleedContent'
|
|
26
26
|
|
|
27
|
-
const { styled } = styledComponents
|
|
28
|
-
|
|
29
27
|
// Passes React Native-oriented system props through UDS PressableCardBase
|
|
30
28
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([
|
|
31
29
|
a11yProps,
|
package/src/Table/Cell.jsx
CHANGED
|
@@ -1,11 +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
|
|
|
7
|
-
const { styled, css } = styledComponents
|
|
8
|
-
|
|
9
7
|
const HEADER_TYPE = {
|
|
10
8
|
HEADING: 'heading',
|
|
11
9
|
SUBHEADING: 'subHeading',
|
|
@@ -41,6 +39,9 @@ const sharedStyles = css`
|
|
|
41
39
|
cellPaddingRight,
|
|
42
40
|
cellPaddingBottom,
|
|
43
41
|
cellPaddingLeft,
|
|
42
|
+
cellBorderWidth,
|
|
43
|
+
cellBorderColor,
|
|
44
|
+
cellBorderTopWidth,
|
|
44
45
|
cellMinWidth,
|
|
45
46
|
cellBackground,
|
|
46
47
|
cellStickyShadow,
|
|
@@ -52,6 +53,10 @@ const sharedStyles = css`
|
|
|
52
53
|
padding: ${cellPaddingTop}px ${cellPaddingRight}px ${cellPaddingBottom}px ${cellPaddingLeft}px;
|
|
53
54
|
background-color: ${cellBackground};
|
|
54
55
|
${isSticky && stickyStyles({ type, cellStickyShadow, stickyBackgroundColor })};
|
|
56
|
+
border-style: ${cellBorderWidth || cellBorderTopWidth ? 'solid' : 'none'};
|
|
57
|
+
border-color: ${cellBorderColor};
|
|
58
|
+
border-width: ${cellBorderWidth};
|
|
59
|
+
border-top-width: ${cellBorderTopWidth || cellBorderWidth};
|
|
55
60
|
`}
|
|
56
61
|
`
|
|
57
62
|
const createStyledCell = (htmlElement) => styled[htmlElement]`
|
|
@@ -76,7 +81,8 @@ const Cell = React.forwardRef(
|
|
|
76
81
|
text,
|
|
77
82
|
isScrollable: isTableScrollable,
|
|
78
83
|
tokens: tableTokens,
|
|
79
|
-
spacing
|
|
84
|
+
spacing,
|
|
85
|
+
variant
|
|
80
86
|
} = useTableContext()
|
|
81
87
|
const themeTokens = { ...tableTokens, ...cellTokens }
|
|
82
88
|
|
|
@@ -89,6 +95,9 @@ const Cell = React.forwardRef(
|
|
|
89
95
|
cellPaddingRight,
|
|
90
96
|
cellPaddingLeft,
|
|
91
97
|
cellPaddingBottom,
|
|
98
|
+
cellBorderWidth,
|
|
99
|
+
cellBorderColor,
|
|
100
|
+
cellBorderTopWidth,
|
|
92
101
|
fontName,
|
|
93
102
|
fontWeight,
|
|
94
103
|
fontSize,
|
|
@@ -96,7 +105,7 @@ const Cell = React.forwardRef(
|
|
|
96
105
|
stickyBackgroundColor,
|
|
97
106
|
fontColor,
|
|
98
107
|
display
|
|
99
|
-
} = useThemeTokens('Table', themeTokens, { spacing, type, text })
|
|
108
|
+
} = useThemeTokens('Table', themeTokens, { spacing, type, text, ...variant })
|
|
100
109
|
|
|
101
110
|
const sharedProps = {
|
|
102
111
|
align,
|
|
@@ -108,6 +117,9 @@ const Cell = React.forwardRef(
|
|
|
108
117
|
cellPaddingRight,
|
|
109
118
|
cellPaddingLeft,
|
|
110
119
|
cellPaddingBottom,
|
|
120
|
+
cellBorderWidth,
|
|
121
|
+
cellBorderColor,
|
|
122
|
+
cellBorderTopWidth,
|
|
111
123
|
stickyBackgroundColor,
|
|
112
124
|
cellBoxShadowColor,
|
|
113
125
|
display,
|
package/src/Table/Row.jsx
CHANGED
|
@@ -1,19 +1,43 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
+
import styled from 'styled-components'
|
|
4
|
+
import { useTableContext } from './Table'
|
|
5
|
+
|
|
6
|
+
const StyledTR = styled.tr`
|
|
7
|
+
&:hover {
|
|
8
|
+
background-color: ${({ tokens }) => tokens?.rowHoverBackgroundColor} !important;
|
|
9
|
+
}
|
|
10
|
+
border-style: ${({ tokens }) =>
|
|
11
|
+
tokens?.rowBorderWidth || tokens?.rowBorderTopWidth ? 'solid' : 'none'};
|
|
12
|
+
border-color: ${({ tokens }) => tokens?.rowBorderColor};
|
|
13
|
+
border-width: ${({ tokens }) => tokens?.rowBorderWidth || '0px'};
|
|
14
|
+
border-top-width: ${({ tokens }) => tokens?.rowBorderTopWidth || tokens?.rowBorderWidth};
|
|
15
|
+
`
|
|
16
|
+
|
|
17
|
+
const Row = React.forwardRef(({ children, tokens: rowTokens }, ref) => {
|
|
18
|
+
const { themeTokens } = useTableContext()
|
|
19
|
+
const mergedTokens = { ...themeTokens, ...rowTokens }
|
|
3
20
|
|
|
4
|
-
const Row = React.forwardRef(({ children }, ref) => {
|
|
5
21
|
return (
|
|
6
|
-
<
|
|
22
|
+
<StyledTR ref={ref} tokens={mergedTokens}>
|
|
7
23
|
{React.Children.map(children, (child, index) =>
|
|
8
24
|
React.cloneElement(child, { isFirstInRow: index === 0 })
|
|
9
25
|
)}
|
|
10
|
-
</
|
|
26
|
+
</StyledTR>
|
|
11
27
|
)
|
|
12
28
|
})
|
|
13
29
|
|
|
14
30
|
Row.displayName = 'Row'
|
|
15
31
|
|
|
16
32
|
Row.propTypes = {
|
|
33
|
+
tokens: PropTypes.shape({
|
|
34
|
+
borderColor: PropTypes.string,
|
|
35
|
+
topBorderWidth: PropTypes.string,
|
|
36
|
+
bottomBorderWidth: PropTypes.string,
|
|
37
|
+
leftBorderWidth: PropTypes.string,
|
|
38
|
+
rightBorderWidth: PropTypes.string,
|
|
39
|
+
rowHoverBackgroundColor: PropTypes.string
|
|
40
|
+
}),
|
|
17
41
|
children: PropTypes.node
|
|
18
42
|
}
|
|
19
43
|
|
package/src/Table/Table.jsx
CHANGED
|
@@ -7,9 +7,8 @@ import {
|
|
|
7
7
|
getTokensPropType
|
|
8
8
|
} from '@telus-uds/components-base'
|
|
9
9
|
import throttle from 'lodash.throttle'
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
const { styled } = styledComponents
|
|
10
|
+
import styled from 'styled-components'
|
|
11
|
+
import { htmlAttrs } from '../utils'
|
|
13
12
|
|
|
14
13
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
15
14
|
|
|
@@ -52,7 +51,8 @@ const Table = ({
|
|
|
52
51
|
variant,
|
|
53
52
|
...rest
|
|
54
53
|
}) => {
|
|
55
|
-
const
|
|
54
|
+
const themeTokens = useThemeTokens('Table', tokens, variant)
|
|
55
|
+
const { tablePaddingBottom, borderColor, borderWidth } = themeTokens
|
|
56
56
|
const containerRef = React.useRef()
|
|
57
57
|
const tableRef = React.useRef()
|
|
58
58
|
|
|
@@ -88,7 +88,16 @@ const Table = ({
|
|
|
88
88
|
isScrollable={isScrollable}
|
|
89
89
|
tablePaddingBottom={tablePaddingBottom}
|
|
90
90
|
>
|
|
91
|
-
<TableContext.Provider
|
|
91
|
+
<TableContext.Provider
|
|
92
|
+
value={{
|
|
93
|
+
text,
|
|
94
|
+
isScrollable,
|
|
95
|
+
tokens,
|
|
96
|
+
spacing,
|
|
97
|
+
variant,
|
|
98
|
+
themeTokens
|
|
99
|
+
}}
|
|
100
|
+
>
|
|
92
101
|
<StyledTable
|
|
93
102
|
borderColor={borderColor}
|
|
94
103
|
borderWidth={borderWidth}
|
|
@@ -5,9 +5,7 @@ import {
|
|
|
5
5
|
IconButton,
|
|
6
6
|
useThemeTokensCallback
|
|
7
7
|
} from '@telus-uds/components-base'
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const { styled } = styledComponents
|
|
8
|
+
import styled from 'styled-components'
|
|
11
9
|
|
|
12
10
|
const ExpandCollapseControl = styled.div({
|
|
13
11
|
alignItems: 'center',
|
|
@@ -14,13 +14,12 @@ import {
|
|
|
14
14
|
createMediaQueryStyles,
|
|
15
15
|
StyleSheet
|
|
16
16
|
} from '@telus-uds/components-base'
|
|
17
|
+
import styled from 'styled-components'
|
|
17
18
|
import ExpandCollapse from './ExpandCollapse'
|
|
18
19
|
import OrderedListBase from '../OrderedList/OrderedListBase'
|
|
19
|
-
import { htmlAttrs, media, renderStructuredContent
|
|
20
|
+
import { htmlAttrs, media, renderStructuredContent } from '../utils'
|
|
20
21
|
import defaultDictionary from './dictionary'
|
|
21
22
|
|
|
22
|
-
const { styled } = styledComponents
|
|
23
|
-
|
|
24
23
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
25
24
|
|
|
26
25
|
const ContentContainer = styled.div(({ tokens }) => ({
|
|
@@ -8,10 +8,9 @@ import {
|
|
|
8
8
|
useViewport,
|
|
9
9
|
getTokensPropType
|
|
10
10
|
} from '@telus-uds/components-base'
|
|
11
|
+
import styled from 'styled-components'
|
|
11
12
|
import Image from '../Image'
|
|
12
|
-
import { htmlAttrs
|
|
13
|
-
|
|
14
|
-
const { styled } = styledComponents
|
|
13
|
+
import { htmlAttrs } from '../utils'
|
|
15
14
|
|
|
16
15
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
17
16
|
|
package/src/Toast/Toast.jsx
CHANGED
|
@@ -10,9 +10,8 @@ import {
|
|
|
10
10
|
useViewport,
|
|
11
11
|
getTokensPropType
|
|
12
12
|
} from '@telus-uds/components-base'
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
const { styled, css, keyframes } = styledComponents
|
|
13
|
+
import styled, { css, keyframes } from 'styled-components'
|
|
14
|
+
import { htmlAttrs } from '../utils'
|
|
16
15
|
|
|
17
16
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
18
17
|
|
|
@@ -8,15 +8,13 @@ import {
|
|
|
8
8
|
useViewport
|
|
9
9
|
} from '@telus-uds/components-base'
|
|
10
10
|
|
|
11
|
+
import styled from 'styled-components'
|
|
11
12
|
import VideoProgressBar from './Controls/VideoProgressBar/VideoProgressBar'
|
|
12
13
|
import VolumeSlider from './Controls/VolumeSlider/VolumeSlider'
|
|
13
14
|
import VideoButton from './Controls/VideoButton/VideoButton'
|
|
14
15
|
import VideoMenu from './Controls/VideoMenu/VideoMenu'
|
|
15
|
-
|
|
16
16
|
import videoText from '../videoText'
|
|
17
|
-
import { htmlAttrs
|
|
18
|
-
|
|
19
|
-
const { styled } = styledComponents
|
|
17
|
+
import { htmlAttrs } from '../../utils'
|
|
20
18
|
|
|
21
19
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
22
20
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
|
|
4
|
-
|
|
5
|
-
import { htmlAttrs
|
|
6
|
-
|
|
7
|
-
const { styled } = styledComponents
|
|
4
|
+
import styled from 'styled-components'
|
|
5
|
+
import { htmlAttrs } from '../../../../utils'
|
|
8
6
|
|
|
9
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
10
8
|
|
|
@@ -7,11 +7,9 @@ import {
|
|
|
7
7
|
selectSystemProps,
|
|
8
8
|
Icon
|
|
9
9
|
} from '@telus-uds/components-base'
|
|
10
|
-
|
|
10
|
+
import styled from 'styled-components'
|
|
11
11
|
import videoText from '../../../videoText'
|
|
12
|
-
import { htmlAttrs
|
|
13
|
-
|
|
14
|
-
const { styled } = styledComponents
|
|
12
|
+
import { htmlAttrs } from '../../../../utils'
|
|
15
13
|
|
|
16
14
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
17
15
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { Typography, useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
|
|
4
|
-
|
|
4
|
+
import styled from 'styled-components'
|
|
5
5
|
import videoText from '../../../videoText'
|
|
6
|
-
import { htmlAttrs
|
|
7
|
-
|
|
8
|
-
const { styled } = styledComponents
|
|
6
|
+
import { htmlAttrs } from '../../../../utils'
|
|
9
7
|
|
|
10
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
11
9
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { Icon, useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
|
|
4
|
-
|
|
4
|
+
import styled from 'styled-components'
|
|
5
5
|
import VideoButton from '../VideoButton/VideoButton'
|
|
6
6
|
import videoText from '../../../videoText'
|
|
7
|
-
import { htmlAttrs
|
|
8
|
-
|
|
9
|
-
const { styled } = styledComponents
|
|
7
|
+
import { htmlAttrs } from '../../../../utils'
|
|
10
8
|
|
|
11
9
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
12
10
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
|
|
4
|
-
|
|
5
|
-
import { htmlAttrs
|
|
6
|
-
|
|
7
|
-
const { styled } = styledComponents
|
|
4
|
+
import styled from 'styled-components'
|
|
5
|
+
import { htmlAttrs } from '../../utils'
|
|
8
6
|
|
|
9
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
10
8
|
|
package/src/Video/Video.jsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import fscreen from 'fscreen'
|
|
4
|
+
import styled from 'styled-components'
|
|
4
5
|
import {
|
|
5
6
|
useThemeTokens,
|
|
6
7
|
selectSystemProps,
|
|
@@ -8,15 +9,12 @@ import {
|
|
|
8
9
|
variantProp
|
|
9
10
|
} from '@telus-uds/components-base'
|
|
10
11
|
import Spinner from '../Spinner'
|
|
11
|
-
|
|
12
|
-
import { warn, htmlAttrs, styledComponents } from '../utils'
|
|
12
|
+
import { warn, htmlAttrs } from '../utils'
|
|
13
13
|
import VideoSplash from '../shared/VideoSplash/VideoSplash'
|
|
14
14
|
import MiddleControlButton from './MiddleControlButton/MiddleControlButton'
|
|
15
15
|
import ControlBar from './ControlBar/ControlBar'
|
|
16
16
|
import videoText from './videoText'
|
|
17
17
|
|
|
18
|
-
const { styled } = styledComponents
|
|
19
|
-
|
|
20
18
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
21
19
|
|
|
22
20
|
// TODO: replace with the actual spinner component from UDS
|
|
@@ -8,14 +8,12 @@ import {
|
|
|
8
8
|
useViewport,
|
|
9
9
|
getTokensPropType
|
|
10
10
|
} from '@telus-uds/components-base'
|
|
11
|
-
|
|
11
|
+
import styled, { css } from 'styled-components'
|
|
12
12
|
import { VideoPropType } from './videoPropType'
|
|
13
13
|
import VideoPickerThumbnail from './VideoPickerThumbnail'
|
|
14
14
|
import VideoPickerPlayer from './VideoPickerPlayer'
|
|
15
15
|
import VideoSlider from './VideoSlider'
|
|
16
|
-
import { htmlAttrs
|
|
17
|
-
|
|
18
|
-
const { styled, css } = styledComponents
|
|
16
|
+
import { htmlAttrs } from '../utils'
|
|
19
17
|
|
|
20
18
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
21
19
|
|
|
@@ -9,13 +9,11 @@ import {
|
|
|
9
9
|
horizontalScrollUtils,
|
|
10
10
|
useThemeTokensCallback
|
|
11
11
|
} from '@telus-uds/components-base'
|
|
12
|
-
import
|
|
12
|
+
import styled from 'styled-components'
|
|
13
13
|
import { getTimestamp } from '../shared/VideoSplash/helpers'
|
|
14
14
|
import { VideoPropType, RefPropType } from './videoPropType'
|
|
15
15
|
import VideoSplash from '../shared/VideoSplash/VideoSplash'
|
|
16
16
|
|
|
17
|
-
const { styled } = styledComponents
|
|
18
|
-
|
|
19
17
|
const { getItemPositionLayoutHandler, itemPositionsPropType } = horizontalScrollUtils
|
|
20
18
|
|
|
21
19
|
// Use a React Native (web) outer container so it can take an onLayout callback, to
|
|
@@ -11,12 +11,11 @@ import {
|
|
|
11
11
|
Typography,
|
|
12
12
|
getTokensPropType
|
|
13
13
|
} from '@telus-uds/components-base'
|
|
14
|
+
import styled from 'styled-components'
|
|
14
15
|
import OrderedListBase from '../OrderedList/OrderedListBase'
|
|
15
16
|
import ItemBase from '../OrderedList/ItemBase'
|
|
16
17
|
import Image from '../Image'
|
|
17
|
-
import { htmlAttrs
|
|
18
|
-
|
|
19
|
-
const { styled } = styledComponents
|
|
18
|
+
import { htmlAttrs } from '../utils'
|
|
20
19
|
|
|
21
20
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
22
21
|
|