@telus-uds/components-base 1.51.0 → 1.51.1
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 +11 -3
- package/component-docs.json +54 -38
- package/lib/A11yText/index.js +8 -0
- package/lib/Divider/Divider.js +4 -0
- package/lib/IconButton/IconButton.js +16 -0
- package/lib/Link/ChevronLink.js +4 -0
- package/lib/Modal/Modal.js +16 -0
- package/lib/Pagination/PageButton.js +12 -0
- package/lib/Pagination/Pagination.js +12 -0
- package/lib/QuickLinks/QuickLinks.js +12 -0
- package/lib/Responsive/Responsive.js +7 -0
- package/lib/Select/Group.js +4 -0
- package/lib/Select/Group.native.js +4 -0
- package/lib/Select/Item.js +4 -0
- package/lib/SideNav/ItemsGroup.js +4 -0
- package/lib/SideNav/SideNav.js +8 -0
- package/lib/StepTracker/StepTracker.js +16 -0
- package/lib/Tabs/Tabs.js +20 -0
- package/lib-module/A11yText/index.js +8 -0
- package/lib-module/Divider/Divider.js +4 -0
- package/lib-module/IconButton/IconButton.js +16 -0
- package/lib-module/Link/ChevronLink.js +4 -0
- package/lib-module/Modal/Modal.js +16 -0
- package/lib-module/Pagination/PageButton.js +12 -0
- package/lib-module/Pagination/Pagination.js +12 -0
- package/lib-module/QuickLinks/QuickLinks.js +12 -0
- package/lib-module/Responsive/Responsive.js +7 -0
- package/lib-module/Select/Group.js +4 -0
- package/lib-module/Select/Group.native.js +4 -0
- package/lib-module/Select/Item.js +4 -0
- package/lib-module/SideNav/ItemsGroup.js +4 -0
- package/lib-module/SideNav/SideNav.js +8 -0
- package/lib-module/StepTracker/StepTracker.js +16 -0
- package/lib-module/Tabs/Tabs.js +20 -0
- package/package.json +2 -2
- package/src/A11yText/index.jsx +6 -0
- package/src/Divider/Divider.jsx +3 -0
- package/src/IconButton/IconButton.jsx +12 -0
- package/src/Link/ChevronLink.jsx +3 -0
- package/src/Modal/Modal.jsx +12 -0
- package/src/Pagination/PageButton.jsx +9 -0
- package/src/Pagination/Pagination.jsx +9 -0
- package/src/QuickLinks/QuickLinks.jsx +9 -0
- package/src/Responsive/Responsive.jsx +6 -0
- package/src/Select/Group.jsx +3 -0
- package/src/Select/Group.native.jsx +3 -0
- package/src/Select/Item.jsx +3 -0
- package/src/SideNav/ItemsGroup.jsx +3 -0
- package/src/SideNav/SideNav.jsx +6 -0
- package/src/StepTracker/StepTracker.jsx +12 -0
- package/src/Tabs/Tabs.jsx +15 -0
package/lib/Tabs/Tabs.js
CHANGED
|
@@ -154,6 +154,10 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
154
154
|
Tabs.displayName = 'Tabs';
|
|
155
155
|
Tabs.propTypes = { ...selectedSystemPropTypes,
|
|
156
156
|
..._utils.withLinkRouter.PropTypes,
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Array of `TabsItem`s
|
|
160
|
+
*/
|
|
157
161
|
items: _propTypes.default.arrayOf(_propTypes.default.shape({ ...selectedItemPropTypes,
|
|
158
162
|
..._utils.withLinkRouter.PropTypes,
|
|
159
163
|
href: _propTypes.default.string,
|
|
@@ -161,11 +165,27 @@ Tabs.propTypes = { ...selectedSystemPropTypes,
|
|
|
161
165
|
id: _propTypes.default.string,
|
|
162
166
|
ref: _airbnbPropTypes.default.ref()
|
|
163
167
|
})),
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* `id` property of the current tab in the items array
|
|
171
|
+
*/
|
|
164
172
|
value: _propTypes.default.string,
|
|
165
173
|
initialValue: _propTypes.default.string,
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Callback for when the selected tab changes
|
|
177
|
+
*/
|
|
166
178
|
onChange: _propTypes.default.func,
|
|
167
179
|
tokens: (0, _utils.getTokensPropType)('Tabs'),
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Custom tokens for `TabsItem`
|
|
183
|
+
*/
|
|
168
184
|
itemTokens: (0, _utils.getTokensPropType)('TabsItem'),
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Custom tokens for `HorizontalScrollButton`
|
|
188
|
+
*/
|
|
169
189
|
scrollButtonTokens: (0, _utils.getTokensPropType)('HorizontalScrollButton'),
|
|
170
190
|
variant: _utils.variantProp.propType
|
|
171
191
|
};
|
|
@@ -37,7 +37,15 @@ const A11yText = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
37
37
|
});
|
|
38
38
|
A11yText.displayName = 'A11yText';
|
|
39
39
|
A11yText.propTypes = { ...selectedSystemPropTypes,
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Text to be read by screen readers
|
|
43
|
+
*/
|
|
40
44
|
text: PropTypes.string.isRequired,
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Whether text should be rendered as a heading
|
|
48
|
+
*/
|
|
41
49
|
heading: PropTypes.bool
|
|
42
50
|
};
|
|
43
51
|
const styles = StyleSheet.create({
|
|
@@ -110,6 +110,10 @@ const Divider = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
110
110
|
Divider.displayName = 'Divider';
|
|
111
111
|
Divider.propTypes = { ...selectedSystemPropTypes,
|
|
112
112
|
tokens: getTokensPropType('Divider'),
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* A number referring to a position on the space scale to create space on either side of the divider
|
|
116
|
+
*/
|
|
113
117
|
space: spacingProps.types.spacingValue,
|
|
114
118
|
variant: variantProp.propType,
|
|
115
119
|
|
|
@@ -120,9 +120,25 @@ IconButton.displayName = 'IconButton';
|
|
|
120
120
|
IconButton.propTypes = { ...selectedSystemPropTypes,
|
|
121
121
|
variant: variantProp.propType,
|
|
122
122
|
tokens: getTokensPropType('IconButton'),
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Defines the icon to be rendered
|
|
126
|
+
*/
|
|
123
127
|
icon: PropTypes.elementType.isRequired,
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* URL to navigate to when the `Iconbutton` is pressed
|
|
131
|
+
*/
|
|
124
132
|
href: PropTypes.string,
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* URL options to navigate to when the `Iconbutton` is pressed
|
|
136
|
+
*/
|
|
125
137
|
hrefAttrs: PropTypes.shape(hrefAttrsProp.types),
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Function to execute when the `Iconbutton` is pressed
|
|
141
|
+
*/
|
|
126
142
|
onPress: PropTypes.func
|
|
127
143
|
};
|
|
128
144
|
const staticStyles = StyleSheet.create({
|
|
@@ -52,6 +52,10 @@ const ChevronLink = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
52
52
|
ChevronLink.displayName = 'ChevronLink';
|
|
53
53
|
ChevronLink.propTypes = { ...LinkBase.propTypes,
|
|
54
54
|
tokens: getTokensPropType('ChevronLink', 'Link'),
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Changes direction of chevron icon
|
|
58
|
+
*/
|
|
55
59
|
direction: PropTypes.oneOf(['left', 'right'])
|
|
56
60
|
};
|
|
57
61
|
export default ChevronLink;
|
|
@@ -174,9 +174,25 @@ const Modal = /*#__PURE__*/forwardRef((_ref5, ref) => {
|
|
|
174
174
|
Modal.displayName = 'Modal';
|
|
175
175
|
Modal.propTypes = { ...selectedSystemPropTypes,
|
|
176
176
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* To define the locale of the copy
|
|
180
|
+
*/
|
|
177
181
|
copy: copyPropTypes,
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Setting this to `true` will open the `Modal`
|
|
185
|
+
*/
|
|
178
186
|
isOpen: PropTypes.bool,
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* This function is triggered when the `Modal` is closed
|
|
190
|
+
*/
|
|
179
191
|
onClose: PropTypes.func,
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* `max-width` is applied to the `Modal` container
|
|
195
|
+
*/
|
|
180
196
|
maxWidth: PropTypes.bool,
|
|
181
197
|
tokens: getTokensPropType('Modal'),
|
|
182
198
|
variant: variantProp.propType,
|
|
@@ -57,8 +57,20 @@ const PageButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
57
57
|
});
|
|
58
58
|
PageButton.displayName = 'PageButton';
|
|
59
59
|
PageButton.propTypes = { ...linkProps.types,
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* To set custom label for the button
|
|
63
|
+
*/
|
|
60
64
|
label: PropTypes.string,
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* To set `PageButton` to active state
|
|
68
|
+
*/
|
|
61
69
|
isActive: PropTypes.bool,
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* To change the language for labels
|
|
73
|
+
*/
|
|
62
74
|
copy: copyPropTypes,
|
|
63
75
|
variant: variantProp.propType,
|
|
64
76
|
tokens: getTokensPropType('PaginationPageButton')
|
|
@@ -183,10 +183,22 @@ Pagination.PageButton = PageButton;
|
|
|
183
183
|
Pagination.propTypes = { ...selectedSystemPropTypes,
|
|
184
184
|
...withLinkRouter.propTypes,
|
|
185
185
|
children: componentPropType('PageButton'),
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* To change the language for labels
|
|
189
|
+
*/
|
|
186
190
|
copy: copyPropTypes,
|
|
187
191
|
variant: variantProp.propType,
|
|
188
192
|
tokens: getTokensPropType('Pagination'),
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* When passed as `{{ compact: true }}`, `Pagination` does not render labels along side buttons
|
|
196
|
+
*/
|
|
189
197
|
sideButtonVariant: variantProp.propType,
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Custom tokens for `PaginationSideButton`
|
|
201
|
+
*/
|
|
190
202
|
sideButtonTokens: getTokensPropType('PaginationSideButton')
|
|
191
203
|
};
|
|
192
204
|
const staticStyles = StyleSheet.create({
|
|
@@ -62,8 +62,20 @@ const QuickLinks = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
62
62
|
QuickLinks.displayName = 'QuickLinks';
|
|
63
63
|
QuickLinks.propTypes = {
|
|
64
64
|
tokens: getTokensPropType('QuickLinks'),
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Custom tokens override for `Card`
|
|
68
|
+
*/
|
|
65
69
|
cardTokens: getTokensPropType('Card'),
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Custom tokens override for `QuickLinksList`
|
|
73
|
+
*/
|
|
66
74
|
listTokens: getTokensPropType('QuickLinksList'),
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The HTML tag to render the list as
|
|
78
|
+
*/
|
|
67
79
|
tag: PropTypes.string,
|
|
68
80
|
variant: variantProp.propType,
|
|
69
81
|
children: PropTypes.node
|
|
@@ -38,7 +38,14 @@ const Responsive = _ref => {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
Responsive.propTypes = {
|
|
41
|
+
/**
|
|
42
|
+
* To hide children of `Responsive` if the current viewport is smaller than `min`
|
|
43
|
+
*/
|
|
41
44
|
min: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* To hide children of `Responsive` if the current viewport is larger than `max`
|
|
48
|
+
*/
|
|
42
49
|
max: PropTypes.oneOf(['sm', 'md', 'lg', 'xl']),
|
|
43
50
|
children: PropTypes.node.isRequired
|
|
44
51
|
};
|
|
@@ -122,6 +122,10 @@ ItemsGroup.propTypes = {
|
|
|
122
122
|
isActive: PropTypes.bool,
|
|
123
123
|
variant: variantProp.propType,
|
|
124
124
|
tokens: getTokensPropType('SideNavItemsGroup'),
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Custom tokens for `SideNav.Item`
|
|
128
|
+
*/
|
|
125
129
|
itemTokens: getTokensPropType('SideNavItem')
|
|
126
130
|
};
|
|
127
131
|
export default ItemsGroup;
|
|
@@ -128,7 +128,15 @@ SideNav.propTypes = { ...selectedSystemPropTypes,
|
|
|
128
128
|
accordion: PropTypes.bool,
|
|
129
129
|
variant: variantProp.propType,
|
|
130
130
|
tokens: getTokensPropType('SideNav'),
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Custom tokens for `SideNav.Item`
|
|
134
|
+
*/
|
|
131
135
|
itemTokens: getTokensPropType('SideNavItem'),
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Custom tokens for `SideNavItemsGroup`
|
|
139
|
+
*/
|
|
132
140
|
groupTokens: getTokensPropType('SideNavItemsGroup')
|
|
133
141
|
};
|
|
134
142
|
SideNav.Item = Item;
|
|
@@ -168,12 +168,28 @@ const dictionaryContentShape = PropTypes.shape({
|
|
|
168
168
|
stepTrackerLabel: PropTypes.string.isRequired
|
|
169
169
|
});
|
|
170
170
|
StepTracker.propTypes = { ...selectedSystemPropTypes,
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The current step, 0-based number
|
|
174
|
+
*/
|
|
171
175
|
current: PropTypes.number,
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The language to use for the labels
|
|
179
|
+
*/
|
|
172
180
|
copy: PropTypes.oneOfType([PropTypes.oneOf(['en', 'fr']), dictionaryContentShape]),
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Custom dictionary containing the labels to use for the steps
|
|
184
|
+
*/
|
|
173
185
|
dictionary: PropTypes.shape({
|
|
174
186
|
en: dictionaryContentShape,
|
|
175
187
|
fr: dictionaryContentShape
|
|
176
188
|
}),
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* An array of strings defining the step titles
|
|
192
|
+
*/
|
|
177
193
|
steps: PropTypes.arrayOf(PropTypes.string),
|
|
178
194
|
tokens: getTokensPropType('StepTracker'),
|
|
179
195
|
variant: variantProp.propType
|
package/lib-module/Tabs/Tabs.js
CHANGED
|
@@ -132,6 +132,10 @@ const Tabs = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
132
132
|
Tabs.displayName = 'Tabs';
|
|
133
133
|
Tabs.propTypes = { ...selectedSystemPropTypes,
|
|
134
134
|
...withLinkRouter.PropTypes,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Array of `TabsItem`s
|
|
138
|
+
*/
|
|
135
139
|
items: PropTypes.arrayOf(PropTypes.shape({ ...selectedItemPropTypes,
|
|
136
140
|
...withLinkRouter.PropTypes,
|
|
137
141
|
href: PropTypes.string,
|
|
@@ -139,11 +143,27 @@ Tabs.propTypes = { ...selectedSystemPropTypes,
|
|
|
139
143
|
id: PropTypes.string,
|
|
140
144
|
ref: ABBPropTypes.ref()
|
|
141
145
|
})),
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* `id` property of the current tab in the items array
|
|
149
|
+
*/
|
|
142
150
|
value: PropTypes.string,
|
|
143
151
|
initialValue: PropTypes.string,
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Callback for when the selected tab changes
|
|
155
|
+
*/
|
|
144
156
|
onChange: PropTypes.func,
|
|
145
157
|
tokens: getTokensPropType('Tabs'),
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Custom tokens for `TabsItem`
|
|
161
|
+
*/
|
|
146
162
|
itemTokens: getTokensPropType('TabsItem'),
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Custom tokens for `HorizontalScrollButton`
|
|
166
|
+
*/
|
|
147
167
|
scrollButtonTokens: getTokensPropType('HorizontalScrollButton'),
|
|
148
168
|
variant: variantProp.propType
|
|
149
169
|
};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@floating-ui/react-native": "^0.8.1",
|
|
12
12
|
"@gorhom/portal": "^1.0.14",
|
|
13
13
|
"@telus-uds/system-constants": "^1.2.1",
|
|
14
|
-
"@telus-uds/system-theme-tokens": "^2.
|
|
14
|
+
"@telus-uds/system-theme-tokens": "^2.34.0",
|
|
15
15
|
"airbnb-prop-types": "^2.16.0",
|
|
16
16
|
"lodash.debounce": "^4.0.8",
|
|
17
17
|
"lodash.merge": "^4.6.2",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"standard-engine": {
|
|
73
73
|
"skip": true
|
|
74
74
|
},
|
|
75
|
-
"version": "1.51.
|
|
75
|
+
"version": "1.51.1"
|
|
76
76
|
}
|
package/src/A11yText/index.jsx
CHANGED
|
@@ -31,7 +31,13 @@ A11yText.displayName = 'A11yText'
|
|
|
31
31
|
|
|
32
32
|
A11yText.propTypes = {
|
|
33
33
|
...selectedSystemPropTypes,
|
|
34
|
+
/**
|
|
35
|
+
* Text to be read by screen readers
|
|
36
|
+
*/
|
|
34
37
|
text: PropTypes.string.isRequired,
|
|
38
|
+
/**
|
|
39
|
+
* Whether text should be rendered as a heading
|
|
40
|
+
*/
|
|
35
41
|
heading: PropTypes.bool
|
|
36
42
|
}
|
|
37
43
|
|
package/src/Divider/Divider.jsx
CHANGED
|
@@ -101,6 +101,9 @@ Divider.displayName = 'Divider'
|
|
|
101
101
|
Divider.propTypes = {
|
|
102
102
|
...selectedSystemPropTypes,
|
|
103
103
|
tokens: getTokensPropType('Divider'),
|
|
104
|
+
/**
|
|
105
|
+
* A number referring to a position on the space scale to create space on either side of the divider
|
|
106
|
+
*/
|
|
104
107
|
space: spacingProps.types.spacingValue,
|
|
105
108
|
variant: variantProp.propType,
|
|
106
109
|
/**
|
|
@@ -108,9 +108,21 @@ IconButton.propTypes = {
|
|
|
108
108
|
...selectedSystemPropTypes,
|
|
109
109
|
variant: variantProp.propType,
|
|
110
110
|
tokens: getTokensPropType('IconButton'),
|
|
111
|
+
/**
|
|
112
|
+
* Defines the icon to be rendered
|
|
113
|
+
*/
|
|
111
114
|
icon: PropTypes.elementType.isRequired,
|
|
115
|
+
/**
|
|
116
|
+
* URL to navigate to when the `Iconbutton` is pressed
|
|
117
|
+
*/
|
|
112
118
|
href: PropTypes.string,
|
|
119
|
+
/**
|
|
120
|
+
* URL options to navigate to when the `Iconbutton` is pressed
|
|
121
|
+
*/
|
|
113
122
|
hrefAttrs: PropTypes.shape(hrefAttrsProp.types),
|
|
123
|
+
/**
|
|
124
|
+
* Function to execute when the `Iconbutton` is pressed
|
|
125
|
+
*/
|
|
114
126
|
onPress: PropTypes.func
|
|
115
127
|
}
|
|
116
128
|
|
package/src/Link/ChevronLink.jsx
CHANGED
package/src/Modal/Modal.jsx
CHANGED
|
@@ -161,9 +161,21 @@ Modal.displayName = 'Modal'
|
|
|
161
161
|
Modal.propTypes = {
|
|
162
162
|
...selectedSystemPropTypes,
|
|
163
163
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
|
164
|
+
/**
|
|
165
|
+
* To define the locale of the copy
|
|
166
|
+
*/
|
|
164
167
|
copy: copyPropTypes,
|
|
168
|
+
/**
|
|
169
|
+
* Setting this to `true` will open the `Modal`
|
|
170
|
+
*/
|
|
165
171
|
isOpen: PropTypes.bool,
|
|
172
|
+
/**
|
|
173
|
+
* This function is triggered when the `Modal` is closed
|
|
174
|
+
*/
|
|
166
175
|
onClose: PropTypes.func,
|
|
176
|
+
/**
|
|
177
|
+
* `max-width` is applied to the `Modal` container
|
|
178
|
+
*/
|
|
167
179
|
maxWidth: PropTypes.bool,
|
|
168
180
|
tokens: getTokensPropType('Modal'),
|
|
169
181
|
variant: variantProp.propType,
|
|
@@ -60,8 +60,17 @@ PageButton.displayName = 'PageButton'
|
|
|
60
60
|
|
|
61
61
|
PageButton.propTypes = {
|
|
62
62
|
...linkProps.types,
|
|
63
|
+
/**
|
|
64
|
+
* To set custom label for the button
|
|
65
|
+
*/
|
|
63
66
|
label: PropTypes.string,
|
|
67
|
+
/**
|
|
68
|
+
* To set `PageButton` to active state
|
|
69
|
+
*/
|
|
64
70
|
isActive: PropTypes.bool,
|
|
71
|
+
/**
|
|
72
|
+
* To change the language for labels
|
|
73
|
+
*/
|
|
65
74
|
copy: copyPropTypes,
|
|
66
75
|
variant: variantProp.propType,
|
|
67
76
|
tokens: getTokensPropType('PaginationPageButton')
|
|
@@ -207,10 +207,19 @@ Pagination.propTypes = {
|
|
|
207
207
|
...selectedSystemPropTypes,
|
|
208
208
|
...withLinkRouter.propTypes,
|
|
209
209
|
children: componentPropType('PageButton'),
|
|
210
|
+
/**
|
|
211
|
+
* To change the language for labels
|
|
212
|
+
*/
|
|
210
213
|
copy: copyPropTypes,
|
|
211
214
|
variant: variantProp.propType,
|
|
212
215
|
tokens: getTokensPropType('Pagination'),
|
|
216
|
+
/**
|
|
217
|
+
* When passed as `{{ compact: true }}`, `Pagination` does not render labels along side buttons
|
|
218
|
+
*/
|
|
213
219
|
sideButtonVariant: variantProp.propType,
|
|
220
|
+
/**
|
|
221
|
+
* Custom tokens for `PaginationSideButton`
|
|
222
|
+
*/
|
|
214
223
|
sideButtonTokens: getTokensPropType('PaginationSideButton')
|
|
215
224
|
}
|
|
216
225
|
|
|
@@ -51,8 +51,17 @@ QuickLinks.displayName = 'QuickLinks'
|
|
|
51
51
|
|
|
52
52
|
QuickLinks.propTypes = {
|
|
53
53
|
tokens: getTokensPropType('QuickLinks'),
|
|
54
|
+
/**
|
|
55
|
+
* Custom tokens override for `Card`
|
|
56
|
+
*/
|
|
54
57
|
cardTokens: getTokensPropType('Card'),
|
|
58
|
+
/**
|
|
59
|
+
* Custom tokens override for `QuickLinksList`
|
|
60
|
+
*/
|
|
55
61
|
listTokens: getTokensPropType('QuickLinksList'),
|
|
62
|
+
/**
|
|
63
|
+
* The HTML tag to render the list as
|
|
64
|
+
*/
|
|
56
65
|
tag: PropTypes.string,
|
|
57
66
|
variant: variantProp.propType,
|
|
58
67
|
children: PropTypes.node
|
|
@@ -25,7 +25,13 @@ const Responsive = ({ min = 'xs', max, children }) => {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
Responsive.propTypes = {
|
|
28
|
+
/**
|
|
29
|
+
* To hide children of `Responsive` if the current viewport is smaller than `min`
|
|
30
|
+
*/
|
|
28
31
|
min: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
|
|
32
|
+
/**
|
|
33
|
+
* To hide children of `Responsive` if the current viewport is larger than `max`
|
|
34
|
+
*/
|
|
29
35
|
max: PropTypes.oneOf(['sm', 'md', 'lg', 'xl']),
|
|
30
36
|
children: PropTypes.node.isRequired
|
|
31
37
|
}
|
package/src/Select/Group.jsx
CHANGED
package/src/Select/Item.jsx
CHANGED
|
@@ -109,6 +109,9 @@ ItemsGroup.propTypes = {
|
|
|
109
109
|
isActive: PropTypes.bool,
|
|
110
110
|
variant: variantProp.propType,
|
|
111
111
|
tokens: getTokensPropType('SideNavItemsGroup'),
|
|
112
|
+
/**
|
|
113
|
+
* Custom tokens for `SideNav.Item`
|
|
114
|
+
*/
|
|
112
115
|
itemTokens: getTokensPropType('SideNavItem')
|
|
113
116
|
}
|
|
114
117
|
|
package/src/SideNav/SideNav.jsx
CHANGED
|
@@ -120,7 +120,13 @@ SideNav.propTypes = {
|
|
|
120
120
|
accordion: PropTypes.bool,
|
|
121
121
|
variant: variantProp.propType,
|
|
122
122
|
tokens: getTokensPropType('SideNav'),
|
|
123
|
+
/**
|
|
124
|
+
* Custom tokens for `SideNav.Item`
|
|
125
|
+
*/
|
|
123
126
|
itemTokens: getTokensPropType('SideNavItem'),
|
|
127
|
+
/**
|
|
128
|
+
* Custom tokens for `SideNavItemsGroup`
|
|
129
|
+
*/
|
|
124
130
|
groupTokens: getTokensPropType('SideNavItemsGroup')
|
|
125
131
|
}
|
|
126
132
|
|
|
@@ -173,12 +173,24 @@ const dictionaryContentShape = PropTypes.shape({
|
|
|
173
173
|
|
|
174
174
|
StepTracker.propTypes = {
|
|
175
175
|
...selectedSystemPropTypes,
|
|
176
|
+
/**
|
|
177
|
+
* The current step, 0-based number
|
|
178
|
+
*/
|
|
176
179
|
current: PropTypes.number,
|
|
180
|
+
/**
|
|
181
|
+
* The language to use for the labels
|
|
182
|
+
*/
|
|
177
183
|
copy: PropTypes.oneOfType([PropTypes.oneOf(['en', 'fr']), dictionaryContentShape]),
|
|
184
|
+
/**
|
|
185
|
+
* Custom dictionary containing the labels to use for the steps
|
|
186
|
+
*/
|
|
178
187
|
dictionary: PropTypes.shape({
|
|
179
188
|
en: dictionaryContentShape,
|
|
180
189
|
fr: dictionaryContentShape
|
|
181
190
|
}),
|
|
191
|
+
/**
|
|
192
|
+
* An array of strings defining the step titles
|
|
193
|
+
*/
|
|
182
194
|
steps: PropTypes.arrayOf(PropTypes.string),
|
|
183
195
|
tokens: getTokensPropType('StepTracker'),
|
|
184
196
|
variant: variantProp.propType
|
package/src/Tabs/Tabs.jsx
CHANGED
|
@@ -154,6 +154,9 @@ Tabs.displayName = 'Tabs'
|
|
|
154
154
|
Tabs.propTypes = {
|
|
155
155
|
...selectedSystemPropTypes,
|
|
156
156
|
...withLinkRouter.PropTypes,
|
|
157
|
+
/**
|
|
158
|
+
* Array of `TabsItem`s
|
|
159
|
+
*/
|
|
157
160
|
items: PropTypes.arrayOf(
|
|
158
161
|
PropTypes.shape({
|
|
159
162
|
...selectedItemPropTypes,
|
|
@@ -164,11 +167,23 @@ Tabs.propTypes = {
|
|
|
164
167
|
ref: ABBPropTypes.ref()
|
|
165
168
|
})
|
|
166
169
|
),
|
|
170
|
+
/**
|
|
171
|
+
* `id` property of the current tab in the items array
|
|
172
|
+
*/
|
|
167
173
|
value: PropTypes.string,
|
|
168
174
|
initialValue: PropTypes.string,
|
|
175
|
+
/**
|
|
176
|
+
* Callback for when the selected tab changes
|
|
177
|
+
*/
|
|
169
178
|
onChange: PropTypes.func,
|
|
170
179
|
tokens: getTokensPropType('Tabs'),
|
|
180
|
+
/**
|
|
181
|
+
* Custom tokens for `TabsItem`
|
|
182
|
+
*/
|
|
171
183
|
itemTokens: getTokensPropType('TabsItem'),
|
|
184
|
+
/**
|
|
185
|
+
* Custom tokens for `HorizontalScrollButton`
|
|
186
|
+
*/
|
|
172
187
|
scrollButtonTokens: getTokensPropType('HorizontalScrollButton'),
|
|
173
188
|
variant: variantProp.propType
|
|
174
189
|
}
|