@telus-uds/components-web 2.43.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 +21 -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 +105 -101
- 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 +17 -4
- 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 -506
- 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
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _componentsBase = require("@telus-uds/components-base");
|
|
11
|
-
var _Image = _interopRequireDefault(require("../Image"));
|
|
12
|
-
var _utils = require("../utils");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
16
|
-
const TestimonialContainer = /*#__PURE__*/_styledComponents.default.figure.withConfig({
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Icon, selectSystemProps, Typography, useThemeTokens, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
5
|
+
import Image from '../Image';
|
|
6
|
+
import { htmlAttrs } from '../utils';
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
9
|
+
const TestimonialContainer = /*#__PURE__*/styled.figure.withConfig({
|
|
17
10
|
displayName: "Testimonial__TestimonialContainer",
|
|
18
11
|
componentId: "components-web__sc-1az53gr-0"
|
|
19
12
|
})(_ref => {
|
|
@@ -27,7 +20,7 @@ const TestimonialContainer = /*#__PURE__*/_styledComponents.default.figure.withC
|
|
|
27
20
|
margin: 0
|
|
28
21
|
};
|
|
29
22
|
});
|
|
30
|
-
const QuoteContainer = /*#__PURE__*/
|
|
23
|
+
const QuoteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31
24
|
displayName: "Testimonial__QuoteContainer",
|
|
32
25
|
componentId: "components-web__sc-1az53gr-1"
|
|
33
26
|
})(_ref2 => {
|
|
@@ -40,7 +33,7 @@ const QuoteContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
40
33
|
gap: quoteContainerGap
|
|
41
34
|
};
|
|
42
35
|
});
|
|
43
|
-
const Divider = /*#__PURE__*/
|
|
36
|
+
const Divider = /*#__PURE__*/styled.div.withConfig({
|
|
44
37
|
displayName: "Testimonial__Divider",
|
|
45
38
|
componentId: "components-web__sc-1az53gr-2"
|
|
46
39
|
})(_ref3 => {
|
|
@@ -54,20 +47,20 @@ const Divider = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
54
47
|
width: '100%'
|
|
55
48
|
};
|
|
56
49
|
});
|
|
57
|
-
const BlockQuote = /*#__PURE__*/
|
|
50
|
+
const BlockQuote = /*#__PURE__*/styled.blockquote.withConfig({
|
|
58
51
|
displayName: "Testimonial__BlockQuote",
|
|
59
52
|
componentId: "components-web__sc-1az53gr-3"
|
|
60
53
|
})({
|
|
61
54
|
margin: 0
|
|
62
55
|
});
|
|
63
|
-
const AuthorInfoContainer = /*#__PURE__*/
|
|
56
|
+
const AuthorInfoContainer = /*#__PURE__*/styled.div.withConfig({
|
|
64
57
|
displayName: "Testimonial__AuthorInfoContainer",
|
|
65
58
|
componentId: "components-web__sc-1az53gr-4"
|
|
66
59
|
})({
|
|
67
60
|
display: 'flex',
|
|
68
61
|
flexDirection: 'column'
|
|
69
62
|
});
|
|
70
|
-
const Figcaption = /*#__PURE__*/
|
|
63
|
+
const Figcaption = /*#__PURE__*/styled.figcaption.withConfig({
|
|
71
64
|
displayName: "Testimonial__Figcaption",
|
|
72
65
|
componentId: "components-web__sc-1az53gr-5"
|
|
73
66
|
})(_ref4 => {
|
|
@@ -80,7 +73,7 @@ const Figcaption = /*#__PURE__*/_styledComponents.default.figcaption.withConfig(
|
|
|
80
73
|
gap: figcaptionGap
|
|
81
74
|
};
|
|
82
75
|
});
|
|
83
|
-
const Testimonial = /*#__PURE__*/
|
|
76
|
+
const Testimonial = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
84
77
|
let {
|
|
85
78
|
showDivider,
|
|
86
79
|
testimonial,
|
|
@@ -94,7 +87,7 @@ const Testimonial = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
94
87
|
variant = {},
|
|
95
88
|
...rest
|
|
96
89
|
} = _ref5;
|
|
97
|
-
const viewport =
|
|
90
|
+
const viewport = useViewport();
|
|
98
91
|
const {
|
|
99
92
|
testimonialContainerGap,
|
|
100
93
|
quoteContainerGap,
|
|
@@ -121,7 +114,7 @@ const Testimonial = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
121
114
|
additionalLineHeight,
|
|
122
115
|
additionalFontName,
|
|
123
116
|
additionalFontWeight
|
|
124
|
-
} =
|
|
117
|
+
} = useThemeTokens('Testimonial', tokens, variant, {
|
|
125
118
|
viewport
|
|
126
119
|
});
|
|
127
120
|
const getQuoteTestimonial = open => {
|
|
@@ -129,13 +122,13 @@ const Testimonial = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
129
122
|
if (copy === 'en') quote = open ? '\u201C' : '\u201D';else quote = open ? '\u00AB ' : ' \u00BB';
|
|
130
123
|
return quote;
|
|
131
124
|
};
|
|
132
|
-
return /*#__PURE__*/(
|
|
125
|
+
return /*#__PURE__*/_jsxs(TestimonialContainer, {
|
|
133
126
|
testimonialContainerGap: testimonialContainerGap,
|
|
134
127
|
ref: ref,
|
|
135
128
|
...selectProps(rest),
|
|
136
|
-
children: [/*#__PURE__*/(
|
|
129
|
+
children: [/*#__PURE__*/_jsxs(QuoteContainer, {
|
|
137
130
|
quoteContainerGap: quoteContainerGap,
|
|
138
|
-
children: [/*#__PURE__*/(
|
|
131
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
139
132
|
tokens: {
|
|
140
133
|
color: iconColor
|
|
141
134
|
},
|
|
@@ -143,13 +136,13 @@ const Testimonial = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
143
136
|
size: 'micro'
|
|
144
137
|
},
|
|
145
138
|
icon: copy === 'en' ? icon : iconFr
|
|
146
|
-
}), showDivider && /*#__PURE__*/(
|
|
139
|
+
}), showDivider && /*#__PURE__*/_jsx(Divider, {
|
|
147
140
|
dividerBackgroundColor: dividerBackgroundColor,
|
|
148
141
|
dividerBorder: dividerBorder,
|
|
149
142
|
role: "separator"
|
|
150
143
|
})]
|
|
151
|
-
}), /*#__PURE__*/(
|
|
152
|
-
children: /*#__PURE__*/(
|
|
144
|
+
}), /*#__PURE__*/_jsx(BlockQuote, {
|
|
145
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
153
146
|
variant: {
|
|
154
147
|
size: testimonialStyle === 'large' ? 'large' : 'h3'
|
|
155
148
|
},
|
|
@@ -162,16 +155,16 @@ const Testimonial = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
162
155
|
},
|
|
163
156
|
children: `${getQuoteTestimonial(true)}${testimonial}${getQuoteTestimonial()}`
|
|
164
157
|
})
|
|
165
|
-
}), (image || title || additionalInfo) && /*#__PURE__*/(
|
|
158
|
+
}), (image || title || additionalInfo) && /*#__PURE__*/_jsxs(Figcaption, {
|
|
166
159
|
figcaptionGap: figcaptionGap,
|
|
167
|
-
children: [image && (typeof image === 'string' ? /*#__PURE__*/(
|
|
160
|
+
children: [image && (typeof image === 'string' ? /*#__PURE__*/_jsx(Image, {
|
|
168
161
|
rounded: "circle",
|
|
169
162
|
src: image,
|
|
170
163
|
alt: title,
|
|
171
164
|
width: imageSize,
|
|
172
165
|
height: imageSize
|
|
173
|
-
}) : image), (title || additionalInfo) && /*#__PURE__*/(
|
|
174
|
-
children: [title && /*#__PURE__*/(
|
|
166
|
+
}) : image), (title || additionalInfo) && /*#__PURE__*/_jsxs(AuthorInfoContainer, {
|
|
167
|
+
children: [title && /*#__PURE__*/_jsx(Typography, {
|
|
175
168
|
variant: {
|
|
176
169
|
size: 'small'
|
|
177
170
|
},
|
|
@@ -183,7 +176,7 @@ const Testimonial = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
183
176
|
fontWeight: authorFontWeight
|
|
184
177
|
},
|
|
185
178
|
children: title
|
|
186
|
-
}), additionalInfo && /*#__PURE__*/(
|
|
179
|
+
}), additionalInfo && /*#__PURE__*/_jsx(Typography, {
|
|
187
180
|
variant: {
|
|
188
181
|
size: 'small'
|
|
189
182
|
},
|
|
@@ -197,7 +190,7 @@ const Testimonial = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
197
190
|
children: additionalInfo
|
|
198
191
|
})]
|
|
199
192
|
})]
|
|
200
|
-
}), showDivider && /*#__PURE__*/(
|
|
193
|
+
}), showDivider && /*#__PURE__*/_jsx(Divider, {
|
|
201
194
|
dividerBackgroundColor: dividerBackgroundColor,
|
|
202
195
|
dividerBorder: dividerBorder,
|
|
203
196
|
role: "separator"
|
|
@@ -207,35 +200,34 @@ const Testimonial = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
207
200
|
Testimonial.displayName = 'Testimonial';
|
|
208
201
|
Testimonial.propTypes = {
|
|
209
202
|
...selectedSystemPropTypes,
|
|
210
|
-
tokens:
|
|
203
|
+
tokens: getTokensPropType('Testimonial'),
|
|
211
204
|
/**
|
|
212
205
|
* Testimonial content
|
|
213
206
|
*/
|
|
214
|
-
testimonial:
|
|
207
|
+
testimonial: PropTypes.string.isRequired,
|
|
215
208
|
/**
|
|
216
209
|
* Testimonial author or source
|
|
217
210
|
*/
|
|
218
|
-
title:
|
|
211
|
+
title: PropTypes.string,
|
|
219
212
|
/**
|
|
220
213
|
* Additional information on the author or source
|
|
221
214
|
*/
|
|
222
|
-
additionalInfo:
|
|
215
|
+
additionalInfo: PropTypes.string,
|
|
223
216
|
/**
|
|
224
217
|
* Testimonial style
|
|
225
218
|
*/
|
|
226
|
-
testimonialStyle:
|
|
219
|
+
testimonialStyle: PropTypes.oneOf(['large', 'heading']),
|
|
227
220
|
/**
|
|
228
221
|
* Whether to show or not dividers at the top and the bottom of the testimonial
|
|
229
222
|
showDivider: PropTypes.bool,
|
|
230
223
|
/**
|
|
231
224
|
* The src attribute for the Image component or custom JSX content to render instead
|
|
232
225
|
*/
|
|
233
|
-
image:
|
|
226
|
+
image: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
234
227
|
/**
|
|
235
228
|
* The src attribute for the `Image` component to be displayed on the testimonial
|
|
236
229
|
* @deprecated please use the `image` prop instead
|
|
237
230
|
*/
|
|
238
|
-
imageSrc:
|
|
231
|
+
imageSrc: PropTypes.string
|
|
239
232
|
};
|
|
240
|
-
|
|
241
|
-
exports.default = _default;
|
|
233
|
+
export default Testimonial;
|
package/lib/Testimonial/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 _Testimonial = _interopRequireDefault(require("./Testimonial"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var _default = _Testimonial.default;
|
|
10
|
-
exports.default = _default;
|
|
1
|
+
import Testimonial from './Testimonial';
|
|
2
|
+
export default Testimonial;
|
package/lib/Toast/Toast.js
CHANGED
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _componentsBase = require("@telus-uds/components-base");
|
|
10
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
|
-
var _utils = require("../utils");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
1
|
var _withLinkRouter$propT, _withLinkRouter$propT2;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { ChevronLink, selectSystemProps, useThemeTokens, Typography, withLinkRouter, Spacer, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
5
|
+
import styled, { keyframes, css } from 'styled-components';
|
|
6
|
+
import { htmlAttrs } from '../utils';
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
9
|
+
const transform = property => (from, to) => keyframes(["from{", ":", ";}to{", ":", ";}"], property, from, property, to);
|
|
19
10
|
const slideDown = property => function (from, to) {
|
|
20
11
|
let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : to;
|
|
21
|
-
return
|
|
12
|
+
return keyframes(["0%{", ":", ";}99%{", ":", ";}100%{", ":", ";}"], property, from, property, to, property, end);
|
|
22
13
|
};
|
|
23
|
-
const animation = props =>
|
|
24
|
-
const ToastContainer = /*#__PURE__*/
|
|
14
|
+
const animation = props => css(["", " 1s ease-in-out 2s forwards,", " 1s ease-in-out 2s forwards,", " 1s ease-in-out 2s forwards,", " 1s ease-in-out 3.2s forwards;& *{animation:", " 1s ease-in-out 3s forwards;}& > a div{animation:", " 1s ease-in-out 3s forwards;}& > a svg{animation:", " 1s ease-in-out 3s forwards;}& > a div{animation:", " 1s ease-in-out 3s forwards;}"], slideDown('height')(`${props.animationHeightBefore}px`, `${props.animationHeightAfter}px`, 'auto'), transform('padding-bottom')(`${props.animationPaddingBottomBefore}px`, `${props.animationPaddingBottomAfter}px`), transform('padding-top')(`${props.animationPaddingTopBefore}px`, `${props.animationPaddingTopAfter}px`), transform('background')(props.animationBackgroundColorBefore, props.animationBackgroundColorAfter), transform('color')(props.animationColorBefore, props.animationColorAfter), transform('color')(props.animationDivColorBefore, props.animationDivColorAfter), transform('fill')(props.animationFillColorBefore, props.animationFillColorAfter), transform('color')(props.animationFillColorBefore, props.animationFillColorAfter));
|
|
15
|
+
const ToastContainer = /*#__PURE__*/styled.div.withConfig({
|
|
25
16
|
displayName: "Toast__ToastContainer",
|
|
26
17
|
componentId: "components-web__sc-p78jdh-0"
|
|
27
18
|
})(["display:flex;justify-content:center;align-items:center;flex-wrap:wrap;padding-left:", "px;padding-right:", "px;background:", ";gap:", ";height:0;overflow:hidden;animation:", ";"], _ref => {
|
|
@@ -45,7 +36,7 @@ const ToastContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
45
36
|
} = _ref4;
|
|
46
37
|
return containerGap;
|
|
47
38
|
}, animation);
|
|
48
|
-
const Toast = /*#__PURE__*/
|
|
39
|
+
const Toast = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
49
40
|
let {
|
|
50
41
|
toast,
|
|
51
42
|
copy,
|
|
@@ -56,7 +47,7 @@ const Toast = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
56
47
|
...rest
|
|
57
48
|
} = _ref5;
|
|
58
49
|
// viewport hook added to work adjust the padding to different sizes
|
|
59
|
-
const viewport =
|
|
50
|
+
const viewport = useViewport();
|
|
60
51
|
const {
|
|
61
52
|
containerBackgroundColor,
|
|
62
53
|
containerGap,
|
|
@@ -72,23 +63,23 @@ const Toast = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
72
63
|
animationColorAfter,
|
|
73
64
|
chevronlinkFontWeight,
|
|
74
65
|
...extraTokens
|
|
75
|
-
} =
|
|
66
|
+
} = useThemeTokens('Toast', tokens, variant, {
|
|
76
67
|
viewport
|
|
77
68
|
});
|
|
78
69
|
|
|
79
70
|
// inherit ChevronLink tokens for animation colors
|
|
80
71
|
const {
|
|
81
72
|
color: chevronDefaultColor
|
|
82
|
-
} =
|
|
73
|
+
} = useThemeTokens('ChevronLink', {}, {});
|
|
83
74
|
const {
|
|
84
75
|
color: chevronInverseColor
|
|
85
|
-
} =
|
|
76
|
+
} = useThemeTokens('ChevronLink', {}, {
|
|
86
77
|
inverse: true
|
|
87
78
|
});
|
|
88
79
|
if (!toast) {
|
|
89
80
|
return null;
|
|
90
81
|
}
|
|
91
|
-
return /*#__PURE__*/(
|
|
82
|
+
return /*#__PURE__*/_jsxs(ToastContainer, {
|
|
92
83
|
containerBackgroundColor: containerBackgroundColor,
|
|
93
84
|
containerGap: containerGap,
|
|
94
85
|
animationHeightBefore: animationHeightBefore,
|
|
@@ -106,24 +97,24 @@ const Toast = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
106
97
|
ref: ref,
|
|
107
98
|
...extraTokens,
|
|
108
99
|
...selectProps(rest),
|
|
109
|
-
children: [headline && /*#__PURE__*/(
|
|
100
|
+
children: [headline && /*#__PURE__*/_jsx(Typography, {
|
|
110
101
|
variant: {
|
|
111
102
|
bold: true,
|
|
112
103
|
inverse: true
|
|
113
104
|
},
|
|
114
105
|
children: headline
|
|
115
|
-
}), /*#__PURE__*/(
|
|
106
|
+
}), /*#__PURE__*/_jsx(Spacer, {
|
|
116
107
|
space: 2,
|
|
117
108
|
direction: "row"
|
|
118
|
-
}), /*#__PURE__*/(
|
|
109
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
119
110
|
variant: {
|
|
120
111
|
inverse: true
|
|
121
112
|
},
|
|
122
113
|
children: copy
|
|
123
|
-
}), /*#__PURE__*/(
|
|
114
|
+
}), /*#__PURE__*/_jsx(Spacer, {
|
|
124
115
|
space: 2,
|
|
125
116
|
direction: "row"
|
|
126
|
-
}), link && /*#__PURE__*/(
|
|
117
|
+
}), link && /*#__PURE__*/_jsx(ChevronLink, {
|
|
127
118
|
variant: {
|
|
128
119
|
inverse: true
|
|
129
120
|
},
|
|
@@ -140,28 +131,27 @@ const Toast = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
140
131
|
Toast.displayName = 'Toast';
|
|
141
132
|
Toast.propTypes = {
|
|
142
133
|
...selectedSystemPropTypes,
|
|
143
|
-
tokens:
|
|
134
|
+
tokens: getTokensPropType('Toast'),
|
|
144
135
|
/**
|
|
145
136
|
* If true, the toast will be displayed
|
|
146
137
|
*/
|
|
147
|
-
toast:
|
|
138
|
+
toast: PropTypes.bool,
|
|
148
139
|
/**
|
|
149
140
|
* The copy to display in the toast
|
|
150
141
|
*/
|
|
151
|
-
copy:
|
|
142
|
+
copy: PropTypes.string.isRequired,
|
|
152
143
|
/**
|
|
153
144
|
* The headline to display in the toast (before copy)
|
|
154
145
|
*/
|
|
155
|
-
headline:
|
|
146
|
+
headline: PropTypes.string,
|
|
156
147
|
/**
|
|
157
148
|
* The link to display in the toast (after copy)
|
|
158
149
|
*/
|
|
159
|
-
link:
|
|
160
|
-
href:
|
|
161
|
-
text:
|
|
162
|
-
LinkRouter: (_withLinkRouter$propT =
|
|
163
|
-
linkRouterProps: (_withLinkRouter$propT2 =
|
|
150
|
+
link: PropTypes.shape({
|
|
151
|
+
href: PropTypes.string.isRequired,
|
|
152
|
+
text: PropTypes.string.isRequired,
|
|
153
|
+
LinkRouter: (_withLinkRouter$propT = withLinkRouter.propTypes) === null || _withLinkRouter$propT === void 0 ? void 0 : _withLinkRouter$propT.LinkRouter,
|
|
154
|
+
linkRouterProps: (_withLinkRouter$propT2 = withLinkRouter.propTypes) === null || _withLinkRouter$propT2 === void 0 ? void 0 : _withLinkRouter$propT2.linkRouterProps
|
|
164
155
|
})
|
|
165
156
|
};
|
|
166
|
-
|
|
167
|
-
exports.default = _default;
|
|
157
|
+
export default Toast;
|
package/lib/Toast/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 _Toast = _interopRequireDefault(require("./Toast"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var _default = _Toast.default;
|
|
10
|
-
exports.default = _default;
|
|
1
|
+
import Toast from './Toast';
|
|
2
|
+
export default Toast;
|