@team-monolith/cds 0.14.0 → 0.15.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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import { PolymorphicProps } from "@mui/base";
|
|
3
|
+
export interface AlertDialogOwnProps<RootComponentType extends React.ElementType> {
|
|
3
4
|
className?: string;
|
|
4
|
-
component?:
|
|
5
|
+
component?: RootComponentType;
|
|
5
6
|
/** `true` 값일때 모달이 노출됩니다. */
|
|
6
7
|
open: boolean;
|
|
7
8
|
/** 모달이 닫힐 때 호출되는 callback */
|
|
@@ -11,4 +12,11 @@ export interface AlertDialogProps {
|
|
|
11
12
|
/** 모달 좌측에 표기될 아이콘 */
|
|
12
13
|
icon?: React.ReactNode;
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
+
export type AlertDialogProps<RootComponentType extends React.ElementType = AlertDialogTypeMap["defaultComponent"]> = PolymorphicProps<AlertDialogTypeMap<RootComponentType>, RootComponentType>;
|
|
16
|
+
export interface AlertDialogTypeMap<RootComponentType extends React.ElementType = "div"> {
|
|
17
|
+
props: AlertDialogOwnProps<RootComponentType>;
|
|
18
|
+
defaultComponent: RootComponentType;
|
|
19
|
+
}
|
|
20
|
+
type AlertDialogComponent = <RootComponentType extends React.ElementType = "div">(props: AlertDialogProps<RootComponentType>) => React.ReactElement | null;
|
|
21
|
+
export declare const AlertDialog: AlertDialogComponent;
|
|
22
|
+
export {};
|
|
@@ -33,7 +33,7 @@ import shadows from "../../foundation/shadows";
|
|
|
33
33
|
import styled from "@emotion/styled";
|
|
34
34
|
import { MOBILE } from "../../foundation/breakpoints";
|
|
35
35
|
import AlertDialogContext from "./AlertDialogContext";
|
|
36
|
-
export var AlertDialog = React.forwardRef(function (props, ref) {
|
|
36
|
+
export var AlertDialog = React.forwardRef(function AlertDialog(props, ref) {
|
|
37
37
|
var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, open = props.open, onClose = props.onClose, children = props.children, icon = props.icon, other = __rest(props, ["className", "component", "open", "onClose", "children", "icon"]);
|
|
38
38
|
var theme = useTheme();
|
|
39
39
|
return (_jsx(MuiModal, __assign({ open: open, onClose: onClose, ref: ref }, other, { children: _jsxs(Component, __assign({ className: className, css: css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 480px;\n background: ", ";\n box-shadow: ", ";\n border-radius: 16px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 24px;\n box-sizing: border-box;\n\n display: grid;\n ", "\n\n gap: 8px 16px;\n\n ", "\n "], ["\n width: 480px;\n background: ", ";\n box-shadow: ", ";\n border-radius: 16px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 24px;\n box-sizing: border-box;\n\n display: grid;\n ", "\n\n gap: 8px 16px;\n\n ", "\n "])), theme.color.background.neutralBase, shadows.shadow04, icon
|
package/dist/index.d.ts
CHANGED
|
@@ -29,4 +29,7 @@ export { default as CodleDesignSystemProvider } from "./CodleDesignSystemProvide
|
|
|
29
29
|
export { light } from "./CodleDesignSystemProvider";
|
|
30
30
|
export * from "./icons";
|
|
31
31
|
export * from "./icons/Custom";
|
|
32
|
+
export * from "./utils/hover";
|
|
33
|
+
export * from "./utils/reset";
|
|
34
|
+
export * from "./utils/zIndex";
|
|
32
35
|
export * from "./patterns/SegmentedControl";
|
package/dist/index.js
CHANGED
|
@@ -29,4 +29,7 @@ export { default as CodleDesignSystemProvider } from "./CodleDesignSystemProvide
|
|
|
29
29
|
export { light } from "./CodleDesignSystemProvider";
|
|
30
30
|
export * from "./icons";
|
|
31
31
|
export * from "./icons/Custom";
|
|
32
|
+
export * from "./utils/hover";
|
|
33
|
+
export * from "./utils/reset";
|
|
34
|
+
export * from "./utils/zIndex";
|
|
32
35
|
export * from "./patterns/SegmentedControl";
|