1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.CTCMercuryStyleTemplates = exports.languagePickerTemplates = exports.modalStyleTemplates = exports.testStyles = exports.switchStyleTemplates = exports.buttonStyles = exports.cardStyles = undefined;
|
7 |
|
8 | var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
9 |
|
10 | var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
11 |
|
12 | var _buttonStyles;
|
13 |
|
14 | var _react = require('react');
|
15 |
|
16 | var _react2 = _interopRequireDefault(_react);
|
17 |
|
18 | var _helperFunctions = require('./helperFunctions');
|
19 |
|
20 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21 |
|
22 | var cardStyles = exports.cardStyles = {
|
23 | none: {
|
24 | baseContainerStyle: {},
|
25 | baseImageStyle: {
|
26 | backgroundRepeat: 'no-repeat',
|
27 | backgroundPosition: 'center',
|
28 | backgroundSize: 'contain'
|
29 | },
|
30 | baseSternStyle: {},
|
31 | baseStarboardStyle: {},
|
32 | baseTitleStyle: {},
|
33 | baseSubtitleStyle: {}
|
34 | },
|
35 | neutral: {
|
36 | baseContainerStyle: {
|
37 | backgroundColor: 'rgba(255, 255, 255, 0.8)',
|
38 | position: 'relative',
|
39 | padding: '0.5rem 1rem',
|
40 | marginLeft: '1rem',
|
41 | minWidth: '16rem'
|
42 | },
|
43 | baseImageStyle: {
|
44 | overflow: 'hidden',
|
45 | backgroundPosition: 'center',
|
46 | marginBottom: '8px',
|
47 | borderRadius: '3px 3px 0',
|
48 | display: 'flex',
|
49 | backgroundRepeat: 'no-repeat',
|
50 | backgroundSize: 'contain',
|
51 | height: '19rem'
|
52 | },
|
53 | baseSternStyle: {},
|
54 | baseStarboardStyle: {},
|
55 | baseTitleStyle: { textAlign: 'center', padding: '5px' },
|
56 | baseSubtitleStyle: { textAlign: 'center', padding: '5px' }
|
57 | }
|
58 | };
|
59 | var buttonStyles = exports.buttonStyles = (_buttonStyles = {
|
60 | vivid: {
|
61 | transition: 'darken',
|
62 | on: { backgroundColor: '#33aaff', color: '#fff' },
|
63 | off: { backgroundColor: '#ffbb33', color: '#333333' }
|
64 | },
|
65 | exotic: {
|
66 | transition: 'saturate',
|
67 | on: { backgroundColor: '#770077', color: '#ffff00' },
|
68 | off: { backgroundColor: '#ffff00', color: '#770077' }
|
69 | },
|
70 | facebook: {
|
71 | transition: 'darken',
|
72 | off: { backgroundColor: '#4267b2', color: '#eeeeee' },
|
73 | on: { backgroundColor: '#e4e4e4', color: '#333333' },
|
74 | diff: 5
|
75 | },
|
76 | google: {
|
77 | transition: 'darken',
|
78 | off: { backgroundColor: '#fff', color: '#5f646d' },
|
79 | on: { backgroundColor: '#e4e4e4', color: '#333333' },
|
80 | diff: 5
|
81 | },
|
82 | link: {
|
83 | on: { color: '#00ffff', backgroundColor: '#fff0' },
|
84 | off: { color: '#444444', backgroundColor: '#fff0' },
|
85 | disabled: { color: '#d33' },
|
86 | transition: 'mix',
|
87 | diff: 40
|
88 | },
|
89 | cream: {
|
90 | on: { color: '#fff', backgroundColor: 'rgb(200, 115, 0)' },
|
91 | off: { color: '#fff', backgroundColor: 'rgb(148, 115, 0)' },
|
92 | disabled: { color: '#d33' },
|
93 | transition: 'mix',
|
94 | diff: 40
|
95 | },
|
96 | linkOpaque: {
|
97 | on: { backgroundColor: '#ccc', color: '#fff' },
|
98 | off: { backgroundColor: '#fff', color: '#050505' },
|
99 | disabled: { color: '#d33' },
|
100 | transition: 'mix',
|
101 | diff: 40
|
102 | },
|
103 | neutral: {
|
104 | transition: 'darken',
|
105 | on: { backgroundColor: '#dddddd', color: '#000000' },
|
106 | off: { backgroundColor: '#ffffff', color: '#000000' },
|
107 | disabled: { backgroundColor: '#ccc', color: '#888' },
|
108 | diff: 30
|
109 | },
|
110 | arcticsunriseWarm: {
|
111 | transition: 'mix',
|
112 | on: { backgroundColor: '#ba7284', color: '#000000' },
|
113 | off: { backgroundColor: '#fcb796', color: '#000000' },
|
114 | disabled: { backgroundColor: '#ccc', color: '#888' },
|
115 | diff: 30
|
116 | },
|
117 | arcticsunriseCold: {
|
118 | transition: 'mix',
|
119 | on: { backgroundColor: '#2d4d7c', color: '#ffffff' },
|
120 | off: { backgroundColor: '#4666a6', color: '#ffffff' },
|
121 | disabled: { backgroundColor: '#ccc', color: '#888' },
|
122 | diff: 30
|
123 | },
|
124 | mildneutral: {
|
125 | transition: 'darken',
|
126 | on: { backgroundColor: '#eeeeee', color: '#000000' },
|
127 | off: { backgroundColor: '#ffffff', color: '#000000' },
|
128 | disabled: { backgroundColor: '#ccc', color: '#888' },
|
129 | diff: 30
|
130 | },
|
131 | smoke: {
|
132 | transition: 'mix',
|
133 | on: { backgroundColor: '#ccc' },
|
134 | off: { backgroundColor: '#eee' },
|
135 | diff: 30
|
136 | },
|
137 | darksmoke: {
|
138 | transition: 'mix',
|
139 | on: { backgroundColor: '#aaa' },
|
140 | off: { backgroundColor: '#ccc' }
|
141 | },
|
142 | transparentNeutral: {
|
143 | transition: 'mix',
|
144 | on: { backgroundColor: '#aaa9' },
|
145 | off: { backgroundColor: '#0000' },
|
146 | disabled: { backgroundColor: '#ccc', color: '#888' },
|
147 | diff: 30
|
148 | },
|
149 | semiTransparentNeutral: {
|
150 | transition: 'mix',
|
151 | on: { backgroundColor: '#aaa9' },
|
152 | off: { backgroundColor: '#dadada99' },
|
153 | disabled: { backgroundColor: '#ccc', color: '#888' },
|
154 | diff: 30
|
155 | },
|
156 |
|
157 | vampire: {
|
158 | transition: 'mix',
|
159 | on: { backgroundColor: '#bb2222', color: '#eeeeee' },
|
160 | off: { backgroundColor: '#e4e4e4', color: '#333333' },
|
161 | diff: 20
|
162 | },
|
163 |
|
164 | redden: {
|
165 | transition: 'mix',
|
166 | on: { backgroundColor: '#ff8888', color: '#eeeeee' },
|
167 | off: { backgroundColor: '#0000', color: '#333333' },
|
168 | diff: 25
|
169 | },
|
170 | verdant: {
|
171 | transition: 'mix',
|
172 | on: { backgroundColor: '#66bb66', color: '#fff' },
|
173 | off: { backgroundColor: '#0000', color: '#333333' },
|
174 | diff: 20
|
175 | },
|
176 | traffic: {
|
177 | transition: 'contrast',
|
178 | on: { backgroundColor: '#dd3333', color: '#eeeeee' },
|
179 | off: { backgroundColor: '#33dd33', color: '#333333' },
|
180 | diff: 20
|
181 | },
|
182 | delphinium: {
|
183 | transition: 'mix',
|
184 | on: { backgroundColor: '#dd33dd88', color: '#111' },
|
185 | off: { backgroundColor: '#ffffff', color: '#111' },
|
186 | diff: 25
|
187 | },
|
188 | lisanthus: {
|
189 | transition: 'saturate',
|
190 | on: { backgroundColor: '#591b64', color: '#eee' },
|
191 | off: { backgroundColor: '#ffffff', color: '#414' },
|
192 | disabled: { backgroundColor: '#ffffff', color: '#777' },
|
193 | diff: 25
|
194 | },
|
195 | darken: {
|
196 | transition: 'mix',
|
197 | on: { backgroundColor: '#eeee' },
|
198 | off: { backgroundColor: '#3333' },
|
199 | diff: 20
|
200 | },
|
201 | yolk: {
|
202 | transition: 'mix',
|
203 | on: { backgroundColor: '#fcd12a', color: '#000000' },
|
204 | off: { backgroundColor: '#fcf4a3', color: '#000000' },
|
205 | diff: 20
|
206 | },
|
207 | monochrome: {
|
208 | transition: 'mix',
|
209 | on: { backgroundColor: '#333333', color: '#f4f4f4' },
|
210 | off: { backgroundColor: '#fafafa', color: '#333333' },
|
211 | diff: 20
|
212 | },
|
213 | icewind: {
|
214 | transition: 'mix',
|
215 | on: { backgroundColor: '#004', color: '#f4f4f4' },
|
216 | off: { backgroundColor: '#ddf8', color: '#333333' },
|
217 | diff: 40
|
218 | },
|
219 | surfing: {
|
220 | transition: 'mix',
|
221 | on: { backgroundColor: '#003b46', color: '#eeffff' },
|
222 | off: { backgroundColor: '#c4dfe6', color: '#001924' },
|
223 | diff: 10
|
224 | },
|
225 | highlight: {
|
226 | transition: 'mix',
|
227 | on: { backgroundColor: '#eeea' },
|
228 | off: { backgroundColor: '#3333' },
|
229 | disabled: { backgroundColor: '#ccc', color: '#888' },
|
230 | diff: 30
|
231 | },
|
232 | darkhighlight: {
|
233 | transition: 'mix',
|
234 | on: { backgroundColor: '#bbba', color: '#504147' },
|
235 | off: { backgroundColor: '#8883', color: '#504147' },
|
236 | disabled: { backgroundColor: '#ccc', color: '#888' },
|
237 | diff: 30
|
238 | },
|
239 | monochromeTransparent: {
|
240 | tag: 'monochromeTransparent',
|
241 | transition: 'mix',
|
242 | on: { backgroundColor: '#333333bb', color: '#f4f4f4' },
|
243 | off: { backgroundColor: '#fafafabb', color: '#333333' },
|
244 | diff: 20
|
245 | }
|
246 | }, (0, _defineProperty3.default)(_buttonStyles, 'smoke', {
|
247 | transition: 'mix',
|
248 | on: { backgroundColor: '#ccc' },
|
249 | off: { backgroundColor: '#eee' },
|
250 | diff: 30
|
251 | }), (0, _defineProperty3.default)(_buttonStyles, 'lightsmoke', {
|
252 | transition: 'mix',
|
253 | on: { backgroundColor: '#d7d7d7' },
|
254 | off: { backgroundColor: '#f7f7f7' },
|
255 | diff: 30
|
256 | }), _buttonStyles);
|
257 | var switchStyleTemplates = exports.switchStyleTemplates = {
|
258 | default: {
|
259 | option: {
|
260 | cursor: 'pointer'
|
261 | },
|
262 | content: {
|
263 | transition: 'all 150ms ease-in-out'
|
264 | }
|
265 | }
|
266 | };
|
267 |
|
268 | var testStyles = exports.testStyles = {
|
269 | test1: {
|
270 | container: {
|
271 | position: 'relative',
|
272 | cursor: 'default',
|
273 | margin: '0 1rem',
|
274 | opacity: '1',
|
275 | color: '#020202',
|
276 | background: '#aaa',
|
277 | border: '1px solid #575757',
|
278 | zIndex: '0',
|
279 | borderRadius: '0.375rem'
|
280 | },
|
281 | getBody: function getBody(_ref) {
|
282 | var hasHeader = _ref.hasHeader,
|
283 | hasFooter = _ref.hasFooter,
|
284 | hasCloseModalButton = _ref.hasCloseModalButton;
|
285 |
|
286 | return {
|
287 | background: '#fed',
|
288 | padding: '2.4rem 2rem',
|
289 | overflowY: 'auto',
|
290 | borderRadius: (hasHeader ? '0 0' : hasCloseModalButton ? '0.375rem 0' : '0.375rem 0.375rem') + ' ' + (hasFooter ? '0 0' : '0.375rem 0.375rem')
|
291 | };
|
292 | },
|
293 | body: {
|
294 | background: '#fdfdfd',
|
295 | padding: '2.4rem 2rem',
|
296 | overflowY: 'auto'
|
297 | },
|
298 | background: {
|
299 | position: 'fixed',
|
300 | height: '100%',
|
301 | top: '0',
|
302 | left: '0',
|
303 | width: '100%',
|
304 | background: 'rgba(0, 0, 0, 0.5)',
|
305 | zIndex: '2',
|
306 | display: 'flex',
|
307 | alignItems: 'center',
|
308 | justifyContent: 'center',
|
309 | WebkitTapHighlightColor: 'transparent'
|
310 | },
|
311 | getHeader: function getHeader(_ref2) {
|
312 | var hasCloseModalButton = _ref2.hasCloseModalButton;
|
313 |
|
314 | return {
|
315 | display: 'flex',
|
316 | alignItems: 'center',
|
317 | justifyContent: 'center',
|
318 | margin: '0',
|
319 | padding: '2rem 2rem 1.5rem 2rem',
|
320 | borderBottom: '0.5rem solid #f0f0f0',
|
321 | background: '#444',
|
322 | borderRadius: hasCloseModalButton ? '0.375rem 0 0.375rem 0.375rem' : '0.375rem'
|
323 | };
|
324 | },
|
325 |
|
326 | buttons: {
|
327 | borderTop: '1px solid #575757',
|
328 | borderRadius: '0 0 0.375rem 0.375rem ',
|
329 | padding: '0.5rem',
|
330 | background: '#fafafa',
|
331 | display: 'flex',
|
332 | alignItems: 'center',
|
333 | justifyContent: 'flex-end'
|
334 | },
|
335 | closemodalbutton: {
|
336 | zIndex: 2,
|
337 | top: '2rem',
|
338 | right: '2rem',
|
339 | position: 'fixed',
|
340 | height: '1.75rem',
|
341 | cursor: 'pointer',
|
342 | background: '#fff',
|
343 | borderTop: '1px solid #575757',
|
344 | borderLeft: '1px solid #575757',
|
345 | borderRight: '1px solid #575757',
|
346 | borderRadius: '1rem',
|
347 | display: 'flex'
|
348 | }
|
349 | }
|
350 | };
|
351 | var modalStyleTemplates = exports.modalStyleTemplates = {
|
352 | basic: {
|
353 | container: {
|
354 | position: 'relative',
|
355 | cursor: 'default',
|
356 | background: '#fff'
|
357 | },
|
358 | getHeader: function getHeader() {
|
359 | return {};
|
360 | },
|
361 | getBody: function getBody() {
|
362 | return {};
|
363 | },
|
364 | body: {
|
365 | opacity: 1
|
366 | },
|
367 | background: {
|
368 | zIndex: 2,
|
369 | background: '#000a',
|
370 | position: 'fixed',
|
371 | height: '100%',
|
372 | top: '0',
|
373 | left: '0',
|
374 | width: '100%',
|
375 | display: 'flex',
|
376 | alignItems: 'center',
|
377 | justifyContent: 'center'
|
378 | },
|
379 | header: {},
|
380 | buttons: {},
|
381 | closemodalbutton: {
|
382 | zIndex: 1,
|
383 | cursor: 'pointer',
|
384 | position: 'absolute'
|
385 | }
|
386 | },
|
387 | default: {
|
388 | container: {},
|
389 | body: {},
|
390 | background: {},
|
391 | header: {},
|
392 | buttons: {},
|
393 | closemodalbutton: {}
|
394 | }
|
395 | };
|
396 | var languagePickerTemplates = exports.languagePickerTemplates = {
|
397 | none: {
|
398 | children: {
|
399 | position: 'absolute'
|
400 | },
|
401 | item: {},
|
402 | trigger: {}
|
403 | },
|
404 | default: {
|
405 | children: {
|
406 | position: 'absolute'
|
407 | },
|
408 | item: {
|
409 | width: '2.5rem',
|
410 | height: '2rem',
|
411 | backgroundRepeat: 'no-repeat',
|
412 | backgroundPosition: 'center',
|
413 | backgroundSize: '80%'
|
414 | },
|
415 | trigger: {
|
416 | width: '2.5rem',
|
417 | height: '2rem',
|
418 | backgroundRepeat: 'no-repeat',
|
419 | backgroundPosition: 'center',
|
420 | backgroundSize: '80%'
|
421 | }
|
422 | }
|
423 | };
|
424 |
|
425 | var CTCMercuryStyleTemplates = exports.CTCMercuryStyleTemplates = {
|
426 | default: {
|
427 | buttonColors: buttonStyles.neutral,
|
428 | getBarStyle: function getBarStyle(isOn) {
|
429 | return {
|
430 | transition: 'flex-grow 0.5s linear',
|
431 | padding: '0.25rem 0'
|
432 | };
|
433 | },
|
434 | getSideBarsStyle: function getSideBarsStyle(isOn) {
|
435 | return {
|
436 | flexGrow: isOn ? 0.5 : 1,
|
437 | backgroundColor: '#111',
|
438 | height: '1rem'
|
439 | };
|
440 | },
|
441 | getLeftBarStyle: function getLeftBarStyle(isOn) {
|
442 | return {};
|
443 | },
|
444 | getRightBarStyle: function getRightBarStyle(isOn) {
|
445 | return {};
|
446 | },
|
447 | getCenterBarStyle: function getCenterBarStyle(isOn) {
|
448 | return {
|
449 | flexGrow: isOn ? 1 : 0.5
|
450 | };
|
451 | }
|
452 | },
|
453 | weird: {
|
454 | buttonColors: buttonStyles.vivid,
|
455 | getBarStyle: function getBarStyle(isOn) {
|
456 | return {
|
457 | transition: 'flex-grow 0.5s linear',
|
458 | padding: '0.25rem 0'
|
459 | };
|
460 | },
|
461 | getSideBarsStyle: function getSideBarsStyle(isOn) {
|
462 | return {
|
463 | flexGrow: isOn ? 0.2 : 1,
|
464 | backgroundColor: isOn ? '#3c3' : '#464',
|
465 | height: '0.5rem'
|
466 | };
|
467 | },
|
468 | getLeftBarStyle: function getLeftBarStyle(isOn) {
|
469 | return {};
|
470 | },
|
471 | getRightBarStyle: function getRightBarStyle(isOn) {
|
472 | return {};
|
473 | },
|
474 | getCenterBarStyle: function getCenterBarStyle(isOn) {
|
475 | return {
|
476 | flexGrow: isOn ? 1 : 0.2,
|
477 | backgroundColor: '#000',
|
478 | color: '#fff'
|
479 | };
|
480 | }
|
481 | }
|
482 | }; |
\ | No newline at end of file |