@telus-uds/components-web 4.19.0 → 5.0.0-alpha.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 (477) hide show
  1. package/.eslintrc.cjs +12 -0
  2. package/CHANGELOG.md +24 -1
  3. package/lib/cjs/Badge/Badge.js +26 -27
  4. package/lib/cjs/BlockQuote/BlockQuote.js +24 -25
  5. package/lib/cjs/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +36 -37
  6. package/lib/cjs/Breadcrumbs/Breadcrumbs.js +8 -10
  7. package/lib/cjs/Callout/Callout.js +24 -25
  8. package/lib/cjs/Card/Card.js +79 -89
  9. package/lib/cjs/Card/CardContent.js +53 -29
  10. package/lib/cjs/Card/CardFooter.js +28 -18
  11. package/lib/cjs/Countdown/Countdown.js +7 -8
  12. package/lib/cjs/Countdown/Segment.js +10 -11
  13. package/lib/cjs/Countdown/dictionary.js +2 -2
  14. package/lib/cjs/Countdown/types.js +2 -6
  15. package/lib/cjs/Countdown/useCountdown.js +2 -2
  16. package/lib/cjs/DatePicker/CalendarContainer.js +66 -67
  17. package/lib/cjs/DatePicker/DatePicker.js +27 -28
  18. package/lib/cjs/DatePicker/dictionary.js +3 -4
  19. package/lib/cjs/DatePicker/reactDatesCss.js +2 -3
  20. package/lib/cjs/Disclaimer/Disclaimer.js +28 -13
  21. package/lib/cjs/Footnote/Footnote.js +108 -109
  22. package/lib/cjs/Footnote/FootnoteLink.js +28 -19
  23. package/lib/cjs/Footnote/dictionary.js +2 -2
  24. package/lib/cjs/IconButton/IconButton.js +3 -4
  25. package/lib/cjs/Image/Image.js +9 -3
  26. package/lib/cjs/Image/server.js +4 -6
  27. package/lib/cjs/List/List.js +7 -3
  28. package/lib/cjs/List/ListItem.js +3 -4
  29. package/lib/cjs/NavigationBar/NavigationBar.js +8 -9
  30. package/lib/cjs/NavigationBar/NavigationItem.js +10 -11
  31. package/lib/cjs/NavigationBar/NavigationSubMenu.js +10 -11
  32. package/lib/cjs/NavigationBar/collapseItems.js +2 -2
  33. package/lib/cjs/NavigationBar/resolveItemSelection.js +2 -2
  34. package/lib/cjs/OptimizeImage/OptimizeImage.js +6 -8
  35. package/lib/cjs/OptimizeImage/utils/getFallbackUrl.js +3 -4
  36. package/lib/cjs/OptimizeImage/utils/getImageUrls.js +9 -10
  37. package/lib/cjs/OptimizeImage/utils/getOptimizedUrl.js +3 -4
  38. package/lib/cjs/OptimizeImage/utils/hasWebpSupport.js +1 -1
  39. package/lib/cjs/OptimizeImage/utils/index.js +8 -9
  40. package/lib/cjs/OptimizeImage/utils/isSvgUrl.js +1 -1
  41. package/lib/cjs/OrderedList/OrderedList.js +6 -9
  42. package/lib/cjs/OrderedList/OrderedListBase.js +4 -7
  43. package/lib/cjs/OrderedList/{Item.js → OrderedListItem.js} +46 -39
  44. package/lib/cjs/OrderedList/{ItemBase.js → OrderedListItemBase.js} +7 -7
  45. package/lib/cjs/OrderedList/constants.js +0 -1
  46. package/lib/cjs/Paragraph/Paragraph.js +10 -11
  47. package/lib/cjs/PreviewCard/PreviewCard.js +18 -27
  48. package/lib/cjs/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +6 -6
  49. package/lib/cjs/PriceLockup/PriceLockup.js +61 -60
  50. package/lib/cjs/PriceLockup/dictionary.js +2 -2
  51. package/lib/cjs/PriceLockup/tokens.js +3 -3
  52. package/lib/cjs/Progress/ProgressBar.js +14 -17
  53. package/lib/cjs/QuantitySelector/QuantitySelector.js +8 -9
  54. package/lib/cjs/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +5 -6
  55. package/lib/cjs/QuantitySelector/dictionary.js +2 -2
  56. package/lib/cjs/ResponsiveImage/ResponsiveImage.js +3 -4
  57. package/lib/cjs/Ribbon/Ribbon.js +56 -65
  58. package/lib/cjs/SkeletonProvider/SkeletonImage.js +3 -4
  59. package/lib/cjs/SkeletonProvider/SkeletonProvider.js +10 -10
  60. package/lib/cjs/SkeletonProvider/SkeletonTypography.js +3 -4
  61. package/lib/cjs/Span/Span.js +6 -7
  62. package/lib/cjs/Spinner/Spinner.js +29 -29
  63. package/lib/cjs/Spinner/SpinnerContent.js +6 -7
  64. package/lib/cjs/StoryCard/StoryCard.js +17 -22
  65. package/lib/cjs/Table/Table.js +32 -25
  66. package/lib/cjs/Table/{Body.js → TableBody.js} +5 -6
  67. package/lib/cjs/Table/{Cell.js → TableCell.js} +59 -61
  68. package/lib/cjs/Table/{Header.js → TableHeader.js} +7 -8
  69. package/lib/cjs/Table/{Row.js → TableRow.js} +18 -19
  70. package/lib/cjs/Table/{SubHeading.js → TableSubHeading.js} +7 -8
  71. package/lib/cjs/TermsAndConditions/ExpandCollapse.js +18 -19
  72. package/lib/cjs/TermsAndConditions/TermsAndConditions.js +44 -44
  73. package/lib/cjs/TermsAndConditions/dictionary.js +2 -2
  74. package/lib/cjs/Testimonial/Testimonial.js +24 -31
  75. package/lib/cjs/Toast/Toast.js +28 -30
  76. package/lib/cjs/Video/ControlBar/ControlBar.js +48 -47
  77. package/lib/cjs/Video/ControlBar/Controls/VideoButton/VideoButton.js +6 -6
  78. package/lib/cjs/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +30 -32
  79. package/lib/cjs/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +35 -35
  80. package/lib/cjs/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +42 -42
  81. package/lib/cjs/Video/MiddleControlButton/MiddleControlButton.js +15 -15
  82. package/lib/cjs/Video/Video.js +27 -29
  83. package/lib/cjs/Video/videoText.js +3 -4
  84. package/lib/cjs/VideoPicker/VideoPicker.js +37 -33
  85. package/lib/cjs/VideoPicker/VideoPickerPlayer.js +5 -6
  86. package/lib/cjs/VideoPicker/VideoPickerThumbnail.js +28 -25
  87. package/lib/cjs/VideoPicker/VideoSlider.js +3 -4
  88. package/lib/cjs/WaffleGrid/WaffleGrid.js +51 -50
  89. package/lib/cjs/WebVideo/WebVideo.js +7 -8
  90. package/lib/cjs/baseExports.js +84 -0
  91. package/lib/cjs/index.js +179 -105
  92. package/lib/cjs/server.js +2 -3
  93. package/lib/cjs/shared/ConditionalWrapper/ConditionalWrapper.js +3 -3
  94. package/lib/cjs/shared/FullBleedContent/FullBleedContent.js +28 -22
  95. package/lib/cjs/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -2
  96. package/lib/cjs/shared/FullBleedContent/index.js +11 -10
  97. package/lib/cjs/shared/FullBleedContent/useFullBleedContentProps.js +2 -2
  98. package/lib/cjs/shared/VideoSplash/SplashButton/SplashButton.js +9 -9
  99. package/lib/cjs/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +50 -50
  100. package/lib/cjs/shared/VideoSplash/VideoSplash.js +12 -12
  101. package/lib/cjs/shared/VideoSplash/helpers.js +2 -3
  102. package/lib/cjs/utils/index.js +14 -15
  103. package/lib/cjs/utils/isElementFocusable.js +2 -2
  104. package/lib/cjs/utils/logger.js +2 -6
  105. package/lib/cjs/utils/media.js +1 -1
  106. package/lib/cjs/utils/renderStructuredContent.js +3 -4
  107. package/lib/cjs/utils/scrollToAnchor.js +2 -2
  108. package/lib/cjs/utils/ssr.js +2 -2
  109. package/lib/cjs/utils/theming/get-theme-from-server.js +2 -3
  110. package/lib/cjs/utils/theming/with-client-theme.js +2 -2
  111. package/lib/cjs/utils/theming/with-server-theme.js +4 -4
  112. package/lib/cjs/utils/transforms.js +2 -5
  113. package/lib/cjs/utils/useOverlaidPosition.js +2 -2
  114. package/lib/cjs/utils/useTypographyTheme.js +2 -2
  115. package/lib/esm/Badge/Badge.js +25 -26
  116. package/lib/esm/BlockQuote/BlockQuote.js +23 -24
  117. package/lib/esm/Breadcrumbs/{Item/Item.js → BreadcrumbItem.js} +35 -36
  118. package/lib/esm/Breadcrumbs/Breadcrumbs.js +6 -7
  119. package/lib/esm/Callout/Callout.js +23 -24
  120. package/lib/esm/Card/Card.js +63 -71
  121. package/lib/esm/Card/CardContent.js +52 -28
  122. package/lib/esm/Card/CardFooter.js +27 -18
  123. package/lib/esm/Countdown/Countdown.js +4 -5
  124. package/lib/esm/Countdown/Segment.js +8 -9
  125. package/lib/esm/Countdown/dictionary.js +1 -1
  126. package/lib/esm/Countdown/types.js +1 -5
  127. package/lib/esm/Countdown/useCountdown.js +2 -3
  128. package/lib/esm/DatePicker/CalendarContainer.js +64 -65
  129. package/lib/esm/DatePicker/DatePicker.js +18 -19
  130. package/lib/esm/DatePicker/dictionary.js +2 -3
  131. package/lib/esm/DatePicker/reactDatesCss.js +1 -2
  132. package/lib/esm/Disclaimer/Disclaimer.js +27 -12
  133. package/lib/esm/Footnote/Footnote.js +104 -104
  134. package/lib/esm/Footnote/FootnoteLink.js +26 -17
  135. package/lib/esm/Footnote/dictionary.js +1 -1
  136. package/lib/esm/IconButton/IconButton.js +2 -3
  137. package/lib/esm/Image/Image.js +10 -1
  138. package/lib/esm/Image/server.js +4 -4
  139. package/lib/esm/List/List.js +2 -2
  140. package/lib/esm/List/ListItem.js +2 -3
  141. package/lib/esm/NavigationBar/NavigationBar.js +5 -6
  142. package/lib/esm/NavigationBar/NavigationItem.js +9 -10
  143. package/lib/esm/NavigationBar/NavigationSubMenu.js +7 -8
  144. package/lib/esm/NavigationBar/collapseItems.js +2 -3
  145. package/lib/esm/NavigationBar/resolveItemSelection.js +2 -3
  146. package/lib/esm/OptimizeImage/OptimizeImage.js +4 -6
  147. package/lib/esm/OptimizeImage/utils/getFallbackUrl.js +2 -2
  148. package/lib/esm/OptimizeImage/utils/getImageUrls.js +3 -3
  149. package/lib/esm/OptimizeImage/utils/getOptimizedUrl.js +2 -2
  150. package/lib/esm/OptimizeImage/utils/hasWebpSupport.js +1 -1
  151. package/lib/esm/OptimizeImage/utils/index.js +4 -4
  152. package/lib/esm/OptimizeImage/utils/isSvgUrl.js +1 -1
  153. package/lib/esm/OrderedList/OrderedList.js +4 -7
  154. package/lib/esm/OrderedList/OrderedListBase.js +3 -6
  155. package/lib/esm/OrderedList/{Item.js → OrderedListItem.js} +45 -38
  156. package/lib/esm/OrderedList/{ItemBase.js → OrderedListItemBase.js} +5 -6
  157. package/lib/esm/OrderedList/constants.js +0 -1
  158. package/lib/esm/Paragraph/Paragraph.js +9 -10
  159. package/lib/esm/PreviewCard/PreviewCard.js +16 -21
  160. package/lib/esm/PreviewCard/{AuthorDate.js → PreviewCardAuthorDate.js} +4 -5
  161. package/lib/esm/PriceLockup/PriceLockup.js +57 -56
  162. package/lib/esm/PriceLockup/dictionary.js +1 -1
  163. package/lib/esm/PriceLockup/tokens.js +1 -1
  164. package/lib/esm/Progress/ProgressBar.js +13 -16
  165. package/lib/esm/QuantitySelector/QuantitySelector.js +6 -7
  166. package/lib/esm/QuantitySelector/{SideButton.js → QuantitySelectorSideButton.js} +4 -5
  167. package/lib/esm/QuantitySelector/dictionary.js +1 -1
  168. package/lib/esm/ResponsiveImage/ResponsiveImage.js +2 -3
  169. package/lib/esm/Ribbon/Ribbon.js +55 -64
  170. package/lib/esm/SkeletonProvider/SkeletonImage.js +2 -3
  171. package/lib/esm/SkeletonProvider/SkeletonProvider.js +6 -7
  172. package/lib/esm/SkeletonProvider/SkeletonTypography.js +2 -3
  173. package/lib/esm/Span/Span.js +5 -6
  174. package/lib/esm/Spinner/Spinner.js +24 -24
  175. package/lib/esm/Spinner/SpinnerContent.js +5 -6
  176. package/lib/esm/StoryCard/StoryCard.js +15 -16
  177. package/lib/esm/Table/Table.js +31 -24
  178. package/lib/esm/Table/{Body.js → TableBody.js} +4 -5
  179. package/lib/esm/Table/{Cell.js → TableCell.js} +57 -58
  180. package/lib/esm/Table/{Header.js → TableHeader.js} +6 -7
  181. package/lib/esm/Table/{Row.js → TableRow.js} +17 -18
  182. package/lib/esm/Table/{SubHeading.js → TableSubHeading.js} +6 -7
  183. package/lib/esm/TermsAndConditions/ExpandCollapse.js +18 -19
  184. package/lib/esm/TermsAndConditions/TermsAndConditions.js +40 -40
  185. package/lib/esm/TermsAndConditions/dictionary.js +1 -1
  186. package/lib/esm/Testimonial/Testimonial.js +22 -29
  187. package/lib/esm/Toast/Toast.js +26 -27
  188. package/lib/esm/Video/ControlBar/ControlBar.js +33 -33
  189. package/lib/esm/Video/ControlBar/Controls/VideoButton/VideoButton.js +5 -6
  190. package/lib/esm/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +28 -31
  191. package/lib/esm/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +33 -34
  192. package/lib/esm/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +38 -39
  193. package/lib/esm/Video/MiddleControlButton/MiddleControlButton.js +14 -15
  194. package/lib/esm/Video/Video.js +19 -21
  195. package/lib/esm/Video/videoText.js +2 -3
  196. package/lib/esm/VideoPicker/VideoPicker.js +32 -27
  197. package/lib/esm/VideoPicker/VideoPickerPlayer.js +3 -4
  198. package/lib/esm/VideoPicker/VideoPickerThumbnail.js +26 -23
  199. package/lib/esm/VideoPicker/VideoSlider.js +2 -3
  200. package/lib/esm/WaffleGrid/WaffleGrid.js +49 -46
  201. package/lib/esm/WebVideo/WebVideo.js +5 -6
  202. package/lib/esm/baseExports.js +1 -1
  203. package/lib/esm/index.js +46 -37
  204. package/lib/esm/server.js +1 -2
  205. package/lib/esm/shared/ConditionalWrapper/ConditionalWrapper.js +2 -3
  206. package/lib/esm/shared/FullBleedContent/FullBleedContent.js +25 -20
  207. package/lib/esm/shared/FullBleedContent/getFullBleedBorderRadius.js +2 -3
  208. package/lib/esm/shared/FullBleedContent/index.js +3 -4
  209. package/lib/esm/shared/FullBleedContent/useFullBleedContentProps.js +3 -5
  210. package/lib/esm/shared/VideoSplash/SplashButton/SplashButton.js +8 -9
  211. package/lib/esm/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +48 -49
  212. package/lib/esm/shared/VideoSplash/VideoSplash.js +8 -9
  213. package/lib/esm/shared/VideoSplash/helpers.js +1 -1
  214. package/lib/esm/utils/index.js +7 -7
  215. package/lib/esm/utils/isElementFocusable.js +2 -3
  216. package/lib/esm/utils/logger.js +0 -4
  217. package/lib/esm/utils/media.js +1 -1
  218. package/lib/esm/utils/renderStructuredContent.js +2 -3
  219. package/lib/esm/utils/scrollToAnchor.js +2 -3
  220. package/lib/esm/utils/ssr.js +2 -3
  221. package/lib/esm/utils/theming/get-theme-from-server.js +1 -1
  222. package/lib/esm/utils/theming/with-client-theme.js +2 -3
  223. package/lib/esm/utils/theming/with-server-theme.js +3 -4
  224. package/lib/esm/utils/transforms.js +1 -4
  225. package/lib/esm/utils/useOverlaidPosition.js +2 -3
  226. package/lib/esm/utils/useTypographyTheme.js +2 -3
  227. package/package.json +13 -22
  228. package/src/Badge/Badge.jsx +18 -20
  229. package/src/BlockQuote/BlockQuote.jsx +16 -18
  230. package/src/Breadcrumbs/{Item/Item.jsx → BreadcrumbItem.jsx} +20 -21
  231. package/src/Breadcrumbs/Breadcrumbs.jsx +6 -9
  232. package/src/Callout/Callout.jsx +16 -18
  233. package/src/Card/Card.jsx +59 -80
  234. package/src/Card/CardContent.jsx +52 -28
  235. package/src/Card/CardFooter.jsx +26 -12
  236. package/src/Countdown/Countdown.jsx +3 -5
  237. package/src/Countdown/Segment.jsx +6 -8
  238. package/src/Countdown/dictionary.js +1 -1
  239. package/src/Countdown/types.js +0 -2
  240. package/src/Countdown/useCountdown.js +1 -3
  241. package/src/DatePicker/CalendarContainer.jsx +65 -67
  242. package/src/DatePicker/DatePicker.jsx +17 -19
  243. package/src/DatePicker/dictionary.js +1 -3
  244. package/src/DatePicker/reactDatesCss.js +1 -3
  245. package/src/Disclaimer/Disclaimer.jsx +15 -8
  246. package/src/Footnote/Footnote.jsx +104 -93
  247. package/src/Footnote/FootnoteLink.jsx +16 -13
  248. package/src/Footnote/dictionary.js +1 -1
  249. package/src/IconButton/IconButton.jsx +1 -3
  250. package/src/Image/Image.jsx +9 -1
  251. package/src/Image/server.js +4 -4
  252. package/src/List/List.jsx +2 -2
  253. package/src/List/ListItem.jsx +1 -3
  254. package/src/NavigationBar/NavigationBar.jsx +4 -6
  255. package/src/NavigationBar/NavigationItem.jsx +6 -8
  256. package/src/NavigationBar/NavigationSubMenu.jsx +7 -8
  257. package/src/NavigationBar/collapseItems.js +1 -3
  258. package/src/NavigationBar/resolveItemSelection.js +1 -3
  259. package/src/OptimizeImage/OptimizeImage.jsx +3 -6
  260. package/src/OptimizeImage/utils/getFallbackUrl.js +2 -2
  261. package/src/OptimizeImage/utils/getImageUrls.js +3 -3
  262. package/src/OptimizeImage/utils/getOptimizedUrl.js +2 -9
  263. package/src/OptimizeImage/utils/hasWebpSupport.js +1 -1
  264. package/src/OptimizeImage/utils/index.js +4 -4
  265. package/src/OptimizeImage/utils/isSvgUrl.js +1 -1
  266. package/src/OrderedList/OrderedList.jsx +3 -8
  267. package/src/OrderedList/OrderedListBase.jsx +2 -7
  268. package/src/OrderedList/{Item.jsx → OrderedListItem.jsx} +44 -32
  269. package/src/OrderedList/{ItemBase.jsx → OrderedListItemBase.jsx} +4 -4
  270. package/src/OrderedList/constants.js +0 -1
  271. package/src/Paragraph/Paragraph.jsx +7 -9
  272. package/src/PreviewCard/PreviewCard.jsx +16 -32
  273. package/src/PreviewCard/{AuthorDate.jsx → PreviewCardAuthorDate.jsx} +3 -5
  274. package/src/PriceLockup/PriceLockup.jsx +33 -31
  275. package/src/PriceLockup/dictionary.js +1 -1
  276. package/src/PriceLockup/tokens.js +1 -1
  277. package/src/Progress/ProgressBar.jsx +33 -30
  278. package/src/QuantitySelector/QuantitySelector.jsx +5 -7
  279. package/src/QuantitySelector/{SideButton.jsx → QuantitySelectorSideButton.jsx} +3 -4
  280. package/src/QuantitySelector/dictionary.js +1 -1
  281. package/src/ResponsiveImage/ResponsiveImage.jsx +1 -3
  282. package/src/Ribbon/Ribbon.jsx +35 -44
  283. package/src/SkeletonProvider/SkeletonImage.jsx +1 -3
  284. package/src/SkeletonProvider/SkeletonProvider.jsx +5 -9
  285. package/src/SkeletonProvider/SkeletonTypography.jsx +1 -3
  286. package/src/Span/Span.jsx +11 -11
  287. package/src/Spinner/Spinner.jsx +17 -19
  288. package/src/Spinner/SpinnerContent.jsx +4 -6
  289. package/src/StoryCard/StoryCard.jsx +15 -16
  290. package/src/Table/Table.jsx +81 -75
  291. package/src/Table/{Body.jsx → TableBody.jsx} +3 -5
  292. package/src/Table/{Cell.jsx → TableCell.jsx} +69 -65
  293. package/src/Table/{Header.jsx → TableHeader.jsx} +6 -8
  294. package/src/Table/{Row.jsx → TableRow.jsx} +11 -12
  295. package/src/Table/{SubHeading.jsx → TableSubHeading.jsx} +6 -8
  296. package/src/TermsAndConditions/ExpandCollapse.jsx +18 -19
  297. package/src/TermsAndConditions/TermsAndConditions.jsx +37 -37
  298. package/src/TermsAndConditions/dictionary.js +1 -1
  299. package/src/Testimonial/Testimonial.jsx +20 -28
  300. package/src/Toast/Toast.jsx +36 -35
  301. package/src/Video/ControlBar/ControlBar.jsx +28 -25
  302. package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +4 -6
  303. package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +26 -30
  304. package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +31 -33
  305. package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +40 -40
  306. package/src/Video/MiddleControlButton/MiddleControlButton.jsx +10 -12
  307. package/src/Video/Video.jsx +697 -683
  308. package/src/Video/videoText.js +1 -3
  309. package/src/VideoPicker/VideoPicker.jsx +37 -25
  310. package/src/VideoPicker/VideoPickerPlayer.jsx +2 -4
  311. package/src/VideoPicker/VideoPickerThumbnail.jsx +26 -15
  312. package/src/VideoPicker/VideoSlider.jsx +1 -3
  313. package/src/WaffleGrid/WaffleGrid.jsx +31 -27
  314. package/src/WebVideo/WebVideo.jsx +4 -6
  315. package/src/baseExports.js +27 -13
  316. package/src/index.js +46 -37
  317. package/src/server.js +1 -2
  318. package/src/shared/ConditionalWrapper/ConditionalWrapper.jsx +1 -3
  319. package/src/shared/FullBleedContent/FullBleedContent.jsx +26 -19
  320. package/src/shared/FullBleedContent/getFullBleedBorderRadius.js +1 -3
  321. package/src/shared/FullBleedContent/index.js +3 -8
  322. package/src/shared/FullBleedContent/useFullBleedContentProps.js +2 -5
  323. package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +5 -7
  324. package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +25 -25
  325. package/src/shared/VideoSplash/VideoSplash.jsx +7 -9
  326. package/src/shared/VideoSplash/helpers.js +1 -1
  327. package/src/utils/index.js +7 -7
  328. package/src/utils/isElementFocusable.js +1 -3
  329. package/src/utils/logger.js +0 -5
  330. package/src/utils/media.js +1 -1
  331. package/src/utils/renderStructuredContent.jsx +1 -3
  332. package/src/utils/scrollToAnchor.js +1 -3
  333. package/src/utils/ssr.js +1 -3
  334. package/src/utils/theming/get-theme-from-server.js +1 -1
  335. package/src/utils/theming/with-client-theme.jsx +1 -3
  336. package/src/utils/theming/with-server-theme.jsx +2 -4
  337. package/src/utils/transforms.js +0 -2
  338. package/src/utils/useOverlaidPosition.js +1 -3
  339. package/src/utils/useTypographyTheme.js +1 -3
  340. package/types/Autocomplete.d.ts +1 -3
  341. package/types/Badge.d.ts +1 -3
  342. package/types/BaseProvider.d.ts +1 -3
  343. package/types/BlockQuote.d.ts +1 -3
  344. package/types/Box.d.ts +1 -3
  345. package/types/BreadcrumbItem.d.ts +1 -3
  346. package/types/Breadcrumbs.d.ts +2 -4
  347. package/types/Callout.d.ts +1 -3
  348. package/types/Card.d.ts +1 -3
  349. package/types/Cell.d.ts +1 -3
  350. package/types/ControlBar.d.ts +1 -3
  351. package/types/Countdown.d.ts +1 -3
  352. package/types/DatePicker.d.ts +1 -3
  353. package/types/FileUpload.d.ts +1 -3
  354. package/types/Footnote.d.ts +1 -3
  355. package/types/FootnoteLink.d.ts +1 -3
  356. package/types/Listbox.d.ts +1 -3
  357. package/types/MiddleControlButton.d.ts +1 -3
  358. package/types/MultiSelectFilter.d.ts +1 -3
  359. package/types/PriceLockup.d.ts +1 -3
  360. package/types/QuantitySelector.d.ts +1 -3
  361. package/types/Ribbon.d.ts +1 -3
  362. package/types/Spinner.d.ts +1 -3
  363. package/types/Table.d.ts +1 -3
  364. package/types/Tooltip.d.ts +1 -3
  365. package/types/TooltipButton.d.ts +1 -3
  366. package/types/Typography.d.ts +1 -3
  367. package/types/Video.d.ts +1 -3
  368. package/types/VideoButton.d.ts +1 -3
  369. package/types/VideoMenu.d.ts +1 -3
  370. package/types/VideoProgressBar.d.ts +1 -3
  371. package/types/VolumeSlider.d.ts +1 -3
  372. package/types/WebVideo.d.ts +1 -3
  373. package/lib/cjs/Badge/index.js +0 -9
  374. package/lib/cjs/BlockQuote/index.js +0 -9
  375. package/lib/cjs/Breadcrumbs/index.js +0 -13
  376. package/lib/cjs/Callout/index.js +0 -9
  377. package/lib/cjs/Card/index.js +0 -9
  378. package/lib/cjs/Countdown/index.js +0 -9
  379. package/lib/cjs/DatePicker/index.js +0 -9
  380. package/lib/cjs/Disclaimer/index.js +0 -13
  381. package/lib/cjs/Footnote/index.js +0 -11
  382. package/lib/cjs/IconButton/index.js +0 -9
  383. package/lib/cjs/Image/index.js +0 -20
  384. package/lib/cjs/List/index.js +0 -17
  385. package/lib/cjs/NavigationBar/index.js +0 -11
  386. package/lib/cjs/OptimizeImage/index.js +0 -9
  387. package/lib/cjs/OrderedList/index.js +0 -17
  388. package/lib/cjs/Paragraph/index.js +0 -9
  389. package/lib/cjs/PreviewCard/index.js +0 -9
  390. package/lib/cjs/PriceLockup/index.js +0 -9
  391. package/lib/cjs/Progress/index.js +0 -11
  392. package/lib/cjs/QuantitySelector/index.js +0 -9
  393. package/lib/cjs/ResponsiveImage/index.js +0 -9
  394. package/lib/cjs/Ribbon/index.js +0 -9
  395. package/lib/cjs/SkeletonProvider/index.js +0 -9
  396. package/lib/cjs/Span/index.js +0 -9
  397. package/lib/cjs/Spinner/index.js +0 -9
  398. package/lib/cjs/StoryCard/index.js +0 -9
  399. package/lib/cjs/Table/index.js +0 -24
  400. package/lib/cjs/TermsAndConditions/index.js +0 -13
  401. package/lib/cjs/Testimonial/index.js +0 -9
  402. package/lib/cjs/Toast/index.js +0 -9
  403. package/lib/cjs/Video/index.js +0 -9
  404. package/lib/cjs/VideoPicker/index.js +0 -9
  405. package/lib/cjs/WaffleGrid/index.js +0 -9
  406. package/lib/cjs/WebVideo/index.js +0 -9
  407. package/lib/cjs/shared/ConditionalWrapper/index.js +0 -9
  408. package/lib/esm/Badge/index.js +0 -2
  409. package/lib/esm/BlockQuote/index.js +0 -2
  410. package/lib/esm/Breadcrumbs/index.js +0 -1
  411. package/lib/esm/Callout/index.js +0 -2
  412. package/lib/esm/Card/index.js +0 -2
  413. package/lib/esm/Countdown/index.js +0 -2
  414. package/lib/esm/DatePicker/index.js +0 -2
  415. package/lib/esm/Disclaimer/index.js +0 -1
  416. package/lib/esm/Footnote/index.js +0 -4
  417. package/lib/esm/IconButton/index.js +0 -2
  418. package/lib/esm/Image/index.js +0 -9
  419. package/lib/esm/List/index.js +0 -5
  420. package/lib/esm/NavigationBar/index.js +0 -4
  421. package/lib/esm/OptimizeImage/index.js +0 -2
  422. package/lib/esm/OrderedList/index.js +0 -5
  423. package/lib/esm/Paragraph/index.js +0 -2
  424. package/lib/esm/PreviewCard/index.js +0 -2
  425. package/lib/esm/PriceLockup/index.js +0 -2
  426. package/lib/esm/Progress/index.js +0 -4
  427. package/lib/esm/QuantitySelector/index.js +0 -2
  428. package/lib/esm/ResponsiveImage/index.js +0 -2
  429. package/lib/esm/Ribbon/index.js +0 -2
  430. package/lib/esm/SkeletonProvider/index.js +0 -2
  431. package/lib/esm/Span/index.js +0 -2
  432. package/lib/esm/Spinner/index.js +0 -2
  433. package/lib/esm/StoryCard/index.js +0 -2
  434. package/lib/esm/Table/index.js +0 -17
  435. package/lib/esm/TermsAndConditions/index.js +0 -1
  436. package/lib/esm/Testimonial/index.js +0 -2
  437. package/lib/esm/Toast/index.js +0 -2
  438. package/lib/esm/Video/index.js +0 -2
  439. package/lib/esm/VideoPicker/index.js +0 -2
  440. package/lib/esm/WaffleGrid/index.js +0 -2
  441. package/lib/esm/WebVideo/index.js +0 -2
  442. package/lib/esm/shared/ConditionalWrapper/index.js +0 -2
  443. package/src/Badge/index.js +0 -3
  444. package/src/BlockQuote/index.js +0 -3
  445. package/src/Breadcrumbs/index.js +0 -1
  446. package/src/Callout/index.js +0 -3
  447. package/src/Card/index.js +0 -3
  448. package/src/Countdown/index.js +0 -3
  449. package/src/DatePicker/index.js +0 -3
  450. package/src/Disclaimer/index.js +0 -1
  451. package/src/Footnote/index.js +0 -6
  452. package/src/IconButton/index.js +0 -3
  453. package/src/Image/index.js +0 -10
  454. package/src/List/index.js +0 -8
  455. package/src/NavigationBar/index.js +0 -6
  456. package/src/OptimizeImage/index.js +0 -3
  457. package/src/OrderedList/index.js +0 -8
  458. package/src/Paragraph/index.js +0 -3
  459. package/src/PreviewCard/index.js +0 -3
  460. package/src/PriceLockup/index.js +0 -3
  461. package/src/Progress/index.js +0 -6
  462. package/src/QuantitySelector/index.js +0 -3
  463. package/src/ResponsiveImage/index.js +0 -3
  464. package/src/Ribbon/index.js +0 -3
  465. package/src/SkeletonProvider/index.js +0 -3
  466. package/src/Span/index.js +0 -3
  467. package/src/Spinner/index.js +0 -3
  468. package/src/StoryCard/index.js +0 -3
  469. package/src/Table/index.js +0 -20
  470. package/src/TermsAndConditions/index.js +0 -1
  471. package/src/Testimonial/index.js +0 -3
  472. package/src/Toast/index.js +0 -3
  473. package/src/Video/index.js +0 -3
  474. package/src/VideoPicker/index.js +0 -3
  475. package/src/WaffleGrid/index.js +0 -3
  476. package/src/WebVideo/index.js +0 -3
  477. package/src/shared/ConditionalWrapper/index.js +0 -3
@@ -1,6 +1,6 @@
1
- import isSvgUrl from './isSvgUrl'
1
+ import { isSvgUrl } from './isSvgUrl'
2
2
 
3
- export default function getFallbackUrl(url, dimension, size, quality) {
3
+ export function getFallbackUrl(url, dimension, size, quality) {
4
4
  if (!isSvgUrl(url)) {
5
5
  return `${url}?${dimension}=${size}&q=${quality}`
6
6
  }
@@ -1,7 +1,7 @@
1
- import getOptimizedUrl from './getOptimizedUrl'
2
- import getFallbackUrl from './getFallbackUrl'
1
+ import { getOptimizedUrl } from './getOptimizedUrl'
2
+ import { getFallbackUrl } from './getFallbackUrl'
3
3
 
4
- export default function getImageUrls(
4
+ export function getImageUrls(
5
5
  contentfulAssetUrl,
6
6
  dimension,
7
7
  xs,
@@ -1,13 +1,6 @@
1
- import isSvgUrl from './isSvgUrl'
1
+ import { isSvgUrl } from './isSvgUrl'
2
2
 
3
- export default function getOptimizedUrl(
4
- url,
5
- dimension,
6
- size,
7
- quality,
8
- disableRetina,
9
- supportsWebp
10
- ) {
3
+ export function getOptimizedUrl(url, dimension, size, quality, disableRetina, supportsWebp) {
11
4
  if (!isSvgUrl(url)) {
12
5
  let format = ''
13
6
 
@@ -6,7 +6,7 @@ let promise
6
6
  * @see https://developers.google.com/speed/webp/faq#in_your_own_javascript
7
7
  * @return {Promise<boolean>}
8
8
  */
9
- export default function hasWebpSupport() {
9
+ export function hasWebpSupport() {
10
10
  // cache the result, so that this function runs only once
11
11
  if (!promise) {
12
12
  promise = new Promise((resolve) => {
@@ -1,6 +1,6 @@
1
- import getOptimizedUrl from './getOptimizedUrl'
2
- import getFallbackUrl from './getFallbackUrl'
3
- import hasWebpSupport from './hasWebpSupport'
4
- import getImageUrls from './getImageUrls'
1
+ import { getOptimizedUrl } from './getOptimizedUrl'
2
+ import { getFallbackUrl } from './getFallbackUrl'
3
+ import { hasWebpSupport } from './hasWebpSupport'
4
+ import { getImageUrls } from './getImageUrls'
5
5
 
6
6
  export { getOptimizedUrl, getFallbackUrl, hasWebpSupport, getImageUrls }
@@ -1,3 +1,3 @@
1
- export default function isSvgUrl(url) {
1
+ export function isSvgUrl(url) {
2
2
  return !!url.match(/\.svg$/i)
3
3
  }
@@ -3,8 +3,7 @@ import PropTypes from 'prop-types'
3
3
  import { getTokensPropType, selectSystemProps, variantProp } from '@telus-uds/components-base'
4
4
  import styled from 'styled-components'
5
5
  import { htmlAttrs } from '../utils'
6
- import OrderedListBase from './OrderedListBase'
7
- import Item from './Item'
6
+ import { OrderedListBase } from './OrderedListBase'
8
7
  import { OL_COUNTER_NAME } from './constants'
9
8
 
10
9
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
@@ -18,7 +17,7 @@ const StyledOrderedListBase = styled(OrderedListBase)(({ start }) => ({
18
17
  /**
19
18
  * Themed semantic ordered list.
20
19
  */
21
- const OrderedList = React.forwardRef(
20
+ export const OrderedList = React.forwardRef(
22
21
  ({ children, start = 1, variant = {}, tokens = {}, ...rest }, ref) => {
23
22
  // Check if children is an array
24
23
  const isChildrenArray = Array.isArray(children)
@@ -57,7 +56,7 @@ OrderedList.displayName = 'OrderedList'
57
56
  OrderedList.propTypes = {
58
57
  ...selectedSystemPropTypes,
59
58
  /**
60
- * A list of ordered items wrapped in `OrderedList.Item`.
59
+ * A list of ordered items wrapped in `OrderedListItem`.
61
60
  */
62
61
  children: PropTypes.node.isRequired,
63
62
  /**
@@ -67,7 +66,3 @@ OrderedList.propTypes = {
67
66
  variant: variantProp.propType,
68
67
  tokens: getTokensPropType('OrderedList')
69
68
  }
70
-
71
- OrderedList.Item = Item
72
-
73
- export default OrderedList
@@ -1,7 +1,6 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import styled from 'styled-components'
4
- import ItemBase from './ItemBase'
5
4
 
6
5
  const StyledList = styled.ol({
7
6
  display: 'flex',
@@ -14,12 +13,12 @@ const StyledList = styled.ol({
14
13
  /**
15
14
  * Semantic ordered list.
16
15
  */
17
- const OrderedListBase = React.forwardRef(({ children, start = 1, ...rest }, ref) => (
16
+ export const OrderedListBase = React.forwardRef(({ children, start = 1, ...rest }, ref) => (
18
17
  <StyledList {...rest} ref={ref} start={start}>
19
18
  {children}
20
19
  </StyledList>
21
20
  ))
22
- OrderedListBase.displayName = 'OrderedList'
21
+ OrderedListBase.displayName = 'OrderedListBase'
23
22
 
24
23
  OrderedListBase.propTypes = {
25
24
  /**
@@ -31,7 +30,3 @@ OrderedListBase.propTypes = {
31
30
  */
32
31
  start: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
33
32
  }
34
-
35
- OrderedListBase.Item = ItemBase
36
-
37
- export default OrderedListBase
@@ -11,7 +11,7 @@ import {
11
11
  wrapStringsInText
12
12
  } from '@telus-uds/components-base'
13
13
  import styled from 'styled-components'
14
- import ItemBase from './ItemBase'
14
+ import { OrderedListItemBase } from './OrderedListItemBase'
15
15
  import { htmlAttrs } from '../utils'
16
16
  import { OL_COUNTER_NAME } from './constants'
17
17
 
@@ -30,40 +30,40 @@ const selectItemTextStyles = (
30
30
  lineHeight: itemLineHeight
31
31
  })
32
32
 
33
- const StyledItemBase = styled(ItemBase)(
33
+ const StyledItemBase = styled(OrderedListItemBase)(
34
34
  ({
35
- interItemMargin,
36
- itemBulletContainerWidth,
37
- itemBulletTextAlign,
38
- itemFontWeight,
39
- itemFontSize,
40
- itemFontName,
41
- itemLineHeight,
42
- themeOptions,
43
- listGutter,
44
- itemColor,
45
- itemTextColor
35
+ $interItemMargin,
36
+ $itemBulletContainerWidth,
37
+ $itemBulletTextAlign,
38
+ $itemFontWeight,
39
+ $itemFontSize,
40
+ $itemFontName,
41
+ $itemLineHeight,
42
+ $themeOptions,
43
+ $listGutter,
44
+ $itemColor,
45
+ $itemTextColor
46
46
  }) => ({
47
47
  counterIncrement: OL_COUNTER_NAME,
48
- '::before': {
48
+ '&::before': {
49
49
  content: `counter(${OL_COUNTER_NAME})'.'`,
50
50
  display: 'inline-block',
51
- color: itemColor || itemTextColor,
52
- width: itemBulletContainerWidth,
53
- paddingRight: listGutter,
54
- textAlign: itemBulletTextAlign,
51
+ color: $itemColor || $itemTextColor,
52
+ width: $itemBulletContainerWidth,
53
+ paddingRight: $listGutter,
54
+ textAlign: $itemBulletTextAlign,
55
55
  flexShrink: 0,
56
56
  whiteSpace: 'nowrap',
57
57
  overflow: 'hidden',
58
58
  ...applyTextStyles({
59
- fontWeight: itemFontWeight,
60
- fontSize: itemFontSize,
61
- fontName: itemFontName,
62
- themeOptions
59
+ fontWeight: $itemFontWeight,
60
+ fontSize: $itemFontSize,
61
+ fontName: $itemFontName,
62
+ themeOptions: $themeOptions
63
63
  }),
64
- lineHeight: `${itemLineHeight * itemFontSize}px`
64
+ lineHeight: `${$itemLineHeight * $itemFontSize}px`
65
65
  },
66
- ':not(:last-child)': { marginBottom: interItemMargin }
66
+ '&:not(:last-child)': { marginBottom: $interItemMargin }
67
67
  })
68
68
  )
69
69
 
@@ -73,7 +73,7 @@ const ItemContent = styled.div({
73
73
  gap: 0
74
74
  })
75
75
 
76
- const Item = React.forwardRef(
76
+ export const OrderedListItem = React.forwardRef(
77
77
  ({ children, counterName, title, tokens = {}, variant, ...rest }, ref) => {
78
78
  // We are reusing some tokens from the list component here in order to provide a unified
79
79
  // experience
@@ -92,13 +92,27 @@ const Item = React.forwardRef(
92
92
  })
93
93
 
94
94
  return (
95
- <StyledItemBase ref={ref} themeOptions={themeOptions} {...themeTokens} {...selectProps(rest)}>
95
+ <StyledItemBase
96
+ ref={ref}
97
+ $themeOptions={themeOptions}
98
+ $interItemMargin={themeTokens.interItemMargin}
99
+ $itemBulletContainerWidth={themeTokens.itemBulletContainerWidth}
100
+ $itemBulletTextAlign={themeTokens.itemBulletTextAlign}
101
+ $itemFontWeight={themeTokens.itemFontWeight}
102
+ $itemFontSize={themeTokens.itemFontSize}
103
+ $itemFontName={themeTokens.itemFontName}
104
+ $itemLineHeight={themeTokens.itemLineHeight}
105
+ $listGutter={themeTokens.listGutter}
106
+ $itemColor={themeTokens.itemColor}
107
+ $itemTextColor={themeTokens.itemTextColor}
108
+ {...selectProps(rest)}
109
+ >
96
110
  {title ? (
97
111
  <StackView tokens={{ flexShrink: 1 }} space={0}>
98
112
  <Typography variant={{ size: 'h4' }} tokens={headingTokens}>
99
113
  {title}
100
114
  </Typography>
101
- <ItemContent {...themeTokens}>{itemContent}</ItemContent>
115
+ <ItemContent>{itemContent}</ItemContent>
102
116
  </StackView>
103
117
  ) : (
104
118
  <ItemContent>{itemContent}</ItemContent>
@@ -108,16 +122,16 @@ const Item = React.forwardRef(
108
122
  }
109
123
  )
110
124
 
111
- Item.displayName = 'OrderedListItem'
125
+ OrderedListItem.displayName = 'OrderedListItem'
112
126
 
113
- Item.propTypes = {
127
+ OrderedListItem.propTypes = {
114
128
  ...selectedSystemPropTypes,
115
129
  /**
116
130
  * Item content
117
131
  */
118
132
  children: PropTypes.node.isRequired,
119
133
  /**
120
- * Defines the title of the `OrderedList.Item`
134
+ * Defines the title of the `OrderedListItem`
121
135
  */
122
136
  title: PropTypes.string,
123
137
  /**
@@ -125,5 +139,3 @@ Item.propTypes = {
125
139
  */
126
140
  tokens: getTokensPropType('OrderedList')
127
141
  }
128
-
129
- export default Item
@@ -6,13 +6,13 @@ const StyledItem = styled.li({
6
6
  display: 'flex'
7
7
  })
8
8
 
9
- const Item = ({ children, ...rest }) => <StyledItem {...rest}>{children}</StyledItem>
9
+ export const OrderedListItemBase = ({ children, ...rest }) => (
10
+ <StyledItem {...rest}>{children}</StyledItem>
11
+ )
10
12
 
11
- Item.propTypes = {
13
+ OrderedListItemBase.propTypes = {
12
14
  /**
13
15
  * Item content
14
16
  */
15
17
  children: PropTypes.node.isRequired
16
18
  }
17
-
18
- export default Item
@@ -1,2 +1 @@
1
- // eslint-disable-next-line import/prefer-default-export
2
1
  export const OL_COUNTER_NAME = 'allium-ordered-list-counter'
@@ -7,10 +7,10 @@ import { htmlAttrs, useTypographyTheme } from '../utils'
7
7
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
8
8
 
9
9
  const StyledParagraph = styled.p`
10
- ${({ align }) => (align ? `text-align: ${align};` : '')}
11
- ${({ linesBetween }) => `
12
- margin-block-start: ${linesBetween}em;
13
- margin-block-end: ${linesBetween}em;
10
+ ${({ $align }) => ($align ? `text-align: ${$align};` : '')}
11
+ ${({ $linesBetween }) => `
12
+ margin-block-start: ${$linesBetween}em;
13
+ margin-block-end: ${$linesBetween}em;
14
14
  `}
15
15
  &:first-child {
16
16
  margin-block-start: 0em;
@@ -30,15 +30,15 @@ const StyledParagraph = styled.p`
30
30
  contrast.
31
31
  * - All Allium Typography variants other than header size variants are supported.
32
32
  */
33
- const Paragraph = React.forwardRef(
33
+ export const Paragraph = React.forwardRef(
34
34
  ({ children, variant, tokens, testID, align, linesBetween = 1, ...rest }, ref) => {
35
35
  const style = useTypographyTheme(variant, tokens)
36
36
  return (
37
37
  <StyledParagraph
38
38
  ref={ref}
39
- linesBetween={linesBetween}
39
+ $linesBetween={linesBetween}
40
40
  data-testid={testID}
41
- align={align}
41
+ $align={align}
42
42
  style={style}
43
43
  {...selectProps(rest)}
44
44
  >
@@ -82,5 +82,3 @@ Paragraph.propTypes = {
82
82
  size: PropTypes.oneOf(['micro', 'small', 'large'])
83
83
  })
84
84
  }
85
-
86
- export default Paragraph
@@ -18,11 +18,11 @@ import {
18
18
  getTokensPropType
19
19
  } from '@telus-uds/components-base'
20
20
  import styled from 'styled-components'
21
- import FullBleedContent, {
21
+ import {
22
+ FullBleedContent,
22
23
  getFullBleedBorderRadius,
23
24
  useFullBleedContentProps
24
25
  } from '../shared/FullBleedContent'
25
- import AuthorDate from './AuthorDate'
26
26
 
27
27
  // Passes React Native-oriented system props through UDS PressableCardBase
28
28
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([
@@ -33,13 +33,13 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([
33
33
 
34
34
  // Stop changes to the card's inner border width causing the size and
35
35
  // apparent position of the full bleed image to change.
36
- const FullBleedOffsetOuter = styled.div(({ borderOffset }) => ({
36
+ const FullBleedOffsetOuter = styled.div(({ $borderOffset }) => ({
37
37
  overflow: 'hidden',
38
- marginTop: borderOffset * 2
38
+ marginTop: $borderOffset * 2
39
39
  }))
40
- const FullBleedOffsetInner = styled.div(({ borderOffset }) => ({
40
+ const FullBleedOffsetInner = styled.div(({ $borderOffset }) => ({
41
41
  position: 'relative',
42
- margin: 0 - borderOffset
42
+ margin: 0 - $borderOffset
43
43
  }))
44
44
 
45
45
  const defaultTokens = {
@@ -62,19 +62,7 @@ const defaultTokens = {
62
62
  * - Use `fullBleedContent` to set the thumbnail image
63
63
  */
64
64
  const PreviewCard = React.forwardRef(
65
- (
66
- {
67
- tag,
68
- title,
69
- footer,
70
- fullBleedImage,
71
- fullBleedContent = fullBleedImage,
72
- onPress,
73
- href,
74
- ...rest
75
- },
76
- ref
77
- ) => {
65
+ ({ tag, title, footer, fullBleedContent, onPress, href, ...rest }, ref) => {
78
66
  const { fullBleedContentPosition, contentStackDirection, fullBleedContentProps } =
79
67
  useFullBleedContentProps({
80
68
  ...fullBleedContent,
@@ -137,8 +125,8 @@ const PreviewCard = React.forwardRef(
137
125
  )}
138
126
  </Box>
139
127
  {Boolean(fullBleedContentProps.src || fullBleedContentProps.content) && (
140
- <FullBleedOffsetOuter borderOffset={borderOffset}>
141
- <FullBleedOffsetInner borderOffset={borderOffset}>
128
+ <FullBleedOffsetOuter $borderOffset={borderOffset}>
129
+ <FullBleedOffsetInner $borderOffset={borderOffset}>
142
130
  <FullBleedContent
143
131
  borderRadius={fullBleedBorderRadius}
144
132
  {...fullBleedContentProps}
@@ -156,9 +144,6 @@ const PreviewCard = React.forwardRef(
156
144
 
157
145
  PreviewCard.displayName = 'PreviewCard'
158
146
 
159
- // Provide standard author/date footer as a preset with the export
160
- PreviewCard.AuthorDate = AuthorDate
161
-
162
147
  PreviewCard.propTypes = {
163
148
  ...selectedSystemPropTypes,
164
149
  tokens: getTokensPropType('PreviewCard'),
@@ -180,23 +165,22 @@ PreviewCard.propTypes = {
180
165
  tag: PropTypes.string,
181
166
  /**
182
167
  * Section containing additional information, such as author and date.
183
- * Use `<PreviewCard.AuthorDate author={...} date={...} />` here for author and date.
168
+ * Use `<PreviewCardAuthorDate author={...} date={...} />` here for author and date.
184
169
  */
185
170
  footer: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
186
171
  /**
187
172
  * Text stating the title or headline of the story.
188
173
  */
189
174
  title: PropTypes.string.isRequired,
190
- /**
191
- * Full bleed image to be placed on the card, deprecated in favor of `fullBleedContent`.
192
- *
193
- * @deprecated
194
- */
195
- fullBleedImage: PropTypes.exact(FullBleedContent.propTypes || {}),
196
175
  /**
197
176
  * Full bleed content to be placed on the card.
198
177
  */
199
178
  fullBleedContent: PropTypes.exact(FullBleedContent.propTypes || {})
200
179
  }
201
180
 
202
- export default withLinkRouter(PreviewCard)
181
+ // Export unwrapped component for react-docgen to extract info for docsite
182
+ export { PreviewCard as PreviewCardBase }
183
+
184
+ // Export wrapped component as main PreviewCard export
185
+ const PreviewCardWithRouter = withLinkRouter(PreviewCard)
186
+ export { PreviewCardWithRouter as PreviewCard }
@@ -10,7 +10,7 @@ import { StackWrap, Typography, useThemeTokens } from '@telus-uds/components-bas
10
10
  * Add same locale-based date formatting as StoryCard when ready.
11
11
  * Get locale based on decision of https://github.com/telus/universal-design-system/issues/715
12
12
  */
13
- const AuthorDate = React.forwardRef(({ author, date }, ref) => {
13
+ export const PreviewCardAuthorDate = React.forwardRef(({ author, date }, ref) => {
14
14
  const { separatorColor: color } = useThemeTokens('PreviewCard', {}, {})
15
15
  return (
16
16
  <StackWrap space={2} ref={ref}>
@@ -23,9 +23,9 @@ const AuthorDate = React.forwardRef(({ author, date }, ref) => {
23
23
  )
24
24
  })
25
25
 
26
- AuthorDate.displayName = 'AuthorDate'
26
+ PreviewCardAuthorDate.displayName = 'PreviewCardAuthorDate'
27
27
 
28
- AuthorDate.propTypes = {
28
+ PreviewCardAuthorDate.propTypes = {
29
29
  /**
30
30
  * Name of the author
31
31
  */
@@ -35,5 +35,3 @@ AuthorDate.propTypes = {
35
35
  */
36
36
  date: PropTypes.string.isRequired
37
37
  }
38
-
39
- export default AuthorDate
@@ -11,17 +11,17 @@ import {
11
11
  a11yProps
12
12
  } from '@telus-uds/components-base'
13
13
  import styled from 'styled-components'
14
- import FootnoteLink from '../Footnote/FootnoteLink'
15
- import getTypographyTokens from './tokens'
14
+ import { FootnoteLink } from '../Footnote/FootnoteLink'
15
+ import { tokens as getTypographyTokens } from './tokens'
16
16
  import { htmlAttrs, warn } from '../utils'
17
- import defaultDictionary from './dictionary'
17
+ import { dictionary as defaultDictionary } from './dictionary'
18
18
 
19
19
  const PRICE_BASELINE_VARIANT = 'baseline'
20
20
 
21
21
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs, a11yProps])
22
22
 
23
23
  const PriceLockupContainer = styled.div`
24
- align-items: ${({ alignItemsText }) => alignItemsText};
24
+ align-items: ${({ $alignItemsText }) => $alignItemsText};
25
25
  display: flex;
26
26
  flex-direction: column;
27
27
  width: fit-content;
@@ -30,32 +30,32 @@ const PriceContainer = styled.div.attrs({
30
30
  'aria-hidden': 'true'
31
31
  })`
32
32
  display: flex;
33
- margin-bottom: ${({ priceMarginBottom }) => priceMarginBottom};
33
+ margin-bottom: ${({ $priceMarginBottom }) => $priceMarginBottom};
34
34
  `
35
35
  const FootnoteContainer = styled.div`
36
36
  display: flex;
37
- margin-top: ${({ footnoteMarginTop }) => footnoteMarginTop};
38
- gap: ${({ footnoteGap }) => footnoteGap};
37
+ margin-top: ${({ $footnoteMarginTop }) => $footnoteMarginTop};
38
+ gap: ${({ $footnoteGap }) => $footnoteGap};
39
39
  `
40
40
 
41
41
  const BottomTextContainer = styled.div`
42
- margin-top: ${({ bottomTextMarginTop }) => bottomTextMarginTop};
42
+ margin-top: ${({ $bottomTextMarginTop }) => $bottomTextMarginTop};
43
43
  `
44
44
 
45
45
  const BottomLinksContainer = styled.div`
46
46
  align-self: center;
47
- margin-left: ${({ bottomLinksMarginLeft }) => bottomLinksMarginLeft};
47
+ margin-left: ${({ $bottomLinksMarginLeft }) => $bottomLinksMarginLeft};
48
48
  `
49
49
 
50
50
  const TopTextContainer = styled.div.attrs({
51
51
  'aria-hidden': 'true'
52
52
  })`
53
- margin-bottom: ${({ topTextMarginBottom }) => topTextMarginBottom};
53
+ margin-bottom: ${({ $topTextMarginBottom }) => $topTextMarginBottom};
54
54
  `
55
55
 
56
56
  const PriceTextContainer = styled.div`
57
57
  display: flex;
58
- flex-direction: ${({ ratePosition }) => (ratePosition === 'bottom' ? 'column' : 'row')};
58
+ flex-direction: ${({ $ratePosition }) => ($ratePosition === 'bottom' ? 'column' : 'row')};
59
59
  `
60
60
 
61
61
  const RateContainer = styled.div`
@@ -63,25 +63,25 @@ const RateContainer = styled.div`
63
63
  `
64
64
 
65
65
  const RateTextContainer = styled.div`
66
- align-self: ${({ ratePosition }) => (ratePosition === 'bottom' ? 'flex-start' : 'flex-end')};
66
+ align-self: ${({ $ratePosition }) => ($ratePosition === 'bottom' ? 'flex-start' : 'flex-end')};
67
67
  `
68
68
 
69
69
  const StrikeThroughContainer = styled.div`
70
70
  display: flex;
71
71
  position: relative;
72
72
  align-items: center;
73
- ::before {
73
+ &::before {
74
74
  content: '';
75
75
  width: 100%;
76
- top: ${({ strikeThroughPosition }) => `${strikeThroughPosition}px`};
77
- height: ${({ strikeThroughHeight }) => `${strikeThroughHeight}px`};
78
- background: ${({ strikeThroughColor }) => strikeThroughColor};
76
+ top: ${({ $strikeThroughPosition }) => `${$strikeThroughPosition}px`};
77
+ height: ${({ $strikeThroughHeight }) => `${$strikeThroughHeight}px`};
78
+ background: ${({ $strikeThroughColor }) => $strikeThroughColor};
79
79
  position: absolute;
80
80
  }
81
81
  `
82
82
  const TypographyContainer = styled.div`
83
83
  display: flex;
84
- padding-top: ${({ paddingTop }) => `${paddingTop || 0}px`};
84
+ padding-top: ${({ $paddingTop }) => `${$paddingTop || 0}px`};
85
85
  `
86
86
  const InlineTextWithFootnote = styled.div`
87
87
  display: inline;
@@ -126,7 +126,7 @@ const selectStrikeThroughTokens = ({
126
126
  strikeThroughColor
127
127
  })
128
128
 
129
- const PriceLockup = React.forwardRef(
129
+ export const PriceLockup = React.forwardRef(
130
130
  (
131
131
  {
132
132
  size = 'medium',
@@ -193,7 +193,7 @@ const PriceLockup = React.forwardRef(
193
193
  : { tokens: { ...restOfTokens, color: fontColor } }
194
194
 
195
195
  return (
196
- <TypographyContainer paddingTop={paddingTop}>
196
+ <TypographyContainer $paddingTop={paddingTop}>
197
197
  <Typography {...customProps}>{value}</Typography>
198
198
  </TypographyContainer>
199
199
  )
@@ -218,7 +218,11 @@ const PriceLockup = React.forwardRef(
218
218
  return (
219
219
  <>
220
220
  <A11yText text={a11yText} />
221
- <StrikeThroughContainer {...selectStrikeThroughTokens(themeTokens)}>
221
+ <StrikeThroughContainer
222
+ $strikeThroughPosition={selectStrikeThroughTokens(themeTokens).strikeThroughPosition}
223
+ $strikeThroughHeight={selectStrikeThroughTokens(themeTokens).strikeThroughHeight}
224
+ $strikeThroughColor={selectStrikeThroughTokens(themeTokens).strikeThroughColor}
225
+ >
222
226
  {amountComponent}
223
227
  </StrikeThroughContainer>
224
228
  </>
@@ -230,8 +234,8 @@ const PriceLockup = React.forwardRef(
230
234
 
231
235
  const renderPrice = () => (
232
236
  <>
233
- <PriceContainer priceMarginBottom={`${priceMarginBottom}px`}>
234
- <PriceTextContainer ratePosition={ratePosition}>
237
+ <PriceContainer $priceMarginBottom={`${priceMarginBottom}px`}>
238
+ <PriceTextContainer $ratePosition={ratePosition}>
235
239
  <RateContainer>
236
240
  {signDirection === 'left' && renderCurrencySymbol()}
237
241
  {renderAmount()}
@@ -239,14 +243,14 @@ const PriceLockup = React.forwardRef(
239
243
  {signDirection === 'right' && <>&nbsp;{renderCurrencySymbol()}</>}
240
244
  </RateContainer>
241
245
  {rateText && (
242
- <RateTextContainer ratePosition={ratePosition}>
246
+ <RateTextContainer $ratePosition={ratePosition}>
243
247
  {renderTypography(rateText, typographyTokens.rate, ratePosition)}
244
248
  </RateTextContainer>
245
249
  )}
246
250
  </PriceTextContainer>
247
251
 
248
252
  {!bottomText && footnoteLinks.length <= 3 && (
249
- <BottomLinksContainer bottomLinksMarginLeft={`${bottomLinksMarginLeft}px`}>
253
+ <BottomLinksContainer $bottomLinksMarginLeft={`${bottomLinksMarginLeft}px`}>
250
254
  {renderFootnoteLinks()}
251
255
  </BottomLinksContainer>
252
256
  )}
@@ -257,8 +261,8 @@ const PriceLockup = React.forwardRef(
257
261
 
258
262
  const renderFootnoteContent = () => {
259
263
  const containerProps = {
260
- footnoteMarginTop: `${footnoteMarginTop}px`,
261
- footnoteGap: `${footnoteGap}px`
264
+ $footnoteMarginTop: `${footnoteMarginTop}px`,
265
+ $footnoteGap: `${footnoteGap}px`
262
266
  }
263
267
 
264
268
  const shouldUseInline = linkPosition === 'inline'
@@ -280,7 +284,7 @@ const PriceLockup = React.forwardRef(
280
284
  return (
281
285
  <>
282
286
  <FootnoteContainer {...containerProps}>
283
- <BottomTextContainer bottomTextMarginTop={`${bottomTextMarginTop}px`}>
287
+ <BottomTextContainer $bottomTextMarginTop={`${bottomTextMarginTop}px`}>
284
288
  {bottomTextContent}
285
289
  </BottomTextContainer>
286
290
  {showFootnotesInContainer && renderFootnoteLinks()}
@@ -358,13 +362,13 @@ const PriceLockup = React.forwardRef(
358
362
  return (
359
363
  <PriceLockupContainer
360
364
  {...selectProps(rest)}
361
- alignItemsText={alignItemsText}
365
+ $alignItemsText={alignItemsText}
362
366
  ref={ref}
363
367
  role="group"
364
368
  aria-label={ariaLabel}
365
369
  >
366
370
  {topText && (
367
- <TopTextContainer topTextMarginBottom={`${topTextMarginBottom}px`}>
371
+ <TopTextContainer $topTextMarginBottom={`${topTextMarginBottom}px`}>
368
372
  {renderTypography(topText, typographyTokens.topText)}
369
373
  </TopTextContainer>
370
374
  )}
@@ -470,5 +474,3 @@ PriceLockup.propTypes = {
470
474
  */
471
475
  tokens: getTokensPropType('PriceLockup')
472
476
  }
473
-
474
- export default PriceLockup
@@ -1,4 +1,4 @@
1
- export default {
1
+ export const dictionary = {
2
2
  en: {
3
3
  price: '%{amount} %{currency}',
4
4
  priceWithCents: '%{amount} %{currency} and %{cents} cents',
@@ -1,5 +1,5 @@
1
1
  // map typography tokens accordenly
2
- export default ({
2
+ export const tokens = ({
3
3
  topTextFontSize,
4
4
  fontColor,
5
5
  topTextLineHeight,