@telus-uds/components-web 2.44.0 → 3.0.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 +26 -0
- package/CHANGELOG.md +13 -2
- package/babel.config.cjs +4 -0
- package/jest.config.cjs +29 -0
- package/lib/Badge/Badge.js +21 -29
- package/lib/Badge/index.js +2 -10
- package/lib/BlockQuote/BlockQuote.js +31 -39
- package/lib/BlockQuote/index.js +2 -10
- package/lib/Breadcrumbs/Breadcrumbs.js +39 -49
- package/lib/Breadcrumbs/Item/Item.js +26 -34
- package/lib/Breadcrumbs/index.js +1 -13
- package/lib/Callout/Callout.js +19 -27
- package/lib/Callout/index.js +2 -10
- package/lib/Card/Card.js +44 -54
- package/lib/Card/CardContent.js +17 -25
- package/lib/Card/CardFooter.js +16 -24
- package/lib/Card/index.js +2 -10
- package/lib/Countdown/Countdown.js +34 -42
- package/lib/Countdown/Segment.js +26 -34
- package/lib/Countdown/constants.js +4 -14
- package/lib/Countdown/dictionary.js +2 -9
- package/lib/Countdown/index.js +2 -10
- package/lib/Countdown/types.js +18 -28
- package/lib/Countdown/useCountdown.js +4 -11
- package/lib/DatePicker/CalendarContainer.js +6 -12
- package/lib/DatePicker/DatePicker.js +94 -103
- package/lib/DatePicker/dictionary.js +1 -8
- package/lib/DatePicker/index.js +2 -10
- package/lib/DatePicker/reactDatesCss.js +3 -10
- package/lib/Disclaimer/Disclaimer.js +15 -23
- package/lib/Disclaimer/index.js +1 -13
- package/lib/ExpandCollapseMini/ExpandCollapseMini.js +16 -24
- package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +17 -26
- package/lib/ExpandCollapseMini/index.js +2 -10
- package/lib/Footnote/Footnote.js +85 -95
- package/lib/Footnote/FootnoteLink.js +25 -33
- package/lib/Footnote/dictionary.js +2 -9
- package/lib/Footnote/index.js +4 -12
- package/lib/IconButton/IconButton.js +12 -20
- package/lib/IconButton/index.js +2 -10
- package/lib/Image/Image.js +17 -25
- package/lib/Image/index.js +6 -18
- package/lib/Image/server.js +4 -12
- package/lib/List/List.js +2 -9
- package/lib/List/ListItem.js +10 -18
- package/lib/List/index.js +4 -12
- package/lib/NavigationBar/NavigationBar.js +51 -59
- package/lib/NavigationBar/NavigationItem.js +19 -27
- package/lib/NavigationBar/NavigationSubMenu.js +34 -40
- package/lib/NavigationBar/collapseItems.js +1 -11
- package/lib/NavigationBar/index.js +4 -12
- package/lib/NavigationBar/resolveItemSelection.js +1 -8
- package/lib/OptimizeImage/OptimizeImage.js +26 -34
- package/lib/OptimizeImage/index.js +2 -10
- package/lib/OptimizeImage/utils/getFallbackUrl.js +3 -10
- package/lib/OptimizeImage/utils/getImageUrls.js +9 -16
- package/lib/OptimizeImage/utils/getOptimizedUrl.js +3 -10
- package/lib/OptimizeImage/utils/hasWebpSupport.js +1 -7
- package/lib/OptimizeImage/utils/index.js +5 -34
- package/lib/OptimizeImage/utils/isSvgUrl.js +1 -7
- package/lib/OrderedList/Item.js +28 -36
- package/lib/OrderedList/ItemBase.js +8 -16
- package/lib/OrderedList/OrderedList.js +22 -30
- package/lib/OrderedList/OrderedListBase.js +12 -20
- package/lib/OrderedList/constants.js +1 -8
- package/lib/OrderedList/index.js +4 -12
- package/lib/Paragraph/Paragraph.js +22 -30
- package/lib/Paragraph/index.js +2 -10
- package/lib/PreviewCard/AuthorDate.js +17 -21
- package/lib/PreviewCard/PreviewCard.js +40 -49
- package/lib/PreviewCard/index.js +2 -10
- package/lib/PriceLockup/PriceLockup.js +56 -64
- package/lib/PriceLockup/index.js +2 -10
- package/lib/PriceLockup/tokens.js +2 -9
- package/lib/Progress/ProgressBar.js +17 -24
- package/lib/Progress/index.js +4 -12
- package/lib/QuantitySelector/QuantitySelector.js +55 -63
- package/lib/QuantitySelector/SideButton.js +15 -23
- package/lib/QuantitySelector/dictionary.js +2 -9
- package/lib/QuantitySelector/index.js +2 -10
- package/lib/QuantitySelector/styles.js +4 -13
- package/lib/ResponsiveImage/ResponsiveImage.js +29 -37
- package/lib/ResponsiveImage/index.js +2 -10
- package/lib/Ribbon/Ribbon.js +22 -30
- package/lib/Ribbon/index.js +2 -10
- package/lib/SkeletonProvider/SkeletonImage.js +14 -22
- package/lib/SkeletonProvider/SkeletonProvider.js +17 -25
- package/lib/SkeletonProvider/SkeletonTypography.js +14 -22
- package/lib/SkeletonProvider/index.js +2 -10
- package/lib/Span/Span.js +23 -31
- package/lib/Span/index.js +2 -10
- package/lib/Spinner/Spinner.js +43 -51
- package/lib/Spinner/SpinnerContent.js +21 -29
- package/lib/Spinner/constants.js +4 -14
- package/lib/Spinner/index.js +2 -10
- package/lib/StoryCard/StoryCard.js +40 -49
- package/lib/StoryCard/index.js +2 -10
- package/lib/Table/Body.js +7 -15
- package/lib/Table/Cell.js +28 -38
- package/lib/Table/Header.js +11 -19
- package/lib/Table/Row.js +8 -16
- package/lib/Table/SubHeading.js +10 -18
- package/lib/Table/Table.js +26 -35
- package/lib/Table/index.js +12 -20
- package/lib/TermsAndConditions/ExpandCollapse.js +22 -30
- package/lib/TermsAndConditions/TermsAndConditions.js +52 -60
- package/lib/TermsAndConditions/dictionary.js +2 -9
- package/lib/TermsAndConditions/index.js +1 -13
- package/lib/Testimonial/Testimonial.js +37 -45
- package/lib/Testimonial/index.js +2 -10
- package/lib/Toast/Toast.js +32 -42
- package/lib/Toast/index.js +2 -10
- package/lib/Video/ControlBar/ControlBar.js +73 -81
- package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +16 -24
- package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +27 -35
- package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +27 -36
- package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +30 -38
- package/lib/Video/MiddleControlButton/MiddleControlButton.js +16 -24
- package/lib/Video/Video.js +74 -83
- package/lib/Video/index.js +2 -10
- package/lib/Video/videoText.js +1 -8
- package/lib/VideoPicker/VideoPicker.js +43 -53
- package/lib/VideoPicker/VideoPickerPlayer.js +17 -25
- package/lib/VideoPicker/VideoPickerThumbnail.js +38 -46
- package/lib/VideoPicker/VideoSlider.js +17 -26
- package/lib/VideoPicker/index.js +2 -10
- package/lib/VideoPicker/videoPropType.js +9 -18
- package/lib/WaffleGrid/WaffleGrid.js +33 -43
- package/lib/WaffleGrid/index.js +2 -10
- package/lib/WebVideo/WebVideo.js +42 -52
- package/lib/WebVideo/index.js +2 -10
- package/lib/WebVideo/utils/index.js +3 -11
- package/lib/baseExports.js +18 -431
- package/lib/index.js +38 -323
- package/lib/server.js +4 -12
- package/lib/shared/ConditionalWrapper/ConditionalWrapper.js +9 -17
- package/lib/shared/ConditionalWrapper/index.js +2 -10
- package/lib/shared/FullBleedContent/FullBleedContent.js +21 -29
- package/lib/shared/FullBleedContent/getFullBleedBorderRadius.js +1 -8
- package/lib/shared/FullBleedContent/index.js +4 -24
- package/lib/shared/FullBleedContent/useFullBleedContentProps.js +4 -11
- package/lib/shared/VideoSplash/SplashButton/SplashButton.js +19 -27
- package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +27 -35
- package/lib/shared/VideoSplash/VideoSplash.js +24 -32
- package/lib/shared/VideoSplash/helpers.js +5 -14
- package/lib/utils/index.js +10 -75
- package/lib/utils/isElementFocusable.js +1 -8
- package/lib/utils/logger.js +6 -15
- package/lib/utils/media.js +5 -11
- package/lib/utils/renderStructuredContent.js +8 -15
- package/lib/utils/ssr.js +5 -12
- package/lib/utils/theming/get-theme-from-server.js +2 -10
- package/lib/utils/theming/with-client-theme.js +9 -17
- package/lib/utils/theming/with-server-theme.js +11 -19
- package/lib/utils/transforms.js +3 -11
- package/lib/utils/useOverlaidPosition.js +15 -23
- package/lib/utils/useTypographyTheme.js +6 -13
- package/package.json +18 -20
- package/src/Card/Card.jsx +2 -2
- package/src/DatePicker/DatePicker.jsx +1 -2
- package/src/PreviewCard/AuthorDate.jsx +5 -3
- package/src/utils/logger.js +2 -2
- package/lib-module/Badge/Badge.js +0 -121
- package/lib-module/Badge/index.js +0 -2
- package/lib-module/BlockQuote/BlockQuote.js +0 -204
- package/lib-module/BlockQuote/index.js +0 -2
- package/lib-module/Breadcrumbs/Breadcrumbs.js +0 -250
- package/lib-module/Breadcrumbs/Item/Item.js +0 -175
- package/lib-module/Breadcrumbs/index.js +0 -1
- package/lib-module/Callout/Callout.js +0 -135
- package/lib-module/Callout/index.js +0 -2
- package/lib-module/Card/Card.js +0 -251
- package/lib-module/Card/CardContent.js +0 -90
- package/lib-module/Card/CardFooter.js +0 -78
- package/lib-module/Card/index.js +0 -2
- package/lib-module/Countdown/Countdown.js +0 -169
- package/lib-module/Countdown/Segment.js +0 -96
- package/lib-module/Countdown/constants.js +0 -4
- package/lib-module/Countdown/dictionary.js +0 -22
- package/lib-module/Countdown/index.js +0 -2
- package/lib-module/Countdown/types.js +0 -24
- package/lib-module/Countdown/useCountdown.js +0 -26
- package/lib-module/DatePicker/CalendarContainer.js +0 -208
- package/lib-module/DatePicker/DatePicker.js +0 -519
- package/lib-module/DatePicker/dictionary.js +0 -119
- package/lib-module/DatePicker/index.js +0 -2
- package/lib-module/DatePicker/reactDatesCss.js +0 -3
- package/lib-module/Disclaimer/Disclaimer.js +0 -54
- package/lib-module/Disclaimer/index.js +0 -1
- package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +0 -73
- package/lib-module/ExpandCollapseMini/ExpandCollapseMiniControl.js +0 -117
- package/lib-module/ExpandCollapseMini/index.js +0 -2
- package/lib-module/Footnote/Footnote.js +0 -632
- package/lib-module/Footnote/FootnoteLink.js +0 -118
- package/lib-module/Footnote/dictionary.js +0 -12
- package/lib-module/Footnote/index.js +0 -4
- package/lib-module/IconButton/IconButton.js +0 -55
- package/lib-module/IconButton/index.js +0 -2
- package/lib-module/Image/Image.js +0 -83
- package/lib-module/Image/index.js +0 -9
- package/lib-module/Image/server.js +0 -4
- package/lib-module/List/List.js +0 -2
- package/lib-module/List/ListItem.js +0 -28
- package/lib-module/List/index.js +0 -4
- package/lib-module/NavigationBar/NavigationBar.js +0 -224
- package/lib-module/NavigationBar/NavigationItem.js +0 -87
- package/lib-module/NavigationBar/NavigationSubMenu.js +0 -162
- package/lib-module/NavigationBar/collapseItems.js +0 -41
- package/lib-module/NavigationBar/index.js +0 -4
- package/lib-module/NavigationBar/resolveItemSelection.js +0 -16
- package/lib-module/OptimizeImage/OptimizeImage.js +0 -92
- package/lib-module/OptimizeImage/index.js +0 -2
- package/lib-module/OptimizeImage/utils/getFallbackUrl.js +0 -7
- package/lib-module/OptimizeImage/utils/getImageUrls.js +0 -12
- package/lib-module/OptimizeImage/utils/getOptimizedUrl.js +0 -17
- package/lib-module/OptimizeImage/utils/hasWebpSupport.js +0 -28
- package/lib-module/OptimizeImage/utils/index.js +0 -5
- package/lib-module/OptimizeImage/utils/isSvgUrl.js +0 -3
- package/lib-module/OrderedList/Item.js +0 -145
- package/lib-module/OrderedList/ItemBase.js +0 -27
- package/lib-module/OrderedList/OrderedList.js +0 -86
- package/lib-module/OrderedList/OrderedListBase.js +0 -45
- package/lib-module/OrderedList/constants.js +0 -2
- package/lib-module/OrderedList/index.js +0 -4
- package/lib-module/Paragraph/Paragraph.js +0 -90
- package/lib-module/Paragraph/index.js +0 -2
- package/lib-module/PreviewCard/AuthorDate.js +0 -57
- package/lib-module/PreviewCard/PreviewCard.js +0 -209
- package/lib-module/PreviewCard/index.js +0 -2
- package/lib-module/PriceLockup/PriceLockup.js +0 -335
- package/lib-module/PriceLockup/index.js +0 -2
- package/lib-module/PriceLockup/tokens.js +0 -55
- package/lib-module/Progress/ProgressBar.js +0 -83
- package/lib-module/Progress/index.js +0 -4
- package/lib-module/QuantitySelector/QuantitySelector.js +0 -261
- package/lib-module/QuantitySelector/SideButton.js +0 -70
- package/lib-module/QuantitySelector/dictionary.js +0 -26
- package/lib-module/QuantitySelector/index.js +0 -2
- package/lib-module/QuantitySelector/styles.js +0 -9
- package/lib-module/ResponsiveImage/ResponsiveImage.js +0 -95
- package/lib-module/ResponsiveImage/index.js +0 -2
- package/lib-module/Ribbon/Ribbon.js +0 -216
- package/lib-module/Ribbon/index.js +0 -2
- package/lib-module/SkeletonProvider/SkeletonImage.js +0 -39
- package/lib-module/SkeletonProvider/SkeletonProvider.js +0 -57
- package/lib-module/SkeletonProvider/SkeletonTypography.js +0 -38
- package/lib-module/SkeletonProvider/index.js +0 -2
- package/lib-module/Span/Span.js +0 -72
- package/lib-module/Span/index.js +0 -2
- package/lib-module/Spinner/Spinner.js +0 -215
- package/lib-module/Spinner/SpinnerContent.js +0 -94
- package/lib-module/Spinner/constants.js +0 -4
- package/lib-module/Spinner/index.js +0 -2
- package/lib-module/StoryCard/StoryCard.js +0 -212
- package/lib-module/StoryCard/index.js +0 -2
- package/lib-module/Table/Body.js +0 -17
- package/lib-module/Table/Cell.js +0 -176
- package/lib-module/Table/Header.js +0 -25
- package/lib-module/Table/Row.js +0 -19
- package/lib-module/Table/SubHeading.js +0 -23
- package/lib-module/Table/Table.js +0 -114
- package/lib-module/Table/index.js +0 -12
- package/lib-module/TermsAndConditions/ExpandCollapse.js +0 -153
- package/lib-module/TermsAndConditions/TermsAndConditions.js +0 -277
- package/lib-module/TermsAndConditions/dictionary.js +0 -16
- package/lib-module/TermsAndConditions/index.js +0 -1
- package/lib-module/Testimonial/Testimonial.js +0 -234
- package/lib-module/Testimonial/index.js +0 -2
- package/lib-module/Toast/Toast.js +0 -158
- package/lib-module/Toast/index.js +0 -2
- package/lib-module/Video/ControlBar/ControlBar.js +0 -288
- package/lib-module/Video/ControlBar/Controls/VideoButton/VideoButton.js +0 -70
- package/lib-module/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +0 -163
- package/lib-module/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +0 -203
- package/lib-module/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +0 -191
- package/lib-module/Video/MiddleControlButton/MiddleControlButton.js +0 -71
- package/lib-module/Video/Video.js +0 -959
- package/lib-module/Video/index.js +0 -2
- package/lib-module/Video/videoText.js +0 -55
- package/lib-module/VideoPicker/VideoPicker.js +0 -190
- package/lib-module/VideoPicker/VideoPickerPlayer.js +0 -48
- package/lib-module/VideoPicker/VideoPickerThumbnail.js +0 -218
- package/lib-module/VideoPicker/VideoSlider.js +0 -82
- package/lib-module/VideoPicker/index.js +0 -2
- package/lib-module/VideoPicker/videoPropType.js +0 -10
- package/lib-module/WaffleGrid/WaffleGrid.js +0 -157
- package/lib-module/WaffleGrid/index.js +0 -2
- package/lib-module/WebVideo/WebVideo.js +0 -191
- package/lib-module/WebVideo/index.js +0 -2
- package/lib-module/WebVideo/utils/index.js +0 -50
- package/lib-module/baseExports.js +0 -19
- package/lib-module/index.js +0 -40
- package/lib-module/server.js +0 -5
- package/lib-module/shared/ConditionalWrapper/ConditionalWrapper.js +0 -22
- package/lib-module/shared/ConditionalWrapper/index.js +0 -2
- package/lib-module/shared/FullBleedContent/FullBleedContent.js +0 -101
- package/lib-module/shared/FullBleedContent/getFullBleedBorderRadius.js +0 -55
- package/lib-module/shared/FullBleedContent/index.js +0 -4
- package/lib-module/shared/FullBleedContent/useFullBleedContentProps.js +0 -55
- package/lib-module/shared/VideoSplash/SplashButton/SplashButton.js +0 -84
- package/lib-module/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +0 -223
- package/lib-module/shared/VideoSplash/VideoSplash.js +0 -65
- package/lib-module/shared/VideoSplash/helpers.js +0 -23
- package/lib-module/utils/index.js +0 -10
- package/lib-module/utils/isElementFocusable.js +0 -8
- package/lib-module/utils/logger.js +0 -18
- package/lib-module/utils/media.js +0 -39
- package/lib-module/utils/renderStructuredContent.js +0 -66
- package/lib-module/utils/ssr.js +0 -37
- package/lib-module/utils/theming/get-theme-from-server.js +0 -16
- package/lib-module/utils/theming/with-client-theme.js +0 -24
- package/lib-module/utils/theming/with-server-theme.js +0 -26
- package/lib-module/utils/transforms.js +0 -4
- package/lib-module/utils/useOverlaidPosition.js +0 -216
- package/lib-module/utils/useTypographyTheme.js +0 -24
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const path = require('path')
|
|
2
|
+
const base = require('../../eslintrc.base.cjs')
|
|
3
|
+
|
|
4
|
+
base.rules['import/no-extraneous-dependencies'] = [
|
|
5
|
+
'error',
|
|
6
|
+
{ packageDir: [__dirname, path.join(__dirname, '../..')] }
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
base.settings = {
|
|
10
|
+
...base.settings,
|
|
11
|
+
'import/resolver': {
|
|
12
|
+
node: {
|
|
13
|
+
...base.settings?.['import/resolver']?.node,
|
|
14
|
+
moduleDirectory: [
|
|
15
|
+
path.join(__dirname, 'node_modules'),
|
|
16
|
+
path.join(__dirname, '../../node_modules')
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
exports: true,
|
|
20
|
+
alias: {
|
|
21
|
+
map: [['@telus-uds/components-base/server', '../components-base/lib/server.js']]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
module.exports = base
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Fri, 22 Nov 2024 23:40:07 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 3.0.0
|
|
8
|
+
|
|
9
|
+
Fri, 22 Nov 2024 23:40:07 GMT
|
|
10
|
+
|
|
11
|
+
### Major changes
|
|
12
|
+
|
|
13
|
+
- Upgrade `react-native` and many other dependencies and refactor to ESM-only builds (shahzaibkhalidmalik@outlook.com)
|
|
14
|
+
- Bump @telus-uds/components-base to v1.97.1
|
|
15
|
+
- Bump @telus-uds/system-constants to v2.0.0
|
|
16
|
+
- Bump @telus-uds/system-theme-tokens to v3.0.0
|
|
17
|
+
|
|
7
18
|
## 2.44.0
|
|
8
19
|
|
|
9
|
-
Wed, 13 Nov 2024 17:
|
|
20
|
+
Wed, 13 Nov 2024 17:23:43 GMT
|
|
10
21
|
|
|
11
22
|
### Minor changes
|
|
12
23
|
|
package/babel.config.cjs
ADDED
package/jest.config.cjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const name = require('./package.json').name.split('@telus-uds/').pop()
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
displayName: {
|
|
5
|
+
name,
|
|
6
|
+
color: 'magenta'
|
|
7
|
+
},
|
|
8
|
+
testEnvironment: 'jsdom',
|
|
9
|
+
// __dirname here tells babel to look in ds-allium/ for babel root when running from monorepo root
|
|
10
|
+
transform: { '\\.(js|jsx)$': ['babel-jest', { cwd: __dirname }] },
|
|
11
|
+
moduleNameMapper: {
|
|
12
|
+
'.+\\.(otf|png|jpg)$': 'identity-obj-proxy',
|
|
13
|
+
// mock icon imports as in https://jestjs.io/docs/webpack#mocking-css-modules
|
|
14
|
+
'\\.icon.svg': '<rootDir>/__mocks__/iconMock.jsx',
|
|
15
|
+
'\\.css': '<rootDir>/__mocks__/styleMock.js',
|
|
16
|
+
'^@telus-uds/components-base/server$': '<rootDir>/../components-base/lib/server.js'
|
|
17
|
+
},
|
|
18
|
+
testMatch: [`<rootDir>/__tests__/**/*.test.js?(x)`],
|
|
19
|
+
transformIgnorePatterns: [
|
|
20
|
+
'node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|react-native-web|@react-native-picker)'
|
|
21
|
+
],
|
|
22
|
+
setupFilesAfterEnv: [
|
|
23
|
+
'./jest-setup.js',
|
|
24
|
+
// Fail tests that use console.error or console.warn
|
|
25
|
+
'<rootDir>/../../jest-no-console.cjs'
|
|
26
|
+
],
|
|
27
|
+
// Count everything in src when calculating coverage
|
|
28
|
+
collectCoverageFrom: ['src/**/*.{js,jsx}']
|
|
29
|
+
}
|
package/lib/Badge/Badge.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _componentsBase = require("@telus-uds/components-base");
|
|
11
|
-
var _utils = require("../utils");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
15
|
-
const BadgeContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { selectSystemProps, Typography, getTokensPropType, useThemeTokens } from '@telus-uds/components-base';
|
|
5
|
+
import { htmlAttrs, transformGradient } from '../utils';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
8
|
+
const BadgeContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16
9
|
displayName: "Badge__BadgeContainer",
|
|
17
10
|
componentId: "components-web__sc-tsiuo2-0"
|
|
18
11
|
})(["background:", ";border:", ";display:inline-flex;justify-content:center;padding:", ";border-radius:", ";width:fit-content;", ""], _ref => {
|
|
@@ -53,7 +46,7 @@ const fontSizeMapping = {
|
|
|
53
46
|
14: 'small',
|
|
54
47
|
16: 'h6'
|
|
55
48
|
};
|
|
56
|
-
const Badge = /*#__PURE__*/
|
|
49
|
+
const Badge = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
57
50
|
let {
|
|
58
51
|
children,
|
|
59
52
|
tokens,
|
|
@@ -74,8 +67,8 @@ const Badge = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
|
|
|
74
67
|
fontName,
|
|
75
68
|
fontWeight,
|
|
76
69
|
fontSize
|
|
77
|
-
} =
|
|
78
|
-
const semanticGradient = gradient &&
|
|
70
|
+
} = useThemeTokens('Badge', tokens, variant);
|
|
71
|
+
const semanticGradient = gradient && transformGradient(gradient);
|
|
79
72
|
const {
|
|
80
73
|
outline,
|
|
81
74
|
purpose,
|
|
@@ -88,7 +81,7 @@ const Badge = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
|
|
|
88
81
|
} else if (purpose === 'offer' && gradient) {
|
|
89
82
|
background = semanticGradient;
|
|
90
83
|
}
|
|
91
|
-
return /*#__PURE__*/(
|
|
84
|
+
return /*#__PURE__*/_jsx(BadgeContainer, {
|
|
92
85
|
isOutlineOffer: isOutlineOffer,
|
|
93
86
|
isAlternative: alternative,
|
|
94
87
|
padding: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
|
|
@@ -100,7 +93,7 @@ const Badge = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
|
|
|
100
93
|
border: `${borderWidth}px solid ${borderColor}`,
|
|
101
94
|
ref: ref,
|
|
102
95
|
...selectProps(rest),
|
|
103
|
-
children: /*#__PURE__*/(
|
|
96
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
104
97
|
tokens: {
|
|
105
98
|
fontName,
|
|
106
99
|
fontWeight,
|
|
@@ -116,14 +109,13 @@ const Badge = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
|
|
|
116
109
|
Badge.displayName = 'Badge';
|
|
117
110
|
Badge.propTypes = {
|
|
118
111
|
...selectedSystemPropTypes,
|
|
119
|
-
children:
|
|
120
|
-
tokens:
|
|
121
|
-
variant:
|
|
122
|
-
outline:
|
|
123
|
-
purpose:
|
|
124
|
-
alternative:
|
|
125
|
-
inverse:
|
|
112
|
+
children: PropTypes.node,
|
|
113
|
+
tokens: getTokensPropType('Badge'),
|
|
114
|
+
variant: PropTypes.exact({
|
|
115
|
+
outline: PropTypes.bool,
|
|
116
|
+
purpose: PropTypes.oneOf(['offer', 'editorial']),
|
|
117
|
+
alternative: PropTypes.bool,
|
|
118
|
+
inverse: PropTypes.bool
|
|
126
119
|
})
|
|
127
120
|
};
|
|
128
|
-
|
|
129
|
-
exports.default = _default;
|
|
121
|
+
export default Badge;
|
package/lib/Badge/index.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _Badge = _interopRequireDefault(require("./Badge"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var _default = _Badge.default;
|
|
10
|
-
exports.default = _default;
|
|
1
|
+
import Badge from './Badge';
|
|
2
|
+
export default Badge;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _componentsBase = require("@telus-uds/components-base");
|
|
10
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
var _utils = require("../utils");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
15
|
-
const BlockQuoteContainer = /*#__PURE__*/_styledComponents.default.blockquote.withConfig({
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Link, selectSystemProps, StackView, Typography, useThemeTokens, withLinkRouter, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { htmlAttrs, transformGradient } from '../utils';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
8
|
+
const BlockQuoteContainer = /*#__PURE__*/styled.blockquote.withConfig({
|
|
16
9
|
displayName: "BlockQuote__BlockQuoteContainer",
|
|
17
10
|
componentId: "components-web__sc-vals3u-0"
|
|
18
11
|
})(["margin:0;position:relative;padding-left:", ";padding-right:", ";padding-bottom:", ";padding-top:", ";&::before{content:'';left:0;top:0;position:absolute;height:100%;width:", ";background:", ";}"], _ref => {
|
|
@@ -44,9 +37,9 @@ const BlockQuoteContainer = /*#__PURE__*/_styledComponents.default.blockquote.wi
|
|
|
44
37
|
let {
|
|
45
38
|
backgroundGradient
|
|
46
39
|
} = _ref6;
|
|
47
|
-
return backgroundGradient &&
|
|
40
|
+
return backgroundGradient && transformGradient(backgroundGradient);
|
|
48
41
|
});
|
|
49
|
-
const QuoteContainer = /*#__PURE__*/
|
|
42
|
+
const QuoteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
50
43
|
displayName: "BlockQuote__QuoteContainer",
|
|
51
44
|
componentId: "components-web__sc-vals3u-1"
|
|
52
45
|
})(["margin-bottom:", ";"], _ref7 => {
|
|
@@ -55,7 +48,7 @@ const QuoteContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
55
48
|
} = _ref7;
|
|
56
49
|
return `${marginBottom}px`;
|
|
57
50
|
});
|
|
58
|
-
const BlockQuote = /*#__PURE__*/
|
|
51
|
+
const BlockQuote = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
59
52
|
let {
|
|
60
53
|
children,
|
|
61
54
|
link,
|
|
@@ -68,7 +61,7 @@ const BlockQuote = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
|
68
61
|
variant,
|
|
69
62
|
...rest
|
|
70
63
|
} = _ref8;
|
|
71
|
-
const viewport =
|
|
64
|
+
const viewport = useViewport();
|
|
72
65
|
const {
|
|
73
66
|
color,
|
|
74
67
|
paddingTop,
|
|
@@ -90,7 +83,7 @@ const BlockQuote = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
|
90
83
|
linkFontName,
|
|
91
84
|
linkFontWeight,
|
|
92
85
|
linkLineHeight
|
|
93
|
-
} =
|
|
86
|
+
} = useThemeTokens('BlockQuote', tokens, variant, {
|
|
94
87
|
viewport
|
|
95
88
|
});
|
|
96
89
|
const mappedTextSize = textStyle === 'heading' ? 'h3' : textStyle;
|
|
@@ -107,7 +100,7 @@ const BlockQuote = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
|
107
100
|
};
|
|
108
101
|
const renderLink = () => {
|
|
109
102
|
if (linkHref) {
|
|
110
|
-
return /*#__PURE__*/(
|
|
103
|
+
return /*#__PURE__*/_jsx(Link, {
|
|
111
104
|
href: linkHref,
|
|
112
105
|
tokens: {
|
|
113
106
|
blockFontSize: linkFontSize,
|
|
@@ -124,7 +117,7 @@ const BlockQuote = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
|
124
117
|
children: link
|
|
125
118
|
});
|
|
126
119
|
}
|
|
127
|
-
return /*#__PURE__*/(
|
|
120
|
+
return /*#__PURE__*/_jsx(Typography, {
|
|
128
121
|
tokens: {
|
|
129
122
|
color,
|
|
130
123
|
fontName: linkFontName,
|
|
@@ -136,7 +129,7 @@ const BlockQuote = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
|
136
129
|
});
|
|
137
130
|
};
|
|
138
131
|
const renderQuote = () => {
|
|
139
|
-
const quote = /*#__PURE__*/(
|
|
132
|
+
const quote = /*#__PURE__*/_jsx(Typography, {
|
|
140
133
|
tokens: {
|
|
141
134
|
color,
|
|
142
135
|
...titleTokens
|
|
@@ -147,14 +140,14 @@ const BlockQuote = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
|
147
140
|
children: children
|
|
148
141
|
});
|
|
149
142
|
if (additionalInfo || link) {
|
|
150
|
-
return /*#__PURE__*/(
|
|
143
|
+
return /*#__PURE__*/_jsx(QuoteContainer, {
|
|
151
144
|
marginBottom: marginBottom,
|
|
152
145
|
children: quote
|
|
153
146
|
});
|
|
154
147
|
}
|
|
155
148
|
return quote;
|
|
156
149
|
};
|
|
157
|
-
return /*#__PURE__*/(
|
|
150
|
+
return /*#__PURE__*/_jsxs(BlockQuoteContainer, {
|
|
158
151
|
...selectProps(rest),
|
|
159
152
|
paddingTop: paddingTop,
|
|
160
153
|
paddingBottom: paddingBottom,
|
|
@@ -163,9 +156,9 @@ const BlockQuote = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
|
163
156
|
width: width,
|
|
164
157
|
backgroundGradient: backgroundGradient,
|
|
165
158
|
ref: ref,
|
|
166
|
-
children: [renderQuote(), (additionalInfo || link) && /*#__PURE__*/(
|
|
159
|
+
children: [renderQuote(), (additionalInfo || link) && /*#__PURE__*/_jsxs(StackView, {
|
|
167
160
|
space: 0,
|
|
168
|
-
children: [link && renderLink(), additionalInfo && /*#__PURE__*/(
|
|
161
|
+
children: [link && renderLink(), additionalInfo && /*#__PURE__*/_jsx(Typography, {
|
|
169
162
|
tokens: {
|
|
170
163
|
color
|
|
171
164
|
},
|
|
@@ -180,32 +173,31 @@ const BlockQuote = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
|
180
173
|
BlockQuote.displayName = 'BlockQuote';
|
|
181
174
|
BlockQuote.propTypes = {
|
|
182
175
|
...selectedSystemPropTypes,
|
|
183
|
-
...
|
|
184
|
-
tokens:
|
|
185
|
-
variant:
|
|
186
|
-
alternative:
|
|
187
|
-
size:
|
|
176
|
+
...withLinkRouter.propTypes,
|
|
177
|
+
tokens: getTokensPropType('BlockQuote'),
|
|
178
|
+
variant: PropTypes.exact({
|
|
179
|
+
alternative: PropTypes.bool,
|
|
180
|
+
size: PropTypes.string
|
|
188
181
|
}),
|
|
189
182
|
/**
|
|
190
183
|
* Children nodes that can be added
|
|
191
184
|
*/
|
|
192
|
-
children:
|
|
185
|
+
children: PropTypes.node.isRequired,
|
|
193
186
|
/**
|
|
194
187
|
* External source's identifier (e.g. author's name)
|
|
195
188
|
*/
|
|
196
|
-
link:
|
|
189
|
+
link: PropTypes.string,
|
|
197
190
|
/**
|
|
198
191
|
* External source's URL
|
|
199
192
|
*/
|
|
200
|
-
linkHref:
|
|
193
|
+
linkHref: PropTypes.string,
|
|
201
194
|
/**
|
|
202
195
|
* To provide additional information about the source, rendered underneath `link`
|
|
203
196
|
*/
|
|
204
|
-
additionalInfo:
|
|
197
|
+
additionalInfo: PropTypes.string,
|
|
205
198
|
/**
|
|
206
199
|
* Whether to render BlockQuote as a heading size of `h3` or large text size
|
|
207
200
|
*/
|
|
208
|
-
textStyle:
|
|
201
|
+
textStyle: PropTypes.oneOf(['large', 'heading'])
|
|
209
202
|
};
|
|
210
|
-
|
|
211
|
-
exports.default = _default;
|
|
203
|
+
export default BlockQuote;
|
package/lib/BlockQuote/index.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _BlockQuote = _interopRequireDefault(require("./BlockQuote"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var _default = _BlockQuote.default;
|
|
10
|
-
exports.default = _default;
|
|
1
|
+
import BlockQuote from './BlockQuote';
|
|
2
|
+
export default BlockQuote;
|
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _componentsBase = require("@telus-uds/components-base");
|
|
13
|
-
var _utils = require("../utils");
|
|
14
|
-
var _Item = _interopRequireDefault(require("./Item/Item"));
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
20
|
-
const StyledList = /*#__PURE__*/_styledComponents.default.ol.withConfig({
|
|
1
|
+
import React, { createElement as _createElement } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Helmet, HelmetProvider } from 'react-helmet-async';
|
|
5
|
+
import { isEqual } from 'lodash';
|
|
6
|
+
import { componentPropType, selectSystemProps, unpackFragment, withLinkRouter, getTokensPropType, useThemeTokens, useViewport } from '@telus-uds/components-base';
|
|
7
|
+
import { htmlAttrs } from '../utils';
|
|
8
|
+
import Item from './Item/Item';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
11
|
+
const StyledList = /*#__PURE__*/styled.ol.withConfig({
|
|
21
12
|
displayName: "Breadcrumbs__StyledList",
|
|
22
13
|
componentId: "components-web__sc-gwwxrc-0"
|
|
23
14
|
})({
|
|
@@ -104,7 +95,7 @@ const MAX_ITEMS_ON_XS_VIEWPORT = 4;
|
|
|
104
95
|
/**
|
|
105
96
|
* Display a hierarchy of links, commonly used for navigation.
|
|
106
97
|
*/
|
|
107
|
-
const Breadcrumbs = /*#__PURE__*/
|
|
98
|
+
const Breadcrumbs = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
108
99
|
let {
|
|
109
100
|
baseUrl,
|
|
110
101
|
children,
|
|
@@ -125,7 +116,7 @@ const Breadcrumbs = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
125
116
|
// const isSSR = typeof window === 'undefined' || isHydrating
|
|
126
117
|
// const hasMetadata = isSSR ? enableHelmetSSR : true
|
|
127
118
|
const helmetContext = {};
|
|
128
|
-
const activeRoutes = children ?
|
|
119
|
+
const activeRoutes = children ? React.Children.map(unpackFragment(children), _ref3 => {
|
|
129
120
|
let {
|
|
130
121
|
props: {
|
|
131
122
|
href,
|
|
@@ -141,12 +132,12 @@ const Breadcrumbs = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
141
132
|
...itemRest
|
|
142
133
|
};
|
|
143
134
|
}) : routes.filter(route => route.path && route.breadcrumbName);
|
|
144
|
-
const [optionsHidden, setOptionsHidden] =
|
|
145
|
-
const [itemsToBeRendered, setItemsToBeRendered] =
|
|
146
|
-
const viewport =
|
|
147
|
-
|
|
135
|
+
const [optionsHidden, setOptionsHidden] = React.useState(false);
|
|
136
|
+
const [itemsToBeRendered, setItemsToBeRendered] = React.useState([]);
|
|
137
|
+
const viewport = useViewport();
|
|
138
|
+
React.useEffect(() => {
|
|
148
139
|
if (optionsHidden) {
|
|
149
|
-
if (viewport !== 'xs' && !
|
|
140
|
+
if (viewport !== 'xs' && !isEqual(itemsToBeRendered, activeRoutes)) {
|
|
150
141
|
setItemsToBeRendered(activeRoutes);
|
|
151
142
|
}
|
|
152
143
|
return;
|
|
@@ -163,16 +154,16 @@ const Breadcrumbs = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
163
154
|
}, activeRoutes[activeRoutes.length - 1]];
|
|
164
155
|
setItemsToBeRendered(newItems);
|
|
165
156
|
setOptionsHidden(true);
|
|
166
|
-
} else if (!
|
|
157
|
+
} else if (!isEqual(itemsToBeRendered, activeRoutes)) {
|
|
167
158
|
setItemsToBeRendered(activeRoutes);
|
|
168
159
|
}
|
|
169
160
|
}, [viewport, activeRoutes, optionsHidden, itemsToBeRendered]);
|
|
170
161
|
const items = getItems(itemsToBeRendered, params, !children);
|
|
171
|
-
const themeTokens =
|
|
172
|
-
const metadata = /*#__PURE__*/(
|
|
162
|
+
const themeTokens = useThemeTokens('Breadcrumbs', tokens, variant);
|
|
163
|
+
const metadata = /*#__PURE__*/_jsx(HelmetProvider, {
|
|
173
164
|
context: helmetContext,
|
|
174
|
-
children: /*#__PURE__*/(
|
|
175
|
-
children: /*#__PURE__*/(
|
|
165
|
+
children: /*#__PURE__*/_jsx(Helmet, {
|
|
166
|
+
children: /*#__PURE__*/_jsx("script", {
|
|
176
167
|
type: "application/ld+json",
|
|
177
168
|
children: `
|
|
178
169
|
{
|
|
@@ -184,11 +175,11 @@ const Breadcrumbs = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
184
175
|
})
|
|
185
176
|
})
|
|
186
177
|
});
|
|
187
|
-
return /*#__PURE__*/(
|
|
178
|
+
return /*#__PURE__*/_jsxs("nav", {
|
|
188
179
|
"aria-label": "Breadcrumb",
|
|
189
180
|
ref: ref,
|
|
190
181
|
...selectProps(rest),
|
|
191
|
-
children: [/*#__PURE__*/(
|
|
182
|
+
children: [/*#__PURE__*/_jsx(StyledList, {
|
|
192
183
|
iconContainerSize: themeTokens.iconContainerSize,
|
|
193
184
|
children: items.map(_ref4 => {
|
|
194
185
|
let {
|
|
@@ -200,7 +191,7 @@ const Breadcrumbs = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
200
191
|
onPress,
|
|
201
192
|
...itemRest
|
|
202
193
|
} = _ref4;
|
|
203
|
-
return /*#__PURE__*/(
|
|
194
|
+
return /*#__PURE__*/_createElement(Item, {
|
|
204
195
|
...itemRest,
|
|
205
196
|
current: current,
|
|
206
197
|
href: href,
|
|
@@ -224,35 +215,34 @@ const Breadcrumbs = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
224
215
|
Breadcrumbs.displayName = 'Breadcrumbs';
|
|
225
216
|
Breadcrumbs.propTypes = {
|
|
226
217
|
...selectedSystemPropTypes,
|
|
227
|
-
tokens:
|
|
228
|
-
...
|
|
218
|
+
tokens: getTokensPropType('Breadcrumbs'),
|
|
219
|
+
...withLinkRouter.propTypes,
|
|
229
220
|
/**
|
|
230
221
|
* Base URL used to build structured data.
|
|
231
222
|
*/
|
|
232
|
-
baseUrl:
|
|
223
|
+
baseUrl: PropTypes.string,
|
|
233
224
|
/**
|
|
234
225
|
* A list of Items to be used as an alternative to the `routes` prop.
|
|
235
226
|
*/
|
|
236
|
-
children:
|
|
227
|
+
children: componentPropType('Item'),
|
|
237
228
|
/**
|
|
238
229
|
* React Router params.
|
|
239
230
|
*/
|
|
240
|
-
params:
|
|
231
|
+
params: PropTypes.object,
|
|
241
232
|
/**
|
|
242
233
|
* An array of routes to be displayed as breadcrumbs.
|
|
243
234
|
*/
|
|
244
|
-
routes:
|
|
245
|
-
path:
|
|
246
|
-
breadcrumbName:
|
|
235
|
+
routes: PropTypes.arrayOf(PropTypes.shape({
|
|
236
|
+
path: PropTypes.string,
|
|
237
|
+
breadcrumbName: PropTypes.string
|
|
247
238
|
})),
|
|
248
239
|
/**
|
|
249
240
|
* Variant to render.
|
|
250
241
|
*/
|
|
251
|
-
variant:
|
|
252
|
-
inverse:
|
|
253
|
-
light:
|
|
242
|
+
variant: PropTypes.shape({
|
|
243
|
+
inverse: PropTypes.bool,
|
|
244
|
+
light: PropTypes.bool
|
|
254
245
|
})
|
|
255
246
|
};
|
|
256
|
-
Breadcrumbs.Item =
|
|
257
|
-
|
|
258
|
-
exports.default = _default;
|
|
247
|
+
Breadcrumbs.Item = Item;
|
|
248
|
+
export default Breadcrumbs;
|