@telus-uds/components-web 2.12.0 → 2.13.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 +22 -2
- package/component-docs.json +59 -24
- package/lib/Autocomplete/Loading.js +5 -10
- package/lib/Autocomplete/dictionary.js +2 -2
- package/lib/DatePicker/DatePicker.js +6 -0
- package/lib/NavigationBar/NavigationSubMenu.js +4 -8
- package/lib/Spinner/Spinner.js +10 -1
- package/lib/Spinner/SpinnerContent.js +8 -0
- package/lib/Table/Cell.js +62 -91
- package/lib/Table/Header.js +4 -1
- package/lib/Table/SubHeading.js +4 -1
- package/lib/Table/Table.js +2 -1
- package/lib/TermsAndConditions/ExpandCollapse.js +31 -13
- package/lib/TermsAndConditions/TermsAndConditions.js +21 -6
- package/lib/VideoPicker/VideoPickerPlayer.js +4 -2
- package/lib/VideoPicker/VideoPickerThumbnail.js +103 -60
- package/lib/VideoPicker/VideoSlider.js +2 -2
- package/lib-module/Autocomplete/Loading.js +6 -12
- package/lib-module/Autocomplete/dictionary.js +2 -2
- package/lib-module/DatePicker/DatePicker.js +7 -1
- package/lib-module/NavigationBar/NavigationSubMenu.js +5 -9
- package/lib-module/Spinner/Spinner.js +10 -1
- package/lib-module/Spinner/SpinnerContent.js +8 -0
- package/lib-module/Table/Cell.js +65 -90
- package/lib-module/Table/Header.js +4 -1
- package/lib-module/Table/SubHeading.js +4 -1
- package/lib-module/Table/Table.js +2 -1
- package/lib-module/TermsAndConditions/ExpandCollapse.js +33 -15
- package/lib-module/TermsAndConditions/TermsAndConditions.js +22 -7
- package/lib-module/VideoPicker/VideoPickerPlayer.js +4 -2
- package/lib-module/VideoPicker/VideoPickerThumbnail.js +103 -61
- package/lib-module/VideoPicker/VideoSlider.js +2 -2
- package/package.json +3 -3
- package/src/Autocomplete/Loading.jsx +2 -5
- package/src/Autocomplete/dictionary.js +2 -2
- package/src/DatePicker/DatePicker.jsx +8 -1
- package/src/NavigationBar/NavigationSubMenu.jsx +3 -4
- package/src/Spinner/Spinner.jsx +9 -1
- package/src/Spinner/SpinnerContent.jsx +13 -1
- package/src/Table/Cell.jsx +58 -78
- package/src/Table/Header.jsx +6 -1
- package/src/Table/SubHeading.jsx +4 -1
- package/src/Table/Table.jsx +10 -2
- package/src/TermsAndConditions/ExpandCollapse.jsx +36 -14
- package/src/TermsAndConditions/TermsAndConditions.jsx +18 -6
- package/src/VideoPicker/VideoPickerPlayer.jsx +2 -2
- package/src/VideoPicker/VideoPickerThumbnail.jsx +51 -30
- package/src/VideoPicker/VideoSlider.jsx +2 -2
- package/types/BaseProvider.d.ts +25 -0
- package/types/index.d.ts +1 -1
|
@@ -41,12 +41,9 @@ const ExpandCollapseIconContainer = /*#__PURE__*/_styledComponents.default.div.w
|
|
|
41
41
|
} = _ref;
|
|
42
42
|
return {
|
|
43
43
|
alignItems: tokens.expandIconContainerAlignItems,
|
|
44
|
-
border: `${tokens.expandIconContainerBorder}px solid ${tokens.expandIconContainerBorderColor}`,
|
|
45
|
-
borderRadius: '50%',
|
|
46
|
-
display: 'flex',
|
|
47
|
-
height: tokens.expandIconContainerHeight,
|
|
48
44
|
justifyContent: tokens.expandIconContainerJustifyContent,
|
|
49
|
-
|
|
45
|
+
marginLeft: `${tokens.expandIconContainerMarginY}px`,
|
|
46
|
+
marginRight: `${tokens.expandIconContainerMarginY}px`,
|
|
50
47
|
width: tokens.expandIconContainerWidth
|
|
51
48
|
};
|
|
52
49
|
});
|
|
@@ -60,7 +57,7 @@ const ExpandCollapseTitle = /*#__PURE__*/_styledComponents.default.h4.withConfig
|
|
|
60
57
|
} = _ref2;
|
|
61
58
|
return {
|
|
62
59
|
color: tokens.expandTitleColor,
|
|
63
|
-
fontFamily: `${tokens.
|
|
60
|
+
fontFamily: `${tokens.expandTitleFontName}${tokens.expandTitleFontWeight}normal`,
|
|
64
61
|
fontSize: tokens.expandTitleFontSize,
|
|
65
62
|
lineHeight: tokens.expandTitleLineHeight,
|
|
66
63
|
margin: `${tokens.expandTitleMarginX}px ${tokens.expandTitleMarginY}px`
|
|
@@ -79,8 +76,21 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
79
76
|
expandContentPaddingBottom,
|
|
80
77
|
expandContentPaddingLeft,
|
|
81
78
|
expandContentPaddingRight,
|
|
82
|
-
expandContentPaddingTop
|
|
79
|
+
expandContentPaddingTop,
|
|
80
|
+
contentBorderColor,
|
|
81
|
+
contentMarginBottom,
|
|
82
|
+
expandTitlePaddingLeft,
|
|
83
|
+
expandTitleBorder,
|
|
84
|
+
expandTitleBorderColor,
|
|
85
|
+
expandTitleUnderline
|
|
83
86
|
} = getTokens();
|
|
87
|
+
const [expand, setExpand] = (0, _react.useState)(false);
|
|
88
|
+
|
|
89
|
+
const handleExpandToggle = (expandProps, event, expanded) => {
|
|
90
|
+
expandProps.onToggle('ExpandCollapsePanel', event);
|
|
91
|
+
setExpand(!expanded);
|
|
92
|
+
};
|
|
93
|
+
|
|
84
94
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse, {
|
|
85
95
|
tokens: {
|
|
86
96
|
borderWidth: expandBaseBorderWidth
|
|
@@ -88,7 +98,12 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
88
98
|
children: expandProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse.Panel, { ...expandProps,
|
|
89
99
|
panelId: "ExpandCollapsePanel",
|
|
90
100
|
controlTokens: {
|
|
91
|
-
icon: null
|
|
101
|
+
icon: null,
|
|
102
|
+
backgroundColor: 'transparent',
|
|
103
|
+
paddingLeft: expandTitlePaddingLeft,
|
|
104
|
+
borderColor: expandTitleBorderColor,
|
|
105
|
+
borderWidth: expandTitleBorder,
|
|
106
|
+
textLine: expandTitleUnderline
|
|
92
107
|
} // TODO refactor
|
|
93
108
|
// eslint-disable-next-line react/no-unstable-nested-components
|
|
94
109
|
,
|
|
@@ -102,15 +117,16 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
102
117
|
expanded
|
|
103
118
|
});
|
|
104
119
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ExpandCollapseControl, {
|
|
105
|
-
onClick: event => expandProps
|
|
120
|
+
onClick: event => handleExpandToggle(expandProps, event, expanded),
|
|
106
121
|
ref: ref,
|
|
107
122
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseIconContainer, {
|
|
108
123
|
tokens: getTokens(),
|
|
109
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.
|
|
124
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.IconButton, {
|
|
110
125
|
icon: icon,
|
|
111
126
|
variant: {
|
|
112
127
|
size: 'small'
|
|
113
|
-
}
|
|
128
|
+
},
|
|
129
|
+
onClick: event => handleExpandToggle(expandProps, event, expanded)
|
|
114
130
|
})
|
|
115
131
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseTitle, {
|
|
116
132
|
tokens: getTokens(),
|
|
@@ -122,9 +138,11 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
122
138
|
contentPaddingBottom: expandContentPaddingBottom,
|
|
123
139
|
contentPaddingLeft: expandContentPaddingLeft,
|
|
124
140
|
contentPaddingRight: expandContentPaddingRight,
|
|
125
|
-
contentPaddingTop: expandContentPaddingTop
|
|
141
|
+
contentPaddingTop: expandContentPaddingTop,
|
|
142
|
+
borderColor: contentBorderColor,
|
|
143
|
+
marginBottom: contentMarginBottom
|
|
126
144
|
},
|
|
127
|
-
children: children
|
|
145
|
+
children: expand ? children : null
|
|
128
146
|
})
|
|
129
147
|
});
|
|
130
148
|
});
|
|
@@ -71,7 +71,8 @@ const Unordered = /*#__PURE__*/_styledComponents.default.ul.withConfig({
|
|
|
71
71
|
return {
|
|
72
72
|
listStyleType: 'none',
|
|
73
73
|
margin: 0,
|
|
74
|
-
padding:
|
|
74
|
+
padding: 0,
|
|
75
|
+
paddingTop: tokens.unorderedPadding
|
|
75
76
|
};
|
|
76
77
|
});
|
|
77
78
|
|
|
@@ -140,9 +141,16 @@ const TermsAndConditions = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
|
|
|
140
141
|
});
|
|
141
142
|
const hasIndexedContent = indexedContent.length > 0;
|
|
142
143
|
const hasNonIndexedContent = nonIndexedContent.length > 0;
|
|
143
|
-
const
|
|
144
|
+
const viewport = (0, _componentsBase.useViewport)();
|
|
145
|
+
const themeTokens = (0, _componentsBase.useThemeTokens)('TermsAndConditions', tokens, variant, {
|
|
146
|
+
viewport
|
|
147
|
+
});
|
|
144
148
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { ...selectProps(rest),
|
|
145
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
|
|
149
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
|
|
150
|
+
tokens: {
|
|
151
|
+
color: themeTokens.dividerColor
|
|
152
|
+
}
|
|
153
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandCollapse.default, {
|
|
146
154
|
collapseTitle: getCopy('headingView'),
|
|
147
155
|
expandTitle: getCopy('headingHide'),
|
|
148
156
|
ref: ref,
|
|
@@ -164,8 +172,11 @@ const TermsAndConditions = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
|
|
|
164
172
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
165
173
|
block: true,
|
|
166
174
|
heading: true,
|
|
167
|
-
|
|
168
|
-
|
|
175
|
+
tokens: {
|
|
176
|
+
fontName: themeTokens.expandTitleFontName,
|
|
177
|
+
fontWeight: themeTokens.expandTitleFontWeight,
|
|
178
|
+
fontSize: themeTokens.titleFontSize,
|
|
179
|
+
lineHeight: themeTokens.titleLineHeight
|
|
169
180
|
},
|
|
170
181
|
children: getCopy('nonIndexedTitle')
|
|
171
182
|
})
|
|
@@ -181,7 +192,11 @@ const TermsAndConditions = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
|
|
|
181
192
|
})]
|
|
182
193
|
})]
|
|
183
194
|
})
|
|
184
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
|
|
195
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
|
|
196
|
+
tokens: {
|
|
197
|
+
color: themeTokens.dividerColor
|
|
198
|
+
}
|
|
199
|
+
})]
|
|
185
200
|
});
|
|
186
201
|
});
|
|
187
202
|
TermsAndConditions.displayName = 'TermsAndConditions';
|
|
@@ -39,11 +39,13 @@ const VideoPickerPlayer = _ref => {
|
|
|
39
39
|
space: 2,
|
|
40
40
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
41
41
|
variant: {
|
|
42
|
-
size: '
|
|
43
|
-
colour: 'secondary'
|
|
42
|
+
size: 'h3'
|
|
44
43
|
},
|
|
45
44
|
children: video.title
|
|
46
45
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
46
|
+
variant: {
|
|
47
|
+
colour: 'default'
|
|
48
|
+
},
|
|
47
49
|
children: video.description
|
|
48
50
|
})]
|
|
49
51
|
})]
|
|
@@ -61,38 +61,47 @@ const createReactNativeStyles = _ref => {
|
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
const
|
|
65
|
-
displayName: "
|
|
64
|
+
const ImageContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
65
|
+
displayName: "VideoPickerThumbnail__ImageContainer",
|
|
66
66
|
componentId: "components-web__sc-1glxurq-0"
|
|
67
|
-
})(["
|
|
67
|
+
})(["padding:", ";border:", ";border-radius:", "px;"], props => `${props.outerBorderGap}px`, props => `${props.outerBorderWidth}px solid ${props.outerBorderColor}`, _ref2 => {
|
|
68
68
|
let {
|
|
69
|
-
|
|
69
|
+
outerBorderRadius
|
|
70
70
|
} = _ref2;
|
|
71
|
-
return
|
|
72
|
-
}
|
|
71
|
+
return outerBorderRadius;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const VideoThumbnail = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
75
|
+
displayName: "VideoPickerThumbnail__VideoThumbnail",
|
|
76
|
+
componentId: "components-web__sc-1glxurq-1"
|
|
77
|
+
})(["position:relative;width:", ";flex-shrink:0;* button{display:none;}&::before{content:'';display:block;padding-bottom:56.25%;}&::after{content:'';border:", "px solid;border-color:", ";border-radius:", "px;position:absolute;top:0;left:0;right:0;bottom:0;}& > div{border-radius:", "px;}"], props => props.layout === 'vertical' ? '100%' : '144px', _ref3 => {
|
|
73
78
|
let {
|
|
74
|
-
|
|
75
|
-
borderColor
|
|
79
|
+
borderWidth
|
|
76
80
|
} = _ref3;
|
|
77
|
-
return
|
|
81
|
+
return borderWidth;
|
|
78
82
|
}, _ref4 => {
|
|
79
83
|
let {
|
|
80
|
-
|
|
84
|
+
borderColor
|
|
81
85
|
} = _ref4;
|
|
82
|
-
return
|
|
86
|
+
return borderColor;
|
|
83
87
|
}, _ref5 => {
|
|
84
88
|
let {
|
|
85
89
|
borderRadius
|
|
86
90
|
} = _ref5;
|
|
87
91
|
return borderRadius;
|
|
92
|
+
}, _ref6 => {
|
|
93
|
+
let {
|
|
94
|
+
borderRadius
|
|
95
|
+
} = _ref6;
|
|
96
|
+
return borderRadius;
|
|
88
97
|
});
|
|
89
98
|
|
|
90
99
|
const ThumbnailTitleContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
91
100
|
displayName: "VideoPickerThumbnail__ThumbnailTitleContainer",
|
|
92
|
-
componentId: "components-web__sc-1glxurq-
|
|
101
|
+
componentId: "components-web__sc-1glxurq-2"
|
|
93
102
|
})(["display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;"]);
|
|
94
103
|
|
|
95
|
-
const VideoPickerThumbnail =
|
|
104
|
+
const VideoPickerThumbnail = _ref7 => {
|
|
96
105
|
let {
|
|
97
106
|
videoPlayerRef,
|
|
98
107
|
selectedVideoId,
|
|
@@ -103,56 +112,59 @@ const VideoPickerThumbnail = _ref6 => {
|
|
|
103
112
|
itemPositions,
|
|
104
113
|
index,
|
|
105
114
|
width = '100%'
|
|
106
|
-
} =
|
|
115
|
+
} = _ref7;
|
|
107
116
|
const viewport = (0, _componentsBase.useViewport)();
|
|
108
|
-
const {
|
|
109
|
-
titleColor,
|
|
110
|
-
subTitleColor,
|
|
111
|
-
...themeTokens
|
|
112
|
-
} = (0, _componentsBase.useThemeTokens)('VideoPickerThumbnail');
|
|
113
|
-
const rnStyles = createReactNativeStyles(themeTokens);
|
|
117
|
+
const getTokens = (0, _componentsBase.useThemeTokensCallback)('VideoPickerThumbnail', {}, {});
|
|
114
118
|
const {
|
|
115
119
|
timestamp
|
|
116
120
|
} = (0, _helpers.getTimestamp)(video.videoLength, video.copy);
|
|
117
121
|
const isPlaying = selectedVideoId === video.videoId;
|
|
118
122
|
|
|
119
|
-
const renderThumbnailImage =
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
const renderThumbnailImage = themeTokens => {
|
|
124
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(VideoThumbnail, { ...themeTokens,
|
|
125
|
+
isPlaying: isPlaying,
|
|
126
|
+
layout: layout,
|
|
127
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoSplash.default, {
|
|
128
|
+
simpleMode: true,
|
|
129
|
+
poster: video.posterSrc || `https://img.youtube.com/vi/${video.videoId}/maxresdefault.jpg`,
|
|
130
|
+
videoLength: video.videoLength,
|
|
131
|
+
copy: video.copy
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
};
|
|
129
135
|
|
|
130
|
-
const renderThumbnailInfo =
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
const renderThumbnailInfo = _ref8 => {
|
|
137
|
+
let {
|
|
138
|
+
titleColor,
|
|
139
|
+
subTitleColor
|
|
140
|
+
} = _ref8;
|
|
141
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
|
|
142
|
+
space: 2,
|
|
143
|
+
tokens: {
|
|
144
|
+
flexShrink: 1
|
|
145
|
+
},
|
|
146
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ThumbnailTitleContainer, {
|
|
147
|
+
viewport: viewport,
|
|
148
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
149
|
+
variant: {
|
|
150
|
+
bold: true
|
|
151
|
+
},
|
|
152
|
+
tokens: {
|
|
153
|
+
color: titleColor
|
|
154
|
+
},
|
|
155
|
+
children: video.title
|
|
156
|
+
})
|
|
157
|
+
}), viewport !== _systemConstants.viewports.xs && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
138
158
|
variant: {
|
|
139
|
-
|
|
159
|
+
size: 'micro'
|
|
140
160
|
},
|
|
141
161
|
tokens: {
|
|
142
|
-
color:
|
|
162
|
+
color: subTitleColor
|
|
143
163
|
},
|
|
144
|
-
children:
|
|
145
|
-
})
|
|
146
|
-
})
|
|
147
|
-
|
|
148
|
-
size: 'micro'
|
|
149
|
-
},
|
|
150
|
-
tokens: {
|
|
151
|
-
color: subTitleColor
|
|
152
|
-
},
|
|
153
|
-
children: timestamp
|
|
154
|
-
})]
|
|
155
|
-
});
|
|
164
|
+
children: timestamp
|
|
165
|
+
})]
|
|
166
|
+
});
|
|
167
|
+
};
|
|
156
168
|
|
|
157
169
|
const handleLayout = itemPositions !== undefined ? getItemPositionLayoutHandler(itemPositions.positions, index) : undefined;
|
|
158
170
|
|
|
@@ -175,14 +187,45 @@ const VideoPickerThumbnail = _ref6 => {
|
|
|
175
187
|
accessibilityState: {
|
|
176
188
|
checked: isPlaying
|
|
177
189
|
},
|
|
178
|
-
style:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
190
|
+
style: _ref9 => {
|
|
191
|
+
let {
|
|
192
|
+
hovered: hover,
|
|
193
|
+
focused: focus,
|
|
194
|
+
pressed
|
|
195
|
+
} = _ref9;
|
|
196
|
+
const themeTokens = getTokens({
|
|
197
|
+
hover,
|
|
198
|
+
focus,
|
|
199
|
+
pressed,
|
|
200
|
+
selected: isPlaying
|
|
201
|
+
});
|
|
202
|
+
const rnStyles = createReactNativeStyles(themeTokens);
|
|
203
|
+
return [rnStyles.container, layout === 'horizontal' && rnStyles.horizontal, isFramed && rnStyles.framed, isFramed && index > 0 && rnStyles.framedLine, {
|
|
204
|
+
width
|
|
205
|
+
}, {
|
|
206
|
+
outline: 'none'
|
|
207
|
+
}];
|
|
208
|
+
},
|
|
209
|
+
children: _ref10 => {
|
|
210
|
+
let {
|
|
211
|
+
hovered: hover,
|
|
212
|
+
focused: focus,
|
|
213
|
+
pressed
|
|
214
|
+
} = _ref10;
|
|
215
|
+
const themeTokens = getTokens({
|
|
216
|
+
hover,
|
|
217
|
+
focus,
|
|
218
|
+
pressed,
|
|
219
|
+
selected: isPlaying
|
|
220
|
+
});
|
|
221
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
|
|
222
|
+
space: layout === 'vertical' ? 2 : 3,
|
|
223
|
+
direction: layout === 'vertical' ? 'column' : 'row',
|
|
224
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ImageContainer, { ...themeTokens,
|
|
225
|
+
children: renderThumbnailImage(themeTokens)
|
|
226
|
+
}), renderThumbnailInfo(themeTokens)]
|
|
227
|
+
});
|
|
228
|
+
}
|
|
186
229
|
}, video.videoId);
|
|
187
230
|
};
|
|
188
231
|
|
|
@@ -48,7 +48,7 @@ const VideoSlider = _ref => {
|
|
|
48
48
|
setContainerWidth(width);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
const itemsGap =
|
|
51
|
+
const itemsGap = 32; // '5' on spacing scale
|
|
52
52
|
|
|
53
53
|
const itemsCount = viewport === 'lg' || viewport === 'xl' ? 4 : 3;
|
|
54
54
|
const itemGapPortioned = (itemsCount - 1) * itemsGap / itemsCount;
|
|
@@ -57,7 +57,7 @@ const VideoSlider = _ref => {
|
|
|
57
57
|
Math.max(containerWidth / itemsCount - itemGapPortioned, 0 // Prevent negative width breaking layout on very narrow containers
|
|
58
58
|
);
|
|
59
59
|
const content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.StackView, {
|
|
60
|
-
space:
|
|
60
|
+
space: 5,
|
|
61
61
|
direction: "row",
|
|
62
62
|
accessibilityRole: "radiogroup",
|
|
63
63
|
tokens: {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Box, StackView
|
|
3
|
+
import { Box, StackView } from '@telus-uds/components-base';
|
|
4
4
|
import Spinner from '../Spinner';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
6
|
|
|
8
7
|
const Loading = _ref => {
|
|
9
8
|
let {
|
|
@@ -11,23 +10,18 @@ const Loading = _ref => {
|
|
|
11
10
|
} = _ref;
|
|
12
11
|
return /*#__PURE__*/_jsx(Box, {
|
|
13
12
|
space: 3,
|
|
14
|
-
children: /*#__PURE__*/
|
|
13
|
+
children: /*#__PURE__*/_jsx(StackView, {
|
|
15
14
|
direction: "row",
|
|
16
15
|
space: 2,
|
|
17
16
|
tokens: {
|
|
18
17
|
alignItems: 'center'
|
|
19
18
|
},
|
|
20
|
-
children:
|
|
19
|
+
children: /*#__PURE__*/_jsx(Spinner, {
|
|
21
20
|
inline: true,
|
|
22
21
|
show: true,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
size: 'small'
|
|
27
|
-
},
|
|
28
|
-
accessibilityLiveRegion: "polite",
|
|
29
|
-
children: label
|
|
30
|
-
})]
|
|
22
|
+
label: label,
|
|
23
|
+
labelPosition: "right"
|
|
24
|
+
})
|
|
31
25
|
})
|
|
32
26
|
});
|
|
33
27
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
en: {
|
|
3
3
|
hasResults: 'Some results are available',
|
|
4
|
-
loading: '
|
|
4
|
+
loading: 'Searching...',
|
|
5
5
|
noResults: 'No results found'
|
|
6
6
|
},
|
|
7
7
|
fr: {
|
|
8
8
|
hasResults: 'Quelques suggestions sont disponible',
|
|
9
|
-
loading: '
|
|
9
|
+
loading: 'Recherche...',
|
|
10
10
|
noResults: 'Aucun résultat trouvé'
|
|
11
11
|
}
|
|
12
12
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef, useState } from 'react';
|
|
1
|
+
import React, { forwardRef, useEffect, useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import momentPropTypes from 'react-moment-proptypes';
|
|
@@ -110,6 +110,12 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
110
110
|
dictionary,
|
|
111
111
|
copy
|
|
112
112
|
});
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
if (!moment(date).isSame(inputDate)) {
|
|
115
|
+
setInputDate(date);
|
|
116
|
+
setInputText(date instanceof moment ? date.format(dateFormat) : '');
|
|
117
|
+
}
|
|
118
|
+
}, [date, inputDate]);
|
|
113
119
|
|
|
114
120
|
const onFocusChange = _ref2 => {
|
|
115
121
|
let {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Icon,
|
|
3
|
+
import { Icon, useResponsiveProp, useThemeTokens } from '@telus-uds/components-base';
|
|
4
4
|
import NavigationItem from './NavigationItem';
|
|
5
5
|
import Listbox from '../Listbox';
|
|
6
6
|
import useOverlaidPosition from '../utils/useOverlaidPosition';
|
|
@@ -98,22 +98,18 @@ const NavigationSubMenu = _ref => {
|
|
|
98
98
|
onClick: handleClick,
|
|
99
99
|
icon: icoMenu,
|
|
100
100
|
children: _ref2 => {
|
|
101
|
-
var _textStyles
|
|
101
|
+
var _textStyles$;
|
|
102
102
|
|
|
103
103
|
let {
|
|
104
104
|
textStyles
|
|
105
105
|
} = _ref2;
|
|
106
|
-
return [children, /*#__PURE__*/_jsx(
|
|
107
|
-
space: 1,
|
|
108
|
-
direction: "row"
|
|
109
|
-
}, `${id}_spacer`), /*#__PURE__*/_jsx(Icon, {
|
|
106
|
+
return [children, /*#__PURE__*/_jsx(Icon, {
|
|
110
107
|
icon: icoMenu,
|
|
111
108
|
variant: {
|
|
112
|
-
size: '
|
|
109
|
+
size: 'micro'
|
|
113
110
|
},
|
|
114
111
|
tokens: {
|
|
115
|
-
color: (_textStyles$ = textStyles[0]) === null || _textStyles$ === void 0 ? void 0 : _textStyles$.color
|
|
116
|
-
size: (_textStyles$2 = textStyles[0]) === null || _textStyles$2 === void 0 ? void 0 : _textStyles$2.fontSize
|
|
112
|
+
color: (_textStyles$ = textStyles[0]) === null || _textStyles$ === void 0 ? void 0 : _textStyles$.color
|
|
117
113
|
}
|
|
118
114
|
}, `${id}_icon`)];
|
|
119
115
|
}
|
|
@@ -88,6 +88,7 @@ const Spinner = _ref3 => {
|
|
|
88
88
|
fullScreen = false,
|
|
89
89
|
inline = false,
|
|
90
90
|
label,
|
|
91
|
+
labelPosition,
|
|
91
92
|
show = false,
|
|
92
93
|
isStatic = false,
|
|
93
94
|
tokens,
|
|
@@ -120,6 +121,7 @@ const Spinner = _ref3 => {
|
|
|
120
121
|
...selectProps(rest),
|
|
121
122
|
children: /*#__PURE__*/_jsx(SpinnerContent, {
|
|
122
123
|
label: label,
|
|
124
|
+
labelPosition: labelPosition,
|
|
123
125
|
overlay: true,
|
|
124
126
|
size: size,
|
|
125
127
|
thickness: thickness,
|
|
@@ -139,6 +141,7 @@ const Spinner = _ref3 => {
|
|
|
139
141
|
...selectProps(rest),
|
|
140
142
|
children: [/*#__PURE__*/_jsx(SpinnerContent, {
|
|
141
143
|
label: label,
|
|
144
|
+
labelPosition: labelPosition,
|
|
142
145
|
overlay: true,
|
|
143
146
|
size: size,
|
|
144
147
|
thickness: thickness,
|
|
@@ -164,6 +167,7 @@ const Spinner = _ref3 => {
|
|
|
164
167
|
return /*#__PURE__*/_jsx(SpinnerContainer, { ...selectProps(rest),
|
|
165
168
|
children: /*#__PURE__*/_jsx(SpinnerContent, {
|
|
166
169
|
label: label,
|
|
170
|
+
labelPosition: labelPosition,
|
|
167
171
|
size: size,
|
|
168
172
|
thickness: thickness,
|
|
169
173
|
sizeVariant: sizeVariant,
|
|
@@ -211,6 +215,11 @@ Spinner.propTypes = { ...selectedSystemPropTypes,
|
|
|
211
215
|
/**
|
|
212
216
|
* If true, it should render a static spinner
|
|
213
217
|
*/
|
|
214
|
-
isStatic: PropTypes.bool
|
|
218
|
+
isStatic: PropTypes.bool,
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Determine where the label of the spinner should be placed, left, right, bottom or top.
|
|
222
|
+
*/
|
|
223
|
+
labelPosition: PropTypes.string
|
|
215
224
|
};
|
|
216
225
|
export default Spinner;
|
|
@@ -31,6 +31,7 @@ const Container = /*#__PURE__*/styled.div.withConfig({
|
|
|
31
31
|
const SpinnerContent = _ref2 => {
|
|
32
32
|
let {
|
|
33
33
|
label,
|
|
34
|
+
labelPosition,
|
|
34
35
|
overlay = false,
|
|
35
36
|
sizeVariant,
|
|
36
37
|
size,
|
|
@@ -38,6 +39,12 @@ const SpinnerContent = _ref2 => {
|
|
|
38
39
|
isStatic,
|
|
39
40
|
...rest
|
|
40
41
|
} = _ref2;
|
|
42
|
+
const labelMapping = {
|
|
43
|
+
top: 'column-reverse',
|
|
44
|
+
bottom: 'column',
|
|
45
|
+
left: 'row-reverse',
|
|
46
|
+
right: 'row'
|
|
47
|
+
};
|
|
41
48
|
return /*#__PURE__*/_jsx(Container, {
|
|
42
49
|
overlay: overlay,
|
|
43
50
|
children: /*#__PURE__*/_jsxs(StackView, {
|
|
@@ -45,6 +52,7 @@ const SpinnerContent = _ref2 => {
|
|
|
45
52
|
tokens: {
|
|
46
53
|
alignItems: 'center'
|
|
47
54
|
},
|
|
55
|
+
direction: labelMapping[labelPosition],
|
|
48
56
|
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
49
57
|
label: label,
|
|
50
58
|
tokens: {
|