@telus-uds/components-web 2.43.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/.eslintrc.cjs +26 -0
  2. package/CHANGELOG.md +21 -2
  3. package/babel.config.cjs +4 -0
  4. package/jest.config.cjs +29 -0
  5. package/lib/Badge/Badge.js +21 -29
  6. package/lib/Badge/index.js +2 -10
  7. package/lib/BlockQuote/BlockQuote.js +31 -39
  8. package/lib/BlockQuote/index.js +2 -10
  9. package/lib/Breadcrumbs/Breadcrumbs.js +39 -49
  10. package/lib/Breadcrumbs/Item/Item.js +26 -34
  11. package/lib/Breadcrumbs/index.js +1 -13
  12. package/lib/Callout/Callout.js +19 -27
  13. package/lib/Callout/index.js +2 -10
  14. package/lib/Card/Card.js +44 -54
  15. package/lib/Card/CardContent.js +17 -25
  16. package/lib/Card/CardFooter.js +16 -24
  17. package/lib/Card/index.js +2 -10
  18. package/lib/Countdown/Countdown.js +34 -42
  19. package/lib/Countdown/Segment.js +26 -34
  20. package/lib/Countdown/constants.js +4 -14
  21. package/lib/Countdown/dictionary.js +2 -9
  22. package/lib/Countdown/index.js +2 -10
  23. package/lib/Countdown/types.js +18 -28
  24. package/lib/Countdown/useCountdown.js +4 -11
  25. package/lib/DatePicker/CalendarContainer.js +6 -12
  26. package/lib/DatePicker/DatePicker.js +105 -101
  27. package/lib/DatePicker/dictionary.js +1 -8
  28. package/lib/DatePicker/index.js +2 -10
  29. package/lib/DatePicker/reactDatesCss.js +3 -10
  30. package/lib/Disclaimer/Disclaimer.js +15 -23
  31. package/lib/Disclaimer/index.js +1 -13
  32. package/lib/ExpandCollapseMini/ExpandCollapseMini.js +16 -24
  33. package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +17 -26
  34. package/lib/ExpandCollapseMini/index.js +2 -10
  35. package/lib/Footnote/Footnote.js +85 -95
  36. package/lib/Footnote/FootnoteLink.js +25 -33
  37. package/lib/Footnote/dictionary.js +2 -9
  38. package/lib/Footnote/index.js +4 -12
  39. package/lib/IconButton/IconButton.js +12 -20
  40. package/lib/IconButton/index.js +2 -10
  41. package/lib/Image/Image.js +17 -25
  42. package/lib/Image/index.js +6 -18
  43. package/lib/Image/server.js +4 -12
  44. package/lib/List/List.js +2 -9
  45. package/lib/List/ListItem.js +10 -18
  46. package/lib/List/index.js +4 -12
  47. package/lib/NavigationBar/NavigationBar.js +51 -59
  48. package/lib/NavigationBar/NavigationItem.js +19 -27
  49. package/lib/NavigationBar/NavigationSubMenu.js +34 -40
  50. package/lib/NavigationBar/collapseItems.js +1 -11
  51. package/lib/NavigationBar/index.js +4 -12
  52. package/lib/NavigationBar/resolveItemSelection.js +1 -8
  53. package/lib/OptimizeImage/OptimizeImage.js +26 -34
  54. package/lib/OptimizeImage/index.js +2 -10
  55. package/lib/OptimizeImage/utils/getFallbackUrl.js +3 -10
  56. package/lib/OptimizeImage/utils/getImageUrls.js +9 -16
  57. package/lib/OptimizeImage/utils/getOptimizedUrl.js +3 -10
  58. package/lib/OptimizeImage/utils/hasWebpSupport.js +1 -7
  59. package/lib/OptimizeImage/utils/index.js +5 -34
  60. package/lib/OptimizeImage/utils/isSvgUrl.js +1 -7
  61. package/lib/OrderedList/Item.js +28 -36
  62. package/lib/OrderedList/ItemBase.js +8 -16
  63. package/lib/OrderedList/OrderedList.js +22 -30
  64. package/lib/OrderedList/OrderedListBase.js +12 -20
  65. package/lib/OrderedList/constants.js +1 -8
  66. package/lib/OrderedList/index.js +4 -12
  67. package/lib/Paragraph/Paragraph.js +22 -30
  68. package/lib/Paragraph/index.js +2 -10
  69. package/lib/PreviewCard/AuthorDate.js +17 -21
  70. package/lib/PreviewCard/PreviewCard.js +40 -49
  71. package/lib/PreviewCard/index.js +2 -10
  72. package/lib/PriceLockup/PriceLockup.js +56 -64
  73. package/lib/PriceLockup/index.js +2 -10
  74. package/lib/PriceLockup/tokens.js +2 -9
  75. package/lib/Progress/ProgressBar.js +17 -24
  76. package/lib/Progress/index.js +4 -12
  77. package/lib/QuantitySelector/QuantitySelector.js +55 -63
  78. package/lib/QuantitySelector/SideButton.js +15 -23
  79. package/lib/QuantitySelector/dictionary.js +2 -9
  80. package/lib/QuantitySelector/index.js +2 -10
  81. package/lib/QuantitySelector/styles.js +4 -13
  82. package/lib/ResponsiveImage/ResponsiveImage.js +29 -37
  83. package/lib/ResponsiveImage/index.js +2 -10
  84. package/lib/Ribbon/Ribbon.js +22 -30
  85. package/lib/Ribbon/index.js +2 -10
  86. package/lib/SkeletonProvider/SkeletonImage.js +14 -22
  87. package/lib/SkeletonProvider/SkeletonProvider.js +17 -25
  88. package/lib/SkeletonProvider/SkeletonTypography.js +14 -22
  89. package/lib/SkeletonProvider/index.js +2 -10
  90. package/lib/Span/Span.js +23 -31
  91. package/lib/Span/index.js +2 -10
  92. package/lib/Spinner/Spinner.js +43 -51
  93. package/lib/Spinner/SpinnerContent.js +21 -29
  94. package/lib/Spinner/constants.js +4 -14
  95. package/lib/Spinner/index.js +2 -10
  96. package/lib/StoryCard/StoryCard.js +40 -49
  97. package/lib/StoryCard/index.js +2 -10
  98. package/lib/Table/Body.js +7 -15
  99. package/lib/Table/Cell.js +28 -38
  100. package/lib/Table/Header.js +11 -19
  101. package/lib/Table/Row.js +8 -16
  102. package/lib/Table/SubHeading.js +10 -18
  103. package/lib/Table/Table.js +26 -35
  104. package/lib/Table/index.js +12 -20
  105. package/lib/TermsAndConditions/ExpandCollapse.js +22 -30
  106. package/lib/TermsAndConditions/TermsAndConditions.js +52 -60
  107. package/lib/TermsAndConditions/dictionary.js +2 -9
  108. package/lib/TermsAndConditions/index.js +1 -13
  109. package/lib/Testimonial/Testimonial.js +37 -45
  110. package/lib/Testimonial/index.js +2 -10
  111. package/lib/Toast/Toast.js +32 -42
  112. package/lib/Toast/index.js +2 -10
  113. package/lib/Video/ControlBar/ControlBar.js +73 -81
  114. package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +16 -24
  115. package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +27 -35
  116. package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +27 -36
  117. package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +30 -38
  118. package/lib/Video/MiddleControlButton/MiddleControlButton.js +16 -24
  119. package/lib/Video/Video.js +74 -83
  120. package/lib/Video/index.js +2 -10
  121. package/lib/Video/videoText.js +1 -8
  122. package/lib/VideoPicker/VideoPicker.js +43 -53
  123. package/lib/VideoPicker/VideoPickerPlayer.js +17 -25
  124. package/lib/VideoPicker/VideoPickerThumbnail.js +38 -46
  125. package/lib/VideoPicker/VideoSlider.js +17 -26
  126. package/lib/VideoPicker/index.js +2 -10
  127. package/lib/VideoPicker/videoPropType.js +9 -18
  128. package/lib/WaffleGrid/WaffleGrid.js +33 -43
  129. package/lib/WaffleGrid/index.js +2 -10
  130. package/lib/WebVideo/WebVideo.js +42 -52
  131. package/lib/WebVideo/index.js +2 -10
  132. package/lib/WebVideo/utils/index.js +3 -11
  133. package/lib/baseExports.js +18 -431
  134. package/lib/index.js +38 -323
  135. package/lib/server.js +4 -12
  136. package/lib/shared/ConditionalWrapper/ConditionalWrapper.js +9 -17
  137. package/lib/shared/ConditionalWrapper/index.js +2 -10
  138. package/lib/shared/FullBleedContent/FullBleedContent.js +21 -29
  139. package/lib/shared/FullBleedContent/getFullBleedBorderRadius.js +1 -8
  140. package/lib/shared/FullBleedContent/index.js +4 -24
  141. package/lib/shared/FullBleedContent/useFullBleedContentProps.js +4 -11
  142. package/lib/shared/VideoSplash/SplashButton/SplashButton.js +19 -27
  143. package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +27 -35
  144. package/lib/shared/VideoSplash/VideoSplash.js +24 -32
  145. package/lib/shared/VideoSplash/helpers.js +5 -14
  146. package/lib/utils/index.js +10 -75
  147. package/lib/utils/isElementFocusable.js +1 -8
  148. package/lib/utils/logger.js +6 -15
  149. package/lib/utils/media.js +5 -11
  150. package/lib/utils/renderStructuredContent.js +8 -15
  151. package/lib/utils/ssr.js +5 -12
  152. package/lib/utils/theming/get-theme-from-server.js +2 -10
  153. package/lib/utils/theming/with-client-theme.js +9 -17
  154. package/lib/utils/theming/with-server-theme.js +11 -19
  155. package/lib/utils/transforms.js +3 -11
  156. package/lib/utils/useOverlaidPosition.js +15 -23
  157. package/lib/utils/useTypographyTheme.js +6 -13
  158. package/package.json +18 -20
  159. package/src/Card/Card.jsx +2 -2
  160. package/src/DatePicker/DatePicker.jsx +17 -4
  161. package/src/PreviewCard/AuthorDate.jsx +5 -3
  162. package/src/utils/logger.js +2 -2
  163. package/lib-module/Badge/Badge.js +0 -121
  164. package/lib-module/Badge/index.js +0 -2
  165. package/lib-module/BlockQuote/BlockQuote.js +0 -204
  166. package/lib-module/BlockQuote/index.js +0 -2
  167. package/lib-module/Breadcrumbs/Breadcrumbs.js +0 -250
  168. package/lib-module/Breadcrumbs/Item/Item.js +0 -175
  169. package/lib-module/Breadcrumbs/index.js +0 -1
  170. package/lib-module/Callout/Callout.js +0 -135
  171. package/lib-module/Callout/index.js +0 -2
  172. package/lib-module/Card/Card.js +0 -251
  173. package/lib-module/Card/CardContent.js +0 -90
  174. package/lib-module/Card/CardFooter.js +0 -78
  175. package/lib-module/Card/index.js +0 -2
  176. package/lib-module/Countdown/Countdown.js +0 -169
  177. package/lib-module/Countdown/Segment.js +0 -96
  178. package/lib-module/Countdown/constants.js +0 -4
  179. package/lib-module/Countdown/dictionary.js +0 -22
  180. package/lib-module/Countdown/index.js +0 -2
  181. package/lib-module/Countdown/types.js +0 -24
  182. package/lib-module/Countdown/useCountdown.js +0 -26
  183. package/lib-module/DatePicker/CalendarContainer.js +0 -208
  184. package/lib-module/DatePicker/DatePicker.js +0 -506
  185. package/lib-module/DatePicker/dictionary.js +0 -119
  186. package/lib-module/DatePicker/index.js +0 -2
  187. package/lib-module/DatePicker/reactDatesCss.js +0 -3
  188. package/lib-module/Disclaimer/Disclaimer.js +0 -54
  189. package/lib-module/Disclaimer/index.js +0 -1
  190. package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +0 -73
  191. package/lib-module/ExpandCollapseMini/ExpandCollapseMiniControl.js +0 -117
  192. package/lib-module/ExpandCollapseMini/index.js +0 -2
  193. package/lib-module/Footnote/Footnote.js +0 -632
  194. package/lib-module/Footnote/FootnoteLink.js +0 -118
  195. package/lib-module/Footnote/dictionary.js +0 -12
  196. package/lib-module/Footnote/index.js +0 -4
  197. package/lib-module/IconButton/IconButton.js +0 -55
  198. package/lib-module/IconButton/index.js +0 -2
  199. package/lib-module/Image/Image.js +0 -83
  200. package/lib-module/Image/index.js +0 -9
  201. package/lib-module/Image/server.js +0 -4
  202. package/lib-module/List/List.js +0 -2
  203. package/lib-module/List/ListItem.js +0 -28
  204. package/lib-module/List/index.js +0 -4
  205. package/lib-module/NavigationBar/NavigationBar.js +0 -224
  206. package/lib-module/NavigationBar/NavigationItem.js +0 -87
  207. package/lib-module/NavigationBar/NavigationSubMenu.js +0 -162
  208. package/lib-module/NavigationBar/collapseItems.js +0 -41
  209. package/lib-module/NavigationBar/index.js +0 -4
  210. package/lib-module/NavigationBar/resolveItemSelection.js +0 -16
  211. package/lib-module/OptimizeImage/OptimizeImage.js +0 -92
  212. package/lib-module/OptimizeImage/index.js +0 -2
  213. package/lib-module/OptimizeImage/utils/getFallbackUrl.js +0 -7
  214. package/lib-module/OptimizeImage/utils/getImageUrls.js +0 -12
  215. package/lib-module/OptimizeImage/utils/getOptimizedUrl.js +0 -17
  216. package/lib-module/OptimizeImage/utils/hasWebpSupport.js +0 -28
  217. package/lib-module/OptimizeImage/utils/index.js +0 -5
  218. package/lib-module/OptimizeImage/utils/isSvgUrl.js +0 -3
  219. package/lib-module/OrderedList/Item.js +0 -145
  220. package/lib-module/OrderedList/ItemBase.js +0 -27
  221. package/lib-module/OrderedList/OrderedList.js +0 -86
  222. package/lib-module/OrderedList/OrderedListBase.js +0 -45
  223. package/lib-module/OrderedList/constants.js +0 -2
  224. package/lib-module/OrderedList/index.js +0 -4
  225. package/lib-module/Paragraph/Paragraph.js +0 -90
  226. package/lib-module/Paragraph/index.js +0 -2
  227. package/lib-module/PreviewCard/AuthorDate.js +0 -57
  228. package/lib-module/PreviewCard/PreviewCard.js +0 -209
  229. package/lib-module/PreviewCard/index.js +0 -2
  230. package/lib-module/PriceLockup/PriceLockup.js +0 -335
  231. package/lib-module/PriceLockup/index.js +0 -2
  232. package/lib-module/PriceLockup/tokens.js +0 -55
  233. package/lib-module/Progress/ProgressBar.js +0 -83
  234. package/lib-module/Progress/index.js +0 -4
  235. package/lib-module/QuantitySelector/QuantitySelector.js +0 -261
  236. package/lib-module/QuantitySelector/SideButton.js +0 -70
  237. package/lib-module/QuantitySelector/dictionary.js +0 -26
  238. package/lib-module/QuantitySelector/index.js +0 -2
  239. package/lib-module/QuantitySelector/styles.js +0 -9
  240. package/lib-module/ResponsiveImage/ResponsiveImage.js +0 -95
  241. package/lib-module/ResponsiveImage/index.js +0 -2
  242. package/lib-module/Ribbon/Ribbon.js +0 -216
  243. package/lib-module/Ribbon/index.js +0 -2
  244. package/lib-module/SkeletonProvider/SkeletonImage.js +0 -39
  245. package/lib-module/SkeletonProvider/SkeletonProvider.js +0 -57
  246. package/lib-module/SkeletonProvider/SkeletonTypography.js +0 -38
  247. package/lib-module/SkeletonProvider/index.js +0 -2
  248. package/lib-module/Span/Span.js +0 -72
  249. package/lib-module/Span/index.js +0 -2
  250. package/lib-module/Spinner/Spinner.js +0 -215
  251. package/lib-module/Spinner/SpinnerContent.js +0 -94
  252. package/lib-module/Spinner/constants.js +0 -4
  253. package/lib-module/Spinner/index.js +0 -2
  254. package/lib-module/StoryCard/StoryCard.js +0 -212
  255. package/lib-module/StoryCard/index.js +0 -2
  256. package/lib-module/Table/Body.js +0 -17
  257. package/lib-module/Table/Cell.js +0 -176
  258. package/lib-module/Table/Header.js +0 -25
  259. package/lib-module/Table/Row.js +0 -19
  260. package/lib-module/Table/SubHeading.js +0 -23
  261. package/lib-module/Table/Table.js +0 -114
  262. package/lib-module/Table/index.js +0 -12
  263. package/lib-module/TermsAndConditions/ExpandCollapse.js +0 -153
  264. package/lib-module/TermsAndConditions/TermsAndConditions.js +0 -277
  265. package/lib-module/TermsAndConditions/dictionary.js +0 -16
  266. package/lib-module/TermsAndConditions/index.js +0 -1
  267. package/lib-module/Testimonial/Testimonial.js +0 -234
  268. package/lib-module/Testimonial/index.js +0 -2
  269. package/lib-module/Toast/Toast.js +0 -158
  270. package/lib-module/Toast/index.js +0 -2
  271. package/lib-module/Video/ControlBar/ControlBar.js +0 -288
  272. package/lib-module/Video/ControlBar/Controls/VideoButton/VideoButton.js +0 -70
  273. package/lib-module/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +0 -163
  274. package/lib-module/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +0 -203
  275. package/lib-module/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +0 -191
  276. package/lib-module/Video/MiddleControlButton/MiddleControlButton.js +0 -71
  277. package/lib-module/Video/Video.js +0 -959
  278. package/lib-module/Video/index.js +0 -2
  279. package/lib-module/Video/videoText.js +0 -55
  280. package/lib-module/VideoPicker/VideoPicker.js +0 -190
  281. package/lib-module/VideoPicker/VideoPickerPlayer.js +0 -48
  282. package/lib-module/VideoPicker/VideoPickerThumbnail.js +0 -218
  283. package/lib-module/VideoPicker/VideoSlider.js +0 -82
  284. package/lib-module/VideoPicker/index.js +0 -2
  285. package/lib-module/VideoPicker/videoPropType.js +0 -10
  286. package/lib-module/WaffleGrid/WaffleGrid.js +0 -157
  287. package/lib-module/WaffleGrid/index.js +0 -2
  288. package/lib-module/WebVideo/WebVideo.js +0 -191
  289. package/lib-module/WebVideo/index.js +0 -2
  290. package/lib-module/WebVideo/utils/index.js +0 -50
  291. package/lib-module/baseExports.js +0 -19
  292. package/lib-module/index.js +0 -40
  293. package/lib-module/server.js +0 -5
  294. package/lib-module/shared/ConditionalWrapper/ConditionalWrapper.js +0 -22
  295. package/lib-module/shared/ConditionalWrapper/index.js +0 -2
  296. package/lib-module/shared/FullBleedContent/FullBleedContent.js +0 -101
  297. package/lib-module/shared/FullBleedContent/getFullBleedBorderRadius.js +0 -55
  298. package/lib-module/shared/FullBleedContent/index.js +0 -4
  299. package/lib-module/shared/FullBleedContent/useFullBleedContentProps.js +0 -55
  300. package/lib-module/shared/VideoSplash/SplashButton/SplashButton.js +0 -84
  301. package/lib-module/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +0 -223
  302. package/lib-module/shared/VideoSplash/VideoSplash.js +0 -65
  303. package/lib-module/shared/VideoSplash/helpers.js +0 -23
  304. package/lib-module/utils/index.js +0 -10
  305. package/lib-module/utils/isElementFocusable.js +0 -8
  306. package/lib-module/utils/logger.js +0 -18
  307. package/lib-module/utils/media.js +0 -39
  308. package/lib-module/utils/renderStructuredContent.js +0 -66
  309. package/lib-module/utils/ssr.js +0 -37
  310. package/lib-module/utils/theming/get-theme-from-server.js +0 -16
  311. package/lib-module/utils/theming/with-client-theme.js +0 -24
  312. package/lib-module/utils/theming/with-server-theme.js +0 -26
  313. package/lib-module/utils/transforms.js +0 -4
  314. package/lib-module/utils/useOverlaidPosition.js +0 -216
  315. package/lib-module/utils/useTypographyTheme.js +0 -24
@@ -1,20 +1,13 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _styledComponents = _interopRequireDefault(require("styled-components"));
10
- var _componentsBase = require("@telus-uds/components-base");
11
- var _VideoButton = _interopRequireDefault(require("../VideoButton/VideoButton"));
12
- var _videoText = _interopRequireDefault(require("../../../videoText"));
13
- var _utils = require("../../../../utils");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
17
- const VolumeSliderContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled from 'styled-components';
4
+ import { Icon, useThemeTokens, selectSystemProps } from '@telus-uds/components-base';
5
+ import VideoButton from '../VideoButton/VideoButton';
6
+ import videoText from '../../../videoText';
7
+ import { htmlAttrs } from '../../../../utils';
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
10
+ const VolumeSliderContainer = /*#__PURE__*/styled.div.withConfig({
18
11
  displayName: "VolumeSlider__VolumeSliderContainer",
19
12
  componentId: "components-web__sc-apixz4-0"
20
13
  })(_ref => {
@@ -61,7 +54,7 @@ const sharedStyles = _ref2 => {
61
54
  })
62
55
  };
63
56
  };
64
- const StyledVolumeSlider = /*#__PURE__*/_styledComponents.default.input.attrs(_ref3 => {
57
+ const StyledVolumeSlider = /*#__PURE__*/styled.input.attrs(_ref3 => {
65
58
  let {
66
59
  videoCurrentVolume
67
60
  } = _ref3;
@@ -129,7 +122,7 @@ const VolumeSlider = _ref5 => {
129
122
  variant,
130
123
  ...rest
131
124
  } = _ref5;
132
- const refVolumeSlider = _react.default.useRef();
125
+ const refVolumeSlider = React.useRef();
133
126
  const {
134
127
  marginLeft,
135
128
  marginRight,
@@ -141,7 +134,7 @@ const VolumeSlider = _ref5 => {
141
134
  rangeBackground,
142
135
  mutedIcon,
143
136
  unmutedIcon
144
- } = (0, _componentsBase.useThemeTokens)('VideoVolumeSlider', tokens, variant);
137
+ } = useThemeTokens('VideoVolumeSlider', tokens, variant);
145
138
  const sharedProps = {
146
139
  thumbHeight,
147
140
  thumbWidth,
@@ -151,22 +144,22 @@ const VolumeSlider = _ref5 => {
151
144
  rangeBackground
152
145
  };
153
146
  const handleVolumeChange = () => setVolume(refVolumeSlider.current.value);
154
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(VolumeSliderContainer, {
147
+ return /*#__PURE__*/_jsxs(VolumeSliderContainer, {
155
148
  compactModeThreshold: compactModeThreshold,
156
149
  videoPlayerWidth: videoPlayerWidth,
157
150
  margin: `0 ${marginRight}px 0 ${marginLeft}px`,
158
151
  ...selectProps(rest),
159
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoButton.default, {
160
- icon: videoIsMuted ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Icon, {
152
+ children: [/*#__PURE__*/_jsx(VideoButton, {
153
+ icon: videoIsMuted ? /*#__PURE__*/_jsx(Icon, {
161
154
  icon: mutedIcon
162
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Icon, {
155
+ }) : /*#__PURE__*/_jsx(Icon, {
163
156
  icon: unmutedIcon
164
157
  }),
165
- label: videoIsMuted ? _videoText.default[copy].unmute : _videoText.default[copy].mute,
158
+ label: videoIsMuted ? videoText[copy].unmute : videoText[copy].mute,
166
159
  disableFocus: disableFocus,
167
160
  onClick: toggleMute,
168
161
  onFocus: resetInactivityTimer
169
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledVolumeSlider, {
162
+ }), /*#__PURE__*/_jsx(StyledVolumeSlider, {
170
163
  type: "range",
171
164
  min: "0",
172
165
  max: "1",
@@ -177,22 +170,21 @@ const VolumeSlider = _ref5 => {
177
170
  onChange: handleVolumeChange,
178
171
  onFocus: resetInactivityTimer,
179
172
  tabIndex: "-1",
180
- "aria-label": _videoText.default[copy].volumeSliderLabel,
173
+ "aria-label": videoText[copy].volumeSliderLabel,
181
174
  ...sharedProps
182
175
  })]
183
176
  });
184
177
  };
185
178
  VolumeSlider.propTypes = {
186
179
  ...selectedSystemPropTypes,
187
- videoCurrentVolume: _propTypes.default.number.isRequired,
188
- setVolume: _propTypes.default.func.isRequired,
189
- videoIsMuted: _propTypes.default.bool.isRequired,
190
- toggleMute: _propTypes.default.func.isRequired,
191
- resetInactivityTimer: _propTypes.default.func.isRequired,
192
- copy: _propTypes.default.oneOf(['en', 'fr']).isRequired,
193
- compactModeThreshold: _propTypes.default.number.isRequired,
194
- videoPlayerWidth: _propTypes.default.number.isRequired,
195
- disableFocus: _propTypes.default.bool.isRequired
180
+ videoCurrentVolume: PropTypes.number.isRequired,
181
+ setVolume: PropTypes.func.isRequired,
182
+ videoIsMuted: PropTypes.bool.isRequired,
183
+ toggleMute: PropTypes.func.isRequired,
184
+ resetInactivityTimer: PropTypes.func.isRequired,
185
+ copy: PropTypes.oneOf(['en', 'fr']).isRequired,
186
+ compactModeThreshold: PropTypes.number.isRequired,
187
+ videoPlayerWidth: PropTypes.number.isRequired,
188
+ disableFocus: PropTypes.bool.isRequired
196
189
  };
197
- var _default = VolumeSlider;
198
- exports.default = _default;
190
+ export default VolumeSlider;
@@ -1,18 +1,11 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _styledComponents = _interopRequireDefault(require("styled-components"));
10
- var _componentsBase = require("@telus-uds/components-base");
11
- var _utils = require("../../utils");
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
15
- const StyledMiddleControlButton = /*#__PURE__*/_styledComponents.default.button.withConfig({
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled from 'styled-components';
4
+ import { useThemeTokens, selectSystemProps } from '@telus-uds/components-base';
5
+ import { htmlAttrs } from '../../utils';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
8
+ const StyledMiddleControlButton = /*#__PURE__*/styled.button.withConfig({
16
9
  displayName: "MiddleControlButton__StyledMiddleControlButton",
17
10
  componentId: "components-web__sc-1um2s37-0"
18
11
  })(_ref => {
@@ -53,8 +46,8 @@ const MiddleControlButton = _ref2 => {
53
46
  height,
54
47
  background,
55
48
  iconColor
56
- } = (0, _componentsBase.useThemeTokens)('VideoMiddleControlButton', tokens, variant);
57
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledMiddleControlButton, {
49
+ } = useThemeTokens('VideoMiddleControlButton', tokens, variant);
50
+ return /*#__PURE__*/_jsx(StyledMiddleControlButton, {
58
51
  isHidden: isHidden,
59
52
  onClick: onClick,
60
53
  onFocus: onFocus,
@@ -62,7 +55,7 @@ const MiddleControlButton = _ref2 => {
62
55
  height: height,
63
56
  background: background,
64
57
  ...selectProps(rest),
65
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
58
+ children: /*#__PURE__*/_jsx(Icon, {
66
59
  color: iconColor,
67
60
  size: 24
68
61
  })
@@ -70,10 +63,9 @@ const MiddleControlButton = _ref2 => {
70
63
  };
71
64
  MiddleControlButton.propTypes = {
72
65
  ...selectedSystemPropTypes,
73
- icon: _propTypes.default.elementType.isRequired,
74
- isHidden: _propTypes.default.bool,
75
- onClick: _propTypes.default.func,
76
- onFocus: _propTypes.default.func
66
+ icon: PropTypes.elementType.isRequired,
67
+ isHidden: PropTypes.bool,
68
+ onClick: PropTypes.func,
69
+ onFocus: PropTypes.func
77
70
  };
78
- var _default = MiddleControlButton;
79
- exports.default = _default;
71
+ export default MiddleControlButton;
@@ -1,26 +1,19 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _styledComponents = _interopRequireDefault(require("styled-components"));
10
- var _fscreen = _interopRequireDefault(require("fscreen"));
11
- var _componentsBase = require("@telus-uds/components-base");
12
- var _Spinner = _interopRequireDefault(require("../Spinner"));
13
- var _utils = require("../utils");
14
- var _VideoSplash = _interopRequireDefault(require("../shared/VideoSplash/VideoSplash"));
15
- var _MiddleControlButton = _interopRequireDefault(require("./MiddleControlButton/MiddleControlButton"));
16
- var _ControlBar = _interopRequireDefault(require("./ControlBar/ControlBar"));
17
- var _videoText = _interopRequireDefault(require("./videoText"));
18
- var _jsxRuntime = require("react/jsx-runtime");
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
- const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled from 'styled-components';
4
+ import fscreen from 'fscreen';
5
+ import { useThemeTokens, selectSystemProps, getTokensPropType, variantProp } from '@telus-uds/components-base';
6
+ import Spinner from '../Spinner';
7
+ import { warn, htmlAttrs } from '../utils';
8
+ import VideoSplash from '../shared/VideoSplash/VideoSplash';
9
+ import MiddleControlButton from './MiddleControlButton/MiddleControlButton';
10
+ import ControlBar from './ControlBar/ControlBar';
11
+ import videoText from './videoText';
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
21
14
 
22
15
  // TODO: replace with the actual spinner component from UDS
23
- const VideoPlayerContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
16
+ const VideoPlayerContainer = /*#__PURE__*/styled.div.withConfig({
24
17
  displayName: "Video__VideoPlayerContainer",
25
18
  componentId: "components-web__sc-12ltnuw-0"
26
19
  })(_ref => {
@@ -35,7 +28,7 @@ const VideoPlayerContainer = /*#__PURE__*/_styledComponents.default.div.withConf
35
28
  border: videoBorder ? `20px solid ${borderColor}` : undefined
36
29
  };
37
30
  });
38
- const VideoElementContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
31
+ const VideoElementContainer = /*#__PURE__*/styled.div.withConfig({
39
32
  displayName: "Video__VideoElementContainer",
40
33
  componentId: "components-web__sc-12ltnuw-1"
41
34
  })({
@@ -44,14 +37,14 @@ const VideoElementContainer = /*#__PURE__*/_styledComponents.default.div.withCon
44
37
  height: '100%',
45
38
  fontSize: 0
46
39
  });
47
- const VideoPlayer = /*#__PURE__*/_styledComponents.default.video.withConfig({
40
+ const VideoPlayer = /*#__PURE__*/styled.video.withConfig({
48
41
  displayName: "Video__VideoPlayer",
49
42
  componentId: "components-web__sc-12ltnuw-2"
50
43
  })({
51
44
  width: '100%',
52
45
  height: '100%'
53
46
  });
54
- const VideoOverlayContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
47
+ const VideoOverlayContainer = /*#__PURE__*/styled.div.withConfig({
55
48
  displayName: "Video__VideoOverlayContainer",
56
49
  componentId: "components-web__sc-12ltnuw-3"
57
50
  })(_ref2 => {
@@ -65,7 +58,7 @@ const VideoOverlayContainer = /*#__PURE__*/_styledComponents.default.div.withCon
65
58
  cursor: mouseInactive ? 'none' : 'pointer'
66
59
  };
67
60
  });
68
- const VideoSplashContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
61
+ const VideoSplashContainer = /*#__PURE__*/styled.div.withConfig({
69
62
  displayName: "Video__VideoSplashContainer",
70
63
  componentId: "components-web__sc-12ltnuw-4"
71
64
  })({
@@ -74,7 +67,7 @@ const VideoSplashContainer = /*#__PURE__*/_styledComponents.default.div.withConf
74
67
  height: '100%',
75
68
  zIndex: 5
76
69
  });
77
- const VideoOverlayElementContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
70
+ const VideoOverlayElementContainer = /*#__PURE__*/styled.div.withConfig({
78
71
  displayName: "Video__VideoOverlayElementContainer",
79
72
  componentId: "components-web__sc-12ltnuw-5"
80
73
  })({
@@ -105,16 +98,16 @@ const Video = _ref3 => {
105
98
  variant = {},
106
99
  ...rest
107
100
  } = _ref3;
108
- const refVideoPlayer = _react.default.useRef({});
109
- const refVideoPlayerContainer = _react.default.useRef({});
110
- const refKeyboardInstructions = _react.default.useRef({});
101
+ const refVideoPlayer = React.useRef({});
102
+ const refVideoPlayerContainer = React.useRef({});
103
+ const refKeyboardInstructions = React.useRef({});
111
104
  let inactivityTimer = null;
112
105
  const {
113
106
  borderColor,
114
107
  pauseIcon,
115
108
  playIcon,
116
109
  replayIcon
117
- } = (0, _componentsBase.useThemeTokens)('Video', tokens, variant);
110
+ } = useThemeTokens('Video', tokens, variant);
118
111
  const playerOptions = {
119
112
  mouseTimeout: simpleMode ? 750 : 1500,
120
113
  // defined in ms
@@ -124,8 +117,7 @@ const Video = _ref3 => {
124
117
  // from 0 to 1
125
118
  compactModeThreshold: 700 // in px
126
119
  };
127
-
128
- const [videoPlayerState, setVideoPlayerState] = _react.default.useState({
120
+ const [videoPlayerState, setVideoPlayerState] = React.useState({
129
121
  loadedSources: null,
130
122
  loadedTracks: null,
131
123
  videoLength: 0,
@@ -152,7 +144,7 @@ const Video = _ref3 => {
152
144
  const generateSources = videoQuality => {
153
145
  return sources.map(source => {
154
146
  if (source.qualityRank === videoQuality) {
155
- return /*#__PURE__*/_react.default.createElement('source', {
147
+ return /*#__PURE__*/React.createElement('source', {
156
148
  src: source.source,
157
149
  type: source.mediaType,
158
150
  key: source.source
@@ -163,7 +155,7 @@ const Video = _ref3 => {
163
155
  };
164
156
  const generateTracks = () => {
165
157
  return tracks.map(track => {
166
- return /*#__PURE__*/_react.default.createElement('track', {
158
+ return /*#__PURE__*/React.createElement('track', {
167
159
  label: track.label,
168
160
  kind: track.kind,
169
161
  srcLang: track.language,
@@ -537,11 +529,11 @@ const Video = _ref3 => {
537
529
  }));
538
530
  };
539
531
  const toggleFullscreen = () => {
540
- if (_fscreen.default.fullscreenEnabled) {
541
- if (_fscreen.default.fullscreenElement === null) {
542
- _fscreen.default.requestFullscreen(refVideoPlayerContainer.current);
532
+ if (fscreen.fullscreenEnabled) {
533
+ if (fscreen.fullscreenElement === null) {
534
+ fscreen.requestFullscreen(refVideoPlayerContainer.current);
543
535
  } else {
544
- _fscreen.default.exitFullscreen();
536
+ fscreen.exitFullscreen();
545
537
  }
546
538
  setVideoPlayerState(prevState => {
547
539
  return {
@@ -577,8 +569,8 @@ const Video = _ref3 => {
577
569
 
578
570
  // This allows playing videos within components that act like
579
571
  // links, e.g. `PreviewCard`, `StoryCard`, etc.
580
- event === null || event === void 0 ? void 0 : event.preventDefault();
581
- event === null || event === void 0 ? void 0 : event.stopPropagation();
572
+ event === null || event === void 0 || event.preventDefault();
573
+ event === null || event === void 0 || event.stopPropagation();
582
574
  };
583
575
  const handleKeyboard = event => {
584
576
  const {
@@ -678,13 +670,13 @@ const Video = _ref3 => {
678
670
  };
679
671
 
680
672
  // Prepares video and caption files
681
- _react.default.useEffect(() => {
673
+ React.useEffect(() => {
682
674
  refreshMedia();
683
675
  // eslint-disable-next-line react-hooks/exhaustive-deps
684
676
  }, []);
685
677
 
686
678
  // Initial Setup after loading sources
687
- _react.default.useEffect(() => {
679
+ React.useEffect(() => {
688
680
  const {
689
681
  loadedSources,
690
682
  loadedTracks
@@ -735,7 +727,7 @@ const Video = _ref3 => {
735
727
 
736
728
  // Video Analytics
737
729
  if (analyticsTracking !== undefined && videoTitle === undefined || analyticsTracking === undefined && videoTitle !== undefined) {
738
- (0, _utils.warn)('Video', 'Both the `analyticsTracking` and `videoTitle` props must be defined in order to return a proper analytics object.');
730
+ warn('Video', 'Both the `analyticsTracking` and `videoTitle` props must be defined in order to return a proper analytics object.');
739
731
  }
740
732
  return () => {
741
733
  clearInactivityTimer();
@@ -774,7 +766,7 @@ const Video = _ref3 => {
774
766
  as,
775
767
  ...safeRest
776
768
  } = rest;
777
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(VideoPlayerContainer, {
769
+ return /*#__PURE__*/_jsxs(VideoPlayerContainer, {
778
770
  ...safeRest,
779
771
  ref: refVideoPlayerContainer,
780
772
  videoBorder: videoBorder,
@@ -783,17 +775,17 @@ const Video = _ref3 => {
783
775
  onClick: handleClick,
784
776
  onKeyDown: handleKeyboard,
785
777
  tabIndex: "0",
786
- "aria-label": simpleMode ? _videoText.default[copy].videoSelectedSimple : _videoText.default[copy].videoSelected,
778
+ "aria-label": simpleMode ? videoText[copy].videoSelectedSimple : videoText[copy].videoSelected,
787
779
  "data-testid": "videoPlayer",
788
780
  ...selectProps(rest),
789
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(VideoOverlayContainer, {
781
+ children: [/*#__PURE__*/_jsxs(VideoOverlayContainer, {
790
782
  mouseInactive: mouseInactive,
791
783
  onClick: () => {
792
784
  closeSubMenus();
793
785
  togglePlayPause();
794
786
  },
795
- children: [videoUnplayed && !videoQualityChanged && /*#__PURE__*/(0, _jsxRuntime.jsx)(VideoSplashContainer, {
796
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoSplash.default, {
787
+ children: [videoUnplayed && !videoQualityChanged && /*#__PURE__*/_jsx(VideoSplashContainer, {
788
+ children: /*#__PURE__*/_jsx(VideoSplash, {
797
789
  poster: posterSrc,
798
790
  copy: copy,
799
791
  videoLength: videoLength,
@@ -801,23 +793,23 @@ const Video = _ref3 => {
801
793
  iconLeftOffsetPx: 2,
802
794
  onClick: beginVideo
803
795
  })
804
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(VideoOverlayElementContainer, {
805
- children: [videoEnded && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MiddleControlButton.default, {
796
+ }), /*#__PURE__*/_jsxs(VideoOverlayElementContainer, {
797
+ children: [videoEnded && /*#__PURE__*/_jsx(MiddleControlButton, {
806
798
  icon: replayIcon,
807
799
  onClick: replayVideo
808
- }), !videoUnplayed && !videoIsBuffering && !videoEnded && !isMobile && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MiddleControlButton.default, {
800
+ }), !videoUnplayed && !videoIsBuffering && !videoEnded && !isMobile && /*#__PURE__*/_jsx(MiddleControlButton, {
809
801
  icon: videoIsPlaying ? pauseIcon : playIcon,
810
802
  isHidden: mouseInactive,
811
803
  onClick: togglePlayPause,
812
804
  onFocus: resetInactivityTimer
813
- }), videoIsBuffering && !isMobile && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spinner.default, {
805
+ }), videoIsBuffering && !isMobile && /*#__PURE__*/_jsx(Spinner, {
814
806
  show: true
815
807
  })]
816
808
  })]
817
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(VideoElementContainer, {
809
+ }), /*#__PURE__*/_jsx(VideoElementContainer, {
818
810
  videoIsFullscreen: videoIsFullscreen,
819
811
  mouseInactive: mouseInactive,
820
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(VideoPlayer, {
812
+ children: /*#__PURE__*/_jsxs(VideoPlayer, {
821
813
  ref: refVideoPlayer,
822
814
  controls: isMobile,
823
815
  videoIsFullscreen: videoIsFullscreen,
@@ -825,7 +817,7 @@ const Video = _ref3 => {
825
817
  playsinline: true,
826
818
  children: [loadedSources, loadedTracks, "Your browser does not support the video tag."]
827
819
  })
828
- }), !simpleMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ControlBar.default, {
820
+ }), !simpleMode && /*#__PURE__*/_jsx(ControlBar, {
829
821
  videoPlayer: refVideoPlayer,
830
822
  videoPlayerContainer: refVideoPlayerContainer,
831
823
  sources: sources,
@@ -863,10 +855,10 @@ const Video = _ref3 => {
863
855
  onMouseOut: () => setMouseOnControlBar(false),
864
856
  onFocus: () => {},
865
857
  onBlur: () => {}
866
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
858
+ }), /*#__PURE__*/_jsx("span", {
867
859
  tabIndex: "-1",
868
860
  ref: refKeyboardInstructions,
869
- "aria-label": _videoText.default[copy].videoPlayer,
861
+ "aria-label": videoText[copy].videoPlayer,
870
862
  role: "note"
871
863
  })]
872
864
  });
@@ -876,71 +868,71 @@ Video.propTypes = {
876
868
  /**
877
869
  * An array of objects that defines each video file. See the "Basic Usage" section for more information.
878
870
  */
879
- sources: _propTypes.default.arrayOf(_propTypes.default.shape({
871
+ sources: PropTypes.arrayOf(PropTypes.shape({
880
872
  /** A path to a video file */
881
- source: _propTypes.default.string.isRequired,
873
+ source: PropTypes.string.isRequired,
882
874
  /** The video's MIME type (example: `video/mp4`) */
883
- mediaType: _propTypes.default.string.isRequired,
875
+ mediaType: PropTypes.string.isRequired,
884
876
  /** The label to be given to this file in the quality selector (example: `1080p`) */
885
- qualityName: _propTypes.default.string.isRequired,
877
+ qualityName: PropTypes.string.isRequired,
886
878
  /** A number indicating the video's quality, with 1 being the best, and the number increasing from there as quality degrades */
887
- qualityRank: _propTypes.default.number.isRequired,
879
+ qualityRank: PropTypes.number.isRequired,
888
880
  /** A boolean that defines its source as a fallback for another source with the same `qualityRank` */
889
- isFallback: _propTypes.default.bool
881
+ isFallback: PropTypes.bool
890
882
  })).isRequired,
891
883
  /**
892
884
  * A path of the image that will be displayed on the video's splash screen.
893
885
  */
894
- posterSrc: _propTypes.default.string.isRequired,
886
+ posterSrc: PropTypes.string.isRequired,
895
887
  /**
896
888
  * An array of objects that defines each caption file. See the "Basic Usage" section for more information.
897
889
  */
898
- tracks: _propTypes.default.arrayOf(_propTypes.default.shape({
890
+ tracks: PropTypes.arrayOf(PropTypes.shape({
899
891
  /** A path to the track file */
900
- source: _propTypes.default.string.isRequired,
892
+ source: PropTypes.string.isRequired,
901
893
  /** The name of the track file as it will appear in the "Captions" dialogue */
902
- label: _propTypes.default.string.isRequired,
894
+ label: PropTypes.string.isRequired,
903
895
  /** The track's file type, typically one of "subtitles", "captions", or "descriptions". See [MDN's documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track#Attributes) for more information on these types */
904
- kind: _propTypes.default.string.isRequired,
896
+ kind: PropTypes.string.isRequired,
905
897
  /** The language of the track file represented as a ISO 639-1 language code */
906
- language: _propTypes.default.string.isRequired
898
+ language: PropTypes.string.isRequired
907
899
  })),
908
900
  /**
909
901
  * The video's default volume, defined from 1 to 100. Please use the `beginMuted` prop to have the video start silenced.
910
902
  */
911
- defaultVolume: _propTypes.default.number,
903
+ defaultVolume: PropTypes.number,
912
904
  /**
913
905
  * Defines if the video should start muted.
914
906
  */
915
- beginMuted: _propTypes.default.bool,
907
+ beginMuted: PropTypes.bool,
916
908
  /**
917
909
  * The default quality level if the user is on mobile. See the `sources` prop for available quality levels.
918
910
  */
919
- defaultMobileQuality: _propTypes.default.number,
911
+ defaultMobileQuality: PropTypes.number,
920
912
  /**
921
913
  * The default quality level if the user is on desktop. See the `sources` prop for available quality levels.
922
914
  */
923
- defaultDesktopQuality: _propTypes.default.number,
915
+ defaultDesktopQuality: PropTypes.number,
924
916
  /**
925
917
  * The video player UI's language as an ISO language code. It currently supports English and French.
926
918
  */
927
- copy: _propTypes.default.oneOf(['en', 'fr']).isRequired,
919
+ copy: PropTypes.oneOf(['en', 'fr']).isRequired,
928
920
  /**
929
921
  * Sets the `video` tag's `crossorigin` mode. Please note that content loaded without CORS approval may be insecure.
930
922
  * @since 1.1.0
931
923
  */
932
- crossOrigin: _propTypes.default.oneOf(['anonymous', 'use-credentials']),
924
+ crossOrigin: PropTypes.oneOf(['anonymous', 'use-credentials']),
933
925
  /**
934
926
  * Disables the control bar during playback and reduces the amount of time until the UI hides itself.
935
927
  * For special approved internal uses only.
936
928
  * @since 1.2.0
937
929
  */
938
- simpleMode: _propTypes.default.bool,
930
+ simpleMode: PropTypes.bool,
939
931
  /**
940
932
  * Renders a gainsboro coloured border around the video. Used to seperate the video from the rest of the page if the video's background is the same colour as the container's.
941
933
  * @since 1.2.0
942
934
  */
943
- videoBorder: _propTypes.default.bool,
935
+ videoBorder: PropTypes.bool,
944
936
  /**
945
937
  * A callback function that fires when a customer interacts with Video.
946
938
  * When using `analyticsTracking`, `videoTitle` must also be defined.
@@ -953,14 +945,13 @@ Video.propTypes = {
953
945
  * @param {string} analyticsObject.action Contains the latest customer action
954
946
  * @param {string} analyticsObject.details The name of the video based on the `videoTitle` prop
955
947
  */
956
- analyticsTracking: _propTypes.default.func,
948
+ analyticsTracking: PropTypes.func,
957
949
  /**
958
950
  * The title of the video being rendered. This is used for analytics purposes in conjunction with `analyticsTracking`.
959
951
  * @since 1.3.0
960
952
  */
961
- videoTitle: _propTypes.default.string,
962
- tokens: (0, _componentsBase.getTokensPropType)('Video'),
963
- variant: _componentsBase.variantProp.propType
953
+ videoTitle: PropTypes.string,
954
+ tokens: getTokensPropType('Video'),
955
+ variant: variantProp.propType
964
956
  };
965
- var _default = Video;
966
- exports.default = _default;
957
+ export default Video;
@@ -1,10 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _Video = _interopRequireDefault(require("./Video"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- var _default = _Video.default;
10
- exports.default = _default;
1
+ import Video from './Video';
2
+ export default Video;
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
1
  const videoText = {
8
2
  en: {
9
3
  videoPlayer: 'Press the space bar or K to toggle play and pause. Use the left and right arrow keys or the comma and period keys to scrub through the video. Use the up and down arrow keys, the dash and equal keys, or the add and subtract number pad keys to increase and decrease volume. Press M to toggle mute. Press F to toggle fullscreen. Press escape to exit instructions and return to video.',
@@ -58,5 +52,4 @@ const videoText = {
58
52
  fr: 'Français'
59
53
  }
60
54
  };
61
- var _default = videoText;
62
- exports.default = _default;
55
+ export default videoText;