@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
|
@@ -13,9 +13,10 @@ import {
|
|
|
13
13
|
getTokensPropType
|
|
14
14
|
} from '@telus-uds/components-base'
|
|
15
15
|
import styled, { createGlobalStyle } from 'styled-components'
|
|
16
|
-
import OrderedListBase from '../OrderedList/OrderedListBase'
|
|
16
|
+
import { OrderedListBase } from '../OrderedList/OrderedListBase'
|
|
17
|
+
import { OrderedListItemBase } from '../OrderedList/OrderedListItemBase'
|
|
17
18
|
import { htmlAttrs, media, renderStructuredContent, isElementFocusable } from '../utils'
|
|
18
|
-
import defaultDictionary from './dictionary'
|
|
19
|
+
import { dictionary as defaultDictionary } from './dictionary'
|
|
19
20
|
|
|
20
21
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
21
22
|
const viewportBreakpoint = 1440
|
|
@@ -25,14 +26,20 @@ const GlobalBodyScrollLock = createGlobalStyle({
|
|
|
25
26
|
})
|
|
26
27
|
|
|
27
28
|
const StyledFootnote = styled.div(
|
|
28
|
-
({
|
|
29
|
+
({
|
|
30
|
+
$footnoteBackground,
|
|
31
|
+
$isVisible,
|
|
32
|
+
$footnoteBorderTop,
|
|
33
|
+
$isScrollable,
|
|
34
|
+
$isMobileFullScreen
|
|
35
|
+
}) => ({
|
|
29
36
|
position: 'fixed',
|
|
30
|
-
overflowY: isVisible && isScrollable ? 'scroll' : 'hidden',
|
|
37
|
+
overflowY: $isVisible && $isScrollable ? 'scroll' : 'hidden',
|
|
31
38
|
top: 0,
|
|
32
39
|
left: window.innerWidth >= viewportBreakpoint ? '50%' : 0,
|
|
33
40
|
height: '100vh',
|
|
34
41
|
width: '100vw',
|
|
35
|
-
backgroundColor: footnoteBackground,
|
|
42
|
+
backgroundColor: $footnoteBackground,
|
|
36
43
|
display: 'block',
|
|
37
44
|
transform: 'translateY(100%)',
|
|
38
45
|
translate: window.innerWidth >= viewportBreakpoint ? '-50%' : '',
|
|
@@ -41,19 +48,19 @@ const StyledFootnote = styled.div(
|
|
|
41
48
|
transition: 'none'
|
|
42
49
|
},
|
|
43
50
|
zIndex: 99999,
|
|
44
|
-
visibility: isVisible ? 'visible' : 'hidden',
|
|
51
|
+
visibility: $isVisible ? 'visible' : 'hidden',
|
|
45
52
|
...media()
|
|
46
|
-
.from(isMobileFullScreen ? 'md' : 'xs')
|
|
53
|
+
.from($isMobileFullScreen ? 'md' : 'xs')
|
|
47
54
|
.css({
|
|
48
55
|
top: 'auto',
|
|
49
56
|
bottom: 0,
|
|
50
57
|
height: 'auto',
|
|
51
58
|
maxHeight: '50vh',
|
|
52
|
-
borderTop: footnoteBorderTop
|
|
59
|
+
borderTop: $footnoteBorderTop
|
|
53
60
|
})
|
|
54
61
|
}),
|
|
55
|
-
({ isOpen }) => {
|
|
56
|
-
if (isOpen) {
|
|
62
|
+
({ $isOpen }) => {
|
|
63
|
+
if ($isOpen) {
|
|
57
64
|
return {
|
|
58
65
|
transform: 'translateY(0)'
|
|
59
66
|
}
|
|
@@ -69,90 +76,96 @@ const StyledFootnoteHeader = styled.div(() => ({
|
|
|
69
76
|
|
|
70
77
|
const StyledHeader = styled.div(
|
|
71
78
|
({
|
|
72
|
-
footnoteHeaderPaddingLeft,
|
|
73
|
-
footnoteHeaderPaddingRight,
|
|
74
|
-
footnoteHeaderPaddingTop,
|
|
75
|
-
footnoteHeaderPaddingBottom
|
|
79
|
+
$footnoteHeaderPaddingLeft,
|
|
80
|
+
$footnoteHeaderPaddingRight,
|
|
81
|
+
$footnoteHeaderPaddingTop,
|
|
82
|
+
$footnoteHeaderPaddingBottom
|
|
76
83
|
}) => ({
|
|
77
84
|
alignItems: 'center',
|
|
78
85
|
display: 'flex',
|
|
79
86
|
flexDirection: 'row',
|
|
80
87
|
justifyContent: 'space-between',
|
|
81
|
-
paddingTop: footnoteHeaderPaddingTop,
|
|
82
|
-
paddingBottom: footnoteHeaderPaddingBottom,
|
|
83
|
-
paddingRight: footnoteHeaderPaddingRight,
|
|
84
|
-
paddingLeft: footnoteHeaderPaddingLeft
|
|
88
|
+
paddingTop: $footnoteHeaderPaddingTop,
|
|
89
|
+
paddingBottom: $footnoteHeaderPaddingBottom,
|
|
90
|
+
paddingRight: $footnoteHeaderPaddingRight,
|
|
91
|
+
paddingLeft: $footnoteHeaderPaddingLeft
|
|
85
92
|
})
|
|
86
93
|
)
|
|
87
94
|
|
|
88
95
|
const StyledFootnoteBody = styled.div(
|
|
89
|
-
({
|
|
96
|
+
({
|
|
97
|
+
$footnoteBodyBackground,
|
|
98
|
+
$footnoteBodyPadding,
|
|
99
|
+
$headerHeight,
|
|
100
|
+
$bodyHeight,
|
|
101
|
+
$isTextVisible
|
|
102
|
+
}) => ({
|
|
90
103
|
overflow: 'auto',
|
|
91
104
|
transition: 'height 300ms ease-out, opacity 200ms ease-out',
|
|
92
105
|
transform: 'translateZ(0)',
|
|
93
106
|
'@media() (prefers-reduced-motion: reduce)': {
|
|
94
107
|
transition: 'height 1ms ease-out, opacity 1ms ease-out'
|
|
95
108
|
},
|
|
96
|
-
backgroundColor: footnoteBodyBackground,
|
|
97
|
-
padding: footnoteBodyPadding,
|
|
98
|
-
maxHeight: `calc(100vh - ${headerHeight}px)`,
|
|
109
|
+
backgroundColor: $footnoteBodyBackground,
|
|
110
|
+
padding: $footnoteBodyPadding,
|
|
111
|
+
maxHeight: `calc(100vh - ${$headerHeight}px)`,
|
|
99
112
|
...media()
|
|
100
113
|
.from('md')
|
|
101
114
|
.css({
|
|
102
|
-
maxHeight: `calc(50vh - ${headerHeight}px)`
|
|
115
|
+
maxHeight: `calc(50vh - ${$headerHeight}px)`
|
|
103
116
|
}),
|
|
104
|
-
height: bodyHeight,
|
|
105
|
-
opacity: isTextVisible ? 1 : 0
|
|
117
|
+
height: $bodyHeight,
|
|
118
|
+
opacity: $isTextVisible ? 1 : 0
|
|
106
119
|
})
|
|
107
120
|
)
|
|
108
121
|
|
|
109
|
-
const List = styled(OrderedListBase)(({ listPaddingLeft }) => ({
|
|
122
|
+
const List = styled(OrderedListBase)(({ $listPaddingLeft }) => ({
|
|
110
123
|
listStylePosition: 'outside',
|
|
111
|
-
paddingLeft: listPaddingLeft
|
|
124
|
+
paddingLeft: $listPaddingLeft
|
|
112
125
|
}))
|
|
113
126
|
|
|
114
|
-
const ListItem = styled(
|
|
127
|
+
const ListItem = styled(OrderedListItemBase)(
|
|
115
128
|
({
|
|
116
|
-
listItemMarkerFontSize,
|
|
117
|
-
listItemMarkerLineHeight,
|
|
118
|
-
listItemColor,
|
|
119
|
-
listItemFontSize,
|
|
120
|
-
listItemLineHeight,
|
|
121
|
-
listItemPaddingLeft
|
|
129
|
+
$listItemMarkerFontSize,
|
|
130
|
+
$listItemMarkerLineHeight,
|
|
131
|
+
$listItemColor,
|
|
132
|
+
$listItemFontSize,
|
|
133
|
+
$listItemLineHeight,
|
|
134
|
+
$listItemPaddingLeft
|
|
122
135
|
}) => ({
|
|
123
136
|
display: 'list-item',
|
|
124
137
|
'&::marker': {
|
|
125
138
|
fontFamily: 'HNforTELUSSA400normal',
|
|
126
|
-
fontSize: listItemMarkerFontSize,
|
|
127
|
-
lineHeight: listItemMarkerLineHeight,
|
|
139
|
+
fontSize: $listItemMarkerFontSize,
|
|
140
|
+
lineHeight: $listItemMarkerLineHeight,
|
|
128
141
|
textAlign: 'end !important'
|
|
129
142
|
},
|
|
130
|
-
color: listItemColor,
|
|
143
|
+
color: $listItemColor,
|
|
131
144
|
fontFamily: 'HNforTELUSSA400normal',
|
|
132
|
-
fontSize: listItemFontSize,
|
|
133
|
-
lineHeight: listItemLineHeight,
|
|
134
|
-
paddingLeft: listItemPaddingLeft
|
|
145
|
+
fontSize: $listItemFontSize,
|
|
146
|
+
lineHeight: $listItemLineHeight,
|
|
147
|
+
paddingLeft: $listItemPaddingLeft
|
|
135
148
|
})
|
|
136
149
|
)
|
|
137
150
|
|
|
138
151
|
const CloseButton = styled.button(
|
|
139
152
|
({
|
|
140
|
-
closeButtonBorder,
|
|
141
|
-
closeButtonHeight,
|
|
142
|
-
closeButtonBackgroundColor,
|
|
143
|
-
closeButtonMargin,
|
|
144
|
-
closeButtonWidth
|
|
153
|
+
$closeButtonBorder,
|
|
154
|
+
$closeButtonHeight,
|
|
155
|
+
$closeButtonBackgroundColor,
|
|
156
|
+
$closeButtonMargin,
|
|
157
|
+
$closeButtonWidth
|
|
145
158
|
}) => ({
|
|
146
159
|
alignItems: 'center',
|
|
147
160
|
borderRadius: '50%',
|
|
148
161
|
cursor: 'pointer',
|
|
149
162
|
display: 'flex',
|
|
150
163
|
justifyContent: 'center',
|
|
151
|
-
backgroundColor: closeButtonBackgroundColor,
|
|
152
|
-
border: closeButtonBorder,
|
|
153
|
-
height: closeButtonHeight,
|
|
154
|
-
margin: closeButtonMargin,
|
|
155
|
-
width: closeButtonWidth
|
|
164
|
+
backgroundColor: $closeButtonBackgroundColor,
|
|
165
|
+
border: $closeButtonBorder,
|
|
166
|
+
height: $closeButtonHeight,
|
|
167
|
+
margin: $closeButtonMargin,
|
|
168
|
+
width: $closeButtonWidth
|
|
156
169
|
})
|
|
157
170
|
)
|
|
158
171
|
|
|
@@ -164,17 +177,17 @@ const ContentContainer = styled.div(
|
|
|
164
177
|
right: 0,
|
|
165
178
|
maxWidth: '1200px'
|
|
166
179
|
},
|
|
167
|
-
({ maxWidth }) => ({
|
|
168
|
-
width: maxWidth
|
|
180
|
+
({ $maxWidth }) => ({
|
|
181
|
+
width: $maxWidth
|
|
169
182
|
})
|
|
170
183
|
)
|
|
171
184
|
|
|
172
185
|
const StyledCustomContentContainer = styled.div(
|
|
173
|
-
({ listItemColor, listItemFontSize, listItemLineHeight, listItemPaddingLeft }) => ({
|
|
174
|
-
fontSize: listItemFontSize,
|
|
175
|
-
lineHeight: listItemLineHeight,
|
|
176
|
-
paddingLeft: listItemPaddingLeft,
|
|
177
|
-
color: listItemColor,
|
|
186
|
+
({ $listItemColor, $listItemFontSize, $listItemLineHeight, $listItemPaddingLeft }) => ({
|
|
187
|
+
fontSize: $listItemFontSize,
|
|
188
|
+
lineHeight: $listItemLineHeight,
|
|
189
|
+
paddingLeft: $listItemPaddingLeft,
|
|
190
|
+
color: $listItemColor,
|
|
178
191
|
fontFamily: 'HNforTELUSSA400normal'
|
|
179
192
|
})
|
|
180
193
|
)
|
|
@@ -208,7 +221,7 @@ const usePrevious = (value) => {
|
|
|
208
221
|
* - When `Footnote` is open, the inert prop must be set on all children of body excluding the Footnote
|
|
209
222
|
* - When `Footnote` is closed, focus must return to the initiating element
|
|
210
223
|
*/
|
|
211
|
-
const Footnote = React.forwardRef((props, ref) => {
|
|
224
|
+
export const Footnote = React.forwardRef((props, ref) => {
|
|
212
225
|
const {
|
|
213
226
|
copy = 'en',
|
|
214
227
|
number,
|
|
@@ -436,10 +449,10 @@ const Footnote = React.forwardRef((props, ref) => {
|
|
|
436
449
|
if (React.isValidElement(data.content)) {
|
|
437
450
|
return (
|
|
438
451
|
<StyledCustomContentContainer
|
|
439
|
-
listItemColor={listItemColor}
|
|
440
|
-
listItemFontSize={listItemFontSize}
|
|
441
|
-
listItemLineHeight={listItemLineHeight}
|
|
442
|
-
listItemPaddingLeft={listItemPaddingLeft}
|
|
452
|
+
$listItemColor={listItemColor}
|
|
453
|
+
$listItemFontSize={listItemFontSize}
|
|
454
|
+
$listItemLineHeight={listItemLineHeight}
|
|
455
|
+
$listItemPaddingLeft={listItemPaddingLeft}
|
|
443
456
|
ref={contentRef}
|
|
444
457
|
>
|
|
445
458
|
{data.content}
|
|
@@ -447,14 +460,14 @@ const Footnote = React.forwardRef((props, ref) => {
|
|
|
447
460
|
)
|
|
448
461
|
}
|
|
449
462
|
return (
|
|
450
|
-
<List start={data.number} ref={contentRef} listPaddingLeft={listPaddingLeft}>
|
|
463
|
+
<List start={data.number} ref={contentRef} $listPaddingLeft={listPaddingLeft}>
|
|
451
464
|
<ListItem
|
|
452
|
-
listItemMarkerFontSize={listItemMarkerFontSize}
|
|
453
|
-
listItemMarkerLineHeight={listItemMarkerLineHeight}
|
|
454
|
-
listItemColor={listItemColor}
|
|
455
|
-
listItemFontSize={listItemFontSize}
|
|
456
|
-
listItemLineHeight={listItemLineHeight}
|
|
457
|
-
listItemPaddingLeft={listItemPaddingLeft}
|
|
465
|
+
$listItemMarkerFontSize={listItemMarkerFontSize}
|
|
466
|
+
$listItemMarkerLineHeight={listItemMarkerLineHeight}
|
|
467
|
+
$listItemColor={listItemColor}
|
|
468
|
+
$listItemFontSize={listItemFontSize}
|
|
469
|
+
$listItemLineHeight={listItemLineHeight}
|
|
470
|
+
$listItemPaddingLeft={listItemPaddingLeft}
|
|
458
471
|
>
|
|
459
472
|
<Typography
|
|
460
473
|
tokens={{
|
|
@@ -503,23 +516,23 @@ const Footnote = React.forwardRef((props, ref) => {
|
|
|
503
516
|
{isOpen && <GlobalBodyScrollLock />}
|
|
504
517
|
<StyledFootnote
|
|
505
518
|
ref={footnoteRef}
|
|
506
|
-
isOpen={isOpen}
|
|
507
|
-
isVisible={isVisible}
|
|
519
|
+
$isOpen={isOpen}
|
|
520
|
+
$isVisible={isVisible}
|
|
508
521
|
onTransitionEnd={handleStyledFootnoteTransitionEnd}
|
|
509
522
|
tabIndex={0}
|
|
510
|
-
footnoteBackground={footnoteBackground}
|
|
511
|
-
footnoteBorderTop={`${footnoteBorderTopSizeMd}px solid ${footnoteBorderColorMd}`}
|
|
512
|
-
isScrollable={isScrollable}
|
|
513
|
-
isMobileFullScreen={isMobileFullScreen}
|
|
523
|
+
$footnoteBackground={footnoteBackground}
|
|
524
|
+
$footnoteBorderTop={`${footnoteBorderTopSizeMd}px solid ${footnoteBorderColorMd}`}
|
|
525
|
+
$isScrollable={isScrollable}
|
|
526
|
+
$isMobileFullScreen={isMobileFullScreen}
|
|
514
527
|
>
|
|
515
|
-
<ContentContainer maxWidth={maxWidth}>
|
|
528
|
+
<ContentContainer $maxWidth={maxWidth}>
|
|
516
529
|
<StyledFootnoteHeader ref={headerRef} viewport={viewport}>
|
|
517
530
|
<StyledHeader
|
|
518
|
-
footnoteHeaderPaddingLeft={footnoteHeaderPaddingLeft}
|
|
519
|
-
footnoteHeaderPaddingRight={footnoteHeaderPaddingRight}
|
|
520
|
-
footnoteHeaderPaddingTop={footnoteHeaderPaddingTop}
|
|
521
|
-
footnoteHeaderPaddingBottom={footnoteHeaderPaddingBottom}
|
|
522
|
-
headerMargin={headerMargin}
|
|
531
|
+
$footnoteHeaderPaddingLeft={footnoteHeaderPaddingLeft}
|
|
532
|
+
$footnoteHeaderPaddingRight={footnoteHeaderPaddingRight}
|
|
533
|
+
$footnoteHeaderPaddingTop={footnoteHeaderPaddingTop}
|
|
534
|
+
$footnoteHeaderPaddingBottom={footnoteHeaderPaddingBottom}
|
|
535
|
+
$headerMargin={headerMargin}
|
|
523
536
|
>
|
|
524
537
|
<Typography
|
|
525
538
|
tokens={{
|
|
@@ -532,11 +545,11 @@ const Footnote = React.forwardRef((props, ref) => {
|
|
|
532
545
|
</Typography>
|
|
533
546
|
<CloseButton
|
|
534
547
|
ref={closeButtonRef}
|
|
535
|
-
closeButtonBorder={`${closeButtonBorderSize} solid ${closeButtonBorderColor}`}
|
|
536
|
-
closeButtonWidth={`${closeButtonWidth}px`}
|
|
537
|
-
closeButtonHeight={`${closeButtonHeight}px`}
|
|
538
|
-
closeButtonBackgroundColor={closeButtonBackgroundColor}
|
|
539
|
-
closeButtonMargin={`${closeButtonMarginTop}px ${closeButtonMarginRight}px ${closeButtonMarginBottom}px ${closeButtonMarginLeft}px`}
|
|
548
|
+
$closeButtonBorder={`${closeButtonBorderSize} solid ${closeButtonBorderColor}`}
|
|
549
|
+
$closeButtonWidth={`${closeButtonWidth}px`}
|
|
550
|
+
$closeButtonHeight={`${closeButtonHeight}px`}
|
|
551
|
+
$closeButtonBackgroundColor={closeButtonBackgroundColor}
|
|
552
|
+
$closeButtonMargin={`${closeButtonMarginTop}px ${closeButtonMarginRight}px ${closeButtonMarginBottom}px ${closeButtonMarginLeft}px`}
|
|
540
553
|
onClick={(event) => {
|
|
541
554
|
closeFootnote(event, { returnFocus: true })
|
|
542
555
|
}}
|
|
@@ -548,13 +561,13 @@ const Footnote = React.forwardRef((props, ref) => {
|
|
|
548
561
|
</StyledFootnoteHeader>
|
|
549
562
|
<StyledFootnoteBody
|
|
550
563
|
ref={bodyRef}
|
|
551
|
-
bodyHeight={bodyHeight}
|
|
552
|
-
headerHeight={headerHeight}
|
|
553
|
-
isTextVisible={isTextVisible}
|
|
564
|
+
$bodyHeight={bodyHeight}
|
|
565
|
+
$headerHeight={headerHeight}
|
|
566
|
+
$isTextVisible={isTextVisible}
|
|
554
567
|
onTransitionEnd={handleTransitionEnd}
|
|
555
568
|
maxWidth={theme.contentMaxWidth}
|
|
556
|
-
footnoteBodyBackground={footnoteBodyBackground}
|
|
557
|
-
footnoteBodyPadding={`${footnoteBodyPaddingTop}px ${footnoteBodyPaddingRight}px ${footnoteBodyPaddingBottom}px ${footnoteBodyPaddingLeft}px`}
|
|
569
|
+
$footnoteBodyBackground={footnoteBodyBackground}
|
|
570
|
+
$footnoteBodyPadding={`${footnoteBodyPaddingTop}px ${footnoteBodyPaddingRight}px ${footnoteBodyPaddingBottom}px ${footnoteBodyPaddingLeft}px`}
|
|
558
571
|
>
|
|
559
572
|
{getFootnoteBodyContent()}
|
|
560
573
|
</StyledFootnoteBody>
|
|
@@ -619,5 +632,3 @@ Footnote.propTypes = {
|
|
|
619
632
|
*/
|
|
620
633
|
isMobileFullScreen: PropTypes.bool
|
|
621
634
|
}
|
|
622
|
-
|
|
623
|
-
export default Footnote
|
|
@@ -8,27 +8,27 @@ import {
|
|
|
8
8
|
variantProp
|
|
9
9
|
} from '@telus-uds/components-base'
|
|
10
10
|
import styled from 'styled-components'
|
|
11
|
-
import dictionary from './dictionary'
|
|
11
|
+
import { dictionary } from './dictionary'
|
|
12
12
|
import { htmlAttrs } from '../utils'
|
|
13
13
|
|
|
14
14
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
15
15
|
|
|
16
16
|
const StyledSup = styled.sup(
|
|
17
|
-
({ fontSize, lineHeight, paddingLeft, paddingRight,
|
|
17
|
+
({ $fontSize, $lineHeight, $paddingLeft, $paddingRight, $fontName, $fontWeight, $color }) => {
|
|
18
18
|
return {
|
|
19
19
|
border: 0,
|
|
20
|
-
color: 'inherit',
|
|
20
|
+
color: $color ?? 'inherit',
|
|
21
21
|
cursor: 'pointer',
|
|
22
22
|
// we want to fallback on 'smaller' but have a valid size when a custom font size is provided.
|
|
23
|
-
fontSize: fontSize ? `${fontSize}px` : 'smaller',
|
|
24
|
-
lineHeight: lineHeight ?? `${fontSize * 2}px`,
|
|
23
|
+
fontSize: $fontSize ? `${$fontSize}px` : 'smaller',
|
|
24
|
+
lineHeight: $lineHeight ?? `${$fontSize * 2}px`,
|
|
25
25
|
margin: 0,
|
|
26
26
|
paddingVertical: 0,
|
|
27
|
-
paddingLeft,
|
|
28
|
-
paddingRight,
|
|
27
|
+
paddingLeft: $paddingLeft,
|
|
28
|
+
paddingRight: $paddingRight,
|
|
29
29
|
textDecoration: 'underline',
|
|
30
30
|
// apply font family
|
|
31
|
-
...applyTextStyles(
|
|
31
|
+
...applyTextStyles({ fontName: $fontName, fontWeight: $fontWeight })
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
)
|
|
@@ -42,7 +42,7 @@ const StyledSup = styled.sup(
|
|
|
42
42
|
* - Avoid using FootnoteLink if there is only one annotation on a page. Consider including
|
|
43
43
|
* the annotation as part of the content whenever possible.
|
|
44
44
|
*/
|
|
45
|
-
const FootnoteLink = React.forwardRef(
|
|
45
|
+
export const FootnoteLink = React.forwardRef(
|
|
46
46
|
({ copy = 'en', number = [], onClick, fontSize, tokens, variant = {}, ...rest }, ref) => {
|
|
47
47
|
const themeTokens = useThemeTokens('FootnoteLink', tokens, variant)
|
|
48
48
|
const numbers = Array.isArray(number) ? number : [number]
|
|
@@ -76,8 +76,13 @@ const FootnoteLink = React.forwardRef(
|
|
|
76
76
|
onClick={(event) => handleOnClick(event, index)}
|
|
77
77
|
tabIndex={0}
|
|
78
78
|
{...selectProps(rest)}
|
|
79
|
-
{
|
|
80
|
-
|
|
79
|
+
$fontSize={fontSize ?? themeTokens.fontSize}
|
|
80
|
+
$lineHeight={themeTokens.lineHeight}
|
|
81
|
+
$paddingLeft={themeTokens.paddingLeft}
|
|
82
|
+
$paddingRight={themeTokens.paddingRight}
|
|
83
|
+
$fontName={themeTokens.fontName}
|
|
84
|
+
$fontWeight={themeTokens.fontWeight}
|
|
85
|
+
$color={themeTokens.color}
|
|
81
86
|
>
|
|
82
87
|
{`${num}${index !== numbers.length - 1 ? ',' : ''}`}
|
|
83
88
|
</StyledSup>
|
|
@@ -120,5 +125,3 @@ FootnoteLink.propTypes = {
|
|
|
120
125
|
*/
|
|
121
126
|
fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
122
127
|
}
|
|
123
|
-
|
|
124
|
-
export default FootnoteLink
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getTokensPropType
|
|
7
7
|
} from '@telus-uds/components-base'
|
|
8
8
|
|
|
9
|
-
const IconButton = React.forwardRef(
|
|
9
|
+
export const IconButton = React.forwardRef(
|
|
10
10
|
({ icon = null, action, tokens = {}, variant = {}, ...iconButtonProps }, ref) => {
|
|
11
11
|
const variantWithAction = action && !variant.action ? { ...variant, action } : variant
|
|
12
12
|
const { icon: themeIcon } = useThemeTokens('IconButton', tokens, variantWithAction)
|
|
@@ -55,5 +55,3 @@ IconButton.propTypes = {
|
|
|
55
55
|
*/
|
|
56
56
|
icon: PropTypes.func
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
export default IconButton
|
package/src/Image/Image.jsx
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
1
3
|
import React from 'react'
|
|
2
4
|
import PropTypes from 'prop-types'
|
|
3
5
|
import { htmlAttrs, selectSystemProps, getTokensPropType } from '@telus-uds/components-base/server'
|
|
4
6
|
import { warn } from '../utils/logger'
|
|
7
|
+
import { withClientTheme } from '../utils/theming/with-client-theme'
|
|
5
8
|
|
|
6
9
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
7
10
|
|
|
@@ -85,4 +88,9 @@ Image.propTypes = {
|
|
|
85
88
|
|
|
86
89
|
Image.displayName = 'Image'
|
|
87
90
|
|
|
88
|
-
|
|
91
|
+
// Export unwrapped component for react-docgen to extract info for docsite
|
|
92
|
+
export { Image as DefaultImage }
|
|
93
|
+
|
|
94
|
+
// Export wrapped component as main Image export
|
|
95
|
+
const ClientThemedImage = withClientTheme(Image)
|
|
96
|
+
export { ClientThemedImage as Image }
|
package/src/Image/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import withServerTheme from '../utils/theming/with-server-theme'
|
|
2
|
-
import
|
|
1
|
+
import { withServerTheme } from '../utils/theming/with-server-theme'
|
|
2
|
+
import { DefaultImage } from './Image'
|
|
3
3
|
|
|
4
|
-
const ServerThemedImage = withServerTheme(
|
|
5
|
-
export
|
|
4
|
+
const ServerThemedImage = withServerTheme(DefaultImage, 'Image')
|
|
5
|
+
export { ServerThemedImage }
|
package/src/List/List.jsx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { List } from '@telus-uds/components-base'
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export { List }
|
package/src/List/ListItem.jsx
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { ListItem as ListItemBase, Typography } from '@telus-uds/components-base'
|
|
4
4
|
|
|
5
|
-
const ListItem = React.forwardRef(({ children, title, ...rest }, ref) => (
|
|
5
|
+
export const ListItem = React.forwardRef(({ children, title, ...rest }, ref) => (
|
|
6
6
|
<ListItemBase ref={ref} {...rest}>
|
|
7
7
|
{Boolean(title) && <Typography variant={{ size: 'h4' }}>{title}</Typography>}
|
|
8
8
|
{children}
|
|
@@ -15,5 +15,3 @@ ListItem.propTypes = {
|
|
|
15
15
|
children: PropTypes.node.isRequired,
|
|
16
16
|
title: PropTypes.string
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
export default ListItem
|
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
} from '@telus-uds/components-base'
|
|
15
15
|
import styled from 'styled-components'
|
|
16
16
|
import { htmlAttrs, scrollToAnchor } from '../utils'
|
|
17
|
-
import NavigationItem from './NavigationItem'
|
|
18
|
-
import NavigationSubMenu from './NavigationSubMenu'
|
|
19
|
-
import collapseItems from './collapseItems'
|
|
17
|
+
import { NavigationItem } from './NavigationItem'
|
|
18
|
+
import { NavigationSubMenu } from './NavigationSubMenu'
|
|
19
|
+
import { collapseItems } from './collapseItems'
|
|
20
20
|
|
|
21
21
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
22
22
|
|
|
@@ -41,7 +41,7 @@ const ContentWrapper = styled.div(({ maxWidth }) => ({
|
|
|
41
41
|
* NavigationBar can be used to allow customers to consistently navigate across
|
|
42
42
|
* key pages within a specific product line
|
|
43
43
|
*/
|
|
44
|
-
const NavigationBar = React.forwardRef(
|
|
44
|
+
export const NavigationBar = React.forwardRef(
|
|
45
45
|
(
|
|
46
46
|
{
|
|
47
47
|
accessibilityRole = 'navigation',
|
|
@@ -339,5 +339,3 @@ NavigationBar.propTypes = {
|
|
|
339
339
|
xs: PropTypes.oneOfType([PropTypes.oneOf(['max', 'full']), PropTypes.number])
|
|
340
340
|
})
|
|
341
341
|
}
|
|
342
|
-
|
|
343
|
-
export default NavigationBar
|
|
@@ -15,14 +15,14 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
|
15
15
|
|
|
16
16
|
const defaultMaxWidth = 192
|
|
17
17
|
|
|
18
|
-
const ItemContainer = styled.div(({ targetWidth, viewport }) => ({
|
|
18
|
+
const ItemContainer = styled.div(({ $targetWidth, $viewport }) => ({
|
|
19
19
|
display: 'flex',
|
|
20
20
|
flexDirection: 'column',
|
|
21
21
|
justifyContent: 'center',
|
|
22
|
-
maxWidth: viewport !== 'xs' ? `${Math.max(defaultMaxWidth, targetWidth ?? 0)}px` : '100%',
|
|
23
|
-
flexGrow: targetWidth ? 1 : 0,
|
|
22
|
+
maxWidth: $viewport !== 'xs' ? `${Math.max(defaultMaxWidth, $targetWidth ?? 0)}px` : '100%',
|
|
23
|
+
flexGrow: $targetWidth ? 1 : 0,
|
|
24
24
|
flexShrink: 1,
|
|
25
|
-
...(viewport === 'xs' && {
|
|
25
|
+
...($viewport === 'xs' && {
|
|
26
26
|
width: '100%',
|
|
27
27
|
flex: 1
|
|
28
28
|
})
|
|
@@ -33,7 +33,7 @@ const ItemContainer = styled.div(({ targetWidth, viewport }) => ({
|
|
|
33
33
|
*
|
|
34
34
|
* This is rendered automatically by `NavigationBar` and isn't intended be used directly.
|
|
35
35
|
*/
|
|
36
|
-
const NavigationItem = React.forwardRef(
|
|
36
|
+
export const NavigationItem = React.forwardRef(
|
|
37
37
|
(
|
|
38
38
|
{
|
|
39
39
|
accessibilityRole = 'link', // @todo switch to 'button' for dropdowns
|
|
@@ -66,7 +66,7 @@ const NavigationItem = React.forwardRef(
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
return (
|
|
69
|
-
<ItemContainer targetWidth={targetWidth} viewport={viewport}>
|
|
69
|
+
<ItemContainer $targetWidth={targetWidth} $viewport={viewport}>
|
|
70
70
|
<Button
|
|
71
71
|
accessibilityRole={accessibilityRole}
|
|
72
72
|
accessibilityState={accessibilityState}
|
|
@@ -94,5 +94,3 @@ NavigationItem.propTypes = {
|
|
|
94
94
|
selected: PropTypes.bool,
|
|
95
95
|
children: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
export default NavigationItem
|
|
@@ -5,11 +5,12 @@ import {
|
|
|
5
5
|
useResponsiveProp,
|
|
6
6
|
useThemeTokens,
|
|
7
7
|
Listbox,
|
|
8
|
+
ListboxOverlay,
|
|
8
9
|
getTokensPropType
|
|
9
10
|
} from '@telus-uds/components-base'
|
|
10
|
-
import NavigationItem from './NavigationItem'
|
|
11
|
-
import useOverlaidPosition from '../utils/useOverlaidPosition'
|
|
12
|
-
import resolveItemSelection from './resolveItemSelection'
|
|
11
|
+
import { NavigationItem } from './NavigationItem'
|
|
12
|
+
import { useOverlaidPosition } from '../utils/useOverlaidPosition'
|
|
13
|
+
import { resolveItemSelection } from './resolveItemSelection'
|
|
13
14
|
|
|
14
15
|
const MIN_WIDTH = 192
|
|
15
16
|
const MAX_WIDTH = 289
|
|
@@ -44,7 +45,7 @@ const getResponsiveBreakpoints = (sourceWidth) => ({
|
|
|
44
45
|
*
|
|
45
46
|
* This is rendered automatically by `NavigationBar` and isn't intended be used directly.
|
|
46
47
|
*/
|
|
47
|
-
const NavigationSubMenu = React.forwardRef(
|
|
48
|
+
export const NavigationSubMenu = React.forwardRef(
|
|
48
49
|
(
|
|
49
50
|
{
|
|
50
51
|
children,
|
|
@@ -114,7 +115,7 @@ const NavigationSubMenu = React.forwardRef(
|
|
|
114
115
|
</NavigationItem>
|
|
115
116
|
{isOpen && (
|
|
116
117
|
<>
|
|
117
|
-
<
|
|
118
|
+
<ListboxOverlay
|
|
118
119
|
overlaidPosition={overlaidPosition}
|
|
119
120
|
maxWidth={maxWidth}
|
|
120
121
|
minWidth={minWidth}
|
|
@@ -133,7 +134,7 @@ const NavigationSubMenu = React.forwardRef(
|
|
|
133
134
|
variant={variant}
|
|
134
135
|
ref={itemsContainerRef || ref}
|
|
135
136
|
/>
|
|
136
|
-
</
|
|
137
|
+
</ListboxOverlay>
|
|
137
138
|
<div
|
|
138
139
|
// This catches and shifts focus to other interactive elements.
|
|
139
140
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
@@ -166,5 +167,3 @@ NavigationSubMenu.propTypes = {
|
|
|
166
167
|
itemsContainerRef: PropTypes.object,
|
|
167
168
|
variant: PropTypes.object
|
|
168
169
|
}
|
|
169
|
-
|
|
170
|
-
export default NavigationSubMenu
|
|
@@ -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
|
|
@@ -25,5 +25,3 @@ const collapseItems = (items, selectedId) => {
|
|
|
25
25
|
|
|
26
26
|
return [{ id: 'navigation-bar-root', label: rootLabel, items }]
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
export default collapseItems
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const resolveItemSelection = ({ id, label, items }, selectedId) => {
|
|
1
|
+
export const resolveItemSelection = ({ id, label, items }, selectedId) => {
|
|
2
2
|
const itemId = id ?? label
|
|
3
3
|
|
|
4
4
|
// Treat item as selected if it or any nested child matches the selected id
|
|
@@ -7,5 +7,3 @@ const resolveItemSelection = ({ id, label, items }, selectedId) => {
|
|
|
7
7
|
)
|
|
8
8
|
return { itemId, selected }
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
export default resolveItemSelection
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
|
|
8
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
9
9
|
|
|
10
|
-
const OptimizeImage = React.forwardRef(
|
|
10
|
+
export const OptimizeImage = React.forwardRef(
|
|
11
11
|
(
|
|
12
12
|
{
|
|
13
13
|
contentfulAssetUrl,
|
|
@@ -24,8 +24,7 @@ const OptimizeImage = React.forwardRef(
|
|
|
24
24
|
},
|
|
25
25
|
ref
|
|
26
26
|
) => {
|
|
27
|
-
|
|
28
|
-
const dimension = sizeByHeight || rest.useHeight ? 'h' : 'w'
|
|
27
|
+
const dimension = sizeByHeight ? 'h' : 'w'
|
|
29
28
|
// by default assuming webP support for SSR
|
|
30
29
|
const [imgUrls, setImgUrls] = React.useState(
|
|
31
30
|
getImageUrls(contentfulAssetUrl, dimension, xs, sm, md, lg, xl, quality, disableRetina, true)
|
|
@@ -106,5 +105,3 @@ OptimizeImage.propTypes = {
|
|
|
106
105
|
*/
|
|
107
106
|
loading: PropTypes.oneOf(['eager', 'lazy'])
|
|
108
107
|
}
|
|
109
|
-
|
|
110
|
-
export default OptimizeImage
|