@zyther/tzmail 0.1.4 → 0.5.0

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 (132) hide show
  1. package/README.md +411 -78
  2. package/dist/core/enums/theme.enum.d.ts +11 -1
  3. package/dist/core/enums/theme.enum.d.ts.map +1 -1
  4. package/dist/core/enums/theme.enum.js +10 -0
  5. package/dist/core/interfaces/email.interface.d.ts +95 -5
  6. package/dist/core/interfaces/email.interface.d.ts.map +1 -1
  7. package/dist/core/interfaces/template.interface.d.ts +12 -1
  8. package/dist/core/interfaces/template.interface.d.ts.map +1 -1
  9. package/dist/factories/email-factory.d.ts +32 -6
  10. package/dist/factories/email-factory.d.ts.map +1 -1
  11. package/dist/factories/email-factory.js +110 -6
  12. package/dist/factories/template-factory.d.ts.map +1 -1
  13. package/dist/factories/template-factory.js +170 -60
  14. package/dist/index.d.ts +16 -3
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +23 -1
  17. package/dist/providers/mailgun.transport.d.ts +10 -0
  18. package/dist/providers/mailgun.transport.d.ts.map +1 -0
  19. package/dist/providers/mailgun.transport.js +85 -0
  20. package/dist/providers/nodemailer.transport.d.ts +11 -0
  21. package/dist/providers/nodemailer.transport.d.ts.map +1 -0
  22. package/dist/providers/nodemailer.transport.js +23 -0
  23. package/dist/providers/provider-utils.d.ts +17 -0
  24. package/dist/providers/provider-utils.d.ts.map +1 -0
  25. package/dist/providers/provider-utils.js +89 -0
  26. package/dist/providers/provider.interface.d.ts +30 -0
  27. package/dist/providers/provider.interface.d.ts.map +1 -0
  28. package/dist/providers/provider.interface.js +2 -0
  29. package/dist/providers/sendgrid.transport.d.ts +10 -0
  30. package/dist/providers/sendgrid.transport.d.ts.map +1 -0
  31. package/dist/providers/sendgrid.transport.js +76 -0
  32. package/dist/queues/bullmq-email-queue.d.ts +153 -0
  33. package/dist/queues/bullmq-email-queue.d.ts.map +1 -0
  34. package/dist/queues/bullmq-email-queue.js +292 -0
  35. package/dist/services/attachment.service.d.ts +15 -37
  36. package/dist/services/attachment.service.d.ts.map +1 -1
  37. package/dist/services/attachment.service.js +58 -46
  38. package/dist/services/email.service.d.ts +22 -22
  39. package/dist/services/email.service.d.ts.map +1 -1
  40. package/dist/services/email.service.js +117 -33
  41. package/dist/services/template.service.d.ts +24 -111
  42. package/dist/services/template.service.d.ts.map +1 -1
  43. package/dist/services/template.service.js +273 -362
  44. package/dist/templates/base/color-accessibility.d.ts +4 -0
  45. package/dist/templates/base/color-accessibility.d.ts.map +1 -0
  46. package/dist/templates/base/color-accessibility.js +38 -0
  47. package/dist/templates/base/template-builder.d.ts +4 -1
  48. package/dist/templates/base/template-builder.d.ts.map +1 -1
  49. package/dist/templates/base/template-builder.js +276 -527
  50. package/dist/templates/themes/aurora.theme.d.ts +12 -0
  51. package/dist/templates/themes/aurora.theme.d.ts.map +1 -0
  52. package/dist/templates/themes/aurora.theme.js +88 -0
  53. package/dist/templates/themes/corporate.theme.d.ts +2 -1
  54. package/dist/templates/themes/corporate.theme.d.ts.map +1 -1
  55. package/dist/templates/themes/corporate.theme.js +139 -102
  56. package/dist/templates/themes/editorial.theme.d.ts +12 -0
  57. package/dist/templates/themes/editorial.theme.d.ts.map +1 -0
  58. package/dist/templates/themes/editorial.theme.js +90 -0
  59. package/dist/templates/themes/forest.theme.d.ts +12 -0
  60. package/dist/templates/themes/forest.theme.d.ts.map +1 -0
  61. package/dist/templates/themes/forest.theme.js +89 -0
  62. package/dist/templates/themes/glass.theme.d.ts +12 -0
  63. package/dist/templates/themes/glass.theme.d.ts.map +1 -0
  64. package/dist/templates/themes/glass.theme.js +88 -0
  65. package/dist/templates/themes/lavender.theme.d.ts +12 -0
  66. package/dist/templates/themes/lavender.theme.d.ts.map +1 -0
  67. package/dist/templates/themes/lavender.theme.js +91 -0
  68. package/dist/templates/themes/midnight.theme.d.ts +12 -0
  69. package/dist/templates/themes/midnight.theme.d.ts.map +1 -0
  70. package/dist/templates/themes/midnight.theme.js +91 -0
  71. package/dist/templates/themes/minimal.theme.d.ts +2 -1
  72. package/dist/templates/themes/minimal.theme.d.ts.map +1 -1
  73. package/dist/templates/themes/minimal.theme.js +142 -107
  74. package/dist/templates/themes/modern.theme.d.ts +2 -1
  75. package/dist/templates/themes/modern.theme.d.ts.map +1 -1
  76. package/dist/templates/themes/modern.theme.js +109 -74
  77. package/dist/templates/themes/monokai.theme.d.ts +2 -1
  78. package/dist/templates/themes/monokai.theme.d.ts.map +1 -1
  79. package/dist/templates/themes/monokai.theme.js +102 -66
  80. package/dist/templates/themes/neobrutal.theme.d.ts +12 -0
  81. package/dist/templates/themes/neobrutal.theme.d.ts.map +1 -0
  82. package/dist/templates/themes/neobrutal.theme.js +91 -0
  83. package/dist/templates/themes/ocean.theme.d.ts +12 -0
  84. package/dist/templates/themes/ocean.theme.d.ts.map +1 -0
  85. package/dist/templates/themes/ocean.theme.js +90 -0
  86. package/dist/templates/themes/pastel.theme.d.ts +12 -0
  87. package/dist/templates/themes/pastel.theme.d.ts.map +1 -0
  88. package/dist/templates/themes/pastel.theme.js +89 -0
  89. package/dist/templates/themes/sunset.theme.d.ts +12 -0
  90. package/dist/templates/themes/sunset.theme.d.ts.map +1 -0
  91. package/dist/templates/themes/sunset.theme.js +90 -0
  92. package/dist/templates/themes/system.theme.d.ts +2 -1
  93. package/dist/templates/themes/system.theme.d.ts.map +1 -1
  94. package/dist/templates/themes/system.theme.js +81 -47
  95. package/dist/templates/themes/theme.interface.d.ts +48 -0
  96. package/dist/templates/themes/theme.interface.d.ts.map +1 -1
  97. package/package.json +36 -14
  98. package/src/core/enums/template-part.enum.ts +7 -0
  99. package/src/core/enums/theme.enum.ts +18 -0
  100. package/src/core/interfaces/email.interface.ts +116 -0
  101. package/src/core/interfaces/template.interface.ts +71 -0
  102. package/src/factories/email-factory.ts +208 -0
  103. package/src/factories/template-factory.ts +201 -0
  104. package/src/index.ts +53 -0
  105. package/src/providers/mailgun.transport.ts +80 -0
  106. package/src/providers/nodemailer.transport.ts +20 -0
  107. package/src/providers/provider-utils.ts +91 -0
  108. package/src/providers/provider.interface.ts +26 -0
  109. package/src/providers/sendgrid.transport.ts +80 -0
  110. package/src/queues/bullmq-email-queue.ts +418 -0
  111. package/src/services/attachment.service.ts +98 -0
  112. package/src/services/email.service.ts +151 -0
  113. package/src/services/template.service.ts +431 -0
  114. package/src/templates/base/color-accessibility.ts +31 -0
  115. package/src/templates/base/template-builder.ts +438 -0
  116. package/src/templates/themes/aurora.theme.ts +91 -0
  117. package/src/templates/themes/corporate.theme.ts +156 -0
  118. package/src/templates/themes/editorial.theme.ts +93 -0
  119. package/src/templates/themes/forest.theme.ts +92 -0
  120. package/src/templates/themes/glass.theme.ts +91 -0
  121. package/src/templates/themes/lavender.theme.ts +94 -0
  122. package/src/templates/themes/midnight.theme.ts +94 -0
  123. package/src/templates/themes/minimal.theme.ts +158 -0
  124. package/src/templates/themes/modern.theme.ts +124 -0
  125. package/src/templates/themes/monokai.theme.ts +117 -0
  126. package/src/templates/themes/neobrutal.theme.ts +94 -0
  127. package/src/templates/themes/ocean.theme.ts +93 -0
  128. package/src/templates/themes/pastel.theme.ts +92 -0
  129. package/src/templates/themes/sunset.theme.ts +93 -0
  130. package/src/templates/themes/system.theme.ts +92 -0
  131. package/src/templates/themes/theme.interface.ts +95 -0
  132. package/src/tests/template.service.test.ts +1 -0
@@ -0,0 +1,156 @@
1
+
2
+ import { ThemeType } from '../../core/enums/theme.enum';
3
+ import { ITheme, IThemeColors, ITypography, ISpacing, IThemeEmailStyles } from './theme.interface';
4
+
5
+ export class CorporateTheme implements ITheme {
6
+ id = ThemeType.CORPORATE;
7
+ name = 'Corporate';
8
+
9
+ light: IThemeColors = {
10
+ primary: '#1e40af',
11
+ secondary: '#334155',
12
+ background: '#ffffff',
13
+ text: '#0f172a',
14
+ textMuted: '#475569',
15
+ border: '#e2e8f0',
16
+ success: '#059669',
17
+ error: '#dc2626',
18
+ warning: '#d97706'
19
+ };
20
+
21
+ dark: IThemeColors = {
22
+ primary: '#3b82f6',
23
+ secondary: '#64748b',
24
+ background: '#0f172a',
25
+ text: '#f1f5f9',
26
+ textMuted: '#94a3b8',
27
+ border: '#1e293b',
28
+ success: '#10b981',
29
+ error: '#ef4444',
30
+ warning: '#f59e0b'
31
+ };
32
+
33
+ typography: ITypography = {
34
+ fontFamily: '"Playfair Display", "Georgia", "Times New Roman", serif',
35
+ fontSizes: {
36
+ small: '12px',
37
+ medium: '14px',
38
+ large: '16px',
39
+ xlarge: '24px'
40
+ },
41
+ fontWeights: {
42
+ normal: 400,
43
+ medium: 500,
44
+ bold: 700
45
+ }
46
+ };
47
+
48
+ spacing: ISpacing = {
49
+ xs: '4px',
50
+ sm: '8px',
51
+ md: '16px',
52
+ lg: '24px',
53
+ xl: '32px'
54
+ };
55
+
56
+ // cores adicionais
57
+ corporateColors = {
58
+ gold: '#d4af37',
59
+ silver: '#c0c0c0',
60
+ bronze: '#cd7f32',
61
+ navy: '#0a2540',
62
+ charcoal: '#36454f',
63
+ ivory: '#fffff0'
64
+ };
65
+
66
+
67
+ borderStyle = {
68
+ radius: {
69
+ small: '2px',
70
+ medium: '4px',
71
+ large: '8px',
72
+ pill: '20px'
73
+ },
74
+ width: {
75
+ thin: '1px',
76
+ medium: '2px',
77
+ thick: '3px'
78
+ },
79
+ style: 'solid'
80
+ };
81
+
82
+ elevation = {
83
+ shadow: '0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04)',
84
+ card: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
85
+ modal: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.02)',
86
+ hover: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)'
87
+ };
88
+
89
+ branding = {
90
+ logoSize: {
91
+ small: '32px',
92
+ medium: '48px',
93
+ large: '64px'
94
+ },
95
+ letterSpacing: {
96
+ tight: '-0.5px',
97
+ normal: '0px',
98
+ wide: '0.5px',
99
+ wider: '1px'
100
+ },
101
+ textTransform: {
102
+ uppercase: 'uppercase',
103
+ lowercase: 'lowercase',
104
+ capitalize: 'capitalize',
105
+ normal: 'none'
106
+ }
107
+ };
108
+
109
+ layout = {
110
+ maxWidth: '600px',
111
+ contentWidth: '560px',
112
+ sidebarWidth: '200px',
113
+ headerHeight: '80px',
114
+ footerHeight: '120px'
115
+ };
116
+
117
+ emailStyles: IThemeEmailStyles = {
118
+ maxWidthPx: 600,
119
+ container: {
120
+ borderColor: 'border',
121
+ borderWidth: '1px',
122
+ borderRadius: '4px',
123
+ boxShadow: 'none'
124
+ },
125
+ header: {
126
+ accentColor: 'primary',
127
+ accentWidth: '3px',
128
+ horizontalPadding: '28px',
129
+ logoColor: 'text',
130
+ logoFontFamily: '"Playfair Display", "Georgia", "Times New Roman", serif',
131
+ logoTextTransform: 'uppercase',
132
+ logoLetterSpacing: '1px',
133
+ imageBorderRadius: '2px'
134
+ },
135
+ body: {
136
+ accentColor: 'secondary',
137
+ accentWidth: '1px',
138
+ borderRadius: '4px',
139
+ boxShadow: 'none',
140
+ horizontalPadding: '32px',
141
+ lineHeight: 1.6
142
+ },
143
+ button: {
144
+ appearance: 'solid',
145
+ borderRadius: '2px',
146
+ borderWidth: '1px',
147
+ boxShadow: 'none',
148
+ textTransform: 'uppercase',
149
+ letterSpacing: '0.5px'
150
+ },
151
+ footer: {
152
+ accentColor: 'border',
153
+ accentWidth: '1px'
154
+ }
155
+ };
156
+ }
@@ -0,0 +1,93 @@
1
+ import { ThemeType } from '../../core/enums/theme.enum';
2
+ import { ITheme, IThemeColors, ITypography, ISpacing, IThemeEmailStyles } from './theme.interface';
3
+
4
+ export class EditorialTheme implements ITheme {
5
+ id = ThemeType.EDITORIAL;
6
+ name = 'Editorial';
7
+
8
+ light: IThemeColors = {
9
+ primary: '#8B342D',
10
+ secondary: '#5D5148',
11
+ background: '#F7F3EA',
12
+ text: '#292522',
13
+ textMuted: '#655C54',
14
+ border: '#D8CFC1',
15
+ success: '#286146',
16
+ error: '#963B34',
17
+ warning: '#75500F'
18
+ };
19
+
20
+ dark: IThemeColors = {
21
+ primary: '#E49A8E',
22
+ secondary: '#C8BBA9',
23
+ background: '#211F1C',
24
+ text: '#F3EEE4',
25
+ textMuted: '#C2B8AA',
26
+ border: '#4A433C',
27
+ success: '#91CBA5',
28
+ error: '#F0A097',
29
+ warning: '#E9C77B'
30
+ };
31
+
32
+ typography: ITypography = {
33
+ fontFamily: 'Georgia, "Times New Roman", Times, serif',
34
+ fontSizes: {
35
+ small: '14px',
36
+ medium: '16px',
37
+ large: '19px',
38
+ xlarge: '28px'
39
+ },
40
+ fontWeights: {
41
+ normal: 400,
42
+ medium: 500,
43
+ bold: 700
44
+ }
45
+ };
46
+
47
+ spacing: ISpacing = {
48
+ xs: '4px',
49
+ sm: '8px',
50
+ md: '16px',
51
+ lg: '24px',
52
+ xl: '36px'
53
+ };
54
+
55
+ emailStyles: IThemeEmailStyles = {
56
+ maxWidthPx: 600,
57
+ container: {
58
+ borderColor: 'border',
59
+ borderWidth: '1px',
60
+ borderRadius: '3px',
61
+ boxShadow: 'none'
62
+ },
63
+ header: {
64
+ accentColor: 'primary',
65
+ accentWidth: '2px',
66
+ horizontalPadding: '28px',
67
+ logoColor: 'primary',
68
+ logoFontFamily: 'Georgia, "Times New Roman", Times, serif',
69
+ logoLetterSpacing: '0.02em',
70
+ imageBorderRadius: '2px'
71
+ },
72
+ body: {
73
+ accentColor: 'primary',
74
+ accentWidth: '2px',
75
+ borderRadius: '2px',
76
+ boxShadow: 'none',
77
+ horizontalPadding: '28px',
78
+ lineHeight: 1.65
79
+ },
80
+ button: {
81
+ appearance: 'solid',
82
+ borderRadius: '2px',
83
+ borderWidth: '1px',
84
+ boxShadow: 'none',
85
+ textTransform: 'uppercase',
86
+ letterSpacing: '0.04em'
87
+ },
88
+ footer: {
89
+ accentColor: 'secondary',
90
+ accentWidth: '1px'
91
+ }
92
+ };
93
+ }
@@ -0,0 +1,92 @@
1
+ import { ThemeType } from '../../core/enums/theme.enum';
2
+ import { ITheme, IThemeColors, ITypography, ISpacing, IThemeEmailStyles } from './theme.interface';
3
+
4
+ export class ForestTheme implements ITheme {
5
+ id = ThemeType.FOREST;
6
+ name = 'Forest';
7
+
8
+ light: IThemeColors = {
9
+ primary: '#315A3D',
10
+ secondary: '#657B5D',
11
+ background: '#F7F5EC',
12
+ text: '#26362B',
13
+ textMuted: '#58665A',
14
+ border: '#D9DFD2',
15
+ success: '#356B48',
16
+ error: '#A34037',
17
+ warning: '#805713'
18
+ };
19
+
20
+ dark: IThemeColors = {
21
+ primary: '#A9C69A',
22
+ secondary: '#B4C2A8',
23
+ background: '#18231C',
24
+ text: '#F1F2E9',
25
+ textMuted: '#B7C2B5',
26
+ border: '#3A4A3D',
27
+ success: '#9BC99E',
28
+ error: '#F0A39A',
29
+ warning: '#E5C078'
30
+ };
31
+
32
+ typography: ITypography = {
33
+ fontFamily: 'Georgia, "Times New Roman", serif',
34
+ fontSizes: {
35
+ small: '14px',
36
+ medium: '16px',
37
+ large: '18px',
38
+ xlarge: '26px'
39
+ },
40
+ fontWeights: {
41
+ normal: 400,
42
+ medium: 500,
43
+ bold: 700
44
+ }
45
+ };
46
+
47
+ spacing: ISpacing = {
48
+ xs: '6px',
49
+ sm: '12px',
50
+ md: '20px',
51
+ lg: '30px',
52
+ xl: '44px'
53
+ };
54
+
55
+ emailStyles: IThemeEmailStyles = {
56
+ maxWidthPx: 600,
57
+ container: {
58
+ borderColor: 'border',
59
+ borderWidth: '1px',
60
+ borderRadius: '8px',
61
+ boxShadow: 'none'
62
+ },
63
+ header: {
64
+ accentColor: 'primary',
65
+ accentWidth: '4px',
66
+ horizontalPadding: '28px',
67
+ logoColor: 'primary',
68
+ logoFontFamily: 'Georgia, "Times New Roman", serif',
69
+ imageBorderRadius: '6px'
70
+ },
71
+ body: {
72
+ accentColor: 'secondary',
73
+ accentWidth: '3px',
74
+ borderRadius: '6px',
75
+ boxShadow: 'none',
76
+ horizontalPadding: '28px',
77
+ lineHeight: 1.65
78
+ },
79
+ button: {
80
+ appearance: 'solid',
81
+ borderRadius: '4px',
82
+ borderWidth: '1px',
83
+ boxShadow: 'none',
84
+ textTransform: 'uppercase',
85
+ letterSpacing: '0.04em'
86
+ },
87
+ footer: {
88
+ accentColor: 'secondary',
89
+ accentWidth: '1px'
90
+ }
91
+ };
92
+ }
@@ -0,0 +1,91 @@
1
+ import { ThemeType } from '../../core/enums/theme.enum';
2
+ import { ITheme, IThemeColors, ITypography, ISpacing, IThemeEmailStyles } from './theme.interface';
3
+
4
+ export class GlassTheme implements ITheme {
5
+ id = ThemeType.GLASS;
6
+ name = 'Glass';
7
+
8
+ light: IThemeColors = {
9
+ primary: '#155E91',
10
+ secondary: '#526B7D',
11
+ background: '#F3F7FA',
12
+ text: '#183043',
13
+ textMuted: '#526B7D',
14
+ border: '#C9D7E1',
15
+ success: '#176B50',
16
+ error: '#A8323E',
17
+ warning: '#805400'
18
+ };
19
+
20
+ dark: IThemeColors = {
21
+ primary: '#83CEF5',
22
+ secondary: '#B0C5D4',
23
+ background: '#12202D',
24
+ text: '#EDF5FA',
25
+ textMuted: '#B0C5D4',
26
+ border: '#344B5D',
27
+ success: '#71D2A9',
28
+ error: '#FF9297',
29
+ warning: '#FFD078'
30
+ };
31
+
32
+ typography: ITypography = {
33
+ fontFamily: 'Arial, Helvetica, "Segoe UI", sans-serif',
34
+ fontSizes: {
35
+ small: '14px',
36
+ medium: '16px',
37
+ large: '18px',
38
+ xlarge: '26px'
39
+ },
40
+ fontWeights: {
41
+ normal: 400,
42
+ medium: 500,
43
+ bold: 700
44
+ }
45
+ };
46
+
47
+ spacing: ISpacing = {
48
+ xs: '6px',
49
+ sm: '12px',
50
+ md: '20px',
51
+ lg: '30px',
52
+ xl: '44px'
53
+ };
54
+
55
+ emailStyles: IThemeEmailStyles = {
56
+ maxWidthPx: 600,
57
+ container: {
58
+ borderColor: 'border',
59
+ borderWidth: '1px',
60
+ borderRadius: '12px',
61
+ boxShadow: '0 2px 8px rgba(24, 48, 67, 0.08)'
62
+ },
63
+ header: {
64
+ accentColor: 'primary',
65
+ accentWidth: '3px',
66
+ horizontalPadding: '28px',
67
+ logoColor: 'primary',
68
+ logoLetterSpacing: '0.04em',
69
+ imageBorderRadius: '6px'
70
+ },
71
+ body: {
72
+ accentColor: 'secondary',
73
+ accentWidth: '2px',
74
+ borderRadius: '8px',
75
+ boxShadow: 'none',
76
+ horizontalPadding: '28px',
77
+ lineHeight: 1.6
78
+ },
79
+ button: {
80
+ appearance: 'outline',
81
+ borderRadius: '6px',
82
+ borderWidth: '1px',
83
+ boxShadow: 'none',
84
+ letterSpacing: '0.02em'
85
+ },
86
+ footer: {
87
+ accentColor: 'border',
88
+ accentWidth: '1px'
89
+ }
90
+ };
91
+ }
@@ -0,0 +1,94 @@
1
+ import { ThemeType } from '../../core/enums/theme.enum';
2
+ import { ITheme, IThemeColors, ITypography, ISpacing, IThemeEmailStyles } from './theme.interface';
3
+
4
+ export class LavenderTheme implements ITheme {
5
+ id = ThemeType.LAVENDER;
6
+ name = 'Lavender';
7
+
8
+ light: IThemeColors = {
9
+ primary: '#623B8C',
10
+ secondary: '#8A4F68',
11
+ background: '#FCFAFF',
12
+ text: '#241B2B',
13
+ textMuted: '#62596A',
14
+ border: '#D9CFE2',
15
+ success: '#246B4A',
16
+ error: '#A12F45',
17
+ warning: '#815400'
18
+ };
19
+
20
+ dark: IThemeColors = {
21
+ primary: '#D7B8FF',
22
+ secondary: '#F0B5CA',
23
+ background: '#17121F',
24
+ text: '#F7F1FC',
25
+ textMuted: '#C3B8CC',
26
+ border: '#51465C',
27
+ success: '#8BD6AD',
28
+ error: '#FF9EAE',
29
+ warning: '#FFD27A'
30
+ };
31
+
32
+ typography: ITypography = {
33
+ fontFamily: 'Arial, "Segoe UI", system-ui, sans-serif',
34
+ fontSizes: {
35
+ small: '14px',
36
+ medium: '16px',
37
+ large: '18px',
38
+ xlarge: '26px'
39
+ },
40
+ fontWeights: {
41
+ normal: 400,
42
+ medium: 500,
43
+ bold: 600
44
+ }
45
+ };
46
+
47
+ spacing: ISpacing = {
48
+ xs: '6px',
49
+ sm: '12px',
50
+ md: '20px',
51
+ lg: '30px',
52
+ xl: '44px'
53
+ };
54
+
55
+ emailStyles: IThemeEmailStyles = {
56
+ maxWidthPx: 600,
57
+ container: {
58
+ borderColor: 'border',
59
+ borderWidth: '1px',
60
+ borderRadius: '16px',
61
+ boxShadow: 'none'
62
+ },
63
+ header: {
64
+ accentColor: 'primary',
65
+ accentWidth: '3px',
66
+ horizontalPadding: '28px',
67
+ logoColor: 'primary',
68
+ logoFontFamily: 'Arial, "Segoe UI", system-ui, sans-serif',
69
+ logoTextTransform: 'none',
70
+ logoLetterSpacing: '0.02em',
71
+ imageBorderRadius: '12px'
72
+ },
73
+ body: {
74
+ accentColor: 'secondary',
75
+ accentWidth: '2px',
76
+ borderRadius: '12px',
77
+ boxShadow: 'none',
78
+ horizontalPadding: '28px',
79
+ lineHeight: 1.65
80
+ },
81
+ button: {
82
+ appearance: 'solid',
83
+ borderRadius: '10px',
84
+ borderWidth: '1px',
85
+ boxShadow: 'none',
86
+ textTransform: 'none',
87
+ letterSpacing: '0.01em'
88
+ },
89
+ footer: {
90
+ accentColor: 'secondary',
91
+ accentWidth: '2px'
92
+ }
93
+ };
94
+ }
@@ -0,0 +1,94 @@
1
+ import { ThemeType } from '../../core/enums/theme.enum';
2
+ import { ITheme, IThemeColors, ITypography, ISpacing, IThemeEmailStyles } from './theme.interface';
3
+
4
+ export class MidnightTheme implements ITheme {
5
+ id = ThemeType.MIDNIGHT;
6
+ name = 'Midnight';
7
+
8
+ light: IThemeColors = {
9
+ primary: '#72551F',
10
+ secondary: '#655B49',
11
+ background: '#FFFCF5',
12
+ text: '#20232B',
13
+ textMuted: '#5B5D62',
14
+ border: '#D9D2C4',
15
+ success: '#286447',
16
+ error: '#A33138',
17
+ warning: '#795000'
18
+ };
19
+
20
+ dark: IThemeColors = {
21
+ primary: '#E6C982',
22
+ secondary: '#C7B991',
23
+ background: '#11151D',
24
+ text: '#F5F1E8',
25
+ textMuted: '#C2BEAF',
26
+ border: '#3A3B3B',
27
+ success: '#82C99C',
28
+ error: '#F08A8D',
29
+ warning: '#F0C66A'
30
+ };
31
+
32
+ typography: ITypography = {
33
+ fontFamily: 'Georgia, "Times New Roman", serif',
34
+ fontSizes: {
35
+ small: '14px',
36
+ medium: '16px',
37
+ large: '19px',
38
+ xlarge: '28px'
39
+ },
40
+ fontWeights: {
41
+ normal: 400,
42
+ medium: 500,
43
+ bold: 700
44
+ }
45
+ };
46
+
47
+ spacing: ISpacing = {
48
+ xs: '4px',
49
+ sm: '10px',
50
+ md: '18px',
51
+ lg: '28px',
52
+ xl: '44px'
53
+ };
54
+
55
+ emailStyles: IThemeEmailStyles = {
56
+ maxWidthPx: 600,
57
+ container: {
58
+ borderColor: 'border',
59
+ borderWidth: '1px',
60
+ borderRadius: '4px',
61
+ boxShadow: 'none'
62
+ },
63
+ header: {
64
+ accentColor: 'primary',
65
+ accentWidth: '3px',
66
+ horizontalPadding: '32px',
67
+ logoColor: 'primary',
68
+ logoFontFamily: 'Georgia, "Times New Roman", serif',
69
+ logoTextTransform: 'none',
70
+ logoLetterSpacing: '0.04em',
71
+ imageBorderRadius: '2px'
72
+ },
73
+ body: {
74
+ accentColor: 'secondary',
75
+ accentWidth: '1px',
76
+ borderRadius: '4px',
77
+ boxShadow: 'none',
78
+ horizontalPadding: '32px',
79
+ lineHeight: 1.65
80
+ },
81
+ button: {
82
+ appearance: 'outline',
83
+ borderRadius: '2px',
84
+ borderWidth: '1px',
85
+ boxShadow: 'none',
86
+ textTransform: 'uppercase',
87
+ letterSpacing: '0.08em'
88
+ },
89
+ footer: {
90
+ accentColor: 'secondary',
91
+ accentWidth: '1px'
92
+ }
93
+ };
94
+ }