@team-monolith/cds 1.99.5 → 1.99.7
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.js +1 -1
- package/dist/components/SquareButton.js +1 -1
- package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageComponent.js +2 -2
- package/dist/patterns/LexicalEditor/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +1 -1
- package/dist/patterns/SegmentedControl/SegmentedControlButton.js +1 -1
- package/package.json +1 -1
|
@@ -212,7 +212,7 @@ const SIZE_TO_LABEL_STYLE = {
|
|
|
212
212
|
export const Button = React.forwardRef(function Button(props, ref) {
|
|
213
213
|
const { className, component: Component = "button", disabled, color, size, startIcon, endIcon, label, fullWidth, bold = false, loading = false } = props, other = __rest(props, ["className", "component", "disabled", "color", "size", "startIcon", "endIcon", "label", "fullWidth", "bold", "loading"]);
|
|
214
214
|
const theme = useTheme();
|
|
215
|
-
return (_jsxs(Component, Object.assign({ type: "button" }, other, { className: className, ref: ref, css: [
|
|
215
|
+
return (_jsxs(Component, Object.assign({ type: Component === "a" ? undefined : "button" }, other, { className: className, ref: ref, css: [
|
|
216
216
|
css `
|
|
217
217
|
display: inline-flex;
|
|
218
218
|
align-items: center;
|
|
@@ -184,7 +184,7 @@ export const SquareButton = React.forwardRef(function SquareButton(props, ref) {
|
|
|
184
184
|
align-items: center;
|
|
185
185
|
gap: 8px;
|
|
186
186
|
width: ${fullWidth ? "100%" : "fit-content"};
|
|
187
|
-
` }, { children: [_jsx(Component, Object.assign({ type: "button" }, other, buttonProps, { ref: ref, css: [
|
|
187
|
+
` }, { children: [_jsx(Component, Object.assign({ type: Component === "a" ? undefined : "button" }, other, buttonProps, { ref: ref, css: [
|
|
188
188
|
COLOR_TO_BUTTON_STYLE(theme, color, Boolean(disabled || loading)),
|
|
189
189
|
SIZE_TO_BUTTON_STYLE[size],
|
|
190
190
|
css `
|
|
@@ -40,7 +40,7 @@ function LazyImage({ altText, className, imageRef, src, width, height, maxWidth:
|
|
|
40
40
|
// fixme: maxWidth를 수정할 수 있게 되면 원복합니다.
|
|
41
41
|
maxWidth: "100%",
|
|
42
42
|
width,
|
|
43
|
-
},
|
|
43
|
+
}, "aria-label": title, onClick: onClick, onError: onError, draggable: "false", role: onClick ? "button" : undefined }));
|
|
44
44
|
}
|
|
45
45
|
export function ImageComponent({ src, altText, nodeKey, width, height, maxWidth, resizable, }) {
|
|
46
46
|
const imageRef = useRef(null);
|
|
@@ -184,7 +184,7 @@ export function ImageComponent({ src, altText, nodeKey, width, height, maxWidth,
|
|
|
184
184
|
? `focused ${$isNodeSelection(selection) ? "draggable" : ""}`
|
|
185
185
|
: null, css: css `
|
|
186
186
|
cursor: pointer;
|
|
187
|
-
`, src: src, altText: altText, imageRef: imageRef, width: width, height: height, maxWidth: maxWidth, onError: () => setIsLoadError(true), onClick: () => window.open(src, "_blank"), title: "\uD074\uB9AD\uD574\uC11C \uC6D0\uBCF8 \uC774\uBBF8\uC9C0 \uBCF4\uAE30" })) })) })));
|
|
187
|
+
`, src: src, altText: altText, imageRef: imageRef, width: width, height: height, maxWidth: maxWidth, onError: () => setIsLoadError(true), onClick: () => window.open(src, "_blank"), title: "\uD074\uB9AD\uD574\uC11C \uC6D0\uBCF8 \uC774\uBBF8\uC9C0 \uBCF4\uAE30. \uC6D0\uBCF8 \uC774\uBBF8\uC9C0\uB294 \uC0C8 \uCC3D\uC5D0\uC11C \uC5F4\uB9BD\uB2C8\uB2E4." })) })) })));
|
|
188
188
|
}
|
|
189
189
|
return (_jsxs(_Fragment, { children: [_jsxs(EditContainer, { children: [_jsx(Suspense, Object.assign({ fallback: null }, { children: _jsx("div", Object.assign({ draggable: draggable, css: css `
|
|
190
190
|
// ImageResizer를 위한 relative 설정입니다.
|
|
@@ -151,7 +151,7 @@ export function FloatingLinkEditor(props) {
|
|
|
151
151
|
} }, { children: _jsx(CloseFillIcon, {}) })), _jsx(Button, Object.assign({ tabIndex: 0, onClick: (event) => {
|
|
152
152
|
event.preventDefault();
|
|
153
153
|
handleLinkSubmission();
|
|
154
|
-
} }, { children: _jsx(CheckLineIcon, {}) }))] })] })) : (_jsxs(_Fragment, { children: [_jsx(Link, Object.assign({ href: sanitizeUrl(linkUrl), target: "_blank", rel: "noopener noreferrer" }, { children: linkUrl })), _jsxs(Buttons, { children: [_jsx(Button, Object.assign({ tabIndex: 0, onClick: (event) => {
|
|
154
|
+
} }, { children: _jsx(CheckLineIcon, {}) }))] })] })) : (_jsxs(_Fragment, { children: [_jsx(Link, Object.assign({ href: sanitizeUrl(linkUrl), target: "_blank", rel: "noopener noreferrer", title: "\uC0C8 \uCC3D\uC5D0\uC11C \uC5F4\uAE30" }, { children: linkUrl })), _jsxs(Buttons, { children: [_jsx(Button, Object.assign({ tabIndex: 0, onClick: (event) => {
|
|
155
155
|
event.preventDefault();
|
|
156
156
|
setEditedLinkUrl(linkUrl);
|
|
157
157
|
setIsLinkEditMode(true);
|
|
@@ -32,7 +32,7 @@ export const SegmentedControlButton = React.forwardRef(function SegmentedControl
|
|
|
32
32
|
: context.value === props.value;
|
|
33
33
|
const { label } = other;
|
|
34
34
|
return (_jsx(StyledButton, Object.assign({}, other, { ref: ref, startIcon: typeof startIcon === "function" ? startIcon(isActive) : startIcon, endIcon: typeof endIcon === "function" ? endIcon(isActive) : endIcon, isActive: isActive, color: isActive ? "white" : "textNeutral", size: context.size, onClick: handleClick, disabled: context.disabled || props.disabled, title: isActive
|
|
35
|
-
?
|
|
35
|
+
? (typeof label === "string" ? `${label} 선택됨` : "선택됨")
|
|
36
36
|
: undefined })));
|
|
37
37
|
});
|
|
38
38
|
const StyledButton = styled(Button, {
|