@telus-uds/components-web 4.19.2 → 5.0.0-alpha.1
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 +12 -0
- package/CHANGELOG.md +29 -1
- package/lib/cjs/Badge/Badge.js +26 -27
- package/lib/cjs/BlockQuote/BlockQuote.js +26 -27
- package/lib/cjs/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +36 -37
- package/lib/cjs/Breadcrumbs/Breadcrumbs.js +7 -8
- package/lib/cjs/Callout/Callout.js +24 -25
- package/lib/cjs/Card/Card.js +75 -78
- package/lib/cjs/Card/CardContent.js +53 -29
- package/lib/cjs/Card/CardFooter.js +29 -19
- package/lib/cjs/Countdown/Countdown.js +7 -8
- package/lib/cjs/Countdown/Segment.js +10 -11
- package/lib/cjs/Countdown/dictionary.js +2 -2
- package/lib/cjs/Countdown/types.js +2 -6
- package/lib/cjs/Countdown/useCountdown.js +2 -2
- package/lib/cjs/DatePicker/CalendarContainer.js +66 -67
- package/lib/cjs/DatePicker/DatePicker.js +27 -28
- package/lib/cjs/DatePicker/dictionary.js +3 -4
- package/lib/cjs/DatePicker/reactDatesCss.js +2 -3
- package/lib/cjs/Disclaimer/Disclaimer.js +28 -13
- package/lib/cjs/Footnote/Footnote.js +107 -107
- package/lib/cjs/Footnote/FootnoteLink.js +28 -19
- package/lib/cjs/Footnote/dictionary.js +2 -2
- package/lib/cjs/IconButton/IconButton.js +3 -4
- package/lib/cjs/Image/Image.js +9 -3
- package/lib/cjs/Image/server.js +4 -6
- package/lib/cjs/List/List.js +7 -3
- package/lib/cjs/List/ListItem.js +3 -4
- package/lib/cjs/NavigationBar/NavigationBar.js +8 -9
- package/lib/cjs/NavigationBar/NavigationItem.js +10 -11
- package/lib/cjs/NavigationBar/NavigationSubMenu.js +10 -11
- package/lib/cjs/NavigationBar/collapseItems.js +2 -2
- package/lib/cjs/NavigationBar/resolveItemSelection.js +2 -2
- package/lib/cjs/OptimizeImage/OptimizeImage.js +6 -8
- package/lib/cjs/OptimizeImage/utils/getFallbackUrl.js +3 -4
- package/lib/cjs/OptimizeImage/utils/getImageUrls.js +9 -10
- package/lib/cjs/OptimizeImage/utils/getOptimizedUrl.js +3 -4
- package/lib/cjs/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/lib/cjs/OptimizeImage/utils/index.js +8 -9
- package/lib/cjs/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/lib/cjs/OrderedList/OrderedList.js +6 -9
- package/lib/cjs/OrderedList/OrderedListBase.js +4 -7
- package/lib/cjs/OrderedList/{Item.js → OrderedListItem.js} +46 -39
- package/lib/cjs/OrderedList/{ItemBase.js → OrderedListItemBase.js} +7 -7
- package/lib/cjs/OrderedList/constants.js +0 -1
- package/lib/cjs/Paragraph/Paragraph.js +10 -11
- package/lib/cjs/PreviewCard/PreviewCard.js +18 -26
- package/lib/cjs/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +6 -6
- package/lib/cjs/PriceLockup/PriceLockup.js +49 -48
- package/lib/cjs/PriceLockup/dictionary.js +2 -2
- package/lib/cjs/PriceLockup/tokens.js +3 -3
- package/lib/cjs/Progress/ProgressBar.js +14 -17
- package/lib/cjs/QuantitySelector/QuantitySelector.js +8 -9
- package/lib/cjs/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +5 -6
- package/lib/cjs/QuantitySelector/dictionary.js +2 -2
- package/lib/cjs/ResponsiveImage/ResponsiveImage.js +3 -4
- package/lib/cjs/Ribbon/Ribbon.js +48 -57
- package/lib/cjs/SkeletonProvider/SkeletonImage.js +3 -4
- package/lib/cjs/SkeletonProvider/SkeletonProvider.js +10 -10
- package/lib/cjs/SkeletonProvider/SkeletonTypography.js +3 -4
- package/lib/cjs/Span/Span.js +6 -7
- package/lib/cjs/Spinner/Spinner.js +29 -29
- package/lib/cjs/Spinner/SpinnerContent.js +6 -7
- package/lib/cjs/StoryCard/StoryCard.js +17 -21
- package/lib/cjs/Table/Table.js +32 -25
- package/lib/cjs/Table/{Body.js → TableBody.js} +5 -6
- package/lib/cjs/Table/{Cell.js → TableCell.js} +58 -59
- package/lib/cjs/Table/{Header.js → TableHeader.js} +7 -8
- package/lib/cjs/Table/{Row.js → TableRow.js} +18 -19
- package/lib/cjs/Table/{SubHeading.js → TableSubHeading.js} +7 -8
- package/lib/cjs/TermsAndConditions/ExpandCollapse.js +18 -19
- package/lib/cjs/TermsAndConditions/TermsAndConditions.js +44 -44
- package/lib/cjs/TermsAndConditions/dictionary.js +2 -2
- package/lib/cjs/Testimonial/Testimonial.js +24 -31
- package/lib/cjs/Toast/Toast.js +29 -30
- package/lib/cjs/Video/ControlBar/ControlBar.js +48 -47
- package/lib/cjs/Video/ControlBar/Controls/VideoButton/VideoButton.js +6 -6
- package/lib/cjs/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +30 -32
- package/lib/cjs/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +35 -35
- package/lib/cjs/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +42 -42
- package/lib/cjs/Video/MiddleControlButton/MiddleControlButton.js +15 -15
- package/lib/cjs/Video/Video.js +27 -29
- package/lib/cjs/Video/videoText.js +3 -4
- package/lib/cjs/VideoPicker/VideoPicker.js +36 -31
- package/lib/cjs/VideoPicker/VideoPickerPlayer.js +5 -6
- package/lib/cjs/VideoPicker/VideoPickerThumbnail.js +26 -23
- package/lib/cjs/VideoPicker/VideoSlider.js +3 -4
- package/lib/cjs/WaffleGrid/WaffleGrid.js +51 -49
- package/lib/cjs/WebVideo/WebVideo.js +7 -8
- package/lib/cjs/baseExports.js +84 -6
- package/lib/cjs/index.js +179 -104
- package/lib/cjs/server.js +2 -3
- package/lib/cjs/shared/ConditionalWrapper/ConditionalWrapper.js +3 -3
- package/lib/cjs/shared/FullBleedContent/FullBleedContent.js +28 -22
- package/lib/cjs/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -2
- package/lib/cjs/shared/FullBleedContent/index.js +11 -9
- package/lib/cjs/shared/FullBleedContent/useFullBleedContentProps.js +2 -2
- package/lib/cjs/shared/VideoSplash/SplashButton/SplashButton.js +9 -9
- package/lib/cjs/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +36 -36
- package/lib/cjs/shared/VideoSplash/VideoSplash.js +12 -12
- package/lib/cjs/shared/VideoSplash/helpers.js +2 -3
- package/lib/cjs/utils/index.js +14 -15
- package/lib/cjs/utils/isElementFocusable.js +2 -2
- package/lib/cjs/utils/logger.js +2 -6
- package/lib/cjs/utils/media.js +1 -1
- package/lib/cjs/utils/renderStructuredContent.js +2 -2
- package/lib/cjs/utils/scrollToAnchor.js +2 -2
- package/lib/cjs/utils/ssr.js +2 -2
- package/lib/cjs/utils/theming/get-theme-from-server.js +1 -1
- package/lib/cjs/utils/theming/with-client-theme.js +2 -2
- package/lib/cjs/utils/theming/with-server-theme.js +4 -4
- package/lib/cjs/utils/transforms.js +2 -5
- package/lib/cjs/utils/useOverlaidPosition.js +2 -2
- package/lib/cjs/utils/useTypographyTheme.js +2 -2
- package/lib/esm/Badge/Badge.js +25 -26
- package/lib/esm/BlockQuote/BlockQuote.js +25 -26
- package/lib/esm/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +35 -36
- package/lib/esm/Breadcrumbs/Breadcrumbs.js +6 -7
- package/lib/esm/Callout/Callout.js +23 -24
- package/lib/esm/Card/Card.js +59 -61
- package/lib/esm/Card/CardContent.js +52 -28
- package/lib/esm/Card/CardFooter.js +28 -19
- package/lib/esm/Countdown/Countdown.js +4 -5
- package/lib/esm/Countdown/Segment.js +8 -9
- package/lib/esm/Countdown/dictionary.js +1 -1
- package/lib/esm/Countdown/types.js +1 -5
- package/lib/esm/Countdown/useCountdown.js +2 -3
- package/lib/esm/DatePicker/CalendarContainer.js +64 -65
- package/lib/esm/DatePicker/DatePicker.js +18 -19
- package/lib/esm/DatePicker/dictionary.js +2 -3
- package/lib/esm/DatePicker/reactDatesCss.js +1 -2
- package/lib/esm/Disclaimer/Disclaimer.js +27 -12
- package/lib/esm/Footnote/Footnote.js +104 -104
- package/lib/esm/Footnote/FootnoteLink.js +26 -17
- package/lib/esm/Footnote/dictionary.js +1 -1
- package/lib/esm/IconButton/IconButton.js +2 -3
- package/lib/esm/Image/Image.js +10 -1
- package/lib/esm/Image/server.js +4 -4
- package/lib/esm/List/List.js +2 -2
- package/lib/esm/List/ListItem.js +2 -3
- package/lib/esm/NavigationBar/NavigationBar.js +5 -6
- package/lib/esm/NavigationBar/NavigationItem.js +9 -10
- package/lib/esm/NavigationBar/NavigationSubMenu.js +7 -8
- package/lib/esm/NavigationBar/collapseItems.js +2 -3
- package/lib/esm/NavigationBar/resolveItemSelection.js +2 -3
- package/lib/esm/OptimizeImage/OptimizeImage.js +4 -6
- package/lib/esm/OptimizeImage/utils/getFallbackUrl.js +2 -2
- package/lib/esm/OptimizeImage/utils/getImageUrls.js +3 -3
- package/lib/esm/OptimizeImage/utils/getOptimizedUrl.js +2 -2
- package/lib/esm/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/lib/esm/OptimizeImage/utils/index.js +4 -4
- package/lib/esm/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/lib/esm/OrderedList/OrderedList.js +4 -7
- package/lib/esm/OrderedList/OrderedListBase.js +3 -6
- package/lib/esm/OrderedList/{Item.js → OrderedListItem.js} +45 -38
- package/lib/esm/OrderedList/{ItemBase.js → OrderedListItemBase.js} +5 -6
- package/lib/esm/OrderedList/constants.js +0 -1
- package/lib/esm/Paragraph/Paragraph.js +9 -10
- package/lib/esm/PreviewCard/PreviewCard.js +16 -21
- package/lib/esm/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +4 -5
- package/lib/esm/PriceLockup/PriceLockup.js +45 -44
- package/lib/esm/PriceLockup/dictionary.js +1 -1
- package/lib/esm/PriceLockup/tokens.js +1 -1
- package/lib/esm/Progress/ProgressBar.js +13 -16
- package/lib/esm/QuantitySelector/QuantitySelector.js +6 -7
- package/lib/esm/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +4 -5
- package/lib/esm/QuantitySelector/dictionary.js +1 -1
- package/lib/esm/ResponsiveImage/ResponsiveImage.js +2 -3
- package/lib/esm/Ribbon/Ribbon.js +47 -56
- package/lib/esm/SkeletonProvider/SkeletonImage.js +2 -3
- package/lib/esm/SkeletonProvider/SkeletonProvider.js +6 -7
- package/lib/esm/SkeletonProvider/SkeletonTypography.js +2 -3
- package/lib/esm/Span/Span.js +5 -6
- package/lib/esm/Spinner/Spinner.js +24 -24
- package/lib/esm/Spinner/SpinnerContent.js +5 -6
- package/lib/esm/StoryCard/StoryCard.js +15 -16
- package/lib/esm/Table/Table.js +31 -24
- package/lib/esm/Table/{Body.js → TableBody.js} +4 -5
- package/lib/esm/Table/{Cell.js → TableCell.js} +57 -58
- package/lib/esm/Table/{Header.js → TableHeader.js} +6 -7
- package/lib/esm/Table/{Row.js → TableRow.js} +17 -18
- package/lib/esm/Table/{SubHeading.js → TableSubHeading.js} +6 -7
- package/lib/esm/TermsAndConditions/ExpandCollapse.js +18 -19
- package/lib/esm/TermsAndConditions/TermsAndConditions.js +40 -40
- package/lib/esm/TermsAndConditions/dictionary.js +1 -1
- package/lib/esm/Testimonial/Testimonial.js +22 -29
- package/lib/esm/Toast/Toast.js +28 -29
- package/lib/esm/Video/ControlBar/ControlBar.js +33 -33
- package/lib/esm/Video/ControlBar/Controls/VideoButton/VideoButton.js +5 -6
- package/lib/esm/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +28 -31
- package/lib/esm/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +33 -34
- package/lib/esm/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +38 -39
- package/lib/esm/Video/MiddleControlButton/MiddleControlButton.js +14 -15
- package/lib/esm/Video/Video.js +19 -21
- package/lib/esm/Video/videoText.js +2 -3
- package/lib/esm/VideoPicker/VideoPicker.js +32 -27
- package/lib/esm/VideoPicker/VideoPickerPlayer.js +3 -4
- package/lib/esm/VideoPicker/VideoPickerThumbnail.js +24 -21
- package/lib/esm/VideoPicker/VideoSlider.js +2 -3
- package/lib/esm/WaffleGrid/WaffleGrid.js +49 -46
- package/lib/esm/WebVideo/WebVideo.js +5 -6
- package/lib/esm/baseExports.js +1 -1
- package/lib/esm/index.js +46 -37
- package/lib/esm/server.js +1 -2
- package/lib/esm/shared/ConditionalWrapper/ConditionalWrapper.js +2 -3
- package/lib/esm/shared/FullBleedContent/FullBleedContent.js +25 -20
- package/lib/esm/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -3
- package/lib/esm/shared/FullBleedContent/index.js +3 -4
- package/lib/esm/shared/FullBleedContent/useFullBleedContentProps.js +3 -5
- package/lib/esm/shared/VideoSplash/SplashButton/SplashButton.js +8 -9
- package/lib/esm/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +35 -36
- package/lib/esm/shared/VideoSplash/VideoSplash.js +8 -9
- package/lib/esm/shared/VideoSplash/helpers.js +1 -1
- package/lib/esm/utils/index.js +7 -7
- package/lib/esm/utils/isElementFocusable.js +2 -3
- package/lib/esm/utils/logger.js +0 -4
- package/lib/esm/utils/media.js +1 -1
- package/lib/esm/utils/renderStructuredContent.js +2 -3
- package/lib/esm/utils/scrollToAnchor.js +2 -3
- package/lib/esm/utils/ssr.js +2 -3
- package/lib/esm/utils/theming/get-theme-from-server.js +1 -1
- package/lib/esm/utils/theming/with-client-theme.js +2 -3
- package/lib/esm/utils/theming/with-server-theme.js +3 -4
- package/lib/esm/utils/transforms.js +1 -4
- package/lib/esm/utils/useOverlaidPosition.js +2 -3
- package/lib/esm/utils/useTypographyTheme.js +2 -3
- package/package.json +13 -22
- package/src/Badge/Badge.jsx +18 -20
- package/src/BlockQuote/BlockQuote.jsx +18 -20
- package/src/Breadcrumbs/{Item/Item.jsx → BreadcrumbItem.jsx} +20 -21
- package/src/Breadcrumbs/Breadcrumbs.jsx +6 -9
- package/src/Callout/Callout.jsx +16 -18
- package/src/Card/Card.jsx +55 -58
- package/src/Card/CardContent.jsx +52 -28
- package/src/Card/CardFooter.jsx +27 -13
- package/src/Countdown/Countdown.jsx +3 -5
- package/src/Countdown/Segment.jsx +6 -8
- package/src/Countdown/dictionary.js +1 -1
- package/src/Countdown/types.js +0 -2
- package/src/Countdown/useCountdown.js +1 -3
- package/src/DatePicker/CalendarContainer.jsx +65 -67
- package/src/DatePicker/DatePicker.jsx +17 -19
- package/src/DatePicker/dictionary.js +1 -3
- package/src/DatePicker/reactDatesCss.js +1 -3
- package/src/Disclaimer/Disclaimer.jsx +15 -8
- package/src/Footnote/Footnote.jsx +104 -93
- package/src/Footnote/FootnoteLink.jsx +16 -13
- package/src/Footnote/dictionary.js +1 -1
- package/src/IconButton/IconButton.jsx +1 -3
- package/src/Image/Image.jsx +9 -1
- package/src/Image/server.js +4 -4
- package/src/List/List.jsx +2 -2
- package/src/List/ListItem.jsx +1 -3
- package/src/NavigationBar/NavigationBar.jsx +4 -6
- package/src/NavigationBar/NavigationItem.jsx +6 -8
- package/src/NavigationBar/NavigationSubMenu.jsx +7 -8
- package/src/NavigationBar/collapseItems.js +1 -3
- package/src/NavigationBar/resolveItemSelection.js +1 -3
- package/src/OptimizeImage/OptimizeImage.jsx +3 -6
- package/src/OptimizeImage/utils/getFallbackUrl.js +2 -2
- package/src/OptimizeImage/utils/getImageUrls.js +3 -3
- package/src/OptimizeImage/utils/getOptimizedUrl.js +2 -9
- package/src/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/src/OptimizeImage/utils/index.js +4 -4
- package/src/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/src/OrderedList/OrderedList.jsx +3 -8
- package/src/OrderedList/OrderedListBase.jsx +2 -7
- package/src/OrderedList/{Item.jsx → OrderedListItem.jsx} +44 -32
- package/src/OrderedList/{ItemBase.jsx → OrderedListItemBase.jsx} +4 -4
- package/src/OrderedList/constants.js +0 -1
- package/src/Paragraph/Paragraph.jsx +7 -9
- package/src/PreviewCard/PreviewCard.jsx +16 -32
- package/src/PreviewCard/{AuthorDate.jsx → PreviewCardAuthorDate.jsx} +3 -5
- package/src/PriceLockup/PriceLockup.jsx +33 -31
- package/src/PriceLockup/dictionary.js +1 -1
- package/src/PriceLockup/tokens.js +1 -1
- package/src/Progress/ProgressBar.jsx +33 -30
- package/src/QuantitySelector/QuantitySelector.jsx +5 -7
- package/src/QuantitySelector/{SideButton.jsx → QuantitySelectorSideButton.jsx} +3 -4
- package/src/QuantitySelector/dictionary.js +1 -1
- package/src/ResponsiveImage/ResponsiveImage.jsx +1 -3
- package/src/Ribbon/Ribbon.jsx +35 -44
- package/src/SkeletonProvider/SkeletonImage.jsx +1 -3
- package/src/SkeletonProvider/SkeletonProvider.jsx +5 -9
- package/src/SkeletonProvider/SkeletonTypography.jsx +1 -3
- package/src/Span/Span.jsx +11 -11
- package/src/Spinner/Spinner.jsx +17 -19
- package/src/Spinner/SpinnerContent.jsx +4 -6
- package/src/StoryCard/StoryCard.jsx +15 -16
- package/src/Table/Table.jsx +81 -75
- package/src/Table/{Body.jsx → TableBody.jsx} +3 -5
- package/src/Table/{Cell.jsx → TableCell.jsx} +69 -65
- package/src/Table/{Header.jsx → TableHeader.jsx} +6 -8
- package/src/Table/{Row.jsx → TableRow.jsx} +11 -12
- package/src/Table/{SubHeading.jsx → TableSubHeading.jsx} +6 -8
- package/src/TermsAndConditions/ExpandCollapse.jsx +18 -19
- package/src/TermsAndConditions/TermsAndConditions.jsx +37 -37
- package/src/TermsAndConditions/dictionary.js +1 -1
- package/src/Testimonial/Testimonial.jsx +20 -28
- package/src/Toast/Toast.jsx +38 -37
- package/src/Video/ControlBar/ControlBar.jsx +28 -25
- package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +4 -6
- package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +26 -30
- package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +31 -33
- package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +40 -40
- package/src/Video/MiddleControlButton/MiddleControlButton.jsx +10 -12
- package/src/Video/Video.jsx +697 -683
- package/src/Video/videoText.js +1 -3
- package/src/VideoPicker/VideoPicker.jsx +37 -25
- package/src/VideoPicker/VideoPickerPlayer.jsx +2 -4
- package/src/VideoPicker/VideoPickerThumbnail.jsx +26 -15
- package/src/VideoPicker/VideoSlider.jsx +1 -3
- package/src/WaffleGrid/WaffleGrid.jsx +31 -27
- package/src/WebVideo/WebVideo.jsx +4 -6
- package/src/baseExports.js +26 -13
- package/src/index.js +46 -37
- package/src/server.js +1 -2
- package/src/shared/ConditionalWrapper/ConditionalWrapper.jsx +1 -3
- package/src/shared/FullBleedContent/FullBleedContent.jsx +26 -19
- package/src/shared/FullBleedContent/getFullBleedBorderRadius.js +1 -3
- package/src/shared/FullBleedContent/index.js +3 -8
- package/src/shared/FullBleedContent/useFullBleedContentProps.js +2 -5
- package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +5 -7
- package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +25 -25
- package/src/shared/VideoSplash/VideoSplash.jsx +7 -9
- package/src/shared/VideoSplash/helpers.js +1 -1
- package/src/utils/index.js +7 -7
- package/src/utils/isElementFocusable.js +1 -3
- package/src/utils/logger.js +0 -5
- package/src/utils/media.js +1 -1
- package/src/utils/renderStructuredContent.jsx +1 -3
- package/src/utils/scrollToAnchor.js +1 -3
- package/src/utils/ssr.js +1 -3
- package/src/utils/theming/get-theme-from-server.js +1 -1
- package/src/utils/theming/with-client-theme.jsx +1 -3
- package/src/utils/theming/with-server-theme.jsx +2 -4
- package/src/utils/transforms.js +0 -2
- package/src/utils/useOverlaidPosition.js +1 -3
- package/src/utils/useTypographyTheme.js +1 -3
- package/types/Autocomplete.d.ts +1 -3
- package/types/Badge.d.ts +1 -3
- package/types/BaseProvider.d.ts +1 -3
- package/types/BlockQuote.d.ts +1 -3
- package/types/Box.d.ts +1 -3
- package/types/BreadcrumbItem.d.ts +1 -3
- package/types/Breadcrumbs.d.ts +2 -4
- package/types/Callout.d.ts +1 -3
- package/types/Card.d.ts +1 -3
- package/types/Cell.d.ts +1 -3
- package/types/ControlBar.d.ts +1 -3
- package/types/Countdown.d.ts +1 -3
- package/types/DatePicker.d.ts +1 -3
- package/types/FileUpload.d.ts +1 -3
- package/types/Footnote.d.ts +1 -3
- package/types/FootnoteLink.d.ts +1 -3
- package/types/Listbox.d.ts +1 -3
- package/types/MiddleControlButton.d.ts +1 -3
- package/types/MultiSelectFilter.d.ts +1 -3
- package/types/PriceLockup.d.ts +1 -3
- package/types/QuantitySelector.d.ts +1 -3
- package/types/Ribbon.d.ts +1 -3
- package/types/Spinner.d.ts +1 -3
- package/types/Table.d.ts +1 -3
- package/types/Tooltip.d.ts +1 -3
- package/types/TooltipButton.d.ts +1 -3
- package/types/Typography.d.ts +1 -3
- package/types/Video.d.ts +1 -3
- package/types/VideoButton.d.ts +1 -3
- package/types/VideoMenu.d.ts +1 -3
- package/types/VideoProgressBar.d.ts +1 -3
- package/types/VolumeSlider.d.ts +1 -3
- package/types/WebVideo.d.ts +1 -3
- package/lib/cjs/Badge/index.js +0 -9
- package/lib/cjs/BlockQuote/index.js +0 -9
- package/lib/cjs/Breadcrumbs/index.js +0 -13
- package/lib/cjs/Callout/index.js +0 -9
- package/lib/cjs/Card/index.js +0 -9
- package/lib/cjs/Countdown/index.js +0 -9
- package/lib/cjs/DatePicker/index.js +0 -9
- package/lib/cjs/Disclaimer/index.js +0 -13
- package/lib/cjs/Footnote/index.js +0 -11
- package/lib/cjs/IconButton/index.js +0 -9
- package/lib/cjs/Image/index.js +0 -20
- package/lib/cjs/List/index.js +0 -17
- package/lib/cjs/NavigationBar/index.js +0 -11
- package/lib/cjs/OptimizeImage/index.js +0 -9
- package/lib/cjs/OrderedList/index.js +0 -17
- package/lib/cjs/Paragraph/index.js +0 -9
- package/lib/cjs/PreviewCard/index.js +0 -9
- package/lib/cjs/PriceLockup/index.js +0 -9
- package/lib/cjs/Progress/index.js +0 -11
- package/lib/cjs/QuantitySelector/index.js +0 -9
- package/lib/cjs/ResponsiveImage/index.js +0 -9
- package/lib/cjs/Ribbon/index.js +0 -9
- package/lib/cjs/SkeletonProvider/index.js +0 -9
- package/lib/cjs/Span/index.js +0 -9
- package/lib/cjs/Spinner/index.js +0 -9
- package/lib/cjs/StoryCard/index.js +0 -9
- package/lib/cjs/Table/index.js +0 -24
- package/lib/cjs/TermsAndConditions/index.js +0 -13
- package/lib/cjs/Testimonial/index.js +0 -9
- package/lib/cjs/Toast/index.js +0 -9
- package/lib/cjs/Video/index.js +0 -9
- package/lib/cjs/VideoPicker/index.js +0 -9
- package/lib/cjs/WaffleGrid/index.js +0 -9
- package/lib/cjs/WebVideo/index.js +0 -9
- package/lib/cjs/shared/ConditionalWrapper/index.js +0 -9
- package/lib/esm/Badge/index.js +0 -2
- package/lib/esm/BlockQuote/index.js +0 -2
- package/lib/esm/Breadcrumbs/index.js +0 -1
- package/lib/esm/Callout/index.js +0 -2
- package/lib/esm/Card/index.js +0 -2
- package/lib/esm/Countdown/index.js +0 -2
- package/lib/esm/DatePicker/index.js +0 -2
- package/lib/esm/Disclaimer/index.js +0 -1
- package/lib/esm/Footnote/index.js +0 -4
- package/lib/esm/IconButton/index.js +0 -2
- package/lib/esm/Image/index.js +0 -9
- package/lib/esm/List/index.js +0 -5
- package/lib/esm/NavigationBar/index.js +0 -4
- package/lib/esm/OptimizeImage/index.js +0 -2
- package/lib/esm/OrderedList/index.js +0 -5
- package/lib/esm/Paragraph/index.js +0 -2
- package/lib/esm/PreviewCard/index.js +0 -2
- package/lib/esm/PriceLockup/index.js +0 -2
- package/lib/esm/Progress/index.js +0 -4
- package/lib/esm/QuantitySelector/index.js +0 -2
- package/lib/esm/ResponsiveImage/index.js +0 -2
- package/lib/esm/Ribbon/index.js +0 -2
- package/lib/esm/SkeletonProvider/index.js +0 -2
- package/lib/esm/Span/index.js +0 -2
- package/lib/esm/Spinner/index.js +0 -2
- package/lib/esm/StoryCard/index.js +0 -2
- package/lib/esm/Table/index.js +0 -17
- package/lib/esm/TermsAndConditions/index.js +0 -1
- package/lib/esm/Testimonial/index.js +0 -2
- package/lib/esm/Toast/index.js +0 -2
- package/lib/esm/Video/index.js +0 -2
- package/lib/esm/VideoPicker/index.js +0 -2
- package/lib/esm/WaffleGrid/index.js +0 -2
- package/lib/esm/WebVideo/index.js +0 -2
- package/lib/esm/shared/ConditionalWrapper/index.js +0 -2
- package/src/Badge/index.js +0 -3
- package/src/BlockQuote/index.js +0 -3
- package/src/Breadcrumbs/index.js +0 -1
- package/src/Callout/index.js +0 -3
- package/src/Card/index.js +0 -3
- package/src/Countdown/index.js +0 -3
- package/src/DatePicker/index.js +0 -3
- package/src/Disclaimer/index.js +0 -1
- package/src/Footnote/index.js +0 -6
- package/src/IconButton/index.js +0 -3
- package/src/Image/index.js +0 -10
- package/src/List/index.js +0 -8
- package/src/NavigationBar/index.js +0 -6
- package/src/OptimizeImage/index.js +0 -3
- package/src/OrderedList/index.js +0 -8
- package/src/Paragraph/index.js +0 -3
- package/src/PreviewCard/index.js +0 -3
- package/src/PriceLockup/index.js +0 -3
- package/src/Progress/index.js +0 -6
- package/src/QuantitySelector/index.js +0 -3
- package/src/ResponsiveImage/index.js +0 -3
- package/src/Ribbon/index.js +0 -3
- package/src/SkeletonProvider/index.js +0 -3
- package/src/Span/index.js +0 -3
- package/src/Spinner/index.js +0 -3
- package/src/StoryCard/index.js +0 -3
- package/src/Table/index.js +0 -20
- package/src/TermsAndConditions/index.js +0 -1
- package/src/Testimonial/index.js +0 -3
- package/src/Toast/index.js +0 -3
- package/src/Video/index.js +0 -3
- package/src/VideoPicker/index.js +0 -3
- package/src/WaffleGrid/index.js +0 -3
- package/src/WebVideo/index.js +0 -3
- package/src/shared/ConditionalWrapper/index.js +0 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { getThemeTokens, getTokensPropType } from '@telus-uds/components-base/server';
|
|
4
|
-
import getTheme from './get-theme-from-server';
|
|
4
|
+
import { getTheme } from './get-theme-from-server';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const withServerTheme = (Component, componentName) => {
|
|
6
|
+
export const withServerTheme = (Component, componentName) => {
|
|
7
7
|
const UdsStyledComponent = async _ref => {
|
|
8
8
|
let {
|
|
9
9
|
tokens: tokenOverrides,
|
|
@@ -22,5 +22,4 @@ const withServerTheme = (Component, componentName) => {
|
|
|
22
22
|
variant: PropTypes.string
|
|
23
23
|
};
|
|
24
24
|
return UdsStyledComponent;
|
|
25
|
-
};
|
|
26
|
-
export default withServerTheme;
|
|
25
|
+
};
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export const transformGradient = gradient => `${gradient.type}-gradient(${gradient.angle}deg, ${gradient.stops[0].color} ${gradient.stops[0].stop * 100}%, ${gradient.stops[1].color} ${gradient.stops[1].stop * 100}%)`;
|
|
2
|
-
export default {
|
|
3
|
-
transformGradient
|
|
4
|
-
};
|
|
1
|
+
export const transformGradient = gradient => `${gradient.type}-gradient(${gradient.angle}deg, ${gradient.stops[0].color} ${gradient.stops[0].stop * 100}%, ${gradient.stops[1].color} ${gradient.stops[1].stop * 100}%)`;
|
|
@@ -121,7 +121,7 @@ function getOverlaidPosition(_ref2) {
|
|
|
121
121
|
* a small task because UDS's tooltip logic only really works for short text - it might be
|
|
122
122
|
* better to use a third-party library).
|
|
123
123
|
*/
|
|
124
|
-
const useOverlaidPosition = _ref3 => {
|
|
124
|
+
export const useOverlaidPosition = _ref3 => {
|
|
125
125
|
let {
|
|
126
126
|
isShown = false,
|
|
127
127
|
offsets,
|
|
@@ -220,5 +220,4 @@ const useOverlaidPosition = _ref3 => {
|
|
|
220
220
|
onTargetLayout,
|
|
221
221
|
isReady
|
|
222
222
|
};
|
|
223
|
-
};
|
|
224
|
-
export default useOverlaidPosition;
|
|
223
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { applyTextStyles, useTheme, useThemeTokens, useViewport } from '@telus-uds/components-base';
|
|
2
|
-
const useTypographyTheme = (variant, tokens) => {
|
|
2
|
+
export const useTypographyTheme = (variant, tokens) => {
|
|
3
3
|
const viewport = useViewport();
|
|
4
4
|
const themeTokens = useThemeTokens('Typography', tokens, variant, {
|
|
5
5
|
viewport
|
|
@@ -20,5 +20,4 @@ const useTypographyTheme = (variant, tokens) => {
|
|
|
20
20
|
fontSize: `${fontSize}px`,
|
|
21
21
|
lineHeight: `${lineHeight}px`
|
|
22
22
|
};
|
|
23
|
-
};
|
|
24
|
-
export default useTypographyTheme;
|
|
23
|
+
};
|
package/package.json
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
],
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@gorhom/portal": "^1.0.14",
|
|
8
|
-
"@telus-uds/components-base": "^
|
|
9
|
-
"@telus-uds/system-constants": "^
|
|
10
|
-
"@telus-uds/system-theme-tokens": "^
|
|
8
|
+
"@telus-uds/components-base": "^4.0.0-alpha.1",
|
|
9
|
+
"@telus-uds/system-constants": "^4.0.0-alpha.0",
|
|
10
|
+
"@telus-uds/system-theme-tokens": "^5.0.0-alpha.1",
|
|
11
11
|
"fscreen": "^1.2.0",
|
|
12
12
|
"lodash.omit": "^4.5.0",
|
|
13
13
|
"lodash.throttle": "^4.1.1",
|
|
14
14
|
"moment": "2.29.4",
|
|
15
15
|
"prop-types": "^15.7.2",
|
|
16
16
|
"react-dates": "^21.8.0",
|
|
17
|
-
"react-helmet-async": "^
|
|
17
|
+
"react-helmet-async": "^2.0.5",
|
|
18
18
|
"react-moment-proptypes": "^1.8.1",
|
|
19
19
|
"react-youtube": "^10.1.0",
|
|
20
20
|
"semver": "^7.5.4"
|
|
@@ -24,33 +24,24 @@
|
|
|
24
24
|
"import": "./lib/esm/index.js",
|
|
25
25
|
"require": "./lib/cjs/index.js"
|
|
26
26
|
},
|
|
27
|
-
"./*": {
|
|
28
|
-
"import": "./lib/esm/*/index.js",
|
|
29
|
-
"require": "./lib/cjs/*/index.js"
|
|
30
|
-
},
|
|
31
27
|
"./server": {
|
|
32
28
|
"import": "./lib/esm/server.js",
|
|
33
29
|
"require": "./lib/cjs/server.js"
|
|
34
|
-
},
|
|
35
|
-
"./server/*": {
|
|
36
|
-
"import": "./lib/esm/*/server.js",
|
|
37
|
-
"require": "./lib/cjs/*/server.js"
|
|
38
30
|
}
|
|
39
31
|
},
|
|
40
32
|
"description": "UDS mult-brand web components",
|
|
41
33
|
"devDependencies": {
|
|
42
34
|
"@telus-uds/browserslist-config": "^1.0.5",
|
|
43
|
-
"@testing-library/jest-dom": "^
|
|
44
|
-
"@testing-library/react": "^
|
|
45
|
-
"@types/react": "^
|
|
35
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
36
|
+
"@testing-library/react": "^16.3.1",
|
|
37
|
+
"@types/react": "^19.0.0",
|
|
46
38
|
"assert": "^2.0.0",
|
|
47
|
-
"babel-plugin-react-native-web": "^0.
|
|
39
|
+
"babel-plugin-react-native-web": "^0.21.2",
|
|
48
40
|
"babel-plugin-styled-components": "^2.0.6",
|
|
49
41
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
50
42
|
"eslint-import-resolver-exports": "^1.0.0-beta.5",
|
|
51
43
|
"jest-axe": "^6.0.0",
|
|
52
44
|
"jest-styled-components": "^7.0.8",
|
|
53
|
-
"react-test-renderer": "~18.0.0",
|
|
54
45
|
"webpack": "5.x"
|
|
55
46
|
},
|
|
56
47
|
"homepage": "https://github.com/telus/universal-design-system#readme",
|
|
@@ -59,10 +50,10 @@
|
|
|
59
50
|
"module": "lib/esm/index.js",
|
|
60
51
|
"name": "@telus-uds/components-web",
|
|
61
52
|
"peerDependencies": {
|
|
62
|
-
"react": "
|
|
63
|
-
"react-dom": "
|
|
64
|
-
"react-native-web": "^0.19.10",
|
|
65
|
-
"styled-components": "^5.3.0"
|
|
53
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
54
|
+
"react-dom": "^18.2.0 || ^19.0.0",
|
|
55
|
+
"react-native-web": "^0.19.10 || ^0.21.0",
|
|
56
|
+
"styled-components": "^5.3.0 || ^6.0.0"
|
|
66
57
|
},
|
|
67
58
|
"repository": {
|
|
68
59
|
"type": "git",
|
|
@@ -82,5 +73,5 @@
|
|
|
82
73
|
"skip": true
|
|
83
74
|
},
|
|
84
75
|
"types": "types/index.d.ts",
|
|
85
|
-
"version": "
|
|
76
|
+
"version": "5.0.0-alpha.1"
|
|
86
77
|
}
|
package/src/Badge/Badge.jsx
CHANGED
|
@@ -12,22 +12,22 @@ import { htmlAttrs, transformGradient } from '../utils'
|
|
|
12
12
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
13
13
|
|
|
14
14
|
const BadgeContainer = styled.div`
|
|
15
|
-
background: ${({ background }) => background};
|
|
16
|
-
border: ${({ border }) => border};
|
|
15
|
+
background: ${({ $background }) => $background};
|
|
16
|
+
border: ${({ $border }) => $border};
|
|
17
17
|
display: inline-flex;
|
|
18
18
|
justify-content: center;
|
|
19
19
|
align-items: center;
|
|
20
20
|
height: fit-content;
|
|
21
|
-
padding: ${({ padding }) => padding};
|
|
22
|
-
border-radius: ${({ radius }) => radius};
|
|
21
|
+
padding: ${({ $padding }) => $padding};
|
|
22
|
+
border-radius: ${({ $radius }) => $radius};
|
|
23
23
|
width: fit-content;
|
|
24
|
-
${({ isOutlineOffer, isAlternative, gradient }) =>
|
|
25
|
-
(isOutlineOffer || isAlternative) &&
|
|
24
|
+
${({ $isOutlineOffer, $isAlternative, $gradient }) =>
|
|
25
|
+
($isOutlineOffer || $isAlternative) &&
|
|
26
26
|
`
|
|
27
27
|
> div {
|
|
28
|
-
background: ${gradient};
|
|
28
|
+
background: ${$gradient};
|
|
29
29
|
-webkit-background-clip: text;
|
|
30
|
-
${gradient && '-webkit-text-fill-color: transparent;'}
|
|
30
|
+
${$gradient && '-webkit-text-fill-color: transparent;'}
|
|
31
31
|
}`}
|
|
32
32
|
`
|
|
33
33
|
|
|
@@ -37,7 +37,7 @@ const fontSizeMapping = {
|
|
|
37
37
|
16: 'h6'
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
const Badge = React.forwardRef(({ children, tokens, variant = {}, ...rest }, ref) => {
|
|
40
|
+
export const Badge = React.forwardRef(({ children, tokens, variant = {}, ...rest }, ref) => {
|
|
41
41
|
const {
|
|
42
42
|
backgroundColor,
|
|
43
43
|
gradient,
|
|
@@ -67,15 +67,15 @@ const Badge = React.forwardRef(({ children, tokens, variant = {}, ...rest }, ref
|
|
|
67
67
|
|
|
68
68
|
return (
|
|
69
69
|
<BadgeContainer
|
|
70
|
-
isOutlineOffer={isOutlineOffer}
|
|
71
|
-
isAlternative={alternative}
|
|
72
|
-
padding={`${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`}
|
|
73
|
-
radius={`${borderRadius}px`}
|
|
74
|
-
background={background}
|
|
75
|
-
fontName={fontName}
|
|
76
|
-
fontWeight={fontWeight}
|
|
77
|
-
gradient={semanticGradient}
|
|
78
|
-
border={`${borderWidth}px solid ${borderColor}`}
|
|
70
|
+
$isOutlineOffer={isOutlineOffer}
|
|
71
|
+
$isAlternative={alternative}
|
|
72
|
+
$padding={`${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`}
|
|
73
|
+
$radius={`${borderRadius}px`}
|
|
74
|
+
$background={background}
|
|
75
|
+
$fontName={fontName}
|
|
76
|
+
$fontWeight={fontWeight}
|
|
77
|
+
$gradient={semanticGradient}
|
|
78
|
+
$border={`${borderWidth}px solid ${borderColor}`}
|
|
79
79
|
ref={ref}
|
|
80
80
|
{...selectProps(rest)}
|
|
81
81
|
>
|
|
@@ -102,5 +102,3 @@ Badge.propTypes = {
|
|
|
102
102
|
inverse: PropTypes.bool
|
|
103
103
|
})
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
export default Badge
|
|
@@ -22,24 +22,24 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
|
22
22
|
const BlockQuoteContainer = styled.blockquote`
|
|
23
23
|
margin: 0;
|
|
24
24
|
position: relative;
|
|
25
|
-
padding-left: ${({ paddingLeft }) => `${paddingLeft}px`};
|
|
26
|
-
padding-right: ${({ paddingRight }) => `${paddingRight}px`};
|
|
27
|
-
padding-bottom: ${({ paddingBottom }) => `${paddingBottom}px`};
|
|
28
|
-
padding-top: ${({ paddingTop }) => `${paddingTop}px`};
|
|
25
|
+
padding-left: ${({ $paddingLeft }) => `${$paddingLeft}px`};
|
|
26
|
+
padding-right: ${({ $paddingRight }) => `${$paddingRight}px`};
|
|
27
|
+
padding-bottom: ${({ $paddingBottom }) => `${$paddingBottom}px`};
|
|
28
|
+
padding-top: ${({ $paddingTop }) => `${$paddingTop}px`};
|
|
29
29
|
&::before {
|
|
30
30
|
content: '';
|
|
31
31
|
left: 0;
|
|
32
32
|
top: 0;
|
|
33
33
|
position: absolute;
|
|
34
34
|
height: 100%;
|
|
35
|
-
width: ${({ width }) => `${width}px`};
|
|
36
|
-
background: ${({ backgroundGradient }) =>
|
|
37
|
-
backgroundGradient && transformGradient(backgroundGradient)};
|
|
35
|
+
width: ${({ $width }) => `${$width}px`};
|
|
36
|
+
background: ${({ $backgroundGradient }) =>
|
|
37
|
+
$backgroundGradient && transformGradient($backgroundGradient)};
|
|
38
38
|
}
|
|
39
39
|
`
|
|
40
40
|
|
|
41
41
|
const QuoteContainer = styled.div`
|
|
42
|
-
margin-bottom: ${({ marginBottom }) => `${marginBottom}px`};
|
|
42
|
+
margin-bottom: ${({ $marginBottom }) => `${$marginBottom}px`};
|
|
43
43
|
`
|
|
44
44
|
|
|
45
45
|
const selectTitleHeadingTokens = (themeTokens) => ({
|
|
@@ -49,7 +49,7 @@ const selectTitleHeadingTokens = (themeTokens) => ({
|
|
|
49
49
|
lineHeight: themeTokens.titleHeadingLineHeight
|
|
50
50
|
})
|
|
51
51
|
|
|
52
|
-
const BlockQuote = React.forwardRef(
|
|
52
|
+
export const BlockQuote = React.forwardRef(
|
|
53
53
|
(
|
|
54
54
|
{
|
|
55
55
|
children,
|
|
@@ -165,7 +165,7 @@ const BlockQuote = React.forwardRef(
|
|
|
165
165
|
blockLineHeight: linkLineHeight,
|
|
166
166
|
color
|
|
167
167
|
}}
|
|
168
|
-
variant={{
|
|
168
|
+
variant={{ style: 'subtle' }}
|
|
169
169
|
LinkRouter={LinkRouter}
|
|
170
170
|
linkRouterProps={linkRouterProps}
|
|
171
171
|
>
|
|
@@ -201,7 +201,7 @@ const BlockQuote = React.forwardRef(
|
|
|
201
201
|
)
|
|
202
202
|
|
|
203
203
|
if (additionalInfo || link) {
|
|
204
|
-
return <QuoteContainer marginBottom={marginBottom}>{quote}</QuoteContainer>
|
|
204
|
+
return <QuoteContainer $marginBottom={marginBottom}>{quote}</QuoteContainer>
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
return quote
|
|
@@ -210,12 +210,12 @@ const BlockQuote = React.forwardRef(
|
|
|
210
210
|
return (
|
|
211
211
|
<BlockQuoteContainer
|
|
212
212
|
{...selectProps(rest)}
|
|
213
|
-
paddingTop={paddingTop}
|
|
214
|
-
paddingBottom={paddingBottom}
|
|
215
|
-
paddingLeft={paddingLeft}
|
|
216
|
-
paddingRight={paddingRight}
|
|
217
|
-
width={width}
|
|
218
|
-
backgroundGradient={backgroundGradient}
|
|
213
|
+
$paddingTop={paddingTop}
|
|
214
|
+
$paddingBottom={paddingBottom}
|
|
215
|
+
$paddingLeft={paddingLeft}
|
|
216
|
+
$paddingRight={paddingRight}
|
|
217
|
+
$width={width}
|
|
218
|
+
$backgroundGradient={backgroundGradient}
|
|
219
219
|
ref={ref}
|
|
220
220
|
>
|
|
221
221
|
{renderQuote()}
|
|
@@ -241,7 +241,7 @@ BlockQuote.propTypes = {
|
|
|
241
241
|
...withLinkRouter.propTypes,
|
|
242
242
|
tokens: getTokensPropType('BlockQuote'),
|
|
243
243
|
variant: PropTypes.exact({
|
|
244
|
-
|
|
244
|
+
style: PropTypes.oneOf(['inline', 'subtle', 'feature', 'danger', 'inverse']),
|
|
245
245
|
size: PropTypes.string
|
|
246
246
|
}),
|
|
247
247
|
/**
|
|
@@ -265,5 +265,3 @@ BlockQuote.propTypes = {
|
|
|
265
265
|
*/
|
|
266
266
|
textStyle: PropTypes.oneOf(['large', 'heading'])
|
|
267
267
|
}
|
|
268
|
-
|
|
269
|
-
export default BlockQuote
|
|
@@ -9,28 +9,29 @@ import {
|
|
|
9
9
|
useThemeTokens
|
|
10
10
|
} from '@telus-uds/components-base'
|
|
11
11
|
import styled from 'styled-components'
|
|
12
|
-
import { htmlAttrs } from '
|
|
12
|
+
import { htmlAttrs } from '../utils'
|
|
13
13
|
|
|
14
14
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
15
15
|
|
|
16
16
|
const StyledItemContainer = styled.li({
|
|
17
17
|
display: 'inline-block',
|
|
18
|
-
paddingLeft: ({ listItemPadding }) => `${listItemPadding}px`,
|
|
19
|
-
lineHeight: ({ lineHeight, fontSize }) => `${Math.ceil(lineHeight * fontSize)}px`,
|
|
18
|
+
paddingLeft: ({ $listItemPadding }) => `${$listItemPadding}px`,
|
|
19
|
+
lineHeight: ({ $lineHeight, $fontSize }) => `${Math.ceil($lineHeight * $fontSize)}px`,
|
|
20
20
|
marginBottom: '8px'
|
|
21
21
|
})
|
|
22
22
|
|
|
23
23
|
const IconContainer = styled.span({
|
|
24
24
|
display: 'inline-block',
|
|
25
|
-
paddingLeft: ({ iconPadding }) => `${iconPadding}px`,
|
|
26
|
-
paddingRight: ({ iconPadding }) => `${iconPadding}px`,
|
|
27
|
-
fontFamily: ({ fontName, fontWeight }) =>
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
paddingLeft: ({ $iconPadding }) => `${$iconPadding}px`,
|
|
26
|
+
paddingRight: ({ $iconPadding }) => `${$iconPadding}px`,
|
|
27
|
+
fontFamily: ({ $fontName, $fontWeight }) =>
|
|
28
|
+
applyTextStyles({ fontName: $fontName, fontWeight: $fontWeight }).fontFamily,
|
|
29
|
+
height: ({ $iconContainerSize }) => `${$iconContainerSize}px`,
|
|
30
|
+
width: ({ $iconContainerSize, $iconPadding }) => `${$iconContainerSize + $iconPadding * 2}px`,
|
|
30
31
|
verticalAlign: 'bottom'
|
|
31
32
|
})
|
|
32
33
|
|
|
33
|
-
const
|
|
34
|
+
export const BreadcrumbItem = React.forwardRef(
|
|
34
35
|
(
|
|
35
36
|
{
|
|
36
37
|
href,
|
|
@@ -64,10 +65,10 @@ const Item = React.forwardRef(
|
|
|
64
65
|
|
|
65
66
|
return (
|
|
66
67
|
<StyledItemContainer
|
|
67
|
-
listItemPadding={listItemPadding}
|
|
68
|
-
lineHeight={lineHeight}
|
|
69
|
-
fontSize={fontSize}
|
|
70
|
-
iconContainerSize={iconContainerSize}
|
|
68
|
+
$listItemPadding={listItemPadding}
|
|
69
|
+
$lineHeight={lineHeight}
|
|
70
|
+
$fontSize={fontSize}
|
|
71
|
+
$iconContainerSize={iconContainerSize}
|
|
71
72
|
>
|
|
72
73
|
{current ? (
|
|
73
74
|
<Typography
|
|
@@ -95,10 +96,10 @@ const Item = React.forwardRef(
|
|
|
95
96
|
{children}
|
|
96
97
|
</Link>
|
|
97
98
|
<IconContainer
|
|
98
|
-
iconPadding={iconPadding}
|
|
99
|
-
fontName={fontName}
|
|
100
|
-
fontWeight={fontWeight}
|
|
101
|
-
iconContainerSize={iconContainerSize}
|
|
99
|
+
$iconPadding={iconPadding}
|
|
100
|
+
$fontName={fontName}
|
|
101
|
+
$fontWeight={fontWeight}
|
|
102
|
+
$iconContainerSize={iconContainerSize}
|
|
102
103
|
>
|
|
103
104
|
<ChevronRightIcon size={iconSize} color={iconColor} />
|
|
104
105
|
</IconContainer>
|
|
@@ -109,9 +110,9 @@ const Item = React.forwardRef(
|
|
|
109
110
|
}
|
|
110
111
|
)
|
|
111
112
|
|
|
112
|
-
|
|
113
|
+
BreadcrumbItem.displayName = 'BreadcrumbItem'
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
BreadcrumbItem.propTypes = {
|
|
115
116
|
...selectedSystemPropTypes,
|
|
116
117
|
/**
|
|
117
118
|
* Breadcrumb text
|
|
@@ -137,5 +138,3 @@ Item.propTypes = {
|
|
|
137
138
|
*/
|
|
138
139
|
onPress: PropTypes.func
|
|
139
140
|
}
|
|
140
|
-
|
|
141
|
-
export default Item
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from '@telus-uds/components-base'
|
|
16
16
|
import styled from 'styled-components'
|
|
17
17
|
import { htmlAttrs } from '../utils'
|
|
18
|
-
import
|
|
18
|
+
import { BreadcrumbItem } from './BreadcrumbItem'
|
|
19
19
|
|
|
20
20
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
21
21
|
|
|
@@ -23,6 +23,7 @@ const StyledList = styled.ol({
|
|
|
23
23
|
display: 'flex',
|
|
24
24
|
flexDirection: 'row',
|
|
25
25
|
flexWrap: 'wrap',
|
|
26
|
+
alignContent: 'stretch',
|
|
26
27
|
listStyle: 'none',
|
|
27
28
|
listStylePosition: 'inside',
|
|
28
29
|
margin: 0,
|
|
@@ -107,7 +108,7 @@ const MAX_ITEMS_ON_XS_VIEWPORT = 4
|
|
|
107
108
|
/**
|
|
108
109
|
* Display a hierarchy of links, commonly used for navigation.
|
|
109
110
|
*/
|
|
110
|
-
const Breadcrumbs = React.forwardRef(
|
|
111
|
+
export const Breadcrumbs = React.forwardRef(
|
|
111
112
|
(
|
|
112
113
|
{
|
|
113
114
|
baseUrl,
|
|
@@ -211,7 +212,7 @@ const Breadcrumbs = React.forwardRef(
|
|
|
211
212
|
|
|
212
213
|
return (
|
|
213
214
|
<nav aria-label="Breadcrumb" ref={ref} {...selectProps(rest)}>
|
|
214
|
-
<StyledList iconContainerSize={themeTokens.iconContainerSize}>
|
|
215
|
+
<StyledList $iconContainerSize={themeTokens.iconContainerSize}>
|
|
215
216
|
{items.map(
|
|
216
217
|
({
|
|
217
218
|
href,
|
|
@@ -223,7 +224,7 @@ const Breadcrumbs = React.forwardRef(
|
|
|
223
224
|
...itemRest
|
|
224
225
|
}) => {
|
|
225
226
|
return (
|
|
226
|
-
<
|
|
227
|
+
<BreadcrumbItem
|
|
227
228
|
{...itemRest}
|
|
228
229
|
current={current}
|
|
229
230
|
href={href}
|
|
@@ -235,7 +236,7 @@ const Breadcrumbs = React.forwardRef(
|
|
|
235
236
|
onPress={onPress}
|
|
236
237
|
>
|
|
237
238
|
{breadcrumbName}
|
|
238
|
-
</
|
|
239
|
+
</BreadcrumbItem>
|
|
239
240
|
)
|
|
240
241
|
}
|
|
241
242
|
)}
|
|
@@ -278,7 +279,3 @@ Breadcrumbs.propTypes = {
|
|
|
278
279
|
*/
|
|
279
280
|
variant: PropTypes.shape({ inverse: PropTypes.bool, light: PropTypes.bool })
|
|
280
281
|
}
|
|
281
|
-
|
|
282
|
-
Breadcrumbs.Item = Item
|
|
283
|
-
|
|
284
|
-
export default Breadcrumbs
|
package/src/Callout/Callout.jsx
CHANGED
|
@@ -40,18 +40,18 @@ const verticalAlignToFlex = (verticalAlign) => {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
const CalloutContainer = styled.div(
|
|
43
|
-
({ rounded, verticalAlign, textAlignToFlex, background, gap, borderRadius, padding }) => ({
|
|
44
|
-
background,
|
|
43
|
+
({ $rounded, $verticalAlign, $textAlignToFlex, $background, $gap, $borderRadius, $padding }) => ({
|
|
44
|
+
background: $background,
|
|
45
45
|
display: 'flex',
|
|
46
|
-
gap,
|
|
47
|
-
borderRadius,
|
|
48
|
-
padding,
|
|
49
|
-
justifyContent: getAlignment(rounded, textAlignToFlex),
|
|
50
|
-
alignItems: verticalAlignToFlex(verticalAlign)
|
|
46
|
+
gap: $gap,
|
|
47
|
+
borderRadius: $borderRadius,
|
|
48
|
+
padding: $padding,
|
|
49
|
+
justifyContent: getAlignment($rounded, $textAlignToFlex),
|
|
50
|
+
alignItems: verticalAlignToFlex($verticalAlign)
|
|
51
51
|
})
|
|
52
52
|
)
|
|
53
53
|
|
|
54
|
-
const Callout = React.forwardRef(
|
|
54
|
+
export const Callout = React.forwardRef(
|
|
55
55
|
({ icon, children, verticalAlign, textAlignToFlex, tokens, variant = {}, ...rest }, ref) => {
|
|
56
56
|
const {
|
|
57
57
|
background,
|
|
@@ -68,15 +68,15 @@ const Callout = React.forwardRef(
|
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
70
|
<CalloutContainer
|
|
71
|
-
size={size}
|
|
72
|
-
rounded={rounded}
|
|
71
|
+
$size={size}
|
|
72
|
+
$rounded={rounded}
|
|
73
73
|
data-testid="callout-container"
|
|
74
|
-
verticalAlign={verticalAlign}
|
|
75
|
-
textAlignToFlex={textAlignToFlex}
|
|
76
|
-
background={background}
|
|
77
|
-
gap={gap}
|
|
78
|
-
borderRadius={borderRadius}
|
|
79
|
-
padding={`${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`}
|
|
74
|
+
$verticalAlign={verticalAlign}
|
|
75
|
+
$textAlignToFlex={textAlignToFlex}
|
|
76
|
+
$background={background}
|
|
77
|
+
$gap={gap}
|
|
78
|
+
$borderRadius={borderRadius}
|
|
79
|
+
$padding={`${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`}
|
|
80
80
|
ref={ref}
|
|
81
81
|
{...selectProps(rest)}
|
|
82
82
|
>
|
|
@@ -111,5 +111,3 @@ Callout.propTypes = {
|
|
|
111
111
|
*/
|
|
112
112
|
verticalAlign: PropTypes.oneOf(['top', 'middle', 'bottom'])
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
export default Callout
|