@vibe/dialog 3.0.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.
Files changed (93) hide show
  1. package/dist/Dialog/Dialog.d.ts +267 -0
  2. package/dist/Dialog/Dialog.js +2 -0
  3. package/dist/Dialog/Dialog.js.map +1 -0
  4. package/dist/Dialog/Dialog.module.scss.js +2 -0
  5. package/dist/Dialog/Dialog.module.scss.js.map +1 -0
  6. package/dist/Dialog/Dialog.types.d.ts +11 -0
  7. package/dist/Dialog/DialogConstants.d.ts +65 -0
  8. package/dist/Dialog/DialogConstants.js +2 -0
  9. package/dist/Dialog/DialogConstants.js.map +1 -0
  10. package/dist/Dialog/DialogContent/DialogContent.d.ts +80 -0
  11. package/dist/Dialog/DialogContent/DialogContent.js +2 -0
  12. package/dist/Dialog/DialogContent/DialogContent.js.map +1 -0
  13. package/dist/Dialog/DialogContent/DialogContent.module.scss.js +2 -0
  14. package/dist/Dialog/DialogContent/DialogContent.module.scss.js.map +1 -0
  15. package/dist/Dialog/DialogContent/useDisableScroll.d.ts +5 -0
  16. package/dist/Dialog/DialogContent/useDisableScroll.js +2 -0
  17. package/dist/Dialog/DialogContent/useDisableScroll.js.map +1 -0
  18. package/dist/Dialog/DialogContent/useDisableScroll.test.d.ts +1 -0
  19. package/dist/Dialog/index.d.ts +4 -0
  20. package/dist/Dialog/modifiers/observeContentResizeModifier.d.ts +2 -0
  21. package/dist/Dialog/modifiers/observeContentResizeModifier.js +2 -0
  22. package/dist/Dialog/modifiers/observeContentResizeModifier.js.map +1 -0
  23. package/dist/Dialog/modifiers/observeReferenceResizeModifier.d.ts +2 -0
  24. package/dist/Dialog/modifiers/observeReferenceResizeModifier.js +2 -0
  25. package/dist/Dialog/modifiers/observeReferenceResizeModifier.js.map +1 -0
  26. package/dist/Dialog/useForceUpdate.d.ts +2 -0
  27. package/dist/Dialog/useForceUpdate.js +2 -0
  28. package/dist/Dialog/useForceUpdate.js.map +1 -0
  29. package/dist/Dialog/usePopover.d.ts +19 -0
  30. package/dist/Dialog/usePopover.js +2 -0
  31. package/dist/Dialog/usePopover.js.map +1 -0
  32. package/dist/DialogContentContainer/DialogContentContainer.d.ts +40 -0
  33. package/dist/DialogContentContainer/DialogContentContainer.js +2 -0
  34. package/dist/DialogContentContainer/DialogContentContainer.js.map +1 -0
  35. package/dist/DialogContentContainer/DialogContentContainer.module.scss.js +2 -0
  36. package/dist/DialogContentContainer/DialogContentContainer.module.scss.js.map +1 -0
  37. package/dist/DialogContentContainer/index.d.ts +1 -0
  38. package/dist/Refable/Refable.d.ts +11 -0
  39. package/dist/Refable/Refable.js +2 -0
  40. package/dist/Refable/Refable.js.map +1 -0
  41. package/dist/Refable/index.d.ts +1 -0
  42. package/dist/_virtual/_tslib.js +2 -0
  43. package/dist/_virtual/_tslib.js.map +1 -0
  44. package/dist/index.d.ts +2 -0
  45. package/dist/index.js +2 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/mocked_classnames/Dialog/Dialog.d.ts +267 -0
  48. package/dist/mocked_classnames/Dialog/Dialog.js +2 -0
  49. package/dist/mocked_classnames/Dialog/Dialog.js.map +1 -0
  50. package/dist/mocked_classnames/Dialog/Dialog.module.scss.js +2 -0
  51. package/dist/mocked_classnames/Dialog/Dialog.module.scss.js.map +1 -0
  52. package/dist/mocked_classnames/Dialog/Dialog.types.d.ts +11 -0
  53. package/dist/mocked_classnames/Dialog/DialogConstants.d.ts +65 -0
  54. package/dist/mocked_classnames/Dialog/DialogConstants.js +2 -0
  55. package/dist/mocked_classnames/Dialog/DialogConstants.js.map +1 -0
  56. package/dist/mocked_classnames/Dialog/DialogContent/DialogContent.d.ts +80 -0
  57. package/dist/mocked_classnames/Dialog/DialogContent/DialogContent.js +2 -0
  58. package/dist/mocked_classnames/Dialog/DialogContent/DialogContent.js.map +1 -0
  59. package/dist/mocked_classnames/Dialog/DialogContent/DialogContent.module.scss.js +2 -0
  60. package/dist/mocked_classnames/Dialog/DialogContent/DialogContent.module.scss.js.map +1 -0
  61. package/dist/mocked_classnames/Dialog/DialogContent/useDisableScroll.d.ts +5 -0
  62. package/dist/mocked_classnames/Dialog/DialogContent/useDisableScroll.js +2 -0
  63. package/dist/mocked_classnames/Dialog/DialogContent/useDisableScroll.js.map +1 -0
  64. package/dist/mocked_classnames/Dialog/DialogContent/useDisableScroll.test.d.ts +1 -0
  65. package/dist/mocked_classnames/Dialog/index.d.ts +4 -0
  66. package/dist/mocked_classnames/Dialog/modifiers/observeContentResizeModifier.d.ts +2 -0
  67. package/dist/mocked_classnames/Dialog/modifiers/observeContentResizeModifier.js +2 -0
  68. package/dist/mocked_classnames/Dialog/modifiers/observeContentResizeModifier.js.map +1 -0
  69. package/dist/mocked_classnames/Dialog/modifiers/observeReferenceResizeModifier.d.ts +2 -0
  70. package/dist/mocked_classnames/Dialog/modifiers/observeReferenceResizeModifier.js +2 -0
  71. package/dist/mocked_classnames/Dialog/modifiers/observeReferenceResizeModifier.js.map +1 -0
  72. package/dist/mocked_classnames/Dialog/useForceUpdate.d.ts +2 -0
  73. package/dist/mocked_classnames/Dialog/useForceUpdate.js +2 -0
  74. package/dist/mocked_classnames/Dialog/useForceUpdate.js.map +1 -0
  75. package/dist/mocked_classnames/Dialog/usePopover.d.ts +19 -0
  76. package/dist/mocked_classnames/Dialog/usePopover.js +2 -0
  77. package/dist/mocked_classnames/Dialog/usePopover.js.map +1 -0
  78. package/dist/mocked_classnames/DialogContentContainer/DialogContentContainer.d.ts +40 -0
  79. package/dist/mocked_classnames/DialogContentContainer/DialogContentContainer.js +2 -0
  80. package/dist/mocked_classnames/DialogContentContainer/DialogContentContainer.js.map +1 -0
  81. package/dist/mocked_classnames/DialogContentContainer/DialogContentContainer.module.scss.js +2 -0
  82. package/dist/mocked_classnames/DialogContentContainer/DialogContentContainer.module.scss.js.map +1 -0
  83. package/dist/mocked_classnames/DialogContentContainer/index.d.ts +1 -0
  84. package/dist/mocked_classnames/Refable/Refable.d.ts +11 -0
  85. package/dist/mocked_classnames/Refable/Refable.js +2 -0
  86. package/dist/mocked_classnames/Refable/Refable.js.map +1 -0
  87. package/dist/mocked_classnames/Refable/index.d.ts +1 -0
  88. package/dist/mocked_classnames/_virtual/_tslib.js +2 -0
  89. package/dist/mocked_classnames/_virtual/_tslib.js.map +1 -0
  90. package/dist/mocked_classnames/index.d.ts +2 -0
  91. package/dist/mocked_classnames/index.js +2 -0
  92. package/dist/mocked_classnames/index.js.map +1 -0
  93. package/package.json +76 -0
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @deprecated
3
+ */
4
+ export declare enum HideShowEvent {
5
+ CLICK = "click",
6
+ CLICK_OUTSIDE = "clickoutside",
7
+ ESCAPE_KEY = "esckey",
8
+ TAB_KEY = "tab",
9
+ MOUSE_ENTER = "mouseenter",
10
+ MOUSE_LEAVE = "mouseleave",
11
+ ENTER = "enter",
12
+ MOUSE_DOWN = "mousedown",
13
+ FOCUS = "focus",
14
+ BLUR = "blur",
15
+ CONTENT_CLICK = "onContentClick",
16
+ CONTEXT_MENU = "contextmenu"
17
+ }
18
+ /**
19
+ * @deprecated
20
+ */
21
+ export declare enum AnimationType {
22
+ OPACITY_AND_SLIDE = "opacity-and-slide",
23
+ EXPAND = "expand"
24
+ }
25
+ /**
26
+ * @deprecated
27
+ */
28
+ export declare enum DialogType {
29
+ MODAL = "modal",
30
+ POPOVER = "popover"
31
+ }
32
+ /**
33
+ * @deprecated
34
+ */
35
+ export declare enum DialogSize {
36
+ NONE = "none",
37
+ SMALL = "small",
38
+ MEDIUM = "medium",
39
+ LARGE = "large"
40
+ }
41
+ /**
42
+ * @deprecated
43
+ */
44
+ export declare enum DialogPosition {
45
+ LEFT = "left",
46
+ LEFT_START = "left-start",
47
+ LEFT_END = "left-end",
48
+ RIGHT = "right",
49
+ RIGHT_START = "right-start",
50
+ RIGHT_END = "right-end",
51
+ TOP = "top",
52
+ TOP_START = "top-start",
53
+ TOP_END = "top-end",
54
+ BOTTOM = "bottom",
55
+ BOTTOM_START = "bottom-start",
56
+ BOTTOM_END = "bottom-end"
57
+ }
58
+ export declare enum DialogPlacement {
59
+ RIGHT = "right",
60
+ RIGHT_START = "right-start",
61
+ RIGHT_END = "right-end",
62
+ LEFT = "left",
63
+ LEFT_START = "left-start",
64
+ LEFT_END = "left-end"
65
+ }
@@ -0,0 +1,2 @@
1
+ var t,T,E,e,n,o;!function(t){t.CLICK="click",t.CLICK_OUTSIDE="clickoutside",t.ESCAPE_KEY="esckey",t.TAB_KEY="tab",t.MOUSE_ENTER="mouseenter",t.MOUSE_LEAVE="mouseleave",t.ENTER="enter",t.MOUSE_DOWN="mousedown",t.FOCUS="focus",t.BLUR="blur",t.CONTENT_CLICK="onContentClick",t.CONTEXT_MENU="contextmenu"}(t||(t={})),function(t){t.OPACITY_AND_SLIDE="opacity-and-slide",t.EXPAND="expand"}(T||(T={})),function(t){t.MODAL="modal",t.POPOVER="popover"}(E||(E={})),function(t){t.NONE="none",t.SMALL="small",t.MEDIUM="medium",t.LARGE="large"}(e||(e={})),function(t){t.LEFT="left",t.LEFT_START="left-start",t.LEFT_END="left-end",t.RIGHT="right",t.RIGHT_START="right-start",t.RIGHT_END="right-end",t.TOP="top",t.TOP_START="top-start",t.TOP_END="top-end",t.BOTTOM="bottom",t.BOTTOM_START="bottom-start",t.BOTTOM_END="bottom-end"}(n||(n={})),function(t){t.RIGHT="right",t.RIGHT_START="right-start",t.RIGHT_END="right-end",t.LEFT="left",t.LEFT_START="left-start",t.LEFT_END="left-end"}(o||(o={}));export{T as AnimationType,o as DialogPlacement,n as DialogPosition,e as DialogSize,E as DialogType,t as HideShowEvent};
2
+ //# sourceMappingURL=DialogConstants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogConstants.js","sources":["../../../src/Dialog/DialogConstants.ts"],"sourcesContent":["/**\n * @deprecated\n */\nexport enum HideShowEvent {\n CLICK = \"click\",\n CLICK_OUTSIDE = \"clickoutside\",\n ESCAPE_KEY = \"esckey\",\n TAB_KEY = \"tab\",\n MOUSE_ENTER = \"mouseenter\",\n MOUSE_LEAVE = \"mouseleave\",\n ENTER = \"enter\",\n MOUSE_DOWN = \"mousedown\",\n FOCUS = \"focus\",\n BLUR = \"blur\",\n CONTENT_CLICK = \"onContentClick\",\n CONTEXT_MENU = \"contextmenu\"\n}\n\n/**\n * @deprecated\n */\nexport enum AnimationType {\n OPACITY_AND_SLIDE = \"opacity-and-slide\",\n EXPAND = \"expand\"\n}\n\n/**\n * @deprecated\n */\nexport enum DialogType {\n MODAL = \"modal\",\n POPOVER = \"popover\"\n}\n\n/**\n * @deprecated\n */\nexport enum DialogSize {\n NONE = \"none\",\n SMALL = \"small\",\n MEDIUM = \"medium\",\n LARGE = \"large\"\n}\n\n/**\n * @deprecated\n */\nexport enum DialogPosition {\n LEFT = \"left\",\n LEFT_START = \"left-start\",\n LEFT_END = \"left-end\",\n RIGHT = \"right\",\n RIGHT_START = \"right-start\",\n RIGHT_END = \"right-end\",\n TOP = \"top\",\n TOP_START = \"top-start\",\n TOP_END = \"top-end\",\n BOTTOM = \"bottom\",\n BOTTOM_START = \"bottom-start\",\n BOTTOM_END = \"bottom-end\"\n}\n\nexport enum DialogPlacement {\n RIGHT = \"right\",\n RIGHT_START = \"right-start\",\n RIGHT_END = \"right-end\",\n LEFT = \"left\",\n LEFT_START = \"left-start\",\n LEFT_END = \"left-end\"\n}\n"],"names":["HideShowEvent","AnimationType","DialogType","DialogSize","DialogPosition","DialogPlacement"],"mappings":"IAGYA,EAkBAC,EAQAC,EAQAC,EAUAC,EAeAC,GA3DZ,SAAYL,GACVA,EAAA,MAAA,QACAA,EAAA,cAAA,eACAA,EAAA,WAAA,SACAA,EAAA,QAAA,MACAA,EAAA,YAAA,aACAA,EAAA,YAAA,aACAA,EAAA,MAAA,QACAA,EAAA,WAAA,YACAA,EAAA,MAAA,QACAA,EAAA,KAAA,OACAA,EAAA,cAAA,iBACAA,EAAA,aAAA,aACD,CAbD,CAAYA,IAAAA,EAaX,CAAA,IAKD,SAAYC,GACVA,EAAA,kBAAA,oBACAA,EAAA,OAAA,QACD,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAKD,SAAYC,GACVA,EAAA,MAAA,QACAA,EAAA,QAAA,SACD,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAKD,SAAYC,GACVA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,OAAA,SACAA,EAAA,MAAA,OACD,CALD,CAAYA,IAAAA,EAKX,CAAA,IAKD,SAAYC,GACVA,EAAA,KAAA,OACAA,EAAA,WAAA,aACAA,EAAA,SAAA,WACAA,EAAA,MAAA,QACAA,EAAA,YAAA,cACAA,EAAA,UAAA,YACAA,EAAA,IAAA,MACAA,EAAA,UAAA,YACAA,EAAA,QAAA,UACAA,EAAA,OAAA,SACAA,EAAA,aAAA,eACAA,EAAA,WAAA,YACD,CAbD,CAAYA,IAAAA,EAaX,CAAA,IAED,SAAYC,GACVA,EAAA,MAAA,QACAA,EAAA,YAAA,cACAA,EAAA,UAAA,YACAA,EAAA,KAAA,OACAA,EAAA,WAAA,aACAA,EAAA,SAAA,UACD,CAPD,CAAYA,IAAAA,EAOX,CAAA"}
@@ -0,0 +1,80 @@
1
+ import React, { type CSSProperties, type ReactElement } from "react";
2
+ import { type VibeComponentProps } from "@vibe/shared";
3
+ import { type DialogAnimationType, type DialogTriggerEvent } from "../Dialog.types";
4
+ import type * as PopperJS from "@popperjs/core";
5
+ export interface DialogContentProps extends VibeComponentProps {
6
+ /**
7
+ * The content inside the dialog.
8
+ */
9
+ children?: ReactElement | ReactElement[];
10
+ /**
11
+ * The placement of the dialog relative to the reference element.
12
+ */
13
+ position?: PopperJS.Placement;
14
+ /**
15
+ * Class name applied to the dialog wrapper.
16
+ */
17
+ wrapperClassName?: string;
18
+ /**
19
+ * If true, the dialog is open.
20
+ */
21
+ isOpen?: boolean;
22
+ /**
23
+ * The starting edge of the dialog.
24
+ */
25
+ startingEdge?: any;
26
+ /**
27
+ * The animation type used for showing/hiding the dialog.
28
+ */
29
+ animationType?: DialogAnimationType;
30
+ /**
31
+ * Callback fired when the Escape key is pressed.
32
+ */
33
+ onEsc?: (event: React.KeyboardEvent) => void;
34
+ /**
35
+ * Callback fired when the mouse enters the dialog.
36
+ */
37
+ onMouseEnter?: (event: React.MouseEvent) => void;
38
+ /**
39
+ * Callback fired when the mouse leaves the dialog.
40
+ */
41
+ onMouseLeave?: (event: React.MouseEvent) => void;
42
+ /**
43
+ * Callback fired when clicking outside the dialog.
44
+ */
45
+ onClickOutside?: (event: React.MouseEvent, hideShowEvent: DialogTriggerEvent) => void;
46
+ /**
47
+ * Callback fired when clicking inside the dialog.
48
+ */
49
+ onClick?: (event: React.MouseEvent) => void;
50
+ /**
51
+ * Delay before showing the dialog.
52
+ */
53
+ showDelay?: number;
54
+ /**
55
+ * Inline styles applied to the dialog.
56
+ */
57
+ styleObject?: CSSProperties;
58
+ /**
59
+ * If true, hides the reference element when the dialog is shown.
60
+ */
61
+ isReferenceHidden?: boolean;
62
+ /**
63
+ * If true, applies tooltip arrow to the dialog.
64
+ */
65
+ hasTooltip?: boolean;
66
+ /**
67
+ * The CSS selector of the container where the dialog should be rendered.
68
+ */
69
+ containerSelector?: string;
70
+ /**
71
+ * If true, disables scrolling in the container when the dialog is open.
72
+ */
73
+ disableContainerScroll?: boolean | string;
74
+ /**
75
+ * Callback fired when the context menu (right-click) event occurs outside the dialog.
76
+ */
77
+ onContextMenu?: (e: React.MouseEvent) => void;
78
+ }
79
+ declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLElement>>;
80
+ export default DialogContent;
@@ -0,0 +1,2 @@
1
+ import e,{forwardRef as a,useRef as o,useCallback as t,useEffect as r,cloneElement as s}from"react";import n from"classnames";import{camelCase as i}from"es-toolkit";import{CSSTransition as p}from"react-transition-group";import{useClickOutside as l}from"@vibe/hooks";import{keyCodes as c,useMergeRef as m,useKeyEvent as d,getStyle as u,chainFunctions as f,NOOP as v}from"@vibe/shared";import y from"./DialogContent.module.scss.js";import b from"./useDisableScroll.js";const k={},C=[c.ESCAPE],E=a((({onEsc:a=v,children:c,position:E,wrapperClassName:x,isOpen:A=!1,startingEdge:h,animationType:N="expand",onMouseEnter:S=v,onMouseLeave:g=v,onClickOutside:M=v,onClick:w=v,onContextMenu:j=v,showDelay:D,styleObject:L=k,isReferenceHidden:O,hasTooltip:T=!1,containerSelector:R,disableContainerScroll:H=!1,"data-testid":P},W)=>{const q=o(null),z=o(null),B=m(W,z),F=t((e=>{if(A)return M(e,"clickoutside")}),[A,M]),G=t((e=>{A&&j(e)}),[A,j]);d({keys:C,callback:a}),l({callback:F,ref:z}),l({eventName:"contextmenu",callback:G,ref:z});const I="string"==typeof H?H:R,{disableScroll:J,enableScroll:K}=b(I);r((()=>{H&&(A?J():K())}),[H,J,K,A]);const Q={classNames:void 0};switch(N){case"expand":Q.classNames={appear:y.expandAppear,appearActive:y.expandAppearActive,exit:y.expandExit};break;case"opacity-and-slide":Q.classNames={appear:y.opacitySlideAppear,appearActive:y.opacitySlideAppearActive}}return e.createElement("span",{className:n("monday-style-dialog-content-wrapper",y.contentWrapper,x),ref:B,"data-testid":P,style:L,onClickCapture:w,"data-popper-reference-hidden":O},e.createElement(p,{classNames:Q.classNames,nodeRef:q,in:A,appear:!!N,timeout:D},e.createElement("div",{className:n(y.contentComponent,u(y,i(E)),{[u(y,i("edge-"+h))]:h,[y.hasTooltip]:T}),ref:q},e.Children.toArray(c).map((e=>s(e,{onMouseEnter:f([e.props.onMouseEnter,S]),onMouseLeave:f([e.props.onMouseLeave,g])}))))))}));export{E as default};
2
+ //# sourceMappingURL=DialogContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogContent.js","sources":["../../../../src/Dialog/DialogContent/DialogContent.tsx"],"sourcesContent":["import React, {\n cloneElement,\n type CSSProperties,\n forwardRef,\n type ReactElement,\n useCallback,\n useEffect,\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 { type DialogAnimationType, type DialogTriggerEvent } from \"../Dialog.types\";\nimport type * as PopperJS from \"@popperjs/core\";\nimport styles from \"./DialogContent.module.scss\";\nimport useDisableScroll from \"./useDisableScroll\";\n\nconst EMPTY_OBJECT = {};\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?: PopperJS.Placement;\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 // TODO: [breaking] use type\n /**\n * The starting edge of the dialog.\n */\n startingEdge?: any;\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.\n */\n showDelay?: number;\n /**\n * Inline styles applied to the dialog.\n */\n styleObject?: CSSProperties;\n /**\n * If true, hides the reference element when the dialog is shown.\n */\n isReferenceHidden?: boolean;\n /**\n * If true, applies tooltip arrow to the dialog.\n */\n hasTooltip?: boolean;\n /**\n * The CSS selector of the container where the dialog should be rendered.\n */\n containerSelector?: string;\n /**\n * If true, disables scrolling in the container when the dialog is open.\n */\n disableContainerScroll?: boolean | string;\n /**\n * Callback fired when the context menu (right-click) event occurs outside the dialog.\n */\n onContextMenu?: (e: React.MouseEvent) => void;\n}\n\nconst DialogContent = forwardRef(\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 }: DialogContentProps,\n forwardRef: React.ForwardedRef<HTMLElement>\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n\n const wrapperRef = useRef<HTMLSpanElement>(null);\n const mergedWrapperRef = useMergeRef(forwardRef, 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 useKeyEvent({ keys: ESCAPE_KEYS, callback: onEsc });\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 return (\n <span\n // don't remove old classname - override from Monolith\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-popper-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 {React.Children.toArray(children).map((child: ReactElement) => {\n return cloneElement(child, {\n onMouseEnter: chainFunctions([child.props.onMouseEnter, onMouseEnter]),\n onMouseLeave: chainFunctions([child.props.onMouseLeave, onMouseLeave])\n });\n })}\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","contentRef","useRef","wrapperRef","mergedWrapperRef","useMergeRef","onOutSideClick","useCallback","event","overrideOnContextMenu","useKeyEvent","keys","callback","useClickOutside","ref","eventName","selectorToDisable","disableScroll","enableScroll","useDisableScroll","useEffect","transitionOptions","classNames","undefined","appear","styles","expandAppear","appearActive","expandAppearActive","exit","expandExit","opacitySlideAppear","opacitySlideAppearActive","React","createElement","className","cx","contentWrapper","style","onClickCapture","CSSTransition","nodeRef","in","timeout","contentComponent","getStyle","camelCase","Children","toArray","map","child","cloneElement","chainFunctions","props"],"mappings":"mdA4BA,MAAMA,EAAe,CAAA,EACfC,EAAc,CAACC,EAASC,QA8ExBC,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,GAEjBpB,KAEA,MAAMqB,EAAaC,EAAuB,MAEpCC,EAAaD,EAAwB,MACrCE,EAAmBC,EAAYzB,EAAYuB,GAE3CG,EAAiBC,GACpBC,IACC,GAAItB,EACF,OAAOK,EAAeiB,EAAO,eAC9B,GAEH,CAACtB,EAAQK,IAELkB,EAAwBF,GAC3BC,IACKtB,GACFO,EAAce,EACf,GAEH,CAACtB,EAAQO,IAEXiB,EAAY,CAAEC,KAAMnC,EAAaoC,SAAU/B,IAE3CgC,EAAgB,CAAED,SAAUN,EAAgBQ,IAAKX,IACjDU,EAAgB,CAAEE,UAAW,cAAeH,SAAUH,EAAuBK,IAAKX,IAClF,MAAMa,EAAsD,iBAA3BjB,EAAsCA,EAAyBD,GAC1FmB,cAAEA,EAAaC,aAAEA,GAAiBC,EAAiBH,GAEzDI,GAAU,KACJrB,IACEb,EACF+B,IAEAC,IAEH,GACA,CAACnB,EAAwBkB,EAAeC,EAAchC,IAEzD,MAAMmC,EAAiD,CAAEC,gBAAYC,GAErE,OAAQnC,GACN,IAAK,SACHiC,EAAkBC,WAAa,CAC7BE,OAAQC,EAAOC,aACfC,aAAcF,EAAOG,mBACrBC,KAAMJ,EAAOK,YAEf,MACF,IAAK,oBACHT,EAAkBC,WAAa,CAC7BE,OAAQC,EAAOM,mBACfJ,aAAcF,EAAOO,0BAI3B,OACEC,EAAAC,cAAA,OAAA,CAEEC,UAAWC,EAAG,sCAAuCX,EAAOY,eAAgBpD,GAC5E6B,IAAKV,EAAgB,cACRJ,EACbsC,MAAO3C,EACP4C,eAAgB/C,EAAO,+BACOI,GAE9BqC,EAACC,cAAAM,EACC,CAAAlB,WAAYD,EAAkBC,WAC9BmB,QAASxC,EACTyC,GAAIxD,EACJsC,SAAUpC,EACVuD,QAASjD,GAETuC,EAAAC,cAAA,MAAA,CACEC,UAAWC,EAAGX,EAAOmB,iBAAkBC,EAASpB,EAAQqB,EAAU9D,IAAY,CAC5E,CAAC6D,EAASpB,EAAQqB,EAAU,QAAU3D,KAAiBA,EACvD,CAACsC,EAAO5B,YAAaA,IAEvBiB,IAAKb,GAEJgC,EAAMc,SAASC,QAAQjE,GAAUkE,KAAKC,GAC9BC,EAAaD,EAAO,CACzB7D,aAAc+D,EAAe,CAACF,EAAMG,MAAMhE,aAAcA,IACxDC,aAAc8D,EAAe,CAACF,EAAMG,MAAM/D,aAAcA,UAK3D"}
@@ -0,0 +1,2 @@
1
+ var t={contentWrapper:"contentWrapper",top:"top",right:"right",left:"left",bottom:"bottom",bottomStart:"bottomStart",topStart:"topStart",bottomEnd:"bottomEnd",topEnd:"topEnd",leftStart:"leftStart",rightStart:"rightStart",leftEnd:"leftEnd",rightEnd:"rightEnd",contentComponent:"contentComponent",hasTooltip:"hasTooltip",opacitySlideAppear:"opacitySlideAppear",opacitySlideAppearActive:"opacitySlideAppearActive",expandAppear:"expandAppear",expandExit:"expandExit",edgeBottom:"edgeBottom",edgeTop:"edgeTop",expandAppearActive:"expandAppearActive"};!function(t){const e="s_id-ca4097b848ab_3_0_0";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+e))return;const p=document.createElement("style");p.id=e,n.firstChild?n.insertBefore(p,n.firstChild):n.appendChild(p),p.appendChild(document.createTextNode(t))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=t)}(".contentWrapper {\n outline: 0;\n}\n.contentWrapper.top, .contentWrapper.right, .contentWrapper.left, .contentWrapper.bottom {\n padding: var(--spacing-xs);\n}\n.contentWrapper.bottomStart, .contentWrapper.topStart, .contentWrapper.bottomEnd, .contentWrapper.topEnd {\n padding-block: var(--spacing-xs);\n}\n.contentWrapper.bottomStart, .contentWrapper.topStart {\n padding-inline-end: var(--spacing-xs);\n}\n.contentWrapper.bottomEnd, .contentWrapper.topEnd {\n padding-inline-start: var(--spacing-xs);\n}\n.contentWrapper.leftStart, .contentWrapper.rightStart, .contentWrapper.leftEnd, .contentWrapper.rightEnd {\n padding-inline: var(--spacing-xs);\n}\n.contentWrapper.leftStart, .contentWrapper.rightStart {\n padding-block-end: var(--spacing-xs);\n}\n.contentWrapper.leftEnd, .contentWrapper.rightEnd {\n padding-block-start: var(--spacing-xs);\n}\n.contentWrapper[data-popper-reference-hidden=true] {\n visibility: hidden;\n pointer-events: none;\n}\n.contentComponent:focus {\n outline: none;\n}\n.contentComponent.hasTooltip {\n padding: 6px;\n}\n.opacitySlideAppear {\n opacity: 0;\n}\n.opacitySlideAppear.top {\n transform: translateY(var(--spacing-medium));\n}\n.opacitySlideAppear.right {\n transform: translateX(calc(var(--spacing-medium) * -1));\n}\n.opacitySlideAppear.bottom {\n transform: translateY(calc(var(--spacing-medium) * -1));\n}\n.opacitySlideAppear.left {\n transform: translateX(var(--spacing-medium));\n}\n.opacitySlideAppearActive {\n transition: opacity 0.2s ease, transform 0.2s ease-out;\n opacity: 1;\n pointer-events: none;\n}\n.opacitySlideAppearActive.top, .opacitySlideAppearActive.bottom {\n transform: translateY(0);\n}\n.opacitySlideAppearActive.right, .opacitySlideAppearActive.left {\n transform: translateX(0);\n}\n.expandAppear,\n.expandExit {\n transition: transform 0.1s cubic-bezier(0, 0, 0.35, 1);\n}\n.expandAppear.top, .expandAppear.topStart, .expandAppear.topEnd,\n.expandExit.top,\n.expandExit.topStart,\n.expandExit.topEnd {\n transform-origin: bottom center;\n transform: scale(0.8);\n}\n.expandAppear.top.edgeBottom, .expandAppear.topStart.edgeBottom, .expandAppear.topEnd.edgeBottom,\n.expandExit.top.edgeBottom,\n.expandExit.topStart.edgeBottom,\n.expandExit.topEnd.edgeBottom {\n transform-origin: bottom left;\n}\n.expandAppear.top.edgeTop, .expandAppear.topStart.edgeTop, .expandAppear.topEnd.edgeTop,\n.expandExit.top.edgeTop,\n.expandExit.topStart.edgeTop,\n.expandExit.topEnd.edgeTop {\n transform-origin: bottom right;\n}\n.expandAppear.right, .expandAppear.rightStart, .expandAppear.rightEnd,\n.expandExit.right,\n.expandExit.rightStart,\n.expandExit.rightEnd {\n transform-origin: left;\n transform: scale(0.8);\n}\n.expandAppear.right.edgeBottom, .expandAppear.rightStart.edgeBottom, .expandAppear.rightEnd.edgeBottom,\n.expandExit.right.edgeBottom,\n.expandExit.rightStart.edgeBottom,\n.expandExit.rightEnd.edgeBottom {\n transform-origin: top left;\n}\n.expandAppear.right.edgeTop, .expandAppear.rightStart.edgeTop, .expandAppear.rightEnd.edgeTop,\n.expandExit.right.edgeTop,\n.expandExit.rightStart.edgeTop,\n.expandExit.rightEnd.edgeTop {\n transform-origin: bottom left;\n}\n.expandAppear.bottom, .expandAppear.bottomStart, .expandAppear.bottomEnd,\n.expandExit.bottom,\n.expandExit.bottomStart,\n.expandExit.bottomEnd {\n transform-origin: top;\n transform: scale(0.8);\n}\n.expandAppear.bottom.edgeBottom, .expandAppear.bottomStart.edgeBottom, .expandAppear.bottomEnd.edgeBottom,\n.expandExit.bottom.edgeBottom,\n.expandExit.bottomStart.edgeBottom,\n.expandExit.bottomEnd.edgeBottom {\n transform-origin: top left;\n}\n.expandAppear.bottom.edgeTop, .expandAppear.bottomStart.edgeTop, .expandAppear.bottomEnd.edgeTop,\n.expandExit.bottom.edgeTop,\n.expandExit.bottomStart.edgeTop,\n.expandExit.bottomEnd.edgeTop {\n transform-origin: top right;\n}\n.expandAppear.left, .expandAppear.leftStart, .expandAppear.leftEnd,\n.expandExit.left,\n.expandExit.leftStart,\n.expandExit.leftEnd {\n transform-origin: right;\n transform: scale(0.8);\n}\n.expandAppear.left.edgeBottom, .expandAppear.leftStart.edgeBottom, .expandAppear.leftEnd.edgeBottom,\n.expandExit.left.edgeBottom,\n.expandExit.leftStart.edgeBottom,\n.expandExit.leftEnd.edgeBottom {\n transform-origin: top right;\n}\n.expandAppear.left.edgeTop, .expandAppear.leftStart.edgeTop, .expandAppear.leftEnd.edgeTop,\n.expandExit.left.edgeTop,\n.expandExit.leftStart.edgeTop,\n.expandExit.leftEnd.edgeTop {\n transform-origin: bottom right;\n}\n.expandExit {\n transition: transform 0.1s cubic-bezier(0, 0, 0.35, 1);\n}\n.expandAppearActive {\n transition: transform 0.1s cubic-bezier(0, 0, 0.35, 1);\n pointer-events: none;\n}\n.expandAppearActive.top, .expandAppearActive.topStart, .expandAppearActive.topEnd, .expandAppearActive.bottom, .expandAppearActive.bottomStart, .expandAppearActive.bottomEnd, .expandAppearActive.right, .expandAppearActive.rightStart, .expandAppearActive.rightEnd, .expandAppearActive.left, .expandAppearActive.leftStart, .expandAppearActive.leftEnd {\n transform: scale(1);\n}");export{t as default};
2
+ //# sourceMappingURL=DialogContent.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogContent.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ declare const useDisableScroll: (scrollableQuerySelector: string) => {
2
+ disableScroll: () => void;
3
+ enableScroll: () => void;
4
+ };
5
+ export default useDisableScroll;
@@ -0,0 +1,2 @@
1
+ import{useCallback as e,useEffect as l}from"react";const t=t=>{const o=e((e=>(e.preventDefault(),e.stopPropagation(),!1)),[]),r=e((()=>{(null==t?void 0:t.length)>0&&document.querySelectorAll(t).forEach((e=>{e.addEventListener("wheel",o)}))}),[o,t]),n=e((()=>{(null==t?void 0:t.length)>0&&document.querySelectorAll(t).forEach((e=>{e.removeEventListener("wheel",o)}))}),[o,t]);return l((()=>n),[n]),{disableScroll:r,enableScroll:n}};export{t as default};
2
+ //# sourceMappingURL=useDisableScroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDisableScroll.js","sources":["../../../../src/Dialog/DialogContent/useDisableScroll.ts"],"sourcesContent":["import { useCallback, useEffect } from \"react\";\n\nconst useDisableScroll = (scrollableQuerySelector: string) => {\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 > 0) {\n document.querySelectorAll(scrollableQuerySelector).forEach((item: Element) => {\n item.addEventListener(\"wheel\", _disableScroll);\n });\n }\n }, [_disableScroll, scrollableQuerySelector]);\n\n const enableScroll = useCallback(() => {\n if (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","enableScroll","removeEventListener","useEffect"],"mappings":"mDAEMA,MAAAA,EAAoBC,IACxB,MAAMC,EAAiBC,GAAaC,IAClCA,EAAEC,iBACFD,EAAEE,mBAEK,IACN,IAEGC,EAAgBJ,GAAY,MAC5BF,aAAuB,EAAvBA,EAAyBO,QAAS,GACpCC,SAASC,iBAAiBT,GAAyBU,SAASC,IAC1DA,EAAKC,iBAAiB,QAASX,EAAe,GAEjD,GACA,CAACA,EAAgBD,IAEda,EAAeX,GAAY,MAC3BF,aAAuB,EAAvBA,EAAyBO,QAAS,GACpCC,SAASC,iBAAiBT,GAAyBU,SAASC,IAC1DA,EAAKG,oBAAoB,QAASb,EAAe,GAEpD,GACA,CAACA,EAAgBD,IAMpB,OAJAe,GAAU,IACDF,GACN,CAACA,IAEG,CACLP,gBACAO,eACD"}
@@ -0,0 +1,4 @@
1
+ export { default as Dialog, type DialogProps } from "./Dialog";
2
+ export { HideShowEvent as DialogTriggerEventEnum, AnimationType as DialogAnimationTypeEnum, DialogPosition as DialogPositionEnum, DialogSize as DialogSizeEnum, DialogPlacement as DialogPlacementEnum } from "./DialogConstants";
3
+ export { default as usePopover } from "./usePopover";
4
+ export * from "./Dialog.types";
@@ -0,0 +1,2 @@
1
+ import { type Modifier } from "react-popper";
2
+ export declare const createObserveContentResizeModifier: (isEnabled?: boolean) => Modifier<"observeContentResize">;
@@ -0,0 +1,2 @@
1
+ const e=(e=!1)=>({name:"observeContentResize",enabled:e,phase:"beforeWrite",fn(){},effect({state:e,instance:n}){const t=new ResizeObserver((()=>{n.update()}));return t.observe(e.elements.popper),()=>{t.disconnect()}}});export{e as createObserveContentResizeModifier};
2
+ //# sourceMappingURL=observeContentResizeModifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observeContentResizeModifier.js","sources":["../../../../src/Dialog/modifiers/observeContentResizeModifier.ts"],"sourcesContent":["import { type Modifier } from \"react-popper\";\n\nexport const createObserveContentResizeModifier = (isEnabled = false): Modifier<\"observeContentResize\"> => ({\n name: \"observeContentResize\",\n enabled: isEnabled,\n phase: \"beforeWrite\",\n fn() {},\n effect({ state, instance }) {\n const observer = new ResizeObserver(() => {\n instance.update();\n });\n observer.observe(state.elements.popper);\n\n return () => {\n observer.disconnect();\n };\n }\n});\n"],"names":["createObserveContentResizeModifier","isEnabled","name","enabled","phase","fn","effect","state","instance","observer","ResizeObserver","update","observe","elements","popper","disconnect"],"mappings":"MAEaA,EAAqCA,CAACC,GAAY,KAA6C,CAC1GC,KAAM,uBACNC,QAASF,EACTG,MAAO,cACPC,EAAAA,GAAO,EACPC,MAAAA,EAAOC,MAAEA,EAAKC,SAAEA,IACd,MAAMC,EAAW,IAAIC,gBAAe,KAClCF,EAASG,QAAQ,IAInB,OAFAF,EAASG,QAAQL,EAAMM,SAASC,QAEzB,KACLL,EAASM,YAAY,CAEzB"}
@@ -0,0 +1,2 @@
1
+ import { type Modifier } from "react-popper";
2
+ export declare const createObserveReferenceResizeModifier: (isEnabled?: boolean) => Modifier<"observeReferenceResize">;
@@ -0,0 +1,2 @@
1
+ const e=(e=!1)=>({name:"observeReferenceResize",enabled:e,phase:"beforeWrite",fn(){},effect({state:e,instance:n}){if(!e.elements.reference)return;const r=new ResizeObserver((()=>{n.update()}));return r.observe(e.elements.reference),()=>{r.disconnect()}}});export{e as createObserveReferenceResizeModifier};
2
+ //# sourceMappingURL=observeReferenceResizeModifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observeReferenceResizeModifier.js","sources":["../../../../src/Dialog/modifiers/observeReferenceResizeModifier.ts"],"sourcesContent":["import { type Modifier } from \"react-popper\";\n\nexport const createObserveReferenceResizeModifier = (isEnabled = false): Modifier<\"observeReferenceResize\"> => ({\n name: \"observeReferenceResize\",\n enabled: isEnabled,\n phase: \"beforeWrite\",\n fn() {},\n effect({ state, instance }) {\n if (!state.elements.reference) return;\n\n const observer = new ResizeObserver(() => {\n instance.update();\n });\n\n const reference = state.elements.reference as Element;\n observer.observe(reference);\n\n return () => {\n observer.disconnect();\n };\n }\n});\n"],"names":["createObserveReferenceResizeModifier","isEnabled","name","enabled","phase","fn","effect","state","instance","elements","reference","observer","ResizeObserver","update","observe","disconnect"],"mappings":"MAEaA,EAAuCA,CAACC,GAAY,KAA+C,CAC9GC,KAAM,yBACNC,QAASF,EACTG,MAAO,cACPC,EAAAA,GAAO,EACPC,MAAAA,EAAOC,MAAEA,EAAKC,SAAEA,IACd,IAAKD,EAAME,SAASC,UAAW,OAE/B,MAAMC,EAAW,IAAIC,gBAAe,KAClCJ,EAASK,QAAQ,IAMnB,OAFAF,EAASG,QADSP,EAAME,SAASC,WAG1B,KACLC,EAASI,YAAY,CAEzB"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function useForceUpdate(): import("react").DispatchWithoutAction;
@@ -0,0 +1,2 @@
1
+ import{useReducer as t}from"react";const r=()=>({});function o(){return t(r,{})[1]}export{o as default};
2
+ //# sourceMappingURL=useForceUpdate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForceUpdate.js","sources":["../../../src/Dialog/useForceUpdate.ts"],"sourcesContent":["import { useReducer } from \"react\";\n\n// the second argument of useReducer is the dispatch function\n// after calling dispatch we will set a new object in the state\n// if the state will change by reference it will force rerender of the component\n\nconst reducerAlwaysReturningNewObj = () => ({});\n\nexport default function useForceUpdate() {\n return useReducer(reducerAlwaysReturningNewObj, {})[1];\n}\n"],"names":["reducerAlwaysReturningNewObj","useForceUpdate","useReducer"],"mappings":"mCAMA,MAAMA,EAA+BA,KAAO,CAAE,GAEhC,SAAUC,IACtB,OAAOC,EAAWF,EAA8B,IAAI,EACtD"}
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { DialogPlacement as Placement } from "./DialogConstants";
3
+ export default function usePopover(referenceElement: HTMLElement, popperElement: HTMLElement, { isOpen, placement, observeContentResize, observeReferenceResize, offset, fallbackPlacements }: {
4
+ isOpen?: boolean;
5
+ placement?: Placement;
6
+ observeContentResize?: boolean;
7
+ observeReferenceResize?: boolean;
8
+ offset?: [number, number];
9
+ fallbackPlacements?: Placement[];
10
+ }): {
11
+ styles: {
12
+ [key: string]: import("react").CSSProperties;
13
+ };
14
+ attributes: {
15
+ [key: string]: {
16
+ [key: string]: string;
17
+ };
18
+ };
19
+ };
@@ -0,0 +1,2 @@
1
+ import{useMemo as e}from"react";import{usePopper as t}from"react-popper";import{DialogPlacement as o}from"./DialogConstants.js";import{useIsomorphicLayoutEffect as s}from"@vibe/shared";import i from"./useForceUpdate.js";import{createObserveContentResizeModifier as r}from"./modifiers/observeContentResizeModifier.js";import{createObserveReferenceResizeModifier as n}from"./modifiers/observeReferenceResizeModifier.js";const{RIGHT_START:f,RIGHT_END:a,LEFT_START:m,LEFT_END:p}=o,l=[a,m,p];function c(o,a,{isOpen:m,placement:p=f,observeContentResize:c,observeReferenceResize:d,offset:b,fallbackPlacements:R=l}){const v=i();s((()=>{v()}),[o,a,v]);const T=e((()=>({placement:p,modifiers:[{name:"flip",options:{fallbackPlacements:R}},{name:"displayNone",enabled:!0,phase:"write",fn:({state:e})=>(e.styles.popper.visibility=m?"visible":"hidden",e)},r(c),n(d),void 0!==b&&{name:"offset",options:{offset:b}}]})),[p,c,b,m]),{styles:u,attributes:y}=t(o,a,T);return{styles:u,attributes:y}}export{c as default};
2
+ //# sourceMappingURL=usePopover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePopover.js","sources":["../../../src/Dialog/usePopover.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { usePopper } from \"react-popper\";\nimport { DialogPlacement as Placement } from \"./DialogConstants\";\nimport { useIsomorphicLayoutEffect } from \"@vibe/shared\";\nimport useForceUpdate from \"./useForceUpdate\";\nimport type { Options, State } from \"@popperjs/core\";\nimport { createObserveContentResizeModifier } from \"./modifiers/observeContentResizeModifier\";\nimport { createObserveReferenceResizeModifier } from \"./modifiers/observeReferenceResizeModifier\";\nconst { RIGHT_START, RIGHT_END, LEFT_START, LEFT_END } = Placement;\n\nconst DEFAULT_FALLBACK_PLACEMENTS = [RIGHT_END, LEFT_START, LEFT_END];\n\nexport default function usePopover(\n referenceElement: HTMLElement,\n popperElement: HTMLElement,\n {\n isOpen,\n placement = RIGHT_START,\n observeContentResize,\n observeReferenceResize,\n offset,\n fallbackPlacements = DEFAULT_FALLBACK_PLACEMENTS\n }: {\n isOpen?: boolean;\n placement?: Placement;\n observeContentResize?: boolean;\n observeReferenceResize?: boolean;\n offset?: [number, number];\n fallbackPlacements?: Placement[];\n }\n) {\n const forceUpdate = useForceUpdate();\n\n // we have to use forceUpdate because\n // usePopper need to run again after any refs changes, even after the first render.\n useIsomorphicLayoutEffect(() => {\n forceUpdate();\n }, [referenceElement, popperElement, forceUpdate]);\n\n const popperOptions: Pick<Options, \"placement\" | \"modifiers\"> = useMemo(() => {\n return {\n placement,\n modifiers: [\n {\n name: \"flip\",\n options: {\n fallbackPlacements\n }\n },\n {\n name: \"displayNone\",\n enabled: true,\n phase: \"write\",\n fn: ({ state }: { state: State }) => {\n state.styles.popper.visibility = isOpen ? \"visible\" : \"hidden\";\n return state;\n }\n },\n createObserveContentResizeModifier(observeContentResize),\n createObserveReferenceResizeModifier(observeReferenceResize),\n offset !== undefined && {\n name: \"offset\",\n options: { offset }\n }\n ]\n };\n }, [placement, observeContentResize, offset, isOpen]);\n\n const { styles, attributes } = usePopper(referenceElement, popperElement, popperOptions);\n\n return { styles, attributes };\n}\n"],"names":["RIGHT_START","RIGHT_END","LEFT_START","LEFT_END","Placement","DEFAULT_FALLBACK_PLACEMENTS","usePopover","referenceElement","popperElement","isOpen","placement","observeContentResize","observeReferenceResize","offset","fallbackPlacements","forceUpdate","useForceUpdate","useIsomorphicLayoutEffect","popperOptions","useMemo","modifiers","name","options","enabled","phase","fn","state","styles","popper","visibility","createObserveContentResizeModifier","createObserveReferenceResizeModifier","undefined","attributes","usePopper"],"mappings":"kaAQA,MAAMA,YAAEA,EAAWC,UAAEA,EAASC,WAAEA,EAAUC,SAAEA,GAAaC,EAEnDC,EAA8B,CAACJ,EAAWC,EAAYC,GAE9C,SAAUG,EACtBC,EACAC,GACAC,OACEA,EAAMC,UACNA,EAAYV,EAAWW,qBACvBA,EAAoBC,uBACpBA,EAAsBC,OACtBA,EAAMC,mBACNA,EAAqBT,IAUvB,MAAMU,EAAcC,IAIpBC,GAA0B,KACxBF,GAAa,GACZ,CAACR,EAAkBC,EAAeO,IAErC,MAAMG,EAA0DC,GAAQ,KAC/D,CACLT,YACAU,UAAW,CACT,CACEC,KAAM,OACNC,QAAS,CACPR,uBAGJ,CACEO,KAAM,cACNE,SAAS,EACTC,MAAO,QACPC,GAAIA,EAAGC,YACLA,EAAMC,OAAOC,OAAOC,WAAapB,EAAS,UAAY,SAC/CiB,IAGXI,EAAmCnB,GACnCoB,EAAqCnB,QAC1BoB,IAAXnB,GAAwB,CACtBQ,KAAM,SACNC,QAAS,CAAET,eAIhB,CAACH,EAAWC,EAAsBE,EAAQJ,KAEvCkB,OAAEA,EAAMM,WAAEA,GAAeC,EAAU3B,EAAkBC,EAAeU,GAE1E,MAAO,CAAES,SAAQM,aACnB"}
@@ -0,0 +1,40 @@
1
+ import React from "react";
2
+ import { type VibeComponentProps } from "@vibe/shared";
3
+ import { DialogSize as DialogSizeEnum, DialogType as DialogTypeEnum } from "../Dialog/DialogConstants";
4
+ import { type DialogSize, type DialogType } from "../Dialog";
5
+ export interface DialogContentContainerProps extends VibeComponentProps {
6
+ /**
7
+ * The content inside the dialog container.
8
+ */
9
+ children?: React.ReactNode;
10
+ /**
11
+ * The ID of the element that labels this dialog.
12
+ */
13
+ ariaLabelledby?: string;
14
+ /**
15
+ * The ID of the element that describes this dialog.
16
+ */
17
+ ariaDescribedby?: string;
18
+ /**
19
+ * The type of dialog.
20
+ */
21
+ type?: DialogType;
22
+ /**
23
+ * The size of the dialog.
24
+ */
25
+ size?: DialogSize;
26
+ /**
27
+ * Custom styles applied to the dialog container.
28
+ */
29
+ style?: React.CSSProperties;
30
+ /**
31
+ * The ARIA role applied to the dialog container.
32
+ * Defaults to "dialog" when not provided. Pass `null` to remove the role attribute entirely.
33
+ */
34
+ role?: string | null;
35
+ }
36
+ declare const _default: React.ForwardRefExoticComponent<DialogContentContainerProps & React.RefAttributes<HTMLElement>> & {
37
+ types: typeof DialogTypeEnum;
38
+ sizes: typeof DialogSizeEnum;
39
+ };
40
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import{__rest as e}from"../_virtual/_tslib.js";import{camelCase as a}from"es-toolkit";import t from"classnames";import i,{forwardRef as r,useRef as s}from"react";import{getTestId as l,ComponentDefaultTestId as o,useMergeRef as d,getStyle as m,withStaticProps as n}from"@vibe/shared";import{DialogType as b,DialogSize as c}from"../Dialog/DialogConstants.js";import p from"./DialogContentContainer.module.scss.js";var y=n(r(((r,n)=>{var{id:b,className:c="",ariaLabelledby:y="",ariaDescribedby:f="",type:v="popover",size:C="small",children:N,style:g,role:u,"data-testid":D=l(o.DIALOG_CONTENT_CONTAINER,b)}=r,j=e(r,["id","className","ariaLabelledby","ariaDescribedby","type","size","children","style","role","data-testid"]);const z=s(null),O=d(n,z);return i.createElement("div",Object.assign({id:b,role:null===u?void 0:u||"dialog","data-testid":D,"aria-labelledby":y,"aria-describedby":f,ref:O,style:g,className:t(p.dialogContentContainer,c,m(p,a("type--"+v)),m(p,a("size--"+C)))},j),N)})),{types:b,sizes:c});export{y as default};
2
+ //# sourceMappingURL=DialogContentContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogContentContainer.js","sources":["../../../src/DialogContentContainer/DialogContentContainer.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport cx from \"classnames\";\nimport React, { useRef, forwardRef } from \"react\";\nimport {\n useMergeRef,\n type VibeComponentProps,\n withStaticProps,\n ComponentDefaultTestId,\n getTestId,\n getStyle\n} from \"@vibe/shared\";\nimport { DialogSize as DialogSizeEnum, DialogType as DialogTypeEnum } from \"../Dialog/DialogConstants\";\nimport { type DialogSize, type DialogType } from \"../Dialog\";\nimport styles from \"./DialogContentContainer.module.scss\";\n\nexport interface DialogContentContainerProps extends VibeComponentProps {\n /**\n * The content inside the dialog container.\n */\n children?: React.ReactNode;\n /**\n * The ID of the element that labels this dialog.\n */\n ariaLabelledby?: string;\n /**\n * The ID of the element that describes this dialog.\n */\n ariaDescribedby?: string;\n /**\n * The type of dialog.\n */\n type?: DialogType;\n /**\n * The size of the dialog.\n */\n size?: DialogSize;\n /**\n * Custom styles applied to the dialog container.\n */\n style?: React.CSSProperties;\n /**\n * The ARIA role applied to the dialog container.\n * Defaults to \"dialog\" when not provided. Pass `null` to remove the role attribute entirely.\n */\n role?: string | null;\n}\n\nconst DialogContentContainer = forwardRef(\n (\n {\n id,\n className = \"\",\n ariaLabelledby = \"\",\n ariaDescribedby = \"\",\n type = \"popover\",\n size = \"small\",\n children,\n style,\n role,\n \"data-testid\": dataTestId = getTestId(ComponentDefaultTestId.DIALOG_CONTENT_CONTAINER, id),\n ...props\n }: DialogContentContainerProps,\n ref: React.Ref<HTMLElement>\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n const roleValue = role === null ? undefined : role || \"dialog\";\n\n return (\n <div\n id={id}\n role={roleValue}\n data-testid={dataTestId}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n ref={mergedRef}\n style={style}\n className={cx(\n styles.dialogContentContainer,\n className,\n getStyle(styles, camelCase(\"type--\" + type)),\n getStyle(styles, camelCase(\"size--\" + size))\n )}\n {...props}\n >\n {children}\n </div>\n );\n }\n);\n\ninterface DialogContentContainerStaticProps {\n types: typeof DialogTypeEnum;\n sizes: typeof DialogSizeEnum;\n}\n\nexport default withStaticProps<DialogContentContainerProps, DialogContentContainerStaticProps>(DialogContentContainer, {\n types: DialogTypeEnum,\n sizes: DialogSizeEnum\n});\n"],"names":["withStaticProps","forwardRef","_a","ref","id","className","ariaLabelledby","ariaDescribedby","type","size","children","style","role","dataTestId","getTestId","ComponentDefaultTestId","DIALOG_CONTENT_CONTAINER","props","__rest","componentRef","useRef","mergedRef","useMergeRef","React","createElement","Object","assign","undefined","cx","styles","dialogContentContainer","getStyle","camelCase","types","DialogTypeEnum","sizes","DialogSizeEnum"],"mappings":"4ZAiGA,IAAeA,EAAAA,EAlDgBC,GAC7B,CACEC,EAaAC,SAbAC,GACEA,EAAEC,UACFA,EAAY,GAAEC,eACdA,EAAiB,GAAEC,gBACnBA,EAAkB,GAAEC,KACpBA,EAAO,UAASC,KAChBA,EAAO,QAAOC,SACdA,EAAQC,MACRA,EAAKC,KACLA,EACA,cAAeC,EAAaC,EAAUC,EAAuBC,yBAA0BZ,MACpFa,EAXLC,EAAAhB,EAAA,CAAA,KAAA,YAAA,iBAAA,kBAAA,OAAA,OAAA,WAAA,QAAA,OAAA,gBAeA,MAAMiB,EAAeC,EAAO,MACtBC,EAAYC,EAAYnB,EAAKgB,GAInC,OACEI,EAAAC,cAAA,MAAAC,OAAAC,OAAA,CACEtB,GAAIA,EACJQ,KALuB,OAATA,OAAgBe,EAAYf,GAAQ,SAKnC,cACFC,EAAU,kBACNP,EACC,mBAAAC,EAClBJ,IAAKkB,EACLV,MAAOA,EACPN,UAAWuB,EACTC,EAAOC,uBACPzB,EACA0B,EAASF,EAAQG,EAAU,SAAWxB,IACtCuB,EAASF,EAAQG,EAAU,SAAWvB,MAEpCQ,GAEHP,EACG,IAU2G,CACrHuB,MAAOC,EACPC,MAAOC"}
@@ -0,0 +1,2 @@
1
+ var e={dialogContentContainer:"dialogContentContainer",sizeSmall:"sizeSmall",sizeMedium:"sizeMedium",sizeLarge:"sizeLarge",typePopover:"typePopover",typeModal:"typeModal"};!function(e){const n="s_id-f752ec1c8102_3_0_0";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+n))return;const a=document.createElement("style");a.id=n,o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".dialogContentContainer:focus {\n outline: none;\n}\n\n.sizeSmall {\n padding: var(--spacing-small);\n}\n\n.sizeMedium {\n padding: var(--spacing-medium);\n}\n\n.sizeLarge {\n padding: var(--spacing-large);\n}\n\n.typePopover {\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, .black-app-theme .typePopover, .hacker-app-theme .typePopover {\n box-shadow: 0 0 0 1px var(--layout-border-color), var(--box-shadow-medium);\n}\n\n.typeModal {\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
+ //# sourceMappingURL=DialogContentContainer.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogContentContainer.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { default as DialogContentContainer, type DialogContentContainerProps } from "./DialogContentContainer";
@@ -0,0 +1,11 @@
1
+ import React, { type ReactElement } from "react";
2
+ import { type VibeComponentProps } from "@vibe/shared";
3
+ export declare const Refable: React.ForwardRefExoticComponent<Omit<React.HTMLProps<any> & VibeComponentProps & {
4
+ children?: React.ReactNode;
5
+ } & {
6
+ children: ReactElement | ReactElement[] | string;
7
+ /**
8
+ * The wrapper element type to use for React components. Defaults to "span".
9
+ */
10
+ wrapperElement?: "span" | "div";
11
+ }, "ref"> & React.RefAttributes<React.ReactElement<any, string | React.JSXElementConstructor<any>>>>;
@@ -0,0 +1,2 @@
1
+ import{__rest as e}from"../_virtual/_tslib.js";import r from"react";import{chainRefFunctions as n,chainFunctions as o}from"@vibe/shared";const s=r.forwardRef(((o,s)=>{var{children:p,wrapperElement:i="span"}=o,l=e(o,["children","wrapperElement"]);return r.Children.map(p,(e=>{if(!r.isValidElement(e))return null;if("string"!=typeof e.type){return r.createElement(i,Object.assign({ref:s},l),r.cloneElement(e,Object.assign({},e.props)))}return r.cloneElement(e,Object.assign(Object.assign(Object.assign({},l),e.props),{onClick:t("onClick",e.props,l),onBlur:t("onBlur",e.props,l),onMouseEnter:t("onMouseEnter",e.props,l),onMouseLeave:t("onMouseLeave",e.props,l),onMouseDown:t("onMouseDown",e.props,l),onFocus:t("onFocus",e.props,l),ref:n([e.ref,s])}))}))}));function t(e,r,n){return o([r[e],n[e]],!0)}export{s as Refable};
2
+ //# sourceMappingURL=Refable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Refable.js","sources":["../../../src/Refable/Refable.tsx"],"sourcesContent":["import React, { type HTMLProps, type MutableRefObject, type ReactElement } from \"react\";\nimport { chainFunctions, chainRefFunctions, type VibeComponentProps } from \"@vibe/shared\";\n\nexport const Refable = React.forwardRef<\n ReactElement,\n React.PropsWithChildren<unknown & HTMLProps<any> & 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 // @ts-expect-error React forwardRef type def doesn't seem to support multiple refs\n>(({ children, wrapperElement = \"span\", ...rest }, ref) => {\n return React.Children.map(children, child => {\n if (!React.isValidElement(child)) return null;\n\n if (typeof child.type !== \"string\") {\n const WrapperElement = wrapperElement;\n return (\n <WrapperElement ref={ref as MutableRefObject<any>} {...rest}>\n {React.cloneElement(child, { ...child.props })}\n </WrapperElement>\n );\n }\n\n return React.cloneElement(child, {\n ...rest,\n ...child.props,\n onClick: getChainedFunction(\"onClick\", child.props, rest),\n onBlur: getChainedFunction(\"onBlur\", child.props, rest),\n onMouseEnter: getChainedFunction(\"onMouseEnter\", child.props, rest),\n onMouseLeave: getChainedFunction(\"onMouseLeave\", child.props, rest),\n onMouseDown: getChainedFunction(\"onMouseDown\", child.props, rest),\n onFocus: getChainedFunction(\"onFocus\", child.props, rest),\n // @ts-expect-error\n ref: chainRefFunctions([child.ref, ref as MutableRefObject<any>])\n });\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","Object","assign","cloneElement","props","onClick","getChainedFunction","onBlur","onMouseEnter","onMouseLeave","onMouseDown","onFocus","chainRefFunctions","name","childProps","wrapperProps","chainFunctions"],"mappings":"yIAGO,MAAMA,EAAUC,EAAMC,YAU3B,CAACC,EAAgDC,SAAhDC,SAAEA,EAAQC,eAAEA,EAAiB,UAAWC,EAAxCC,EAAAL,EAAA,CAAA,WAAA,mBACD,OAAOF,EAAMQ,SAASC,IAAIL,GAAUM,IAClC,IAAKV,EAAMW,eAAeD,GAAQ,OAAO,KAEzC,GAA0B,iBAAfA,EAAME,KAAmB,CAElC,OACEZ,gBAFqBK,EAENQ,OAAAC,OAAA,CAACX,IAAKA,GAAkCG,GACpDN,EAAMe,aAAaL,EAAYG,OAAAC,OAAA,GAAAJ,EAAMM,QAG3C,CAED,OAAOhB,EAAMe,aAAaL,EAAKG,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAC1BR,GACAI,EAAMM,OAAK,CACdC,QAASC,EAAmB,UAAWR,EAAMM,MAAOV,GACpDa,OAAQD,EAAmB,SAAUR,EAAMM,MAAOV,GAClDc,aAAcF,EAAmB,eAAgBR,EAAMM,MAAOV,GAC9De,aAAcH,EAAmB,eAAgBR,EAAMM,MAAOV,GAC9DgB,YAAaJ,EAAmB,cAAeR,EAAMM,MAAOV,GAC5DiB,QAASL,EAAmB,UAAWR,EAAMM,MAAOV,GAEpDH,IAAKqB,EAAkB,CAACd,EAAMP,IAAKA,MACnC,GACF,IAGJ,SAASe,EACPO,EACAC,EACAC,GAEA,OAAOC,EAAe,CAACF,EAAWD,GAAOE,EAAaF,KAAQ,EAChE"}
@@ -0,0 +1 @@
1
+ export { Refable } from "./Refable";
@@ -0,0 +1,2 @@
1
+ function r(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&0>e.indexOf(o)&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);o.length>n;n++)0>e.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}"function"==typeof SuppressedError&&SuppressedError;export{r as __rest};
2
+ //# sourceMappingURL=_tslib.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./Dialog";
2
+ export * from "./DialogContentContainer";
@@ -0,0 +1,2 @@
1
+ export{default as Dialog}from"./Dialog/Dialog.js";export{AnimationType as DialogAnimationTypeEnum,DialogPlacement as DialogPlacementEnum,DialogPosition as DialogPositionEnum,DialogSize as DialogSizeEnum,HideShowEvent as DialogTriggerEventEnum}from"./Dialog/DialogConstants.js";export{default as usePopover}from"./Dialog/usePopover.js";export{default as DialogContentContainer}from"./DialogContentContainer/DialogContentContainer.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@vibe/dialog",
3
+ "version": "3.0.0",
4
+ "description": "Vibe sub-package for dialog components",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/mondaycom/vibe.git",
8
+ "directory": "packages/components/dialog"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/mondaycom/vibe/issues"
12
+ },
13
+ "homepage": "https://github.com/mondaycom/vibe#readme",
14
+ "author": "monday.com",
15
+ "license": "MIT",
16
+ "type": "module",
17
+ "main": "dist/index.js",
18
+ "types": "dist/index.d.ts",
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "exports": {
23
+ "./package.json": "./package.json",
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "import": "./dist/index.js",
27
+ "default": "./dist/index.js"
28
+ },
29
+ "./mockedClassNames": {
30
+ "import": "./dist/mocked_classnames/src/index.js",
31
+ "default": "./dist/mocked_classnames/src/index.js"
32
+ }
33
+ },
34
+ "scripts": {
35
+ "build": "rollup -c && mock_classnames=on rollup -c",
36
+ "test": "vitest run",
37
+ "lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\""
38
+ },
39
+ "dependencies": {
40
+ "@popperjs/core": "2.11.6",
41
+ "@vibe/shared": "3.0.6",
42
+ "@vibe/layer": "3.0.0",
43
+ "@vibe/hooks": "3.0.0",
44
+ "classnames": "^2.5.1",
45
+ "es-toolkit": "^1.39.10",
46
+ "react-popper": "^2.3.0",
47
+ "react-transition-group": "^4.4.5"
48
+ },
49
+ "devDependencies": {
50
+ "@testing-library/react": "^12.1.2",
51
+ "@testing-library/react-hooks": "^7.0.2",
52
+ "@testing-library/user-event": "^13.5.0",
53
+ "@vibe/config": "3.0.5",
54
+ "@types/react-transition-group": "^4.4.5",
55
+ "react": "^16.13.0",
56
+ "react-dom": "^16.13.0",
57
+ "react-test-renderer": "16",
58
+ "typescript": "^4.7.3",
59
+ "vitest": "^1.6.0"
60
+ },
61
+ "peerDependencies": {
62
+ "react": ">=16.9.0",
63
+ "react-dom": ">=16.9.0"
64
+ },
65
+ "sideEffects": [
66
+ "*.scss",
67
+ "*.css",
68
+ "*.scss.js",
69
+ "*.css.js"
70
+ ],
71
+ "eslintConfig": {
72
+ "extends": [
73
+ "../../../node_modules/@vibe/config/.eslintrc.cjs"
74
+ ]
75
+ }
76
+ }