@team-monolith/cds 1.42.0 → 1.43.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/CodleDesignSystemProvider.d.ts +111 -0
- package/dist/CodleDesignSystemProvider.js +117 -6
- package/dist/components/Banner.js +11 -5
- package/dist/components/Button.d.ts +2 -0
- package/dist/components/Button.js +23 -19
- package/dist/components/CheckboxInput.js +8 -6
- package/dist/components/RadioInput.js +10 -10
- package/dist/components/Spinner.d.ts +2 -0
- package/dist/components/Spinner.js +5 -0
- package/dist/components/SquareButton.d.ts +2 -0
- package/dist/components/SquareButton.js +29 -21
- package/dist/components/Switch.js +59 -36
- package/dist/components/Tag.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -110,6 +110,117 @@ export declare const light: {
|
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
|
+
export declare const dark: {
|
|
114
|
+
fontFamily: {
|
|
115
|
+
ui: string;
|
|
116
|
+
title: string;
|
|
117
|
+
};
|
|
118
|
+
color: {
|
|
119
|
+
background: {
|
|
120
|
+
neutralBase: string;
|
|
121
|
+
neutralBaseActive: string;
|
|
122
|
+
neutralBaseDisabled: string;
|
|
123
|
+
neutralAlt: string;
|
|
124
|
+
neutralAltActive: string;
|
|
125
|
+
neutralAltDisabled: string;
|
|
126
|
+
primary: string;
|
|
127
|
+
primaryActive: string;
|
|
128
|
+
primaryDisabled: string;
|
|
129
|
+
secondary: string;
|
|
130
|
+
secondaryActive: string;
|
|
131
|
+
secondaryDisabled: string;
|
|
132
|
+
danger: string;
|
|
133
|
+
dangerActive: string;
|
|
134
|
+
dangerDisabled: string;
|
|
135
|
+
success: string;
|
|
136
|
+
successActive: string;
|
|
137
|
+
successDisabled: string;
|
|
138
|
+
info: string;
|
|
139
|
+
infoActive: string;
|
|
140
|
+
infoDisabled: string;
|
|
141
|
+
warning: string;
|
|
142
|
+
warningActive: string;
|
|
143
|
+
warningDisabled: string;
|
|
144
|
+
inverse: string;
|
|
145
|
+
inverseActive: string;
|
|
146
|
+
inverseDisabled: string;
|
|
147
|
+
};
|
|
148
|
+
foreground: {
|
|
149
|
+
neutralBase: string;
|
|
150
|
+
neutralBaseActive: string;
|
|
151
|
+
neutralBaseDisabled: string;
|
|
152
|
+
neutralAlt: string;
|
|
153
|
+
neutralAltActive: string;
|
|
154
|
+
neutralAltDisabled: string;
|
|
155
|
+
primary: string;
|
|
156
|
+
primaryActive: string;
|
|
157
|
+
primaryDisabled: string;
|
|
158
|
+
secondary: string;
|
|
159
|
+
secondaryActive: string;
|
|
160
|
+
secondaryDisabled: string;
|
|
161
|
+
danger: string;
|
|
162
|
+
dangerActive: string;
|
|
163
|
+
dangerDisabled: string;
|
|
164
|
+
success: string;
|
|
165
|
+
successActive: string;
|
|
166
|
+
successDisabled: string;
|
|
167
|
+
info: string;
|
|
168
|
+
infoActive: string;
|
|
169
|
+
infoDisabled: string;
|
|
170
|
+
warning: string;
|
|
171
|
+
warningActive: string;
|
|
172
|
+
warningDisabled: string;
|
|
173
|
+
};
|
|
174
|
+
container: {
|
|
175
|
+
blueContainer: string;
|
|
176
|
+
blueOnContainer: string;
|
|
177
|
+
orangeContainer: string;
|
|
178
|
+
orangeOnContainer: string;
|
|
179
|
+
redContainer: string;
|
|
180
|
+
redOnContainer: string;
|
|
181
|
+
greenContainer: string;
|
|
182
|
+
greenOnContainer: string;
|
|
183
|
+
tealContainer: string;
|
|
184
|
+
tealOnContainer: string;
|
|
185
|
+
yellowContainer: string;
|
|
186
|
+
yellowOnContainer: string;
|
|
187
|
+
obsidianContainer: string;
|
|
188
|
+
obsidianOnContainer: string;
|
|
189
|
+
marbleContainer: string;
|
|
190
|
+
marbleOnContainer: string;
|
|
191
|
+
};
|
|
192
|
+
brand: {
|
|
193
|
+
brandOriginal: string;
|
|
194
|
+
brandAlt: string;
|
|
195
|
+
brandAccent: string;
|
|
196
|
+
brandFaded: string;
|
|
197
|
+
pdf: string;
|
|
198
|
+
pdfAlt: string;
|
|
199
|
+
quiz: string;
|
|
200
|
+
quizAlt: string;
|
|
201
|
+
python: string;
|
|
202
|
+
pythonAlt: string;
|
|
203
|
+
embedded: string;
|
|
204
|
+
embeddedAlt: string;
|
|
205
|
+
board: string;
|
|
206
|
+
boardAlt: string;
|
|
207
|
+
scratch: string;
|
|
208
|
+
scratchAlt: string;
|
|
209
|
+
entry: string;
|
|
210
|
+
entryAlt: string;
|
|
211
|
+
video: string;
|
|
212
|
+
videoAlt: string;
|
|
213
|
+
};
|
|
214
|
+
blanket: {
|
|
215
|
+
neutral: string;
|
|
216
|
+
neutralLight: string;
|
|
217
|
+
neutralHeavy: string;
|
|
218
|
+
inverse: string;
|
|
219
|
+
inverseLight: string;
|
|
220
|
+
inverseHeavy: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
113
224
|
interface CodleDesignSystemContext {
|
|
114
225
|
lexical?: {
|
|
115
226
|
uploadByFile: (file: File) => Promise<string>;
|
|
@@ -107,12 +107,123 @@ export const light = {
|
|
|
107
107
|
videoAlt: "#CEC8DE",
|
|
108
108
|
},
|
|
109
109
|
blanket: {
|
|
110
|
-
neutral:
|
|
111
|
-
neutralLight:
|
|
112
|
-
neutralHeavy:
|
|
113
|
-
inverse:
|
|
114
|
-
inverseLight:
|
|
115
|
-
inverseHeavy:
|
|
110
|
+
neutral: COLOR.alpha030,
|
|
111
|
+
neutralLight: COLOR.alpha015,
|
|
112
|
+
neutralHeavy: COLOR.alpha065,
|
|
113
|
+
inverse: COLOR.alphaf50,
|
|
114
|
+
inverseLight: COLOR.alphaf20,
|
|
115
|
+
inverseHeavy: COLOR.alphaf10,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
export const dark = {
|
|
120
|
+
fontFamily: {
|
|
121
|
+
ui: FONT.pretendard,
|
|
122
|
+
title: FONT.naumSquareNeo,
|
|
123
|
+
},
|
|
124
|
+
color: {
|
|
125
|
+
background: {
|
|
126
|
+
neutralBase: COLOR.black,
|
|
127
|
+
neutralBaseActive: COLOR.grey08,
|
|
128
|
+
neutralBaseDisabled: COLOR.grey09,
|
|
129
|
+
neutralAlt: COLOR.grey08,
|
|
130
|
+
neutralAltActive: COLOR.grey07,
|
|
131
|
+
neutralAltDisabled: COLOR.grey09,
|
|
132
|
+
primary: COLOR.blue04,
|
|
133
|
+
primaryActive: COLOR.blue03,
|
|
134
|
+
primaryDisabled: COLOR.blue07,
|
|
135
|
+
secondary: COLOR.orange04,
|
|
136
|
+
secondaryActive: COLOR.orange03,
|
|
137
|
+
secondaryDisabled: COLOR.orange08,
|
|
138
|
+
danger: COLOR.red03,
|
|
139
|
+
dangerActive: COLOR.red02,
|
|
140
|
+
dangerDisabled: COLOR.red09,
|
|
141
|
+
success: COLOR.green04,
|
|
142
|
+
successActive: COLOR.green03,
|
|
143
|
+
successDisabled: COLOR.green08,
|
|
144
|
+
info: COLOR.teal03,
|
|
145
|
+
infoActive: COLOR.teal02,
|
|
146
|
+
infoDisabled: COLOR.teal09,
|
|
147
|
+
warning: COLOR.yellow03,
|
|
148
|
+
warningActive: COLOR.yellow02,
|
|
149
|
+
warningDisabled: COLOR.yellow09,
|
|
150
|
+
inverse: COLOR.white,
|
|
151
|
+
inverseActive: COLOR.grey03,
|
|
152
|
+
inverseDisabled: COLOR.grey07,
|
|
153
|
+
},
|
|
154
|
+
foreground: {
|
|
155
|
+
neutralBase: COLOR.white,
|
|
156
|
+
neutralBaseActive: COLOR.grey02,
|
|
157
|
+
neutralBaseDisabled: COLOR.grey04,
|
|
158
|
+
neutralAlt: COLOR.black,
|
|
159
|
+
neutralAltActive: COLOR.grey08,
|
|
160
|
+
neutralAltDisabled: COLOR.grey02,
|
|
161
|
+
primary: COLOR.blue04,
|
|
162
|
+
primaryActive: COLOR.blue03,
|
|
163
|
+
primaryDisabled: COLOR.blue07,
|
|
164
|
+
secondary: COLOR.orange04,
|
|
165
|
+
secondaryActive: COLOR.orange03,
|
|
166
|
+
secondaryDisabled: COLOR.orange07,
|
|
167
|
+
danger: COLOR.red03,
|
|
168
|
+
dangerActive: COLOR.red02,
|
|
169
|
+
dangerDisabled: COLOR.red07,
|
|
170
|
+
success: COLOR.green04,
|
|
171
|
+
successActive: COLOR.green03,
|
|
172
|
+
successDisabled: COLOR.green07,
|
|
173
|
+
info: COLOR.teal03,
|
|
174
|
+
infoActive: COLOR.teal02,
|
|
175
|
+
infoDisabled: COLOR.teal07,
|
|
176
|
+
warning: COLOR.yellow03,
|
|
177
|
+
warningActive: COLOR.yellow02,
|
|
178
|
+
warningDisabled: COLOR.yellow07,
|
|
179
|
+
},
|
|
180
|
+
container: {
|
|
181
|
+
blueContainer: COLOR.blue09,
|
|
182
|
+
blueOnContainer: COLOR.blue02,
|
|
183
|
+
orangeContainer: COLOR.orange09,
|
|
184
|
+
orangeOnContainer: COLOR.orange02,
|
|
185
|
+
redContainer: COLOR.red09,
|
|
186
|
+
redOnContainer: COLOR.red02,
|
|
187
|
+
greenContainer: COLOR.green09,
|
|
188
|
+
greenOnContainer: COLOR.green02,
|
|
189
|
+
tealContainer: COLOR.teal09,
|
|
190
|
+
tealOnContainer: COLOR.teal02,
|
|
191
|
+
yellowContainer: COLOR.yellow08,
|
|
192
|
+
yellowOnContainer: COLOR.yellow02,
|
|
193
|
+
obsidianContainer: COLOR.grey07,
|
|
194
|
+
obsidianOnContainer: COLOR.grey03,
|
|
195
|
+
marbleContainer: COLOR.grey03,
|
|
196
|
+
marbleOnContainer: COLOR.grey07,
|
|
197
|
+
},
|
|
198
|
+
brand: {
|
|
199
|
+
brandOriginal: COLOR.blue06,
|
|
200
|
+
brandAlt: COLOR.blue04,
|
|
201
|
+
brandAccent: COLOR.blue03,
|
|
202
|
+
brandFaded: COLOR.blue07,
|
|
203
|
+
pdf: "#FF5850",
|
|
204
|
+
pdfAlt: "#800700",
|
|
205
|
+
quiz: "#F889AA",
|
|
206
|
+
quizAlt: "#760A27",
|
|
207
|
+
python: "#3E88FF",
|
|
208
|
+
pythonAlt: "#002666",
|
|
209
|
+
embedded: "#7C8597",
|
|
210
|
+
embeddedAlt: "#434956",
|
|
211
|
+
board: "#42DB88",
|
|
212
|
+
boardAlt: "#11552D",
|
|
213
|
+
scratch: "#FF9D3E",
|
|
214
|
+
scratchAlt: "#663000",
|
|
215
|
+
entry: "#32D27D",
|
|
216
|
+
entryAlt: "#135330",
|
|
217
|
+
video: "#5F32DE",
|
|
218
|
+
videoAlt: "#2D2640",
|
|
219
|
+
},
|
|
220
|
+
blanket: {
|
|
221
|
+
neutral: COLOR.alphaf20,
|
|
222
|
+
neutralLight: COLOR.alphaf10,
|
|
223
|
+
neutralHeavy: COLOR.alphaf50,
|
|
224
|
+
inverse: COLOR.alpha030,
|
|
225
|
+
inverseLight: COLOR.alpha015,
|
|
226
|
+
inverseHeavy: COLOR.alpha065,
|
|
116
227
|
},
|
|
117
228
|
},
|
|
118
229
|
};
|
|
@@ -52,9 +52,9 @@ const Banner = React.forwardRef((props, ref) => {
|
|
|
52
52
|
const theme = useTheme();
|
|
53
53
|
return (_jsxs(Component, Object.assign({}, other, { ref: ref, className: className, css: [
|
|
54
54
|
css `
|
|
55
|
-
box-sizing: border-box;
|
|
56
55
|
display: flex;
|
|
57
56
|
align-items: center;
|
|
57
|
+
padding: 0px 12px;
|
|
58
58
|
line-height: 125%;
|
|
59
59
|
background: ${COLOR_PALETTE(theme, color).background};
|
|
60
60
|
`,
|
|
@@ -67,6 +67,7 @@ const Banner = React.forwardRef((props, ref) => {
|
|
|
67
67
|
width: fit-content;
|
|
68
68
|
`,
|
|
69
69
|
] }, { children: [icon && (_jsx(IconDiv, Object.assign({ css: css `
|
|
70
|
+
align-self: ${headline && content ? "flex-start" : "center"};
|
|
70
71
|
color: ${COLOR_PALETTE(theme, color).headline};
|
|
71
72
|
` }, { children: icon }))), _jsxs(TextContainer, { children: [headline && (_jsx(HeadlineDiv, Object.assign({ css: css `
|
|
72
73
|
color: ${COLOR_PALETTE(theme, color).headline};
|
|
@@ -78,12 +79,17 @@ const Banner = React.forwardRef((props, ref) => {
|
|
|
78
79
|
> button {
|
|
79
80
|
color: ${COLOR_PALETTE(theme, color).content};
|
|
80
81
|
}
|
|
81
|
-
`, color: "icon", size: "
|
|
82
|
+
`, color: "icon", size: "small", icon: _jsx(CloseFillIcon, {}), onClick: onClose }))] })));
|
|
82
83
|
});
|
|
83
84
|
const IconDiv = styled.div `
|
|
84
85
|
display: flex;
|
|
85
|
-
align-items:
|
|
86
|
-
padding:
|
|
86
|
+
align-items: flex-start;
|
|
87
|
+
padding: 12px 0px;
|
|
88
|
+
|
|
89
|
+
svg {
|
|
90
|
+
width: 20px;
|
|
91
|
+
height: 20px;
|
|
92
|
+
}
|
|
87
93
|
`;
|
|
88
94
|
const HeadlineDiv = styled.div(({ theme }) => css `
|
|
89
95
|
font-family: ${theme.fontFamily.ui};
|
|
@@ -105,7 +111,7 @@ const TextContainer = styled.div `
|
|
|
105
111
|
display: flex;
|
|
106
112
|
flex-direction: column;
|
|
107
113
|
align-items: flex-start;
|
|
108
|
-
padding:
|
|
114
|
+
padding: 12px;
|
|
109
115
|
gap: 4px;
|
|
110
116
|
`;
|
|
111
117
|
export default Banner;
|
|
@@ -15,18 +15,19 @@ import { css, useTheme } from "@emotion/react";
|
|
|
15
15
|
import styled from "@emotion/styled";
|
|
16
16
|
import React from "react";
|
|
17
17
|
import { HOVER } from "../utils/hover";
|
|
18
|
+
import { Spinner } from "..";
|
|
18
19
|
const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
|
|
19
20
|
primary: css `
|
|
20
21
|
${disabled
|
|
21
22
|
? css `
|
|
22
|
-
color: ${theme.color.foreground.
|
|
23
|
+
color: ${theme.color.foreground.neutralAltDisabled};
|
|
23
24
|
background: ${theme.color.background.primaryDisabled};
|
|
24
25
|
`
|
|
25
26
|
: css `
|
|
26
27
|
color: ${theme.color.foreground.neutralAlt};
|
|
27
28
|
background: ${theme.color.background.primary};
|
|
28
29
|
${HOVER(css `
|
|
29
|
-
color: ${theme.color.foreground.
|
|
30
|
+
color: ${theme.color.foreground.neutralAltActive};
|
|
30
31
|
background: ${theme.color.background.primaryActive};
|
|
31
32
|
`)}
|
|
32
33
|
`}
|
|
@@ -34,7 +35,7 @@ const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
|
|
|
34
35
|
grey: css `
|
|
35
36
|
${disabled
|
|
36
37
|
? css `
|
|
37
|
-
background: ${theme.color.background.
|
|
38
|
+
background: ${theme.color.background.neutralAltDisabled};
|
|
38
39
|
color: ${theme.color.foreground.neutralBaseDisabled};
|
|
39
40
|
`
|
|
40
41
|
: css `
|
|
@@ -42,21 +43,21 @@ const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
|
|
|
42
43
|
color: ${theme.color.foreground.neutralBase};
|
|
43
44
|
${HOVER(css `
|
|
44
45
|
background: ${theme.color.background.neutralAltActive};
|
|
45
|
-
color: ${theme.color.foreground.
|
|
46
|
+
color: ${theme.color.foreground.neutralBaseActive};
|
|
46
47
|
`)}
|
|
47
48
|
`}
|
|
48
49
|
`,
|
|
49
50
|
danger: css `
|
|
50
51
|
${disabled
|
|
51
52
|
? css `
|
|
52
|
-
color: ${theme.color.foreground.
|
|
53
|
+
color: ${theme.color.foreground.neutralAltDisabled};
|
|
53
54
|
background: ${theme.color.background.dangerDisabled};
|
|
54
55
|
`
|
|
55
56
|
: css `
|
|
56
57
|
color: ${theme.color.foreground.neutralAlt};
|
|
57
58
|
background: ${theme.color.background.danger};
|
|
58
59
|
${HOVER(css `
|
|
59
|
-
color: ${theme.color.foreground.
|
|
60
|
+
color: ${theme.color.foreground.neutralAltActive};
|
|
60
61
|
background: ${theme.color.background.dangerActive};
|
|
61
62
|
`)}
|
|
62
63
|
`}
|
|
@@ -71,8 +72,8 @@ const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
|
|
|
71
72
|
background: none;
|
|
72
73
|
color: ${theme.color.foreground.neutralBase};
|
|
73
74
|
${HOVER(css `
|
|
74
|
-
background: ${theme.color.
|
|
75
|
-
color: ${theme.color.foreground.
|
|
75
|
+
background: ${theme.color.blanket.neutralLight};
|
|
76
|
+
color: ${theme.color.foreground.neutralBaseActive};
|
|
76
77
|
`)}
|
|
77
78
|
`}
|
|
78
79
|
`,
|
|
@@ -86,8 +87,8 @@ const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
|
|
|
86
87
|
background: none;
|
|
87
88
|
color: ${theme.color.foreground.danger};
|
|
88
89
|
${HOVER(css `
|
|
89
|
-
background: ${theme.color.
|
|
90
|
-
color: ${theme.color.foreground.
|
|
90
|
+
background: ${theme.color.blanket.neutralLight};
|
|
91
|
+
color: ${theme.color.foreground.dangerActive};
|
|
91
92
|
`)}
|
|
92
93
|
`}
|
|
93
94
|
`,
|
|
@@ -101,8 +102,8 @@ const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
|
|
|
101
102
|
background: none;
|
|
102
103
|
color: ${theme.color.foreground.primary};
|
|
103
104
|
${HOVER(css `
|
|
104
|
-
background: ${theme.color.
|
|
105
|
-
color: ${theme.color.foreground.
|
|
105
|
+
background: ${theme.color.blanket.neutralLight};
|
|
106
|
+
color: ${theme.color.foreground.primaryActive};
|
|
106
107
|
`)}
|
|
107
108
|
`}
|
|
108
109
|
`,
|
|
@@ -117,7 +118,7 @@ const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
|
|
|
117
118
|
color: ${theme.color.foreground.neutralAlt};
|
|
118
119
|
${HOVER(css `
|
|
119
120
|
background: ${theme.color.background.inverseActive};
|
|
120
|
-
color: ${theme.color.foreground.
|
|
121
|
+
color: ${theme.color.foreground.neutralAltActive};
|
|
121
122
|
`)}
|
|
122
123
|
`}
|
|
123
124
|
`,
|
|
@@ -132,7 +133,7 @@ const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
|
|
|
132
133
|
color: ${theme.color.foreground.neutralBase};
|
|
133
134
|
${HOVER(css `
|
|
134
135
|
background: ${theme.color.background.neutralAltActive};
|
|
135
|
-
color: ${theme.color.foreground.
|
|
136
|
+
color: ${theme.color.foreground.neutralBaseActive};
|
|
136
137
|
`)}
|
|
137
138
|
`}
|
|
138
139
|
`,
|
|
@@ -143,6 +144,7 @@ const SIZE_TO_BUTTON_STYLE = {
|
|
|
143
144
|
height: 56px;
|
|
144
145
|
padding: 0 20px;
|
|
145
146
|
gap: 10px;
|
|
147
|
+
border-radius: 12px;
|
|
146
148
|
|
|
147
149
|
svg {
|
|
148
150
|
width: 24px;
|
|
@@ -154,6 +156,7 @@ const SIZE_TO_BUTTON_STYLE = {
|
|
|
154
156
|
height: 48px;
|
|
155
157
|
padding: 0 16px;
|
|
156
158
|
gap: 8px;
|
|
159
|
+
border-radius: 10px;
|
|
157
160
|
|
|
158
161
|
svg {
|
|
159
162
|
width: 20px;
|
|
@@ -165,6 +168,7 @@ const SIZE_TO_BUTTON_STYLE = {
|
|
|
165
168
|
height: 36px;
|
|
166
169
|
padding: 0 12px;
|
|
167
170
|
gap: 8px;
|
|
171
|
+
border-radius: 8px;
|
|
168
172
|
|
|
169
173
|
svg {
|
|
170
174
|
width: 16px;
|
|
@@ -176,6 +180,7 @@ const SIZE_TO_BUTTON_STYLE = {
|
|
|
176
180
|
height: 28px;
|
|
177
181
|
padding: 0 8px;
|
|
178
182
|
gap: 4px;
|
|
183
|
+
border-radius: 6px;
|
|
179
184
|
|
|
180
185
|
svg {
|
|
181
186
|
width: 12px;
|
|
@@ -205,7 +210,7 @@ const SIZE_TO_LABEL_STYLE = {
|
|
|
205
210
|
* [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=20-173&t=cXcCv3QijbX7MkoC-0)
|
|
206
211
|
*/
|
|
207
212
|
const Button = React.forwardRef(function Button(props, ref) {
|
|
208
|
-
const { className, component: Component = "button", disabled, color, size, startIcon, endIcon, label, fullWidth, bold = false } = props, other = __rest(props, ["className", "component", "disabled", "color", "size", "startIcon", "endIcon", "label", "fullWidth", "bold"]);
|
|
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"]);
|
|
209
214
|
const theme = useTheme();
|
|
210
215
|
return (_jsxs(Component, Object.assign({ type: "button" }, other, { className: className, ref: ref, css: [
|
|
211
216
|
css `
|
|
@@ -215,9 +220,8 @@ const Button = React.forwardRef(function Button(props, ref) {
|
|
|
215
220
|
gap: 8px;
|
|
216
221
|
|
|
217
222
|
border: none;
|
|
218
|
-
border-radius: 8px;
|
|
219
223
|
|
|
220
|
-
${disabled
|
|
224
|
+
${disabled || loading
|
|
221
225
|
? css `
|
|
222
226
|
cursor: default;
|
|
223
227
|
pointer-events: none;
|
|
@@ -237,9 +241,9 @@ const Button = React.forwardRef(function Button(props, ref) {
|
|
|
237
241
|
flex-shrink: 0;
|
|
238
242
|
`};
|
|
239
243
|
`,
|
|
240
|
-
COLOR_TO_BUTTON_STYLE(theme, color, Boolean(disabled)),
|
|
244
|
+
COLOR_TO_BUTTON_STYLE(theme, color, Boolean(disabled || loading)),
|
|
241
245
|
SIZE_TO_BUTTON_STYLE[size],
|
|
242
|
-
], disabled: disabled }, { children: [startIcon, label && (_jsx(Label, Object.assign({ size: size, bold: bold }, { children: label }))), endIcon] })));
|
|
246
|
+
], disabled: disabled || loading }, { children: [loading ? _jsx(Spinner, {}) : startIcon, label && (_jsx(Label, Object.assign({ size: size, bold: bold }, { children: label }))), endIcon] })));
|
|
243
247
|
});
|
|
244
248
|
const Label = styled.span `
|
|
245
249
|
font-weight: ${({ bold }) => (bold ? 700 : 400)};
|
|
@@ -25,8 +25,8 @@ const CHECKBOX_ICON_STYLE = (theme, type, disabled) => {
|
|
|
25
25
|
${disabled
|
|
26
26
|
? css `
|
|
27
27
|
rect {
|
|
28
|
-
fill: ${theme.color.background.
|
|
29
|
-
stroke: ${theme.color.
|
|
28
|
+
fill: ${theme.color.background.neutralBaseDisabled};
|
|
29
|
+
stroke: ${theme.color.foreground.neutralBaseDisabled};
|
|
30
30
|
}
|
|
31
31
|
`
|
|
32
32
|
: css `
|
|
@@ -48,7 +48,7 @@ const CHECKBOX_ICON_STYLE = (theme, type, disabled) => {
|
|
|
48
48
|
${disabled
|
|
49
49
|
? css `
|
|
50
50
|
rect {
|
|
51
|
-
fill: ${theme.color.background.
|
|
51
|
+
fill: ${theme.color.background.neutralBaseDisabled};
|
|
52
52
|
stroke: ${theme.color.background.primaryDisabled};
|
|
53
53
|
}
|
|
54
54
|
path {
|
|
@@ -76,7 +76,7 @@ const CHECKBOX_ICON_STYLE = (theme, type, disabled) => {
|
|
|
76
76
|
${disabled
|
|
77
77
|
? css `
|
|
78
78
|
rect {
|
|
79
|
-
fill: ${theme.color.background.
|
|
79
|
+
fill: ${theme.color.background.neutralBaseDisabled};
|
|
80
80
|
stroke: ${theme.color.background.primaryDisabled};
|
|
81
81
|
}
|
|
82
82
|
rect + rect {
|
|
@@ -114,7 +114,7 @@ const CheckboxInput = React.forwardRef((props, ref) => {
|
|
|
114
114
|
onChange,
|
|
115
115
|
inputProps,
|
|
116
116
|
};
|
|
117
|
-
return (_jsxs(Label, Object.assign({ className: className, ref: ref }, other, { children: [_jsx(Checkbox, Object.assign({}, checkboxProps)), _jsx("span", Object.assign({ css: css `
|
|
117
|
+
return (_jsxs(Label, Object.assign({ className: className, ref: ref, disabled: disabled !== null && disabled !== void 0 ? disabled : false }, other, { children: [_jsx(Checkbox, Object.assign({}, checkboxProps)), _jsx("span", Object.assign({ css: css `
|
|
118
118
|
margin-left: 8px;
|
|
119
119
|
` }, { children: label }))] })));
|
|
120
120
|
});
|
|
@@ -155,7 +155,9 @@ const Label = styled.label `
|
|
|
155
155
|
font-size: 14px;
|
|
156
156
|
font-weight: 500;
|
|
157
157
|
line-height: 16px;
|
|
158
|
-
color: ${({ theme }) =>
|
|
158
|
+
color: ${({ theme, disabled }) => disabled
|
|
159
|
+
? theme.color.foreground.neutralBaseDisabled
|
|
160
|
+
: theme.color.foreground.neutralBase};
|
|
159
161
|
align-self: center;
|
|
160
162
|
`;
|
|
161
163
|
const CheckboxIcon = (props) => {
|
|
@@ -24,10 +24,9 @@ const TYPE_TO_ICON_STYLE = (theme, type, disabled) => {
|
|
|
24
24
|
}
|
|
25
25
|
${disabled
|
|
26
26
|
? css `
|
|
27
|
-
cursor: default;
|
|
28
27
|
path {
|
|
29
|
-
stroke: ${theme.color.
|
|
30
|
-
fill: ${theme.color.background.
|
|
28
|
+
stroke: ${theme.color.foreground.neutralBaseDisabled};
|
|
29
|
+
fill: ${theme.color.background.neutralBaseDisabled};
|
|
31
30
|
}
|
|
32
31
|
`
|
|
33
32
|
: css `
|
|
@@ -48,10 +47,9 @@ const TYPE_TO_ICON_STYLE = (theme, type, disabled) => {
|
|
|
48
47
|
}
|
|
49
48
|
${disabled
|
|
50
49
|
? css `
|
|
51
|
-
cursor: default;
|
|
52
50
|
path {
|
|
53
51
|
stroke: ${theme.color.background.primaryDisabled};
|
|
54
|
-
fill: ${theme.color.background.
|
|
52
|
+
fill: ${theme.color.background.neutralBaseDisabled};
|
|
55
53
|
}
|
|
56
54
|
rect {
|
|
57
55
|
fill: ${theme.color.background.primaryDisabled};
|
|
@@ -85,14 +83,14 @@ const RadioInput = React.forwardRef((props, ref) => {
|
|
|
85
83
|
onChange,
|
|
86
84
|
inputProps,
|
|
87
85
|
};
|
|
88
|
-
return (_jsxs(Label, Object.assign({ className: className, ref: ref }, other, { children: [_jsx(RadioButton, Object.assign({}, radioProps)), _jsx("span", Object.assign({ css: css `
|
|
86
|
+
return (_jsxs(Label, Object.assign({ className: className, ref: ref, disabled: disabled !== null && disabled !== void 0 ? disabled : false }, other, { children: [_jsx(RadioButton, Object.assign({}, radioProps)), _jsx("span", Object.assign({ css: css `
|
|
89
87
|
margin-left: 8px;
|
|
90
88
|
` }, { children: label }))] })));
|
|
91
89
|
});
|
|
92
90
|
const RadioButton = React.forwardRef((props, ref) => {
|
|
93
91
|
const { className, checked, label, spacer = false, disabled = false, onChange, inputProps } = props, other = __rest(props, ["className", "checked", "label", "spacer", "disabled", "onChange", "inputProps"]);
|
|
94
92
|
const type = props.checked ? "selected" : "default";
|
|
95
|
-
return (_jsxs(RadioButtonContainer, Object.assign({ className: className, spacer: spacer, ref: ref }, other, { children: [_jsx(StyledInput, Object.assign({ type: "radio" }, inputProps, { checked: checked, disabled: disabled, onChange: onChange })), _jsx(RadioButtonIcon, { type: type, disabled: disabled })] })));
|
|
93
|
+
return (_jsxs(RadioButtonContainer, Object.assign({ className: className, spacer: spacer, disabled: disabled, ref: ref }, other, { children: [_jsx(StyledInput, Object.assign({ type: "radio" }, inputProps, { checked: checked, disabled: disabled, onChange: onChange })), _jsx(RadioButtonIcon, { type: type, disabled: disabled })] })));
|
|
96
94
|
});
|
|
97
95
|
const Label = styled.label `
|
|
98
96
|
display: flex;
|
|
@@ -101,15 +99,17 @@ const Label = styled.label `
|
|
|
101
99
|
font-size: 14px;
|
|
102
100
|
font-weight: 500;
|
|
103
101
|
line-height: 16px;
|
|
104
|
-
color: ${({ theme }) =>
|
|
102
|
+
color: ${({ theme, disabled }) => disabled
|
|
103
|
+
? theme.color.foreground.neutralBaseDisabled
|
|
104
|
+
: theme.color.foreground.neutralBase};
|
|
105
105
|
align-self: center;
|
|
106
106
|
`;
|
|
107
|
-
const RadioButtonContainer = styled.span(({ spacer }) => css `
|
|
107
|
+
const RadioButtonContainer = styled.span(({ spacer, disabled }) => css `
|
|
108
108
|
display: inline-flex;
|
|
109
109
|
position: relative;
|
|
110
110
|
width: 16px;
|
|
111
111
|
height: 16px;
|
|
112
|
-
cursor: pointer;
|
|
112
|
+
cursor: ${disabled ? "default" : "pointer"};
|
|
113
113
|
margin-bottom: ${spacer ? "8px" : "0"};
|
|
114
114
|
`);
|
|
115
115
|
const StyledInput = styled.input `
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @emotion/react */
|
|
3
|
+
export function Spinner() {
|
|
4
|
+
return (_jsxs("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, { children: [_jsx("path", { d: "M15.6025 10.4904C16.095 8.98682 16.1307 7.37089 15.7048 5.84702C15.279 4.32314 14.4109 2.95976 13.2102 1.92928C12.0095 0.898795 10.5303 0.247495 8.95942 0.0577392C7.38859 -0.132017 5.79677 0.148294 4.38525 0.863224C2.97373 1.57815 1.80591 2.69559 1.02946 4.07424C0.253021 5.45288 -0.0971706 7.0308 0.0231732 8.60847C0.143517 10.1861 0.728991 11.6927 1.70556 12.9376C2.68213 14.1825 4.00592 15.1099 5.50955 15.6025L6.50573 12.5615C5.60355 12.2659 4.80928 11.7095 4.22333 10.9626C3.63739 10.2156 3.28611 9.31168 3.2139 8.36508C3.1417 7.41848 3.35181 6.47173 3.81768 5.64454C4.28354 4.81736 4.98424 4.14689 5.83115 3.71793C6.67806 3.28898 7.63316 3.12079 8.57565 3.23464C9.51815 3.3485 10.4057 3.73928 11.1261 4.35757C11.8465 4.97586 12.3674 5.79389 12.6229 6.70821C12.8784 7.62254 12.857 8.59209 12.5615 9.49427L15.6025 10.4904Z", fill: "currentColor" }), _jsx("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", dur: "1s", from: "0 0 0", to: "360 0 0", repeatCount: "indefinite" })] })));
|
|
5
|
+
}
|
|
@@ -15,6 +15,7 @@ import { css } from "@emotion/react";
|
|
|
15
15
|
import styled from "@emotion/styled";
|
|
16
16
|
import React from "react";
|
|
17
17
|
import { HOVER } from "../utils/hover";
|
|
18
|
+
import { Spinner } from "./Spinner";
|
|
18
19
|
const COLOR_TO_BUTTON_STYLE = (theme, color) => ({
|
|
19
20
|
danger: css `
|
|
20
21
|
border: none;
|
|
@@ -23,9 +24,11 @@ const COLOR_TO_BUTTON_STYLE = (theme, color) => ({
|
|
|
23
24
|
|
|
24
25
|
${HOVER(css `
|
|
25
26
|
background: ${theme.color.background.dangerActive};
|
|
27
|
+
color: ${theme.color.foreground.neutralAltActive};
|
|
26
28
|
`)}
|
|
27
29
|
&:disabled {
|
|
28
30
|
background: ${theme.color.background.dangerDisabled};
|
|
31
|
+
color: ${theme.color.foreground.neutralAltDisabled};
|
|
29
32
|
}
|
|
30
33
|
`,
|
|
31
34
|
grey: css `
|
|
@@ -35,10 +38,10 @@ const COLOR_TO_BUTTON_STYLE = (theme, color) => ({
|
|
|
35
38
|
|
|
36
39
|
${HOVER(css `
|
|
37
40
|
background: ${theme.color.background.neutralAltActive};
|
|
38
|
-
color: ${theme.color.foreground.
|
|
41
|
+
color: ${theme.color.foreground.neutralBaseActive};
|
|
39
42
|
`)}
|
|
40
43
|
&:disabled {
|
|
41
|
-
background: ${theme.color.background.
|
|
44
|
+
background: ${theme.color.background.neutralAltDisabled};
|
|
42
45
|
color: ${theme.color.foreground.neutralBaseDisabled};
|
|
43
46
|
}
|
|
44
47
|
`,
|
|
@@ -49,9 +52,11 @@ const COLOR_TO_BUTTON_STYLE = (theme, color) => ({
|
|
|
49
52
|
|
|
50
53
|
${HOVER(css `
|
|
51
54
|
background: ${theme.color.background.primaryActive};
|
|
55
|
+
color: ${theme.color.foreground.neutralAltActive};
|
|
52
56
|
`)}
|
|
53
57
|
&:disabled {
|
|
54
58
|
background: ${theme.color.background.primaryDisabled};
|
|
59
|
+
color: ${theme.color.foreground.neutralAltDisabled};
|
|
55
60
|
}
|
|
56
61
|
`,
|
|
57
62
|
icon: css `
|
|
@@ -60,8 +65,8 @@ const COLOR_TO_BUTTON_STYLE = (theme, color) => ({
|
|
|
60
65
|
color: ${theme.color.foreground.neutralBase};
|
|
61
66
|
|
|
62
67
|
${HOVER(css `
|
|
63
|
-
background: ${theme.color.
|
|
64
|
-
color: ${theme.color.foreground.
|
|
68
|
+
background: ${theme.color.blanket.neutralLight};
|
|
69
|
+
color: ${theme.color.foreground.neutralBaseActive};
|
|
65
70
|
`)}
|
|
66
71
|
&:disabled {
|
|
67
72
|
background: none;
|
|
@@ -74,7 +79,7 @@ const COLOR_TO_BUTTON_STYLE = (theme, color) => ({
|
|
|
74
79
|
color: ${theme.color.foreground.neutralAlt};
|
|
75
80
|
${HOVER(css `
|
|
76
81
|
background: ${theme.color.background.inverseActive};
|
|
77
|
-
color: ${theme.color.foreground.
|
|
82
|
+
color: ${theme.color.foreground.neutralAltActive};
|
|
78
83
|
`)}
|
|
79
84
|
&:disabled {
|
|
80
85
|
background: ${theme.color.background.inverseDisabled};
|
|
@@ -87,7 +92,7 @@ const COLOR_TO_BUTTON_STYLE = (theme, color) => ({
|
|
|
87
92
|
color: ${theme.color.foreground.neutralBase};
|
|
88
93
|
${HOVER(css `
|
|
89
94
|
background: ${theme.color.background.neutralAltActive};
|
|
90
|
-
color: ${theme.color.foreground.
|
|
95
|
+
color: ${theme.color.foreground.neutralBaseActive};
|
|
91
96
|
`)}
|
|
92
97
|
&:disabled {
|
|
93
98
|
background: ${theme.color.background.neutralAltDisabled};
|
|
@@ -99,41 +104,45 @@ const SIZE_TO_BUTTON_STYLE = {
|
|
|
99
104
|
large: css `
|
|
100
105
|
width: 56px;
|
|
101
106
|
height: 56px;
|
|
102
|
-
padding:
|
|
107
|
+
padding: 12px;
|
|
108
|
+
border-radius: 8px;
|
|
103
109
|
|
|
104
110
|
svg {
|
|
105
|
-
width:
|
|
106
|
-
height:
|
|
111
|
+
width: 32px;
|
|
112
|
+
height: 32px;
|
|
107
113
|
}
|
|
108
114
|
`,
|
|
109
115
|
medium: css `
|
|
110
116
|
width: 48px;
|
|
111
117
|
height: 48px;
|
|
112
|
-
padding:
|
|
118
|
+
padding: 10px;
|
|
119
|
+
border-radius: 8px;
|
|
113
120
|
|
|
114
121
|
svg {
|
|
115
|
-
width:
|
|
116
|
-
height:
|
|
122
|
+
width: 28px;
|
|
123
|
+
height: 28px;
|
|
117
124
|
}
|
|
118
125
|
`,
|
|
119
126
|
small: css `
|
|
120
127
|
width: 36px;
|
|
121
128
|
height: 36px;
|
|
122
|
-
padding:
|
|
129
|
+
padding: 8px;
|
|
130
|
+
border-radius: 8px;
|
|
123
131
|
|
|
124
132
|
svg {
|
|
125
|
-
width:
|
|
126
|
-
height:
|
|
133
|
+
width: 20px;
|
|
134
|
+
height: 20px;
|
|
127
135
|
}
|
|
128
136
|
`,
|
|
129
137
|
xsmall: css `
|
|
130
138
|
width: 28px;
|
|
131
139
|
height: 28px;
|
|
132
|
-
padding:
|
|
140
|
+
padding: 6px;
|
|
141
|
+
border-radius: 4px;
|
|
133
142
|
|
|
134
143
|
svg {
|
|
135
|
-
width:
|
|
136
|
-
height:
|
|
144
|
+
width: 16px;
|
|
145
|
+
height: 16px;
|
|
137
146
|
}
|
|
138
147
|
`,
|
|
139
148
|
};
|
|
@@ -159,7 +168,7 @@ const SIZE_TO_LABEL_STYLE = {
|
|
|
159
168
|
* [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=22-374&t=kTLv3t86qtGalHSS-0)
|
|
160
169
|
*/
|
|
161
170
|
const SquareButton = React.forwardRef(function SquareButton(props, ref) {
|
|
162
|
-
const { className, component: Component = "span", disabled, type = "button", color, size, icon, label, fullWidth, onClick } = props, other = __rest(props, ["className", "component", "disabled", "type", "color", "size", "icon", "label", "fullWidth", "onClick"]);
|
|
171
|
+
const { className, component: Component = "span", disabled, type = "button", color, size, icon, label, fullWidth, onClick, loading = false } = props, other = __rest(props, ["className", "component", "disabled", "type", "color", "size", "icon", "label", "fullWidth", "onClick", "loading"]);
|
|
163
172
|
return (_jsxs(Component, Object.assign({}, other, { ref: ref, className: className, css: css `
|
|
164
173
|
display: flex;
|
|
165
174
|
flex-direction: column;
|
|
@@ -167,10 +176,9 @@ const SquareButton = React.forwardRef(function SquareButton(props, ref) {
|
|
|
167
176
|
gap: 8px;
|
|
168
177
|
|
|
169
178
|
width: ${fullWidth ? "100%" : "fit-content"};
|
|
170
|
-
` }, { children: [_jsx(Button, Object.assign({ type: type, color: color, size: size, disabled: disabled, fullWidth: fullWidth, onClick: onClick }, { children: icon })), label && (_jsx(Label, Object.assign({ disabled: disabled, size: size }, { children: label })))] })));
|
|
179
|
+
` }, { children: [_jsx(Button, Object.assign({ type: type, color: color, size: size, disabled: disabled || loading, fullWidth: fullWidth, onClick: onClick }, { children: loading ? _jsx(Spinner, {}) : icon })), label && (_jsx(Label, Object.assign({ disabled: disabled || loading, size: size }, { children: label })))] })));
|
|
171
180
|
});
|
|
172
181
|
const Button = styled.button `
|
|
173
|
-
border-radius: 8px;
|
|
174
182
|
cursor: pointer;
|
|
175
183
|
&:disabled {
|
|
176
184
|
cursor: default;
|
|
@@ -39,50 +39,73 @@ const SIZE_TO_SWTICH_SIZE = {
|
|
|
39
39
|
const StyledSwitch = styled(MuiSwitch, {
|
|
40
40
|
shouldForwardProp: (prop) => prop !== "switchSize",
|
|
41
41
|
})(({ theme, switchSize }) => css `
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
padding:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
// Specificity를 높이기 위해 최상위에 &.MuiSwitch-root를 추가
|
|
43
|
+
&.MuiSwitch-root {
|
|
44
|
+
width: ${SIZE_TO_SWTICH_SIZE[switchSize].width};
|
|
45
|
+
height: ${SIZE_TO_SWTICH_SIZE[switchSize].height};
|
|
46
|
+
padding: 0; // 기존 Mui padding 속성 override
|
|
47
|
+
.MuiSwitch-switchBase {
|
|
48
|
+
padding: 2px;
|
|
49
|
+
&.Mui-checked {
|
|
50
|
+
transform: translateX(${SIZE_TO_SWTICH_SIZE[switchSize].translateX});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.MuiSwitch-thumb {
|
|
55
|
+
box-shadow: none;
|
|
56
|
+
filter: drop-shadow(0px 2px 4px rgba(0, 35, 11, 0.2));
|
|
57
|
+
width: ${SIZE_TO_SWTICH_SIZE[switchSize].thumbSize};
|
|
58
|
+
height: ${SIZE_TO_SWTICH_SIZE[switchSize].thumbSize};
|
|
59
|
+
border-radius: 77px;
|
|
60
|
+
transition: color 0.3s ease;
|
|
61
|
+
|
|
62
|
+
color: ${theme.color.foreground.primary};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.MuiSwitch-track {
|
|
66
|
+
border-radius: 16px;
|
|
67
|
+
opacity: 1;
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
|
|
70
|
+
background: none;
|
|
71
|
+
border: 1px solid ${theme.color.background.primary};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.Mui-disabled {
|
|
50
75
|
& + .MuiSwitch-track {
|
|
51
76
|
opacity: 1;
|
|
77
|
+
border-color: ${theme.color.background.primaryDisabled};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.MuiSwitch-thumb {
|
|
81
|
+
filter: none;
|
|
82
|
+
color: ${theme.color.foreground.primaryDisabled};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.Mui-checked {
|
|
87
|
+
& + .MuiSwitch-track {
|
|
88
|
+
opacity: 1;
|
|
89
|
+
border-color: ${theme.color.background.primary};
|
|
52
90
|
background-color: ${theme.color.background.primary};
|
|
53
91
|
}
|
|
54
|
-
|
|
92
|
+
|
|
93
|
+
.MuiSwitch-thumb {
|
|
94
|
+
color: ${theme.color.background.neutralBase};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.Mui-checked.Mui-disabled {
|
|
99
|
+
& + .MuiSwitch-track {
|
|
55
100
|
opacity: 1;
|
|
101
|
+
border-color: ${theme.color.background.primaryDisabled};
|
|
56
102
|
background-color: ${theme.color.background.primaryDisabled};
|
|
57
103
|
}
|
|
58
|
-
}
|
|
59
|
-
&.Mui-disabled + .MuiSwitch-track {
|
|
60
|
-
opacity: 1;
|
|
61
|
-
background-color: ${theme.color.background.neutralAltDisabled};
|
|
62
|
-
}
|
|
63
|
-
&:hover {
|
|
64
|
-
background-color: inherit; // 기존 Mui hover 속성 override
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
.Mui-disabled .MuiSwitch-thumb {
|
|
68
|
-
filter: none;
|
|
69
|
-
box-shadow: none;
|
|
70
|
-
background-color: ${theme.color.foreground.neutralAltDisabled};
|
|
71
|
-
}
|
|
72
104
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
height: ${SIZE_TO_SWTICH_SIZE[switchSize].thumbSize};
|
|
78
|
-
border-radius: 77px;
|
|
79
|
-
transition: width 300ms;
|
|
80
|
-
}
|
|
81
|
-
.MuiSwitch-track {
|
|
82
|
-
border-radius: 16px;
|
|
83
|
-
opacity: 1;
|
|
84
|
-
background-color: ${theme.color.background.neutralAltActive};
|
|
85
|
-
box-sizing: border-box;
|
|
105
|
+
.MuiSwitch-thumb {
|
|
106
|
+
color: ${theme.color.background.neutralBaseDisabled};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
86
109
|
}
|
|
87
110
|
`);
|
|
88
111
|
export default Switch;
|
package/dist/components/Tag.js
CHANGED
|
@@ -63,7 +63,7 @@ const COLOR_TO_STYLE = (theme, color) => ({
|
|
|
63
63
|
background: ${theme.color.container.obsidianContainer};
|
|
64
64
|
color: ${theme.color.container.obsidianOnContainer};
|
|
65
65
|
`,
|
|
66
|
-
}[color]
|
|
66
|
+
})[color];
|
|
67
67
|
/**
|
|
68
68
|
* [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=42-869&t=HZXCHP0r0tbvMA6v-0)
|
|
69
69
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { default as Popover } from "./components/Popover";
|
|
|
17
17
|
export * from "./components/Popover";
|
|
18
18
|
export { default as RadioInput } from "./components/RadioInput";
|
|
19
19
|
export * from "./components/RadioInput";
|
|
20
|
+
export * from "./components/Spinner";
|
|
20
21
|
export { default as SquareButton } from "./components/SquareButton";
|
|
21
22
|
export * from "./components/SquareButton";
|
|
22
23
|
export { default as Switch } from "./components/Switch";
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { default as Popover } from "./components/Popover";
|
|
|
17
17
|
export * from "./components/Popover";
|
|
18
18
|
export { default as RadioInput } from "./components/RadioInput";
|
|
19
19
|
export * from "./components/RadioInput";
|
|
20
|
+
export * from "./components/Spinner";
|
|
20
21
|
export { default as SquareButton } from "./components/SquareButton";
|
|
21
22
|
export * from "./components/SquareButton";
|
|
22
23
|
export { default as Switch } from "./components/Switch";
|