@team-monolith/cds 1.43.0 → 1.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CodleDesignSystemProvider.d.ts +2 -0
- package/dist/CodleDesignSystemProvider.js +2 -1
- package/dist/components/AlertDialog/AlertDialog.js +4 -4
- package/dist/components/Modal.d.ts +1 -0
- package/dist/components/Modal.js +7 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/patterns/Dropdown/DropdownMenu/DropdownMenu.js +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { Theme } from "@emotion/react";
|
|
2
3
|
export declare const light: {
|
|
3
4
|
fontFamily: {
|
|
4
5
|
ui: string;
|
|
@@ -222,6 +223,7 @@ export declare const dark: {
|
|
|
222
223
|
};
|
|
223
224
|
};
|
|
224
225
|
interface CodleDesignSystemContext {
|
|
226
|
+
theme?: Theme;
|
|
225
227
|
lexical?: {
|
|
226
228
|
uploadByFile: (file: File) => Promise<string>;
|
|
227
229
|
};
|
|
@@ -242,9 +242,10 @@ export default function (props) {
|
|
|
242
242
|
},
|
|
243
243
|
},
|
|
244
244
|
});
|
|
245
|
+
const { theme = light } = props;
|
|
245
246
|
return (_jsxs(_Fragment, { children: [_jsx(Global, { styles: css `
|
|
246
247
|
body {
|
|
247
248
|
font-family: ${FONT.pretendard};
|
|
248
249
|
}
|
|
249
|
-
` }), _jsx(MuiThemeProvider, Object.assign({ theme: muiTheme }, { children: _jsx(ThemeProvider, Object.assign({ theme:
|
|
250
|
+
` }), _jsx(MuiThemeProvider, Object.assign({ theme: muiTheme }, { children: _jsx(ThemeProvider, Object.assign({ theme: theme }, { children: _jsx(CodleDesignSystemContext.Provider, Object.assign({ value: props }, { children: props.children })) })) }))] }));
|
|
250
251
|
}
|
|
@@ -11,7 +11,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
13
13
|
/** @jsxImportSource @emotion/react */
|
|
14
|
-
import { Modal as MuiModal } from "@mui/material";
|
|
15
14
|
import { css, useTheme } from "@emotion/react";
|
|
16
15
|
import React from "react";
|
|
17
16
|
import shadows from "../../foundation/shadows";
|
|
@@ -19,13 +18,14 @@ import styled from "@emotion/styled";
|
|
|
19
18
|
import { MOBILE } from "../../foundation/breakpoints";
|
|
20
19
|
import AlertDialogContext from "./AlertDialogContext";
|
|
21
20
|
import { ZINDEX } from "../../utils/zIndex";
|
|
21
|
+
import { Modal } from "../..";
|
|
22
22
|
export const AlertDialog = React.forwardRef(function AlertDialog(props, ref) {
|
|
23
23
|
const { className, component: Component = "div", open, onClose, children, icon, disableIconPadding } = props, other = __rest(props, ["className", "component", "open", "onClose", "children", "icon", "disableIconPadding"]);
|
|
24
24
|
const theme = useTheme();
|
|
25
25
|
const paddingAreaName = disableIconPadding ? "content" : "iconPadding";
|
|
26
|
-
return (_jsx(
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
return (_jsx(Modal, Object.assign({ css: css `
|
|
27
|
+
z-index: ${ZINDEX.ALERT};
|
|
28
|
+
`, open: open, onClose: onClose, ref: ref }, other, { children: _jsxs(Component, Object.assign({ className: className, css: css `
|
|
29
29
|
width: 480px;
|
|
30
30
|
background: ${theme.color.background.neutralBase};
|
|
31
31
|
box-shadow: ${shadows.shadow04};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Modal: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").ModalTypeMap<"div", {}>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { default as CheckboxInput } from "./components/CheckboxInput";
|
|
|
9
9
|
export * from "./components/CheckboxInput";
|
|
10
10
|
export { default as Input } from "./components/Input";
|
|
11
11
|
export * from "./components/Input";
|
|
12
|
+
export * from "./components/Modal";
|
|
12
13
|
export { default as Pagination } from "./components/Pagination";
|
|
13
14
|
export * from "./components/Pagination";
|
|
14
15
|
export { default as PinInput } from "./components/PinInput";
|
|
@@ -32,7 +33,7 @@ export { default as color } from "./foundation/color";
|
|
|
32
33
|
export { default as shadows } from "./foundation/shadows";
|
|
33
34
|
export * from "./foundation/breakpoints";
|
|
34
35
|
export { default as CodleDesignSystemProvider } from "./CodleDesignSystemProvider";
|
|
35
|
-
export
|
|
36
|
+
export * from "./CodleDesignSystemProvider";
|
|
36
37
|
export * from "./icons";
|
|
37
38
|
export * from "./icons/Custom";
|
|
38
39
|
export * from "./utils/hover";
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { default as CheckboxInput } from "./components/CheckboxInput";
|
|
|
9
9
|
export * from "./components/CheckboxInput";
|
|
10
10
|
export { default as Input } from "./components/Input";
|
|
11
11
|
export * from "./components/Input";
|
|
12
|
+
export * from "./components/Modal";
|
|
12
13
|
export { default as Pagination } from "./components/Pagination";
|
|
13
14
|
export * from "./components/Pagination";
|
|
14
15
|
export { default as PinInput } from "./components/PinInput";
|
|
@@ -32,7 +33,7 @@ export { default as color } from "./foundation/color";
|
|
|
32
33
|
export { default as shadows } from "./foundation/shadows";
|
|
33
34
|
export * from "./foundation/breakpoints";
|
|
34
35
|
export { default as CodleDesignSystemProvider } from "./CodleDesignSystemProvider";
|
|
35
|
-
export
|
|
36
|
+
export * from "./CodleDesignSystemProvider";
|
|
36
37
|
export * from "./icons";
|
|
37
38
|
export * from "./icons/Custom";
|
|
38
39
|
export * from "./utils/hover";
|
|
@@ -14,8 +14,8 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
14
14
|
import styled from "@emotion/styled";
|
|
15
15
|
import { css } from "@emotion/react";
|
|
16
16
|
import React, { useContext } from "react";
|
|
17
|
-
import { shadows } from "../../..";
|
|
18
|
-
import {
|
|
17
|
+
import { Modal, shadows } from "../../..";
|
|
18
|
+
import { Grow as MuiGrow, Portal } from "@mui/material";
|
|
19
19
|
import { ORIGIN_PROPS_TO_POSITION, ORIGIN_PROPS_TO_TRANSFORM, } from "./style";
|
|
20
20
|
import DropdownContext from "../DropdownContext";
|
|
21
21
|
export const DROPDOWN_MENU_WIDTH = 132;
|
|
@@ -46,7 +46,7 @@ const DropdownMenu = React.forwardRef((props, ref) => {
|
|
|
46
46
|
nestedIndex,
|
|
47
47
|
itemState,
|
|
48
48
|
setItemState,
|
|
49
|
-
} }, { children: _jsx(
|
|
49
|
+
} }, { children: _jsx(Modal, Object.assign({ className: className, open: open, onClose: onClose, slotProps: {
|
|
50
50
|
backdrop: {
|
|
51
51
|
style: {
|
|
52
52
|
backgroundColor: "transparent",
|