@telus-uds/components-web 2.17.2 → 2.18.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 +18 -2
- package/component-docs.json +534 -11
- package/lib/Autocomplete/Autocomplete.js +24 -1
- package/lib/Badge/Badge.js +2 -2
- package/lib/BlockQuote/BlockQuote.js +9 -0
- package/lib/Callout/Callout.js +5 -0
- package/lib/DatePicker/DatePicker.js +24 -4
- package/lib/Disclaimer/Disclaimer.js +4 -0
- package/lib/ExpandCollapseMini/ExpandCollapseMini.js +7 -1
- package/lib/Listbox/Listbox.js +7 -1
- package/lib/NavigationBar/NavigationBar.js +8 -2
- package/lib/OrderedList/OrderedList.js +4 -2
- package/lib/Ribbon/Ribbon.js +2 -1
- package/lib/Toast/Toast.js +2 -1
- package/lib/Video/Video.js +3 -1
- package/lib/WaffleGrid/WaffleGrid.js +20 -20
- package/lib-module/Autocomplete/Autocomplete.js +24 -1
- package/lib-module/Badge/Badge.js +1 -1
- package/lib-module/BlockQuote/BlockQuote.js +10 -1
- package/lib-module/Callout/Callout.js +6 -1
- package/lib-module/DatePicker/DatePicker.js +24 -4
- package/lib-module/Disclaimer/Disclaimer.js +4 -0
- package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +8 -2
- package/lib-module/Listbox/Listbox.js +8 -2
- package/lib-module/NavigationBar/NavigationBar.js +8 -2
- package/lib-module/OrderedList/OrderedList.js +5 -3
- package/lib-module/Ribbon/Ribbon.js +3 -2
- package/lib-module/Toast/Toast.js +3 -2
- package/lib-module/Video/Video.js +4 -2
- package/lib-module/WaffleGrid/WaffleGrid.js +21 -21
- package/package.json +3 -3
- package/src/Autocomplete/Autocomplete.jsx +19 -1
- package/src/Badge/Badge.jsx +1 -1
- package/src/BlockQuote/BlockQuote.jsx +10 -1
- package/src/Callout/Callout.jsx +11 -1
- package/src/DatePicker/DatePicker.jsx +20 -2
- package/src/Disclaimer/Disclaimer.jsx +3 -0
- package/src/ExpandCollapseMini/ExpandCollapseMini.jsx +7 -2
- package/src/Listbox/Listbox.jsx +8 -2
- package/src/NavigationBar/NavigationBar.jsx +7 -2
- package/src/OrderedList/OrderedList.jsx +4 -3
- package/src/Ribbon/Ribbon.jsx +8 -2
- package/src/Toast/Toast.jsx +4 -2
- package/src/Video/Video.jsx +9 -2
- package/src/WaffleGrid/WaffleGrid.jsx +21 -15
- package/types/Callout.d.ts +1 -0
|
@@ -401,7 +401,30 @@ Autocomplete.propTypes = { ...selectedSystemPropTypes,
|
|
|
401
401
|
/**
|
|
402
402
|
* Input value for controlled usage
|
|
403
403
|
*/
|
|
404
|
-
value: _propTypes.default.string
|
|
404
|
+
value: _propTypes.default.string,
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Can be used to set the initial items of the component
|
|
408
|
+
*/
|
|
409
|
+
initialItems: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
410
|
+
id: _propTypes.default.string,
|
|
411
|
+
label: _propTypes.default.string
|
|
412
|
+
})),
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Initial value for the component
|
|
416
|
+
*/
|
|
417
|
+
initialValue: _propTypes.default.string,
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Boolean to set if it's readonly or not
|
|
421
|
+
*/
|
|
422
|
+
readOnly: _propTypes.default.bool,
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Use to visually mark an input as valid or invalid.
|
|
426
|
+
*/
|
|
427
|
+
validation: _propTypes.default.oneOf(['error', 'success'])
|
|
405
428
|
};
|
|
406
429
|
var _default = Autocomplete;
|
|
407
430
|
exports.default = _default;
|
package/lib/Badge/Badge.js
CHANGED
|
@@ -7,12 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
|
|
10
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
13
|
|
|
12
14
|
var _componentsBase = require("@telus-uds/components-base");
|
|
13
15
|
|
|
14
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
16
|
var _utils = require("../utils");
|
|
17
17
|
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -195,6 +195,15 @@ const BlockQuote = _ref8 => {
|
|
|
195
195
|
|
|
196
196
|
BlockQuote.propTypes = { ...selectedSystemPropTypes,
|
|
197
197
|
..._componentsBase.withLinkRouter.propTypes,
|
|
198
|
+
tokens: (0, _componentsBase.getTokensPropType)('BlockQuote'),
|
|
199
|
+
variant: _propTypes.default.exact({
|
|
200
|
+
alternative: _propTypes.default.bool,
|
|
201
|
+
size: _propTypes.default.string
|
|
202
|
+
}),
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Children nodes that can be added
|
|
206
|
+
*/
|
|
198
207
|
children: _propTypes.default.node.isRequired,
|
|
199
208
|
|
|
200
209
|
/**
|
package/lib/Callout/Callout.js
CHANGED
|
@@ -136,11 +136,16 @@ const Callout = _ref2 => {
|
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
Callout.propTypes = { ...selectedSystemPropTypes,
|
|
139
|
+
tokens: (0, _componentsBase.getTokensPropType)('Callout'),
|
|
139
140
|
|
|
140
141
|
/**
|
|
141
142
|
* Icon to display on the left side of the Callout
|
|
142
143
|
*/
|
|
143
144
|
icon: _propTypes.default.elementType,
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Children nodes that can be added
|
|
148
|
+
*/
|
|
144
149
|
children: _propTypes.default.node.isRequired,
|
|
145
150
|
|
|
146
151
|
/**
|
|
@@ -122,6 +122,8 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
122
122
|
variant = {},
|
|
123
123
|
validation,
|
|
124
124
|
disabled,
|
|
125
|
+
prevTestID,
|
|
126
|
+
nextTestID,
|
|
125
127
|
...rest
|
|
126
128
|
} = _ref;
|
|
127
129
|
const [inputDate, setInputDate] = (0, _react.useState)(date instanceof _moment.default ? date : undefined);
|
|
@@ -237,7 +239,8 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
237
239
|
icon: previousIcon,
|
|
238
240
|
variant: {
|
|
239
241
|
size: 'small'
|
|
240
|
-
}
|
|
242
|
+
},
|
|
243
|
+
testID: prevTestID
|
|
241
244
|
});
|
|
242
245
|
};
|
|
243
246
|
|
|
@@ -252,7 +255,8 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
252
255
|
icon: nextIcon,
|
|
253
256
|
variant: {
|
|
254
257
|
size: 'small'
|
|
255
|
-
}
|
|
258
|
+
},
|
|
259
|
+
testID: nextTestID
|
|
256
260
|
});
|
|
257
261
|
};
|
|
258
262
|
|
|
@@ -423,7 +427,21 @@ DatePicker.propTypes = { ...selectedSystemPropTypes,
|
|
|
423
427
|
/**
|
|
424
428
|
* Disable the input which will not open the calendar picker
|
|
425
429
|
*/
|
|
426
|
-
disabled: _propTypes.default.bool
|
|
430
|
+
disabled: _propTypes.default.bool,
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* A unique identifier for the previous icon button located on the datepicker.
|
|
434
|
+
* This is for automation testing purposes.
|
|
435
|
+
* Will be added as a `data-testid-prev` attribute for example.
|
|
436
|
+
*/
|
|
437
|
+
prevTestID: _propTypes.default.string,
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* A unique identifier for the next icon button located on the datepicker.
|
|
441
|
+
* This is for automation testing purposes.
|
|
442
|
+
* Will be added as a `data-testid-next` attribute for example.
|
|
443
|
+
*/
|
|
444
|
+
nextTestID: _propTypes.default.string
|
|
427
445
|
};
|
|
428
446
|
DatePicker.defaultProps = {
|
|
429
447
|
copy: 'en',
|
|
@@ -437,7 +455,9 @@ DatePicker.defaultProps = {
|
|
|
437
455
|
tooltip: undefined,
|
|
438
456
|
onDateChange: () => {},
|
|
439
457
|
validation: undefined,
|
|
440
|
-
disabled: false
|
|
458
|
+
disabled: false,
|
|
459
|
+
prevTestID: '',
|
|
460
|
+
nextTestID: ''
|
|
441
461
|
};
|
|
442
462
|
var _default = DatePicker;
|
|
443
463
|
exports.default = _default;
|
|
@@ -75,10 +75,16 @@ ExpandCollapseMini.propTypes = { ..._ExpandCollapseMiniControl.default.propTypes
|
|
|
75
75
|
* ID for DOM element on web
|
|
76
76
|
*/
|
|
77
77
|
nativeID: _propTypes.default.string,
|
|
78
|
-
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Children nodes that can be added
|
|
81
|
+
*/
|
|
82
|
+
children: _propTypes.default.node.isRequired,
|
|
83
|
+
tokens: (0, _componentsBase.getTokensPropType)('ExpandCollapseMini')
|
|
79
84
|
};
|
|
80
85
|
ExpandCollapseMini.defaultProps = {
|
|
81
86
|
onToggle: () => {},
|
|
87
|
+
tokens: {},
|
|
82
88
|
nativeID: ''
|
|
83
89
|
};
|
|
84
90
|
var _default = ExpandCollapseMini;
|
package/lib/Listbox/Listbox.js
CHANGED
|
@@ -172,7 +172,13 @@ Listbox.propTypes = { ..._componentsBase.withLinkRouter.propTypes,
|
|
|
172
172
|
/**
|
|
173
173
|
* To select an item by default
|
|
174
174
|
*/
|
|
175
|
-
selectedId: _propTypes.default.string
|
|
175
|
+
selectedId: _propTypes.default.string,
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* onClose event
|
|
179
|
+
*/
|
|
180
|
+
onClose: _propTypes.default.func,
|
|
181
|
+
tokens: (0, _componentsBase.getTokensPropType)('Listbox')
|
|
176
182
|
};
|
|
177
183
|
Listbox.Overlay = _ListboxOverlay.default;
|
|
178
184
|
var _default = Listbox;
|
|
@@ -224,12 +224,18 @@ NavigationBar.propTypes = { ...selectedSystemPropTypes,
|
|
|
224
224
|
/**
|
|
225
225
|
* Optional function to be called on pressing a link
|
|
226
226
|
*/
|
|
227
|
-
onChange: _propTypes.default.func
|
|
227
|
+
onChange: _propTypes.default.func,
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Accesibility role for stackview
|
|
231
|
+
*/
|
|
232
|
+
accessibilityRole: _propTypes.default.string
|
|
228
233
|
};
|
|
229
234
|
NavigationBar.defaultProps = {
|
|
230
235
|
heading: undefined,
|
|
231
236
|
headingLevel: 'h1',
|
|
232
|
-
onChange: () => {}
|
|
237
|
+
onChange: () => {},
|
|
238
|
+
accessibilityRole: ''
|
|
233
239
|
};
|
|
234
240
|
var _default = NavigationBar;
|
|
235
241
|
exports.default = _default;
|
|
@@ -84,10 +84,12 @@ OrderedList.propTypes = { ...selectedSystemPropTypes,
|
|
|
84
84
|
/**
|
|
85
85
|
* The position to start the list with.
|
|
86
86
|
*/
|
|
87
|
-
start: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])
|
|
87
|
+
start: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
88
|
+
variant: _componentsBase.variantProp.propType
|
|
88
89
|
};
|
|
89
90
|
OrderedList.defaultProps = {
|
|
90
|
-
start: 1
|
|
91
|
+
start: 1,
|
|
92
|
+
variant: {}
|
|
91
93
|
};
|
|
92
94
|
OrderedList.Item = _Item.default;
|
|
93
95
|
var _default = OrderedList;
|
package/lib/Ribbon/Ribbon.js
CHANGED
|
@@ -230,7 +230,8 @@ Ribbon.propTypes = { ...selectedSystemPropTypes,
|
|
|
230
230
|
left: _propTypes.default.number,
|
|
231
231
|
|
|
232
232
|
/** sets the top offset (triggers absolute positioning) */
|
|
233
|
-
top: _propTypes.default.number
|
|
233
|
+
top: _propTypes.default.number,
|
|
234
|
+
tokens: (0, _componentsBase.getTokensPropType)('Ribbon')
|
|
234
235
|
};
|
|
235
236
|
var _default = Ribbon;
|
|
236
237
|
exports.default = _default;
|
package/lib/Toast/Toast.js
CHANGED
|
@@ -179,7 +179,8 @@ Toast.propTypes = { ...selectedSystemPropTypes,
|
|
|
179
179
|
text: _propTypes.default.string.isRequired,
|
|
180
180
|
LinkRouter: (_withLinkRouter$propT = _componentsBase.withLinkRouter.propTypes) === null || _withLinkRouter$propT === void 0 ? void 0 : _withLinkRouter$propT.LinkRouter,
|
|
181
181
|
linkRouterProps: (_withLinkRouter$propT2 = _componentsBase.withLinkRouter.propTypes) === null || _withLinkRouter$propT2 === void 0 ? void 0 : _withLinkRouter$propT2.linkRouterProps
|
|
182
|
-
})
|
|
182
|
+
}),
|
|
183
|
+
tokens: (0, _componentsBase.getTokensPropType)('Toast')
|
|
183
184
|
};
|
|
184
185
|
var _default = Toast;
|
|
185
186
|
exports.default = _default;
|
package/lib/Video/Video.js
CHANGED
|
@@ -1054,7 +1054,9 @@ Video.propTypes = { ...selectedSystemPropTypes,
|
|
|
1054
1054
|
* The title of the video being rendered. This is used for analytics purposes in conjunction with `analyticsTracking`.
|
|
1055
1055
|
* @since 1.3.0
|
|
1056
1056
|
*/
|
|
1057
|
-
videoTitle: _propTypes.default.string
|
|
1057
|
+
videoTitle: _propTypes.default.string,
|
|
1058
|
+
tokens: (0, _componentsBase.getTokensPropType)('Video'),
|
|
1059
|
+
variant: _componentsBase.variantProp.propType
|
|
1058
1060
|
};
|
|
1059
1061
|
Video.defaultProps = {
|
|
1060
1062
|
tracks: undefined,
|
|
@@ -30,19 +30,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
32
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
|
|
33
|
-
const DEFAULT_ROW_SIZE = {
|
|
34
|
-
sm: 2,
|
|
35
|
-
lg: 3,
|
|
36
|
-
xl: 6
|
|
37
|
-
};
|
|
38
33
|
|
|
39
|
-
const row = (rowSize,
|
|
34
|
+
const row = (rowSize, rowBorderWidth) => ({
|
|
40
35
|
flexBasis: `calc(100% / ${rowSize})`,
|
|
41
36
|
[`:not(:nth-of-type(${rowSize}n + 1))`]: {
|
|
42
|
-
borderLeftWidth: `${
|
|
37
|
+
borderLeftWidth: `${rowBorderWidth}px`
|
|
43
38
|
},
|
|
44
39
|
[`:nth-of-type(n+${rowSize + 1})`]: {
|
|
45
|
-
borderTopWidth: `${
|
|
40
|
+
borderTopWidth: `${rowBorderWidth}px`
|
|
46
41
|
}
|
|
47
42
|
});
|
|
48
43
|
|
|
@@ -67,9 +62,11 @@ const Item = /*#__PURE__*/(0, _styledComponents.default)(_ItemBase.default).with
|
|
|
67
62
|
} = _ref;
|
|
68
63
|
return {
|
|
69
64
|
display: 'flex',
|
|
70
|
-
flexDirection: '
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
flexDirection: 'row',
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
justifyContent: 'center',
|
|
68
|
+
flexGrow: 1,
|
|
69
|
+
flexShrink: 1,
|
|
73
70
|
padding: `${itemPadding}px`,
|
|
74
71
|
boxSizing: 'border-box',
|
|
75
72
|
borderStyle: 'solid',
|
|
@@ -97,24 +94,24 @@ const Center = /*#__PURE__*/(0, _styledComponents.default)('div').withConfig({
|
|
|
97
94
|
const WaffleGrid = _ref2 => {
|
|
98
95
|
let {
|
|
99
96
|
items,
|
|
100
|
-
rowSize =
|
|
97
|
+
rowSize = null,
|
|
101
98
|
LinkRouter,
|
|
102
99
|
tokens,
|
|
103
100
|
variant,
|
|
104
101
|
linkRouterProps,
|
|
105
102
|
...rest
|
|
106
103
|
} = _ref2;
|
|
107
|
-
const
|
|
104
|
+
const viewport = (0, _componentsBase.useViewport)();
|
|
105
|
+
const themeTokens = (0, _componentsBase.useThemeTokens)('WaffleGrid', tokens, variant, {
|
|
106
|
+
viewport
|
|
107
|
+
});
|
|
108
108
|
const currentRowSize = (0, _componentsBase.useResponsiveProp)(rowSize);
|
|
109
109
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Container, { ...selectProps(rest),
|
|
110
110
|
children: items.map(child => /*#__PURE__*/(0, _react.createElement)(Item, { ...themeTokens,
|
|
111
111
|
key: child.href,
|
|
112
|
-
rowSize: currentRowSize
|
|
112
|
+
rowSize: rowSize ? currentRowSize : themeTokens.rowSize
|
|
113
113
|
}, /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Link, {
|
|
114
114
|
href: child.href,
|
|
115
|
-
variant: {
|
|
116
|
-
alternative: true
|
|
117
|
-
},
|
|
118
115
|
LinkRouter: child.LinkRouter || LinkRouter,
|
|
119
116
|
linkRouterProps: { ...linkRouterProps,
|
|
120
117
|
...child.linkRouterProps
|
|
@@ -126,10 +123,13 @@ const WaffleGrid = _ref2 => {
|
|
|
126
123
|
(0, _jsxRuntime.jsx)(_Image.default, {
|
|
127
124
|
src: child.image,
|
|
128
125
|
alt: child.imageAltText,
|
|
129
|
-
width:
|
|
130
|
-
height:
|
|
126
|
+
width: 96,
|
|
127
|
+
height: 128
|
|
131
128
|
}) : // Otherwise it must be an arbitrary content, which we just display by itself
|
|
132
|
-
child.image, /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
129
|
+
child.image, /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
130
|
+
variant: {
|
|
131
|
+
weight: 'semibold'
|
|
132
|
+
},
|
|
133
133
|
children: child.text
|
|
134
134
|
})]
|
|
135
135
|
})
|
|
@@ -378,6 +378,29 @@ Autocomplete.propTypes = { ...selectedSystemPropTypes,
|
|
|
378
378
|
/**
|
|
379
379
|
* Input value for controlled usage
|
|
380
380
|
*/
|
|
381
|
-
value: PropTypes.string
|
|
381
|
+
value: PropTypes.string,
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Can be used to set the initial items of the component
|
|
385
|
+
*/
|
|
386
|
+
initialItems: PropTypes.arrayOf(PropTypes.shape({
|
|
387
|
+
id: PropTypes.string,
|
|
388
|
+
label: PropTypes.string
|
|
389
|
+
})),
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Initial value for the component
|
|
393
|
+
*/
|
|
394
|
+
initialValue: PropTypes.string,
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Boolean to set if it's readonly or not
|
|
398
|
+
*/
|
|
399
|
+
readOnly: PropTypes.bool,
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Use to visually mark an input as valid or invalid.
|
|
403
|
+
*/
|
|
404
|
+
validation: PropTypes.oneOf(['error', 'success'])
|
|
382
405
|
};
|
|
383
406
|
export default Autocomplete;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { selectSystemProps, Typography, getTokensPropType, useThemeTokens } from '@telus-uds/components-base';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
5
|
import { htmlAttrs, transformGradient } from '../utils';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Link, selectSystemProps, StackView, Typography, useThemeTokens, withLinkRouter, useViewport } from '@telus-uds/components-base';
|
|
3
|
+
import { Link, selectSystemProps, StackView, Typography, useThemeTokens, withLinkRouter, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { htmlAttrs, transformGradient } from '../utils';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -179,6 +179,15 @@ const BlockQuote = _ref8 => {
|
|
|
179
179
|
|
|
180
180
|
BlockQuote.propTypes = { ...selectedSystemPropTypes,
|
|
181
181
|
...withLinkRouter.propTypes,
|
|
182
|
+
tokens: getTokensPropType('BlockQuote'),
|
|
183
|
+
variant: PropTypes.exact({
|
|
184
|
+
alternative: PropTypes.bool,
|
|
185
|
+
size: PropTypes.string
|
|
186
|
+
}),
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Children nodes that can be added
|
|
190
|
+
*/
|
|
182
191
|
children: PropTypes.node.isRequired,
|
|
183
192
|
|
|
184
193
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { Icon, selectSystemProps, Typography, useThemeTokens } from '@telus-uds/components-base';
|
|
4
|
+
import { Icon, selectSystemProps, Typography, useThemeTokens, getTokensPropType } from '@telus-uds/components-base';
|
|
5
5
|
import { htmlAttrs } from '../utils';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -122,11 +122,16 @@ const Callout = _ref2 => {
|
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
Callout.propTypes = { ...selectedSystemPropTypes,
|
|
125
|
+
tokens: getTokensPropType('Callout'),
|
|
125
126
|
|
|
126
127
|
/**
|
|
127
128
|
* Icon to display on the left side of the Callout
|
|
128
129
|
*/
|
|
129
130
|
icon: PropTypes.elementType,
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Children nodes that can be added
|
|
134
|
+
*/
|
|
130
135
|
children: PropTypes.node.isRequired,
|
|
131
136
|
|
|
132
137
|
/**
|
|
@@ -95,6 +95,8 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
95
95
|
variant = {},
|
|
96
96
|
validation,
|
|
97
97
|
disabled,
|
|
98
|
+
prevTestID,
|
|
99
|
+
nextTestID,
|
|
98
100
|
...rest
|
|
99
101
|
} = _ref;
|
|
100
102
|
const [inputDate, setInputDate] = useState(date instanceof moment ? date : undefined);
|
|
@@ -208,7 +210,8 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
208
210
|
icon: previousIcon,
|
|
209
211
|
variant: {
|
|
210
212
|
size: 'small'
|
|
211
|
-
}
|
|
213
|
+
},
|
|
214
|
+
testID: prevTestID
|
|
212
215
|
});
|
|
213
216
|
};
|
|
214
217
|
|
|
@@ -223,7 +226,8 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
223
226
|
icon: nextIcon,
|
|
224
227
|
variant: {
|
|
225
228
|
size: 'small'
|
|
226
|
-
}
|
|
229
|
+
},
|
|
230
|
+
testID: nextTestID
|
|
227
231
|
});
|
|
228
232
|
};
|
|
229
233
|
|
|
@@ -394,7 +398,21 @@ DatePicker.propTypes = { ...selectedSystemPropTypes,
|
|
|
394
398
|
/**
|
|
395
399
|
* Disable the input which will not open the calendar picker
|
|
396
400
|
*/
|
|
397
|
-
disabled: PropTypes.bool
|
|
401
|
+
disabled: PropTypes.bool,
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* A unique identifier for the previous icon button located on the datepicker.
|
|
405
|
+
* This is for automation testing purposes.
|
|
406
|
+
* Will be added as a `data-testid-prev` attribute for example.
|
|
407
|
+
*/
|
|
408
|
+
prevTestID: PropTypes.string,
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* A unique identifier for the next icon button located on the datepicker.
|
|
412
|
+
* This is for automation testing purposes.
|
|
413
|
+
* Will be added as a `data-testid-next` attribute for example.
|
|
414
|
+
*/
|
|
415
|
+
nextTestID: PropTypes.string
|
|
398
416
|
};
|
|
399
417
|
DatePicker.defaultProps = {
|
|
400
418
|
copy: 'en',
|
|
@@ -408,6 +426,8 @@ DatePicker.defaultProps = {
|
|
|
408
426
|
tooltip: undefined,
|
|
409
427
|
onDateChange: () => {},
|
|
410
428
|
validation: undefined,
|
|
411
|
-
disabled: false
|
|
429
|
+
disabled: false,
|
|
430
|
+
prevTestID: '',
|
|
431
|
+
nextTestID: ''
|
|
412
432
|
};
|
|
413
433
|
export default DatePicker;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { ExpandCollapse } from '@telus-uds/components-base';
|
|
3
|
+
import { ExpandCollapse, getTokensPropType } from '@telus-uds/components-base';
|
|
4
4
|
import ExpandCollapseMiniControl from './ExpandCollapseMiniControl';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
@@ -57,10 +57,16 @@ ExpandCollapseMini.propTypes = { ...ExpandCollapseMiniControl.propTypes,
|
|
|
57
57
|
* ID for DOM element on web
|
|
58
58
|
*/
|
|
59
59
|
nativeID: PropTypes.string,
|
|
60
|
-
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Children nodes that can be added
|
|
63
|
+
*/
|
|
64
|
+
children: PropTypes.node.isRequired,
|
|
65
|
+
tokens: getTokensPropType('ExpandCollapseMini')
|
|
61
66
|
};
|
|
62
67
|
ExpandCollapseMini.defaultProps = {
|
|
63
68
|
onToggle: () => {},
|
|
69
|
+
tokens: {},
|
|
64
70
|
nativeID: ''
|
|
65
71
|
};
|
|
66
72
|
export default ExpandCollapseMini;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { ExpandCollapse, useThemeTokens, withLinkRouter, ListboxContext } from '@telus-uds/components-base';
|
|
4
|
+
import { ExpandCollapse, useThemeTokens, withLinkRouter, ListboxContext, getTokensPropType } from '@telus-uds/components-base';
|
|
5
5
|
import ListboxGroup from './ListboxGroup';
|
|
6
6
|
import ListboxItem from './ListboxItem';
|
|
7
7
|
import DropdownOverlay from './ListboxOverlay';
|
|
@@ -152,7 +152,13 @@ Listbox.propTypes = { ...withLinkRouter.propTypes,
|
|
|
152
152
|
/**
|
|
153
153
|
* To select an item by default
|
|
154
154
|
*/
|
|
155
|
-
selectedId: PropTypes.string
|
|
155
|
+
selectedId: PropTypes.string,
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* onClose event
|
|
159
|
+
*/
|
|
160
|
+
onClose: PropTypes.func,
|
|
161
|
+
tokens: getTokensPropType('Listbox')
|
|
156
162
|
};
|
|
157
163
|
Listbox.Overlay = DropdownOverlay;
|
|
158
164
|
export default Listbox;
|
|
@@ -201,11 +201,17 @@ NavigationBar.propTypes = { ...selectedSystemPropTypes,
|
|
|
201
201
|
/**
|
|
202
202
|
* Optional function to be called on pressing a link
|
|
203
203
|
*/
|
|
204
|
-
onChange: PropTypes.func
|
|
204
|
+
onChange: PropTypes.func,
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Accesibility role for stackview
|
|
208
|
+
*/
|
|
209
|
+
accessibilityRole: PropTypes.string
|
|
205
210
|
};
|
|
206
211
|
NavigationBar.defaultProps = {
|
|
207
212
|
heading: undefined,
|
|
208
213
|
headingLevel: 'h1',
|
|
209
|
-
onChange: () => {}
|
|
214
|
+
onChange: () => {},
|
|
215
|
+
accessibilityRole: ''
|
|
210
216
|
};
|
|
211
217
|
export default NavigationBar;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { selectSystemProps } from '@telus-uds/components-base';
|
|
4
|
+
import { selectSystemProps, variantProp } from '@telus-uds/components-base';
|
|
5
5
|
import { htmlAttrs } from '../utils';
|
|
6
6
|
import OrderedListBase from './OrderedListBase';
|
|
7
7
|
import Item from './Item';
|
|
@@ -62,10 +62,12 @@ OrderedList.propTypes = { ...selectedSystemPropTypes,
|
|
|
62
62
|
/**
|
|
63
63
|
* The position to start the list with.
|
|
64
64
|
*/
|
|
65
|
-
start: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
65
|
+
start: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
66
|
+
variant: variantProp.propType
|
|
66
67
|
};
|
|
67
68
|
OrderedList.defaultProps = {
|
|
68
|
-
start: 1
|
|
69
|
+
start: 1,
|
|
70
|
+
variant: {}
|
|
69
71
|
};
|
|
70
72
|
OrderedList.Item = Item;
|
|
71
73
|
export default OrderedList;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { selectSystemProps, Typography, useThemeTokens } from '@telus-uds/components-base';
|
|
3
|
+
import { selectSystemProps, Typography, useThemeTokens, getTokensPropType } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { htmlAttrs } from '../utils';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -213,6 +213,7 @@ Ribbon.propTypes = { ...selectedSystemPropTypes,
|
|
|
213
213
|
left: PropTypes.number,
|
|
214
214
|
|
|
215
215
|
/** sets the top offset (triggers absolute positioning) */
|
|
216
|
-
top: PropTypes.number
|
|
216
|
+
top: PropTypes.number,
|
|
217
|
+
tokens: getTokensPropType('Ribbon')
|
|
217
218
|
};
|
|
218
219
|
export default Ribbon;
|
|
@@ -2,7 +2,7 @@ var _withLinkRouter$propT, _withLinkRouter$propT2;
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import { ChevronLink, selectSystemProps, useThemeTokens, Typography, withLinkRouter, Spacer, useViewport } from '@telus-uds/components-base';
|
|
5
|
+
import { ChevronLink, selectSystemProps, useThemeTokens, Typography, withLinkRouter, Spacer, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
6
6
|
import styled, { keyframes, css } from 'styled-components';
|
|
7
7
|
import { htmlAttrs } from '../utils';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -161,6 +161,7 @@ Toast.propTypes = { ...selectedSystemPropTypes,
|
|
|
161
161
|
text: PropTypes.string.isRequired,
|
|
162
162
|
LinkRouter: (_withLinkRouter$propT = withLinkRouter.propTypes) === null || _withLinkRouter$propT === void 0 ? void 0 : _withLinkRouter$propT.LinkRouter,
|
|
163
163
|
linkRouterProps: (_withLinkRouter$propT2 = withLinkRouter.propTypes) === null || _withLinkRouter$propT2 === void 0 ? void 0 : _withLinkRouter$propT2.linkRouterProps
|
|
164
|
-
})
|
|
164
|
+
}),
|
|
165
|
+
tokens: getTokensPropType('Toast')
|
|
165
166
|
};
|
|
166
167
|
export default Toast;
|
|
@@ -2,7 +2,7 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import fscreen from 'fscreen';
|
|
5
|
-
import { useThemeTokens, selectSystemProps } from '@telus-uds/components-base';
|
|
5
|
+
import { useThemeTokens, selectSystemProps, getTokensPropType, variantProp } from '@telus-uds/components-base';
|
|
6
6
|
import Spinner from '../Spinner';
|
|
7
7
|
import { warn, htmlAttrs } from '../utils';
|
|
8
8
|
import VideoSplash from '../shared/VideoSplash/VideoSplash';
|
|
@@ -1025,7 +1025,9 @@ Video.propTypes = { ...selectedSystemPropTypes,
|
|
|
1025
1025
|
* The title of the video being rendered. This is used for analytics purposes in conjunction with `analyticsTracking`.
|
|
1026
1026
|
* @since 1.3.0
|
|
1027
1027
|
*/
|
|
1028
|
-
videoTitle: PropTypes.string
|
|
1028
|
+
videoTitle: PropTypes.string,
|
|
1029
|
+
tokens: getTokensPropType('Video'),
|
|
1030
|
+
variant: variantProp.propType
|
|
1029
1031
|
};
|
|
1030
1032
|
Video.defaultProps = {
|
|
1031
1033
|
tracks: undefined,
|