@sproutsocial/seeds-react-menu 1.8.4 → 1.8.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/seeds-react-menu",
3
- "version": "1.8.4",
3
+ "version": "1.8.5",
4
4
  "description": "Seeds React Menu",
5
5
  "author": "Sprout Social, Inc.",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "@sproutsocial/seeds-react-icon": "^2.2.4",
38
38
  "@sproutsocial/seeds-react-input": "^1.5.4",
39
39
  "@sproutsocial/seeds-react-label": "^1.0.13",
40
- "@sproutsocial/seeds-react-popout": "^2.4.24",
40
+ "@sproutsocial/seeds-react-popout": "^2.4.25",
41
41
  "@sproutsocial/seeds-react-radio": "^1.3.12",
42
42
  "@sproutsocial/seeds-react-switch": "^1.2.21",
43
43
  "@sproutsocial/seeds-react-system-props": "^3.0.2",
@@ -51,7 +51,7 @@
51
51
  "styled-system": "^5.1.5"
52
52
  },
53
53
  "devDependencies": {
54
- "@sproutsocial/seeds-react-tooltip": "^1.1.6",
54
+ "@sproutsocial/seeds-react-tooltip": "^1.1.7",
55
55
  "@sproutsocial/eslint-config-seeds": "*",
56
56
  "@sproutsocial/seeds-react-testing-library": "*",
57
57
  "@sproutsocial/seeds-testing": "*",
@@ -46,6 +46,8 @@ export function Popout({
46
46
  onOpenAutoFocus,
47
47
  onEscapeKeyDown,
48
48
  onCloseAutoFocus,
49
+ onPointerDownOutside,
50
+ onInteractOutside,
49
51
  ...rest
50
52
  }: TypePopoutProps) {
51
53
  const [isOpen, setIsOpen] = React.useState(defaultOpen ?? false);
@@ -90,6 +92,8 @@ export function Popout({
90
92
  onOpenAutoFocus={onOpenAutoFocus}
91
93
  onEscapeKeyDown={onEscapeKeyDown}
92
94
  onCloseAutoFocus={onCloseAutoFocus}
95
+ onPointerDownOutside={onPointerDownOutside}
96
+ onInteractOutside={onInteractOutside}
93
97
  // This only needs added to Popouts used in Menus
94
98
  // those do not need the dialog role which radix applies automatically
95
99
  role="presentation"
@@ -89,4 +89,21 @@ export interface TypePopoutProps
89
89
  * Can be used to prevent the default focus return behavior or customize it.
90
90
  */
91
91
  onCloseAutoFocus?: (event: Event) => void;
92
+
93
+ /**
94
+ * Event handler called when a pointer down event occurs outside the popout content.
95
+ * Call `event.preventDefault()` to prevent the default dismiss behavior.
96
+ * Useful when the Popout is nested inside a Radix Dialog (e.g. ModalV2) to
97
+ * avoid conflicts between nested DismissableLayer instances.
98
+ */
99
+ onPointerDownOutside?: (
100
+ event: CustomEvent<{ originalEvent: PointerEvent }>
101
+ ) => void;
102
+
103
+ /**
104
+ * Event handler called when an interaction (pointer or focus) occurs outside
105
+ * the popout content. Call `event.preventDefault()` to prevent the popout
106
+ * from closing.
107
+ */
108
+ onInteractOutside?: (event: CustomEvent<{ originalEvent: Event }>) => void;
92
109
  }