@automattic/jetpack-components 0.48.0 → 0.48.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 CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [0.48.1] - 2024-02-05
6
+ ### Changed
7
+ - Update clicking an icon tooltip to cause the tooltip to show/hide instead of always showing. [#35312]
8
+ - Updated package dependencies.
9
+
5
10
  ## [0.48.0] - 2024-01-29
6
11
  ### Changed
7
12
  - Move the UpsellBanner component to js-packages/components [#35228]
@@ -932,6 +937,7 @@
932
937
  ### Changed
933
938
  - Update node version requirement to 14.16.1
934
939
 
940
+ [0.48.1]: https://github.com/Automattic/jetpack-components/compare/0.48.0...0.48.1
935
941
  [0.48.0]: https://github.com/Automattic/jetpack-components/compare/0.47.0...0.48.0
936
942
  [0.47.0]: https://github.com/Automattic/jetpack-components/compare/0.46.0...0.47.0
937
943
  [0.46.0]: https://github.com/Automattic/jetpack-components/compare/0.45.10...0.46.0
@@ -44,8 +44,14 @@ const IconTooltip: React.FC< IconTooltipProps > = ( {
44
44
  } ) => {
45
45
  const POPOVER_HELPER_WIDTH = 124;
46
46
  const [ isVisible, setIsVisible ] = useState( false );
47
- const showTooltip = useCallback( () => setIsVisible( true ), [ setIsVisible ] );
48
47
  const hideTooltip = useCallback( () => setIsVisible( false ), [ setIsVisible ] );
48
+ const toggleTooltip = useCallback(
49
+ e => {
50
+ e.preventDefault();
51
+ setIsVisible( ! isVisible );
52
+ },
53
+ [ isVisible, setIsVisible ]
54
+ );
49
55
 
50
56
  const args = {
51
57
  // To be compatible with deprecating prop `position`.
@@ -75,7 +81,7 @@ const IconTooltip: React.FC< IconTooltipProps > = ( {
75
81
  return (
76
82
  <div className={ wrapperClassNames } data-testid="icon-tooltip_wrapper">
77
83
  { ! isAnchorWrapper && (
78
- <Button variant="link" onClick={ showTooltip }>
84
+ <Button variant="link" onMouseDown={ toggleTooltip }>
79
85
  <Gridicon className={ iconClassName } icon={ iconCode } size={ iconSize } />
80
86
  </Button>
81
87
  ) }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.48.0",
3
+ "version": "0.48.1",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -15,16 +15,16 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@automattic/format-currency": "1.0.1",
18
- "@automattic/jetpack-boost-score-api": "^0.1.20",
18
+ "@automattic/jetpack-boost-score-api": "^0.1.21",
19
19
  "@babel/runtime": "^7",
20
- "@wordpress/browserslist-config": "5.31.0",
21
- "@wordpress/components": "25.14.0",
22
- "@wordpress/compose": "6.25.0",
23
- "@wordpress/data": "9.18.0",
24
- "@wordpress/date": "4.48.0",
25
- "@wordpress/element": "5.25.0",
26
- "@wordpress/i18n": "4.48.0",
27
- "@wordpress/icons": "9.39.0",
20
+ "@wordpress/browserslist-config": "5.33.0",
21
+ "@wordpress/components": "25.16.0",
22
+ "@wordpress/compose": "6.27.0",
23
+ "@wordpress/data": "9.20.0",
24
+ "@wordpress/date": "4.50.0",
25
+ "@wordpress/element": "5.27.0",
26
+ "@wordpress/i18n": "4.50.0",
27
+ "@wordpress/icons": "9.41.0",
28
28
  "classnames": "2.3.2",
29
29
  "prop-types": "^15.7.2",
30
30
  "qrcode.react": "3.1.0",
@@ -34,17 +34,17 @@
34
34
  "uplot-react": "1.1.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@automattic/jetpack-base-styles": "^0.6.15",
37
+ "@automattic/jetpack-base-styles": "^0.6.16",
38
38
  "@babel/core": "7.23.5",
39
39
  "@babel/preset-react": "7.23.3",
40
40
  "@jest/globals": "29.4.3",
41
41
  "@storybook/addon-actions": "7.6.5",
42
42
  "@storybook/blocks": "7.6.5",
43
43
  "@storybook/react": "7.6.5",
44
- "@testing-library/dom": "9.3.3",
45
- "@testing-library/react": "14.1.2",
44
+ "@testing-library/dom": "9.3.4",
45
+ "@testing-library/react": "14.2.0",
46
46
  "@testing-library/user-event": "14.5.2",
47
- "@types/jest": "29.5.11",
47
+ "@types/jest": "29.5.12",
48
48
  "@types/qrcode.react": "1.0.4",
49
49
  "@types/react": "18.2.33",
50
50
  "@types/react-dom": "18.2.14",