@parathantl/react-email-editor 0.1.6 → 0.1.7
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.
- package/dist/index.cjs +5082 -4471
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +244 -32
- package/dist/index.css.map +1 -1
- package/dist/index.js +5084 -4473
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -253,23 +253,43 @@
|
|
|
253
253
|
.exportDropdownItem:hover {
|
|
254
254
|
background: var(--ee-bg-hover);
|
|
255
255
|
}
|
|
256
|
+
@keyframes toolbarSlideIn {
|
|
257
|
+
from {
|
|
258
|
+
opacity: 0;
|
|
259
|
+
transform: translateY(-4px);
|
|
260
|
+
}
|
|
261
|
+
to {
|
|
262
|
+
opacity: 1;
|
|
263
|
+
transform: translateY(0);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
256
266
|
.richTextToolbar {
|
|
257
267
|
display: flex;
|
|
258
268
|
align-items: center;
|
|
259
|
-
gap:
|
|
269
|
+
gap: 4px;
|
|
260
270
|
padding: var(--ee-space-xs) var(--ee-space-sm);
|
|
261
271
|
background: var(--ee-bg-panel);
|
|
262
272
|
border: 1px solid var(--ee-border-color);
|
|
263
273
|
border-radius: var(--ee-border-radius);
|
|
264
274
|
box-shadow: var(--ee-shadow-sm);
|
|
265
275
|
flex-wrap: wrap;
|
|
276
|
+
animation: toolbarSlideIn 150ms ease;
|
|
277
|
+
}
|
|
278
|
+
.richTextGroup {
|
|
279
|
+
display: flex;
|
|
280
|
+
align-items: center;
|
|
281
|
+
gap: 1px;
|
|
282
|
+
background: var(--ee-bg-app);
|
|
283
|
+
border-radius: var(--ee-border-radius-sm);
|
|
284
|
+
padding: 2px;
|
|
285
|
+
box-shadow: inset 0 0 0 1px var(--ee-border-color);
|
|
266
286
|
}
|
|
267
287
|
.richTextBtn {
|
|
268
288
|
display: flex;
|
|
269
289
|
align-items: center;
|
|
270
290
|
justify-content: center;
|
|
271
|
-
width:
|
|
272
|
-
height:
|
|
291
|
+
width: 26px;
|
|
292
|
+
height: 26px;
|
|
273
293
|
font-size: var(--ee-font-size-sm);
|
|
274
294
|
background: transparent;
|
|
275
295
|
border: none;
|
|
@@ -277,36 +297,54 @@
|
|
|
277
297
|
cursor: pointer;
|
|
278
298
|
color: var(--ee-text-secondary);
|
|
279
299
|
transition: all var(--ee-transition-fast);
|
|
300
|
+
padding: 0;
|
|
301
|
+
line-height: 1;
|
|
280
302
|
}
|
|
281
303
|
.richTextBtn:hover {
|
|
282
304
|
background: var(--ee-bg-hover);
|
|
283
305
|
color: var(--ee-text-primary);
|
|
284
306
|
}
|
|
307
|
+
.richTextBtn:disabled {
|
|
308
|
+
opacity: 0.35;
|
|
309
|
+
cursor: not-allowed;
|
|
310
|
+
}
|
|
311
|
+
.richTextBtn:disabled:hover {
|
|
312
|
+
background: transparent;
|
|
313
|
+
color: var(--ee-text-secondary);
|
|
314
|
+
}
|
|
315
|
+
.richTextBtn:focus-visible {
|
|
316
|
+
outline: 2px solid var(--ee-border-focus);
|
|
317
|
+
outline-offset: -1px;
|
|
318
|
+
}
|
|
285
319
|
.richTextBtnActive {
|
|
286
320
|
background: var(--ee-bg-selected);
|
|
287
321
|
color: var(--ee-color-primary);
|
|
322
|
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
288
323
|
}
|
|
289
|
-
.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
324
|
+
.richTextBtnWithIndicator {
|
|
325
|
+
composes: richTextBtn;
|
|
326
|
+
flex-direction: column;
|
|
327
|
+
gap: 1px;
|
|
328
|
+
height: 28px;
|
|
294
329
|
}
|
|
295
330
|
.richTextSelect {
|
|
296
|
-
height:
|
|
331
|
+
height: 26px;
|
|
297
332
|
padding: 0 4px;
|
|
298
333
|
font-size: var(--ee-font-size-xs);
|
|
299
334
|
font-family: var(--ee-font-family);
|
|
300
|
-
border:
|
|
335
|
+
border: none;
|
|
301
336
|
border-radius: var(--ee-border-radius-sm);
|
|
302
|
-
background:
|
|
337
|
+
background: transparent;
|
|
303
338
|
color: var(--ee-text-primary);
|
|
304
339
|
outline: none;
|
|
305
340
|
cursor: pointer;
|
|
306
341
|
max-width: 110px;
|
|
307
342
|
}
|
|
343
|
+
.richTextSelect:hover {
|
|
344
|
+
background: var(--ee-bg-hover);
|
|
345
|
+
}
|
|
308
346
|
.richTextSelect:focus {
|
|
309
|
-
|
|
347
|
+
background: var(--ee-bg-hover);
|
|
310
348
|
}
|
|
311
349
|
.richTextSelectSmall {
|
|
312
350
|
composes: richTextSelect;
|
|
@@ -315,10 +353,6 @@
|
|
|
315
353
|
.richTextColorWrapper {
|
|
316
354
|
position: relative;
|
|
317
355
|
}
|
|
318
|
-
.richTextColorLabel {
|
|
319
|
-
font-weight: var(--ee-font-weight-semibold);
|
|
320
|
-
font-size: var(--ee-font-size-sm);
|
|
321
|
-
}
|
|
322
356
|
.richTextColorIndicator {
|
|
323
357
|
display: block;
|
|
324
358
|
width: 16px;
|
|
@@ -337,7 +371,15 @@
|
|
|
337
371
|
border-radius: var(--ee-border-radius);
|
|
338
372
|
box-shadow: var(--ee-shadow-md);
|
|
339
373
|
z-index: var(--ee-z-dropdown);
|
|
340
|
-
min-width:
|
|
374
|
+
min-width: 192px;
|
|
375
|
+
}
|
|
376
|
+
.richTextColorSectionLabel {
|
|
377
|
+
font-size: 10px;
|
|
378
|
+
font-weight: var(--ee-font-weight-semibold);
|
|
379
|
+
color: var(--ee-text-secondary);
|
|
380
|
+
text-transform: uppercase;
|
|
381
|
+
letter-spacing: 0.5px;
|
|
382
|
+
margin-bottom: 4px;
|
|
341
383
|
}
|
|
342
384
|
.richTextColorGrid {
|
|
343
385
|
display: grid;
|
|
@@ -346,6 +388,7 @@
|
|
|
346
388
|
margin-bottom: var(--ee-space-sm);
|
|
347
389
|
}
|
|
348
390
|
.richTextColorSwatch {
|
|
391
|
+
position: relative;
|
|
349
392
|
width: 24px;
|
|
350
393
|
height: 24px;
|
|
351
394
|
border-radius: 3px;
|
|
@@ -355,24 +398,87 @@
|
|
|
355
398
|
transition: all var(--ee-transition-fast);
|
|
356
399
|
}
|
|
357
400
|
.richTextColorSwatch:hover {
|
|
358
|
-
transform: scale(1.
|
|
401
|
+
transform: scale(1.15);
|
|
359
402
|
border-color: var(--ee-border-color-strong);
|
|
360
403
|
}
|
|
361
|
-
.
|
|
404
|
+
.richTextColorSwatchActive {
|
|
405
|
+
border-color: var(--ee-color-primary);
|
|
406
|
+
box-shadow: 0 0 0 1px var(--ee-color-primary);
|
|
407
|
+
}
|
|
408
|
+
.richTextColorSwatchRemove {
|
|
409
|
+
position: absolute;
|
|
410
|
+
top: -5px;
|
|
411
|
+
right: -5px;
|
|
412
|
+
width: 14px;
|
|
413
|
+
height: 14px;
|
|
414
|
+
border-radius: 50%;
|
|
415
|
+
background: var(--ee-bg-panel);
|
|
416
|
+
border: 1px solid var(--ee-border-color);
|
|
417
|
+
color: var(--ee-text-secondary);
|
|
418
|
+
font-size: 9px;
|
|
419
|
+
line-height: 1;
|
|
420
|
+
display: none;
|
|
421
|
+
align-items: center;
|
|
422
|
+
justify-content: center;
|
|
423
|
+
cursor: pointer;
|
|
424
|
+
padding: 0;
|
|
425
|
+
box-shadow: var(--ee-shadow-sm);
|
|
426
|
+
}
|
|
427
|
+
.richTextColorSwatch:hover .richTextColorSwatchRemove {
|
|
428
|
+
display: flex;
|
|
429
|
+
}
|
|
430
|
+
.richTextColorSwatchRemove:hover {
|
|
431
|
+
background: var(--ee-color-danger, #ef4444);
|
|
432
|
+
border-color: var(--ee-color-danger, #ef4444);
|
|
433
|
+
color: #fff;
|
|
434
|
+
}
|
|
435
|
+
.richTextColorCustomRow {
|
|
362
436
|
display: flex;
|
|
363
437
|
align-items: center;
|
|
364
|
-
gap:
|
|
438
|
+
gap: 6px;
|
|
365
439
|
border-top: 1px solid var(--ee-border-color);
|
|
366
440
|
padding-top: var(--ee-space-sm);
|
|
367
441
|
}
|
|
368
|
-
.
|
|
369
|
-
|
|
442
|
+
.richTextColorHexInput {
|
|
443
|
+
flex: 1;
|
|
444
|
+
min-width: 0;
|
|
370
445
|
height: 28px;
|
|
371
|
-
padding: 0;
|
|
446
|
+
padding: 0 6px;
|
|
447
|
+
font-size: 12px;
|
|
448
|
+
font-family: var(--ee-font-family);
|
|
372
449
|
border: 1px solid var(--ee-border-color);
|
|
373
|
-
border-radius:
|
|
450
|
+
border-radius: var(--ee-border-radius-sm);
|
|
451
|
+
background: var(--ee-bg-input);
|
|
452
|
+
color: var(--ee-text-primary);
|
|
453
|
+
outline: none;
|
|
454
|
+
box-sizing: border-box;
|
|
455
|
+
}
|
|
456
|
+
.richTextColorHexInput:focus {
|
|
457
|
+
border-color: var(--ee-border-focus);
|
|
458
|
+
}
|
|
459
|
+
.richTextColorApplyBtn {
|
|
460
|
+
height: 28px;
|
|
461
|
+
padding: 0 10px;
|
|
462
|
+
font-size: var(--ee-font-size-xs);
|
|
463
|
+
font-family: var(--ee-font-family);
|
|
464
|
+
font-weight: var(--ee-font-weight-medium);
|
|
465
|
+
color: var(--ee-text-inverse);
|
|
466
|
+
background: var(--ee-color-primary);
|
|
467
|
+
border: none;
|
|
468
|
+
border-radius: var(--ee-border-radius-sm);
|
|
374
469
|
cursor: pointer;
|
|
375
|
-
|
|
470
|
+
transition: background var(--ee-transition-fast);
|
|
471
|
+
white-space: nowrap;
|
|
472
|
+
flex-shrink: 0;
|
|
473
|
+
}
|
|
474
|
+
.richTextColorApplyBtn:hover {
|
|
475
|
+
background: var(--ee-color-primary-hover);
|
|
476
|
+
}
|
|
477
|
+
.richTextColorBottomActions {
|
|
478
|
+
display: flex;
|
|
479
|
+
align-items: center;
|
|
480
|
+
gap: var(--ee-space-sm);
|
|
481
|
+
margin-top: 6px;
|
|
376
482
|
}
|
|
377
483
|
.richTextColorClearBtn {
|
|
378
484
|
font-size: var(--ee-font-size-xs);
|
|
@@ -389,6 +495,14 @@
|
|
|
389
495
|
background: var(--ee-bg-hover);
|
|
390
496
|
color: var(--ee-text-primary);
|
|
391
497
|
}
|
|
498
|
+
.richTextColorClearBtn:disabled {
|
|
499
|
+
opacity: 0.4;
|
|
500
|
+
cursor: not-allowed;
|
|
501
|
+
}
|
|
502
|
+
.richTextColorClearBtn:disabled:hover {
|
|
503
|
+
background: transparent;
|
|
504
|
+
color: var(--ee-text-secondary);
|
|
505
|
+
}
|
|
392
506
|
.richTextLinkDropdown {
|
|
393
507
|
position: absolute;
|
|
394
508
|
top: 100%;
|
|
@@ -465,6 +579,55 @@
|
|
|
465
579
|
background: var(--ee-color-danger, #ef4444);
|
|
466
580
|
color: var(--ee-text-inverse);
|
|
467
581
|
}
|
|
582
|
+
@keyframes tooltipFadeIn {
|
|
583
|
+
from {
|
|
584
|
+
opacity: 0;
|
|
585
|
+
transform: translate(-50%, 2px);
|
|
586
|
+
}
|
|
587
|
+
to {
|
|
588
|
+
opacity: 1;
|
|
589
|
+
transform: translate(-50%, 0);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
.richTextTooltipWrapper {
|
|
593
|
+
position: relative;
|
|
594
|
+
display: inline-flex;
|
|
595
|
+
}
|
|
596
|
+
.richTextTooltip {
|
|
597
|
+
position: absolute;
|
|
598
|
+
bottom: calc(100% + 6px);
|
|
599
|
+
left: 50%;
|
|
600
|
+
transform: translateX(-50%);
|
|
601
|
+
display: flex;
|
|
602
|
+
flex-direction: column;
|
|
603
|
+
align-items: center;
|
|
604
|
+
gap: 2px;
|
|
605
|
+
padding: 4px 8px;
|
|
606
|
+
background: #1f2937;
|
|
607
|
+
color: #fff;
|
|
608
|
+
font-size: 11px;
|
|
609
|
+
font-family: var(--ee-font-family);
|
|
610
|
+
line-height: 1.3;
|
|
611
|
+
white-space: nowrap;
|
|
612
|
+
border-radius: 4px;
|
|
613
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
614
|
+
pointer-events: none;
|
|
615
|
+
z-index: var(--ee-z-dropdown, 100);
|
|
616
|
+
animation: tooltipFadeIn 120ms ease;
|
|
617
|
+
}
|
|
618
|
+
.richTextTooltipShortcut {
|
|
619
|
+
font-size: 10px;
|
|
620
|
+
font-family:
|
|
621
|
+
ui-monospace,
|
|
622
|
+
SFMono-Regular,
|
|
623
|
+
"SF Mono",
|
|
624
|
+
Menlo,
|
|
625
|
+
monospace;
|
|
626
|
+
background: rgba(255, 255, 255, 0.15);
|
|
627
|
+
padding: 1px 4px;
|
|
628
|
+
border-radius: 3px;
|
|
629
|
+
color: rgba(255, 255, 255, 0.8);
|
|
630
|
+
}
|
|
468
631
|
|
|
469
632
|
/* src/styles/editor.module.css */
|
|
470
633
|
.editorWrapper {
|
|
@@ -865,6 +1028,62 @@
|
|
|
865
1028
|
white-space: nowrap;
|
|
866
1029
|
}
|
|
867
1030
|
|
|
1031
|
+
/* src/styles/colorArea.module.css */
|
|
1032
|
+
.hslPicker {
|
|
1033
|
+
display: flex;
|
|
1034
|
+
flex-direction: column;
|
|
1035
|
+
gap: 8px;
|
|
1036
|
+
}
|
|
1037
|
+
.hslArea {
|
|
1038
|
+
position: relative;
|
|
1039
|
+
width: 140px;
|
|
1040
|
+
height: 140px;
|
|
1041
|
+
border-radius: 4px;
|
|
1042
|
+
cursor: crosshair;
|
|
1043
|
+
touch-action: none;
|
|
1044
|
+
user-select: none;
|
|
1045
|
+
}
|
|
1046
|
+
.hslAreaThumb {
|
|
1047
|
+
position: absolute;
|
|
1048
|
+
width: 14px;
|
|
1049
|
+
height: 14px;
|
|
1050
|
+
border-radius: 50%;
|
|
1051
|
+
border: 2px solid #fff;
|
|
1052
|
+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
|
|
1053
|
+
pointer-events: none;
|
|
1054
|
+
transform: translate(-50%, -50%);
|
|
1055
|
+
}
|
|
1056
|
+
.hslHueBar {
|
|
1057
|
+
position: relative;
|
|
1058
|
+
width: 140px;
|
|
1059
|
+
height: 14px;
|
|
1060
|
+
border-radius: 7px;
|
|
1061
|
+
background:
|
|
1062
|
+
linear-gradient(
|
|
1063
|
+
to right,
|
|
1064
|
+
hsl(0, 100%, 50%),
|
|
1065
|
+
hsl(60, 100%, 50%),
|
|
1066
|
+
hsl(120, 100%, 50%),
|
|
1067
|
+
hsl(180, 100%, 50%),
|
|
1068
|
+
hsl(240, 100%, 50%),
|
|
1069
|
+
hsl(300, 100%, 50%),
|
|
1070
|
+
hsl(360, 100%, 50%));
|
|
1071
|
+
cursor: pointer;
|
|
1072
|
+
touch-action: none;
|
|
1073
|
+
user-select: none;
|
|
1074
|
+
}
|
|
1075
|
+
.hslHueThumb {
|
|
1076
|
+
position: absolute;
|
|
1077
|
+
top: 50%;
|
|
1078
|
+
width: 14px;
|
|
1079
|
+
height: 14px;
|
|
1080
|
+
border-radius: 50%;
|
|
1081
|
+
border: 2px solid #fff;
|
|
1082
|
+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
|
|
1083
|
+
pointer-events: none;
|
|
1084
|
+
transform: translate(-50%, -50%);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
868
1087
|
/* src/styles/blocks.module.css */
|
|
869
1088
|
.textBlock {
|
|
870
1089
|
min-height: 24px;
|
|
@@ -1833,13 +2052,6 @@
|
|
|
1833
2052
|
grid-column: 1 / -1;
|
|
1834
2053
|
width: 100%;
|
|
1835
2054
|
}
|
|
1836
|
-
.colorNativeInput {
|
|
1837
|
-
width: 100%;
|
|
1838
|
-
grid-column: 1 / -1;
|
|
1839
|
-
height: 28px;
|
|
1840
|
-
cursor: pointer;
|
|
1841
|
-
border: none;
|
|
1842
|
-
}
|
|
1843
2055
|
.colorPresetSectionLabel {
|
|
1844
2056
|
font-size: var(--ee-font-size-xs);
|
|
1845
2057
|
color: var(--ee-text-muted);
|