@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
@@ -17,29 +17,22 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
17
17
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
18
18
  const dateFormat = 'DD / MM / YYYY';
19
19
  const dateFormatWithoutSpaces = 'DD/MM/YYYY';
20
-
21
20
  const getResponsiveDaySize = function () {
22
21
  let inline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
23
22
  let viewport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'md';
24
-
25
23
  if (viewport === 'xs') {
26
24
  return inline ? undefined : 36;
27
25
  }
28
-
29
26
  return inline ? 60 : 44;
30
27
  };
31
-
32
28
  const getResponsiveCircleSize = function () {
33
29
  let inline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
34
30
  let viewport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'md';
35
-
36
31
  if (viewport === 'xs') {
37
32
  return 26;
38
33
  }
39
-
40
34
  return inline ? 44 : 26;
41
35
  };
42
-
43
36
  const MonthCenterContainer = /*#__PURE__*/styled.div.withConfig({
44
37
  displayName: "DatePicker__MonthCenterContainer",
45
38
  componentId: "components-web__sc-mz8fi3-0"
@@ -54,6 +47,7 @@ const DateInputWrapper = /*#__PURE__*/styled.div.withConfig({
54
47
  display: 'flex',
55
48
  flexDirection: 'column'
56
49
  });
50
+
57
51
  /**
58
52
  * Use DatePicker to select a date on a calendar.
59
53
  *
@@ -75,10 +69,8 @@ const DateInputWrapper = /*#__PURE__*/styled.div.withConfig({
75
69
  * - Optimized for keyboard interaction and tablet touch
76
70
  * - Recommended for viewports greater than or equal to 576px
77
71
  */
78
-
79
72
  const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
80
73
  var _dictionary$copy;
81
-
82
74
  let {
83
75
  copy = 'en',
84
76
  id,
@@ -117,25 +109,20 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
117
109
  setInputText(date instanceof moment ? date.format(dateFormat) : '');
118
110
  }
119
111
  }, [date, inputDate]);
120
-
121
112
  const onFocusChange = _ref2 => {
122
113
  let {
123
114
  focused
124
115
  } = _ref2;
125
-
126
116
  if (!isClickedInside) {
127
117
  setIsFocused(focused);
128
118
  }
129
-
130
119
  setIsClickedInside(false);
131
120
  };
132
-
133
121
  const handleFocus = event => {
134
122
  if (event.target.tagName === 'INPUT' && !disabled) {
135
123
  setIsFocused(true);
136
124
  }
137
125
  };
138
-
139
126
  const handleMouseDown = event => {
140
127
  if (!disabled) {
141
128
  if (event.target.tagName === 'INPUT') {
@@ -150,14 +137,12 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
150
137
  }
151
138
  }
152
139
  };
153
-
154
140
  const onChange = value => {
155
141
  setInputDate(value);
156
142
  setInputText(value.format(dateFormat));
157
143
  setIsFocused(false);
158
144
  if (onDateChange) onDateChange(value);
159
145
  };
160
-
161
146
  const onChangeInput = value => {
162
147
  if (moment(value.replace(/\s/g, ''), dateFormatWithoutSpaces, true).isValid()) {
163
148
  setInputDate(moment(value, dateFormat));
@@ -167,7 +152,6 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
167
152
  setInputText(value);
168
153
  }
169
154
  };
170
-
171
155
  const viewport = useViewport();
172
156
  const daySize = getResponsiveDaySize(inline, viewport);
173
157
  const circleSize = getResponsiveCircleSize(inline, viewport);
@@ -181,7 +165,8 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
181
165
  previousIcon,
182
166
  nextIcon,
183
167
  ...remainingTokens
184
- } = useThemeTokens('DatePicker', tokens, { ...variant,
168
+ } = useThemeTokens('DatePicker', tokens, {
169
+ ...variant,
185
170
  inline
186
171
  }, {
187
172
  viewport
@@ -198,7 +183,6 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
198
183
  fontName: remainingTokens.dayPickerWeekHeaderFontName,
199
184
  fontWeight: remainingTokens.dayPickerWeekHeaderFontWeight
200
185
  });
201
-
202
186
  const renderPrevButton = _ref3 => {
203
187
  let {
204
188
  onClick
@@ -214,7 +198,6 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
214
198
  testID: prevTestID
215
199
  });
216
200
  };
217
-
218
201
  const renderNextButton = _ref4 => {
219
202
  let {
220
203
  onClick
@@ -230,11 +213,12 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
230
213
  testID: nextTestID
231
214
  });
232
215
  };
233
-
234
- return /*#__PURE__*/_jsx(CalendarContainer, { ...selectProps(rest),
216
+ return /*#__PURE__*/_jsx(CalendarContainer, {
217
+ ...selectProps(rest),
235
218
  daySize: daySize,
236
219
  validation: validation,
237
- remainingTokens: { ...remainingTokens
220
+ remainingTokens: {
221
+ ...remainingTokens
238
222
  },
239
223
  calendarDayDefaultHeight: circleSize,
240
224
  calendarDayDefaultWidth: circleSize,
@@ -329,85 +313,71 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
329
313
  });
330
314
  });
331
315
  DatePicker.displayName = 'DatePicker';
332
- DatePicker.propTypes = { ...selectedSystemPropTypes,
316
+ DatePicker.propTypes = {
317
+ ...selectedSystemPropTypes,
333
318
  tokens: getTokensPropType('DatePicker'),
334
-
335
319
  /**
336
320
  * A unique identifier.
337
321
  */
338
322
  id: PropTypes.string.isRequired,
339
-
340
323
  /**
341
324
  * Whether the English or French copy will be used (e.g. for accessibility labels).
342
325
  */
343
326
  copy: PropTypes.oneOf(['en', 'fr']),
344
-
345
327
  /**
346
328
  * A Moment instance representing the currently selected date, i.e. `moment()`
347
329
  */
348
330
  date: momentPropTypes.momentObj,
349
-
350
331
  /**
351
332
  * A detailed description of validation error/success or additional instructions.
352
333
  * Visual variant is determined based on the `validation` prop.
353
334
  */
354
335
  feedback: PropTypes.string,
355
-
356
336
  /**
357
337
  * Event triggered every time a new date is clicked on
358
338
  * @param {Moment} date The new date that was selected
359
339
  */
360
340
  onDateChange: PropTypes.func,
361
-
362
341
  /**
363
342
  * A function determining whether a given date should be disabled
364
343
  * @param {Moment} date The date to optionally disable
365
344
  * @returns {bool}
366
345
  */
367
346
  isDayDisabled: PropTypes.func,
368
-
369
347
  /**
370
348
  * The field label to be displayed above the calendar
371
349
  */
372
350
  label: PropTypes.string,
373
-
374
351
  /**
375
352
  * A flag determining if the calendar picker is standalone or an input with overlay
376
353
  */
377
354
  inline: PropTypes.bool,
378
-
379
355
  /**
380
356
  * A short description of the expected input.
381
357
  */
382
358
  hint: PropTypes.string,
383
-
384
359
  /**
385
360
  * Position of the hint relative to label. Use `below` to display a larger hint below the label.
386
361
  */
387
362
  hintPosition: PropTypes.oneOf(['inline', 'below']),
388
-
389
363
  /**
390
364
  * Content of an optional `Tooltip`. If set, a tooltip button will be shown next to the label.
391
365
  */
392
366
  tooltip: PropTypes.string,
393
-
394
367
  /**
395
368
  * Use to visually mark an input as valid or invalid.
396
369
  */
397
370
  validation: PropTypes.oneOf(['error', 'success']),
398
-
399
371
  /**
400
372
  * Disable the input which will not open the calendar picker
401
373
  */
402
374
  disabled: PropTypes.bool,
403
-
404
375
  /**
405
376
  * A unique identifier for the previous icon button located on the datepicker.
406
377
  * This is for automation testing purposes.
407
378
  * Will be added as a `data-testid-prev` attribute for example.
408
379
  */
409
380
  prevTestID: PropTypes.string,
410
-
411
381
  /**
412
382
  * A unique identifier for the next icon button located on the datepicker.
413
383
  * This is for automation testing purposes.
@@ -34,56 +34,48 @@ const weekDays = {
34
34
  Fr: 'Ven',
35
35
  Sa: 'Sam'
36
36
  };
37
-
38
37
  const chooseAvailableStartDate = _ref => {
39
38
  let {
40
39
  date
41
40
  } = _ref;
42
41
  return `Choisir ${date}. Disponible.`;
43
42
  };
44
-
45
43
  const chooseAvailableEndDate = _ref2 => {
46
44
  let {
47
45
  date
48
46
  } = _ref2;
49
47
  return `Non disponible. ${date}`;
50
48
  };
51
-
52
49
  const chooseAvailableDate = _ref3 => {
53
50
  let {
54
51
  date
55
52
  } = _ref3;
56
53
  return date;
57
54
  };
58
-
59
55
  const dateIsUnavailable = _ref4 => {
60
56
  let {
61
57
  date
62
58
  } = _ref4;
63
59
  return `Not available. ${date}`;
64
60
  };
65
-
66
61
  const dateIsSelected = _ref5 => {
67
62
  let {
68
63
  date
69
64
  } = _ref5;
70
65
  return `Choisie. ${date}`;
71
66
  };
72
-
73
67
  const dateIsSelectedAsStartDate = _ref6 => {
74
68
  let {
75
69
  date
76
70
  } = _ref6;
77
71
  return `Choisie comme date de début. ${date}`;
78
72
  };
79
-
80
73
  const dateIsSelectedAsEndDate = _ref7 => {
81
74
  let {
82
75
  date
83
76
  } = _ref7;
84
77
  return `Choisie comme date de fin. ${date}`;
85
78
  };
86
-
87
79
  const dictionary = {
88
80
  en: undefined,
89
81
  // uses react-dates defaults
@@ -27,24 +27,25 @@ const StyledDisclaimer = /*#__PURE__*/styled.p.withConfig({
27
27
  ...tokens
28
28
  };
29
29
  });
30
+
30
31
  /**
31
32
  * Use Disclaimer to display singular legal statement and must be displayed
32
33
  * immediately adjacent to the related, originating content.
33
34
  */
34
-
35
35
  const Disclaimer = _ref2 => {
36
36
  let {
37
37
  children,
38
38
  ...rest
39
39
  } = _ref2;
40
40
  const themeTokens = useThemeTokens('Disclaimer');
41
- return /*#__PURE__*/_jsx(StyledDisclaimer, { ...selectProps(rest),
41
+ return /*#__PURE__*/_jsx(StyledDisclaimer, {
42
+ ...selectProps(rest),
42
43
  ...themeTokens,
43
44
  children: children
44
45
  });
45
46
  };
46
-
47
- Disclaimer.propTypes = { ...selectedSystemPropTypes,
47
+ Disclaimer.propTypes = {
48
+ ...selectedSystemPropTypes,
48
49
  tokens: getTokensPropType('Disclaimer'),
49
50
  children: PropTypes.node.isRequired
50
51
  };
@@ -11,17 +11,16 @@ const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
11
11
  nativeID,
12
12
  ...rest
13
13
  } = _ref;
14
-
15
14
  const handleChange = (openPanels, event) => {
16
15
  if (typeof onToggle === 'function') {
17
16
  const isOpen = openPanels.length > 0;
18
17
  onToggle(event, isOpen);
19
18
  }
20
19
  };
21
-
22
20
  return /*#__PURE__*/_jsx(ExpandCollapse, {
23
21
  onChange: handleChange,
24
- children: expandProps => /*#__PURE__*/_jsx(ExpandCollapse.Panel, { ...expandProps,
22
+ children: expandProps => /*#__PURE__*/_jsx(ExpandCollapse.Panel, {
23
+ ...expandProps,
25
24
  panelId: "ExpandCollapseMiniPanel",
26
25
  variant: {
27
26
  mini: true
@@ -32,7 +31,8 @@ const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
32
31
  borderColor: 'transparent',
33
32
  textLine: 'none',
34
33
  backgroundColor: 'transparent'
35
- } // TODO refactor
34
+ }
35
+ // TODO refactor
36
36
  // eslint-disable-next-line react/no-unstable-nested-components
37
37
  ,
38
38
  control: pressableState => /*#__PURE__*/_jsx(ExpandCollapseMiniControl, {
@@ -46,18 +46,16 @@ const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
46
46
  });
47
47
  });
48
48
  ExpandCollapseMini.displayName = 'ExpandCollapseMini';
49
- ExpandCollapseMini.propTypes = { ...ExpandCollapseMiniControl.propTypes,
50
-
49
+ ExpandCollapseMini.propTypes = {
50
+ ...ExpandCollapseMiniControl.propTypes,
51
51
  /**
52
52
  * Function to call on pressing the panel's control, which should open or close the panel.
53
53
  */
54
54
  onToggle: PropTypes.func,
55
-
56
55
  /**
57
56
  * ID for DOM element on web
58
57
  */
59
58
  nativeID: PropTypes.string,
60
-
61
59
  /**
62
60
  * Children nodes that can be added
63
61
  */
@@ -3,16 +3,16 @@ import PropTypes from 'prop-types';
3
3
  import { selectSystemProps, Link, useThemeTokens } from '@telus-uds/components-base';
4
4
  import { htmlAttrs } from '../utils';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
- const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]); // The ExpandCollapseControl has all the appropriate role, a11y, press handling etc
7
- // and a more appropriate press area, defer interaction handling to it.
6
+ const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
8
7
 
8
+ // The ExpandCollapseControl has all the appropriate role, a11y, press handling etc
9
+ // and a more appropriate press area, defer interaction handling to it.
9
10
  const presentationOnly = {
10
11
  accessibilityRole: null,
11
12
  // Treat as regular flow content with the Control
12
13
  pointerEvents: 'none',
13
14
  // Stop RNW from stopping clicks from bubbling to Control
14
15
  focusable: false // Stop RNW from setting tabIndex={0}: focus goes to Control only
15
-
16
16
  };
17
17
 
18
18
  const selectLinkTokens = _ref => {
@@ -29,7 +29,6 @@ const selectLinkTokens = _ref => {
29
29
  blockFontSize: fontSize
30
30
  };
31
31
  };
32
-
33
32
  const ExpandCollapseMiniControl = _ref2 => {
34
33
  let {
35
34
  pressableState,
@@ -44,8 +43,8 @@ const ExpandCollapseMiniControl = _ref2 => {
44
43
  expanded,
45
44
  hover,
46
45
  focus
47
- } = pressableState || {}; // we only want focus outline when focusing, if user is pressing we don't want the border.
48
-
46
+ } = pressableState || {};
47
+ // we only want focus outline when focusing, if user is pressing we don't want the border.
49
48
  const {
50
49
  outerBorderColor
51
50
  } = useThemeTokens('Link', {}, {}, {
@@ -58,33 +57,32 @@ const ExpandCollapseMiniControl = _ref2 => {
58
57
  } = useThemeTokens('ExpandCollapseMiniControl', tokens, variant, {
59
58
  expanded,
60
59
  focus
61
- }); // Choose hover styles when any part of Control is hoverred
60
+ });
62
61
 
63
- const appearance = { ...variant,
62
+ // Choose hover styles when any part of Control is hoverred
63
+ const appearance = {
64
+ ...variant,
64
65
  hover
65
66
  };
66
-
67
67
  const getTokens = linkState => {
68
68
  const {
69
69
  hover: linkHover
70
70
  } = linkState || {};
71
71
  const isHovered = hover || linkHover;
72
-
73
72
  if (isHovered) {
74
73
  // Include vertical icon animation on hover alongside built-in Link theme, the size is size4
75
74
  return {
76
75
  iconTranslateY: (expanded ? -1 : 1) * size
77
76
  };
78
77
  }
79
-
80
78
  return {};
81
79
  };
82
-
83
80
  return /*#__PURE__*/_jsx(Link, {
84
81
  variant: appearance,
85
82
  icon: icon,
86
83
  iconPosition: iconPosition,
87
- tokens: linkState => ({ ...getTokens(linkState),
84
+ tokens: linkState => ({
85
+ ...getTokens(linkState),
88
86
  ...selectLinkTokens(themeTokens),
89
87
  outerBorderColor
90
88
  }),
@@ -93,25 +91,21 @@ const ExpandCollapseMiniControl = _ref2 => {
93
91
  children: expanded ? expandTitle : collapseTitle
94
92
  });
95
93
  };
96
-
97
- ExpandCollapseMiniControl.propTypes = { ...selectedSystemPropTypes,
94
+ ExpandCollapseMiniControl.propTypes = {
95
+ ...selectedSystemPropTypes,
98
96
  ...Link.propTypes,
99
-
100
97
  /**
101
98
  * Optional function to call on pressing the panel's control, in addition to opening or closing the panel
102
99
  */
103
100
  onPress: PropTypes.func,
104
-
105
101
  /**
106
102
  * ExpandCollapseMiniControl title when expanded
107
103
  */
108
104
  expandTitle: PropTypes.string.isRequired,
109
-
110
105
  /**
111
106
  * ExpandCollapseMiniControl title when collapsed
112
107
  */
113
108
  collapseTitle: PropTypes.string.isRequired,
114
-
115
109
  /**
116
110
  * React Native's `Pressable`'s state object
117
111
  */