@sproutsocial/seeds-react-modal 2.5.9 → 2.5.22

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.
@@ -8,34 +8,34 @@ $ tsup --dts
8
8
  CLI Cleaning output folder
9
9
  CJS Build start
10
10
  ESM Build start
11
+ CJS dist/index.js 38.32 KB
11
12
  CJS dist/v1/index.js 10.31 KB
12
- CJS dist/v2/index.js 32.96 KB
13
- CJS dist/index.js 41.42 KB
13
+ CJS dist/v2/index.js 29.85 KB
14
+ CJS dist/index.js.map 76.00 KB
14
15
  CJS dist/v1/index.js.map 14.56 KB
15
- CJS dist/v2/index.js.map 67.35 KB
16
- CJS dist/index.js.map 82.23 KB
17
- CJS ⚡️ Build success in 35ms
16
+ CJS dist/v2/index.js.map 61.12 KB
17
+ CJS ⚡️ Build success in 70ms
18
18
  ESM dist/esm/index.js 733.00 B
19
- ESM dist/esm/chunk-XQ2A6HDC.js 27.90 KB
19
+ ESM dist/esm/chunk-KZ6XTIWT.js 24.80 KB
20
20
  ESM dist/esm/chunk-72GBDCA2.js 7.57 KB
21
21
  ESM dist/esm/v2/index.js 746.00 B
22
22
  ESM dist/esm/v1/index.js 165.00 B
23
23
  ESM dist/esm/index.js.map 1.16 KB
24
- ESM dist/esm/chunk-XQ2A6HDC.js.map 66.27 KB
25
24
  ESM dist/esm/chunk-72GBDCA2.js.map 14.38 KB
25
+ ESM dist/esm/chunk-KZ6XTIWT.js.map 60.04 KB
26
26
  ESM dist/esm/v2/index.js.map 71.00 B
27
27
  ESM dist/esm/v1/index.js.map 71.00 B
28
- ESM ⚡️ Build success in 36ms
28
+ ESM ⚡️ Build success in 70ms
29
29
  DTS Build start
30
- DTS ⚡️ Build success in 4237ms
30
+ DTS ⚡️ Build success in 4230ms
31
31
  DTS dist/index.d.ts 1.07 KB
32
32
  DTS dist/v1/index.d.ts 413.00 B
33
33
  DTS dist/v2/index.d.ts 1.16 KB
34
34
  DTS dist/Modal-DTeKLfEI.d.ts 2.52 KB
35
- DTS dist/ModalExternalTrigger-BnbJk9zY.d.ts 23.41 KB
35
+ DTS dist/ModalExternalTrigger-Bciv1N-P.d.ts 23.37 KB
36
36
  DTS dist/index.d.mts 1.08 KB
37
37
  DTS dist/v1/index.d.mts 415.00 B
38
38
  DTS dist/v2/index.d.mts 1.16 KB
39
39
  DTS dist/Modal-DTeKLfEI.d.mts 2.52 KB
40
- DTS dist/ModalExternalTrigger-BnbJk9zY.d.mts 23.41 KB
41
- Done in 4.99s.
40
+ DTS dist/ModalExternalTrigger-Bciv1N-P.d.mts 23.37 KB
41
+ Done in 5.20s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,131 @@
1
1
  # @sproutsocial/seeds-react-modal
2
2
 
3
+ ## 2.5.22
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [69c9d02]
8
+ - @sproutsocial/seeds-react-icon@2.4.0
9
+ - @sproutsocial/seeds-react-button@2.2.1
10
+
11
+ ## 2.5.21
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [edc1819]
16
+ - @sproutsocial/seeds-react-text@1.4.3
17
+
18
+ ## 2.5.20
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [456a20f]
23
+ - Updated dependencies [5892f44]
24
+ - @sproutsocial/seeds-react-button@2.2.0
25
+ - @sproutsocial/seeds-react-system-props@3.1.1
26
+ - @sproutsocial/seeds-react-box@1.1.21
27
+ - @sproutsocial/seeds-react-icon@2.3.13
28
+ - @sproutsocial/seeds-react-text@1.4.2
29
+
30
+ ## 2.5.19
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [5114a32]
35
+ - Updated dependencies [a0fe3d3]
36
+ - @sproutsocial/seeds-react-theme@4.1.0
37
+ - @sproutsocial/seeds-react-button@2.1.3
38
+ - @sproutsocial/seeds-react-box@1.1.20
39
+ - @sproutsocial/seeds-react-icon@2.3.12
40
+
41
+ ## 2.5.18
42
+
43
+ ### Patch Changes
44
+
45
+ - cdae6fb: Temporarily remove Modal v2's mobile bottom-sheet behavior. The bottom sheet was a
46
+ CSS/Motion illusion keyed to a Modal-specific 780px breakpoint, which conflicted with the
47
+ shared 640px breakpoint used by Drawer/Panel/PeekIn (where a Modal rendered "on desktop"
48
+ could independently snap to a bottom sheet in the 641–780px range). Modal now renders as a
49
+ centered dialog at every viewport. No public API changes — `TypeModalProps`, all exported
50
+ sub-components, and the hooks are unchanged. The real Drawer-based mobile bottom sheet will
51
+ be reintroduced post-migration using the shared `useIsMobile` breakpoint.
52
+
53
+ ## 2.5.17
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies [cb27f07]
58
+ - @sproutsocial/seeds-react-button@2.1.2
59
+
60
+ ## 2.5.16
61
+
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies [40d2dfe]
65
+ - @sproutsocial/seeds-react-button@2.1.1
66
+
67
+ ## 2.5.15
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [132ef9d]
72
+ - Updated dependencies [132ef9d]
73
+ - Updated dependencies [132ef9d]
74
+ - @sproutsocial/seeds-react-button@2.1.0
75
+ - @sproutsocial/seeds-react-theme@4.0.0
76
+ - @sproutsocial/seeds-react-system-props@3.1.0
77
+ - @sproutsocial/seeds-react-box@1.1.19
78
+ - @sproutsocial/seeds-react-icon@2.3.11
79
+ - @sproutsocial/seeds-react-text@1.4.1
80
+
81
+ ## 2.5.14
82
+
83
+ ### Patch Changes
84
+
85
+ - @sproutsocial/seeds-react-icon@2.3.10
86
+ - @sproutsocial/seeds-react-button@2.0.8
87
+
88
+ ## 2.5.13
89
+
90
+ ### Patch Changes
91
+
92
+ - Updated dependencies [47c62b3]
93
+ - @sproutsocial/seeds-react-theme@3.7.1
94
+ - @sproutsocial/seeds-react-box@1.1.18
95
+ - @sproutsocial/seeds-react-icon@2.3.9
96
+ - @sproutsocial/seeds-react-button@2.0.7
97
+
98
+ ## 2.5.12
99
+
100
+ ### Patch Changes
101
+
102
+ - Updated dependencies [06da9c2]
103
+ - @sproutsocial/seeds-react-theme@3.7.0
104
+ - @sproutsocial/seeds-react-box@1.1.17
105
+ - @sproutsocial/seeds-react-icon@2.3.8
106
+ - @sproutsocial/seeds-react-button@2.0.6
107
+
108
+ ## 2.5.11
109
+
110
+ ### Patch Changes
111
+
112
+ - 277bfb0: Fix a batch of UX and accessibility issues in the v3 combobox / searchable-select components (`SingleCombobox`, `MultiCombobox`, `SingleSearchableSelect`, `MultiSearchableSelect`, `SingleSelect`, `MultiSelect`), plus a related Modal v2 fix:
113
+
114
+ - **New `isInvalid` prop** renders the red error border on the input group / trigger and the error color on the chevron, and forwards `aria-invalid` to the underlying input.
115
+ - **`required` is now forwarded as `aria-required`** so screen readers correctly announce required state.
116
+ - **Token chips have a visible gap** (`theme.space[200]`) in `MultiCombobox` instead of butting up against each other.
117
+ - **Escape on a closed combobox no longer clears the input and selection.** A new `useSuppressEscapeClear` hook stops the synthetic Escape event in capture phase when the popup is closed, suppressing Base UI's default clear-on-escape behavior while leaving popup-open Escape and Modal-Escape unaffected.
118
+ - **Escape inside a Modal / Drawer only closes the dropdown**, not the surrounding dialog. Fixed in Modal v2: when an open Base UI popup is detected inside the dialog, the modal's escape handler defers to the popup's own escape handling.
119
+ - **Focus stays on the input when removing a token** in `MultiCombobox` (previously punted to the modal container).
120
+ - **The clear (X) button and token-remove buttons are keyboard-focusable** and render a `:focus-visible` focus ring.
121
+
122
+ ## 2.5.10
123
+
124
+ ### Patch Changes
125
+
126
+ - @sproutsocial/seeds-react-icon@2.3.7
127
+ - @sproutsocial/seeds-react-button@2.0.5
128
+
3
129
  ## 2.5.9
4
130
 
5
131
  ### Patch Changes
@@ -325,7 +325,6 @@ type TypeModalProps = TypeModalPropsWithTitle | TypeModalPropsWithSubtitleOnly |
325
325
  * - Controlled and uncontrolled state modes
326
326
  * - Optional draggable behavior for side-by-side interaction
327
327
  * - Floating action rail for quick actions like close, expand, etc.
328
- * - Responsive bottom sheet layout on mobile
329
328
  *
330
329
  * @example
331
330
  * // Simple uncontrolled modal
@@ -325,7 +325,6 @@ type TypeModalProps = TypeModalPropsWithTitle | TypeModalPropsWithSubtitleOnly |
325
325
  * - Controlled and uncontrolled state modes
326
326
  * - Optional draggable behavior for side-by-side interaction
327
327
  * - Floating action rail for quick actions like close, expand, etc.
328
- * - Responsive bottom sheet layout on mobile
329
328
  *
330
329
  * @example
331
330
  * // Simple uncontrolled modal
@@ -1,5 +1,5 @@
1
1
  // src/v2/Modal.tsx
2
- import * as React12 from "react";
2
+ import * as React11 from "react";
3
3
  import * as Dialog6 from "@radix-ui/react-dialog";
4
4
  import { AnimatePresence } from "motion/react";
5
5
 
@@ -17,7 +17,7 @@ import {
17
17
  } from "@sproutsocial/seeds-react-system-props";
18
18
 
19
19
  // src/v2/components/ModalContent.tsx
20
- import * as React2 from "react";
20
+ import * as React from "react";
21
21
  import * as Dialog from "@radix-ui/react-dialog";
22
22
  import { motion } from "motion/react";
23
23
  import styled from "styled-components";
@@ -33,7 +33,6 @@ var MODAL_SIZE_PRESETS = {
33
33
  large: "800px",
34
34
  full: "90vw"
35
35
  };
36
- var MOBILE_BREAKPOINT = "780px";
37
36
  var RAIL_BUTTON_SIZE = 44;
38
37
  var RAIL_OFFSET = 12;
39
38
  var RAIL_GAP = 12;
@@ -48,17 +47,11 @@ import {
48
47
  } from "@sproutsocial/seeds-react-system-props";
49
48
 
50
49
  // src/v2/MotionConfig.ts
51
- import * as React from "react";
52
- var DURATION_MOBILE = 0.6;
53
50
  var DURATION_DESKTOP = 0.3;
54
51
  var desktopTransition = {
55
52
  duration: DURATION_DESKTOP,
56
53
  ease: "easeInOut"
57
54
  };
58
- var mobileTransition = {
59
- duration: DURATION_MOBILE,
60
- ease: "easeInOut"
61
- };
62
55
  var desktopModalVariants = {
63
56
  initial: {
64
57
  opacity: 0,
@@ -96,40 +89,6 @@ var desktopOverlayVariants = {
96
89
  transition: desktopTransition
97
90
  }
98
91
  };
99
- var mobileDrawerVariants = {
100
- initial: {
101
- opacity: 0,
102
- x: "-50%",
103
- y: "100%",
104
- transition: mobileTransition
105
- },
106
- animate: {
107
- opacity: 1,
108
- x: "-50%",
109
- y: 0,
110
- transition: mobileTransition
111
- },
112
- exit: {
113
- opacity: 0,
114
- x: "-50%",
115
- y: "100%",
116
- transition: mobileTransition
117
- }
118
- };
119
- var mobileOverlayVariants = {
120
- initial: {
121
- opacity: 0,
122
- transition: mobileTransition
123
- },
124
- animate: {
125
- opacity: 1,
126
- transition: mobileTransition
127
- },
128
- exit: {
129
- opacity: 0,
130
- transition: mobileTransition
131
- }
132
- };
133
92
  var draggableModalVariants = {
134
93
  initial: {
135
94
  opacity: 0,
@@ -144,42 +103,19 @@ var draggableModalVariants = {
144
103
  transition: desktopTransition
145
104
  }
146
105
  };
147
- function getContentVariants(isMobile, isDraggable) {
148
- if (isDraggable) {
149
- return draggableModalVariants;
150
- }
151
- return isMobile ? mobileDrawerVariants : desktopModalVariants;
106
+ function getContentVariants(isDraggable) {
107
+ return isDraggable ? draggableModalVariants : desktopModalVariants;
152
108
  }
153
- function getOverlayVariants(isMobile) {
154
- return isMobile ? mobileOverlayVariants : desktopOverlayVariants;
155
- }
156
- function useIsMobile() {
157
- const [isMobile, setIsMobile] = React.useState(() => {
158
- if (typeof window === "undefined") return false;
159
- return window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT})`).matches;
160
- });
161
- React.useEffect(() => {
162
- if (typeof window === "undefined") return;
163
- const mediaQuery = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT})`);
164
- const handler = (e) => setIsMobile(e.matches);
165
- if (mediaQuery.addEventListener) {
166
- mediaQuery.addEventListener("change", handler);
167
- return () => mediaQuery.removeEventListener("change", handler);
168
- } else if (mediaQuery.addListener) {
169
- mediaQuery.addListener(handler);
170
- return () => mediaQuery.removeListener(handler);
171
- }
172
- }, []);
173
- return isMobile;
109
+ function getOverlayVariants() {
110
+ return desktopOverlayVariants;
174
111
  }
175
112
 
176
113
  // src/v2/components/ModalContent.tsx
177
114
  import { jsx } from "react/jsx-runtime";
178
115
  var StyledMotionWrapper = styled(motion.div)`
179
116
  position: fixed;
180
- top: ${(props) => props.$isMobile ? "auto" : "50%"};
117
+ top: 50%;
181
118
  left: 50%;
182
- bottom: ${(props) => props.$isMobile ? 0 : "auto"};
183
119
  z-index: ${(props) => props.$zIndex ? props.$zIndex + 1 : 7};
184
120
  `;
185
121
  var StyledContent = styled.div.withConfig({
@@ -194,33 +130,10 @@ var StyledContent = styled.div.withConfig({
194
130
  color: ${(props) => props.theme.colors.text.body};
195
131
  outline: none;
196
132
  width: ${DEFAULT_MODAL_WIDTH};
197
- max-width: ${(props) => {
198
- return `calc(100vw - ${BODY_PADDING} - ${RAIL_EXTRA_SPACE}px)`;
199
- }};
133
+ /* Account for rail space on the side; shrinks to fit small viewports */
134
+ max-width: calc(100vw - ${BODY_PADDING} - ${RAIL_EXTRA_SPACE}px);
200
135
  max-height: calc(100vh - ${BODY_PADDING});
201
136
 
202
- /* Mobile styles for viewport <= ${MOBILE_BREAKPOINT} */
203
- @media (max-width: ${MOBILE_BREAKPOINT}) {
204
- /* Full viewport width - edge to edge */
205
- width: 100vw;
206
- max-width: 100vw;
207
- min-width: 100vw;
208
-
209
- /* Height hugs content, with increased max-height to get closer to top */
210
- /* Subtract space for rail + comfortable gap (44px rail + ~40px gap) */
211
- height: auto;
212
- max-height: calc(95vh - 84px);
213
-
214
- /* Adjust border radius for mobile - rounded top, flat bottom to blend with device */
215
- border-top-left-radius: ${(props) => props.theme.radii[800]};
216
- border-top-right-radius: ${(props) => props.theme.radii[800]};
217
- border-bottom-left-radius: 0;
218
- border-bottom-right-radius: 0;
219
-
220
- /* Mobile shadow - appears to cast upward (high-reverse) */
221
- box-shadow: 0px -16px 32px 0px rgba(39, 51, 51, 0.24);
222
- }
223
-
224
137
  @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
225
138
  height: calc(100vh - ${BODY_PADDING});
226
139
  }
@@ -231,9 +144,9 @@ var StyledContent = styled.div.withConfig({
231
144
  ${LAYOUT}
232
145
  `;
233
146
  StyledContent.displayName = "ModalContent";
234
- var DragContext = React2.createContext(null);
147
+ var DragContext = React.createContext(null);
235
148
  var useDragContext = () => {
236
- const context = React2.useContext(DragContext);
149
+ const context = React.useContext(DragContext);
237
150
  return context;
238
151
  };
239
152
  var StaticModalContent = ({
@@ -244,12 +157,10 @@ var StaticModalContent = ({
244
157
  rest,
245
158
  dialogContentProps
246
159
  }) => {
247
- const isMobile = useIsMobile();
248
- const contentVariants = getContentVariants(isMobile, false);
160
+ const contentVariants = getContentVariants(false);
249
161
  return /* @__PURE__ */ jsx(DragContext.Provider, { value: null, children: /* @__PURE__ */ jsx(Dialog.Content, { asChild: true, "aria-label": label, ...dialogContentProps, children: /* @__PURE__ */ jsx(
250
162
  StyledMotionWrapper,
251
163
  {
252
- $isMobile: isMobile,
253
164
  $zIndex: zIndex,
254
165
  variants: contentVariants,
255
166
  initial: "initial",
@@ -276,11 +187,10 @@ var DraggableModalContent = ({
276
187
  rest,
277
188
  dialogContentProps
278
189
  }) => {
279
- const [position, setPosition] = React2.useState({ x: 0, y: 0 });
280
- const [isDragging, setIsDragging] = React2.useState(false);
281
- const contentRef = React2.useRef(null);
282
- const isMobile = useIsMobile();
283
- const handleHeaderMouseDown = React2.useCallback((e) => {
190
+ const [position, setPosition] = React.useState({ x: 0, y: 0 });
191
+ const [isDragging, setIsDragging] = React.useState(false);
192
+ const contentRef = React.useRef(null);
193
+ const handleHeaderMouseDown = React.useCallback((e) => {
284
194
  const target = e.target;
285
195
  if (target.tagName === "BUTTON" || target.tagName === "INPUT" || target.closest("button")) {
286
196
  return;
@@ -295,18 +205,12 @@ var DraggableModalContent = ({
295
205
  e2.preventDefault();
296
206
  const newX = e2.clientX - offsetX;
297
207
  const newY = e2.clientY - offsetY;
298
- const isRailOnSide = window.innerWidth > 780;
299
208
  const modalWidth = rect.width;
300
209
  const modalHeight = rect.height;
301
- let maxX = window.innerWidth - modalWidth;
302
- let minX = 0;
303
- let maxY = window.innerHeight - modalHeight;
304
- let minY = 0;
305
- if (isRailOnSide) {
306
- maxX = window.innerWidth - modalWidth - RAIL_EXTRA_SPACE;
307
- } else {
308
- minY = RAIL_BUTTON_SIZE + RAIL_OFFSET;
309
- }
210
+ const minX = 0;
211
+ const maxX = window.innerWidth - modalWidth - RAIL_EXTRA_SPACE;
212
+ const minY = 0;
213
+ const maxY = window.innerHeight - modalHeight;
310
214
  const constrainedX = Math.max(minX, Math.min(maxX, newX));
311
215
  const constrainedY = Math.max(minY, Math.min(maxY, newY));
312
216
  const centerX = window.innerWidth / 2 - modalWidth / 2;
@@ -324,7 +228,7 @@ var DraggableModalContent = ({
324
228
  document.addEventListener("mousemove", handleMouseMove);
325
229
  document.addEventListener("mouseup", handleMouseUp);
326
230
  }, []);
327
- const dragContextValue = React2.useMemo(
231
+ const dragContextValue = React.useMemo(
328
232
  () => ({
329
233
  position,
330
234
  isDragging,
@@ -334,10 +238,10 @@ var DraggableModalContent = ({
334
238
  }),
335
239
  [position, isDragging, handleHeaderMouseDown]
336
240
  );
337
- const handleInteractOutside = React2.useCallback((e) => {
241
+ const handleInteractOutside = React.useCallback((e) => {
338
242
  e.preventDefault();
339
243
  }, []);
340
- const contentVariants = getContentVariants(isMobile, true);
244
+ const contentVariants = getContentVariants(true);
341
245
  return /* @__PURE__ */ jsx(DragContext.Provider, { value: dragContextValue, children: /* @__PURE__ */ jsx(
342
246
  Dialog.Content,
343
247
  {
@@ -348,7 +252,6 @@ var DraggableModalContent = ({
348
252
  children: /* @__PURE__ */ jsx(
349
253
  StyledMotionWrapper,
350
254
  {
351
- $isMobile: isMobile,
352
255
  $zIndex: zIndex,
353
256
  variants: contentVariants,
354
257
  initial: "initial",
@@ -444,7 +347,7 @@ import {
444
347
  } from "@sproutsocial/seeds-react-system-props";
445
348
 
446
349
  // src/v2/components/ModalCloseWrapper.tsx
447
- import * as React4 from "react";
350
+ import * as React3 from "react";
448
351
  import * as Dialog3 from "@radix-ui/react-dialog";
449
352
  import { jsx as jsx3 } from "react/jsx-runtime";
450
353
  var ModalCloseWrapper = (props) => {
@@ -452,7 +355,7 @@ var ModalCloseWrapper = (props) => {
452
355
  const handleClick = (e) => {
453
356
  onClick?.(e);
454
357
  };
455
- return /* @__PURE__ */ jsx3(Dialog3.Close, { asChild, onClick: handleClick, ...rest, children: React4.isValidElement(children) ? React4.cloneElement(children, {
358
+ return /* @__PURE__ */ jsx3(Dialog3.Close, { asChild, onClick: handleClick, ...rest, children: React3.isValidElement(children) ? React3.cloneElement(children, {
456
359
  "data-slot": "modal-close-wrapper",
457
360
  "data-qa-modal-close-wrapper": "",
458
361
  ...children.props || {}
@@ -474,12 +377,6 @@ var ModalCustomFooter = styled3(Box2)`
474
377
  justify-content: flex-end;
475
378
  gap: ${(props) => props.theme.space[100]};
476
379
 
477
- /* Flat bottom corners to blend with device edge on mobile */
478
- @media (max-width: ${MOBILE_BREAKPOINT}) {
479
- border-bottom-right-radius: 0;
480
- border-bottom-left-radius: 0;
481
- }
482
-
483
380
  ${COMMON3}
484
381
  ${FLEXBOX3}
485
382
  ${BORDER3}
@@ -509,7 +406,7 @@ var ModalFooter = (props) => {
509
406
  ModalFooter.displayName = "ModalFooter";
510
407
 
511
408
  // src/v2/components/ModalBody.tsx
512
- import * as React6 from "react";
409
+ import * as React5 from "react";
513
410
  import styled4 from "styled-components";
514
411
  import Box3 from "@sproutsocial/seeds-react-box";
515
412
  import {
@@ -536,7 +433,7 @@ var StyledModalBody = styled4(Box3)`
536
433
  ${LAYOUT4}
537
434
  `;
538
435
  StyledModalBody.displayName = "ModalBody";
539
- var ModalBody = React6.forwardRef(
436
+ var ModalBody = React5.forwardRef(
540
437
  ({ children, ...rest }, ref) => {
541
438
  return /* @__PURE__ */ jsx5(
542
439
  StyledModalBody,
@@ -553,11 +450,11 @@ var ModalBody = React6.forwardRef(
553
450
  ModalBody.displayName = "ModalBody";
554
451
 
555
452
  // src/v2/components/ModalDescription.tsx
556
- import * as React7 from "react";
453
+ import * as React6 from "react";
557
454
  import * as Dialog4 from "@radix-ui/react-dialog";
558
455
  import Box4 from "@sproutsocial/seeds-react-box";
559
456
  import { jsx as jsx6 } from "react/jsx-runtime";
560
- var ModalDescription = React7.forwardRef(({ children, descriptionProps = {}, ...rest }, ref) => {
457
+ var ModalDescription = React6.forwardRef(({ children, descriptionProps = {}, ...rest }, ref) => {
561
458
  return /* @__PURE__ */ jsx6(Dialog4.Description, { asChild: true, ...descriptionProps, children: /* @__PURE__ */ jsx6(
562
459
  Box4,
563
460
  {
@@ -583,16 +480,6 @@ var Rail = styled5.div`
583
480
  flex-direction: column;
584
481
  gap: ${RAIL_GAP}px;
585
482
  z-index: 1;
586
-
587
- @media (max-width: ${MOBILE_BREAKPOINT}) {
588
- /* Move rail above the modal on the right side */
589
- top: auto;
590
- bottom: calc(100% + ${RAIL_OFFSET}px);
591
- right: ${RAIL_OFFSET}px;
592
- left: auto;
593
- /* Change to horizontal layout with reversed order */
594
- flex-direction: row-reverse;
595
- }
596
483
  `;
597
484
  var ModalRail = ({ children }) => {
598
485
  return /* @__PURE__ */ jsx7(
@@ -734,11 +621,11 @@ var ModalAction = ({
734
621
  ModalAction.displayName = "ModalAction";
735
622
 
736
623
  // src/v2/components/ModalExternalTrigger.tsx
737
- import * as React10 from "react";
624
+ import * as React9 from "react";
738
625
  import { Button } from "@sproutsocial/seeds-react-button";
739
626
  import { jsx as jsx9 } from "react/jsx-runtime";
740
- var ModalExternalTrigger = React10.forwardRef(({ isOpen, onTrigger, modalId, onClick, ...buttonProps }, ref) => {
741
- const handleClick = React10.useCallback(
627
+ var ModalExternalTrigger = React9.forwardRef(({ isOpen, onTrigger, modalId, onClick, ...buttonProps }, ref) => {
628
+ const handleClick = React9.useCallback(
742
629
  (e) => {
743
630
  onClick?.(e);
744
631
  if (!e.defaultPrevented) {
@@ -830,15 +717,15 @@ var Modal = (props) => {
830
717
  disableEscapeKeyClose = false,
831
718
  ...rest
832
719
  } = props;
833
- const [isOpen, setIsOpen] = React12.useState(defaultOpen ?? false);
834
- const handleOpenChange = React12.useCallback(
720
+ const [isOpen, setIsOpen] = React11.useState(defaultOpen ?? false);
721
+ const handleOpenChange = React11.useCallback(
835
722
  (newOpen) => {
836
723
  setIsOpen(newOpen);
837
724
  onOpenChange?.(newOpen);
838
725
  },
839
726
  [onOpenChange]
840
727
  );
841
- const dataAttributes = React12.useMemo(() => {
728
+ const dataAttributes = React11.useMemo(() => {
842
729
  const attrs = {};
843
730
  Object.entries(data).forEach(([key, value]) => {
844
731
  attrs[`data-${key}`] = String(value);
@@ -850,10 +737,9 @@ var Modal = (props) => {
850
737
  return attrs;
851
738
  }, [data, open]);
852
739
  const shouldRenderHeader = Boolean(title || subtitle);
853
- const isMobile = useIsMobile();
854
- const overlayVariants = getOverlayVariants(isMobile);
740
+ const overlayVariants = getOverlayVariants();
855
741
  const ModalContentComponent = draggable ? DraggableModalContent : StaticModalContent;
856
- const wrappedOnInteractOutside = React12.useCallback(
742
+ const wrappedOnInteractOutside = React11.useCallback(
857
743
  (e) => {
858
744
  if (disableOutsideClickClose) {
859
745
  e.preventDefault();
@@ -862,12 +748,16 @@ var Modal = (props) => {
862
748
  },
863
749
  [disableOutsideClickClose, onInteractOutside]
864
750
  );
865
- const wrappedOnEscapeKeyDown = React12.useCallback(
751
+ const wrappedOnEscapeKeyDown = React11.useCallback(
866
752
  (e) => {
867
753
  const hasOpenPopout = document.querySelector("[data-qa-popout]") !== null;
868
754
  if (hasOpenPopout) {
869
755
  e.preventDefault();
870
756
  }
757
+ const hasOpenBaseUIPopup = document.querySelector("[role='dialog'] [data-open]") !== null;
758
+ if (hasOpenBaseUIPopup) {
759
+ e.preventDefault();
760
+ }
871
761
  if (disableEscapeKeyClose) {
872
762
  e.preventDefault();
873
763
  }
@@ -945,7 +835,7 @@ var Modal = (props) => {
945
835
  );
946
836
  };
947
837
  function useModalTriggerProps(isOpen, modalId) {
948
- return React12.useMemo(
838
+ return React11.useMemo(
949
839
  () => ({
950
840
  "aria-haspopup": "dialog",
951
841
  "aria-expanded": isOpen,
@@ -955,8 +845,8 @@ function useModalTriggerProps(isOpen, modalId) {
955
845
  );
956
846
  }
957
847
  function useModalExternalTrigger(modalId) {
958
- const triggerRef = React12.useRef(null);
959
- const triggerProps = React12.useCallback(
848
+ const triggerRef = React11.useRef(null);
849
+ const triggerProps = React11.useCallback(
960
850
  (isOpen) => ({
961
851
  "aria-haspopup": "dialog",
962
852
  "aria-expanded": isOpen,
@@ -964,7 +854,7 @@ function useModalExternalTrigger(modalId) {
964
854
  }),
965
855
  [modalId]
966
856
  );
967
- const onCloseAutoFocus = React12.useCallback((e) => {
857
+ const onCloseAutoFocus = React11.useCallback((e) => {
968
858
  e.preventDefault();
969
859
  triggerRef.current?.focus();
970
860
  }, []);
@@ -991,4 +881,4 @@ export {
991
881
  useModalExternalTrigger,
992
882
  Modal_default
993
883
  };
994
- //# sourceMappingURL=chunk-XQ2A6HDC.js.map
884
+ //# sourceMappingURL=chunk-KZ6XTIWT.js.map