@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,5 +1,5 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { Intent, MIN_PRESS_TARGET, ensureKeyboardModalityTracking, formatAbsoluteDate, formatDayOfMonth, formatMonthYear, hairline, hairlineWidth, keyboardFocusRingProps, transitionProps, useChartPalette, useReadableTextOn, useResolvedKnobs, wasKeyboardFocus } from "@multiplatform.one/theme";
2
+ import { Intent, MIN_PRESS_TARGET, ensureKeyboardModalityTracking, formatAbsoluteDate, formatDayOfMonth, formatMonthYear, hairline, hairlineWidth, keyboardFocusRingProps, transitionProps, useChartPalette, useResolvedKnobs, wasKeyboardFocus } from "@multiplatform.one/theme";
3
3
  import { componentColors, sectionHeading } from "../componentColors.native.js";
4
4
  import { AsyncBoundary } from "../layouts/AsyncBoundary.native.js";
5
5
  import { Skeleton } from "../Skeleton/index.native.js";
@@ -15,6 +15,8 @@ import { ScrollView as ScrollView$1 } from "../ScrollView.native.js";
15
15
  import { LinearGradient } from "tamagui/linear-gradient";
16
16
  import { normalizeColor } from "@tamagui/core";
17
17
  import { GanttDateGrip } from "./GanttDateGrip.native.js";
18
+ import { GanttGripDot } from "./GanttGripDot.native.js";
19
+ import { EVENT_BAR_PX, EVENT_GRIP_DOT_PX, eventLabelInk, eventPaint, eventSolid, eventStripPaint, useEventDark } from "./eventTint.native.js";
18
20
  import { intervalEdgeX, intervalViewport } from "./ganttIntervals.native.js";
19
21
  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.native.js";
20
22
  import { Text as Text$1 } from "../Text.native.js";
@@ -172,33 +174,58 @@ function BarIntentWrap(param) {
172
174
  children
173
175
  });
174
176
  }
177
+ var STRIP_INSET_PX = 4;
178
+ var STRIP_BOTTOM_PX = 2;
179
+ var STRIP_TRACK_OPACITY = .3;
175
180
  function GanttBarLabel(param) {
176
- var { title, fill } = param;
181
+ var { title, fill, state, surface, dark } = param;
182
+ var _ref;
177
183
  var { knobProps } = useResolvedKnobs();
178
- var ink = useReadableTextOn(fill);
184
+ var theme = useTheme();
185
+ var solid = dark || state === "ghost" ? null : eventSolid(theme, fill, state);
186
+ var ink = (_ref = solid === null || solid === void 0 ? void 0 : solid.ink) !== null && _ref !== void 0 ? _ref : eventLabelInk(theme, fill, [eventPaint(theme, fill, state, {
187
+ dark,
188
+ surface
189
+ })], dark, state === "ghost" ? "secondary" : "primary");
179
190
  return /* @__PURE__ */ jsx(Text, {
180
- color: ink !== null && ink !== void 0 ? ink : "$color-1",
191
+ color: ink,
181
192
  ...knobProps.label,
182
193
  numberOfLines: 1,
183
194
  paddingHorizontal: knobProps.control.paddingHorizontal,
184
195
  pointerEvents: "none",
185
196
  zIndex: 1,
186
197
  "aria-hidden": true,
198
+ "data-gantt-bar-ink": ink,
199
+ "data-gantt-ghost-label": state === "ghost" ? "true" : void 0,
187
200
  children: `${title}\u200B`
188
201
  });
189
202
  }
190
203
  function GanttIntervalFill(param) {
191
- var { fill, openStart, openEnd, width, rtl, ghost } = param;
192
- var _ref, _ref1, _normalizeColor;
204
+ var { fill, surface, openStart, openEnd, width, rtl, state, dark, progress, lead } = param;
205
+ var _ref, _ref1, _ref2, _normalizeColor;
193
206
  var _theme_fillKey;
194
207
  var { knobProps } = useResolvedKnobs();
195
208
  var theme = useTheme();
209
+ var values = theme;
196
210
  var fillKey = fill.startsWith("$") ? fill.slice(1) : fill;
197
- var color = (_ref = (_ref1 = (_theme_fillKey = theme[fillKey]) === null || _theme_fillKey === void 0 ? void 0 : _theme_fillKey.val) !== null && _ref1 !== void 0 ? _ref1 : getTokenValue(fillKey, "color")) !== null && _ref !== void 0 ? _ref : fill;
198
- var clear = (_normalizeColor = normalizeColor(String(color), 0)) !== null && _normalizeColor !== void 0 ? _normalizeColor : "transparent";
211
+ var color = String((_ref = (_ref1 = (_theme_fillKey = theme[fillKey]) === null || _theme_fillKey === void 0 ? void 0 : _theme_fillKey.val) !== null && _ref1 !== void 0 ? _ref1 : getTokenValue(fillKey, "color")) !== null && _ref !== void 0 ? _ref : fill);
212
+ var solid = dark || state === "ghost" ? null : eventSolid(values, fill, state);
213
+ var paint = (_ref2 = solid === null || solid === void 0 ? void 0 : solid.paint) !== null && _ref2 !== void 0 ? _ref2 : eventPaint(values, fill, state, {
214
+ dark,
215
+ surface
216
+ });
217
+ var body = paint !== null && paint !== void 0 ? paint : color;
218
+ var strip = solid ? solid.ink : paint ? eventStripPaint(values, fill, {
219
+ dark,
220
+ surface
221
+ }) : null;
222
+ var leading = lead && !solid;
223
+ var clear = (_normalizeColor = normalizeColor(body, 0)) !== null && _normalizeColor !== void 0 ? _normalizeColor : "transparent";
199
224
  var fadeWidth = Math.min(Number(knobProps.control.height), width / 2);
200
225
  var leftOpen = rtl ? openEnd : openStart;
201
226
  var rightOpen = rtl ? openStart : openEnd;
227
+ var stripStart = (leading ? EVENT_BAR_PX : 0) + STRIP_INSET_PX;
228
+ var stripWidth = progress != null ? Math.max(0, width - stripStart - STRIP_INSET_PX) * progress / 100 : 0;
202
229
  return /* @__PURE__ */ jsxs(YStack, {
203
230
  position: "absolute",
204
231
  top: 0,
@@ -206,32 +233,69 @@ function GanttIntervalFill(param) {
206
233
  left: 0,
207
234
  right: 0,
208
235
  pointerEvents: "none",
209
- opacity: ghost ? .25 : 1,
210
236
  overflow: "hidden",
211
237
  ...knobProps.borderRadius,
212
- children: [/* @__PURE__ */ jsx(YStack, {
213
- position: "absolute",
214
- top: 0,
215
- bottom: 0,
216
- left: leftOpen ? fadeWidth : 0,
217
- right: rightOpen ? fadeWidth : 0,
218
- backgroundColor: fill
219
- }), ["start", "end"].map(function(edge) {
220
- if (edge === "start" ? !openStart : !openEnd) return null;
221
- var left = edge === "start" !== rtl;
222
- return /* @__PURE__ */ jsx(LinearGradient, {
238
+ borderWidth: 0,
239
+ "data-gantt-bar-state": state,
240
+ "data-gantt-bar-paint": paint !== null && paint !== void 0 ? paint : void 0,
241
+ children: [
242
+ /* @__PURE__ */ jsx(YStack, {
223
243
  position: "absolute",
224
244
  top: 0,
225
245
  bottom: 0,
226
- ...left ? { left: 0 } : { right: 0 },
227
- width: fadeWidth,
228
- colors: left ? [clear, String(color)] : [String(color), clear],
229
- start: [0, 0],
230
- end: [1, 0],
231
- "data-gantt-open-fade": edge,
232
- [`data-gantt-open-${edge}`]: "true"
233
- }, edge);
234
- })]
246
+ left: leftOpen ? fadeWidth : 0,
247
+ right: rightOpen ? fadeWidth : 0,
248
+ backgroundColor: body,
249
+ "data-gantt-bar-fill": fill
250
+ }),
251
+ ["start", "end"].map(function(edge) {
252
+ if (edge === "start" ? !openStart : !openEnd) return null;
253
+ var left = edge === "start" !== rtl;
254
+ return /* @__PURE__ */ jsx(LinearGradient, {
255
+ position: "absolute",
256
+ top: 0,
257
+ bottom: 0,
258
+ ...left ? { left: 0 } : { right: 0 },
259
+ width: fadeWidth,
260
+ colors: left ? [clear, body] : [body, clear],
261
+ start: [0, 0],
262
+ end: [1, 0],
263
+ "data-gantt-open-fade": edge,
264
+ [`data-gantt-open-${edge}`]: "true"
265
+ }, edge);
266
+ }),
267
+ solid && progress != null && /* @__PURE__ */ jsx(YStack, {
268
+ position: "absolute",
269
+ bottom: STRIP_BOTTOM_PX,
270
+ height: EVENT_BAR_PX,
271
+ ...rtl ? { right: stripStart } : { left: stripStart },
272
+ width: Math.max(0, width - stripStart - STRIP_INSET_PX),
273
+ borderRadius: EVENT_BAR_PX / 2,
274
+ backgroundColor: solid.ink,
275
+ opacity: STRIP_TRACK_OPACITY,
276
+ "data-gantt-progress-track": solid.ink
277
+ }),
278
+ stripWidth > 0 && /* @__PURE__ */ jsx(YStack, {
279
+ position: "absolute",
280
+ bottom: STRIP_BOTTOM_PX,
281
+ height: EVENT_BAR_PX,
282
+ ...rtl ? { right: stripStart } : { left: stripStart },
283
+ width: stripWidth,
284
+ borderRadius: EVENT_BAR_PX / 2,
285
+ backgroundColor: strip !== null && strip !== void 0 ? strip : color,
286
+ "data-gantt-progress": String(progress),
287
+ "data-gantt-progress-paint": strip
288
+ }),
289
+ leading && /* @__PURE__ */ jsx(YStack, {
290
+ position: "absolute",
291
+ top: 0,
292
+ bottom: 0,
293
+ ...rtl ? { right: 0 } : { left: 0 },
294
+ width: EVENT_BAR_PX,
295
+ backgroundColor: color,
296
+ "data-gantt-bar-lead": "true"
297
+ })
298
+ ]
235
299
  });
236
300
  }
237
301
  function GanttTaskName(param) {
@@ -245,7 +309,12 @@ function GanttTaskName(param) {
245
309
  }
246
310
  function GanttView(param) {
247
311
  var { 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 } = param;
312
+ var _canvasTheme_background;
248
313
  var identity = useChartPalette().single;
314
+ var canvasTheme = useTheme();
315
+ var canvasBackground = (_canvasTheme_background = canvasTheme.background) === null || _canvasTheme_background === void 0 ? void 0 : _canvasTheme_background.val;
316
+ var canvasGround = typeof canvasBackground === "string" ? canvasBackground : void 0;
317
+ var dark = useEventDark();
249
318
  var { t } = useTranslation();
250
319
  var { knobProps } = useResolvedKnobs();
251
320
  var [zoom, setZoom] = useState(initialZoom);
@@ -644,6 +713,8 @@ function GanttView(param) {
644
713
  if (!session) return;
645
714
  if (session.liftTimer) clearTimeout(session.liftTimer);
646
715
  if (!session.dragging) {
716
+ setFocusedBarId(session.ref.key);
717
+ setBarKeyboardRing(false);
647
718
  onItemPress === null || onItemPress === void 0 ? void 0 : onItemPress(session.task);
648
719
  return;
649
720
  }
@@ -979,11 +1050,19 @@ function GanttView(param) {
979
1050
  var fill = barColor !== null && barColor !== void 0 ? barColor : barIntent && barIntent !== "accent" ? "$color-9" : identity;
980
1051
  var progress = bounded && !ghost ? clampProgress((_span_progress = span.progress) !== null && _span_progress !== void 0 ? _span_progress : task.progress) : null;
981
1052
  var showLabel = !geom.eternal && liveWidth >= 44;
1053
+ var labelOutside = !showLabel && !geom.eternal && !ghost && resolveSpans(task).length === 1;
982
1054
  var isBarFocused = focusedBarId === barKey;
983
1055
  var showHandles = hoveredId === task.id || sessionLive || isBarFocused;
1056
+ var barState = ghost ? "ghost" : showHandles || geom.eternal ? "selected" : "rest";
984
1057
  var handleWidth = bounded ? geom.width >= 24 ? 8 : geom.width >= 12 ? 4 : 0 : 0;
985
1058
  var physicalLeftEdge = rtl ? "end" : "start";
986
1059
  var physicalRightEdge = rtl ? "start" : "end";
1060
+ var logicalLeft = geom.x + liveTransformX * dirSign;
1061
+ var gripShift = function gripShift2(edge) {
1062
+ var at = edge === "start" ? logicalLeft : logicalLeft + liveWidth;
1063
+ var inside = Math.max(visibleWindow.start + EVENT_GRIP_DOT_PX / 2, Math.min(at, visibleWindow.end - EVENT_GRIP_DOT_PX / 2));
1064
+ return (inside - at) * dirSign;
1065
+ };
987
1066
  var squareStart = rtl ? {
988
1067
  borderTopRightRadius: 0,
989
1068
  borderBottomRightRadius: 0
@@ -1032,8 +1111,8 @@ function GanttView(param) {
1032
1111
  borderStyle: "dashed",
1033
1112
  borderWidth: hairlineWidth,
1034
1113
  borderColor: fill
1035
- } : {},
1036
- opacity: `${sessionLive ? .85 : geom.eternal ? .55 : 1} hover:${sessionLive ? .85 : geom.eternal ? .7 : .9} press:0.8`,
1114
+ } : { borderWidth: 0 },
1115
+ opacity: `${sessionLive ? .85 : 1} press:0.8`,
1037
1116
  cursor: bounded && webDragEnabled ? "grab" : onItemPress ? "pointer" : void 0,
1038
1117
  justifyContent: "center",
1039
1118
  ...transitionProps({
@@ -1092,38 +1171,47 @@ function GanttView(param) {
1092
1171
  var _e_stopPropagation;
1093
1172
  e === null || e === void 0 ? void 0 : (_e_stopPropagation = e.stopPropagation) === null || _e_stopPropagation === void 0 ? void 0 : _e_stopPropagation.call(e);
1094
1173
  if (suppressClickRef.current) return;
1174
+ setFocusedBarId(barKey);
1095
1175
  onItemPress === null || onItemPress === void 0 ? void 0 : onItemPress(task);
1096
1176
  },
1097
1177
  children: [
1098
1178
  /* @__PURE__ */ jsx(GanttIntervalFill, {
1099
1179
  fill,
1180
+ surface: canvasGround,
1100
1181
  openStart: geom.openStart,
1101
1182
  openEnd: geom.openEnd,
1102
1183
  width: liveWidth,
1103
1184
  rtl,
1104
- ghost
1185
+ state: barState,
1186
+ dark,
1187
+ progress,
1188
+ lead: !ghost && !geom.openStart
1189
+ }),
1190
+ showLabel && /* @__PURE__ */ jsx(GanttBarLabel, {
1191
+ title: barTitle,
1192
+ fill,
1193
+ state: barState,
1194
+ surface: canvasGround,
1195
+ dark
1105
1196
  }),
1106
- progress != null && progress > 0 && /* @__PURE__ */ jsx(YStack, {
1197
+ labelOutside && /* @__PURE__ */ jsx(YStack, {
1107
1198
  position: "absolute",
1108
1199
  top: 0,
1109
1200
  bottom: 0,
1110
- ...rtl ? { right: 0 } : { left: 0 },
1111
- width: `${progress}%`,
1112
- backgroundColor: "color-12",
1113
- opacity: .22,
1201
+ ...rtl ? { right: liveWidth } : { left: liveWidth },
1202
+ width: Math.max(0, chartWidth - geom.x - liveWidth),
1203
+ justifyContent: "center",
1114
1204
  pointerEvents: "none",
1115
- "data-gantt-progress": String(progress)
1205
+ "data-gantt-bar-outside-label": "true",
1206
+ children: /* @__PURE__ */ jsx(Text, {
1207
+ ...knobProps.label,
1208
+ color: "$color",
1209
+ numberOfLines: 1,
1210
+ paddingHorizontal: knobProps.control.paddingHorizontal,
1211
+ "aria-hidden": true,
1212
+ children: barTitle
1213
+ })
1116
1214
  }),
1117
- showLabel && (ghost ? /* @__PURE__ */ jsx(Text$1, {
1118
- ...knobProps.label,
1119
- color: "$color",
1120
- numberOfLines: 1,
1121
- pointerEvents: "none",
1122
- children: barTitle
1123
- }) : /* @__PURE__ */ jsx(GanttBarLabel, {
1124
- title: barTitle,
1125
- fill
1126
- })),
1127
1215
  previewSpan && /* @__PURE__ */ jsx(XStack, {
1128
1216
  position: "absolute",
1129
1217
  top: -(axisHeight - 6),
@@ -1150,12 +1238,17 @@ function GanttView(param) {
1150
1238
  bottom: 0,
1151
1239
  width: handleWidth,
1152
1240
  cursor: "ew-resize",
1153
- backgroundColor: `${showHandles ? "color-12" : "transparent"}`,
1154
- opacity: showHandles ? .28 : 0,
1155
- "data-gantt-resize-handle": physicalLeftEdge,
1156
1241
  onPointerDown: function onPointerDown(e) {
1157
1242
  return handleResizePointerDown(task, ref, physicalLeftEdge, e);
1158
- }
1243
+ },
1244
+ "data-gantt-resize-handle": physicalLeftEdge,
1245
+ children: /* @__PURE__ */ jsx(GanttGripDot, {
1246
+ left: gripShift(physicalLeftEdge) - EVENT_GRIP_DOT_PX / 2,
1247
+ top: (physicalLeftEdge === "start" ? height2 : 0) - EVENT_GRIP_DOT_PX / 2,
1248
+ color: fill,
1249
+ shown: showHandles,
1250
+ edge: physicalLeftEdge
1251
+ })
1159
1252
  }), /* @__PURE__ */ jsx(YStack, {
1160
1253
  position: "absolute",
1161
1254
  right: 0,
@@ -1163,12 +1256,17 @@ function GanttView(param) {
1163
1256
  bottom: 0,
1164
1257
  width: handleWidth,
1165
1258
  cursor: "ew-resize",
1166
- backgroundColor: `${showHandles ? "color-12" : "transparent"}`,
1167
- opacity: showHandles ? .28 : 0,
1168
- "data-gantt-resize-handle": physicalRightEdge,
1169
1259
  onPointerDown: function onPointerDown(e) {
1170
1260
  return handleResizePointerDown(task, ref, physicalRightEdge, e);
1171
- }
1261
+ },
1262
+ "data-gantt-resize-handle": physicalRightEdge,
1263
+ children: /* @__PURE__ */ jsx(GanttGripDot, {
1264
+ left: handleWidth + gripShift(physicalRightEdge) - EVENT_GRIP_DOT_PX / 2,
1265
+ top: (physicalRightEdge === "start" ? height2 : 0) - EVENT_GRIP_DOT_PX / 2,
1266
+ color: fill,
1267
+ shown: showHandles,
1268
+ edge: physicalRightEdge
1269
+ })
1172
1270
  })] }),
1173
1271
  nativeDragEnabled && bounded && /* @__PURE__ */ jsx(YStack, {
1174
1272
  position: "absolute",
@@ -1197,6 +1295,17 @@ function GanttView(param) {
1197
1295
  snapUnit,
1198
1296
  firstDayOfWeek,
1199
1297
  label: `${barTitle}: ${edge === "start" ? t("Start") : t("End")}`,
1298
+ barWidth: liveWidth,
1299
+ barTop: barInset + (barHeight - height2) / 2,
1300
+ barBottom: barInset + (barHeight + height2) / 2,
1301
+ color: fill,
1302
+ shown: showHandles || activeInterval,
1303
+ gripOf: barKey,
1304
+ onHoverChange: function onHoverChange(hovered) {
1305
+ return setHoveredId(function(id) {
1306
+ return hovered ? task.id : id === task.id ? null : id;
1307
+ });
1308
+ },
1200
1309
  valueText: span[edge] ? formatAbsoluteDate(span[edge]) : edge === "start" ? t("No start") : t("No end"),
1201
1310
  onPreview: function onPreview(next) {
1202
1311
  return setIntervalPreview(function(previous) {
@@ -1497,6 +1606,20 @@ function GanttView(param) {
1497
1606
  position: "relative",
1498
1607
  "data-gantt-body": "true",
1499
1608
  children: [
1609
+ tasks.map(function(task, index) {
1610
+ return hoveredId === task.id || resolveSpans(task).some(function(ref) {
1611
+ return ref.key === focusedBarId;
1612
+ }) ? /* @__PURE__ */ jsx(YStack, {
1613
+ position: "absolute",
1614
+ left: 0,
1615
+ right: 0,
1616
+ top: index * rowHeight,
1617
+ height: rowHeight,
1618
+ backgroundColor: componentColors.interactive.background,
1619
+ pointerEvents: "none",
1620
+ "data-gantt-row-band": task.id
1621
+ }, `row-band-${task.id}`) : null;
1622
+ }),
1500
1623
  weekends.map(function(col) {
1501
1624
  return /* @__PURE__ */ jsx(YStack, {
1502
1625
  position: "absolute",
@@ -1532,19 +1655,26 @@ function GanttView(param) {
1532
1655
  pointerEvents: "none"
1533
1656
  }, tick.date.toISOString());
1534
1657
  }),
1658
+ todayX !== null && /* @__PURE__ */ jsx(YStack, {
1659
+ position: "absolute",
1660
+ ...canvasPos(todayX - 1),
1661
+ top: 0,
1662
+ bottom: 0,
1663
+ width: 2,
1664
+ backgroundColor: componentColors.indicator.mark,
1665
+ opacity: .9,
1666
+ pointerEvents: "none",
1667
+ "data-gantt-today": "true"
1668
+ }),
1535
1669
  tasks.map(function(task, index) {
1536
1670
  var refs = resolveSpans(task);
1537
- var selected = refs.some(function(ref) {
1538
- return ref.key === focusedBarId;
1539
- });
1540
- var hovered = hoveredId === task.id;
1541
1671
  var last = index === tasks.length - 1;
1542
1672
  return /* @__PURE__ */ jsx(XStack, {
1543
1673
  height: rowHeight,
1544
1674
  position: "relative",
1545
1675
  ...last ? null : hairline.bottom,
1546
1676
  borderColor: minorGridColor,
1547
- backgroundColor: selected || hovered ? componentColors.interactive.background : "transparent",
1677
+ backgroundColor: "transparent",
1548
1678
  ...{
1549
1679
  onHoverIn: function onHoverIn() {
1550
1680
  return setHoveredId(task.id);
@@ -1572,18 +1702,6 @@ function GanttView(param) {
1572
1702
  pointerEvents: "none",
1573
1703
  zIndex: 2,
1574
1704
  "data-gantt-marker": "true"
1575
- }),
1576
- todayX !== null && /* @__PURE__ */ jsx(YStack, {
1577
- position: "absolute",
1578
- ...canvasPos(todayX - 1),
1579
- top: 0,
1580
- bottom: 0,
1581
- width: 2,
1582
- backgroundColor: componentColors.indicator.mark,
1583
- opacity: .9,
1584
- pointerEvents: "none",
1585
- zIndex: 2,
1586
- "data-gantt-today": "true"
1587
1705
  })
1588
1706
  ]
1589
1707
  })