@team-monolith/cds 0.4.3 → 0.4.5
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/Banner.js +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/InputBase.js +6 -6
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/package.json +2 -3
- package/@types/emotion.d.ts +0 -70
- package/@types/svg.d.ts +0 -10
|
@@ -50,7 +50,7 @@ var Banner = React.forwardRef(function (props, ref) {
|
|
|
50
50
|
css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n color: ", ";\n line-height: 125%;\n "], ["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n color: ", ";\n line-height: 125%;\n "])), COLOR.white),
|
|
51
51
|
COLOR_TO_STYLE(theme, color),
|
|
52
52
|
fullWidth
|
|
53
|
-
? css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "]))) : css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-radius: 12px;\n width: fit-content;\n
|
|
53
|
+
? css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "]))) : css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-radius: 12px;\n width: fit-content;\n "], ["\n border-radius: 12px;\n width: fit-content;\n "]))),
|
|
54
54
|
] }, { children: [icon && _jsx(IconDiv, { children: icon }), _jsxs(TextContainer, __assign({ setPaddingRight: !close && !buttonLabel }, { children: [headline && _jsx(HeadlineDiv, { children: headline }), content && _jsx("div", { children: content })] })), buttonLabel && (_jsx(BannerButton, __assign({ onClick: onButtonClick }, { children: buttonLabel }))), close && (_jsx(CloseButton, __assign({ onClick: onClose }, { children: _jsx(StyledCloseFillIcon, {}) })))] })));
|
|
55
55
|
});
|
|
56
56
|
var StyledCloseFillIcon = styled(CloseFillIcon)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: block;\n padding: 14px;\n width: 20px;\n height: 20px;\n\n color: currentColor;\n"], ["\n display: block;\n padding: 14px;\n width: 20px;\n height: 20px;\n\n color: currentColor;\n"])));
|
package/dist/components/Input.js
CHANGED
|
@@ -54,7 +54,7 @@ var Input = React.forwardRef(function (props, ref) {
|
|
|
54
54
|
var _className = props.className, inputBaseProps = __rest(props, ["className"]);
|
|
55
55
|
return (_jsxs(InputWrapper, __assign({ className: props.className, size: props.size, fullWidth: props.fullWidth, ref: ref }, other, { children: [label ? (_jsxs(Label, __assign({ disabled: props.disabled }, { children: [label, " ", _jsx(InputBase, __assign({}, inputBaseProps))] }))) : (_jsx(InputBase, __assign({}, inputBaseProps))), hintText && (_jsxs(Hint, __assign({ color: props.color, disabled: props.disabled }, { children: [hintIcon, hintText] })))] })));
|
|
56
56
|
});
|
|
57
|
-
var InputWrapper = styled.span(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display:
|
|
57
|
+
var InputWrapper = styled.span(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n ", "\n ", "\n\n position: relative;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 8px;\n ", "\n ", "\n\n position: relative;\n"])), function (_a) {
|
|
58
58
|
var size = _a.size;
|
|
59
59
|
return SIZE_TO_FONT_STYLES(size);
|
|
60
60
|
}, function (_a) {
|
|
@@ -29,20 +29,20 @@ var COLOR_TO_INPUT_STYLES = function (theme, color, disabled) {
|
|
|
29
29
|
activeSuccess: css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n border: 2px solid ", ";\n background: ", ";\n color: ", ";\n "], ["\n border: 2px solid ", ";\n background: ", ";\n color: ", ";\n "])), theme.color.foreground.success, theme.color.background.neutralBase, theme.color.foreground.neutralBase),
|
|
30
30
|
}[color];
|
|
31
31
|
};
|
|
32
|
-
var SIZE_TO_STYLES = function (size) {
|
|
32
|
+
var SIZE_TO_STYLES = function (size, fullWidth) {
|
|
33
33
|
return ({
|
|
34
|
-
small: css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding-top: 8px;\n padding-bottom: 8px;\n
|
|
35
|
-
medium: css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n padding-top: 12px;\n padding-bottom: 12px;\n
|
|
36
|
-
large: css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n padding-top: 14px;\n padding-bottom: 14px;\n
|
|
34
|
+
small: css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding-top: 8px;\n padding-bottom: 8px;\n ", ";\n height: 36px;\n "], ["\n padding-top: 8px;\n padding-bottom: 8px;\n ", ";\n height: 36px;\n "])), !fullWidth && "max-width: 300px"),
|
|
35
|
+
medium: css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n padding-top: 12px;\n padding-bottom: 12px;\n ", ";\n height: 48px;\n "], ["\n padding-top: 12px;\n padding-bottom: 12px;\n ", ";\n height: 48px;\n "])), !fullWidth && "max-width: 375px"),
|
|
36
|
+
large: css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n padding-top: 14px;\n padding-bottom: 14px;\n ", ";\n height: 56px;\n "], ["\n padding-top: 14px;\n padding-bottom: 14px;\n ", ";\n height: 56px;\n "])), !fullWidth && "max-width: 375px"),
|
|
37
37
|
}[size]);
|
|
38
38
|
};
|
|
39
39
|
export function InputBase(props) {
|
|
40
40
|
var className = props.className, color = props.color, size = props.size, placeholder = props.placeholder, _a = props.disabled, disabled = _a === void 0 ? false : _a, startIcon = props.startIcon, startLabel = props.startLabel, endLabel = props.endLabel, endIcon = props.endIcon, inputProps = props.inputProps, inputRef = props.inputRef, _b = props.fullWidth, fullWidth = _b === void 0 ? false : _b, onChange = props.onChange, onClear = props.onClear, defaultValue = props.defaultValue, value = props.value;
|
|
41
|
-
return (_jsxs(InputContainer, __assign({ className: className, disabled: disabled, color: color, inputSize: size, fullWidth: fullWidth }, { children: [startIcon, startLabel && _jsx("span", { children: startLabel }), _jsx(StyledInput, __assign({}, inputProps, { ref: inputRef, onChange: onChange, placeholder: placeholder, disabled: disabled, defaultValue: defaultValue, value: value })), endLabel && _jsx("span", { children: endLabel }), endIcon, onClear && (_jsx(ClearButton, __assign({ onClick: onClear, disabled: disabled, tabIndex: -1 }, { children: _jsx(CloseCircleFillIcon, {}) })))] })));
|
|
41
|
+
return (_jsxs(InputContainer, __assign({ className: className, disabled: disabled, color: color, inputSize: size, fullWidth: fullWidth }, { children: [startIcon, startLabel && _jsx("span", { children: startLabel }), _jsx(StyledInput, __assign({}, inputProps, { ref: inputRef, onChange: onChange, placeholder: placeholder, disabled: disabled, defaultValue: defaultValue, value: value })), endLabel && _jsx("span", { children: endLabel }), endIcon, onClear && (_jsx(ClearButton, __assign({ type: "button", onClick: onClear, disabled: disabled, tabIndex: -1 }, { children: _jsx(CloseCircleFillIcon, {}) })))] })));
|
|
42
42
|
}
|
|
43
43
|
var InputContainer = styled.div(function (_a) {
|
|
44
44
|
var theme = _a.theme, color = _a.color, inputSize = _a.inputSize, disabled = _a.disabled, fullWidth = _a.fullWidth;
|
|
45
|
-
return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 16px;\n\n box-sizing: border-box;\n padding: 14px 16px;\n border-radius: 8px;\n ", "\n ", "\n ", " // InputWrapper\uC758 width\uB97C \uB530\uB985\uB2C8\uB2E4.\n "], ["\n display: flex;\n align-items: center;\n gap: 16px;\n\n box-sizing: border-box;\n padding: 14px 16px;\n border-radius: 8px;\n ", "\n ", "\n ", " // InputWrapper\uC758 width\uB97C \uB530\uB985\uB2C8\uB2E4.\n "])), COLOR_TO_INPUT_STYLES(theme, color, disabled), SIZE_TO_STYLES(inputSize), fullWidth && "width: inherit;");
|
|
45
|
+
return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 16px;\n\n box-sizing: border-box;\n padding: 14px 16px;\n border-radius: 8px;\n ", "\n ", "\n ", " // InputWrapper\uC758 width\uB97C \uB530\uB985\uB2C8\uB2E4.\n "], ["\n display: flex;\n align-items: center;\n gap: 16px;\n\n box-sizing: border-box;\n padding: 14px 16px;\n border-radius: 8px;\n ", "\n ", "\n ", " // InputWrapper\uC758 width\uB97C \uB530\uB985\uB2C8\uB2E4.\n "])), COLOR_TO_INPUT_STYLES(theme, color, disabled), SIZE_TO_STYLES(inputSize, fullWidth), fullWidth && "width: inherit;");
|
|
46
46
|
});
|
|
47
47
|
var StyledInput = styled.input(function (_a) {
|
|
48
48
|
var theme = _a.theme;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@team-monolith/cds",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"typescript": "^4.5.5"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
|
-
"dist/**/*"
|
|
20
|
-
"@types/**/*"
|
|
19
|
+
"dist/**/*"
|
|
21
20
|
],
|
|
22
21
|
"scripts": {
|
|
23
22
|
"clean": "rimraf dist",
|
package/@types/emotion.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import "@emotion/react";
|
|
2
|
-
|
|
3
|
-
interface CodleColors {
|
|
4
|
-
background: {
|
|
5
|
-
neutralBase: string;
|
|
6
|
-
neutralAlt: string;
|
|
7
|
-
neutralAltActive: string;
|
|
8
|
-
neutralAltDisabled: string;
|
|
9
|
-
primary: string;
|
|
10
|
-
primaryActive: string;
|
|
11
|
-
primaryDisabled: string;
|
|
12
|
-
secondary: string;
|
|
13
|
-
secondaryActive: string;
|
|
14
|
-
secondaryDisabled: string;
|
|
15
|
-
danger: string;
|
|
16
|
-
dangerActive: string;
|
|
17
|
-
dangerDisabled: string;
|
|
18
|
-
success: string;
|
|
19
|
-
successActive: string;
|
|
20
|
-
successDisabled: string;
|
|
21
|
-
info: string;
|
|
22
|
-
infoActive: string;
|
|
23
|
-
infoDisabled: string;
|
|
24
|
-
warning: string;
|
|
25
|
-
warningActive: string;
|
|
26
|
-
warningDisabled: string;
|
|
27
|
-
};
|
|
28
|
-
foreground: {
|
|
29
|
-
neutralBase: string;
|
|
30
|
-
neutralBaseDisabled: string;
|
|
31
|
-
neutralAlt: string;
|
|
32
|
-
neutralAltDisabled: string;
|
|
33
|
-
primary: string;
|
|
34
|
-
primaryDisabled: string;
|
|
35
|
-
secondary: string;
|
|
36
|
-
secondaryDisabled: string;
|
|
37
|
-
danger: string;
|
|
38
|
-
dangerDisabled: string;
|
|
39
|
-
success: string;
|
|
40
|
-
successDisabled: string;
|
|
41
|
-
info: string;
|
|
42
|
-
infoDisabled: string;
|
|
43
|
-
warning: string;
|
|
44
|
-
warningDisabled: string;
|
|
45
|
-
};
|
|
46
|
-
container: {
|
|
47
|
-
primaryContainer: string;
|
|
48
|
-
primaryOnContainer: string;
|
|
49
|
-
secondaryContainer: string;
|
|
50
|
-
secondaryOnContainer: string;
|
|
51
|
-
dangerContainer: string;
|
|
52
|
-
dangerOnContainer: string;
|
|
53
|
-
successContainer: string;
|
|
54
|
-
successOnContainer: string;
|
|
55
|
-
infoContainer: string;
|
|
56
|
-
infoOnContainer: string;
|
|
57
|
-
warningContainer: string;
|
|
58
|
-
warningOnContainer: string;
|
|
59
|
-
obsidianContainer: string;
|
|
60
|
-
obsidianOnContainer: string;
|
|
61
|
-
marbleContainer: string;
|
|
62
|
-
marbleOnContainer: string;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare module "@emotion/react" {
|
|
67
|
-
export interface Theme {
|
|
68
|
-
color: CodleColors;
|
|
69
|
-
}
|
|
70
|
-
}
|