@sproutsocial/seeds-react-modal 2.2.4 → 2.3.0

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 37.00 KB
12
- CJS dist/v2/index.js 28.98 KB
11
+ CJS dist/index.js 38.17 KB
13
12
  CJS dist/v1/index.js 9.86 KB
14
- CJS dist/index.js.map 66.80 KB
15
- CJS dist/v2/index.js.map 53.42 KB
13
+ CJS dist/v2/index.js 30.16 KB
14
+ CJS dist/index.js.map 69.27 KB
16
15
  CJS dist/v1/index.js.map 13.03 KB
17
- CJS ⚡️ Build success in 202ms
16
+ CJS dist/v2/index.js.map 55.88 KB
17
+ CJS ⚡️ Build success in 201ms
18
18
  ESM dist/esm/index.js 583.00 B
19
- ESM dist/esm/chunk-IYDY4OPB.js 7.12 KB
20
- ESM dist/esm/chunk-UP2XQN57.js 24.15 KB
21
19
  ESM dist/esm/v1/index.js 165.00 B
22
20
  ESM dist/esm/v2/index.js 596.00 B
21
+ ESM dist/esm/chunk-IYDY4OPB.js 7.12 KB
22
+ ESM dist/esm/chunk-4F3JQDQZ.js 25.32 KB
23
23
  ESM dist/esm/index.js.map 1.05 KB
24
- ESM dist/esm/chunk-IYDY4OPB.js.map 12.85 KB
25
- ESM dist/esm/chunk-UP2XQN57.js.map 52.53 KB
26
24
  ESM dist/esm/v1/index.js.map 71.00 B
27
25
  ESM dist/esm/v2/index.js.map 71.00 B
28
- ESM ⚡️ Build success in 218ms
26
+ ESM dist/esm/chunk-IYDY4OPB.js.map 12.85 KB
27
+ ESM dist/esm/chunk-4F3JQDQZ.js.map 54.99 KB
28
+ ESM ⚡️ Build success in 205ms
29
29
  DTS Build start
30
- DTS ⚡️ Build success in 17495ms
30
+ DTS ⚡️ Build success in 16886ms
31
31
  DTS dist/index.d.ts 975.00 B
32
32
  DTS dist/v1/index.d.ts 413.00 B
33
33
  DTS dist/v2/index.d.ts 1021.00 B
34
34
  DTS dist/Modal-ki8oiGbC.d.ts 2.52 KB
35
- DTS dist/ModalAction-gIgCE73I.d.ts 15.19 KB
35
+ DTS dist/ModalAction-B9lvk1rm.d.ts 16.80 KB
36
36
  DTS dist/index.d.mts 978.00 B
37
37
  DTS dist/v1/index.d.mts 415.00 B
38
38
  DTS dist/v2/index.d.mts 1022.00 B
39
39
  DTS dist/Modal-ki8oiGbC.d.mts 2.52 KB
40
- DTS dist/ModalAction-gIgCE73I.d.mts 15.19 KB
41
- Done in 19.53s.
40
+ DTS dist/ModalAction-B9lvk1rm.d.mts 16.80 KB
41
+ Done in 19.02s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @sproutsocial/seeds-react-modal
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c76c353: Add modal interaction control to Modal v2 with both convenience props and Radix UI event handlers.
8
+
9
+ Convenience Boolean Props (recommended for simple cases):
10
+
11
+ - `disableOutsideClickClose`: Prevents modal from closing when clicking outside. Custom `onInteractOutside` handlers still fire for side effects.
12
+ - `disableEscapeKeyClose`: Prevents modal from closing when pressing Escape key. Custom `onEscapeKeyDown` handlers still fire for side effects.
13
+
14
+ Radix UI Dialog.Content Event Handlers (for granular control):
15
+
16
+ - `onInteractOutside`: Control behavior when user interacts outside the modal
17
+ - `onEscapeKeyDown`: Control behavior when Escape key is pressed
18
+ - `onPointerDownOutside`: Handle pointer down events outside the modal
19
+ - `onFocusOutside`: Handle focus moving outside the modal
20
+ - `onOpenAutoFocus`: Handle focus behavior when modal opens
21
+ - `onCloseAutoFocus`: Handle focus behavior when modal closes
22
+
23
+ Boolean props can be combined with event handlers - the boolean prevents closing while the handler adds custom side effects like analytics or warnings.
24
+
25
+ Draggable Modal Restrictions: `disableOutsideClickClose` and `onInteractOutside` are not supported for draggable modals (TypeScript will error) as they conflict with the draggable UX. All other props including `disableEscapeKeyClose` work with draggable modals. This is enforced through TypeScript discriminated union types.
26
+
27
+ ### Patch Changes
28
+
29
+ - @sproutsocial/seeds-react-theme@3.3.2
30
+ - @sproutsocial/seeds-react-box@1.1.10
31
+ - @sproutsocial/seeds-react-icon@2.1.1
32
+ - @sproutsocial/seeds-react-button@1.3.12
33
+
34
+ ## 2.2.5
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [b147e07]
39
+ - @sproutsocial/seeds-react-icon@2.1.0
40
+ - @sproutsocial/seeds-react-button@1.3.11
41
+
3
42
  ## 2.2.4
4
43
 
5
44
  ### Patch Changes
@@ -111,6 +111,16 @@ type TypeModalActionProps = ({
111
111
  /** Click handler for the button */
112
112
  onClick?: () => void;
113
113
  } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onClick">);
114
+ /**
115
+ * Event handler props from Radix UI Dialog.Content.
116
+ * These control modal interaction behavior like closing on outside clicks or escape key.
117
+ */
118
+ type DialogContentEventHandlers = Pick<React.ComponentPropsWithoutRef<typeof Dialog.Content>, "onOpenAutoFocus" | "onCloseAutoFocus" | "onEscapeKeyDown" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside">;
119
+ /**
120
+ * Dialog.Content event handlers excluding onInteractOutside.
121
+ * Used for draggable modals where onInteractOutside conflicts with the draggable UX.
122
+ */
123
+ type DialogContentEventHandlersWithoutInteractOutside = Omit<DialogContentEventHandlers, "onInteractOutside">;
114
124
  /**
115
125
  * Base common props shared by all modal variants (without close button props).
116
126
  */
@@ -139,6 +149,16 @@ type TypeModalCommonPropsBase = TypeContainerProps & Omit<React.ComponentPropsWi
139
149
  actions?: TypeModalActionProps[];
140
150
  /** Controls the z-index CSS property (defaults to 6 to match Modal v1) */
141
151
  zIndex?: number;
152
+ /**
153
+ * Prevents the modal from closing when clicking outside.
154
+ * The onInteractOutside handler will still be called if provided.
155
+ */
156
+ disableOutsideClickClose?: boolean;
157
+ /**
158
+ * Prevents the modal from closing when pressing the Escape key.
159
+ * The onEscapeKeyDown handler will still be called if provided.
160
+ */
161
+ disableEscapeKeyClose?: boolean;
142
162
  };
143
163
  /**
144
164
  * Common props with close button accessibility enforcement.
@@ -194,13 +214,23 @@ type TypeModalCommonProps = (TypeModalCommonPropsBase & {
194
214
  /**
195
215
  * Base props with draggable and showOverlay relationship enforced.
196
216
  *
197
- * When draggable is true, showOverlay must be false because the overlay
198
- * would block interaction with content behind the modal.
217
+ * When draggable is true:
218
+ * - showOverlay must be false (overlay would block interaction with content behind the modal)
219
+ * - onInteractOutside is not allowed (conflicts with draggable UX which needs to keep modal open)
220
+ * - disableOutsideClickClose is not allowed (since onInteractOutside is not supported)
221
+ *
222
+ * When draggable is false (or undefined):
223
+ * - All Dialog.Content event handlers are available including onInteractOutside
224
+ * - disableOutsideClickClose can be used
199
225
  */
200
- type TypeModalBaseProps = (TypeModalCommonProps & {
226
+ type TypeModalBaseProps = (TypeModalCommonProps & DialogContentEventHandlersWithoutInteractOutside & {
201
227
  draggable: true;
202
228
  showOverlay?: false;
203
- }) | (TypeModalCommonProps & {
229
+ /** onInteractOutside is not supported for draggable modals */
230
+ onInteractOutside?: never;
231
+ /** disableOutsideClickClose is not supported for draggable modals */
232
+ disableOutsideClickClose?: never;
233
+ }) | (TypeModalCommonProps & DialogContentEventHandlers & {
204
234
  draggable?: false;
205
235
  showOverlay?: boolean;
206
236
  });
@@ -111,6 +111,16 @@ type TypeModalActionProps = ({
111
111
  /** Click handler for the button */
112
112
  onClick?: () => void;
113
113
  } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onClick">);
114
+ /**
115
+ * Event handler props from Radix UI Dialog.Content.
116
+ * These control modal interaction behavior like closing on outside clicks or escape key.
117
+ */
118
+ type DialogContentEventHandlers = Pick<React.ComponentPropsWithoutRef<typeof Dialog.Content>, "onOpenAutoFocus" | "onCloseAutoFocus" | "onEscapeKeyDown" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside">;
119
+ /**
120
+ * Dialog.Content event handlers excluding onInteractOutside.
121
+ * Used for draggable modals where onInteractOutside conflicts with the draggable UX.
122
+ */
123
+ type DialogContentEventHandlersWithoutInteractOutside = Omit<DialogContentEventHandlers, "onInteractOutside">;
114
124
  /**
115
125
  * Base common props shared by all modal variants (without close button props).
116
126
  */
@@ -139,6 +149,16 @@ type TypeModalCommonPropsBase = TypeContainerProps & Omit<React.ComponentPropsWi
139
149
  actions?: TypeModalActionProps[];
140
150
  /** Controls the z-index CSS property (defaults to 6 to match Modal v1) */
141
151
  zIndex?: number;
152
+ /**
153
+ * Prevents the modal from closing when clicking outside.
154
+ * The onInteractOutside handler will still be called if provided.
155
+ */
156
+ disableOutsideClickClose?: boolean;
157
+ /**
158
+ * Prevents the modal from closing when pressing the Escape key.
159
+ * The onEscapeKeyDown handler will still be called if provided.
160
+ */
161
+ disableEscapeKeyClose?: boolean;
142
162
  };
143
163
  /**
144
164
  * Common props with close button accessibility enforcement.
@@ -194,13 +214,23 @@ type TypeModalCommonProps = (TypeModalCommonPropsBase & {
194
214
  /**
195
215
  * Base props with draggable and showOverlay relationship enforced.
196
216
  *
197
- * When draggable is true, showOverlay must be false because the overlay
198
- * would block interaction with content behind the modal.
217
+ * When draggable is true:
218
+ * - showOverlay must be false (overlay would block interaction with content behind the modal)
219
+ * - onInteractOutside is not allowed (conflicts with draggable UX which needs to keep modal open)
220
+ * - disableOutsideClickClose is not allowed (since onInteractOutside is not supported)
221
+ *
222
+ * When draggable is false (or undefined):
223
+ * - All Dialog.Content event handlers are available including onInteractOutside
224
+ * - disableOutsideClickClose can be used
199
225
  */
200
- type TypeModalBaseProps = (TypeModalCommonProps & {
226
+ type TypeModalBaseProps = (TypeModalCommonProps & DialogContentEventHandlersWithoutInteractOutside & {
201
227
  draggable: true;
202
228
  showOverlay?: false;
203
- }) | (TypeModalCommonProps & {
229
+ /** onInteractOutside is not supported for draggable modals */
230
+ onInteractOutside?: never;
231
+ /** disableOutsideClickClose is not supported for draggable modals */
232
+ disableOutsideClickClose?: never;
233
+ }) | (TypeModalCommonProps & DialogContentEventHandlers & {
204
234
  draggable?: false;
205
235
  showOverlay?: boolean;
206
236
  });
@@ -240,11 +240,12 @@ var StaticModalContent = ({
240
240
  label,
241
241
  dataAttributes,
242
242
  zIndex,
243
- rest
243
+ rest,
244
+ dialogContentProps
244
245
  }) => {
245
246
  const isMobile = useIsMobile();
246
247
  const contentVariants = getContentVariants(isMobile, false);
247
- return /* @__PURE__ */ jsx(DragContext.Provider, { value: null, children: /* @__PURE__ */ jsx(Dialog.Content, { asChild: true, "aria-label": label, children: /* @__PURE__ */ jsx(
248
+ return /* @__PURE__ */ jsx(DragContext.Provider, { value: null, children: /* @__PURE__ */ jsx(Dialog.Content, { asChild: true, "aria-label": label, ...dialogContentProps, children: /* @__PURE__ */ jsx(
248
249
  StyledMotionWrapper,
249
250
  {
250
251
  $isMobile: isMobile,
@@ -271,7 +272,8 @@ var DraggableModalContent = ({
271
272
  label,
272
273
  dataAttributes,
273
274
  zIndex,
274
- rest
275
+ rest,
276
+ dialogContentProps
275
277
  }) => {
276
278
  const [position, setPosition] = React2.useState({ x: 0, y: 0 });
277
279
  const [isDragging, setIsDragging] = React2.useState(false);
@@ -340,6 +342,7 @@ var DraggableModalContent = ({
340
342
  {
341
343
  asChild: true,
342
344
  "aria-label": label,
345
+ ...dialogContentProps,
343
346
  onInteractOutside: handleInteractOutside,
344
347
  children: /* @__PURE__ */ jsx(
345
348
  StyledMotionWrapper,
@@ -759,6 +762,16 @@ var Modal = (props) => {
759
762
  closeButtonAriaLabel = "Close",
760
763
  closeButtonProps,
761
764
  zIndex = 6,
765
+ // Extract Dialog.Content event handlers
766
+ onOpenAutoFocus,
767
+ onCloseAutoFocus,
768
+ onEscapeKeyDown,
769
+ onPointerDownOutside,
770
+ onFocusOutside,
771
+ onInteractOutside,
772
+ // Extract convenience boolean props
773
+ disableOutsideClickClose = false,
774
+ disableEscapeKeyClose = false,
762
775
  ...rest
763
776
  } = props;
764
777
  const [isOpen, setIsOpen] = React11.useState(defaultOpen ?? false);
@@ -784,6 +797,24 @@ var Modal = (props) => {
784
797
  const isMobile = useIsMobile();
785
798
  const overlayVariants = getOverlayVariants(isMobile);
786
799
  const ModalContentComponent = draggable ? DraggableModalContent : StaticModalContent;
800
+ const wrappedOnInteractOutside = React11.useCallback(
801
+ (e) => {
802
+ if (disableOutsideClickClose) {
803
+ e.preventDefault();
804
+ }
805
+ onInteractOutside?.(e);
806
+ },
807
+ [disableOutsideClickClose, onInteractOutside]
808
+ );
809
+ const wrappedOnEscapeKeyDown = React11.useCallback(
810
+ (e) => {
811
+ if (disableEscapeKeyClose) {
812
+ e.preventDefault();
813
+ }
814
+ onEscapeKeyDown?.(e);
815
+ },
816
+ [disableEscapeKeyClose, onEscapeKeyDown]
817
+ );
787
818
  return /* @__PURE__ */ jsxs3(
788
819
  Dialog6.Root,
789
820
  {
@@ -807,6 +838,7 @@ var Modal = (props) => {
807
838
  {
808
839
  "data-slot": "modal-overlay",
809
840
  "data-qa-modal-overlay": true,
841
+ "data-testid": "modal-overlay",
810
842
  allowInteraction: draggable
811
843
  }
812
844
  )
@@ -820,6 +852,14 @@ var Modal = (props) => {
820
852
  draggable,
821
853
  zIndex,
822
854
  rest,
855
+ dialogContentProps: {
856
+ onOpenAutoFocus,
857
+ onCloseAutoFocus,
858
+ onEscapeKeyDown: wrappedOnEscapeKeyDown,
859
+ onPointerDownOutside,
860
+ onFocusOutside,
861
+ onInteractOutside: wrappedOnInteractOutside
862
+ },
823
863
  children: [
824
864
  /* @__PURE__ */ jsxs3(ModalRail, { children: [
825
865
  /* @__PURE__ */ jsx9(
@@ -862,4 +902,4 @@ export {
862
902
  ModalAction,
863
903
  Modal_default
864
904
  };
865
- //# sourceMappingURL=chunk-UP2XQN57.js.map
905
+ //# sourceMappingURL=chunk-4F3JQDQZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/v2/Modal.tsx","../../src/v2/components/ModalHeader.tsx","../../src/v2/components/ModalContent.tsx","../../src/shared/constants.ts","../../src/v2/MotionConfig.ts","../../src/v2/components/ModalFooter.tsx","../../src/v2/components/ModalCloseWrapper.tsx","../../src/v2/components/ModalBody.tsx","../../src/v2/components/ModalDescription.tsx","../../src/v2/components/ModalRail.tsx","../../src/v2/components/ModalAction.tsx","../../../seeds-react-mixins/src/index.ts","../../src/v2/components/ModalOverlay.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport { AnimatePresence } from \"motion/react\";\nimport {\n StyledOverlay,\n StyledMotionOverlay,\n DraggableModalContent,\n StaticModalContent,\n ModalHeader,\n ModalDescription,\n ModalRail,\n ModalAction,\n} from \"./components\";\nimport type { TypeModalProps } from \"./ModalTypes\";\nimport { getOverlayVariants, useIsMobile } from \"./MotionConfig\";\n\n// Type aliases for Dialog.Content event handlers\ntype InteractOutsideHandler = NonNullable<\n React.ComponentPropsWithoutRef<typeof Dialog.Content>[\"onInteractOutside\"]\n>;\ntype EscapeKeyDownHandler = NonNullable<\n React.ComponentPropsWithoutRef<typeof Dialog.Content>[\"onEscapeKeyDown\"]\n>;\n\n/**\n * Accessible modal dialog component built on Radix UI Dialog primitives.\n *\n * This component provides a flexible modal implementation with comprehensive accessibility\n * features, keyboard navigation, and focus management built in.\n *\n * Key capabilities:\n * - Automatic ARIA attributes and focus trapping\n * - ESC key and outside click to close\n * - Simplified API with title/subtitle props for common use cases\n * - Controlled and uncontrolled state modes\n * - Optional draggable behavior for side-by-side interaction\n * - Floating action rail for quick actions like close, expand, etc.\n * - Responsive bottom sheet layout on mobile\n *\n * @example\n * // Simple uncontrolled modal\n * <Modal\n * title=\"Delete Item\"\n * subtitle=\"This action cannot be undone\"\n * modalTrigger={<Button>Delete</Button>}\n * >\n * <ModalBody>Are you sure you want to delete this item?</ModalBody>\n * <ModalFooter\n * cancelButton={<Button>Cancel</Button>}\n * primaryButton={<Button appearance=\"destructive\">Delete</Button>}\n * />\n * </Modal>\n */\nconst Modal = (props: TypeModalProps) => {\n const {\n children,\n modalTrigger,\n draggable = false,\n open,\n defaultOpen,\n onOpenChange,\n \"aria-label\": label,\n title,\n subtitle,\n description,\n data = {},\n showOverlay = true,\n actions,\n closeButtonAriaLabel = \"Close\",\n closeButtonProps,\n zIndex = 6,\n // Extract Dialog.Content event handlers\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n // Extract convenience boolean props\n disableOutsideClickClose = false,\n disableEscapeKeyClose = false,\n ...rest\n } = props;\n\n // Track open state for AnimatePresence\n // This state is synced via onOpenChange regardless of controlled/uncontrolled mode\n const [isOpen, setIsOpen] = React.useState(defaultOpen ?? false);\n\n const handleOpenChange = React.useCallback(\n (newOpen: boolean) => {\n // Always sync state for AnimatePresence\n setIsOpen(newOpen);\n // Call user's callback\n onOpenChange?.(newOpen);\n },\n [onOpenChange]\n );\n\n // Create data attributes object\n const dataAttributes = React.useMemo(() => {\n const attrs: Record<string, string> = {};\n Object.entries(data).forEach(([key, value]) => {\n attrs[`data-${key}`] = String(value);\n });\n attrs[\"data-qa-modal\"] = \"\";\n // Only add open attribute if in controlled mode\n if (open !== undefined) {\n attrs[\"data-qa-modal-open\"] = String(open);\n }\n return attrs;\n }, [data, open]);\n\n // Determine if we should auto-render the header from provided props\n const shouldRenderHeader = Boolean(title || subtitle);\n\n // Get mobile state and appropriate overlay variants\n const isMobile = useIsMobile();\n const overlayVariants = getOverlayVariants(isMobile);\n\n // Choose the appropriate content component based on draggable prop\n const ModalContentComponent = draggable\n ? DraggableModalContent\n : StaticModalContent;\n\n // Wrap event handlers to support convenience boolean props\n const wrappedOnInteractOutside = React.useCallback<InteractOutsideHandler>(\n (e) => {\n if (disableOutsideClickClose) {\n e.preventDefault();\n }\n onInteractOutside?.(e);\n },\n [disableOutsideClickClose, onInteractOutside]\n );\n\n const wrappedOnEscapeKeyDown = React.useCallback<EscapeKeyDownHandler>(\n (e) => {\n if (disableEscapeKeyClose) {\n e.preventDefault();\n }\n onEscapeKeyDown?.(e);\n },\n [disableEscapeKeyClose, onEscapeKeyDown]\n );\n\n return (\n <Dialog.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={handleOpenChange}\n modal={!draggable}\n >\n {/* Render trigger button if provided */}\n {modalTrigger && <Dialog.Trigger asChild>{modalTrigger}</Dialog.Trigger>}\n\n <Dialog.Portal forceMount>\n <AnimatePresence mode=\"wait\">\n {(open ?? isOpen) && (\n <>\n {showOverlay && (\n <Dialog.Overlay asChild>\n <StyledMotionOverlay\n $zIndex={zIndex}\n variants={overlayVariants}\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n >\n <StyledOverlay\n data-slot=\"modal-overlay\"\n data-qa-modal-overlay\n data-testid=\"modal-overlay\"\n allowInteraction={draggable}\n />\n </StyledMotionOverlay>\n </Dialog.Overlay>\n )}\n <ModalContentComponent\n label={label}\n dataAttributes={dataAttributes}\n draggable={draggable}\n zIndex={zIndex}\n rest={rest}\n dialogContentProps={{\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown: wrappedOnEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside: wrappedOnInteractOutside,\n }}\n >\n {/* Floating actions rail - always show a close by default */}\n <ModalRail>\n <ModalAction\n actionType=\"close\"\n iconName=\"x-outline\"\n {...closeButtonProps}\n aria-label={\n (closeButtonProps as any)?.[\"aria-label\"] ??\n closeButtonAriaLabel\n }\n />\n {actions?.map((action, idx) => (\n <ModalAction key={idx} {...action} />\n ))}\n </ModalRail>\n {/* Auto-render header when title or subtitle is provided */}\n {shouldRenderHeader && (\n <ModalHeader title={title} subtitle={subtitle} />\n )}\n\n {/* Auto-render description when provided */}\n {description && (\n <ModalDescription>{description}</ModalDescription>\n )}\n\n {/* Main content */}\n {children}\n </ModalContentComponent>\n </>\n )}\n </AnimatePresence>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n\nexport default Modal;\n","import * as React from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport styled from \"styled-components\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport {\n COMMON,\n FLEXBOX,\n BORDER,\n LAYOUT,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeModalHeaderProps } from \"../ModalTypes\";\nimport { useDragContext } from \"./ModalContent\";\n\ninterface HeaderProps {\n draggable?: boolean;\n isDragging?: boolean;\n}\n\n/**\n * Base styled header component for custom modal headers.\n *\n * Use this component when you need complete control over the header layout\n * and don't want to use the slot-based ModalHeader component.\n *\n * @example\n * <ModalCustomHeader>\n * <YourCustomHeaderContent />\n * </ModalCustomHeader>\n */\nexport const ModalCustomHeader = styled(Box).withConfig({\n shouldForwardProp: (prop) => ![\"draggable\", \"isDragging\"].includes(prop),\n})<HeaderProps>`\n font-family: ${(props) => props.theme.fontFamily};\n padding: ${(props) => props.theme.space[400]};\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: 0 0 auto;\n\n /* Draggable cursor styling */\n ${(props) =>\n props.draggable &&\n `\n cursor: ${props.isDragging ? \"grabbing\" : \"grab\"};\n user-select: none;\n `}\n\n ${COMMON}\n ${FLEXBOX}\n ${BORDER}\n ${LAYOUT}\n`;\n\nModalCustomHeader.displayName = \"ModalCustomHeader\";\n\n/**\n * Modal header component with title and subtitle slots.\n *\n * This component only supports slot-based rendering via title and subtitle props.\n * For custom header layouts, use ModalCustomHeader instead.\n *\n * @example\n * <ModalHeader title=\"Delete Item\" subtitle=\"This action cannot be undone\" />\n */\nexport const ModalHeader = (props: TypeModalHeaderProps) => {\n const {\n title,\n subtitle,\n titleProps = {},\n subtitleProps = {},\n ...rest\n } = props;\n\n const dragContext = useDragContext();\n const isDraggable = dragContext?.draggable ?? false;\n\n return (\n <ModalCustomHeader\n data-slot=\"modal-header\"\n data-qa-modal-header\n {...rest}\n onMouseDown={isDraggable ? dragContext?.onHeaderMouseDown : undefined}\n draggable={isDraggable}\n isDragging={dragContext?.isDragging}\n >\n <Box>\n {title && (\n <Dialog.Title asChild {...titleProps}>\n <Text.Headline>{title}</Text.Headline>\n </Dialog.Title>\n )}\n {subtitle && (\n <Dialog.Description asChild {...subtitleProps}>\n <Text as=\"div\" fontSize={200}>\n {subtitle}\n </Text>\n </Dialog.Description>\n )}\n </Box>\n </ModalCustomHeader>\n );\n};\n\nModalHeader.displayName = \"ModalHeader\";\n","import * as React from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport { motion } from \"motion/react\";\nimport styled from \"styled-components\";\nimport {\n BODY_PADDING,\n DEFAULT_MODAL_WIDTH,\n MOBILE_BREAKPOINT,\n RAIL_EXTRA_SPACE,\n RAIL_BUTTON_SIZE,\n RAIL_OFFSET,\n} from \"../../shared/constants\";\nimport {\n COMMON,\n FLEXBOX,\n BORDER,\n LAYOUT,\n type TypeSystemCommonProps,\n type TypeSystemBorderProps,\n type TypeSystemLayoutProps,\n type TypeSystemFlexboxProps,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport { getContentVariants, useIsMobile } from \"../MotionConfig\";\n\ninterface StyledContentProps\n extends TypeSystemCommonProps,\n TypeSystemFlexboxProps,\n TypeSystemBorderProps,\n TypeSystemLayoutProps {\n isDragging?: boolean;\n draggable?: boolean;\n}\n\n// Styled motion.div wrapper that handles positioning\nconst StyledMotionWrapper = styled(motion.div)<{\n $isMobile: boolean;\n $zIndex?: number;\n}>`\n position: fixed;\n top: ${(props) => (props.$isMobile ? \"auto\" : \"50%\")};\n left: 50%;\n bottom: ${(props) => (props.$isMobile ? 0 : \"auto\")};\n z-index: ${(props) => (props.$zIndex ? props.$zIndex + 1 : 7)};\n`;\n\nexport const StyledContent = styled.div.withConfig({\n shouldForwardProp: (prop) => ![\"isDragging\", \"draggable\"].includes(prop),\n})<StyledContentProps>`\n display: flex;\n flex-direction: column;\n border-radius: ${(props) => props.theme.radii[800]};\n box-shadow: ${(props) => props.theme.shadows.high};\n filter: blur(0);\n background-color: ${(props) => props.theme.colors.container.background.base};\n color: ${(props) => props.theme.colors.text.body};\n outline: none;\n width: ${DEFAULT_MODAL_WIDTH};\n max-width: ${(props) => {\n // Account for rail space when positioned on the side (viewport > ${MOBILE_BREAKPOINT})\n // At viewport <= ${MOBILE_BREAKPOINT}, rail is above modal, so no horizontal space needed\n return `calc(100vw - ${BODY_PADDING} - ${RAIL_EXTRA_SPACE}px)`;\n }};\n max-height: calc(100vh - ${BODY_PADDING});\n\n /* Mobile styles for viewport <= ${MOBILE_BREAKPOINT} */\n @media (max-width: ${MOBILE_BREAKPOINT}) {\n /* Full viewport width - edge to edge */\n width: 100vw;\n max-width: 100vw;\n min-width: 100vw;\n\n /* Height hugs content, with increased max-height to get closer to top */\n /* Subtract space for rail + comfortable gap (44px rail + ~40px gap) */\n height: auto;\n max-height: calc(95vh - 84px);\n\n /* Adjust border radius for mobile - rounded top, flat bottom to blend with device */\n border-top-left-radius: ${(props) => props.theme.radii[800]};\n border-top-right-radius: ${(props) => props.theme.radii[800]};\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n\n /* Mobile shadow - appears to cast upward (high-reverse) */\n box-shadow: 0px -16px 32px 0px rgba(39, 51, 51, 0.24);\n }\n\n @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n height: calc(100vh - ${BODY_PADDING});\n }\n\n ${COMMON}\n ${FLEXBOX}\n ${BORDER}\n ${LAYOUT}\n`;\n\nStyledContent.displayName = \"ModalContent\";\n\n// Context to share drag state between modal content and header\ninterface DragContextValue {\n position: { x: number; y: number };\n isDragging: boolean;\n onHeaderMouseDown: (e: React.MouseEvent) => void;\n contentRef: React.RefObject<HTMLDivElement>;\n draggable: boolean;\n}\n\nexport const DragContext = React.createContext<DragContextValue | null>(null);\n\nexport const useDragContext = () => {\n const context = React.useContext(DragContext);\n return context;\n};\n\ninterface ModalContentProps {\n children: React.ReactNode;\n label?: string;\n dataAttributes: Record<string, string>;\n draggable?: boolean;\n zIndex?: number;\n rest: any;\n dialogContentProps?: Pick<\n React.ComponentPropsWithoutRef<typeof Dialog.Content>,\n | \"onOpenAutoFocus\"\n | \"onCloseAutoFocus\"\n | \"onEscapeKeyDown\"\n | \"onPointerDownOutside\"\n | \"onFocusOutside\"\n | \"onInteractOutside\"\n >;\n}\n\n/**\n * Static modal content component for non-draggable modals.\n * This is a lightweight version that doesn't include any drag logic.\n */\nexport const StaticModalContent: React.FC<ModalContentProps> = ({\n children,\n label,\n dataAttributes,\n zIndex,\n rest,\n dialogContentProps,\n}) => {\n const isMobile = useIsMobile();\n const contentVariants = getContentVariants(isMobile, false);\n\n return (\n <DragContext.Provider value={null}>\n <Dialog.Content asChild aria-label={label} {...dialogContentProps}>\n <StyledMotionWrapper\n $isMobile={isMobile}\n $zIndex={zIndex}\n variants={contentVariants}\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n >\n <StyledContent\n data-slot=\"modal-content\"\n draggable={false}\n {...dataAttributes}\n {...rest}\n >\n {children}\n </StyledContent>\n </StyledMotionWrapper>\n </Dialog.Content>\n </DragContext.Provider>\n );\n};\n\n/**\n * Draggable modal content component with full drag-and-drop functionality.\n * Only rendered when draggable={true} to avoid unnecessary overhead.\n */\nexport const DraggableModalContent: React.FC<ModalContentProps> = ({\n children,\n label,\n dataAttributes,\n zIndex,\n rest,\n dialogContentProps,\n}) => {\n const [position, setPosition] = React.useState({ x: 0, y: 0 });\n const [isDragging, setIsDragging] = React.useState(false);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const isMobile = useIsMobile();\n\n const handleHeaderMouseDown = React.useCallback((e: React.MouseEvent) => {\n // Only allow dragging from header (not interactive elements)\n const target = e.target as HTMLElement;\n if (\n target.tagName === \"BUTTON\" ||\n target.tagName === \"INPUT\" ||\n target.closest(\"button\")\n ) {\n return;\n }\n\n e.preventDefault();\n setIsDragging(true);\n\n const rect = contentRef.current?.getBoundingClientRect();\n if (!rect) return;\n\n // Calculate offset from mouse to current modal position\n const offsetX = e.clientX - rect.left;\n const offsetY = e.clientY - rect.top;\n\n const handleMouseMove = (e: MouseEvent) => {\n e.preventDefault();\n\n // Calculate new position based on mouse position minus offset\n const newX = e.clientX - offsetX;\n const newY = e.clientY - offsetY;\n\n // Determine if rail is on the side (viewport > 780px) or above (viewport <= 780px)\n const isRailOnSide = window.innerWidth > 780;\n\n // Constrain to viewport bounds (keeping modal AND rail fully visible)\n const modalWidth = rect.width;\n const modalHeight = rect.height;\n\n // Adjust boundaries to account for rail position\n let maxX = window.innerWidth - modalWidth;\n let minX = 0;\n let maxY = window.innerHeight - modalHeight;\n let minY = 0;\n\n if (isRailOnSide) {\n // Rail is positioned on the right side of the modal\n // Reduce maxX to prevent rail from going off-screen\n maxX = window.innerWidth - modalWidth - RAIL_EXTRA_SPACE;\n } else {\n // Rail is positioned above the modal (viewport <= 780px)\n // Account for rail height + offset at the top\n minY = RAIL_BUTTON_SIZE + RAIL_OFFSET;\n }\n\n const constrainedX = Math.max(minX, Math.min(maxX, newX));\n const constrainedY = Math.max(minY, Math.min(maxY, newY));\n\n // Convert to offset from center for our transform\n const centerX = window.innerWidth / 2 - modalWidth / 2;\n const centerY = window.innerHeight / 2 - modalHeight / 2;\n\n setPosition({\n x: constrainedX - centerX,\n y: constrainedY - centerY,\n });\n };\n\n const handleMouseUp = () => {\n setIsDragging(false);\n document.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseup\", handleMouseUp);\n };\n\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseup\", handleMouseUp);\n }, []);\n\n const dragContextValue = React.useMemo<DragContextValue>(\n () => ({\n position,\n isDragging,\n onHeaderMouseDown: handleHeaderMouseDown,\n contentRef,\n draggable: true,\n }),\n [position, isDragging, handleHeaderMouseDown]\n );\n\n // Prevent modal from closing on outside interaction when draggable\n const handleInteractOutside = React.useCallback((e: Event) => {\n e.preventDefault();\n }, []);\n\n // Get appropriate animation variants based on context\n const contentVariants = getContentVariants(isMobile, true);\n\n return (\n <DragContext.Provider value={dragContextValue}>\n <Dialog.Content\n asChild\n aria-label={label}\n {...dialogContentProps}\n onInteractOutside={handleInteractOutside}\n >\n <StyledMotionWrapper\n $isMobile={isMobile}\n $zIndex={zIndex}\n variants={contentVariants}\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n style={{\n // Apply drag offset transforms\n // For draggable modals, variants only handle opacity, so we apply transforms here\n // Combined with top: 50%, left: 50%, these create the centering + drag offset\n x: `calc(-50% + ${position.x}px)`,\n y: `calc(-50% + ${position.y}px)`,\n }}\n >\n <StyledContent\n data-slot=\"modal-content\"\n ref={contentRef}\n draggable={true}\n isDragging={isDragging}\n {...dataAttributes}\n {...rest}\n >\n {children}\n </StyledContent>\n </StyledMotionWrapper>\n </Dialog.Content>\n </DragContext.Provider>\n );\n};\n","// Shared constants for both Modal versions\n\n// Default z-index values (v1 only - v2 relies on portal stacking order)\nexport const DEFAULT_MODAL_Z_INDEX = 6;\nexport const DEFAULT_OVERLAY_Z_INDEX_OFFSET = -1;\n\n// Default styling values\nexport const DEFAULT_MODAL_WIDTH = \"600px\";\nexport const DEFAULT_MODAL_BG = \"container.background.base\";\nexport const DEFAULT_CLOSE_BUTTON_LABEL = \"Close dialog\";\n\n// Max space allowed between the modal and the edge of the browser\n// Note: 64px doesn't have a direct space token match (space[500] = 32px, space[600] = 40px)\n// Keeping as hardcoded value for now as it's a specific layout constraint\nexport const BODY_PADDING = \"64px\";\n\n// Size presets for simplified API\nexport const MODAL_SIZE_PRESETS = {\n small: \"400px\",\n medium: \"600px\",\n large: \"800px\",\n full: \"90vw\",\n} as const;\n\n// Mobile breakpoint for bottom sheet layout\nexport const MOBILE_BREAKPOINT = \"780px\";\n\n// Rail button constants\nexport const RAIL_BUTTON_SIZE = 44; // px\nexport const RAIL_OFFSET = 12; // px from card edge\nexport const RAIL_GAP = 12; // px between buttons\nexport const RAIL_EXTRA_SPACE = RAIL_BUTTON_SIZE + RAIL_OFFSET; // 56px\n","import type { Variants } from \"motion/react\";\nimport { MOBILE_BREAKPOINT } from \"../shared/constants\";\n\nconst DURATION_MOBILE: number = 0.6;\nconst DURATION_DESKTOP: number = 0.3;\n\nconst desktopTransition = {\n duration: DURATION_DESKTOP,\n ease: \"easeInOut\" as const,\n};\n\nconst mobileTransition = {\n duration: DURATION_MOBILE,\n ease: \"easeInOut\" as const,\n};\n\n/**\n * Animation variants for desktop modal (content and overlay).\n * Content: Fade in with subtle scale effect for a polished entrance.\n * Overlay: Simple fade to match content timing.\n * IMPORTANT: Content includes translate(-50%, -50%) to center the modal since\n * CSS transform is removed to prevent conflicts with Motion.\n */\nexport const desktopModalVariants: Variants = {\n initial: {\n opacity: 0,\n scale: 0.95,\n x: \"-50%\",\n y: \"-50%\",\n transition: desktopTransition,\n },\n animate: {\n opacity: 1,\n scale: 1,\n x: \"-50%\",\n y: \"-50%\",\n transition: desktopTransition,\n },\n exit: {\n opacity: 0,\n scale: 0.95,\n x: \"-50%\",\n y: \"-50%\",\n transition: desktopTransition,\n },\n};\n\n/**\n * Animation variants for desktop overlay.\n * Matches desktop modal transition timing.\n */\nexport const desktopOverlayVariants: Variants = {\n initial: {\n opacity: 0,\n transition: desktopTransition,\n },\n animate: {\n opacity: 1,\n transition: desktopTransition,\n },\n exit: {\n opacity: 0,\n transition: desktopTransition,\n },\n};\n\n/**\n * Animation variants for mobile drawer (content).\n * Slides up from bottom with fade for a native-feeling drawer interaction.\n * Includes horizontal centering (translateX(-50%)) for proper positioning.\n */\nexport const mobileDrawerVariants: Variants = {\n initial: {\n opacity: 0,\n x: \"-50%\",\n y: \"100%\",\n transition: mobileTransition,\n },\n animate: {\n opacity: 1,\n x: \"-50%\",\n y: 0,\n transition: mobileTransition,\n },\n exit: {\n opacity: 0,\n x: \"-50%\",\n y: \"100%\",\n transition: mobileTransition,\n },\n};\n\n/**\n * Animation variants for mobile overlay.\n * Matches mobile drawer transition timing.\n */\nexport const mobileOverlayVariants: Variants = {\n initial: {\n opacity: 0,\n transition: mobileTransition,\n },\n animate: {\n opacity: 1,\n transition: mobileTransition,\n },\n exit: {\n opacity: 0,\n transition: mobileTransition,\n },\n};\n\n/**\n * Animation variants for draggable modals.\n * Only animates opacity, not transforms, since dragging handles positioning.\n * Uses desktop timing since draggable modals are desktop-only.\n * NOTE: Centering transforms are handled in StyledContent to work with drag positioning.\n */\nexport const draggableModalVariants: Variants = {\n initial: {\n opacity: 0,\n transition: desktopTransition,\n },\n animate: {\n opacity: 1,\n transition: desktopTransition,\n },\n exit: {\n opacity: 0,\n transition: desktopTransition,\n },\n};\n\n/**\n * Get the appropriate content variants based on context.\n */\nexport function getContentVariants(\n isMobile: boolean,\n isDraggable: boolean\n): Variants {\n if (isDraggable) {\n return draggableModalVariants;\n }\n return isMobile ? mobileDrawerVariants : desktopModalVariants;\n}\n\n/**\n * Get the appropriate overlay variants based on context.\n */\nexport function getOverlayVariants(isMobile: boolean): Variants {\n return isMobile ? mobileOverlayVariants : desktopOverlayVariants;\n}\n\n/**\n * Hook to detect mobile viewport based on MOBILE_BREAKPOINT (780px).\n * Returns true if viewport is at or below the mobile breakpoint.\n */\nexport function useIsMobile(): boolean {\n const [isMobile, setIsMobile] = React.useState(() => {\n if (typeof window === \"undefined\") return false;\n return window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT})`).matches;\n });\n\n React.useEffect(() => {\n if (typeof window === \"undefined\") return;\n\n const mediaQuery = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT})`);\n const handler = (e: MediaQueryListEvent) => setIsMobile(e.matches);\n\n // Modern browsers\n if (mediaQuery.addEventListener) {\n mediaQuery.addEventListener(\"change\", handler);\n return () => mediaQuery.removeEventListener(\"change\", handler);\n }\n // Fallback for older browsers\n else if (mediaQuery.addListener) {\n mediaQuery.addListener(handler);\n return () => mediaQuery.removeListener(handler);\n }\n }, []);\n\n return isMobile;\n}\n\n// Need to import React for the hook\nimport * as React from \"react\";\n","import * as React from \"react\";\nimport styled from \"styled-components\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport {\n COMMON,\n FLEXBOX,\n BORDER,\n LAYOUT,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport { MOBILE_BREAKPOINT } from \"../../shared/constants\";\nimport type { TypeModalFooterProps } from \"../ModalTypes\";\nimport { ModalCloseWrapper } from \"./ModalCloseWrapper\";\n\n/**\n * Base styled footer component for custom modal footers.\n *\n * Use this component when you need complete control over the footer layout\n * and don't want to use the slot-based ModalFooter component.\n *\n * @example\n * <ModalCustomFooter>\n * <YourCustomFooterContent />\n * </ModalCustomFooter>\n */\nexport const ModalCustomFooter = styled(Box)`\n flex: 0 0 auto;\n font-family: ${(props) => props.theme.fontFamily};\n background-color: ${(props) => props.theme.colors.container.background.base};\n padding: ${(props) => props.theme.space[400]};\n border-bottom-right-radius: ${(props) => props.theme.radii[800]};\n border-bottom-left-radius: ${(props) => props.theme.radii[800]};\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: ${(props) => props.theme.space[100]};\n\n /* Flat bottom corners to blend with device edge on mobile */\n @media (max-width: ${MOBILE_BREAKPOINT}) {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n ${COMMON}\n ${FLEXBOX}\n ${BORDER}\n ${LAYOUT}\n`;\n\nModalCustomFooter.displayName = \"ModalCustomFooter\";\n\n/**\n * Modal footer component for action buttons.\n *\n * This component only supports slot-based rendering with button props.\n * For custom footer layouts, use ModalCustomFooter instead.\n *\n * Provides automatic button wrapping and layout management. Supports three button positions:\n * - primaryButton: Main action button on the right (auto-closes modal)\n * - cancelButton: Secondary action on the right (auto-closes modal)\n * - leftAction: Optional action on the left (no auto-close, for destructive actions)\n *\n * @example\n * <ModalFooter\n * cancelButton={<Button>Cancel</Button>}\n * primaryButton={<Button appearance=\"primary\">Save</Button>}\n * />\n *\n * @example\n * // With left action\n * <ModalFooter\n * leftAction={<Button appearance=\"destructive\">Delete</Button>}\n * cancelButton={<Button>Cancel</Button>}\n * primaryButton={<Button appearance=\"primary\">Save</Button>}\n * />\n */\nexport const ModalFooter = (props: TypeModalFooterProps) => {\n const { cancelButton, primaryButton, leftAction, ...rest } = props;\n\n // If no simplified props provided, return empty footer\n if (!cancelButton && !primaryButton && !leftAction) {\n return null;\n }\n\n // Build simplified API layout\n return (\n <ModalCustomFooter data-slot=\"modal-footer\" data-qa-modal-footer {...rest}>\n {/* Left action (e.g., Delete button) */}\n {leftAction ? leftAction : null}\n\n {/* Right-aligned button group (Cancel + Primary) */}\n <Box display=\"flex\" gap={300} marginLeft=\"auto\">\n {cancelButton && <ModalCloseWrapper>{cancelButton}</ModalCloseWrapper>}\n {primaryButton && (\n <ModalCloseWrapper>{primaryButton}</ModalCloseWrapper>\n )}\n </Box>\n </ModalCustomFooter>\n );\n};\n\nModalFooter.displayName = \"ModalFooter\";\n","import * as React from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\n\n/**\n * Props for ModalCloseWrapper component.\n */\nexport interface ModalCloseWrapperProps {\n /** The element to wrap with close functionality */\n children: React.ReactNode;\n /** Optional click handler called before closing the modal */\n onClick?: (e: React.MouseEvent) => void;\n /** Whether to merge props into the child element (default: true) */\n asChild?: boolean;\n}\n\n/**\n * A wrapper component that closes the modal when its child is clicked.\n * Uses asChild pattern like Radix primitives - by default asChild is true.\n */\nexport const ModalCloseWrapper = (props: ModalCloseWrapperProps) => {\n const { children, onClick, asChild = true, ...rest } = props;\n\n const handleClick = (e: React.MouseEvent) => {\n onClick?.(e);\n // Dialog.Close automatically handles closing\n };\n\n return (\n <Dialog.Close asChild={asChild} onClick={handleClick} {...rest}>\n {React.isValidElement(children)\n ? React.cloneElement(children as React.ReactElement<any>, {\n \"data-slot\": \"modal-close-wrapper\",\n \"data-qa-modal-close-wrapper\": \"\",\n ...((children as React.ReactElement<any>).props || {}),\n })\n : children}\n </Dialog.Close>\n );\n};\n\nModalCloseWrapper.displayName = \"ModalCloseWrapper\";\n","import * as React from \"react\";\nimport styled from \"styled-components\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport {\n COMMON,\n FLEXBOX,\n BORDER,\n LAYOUT,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeModalBodyProps } from \"../ModalTypes\";\n\n/**\n * Modal body component for the main content area.\n *\n * This component provides the scrollable content area of the modal with proper spacing\n * and overflow handling. It automatically takes up available space between the header\n * and footer, with vertical scrolling enabled when content exceeds available height.\n *\n * @example\n * <ModalBody>\n * <Text>Your modal content goes here.</Text>\n * <FormField label=\"Name\" />\n * </ModalBody>\n */\nconst StyledModalBody = styled(Box)`\n font-family: ${(props) => props.theme.fontFamily};\n overflow-y: auto;\n flex: 1 1 auto;\n padding: ${(props) => `0 ${props.theme.space[400]}`};\n ${(props) => props.theme.typography[300]}\n color: ${(props) => props.theme.colors.text.body};\n @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n flex-basis: 100%;\n }\n\n ${COMMON}\n ${FLEXBOX}\n ${BORDER}\n ${LAYOUT}\n`;\n\nStyledModalBody.displayName = \"ModalBody\";\n\nexport const ModalBody = React.forwardRef<HTMLDivElement, TypeModalBodyProps>(\n ({ children, ...rest }, ref) => {\n return (\n <StyledModalBody\n data-slot=\"modal-body\"\n data-qa-modal-body\n ref={ref}\n {...rest}\n >\n {children}\n </StyledModalBody>\n );\n }\n);\n\nModalBody.displayName = \"ModalBody\";\n","import * as React from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport type { TypeModalDescriptionProps } from \"../ModalTypes\";\n\n/**\n * Modal description component that wraps content with accessible Dialog.Description.\n *\n * This component automatically connects description text to the modal dialog via ARIA attributes,\n * ensuring screen readers announce the description when the modal opens. Use this for additional\n * context beyond the title that helps users understand the modal's purpose.\n *\n * @example\n * <ModalDescription>\n * Deleting this item will permanently remove it from your account.\n * </ModalDescription>\n */\nexport const ModalDescription = React.forwardRef<\n HTMLDivElement,\n TypeModalDescriptionProps\n>(({ children, descriptionProps = {}, ...rest }, ref) => {\n return (\n <Dialog.Description asChild {...descriptionProps}>\n <Box\n data-slot=\"modal-description\"\n data-qa-modal-description\n ref={ref}\n {...rest}\n >\n {children}\n </Box>\n </Dialog.Description>\n );\n});\n\nModalDescription.displayName = \"ModalDescription\";\n","import * as React from \"react\";\nimport styled from \"styled-components\";\nimport type { TypeModalRailProps } from \"../ModalTypes\";\nimport {\n MOBILE_BREAKPOINT,\n RAIL_BUTTON_SIZE,\n RAIL_OFFSET,\n RAIL_GAP,\n} from \"../../shared/constants\";\n\n/**\n * Container for floating action buttons displayed alongside the modal.\n *\n * The rail provides a vertical column of action buttons positioned to the right of the modal\n * on desktop, and switches to a horizontal row positioned above the modal on mobile devices.\n * Always includes a close button by default, with support for additional custom actions.\n *\n * Actions are rendered through the Modal's `actions` prop or by directly including\n * ModalAction components as children.\n *\n * @example\n * <ModalRail>\n * <ModalAction actionType=\"close\" aria-label=\"Close\" iconName=\"x-outline\" />\n * <ModalAction aria-label=\"Expand\" iconName=\"arrows-pointing-out\" onClick={handleExpand} />\n * </ModalRail>\n */\nconst Rail = styled.div`\n position: absolute;\n top: ${RAIL_OFFSET}px;\n right: calc(-1 * (${RAIL_BUTTON_SIZE}px + ${RAIL_OFFSET}px));\n display: flex;\n flex-direction: column;\n gap: ${RAIL_GAP}px;\n z-index: 1;\n\n @media (max-width: ${MOBILE_BREAKPOINT}) {\n /* Move rail above the modal on the right side */\n top: auto;\n bottom: calc(100% + ${RAIL_OFFSET}px);\n right: ${RAIL_OFFSET}px;\n left: auto;\n /* Change to horizontal layout with reversed order */\n flex-direction: row-reverse;\n }\n`;\n\nexport const ModalRail: React.FC<TypeModalRailProps> = ({ children }) => {\n return (\n <Rail\n data-slot=\"modal-rail\"\n data-qa-modal-rail\n aria-label=\"Modal quick actions\"\n >\n {children}\n </Rail>\n );\n};\n\nModalRail.displayName = \"ModalRail\";\n","import * as React from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport styled from \"styled-components\";\nimport Icon from \"@sproutsocial/seeds-react-icon\";\nimport { focusRing } from \"@sproutsocial/seeds-react-mixins\";\nimport type { TypeModalActionProps } from \"../ModalTypes\";\nimport { RAIL_BUTTON_SIZE } from \"../../shared/constants\";\n\n/**\n * Action button component for the modal's floating rail.\n *\n * These buttons appear in the vertical rail next to the modal (horizontal on mobile)\n * and provide quick access to common actions. Supports two action types:\n * - \"close\": Automatically closes the modal when clicked\n * - \"button\" (default): Custom action with your own onClick handler\n *\n * @example\n * // Close button (built-in functionality)\n * <ModalAction\n * actionType=\"close\"\n * aria-label=\"Close\"\n * iconName=\"x-outline\"\n * />\n *\n * @example\n * // Custom action button\n * <ModalAction\n * aria-label=\"Expand to fullscreen\"\n * iconName=\"arrows-pointing-out\"\n * onClick={() => console.log('expand')}\n * />\n */\n\nconst RailButton = styled.button`\n width: ${RAIL_BUTTON_SIZE}px;\n height: ${(props) => props.theme.space[500]};\n display: inline-grid;\n place-items: center;\n border-radius: ${(props) => props.theme.radii.outer};\n border: none;\n background: ${(props) => props.theme.colors.button.overlay.background.base};\n color: ${(props) => props.theme.colors.button.overlay.text.base};\n cursor: pointer;\n outline: none;\n transition: all ${(props) => props.theme.duration.fast}\n ${(props) => props.theme.easing.ease_inout};\n\n &:hover {\n background: ${(props) =>\n props.theme.colors.button.overlay.background.hover};\n }\n\n &:hover,\n &:active {\n transform: none;\n }\n\n &:focus-visible {\n ${focusRing}\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n`;\n\nexport const ModalAction: React.FC<TypeModalActionProps> = ({\n \"aria-label\": ariaLabel,\n iconName,\n disabled,\n actionType,\n onClick,\n ...rest\n}) => {\n const button = (\n <RailButton\n data-slot=\"modal-action\"\n data-qa-modal-action\n data-qa-modal-action-type={actionType || \"button\"}\n aria-label={ariaLabel}\n title={ariaLabel}\n disabled={disabled}\n onClick={onClick}\n {...rest}\n >\n {iconName && <Icon name={iconName} size=\"small\" aria-label={ariaLabel} />}\n </RailButton>\n );\n\n if (actionType === \"close\") {\n return <Dialog.Close asChild>{button}</Dialog.Close>;\n }\n\n return button;\n};\n\nModalAction.displayName = \"ModalAction\";\n","import { css } from \"styled-components\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\n\nexport const svgToDataURL = (svgStr: string) => {\n const encoded = encodeURIComponent(svgStr)\n .replace(/'/g, \"%27\")\n .replace(/\"/g, \"%22\");\n\n const header = \"data:image/svg+xml,\";\n const dataUrl = header + encoded;\n\n return dataUrl;\n};\n\nexport const visuallyHidden = css`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n border: 0;\n`;\n\nexport const focusRing = css`\n box-shadow: 0 0 0 1px ${theme.colors.button.primary.background.base},\n 0 0px 0px 4px\n color-mix(\n in srgb,\n ${theme.colors.button.primary.background.base},\n transparent 70%\n );\n outline: none;\n\n &::-moz-focus-inner {\n border: 0;\n }\n`;\n\nexport const pill = css`\n min-width: ${theme.space[600]};\n min-height: ${theme.space[600]};\n padding: ${theme.space[300]};\n border-radius: ${theme.radii.pill};\n`;\n\nexport const disabled = css`\n opacity: 0.4;\n pointer-events: none;\n`;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { motion } from \"motion/react\";\nimport {\n COMMON,\n BORDER,\n LAYOUT,\n POSITION,\n type TypeSystemCommonProps,\n type TypeSystemBorderProps,\n type TypeSystemLayoutProps,\n type TypeSystemPositionProps,\n} from \"@sproutsocial/seeds-react-system-props\";\n\ninterface StyledOverlayProps\n extends TypeSystemCommonProps,\n TypeSystemBorderProps,\n TypeSystemLayoutProps,\n TypeSystemPositionProps {\n allowInteraction?: boolean;\n}\n\n// Styled motion.div for the overlay wrapper\nexport const StyledMotionOverlay = styled(motion.div)<{ $zIndex?: number }>`\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n z-index: ${(props) => props.$zIndex ?? 6};\n`;\n\nexport const StyledOverlay = styled.div.withConfig({\n shouldForwardProp: (prop) => ![\"allowInteraction\"].includes(prop),\n})<StyledOverlayProps>`\n width: 100%;\n height: 100%;\n background-color: ${(props) => props.theme.colors.overlay.background.base};\n\n /* Allow clicking through overlay when modal is draggable */\n ${(props) =>\n props.allowInteraction &&\n `\n pointer-events: none;\n `}\n\n ${COMMON}\n ${BORDER}\n ${LAYOUT}\n ${POSITION}\n`;\n\nStyledOverlay.displayName = \"ModalOverlay\";\n"],"mappings":";AAAA,YAAYA,aAAW;AACvB,YAAYC,aAAY;AACxB,SAAS,uBAAuB;;;ACFhC,OAAuB;AACvB,YAAYC,aAAY;AACxB,OAAOC,aAAY;AACnB,OAAO,SAAS;AAChB,OAAO,UAAU;AACjB;AAAA,EACE,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,OACK;;;ACVP,YAAYC,YAAW;AACvB,YAAY,YAAY;AACxB,SAAS,cAAc;AACvB,OAAO,YAAY;;;ACIZ,IAAM,sBAAsB;AAC5B,IAAM,mBAAmB;AAMzB,IAAM,eAAe;AAGrB,IAAM,qBAAqB;AAAA,EAChC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AACR;AAGO,IAAM,oBAAoB;AAG1B,IAAM,mBAAmB;AACzB,IAAM,cAAc;AACpB,IAAM,WAAW;AACjB,IAAM,mBAAmB,mBAAmB;;;ADnBnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;;;AEmKP,YAAY,WAAW;AArLvB,IAAM,kBAA0B;AAChC,IAAM,mBAA2B;AAEjC,IAAM,oBAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AACR;AAEA,IAAM,mBAAmB;AAAA,EACvB,UAAU;AAAA,EACV,MAAM;AACR;AASO,IAAM,uBAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,GAAG;AAAA,IACH,GAAG;AAAA,IACH,YAAY;AAAA,EACd;AAAA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,KAAQ,iBAAP,EAAe,SAAO,MACrB,0BAAAA;AAAA,YAAC;AAAA;AAAA,cACC,SAAS;AAAA,cACT,UAAU;AAAA,cACV,SAAQ;AAAA,cACR,SAAQ;AAAA,cACR,MAAK;AAAA,cAEL,0BAAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,aAAU;AAAA,kBACV,yBAAqB;AAAA,kBACrB,eAAY;AAAA,kBACZ,kBAAkB;AAAA;AAAA,cACpB;AAAA;AAAA,UACF,GACF;AAAA,UAEF,gBAAAC;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA,oBAAoB;AAAA,gBAClB;AAAA,gBACA;AAAA,gBACA,iBAAiB;AAAA,gBACjB;AAAA,gBACA;AAAA,gBACA,mBAAmB;AAAA,cACrB;AAAA,cAGA;AAAA,gCAAAA,MAAC,aACC;AAAA,kCAAAD;AAAA,oBAAC;AAAA;AAAA,sBACC,YAAW;AAAA,sBACX,UAAS;AAAA,sBACR,GAAG;AAAA,sBACJ,cACG,mBAA2B,YAAY,KACxC;AAAA;AAAA,kBAEJ;AAAA,kBACC,SAAS,IAAI,CAAC,QAAQ,QACrB,gBAAAA,KAAC,eAAuB,GAAG,UAAT,GAAiB,CACpC;AAAA,mBACH;AAAA,gBAEC,sBACC,gBAAAA,KAAC,eAAY,OAAc,UAAoB;AAAA,gBAIhD,eACC,gBAAAA,KAAC,oBAAkB,uBAAY;AAAA,gBAIhC;AAAA;AAAA;AAAA,UACH;AAAA,WACF,GAEJ,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;","names":["React","Dialog","Dialog","styled","COMMON","FLEXBOX","BORDER","LAYOUT","React","e","jsx","styled","COMMON","FLEXBOX","BORDER","LAYOUT","styled","Box","COMMON","FLEXBOX","BORDER","LAYOUT","React","Dialog","jsx","jsx","jsxs","styled","Box","COMMON","FLEXBOX","BORDER","LAYOUT","React","styled","Box","COMMON","FLEXBOX","BORDER","LAYOUT","jsx","React","Dialog","Box","jsx","styled","jsx","styled","Dialog","styled","jsx","styled","disabled","styled","motion","COMMON","BORDER","LAYOUT","jsx","jsxs"]}
package/dist/esm/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  ModalHeader,
13
13
  ModalRail,
14
14
  Modal_default
15
- } from "./chunk-UP2XQN57.js";
15
+ } from "./chunk-4F3JQDQZ.js";
16
16
 
17
17
  // src/index.ts
18
18
  var src_default = v1_default;
@@ -13,7 +13,7 @@ import {
13
13
  ModalHeader,
14
14
  ModalRail,
15
15
  Modal_default
16
- } from "../chunk-UP2XQN57.js";
16
+ } from "../chunk-4F3JQDQZ.js";
17
17
  export {
18
18
  BODY_PADDING,
19
19
  DEFAULT_MODAL_BG,
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { M as Modal } from './Modal-ki8oiGbC.mjs';
2
2
  export { d as TypeModalCloseButtonProps, c as TypeModalContentProps, b as TypeModalFooterProps, a as TypeModalHeaderProps, T as TypeModalProps } from './Modal-ki8oiGbC.mjs';
3
- export { g as ModalAction, d as ModalBody, e as ModalCloseWrapper, p as ModalCloseWrapperProps, i as ModalCustomFooter, h as ModalCustomHeader, a as ModalDescription, c as ModalFooter, b as ModalHeader, f as ModalRail, M as ModalV2, o as TypeModalActionProps, n as TypeModalRailProps, l as TypeModalV2BodyProps, m as TypeModalV2DescriptionProps, k as TypeModalV2FooterProps, j as TypeModalV2HeaderProps, T as TypeModalV2Props } from './ModalAction-gIgCE73I.mjs';
3
+ export { g as ModalAction, d as ModalBody, e as ModalCloseWrapper, p as ModalCloseWrapperProps, i as ModalCustomFooter, h as ModalCustomHeader, a as ModalDescription, c as ModalFooter, b as ModalHeader, f as ModalRail, M as ModalV2, o as TypeModalActionProps, n as TypeModalRailProps, l as TypeModalV2BodyProps, m as TypeModalV2DescriptionProps, k as TypeModalV2FooterProps, j as TypeModalV2HeaderProps, T as TypeModalV2Props } from './ModalAction-B9lvk1rm.mjs';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react';
6
6
  import 'react-modal';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { M as Modal } from './Modal-ki8oiGbC.js';
2
2
  export { d as TypeModalCloseButtonProps, c as TypeModalContentProps, b as TypeModalFooterProps, a as TypeModalHeaderProps, T as TypeModalProps } from './Modal-ki8oiGbC.js';
3
- export { g as ModalAction, d as ModalBody, e as ModalCloseWrapper, p as ModalCloseWrapperProps, i as ModalCustomFooter, h as ModalCustomHeader, a as ModalDescription, c as ModalFooter, b as ModalHeader, f as ModalRail, M as ModalV2, o as TypeModalActionProps, n as TypeModalRailProps, l as TypeModalV2BodyProps, m as TypeModalV2DescriptionProps, k as TypeModalV2FooterProps, j as TypeModalV2HeaderProps, T as TypeModalV2Props } from './ModalAction-gIgCE73I.js';
3
+ export { g as ModalAction, d as ModalBody, e as ModalCloseWrapper, p as ModalCloseWrapperProps, i as ModalCustomFooter, h as ModalCustomHeader, a as ModalDescription, c as ModalFooter, b as ModalHeader, f as ModalRail, M as ModalV2, o as TypeModalActionProps, n as TypeModalRailProps, l as TypeModalV2BodyProps, m as TypeModalV2DescriptionProps, k as TypeModalV2FooterProps, j as TypeModalV2HeaderProps, T as TypeModalV2Props } from './ModalAction-B9lvk1rm.js';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react';
6
6
  import 'react-modal';
package/dist/index.js CHANGED
@@ -502,11 +502,12 @@ var StaticModalContent = ({
502
502
  label,
503
503
  dataAttributes,
504
504
  zIndex: zIndex2,
505
- rest
505
+ rest,
506
+ dialogContentProps
506
507
  }) => {
507
508
  const isMobile = useIsMobile();
508
509
  const contentVariants = getContentVariants(isMobile, false);
509
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DragContext.Provider, { value: null, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Dialog.Content, { asChild: true, "aria-label": label, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
510
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DragContext.Provider, { value: null, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Dialog.Content, { asChild: true, "aria-label": label, ...dialogContentProps, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
510
511
  StyledMotionWrapper,
511
512
  {
512
513
  $isMobile: isMobile,
@@ -533,7 +534,8 @@ var DraggableModalContent = ({
533
534
  label,
534
535
  dataAttributes,
535
536
  zIndex: zIndex2,
536
- rest
537
+ rest,
538
+ dialogContentProps
537
539
  }) => {
538
540
  const [position, setPosition] = React4.useState({ x: 0, y: 0 });
539
541
  const [isDragging, setIsDragging] = React4.useState(false);
@@ -602,6 +604,7 @@ var DraggableModalContent = ({
602
604
  {
603
605
  asChild: true,
604
606
  "aria-label": label,
607
+ ...dialogContentProps,
605
608
  onInteractOutside: handleInteractOutside,
606
609
  children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
607
610
  StyledMotionWrapper,
@@ -1006,6 +1009,16 @@ var Modal2 = (props) => {
1006
1009
  closeButtonAriaLabel = "Close",
1007
1010
  closeButtonProps,
1008
1011
  zIndex: zIndex2 = 6,
1012
+ // Extract Dialog.Content event handlers
1013
+ onOpenAutoFocus,
1014
+ onCloseAutoFocus,
1015
+ onEscapeKeyDown,
1016
+ onPointerDownOutside,
1017
+ onFocusOutside,
1018
+ onInteractOutside,
1019
+ // Extract convenience boolean props
1020
+ disableOutsideClickClose = false,
1021
+ disableEscapeKeyClose = false,
1009
1022
  ...rest
1010
1023
  } = props;
1011
1024
  const [isOpen, setIsOpen] = React13.useState(defaultOpen ?? false);
@@ -1031,6 +1044,24 @@ var Modal2 = (props) => {
1031
1044
  const isMobile = useIsMobile();
1032
1045
  const overlayVariants = getOverlayVariants(isMobile);
1033
1046
  const ModalContentComponent = draggable ? DraggableModalContent : StaticModalContent;
1047
+ const wrappedOnInteractOutside = React13.useCallback(
1048
+ (e) => {
1049
+ if (disableOutsideClickClose) {
1050
+ e.preventDefault();
1051
+ }
1052
+ onInteractOutside?.(e);
1053
+ },
1054
+ [disableOutsideClickClose, onInteractOutside]
1055
+ );
1056
+ const wrappedOnEscapeKeyDown = React13.useCallback(
1057
+ (e) => {
1058
+ if (disableEscapeKeyClose) {
1059
+ e.preventDefault();
1060
+ }
1061
+ onEscapeKeyDown?.(e);
1062
+ },
1063
+ [disableEscapeKeyClose, onEscapeKeyDown]
1064
+ );
1034
1065
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1035
1066
  Dialog6.Root,
1036
1067
  {
@@ -1054,6 +1085,7 @@ var Modal2 = (props) => {
1054
1085
  {
1055
1086
  "data-slot": "modal-overlay",
1056
1087
  "data-qa-modal-overlay": true,
1088
+ "data-testid": "modal-overlay",
1057
1089
  allowInteraction: draggable
1058
1090
  }
1059
1091
  )
@@ -1067,6 +1099,14 @@ var Modal2 = (props) => {
1067
1099
  draggable,
1068
1100
  zIndex: zIndex2,
1069
1101
  rest,
1102
+ dialogContentProps: {
1103
+ onOpenAutoFocus,
1104
+ onCloseAutoFocus,
1105
+ onEscapeKeyDown: wrappedOnEscapeKeyDown,
1106
+ onPointerDownOutside,
1107
+ onFocusOutside,
1108
+ onInteractOutside: wrappedOnInteractOutside
1109
+ },
1070
1110
  children: [
1071
1111
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(ModalRail, { children: [
1072
1112
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(