gantt-lib 0.121.2 → 0.122.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
@@ -567,6 +567,80 @@
567
567
  display: flex;
568
568
  align-items: center;
569
569
  }
570
+ .gantt-tr-dependencyPort {
571
+ position: absolute;
572
+ top: 50%;
573
+ z-index: 12;
574
+ width: 24px;
575
+ height: var(--gantt-dependency-port-height, var(--gantt-task-bar-height, 28px));
576
+ padding: 0;
577
+ border: 0;
578
+ border-radius: 8px;
579
+ background: transparent;
580
+ transform: translateY(-50%);
581
+ cursor: crosshair;
582
+ opacity: 0;
583
+ transition:
584
+ opacity 140ms ease,
585
+ background-color 140ms ease,
586
+ transform 140ms ease;
587
+ }
588
+ .gantt-tr-row:hover .gantt-tr-dependencyPort,
589
+ .gantt-tr-dependencyPort:focus-visible,
590
+ .gantt-tr-dependencyPortDragActive {
591
+ opacity: 1;
592
+ }
593
+ .gantt-tr-dependencyPort::after {
594
+ content: "";
595
+ position: absolute;
596
+ top: 50%;
597
+ width: 8px;
598
+ height: 8px;
599
+ border: 2px solid var(--gantt-dependency-port-color, #7c3aed);
600
+ border-radius: 50%;
601
+ background: var(--gantt-cell-background, #fff);
602
+ transform: translateY(-50%) scale(.75);
603
+ transition: transform 140ms cubic-bezier(.2, 0, 0, 1), background-color 140ms ease;
604
+ }
605
+ .gantt-tr-dependencyPort:hover,
606
+ .gantt-tr-dependencyPort:focus-visible {
607
+ background: color-mix(in srgb, var(--gantt-dependency-port-color, #7c3aed) 12%, transparent);
608
+ outline: none;
609
+ }
610
+ .gantt-tr-dependencyPort:hover::after,
611
+ .gantt-tr-dependencyPort:focus-visible::after,
612
+ .gantt-tr-dependencyPortDragActive::after {
613
+ transform: translateY(-50%) scale(1);
614
+ background: var(--gantt-dependency-port-color, #7c3aed);
615
+ }
616
+ .gantt-tr-dependencyPortLeft {
617
+ }
618
+ .gantt-tr-dependencyPort::after {
619
+ pointer-events: none;
620
+ }
621
+ .gantt-tr-dependencyPortLeft::after {
622
+ left: 12px;
623
+ }
624
+ .gantt-tr-dependencyPortRight::after {
625
+ left: 0;
626
+ }
627
+ .gantt-tr-dependencyPortMilestone {
628
+ height: var(--gantt-dependency-port-height, 14px);
629
+ }
630
+ .gantt-tr-dependencyPortParent {
631
+ top: calc(50% - 4px);
632
+ height: var(--gantt-parent-bar-height, 14px);
633
+ transform: translateY(-50%);
634
+ }
635
+ .gantt-tr-dependencyPortDragActive {
636
+ background: color-mix(in srgb, var(--gantt-dependency-port-color, #7c3aed) 10%, transparent);
637
+ }
638
+ @media (prefers-reduced-motion: reduce) {
639
+ .gantt-tr-dependencyPort,
640
+ .gantt-tr-dependencyPort::after {
641
+ transition: none;
642
+ }
643
+ }
570
644
  .gantt-tr-baseline {
571
645
  position: absolute;
572
646
  top: calc(50% + var(--gantt-task-bar-height, 28px) / 2 + var(--gantt-baseline-offset, -6px));
@@ -812,6 +886,7 @@
812
886
  }
813
887
  .gantt-dependency-line {
814
888
  pointer-events: visibleStroke;
889
+ cursor: pointer;
815
890
  }
816
891
  .gantt-dependency-hit-area {
817
892
  fill: none;
@@ -820,6 +895,7 @@
820
895
  stroke-linecap: round;
821
896
  stroke-linejoin: round;
822
897
  pointer-events: stroke;
898
+ cursor: pointer;
823
899
  }
824
900
  .gantt-dependency-path {
825
901
  fill: none;
@@ -840,11 +916,11 @@
840
916
  stroke: #ef4444;
841
917
  stroke-width: 2;
842
918
  }
843
- .gantt-dependency-line:hover .gantt-dependency-hit-area {
844
- stroke: var(--gantt-dependency-hover-background, rgba(239, 68, 68, 0.22));
845
- stroke-width: 6;
919
+ .gantt-dependency-line-hovered .gantt-dependency-hit-area {
920
+ stroke: transparent;
921
+ stroke-width: 12;
846
922
  }
847
- .gantt-dependency-line:hover .gantt-dependency-path {
923
+ .gantt-dependency-line-hovered .gantt-dependency-path {
848
924
  stroke: var(--gantt-dependency-hover-color, #ef4444);
849
925
  stroke-width: 2;
850
926
  marker-end: url(#arrowhead-hover);
@@ -863,6 +939,55 @@
863
939
  opacity: 0.85;
864
940
  }
865
941
 
942
+ /* src/components/DependencyCreationOverlay/DependencyCreationOverlay.css */
943
+ .gantt-dependencyCreation-svg {
944
+ position: absolute;
945
+ inset: 0;
946
+ z-index: 15;
947
+ overflow: visible;
948
+ pointer-events: none;
949
+ }
950
+ .gantt-dependencyCreation-path {
951
+ fill: none;
952
+ stroke: var(--gantt-dependency-port-color, #7c3aed);
953
+ stroke-width: 2;
954
+ stroke-linecap: round;
955
+ stroke-dasharray: 5 5;
956
+ animation: gantt-dependencyCreation-dash 420ms linear infinite;
957
+ }
958
+ .gantt-dependencyCreation-pathTargeted {
959
+ stroke: var(--gantt-dependency-port-target-color, #16a34a);
960
+ }
961
+ .gantt-dependencyCreation-source,
962
+ .gantt-dependencyCreation-target {
963
+ fill: var(--gantt-cell-background, #fff);
964
+ stroke: var(--gantt-dependency-port-color, #7c3aed);
965
+ stroke-width: 2;
966
+ }
967
+ .gantt-dependencyCreation-targetValid {
968
+ fill: var(--gantt-dependency-port-target-color, #16a34a);
969
+ stroke: var(--gantt-cell-background, #fff);
970
+ }
971
+ .gantt-dependencyCreation-label {
972
+ fill: var(--gantt-dependency-port-color, #7c3aed);
973
+ font-size: 11px;
974
+ font-weight: 700;
975
+ paint-order: stroke;
976
+ stroke: var(--gantt-cell-background, #fff);
977
+ stroke-width: 4px;
978
+ stroke-linejoin: round;
979
+ }
980
+ @keyframes gantt-dependencyCreation-dash {
981
+ to {
982
+ stroke-dashoffset: -10;
983
+ }
984
+ }
985
+ @media (prefers-reduced-motion: reduce) {
986
+ .gantt-dependencyCreation-path {
987
+ animation: none;
988
+ }
989
+ }
990
+
866
991
  /* src/components/TaskList/TaskList.css */
867
992
  .gantt-tl-overlay {
868
993
  position: sticky;
@@ -1831,6 +1956,11 @@
1831
1956
  font-weight: 600;
1832
1957
  color: #1d4ed8;
1833
1958
  }
1959
+ .gantt-tl-dep-chip-control {
1960
+ position: relative;
1961
+ display: inline-flex;
1962
+ align-items: center;
1963
+ }
1834
1964
  .gantt-tl-dep-chip {
1835
1965
  display: inline-flex;
1836
1966
  align-items: center;
@@ -1856,6 +1986,28 @@
1856
1986
  font-size: 0.75rem;
1857
1987
  padding: 3px 6px;
1858
1988
  }
1989
+ .gantt-tl-dep-expand {
1990
+ position: absolute;
1991
+ left: calc(100% + 4px);
1992
+ top: 50%;
1993
+ display: inline-flex;
1994
+ align-items: center;
1995
+ justify-content: center;
1996
+ width: 24px;
1997
+ height: 22px;
1998
+ padding: 0;
1999
+ border: 0;
2000
+ border-radius: 5px;
2001
+ background: transparent;
2002
+ color: #2563eb;
2003
+ cursor: pointer;
2004
+ transform: translateY(-50%);
2005
+ }
2006
+ .gantt-tl-dep-expand:hover,
2007
+ .gantt-tl-dep-expand:focus-visible {
2008
+ background: rgba(37, 99, 235, 0.12);
2009
+ outline: none;
2010
+ }
1859
2011
  .gantt-tl-dep-chip-with-number:hover {
1860
2012
  background-color: rgba(59, 130, 246, 0.12);
1861
2013
  }
@@ -3975,6 +4127,69 @@
3975
4127
  position: relative;
3976
4128
  background-color: var(--gantt-cell-background, #ffffff);
3977
4129
  }
4130
+ .gantt-dependencyCreation-error {
4131
+ position: sticky;
4132
+ top: 12px;
4133
+ z-index: 30;
4134
+ width: max-content;
4135
+ max-width: min(360px, calc(100% - 24px));
4136
+ margin: 12px auto 0;
4137
+ padding: 8px 12px;
4138
+ border-radius: 8px;
4139
+ color: #991b1b;
4140
+ background: #fef2f2;
4141
+ box-shadow: 0 6px 18px rgba(127, 29, 29, .14);
4142
+ font-size: .8rem;
4143
+ font-weight: 650;
4144
+ pointer-events: none;
4145
+ }
4146
+ .gantt-dependencyLineMenu {
4147
+ position: absolute;
4148
+ z-index: 32;
4149
+ display: inline-flex;
4150
+ align-items: center;
4151
+ gap: 5px;
4152
+ min-height: 28px;
4153
+ padding: 3px 4px 3px 8px;
4154
+ border-radius: 7px;
4155
+ background: var(--gantt-popover-bg, #fff);
4156
+ box-shadow: 0 5px 16px rgba(15, 23, 42, .18), 0 0 0 1px rgba(148, 163, 184, .2);
4157
+ transform: translateY(-50%);
4158
+ pointer-events: auto;
4159
+ }
4160
+ .gantt-dependencyLineMenuType {
4161
+ color: var(--gantt-dependency-hover-color, #ef4444);
4162
+ font-size: .72rem;
4163
+ font-weight: 750;
4164
+ line-height: 1;
4165
+ }
4166
+ .gantt-dependencyLineMenuDelete {
4167
+ display: inline-grid;
4168
+ width: 22px;
4169
+ height: 22px;
4170
+ place-items: center;
4171
+ padding: 0;
4172
+ border: 0;
4173
+ border-radius: 5px;
4174
+ color: #991b1b;
4175
+ background: #fef2f2;
4176
+ cursor: pointer;
4177
+ font-size: 17px;
4178
+ line-height: 1;
4179
+ transition:
4180
+ background-color 120ms ease,
4181
+ color 120ms ease,
4182
+ transform 120ms ease;
4183
+ }
4184
+ .gantt-dependencyLineMenuDelete:hover,
4185
+ .gantt-dependencyLineMenuDelete:focus-visible {
4186
+ color: #fff;
4187
+ background: #dc2626;
4188
+ outline: none;
4189
+ }
4190
+ .gantt-dependencyLineMenuDelete:active {
4191
+ transform: scale(.96);
4192
+ }
3978
4193
  .gantt-chartSurface {
3979
4194
  display: block;
3980
4195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-lib",
3
- "version": "0.121.2",
3
+ "version": "0.122.0",
4
4
  "description": "React scheduling UI library for Gantt charts, resource planners, and table-matrix views",
5
5
  "license": "MIT",
6
6
  "repository": {