@telus-uds/components-web 4.19.0 → 5.0.0-alpha.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 +12 -0
- package/CHANGELOG.md +24 -1
- package/lib/cjs/Badge/Badge.js +26 -27
- package/lib/cjs/BlockQuote/BlockQuote.js +24 -25
- package/lib/cjs/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +36 -37
- package/lib/cjs/Breadcrumbs/Breadcrumbs.js +8 -10
- package/lib/cjs/Callout/Callout.js +24 -25
- package/lib/cjs/Card/Card.js +79 -89
- package/lib/cjs/Card/CardContent.js +53 -29
- package/lib/cjs/Card/CardFooter.js +28 -18
- 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 +108 -109
- 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 -27
- package/lib/cjs/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +6 -6
- package/lib/cjs/PriceLockup/PriceLockup.js +61 -60
- 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 +56 -65
- 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 -22
- 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} +59 -61
- 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 +28 -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 +37 -33
- package/lib/cjs/VideoPicker/VideoPickerPlayer.js +5 -6
- package/lib/cjs/VideoPicker/VideoPickerThumbnail.js +28 -25
- package/lib/cjs/VideoPicker/VideoSlider.js +3 -4
- package/lib/cjs/WaffleGrid/WaffleGrid.js +51 -50
- package/lib/cjs/WebVideo/WebVideo.js +7 -8
- package/lib/cjs/baseExports.js +84 -0
- package/lib/cjs/index.js +179 -105
- 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 -10
- 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 +50 -50
- 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 +3 -4
- 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 +2 -3
- 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 +23 -24
- 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 +63 -71
- package/lib/esm/Card/CardContent.js +52 -28
- package/lib/esm/Card/CardFooter.js +27 -18
- 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 +57 -56
- 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 +55 -64
- 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 +26 -27
- 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 +26 -23
- 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 +48 -49
- 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 +16 -18
- 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 +59 -80
- package/src/Card/CardContent.jsx +52 -28
- package/src/Card/CardFooter.jsx +26 -12
- 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 +36 -35
- 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 +27 -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
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import {
|
|
4
4
|
getTokensPropType,
|
|
5
|
-
|
|
5
|
+
ProgressBar as ProgressBarBase,
|
|
6
6
|
selectSystemProps,
|
|
7
7
|
useThemeTokens,
|
|
8
8
|
a11yProps,
|
|
@@ -14,17 +14,13 @@ import styled from 'styled-components'
|
|
|
14
14
|
|
|
15
15
|
// Passes React Native-oriented system props through UDS Progress
|
|
16
16
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps])
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
borderRadius,
|
|
25
|
-
...applyShadowToken(shadow)
|
|
26
|
-
})
|
|
27
|
-
)
|
|
17
|
+
const Gradient = styled.div(({ $gradient: { angle, stops, type }, $borderRadius, $shadow }) => ({
|
|
18
|
+
height: '100%',
|
|
19
|
+
width: '100%',
|
|
20
|
+
background: `${type}-gradient(${angle}deg, ${stops[0].color}, ${stops[1].color})`,
|
|
21
|
+
borderRadius: $borderRadius,
|
|
22
|
+
...applyShadowToken($shadow)
|
|
23
|
+
}))
|
|
28
24
|
|
|
29
25
|
/**
|
|
30
26
|
* The `ProgressBar` is a visual representation of linear progression.
|
|
@@ -38,23 +34,32 @@ const Gradient = styled.div.attrs({ 'data-testid': 'ProgressBar-Gradient' })(
|
|
|
38
34
|
*
|
|
39
35
|
*/
|
|
40
36
|
|
|
41
|
-
const ProgressBar = React.forwardRef(
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
export const ProgressBar = React.forwardRef(
|
|
38
|
+
({ percentage, tokens, variant, offset, ...rest }, ref) => {
|
|
39
|
+
const themeTokens = useThemeTokens('ProgressBar', tokens, variant)
|
|
40
|
+
const selectedProps = selectProps(rest)
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
42
|
+
return (
|
|
43
|
+
<ProgressBarBase
|
|
44
|
+
percentage={percentage}
|
|
45
|
+
tokens={tokens}
|
|
46
|
+
variant={variant}
|
|
47
|
+
ref={ref}
|
|
48
|
+
offset={offset}
|
|
49
|
+
{...selectedProps}
|
|
50
|
+
>
|
|
51
|
+
{themeTokens.gradient && (
|
|
52
|
+
<Gradient
|
|
53
|
+
data-testid="ProgressBar-Gradient"
|
|
54
|
+
$gradient={themeTokens.gradient}
|
|
55
|
+
$borderRadius={themeTokens.borderRadius}
|
|
56
|
+
$shadow={themeTokens.shadow}
|
|
57
|
+
/>
|
|
58
|
+
)}
|
|
59
|
+
</ProgressBarBase>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
)
|
|
58
63
|
|
|
59
64
|
ProgressBar.displayName = 'ProgressBar'
|
|
60
65
|
|
|
@@ -80,5 +85,3 @@ ProgressBar.propTypes = {
|
|
|
80
85
|
current: PropTypes.number
|
|
81
86
|
})
|
|
82
87
|
}
|
|
83
|
-
|
|
84
|
-
export default ProgressBar
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
import { htmlAttrs } from '../utils'
|
|
17
17
|
|
|
18
18
|
import { InputField, InputWrapper } from './styles'
|
|
19
|
-
import defaultDictionary from './dictionary'
|
|
20
|
-
import
|
|
19
|
+
import { dictionary as defaultDictionary } from './dictionary'
|
|
20
|
+
import { QuantitySelectorSideButton } from './QuantitySelectorSideButton'
|
|
21
21
|
|
|
22
22
|
const { isNaN } = Number
|
|
23
23
|
|
|
@@ -27,7 +27,7 @@ const isNumber = (value) => {
|
|
|
27
27
|
|
|
28
28
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, htmlAttrs])
|
|
29
29
|
|
|
30
|
-
const QuantitySelector = React.forwardRef(
|
|
30
|
+
export const QuantitySelector = React.forwardRef(
|
|
31
31
|
(
|
|
32
32
|
{
|
|
33
33
|
id = 'quantity-selector',
|
|
@@ -171,7 +171,7 @@ const QuantitySelector = React.forwardRef(
|
|
|
171
171
|
<InputWrapper>
|
|
172
172
|
<InputField>{renderTextInput()}</InputField>
|
|
173
173
|
<div style={flexOrder(0)}>
|
|
174
|
-
<
|
|
174
|
+
<QuantitySelectorSideButton
|
|
175
175
|
isEnabled={isDecreaseEnabled}
|
|
176
176
|
onPress={() => updateNumber(number - 1)}
|
|
177
177
|
onDoubleClick={() => updateNumber(number - 1)}
|
|
@@ -182,7 +182,7 @@ const QuantitySelector = React.forwardRef(
|
|
|
182
182
|
/>
|
|
183
183
|
</div>
|
|
184
184
|
<div style={flexOrder(2)}>
|
|
185
|
-
<
|
|
185
|
+
<QuantitySelectorSideButton
|
|
186
186
|
isEnabled={isIncreaseEnabled}
|
|
187
187
|
onPress={() => updateNumber(number + 1)}
|
|
188
188
|
onDoubleClick={() => updateNumber(number + 1)}
|
|
@@ -292,5 +292,3 @@ QuantitySelector.propTypes = {
|
|
|
292
292
|
*/
|
|
293
293
|
inactive: PropTypes.bool
|
|
294
294
|
}
|
|
295
|
-
|
|
296
|
-
export default QuantitySelector
|
|
@@ -2,7 +2,7 @@ import { IconButton, getTokensPropType, useThemeTokensCallback } from '@telus-ud
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
export const QuantitySelectorSideButton = React.forwardRef(
|
|
6
6
|
(
|
|
7
7
|
{
|
|
8
8
|
isEnabled = true,
|
|
@@ -56,9 +56,9 @@ const SideButton = React.forwardRef(
|
|
|
56
56
|
}
|
|
57
57
|
)
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
QuantitySelectorSideButton.displayName = 'QuantitySelectorSideButton'
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
QuantitySelectorSideButton.propTypes = {
|
|
62
62
|
isEnabled: PropTypes.bool,
|
|
63
63
|
onPress: PropTypes.func,
|
|
64
64
|
onDoubleClick: PropTypes.func,
|
|
@@ -67,4 +67,3 @@ SideButton.propTypes = {
|
|
|
67
67
|
tokens: getTokensPropType('QuantitySelectorSideButton'),
|
|
68
68
|
variant: PropTypes.object
|
|
69
69
|
}
|
|
70
|
-
export default SideButton
|
|
@@ -13,7 +13,7 @@ const staticStyles = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Provide different image sources for different screen sizes.
|
|
15
15
|
*/
|
|
16
|
-
const ResponsiveImage = React.forwardRef(
|
|
16
|
+
export const ResponsiveImage = React.forwardRef(
|
|
17
17
|
(
|
|
18
18
|
{ xsSrc, smSrc, mdSrc, lgSrc, xlSrc, fallbackSrc, alt, loading = 'eager', dataSet, ...rest },
|
|
19
19
|
ref
|
|
@@ -74,5 +74,3 @@ ResponsiveImage.propTypes = {
|
|
|
74
74
|
*/
|
|
75
75
|
dataSet: PropTypes.object
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
export default ResponsiveImage
|
package/src/Ribbon/Ribbon.jsx
CHANGED
|
@@ -22,36 +22,36 @@ const RibbonWrapper = styled.div`
|
|
|
22
22
|
const RibbonContainer = styled.div`
|
|
23
23
|
display: flex;
|
|
24
24
|
justify-content: center;
|
|
25
|
-
background: ${({ backgroundColor }) => backgroundColor};
|
|
26
|
-
padding: ${({ padding }) => `${padding}`};
|
|
27
|
-
border-radius: ${({ borderRadius }) => borderRadius};
|
|
25
|
+
background: ${({ $backgroundColor }) => $backgroundColor};
|
|
26
|
+
padding: ${({ $padding }) => `${$padding}`};
|
|
27
|
+
border-radius: ${({ $borderRadius }) => $borderRadius};
|
|
28
28
|
width: fit-content;
|
|
29
|
-
box-shadow: ${({ boxShadow
|
|
30
|
-
border-bottom-right-radius: ${({ borderRadiusBottomLeft }) => borderRadiusBottomLeft};
|
|
31
|
-
border-bottom-left-radius: ${({ borderRadiusBottomRight }) => borderRadiusBottomRight};
|
|
29
|
+
box-shadow: ${({ $boxShadow }) => $boxShadow};
|
|
30
|
+
border-bottom-right-radius: ${({ $borderRadiusBottomLeft }) => $borderRadiusBottomLeft};
|
|
31
|
+
border-bottom-left-radius: ${({ $borderRadiusBottomRight }) => $borderRadiusBottomRight};
|
|
32
32
|
`
|
|
33
33
|
|
|
34
34
|
const RibbonCurve = styled.div`
|
|
35
|
-
background: ${({ curveBackgroundColor }) => curveBackgroundColor};
|
|
36
|
-
width: ${({ curveWidth }) => curveWidth};
|
|
37
|
-
height: ${({ curveHeight }) => curveHeight};
|
|
38
|
-
margin-top: -${({ curveMarginTop }) => curveMarginTop};
|
|
35
|
+
background: ${({ $curveBackgroundColor }) => $curveBackgroundColor};
|
|
36
|
+
width: ${({ $curveWidth }) => $curveWidth};
|
|
37
|
+
height: ${({ $curveHeight }) => $curveHeight};
|
|
38
|
+
margin-top: -${({ $curveMarginTop }) => $curveMarginTop};
|
|
39
39
|
border-radius: 0 0 0 100%;
|
|
40
40
|
position: relative;
|
|
41
41
|
z-index: -1;
|
|
42
42
|
overflow: hidden;
|
|
43
43
|
&::after {
|
|
44
44
|
content: '';
|
|
45
|
-
border-bottom-left-radius: ${({ curveAfterRadius }) => curveAfterRadius};
|
|
45
|
+
border-bottom-left-radius: ${({ $curveAfterRadius }) => $curveAfterRadius};
|
|
46
46
|
position: absolute;
|
|
47
|
-
height: ${({ curveAfterHeight }) => curveAfterHeight};
|
|
48
|
-
background: ${({ curveAfterBackgroundColor }) => curveAfterBackgroundColor};
|
|
49
|
-
width: ${({ curveAfterWidth }) => curveAfterWidth};
|
|
47
|
+
height: ${({ $curveAfterHeight }) => $curveAfterHeight};
|
|
48
|
+
background: ${({ $curveAfterBackgroundColor }) => $curveAfterBackgroundColor};
|
|
49
|
+
width: ${({ $curveAfterWidth }) => $curveAfterWidth};
|
|
50
50
|
}
|
|
51
51
|
`
|
|
52
52
|
|
|
53
|
-
const Ribbon = React.forwardRef(
|
|
54
|
-
({ children, tokens,
|
|
53
|
+
export const Ribbon = React.forwardRef(
|
|
54
|
+
({ children, tokens, left, top, variant = {}, ...rest }, ref) => {
|
|
55
55
|
const {
|
|
56
56
|
backgroundColor,
|
|
57
57
|
borderRadius,
|
|
@@ -80,7 +80,7 @@ const Ribbon = React.forwardRef(
|
|
|
80
80
|
fontWeight,
|
|
81
81
|
fontSize,
|
|
82
82
|
lineHeight
|
|
83
|
-
} = useThemeTokens('Ribbon', tokens, { ...variant
|
|
83
|
+
} = useThemeTokens('Ribbon', tokens, { ...variant })
|
|
84
84
|
|
|
85
85
|
let background = backgroundColor
|
|
86
86
|
if (gradient) {
|
|
@@ -97,13 +97,12 @@ const Ribbon = React.forwardRef(
|
|
|
97
97
|
{...selectProps(rest)}
|
|
98
98
|
>
|
|
99
99
|
<RibbonContainer
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
borderRadiusBottomRight={`${borderRadiusBottomRight}px`}
|
|
100
|
+
$backgroundColor={background}
|
|
101
|
+
$padding={`${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`}
|
|
102
|
+
$borderRadius={`${borderRadius}px`}
|
|
103
|
+
$boxShadow={`${boxShadowPaddingTop}px ${boxShadowPaddingRight}px ${boxShadowPaddingBottom}px ${boxShadowPaddingLeft}px ${boxShadowColor}`}
|
|
104
|
+
$borderRadiusBottomLeft={`${borderRadiusBottomLeft}px`}
|
|
105
|
+
$borderRadiusBottomRight={`${borderRadiusBottomRight}px`}
|
|
107
106
|
>
|
|
108
107
|
<Typography
|
|
109
108
|
variant={{ bold: true, inverse: true }}
|
|
@@ -118,20 +117,18 @@ const Ribbon = React.forwardRef(
|
|
|
118
117
|
{children}
|
|
119
118
|
</Typography>
|
|
120
119
|
</RibbonContainer>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
/>
|
|
134
|
-
)}
|
|
120
|
+
<RibbonCurve
|
|
121
|
+
data-testid="ribbon-curve"
|
|
122
|
+
$backgroundColor={backgroundColor}
|
|
123
|
+
$curveMarginTop={`${curveMarginTop}px`}
|
|
124
|
+
$curveWidth={`${curveWidth}px`}
|
|
125
|
+
$curveHeight={`${curveHeight}px`}
|
|
126
|
+
$curveBackgroundColor={curveBackgroundColor}
|
|
127
|
+
$curveAfterRadius={`${curveAfterRadius}px`}
|
|
128
|
+
$curveAfterWidth={`${curveAfterWidth}px`}
|
|
129
|
+
$curveAfterHeight={`${curveAfterHeight}px`}
|
|
130
|
+
$curveAfterBackgroundColor={curveAfterBackgroundColor}
|
|
131
|
+
/>
|
|
135
132
|
</RibbonWrapper>
|
|
136
133
|
)
|
|
137
134
|
}
|
|
@@ -143,14 +140,8 @@ Ribbon.propTypes = {
|
|
|
143
140
|
...selectedSystemPropTypes,
|
|
144
141
|
tokens: getTokensPropType('Ribbon'),
|
|
145
142
|
children: PropTypes.node,
|
|
146
|
-
/** show/hide the ribbon fold
|
|
147
|
-
* @deprecated please don't rely on `wrap` to turn off the wrapping (use `Badge` instead) as it will be removed in the future
|
|
148
|
-
*/
|
|
149
|
-
wrap: PropTypes.bool,
|
|
150
143
|
/** sets the left offset (triggers absolute positioning) */
|
|
151
144
|
left: PropTypes.number,
|
|
152
145
|
/** sets the top offset (triggers absolute positioning) */
|
|
153
146
|
top: PropTypes.number
|
|
154
147
|
}
|
|
155
|
-
|
|
156
|
-
export default Ribbon
|
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { Skeleton } from '@telus-uds/components-base'
|
|
4
4
|
|
|
5
|
-
const SkeletonImage = React.forwardRef(
|
|
5
|
+
export const SkeletonImage = React.forwardRef(
|
|
6
6
|
(
|
|
7
7
|
{
|
|
8
8
|
rounded,
|
|
@@ -38,5 +38,3 @@ SkeletonImage.propTypes = {
|
|
|
38
38
|
show: PropTypes.bool.isRequired,
|
|
39
39
|
children: PropTypes.node
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
export default SkeletonImage
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { Typography } from '@telus-uds/components-base'
|
|
4
|
-
import Image from '../Image'
|
|
5
|
-
import SkeletonTypography from './SkeletonTypography'
|
|
6
|
-
import SkeletonImage from './SkeletonImage'
|
|
4
|
+
import { Image } from '../Image/Image'
|
|
5
|
+
import { SkeletonTypography } from './SkeletonTypography'
|
|
6
|
+
import { SkeletonImage } from './SkeletonImage'
|
|
7
7
|
|
|
8
|
-
const SkeletonProvider = ({ children, show }) => {
|
|
8
|
+
export const SkeletonProvider = ({ children, show }) => {
|
|
9
9
|
if (!show) {
|
|
10
10
|
return children
|
|
11
11
|
}
|
|
@@ -19,9 +19,7 @@ const SkeletonProvider = ({ children, show }) => {
|
|
|
19
19
|
|
|
20
20
|
if (childElement.props && 'children' in childElement.props) {
|
|
21
21
|
const { children: elementChildren } = childElement.props
|
|
22
|
-
const mappedChildren =
|
|
23
|
-
? elementChildren.map(mapChild)
|
|
24
|
-
: mapChild(elementChildren)
|
|
22
|
+
const mappedChildren = React.Children.map(elementChildren, mapChild)
|
|
25
23
|
childElement = React.cloneElement(childElement, {
|
|
26
24
|
children: mappedChildren
|
|
27
25
|
})
|
|
@@ -58,5 +56,3 @@ SkeletonProvider.propTypes = {
|
|
|
58
56
|
show: PropTypes.bool.isRequired,
|
|
59
57
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).isRequired
|
|
60
58
|
}
|
|
61
|
-
|
|
62
|
-
export default SkeletonProvider
|
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { Skeleton } from '@telus-uds/components-base'
|
|
4
4
|
|
|
5
|
-
const SkeletonTypography = React.forwardRef(
|
|
5
|
+
export const SkeletonTypography = React.forwardRef(
|
|
6
6
|
({ show, size, sizeIndex, sizePixels, characters, lines, children }, ref) => {
|
|
7
7
|
if (!show) {
|
|
8
8
|
return children
|
|
@@ -32,5 +32,3 @@ SkeletonTypography.propTypes = {
|
|
|
32
32
|
characters: Skeleton.propTypes?.characters,
|
|
33
33
|
lines: Skeleton.propTypes?.lines
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
export default SkeletonTypography
|
package/src/Span/Span.jsx
CHANGED
|
@@ -6,7 +6,7 @@ import { htmlAttrs, useTypographyTheme } from '../utils'
|
|
|
6
6
|
|
|
7
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
8
8
|
|
|
9
|
-
const StyledSpan = styled.span`${({ flex }) => (flex ? 'display: inline-flex' : '')}};`
|
|
9
|
+
const StyledSpan = styled.span`${({ $flex }) => ($flex ? 'display: inline-flex' : '')}};`
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Text as an HTML ```<span>``` element.
|
|
@@ -14,14 +14,16 @@ const StyledSpan = styled.span`${({ flex }) => (flex ? 'display: inline-flex' :
|
|
|
14
14
|
* Span may be used in cases where an inline span or direct access to HTML attributes is required.
|
|
15
15
|
* In most cases, `Typography` should be used for text, or Paragraph for body text.
|
|
16
16
|
*/
|
|
17
|
-
const Span = React.forwardRef(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
export const Span = React.forwardRef(
|
|
18
|
+
({ children, variant, tokens, testID, flex, ...rest }, ref) => {
|
|
19
|
+
const style = useTypographyTheme(variant, tokens)
|
|
20
|
+
return (
|
|
21
|
+
<StyledSpan data-testid={testID} $flex={flex} style={style} ref={ref} {...selectProps(rest)}>
|
|
22
|
+
{children}
|
|
23
|
+
</StyledSpan>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
)
|
|
25
27
|
|
|
26
28
|
Span.displayName = 'Span'
|
|
27
29
|
|
|
@@ -66,5 +68,3 @@ Span.propTypes = {
|
|
|
66
68
|
weight: PropTypes.oneOf(['semibold', 'bold'])
|
|
67
69
|
})
|
|
68
70
|
}
|
|
69
|
-
|
|
70
|
-
export default Span
|
package/src/Spinner/Spinner.jsx
CHANGED
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
} from '@telus-uds/components-base'
|
|
9
9
|
import { Portal } from '@gorhom/portal'
|
|
10
10
|
import styled from 'styled-components'
|
|
11
|
-
import SpinnerContent from './SpinnerContent'
|
|
11
|
+
import { SpinnerContent } from './SpinnerContent'
|
|
12
12
|
import { htmlAttrs, media } from '../utils'
|
|
13
13
|
import { BACKDROP_OPACITY, BACKDROP_Z_INDEX } from './constants'
|
|
14
14
|
|
|
15
15
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
16
16
|
|
|
17
|
-
const SpinnerContainer = styled.div(({ inline, fullScreen, overlay }) => ({
|
|
17
|
+
const SpinnerContainer = styled.div(({ $inline, $fullScreen, $overlay }) => ({
|
|
18
18
|
position: 'relative',
|
|
19
|
-
...(inline && {
|
|
20
|
-
display: overlay ? 'inline-block' : 'block',
|
|
19
|
+
...($inline && {
|
|
20
|
+
display: $overlay ? 'inline-block' : 'block',
|
|
21
21
|
...media().from('md').css({
|
|
22
22
|
display: 'inline-block'
|
|
23
23
|
})
|
|
24
24
|
}),
|
|
25
|
-
...(fullScreen && { top: '50%', transform: 'translateY(-50%)' })
|
|
25
|
+
...($fullScreen && { top: '50%', transform: 'translateY(-50%)' })
|
|
26
26
|
}))
|
|
27
27
|
|
|
28
28
|
const ContentOverlay = styled.div({
|
|
@@ -35,18 +35,18 @@ const ContentOverlay = styled.div({
|
|
|
35
35
|
pointerEvents: 'none'
|
|
36
36
|
})
|
|
37
37
|
|
|
38
|
-
const FullscreenOverlay = styled.div(({ fullScreenOverLayBackground }) => ({
|
|
38
|
+
const FullscreenOverlay = styled.div(({ $fullScreenOverLayBackground }) => ({
|
|
39
39
|
position: 'fixed',
|
|
40
40
|
width: '100vw',
|
|
41
41
|
height: '100vh',
|
|
42
42
|
top: 0,
|
|
43
43
|
left: 0,
|
|
44
44
|
zIndex: BACKDROP_Z_INDEX,
|
|
45
|
-
backgroundColor: fullScreenOverLayBackground
|
|
45
|
+
backgroundColor: $fullScreenOverLayBackground
|
|
46
46
|
}))
|
|
47
47
|
|
|
48
|
-
const OpaqueContainer = styled.div(({ show = true }) => ({
|
|
49
|
-
...(show && {
|
|
48
|
+
const OpaqueContainer = styled.div(({ $show = true }) => ({
|
|
49
|
+
...($show && {
|
|
50
50
|
opacity: BACKDROP_OPACITY
|
|
51
51
|
})
|
|
52
52
|
}))
|
|
@@ -70,7 +70,7 @@ const recursiveMap = (children, fn) =>
|
|
|
70
70
|
/**
|
|
71
71
|
* Loading indicator.
|
|
72
72
|
*/
|
|
73
|
-
const Spinner = React.forwardRef(
|
|
73
|
+
export const Spinner = React.forwardRef(
|
|
74
74
|
(
|
|
75
75
|
{
|
|
76
76
|
children,
|
|
@@ -100,9 +100,9 @@ const Spinner = React.forwardRef(
|
|
|
100
100
|
// Overlay spinner with persistChildrenState enabled
|
|
101
101
|
if (children && persistChildrenState) {
|
|
102
102
|
return (
|
|
103
|
-
<SpinnerContainer inline={inline} aria-live="assertive" overlay {...selectProps(rest)}>
|
|
103
|
+
<SpinnerContainer $inline={inline} aria-live="assertive" $overlay {...selectProps(rest)}>
|
|
104
104
|
{/* Children ALWAYS rendered in same position - OpaqueContainer styles toggle with show */}
|
|
105
|
-
<OpaqueContainer show={show} {...(show ? { inert:
|
|
105
|
+
<OpaqueContainer $show={show} {...(show ? { inert: true, 'aria-hidden': 'true' } : {})}>
|
|
106
106
|
{children}
|
|
107
107
|
</OpaqueContainer>
|
|
108
108
|
<ContentOverlay />
|
|
@@ -129,10 +129,10 @@ const Spinner = React.forwardRef(
|
|
|
129
129
|
if (fullScreen) {
|
|
130
130
|
return (
|
|
131
131
|
<Portal>
|
|
132
|
-
<FullscreenOverlay fullScreenOverLayBackground={fullScreenOverLayBackground}>
|
|
132
|
+
<FullscreenOverlay $fullScreenOverLayBackground={fullScreenOverLayBackground}>
|
|
133
133
|
<SpinnerContainer
|
|
134
|
-
inline={inline}
|
|
135
|
-
fullScreen={fullScreen}
|
|
134
|
+
$inline={inline}
|
|
135
|
+
$fullScreen={fullScreen}
|
|
136
136
|
aria-live="assertive"
|
|
137
137
|
{...selectProps(rest)}
|
|
138
138
|
>
|
|
@@ -154,7 +154,7 @@ const Spinner = React.forwardRef(
|
|
|
154
154
|
// Overlay spinner
|
|
155
155
|
if (children && !persistChildrenState) {
|
|
156
156
|
return (
|
|
157
|
-
<SpinnerContainer inline={inline} aria-live="assertive" overlay {...selectProps(rest)}>
|
|
157
|
+
<SpinnerContainer $inline={inline} aria-live="assertive" $overlay {...selectProps(rest)}>
|
|
158
158
|
<SpinnerContent
|
|
159
159
|
label={label}
|
|
160
160
|
labelPosition={labelPosition}
|
|
@@ -167,7 +167,7 @@ const Spinner = React.forwardRef(
|
|
|
167
167
|
|
|
168
168
|
<ContentOverlay />
|
|
169
169
|
|
|
170
|
-
<OpaqueContainer inert
|
|
170
|
+
<OpaqueContainer $show={show} inert>
|
|
171
171
|
{recursiveMap(children, (c) => {
|
|
172
172
|
if (c) {
|
|
173
173
|
return React.cloneElement(c, { tabIndex: '-1', 'aria-hidden': 'true' })
|
|
@@ -243,5 +243,3 @@ Spinner.propTypes = {
|
|
|
243
243
|
*/
|
|
244
244
|
persistChildrenState: PropTypes.bool
|
|
245
245
|
}
|
|
246
|
-
|
|
247
|
-
export default Spinner
|
|
@@ -7,11 +7,11 @@ import { BACKDROP_Z_INDEX, LARGE } from './constants'
|
|
|
7
7
|
|
|
8
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
9
9
|
|
|
10
|
-
const Container = styled.div(({ overlay }) => ({
|
|
10
|
+
const Container = styled.div(({ $overlay }) => ({
|
|
11
11
|
display: 'inline-flex',
|
|
12
12
|
flexDirection: 'column',
|
|
13
13
|
alignItems: 'center',
|
|
14
|
-
...(overlay && {
|
|
14
|
+
...($overlay && {
|
|
15
15
|
position: 'absolute',
|
|
16
16
|
top: '50%',
|
|
17
17
|
left: '50%',
|
|
@@ -20,7 +20,7 @@ const Container = styled.div(({ overlay }) => ({
|
|
|
20
20
|
})
|
|
21
21
|
}))
|
|
22
22
|
|
|
23
|
-
const SpinnerContent = React.forwardRef(
|
|
23
|
+
export const SpinnerContent = React.forwardRef(
|
|
24
24
|
(
|
|
25
25
|
{
|
|
26
26
|
label,
|
|
@@ -36,7 +36,7 @@ const SpinnerContent = React.forwardRef(
|
|
|
36
36
|
ref
|
|
37
37
|
) => {
|
|
38
38
|
return (
|
|
39
|
-
<Container overlay={overlay} ref={ref} aria-label={label} role="status">
|
|
39
|
+
<Container $overlay={overlay} ref={ref} aria-label={label} role="status">
|
|
40
40
|
<ActivityIndicator
|
|
41
41
|
role="progressbar"
|
|
42
42
|
aria-busy="true"
|
|
@@ -78,5 +78,3 @@ SpinnerContent.propTypes = {
|
|
|
78
78
|
*/
|
|
79
79
|
isStatic: PropTypes.bool
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
export default SpinnerContent
|
|
@@ -19,7 +19,8 @@ import {
|
|
|
19
19
|
getTokensPropType
|
|
20
20
|
} from '@telus-uds/components-base'
|
|
21
21
|
import styled from 'styled-components'
|
|
22
|
-
import
|
|
22
|
+
import {
|
|
23
|
+
FullBleedContent,
|
|
23
24
|
getFullBleedBorderRadius,
|
|
24
25
|
useFullBleedContentProps
|
|
25
26
|
} from '../shared/FullBleedContent'
|
|
@@ -33,13 +34,13 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([
|
|
|
33
34
|
|
|
34
35
|
// Stop changes to the card's inner border width causing the size and
|
|
35
36
|
// apparent position of the full bleed image to change.
|
|
36
|
-
const FullBleedOffsetOuter = styled.div(({ borderOffset }) => ({
|
|
37
|
+
const FullBleedOffsetOuter = styled.div(({ $borderOffset }) => ({
|
|
37
38
|
overflow: 'hidden',
|
|
38
|
-
marginTop: borderOffset * 2
|
|
39
|
+
marginTop: $borderOffset * 2
|
|
39
40
|
}))
|
|
40
|
-
const FullBleedOffsetInner = styled.div(({ borderOffset }) => ({
|
|
41
|
+
const FullBleedOffsetInner = styled.div(({ $borderOffset }) => ({
|
|
41
42
|
position: 'relative',
|
|
42
|
-
margin: 0 - borderOffset
|
|
43
|
+
margin: 0 - $borderOffset
|
|
43
44
|
}))
|
|
44
45
|
|
|
45
46
|
/**
|
|
@@ -60,8 +61,7 @@ const StoryCard = React.forwardRef(
|
|
|
60
61
|
date,
|
|
61
62
|
title,
|
|
62
63
|
description,
|
|
63
|
-
|
|
64
|
-
fullBleedContent = fullBleedImage,
|
|
64
|
+
fullBleedContent,
|
|
65
65
|
onPress,
|
|
66
66
|
href,
|
|
67
67
|
tokens,
|
|
@@ -130,8 +130,8 @@ const StoryCard = React.forwardRef(
|
|
|
130
130
|
<Typography>{description}</Typography>
|
|
131
131
|
</Box>
|
|
132
132
|
{Boolean(fullBleedContentProps.src || fullBleedContentProps.content) && (
|
|
133
|
-
<FullBleedOffsetOuter borderOffset={borderOffset}>
|
|
134
|
-
<FullBleedOffsetInner borderOffset={borderOffset}>
|
|
133
|
+
<FullBleedOffsetOuter $borderOffset={borderOffset}>
|
|
134
|
+
<FullBleedOffsetInner $borderOffset={borderOffset}>
|
|
135
135
|
<FullBleedContent
|
|
136
136
|
borderRadius={fullBleedBorderRadius}
|
|
137
137
|
{...fullBleedContentProps}
|
|
@@ -180,16 +180,15 @@ StoryCard.propTypes = {
|
|
|
180
180
|
* Text giving a short description of the story. One paragraph of plain text.
|
|
181
181
|
*/
|
|
182
182
|
description: PropTypes.string.isRequired,
|
|
183
|
-
/**
|
|
184
|
-
* Full bleed image to be placed on the card, deprecated in favor of `fullBleedContent`.
|
|
185
|
-
*
|
|
186
|
-
* @deprecated
|
|
187
|
-
*/
|
|
188
|
-
fullBleedImage: PropTypes.exact(FullBleedContent.propTypes || {}),
|
|
189
183
|
/**
|
|
190
184
|
* Full bleed image to be placed on the card.
|
|
191
185
|
*/
|
|
192
186
|
fullBleedContent: PropTypes.exact(FullBleedContent.propTypes || {})
|
|
193
187
|
}
|
|
194
188
|
|
|
195
|
-
|
|
189
|
+
// Export unwrapped component for react-docgen to extract info for docsite
|
|
190
|
+
export { StoryCard as StoryCardBase }
|
|
191
|
+
|
|
192
|
+
// Export wrapped component as main StoryCard export
|
|
193
|
+
const StoryCardWithRouter = withLinkRouter(StoryCard)
|
|
194
|
+
export { StoryCardWithRouter as StoryCard }
|