@telus-uds/components-web 1.11.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +40 -2
  2. package/lib/Breadcrumbs/Breadcrumbs.js +7 -10
  3. package/lib/Breadcrumbs/Item/Item.js +10 -37
  4. package/lib/DatePicker/CalendarContainer.js +60 -71
  5. package/lib/DatePicker/DatePicker.js +66 -22
  6. package/lib/Footnote/Footnote.js +26 -9
  7. package/lib/List/List.js +11 -0
  8. package/lib/List/ListItem.js +48 -0
  9. package/lib/List/index.js +16 -0
  10. package/lib/PriceLockup/PriceLockup.js +27 -13
  11. package/lib/SkeletonProvider/SkeletonImage.js +55 -0
  12. package/lib/SkeletonProvider/SkeletonProvider.js +84 -0
  13. package/lib/SkeletonProvider/SkeletonTypography.js +54 -0
  14. package/lib/SkeletonProvider/index.js +13 -0
  15. package/lib/Table/Table.js +14 -5
  16. package/lib/Toast/Toast.js +1 -1
  17. package/lib/index.js +19 -1
  18. package/lib-module/Breadcrumbs/Breadcrumbs.js +7 -10
  19. package/lib-module/Breadcrumbs/Item/Item.js +11 -35
  20. package/lib-module/DatePicker/CalendarContainer.js +61 -72
  21. package/lib-module/DatePicker/DatePicker.js +67 -23
  22. package/lib-module/Footnote/Footnote.js +26 -9
  23. package/lib-module/List/List.js +2 -0
  24. package/lib-module/List/ListItem.js +31 -0
  25. package/lib-module/List/index.js +4 -0
  26. package/lib-module/PriceLockup/PriceLockup.js +27 -13
  27. package/lib-module/SkeletonProvider/SkeletonImage.js +42 -0
  28. package/lib-module/SkeletonProvider/SkeletonProvider.js +65 -0
  29. package/lib-module/SkeletonProvider/SkeletonTypography.js +41 -0
  30. package/lib-module/SkeletonProvider/index.js +2 -0
  31. package/lib-module/Table/Table.js +14 -5
  32. package/lib-module/Toast/Toast.js +1 -1
  33. package/lib-module/index.js +2 -0
  34. package/package.json +3 -3
  35. package/src/Breadcrumbs/Breadcrumbs.jsx +19 -22
  36. package/src/Breadcrumbs/Item/Item.jsx +16 -42
  37. package/src/DatePicker/CalendarContainer.jsx +61 -71
  38. package/src/DatePicker/DatePicker.jsx +47 -19
  39. package/src/Footnote/Footnote.jsx +42 -11
  40. package/src/List/List.jsx +3 -0
  41. package/src/List/ListItem.jsx +21 -0
  42. package/src/List/index.js +6 -0
  43. package/src/PriceLockup/PriceLockup.jsx +13 -7
  44. package/src/SkeletonProvider/SkeletonImage.jsx +33 -0
  45. package/src/SkeletonProvider/SkeletonProvider.jsx +62 -0
  46. package/src/SkeletonProvider/SkeletonTypography.jsx +31 -0
  47. package/src/SkeletonProvider/index.js +3 -0
  48. package/src/Table/Table.jsx +7 -4
  49. package/src/Toast/Toast.jsx +1 -0
  50. package/src/index.js +2 -0
@@ -1,5 +1,7 @@
1
1
  import styled from 'styled-components';
2
- import defaultReactDatesCss from './reactDatesCss';
2
+ import defaultReactDatesCss from './reactDatesCss'; // calendarDayDefaultHeight and calendarDayDefaultWidth
3
+ // refer to circle size when selected, focused, or hovered and is passed with getResponsiveCircleSize in DatePicker
4
+
3
5
  const CalendarContainer = /*#__PURE__*/styled.div.withConfig({
4
6
  displayName: "CalendarContainer",
5
7
  componentId: "components-web__sc-qdc1tg-0"
@@ -9,7 +11,9 @@ const CalendarContainer = /*#__PURE__*/styled.div.withConfig({
9
11
  validation,
10
12
  remainingTokens,
11
13
  calendarMonthFontTokens,
12
- dayPickerNavigationButtonTokens,
14
+ calendarDayDefaultHeight,
15
+ calendarDayDefaultWidth,
16
+ calendarWeekFontTokens,
13
17
  defaultFontTokens
14
18
  } = _ref;
15
19
  return `
@@ -22,24 +26,25 @@ const CalendarContainer = /*#__PURE__*/styled.div.withConfig({
22
26
  display: block;
23
27
  }
24
28
  .SingleDatePicker_picker {
29
+ background-color: ${remainingTokens.calendarBackgroundColor};
25
30
  box-shadow: none;
26
31
  border: 1px solid ${remainingTokens.singleDatePickerBorderColor};
27
- border-radius: ${remainingTokens.singleDatePickerRadius};
32
+ border-radius: ${remainingTokens.singleDatePickerRadius}px;
28
33
  padding: ${remainingTokens.singleDatePickerPaddingTopBottom}px ${remainingTokens.singleDatePickerLeftRight}px;
29
34
  z-index: 3;
30
35
  }
31
36
  .DateInput {
32
37
  width: 100%;
33
38
  border: 2px solid ${remainingTokens.dateInputBorderColor};
34
- border-radius: ${remainingTokens.dateInputBorderRadius};
35
39
  ${validation === 'error' && `input { border-color: ${remainingTokens.invalidInputMixin}; }`};
36
40
  ${validation === 'success' && `input { border-color: ${remainingTokens.validInputMixin}; }`};
37
41
  }
38
42
  .DateInput:hover {
43
+ border-radius: ${remainingTokens.dateInputBorderRadius}px;
39
44
  border: 2px solid ${remainingTokens.dateInputHoverBorderColor};
40
45
  }
41
- .DateInput:focus {
42
- border: 2px solid ${remainingTokens.dateInputFocusBorderColor};
46
+ .DateInput_input:focus {
47
+ border: 3px solid ${remainingTokens.dateInputFocusBorderColor};
43
48
  }
44
49
  .SingleDatePickerInput__withBorder {
45
50
  border: 0 !important;
@@ -60,94 +65,63 @@ const CalendarContainer = /*#__PURE__*/styled.div.withConfig({
60
65
  z-index: 4;
61
66
  left: ${(daySize * 8.5 - 20) / 2}px;
62
67
  }
68
+ .DateInput_fangShape {
69
+ fill: ${remainingTokens.calendarBackgroundColor}
70
+ }
63
71
  .DateInput_fangStroke {
64
72
  stroke: ${remainingTokens.dateInputStrokeColor};
65
73
  }
66
74
  .CalendarMonth_caption {
67
75
  color: ${remainingTokens.calendarMonthCaptionColor};
68
76
  font-family: ${calendarMonthFontTokens.fontFamily};
69
- font-size: ${remainingTokens.calendarMonthCaptionFontSize};
77
+ font-size: ${remainingTokens.calendarMonthCaptionFontSize}px;
70
78
  font-weight: ${calendarMonthFontTokens.fontWeight};
71
79
  line-height: ${remainingTokens.calendarMonthCaptionLineHeight};
72
80
  padding-bottom: ${remainingTokens.calendarMonthCaptionPaddingBottom}px;
73
81
  }
82
+ .DayPicker{
83
+ background-color: ${remainingTokens.calendarBackgroundColor};
84
+ }
74
85
  .DayPicker__withBorder {
75
86
  box-shadow: none;
76
87
  }
77
- .DayPickerNavigation_button {
78
- align-items: center;
88
+ .DayPickerNavigation {
79
89
  display: flex;
80
- justify-content: center;
81
- border: 1px solid ${remainingTokens.dayPickerNavigationButtonBorderColor};
82
- background-color: ${remainingTokens.dayPickerNavigationButtonBackgroundColor};
83
- border-radius: 50%;
84
- box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
85
- max-height: ${remainingTokens.dayPickerNavigationButtonMaxHeight}px;
86
- max-width: ${remainingTokens.dayPickerNavigationButtonMaxWidth}px;
87
- position: absolute;
88
- top: 18px;
89
- line-height: 0.78;
90
- padding: ${remainingTokens.dayPickerNavigationButtonPadding}px;
91
- cursor: pointer;
92
- user-select: none;
93
- &:nth-child(1) {
94
- left: ${remainingTokens.dayPickerNavigationButtonChildLeft}px;
95
- }
96
- &:nth-child(2) {
97
- right: ${remainingTokens.dayPickerNavigationButtonChildRight}px;
98
- i {
99
- font-family: 'TELUS Core Icons';
100
- display: inline-block;
101
- font-weight: normal;
102
- font-style: normal;
103
- speak: none;
104
- text-decoration: inherit;
105
- text-transform: none;
106
- text-rendering: auto;
107
- -webkit-font-smoothing: antialiased;
108
- -moz-osx-font-smoothing: grayscale;
109
- line-height: 1;
110
- vertical-align: middle;
111
- &:before {
112
- content: '\\F107';
113
- display: inline-block;
114
- }
115
- }
116
- }
117
- & svg {
118
- fill: ${remainingTokens.dayPickerNavigationButtonChildSvgFill};
119
- }
90
+ justify-content: space-between;
91
+ align-self: center;
92
+ top: 23px;
93
+ padding: 0px ${remainingTokens.dayPickerNavigationButtonPadding}px;
120
94
  }
121
95
  .DayPickerNavigation_button__default:focus,
122
- .DayPickerNavigation_button__default:hover {
123
- border: 1px solid ${remainingTokens.dayPickerNavigationButtonDefaultHoverBorderColor};
124
- }
125
- .DayPickerNavigation_svg__horizontal {
126
- fill: ${remainingTokens.dayPickerNavigationSVGHorizontalFill};
127
- }
96
+ .DayPickerNavigation_button:hover,
97
+ .DayPickerNavigation_svg__horizontal,
128
98
  .DayPicker_weekHeader {
129
99
  color: ${remainingTokens.dayPickerWeekHeaderColor};
130
- font-family: ${dayPickerNavigationButtonTokens.fontFamily};
131
- font-weight: ${dayPickerNavigationButtonTokens.fontWeight};
100
+ font-family: ${calendarWeekFontTokens.fontFamily};
132
101
  font-feature-settings: 'ss01' on, 'ss03' on, 'ss08' on;
133
102
  line-height: ${remainingTokens.dayPickerWeekHeaderLineHeight};
134
- & small {
135
- font-size: ${remainingTokens.dayPickerWeekHeaderSmall};
136
- }
137
103
  & li {
104
+ font-size: ${remainingTokens.dayPickerWeekHeaderSmall}px;
138
105
  max-width: ${daySize}px !important;
139
106
  }
140
107
  }
108
+ .CalendarMonthGrid {
109
+ background-color: ${remainingTokens.calendarBackgroundColor};
110
+ }
111
+ .CalendarMonth {
112
+ background-color: ${remainingTokens.calendarBackgroundColor};
113
+ }
141
114
  .CalendarDay__default {
142
115
  padding: 0px;
143
116
  position: relative;
117
+ background: ${remainingTokens.calendarDayDefaultBackgroundColor};
144
118
  background-clip: padding-box;
145
- border: ${remainingTokens.calendarDayDefaultBorder} solid ${remainingTokens.calendarDayDefaultBorderColor};
119
+ border: ${remainingTokens.calendarDayDefaultBorder}px solid ${remainingTokens.calendarDayDefaultBorderColor};
146
120
  vertical-align: middle;
147
121
  font-family: ${defaultFontTokens.fontFamily};
148
122
  font-weight: ${defaultFontTokens.fontWeight}
149
123
  font-feature-settings: 'ss01' on, 'ss03' on, 'ss08' on;
150
- font-size: ${remainingTokens.calendarDayDefaultFontSize};
124
+ font-size: ${remainingTokens.calendarDayDefaultFontSize}px;
151
125
  line-height: ${daySize - 3}px !important;
152
126
  color: ${remainingTokens.calendarDayDefaultColor};
153
127
  text-decoration: none;
@@ -158,36 +132,51 @@ const CalendarContainer = /*#__PURE__*/styled.div.withConfig({
158
132
  top: 50%;
159
133
  left: 50%;
160
134
  transform: translate(-50%, -50%);
161
- height: ${remainingTokens.calendarDayDefaultBeforeHeight}px;
162
- width: ${remainingTokens.calendarDayDefaultBeforeWidth}px;
135
+ height: ${calendarDayDefaultHeight}px;
136
+ width: ${calendarDayDefaultWidth}px;
163
137
  border-radius: 50%;
164
138
  background: transparent;
165
139
  transition: all 0.3s;
166
140
  z-index: -1;
167
141
  }
168
142
  }
169
- .CalendarDay__default:hover,
170
- .CalendarDay__selected,
171
- .CalendarDay__selected:active,
172
- .CalendarDay__selected:hover {
173
- background: none;
143
+ .CalendarDay__default:hover {
144
+ background: ${remainingTokens.calendarDaySelectedHoverBackground};
174
145
  border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
175
146
  color: ${remainingTokens.calendarDaySelectedHoverColor};
176
147
  text-decoration: none;
177
148
  z-index: 0;
178
149
  &:before {
150
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBeforeBorderColor};
179
151
  background: ${remainingTokens.calendarDaySelectedHoverBeforeBackground};
180
152
  }
181
153
  }
154
+ .CalendarDay__default:focus{
155
+ background: ${remainingTokens.calendarDaySelectedHoverBackground};
156
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
157
+ color: ${remainingTokens.calendarDaySelectedHoverColor};
158
+ text-decoration: none;
159
+ z-index: 0;
160
+ &:before {
161
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBeforeBorderColor};
162
+ background: ${remainingTokens.calendarDaySelectedFocusBeforeBackground};
163
+ }
164
+ }
165
+ .CalendarDay__selected,
166
+ .CalendarDay__selected:active,
167
+ .CalendarDay__selected:hover
182
168
  .CalendarDay__default.CalendarDay__selected,
183
169
  .CalendarDay__default.CalendarDay__selected:active
184
- .CalendarDay__default.CalendarDay__selected:hover {
170
+ .CalendarDay__default.CalendarDay__selected:hover{
171
+ background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBackground};
172
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
185
173
  color: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverColor};
186
174
  text-decoration: none;
175
+ z-index: 0;
187
176
  &:before {
188
- background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBackground};
189
- }
177
+ background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBeforeBackground};
190
178
  }
179
+ }
191
180
  .CalendarDay__blocked_out_of_range,
192
181
  .CalendarDay__blocked_out_of_range:active,
193
182
  .CalendarDay__blocked_out_of_range:hover,
@@ -5,7 +5,7 @@ import momentPropTypes from 'react-moment-proptypes';
5
5
  import 'react-dates/initialize';
6
6
  import SingleDatePicker from 'react-dates/lib/components/SingleDatePicker';
7
7
  import DayPickerSingleDateController from 'react-dates/lib/components/DayPickerSingleDateController';
8
- import { Icon, InputSupports, selectSystemProps, useCopy, useViewport, useThemeTokens, applyTextStyles } from '@telus-uds/components-base';
8
+ import { IconButton, InputSupports, selectSystemProps, useCopy, useViewport, useThemeTokens, applyTextStyles } from '@telus-uds/components-base';
9
9
  import CalendarContainer from './CalendarContainer';
10
10
  import dictionary from './dictionary';
11
11
  import { htmlAttrs } from '../utils';
@@ -28,12 +28,19 @@ const getResponsiveDaySize = function () {
28
28
  return responsiveDaySize;
29
29
  };
30
30
 
31
- const getIcon = icon => /*#__PURE__*/_jsx(Icon, {
32
- icon: icon,
33
- variant: {
34
- size: 'small'
31
+ const getResponsiveCircleSize = function () {
32
+ let inline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
33
+ let viewport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'md';
34
+ let responsiveCircleSize;
35
+
36
+ if (viewport === 'xs') {
37
+ responsiveCircleSize = 26;
38
+ } else {
39
+ responsiveCircleSize = inline ? 44 : 26;
35
40
  }
36
- });
41
+
42
+ return responsiveCircleSize;
43
+ };
37
44
 
38
45
  const MonthCenterContainer = /*#__PURE__*/styled.div.withConfig({
39
46
  displayName: "DatePicker__MonthCenterContainer",
@@ -105,6 +112,7 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
105
112
 
106
113
  const viewport = useViewport();
107
114
  const daySize = getResponsiveDaySize(inline, viewport);
115
+ const circleSize = getResponsiveCircleSize(inline, viewport);
108
116
  const value = date ?? inputDate;
109
117
  const HiddenInputFieldContainer = /*#__PURE__*/styled.div.withConfig({
110
118
  displayName: "DatePicker__HiddenInputFieldContainer",
@@ -116,7 +124,9 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
116
124
  previousIcon,
117
125
  nextIcon,
118
126
  ...remainingTokens
119
- } = useThemeTokens('DatePicker', tokens, variant, {
127
+ } = useThemeTokens('DatePicker', tokens, { ...variant,
128
+ inline
129
+ }, {
120
130
  viewport
121
131
  });
122
132
  const defaultFontTokens = applyTextStyles({
@@ -127,16 +137,50 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
127
137
  fontName: remainingTokens.calendarMonthCaptionFontName,
128
138
  fontWeight: remainingTokens.calendarMonthCaptionFontWeight
129
139
  });
130
- const dayPickerNavigationButtonTokens = applyTextStyles({
140
+ const calendarWeekFontTokens = applyTextStyles({
131
141
  fontName: remainingTokens.dayPickerWeekHeaderFontName,
132
142
  fontWeight: remainingTokens.dayPickerWeekHeaderFontWeight
133
143
  });
144
+
145
+ const renderPrevButton = _ref3 => {
146
+ let {
147
+ onClick
148
+ } = _ref3;
149
+ return /*#__PURE__*/_jsx(IconButton, {
150
+ onPress: () => {
151
+ onClick();
152
+ },
153
+ icon: previousIcon,
154
+ variant: {
155
+ size: 'small'
156
+ }
157
+ });
158
+ };
159
+
160
+ const renderNextButton = _ref4 => {
161
+ let {
162
+ onClick
163
+ } = _ref4;
164
+ return /*#__PURE__*/_jsx(IconButton, {
165
+ onPress: () => {
166
+ onClick();
167
+ },
168
+ icon: nextIcon,
169
+ variant: {
170
+ size: 'small'
171
+ }
172
+ });
173
+ };
174
+
134
175
  return /*#__PURE__*/_jsx(CalendarContainer, { ...selectProps(rest),
135
176
  daySize: daySize,
136
177
  validation: validation,
137
- remainingTokens: remainingTokens,
178
+ remainingTokens: { ...remainingTokens
179
+ },
180
+ calendarDayDefaultHeight: circleSize,
181
+ calendarDayDefaultWidth: circleSize,
138
182
  calendarMonthFontTokens: calendarMonthFontTokens,
139
- dayPickerNavigationButtonTokens: dayPickerNavigationButtonTokens,
183
+ calendarWeekFontTokens: calendarWeekFontTokens,
140
184
  defaultFontTokens: defaultFontTokens,
141
185
  children: /*#__PURE__*/_jsx(InputSupports, {
142
186
  copy: copy,
@@ -167,14 +211,14 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
167
211
  hideKeyboardShortcutsPanel: true,
168
212
  keepOpenOnDateSelect: false,
169
213
  daySize: daySize,
170
- navPrev: getIcon(previousIcon),
171
- navNext: getIcon(nextIcon),
214
+ renderNavPrevButton: renderPrevButton,
215
+ renderNavNextButton: renderNextButton,
172
216
  isOutsideRange: isDayDisabled,
173
217
  phrases: getCopy(),
174
- renderMonthElement: _ref3 => {
218
+ renderMonthElement: _ref5 => {
175
219
  let {
176
220
  month
177
- } = _ref3;
221
+ } = _ref5;
178
222
  return /*#__PURE__*/_jsx(MonthCenterContainer, {
179
223
  children: /*#__PURE__*/_jsxs("div", {
180
224
  children: [dictionary[copy] ? dictionary[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
@@ -186,26 +230,26 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
186
230
  })
187
231
  })]
188
232
  }) : /*#__PURE__*/_jsx(SingleDatePicker, {
189
- ref: ref,
190
- id: id,
191
233
  date: value,
192
234
  onDateChange: onChange,
193
235
  focused: isFocused,
194
236
  onFocusChange: onFocusChange,
195
237
  numberOfMonths: 1,
196
238
  hideKeyboardShortcutsPanel: true,
197
- displayFormat: "DD / MM / YYYY",
198
- placeholder: "DD / MM / YYYY",
199
- keepOpenOnDateSelect: false,
239
+ keepOpenOnDateSelect: true,
200
240
  daySize: daySize,
201
- navPrev: getIcon(previousIcon),
202
- navNext: getIcon(nextIcon),
241
+ ref: ref,
242
+ renderNavPrevButton: renderPrevButton,
203
243
  isOutsideRange: isDayDisabled,
204
244
  phrases: getCopy(),
205
- renderMonthElement: _ref4 => {
245
+ id: id,
246
+ displayFormat: "DD / MM / YYYY",
247
+ placeholder: "DD / MM / YYYY",
248
+ renderNavNextButton: renderNextButton,
249
+ renderMonthElement: _ref6 => {
206
250
  let {
207
251
  month
208
- } = _ref4;
252
+ } = _ref6;
209
253
  return /*#__PURE__*/_jsx(MonthCenterContainer, {
210
254
  children: /*#__PURE__*/_jsxs("div", {
211
255
  children: [dictionary[copy] ? dictionary[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
@@ -31,7 +31,6 @@ const StyledFootnote = /*#__PURE__*/styled.div.withConfig({
31
31
  width: '100vw',
32
32
  backgroundColor: footnoteBackground,
33
33
  display: 'block',
34
- boxShadow: '0 0 16px 0 rgba(0, 0, 0, 0.1)',
35
34
  transform: 'translateY(100%)',
36
35
  transition: 'transform 500ms ease-out',
37
36
  '@media() (prefers-reduced-motion: reduce)': {
@@ -72,14 +71,20 @@ const StyledHeader = /*#__PURE__*/styled.div.withConfig({
72
71
  componentId: "components-web__sc-1563bo5-2"
73
72
  })(_ref3 => {
74
73
  let {
75
- headerMargin
74
+ footnoteHeaderPaddingLeft,
75
+ footnoteHeaderPaddingRight,
76
+ footnoteHeaderPaddingTop,
77
+ footnoteHeaderPaddingBottom
76
78
  } = _ref3;
77
79
  return {
78
80
  alignItems: 'center',
79
81
  display: 'flex',
80
82
  flexDirection: 'row',
81
83
  justifyContent: 'space-between',
82
- margin: headerMargin
84
+ paddingTop: footnoteHeaderPaddingTop,
85
+ paddingBottom: footnoteHeaderPaddingBottom,
86
+ paddingRight: footnoteHeaderPaddingRight,
87
+ paddingLeft: footnoteHeaderPaddingLeft
83
88
  };
84
89
  });
85
90
  const StyledFootnoteBody = /*#__PURE__*/styled.div.withConfig({
@@ -176,6 +181,7 @@ const CloseButton = /*#__PURE__*/styled.button.withConfig({
176
181
  cursor: 'pointer',
177
182
  display: 'flex',
178
183
  justifyContent: 'center',
184
+ backgroundColor: 'white',
179
185
  border: closeButtonBorder,
180
186
  height: closeButtonHeight,
181
187
  margin: closeButtonMargin,
@@ -267,6 +273,14 @@ const Footnote = props => {
267
273
  footnoteBodyPaddingRight,
268
274
  footnoteBodyPaddingTop,
269
275
  footnoteBodyPaddingBottom,
276
+ footnoteHeaderPaddingLeft,
277
+ footnoteHeaderPaddingRight,
278
+ footnoteHeaderPaddingTop,
279
+ footnoteHeaderPaddingBottom,
280
+ headerLineHeight,
281
+ headerFontSize,
282
+ headerFontName,
283
+ headerFontWeight,
270
284
  listPaddingLeft,
271
285
  listItemMarkerFontSize,
272
286
  listItemMarkerLineHeight,
@@ -478,13 +492,16 @@ const Footnote = props => {
478
492
  ref: headerRef,
479
493
  children: /*#__PURE__*/_jsxs(StyledHeader, {
480
494
  ref: headingRef,
495
+ footnoteHeaderPaddingLeft: footnoteHeaderPaddingLeft,
496
+ footnoteHeaderPaddingRight: footnoteHeaderPaddingRight,
497
+ footnoteHeaderPaddingTop: footnoteHeaderPaddingTop,
498
+ footnoteHeaderPaddingBottom: footnoteHeaderPaddingBottom,
481
499
  headerMargin: headerMargin,
482
- children: [/*#__PURE__*/_jsx(Typography, {
483
- block: true,
484
- heading: true,
485
- tabIndex: -1,
486
- variant: {
487
- size: 'h4'
500
+ children: [/*#__PURE__*/_jsx("h2", {
501
+ style: {
502
+ fontSize: `${headerFontSize}px`,
503
+ lineHeight: `${headerLineHeight}px`,
504
+ fontFamily: `${headerFontName}${headerFontWeight}normal`
488
505
  },
489
506
  children: getCopy('heading')
490
507
  }), /*#__PURE__*/_jsx(CloseButton, {
@@ -0,0 +1,2 @@
1
+ import { ListBase as List } from '@telus-uds/components-base';
2
+ export default List;
@@ -0,0 +1,31 @@
1
+ import React, { forwardRef } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { ListItem as ListItemBase, Typography } from '@telus-uds/components-base';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ const ListItem = /*#__PURE__*/forwardRef((_ref, ref) => {
7
+ let {
8
+ children,
9
+ title,
10
+ ...rest
11
+ } = _ref;
12
+ return /*#__PURE__*/_jsxs(ListItemBase, {
13
+ ref: ref,
14
+ ...rest,
15
+ children: [Boolean(title) && /*#__PURE__*/_jsx(Typography, {
16
+ variant: {
17
+ size: 'h4'
18
+ },
19
+ children: title
20
+ }), children]
21
+ });
22
+ });
23
+ ListItem.displayName = 'ListItem';
24
+ ListItem.propTypes = {
25
+ children: PropTypes.node.isRequired,
26
+ title: PropTypes.string
27
+ };
28
+ ListItem.defaultProps = {
29
+ title: undefined
30
+ };
31
+ export default ListItem;
@@ -0,0 +1,4 @@
1
+ import List from './List';
2
+ import ListItem from './ListItem';
3
+ List.Item = ListItem;
4
+ export default List;
@@ -70,24 +70,29 @@ const RateTextContainer = /*#__PURE__*/styled.div.withConfig({
70
70
  const StrikeThroughContainer = /*#__PURE__*/styled.div.withConfig({
71
71
  displayName: "PriceLockup__StrikeThroughContainer",
72
72
  componentId: "components-web__sc-1x6duay-7"
73
- })(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;height:", ";background:", ";position:absolute;}"], _ref7 => {
73
+ })(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"], _ref7 => {
74
74
  let {
75
- strikeThroughHeight
75
+ strikeThroughPosition
76
76
  } = _ref7;
77
- return strikeThroughHeight;
77
+ return `${strikeThroughPosition}px`;
78
78
  }, _ref8 => {
79
79
  let {
80
- strikeThroughColor
80
+ strikeThroughHeight
81
81
  } = _ref8;
82
+ return `${strikeThroughHeight}px`;
83
+ }, _ref9 => {
84
+ let {
85
+ strikeThroughColor
86
+ } = _ref9;
82
87
  return strikeThroughColor;
83
88
  });
84
89
 
85
- const selectFootnoteLinkStyles = _ref9 => {
90
+ const selectFootnoteLinkStyles = _ref10 => {
86
91
  let {
87
92
  footnoteLinkColor,
88
93
  footnoteLinkFontName,
89
94
  footnoteLinkFontWeight
90
- } = _ref9;
95
+ } = _ref10;
91
96
  return {
92
97
  color: footnoteLinkColor,
93
98
  fontName: footnoteLinkFontName,
@@ -95,7 +100,20 @@ const selectFootnoteLinkStyles = _ref9 => {
95
100
  };
96
101
  };
97
102
 
98
- const PriceLockup = _ref10 => {
103
+ const selectStrikeThroughTokens = _ref11 => {
104
+ let {
105
+ strikeThroughPosition,
106
+ strikeThroughHeight,
107
+ strikeThroughColor
108
+ } = _ref11;
109
+ return {
110
+ strikeThroughHeight,
111
+ strikeThroughPosition,
112
+ strikeThroughColor
113
+ };
114
+ };
115
+
116
+ const PriceLockup = _ref12 => {
99
117
  let {
100
118
  size = 'medium',
101
119
  signDirection = 'left',
@@ -111,7 +129,7 @@ const PriceLockup = _ref10 => {
111
129
  tokens: priceLockupTokens,
112
130
  variant = {},
113
131
  ...rest
114
- } = _ref10;
132
+ } = _ref12;
115
133
  const viewport = useViewport();
116
134
  const {
117
135
  footnoteMarginTop,
@@ -120,8 +138,6 @@ const PriceLockup = _ref10 => {
120
138
  priceMarginBottom,
121
139
  bottomLinksMarginLeft,
122
140
  topTextMarginBottom,
123
- strikeThroughHeight,
124
- strikeThroughColor,
125
141
  fontColor,
126
142
  dividerColor,
127
143
  footnoteLinkFontSize,
@@ -166,9 +182,7 @@ const PriceLockup = _ref10 => {
166
182
  return /*#__PURE__*/_jsxs(_Fragment, {
167
183
  children: [/*#__PURE__*/_jsx(A11yText, {
168
184
  text: a11yText
169
- }), /*#__PURE__*/_jsx(StrikeThroughContainer, {
170
- strikeThroughHeight: `${strikeThroughHeight}px`,
171
- strikeThroughColor: strikeThroughColor,
185
+ }), /*#__PURE__*/_jsx(StrikeThroughContainer, { ...selectStrikeThroughTokens(themeTokens),
172
186
  children: amountComponent
173
187
  })]
174
188
  });
@@ -0,0 +1,42 @@
1
+ var _Skeleton$propTypes, _Skeleton$propTypes2, _Skeleton$propTypes3;
2
+
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import { Skeleton } from '@telus-uds/components-base';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+
8
+ const SkeletonImage = _ref => {
9
+ let {
10
+ rounded,
11
+ imgHeight,
12
+ size,
13
+ sizeIndex,
14
+ // Size automatically from image height, unless any size prop is passed in
15
+ sizePixels = !(size || sizeIndex) ? imgHeight : undefined,
16
+ show,
17
+ children
18
+ } = _ref;
19
+
20
+ if (!show) {
21
+ return children;
22
+ }
23
+
24
+ const shape = rounded !== 'circle' ? 'box' : rounded;
25
+ return /*#__PURE__*/_jsx(Skeleton, {
26
+ size: size,
27
+ sizePixels: sizePixels,
28
+ sizeIndex: sizeIndex,
29
+ shape: shape
30
+ });
31
+ };
32
+
33
+ SkeletonImage.propTypes = {
34
+ imgHeight: PropTypes.number,
35
+ rounded: PropTypes.oneOf(['circle', 'corners']),
36
+ size: (_Skeleton$propTypes = Skeleton.propTypes) === null || _Skeleton$propTypes === void 0 ? void 0 : _Skeleton$propTypes.size,
37
+ sizeIndex: (_Skeleton$propTypes2 = Skeleton.propTypes) === null || _Skeleton$propTypes2 === void 0 ? void 0 : _Skeleton$propTypes2.sizeIndex,
38
+ sizePixels: (_Skeleton$propTypes3 = Skeleton.propTypes) === null || _Skeleton$propTypes3 === void 0 ? void 0 : _Skeleton$propTypes3.sizePixels,
39
+ show: PropTypes.bool.isRequired,
40
+ children: PropTypes.node
41
+ };
42
+ export default SkeletonImage;