@vibe/dialog 4.0.0-alpha.1 → 4.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/Dialog/Dialog.d.ts +4 -4
  2. package/dist/Dialog/Dialog.js.map +1 -1
  3. package/dist/Dialog/Dialog.module.scss.js +1 -1
  4. package/dist/Dialog/Dialog.types.d.ts +214 -214
  5. package/dist/Dialog/DialogConstants.d.ts +8 -8
  6. package/dist/Dialog/components/DialogContent/DialogContent.d.ts +79 -79
  7. package/dist/Dialog/components/DialogContent/DialogContent.js.map +1 -1
  8. package/dist/Dialog/components/DialogContent/DialogContent.module.scss.js +1 -1
  9. package/dist/Dialog/components/Refable/Refable.d.ts +18 -18
  10. package/dist/Dialog/components/Refable/Refable.js.map +1 -1
  11. package/dist/Dialog/hooks/useDisableScroll.d.ts +5 -5
  12. package/dist/Dialog/hooks/useDisableScroll.js.map +1 -1
  13. package/dist/Dialog/index.d.ts +3 -3
  14. package/dist/DialogContentContainer/DialogContentContainer.d.ts +36 -36
  15. package/dist/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
  16. package/dist/DialogContentContainer/index.d.ts +1 -1
  17. package/dist/index.d.ts +2 -2
  18. package/dist/mocked_classnames/Dialog/Dialog.d.ts +4 -4
  19. package/dist/mocked_classnames/Dialog/Dialog.js.map +1 -1
  20. package/dist/mocked_classnames/Dialog/Dialog.module.scss.js +1 -1
  21. package/dist/mocked_classnames/Dialog/Dialog.types.d.ts +214 -214
  22. package/dist/mocked_classnames/Dialog/DialogConstants.d.ts +8 -8
  23. package/dist/mocked_classnames/Dialog/components/DialogContent/DialogContent.d.ts +79 -79
  24. package/dist/mocked_classnames/Dialog/components/DialogContent/DialogContent.js.map +1 -1
  25. package/dist/mocked_classnames/Dialog/components/DialogContent/DialogContent.module.scss.js +1 -1
  26. package/dist/mocked_classnames/Dialog/components/Refable/Refable.d.ts +18 -18
  27. package/dist/mocked_classnames/Dialog/components/Refable/Refable.js.map +1 -1
  28. package/dist/mocked_classnames/Dialog/hooks/useDisableScroll.d.ts +5 -5
  29. package/dist/mocked_classnames/Dialog/hooks/useDisableScroll.js.map +1 -1
  30. package/dist/mocked_classnames/Dialog/index.d.ts +3 -3
  31. package/dist/mocked_classnames/DialogContentContainer/DialogContentContainer.d.ts +36 -36
  32. package/dist/mocked_classnames/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
  33. package/dist/mocked_classnames/DialogContentContainer/index.d.ts +1 -1
  34. package/dist/mocked_classnames/index.d.ts +2 -2
  35. package/package.json +8 -7
@@ -1,79 +1,79 @@
1
- import React, { type CSSProperties, type ReactElement } from "react";
2
- import { type VibeComponentProps } from "@vibe/shared";
3
- import { type DialogAnimationType, type DialogTriggerEvent, type DialogStartingEdge, type DialogPlacement } from "../../Dialog.types";
4
- export interface DialogContentProps extends VibeComponentProps {
5
- /**
6
- * The content inside the dialog.
7
- */
8
- children?: ReactElement | ReactElement[];
9
- /**
10
- * The placement of the dialog relative to the reference element.
11
- */
12
- position?: DialogPlacement;
13
- /**
14
- * Class name applied to the dialog wrapper.
15
- */
16
- wrapperClassName?: string;
17
- /**
18
- * If true, the dialog is open.
19
- */
20
- isOpen?: boolean;
21
- /**
22
- * The starting edge for animation direction.
23
- */
24
- startingEdge?: DialogStartingEdge;
25
- /**
26
- * The animation type used for showing/hiding the dialog.
27
- */
28
- animationType?: DialogAnimationType;
29
- /**
30
- * Callback fired when the Escape key is pressed.
31
- */
32
- onEsc?: (event: React.KeyboardEvent) => void;
33
- /**
34
- * Callback fired when the mouse enters the dialog.
35
- */
36
- onMouseEnter?: (event: React.MouseEvent) => void;
37
- /**
38
- * Callback fired when the mouse leaves the dialog.
39
- */
40
- onMouseLeave?: (event: React.MouseEvent) => void;
41
- /**
42
- * Callback fired when clicking outside the dialog.
43
- */
44
- onClickOutside?: (event: React.MouseEvent, hideShowEvent: DialogTriggerEvent) => void;
45
- /**
46
- * Callback fired when clicking inside the dialog.
47
- */
48
- onClick?: (event: React.MouseEvent) => void;
49
- /**
50
- * Delay before showing the dialog (used for animation timing).
51
- */
52
- showDelay?: number;
53
- /**
54
- * Inline styles applied to the dialog wrapper.
55
- */
56
- styleObject?: CSSProperties;
57
- /**
58
- * If true, indicates the reference element is hidden.
59
- */
60
- isReferenceHidden?: boolean;
61
- /**
62
- * If true, applies tooltip arrow styling.
63
- */
64
- hasTooltip?: boolean;
65
- /**
66
- * CSS selector of the container for scroll disabling.
67
- */
68
- containerSelector?: string;
69
- /**
70
- * If true or a selector string, disables scrolling when open.
71
- */
72
- disableContainerScroll?: boolean | string;
73
- /**
74
- * Callback fired on context menu (right-click) events.
75
- */
76
- onContextMenu?: (e: React.MouseEvent) => void;
77
- }
78
- declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLElement>>;
79
- export default DialogContent;
1
+ import React, { type CSSProperties, type ReactElement } from "react";
2
+ import { type VibeComponentProps } from "@vibe/shared";
3
+ import { type DialogAnimationType, type DialogTriggerEvent, type DialogStartingEdge, type DialogPlacement } from "../../Dialog.types";
4
+ export interface DialogContentProps extends VibeComponentProps {
5
+ /**
6
+ * The content inside the dialog.
7
+ */
8
+ children?: ReactElement | ReactElement[];
9
+ /**
10
+ * The placement of the dialog relative to the reference element.
11
+ */
12
+ position?: DialogPlacement;
13
+ /**
14
+ * Class name applied to the dialog wrapper.
15
+ */
16
+ wrapperClassName?: string;
17
+ /**
18
+ * If true, the dialog is open.
19
+ */
20
+ isOpen?: boolean;
21
+ /**
22
+ * The starting edge for animation direction.
23
+ */
24
+ startingEdge?: DialogStartingEdge;
25
+ /**
26
+ * The animation type used for showing/hiding the dialog.
27
+ */
28
+ animationType?: DialogAnimationType;
29
+ /**
30
+ * Callback fired when the Escape key is pressed.
31
+ */
32
+ onEsc?: (event: React.KeyboardEvent) => void;
33
+ /**
34
+ * Callback fired when the mouse enters the dialog.
35
+ */
36
+ onMouseEnter?: (event: React.MouseEvent) => void;
37
+ /**
38
+ * Callback fired when the mouse leaves the dialog.
39
+ */
40
+ onMouseLeave?: (event: React.MouseEvent) => void;
41
+ /**
42
+ * Callback fired when clicking outside the dialog.
43
+ */
44
+ onClickOutside?: (event: React.MouseEvent, hideShowEvent: DialogTriggerEvent) => void;
45
+ /**
46
+ * Callback fired when clicking inside the dialog.
47
+ */
48
+ onClick?: (event: React.MouseEvent) => void;
49
+ /**
50
+ * Delay before showing the dialog (used for animation timing).
51
+ */
52
+ showDelay?: number;
53
+ /**
54
+ * Inline styles applied to the dialog wrapper.
55
+ */
56
+ styleObject?: CSSProperties;
57
+ /**
58
+ * If true, indicates the reference element is hidden.
59
+ */
60
+ isReferenceHidden?: boolean;
61
+ /**
62
+ * If true, applies tooltip arrow styling.
63
+ */
64
+ hasTooltip?: boolean;
65
+ /**
66
+ * CSS selector of the container for scroll disabling.
67
+ */
68
+ containerSelector?: string;
69
+ /**
70
+ * If true or a selector string, disables scrolling when open.
71
+ */
72
+ disableContainerScroll?: boolean | string;
73
+ /**
74
+ * Callback fired on context menu (right-click) events.
75
+ */
76
+ onContextMenu?: (e: React.MouseEvent) => void;
77
+ }
78
+ declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLElement>>;
79
+ export default DialogContent;
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.js","sources":["../../../../src/Dialog/components/DialogContent/DialogContent.tsx"],"sourcesContent":["import React, {\n cloneElement,\n type CSSProperties,\n forwardRef,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef\n} from \"react\";\nimport cx from \"classnames\";\nimport { camelCase } from \"es-toolkit\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { type CSSTransitionProps } from \"react-transition-group/CSSTransition\";\nimport { useClickOutside } from \"@vibe/hooks\";\nimport {\n chainFunctions,\n NOOP,\n useKeyEvent,\n type VibeComponentProps,\n keyCodes,\n getStyle,\n useMergeRef\n} from \"@vibe/shared\";\nimport {\n type DialogAnimationType,\n type DialogTriggerEvent,\n type DialogStartingEdge,\n type DialogPlacement\n} from \"../../Dialog.types\";\nimport styles from \"./DialogContent.module.scss\";\nimport useDisableScroll from \"../../hooks/useDisableScroll\";\n\nconst EMPTY_OBJECT: CSSProperties = {};\nconst ESCAPE_KEYS = [keyCodes.ESCAPE];\n\nexport interface DialogContentProps extends VibeComponentProps {\n /**\n * The content inside the dialog.\n */\n children?: ReactElement | ReactElement[];\n /**\n * The placement of the dialog relative to the reference element.\n */\n position?: DialogPlacement;\n /**\n * Class name applied to the dialog wrapper.\n */\n wrapperClassName?: string;\n /**\n * If true, the dialog is open.\n */\n isOpen?: boolean;\n /**\n * The starting edge for animation direction.\n */\n startingEdge?: DialogStartingEdge;\n /**\n * The animation type used for showing/hiding the dialog.\n */\n animationType?: DialogAnimationType;\n /**\n * Callback fired when the Escape key is pressed.\n */\n onEsc?: (event: React.KeyboardEvent) => void;\n /**\n * Callback fired when the mouse enters the dialog.\n */\n onMouseEnter?: (event: React.MouseEvent) => void;\n /**\n * Callback fired when the mouse leaves the dialog.\n */\n onMouseLeave?: (event: React.MouseEvent) => void;\n /**\n * Callback fired when clicking outside the dialog.\n */\n onClickOutside?: (event: React.MouseEvent, hideShowEvent: DialogTriggerEvent) => void;\n /**\n * Callback fired when clicking inside the dialog.\n */\n onClick?: (event: React.MouseEvent) => void;\n /**\n * Delay before showing the dialog (used for animation timing).\n */\n showDelay?: number;\n /**\n * Inline styles applied to the dialog wrapper.\n */\n styleObject?: CSSProperties;\n /**\n * If true, indicates the reference element is hidden.\n */\n isReferenceHidden?: boolean;\n /**\n * If true, applies tooltip arrow styling.\n */\n hasTooltip?: boolean;\n /**\n * CSS selector of the container for scroll disabling.\n */\n containerSelector?: string;\n /**\n * If true or a selector string, disables scrolling when open.\n */\n disableContainerScroll?: boolean | string;\n /**\n * Callback fired on context menu (right-click) events.\n */\n onContextMenu?: (e: React.MouseEvent) => void;\n}\n\nconst DialogContent = forwardRef<HTMLElement, DialogContentProps>(\n (\n {\n onEsc = NOOP,\n children,\n position,\n wrapperClassName,\n isOpen = false,\n startingEdge,\n animationType = \"expand\",\n onMouseEnter = NOOP,\n onMouseLeave = NOOP,\n onClickOutside = NOOP,\n onClick = NOOP,\n onContextMenu = NOOP,\n showDelay,\n styleObject = EMPTY_OBJECT,\n isReferenceHidden,\n hasTooltip = false,\n containerSelector,\n disableContainerScroll = false,\n \"data-testid\": dataTestId\n },\n forwardedRef\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const wrapperRef = useRef<HTMLSpanElement>(null);\n const mergedWrapperRef = useMergeRef(forwardedRef, wrapperRef);\n\n const onOutsideClick = useCallback(\n (event: React.MouseEvent) => {\n if (isOpen) {\n return onClickOutside(event, \"clickoutside\");\n }\n },\n [isOpen, onClickOutside]\n );\n const overrideOnContextMenu = useCallback(\n (event: React.MouseEvent) => {\n if (isOpen) {\n onContextMenu(event);\n }\n },\n [isOpen, onContextMenu]\n );\n\n // Wrap escape callback to ensure useKeyEvent always receives a valid function\n const escapeCallback = useMemo(\n () => (event: KeyboardEvent) => {\n if (isOpen && onEsc !== NOOP) {\n onEsc(event as unknown as React.KeyboardEvent);\n }\n },\n [isOpen, onEsc]\n );\n useKeyEvent({ keys: ESCAPE_KEYS, callback: escapeCallback });\n\n // Watch the wrapper ref to include padding area, tooltip arrows, and nested Dialogs\n useClickOutside({ callback: onOutsideClick, ref: wrapperRef });\n useClickOutside({ eventName: \"contextmenu\", callback: overrideOnContextMenu, ref: wrapperRef });\n const selectorToDisable = typeof disableContainerScroll === \"string\" ? disableContainerScroll : containerSelector;\n const { disableScroll, enableScroll } = useDisableScroll(selectorToDisable);\n\n useEffect(() => {\n if (disableContainerScroll) {\n if (isOpen) {\n disableScroll();\n } else {\n enableScroll();\n }\n }\n }, [disableContainerScroll, disableScroll, enableScroll, isOpen]);\n\n const transitionOptions: Partial<CSSTransitionProps> = { classNames: undefined };\n\n switch (animationType) {\n case \"expand\":\n transitionOptions.classNames = {\n appear: styles.expandAppear,\n appearActive: styles.expandAppearActive,\n exit: styles.expandExit\n };\n break;\n case \"opacity-and-slide\":\n transitionOptions.classNames = {\n appear: styles.opacitySlideAppear,\n appearActive: styles.opacitySlideAppearActive\n };\n break;\n }\n\n // Clone children to attach mouse event handlers, with proper type checking\n const childrenWithHandlers = React.Children.map(children, child => {\n // Only clone valid React elements, pass through primitives unchanged\n if (!React.isValidElement(child)) {\n return child;\n }\n\n return cloneElement(child as ReactElement, {\n onMouseEnter: chainFunctions([(child as ReactElement).props.onMouseEnter, onMouseEnter]),\n onMouseLeave: chainFunctions([(child as ReactElement).props.onMouseLeave, onMouseLeave])\n });\n });\n\n return (\n <span\n // Legacy class name preserved for Monolith overrides\n className={cx(\"monday-style-dialog-content-wrapper\", styles.contentWrapper, wrapperClassName)}\n ref={mergedWrapperRef}\n data-testid={dataTestId}\n style={styleObject}\n onClickCapture={onClick}\n data-dialog-reference-hidden={isReferenceHidden}\n >\n <CSSTransition\n classNames={transitionOptions.classNames}\n nodeRef={contentRef}\n in={isOpen}\n appear={!!animationType}\n timeout={showDelay}\n >\n <div\n className={cx(styles.contentComponent, getStyle(styles, camelCase(position)), {\n [getStyle(styles, camelCase(\"edge-\" + startingEdge))]: startingEdge,\n [styles.hasTooltip]: hasTooltip\n })}\n ref={contentRef}\n >\n {childrenWithHandlers}\n </div>\n </CSSTransition>\n </span>\n );\n }\n);\n\nexport default DialogContent;\n"],"names":["EMPTY_OBJECT","ESCAPE_KEYS","keyCodes","ESCAPE","DialogContent","forwardRef","onEsc","NOOP","children","position","wrapperClassName","isOpen","startingEdge","animationType","onMouseEnter","onMouseLeave","onClickOutside","onClick","onContextMenu","showDelay","styleObject","isReferenceHidden","hasTooltip","containerSelector","disableContainerScroll","dataTestId","forwardedRef","contentRef","useRef","wrapperRef","mergedWrapperRef","useMergeRef","onOutsideClick","useCallback","event","overrideOnContextMenu","escapeCallback","useMemo","useKeyEvent","keys","callback","useClickOutside","ref","eventName","selectorToDisable","disableScroll","enableScroll","useDisableScroll","useEffect","transitionOptions","classNames","undefined","appear","styles","expandAppear","appearActive","expandAppearActive","exit","expandExit","opacitySlideAppear","opacitySlideAppearActive","childrenWithHandlers","React","Children","map","child","isValidElement","cloneElement","chainFunctions","props","createElement","className","cx","contentWrapper","style","onClickCapture","CSSTransition","nodeRef","in","timeout","contentComponent","getStyle","camelCase"],"mappings":"0eAiCA,MAAMA,EAA8B,CAAA,EAC9BC,EAAc,CAACC,EAASC,QA6ExBC,EAAgBC,GACpB,EAEIC,QAAQC,EACRC,WACAC,WACAC,mBACAC,UAAS,EACTC,eACAC,gBAAgB,SAChBC,eAAeP,EACfQ,eAAeR,EACfS,iBAAiBT,EACjBU,UAAUV,EACVW,gBAAgBX,EAChBY,YACAC,cAAcpB,EACdqB,oBACAC,cAAa,EACbC,oBACAC,0BAAyB,EACzB,cAAeC,GAEjBC,KAEA,MAAMC,EAAaC,EAAuB,MACpCC,EAAaD,EAAwB,MACrCE,EAAmBC,EAAYL,EAAcG,GAE7CG,EAAiBC,GACpBC,IACC,GAAIvB,EACF,OAAOK,EAAekB,EAAO,eAC9B,GAEH,CAACvB,EAAQK,IAELmB,EAAwBF,GAC3BC,IACKvB,GACFO,EAAcgB,EACf,GAEH,CAACvB,EAAQO,IAILkB,EAAiBC,GACrB,IAAOH,IACDvB,GAAUL,IAAUC,GACtBD,EAAM4B,EACP,GAEH,CAACvB,EAAQL,IAEXgC,EAAY,CAAEC,KAAMtC,EAAauC,SAAUJ,IAG3CK,EAAgB,CAAED,SAAUR,EAAgBU,IAAKb,IACjDY,EAAgB,CAAEE,UAAW,cAAeH,SAAUL,EAAuBO,IAAKb,IAClF,MAAMe,EAAsD,iBAA3BpB,EAAsCA,EAAyBD,GAC1FsB,cAAEA,EAAaC,aAAEA,GAAiBC,EAAiBH,GAEzDI,GAAU,KACJxB,IACEb,EACFkC,IAEAC,IAEH,GACA,CAACtB,EAAwBqB,EAAeC,EAAcnC,IAEzD,MAAMsC,EAAiD,CAAEC,gBAAYC,GAErE,OAAQtC,GACN,IAAK,SACHoC,EAAkBC,WAAa,CAC7BE,OAAQC,EAAOC,aACfC,aAAcF,EAAOG,mBACrBC,KAAMJ,EAAOK,YAEf,MACF,IAAK,oBACHT,EAAkBC,WAAa,CAC7BE,OAAQC,EAAOM,mBACfJ,aAAcF,EAAOO,0BAM3B,MAAMC,EAAuBC,EAAMC,SAASC,IAAIxD,GAAUyD,GAEnDH,EAAMI,eAAeD,GAInBE,EAAaF,EAAuB,CACzCnD,aAAcsD,EAAe,CAAEH,EAAuBI,MAAMvD,aAAcA,IAC1EC,aAAcqD,EAAe,CAAEH,EAAuBI,MAAMtD,aAAcA,MALnEkD,IASX,OACEH,EAAAQ,cAAA,OAAA,CAEEC,UAAWC,EAAG,sCAAuCnB,EAAOoB,eAAgB/D,GAC5EgC,IAAKZ,EAAgB,cACRL,EACbiD,MAAOtD,EACPuD,eAAgB1D,EAAO,+BACOI,GAE9ByC,EAACQ,cAAAM,EACC,CAAA1B,WAAYD,EAAkBC,WAC9B2B,QAASlD,EACTmD,GAAInE,EACJyC,SAAUvC,EACVkE,QAAS5D,GAET2C,EAAAQ,cAAA,MAAA,CACEC,UAAWC,EAAGnB,EAAO2B,iBAAkBC,EAAS5B,EAAQ6B,EAAUzE,IAAY,CAC5E,CAACwE,EAAS5B,EAAQ6B,EAAU,QAAUtE,KAAiBA,EACvD,CAACyC,EAAO/B,YAAaA,IAEvBoB,IAAKf,GAEJkC,IAGA"}
1
+ {"version":3,"file":"DialogContent.js","sources":["../../../../src/Dialog/components/DialogContent/DialogContent.tsx"],"sourcesContent":["import React, {\n cloneElement,\n type CSSProperties,\n forwardRef,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef\n} from \"react\";\nimport cx from \"classnames\";\nimport { camelCase } from \"es-toolkit\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { type CSSTransitionProps } from \"react-transition-group/CSSTransition\";\nimport { useClickOutside } from \"@vibe/hooks\";\nimport {\n chainFunctions,\n NOOP,\n useKeyEvent,\n type VibeComponentProps,\n keyCodes,\n getStyle,\n useMergeRef\n} from \"@vibe/shared\";\nimport {\n type DialogAnimationType,\n type DialogTriggerEvent,\n type DialogStartingEdge,\n type DialogPlacement\n} from \"../../Dialog.types\";\nimport styles from \"./DialogContent.module.scss\";\nimport useDisableScroll from \"../../hooks/useDisableScroll\";\n\nconst EMPTY_OBJECT: CSSProperties = {};\nconst ESCAPE_KEYS = [keyCodes.ESCAPE];\n\nexport interface DialogContentProps extends VibeComponentProps {\n /**\n * The content inside the dialog.\n */\n children?: ReactElement | ReactElement[];\n /**\n * The placement of the dialog relative to the reference element.\n */\n position?: DialogPlacement;\n /**\n * Class name applied to the dialog wrapper.\n */\n wrapperClassName?: string;\n /**\n * If true, the dialog is open.\n */\n isOpen?: boolean;\n /**\n * The starting edge for animation direction.\n */\n startingEdge?: DialogStartingEdge;\n /**\n * The animation type used for showing/hiding the dialog.\n */\n animationType?: DialogAnimationType;\n /**\n * Callback fired when the Escape key is pressed.\n */\n onEsc?: (event: React.KeyboardEvent) => void;\n /**\n * Callback fired when the mouse enters the dialog.\n */\n onMouseEnter?: (event: React.MouseEvent) => void;\n /**\n * Callback fired when the mouse leaves the dialog.\n */\n onMouseLeave?: (event: React.MouseEvent) => void;\n /**\n * Callback fired when clicking outside the dialog.\n */\n onClickOutside?: (event: React.MouseEvent, hideShowEvent: DialogTriggerEvent) => void;\n /**\n * Callback fired when clicking inside the dialog.\n */\n onClick?: (event: React.MouseEvent) => void;\n /**\n * Delay before showing the dialog (used for animation timing).\n */\n showDelay?: number;\n /**\n * Inline styles applied to the dialog wrapper.\n */\n styleObject?: CSSProperties;\n /**\n * If true, indicates the reference element is hidden.\n */\n isReferenceHidden?: boolean;\n /**\n * If true, applies tooltip arrow styling.\n */\n hasTooltip?: boolean;\n /**\n * CSS selector of the container for scroll disabling.\n */\n containerSelector?: string;\n /**\n * If true or a selector string, disables scrolling when open.\n */\n disableContainerScroll?: boolean | string;\n /**\n * Callback fired on context menu (right-click) events.\n */\n onContextMenu?: (e: React.MouseEvent) => void;\n}\n\nconst DialogContent = forwardRef<HTMLElement, DialogContentProps>(\n (\n {\n onEsc = NOOP,\n children,\n position,\n wrapperClassName,\n isOpen = false,\n startingEdge,\n animationType = \"expand\",\n onMouseEnter = NOOP,\n onMouseLeave = NOOP,\n onClickOutside = NOOP,\n onClick = NOOP,\n onContextMenu = NOOP,\n showDelay,\n styleObject = EMPTY_OBJECT,\n isReferenceHidden,\n hasTooltip = false,\n containerSelector,\n disableContainerScroll = false,\n \"data-testid\": dataTestId\n },\n forwardedRef\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const wrapperRef = useRef<HTMLSpanElement>(null);\n const mergedWrapperRef = useMergeRef(forwardedRef, wrapperRef);\n\n const onOutsideClick = useCallback(\n (event: React.MouseEvent) => {\n if (isOpen) {\n return onClickOutside(event, \"clickoutside\");\n }\n },\n [isOpen, onClickOutside]\n );\n const overrideOnContextMenu = useCallback(\n (event: React.MouseEvent) => {\n if (isOpen) {\n onContextMenu(event);\n }\n },\n [isOpen, onContextMenu]\n );\n\n // Wrap escape callback to ensure useKeyEvent always receives a valid function\n const escapeCallback = useMemo(\n () => (event: KeyboardEvent) => {\n if (isOpen && onEsc !== NOOP) {\n onEsc(event as unknown as React.KeyboardEvent);\n }\n },\n [isOpen, onEsc]\n );\n useKeyEvent({ keys: ESCAPE_KEYS, callback: escapeCallback });\n\n // Watch the wrapper ref to include padding area, tooltip arrows, and nested Dialogs\n useClickOutside({ callback: onOutsideClick, ref: wrapperRef });\n useClickOutside({ eventName: \"contextmenu\", callback: overrideOnContextMenu, ref: wrapperRef });\n const selectorToDisable = typeof disableContainerScroll === \"string\" ? disableContainerScroll : containerSelector;\n const { disableScroll, enableScroll } = useDisableScroll(selectorToDisable);\n\n useEffect(() => {\n if (disableContainerScroll) {\n if (isOpen) {\n disableScroll();\n } else {\n enableScroll();\n }\n }\n }, [disableContainerScroll, disableScroll, enableScroll, isOpen]);\n\n const transitionOptions: Partial<CSSTransitionProps> = { classNames: undefined };\n\n switch (animationType) {\n case \"expand\":\n transitionOptions.classNames = {\n appear: styles.expandAppear,\n appearActive: styles.expandAppearActive,\n exit: styles.expandExit\n };\n break;\n case \"opacity-and-slide\":\n transitionOptions.classNames = {\n appear: styles.opacitySlideAppear,\n appearActive: styles.opacitySlideAppearActive\n };\n break;\n }\n\n // Clone children to attach mouse event handlers, with proper type checking\n const childrenWithHandlers = React.Children.map(children, child => {\n // Only clone valid React elements, pass through primitives unchanged\n if (!React.isValidElement(child)) {\n return child;\n }\n\n return cloneElement(child as ReactElement, {\n onMouseEnter: chainFunctions([(child as ReactElement).props.onMouseEnter, onMouseEnter]),\n onMouseLeave: chainFunctions([(child as ReactElement).props.onMouseLeave, onMouseLeave])\n });\n });\n\n return (\n <span\n // Legacy class name preserved for Monolith overrides\n className={cx(\"monday-style-dialog-content-wrapper\", styles.contentWrapper, wrapperClassName)}\n ref={mergedWrapperRef}\n data-testid={dataTestId}\n style={styleObject}\n onClickCapture={onClick}\n data-dialog-reference-hidden={isReferenceHidden}\n >\n <CSSTransition\n classNames={transitionOptions.classNames}\n nodeRef={contentRef}\n in={isOpen}\n appear={!!animationType}\n timeout={showDelay}\n >\n <div\n className={cx(styles.contentComponent, getStyle(styles, camelCase(position)), {\n [getStyle(styles, camelCase(\"edge-\" + startingEdge))]: startingEdge,\n [styles.hasTooltip]: hasTooltip\n })}\n ref={contentRef}\n >\n {childrenWithHandlers}\n </div>\n </CSSTransition>\n </span>\n );\n }\n);\n\nexport default DialogContent;\n"],"names":["EMPTY_OBJECT","ESCAPE_KEYS","keyCodes","ESCAPE","DialogContent","forwardRef","onEsc","NOOP","children","position","wrapperClassName","isOpen","startingEdge","animationType","onMouseEnter","onMouseLeave","onClickOutside","onClick","onContextMenu","showDelay","styleObject","isReferenceHidden","hasTooltip","containerSelector","disableContainerScroll","dataTestId","forwardedRef","contentRef","useRef","wrapperRef","mergedWrapperRef","useMergeRef","onOutsideClick","useCallback","event","overrideOnContextMenu","escapeCallback","useMemo","useKeyEvent","keys","callback","useClickOutside","ref","eventName","selectorToDisable","disableScroll","enableScroll","useDisableScroll","useEffect","transitionOptions","classNames","undefined","appear","styles","expandAppear","appearActive","expandAppearActive","exit","expandExit","opacitySlideAppear","opacitySlideAppearActive","childrenWithHandlers","React","Children","map","child","isValidElement","cloneElement","chainFunctions","props","createElement","className","cx","contentWrapper","style","onClickCapture","CSSTransition","nodeRef","in","timeout","contentComponent","getStyle","camelCase"],"mappings":"0eAiCA,MAAMA,EAA8B,CAAA,EAC9BC,EAAc,CAACC,EAASC,QA6ExBC,EAAgBC,GACpB,EAEIC,QAAQC,EACRC,WACAC,WACAC,mBACAC,UAAS,EACTC,eACAC,gBAAgB,SAChBC,eAAeP,EACfQ,eAAeR,EACfS,iBAAiBT,EACjBU,UAAUV,EACVW,gBAAgBX,EAChBY,YACAC,cAAcpB,EACdqB,oBACAC,cAAa,EACbC,oBACAC,0BAAyB,EACzB,cAAeC,GAEjBC,KAEA,MAAMC,EAAaC,EAAuB,MACpCC,EAAaD,EAAwB,MACrCE,EAAmBC,EAAYL,EAAcG,GAE7CG,EAAiBC,GACpBC,IACC,GAAIvB,EACF,OAAOK,EAAekB,EAAO,eAC/B,GAEF,CAACvB,EAAQK,IAELmB,EAAwBF,GAC3BC,IACKvB,GACFO,EAAcgB,EAChB,GAEF,CAACvB,EAAQO,IAILkB,EAAiBC,GACrB,IAAOH,IACDvB,GAAUL,IAAUC,GACtBD,EAAM4B,EACR,GAEF,CAACvB,EAAQL,IAEXgC,EAAY,CAAEC,KAAMtC,EAAauC,SAAUJ,IAG3CK,EAAgB,CAAED,SAAUR,EAAgBU,IAAKb,IACjDY,EAAgB,CAAEE,UAAW,cAAeH,SAAUL,EAAuBO,IAAKb,IAClF,MAAMe,EAAsD,iBAA3BpB,EAAsCA,EAAyBD,GAC1FsB,cAAEA,EAAaC,aAAEA,GAAiBC,EAAiBH,GAEzDI,GAAU,KACJxB,IACEb,EACFkC,IAEAC,IAEJ,GACC,CAACtB,EAAwBqB,EAAeC,EAAcnC,IAEzD,MAAMsC,EAAiD,CAAEC,gBAAYC,GAErE,OAAQtC,GACN,IAAK,SACHoC,EAAkBC,WAAa,CAC7BE,OAAQC,EAAOC,aACfC,aAAcF,EAAOG,mBACrBC,KAAMJ,EAAOK,YAEf,MACF,IAAK,oBACHT,EAAkBC,WAAa,CAC7BE,OAAQC,EAAOM,mBACfJ,aAAcF,EAAOO,0BAM3B,MAAMC,EAAuBC,EAAMC,SAASC,IAAIxD,GAAUyD,GAEnDH,EAAMI,eAAeD,GAInBE,EAAaF,EAAuB,CACzCnD,aAAcsD,EAAe,CAAEH,EAAuBI,MAAMvD,aAAcA,IAC1EC,aAAcqD,EAAe,CAAEH,EAAuBI,MAAMtD,aAAcA,MALnEkD,IASX,OACEH,EAAAQ,cAAA,OAAA,CAEEC,UAAWC,EAAG,sCAAuCnB,EAAOoB,eAAgB/D,GAC5EgC,IAAKZ,EAAgB,cACRL,EACbiD,MAAOtD,EACPuD,eAAgB1D,EAAO,+BACOI,GAE9ByC,EAACQ,cAAAM,EACC,CAAA1B,WAAYD,EAAkBC,WAC9B2B,QAASlD,EACTmD,GAAInE,EACJyC,SAAUvC,EACVkE,QAAS5D,GAET2C,EAAAQ,cAAA,MAAA,CACEC,UAAWC,EAAGnB,EAAO2B,iBAAkBC,EAAS5B,EAAQ6B,EAAUzE,IAAY,CAC5E,CAACwE,EAAS5B,EAAQ6B,EAAU,QAAUtE,KAAiBA,EACvD,CAACyC,EAAO/B,YAAaA,IAEvBoB,IAAKf,GAEJkC,IAGA"}
@@ -1,2 +1,2 @@
1
- var e={contentWrapper:"contentWrapper_6feaf8446d",top:"top_f3ab5496b5",right:"right_03166b8107",left:"left_7f5be6bc29",bottom:"bottom_bec308977b",bottomStart:"bottomStart_e346db0baf",topStart:"topStart_e35ade4416",bottomEnd:"bottomEnd_209d0a582b",topEnd:"topEnd_28a829270a",leftStart:"leftStart_28a64bc8b2",rightStart:"rightStart_20072f7e5b",leftEnd:"leftEnd_f1501c25bd",rightEnd:"rightEnd_cf254ed741",contentComponent:"contentComponent_b39a5e38e7",hasTooltip:"hasTooltip_0d5fcff08a",opacitySlideAppear:"opacitySlideAppear_1e10667b12",opacitySlideAppearActive:"opacitySlideAppearActive_72f3c5e9f2",expandAppear:"expandAppear_9c54d58d1e",expandExit:"expandExit_2693370975",edgeBottom:"edgeBottom_6290eaa1b3",edgeTop:"edgeTop_b3acdf2e66",expandAppearActive:"expandAppearActive_7e09f7c88d"};!function(e){const t="s_id-b5fc9eb29715_4_0_0-alpha_0";if("undefined"!=typeof document){const a=document.head||document.getElementsByTagName("head")[0];if(a.querySelector("#"+t))return;const n=document.createElement("style");n.id=t,a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.contentWrapper_6feaf8446d {\n outline: 0;\n}\n.contentWrapper_6feaf8446d.top_f3ab5496b5, .contentWrapper_6feaf8446d.right_03166b8107, .contentWrapper_6feaf8446d.left_7f5be6bc29, .contentWrapper_6feaf8446d.bottom_bec308977b {\n padding: var(--space-4);\n}\n.contentWrapper_6feaf8446d.bottomStart_e346db0baf, .contentWrapper_6feaf8446d.topStart_e35ade4416, .contentWrapper_6feaf8446d.bottomEnd_209d0a582b, .contentWrapper_6feaf8446d.topEnd_28a829270a {\n padding-block: var(--space-4);\n}\n.contentWrapper_6feaf8446d.bottomStart_e346db0baf, .contentWrapper_6feaf8446d.topStart_e35ade4416 {\n padding-inline-end: var(--space-4);\n}\n.contentWrapper_6feaf8446d.bottomEnd_209d0a582b, .contentWrapper_6feaf8446d.topEnd_28a829270a {\n padding-inline-start: var(--space-4);\n}\n.contentWrapper_6feaf8446d.leftStart_28a64bc8b2, .contentWrapper_6feaf8446d.rightStart_20072f7e5b, .contentWrapper_6feaf8446d.leftEnd_f1501c25bd, .contentWrapper_6feaf8446d.rightEnd_cf254ed741 {\n padding-inline: var(--space-4);\n}\n.contentWrapper_6feaf8446d.leftStart_28a64bc8b2, .contentWrapper_6feaf8446d.rightStart_20072f7e5b {\n padding-block-end: var(--space-4);\n}\n.contentWrapper_6feaf8446d.leftEnd_f1501c25bd, .contentWrapper_6feaf8446d.rightEnd_cf254ed741 {\n padding-block-start: var(--space-4);\n}\n.contentWrapper_6feaf8446d[data-dialog-reference-hidden=true] {\n visibility: hidden;\n pointer-events: none;\n}\n.contentComponent_b39a5e38e7:focus {\n outline: none;\n}\n.contentComponent_b39a5e38e7.hasTooltip_0d5fcff08a {\n padding: 6px;\n}\n.opacitySlideAppear_1e10667b12 {\n opacity: 0;\n}\n.opacitySlideAppear_1e10667b12.top_f3ab5496b5 {\n transform: translateY(var(--space-16));\n}\n.opacitySlideAppear_1e10667b12.right_03166b8107 {\n transform: translateX(calc(var(--space-16) * -1));\n}\n.opacitySlideAppear_1e10667b12.bottom_bec308977b {\n transform: translateY(calc(var(--space-16) * -1));\n}\n.opacitySlideAppear_1e10667b12.left_7f5be6bc29 {\n transform: translateX(var(--space-16));\n}\n.opacitySlideAppearActive_72f3c5e9f2 {\n transition: opacity 0.2s ease, transform 0.2s ease-out;\n opacity: 1;\n pointer-events: none;\n}\n.opacitySlideAppearActive_72f3c5e9f2.top_f3ab5496b5, .opacitySlideAppearActive_72f3c5e9f2.bottom_bec308977b {\n transform: translateY(0);\n}\n.opacitySlideAppearActive_72f3c5e9f2.right_03166b8107, .opacitySlideAppearActive_72f3c5e9f2.left_7f5be6bc29 {\n transform: translateX(0);\n}\n.expandAppear_9c54d58d1e,\n.expandExit_2693370975 {\n transition: transform 0.1s cubic-bezier(0, 0, 0.35, 1);\n}\n.expandAppear_9c54d58d1e.top_f3ab5496b5, .expandAppear_9c54d58d1e.topStart_e35ade4416, .expandAppear_9c54d58d1e.topEnd_28a829270a,\n.expandExit_2693370975.top_f3ab5496b5,\n.expandExit_2693370975.topStart_e35ade4416,\n.expandExit_2693370975.topEnd_28a829270a {\n transform-origin: bottom center;\n transform: scale(0.8);\n}\n.expandAppear_9c54d58d1e.top_f3ab5496b5.edgeBottom_6290eaa1b3, .expandAppear_9c54d58d1e.topStart_e35ade4416.edgeBottom_6290eaa1b3, .expandAppear_9c54d58d1e.topEnd_28a829270a.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.top_f3ab5496b5.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.topStart_e35ade4416.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.topEnd_28a829270a.edgeBottom_6290eaa1b3 {\n transform-origin: bottom left;\n}\n.expandAppear_9c54d58d1e.top_f3ab5496b5.edgeTop_b3acdf2e66, .expandAppear_9c54d58d1e.topStart_e35ade4416.edgeTop_b3acdf2e66, .expandAppear_9c54d58d1e.topEnd_28a829270a.edgeTop_b3acdf2e66,\n.expandExit_2693370975.top_f3ab5496b5.edgeTop_b3acdf2e66,\n.expandExit_2693370975.topStart_e35ade4416.edgeTop_b3acdf2e66,\n.expandExit_2693370975.topEnd_28a829270a.edgeTop_b3acdf2e66 {\n transform-origin: bottom right;\n}\n.expandAppear_9c54d58d1e.right_03166b8107, .expandAppear_9c54d58d1e.rightStart_20072f7e5b, .expandAppear_9c54d58d1e.rightEnd_cf254ed741,\n.expandExit_2693370975.right_03166b8107,\n.expandExit_2693370975.rightStart_20072f7e5b,\n.expandExit_2693370975.rightEnd_cf254ed741 {\n transform-origin: left;\n transform: scale(0.8);\n}\n.expandAppear_9c54d58d1e.right_03166b8107.edgeBottom_6290eaa1b3, .expandAppear_9c54d58d1e.rightStart_20072f7e5b.edgeBottom_6290eaa1b3, .expandAppear_9c54d58d1e.rightEnd_cf254ed741.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.right_03166b8107.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.rightStart_20072f7e5b.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.rightEnd_cf254ed741.edgeBottom_6290eaa1b3 {\n transform-origin: top left;\n}\n.expandAppear_9c54d58d1e.right_03166b8107.edgeTop_b3acdf2e66, .expandAppear_9c54d58d1e.rightStart_20072f7e5b.edgeTop_b3acdf2e66, .expandAppear_9c54d58d1e.rightEnd_cf254ed741.edgeTop_b3acdf2e66,\n.expandExit_2693370975.right_03166b8107.edgeTop_b3acdf2e66,\n.expandExit_2693370975.rightStart_20072f7e5b.edgeTop_b3acdf2e66,\n.expandExit_2693370975.rightEnd_cf254ed741.edgeTop_b3acdf2e66 {\n transform-origin: bottom left;\n}\n.expandAppear_9c54d58d1e.bottom_bec308977b, .expandAppear_9c54d58d1e.bottomStart_e346db0baf, .expandAppear_9c54d58d1e.bottomEnd_209d0a582b,\n.expandExit_2693370975.bottom_bec308977b,\n.expandExit_2693370975.bottomStart_e346db0baf,\n.expandExit_2693370975.bottomEnd_209d0a582b {\n transform-origin: top;\n transform: scale(0.8);\n}\n.expandAppear_9c54d58d1e.bottom_bec308977b.edgeBottom_6290eaa1b3, .expandAppear_9c54d58d1e.bottomStart_e346db0baf.edgeBottom_6290eaa1b3, .expandAppear_9c54d58d1e.bottomEnd_209d0a582b.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.bottom_bec308977b.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.bottomStart_e346db0baf.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.bottomEnd_209d0a582b.edgeBottom_6290eaa1b3 {\n transform-origin: top left;\n}\n.expandAppear_9c54d58d1e.bottom_bec308977b.edgeTop_b3acdf2e66, .expandAppear_9c54d58d1e.bottomStart_e346db0baf.edgeTop_b3acdf2e66, .expandAppear_9c54d58d1e.bottomEnd_209d0a582b.edgeTop_b3acdf2e66,\n.expandExit_2693370975.bottom_bec308977b.edgeTop_b3acdf2e66,\n.expandExit_2693370975.bottomStart_e346db0baf.edgeTop_b3acdf2e66,\n.expandExit_2693370975.bottomEnd_209d0a582b.edgeTop_b3acdf2e66 {\n transform-origin: top right;\n}\n.expandAppear_9c54d58d1e.left_7f5be6bc29, .expandAppear_9c54d58d1e.leftStart_28a64bc8b2, .expandAppear_9c54d58d1e.leftEnd_f1501c25bd,\n.expandExit_2693370975.left_7f5be6bc29,\n.expandExit_2693370975.leftStart_28a64bc8b2,\n.expandExit_2693370975.leftEnd_f1501c25bd {\n transform-origin: right;\n transform: scale(0.8);\n}\n.expandAppear_9c54d58d1e.left_7f5be6bc29.edgeBottom_6290eaa1b3, .expandAppear_9c54d58d1e.leftStart_28a64bc8b2.edgeBottom_6290eaa1b3, .expandAppear_9c54d58d1e.leftEnd_f1501c25bd.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.left_7f5be6bc29.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.leftStart_28a64bc8b2.edgeBottom_6290eaa1b3,\n.expandExit_2693370975.leftEnd_f1501c25bd.edgeBottom_6290eaa1b3 {\n transform-origin: top right;\n}\n.expandAppear_9c54d58d1e.left_7f5be6bc29.edgeTop_b3acdf2e66, .expandAppear_9c54d58d1e.leftStart_28a64bc8b2.edgeTop_b3acdf2e66, .expandAppear_9c54d58d1e.leftEnd_f1501c25bd.edgeTop_b3acdf2e66,\n.expandExit_2693370975.left_7f5be6bc29.edgeTop_b3acdf2e66,\n.expandExit_2693370975.leftStart_28a64bc8b2.edgeTop_b3acdf2e66,\n.expandExit_2693370975.leftEnd_f1501c25bd.edgeTop_b3acdf2e66 {\n transform-origin: bottom right;\n}\n.expandExit_2693370975 {\n transition: transform 0.1s cubic-bezier(0, 0, 0.35, 1);\n}\n.expandAppearActive_7e09f7c88d {\n transition: transform 0.1s cubic-bezier(0, 0, 0.35, 1);\n pointer-events: none;\n}\n.expandAppearActive_7e09f7c88d.top_f3ab5496b5, .expandAppearActive_7e09f7c88d.topStart_e35ade4416, .expandAppearActive_7e09f7c88d.topEnd_28a829270a, .expandAppearActive_7e09f7c88d.bottom_bec308977b, .expandAppearActive_7e09f7c88d.bottomStart_e346db0baf, .expandAppearActive_7e09f7c88d.bottomEnd_209d0a582b, .expandAppearActive_7e09f7c88d.right_03166b8107, .expandAppearActive_7e09f7c88d.rightStart_20072f7e5b, .expandAppearActive_7e09f7c88d.rightEnd_cf254ed741, .expandAppearActive_7e09f7c88d.left_7f5be6bc29, .expandAppearActive_7e09f7c88d.leftStart_28a64bc8b2, .expandAppearActive_7e09f7c88d.leftEnd_f1501c25bd {\n transform: scale(1);\n}");export{e as default};
1
+ var e={contentWrapper:"contentWrapper_8668232f0e",top:"top_4ba4151aa8",right:"right_e179e42aa9",left:"left_77fc68d0df",bottom:"bottom_9f5adc5420",bottomStart:"bottomStart_fbd1e25e89",topStart:"topStart_9a8c4a01bc",bottomEnd:"bottomEnd_ba529273ef",topEnd:"topEnd_0e38f20f92",leftStart:"leftStart_cf0b3a6bb9",rightStart:"rightStart_580e8aef51",leftEnd:"leftEnd_ce9e71cb01",rightEnd:"rightEnd_d96bee3181",contentComponent:"contentComponent_b34301a306",hasTooltip:"hasTooltip_a1adbdc630",opacitySlideAppear:"opacitySlideAppear_f6f46e5a82",opacitySlideAppearActive:"opacitySlideAppearActive_85cf766591",expandAppear:"expandAppear_06c51691ba",expandExit:"expandExit_a6a8ffad6c",edgeBottom:"edgeBottom_9b900eb12f",edgeTop:"edgeTop_ca42d0fbe4",expandAppearActive:"expandAppearActive_33fb953403"};!function(e){const a="s_id-b5fc9eb29715_4_0_0-alpha_1";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+a))return;const n=document.createElement("style");n.id=a,t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[a]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.contentWrapper_8668232f0e {\n outline: 0;\n}\n.contentWrapper_8668232f0e.top_4ba4151aa8, .contentWrapper_8668232f0e.right_e179e42aa9, .contentWrapper_8668232f0e.left_77fc68d0df, .contentWrapper_8668232f0e.bottom_9f5adc5420 {\n padding: var(--space-4);\n}\n.contentWrapper_8668232f0e.bottomStart_fbd1e25e89, .contentWrapper_8668232f0e.topStart_9a8c4a01bc, .contentWrapper_8668232f0e.bottomEnd_ba529273ef, .contentWrapper_8668232f0e.topEnd_0e38f20f92 {\n padding-block: var(--space-4);\n}\n.contentWrapper_8668232f0e.bottomStart_fbd1e25e89, .contentWrapper_8668232f0e.topStart_9a8c4a01bc {\n padding-inline-end: var(--space-4);\n}\n.contentWrapper_8668232f0e.bottomEnd_ba529273ef, .contentWrapper_8668232f0e.topEnd_0e38f20f92 {\n padding-inline-start: var(--space-4);\n}\n.contentWrapper_8668232f0e.leftStart_cf0b3a6bb9, .contentWrapper_8668232f0e.rightStart_580e8aef51, .contentWrapper_8668232f0e.leftEnd_ce9e71cb01, .contentWrapper_8668232f0e.rightEnd_d96bee3181 {\n padding-inline: var(--space-4);\n}\n.contentWrapper_8668232f0e.leftStart_cf0b3a6bb9, .contentWrapper_8668232f0e.rightStart_580e8aef51 {\n padding-block-end: var(--space-4);\n}\n.contentWrapper_8668232f0e.leftEnd_ce9e71cb01, .contentWrapper_8668232f0e.rightEnd_d96bee3181 {\n padding-block-start: var(--space-4);\n}\n.contentWrapper_8668232f0e[data-dialog-reference-hidden=true] {\n visibility: hidden;\n pointer-events: none;\n}\n.contentComponent_b34301a306:focus {\n outline: none;\n}\n.contentComponent_b34301a306.hasTooltip_a1adbdc630 {\n padding: 6px;\n}\n.opacitySlideAppear_f6f46e5a82 {\n opacity: 0;\n}\n.opacitySlideAppear_f6f46e5a82.top_4ba4151aa8 {\n transform: translateY(var(--space-16));\n}\n.opacitySlideAppear_f6f46e5a82.right_e179e42aa9 {\n transform: translateX(calc(var(--space-16) * -1));\n}\n.opacitySlideAppear_f6f46e5a82.bottom_9f5adc5420 {\n transform: translateY(calc(var(--space-16) * -1));\n}\n.opacitySlideAppear_f6f46e5a82.left_77fc68d0df {\n transform: translateX(var(--space-16));\n}\n.opacitySlideAppearActive_85cf766591 {\n transition: opacity 0.2s ease, transform 0.2s ease-out;\n opacity: 1;\n pointer-events: none;\n}\n.opacitySlideAppearActive_85cf766591.top_4ba4151aa8, .opacitySlideAppearActive_85cf766591.bottom_9f5adc5420 {\n transform: translateY(0);\n}\n.opacitySlideAppearActive_85cf766591.right_e179e42aa9, .opacitySlideAppearActive_85cf766591.left_77fc68d0df {\n transform: translateX(0);\n}\n.expandAppear_06c51691ba,\n.expandExit_a6a8ffad6c {\n transition: transform 0.1s cubic-bezier(0, 0, 0.35, 1);\n}\n.expandAppear_06c51691ba.top_4ba4151aa8, .expandAppear_06c51691ba.topStart_9a8c4a01bc, .expandAppear_06c51691ba.topEnd_0e38f20f92,\n.expandExit_a6a8ffad6c.top_4ba4151aa8,\n.expandExit_a6a8ffad6c.topStart_9a8c4a01bc,\n.expandExit_a6a8ffad6c.topEnd_0e38f20f92 {\n transform-origin: bottom center;\n transform: scale(0.8);\n}\n.expandAppear_06c51691ba.top_4ba4151aa8.edgeBottom_9b900eb12f, .expandAppear_06c51691ba.topStart_9a8c4a01bc.edgeBottom_9b900eb12f, .expandAppear_06c51691ba.topEnd_0e38f20f92.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.top_4ba4151aa8.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.topStart_9a8c4a01bc.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.topEnd_0e38f20f92.edgeBottom_9b900eb12f {\n transform-origin: bottom left;\n}\n.expandAppear_06c51691ba.top_4ba4151aa8.edgeTop_ca42d0fbe4, .expandAppear_06c51691ba.topStart_9a8c4a01bc.edgeTop_ca42d0fbe4, .expandAppear_06c51691ba.topEnd_0e38f20f92.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.top_4ba4151aa8.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.topStart_9a8c4a01bc.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.topEnd_0e38f20f92.edgeTop_ca42d0fbe4 {\n transform-origin: bottom right;\n}\n.expandAppear_06c51691ba.right_e179e42aa9, .expandAppear_06c51691ba.rightStart_580e8aef51, .expandAppear_06c51691ba.rightEnd_d96bee3181,\n.expandExit_a6a8ffad6c.right_e179e42aa9,\n.expandExit_a6a8ffad6c.rightStart_580e8aef51,\n.expandExit_a6a8ffad6c.rightEnd_d96bee3181 {\n transform-origin: left;\n transform: scale(0.8);\n}\n.expandAppear_06c51691ba.right_e179e42aa9.edgeBottom_9b900eb12f, .expandAppear_06c51691ba.rightStart_580e8aef51.edgeBottom_9b900eb12f, .expandAppear_06c51691ba.rightEnd_d96bee3181.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.right_e179e42aa9.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.rightStart_580e8aef51.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.rightEnd_d96bee3181.edgeBottom_9b900eb12f {\n transform-origin: top left;\n}\n.expandAppear_06c51691ba.right_e179e42aa9.edgeTop_ca42d0fbe4, .expandAppear_06c51691ba.rightStart_580e8aef51.edgeTop_ca42d0fbe4, .expandAppear_06c51691ba.rightEnd_d96bee3181.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.right_e179e42aa9.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.rightStart_580e8aef51.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.rightEnd_d96bee3181.edgeTop_ca42d0fbe4 {\n transform-origin: bottom left;\n}\n.expandAppear_06c51691ba.bottom_9f5adc5420, .expandAppear_06c51691ba.bottomStart_fbd1e25e89, .expandAppear_06c51691ba.bottomEnd_ba529273ef,\n.expandExit_a6a8ffad6c.bottom_9f5adc5420,\n.expandExit_a6a8ffad6c.bottomStart_fbd1e25e89,\n.expandExit_a6a8ffad6c.bottomEnd_ba529273ef {\n transform-origin: top;\n transform: scale(0.8);\n}\n.expandAppear_06c51691ba.bottom_9f5adc5420.edgeBottom_9b900eb12f, .expandAppear_06c51691ba.bottomStart_fbd1e25e89.edgeBottom_9b900eb12f, .expandAppear_06c51691ba.bottomEnd_ba529273ef.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.bottom_9f5adc5420.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.bottomStart_fbd1e25e89.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.bottomEnd_ba529273ef.edgeBottom_9b900eb12f {\n transform-origin: top left;\n}\n.expandAppear_06c51691ba.bottom_9f5adc5420.edgeTop_ca42d0fbe4, .expandAppear_06c51691ba.bottomStart_fbd1e25e89.edgeTop_ca42d0fbe4, .expandAppear_06c51691ba.bottomEnd_ba529273ef.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.bottom_9f5adc5420.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.bottomStart_fbd1e25e89.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.bottomEnd_ba529273ef.edgeTop_ca42d0fbe4 {\n transform-origin: top right;\n}\n.expandAppear_06c51691ba.left_77fc68d0df, .expandAppear_06c51691ba.leftStart_cf0b3a6bb9, .expandAppear_06c51691ba.leftEnd_ce9e71cb01,\n.expandExit_a6a8ffad6c.left_77fc68d0df,\n.expandExit_a6a8ffad6c.leftStart_cf0b3a6bb9,\n.expandExit_a6a8ffad6c.leftEnd_ce9e71cb01 {\n transform-origin: right;\n transform: scale(0.8);\n}\n.expandAppear_06c51691ba.left_77fc68d0df.edgeBottom_9b900eb12f, .expandAppear_06c51691ba.leftStart_cf0b3a6bb9.edgeBottom_9b900eb12f, .expandAppear_06c51691ba.leftEnd_ce9e71cb01.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.left_77fc68d0df.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.leftStart_cf0b3a6bb9.edgeBottom_9b900eb12f,\n.expandExit_a6a8ffad6c.leftEnd_ce9e71cb01.edgeBottom_9b900eb12f {\n transform-origin: top right;\n}\n.expandAppear_06c51691ba.left_77fc68d0df.edgeTop_ca42d0fbe4, .expandAppear_06c51691ba.leftStart_cf0b3a6bb9.edgeTop_ca42d0fbe4, .expandAppear_06c51691ba.leftEnd_ce9e71cb01.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.left_77fc68d0df.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.leftStart_cf0b3a6bb9.edgeTop_ca42d0fbe4,\n.expandExit_a6a8ffad6c.leftEnd_ce9e71cb01.edgeTop_ca42d0fbe4 {\n transform-origin: bottom right;\n}\n.expandExit_a6a8ffad6c {\n transition: transform 0.1s cubic-bezier(0, 0, 0.35, 1);\n}\n.expandAppearActive_33fb953403 {\n transition: transform 0.1s cubic-bezier(0, 0, 0.35, 1);\n pointer-events: none;\n}\n.expandAppearActive_33fb953403.top_4ba4151aa8, .expandAppearActive_33fb953403.topStart_9a8c4a01bc, .expandAppearActive_33fb953403.topEnd_0e38f20f92, .expandAppearActive_33fb953403.bottom_9f5adc5420, .expandAppearActive_33fb953403.bottomStart_fbd1e25e89, .expandAppearActive_33fb953403.bottomEnd_ba529273ef, .expandAppearActive_33fb953403.right_e179e42aa9, .expandAppearActive_33fb953403.rightStart_580e8aef51, .expandAppearActive_33fb953403.rightEnd_d96bee3181, .expandAppearActive_33fb953403.left_77fc68d0df, .expandAppearActive_33fb953403.leftStart_cf0b3a6bb9, .expandAppearActive_33fb953403.leftEnd_ce9e71cb01 {\n transform: scale(1);\n}");export{e as default};
2
2
  //# sourceMappingURL=DialogContent.module.scss.js.map
@@ -1,18 +1,18 @@
1
- import React, { type HTMLProps, type ReactElement } from "react";
2
- import { type VibeComponentProps } from "@vibe/shared";
3
- export interface RefableProps extends React.PropsWithChildren<HTMLProps<HTMLElement> & VibeComponentProps> {
4
- children: ReactElement | ReactElement[] | string;
5
- /**
6
- * The wrapper element type to use for React components. Defaults to "span".
7
- */
8
- wrapperElement?: "span" | "div";
9
- }
10
- /**
11
- * Refable is a utility component that enables ref forwarding to children elements.
12
- *
13
- * For native HTML elements: Clones the child and merges refs and event handlers.
14
- * For React components: Wraps in a span/div and attaches the ref to the wrapper.
15
- *
16
- * This allows Dialog to get a reference to the trigger element for positioning.
17
- */
18
- export declare const Refable: React.ForwardRefExoticComponent<Omit<RefableProps, "ref"> & React.RefAttributes<HTMLElement>>;
1
+ import React, { type HTMLProps, type ReactElement } from "react";
2
+ import { type VibeComponentProps } from "@vibe/shared";
3
+ export interface RefableProps extends React.PropsWithChildren<HTMLProps<HTMLElement> & VibeComponentProps> {
4
+ children: ReactElement | ReactElement[] | string;
5
+ /**
6
+ * The wrapper element type to use for React components. Defaults to "span".
7
+ */
8
+ wrapperElement?: "span" | "div";
9
+ }
10
+ /**
11
+ * Refable is a utility component that enables ref forwarding to children elements.
12
+ *
13
+ * For native HTML elements: Clones the child and merges refs and event handlers.
14
+ * For React components: Wraps in a span/div and attaches the ref to the wrapper.
15
+ *
16
+ * This allows Dialog to get a reference to the trigger element for positioning.
17
+ */
18
+ export declare const Refable: React.ForwardRefExoticComponent<Omit<RefableProps, "ref"> & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Refable.js","sources":["../../../../src/Dialog/components/Refable/Refable.tsx"],"sourcesContent":["import React, { type HTMLProps, type ReactElement } from \"react\";\nimport { chainFunctions, chainRefFunctions, type VibeComponentProps } from \"@vibe/shared\";\n\nexport interface RefableProps extends React.PropsWithChildren<HTMLProps<HTMLElement> & VibeComponentProps> {\n children: ReactElement | ReactElement[] | string;\n /**\n * The wrapper element type to use for React components. Defaults to \"span\".\n */\n wrapperElement?: \"span\" | \"div\";\n}\n\n/**\n * Refable is a utility component that enables ref forwarding to children elements.\n *\n * For native HTML elements: Clones the child and merges refs and event handlers.\n * For React components: Wraps in a span/div and attaches the ref to the wrapper.\n *\n * This allows Dialog to get a reference to the trigger element for positioning.\n */\nexport const Refable = React.forwardRef<HTMLElement, RefableProps>(\n ({ children, wrapperElement = \"span\", ...rest }, ref) => {\n return React.Children.map(children, child => {\n if (!React.isValidElement(child)) return null;\n\n // For React components, wrap in a native element to attach the ref\n if (typeof child.type !== \"string\") {\n const WrapperElement = wrapperElement;\n return (\n // @ts-expect-error - TypeScript can't infer the correct ref type when using a variable as JSX tag\n <WrapperElement ref={ref} {...rest}>\n {child}\n </WrapperElement>\n );\n }\n\n // For native HTML elements, clone and merge props/refs\n const childProps = child.props as React.HTMLProps<HTMLElement>;\n\n return React.cloneElement(child, {\n ...rest,\n ...childProps,\n // Chain all event handlers to preserve both parent and child handlers\n onClick: getChainedFunction(\"onClick\", childProps, rest),\n onBlur: getChainedFunction(\"onBlur\", childProps, rest),\n onFocus: getChainedFunction(\"onFocus\", childProps, rest),\n onMouseEnter: getChainedFunction(\"onMouseEnter\", childProps, rest),\n onMouseLeave: getChainedFunction(\"onMouseLeave\", childProps, rest),\n onMouseDown: getChainedFunction(\"onMouseDown\", childProps, rest),\n onKeyDown: getChainedFunction(\"onKeyDown\", childProps, rest),\n onContextMenu: getChainedFunction(\"onContextMenu\", childProps, rest),\n ref: chainRefFunctions([(child as any).ref, ref])\n } as any);\n }) as any;\n }\n);\n\nfunction getChainedFunction(\n name: keyof React.HTMLProps<unknown>,\n childProps: React.PropsWithChildren<React.HTMLProps<unknown>>,\n wrapperProps: React.HTMLProps<unknown>\n) {\n return chainFunctions([childProps[name], wrapperProps[name]], true);\n}\n"],"names":["Refable","React","forwardRef","_a","ref","children","wrapperElement","rest","__rest","Children","map","child","isValidElement","type","createElement","Object","assign","childProps","props","cloneElement","onClick","getChainedFunction","onBlur","onFocus","onMouseEnter","onMouseLeave","onMouseDown","onKeyDown","onContextMenu","chainRefFunctions","name","wrapperProps","chainFunctions"],"mappings":"+IAmBO,MAAMA,EAAUC,EAAMC,YAC3B,CAACC,EAAgDC,SAAhDC,SAAEA,EAAQC,eAAEA,EAAiB,UAAWC,EAAxCC,EAAAL,EAAA,CAAA,WAAA,mBACC,OAAOF,EAAMQ,SAASC,IAAIL,GAAUM,IAClC,IAAKV,EAAMW,eAAeD,GAAQ,OAAO,KAGzC,GAA0B,iBAAfA,EAAME,KAAmB,CAElC,OAEEZ,EAACa,cAHoBR,EAGLS,OAAAC,OAAA,CAAAZ,IAAKA,GAASG,GAC3BI,EAGN,CAGD,MAAMM,EAAaN,EAAMO,MAEzB,OAAOjB,EAAMkB,aAAaR,EAAOI,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAC5BT,GACAU,GAAU,CAEbG,QAASC,EAAmB,UAAWJ,EAAYV,GACnDe,OAAQD,EAAmB,SAAUJ,EAAYV,GACjDgB,QAASF,EAAmB,UAAWJ,EAAYV,GACnDiB,aAAcH,EAAmB,eAAgBJ,EAAYV,GAC7DkB,aAAcJ,EAAmB,eAAgBJ,EAAYV,GAC7DmB,YAAaL,EAAmB,cAAeJ,EAAYV,GAC3DoB,UAAWN,EAAmB,YAAaJ,EAAYV,GACvDqB,cAAeP,EAAmB,gBAAiBJ,EAAYV,GAC/DH,IAAKyB,EAAkB,CAAElB,EAAcP,IAAKA,MACrC,GACF,IAIb,SAASiB,EACPS,EACAb,EACAc,GAEA,OAAOC,EAAe,CAACf,EAAWa,GAAOC,EAAaD,KAAQ,EAChE"}
1
+ {"version":3,"file":"Refable.js","sources":["../../../../src/Dialog/components/Refable/Refable.tsx"],"sourcesContent":["import React, { type HTMLProps, type ReactElement } from \"react\";\nimport { chainFunctions, chainRefFunctions, type VibeComponentProps } from \"@vibe/shared\";\n\nexport interface RefableProps extends React.PropsWithChildren<HTMLProps<HTMLElement> & VibeComponentProps> {\n children: ReactElement | ReactElement[] | string;\n /**\n * The wrapper element type to use for React components. Defaults to \"span\".\n */\n wrapperElement?: \"span\" | \"div\";\n}\n\n/**\n * Refable is a utility component that enables ref forwarding to children elements.\n *\n * For native HTML elements: Clones the child and merges refs and event handlers.\n * For React components: Wraps in a span/div and attaches the ref to the wrapper.\n *\n * This allows Dialog to get a reference to the trigger element for positioning.\n */\nexport const Refable = React.forwardRef<HTMLElement, RefableProps>(\n ({ children, wrapperElement = \"span\", ...rest }, ref) => {\n return React.Children.map(children, child => {\n if (!React.isValidElement(child)) return null;\n\n // For React components, wrap in a native element to attach the ref\n if (typeof child.type !== \"string\") {\n const WrapperElement = wrapperElement;\n return (\n // @ts-expect-error - TypeScript can't infer the correct ref type when using a variable as JSX tag\n <WrapperElement ref={ref} {...rest}>\n {child}\n </WrapperElement>\n );\n }\n\n // For native HTML elements, clone and merge props/refs\n const childProps = child.props as React.HTMLProps<HTMLElement>;\n\n return React.cloneElement(child, {\n ...rest,\n ...childProps,\n // Chain all event handlers to preserve both parent and child handlers\n onClick: getChainedFunction(\"onClick\", childProps, rest),\n onBlur: getChainedFunction(\"onBlur\", childProps, rest),\n onFocus: getChainedFunction(\"onFocus\", childProps, rest),\n onMouseEnter: getChainedFunction(\"onMouseEnter\", childProps, rest),\n onMouseLeave: getChainedFunction(\"onMouseLeave\", childProps, rest),\n onMouseDown: getChainedFunction(\"onMouseDown\", childProps, rest),\n onKeyDown: getChainedFunction(\"onKeyDown\", childProps, rest),\n onContextMenu: getChainedFunction(\"onContextMenu\", childProps, rest),\n ref: chainRefFunctions([(child as any).ref, ref])\n } as any);\n }) as any;\n }\n);\n\nfunction getChainedFunction(\n name: keyof React.HTMLProps<unknown>,\n childProps: React.PropsWithChildren<React.HTMLProps<unknown>>,\n wrapperProps: React.HTMLProps<unknown>\n) {\n return chainFunctions([childProps[name], wrapperProps[name]], true);\n}\n"],"names":["Refable","React","forwardRef","_a","ref","children","wrapperElement","rest","__rest","Children","map","child","isValidElement","type","createElement","Object","assign","childProps","props","cloneElement","onClick","getChainedFunction","onBlur","onFocus","onMouseEnter","onMouseLeave","onMouseDown","onKeyDown","onContextMenu","chainRefFunctions","name","wrapperProps","chainFunctions"],"mappings":"+IAmBO,MAAMA,EAAUC,EAAMC,YAC3B,CAACC,EAAgDC,SAAhDC,SAAEA,EAAQC,eAAEA,EAAiB,UAAWC,EAAxCC,EAAAL,EAAA,CAAA,WAAA,mBACC,OAAOF,EAAMQ,SAASC,IAAIL,GAAUM,IAClC,IAAKV,EAAMW,eAAeD,GAAQ,OAAO,KAGzC,GAA0B,iBAAfA,EAAME,KAAmB,CAElC,OAEEZ,EAACa,cAHoBR,EAGLS,OAAAC,OAAA,CAAAZ,IAAKA,GAASG,GAC3BI,EAGP,CAGA,MAAMM,EAAaN,EAAMO,MAEzB,OAAOjB,EAAMkB,aAAaR,EAAOI,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAC5BT,GACAU,GAAU,CAEbG,QAASC,EAAmB,UAAWJ,EAAYV,GACnDe,OAAQD,EAAmB,SAAUJ,EAAYV,GACjDgB,QAASF,EAAmB,UAAWJ,EAAYV,GACnDiB,aAAcH,EAAmB,eAAgBJ,EAAYV,GAC7DkB,aAAcJ,EAAmB,eAAgBJ,EAAYV,GAC7DmB,YAAaL,EAAmB,cAAeJ,EAAYV,GAC3DoB,UAAWN,EAAmB,YAAaJ,EAAYV,GACvDqB,cAAeP,EAAmB,gBAAiBJ,EAAYV,GAC/DH,IAAKyB,EAAkB,CAAElB,EAAcP,IAAKA,MACrC,GACF,IAIb,SAASiB,EACPS,EACAb,EACAc,GAEA,OAAOC,EAAe,CAACf,EAAWa,GAAOC,EAAaD,KAAQ,EAChE"}
@@ -1,5 +1,5 @@
1
- declare const useDisableScroll: (scrollableQuerySelector: string | undefined) => {
2
- disableScroll: () => void;
3
- enableScroll: () => void;
4
- };
5
- export default useDisableScroll;
1
+ declare const useDisableScroll: (scrollableQuerySelector: string | undefined) => {
2
+ disableScroll: () => void;
3
+ enableScroll: () => void;
4
+ };
5
+ export default useDisableScroll;
@@ -1 +1 @@
1
- {"version":3,"file":"useDisableScroll.js","sources":["../../../src/Dialog/hooks/useDisableScroll.ts"],"sourcesContent":["import { useCallback, useEffect } from \"react\";\n\nconst useDisableScroll = (scrollableQuerySelector: string | undefined) => {\n const _disableScroll = useCallback((e: Event) => {\n e.preventDefault();\n e.stopPropagation();\n\n return false;\n }, []);\n\n const disableScroll = useCallback(() => {\n if (scrollableQuerySelector?.length && scrollableQuerySelector.length > 0) {\n document.querySelectorAll(scrollableQuerySelector).forEach((item: Element) => {\n item.addEventListener(\"wheel\", _disableScroll, { passive: false });\n });\n }\n }, [_disableScroll, scrollableQuerySelector]);\n\n const enableScroll = useCallback(() => {\n if (scrollableQuerySelector?.length && scrollableQuerySelector.length > 0) {\n document.querySelectorAll(scrollableQuerySelector).forEach((item: Element) => {\n item.removeEventListener(\"wheel\", _disableScroll);\n });\n }\n }, [_disableScroll, scrollableQuerySelector]);\n\n useEffect(() => {\n return enableScroll;\n }, [enableScroll]);\n\n return {\n disableScroll,\n enableScroll\n };\n};\n\nexport default useDisableScroll;\n"],"names":["useDisableScroll","scrollableQuerySelector","_disableScroll","useCallback","e","preventDefault","stopPropagation","disableScroll","length","document","querySelectorAll","forEach","item","addEventListener","passive","enableScroll","removeEventListener","useEffect"],"mappings":"mDAEMA,MAAAA,EAAoBC,IACxB,MAAMC,EAAiBC,GAAaC,IAClCA,EAAEC,iBACFD,EAAEE,mBAEK,IACN,IAEGC,EAAgBJ,GAAY,MAC5BF,eAAAA,EAAyBO,SAAUP,EAAwBO,OAAS,GACtEC,SAASC,iBAAiBT,GAAyBU,SAASC,IAC1DA,EAAKC,iBAAiB,QAASX,EAAgB,CAAEY,SAAS,GAAQ,GAErE,GACA,CAACZ,EAAgBD,IAEdc,EAAeZ,GAAY,MAC3BF,eAAAA,EAAyBO,SAAUP,EAAwBO,OAAS,GACtEC,SAASC,iBAAiBT,GAAyBU,SAASC,IAC1DA,EAAKI,oBAAoB,QAASd,EAAe,GAEpD,GACA,CAACA,EAAgBD,IAMpB,OAJAgB,GAAU,IACDF,GACN,CAACA,IAEG,CACLR,gBACAQ,eACD"}
1
+ {"version":3,"file":"useDisableScroll.js","sources":["../../../src/Dialog/hooks/useDisableScroll.ts"],"sourcesContent":["import { useCallback, useEffect } from \"react\";\n\nconst useDisableScroll = (scrollableQuerySelector: string | undefined) => {\n const _disableScroll = useCallback((e: Event) => {\n e.preventDefault();\n e.stopPropagation();\n\n return false;\n }, []);\n\n const disableScroll = useCallback(() => {\n if (scrollableQuerySelector?.length && scrollableQuerySelector.length > 0) {\n document.querySelectorAll(scrollableQuerySelector).forEach((item: Element) => {\n item.addEventListener(\"wheel\", _disableScroll, { passive: false });\n });\n }\n }, [_disableScroll, scrollableQuerySelector]);\n\n const enableScroll = useCallback(() => {\n if (scrollableQuerySelector?.length && scrollableQuerySelector.length > 0) {\n document.querySelectorAll(scrollableQuerySelector).forEach((item: Element) => {\n item.removeEventListener(\"wheel\", _disableScroll);\n });\n }\n }, [_disableScroll, scrollableQuerySelector]);\n\n useEffect(() => {\n return enableScroll;\n }, [enableScroll]);\n\n return {\n disableScroll,\n enableScroll\n };\n};\n\nexport default useDisableScroll;\n"],"names":["useDisableScroll","scrollableQuerySelector","_disableScroll","useCallback","e","preventDefault","stopPropagation","disableScroll","length","document","querySelectorAll","forEach","item","addEventListener","passive","enableScroll","removeEventListener","useEffect"],"mappings":"mDAEMA,MAAAA,EAAoBC,IACxB,MAAMC,EAAiBC,GAAaC,IAClCA,EAAEC,iBACFD,EAAEE,mBAEK,IACN,IAEGC,EAAgBJ,GAAY,MAC5BF,eAAAA,EAAyBO,SAAUP,EAAwBO,OAAS,GACtEC,SAASC,iBAAiBT,GAAyBU,SAASC,IAC1DA,EAAKC,iBAAiB,QAASX,EAAgB,CAAEY,SAAS,GAAQ,GAEtE,GACC,CAACZ,EAAgBD,IAEdc,EAAeZ,GAAY,MAC3BF,eAAAA,EAAyBO,SAAUP,EAAwBO,OAAS,GACtEC,SAASC,iBAAiBT,GAAyBU,SAASC,IAC1DA,EAAKI,oBAAoB,QAASd,EAAe,GAErD,GACC,CAACA,EAAgBD,IAMpB,OAJAgB,GAAU,IACDF,GACN,CAACA,IAEG,CACLR,gBACAQ,eACD"}
@@ -1,3 +1,3 @@
1
- export { default as Dialog } from "./Dialog";
2
- export { DialogPlacement as DialogPlacementEnum } from "./DialogConstants";
3
- export * from "./Dialog.types";
1
+ export { default as Dialog } from "./Dialog";
2
+ export { DialogPlacement as DialogPlacementEnum } from "./DialogConstants";
3
+ export * from "./Dialog.types";
@@ -1,36 +1,36 @@
1
- import React from "react";
2
- import { type VibeComponentProps } from "@vibe/shared";
3
- import { type DialogSize, type DialogType } from "../Dialog";
4
- export interface DialogContentContainerProps extends VibeComponentProps {
5
- /**
6
- * The content inside the dialog container.
7
- */
8
- children?: React.ReactNode;
9
- /**
10
- * The ID of the element that labels this dialog.
11
- */
12
- "aria-labelledby"?: string;
13
- /**
14
- * The ID of the element that describes this dialog.
15
- */
16
- "aria-describedby"?: string;
17
- /**
18
- * The type of dialog.
19
- */
20
- type?: DialogType;
21
- /**
22
- * The size of the dialog.
23
- */
24
- size?: DialogSize;
25
- /**
26
- * Custom styles applied to the dialog container.
27
- */
28
- style?: React.CSSProperties;
29
- /**
30
- * The ARIA role applied to the dialog container.
31
- * Defaults to "dialog" when not provided. Pass `null` to remove the role attribute entirely.
32
- */
33
- role?: string | null;
34
- }
35
- declare const DialogContentContainer: React.ForwardRefExoticComponent<DialogContentContainerProps & React.RefAttributes<HTMLElement>>;
36
- export default DialogContentContainer;
1
+ import React from "react";
2
+ import { type VibeComponentProps } from "@vibe/shared";
3
+ import { type DialogSize, type DialogType } from "../Dialog";
4
+ export interface DialogContentContainerProps extends VibeComponentProps {
5
+ /**
6
+ * The content inside the dialog container.
7
+ */
8
+ children?: React.ReactNode;
9
+ /**
10
+ * The ID of the element that labels this dialog.
11
+ */
12
+ "aria-labelledby"?: string;
13
+ /**
14
+ * The ID of the element that describes this dialog.
15
+ */
16
+ "aria-describedby"?: string;
17
+ /**
18
+ * The type of dialog.
19
+ */
20
+ type?: DialogType;
21
+ /**
22
+ * The size of the dialog.
23
+ */
24
+ size?: DialogSize;
25
+ /**
26
+ * Custom styles applied to the dialog container.
27
+ */
28
+ style?: React.CSSProperties;
29
+ /**
30
+ * The ARIA role applied to the dialog container.
31
+ * Defaults to "dialog" when not provided. Pass `null` to remove the role attribute entirely.
32
+ */
33
+ role?: string | null;
34
+ }
35
+ declare const DialogContentContainer: React.ForwardRefExoticComponent<DialogContentContainerProps & React.RefAttributes<HTMLElement>>;
36
+ export default DialogContentContainer;
@@ -1,2 +1,2 @@
1
- var e={dialogContentContainer:"dialogContentContainer_f2f62c2e2d",sizeSmall:"sizeSmall_4508cfa6f6",sizeMedium:"sizeMedium_0f125514c7",sizeLarge:"sizeLarge_a4af870e12",typePopover:"typePopover_b9d20be306",typeModal:"typeModal_31ea6f7140"};!function(e){const a="s_id-e25392b9c982_4_0_0-alpha_0";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+a))return;const n=document.createElement("style");n.id=a,o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[a]=e)}(".dialogContentContainer_f2f62c2e2d:focus {\n outline: none;\n}\n\n.sizeSmall_4508cfa6f6 {\n padding: var(--space-8);\n}\n\n.sizeMedium_0f125514c7 {\n padding: var(--space-16);\n}\n\n.sizeLarge_a4af870e12 {\n padding: var(--space-24);\n}\n\n.typePopover_b9d20be306 {\n box-shadow: var(--box-shadow-medium);\n border-radius: var(--border-radius-medium);\n background-color: var(--secondary-background-color);\n}\n\n.dark-app-theme .typePopover_b9d20be306, .black-app-theme .typePopover_b9d20be306, .hacker-app-theme .typePopover_b9d20be306 {\n box-shadow: 0 0 0 1px var(--layout-border-color), var(--box-shadow-medium);\n}\n\n.typeModal_31ea6f7140 {\n box-shadow: var(--box-shadow-large);\n border-radius: var(--border-radius-big);\n background-color: var(--primary-background-color);\n}");export{e as default};
1
+ var e={dialogContentContainer:"dialogContentContainer_493dbd2e99",sizeSmall:"sizeSmall_9e9c8067b8",sizeMedium:"sizeMedium_3286626b1e",sizeLarge:"sizeLarge_5d4db17b94",typePopover:"typePopover_1d5948d907",typeModal:"typeModal_11b65ba91d"};!function(e){const d="s_id-e25392b9c982_4_0_0-alpha_1";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+d))return;const a=document.createElement("style");a.id=d,o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[d]=e)}(".dialogContentContainer_493dbd2e99:focus {\n outline: none;\n}\n\n.sizeSmall_9e9c8067b8 {\n padding: var(--space-8);\n}\n\n.sizeMedium_3286626b1e {\n padding: var(--space-16);\n}\n\n.sizeLarge_5d4db17b94 {\n padding: var(--space-24);\n}\n\n.typePopover_1d5948d907 {\n box-shadow: var(--box-shadow-medium);\n border-radius: var(--border-radius-medium);\n background-color: var(--secondary-background-color);\n}\n\n.dark-app-theme .typePopover_1d5948d907, .black-app-theme .typePopover_1d5948d907, .hacker-app-theme .typePopover_1d5948d907 {\n box-shadow: 0 0 0 1px var(--layout-border-color), var(--box-shadow-medium);\n}\n\n.typeModal_11b65ba91d {\n box-shadow: var(--box-shadow-large);\n border-radius: var(--border-radius-big);\n background-color: var(--primary-background-color);\n}");export{e as default};
2
2
  //# sourceMappingURL=DialogContentContainer.module.scss.js.map
@@ -1 +1 @@
1
- export { default as DialogContentContainer, type DialogContentContainerProps } from "./DialogContentContainer";
1
+ export { default as DialogContentContainer, type DialogContentContainerProps } from "./DialogContentContainer";
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./Dialog";
2
- export * from "./DialogContentContainer";
1
+ export * from "./Dialog";
2
+ export * from "./DialogContentContainer";
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import { type DialogProps } from "./Dialog.types";
3
- declare function Dialog({ id, "data-testid": dataTestId, children, content, position, moveBy, middleware: middlewareProp, startingEdge, showDelay, hideDelay, instantShowAndHide, getDynamicShowDelay, showTrigger, hideTrigger, showOnDialogEnter, showTriggerIgnoreClass, hideTriggerIgnoreClass, addKeyboardHideShowTriggersByDefault, shouldShowOnMount, disable, open, isOpen: isOpenProp, useDerivedStateFromProps, animationType, preventAnimationOnMount, tooltip, tooltipClassName, containerSelector, disableContainerScroll, zIndex, wrapperClassName, referenceWrapperClassName, referenceWrapperElement, onBlur: onBlurProp, onKeyDown: onKeyDownProp, onClick: onClickProp, onFocus: onFocusProp, onMouseDown: onMouseDownProp, onMouseEnter: onMouseEnterProp, onMouseLeave: onMouseLeaveProp, onContextMenu: onContextMenuProp, onDialogDidShow, onDialogDidHide, onClickOutside: onClickOutsideProp, onContentClick: onContentClickProp, hideWhenReferenceHidden, shouldCallbackOnMount, observeContentResize }: DialogProps): React.JSX.Element;
4
- export default Dialog;
1
+ import React from "react";
2
+ import { type DialogProps } from "./Dialog.types";
3
+ declare function Dialog({ id, "data-testid": dataTestId, children, content, position, moveBy, middleware: middlewareProp, startingEdge, showDelay, hideDelay, instantShowAndHide, getDynamicShowDelay, showTrigger, hideTrigger, showOnDialogEnter, showTriggerIgnoreClass, hideTriggerIgnoreClass, addKeyboardHideShowTriggersByDefault, shouldShowOnMount, disable, open, isOpen: isOpenProp, useDerivedStateFromProps, animationType, preventAnimationOnMount, tooltip, tooltipClassName, containerSelector, disableContainerScroll, zIndex, wrapperClassName, referenceWrapperClassName, referenceWrapperElement, onBlur: onBlurProp, onKeyDown: onKeyDownProp, onClick: onClickProp, onFocus: onFocusProp, onMouseDown: onMouseDownProp, onMouseEnter: onMouseEnterProp, onMouseLeave: onMouseLeaveProp, onContextMenu: onContextMenuProp, onDialogDidShow, onDialogDidHide, onClickOutside: onClickOutsideProp, onContentClick: onContentClickProp, hideWhenReferenceHidden, shouldCallbackOnMount, observeContentResize }: DialogProps): React.JSX.Element;
4
+ export default Dialog;