@team-monolith/cds 1.43.1 → 1.43.3
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/components/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/Modal.d.ts +1 -0
- package/dist/components/Modal.js +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/patterns/Dropdown/DropdownMenu/DropdownMenu.js +3 -3
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SegmentedInput.js +6 -4
- package/package.json +1 -1
|
@@ -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,11 +18,12 @@ 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(
|
|
26
|
+
return (_jsx(Modal, Object.assign({ open: open, onClose: onClose, ref: ref, sx: {
|
|
27
27
|
zIndex: ZINDEX.ALERT,
|
|
28
28
|
} }, other, { children: _jsxs(Component, Object.assign({ className: className, css: css `
|
|
29
29
|
width: 480px;
|
|
@@ -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";
|
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";
|
|
@@ -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",
|
|
@@ -65,7 +65,12 @@ export default function SegmentedInput(props) {
|
|
|
65
65
|
? "activeDanger"
|
|
66
66
|
: focusedIndex === i
|
|
67
67
|
? "activePrimary"
|
|
68
|
-
: "default",
|
|
68
|
+
: "default", css: isCorrect === false &&
|
|
69
|
+
css `
|
|
70
|
+
input {
|
|
71
|
+
color: ${theme.color.foreground.danger};
|
|
72
|
+
}
|
|
73
|
+
`, inputProps: {
|
|
69
74
|
readOnly,
|
|
70
75
|
onFocus: () => {
|
|
71
76
|
var _a, _b;
|
|
@@ -75,9 +80,6 @@ export default function SegmentedInput(props) {
|
|
|
75
80
|
(_a = hiddenRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
76
81
|
(_b = hiddenRef.current) === null || _b === void 0 ? void 0 : _b.setSelectionRange(i, i);
|
|
77
82
|
},
|
|
78
|
-
color: isCorrect === false
|
|
79
|
-
? theme.color.foreground.danger
|
|
80
|
-
: undefined,
|
|
81
83
|
}, value: splitedValues[i] || "", onChange: () => { } }, i))) })), _jsx(InputMarker, {})] }), _jsx(Text, { children: placeholder })] }));
|
|
82
84
|
}
|
|
83
85
|
const Container = styled.div `
|