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