react-open-source-grid 1.6.5 → 1.6.6

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.
@@ -589,3 +589,637 @@ button {
589
589
  padding: 8px 8px;
590
590
  }
591
591
  }
592
+
593
+ /* src/editors/editors.css */
594
+ .editor-container {
595
+ position: relative;
596
+ width: 100%;
597
+ font-family:
598
+ -apple-system,
599
+ BlinkMacSystemFont,
600
+ "Segoe UI",
601
+ Roboto,
602
+ "Helvetica Neue",
603
+ Arial,
604
+ sans-serif;
605
+ font-size: 14px;
606
+ color: var(--text-color, #333);
607
+ background: var(--bg-color, #fff);
608
+ z-index: 1000;
609
+ }
610
+ .editor-input-wrapper {
611
+ position: relative;
612
+ display: flex;
613
+ align-items: center;
614
+ border: 2px solid var(--primary-color, #0066cc);
615
+ border-radius: 4px;
616
+ background: var(--bg-color, #fff);
617
+ overflow: hidden;
618
+ }
619
+ .editor-input-wrapper:focus-within {
620
+ border-color: var(--primary-color, #0066cc);
621
+ box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
622
+ }
623
+ .editor-input {
624
+ flex: 1;
625
+ padding: 8px 12px;
626
+ border: none;
627
+ outline: none;
628
+ background: transparent;
629
+ font-size: 14px;
630
+ color: var(--text-color, #333);
631
+ font-family: inherit;
632
+ }
633
+ .editor-input::placeholder {
634
+ color: var(--text-muted, #999);
635
+ }
636
+ .editor-dropdown-icon,
637
+ .editor-calendar-icon {
638
+ display: flex;
639
+ align-items: center;
640
+ justify-content: center;
641
+ padding: 0 8px;
642
+ color: var(--text-muted, #999);
643
+ pointer-events: none;
644
+ user-select: none;
645
+ }
646
+ .editor-input-actions {
647
+ display: flex;
648
+ align-items: center;
649
+ gap: 4px;
650
+ padding-right: 8px;
651
+ }
652
+ .editor-clear-btn {
653
+ display: flex;
654
+ align-items: center;
655
+ justify-content: center;
656
+ width: 20px;
657
+ height: 20px;
658
+ border: none;
659
+ background: var(--bg-hover, #f0f0f0);
660
+ border-radius: 50%;
661
+ cursor: pointer;
662
+ font-size: 18px;
663
+ line-height: 1;
664
+ color: var(--text-muted, #999);
665
+ padding: 0;
666
+ transition: all 0.2s;
667
+ }
668
+ .editor-clear-btn:hover {
669
+ background: var(--bg-active, #e0e0e0);
670
+ color: var(--text-color, #333);
671
+ }
672
+ .editor-dropdown {
673
+ position: fixed;
674
+ background: var(--bg-color, #fff);
675
+ border: 1px solid var(--border-color, #ddd);
676
+ border-radius: 4px;
677
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
678
+ overflow-y: auto;
679
+ max-height: 300px;
680
+ z-index: 10000;
681
+ margin-top: 4px;
682
+ }
683
+ .editor-dropdown-empty {
684
+ padding: 16px;
685
+ text-align: center;
686
+ color: var(--text-muted, #999);
687
+ font-style: italic;
688
+ }
689
+ .editor-dropdown-option {
690
+ display: flex;
691
+ align-items: center;
692
+ padding: 10px 12px;
693
+ cursor: pointer;
694
+ transition: background-color 0.15s;
695
+ border-bottom: 1px solid var(--border-light, #f0f0f0);
696
+ }
697
+ .editor-dropdown-option:last-child {
698
+ border-bottom: none;
699
+ }
700
+ .editor-dropdown-option:hover:not(.disabled) {
701
+ background: var(--bg-hover, #f5f5f5);
702
+ }
703
+ .editor-dropdown-option.focused:not(.disabled) {
704
+ background: var(--bg-hover, #f0f0f0);
705
+ }
706
+ .editor-dropdown-option.selected {
707
+ background: var(--primary-light, #e6f2ff);
708
+ color: var(--primary-color, #0066cc);
709
+ }
710
+ .editor-dropdown-option.disabled {
711
+ opacity: 0.5;
712
+ cursor: not-allowed;
713
+ }
714
+ .editor-option-content {
715
+ display: flex;
716
+ align-items: center;
717
+ gap: 8px;
718
+ flex: 1;
719
+ }
720
+ .editor-option-icon {
721
+ display: flex;
722
+ align-items: center;
723
+ font-size: 16px;
724
+ }
725
+ .editor-option-text {
726
+ flex: 1;
727
+ }
728
+ .editor-option-label {
729
+ font-weight: 500;
730
+ }
731
+ .editor-option-description {
732
+ font-size: 12px;
733
+ color: var(--text-muted, #999);
734
+ margin-top: 2px;
735
+ }
736
+ .editor-richselect-container {
737
+ min-width: 200px;
738
+ }
739
+ .editor-richselect-input {
740
+ min-width: 150px;
741
+ }
742
+ .editor-date-container {
743
+ min-width: 250px;
744
+ }
745
+ .editor-calendar {
746
+ padding: 12px;
747
+ min-width: 280px;
748
+ }
749
+ .editor-calendar-header {
750
+ display: flex;
751
+ align-items: center;
752
+ justify-content: space-between;
753
+ margin-bottom: 12px;
754
+ padding-bottom: 8px;
755
+ border-bottom: 1px solid var(--border-color, #ddd);
756
+ }
757
+ .editor-calendar-title {
758
+ font-weight: 600;
759
+ font-size: 15px;
760
+ }
761
+ .editor-calendar-nav {
762
+ display: flex;
763
+ align-items: center;
764
+ justify-content: center;
765
+ width: 32px;
766
+ height: 32px;
767
+ border: none;
768
+ background: transparent;
769
+ border-radius: 4px;
770
+ cursor: pointer;
771
+ font-size: 20px;
772
+ color: var(--text-color, #333);
773
+ transition: background-color 0.15s;
774
+ }
775
+ .editor-calendar-nav:hover {
776
+ background: var(--bg-hover, #f0f0f0);
777
+ }
778
+ .editor-calendar-weekdays {
779
+ display: grid;
780
+ grid-template-columns: repeat(7, 1fr);
781
+ gap: 4px;
782
+ margin-bottom: 4px;
783
+ }
784
+ .editor-calendar-weekday {
785
+ text-align: center;
786
+ font-size: 12px;
787
+ font-weight: 600;
788
+ color: var(--text-muted, #999);
789
+ padding: 4px;
790
+ }
791
+ .editor-calendar-days {
792
+ display: grid;
793
+ grid-template-columns: repeat(7, 1fr);
794
+ gap: 2px;
795
+ }
796
+ .editor-calendar-day {
797
+ aspect-ratio: 1;
798
+ display: flex;
799
+ align-items: center;
800
+ justify-content: center;
801
+ border: none;
802
+ background: transparent;
803
+ border-radius: 4px;
804
+ cursor: pointer;
805
+ font-size: 14px;
806
+ color: var(--text-color, #333);
807
+ transition: all 0.15s;
808
+ }
809
+ .editor-calendar-day:hover:not(:disabled) {
810
+ background: var(--bg-hover, #f0f0f0);
811
+ }
812
+ .editor-calendar-day.today {
813
+ font-weight: 700;
814
+ color: var(--primary-color, #0066cc);
815
+ }
816
+ .editor-calendar-day.selected {
817
+ background: var(--primary-color, #0066cc);
818
+ color: #fff;
819
+ font-weight: 600;
820
+ }
821
+ .editor-calendar-day.other-month {
822
+ color: var(--text-muted, #ccc);
823
+ }
824
+ .editor-calendar-day:disabled {
825
+ opacity: 0.3;
826
+ cursor: not-allowed;
827
+ }
828
+ .editor-calendar-time {
829
+ margin-top: 12px;
830
+ padding-top: 12px;
831
+ border-top: 1px solid var(--border-color, #ddd);
832
+ }
833
+ .editor-time-input {
834
+ width: 100%;
835
+ padding: 8px;
836
+ border: 1px solid var(--border-color, #ddd);
837
+ border-radius: 4px;
838
+ font-size: 14px;
839
+ font-family: inherit;
840
+ }
841
+ .editor-numeric-container {
842
+ min-width: 150px;
843
+ }
844
+ .editor-numeric-input {
845
+ text-align: right;
846
+ padding-right: 4px;
847
+ }
848
+ .editor-numeric-prefix,
849
+ .editor-numeric-suffix {
850
+ padding: 0 8px;
851
+ color: var(--text-muted, #999);
852
+ font-weight: 500;
853
+ user-select: none;
854
+ }
855
+ .editor-numeric-steppers {
856
+ display: flex;
857
+ flex-direction: column;
858
+ border-left: 1px solid var(--border-color, #ddd);
859
+ }
860
+ .editor-numeric-stepper {
861
+ display: flex;
862
+ align-items: center;
863
+ justify-content: center;
864
+ width: 24px;
865
+ height: 50%;
866
+ border: none;
867
+ background: transparent;
868
+ cursor: pointer;
869
+ font-size: 10px;
870
+ color: var(--text-color, #333);
871
+ transition: background-color 0.15s;
872
+ padding: 0;
873
+ }
874
+ .editor-numeric-stepper:hover:not(:disabled) {
875
+ background: var(--bg-hover, #f0f0f0);
876
+ }
877
+ .editor-numeric-stepper:disabled {
878
+ opacity: 0.3;
879
+ cursor: not-allowed;
880
+ }
881
+ .editor-numeric-increment {
882
+ border-bottom: 1px solid var(--border-color, #ddd);
883
+ }
884
+ .editor-numeric-range {
885
+ display: flex;
886
+ justify-content: space-between;
887
+ margin-top: 4px;
888
+ padding: 4px 8px;
889
+ font-size: 11px;
890
+ color: var(--text-muted, #999);
891
+ }
892
+ .editor-multiselect-container {
893
+ min-width: 250px;
894
+ }
895
+ .editor-multiselect-wrapper {
896
+ flex-wrap: wrap;
897
+ gap: 4px;
898
+ padding: 6px;
899
+ }
900
+ .editor-multiselect-tags {
901
+ display: flex;
902
+ flex-wrap: wrap;
903
+ gap: 4px;
904
+ flex: 1;
905
+ min-width: 0;
906
+ }
907
+ .editor-tag {
908
+ display: inline-flex;
909
+ align-items: center;
910
+ gap: 4px;
911
+ padding: 4px 8px;
912
+ background: var(--primary-light, #e6f2ff);
913
+ color: var(--primary-color, #0066cc);
914
+ border-radius: 12px;
915
+ font-size: 12px;
916
+ white-space: nowrap;
917
+ max-width: 150px;
918
+ }
919
+ .editor-tag-icon {
920
+ font-size: 14px;
921
+ }
922
+ .editor-tag-label {
923
+ overflow: hidden;
924
+ text-overflow: ellipsis;
925
+ }
926
+ .editor-tag-remove {
927
+ display: flex;
928
+ align-items: center;
929
+ justify-content: center;
930
+ width: 16px;
931
+ height: 16px;
932
+ border: none;
933
+ background: transparent;
934
+ border-radius: 50%;
935
+ cursor: pointer;
936
+ font-size: 16px;
937
+ line-height: 1;
938
+ color: currentColor;
939
+ padding: 0;
940
+ transition: background-color 0.15s;
941
+ }
942
+ .editor-tag-remove:hover {
943
+ background: rgba(0, 0, 0, 0.1);
944
+ }
945
+ .editor-tag-collapsed {
946
+ background: var(--bg-hover, #f0f0f0);
947
+ color: var(--text-muted, #666);
948
+ font-weight: 500;
949
+ }
950
+ .editor-multiselect-input {
951
+ min-width: 80px;
952
+ flex: 1;
953
+ padding: 4px;
954
+ }
955
+ .editor-multiselect-option {
956
+ gap: 8px;
957
+ }
958
+ .editor-multiselect-checkbox {
959
+ width: 16px;
960
+ height: 16px;
961
+ margin: 0;
962
+ cursor: pointer;
963
+ }
964
+ .editor-markdown-container {
965
+ display: flex;
966
+ flex-direction: column;
967
+ min-width: 400px;
968
+ max-width: 800px;
969
+ background: var(--bg-color, #fff);
970
+ border: 2px solid var(--primary-color, #0066cc);
971
+ border-radius: 4px;
972
+ overflow: hidden;
973
+ }
974
+ .editor-markdown-toolbar {
975
+ display: flex;
976
+ justify-content: space-between;
977
+ padding: 8px;
978
+ border-bottom: 1px solid var(--border-color, #ddd);
979
+ background: var(--bg-light, #f9f9f9);
980
+ }
981
+ .editor-markdown-toolbar-group {
982
+ display: flex;
983
+ gap: 4px;
984
+ }
985
+ .editor-toolbar-btn {
986
+ display: flex;
987
+ align-items: center;
988
+ justify-content: center;
989
+ width: 32px;
990
+ height: 32px;
991
+ border: 1px solid var(--border-color, #ddd);
992
+ background: var(--bg-color, #fff);
993
+ border-radius: 4px;
994
+ cursor: pointer;
995
+ font-size: 14px;
996
+ transition: all 0.15s;
997
+ }
998
+ .editor-toolbar-btn:hover {
999
+ background: var(--bg-hover, #f0f0f0);
1000
+ border-color: var(--primary-color, #0066cc);
1001
+ }
1002
+ .editor-toolbar-btn.active {
1003
+ background: var(--primary-color, #0066cc);
1004
+ color: #fff;
1005
+ border-color: var(--primary-color, #0066cc);
1006
+ }
1007
+ .editor-markdown-content {
1008
+ display: flex;
1009
+ flex: 1;
1010
+ overflow: hidden;
1011
+ }
1012
+ .editor-markdown-content.split .editor-markdown-editor {
1013
+ width: 50%;
1014
+ border-right: 1px solid var(--border-color, #ddd);
1015
+ }
1016
+ .editor-markdown-content.split .editor-markdown-preview {
1017
+ width: 50%;
1018
+ }
1019
+ .editor-markdown-editor {
1020
+ display: flex;
1021
+ flex-direction: column;
1022
+ flex: 1;
1023
+ position: relative;
1024
+ }
1025
+ .editor-textarea {
1026
+ flex: 1;
1027
+ width: 100%;
1028
+ padding: 12px;
1029
+ border: none;
1030
+ outline: none;
1031
+ resize: none;
1032
+ font-family:
1033
+ "Monaco",
1034
+ "Menlo",
1035
+ "Ubuntu Mono",
1036
+ monospace;
1037
+ font-size: 13px;
1038
+ line-height: 1.6;
1039
+ color: var(--text-color, #333);
1040
+ background: var(--bg-color, #fff);
1041
+ }
1042
+ .editor-markdown-char-count {
1043
+ position: absolute;
1044
+ bottom: 8px;
1045
+ right: 8px;
1046
+ padding: 4px 8px;
1047
+ background: var(--bg-light, #f9f9f9);
1048
+ border-radius: 4px;
1049
+ font-size: 11px;
1050
+ color: var(--text-muted, #999);
1051
+ pointer-events: none;
1052
+ }
1053
+ .editor-markdown-char-count.warning {
1054
+ color: var(--danger-color, #d32f2f);
1055
+ font-weight: 600;
1056
+ }
1057
+ .editor-markdown-preview {
1058
+ display: flex;
1059
+ flex-direction: column;
1060
+ overflow: hidden;
1061
+ background: var(--bg-light, #fafafa);
1062
+ }
1063
+ .editor-markdown-preview-label {
1064
+ padding: 8px 12px;
1065
+ font-size: 11px;
1066
+ font-weight: 600;
1067
+ text-transform: uppercase;
1068
+ color: var(--text-muted, #999);
1069
+ border-bottom: 1px solid var(--border-color, #ddd);
1070
+ letter-spacing: 0.5px;
1071
+ }
1072
+ .editor-markdown-preview-content {
1073
+ flex: 1;
1074
+ padding: 12px;
1075
+ overflow-y: auto;
1076
+ line-height: 1.6;
1077
+ }
1078
+ .editor-markdown-preview-content h1 {
1079
+ font-size: 24px;
1080
+ margin: 16px 0 8px;
1081
+ color: var(--text-color, #333);
1082
+ }
1083
+ .editor-markdown-preview-content h2 {
1084
+ font-size: 20px;
1085
+ margin: 14px 0 7px;
1086
+ color: var(--text-color, #333);
1087
+ }
1088
+ .editor-markdown-preview-content h3 {
1089
+ font-size: 16px;
1090
+ margin: 12px 0 6px;
1091
+ color: var(--text-color, #333);
1092
+ }
1093
+ .editor-markdown-preview-content p {
1094
+ margin: 8px 0;
1095
+ }
1096
+ .editor-markdown-preview-content code {
1097
+ padding: 2px 6px;
1098
+ background: var(--bg-hover, #f0f0f0);
1099
+ border-radius: 3px;
1100
+ font-family:
1101
+ "Monaco",
1102
+ "Menlo",
1103
+ monospace;
1104
+ font-size: 0.9em;
1105
+ }
1106
+ .editor-markdown-preview-content a {
1107
+ color: var(--primary-color, #0066cc);
1108
+ text-decoration: none;
1109
+ }
1110
+ .editor-markdown-preview-content a:hover {
1111
+ text-decoration: underline;
1112
+ }
1113
+ .editor-markdown-preview-content ul {
1114
+ margin: 8px 0;
1115
+ padding-left: 24px;
1116
+ }
1117
+ .editor-markdown-preview-content li {
1118
+ margin: 4px 0;
1119
+ }
1120
+ .editor-markdown-empty {
1121
+ color: var(--text-muted, #999);
1122
+ font-style: italic;
1123
+ }
1124
+ .editor-markdown-footer {
1125
+ display: flex;
1126
+ justify-content: space-between;
1127
+ align-items: center;
1128
+ padding: 8px 12px;
1129
+ border-top: 1px solid var(--border-color, #ddd);
1130
+ background: var(--bg-light, #f9f9f9);
1131
+ }
1132
+ .editor-markdown-hint {
1133
+ font-size: 12px;
1134
+ color: var(--text-muted, #999);
1135
+ }
1136
+ .editor-markdown-hint kbd {
1137
+ padding: 2px 6px;
1138
+ background: var(--bg-color, #fff);
1139
+ border: 1px solid var(--border-color, #ddd);
1140
+ border-radius: 3px;
1141
+ font-family: inherit;
1142
+ font-size: 11px;
1143
+ font-weight: 600;
1144
+ }
1145
+ .editor-markdown-actions {
1146
+ display: flex;
1147
+ gap: 8px;
1148
+ }
1149
+ .editor-btn {
1150
+ padding: 6px 16px;
1151
+ border: 1px solid var(--border-color, #ddd);
1152
+ border-radius: 4px;
1153
+ background: var(--bg-color, #fff);
1154
+ color: var(--text-color, #333);
1155
+ font-size: 13px;
1156
+ font-weight: 500;
1157
+ cursor: pointer;
1158
+ transition: all 0.15s;
1159
+ }
1160
+ .editor-btn:hover {
1161
+ background: var(--bg-hover, #f0f0f0);
1162
+ }
1163
+ .editor-btn-primary {
1164
+ background: var(--primary-color, #0066cc);
1165
+ color: #fff;
1166
+ border-color: var(--primary-color, #0066cc);
1167
+ }
1168
+ .editor-btn-primary:hover {
1169
+ background: var(--primary-dark, #0052a3);
1170
+ border-color: var(--primary-dark, #0052a3);
1171
+ }
1172
+ .editor-btn-secondary {
1173
+ background: transparent;
1174
+ }
1175
+ .editor-btn-secondary:hover {
1176
+ background: var(--bg-hover, #f0f0f0);
1177
+ }
1178
+ @media (max-width: 768px) {
1179
+ .editor-markdown-container {
1180
+ min-width: 300px;
1181
+ max-width: 100%;
1182
+ }
1183
+ .editor-markdown-content.split {
1184
+ flex-direction: column;
1185
+ }
1186
+ .editor-markdown-content.split .editor-markdown-editor,
1187
+ .editor-markdown-content.split .editor-markdown-preview {
1188
+ width: 100%;
1189
+ border-right: none;
1190
+ }
1191
+ .editor-markdown-content.split .editor-markdown-editor {
1192
+ border-bottom: 1px solid var(--border-color, #ddd);
1193
+ }
1194
+ }
1195
+ .dark-theme .editor-container {
1196
+ --text-color: #e0e0e0;
1197
+ --text-muted: #999;
1198
+ --bg-color: #1e1e1e;
1199
+ --bg-light: #252525;
1200
+ --bg-hover: #2a2a2a;
1201
+ --bg-active: #333;
1202
+ --border-color: #3a3a3a;
1203
+ --border-light: #2a2a2a;
1204
+ --primary-color: #4a9eff;
1205
+ --primary-light: rgba(74, 158, 255, 0.2);
1206
+ --primary-dark: #3a8eef;
1207
+ --danger-color: #f44336;
1208
+ }
1209
+ .editor-container button:focus-visible,
1210
+ .editor-input:focus-visible,
1211
+ .editor-textarea:focus-visible {
1212
+ outline: 2px solid var(--primary-color, #0066cc);
1213
+ outline-offset: 2px;
1214
+ }
1215
+ .sr-only {
1216
+ position: absolute;
1217
+ width: 1px;
1218
+ height: 1px;
1219
+ padding: 0;
1220
+ margin: -1px;
1221
+ overflow: hidden;
1222
+ clip: rect(0, 0, 0, 0);
1223
+ white-space: nowrap;
1224
+ border-width: 0;
1225
+ }
@@ -1,2 +1,3 @@
1
1
  import './index.css';
2
2
  export * from './components/DataGrid/index';
3
+ export * from './editors';