@telus-uds/components-base 1.61.0 → 1.62.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 +19 -2
- package/component-docs.json +68 -46
- package/lib/Icon/Icon.js +15 -2
- package/lib/IconButton/IconButton.js +28 -9
- package/lib/Link/LinkBase.js +9 -2
- package/lib/SideNav/Item.js +7 -15
- package/lib/TextInput/TextInputBase.js +6 -1
- package/lib/Tooltip/Tooltip.js +7 -1
- package/lib/Tooltip/Tooltip.native.js +7 -1
- package/lib/Tooltip/shared.js +10 -0
- package/lib/TooltipButton/TooltipButton.js +14 -1
- package/lib-module/Icon/Icon.js +15 -2
- package/lib-module/IconButton/IconButton.js +30 -10
- package/lib-module/Link/LinkBase.js +9 -2
- package/lib-module/SideNav/Item.js +7 -15
- package/lib-module/TextInput/TextInputBase.js +6 -1
- package/lib-module/Tooltip/Tooltip.js +7 -1
- package/lib-module/Tooltip/Tooltip.native.js +7 -1
- package/lib-module/Tooltip/shared.js +10 -0
- package/lib-module/TooltipButton/TooltipButton.js +11 -1
- package/package.json +1 -1
- package/src/Icon/Icon.jsx +22 -3
- package/src/IconButton/IconButton.jsx +62 -35
- package/src/Link/LinkBase.jsx +20 -2
- package/src/SideNav/Item.jsx +7 -13
- package/src/TextInput/TextInputBase.jsx +2 -1
- package/src/Tooltip/Tooltip.jsx +17 -2
- package/src/Tooltip/Tooltip.native.jsx +17 -2
- package/src/Tooltip/shared.js +8 -0
- package/src/TooltipButton/TooltipButton.jsx +13 -2
package/src/Tooltip/shared.js
CHANGED
|
@@ -24,6 +24,14 @@ const propTypes = {
|
|
|
24
24
|
* Display tooltip icon button as an inline element.
|
|
25
25
|
*/
|
|
26
26
|
inline: PropTypes.bool,
|
|
27
|
+
/**
|
|
28
|
+
* Callback function triggered when the tooltip is pressed.
|
|
29
|
+
*/
|
|
30
|
+
onPress: PropTypes.func,
|
|
31
|
+
/**
|
|
32
|
+
* The `id` of the tooltip button.
|
|
33
|
+
*/
|
|
34
|
+
nativeID: PropTypes.string,
|
|
27
35
|
tokens: getTokensPropType('Tooltip'),
|
|
28
36
|
variant: variantProp.propType
|
|
29
37
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { View } from 'react-native'
|
|
2
|
+
import { View, StyleSheet, Platform } from 'react-native'
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import { useThemeTokens, applyOuterBorder } from '../ThemeProvider'
|
|
5
5
|
import { a11yProps, getTokensPropType, selectSystemProps, variantProp, viewProps } from '../utils'
|
|
@@ -35,7 +35,8 @@ const TooltipButton = ({ pressableState, tokens, variant, ...rest }) => {
|
|
|
35
35
|
applyOuterBorder(themeTokens),
|
|
36
36
|
themeTokens.outerBorderWidth && {
|
|
37
37
|
margin: -themeTokens.outerBorderWidth
|
|
38
|
-
}
|
|
38
|
+
},
|
|
39
|
+
staticStyles.bubblePointerEvents
|
|
39
40
|
]}
|
|
40
41
|
{...selectProps(rest)}
|
|
41
42
|
>
|
|
@@ -46,6 +47,16 @@ const TooltipButton = ({ pressableState, tokens, variant, ...rest }) => {
|
|
|
46
47
|
)
|
|
47
48
|
}
|
|
48
49
|
|
|
50
|
+
const staticStyles = StyleSheet.create({
|
|
51
|
+
bubblePointerEvents: {
|
|
52
|
+
...Platform.select({
|
|
53
|
+
web: {
|
|
54
|
+
pointerEvents: 'none'
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
|
|
49
60
|
TooltipButton.propTypes = {
|
|
50
61
|
...selectedSystemPropTypes,
|
|
51
62
|
/**
|