@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
|
@@ -11,7 +11,6 @@ import { htmlAttrs } from '../utils';
|
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
14
|
-
|
|
15
14
|
const framedContainerStyles = _ref => {
|
|
16
15
|
let {
|
|
17
16
|
framedContainerBackgroundColor,
|
|
@@ -22,7 +21,6 @@ const framedContainerStyles = _ref => {
|
|
|
22
21
|
} = _ref;
|
|
23
22
|
return css(["background-color:", ";border:", "px solid ", ";border-radius:", "px;& > div{max-height:", "px;}"], framedContainerBackgroundColor, framedContainerBorderWidth, framedContainerBorderColor, framedContainerBorderRadius, framedMaxHeight);
|
|
24
23
|
};
|
|
25
|
-
|
|
26
24
|
const VideoPickerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
27
25
|
displayName: "VideoPicker__VideoPickerContainer",
|
|
28
26
|
componentId: "components-web__sc-x6lxp0-0"
|
|
@@ -33,7 +31,6 @@ const VideoPickerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
33
31
|
} = _ref2;
|
|
34
32
|
return isFramed && framedContainerStyles(tokens);
|
|
35
33
|
});
|
|
36
|
-
|
|
37
34
|
const framedPlayerContainerStyles = _ref3 => {
|
|
38
35
|
let {
|
|
39
36
|
framedMaxHeight,
|
|
@@ -41,7 +38,6 @@ const framedPlayerContainerStyles = _ref3 => {
|
|
|
41
38
|
} = _ref3;
|
|
42
39
|
return css(["width:66.67%;padding:", "px;max-height:", "px;flex-shrink:0;box-sizing:border-box;"], framedContainerPadding, framedMaxHeight);
|
|
43
40
|
};
|
|
44
|
-
|
|
45
41
|
const VideoPlayerContainer = /*#__PURE__*/styled.div.withConfig({
|
|
46
42
|
displayName: "VideoPicker__VideoPlayerContainer",
|
|
47
43
|
componentId: "components-web__sc-x6lxp0-1"
|
|
@@ -62,10 +58,8 @@ const VideoListContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
62
58
|
displayName: "VideoPicker__VideoListContainer",
|
|
63
59
|
componentId: "components-web__sc-x6lxp0-2"
|
|
64
60
|
})(["display:flex;justify-content:flex-start;position:relative;flex-grow:1;flex-direction:column;", ""], props => props.isFramed && framedVideoListContainerStyle);
|
|
65
|
-
|
|
66
61
|
const VideoPicker = _ref6 => {
|
|
67
62
|
var _videoList$;
|
|
68
|
-
|
|
69
63
|
let {
|
|
70
64
|
videoList = [],
|
|
71
65
|
selectedVideo = (_videoList$ = videoList[0]) === null || _videoList$ === void 0 ? void 0 : _videoList$.videoId,
|
|
@@ -85,8 +79,9 @@ const VideoPicker = _ref6 => {
|
|
|
85
79
|
useEffect(() => {
|
|
86
80
|
// Update current video if parent changes which video id it passes down
|
|
87
81
|
setCurrentVideoId(selectedVideo);
|
|
88
|
-
}, [selectedVideo]);
|
|
82
|
+
}, [selectedVideo]);
|
|
89
83
|
|
|
84
|
+
// `frame` variant should only work on larger screens
|
|
90
85
|
const isFramed = frame && [viewports.lg, viewports.xl].includes(viewport);
|
|
91
86
|
const hasSlider = !frame && [viewports.md, viewports.lg, viewports.xl].includes(viewport);
|
|
92
87
|
const listElements = videoList.map((video, index) => /*#__PURE__*/_jsx(VideoPickerThumbnail, {
|
|
@@ -118,7 +113,8 @@ const VideoPicker = _ref6 => {
|
|
|
118
113
|
space: isFramed ? 0 : 4 // everything has internal padding in `frame` variant
|
|
119
114
|
,
|
|
120
115
|
direction: isFramed ? 'row' : 'column',
|
|
121
|
-
children: [/*#__PURE__*/_jsx(VideoPlayerContainer, {
|
|
116
|
+
children: [/*#__PURE__*/_jsx(VideoPlayerContainer, {
|
|
117
|
+
...themeTokens,
|
|
122
118
|
isFramed: isFramed,
|
|
123
119
|
children: /*#__PURE__*/_jsx(VideoPickerPlayer, {
|
|
124
120
|
video: currentVideo,
|
|
@@ -136,31 +132,26 @@ const VideoPicker = _ref6 => {
|
|
|
136
132
|
})
|
|
137
133
|
});
|
|
138
134
|
};
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
VideoPicker.propTypes = {
|
|
136
|
+
...selectedSystemPropTypes,
|
|
141
137
|
tokens: getTokensPropType('VideoPicker'),
|
|
142
|
-
|
|
143
138
|
/**
|
|
144
139
|
* Id of the currently selected video (defaults to the first video if not set).
|
|
145
140
|
*/
|
|
146
141
|
selectedVideo: PropTypes.string,
|
|
147
|
-
|
|
148
142
|
/**
|
|
149
143
|
* An array of Video objects.
|
|
150
144
|
*/
|
|
151
145
|
videoList: PropTypes.arrayOf(VideoPropType),
|
|
152
|
-
|
|
153
146
|
/**
|
|
154
147
|
* Use to display the picker in a container and the playlist as a sidebar (only available for breakpoints LG and larger)
|
|
155
148
|
*/
|
|
156
149
|
frame: PropTypes.bool,
|
|
157
|
-
|
|
158
150
|
/**
|
|
159
151
|
* Callback function trigerred when the video player starts playing video.
|
|
160
152
|
* @param {object} video - The video object that is playing.
|
|
161
153
|
*/
|
|
162
154
|
onStartVideo: PropTypes.func,
|
|
163
|
-
|
|
164
155
|
/**
|
|
165
156
|
* Callback function trigerred when a video is selected from the thumbnail list.
|
|
166
157
|
* @param {object} video - The video object that is selected.
|
|
@@ -5,7 +5,6 @@ import WebVideo from '../WebVideo/WebVideo';
|
|
|
5
5
|
import { VideoPropType, RefPropType } from './videoPropType';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
8
|
const VideoPickerPlayer = _ref => {
|
|
10
9
|
let {
|
|
11
10
|
video = {},
|
|
@@ -19,7 +18,8 @@ const VideoPickerPlayer = _ref => {
|
|
|
19
18
|
},
|
|
20
19
|
children: [/*#__PURE__*/_jsx("div", {
|
|
21
20
|
ref: videoPlayerRef,
|
|
22
|
-
children: video.videoId && /*#__PURE__*/_jsx(WebVideo, {
|
|
21
|
+
children: video.videoId && /*#__PURE__*/_jsx(WebVideo, {
|
|
22
|
+
...video,
|
|
23
23
|
onStart: () => onStartVideo(video)
|
|
24
24
|
})
|
|
25
25
|
}), /*#__PURE__*/_jsxs(StackView, {
|
|
@@ -38,7 +38,6 @@ const VideoPickerPlayer = _ref => {
|
|
|
38
38
|
})]
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
|
|
42
41
|
VideoPickerPlayer.propTypes = {
|
|
43
42
|
video: VideoPropType,
|
|
44
43
|
videoPlayerRef: RefPropType,
|
|
@@ -13,9 +13,10 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
const {
|
|
14
14
|
getItemPositionLayoutHandler,
|
|
15
15
|
itemPositionsPropType
|
|
16
|
-
} = horizontalScrollUtils;
|
|
17
|
-
// access position in VideoSlider's UDS HorizontalScroll and update its itemPositions
|
|
16
|
+
} = horizontalScrollUtils;
|
|
18
17
|
|
|
18
|
+
// Use a React Native (web) outer container so it can take an onLayout callback, to
|
|
19
|
+
// access position in VideoSlider's UDS HorizontalScroll and update its itemPositions
|
|
19
20
|
const createReactNativeStyles = _ref => {
|
|
20
21
|
let {
|
|
21
22
|
pressablePaddingBottom,
|
|
@@ -41,7 +42,6 @@ const createReactNativeStyles = _ref => {
|
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
};
|
|
44
|
-
|
|
45
45
|
const ImageContainer = /*#__PURE__*/styled.div.withConfig({
|
|
46
46
|
displayName: "VideoPickerThumbnail__ImageContainer",
|
|
47
47
|
componentId: "components-web__sc-1glxurq-0"
|
|
@@ -79,7 +79,6 @@ const ThumbnailTitleContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
79
79
|
displayName: "VideoPickerThumbnail__ThumbnailTitleContainer",
|
|
80
80
|
componentId: "components-web__sc-1glxurq-2"
|
|
81
81
|
})(["display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;"]);
|
|
82
|
-
|
|
83
82
|
const VideoPickerThumbnail = _ref7 => {
|
|
84
83
|
let {
|
|
85
84
|
videoPlayerRef,
|
|
@@ -98,9 +97,9 @@ const VideoPickerThumbnail = _ref7 => {
|
|
|
98
97
|
timestamp
|
|
99
98
|
} = getTimestamp(video.videoLength, video.copy);
|
|
100
99
|
const isPlaying = selectedVideoId === video.videoId;
|
|
101
|
-
|
|
102
100
|
const renderThumbnailImage = themeTokens => {
|
|
103
|
-
return /*#__PURE__*/_jsx(VideoThumbnail, {
|
|
101
|
+
return /*#__PURE__*/_jsx(VideoThumbnail, {
|
|
102
|
+
...themeTokens,
|
|
104
103
|
isPlaying: isPlaying,
|
|
105
104
|
layout: layout,
|
|
106
105
|
children: /*#__PURE__*/_jsx(VideoSplash, {
|
|
@@ -111,7 +110,6 @@ const VideoPickerThumbnail = _ref7 => {
|
|
|
111
110
|
})
|
|
112
111
|
});
|
|
113
112
|
};
|
|
114
|
-
|
|
115
113
|
const renderThumbnailInfo = _ref8 => {
|
|
116
114
|
let {
|
|
117
115
|
titleColor,
|
|
@@ -144,19 +142,15 @@ const VideoPickerThumbnail = _ref7 => {
|
|
|
144
142
|
})]
|
|
145
143
|
});
|
|
146
144
|
};
|
|
147
|
-
|
|
148
145
|
const handleLayout = itemPositions !== undefined ? getItemPositionLayoutHandler(itemPositions.positions, index) : undefined;
|
|
149
|
-
|
|
150
146
|
const onKeyPress = event => {
|
|
151
147
|
if (['Space', 'Enter'].includes(event.key)) {
|
|
152
148
|
var _videoPlayerRef$curre;
|
|
153
|
-
|
|
154
149
|
onSelectVideo(video);
|
|
155
150
|
const splashButton = (_videoPlayerRef$curre = videoPlayerRef.current) === null || _videoPlayerRef$curre === void 0 ? void 0 : _videoPlayerRef$curre.querySelector('button');
|
|
156
151
|
if (splashButton) splashButton.focus();
|
|
157
152
|
}
|
|
158
153
|
};
|
|
159
|
-
|
|
160
154
|
return /*#__PURE__*/_jsx(Pressable, {
|
|
161
155
|
onLayout: handleLayout,
|
|
162
156
|
onPress: () => onSelectVideo(video),
|
|
@@ -200,14 +194,14 @@ const VideoPickerThumbnail = _ref7 => {
|
|
|
200
194
|
return /*#__PURE__*/_jsxs(StackView, {
|
|
201
195
|
space: layout === 'vertical' ? 2 : 3,
|
|
202
196
|
direction: layout === 'vertical' ? 'column' : 'row',
|
|
203
|
-
children: [/*#__PURE__*/_jsx(ImageContainer, {
|
|
197
|
+
children: [/*#__PURE__*/_jsx(ImageContainer, {
|
|
198
|
+
...themeTokens,
|
|
204
199
|
children: renderThumbnailImage(themeTokens)
|
|
205
200
|
}), renderThumbnailInfo(themeTokens)]
|
|
206
201
|
});
|
|
207
202
|
}
|
|
208
203
|
}, video.videoId);
|
|
209
204
|
};
|
|
210
|
-
|
|
211
205
|
VideoPickerThumbnail.propTypes = {
|
|
212
206
|
selectedVideoId: PropTypes.string,
|
|
213
207
|
onSelectVideo: PropTypes.func,
|
|
@@ -6,7 +6,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
const {
|
|
7
7
|
useItemPositions
|
|
8
8
|
} = horizontalScrollUtils;
|
|
9
|
-
|
|
10
9
|
const VideoSlider = _ref => {
|
|
11
10
|
let {
|
|
12
11
|
children
|
|
@@ -18,7 +17,6 @@ const VideoSlider = _ref => {
|
|
|
18
17
|
previousIcon: PreviousIcon,
|
|
19
18
|
nextIcon: NextIcon
|
|
20
19
|
} = useThemeTokens('VideoPickerSlider');
|
|
21
|
-
|
|
22
20
|
const onLayout = _ref2 => {
|
|
23
21
|
let {
|
|
24
22
|
nativeEvent: {
|
|
@@ -29,13 +27,13 @@ const VideoSlider = _ref => {
|
|
|
29
27
|
} = _ref2;
|
|
30
28
|
setContainerWidth(width);
|
|
31
29
|
};
|
|
32
|
-
|
|
33
30
|
const itemsGap = 32; // '5' on spacing scale
|
|
34
|
-
|
|
35
31
|
const itemsCount = viewport === 'lg' || viewport === 'xl' ? 4 : 3;
|
|
36
32
|
const itemGapPortioned = (itemsCount - 1) * itemsGap / itemsCount;
|
|
37
|
-
const itemWidth = containerWidth === null ?
|
|
38
|
-
|
|
33
|
+
const itemWidth = containerWidth === null ?
|
|
34
|
+
// For first render, we don't know container width, so avoid flicker with static % width
|
|
35
|
+
`calc(${Math.round(100 / itemsCount)}% - ${Math.round(itemGapPortioned)}px)` :
|
|
36
|
+
// After first render, can't use % widths because parent is > 100% width horizontal scroll area
|
|
39
37
|
Math.max(containerWidth / itemsCount - itemGapPortioned, 0 // Prevent negative width breaking layout on very narrow containers
|
|
40
38
|
);
|
|
41
39
|
|
|
@@ -52,7 +50,6 @@ const VideoSlider = _ref => {
|
|
|
52
50
|
width: itemWidth
|
|
53
51
|
}))
|
|
54
52
|
});
|
|
55
|
-
|
|
56
53
|
const overflow = containerWidth === null && {
|
|
57
54
|
overflow: 'hidden'
|
|
58
55
|
};
|
|
@@ -67,7 +64,8 @@ const VideoSlider = _ref => {
|
|
|
67
64
|
return /*#__PURE__*/_jsx(View, {
|
|
68
65
|
onLayout: onLayout,
|
|
69
66
|
style: overflow,
|
|
70
|
-
children: containerWidth === null ?
|
|
67
|
+
children: containerWidth === null ?
|
|
68
|
+
// Use a 100% width non-scrollable parent until containerWidth is known, to avoid flicker
|
|
71
69
|
content : /*#__PURE__*/_jsx(HorizontalScroll, {
|
|
72
70
|
ScrollButton: HorizontalScrollButton,
|
|
73
71
|
itemPositions: itemPositions,
|
|
@@ -76,7 +74,6 @@ const VideoSlider = _ref => {
|
|
|
76
74
|
})
|
|
77
75
|
});
|
|
78
76
|
};
|
|
79
|
-
|
|
80
77
|
VideoSlider.propTypes = {
|
|
81
78
|
children: PropTypes.node
|
|
82
79
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import { VideoProps } from '../WebVideo/WebVideo';
|
|
3
|
-
export const VideoPropType = PropTypes.shape({
|
|
3
|
+
export const VideoPropType = PropTypes.shape({
|
|
4
|
+
...VideoProps,
|
|
4
5
|
title: PropTypes.string,
|
|
5
6
|
description: PropTypes.string
|
|
6
7
|
});
|
|
@@ -10,7 +10,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { createElement as _createElement } from "react";
|
|
12
12
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
13
|
-
|
|
14
13
|
const row = (rowSize, rowBorderWidth) => ({
|
|
15
14
|
flexBasis: `calc(100% / ${rowSize})`,
|
|
16
15
|
[`:not(:nth-of-type(${rowSize}n + 1))`]: {
|
|
@@ -20,7 +19,6 @@ const row = (rowSize, rowBorderWidth) => ({
|
|
|
20
19
|
borderTopWidth: `${rowBorderWidth}px`
|
|
21
20
|
}
|
|
22
21
|
});
|
|
23
|
-
|
|
24
22
|
const Container = /*#__PURE__*/styled(OrderedListBase).withConfig({
|
|
25
23
|
displayName: "WaffleGrid__Container",
|
|
26
24
|
componentId: "components-web__sc-ec8g0a-0"
|
|
@@ -67,10 +65,10 @@ const Center = /*#__PURE__*/styled('div').withConfig({
|
|
|
67
65
|
alignItems: 'center',
|
|
68
66
|
textAlign: 'center'
|
|
69
67
|
});
|
|
68
|
+
|
|
70
69
|
/**
|
|
71
70
|
* The WaffleGrid is used to show items in a waffle like manner with borders surrounding the element
|
|
72
71
|
*/
|
|
73
|
-
|
|
74
72
|
const WaffleGrid = _ref2 => {
|
|
75
73
|
let {
|
|
76
74
|
items,
|
|
@@ -86,14 +84,17 @@ const WaffleGrid = _ref2 => {
|
|
|
86
84
|
viewport
|
|
87
85
|
});
|
|
88
86
|
const currentRowSize = useResponsiveProp(rowSize);
|
|
89
|
-
return /*#__PURE__*/_jsx(Container, {
|
|
90
|
-
|
|
87
|
+
return /*#__PURE__*/_jsx(Container, {
|
|
88
|
+
...selectProps(rest),
|
|
89
|
+
children: items.map(child => /*#__PURE__*/_createElement(Item, {
|
|
90
|
+
...themeTokens,
|
|
91
91
|
key: child.href,
|
|
92
92
|
rowSize: rowSize ? currentRowSize : themeTokens.rowSize
|
|
93
93
|
}, /*#__PURE__*/_jsx(Link, {
|
|
94
94
|
href: child.href,
|
|
95
95
|
LinkRouter: child.LinkRouter || LinkRouter,
|
|
96
|
-
linkRouterProps: {
|
|
96
|
+
linkRouterProps: {
|
|
97
|
+
...linkRouterProps,
|
|
97
98
|
...child.linkRouterProps
|
|
98
99
|
},
|
|
99
100
|
children: /*#__PURE__*/_jsxs(Center, {
|
|
@@ -105,7 +106,8 @@ const WaffleGrid = _ref2 => {
|
|
|
105
106
|
alt: child.imageAltText,
|
|
106
107
|
width: 96,
|
|
107
108
|
height: 128
|
|
108
|
-
}) :
|
|
109
|
+
}) :
|
|
110
|
+
// Otherwise it must be an arbitrary content, which we just display by itself
|
|
109
111
|
child.image, /*#__PURE__*/_jsx(Typography, {
|
|
110
112
|
variant: {
|
|
111
113
|
weight: 'semibold'
|
|
@@ -116,9 +118,8 @@ const WaffleGrid = _ref2 => {
|
|
|
116
118
|
})))
|
|
117
119
|
});
|
|
118
120
|
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
WaffleGrid.propTypes = {
|
|
122
|
+
...selectedSystemPropTypes,
|
|
122
123
|
/**
|
|
123
124
|
* The image and the link to display. `items` should be an array of objects with the following keys:
|
|
124
125
|
*/
|
|
@@ -127,30 +128,25 @@ WaffleGrid.propTypes = { ...selectedSystemPropTypes,
|
|
|
127
128
|
* The src attribute for the HTML img element or custom JSX content to render instead
|
|
128
129
|
*/
|
|
129
130
|
image: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
130
|
-
|
|
131
131
|
/**
|
|
132
132
|
* The alt attribute for the HTML img element (note that this is ignored if a custom
|
|
133
133
|
* JSX content is used instead of an image URL)
|
|
134
134
|
*/
|
|
135
135
|
imageAltText: PropTypes.string,
|
|
136
|
-
|
|
137
136
|
/**
|
|
138
137
|
* The text displayed under the image
|
|
139
138
|
*/
|
|
140
139
|
text: PropTypes.string,
|
|
141
|
-
|
|
142
140
|
/**
|
|
143
141
|
* Target URL
|
|
144
142
|
*/
|
|
145
143
|
href: PropTypes.string,
|
|
146
144
|
...withLinkRouter.propTypes
|
|
147
145
|
})).isRequired,
|
|
148
|
-
|
|
149
146
|
/**
|
|
150
147
|
* Sets the tokens for WaffleGrid element.
|
|
151
148
|
*/
|
|
152
149
|
tokens: getTokensPropType('WaffleGrid'),
|
|
153
|
-
|
|
154
150
|
/**
|
|
155
151
|
* Row size, optionally depending on the viewport
|
|
156
152
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* WebPortal component renders its children in a separate portal container appended to the document body.
|
|
5
6
|
*
|
|
@@ -31,5 +32,4 @@ const WebPortal = _ref => {
|
|
|
31
32
|
}, [portalContainer]);
|
|
32
33
|
return /*#__PURE__*/ReactDOM.createPortal(children, portalContainer);
|
|
33
34
|
};
|
|
34
|
-
|
|
35
35
|
export default WebPortal;
|
|
@@ -39,10 +39,10 @@ const aspectRatios = {
|
|
|
39
39
|
const AspectLimiter = /*#__PURE__*/styled.div.withConfig({
|
|
40
40
|
displayName: "WebVideo__AspectLimiter",
|
|
41
41
|
componentId: "components-web__sc-327a6k-2"
|
|
42
|
-
})(props => ({
|
|
42
|
+
})(props => ({
|
|
43
|
+
...aspectRatios[props.aspectRatio],
|
|
43
44
|
position: 'relative'
|
|
44
45
|
}));
|
|
45
|
-
|
|
46
46
|
const WebVideo = _ref => {
|
|
47
47
|
let {
|
|
48
48
|
videoId,
|
|
@@ -56,14 +56,11 @@ const WebVideo = _ref => {
|
|
|
56
56
|
...rest
|
|
57
57
|
} = _ref;
|
|
58
58
|
const [started, setStarted] = useState(false);
|
|
59
|
-
|
|
60
59
|
const initializeYoutubePlayer = event => {
|
|
61
60
|
onStart();
|
|
62
|
-
|
|
63
61
|
if (beginMuted) {
|
|
64
62
|
event.target.mute();
|
|
65
63
|
}
|
|
66
|
-
|
|
67
64
|
event.target.setVolume(defaultVolume);
|
|
68
65
|
event.target.playVideo(); // This plays the video after passing the splash screen on mobile.
|
|
69
66
|
};
|
|
@@ -97,44 +94,36 @@ const WebVideo = _ref => {
|
|
|
97
94
|
})
|
|
98
95
|
});
|
|
99
96
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
export const VideoProps = {
|
|
98
|
+
...selectedSystemPropTypes,
|
|
103
99
|
/**
|
|
104
100
|
* The video's ID, typically available via the video's URL.
|
|
105
101
|
*/
|
|
106
102
|
videoId: PropTypes.string.isRequired,
|
|
107
|
-
|
|
108
103
|
/**
|
|
109
104
|
* The aspect ratio of the player.
|
|
110
105
|
*/
|
|
111
106
|
aspectRatio: PropTypes.oneOf(['16:9', '4:3', '1:1']),
|
|
112
|
-
|
|
113
107
|
/**
|
|
114
108
|
* A path of the image that will be displayed on the video's splash screen. If this is undefined, it will pull an image from the defined web video if available.
|
|
115
109
|
*/
|
|
116
110
|
posterSrc: PropTypes.string,
|
|
117
|
-
|
|
118
111
|
/**
|
|
119
112
|
* The video's default volume, defined from 1 to 100. Please use the `beginMuted` prop to have the video start silenced.
|
|
120
113
|
*/
|
|
121
114
|
defaultVolume: PropTypes.number,
|
|
122
|
-
|
|
123
115
|
/**
|
|
124
116
|
* Defines if the video should start muted.
|
|
125
117
|
*/
|
|
126
118
|
beginMuted: PropTypes.bool,
|
|
127
|
-
|
|
128
119
|
/**
|
|
129
120
|
* The video's length, which will be displayed on the splash screen. This is defined in seconds.
|
|
130
121
|
*/
|
|
131
122
|
videoLength: PropTypes.number.isRequired,
|
|
132
|
-
|
|
133
123
|
/**
|
|
134
124
|
* The splash screen UI's language as an ISO language code. It currently supports English and French.
|
|
135
125
|
*/
|
|
136
126
|
copy: PropTypes.oneOf(['en', 'fr']),
|
|
137
|
-
|
|
138
127
|
/**
|
|
139
128
|
* A function to be run when the play button is pressed on the video splash screen and the video is ready to play.
|
|
140
129
|
*/
|
|
@@ -5,11 +5,12 @@ export {
|
|
|
5
5
|
/**
|
|
6
6
|
* Most base components should be re-exported as-is.
|
|
7
7
|
*/
|
|
8
|
-
A11yText, ActivityIndicator, Autocomplete, Box, Button, BaseProvider, A11yInfoProvider, ViewportProvider, ThemeProvider, ButtonDropdown, ButtonGroup, ButtonLink, Carousel, CarouselTabs, Checkbox, CheckboxGroup, ChevronLink, Divider, ExpandCollapse, Feedback, FlexGrid, Icon, InputLabel, InputSupports, Link, Listbox, MultiSelectFilter, Notification, Pagination, QuickLinks, QuickLinksFeature, Radio, RadioGroup, RadioCard, RadioCardGroup, Responsive, Search, Select, SideNav, Skeleton, SkipLink, Spacer, StackView, StackWrap, StepTracker, Tabs, Tags, TextButton, TextArea, TextInput, Timeline, ToggleSwitch, ToggleSwitchGroup, TooltipButton, Tooltip, Typography, Validator,
|
|
8
|
+
A11yText, ActivityIndicator, Autocomplete, Box, Button, BaseProvider, A11yInfoProvider, ViewportProvider, ThemeProvider, ButtonDropdown, ButtonGroup, ButtonLink, Carousel, CarouselTabs, Checkbox, CheckboxGroup, ChevronLink, Divider, ExpandCollapse, Feedback, FlexGrid, Icon, InputLabel, InputSupports, Link, Listbox, Modal, MultiSelectFilter, Notification, Pagination, QuickLinks, QuickLinksFeature, Radio, RadioGroup, RadioCard, RadioCardGroup, Responsive, Search, Select, SideNav, Skeleton, SkipLink, Spacer, StackView, StackWrap, StepTracker, Tabs, Tags, TextButton, TextArea, TextInput, Timeline, ToggleSwitch, ToggleSwitchGroup, TooltipButton, Tooltip, Typography, Validator,
|
|
9
9
|
/*
|
|
10
10
|
* Most utilities exported from @telus-uds/components-base are for building systems, not apps.
|
|
11
11
|
* Re-export only those utilities with a stable API and known use cases within apps / pages.
|
|
12
12
|
*/
|
|
13
13
|
// Enable access to the viewports system for app-specific responsive layouts and features
|
|
14
|
-
useResponsiveProp, useViewport,
|
|
14
|
+
useResponsiveProp, useViewport,
|
|
15
|
+
// TODO reenable ViewportContext once published from base // enable localised viewport overrides e.g. in tests, narrow columns, etc
|
|
15
16
|
useCarousel, useSetTheme } from '@telus-uds/components-base';
|
package/lib-module/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import ResponsiveImage from '../../ResponsiveImage';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
6
|
const selectFullBleedContentProps = _ref => {
|
|
8
7
|
let {
|
|
9
8
|
alt,
|
|
@@ -32,7 +31,6 @@ const selectFullBleedContentProps = _ref => {
|
|
|
32
31
|
xsSrc
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
|
-
|
|
36
34
|
const FullBleedContentContainer = /*#__PURE__*/styled.div.withConfig({
|
|
37
35
|
displayName: "FullBleedContent__FullBleedContentContainer",
|
|
38
36
|
componentId: "components-web__sc-1130ea5-0"
|
|
@@ -51,24 +49,25 @@ const FullBleedContentContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
51
49
|
borderTopRightRadius
|
|
52
50
|
};
|
|
53
51
|
});
|
|
52
|
+
|
|
54
53
|
/**
|
|
55
54
|
* Full bleed content component can accept either a single source,
|
|
56
55
|
* a number of sources corresponding to the `ResponsiveImage` component API,
|
|
57
56
|
* or a custom component.
|
|
58
57
|
*/
|
|
59
|
-
|
|
60
58
|
const FullBleedContent = _ref3 => {
|
|
61
59
|
let {
|
|
62
60
|
borderRadius,
|
|
63
61
|
content,
|
|
64
62
|
...rest
|
|
65
63
|
} = _ref3;
|
|
66
|
-
return /*#__PURE__*/_jsx(FullBleedContentContainer, {
|
|
67
|
-
|
|
64
|
+
return /*#__PURE__*/_jsx(FullBleedContentContainer, {
|
|
65
|
+
...borderRadius,
|
|
66
|
+
children: content ?? /*#__PURE__*/_jsx(ResponsiveImage, {
|
|
67
|
+
...selectFullBleedContentProps(rest)
|
|
68
68
|
})
|
|
69
69
|
});
|
|
70
70
|
};
|
|
71
|
-
|
|
72
71
|
FullBleedContent.propTypes = {
|
|
73
72
|
/**
|
|
74
73
|
* Content border radius matching the edge values on the parent card.
|
|
@@ -79,22 +78,18 @@ FullBleedContent.propTypes = {
|
|
|
79
78
|
borderTopLeftRadius: PropTypes.number,
|
|
80
79
|
borderTopRightRadius: PropTypes.number
|
|
81
80
|
}),
|
|
82
|
-
|
|
83
81
|
/**
|
|
84
82
|
* Custom JSX to be used for rendering the content (defaults to `ResponsiveImage` receiving other props).
|
|
85
83
|
*/
|
|
86
84
|
content: PropTypes.node,
|
|
87
|
-
|
|
88
85
|
/**
|
|
89
86
|
* Image source.
|
|
90
87
|
*/
|
|
91
88
|
src: PropTypes.string,
|
|
92
|
-
|
|
93
89
|
/**
|
|
94
90
|
* Also accept props for `ResponsiveImage`...
|
|
95
91
|
*/
|
|
96
92
|
...ResponsiveImage.propTypes,
|
|
97
|
-
|
|
98
93
|
/**
|
|
99
94
|
* ...but make the required ones optional.
|
|
100
95
|
*/
|
|
@@ -18,7 +18,6 @@ const getFullBleedBorderRadius = function (borderRadius, position) {
|
|
|
18
18
|
borderTopLeftRadius: 0,
|
|
19
19
|
borderTopRightRadius: 0
|
|
20
20
|
};
|
|
21
|
-
|
|
22
21
|
if (position && position !== 'none') {
|
|
23
22
|
if (borderRadius) {
|
|
24
23
|
// Depending on the position of the image, we need to round some
|
|
@@ -29,37 +28,28 @@ const getFullBleedBorderRadius = function (borderRadius, position) {
|
|
|
29
28
|
innerBorderRadius.borderBottomLeftRadius = borderRadius;
|
|
30
29
|
innerBorderRadius.borderBottomRightRadius = borderRadius;
|
|
31
30
|
}
|
|
32
|
-
|
|
33
31
|
break;
|
|
34
|
-
|
|
35
32
|
case 'left':
|
|
36
33
|
if (!hasFooter) {
|
|
37
34
|
innerBorderRadius.borderBottomLeftRadius = borderRadius;
|
|
38
35
|
}
|
|
39
|
-
|
|
40
36
|
innerBorderRadius.borderTopLeftRadius = borderRadius;
|
|
41
37
|
break;
|
|
42
|
-
|
|
43
38
|
case 'right':
|
|
44
39
|
if (!hasFooter) {
|
|
45
40
|
innerBorderRadius.borderBottomRightRadius = borderRadius;
|
|
46
41
|
}
|
|
47
|
-
|
|
48
42
|
innerBorderRadius.borderTopRightRadius = borderRadius;
|
|
49
43
|
break;
|
|
50
|
-
|
|
51
44
|
case 'top':
|
|
52
45
|
innerBorderRadius.borderTopLeftRadius = borderRadius;
|
|
53
46
|
innerBorderRadius.borderTopRightRadius = borderRadius;
|
|
54
47
|
break;
|
|
55
|
-
|
|
56
48
|
default:
|
|
57
49
|
break;
|
|
58
50
|
}
|
|
59
51
|
}
|
|
60
52
|
}
|
|
61
|
-
|
|
62
53
|
return innerBorderRadius;
|
|
63
54
|
};
|
|
64
|
-
|
|
65
55
|
export default getFullBleedBorderRadius;
|
|
@@ -1,38 +1,31 @@
|
|
|
1
1
|
import { useResponsiveProp } from '@telus-uds/components-base';
|
|
2
|
-
|
|
3
2
|
const getContentStackDirection = fullBleedContentPosition => {
|
|
4
3
|
switch (fullBleedContentPosition) {
|
|
5
4
|
case 'left':
|
|
6
5
|
return 'row-reverse';
|
|
7
|
-
|
|
8
6
|
case 'right':
|
|
9
7
|
return 'row';
|
|
10
|
-
|
|
11
8
|
case 'top':
|
|
12
9
|
return 'column-reverse';
|
|
13
|
-
|
|
14
10
|
default:
|
|
15
11
|
return 'column';
|
|
16
12
|
}
|
|
17
13
|
};
|
|
18
|
-
|
|
19
14
|
const getContentStackAlign = fullBleedContentAlign => {
|
|
20
15
|
switch (fullBleedContentAlign) {
|
|
21
16
|
case 'center':
|
|
22
17
|
return 'center';
|
|
23
|
-
|
|
24
18
|
case 'end':
|
|
25
19
|
case 'flex-end':
|
|
26
20
|
return 'flex-end';
|
|
27
|
-
|
|
28
21
|
case 'start':
|
|
29
22
|
case 'flex-start':
|
|
30
23
|
return 'flex-start';
|
|
31
|
-
|
|
32
24
|
default:
|
|
33
25
|
return 'stretch';
|
|
34
26
|
}
|
|
35
27
|
};
|
|
28
|
+
|
|
36
29
|
/**
|
|
37
30
|
* Resolves a set of `FullBleedContent` props into the variables a container needs to
|
|
38
31
|
* correctly position a `FullBleedContent` component for the current viewport.
|
|
@@ -40,8 +33,6 @@ const getContentStackAlign = fullBleedContentAlign => {
|
|
|
40
33
|
* @param {object} [fullBleedContent] - a set of valid proptypes for FullBleedContent
|
|
41
34
|
* @returns
|
|
42
35
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
36
|
const useFullBleedContentProps = fullBleedContent => {
|
|
46
37
|
const {
|
|
47
38
|
align: fullBleedContentAlignProp,
|
|
@@ -61,5 +52,4 @@ const useFullBleedContentProps = fullBleedContent => {
|
|
|
61
52
|
fullBleedContentProps
|
|
62
53
|
};
|
|
63
54
|
};
|
|
64
|
-
|
|
65
55
|
export default useFullBleedContentProps;
|
|
@@ -45,7 +45,6 @@ const ButtonContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
|
|
49
48
|
const SplashButton = _ref3 => {
|
|
50
49
|
let {
|
|
51
50
|
copy,
|
|
@@ -66,7 +65,8 @@ const SplashButton = _ref3 => {
|
|
|
66
65
|
const ariaLabel = getAriaLabel(getTimestamp(videoLength), copy);
|
|
67
66
|
return /*#__PURE__*/_jsx(ButtonContainer, {
|
|
68
67
|
"aria-label": ariaLabel,
|
|
69
|
-
children: /*#__PURE__*/_jsx(ButtonContent, {
|
|
68
|
+
children: /*#__PURE__*/_jsx(ButtonContent, {
|
|
69
|
+
...themeTokens,
|
|
70
70
|
buttonContentChildrenBackground: buttonContentChildrenBackground,
|
|
71
71
|
children: /*#__PURE__*/_jsx(PlayIcon, {
|
|
72
72
|
size: 27,
|
|
@@ -75,7 +75,6 @@ const SplashButton = _ref3 => {
|
|
|
75
75
|
})
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
-
|
|
79
78
|
SplashButton.propTypes = {
|
|
80
79
|
videoLength: PropTypes.number,
|
|
81
80
|
tokens: PropTypes.object,
|