1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.antvDark = exports.createDarkStyleSheet = void 0;
|
4 | var tslib_1 = require("tslib");
|
5 | var WHITE_COLORS = {
|
6 | 100: '#000',
|
7 | 95: '#0D0D0D',
|
8 | 85: '#262626',
|
9 | 65: '#595959',
|
10 | 45: '#8C8C8C',
|
11 | 25: '#BFBFBF',
|
12 | 15: '#D9D9D9',
|
13 | 6: '#F0F0F0',
|
14 | };
|
15 | var BLACK_COLORS = {
|
16 | 100: '#FFFFFF',
|
17 | 95: '#F2F2F2',
|
18 | 85: '#D9D9D9',
|
19 | 65: '#A6A6A6',
|
20 | 45: '#737373',
|
21 | 25: '#404040',
|
22 | 15: '#262626',
|
23 | 6: '#0F0F0F',
|
24 | };
|
25 | var QUALITATIVE_10 = [
|
26 | '#5B8FF9',
|
27 | '#5AD8A6',
|
28 | '#5D7092',
|
29 | '#F6BD16',
|
30 | '#E86452',
|
31 | '#6DC8EC',
|
32 | '#945FB9',
|
33 | '#FF9845',
|
34 | '#1E9493',
|
35 | '#FF99C3',
|
36 | ];
|
37 | var QUALITATIVE_20 = [
|
38 | '#5B8FF9',
|
39 | '#CDDDFD',
|
40 | '#5AD8A6',
|
41 | '#CDF3E4',
|
42 | '#5D7092',
|
43 | '#CED4DE',
|
44 | '#F6BD16',
|
45 | '#FCEBB9',
|
46 | '#E86452',
|
47 | '#F8D0CB',
|
48 | '#6DC8EC',
|
49 | '#D3EEF9',
|
50 | '#945FB9',
|
51 | '#DECFEA',
|
52 | '#FF9845',
|
53 | '#FFE0C7',
|
54 | '#1E9493',
|
55 | '#BBDEDE',
|
56 | '#FF99C3',
|
57 | '#FFE0ED',
|
58 | ];
|
59 |
|
60 | var SINGLE_SEQUENCE = [
|
61 | '#B8E1FF',
|
62 | '#9AC5FF',
|
63 | '#7DAAFF',
|
64 | '#5B8FF9',
|
65 | '#3D76DD',
|
66 | '#085EC0',
|
67 | '#0047A5',
|
68 | '#00318A',
|
69 | '#001D70',
|
70 | ];
|
71 | var createDarkStyleSheet = function (cfg) {
|
72 | if (cfg === void 0) { cfg = {}; }
|
73 | var _a = cfg.paletteQualitative10, paletteQualitative10 = _a === void 0 ? QUALITATIVE_10 : _a, _b = cfg.paletteQualitative20, paletteQualitative20 = _b === void 0 ? QUALITATIVE_20 : _b;
|
74 | var _c = cfg.brandColor, brandColor = _c === void 0 ? paletteQualitative10[0] : _c;
|
75 | var token = {
|
76 |
|
77 | backgroundColor: '#141414',
|
78 |
|
79 | brandColor: brandColor,
|
80 |
|
81 | subColor: 'rgba(255,255,255,0.05)',
|
82 |
|
83 | paletteQualitative10: paletteQualitative10,
|
84 |
|
85 | paletteQualitative20: paletteQualitative20,
|
86 |
|
87 | paletteSemanticRed: '#F4664A',
|
88 |
|
89 | paletteSemanticGreen: '#30BF78',
|
90 |
|
91 | paletteSemanticYellow: '#FAAD14',
|
92 |
|
93 | paletteSequence: SINGLE_SEQUENCE,
|
94 |
|
95 | fontFamily: "\"Segoe UI\", Roboto, \"Helvetica Neue\", Arial,\n \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\",\n \"Noto Color Emoji\"",
|
96 |
|
97 |
|
98 | axisLineBorderColor: BLACK_COLORS[25],
|
99 |
|
100 | axisLineBorder: 1,
|
101 |
|
102 | axisLineDash: null,
|
103 |
|
104 | axisTitleTextFillColor: BLACK_COLORS[65],
|
105 |
|
106 | axisTitleTextFontSize: 12,
|
107 |
|
108 | axisTitleTextLineHeight: 12,
|
109 |
|
110 | axisTitleTextFontWeight: 'normal',
|
111 |
|
112 | axisTitleSpacing: 12,
|
113 |
|
114 | axisDescriptionIconFillColor: WHITE_COLORS[85],
|
115 |
|
116 | axisTickLineBorderColor: BLACK_COLORS[25],
|
117 |
|
118 | axisTickLineLength: 4,
|
119 |
|
120 | axisTickLineBorder: 1,
|
121 |
|
122 | axisSubTickLineBorderColor: BLACK_COLORS[15],
|
123 |
|
124 | axisSubTickLineLength: 2,
|
125 |
|
126 | axisSubTickLineBorder: 1,
|
127 |
|
128 | axisLabelFillColor: BLACK_COLORS[45],
|
129 |
|
130 | axisLabelFontSize: 12,
|
131 |
|
132 | axisLabelLineHeight: 12,
|
133 |
|
134 | axisLabelFontWeight: 'normal',
|
135 |
|
136 | axisLabelOffset: 8,
|
137 |
|
138 | axisGridBorderColor: BLACK_COLORS[15],
|
139 |
|
140 | axisGridBorder: 1,
|
141 |
|
142 | axisGridLineDash: null,
|
143 |
|
144 |
|
145 | legendTitleTextFillColor: BLACK_COLORS[45],
|
146 |
|
147 | legendTitleTextFontSize: 12,
|
148 |
|
149 | legendTitleTextLineHeight: 21,
|
150 |
|
151 | legendTitleTextFontWeight: 'normal',
|
152 |
|
153 | legendMarkerColor: QUALITATIVE_10[0],
|
154 |
|
155 | legendMarkerSpacing: 8,
|
156 |
|
157 | legendMarkerSize: 4,
|
158 |
|
159 | legendCircleMarkerSize: 4,
|
160 |
|
161 | legendSquareMarkerSize: 4,
|
162 |
|
163 | legendLineMarkerSize: 5,
|
164 |
|
165 | legendItemNameFillColor: BLACK_COLORS[65],
|
166 |
|
167 | legendItemNameFontSize: 12,
|
168 |
|
169 | legendItemNameLineHeight: 12,
|
170 |
|
171 | legendItemNameFontWeight: 'normal',
|
172 |
|
173 | legendItemSpacing: 24,
|
174 |
|
175 | legendItemMarginBottom: 12,
|
176 |
|
177 | legendSpacing: 16,
|
178 |
|
179 | legendPadding: [8, 8, 8, 8],
|
180 |
|
181 | legendHorizontalPadding: [8, 0, 8, 0],
|
182 |
|
183 | legendVerticalPadding: [0, 8, 0, 8],
|
184 |
|
185 |
|
186 | legendPageNavigatorMarkerSize: 12,
|
187 |
|
188 | legendPageNavigatorMarkerInactiveFillColor: BLACK_COLORS[45],
|
189 |
|
190 | legendPageNavigatorMarkerInactiveFillOpacity: 0.45,
|
191 |
|
192 | legendPageNavigatorMarkerFillColor: BLACK_COLORS[45],
|
193 |
|
194 | legendPageNavigatorMarkerFillOpacity: 1,
|
195 |
|
196 | legendPageNavigatorTextFillColor: BLACK_COLORS[65],
|
197 |
|
198 | legendPageNavigatorTextFontSize: 12,
|
199 |
|
200 | sliderRailFillColor: BLACK_COLORS[15],
|
201 |
|
202 | sliderRailBorder: 0,
|
203 |
|
204 | sliderRailBorderColor: null,
|
205 |
|
206 | sliderRailWidth: 100,
|
207 |
|
208 | sliderRailHeight: 12,
|
209 |
|
210 | sliderLabelTextFillColor: BLACK_COLORS[45],
|
211 |
|
212 | sliderLabelTextFontSize: 12,
|
213 |
|
214 | sliderLabelTextLineHeight: 12,
|
215 |
|
216 | sliderLabelTextFontWeight: 'normal',
|
217 |
|
218 | sliderHandlerFillColor: WHITE_COLORS[6],
|
219 |
|
220 | sliderHandlerWidth: 10,
|
221 |
|
222 | sliderHandlerHeight: 14,
|
223 |
|
224 | sliderHandlerBorder: 1,
|
225 |
|
226 | sliderHandlerBorderColor: WHITE_COLORS[25],
|
227 |
|
228 |
|
229 | annotationArcBorderColor: BLACK_COLORS[15],
|
230 |
|
231 | annotationArcBorder: 1,
|
232 |
|
233 | annotationLineBorderColor: BLACK_COLORS[25],
|
234 |
|
235 | annotationLineBorder: 1,
|
236 |
|
237 | annotationLineDash: null,
|
238 |
|
239 | annotationTextFillColor: BLACK_COLORS[65],
|
240 |
|
241 | annotationTextFontSize: 12,
|
242 |
|
243 | annotationTextLineHeight: 12,
|
244 |
|
245 | annotationTextFontWeight: 'normal',
|
246 |
|
247 | annotationTextBorderColor: null,
|
248 |
|
249 | annotationTextBorder: 0,
|
250 |
|
251 | annotationRegionFillColor: BLACK_COLORS[100],
|
252 |
|
253 | annotationRegionFillOpacity: 0.06,
|
254 |
|
255 | annotationRegionBorder: 0,
|
256 |
|
257 | annotationRegionBorderColor: null,
|
258 |
|
259 | annotationDataMarkerLineLength: 16,
|
260 |
|
261 |
|
262 | tooltipCrosshairsBorderColor: BLACK_COLORS[25],
|
263 |
|
264 | tooltipCrosshairsBorder: 1,
|
265 |
|
266 | tooltipCrosshairsLineDash: null,
|
267 |
|
268 | tooltipContainerFillColor: '#1f1f1f',
|
269 | tooltipContainerFillOpacity: 0.95,
|
270 |
|
271 | tooltipContainerShadow: '0px 2px 4px rgba(0,0,0,.5)',
|
272 |
|
273 | tooltipContainerBorderRadius: 3,
|
274 |
|
275 | tooltipTextFillColor: BLACK_COLORS[65],
|
276 |
|
277 | tooltipTextFontSize: 12,
|
278 |
|
279 | tooltipTextLineHeight: 12,
|
280 |
|
281 | tooltipTextFontWeight: 'bold',
|
282 |
|
283 |
|
284 | labelFillColor: BLACK_COLORS[65],
|
285 | labelFillColorDark: '#2c3542',
|
286 | labelFillColorLight: '#ffffff',
|
287 |
|
288 | labelFontSize: 12,
|
289 |
|
290 | labelLineHeight: 12,
|
291 |
|
292 | labelFontWeight: 'normal',
|
293 |
|
294 | labelBorderColor: null,
|
295 |
|
296 | labelBorder: 0,
|
297 |
|
298 | innerLabelFillColor: WHITE_COLORS[100],
|
299 |
|
300 | innerLabelFontSize: 12,
|
301 |
|
302 | innerLabelLineHeight: 12,
|
303 |
|
304 | innerLabelFontWeight: 'normal',
|
305 |
|
306 | innerLabelBorderColor: null,
|
307 |
|
308 | innerLabelBorder: 0,
|
309 |
|
310 | overflowLabelFillColor: BLACK_COLORS[65],
|
311 | overflowLabelFillColorDark: '#2c3542',
|
312 | overflowLabelFillColorLight: '#ffffff',
|
313 |
|
314 | overflowLabelFontSize: 12,
|
315 |
|
316 | overflowLabelLineHeight: 12,
|
317 |
|
318 | overflowLabelFontWeight: 'normal',
|
319 |
|
320 | overflowLabelBorderColor: WHITE_COLORS[100],
|
321 |
|
322 | overflowLabelBorder: 1,
|
323 |
|
324 | labelLineBorder: 1,
|
325 |
|
326 | labelLineBorderColor: BLACK_COLORS[25],
|
327 |
|
328 |
|
329 | cSliderRailHieght: 16,
|
330 |
|
331 | cSliderBackgroundFillColor: '#416180',
|
332 |
|
333 | cSliderBackgroundFillOpacity: 0.05,
|
334 |
|
335 | cSliderForegroundFillColor: '#5B8FF9',
|
336 |
|
337 | cSliderForegroundFillOpacity: 0.15,
|
338 |
|
339 |
|
340 | cSliderHandlerHeight: 24,
|
341 |
|
342 | cSliderHandlerWidth: 10,
|
343 |
|
344 | cSliderHandlerFillColor: '#F7F7F7',
|
345 |
|
346 | cSliderHandlerFillOpacity: 1,
|
347 |
|
348 | cSliderHandlerHighlightFillColor: '#FFF',
|
349 |
|
350 | cSliderHandlerBorderColor: '#BFBFBF',
|
351 |
|
352 | cSliderHandlerBorder: 1,
|
353 |
|
354 | cSliderHandlerBorderRadius: 2,
|
355 |
|
356 |
|
357 | cSliderTextFillColor: '#fff',
|
358 |
|
359 | cSliderTextFillOpacity: 0.45,
|
360 |
|
361 | cSliderTextFontSize: 12,
|
362 |
|
363 | cSliderTextLineHeight: 12,
|
364 |
|
365 | cSliderTextFontWeight: 'normal',
|
366 |
|
367 | cSliderTextBorderColor: null,
|
368 |
|
369 | cSliderTextBorder: 0,
|
370 |
|
371 |
|
372 | scrollbarTrackFillColor: 'rgba(255,255,255,0.65)',
|
373 |
|
374 | scrollbarThumbFillColor: 'rgba(0,0,0,0.35)',
|
375 |
|
376 | scrollbarThumbHighlightFillColor: 'rgba(0,0,0,0.45)',
|
377 |
|
378 |
|
379 | pointFillColor: QUALITATIVE_10[0],
|
380 |
|
381 | pointFillOpacity: 0.95,
|
382 |
|
383 | pointSize: 4,
|
384 |
|
385 | pointBorder: 1,
|
386 |
|
387 | pointBorderColor: WHITE_COLORS[100],
|
388 |
|
389 | pointBorderOpacity: 1,
|
390 |
|
391 | pointActiveBorderColor: BLACK_COLORS[100],
|
392 |
|
393 | pointSelectedBorder: 2,
|
394 |
|
395 | pointSelectedBorderColor: BLACK_COLORS[100],
|
396 |
|
397 | pointInactiveFillOpacity: 0.3,
|
398 |
|
399 | pointInactiveBorderOpacity: 0.3,
|
400 |
|
401 | hollowPointSize: 4,
|
402 |
|
403 | hollowPointBorder: 1,
|
404 |
|
405 | hollowPointBorderColor: QUALITATIVE_10[0],
|
406 |
|
407 | hollowPointBorderOpacity: 0.95,
|
408 | hollowPointFillColor: WHITE_COLORS[100],
|
409 |
|
410 | hollowPointActiveBorder: 1,
|
411 |
|
412 | hollowPointActiveBorderColor: BLACK_COLORS[100],
|
413 |
|
414 | hollowPointActiveBorderOpacity: 1,
|
415 |
|
416 | hollowPointSelectedBorder: 2,
|
417 |
|
418 | hollowPointSelectedBorderColor: BLACK_COLORS[100],
|
419 |
|
420 | hollowPointSelectedBorderOpacity: 1,
|
421 |
|
422 | hollowPointInactiveBorderOpacity: 0.3,
|
423 |
|
424 | lineBorder: 2,
|
425 |
|
426 | lineBorderColor: QUALITATIVE_10[0],
|
427 |
|
428 | lineBorderOpacity: 1,
|
429 |
|
430 | lineActiveBorder: 3,
|
431 |
|
432 | lineSelectedBorder: 3,
|
433 |
|
434 | lineInactiveBorderOpacity: 0.3,
|
435 |
|
436 | areaFillColor: QUALITATIVE_10[0],
|
437 |
|
438 | areaFillOpacity: 0.25,
|
439 |
|
440 | areaActiveFillColor: QUALITATIVE_10[0],
|
441 | areaActiveFillOpacity: 0.5,
|
442 |
|
443 | areaSelectedFillColor: QUALITATIVE_10[0],
|
444 | areaSelectedFillOpacity: 0.5,
|
445 |
|
446 | areaInactiveFillOpacity: 0.3,
|
447 |
|
448 | hollowAreaBorderColor: QUALITATIVE_10[0],
|
449 |
|
450 | hollowAreaBorder: 2,
|
451 |
|
452 | hollowAreaBorderOpacity: 1,
|
453 |
|
454 | hollowAreaActiveBorder: 3,
|
455 | hollowAreaActiveBorderColor: BLACK_COLORS[100],
|
456 |
|
457 | hollowAreaSelectedBorder: 3,
|
458 | hollowAreaSelectedBorderColor: BLACK_COLORS[100],
|
459 |
|
460 | hollowAreaInactiveBorderOpacity: 0.3,
|
461 |
|
462 | intervalFillColor: QUALITATIVE_10[0],
|
463 |
|
464 | intervalFillOpacity: 0.95,
|
465 |
|
466 | intervalActiveBorder: 1,
|
467 |
|
468 | intervalActiveBorderColor: BLACK_COLORS[100],
|
469 | intervalActiveBorderOpacity: 1,
|
470 |
|
471 | intervalSelectedBorder: 2,
|
472 |
|
473 | intervalSelectedBorderColor: BLACK_COLORS[100],
|
474 |
|
475 | intervalSelectedBorderOpacity: 1,
|
476 |
|
477 | intervalInactiveBorderOpacity: 0.3,
|
478 |
|
479 | intervalInactiveFillOpacity: 0.3,
|
480 |
|
481 | hollowIntervalBorder: 2,
|
482 |
|
483 | hollowIntervalBorderColor: QUALITATIVE_10[0],
|
484 |
|
485 | hollowIntervalBorderOpacity: 1,
|
486 | hollowIntervalFillColor: WHITE_COLORS[100],
|
487 |
|
488 | hollowIntervalActiveBorder: 2,
|
489 |
|
490 | hollowIntervalActiveBorderColor: BLACK_COLORS[100],
|
491 |
|
492 | hollowIntervalSelectedBorder: 3,
|
493 |
|
494 | hollowIntervalSelectedBorderColor: BLACK_COLORS[100],
|
495 |
|
496 | hollowIntervalSelectedBorderOpacity: 1,
|
497 |
|
498 | hollowIntervalInactiveBorderOpacity: 0.3,
|
499 | };
|
500 | return tslib_1.__assign(tslib_1.__assign({}, token), cfg);
|
501 | };
|
502 | exports.createDarkStyleSheet = createDarkStyleSheet;
|
503 | exports.antvDark = (0, exports.createDarkStyleSheet)();
|
504 |
|
\ | No newline at end of file |