@multiplatform.one/components 10.1.2 → 10.1.4

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.
Files changed (102) hide show
  1. package/dist/cjs/layouts/timeline.cjs +0 -1
  2. package/dist/cjs/layouts/timeline.native.cjs +0 -1
  3. package/dist/cjs/layouts/timeline.native.js +0 -1
  4. package/dist/cjs/layouts/timeline.native.js.map +1 -1
  5. package/dist/cjs/views/Calendar.cjs +54 -76
  6. package/dist/cjs/views/Calendar.native.cjs +54 -76
  7. package/dist/cjs/views/Calendar.native.js +54 -76
  8. package/dist/cjs/views/Calendar.native.js.map +1 -1
  9. package/dist/cjs/views/Gantt.cjs +185 -69
  10. package/dist/cjs/views/Gantt.native.cjs +190 -72
  11. package/dist/cjs/views/Gantt.native.js +190 -72
  12. package/dist/cjs/views/Gantt.native.js.map +1 -1
  13. package/dist/cjs/views/GanttDateGrip.cjs +20 -14
  14. package/dist/cjs/views/GanttDateGrip.native.cjs +24 -14
  15. package/dist/cjs/views/GanttDateGrip.native.js +24 -14
  16. package/dist/cjs/views/GanttDateGrip.native.js.map +1 -1
  17. package/dist/cjs/views/GanttGripDot.cjs +43 -0
  18. package/dist/cjs/views/GanttGripDot.native.cjs +46 -0
  19. package/dist/cjs/views/GanttGripDot.native.js +48 -0
  20. package/dist/cjs/views/GanttGripDot.native.js.map +1 -0
  21. package/dist/cjs/views/eventTint.cjs +242 -0
  22. package/dist/cjs/views/eventTint.native.cjs +346 -0
  23. package/dist/cjs/views/eventTint.native.js +348 -0
  24. package/dist/cjs/views/eventTint.native.js.map +1 -0
  25. package/dist/esm/layouts/timeline.mjs +0 -1
  26. package/dist/esm/layouts/timeline.mjs.map +1 -1
  27. package/dist/esm/layouts/timeline.native.js +0 -1
  28. package/dist/esm/layouts/timeline.native.js.map +1 -1
  29. package/dist/esm/views/Calendar.mjs +53 -75
  30. package/dist/esm/views/Calendar.mjs.map +1 -1
  31. package/dist/esm/views/Calendar.native.js +53 -75
  32. package/dist/esm/views/Calendar.native.js.map +1 -1
  33. package/dist/esm/views/Gantt.mjs +186 -70
  34. package/dist/esm/views/Gantt.mjs.map +1 -1
  35. package/dist/esm/views/Gantt.native.js +191 -73
  36. package/dist/esm/views/Gantt.native.js.map +1 -1
  37. package/dist/esm/views/GanttDateGrip.mjs +21 -15
  38. package/dist/esm/views/GanttDateGrip.mjs.map +1 -1
  39. package/dist/esm/views/GanttDateGrip.native.js +25 -15
  40. package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
  41. package/dist/esm/views/GanttGripDot.mjs +24 -0
  42. package/dist/esm/views/GanttGripDot.mjs.map +1 -0
  43. package/dist/esm/views/GanttGripDot.native.js +25 -0
  44. package/dist/esm/views/GanttGripDot.native.js.map +1 -0
  45. package/dist/esm/views/eventTint.mjs +196 -0
  46. package/dist/esm/views/eventTint.mjs.map +1 -0
  47. package/dist/esm/views/eventTint.native.js +298 -0
  48. package/dist/esm/views/eventTint.native.js.map +1 -0
  49. package/dist/jsx/layouts/timeline.mjs +0 -1
  50. package/dist/jsx/layouts/timeline.mjs.map +1 -1
  51. package/dist/jsx/layouts/timeline.native.cjs +0 -1
  52. package/dist/jsx/layouts/timeline.native.js +0 -1
  53. package/dist/jsx/layouts/timeline.native.js.map +1 -1
  54. package/dist/jsx/views/Calendar.mjs +53 -75
  55. package/dist/jsx/views/Calendar.mjs.map +1 -1
  56. package/dist/jsx/views/Calendar.native.cjs +54 -76
  57. package/dist/jsx/views/Calendar.native.js +54 -76
  58. package/dist/jsx/views/Calendar.native.js.map +1 -1
  59. package/dist/jsx/views/Gantt.mjs +186 -70
  60. package/dist/jsx/views/Gantt.mjs.map +1 -1
  61. package/dist/jsx/views/Gantt.native.cjs +190 -72
  62. package/dist/jsx/views/Gantt.native.js +190 -72
  63. package/dist/jsx/views/Gantt.native.js.map +1 -1
  64. package/dist/jsx/views/GanttDateGrip.mjs +21 -15
  65. package/dist/jsx/views/GanttDateGrip.mjs.map +1 -1
  66. package/dist/jsx/views/GanttDateGrip.native.cjs +24 -14
  67. package/dist/jsx/views/GanttDateGrip.native.js +24 -14
  68. package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
  69. package/dist/jsx/views/GanttGripDot.mjs +24 -0
  70. package/dist/jsx/views/GanttGripDot.mjs.map +1 -0
  71. package/dist/jsx/views/GanttGripDot.native.cjs +46 -0
  72. package/dist/jsx/views/GanttGripDot.native.js +48 -0
  73. package/dist/jsx/views/GanttGripDot.native.js.map +1 -0
  74. package/dist/jsx/views/eventTint.mjs +196 -0
  75. package/dist/jsx/views/eventTint.mjs.map +1 -0
  76. package/dist/jsx/views/eventTint.native.cjs +346 -0
  77. package/dist/jsx/views/eventTint.native.js +348 -0
  78. package/dist/jsx/views/eventTint.native.js.map +1 -0
  79. package/package.json +7 -7
  80. package/src/hoverTouchPath.coarse.spec.tsx +28 -4
  81. package/src/layouts/timeline.replyInset.spec.tsx +72 -22
  82. package/src/layouts/timeline.tsx +0 -1
  83. package/src/views/Calendar.eventFill.spec.tsx +44 -9
  84. package/src/views/Calendar.tsx +23 -31
  85. package/src/views/Gantt.barInk.spec.tsx +257 -0
  86. package/src/views/Gantt.grips.spec.tsx +226 -0
  87. package/src/views/Gantt.tint.palette.spec.ts +288 -0
  88. package/src/views/Gantt.tsx +224 -65
  89. package/src/views/GanttDateGrip.native.spec.tsx +8 -0
  90. package/src/views/GanttDateGrip.tsx +28 -17
  91. package/src/views/GanttGripDot.tsx +36 -0
  92. package/src/views/dataIdentity.spec.tsx +29 -13
  93. package/src/views/eventTint.ts +305 -0
  94. package/types/layouts/timeline.d.ts.map +1 -1
  95. package/types/views/Calendar.d.ts.map +1 -1
  96. package/types/views/Gantt.d.ts.map +1 -1
  97. package/types/views/GanttDateGrip.d.ts +7 -0
  98. package/types/views/GanttDateGrip.d.ts.map +1 -1
  99. package/types/views/GanttGripDot.d.ts +9 -0
  100. package/types/views/GanttGripDot.d.ts.map +1 -0
  101. package/types/views/eventTint.d.ts +72 -0
  102. package/types/views/eventTint.d.ts.map +1 -0
@@ -1,4 +1,4 @@
1
- import { Intent, MIN_PRESS_TARGET, ensureKeyboardModalityTracking, formatAbsoluteDate, formatDayOfMonth, formatMonthYear, hairline, hairlineWidth, keyboardFocusRingProps, transitionProps, useChartPalette, useReadableTextOn, useResolvedKnobs, wasKeyboardFocus } from "@multiplatform.one/theme";
1
+ import { Intent, MIN_PRESS_TARGET, ensureKeyboardModalityTracking, formatAbsoluteDate, formatDayOfMonth, formatMonthYear, hairline, hairlineWidth, keyboardFocusRingProps, transitionProps, useChartPalette, useResolvedKnobs, wasKeyboardFocus } from "@multiplatform.one/theme";
2
2
  import { componentColors, sectionHeading } from "../componentColors.mjs";
3
3
  import { AsyncBoundary } from "../layouts/AsyncBoundary.mjs";
4
4
  import { Skeleton } from "../Skeleton/index.mjs";
@@ -14,6 +14,8 @@ import { ScrollView as ScrollView$1 } from "../ScrollView.mjs";
14
14
  import { LinearGradient } from "tamagui/linear-gradient";
15
15
  import { normalizeColor } from "@tamagui/core";
16
16
  import { GanttDateGrip } from "./GanttDateGrip.mjs";
17
+ import { GanttGripDot } from "./GanttGripDot.mjs";
18
+ import { EVENT_BAR_PX, EVENT_GRIP_DOT_PX, eventLabelInk, eventPaint, eventSolid, eventStripPaint, useEventDark } from "./eventTint.mjs";
17
19
  import { intervalEdgeX, intervalViewport } from "./ganttIntervals.mjs";
18
20
  import { addDays, barGeometry, clampResizeDayDelta, computeGanttRange, dateLineX, dateToX, dayDiff, dxToDayDelta, formatRangeLabel, formatSpanLabel, ganttTaskAccessibleLabel, generateTicks, isBoundedSpan, openBarGeometry, openSpanExtents, openSpanLabelParts, rangeDays, resizeSpanByDays, scrollAnchorX, shiftSpanByDays, spanInclusiveDays, startOfDay, todayLineX } from "./ganttMath.mjs";
19
21
  import { Text as Text$1 } from "../Text.mjs";
@@ -165,29 +167,55 @@ function BarIntentWrap({ intent, children }) {
165
167
  children
166
168
  });
167
169
  }
168
- function GanttBarLabel({ title, fill }) {
170
+ const STRIP_INSET_PX = 4;
171
+ const STRIP_BOTTOM_PX = 2;
172
+ const STRIP_TRACK_OPACITY = .3;
173
+ function GanttBarLabel({ title, fill, state, surface, dark }) {
169
174
  const { knobProps } = useResolvedKnobs();
170
- const ink = useReadableTextOn(fill);
175
+ const theme = useTheme();
176
+ const solid = dark || state === "ghost" ? null : eventSolid(theme, fill, state);
177
+ const ink = solid?.ink ?? eventLabelInk(theme, fill, [eventPaint(theme, fill, state, {
178
+ dark,
179
+ surface
180
+ })], dark, state === "ghost" ? "secondary" : "primary");
171
181
  return /* @__PURE__ */ jsx(Text, {
172
- color: ink ?? "$color-1",
182
+ color: ink,
173
183
  ...knobProps.label,
174
184
  numberOfLines: 1,
175
185
  paddingHorizontal: knobProps.control.paddingHorizontal,
176
186
  pointerEvents: "none",
177
187
  zIndex: 1,
178
188
  "aria-hidden": true,
189
+ ...{
190
+ "data-gantt-bar-ink": ink,
191
+ "data-gantt-ghost-label": state === "ghost" ? "true" : void 0
192
+ },
179
193
  children: `${title}\u200B`
180
194
  });
181
195
  }
182
- function GanttIntervalFill({ fill, openStart, openEnd, width, rtl, ghost }) {
196
+ function GanttIntervalFill({ fill, surface, openStart, openEnd, width, rtl, state, dark, progress, lead }) {
183
197
  const { knobProps } = useResolvedKnobs();
184
198
  const theme = useTheme();
199
+ const values = theme;
185
200
  const fillKey = fill.startsWith("$") ? fill.slice(1) : fill;
186
- const color = theme[fillKey]?.val ?? getTokenValue(fillKey, "color") ?? fill;
187
- const clear = normalizeColor(String(color), 0) ?? "transparent";
201
+ const color = String(theme[fillKey]?.val ?? getTokenValue(fillKey, "color") ?? fill);
202
+ const solid = dark || state === "ghost" ? null : eventSolid(values, fill, state);
203
+ const paint = solid?.paint ?? eventPaint(values, fill, state, {
204
+ dark,
205
+ surface
206
+ });
207
+ const body = paint ?? color;
208
+ const strip = solid ? solid.ink : paint ? eventStripPaint(values, fill, {
209
+ dark,
210
+ surface
211
+ }) : null;
212
+ const leading = lead && !solid;
213
+ const clear = normalizeColor(body, 0) ?? "transparent";
188
214
  const fadeWidth = Math.min(Number(knobProps.control.height), width / 2);
189
215
  const leftOpen = rtl ? openEnd : openStart;
190
216
  const rightOpen = rtl ? openStart : openEnd;
217
+ const stripStart = (leading ? EVENT_BAR_PX : 0) + STRIP_INSET_PX;
218
+ const stripWidth = progress != null ? Math.max(0, width - stripStart - STRIP_INSET_PX) * progress / 100 : 0;
191
219
  return /* @__PURE__ */ jsxs(YStack, {
192
220
  position: "absolute",
193
221
  top: 0,
@@ -195,34 +223,75 @@ function GanttIntervalFill({ fill, openStart, openEnd, width, rtl, ghost }) {
195
223
  left: 0,
196
224
  right: 0,
197
225
  pointerEvents: "none",
198
- opacity: ghost ? .25 : 1,
199
226
  overflow: "hidden",
200
227
  ...knobProps.borderRadius,
201
- children: [/* @__PURE__ */ jsx(YStack, {
202
- position: "absolute",
203
- top: 0,
204
- bottom: 0,
205
- left: leftOpen ? fadeWidth : 0,
206
- right: rightOpen ? fadeWidth : 0,
207
- backgroundColor: fill
208
- }), ["start", "end"].map((edge) => {
209
- if (edge === "start" ? !openStart : !openEnd) return null;
210
- const left = edge === "start" !== rtl;
211
- return /* @__PURE__ */ jsx(LinearGradient, {
228
+ borderWidth: 0,
229
+ ...{
230
+ "data-gantt-bar-state": state,
231
+ "data-gantt-bar-paint": paint ?? void 0
232
+ },
233
+ children: [
234
+ /* @__PURE__ */ jsx(YStack, {
212
235
  position: "absolute",
213
236
  top: 0,
214
237
  bottom: 0,
215
- ...left ? { left: 0 } : { right: 0 },
216
- width: fadeWidth,
217
- colors: left ? [clear, String(color)] : [String(color), clear],
218
- start: [0, 0],
219
- end: [1, 0],
238
+ left: leftOpen ? fadeWidth : 0,
239
+ right: rightOpen ? fadeWidth : 0,
240
+ backgroundColor: body,
241
+ ...{ "data-gantt-bar-fill": fill }
242
+ }),
243
+ ["start", "end"].map((edge) => {
244
+ if (edge === "start" ? !openStart : !openEnd) return null;
245
+ const left = edge === "start" !== rtl;
246
+ return /* @__PURE__ */ jsx(LinearGradient, {
247
+ position: "absolute",
248
+ top: 0,
249
+ bottom: 0,
250
+ ...left ? { left: 0 } : { right: 0 },
251
+ width: fadeWidth,
252
+ colors: left ? [clear, body] : [body, clear],
253
+ start: [0, 0],
254
+ end: [1, 0],
255
+ ...{
256
+ "data-gantt-open-fade": edge,
257
+ [`data-gantt-open-${edge}`]: "true"
258
+ }
259
+ }, edge);
260
+ }),
261
+ solid && progress != null && /* @__PURE__ */ jsx(YStack, {
262
+ position: "absolute",
263
+ bottom: STRIP_BOTTOM_PX,
264
+ height: EVENT_BAR_PX,
265
+ ...rtl ? { right: stripStart } : { left: stripStart },
266
+ width: Math.max(0, width - stripStart - STRIP_INSET_PX),
267
+ borderRadius: EVENT_BAR_PX / 2,
268
+ backgroundColor: solid.ink,
269
+ opacity: STRIP_TRACK_OPACITY,
270
+ ...{ "data-gantt-progress-track": solid.ink }
271
+ }),
272
+ stripWidth > 0 && /* @__PURE__ */ jsx(YStack, {
273
+ position: "absolute",
274
+ bottom: STRIP_BOTTOM_PX,
275
+ height: EVENT_BAR_PX,
276
+ ...rtl ? { right: stripStart } : { left: stripStart },
277
+ width: stripWidth,
278
+ borderRadius: EVENT_BAR_PX / 2,
279
+ backgroundColor: strip ?? color,
220
280
  ...{
221
- "data-gantt-open-fade": edge,
222
- [`data-gantt-open-${edge}`]: "true"
281
+ "data-gantt-progress": String(progress),
282
+ "data-gantt-progress-paint": strip
223
283
  }
224
- }, edge);
225
- })]
284
+ }),
285
+ leading && /* @__PURE__ */ jsx(YStack, {
286
+ position: "absolute",
287
+ top: 0,
288
+ bottom: 0,
289
+ ...rtl ? { right: 0 } : { left: 0 },
290
+ width: EVENT_BAR_PX,
291
+ backgroundColor: color,
292
+ ...{ "data-gantt-bar-lead": "true" }
293
+ })
294
+ ]
226
295
  });
227
296
  }
228
297
  function GanttTaskName({ title, selected, body }) {
@@ -235,6 +304,10 @@ function GanttTaskName({ title, selected, body }) {
235
304
  }
236
305
  function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPress, onItemMove, enableItemDrag, onIntervalChange, snapUnit = "day", isLoading = false, error = null, onRetry, emptyTitle, emptyDescription, height: heightProp, labelWidth = 180, showToday = true, showNavigation = true, showZoomSwitcher = true, firstDayOfWeek = 0, initialDate, markerDate, onMarkerDateChange, enableMarkerDrag, markerLabel, ...stackProps }) {
237
306
  const identity = useChartPalette().single;
307
+ const canvasTheme = useTheme();
308
+ const canvasBackground = canvasTheme.background?.val;
309
+ const canvasGround = typeof canvasBackground === "string" ? canvasBackground : void 0;
310
+ const dark = useEventDark();
238
311
  const { t } = useTranslation();
239
312
  const { knobProps } = useResolvedKnobs();
240
313
  const [zoom, setZoom] = useState(initialZoom);
@@ -556,6 +629,8 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
556
629
  if (!session) return;
557
630
  if (session.liftTimer) clearTimeout(session.liftTimer);
558
631
  if (!session.dragging) {
632
+ setFocusedBarId(session.ref.key);
633
+ setBarKeyboardRing(false);
559
634
  onItemPress?.(session.task);
560
635
  return;
561
636
  }
@@ -858,11 +933,19 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
858
933
  const fill = barColor ?? (barIntent && barIntent !== "accent" ? "$color-9" : identity);
859
934
  const progress = bounded && !ghost ? clampProgress(span.progress ?? task.progress) : null;
860
935
  const showLabel = !geom.eternal && liveWidth >= 44;
936
+ const labelOutside = !showLabel && !geom.eternal && !ghost && resolveSpans(task).length === 1;
861
937
  const isBarFocused = focusedBarId === barKey;
862
938
  const showHandles = hoveredId === task.id || sessionLive || isBarFocused;
939
+ const barState = ghost ? "ghost" : showHandles || geom.eternal ? "selected" : "rest";
863
940
  const handleWidth = bounded ? geom.width >= 24 ? 8 : geom.width >= 12 ? 4 : 0 : 0;
864
941
  const physicalLeftEdge = rtl ? "end" : "start";
865
942
  const physicalRightEdge = rtl ? "start" : "end";
943
+ const logicalLeft = geom.x + liveTransformX * dirSign;
944
+ const gripShift = (edge) => {
945
+ const at = edge === "start" ? logicalLeft : logicalLeft + liveWidth;
946
+ const inside = Math.max(visibleWindow.start + EVENT_GRIP_DOT_PX / 2, Math.min(at, visibleWindow.end - EVENT_GRIP_DOT_PX / 2));
947
+ return (inside - at) * dirSign;
948
+ };
866
949
  const squareStart = rtl ? {
867
950
  borderTopRightRadius: 0,
868
951
  borderBottomRightRadius: 0
@@ -911,8 +994,8 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
911
994
  borderStyle: "dashed",
912
995
  borderWidth: hairlineWidth,
913
996
  borderColor: fill
914
- } : {},
915
- opacity: `${sessionLive ? .85 : geom.eternal ? .55 : 1} hover:${sessionLive ? .85 : geom.eternal ? .7 : .9} press:0.8`,
997
+ } : { borderWidth: 0 },
998
+ opacity: `${sessionLive ? .85 : 1} press:0.8`,
916
999
  cursor: bounded && webDragEnabled ? "grab" : onItemPress ? "pointer" : void 0,
917
1000
  justifyContent: "center",
918
1001
  ...transitionProps({
@@ -960,38 +1043,47 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
960
1043
  onPress: nativeDragEnabled && bounded ? void 0 : (e) => {
961
1044
  e?.stopPropagation?.();
962
1045
  if (suppressClickRef.current) return;
1046
+ setFocusedBarId(barKey);
963
1047
  onItemPress?.(task);
964
1048
  },
965
1049
  children: [
966
1050
  /* @__PURE__ */ jsx(GanttIntervalFill, {
967
1051
  fill,
1052
+ surface: canvasGround,
968
1053
  openStart: geom.openStart,
969
1054
  openEnd: geom.openEnd,
970
1055
  width: liveWidth,
971
1056
  rtl,
972
- ghost
1057
+ state: barState,
1058
+ dark,
1059
+ progress,
1060
+ lead: !ghost && !geom.openStart
1061
+ }),
1062
+ showLabel && /* @__PURE__ */ jsx(GanttBarLabel, {
1063
+ title: barTitle,
1064
+ fill,
1065
+ state: barState,
1066
+ surface: canvasGround,
1067
+ dark
973
1068
  }),
974
- progress != null && progress > 0 && /* @__PURE__ */ jsx(YStack, {
1069
+ labelOutside && /* @__PURE__ */ jsx(YStack, {
975
1070
  position: "absolute",
976
1071
  top: 0,
977
1072
  bottom: 0,
978
- ...rtl ? { right: 0 } : { left: 0 },
979
- width: `${progress}%`,
980
- backgroundColor: "color-12",
981
- opacity: .22,
1073
+ ...rtl ? { right: liveWidth } : { left: liveWidth },
1074
+ width: Math.max(0, chartWidth - geom.x - liveWidth),
1075
+ justifyContent: "center",
982
1076
  pointerEvents: "none",
983
- "data-gantt-progress": String(progress)
1077
+ ...{ "data-gantt-bar-outside-label": "true" },
1078
+ children: /* @__PURE__ */ jsx(Text, {
1079
+ ...knobProps.label,
1080
+ color: "$color",
1081
+ numberOfLines: 1,
1082
+ paddingHorizontal: knobProps.control.paddingHorizontal,
1083
+ "aria-hidden": true,
1084
+ children: barTitle
1085
+ })
984
1086
  }),
985
- showLabel && (ghost ? /* @__PURE__ */ jsx(Text$1, {
986
- ...knobProps.label,
987
- color: "$color",
988
- numberOfLines: 1,
989
- pointerEvents: "none",
990
- children: barTitle
991
- }) : /* @__PURE__ */ jsx(GanttBarLabel, {
992
- title: barTitle,
993
- fill
994
- })),
995
1087
  previewSpan && /* @__PURE__ */ jsx(XStack, {
996
1088
  position: "absolute",
997
1089
  top: -(axisHeight - 6),
@@ -1018,10 +1110,15 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
1018
1110
  bottom: 0,
1019
1111
  width: handleWidth,
1020
1112
  cursor: "ew-resize",
1021
- backgroundColor: `${showHandles ? "color-12" : "transparent"}`,
1022
- opacity: showHandles ? .28 : 0,
1023
- "data-gantt-resize-handle": physicalLeftEdge,
1024
- onPointerDown: (e) => handleResizePointerDown(task, ref, physicalLeftEdge, e)
1113
+ onPointerDown: (e) => handleResizePointerDown(task, ref, physicalLeftEdge, e),
1114
+ ...{ "data-gantt-resize-handle": physicalLeftEdge },
1115
+ children: /* @__PURE__ */ jsx(GanttGripDot, {
1116
+ left: gripShift(physicalLeftEdge) - EVENT_GRIP_DOT_PX / 2,
1117
+ top: (physicalLeftEdge === "start" ? height2 : 0) - EVENT_GRIP_DOT_PX / 2,
1118
+ color: fill,
1119
+ shown: showHandles,
1120
+ edge: physicalLeftEdge
1121
+ })
1025
1122
  }), /* @__PURE__ */ jsx(YStack, {
1026
1123
  position: "absolute",
1027
1124
  right: 0,
@@ -1029,10 +1126,15 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
1029
1126
  bottom: 0,
1030
1127
  width: handleWidth,
1031
1128
  cursor: "ew-resize",
1032
- backgroundColor: `${showHandles ? "color-12" : "transparent"}`,
1033
- opacity: showHandles ? .28 : 0,
1034
- "data-gantt-resize-handle": physicalRightEdge,
1035
- onPointerDown: (e) => handleResizePointerDown(task, ref, physicalRightEdge, e)
1129
+ onPointerDown: (e) => handleResizePointerDown(task, ref, physicalRightEdge, e),
1130
+ ...{ "data-gantt-resize-handle": physicalRightEdge },
1131
+ children: /* @__PURE__ */ jsx(GanttGripDot, {
1132
+ left: handleWidth + gripShift(physicalRightEdge) - EVENT_GRIP_DOT_PX / 2,
1133
+ top: (physicalRightEdge === "start" ? height2 : 0) - EVENT_GRIP_DOT_PX / 2,
1134
+ color: fill,
1135
+ shown: showHandles,
1136
+ edge: physicalRightEdge
1137
+ })
1036
1138
  })] }),
1037
1139
  nativeDragEnabled && bounded && /* @__PURE__ */ jsx(YStack, {
1038
1140
  position: "absolute",
@@ -1061,6 +1163,13 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
1061
1163
  snapUnit,
1062
1164
  firstDayOfWeek,
1063
1165
  label: `${barTitle}: ${edge === "start" ? t("Start") : t("End")}`,
1166
+ barWidth: liveWidth,
1167
+ barTop: barInset + (barHeight - height2) / 2,
1168
+ barBottom: barInset + (barHeight + height2) / 2,
1169
+ color: fill,
1170
+ shown: showHandles || activeInterval,
1171
+ gripOf: barKey,
1172
+ onHoverChange: (hovered) => setHoveredId((id) => hovered ? task.id : id === task.id ? null : id),
1064
1173
  valueText: span[edge] ? formatAbsoluteDate(span[edge]) : edge === "start" ? t("No start") : t("No end"),
1065
1174
  onPreview: (next) => setIntervalPreview((previous) => next ? {
1066
1175
  key: ref.key,
@@ -1336,6 +1445,16 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
1336
1445
  position: "relative",
1337
1446
  ...{ "data-gantt-body": "true" },
1338
1447
  children: [
1448
+ tasks.map((task, index) => hoveredId === task.id || resolveSpans(task).some((ref) => ref.key === focusedBarId) ? /* @__PURE__ */ jsx(YStack, {
1449
+ position: "absolute",
1450
+ left: 0,
1451
+ right: 0,
1452
+ top: index * rowHeight,
1453
+ height: rowHeight,
1454
+ backgroundColor: componentColors.interactive.background,
1455
+ pointerEvents: "none",
1456
+ ...{ "data-gantt-row-band": task.id }
1457
+ }, `row-band-${task.id}`) : null),
1339
1458
  weekends.map((col) => /* @__PURE__ */ jsx(YStack, {
1340
1459
  position: "absolute",
1341
1460
  ...canvasPos(col.x),
@@ -1367,17 +1486,26 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
1367
1486
  backgroundColor: tick.major ? majorGridColor : minorGridColor,
1368
1487
  pointerEvents: "none"
1369
1488
  }, tick.date.toISOString())),
1489
+ todayX !== null && /* @__PURE__ */ jsx(YStack, {
1490
+ position: "absolute",
1491
+ ...canvasPos(todayX - 1),
1492
+ top: 0,
1493
+ bottom: 0,
1494
+ width: 2,
1495
+ backgroundColor: componentColors.indicator.mark,
1496
+ opacity: .9,
1497
+ pointerEvents: "none",
1498
+ ...{ "data-gantt-today": "true" }
1499
+ }),
1370
1500
  tasks.map((task, index) => {
1371
1501
  const refs = resolveSpans(task);
1372
- const selected = refs.some((ref) => ref.key === focusedBarId);
1373
- const hovered = hoveredId === task.id;
1374
1502
  const last = index === tasks.length - 1;
1375
1503
  return /* @__PURE__ */ jsx(XStack, {
1376
1504
  height: rowHeight,
1377
1505
  position: "relative",
1378
1506
  ...last ? null : hairline.bottom,
1379
1507
  borderColor: minorGridColor,
1380
- backgroundColor: selected || hovered ? componentColors.interactive.background : "transparent",
1508
+ backgroundColor: "transparent",
1381
1509
  ...{
1382
1510
  onHoverIn: () => setHoveredId(task.id),
1383
1511
  onHoverOut: () => setHoveredId((id) => id === task.id ? null : id)
@@ -1397,18 +1525,6 @@ function GanttView({ tasks, zoom: initialZoom = "week", onZoomChange, onItemPres
1397
1525
  pointerEvents: "none",
1398
1526
  zIndex: 2,
1399
1527
  "data-gantt-marker": "true"
1400
- }),
1401
- todayX !== null && /* @__PURE__ */ jsx(YStack, {
1402
- position: "absolute",
1403
- ...canvasPos(todayX - 1),
1404
- top: 0,
1405
- bottom: 0,
1406
- width: 2,
1407
- backgroundColor: componentColors.indicator.mark,
1408
- opacity: .9,
1409
- pointerEvents: "none",
1410
- zIndex: 2,
1411
- ...{ "data-gantt-today": "true" }
1412
1528
  })
1413
1529
  ]
1414
1530
  })