@telus-uds/components-web 1.11.0 → 1.12.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.
- package/CHANGELOG.md +23 -2
- package/lib/DatePicker/CalendarContainer.js +60 -71
- package/lib/DatePicker/DatePicker.js +66 -22
- package/lib/List/List.js +11 -0
- package/lib/List/ListItem.js +48 -0
- package/lib/List/index.js +16 -0
- package/lib/PriceLockup/PriceLockup.js +27 -13
- package/lib/SkeletonProvider/SkeletonImage.js +55 -0
- package/lib/SkeletonProvider/SkeletonProvider.js +84 -0
- package/lib/SkeletonProvider/SkeletonTypography.js +54 -0
- package/lib/SkeletonProvider/index.js +13 -0
- package/lib/Table/Table.js +14 -5
- package/lib/Toast/Toast.js +1 -1
- package/lib/index.js +19 -1
- package/lib-module/DatePicker/CalendarContainer.js +61 -72
- package/lib-module/DatePicker/DatePicker.js +67 -23
- package/lib-module/List/List.js +2 -0
- package/lib-module/List/ListItem.js +31 -0
- package/lib-module/List/index.js +4 -0
- package/lib-module/PriceLockup/PriceLockup.js +27 -13
- package/lib-module/SkeletonProvider/SkeletonImage.js +42 -0
- package/lib-module/SkeletonProvider/SkeletonProvider.js +65 -0
- package/lib-module/SkeletonProvider/SkeletonTypography.js +41 -0
- package/lib-module/SkeletonProvider/index.js +2 -0
- package/lib-module/Table/Table.js +14 -5
- package/lib-module/Toast/Toast.js +1 -1
- package/lib-module/index.js +2 -0
- package/package.json +3 -3
- package/src/DatePicker/CalendarContainer.jsx +61 -71
- package/src/DatePicker/DatePicker.jsx +47 -19
- package/src/List/List.jsx +3 -0
- package/src/List/ListItem.jsx +21 -0
- package/src/List/index.js +6 -0
- package/src/PriceLockup/PriceLockup.jsx +13 -7
- package/src/SkeletonProvider/SkeletonImage.jsx +33 -0
- package/src/SkeletonProvider/SkeletonProvider.jsx +62 -0
- package/src/SkeletonProvider/SkeletonTypography.jsx +31 -0
- package/src/SkeletonProvider/index.js +3 -0
- package/src/Table/Table.jsx +7 -4
- package/src/Toast/Toast.jsx +1 -0
- package/src/index.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 17 May 2023 00:13:27 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.12.0
|
|
8
|
+
|
|
9
|
+
Wed, 17 May 2023 00:13:27 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Standardized Pagination (wlsdud194@hotmail.com)
|
|
14
|
+
- move 'List' to components-web (kyle.king2@telus.com)
|
|
15
|
+
- Standardize DatePicker for TELUS, Public Mobile, and Koodo (samuraix221@hotmail.com)
|
|
16
|
+
- add 'strikeThroughPosition' token (kyle.king2@telus.com)
|
|
17
|
+
- Add fullWidth prop to Table (wlsdud194@hotmail.com)
|
|
18
|
+
- make Skeleton provider multibrand (mauricio.batresmontejo@telus.com)
|
|
19
|
+
- Expand collapse standardization (akshay.pandey1@telus.com)
|
|
20
|
+
- Bump @telus-uds/components-base to v1.41.0
|
|
21
|
+
- Bump @telus-uds/system-theme-tokens to v2.26.0
|
|
22
|
+
|
|
23
|
+
### Patches
|
|
24
|
+
|
|
25
|
+
- Remove flexGrow from text styles (wlsdud194@hotmail.com)
|
|
26
|
+
- Fix an issue where `Toast` doesn't render as expected on smaller screens (shahzaibkhalidmalik@outlook.com)
|
|
27
|
+
|
|
7
28
|
## 1.11.0
|
|
8
29
|
|
|
9
|
-
Tue, 09 May 2023 00:
|
|
30
|
+
Tue, 09 May 2023 00:29:54 GMT
|
|
10
31
|
|
|
11
32
|
### Minor changes
|
|
12
33
|
|
|
@@ -11,6 +11,8 @@ var _reactDatesCss = _interopRequireDefault(require("./reactDatesCss"));
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
+
// calendarDayDefaultHeight and calendarDayDefaultWidth
|
|
15
|
+
// refer to circle size when selected, focused, or hovered and is passed with getResponsiveCircleSize in DatePicker
|
|
14
16
|
const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
15
17
|
displayName: "CalendarContainer",
|
|
16
18
|
componentId: "components-web__sc-qdc1tg-0"
|
|
@@ -20,7 +22,9 @@ const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig(
|
|
|
20
22
|
validation,
|
|
21
23
|
remainingTokens,
|
|
22
24
|
calendarMonthFontTokens,
|
|
23
|
-
|
|
25
|
+
calendarDayDefaultHeight,
|
|
26
|
+
calendarDayDefaultWidth,
|
|
27
|
+
calendarWeekFontTokens,
|
|
24
28
|
defaultFontTokens
|
|
25
29
|
} = _ref;
|
|
26
30
|
return `
|
|
@@ -33,24 +37,25 @@ const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig(
|
|
|
33
37
|
display: block;
|
|
34
38
|
}
|
|
35
39
|
.SingleDatePicker_picker {
|
|
40
|
+
background-color: ${remainingTokens.calendarBackgroundColor};
|
|
36
41
|
box-shadow: none;
|
|
37
42
|
border: 1px solid ${remainingTokens.singleDatePickerBorderColor};
|
|
38
|
-
border-radius: ${remainingTokens.singleDatePickerRadius};
|
|
43
|
+
border-radius: ${remainingTokens.singleDatePickerRadius}px;
|
|
39
44
|
padding: ${remainingTokens.singleDatePickerPaddingTopBottom}px ${remainingTokens.singleDatePickerLeftRight}px;
|
|
40
45
|
z-index: 3;
|
|
41
46
|
}
|
|
42
47
|
.DateInput {
|
|
43
48
|
width: 100%;
|
|
44
49
|
border: 2px solid ${remainingTokens.dateInputBorderColor};
|
|
45
|
-
border-radius: ${remainingTokens.dateInputBorderRadius};
|
|
46
50
|
${validation === 'error' && `input { border-color: ${remainingTokens.invalidInputMixin}; }`};
|
|
47
51
|
${validation === 'success' && `input { border-color: ${remainingTokens.validInputMixin}; }`};
|
|
48
52
|
}
|
|
49
53
|
.DateInput:hover {
|
|
54
|
+
border-radius: ${remainingTokens.dateInputBorderRadius}px;
|
|
50
55
|
border: 2px solid ${remainingTokens.dateInputHoverBorderColor};
|
|
51
56
|
}
|
|
52
|
-
.
|
|
53
|
-
border:
|
|
57
|
+
.DateInput_input:focus {
|
|
58
|
+
border: 3px solid ${remainingTokens.dateInputFocusBorderColor};
|
|
54
59
|
}
|
|
55
60
|
.SingleDatePickerInput__withBorder {
|
|
56
61
|
border: 0 !important;
|
|
@@ -71,94 +76,63 @@ const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig(
|
|
|
71
76
|
z-index: 4;
|
|
72
77
|
left: ${(daySize * 8.5 - 20) / 2}px;
|
|
73
78
|
}
|
|
79
|
+
.DateInput_fangShape {
|
|
80
|
+
fill: ${remainingTokens.calendarBackgroundColor}
|
|
81
|
+
}
|
|
74
82
|
.DateInput_fangStroke {
|
|
75
83
|
stroke: ${remainingTokens.dateInputStrokeColor};
|
|
76
84
|
}
|
|
77
85
|
.CalendarMonth_caption {
|
|
78
86
|
color: ${remainingTokens.calendarMonthCaptionColor};
|
|
79
87
|
font-family: ${calendarMonthFontTokens.fontFamily};
|
|
80
|
-
font-size: ${remainingTokens.calendarMonthCaptionFontSize};
|
|
88
|
+
font-size: ${remainingTokens.calendarMonthCaptionFontSize}px;
|
|
81
89
|
font-weight: ${calendarMonthFontTokens.fontWeight};
|
|
82
90
|
line-height: ${remainingTokens.calendarMonthCaptionLineHeight};
|
|
83
91
|
padding-bottom: ${remainingTokens.calendarMonthCaptionPaddingBottom}px;
|
|
84
92
|
}
|
|
93
|
+
.DayPicker{
|
|
94
|
+
background-color: ${remainingTokens.calendarBackgroundColor};
|
|
95
|
+
}
|
|
85
96
|
.DayPicker__withBorder {
|
|
86
97
|
box-shadow: none;
|
|
87
98
|
}
|
|
88
|
-
.
|
|
89
|
-
align-items: center;
|
|
99
|
+
.DayPickerNavigation {
|
|
90
100
|
display: flex;
|
|
91
|
-
justify-content:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
|
96
|
-
max-height: ${remainingTokens.dayPickerNavigationButtonMaxHeight}px;
|
|
97
|
-
max-width: ${remainingTokens.dayPickerNavigationButtonMaxWidth}px;
|
|
98
|
-
position: absolute;
|
|
99
|
-
top: 18px;
|
|
100
|
-
line-height: 0.78;
|
|
101
|
-
padding: ${remainingTokens.dayPickerNavigationButtonPadding}px;
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
user-select: none;
|
|
104
|
-
&:nth-child(1) {
|
|
105
|
-
left: ${remainingTokens.dayPickerNavigationButtonChildLeft}px;
|
|
106
|
-
}
|
|
107
|
-
&:nth-child(2) {
|
|
108
|
-
right: ${remainingTokens.dayPickerNavigationButtonChildRight}px;
|
|
109
|
-
i {
|
|
110
|
-
font-family: 'TELUS Core Icons';
|
|
111
|
-
display: inline-block;
|
|
112
|
-
font-weight: normal;
|
|
113
|
-
font-style: normal;
|
|
114
|
-
speak: none;
|
|
115
|
-
text-decoration: inherit;
|
|
116
|
-
text-transform: none;
|
|
117
|
-
text-rendering: auto;
|
|
118
|
-
-webkit-font-smoothing: antialiased;
|
|
119
|
-
-moz-osx-font-smoothing: grayscale;
|
|
120
|
-
line-height: 1;
|
|
121
|
-
vertical-align: middle;
|
|
122
|
-
&:before {
|
|
123
|
-
content: '\\F107';
|
|
124
|
-
display: inline-block;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
& svg {
|
|
129
|
-
fill: ${remainingTokens.dayPickerNavigationButtonChildSvgFill};
|
|
130
|
-
}
|
|
101
|
+
justify-content: space-between;
|
|
102
|
+
align-self: center;
|
|
103
|
+
top: 23px;
|
|
104
|
+
padding: 0px ${remainingTokens.dayPickerNavigationButtonPadding}px;
|
|
131
105
|
}
|
|
132
106
|
.DayPickerNavigation_button__default:focus,
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
.DayPickerNavigation_svg__horizontal {
|
|
137
|
-
fill: ${remainingTokens.dayPickerNavigationSVGHorizontalFill};
|
|
138
|
-
}
|
|
107
|
+
.DayPickerNavigation_button:hover,
|
|
108
|
+
.DayPickerNavigation_svg__horizontal,
|
|
139
109
|
.DayPicker_weekHeader {
|
|
140
110
|
color: ${remainingTokens.dayPickerWeekHeaderColor};
|
|
141
|
-
font-family: ${
|
|
142
|
-
font-weight: ${dayPickerNavigationButtonTokens.fontWeight};
|
|
111
|
+
font-family: ${calendarWeekFontTokens.fontFamily};
|
|
143
112
|
font-feature-settings: 'ss01' on, 'ss03' on, 'ss08' on;
|
|
144
113
|
line-height: ${remainingTokens.dayPickerWeekHeaderLineHeight};
|
|
145
|
-
& small {
|
|
146
|
-
font-size: ${remainingTokens.dayPickerWeekHeaderSmall};
|
|
147
|
-
}
|
|
148
114
|
& li {
|
|
115
|
+
font-size: ${remainingTokens.dayPickerWeekHeaderSmall}px;
|
|
149
116
|
max-width: ${daySize}px !important;
|
|
150
117
|
}
|
|
151
118
|
}
|
|
119
|
+
.CalendarMonthGrid {
|
|
120
|
+
background-color: ${remainingTokens.calendarBackgroundColor};
|
|
121
|
+
}
|
|
122
|
+
.CalendarMonth {
|
|
123
|
+
background-color: ${remainingTokens.calendarBackgroundColor};
|
|
124
|
+
}
|
|
152
125
|
.CalendarDay__default {
|
|
153
126
|
padding: 0px;
|
|
154
127
|
position: relative;
|
|
128
|
+
background: ${remainingTokens.calendarDayDefaultBackgroundColor};
|
|
155
129
|
background-clip: padding-box;
|
|
156
|
-
border: ${remainingTokens.calendarDayDefaultBorder} solid ${remainingTokens.calendarDayDefaultBorderColor};
|
|
130
|
+
border: ${remainingTokens.calendarDayDefaultBorder}px solid ${remainingTokens.calendarDayDefaultBorderColor};
|
|
157
131
|
vertical-align: middle;
|
|
158
132
|
font-family: ${defaultFontTokens.fontFamily};
|
|
159
133
|
font-weight: ${defaultFontTokens.fontWeight}
|
|
160
134
|
font-feature-settings: 'ss01' on, 'ss03' on, 'ss08' on;
|
|
161
|
-
font-size: ${remainingTokens.calendarDayDefaultFontSize};
|
|
135
|
+
font-size: ${remainingTokens.calendarDayDefaultFontSize}px;
|
|
162
136
|
line-height: ${daySize - 3}px !important;
|
|
163
137
|
color: ${remainingTokens.calendarDayDefaultColor};
|
|
164
138
|
text-decoration: none;
|
|
@@ -169,36 +143,51 @@ const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig(
|
|
|
169
143
|
top: 50%;
|
|
170
144
|
left: 50%;
|
|
171
145
|
transform: translate(-50%, -50%);
|
|
172
|
-
height: ${
|
|
173
|
-
width: ${
|
|
146
|
+
height: ${calendarDayDefaultHeight}px;
|
|
147
|
+
width: ${calendarDayDefaultWidth}px;
|
|
174
148
|
border-radius: 50%;
|
|
175
149
|
background: transparent;
|
|
176
150
|
transition: all 0.3s;
|
|
177
151
|
z-index: -1;
|
|
178
152
|
}
|
|
179
153
|
}
|
|
180
|
-
.CalendarDay__default:hover
|
|
181
|
-
|
|
182
|
-
.CalendarDay__selected:active,
|
|
183
|
-
.CalendarDay__selected:hover {
|
|
184
|
-
background: none;
|
|
154
|
+
.CalendarDay__default:hover {
|
|
155
|
+
background: ${remainingTokens.calendarDaySelectedHoverBackground};
|
|
185
156
|
border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
|
|
186
157
|
color: ${remainingTokens.calendarDaySelectedHoverColor};
|
|
187
158
|
text-decoration: none;
|
|
188
159
|
z-index: 0;
|
|
189
160
|
&:before {
|
|
161
|
+
border: 1px solid ${remainingTokens.calendarDaySelectedHoverBeforeBorderColor};
|
|
190
162
|
background: ${remainingTokens.calendarDaySelectedHoverBeforeBackground};
|
|
191
163
|
}
|
|
192
164
|
}
|
|
165
|
+
.CalendarDay__default:focus{
|
|
166
|
+
background: ${remainingTokens.calendarDaySelectedHoverBackground};
|
|
167
|
+
border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
|
|
168
|
+
color: ${remainingTokens.calendarDaySelectedHoverColor};
|
|
169
|
+
text-decoration: none;
|
|
170
|
+
z-index: 0;
|
|
171
|
+
&:before {
|
|
172
|
+
border: 1px solid ${remainingTokens.calendarDaySelectedHoverBeforeBorderColor};
|
|
173
|
+
background: ${remainingTokens.calendarDaySelectedFocusBeforeBackground};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
.CalendarDay__selected,
|
|
177
|
+
.CalendarDay__selected:active,
|
|
178
|
+
.CalendarDay__selected:hover
|
|
193
179
|
.CalendarDay__default.CalendarDay__selected,
|
|
194
180
|
.CalendarDay__default.CalendarDay__selected:active
|
|
195
|
-
.CalendarDay__default.CalendarDay__selected:hover
|
|
181
|
+
.CalendarDay__default.CalendarDay__selected:hover{
|
|
182
|
+
background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBackground};
|
|
183
|
+
border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
|
|
196
184
|
color: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverColor};
|
|
197
185
|
text-decoration: none;
|
|
186
|
+
z-index: 0;
|
|
198
187
|
&:before {
|
|
199
|
-
background: ${remainingTokens.
|
|
200
|
-
}
|
|
188
|
+
background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBeforeBackground};
|
|
201
189
|
}
|
|
190
|
+
}
|
|
202
191
|
.CalendarDay__blocked_out_of_range,
|
|
203
192
|
.CalendarDay__blocked_out_of_range:active,
|
|
204
193
|
.CalendarDay__blocked_out_of_range:hover,
|
|
@@ -51,12 +51,19 @@ const getResponsiveDaySize = function () {
|
|
|
51
51
|
return responsiveDaySize;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
const getResponsiveCircleSize = function () {
|
|
55
|
+
let inline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
56
|
+
let viewport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'md';
|
|
57
|
+
let responsiveCircleSize;
|
|
58
|
+
|
|
59
|
+
if (viewport === 'xs') {
|
|
60
|
+
responsiveCircleSize = 26;
|
|
61
|
+
} else {
|
|
62
|
+
responsiveCircleSize = inline ? 44 : 26;
|
|
58
63
|
}
|
|
59
|
-
|
|
64
|
+
|
|
65
|
+
return responsiveCircleSize;
|
|
66
|
+
};
|
|
60
67
|
|
|
61
68
|
const MonthCenterContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
62
69
|
displayName: "DatePicker__MonthCenterContainer",
|
|
@@ -129,6 +136,7 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
129
136
|
|
|
130
137
|
const viewport = (0, _componentsBase.useViewport)();
|
|
131
138
|
const daySize = getResponsiveDaySize(inline, viewport);
|
|
139
|
+
const circleSize = getResponsiveCircleSize(inline, viewport);
|
|
132
140
|
const value = date ?? inputDate;
|
|
133
141
|
|
|
134
142
|
const HiddenInputFieldContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
@@ -142,7 +150,9 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
142
150
|
previousIcon,
|
|
143
151
|
nextIcon,
|
|
144
152
|
...remainingTokens
|
|
145
|
-
} = (0, _componentsBase.useThemeTokens)('DatePicker', tokens, variant,
|
|
153
|
+
} = (0, _componentsBase.useThemeTokens)('DatePicker', tokens, { ...variant,
|
|
154
|
+
inline
|
|
155
|
+
}, {
|
|
146
156
|
viewport
|
|
147
157
|
});
|
|
148
158
|
const defaultFontTokens = (0, _componentsBase.applyTextStyles)({
|
|
@@ -153,16 +163,50 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
153
163
|
fontName: remainingTokens.calendarMonthCaptionFontName,
|
|
154
164
|
fontWeight: remainingTokens.calendarMonthCaptionFontWeight
|
|
155
165
|
});
|
|
156
|
-
const
|
|
166
|
+
const calendarWeekFontTokens = (0, _componentsBase.applyTextStyles)({
|
|
157
167
|
fontName: remainingTokens.dayPickerWeekHeaderFontName,
|
|
158
168
|
fontWeight: remainingTokens.dayPickerWeekHeaderFontWeight
|
|
159
169
|
});
|
|
170
|
+
|
|
171
|
+
const renderPrevButton = _ref3 => {
|
|
172
|
+
let {
|
|
173
|
+
onClick
|
|
174
|
+
} = _ref3;
|
|
175
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.IconButton, {
|
|
176
|
+
onPress: () => {
|
|
177
|
+
onClick();
|
|
178
|
+
},
|
|
179
|
+
icon: previousIcon,
|
|
180
|
+
variant: {
|
|
181
|
+
size: 'small'
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
const renderNextButton = _ref4 => {
|
|
187
|
+
let {
|
|
188
|
+
onClick
|
|
189
|
+
} = _ref4;
|
|
190
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.IconButton, {
|
|
191
|
+
onPress: () => {
|
|
192
|
+
onClick();
|
|
193
|
+
},
|
|
194
|
+
icon: nextIcon,
|
|
195
|
+
variant: {
|
|
196
|
+
size: 'small'
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
|
|
160
201
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CalendarContainer.default, { ...selectProps(rest),
|
|
161
202
|
daySize: daySize,
|
|
162
203
|
validation: validation,
|
|
163
|
-
remainingTokens: remainingTokens
|
|
204
|
+
remainingTokens: { ...remainingTokens
|
|
205
|
+
},
|
|
206
|
+
calendarDayDefaultHeight: circleSize,
|
|
207
|
+
calendarDayDefaultWidth: circleSize,
|
|
164
208
|
calendarMonthFontTokens: calendarMonthFontTokens,
|
|
165
|
-
|
|
209
|
+
calendarWeekFontTokens: calendarWeekFontTokens,
|
|
166
210
|
defaultFontTokens: defaultFontTokens,
|
|
167
211
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.InputSupports, {
|
|
168
212
|
copy: copy,
|
|
@@ -193,14 +237,14 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
193
237
|
hideKeyboardShortcutsPanel: true,
|
|
194
238
|
keepOpenOnDateSelect: false,
|
|
195
239
|
daySize: daySize,
|
|
196
|
-
|
|
197
|
-
|
|
240
|
+
renderNavPrevButton: renderPrevButton,
|
|
241
|
+
renderNavNextButton: renderNextButton,
|
|
198
242
|
isOutsideRange: isDayDisabled,
|
|
199
243
|
phrases: getCopy(),
|
|
200
|
-
renderMonthElement:
|
|
244
|
+
renderMonthElement: _ref5 => {
|
|
201
245
|
let {
|
|
202
246
|
month
|
|
203
|
-
} =
|
|
247
|
+
} = _ref5;
|
|
204
248
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MonthCenterContainer, {
|
|
205
249
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
206
250
|
children: [_dictionary.default[copy] ? _dictionary.default[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
|
|
@@ -212,26 +256,26 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
212
256
|
})
|
|
213
257
|
})]
|
|
214
258
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_SingleDatePicker.default, {
|
|
215
|
-
ref: ref,
|
|
216
|
-
id: id,
|
|
217
259
|
date: value,
|
|
218
260
|
onDateChange: onChange,
|
|
219
261
|
focused: isFocused,
|
|
220
262
|
onFocusChange: onFocusChange,
|
|
221
263
|
numberOfMonths: 1,
|
|
222
264
|
hideKeyboardShortcutsPanel: true,
|
|
223
|
-
|
|
224
|
-
placeholder: "DD / MM / YYYY",
|
|
225
|
-
keepOpenOnDateSelect: false,
|
|
265
|
+
keepOpenOnDateSelect: true,
|
|
226
266
|
daySize: daySize,
|
|
227
|
-
|
|
228
|
-
|
|
267
|
+
ref: ref,
|
|
268
|
+
renderNavPrevButton: renderPrevButton,
|
|
229
269
|
isOutsideRange: isDayDisabled,
|
|
230
270
|
phrases: getCopy(),
|
|
231
|
-
|
|
271
|
+
id: id,
|
|
272
|
+
displayFormat: "DD / MM / YYYY",
|
|
273
|
+
placeholder: "DD / MM / YYYY",
|
|
274
|
+
renderNavNextButton: renderNextButton,
|
|
275
|
+
renderMonthElement: _ref6 => {
|
|
232
276
|
let {
|
|
233
277
|
month
|
|
234
|
-
} =
|
|
278
|
+
} = _ref6;
|
|
235
279
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MonthCenterContainer, {
|
|
236
280
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
237
281
|
children: [_dictionary.default[copy] ? _dictionary.default[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
|
package/lib/List/List.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _componentsBase = require("@telus-uds/components-base");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
const ListItem = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
23
|
+
let {
|
|
24
|
+
children,
|
|
25
|
+
title,
|
|
26
|
+
...rest
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.ListItem, {
|
|
29
|
+
ref: ref,
|
|
30
|
+
...rest,
|
|
31
|
+
children: [Boolean(title) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
32
|
+
variant: {
|
|
33
|
+
size: 'h4'
|
|
34
|
+
},
|
|
35
|
+
children: title
|
|
36
|
+
}), children]
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
ListItem.displayName = 'ListItem';
|
|
40
|
+
ListItem.propTypes = {
|
|
41
|
+
children: _propTypes.default.node.isRequired,
|
|
42
|
+
title: _propTypes.default.string
|
|
43
|
+
};
|
|
44
|
+
ListItem.defaultProps = {
|
|
45
|
+
title: undefined
|
|
46
|
+
};
|
|
47
|
+
var _default = ListItem;
|
|
48
|
+
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _List = _interopRequireDefault(require("./List"));
|
|
9
|
+
|
|
10
|
+
var _ListItem = _interopRequireDefault(require("./ListItem"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
_List.default.Item = _ListItem.default;
|
|
15
|
+
var _default = _List.default;
|
|
16
|
+
exports.default = _default;
|
|
@@ -93,24 +93,29 @@ const RateTextContainer = /*#__PURE__*/_styledComponents.default.div.withConfig(
|
|
|
93
93
|
const StrikeThroughContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
94
94
|
displayName: "PriceLockup__StrikeThroughContainer",
|
|
95
95
|
componentId: "components-web__sc-1x6duay-7"
|
|
96
|
-
})(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;height:", ";background:", ";position:absolute;}"], _ref7 => {
|
|
96
|
+
})(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"], _ref7 => {
|
|
97
97
|
let {
|
|
98
|
-
|
|
98
|
+
strikeThroughPosition
|
|
99
99
|
} = _ref7;
|
|
100
|
-
return
|
|
100
|
+
return `${strikeThroughPosition}px`;
|
|
101
101
|
}, _ref8 => {
|
|
102
102
|
let {
|
|
103
|
-
|
|
103
|
+
strikeThroughHeight
|
|
104
104
|
} = _ref8;
|
|
105
|
+
return `${strikeThroughHeight}px`;
|
|
106
|
+
}, _ref9 => {
|
|
107
|
+
let {
|
|
108
|
+
strikeThroughColor
|
|
109
|
+
} = _ref9;
|
|
105
110
|
return strikeThroughColor;
|
|
106
111
|
});
|
|
107
112
|
|
|
108
|
-
const selectFootnoteLinkStyles =
|
|
113
|
+
const selectFootnoteLinkStyles = _ref10 => {
|
|
109
114
|
let {
|
|
110
115
|
footnoteLinkColor,
|
|
111
116
|
footnoteLinkFontName,
|
|
112
117
|
footnoteLinkFontWeight
|
|
113
|
-
} =
|
|
118
|
+
} = _ref10;
|
|
114
119
|
return {
|
|
115
120
|
color: footnoteLinkColor,
|
|
116
121
|
fontName: footnoteLinkFontName,
|
|
@@ -118,7 +123,20 @@ const selectFootnoteLinkStyles = _ref9 => {
|
|
|
118
123
|
};
|
|
119
124
|
};
|
|
120
125
|
|
|
121
|
-
const
|
|
126
|
+
const selectStrikeThroughTokens = _ref11 => {
|
|
127
|
+
let {
|
|
128
|
+
strikeThroughPosition,
|
|
129
|
+
strikeThroughHeight,
|
|
130
|
+
strikeThroughColor
|
|
131
|
+
} = _ref11;
|
|
132
|
+
return {
|
|
133
|
+
strikeThroughHeight,
|
|
134
|
+
strikeThroughPosition,
|
|
135
|
+
strikeThroughColor
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const PriceLockup = _ref12 => {
|
|
122
140
|
let {
|
|
123
141
|
size = 'medium',
|
|
124
142
|
signDirection = 'left',
|
|
@@ -134,7 +152,7 @@ const PriceLockup = _ref10 => {
|
|
|
134
152
|
tokens: priceLockupTokens,
|
|
135
153
|
variant = {},
|
|
136
154
|
...rest
|
|
137
|
-
} =
|
|
155
|
+
} = _ref12;
|
|
138
156
|
const viewport = (0, _componentsBase.useViewport)();
|
|
139
157
|
const {
|
|
140
158
|
footnoteMarginTop,
|
|
@@ -143,8 +161,6 @@ const PriceLockup = _ref10 => {
|
|
|
143
161
|
priceMarginBottom,
|
|
144
162
|
bottomLinksMarginLeft,
|
|
145
163
|
topTextMarginBottom,
|
|
146
|
-
strikeThroughHeight,
|
|
147
|
-
strikeThroughColor,
|
|
148
164
|
fontColor,
|
|
149
165
|
dividerColor,
|
|
150
166
|
footnoteLinkFontSize,
|
|
@@ -189,9 +205,7 @@ const PriceLockup = _ref10 => {
|
|
|
189
205
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
190
206
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.A11yText, {
|
|
191
207
|
text: a11yText
|
|
192
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(StrikeThroughContainer, {
|
|
193
|
-
strikeThroughHeight: `${strikeThroughHeight}px`,
|
|
194
|
-
strikeThroughColor: strikeThroughColor,
|
|
208
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(StrikeThroughContainer, { ...selectStrikeThroughTokens(themeTokens),
|
|
195
209
|
children: amountComponent
|
|
196
210
|
})]
|
|
197
211
|
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _componentsBase = require("@telus-uds/components-base");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
var _Skeleton$propTypes, _Skeleton$propTypes2, _Skeleton$propTypes3;
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
const SkeletonImage = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
rounded,
|
|
23
|
+
imgHeight,
|
|
24
|
+
size,
|
|
25
|
+
sizeIndex,
|
|
26
|
+
// Size automatically from image height, unless any size prop is passed in
|
|
27
|
+
sizePixels = !(size || sizeIndex) ? imgHeight : undefined,
|
|
28
|
+
show,
|
|
29
|
+
children
|
|
30
|
+
} = _ref;
|
|
31
|
+
|
|
32
|
+
if (!show) {
|
|
33
|
+
return children;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const shape = rounded !== 'circle' ? 'box' : rounded;
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Skeleton, {
|
|
38
|
+
size: size,
|
|
39
|
+
sizePixels: sizePixels,
|
|
40
|
+
sizeIndex: sizeIndex,
|
|
41
|
+
shape: shape
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
SkeletonImage.propTypes = {
|
|
46
|
+
imgHeight: _propTypes.default.number,
|
|
47
|
+
rounded: _propTypes.default.oneOf(['circle', 'corners']),
|
|
48
|
+
size: (_Skeleton$propTypes = _componentsBase.Skeleton.propTypes) === null || _Skeleton$propTypes === void 0 ? void 0 : _Skeleton$propTypes.size,
|
|
49
|
+
sizeIndex: (_Skeleton$propTypes2 = _componentsBase.Skeleton.propTypes) === null || _Skeleton$propTypes2 === void 0 ? void 0 : _Skeleton$propTypes2.sizeIndex,
|
|
50
|
+
sizePixels: (_Skeleton$propTypes3 = _componentsBase.Skeleton.propTypes) === null || _Skeleton$propTypes3 === void 0 ? void 0 : _Skeleton$propTypes3.sizePixels,
|
|
51
|
+
show: _propTypes.default.bool.isRequired,
|
|
52
|
+
children: _propTypes.default.node
|
|
53
|
+
};
|
|
54
|
+
var _default = SkeletonImage;
|
|
55
|
+
exports.default = _default;
|