@team-monolith/cds 1.125.1 → 1.126.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.
- package/dist/components/Button.d.ts +0 -2
- package/dist/components/Button.js +3 -3
- package/dist/components/FileTypeAlertDialog.js +2 -2
- package/dist/patterns/Dropdown/Dropdown.d.ts +0 -2
- package/dist/patterns/Dropdown/Dropdown.js +2 -3
- package/dist/patterns/LexicalEditor/components/FileSelectInput.d.ts +0 -1
- package/dist/patterns/LexicalEditor/components/FileSelectInput.js +2 -2
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormIconAndLabel.js +1 -1
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/SettingForm.js +1 -1
- package/dist/patterns/LexicalEditor/nodes/SheetInputNode/SettingForm.js +1 -1
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js +1 -1
- package/package.json +1 -1
|
@@ -214,7 +214,7 @@ const SIZE_TO_LABEL_STYLE = {
|
|
|
214
214
|
* [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=20-173&t=cXcCv3QijbX7MkoC-0)
|
|
215
215
|
*/
|
|
216
216
|
export const Button = React.forwardRef(function Button(props, ref) {
|
|
217
|
-
const { className, component: Component = "button", disabled, color, size, startIcon, endIcon, label, fullWidth,
|
|
217
|
+
const { className, component: Component = "button", disabled, color, size, startIcon, endIcon, label, fullWidth, loading = false } = props, other = __rest(props, ["className", "component", "disabled", "color", "size", "startIcon", "endIcon", "label", "fullWidth", "loading"]);
|
|
218
218
|
const theme = useTheme();
|
|
219
219
|
return (_jsxs(Component, Object.assign({ type: Component === "button" || Component === "input" ? "button" : undefined }, other, { className: [buttonClasses.root, className].filter(Boolean).join(" "), ref: ref, css: [
|
|
220
220
|
css `
|
|
@@ -247,10 +247,10 @@ export const Button = React.forwardRef(function Button(props, ref) {
|
|
|
247
247
|
`,
|
|
248
248
|
COLOR_TO_BUTTON_STYLE(theme, color, Boolean(disabled || loading)),
|
|
249
249
|
SIZE_TO_BUTTON_STYLE[size],
|
|
250
|
-
], disabled: disabled || loading, children: [loading ? _jsx(Spinner, {}) : startIcon, label && (_jsx(Label, { className: buttonClasses.label, size: size,
|
|
250
|
+
], disabled: disabled || loading, children: [loading ? _jsx(Spinner, {}) : startIcon, label && (_jsx(Label, { className: buttonClasses.label, size: size, children: label })), endIcon] })));
|
|
251
251
|
});
|
|
252
252
|
const Label = styled.span `
|
|
253
|
-
font-weight:
|
|
253
|
+
font-weight: 700;
|
|
254
254
|
white-space: nowrap;
|
|
255
255
|
${({ size }) => SIZE_TO_LABEL_STYLE[size]}
|
|
256
256
|
`;
|
|
@@ -21,8 +21,8 @@ export function FileTypeAlertDialog(props) {
|
|
|
21
21
|
color: ${theme.color.background.danger};
|
|
22
22
|
` }), children: [_jsx(AlertDialogTitle, { className: fileTypeAlertDialogClasses.title, css: css `
|
|
23
23
|
font-weight: 700;
|
|
24
|
-
`, onClose: onClose, children: t("파일 형식을 확인해주세요.") }), _jsx(AlertDialogContent, { className: fileTypeAlertDialogClasses.content, children: content }), _jsxs(AlertDialogActions, { className: fileTypeAlertDialogClasses.actions, children: [_jsx(Button, { color: "grey", label: t("닫기", { context: "다이얼로그" }), size: "medium", onClick: onClose
|
|
24
|
+
`, onClose: onClose, children: t("파일 형식을 확인해주세요.") }), _jsx(AlertDialogContent, { className: fileTypeAlertDialogClasses.content, children: content }), _jsxs(AlertDialogActions, { className: fileTypeAlertDialogClasses.actions, children: [_jsx(Button, { color: "grey", label: t("닫기", { context: "다이얼로그" }), size: "medium", onClick: onClose }), _jsx(Button, { color: "primary", label: t("다시 업로드"), size: "medium", onClick: () => {
|
|
25
25
|
onClose();
|
|
26
26
|
openFileBrowser();
|
|
27
|
-
}
|
|
27
|
+
} })] })] }));
|
|
28
28
|
}
|
|
@@ -19,14 +19,13 @@ import { DropdownMenu } from "./DropdownMenu";
|
|
|
19
19
|
*/
|
|
20
20
|
const Dropdown = forwardRef(function Dropdown(props, ref) {
|
|
21
21
|
var _a;
|
|
22
|
-
const { className, component: Component = "div", disabled, color = "primary", size = "medium",
|
|
22
|
+
const { className, component: Component = "div", disabled, color = "primary", size = "medium", startIcon, endIcon = _jsx(ArrowDownSFillIcon, {}), buttonCss, label, onClick, menuProps = {}, children, closeOnItemClick } = props, other = __rest(props, ["className", "component", "disabled", "color", "size", "startIcon", "endIcon", "buttonCss", "label", "onClick", "menuProps", "children", "closeOnItemClick"]);
|
|
23
23
|
const buttonProps = Object.assign(Object.assign({}, props.buttonProps), { disabled,
|
|
24
24
|
color,
|
|
25
25
|
size,
|
|
26
26
|
startIcon,
|
|
27
27
|
endIcon,
|
|
28
|
-
label
|
|
29
|
-
bold });
|
|
28
|
+
label });
|
|
30
29
|
const menuRef = useRef(null);
|
|
31
30
|
const isControlled = menuProps.open !== undefined;
|
|
32
31
|
const [open, setOpen] = useState(false);
|
|
@@ -38,7 +38,7 @@ const MAX_FILE_SIZE = 1 * 1024 * 1024 * 1024; // 1GB
|
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
40
|
export function FileSelectInput(props) {
|
|
41
|
-
const { onChange, fileType, onFileSubmit
|
|
41
|
+
const { onChange, fileType, onFileSubmit } = props;
|
|
42
42
|
const [errorMessage, setErrorMessage] = useState(null);
|
|
43
43
|
const inputRef = useRef(null);
|
|
44
44
|
const { t } = useTranslation();
|
|
@@ -82,7 +82,7 @@ export function FileSelectInput(props) {
|
|
|
82
82
|
return (_jsxs(_Fragment, { children: [_jsxs(Container, { children: [_jsx(Button, { fullWidth: true, color: "grey", size: "medium", label: t("파일 선택하기"), onClick: () => {
|
|
83
83
|
var _a;
|
|
84
84
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
85
|
-
}, startIcon: _jsx(UploadLineIcon, {})
|
|
85
|
+
}, startIcon: _jsx(UploadLineIcon, {}) }), _jsx(IconAndErrorMessage, { children: errorMessage && (_jsxs(_Fragment, { children: [_jsx(FileWarningLineIcon, { css: css `
|
|
86
86
|
padding: 0 4px;
|
|
87
87
|
width: 24px;
|
|
88
88
|
height: 24px;
|
|
@@ -14,7 +14,7 @@ export function FormIconAndLabel(props) {
|
|
|
14
14
|
const { t } = useTranslation();
|
|
15
15
|
return (_jsx(Controller, { control: control, name: "iconType", render: ({ field: { value, onChange } }) => {
|
|
16
16
|
const { startIcon, title, icons } = getIconData(value, theme, t);
|
|
17
|
-
return (_jsxs(_Fragment, { children: [_jsx(Dropdown, { label: t("아이콘: {{title}}", { title }), size: "small", color: "grey", closeOnItemClick: true,
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(Dropdown, { label: t("아이콘: {{title}}", { title }), size: "small", color: "grey", closeOnItemClick: true, startIcon: startIcon, endIcon: _jsx(ArrowDownSFillIcon, {}), menuProps: {
|
|
18
18
|
menuCss: css `
|
|
19
19
|
width: 216px;
|
|
20
20
|
`,
|
|
@@ -53,7 +53,7 @@ export function SettingForm(props) {
|
|
|
53
53
|
question: { text: getTexts(t, "placeholderEvaluationItem") },
|
|
54
54
|
selectedLabelIndex: null,
|
|
55
55
|
});
|
|
56
|
-
} })] }), _jsxs(Right, { children: [_jsx(Label, { children: t("아이콘, 레이블") }), _jsx(FormIconAndLabel, { control: control, labelsLength: labels.length })] })] }), _jsxs(Buttons, { children: [_jsx(Button, { color: "grey", size: "xsmall", label: t("닫기", { context: "렉시컬 도구 설정창" }), onClick: onClose }), _jsx(Button, { color: "primary", size: "xsmall", label: t("이대로 넣기", { context: "렉시컬 도구 설정창" }),
|
|
56
|
+
} })] }), _jsxs(Right, { children: [_jsx(Label, { children: t("아이콘, 레이블") }), _jsx(FormIconAndLabel, { control: control, labelsLength: labels.length })] })] }), _jsxs(Buttons, { children: [_jsx(Button, { color: "grey", size: "xsmall", label: t("닫기", { context: "렉시컬 도구 설정창" }), onClick: onClose }), _jsx(Button, { color: "primary", size: "xsmall", label: t("이대로 넣기", { context: "렉시컬 도구 설정창" }), type: "submit" })] })] }));
|
|
57
57
|
}
|
|
58
58
|
const Form = styled.form(({ theme }) => css `
|
|
59
59
|
display: flex;
|
|
@@ -39,7 +39,7 @@ export function SettingForm(props) {
|
|
|
39
39
|
: t("단답형 입력 칸", { context: "렉시컬 단답형/서술형 도구" })] }), _jsx(Content, { children: _jsxs(FormArea, { children: [_jsxs(Label, { children: [t("자리 표시자", { context: "렉시컬 단답형/서술형 도구" }), _jsx(Tooltip, { text: getTexts(t, "descriptionDefaultInputText"), placement: "top", children: _jsx(QuestionFillIcon, { css: css `
|
|
40
40
|
width: 12px;
|
|
41
41
|
height: 12px;
|
|
42
|
-
` }) })] }), _jsx(Controller, { name: "placeholder", control: control, render: ({ field: { value, onChange } }) => (_jsx(Input, { size: "small", color: "default", value: value, onChange: onChange, placeholder: getTexts(t, "exampleEnterHere") })) })] }) }), _jsxs(Buttons, { children: [_jsx(Button, { color: "grey", size: "xsmall", label: t("닫기", { context: "렉시컬 도구 설정창" }), onClick: onClose }), _jsx(Button, { color: "primary", size: "xsmall", label: t("이대로 넣기", { context: "렉시컬 도구 설정창" }),
|
|
42
|
+
` }) })] }), _jsx(Controller, { name: "placeholder", control: control, render: ({ field: { value, onChange } }) => (_jsx(Input, { size: "small", color: "default", value: value, onChange: onChange, placeholder: getTexts(t, "exampleEnterHere") })) })] }) }), _jsxs(Buttons, { children: [_jsx(Button, { color: "grey", size: "xsmall", label: t("닫기", { context: "렉시컬 도구 설정창" }), onClick: onClose }), _jsx(Button, { color: "primary", size: "xsmall", label: t("이대로 넣기", { context: "렉시컬 도구 설정창" }), type: "submit" })] })] }));
|
|
43
43
|
}
|
|
44
44
|
const Form = styled.form(({ theme }) => css `
|
|
45
45
|
display: flex;
|
package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js
CHANGED
|
@@ -86,7 +86,7 @@ export function SettingForm(props) {
|
|
|
86
86
|
min-width: 14px;
|
|
87
87
|
width: 14px;
|
|
88
88
|
height: 14px;
|
|
89
|
-
` }), t("다중 선택을 허용한 문제에는 여러 선택지를 고를 수 있다는 안내가 제공됩니다.")] }))] })] }), _jsxs(Buttons, { children: [_jsx(Button, { color: "grey", size: "xsmall", label: t("닫기", { context: "렉시컬 도구 설정창" }), onClick: onClose }), _jsx(Button, { color: "primary", size: "xsmall", label: t("이대로 넣기", { context: "렉시컬 도구 설정창" }),
|
|
89
|
+
` }), t("다중 선택을 허용한 문제에는 여러 선택지를 고를 수 있다는 안내가 제공됩니다.")] }))] })] }), _jsxs(Buttons, { children: [_jsx(Button, { color: "grey", size: "xsmall", label: t("닫기", { context: "렉시컬 도구 설정창" }), onClick: onClose }), _jsx(Button, { color: "primary", size: "xsmall", label: t("이대로 넣기", { context: "렉시컬 도구 설정창" }), type: "submit" })] })] }));
|
|
90
90
|
}
|
|
91
91
|
const Form = styled.form(({ theme }) => css `
|
|
92
92
|
display: flex;
|