strapi-plugin-magic-mail 2.0.3 → 2.1.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.
@@ -199,7 +199,7 @@ const HeaderContent = styled(Flex)`
199
199
  `;
200
200
 
201
201
  const Title = styled(Typography)`
202
- color: ${theme.colors.neutral[0]};
202
+ color: white;
203
203
  font-size: 2rem;
204
204
  font-weight: 700;
205
205
  letter-spacing: -0.025em;
@@ -254,7 +254,7 @@ const StatsGrid = styled.div`
254
254
  `;
255
255
 
256
256
  const StatCard = styled(Box)`
257
- background: ${theme.colors.neutral[0]};
257
+ background: ${props => props.theme.colors.neutral0};
258
258
  border-radius: ${theme.borderRadius.lg};
259
259
  padding: 28px ${theme.spacing.lg};
260
260
  position: relative;
@@ -263,7 +263,7 @@ const StatCard = styled(Box)`
263
263
  ${css`animation: ${fadeIn} ${theme.transitions.slow} backwards;`}
264
264
  animation-delay: ${props => props.$delay || '0s'};
265
265
  box-shadow: ${theme.shadows.sm};
266
- border: 1px solid ${theme.colors.neutral[200]};
266
+ border: 1px solid ${props => props.theme.colors.neutral200};
267
267
  min-width: 200px;
268
268
  flex: 1;
269
269
  text-align: center;
@@ -330,7 +330,7 @@ const StatIcon = styled(Box)`
330
330
  const StatValue = styled(Typography)`
331
331
  font-size: 2.75rem;
332
332
  font-weight: 700;
333
- color: ${theme.colors.neutral[800]};
333
+ color: ${props => props.theme.colors.neutral800};
334
334
  line-height: 1;
335
335
  margin-bottom: 10px;
336
336
  transition: all ${theme.transitions.normal};
@@ -344,7 +344,7 @@ const StatValue = styled(Typography)`
344
344
 
345
345
  const StatLabel = styled(Typography)`
346
346
  font-size: 0.95rem;
347
- color: ${theme.colors.neutral[600]};
347
+ color: ${props => props.theme.colors.neutral600};
348
348
  font-weight: 500;
349
349
  letter-spacing: 0.025em;
350
350
  text-align: center;
@@ -359,9 +359,9 @@ const RulesContainer = styled(Box)`
359
359
  `;
360
360
 
361
361
  const EmptyState = styled(Box)`
362
- background: ${theme.colors.neutral[0]};
362
+ background: ${props => props.theme.colors.neutral0};
363
363
  border-radius: ${theme.borderRadius.xl};
364
- border: 2px dashed ${theme.colors.neutral[200]};
364
+ border: 2px dashed ${props => props.theme.colors.neutral300};
365
365
  padding: 80px 32px;
366
366
  text-align: center;
367
367
  position: relative;
@@ -389,7 +389,7 @@ const OnlineBadge = styled.div`
389
389
  width: 12px;
390
390
  height: 12px;
391
391
  border-radius: 50%;
392
- background: ${props => props.$active ? theme.colors.success[500] : theme.colors.neutral[400]};
392
+ background: ${props => props.$active ? theme.colors.success[500] : props.theme.colors.neutral400};
393
393
  display: inline-block;
394
394
  margin-right: 8px;
395
395
  ${css`animation: ${props => props.$active ? pulse : 'none'} 2s ease-in-out infinite;`}
@@ -397,12 +397,12 @@ const OnlineBadge = styled.div`
397
397
 
398
398
  const StyledTable = styled(Table)`
399
399
  thead {
400
- background: ${theme.colors.neutral[50]};
401
- border-bottom: 2px solid ${theme.colors.neutral[200]};
400
+ background: ${props => props.theme.colors.neutral100};
401
+ border-bottom: 2px solid ${props => props.theme.colors.neutral200};
402
402
 
403
403
  th {
404
404
  font-weight: 600;
405
- color: ${theme.colors.neutral[700]};
405
+ color: ${props => props.theme.colors.neutral800};
406
406
  font-size: 0.875rem;
407
407
  text-transform: uppercase;
408
408
  letter-spacing: 0.025em;
@@ -412,31 +412,31 @@ const StyledTable = styled(Table)`
412
412
 
413
413
  tbody tr {
414
414
  transition: all ${theme.transitions.fast};
415
- border-bottom: 1px solid ${theme.colors.neutral[100]};
415
+ border-bottom: 1px solid ${props => props.theme.colors.neutral150};
416
416
 
417
417
  &:last-child {
418
418
  border-bottom: none;
419
419
  }
420
420
 
421
421
  &:hover {
422
- background: ${theme.colors.neutral[50]};
422
+ background: ${props => props.theme.colors.primary100};
423
423
  }
424
424
 
425
425
  td {
426
426
  padding: ${theme.spacing.lg} ${theme.spacing.lg};
427
- color: ${theme.colors.neutral[700]};
427
+ color: ${props => props.theme.colors.neutral800};
428
428
  vertical-align: middle;
429
429
  }
430
430
  }
431
431
  `;
432
432
 
433
433
  const FilterBar = styled(Flex)`
434
- background: ${theme.colors.neutral[0]};
434
+ background: ${props => props.theme.colors.neutral0};
435
435
  padding: ${theme.spacing.md} ${theme.spacing.lg};
436
436
  border-radius: ${theme.borderRadius.lg};
437
437
  margin-bottom: ${theme.spacing.lg};
438
438
  box-shadow: ${theme.shadows.sm};
439
- border: 1px solid ${theme.colors.neutral[200]};
439
+ border: 1px solid ${props => props.theme.colors.neutral200};
440
440
  gap: ${theme.spacing.md};
441
441
  align-items: center;
442
442
  `;
@@ -453,14 +453,14 @@ const SearchIcon = styled(MagnifyingGlassIcon)`
453
453
  left: 12px;
454
454
  width: 16px;
455
455
  height: 16px;
456
- color: ${theme.colors.neutral[600]};
456
+ color: ${props => props.theme.colors.neutral600};
457
457
  pointer-events: none;
458
458
  `;
459
459
 
460
460
  const StyledSearchInput = styled.input`
461
461
  width: 100%;
462
462
  padding: 10px 12px 10px 40px;
463
- border: 1px solid ${theme.colors.neutral[200]};
463
+ border: 1px solid ${props => props.theme.colors.neutral200};
464
464
  border-radius: ${theme.borderRadius.md};
465
465
  font-size: 0.875rem;
466
466
  transition: all ${theme.transitions.fast};
@@ -472,7 +472,7 @@ const StyledSearchInput = styled.input`
472
472
  }
473
473
 
474
474
  &::placeholder {
475
- color: ${theme.colors.neutral[600]};
475
+ color: ${props => props.theme.colors.neutral500};
476
476
  }
477
477
  `;
478
478
 
@@ -636,10 +636,10 @@ const RoutingRulesPage = () => {
636
636
 
637
637
  <Typography
638
638
  variant="alpha"
639
+ textColor="neutral800"
639
640
  style={{
640
641
  fontSize: '1.75rem',
641
642
  fontWeight: '700',
642
- color: theme.colors.neutral[800],
643
643
  marginBottom: '8px',
644
644
  }}
645
645
  >
@@ -671,7 +671,7 @@ const RoutingRulesPage = () => {
671
671
  <RulesContainer>
672
672
  <Box style={{ marginBottom: theme.spacing.md }}>
673
673
  <Flex justifyContent="space-between" alignItems="center" marginBottom={4}>
674
- <Typography variant="delta" style={{ fontSize: '1.5rem', fontWeight: 600, color: theme.colors.neutral[700] }}>
674
+ <Typography variant="delta" textColor="neutral700" style={{ fontSize: '1.5rem', fontWeight: 600 }}>
675
675
  🎯 Routing Rules
676
676
  </Typography>
677
677
  <Button startIcon={<PlusIcon style={{ width: 16, height: 16 }} />} onClick={() => setShowModal(true)}>
@@ -57,9 +57,9 @@ const StickySaveBar = styled(Box)`
57
57
  position: sticky;
58
58
  top: 0;
59
59
  z-index: 10;
60
- background: white;
61
- border-bottom: 1px solid ${theme.colors.neutral[200]};
62
- box-shadow: ${theme.shadows.sm};
60
+ background: ${props => props.theme.colors.neutral0};
61
+ border-bottom: 1px solid ${props => props.theme.colors.neutral200};
62
+ box-shadow: 0 1px 3px rgba(0,0,0,0.1);
63
63
  `;
64
64
 
65
65
  const LicenseKeyBanner = styled(Box)`
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Theme Utilities for Dark Mode Support
3
+ *
4
+ * IMPORTANT: For Dark Mode to work properly, use props.theme in styled-components:
5
+ *
6
+ * Example:
7
+ * background: ${props => props.theme.colors.neutral0};
8
+ * color: ${props => props.theme.colors.neutral800};
9
+ * border: 1px solid ${props => props.theme.colors.neutral200};
10
+ *
11
+ * Strapi's ThemeProvider automatically switches these values between Light and Dark mode.
12
+ *
13
+ * Use the static `theme` object below ONLY for:
14
+ * - Gradients (which don't change between light/dark)
15
+ * - Shadows
16
+ * - Spacing
17
+ * - Border radius
18
+ * - Transitions
19
+ */
20
+
21
+ // Static design tokens (for non-theme-dependent values)
22
+ export const theme = {
23
+ colors: {
24
+ primary: {
25
+ 50: '#F0F9FF',
26
+ 100: '#E0F2FE',
27
+ 200: '#BAE6FD',
28
+ 500: '#0EA5E9',
29
+ 600: '#0284C7',
30
+ 700: '#0369A1',
31
+ },
32
+ secondary: {
33
+ 50: '#FAF5FF',
34
+ 100: '#F3E8FF',
35
+ 500: '#A855F7',
36
+ 600: '#9333EA',
37
+ },
38
+ success: {
39
+ 50: '#F0FDF4',
40
+ 100: '#DCFCE7',
41
+ 500: '#22C55E',
42
+ 600: '#16A34A',
43
+ 700: '#15803D',
44
+ },
45
+ warning: {
46
+ 50: '#FFFBEB',
47
+ 100: '#FEF3C7',
48
+ 500: '#F59E0B',
49
+ 600: '#D97706',
50
+ },
51
+ danger: {
52
+ 50: '#FEF2F2',
53
+ 100: '#FEE2E2',
54
+ 500: '#EF4444',
55
+ 600: '#DC2626',
56
+ },
57
+ },
58
+ shadows: {
59
+ sm: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)',
60
+ md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)',
61
+ lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)',
62
+ xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)',
63
+ },
64
+ transitions: {
65
+ fast: '150ms cubic-bezier(0.4, 0, 0.2, 1)',
66
+ normal: '300ms cubic-bezier(0.4, 0, 0.2, 1)',
67
+ slow: '500ms cubic-bezier(0.4, 0, 0.2, 1)',
68
+ },
69
+ spacing: {
70
+ xs: '4px',
71
+ sm: '8px',
72
+ md: '16px',
73
+ lg: '24px',
74
+ xl: '32px',
75
+ '2xl': '48px',
76
+ },
77
+ borderRadius: {
78
+ sm: '6px',
79
+ md: '8px',
80
+ lg: '12px',
81
+ xl: '16px',
82
+ }
83
+ };
84
+
85
+ export default theme;