@team-monolith/cds 1.102.4 → 1.102.6
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/patterns/Dropdown/DropdownItem/DropdownItem.js +5 -1
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxComponent.d.ts +1 -1
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxComponent.js +2 -2
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.d.ts +3 -1
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.js +5 -3
- package/dist/utils/reset.d.ts +0 -1
- package/dist/utils/reset.js +1 -8
- package/package.json +1 -1
|
@@ -53,7 +53,11 @@ const DropdownItem = React.forwardRef(function DropdownItem(props, ref) {
|
|
|
53
53
|
return (_jsxs(_Fragment, { children: [_jsx(Component, Object.assign({ className: className, ref: ref, tabIndex: disabled ? -1 : 0, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onClick: handleClick, "aria-disabled": disabled }, other, { "aria-expanded": isSubMenuExist ? isSubMenuShowed : undefined, "aria-controls": isSubMenuExist ? dropdownMenuId : undefined, disabled: disabled }, (Component === "button"
|
|
54
54
|
? {
|
|
55
55
|
type: "button",
|
|
56
|
-
css:
|
|
56
|
+
css: css `
|
|
57
|
+
${RESET_BUTTON}
|
|
58
|
+
display: block;
|
|
59
|
+
width: 100%;
|
|
60
|
+
`,
|
|
57
61
|
}
|
|
58
62
|
: {}), { children: _jsxs(Item, Object.assign({ ref: itemRef, disabled: disabled, selected: isSubMenuShowed || Boolean(active) }, { children: [_jsxs(LeftWrapper, { children: [checkbox && (_jsx(StyledCheckboxInput, Object.assign({}, checkboxProps, { disabled: disabled, onClick: (e) => {
|
|
59
63
|
e.stopPropagation();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ImageProps } from "../../../../components/InsertImageDialog";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const selectBoxClasses: {
|
|
4
4
|
readonly container: "SheetSelectNode-SelectBox-container";
|
|
5
5
|
readonly index: "SheetSelectNode-SelectBox-index";
|
|
6
6
|
readonly content: "SheetSelectNode-SelectBox-content";
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
14
14
|
import { css, useTheme } from "@emotion/react";
|
|
15
15
|
import styled from "@emotion/styled";
|
|
16
16
|
import { forwardRef } from "react";
|
|
17
|
-
export const
|
|
17
|
+
export const selectBoxClasses = {
|
|
18
18
|
container: "SheetSelectNode-SelectBox-container",
|
|
19
19
|
index: "SheetSelectNode-SelectBox-index",
|
|
20
20
|
content: "SheetSelectNode-SelectBox-content",
|
|
@@ -47,7 +47,7 @@ const TYPE_TO_INDEX_STYLE = (theme, type) => ({
|
|
|
47
47
|
export const SelectBoxComponent = forwardRef(function SelectBoxComponent(props, ref) {
|
|
48
48
|
const { className, type, index, image, text, onClick } = props, restProps = __rest(props, ["className", "type", "index", "image", "text", "onClick"]);
|
|
49
49
|
const theme = useTheme();
|
|
50
|
-
return (_jsxs(Container, Object.assign({ className: `${className} ${
|
|
50
|
+
return (_jsxs(Container, Object.assign({ className: `${className} ${selectBoxClasses.container}`, ref: ref }, restProps, { css: TYPE_TO_CONTAINER_STYLE(theme, type), onClick: onClick }, { children: [_jsx(Index, Object.assign({ className: selectBoxClasses.index, "aria-hidden": "true", css: TYPE_TO_INDEX_STYLE(theme, type) }, { children: index })), _jsxs(Content, Object.assign({ className: selectBoxClasses.content, "aria-hidden": "true" }, { children: [image && (_jsx("img", { "aria-hidden": "true", src: image.src, alt: image.altText, css: css `
|
|
51
51
|
height: auto;
|
|
52
52
|
// 이미지로 인해 좌우로 스크롤이 생기는 것을 방지
|
|
53
53
|
max-width: 100%;
|
|
@@ -10,5 +10,7 @@ export interface ComponentAdderPluginProps {
|
|
|
10
10
|
isQuizEnabled: boolean;
|
|
11
11
|
showFileUpload: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const componentAdderClasses: {
|
|
14
|
+
readonly menu: "ComponentAdder-menu";
|
|
15
|
+
};
|
|
14
16
|
export declare function ComponentAdderPlugin(props: ComponentAdderPluginProps): JSX.Element | null;
|
|
@@ -33,9 +33,11 @@ import { InsertImageDialog } from "../../components/InsertImageDialog";
|
|
|
33
33
|
import { INSERT_IMAGE_COMMAND } from "../ImagesPlugin";
|
|
34
34
|
import { UploadFileDialog } from "../../components/UploadFileDialog";
|
|
35
35
|
import { UPLOAD_FILE_COMMAND } from "../FilePlugin";
|
|
36
|
-
export const
|
|
36
|
+
export const componentAdderClasses = {
|
|
37
|
+
menu: "ComponentAdder-menu",
|
|
38
|
+
};
|
|
37
39
|
function isOnMenu(element) {
|
|
38
|
-
return !!element.closest(`.${
|
|
40
|
+
return !!element.closest(`.${componentAdderClasses.menu}`);
|
|
39
41
|
}
|
|
40
42
|
// https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
|
|
41
43
|
// Component Picker에도 비슷한 코드가 있지만 LexicalTypeaheadMenuPlugin 에서
|
|
@@ -165,7 +167,7 @@ export function ComponentAdderPlugin(props) {
|
|
|
165
167
|
: null, onSelectOption: onSelectOption, onClose: () => {
|
|
166
168
|
setNodeKey(null);
|
|
167
169
|
onClose();
|
|
168
|
-
} }), createPortal(_jsxs(_Fragment, { children: [_jsx(ComponentAdder, { ref: menuRef, className:
|
|
170
|
+
} }), createPortal(_jsxs(_Fragment, { children: [_jsx(ComponentAdder, { ref: menuRef, className: componentAdderClasses.menu, onPlusClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
169
171
|
if (!blockElem) {
|
|
170
172
|
return;
|
|
171
173
|
}
|
package/dist/utils/reset.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare const RESET_COMMON_BOX: import("@emotion/utils").SerializedStyles;
|
|
2
2
|
export declare const RESET_BUTTON: import("@emotion/utils").SerializedStyles;
|
|
3
3
|
export declare const RESET_TABLE: import("@emotion/utils").SerializedStyles;
|
|
4
|
-
export declare const RESET_LI: import("@emotion/utils").SerializedStyles;
|
package/dist/utils/reset.js
CHANGED
|
@@ -13,6 +13,7 @@ export const RESET_BUTTON = css `
|
|
|
13
13
|
background: none;
|
|
14
14
|
font: inherit;
|
|
15
15
|
text-align: inherit;
|
|
16
|
+
letter-spacing: inherit;
|
|
16
17
|
`;
|
|
17
18
|
export const RESET_TABLE = css `
|
|
18
19
|
padding: 0;
|
|
@@ -20,11 +21,3 @@ export const RESET_TABLE = css `
|
|
|
20
21
|
border-spacing: 0px;
|
|
21
22
|
border-collapse: collapse;
|
|
22
23
|
`;
|
|
23
|
-
export const RESET_LI = css `
|
|
24
|
-
list-style: none; /* 기본 리스트 스타일 제거 */
|
|
25
|
-
|
|
26
|
-
/* ::marker를 완전히 숨김 */
|
|
27
|
-
&::marker {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
`;
|