@sproutsocial/seeds-react-menu 1.5.0 → 1.5.2
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 +8 -8
- package/CHANGELOG.md +15 -1
- package/dist/esm/index.js +6 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Menu.tsx +3 -1
- package/src/NestedMenu/NestedMenu.tsx +8 -5
- package/src/NestedMenu/NestedMenuTypes.ts +0 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -84,14 +84,14 @@ ESM Build start
|
|
|
84
84
|
╵ [32m~~~~~~~~~[0m
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
CJS dist/index.js 143.
|
|
88
|
-
CJS dist/index.js.map 371.
|
|
89
|
-
CJS ⚡️ Build success in
|
|
90
|
-
ESM dist/esm/index.js 134.
|
|
91
|
-
ESM dist/esm/index.js.map 370.
|
|
92
|
-
ESM ⚡️ Build success in
|
|
87
|
+
CJS dist/index.js 143.99 KB
|
|
88
|
+
CJS dist/index.js.map 371.54 KB
|
|
89
|
+
CJS ⚡️ Build success in 717ms
|
|
90
|
+
ESM dist/esm/index.js 134.23 KB
|
|
91
|
+
ESM dist/esm/index.js.map 370.30 KB
|
|
92
|
+
ESM ⚡️ Build success in 716ms
|
|
93
93
|
DTS Build start
|
|
94
|
-
DTS ⚡️ Build success in
|
|
94
|
+
DTS ⚡️ Build success in 12045ms
|
|
95
95
|
DTS dist/index.d.ts 38.55 KB
|
|
96
96
|
DTS dist/index.d.mts 38.55 KB
|
|
97
|
-
Done in
|
|
97
|
+
Done in 15.35s.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
# @sproutsocial/seeds-react-menu
|
|
2
2
|
|
|
3
|
+
## 1.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a1ce7c5: [DS-3609] Fix the infinite rerender in the NestedMenu related to dynamic Popout positioning
|
|
8
|
+
- Updated dependencies [a1ce7c5]
|
|
9
|
+
- @sproutsocial/seeds-react-popout@2.4.2
|
|
10
|
+
|
|
11
|
+
## 1.5.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- e6023c4: [DS-3555] Add NestedMenuItem and NestedMenuHeader to the Menu.tsx exports for the NestedMenu docs
|
|
16
|
+
|
|
3
17
|
## 1.5.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
6
20
|
|
|
7
|
-
- d79bdc9: [DS-3494]
|
|
21
|
+
- d79bdc9: [DS-3494]
|
|
8
22
|
- Fix motion origin for Menu based on placement, passed to the motion.div custom prop in the Popout component
|
|
9
23
|
- Updated NestedMenu to use the Popout lockPlacement so it does not jump while switching panels
|
|
10
24
|
|
package/dist/esm/index.js
CHANGED
|
@@ -4000,7 +4000,7 @@ var AutocompleteSelect = (props) => {
|
|
|
4000
4000
|
};
|
|
4001
4001
|
|
|
4002
4002
|
// src/NestedMenu/NestedMenu.tsx
|
|
4003
|
-
import { useId, useEffect as useEffect4, useState } from "react";
|
|
4003
|
+
import { useId, useEffect as useEffect4, useState, useRef as useRef2 } from "react";
|
|
4004
4004
|
import { AnimatePresence as AnimatePresence2, motion as motion3 } from "motion/react";
|
|
4005
4005
|
import { useSelect as useSelect6 } from "downshift";
|
|
4006
4006
|
|
|
@@ -4302,7 +4302,7 @@ var NestedMenu = ({
|
|
|
4302
4302
|
const [activeMenuContext, setActiveMenuContext] = useState(defaultMenuContext);
|
|
4303
4303
|
const [currentMenuId, setCurrentMenuId] = useState(initialMenuId);
|
|
4304
4304
|
const [isAdding, setIsAdding] = useState(false);
|
|
4305
|
-
const
|
|
4305
|
+
const popoutUpdateRef = useRef2();
|
|
4306
4306
|
const setSelectedMenuId = (id) => {
|
|
4307
4307
|
setIsAdding(true);
|
|
4308
4308
|
setSelectedMenuPath((currentPath) => [...currentPath, id]);
|
|
@@ -4311,7 +4311,6 @@ var NestedMenu = ({
|
|
|
4311
4311
|
if (selectedMenuPath.length > 0) {
|
|
4312
4312
|
const newMenuId = selectedMenuPath[selectedMenuPath.length - 1];
|
|
4313
4313
|
setCurrentMenuId(newMenuId);
|
|
4314
|
-
popoutUpdateRef?.();
|
|
4315
4314
|
}
|
|
4316
4315
|
}, [selectedMenuPath.join("-")]);
|
|
4317
4316
|
const resetSelectedMenuPath = () => {
|
|
@@ -4433,6 +4432,9 @@ var NestedMenu = ({
|
|
|
4433
4432
|
),
|
|
4434
4433
|
...restMenuProps
|
|
4435
4434
|
};
|
|
4435
|
+
useEffect4(() => {
|
|
4436
|
+
popoutUpdateRef.current?.();
|
|
4437
|
+
}, [nestedMenuProps.children]);
|
|
4436
4438
|
return /* @__PURE__ */ jsx34(
|
|
4437
4439
|
NestedMenuProvider,
|
|
4438
4440
|
{
|
|
@@ -4466,7 +4468,7 @@ var NestedMenu = ({
|
|
|
4466
4468
|
menuToggleElement,
|
|
4467
4469
|
width: width2,
|
|
4468
4470
|
scheduleUpdateRef: (callback) => {
|
|
4469
|
-
|
|
4471
|
+
popoutUpdateRef.current = callback;
|
|
4470
4472
|
externalPopoutUpdateRef?.(callback);
|
|
4471
4473
|
},
|
|
4472
4474
|
...restPopoutProps
|