gantt-lib 0.1.2 → 0.2.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.
package/dist/styles.css CHANGED
@@ -105,6 +105,7 @@
105
105
  box-shadow: var(--gantt-popover-shadow);
106
106
  padding: 4px;
107
107
  z-index: 1000;
108
+ outline: none;
108
109
  animation: gantt-popover-in 120ms ease-out;
109
110
  }
110
111
  @keyframes gantt-popover-in {
@@ -799,6 +800,10 @@
799
800
  .gantt-dependency-cycle {
800
801
  stroke: var(--gantt-dependency-cycle-color, #ef4444);
801
802
  }
803
+ .gantt-dependency-selected {
804
+ stroke: #ef4444;
805
+ stroke-width: 2;
806
+ }
802
807
  .gantt-dependency-arrow polygon {
803
808
  fill: var(--gantt-dependency-line-color, #666666);
804
809
  }
@@ -888,6 +893,20 @@
888
893
  width: 40px;
889
894
  justify-content: center;
890
895
  flex-shrink: 0;
896
+ cursor: pointer;
897
+ }
898
+ .gantt-tl-num-icon {
899
+ display: none;
900
+ color: #6b7280;
901
+ }
902
+ .gantt-tl-cell-number:hover .gantt-tl-num-label {
903
+ display: none;
904
+ }
905
+ .gantt-tl-cell-number:hover .gantt-tl-num-icon {
906
+ display: block;
907
+ }
908
+ .gantt-tl-headerCell.gantt-tl-cell-name {
909
+ padding-left: 4px;
891
910
  }
892
911
  .gantt-tl-cell-name {
893
912
  flex: 1;
@@ -948,6 +967,259 @@
948
967
  .gantt-tl-name-locked {
949
968
  cursor: default !important;
950
969
  }
970
+ .gantt-tl-cell-deps {
971
+ width: 120px;
972
+ flex-shrink: 0;
973
+ flex-wrap: wrap;
974
+ gap: 2px;
975
+ padding: 2px 4px;
976
+ align-items: center;
977
+ overflow: visible;
978
+ position: relative;
979
+ }
980
+ .gantt-tl-dep-type-trigger {
981
+ display: flex;
982
+ align-items: center;
983
+ gap: 2px;
984
+ font-size: 0.75rem;
985
+ font-weight: 600;
986
+ color: #1f2937;
987
+ background: transparent;
988
+ border: none;
989
+ cursor: pointer;
990
+ padding: 0;
991
+ white-space: nowrap;
992
+ font-family: inherit;
993
+ }
994
+ .gantt-tl-dep-type-trigger:disabled {
995
+ cursor: default;
996
+ opacity: 0.7;
997
+ }
998
+ .gantt-tl-dep-type-trigger:not(:disabled):hover {
999
+ color: #3b82f6;
1000
+ }
1001
+ .gantt-tl-dep-type-menu {
1002
+ display: flex;
1003
+ flex-direction: column;
1004
+ padding: 4px;
1005
+ min-width: 180px;
1006
+ }
1007
+ .gantt-tl-dep-type-option {
1008
+ display: flex;
1009
+ align-items: center;
1010
+ justify-content: flex-start;
1011
+ gap: 8px;
1012
+ padding: 4px 8px;
1013
+ font-size: 0.8rem;
1014
+ font-family: inherit;
1015
+ background: transparent;
1016
+ border: none;
1017
+ border-radius: 4px;
1018
+ cursor: pointer;
1019
+ color: #374151;
1020
+ }
1021
+ .gantt-tl-dep-type-option:hover {
1022
+ background-color: rgba(59, 130, 246, 0.1);
1023
+ }
1024
+ .gantt-tl-dep-type-option.active {
1025
+ background-color: rgba(59, 130, 246, 0.2);
1026
+ font-weight: 600;
1027
+ color: #1d4ed8;
1028
+ }
1029
+ .gantt-tl-dep-chip {
1030
+ display: inline-flex;
1031
+ align-items: center;
1032
+ gap: 1px;
1033
+ background-color: rgba(59, 130, 246, 0.12);
1034
+ border: 1px solid rgba(59, 130, 246, 0.3);
1035
+ border-radius: 4px;
1036
+ padding: 4px 4px;
1037
+ font-size: 0.7rem;
1038
+ color: #1d4ed8;
1039
+ white-space: nowrap;
1040
+ line-height: 14px;
1041
+ cursor: pointer;
1042
+ }
1043
+ .gantt-tl-dep-chip-selected {
1044
+ background-color: #1d4ed8;
1045
+ border-color: #1d4ed8;
1046
+ color: #fff;
1047
+ font-weight: 600;
1048
+ }
1049
+ .gantt-tl-dep-chip-wrapper {
1050
+ display: inline-flex;
1051
+ align-items: center;
1052
+ gap: 2px;
1053
+ }
1054
+ .gantt-tl-dep-chip-trash {
1055
+ display: none;
1056
+ align-items: center;
1057
+ justify-content: center;
1058
+ align-self: stretch;
1059
+ background: #ef4444;
1060
+ border: none;
1061
+ border-radius: 3px;
1062
+ padding: 0 4px;
1063
+ cursor: pointer;
1064
+ color: #fff;
1065
+ flex-shrink: 0;
1066
+ line-height: 0;
1067
+ }
1068
+ .gantt-tl-dep-chip-wrapper:has(.gantt-tl-dep-chip-selected) .gantt-tl-dep-chip-trash {
1069
+ display: inline-flex;
1070
+ }
1071
+ .gantt-tl-dep-chip-trash:hover {
1072
+ background-color: #dc2626;
1073
+ }
1074
+ .gantt-tl-dep-info-popover {
1075
+ font-size: 0.75rem;
1076
+ color: #374151;
1077
+ padding: 6px 10px !important;
1078
+ max-width: 260px;
1079
+ line-height: 1.4;
1080
+ display: flex;
1081
+ flex-direction: column;
1082
+ gap: 2px;
1083
+ }
1084
+ .gantt-tl-dep-info-prefix {
1085
+ color: #6b7280;
1086
+ }
1087
+ .gantt-tl-dep-info-name {
1088
+ font-weight: 500;
1089
+ color: #111827;
1090
+ white-space: normal;
1091
+ word-break: break-word;
1092
+ }
1093
+ .gantt-tl-dep-summary-chip {
1094
+ display: inline-flex;
1095
+ align-items: center;
1096
+ background-color: rgba(107, 114, 128, 0.12);
1097
+ border: 1px solid rgba(107, 114, 128, 0.3);
1098
+ border-radius: 4px;
1099
+ padding: 4px 4px;
1100
+ font-size: 0.7rem;
1101
+ color: #6b7280;
1102
+ cursor: pointer;
1103
+ white-space: nowrap;
1104
+ font-family: inherit;
1105
+ }
1106
+ .gantt-tl-dep-summary-chip:hover {
1107
+ background-color: rgba(59, 130, 246, 0.1);
1108
+ color: #1d4ed8;
1109
+ border-color: rgba(59, 130, 246, 0.3);
1110
+ }
1111
+ .gantt-tl-dep-overflow-trigger {
1112
+ display: inline-flex;
1113
+ align-items: center;
1114
+ background-color: rgba(107, 114, 128, 0.1);
1115
+ border: 1px solid rgba(107, 114, 128, 0.25);
1116
+ border-radius: 4px;
1117
+ padding: 1px 4px;
1118
+ font-size: 0.7rem;
1119
+ color: #6b7280;
1120
+ cursor: pointer;
1121
+ white-space: nowrap;
1122
+ font-family: inherit;
1123
+ }
1124
+ .gantt-tl-dep-overflow-trigger:hover {
1125
+ background-color: rgba(59, 130, 246, 0.1);
1126
+ color: #1d4ed8;
1127
+ }
1128
+ .gantt-tl-dep-overflow-list {
1129
+ display: flex;
1130
+ flex-direction: column;
1131
+ gap: 4px;
1132
+ padding: 8px;
1133
+ min-width: 140px;
1134
+ }
1135
+ .gantt-tl-dep-overflow-item {
1136
+ display: flex;
1137
+ align-items: center;
1138
+ justify-content: space-between;
1139
+ gap: 8px;
1140
+ font-size: 0.8rem;
1141
+ color: #374151;
1142
+ }
1143
+ .gantt-tl-dep-add {
1144
+ display: inline-flex;
1145
+ align-items: center;
1146
+ justify-content: center;
1147
+ background: transparent;
1148
+ border: 1px dashed rgba(59, 130, 246, 0.4);
1149
+ border-radius: 4px;
1150
+ width: 23px;
1151
+ height: 23px;
1152
+ font-size: 0.9rem;
1153
+ color: #3b82f6;
1154
+ cursor: pointer;
1155
+ padding: 0;
1156
+ font-family: inherit;
1157
+ flex-shrink: 0;
1158
+ }
1159
+ .gantt-tl-dep-add:hover {
1160
+ background-color: rgba(59, 130, 246, 0.1);
1161
+ border-color: #3b82f6;
1162
+ }
1163
+ .gantt-tl-row-picking .gantt-tl-cell-deps {
1164
+ cursor: crosshair;
1165
+ background-color: rgba(59, 130, 246, 0.04);
1166
+ }
1167
+ .gantt-tl-row-picking .gantt-tl-cell-deps:hover {
1168
+ background-color: rgba(59, 130, 246, 0.15);
1169
+ }
1170
+ .gantt-tl-row-picking-self .gantt-tl-cell-deps {
1171
+ cursor: not-allowed;
1172
+ }
1173
+ .gantt-tl-dep-source-hint {
1174
+ font-size: 0.75rem;
1175
+ color: #6b7280;
1176
+ font-style: italic;
1177
+ pointer-events: none;
1178
+ white-space: nowrap;
1179
+ }
1180
+ .gantt-tl-dep-delete-label {
1181
+ display: inline-flex;
1182
+ align-items: center;
1183
+ justify-content: center;
1184
+ width: 100%;
1185
+ background: #ef4444;
1186
+ border: none;
1187
+ border-radius: 4px;
1188
+ padding: 2px 4px;
1189
+ font-size: 0.75rem;
1190
+ font-family: inherit;
1191
+ cursor: pointer;
1192
+ color: #fff;
1193
+ white-space: nowrap;
1194
+ overflow: hidden;
1195
+ text-overflow: ellipsis;
1196
+ text-align: center;
1197
+ }
1198
+ .gantt-tl-dep-delete-label-hover {
1199
+ display: none;
1200
+ color: #fff;
1201
+ font-weight: 600;
1202
+ }
1203
+ .gantt-tl-dep-delete-label:hover .gantt-tl-dep-delete-label-default {
1204
+ display: none;
1205
+ }
1206
+ .gantt-tl-dep-delete-label:hover .gantt-tl-dep-delete-label-hover {
1207
+ display: inline;
1208
+ }
1209
+ .gantt-tl-dep-error {
1210
+ position: absolute;
1211
+ top: 100%;
1212
+ left: 0;
1213
+ right: 0;
1214
+ background-color: #fef2f2;
1215
+ border: 1px solid #fca5a5;
1216
+ border-top: none;
1217
+ padding: 4px 8px;
1218
+ font-size: 0.75rem;
1219
+ color: #dc2626;
1220
+ z-index: 10;
1221
+ white-space: nowrap;
1222
+ }
951
1223
 
952
1224
  /* src/components/GanttChart/GanttChart.css */
953
1225
  .gantt-container {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-lib",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Lightweight React Gantt chart component library",
5
5
  "license": "MIT",
6
6
  "repository": {