@mailstep/design-system 0.8.16-beta.2 → 0.8.16-beta.21

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 (122) hide show
  1. package/package.json +12 -6
  2. package/ui/Blocks/CommonGrid/components/ColumnTitle.js +4 -2
  3. package/ui/Blocks/CommonGrid/components/ControlButtons/styles.d.ts +1 -0
  4. package/ui/Blocks/CommonGrid/components/DropdownButton/DropdownButton.js +1 -1
  5. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +9 -8
  6. package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/DatePickerRange.js +1 -2
  7. package/ui/Blocks/CommonGrid/components/Filters/GridSelect/GridSelect.js +5 -4
  8. package/ui/Blocks/CommonGrid/components/Filters/TextRange/TextRange.js +1 -1
  9. package/ui/Blocks/CommonGrid/components/IconList/IconList.d.ts +1 -1
  10. package/ui/Blocks/CommonGrid/components/ManageColumnForm/styles.d.ts +2 -2
  11. package/ui/Blocks/CommonGrid/components/MobileFilterModal.js +2 -2
  12. package/ui/Blocks/CommonGrid/components/MobileSortModal.js +1 -1
  13. package/ui/Blocks/CommonGrid/components/QuickFilter/QuickFilter.js +1 -4
  14. package/ui/Blocks/CommonGrid/components/Table.d.ts +28 -28
  15. package/ui/Blocks/CommonGrid/components/Table.js +1 -1
  16. package/ui/Blocks/CommonGrid/hooks/useAddFilter.d.ts +1 -1
  17. package/ui/Blocks/CommonGrid/hooks/useColumnSizes.d.ts +1 -1
  18. package/ui/Blocks/CommonGrid/hooks/useEvent.d.ts +1 -1
  19. package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.d.ts +1 -1
  20. package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +1 -1
  21. package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.d.ts +1 -1
  22. package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.d.ts +1 -1
  23. package/ui/Blocks/CommonGrid/hooks/useUxReset.d.ts +1 -1
  24. package/ui/Blocks/CommonGrid/store/index.d.ts +14 -14
  25. package/ui/Blocks/CommonGrid/styles.d.ts +6 -5
  26. package/ui/Blocks/CommonGrid/styles.js +6 -9
  27. package/ui/Blocks/CommonGrid/utils/index.d.ts +1 -1
  28. package/ui/Blocks/Header/components/MenuItems/styles.d.ts +1 -1
  29. package/ui/Blocks/Header/components/MenuItems/styles.js +1 -1
  30. package/ui/Blocks/Header/hooks/useChangeLanguage.js +0 -1
  31. package/ui/Blocks/Header/stories/Header.stories.d.ts +16 -16
  32. package/ui/Blocks/Header/styles.js +2 -2
  33. package/ui/Blocks/ImageList/components/AddPhoto/index.js +2 -2
  34. package/ui/Blocks/ImageList/components/AddPhoto/styles.d.ts +2 -2
  35. package/ui/Blocks/ImageList/components/CloseButton/styles.d.ts +1 -1
  36. package/ui/Blocks/ImageList/components/ImageElement/styles.d.ts +1 -1
  37. package/ui/Blocks/ImageList/styles.d.ts +2 -2
  38. package/ui/Blocks/LanguageSwitch/LanguageSwitch.js +10 -5
  39. package/ui/Blocks/LanguageSwitch/styles.d.ts +2 -7
  40. package/ui/Blocks/LanguageSwitch/styles.js +3 -11
  41. package/ui/Blocks/LoginPage/stories/LoginPage.stories.js +2 -2
  42. package/ui/Blocks/LoginPage/styles.d.ts +2 -3
  43. package/ui/Blocks/Modal/styles.d.ts +7 -7
  44. package/ui/Blocks/Modal/styles.js +8 -8
  45. package/ui/Blocks/Scheduler/components/Groups/styles.d.ts +1 -1
  46. package/ui/Blocks/Scheduler/components/TimeSlots/styles.d.ts +1 -1
  47. package/ui/Blocks/SideMenu/components/Footer.d.ts +1 -1
  48. package/ui/Blocks/SideMenu/components/HamburgerMenu.js +2 -3
  49. package/ui/Blocks/SideMenu/stories/SideMenu.stories.d.ts +1 -0
  50. package/ui/Blocks/SideMenu/styles.d.ts +15 -15
  51. package/ui/Blocks/Stepper/components/StepCircle/styles.d.ts +2 -2
  52. package/ui/Blocks/Stepper/components/StepItem/styles.d.ts +3 -3
  53. package/ui/Blocks/Table/stories/Table.stories.d.ts +3 -2
  54. package/ui/Blocks/Tabs/styles.d.ts +6 -5
  55. package/ui/Elements/Alert/styles.d.ts +18 -17
  56. package/ui/Elements/AsyncSelect/stories/AsyncSelect.stories.d.ts +2 -1
  57. package/ui/Elements/AsyncSelect/stories/AsyncSelect.stories.js +2 -2
  58. package/ui/Elements/BarChartSymbol/styles.d.ts +2 -2
  59. package/ui/Elements/BorderedBox/types.d.ts +1 -0
  60. package/ui/Elements/Button/styles.d.ts +6 -5
  61. package/ui/Elements/Card/styles.d.ts +2 -2
  62. package/ui/Elements/Card/types.d.ts +1 -0
  63. package/ui/Elements/CheckedCircle/storries/CheckedCircle.stories.d.ts +2 -2
  64. package/ui/Elements/DatePicker/Datetime/components/FooterRow.d.ts +1 -1
  65. package/ui/Elements/DatePicker/Datetime/views/DaysView.js +1 -1
  66. package/ui/Elements/DatePicker/styles.d.ts +2 -1
  67. package/ui/Elements/DropdownMenu/components/DefaultItem.js +1 -1
  68. package/ui/Elements/Icon/Icon.js +6 -6
  69. package/ui/Elements/Icon/icons/FlagHU.js +1 -1
  70. package/ui/Elements/Icon/stories/BadgeIcon.stories.d.ts +1 -1
  71. package/ui/Elements/Label/Label.d.ts +1 -1
  72. package/ui/Elements/Label/stories/Label.stories.d.ts +1 -1
  73. package/ui/Elements/Link/stories/Link.stories.d.ts +12 -12
  74. package/ui/Elements/Logo/Logo.js +2 -2
  75. package/ui/Elements/Pagination/styled.d.ts +2 -1
  76. package/ui/Elements/ProgressBar/stories/ProgressBar.stories.d.ts +5 -5
  77. package/ui/Elements/ProgressBar/styles.d.ts +1 -1
  78. package/ui/Elements/Select/Select.js +6 -6
  79. package/ui/Elements/Select/components/ConnectedMenu.js +2 -3
  80. package/ui/Elements/Select/components/CountMultiValue.d.ts +10 -1
  81. package/ui/Elements/Select/components/CountMultiValue.js +16 -7
  82. package/ui/Elements/Select/components/DropdownIndicator.d.ts +6 -1
  83. package/ui/Elements/Select/components/DropdownIndicator.js +3 -2
  84. package/ui/Elements/Select/components/IconValueContainer.js +1 -1
  85. package/ui/Elements/Select/components/SimplifiedOption.d.ts +1 -0
  86. package/ui/Elements/Select/stories/Select.stories.d.ts +10 -0
  87. package/ui/Elements/Select/stories/Select.stories.js +15 -0
  88. package/ui/Elements/Select/themes/index.d.ts +1 -1
  89. package/ui/Elements/Select/themes/index.js +4 -14
  90. package/ui/Elements/Select/themes/selectStyles.d.ts +1 -1
  91. package/ui/Elements/Select/themes/selectStyles.js +28 -30
  92. package/ui/Elements/Select/types.d.ts +10 -7
  93. package/ui/Elements/SingleSelect/SingleSelect.d.ts +2 -2
  94. package/ui/Elements/SingleSelect/SingleSelect.js +13 -22
  95. package/ui/Elements/SpaceAround/types.d.ts +1 -0
  96. package/ui/Elements/Spinner/styles.d.ts +1 -1
  97. package/ui/Elements/Tag/types.d.ts +1 -0
  98. package/ui/Elements/Toast/styles.d.ts +1 -1
  99. package/ui/Forms/Checkbox/styles.d.ts +2 -1
  100. package/ui/Forms/Checkbox/styles.js +1 -1
  101. package/ui/Forms/Input/styles.d.ts +3 -3
  102. package/ui/Forms/Input/styles.js +2 -2
  103. package/ui/Forms/TextArea/styles.d.ts +5 -5
  104. package/ui/ThemeProvider/ThemeProvider.d.ts +2 -1
  105. package/ui/ThemeProvider/ThemeProvider.js +1 -1
  106. package/ui/ThemeProvider/themes/dark.d.ts +154 -0
  107. package/ui/ThemeProvider/themes/dark.js +14 -0
  108. package/ui/ThemeProvider/themes/default.d.ts +2 -0
  109. package/ui/ThemeProvider/themes/default.js +13 -9
  110. package/ui/ThemeProvider/themes/index.d.ts +155 -1
  111. package/ui/ThemeProvider/themes/index.js +3 -3
  112. package/ui/ThemeProvider/themes/mailwise.js +1 -1
  113. package/ui/ThemeProvider/types.d.ts +13 -33
  114. package/ui/index.es.js +15390 -16026
  115. package/ui/index.umd.js +502 -516
  116. package/ui/utils/index.js +1 -1
  117. package/ui/utils/translations.d.ts +4 -1
  118. package/ui/utils/translations.js +2 -2
  119. package/ui/Elements/Select/components/ResetAll.d.ts +0 -5
  120. package/ui/Elements/Select/components/ResetAll.js +0 -15
  121. package/ui/ThemeProvider/themes/light.d.ts +0 -4
  122. package/ui/ThemeProvider/themes/light.js +0 -7
@@ -11,7 +11,9 @@ var defaultTheme = {
11
11
  lightGray5: '#A3B3C1',
12
12
  lightGray6: '#D2D8DF',
13
13
  lightGray7: '#E7EBEF',
14
+ neutral10: '#FAFBFC',
14
15
  neutral20: '#F1F5F9',
16
+ neutral30: '#F1F5F9',
15
17
  neutral300: '#5E6C84',
16
18
  neutral500: '#42526E',
17
19
  gray: '#8594A5',
@@ -91,10 +93,12 @@ var defaultTheme = {
91
93
  magenta70: '#D12771',
92
94
  magenta80: '#9F1853',
93
95
  magenta90: '#7B1340',
96
+ // specific place for dark / light mode
97
+ // sideMenuSelectedText: '#ffffff',
94
98
  },
95
99
  fonts: {
96
100
  primary: 'Inter, sans-serif',
97
- heading: 'Inter, sans-serif',
101
+ heading: 'Inter, sans-serif'
98
102
  },
99
103
  fontLinks: ['https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'],
100
104
  fontSizes: ['10px', '12px', '14px', '16px', '18px', '21px', '24px', '32px'],
@@ -104,20 +108,20 @@ var defaultTheme = {
104
108
  normal: 400,
105
109
  medium: 500,
106
110
  semiBold: 600,
107
- bold: 700,
111
+ bold: 700
108
112
  },
109
113
  letterSpacings: {
110
114
  default: null,
111
115
  sm: '2px',
112
116
  md: '4px',
113
- lg: '8px',
117
+ lg: '8px'
114
118
  },
115
119
  borders: {
116
120
  slim: '1px solid',
117
121
  mediumSlim: '2px solid',
118
122
  medium: '3px solid',
119
123
  mediumThick: '6px solid',
120
- thick: '10px solid',
124
+ thick: '10px solid'
121
125
  },
122
126
  // ...........................
123
127
  radii: {
@@ -125,7 +129,7 @@ var defaultTheme = {
125
129
  md: '4px',
126
130
  ml: '6px',
127
131
  lg: '8px',
128
- xl: '16px',
132
+ xl: '16px'
129
133
  },
130
134
  shadows: {
131
135
  boxShadow: '0px 5px 60px rgba(0, 0, 0, 0.1)',
@@ -142,13 +146,13 @@ var defaultTheme = {
142
146
  headerShadowNotifications: '1px 1px 2px #00000029',
143
147
  cornerDialogShadow: '1px 1px 3px 1px #00000029',
144
148
  gridShadow: '0px 1px 4px 0px rgba(0, 0, 0, 0.12)',
145
- tooltipShadow: '0px 2px 20px 0px rgba(0, 0, 0, 0.10)',
149
+ tooltipShadow: '0px 2px 20px 0px rgba(0, 0, 0, 0.10)'
146
150
  },
147
- space: [0, 4, 8, 16, 24, 48, 96, 144, 192, 240], // same as xstyled default
151
+ space: [0, 4, 8, 16, 24, 48, 96, 144, 192, 240],
148
152
  transitions: {
149
153
  simpleLong: 'all 2s',
150
- inputTransition: 'border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out',
154
+ inputTransition: 'border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out'
151
155
  },
152
- zIndices: [0, 1, 2, 3, 5, 30, 40, 100, 200, 300, 9999],
156
+ zIndices: [0, 1, 2, 3, 5, 30, 40, 100, 200, 300, 9999]
153
157
  };
154
158
  export default defaultTheme;
@@ -12,7 +12,9 @@ declare const themes: {
12
12
  lightGray5: string;
13
13
  lightGray6: string;
14
14
  lightGray7: string;
15
+ neutral10: string;
15
16
  neutral20: string;
17
+ neutral30: string;
16
18
  neutral300: string;
17
19
  neutral500: string;
18
20
  gray: string;
@@ -150,7 +152,6 @@ declare const themes: {
150
152
  };
151
153
  zIndices: number[];
152
154
  };
153
- light: import('..').Theme;
154
155
  mailwise: {
155
156
  screens: {
156
157
  _: number;
@@ -354,5 +355,158 @@ declare const themes: {
354
355
  };
355
356
  zIndices: number[];
356
357
  };
358
+ dark: {
359
+ colors: {
360
+ bgLightGray: string;
361
+ bgLightGray1: string;
362
+ typoPrimary: string;
363
+ textPrimary: string;
364
+ white: string;
365
+ lightGray7: string;
366
+ neutral20: string;
367
+ red1: string;
368
+ red20: string;
369
+ red30: string;
370
+ blue2: string;
371
+ lightGray1: string;
372
+ blue3: string;
373
+ lightGray2: string;
374
+ lightGray3: string;
375
+ lightGray4: string;
376
+ lightGray5: string;
377
+ lightGray6: string;
378
+ neutral10: string;
379
+ neutral30: string;
380
+ neutral300: string;
381
+ neutral500: string;
382
+ gray: string;
383
+ gray1: string;
384
+ gray2: string;
385
+ gray3: string;
386
+ gray4: string;
387
+ gray5: string;
388
+ blue1: string;
389
+ blue4: string;
390
+ textTertiary: string;
391
+ blue10: string;
392
+ blue20: string;
393
+ blue30: string;
394
+ blue40: string;
395
+ blue50: string;
396
+ blue60: string;
397
+ blue70: string;
398
+ blue80: string;
399
+ blue90: string;
400
+ teal20: string;
401
+ teal40: string;
402
+ teal50: string;
403
+ teal60: string;
404
+ teal70: string;
405
+ teal80: string;
406
+ teal90: string;
407
+ green10: string;
408
+ green20: string;
409
+ green30: string;
410
+ green50: string;
411
+ green60: string;
412
+ green70: string;
413
+ green80: string;
414
+ green90: string;
415
+ green: string;
416
+ successColor: string;
417
+ darkGreen: string;
418
+ orange20: string;
419
+ orange30: string;
420
+ orange50: string;
421
+ orange60: string;
422
+ orange80: string;
423
+ yellow10: string;
424
+ yellow20: string;
425
+ yellow60: string;
426
+ yellow70: string;
427
+ yellow1: string;
428
+ yellow2: string;
429
+ red10: string;
430
+ red50: string;
431
+ red70: string;
432
+ red2: string;
433
+ red3: string;
434
+ red60: string;
435
+ red80: string;
436
+ dangerColor: string;
437
+ purple20: string;
438
+ purple40: string;
439
+ purple50: string;
440
+ purple60: string;
441
+ purple80: string;
442
+ purple90: string;
443
+ magenta10: string;
444
+ magenta20: string;
445
+ magenta30: string;
446
+ magenta40: string;
447
+ magenta50: string;
448
+ magenta60: string;
449
+ magenta70: string;
450
+ magenta80: string;
451
+ magenta90: string;
452
+ };
453
+ shadows: {
454
+ dialogShadow: string;
455
+ boxShadow: string;
456
+ dropShadow: string;
457
+ inputFocusBoxShadow: string;
458
+ dropdownMenuShadow: string;
459
+ tooltipBoxShadow: string;
460
+ cardShadow: string;
461
+ smooth: string;
462
+ headerShadow: string;
463
+ headerShadowB: string;
464
+ headerShadowNotifications: string;
465
+ cornerDialogShadow: string;
466
+ gridShadow: string;
467
+ tooltipShadow: string;
468
+ };
469
+ breakpoints: string[];
470
+ fonts: {
471
+ primary: string;
472
+ heading: string;
473
+ };
474
+ fontLinks: string[];
475
+ fontSizes: string[];
476
+ lineHeights: number[];
477
+ fontWeights: {
478
+ light: number;
479
+ normal: number;
480
+ medium: number;
481
+ semiBold: number;
482
+ bold: number;
483
+ };
484
+ letterSpacings: {
485
+ default: null;
486
+ sm: string;
487
+ md: string;
488
+ lg: string;
489
+ };
490
+ borders: {
491
+ slim: string;
492
+ mediumSlim: string;
493
+ medium: string;
494
+ mediumThick: string;
495
+ thick: string;
496
+ };
497
+ radii: {
498
+ sm: string;
499
+ md: string;
500
+ ml: string;
501
+ lg: string;
502
+ xl: string;
503
+ };
504
+ space: number[];
505
+ transitions: {
506
+ simpleLong: string;
507
+ inputTransition: string;
508
+ };
509
+ zIndices: number[];
510
+ };
357
511
  };
358
512
  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;
@@ -156,7 +156,7 @@ var defaultTheme = {
156
156
  smooth: '0px 4px 25px 0px #0000001a',
157
157
  // redesign:
158
158
  dialogShadow: '0px 4px 23px 0px rgba(0, 0, 0, 0.08)',
159
- tooltipShadow: '0px 1px 4px 0 #B1B8C3', // color is grayIII
159
+ tooltipShadow: '0px 1px 4px 0 #B1B8C3',
160
160
  headerShadow: '1px 2px 3px #00000029',
161
161
  headerShadowB: '1px 1px 3px #00000029',
162
162
  headerShadowNotifications: '1px 1px 2px #00000029',
@@ -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
  }