@channel.io/bezier-react 1.7.2 → 1.8.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.
- package/dist/cjs/components/ListItem/ListItem.styled.js +1 -1
- package/dist/cjs/components/Modals/Modal/Modal.types.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/ModalAnimation.styled.js +1 -1
- package/dist/cjs/components/Modals/Modal/ModalContent.js +14 -7
- package/dist/cjs/components/Modals/Modal/ModalContent.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/ModalContext.js +14 -0
- package/dist/cjs/components/Modals/Modal/ModalContext.js.map +1 -0
- package/dist/cjs/components/Modals/Modal/ModalHeader.js +2 -2
- package/dist/cjs/components/Modals/Modal/ModalHeader.js.map +1 -1
- package/dist/cjs/components/Overlay/Overlay.js +13 -11
- package/dist/cjs/components/Overlay/Overlay.js.map +1 -1
- package/dist/cjs/components/Overlay/Overlay.types.js.map +1 -1
- package/dist/cjs/components/Text/Text.styled.js +1 -1
- package/dist/cjs/components/Toast/ToastProvider.js +3 -1
- package/dist/cjs/components/Toast/ToastProvider.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.js +5 -1
- package/dist/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.types.js.map +1 -1
- package/dist/cjs/hooks/useIsMounted.js +16 -0
- package/dist/cjs/hooks/useIsMounted.js.map +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/ListItem/ListItem.styled.mjs +1 -1
- package/dist/esm/components/Modals/Modal/Modal.types.mjs.map +1 -1
- package/dist/esm/components/Modals/Modal/ModalAnimation.styled.mjs +1 -1
- package/dist/esm/components/Modals/Modal/ModalContent.mjs +16 -9
- package/dist/esm/components/Modals/Modal/ModalContent.mjs.map +1 -1
- package/dist/esm/components/Modals/Modal/ModalContext.mjs +9 -0
- package/dist/esm/components/Modals/Modal/ModalContext.mjs.map +1 -0
- package/dist/esm/components/Modals/Modal/ModalHeader.mjs +2 -2
- package/dist/esm/components/Modals/Modal/ModalHeader.mjs.map +1 -1
- package/dist/esm/components/Overlay/Overlay.mjs +13 -11
- package/dist/esm/components/Overlay/Overlay.mjs.map +1 -1
- package/dist/esm/components/Overlay/Overlay.types.mjs.map +1 -1
- package/dist/esm/components/Text/Text.styled.mjs +1 -1
- package/dist/esm/components/Toast/ToastProvider.mjs +3 -1
- package/dist/esm/components/Toast/ToastProvider.mjs.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.mjs +6 -2
- package/dist/esm/components/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.types.mjs.map +1 -1
- package/dist/esm/hooks/useIsMounted.mjs +12 -0
- package/dist/esm/hooks/useIsMounted.mjs.map +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/components/Modals/Modal/Modal.types.d.ts +1 -1
- package/dist/types/components/Modals/Modal/Modal.types.d.ts.map +1 -1
- package/dist/types/components/Modals/Modal/ModalContent.d.ts.map +1 -1
- package/dist/types/components/Modals/Modal/ModalContext.d.ts +5 -0
- package/dist/types/components/Modals/Modal/ModalContext.d.ts.map +1 -0
- package/dist/types/components/Modals/Modal/index.d.ts +1 -0
- package/dist/types/components/Modals/Modal/index.d.ts.map +1 -1
- package/dist/types/components/Overlay/Overlay.d.ts.map +1 -1
- package/dist/types/components/Overlay/Overlay.types.d.ts +5 -0
- package/dist/types/components/Overlay/Overlay.types.d.ts.map +1 -1
- package/dist/types/components/Toast/ToastProvider.d.ts.map +1 -1
- package/dist/types/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/components/Tooltip/Tooltip.types.d.ts +1 -0
- package/dist/types/components/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/dist/types/hooks/useIsMounted.d.ts +2 -0
- package/dist/types/hooks/useIsMounted.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +15 -15
- package/src/components/Forms/FormControl/__snapshots__/FormControl.test.tsx.snap +57 -57
- package/src/components/Modals/Modal/Modal.types.ts +1 -1
- package/src/components/Modals/Modal/ModalContent.tsx +26 -9
- package/src/components/Modals/Modal/ModalContext.ts +15 -0
- package/src/components/Modals/Modal/ModalHeader.tsx +2 -2
- package/src/components/Modals/Modal/index.ts +2 -0
- package/src/components/Overlay/Overlay.tsx +20 -12
- package/src/components/Overlay/Overlay.types.ts +5 -0
- package/src/components/Toast/ToastProvider.tsx +4 -1
- package/src/components/Tooltip/Tooltip.tsx +9 -3
- package/src/components/Tooltip/Tooltip.types.ts +1 -0
- package/src/hooks/useIsMounted.ts +14 -0
- package/dist/cjs/components/Modals/Modal/ModalContentContext.js +0 -11
- package/dist/cjs/components/Modals/Modal/ModalContentContext.js.map +0 -1
- package/dist/esm/components/Modals/Modal/ModalContentContext.mjs +0 -8
- package/dist/esm/components/Modals/Modal/ModalContentContext.mjs.map +0 -1
- package/dist/types/components/Modals/Modal/ModalContentContext.d.ts +0 -4
- package/dist/types/components/Modals/Modal/ModalContentContext.d.ts.map +0 -1
- package/src/components/Modals/Modal/ModalContentContext.ts +0 -10
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
function useIsMounted() {
|
|
4
|
+
const [isMounted, setIsMounted] = useState(false);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
setIsMounted(true);
|
|
7
|
+
}, []);
|
|
8
|
+
return isMounted;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { useIsMounted as default };
|
|
12
|
+
//# sourceMappingURL=useIsMounted.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsMounted.mjs","sources":["../../../src/hooks/useIsMounted.ts"],"sourcesContent":["import {\n useEffect,\n useState,\n} from 'react'\n\nexport default function useIsMounted() {\n const [isMounted, setIsMounted] = useState(false)\n\n useEffect(() => {\n setIsMounted(true)\n }, [])\n\n return isMounted\n}\n"],"names":["useIsMounted","isMounted","setIsMounted","useState","useEffect"],"mappings":";;AAKe,SAASA,YAAYA,GAAG;EACrC,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAEjDC,EAAAA,SAAS,CAAC,MAAM;IACdF,YAAY,CAAC,IAAI,CAAC,CAAA;GACnB,EAAE,EAAE,CAAC,CAAA;AAEN,EAAA,OAAOD,SAAS,CAAA;AAClB;;;;"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -76,6 +76,7 @@ export { ModalHeader } from './components/Modals/Modal/ModalHeader.mjs';
|
|
|
76
76
|
export { ModalBody } from './components/Modals/Modal/ModalBody.mjs';
|
|
77
77
|
export { ModalFooter } from './components/Modals/Modal/ModalFooter.mjs';
|
|
78
78
|
export { ModalClose, ModalTrigger } from './components/Modals/Modal/ModalHelpers.mjs';
|
|
79
|
+
export { useModalContainerContext } from './components/Modals/Modal/ModalContext.mjs';
|
|
79
80
|
export { ModalTitleSize } from './components/Modals/Modal/Modal.types.mjs';
|
|
80
81
|
export { ConfirmModal } from './components/Modals/ConfirmModal/ConfirmModal.mjs';
|
|
81
82
|
export { ConfirmModalContent } from './components/Modals/ConfirmModal/ConfirmModalContent.mjs';
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -95,7 +95,7 @@ export interface ModalTriggerProps extends ChildrenProps<React.ReactElement> {
|
|
|
95
95
|
}
|
|
96
96
|
export interface ModalCloseProps extends ChildrenProps<React.ReactElement> {
|
|
97
97
|
}
|
|
98
|
-
export interface
|
|
98
|
+
export interface ModalContentPropsContextValue extends Required<Pick<ModalContentOptions, 'showCloseIcon'>> {
|
|
99
99
|
}
|
|
100
100
|
export {};
|
|
101
101
|
//# sourceMappingURL=Modal.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/Modal/Modal.types.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,sCAAkC;AAEnC,oBAAY,cAAc;IACxB,CAAC,MAAM;IACP,CAAC,MAAM;CACR;AAED,UAAU,YAAY;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IAEnB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,UAAU,mBAAmB;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAE9B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;IAEpC;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;IAEtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;CACvC;AAED,UAAU,kBAAkB;IAC1B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE7B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAA;IAE1B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,KAAK,sBAAsB,GAAG,KAAK,CAAC,SAAS,CAAA;AAE7C,UAAU,kBAAmB,SAC3B,gBAAgB,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;CAAG;AAErE,MAAM,WAAW,UAAW,SAC1B,aAAa,EACb,YAAY;CAAG;AAEjB,MAAM,WAAW,iBAAkB,SACjC,oBAAoB,EACpB,aAAa,EACb,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,mBAAmB;CAAG;AAExB,MAAM,WAAW,gBAAiB,SAChC,oBAAoB,EACpB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,kBAAkB,CAAC,EACjE,kBAAkB;CAAG;AAEvB,MAAM,WAAW,cAAe,SAC9B,oBAAoB,EACpB,aAAa,EACb,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEzC,MAAM,WAAW,gBAAiB,SAChC,oBAAoB,EACpB,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,kBAAkB;CAAG;AAEvB,MAAM,WAAW,iBAAkB,SACjC,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC;CAAG;AAEtC,MAAM,WAAW,eAAgB,SAC/B,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC;CAAG;AAEtC,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Modal.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/Modal/Modal.types.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,sCAAkC;AAEnC,oBAAY,cAAc;IACxB,CAAC,M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mBAAmB;CAAG;AAExB,MAAM,WAAW,gBAAiB,SAChC,oBAAoB,EACpB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,kBAAkB,CAAC,EACjE,kBAAkB;CAAG;AAEvB,MAAM,WAAW,cAAe,SAC9B,oBAAoB,EACpB,aAAa,EACb,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEzC,MAAM,WAAW,gBAAiB,SAChC,oBAAoB,EACpB,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,kBAAkB;CAAG;AAEvB,MAAM,WAAW,iBAAkB,SACjC,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC;CAAG;AAEtC,MAAM,WAAW,eAAgB,SAC/B,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC;CAAG;AAEtC,MAAM,WAAW,6BAA8B,SAC7C,QAAQ,CAAC,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/Modal/ModalContent.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ModalContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/Modal/ModalContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAA;AASd,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,eAAe,CAAA;AAStB;;;;GAIG;AACH,eAAO,MAAM,YAAY,0FAuEvB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type ModalContentPropsContextValue } from './Modal.types';
|
|
3
|
+
export declare const ModalContentPropsContextProvider: import("react").Provider<ModalContentPropsContextValue>, useModalContentPropsContext: () => ModalContentPropsContextValue;
|
|
4
|
+
export declare const ModalContainerContextProvider: import("react").Provider<HTMLElement | undefined>, useModalContainerContext: () => HTMLElement | undefined;
|
|
5
|
+
//# sourceMappingURL=ModalContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/Modal/ModalContext.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,eAAe,CAAA;AAElE,eAAO,MACL,gCAAgC,2DAChC,2BAA2B,qCAG3B,CAAA;AAEF,eAAO,MACL,6BAA6B,qDAC7B,wBAAwB,+BAC2B,CAAA"}
|
|
@@ -4,5 +4,6 @@ export { ModalHeader } from './ModalHeader';
|
|
|
4
4
|
export { ModalBody } from './ModalBody';
|
|
5
5
|
export { ModalFooter } from './ModalFooter';
|
|
6
6
|
export { ModalTrigger, ModalClose } from './ModalHelpers';
|
|
7
|
+
export { useModalContainerContext } from './ModalContext';
|
|
7
8
|
export { ModalTitleSize, type ModalProps, type ModalContentProps, type ModalHeaderProps, type ModalBodyProps, type ModalFooterProps, type ModalTriggerProps, type ModalCloseProps, } from './Modal.types';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEzD,OAAO,EACL,cAAc,EACd,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modals/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,OAAO,EACL,cAAc,EACd,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/components/Overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAUN,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/components/Overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAUN,MAAM,OAAO,CAAA;AAed,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAA;AAS/C,eAAO,MAAM,iBAAiB,2BAA2B,CAAA;AACzD,eAAO,MAAM,eAAe,yBAAyB,CAAA;AACrD,eAAO,MAAM,eAAe,yBAAyB,CAAA;AACrD,eAAO,MAAM,UAAU,WAAW,CAAA;;AA8QlC,wBAAkC"}
|
|
@@ -36,6 +36,11 @@ export declare enum OverlayPosition {
|
|
|
36
36
|
}
|
|
37
37
|
interface OverlayOptions {
|
|
38
38
|
show?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Specify a container element to portal the content into.
|
|
41
|
+
* @note When placed inside a `Modal`, default value is the container element of `Modal`.
|
|
42
|
+
* @default document.body
|
|
43
|
+
*/
|
|
39
44
|
container?: HTMLElement | null;
|
|
40
45
|
target?: HTMLElement | null;
|
|
41
46
|
position?: OverlayPosition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Overlay/Overlay.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,aAAa,EACnB,mCAAkC;AAEnC,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,oBAAY,eAAe;IACzB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;IAC/B,gBAAgB,qBAAqB;CACtC;AAED,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC9B,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,YAAa,SACpC,oBAAoB,EACpB,aAAa,EACb,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,uBAAuB,CAAC,WAAW,CAAC,EACpC,qBAAqB,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,EAC/C,cAAc;CAAG"}
|
|
1
|
+
{"version":3,"file":"Overlay.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Overlay/Overlay.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,aAAa,EACnB,mCAAkC;AAEnC,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,c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ToastProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/ToastProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/ToastProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAY1C,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,eAAe,CAAA;AAOtB,iBAAS,aAAa,CAAC,EACrB,kBAAyB,EACzB,QAAa,GACd,EAAE,kBAAkB,qBAiEpB;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAA;AAUd,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAA;AAqFxB;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,UAAkB,EAClB,SAAe,EACf,SAAa,EACb,aAAmB,GACpB,EAAE,oBAAoB,qBAgBtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO,qFAuHlB,CAAA"}
|
|
@@ -65,6 +65,7 @@ interface TooltipOptions {
|
|
|
65
65
|
offset?: number;
|
|
66
66
|
/**
|
|
67
67
|
* Specify a container element to portal the content into.
|
|
68
|
+
* @note When placed inside a `Modal`, default value is the container element of `Modal`.
|
|
68
69
|
* @default document.body
|
|
69
70
|
*/
|
|
70
71
|
container?: HTMLElement | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,mCAAkC;AAEnC;;GAEG;AACH,oBAAY,eAAe;IACzB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,UAAU,sBAAsB;IAC9B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,UAAU,cAAc;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf
|
|
1
|
+
{"version":3,"file":"Tooltip.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,aAAa,E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AAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAChD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,aAAa,EAAE,YAAY,CAAA;KAAE,CAAC,KAAK,IAAI,CAAA;CACrF;AAED,MAAM,WAAW,oBAAqB,SACpC,aAAa,EACb,sBAAsB;CAAG;AAE3B,MAAM,WAAW,YAAa,SAC5B,oBAAoB,EACpB,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC,EACjC,YAAY,EACZ,YAAY,EACZ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,YAAY,GAAG,MAAM,aAAa,CAAC,EACpF,cAAc;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsMounted.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsMounted.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,YAAY,YAQnC"}
|
package/package.json
CHANGED
|
@@ -213,6 +213,21 @@ exports[`Button Test > Disabled Test > Button can have disabled attribute 1`] =
|
|
|
213
213
|
`;
|
|
214
214
|
|
|
215
215
|
exports[`Button Test > Loading Test > Active prop change Button to hover style 1`] = `
|
|
216
|
+
.c5 {
|
|
217
|
+
display: inline-block;
|
|
218
|
+
width: 16px;
|
|
219
|
+
height: 16px;
|
|
220
|
+
border-style: solid;
|
|
221
|
+
border-width: 2px;
|
|
222
|
+
border-top-color: transparent;
|
|
223
|
+
border-right-color: inherit;
|
|
224
|
+
border-bottom-color: inherit;
|
|
225
|
+
border-left-color: inherit;
|
|
226
|
+
border-radius: 50%;
|
|
227
|
+
-webkit-animation: epmXAj 1s infinite linear;
|
|
228
|
+
animation: epmXAj 1s infinite linear;
|
|
229
|
+
}
|
|
230
|
+
|
|
216
231
|
.c2 {
|
|
217
232
|
font-size: 1.4rem;
|
|
218
233
|
line-height: 1.8rem;
|
|
@@ -230,21 +245,6 @@ exports[`Button Test > Loading Test > Active prop change Button to hover style 1
|
|
|
230
245
|
transition-property: color;
|
|
231
246
|
}
|
|
232
247
|
|
|
233
|
-
.c5 {
|
|
234
|
-
display: inline-block;
|
|
235
|
-
width: 16px;
|
|
236
|
-
height: 16px;
|
|
237
|
-
border-style: solid;
|
|
238
|
-
border-width: 2px;
|
|
239
|
-
border-top-color: transparent;
|
|
240
|
-
border-right-color: inherit;
|
|
241
|
-
border-bottom-color: inherit;
|
|
242
|
-
border-left-color: inherit;
|
|
243
|
-
border-radius: 50%;
|
|
244
|
-
-webkit-animation: epmXAj 1s infinite linear;
|
|
245
|
-
animation: epmXAj 1s infinite linear;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
248
|
.c1 {
|
|
249
249
|
display: -webkit-box;
|
|
250
250
|
display: -webkit-flex;
|
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`FormControl > Snapshot > With multiple field 1`] = `
|
|
4
|
-
.c0 {
|
|
5
|
-
display: -webkit-box;
|
|
6
|
-
display: -webkit-flex;
|
|
7
|
-
display: -ms-flexbox;
|
|
8
|
-
display: flex;
|
|
9
|
-
-webkit-flex-direction: var(--bezier-alpha-stack-direction);
|
|
10
|
-
-ms-flex-direction: var(--bezier-alpha-stack-direction);
|
|
11
|
-
flex-direction: var(--bezier-alpha-stack-direction);
|
|
12
|
-
gap: var(--bezier-alpha-stack-spacing);
|
|
13
|
-
-webkit-align-items: var(--bezier-alpha-stack-align);
|
|
14
|
-
-webkit-box-align: var(--bezier-alpha-stack-align);
|
|
15
|
-
-ms-flex-align: var(--bezier-alpha-stack-align);
|
|
16
|
-
align-items: var(--bezier-alpha-stack-align);
|
|
17
|
-
-webkit-box-pack: var(--bezier-alpha-stack-justify);
|
|
18
|
-
-webkit-justify-content: var(--bezier-alpha-stack-justify);
|
|
19
|
-
-ms-flex-pack: var(--bezier-alpha-stack-justify);
|
|
20
|
-
justify-content: var(--bezier-alpha-stack-justify);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
4
|
.c3 {
|
|
24
5
|
font-size: 1.3rem;
|
|
25
6
|
line-height: 1.8rem;
|
|
@@ -54,6 +35,25 @@ exports[`FormControl > Snapshot > With multiple field 1`] = `
|
|
|
54
35
|
transition-property: color;
|
|
55
36
|
}
|
|
56
37
|
|
|
38
|
+
.c0 {
|
|
39
|
+
display: -webkit-box;
|
|
40
|
+
display: -webkit-flex;
|
|
41
|
+
display: -ms-flexbox;
|
|
42
|
+
display: flex;
|
|
43
|
+
-webkit-flex-direction: var(--bezier-alpha-stack-direction);
|
|
44
|
+
-ms-flex-direction: var(--bezier-alpha-stack-direction);
|
|
45
|
+
flex-direction: var(--bezier-alpha-stack-direction);
|
|
46
|
+
gap: var(--bezier-alpha-stack-spacing);
|
|
47
|
+
-webkit-align-items: var(--bezier-alpha-stack-align);
|
|
48
|
+
-webkit-box-align: var(--bezier-alpha-stack-align);
|
|
49
|
+
-ms-flex-align: var(--bezier-alpha-stack-align);
|
|
50
|
+
align-items: var(--bezier-alpha-stack-align);
|
|
51
|
+
-webkit-box-pack: var(--bezier-alpha-stack-justify);
|
|
52
|
+
-webkit-justify-content: var(--bezier-alpha-stack-justify);
|
|
53
|
+
-ms-flex-pack: var(--bezier-alpha-stack-justify);
|
|
54
|
+
justify-content: var(--bezier-alpha-stack-justify);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
57
|
.c1 {
|
|
58
58
|
position: relative;
|
|
59
59
|
}
|
|
@@ -301,25 +301,6 @@ exports[`FormControl > Snapshot > With multiple field 1`] = `
|
|
|
301
301
|
`;
|
|
302
302
|
|
|
303
303
|
exports[`FormControl > Snapshot > With multiple field and left label position 1`] = `
|
|
304
|
-
.c5 {
|
|
305
|
-
display: -webkit-box;
|
|
306
|
-
display: -webkit-flex;
|
|
307
|
-
display: -ms-flexbox;
|
|
308
|
-
display: flex;
|
|
309
|
-
-webkit-flex-direction: var(--bezier-alpha-stack-direction);
|
|
310
|
-
-ms-flex-direction: var(--bezier-alpha-stack-direction);
|
|
311
|
-
flex-direction: var(--bezier-alpha-stack-direction);
|
|
312
|
-
gap: var(--bezier-alpha-stack-spacing);
|
|
313
|
-
-webkit-align-items: var(--bezier-alpha-stack-align);
|
|
314
|
-
-webkit-box-align: var(--bezier-alpha-stack-align);
|
|
315
|
-
-ms-flex-align: var(--bezier-alpha-stack-align);
|
|
316
|
-
align-items: var(--bezier-alpha-stack-align);
|
|
317
|
-
-webkit-box-pack: var(--bezier-alpha-stack-justify);
|
|
318
|
-
-webkit-justify-content: var(--bezier-alpha-stack-justify);
|
|
319
|
-
-ms-flex-pack: var(--bezier-alpha-stack-justify);
|
|
320
|
-
justify-content: var(--bezier-alpha-stack-justify);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
304
|
.c3 {
|
|
324
305
|
font-size: 1.4rem;
|
|
325
306
|
line-height: 1.8rem;
|
|
@@ -371,6 +352,25 @@ exports[`FormControl > Snapshot > With multiple field and left label position 1`
|
|
|
371
352
|
transition-property: color;
|
|
372
353
|
}
|
|
373
354
|
|
|
355
|
+
.c5 {
|
|
356
|
+
display: -webkit-box;
|
|
357
|
+
display: -webkit-flex;
|
|
358
|
+
display: -ms-flexbox;
|
|
359
|
+
display: flex;
|
|
360
|
+
-webkit-flex-direction: var(--bezier-alpha-stack-direction);
|
|
361
|
+
-ms-flex-direction: var(--bezier-alpha-stack-direction);
|
|
362
|
+
flex-direction: var(--bezier-alpha-stack-direction);
|
|
363
|
+
gap: var(--bezier-alpha-stack-spacing);
|
|
364
|
+
-webkit-align-items: var(--bezier-alpha-stack-align);
|
|
365
|
+
-webkit-box-align: var(--bezier-alpha-stack-align);
|
|
366
|
+
-ms-flex-align: var(--bezier-alpha-stack-align);
|
|
367
|
+
align-items: var(--bezier-alpha-stack-align);
|
|
368
|
+
-webkit-box-pack: var(--bezier-alpha-stack-justify);
|
|
369
|
+
-webkit-justify-content: var(--bezier-alpha-stack-justify);
|
|
370
|
+
-ms-flex-pack: var(--bezier-alpha-stack-justify);
|
|
371
|
+
justify-content: var(--bezier-alpha-stack-justify);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
374
|
.c0 {
|
|
375
375
|
position: relative;
|
|
376
376
|
}
|
|
@@ -651,25 +651,6 @@ exports[`FormControl > Snapshot > With multiple field and left label position 1`
|
|
|
651
651
|
`;
|
|
652
652
|
|
|
653
653
|
exports[`FormControl > Snapshot > With single field 1`] = `
|
|
654
|
-
.c0 {
|
|
655
|
-
display: -webkit-box;
|
|
656
|
-
display: -webkit-flex;
|
|
657
|
-
display: -ms-flexbox;
|
|
658
|
-
display: flex;
|
|
659
|
-
-webkit-flex-direction: var(--bezier-alpha-stack-direction);
|
|
660
|
-
-ms-flex-direction: var(--bezier-alpha-stack-direction);
|
|
661
|
-
flex-direction: var(--bezier-alpha-stack-direction);
|
|
662
|
-
gap: var(--bezier-alpha-stack-spacing);
|
|
663
|
-
-webkit-align-items: var(--bezier-alpha-stack-align);
|
|
664
|
-
-webkit-box-align: var(--bezier-alpha-stack-align);
|
|
665
|
-
-ms-flex-align: var(--bezier-alpha-stack-align);
|
|
666
|
-
align-items: var(--bezier-alpha-stack-align);
|
|
667
|
-
-webkit-box-pack: var(--bezier-alpha-stack-justify);
|
|
668
|
-
-webkit-justify-content: var(--bezier-alpha-stack-justify);
|
|
669
|
-
-ms-flex-pack: var(--bezier-alpha-stack-justify);
|
|
670
|
-
justify-content: var(--bezier-alpha-stack-justify);
|
|
671
|
-
}
|
|
672
|
-
|
|
673
654
|
.c3 {
|
|
674
655
|
font-size: 1.3rem;
|
|
675
656
|
line-height: 1.8rem;
|
|
@@ -704,6 +685,25 @@ exports[`FormControl > Snapshot > With single field 1`] = `
|
|
|
704
685
|
transition-property: color;
|
|
705
686
|
}
|
|
706
687
|
|
|
688
|
+
.c0 {
|
|
689
|
+
display: -webkit-box;
|
|
690
|
+
display: -webkit-flex;
|
|
691
|
+
display: -ms-flexbox;
|
|
692
|
+
display: flex;
|
|
693
|
+
-webkit-flex-direction: var(--bezier-alpha-stack-direction);
|
|
694
|
+
-ms-flex-direction: var(--bezier-alpha-stack-direction);
|
|
695
|
+
flex-direction: var(--bezier-alpha-stack-direction);
|
|
696
|
+
gap: var(--bezier-alpha-stack-spacing);
|
|
697
|
+
-webkit-align-items: var(--bezier-alpha-stack-align);
|
|
698
|
+
-webkit-box-align: var(--bezier-alpha-stack-align);
|
|
699
|
+
-ms-flex-align: var(--bezier-alpha-stack-align);
|
|
700
|
+
align-items: var(--bezier-alpha-stack-align);
|
|
701
|
+
-webkit-box-pack: var(--bezier-alpha-stack-justify);
|
|
702
|
+
-webkit-justify-content: var(--bezier-alpha-stack-justify);
|
|
703
|
+
-ms-flex-pack: var(--bezier-alpha-stack-justify);
|
|
704
|
+
justify-content: var(--bezier-alpha-stack-justify);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
707
|
.c1 {
|
|
708
708
|
position: relative;
|
|
709
709
|
}
|
|
@@ -133,5 +133,5 @@ export interface ModalTriggerProps extends
|
|
|
133
133
|
export interface ModalCloseProps extends
|
|
134
134
|
ChildrenProps<React.ReactElement> {}
|
|
135
135
|
|
|
136
|
-
export interface
|
|
136
|
+
export interface ModalContentPropsContextValue extends
|
|
137
137
|
Required<Pick<ModalContentOptions, 'showCloseIcon'>> {}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import React, {
|
|
2
2
|
forwardRef,
|
|
3
|
+
useCallback,
|
|
3
4
|
useMemo,
|
|
5
|
+
useState,
|
|
4
6
|
} from 'react'
|
|
5
7
|
|
|
6
8
|
import * as DialogPrimitive from '@radix-ui/react-dialog'
|
|
7
9
|
|
|
8
10
|
import { ZIndex } from '~/src/constants/ZIndex'
|
|
9
|
-
import
|
|
11
|
+
import useMergeRefs from '~/src/hooks/useMergeRefs'
|
|
12
|
+
import { getRootElement } from '~/src/utils/domUtils'
|
|
10
13
|
import { isNumber } from '~/src/utils/typeUtils'
|
|
11
14
|
|
|
12
15
|
import {
|
|
13
|
-
type ModalContentContextValue,
|
|
14
16
|
type ModalContentProps,
|
|
17
|
+
type ModalContentPropsContextValue,
|
|
15
18
|
} from './Modal.types'
|
|
16
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
ModalContainerContextProvider,
|
|
21
|
+
ModalContentPropsContextProvider,
|
|
22
|
+
} from './ModalContext'
|
|
17
23
|
import { ModalClose } from './ModalHelpers'
|
|
18
24
|
|
|
19
25
|
import * as Styled from './Modal.styled'
|
|
@@ -26,13 +32,22 @@ import * as Styled from './Modal.styled'
|
|
|
26
32
|
export const ModalContent = forwardRef(function ModalContent({
|
|
27
33
|
children,
|
|
28
34
|
style,
|
|
29
|
-
container =
|
|
35
|
+
container = getRootElement(),
|
|
30
36
|
showCloseIcon = false,
|
|
31
37
|
width = 'max-content',
|
|
32
38
|
height = 'fit-content',
|
|
33
39
|
zIndex = ZIndex.Modal,
|
|
34
40
|
...rest
|
|
35
41
|
}: ModalContentProps, forwardedRef: React.Ref<HTMLDivElement>) {
|
|
42
|
+
const [contentContainer, setContentContainer] = useState<HTMLElement>()
|
|
43
|
+
|
|
44
|
+
const contentRef = useMergeRefs(
|
|
45
|
+
forwardedRef,
|
|
46
|
+
useCallback((node: HTMLElement | null) => {
|
|
47
|
+
setContentContainer(node ?? undefined)
|
|
48
|
+
}, []),
|
|
49
|
+
)
|
|
50
|
+
|
|
36
51
|
const overlayStyle = useMemo((): React.CSSProperties & {
|
|
37
52
|
'--bezier-modal-z-index': ModalContentProps['zIndex']
|
|
38
53
|
} => ({
|
|
@@ -52,7 +67,7 @@ export const ModalContent = forwardRef(function ModalContent({
|
|
|
52
67
|
height,
|
|
53
68
|
])
|
|
54
69
|
|
|
55
|
-
const
|
|
70
|
+
const propsContextValue = useMemo((): ModalContentPropsContextValue => ({
|
|
56
71
|
showCloseIcon,
|
|
57
72
|
}), [showCloseIcon])
|
|
58
73
|
|
|
@@ -62,14 +77,16 @@ export const ModalContent = forwardRef(function ModalContent({
|
|
|
62
77
|
<DialogPrimitive.Content asChild>
|
|
63
78
|
<Styled.Content
|
|
64
79
|
aria-modal
|
|
65
|
-
ref={
|
|
80
|
+
ref={contentRef}
|
|
66
81
|
style={contentStyle}
|
|
67
82
|
{...rest}
|
|
68
83
|
>
|
|
69
84
|
<Styled.Section>
|
|
70
|
-
<
|
|
71
|
-
{
|
|
72
|
-
|
|
85
|
+
<ModalContainerContextProvider value={contentContainer}>
|
|
86
|
+
<ModalContentPropsContextProvider value={propsContextValue}>
|
|
87
|
+
{ children }
|
|
88
|
+
</ModalContentPropsContextProvider>
|
|
89
|
+
</ModalContainerContextProvider>
|
|
73
90
|
|
|
74
91
|
{ /* NOTE: To prevent focusing first on the close button when opening the modal, place the close button behind. */ }
|
|
75
92
|
{ showCloseIcon && (
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext } from '~/src/utils/reactUtils'
|
|
2
|
+
|
|
3
|
+
import { type ModalContentPropsContextValue } from './Modal.types'
|
|
4
|
+
|
|
5
|
+
export const [
|
|
6
|
+
ModalContentPropsContextProvider,
|
|
7
|
+
useModalContentPropsContext,
|
|
8
|
+
] = createContext<ModalContentPropsContextValue>({
|
|
9
|
+
showCloseIcon: false,
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
export const [
|
|
13
|
+
ModalContainerContextProvider,
|
|
14
|
+
useModalContainerContext,
|
|
15
|
+
] = createContext<HTMLElement | undefined>(undefined)
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
type ModalHeaderProps,
|
|
12
12
|
ModalTitleSize,
|
|
13
13
|
} from './Modal.types'
|
|
14
|
-
import {
|
|
14
|
+
import { useModalContentPropsContext } from './ModalContext'
|
|
15
15
|
|
|
16
16
|
import * as Styled from './Modal.styled'
|
|
17
17
|
|
|
@@ -79,7 +79,7 @@ export const ModalHeader = forwardRef(function ModalHeader({
|
|
|
79
79
|
hidden = false,
|
|
80
80
|
...rest
|
|
81
81
|
}: ModalHeaderProps, forwardedRef: React.Ref<HTMLElement>) {
|
|
82
|
-
const { showCloseIcon } =
|
|
82
|
+
const { showCloseIcon } = useModalContentPropsContext()
|
|
83
83
|
const hasTitleArea = title || showCloseIcon
|
|
84
84
|
const Hidden = hidden ? VisuallyHidden : React.Fragment
|
|
85
85
|
|
|
@@ -21,6 +21,8 @@ import {
|
|
|
21
21
|
} from '~/src/utils/domUtils'
|
|
22
22
|
import { noop } from '~/src/utils/functionUtils'
|
|
23
23
|
|
|
24
|
+
import { useModalContainerContext } from '~/src/components/Modals'
|
|
25
|
+
|
|
24
26
|
import type OverlayProps from './Overlay.types'
|
|
25
27
|
import {
|
|
26
28
|
type ContainerRectAttr,
|
|
@@ -46,7 +48,7 @@ function Overlay(
|
|
|
46
48
|
style,
|
|
47
49
|
containerClassName = '',
|
|
48
50
|
containerStyle,
|
|
49
|
-
container,
|
|
51
|
+
container: givenContainer,
|
|
50
52
|
target,
|
|
51
53
|
position = OverlayPosition.LeftCenter,
|
|
52
54
|
marginX = 0,
|
|
@@ -61,10 +63,9 @@ function Overlay(
|
|
|
61
63
|
}: OverlayProps,
|
|
62
64
|
forwardedRef: Ref<HTMLDivElement>,
|
|
63
65
|
) {
|
|
64
|
-
// NOTE: DOM render 가 필요한지 여부를 결정하는 state
|
|
65
66
|
const [shouldRender, setShouldRender] = useState(false)
|
|
66
|
-
// NOTE: 화면에 실제 표현해야 하는지 여부를 결정하는 state
|
|
67
67
|
const [shouldShow, setShouldShow] = useState(false)
|
|
68
|
+
|
|
68
69
|
const containerRect = useRef<ContainerRectAttr | null>(null)
|
|
69
70
|
const targetRect = useRef<TargetRectAttr | null>(null)
|
|
70
71
|
|
|
@@ -74,29 +75,36 @@ function Overlay(
|
|
|
74
75
|
const overlayRef = useRef<HTMLDivElement>(null)
|
|
75
76
|
const mergedRef = useMergeRefs<HTMLDivElement>(overlayRef, forwardedRef)
|
|
76
77
|
|
|
78
|
+
const defaultContainer = getRootElement()
|
|
79
|
+
const modalContainer = useModalContainerContext()
|
|
80
|
+
|
|
81
|
+
const hasContainer = Boolean(givenContainer || modalContainer)
|
|
82
|
+
const container = givenContainer ?? modalContainer ?? defaultContainer
|
|
83
|
+
|
|
77
84
|
const handleOverlayForceUpdate = useCallback(() => {
|
|
78
85
|
forceUpdate()
|
|
79
86
|
}, [])
|
|
80
87
|
|
|
81
88
|
const handleContainerRect = useCallback(() => {
|
|
82
|
-
const containerElement = container || getRootElement()
|
|
83
|
-
|
|
84
89
|
const {
|
|
85
90
|
width: containerWidth,
|
|
86
91
|
height: containerHeight,
|
|
87
92
|
top: containerTop,
|
|
88
93
|
left: containerLeft,
|
|
89
|
-
} =
|
|
94
|
+
} = container.getBoundingClientRect()
|
|
90
95
|
|
|
91
96
|
containerRect.current = {
|
|
92
97
|
containerWidth,
|
|
93
98
|
containerHeight,
|
|
94
99
|
containerTop,
|
|
95
100
|
containerLeft,
|
|
96
|
-
scrollTop:
|
|
97
|
-
scrollLeft:
|
|
101
|
+
scrollTop: hasContainer ? container.scrollTop : 0,
|
|
102
|
+
scrollLeft: hasContainer ? container.scrollLeft : 0,
|
|
98
103
|
}
|
|
99
|
-
}, [
|
|
104
|
+
}, [
|
|
105
|
+
container,
|
|
106
|
+
hasContainer,
|
|
107
|
+
])
|
|
100
108
|
|
|
101
109
|
useLayoutEffect(function initContainerRect() {
|
|
102
110
|
if (show) {
|
|
@@ -217,7 +225,7 @@ function Overlay(
|
|
|
217
225
|
])
|
|
218
226
|
|
|
219
227
|
const overlay = useMemo(() => {
|
|
220
|
-
if (
|
|
228
|
+
if (hasContainer) {
|
|
221
229
|
return Content
|
|
222
230
|
}
|
|
223
231
|
|
|
@@ -235,7 +243,7 @@ function Overlay(
|
|
|
235
243
|
</Styled.DefaultContainer>
|
|
236
244
|
)
|
|
237
245
|
}, [
|
|
238
|
-
|
|
246
|
+
hasContainer,
|
|
239
247
|
containerClassName,
|
|
240
248
|
show,
|
|
241
249
|
containerStyle,
|
|
@@ -293,7 +301,7 @@ function Overlay(
|
|
|
293
301
|
|
|
294
302
|
return ReactDOM.createPortal(
|
|
295
303
|
overlay,
|
|
296
|
-
container
|
|
304
|
+
container,
|
|
297
305
|
)
|
|
298
306
|
}
|
|
299
307
|
|
|
@@ -46,6 +46,11 @@ export enum OverlayPosition {
|
|
|
46
46
|
|
|
47
47
|
interface OverlayOptions {
|
|
48
48
|
show?: boolean
|
|
49
|
+
/**
|
|
50
|
+
* Specify a container element to portal the content into.
|
|
51
|
+
* @note When placed inside a `Modal`, default value is the container element of `Modal`.
|
|
52
|
+
* @default document.body
|
|
53
|
+
*/
|
|
49
54
|
container?: HTMLElement | null
|
|
50
55
|
target?: HTMLElement | null
|
|
51
56
|
position?: OverlayPosition
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
css,
|
|
8
8
|
} from '~/src/foundation'
|
|
9
9
|
|
|
10
|
+
import useIsMounted from '~/src/hooks/useIsMounted'
|
|
10
11
|
import { getRootElement } from '~/src/utils/domUtils'
|
|
11
12
|
|
|
12
13
|
import {
|
|
@@ -24,6 +25,8 @@ function ToastProvider({
|
|
|
24
25
|
autoDismissTimeout = 3000,
|
|
25
26
|
children = [],
|
|
26
27
|
}: ToastProviderProps) {
|
|
28
|
+
const isMounted = useIsMounted()
|
|
29
|
+
|
|
27
30
|
const toastContextValue = useToastProviderValues()
|
|
28
31
|
const {
|
|
29
32
|
leftToasts,
|
|
@@ -77,7 +80,7 @@ function ToastProvider({
|
|
|
77
80
|
return (
|
|
78
81
|
<ToastContextProvider value={toastContextValue}>
|
|
79
82
|
{ children }
|
|
80
|
-
{ createPortal(
|
|
83
|
+
{ isMounted && createPortal(
|
|
81
84
|
[
|
|
82
85
|
createContainer(ToastPlacement.BottomLeft, leftToasts),
|
|
83
86
|
createContainer(ToastPlacement.BottomRight, rightToasts),
|