@telus-uds/components-web 2.21.1 → 2.22.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/CHANGELOG.md +22 -2
- package/lib/Badge/Badge.js +2 -14
- package/lib/Badge/index.js +0 -3
- package/lib/BlockQuote/BlockQuote.js +4 -25
- package/lib/BlockQuote/index.js +0 -3
- package/lib/Breadcrumbs/Breadcrumbs.js +9 -36
- package/lib/Breadcrumbs/Item/Item.js +15 -25
- package/lib/Breadcrumbs/index.js +0 -2
- package/lib/Callout/Callout.js +2 -24
- package/lib/Callout/index.js +0 -3
- package/lib/Card/Card.js +15 -29
- package/lib/Card/CardContent.js +5 -18
- package/lib/Card/CardFooter.js +7 -19
- package/lib/Card/index.js +0 -3
- package/lib/Countdown/Countdown.js +5 -24
- package/lib/Countdown/Segment.js +3 -15
- package/lib/Countdown/index.js +0 -3
- package/lib/Countdown/types.js +2 -7
- package/lib/Countdown/useCountdown.js +0 -7
- package/lib/DatePicker/CalendarContainer.js +0 -5
- package/lib/DatePicker/DatePicker.js +9 -61
- package/lib/DatePicker/dictionary.js +0 -8
- package/lib/DatePicker/index.js +0 -3
- package/lib/DatePicker/reactDatesCss.js +0 -2
- package/lib/Disclaimer/Disclaimer.js +5 -14
- package/lib/Disclaimer/index.js +0 -2
- package/lib/ExpandCollapseMini/ExpandCollapseMini.js +6 -17
- package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +12 -25
- package/lib/ExpandCollapseMini/index.js +0 -3
- package/lib/Footnote/Footnote.js +17 -63
- package/lib/Footnote/FootnoteLink.js +3 -24
- package/lib/Footnote/index.js +0 -4
- package/lib/IconButton/IconButton.js +4 -14
- package/lib/IconButton/index.js +0 -3
- package/lib/Image/Image.js +5 -24
- package/lib/Image/index.js +0 -3
- package/lib/List/List.js +0 -2
- package/lib/List/ListItem.js +0 -8
- package/lib/List/index.js +0 -4
- package/lib/NavigationBar/NavigationBar.js +10 -35
- package/lib/NavigationBar/NavigationItem.js +5 -17
- package/lib/NavigationBar/NavigationSubMenu.js +3 -19
- package/lib/NavigationBar/collapseItems.js +6 -9
- package/lib/NavigationBar/index.js +0 -3
- package/lib/NavigationBar/resolveItemSelection.js +2 -3
- package/lib/OptimizeImage/OptimizeImage.js +6 -27
- package/lib/OptimizeImage/index.js +0 -3
- package/lib/OptimizeImage/utils/getFallbackUrl.js +0 -4
- package/lib/OptimizeImage/utils/getOptimizedUrl.js +0 -8
- package/lib/OptimizeImage/utils/hasWebpSupport.js +1 -5
- package/lib/OptimizeImage/utils/index.js +0 -4
- package/lib/OptimizeImage/utils/isSvgUrl.js +0 -1
- package/lib/OrderedList/Item.js +4 -21
- package/lib/OrderedList/ItemBase.js +2 -9
- package/lib/OrderedList/OrderedList.js +11 -22
- package/lib/OrderedList/OrderedListBase.js +3 -13
- package/lib/OrderedList/index.js +0 -4
- package/lib/Paragraph/Paragraph.js +3 -18
- package/lib/Paragraph/index.js +0 -3
- package/lib/PreviewCard/AuthorDate.js +1 -10
- package/lib/PreviewCard/PreviewCard.js +15 -35
- package/lib/PreviewCard/index.js +0 -3
- package/lib/PriceLockup/PriceLockup.js +78 -75
- package/lib/PriceLockup/index.js +0 -3
- package/lib/PriceLockup/tokens.js +0 -2
- package/lib/Progress/ProgressBar.js +5 -16
- package/lib/Progress/index.js +0 -4
- package/lib/QuantitySelector/QuantitySelector.js +8 -42
- package/lib/QuantitySelector/SideButton.js +4 -11
- package/lib/QuantitySelector/index.js +0 -3
- package/lib/QuantitySelector/styles.js +0 -6
- package/lib/ResponsiveImage/ResponsiveImage.js +5 -20
- package/lib/ResponsiveImage/index.js +0 -3
- package/lib/Ribbon/Ribbon.js +4 -20
- package/lib/Ribbon/index.js +0 -3
- package/lib/SkeletonProvider/SkeletonImage.js +0 -10
- package/lib/SkeletonProvider/SkeletonProvider.js +4 -22
- package/lib/SkeletonProvider/SkeletonTypography.js +0 -10
- package/lib/SkeletonProvider/index.js +0 -3
- package/lib/Span/Span.js +3 -17
- package/lib/Span/index.js +0 -3
- package/lib/Spinner/Spinner.js +11 -39
- package/lib/Spinner/SpinnerContent.js +2 -18
- package/lib/Spinner/index.js +0 -3
- package/lib/StoryCard/StoryCard.js +11 -31
- package/lib/StoryCard/index.js +0 -3
- package/lib/Table/Body.js +0 -6
- package/lib/Table/Cell.js +4 -24
- package/lib/Table/Header.js +0 -9
- package/lib/Table/Row.js +0 -8
- package/lib/Table/SubHeading.js +0 -9
- package/lib/Table/Table.js +5 -23
- package/lib/Table/index.js +0 -8
- package/lib/TermsAndConditions/ExpandCollapse.js +4 -14
- package/lib/TermsAndConditions/TermsAndConditions.js +7 -29
- package/lib/TermsAndConditions/index.js +0 -2
- package/lib/Testimonial/Testimonial.js +2 -26
- package/lib/Testimonial/index.js +0 -3
- package/lib/Toast/Toast.js +4 -25
- package/lib/Toast/index.js +0 -3
- package/lib/Video/ControlBar/ControlBar.js +2 -25
- package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +4 -17
- package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +4 -20
- package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +12 -26
- package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +8 -23
- package/lib/Video/MiddleControlButton/MiddleControlButton.js +2 -12
- package/lib/Video/Video.js +122 -194
- package/lib/Video/index.js +0 -3
- package/lib/VideoPicker/VideoPicker.js +6 -32
- package/lib/VideoPicker/VideoPickerPlayer.js +2 -10
- package/lib/VideoPicker/VideoPickerThumbnail.js +7 -28
- package/lib/VideoPicker/VideoSlider.js +7 -17
- package/lib/VideoPicker/index.js +0 -3
- package/lib/VideoPicker/videoPropType.js +2 -8
- package/lib/WaffleGrid/WaffleGrid.js +11 -28
- package/lib/WaffleGrid/index.js +0 -3
- package/lib/WebPortal/WebPortal.js +1 -5
- package/lib/WebPortal/index.js +0 -3
- package/lib/WebVideo/WebVideo.js +4 -30
- package/lib/WebVideo/index.js +0 -3
- package/lib/baseExports.js +6 -1
- package/lib/index.js +0 -49
- package/lib/shared/FullBleedContent/FullBleedContent.js +5 -17
- package/lib/shared/FullBleedContent/getFullBleedBorderRadius.js +0 -11
- package/lib/shared/FullBleedContent/index.js +0 -5
- package/lib/shared/FullBleedContent/useFullBleedContentProps.js +1 -12
- package/lib/shared/VideoSplash/SplashButton/SplashButton.js +2 -12
- package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +7 -23
- package/lib/shared/VideoSplash/VideoSplash.js +4 -17
- package/lib/shared/VideoSplash/helpers.js +0 -6
- package/lib/utils/index.js +0 -9
- package/lib/utils/logger.js +0 -6
- package/lib/utils/media.js +2 -11
- package/lib/utils/renderStructuredContent.js +14 -31
- package/lib/utils/ssr.js +0 -6
- package/lib/utils/transforms.js +0 -2
- package/lib/utils/useOverlaidPosition.js +6 -28
- package/lib/utils/useTypographyTheme.js +4 -5
- package/lib-module/Badge/Badge.js +2 -5
- package/lib-module/BlockQuote/BlockQuote.js +4 -15
- package/lib-module/Breadcrumbs/Breadcrumbs.js +9 -25
- package/lib-module/Breadcrumbs/Item/Item.js +15 -12
- package/lib-module/Callout/Callout.js +2 -16
- package/lib-module/Card/Card.js +14 -17
- package/lib-module/Card/CardContent.js +5 -8
- package/lib-module/Card/CardFooter.js +7 -9
- package/lib-module/Countdown/Countdown.js +6 -11
- package/lib-module/Countdown/Segment.js +6 -8
- package/lib-module/Countdown/types.js +2 -1
- package/lib-module/Countdown/useCountdown.js +0 -6
- package/lib-module/DatePicker/CalendarContainer.js +3 -1
- package/lib-module/DatePicker/DatePicker.js +9 -39
- package/lib-module/DatePicker/dictionary.js +0 -8
- package/lib-module/Disclaimer/Disclaimer.js +5 -4
- package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +6 -8
- package/lib-module/ExpandCollapseMini/ExpandCollapseMiniControl.js +13 -19
- package/lib-module/Footnote/Footnote.js +17 -41
- package/lib-module/Footnote/FootnoteLink.js +3 -12
- package/lib-module/IconButton/IconButton.js +4 -6
- package/lib-module/Image/Image.js +5 -14
- package/lib-module/NavigationBar/NavigationBar.js +10 -20
- package/lib-module/NavigationBar/NavigationItem.js +5 -5
- package/lib-module/NavigationBar/NavigationSubMenu.js +3 -8
- package/lib-module/NavigationBar/collapseItems.js +6 -8
- package/lib-module/NavigationBar/resolveItemSelection.js +2 -2
- package/lib-module/OptimizeImage/OptimizeImage.js +6 -16
- package/lib-module/OptimizeImage/utils/getFallbackUrl.js +0 -1
- package/lib-module/OptimizeImage/utils/getOptimizedUrl.js +0 -5
- package/lib-module/OptimizeImage/utils/hasWebpSupport.js +1 -5
- package/lib-module/OrderedList/Item.js +4 -7
- package/lib-module/OrderedList/ItemBase.js +2 -3
- package/lib-module/OrderedList/OrderedList.js +11 -9
- package/lib-module/OrderedList/OrderedListBase.js +3 -3
- package/lib-module/Paragraph/Paragraph.js +3 -8
- package/lib-module/PreviewCard/AuthorDate.js +1 -4
- package/lib-module/PreviewCard/PreviewCard.js +16 -19
- package/lib-module/PriceLockup/PriceLockup.js +78 -57
- package/lib-module/Progress/ProgressBar.js +7 -8
- package/lib-module/QuantitySelector/QuantitySelector.js +8 -30
- package/lib-module/QuantitySelector/SideButton.js +4 -6
- package/lib-module/ResponsiveImage/ResponsiveImage.js +5 -12
- package/lib-module/Ribbon/Ribbon.js +4 -9
- package/lib-module/SkeletonProvider/SkeletonImage.js +0 -5
- package/lib-module/SkeletonProvider/SkeletonProvider.js +4 -12
- package/lib-module/SkeletonProvider/SkeletonTypography.js +0 -5
- package/lib-module/Span/Span.js +3 -7
- package/lib-module/Spinner/Spinner.js +11 -24
- package/lib-module/Spinner/SpinnerContent.js +2 -8
- package/lib-module/StoryCard/StoryCard.js +12 -17
- package/lib-module/Table/Body.js +0 -2
- package/lib-module/Table/Cell.js +4 -14
- package/lib-module/Table/Header.js +0 -2
- package/lib-module/Table/Row.js +0 -2
- package/lib-module/Table/SubHeading.js +0 -2
- package/lib-module/Table/Table.js +5 -6
- package/lib-module/TermsAndConditions/ExpandCollapse.js +4 -2
- package/lib-module/TermsAndConditions/TermsAndConditions.js +7 -9
- package/lib-module/Testimonial/Testimonial.js +2 -11
- package/lib-module/Toast/Toast.js +4 -15
- package/lib-module/Video/ControlBar/ControlBar.js +2 -9
- package/lib-module/Video/ControlBar/Controls/VideoButton/VideoButton.js +4 -8
- package/lib-module/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +4 -8
- package/lib-module/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +12 -13
- package/lib-module/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +8 -10
- package/lib-module/Video/MiddleControlButton/MiddleControlButton.js +2 -3
- package/lib-module/Video/Video.js +122 -173
- package/lib-module/VideoPicker/VideoPicker.js +6 -15
- package/lib-module/VideoPicker/VideoPickerPlayer.js +2 -3
- package/lib-module/VideoPicker/VideoPickerThumbnail.js +7 -13
- package/lib-module/VideoPicker/VideoSlider.js +6 -9
- package/lib-module/VideoPicker/videoPropType.js +2 -1
- package/lib-module/WaffleGrid/WaffleGrid.js +11 -15
- package/lib-module/WebPortal/WebPortal.js +1 -1
- package/lib-module/WebVideo/WebVideo.js +4 -15
- package/lib-module/baseExports.js +3 -2
- package/lib-module/index.js +0 -1
- package/lib-module/shared/FullBleedContent/FullBleedContent.js +5 -10
- package/lib-module/shared/FullBleedContent/getFullBleedBorderRadius.js +0 -10
- package/lib-module/shared/FullBleedContent/useFullBleedContentProps.js +1 -11
- package/lib-module/shared/VideoSplash/SplashButton/SplashButton.js +2 -3
- package/lib-module/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +7 -12
- package/lib-module/shared/VideoSplash/VideoSplash.js +4 -4
- package/lib-module/utils/logger.js +2 -2
- package/lib-module/utils/media.js +2 -9
- package/lib-module/utils/renderStructuredContent.js +14 -25
- package/lib-module/utils/ssr.js +0 -4
- package/lib-module/utils/useOverlaidPosition.js +8 -27
- package/lib-module/utils/useTypographyTheme.js +4 -4
- package/package.json +3 -3
- package/src/PriceLockup/PriceLockup.jsx +36 -11
- package/src/baseExports.js +1 -0
- package/src/index.js +0 -1
- package/lib/Modal/Modal.js +0 -146
- package/lib/Modal/ModalContent.js +0 -203
- package/lib/Modal/index.js +0 -13
- package/lib-module/Modal/Modal.js +0 -132
- package/lib-module/Modal/ModalContent.js +0 -181
- package/lib-module/Modal/index.js +0 -2
- package/src/Modal/Modal.jsx +0 -121
- package/src/Modal/ModalContent.jsx +0 -167
- package/src/Modal/index.js +0 -3
package/lib/Table/Table.js
CHANGED
|
@@ -4,34 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useTableContext = exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
-
|
|
14
10
|
var _componentsBase = require("@telus-uds/components-base");
|
|
15
|
-
|
|
16
11
|
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
|
17
|
-
|
|
18
12
|
var _utils = require("../utils");
|
|
19
|
-
|
|
20
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
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); }
|
|
25
|
-
|
|
26
16
|
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; }
|
|
27
|
-
|
|
28
17
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
29
|
-
|
|
30
18
|
const StyledContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
31
19
|
displayName: "Table__StyledContainer",
|
|
32
20
|
componentId: "components-web__sc-10d9q3m-0"
|
|
33
21
|
})(["overflow:auto;padding-bottom:", ";"], props => props.isScrollable ? `${props.tablePaddingBottom}px` : 0);
|
|
34
|
-
|
|
35
22
|
const StyledTable = /*#__PURE__*/_styledComponents.default.table.withConfig({
|
|
36
23
|
displayName: "Table__StyledTable",
|
|
37
24
|
componentId: "components-web__sc-10d9q3m-1"
|
|
@@ -41,10 +28,9 @@ const StyledTable = /*#__PURE__*/_styledComponents.default.table.withConfig({
|
|
|
41
28
|
} = _ref;
|
|
42
29
|
return `${tableWidth}px`;
|
|
43
30
|
}, props => `${props.borderWidth}px solid ${props.borderColor}`);
|
|
44
|
-
|
|
45
31
|
const TableContext = /*#__PURE__*/_react.default.createContext({});
|
|
46
|
-
|
|
47
32
|
const useTableContext = () => (0, _react.useContext)(TableContext);
|
|
33
|
+
|
|
48
34
|
/**
|
|
49
35
|
* Use `Table` to display tabular data.
|
|
50
36
|
*
|
|
@@ -59,10 +45,7 @@ const useTableContext = () => (0, _react.useContext)(TableContext);
|
|
|
59
45
|
* - Use `Table.Row` and `Table.Cell` to build up the tabular data
|
|
60
46
|
* - Use `Cell`'s `type` prop to visually mark it as a row heading (`type="rowHeading"`)
|
|
61
47
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
48
|
exports.useTableContext = useTableContext;
|
|
65
|
-
|
|
66
49
|
const Table = _ref2 => {
|
|
67
50
|
let {
|
|
68
51
|
children,
|
|
@@ -89,12 +72,12 @@ const Table = _ref2 => {
|
|
|
89
72
|
setContainerWidth(containerClientWidth);
|
|
90
73
|
setTableWidth(responsiveTableWidth);
|
|
91
74
|
};
|
|
92
|
-
|
|
93
75
|
const throttledUpdateDimensions = (0, _lodash.default)(updateDimensions, 100, {
|
|
94
76
|
leading: false
|
|
95
77
|
});
|
|
96
|
-
updateDimensions();
|
|
78
|
+
updateDimensions();
|
|
97
79
|
|
|
80
|
+
// a pretty naive way of repeating the measurement after the fonts are loaded
|
|
98
81
|
window.addEventListener('load', updateDimensions);
|
|
99
82
|
window.addEventListener('resize', throttledUpdateDimensions);
|
|
100
83
|
return () => {
|
|
@@ -126,11 +109,10 @@ const Table = _ref2 => {
|
|
|
126
109
|
})
|
|
127
110
|
});
|
|
128
111
|
};
|
|
129
|
-
|
|
130
|
-
|
|
112
|
+
Table.propTypes = {
|
|
113
|
+
...selectedSystemPropTypes,
|
|
131
114
|
tokens: (0, _componentsBase.getTokensPropType)('Table'),
|
|
132
115
|
children: _propTypes.default.node,
|
|
133
|
-
|
|
134
116
|
/**
|
|
135
117
|
* Sets text style
|
|
136
118
|
*/
|
package/lib/Table/index.js
CHANGED
|
@@ -4,21 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Table = _interopRequireDefault(require("./Table"));
|
|
9
|
-
|
|
10
8
|
var _Header = _interopRequireDefault(require("./Header"));
|
|
11
|
-
|
|
12
9
|
var _Body = _interopRequireDefault(require("./Body"));
|
|
13
|
-
|
|
14
10
|
var _Row = _interopRequireDefault(require("./Row"));
|
|
15
|
-
|
|
16
11
|
var _SubHeading = _interopRequireDefault(require("./SubHeading"));
|
|
17
|
-
|
|
18
12
|
var _Cell = _interopRequireDefault(require("./Cell"));
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
_Table.default.Header = _Header.default;
|
|
23
15
|
_Table.default.Body = _Body.default;
|
|
24
16
|
_Table.default.Row = _Row.default;
|
|
@@ -4,23 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _componentsBase = require("@telus-uds/components-base");
|
|
13
|
-
|
|
14
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
13
|
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); }
|
|
21
|
-
|
|
22
14
|
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; }
|
|
23
|
-
|
|
24
15
|
const ExpandCollapseControl = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
25
16
|
displayName: "ExpandCollapse__ExpandCollapseControl",
|
|
26
17
|
componentId: "components-web__sc-1l2mmq7-0"
|
|
@@ -31,7 +22,6 @@ const ExpandCollapseControl = /*#__PURE__*/_styledComponents.default.div.withCon
|
|
|
31
22
|
flex: 1,
|
|
32
23
|
justifyContent: 'flex-start'
|
|
33
24
|
});
|
|
34
|
-
|
|
35
25
|
const ExpandCollapseIconContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
36
26
|
displayName: "ExpandCollapse__ExpandCollapseIconContainer",
|
|
37
27
|
componentId: "components-web__sc-1l2mmq7-1"
|
|
@@ -47,7 +37,6 @@ const ExpandCollapseIconContainer = /*#__PURE__*/_styledComponents.default.div.w
|
|
|
47
37
|
width: tokens.expandIconContainerWidth
|
|
48
38
|
};
|
|
49
39
|
});
|
|
50
|
-
|
|
51
40
|
const ExpandCollapseTitle = /*#__PURE__*/_styledComponents.default.h4.withConfig({
|
|
52
41
|
displayName: "ExpandCollapse__ExpandCollapseTitle",
|
|
53
42
|
componentId: "components-web__sc-1l2mmq7-2"
|
|
@@ -63,7 +52,6 @@ const ExpandCollapseTitle = /*#__PURE__*/_styledComponents.default.h4.withConfig
|
|
|
63
52
|
margin: `${tokens.expandTitleMarginX}px ${tokens.expandTitleMarginY}px`
|
|
64
53
|
};
|
|
65
54
|
});
|
|
66
|
-
|
|
67
55
|
const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
68
56
|
let {
|
|
69
57
|
children,
|
|
@@ -89,7 +77,8 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
89
77
|
tokens: {
|
|
90
78
|
borderWidth: expandBaseBorderWidth
|
|
91
79
|
},
|
|
92
|
-
children: expandProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse.Panel, {
|
|
80
|
+
children: expandProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse.Panel, {
|
|
81
|
+
...expandProps,
|
|
93
82
|
panelId: "ExpandCollapsePanel",
|
|
94
83
|
controlTokens: {
|
|
95
84
|
icon: null,
|
|
@@ -98,7 +87,8 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
98
87
|
borderColor: expandTitleBorderColor,
|
|
99
88
|
borderWidth: expandTitleBorder,
|
|
100
89
|
textLine: expandTitleUnderline
|
|
101
|
-
}
|
|
90
|
+
}
|
|
91
|
+
// TODO refactor
|
|
102
92
|
// eslint-disable-next-line react/no-unstable-nested-components
|
|
103
93
|
,
|
|
104
94
|
control: pressableState => {
|
|
@@ -4,33 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
-
|
|
14
10
|
var _componentsBase = require("@telus-uds/components-base");
|
|
15
|
-
|
|
16
11
|
var _ExpandCollapse = _interopRequireDefault(require("./ExpandCollapse"));
|
|
17
|
-
|
|
18
12
|
var _OrderedListBase = _interopRequireDefault(require("../OrderedList/OrderedListBase"));
|
|
19
|
-
|
|
20
13
|
var _utils = require("../utils");
|
|
21
|
-
|
|
22
14
|
var _dictionary = _interopRequireDefault(require("./dictionary"));
|
|
23
|
-
|
|
24
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
-
|
|
26
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
-
|
|
28
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); }
|
|
29
|
-
|
|
30
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; }
|
|
31
|
-
|
|
32
19
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
33
|
-
|
|
34
20
|
const ContentContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
35
21
|
displayName: "TermsAndConditions__ContentContainer",
|
|
36
22
|
componentId: "components-web__sc-1199epn-0"
|
|
@@ -47,7 +33,6 @@ const ContentContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
47
33
|
})
|
|
48
34
|
};
|
|
49
35
|
});
|
|
50
|
-
|
|
51
36
|
const Ordered = /*#__PURE__*/(0, _styledComponents.default)(_OrderedListBase.default).withConfig({
|
|
52
37
|
displayName: "TermsAndConditions__Ordered",
|
|
53
38
|
componentId: "components-web__sc-1199epn-1"
|
|
@@ -60,7 +45,6 @@ const Ordered = /*#__PURE__*/(0, _styledComponents.default)(_OrderedListBase.def
|
|
|
60
45
|
padding: tokens.orderedPadding
|
|
61
46
|
};
|
|
62
47
|
});
|
|
63
|
-
|
|
64
48
|
const Unordered = /*#__PURE__*/_styledComponents.default.ul.withConfig({
|
|
65
49
|
displayName: "TermsAndConditions__Unordered",
|
|
66
50
|
componentId: "components-web__sc-1199epn-2"
|
|
@@ -75,7 +59,6 @@ const Unordered = /*#__PURE__*/_styledComponents.default.ul.withConfig({
|
|
|
75
59
|
paddingTop: tokens.unorderedPadding
|
|
76
60
|
};
|
|
77
61
|
});
|
|
78
|
-
|
|
79
62
|
const ListItem = /*#__PURE__*/(0, _styledComponents.default)(_OrderedListBase.default.Item).withConfig({
|
|
80
63
|
displayName: "TermsAndConditions__ListItem",
|
|
81
64
|
componentId: "components-web__sc-1199epn-3"
|
|
@@ -100,7 +83,6 @@ const ListItem = /*#__PURE__*/(0, _styledComponents.default)(_OrderedListBase.de
|
|
|
100
83
|
wordBreak: 'break-word'
|
|
101
84
|
};
|
|
102
85
|
});
|
|
103
|
-
|
|
104
86
|
const NonIndexedContentTitle = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
105
87
|
displayName: "TermsAndConditions__NonIndexedContentTitle",
|
|
106
88
|
componentId: "components-web__sc-1199epn-4"
|
|
@@ -115,6 +97,7 @@ const NonIndexedContentTitle = /*#__PURE__*/_styledComponents.default.div.withCo
|
|
|
115
97
|
paddingLeft: tokens.titlePaddingLeft
|
|
116
98
|
};
|
|
117
99
|
});
|
|
100
|
+
|
|
118
101
|
/**
|
|
119
102
|
* Use `TermsAndConditions` to display important legal content.
|
|
120
103
|
*
|
|
@@ -124,8 +107,6 @@ const NonIndexedContentTitle = /*#__PURE__*/_styledComponents.default.div.withCo
|
|
|
124
107
|
* - Responsive display based on breakpoints
|
|
125
108
|
* - Use `copy` to set language, ‘en’ for English or ‘fr’ for French
|
|
126
109
|
*/
|
|
127
|
-
|
|
128
|
-
|
|
129
110
|
const TermsAndConditions = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
|
|
130
111
|
let {
|
|
131
112
|
copy = 'en',
|
|
@@ -146,7 +127,8 @@ const TermsAndConditions = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
|
|
|
146
127
|
const themeTokens = (0, _componentsBase.useThemeTokens)('TermsAndConditions', tokens, variant, {
|
|
147
128
|
viewport
|
|
148
129
|
});
|
|
149
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
130
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
131
|
+
...selectProps(rest),
|
|
150
132
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
|
|
151
133
|
tokens: {
|
|
152
134
|
color: themeTokens.dividerColor
|
|
@@ -200,16 +182,16 @@ const TermsAndConditions = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
|
|
|
200
182
|
})]
|
|
201
183
|
});
|
|
202
184
|
});
|
|
203
|
-
TermsAndConditions.displayName = 'TermsAndConditions';
|
|
185
|
+
TermsAndConditions.displayName = 'TermsAndConditions';
|
|
204
186
|
|
|
187
|
+
// If a language dictionary entry is provided, it must contain every key
|
|
205
188
|
const dictionaryContentShape = _propTypes.default.shape({
|
|
206
189
|
headingHide: _propTypes.default.string.isRequired,
|
|
207
190
|
headingView: _propTypes.default.string.isRequired,
|
|
208
191
|
nonIndexedTitle: _propTypes.default.string.isRequired
|
|
209
192
|
});
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
193
|
+
TermsAndConditions.propTypes = {
|
|
194
|
+
...selectedSystemPropTypes,
|
|
213
195
|
/**
|
|
214
196
|
* Use the `copy` prop to either select provided English or French copy by passing 'en' or 'fr' respectively.
|
|
215
197
|
*
|
|
@@ -220,26 +202,22 @@ TermsAndConditions.propTypes = { ...selectedSystemPropTypes,
|
|
|
220
202
|
headingHide: _propTypes.default.string,
|
|
221
203
|
nonIndexedTitle: _propTypes.default.string
|
|
222
204
|
})]),
|
|
223
|
-
|
|
224
205
|
/**
|
|
225
206
|
* Sets the tokens for TermsAndConditions element.
|
|
226
207
|
*/
|
|
227
208
|
tokens: (0, _componentsBase.getTokensPropType)('TermsAndConditions'),
|
|
228
|
-
|
|
229
209
|
/**
|
|
230
210
|
* An array of nodes, strings, or a combination to be displayed in an ordered list.
|
|
231
211
|
*
|
|
232
212
|
* Each item in the array must have a corresponding superscript in the page.
|
|
233
213
|
*/
|
|
234
214
|
indexedContent: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.string])),
|
|
235
|
-
|
|
236
215
|
/**
|
|
237
216
|
* An array of nodes, strings, or a combination to be displayed in an unordered list.
|
|
238
217
|
*
|
|
239
218
|
* nonIndexedContent do not have a corresponding superscript and instead apply to the page as a whole.
|
|
240
219
|
*/
|
|
241
220
|
nonIndexedContent: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.string])),
|
|
242
|
-
|
|
243
221
|
/**
|
|
244
222
|
* Custom dictionary containing the labels to use for `TermsAndConditions`
|
|
245
223
|
*/
|
|
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _TermsAndConditions.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _TermsAndConditions = _interopRequireDefault(require("./TermsAndConditions"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
-
|
|
14
10
|
var _componentsBase = require("@telus-uds/components-base");
|
|
15
|
-
|
|
16
11
|
var _Image = _interopRequireDefault(require("../Image"));
|
|
17
|
-
|
|
18
12
|
var _utils = require("../utils");
|
|
19
|
-
|
|
20
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
25
|
-
|
|
26
16
|
const TestimonialContainer = /*#__PURE__*/_styledComponents.default.figure.withConfig({
|
|
27
17
|
displayName: "Testimonial__TestimonialContainer",
|
|
28
18
|
componentId: "components-web__sc-1az53gr-0"
|
|
@@ -37,7 +27,6 @@ const TestimonialContainer = /*#__PURE__*/_styledComponents.default.figure.withC
|
|
|
37
27
|
margin: 0
|
|
38
28
|
};
|
|
39
29
|
});
|
|
40
|
-
|
|
41
30
|
const QuoteContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
42
31
|
displayName: "Testimonial__QuoteContainer",
|
|
43
32
|
componentId: "components-web__sc-1az53gr-1"
|
|
@@ -51,7 +40,6 @@ const QuoteContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
51
40
|
gap: quoteContainerGap
|
|
52
41
|
};
|
|
53
42
|
});
|
|
54
|
-
|
|
55
43
|
const Divider = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
56
44
|
displayName: "Testimonial__Divider",
|
|
57
45
|
componentId: "components-web__sc-1az53gr-2"
|
|
@@ -66,14 +54,12 @@ const Divider = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
66
54
|
width: '100%'
|
|
67
55
|
};
|
|
68
56
|
});
|
|
69
|
-
|
|
70
57
|
const BlockQuote = /*#__PURE__*/_styledComponents.default.blockquote.withConfig({
|
|
71
58
|
displayName: "Testimonial__BlockQuote",
|
|
72
59
|
componentId: "components-web__sc-1az53gr-3"
|
|
73
60
|
})({
|
|
74
61
|
margin: 0
|
|
75
62
|
});
|
|
76
|
-
|
|
77
63
|
const AuthorInfoContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
78
64
|
displayName: "Testimonial__AuthorInfoContainer",
|
|
79
65
|
componentId: "components-web__sc-1az53gr-4"
|
|
@@ -81,7 +67,6 @@ const AuthorInfoContainer = /*#__PURE__*/_styledComponents.default.div.withConfi
|
|
|
81
67
|
display: 'flex',
|
|
82
68
|
flexDirection: 'column'
|
|
83
69
|
});
|
|
84
|
-
|
|
85
70
|
const Figcaption = /*#__PURE__*/_styledComponents.default.figcaption.withConfig({
|
|
86
71
|
displayName: "Testimonial__Figcaption",
|
|
87
72
|
componentId: "components-web__sc-1az53gr-5"
|
|
@@ -95,7 +80,6 @@ const Figcaption = /*#__PURE__*/_styledComponents.default.figcaption.withConfig(
|
|
|
95
80
|
gap: figcaptionGap
|
|
96
81
|
};
|
|
97
82
|
});
|
|
98
|
-
|
|
99
83
|
const Testimonial = _ref5 => {
|
|
100
84
|
let {
|
|
101
85
|
showDivider,
|
|
@@ -140,13 +124,11 @@ const Testimonial = _ref5 => {
|
|
|
140
124
|
} = (0, _componentsBase.useThemeTokens)('Testimonial', tokens, variant, {
|
|
141
125
|
viewport
|
|
142
126
|
});
|
|
143
|
-
|
|
144
127
|
const getQuoteTestimonial = open => {
|
|
145
128
|
let quote = '';
|
|
146
129
|
if (copy === 'en') quote = open ? '\u201C' : '\u201D';else quote = open ? '\u00AB ' : ' \u00BB';
|
|
147
130
|
return quote;
|
|
148
131
|
};
|
|
149
|
-
|
|
150
132
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TestimonialContainer, {
|
|
151
133
|
testimonialContainerGap: testimonialContainerGap,
|
|
152
134
|
...selectProps(rest),
|
|
@@ -221,30 +203,25 @@ const Testimonial = _ref5 => {
|
|
|
221
203
|
})]
|
|
222
204
|
});
|
|
223
205
|
};
|
|
224
|
-
|
|
225
|
-
|
|
206
|
+
Testimonial.propTypes = {
|
|
207
|
+
...selectedSystemPropTypes,
|
|
226
208
|
tokens: (0, _componentsBase.getTokensPropType)('Testimonial'),
|
|
227
|
-
|
|
228
209
|
/**
|
|
229
210
|
* Testimonial content
|
|
230
211
|
*/
|
|
231
212
|
testimonial: _propTypes.default.string.isRequired,
|
|
232
|
-
|
|
233
213
|
/**
|
|
234
214
|
* Testimonial author or source
|
|
235
215
|
*/
|
|
236
216
|
title: _propTypes.default.string,
|
|
237
|
-
|
|
238
217
|
/**
|
|
239
218
|
* Additional information on the author or source
|
|
240
219
|
*/
|
|
241
220
|
additionalInfo: _propTypes.default.string,
|
|
242
|
-
|
|
243
221
|
/**
|
|
244
222
|
* Testimonial style
|
|
245
223
|
*/
|
|
246
224
|
testimonialStyle: _propTypes.default.oneOf(['large', 'heading']),
|
|
247
|
-
|
|
248
225
|
/**
|
|
249
226
|
* Whether to show or not dividers at the top and the bottom of the testimonial
|
|
250
227
|
showDivider: PropTypes.bool,
|
|
@@ -252,7 +229,6 @@ Testimonial.propTypes = { ...selectedSystemPropTypes,
|
|
|
252
229
|
* The src attribute for the Image component or custom JSX content to render instead
|
|
253
230
|
*/
|
|
254
231
|
image: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
|
|
255
|
-
|
|
256
232
|
/**
|
|
257
233
|
* The src attribute for the `Image` component to be displayed on the testimonial
|
|
258
234
|
* @deprecated please use the `image` prop instead
|
package/lib/Testimonial/index.js
CHANGED
|
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Testimonial = _interopRequireDefault(require("./Testimonial"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = _Testimonial.default;
|
|
13
10
|
exports.default = _default;
|
package/lib/Toast/Toast.js
CHANGED
|
@@ -4,38 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _componentsBase = require("@telus-uds/components-base");
|
|
13
|
-
|
|
14
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
15
|
-
|
|
16
11
|
var _utils = require("../utils");
|
|
17
|
-
|
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
13
|
var _withLinkRouter$propT, _withLinkRouter$propT2;
|
|
21
|
-
|
|
22
14
|
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); }
|
|
23
|
-
|
|
24
15
|
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; }
|
|
25
|
-
|
|
26
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
-
|
|
28
17
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
29
|
-
|
|
30
18
|
const transform = property => (from, to) => (0, _styledComponents.keyframes)(["from{", ":", ";}to{", ":", ";}"], property, from, property, to);
|
|
31
|
-
|
|
32
19
|
const slideDown = property => function (from, to) {
|
|
33
20
|
let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : to;
|
|
34
21
|
return (0, _styledComponents.keyframes)(["0%{", ":", ";}99%{", ":", ";}100%{", ":", ";}"], property, from, property, to, property, end);
|
|
35
22
|
};
|
|
36
|
-
|
|
37
23
|
const animation = props => (0, _styledComponents.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));
|
|
38
|
-
|
|
39
24
|
const ToastContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
40
25
|
displayName: "Toast__ToastContainer",
|
|
41
26
|
componentId: "components-web__sc-p78jdh-0"
|
|
@@ -60,7 +45,6 @@ const ToastContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
60
45
|
} = _ref4;
|
|
61
46
|
return containerGap;
|
|
62
47
|
}, animation);
|
|
63
|
-
|
|
64
48
|
const Toast = _ref5 => {
|
|
65
49
|
let {
|
|
66
50
|
toast,
|
|
@@ -90,8 +74,9 @@ const Toast = _ref5 => {
|
|
|
90
74
|
...extraTokens
|
|
91
75
|
} = (0, _componentsBase.useThemeTokens)('Toast', tokens, variant, {
|
|
92
76
|
viewport
|
|
93
|
-
});
|
|
77
|
+
});
|
|
94
78
|
|
|
79
|
+
// inherit ChevronLink tokens for animation colors
|
|
95
80
|
const {
|
|
96
81
|
color: chevronDefaultColor
|
|
97
82
|
} = (0, _componentsBase.useThemeTokens)('ChevronLink', {}, {});
|
|
@@ -100,11 +85,9 @@ const Toast = _ref5 => {
|
|
|
100
85
|
} = (0, _componentsBase.useThemeTokens)('ChevronLink', {}, {
|
|
101
86
|
inverse: true
|
|
102
87
|
});
|
|
103
|
-
|
|
104
88
|
if (!toast) {
|
|
105
89
|
return null;
|
|
106
90
|
}
|
|
107
|
-
|
|
108
91
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ToastContainer, {
|
|
109
92
|
containerBackgroundColor: containerBackgroundColor,
|
|
110
93
|
containerGap: containerGap,
|
|
@@ -153,25 +136,21 @@ const Toast = _ref5 => {
|
|
|
153
136
|
})]
|
|
154
137
|
});
|
|
155
138
|
};
|
|
156
|
-
|
|
157
|
-
|
|
139
|
+
Toast.propTypes = {
|
|
140
|
+
...selectedSystemPropTypes,
|
|
158
141
|
tokens: (0, _componentsBase.getTokensPropType)('Toast'),
|
|
159
|
-
|
|
160
142
|
/**
|
|
161
143
|
* If true, the toast will be displayed
|
|
162
144
|
*/
|
|
163
145
|
toast: _propTypes.default.bool,
|
|
164
|
-
|
|
165
146
|
/**
|
|
166
147
|
* The copy to display in the toast
|
|
167
148
|
*/
|
|
168
149
|
copy: _propTypes.default.string.isRequired,
|
|
169
|
-
|
|
170
150
|
/**
|
|
171
151
|
* The headline to display in the toast (before copy)
|
|
172
152
|
*/
|
|
173
153
|
headline: _propTypes.default.string,
|
|
174
|
-
|
|
175
154
|
/**
|
|
176
155
|
* The link to display in the toast (after copy)
|
|
177
156
|
*/
|
package/lib/Toast/index.js
CHANGED
|
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Toast = _interopRequireDefault(require("./Toast"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = _Toast.default;
|
|
13
10
|
exports.default = _default;
|
|
@@ -4,37 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
-
|
|
14
10
|
var _componentsBase = require("@telus-uds/components-base");
|
|
15
|
-
|
|
16
11
|
var _VideoProgressBar = _interopRequireDefault(require("./Controls/VideoProgressBar/VideoProgressBar"));
|
|
17
|
-
|
|
18
12
|
var _VolumeSlider = _interopRequireDefault(require("./Controls/VolumeSlider/VolumeSlider"));
|
|
19
|
-
|
|
20
13
|
var _VideoButton = _interopRequireDefault(require("./Controls/VideoButton/VideoButton"));
|
|
21
|
-
|
|
22
14
|
var _VideoMenu = _interopRequireDefault(require("./Controls/VideoMenu/VideoMenu"));
|
|
23
|
-
|
|
24
15
|
var _videoText = _interopRequireDefault(require("../videoText"));
|
|
25
|
-
|
|
26
16
|
var _utils = require("../../utils");
|
|
27
|
-
|
|
28
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
|
-
|
|
30
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
19
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
33
|
-
|
|
34
20
|
const getIcon = icon => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Icon, {
|
|
35
21
|
icon: icon
|
|
36
22
|
});
|
|
37
|
-
|
|
38
23
|
const ControlBarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
39
24
|
displayName: "ControlBar__ControlBarContainer",
|
|
40
25
|
componentId: "components-web__sc-13y61ky-0"
|
|
@@ -51,7 +36,6 @@ const ControlBarContainer = /*#__PURE__*/_styledComponents.default.div.withConfi
|
|
|
51
36
|
display: isMobile ? 'none' : undefined
|
|
52
37
|
};
|
|
53
38
|
});
|
|
54
|
-
|
|
55
39
|
const StyledControlBar = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
56
40
|
displayName: "ControlBar__StyledControlBar",
|
|
57
41
|
componentId: "components-web__sc-13y61ky-1"
|
|
@@ -75,7 +59,6 @@ const StyledControlBar = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
75
59
|
zIndex: 9
|
|
76
60
|
};
|
|
77
61
|
});
|
|
78
|
-
|
|
79
62
|
const VideoProgressBarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
80
63
|
displayName: "ControlBar__VideoProgressBarContainer",
|
|
81
64
|
componentId: "components-web__sc-13y61ky-2"
|
|
@@ -83,7 +66,6 @@ const VideoProgressBarContainer = /*#__PURE__*/_styledComponents.default.div.wit
|
|
|
83
66
|
display: 'flex',
|
|
84
67
|
flexGrow: 1
|
|
85
68
|
});
|
|
86
|
-
|
|
87
69
|
const MenuContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
88
70
|
displayName: "ControlBar__MenuContainer",
|
|
89
71
|
componentId: "components-web__sc-13y61ky-3"
|
|
@@ -102,7 +84,6 @@ const MenuContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
102
84
|
marginLeft: menuMarginLeft
|
|
103
85
|
};
|
|
104
86
|
});
|
|
105
|
-
|
|
106
87
|
const ControlBar = _ref4 => {
|
|
107
88
|
let {
|
|
108
89
|
videoPlayer,
|
|
@@ -159,7 +140,6 @@ const ControlBar = _ref4 => {
|
|
|
159
140
|
} = (0, _componentsBase.useThemeTokens)('VideoControlBar', tokens, variant, {
|
|
160
141
|
viewport
|
|
161
142
|
});
|
|
162
|
-
|
|
163
143
|
const parseVideoQuality = () => {
|
|
164
144
|
return sources.map(source => {
|
|
165
145
|
if (!source.isFallback) {
|
|
@@ -168,11 +148,9 @@ const ControlBar = _ref4 => {
|
|
|
168
148
|
value: source.qualityRank
|
|
169
149
|
};
|
|
170
150
|
}
|
|
171
|
-
|
|
172
151
|
return {};
|
|
173
152
|
});
|
|
174
153
|
};
|
|
175
|
-
|
|
176
154
|
const parseTracks = () => {
|
|
177
155
|
const parsed = tracks.map((track, trackNumber) => {
|
|
178
156
|
return {
|
|
@@ -186,7 +164,6 @@ const ControlBar = _ref4 => {
|
|
|
186
164
|
});
|
|
187
165
|
return parsed;
|
|
188
166
|
};
|
|
189
|
-
|
|
190
167
|
const menuContainerStyleProps = {
|
|
191
168
|
menuBottom,
|
|
192
169
|
menuRight,
|
|
@@ -278,8 +255,8 @@ const ControlBar = _ref4 => {
|
|
|
278
255
|
})
|
|
279
256
|
});
|
|
280
257
|
};
|
|
281
|
-
|
|
282
|
-
|
|
258
|
+
ControlBar.propTypes = {
|
|
259
|
+
...selectedSystemPropTypes,
|
|
283
260
|
videoPlayer: _propTypes.default.object.isRequired,
|
|
284
261
|
videoPlayerContainer: _propTypes.default.object.isRequired,
|
|
285
262
|
sources: _propTypes.default.array.isRequired,
|