Skip to content

Commit 4861ece

Browse files
authored
feat: revamp color picker (#23)
* chore: import new color json * chore: generate css vars * chore: render text and bg colors using tokens * feat: implement new color picker * fix: transfer popover focus * fix: replicate logic onto background popover * chore: adjust i18n * chore: fix selection loss on interaction with popover * chore: pass getSubscriptions in EditorContext * chore: default color tooltip * fix: forward ref in color tile * fix: editor focus after opening popover * chore: fix lint * chore: maintain selection after changing color * fix: font color for href and inline code * fix: focus and popover conflicts * chore: revert unnecessary forceShow * chore: dummy commit * fix: don't break cover
1 parent ee5124b commit 4861ece

File tree

27 files changed

+1986
-348
lines changed

27 files changed

+1986
-348
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"react-beautiful-dnd": "^13.1.1",
104104
"react-big-calendar": "^1.8.5",
105105
"react-color": "^2.19.3",
106+
"react-colorful": "^5.6.1",
106107
"react-custom-scrollbars": "^4.2.1",
107108
"react-custom-scrollbars-2": "^4.5.0",
108109
"react-datepicker": "^4.23.0",

pnpm-lock.yaml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/system-token/primitive.json

Lines changed: 67 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
"$type": "color",
4949
"$value": "#32343f"
5050
},
51+
"870": {
52+
"$type": "color",
53+
"$value": "#2b2d37"
54+
},
5155
"900": {
5256
"$type": "color",
5357
"$value": "#272930"
@@ -428,7 +432,11 @@
428432
},
429433
"600": {
430434
"$type": "color",
431-
"$value": "#702828"
435+
"$value": "#9e3b3b"
436+
},
437+
"700": {
438+
"$type": "color",
439+
"$value": "#100505"
432440
}
433441
},
434442
"Papaya": {
@@ -454,7 +462,11 @@
454462
},
455463
"600": {
456464
"$type": "color",
457-
"$value": "#6b3215"
465+
"$value": "#a54b24"
466+
},
467+
"700": {
468+
"$type": "color",
469+
"$value": "#33221b"
458470
}
459471
},
460472
"Tangerine": {
@@ -480,7 +492,11 @@
480492
},
481493
"600": {
482494
"$type": "color",
483-
"$value": "#613b0a"
495+
"$value": "#9a570c"
496+
},
497+
"700": {
498+
"$type": "color",
499+
"$value": "#44341e"
484500
}
485501
},
486502
"Mango": {
@@ -506,7 +522,11 @@
506522
},
507523
"600": {
508524
"$type": "color",
509-
"$value": "#5c4102"
525+
"$value": "#906000"
526+
},
527+
"700": {
528+
"$type": "color",
529+
"$value": "#4f4020"
510530
}
511531
},
512532
"Lemon": {
@@ -532,7 +552,11 @@
532552
},
533553
"600": {
534554
"$type": "color",
535-
"$value": "#574800"
555+
"$value": "#866800"
556+
},
557+
"700": {
558+
"$type": "color",
559+
"$value": "#574d1c"
536560
}
537561
},
538562
"Olive": {
@@ -558,7 +582,11 @@
558582
},
559583
"600": {
560584
"$type": "color",
561-
"$value": "#4a4c03"
585+
"$value": "#627300"
586+
},
587+
"700": {
588+
"$type": "color",
589+
"$value": "#404207"
562590
}
563591
},
564592
"Lime": {
@@ -584,7 +612,11 @@
584612
},
585613
"600": {
586614
"$type": "color",
587-
"$value": "#414d05"
615+
"$value": "#637000"
616+
},
617+
"700": {
618+
"$type": "color",
619+
"$value": "#313908"
588620
}
589621
},
590622
"Grass": {
@@ -610,7 +642,11 @@
610642
},
611643
"600": {
612644
"$type": "color",
613-
"$value": "#334d0c"
645+
"$value": "#456514"
646+
},
647+
"700": {
648+
"$type": "color",
649+
"$value": "#273611"
614650
}
615651
},
616652
"Forest": {
@@ -636,7 +672,11 @@
636672
},
637673
"600": {
638674
"$type": "color",
639-
"$value": "#1e4f16"
675+
"$value": "#2b6c20"
676+
},
677+
"700": {
678+
"$type": "color",
679+
"$value": "#1a2e17"
640680
}
641681
},
642682
"Jade": {
@@ -662,7 +702,11 @@
662702
},
663703
"600": {
664704
"$type": "color",
665-
"$value": "#075231"
705+
"$value": "#127b47"
706+
},
707+
"700": {
708+
"$type": "color",
709+
"$value": "#0f231a"
666710
}
667711
},
668712
"Aqua": {
@@ -688,7 +732,11 @@
688732
},
689733
"600": {
690734
"$type": "color",
691-
"$value": "#004e57"
735+
"$value": "#00727e"
736+
},
737+
"700": {
738+
"$type": "color",
739+
"$value": "#0d1a1c"
692740
}
693741
},
694742
"Azure": {
@@ -714,7 +762,7 @@
714762
},
715763
"600": {
716764
"$type": "color",
717-
"$value": "#154469"
765+
"$value": "#0c5b9e"
718766
}
719767
},
720768
"Denim": {
@@ -740,7 +788,7 @@
740788
},
741789
"600": {
742790
"$type": "color",
743-
"$value": "#223c70"
791+
"$value": "#2a51a0"
744792
}
745793
},
746794
"Mauve": {
@@ -766,7 +814,7 @@
766814
},
767815
"600": {
768816
"$type": "color",
769-
"$value": "#36366b"
817+
"$value": "#4545a6"
770818
}
771819
},
772820
"Lavender": {
@@ -792,7 +840,7 @@
792840
},
793841
"600": {
794842
"$type": "color",
795-
"$value": "#462f75"
843+
"$value": "#6435a8"
796844
}
797845
},
798846
"Lilac": {
@@ -818,7 +866,7 @@
818866
},
819867
"600": {
820868
"$type": "color",
821-
"$value": "#562d6b"
869+
"$value": "#772f96"
822870
}
823871
},
824872
"Mallow": {
@@ -844,7 +892,7 @@
844892
},
845893
"600": {
846894
"$type": "color",
847-
"$value": "#632861"
895+
"$value": "#8a3485"
848896
}
849897
},
850898
"Camellia": {
@@ -896,7 +944,7 @@
896944
},
897945
"600": {
898946
"$type": "color",
899-
"$value": "#404040"
947+
"$value": "#585858"
900948
}
901949
},
902950
"Iron": {
@@ -922,7 +970,7 @@
922970
},
923971
"600": {
924972
"$type": "color",
925-
"$value": "#394152"
973+
"$value": "#4c5966"
926974
}
927975
}
928976
},

0 commit comments

Comments
 (0)