-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMandalartTextField.css.ts
More file actions
188 lines (178 loc) · 4.54 KB
/
MandalartTextField.css.ts
File metadata and controls
188 lines (178 loc) · 4.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
import { style, styleVariants } from '@vanilla-extract/css';
import { colors } from '@/style/token/color.css';
import { fonts } from '@/style/token/typography.css';
// ====== 공통 base 스타일 ======
const bigGoalBase = {
display: 'flex',
alignItems: 'center',
flexShrink: 0,
width: '57.1rem',
height: '8rem',
borderRadius: '12px',
padding: '2rem 3rem',
fontSize: fonts.title01.fontSize,
fontWeight: fonts.title01.fontWeight,
lineHeight: fonts.title01.lineHeight,
color: colors.grey10,
};
const subGoalBase = {
display: 'flex',
alignItems: 'center',
flexShrink: 0,
width: '57.1rem',
height: '5.6rem',
borderRadius: '8px',
padding: '1.4rem 2rem',
fontSize: fonts.subtitle03.fontSize,
fontWeight: fonts.subtitle03.fontWeight,
lineHeight: fonts.subtitle03.lineHeight,
color: colors.grey10,
};
const todoBase = {
display: 'flex',
alignItems: 'center',
flexShrink: 0,
width: '43.6rem',
height: '5.6rem',
borderRadius: '8px',
padding: '1.4rem 2rem',
fontSize: fonts.subtitle03.fontSize,
fontWeight: fonts.subtitle03.fontWeight,
lineHeight: fonts.subtitle03.lineHeight,
color: '#111111',
};
export const bigGoalBaseClass = style(bigGoalBase);
export const subGoalBaseClass = style(subGoalBase);
export const todoBaseClass = style(todoBase);
export const inputBase = style({
display: 'block',
width: '100%',
height: '100%',
background: 'transparent',
border: 'none',
outline: 'none',
padding: 0,
color: colors.grey10,
});
const makeInputStyle = (font: Record<string, string | number>) =>
style({
fontFamily: 'Pretendard',
...font,
'::placeholder': {
color: colors.grey6,
fontFamily: 'Pretendard',
...font,
},
});
export const inputBigGoal = makeInputStyle(fonts.title01);
export const inputSubGoal = makeInputStyle(fonts.subtitle03);
export const inputTodo = makeInputStyle(fonts.subtitle03);
export const inputVariants = styleVariants({
bigGoal: [inputBase, inputBigGoal],
subGoal: [inputBase, inputSubGoal],
todo: [inputBase, inputTodo],
});
export const bigGoalVariants = styleVariants({
default: {
...bigGoalBase,
border: '0.3rem solid transparent',
background: colors.grey4,
color: colors.grey6,
textAlign: 'left',
},
clicked: {
...bigGoalBase,
border: `0.3rem solid ${colors.grey5}`,
background: colors.grey3,
color: colors.grey6,
textAlign: 'left',
},
typing: {
...bigGoalBase,
border: `0.3rem solid ${colors.grey5}`,
background: colors.grey3,
color: colors.grey10,
textAlign: 'left',
justifyContent: 'space-between',
},
filled: {
...bigGoalBase,
border: '0.3rem solid transparent',
background: colors.grey4,
color: colors.grey10,
textAlign: 'center',
},
hover: {
...bigGoalBase,
border: '0.3rem solid transparent',
background: colors.grey3,
color: colors.grey6,
textAlign: 'center',
},
});
const createVariantStyles = (baseStyle: object) => ({
default: {
...baseStyle,
border: '2px solid transparent',
background: colors.grey4,
color: colors.grey6,
textAlign: 'center' as const,
},
clicked: {
...baseStyle,
border: `2px solid ${colors.blue06}`,
background: colors.grey3,
color: colors.grey6,
textAlign: 'center' as const,
},
typing: {
...baseStyle,
border: `2px solid ${colors.blue06}`,
background: colors.grey3,
color: colors.grey10,
textAlign: 'left' as const,
justifyContent: 'space-between' as const,
},
filled: {
...baseStyle,
border: '2px solid transparent',
background: colors.grey4,
color: colors.grey10,
textAlign: 'center' as const,
fontWeight: 600,
},
hover: {
...baseStyle,
border: '2px solid transparent',
background: colors.grey3,
color: colors.grey6,
textAlign: 'center' as const,
},
});
export const subGoalVariants = styleVariants(createVariantStyles(subGoalBase));
export const todoVariants = styleVariants(createVariantStyles(todoBase));
const CLEAR_BUTTON_SIZE = '3.2rem';
const CLEAR_BUTTON_SMALL_SIZE = '2.4rem';
export const clearButton = style({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: CLEAR_BUTTON_SIZE,
height: CLEAR_BUTTON_SIZE,
aspectRatio: '1/1',
background: 'none',
border: 'none',
padding: 0,
cursor: 'pointer',
});
export const clearButtonSmall = style({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: CLEAR_BUTTON_SMALL_SIZE,
height: CLEAR_BUTTON_SMALL_SIZE,
background: 'none',
border: 'none',
padding: 0,
cursor: 'pointer',
});