@telus-uds/components-web 2.21.1 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/lib/Badge/Badge.js +2 -14
  3. package/lib/Badge/index.js +0 -3
  4. package/lib/BlockQuote/BlockQuote.js +4 -25
  5. package/lib/BlockQuote/index.js +0 -3
  6. package/lib/Breadcrumbs/Breadcrumbs.js +9 -36
  7. package/lib/Breadcrumbs/Item/Item.js +15 -25
  8. package/lib/Breadcrumbs/index.js +0 -2
  9. package/lib/Callout/Callout.js +2 -24
  10. package/lib/Callout/index.js +0 -3
  11. package/lib/Card/Card.js +15 -29
  12. package/lib/Card/CardContent.js +5 -18
  13. package/lib/Card/CardFooter.js +7 -19
  14. package/lib/Card/index.js +0 -3
  15. package/lib/Countdown/Countdown.js +5 -24
  16. package/lib/Countdown/Segment.js +3 -15
  17. package/lib/Countdown/index.js +0 -3
  18. package/lib/Countdown/types.js +2 -7
  19. package/lib/Countdown/useCountdown.js +0 -7
  20. package/lib/DatePicker/CalendarContainer.js +0 -5
  21. package/lib/DatePicker/DatePicker.js +9 -61
  22. package/lib/DatePicker/dictionary.js +0 -8
  23. package/lib/DatePicker/index.js +0 -3
  24. package/lib/DatePicker/reactDatesCss.js +0 -2
  25. package/lib/Disclaimer/Disclaimer.js +5 -14
  26. package/lib/Disclaimer/index.js +0 -2
  27. package/lib/ExpandCollapseMini/ExpandCollapseMini.js +6 -17
  28. package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +12 -25
  29. package/lib/ExpandCollapseMini/index.js +0 -3
  30. package/lib/Footnote/Footnote.js +17 -63
  31. package/lib/Footnote/FootnoteLink.js +3 -24
  32. package/lib/Footnote/index.js +0 -4
  33. package/lib/IconButton/IconButton.js +4 -14
  34. package/lib/IconButton/index.js +0 -3
  35. package/lib/Image/Image.js +5 -24
  36. package/lib/Image/index.js +0 -3
  37. package/lib/List/List.js +0 -2
  38. package/lib/List/ListItem.js +0 -8
  39. package/lib/List/index.js +0 -4
  40. package/lib/NavigationBar/NavigationBar.js +10 -35
  41. package/lib/NavigationBar/NavigationItem.js +5 -17
  42. package/lib/NavigationBar/NavigationSubMenu.js +3 -19
  43. package/lib/NavigationBar/collapseItems.js +6 -9
  44. package/lib/NavigationBar/index.js +0 -3
  45. package/lib/NavigationBar/resolveItemSelection.js +2 -3
  46. package/lib/OptimizeImage/OptimizeImage.js +6 -27
  47. package/lib/OptimizeImage/index.js +0 -3
  48. package/lib/OptimizeImage/utils/getFallbackUrl.js +0 -4
  49. package/lib/OptimizeImage/utils/getOptimizedUrl.js +0 -8
  50. package/lib/OptimizeImage/utils/hasWebpSupport.js +1 -5
  51. package/lib/OptimizeImage/utils/index.js +0 -4
  52. package/lib/OptimizeImage/utils/isSvgUrl.js +0 -1
  53. package/lib/OrderedList/Item.js +4 -21
  54. package/lib/OrderedList/ItemBase.js +2 -9
  55. package/lib/OrderedList/OrderedList.js +11 -22
  56. package/lib/OrderedList/OrderedListBase.js +3 -13
  57. package/lib/OrderedList/index.js +0 -4
  58. package/lib/Paragraph/Paragraph.js +3 -18
  59. package/lib/Paragraph/index.js +0 -3
  60. package/lib/PreviewCard/AuthorDate.js +1 -10
  61. package/lib/PreviewCard/PreviewCard.js +15 -35
  62. package/lib/PreviewCard/index.js +0 -3
  63. package/lib/PriceLockup/PriceLockup.js +78 -75
  64. package/lib/PriceLockup/index.js +0 -3
  65. package/lib/PriceLockup/tokens.js +0 -2
  66. package/lib/Progress/ProgressBar.js +5 -16
  67. package/lib/Progress/index.js +0 -4
  68. package/lib/QuantitySelector/QuantitySelector.js +8 -42
  69. package/lib/QuantitySelector/SideButton.js +4 -11
  70. package/lib/QuantitySelector/index.js +0 -3
  71. package/lib/QuantitySelector/styles.js +0 -6
  72. package/lib/ResponsiveImage/ResponsiveImage.js +5 -20
  73. package/lib/ResponsiveImage/index.js +0 -3
  74. package/lib/Ribbon/Ribbon.js +4 -20
  75. package/lib/Ribbon/index.js +0 -3
  76. package/lib/SkeletonProvider/SkeletonImage.js +0 -10
  77. package/lib/SkeletonProvider/SkeletonProvider.js +4 -22
  78. package/lib/SkeletonProvider/SkeletonTypography.js +0 -10
  79. package/lib/SkeletonProvider/index.js +0 -3
  80. package/lib/Span/Span.js +3 -17
  81. package/lib/Span/index.js +0 -3
  82. package/lib/Spinner/Spinner.js +11 -39
  83. package/lib/Spinner/SpinnerContent.js +2 -18
  84. package/lib/Spinner/index.js +0 -3
  85. package/lib/StoryCard/StoryCard.js +11 -31
  86. package/lib/StoryCard/index.js +0 -3
  87. package/lib/Table/Body.js +0 -6
  88. package/lib/Table/Cell.js +4 -24
  89. package/lib/Table/Header.js +0 -9
  90. package/lib/Table/Row.js +0 -8
  91. package/lib/Table/SubHeading.js +0 -9
  92. package/lib/Table/Table.js +5 -23
  93. package/lib/Table/index.js +0 -8
  94. package/lib/TermsAndConditions/ExpandCollapse.js +4 -14
  95. package/lib/TermsAndConditions/TermsAndConditions.js +7 -29
  96. package/lib/TermsAndConditions/index.js +0 -2
  97. package/lib/Testimonial/Testimonial.js +2 -26
  98. package/lib/Testimonial/index.js +0 -3
  99. package/lib/Toast/Toast.js +4 -25
  100. package/lib/Toast/index.js +0 -3
  101. package/lib/Video/ControlBar/ControlBar.js +2 -25
  102. package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +4 -17
  103. package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +4 -20
  104. package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +12 -26
  105. package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +8 -23
  106. package/lib/Video/MiddleControlButton/MiddleControlButton.js +2 -12
  107. package/lib/Video/Video.js +122 -194
  108. package/lib/Video/index.js +0 -3
  109. package/lib/VideoPicker/VideoPicker.js +6 -32
  110. package/lib/VideoPicker/VideoPickerPlayer.js +2 -10
  111. package/lib/VideoPicker/VideoPickerThumbnail.js +7 -28
  112. package/lib/VideoPicker/VideoSlider.js +7 -17
  113. package/lib/VideoPicker/index.js +0 -3
  114. package/lib/VideoPicker/videoPropType.js +2 -8
  115. package/lib/WaffleGrid/WaffleGrid.js +11 -28
  116. package/lib/WaffleGrid/index.js +0 -3
  117. package/lib/WebPortal/WebPortal.js +1 -5
  118. package/lib/WebPortal/index.js +0 -3
  119. package/lib/WebVideo/WebVideo.js +4 -30
  120. package/lib/WebVideo/index.js +0 -3
  121. package/lib/baseExports.js +6 -1
  122. package/lib/index.js +0 -49
  123. package/lib/shared/FullBleedContent/FullBleedContent.js +5 -17
  124. package/lib/shared/FullBleedContent/getFullBleedBorderRadius.js +0 -11
  125. package/lib/shared/FullBleedContent/index.js +0 -5
  126. package/lib/shared/FullBleedContent/useFullBleedContentProps.js +1 -12
  127. package/lib/shared/VideoSplash/SplashButton/SplashButton.js +2 -12
  128. package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +7 -23
  129. package/lib/shared/VideoSplash/VideoSplash.js +4 -17
  130. package/lib/shared/VideoSplash/helpers.js +0 -6
  131. package/lib/utils/index.js +0 -9
  132. package/lib/utils/logger.js +0 -6
  133. package/lib/utils/media.js +2 -11
  134. package/lib/utils/renderStructuredContent.js +14 -31
  135. package/lib/utils/ssr.js +0 -6
  136. package/lib/utils/transforms.js +0 -2
  137. package/lib/utils/useOverlaidPosition.js +6 -28
  138. package/lib/utils/useTypographyTheme.js +4 -5
  139. package/lib-module/Badge/Badge.js +2 -5
  140. package/lib-module/BlockQuote/BlockQuote.js +4 -15
  141. package/lib-module/Breadcrumbs/Breadcrumbs.js +9 -25
  142. package/lib-module/Breadcrumbs/Item/Item.js +15 -12
  143. package/lib-module/Callout/Callout.js +2 -16
  144. package/lib-module/Card/Card.js +14 -17
  145. package/lib-module/Card/CardContent.js +5 -8
  146. package/lib-module/Card/CardFooter.js +7 -9
  147. package/lib-module/Countdown/Countdown.js +6 -11
  148. package/lib-module/Countdown/Segment.js +6 -8
  149. package/lib-module/Countdown/types.js +2 -1
  150. package/lib-module/Countdown/useCountdown.js +0 -6
  151. package/lib-module/DatePicker/CalendarContainer.js +3 -1
  152. package/lib-module/DatePicker/DatePicker.js +9 -39
  153. package/lib-module/DatePicker/dictionary.js +0 -8
  154. package/lib-module/Disclaimer/Disclaimer.js +5 -4
  155. package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +6 -8
  156. package/lib-module/ExpandCollapseMini/ExpandCollapseMiniControl.js +13 -19
  157. package/lib-module/Footnote/Footnote.js +17 -41
  158. package/lib-module/Footnote/FootnoteLink.js +3 -12
  159. package/lib-module/IconButton/IconButton.js +4 -6
  160. package/lib-module/Image/Image.js +5 -14
  161. package/lib-module/NavigationBar/NavigationBar.js +10 -20
  162. package/lib-module/NavigationBar/NavigationItem.js +5 -5
  163. package/lib-module/NavigationBar/NavigationSubMenu.js +3 -8
  164. package/lib-module/NavigationBar/collapseItems.js +6 -8
  165. package/lib-module/NavigationBar/resolveItemSelection.js +2 -2
  166. package/lib-module/OptimizeImage/OptimizeImage.js +6 -16
  167. package/lib-module/OptimizeImage/utils/getFallbackUrl.js +0 -1
  168. package/lib-module/OptimizeImage/utils/getOptimizedUrl.js +0 -5
  169. package/lib-module/OptimizeImage/utils/hasWebpSupport.js +1 -5
  170. package/lib-module/OrderedList/Item.js +4 -7
  171. package/lib-module/OrderedList/ItemBase.js +2 -3
  172. package/lib-module/OrderedList/OrderedList.js +11 -9
  173. package/lib-module/OrderedList/OrderedListBase.js +3 -3
  174. package/lib-module/Paragraph/Paragraph.js +3 -8
  175. package/lib-module/PreviewCard/AuthorDate.js +1 -4
  176. package/lib-module/PreviewCard/PreviewCard.js +16 -19
  177. package/lib-module/PriceLockup/PriceLockup.js +78 -57
  178. package/lib-module/Progress/ProgressBar.js +7 -8
  179. package/lib-module/QuantitySelector/QuantitySelector.js +8 -30
  180. package/lib-module/QuantitySelector/SideButton.js +4 -6
  181. package/lib-module/ResponsiveImage/ResponsiveImage.js +5 -12
  182. package/lib-module/Ribbon/Ribbon.js +4 -9
  183. package/lib-module/SkeletonProvider/SkeletonImage.js +0 -5
  184. package/lib-module/SkeletonProvider/SkeletonProvider.js +4 -12
  185. package/lib-module/SkeletonProvider/SkeletonTypography.js +0 -5
  186. package/lib-module/Span/Span.js +3 -7
  187. package/lib-module/Spinner/Spinner.js +11 -24
  188. package/lib-module/Spinner/SpinnerContent.js +2 -8
  189. package/lib-module/StoryCard/StoryCard.js +12 -17
  190. package/lib-module/Table/Body.js +0 -2
  191. package/lib-module/Table/Cell.js +4 -14
  192. package/lib-module/Table/Header.js +0 -2
  193. package/lib-module/Table/Row.js +0 -2
  194. package/lib-module/Table/SubHeading.js +0 -2
  195. package/lib-module/Table/Table.js +5 -6
  196. package/lib-module/TermsAndConditions/ExpandCollapse.js +4 -2
  197. package/lib-module/TermsAndConditions/TermsAndConditions.js +7 -9
  198. package/lib-module/Testimonial/Testimonial.js +2 -11
  199. package/lib-module/Toast/Toast.js +4 -15
  200. package/lib-module/Video/ControlBar/ControlBar.js +2 -9
  201. package/lib-module/Video/ControlBar/Controls/VideoButton/VideoButton.js +4 -8
  202. package/lib-module/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +4 -8
  203. package/lib-module/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +12 -13
  204. package/lib-module/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +8 -10
  205. package/lib-module/Video/MiddleControlButton/MiddleControlButton.js +2 -3
  206. package/lib-module/Video/Video.js +122 -173
  207. package/lib-module/VideoPicker/VideoPicker.js +6 -15
  208. package/lib-module/VideoPicker/VideoPickerPlayer.js +2 -3
  209. package/lib-module/VideoPicker/VideoPickerThumbnail.js +7 -13
  210. package/lib-module/VideoPicker/VideoSlider.js +6 -9
  211. package/lib-module/VideoPicker/videoPropType.js +2 -1
  212. package/lib-module/WaffleGrid/WaffleGrid.js +11 -15
  213. package/lib-module/WebPortal/WebPortal.js +1 -1
  214. package/lib-module/WebVideo/WebVideo.js +4 -15
  215. package/lib-module/baseExports.js +3 -2
  216. package/lib-module/index.js +0 -1
  217. package/lib-module/shared/FullBleedContent/FullBleedContent.js +5 -10
  218. package/lib-module/shared/FullBleedContent/getFullBleedBorderRadius.js +0 -10
  219. package/lib-module/shared/FullBleedContent/useFullBleedContentProps.js +1 -11
  220. package/lib-module/shared/VideoSplash/SplashButton/SplashButton.js +2 -3
  221. package/lib-module/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +7 -12
  222. package/lib-module/shared/VideoSplash/VideoSplash.js +4 -4
  223. package/lib-module/utils/logger.js +2 -2
  224. package/lib-module/utils/media.js +2 -9
  225. package/lib-module/utils/renderStructuredContent.js +14 -25
  226. package/lib-module/utils/ssr.js +0 -4
  227. package/lib-module/utils/useOverlaidPosition.js +8 -27
  228. package/lib-module/utils/useTypographyTheme.js +4 -4
  229. package/package.json +3 -3
  230. package/src/PriceLockup/PriceLockup.jsx +36 -11
  231. package/src/baseExports.js +1 -0
  232. package/src/index.js +0 -1
  233. package/lib/Modal/Modal.js +0 -146
  234. package/lib/Modal/ModalContent.js +0 -203
  235. package/lib/Modal/index.js +0 -13
  236. package/lib-module/Modal/Modal.js +0 -132
  237. package/lib-module/Modal/ModalContent.js +0 -181
  238. package/lib-module/Modal/index.js +0 -2
  239. package/src/Modal/Modal.jsx +0 -121
  240. package/src/Modal/ModalContent.jsx +0 -167
  241. package/src/Modal/index.js +0 -3
@@ -105,7 +105,6 @@ const RibbonCurve = /*#__PURE__*/styled.div.withConfig({
105
105
  } = _ref17;
106
106
  return curveAfterWidth;
107
107
  });
108
-
109
108
  const Ribbon = _ref18 => {
110
109
  let {
111
110
  children,
@@ -144,11 +143,11 @@ const Ribbon = _ref18 => {
144
143
  fontWeight,
145
144
  fontSize,
146
145
  lineHeight
147
- } = useThemeTokens('Ribbon', tokens, { ...variant,
146
+ } = useThemeTokens('Ribbon', tokens, {
147
+ ...variant,
148
148
  wrap: shouldWrap
149
149
  });
150
150
  let background = backgroundColor;
151
-
152
151
  if (gradient) {
153
152
  const {
154
153
  type: gradientType,
@@ -158,7 +157,6 @@ const Ribbon = _ref18 => {
158
157
  const gradientBackground = `${gradientType}-gradient(${gradientAngle}deg, ${gradientColors[0].color}, ${gradientColors[1].color})`;
159
158
  background = gradientBackground;
160
159
  }
161
-
162
160
  return /*#__PURE__*/_jsxs(RibbonWrapper, {
163
161
  left: left,
164
162
  top: top,
@@ -200,19 +198,16 @@ const Ribbon = _ref18 => {
200
198
  })]
201
199
  });
202
200
  };
203
-
204
- Ribbon.propTypes = { ...selectedSystemPropTypes,
201
+ Ribbon.propTypes = {
202
+ ...selectedSystemPropTypes,
205
203
  tokens: getTokensPropType('Ribbon'),
206
204
  children: PropTypes.node,
207
-
208
205
  /** show/hide the ribbon fold
209
206
  * @deprecated please don't rely on `wrap` to turn off the wrapping (use `Badge` instead) as it will be removed in the future
210
207
  */
211
208
  wrap: PropTypes.bool,
212
-
213
209
  /** sets the left offset (triggers absolute positioning) */
214
210
  left: PropTypes.number,
215
-
216
211
  /** sets the top offset (triggers absolute positioning) */
217
212
  top: PropTypes.number
218
213
  };
@@ -1,10 +1,8 @@
1
1
  var _Skeleton$propTypes, _Skeleton$propTypes2, _Skeleton$propTypes3;
2
-
3
2
  import React from 'react';
4
3
  import PropTypes from 'prop-types';
5
4
  import { Skeleton } from '@telus-uds/components-base';
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
-
8
6
  const SkeletonImage = _ref => {
9
7
  let {
10
8
  rounded,
@@ -16,11 +14,9 @@ const SkeletonImage = _ref => {
16
14
  show,
17
15
  children
18
16
  } = _ref;
19
-
20
17
  if (!show) {
21
18
  return children;
22
19
  }
23
-
24
20
  const shape = rounded !== 'circle' ? 'box' : rounded;
25
21
  return /*#__PURE__*/_jsx(Skeleton, {
26
22
  size: size,
@@ -29,7 +25,6 @@ const SkeletonImage = _ref => {
29
25
  shape: shape
30
26
  });
31
27
  };
32
-
33
28
  SkeletonImage.propTypes = {
34
29
  imgHeight: PropTypes.number,
35
30
  rounded: PropTypes.oneOf(['circle', 'corners']),
@@ -6,24 +6,19 @@ import SkeletonTypography from './SkeletonTypography';
6
6
  import SkeletonImage from './SkeletonImage';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
9
-
10
9
  const SkeletonProvider = _ref => {
11
10
  let {
12
11
  children,
13
12
  show
14
13
  } = _ref;
15
-
16
14
  if (!show) {
17
15
  return children;
18
16
  }
19
-
20
17
  const mapChild = child => {
21
18
  if (!child) {
22
19
  return null;
23
20
  }
24
-
25
21
  let childElement = child;
26
-
27
22
  if (childElement.props && 'children' in childElement.props) {
28
23
  const {
29
24
  children: elementChildren
@@ -33,31 +28,28 @@ const SkeletonProvider = _ref => {
33
28
  children: mappedChildren
34
29
  });
35
30
  }
36
-
37
31
  if (childElement.type === Typography) {
38
- return /*#__PURE__*/_jsx(SkeletonTypography, { ...childElement.props.skeleton,
32
+ return /*#__PURE__*/_jsx(SkeletonTypography, {
33
+ ...childElement.props.skeleton,
39
34
  show: show,
40
35
  children: childElement
41
36
  });
42
37
  }
43
-
44
38
  if (childElement.type === Image) {
45
- return /*#__PURE__*/_jsx(SkeletonImage, { ...childElement.props.skeleton,
39
+ return /*#__PURE__*/_jsx(SkeletonImage, {
40
+ ...childElement.props.skeleton,
46
41
  imgHeight: childElement.props.height,
47
42
  rounded: childElement.props.rounded,
48
43
  show: show,
49
44
  children: childElement
50
45
  });
51
46
  }
52
-
53
47
  return childElement;
54
48
  };
55
-
56
49
  return /*#__PURE__*/_jsx(_Fragment, {
57
50
  children: Children.map(children, mapChild)
58
51
  });
59
52
  };
60
-
61
53
  SkeletonProvider.propTypes = {
62
54
  show: PropTypes.bool.isRequired,
63
55
  children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).isRequired
@@ -1,10 +1,8 @@
1
1
  var _Skeleton$propTypes, _Skeleton$propTypes2, _Skeleton$propTypes3, _Skeleton$propTypes4, _Skeleton$propTypes5;
2
-
3
2
  import React from 'react';
4
3
  import PropTypes from 'prop-types';
5
4
  import { Skeleton } from '@telus-uds/components-base';
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
-
8
6
  const SkeletonTypography = _ref => {
9
7
  let {
10
8
  show,
@@ -15,11 +13,9 @@ const SkeletonTypography = _ref => {
15
13
  lines,
16
14
  children
17
15
  } = _ref;
18
-
19
16
  if (!show) {
20
17
  return children;
21
18
  }
22
-
23
19
  return /*#__PURE__*/_jsx(Skeleton, {
24
20
  size: size,
25
21
  sizeIndex: sizeIndex,
@@ -28,7 +24,6 @@ const SkeletonTypography = _ref => {
28
24
  lines: lines
29
25
  });
30
26
  };
31
-
32
27
  SkeletonTypography.propTypes = {
33
28
  show: PropTypes.bool.isRequired,
34
29
  children: PropTypes.node,
@@ -14,13 +14,13 @@ const StyledSpan = /*#__PURE__*/styled.span.withConfig({
14
14
  } = _ref;
15
15
  return flex ? 'display: inline-flex' : '';
16
16
  });
17
+
17
18
  /**
18
19
  * Text as an HTML ```<span>``` element.
19
20
  *
20
21
  * Span may be used in cases where an inline span or direct access to HTML attributes is required.
21
22
  * In most cases, `Typography` should be used for text, or Paragraph for body text.
22
23
  */
23
-
24
24
  const Span = _ref2 => {
25
25
  let {
26
26
  children,
@@ -39,26 +39,22 @@ const Span = _ref2 => {
39
39
  children: children
40
40
  });
41
41
  };
42
-
43
- Span.propTypes = { ...selectedSystemPropTypes,
42
+ Span.propTypes = {
43
+ ...selectedSystemPropTypes,
44
44
  children: PropTypes.node.isRequired,
45
-
46
45
  /**
47
46
  * Adds `data-testid` attribute for testing
48
47
  */
49
48
  testID: PropTypes.string,
50
-
51
49
  /**
52
50
  * Sets display to inline-flex so that children are laid out using the flex model.
53
51
  * Use this if the span contains children that expect to be inside a flex container.
54
52
  */
55
53
  flex: PropTypes.bool,
56
-
57
54
  /**
58
55
  * Span takes the same tokens overrides as Typography
59
56
  */
60
57
  tokens: PropTypes.oneOf([PropTypes.object, PropTypes.func]),
61
-
62
58
  /**
63
59
  * Span can take any of Typography's theme variants
64
60
  */
@@ -63,25 +63,21 @@ const OpaqueContainer = /*#__PURE__*/styled.div.withConfig({
63
63
  })({
64
64
  opacity: BACKDROP_OPACITY
65
65
  });
66
-
67
66
  const recursiveMap = (children, fn) => React.Children.map(children, child => {
68
67
  if (! /*#__PURE__*/React.isValidElement(child)) {
69
68
  return child;
70
69
  }
71
-
72
70
  if (child.props.children) {
73
71
  return fn( /*#__PURE__*/React.cloneElement(child, {
74
72
  children: recursiveMap(child.props.children, fn)
75
73
  }));
76
74
  }
77
-
78
75
  return fn(child);
79
76
  });
77
+
80
78
  /**
81
79
  * Loading indicator.
82
80
  */
83
-
84
-
85
81
  const Spinner = _ref3 => {
86
82
  let {
87
83
  children,
@@ -104,12 +100,11 @@ const Spinner = _ref3 => {
104
100
  size: sizeVariant = 'large'
105
101
  } = variant;
106
102
  useScrollBlocking([fullScreen, show]);
107
-
108
103
  if (!show) {
109
104
  return children ?? null;
110
- } // Full screen spinner
111
-
105
+ }
112
106
 
107
+ // Full screen spinner
113
108
  if (fullScreen) {
114
109
  return /*#__PURE__*/_jsx(Portal, {
115
110
  children: /*#__PURE__*/_jsx(FullscreenOverlay, {
@@ -131,9 +126,9 @@ const Spinner = _ref3 => {
131
126
  })
132
127
  })
133
128
  });
134
- } // Overlay spinner
135
-
129
+ }
136
130
 
131
+ // Overlay spinner
137
132
  if (children) {
138
133
  return /*#__PURE__*/_jsxs(SpinnerContainer, {
139
134
  inline: inline,
@@ -156,15 +151,15 @@ const Spinner = _ref3 => {
156
151
  'aria-hidden': 'true'
157
152
  });
158
153
  }
159
-
160
154
  return undefined;
161
155
  })
162
156
  })]
163
157
  });
164
- } // Standalone spinner
165
-
158
+ }
166
159
 
167
- return /*#__PURE__*/_jsx(SpinnerContainer, { ...selectProps(rest),
160
+ // Standalone spinner
161
+ return /*#__PURE__*/_jsx(SpinnerContainer, {
162
+ ...selectProps(rest),
168
163
  children: /*#__PURE__*/_jsx(SpinnerContent, {
169
164
  label: label,
170
165
  labelPosition: labelPosition,
@@ -175,49 +170,41 @@ const Spinner = _ref3 => {
175
170
  })
176
171
  });
177
172
  };
178
-
179
- Spinner.propTypes = { ...selectedSystemPropTypes,
173
+ Spinner.propTypes = {
174
+ ...selectedSystemPropTypes,
180
175
  tokens: getTokensPropType('Spinner'),
181
-
182
176
  /**
183
177
  * Content to be overlaid while the spinner is active. Can be text, any HTML element,
184
178
  * or any component.
185
179
  */
186
180
  children: PropTypes.node,
187
-
188
181
  /**
189
182
  * Enables body locking.
190
183
  */
191
184
  fullScreen: PropTypes.bool,
192
-
193
185
  /**
194
186
  * Set the inline prop to true if the Spinner should only cover its children; if
195
187
  * the Spinner should cover the full width of its parent regardless of the size of
196
188
  * its children, inline should be set to false
197
189
  */
198
190
  inline: PropTypes.bool,
199
-
200
191
  /**
201
192
  * Communicates a message to assistive technology while visible. This same message
202
193
  * will appear underneath the spinner when its `size` is `large`.
203
194
  */
204
195
  label: PropTypes.string.isRequired,
205
-
206
196
  /**
207
197
  * The size of the spinner
208
198
  */
209
199
  // size: PropTypes.oneOf(['large', 'small']),
210
-
211
200
  /**
212
201
  * Whether or not to render the spinner.
213
202
  */
214
203
  show: PropTypes.bool,
215
-
216
204
  /**
217
205
  * If true, it should render a static spinner
218
206
  */
219
207
  isStatic: PropTypes.bool,
220
-
221
208
  /**
222
209
  * Determine where the label of the spinner should be placed, left, right, bottom or top.
223
210
  */
@@ -27,7 +27,6 @@ const Container = /*#__PURE__*/styled.div.withConfig({
27
27
  })
28
28
  };
29
29
  });
30
-
31
30
  const SpinnerContent = _ref2 => {
32
31
  let {
33
32
  label,
@@ -67,29 +66,24 @@ const SpinnerContent = _ref2 => {
67
66
  })
68
67
  });
69
68
  };
70
-
71
- SpinnerContent.propTypes = { ...selectedSystemPropTypes,
72
-
69
+ SpinnerContent.propTypes = {
70
+ ...selectedSystemPropTypes,
73
71
  /**
74
72
  * Communicates a message to assistive technology while visible. This same message will appear underneath the spinner when its `size` is `large`.
75
73
  */
76
74
  label: PropTypes.string.isRequired,
77
-
78
75
  /**
79
76
  * Whether the container has to have an overlay styling.
80
77
  */
81
78
  overlay: PropTypes.bool,
82
-
83
79
  /**
84
80
  * Size (width and height) of the spinner.
85
81
  */
86
82
  size: PropTypes.number,
87
-
88
83
  /**
89
84
  * The size of the spinner
90
85
  */
91
86
  sizeVariant: PropTypes.oneOf(['large', 'small']),
92
-
93
87
  /**
94
88
  * If true, it should render a static spinner
95
89
  */
@@ -3,13 +3,15 @@ import React, { forwardRef } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { Box, Divider, PressableCardBase, selectSystemProps, Spacer, StackView, StackWrap, Typography, hrefAttrsProp, a11yProps, focusHandlerProps, viewProps, withLinkRouter, useThemeTokens, useThemeTokensCallback, getTokensPropType } from '@telus-uds/components-base';
5
5
  import styled from 'styled-components';
6
- import FullBleedContent, { getFullBleedBorderRadius, useFullBleedContentProps } from '../shared/FullBleedContent'; // Passes React Native-oriented system props through UDS PressableCardBase
6
+ import FullBleedContent, { getFullBleedBorderRadius, useFullBleedContentProps } from '../shared/FullBleedContent';
7
7
 
8
+ // Passes React Native-oriented system props through UDS PressableCardBase
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, focusHandlerProps, viewProps]); // Stop changes to the card's inner border width causing the size and
11
- // apparent position of the full bleed image to change.
11
+ const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, focusHandlerProps, viewProps]);
12
12
 
13
+ // Stop changes to the card's inner border width causing the size and
14
+ // apparent position of the full bleed image to change.
13
15
  const FullBleedOffsetOuter = /*#__PURE__*/styled.div.withConfig({
14
16
  displayName: "StoryCard__FullBleedOffsetOuter",
15
17
  componentId: "components-web__sc-yhvivu-0"
@@ -34,6 +36,7 @@ const FullBleedOffsetInner = /*#__PURE__*/styled.div.withConfig({
34
36
  margin: 0 - borderOffset
35
37
  };
36
38
  });
39
+
37
40
  /**
38
41
  * Showcase and guide users to another page, offering a description of that page's story.
39
42
  * Whole card is interactive, width expands based on column or container.
@@ -45,7 +48,6 @@ const FullBleedOffsetInner = /*#__PURE__*/styled.div.withConfig({
45
48
  * - Use `href` to set the target URL
46
49
  * - Use `fullBleedContent` to set the thumbnail image
47
50
  */
48
-
49
51
  const StoryCard = /*#__PURE__*/forwardRef((_ref3, ref) => {
50
52
  let {
51
53
  tag,
@@ -64,14 +66,13 @@ const StoryCard = /*#__PURE__*/forwardRef((_ref3, ref) => {
64
66
  fullBleedContentPosition,
65
67
  contentStackDirection,
66
68
  fullBleedContentProps
67
- } = useFullBleedContentProps({ ...fullBleedContent,
69
+ } = useFullBleedContentProps({
70
+ ...fullBleedContent,
68
71
  position: 'bottom'
69
72
  });
70
73
  const generalTokens = useThemeTokens('StoryCard', tokens, variant);
71
74
  const getTokens = useThemeTokensCallback('StoryCard', tokens, variant);
72
-
73
75
  const getPressableCardTokens = cardState => getTokens(cardState);
74
-
75
76
  const {
76
77
  hrefAttrs,
77
78
  rest: unusedRest
@@ -87,8 +88,9 @@ const StoryCard = /*#__PURE__*/forwardRef((_ref3, ref) => {
87
88
  const {
88
89
  borderRadius,
89
90
  borderWidth
90
- } = getPressableCardTokens(cardState); // Stop content jumping around as border size changes
91
+ } = getPressableCardTokens(cardState);
91
92
 
93
+ // Stop content jumping around as border size changes
92
94
  const borderOffset = borderWidth - generalTokens.borderWidth;
93
95
  const fullBleedBorderRadius = getFullBleedBorderRadius(borderRadius + borderOffset, fullBleedContentPosition);
94
96
  return /*#__PURE__*/_jsxs(StackView, {
@@ -166,9 +168,9 @@ const StoryCard = /*#__PURE__*/forwardRef((_ref3, ref) => {
166
168
  });
167
169
  });
168
170
  StoryCard.displayName = 'StoryCard';
169
- StoryCard.propTypes = { ...selectedSystemPropTypes,
171
+ StoryCard.propTypes = {
172
+ ...selectedSystemPropTypes,
170
173
  tokens: getTokensPropType('StoryCard'),
171
-
172
174
  /**
173
175
  * The URL of the story to be navigated to. Note that `Video` component does not play well when used within
174
176
  * a `StoryCard` with `href` prop set (the volume and progress sliders can be clicked but are not draggable).
@@ -177,39 +179,32 @@ StoryCard.propTypes = { ...selectedSystemPropTypes,
177
179
  * @see https://github.com/telus/allium-design-system/issues/6
178
180
  */
179
181
  href: PropTypes.string,
180
-
181
182
  /**
182
183
  * Optional function to be called on press e.g. for within-page navigation.
183
184
  */
184
185
  onPress: PropTypes.func,
185
-
186
186
  /**
187
187
  * Text stating the category of the content.
188
188
  */
189
189
  tag: PropTypes.string,
190
-
191
190
  /**
192
191
  * Text stating the date a story was published.
193
192
  */
194
193
  date: PropTypes.string.isRequired,
195
-
196
194
  /**
197
195
  * Text stating the title or headline of the story.
198
196
  */
199
197
  title: PropTypes.string.isRequired,
200
-
201
198
  /**
202
199
  * Text giving a short description of the story. One paragraph of plain text.
203
200
  */
204
201
  description: PropTypes.string.isRequired,
205
-
206
202
  /**
207
203
  * Full bleed image to be placed on the card, deprecated in favor of `fullBleedContent`.
208
204
  *
209
205
  * @deprecated
210
206
  */
211
207
  fullBleedImage: PropTypes.exact(FullBleedContent.propTypes || {}),
212
-
213
208
  /**
214
209
  * Full bleed image to be placed on the card.
215
210
  */
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
-
5
4
  const Body = _ref => {
6
5
  let {
7
6
  children
@@ -10,7 +9,6 @@ const Body = _ref => {
10
9
  children: children
11
10
  });
12
11
  };
13
-
14
12
  Body.propTypes = {
15
13
  children: PropTypes.node
16
14
  };
@@ -9,7 +9,6 @@ const HEADER_TYPE = {
9
9
  SUBHEADING: 'subHeading',
10
10
  ROWHEADING: 'rowHeading'
11
11
  };
12
-
13
12
  const stickyStyles = _ref => {
14
13
  let {
15
14
  cellStickyShadow,
@@ -18,7 +17,6 @@ const stickyStyles = _ref => {
18
17
  } = _ref;
19
18
  return css(["position:sticky;left:0;z-index:2;clip-path:inset(0 -8px 0 0);", " &::before{content:'';box-shadow:", ";position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;}"], type !== HEADER_TYPE.SUBHEADING && type !== HEADER_TYPE.HEADING ? `background-color: ${stickyBackgroundColor};` : undefined, cellStickyShadow);
20
19
  };
21
-
22
20
  const sharedStyles = /*#__PURE__*/css(["", ""], _ref2 => {
23
21
  let {
24
22
  isSticky,
@@ -39,7 +37,6 @@ const sharedStyles = /*#__PURE__*/css(["", ""], _ref2 => {
39
37
  stickyBackgroundColor
40
38
  }));
41
39
  });
42
-
43
40
  const createStyledCell = htmlElement => styled[htmlElement].withConfig({
44
41
  displayName: "Cell__createStyledCell",
45
42
  componentId: "components-web__sc-ltgfic-0"
@@ -50,10 +47,8 @@ const createStyledCell = htmlElement => styled[htmlElement].withConfig({
50
47
  } = _ref3;
51
48
  return type === HEADER_TYPE.HEADING ? `inset 0 1px 0 ${cellBoxShadowColor}, inset 0 -1px 0 ${cellBoxShadowColor}` : `inset 0 1px 0 ${cellBoxShadowColor}`;
52
49
  });
53
-
54
50
  const StyledHeaderCell = createStyledCell('th');
55
51
  const StyledDataCell = createStyledCell('td');
56
-
57
52
  const Cell = _ref4 => {
58
53
  let {
59
54
  children,
@@ -68,7 +63,8 @@ const Cell = _ref4 => {
68
63
  tokens: tableTokens,
69
64
  spacing
70
65
  } = useTableContext();
71
- const themeTokens = { ...tableTokens,
66
+ const themeTokens = {
67
+ ...tableTokens,
72
68
  ...cellTokens
73
69
  };
74
70
  const {
@@ -111,7 +107,6 @@ const Cell = _ref4 => {
111
107
  lineHeight,
112
108
  color: fontColor
113
109
  };
114
-
115
110
  switch (type) {
116
111
  case HEADER_TYPE.HEADING:
117
112
  return /*#__PURE__*/_jsx(StyledHeaderCell, {
@@ -123,7 +118,6 @@ const Cell = _ref4 => {
123
118
  children: children
124
119
  })
125
120
  });
126
-
127
121
  case HEADER_TYPE.SUBHEADING:
128
122
  return /*#__PURE__*/_jsx(StyledHeaderCell, {
129
123
  scope: "col",
@@ -134,7 +128,6 @@ const Cell = _ref4 => {
134
128
  children: children
135
129
  })
136
130
  });
137
-
138
131
  case HEADER_TYPE.ROWHEADING:
139
132
  return /*#__PURE__*/_jsx(StyledHeaderCell, {
140
133
  scope: "row",
@@ -145,9 +138,9 @@ const Cell = _ref4 => {
145
138
  children: children
146
139
  })
147
140
  });
148
-
149
141
  default:
150
- return /*#__PURE__*/_jsx(StyledDataCell, { ...sharedProps,
142
+ return /*#__PURE__*/_jsx(StyledDataCell, {
143
+ ...sharedProps,
151
144
  children: /*#__PURE__*/_jsx(Typography, {
152
145
  tokens: typographyTokens,
153
146
  children: children
@@ -155,18 +148,15 @@ const Cell = _ref4 => {
155
148
  });
156
149
  }
157
150
  };
158
-
159
151
  Cell.propTypes = {
160
152
  type: PropTypes.oneOf(['default', 'heading', 'subHeading', 'rowHeading']),
161
153
  tokens: PropTypes.object,
162
154
  children: PropTypes.node,
163
-
164
155
  /**
165
156
  * @ignore
166
157
  * Used internally for making the first column sticky
167
158
  */
168
159
  isFirstInRow: PropTypes.bool,
169
-
170
160
  /**
171
161
  * Defines the text alignment within the cell
172
162
  */
@@ -2,7 +2,6 @@ import React, { cloneElement } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Row from './Row';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
-
6
5
  const Header = _ref => {
7
6
  let {
8
7
  children
@@ -18,7 +17,6 @@ const Header = _ref => {
18
17
  })
19
18
  });
20
19
  };
21
-
22
20
  Header.propTypes = {
23
21
  children: PropTypes.node
24
22
  };
@@ -1,7 +1,6 @@
1
1
  import React, { cloneElement } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
-
5
4
  const Row = _ref => {
6
5
  let {
7
6
  children
@@ -12,7 +11,6 @@ const Row = _ref => {
12
11
  }))
13
12
  });
14
13
  };
15
-
16
14
  Row.propTypes = {
17
15
  children: PropTypes.node
18
16
  };
@@ -2,7 +2,6 @@ import React, { cloneElement } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Row from './Row';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
-
6
5
  const Header = _ref => {
7
6
  let {
8
7
  children
@@ -16,7 +15,6 @@ const Header = _ref => {
16
15
  }))
17
16
  });
18
17
  };
19
-
20
18
  Header.propTypes = {
21
19
  children: PropTypes.node
22
20
  };