@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,99 @@
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 _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ // Passes React Native-oriented system props through UDS Progress
14
+ const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_componentsBase.a11yProps, _componentsBase.viewProps]);
15
+ const {
16
+ Bar: ProgressBarBase
17
+ } = _componentsBase.Progress;
18
+ const Gradient = /*#__PURE__*/_styledComponents.default.div.attrs({
19
+ 'data-testid': 'ProgressBar-Gradient'
20
+ }).withConfig({
21
+ displayName: "ProgressBar__Gradient",
22
+ componentId: "components-web__sc-1vmzyq5-0"
23
+ })(_ref => {
24
+ let {
25
+ gradient: {
26
+ angle,
27
+ stops,
28
+ type
29
+ },
30
+ borderRadius,
31
+ shadow
32
+ } = _ref;
33
+ return {
34
+ height: '100%',
35
+ width: '100%',
36
+ background: `${type}-gradient(${angle}deg, ${stops[0].color}, ${stops[1].color})`,
37
+ borderRadius,
38
+ ...(0, _componentsBase.applyShadowToken)(shadow)
39
+ };
40
+ });
41
+
42
+ /**
43
+ * The `ProgressBar` is a visual representation of linear progression.
44
+ * It provides simple but important information at a quick glance.
45
+ * This is a Web-specific progress bar.
46
+ *
47
+ * ## Component API
48
+ *
49
+ * Use props and tokens from the base ProgressBar component. The difference is that the
50
+ * `gradient` is being used here to provide gradient filling.
51
+ *
52
+ */
53
+
54
+ const ProgressBar = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
55
+ let {
56
+ percentage,
57
+ tokens,
58
+ variant,
59
+ offset,
60
+ ...rest
61
+ } = _ref2;
62
+ const themeTokens = (0, _componentsBase.useThemeTokens)('ProgressBar', tokens, variant);
63
+ const selectedProps = selectProps(rest);
64
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ProgressBarBase, {
65
+ percentage: percentage,
66
+ tokens: tokens,
67
+ variant: variant,
68
+ ref: ref,
69
+ offset: offset,
70
+ ...selectedProps,
71
+ children: themeTokens.gradient && /*#__PURE__*/(0, _jsxRuntime.jsx)(Gradient, {
72
+ ...themeTokens
73
+ })
74
+ });
75
+ });
76
+ ProgressBar.displayName = 'ProgressBar';
77
+ ProgressBar.propTypes = {
78
+ ...selectedSystemPropTypes,
79
+ /**
80
+ * Percentage of completion.
81
+ */
82
+ percentage: _propTypes.default.number,
83
+ /**
84
+ * ProgressBar tokens.
85
+ */
86
+ tokens: (0, _componentsBase.getTokensPropType)('ProgressBar'),
87
+ /**
88
+ * ProgressBar variant.
89
+ */
90
+ variant: _componentsBase.variantProp.propType,
91
+ /**
92
+ * Offset position.
93
+ */
94
+ offset: _propTypes.default.shape({
95
+ items: _propTypes.default.number,
96
+ current: _propTypes.default.number
97
+ })
98
+ };
99
+ var _default = exports.default = ProgressBar;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _componentsBase = require("@telus-uds/components-base");
8
+ var _ProgressBar = _interopRequireDefault(require("./ProgressBar"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ _componentsBase.Progress.Bar = _ProgressBar.default;
11
+ var _default = exports.default = _componentsBase.Progress;
@@ -0,0 +1,267 @@
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 _utils = require("../utils");
11
+ var _styles = require("./styles");
12
+ var _dictionary = _interopRequireDefault(require("./dictionary"));
13
+ var _SideButton = _interopRequireDefault(require("./SideButton"));
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ const {
17
+ isNaN
18
+ } = Number;
19
+ const isNumber = value => {
20
+ return typeof value === 'number' && !isNaN(value);
21
+ };
22
+ const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_componentsBase.a11yProps, _utils.htmlAttrs]);
23
+ const QuantitySelector = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
24
+ let {
25
+ id = 'quantity-selector',
26
+ minNumber,
27
+ maxNumber,
28
+ defaultValue,
29
+ value,
30
+ label,
31
+ hint,
32
+ hintPosition = 'inline',
33
+ tooltip,
34
+ onChange,
35
+ dictionary = _dictionary.default,
36
+ accessibilityLabel,
37
+ copy = 'en',
38
+ variant = {
39
+ alternative: false
40
+ },
41
+ tokens,
42
+ testID = 'quantity-selector-testid',
43
+ ...rest
44
+ } = _ref;
45
+ const {
46
+ disabled
47
+ } = variant;
48
+ const [error, setError] = _react.default.useState('');
49
+ const getCopy = (0, _componentsBase.useCopy)({
50
+ dictionary,
51
+ copy
52
+ });
53
+ const getValidatedNumber = numberToEvaluate => {
54
+ if (isNaN(numberToEvaluate)) return null;
55
+ if (isNumber(minNumber) && numberToEvaluate < minNumber) throw getCopy('errors').numberIsTooSmall(minNumber);
56
+ if (isNumber(maxNumber) && numberToEvaluate > maxNumber) throw getCopy('errors').numberIsTooBig(maxNumber);
57
+ return numberToEvaluate;
58
+ };
59
+ const {
60
+ currentValue: number,
61
+ setValue: setNumber
62
+ } = (0, _componentsBase.useInputValue)({
63
+ value: getValidatedNumber(value),
64
+ initialValue: getValidatedNumber(defaultValue),
65
+ onChange
66
+ });
67
+ const isDecreaseEnabled = !disabled && !isNumber(minNumber) || number > minNumber;
68
+ const isIncreaseEnabled = !disabled && !isNumber(maxNumber) || number < maxNumber;
69
+ const inputValue = isNumber(number) ? number.toString() : '';
70
+ const updateNumber = (newNumber, originalInputEvent) => {
71
+ try {
72
+ const validatedNumber = getValidatedNumber(newNumber);
73
+ setNumber(validatedNumber, originalInputEvent);
74
+ setError('');
75
+ } catch (e) {
76
+ setError(e);
77
+ }
78
+ };
79
+ const inputChangeHandler = (textInputValue, event) => {
80
+ if (textInputValue === '') setNumber(null);
81
+ const numberFromTextInput = Number(textInputValue);
82
+ if (isNumber(numberFromTextInput)) {
83
+ updateNumber(numberFromTextInput, event);
84
+ } else {
85
+ setError(getCopy('errors').invalidCharacters);
86
+ }
87
+ };
88
+ const renderLabel = () => label || hint ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.InputLabel, {
89
+ forId: id,
90
+ label: label,
91
+ hint: hint,
92
+ hintPosition: hintPosition,
93
+ tooltip: tooltip
94
+ }) : null;
95
+ const getTokens = (0, _componentsBase.useThemeTokensCallback)('QuantitySelector', tokens, variant);
96
+ const renderTextInput = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.TextInput, {
97
+ nativeID: id,
98
+ value: inputValue,
99
+ defaultValue: defaultValue,
100
+ tokens: textInputState => {
101
+ const {
102
+ inputWidth,
103
+ inputBorderWidth,
104
+ inputBorderColor,
105
+ textColor,
106
+ inputBackgroundColor,
107
+ ...restOfTokens
108
+ } = getTokens({
109
+ ...textInputState
110
+ });
111
+ return {
112
+ ...restOfTokens,
113
+ order: 1,
114
+ borderWidth: inputBorderWidth,
115
+ backgroundColor: inputBackgroundColor,
116
+ color: textColor,
117
+ width: inputWidth,
118
+ borderColor: inputBorderColor,
119
+ borderRadius: 0,
120
+ outerBorderWidth: 0
121
+ };
122
+ },
123
+ onChange: inputChangeHandler
124
+ // Using title as an accessibility workaround
125
+ // given that accessibilityLabel is not available
126
+ ,
127
+ keyboardType: "numeric",
128
+ accessibilityLabel: accessibilityLabel ?? getCopy('accessibility').a11yLabel,
129
+ accessibilityRole: "spinbutton",
130
+ accessibilityValueMax: maxNumber,
131
+ accessibilityValueMin: minNumber,
132
+ accessibilityValueNow: number
133
+ });
134
+ const flexOrder = order => ({
135
+ order
136
+ });
137
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.Box, {
138
+ testID: testID,
139
+ ref: ref,
140
+ ...selectProps(rest),
141
+ children: [renderLabel(), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Spacer, {
142
+ space: 2
143
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.InputWrapper, {
144
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.InputField, {
145
+ children: renderTextInput()
146
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
147
+ style: flexOrder(0),
148
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SideButton.default, {
149
+ isEnabled: isDecreaseEnabled,
150
+ onPress: () => updateNumber(number - 1),
151
+ onDoubleClick: () => updateNumber(number - 1),
152
+ tokens: tokens,
153
+ variant: {
154
+ decrease: true,
155
+ ...variant
156
+ },
157
+ accessibilityLabel: getCopy('accessibility').decreaseButton,
158
+ accessibilityDisabled: !isDecreaseEnabled
159
+ })
160
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
161
+ style: flexOrder(2),
162
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SideButton.default, {
163
+ isEnabled: isIncreaseEnabled,
164
+ onPress: () => updateNumber(number + 1),
165
+ onDoubleClick: () => updateNumber(number + 1),
166
+ accessibilityLabel: getCopy('accessibility').increaseButton,
167
+ accessibilityDisabled: !isIncreaseEnabled,
168
+ tokens: tokens,
169
+ variant: {
170
+ increase: true,
171
+ ...variant
172
+ }
173
+ })
174
+ })]
175
+ }), error ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Box, {
176
+ vertical: 2,
177
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Feedback, {
178
+ validation: "error",
179
+ children: error
180
+ })
181
+ }) : null]
182
+ });
183
+ });
184
+
185
+ // If a language dictionary entry is provided, it must contain every key
186
+ const dictionaryContentShape = _propTypes.default.shape({
187
+ accessibility: _propTypes.default.shape({
188
+ a11yLabel: _propTypes.default.string.isRequired,
189
+ increaseButton: _propTypes.default.string.isRequired,
190
+ decreaseButton: _propTypes.default.string.isRequired
191
+ }).isRequired,
192
+ errors: _propTypes.default.shape({
193
+ numberIsTooSmall: _propTypes.default.func.isRequired,
194
+ numberIsTooBig: _propTypes.default.func.isRequired,
195
+ invalidCharacters: _propTypes.default.string.isRequired
196
+ }).isRequired
197
+ });
198
+ QuantitySelector.displayName = 'QuantitySelector';
199
+ QuantitySelector.propTypes = {
200
+ ...selectedSystemPropTypes,
201
+ /**
202
+ * The id of the input field
203
+ */
204
+ id: _propTypes.default.string,
205
+ /**
206
+ * The minimum number allowed
207
+ */
208
+ minNumber: _propTypes.default.number,
209
+ /**
210
+ * The maximum number allowed
211
+ */
212
+ maxNumber: _propTypes.default.number,
213
+ /**
214
+ * The callback function that is called when the value of the input field changes
215
+ */
216
+ onChange: _propTypes.default.func,
217
+ /**
218
+ * The default value of the input field
219
+ */
220
+ defaultValue: _propTypes.default.number,
221
+ /**
222
+ * If the input's state is to be controlled by a parent component, use this prop
223
+ * together with the `onChange` to pass down and update the lifted state.
224
+ */
225
+ value: _propTypes.default.number,
226
+ /**
227
+ * The label of the input field
228
+ */
229
+ label: _propTypes.default.string,
230
+ /**
231
+ * The hint of the input field
232
+ */
233
+ hint: _propTypes.default.string,
234
+ /**
235
+ * The position of the hint. Could be shown along side the label or below it
236
+ */
237
+ hintPosition: _propTypes.default.oneOf(['inline', 'below']),
238
+ /**
239
+ * Adds a question mark which will display a tooltip when clicked
240
+ */
241
+ tooltip: _propTypes.default.string,
242
+ /**
243
+ * The accessibility label of the input field
244
+ */
245
+ accessibilityLabel: _propTypes.default.string,
246
+ /**
247
+ * The dictionary object containing the content for the input field
248
+ */
249
+ dictionary: _propTypes.default.shape({
250
+ en: dictionaryContentShape,
251
+ fr: dictionaryContentShape
252
+ }),
253
+ /**
254
+ * The language to use for the copy.
255
+ */
256
+ copy: _propTypes.default.oneOfType([_propTypes.default.oneOf(['en', 'fr'])]),
257
+ variant: _propTypes.default.exact({
258
+ alternative: _propTypes.default.bool,
259
+ disabled: _propTypes.default.bool
260
+ }),
261
+ tokens: (0, _componentsBase.getTokensPropType)('QuantitySelector'),
262
+ /**
263
+ * Sets `data-testid` attribute on the input field for testing purposes.
264
+ */
265
+ testID: _propTypes.default.string
266
+ };
267
+ var _default = exports.default = QuantitySelector;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _componentsBase = require("@telus-uds/components-base");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ const SideButton = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
13
+ let {
14
+ isEnabled = true,
15
+ onPress = () => {},
16
+ onDoubleClick = () => {},
17
+ accessibilityLabel = '',
18
+ accessibilityDisabled = false,
19
+ tokens = {},
20
+ variant = {}
21
+ } = _ref;
22
+ const getTokens = (0, _componentsBase.useThemeTokensCallback)('QuantitySelectorSideButton', tokens, variant);
23
+ const getButtonTokens = _ref2 => {
24
+ let {
25
+ buttonState,
26
+ disabled
27
+ } = _ref2;
28
+ const {
29
+ borderRadius,
30
+ borderTopLeftRadius,
31
+ borderTopRightRadius,
32
+ borderBottomLeftRadius,
33
+ borderBottomRightRadius,
34
+ ...rest
35
+ } = getTokens({
36
+ ...buttonState,
37
+ disabled
38
+ });
39
+ return {
40
+ ...rest,
41
+ borderRadius,
42
+ borderTopLeftRadius,
43
+ borderTopRightRadius,
44
+ borderBottomLeftRadius,
45
+ borderBottomRightRadius,
46
+ outerBorderRadius: borderRadius,
47
+ outerBorderTopLeftRadius: borderTopLeftRadius,
48
+ outerBorderTopRightRadius: borderTopRightRadius,
49
+ outerBorderBottomLeftRadius: borderBottomLeftRadius,
50
+ outerBorderBottomRightRadius: borderBottomRightRadius,
51
+ outerBorderGap: 0,
52
+ outerBorderWidth: 0
53
+ };
54
+ };
55
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.IconButton, {
56
+ tokens: buttonState => getButtonTokens({
57
+ disabled: !isEnabled,
58
+ buttonState
59
+ }),
60
+ onPress: onPress,
61
+ onDoubleClick: onDoubleClick,
62
+ accessibilityLabel: accessibilityLabel,
63
+ accessibilityDisabled: accessibilityDisabled,
64
+ ref: ref
65
+ });
66
+ });
67
+ SideButton.displayName = 'QuantitySelectorSideButton';
68
+ SideButton.propTypes = {
69
+ isEnabled: _propTypes.default.bool,
70
+ onPress: _propTypes.default.func,
71
+ onDoubleClick: _propTypes.default.func,
72
+ accessibilityLabel: _propTypes.default.string,
73
+ accessibilityDisabled: _propTypes.default.bool,
74
+ tokens: (0, _componentsBase.getTokensPropType)('QuantitySelectorSideButton'),
75
+ variant: _propTypes.default.object
76
+ };
77
+ var _default = exports.default = SideButton;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = exports.default = {
8
+ en: {
9
+ accessibility: {
10
+ a11yLabel: 'Quantity selector',
11
+ increaseButton: 'Increase quantity',
12
+ decreaseButton: 'Decrease quantity'
13
+ },
14
+ errors: {
15
+ numberIsTooSmall: minNumber => `You can enter a number equal or greater than ${minNumber}.`,
16
+ numberIsTooBig: maxNumber => `You can enter a number equal or less than ${maxNumber}.`,
17
+ invalidCharacters: 'Try using numbers only. Alphabetical or symbols characters are not allowed.'
18
+ }
19
+ },
20
+ fr: {
21
+ accessibility: {
22
+ a11yLabel: 'Sélecteur de quantité',
23
+ increaseButton: `Augmenter la quantité`,
24
+ decreaseButton: `Réduire la quantité`
25
+ },
26
+ errors: {
27
+ numberIsTooSmall: minNumber => `Vous pouvez saisir un nombre égal ou supérieur à ${minNumber}.`,
28
+ numberIsTooBig: maxNumber => `Vous pouvez saisir un nombre égal ou inférieur à ${maxNumber}.`,
29
+ invalidCharacters: `Essayez d'utiliser seulement des chiffres. Les caractères alphabétiques ou les symboles ne sont pas permis.`
30
+ }
31
+ }
32
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _QuantitySelector = _interopRequireDefault(require("./QuantitySelector"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _default = exports.default = _QuantitySelector.default;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.InputWrapper = exports.InputField = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const InputField = exports.InputField = /*#__PURE__*/_styledComponents.default.div.withConfig({
10
+ displayName: "styles__InputField",
11
+ componentId: "components-web__sc-1lrz1xk-0"
12
+ })(["order:1;text-align:center;z-index:10;input{text-align:center;}"]);
13
+ const InputWrapper = exports.InputWrapper = /*#__PURE__*/_styledComponents.default.div.withConfig({
14
+ displayName: "styles__InputWrapper",
15
+ componentId: "components-web__sc-1lrz1xk-1"
16
+ })(["text-align:start;display:flex;flex-direction:row;flex-wrap:nowrap;"]);
@@ -0,0 +1,107 @@
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 _systemConstants = require("@telus-uds/system-constants");
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, _utils.contentfulProps]);
15
+ const staticStyles = {
16
+ image: {
17
+ display: 'block',
18
+ width: '100%'
19
+ }
20
+ };
21
+
22
+ /**
23
+ * Provide different image sources for different screen sizes.
24
+ */
25
+ const ResponsiveImage = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
26
+ let {
27
+ xsSrc,
28
+ smSrc,
29
+ mdSrc,
30
+ lgSrc,
31
+ xlSrc,
32
+ fallbackSrc,
33
+ alt,
34
+ loading = 'eager',
35
+ dataSet,
36
+ ...rest
37
+ } = _ref;
38
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("picture", {
39
+ ...selectProps(rest),
40
+ ref: ref,
41
+ ...dataSet,
42
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("source", {
43
+ srcSet: xlSrc,
44
+ media: `(min-width: ${_systemConstants.viewports.map.get(_systemConstants.viewports.xl)}px)`
45
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("source", {
46
+ srcSet: lgSrc,
47
+ media: `(min-width: ${_systemConstants.viewports.map.get(_systemConstants.viewports.lg)}px)`
48
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("source", {
49
+ srcSet: mdSrc,
50
+ media: `(min-width: ${_systemConstants.viewports.map.get(_systemConstants.viewports.md)}px)`
51
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("source", {
52
+ srcSet: smSrc,
53
+ media: `(min-width: ${_systemConstants.viewports.map.get(_systemConstants.viewports.sm)}px)`
54
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("source", {
55
+ srcSet: xsSrc,
56
+ media: `(max-width: ${_systemConstants.viewports.map.get(_systemConstants.viewports.sm) - 1}px)`
57
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
58
+ src: fallbackSrc,
59
+ alt: alt,
60
+ style: staticStyles.image,
61
+ loading: loading
62
+ })]
63
+ });
64
+ });
65
+ ResponsiveImage.displayName = 'ResponsiveImage';
66
+ ResponsiveImage.propTypes = {
67
+ ...selectedSystemPropTypes,
68
+ /**
69
+ * The src attribute used for screen widths up to 575px
70
+ */
71
+ xsSrc: _propTypes.default.string.isRequired,
72
+ /**
73
+ * The src attribute used for screen widths greater than 576px
74
+ */
75
+ smSrc: _propTypes.default.string.isRequired,
76
+ /**
77
+ * The src attribute used for screen widths greater than 768px
78
+ */
79
+ mdSrc: _propTypes.default.string,
80
+ /**
81
+ * The src attribute used for screen widths greater than 992px
82
+ */
83
+ lgSrc: _propTypes.default.string,
84
+ /**
85
+ * The src attribute used for screen widths greater than 1200px
86
+ */
87
+ xlSrc: _propTypes.default.string,
88
+ /**
89
+ * The src attribute used for browsers that don't support responsive images (InternetExplorer)
90
+ */
91
+ fallbackSrc: _propTypes.default.string.isRequired,
92
+ /**
93
+ * The alt attribute for the HTML img element. Setting this attribute to an empty string (alt="") indicates that this image is not a key part of the content, and that non-visual browsers may omit it from rendering.
94
+ */
95
+ alt: _propTypes.default.string.isRequired,
96
+ /**
97
+ * Loading strategy.
98
+ * @default 'eager'
99
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
100
+ */
101
+ loading: _propTypes.default.oneOf(['eager', 'lazy']),
102
+ /**
103
+ * The dataSet prop allows to pass data-* attributes element to the component.
104
+ */
105
+ dataSet: _propTypes.default.object
106
+ };
107
+ var _default = exports.default = ResponsiveImage;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _ResponsiveImage = _interopRequireDefault(require("./ResponsiveImage"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _default = exports.default = _ResponsiveImage.default;