@cyber-harbour/ui 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +39 -3
- package/dist/index.d.ts +39 -3
- package/dist/index.js +170 -165
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +170 -165
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Core/Header/Header.tsx +1 -1
- package/src/Core/Sidebar/Sidebar.tsx +4 -4
- package/src/Core/Sidebar/SidebarDelimeter.tsx +1 -1
- package/src/Core/Sidebar/SidebarItem.tsx +8 -8
- package/src/Graph2D/Graph2D.tsx +20 -14
- package/src/Graph2D/GraphLoader.tsx +9 -21
- package/src/Layouts/PageLayout/PageLayout.tsx +6 -3
- package/src/Theme/GlobalStyle.tsx +9 -3
- package/src/Theme/ThemeProvider.tsx +9 -3
- package/src/Theme/index.ts +1 -1
- package/src/Theme/themes/config.ts +41 -0
- package/src/Theme/themes/dark.ts +707 -0
- package/src/Theme/themes/index.ts +2 -0
- package/src/Theme/{theme.ts → themes/light.ts} +45 -52
- package/src/Theme/types.ts +28 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DefaultTheme } from 'styled-components/dist/types';
|
|
2
2
|
|
|
3
|
-
import '
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { convertPaletteToRem } from '../utils';
|
|
4
|
+
import { Theme } from '../types';
|
|
5
|
+
import { breakpoints, typography, zIndex } from './config';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Палітра, що містить як кольори, так і розміри в px
|
|
@@ -14,6 +14,7 @@ export const lightThemePx: Theme = {
|
|
|
14
14
|
// Секція кольорів з теми
|
|
15
15
|
colors: {
|
|
16
16
|
background: '#ffffff',
|
|
17
|
+
backgroundBase: '#F7F8FC',
|
|
17
18
|
primary: {
|
|
18
19
|
main: '#0042EC',
|
|
19
20
|
light: '#80A0F5',
|
|
@@ -39,42 +40,9 @@ export const lightThemePx: Theme = {
|
|
|
39
40
|
info: '#2F80ED',
|
|
40
41
|
},
|
|
41
42
|
// Типографія
|
|
42
|
-
typography
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
lineHeight: 1.49,
|
|
46
|
-
// Розміри текстових елементів
|
|
47
|
-
variants: {
|
|
48
|
-
h1: {
|
|
49
|
-
fontSize: 22,
|
|
50
|
-
},
|
|
51
|
-
h2: {
|
|
52
|
-
fontSize: 16,
|
|
53
|
-
},
|
|
54
|
-
h3: {
|
|
55
|
-
fontSize: 14,
|
|
56
|
-
},
|
|
57
|
-
body: {
|
|
58
|
-
fontSize: 12,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
breakpoints: {
|
|
63
|
-
xs: 320,
|
|
64
|
-
s: 576,
|
|
65
|
-
m: 768,
|
|
66
|
-
l: 992,
|
|
67
|
-
xl: 1200,
|
|
68
|
-
},
|
|
69
|
-
zIndex: {
|
|
70
|
-
dropdown: 1000,
|
|
71
|
-
sticky: 1020,
|
|
72
|
-
fixed: 1030,
|
|
73
|
-
backdrop: 1040,
|
|
74
|
-
modal: 1050,
|
|
75
|
-
popover: 1060,
|
|
76
|
-
tooltip: 1070,
|
|
77
|
-
},
|
|
43
|
+
typography,
|
|
44
|
+
breakpoints,
|
|
45
|
+
zIndex,
|
|
78
46
|
line: {
|
|
79
47
|
size: 1,
|
|
80
48
|
color: '#EBEBEB',
|
|
@@ -383,14 +351,14 @@ export const lightThemePx: Theme = {
|
|
|
383
351
|
boxShadow: 'none',
|
|
384
352
|
},
|
|
385
353
|
hover: {
|
|
386
|
-
background: '
|
|
387
|
-
text: '#
|
|
354
|
+
background: 'transparent',
|
|
355
|
+
text: '#0042EC',
|
|
388
356
|
border: 'transparent',
|
|
389
357
|
boxShadow: 'none',
|
|
390
358
|
},
|
|
391
359
|
active: {
|
|
392
|
-
background: '
|
|
393
|
-
text: '#
|
|
360
|
+
background: 'transparent',
|
|
361
|
+
text: '#0042EC',
|
|
394
362
|
border: 'transparent',
|
|
395
363
|
boxShadow: 'none',
|
|
396
364
|
},
|
|
@@ -455,12 +423,13 @@ export const lightThemePx: Theme = {
|
|
|
455
423
|
// Компонент Sidebar
|
|
456
424
|
sidebar: {
|
|
457
425
|
background: '#FFFFFF',
|
|
426
|
+
border: '#EBEBEB',
|
|
458
427
|
width: 224,
|
|
459
428
|
collapsedWidth: 65,
|
|
460
429
|
text: {
|
|
461
|
-
default: '#
|
|
430
|
+
default: '#535353',
|
|
462
431
|
active: '#0042EC',
|
|
463
|
-
hover: '#
|
|
432
|
+
hover: '#0042EC',
|
|
464
433
|
},
|
|
465
434
|
item: {
|
|
466
435
|
default: {
|
|
@@ -470,13 +439,13 @@ export const lightThemePx: Theme = {
|
|
|
470
439
|
height: 40,
|
|
471
440
|
},
|
|
472
441
|
active: {
|
|
473
|
-
background: '#
|
|
442
|
+
background: '#E5ECFD',
|
|
474
443
|
borderLeft: '2px solid #0042EC',
|
|
475
444
|
padding: '10px 16px',
|
|
476
445
|
height: 40,
|
|
477
446
|
},
|
|
478
447
|
hover: {
|
|
479
|
-
background: '#
|
|
448
|
+
background: '#F3F7FF',
|
|
480
449
|
border: 'transparent',
|
|
481
450
|
padding: '10px 16px',
|
|
482
451
|
height: 40,
|
|
@@ -492,7 +461,7 @@ export const lightThemePx: Theme = {
|
|
|
492
461
|
},
|
|
493
462
|
},
|
|
494
463
|
delimeter: {
|
|
495
|
-
color: '#
|
|
464
|
+
color: '#C7C5C5',
|
|
496
465
|
thickness: 1,
|
|
497
466
|
margin: '8px 0',
|
|
498
467
|
},
|
|
@@ -525,7 +494,7 @@ export const lightThemePx: Theme = {
|
|
|
525
494
|
},
|
|
526
495
|
},
|
|
527
496
|
delimeter: {
|
|
528
|
-
color: '#
|
|
497
|
+
color: '#C7C5C5',
|
|
529
498
|
thickness: 1,
|
|
530
499
|
marginInline: 12,
|
|
531
500
|
marginBlock: 3,
|
|
@@ -594,7 +563,7 @@ export const lightThemePx: Theme = {
|
|
|
594
563
|
boxShadow: 'none',
|
|
595
564
|
},
|
|
596
565
|
},
|
|
597
|
-
delimiterColor: '#
|
|
566
|
+
delimiterColor: '#C7C5C5',
|
|
598
567
|
icon: {
|
|
599
568
|
size: 16,
|
|
600
569
|
},
|
|
@@ -706,8 +675,32 @@ export const lightThemePx: Theme = {
|
|
|
706
675
|
},
|
|
707
676
|
background: '#FFFFFF',
|
|
708
677
|
},
|
|
678
|
+
// Graph2D
|
|
679
|
+
graph2D: {
|
|
680
|
+
ring: {
|
|
681
|
+
highlightFill: 'rgba(255, 165, 0, 0.3)',
|
|
682
|
+
},
|
|
683
|
+
button: {
|
|
684
|
+
stroke: '#e5e5e5',
|
|
685
|
+
normalFill: 'rgba(255, 255, 255, 0.8)',
|
|
686
|
+
hoverFill: 'rgba(230, 230, 230, 0.9)',
|
|
687
|
+
},
|
|
688
|
+
grid: {
|
|
689
|
+
dotColor: 'rgba(0, 0, 0, 0.5)',
|
|
690
|
+
},
|
|
691
|
+
link: {
|
|
692
|
+
normal: '#999',
|
|
693
|
+
highlighted: '#ff9900',
|
|
694
|
+
textColor: '#666',
|
|
695
|
+
highlightedTextColor: '#663300',
|
|
696
|
+
textBgColor: 'rgba(255, 255, 255, 0.8)',
|
|
697
|
+
highlightedTextBgColor: 'rgba(255, 230, 204, 0.9)',
|
|
698
|
+
},
|
|
699
|
+
},
|
|
700
|
+
contentLoader: {
|
|
701
|
+
foreground: '#535353',
|
|
702
|
+
background: '#99989C',
|
|
703
|
+
},
|
|
709
704
|
};
|
|
710
705
|
|
|
711
|
-
// Конвертуємо всі розміри з px в rem
|
|
712
706
|
export const lightTheme = convertPaletteToRem(lightThemePx, lightThemePx.baseSize) as DefaultTheme;
|
|
713
|
-
export const darkTheme = convertPaletteToRem(lightThemePx, lightThemePx.baseSize) as DefaultTheme;
|
package/src/Theme/types.ts
CHANGED
|
@@ -62,6 +62,7 @@ export type Theme = {
|
|
|
62
62
|
baseSize: number;
|
|
63
63
|
colors: {
|
|
64
64
|
background: string;
|
|
65
|
+
backgroundBase: string;
|
|
65
66
|
primary: {
|
|
66
67
|
main: string;
|
|
67
68
|
light: string;
|
|
@@ -118,6 +119,7 @@ export type Theme = {
|
|
|
118
119
|
};
|
|
119
120
|
sidebar: {
|
|
120
121
|
background: string;
|
|
122
|
+
border: string;
|
|
121
123
|
width: number;
|
|
122
124
|
collapsedWidth: number;
|
|
123
125
|
text: {
|
|
@@ -205,6 +207,32 @@ export type Theme = {
|
|
|
205
207
|
color: string;
|
|
206
208
|
};
|
|
207
209
|
};
|
|
210
|
+
// Graph2D component
|
|
211
|
+
graph2D: {
|
|
212
|
+
ring: {
|
|
213
|
+
highlightFill: string;
|
|
214
|
+
};
|
|
215
|
+
button: {
|
|
216
|
+
stroke: string;
|
|
217
|
+
normalFill: string;
|
|
218
|
+
hoverFill: string;
|
|
219
|
+
};
|
|
220
|
+
grid: {
|
|
221
|
+
dotColor: string;
|
|
222
|
+
};
|
|
223
|
+
link: {
|
|
224
|
+
normal: string;
|
|
225
|
+
highlighted: string;
|
|
226
|
+
textColor: string;
|
|
227
|
+
highlightedTextColor: string;
|
|
228
|
+
textBgColor: string;
|
|
229
|
+
highlightedTextBgColor: string;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
contentLoader: {
|
|
233
|
+
foreground: string;
|
|
234
|
+
background: string;
|
|
235
|
+
};
|
|
208
236
|
};
|
|
209
237
|
|
|
210
238
|
//TODO check and refactoring
|