@telus-uds/components-web 4.19.0 → 5.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +12 -0
- package/CHANGELOG.md +24 -1
- package/lib/cjs/Badge/Badge.js +26 -27
- package/lib/cjs/BlockQuote/BlockQuote.js +24 -25
- package/lib/cjs/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +36 -37
- package/lib/cjs/Breadcrumbs/Breadcrumbs.js +8 -10
- package/lib/cjs/Callout/Callout.js +24 -25
- package/lib/cjs/Card/Card.js +79 -89
- package/lib/cjs/Card/CardContent.js +53 -29
- package/lib/cjs/Card/CardFooter.js +28 -18
- package/lib/cjs/Countdown/Countdown.js +7 -8
- package/lib/cjs/Countdown/Segment.js +10 -11
- package/lib/cjs/Countdown/dictionary.js +2 -2
- package/lib/cjs/Countdown/types.js +2 -6
- package/lib/cjs/Countdown/useCountdown.js +2 -2
- package/lib/cjs/DatePicker/CalendarContainer.js +66 -67
- package/lib/cjs/DatePicker/DatePicker.js +27 -28
- package/lib/cjs/DatePicker/dictionary.js +3 -4
- package/lib/cjs/DatePicker/reactDatesCss.js +2 -3
- package/lib/cjs/Disclaimer/Disclaimer.js +28 -13
- package/lib/cjs/Footnote/Footnote.js +108 -109
- package/lib/cjs/Footnote/FootnoteLink.js +28 -19
- package/lib/cjs/Footnote/dictionary.js +2 -2
- package/lib/cjs/IconButton/IconButton.js +3 -4
- package/lib/cjs/Image/Image.js +9 -3
- package/lib/cjs/Image/server.js +4 -6
- package/lib/cjs/List/List.js +7 -3
- package/lib/cjs/List/ListItem.js +3 -4
- package/lib/cjs/NavigationBar/NavigationBar.js +8 -9
- package/lib/cjs/NavigationBar/NavigationItem.js +10 -11
- package/lib/cjs/NavigationBar/NavigationSubMenu.js +10 -11
- package/lib/cjs/NavigationBar/collapseItems.js +2 -2
- package/lib/cjs/NavigationBar/resolveItemSelection.js +2 -2
- package/lib/cjs/OptimizeImage/OptimizeImage.js +6 -8
- package/lib/cjs/OptimizeImage/utils/getFallbackUrl.js +3 -4
- package/lib/cjs/OptimizeImage/utils/getImageUrls.js +9 -10
- package/lib/cjs/OptimizeImage/utils/getOptimizedUrl.js +3 -4
- package/lib/cjs/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/lib/cjs/OptimizeImage/utils/index.js +8 -9
- package/lib/cjs/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/lib/cjs/OrderedList/OrderedList.js +6 -9
- package/lib/cjs/OrderedList/OrderedListBase.js +4 -7
- package/lib/cjs/OrderedList/{Item.js → OrderedListItem.js} +46 -39
- package/lib/cjs/OrderedList/{ItemBase.js → OrderedListItemBase.js} +7 -7
- package/lib/cjs/OrderedList/constants.js +0 -1
- package/lib/cjs/Paragraph/Paragraph.js +10 -11
- package/lib/cjs/PreviewCard/PreviewCard.js +18 -27
- package/lib/cjs/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +6 -6
- package/lib/cjs/PriceLockup/PriceLockup.js +61 -60
- package/lib/cjs/PriceLockup/dictionary.js +2 -2
- package/lib/cjs/PriceLockup/tokens.js +3 -3
- package/lib/cjs/Progress/ProgressBar.js +14 -17
- package/lib/cjs/QuantitySelector/QuantitySelector.js +8 -9
- package/lib/cjs/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +5 -6
- package/lib/cjs/QuantitySelector/dictionary.js +2 -2
- package/lib/cjs/ResponsiveImage/ResponsiveImage.js +3 -4
- package/lib/cjs/Ribbon/Ribbon.js +56 -65
- package/lib/cjs/SkeletonProvider/SkeletonImage.js +3 -4
- package/lib/cjs/SkeletonProvider/SkeletonProvider.js +10 -10
- package/lib/cjs/SkeletonProvider/SkeletonTypography.js +3 -4
- package/lib/cjs/Span/Span.js +6 -7
- package/lib/cjs/Spinner/Spinner.js +29 -29
- package/lib/cjs/Spinner/SpinnerContent.js +6 -7
- package/lib/cjs/StoryCard/StoryCard.js +17 -22
- package/lib/cjs/Table/Table.js +32 -25
- package/lib/cjs/Table/{Body.js → TableBody.js} +5 -6
- package/lib/cjs/Table/{Cell.js → TableCell.js} +59 -61
- package/lib/cjs/Table/{Header.js → TableHeader.js} +7 -8
- package/lib/cjs/Table/{Row.js → TableRow.js} +18 -19
- package/lib/cjs/Table/{SubHeading.js → TableSubHeading.js} +7 -8
- package/lib/cjs/TermsAndConditions/ExpandCollapse.js +18 -19
- package/lib/cjs/TermsAndConditions/TermsAndConditions.js +44 -44
- package/lib/cjs/TermsAndConditions/dictionary.js +2 -2
- package/lib/cjs/Testimonial/Testimonial.js +24 -31
- package/lib/cjs/Toast/Toast.js +28 -30
- package/lib/cjs/Video/ControlBar/ControlBar.js +48 -47
- package/lib/cjs/Video/ControlBar/Controls/VideoButton/VideoButton.js +6 -6
- package/lib/cjs/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +30 -32
- package/lib/cjs/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +35 -35
- package/lib/cjs/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +42 -42
- package/lib/cjs/Video/MiddleControlButton/MiddleControlButton.js +15 -15
- package/lib/cjs/Video/Video.js +27 -29
- package/lib/cjs/Video/videoText.js +3 -4
- package/lib/cjs/VideoPicker/VideoPicker.js +37 -33
- package/lib/cjs/VideoPicker/VideoPickerPlayer.js +5 -6
- package/lib/cjs/VideoPicker/VideoPickerThumbnail.js +28 -25
- package/lib/cjs/VideoPicker/VideoSlider.js +3 -4
- package/lib/cjs/WaffleGrid/WaffleGrid.js +51 -50
- package/lib/cjs/WebVideo/WebVideo.js +7 -8
- package/lib/cjs/baseExports.js +84 -0
- package/lib/cjs/index.js +179 -105
- package/lib/cjs/server.js +2 -3
- package/lib/cjs/shared/ConditionalWrapper/ConditionalWrapper.js +3 -3
- package/lib/cjs/shared/FullBleedContent/FullBleedContent.js +28 -22
- package/lib/cjs/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -2
- package/lib/cjs/shared/FullBleedContent/index.js +11 -10
- package/lib/cjs/shared/FullBleedContent/useFullBleedContentProps.js +2 -2
- package/lib/cjs/shared/VideoSplash/SplashButton/SplashButton.js +9 -9
- package/lib/cjs/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +50 -50
- package/lib/cjs/shared/VideoSplash/VideoSplash.js +12 -12
- package/lib/cjs/shared/VideoSplash/helpers.js +2 -3
- package/lib/cjs/utils/index.js +14 -15
- package/lib/cjs/utils/isElementFocusable.js +2 -2
- package/lib/cjs/utils/logger.js +2 -6
- package/lib/cjs/utils/media.js +1 -1
- package/lib/cjs/utils/renderStructuredContent.js +3 -4
- package/lib/cjs/utils/scrollToAnchor.js +2 -2
- package/lib/cjs/utils/ssr.js +2 -2
- package/lib/cjs/utils/theming/get-theme-from-server.js +2 -3
- package/lib/cjs/utils/theming/with-client-theme.js +2 -2
- package/lib/cjs/utils/theming/with-server-theme.js +4 -4
- package/lib/cjs/utils/transforms.js +2 -5
- package/lib/cjs/utils/useOverlaidPosition.js +2 -2
- package/lib/cjs/utils/useTypographyTheme.js +2 -2
- package/lib/esm/Badge/Badge.js +25 -26
- package/lib/esm/BlockQuote/BlockQuote.js +23 -24
- package/lib/esm/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +35 -36
- package/lib/esm/Breadcrumbs/Breadcrumbs.js +6 -7
- package/lib/esm/Callout/Callout.js +23 -24
- package/lib/esm/Card/Card.js +63 -71
- package/lib/esm/Card/CardContent.js +52 -28
- package/lib/esm/Card/CardFooter.js +27 -18
- package/lib/esm/Countdown/Countdown.js +4 -5
- package/lib/esm/Countdown/Segment.js +8 -9
- package/lib/esm/Countdown/dictionary.js +1 -1
- package/lib/esm/Countdown/types.js +1 -5
- package/lib/esm/Countdown/useCountdown.js +2 -3
- package/lib/esm/DatePicker/CalendarContainer.js +64 -65
- package/lib/esm/DatePicker/DatePicker.js +18 -19
- package/lib/esm/DatePicker/dictionary.js +2 -3
- package/lib/esm/DatePicker/reactDatesCss.js +1 -2
- package/lib/esm/Disclaimer/Disclaimer.js +27 -12
- package/lib/esm/Footnote/Footnote.js +104 -104
- package/lib/esm/Footnote/FootnoteLink.js +26 -17
- package/lib/esm/Footnote/dictionary.js +1 -1
- package/lib/esm/IconButton/IconButton.js +2 -3
- package/lib/esm/Image/Image.js +10 -1
- package/lib/esm/Image/server.js +4 -4
- package/lib/esm/List/List.js +2 -2
- package/lib/esm/List/ListItem.js +2 -3
- package/lib/esm/NavigationBar/NavigationBar.js +5 -6
- package/lib/esm/NavigationBar/NavigationItem.js +9 -10
- package/lib/esm/NavigationBar/NavigationSubMenu.js +7 -8
- package/lib/esm/NavigationBar/collapseItems.js +2 -3
- package/lib/esm/NavigationBar/resolveItemSelection.js +2 -3
- package/lib/esm/OptimizeImage/OptimizeImage.js +4 -6
- package/lib/esm/OptimizeImage/utils/getFallbackUrl.js +2 -2
- package/lib/esm/OptimizeImage/utils/getImageUrls.js +3 -3
- package/lib/esm/OptimizeImage/utils/getOptimizedUrl.js +2 -2
- package/lib/esm/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/lib/esm/OptimizeImage/utils/index.js +4 -4
- package/lib/esm/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/lib/esm/OrderedList/OrderedList.js +4 -7
- package/lib/esm/OrderedList/OrderedListBase.js +3 -6
- package/lib/esm/OrderedList/{Item.js → OrderedListItem.js} +45 -38
- package/lib/esm/OrderedList/{ItemBase.js → OrderedListItemBase.js} +5 -6
- package/lib/esm/OrderedList/constants.js +0 -1
- package/lib/esm/Paragraph/Paragraph.js +9 -10
- package/lib/esm/PreviewCard/PreviewCard.js +16 -21
- package/lib/esm/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +4 -5
- package/lib/esm/PriceLockup/PriceLockup.js +57 -56
- package/lib/esm/PriceLockup/dictionary.js +1 -1
- package/lib/esm/PriceLockup/tokens.js +1 -1
- package/lib/esm/Progress/ProgressBar.js +13 -16
- package/lib/esm/QuantitySelector/QuantitySelector.js +6 -7
- package/lib/esm/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +4 -5
- package/lib/esm/QuantitySelector/dictionary.js +1 -1
- package/lib/esm/ResponsiveImage/ResponsiveImage.js +2 -3
- package/lib/esm/Ribbon/Ribbon.js +55 -64
- package/lib/esm/SkeletonProvider/SkeletonImage.js +2 -3
- package/lib/esm/SkeletonProvider/SkeletonProvider.js +6 -7
- package/lib/esm/SkeletonProvider/SkeletonTypography.js +2 -3
- package/lib/esm/Span/Span.js +5 -6
- package/lib/esm/Spinner/Spinner.js +24 -24
- package/lib/esm/Spinner/SpinnerContent.js +5 -6
- package/lib/esm/StoryCard/StoryCard.js +15 -16
- package/lib/esm/Table/Table.js +31 -24
- package/lib/esm/Table/{Body.js → TableBody.js} +4 -5
- package/lib/esm/Table/{Cell.js → TableCell.js} +57 -58
- package/lib/esm/Table/{Header.js → TableHeader.js} +6 -7
- package/lib/esm/Table/{Row.js → TableRow.js} +17 -18
- package/lib/esm/Table/{SubHeading.js → TableSubHeading.js} +6 -7
- package/lib/esm/TermsAndConditions/ExpandCollapse.js +18 -19
- package/lib/esm/TermsAndConditions/TermsAndConditions.js +40 -40
- package/lib/esm/TermsAndConditions/dictionary.js +1 -1
- package/lib/esm/Testimonial/Testimonial.js +22 -29
- package/lib/esm/Toast/Toast.js +26 -27
- package/lib/esm/Video/ControlBar/ControlBar.js +33 -33
- package/lib/esm/Video/ControlBar/Controls/VideoButton/VideoButton.js +5 -6
- package/lib/esm/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +28 -31
- package/lib/esm/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +33 -34
- package/lib/esm/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +38 -39
- package/lib/esm/Video/MiddleControlButton/MiddleControlButton.js +14 -15
- package/lib/esm/Video/Video.js +19 -21
- package/lib/esm/Video/videoText.js +2 -3
- package/lib/esm/VideoPicker/VideoPicker.js +32 -27
- package/lib/esm/VideoPicker/VideoPickerPlayer.js +3 -4
- package/lib/esm/VideoPicker/VideoPickerThumbnail.js +26 -23
- package/lib/esm/VideoPicker/VideoSlider.js +2 -3
- package/lib/esm/WaffleGrid/WaffleGrid.js +49 -46
- package/lib/esm/WebVideo/WebVideo.js +5 -6
- package/lib/esm/baseExports.js +1 -1
- package/lib/esm/index.js +46 -37
- package/lib/esm/server.js +1 -2
- package/lib/esm/shared/ConditionalWrapper/ConditionalWrapper.js +2 -3
- package/lib/esm/shared/FullBleedContent/FullBleedContent.js +25 -20
- package/lib/esm/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -3
- package/lib/esm/shared/FullBleedContent/index.js +3 -4
- package/lib/esm/shared/FullBleedContent/useFullBleedContentProps.js +3 -5
- package/lib/esm/shared/VideoSplash/SplashButton/SplashButton.js +8 -9
- package/lib/esm/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +48 -49
- package/lib/esm/shared/VideoSplash/VideoSplash.js +8 -9
- package/lib/esm/shared/VideoSplash/helpers.js +1 -1
- package/lib/esm/utils/index.js +7 -7
- package/lib/esm/utils/isElementFocusable.js +2 -3
- package/lib/esm/utils/logger.js +0 -4
- package/lib/esm/utils/media.js +1 -1
- package/lib/esm/utils/renderStructuredContent.js +2 -3
- package/lib/esm/utils/scrollToAnchor.js +2 -3
- package/lib/esm/utils/ssr.js +2 -3
- package/lib/esm/utils/theming/get-theme-from-server.js +1 -1
- package/lib/esm/utils/theming/with-client-theme.js +2 -3
- package/lib/esm/utils/theming/with-server-theme.js +3 -4
- package/lib/esm/utils/transforms.js +1 -4
- package/lib/esm/utils/useOverlaidPosition.js +2 -3
- package/lib/esm/utils/useTypographyTheme.js +2 -3
- package/package.json +13 -22
- package/src/Badge/Badge.jsx +18 -20
- package/src/BlockQuote/BlockQuote.jsx +16 -18
- package/src/Breadcrumbs/{Item/Item.jsx → BreadcrumbItem.jsx} +20 -21
- package/src/Breadcrumbs/Breadcrumbs.jsx +6 -9
- package/src/Callout/Callout.jsx +16 -18
- package/src/Card/Card.jsx +59 -80
- package/src/Card/CardContent.jsx +52 -28
- package/src/Card/CardFooter.jsx +26 -12
- package/src/Countdown/Countdown.jsx +3 -5
- package/src/Countdown/Segment.jsx +6 -8
- package/src/Countdown/dictionary.js +1 -1
- package/src/Countdown/types.js +0 -2
- package/src/Countdown/useCountdown.js +1 -3
- package/src/DatePicker/CalendarContainer.jsx +65 -67
- package/src/DatePicker/DatePicker.jsx +17 -19
- package/src/DatePicker/dictionary.js +1 -3
- package/src/DatePicker/reactDatesCss.js +1 -3
- package/src/Disclaimer/Disclaimer.jsx +15 -8
- package/src/Footnote/Footnote.jsx +104 -93
- package/src/Footnote/FootnoteLink.jsx +16 -13
- package/src/Footnote/dictionary.js +1 -1
- package/src/IconButton/IconButton.jsx +1 -3
- package/src/Image/Image.jsx +9 -1
- package/src/Image/server.js +4 -4
- package/src/List/List.jsx +2 -2
- package/src/List/ListItem.jsx +1 -3
- package/src/NavigationBar/NavigationBar.jsx +4 -6
- package/src/NavigationBar/NavigationItem.jsx +6 -8
- package/src/NavigationBar/NavigationSubMenu.jsx +7 -8
- package/src/NavigationBar/collapseItems.js +1 -3
- package/src/NavigationBar/resolveItemSelection.js +1 -3
- package/src/OptimizeImage/OptimizeImage.jsx +3 -6
- package/src/OptimizeImage/utils/getFallbackUrl.js +2 -2
- package/src/OptimizeImage/utils/getImageUrls.js +3 -3
- package/src/OptimizeImage/utils/getOptimizedUrl.js +2 -9
- package/src/OptimizeImage/utils/hasWebpSupport.js +1 -1
- package/src/OptimizeImage/utils/index.js +4 -4
- package/src/OptimizeImage/utils/isSvgUrl.js +1 -1
- package/src/OrderedList/OrderedList.jsx +3 -8
- package/src/OrderedList/OrderedListBase.jsx +2 -7
- package/src/OrderedList/{Item.jsx → OrderedListItem.jsx} +44 -32
- package/src/OrderedList/{ItemBase.jsx → OrderedListItemBase.jsx} +4 -4
- package/src/OrderedList/constants.js +0 -1
- package/src/Paragraph/Paragraph.jsx +7 -9
- package/src/PreviewCard/PreviewCard.jsx +16 -32
- package/src/PreviewCard/{AuthorDate.jsx → PreviewCardAuthorDate.jsx} +3 -5
- package/src/PriceLockup/PriceLockup.jsx +33 -31
- package/src/PriceLockup/dictionary.js +1 -1
- package/src/PriceLockup/tokens.js +1 -1
- package/src/Progress/ProgressBar.jsx +33 -30
- package/src/QuantitySelector/QuantitySelector.jsx +5 -7
- package/src/QuantitySelector/{SideButton.jsx → QuantitySelectorSideButton.jsx} +3 -4
- package/src/QuantitySelector/dictionary.js +1 -1
- package/src/ResponsiveImage/ResponsiveImage.jsx +1 -3
- package/src/Ribbon/Ribbon.jsx +35 -44
- package/src/SkeletonProvider/SkeletonImage.jsx +1 -3
- package/src/SkeletonProvider/SkeletonProvider.jsx +5 -9
- package/src/SkeletonProvider/SkeletonTypography.jsx +1 -3
- package/src/Span/Span.jsx +11 -11
- package/src/Spinner/Spinner.jsx +17 -19
- package/src/Spinner/SpinnerContent.jsx +4 -6
- package/src/StoryCard/StoryCard.jsx +15 -16
- package/src/Table/Table.jsx +81 -75
- package/src/Table/{Body.jsx → TableBody.jsx} +3 -5
- package/src/Table/{Cell.jsx → TableCell.jsx} +69 -65
- package/src/Table/{Header.jsx → TableHeader.jsx} +6 -8
- package/src/Table/{Row.jsx → TableRow.jsx} +11 -12
- package/src/Table/{SubHeading.jsx → TableSubHeading.jsx} +6 -8
- package/src/TermsAndConditions/ExpandCollapse.jsx +18 -19
- package/src/TermsAndConditions/TermsAndConditions.jsx +37 -37
- package/src/TermsAndConditions/dictionary.js +1 -1
- package/src/Testimonial/Testimonial.jsx +20 -28
- package/src/Toast/Toast.jsx +36 -35
- package/src/Video/ControlBar/ControlBar.jsx +28 -25
- package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +4 -6
- package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +26 -30
- package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +31 -33
- package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +40 -40
- package/src/Video/MiddleControlButton/MiddleControlButton.jsx +10 -12
- package/src/Video/Video.jsx +697 -683
- package/src/Video/videoText.js +1 -3
- package/src/VideoPicker/VideoPicker.jsx +37 -25
- package/src/VideoPicker/VideoPickerPlayer.jsx +2 -4
- package/src/VideoPicker/VideoPickerThumbnail.jsx +26 -15
- package/src/VideoPicker/VideoSlider.jsx +1 -3
- package/src/WaffleGrid/WaffleGrid.jsx +31 -27
- package/src/WebVideo/WebVideo.jsx +4 -6
- package/src/baseExports.js +27 -13
- package/src/index.js +46 -37
- package/src/server.js +1 -2
- package/src/shared/ConditionalWrapper/ConditionalWrapper.jsx +1 -3
- package/src/shared/FullBleedContent/FullBleedContent.jsx +26 -19
- package/src/shared/FullBleedContent/getFullBleedBorderRadius.js +1 -3
- package/src/shared/FullBleedContent/index.js +3 -8
- package/src/shared/FullBleedContent/useFullBleedContentProps.js +2 -5
- package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +5 -7
- package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +25 -25
- package/src/shared/VideoSplash/VideoSplash.jsx +7 -9
- package/src/shared/VideoSplash/helpers.js +1 -1
- package/src/utils/index.js +7 -7
- package/src/utils/isElementFocusable.js +1 -3
- package/src/utils/logger.js +0 -5
- package/src/utils/media.js +1 -1
- package/src/utils/renderStructuredContent.jsx +1 -3
- package/src/utils/scrollToAnchor.js +1 -3
- package/src/utils/ssr.js +1 -3
- package/src/utils/theming/get-theme-from-server.js +1 -1
- package/src/utils/theming/with-client-theme.jsx +1 -3
- package/src/utils/theming/with-server-theme.jsx +2 -4
- package/src/utils/transforms.js +0 -2
- package/src/utils/useOverlaidPosition.js +1 -3
- package/src/utils/useTypographyTheme.js +1 -3
- package/types/Autocomplete.d.ts +1 -3
- package/types/Badge.d.ts +1 -3
- package/types/BaseProvider.d.ts +1 -3
- package/types/BlockQuote.d.ts +1 -3
- package/types/Box.d.ts +1 -3
- package/types/BreadcrumbItem.d.ts +1 -3
- package/types/Breadcrumbs.d.ts +2 -4
- package/types/Callout.d.ts +1 -3
- package/types/Card.d.ts +1 -3
- package/types/Cell.d.ts +1 -3
- package/types/ControlBar.d.ts +1 -3
- package/types/Countdown.d.ts +1 -3
- package/types/DatePicker.d.ts +1 -3
- package/types/FileUpload.d.ts +1 -3
- package/types/Footnote.d.ts +1 -3
- package/types/FootnoteLink.d.ts +1 -3
- package/types/Listbox.d.ts +1 -3
- package/types/MiddleControlButton.d.ts +1 -3
- package/types/MultiSelectFilter.d.ts +1 -3
- package/types/PriceLockup.d.ts +1 -3
- package/types/QuantitySelector.d.ts +1 -3
- package/types/Ribbon.d.ts +1 -3
- package/types/Spinner.d.ts +1 -3
- package/types/Table.d.ts +1 -3
- package/types/Tooltip.d.ts +1 -3
- package/types/TooltipButton.d.ts +1 -3
- package/types/Typography.d.ts +1 -3
- package/types/Video.d.ts +1 -3
- package/types/VideoButton.d.ts +1 -3
- package/types/VideoMenu.d.ts +1 -3
- package/types/VideoProgressBar.d.ts +1 -3
- package/types/VolumeSlider.d.ts +1 -3
- package/types/WebVideo.d.ts +1 -3
- package/lib/cjs/Badge/index.js +0 -9
- package/lib/cjs/BlockQuote/index.js +0 -9
- package/lib/cjs/Breadcrumbs/index.js +0 -13
- package/lib/cjs/Callout/index.js +0 -9
- package/lib/cjs/Card/index.js +0 -9
- package/lib/cjs/Countdown/index.js +0 -9
- package/lib/cjs/DatePicker/index.js +0 -9
- package/lib/cjs/Disclaimer/index.js +0 -13
- package/lib/cjs/Footnote/index.js +0 -11
- package/lib/cjs/IconButton/index.js +0 -9
- package/lib/cjs/Image/index.js +0 -20
- package/lib/cjs/List/index.js +0 -17
- package/lib/cjs/NavigationBar/index.js +0 -11
- package/lib/cjs/OptimizeImage/index.js +0 -9
- package/lib/cjs/OrderedList/index.js +0 -17
- package/lib/cjs/Paragraph/index.js +0 -9
- package/lib/cjs/PreviewCard/index.js +0 -9
- package/lib/cjs/PriceLockup/index.js +0 -9
- package/lib/cjs/Progress/index.js +0 -11
- package/lib/cjs/QuantitySelector/index.js +0 -9
- package/lib/cjs/ResponsiveImage/index.js +0 -9
- package/lib/cjs/Ribbon/index.js +0 -9
- package/lib/cjs/SkeletonProvider/index.js +0 -9
- package/lib/cjs/Span/index.js +0 -9
- package/lib/cjs/Spinner/index.js +0 -9
- package/lib/cjs/StoryCard/index.js +0 -9
- package/lib/cjs/Table/index.js +0 -24
- package/lib/cjs/TermsAndConditions/index.js +0 -13
- package/lib/cjs/Testimonial/index.js +0 -9
- package/lib/cjs/Toast/index.js +0 -9
- package/lib/cjs/Video/index.js +0 -9
- package/lib/cjs/VideoPicker/index.js +0 -9
- package/lib/cjs/WaffleGrid/index.js +0 -9
- package/lib/cjs/WebVideo/index.js +0 -9
- package/lib/cjs/shared/ConditionalWrapper/index.js +0 -9
- package/lib/esm/Badge/index.js +0 -2
- package/lib/esm/BlockQuote/index.js +0 -2
- package/lib/esm/Breadcrumbs/index.js +0 -1
- package/lib/esm/Callout/index.js +0 -2
- package/lib/esm/Card/index.js +0 -2
- package/lib/esm/Countdown/index.js +0 -2
- package/lib/esm/DatePicker/index.js +0 -2
- package/lib/esm/Disclaimer/index.js +0 -1
- package/lib/esm/Footnote/index.js +0 -4
- package/lib/esm/IconButton/index.js +0 -2
- package/lib/esm/Image/index.js +0 -9
- package/lib/esm/List/index.js +0 -5
- package/lib/esm/NavigationBar/index.js +0 -4
- package/lib/esm/OptimizeImage/index.js +0 -2
- package/lib/esm/OrderedList/index.js +0 -5
- package/lib/esm/Paragraph/index.js +0 -2
- package/lib/esm/PreviewCard/index.js +0 -2
- package/lib/esm/PriceLockup/index.js +0 -2
- package/lib/esm/Progress/index.js +0 -4
- package/lib/esm/QuantitySelector/index.js +0 -2
- package/lib/esm/ResponsiveImage/index.js +0 -2
- package/lib/esm/Ribbon/index.js +0 -2
- package/lib/esm/SkeletonProvider/index.js +0 -2
- package/lib/esm/Span/index.js +0 -2
- package/lib/esm/Spinner/index.js +0 -2
- package/lib/esm/StoryCard/index.js +0 -2
- package/lib/esm/Table/index.js +0 -17
- package/lib/esm/TermsAndConditions/index.js +0 -1
- package/lib/esm/Testimonial/index.js +0 -2
- package/lib/esm/Toast/index.js +0 -2
- package/lib/esm/Video/index.js +0 -2
- package/lib/esm/VideoPicker/index.js +0 -2
- package/lib/esm/WaffleGrid/index.js +0 -2
- package/lib/esm/WebVideo/index.js +0 -2
- package/lib/esm/shared/ConditionalWrapper/index.js +0 -2
- package/src/Badge/index.js +0 -3
- package/src/BlockQuote/index.js +0 -3
- package/src/Breadcrumbs/index.js +0 -1
- package/src/Callout/index.js +0 -3
- package/src/Card/index.js +0 -3
- package/src/Countdown/index.js +0 -3
- package/src/DatePicker/index.js +0 -3
- package/src/Disclaimer/index.js +0 -1
- package/src/Footnote/index.js +0 -6
- package/src/IconButton/index.js +0 -3
- package/src/Image/index.js +0 -10
- package/src/List/index.js +0 -8
- package/src/NavigationBar/index.js +0 -6
- package/src/OptimizeImage/index.js +0 -3
- package/src/OrderedList/index.js +0 -8
- package/src/Paragraph/index.js +0 -3
- package/src/PreviewCard/index.js +0 -3
- package/src/PriceLockup/index.js +0 -3
- package/src/Progress/index.js +0 -6
- package/src/QuantitySelector/index.js +0 -3
- package/src/ResponsiveImage/index.js +0 -3
- package/src/Ribbon/index.js +0 -3
- package/src/SkeletonProvider/index.js +0 -3
- package/src/Span/index.js +0 -3
- package/src/Spinner/index.js +0 -3
- package/src/StoryCard/index.js +0 -3
- package/src/Table/index.js +0 -20
- package/src/TermsAndConditions/index.js +0 -1
- package/src/Testimonial/index.js +0 -3
- package/src/Toast/index.js +0 -3
- package/src/Video/index.js +0 -3
- package/src/VideoPicker/index.js +0 -3
- package/src/WaffleGrid/index.js +0 -3
- package/src/WebVideo/index.js +0 -3
- package/src/shared/ConditionalWrapper/index.js +0 -3
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Skeleton } from '@telus-uds/components-base';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const SkeletonImage = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5
|
+
export const SkeletonImage = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
6
6
|
let {
|
|
7
7
|
rounded,
|
|
8
8
|
imgHeight,
|
|
@@ -34,5 +34,4 @@ SkeletonImage.propTypes = {
|
|
|
34
34
|
sizePixels: Skeleton.propTypes?.sizePixels,
|
|
35
35
|
show: PropTypes.bool.isRequired,
|
|
36
36
|
children: PropTypes.node
|
|
37
|
-
};
|
|
38
|
-
export default SkeletonImage;
|
|
37
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Typography } from '@telus-uds/components-base';
|
|
4
|
-
import Image from '../Image';
|
|
5
|
-
import SkeletonTypography from './SkeletonTypography';
|
|
6
|
-
import SkeletonImage from './SkeletonImage';
|
|
4
|
+
import { Image } from '../Image/Image';
|
|
5
|
+
import { SkeletonTypography } from './SkeletonTypography';
|
|
6
|
+
import { SkeletonImage } from './SkeletonImage';
|
|
7
7
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
-
const SkeletonProvider = _ref => {
|
|
8
|
+
export const SkeletonProvider = _ref => {
|
|
9
9
|
let {
|
|
10
10
|
children,
|
|
11
11
|
show
|
|
@@ -22,7 +22,7 @@ const SkeletonProvider = _ref => {
|
|
|
22
22
|
const {
|
|
23
23
|
children: elementChildren
|
|
24
24
|
} = childElement.props;
|
|
25
|
-
const mappedChildren =
|
|
25
|
+
const mappedChildren = React.Children.map(elementChildren, mapChild);
|
|
26
26
|
childElement = /*#__PURE__*/React.cloneElement(childElement, {
|
|
27
27
|
children: mappedChildren
|
|
28
28
|
});
|
|
@@ -52,5 +52,4 @@ const SkeletonProvider = _ref => {
|
|
|
52
52
|
SkeletonProvider.propTypes = {
|
|
53
53
|
show: PropTypes.bool.isRequired,
|
|
54
54
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).isRequired
|
|
55
|
-
};
|
|
56
|
-
export default SkeletonProvider;
|
|
55
|
+
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Skeleton } from '@telus-uds/components-base';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const SkeletonTypography = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5
|
+
export const SkeletonTypography = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
6
6
|
let {
|
|
7
7
|
show,
|
|
8
8
|
size,
|
|
@@ -33,5 +33,4 @@ SkeletonTypography.propTypes = {
|
|
|
33
33
|
sizePixels: Skeleton.propTypes?.sizePixels,
|
|
34
34
|
characters: Skeleton.propTypes?.characters,
|
|
35
35
|
lines: Skeleton.propTypes?.lines
|
|
36
|
-
};
|
|
37
|
-
export default SkeletonTypography;
|
|
36
|
+
};
|
package/lib/esm/Span/Span.js
CHANGED
|
@@ -10,9 +10,9 @@ const StyledSpan = /*#__PURE__*/styled.span.withConfig({
|
|
|
10
10
|
componentId: "components-web__sc-o7sihn-0"
|
|
11
11
|
})(["", "};"], _ref => {
|
|
12
12
|
let {
|
|
13
|
-
flex
|
|
13
|
+
$flex
|
|
14
14
|
} = _ref;
|
|
15
|
-
return flex ? 'display: inline-flex' : '';
|
|
15
|
+
return $flex ? 'display: inline-flex' : '';
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -21,7 +21,7 @@ const StyledSpan = /*#__PURE__*/styled.span.withConfig({
|
|
|
21
21
|
* Span may be used in cases where an inline span or direct access to HTML attributes is required.
|
|
22
22
|
* In most cases, `Typography` should be used for text, or Paragraph for body text.
|
|
23
23
|
*/
|
|
24
|
-
const Span = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
24
|
+
export const Span = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
25
25
|
let {
|
|
26
26
|
children,
|
|
27
27
|
variant,
|
|
@@ -33,7 +33,7 @@ const Span = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
33
33
|
const style = useTypographyTheme(variant, tokens);
|
|
34
34
|
return /*#__PURE__*/_jsx(StyledSpan, {
|
|
35
35
|
"data-testid": testID,
|
|
36
|
-
flex: flex,
|
|
36
|
+
$flex: flex,
|
|
37
37
|
style: style,
|
|
38
38
|
ref: ref,
|
|
39
39
|
...selectProps(rest),
|
|
@@ -68,5 +68,4 @@ Span.propTypes = {
|
|
|
68
68
|
size: PropTypes.oneOf(['micro', 'small', 'large', 'eyebrow', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'display1', 'display2']),
|
|
69
69
|
weight: PropTypes.oneOf(['semibold', 'bold'])
|
|
70
70
|
})
|
|
71
|
-
};
|
|
72
|
-
export default Span;
|
|
71
|
+
};
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { selectSystemProps, useScrollBlocking, useThemeTokens, getTokensPropType } from '@telus-uds/components-base';
|
|
4
4
|
import { Portal } from '@gorhom/portal';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
-
import SpinnerContent from './SpinnerContent';
|
|
6
|
+
import { SpinnerContent } from './SpinnerContent';
|
|
7
7
|
import { htmlAttrs, media } from '../utils';
|
|
8
8
|
import { BACKDROP_OPACITY, BACKDROP_Z_INDEX } from './constants';
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -13,19 +13,19 @@ const SpinnerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
13
13
|
componentId: "components-web__sc-116rqck-0"
|
|
14
14
|
})(_ref => {
|
|
15
15
|
let {
|
|
16
|
-
inline,
|
|
17
|
-
fullScreen,
|
|
18
|
-
overlay
|
|
16
|
+
$inline,
|
|
17
|
+
$fullScreen,
|
|
18
|
+
$overlay
|
|
19
19
|
} = _ref;
|
|
20
20
|
return {
|
|
21
21
|
position: 'relative',
|
|
22
|
-
...(inline && {
|
|
23
|
-
display: overlay ? 'inline-block' : 'block',
|
|
22
|
+
...($inline && {
|
|
23
|
+
display: $overlay ? 'inline-block' : 'block',
|
|
24
24
|
...media().from('md').css({
|
|
25
25
|
display: 'inline-block'
|
|
26
26
|
})
|
|
27
27
|
}),
|
|
28
|
-
...(fullScreen && {
|
|
28
|
+
...($fullScreen && {
|
|
29
29
|
top: '50%',
|
|
30
30
|
transform: 'translateY(-50%)'
|
|
31
31
|
})
|
|
@@ -48,7 +48,7 @@ const FullscreenOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
|
48
48
|
componentId: "components-web__sc-116rqck-2"
|
|
49
49
|
})(_ref2 => {
|
|
50
50
|
let {
|
|
51
|
-
fullScreenOverLayBackground
|
|
51
|
+
$fullScreenOverLayBackground
|
|
52
52
|
} = _ref2;
|
|
53
53
|
return {
|
|
54
54
|
position: 'fixed',
|
|
@@ -57,7 +57,7 @@ const FullscreenOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
|
57
57
|
top: 0,
|
|
58
58
|
left: 0,
|
|
59
59
|
zIndex: BACKDROP_Z_INDEX,
|
|
60
|
-
backgroundColor: fullScreenOverLayBackground
|
|
60
|
+
backgroundColor: $fullScreenOverLayBackground
|
|
61
61
|
};
|
|
62
62
|
});
|
|
63
63
|
const OpaqueContainer = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -65,10 +65,10 @@ const OpaqueContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
65
65
|
componentId: "components-web__sc-116rqck-3"
|
|
66
66
|
})(_ref3 => {
|
|
67
67
|
let {
|
|
68
|
-
show = true
|
|
68
|
+
$show = true
|
|
69
69
|
} = _ref3;
|
|
70
70
|
return {
|
|
71
|
-
...(show && {
|
|
71
|
+
...($show && {
|
|
72
72
|
opacity: BACKDROP_OPACITY
|
|
73
73
|
})
|
|
74
74
|
};
|
|
@@ -88,7 +88,7 @@ const recursiveMap = (children, fn) => React.Children.map(children, child => {
|
|
|
88
88
|
/**
|
|
89
89
|
* Loading indicator.
|
|
90
90
|
*/
|
|
91
|
-
const Spinner = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
91
|
+
export const Spinner = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
92
92
|
let {
|
|
93
93
|
children,
|
|
94
94
|
fullScreen = false,
|
|
@@ -115,14 +115,14 @@ const Spinner = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
|
115
115
|
// Overlay spinner with persistChildrenState enabled
|
|
116
116
|
if (children && persistChildrenState) {
|
|
117
117
|
return /*#__PURE__*/_jsxs(SpinnerContainer, {
|
|
118
|
-
inline: inline,
|
|
118
|
+
$inline: inline,
|
|
119
119
|
"aria-live": "assertive",
|
|
120
|
-
overlay: true,
|
|
120
|
+
$overlay: true,
|
|
121
121
|
...selectProps(rest),
|
|
122
122
|
children: [/*#__PURE__*/_jsx(OpaqueContainer, {
|
|
123
|
-
show: show,
|
|
123
|
+
$show: show,
|
|
124
124
|
...(show ? {
|
|
125
|
-
inert:
|
|
125
|
+
inert: true,
|
|
126
126
|
'aria-hidden': 'true'
|
|
127
127
|
} : {}),
|
|
128
128
|
children: children
|
|
@@ -145,10 +145,10 @@ const Spinner = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
|
145
145
|
if (fullScreen) {
|
|
146
146
|
return /*#__PURE__*/_jsx(Portal, {
|
|
147
147
|
children: /*#__PURE__*/_jsx(FullscreenOverlay, {
|
|
148
|
-
fullScreenOverLayBackground: fullScreenOverLayBackground,
|
|
148
|
+
$fullScreenOverLayBackground: fullScreenOverLayBackground,
|
|
149
149
|
children: /*#__PURE__*/_jsx(SpinnerContainer, {
|
|
150
|
-
inline: inline,
|
|
151
|
-
fullScreen: fullScreen,
|
|
150
|
+
$inline: inline,
|
|
151
|
+
$fullScreen: fullScreen,
|
|
152
152
|
"aria-live": "assertive",
|
|
153
153
|
...selectProps(rest),
|
|
154
154
|
children: /*#__PURE__*/_jsx(SpinnerContent, {
|
|
@@ -168,9 +168,9 @@ const Spinner = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
|
168
168
|
// Overlay spinner
|
|
169
169
|
if (children && !persistChildrenState) {
|
|
170
170
|
return /*#__PURE__*/_jsxs(SpinnerContainer, {
|
|
171
|
-
inline: inline,
|
|
171
|
+
$inline: inline,
|
|
172
172
|
"aria-live": "assertive",
|
|
173
|
-
overlay: true,
|
|
173
|
+
$overlay: true,
|
|
174
174
|
...selectProps(rest),
|
|
175
175
|
children: [/*#__PURE__*/_jsx(SpinnerContent, {
|
|
176
176
|
label: label,
|
|
@@ -181,7 +181,8 @@ const Spinner = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
|
181
181
|
sizeVariant: sizeVariant,
|
|
182
182
|
isStatic: isStatic
|
|
183
183
|
}), /*#__PURE__*/_jsx(ContentOverlay, {}), /*#__PURE__*/_jsx(OpaqueContainer, {
|
|
184
|
-
|
|
184
|
+
$show: show,
|
|
185
|
+
inert: true,
|
|
185
186
|
children: recursiveMap(children, c => {
|
|
186
187
|
if (c) {
|
|
187
188
|
return /*#__PURE__*/React.cloneElement(c, {
|
|
@@ -255,5 +256,4 @@ Spinner.propTypes = {
|
|
|
255
256
|
* Use this when overlaying stateful components such as Micro Frontends (MFEs).
|
|
256
257
|
*/
|
|
257
258
|
persistChildrenState: PropTypes.bool
|
|
258
|
-
};
|
|
259
|
-
export default Spinner;
|
|
259
|
+
};
|
|
@@ -11,13 +11,13 @@ const Container = /*#__PURE__*/styled.div.withConfig({
|
|
|
11
11
|
componentId: "components-web__sc-1c8bd8e-0"
|
|
12
12
|
})(_ref => {
|
|
13
13
|
let {
|
|
14
|
-
overlay
|
|
14
|
+
$overlay
|
|
15
15
|
} = _ref;
|
|
16
16
|
return {
|
|
17
17
|
display: 'inline-flex',
|
|
18
18
|
flexDirection: 'column',
|
|
19
19
|
alignItems: 'center',
|
|
20
|
-
...(overlay && {
|
|
20
|
+
...($overlay && {
|
|
21
21
|
position: 'absolute',
|
|
22
22
|
top: '50%',
|
|
23
23
|
left: '50%',
|
|
@@ -26,7 +26,7 @@ const Container = /*#__PURE__*/styled.div.withConfig({
|
|
|
26
26
|
})
|
|
27
27
|
};
|
|
28
28
|
});
|
|
29
|
-
const SpinnerContent = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
29
|
+
export const SpinnerContent = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
30
30
|
let {
|
|
31
31
|
label,
|
|
32
32
|
labelPosition,
|
|
@@ -39,7 +39,7 @@ const SpinnerContent = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
39
39
|
...rest
|
|
40
40
|
} = _ref2;
|
|
41
41
|
return /*#__PURE__*/_jsx(Container, {
|
|
42
|
-
overlay: overlay,
|
|
42
|
+
$overlay: overlay,
|
|
43
43
|
ref: ref,
|
|
44
44
|
"aria-label": label,
|
|
45
45
|
role: "status",
|
|
@@ -82,5 +82,4 @@ SpinnerContent.propTypes = {
|
|
|
82
82
|
* If true, it should render a static spinner
|
|
83
83
|
*/
|
|
84
84
|
isStatic: PropTypes.bool
|
|
85
|
-
};
|
|
86
|
-
export default SpinnerContent;
|
|
85
|
+
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Box, Divider, PressableCardBase, selectSystemProps, Spacer, StackView, StackWrap, Typography, hrefAttrsProp, a11yProps, focusHandlerProps, viewProps, withLinkRouter, useThemeTokens, useThemeTokensCallback, getTokensPropType } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import FullBleedContent,
|
|
5
|
+
import { FullBleedContent, getFullBleedBorderRadius, useFullBleedContentProps } from '../shared/FullBleedContent';
|
|
6
6
|
|
|
7
7
|
// Passes React Native-oriented system props through UDS PressableCardBase
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -15,11 +15,11 @@ const FullBleedOffsetOuter = /*#__PURE__*/styled.div.withConfig({
|
|
|
15
15
|
componentId: "components-web__sc-yhvivu-0"
|
|
16
16
|
})(_ref => {
|
|
17
17
|
let {
|
|
18
|
-
borderOffset
|
|
18
|
+
$borderOffset
|
|
19
19
|
} = _ref;
|
|
20
20
|
return {
|
|
21
21
|
overflow: 'hidden',
|
|
22
|
-
marginTop: borderOffset * 2
|
|
22
|
+
marginTop: $borderOffset * 2
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
25
|
const FullBleedOffsetInner = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -27,11 +27,11 @@ const FullBleedOffsetInner = /*#__PURE__*/styled.div.withConfig({
|
|
|
27
27
|
componentId: "components-web__sc-yhvivu-1"
|
|
28
28
|
})(_ref2 => {
|
|
29
29
|
let {
|
|
30
|
-
borderOffset
|
|
30
|
+
$borderOffset
|
|
31
31
|
} = _ref2;
|
|
32
32
|
return {
|
|
33
33
|
position: 'relative',
|
|
34
|
-
margin: 0 - borderOffset
|
|
34
|
+
margin: 0 - $borderOffset
|
|
35
35
|
};
|
|
36
36
|
});
|
|
37
37
|
|
|
@@ -52,8 +52,7 @@ const StoryCard = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
52
52
|
date,
|
|
53
53
|
title,
|
|
54
54
|
description,
|
|
55
|
-
|
|
56
|
-
fullBleedContent = fullBleedImage,
|
|
55
|
+
fullBleedContent,
|
|
57
56
|
onPress,
|
|
58
57
|
href,
|
|
59
58
|
tokens,
|
|
@@ -152,9 +151,9 @@ const StoryCard = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
152
151
|
children: description
|
|
153
152
|
})]
|
|
154
153
|
}), Boolean(fullBleedContentProps.src || fullBleedContentProps.content) && /*#__PURE__*/_jsx(FullBleedOffsetOuter, {
|
|
155
|
-
borderOffset: borderOffset,
|
|
154
|
+
$borderOffset: borderOffset,
|
|
156
155
|
children: /*#__PURE__*/_jsx(FullBleedOffsetInner, {
|
|
157
|
-
borderOffset: borderOffset,
|
|
156
|
+
$borderOffset: borderOffset,
|
|
158
157
|
children: /*#__PURE__*/_jsx(FullBleedContent, {
|
|
159
158
|
borderRadius: fullBleedBorderRadius,
|
|
160
159
|
...fullBleedContentProps
|
|
@@ -197,15 +196,15 @@ StoryCard.propTypes = {
|
|
|
197
196
|
* Text giving a short description of the story. One paragraph of plain text.
|
|
198
197
|
*/
|
|
199
198
|
description: PropTypes.string.isRequired,
|
|
200
|
-
/**
|
|
201
|
-
* Full bleed image to be placed on the card, deprecated in favor of `fullBleedContent`.
|
|
202
|
-
*
|
|
203
|
-
* @deprecated
|
|
204
|
-
*/
|
|
205
|
-
fullBleedImage: PropTypes.exact(FullBleedContent.propTypes || {}),
|
|
206
199
|
/**
|
|
207
200
|
* Full bleed image to be placed on the card.
|
|
208
201
|
*/
|
|
209
202
|
fullBleedContent: PropTypes.exact(FullBleedContent.propTypes || {})
|
|
210
203
|
};
|
|
211
|
-
|
|
204
|
+
|
|
205
|
+
// Export unwrapped component for react-docgen to extract info for docsite
|
|
206
|
+
export { StoryCard as StoryCardBase };
|
|
207
|
+
|
|
208
|
+
// Export wrapped component as main StoryCard export
|
|
209
|
+
const StoryCardWithRouter = withLinkRouter(StoryCard);
|
|
210
|
+
export { StoryCardWithRouter as StoryCard };
|
package/lib/esm/Table/Table.js
CHANGED
|
@@ -9,17 +9,17 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
|
9
9
|
const StyledContainer = /*#__PURE__*/styled.div.withConfig({
|
|
10
10
|
displayName: "Table__StyledContainer",
|
|
11
11
|
componentId: "components-web__sc-10d9q3m-0"
|
|
12
|
-
})(["overflow:auto;padding-bottom:", ";"], props => props
|
|
12
|
+
})(["overflow:auto;padding-bottom:", ";"], props => props.$isScrollable ? `${props.$tablePaddingBottom}px` : 0);
|
|
13
13
|
const StyledTable = /*#__PURE__*/styled.table.withConfig({
|
|
14
14
|
displayName: "Table__StyledTable",
|
|
15
15
|
componentId: "components-web__sc-10d9q3m-1"
|
|
16
16
|
})(["margin:0;padding:0;width:", ";border:", ";border-collapse:collapse;"], _ref => {
|
|
17
17
|
let {
|
|
18
|
-
fullWidth,
|
|
19
|
-
tableWidth
|
|
18
|
+
$fullWidth,
|
|
19
|
+
$tableWidth
|
|
20
20
|
} = _ref;
|
|
21
|
-
return fullWidth ? '100%' : `${tableWidth}px`;
|
|
22
|
-
}, props => `${props
|
|
21
|
+
return $fullWidth ? '100%' : `${$tableWidth}px`;
|
|
22
|
+
}, props => `${props.$borderWidth}px solid ${props.$borderColor}`);
|
|
23
23
|
const TableContext = /*#__PURE__*/React.createContext({});
|
|
24
24
|
export const useTableContext = () => React.useContext(TableContext);
|
|
25
25
|
|
|
@@ -32,12 +32,12 @@ export const useTableContext = () => React.useContext(TableContext);
|
|
|
32
32
|
* - Right-align prices and numbers that display decimal points
|
|
33
33
|
*
|
|
34
34
|
* ### Building up a `Table`
|
|
35
|
-
* - Use `
|
|
36
|
-
* - Use `
|
|
37
|
-
* - Use `
|
|
38
|
-
* - Use `
|
|
35
|
+
* - Use `TableHeader` and `TableBody` as direct children of `Table`
|
|
36
|
+
* - Use `TableSubHeading` to render an intermediate data heading row
|
|
37
|
+
* - Use `TableRow` and `TableCell` to build up the tabular data
|
|
38
|
+
* - Use `TableCell`'s `type` prop to visually mark it as a row heading (`type="rowHeading"`)
|
|
39
39
|
*/
|
|
40
|
-
const Table = _ref2 => {
|
|
40
|
+
export const Table = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
41
41
|
let {
|
|
42
42
|
children,
|
|
43
43
|
spacing = 'default',
|
|
@@ -53,7 +53,8 @@ const Table = _ref2 => {
|
|
|
53
53
|
borderColor,
|
|
54
54
|
borderWidth
|
|
55
55
|
} = themeTokens;
|
|
56
|
-
const
|
|
56
|
+
const internalRef = React.useRef();
|
|
57
|
+
const containerRef = ref ?? internalRef;
|
|
57
58
|
const tableRef = React.useRef();
|
|
58
59
|
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
59
60
|
const [tableWidth, setTableWidth] = React.useState(0);
|
|
@@ -80,8 +81,8 @@ const Table = _ref2 => {
|
|
|
80
81
|
const isScrollable = tableWidth > containerWidth;
|
|
81
82
|
return /*#__PURE__*/_jsx(StyledContainer, {
|
|
82
83
|
ref: containerRef,
|
|
83
|
-
isScrollable: isScrollable,
|
|
84
|
-
tablePaddingBottom: tablePaddingBottom,
|
|
84
|
+
$isScrollable: isScrollable,
|
|
85
|
+
$tablePaddingBottom: tablePaddingBottom,
|
|
85
86
|
children: /*#__PURE__*/_jsx(TableContext.Provider, {
|
|
86
87
|
value: {
|
|
87
88
|
text,
|
|
@@ -92,25 +93,31 @@ const Table = _ref2 => {
|
|
|
92
93
|
themeTokens
|
|
93
94
|
},
|
|
94
95
|
children: /*#__PURE__*/_jsx(StyledTable, {
|
|
95
|
-
borderColor: borderColor,
|
|
96
|
-
borderWidth: borderWidth,
|
|
97
|
-
tableWidth: tableWidth,
|
|
96
|
+
$borderColor: borderColor,
|
|
97
|
+
$borderWidth: borderWidth,
|
|
98
|
+
$tableWidth: tableWidth,
|
|
98
99
|
cellSpacing: 0,
|
|
99
100
|
ref: tableRef,
|
|
100
|
-
fullWidth: fullWidth,
|
|
101
|
+
$fullWidth: fullWidth,
|
|
101
102
|
...selectProps(rest),
|
|
102
103
|
children: children
|
|
103
104
|
})
|
|
104
105
|
})
|
|
105
106
|
});
|
|
106
|
-
};
|
|
107
|
+
});
|
|
108
|
+
Table.displayName = 'Table';
|
|
107
109
|
Table.propTypes = {
|
|
108
110
|
...selectedSystemPropTypes,
|
|
111
|
+
/** Theme tokens for Table */
|
|
109
112
|
tokens: getTokensPropType('Table'),
|
|
113
|
+
/** Table content (rows, headers, etc) */
|
|
110
114
|
children: PropTypes.node,
|
|
111
|
-
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
/** Sets text style */
|
|
116
|
+
text: PropTypes.oneOf(['medium', 'small']),
|
|
117
|
+
/** Table spacing variant */
|
|
118
|
+
spacing: PropTypes.oneOf(['default', 'compact']),
|
|
119
|
+
/** If true, table takes 100% width of container */
|
|
120
|
+
fullWidth: PropTypes.bool,
|
|
121
|
+
/** Variant for Table styling */
|
|
122
|
+
variant: PropTypes.object
|
|
123
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
const
|
|
4
|
+
export const TableBody = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5
5
|
let {
|
|
6
6
|
children
|
|
7
7
|
} = _ref;
|
|
@@ -10,8 +10,7 @@ const Body = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
10
10
|
children: children
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
TableBody.displayName = 'TableBody';
|
|
14
|
+
TableBody.propTypes = {
|
|
15
15
|
children: PropTypes.node
|
|
16
|
-
};
|
|
17
|
-
export default Body;
|
|
16
|
+
};
|
|
@@ -19,51 +19,51 @@ const stickyStyles = _ref => {
|
|
|
19
19
|
};
|
|
20
20
|
const sharedStyles = /*#__PURE__*/css(["", ""], _ref2 => {
|
|
21
21
|
let {
|
|
22
|
-
isSticky,
|
|
23
|
-
align,
|
|
24
|
-
cellPaddingTop,
|
|
25
|
-
cellPaddingRight,
|
|
26
|
-
cellPaddingBottom,
|
|
27
|
-
cellPaddingLeft,
|
|
28
|
-
cellBorderWidth,
|
|
29
|
-
cellBorderColor,
|
|
30
|
-
cellBorderTopWidth,
|
|
31
|
-
cellMinWidth,
|
|
32
|
-
cellBackground,
|
|
33
|
-
cellStickyShadow,
|
|
34
|
-
stickyBackgroundColor,
|
|
35
|
-
cellBottomLeftBorderRadius,
|
|
36
|
-
cellBottomRightBorderRadius,
|
|
37
|
-
cellTopLeftBorderRadius,
|
|
38
|
-
cellTopRightBorderRadius,
|
|
39
|
-
type
|
|
22
|
+
$isSticky,
|
|
23
|
+
$align,
|
|
24
|
+
$cellPaddingTop,
|
|
25
|
+
$cellPaddingRight,
|
|
26
|
+
$cellPaddingBottom,
|
|
27
|
+
$cellPaddingLeft,
|
|
28
|
+
$cellBorderWidth,
|
|
29
|
+
$cellBorderColor,
|
|
30
|
+
$cellBorderTopWidth,
|
|
31
|
+
$cellMinWidth,
|
|
32
|
+
$cellBackground,
|
|
33
|
+
$cellStickyShadow,
|
|
34
|
+
$stickyBackgroundColor,
|
|
35
|
+
$cellBottomLeftBorderRadius,
|
|
36
|
+
$cellBottomRightBorderRadius,
|
|
37
|
+
$cellTopLeftBorderRadius,
|
|
38
|
+
$cellTopRightBorderRadius,
|
|
39
|
+
$type
|
|
40
40
|
} = _ref2;
|
|
41
|
-
return css(["text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;background-color:", ";", ";border-style:", ";border-color:", ";border-width:", "px;border-top-width:", "px;border-bottom-left-radius:", "px;border-bottom-right-radius:", "px;border-top-left-radius:", "px;border-top-right-radius:", "px;"], align, cellMinWidth, cellPaddingTop, cellPaddingRight, cellPaddingBottom, cellPaddingLeft, cellBackground, isSticky && stickyStyles({
|
|
42
|
-
type,
|
|
43
|
-
cellStickyShadow,
|
|
44
|
-
stickyBackgroundColor
|
|
45
|
-
}), cellBorderWidth || cellBorderTopWidth ? 'solid' : 'none', cellBorderColor, cellBorderWidth, cellBorderTopWidth || cellBorderWidth, cellBottomLeftBorderRadius, cellBottomRightBorderRadius, cellTopLeftBorderRadius, cellTopRightBorderRadius);
|
|
41
|
+
return css(["text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;background-color:", ";", ";border-style:", ";border-color:", ";border-width:", "px;border-top-width:", "px;border-bottom-left-radius:", "px;border-bottom-right-radius:", "px;border-top-left-radius:", "px;border-top-right-radius:", "px;"], $align, $cellMinWidth, $cellPaddingTop, $cellPaddingRight, $cellPaddingBottom, $cellPaddingLeft, $cellBackground, $isSticky && stickyStyles({
|
|
42
|
+
type: $type,
|
|
43
|
+
cellStickyShadow: $cellStickyShadow,
|
|
44
|
+
stickyBackgroundColor: $stickyBackgroundColor
|
|
45
|
+
}), $cellBorderWidth || $cellBorderTopWidth ? 'solid' : 'none', $cellBorderColor, $cellBorderWidth, $cellBorderTopWidth || $cellBorderWidth, $cellBottomLeftBorderRadius, $cellBottomRightBorderRadius, $cellTopLeftBorderRadius, $cellTopRightBorderRadius);
|
|
46
46
|
});
|
|
47
47
|
const createStyledCell = htmlElement => styled[htmlElement].withConfig({
|
|
48
|
-
displayName: "
|
|
49
|
-
componentId: "components-web__sc-
|
|
48
|
+
displayName: "TableCell__createStyledCell",
|
|
49
|
+
componentId: "components-web__sc-c4xf99-0"
|
|
50
50
|
})(["", ";box-shadow:", ";", ""], sharedStyles, _ref3 => {
|
|
51
51
|
let {
|
|
52
|
-
cellBoxShadowColor,
|
|
53
|
-
type
|
|
52
|
+
$cellBoxShadowColor,
|
|
53
|
+
$type
|
|
54
54
|
} = _ref3;
|
|
55
|
-
return type === HEADER_TYPE.HEADING ? `inset 0 1px 0 ${cellBoxShadowColor}, inset 0 -1px 0 ${cellBoxShadowColor}` : `inset 0 1px 0 ${cellBoxShadowColor}`;
|
|
55
|
+
return $type === HEADER_TYPE.HEADING ? `inset 0 1px 0 ${$cellBoxShadowColor}, inset 0 -1px 0 ${$cellBoxShadowColor}` : `inset 0 1px 0 ${$cellBoxShadowColor}`;
|
|
56
56
|
}, _ref4 => {
|
|
57
57
|
let {
|
|
58
|
-
display
|
|
58
|
+
$display
|
|
59
59
|
} = _ref4;
|
|
60
|
-
return display && `*:not(:empty) {
|
|
61
|
-
display: ${display};
|
|
60
|
+
return $display && `*:not(:empty) {
|
|
61
|
+
display: ${$display};
|
|
62
62
|
}`;
|
|
63
63
|
});
|
|
64
64
|
const StyledHeaderCell = createStyledCell('th');
|
|
65
65
|
const StyledDataCell = createStyledCell('td');
|
|
66
|
-
const
|
|
66
|
+
export const TableCell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
67
67
|
let {
|
|
68
68
|
children,
|
|
69
69
|
isFirstInRow,
|
|
@@ -112,25 +112,25 @@ const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
112
112
|
...variant
|
|
113
113
|
});
|
|
114
114
|
const sharedProps = {
|
|
115
|
-
align,
|
|
116
|
-
isSticky: isTableScrollable && isFirstInRow,
|
|
117
|
-
cellBackground,
|
|
118
|
-
cellMinWidth,
|
|
119
|
-
cellStickyShadow: applyShadowToken(cellStickyShadow).boxShadow,
|
|
120
|
-
cellPaddingTop,
|
|
121
|
-
cellPaddingRight,
|
|
122
|
-
cellPaddingLeft,
|
|
123
|
-
cellPaddingBottom,
|
|
124
|
-
cellBorderWidth,
|
|
125
|
-
cellBorderColor,
|
|
126
|
-
cellBorderTopWidth,
|
|
127
|
-
cellTopLeftBorderRadius,
|
|
128
|
-
cellTopRightBorderRadius,
|
|
129
|
-
cellBottomLeftBorderRadius,
|
|
130
|
-
cellBottomRightBorderRadius,
|
|
131
|
-
stickyBackgroundColor,
|
|
132
|
-
cellBoxShadowColor,
|
|
133
|
-
display,
|
|
115
|
+
$align: align,
|
|
116
|
+
$isSticky: isTableScrollable && isFirstInRow,
|
|
117
|
+
$cellBackground: cellBackground,
|
|
118
|
+
$cellMinWidth: cellMinWidth,
|
|
119
|
+
$cellStickyShadow: applyShadowToken(cellStickyShadow).boxShadow,
|
|
120
|
+
$cellPaddingTop: cellPaddingTop,
|
|
121
|
+
$cellPaddingRight: cellPaddingRight,
|
|
122
|
+
$cellPaddingLeft: cellPaddingLeft,
|
|
123
|
+
$cellPaddingBottom: cellPaddingBottom,
|
|
124
|
+
$cellBorderWidth: cellBorderWidth,
|
|
125
|
+
$cellBorderColor: cellBorderColor,
|
|
126
|
+
$cellBorderTopWidth: cellBorderTopWidth,
|
|
127
|
+
$cellTopLeftBorderRadius: cellTopLeftBorderRadius,
|
|
128
|
+
$cellTopRightBorderRadius: cellTopRightBorderRadius,
|
|
129
|
+
$cellBottomLeftBorderRadius: cellBottomLeftBorderRadius,
|
|
130
|
+
$cellBottomRightBorderRadius: cellBottomRightBorderRadius,
|
|
131
|
+
$stickyBackgroundColor: stickyBackgroundColor,
|
|
132
|
+
$cellBoxShadowColor: cellBoxShadowColor,
|
|
133
|
+
$display: display,
|
|
134
134
|
ref
|
|
135
135
|
};
|
|
136
136
|
const typographyTokens = {
|
|
@@ -145,7 +145,7 @@ const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
145
145
|
return /*#__PURE__*/_jsx(StyledHeaderCell, {
|
|
146
146
|
scope: "col",
|
|
147
147
|
...sharedProps,
|
|
148
|
-
type: type,
|
|
148
|
+
$type: type,
|
|
149
149
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
150
150
|
tokens: typographyTokens,
|
|
151
151
|
children: children
|
|
@@ -155,7 +155,7 @@ const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
155
155
|
return /*#__PURE__*/_jsx(StyledHeaderCell, {
|
|
156
156
|
scope: "col",
|
|
157
157
|
...sharedProps,
|
|
158
|
-
type: type,
|
|
158
|
+
$type: type,
|
|
159
159
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
160
160
|
tokens: typographyTokens,
|
|
161
161
|
children: children
|
|
@@ -165,7 +165,7 @@ const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
165
165
|
return /*#__PURE__*/_jsx(StyledHeaderCell, {
|
|
166
166
|
scope: "row",
|
|
167
167
|
...sharedProps,
|
|
168
|
-
type: type,
|
|
168
|
+
$type: type,
|
|
169
169
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
170
170
|
tokens: typographyTokens,
|
|
171
171
|
children: children
|
|
@@ -181,8 +181,8 @@ const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
TableCell.displayName = 'TableCell';
|
|
185
|
+
TableCell.propTypes = {
|
|
186
186
|
type: PropTypes.oneOf(['default', 'heading', 'subHeading', 'rowHeading']),
|
|
187
187
|
tokens: PropTypes.object,
|
|
188
188
|
children: PropTypes.node,
|
|
@@ -195,5 +195,4 @@ Cell.propTypes = {
|
|
|
195
195
|
* Defines the text alignment within the cell
|
|
196
196
|
*/
|
|
197
197
|
align: PropTypes.oneOf(['left', 'center', 'right'])
|
|
198
|
-
};
|
|
199
|
-
export default Cell;
|
|
198
|
+
};
|