gantt-lib 0.80.0 → 0.80.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
@@ -837,6 +837,7 @@
837
837
  flex-direction: column;
838
838
  }
839
839
  .gantt-tl-row {
840
+ --gantt-tl-name-actions-bg: var(--gantt-cell-background, #ffffff);
840
841
  display: flex;
841
842
  border-bottom: 1px solid var(--gantt-grid-line-color, #e0e0e0);
842
843
  box-sizing: border-box;
@@ -844,27 +845,35 @@
844
845
  position: relative;
845
846
  }
846
847
  .gantt-tl-row-filter-match {
848
+ --gantt-tl-name-actions-bg: #fef3c7;
847
849
  background-color: rgba(250, 204, 21, 0.24);
848
850
  }
849
851
  .gantt-tl-row:hover {
852
+ --gantt-tl-name-actions-bg: #f5f5f6;
850
853
  box-shadow: inset 0 0 0 9999px rgba(17, 24, 39, 0.04);
851
854
  }
852
855
  .gantt-tl-row-filter-match:hover {
856
+ --gantt-tl-name-actions-bg: #fde68a;
853
857
  box-shadow: inset 0 0 0 9999px rgba(250, 204, 21, 0.3);
854
858
  }
855
859
  .gantt-tl-row-selected {
860
+ --gantt-tl-name-actions-bg: #ebedef;
856
861
  box-shadow: inset 0 0 0 9999px rgba(17, 24, 39, 0.08);
857
862
  }
858
863
  .gantt-tl-row-dependency-selected {
859
- box-shadow: inset 0 0 0 9999px rgba(5, 150, 105, 0.12);
864
+ --gantt-tl-name-actions-bg: #e8effe;
865
+ box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.12);
860
866
  }
861
867
  .gantt-tl-row-dependency-selected:hover {
862
- box-shadow: inset 0 0 0 9999px rgba(5, 150, 105, 0.16);
868
+ --gantt-tl-name-actions-bg: #e0e9fd;
869
+ box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.16);
863
870
  }
864
871
  .gantt-tl-row-dependency-owner {
872
+ --gantt-tl-name-actions-bg: #e8effe;
865
873
  box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.12);
866
874
  }
867
875
  .gantt-tl-row-dependency-owner:hover {
876
+ --gantt-tl-name-actions-bg: #e0e9fd;
868
877
  box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.16);
869
878
  }
870
879
  .gantt-tl-row-child {
@@ -943,11 +952,13 @@
943
952
  user-select: none;
944
953
  background: transparent;
945
954
  }
946
- .gantt-tl-row:hover .gantt-tl-drag-handle,
955
+ .gantt-tl-cell-number:hover .gantt-tl-drag-handle,
956
+ .gantt-tl-cell-number:focus-within .gantt-tl-drag-handle,
947
957
  .gantt-tl-row-dragging .gantt-tl-drag-handle {
948
958
  visibility: visible;
949
959
  }
950
- .gantt-tl-row:hover .gantt-tl-num-label {
960
+ .gantt-tl-cell-number:hover .gantt-tl-num-label,
961
+ .gantt-tl-cell-number:focus-within .gantt-tl-num-label {
951
962
  visibility: hidden;
952
963
  }
953
964
  .gantt-tl-num-label {
@@ -958,6 +969,7 @@
958
969
  cursor: grabbing;
959
970
  }
960
971
  .gantt-tl-row-dragging {
972
+ --gantt-tl-name-actions-bg: #d8e7fd;
961
973
  background-color: rgba(59, 130, 246, 0.15);
962
974
  }
963
975
  .gantt-tl-row-dragging .gantt-tl-cell,
@@ -1138,11 +1150,29 @@
1138
1150
  .gantt-tl-name-actions {
1139
1151
  position: absolute;
1140
1152
  right: 4px;
1141
- top: 50%;
1142
- transform: translateY(-50%);
1153
+ top: 0;
1154
+ bottom: 0;
1143
1155
  display: flex;
1144
1156
  gap: 4px;
1145
1157
  align-items: center;
1158
+ padding-left: 14px;
1159
+ z-index: 2;
1160
+ }
1161
+ .gantt-tl-name-actions::before {
1162
+ content: "";
1163
+ position: absolute;
1164
+ top: 0;
1165
+ right: -4px;
1166
+ bottom: 0;
1167
+ left: 14px;
1168
+ background: var(--gantt-tl-name-actions-bg);
1169
+ opacity: 0;
1170
+ pointer-events: none;
1171
+ z-index: 0;
1172
+ }
1173
+ .gantt-tl-name-actions > * {
1174
+ position: relative;
1175
+ z-index: 1;
1146
1176
  }
1147
1177
  .gantt-tl-name-action-btn {
1148
1178
  display: inline-flex;
@@ -1158,10 +1188,15 @@
1158
1188
  pointer-events: none;
1159
1189
  transition: opacity 0.15s ease, background-color 0.15s ease;
1160
1190
  }
1161
- .gantt-tl-row:hover .gantt-tl-name-action-btn {
1191
+ .gantt-tl-cell-name:hover .gantt-tl-name-action-btn,
1192
+ .gantt-tl-cell-name:has(.gantt-tl-name-action-btn:focus-visible) .gantt-tl-name-action-btn {
1162
1193
  opacity: 1;
1163
1194
  pointer-events: auto;
1164
1195
  }
1196
+ .gantt-tl-cell-name:hover .gantt-tl-name-actions::before,
1197
+ .gantt-tl-cell-name:has(.gantt-tl-name-action-btn:focus-visible) .gantt-tl-name-actions::before {
1198
+ opacity: 1;
1199
+ }
1165
1200
  .gantt-tl-action-buttons {
1166
1201
  display: flex;
1167
1202
  gap: 4px;
@@ -1169,7 +1204,8 @@
1169
1204
  transition: opacity 0.15s ease;
1170
1205
  pointer-events: none;
1171
1206
  }
1172
- .gantt-tl-row:hover .gantt-tl-action-buttons {
1207
+ .gantt-tl-cell-name:hover .gantt-tl-action-buttons,
1208
+ .gantt-tl-cell-name:has(.gantt-tl-name-action-btn:focus-visible) .gantt-tl-action-buttons {
1173
1209
  opacity: 1;
1174
1210
  pointer-events: auto;
1175
1211
  }
@@ -1330,6 +1366,51 @@
1330
1366
  .gantt-tl-action-hierarchy:hover {
1331
1367
  background-color: #374151;
1332
1368
  }
1369
+ @media (max-width: 640px), (pointer: coarse) {
1370
+ .gantt-tl-row,
1371
+ .gantt-tl-cell,
1372
+ .gantt-tl-name-trigger,
1373
+ .gantt-tl-name-action-btn {
1374
+ -webkit-tap-highlight-color: transparent;
1375
+ }
1376
+ .gantt-tl-name-trigger:focus:not(:focus-visible),
1377
+ .gantt-tl-name-action-btn:focus:not(:focus-visible) {
1378
+ outline: none;
1379
+ }
1380
+ .gantt-tl-name-actions {
1381
+ gap: 6px;
1382
+ padding-left: 16px;
1383
+ }
1384
+ .gantt-tl-name-actions::before {
1385
+ left: 16px;
1386
+ }
1387
+ .gantt-tl-name-action-btn,
1388
+ .gantt-tl-action-hierarchy {
1389
+ width: 28px;
1390
+ height: 28px;
1391
+ }
1392
+ .gantt-tl-cell-name:hover .gantt-tl-name-actions::before,
1393
+ .gantt-tl-cell-name:has(.gantt-tl-name-action-btn:focus-visible) .gantt-tl-name-actions::before {
1394
+ opacity: 0;
1395
+ }
1396
+ .gantt-tl-cell-name:hover .gantt-tl-name-action-btn:not(.gantt-tl-action-context),
1397
+ .gantt-tl-cell-name:has(.gantt-tl-name-action-btn:focus-visible) .gantt-tl-name-action-btn:not(.gantt-tl-action-context) {
1398
+ opacity: 0;
1399
+ pointer-events: none;
1400
+ }
1401
+ .gantt-tl-cell-name:hover .gantt-tl-action-context,
1402
+ .gantt-tl-cell-name:has(.gantt-tl-action-context:focus-visible) .gantt-tl-action-context {
1403
+ opacity: 1;
1404
+ pointer-events: auto;
1405
+ }
1406
+ .gantt-tl-cell-name:has(.gantt-tl-name-actions-open) .gantt-tl-name-actions-open::before {
1407
+ opacity: 1;
1408
+ }
1409
+ .gantt-tl-cell-name:has(.gantt-tl-name-actions-open) .gantt-tl-name-actions-open .gantt-tl-name-action-btn {
1410
+ opacity: 1;
1411
+ pointer-events: auto;
1412
+ }
1413
+ }
1333
1414
  .gantt-tl-dep-type-trigger {
1334
1415
  display: flex;
1335
1416
  align-items: center;
@@ -1686,6 +1767,11 @@
1686
1767
  display: inline-flex;
1687
1768
  align-items: center;
1688
1769
  justify-content: center;
1770
+ position: absolute;
1771
+ right: 4px;
1772
+ top: 50%;
1773
+ transform: translateY(-50%);
1774
+ z-index: 2;
1689
1775
  background: transparent;
1690
1776
  border: 0px solid rgba(59, 130, 246, 0.4);
1691
1777
  background-color: rgba(59, 130, 246, 0.12);
@@ -1704,7 +1790,8 @@
1704
1790
  pointer-events: none;
1705
1791
  transition: opacity 0.15s ease;
1706
1792
  }
1707
- .gantt-tl-row:hover .gantt-tl-dep-add-hover {
1793
+ .gantt-tl-cell-deps:hover .gantt-tl-dep-add-hover,
1794
+ .gantt-tl-cell-deps:focus-within .gantt-tl-dep-add-hover {
1708
1795
  opacity: 1;
1709
1796
  pointer-events: auto;
1710
1797
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-lib",
3
- "version": "0.80.0",
3
+ "version": "0.80.1",
4
4
  "description": "Lightweight React Gantt chart component library",
5
5
  "license": "MIT",
6
6
  "repository": {