@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
|
@@ -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 = _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 _utils = require("../../../../utils");
|
|
17
|
-
|
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
23
|
-
|
|
24
15
|
const StyledButton = /*#__PURE__*/_styledComponents.default.button.withConfig({
|
|
25
16
|
displayName: "VideoButton__StyledButton",
|
|
26
17
|
componentId: "components-web__sc-kfw0tr-0"
|
|
@@ -40,7 +31,6 @@ const StyledButton = /*#__PURE__*/_styledComponents.default.button.withConfig({
|
|
|
40
31
|
}
|
|
41
32
|
};
|
|
42
33
|
});
|
|
43
|
-
|
|
44
34
|
const VideoButton = _ref2 => {
|
|
45
35
|
let {
|
|
46
36
|
icon,
|
|
@@ -54,22 +44,19 @@ const VideoButton = _ref2 => {
|
|
|
54
44
|
const {
|
|
55
45
|
color
|
|
56
46
|
} = (0, _componentsBase.useThemeTokens)('VideoButton', tokens, variant);
|
|
57
|
-
|
|
58
47
|
const handleOnKeyDown = event => {
|
|
59
|
-
const key = event.key || event.keyCode;
|
|
48
|
+
const key = event.key || event.keyCode;
|
|
60
49
|
|
|
50
|
+
// Disables playing by space bar, as that can be used to click a button
|
|
61
51
|
if (key === ' ' || key === 32) {
|
|
62
52
|
event.stopPropagation();
|
|
63
53
|
}
|
|
64
54
|
};
|
|
65
|
-
|
|
66
55
|
const handleClick = event => {
|
|
67
56
|
var _rest$onClick;
|
|
68
|
-
|
|
69
57
|
event.preventDefault();
|
|
70
58
|
(_rest$onClick = rest.onClick) === null || _rest$onClick === void 0 ? void 0 : _rest$onClick.call(rest, event);
|
|
71
59
|
};
|
|
72
|
-
|
|
73
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledButton, {
|
|
74
61
|
"aria-label": label,
|
|
75
62
|
onKeyDown: handleOnKeyDown,
|
|
@@ -80,8 +67,8 @@ const VideoButton = _ref2 => {
|
|
|
80
67
|
children: [icon, children]
|
|
81
68
|
});
|
|
82
69
|
};
|
|
83
|
-
|
|
84
|
-
|
|
70
|
+
VideoButton.propTypes = {
|
|
71
|
+
...selectedSystemPropTypes,
|
|
85
72
|
icon: _propTypes.default.element.isRequired,
|
|
86
73
|
label: _propTypes.default.string.isRequired,
|
|
87
74
|
disableFocus: _propTypes.default.bool.isRequired,
|
|
@@ -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 _videoText = _interopRequireDefault(require("../../../videoText"));
|
|
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 MenuContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
27
17
|
displayName: "VideoMenu__MenuContainer",
|
|
28
18
|
componentId: "components-web__sc-nllbhw-0"
|
|
@@ -38,7 +28,6 @@ const MenuContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
38
28
|
borderRadius: 5
|
|
39
29
|
};
|
|
40
30
|
});
|
|
41
|
-
|
|
42
31
|
const MenuButton = /*#__PURE__*/_styledComponents.default.button.withConfig({
|
|
43
32
|
displayName: "VideoMenu__MenuButton",
|
|
44
33
|
componentId: "components-web__sc-nllbhw-1"
|
|
@@ -52,7 +41,6 @@ const MenuButton = /*#__PURE__*/_styledComponents.default.button.withConfig({
|
|
|
52
41
|
justifyContent: 'space-between',
|
|
53
42
|
verticalAlign: 'middle'
|
|
54
43
|
});
|
|
55
|
-
|
|
56
44
|
const CheckmarkContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
57
45
|
displayName: "VideoMenu__CheckmarkContainer",
|
|
58
46
|
componentId: "components-web__sc-nllbhw-2"
|
|
@@ -82,7 +70,6 @@ const CheckmarkContainer = /*#__PURE__*/_styledComponents.default.div.withConfig
|
|
|
82
70
|
}
|
|
83
71
|
};
|
|
84
72
|
});
|
|
85
|
-
|
|
86
73
|
const VideoMenu = _ref3 => {
|
|
87
74
|
let {
|
|
88
75
|
menuLabel,
|
|
@@ -105,7 +92,6 @@ const VideoMenu = _ref3 => {
|
|
|
105
92
|
checkMarkUnselectedColor,
|
|
106
93
|
checkMarkIcon
|
|
107
94
|
} = (0, _componentsBase.useThemeTokens)('VideoMenu', tokens, variant);
|
|
108
|
-
|
|
109
95
|
const getMenuItems = () => {
|
|
110
96
|
return menuOptions.map(option => {
|
|
111
97
|
if (option.name) {
|
|
@@ -140,19 +126,17 @@ const VideoMenu = _ref3 => {
|
|
|
140
126
|
})]
|
|
141
127
|
}, option.value);
|
|
142
128
|
}
|
|
143
|
-
|
|
144
129
|
return null;
|
|
145
130
|
});
|
|
146
131
|
};
|
|
147
|
-
|
|
148
132
|
const handleOnKeyDown = event => {
|
|
149
|
-
const key = event.key || event.keyCode;
|
|
133
|
+
const key = event.key || event.keyCode;
|
|
150
134
|
|
|
135
|
+
// Disables playing by space bar, as that can be used to click a button
|
|
151
136
|
if (key === ' ' || key === 32) {
|
|
152
137
|
event.stopPropagation();
|
|
153
138
|
}
|
|
154
139
|
};
|
|
155
|
-
|
|
156
140
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuContainer, {
|
|
157
141
|
onKeyDown: handleOnKeyDown,
|
|
158
142
|
padding: padding,
|
|
@@ -174,8 +158,8 @@ const VideoMenu = _ref3 => {
|
|
|
174
158
|
})
|
|
175
159
|
});
|
|
176
160
|
};
|
|
177
|
-
|
|
178
|
-
|
|
161
|
+
VideoMenu.propTypes = {
|
|
162
|
+
...selectedSystemPropTypes,
|
|
179
163
|
menuLabel: _propTypes.default.string.isRequired,
|
|
180
164
|
menuOptions: _propTypes.default.array.isRequired,
|
|
181
165
|
setSelection: _propTypes.default.func.isRequired,
|
|
@@ -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 _videoText = _interopRequireDefault(require("../../../videoText"));
|
|
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 ProgressBarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
27
17
|
displayName: "VideoProgressBar__ProgressBarContainer",
|
|
28
18
|
componentId: "components-web__sc-d9tm07-0"
|
|
@@ -31,7 +21,6 @@ const ProgressBarContainer = /*#__PURE__*/_styledComponents.default.div.withConf
|
|
|
31
21
|
width: '100%',
|
|
32
22
|
alignItems: 'center'
|
|
33
23
|
});
|
|
34
|
-
|
|
35
24
|
const sharedStyles = _ref => {
|
|
36
25
|
let {
|
|
37
26
|
thumbHeight,
|
|
@@ -59,7 +48,6 @@ const sharedStyles = _ref => {
|
|
|
59
48
|
cursor: 'pointer',
|
|
60
49
|
borderRadius: 1.3,
|
|
61
50
|
background: `linear-gradient(to right, ${trackGradientStart} 0%,${trackGradientEnd} ${videoBufferDisplay - 0.01}% ,rgba(255,255,255,0.5) ${videoBufferDisplay}%)` // TODO: replace with opaque white from palette
|
|
62
|
-
|
|
63
51
|
})
|
|
64
52
|
};
|
|
65
53
|
};
|
|
@@ -93,16 +81,19 @@ const StyledProgressBar = /*#__PURE__*/_styledComponents.default.input.attrs(_re
|
|
|
93
81
|
outline: 'none'
|
|
94
82
|
},
|
|
95
83
|
'input[type=range]&::-webkit-slider-thumb': sharedStyles(sharedProps).thumb,
|
|
96
|
-
'input[type=range]&::-moz-range-thumb': {
|
|
84
|
+
'input[type=range]&::-moz-range-thumb': {
|
|
85
|
+
...sharedStyles(sharedProps).thumb,
|
|
97
86
|
border: 'none'
|
|
98
87
|
},
|
|
99
|
-
'input[type=range]&::-ms-thumb': {
|
|
88
|
+
'input[type=range]&::-ms-thumb': {
|
|
89
|
+
...sharedStyles(sharedProps).thumb,
|
|
100
90
|
margin: 0,
|
|
101
91
|
border: 'none'
|
|
102
92
|
},
|
|
103
93
|
'input[type=range]&::-webkit-slider-runnable-track': sharedStyles(sharedProps).track(videoBufferDisplay),
|
|
104
94
|
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track(videoBufferDisplay),
|
|
105
|
-
'input[type=range]&::-ms-track': {
|
|
95
|
+
'input[type=range]&::-ms-track': {
|
|
96
|
+
...sharedStyles(sharedProps).track(videoBufferDisplay),
|
|
106
97
|
margin: '6px 0',
|
|
107
98
|
border: 'none'
|
|
108
99
|
},
|
|
@@ -114,7 +105,6 @@ const StyledProgressBar = /*#__PURE__*/_styledComponents.default.input.attrs(_re
|
|
|
114
105
|
}
|
|
115
106
|
};
|
|
116
107
|
});
|
|
117
|
-
|
|
118
108
|
const StyledTimestamp = /*#__PURE__*/_styledComponents.default.span.withConfig({
|
|
119
109
|
displayName: "VideoProgressBar__StyledTimestamp",
|
|
120
110
|
componentId: "components-web__sc-d9tm07-2"
|
|
@@ -125,15 +115,13 @@ const StyledTimestamp = /*#__PURE__*/_styledComponents.default.span.withConfig({
|
|
|
125
115
|
return {
|
|
126
116
|
margin
|
|
127
117
|
};
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
});
|
|
119
|
+
// TODO: unify with the helper from `VideoSplash`
|
|
131
120
|
function getTimestamp(duration) {
|
|
132
121
|
const minutes = Math.floor(duration / 60);
|
|
133
122
|
const seconds = Math.floor(duration - 60 * minutes);
|
|
134
123
|
return `${minutes}:${seconds < 10 ? 0 : ''}${seconds}`;
|
|
135
124
|
}
|
|
136
|
-
|
|
137
125
|
const VideoProgressBar = _ref5 => {
|
|
138
126
|
let {
|
|
139
127
|
copy = 'en',
|
|
@@ -159,13 +147,10 @@ const VideoProgressBar = _ref5 => {
|
|
|
159
147
|
} = (0, _componentsBase.useThemeTokens)('VideoProgressBar', tokens, variant, {
|
|
160
148
|
playing
|
|
161
149
|
});
|
|
162
|
-
|
|
163
150
|
const videoProgressBar = /*#__PURE__*/_react.default.createRef();
|
|
164
|
-
|
|
165
151
|
const handleVideoSkip = () => {
|
|
166
152
|
setSeek(videoProgressBar.current.value);
|
|
167
153
|
};
|
|
168
|
-
|
|
169
154
|
const videoBufferDisplay = videoBufferEnd / videoLength * 100;
|
|
170
155
|
const isVideoUnplayed = videoCurrentTime === -1;
|
|
171
156
|
const currentTime = isVideoUnplayed ? 0 : videoCurrentTime;
|
|
@@ -180,7 +165,8 @@ const VideoProgressBar = _ref5 => {
|
|
|
180
165
|
trackGradientEnd,
|
|
181
166
|
rangeBackground
|
|
182
167
|
};
|
|
183
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ProgressBarContainer, {
|
|
168
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ProgressBarContainer, {
|
|
169
|
+
...selectProps(rest),
|
|
184
170
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTimestamp, {
|
|
185
171
|
margin: `0 ${timestampMarginRight}px 0 ${timestampMarginLeft}px`,
|
|
186
172
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
@@ -211,8 +197,8 @@ const VideoProgressBar = _ref5 => {
|
|
|
211
197
|
})]
|
|
212
198
|
});
|
|
213
199
|
};
|
|
214
|
-
|
|
215
|
-
|
|
200
|
+
VideoProgressBar.propTypes = {
|
|
201
|
+
...selectedSystemPropTypes,
|
|
216
202
|
copy: _propTypes.default.oneOf(['en', 'fr']),
|
|
217
203
|
videoLength: _propTypes.default.number.isRequired,
|
|
218
204
|
videoCurrentTime: _propTypes.default.number.isRequired,
|
|
@@ -4,27 +4,16 @@ 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 _VideoButton = _interopRequireDefault(require("../VideoButton/VideoButton"));
|
|
17
|
-
|
|
18
12
|
var _videoText = _interopRequireDefault(require("../../../videoText"));
|
|
19
|
-
|
|
20
13
|
var _utils = require("../../../../utils");
|
|
21
|
-
|
|
22
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
16
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
27
|
-
|
|
28
17
|
const VolumeSliderContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
29
18
|
displayName: "VolumeSlider__VolumeSliderContainer",
|
|
30
19
|
componentId: "components-web__sc-apixz4-0"
|
|
@@ -42,7 +31,6 @@ const VolumeSliderContainer = /*#__PURE__*/_styledComponents.default.div.withCon
|
|
|
42
31
|
alignItems: 'center'
|
|
43
32
|
};
|
|
44
33
|
});
|
|
45
|
-
|
|
46
34
|
const sharedStyles = _ref2 => {
|
|
47
35
|
let {
|
|
48
36
|
thumbHeight,
|
|
@@ -73,7 +61,6 @@ const sharedStyles = _ref2 => {
|
|
|
73
61
|
})
|
|
74
62
|
};
|
|
75
63
|
};
|
|
76
|
-
|
|
77
64
|
const StyledVolumeSlider = /*#__PURE__*/_styledComponents.default.input.attrs(_ref3 => {
|
|
78
65
|
let {
|
|
79
66
|
videoCurrentVolume
|
|
@@ -103,16 +90,19 @@ const StyledVolumeSlider = /*#__PURE__*/_styledComponents.default.input.attrs(_r
|
|
|
103
90
|
outline: 'none'
|
|
104
91
|
},
|
|
105
92
|
'input[type=range]&::-webkit-slider-thumb': sharedStyles(sharedProps).thumb,
|
|
106
|
-
'input[type=range]&::-moz-range-thumb': {
|
|
93
|
+
'input[type=range]&::-moz-range-thumb': {
|
|
94
|
+
...sharedStyles.thumb,
|
|
107
95
|
border: 'none'
|
|
108
96
|
},
|
|
109
|
-
'input[type=range]&::-ms-thumb': {
|
|
97
|
+
'input[type=range]&::-ms-thumb': {
|
|
98
|
+
...sharedStyles.thumb,
|
|
110
99
|
margin: 0,
|
|
111
100
|
border: 'none'
|
|
112
101
|
},
|
|
113
102
|
'input[type=range]&::-webkit-slider-runnable-track': sharedStyles(sharedProps).track(videoCurrentVolume),
|
|
114
103
|
'input[type=range]&::-moz-range-track': sharedStyles(sharedProps).track(videoCurrentVolume),
|
|
115
|
-
'input[type=range]&::-ms-track': {
|
|
104
|
+
'input[type=range]&::-ms-track': {
|
|
105
|
+
...sharedStyles(sharedProps).track(videoCurrentVolume),
|
|
116
106
|
margin: '6px 0',
|
|
117
107
|
border: 'none'
|
|
118
108
|
},
|
|
@@ -124,7 +114,6 @@ const StyledVolumeSlider = /*#__PURE__*/_styledComponents.default.input.attrs(_r
|
|
|
124
114
|
}
|
|
125
115
|
};
|
|
126
116
|
});
|
|
127
|
-
|
|
128
117
|
const VolumeSlider = _ref5 => {
|
|
129
118
|
let {
|
|
130
119
|
setVolume,
|
|
@@ -140,9 +129,7 @@ const VolumeSlider = _ref5 => {
|
|
|
140
129
|
variant,
|
|
141
130
|
...rest
|
|
142
131
|
} = _ref5;
|
|
143
|
-
|
|
144
132
|
const refVolumeSlider = _react.default.useRef();
|
|
145
|
-
|
|
146
133
|
const {
|
|
147
134
|
marginLeft,
|
|
148
135
|
marginRight,
|
|
@@ -163,9 +150,7 @@ const VolumeSlider = _ref5 => {
|
|
|
163
150
|
trackGradientEnd,
|
|
164
151
|
rangeBackground
|
|
165
152
|
};
|
|
166
|
-
|
|
167
153
|
const handleVolumeChange = () => setVolume(refVolumeSlider.current.value);
|
|
168
|
-
|
|
169
154
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(VolumeSliderContainer, {
|
|
170
155
|
compactModeThreshold: compactModeThreshold,
|
|
171
156
|
videoPlayerWidth: videoPlayerWidth,
|
|
@@ -197,8 +182,8 @@ const VolumeSlider = _ref5 => {
|
|
|
197
182
|
})]
|
|
198
183
|
});
|
|
199
184
|
};
|
|
200
|
-
|
|
201
|
-
|
|
185
|
+
VolumeSlider.propTypes = {
|
|
186
|
+
...selectedSystemPropTypes,
|
|
202
187
|
videoCurrentVolume: _propTypes.default.number.isRequired,
|
|
203
188
|
setVolume: _propTypes.default.func.isRequired,
|
|
204
189
|
videoIsMuted: _propTypes.default.bool.isRequired,
|
|
@@ -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 = _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 _utils = require("../../utils");
|
|
17
|
-
|
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
23
|
-
|
|
24
15
|
const StyledMiddleControlButton = /*#__PURE__*/_styledComponents.default.button.withConfig({
|
|
25
16
|
displayName: "MiddleControlButton__StyledMiddleControlButton",
|
|
26
17
|
componentId: "components-web__sc-1um2s37-0"
|
|
@@ -47,7 +38,6 @@ const StyledMiddleControlButton = /*#__PURE__*/_styledComponents.default.button.
|
|
|
47
38
|
alignItems: 'center'
|
|
48
39
|
};
|
|
49
40
|
});
|
|
50
|
-
|
|
51
41
|
const MiddleControlButton = _ref2 => {
|
|
52
42
|
let {
|
|
53
43
|
icon: Icon,
|
|
@@ -78,8 +68,8 @@ const MiddleControlButton = _ref2 => {
|
|
|
78
68
|
})
|
|
79
69
|
});
|
|
80
70
|
};
|
|
81
|
-
|
|
82
|
-
|
|
71
|
+
MiddleControlButton.propTypes = {
|
|
72
|
+
...selectedSystemPropTypes,
|
|
83
73
|
icon: _propTypes.default.elementType.isRequired,
|
|
84
74
|
isHidden: _propTypes.default.bool,
|
|
85
75
|
onClick: _propTypes.default.func,
|