@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Make a list of items into a one-item list where all items are nested under the first item
|
|
3
3
|
*/
|
|
4
|
-
const collapseItems = (items, selectedId) => {
|
|
4
|
+
export const collapseItems = (items, selectedId) => {
|
|
5
5
|
if (!items?.length) return items;
|
|
6
6
|
|
|
7
7
|
// Give the root item the label of the current active link
|
|
@@ -33,5 +33,4 @@ const collapseItems = (items, selectedId) => {
|
|
|
33
33
|
label: rootLabel,
|
|
34
34
|
items
|
|
35
35
|
}];
|
|
36
|
-
};
|
|
37
|
-
export default collapseItems;
|
|
36
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const resolveItemSelection = (_ref, selectedId) => {
|
|
1
|
+
export const resolveItemSelection = (_ref, selectedId) => {
|
|
2
2
|
let {
|
|
3
3
|
id,
|
|
4
4
|
label,
|
|
@@ -12,5 +12,4 @@ const resolveItemSelection = (_ref, selectedId) => {
|
|
|
12
12
|
itemId,
|
|
13
13
|
selected
|
|
14
14
|
};
|
|
15
|
-
};
|
|
16
|
-
export default resolveItemSelection;
|
|
15
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { selectSystemProps } from '@telus-uds/components-base';
|
|
4
|
-
import ResponsiveImage from '../ResponsiveImage';
|
|
4
|
+
import { ResponsiveImage } from '../ResponsiveImage/ResponsiveImage';
|
|
5
5
|
import { hasWebpSupport, getImageUrls } from './utils';
|
|
6
6
|
import { htmlAttrs } from '../utils';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
9
|
-
const OptimizeImage = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
9
|
+
export const OptimizeImage = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
10
10
|
let {
|
|
11
11
|
contentfulAssetUrl,
|
|
12
12
|
alt,
|
|
@@ -20,8 +20,7 @@ const OptimizeImage = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
20
20
|
disableRetina = false,
|
|
21
21
|
...rest
|
|
22
22
|
} = _ref;
|
|
23
|
-
|
|
24
|
-
const dimension = sizeByHeight || rest.useHeight ? 'h' : 'w';
|
|
23
|
+
const dimension = sizeByHeight ? 'h' : 'w';
|
|
25
24
|
// by default assuming webP support for SSR
|
|
26
25
|
const [imgUrls, setImgUrls] = React.useState(getImageUrls(contentfulAssetUrl, dimension, xs, sm, md, lg, xl, quality, disableRetina, true));
|
|
27
26
|
React.useEffect(() => {
|
|
@@ -88,5 +87,4 @@ OptimizeImage.propTypes = {
|
|
|
88
87
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
|
|
89
88
|
*/
|
|
90
89
|
loading: PropTypes.oneOf(['eager', 'lazy'])
|
|
91
|
-
};
|
|
92
|
-
export default OptimizeImage;
|
|
90
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import isSvgUrl from './isSvgUrl';
|
|
2
|
-
export
|
|
1
|
+
import { isSvgUrl } from './isSvgUrl';
|
|
2
|
+
export function getFallbackUrl(url, dimension, size, quality) {
|
|
3
3
|
if (!isSvgUrl(url)) {
|
|
4
4
|
return `${url}?${dimension}=${size}&q=${quality}`;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import getOptimizedUrl from './getOptimizedUrl';
|
|
2
|
-
import getFallbackUrl from './getFallbackUrl';
|
|
3
|
-
export
|
|
1
|
+
import { getOptimizedUrl } from './getOptimizedUrl';
|
|
2
|
+
import { getFallbackUrl } from './getFallbackUrl';
|
|
3
|
+
export function getImageUrls(contentfulAssetUrl, dimension, xs, sm, md, lg, xl, quality, disableRetina, supportsWebp) {
|
|
4
4
|
return {
|
|
5
5
|
xsSrc: getOptimizedUrl(contentfulAssetUrl, dimension, xs, quality, disableRetina, supportsWebp),
|
|
6
6
|
smSrc: getOptimizedUrl(contentfulAssetUrl, dimension, sm, quality, disableRetina, supportsWebp),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import isSvgUrl from './isSvgUrl';
|
|
2
|
-
export
|
|
1
|
+
import { isSvgUrl } from './isSvgUrl';
|
|
2
|
+
export function getOptimizedUrl(url, dimension, size, quality, disableRetina, supportsWebp) {
|
|
3
3
|
if (!isSvgUrl(url)) {
|
|
4
4
|
let format = '';
|
|
5
5
|
if (supportsWebp) {
|
|
@@ -6,7 +6,7 @@ let promise;
|
|
|
6
6
|
* @see https://developers.google.com/speed/webp/faq#in_your_own_javascript
|
|
7
7
|
* @return {Promise<boolean>}
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export function hasWebpSupport() {
|
|
10
10
|
// cache the result, so that this function runs only once
|
|
11
11
|
if (!promise) {
|
|
12
12
|
promise = new Promise(resolve => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import getOptimizedUrl from './getOptimizedUrl';
|
|
2
|
-
import getFallbackUrl from './getFallbackUrl';
|
|
3
|
-
import hasWebpSupport from './hasWebpSupport';
|
|
4
|
-
import getImageUrls from './getImageUrls';
|
|
1
|
+
import { getOptimizedUrl } from './getOptimizedUrl';
|
|
2
|
+
import { getFallbackUrl } from './getFallbackUrl';
|
|
3
|
+
import { hasWebpSupport } from './hasWebpSupport';
|
|
4
|
+
import { getImageUrls } from './getImageUrls';
|
|
5
5
|
export { getOptimizedUrl, getFallbackUrl, hasWebpSupport, getImageUrls };
|
|
@@ -3,8 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { getTokensPropType, selectSystemProps, variantProp } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { htmlAttrs } from '../utils';
|
|
6
|
-
import OrderedListBase from './OrderedListBase';
|
|
7
|
-
import Item from './Item';
|
|
6
|
+
import { OrderedListBase } from './OrderedListBase';
|
|
8
7
|
import { OL_COUNTER_NAME } from './constants';
|
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
9
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
@@ -25,7 +24,7 @@ const StyledOrderedListBase = /*#__PURE__*/styled(OrderedListBase).withConfig({
|
|
|
25
24
|
/**
|
|
26
25
|
* Themed semantic ordered list.
|
|
27
26
|
*/
|
|
28
|
-
const OrderedList = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
27
|
+
export const OrderedList = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
29
28
|
let {
|
|
30
29
|
children,
|
|
31
30
|
start = 1,
|
|
@@ -71,7 +70,7 @@ OrderedList.displayName = 'OrderedList';
|
|
|
71
70
|
OrderedList.propTypes = {
|
|
72
71
|
...selectedSystemPropTypes,
|
|
73
72
|
/**
|
|
74
|
-
* A list of ordered items wrapped in `
|
|
73
|
+
* A list of ordered items wrapped in `OrderedListItem`.
|
|
75
74
|
*/
|
|
76
75
|
children: PropTypes.node.isRequired,
|
|
77
76
|
/**
|
|
@@ -80,6 +79,4 @@ OrderedList.propTypes = {
|
|
|
80
79
|
start: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
81
80
|
variant: variantProp.propType,
|
|
82
81
|
tokens: getTokensPropType('OrderedList')
|
|
83
|
-
};
|
|
84
|
-
OrderedList.Item = Item;
|
|
85
|
-
export default OrderedList;
|
|
82
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import ItemBase from './ItemBase';
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
5
|
const StyledList = /*#__PURE__*/styled.ol.withConfig({
|
|
7
6
|
displayName: "OrderedListBase__StyledList",
|
|
@@ -17,7 +16,7 @@ const StyledList = /*#__PURE__*/styled.ol.withConfig({
|
|
|
17
16
|
/**
|
|
18
17
|
* Semantic ordered list.
|
|
19
18
|
*/
|
|
20
|
-
const OrderedListBase = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
19
|
+
export const OrderedListBase = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
21
20
|
let {
|
|
22
21
|
children,
|
|
23
22
|
start = 1,
|
|
@@ -30,7 +29,7 @@ const OrderedListBase = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
30
29
|
children: children
|
|
31
30
|
});
|
|
32
31
|
});
|
|
33
|
-
OrderedListBase.displayName = '
|
|
32
|
+
OrderedListBase.displayName = 'OrderedListBase';
|
|
34
33
|
OrderedListBase.propTypes = {
|
|
35
34
|
/**
|
|
36
35
|
* A list of ordered items wrapped in `OrderedListBase.Item`.
|
|
@@ -40,6 +39,4 @@ OrderedListBase.propTypes = {
|
|
|
40
39
|
* The position to start the list with.
|
|
41
40
|
*/
|
|
42
41
|
start: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
43
|
-
};
|
|
44
|
-
OrderedListBase.Item = ItemBase;
|
|
45
|
-
export default OrderedListBase;
|
|
42
|
+
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { applyTextStyles, getTokensPropType, selectSystemProps, StackView, Typography, useTheme, useThemeTokens, wrapStringsInText } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import
|
|
5
|
+
import { OrderedListItemBase } from './OrderedListItemBase';
|
|
6
6
|
import { htmlAttrs } from '../utils';
|
|
7
7
|
import { OL_COUNTER_NAME } from './constants';
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -25,57 +25,57 @@ const selectItemTextStyles = (_ref, themeOptions) => {
|
|
|
25
25
|
lineHeight: itemLineHeight
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
const StyledItemBase = /*#__PURE__*/styled(
|
|
29
|
-
displayName: "
|
|
30
|
-
componentId: "components-web__sc-
|
|
28
|
+
const StyledItemBase = /*#__PURE__*/styled(OrderedListItemBase).withConfig({
|
|
29
|
+
displayName: "OrderedListItem__StyledItemBase",
|
|
30
|
+
componentId: "components-web__sc-o9eecv-0"
|
|
31
31
|
})(_ref2 => {
|
|
32
32
|
let {
|
|
33
|
-
interItemMargin,
|
|
34
|
-
itemBulletContainerWidth,
|
|
35
|
-
itemBulletTextAlign,
|
|
36
|
-
itemFontWeight,
|
|
37
|
-
itemFontSize,
|
|
38
|
-
itemFontName,
|
|
39
|
-
itemLineHeight,
|
|
40
|
-
themeOptions,
|
|
41
|
-
listGutter,
|
|
42
|
-
itemColor,
|
|
43
|
-
itemTextColor
|
|
33
|
+
$interItemMargin,
|
|
34
|
+
$itemBulletContainerWidth,
|
|
35
|
+
$itemBulletTextAlign,
|
|
36
|
+
$itemFontWeight,
|
|
37
|
+
$itemFontSize,
|
|
38
|
+
$itemFontName,
|
|
39
|
+
$itemLineHeight,
|
|
40
|
+
$themeOptions,
|
|
41
|
+
$listGutter,
|
|
42
|
+
$itemColor,
|
|
43
|
+
$itemTextColor
|
|
44
44
|
} = _ref2;
|
|
45
45
|
return {
|
|
46
46
|
counterIncrement: OL_COUNTER_NAME,
|
|
47
|
-
'
|
|
47
|
+
'&::before': {
|
|
48
48
|
content: `counter(${OL_COUNTER_NAME})'.'`,
|
|
49
49
|
display: 'inline-block',
|
|
50
|
-
color: itemColor || itemTextColor,
|
|
51
|
-
width: itemBulletContainerWidth,
|
|
52
|
-
paddingRight: listGutter,
|
|
53
|
-
textAlign: itemBulletTextAlign,
|
|
50
|
+
color: $itemColor || $itemTextColor,
|
|
51
|
+
width: $itemBulletContainerWidth,
|
|
52
|
+
paddingRight: $listGutter,
|
|
53
|
+
textAlign: $itemBulletTextAlign,
|
|
54
54
|
flexShrink: 0,
|
|
55
55
|
whiteSpace: 'nowrap',
|
|
56
56
|
overflow: 'hidden',
|
|
57
57
|
...applyTextStyles({
|
|
58
|
-
fontWeight: itemFontWeight,
|
|
59
|
-
fontSize: itemFontSize,
|
|
60
|
-
fontName: itemFontName,
|
|
61
|
-
themeOptions
|
|
58
|
+
fontWeight: $itemFontWeight,
|
|
59
|
+
fontSize: $itemFontSize,
|
|
60
|
+
fontName: $itemFontName,
|
|
61
|
+
themeOptions: $themeOptions
|
|
62
62
|
}),
|
|
63
|
-
lineHeight: `${itemLineHeight * itemFontSize}px`
|
|
63
|
+
lineHeight: `${$itemLineHeight * $itemFontSize}px`
|
|
64
64
|
},
|
|
65
|
-
'
|
|
66
|
-
marginBottom: interItemMargin
|
|
65
|
+
'&:not(:last-child)': {
|
|
66
|
+
marginBottom: $interItemMargin
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
});
|
|
70
70
|
const ItemContent = /*#__PURE__*/styled.div.withConfig({
|
|
71
|
-
displayName: "
|
|
72
|
-
componentId: "components-web__sc-
|
|
71
|
+
displayName: "OrderedListItem__ItemContent",
|
|
72
|
+
componentId: "components-web__sc-o9eecv-1"
|
|
73
73
|
})({
|
|
74
74
|
display: 'flex',
|
|
75
75
|
flexDirection: 'column',
|
|
76
76
|
gap: 0
|
|
77
77
|
});
|
|
78
|
-
const
|
|
78
|
+
export const OrderedListItem = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
79
79
|
let {
|
|
80
80
|
children,
|
|
81
81
|
counterName,
|
|
@@ -102,8 +102,17 @@ const Item = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
102
102
|
});
|
|
103
103
|
return /*#__PURE__*/_jsx(StyledItemBase, {
|
|
104
104
|
ref: ref,
|
|
105
|
-
themeOptions: themeOptions,
|
|
106
|
-
|
|
105
|
+
$themeOptions: themeOptions,
|
|
106
|
+
$interItemMargin: themeTokens.interItemMargin,
|
|
107
|
+
$itemBulletContainerWidth: themeTokens.itemBulletContainerWidth,
|
|
108
|
+
$itemBulletTextAlign: themeTokens.itemBulletTextAlign,
|
|
109
|
+
$itemFontWeight: themeTokens.itemFontWeight,
|
|
110
|
+
$itemFontSize: themeTokens.itemFontSize,
|
|
111
|
+
$itemFontName: themeTokens.itemFontName,
|
|
112
|
+
$itemLineHeight: themeTokens.itemLineHeight,
|
|
113
|
+
$listGutter: themeTokens.listGutter,
|
|
114
|
+
$itemColor: themeTokens.itemColor,
|
|
115
|
+
$itemTextColor: themeTokens.itemTextColor,
|
|
107
116
|
...selectProps(rest),
|
|
108
117
|
children: title ? /*#__PURE__*/_jsxs(StackView, {
|
|
109
118
|
tokens: {
|
|
@@ -117,7 +126,6 @@ const Item = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
117
126
|
tokens: headingTokens,
|
|
118
127
|
children: title
|
|
119
128
|
}), /*#__PURE__*/_jsx(ItemContent, {
|
|
120
|
-
...themeTokens,
|
|
121
129
|
children: itemContent
|
|
122
130
|
})]
|
|
123
131
|
}) : /*#__PURE__*/_jsx(ItemContent, {
|
|
@@ -125,20 +133,19 @@ const Item = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
125
133
|
})
|
|
126
134
|
});
|
|
127
135
|
});
|
|
128
|
-
|
|
129
|
-
|
|
136
|
+
OrderedListItem.displayName = 'OrderedListItem';
|
|
137
|
+
OrderedListItem.propTypes = {
|
|
130
138
|
...selectedSystemPropTypes,
|
|
131
139
|
/**
|
|
132
140
|
* Item content
|
|
133
141
|
*/
|
|
134
142
|
children: PropTypes.node.isRequired,
|
|
135
143
|
/**
|
|
136
|
-
* Defines the title of the `
|
|
144
|
+
* Defines the title of the `OrderedListItem`
|
|
137
145
|
*/
|
|
138
146
|
title: PropTypes.string,
|
|
139
147
|
/**
|
|
140
148
|
* Item tokens
|
|
141
149
|
*/
|
|
142
150
|
tokens: getTokensPropType('OrderedList')
|
|
143
|
-
};
|
|
144
|
-
export default Item;
|
|
151
|
+
};
|
|
@@ -3,12 +3,12 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
const StyledItem = /*#__PURE__*/styled.li.withConfig({
|
|
6
|
-
displayName: "
|
|
7
|
-
componentId: "components-web__sc-
|
|
6
|
+
displayName: "OrderedListItemBase__StyledItem",
|
|
7
|
+
componentId: "components-web__sc-qnynme-0"
|
|
8
8
|
})({
|
|
9
9
|
display: 'flex'
|
|
10
10
|
});
|
|
11
|
-
const
|
|
11
|
+
export const OrderedListItemBase = _ref => {
|
|
12
12
|
let {
|
|
13
13
|
children,
|
|
14
14
|
...rest
|
|
@@ -18,10 +18,9 @@ const Item = _ref => {
|
|
|
18
18
|
children: children
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
OrderedListItemBase.propTypes = {
|
|
22
22
|
/**
|
|
23
23
|
* Item content
|
|
24
24
|
*/
|
|
25
25
|
children: PropTypes.node.isRequired
|
|
26
|
-
};
|
|
27
|
-
export default Item;
|
|
26
|
+
};
|
|
@@ -10,16 +10,16 @@ const StyledParagraph = /*#__PURE__*/styled.p.withConfig({
|
|
|
10
10
|
componentId: "components-web__sc-1bg9r8p-0"
|
|
11
11
|
})(["", " ", " &:first-child{margin-block-start:0em;}&:last-child{margin-block-end:0em;}"], _ref => {
|
|
12
12
|
let {
|
|
13
|
-
align
|
|
13
|
+
$align
|
|
14
14
|
} = _ref;
|
|
15
|
-
return align ? `text-align: ${align};` : '';
|
|
15
|
+
return $align ? `text-align: ${$align};` : '';
|
|
16
16
|
}, _ref2 => {
|
|
17
17
|
let {
|
|
18
|
-
linesBetween
|
|
18
|
+
$linesBetween
|
|
19
19
|
} = _ref2;
|
|
20
20
|
return `
|
|
21
|
-
margin-block-start: ${linesBetween}em;
|
|
22
|
-
margin-block-end: ${linesBetween}em;
|
|
21
|
+
margin-block-start: ${$linesBetween}em;
|
|
22
|
+
margin-block-end: ${$linesBetween}em;
|
|
23
23
|
`;
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -33,7 +33,7 @@ const StyledParagraph = /*#__PURE__*/styled.p.withConfig({
|
|
|
33
33
|
contrast.
|
|
34
34
|
* - All Allium Typography variants other than header size variants are supported.
|
|
35
35
|
*/
|
|
36
|
-
const Paragraph = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
36
|
+
export const Paragraph = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
37
37
|
let {
|
|
38
38
|
children,
|
|
39
39
|
variant,
|
|
@@ -46,9 +46,9 @@ const Paragraph = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
46
46
|
const style = useTypographyTheme(variant, tokens);
|
|
47
47
|
return /*#__PURE__*/_jsx(StyledParagraph, {
|
|
48
48
|
ref: ref,
|
|
49
|
-
linesBetween: linesBetween,
|
|
49
|
+
$linesBetween: linesBetween,
|
|
50
50
|
"data-testid": testID,
|
|
51
|
-
align: align,
|
|
51
|
+
$align: align,
|
|
52
52
|
style: style,
|
|
53
53
|
...selectProps(rest),
|
|
54
54
|
children: children
|
|
@@ -86,5 +86,4 @@ Paragraph.propTypes = {
|
|
|
86
86
|
inverse: PropTypes.bool,
|
|
87
87
|
size: PropTypes.oneOf(['micro', 'small', 'large'])
|
|
88
88
|
})
|
|
89
|
-
};
|
|
90
|
-
export default Paragraph;
|
|
89
|
+
};
|
|
@@ -3,8 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import omit from 'lodash.omit';
|
|
4
4
|
import { Box, getThemeTokens, hrefAttrsProp, PressableCardBase, selectSystemProps, Spacer, StackView, Typography, a11yProps, focusHandlerProps, viewProps, withLinkRouter, useTheme, getTokensPropType } from '@telus-uds/components-base';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
-
import FullBleedContent,
|
|
7
|
-
import AuthorDate from './AuthorDate';
|
|
6
|
+
import { FullBleedContent, getFullBleedBorderRadius, useFullBleedContentProps } from '../shared/FullBleedContent';
|
|
8
7
|
|
|
9
8
|
// Passes React Native-oriented system props through UDS PressableCardBase
|
|
10
9
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -17,11 +16,11 @@ const FullBleedOffsetOuter = /*#__PURE__*/styled.div.withConfig({
|
|
|
17
16
|
componentId: "components-web__sc-1yfz4de-0"
|
|
18
17
|
})(_ref => {
|
|
19
18
|
let {
|
|
20
|
-
borderOffset
|
|
19
|
+
$borderOffset
|
|
21
20
|
} = _ref;
|
|
22
21
|
return {
|
|
23
22
|
overflow: 'hidden',
|
|
24
|
-
marginTop: borderOffset * 2
|
|
23
|
+
marginTop: $borderOffset * 2
|
|
25
24
|
};
|
|
26
25
|
});
|
|
27
26
|
const FullBleedOffsetInner = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -29,11 +28,11 @@ const FullBleedOffsetInner = /*#__PURE__*/styled.div.withConfig({
|
|
|
29
28
|
componentId: "components-web__sc-1yfz4de-1"
|
|
30
29
|
})(_ref2 => {
|
|
31
30
|
let {
|
|
32
|
-
borderOffset
|
|
31
|
+
$borderOffset
|
|
33
32
|
} = _ref2;
|
|
34
33
|
return {
|
|
35
34
|
position: 'relative',
|
|
36
|
-
margin: 0 - borderOffset
|
|
35
|
+
margin: 0 - $borderOffset
|
|
37
36
|
};
|
|
38
37
|
});
|
|
39
38
|
const defaultTokens = {
|
|
@@ -60,8 +59,7 @@ const PreviewCard = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
60
59
|
tag,
|
|
61
60
|
title,
|
|
62
61
|
footer,
|
|
63
|
-
|
|
64
|
-
fullBleedContent = fullBleedImage,
|
|
62
|
+
fullBleedContent,
|
|
65
63
|
onPress,
|
|
66
64
|
href,
|
|
67
65
|
...rest
|
|
@@ -148,9 +146,9 @@ const PreviewCard = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
148
146
|
}) : footer]
|
|
149
147
|
})]
|
|
150
148
|
}), Boolean(fullBleedContentProps.src || fullBleedContentProps.content) && /*#__PURE__*/_jsx(FullBleedOffsetOuter, {
|
|
151
|
-
borderOffset: borderOffset,
|
|
149
|
+
$borderOffset: borderOffset,
|
|
152
150
|
children: /*#__PURE__*/_jsx(FullBleedOffsetInner, {
|
|
153
|
-
borderOffset: borderOffset,
|
|
151
|
+
$borderOffset: borderOffset,
|
|
154
152
|
children: /*#__PURE__*/_jsx(FullBleedContent, {
|
|
155
153
|
borderRadius: fullBleedBorderRadius,
|
|
156
154
|
...fullBleedContentProps
|
|
@@ -162,9 +160,6 @@ const PreviewCard = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
162
160
|
});
|
|
163
161
|
});
|
|
164
162
|
PreviewCard.displayName = 'PreviewCard';
|
|
165
|
-
|
|
166
|
-
// Provide standard author/date footer as a preset with the export
|
|
167
|
-
PreviewCard.AuthorDate = AuthorDate;
|
|
168
163
|
PreviewCard.propTypes = {
|
|
169
164
|
...selectedSystemPropTypes,
|
|
170
165
|
tokens: getTokensPropType('PreviewCard'),
|
|
@@ -186,22 +181,22 @@ PreviewCard.propTypes = {
|
|
|
186
181
|
tag: PropTypes.string,
|
|
187
182
|
/**
|
|
188
183
|
* Section containing additional information, such as author and date.
|
|
189
|
-
* Use `<
|
|
184
|
+
* Use `<PreviewCardAuthorDate author={...} date={...} />` here for author and date.
|
|
190
185
|
*/
|
|
191
186
|
footer: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
192
187
|
/**
|
|
193
188
|
* Text stating the title or headline of the story.
|
|
194
189
|
*/
|
|
195
190
|
title: PropTypes.string.isRequired,
|
|
196
|
-
/**
|
|
197
|
-
* Full bleed image to be placed on the card, deprecated in favor of `fullBleedContent`.
|
|
198
|
-
*
|
|
199
|
-
* @deprecated
|
|
200
|
-
*/
|
|
201
|
-
fullBleedImage: PropTypes.exact(FullBleedContent.propTypes || {}),
|
|
202
191
|
/**
|
|
203
192
|
* Full bleed content to be placed on the card.
|
|
204
193
|
*/
|
|
205
194
|
fullBleedContent: PropTypes.exact(FullBleedContent.propTypes || {})
|
|
206
195
|
};
|
|
207
|
-
|
|
196
|
+
|
|
197
|
+
// Export unwrapped component for react-docgen to extract info for docsite
|
|
198
|
+
export { PreviewCard as PreviewCardBase };
|
|
199
|
+
|
|
200
|
+
// Export wrapped component as main PreviewCard export
|
|
201
|
+
const PreviewCardWithRouter = withLinkRouter(PreviewCard);
|
|
202
|
+
export { PreviewCardWithRouter as PreviewCard };
|
|
@@ -10,7 +10,7 @@ import { StackWrap, Typography, useThemeTokens } from '@telus-uds/components-bas
|
|
|
10
10
|
* Get locale based on decision of https://github.com/telus/universal-design-system/issues/715
|
|
11
11
|
*/
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const
|
|
13
|
+
export const PreviewCardAuthorDate = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
14
14
|
let {
|
|
15
15
|
author,
|
|
16
16
|
date
|
|
@@ -44,8 +44,8 @@ const AuthorDate = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
44
44
|
})]
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
PreviewCardAuthorDate.displayName = 'PreviewCardAuthorDate';
|
|
48
|
+
PreviewCardAuthorDate.propTypes = {
|
|
49
49
|
/**
|
|
50
50
|
* Name of the author
|
|
51
51
|
*/
|
|
@@ -54,5 +54,4 @@ AuthorDate.propTypes = {
|
|
|
54
54
|
* Date of the post
|
|
55
55
|
*/
|
|
56
56
|
date: PropTypes.string.isRequired
|
|
57
|
-
};
|
|
58
|
-
export default AuthorDate;
|
|
57
|
+
};
|