strapi-plugin-magic-mail 2.9.2 → 2.10.1

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.
@@ -197,96 +197,147 @@ const StepLabel$1 = styled(Typography)`
197
197
  text-align: center;
198
198
  transition: all 0.3s ease;
199
199
  `;
200
+ const ProviderCategoryHeader = styled(Box)`
201
+ display: flex;
202
+ align-items: center;
203
+ gap: 12px;
204
+ margin: 0 0 16px;
205
+ animation: ${fadeIn$6} 0.4s ease;
206
+
207
+ &::after {
208
+ content: '';
209
+ flex: 1;
210
+ height: 1px;
211
+ background: linear-gradient(90deg, ${colors$1.border}, transparent);
212
+ }
213
+ `;
214
+ const ProviderCategoryLabel = styled(Typography)`
215
+ font-size: 12px;
216
+ font-weight: 600;
217
+ letter-spacing: 0.08em;
218
+ text-transform: uppercase;
219
+ color: ${colors$1.textLight};
220
+ `;
221
+ const ProviderCategoryHint = styled.span`
222
+ font-size: 11px;
223
+ font-weight: 500;
224
+ padding: 3px 10px;
225
+ border-radius: 999px;
226
+ background: ${colors$1.primaryLight};
227
+ color: ${colors$1.primary};
228
+ letter-spacing: 0.02em;
229
+ text-transform: none;
230
+ `;
200
231
  const ProvidersGrid = styled(Box)`
201
232
  display: grid;
202
- grid-template-columns: repeat(2, 1fr);
203
- gap: 20px;
204
- margin-bottom: 24px;
233
+ grid-template-columns: repeat(3, 1fr);
234
+ gap: 16px;
235
+ margin: 0 auto 28px;
205
236
  animation: ${slideIn} 0.5s ease;
206
- max-width: 800px;
207
- margin-left: auto;
208
- margin-right: auto;
237
+ max-width: 960px;
238
+
239
+ @media (max-width: 960px) {
240
+ grid-template-columns: repeat(2, 1fr);
241
+ }
242
+ @media (max-width: 600px) {
243
+ grid-template-columns: 1fr;
244
+ }
209
245
  `;
210
246
  const ProviderCard = styled(Box)`
211
- background: ${(props) => props.$selected ? colors$1.successLight : props.theme.colors.neutral0};
212
- border: 2px solid ${(props) => props.$selected ? colors$1.success : colors$1.border};
213
- border-radius: 12px;
214
- padding: 24px;
247
+ background: ${(props) => props.$selected ? `linear-gradient(180deg, ${colors$1.successLight}, rgba(92, 177, 118, 0.04))` : "var(--colors-neutral100, rgba(255,255,255,0.02))"};
248
+ border: 1.5px solid ${(props) => props.$selected ? colors$1.success : colors$1.border};
249
+ border-radius: 14px;
250
+ padding: 22px 20px 20px;
215
251
  cursor: pointer;
216
- transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
217
- text-align: center;
218
- aspect-ratio: 1;
219
- min-height: 180px;
252
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s, border-color 0.2s, background 0.2s;
220
253
  display: flex;
221
254
  flex-direction: column;
222
- align-items: center;
223
- justify-content: center;
224
- gap: 12px;
255
+ align-items: flex-start;
256
+ gap: 14px;
225
257
  position: relative;
226
258
  overflow: hidden;
227
-
259
+ min-height: 170px;
260
+
228
261
  &::before {
229
262
  content: '';
230
263
  position: absolute;
231
- top: 0;
232
- left: 0;
233
- right: 0;
234
- bottom: 0;
235
- background: linear-gradient(135deg, transparent, rgba(73, 69, 255, 0.05));
264
+ inset: 0;
265
+ background: linear-gradient(135deg, transparent 60%, rgba(73, 69, 255, 0.06));
236
266
  opacity: 0;
237
- transition: opacity 0.3s;
267
+ transition: opacity 0.25s;
268
+ pointer-events: none;
238
269
  }
239
-
270
+
240
271
  &:hover {
241
- transform: translateY(-4px);
242
- box-shadow: 0 8px 24px rgba(73, 69, 255, 0.12);
272
+ transform: translateY(-3px);
273
+ box-shadow: 0 10px 28px rgba(73, 69, 255, 0.18);
243
274
  border-color: ${(props) => props.$selected ? colors$1.success : colors$1.primary};
244
-
275
+
245
276
  &::before {
246
277
  opacity: 1;
247
278
  }
248
279
  }
249
-
250
- ${(props) => props.$selected && `
280
+
281
+ &:focus-visible {
282
+ outline: 2px solid ${colors$1.primary};
283
+ outline-offset: 2px;
284
+ }
285
+
286
+ ${(props) => props.$selected && css`
287
+ box-shadow: 0 0 0 1px ${colors$1.success}, 0 10px 28px rgba(92, 177, 118, 0.18);
288
+
251
289
  &::after {
252
290
  content: '✓';
253
291
  position: absolute;
254
- top: 8px;
255
- right: 8px;
292
+ top: 12px;
293
+ right: 12px;
256
294
  width: 24px;
257
295
  height: 24px;
258
296
  background: ${colors$1.success};
259
- color: white;
297
+ color: #fff;
260
298
  border-radius: 50%;
261
299
  display: flex;
262
300
  align-items: center;
263
301
  justify-content: center;
264
- font-size: 14px;
265
- font-weight: bold;
302
+ font-size: 13px;
303
+ font-weight: 700;
304
+ box-shadow: 0 2px 6px rgba(92, 177, 118, 0.35);
266
305
  }
267
306
  `}
268
307
  `;
269
308
  const ProviderIcon = styled.div`
270
- width: 56px;
271
- height: 56px;
309
+ width: 48px;
310
+ height: 48px;
272
311
  border-radius: ${(props) => props.$round ? "50%" : "12px"};
273
- background: ${(props) => props.$bgColor || colors$1.primaryLight};
312
+ /* Dark-mode-friendly: mix the accent colour onto an opaque surface
313
+ instead of using a semi-transparent wash. Semi-transparent colours
314
+ disappeared against the plugin's dark modal background. */
315
+ background: ${(props) => props.$bgColor || "rgba(73, 69, 255, 0.2)"};
274
316
  display: flex;
275
317
  align-items: center;
276
318
  justify-content: center;
277
- font-size: ${(props) => props.$fontSize || "24px"};
278
- font-weight: bold;
319
+ font-size: ${(props) => props.$fontSize || "22px"};
320
+ font-weight: 700;
279
321
  color: ${(props) => props.$color || colors$1.primary};
280
- box-shadow: 0 4px 12px ${(props) => props.$shadowColor || "rgba(73, 69, 255, 0.15)"};
322
+ box-shadow: 0 4px 14px ${(props) => props.$shadowColor || "rgba(73, 69, 255, 0.25)"};
323
+ flex-shrink: 0;
324
+ `;
325
+ const ProviderTextBlock = styled(Box)`
326
+ display: flex;
327
+ flex-direction: column;
328
+ gap: 4px;
329
+ margin-top: auto;
281
330
  `;
282
331
  const ProviderName = styled(Typography)`
283
332
  font-weight: 600;
284
- font-size: 15px;
333
+ font-size: 16px;
334
+ line-height: 1.25;
285
335
  color: ${colors$1.text};
286
336
  margin: 0;
287
337
  `;
288
- styled(Typography)`
289
- font-size: 12px;
338
+ const ProviderTagline = styled(Typography)`
339
+ font-size: 12.5px;
340
+ line-height: 1.4;
290
341
  color: ${colors$1.textLight};
291
342
  margin: 0;
292
343
  `;
@@ -852,101 +903,170 @@ const AddAccountModal = ({ isOpen, onClose, onAccountAdded, editAccount = null }
852
903
  },
853
904
  step
854
905
  )) }),
855
- currentStep === 1 && /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(ProvidersGrid, { children: [
856
- /* @__PURE__ */ jsxs(
857
- ProviderCard,
858
- {
859
- $selected: provider === "gmail-oauth",
860
- onClick: () => setProvider("gmail-oauth"),
861
- children: [
862
- /* @__PURE__ */ jsx(
863
- ProviderIcon,
864
- {
865
- $round: true,
866
- $bgColor: "#4285F433",
867
- $color: "#4285F4",
868
- $shadowColor: "rgba(66, 133, 244, 0.2)",
869
- children: "G"
870
- }
871
- ),
872
- /* @__PURE__ */ jsx(ProviderName, { children: "Gmail OAuth" })
873
- ]
874
- }
875
- ),
876
- /* @__PURE__ */ jsxs(
877
- ProviderCard,
878
- {
879
- $selected: provider === "microsoft-oauth",
880
- onClick: () => setProvider("microsoft-oauth"),
881
- children: [
882
- /* @__PURE__ */ jsx(
883
- ProviderIcon,
884
- {
885
- $round: true,
886
- $bgColor: "#00A4EF33",
887
- $color: "#00A4EF",
888
- $shadowColor: "rgba(0, 164, 239, 0.2)",
889
- children: "M"
890
- }
891
- ),
892
- /* @__PURE__ */ jsx(ProviderName, { children: "Microsoft OAuth" })
893
- ]
894
- }
895
- ),
896
- /* @__PURE__ */ jsxs(
897
- ProviderCard,
898
- {
899
- $selected: provider === "yahoo-oauth",
900
- onClick: () => setProvider("yahoo-oauth"),
901
- children: [
902
- /* @__PURE__ */ jsx(
903
- ProviderIcon,
904
- {
905
- $round: true,
906
- $bgColor: "#6001D233",
907
- $color: "#6001D2",
908
- $shadowColor: "rgba(96, 1, 210, 0.2)",
909
- children: "Y"
910
- }
911
- ),
912
- /* @__PURE__ */ jsx(ProviderName, { children: "Yahoo Mail OAuth" })
913
- ]
914
- }
915
- ),
916
- /* @__PURE__ */ jsxs(
917
- ProviderCard,
918
- {
919
- $selected: provider === "smtp",
920
- onClick: () => setProvider("smtp"),
921
- children: [
922
- /* @__PURE__ */ jsx(ProviderIcon, { children: /* @__PURE__ */ jsx(Server, { style: { width: 28, height: 28 } }) }),
923
- /* @__PURE__ */ jsx(ProviderName, { children: "SMTP" })
924
- ]
925
- }
926
- ),
927
- /* @__PURE__ */ jsxs(
928
- ProviderCard,
929
- {
930
- $selected: provider === "sendgrid",
931
- onClick: () => setProvider("sendgrid"),
932
- children: [
933
- /* @__PURE__ */ jsx(ProviderIcon, { $bgColor: "#1E90FF22", $color: "#1E90FF", $shadowColor: "rgba(30, 144, 255, 0.2)", children: /* @__PURE__ */ jsx(Cloud, { style: { width: 28, height: 28 } }) }),
934
- /* @__PURE__ */ jsx(ProviderName, { children: "SendGrid" })
935
- ]
936
- }
937
- ),
938
- /* @__PURE__ */ jsxs(
939
- ProviderCard,
940
- {
941
- $selected: provider === "mailgun",
942
- onClick: () => setProvider("mailgun"),
943
- children: [
944
- /* @__PURE__ */ jsx(ProviderIcon, { $bgColor: "#FF6B6B22", $color: "#FF6B6B", $shadowColor: "rgba(255, 107, 107, 0.2)", children: /* @__PURE__ */ jsx(Mail, { style: { width: 28, height: 28 } }) }),
945
- /* @__PURE__ */ jsx(ProviderName, { children: "Mailgun" })
946
- ]
947
- }
948
- )
949
- ] }) }),
906
+ currentStep === 1 && /* @__PURE__ */ jsxs(Box, { children: [
907
+ /* @__PURE__ */ jsxs(ProviderCategoryHeader, { children: [
908
+ /* @__PURE__ */ jsx(ProviderCategoryLabel, { children: "OAuth Providers" }),
909
+ /* @__PURE__ */ jsx(ProviderCategoryHint, { children: "Recommended" })
910
+ ] }),
911
+ /* @__PURE__ */ jsxs(ProvidersGrid, { children: [
912
+ /* @__PURE__ */ jsxs(
913
+ ProviderCard,
914
+ {
915
+ $selected: provider === "gmail-oauth",
916
+ onClick: () => setProvider("gmail-oauth"),
917
+ role: "button",
918
+ tabIndex: 0,
919
+ onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && setProvider("gmail-oauth"),
920
+ children: [
921
+ /* @__PURE__ */ jsx(
922
+ ProviderIcon,
923
+ {
924
+ $round: true,
925
+ $bgColor: "rgba(66, 133, 244, 0.22)",
926
+ $color: "#4285F4",
927
+ $shadowColor: "rgba(66, 133, 244, 0.3)",
928
+ children: "G"
929
+ }
930
+ ),
931
+ /* @__PURE__ */ jsxs(ProviderTextBlock, { children: [
932
+ /* @__PURE__ */ jsx(ProviderName, { children: "Gmail" }),
933
+ /* @__PURE__ */ jsx(ProviderTagline, { children: "Google Workspace & personal accounts · 1-click OAuth" })
934
+ ] })
935
+ ]
936
+ }
937
+ ),
938
+ /* @__PURE__ */ jsxs(
939
+ ProviderCard,
940
+ {
941
+ $selected: provider === "microsoft-oauth",
942
+ onClick: () => setProvider("microsoft-oauth"),
943
+ role: "button",
944
+ tabIndex: 0,
945
+ onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && setProvider("microsoft-oauth"),
946
+ children: [
947
+ /* @__PURE__ */ jsx(
948
+ ProviderIcon,
949
+ {
950
+ $round: true,
951
+ $bgColor: "rgba(0, 164, 239, 0.22)",
952
+ $color: "#00A4EF",
953
+ $shadowColor: "rgba(0, 164, 239, 0.3)",
954
+ children: "M"
955
+ }
956
+ ),
957
+ /* @__PURE__ */ jsxs(ProviderTextBlock, { children: [
958
+ /* @__PURE__ */ jsx(ProviderName, { children: "Microsoft 365" }),
959
+ /* @__PURE__ */ jsx(ProviderTagline, { children: "Outlook · Exchange · Azure AD · 1-click OAuth" })
960
+ ] })
961
+ ]
962
+ }
963
+ ),
964
+ /* @__PURE__ */ jsxs(
965
+ ProviderCard,
966
+ {
967
+ $selected: provider === "yahoo-oauth",
968
+ onClick: () => setProvider("yahoo-oauth"),
969
+ role: "button",
970
+ tabIndex: 0,
971
+ onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && setProvider("yahoo-oauth"),
972
+ children: [
973
+ /* @__PURE__ */ jsx(
974
+ ProviderIcon,
975
+ {
976
+ $round: true,
977
+ $bgColor: "rgba(96, 1, 210, 0.22)",
978
+ $color: "#9C6BF0",
979
+ $shadowColor: "rgba(96, 1, 210, 0.3)",
980
+ children: "Y"
981
+ }
982
+ ),
983
+ /* @__PURE__ */ jsxs(ProviderTextBlock, { children: [
984
+ /* @__PURE__ */ jsx(ProviderName, { children: "Yahoo Mail" }),
985
+ /* @__PURE__ */ jsx(ProviderTagline, { children: "Yahoo & AOL accounts · 1-click OAuth" })
986
+ ] })
987
+ ]
988
+ }
989
+ )
990
+ ] }),
991
+ /* @__PURE__ */ jsx(ProviderCategoryHeader, { children: /* @__PURE__ */ jsx(ProviderCategoryLabel, { children: "Custom & Transactional APIs" }) }),
992
+ /* @__PURE__ */ jsxs(ProvidersGrid, { children: [
993
+ /* @__PURE__ */ jsxs(
994
+ ProviderCard,
995
+ {
996
+ $selected: provider === "smtp",
997
+ onClick: () => setProvider("smtp"),
998
+ role: "button",
999
+ tabIndex: 0,
1000
+ onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && setProvider("smtp"),
1001
+ children: [
1002
+ /* @__PURE__ */ jsx(
1003
+ ProviderIcon,
1004
+ {
1005
+ $bgColor: "rgba(73, 69, 255, 0.22)",
1006
+ $color: "#7B78FF",
1007
+ $shadowColor: "rgba(73, 69, 255, 0.3)",
1008
+ children: /* @__PURE__ */ jsx(Server, { style: { width: 26, height: 26 } })
1009
+ }
1010
+ ),
1011
+ /* @__PURE__ */ jsxs(ProviderTextBlock, { children: [
1012
+ /* @__PURE__ */ jsx(ProviderName, { children: "SMTP" }),
1013
+ /* @__PURE__ */ jsx(ProviderTagline, { children: "Any SMTP server · full control over host, port & auth" })
1014
+ ] })
1015
+ ]
1016
+ }
1017
+ ),
1018
+ /* @__PURE__ */ jsxs(
1019
+ ProviderCard,
1020
+ {
1021
+ $selected: provider === "sendgrid",
1022
+ onClick: () => setProvider("sendgrid"),
1023
+ role: "button",
1024
+ tabIndex: 0,
1025
+ onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && setProvider("sendgrid"),
1026
+ children: [
1027
+ /* @__PURE__ */ jsx(
1028
+ ProviderIcon,
1029
+ {
1030
+ $bgColor: "rgba(30, 144, 255, 0.22)",
1031
+ $color: "#4FA8FF",
1032
+ $shadowColor: "rgba(30, 144, 255, 0.3)",
1033
+ children: /* @__PURE__ */ jsx(Cloud, { style: { width: 26, height: 26 } })
1034
+ }
1035
+ ),
1036
+ /* @__PURE__ */ jsxs(ProviderTextBlock, { children: [
1037
+ /* @__PURE__ */ jsx(ProviderName, { children: "SendGrid" }),
1038
+ /* @__PURE__ */ jsx(ProviderTagline, { children: "Transactional API · high deliverability · analytics" })
1039
+ ] })
1040
+ ]
1041
+ }
1042
+ ),
1043
+ /* @__PURE__ */ jsxs(
1044
+ ProviderCard,
1045
+ {
1046
+ $selected: provider === "mailgun",
1047
+ onClick: () => setProvider("mailgun"),
1048
+ role: "button",
1049
+ tabIndex: 0,
1050
+ onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && setProvider("mailgun"),
1051
+ children: [
1052
+ /* @__PURE__ */ jsx(
1053
+ ProviderIcon,
1054
+ {
1055
+ $bgColor: "rgba(255, 107, 107, 0.22)",
1056
+ $color: "#FF8A8A",
1057
+ $shadowColor: "rgba(255, 107, 107, 0.3)",
1058
+ children: /* @__PURE__ */ jsx(Mail, { style: { width: 26, height: 26 } })
1059
+ }
1060
+ ),
1061
+ /* @__PURE__ */ jsxs(ProviderTextBlock, { children: [
1062
+ /* @__PURE__ */ jsx(ProviderName, { children: "Mailgun" }),
1063
+ /* @__PURE__ */ jsx(ProviderTagline, { children: "Developer-first API · EU/US regions · routes & webhooks" })
1064
+ ] })
1065
+ ]
1066
+ }
1067
+ )
1068
+ ] })
1069
+ ] }),
950
1070
  currentStep === 2 && /* @__PURE__ */ jsx(FormSection, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 4, style: { width: "100%" }, children: [
951
1071
  /* @__PURE__ */ jsx(FullWidthField, { children: /* @__PURE__ */ jsxs(Field.Root, { required: true, children: [
952
1072
  /* @__PURE__ */ jsx(Field.Label, { children: "Account Name" }),
@@ -68,7 +68,7 @@ const index = {
68
68
  id: `${pluginId}.plugin.name`,
69
69
  defaultMessage: "MagicMail"
70
70
  },
71
- Component: () => Promise.resolve().then(() => require("../_chunks/App-BSZzEkaa.js")),
71
+ Component: () => Promise.resolve().then(() => require("../_chunks/App-2Bg4LxwL.js")),
72
72
  permissions: pluginPermissions
73
73
  });
74
74
  app.createSettingSection(
@@ -67,7 +67,7 @@ const index = {
67
67
  id: `${pluginId}.plugin.name`,
68
68
  defaultMessage: "MagicMail"
69
69
  },
70
- Component: () => import("../_chunks/App-BZQTPVdT.mjs"),
70
+ Component: () => import("../_chunks/App-CAtJIwNW.mjs"),
71
71
  permissions: pluginPermissions
72
72
  });
73
73
  app.createSettingSection(