@sproutsocial/seeds-react-menu 1.6.5 → 1.6.7
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/.turbo/turbo-build.log +19 -19
- package/CHANGELOG.md +24 -0
- package/dist/esm/index.js +12 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +17 -15
- package/src/NestedMenu/NestedMenu.tsx +12 -1
- package/tsconfig.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/seeds-react-menu",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"description": "Seeds React Menu",
|
|
5
5
|
"author": "Sprout Social, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,33 +17,35 @@
|
|
|
17
17
|
"test:watch": "jest --watch --coverage=false"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@sproutsocial/seeds-react-box": "^1.1.
|
|
21
|
-
"@sproutsocial/seeds-react-button": "^1.2.
|
|
22
|
-
"@sproutsocial/seeds-react-checkbox": "^1.3.
|
|
23
|
-
"@sproutsocial/seeds-react-icon": "^1.1.
|
|
24
|
-
"@sproutsocial/seeds-react-input": "^1.4.
|
|
25
|
-
"@sproutsocial/seeds-react-label": "^1.0.
|
|
26
|
-
"@sproutsocial/seeds-react-popout": "^2.4.
|
|
27
|
-
"@sproutsocial/seeds-react-radio": "^1.3.
|
|
28
|
-
"@sproutsocial/seeds-react-switch": "^1.2.
|
|
20
|
+
"@sproutsocial/seeds-react-box": "^1.1.3",
|
|
21
|
+
"@sproutsocial/seeds-react-button": "^1.2.2",
|
|
22
|
+
"@sproutsocial/seeds-react-checkbox": "^1.3.2",
|
|
23
|
+
"@sproutsocial/seeds-react-icon": "^1.1.3",
|
|
24
|
+
"@sproutsocial/seeds-react-input": "^1.4.4",
|
|
25
|
+
"@sproutsocial/seeds-react-label": "^1.0.2",
|
|
26
|
+
"@sproutsocial/seeds-react-popout": "^2.4.3",
|
|
27
|
+
"@sproutsocial/seeds-react-radio": "^1.3.1",
|
|
28
|
+
"@sproutsocial/seeds-react-switch": "^1.2.2",
|
|
29
29
|
"@sproutsocial/seeds-react-system-props": "^3.0.2",
|
|
30
|
-
"@sproutsocial/seeds-react-theme": "^
|
|
31
|
-
"@sproutsocial/seeds-react-token-input": "^1.4.
|
|
32
|
-
"@sproutsocial/seeds-react-utilities": "^4.
|
|
30
|
+
"@sproutsocial/seeds-react-theme": "^3.0.1",
|
|
31
|
+
"@sproutsocial/seeds-react-token-input": "^1.4.3",
|
|
32
|
+
"@sproutsocial/seeds-react-utilities": "^4.3.0",
|
|
33
33
|
"downshift": "9.0.4",
|
|
34
|
+
"lodash.uniqueid": "^4.0.1",
|
|
34
35
|
"motion": "^12.6.3"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@sproutsocial/seeds-react-tooltip": "^1.0.
|
|
38
|
+
"@sproutsocial/seeds-react-tooltip": "^1.0.2",
|
|
38
39
|
"@sproutsocial/eslint-config-seeds": "*",
|
|
39
40
|
"@sproutsocial/seeds-react-testing-library": "*",
|
|
40
41
|
"@sproutsocial/seeds-testing": "*",
|
|
42
|
+
"@types/lodash.uniqueid": "^4.0.1",
|
|
41
43
|
"@types/react": "^18.0.0",
|
|
42
44
|
"@types/react-dom": "^18.0.0",
|
|
43
45
|
"@types/styled-components": "^5.1.26",
|
|
44
46
|
"react": "^18.0.0",
|
|
45
47
|
"react-dom": "^18.0.0",
|
|
46
|
-
"tsup": "^8.
|
|
48
|
+
"tsup": "^8.3.4",
|
|
47
49
|
"typescript": "^5.2.2"
|
|
48
50
|
},
|
|
49
51
|
"peerDependencies": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useState, useRef } from "react";
|
|
2
2
|
import { AnimatePresence, motion } from "motion/react";
|
|
3
3
|
import { useSelect } from "downshift";
|
|
4
|
+
import uniqueId from "lodash.uniqueid";
|
|
4
5
|
|
|
5
6
|
import { useDownshiftDefaults } from "../hooks/useDownshiftDefaults";
|
|
6
7
|
import { reduceReducers } from "../utils/reduceReducers";
|
|
@@ -23,6 +24,16 @@ import { MOTION_DURATION_FAST } from "@sproutsocial/seeds-motion/unitless";
|
|
|
23
24
|
import { NestedMenuRoot } from "./NestedMenuRoot";
|
|
24
25
|
import { NestedMenuPopout } from "./NestedMenuPopout";
|
|
25
26
|
|
|
27
|
+
// TODO: #React18 - Once we drop React 16 and 17 support, we can use useId from React directly.
|
|
28
|
+
const useId = () => {
|
|
29
|
+
const [id, setId] = useState<string>();
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const uId = uniqueId();
|
|
32
|
+
setId(uId);
|
|
33
|
+
}, []);
|
|
34
|
+
return id;
|
|
35
|
+
};
|
|
36
|
+
|
|
26
37
|
export const NestedMenu = <
|
|
27
38
|
I extends TypeMenuItemProps = TypeNestedMenuItemProps
|
|
28
39
|
>({
|
package/tsconfig.json
CHANGED