@telus-uds/components-web 2.9.0 → 2.10.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 +13 -2
- package/component-docs.json +82 -81
- package/lib/BlockQuote/BlockQuote.js +49 -4
- package/lib/Callout/Callout.js +12 -0
- package/lib/DatePicker/CalendarContainer.js +24 -0
- package/lib/DatePicker/DatePicker.js +8 -2
- package/lib/Disclaimer/Disclaimer.js +0 -4
- package/lib/ExpandCollapseMini/ExpandCollapseMini.js +4 -0
- package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +16 -0
- package/lib/IconButton/IconButton.js +8 -0
- package/lib/Listbox/Listbox.js +8 -0
- package/lib/NavigationBar/NavigationBar.js +4 -0
- package/lib/OrderedList/Item.js +4 -0
- package/lib/Paragraph/Paragraph.js +4 -0
- package/lib/PreviewCard/AuthorDate.js +7 -0
- package/lib/PriceLockup/PriceLockup.js +48 -0
- package/lib/QuantitySelector/QuantitySelector.js +51 -0
- package/lib/Span/Span.js +4 -0
- package/lib/Table/Table.js +4 -0
- package/lib/Toast/Toast.js +16 -0
- package/lib-module/BlockQuote/BlockQuote.js +50 -5
- package/lib-module/Callout/Callout.js +12 -0
- package/lib-module/DatePicker/CalendarContainer.js +24 -0
- package/lib-module/DatePicker/DatePicker.js +8 -2
- package/lib-module/Disclaimer/Disclaimer.js +0 -4
- package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +4 -0
- package/lib-module/ExpandCollapseMini/ExpandCollapseMiniControl.js +16 -0
- package/lib-module/IconButton/IconButton.js +8 -0
- package/lib-module/Listbox/Listbox.js +8 -0
- package/lib-module/NavigationBar/NavigationBar.js +4 -0
- package/lib-module/OrderedList/Item.js +4 -0
- package/lib-module/Paragraph/Paragraph.js +4 -0
- package/lib-module/PreviewCard/AuthorDate.js +7 -0
- package/lib-module/PriceLockup/PriceLockup.js +48 -0
- package/lib-module/QuantitySelector/QuantitySelector.js +51 -0
- package/lib-module/Span/Span.js +4 -0
- package/lib-module/Table/Table.js +4 -0
- package/lib-module/Toast/Toast.js +16 -0
- package/package.json +3 -3
- package/src/BlockQuote/BlockQuote.jsx +53 -6
- package/src/Callout/Callout.jsx +9 -0
- package/src/DatePicker/CalendarContainer.jsx +24 -0
- package/src/DatePicker/DatePicker.jsx +8 -2
- package/src/Disclaimer/Disclaimer.jsx +0 -3
- package/src/ExpandCollapseMini/ExpandCollapseMini.jsx +3 -0
- package/src/ExpandCollapseMini/ExpandCollapseMiniControl.jsx +12 -0
- package/src/IconButton/IconButton.jsx +6 -0
- package/src/Listbox/Listbox.jsx +6 -0
- package/src/NavigationBar/NavigationBar.jsx +3 -0
- package/src/OrderedList/Item.jsx +3 -0
- package/src/Paragraph/Paragraph.jsx +3 -0
- package/src/PreviewCard/AuthorDate.jsx +6 -0
- package/src/PriceLockup/PriceLockup.jsx +37 -0
- package/src/QuantitySelector/QuantitySelector.jsx +39 -0
- package/src/Span/Span.jsx +3 -0
- package/src/Table/Table.jsx +3 -0
- package/src/Toast/Toast.jsx +12 -0
|
@@ -50,6 +50,10 @@ const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
50
50
|
});
|
|
51
51
|
ExpandCollapseMini.displayName = 'ExpandCollapseMini';
|
|
52
52
|
ExpandCollapseMini.propTypes = { ...ExpandCollapseMiniControl.propTypes,
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Function to call on pressing the panel's control, which should open or close the panel.
|
|
56
|
+
*/
|
|
53
57
|
onToggle: PropTypes.func,
|
|
54
58
|
children: PropTypes.node.isRequired
|
|
55
59
|
};
|
|
@@ -71,9 +71,25 @@ const ExpandCollapseMiniControl = _ref => {
|
|
|
71
71
|
|
|
72
72
|
ExpandCollapseMiniControl.propTypes = { ...selectedSystemPropTypes,
|
|
73
73
|
...Link.propTypes,
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Optional function to call on pressing the panel's control, in addition to opening or closing the panel
|
|
77
|
+
*/
|
|
74
78
|
onPress: PropTypes.func,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* ExpandCollapseMiniControl title when expanded
|
|
82
|
+
*/
|
|
75
83
|
expandTitle: PropTypes.string.isRequired,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* ExpandCollapseMiniControl title when collapsed
|
|
87
|
+
*/
|
|
76
88
|
collapseTitle: PropTypes.string.isRequired,
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* React Native's `Pressable`'s state object
|
|
92
|
+
*/
|
|
77
93
|
pressableState: PropTypes.object,
|
|
78
94
|
variant: PropTypes.object
|
|
79
95
|
};
|
|
@@ -42,8 +42,16 @@ const propsWithoutIcon = _ref2 => {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
IconButton.propTypes = { ...propsWithoutIcon(IconButtonBase.propTypes),
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* To set the icon to a multi-brand compatabile icon
|
|
48
|
+
*/
|
|
45
49
|
// eslint-disable-next-line react/require-default-props
|
|
46
50
|
action: PropTypes.oneOf(multiBrandIconNames),
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* To set a custom icon
|
|
54
|
+
*/
|
|
47
55
|
icon: PropTypes.func
|
|
48
56
|
};
|
|
49
57
|
IconButton.defaultProps = {
|
|
@@ -135,7 +135,15 @@ Listbox.propTypes = { ...withLinkRouter.propTypes,
|
|
|
135
135
|
* the last menu item.
|
|
136
136
|
*/
|
|
137
137
|
parentRef: PropTypes.object,
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* `Listbox` items
|
|
141
|
+
*/
|
|
138
142
|
items: PropTypes.array,
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* To select an item by default
|
|
146
|
+
*/
|
|
139
147
|
selectedId: PropTypes.string
|
|
140
148
|
};
|
|
141
149
|
Listbox.Overlay = DropdownOverlay;
|
|
@@ -187,6 +187,10 @@ NavigationBar.propTypes = { ...selectedSystemPropTypes,
|
|
|
187
187
|
* Common navigation bar heading.
|
|
188
188
|
*/
|
|
189
189
|
heading: PropTypes.string,
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Sets the `headingLevel` of the `heading`
|
|
193
|
+
*/
|
|
190
194
|
headingLevel: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']),
|
|
191
195
|
|
|
192
196
|
/**
|
|
@@ -47,7 +47,14 @@ const AuthorDate = _ref => {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
AuthorDate.propTypes = {
|
|
50
|
+
/**
|
|
51
|
+
* Name of the author
|
|
52
|
+
*/
|
|
50
53
|
author: PropTypes.string.isRequired,
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Date of the post
|
|
57
|
+
*/
|
|
51
58
|
date: PropTypes.string.isRequired
|
|
52
59
|
};
|
|
53
60
|
export default AuthorDate;
|
|
@@ -235,16 +235,64 @@ const PriceLockup = _ref12 => {
|
|
|
235
235
|
};
|
|
236
236
|
|
|
237
237
|
PriceLockup.propTypes = { ...selectedSystemPropTypes,
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Size of the component
|
|
241
|
+
*
|
|
242
|
+
* Small for pricing in product catalogue pages, medium for pricing in product comparison cards and large for pricing in banners and promo cards
|
|
243
|
+
*/
|
|
238
244
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* If currency symbol other than `$` to be used
|
|
248
|
+
*/
|
|
239
249
|
currencySymbol: PropTypes.string,
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Shows additional info above the price
|
|
253
|
+
*/
|
|
240
254
|
topText: PropTypes.string,
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Monetary value (including decimals separated by ".")
|
|
258
|
+
*/
|
|
241
259
|
price: PropTypes.string.isRequired,
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Shows month/year unit
|
|
263
|
+
*/
|
|
242
264
|
rateText: PropTypes.string,
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Shows additional info below the price with a `Divider`
|
|
268
|
+
*/
|
|
243
269
|
bottomText: PropTypes.string,
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Displays which side the currency should apperar (left, right)
|
|
273
|
+
*/
|
|
244
274
|
signDirection: PropTypes.oneOf(['right', 'left']),
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Shows additional link for context
|
|
278
|
+
*/
|
|
245
279
|
footnoteLinks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Function to be called when a footnote link is clicked
|
|
283
|
+
*/
|
|
246
284
|
onClickFootnote: PropTypes.func,
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* To show price savings comparison
|
|
288
|
+
*/
|
|
247
289
|
strikeThrough: PropTypes.bool,
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* To provide a11y text for `PriceLockup` component
|
|
293
|
+
*
|
|
294
|
+
* **Note:** a11yText will override strikethrough price, so it must include price (ie. "was 50 dollars per month")
|
|
295
|
+
*/
|
|
248
296
|
a11yText: PropTypes.string
|
|
249
297
|
};
|
|
250
298
|
export default PriceLockup;
|
|
@@ -199,25 +199,76 @@ const dictionaryContentShape = PropTypes.shape({
|
|
|
199
199
|
}).isRequired
|
|
200
200
|
});
|
|
201
201
|
QuantitySelector.propTypes = {
|
|
202
|
+
/**
|
|
203
|
+
* The id of the input field
|
|
204
|
+
*/
|
|
202
205
|
id: PropTypes.string,
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The minimum number allowed
|
|
209
|
+
*/
|
|
203
210
|
minNumber: PropTypes.number,
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The maximum number allowed
|
|
214
|
+
*/
|
|
204
215
|
maxNumber: PropTypes.number,
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* The callback function that is called when the value of the input field changes
|
|
219
|
+
*/
|
|
205
220
|
onChange: PropTypes.func,
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* The default value of the input field
|
|
224
|
+
*/
|
|
206
225
|
defaultValue: PropTypes.number,
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The label of the input field
|
|
229
|
+
*/
|
|
207
230
|
label: PropTypes.string,
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* The hint of the input field
|
|
234
|
+
*/
|
|
208
235
|
hint: PropTypes.string,
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The position of the hint. Could be shown along side the label or below it
|
|
239
|
+
*/
|
|
209
240
|
hintPosition: PropTypes.oneOf(['inline', 'below']),
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Adds a question mark which will display a tooltip when clicked
|
|
244
|
+
*/
|
|
210
245
|
tooltip: PropTypes.string,
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* The accessibility label of the input field
|
|
249
|
+
*/
|
|
211
250
|
accessibilityLabel: PropTypes.string,
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The dictionary object containing the content for the input field
|
|
254
|
+
*/
|
|
212
255
|
dictionary: PropTypes.shape({
|
|
213
256
|
en: dictionaryContentShape,
|
|
214
257
|
fr: dictionaryContentShape
|
|
215
258
|
}),
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The language to use for the copy.
|
|
262
|
+
*/
|
|
216
263
|
copy: PropTypes.oneOfType([PropTypes.oneOf(['en', 'fr'])]),
|
|
217
264
|
variant: PropTypes.exact({
|
|
218
265
|
alternative: PropTypes.bool
|
|
219
266
|
}),
|
|
220
267
|
tokens: PropTypes.oneOf([PropTypes.object, PropTypes.func]),
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Sets `data-testid` attribute on the input field for testing purposes.
|
|
271
|
+
*/
|
|
221
272
|
testID: PropTypes.string
|
|
222
273
|
};
|
|
223
274
|
QuantitySelector.defaultProps = {
|
package/lib-module/Span/Span.js
CHANGED
|
@@ -125,9 +125,25 @@ const Toast = _ref3 => {
|
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
Toast.propTypes = { ...selectedSystemPropTypes,
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* If true, the toast will be displayed
|
|
131
|
+
*/
|
|
128
132
|
toast: PropTypes.bool,
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The copy to display in the toast
|
|
136
|
+
*/
|
|
129
137
|
copy: PropTypes.string.isRequired,
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The headline to display in the toast (before copy)
|
|
141
|
+
*/
|
|
130
142
|
headline: PropTypes.string,
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The link to display in the toast (after copy)
|
|
146
|
+
*/
|
|
131
147
|
link: PropTypes.shape({
|
|
132
148
|
href: PropTypes.string.isRequired,
|
|
133
149
|
text: PropTypes.string.isRequired,
|
package/package.json
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
],
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@gorhom/portal": "^1.0.14",
|
|
8
|
-
"@telus-uds/components-base": "1.51.
|
|
8
|
+
"@telus-uds/components-base": "1.51.1",
|
|
9
9
|
"@telus-uds/system-constants": "^1.2.1",
|
|
10
10
|
"fscreen": "^1.2.0",
|
|
11
11
|
"lodash.omit": "^4.5.0",
|
|
12
12
|
"react-dates": "^21.8.0",
|
|
13
13
|
"react-helmet-async": "^1.3.0",
|
|
14
14
|
"react-moment-proptypes": "^1.8.1",
|
|
15
|
-
"@telus-uds/system-theme-tokens": "^2.
|
|
15
|
+
"@telus-uds/system-theme-tokens": "^2.34.0",
|
|
16
16
|
"prop-types": "^15.7.2",
|
|
17
17
|
"lodash.throttle": "^4.1.1",
|
|
18
18
|
"react-youtube": "^10.1.0",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"skip": true
|
|
64
64
|
},
|
|
65
65
|
"types": "types/index.d.ts",
|
|
66
|
-
"version": "2.
|
|
66
|
+
"version": "2.10.0"
|
|
67
67
|
}
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
StackView,
|
|
7
7
|
Typography,
|
|
8
8
|
useThemeTokens,
|
|
9
|
-
withLinkRouter
|
|
9
|
+
withLinkRouter,
|
|
10
|
+
useViewport
|
|
10
11
|
} from '@telus-uds/components-base'
|
|
11
12
|
import styled from 'styled-components'
|
|
12
13
|
import { htmlAttrs, transformGradient } from '../utils'
|
|
@@ -48,6 +49,7 @@ const BlockQuote = ({
|
|
|
48
49
|
variant,
|
|
49
50
|
...rest
|
|
50
51
|
}) => {
|
|
52
|
+
const viewport = useViewport()
|
|
51
53
|
const {
|
|
52
54
|
color,
|
|
53
55
|
paddingTop,
|
|
@@ -56,16 +58,49 @@ const BlockQuote = ({
|
|
|
56
58
|
paddingRight,
|
|
57
59
|
marginBottom,
|
|
58
60
|
width,
|
|
59
|
-
backgroundGradient
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
backgroundGradient,
|
|
62
|
+
titleHeadingFontSize,
|
|
63
|
+
titleHeadingFontName,
|
|
64
|
+
titleHeadingFontWeight,
|
|
65
|
+
titleHeadingLineHeight,
|
|
66
|
+
titleFontSize,
|
|
67
|
+
titleFontName,
|
|
68
|
+
titleFontWeight,
|
|
69
|
+
titleLineHeight,
|
|
70
|
+
linkFontSize,
|
|
71
|
+
linkFontName,
|
|
72
|
+
linkFontWeight,
|
|
73
|
+
linkLineHeight
|
|
74
|
+
} = useThemeTokens('BlockQuote', tokens, variant, {
|
|
75
|
+
viewport
|
|
76
|
+
})
|
|
62
77
|
const mappedTextSize = textStyle === 'heading' ? 'h3' : textStyle
|
|
78
|
+
const titleTokens =
|
|
79
|
+
textStyle === 'heading'
|
|
80
|
+
? {
|
|
81
|
+
fontSize: titleHeadingFontSize,
|
|
82
|
+
fontName: titleHeadingFontName,
|
|
83
|
+
fontWeight: titleHeadingFontWeight,
|
|
84
|
+
lineHeight: titleHeadingLineHeight
|
|
85
|
+
}
|
|
86
|
+
: {
|
|
87
|
+
fontSize: titleFontSize,
|
|
88
|
+
fontName: titleFontName,
|
|
89
|
+
fontWeight: titleFontWeight,
|
|
90
|
+
lineHeight: titleLineHeight
|
|
91
|
+
}
|
|
63
92
|
const renderLink = () => {
|
|
64
93
|
if (linkHref) {
|
|
65
94
|
return (
|
|
66
95
|
<Link
|
|
67
96
|
href={linkHref}
|
|
68
|
-
tokens={{
|
|
97
|
+
tokens={{
|
|
98
|
+
blockFontSize: linkFontSize,
|
|
99
|
+
blockFontName: linkFontName,
|
|
100
|
+
blockFontWeight: linkFontWeight,
|
|
101
|
+
blockLineHeight: linkLineHeight,
|
|
102
|
+
color
|
|
103
|
+
}}
|
|
69
104
|
variant={{ alternative: true }}
|
|
70
105
|
LinkRouter={LinkRouter}
|
|
71
106
|
linkRouterProps={linkRouterProps}
|
|
@@ -80,7 +115,7 @@ const BlockQuote = ({
|
|
|
80
115
|
|
|
81
116
|
const renderQuote = () => {
|
|
82
117
|
const quote = (
|
|
83
|
-
<Typography tokens={{ color,
|
|
118
|
+
<Typography tokens={{ color, ...titleTokens }} variant={{ size: mappedTextSize }}>
|
|
84
119
|
{children}
|
|
85
120
|
</Typography>
|
|
86
121
|
)
|
|
@@ -121,9 +156,21 @@ BlockQuote.propTypes = {
|
|
|
121
156
|
...selectedSystemPropTypes,
|
|
122
157
|
...withLinkRouter.propTypes,
|
|
123
158
|
children: PropTypes.node.isRequired,
|
|
159
|
+
/**
|
|
160
|
+
* External source's identifier (e.g. author's name)
|
|
161
|
+
*/
|
|
124
162
|
link: PropTypes.string,
|
|
163
|
+
/**
|
|
164
|
+
* External source's URL
|
|
165
|
+
*/
|
|
125
166
|
linkHref: PropTypes.string,
|
|
167
|
+
/**
|
|
168
|
+
* To provide additional information about the source, rendered underneath `link`
|
|
169
|
+
*/
|
|
126
170
|
additionalInfo: PropTypes.string,
|
|
171
|
+
/**
|
|
172
|
+
* Whether to render BlockQuote as a heading size of `h3` or large text size
|
|
173
|
+
*/
|
|
127
174
|
textStyle: PropTypes.oneOf(['large', 'heading'])
|
|
128
175
|
}
|
|
129
176
|
|
package/src/Callout/Callout.jsx
CHANGED
|
@@ -91,9 +91,18 @@ const Callout = ({
|
|
|
91
91
|
|
|
92
92
|
Callout.propTypes = {
|
|
93
93
|
...selectedSystemPropTypes,
|
|
94
|
+
/**
|
|
95
|
+
* Icon to display on the left side of the Callout
|
|
96
|
+
*/
|
|
94
97
|
icon: PropTypes.elementType,
|
|
95
98
|
children: PropTypes.node.isRequired,
|
|
99
|
+
/**
|
|
100
|
+
* To change the horizontal alignment of the Callout's text
|
|
101
|
+
*/
|
|
96
102
|
textAlignToFlex: PropTypes.oneOf(['center', 'left']),
|
|
103
|
+
/**
|
|
104
|
+
* To change the vertical alignment of the Callout's icon
|
|
105
|
+
*/
|
|
97
106
|
verticalAlign: PropTypes.oneOf(['top', 'middle', 'bottom'])
|
|
98
107
|
}
|
|
99
108
|
|
|
@@ -164,6 +164,30 @@ const CalendarContainer = styled.div(
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
.CalendarDay
|
|
168
|
+
.CalendarDay__default
|
|
169
|
+
.CalendarDay__selected
|
|
170
|
+
.CalendarDay__blocked_out_of_range{
|
|
171
|
+
background: ${remainingTokens.calendarDaySelectedDisabledBackground};
|
|
172
|
+
color: ${remainingTokens.calendarDaySelectedDisabledColor};
|
|
173
|
+
text-decoration: none;
|
|
174
|
+
z-index: 0;
|
|
175
|
+
&:before {
|
|
176
|
+
content: '';
|
|
177
|
+
position: absolute;
|
|
178
|
+
top: 50%;
|
|
179
|
+
left: 50%;
|
|
180
|
+
transform: translate(-50%, -50%);
|
|
181
|
+
height: ${calendarDayDefaultHeight}px;
|
|
182
|
+
border: 1px solid ${remainingTokens.calendarDaySelectedDisabledContentBackgroundColor};
|
|
183
|
+
width: ${calendarDayDefaultWidth}px;
|
|
184
|
+
border-radius: 50%;
|
|
185
|
+
background: ${remainingTokens.calendarDaySelectedDisabledContentBackgroundColor};
|
|
186
|
+
transition: all 0.3s;
|
|
187
|
+
z-index: -1;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
167
191
|
.CalendarDay__blocked_out_of_range,
|
|
168
192
|
.CalendarDay__blocked_out_of_range:active,
|
|
169
193
|
.CalendarDay__blocked_out_of_range:hover,
|
|
@@ -109,13 +109,19 @@ const DatePicker = forwardRef(
|
|
|
109
109
|
}
|
|
110
110
|
setIsClickedInside(false)
|
|
111
111
|
}
|
|
112
|
-
const handleFocus = () => {
|
|
113
|
-
|
|
112
|
+
const handleFocus = (event) => {
|
|
113
|
+
if (event.target.tagName === 'INPUT') {
|
|
114
|
+
setIsFocused(true)
|
|
115
|
+
}
|
|
114
116
|
}
|
|
115
117
|
const handleMouseDown = (event) => {
|
|
116
118
|
if (event.target.tagName === 'INPUT') {
|
|
117
119
|
setIsClickedInside(true)
|
|
118
120
|
setIsFocused(true)
|
|
121
|
+
} else if (event.target.tagName === 'path') {
|
|
122
|
+
// needed to handle the case where the user clicks on the tooltip icon
|
|
123
|
+
setIsClickedInside(true)
|
|
124
|
+
event.stopPropagation()
|
|
119
125
|
} else {
|
|
120
126
|
event.stopPropagation()
|
|
121
127
|
}
|
|
@@ -39,6 +39,9 @@ ExpandCollapseMini.displayName = 'ExpandCollapseMini'
|
|
|
39
39
|
|
|
40
40
|
ExpandCollapseMini.propTypes = {
|
|
41
41
|
...ExpandCollapseMiniControl.propTypes,
|
|
42
|
+
/**
|
|
43
|
+
* Function to call on pressing the panel's control, which should open or close the panel.
|
|
44
|
+
*/
|
|
42
45
|
onToggle: PropTypes.func,
|
|
43
46
|
children: PropTypes.node.isRequired
|
|
44
47
|
}
|
|
@@ -57,9 +57,21 @@ const ExpandCollapseMiniControl = ({
|
|
|
57
57
|
ExpandCollapseMiniControl.propTypes = {
|
|
58
58
|
...selectedSystemPropTypes,
|
|
59
59
|
...Link.propTypes,
|
|
60
|
+
/**
|
|
61
|
+
* Optional function to call on pressing the panel's control, in addition to opening or closing the panel
|
|
62
|
+
*/
|
|
60
63
|
onPress: PropTypes.func,
|
|
64
|
+
/**
|
|
65
|
+
* ExpandCollapseMiniControl title when expanded
|
|
66
|
+
*/
|
|
61
67
|
expandTitle: PropTypes.string.isRequired,
|
|
68
|
+
/**
|
|
69
|
+
* ExpandCollapseMiniControl title when collapsed
|
|
70
|
+
*/
|
|
62
71
|
collapseTitle: PropTypes.string.isRequired,
|
|
72
|
+
/**
|
|
73
|
+
* React Native's `Pressable`'s state object
|
|
74
|
+
*/
|
|
63
75
|
pressableState: PropTypes.object,
|
|
64
76
|
variant: PropTypes.object
|
|
65
77
|
}
|
|
@@ -36,8 +36,14 @@ IconButton.displayName = 'IconButton'
|
|
|
36
36
|
const propsWithoutIcon = ({ icon, ...props }) => props
|
|
37
37
|
IconButton.propTypes = {
|
|
38
38
|
...propsWithoutIcon(IconButtonBase.propTypes),
|
|
39
|
+
/**
|
|
40
|
+
* To set the icon to a multi-brand compatabile icon
|
|
41
|
+
*/
|
|
39
42
|
// eslint-disable-next-line react/require-default-props
|
|
40
43
|
action: PropTypes.oneOf(multiBrandIconNames),
|
|
44
|
+
/**
|
|
45
|
+
* To set a custom icon
|
|
46
|
+
*/
|
|
41
47
|
icon: PropTypes.func
|
|
42
48
|
}
|
|
43
49
|
|
package/src/Listbox/Listbox.jsx
CHANGED
|
@@ -139,7 +139,13 @@ Listbox.propTypes = {
|
|
|
139
139
|
* the last menu item.
|
|
140
140
|
*/
|
|
141
141
|
parentRef: PropTypes.object,
|
|
142
|
+
/**
|
|
143
|
+
* `Listbox` items
|
|
144
|
+
*/
|
|
142
145
|
items: PropTypes.array,
|
|
146
|
+
/**
|
|
147
|
+
* To select an item by default
|
|
148
|
+
*/
|
|
143
149
|
selectedId: PropTypes.string
|
|
144
150
|
}
|
|
145
151
|
|
|
@@ -198,6 +198,9 @@ NavigationBar.propTypes = {
|
|
|
198
198
|
* Common navigation bar heading.
|
|
199
199
|
*/
|
|
200
200
|
heading: PropTypes.string,
|
|
201
|
+
/**
|
|
202
|
+
* Sets the `headingLevel` of the `heading`
|
|
203
|
+
*/
|
|
201
204
|
headingLevel: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']),
|
|
202
205
|
/**
|
|
203
206
|
* Matches the `id` property of the item in `items` corresponding to the current page
|
package/src/OrderedList/Item.jsx
CHANGED
|
@@ -49,6 +49,9 @@ const Paragraph = ({ children, variant, tokens, testID, align, linesBetween = 1,
|
|
|
49
49
|
Paragraph.propTypes = {
|
|
50
50
|
...selectedSystemPropTypes,
|
|
51
51
|
children: PropTypes.node.isRequired,
|
|
52
|
+
/**
|
|
53
|
+
* Adds a `data-testid` attribute to the element for testing purposes
|
|
54
|
+
*/
|
|
52
55
|
testID: PropTypes.string,
|
|
53
56
|
/**
|
|
54
57
|
* Sets the alignment style for the paragraph. Same options as Typography's `align` prop.
|