@telus-uds/components-web 4.19.0 → 5.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +12 -0
- package/CHANGELOG.md +24 -1
- package/lib/cjs/Badge/Badge.js +26 -27
- package/lib/cjs/BlockQuote/BlockQuote.js +24 -25
- package/lib/cjs/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +36 -37
- package/lib/cjs/Breadcrumbs/Breadcrumbs.js +8 -10
- package/lib/cjs/Callout/Callout.js +24 -25
- package/lib/cjs/Card/Card.js +79 -89
- package/lib/cjs/Card/CardContent.js +53 -29
- package/lib/cjs/Card/CardFooter.js +28 -18
- package/lib/cjs/Countdown/Countdown.js +7 -8
- package/lib/cjs/Countdown/Segment.js +10 -11
- package/lib/cjs/Countdown/dictionary.js +2 -2
- package/lib/cjs/Countdown/types.js +2 -6
- package/lib/cjs/Countdown/useCountdown.js +2 -2
- package/lib/cjs/DatePicker/CalendarContainer.js +66 -67
- package/lib/cjs/DatePicker/DatePicker.js +27 -28
- package/lib/cjs/DatePicker/dictionary.js +3 -4
- package/lib/cjs/DatePicker/reactDatesCss.js +2 -3
- package/lib/cjs/Disclaimer/Disclaimer.js +28 -13
- package/lib/cjs/Footnote/Footnote.js +108 -109
- package/lib/cjs/Footnote/FootnoteLink.js +28 -19
- package/lib/cjs/Footnote/dictionary.js +2 -2
- package/lib/cjs/IconButton/IconButton.js +3 -4
- package/lib/cjs/Image/Image.js +9 -3
- package/lib/cjs/Image/server.js +4 -6
- package/lib/cjs/List/List.js +7 -3
- package/lib/cjs/List/ListItem.js +3 -4
- package/lib/cjs/NavigationBar/NavigationBar.js +8 -9
- package/lib/cjs/NavigationBar/NavigationItem.js +10 -11
- package/lib/cjs/NavigationBar/NavigationSubMenu.js +10 -11
- package/lib/cjs/NavigationBar/collapseItems.js +2 -2
- package/lib/cjs/NavigationBar/resolveItemSelection.js +2 -2
- package/lib/cjs/OptimizeImage/OptimizeImage.js +6 -8
- package/lib/cjs/OptimizeImage/utils/getFallbackUrl.js +3 -4
- package/lib/cjs/OptimizeImage/utils/getImageUrls.js +9 -10
- package/lib/cjs/OptimizeImage/utils/getOptimizedUrl.js +3 -4
- package/lib/cjs/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/lib/cjs/OptimizeImage/utils/index.js +8 -9
- package/lib/cjs/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/lib/cjs/OrderedList/OrderedList.js +6 -9
- package/lib/cjs/OrderedList/OrderedListBase.js +4 -7
- package/lib/cjs/OrderedList/{Item.js → OrderedListItem.js} +46 -39
- package/lib/cjs/OrderedList/{ItemBase.js → OrderedListItemBase.js} +7 -7
- package/lib/cjs/OrderedList/constants.js +0 -1
- package/lib/cjs/Paragraph/Paragraph.js +10 -11
- package/lib/cjs/PreviewCard/PreviewCard.js +18 -27
- package/lib/cjs/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +6 -6
- package/lib/cjs/PriceLockup/PriceLockup.js +61 -60
- package/lib/cjs/PriceLockup/dictionary.js +2 -2
- package/lib/cjs/PriceLockup/tokens.js +3 -3
- package/lib/cjs/Progress/ProgressBar.js +14 -17
- package/lib/cjs/QuantitySelector/QuantitySelector.js +8 -9
- package/lib/cjs/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +5 -6
- package/lib/cjs/QuantitySelector/dictionary.js +2 -2
- package/lib/cjs/ResponsiveImage/ResponsiveImage.js +3 -4
- package/lib/cjs/Ribbon/Ribbon.js +56 -65
- package/lib/cjs/SkeletonProvider/SkeletonImage.js +3 -4
- package/lib/cjs/SkeletonProvider/SkeletonProvider.js +10 -10
- package/lib/cjs/SkeletonProvider/SkeletonTypography.js +3 -4
- package/lib/cjs/Span/Span.js +6 -7
- package/lib/cjs/Spinner/Spinner.js +29 -29
- package/lib/cjs/Spinner/SpinnerContent.js +6 -7
- package/lib/cjs/StoryCard/StoryCard.js +17 -22
- package/lib/cjs/Table/Table.js +32 -25
- package/lib/cjs/Table/{Body.js → TableBody.js} +5 -6
- package/lib/cjs/Table/{Cell.js → TableCell.js} +59 -61
- package/lib/cjs/Table/{Header.js → TableHeader.js} +7 -8
- package/lib/cjs/Table/{Row.js → TableRow.js} +18 -19
- package/lib/cjs/Table/{SubHeading.js → TableSubHeading.js} +7 -8
- package/lib/cjs/TermsAndConditions/ExpandCollapse.js +18 -19
- package/lib/cjs/TermsAndConditions/TermsAndConditions.js +44 -44
- package/lib/cjs/TermsAndConditions/dictionary.js +2 -2
- package/lib/cjs/Testimonial/Testimonial.js +24 -31
- package/lib/cjs/Toast/Toast.js +28 -30
- package/lib/cjs/Video/ControlBar/ControlBar.js +48 -47
- package/lib/cjs/Video/ControlBar/Controls/VideoButton/VideoButton.js +6 -6
- package/lib/cjs/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +30 -32
- package/lib/cjs/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +35 -35
- package/lib/cjs/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +42 -42
- package/lib/cjs/Video/MiddleControlButton/MiddleControlButton.js +15 -15
- package/lib/cjs/Video/Video.js +27 -29
- package/lib/cjs/Video/videoText.js +3 -4
- package/lib/cjs/VideoPicker/VideoPicker.js +37 -33
- package/lib/cjs/VideoPicker/VideoPickerPlayer.js +5 -6
- package/lib/cjs/VideoPicker/VideoPickerThumbnail.js +28 -25
- package/lib/cjs/VideoPicker/VideoSlider.js +3 -4
- package/lib/cjs/WaffleGrid/WaffleGrid.js +51 -50
- package/lib/cjs/WebVideo/WebVideo.js +7 -8
- package/lib/cjs/baseExports.js +84 -0
- package/lib/cjs/index.js +179 -105
- package/lib/cjs/server.js +2 -3
- package/lib/cjs/shared/ConditionalWrapper/ConditionalWrapper.js +3 -3
- package/lib/cjs/shared/FullBleedContent/FullBleedContent.js +28 -22
- package/lib/cjs/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -2
- package/lib/cjs/shared/FullBleedContent/index.js +11 -10
- package/lib/cjs/shared/FullBleedContent/useFullBleedContentProps.js +2 -2
- package/lib/cjs/shared/VideoSplash/SplashButton/SplashButton.js +9 -9
- package/lib/cjs/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +50 -50
- package/lib/cjs/shared/VideoSplash/VideoSplash.js +12 -12
- package/lib/cjs/shared/VideoSplash/helpers.js +2 -3
- package/lib/cjs/utils/index.js +14 -15
- package/lib/cjs/utils/isElementFocusable.js +2 -2
- package/lib/cjs/utils/logger.js +2 -6
- package/lib/cjs/utils/media.js +1 -1
- package/lib/cjs/utils/renderStructuredContent.js +3 -4
- package/lib/cjs/utils/scrollToAnchor.js +2 -2
- package/lib/cjs/utils/ssr.js +2 -2
- package/lib/cjs/utils/theming/get-theme-from-server.js +2 -3
- package/lib/cjs/utils/theming/with-client-theme.js +2 -2
- package/lib/cjs/utils/theming/with-server-theme.js +4 -4
- package/lib/cjs/utils/transforms.js +2 -5
- package/lib/cjs/utils/useOverlaidPosition.js +2 -2
- package/lib/cjs/utils/useTypographyTheme.js +2 -2
- package/lib/esm/Badge/Badge.js +25 -26
- package/lib/esm/BlockQuote/BlockQuote.js +23 -24
- package/lib/esm/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +35 -36
- package/lib/esm/Breadcrumbs/Breadcrumbs.js +6 -7
- package/lib/esm/Callout/Callout.js +23 -24
- package/lib/esm/Card/Card.js +63 -71
- package/lib/esm/Card/CardContent.js +52 -28
- package/lib/esm/Card/CardFooter.js +27 -18
- package/lib/esm/Countdown/Countdown.js +4 -5
- package/lib/esm/Countdown/Segment.js +8 -9
- package/lib/esm/Countdown/dictionary.js +1 -1
- package/lib/esm/Countdown/types.js +1 -5
- package/lib/esm/Countdown/useCountdown.js +2 -3
- package/lib/esm/DatePicker/CalendarContainer.js +64 -65
- package/lib/esm/DatePicker/DatePicker.js +18 -19
- package/lib/esm/DatePicker/dictionary.js +2 -3
- package/lib/esm/DatePicker/reactDatesCss.js +1 -2
- package/lib/esm/Disclaimer/Disclaimer.js +27 -12
- package/lib/esm/Footnote/Footnote.js +104 -104
- package/lib/esm/Footnote/FootnoteLink.js +26 -17
- package/lib/esm/Footnote/dictionary.js +1 -1
- package/lib/esm/IconButton/IconButton.js +2 -3
- package/lib/esm/Image/Image.js +10 -1
- package/lib/esm/Image/server.js +4 -4
- package/lib/esm/List/List.js +2 -2
- package/lib/esm/List/ListItem.js +2 -3
- package/lib/esm/NavigationBar/NavigationBar.js +5 -6
- package/lib/esm/NavigationBar/NavigationItem.js +9 -10
- package/lib/esm/NavigationBar/NavigationSubMenu.js +7 -8
- package/lib/esm/NavigationBar/collapseItems.js +2 -3
- package/lib/esm/NavigationBar/resolveItemSelection.js +2 -3
- package/lib/esm/OptimizeImage/OptimizeImage.js +4 -6
- package/lib/esm/OptimizeImage/utils/getFallbackUrl.js +2 -2
- package/lib/esm/OptimizeImage/utils/getImageUrls.js +3 -3
- package/lib/esm/OptimizeImage/utils/getOptimizedUrl.js +2 -2
- package/lib/esm/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/lib/esm/OptimizeImage/utils/index.js +4 -4
- package/lib/esm/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/lib/esm/OrderedList/OrderedList.js +4 -7
- package/lib/esm/OrderedList/OrderedListBase.js +3 -6
- package/lib/esm/OrderedList/{Item.js → OrderedListItem.js} +45 -38
- package/lib/esm/OrderedList/{ItemBase.js → OrderedListItemBase.js} +5 -6
- package/lib/esm/OrderedList/constants.js +0 -1
- package/lib/esm/Paragraph/Paragraph.js +9 -10
- package/lib/esm/PreviewCard/PreviewCard.js +16 -21
- package/lib/esm/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +4 -5
- package/lib/esm/PriceLockup/PriceLockup.js +57 -56
- package/lib/esm/PriceLockup/dictionary.js +1 -1
- package/lib/esm/PriceLockup/tokens.js +1 -1
- package/lib/esm/Progress/ProgressBar.js +13 -16
- package/lib/esm/QuantitySelector/QuantitySelector.js +6 -7
- package/lib/esm/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +4 -5
- package/lib/esm/QuantitySelector/dictionary.js +1 -1
- package/lib/esm/ResponsiveImage/ResponsiveImage.js +2 -3
- package/lib/esm/Ribbon/Ribbon.js +55 -64
- package/lib/esm/SkeletonProvider/SkeletonImage.js +2 -3
- package/lib/esm/SkeletonProvider/SkeletonProvider.js +6 -7
- package/lib/esm/SkeletonProvider/SkeletonTypography.js +2 -3
- package/lib/esm/Span/Span.js +5 -6
- package/lib/esm/Spinner/Spinner.js +24 -24
- package/lib/esm/Spinner/SpinnerContent.js +5 -6
- package/lib/esm/StoryCard/StoryCard.js +15 -16
- package/lib/esm/Table/Table.js +31 -24
- package/lib/esm/Table/{Body.js → TableBody.js} +4 -5
- package/lib/esm/Table/{Cell.js → TableCell.js} +57 -58
- package/lib/esm/Table/{Header.js → TableHeader.js} +6 -7
- package/lib/esm/Table/{Row.js → TableRow.js} +17 -18
- package/lib/esm/Table/{SubHeading.js → TableSubHeading.js} +6 -7
- package/lib/esm/TermsAndConditions/ExpandCollapse.js +18 -19
- package/lib/esm/TermsAndConditions/TermsAndConditions.js +40 -40
- package/lib/esm/TermsAndConditions/dictionary.js +1 -1
- package/lib/esm/Testimonial/Testimonial.js +22 -29
- package/lib/esm/Toast/Toast.js +26 -27
- package/lib/esm/Video/ControlBar/ControlBar.js +33 -33
- package/lib/esm/Video/ControlBar/Controls/VideoButton/VideoButton.js +5 -6
- package/lib/esm/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +28 -31
- package/lib/esm/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +33 -34
- package/lib/esm/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +38 -39
- package/lib/esm/Video/MiddleControlButton/MiddleControlButton.js +14 -15
- package/lib/esm/Video/Video.js +19 -21
- package/lib/esm/Video/videoText.js +2 -3
- package/lib/esm/VideoPicker/VideoPicker.js +32 -27
- package/lib/esm/VideoPicker/VideoPickerPlayer.js +3 -4
- package/lib/esm/VideoPicker/VideoPickerThumbnail.js +26 -23
- package/lib/esm/VideoPicker/VideoSlider.js +2 -3
- package/lib/esm/WaffleGrid/WaffleGrid.js +49 -46
- package/lib/esm/WebVideo/WebVideo.js +5 -6
- package/lib/esm/baseExports.js +1 -1
- package/lib/esm/index.js +46 -37
- package/lib/esm/server.js +1 -2
- package/lib/esm/shared/ConditionalWrapper/ConditionalWrapper.js +2 -3
- package/lib/esm/shared/FullBleedContent/FullBleedContent.js +25 -20
- package/lib/esm/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -3
- package/lib/esm/shared/FullBleedContent/index.js +3 -4
- package/lib/esm/shared/FullBleedContent/useFullBleedContentProps.js +3 -5
- package/lib/esm/shared/VideoSplash/SplashButton/SplashButton.js +8 -9
- package/lib/esm/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +48 -49
- package/lib/esm/shared/VideoSplash/VideoSplash.js +8 -9
- package/lib/esm/shared/VideoSplash/helpers.js +1 -1
- package/lib/esm/utils/index.js +7 -7
- package/lib/esm/utils/isElementFocusable.js +2 -3
- package/lib/esm/utils/logger.js +0 -4
- package/lib/esm/utils/media.js +1 -1
- package/lib/esm/utils/renderStructuredContent.js +2 -3
- package/lib/esm/utils/scrollToAnchor.js +2 -3
- package/lib/esm/utils/ssr.js +2 -3
- package/lib/esm/utils/theming/get-theme-from-server.js +1 -1
- package/lib/esm/utils/theming/with-client-theme.js +2 -3
- package/lib/esm/utils/theming/with-server-theme.js +3 -4
- package/lib/esm/utils/transforms.js +1 -4
- package/lib/esm/utils/useOverlaidPosition.js +2 -3
- package/lib/esm/utils/useTypographyTheme.js +2 -3
- package/package.json +13 -22
- package/src/Badge/Badge.jsx +18 -20
- package/src/BlockQuote/BlockQuote.jsx +16 -18
- package/src/Breadcrumbs/{Item/Item.jsx → BreadcrumbItem.jsx} +20 -21
- package/src/Breadcrumbs/Breadcrumbs.jsx +6 -9
- package/src/Callout/Callout.jsx +16 -18
- package/src/Card/Card.jsx +59 -80
- package/src/Card/CardContent.jsx +52 -28
- package/src/Card/CardFooter.jsx +26 -12
- package/src/Countdown/Countdown.jsx +3 -5
- package/src/Countdown/Segment.jsx +6 -8
- package/src/Countdown/dictionary.js +1 -1
- package/src/Countdown/types.js +0 -2
- package/src/Countdown/useCountdown.js +1 -3
- package/src/DatePicker/CalendarContainer.jsx +65 -67
- package/src/DatePicker/DatePicker.jsx +17 -19
- package/src/DatePicker/dictionary.js +1 -3
- package/src/DatePicker/reactDatesCss.js +1 -3
- package/src/Disclaimer/Disclaimer.jsx +15 -8
- package/src/Footnote/Footnote.jsx +104 -93
- package/src/Footnote/FootnoteLink.jsx +16 -13
- package/src/Footnote/dictionary.js +1 -1
- package/src/IconButton/IconButton.jsx +1 -3
- package/src/Image/Image.jsx +9 -1
- package/src/Image/server.js +4 -4
- package/src/List/List.jsx +2 -2
- package/src/List/ListItem.jsx +1 -3
- package/src/NavigationBar/NavigationBar.jsx +4 -6
- package/src/NavigationBar/NavigationItem.jsx +6 -8
- package/src/NavigationBar/NavigationSubMenu.jsx +7 -8
- package/src/NavigationBar/collapseItems.js +1 -3
- package/src/NavigationBar/resolveItemSelection.js +1 -3
- package/src/OptimizeImage/OptimizeImage.jsx +3 -6
- package/src/OptimizeImage/utils/getFallbackUrl.js +2 -2
- package/src/OptimizeImage/utils/getImageUrls.js +3 -3
- package/src/OptimizeImage/utils/getOptimizedUrl.js +2 -9
- package/src/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/src/OptimizeImage/utils/index.js +4 -4
- package/src/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/src/OrderedList/OrderedList.jsx +3 -8
- package/src/OrderedList/OrderedListBase.jsx +2 -7
- package/src/OrderedList/{Item.jsx → OrderedListItem.jsx} +44 -32
- package/src/OrderedList/{ItemBase.jsx → OrderedListItemBase.jsx} +4 -4
- package/src/OrderedList/constants.js +0 -1
- package/src/Paragraph/Paragraph.jsx +7 -9
- package/src/PreviewCard/PreviewCard.jsx +16 -32
- package/src/PreviewCard/{AuthorDate.jsx → PreviewCardAuthorDate.jsx} +3 -5
- package/src/PriceLockup/PriceLockup.jsx +33 -31
- package/src/PriceLockup/dictionary.js +1 -1
- package/src/PriceLockup/tokens.js +1 -1
- package/src/Progress/ProgressBar.jsx +33 -30
- package/src/QuantitySelector/QuantitySelector.jsx +5 -7
- package/src/QuantitySelector/{SideButton.jsx → QuantitySelectorSideButton.jsx} +3 -4
- package/src/QuantitySelector/dictionary.js +1 -1
- package/src/ResponsiveImage/ResponsiveImage.jsx +1 -3
- package/src/Ribbon/Ribbon.jsx +35 -44
- package/src/SkeletonProvider/SkeletonImage.jsx +1 -3
- package/src/SkeletonProvider/SkeletonProvider.jsx +5 -9
- package/src/SkeletonProvider/SkeletonTypography.jsx +1 -3
- package/src/Span/Span.jsx +11 -11
- package/src/Spinner/Spinner.jsx +17 -19
- package/src/Spinner/SpinnerContent.jsx +4 -6
- package/src/StoryCard/StoryCard.jsx +15 -16
- package/src/Table/Table.jsx +81 -75
- package/src/Table/{Body.jsx → TableBody.jsx} +3 -5
- package/src/Table/{Cell.jsx → TableCell.jsx} +69 -65
- package/src/Table/{Header.jsx → TableHeader.jsx} +6 -8
- package/src/Table/{Row.jsx → TableRow.jsx} +11 -12
- package/src/Table/{SubHeading.jsx → TableSubHeading.jsx} +6 -8
- package/src/TermsAndConditions/ExpandCollapse.jsx +18 -19
- package/src/TermsAndConditions/TermsAndConditions.jsx +37 -37
- package/src/TermsAndConditions/dictionary.js +1 -1
- package/src/Testimonial/Testimonial.jsx +20 -28
- package/src/Toast/Toast.jsx +36 -35
- package/src/Video/ControlBar/ControlBar.jsx +28 -25
- package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +4 -6
- package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +26 -30
- package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +31 -33
- package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +40 -40
- package/src/Video/MiddleControlButton/MiddleControlButton.jsx +10 -12
- package/src/Video/Video.jsx +697 -683
- package/src/Video/videoText.js +1 -3
- package/src/VideoPicker/VideoPicker.jsx +37 -25
- package/src/VideoPicker/VideoPickerPlayer.jsx +2 -4
- package/src/VideoPicker/VideoPickerThumbnail.jsx +26 -15
- package/src/VideoPicker/VideoSlider.jsx +1 -3
- package/src/WaffleGrid/WaffleGrid.jsx +31 -27
- package/src/WebVideo/WebVideo.jsx +4 -6
- package/src/baseExports.js +27 -13
- package/src/index.js +46 -37
- package/src/server.js +1 -2
- package/src/shared/ConditionalWrapper/ConditionalWrapper.jsx +1 -3
- package/src/shared/FullBleedContent/FullBleedContent.jsx +26 -19
- package/src/shared/FullBleedContent/getFullBleedBorderRadius.js +1 -3
- package/src/shared/FullBleedContent/index.js +3 -8
- package/src/shared/FullBleedContent/useFullBleedContentProps.js +2 -5
- package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +5 -7
- package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +25 -25
- package/src/shared/VideoSplash/VideoSplash.jsx +7 -9
- package/src/shared/VideoSplash/helpers.js +1 -1
- package/src/utils/index.js +7 -7
- package/src/utils/isElementFocusable.js +1 -3
- package/src/utils/logger.js +0 -5
- package/src/utils/media.js +1 -1
- package/src/utils/renderStructuredContent.jsx +1 -3
- package/src/utils/scrollToAnchor.js +1 -3
- package/src/utils/ssr.js +1 -3
- package/src/utils/theming/get-theme-from-server.js +1 -1
- package/src/utils/theming/with-client-theme.jsx +1 -3
- package/src/utils/theming/with-server-theme.jsx +2 -4
- package/src/utils/transforms.js +0 -2
- package/src/utils/useOverlaidPosition.js +1 -3
- package/src/utils/useTypographyTheme.js +1 -3
- package/types/Autocomplete.d.ts +1 -3
- package/types/Badge.d.ts +1 -3
- package/types/BaseProvider.d.ts +1 -3
- package/types/BlockQuote.d.ts +1 -3
- package/types/Box.d.ts +1 -3
- package/types/BreadcrumbItem.d.ts +1 -3
- package/types/Breadcrumbs.d.ts +2 -4
- package/types/Callout.d.ts +1 -3
- package/types/Card.d.ts +1 -3
- package/types/Cell.d.ts +1 -3
- package/types/ControlBar.d.ts +1 -3
- package/types/Countdown.d.ts +1 -3
- package/types/DatePicker.d.ts +1 -3
- package/types/FileUpload.d.ts +1 -3
- package/types/Footnote.d.ts +1 -3
- package/types/FootnoteLink.d.ts +1 -3
- package/types/Listbox.d.ts +1 -3
- package/types/MiddleControlButton.d.ts +1 -3
- package/types/MultiSelectFilter.d.ts +1 -3
- package/types/PriceLockup.d.ts +1 -3
- package/types/QuantitySelector.d.ts +1 -3
- package/types/Ribbon.d.ts +1 -3
- package/types/Spinner.d.ts +1 -3
- package/types/Table.d.ts +1 -3
- package/types/Tooltip.d.ts +1 -3
- package/types/TooltipButton.d.ts +1 -3
- package/types/Typography.d.ts +1 -3
- package/types/Video.d.ts +1 -3
- package/types/VideoButton.d.ts +1 -3
- package/types/VideoMenu.d.ts +1 -3
- package/types/VideoProgressBar.d.ts +1 -3
- package/types/VolumeSlider.d.ts +1 -3
- package/types/WebVideo.d.ts +1 -3
- package/lib/cjs/Badge/index.js +0 -9
- package/lib/cjs/BlockQuote/index.js +0 -9
- package/lib/cjs/Breadcrumbs/index.js +0 -13
- package/lib/cjs/Callout/index.js +0 -9
- package/lib/cjs/Card/index.js +0 -9
- package/lib/cjs/Countdown/index.js +0 -9
- package/lib/cjs/DatePicker/index.js +0 -9
- package/lib/cjs/Disclaimer/index.js +0 -13
- package/lib/cjs/Footnote/index.js +0 -11
- package/lib/cjs/IconButton/index.js +0 -9
- package/lib/cjs/Image/index.js +0 -20
- package/lib/cjs/List/index.js +0 -17
- package/lib/cjs/NavigationBar/index.js +0 -11
- package/lib/cjs/OptimizeImage/index.js +0 -9
- package/lib/cjs/OrderedList/index.js +0 -17
- package/lib/cjs/Paragraph/index.js +0 -9
- package/lib/cjs/PreviewCard/index.js +0 -9
- package/lib/cjs/PriceLockup/index.js +0 -9
- package/lib/cjs/Progress/index.js +0 -11
- package/lib/cjs/QuantitySelector/index.js +0 -9
- package/lib/cjs/ResponsiveImage/index.js +0 -9
- package/lib/cjs/Ribbon/index.js +0 -9
- package/lib/cjs/SkeletonProvider/index.js +0 -9
- package/lib/cjs/Span/index.js +0 -9
- package/lib/cjs/Spinner/index.js +0 -9
- package/lib/cjs/StoryCard/index.js +0 -9
- package/lib/cjs/Table/index.js +0 -24
- package/lib/cjs/TermsAndConditions/index.js +0 -13
- package/lib/cjs/Testimonial/index.js +0 -9
- package/lib/cjs/Toast/index.js +0 -9
- package/lib/cjs/Video/index.js +0 -9
- package/lib/cjs/VideoPicker/index.js +0 -9
- package/lib/cjs/WaffleGrid/index.js +0 -9
- package/lib/cjs/WebVideo/index.js +0 -9
- package/lib/cjs/shared/ConditionalWrapper/index.js +0 -9
- package/lib/esm/Badge/index.js +0 -2
- package/lib/esm/BlockQuote/index.js +0 -2
- package/lib/esm/Breadcrumbs/index.js +0 -1
- package/lib/esm/Callout/index.js +0 -2
- package/lib/esm/Card/index.js +0 -2
- package/lib/esm/Countdown/index.js +0 -2
- package/lib/esm/DatePicker/index.js +0 -2
- package/lib/esm/Disclaimer/index.js +0 -1
- package/lib/esm/Footnote/index.js +0 -4
- package/lib/esm/IconButton/index.js +0 -2
- package/lib/esm/Image/index.js +0 -9
- package/lib/esm/List/index.js +0 -5
- package/lib/esm/NavigationBar/index.js +0 -4
- package/lib/esm/OptimizeImage/index.js +0 -2
- package/lib/esm/OrderedList/index.js +0 -5
- package/lib/esm/Paragraph/index.js +0 -2
- package/lib/esm/PreviewCard/index.js +0 -2
- package/lib/esm/PriceLockup/index.js +0 -2
- package/lib/esm/Progress/index.js +0 -4
- package/lib/esm/QuantitySelector/index.js +0 -2
- package/lib/esm/ResponsiveImage/index.js +0 -2
- package/lib/esm/Ribbon/index.js +0 -2
- package/lib/esm/SkeletonProvider/index.js +0 -2
- package/lib/esm/Span/index.js +0 -2
- package/lib/esm/Spinner/index.js +0 -2
- package/lib/esm/StoryCard/index.js +0 -2
- package/lib/esm/Table/index.js +0 -17
- package/lib/esm/TermsAndConditions/index.js +0 -1
- package/lib/esm/Testimonial/index.js +0 -2
- package/lib/esm/Toast/index.js +0 -2
- package/lib/esm/Video/index.js +0 -2
- package/lib/esm/VideoPicker/index.js +0 -2
- package/lib/esm/WaffleGrid/index.js +0 -2
- package/lib/esm/WebVideo/index.js +0 -2
- package/lib/esm/shared/ConditionalWrapper/index.js +0 -2
- package/src/Badge/index.js +0 -3
- package/src/BlockQuote/index.js +0 -3
- package/src/Breadcrumbs/index.js +0 -1
- package/src/Callout/index.js +0 -3
- package/src/Card/index.js +0 -3
- package/src/Countdown/index.js +0 -3
- package/src/DatePicker/index.js +0 -3
- package/src/Disclaimer/index.js +0 -1
- package/src/Footnote/index.js +0 -6
- package/src/IconButton/index.js +0 -3
- package/src/Image/index.js +0 -10
- package/src/List/index.js +0 -8
- package/src/NavigationBar/index.js +0 -6
- package/src/OptimizeImage/index.js +0 -3
- package/src/OrderedList/index.js +0 -8
- package/src/Paragraph/index.js +0 -3
- package/src/PreviewCard/index.js +0 -3
- package/src/PriceLockup/index.js +0 -3
- package/src/Progress/index.js +0 -6
- package/src/QuantitySelector/index.js +0 -3
- package/src/ResponsiveImage/index.js +0 -3
- package/src/Ribbon/index.js +0 -3
- package/src/SkeletonProvider/index.js +0 -3
- package/src/Span/index.js +0 -3
- package/src/Spinner/index.js +0 -3
- package/src/StoryCard/index.js +0 -3
- package/src/Table/index.js +0 -20
- package/src/TermsAndConditions/index.js +0 -1
- package/src/Testimonial/index.js +0 -3
- package/src/Toast/index.js +0 -3
- package/src/Video/index.js +0 -3
- package/src/VideoPicker/index.js +0 -3
- package/src/WaffleGrid/index.js +0 -3
- package/src/WebVideo/index.js +0 -3
- package/src/shared/ConditionalWrapper/index.js +0 -3
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { A11yText, Divider, selectSystemProps, Typography, useThemeTokens, useViewport, getTokensPropType, a11yProps } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import FootnoteLink from '../Footnote/FootnoteLink';
|
|
6
|
-
import getTypographyTokens from './tokens';
|
|
5
|
+
import { FootnoteLink } from '../Footnote/FootnoteLink';
|
|
6
|
+
import { tokens as getTypographyTokens } from './tokens';
|
|
7
7
|
import { htmlAttrs, warn } from '../utils';
|
|
8
|
-
import defaultDictionary from './dictionary';
|
|
8
|
+
import { dictionary as defaultDictionary } from './dictionary';
|
|
9
9
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const PRICE_BASELINE_VARIANT = 'baseline';
|
|
11
11
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs, a11yProps]);
|
|
@@ -14,9 +14,9 @@ const PriceLockupContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
14
14
|
componentId: "components-web__sc-1x6duay-0"
|
|
15
15
|
})(["align-items:", ";display:flex;flex-direction:column;width:fit-content;"], _ref => {
|
|
16
16
|
let {
|
|
17
|
-
alignItemsText
|
|
17
|
+
$alignItemsText
|
|
18
18
|
} = _ref;
|
|
19
|
-
return alignItemsText;
|
|
19
|
+
return $alignItemsText;
|
|
20
20
|
});
|
|
21
21
|
const PriceContainer = /*#__PURE__*/styled.div.attrs({
|
|
22
22
|
'aria-hidden': 'true'
|
|
@@ -25,41 +25,41 @@ const PriceContainer = /*#__PURE__*/styled.div.attrs({
|
|
|
25
25
|
componentId: "components-web__sc-1x6duay-1"
|
|
26
26
|
})(["display:flex;margin-bottom:", ";"], _ref2 => {
|
|
27
27
|
let {
|
|
28
|
-
priceMarginBottom
|
|
28
|
+
$priceMarginBottom
|
|
29
29
|
} = _ref2;
|
|
30
|
-
return priceMarginBottom;
|
|
30
|
+
return $priceMarginBottom;
|
|
31
31
|
});
|
|
32
32
|
const FootnoteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
33
33
|
displayName: "PriceLockup__FootnoteContainer",
|
|
34
34
|
componentId: "components-web__sc-1x6duay-2"
|
|
35
35
|
})(["display:flex;margin-top:", ";gap:", ";"], _ref3 => {
|
|
36
36
|
let {
|
|
37
|
-
footnoteMarginTop
|
|
37
|
+
$footnoteMarginTop
|
|
38
38
|
} = _ref3;
|
|
39
|
-
return footnoteMarginTop;
|
|
39
|
+
return $footnoteMarginTop;
|
|
40
40
|
}, _ref4 => {
|
|
41
41
|
let {
|
|
42
|
-
footnoteGap
|
|
42
|
+
$footnoteGap
|
|
43
43
|
} = _ref4;
|
|
44
|
-
return footnoteGap;
|
|
44
|
+
return $footnoteGap;
|
|
45
45
|
});
|
|
46
46
|
const BottomTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
47
47
|
displayName: "PriceLockup__BottomTextContainer",
|
|
48
48
|
componentId: "components-web__sc-1x6duay-3"
|
|
49
49
|
})(["margin-top:", ";"], _ref5 => {
|
|
50
50
|
let {
|
|
51
|
-
bottomTextMarginTop
|
|
51
|
+
$bottomTextMarginTop
|
|
52
52
|
} = _ref5;
|
|
53
|
-
return bottomTextMarginTop;
|
|
53
|
+
return $bottomTextMarginTop;
|
|
54
54
|
});
|
|
55
55
|
const BottomLinksContainer = /*#__PURE__*/styled.div.withConfig({
|
|
56
56
|
displayName: "PriceLockup__BottomLinksContainer",
|
|
57
57
|
componentId: "components-web__sc-1x6duay-4"
|
|
58
58
|
})(["align-self:center;margin-left:", ";"], _ref6 => {
|
|
59
59
|
let {
|
|
60
|
-
bottomLinksMarginLeft
|
|
60
|
+
$bottomLinksMarginLeft
|
|
61
61
|
} = _ref6;
|
|
62
|
-
return bottomLinksMarginLeft;
|
|
62
|
+
return $bottomLinksMarginLeft;
|
|
63
63
|
});
|
|
64
64
|
const TopTextContainer = /*#__PURE__*/styled.div.attrs({
|
|
65
65
|
'aria-hidden': 'true'
|
|
@@ -68,18 +68,18 @@ const TopTextContainer = /*#__PURE__*/styled.div.attrs({
|
|
|
68
68
|
componentId: "components-web__sc-1x6duay-5"
|
|
69
69
|
})(["margin-bottom:", ";"], _ref7 => {
|
|
70
70
|
let {
|
|
71
|
-
topTextMarginBottom
|
|
71
|
+
$topTextMarginBottom
|
|
72
72
|
} = _ref7;
|
|
73
|
-
return topTextMarginBottom;
|
|
73
|
+
return $topTextMarginBottom;
|
|
74
74
|
});
|
|
75
75
|
const PriceTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
76
76
|
displayName: "PriceLockup__PriceTextContainer",
|
|
77
77
|
componentId: "components-web__sc-1x6duay-6"
|
|
78
78
|
})(["display:flex;flex-direction:", ";"], _ref8 => {
|
|
79
79
|
let {
|
|
80
|
-
ratePosition
|
|
80
|
+
$ratePosition
|
|
81
81
|
} = _ref8;
|
|
82
|
-
return ratePosition === 'bottom' ? 'column' : 'row';
|
|
82
|
+
return $ratePosition === 'bottom' ? 'column' : 'row';
|
|
83
83
|
});
|
|
84
84
|
const RateContainer = /*#__PURE__*/styled.div.withConfig({
|
|
85
85
|
displayName: "PriceLockup__RateContainer",
|
|
@@ -90,49 +90,49 @@ const RateTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
90
90
|
componentId: "components-web__sc-1x6duay-8"
|
|
91
91
|
})(["align-self:", ";"], _ref9 => {
|
|
92
92
|
let {
|
|
93
|
-
ratePosition
|
|
93
|
+
$ratePosition
|
|
94
94
|
} = _ref9;
|
|
95
|
-
return ratePosition === 'bottom' ? 'flex-start' : 'flex-end';
|
|
95
|
+
return $ratePosition === 'bottom' ? 'flex-start' : 'flex-end';
|
|
96
96
|
});
|
|
97
97
|
const StrikeThroughContainer = /*#__PURE__*/styled.div.withConfig({
|
|
98
98
|
displayName: "PriceLockup__StrikeThroughContainer",
|
|
99
99
|
componentId: "components-web__sc-1x6duay-9"
|
|
100
|
-
})(["display:flex;position:relative;align-items:center
|
|
100
|
+
})(["display:flex;position:relative;align-items:center;&::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"], _ref0 => {
|
|
101
101
|
let {
|
|
102
|
-
strikeThroughPosition
|
|
103
|
-
} =
|
|
104
|
-
return `${strikeThroughPosition}px`;
|
|
105
|
-
},
|
|
102
|
+
$strikeThroughPosition
|
|
103
|
+
} = _ref0;
|
|
104
|
+
return `${$strikeThroughPosition}px`;
|
|
105
|
+
}, _ref1 => {
|
|
106
106
|
let {
|
|
107
|
-
strikeThroughHeight
|
|
108
|
-
} =
|
|
109
|
-
return `${strikeThroughHeight}px`;
|
|
110
|
-
},
|
|
107
|
+
$strikeThroughHeight
|
|
108
|
+
} = _ref1;
|
|
109
|
+
return `${$strikeThroughHeight}px`;
|
|
110
|
+
}, _ref10 => {
|
|
111
111
|
let {
|
|
112
|
-
strikeThroughColor
|
|
113
|
-
} =
|
|
114
|
-
return strikeThroughColor;
|
|
112
|
+
$strikeThroughColor
|
|
113
|
+
} = _ref10;
|
|
114
|
+
return $strikeThroughColor;
|
|
115
115
|
});
|
|
116
116
|
const TypographyContainer = /*#__PURE__*/styled.div.withConfig({
|
|
117
117
|
displayName: "PriceLockup__TypographyContainer",
|
|
118
118
|
componentId: "components-web__sc-1x6duay-10"
|
|
119
|
-
})(["display:flex;padding-top:", ";"],
|
|
119
|
+
})(["display:flex;padding-top:", ";"], _ref11 => {
|
|
120
120
|
let {
|
|
121
|
-
paddingTop
|
|
122
|
-
} =
|
|
123
|
-
return `${paddingTop || 0}px`;
|
|
121
|
+
$paddingTop
|
|
122
|
+
} = _ref11;
|
|
123
|
+
return `${$paddingTop || 0}px`;
|
|
124
124
|
});
|
|
125
125
|
const InlineTextWithFootnote = /*#__PURE__*/styled.div.withConfig({
|
|
126
126
|
displayName: "PriceLockup__InlineTextWithFootnote",
|
|
127
127
|
componentId: "components-web__sc-1x6duay-11"
|
|
128
128
|
})(["display:inline;position:relative;> *:first-child{display:inline;}> *:last-child{display:inline-block;position:relative;top:-0.5em;font-size:0.75em;margin-left:2px;line-height:0;vertical-align:bottom;}"]);
|
|
129
|
-
const selectFootnoteLinkStyles =
|
|
129
|
+
const selectFootnoteLinkStyles = _ref12 => {
|
|
130
130
|
let {
|
|
131
131
|
footnoteLinkColor,
|
|
132
132
|
footnoteLinkFontName,
|
|
133
133
|
footnoteLinkFontWeight,
|
|
134
134
|
footnoteLinkLineHeight
|
|
135
|
-
} =
|
|
135
|
+
} = _ref12;
|
|
136
136
|
return {
|
|
137
137
|
color: footnoteLinkColor,
|
|
138
138
|
fontName: footnoteLinkFontName,
|
|
@@ -140,19 +140,19 @@ const selectFootnoteLinkStyles = _ref14 => {
|
|
|
140
140
|
lineHeight: footnoteLinkLineHeight
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
|
-
const selectStrikeThroughTokens =
|
|
143
|
+
const selectStrikeThroughTokens = _ref13 => {
|
|
144
144
|
let {
|
|
145
145
|
strikeThroughPosition,
|
|
146
146
|
strikeThroughHeight,
|
|
147
147
|
strikeThroughColor
|
|
148
|
-
} =
|
|
148
|
+
} = _ref13;
|
|
149
149
|
return {
|
|
150
150
|
strikeThroughHeight,
|
|
151
151
|
strikeThroughPosition,
|
|
152
152
|
strikeThroughColor
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
|
-
const PriceLockup = /*#__PURE__*/React.forwardRef((
|
|
155
|
+
export const PriceLockup = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
|
|
156
156
|
let {
|
|
157
157
|
size = 'medium',
|
|
158
158
|
signDirection = 'left',
|
|
@@ -172,7 +172,7 @@ const PriceLockup = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
|
172
172
|
copy = 'en',
|
|
173
173
|
dictionary = defaultDictionary,
|
|
174
174
|
...rest
|
|
175
|
-
} =
|
|
175
|
+
} = _ref14;
|
|
176
176
|
const viewport = useViewport();
|
|
177
177
|
const {
|
|
178
178
|
footnoteMarginTop,
|
|
@@ -224,7 +224,7 @@ const PriceLockup = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
226
|
return /*#__PURE__*/_jsx(TypographyContainer, {
|
|
227
|
-
paddingTop: paddingTop,
|
|
227
|
+
$paddingTop: paddingTop,
|
|
228
228
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
229
229
|
...customProps,
|
|
230
230
|
children: value
|
|
@@ -245,7 +245,9 @@ const PriceLockup = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
|
245
245
|
children: [/*#__PURE__*/_jsx(A11yText, {
|
|
246
246
|
text: a11yText
|
|
247
247
|
}), /*#__PURE__*/_jsx(StrikeThroughContainer, {
|
|
248
|
-
|
|
248
|
+
$strikeThroughPosition: selectStrikeThroughTokens(themeTokens).strikeThroughPosition,
|
|
249
|
+
$strikeThroughHeight: selectStrikeThroughTokens(themeTokens).strikeThroughHeight,
|
|
250
|
+
$strikeThroughColor: selectStrikeThroughTokens(themeTokens).strikeThroughColor,
|
|
249
251
|
children: amountComponent
|
|
250
252
|
})]
|
|
251
253
|
});
|
|
@@ -254,27 +256,27 @@ const PriceLockup = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
|
254
256
|
};
|
|
255
257
|
const renderPrice = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
256
258
|
children: [/*#__PURE__*/_jsxs(PriceContainer, {
|
|
257
|
-
priceMarginBottom: `${priceMarginBottom}px`,
|
|
259
|
+
$priceMarginBottom: `${priceMarginBottom}px`,
|
|
258
260
|
children: [/*#__PURE__*/_jsxs(PriceTextContainer, {
|
|
259
|
-
ratePosition: ratePosition,
|
|
261
|
+
$ratePosition: ratePosition,
|
|
260
262
|
children: [/*#__PURE__*/_jsxs(RateContainer, {
|
|
261
263
|
children: [signDirection === 'left' && renderCurrencySymbol(), renderAmount(), cents && renderTypography(`${separator}${cents}`, typographyTokens.cents), signDirection === 'right' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
262
264
|
children: ["\xA0", renderCurrencySymbol()]
|
|
263
265
|
})]
|
|
264
266
|
}), rateText && /*#__PURE__*/_jsx(RateTextContainer, {
|
|
265
|
-
ratePosition: ratePosition,
|
|
267
|
+
$ratePosition: ratePosition,
|
|
266
268
|
children: renderTypography(rateText, typographyTokens.rate, ratePosition)
|
|
267
269
|
})]
|
|
268
270
|
}), !bottomText && footnoteLinks.length <= 3 && /*#__PURE__*/_jsx(BottomLinksContainer, {
|
|
269
|
-
bottomLinksMarginLeft: `${bottomLinksMarginLeft}px`,
|
|
271
|
+
$bottomLinksMarginLeft: `${bottomLinksMarginLeft}px`,
|
|
270
272
|
children: renderFootnoteLinks()
|
|
271
273
|
})]
|
|
272
274
|
}), !bottomText && footnoteLinks.length > 3 && renderFootnoteLinks()]
|
|
273
275
|
});
|
|
274
276
|
const renderFootnoteContent = () => {
|
|
275
277
|
const containerProps = {
|
|
276
|
-
footnoteMarginTop: `${footnoteMarginTop}px`,
|
|
277
|
-
footnoteGap: `${footnoteGap}px`
|
|
278
|
+
$footnoteMarginTop: `${footnoteMarginTop}px`,
|
|
279
|
+
$footnoteGap: `${footnoteGap}px`
|
|
278
280
|
};
|
|
279
281
|
const shouldUseInline = linkPosition === 'inline';
|
|
280
282
|
const bottomTextContent = shouldUseInline ? /*#__PURE__*/_jsxs(InlineTextWithFootnote, {
|
|
@@ -290,7 +292,7 @@ const PriceLockup = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
|
290
292
|
children: [/*#__PURE__*/_jsxs(FootnoteContainer, {
|
|
291
293
|
...containerProps,
|
|
292
294
|
children: [/*#__PURE__*/_jsx(BottomTextContainer, {
|
|
293
|
-
bottomTextMarginTop: `${bottomTextMarginTop}px`,
|
|
295
|
+
$bottomTextMarginTop: `${bottomTextMarginTop}px`,
|
|
294
296
|
children: bottomTextContent
|
|
295
297
|
}), showFootnotesInContainer && renderFootnoteLinks()]
|
|
296
298
|
}), showFootnotesOutside && renderFootnoteLinks()]
|
|
@@ -346,12 +348,12 @@ const PriceLockup = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
|
346
348
|
const ariaLabel = selectProps(rest)['aria-label'] ?? getAriaContent();
|
|
347
349
|
return /*#__PURE__*/_jsxs(PriceLockupContainer, {
|
|
348
350
|
...selectProps(rest),
|
|
349
|
-
alignItemsText: alignItemsText,
|
|
351
|
+
$alignItemsText: alignItemsText,
|
|
350
352
|
ref: ref,
|
|
351
353
|
role: "group",
|
|
352
354
|
"aria-label": ariaLabel,
|
|
353
355
|
children: [topText && /*#__PURE__*/_jsx(TopTextContainer, {
|
|
354
|
-
topTextMarginBottom: `${topTextMarginBottom}px`,
|
|
356
|
+
$topTextMarginBottom: `${topTextMarginBottom}px`,
|
|
355
357
|
children: renderTypography(topText, typographyTokens.topText)
|
|
356
358
|
}), renderPrice(), bottomText && /*#__PURE__*/_jsx(Divider, {
|
|
357
359
|
testID: "price-lockup-divider",
|
|
@@ -448,5 +450,4 @@ PriceLockup.propTypes = {
|
|
|
448
450
|
* `PriceLockup` tokens
|
|
449
451
|
*/
|
|
450
452
|
tokens: getTokensPropType('PriceLockup')
|
|
451
|
-
};
|
|
452
|
-
export default PriceLockup;
|
|
453
|
+
};
|
|
@@ -1,35 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { getTokensPropType,
|
|
3
|
+
import { getTokensPropType, ProgressBar as ProgressBarBase, selectSystemProps, useThemeTokens, a11yProps, viewProps, variantProp, applyShadowToken } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
|
|
6
6
|
// Passes React Native-oriented system props through UDS Progress
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps]);
|
|
9
|
-
const {
|
|
10
|
-
Bar: ProgressBarBase
|
|
11
|
-
} = Progress;
|
|
12
|
-
const Gradient = /*#__PURE__*/styled.div.attrs({
|
|
13
|
-
'data-testid': 'ProgressBar-Gradient'
|
|
14
|
-
}).withConfig({
|
|
9
|
+
const Gradient = /*#__PURE__*/styled.div.withConfig({
|
|
15
10
|
displayName: "ProgressBar__Gradient",
|
|
16
11
|
componentId: "components-web__sc-1vmzyq5-0"
|
|
17
12
|
})(_ref => {
|
|
18
13
|
let {
|
|
19
|
-
gradient: {
|
|
14
|
+
$gradient: {
|
|
20
15
|
angle,
|
|
21
16
|
stops,
|
|
22
17
|
type
|
|
23
18
|
},
|
|
24
|
-
borderRadius,
|
|
25
|
-
shadow
|
|
19
|
+
$borderRadius,
|
|
20
|
+
$shadow
|
|
26
21
|
} = _ref;
|
|
27
22
|
return {
|
|
28
23
|
height: '100%',
|
|
29
24
|
width: '100%',
|
|
30
25
|
background: `${type}-gradient(${angle}deg, ${stops[0].color}, ${stops[1].color})`,
|
|
31
|
-
borderRadius,
|
|
32
|
-
...applyShadowToken(shadow)
|
|
26
|
+
borderRadius: $borderRadius,
|
|
27
|
+
...applyShadowToken($shadow)
|
|
33
28
|
};
|
|
34
29
|
});
|
|
35
30
|
|
|
@@ -45,7 +40,7 @@ const Gradient = /*#__PURE__*/styled.div.attrs({
|
|
|
45
40
|
*
|
|
46
41
|
*/
|
|
47
42
|
|
|
48
|
-
const ProgressBar = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
43
|
+
export const ProgressBar = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
49
44
|
let {
|
|
50
45
|
percentage,
|
|
51
46
|
tokens,
|
|
@@ -63,7 +58,10 @@ const ProgressBar = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
63
58
|
offset: offset,
|
|
64
59
|
...selectedProps,
|
|
65
60
|
children: themeTokens.gradient && /*#__PURE__*/_jsx(Gradient, {
|
|
66
|
-
|
|
61
|
+
"data-testid": "ProgressBar-Gradient",
|
|
62
|
+
$gradient: themeTokens.gradient,
|
|
63
|
+
$borderRadius: themeTokens.borderRadius,
|
|
64
|
+
$shadow: themeTokens.shadow
|
|
67
65
|
})
|
|
68
66
|
});
|
|
69
67
|
});
|
|
@@ -89,5 +87,4 @@ ProgressBar.propTypes = {
|
|
|
89
87
|
items: PropTypes.number,
|
|
90
88
|
current: PropTypes.number
|
|
91
89
|
})
|
|
92
|
-
};
|
|
93
|
-
export default ProgressBar;
|
|
90
|
+
};
|
|
@@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { Box, TextInput, Spacer, Feedback, InputLabel, useInputValue, useCopy, useThemeTokensCallback, getTokensPropType, selectSystemProps, a11yProps } from '@telus-uds/components-base';
|
|
4
4
|
import { htmlAttrs } from '../utils';
|
|
5
5
|
import { InputField, InputWrapper } from './styles';
|
|
6
|
-
import defaultDictionary from './dictionary';
|
|
7
|
-
import
|
|
6
|
+
import { dictionary as defaultDictionary } from './dictionary';
|
|
7
|
+
import { QuantitySelectorSideButton } from './QuantitySelectorSideButton';
|
|
8
8
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
const {
|
|
10
10
|
isNaN
|
|
@@ -13,7 +13,7 @@ const isNumber = value => {
|
|
|
13
13
|
return typeof value === 'number' && !isNaN(value);
|
|
14
14
|
};
|
|
15
15
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, htmlAttrs]);
|
|
16
|
-
const QuantitySelector = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
16
|
+
export const QuantitySelector = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
17
17
|
let {
|
|
18
18
|
id = 'quantity-selector',
|
|
19
19
|
minNumber,
|
|
@@ -152,7 +152,7 @@ const QuantitySelector = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
152
152
|
children: renderTextInput()
|
|
153
153
|
}), /*#__PURE__*/_jsx("div", {
|
|
154
154
|
style: flexOrder(0),
|
|
155
|
-
children: /*#__PURE__*/_jsx(
|
|
155
|
+
children: /*#__PURE__*/_jsx(QuantitySelectorSideButton, {
|
|
156
156
|
isEnabled: isDecreaseEnabled,
|
|
157
157
|
onPress: () => updateNumber(number - 1),
|
|
158
158
|
onDoubleClick: () => updateNumber(number - 1),
|
|
@@ -167,7 +167,7 @@ const QuantitySelector = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
167
167
|
})
|
|
168
168
|
}), /*#__PURE__*/_jsx("div", {
|
|
169
169
|
style: flexOrder(2),
|
|
170
|
-
children: /*#__PURE__*/_jsx(
|
|
170
|
+
children: /*#__PURE__*/_jsx(QuantitySelectorSideButton, {
|
|
171
171
|
isEnabled: isIncreaseEnabled,
|
|
172
172
|
onPress: () => updateNumber(number + 1),
|
|
173
173
|
onDoubleClick: () => updateNumber(number + 1),
|
|
@@ -276,5 +276,4 @@ QuantitySelector.propTypes = {
|
|
|
276
276
|
* If true, the quantity selector will be disabled
|
|
277
277
|
*/
|
|
278
278
|
inactive: PropTypes.bool
|
|
279
|
-
};
|
|
280
|
-
export default QuantitySelector;
|
|
279
|
+
};
|
|
@@ -2,7 +2,7 @@ import { IconButton, getTokensPropType, useThemeTokensCallback } from '@telus-ud
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const
|
|
5
|
+
export const QuantitySelectorSideButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
6
6
|
let {
|
|
7
7
|
isEnabled = true,
|
|
8
8
|
onPress = () => {},
|
|
@@ -57,8 +57,8 @@ const SideButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
57
57
|
ref: ref
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
QuantitySelectorSideButton.displayName = 'QuantitySelectorSideButton';
|
|
61
|
+
QuantitySelectorSideButton.propTypes = {
|
|
62
62
|
isEnabled: PropTypes.bool,
|
|
63
63
|
onPress: PropTypes.func,
|
|
64
64
|
onDoubleClick: PropTypes.func,
|
|
@@ -66,5 +66,4 @@ SideButton.propTypes = {
|
|
|
66
66
|
accessibilityDisabled: PropTypes.bool,
|
|
67
67
|
tokens: getTokensPropType('QuantitySelectorSideButton'),
|
|
68
68
|
variant: PropTypes.object
|
|
69
|
-
};
|
|
70
|
-
export default SideButton;
|
|
69
|
+
};
|
|
@@ -15,7 +15,7 @@ const staticStyles = {
|
|
|
15
15
|
/**
|
|
16
16
|
* Provide different image sources for different screen sizes.
|
|
17
17
|
*/
|
|
18
|
-
const ResponsiveImage = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
18
|
+
export const ResponsiveImage = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
19
19
|
let {
|
|
20
20
|
xsSrc,
|
|
21
21
|
smSrc,
|
|
@@ -96,5 +96,4 @@ ResponsiveImage.propTypes = {
|
|
|
96
96
|
* The dataSet prop allows to pass data-* attributes element to the component.
|
|
97
97
|
*/
|
|
98
98
|
dataSet: PropTypes.object
|
|
99
|
-
};
|
|
100
|
-
export default ResponsiveImage;
|
|
99
|
+
};
|
package/lib/esm/Ribbon/Ribbon.js
CHANGED
|
@@ -30,90 +30,88 @@ const RibbonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
30
30
|
componentId: "components-web__sc-186270k-1"
|
|
31
31
|
})(["display:flex;justify-content:center;background:", ";padding:", ";border-radius:", ";width:fit-content;box-shadow:", ";border-bottom-right-radius:", ";border-bottom-left-radius:", ";"], _ref4 => {
|
|
32
32
|
let {
|
|
33
|
-
backgroundColor
|
|
33
|
+
$backgroundColor
|
|
34
34
|
} = _ref4;
|
|
35
|
-
return backgroundColor;
|
|
35
|
+
return $backgroundColor;
|
|
36
36
|
}, _ref5 => {
|
|
37
37
|
let {
|
|
38
|
-
padding
|
|
38
|
+
$padding
|
|
39
39
|
} = _ref5;
|
|
40
|
-
return `${padding}`;
|
|
40
|
+
return `${$padding}`;
|
|
41
41
|
}, _ref6 => {
|
|
42
42
|
let {
|
|
43
|
-
borderRadius
|
|
43
|
+
$borderRadius
|
|
44
44
|
} = _ref6;
|
|
45
|
-
return borderRadius;
|
|
45
|
+
return $borderRadius;
|
|
46
46
|
}, _ref7 => {
|
|
47
47
|
let {
|
|
48
|
-
boxShadow
|
|
49
|
-
shouldWrap
|
|
48
|
+
$boxShadow
|
|
50
49
|
} = _ref7;
|
|
51
|
-
return
|
|
50
|
+
return $boxShadow;
|
|
52
51
|
}, _ref8 => {
|
|
53
52
|
let {
|
|
54
|
-
borderRadiusBottomLeft
|
|
53
|
+
$borderRadiusBottomLeft
|
|
55
54
|
} = _ref8;
|
|
56
|
-
return borderRadiusBottomLeft;
|
|
55
|
+
return $borderRadiusBottomLeft;
|
|
57
56
|
}, _ref9 => {
|
|
58
57
|
let {
|
|
59
|
-
borderRadiusBottomRight
|
|
58
|
+
$borderRadiusBottomRight
|
|
60
59
|
} = _ref9;
|
|
61
|
-
return borderRadiusBottomRight;
|
|
60
|
+
return $borderRadiusBottomRight;
|
|
62
61
|
});
|
|
63
62
|
const RibbonCurve = /*#__PURE__*/styled.div.withConfig({
|
|
64
63
|
displayName: "Ribbon__RibbonCurve",
|
|
65
64
|
componentId: "components-web__sc-186270k-2"
|
|
66
|
-
})(["background:", ";width:", ";height:", ";margin-top:-", ";border-radius:0 0 0 100%;position:relative;z-index:-1;overflow:hidden;&::after{content:'';border-bottom-left-radius:", ";position:absolute;height:", ";background:", ";width:", ";}"],
|
|
65
|
+
})(["background:", ";width:", ";height:", ";margin-top:-", ";border-radius:0 0 0 100%;position:relative;z-index:-1;overflow:hidden;&::after{content:'';border-bottom-left-radius:", ";position:absolute;height:", ";background:", ";width:", ";}"], _ref0 => {
|
|
67
66
|
let {
|
|
68
|
-
curveBackgroundColor
|
|
67
|
+
$curveBackgroundColor
|
|
68
|
+
} = _ref0;
|
|
69
|
+
return $curveBackgroundColor;
|
|
70
|
+
}, _ref1 => {
|
|
71
|
+
let {
|
|
72
|
+
$curveWidth
|
|
73
|
+
} = _ref1;
|
|
74
|
+
return $curveWidth;
|
|
75
|
+
}, _ref10 => {
|
|
76
|
+
let {
|
|
77
|
+
$curveHeight
|
|
69
78
|
} = _ref10;
|
|
70
|
-
return
|
|
79
|
+
return $curveHeight;
|
|
71
80
|
}, _ref11 => {
|
|
72
81
|
let {
|
|
73
|
-
|
|
82
|
+
$curveMarginTop
|
|
74
83
|
} = _ref11;
|
|
75
|
-
return
|
|
84
|
+
return $curveMarginTop;
|
|
76
85
|
}, _ref12 => {
|
|
77
86
|
let {
|
|
78
|
-
|
|
87
|
+
$curveAfterRadius
|
|
79
88
|
} = _ref12;
|
|
80
|
-
return
|
|
89
|
+
return $curveAfterRadius;
|
|
81
90
|
}, _ref13 => {
|
|
82
91
|
let {
|
|
83
|
-
|
|
92
|
+
$curveAfterHeight
|
|
84
93
|
} = _ref13;
|
|
85
|
-
return
|
|
94
|
+
return $curveAfterHeight;
|
|
86
95
|
}, _ref14 => {
|
|
87
96
|
let {
|
|
88
|
-
|
|
97
|
+
$curveAfterBackgroundColor
|
|
89
98
|
} = _ref14;
|
|
90
|
-
return
|
|
99
|
+
return $curveAfterBackgroundColor;
|
|
91
100
|
}, _ref15 => {
|
|
92
101
|
let {
|
|
93
|
-
|
|
102
|
+
$curveAfterWidth
|
|
94
103
|
} = _ref15;
|
|
95
|
-
return
|
|
96
|
-
}, _ref16 => {
|
|
97
|
-
let {
|
|
98
|
-
curveAfterBackgroundColor
|
|
99
|
-
} = _ref16;
|
|
100
|
-
return curveAfterBackgroundColor;
|
|
101
|
-
}, _ref17 => {
|
|
102
|
-
let {
|
|
103
|
-
curveAfterWidth
|
|
104
|
-
} = _ref17;
|
|
105
|
-
return curveAfterWidth;
|
|
104
|
+
return $curveAfterWidth;
|
|
106
105
|
});
|
|
107
|
-
const Ribbon = /*#__PURE__*/React.forwardRef((
|
|
106
|
+
export const Ribbon = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
108
107
|
let {
|
|
109
108
|
children,
|
|
110
109
|
tokens,
|
|
111
|
-
wrap: shouldWrap = false,
|
|
112
110
|
left,
|
|
113
111
|
top,
|
|
114
112
|
variant = {},
|
|
115
113
|
...rest
|
|
116
|
-
} =
|
|
114
|
+
} = _ref16;
|
|
117
115
|
const {
|
|
118
116
|
backgroundColor,
|
|
119
117
|
borderRadius,
|
|
@@ -143,8 +141,7 @@ const Ribbon = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
|
|
|
143
141
|
fontSize,
|
|
144
142
|
lineHeight
|
|
145
143
|
} = useThemeTokens('Ribbon', tokens, {
|
|
146
|
-
...variant
|
|
147
|
-
wrap: shouldWrap
|
|
144
|
+
...variant
|
|
148
145
|
});
|
|
149
146
|
let background = backgroundColor;
|
|
150
147
|
if (gradient) {
|
|
@@ -163,13 +160,12 @@ const Ribbon = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
|
|
|
163
160
|
ref: ref,
|
|
164
161
|
...selectProps(rest),
|
|
165
162
|
children: [/*#__PURE__*/_jsx(RibbonContainer, {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
borderRadiusBottomRight: `${borderRadiusBottomRight}px`,
|
|
163
|
+
$backgroundColor: background,
|
|
164
|
+
$padding: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
|
|
165
|
+
$borderRadius: `${borderRadius}px`,
|
|
166
|
+
$boxShadow: `${boxShadowPaddingTop}px ${boxShadowPaddingRight}px ${boxShadowPaddingBottom}px ${boxShadowPaddingLeft}px ${boxShadowColor}`,
|
|
167
|
+
$borderRadiusBottomLeft: `${borderRadiusBottomLeft}px`,
|
|
168
|
+
$borderRadiusBottomRight: `${borderRadiusBottomRight}px`,
|
|
173
169
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
174
170
|
variant: {
|
|
175
171
|
bold: true,
|
|
@@ -184,17 +180,17 @@ const Ribbon = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
|
|
|
184
180
|
},
|
|
185
181
|
children: children
|
|
186
182
|
})
|
|
187
|
-
}),
|
|
183
|
+
}), /*#__PURE__*/_jsx(RibbonCurve, {
|
|
188
184
|
"data-testid": "ribbon-curve",
|
|
189
|
-
backgroundColor: backgroundColor,
|
|
190
|
-
curveMarginTop: `${curveMarginTop}px`,
|
|
191
|
-
curveWidth: `${curveWidth}px`,
|
|
192
|
-
curveHeight: `${curveHeight}px`,
|
|
193
|
-
curveBackgroundColor: curveBackgroundColor,
|
|
194
|
-
curveAfterRadius: `${curveAfterRadius}px`,
|
|
195
|
-
curveAfterWidth: `${curveAfterWidth}px`,
|
|
196
|
-
curveAfterHeight: `${curveAfterHeight}px`,
|
|
197
|
-
curveAfterBackgroundColor: curveAfterBackgroundColor
|
|
185
|
+
$backgroundColor: backgroundColor,
|
|
186
|
+
$curveMarginTop: `${curveMarginTop}px`,
|
|
187
|
+
$curveWidth: `${curveWidth}px`,
|
|
188
|
+
$curveHeight: `${curveHeight}px`,
|
|
189
|
+
$curveBackgroundColor: curveBackgroundColor,
|
|
190
|
+
$curveAfterRadius: `${curveAfterRadius}px`,
|
|
191
|
+
$curveAfterWidth: `${curveAfterWidth}px`,
|
|
192
|
+
$curveAfterHeight: `${curveAfterHeight}px`,
|
|
193
|
+
$curveAfterBackgroundColor: curveAfterBackgroundColor
|
|
198
194
|
})]
|
|
199
195
|
});
|
|
200
196
|
});
|
|
@@ -203,13 +199,8 @@ Ribbon.propTypes = {
|
|
|
203
199
|
...selectedSystemPropTypes,
|
|
204
200
|
tokens: getTokensPropType('Ribbon'),
|
|
205
201
|
children: PropTypes.node,
|
|
206
|
-
/** show/hide the ribbon fold
|
|
207
|
-
* @deprecated please don't rely on `wrap` to turn off the wrapping (use `Badge` instead) as it will be removed in the future
|
|
208
|
-
*/
|
|
209
|
-
wrap: PropTypes.bool,
|
|
210
202
|
/** sets the left offset (triggers absolute positioning) */
|
|
211
203
|
left: PropTypes.number,
|
|
212
204
|
/** sets the top offset (triggers absolute positioning) */
|
|
213
205
|
top: PropTypes.number
|
|
214
|
-
};
|
|
215
|
-
export default Ribbon;
|
|
206
|
+
};
|