@telus-uds/components-web 3.4.0 → 4.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 (368) hide show
  1. package/.eslintrc.cjs +7 -1
  2. package/CHANGELOG.md +22 -2
  3. package/jest.config.cjs +1 -1
  4. package/lib/cjs/Badge/Badge.js +128 -0
  5. package/lib/cjs/Badge/index.js +9 -0
  6. package/lib/cjs/BlockQuote/BlockQuote.js +256 -0
  7. package/lib/cjs/BlockQuote/index.js +9 -0
  8. package/lib/cjs/Breadcrumbs/Breadcrumbs.js +264 -0
  9. package/lib/cjs/Breadcrumbs/Item/Item.js +180 -0
  10. package/lib/cjs/Breadcrumbs/index.js +13 -0
  11. package/lib/cjs/Callout/Callout.js +141 -0
  12. package/lib/cjs/Callout/index.js +9 -0
  13. package/lib/cjs/Card/Card.js +257 -0
  14. package/lib/cjs/Card/CardContent.js +97 -0
  15. package/lib/cjs/Card/CardFooter.js +85 -0
  16. package/lib/cjs/Card/index.js +9 -0
  17. package/lib/cjs/Countdown/Countdown.js +268 -0
  18. package/lib/cjs/Countdown/Segment.js +108 -0
  19. package/lib/cjs/Countdown/constants.js +10 -0
  20. package/lib/cjs/Countdown/dictionary.js +28 -0
  21. package/lib/cjs/Countdown/index.js +9 -0
  22. package/lib/cjs/Countdown/types.js +31 -0
  23. package/lib/cjs/Countdown/useCountdown.js +32 -0
  24. package/lib/cjs/DatePicker/CalendarContainer.js +214 -0
  25. package/lib/cjs/DatePicker/DatePicker.js +525 -0
  26. package/lib/cjs/DatePicker/dictionary.js +125 -0
  27. package/lib/cjs/DatePicker/index.js +9 -0
  28. package/lib/cjs/DatePicker/reactDatesCss.js +9 -0
  29. package/lib/cjs/Disclaimer/Disclaimer.js +61 -0
  30. package/lib/cjs/Disclaimer/index.js +13 -0
  31. package/lib/cjs/Footnote/Footnote.js +637 -0
  32. package/lib/cjs/Footnote/FootnoteLink.js +125 -0
  33. package/lib/cjs/Footnote/dictionary.js +18 -0
  34. package/lib/cjs/Footnote/index.js +11 -0
  35. package/lib/cjs/IconButton/IconButton.js +62 -0
  36. package/lib/cjs/IconButton/index.js +9 -0
  37. package/lib/cjs/Image/Image.js +90 -0
  38. package/lib/cjs/Image/index.js +20 -0
  39. package/lib/cjs/Image/server.js +11 -0
  40. package/lib/cjs/List/List.js +8 -0
  41. package/lib/cjs/List/ListItem.js +34 -0
  42. package/lib/cjs/List/index.js +11 -0
  43. package/lib/cjs/NavigationBar/NavigationBar.js +282 -0
  44. package/lib/cjs/NavigationBar/NavigationItem.js +94 -0
  45. package/lib/cjs/NavigationBar/NavigationSubMenu.js +164 -0
  46. package/lib/cjs/NavigationBar/collapseItems.js +43 -0
  47. package/lib/cjs/NavigationBar/index.js +11 -0
  48. package/lib/cjs/NavigationBar/resolveItemSelection.js +22 -0
  49. package/lib/cjs/OptimizeImage/OptimizeImage.js +99 -0
  50. package/lib/cjs/OptimizeImage/index.js +9 -0
  51. package/lib/cjs/OptimizeImage/utils/getFallbackUrl.js +14 -0
  52. package/lib/cjs/OptimizeImage/utils/getImageUrls.js +19 -0
  53. package/lib/cjs/OptimizeImage/utils/getOptimizedUrl.js +24 -0
  54. package/lib/cjs/OptimizeImage/utils/hasWebpSupport.js +34 -0
  55. package/lib/cjs/OptimizeImage/utils/index.js +34 -0
  56. package/lib/cjs/OptimizeImage/utils/isSvgUrl.js +9 -0
  57. package/lib/cjs/OrderedList/Item.js +151 -0
  58. package/lib/cjs/OrderedList/ItemBase.js +34 -0
  59. package/lib/cjs/OrderedList/OrderedList.js +92 -0
  60. package/lib/cjs/OrderedList/OrderedListBase.js +52 -0
  61. package/lib/cjs/OrderedList/constants.js +8 -0
  62. package/lib/cjs/OrderedList/index.js +11 -0
  63. package/lib/cjs/Paragraph/Paragraph.js +97 -0
  64. package/lib/cjs/Paragraph/index.js +9 -0
  65. package/lib/cjs/PreviewCard/AuthorDate.js +63 -0
  66. package/lib/cjs/PreviewCard/PreviewCard.js +215 -0
  67. package/lib/cjs/PreviewCard/index.js +9 -0
  68. package/lib/cjs/PriceLockup/PriceLockup.js +356 -0
  69. package/lib/cjs/PriceLockup/index.js +9 -0
  70. package/lib/cjs/PriceLockup/tokens.js +66 -0
  71. package/lib/cjs/Progress/ProgressBar.js +99 -0
  72. package/lib/cjs/Progress/index.js +11 -0
  73. package/lib/cjs/QuantitySelector/QuantitySelector.js +267 -0
  74. package/lib/cjs/QuantitySelector/SideButton.js +77 -0
  75. package/lib/cjs/QuantitySelector/dictionary.js +32 -0
  76. package/lib/cjs/QuantitySelector/index.js +9 -0
  77. package/lib/cjs/QuantitySelector/styles.js +16 -0
  78. package/lib/cjs/ResponsiveImage/ResponsiveImage.js +107 -0
  79. package/lib/cjs/ResponsiveImage/index.js +9 -0
  80. package/lib/cjs/Ribbon/Ribbon.js +222 -0
  81. package/lib/cjs/Ribbon/index.js +9 -0
  82. package/lib/cjs/SkeletonProvider/SkeletonImage.js +45 -0
  83. package/lib/cjs/SkeletonProvider/SkeletonProvider.js +63 -0
  84. package/lib/cjs/SkeletonProvider/SkeletonTypography.js +44 -0
  85. package/lib/cjs/SkeletonProvider/index.js +9 -0
  86. package/lib/cjs/Span/Span.js +79 -0
  87. package/lib/cjs/Span/index.js +9 -0
  88. package/lib/cjs/Spinner/Spinner.js +221 -0
  89. package/lib/cjs/Spinner/SpinnerContent.js +100 -0
  90. package/lib/cjs/Spinner/constants.js +10 -0
  91. package/lib/cjs/Spinner/index.js +9 -0
  92. package/lib/cjs/StoryCard/StoryCard.js +219 -0
  93. package/lib/cjs/StoryCard/index.js +9 -0
  94. package/lib/cjs/Table/Body.js +24 -0
  95. package/lib/cjs/Table/Cell.js +187 -0
  96. package/lib/cjs/Table/Header.js +32 -0
  97. package/lib/cjs/Table/Row.js +41 -0
  98. package/lib/cjs/Table/SubHeading.js +30 -0
  99. package/lib/cjs/Table/Table.js +124 -0
  100. package/lib/cjs/Table/index.js +19 -0
  101. package/lib/cjs/TermsAndConditions/ExpandCollapse.js +160 -0
  102. package/lib/cjs/TermsAndConditions/TermsAndConditions.js +283 -0
  103. package/lib/cjs/TermsAndConditions/dictionary.js +22 -0
  104. package/lib/cjs/TermsAndConditions/index.js +13 -0
  105. package/lib/cjs/Testimonial/Testimonial.js +240 -0
  106. package/lib/cjs/Testimonial/index.js +9 -0
  107. package/lib/cjs/Toast/Toast.js +165 -0
  108. package/lib/cjs/Toast/index.js +9 -0
  109. package/lib/cjs/Video/ControlBar/ControlBar.js +294 -0
  110. package/lib/cjs/Video/ControlBar/Controls/VideoButton/VideoButton.js +76 -0
  111. package/lib/cjs/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +169 -0
  112. package/lib/cjs/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +211 -0
  113. package/lib/cjs/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +197 -0
  114. package/lib/cjs/Video/MiddleControlButton/MiddleControlButton.js +78 -0
  115. package/lib/cjs/Video/Video.js +964 -0
  116. package/lib/cjs/Video/index.js +9 -0
  117. package/lib/cjs/Video/videoText.js +61 -0
  118. package/lib/cjs/VideoPicker/VideoPicker.js +197 -0
  119. package/lib/cjs/VideoPicker/VideoPickerPlayer.js +54 -0
  120. package/lib/cjs/VideoPicker/VideoPickerThumbnail.js +223 -0
  121. package/lib/cjs/VideoPicker/VideoSlider.js +88 -0
  122. package/lib/cjs/VideoPicker/index.js +9 -0
  123. package/lib/cjs/VideoPicker/videoPropType.js +17 -0
  124. package/lib/cjs/WaffleGrid/WaffleGrid.js +164 -0
  125. package/lib/cjs/WaffleGrid/index.js +9 -0
  126. package/lib/cjs/WebVideo/WebVideo.js +197 -0
  127. package/lib/cjs/WebVideo/index.js +9 -0
  128. package/lib/cjs/WebVideo/utils/index.js +57 -0
  129. package/lib/cjs/baseExports.js +438 -0
  130. package/lib/cjs/index.js +317 -0
  131. package/lib/cjs/server.js +13 -0
  132. package/lib/cjs/shared/ConditionalWrapper/ConditionalWrapper.js +29 -0
  133. package/lib/cjs/shared/ConditionalWrapper/index.js +9 -0
  134. package/lib/cjs/shared/FullBleedContent/FullBleedContent.js +108 -0
  135. package/lib/cjs/shared/FullBleedContent/getFullBleedBorderRadius.js +61 -0
  136. package/lib/cjs/shared/FullBleedContent/index.js +23 -0
  137. package/lib/cjs/shared/FullBleedContent/useFullBleedContentProps.js +61 -0
  138. package/lib/cjs/shared/VideoSplash/SplashButton/SplashButton.js +91 -0
  139. package/lib/cjs/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +229 -0
  140. package/lib/cjs/shared/VideoSplash/VideoSplash.js +72 -0
  141. package/lib/cjs/shared/VideoSplash/helpers.js +32 -0
  142. package/lib/cjs/utils/index.js +88 -0
  143. package/lib/cjs/utils/isElementFocusable.js +14 -0
  144. package/lib/cjs/utils/logger.js +24 -0
  145. package/lib/cjs/utils/media.js +45 -0
  146. package/lib/cjs/utils/renderStructuredContent.js +71 -0
  147. package/lib/cjs/utils/scrollToAnchor.js +25 -0
  148. package/lib/cjs/utils/ssr.js +50 -0
  149. package/lib/cjs/utils/theming/get-theme-from-server.js +24 -0
  150. package/lib/cjs/utils/theming/with-client-theme.js +31 -0
  151. package/lib/cjs/utils/theming/with-server-theme.js +33 -0
  152. package/lib/cjs/utils/transforms.js +11 -0
  153. package/lib/cjs/utils/useOverlaidPosition.js +222 -0
  154. package/lib/cjs/utils/useTypographyTheme.js +30 -0
  155. package/lib/{Badge → esm/Badge}/Badge.js +11 -21
  156. package/lib/{BlockQuote → esm/BlockQuote}/BlockQuote.js +17 -31
  157. package/lib/{Breadcrumbs → esm/Breadcrumbs}/Breadcrumbs.js +6 -5
  158. package/lib/{Breadcrumbs → esm/Breadcrumbs}/Item/Item.js +10 -6
  159. package/lib/{Callout → esm/Callout}/Callout.js +6 -5
  160. package/lib/{Card → esm/Card}/Card.js +5 -5
  161. package/lib/{Card → esm/Card}/CardContent.js +6 -5
  162. package/lib/{Card → esm/Card}/CardFooter.js +6 -5
  163. package/lib/{Countdown → esm/Countdown}/Countdown.js +53 -32
  164. package/lib/{Countdown → esm/Countdown}/Segment.js +6 -6
  165. package/lib/{DatePicker → esm/DatePicker}/CalendarContainer.js +5 -5
  166. package/lib/{DatePicker → esm/DatePicker}/DatePicker.js +18 -12
  167. package/lib/esm/DatePicker/reactDatesCss.js +3 -0
  168. package/lib/{Disclaimer → esm/Disclaimer}/Disclaimer.js +6 -5
  169. package/lib/{Footnote → esm/Footnote}/Footnote.js +39 -15
  170. package/lib/{Footnote → esm/Footnote}/FootnoteLink.js +6 -5
  171. package/lib/{NavigationBar → esm/NavigationBar}/NavigationBar.js +6 -5
  172. package/lib/{NavigationBar → esm/NavigationBar}/NavigationItem.js +6 -5
  173. package/lib/{OrderedList → esm/OrderedList}/Item.js +10 -6
  174. package/lib/{OrderedList → esm/OrderedList}/ItemBase.js +5 -5
  175. package/lib/{OrderedList → esm/OrderedList}/OrderedList.js +6 -5
  176. package/lib/{OrderedList → esm/OrderedList}/OrderedListBase.js +5 -5
  177. package/lib/{Paragraph → esm/Paragraph}/Paragraph.js +8 -16
  178. package/lib/{PreviewCard → esm/PreviewCard}/PreviewCard.js +10 -7
  179. package/lib/{PriceLockup → esm/PriceLockup}/PriceLockup.js +59 -69
  180. package/lib/{Progress → esm/Progress}/ProgressBar.js +6 -6
  181. package/lib/esm/QuantitySelector/styles.js +9 -0
  182. package/lib/{Ribbon → esm/Ribbon}/Ribbon.js +31 -57
  183. package/lib/{Span → esm/Span}/Span.js +7 -6
  184. package/lib/{Spinner → esm/Spinner}/Spinner.js +18 -8
  185. package/lib/{Spinner → esm/Spinner}/SpinnerContent.js +6 -5
  186. package/lib/{StoryCard → esm/StoryCard}/StoryCard.js +10 -7
  187. package/lib/{Table → esm/Table}/Cell.js +16 -45
  188. package/lib/esm/Table/Row.js +34 -0
  189. package/lib/{Table → esm/Table}/Table.js +16 -17
  190. package/lib/{TermsAndConditions → esm/TermsAndConditions}/ExpandCollapse.js +13 -7
  191. package/lib/{TermsAndConditions → esm/TermsAndConditions}/TermsAndConditions.js +22 -9
  192. package/lib/{Testimonial → esm/Testimonial}/Testimonial.js +26 -10
  193. package/lib/{Toast → esm/Toast}/Toast.js +13 -64
  194. package/lib/{Video → esm/Video}/ControlBar/ControlBar.js +18 -8
  195. package/lib/{Video → esm/Video}/ControlBar/Controls/VideoButton/VideoButton.js +6 -5
  196. package/lib/{Video → esm/Video}/ControlBar/Controls/VideoMenu/VideoMenu.js +14 -7
  197. package/lib/{Video → esm/Video}/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +14 -7
  198. package/lib/{Video → esm/Video}/ControlBar/Controls/VolumeSlider/VolumeSlider.js +10 -6
  199. package/lib/{Video → esm/Video}/MiddleControlButton/MiddleControlButton.js +6 -5
  200. package/lib/{Video → esm/Video}/Video.js +26 -10
  201. package/lib/{VideoPicker → esm/VideoPicker}/VideoPicker.js +20 -44
  202. package/lib/{VideoPicker → esm/VideoPicker}/VideoPickerThumbnail.js +18 -52
  203. package/lib/{WaffleGrid → esm/WaffleGrid}/WaffleGrid.js +14 -7
  204. package/lib/{WebVideo → esm/WebVideo}/WebVideo.js +14 -9
  205. package/lib/{index.js → esm/index.js} +1 -1
  206. package/lib/{shared → esm/shared}/FullBleedContent/FullBleedContent.js +5 -5
  207. package/lib/{shared → esm/shared}/VideoSplash/SplashButton/SplashButton.js +9 -6
  208. package/lib/{shared → esm/shared}/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +17 -8
  209. package/lib/{shared → esm/shared}/VideoSplash/VideoSplash.js +6 -5
  210. package/lib/{utils → esm/utils}/index.js +1 -2
  211. package/lib/{utils → esm/utils}/ssr.js +1 -4
  212. package/package.json +17 -16
  213. package/src/Badge/Badge.jsx +2 -3
  214. package/src/BlockQuote/BlockQuote.jsx +2 -3
  215. package/src/Breadcrumbs/Breadcrumbs.jsx +2 -3
  216. package/src/Breadcrumbs/Item/Item.jsx +2 -3
  217. package/src/Callout/Callout.jsx +2 -4
  218. package/src/Card/Card.jsx +1 -3
  219. package/src/Card/CardContent.jsx +2 -3
  220. package/src/Card/CardFooter.jsx +2 -3
  221. package/src/Countdown/Countdown.jsx +62 -36
  222. package/src/Countdown/Segment.jsx +1 -3
  223. package/src/DatePicker/CalendarContainer.jsx +1 -3
  224. package/src/DatePicker/DatePicker.jsx +2 -3
  225. package/src/DatePicker/reactDatesCss.js +1 -3
  226. package/src/Disclaimer/Disclaimer.jsx +2 -3
  227. package/src/Footnote/Footnote.jsx +2 -10
  228. package/src/Footnote/FootnoteLink.jsx +2 -3
  229. package/src/NavigationBar/NavigationBar.jsx +2 -3
  230. package/src/NavigationBar/NavigationItem.jsx +2 -3
  231. package/src/OrderedList/Item.jsx +2 -3
  232. package/src/OrderedList/ItemBase.jsx +1 -3
  233. package/src/OrderedList/OrderedList.jsx +2 -3
  234. package/src/OrderedList/OrderedListBase.jsx +1 -3
  235. package/src/Paragraph/Paragraph.jsx +2 -4
  236. package/src/PreviewCard/PreviewCard.jsx +1 -3
  237. package/src/PriceLockup/PriceLockup.jsx +2 -3
  238. package/src/Progress/ProgressBar.jsx +1 -3
  239. package/src/QuantitySelector/styles.js +1 -3
  240. package/src/Ribbon/Ribbon.jsx +2 -3
  241. package/src/Span/Span.jsx +2 -4
  242. package/src/Spinner/Spinner.jsx +2 -3
  243. package/src/Spinner/SpinnerContent.jsx +2 -3
  244. package/src/StoryCard/StoryCard.jsx +1 -3
  245. package/src/Table/Cell.jsx +4 -5
  246. package/src/Table/Row.jsx +13 -2
  247. package/src/Table/Table.jsx +14 -5
  248. package/src/TermsAndConditions/ExpandCollapse.jsx +1 -3
  249. package/src/TermsAndConditions/TermsAndConditions.jsx +2 -3
  250. package/src/Testimonial/Testimonial.jsx +2 -3
  251. package/src/Toast/Toast.jsx +2 -3
  252. package/src/Video/ControlBar/ControlBar.jsx +2 -4
  253. package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +2 -4
  254. package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +2 -4
  255. package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +2 -4
  256. package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +2 -4
  257. package/src/Video/MiddleControlButton/MiddleControlButton.jsx +2 -4
  258. package/src/Video/Video.jsx +2 -4
  259. package/src/VideoPicker/VideoPicker.jsx +2 -4
  260. package/src/VideoPicker/VideoPickerThumbnail.jsx +1 -3
  261. package/src/WaffleGrid/WaffleGrid.jsx +2 -3
  262. package/src/WebVideo/WebVideo.jsx +3 -4
  263. package/src/index.js +1 -1
  264. package/src/shared/FullBleedContent/FullBleedContent.jsx +1 -3
  265. package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +1 -3
  266. package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +1 -4
  267. package/src/shared/VideoSplash/VideoSplash.jsx +2 -3
  268. package/src/utils/index.js +1 -3
  269. package/src/utils/ssr.js +1 -2
  270. package/lib/DatePicker/reactDatesCss.js +0 -830
  271. package/lib/QuantitySelector/styles.js +0 -18
  272. package/lib/Table/Row.js +0 -19
  273. package/lib/utils/theming/styled-components.js +0 -26
  274. package/src/utils/theming/styled-components.js +0 -23
  275. /package/lib/{Badge → esm/Badge}/index.js +0 -0
  276. /package/lib/{BlockQuote → esm/BlockQuote}/index.js +0 -0
  277. /package/lib/{Breadcrumbs → esm/Breadcrumbs}/index.js +0 -0
  278. /package/lib/{Callout → esm/Callout}/index.js +0 -0
  279. /package/lib/{Card → esm/Card}/index.js +0 -0
  280. /package/lib/{Countdown → esm/Countdown}/constants.js +0 -0
  281. /package/lib/{Countdown → esm/Countdown}/dictionary.js +0 -0
  282. /package/lib/{Countdown → esm/Countdown}/index.js +0 -0
  283. /package/lib/{Countdown → esm/Countdown}/types.js +0 -0
  284. /package/lib/{Countdown → esm/Countdown}/useCountdown.js +0 -0
  285. /package/lib/{DatePicker → esm/DatePicker}/dictionary.js +0 -0
  286. /package/lib/{DatePicker → esm/DatePicker}/index.js +0 -0
  287. /package/lib/{Disclaimer → esm/Disclaimer}/index.js +0 -0
  288. /package/lib/{Footnote → esm/Footnote}/dictionary.js +0 -0
  289. /package/lib/{Footnote → esm/Footnote}/index.js +0 -0
  290. /package/lib/{IconButton → esm/IconButton}/IconButton.js +0 -0
  291. /package/lib/{IconButton → esm/IconButton}/index.js +0 -0
  292. /package/lib/{Image → esm/Image}/Image.js +0 -0
  293. /package/lib/{Image → esm/Image}/index.js +0 -0
  294. /package/lib/{Image → esm/Image}/server.js +0 -0
  295. /package/lib/{List → esm/List}/List.js +0 -0
  296. /package/lib/{List → esm/List}/ListItem.js +0 -0
  297. /package/lib/{List → esm/List}/index.js +0 -0
  298. /package/lib/{NavigationBar → esm/NavigationBar}/NavigationSubMenu.js +0 -0
  299. /package/lib/{NavigationBar → esm/NavigationBar}/collapseItems.js +0 -0
  300. /package/lib/{NavigationBar → esm/NavigationBar}/index.js +0 -0
  301. /package/lib/{NavigationBar → esm/NavigationBar}/resolveItemSelection.js +0 -0
  302. /package/lib/{OptimizeImage → esm/OptimizeImage}/OptimizeImage.js +0 -0
  303. /package/lib/{OptimizeImage → esm/OptimizeImage}/index.js +0 -0
  304. /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/getFallbackUrl.js +0 -0
  305. /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/getImageUrls.js +0 -0
  306. /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/getOptimizedUrl.js +0 -0
  307. /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/hasWebpSupport.js +0 -0
  308. /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/index.js +0 -0
  309. /package/lib/{OptimizeImage → esm/OptimizeImage}/utils/isSvgUrl.js +0 -0
  310. /package/lib/{OrderedList → esm/OrderedList}/constants.js +0 -0
  311. /package/lib/{OrderedList → esm/OrderedList}/index.js +0 -0
  312. /package/lib/{Paragraph → esm/Paragraph}/index.js +0 -0
  313. /package/lib/{PreviewCard → esm/PreviewCard}/AuthorDate.js +0 -0
  314. /package/lib/{PreviewCard → esm/PreviewCard}/index.js +0 -0
  315. /package/lib/{PriceLockup → esm/PriceLockup}/index.js +0 -0
  316. /package/lib/{PriceLockup → esm/PriceLockup}/tokens.js +0 -0
  317. /package/lib/{Progress → esm/Progress}/index.js +0 -0
  318. /package/lib/{QuantitySelector → esm/QuantitySelector}/QuantitySelector.js +0 -0
  319. /package/lib/{QuantitySelector → esm/QuantitySelector}/SideButton.js +0 -0
  320. /package/lib/{QuantitySelector → esm/QuantitySelector}/dictionary.js +0 -0
  321. /package/lib/{QuantitySelector → esm/QuantitySelector}/index.js +0 -0
  322. /package/lib/{ResponsiveImage → esm/ResponsiveImage}/ResponsiveImage.js +0 -0
  323. /package/lib/{ResponsiveImage → esm/ResponsiveImage}/index.js +0 -0
  324. /package/lib/{Ribbon → esm/Ribbon}/index.js +0 -0
  325. /package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonImage.js +0 -0
  326. /package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonProvider.js +0 -0
  327. /package/lib/{SkeletonProvider → esm/SkeletonProvider}/SkeletonTypography.js +0 -0
  328. /package/lib/{SkeletonProvider → esm/SkeletonProvider}/index.js +0 -0
  329. /package/lib/{Span → esm/Span}/index.js +0 -0
  330. /package/lib/{Spinner → esm/Spinner}/constants.js +0 -0
  331. /package/lib/{Spinner → esm/Spinner}/index.js +0 -0
  332. /package/lib/{StoryCard → esm/StoryCard}/index.js +0 -0
  333. /package/lib/{Table → esm/Table}/Body.js +0 -0
  334. /package/lib/{Table → esm/Table}/Header.js +0 -0
  335. /package/lib/{Table → esm/Table}/SubHeading.js +0 -0
  336. /package/lib/{Table → esm/Table}/index.js +0 -0
  337. /package/lib/{TermsAndConditions → esm/TermsAndConditions}/dictionary.js +0 -0
  338. /package/lib/{TermsAndConditions → esm/TermsAndConditions}/index.js +0 -0
  339. /package/lib/{Testimonial → esm/Testimonial}/index.js +0 -0
  340. /package/lib/{Toast → esm/Toast}/index.js +0 -0
  341. /package/lib/{Video → esm/Video}/index.js +0 -0
  342. /package/lib/{Video → esm/Video}/videoText.js +0 -0
  343. /package/lib/{VideoPicker → esm/VideoPicker}/VideoPickerPlayer.js +0 -0
  344. /package/lib/{VideoPicker → esm/VideoPicker}/VideoSlider.js +0 -0
  345. /package/lib/{VideoPicker → esm/VideoPicker}/index.js +0 -0
  346. /package/lib/{VideoPicker → esm/VideoPicker}/videoPropType.js +0 -0
  347. /package/lib/{WaffleGrid → esm/WaffleGrid}/index.js +0 -0
  348. /package/lib/{WebVideo → esm/WebVideo}/index.js +0 -0
  349. /package/lib/{WebVideo → esm/WebVideo}/utils/index.js +0 -0
  350. /package/lib/{baseExports.js → esm/baseExports.js} +0 -0
  351. /package/lib/{server.js → esm/server.js} +0 -0
  352. /package/lib/{shared → esm/shared}/ConditionalWrapper/ConditionalWrapper.js +0 -0
  353. /package/lib/{shared → esm/shared}/ConditionalWrapper/index.js +0 -0
  354. /package/lib/{shared → esm/shared}/FullBleedContent/getFullBleedBorderRadius.js +0 -0
  355. /package/lib/{shared → esm/shared}/FullBleedContent/index.js +0 -0
  356. /package/lib/{shared → esm/shared}/FullBleedContent/useFullBleedContentProps.js +0 -0
  357. /package/lib/{shared → esm/shared}/VideoSplash/helpers.js +0 -0
  358. /package/lib/{utils → esm/utils}/isElementFocusable.js +0 -0
  359. /package/lib/{utils → esm/utils}/logger.js +0 -0
  360. /package/lib/{utils → esm/utils}/media.js +0 -0
  361. /package/lib/{utils → esm/utils}/renderStructuredContent.js +0 -0
  362. /package/lib/{utils → esm/utils}/scrollToAnchor.js +0 -0
  363. /package/lib/{utils → esm/utils}/theming/get-theme-from-server.js +0 -0
  364. /package/lib/{utils → esm/utils}/theming/with-client-theme.js +0 -0
  365. /package/lib/{utils → esm/utils}/theming/with-server-theme.js +0 -0
  366. /package/lib/{utils → esm/utils}/transforms.js +0 -0
  367. /package/lib/{utils → esm/utils}/useOverlaidPosition.js +0 -0
  368. /package/lib/{utils → esm/utils}/useTypographyTheme.js +0 -0
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _componentsBase = require("@telus-uds/components-base");
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+ var _utils = require("../utils");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
17
+ const transform = property => (from, to) => (0, _styledComponents.keyframes)(["from{", ":", ";}to{", ":", ";}"], property, from, property, to);
18
+ const slideDown = property => function (from, to) {
19
+ let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : to;
20
+ return (0, _styledComponents.keyframes)(["0%{", ":", ";}99%{", ":", ";}100%{", ":", ";}"], property, from, property, to, property, end);
21
+ };
22
+ const animation = props => (0, _styledComponents.css)(["", " 1s ease-in-out 2s forwards,", " 1s ease-in-out 2s forwards,", " 1s ease-in-out 2s forwards,", " 1s ease-in-out 3.2s forwards;& *{animation:", " 1s ease-in-out 3s forwards;}& > a div{animation:", " 1s ease-in-out 3s forwards;}& > a svg{animation:", " 1s ease-in-out 3s forwards;}& > a div{animation:", " 1s ease-in-out 3s forwards;}"], slideDown('height')(`${props.animationHeightBefore}px`, `${props.animationHeightAfter}px`, 'auto'), transform('padding-bottom')(`${props.animationPaddingBottomBefore}px`, `${props.animationPaddingBottomAfter}px`), transform('padding-top')(`${props.animationPaddingTopBefore}px`, `${props.animationPaddingTopAfter}px`), transform('background')(props.animationBackgroundColorBefore, props.animationBackgroundColorAfter), transform('color')(props.animationColorBefore, props.animationColorAfter), transform('color')(props.animationDivColorBefore, props.animationDivColorAfter), transform('fill')(props.animationFillColorBefore, props.animationFillColorAfter), transform('color')(props.animationFillColorBefore, props.animationFillColorAfter));
23
+ const ToastContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
24
+ displayName: "Toast__ToastContainer",
25
+ componentId: "components-web__sc-p78jdh-0"
26
+ })(["display:flex;justify-content:center;align-items:center;flex-wrap:wrap;padding-left:", "px;padding-right:", "px;background:", ";gap:", ";height:0;overflow:hidden;animation:", ";"], _ref => {
27
+ let {
28
+ padding
29
+ } = _ref;
30
+ return padding;
31
+ }, _ref2 => {
32
+ let {
33
+ padding
34
+ } = _ref2;
35
+ return padding;
36
+ }, _ref3 => {
37
+ let {
38
+ containerBackgroundColor
39
+ } = _ref3;
40
+ return containerBackgroundColor;
41
+ }, _ref4 => {
42
+ let {
43
+ containerGap
44
+ } = _ref4;
45
+ return containerGap;
46
+ }, animation);
47
+ const Toast = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
48
+ let {
49
+ toast,
50
+ copy,
51
+ headline,
52
+ link,
53
+ tokens,
54
+ variant = {},
55
+ ...rest
56
+ } = _ref5;
57
+ // viewport hook added to work adjust the padding to different sizes
58
+ const viewport = (0, _componentsBase.useViewport)();
59
+ const {
60
+ containerBackgroundColor,
61
+ containerGap,
62
+ animationHeightBefore,
63
+ animationHeightAfter,
64
+ animationPaddingBottomBefore,
65
+ animationPaddingBottomAfter,
66
+ animationPaddingTopBefore,
67
+ animationPaddingTopAfter,
68
+ animationBackgroundColorBefore,
69
+ animationBackgroundColorAfter,
70
+ animationColorBefore,
71
+ animationColorAfter,
72
+ chevronlinkFontWeight,
73
+ ...extraTokens
74
+ } = (0, _componentsBase.useThemeTokens)('Toast', tokens, variant, {
75
+ viewport
76
+ });
77
+
78
+ // inherit ChevronLink tokens for animation colors
79
+ const {
80
+ color: chevronDefaultColor
81
+ } = (0, _componentsBase.useThemeTokens)('ChevronLink', {}, {});
82
+ const {
83
+ color: chevronInverseColor
84
+ } = (0, _componentsBase.useThemeTokens)('ChevronLink', {}, {
85
+ inverse: true
86
+ });
87
+ if (!toast) {
88
+ return null;
89
+ }
90
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ToastContainer, {
91
+ containerBackgroundColor: containerBackgroundColor,
92
+ containerGap: containerGap,
93
+ animationHeightBefore: animationHeightBefore,
94
+ animationHeightAfter: animationHeightAfter,
95
+ animationPaddingBottomBefore: animationPaddingBottomBefore,
96
+ animationPaddingBottomAfter: animationPaddingBottomAfter,
97
+ animationPaddingTopBefore: animationPaddingTopBefore,
98
+ animationPaddingTopAfter: animationPaddingTopAfter,
99
+ animationBackgroundColorBefore: animationBackgroundColorBefore,
100
+ animationBackgroundColorAfter: animationBackgroundColorAfter,
101
+ animationColorBefore: animationColorBefore,
102
+ animationColorAfter: animationColorAfter,
103
+ animationFillColorBefore: chevronInverseColor,
104
+ animationFillColorAfter: chevronDefaultColor,
105
+ ref: ref,
106
+ ...extraTokens,
107
+ ...selectProps(rest),
108
+ children: [headline && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
109
+ variant: {
110
+ bold: true,
111
+ inverse: true
112
+ },
113
+ children: headline
114
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Spacer, {
115
+ space: 2,
116
+ direction: "row"
117
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
118
+ variant: {
119
+ inverse: true
120
+ },
121
+ children: copy
122
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Spacer, {
123
+ space: 2,
124
+ direction: "row"
125
+ }), link && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ChevronLink, {
126
+ variant: {
127
+ inverse: true
128
+ },
129
+ tokens: {
130
+ blockFontWeight: chevronlinkFontWeight
131
+ },
132
+ href: link.href,
133
+ LinkRouter: link.LinkRouter,
134
+ linkRouterProps: link.linkRouterProps,
135
+ children: link.text
136
+ })]
137
+ });
138
+ });
139
+ Toast.displayName = 'Toast';
140
+ Toast.propTypes = {
141
+ ...selectedSystemPropTypes,
142
+ tokens: (0, _componentsBase.getTokensPropType)('Toast'),
143
+ /**
144
+ * If true, the toast will be displayed
145
+ */
146
+ toast: _propTypes.default.bool,
147
+ /**
148
+ * The copy to display in the toast
149
+ */
150
+ copy: _propTypes.default.string.isRequired,
151
+ /**
152
+ * The headline to display in the toast (before copy)
153
+ */
154
+ headline: _propTypes.default.string,
155
+ /**
156
+ * The link to display in the toast (after copy)
157
+ */
158
+ link: _propTypes.default.shape({
159
+ href: _propTypes.default.string.isRequired,
160
+ text: _propTypes.default.string.isRequired,
161
+ LinkRouter: _componentsBase.withLinkRouter.propTypes?.LinkRouter,
162
+ linkRouterProps: _componentsBase.withLinkRouter.propTypes?.linkRouterProps
163
+ })
164
+ };
165
+ var _default = exports.default = Toast;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _Toast = _interopRequireDefault(require("./Toast"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _default = exports.default = _Toast.default;
@@ -0,0 +1,294 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _componentsBase = require("@telus-uds/components-base");
10
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
11
+ var _VideoProgressBar = _interopRequireDefault(require("./Controls/VideoProgressBar/VideoProgressBar"));
12
+ var _VolumeSlider = _interopRequireDefault(require("./Controls/VolumeSlider/VolumeSlider"));
13
+ var _VideoButton = _interopRequireDefault(require("./Controls/VideoButton/VideoButton"));
14
+ var _VideoMenu = _interopRequireDefault(require("./Controls/VideoMenu/VideoMenu"));
15
+ var _videoText = _interopRequireDefault(require("../videoText"));
16
+ var _utils = require("../../utils");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
+ const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
20
+ const getIcon = icon => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Icon, {
21
+ icon: icon
22
+ });
23
+ const ControlBarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
24
+ displayName: "ControlBar__ControlBarContainer",
25
+ componentId: "components-web__sc-13y61ky-0"
26
+ })(_ref => {
27
+ let {
28
+ isHidden,
29
+ isMobile
30
+ } = _ref;
31
+ return {
32
+ width: '100%',
33
+ position: 'relative',
34
+ transition: 'opacity 0.4s',
35
+ opacity: isHidden ? 0 : 1,
36
+ display: isMobile ? 'none' : undefined
37
+ };
38
+ });
39
+ const StyledControlBar = /*#__PURE__*/_styledComponents.default.div.withConfig({
40
+ displayName: "ControlBar__StyledControlBar",
41
+ componentId: "components-web__sc-13y61ky-1"
42
+ })(_ref2 => {
43
+ let {
44
+ padding,
45
+ height
46
+ } = _ref2;
47
+ return {
48
+ boxSizing: 'border-box',
49
+ position: 'absolute',
50
+ width: '100%',
51
+ height,
52
+ padding,
53
+ bottom: 0,
54
+ backgroundColor: 'rgba(42, 44, 46, 0.85)',
55
+ // TODO: replace with opaque greyThunder
56
+ margin: 'auto',
57
+ display: 'flex',
58
+ justifyContent: 'space-between',
59
+ zIndex: 9
60
+ };
61
+ });
62
+ const VideoProgressBarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
63
+ displayName: "ControlBar__VideoProgressBarContainer",
64
+ componentId: "components-web__sc-13y61ky-2"
65
+ })({
66
+ display: 'flex',
67
+ flexGrow: 1
68
+ });
69
+ const MenuContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
70
+ displayName: "ControlBar__MenuContainer",
71
+ componentId: "components-web__sc-13y61ky-3"
72
+ })(_ref3 => {
73
+ let {
74
+ isOpen,
75
+ menuBottom,
76
+ menuRight,
77
+ menuMarginLeft
78
+ } = _ref3;
79
+ return {
80
+ position: 'absolute',
81
+ bottom: menuBottom,
82
+ right: menuRight,
83
+ display: isOpen ? 'block' : 'none',
84
+ marginLeft: menuMarginLeft
85
+ };
86
+ });
87
+ const ControlBar = _ref4 => {
88
+ let {
89
+ videoPlayer,
90
+ videoPlayerContainer,
91
+ sources,
92
+ tracks,
93
+ videoPlaying,
94
+ videoUnplayed,
95
+ videoBufferEnd,
96
+ isHidden = false,
97
+ videoLength,
98
+ videoCurrentTime,
99
+ videoCurrentVolume,
100
+ videoIsMuted,
101
+ setVolume,
102
+ isMobile,
103
+ tracksAvailable,
104
+ togglePlayPause,
105
+ setSeek,
106
+ toggleMute,
107
+ toggleFullscreen,
108
+ videoIsFullscreen,
109
+ setTextTracks,
110
+ selectedTextTrack,
111
+ resetInactivityTimer,
112
+ videoQuality,
113
+ setVideoQuality,
114
+ captionsMenuOpen,
115
+ setCaptionsMenuOpen,
116
+ qualityMenuOpen,
117
+ setQualityMenuOpen,
118
+ clearInactivityTimer,
119
+ copy,
120
+ compactModeThreshold,
121
+ videoPlayerWidth,
122
+ tokens,
123
+ variant,
124
+ ...rest
125
+ } = _ref4;
126
+ const viewport = (0, _componentsBase.useViewport)();
127
+ const {
128
+ paddingTop,
129
+ paddingBottom,
130
+ paddingLeft,
131
+ paddingRight,
132
+ menuBottom,
133
+ menuRight,
134
+ menuMarginLeft,
135
+ captionsIcon,
136
+ settingsIcon,
137
+ minimizeIcon,
138
+ maximizeIcon,
139
+ height
140
+ } = (0, _componentsBase.useThemeTokens)('VideoControlBar', tokens, variant, {
141
+ viewport
142
+ });
143
+ const parseVideoQuality = () => {
144
+ return sources.map(source => {
145
+ if (!source.isFallback) {
146
+ return {
147
+ name: source.qualityName,
148
+ value: source.qualityRank
149
+ };
150
+ }
151
+ return {};
152
+ });
153
+ };
154
+ const parseTracks = () => {
155
+ const parsed = tracks.map((track, trackNumber) => {
156
+ return {
157
+ name: _videoText.default[copy][track.language],
158
+ value: trackNumber
159
+ };
160
+ });
161
+ parsed.unshift({
162
+ name: _videoText.default[copy].captionsNone,
163
+ value: -1
164
+ });
165
+ return parsed;
166
+ };
167
+ const menuContainerStyleProps = {
168
+ menuBottom,
169
+ menuRight,
170
+ menuMarginLeft
171
+ };
172
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ControlBarContainer, {
173
+ isHidden: isHidden,
174
+ isMobile: isMobile,
175
+ ...selectProps(rest),
176
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledControlBar, {
177
+ padding: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
178
+ height: `${height}px`,
179
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(VideoProgressBarContainer, {
180
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoProgressBar.default, {
181
+ copy: copy,
182
+ videoPlayer: videoPlayer,
183
+ playing: videoPlaying,
184
+ videoLength: videoLength,
185
+ videoCurrentTime: videoCurrentTime,
186
+ videoBufferEnd: videoBufferEnd,
187
+ setSeek: setSeek,
188
+ resetInactivityTimer: resetInactivityTimer
189
+ })
190
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VolumeSlider.default, {
191
+ videoPlayer: videoPlayer,
192
+ videoCurrentVolume: videoCurrentVolume,
193
+ setVolume: setVolume,
194
+ videoIsMuted: videoIsMuted,
195
+ toggleMute: toggleMute,
196
+ resetInactivityTimer: resetInactivityTimer,
197
+ copy: copy,
198
+ compactModeThreshold: compactModeThreshold,
199
+ videoPlayerWidth: videoPlayerWidth,
200
+ disableFocus: videoUnplayed
201
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
202
+ space: 3,
203
+ direction: "row",
204
+ children: [tracksAvailable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoButton.default, {
205
+ disableFocus: videoUnplayed,
206
+ label: _videoText.default[copy].captionsToggle,
207
+ icon: getIcon(captionsIcon),
208
+ onClick: () => {
209
+ setCaptionsMenuOpen(!captionsMenuOpen);
210
+ setQualityMenuOpen(false);
211
+ clearInactivityTimer();
212
+ },
213
+ onFocus: resetInactivityTimer,
214
+ onBlur: resetInactivityTimer
215
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoButton.default, {
216
+ disableFocus: videoUnplayed,
217
+ label: _videoText.default[copy].qualityToggle,
218
+ icon: getIcon(settingsIcon),
219
+ onClick: () => {
220
+ setQualityMenuOpen(!qualityMenuOpen);
221
+ setCaptionsMenuOpen(false);
222
+ clearInactivityTimer();
223
+ },
224
+ onFocus: resetInactivityTimer,
225
+ onBlur: resetInactivityTimer
226
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoButton.default, {
227
+ disableFocus: videoUnplayed,
228
+ label: _videoText.default[copy].fullScreenToggle,
229
+ icon: videoIsFullscreen ? getIcon(minimizeIcon) : getIcon(maximizeIcon),
230
+ onClick: toggleFullscreen,
231
+ onFocus: resetInactivityTimer,
232
+ onBlur: resetInactivityTimer
233
+ })]
234
+ }), captionsMenuOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuContainer, {
235
+ isOpen: captionsMenuOpen,
236
+ ...menuContainerStyleProps,
237
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoMenu.default, {
238
+ menuLabel: _videoText.default[copy].captionsDialogue,
239
+ menuOptions: parseTracks(),
240
+ setSelection: setTextTracks,
241
+ selectedItem: selectedTextTrack,
242
+ copy: copy
243
+ })
244
+ }), qualityMenuOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuContainer, {
245
+ isOpen: qualityMenuOpen,
246
+ ...menuContainerStyleProps,
247
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoMenu.default, {
248
+ menuLabel: _videoText.default[copy].qualityDialogue,
249
+ menuOptions: parseVideoQuality(),
250
+ setSelection: setVideoQuality,
251
+ selectedItem: videoQuality,
252
+ copy: copy
253
+ })
254
+ })]
255
+ })
256
+ });
257
+ };
258
+ ControlBar.propTypes = {
259
+ ...selectedSystemPropTypes,
260
+ videoPlayer: _propTypes.default.object.isRequired,
261
+ videoPlayerContainer: _propTypes.default.object.isRequired,
262
+ sources: _propTypes.default.array.isRequired,
263
+ tracks: _propTypes.default.array,
264
+ videoPlaying: _propTypes.default.bool.isRequired,
265
+ videoUnplayed: _propTypes.default.bool.isRequired,
266
+ videoBufferEnd: _propTypes.default.number.isRequired,
267
+ isHidden: _propTypes.default.bool,
268
+ videoLength: _propTypes.default.number.isRequired,
269
+ videoCurrentTime: _propTypes.default.number.isRequired,
270
+ videoCurrentVolume: _propTypes.default.number.isRequired,
271
+ videoIsMuted: _propTypes.default.bool.isRequired,
272
+ setVolume: _propTypes.default.func.isRequired,
273
+ isMobile: _propTypes.default.bool.isRequired,
274
+ tracksAvailable: _propTypes.default.bool.isRequired,
275
+ togglePlayPause: _propTypes.default.func.isRequired,
276
+ setSeek: _propTypes.default.func.isRequired,
277
+ toggleMute: _propTypes.default.func.isRequired,
278
+ toggleFullscreen: _propTypes.default.func.isRequired,
279
+ videoIsFullscreen: _propTypes.default.bool.isRequired,
280
+ setTextTracks: _propTypes.default.func.isRequired,
281
+ selectedTextTrack: _propTypes.default.number.isRequired,
282
+ resetInactivityTimer: _propTypes.default.func.isRequired,
283
+ videoQuality: _propTypes.default.number.isRequired,
284
+ setVideoQuality: _propTypes.default.func.isRequired,
285
+ captionsMenuOpen: _propTypes.default.bool.isRequired,
286
+ setCaptionsMenuOpen: _propTypes.default.func.isRequired,
287
+ qualityMenuOpen: _propTypes.default.bool.isRequired,
288
+ setQualityMenuOpen: _propTypes.default.func.isRequired,
289
+ clearInactivityTimer: _propTypes.default.func.isRequired,
290
+ copy: _propTypes.default.oneOf(['en', 'fr']).isRequired,
291
+ compactModeThreshold: _propTypes.default.number.isRequired,
292
+ videoPlayerWidth: _propTypes.default.number.isRequired
293
+ };
294
+ var _default = exports.default = ControlBar;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _componentsBase = require("@telus-uds/components-base");
10
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
11
+ var _utils = require("../../../../utils");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
15
+ const StyledButton = /*#__PURE__*/_styledComponents.default.button.withConfig({
16
+ displayName: "VideoButton__StyledButton",
17
+ componentId: "components-web__sc-kfw0tr-0"
18
+ })(_ref => {
19
+ let {
20
+ color
21
+ } = _ref;
22
+ return {
23
+ background: 'none',
24
+ border: 'none',
25
+ padding: 0,
26
+ cursor: 'pointer',
27
+ display: 'inline-flex',
28
+ alignItems: 'stretch',
29
+ 'svg path': {
30
+ fill: color
31
+ }
32
+ };
33
+ });
34
+ const VideoButton = _ref2 => {
35
+ let {
36
+ icon,
37
+ label,
38
+ disableFocus,
39
+ children,
40
+ tokens,
41
+ variant,
42
+ ...rest
43
+ } = _ref2;
44
+ const {
45
+ color
46
+ } = (0, _componentsBase.useThemeTokens)('VideoButton', tokens, variant);
47
+ const handleOnKeyDown = event => {
48
+ const key = event.key || event.keyCode;
49
+
50
+ // Disables playing by space bar, as that can be used to click a button
51
+ if (key === ' ' || key === 32) {
52
+ event.stopPropagation();
53
+ }
54
+ };
55
+ const handleClick = event => {
56
+ event.preventDefault();
57
+ rest.onClick?.(event);
58
+ };
59
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledButton, {
60
+ "aria-label": label,
61
+ onKeyDown: handleOnKeyDown,
62
+ tabIndex: disableFocus ? '-1' : undefined,
63
+ color: color,
64
+ ...selectProps(rest),
65
+ onClick: handleClick,
66
+ children: [icon, children]
67
+ });
68
+ };
69
+ VideoButton.propTypes = {
70
+ ...selectedSystemPropTypes,
71
+ icon: _propTypes.default.element.isRequired,
72
+ label: _propTypes.default.string.isRequired,
73
+ disableFocus: _propTypes.default.bool.isRequired,
74
+ children: _propTypes.default.node
75
+ };
76
+ var _default = exports.default = VideoButton;