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