@mailstep/design-system 0.8.16-beta.1 → 0.8.16-beta.11

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.
Files changed (40) hide show
  1. package/package.json +12 -6
  2. package/ui/Blocks/CommonGrid/components/ColumnTitle.js +4 -2
  3. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.d.ts +1 -1
  4. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +2 -1
  5. package/ui/Blocks/CommonGrid/components/Filters/TextRange/TextRange.js +1 -1
  6. package/ui/Blocks/CommonGrid/components/MobileFilterModal.js +2 -2
  7. package/ui/Blocks/CommonGrid/components/MobileSortModal.js +1 -1
  8. package/ui/Blocks/CommonGrid/components/QuickFilter/QuickFilter.js +1 -4
  9. package/ui/Blocks/CommonGrid/components/Table.js +1 -1
  10. package/ui/Blocks/CommonGrid/styles.js +1 -1
  11. package/ui/Blocks/Header/components/MenuItems/styles.js +1 -1
  12. package/ui/Blocks/Header/hooks/useChangeLanguage.js +0 -1
  13. package/ui/Blocks/Header/styles.js +2 -2
  14. package/ui/Blocks/LanguageSwitch/LanguageSwitch.js +10 -5
  15. package/ui/Blocks/LanguageSwitch/styles.d.ts +0 -5
  16. package/ui/Blocks/LanguageSwitch/styles.js +3 -11
  17. package/ui/Blocks/Modal/styles.js +8 -8
  18. package/ui/Blocks/SideMenu/components/HamburgerMenu.js +2 -3
  19. package/ui/Elements/DropdownMenu/components/DefaultItem.js +1 -1
  20. package/ui/Elements/Icon/icons/FlagHU.js +1 -1
  21. package/ui/Elements/Select/components/CountMultiValue.js +2 -2
  22. package/ui/Elements/Select/themes/selectStyles.js +15 -15
  23. package/ui/Forms/Checkbox/styles.js +2 -2
  24. package/ui/Forms/Input/styles.js +2 -2
  25. package/ui/ThemeProvider/ThemeProvider.d.ts +2 -1
  26. package/ui/ThemeProvider/ThemeProvider.js +1 -1
  27. package/ui/ThemeProvider/themes/dark.d.ts +153 -0
  28. package/ui/ThemeProvider/themes/dark.js +14 -0
  29. package/ui/ThemeProvider/themes/default.d.ts +1 -0
  30. package/ui/ThemeProvider/themes/default.js +10 -9
  31. package/ui/ThemeProvider/themes/index.d.ts +153 -1
  32. package/ui/ThemeProvider/themes/index.js +3 -3
  33. package/ui/ThemeProvider/types.d.ts +13 -33
  34. package/ui/index.es.js +8183 -8190
  35. package/ui/index.umd.js +232 -259
  36. package/ui/utils/index.js +1 -1
  37. package/ui/utils/translations.d.ts +4 -1
  38. package/ui/utils/translations.js +2 -2
  39. package/ui/ThemeProvider/themes/light.d.ts +0 -4
  40. package/ui/ThemeProvider/themes/light.js +0 -7
@@ -1,5 +1,6 @@
1
+ import { FC } from 'react';
1
2
  import { Props } from './types';
2
3
 
3
4
  export declare const LanguageContext: import('react').Context<string>;
4
- declare const MailstepThemeProvider: ({ children, theme, preflight, language }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ declare const MailstepThemeProvider: FC<Props>;
5
6
  export default MailstepThemeProvider;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createContext } from 'react';
2
3
  import { ThemeProvider, Preflight } from '@xstyled/styled-components';
3
4
  import themes from './themes';
4
- import { createContext } from 'react';
5
5
  export var LanguageContext = createContext('en');
6
6
  var MailstepThemeProvider = function (_a) {
7
7
  var children = _a.children, _b = _a.theme, theme = _b === void 0 ? 'default' : _b, _c = _a.preflight, preflight = _c === void 0 ? true : _c, _d = _a.language, language = _d === void 0 ? 'en' : _d;
@@ -0,0 +1,153 @@
1
+ declare const darkTheme: {
2
+ colors: {
3
+ bgLightGray: string;
4
+ bgLightGray1: string;
5
+ typoPrimary: string;
6
+ textPrimary: string;
7
+ white: string;
8
+ lightGray7: string;
9
+ neutral20: string;
10
+ red1: string;
11
+ red20: string;
12
+ red30: string;
13
+ blue2: string;
14
+ lightGray1: string;
15
+ blue3: string;
16
+ lightGray2: string;
17
+ lightGray3: string;
18
+ lightGray4: string;
19
+ lightGray5: string;
20
+ lightGray6: string;
21
+ neutral10: string;
22
+ neutral300: string;
23
+ neutral500: string;
24
+ gray: string;
25
+ gray1: string;
26
+ gray2: string;
27
+ gray3: string;
28
+ gray4: string;
29
+ gray5: string;
30
+ blue1: string;
31
+ blue4: string;
32
+ textTertiary: string;
33
+ blue10: string;
34
+ blue20: string;
35
+ blue30: string;
36
+ blue40: string;
37
+ blue50: string;
38
+ blue60: string;
39
+ blue70: string;
40
+ blue80: string;
41
+ blue90: string;
42
+ teal20: string;
43
+ teal40: string;
44
+ teal50: string;
45
+ teal60: string;
46
+ teal70: string;
47
+ teal80: string;
48
+ teal90: string;
49
+ green10: string;
50
+ green20: string;
51
+ green30: string;
52
+ green50: string;
53
+ green60: string;
54
+ green70: string;
55
+ green80: string;
56
+ green90: string;
57
+ green: string;
58
+ successColor: string;
59
+ darkGreen: string;
60
+ orange20: string;
61
+ orange30: string;
62
+ orange50: string;
63
+ orange60: string;
64
+ orange80: string;
65
+ yellow10: string;
66
+ yellow20: string;
67
+ yellow60: string;
68
+ yellow70: string;
69
+ yellow1: string;
70
+ yellow2: string;
71
+ red10: string;
72
+ red50: string;
73
+ red70: string;
74
+ red2: string;
75
+ red3: string;
76
+ red60: string;
77
+ red80: string;
78
+ dangerColor: string;
79
+ purple20: string;
80
+ purple40: string;
81
+ purple50: string;
82
+ purple60: string;
83
+ purple80: string;
84
+ purple90: string;
85
+ magenta10: string;
86
+ magenta20: string;
87
+ magenta30: string;
88
+ magenta40: string;
89
+ magenta50: string;
90
+ magenta60: string;
91
+ magenta70: string;
92
+ magenta80: string;
93
+ magenta90: string;
94
+ };
95
+ shadows: {
96
+ dialogShadow: string;
97
+ boxShadow: string;
98
+ dropShadow: string;
99
+ inputFocusBoxShadow: string;
100
+ dropdownMenuShadow: string;
101
+ tooltipBoxShadow: string;
102
+ cardShadow: string;
103
+ smooth: string;
104
+ headerShadow: string;
105
+ headerShadowB: string;
106
+ headerShadowNotifications: string;
107
+ cornerDialogShadow: string;
108
+ gridShadow: string;
109
+ tooltipShadow: string;
110
+ };
111
+ breakpoints: string[];
112
+ fonts: {
113
+ primary: string;
114
+ heading: string;
115
+ };
116
+ fontLinks: string[];
117
+ fontSizes: string[];
118
+ lineHeights: number[];
119
+ fontWeights: {
120
+ light: number;
121
+ normal: number;
122
+ medium: number;
123
+ semiBold: number;
124
+ bold: number;
125
+ };
126
+ letterSpacings: {
127
+ default: null;
128
+ sm: string;
129
+ md: string;
130
+ lg: string;
131
+ };
132
+ borders: {
133
+ slim: string;
134
+ mediumSlim: string;
135
+ medium: string;
136
+ mediumThick: string;
137
+ thick: string;
138
+ };
139
+ radii: {
140
+ sm: string;
141
+ md: string;
142
+ ml: string;
143
+ lg: string;
144
+ xl: string;
145
+ };
146
+ space: number[];
147
+ transitions: {
148
+ simpleLong: string;
149
+ inputTransition: string;
150
+ };
151
+ zIndices: number[];
152
+ };
153
+ export default darkTheme;
@@ -0,0 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import defaultTheme from './default';
13
+ var darkTheme = __assign(__assign({}, defaultTheme), { colors: __assign(__assign({}, defaultTheme.colors), { bgLightGray: '#131A27', bgLightGray1: '#2a4054', typoPrimary: '#ffffff', textPrimary: '#ffffff', white: '#2a4054', lightGray7: '#5f5f5f', neutral20: '#2a4054', red1: '#d0d0d0', red20: '#5f5f5f', red30: '#8594A5', blue2: '#ffffff', lightGray1: '#162C3F', blue3: '#2a4054' }), shadows: __assign(__assign({}, defaultTheme.shadows), { dialogShadow: '0px 4px 23px 0px rgba(255, 255, 255, 0.08)' }) });
14
+ export default darkTheme;
@@ -11,6 +11,7 @@ declare const defaultTheme: {
11
11
  lightGray5: string;
12
12
  lightGray6: string;
13
13
  lightGray7: string;
14
+ neutral10: string;
14
15
  neutral20: string;
15
16
  neutral300: string;
16
17
  neutral500: string;
@@ -11,6 +11,7 @@ var defaultTheme = {
11
11
  lightGray5: '#A3B3C1',
12
12
  lightGray6: '#D2D8DF',
13
13
  lightGray7: '#E7EBEF',
14
+ neutral10: '#FAFBFC',
14
15
  neutral20: '#F1F5F9',
15
16
  neutral300: '#5E6C84',
16
17
  neutral500: '#42526E',
@@ -90,11 +91,11 @@ var defaultTheme = {
90
91
  magenta60: '#EE5396',
91
92
  magenta70: '#D12771',
92
93
  magenta80: '#9F1853',
93
- magenta90: '#7B1340',
94
+ magenta90: '#7B1340'
94
95
  },
95
96
  fonts: {
96
97
  primary: 'Inter, sans-serif',
97
- heading: 'Inter, sans-serif',
98
+ heading: 'Inter, sans-serif'
98
99
  },
99
100
  fontLinks: ['https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'],
100
101
  fontSizes: ['10px', '12px', '14px', '16px', '18px', '21px', '24px', '32px'],
@@ -104,20 +105,20 @@ var defaultTheme = {
104
105
  normal: 400,
105
106
  medium: 500,
106
107
  semiBold: 600,
107
- bold: 700,
108
+ bold: 700
108
109
  },
109
110
  letterSpacings: {
110
111
  default: null,
111
112
  sm: '2px',
112
113
  md: '4px',
113
- lg: '8px',
114
+ lg: '8px'
114
115
  },
115
116
  borders: {
116
117
  slim: '1px solid',
117
118
  mediumSlim: '2px solid',
118
119
  medium: '3px solid',
119
120
  mediumThick: '6px solid',
120
- thick: '10px solid',
121
+ thick: '10px solid'
121
122
  },
122
123
  // ...........................
123
124
  radii: {
@@ -125,7 +126,7 @@ var defaultTheme = {
125
126
  md: '4px',
126
127
  ml: '6px',
127
128
  lg: '8px',
128
- xl: '16px',
129
+ xl: '16px'
129
130
  },
130
131
  shadows: {
131
132
  boxShadow: '0px 5px 60px rgba(0, 0, 0, 0.1)',
@@ -142,13 +143,13 @@ var defaultTheme = {
142
143
  headerShadowNotifications: '1px 1px 2px #00000029',
143
144
  cornerDialogShadow: '1px 1px 3px 1px #00000029',
144
145
  gridShadow: '0px 1px 4px 0px rgba(0, 0, 0, 0.12)',
145
- tooltipShadow: '0px 2px 20px 0px rgba(0, 0, 0, 0.10)',
146
+ tooltipShadow: '0px 2px 20px 0px rgba(0, 0, 0, 0.10)'
146
147
  },
147
148
  space: [0, 4, 8, 16, 24, 48, 96, 144, 192, 240],
148
149
  transitions: {
149
150
  simpleLong: 'all 2s',
150
- inputTransition: 'border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out',
151
+ inputTransition: 'border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out'
151
152
  },
152
- zIndices: [0, 1, 2, 3, 5, 30, 40, 100, 200, 300, 9999],
153
+ zIndices: [0, 1, 2, 3, 5, 30, 40, 100, 200, 300, 9999]
153
154
  };
154
155
  export default defaultTheme;
@@ -12,6 +12,7 @@ declare const themes: {
12
12
  lightGray5: string;
13
13
  lightGray6: string;
14
14
  lightGray7: string;
15
+ neutral10: string;
15
16
  neutral20: string;
16
17
  neutral300: string;
17
18
  neutral500: string;
@@ -150,7 +151,6 @@ declare const themes: {
150
151
  };
151
152
  zIndices: number[];
152
153
  };
153
- light: import('..').Theme;
154
154
  mailwise: {
155
155
  screens: {
156
156
  _: number;
@@ -354,5 +354,157 @@ declare const themes: {
354
354
  };
355
355
  zIndices: number[];
356
356
  };
357
+ dark: {
358
+ colors: {
359
+ bgLightGray: string;
360
+ bgLightGray1: string;
361
+ typoPrimary: string;
362
+ textPrimary: string;
363
+ white: string;
364
+ lightGray7: string;
365
+ neutral20: string;
366
+ red1: string;
367
+ red20: string;
368
+ red30: string;
369
+ blue2: string;
370
+ lightGray1: string;
371
+ blue3: string;
372
+ lightGray2: string;
373
+ lightGray3: string;
374
+ lightGray4: string;
375
+ lightGray5: string;
376
+ lightGray6: string;
377
+ neutral10: string;
378
+ neutral300: string;
379
+ neutral500: string;
380
+ gray: string;
381
+ gray1: string;
382
+ gray2: string;
383
+ gray3: string;
384
+ gray4: string;
385
+ gray5: string;
386
+ blue1: string;
387
+ blue4: string;
388
+ textTertiary: string;
389
+ blue10: string;
390
+ blue20: string;
391
+ blue30: string;
392
+ blue40: string;
393
+ blue50: string;
394
+ blue60: string;
395
+ blue70: string;
396
+ blue80: string;
397
+ blue90: string;
398
+ teal20: string;
399
+ teal40: string;
400
+ teal50: string;
401
+ teal60: string;
402
+ teal70: string;
403
+ teal80: string;
404
+ teal90: string;
405
+ green10: string;
406
+ green20: string;
407
+ green30: string;
408
+ green50: string;
409
+ green60: string;
410
+ green70: string;
411
+ green80: string;
412
+ green90: string;
413
+ green: string;
414
+ successColor: string;
415
+ darkGreen: string;
416
+ orange20: string;
417
+ orange30: string;
418
+ orange50: string;
419
+ orange60: string;
420
+ orange80: string;
421
+ yellow10: string;
422
+ yellow20: string;
423
+ yellow60: string;
424
+ yellow70: string;
425
+ yellow1: string;
426
+ yellow2: string;
427
+ red10: string;
428
+ red50: string;
429
+ red70: string;
430
+ red2: string;
431
+ red3: string;
432
+ red60: string;
433
+ red80: string;
434
+ dangerColor: string;
435
+ purple20: string;
436
+ purple40: string;
437
+ purple50: string;
438
+ purple60: string;
439
+ purple80: string;
440
+ purple90: string;
441
+ magenta10: string;
442
+ magenta20: string;
443
+ magenta30: string;
444
+ magenta40: string;
445
+ magenta50: string;
446
+ magenta60: string;
447
+ magenta70: string;
448
+ magenta80: string;
449
+ magenta90: string;
450
+ };
451
+ shadows: {
452
+ dialogShadow: string;
453
+ boxShadow: string;
454
+ dropShadow: string;
455
+ inputFocusBoxShadow: string;
456
+ dropdownMenuShadow: string;
457
+ tooltipBoxShadow: string;
458
+ cardShadow: string;
459
+ smooth: string;
460
+ headerShadow: string;
461
+ headerShadowB: string;
462
+ headerShadowNotifications: string;
463
+ cornerDialogShadow: string;
464
+ gridShadow: string;
465
+ tooltipShadow: string;
466
+ };
467
+ breakpoints: string[];
468
+ fonts: {
469
+ primary: string;
470
+ heading: string;
471
+ };
472
+ fontLinks: string[];
473
+ fontSizes: string[];
474
+ lineHeights: number[];
475
+ fontWeights: {
476
+ light: number;
477
+ normal: number;
478
+ medium: number;
479
+ semiBold: number;
480
+ bold: number;
481
+ };
482
+ letterSpacings: {
483
+ default: null;
484
+ sm: string;
485
+ md: string;
486
+ lg: string;
487
+ };
488
+ borders: {
489
+ slim: string;
490
+ mediumSlim: string;
491
+ medium: string;
492
+ mediumThick: string;
493
+ thick: string;
494
+ };
495
+ radii: {
496
+ sm: string;
497
+ md: string;
498
+ ml: string;
499
+ lg: string;
500
+ xl: string;
501
+ };
502
+ space: number[];
503
+ transitions: {
504
+ simpleLong: string;
505
+ inputTransition: string;
506
+ };
507
+ zIndices: number[];
508
+ };
357
509
  };
358
510
  export default themes;
@@ -1,9 +1,9 @@
1
1
  import defaultTheme from './default';
2
- import light from './light';
3
2
  import mailwise from './mailwise';
3
+ import darkTheme from './dark';
4
4
  var themes = {
5
5
  default: defaultTheme,
6
- light: light,
7
- mailwise: mailwise
6
+ mailwise: mailwise,
7
+ dark: darkTheme
8
8
  };
9
9
  export default themes;
@@ -1,8 +1,6 @@
1
- import { default as React } from 'react';
1
+ import { ReactNode } from 'react';
2
2
 
3
- export type Color = {
4
- [key: string]: string;
5
- };
3
+ export type Color = Record<string, string>;
6
4
  export type Theme = {
7
5
  breakpoints?: {
8
6
  xs: number;
@@ -11,42 +9,24 @@ export type Theme = {
11
9
  lg: number;
12
10
  xl: number;
13
11
  };
14
- colors?: {
15
- [key: string]: string | Color;
16
- };
17
- fonts?: {
18
- [key: string]: string;
19
- };
12
+ colors?: Record<string, string | Color>;
13
+ fonts?: Record<string, string>;
20
14
  fontLinks?: string[];
21
15
  fontSizes?: string[];
22
- fontWeights?: {
23
- [key: string]: number | null;
24
- };
25
- letterSpacings?: {
26
- [key: string]: string | null;
27
- };
28
- borders?: {
29
- [key: string]: string;
30
- };
31
- radii?: {
32
- [key: string]: string;
33
- };
34
- shadows?: {
35
- [key: string]: string;
36
- };
16
+ fontWeights?: Record<string, number | null>;
17
+ letterSpacings?: Record<string, string | null>;
18
+ borders?: Record<string, string>;
19
+ radii?: Record<string, string>;
20
+ shadows?: Record<string, string>;
37
21
  spaces?: number[];
38
22
  lineHeights?: number[];
39
- transitions?: {
40
- [key: string]: string;
41
- };
23
+ transitions?: Record<string, string>;
42
24
  zIndices?: number[];
43
25
  };
44
- export type Themes = {
45
- [key: string]: Theme;
46
- };
26
+ export type Themes = Record<string, Theme>;
47
27
  export interface Props {
48
- children: React.ReactNode;
49
- theme: 'default' | 'light' | 'mailwise';
28
+ children: ReactNode;
29
+ theme: 'default' | 'mailwise' | 'dark';
50
30
  preflight?: boolean;
51
31
  language?: string;
52
32
  }