This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
index.es.js
430 lines (343 loc) · 19.1 KB
/
index.es.js
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
import styled, { css } from 'styled-components';
import React from 'react';
var white = '#FFF';
var black = '#000';
var gray900 = '#292a2b';
var gray800 = '#353a3c';
var gray700 = '#4c5256';
var gray600 = '#868c91';
var gray500 = '#a8aeb3';
var gray400 = '#cdd1d6';
var gray300 = '#e0e2e6';
var gray200 = '#e9ecef';
var gray100 = '#eff1f3';
var gray50 = '#f9f9fb';
var red50 = '#fff0f0';
var red200 = '#ffc9c9';
var red100 = '#ffd9d9';
var red300 = '#f7abb0';
var red400 = '#f28896';
var red600 = '#e52c60';
var red500 = '#ed6b85';
var red700 = '#e0004d';
var red800 = '#c20042';
var red900 = '#a40038';
var orange50 = '#fff9f2';
var orange200 = '#ffd8a8';
var orange400 = '#ffa94d';
var orange100 = '#ffe8cc';
var orange300 = '#ffc078';
var orange500 = '#ff922b';
var orange600 = '#fd7e14';
var orange700 = '#f76707';
var orange800 = '#e8590c';
var orange900 = '#d9480f';
var green500 = '#00b79d';
var redError = '#ff5252';
var index = /*#__PURE__*/Object.freeze({
white: white,
black: black,
gray900: gray900,
gray800: gray800,
gray700: gray700,
gray600: gray600,
gray500: gray500,
gray400: gray400,
gray300: gray300,
gray200: gray200,
gray100: gray100,
gray50: gray50,
red50: red50,
red200: red200,
red100: red100,
red300: red300,
red400: red400,
red600: red600,
red500: red500,
red700: red700,
red800: red800,
red900: red900,
orange50: orange50,
orange200: orange200,
orange400: orange400,
orange100: orange100,
orange300: orange300,
orange500: orange500,
orange600: orange600,
orange700: orange700,
orange800: orange800,
orange900: orange900,
green500: green500,
redError: redError
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var objectWithoutProperties = function (obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
var taggedTemplateLiteral = function (strings, raw) {
return Object.freeze(Object.defineProperties(strings, {
raw: {
value: Object.freeze(raw)
}
}));
};
var _templateObject = taggedTemplateLiteral(['\n @media ', ' {\n ', '\n }\n '], ['\n @media ', ' {\n ', '\n }\n ']);
function buildMediaQuery(_ref, not) {
var minWidth = _ref.minWidth,
maxWidth = _ref.maxWidth;
var query = '';
if (minWidth) {
query += '(min-width: ' + minWidth + 'px)';
}
if (minWidth && maxWidth) {
query += ' and ';
}
if (maxWidth) {
query += '(max-width: ' + maxWidth + 'px)';
}
if (not) {
query = 'not all and ' + query;
}
return query;
}
var SIZES = {
sm: { minWidth: null, maxWidth: 1023 },
md: { minWidth: null, maxWidth: null }, // TODO: 태블릿 사이즈가 추가되면 수정합니다.
lg: { minWidth: 1024, maxWidth: null }
};
var media = Object.keys(SIZES).reduce(function (acc, label) {
acc[label] = function () {
var mediaQuery = buildMediaQuery(SIZES[label]);
return css(_templateObject, mediaQuery, css.apply(undefined, arguments));
};
return acc;
}, {});
var index$1 = /*#__PURE__*/Object.freeze({
buildMediaQuery: buildMediaQuery,
SIZES: SIZES,
media: media
});
var _templateObject$1 = taggedTemplateLiteral(['\n font-family: \'NanumSquare\';\n font-size: 32px;\n color: ', ';\n line-height: 44px;\n font-weight: bold;\n'], ['\n font-family: \'NanumSquare\';\n font-size: 32px;\n color: ', ';\n line-height: 44px;\n font-weight: bold;\n']),
_templateObject2 = taggedTemplateLiteral(['\n font-family: \'NanumSquare\';\n font-size: 24px;\n color: ', ';\n line-height: 34px;\n font-weight: bold;\n'], ['\n font-family: \'NanumSquare\';\n font-size: 24px;\n color: ', ';\n line-height: 34px;\n font-weight: bold;\n']),
_templateObject3 = taggedTemplateLiteral(['\n font-family: \'NanumSquare\';\n font-size: 32px;\n line-height: 44px;\n font-weight: bold;\n color: ', ';\n'], ['\n font-family: \'NanumSquare\';\n font-size: 32px;\n line-height: 44px;\n font-weight: bold;\n color: ', ';\n']),
_templateObject4 = taggedTemplateLiteral(['\n font-size: 16px;\n color: ', ';\n line-height: 24px;\n'], ['\n font-size: 16px;\n color: ', ';\n line-height: 24px;\n']),
_templateObject5 = taggedTemplateLiteral(['\n font-size: 14px;\n color: ', ';\n line-height: 20px;\n'], ['\n font-size: 14px;\n color: ', ';\n line-height: 20px;\n']),
_templateObject6 = taggedTemplateLiteral(['\n color: ', ';\n font-size: 11px;\n font-weight: bold;\n line-height: 16px;\n'], ['\n color: ', ';\n font-size: 11px;\n font-weight: bold;\n line-height: 16px;\n']),
_templateObject7 = taggedTemplateLiteral(['\n font-size: 16px;\n font-weight: bold;\n color: ', ';\n line-height: 24px;\n'], ['\n font-size: 16px;\n font-weight: bold;\n color: ', ';\n line-height: 24px;\n']),
_templateObject8 = taggedTemplateLiteral(['\n font-size: 14px;\n font-weight: bold;\n color: ', ';\n line-height: 20px;\n'], ['\n font-size: 14px;\n font-weight: bold;\n color: ', ';\n line-height: 20px;\n']),
_templateObject9 = taggedTemplateLiteral(['\n font-size: 20px;\n font-weight: bold;\n color: ', ';\n line-height: 32px;\n'], ['\n font-size: 20px;\n font-weight: bold;\n color: ', ';\n line-height: 32px;\n']),
_templateObject10 = taggedTemplateLiteral(['\n font-size: 11px;\n line-height: 16px;\n color: ', ';\n'], ['\n font-size: 11px;\n line-height: 16px;\n color: ', ';\n']),
_templateObject11 = taggedTemplateLiteral(['\n font-size: 9px;\n line-height: 12px;\n'], ['\n font-size: 9px;\n line-height: 12px;\n']),
_templateObject12 = taggedTemplateLiteral(['\n font-size: 9px;\n line-height: 12px;\n color: ', ';\n'], ['\n font-size: 9px;\n line-height: 12px;\n color: ', ';\n']),
_templateObject13 = taggedTemplateLiteral(['\n font-size: 16px;\n font-weight: 300;\n color: ', ';\n line-height: 28px;\n'], ['\n font-size: 16px;\n font-weight: 300;\n color: ', ';\n line-height: 28px;\n']),
_templateObject14 = taggedTemplateLiteral(['\n font-family: \'NanumSquare\';\n font-size: 18px;\n color: ', ';\n line-height: 28px;\n font-weight: bold;\n'], ['\n font-family: \'NanumSquare\';\n font-size: 18px;\n color: ', ';\n line-height: 28px;\n font-weight: bold;\n']),
_templateObject15 = taggedTemplateLiteral(['\n font-size: 11px;\n color: ', ';\n line-height: 16px;\n'], ['\n font-size: 11px;\n color: ', ';\n line-height: 16px;\n']),
_templateObject16 = taggedTemplateLiteral(['\n font-family: \'NanumSquare\';\n font-size: 24px;\n color: ', ';\n line-height: 34px;\n font-weight: 800;\n'], ['\n font-family: \'NanumSquare\';\n font-size: 24px;\n color: ', ';\n line-height: 34px;\n font-weight: 800;\n']),
_templateObject17 = taggedTemplateLiteral(['\n font-size: 20px;\n color: ', ';\n line-height: 32px;\n'], ['\n font-size: 20px;\n color: ', ';\n line-height: 32px;\n']),
_templateObject18 = taggedTemplateLiteral(['\n font-size: 9px;\n color: ', ';\n line-height: 12px;\n'], ['\n font-size: 9px;\n color: ', ';\n line-height: 12px;\n']),
_templateObject19 = taggedTemplateLiteral(['\n font-family: \'NanumSquare\';\n font-size: 32px;\n color: ', ';\n line-height: 44px;\n font-weight: 800;\n'], ['\n font-family: \'NanumSquare\';\n font-size: 32px;\n color: ', ';\n line-height: 44px;\n font-weight: 800;\n']),
_templateObject20 = taggedTemplateLiteral(['\n font-family: \'NanumSquare\';\n font-size: 18px;\n color: ', ';\n line-height: 28px;\n font-weight: 800;\n'], ['\n font-family: \'NanumSquare\';\n font-size: 18px;\n color: ', ';\n line-height: 28px;\n font-weight: 800;\n']),
_templateObject21 = taggedTemplateLiteral(['\n font-size: 11px;\n font-weight: bold;\n color: ', ';\n line-height: 16px;\n'], ['\n font-size: 11px;\n font-weight: bold;\n color: ', ';\n line-height: 16px;\n']),
_templateObject22 = taggedTemplateLiteral(['\n font-size: 16px;\n line-height: 28px;\n color: ', ';\n'], ['\n font-size: 16px;\n line-height: 28px;\n color: ', ';\n']),
_templateObject23 = taggedTemplateLiteral(['\n font-size: 14px;\n font-weight: 300;\n color: ', ';\n line-height: 24px;\n'], ['\n font-size: 14px;\n font-weight: 300;\n color: ', ';\n line-height: 24px;\n']),
_templateObject24 = taggedTemplateLiteral(['\n font-size: 14px;\n font-weight: 300;\n line-height: 24px;\n color: ', ';\n'], ['\n font-size: 14px;\n font-weight: 300;\n line-height: 24px;\n color: ', ';\n']),
_templateObject25 = taggedTemplateLiteral(['\n font-size: 9px;\n font-weight: bold;\n color: ', ';\n line-height: 12px;\n'], ['\n font-size: 9px;\n font-weight: bold;\n color: ', ';\n line-height: 12px;\n']);
var heading1BlackBold = css(_templateObject$1, gray800);
var heading2WhiteBold = css(_templateObject2, white);
var heading1WhiteBold = css(_templateObject3, white);
var body1Black = css(_templateObject4, gray800);
var body2Black = css(_templateObject5, gray800);
var body2White = css(_templateObject5, white);
var body2Gray = css(_templateObject5, gray500);
var tiny1WhiteBold = css(_templateObject6, white);
var body1WhiteBold = css(_templateObject7, white);
var body2BlackBold = css(_templateObject8, gray800);
var subheadingBlackBold = css(_templateObject9, gray800);
var tiny1Black = css(_templateObject10, gray800);
var tiny2Black = css(_templateObject11);
var tiny2White = css(_templateObject12, white);
var body1Body = css(_templateObject13, gray700);
var heading3BlackBold = css(_templateObject14, gray800);
var tiny1Gray = css(_templateObject15, gray500);
var heading2BlackExtraBold = css(_templateObject16, gray800);
var tiny1White = css(_templateObject10, white);
var heading3WhiteBold = css(_templateObject14, white);
var body1Gray = css(_templateObject4, gray500);
var body2WhiteBold = css(_templateObject8, white);
var body1BlackBold = css(_templateObject7, gray800);
var subheadingGray = css(_templateObject17, gray500);
var tiny2Gray = css(_templateObject18, gray500);
var heading1BlackExtraBold = css(_templateObject19, gray800);
var heading3BlackExtraBold = css(_templateObject20, gray800);
var subheadingWhiteBold = css(_templateObject9, white);
var tiny1BlackBold = css(_templateObject21, gray800);
var body1White = css(_templateObject4, white);
var body1Paragraph = css(_templateObject22, gray600);
var body2Body = css(_templateObject23, gray800);
var body2Paragraph = css(_templateObject24, gray700);
var heading3WhiteExtraBold = css(_templateObject20, white);
var heading2BlackBold = css(_templateObject2, gray800);
var tiny2WhiteBold = css(_templateObject25, white);
var heading1WhiteExtraBold = css(_templateObject19, white);
var body2GrayBold = css(_templateObject8, gray500);
var heading3GrayBold = css(_templateObject14, gray500);
var subheadingBlack = css(_templateObject17, gray700);
var index$2 = /*#__PURE__*/Object.freeze({
heading1BlackBold: heading1BlackBold,
heading2WhiteBold: heading2WhiteBold,
heading1WhiteBold: heading1WhiteBold,
body1Black: body1Black,
body2Black: body2Black,
body2White: body2White,
body2Gray: body2Gray,
tiny1WhiteBold: tiny1WhiteBold,
body1WhiteBold: body1WhiteBold,
body2BlackBold: body2BlackBold,
subheadingBlackBold: subheadingBlackBold,
tiny1Black: tiny1Black,
tiny2Black: tiny2Black,
tiny2White: tiny2White,
body1Body: body1Body,
heading3BlackBold: heading3BlackBold,
tiny1Gray: tiny1Gray,
heading2BlackExtraBold: heading2BlackExtraBold,
tiny1White: tiny1White,
heading3WhiteBold: heading3WhiteBold,
body1Gray: body1Gray,
body2WhiteBold: body2WhiteBold,
body1BlackBold: body1BlackBold,
subheadingGray: subheadingGray,
tiny2Gray: tiny2Gray,
heading1BlackExtraBold: heading1BlackExtraBold,
heading3BlackExtraBold: heading3BlackExtraBold,
subheadingWhiteBold: subheadingWhiteBold,
tiny1BlackBold: tiny1BlackBold,
body1White: body1White,
body1Paragraph: body1Paragraph,
body2Body: body2Body,
body2Paragraph: body2Paragraph,
heading3WhiteExtraBold: heading3WhiteExtraBold,
heading2BlackBold: heading2BlackBold,
tiny2WhiteBold: tiny2WhiteBold,
heading1WhiteExtraBold: heading1WhiteExtraBold,
body2GrayBold: body2GrayBold,
heading3GrayBold: heading3GrayBold,
subheadingBlack: subheadingBlack
});
var _templateObject$2 = taggedTemplateLiteral(['\n position: relative;\n margin: 0 32px;\n ', ';\n ', ';\n'], ['\n position: relative;\n margin: 0 32px;\n ', ';\n ', ';\n']),
_templateObject2$1 = taggedTemplateLiteral(['\n margin: 0 24px;\n '], ['\n margin: 0 24px;\n ']),
_templateObject3$1 = taggedTemplateLiteral(['\n max-width: ', ';\n '], ['\n max-width: ', ';\n ']);
var Grid = styled.div(_templateObject$2, media.sm(_templateObject2$1), media.lg(_templateObject3$1, function (props) {
return props.maxWidthAuto ? 'auto' : '960px';
}));
var _templateObject$3 = taggedTemplateLiteral(['\n position: relative;\n min-height: 1px;\n padding-right: 12px;\n padding-left: 12px;\n float: left;\n box-sizing: border-box;\n\n ', ';\n\n ', ';\n\n ', ';\n'], ['\n position: relative;\n min-height: 1px;\n padding-right: 12px;\n padding-left: 12px;\n float: left;\n box-sizing: border-box;\n\n ', ';\n\n ', ';\n\n ', ';\n']),
_templateObject2$2 = taggedTemplateLiteral(['\n width: ', '%;\n padding-right: 4px;\n padding-left: 4px;\n '], ['\n width: ', '%;\n padding-right: 4px;\n padding-left: 4px;\n ']),
_templateObject3$2 = taggedTemplateLiteral(['\n width: ', '%;\n '], ['\n width: ', '%;\n ']);
var sizeToPercent = function sizeToPercent(size) {
return (size || 12) / 12 * 100;
};
var Col = styled.div(_templateObject$3, function (props) {
return props.sm && media.sm(_templateObject2$2, function (props) {
return sizeToPercent(props.sm);
});
}, function (props) {
return props.md && media.md(_templateObject3$2, function (props) {
return sizeToPercent(props.md || props.sm);
});
}, function (props) {
return props.lg && media.lg(_templateObject3$2, function (props) {
return sizeToPercent(props.lg || props.md || props.sm);
});
});
var _templateObject$4 = taggedTemplateLiteral(['\n margin-right: -12px;\n margin-left: -12px;\n ', ';\n'], ['\n margin-right: -12px;\n margin-left: -12px;\n ', ';\n']),
_templateObject2$3 = taggedTemplateLiteral(['\n margin-right: -4px;\n margin-left: -4px;\n '], ['\n margin-right: -4px;\n margin-left: -4px;\n ']);
var Row = styled.div.attrs({ className: 'clearfix' })(_templateObject$4, media.sm(_templateObject2$3));
var _templateObject$5 = taggedTemplateLiteral(['\n transform-origin: center;\n transition: stroke-dashoffset 2s cubic-bezier(.4, 1, 0.75, 0.9);\n stroke: ', ';\n stroke-linecap: round;\n'], ['\n transform-origin: center;\n transition: stroke-dashoffset 2s cubic-bezier(.4, 1, 0.75, 0.9);\n stroke: ', ';\n stroke-linecap: round;\n']),
_templateObject2$4 = taggedTemplateLiteral(['\n stroke: ', ';\n'], ['\n stroke: ', ';\n']),
_templateObject3$3 = taggedTemplateLiteral(['\n display: flex;\n align-items: center;\n justify-content: center;\n\n overflow: visible;\n vertical-align: middle;\n\n svg {\n display: block;\n }\n\n path {\n fill-opacity: 0;\n }\n'], ['\n display: flex;\n align-items: center;\n justify-content: center;\n\n overflow: visible;\n vertical-align: middle;\n\n svg {\n display: block;\n }\n\n path {\n fill-opacity: 0;\n }\n']),
_templateObject4$1 = taggedTemplateLiteral(['\n @keyframes pt-spinner-animation {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n animation: pt-spinner-animation 0.6s linear infinite;\n'], ['\n @keyframes pt-spinner-animation {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n animation: pt-spinner-animation 0.6s linear infinite;\n']);
var SPINNER_TRACK = 'M 50,50 m 0,-44.5 a 44.5,44.5 0 1 1 0,89 a 44.5,44.5 0 1 1 0,-89';
var PATH_LENGTH = 280;
var STROKE_WIDTH = 4;
var strokeWidth = Math.min((STROKE_WIDTH * 100) / 50);
var strokeOffset = PATH_LENGTH - PATH_LENGTH * 0.25;
var SpinnerHead = styled.path(_templateObject$5, function (props) {
return props.backgroundColor || gray600;
});
var SpinnerTrack = styled.path(_templateObject2$4, function (props) {
return props.color || gray200;
});
var Container = styled.div(_templateObject3$3);
var SpinnerAnimation = styled.span(_templateObject4$1);
var index$3 = (function (_ref) {
var _ref$size = _ref.size,
size = _ref$size === undefined ? 50 : _ref$size,
backgroundColor = _ref.backgroundColor,
color = _ref.color,
restProps = objectWithoutProperties(_ref, ['size', 'backgroundColor', 'color']);
return React.createElement(
Container,
restProps,
React.createElement(
SpinnerAnimation,
null,
React.createElement(
'svg',
{ height: size, width: size, viewBox: '0 0 100 100', strokeWidth: strokeWidth },
React.createElement(SpinnerTrack, { color: color, d: SPINNER_TRACK }),
React.createElement(SpinnerHead, {
backgroundColor: backgroundColor,
d: SPINNER_TRACK,
pathLength: PATH_LENGTH,
strokeDasharray: PATH_LENGTH + ' ' + PATH_LENGTH,
strokeDashoffset: strokeOffset
})
)
)
);
});
var _templateObject$6 = taggedTemplateLiteral(['\n border-radius: 2px;\n background-color: ', ';\n width: ', '%;\n'], ['\n border-radius: 2px;\n background-color: ', ';\n width: ', '%;\n']),
_templateObject2$5 = taggedTemplateLiteral(['\n border-radius: 2px;\n background-color: ', ';\n flex-grow: 1;\n\n ', ';\n'], ['\n border-radius: 2px;\n background-color: ', ';\n flex-grow: 1;\n\n ', ';\n']),
_templateObject3$4 = taggedTemplateLiteral(['\n height: ', 'px;\n\n ', ' {\n height: ', 'px;\n }\n '], ['\n height: ', 'px;\n\n ', ' {\n height: ', 'px;\n }\n ']);
var Bar = styled.div(_templateObject$6, function (props) {
return props.barColor || orange600;
}, function (props) {
return props.percent || 0;
});
var Container$1 = styled.div(_templateObject2$5, function (props) {
return props.backgroundColor || gray700;
}, function (props) {
return props.height && css(_templateObject3$4, props.height, Bar, props.height);
});
var index$4 = (function (_ref) {
var _ref$percent = _ref.percent,
percent = _ref$percent === undefined ? 0 : _ref$percent,
_ref$height = _ref.height,
height = _ref$height === undefined ? 4 : _ref$height,
backgroundColor = _ref.backgroundColor,
barColor = _ref.barColor,
restProps = objectWithoutProperties(_ref, ['percent', 'height', 'backgroundColor', 'barColor']);
return React.createElement(
Container$1,
_extends({ backgroundColor: backgroundColor, height: height }, restProps),
React.createElement(Bar, { barColor: barColor, percent: Number(percent) > 100 ? 100 : percent })
);
});
export { index as Colors, index$1 as BreakPoints, index$2 as TextStyles, Grid, Col, Row, index$3 as Spinner, index$4 as ProgressBar };
//# sourceMappingURL=index.es.js.map