@sproutsocial/seeds-react-menu 1.3.0 → 1.3.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.
@@ -46,9 +46,6 @@ ESM Build start
46
46
  ╵ ~~~~~~~~~
47
47
 
48
48
 
49
- ESM dist/esm/index.js 132.88 KB
50
- ESM dist/esm/index.js.map 367.00 KB
51
- ESM ⚡️ Build success in 645ms
52
49
  [warn] ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
53
50
 
54
51
  ../../seeds-design-tokens/seeds-motion/package.json:12:6:
@@ -87,11 +84,14 @@ ESM ⚡️ Build success in 645ms
87
84
  ╵ ~~~~~~~~~
88
85
 
89
86
 
90
- CJS dist/index.js 142.53 KB
91
- CJS dist/index.js.map 368.28 KB
92
- CJS ⚡️ Build success in 713ms
87
+ CJS dist/index.js 142.61 KB
88
+ CJS dist/index.js.map 368.34 KB
89
+ CJS ⚡️ Build success in 596ms
90
+ ESM dist/esm/index.js 132.96 KB
91
+ ESM dist/esm/index.js.map 367.06 KB
92
+ ESM ⚡️ Build success in 595ms
93
93
  DTS Build start
94
- DTS ⚡️ Build success in 15562ms
95
- DTS dist/index.d.ts 37.05 KB
96
- DTS dist/index.d.mts 37.05 KB
97
- Done in 19.23s.
94
+ DTS ⚡️ Build success in 16013ms
95
+ DTS dist/index.d.ts 37.08 KB
96
+ DTS dist/index.d.mts 37.08 KB
97
+ Done in 19.00s.
package/CHANGELOG.md CHANGED
@@ -1,14 +1,20 @@
1
1
  # @sproutsocial/seeds-react-menu
2
2
 
3
+ ## 1.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8d18309: MenuContent no longer shows empty state outside of a context provider.
8
+
3
9
  ## 1.3.0
4
10
 
5
11
  ### Minor Changes
6
12
 
7
- - e27ab2e: This update introduces a `DefaultMenuEmptyState` for filter menus and an `emptyStateElement` prop on `MenuContent` to allow for custom empty states to be passed in to the `seeds-react-menu` package.
13
+ - 7fe0b84: This update introduces a `DefaultMenuEmptyState` for filter menus and an `emptyStateElement` prop on `MenuContent` to allow for custom empty states to be passed in to the `seeds-react-menu` package.
8
14
 
9
15
  ### Patch Changes
10
16
 
11
- - e27ab2e: This update fixes a bug that prevented developers from passing custom popoutProps.
17
+ - e60ec1d: This update fixes a bug that prevented developers from passing custom popoutProps.
12
18
 
13
19
  ## 1.2.3
14
20
 
package/dist/esm/index.js CHANGED
@@ -102,7 +102,8 @@ var defaultMenuContext = {
102
102
  itemsMap: {},
103
103
  isItemSelected: () => false,
104
104
  getInputComponentProps: () => ({}),
105
- hasVisibleItems: false
105
+ hasVisibleItems: false,
106
+ isInitialized: false
106
107
  };
107
108
  var getSelectedItemIds = (selectedItems) => selectedItems?.reduce(
108
109
  (selected, item) => ({ ...selected, [item.id]: true }),
@@ -196,6 +197,7 @@ var useMenu = ({
196
197
  contentRef,
197
198
  hasVisibleItems,
198
199
  autoCloseOnEmpty,
200
+ isInitialized: true,
199
201
  ...menuProps
200
202
  };
201
203
  };
@@ -2341,11 +2343,12 @@ var MenuContent = ({
2341
2343
  getMenuProps,
2342
2344
  isListbox,
2343
2345
  hasVisibleItems,
2344
- autoCloseOnEmpty
2346
+ autoCloseOnEmpty,
2347
+ isInitialized
2345
2348
  } = useMenuContentContext();
2346
2349
  const toggleButtonProps = getToggleButtonProps?.();
2347
2350
  const children = childrenProp || !menuItems || !menuItems.length ? childrenProp : mapMenuItems({ menuItems, MenuItemComponent });
2348
- if (!hasVisibleItems && !autoCloseOnEmpty) {
2351
+ if (isInitialized && !hasVisibleItems && !autoCloseOnEmpty) {
2349
2352
  return emptyStateElement ?? /* @__PURE__ */ jsx7(DefaultMenuEmptyState, {});
2350
2353
  }
2351
2354
  if (!children) {