@artsy/palette-mobile 12.0.2 → 12.0.4
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 +24 -0
- package/README.md +1 -1
- package/dist/elements/ToolTip/ToolTip.d.ts +1 -0
- package/dist/elements/ToolTip/ToolTip.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# v12.0.4 (Wed Aug 23 2023)
|
|
2
|
+
|
|
3
|
+
#### ⚠️ Pushed to `main`
|
|
4
|
+
|
|
5
|
+
- Update README.md ([@MounirDhahri](https://github.com/MounirDhahri))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Mounir Dhahri ([@MounirDhahri](https://github.com/MounirDhahri))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v12.0.3 (Fri Aug 11 2023)
|
|
14
|
+
|
|
15
|
+
#### 🐛 Bug Fix
|
|
16
|
+
|
|
17
|
+
- feat: Add onPress to ToolTip [#140](https://github.com/artsy/palette-mobile/pull/140) ([@olerichter00](https://github.com/olerichter00))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- Ole ([@olerichter00](https://github.com/olerichter00))
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
1
25
|
# v12.0.2 (Fri Aug 11 2023)
|
|
2
26
|
|
|
3
27
|
:tada: This release contains work from a new contributor! :tada:
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Artsy's Design System on Mobile
|
|
|
6
6
|
|
|
7
7
|
## Meta
|
|
8
8
|
|
|
9
|
-
- Point People: [@
|
|
9
|
+
- Point People: [@brainbicycle](https://github.com/brainbicycle) [@gkartalis](https://github.com/gkartalis)
|
|
10
10
|
- Palette for Web: [palette](https://github.com/artsy/palette)
|
|
11
11
|
|
|
12
12
|
## What is Palette?
|
|
@@ -33,7 +33,7 @@ exports.ToolTipContext = (0, react_1.createContext)({
|
|
|
33
33
|
* </ToolTip>
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
36
|
-
const ToolTip = ({ children, enabled = true, initialToolTipText, maxWidth, position = "TOP", tapToDismiss = false, testID, xOffset = 0, yOffset = 5, }) => {
|
|
36
|
+
const ToolTip = ({ children, enabled = true, initialToolTipText, maxWidth, onPress, position = "TOP", tapToDismiss = false, testID, xOffset = 0, yOffset = 5, }) => {
|
|
37
37
|
const { space } = (0, useTheme_1.useTheme)();
|
|
38
38
|
const mWidth = (0, useScreenDimensions_1.useScreenDimensions)().width - space(2) * 2; // 40 accounting for padding 20 on each side of the screen
|
|
39
39
|
const MAX_TOOLTIP_WIDTH = maxWidth ?? mWidth;
|
|
@@ -61,7 +61,7 @@ const ToolTip = ({ children, enabled = true, initialToolTipText, maxWidth, posit
|
|
|
61
61
|
bottom: childrenDimensions.height + yOffset,
|
|
62
62
|
left: xOffset,
|
|
63
63
|
...extraStyle,
|
|
64
|
-
}, tapToDismiss: tapToDismiss, height: finalToolTipHeight, width: finalToolTipWidth, onClose: dismissToolTip, position: position, testID: testID, text: toolTipText }), !!enabled && position === "TOP" && !!toolTipText && ((0, jsx_runtime_1.jsx)(TriangleDown_1.TriangleDown, { style: {
|
|
64
|
+
}, tapToDismiss: tapToDismiss, height: finalToolTipHeight, width: finalToolTipWidth, onClose: dismissToolTip, onToolTipPress: onPress, position: position, testID: testID, text: toolTipText }), !!enabled && position === "TOP" && !!toolTipText && ((0, jsx_runtime_1.jsx)(TriangleDown_1.TriangleDown, { style: {
|
|
65
65
|
left: triangleXDisplacement + xOffset,
|
|
66
66
|
position: "absolute",
|
|
67
67
|
bottom: childrenDimensions.height + yOffset - 5, // where 5 is the triangle icon size
|
|
@@ -77,7 +77,7 @@ const ToolTip = ({ children, enabled = true, initialToolTipText, maxWidth, posit
|
|
|
77
77
|
}, children: children }), !!enabled && position === "BOTTOM" && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ToolTipFlyout_1.ToolTipFlyout, { containerStyle: {
|
|
78
78
|
top: childrenDimensions.height + yOffset,
|
|
79
79
|
...extraStyle,
|
|
80
|
-
}, tapToDismiss: tapToDismiss, height: finalToolTipHeight, width: finalToolTipWidth, onClose: dismissToolTip, position: position, testID: testID, text: toolTipText }), !!enabled && position === "BOTTOM" && !!toolTipText && ((0, jsx_runtime_1.jsx)(TriangleDown_1.TriangleDown, { style: {
|
|
80
|
+
}, tapToDismiss: tapToDismiss, height: finalToolTipHeight, width: finalToolTipWidth, onClose: dismissToolTip, onToolTipPress: onPress, position: position, testID: testID, text: toolTipText }), !!enabled && position === "BOTTOM" && !!toolTipText && ((0, jsx_runtime_1.jsx)(TriangleDown_1.TriangleDown, { style: {
|
|
81
81
|
transform: [{ rotate: "180deg" }],
|
|
82
82
|
left: triangleXDisplacement + xOffset,
|
|
83
83
|
position: "absolute",
|