@team-monolith/cds 0.27.0 → 0.29.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.
Files changed (53) hide show
  1. package/README.md +10 -1
  2. package/dist/components/Button.d.ts +1 -1
  3. package/dist/components/Button.js +14 -12
  4. package/dist/components/SquareButton.js +13 -12
  5. package/dist/patterns/ReactEditorJS/FormEditorJS.d.ts +8 -0
  6. package/dist/patterns/ReactEditorJS/FormEditorJS.js +133 -0
  7. package/dist/patterns/ReactEditorJS/Layout.d.ts +6 -0
  8. package/dist/patterns/ReactEditorJS/Layout.js +14 -0
  9. package/dist/patterns/ReactEditorJS/ReactEditorJS.d.ts +11 -0
  10. package/dist/patterns/ReactEditorJS/ReactEditorJS.js +137 -0
  11. package/dist/patterns/ReactEditorJS/customTools/block/Callout.d.ts +40 -0
  12. package/dist/patterns/ReactEditorJS/customTools/block/Callout.js +135 -0
  13. package/dist/patterns/ReactEditorJS/customTools/block/Delimiter.d.ts +10 -0
  14. package/dist/patterns/ReactEditorJS/customTools/block/Delimiter.js +50 -0
  15. package/dist/patterns/ReactEditorJS/customTools/block/Header.d.ts +60 -0
  16. package/dist/patterns/ReactEditorJS/customTools/block/Header.js +179 -0
  17. package/dist/patterns/ReactEditorJS/customTools/block/Image.d.ts +21 -0
  18. package/dist/patterns/ReactEditorJS/customTools/block/Image.js +84 -0
  19. package/dist/patterns/ReactEditorJS/customTools/block/NestedList.d.ts +28 -0
  20. package/dist/patterns/ReactEditorJS/customTools/block/NestedList.js +134 -0
  21. package/dist/patterns/ReactEditorJS/customTools/block/Quote.d.ts +40 -0
  22. package/dist/patterns/ReactEditorJS/customTools/block/Quote.js +135 -0
  23. package/dist/patterns/ReactEditorJS/customTools/block/Raw.d.ts +26 -0
  24. package/dist/patterns/ReactEditorJS/customTools/block/Raw.js +119 -0
  25. package/dist/patterns/ReactEditorJS/customTools/block/Table.d.ts +10 -0
  26. package/dist/patterns/ReactEditorJS/customTools/block/Table.js +67 -0
  27. package/dist/patterns/ReactEditorJS/customTools/index.d.ts +16 -0
  28. package/dist/patterns/ReactEditorJS/customTools/index.js +16 -0
  29. package/dist/patterns/ReactEditorJS/customTools/inline/Bold.d.ts +52 -0
  30. package/dist/patterns/ReactEditorJS/customTools/inline/Bold.js +92 -0
  31. package/dist/patterns/ReactEditorJS/customTools/inline/InlineCode.d.ts +4 -0
  32. package/dist/patterns/ReactEditorJS/customTools/inline/InlineCode.js +32 -0
  33. package/dist/patterns/ReactEditorJS/customTools/inline/Italic.d.ts +48 -0
  34. package/dist/patterns/ReactEditorJS/customTools/inline/Italic.js +88 -0
  35. package/dist/patterns/ReactEditorJS/customTools/inline/StrikeThrough.d.ts +4 -0
  36. package/dist/patterns/ReactEditorJS/customTools/inline/StrikeThrough.js +32 -0
  37. package/dist/patterns/ReactEditorJS/customTools/inline/Underline.d.ts +4 -0
  38. package/dist/patterns/ReactEditorJS/customTools/inline/Underline.js +32 -0
  39. package/dist/patterns/ReactEditorJS/customTools/tunes/Delete.d.ts +30 -0
  40. package/dist/patterns/ReactEditorJS/customTools/tunes/Delete.js +40 -0
  41. package/dist/patterns/ReactEditorJS/customTools/tunes/MoveDown.d.ts +34 -0
  42. package/dist/patterns/ReactEditorJS/customTools/tunes/MoveDown.js +62 -0
  43. package/dist/patterns/ReactEditorJS/customTools/tunes/MoveUp.d.ts +34 -0
  44. package/dist/patterns/ReactEditorJS/customTools/tunes/MoveUp.js +72 -0
  45. package/dist/patterns/ReactEditorJS/i18n.d.ts +127 -0
  46. package/dist/patterns/ReactEditorJS/i18n.js +127 -0
  47. package/dist/patterns/ReactEditorJS/index.d.ts +2 -0
  48. package/dist/patterns/ReactEditorJS/index.js +2 -0
  49. package/dist/patterns/ReactEditorJS/tools.d.ts +78 -0
  50. package/dist/patterns/ReactEditorJS/tools.js +104 -0
  51. package/dist/patterns/SegmentedControl/SegmentedControlButton.js +1 -1
  52. package/dist/patterns/SegmentedControl/SegmentedControlGroup.js +1 -1
  53. package/package.json +15 -1
@@ -0,0 +1,127 @@
1
+ declare const I18n: {
2
+ messages: {
3
+ ui: {
4
+ blockTunes: {
5
+ toggler: {
6
+ "Click to tune": string;
7
+ "or drag to move": string;
8
+ };
9
+ };
10
+ inlineToolbar: {
11
+ converter: {
12
+ "Convert to": string;
13
+ };
14
+ };
15
+ toolbar: {
16
+ toolbox: {
17
+ Add: string;
18
+ };
19
+ };
20
+ popover: {
21
+ Filter: string;
22
+ "Nothing found": string;
23
+ };
24
+ };
25
+ toolNames: {
26
+ Text: string;
27
+ HeadingBig: string;
28
+ HeadingMedium: string;
29
+ HeadingSmall: string;
30
+ ListUnordered: string;
31
+ ListOrdered: string;
32
+ Warning: string;
33
+ Code: string;
34
+ Quote: string;
35
+ Callout: string;
36
+ Delimiter: string;
37
+ Table: string;
38
+ Image: string;
39
+ Link: string;
40
+ Marker: string;
41
+ Bold: string;
42
+ Italic: string;
43
+ InlineCode: string;
44
+ Toggle: string;
45
+ StrikeThrough: string;
46
+ Underline: string;
47
+ };
48
+ tools: {
49
+ header: {
50
+ header: string;
51
+ sub_header: string;
52
+ sub_sub_header: string;
53
+ };
54
+ sub_header: {
55
+ header: string;
56
+ sub_header: string;
57
+ sub_sub_header: string;
58
+ };
59
+ sub_sub_header: {
60
+ header: string;
61
+ sub_header: string;
62
+ sub_sub_header: string;
63
+ };
64
+ bulleted_list: {
65
+ Ordered: string;
66
+ Unordered: string;
67
+ };
68
+ numbered_list: {
69
+ Ordered: string;
70
+ Unordered: string;
71
+ };
72
+ quote: {
73
+ Grey: string;
74
+ Red: string;
75
+ Yellow: string;
76
+ Blue: string;
77
+ Green: string;
78
+ };
79
+ callout: {
80
+ Grey: string;
81
+ Red: string;
82
+ Yellow: string;
83
+ Blue: string;
84
+ Green: string;
85
+ };
86
+ link: {
87
+ "Add a link": string;
88
+ };
89
+ raw: {
90
+ "Light Theme": string;
91
+ "Dark Theme": string;
92
+ };
93
+ stub: {
94
+ "The block can not be displayed correctly.": string;
95
+ };
96
+ table: {
97
+ "With headings": string;
98
+ "Without headings": string;
99
+ Heading: string;
100
+ "Add column to left": string;
101
+ "Add column to right": string;
102
+ "Delete column": string;
103
+ "Add row above": string;
104
+ "Add row below": string;
105
+ "Delete row": string;
106
+ };
107
+ image: {
108
+ "With border": string;
109
+ "Stretch image": string;
110
+ "With background": string;
111
+ };
112
+ };
113
+ blockTunes: {
114
+ delete: {
115
+ Delete: string;
116
+ "Click to delete": string;
117
+ };
118
+ moveUp: {
119
+ "Move up": string;
120
+ };
121
+ moveDown: {
122
+ "Move down": string;
123
+ };
124
+ };
125
+ };
126
+ };
127
+ export default I18n;
@@ -0,0 +1,127 @@
1
+ var I18n = {
2
+ messages: {
3
+ ui: {
4
+ blockTunes: {
5
+ toggler: {
6
+ "Click to tune": "클릭하여 변환",
7
+ "or drag to move": "드래그하여 이동",
8
+ },
9
+ },
10
+ inlineToolbar: {
11
+ converter: {
12
+ "Convert to": "블록 유형 변경",
13
+ },
14
+ },
15
+ toolbar: {
16
+ toolbox: {
17
+ Add: "추가하기",
18
+ },
19
+ },
20
+ popover: {
21
+ Filter: "찾기",
22
+ "Nothing found": "항목이 없습니다.",
23
+ },
24
+ },
25
+ toolNames: {
26
+ Text: "본문",
27
+ HeadingBig: "큰 제목",
28
+ HeadingMedium: "중간 제목",
29
+ HeadingSmall: "작은 제목",
30
+ ListUnordered: "일반 목록",
31
+ ListOrdered: "숫자 목록",
32
+ Warning: "경고",
33
+ Code: "코드 블록",
34
+ Quote: "인용 블록",
35
+ Callout: "주목 블록",
36
+ Delimiter: "구분선",
37
+ Table: "표",
38
+ Image: "이미지",
39
+ Link: "링크",
40
+ Marker: "마커",
41
+ Bold: "굵게",
42
+ Italic: "기울임",
43
+ InlineCode: "인라인 코드",
44
+ Toggle: "토글",
45
+ StrikeThrough: "취소선",
46
+ Underline: "밑줄",
47
+ },
48
+ tools: {
49
+ header: {
50
+ header: "큰 제목",
51
+ sub_header: "중간 제목",
52
+ sub_sub_header: "작은 제목",
53
+ },
54
+ sub_header: {
55
+ header: "큰 제목",
56
+ sub_header: "중간 제목",
57
+ sub_sub_header: "작은 제목",
58
+ },
59
+ sub_sub_header: {
60
+ header: "큰 제목",
61
+ sub_header: "중간 제목",
62
+ sub_sub_header: "작은 제목",
63
+ },
64
+ bulleted_list: {
65
+ Ordered: "숫자 목록",
66
+ Unordered: "일반 목록",
67
+ },
68
+ numbered_list: {
69
+ Ordered: "숫자 목록",
70
+ Unordered: "일반 목록",
71
+ },
72
+ quote: {
73
+ Grey: "회색",
74
+ Red: "빨간색",
75
+ Yellow: "노란색",
76
+ Blue: "파란색",
77
+ Green: "초록색",
78
+ },
79
+ callout: {
80
+ Grey: "회색",
81
+ Red: "빨간색",
82
+ Yellow: "노란색",
83
+ Blue: "파란색",
84
+ Green: "초록색",
85
+ },
86
+ link: {
87
+ "Add a link": "링크 추가하기",
88
+ },
89
+ raw: {
90
+ "Light Theme": "밝은 배경",
91
+ "Dark Theme": "어두운 배경",
92
+ },
93
+ stub: {
94
+ "The block can not be displayed correctly.": "이 블록은 올바르게 표시될 수 없습니다.",
95
+ },
96
+ table: {
97
+ "With headings": "제목 행 있음",
98
+ "Without headings": "제목 행 없음",
99
+ Heading: "제목",
100
+ "Add column to left": "왼쪽에 열 추가",
101
+ "Add column to right": "오른쪽에 열 추가",
102
+ "Delete column": "이 열 삭제",
103
+ "Add row above": "위에 행 추가",
104
+ "Add row below": "아래에 행 추가",
105
+ "Delete row": "이 행 삭제",
106
+ },
107
+ image: {
108
+ "With border": "테두리 넣기",
109
+ "Stretch image": "이미지 폭 넓게",
110
+ "With background": "배경 넣기",
111
+ },
112
+ },
113
+ blockTunes: {
114
+ delete: {
115
+ Delete: "블록 삭제",
116
+ "Click to delete": "클릭하여 삭제하기",
117
+ },
118
+ moveUp: {
119
+ "Move up": "위로 이동",
120
+ },
121
+ moveDown: {
122
+ "Move down": "아래로 이동",
123
+ },
124
+ },
125
+ },
126
+ };
127
+ export default I18n;
@@ -0,0 +1,2 @@
1
+ export * from "./ReactEditorJS";
2
+ export * from "./FormEditorJS";
@@ -0,0 +1,2 @@
1
+ export * from "./ReactEditorJS";
2
+ export * from "./FormEditorJS";
@@ -0,0 +1,78 @@
1
+ import { Bold, HeaderBig, HeaderMedium, HeaderSmall, ListOrdered, ListUnordered, Raw, Delimiter, Table, Image, Quote, Callout, Italic, InlineCode, StrikeThrough, Underline, MoveDown, MoveUp, Delete } from "./customTools";
2
+ declare const TOOLS: {
3
+ paragraph: {
4
+ class: any;
5
+ toolbox: {
6
+ icon: string;
7
+ };
8
+ };
9
+ header: {
10
+ class: typeof HeaderBig;
11
+ inlineToolbar: string[];
12
+ };
13
+ sub_header: {
14
+ class: typeof HeaderMedium;
15
+ inlineToolbar: string[];
16
+ };
17
+ sub_sub_header: {
18
+ class: typeof HeaderSmall;
19
+ inlineToolbar: string[];
20
+ };
21
+ bulleted_list: {
22
+ class: typeof ListUnordered;
23
+ inlineToolbar: string[];
24
+ pasteConfig: {
25
+ tags: string[];
26
+ };
27
+ };
28
+ numbered_list: {
29
+ class: typeof ListOrdered;
30
+ inlineToolbar: string[];
31
+ config: {
32
+ defaultStyle: string;
33
+ };
34
+ pasteConfig: {
35
+ tags: string[];
36
+ };
37
+ };
38
+ quote: typeof Quote;
39
+ callout: typeof Callout;
40
+ raw: {
41
+ class: typeof Raw;
42
+ config: {
43
+ placeholder: string;
44
+ };
45
+ };
46
+ delimiter: typeof Delimiter;
47
+ table: {
48
+ class: typeof Table;
49
+ config: {
50
+ withHeadings: boolean;
51
+ };
52
+ };
53
+ image: typeof Image;
54
+ bold: {
55
+ class: typeof Bold;
56
+ shortcut: string;
57
+ };
58
+ italic: {
59
+ class: typeof Italic;
60
+ shortcut: string;
61
+ };
62
+ inlineCode: {
63
+ class: typeof InlineCode;
64
+ shortcut: string;
65
+ };
66
+ strikeThrough: {
67
+ class: typeof StrikeThrough;
68
+ shortcut: string;
69
+ };
70
+ underline: {
71
+ class: typeof Underline;
72
+ shortcut: string;
73
+ };
74
+ moveUp: typeof MoveUp;
75
+ delete: typeof Delete;
76
+ moveDown: typeof MoveDown;
77
+ };
78
+ export default TOOLS;
@@ -0,0 +1,104 @@
1
+ import Paragraph from "@editorjs/paragraph";
2
+ import { textSvg } from "../../icons";
3
+ import { Bold, HeaderBig, HeaderMedium, HeaderSmall, ListOrdered, ListUnordered, Raw, Delimiter, Table, Image, Quote, Callout, Italic, InlineCode, StrikeThrough, Underline, MoveDown, MoveUp, Delete, } from "./customTools";
4
+ var INLINE_TOOLBAR = [
5
+ "bold",
6
+ "italic",
7
+ "underline",
8
+ "strikeThrough",
9
+ "inlineCode",
10
+ "link",
11
+ ];
12
+ var TOOLS = {
13
+ // 블록 툴: 순서대로 툴바에 나열됩니다.
14
+ paragraph: {
15
+ class: Paragraph,
16
+ // https://github.com/editor-js/paragraph/blob/master/src/index.js
17
+ toolbox: {
18
+ icon: "<img src=\"".concat(textSvg, "\" />"),
19
+ },
20
+ },
21
+ header: {
22
+ class: HeaderBig,
23
+ inlineToolbar: INLINE_TOOLBAR,
24
+ },
25
+ sub_header: {
26
+ class: HeaderMedium,
27
+ inlineToolbar: INLINE_TOOLBAR,
28
+ },
29
+ sub_sub_header: {
30
+ class: HeaderSmall,
31
+ inlineToolbar: INLINE_TOOLBAR,
32
+ },
33
+ bulleted_list: {
34
+ class: ListUnordered,
35
+ inlineToolbar: INLINE_TOOLBAR,
36
+ pasteConfig: {
37
+ tags: ["UL", "LI"],
38
+ },
39
+ },
40
+ numbered_list: {
41
+ class: ListOrdered,
42
+ inlineToolbar: INLINE_TOOLBAR,
43
+ config: {
44
+ defaultStyle: "ordered",
45
+ },
46
+ pasteConfig: {
47
+ tags: ["OL", "LI"],
48
+ },
49
+ },
50
+ // 현재 토글에 버그가 있어 기능을 비활성화 합니다.
51
+ // toggle: {
52
+ // class: Toggle,
53
+ // inlineToolbar: INLINE_TOOLBAR,
54
+ // toolbox: {
55
+ // icon: `<img src="${arrowRightSFillSvg}" />`,
56
+ // },
57
+ // config: {
58
+ // placeholder: "토글",
59
+ // defaultContent: "토글 내부 항목",
60
+ // },
61
+ // },
62
+ quote: Quote,
63
+ callout: Callout,
64
+ raw: {
65
+ class: Raw,
66
+ config: {
67
+ placeholder: "코드를 입력하세요.",
68
+ },
69
+ },
70
+ delimiter: Delimiter,
71
+ table: {
72
+ class: Table,
73
+ config: {
74
+ withHeadings: true,
75
+ },
76
+ },
77
+ image: Image,
78
+ // 인라인 툴 : ReactEditorJS에서 inlineToolbar를 지정하여 노출합니다.
79
+ bold: {
80
+ class: Bold,
81
+ shortcut: "CMD+B",
82
+ },
83
+ italic: {
84
+ class: Italic,
85
+ shortcut: "CMD+I",
86
+ },
87
+ inlineCode: {
88
+ class: InlineCode,
89
+ shortcut: "CMD+SHIFT+M",
90
+ },
91
+ strikeThrough: {
92
+ class: StrikeThrough,
93
+ shortcut: "CMD+SHIFT+X",
94
+ },
95
+ underline: {
96
+ class: Underline,
97
+ shortcut: "CMD+SHIFT+U",
98
+ },
99
+ // 블록 변경(tune) 툴
100
+ moveUp: MoveUp,
101
+ delete: Delete,
102
+ moveDown: MoveDown,
103
+ };
104
+ export default TOOLS;
@@ -44,6 +44,6 @@ export var SegmentedControlButton = React.forwardRef(function SegmentedControlBu
44
44
  var isActive = context.multiSelect
45
45
  ? context.value.includes(props.value)
46
46
  : context.value === props.value;
47
- return (_jsx(Button, __assign({ css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n ", "\n "], ["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n ", "\n "])), isActive && "box-shadow: ".concat(shadows.shadow04, ";")) }, other, { ref: ref, color: isActive ? "primary" : "textNeutral", size: context.size, onClick: handleClick })));
47
+ return (_jsx(Button, __assign({ css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n ", "\n "], ["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n ", "\n "])), isActive && "box-shadow: ".concat(shadows.shadow04, ";")) }, other, { ref: ref, color: isActive ? "white" : "textNeutral", size: context.size, onClick: handleClick })));
48
48
  });
49
49
  var templateObject_1;
@@ -33,7 +33,7 @@ import React from "react";
33
33
  export var SegmentedControlGroup = React.forwardRef(function SegmentedControlGroup(props, ref) {
34
34
  var _a = props.component, Component = _a === void 0 ? "div" : _a, className = props.className, children = props.children, fullWidth = props.fullWidth, multiSelect = props.multiSelect;
35
35
  var theme = useTheme();
36
- return (_jsx(Component, __assign({ ref: ref, className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n gap: 4px;\n\n width: ", ";\n background-color: ", ";\n border-radius: 8px;\n border: 1px solid ", ";\n "], ["\n display: flex;\n gap: 4px;\n\n width: ", ";\n background-color: ", ";\n border-radius: 8px;\n border: 1px solid ", ";\n "])), fullWidth ? "100%" : "fit-content", theme.color.background.neutralAlt, theme.color.background.neutralAltActive) }, { children: _jsx(SegmentedControlGroupPropsContext.Provider, __assign({ value: __assign(__assign({}, props), { onClick: function (newValue) {
36
+ return (_jsx(Component, __assign({ ref: ref, className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n padding: 4px;\n\n width: ", ";\n background-color: ", ";\n border-radius: 8px;\n border: 1px solid ", ";\n "], ["\n display: flex;\n padding: 4px;\n\n width: ", ";\n background-color: ", ";\n border-radius: 8px;\n border: 1px solid ", ";\n "])), fullWidth ? "100%" : "fit-content", theme.color.background.neutralAlt, theme.color.background.neutralAltActive) }, { children: _jsx(SegmentedControlGroupPropsContext.Provider, __assign({ value: __assign(__assign({}, props), { onClick: function (newValue) {
37
37
  var _a, _b, _c;
38
38
  if (multiSelect) {
39
39
  if (props.value.includes(newValue)) {
package/package.json CHANGED
@@ -1,18 +1,32 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "0.27.0",
3
+ "version": "0.29.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,
7
7
  "dependencies": {
8
+ "@editorjs/delimiter": "^1.4.0",
9
+ "@editorjs/header": "^2.8.1",
10
+ "@editorjs/image": "^2.9.0",
11
+ "@editorjs/inline-code": "^1.5.0",
12
+ "@editorjs/nested-list": "^1.4.1",
13
+ "@editorjs/quote": "^2.6.0",
14
+ "@editorjs/raw": "^2.5.0",
15
+ "@editorjs/table": "^2.3.0",
16
+ "@editorjs/underline": "^1.1.0",
8
17
  "@emotion/react": "^11.8.2",
9
18
  "@emotion/styled": "^11.8.1",
10
19
  "@mui/material": "^5.13.6",
20
+ "@sentry/react": "^7.80.1",
11
21
  "@types/node": "^16.11.26",
12
22
  "@types/react": "^17.0.39",
13
23
  "@types/react-dom": "^17.0.11",
24
+ "editorjs-strikethrough": "^1.0.0",
25
+ "hex-to-css-filter": "^5.4.0",
14
26
  "react": "^17.0.2",
15
27
  "react-dom": "^17.0.2",
28
+ "react-editor-js": "^2.1.0",
29
+ "react-hook-form": "^7.48.2",
16
30
  "remixicon": "^3.4.0",
17
31
  "typescript": "^4.5.5",
18
32
  "uid": "^2.0.2"