@multiplatform.one/components 10.1.1 → 10.1.3

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 (130) hide show
  1. package/dist/cjs/MiddleEllipsisText/index.native.cjs +5 -1
  2. package/dist/cjs/MiddleEllipsisText/index.native.js +5 -1
  3. package/dist/cjs/MiddleEllipsisText/index.native.js.map +1 -1
  4. package/dist/cjs/Tabs/index.cjs +3 -2
  5. package/dist/cjs/Tabs/index.native.cjs +3 -2
  6. package/dist/cjs/Tabs/index.native.js +3 -2
  7. package/dist/cjs/Tabs/index.native.js.map +1 -1
  8. package/dist/cjs/layouts/timeline.cjs +0 -1
  9. package/dist/cjs/layouts/timeline.native.cjs +0 -1
  10. package/dist/cjs/layouts/timeline.native.js +0 -1
  11. package/dist/cjs/layouts/timeline.native.js.map +1 -1
  12. package/dist/cjs/views/Calendar.cjs +54 -76
  13. package/dist/cjs/views/Calendar.native.cjs +54 -76
  14. package/dist/cjs/views/Calendar.native.js +54 -76
  15. package/dist/cjs/views/Calendar.native.js.map +1 -1
  16. package/dist/cjs/views/Gantt.cjs +185 -69
  17. package/dist/cjs/views/Gantt.native.cjs +190 -72
  18. package/dist/cjs/views/Gantt.native.js +190 -72
  19. package/dist/cjs/views/Gantt.native.js.map +1 -1
  20. package/dist/cjs/views/GanttDateGrip.cjs +20 -14
  21. package/dist/cjs/views/GanttDateGrip.native.cjs +24 -14
  22. package/dist/cjs/views/GanttDateGrip.native.js +24 -14
  23. package/dist/cjs/views/GanttDateGrip.native.js.map +1 -1
  24. package/dist/cjs/views/GanttGripDot.cjs +43 -0
  25. package/dist/cjs/views/GanttGripDot.native.cjs +46 -0
  26. package/dist/cjs/views/GanttGripDot.native.js +48 -0
  27. package/dist/cjs/views/GanttGripDot.native.js.map +1 -0
  28. package/dist/cjs/views/eventTint.cjs +242 -0
  29. package/dist/cjs/views/eventTint.native.cjs +346 -0
  30. package/dist/cjs/views/eventTint.native.js +348 -0
  31. package/dist/cjs/views/eventTint.native.js.map +1 -0
  32. package/dist/esm/MiddleEllipsisText/index.native.js +2 -1
  33. package/dist/esm/MiddleEllipsisText/index.native.js.map +1 -1
  34. package/dist/esm/Tabs/index.mjs +3 -2
  35. package/dist/esm/Tabs/index.mjs.map +1 -1
  36. package/dist/esm/Tabs/index.native.js +3 -2
  37. package/dist/esm/Tabs/index.native.js.map +1 -1
  38. package/dist/esm/layouts/timeline.mjs +0 -1
  39. package/dist/esm/layouts/timeline.mjs.map +1 -1
  40. package/dist/esm/layouts/timeline.native.js +0 -1
  41. package/dist/esm/layouts/timeline.native.js.map +1 -1
  42. package/dist/esm/views/Calendar.mjs +53 -75
  43. package/dist/esm/views/Calendar.mjs.map +1 -1
  44. package/dist/esm/views/Calendar.native.js +53 -75
  45. package/dist/esm/views/Calendar.native.js.map +1 -1
  46. package/dist/esm/views/Gantt.mjs +186 -70
  47. package/dist/esm/views/Gantt.mjs.map +1 -1
  48. package/dist/esm/views/Gantt.native.js +191 -73
  49. package/dist/esm/views/Gantt.native.js.map +1 -1
  50. package/dist/esm/views/GanttDateGrip.mjs +21 -15
  51. package/dist/esm/views/GanttDateGrip.mjs.map +1 -1
  52. package/dist/esm/views/GanttDateGrip.native.js +25 -15
  53. package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
  54. package/dist/esm/views/GanttGripDot.mjs +24 -0
  55. package/dist/esm/views/GanttGripDot.mjs.map +1 -0
  56. package/dist/esm/views/GanttGripDot.native.js +25 -0
  57. package/dist/esm/views/GanttGripDot.native.js.map +1 -0
  58. package/dist/esm/views/eventTint.mjs +196 -0
  59. package/dist/esm/views/eventTint.mjs.map +1 -0
  60. package/dist/esm/views/eventTint.native.js +298 -0
  61. package/dist/esm/views/eventTint.native.js.map +1 -0
  62. package/dist/jsx/MiddleEllipsisText/index.native.cjs +5 -1
  63. package/dist/jsx/MiddleEllipsisText/index.native.js +5 -1
  64. package/dist/jsx/MiddleEllipsisText/index.native.js.map +1 -1
  65. package/dist/jsx/Tabs/index.mjs +3 -2
  66. package/dist/jsx/Tabs/index.mjs.map +1 -1
  67. package/dist/jsx/Tabs/index.native.cjs +3 -2
  68. package/dist/jsx/Tabs/index.native.js +3 -2
  69. package/dist/jsx/Tabs/index.native.js.map +1 -1
  70. package/dist/jsx/layouts/timeline.mjs +0 -1
  71. package/dist/jsx/layouts/timeline.mjs.map +1 -1
  72. package/dist/jsx/layouts/timeline.native.cjs +0 -1
  73. package/dist/jsx/layouts/timeline.native.js +0 -1
  74. package/dist/jsx/layouts/timeline.native.js.map +1 -1
  75. package/dist/jsx/views/Calendar.mjs +53 -75
  76. package/dist/jsx/views/Calendar.mjs.map +1 -1
  77. package/dist/jsx/views/Calendar.native.cjs +54 -76
  78. package/dist/jsx/views/Calendar.native.js +54 -76
  79. package/dist/jsx/views/Calendar.native.js.map +1 -1
  80. package/dist/jsx/views/Gantt.mjs +186 -70
  81. package/dist/jsx/views/Gantt.mjs.map +1 -1
  82. package/dist/jsx/views/Gantt.native.cjs +190 -72
  83. package/dist/jsx/views/Gantt.native.js +190 -72
  84. package/dist/jsx/views/Gantt.native.js.map +1 -1
  85. package/dist/jsx/views/GanttDateGrip.mjs +21 -15
  86. package/dist/jsx/views/GanttDateGrip.mjs.map +1 -1
  87. package/dist/jsx/views/GanttDateGrip.native.cjs +24 -14
  88. package/dist/jsx/views/GanttDateGrip.native.js +24 -14
  89. package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
  90. package/dist/jsx/views/GanttGripDot.mjs +24 -0
  91. package/dist/jsx/views/GanttGripDot.mjs.map +1 -0
  92. package/dist/jsx/views/GanttGripDot.native.cjs +46 -0
  93. package/dist/jsx/views/GanttGripDot.native.js +48 -0
  94. package/dist/jsx/views/GanttGripDot.native.js.map +1 -0
  95. package/dist/jsx/views/eventTint.mjs +196 -0
  96. package/dist/jsx/views/eventTint.mjs.map +1 -0
  97. package/dist/jsx/views/eventTint.native.cjs +346 -0
  98. package/dist/jsx/views/eventTint.native.js +348 -0
  99. package/dist/jsx/views/eventTint.native.js.map +1 -0
  100. package/package.json +7 -7
  101. package/src/MiddleEllipsisText/MiddleEllipsisText.native.spec.tsx +9 -0
  102. package/src/MiddleEllipsisText/index.native.tsx +1 -0
  103. package/src/Tabs/Tabs.measurement.spec.tsx +40 -1
  104. package/src/Tabs/index.tsx +3 -2
  105. package/src/hoverTouchPath.coarse.spec.tsx +28 -4
  106. package/src/layouts/timeline.replyInset.spec.tsx +72 -22
  107. package/src/layouts/timeline.tsx +0 -1
  108. package/src/views/Calendar.eventFill.spec.tsx +44 -9
  109. package/src/views/Calendar.tsx +23 -31
  110. package/src/views/Gantt.barInk.spec.tsx +257 -0
  111. package/src/views/Gantt.grips.spec.tsx +226 -0
  112. package/src/views/Gantt.tint.palette.spec.ts +288 -0
  113. package/src/views/Gantt.tsx +224 -65
  114. package/src/views/GanttDateGrip.native.spec.tsx +8 -0
  115. package/src/views/GanttDateGrip.tsx +28 -17
  116. package/src/views/GanttGripDot.tsx +36 -0
  117. package/src/views/dataIdentity.spec.tsx +29 -13
  118. package/src/views/eventTint.ts +305 -0
  119. package/types/MiddleEllipsisText/index.native.d.ts +1 -0
  120. package/types/MiddleEllipsisText/index.native.d.ts.map +1 -1
  121. package/types/Tabs/index.d.ts.map +1 -1
  122. package/types/layouts/timeline.d.ts.map +1 -1
  123. package/types/views/Calendar.d.ts.map +1 -1
  124. package/types/views/Gantt.d.ts.map +1 -1
  125. package/types/views/GanttDateGrip.d.ts +7 -0
  126. package/types/views/GanttDateGrip.d.ts.map +1 -1
  127. package/types/views/GanttGripDot.d.ts +9 -0
  128. package/types/views/GanttGripDot.d.ts.map +1 -0
  129. package/types/views/eventTint.d.ts +72 -0
  130. package/types/views/eventTint.d.ts.map +1 -0
@@ -47,6 +47,8 @@ var import_linear_gradient = require("tamagui/linear-gradient");
47
47
  var import_core = require("@tamagui/core");
48
48
  var import_tamagui2 = require("tamagui");
49
49
  var import_GanttDateGrip = require("./GanttDateGrip.native.js");
50
+ var import_GanttGripDot = require("./GanttGripDot.native.js");
51
+ var import_eventTint = require("./eventTint.native.js");
50
52
  var import_ganttIntervals = require("./ganttIntervals.native.js");
51
53
  var import_ganttMath = require("./ganttMath.native.js");
52
54
  var import_Text = require("../Text.native.js");
@@ -203,33 +205,58 @@ function BarIntentWrap(param) {
203
205
  children
204
206
  });
205
207
  }
208
+ var STRIP_INSET_PX = 4;
209
+ var STRIP_BOTTOM_PX = 2;
210
+ var STRIP_TRACK_OPACITY = .3;
206
211
  function GanttBarLabel(param) {
207
- var { title, fill } = param;
212
+ var { title, fill, state, surface, dark } = param;
213
+ var _ref;
208
214
  var { knobProps } = (0, import_theme.useResolvedKnobs)();
209
- var ink = (0, import_theme.useReadableTextOn)(fill);
215
+ var theme = (0, import_tamagui2.useTheme)();
216
+ var solid = dark || state === "ghost" ? null : (0, import_eventTint.eventSolid)(theme, fill, state);
217
+ var ink = (_ref = solid === null || solid === void 0 ? void 0 : solid.ink) !== null && _ref !== void 0 ? _ref : (0, import_eventTint.eventLabelInk)(theme, fill, [(0, import_eventTint.eventPaint)(theme, fill, state, {
218
+ dark,
219
+ surface
220
+ })], dark, state === "ghost" ? "secondary" : "primary");
210
221
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Text, {
211
- color: ink !== null && ink !== void 0 ? ink : "$color-1",
222
+ color: ink,
212
223
  ...knobProps.label,
213
224
  numberOfLines: 1,
214
225
  paddingHorizontal: knobProps.control.paddingHorizontal,
215
226
  pointerEvents: "none",
216
227
  zIndex: 1,
217
228
  "aria-hidden": true,
229
+ "data-gantt-bar-ink": ink,
230
+ "data-gantt-ghost-label": state === "ghost" ? "true" : void 0,
218
231
  children: `${title}\u200B`
219
232
  });
220
233
  }
221
234
  function GanttIntervalFill(param) {
222
- var { fill, openStart, openEnd, width, rtl, ghost } = param;
223
- var _ref, _ref1, _normalizeColor;
235
+ var { fill, surface, openStart, openEnd, width, rtl, state, dark, progress, lead } = param;
236
+ var _ref, _ref1, _ref2, _normalizeColor;
224
237
  var _theme_fillKey;
225
238
  var { knobProps } = (0, import_theme.useResolvedKnobs)();
226
239
  var theme = (0, import_tamagui2.useTheme)();
240
+ var values = theme;
227
241
  var fillKey = fill.startsWith("$") ? fill.slice(1) : fill;
228
- var color = (_ref = (_ref1 = (_theme_fillKey = theme[fillKey]) === null || _theme_fillKey === void 0 ? void 0 : _theme_fillKey.val) !== null && _ref1 !== void 0 ? _ref1 : (0, import_tamagui2.getTokenValue)(fillKey, "color")) !== null && _ref !== void 0 ? _ref : fill;
229
- var clear = (_normalizeColor = (0, import_core.normalizeColor)(String(color), 0)) !== null && _normalizeColor !== void 0 ? _normalizeColor : "transparent";
242
+ var color = String((_ref = (_ref1 = (_theme_fillKey = theme[fillKey]) === null || _theme_fillKey === void 0 ? void 0 : _theme_fillKey.val) !== null && _ref1 !== void 0 ? _ref1 : (0, import_tamagui2.getTokenValue)(fillKey, "color")) !== null && _ref !== void 0 ? _ref : fill);
243
+ var solid = dark || state === "ghost" ? null : (0, import_eventTint.eventSolid)(values, fill, state);
244
+ var paint = (_ref2 = solid === null || solid === void 0 ? void 0 : solid.paint) !== null && _ref2 !== void 0 ? _ref2 : (0, import_eventTint.eventPaint)(values, fill, state, {
245
+ dark,
246
+ surface
247
+ });
248
+ var body = paint !== null && paint !== void 0 ? paint : color;
249
+ var strip = solid ? solid.ink : paint ? (0, import_eventTint.eventStripPaint)(values, fill, {
250
+ dark,
251
+ surface
252
+ }) : null;
253
+ var leading = lead && !solid;
254
+ var clear = (_normalizeColor = (0, import_core.normalizeColor)(body, 0)) !== null && _normalizeColor !== void 0 ? _normalizeColor : "transparent";
230
255
  var fadeWidth = Math.min(Number(knobProps.control.height), width / 2);
231
256
  var leftOpen = rtl ? openEnd : openStart;
232
257
  var rightOpen = rtl ? openStart : openEnd;
258
+ var stripStart = (leading ? import_eventTint.EVENT_BAR_PX : 0) + STRIP_INSET_PX;
259
+ var stripWidth = progress != null ? Math.max(0, width - stripStart - STRIP_INSET_PX) * progress / 100 : 0;
233
260
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
234
261
  position: "absolute",
235
262
  top: 0,
@@ -237,32 +264,69 @@ function GanttIntervalFill(param) {
237
264
  left: 0,
238
265
  right: 0,
239
266
  pointerEvents: "none",
240
- opacity: ghost ? .25 : 1,
241
267
  overflow: "hidden",
242
268
  ...knobProps.borderRadius,
243
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
244
- position: "absolute",
245
- top: 0,
246
- bottom: 0,
247
- left: leftOpen ? fadeWidth : 0,
248
- right: rightOpen ? fadeWidth : 0,
249
- backgroundColor: fill
250
- }), ["start", "end"].map(function(edge) {
251
- if (edge === "start" ? !openStart : !openEnd) return null;
252
- var left = edge === "start" !== rtl;
253
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
269
+ borderWidth: 0,
270
+ "data-gantt-bar-state": state,
271
+ "data-gantt-bar-paint": paint !== null && paint !== void 0 ? paint : void 0,
272
+ children: [
273
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
254
274
  position: "absolute",
255
275
  top: 0,
256
276
  bottom: 0,
257
- ...left ? { left: 0 } : { right: 0 },
258
- width: fadeWidth,
259
- colors: left ? [clear, String(color)] : [String(color), clear],
260
- start: [0, 0],
261
- end: [1, 0],
262
- "data-gantt-open-fade": edge,
263
- [`data-gantt-open-${edge}`]: "true"
264
- }, edge);
265
- })]
277
+ left: leftOpen ? fadeWidth : 0,
278
+ right: rightOpen ? fadeWidth : 0,
279
+ backgroundColor: body,
280
+ "data-gantt-bar-fill": fill
281
+ }),
282
+ ["start", "end"].map(function(edge) {
283
+ if (edge === "start" ? !openStart : !openEnd) return null;
284
+ var left = edge === "start" !== rtl;
285
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
286
+ position: "absolute",
287
+ top: 0,
288
+ bottom: 0,
289
+ ...left ? { left: 0 } : { right: 0 },
290
+ width: fadeWidth,
291
+ colors: left ? [clear, body] : [body, clear],
292
+ start: [0, 0],
293
+ end: [1, 0],
294
+ "data-gantt-open-fade": edge,
295
+ [`data-gantt-open-${edge}`]: "true"
296
+ }, edge);
297
+ }),
298
+ solid && progress != null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
299
+ position: "absolute",
300
+ bottom: STRIP_BOTTOM_PX,
301
+ height: import_eventTint.EVENT_BAR_PX,
302
+ ...rtl ? { right: stripStart } : { left: stripStart },
303
+ width: Math.max(0, width - stripStart - STRIP_INSET_PX),
304
+ borderRadius: import_eventTint.EVENT_BAR_PX / 2,
305
+ backgroundColor: solid.ink,
306
+ opacity: STRIP_TRACK_OPACITY,
307
+ "data-gantt-progress-track": solid.ink
308
+ }),
309
+ stripWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
310
+ position: "absolute",
311
+ bottom: STRIP_BOTTOM_PX,
312
+ height: import_eventTint.EVENT_BAR_PX,
313
+ ...rtl ? { right: stripStart } : { left: stripStart },
314
+ width: stripWidth,
315
+ borderRadius: import_eventTint.EVENT_BAR_PX / 2,
316
+ backgroundColor: strip !== null && strip !== void 0 ? strip : color,
317
+ "data-gantt-progress": String(progress),
318
+ "data-gantt-progress-paint": strip
319
+ }),
320
+ leading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
321
+ position: "absolute",
322
+ top: 0,
323
+ bottom: 0,
324
+ ...rtl ? { right: 0 } : { left: 0 },
325
+ width: import_eventTint.EVENT_BAR_PX,
326
+ backgroundColor: color,
327
+ "data-gantt-bar-lead": "true"
328
+ })
329
+ ]
266
330
  });
267
331
  }
268
332
  function GanttTaskName(param) {
@@ -276,7 +340,12 @@ function GanttTaskName(param) {
276
340
  }
277
341
  function GanttView(param) {
278
342
  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;
343
+ var _canvasTheme_background;
279
344
  var identity = (0, import_theme.useChartPalette)().single;
345
+ var canvasTheme = (0, import_tamagui2.useTheme)();
346
+ var canvasBackground = (_canvasTheme_background = canvasTheme.background) === null || _canvasTheme_background === void 0 ? void 0 : _canvasTheme_background.val;
347
+ var canvasGround = typeof canvasBackground === "string" ? canvasBackground : void 0;
348
+ var dark = (0, import_eventTint.useEventDark)();
280
349
  var { t } = (0, import_i18n.useTranslation)();
281
350
  var { knobProps } = (0, import_theme.useResolvedKnobs)();
282
351
  var [zoom, setZoom] = (0, import_react.useState)(initialZoom);
@@ -675,6 +744,8 @@ function GanttView(param) {
675
744
  if (!session) return;
676
745
  if (session.liftTimer) clearTimeout(session.liftTimer);
677
746
  if (!session.dragging) {
747
+ setFocusedBarId(session.ref.key);
748
+ setBarKeyboardRing(false);
678
749
  onItemPress === null || onItemPress === void 0 ? void 0 : onItemPress(session.task);
679
750
  return;
680
751
  }
@@ -1010,11 +1081,19 @@ function GanttView(param) {
1010
1081
  var fill = barColor !== null && barColor !== void 0 ? barColor : barIntent && barIntent !== "accent" ? "$color-9" : identity;
1011
1082
  var progress = bounded && !ghost ? clampProgress((_span_progress = span.progress) !== null && _span_progress !== void 0 ? _span_progress : task.progress) : null;
1012
1083
  var showLabel = !geom.eternal && liveWidth >= 44;
1084
+ var labelOutside = !showLabel && !geom.eternal && !ghost && resolveSpans(task).length === 1;
1013
1085
  var isBarFocused = focusedBarId === barKey;
1014
1086
  var showHandles = hoveredId === task.id || sessionLive || isBarFocused;
1087
+ var barState = ghost ? "ghost" : showHandles || geom.eternal ? "selected" : "rest";
1015
1088
  var handleWidth = bounded ? geom.width >= 24 ? 8 : geom.width >= 12 ? 4 : 0 : 0;
1016
1089
  var physicalLeftEdge = rtl ? "end" : "start";
1017
1090
  var physicalRightEdge = rtl ? "start" : "end";
1091
+ var logicalLeft = geom.x + liveTransformX * dirSign;
1092
+ var gripShift = function gripShift2(edge) {
1093
+ var at = edge === "start" ? logicalLeft : logicalLeft + liveWidth;
1094
+ var inside = Math.max(visibleWindow.start + import_eventTint.EVENT_GRIP_DOT_PX / 2, Math.min(at, visibleWindow.end - import_eventTint.EVENT_GRIP_DOT_PX / 2));
1095
+ return (inside - at) * dirSign;
1096
+ };
1018
1097
  var squareStart = rtl ? {
1019
1098
  borderTopRightRadius: 0,
1020
1099
  borderBottomRightRadius: 0
@@ -1063,8 +1142,8 @@ function GanttView(param) {
1063
1142
  borderStyle: "dashed",
1064
1143
  borderWidth: import_theme.hairlineWidth,
1065
1144
  borderColor: fill
1066
- } : {},
1067
- opacity: `${sessionLive ? .85 : geom.eternal ? .55 : 1} hover:${sessionLive ? .85 : geom.eternal ? .7 : .9} press:0.8`,
1145
+ } : { borderWidth: 0 },
1146
+ opacity: `${sessionLive ? .85 : 1} press:0.8`,
1068
1147
  cursor: bounded && webDragEnabled ? "grab" : onItemPress ? "pointer" : void 0,
1069
1148
  justifyContent: "center",
1070
1149
  ...(0, import_theme.transitionProps)({
@@ -1123,38 +1202,47 @@ function GanttView(param) {
1123
1202
  var _e_stopPropagation;
1124
1203
  e === null || e === void 0 ? void 0 : (_e_stopPropagation = e.stopPropagation) === null || _e_stopPropagation === void 0 ? void 0 : _e_stopPropagation.call(e);
1125
1204
  if (suppressClickRef.current) return;
1205
+ setFocusedBarId(barKey);
1126
1206
  onItemPress === null || onItemPress === void 0 ? void 0 : onItemPress(task);
1127
1207
  },
1128
1208
  children: [
1129
1209
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GanttIntervalFill, {
1130
1210
  fill,
1211
+ surface: canvasGround,
1131
1212
  openStart: geom.openStart,
1132
1213
  openEnd: geom.openEnd,
1133
1214
  width: liveWidth,
1134
1215
  rtl,
1135
- ghost
1216
+ state: barState,
1217
+ dark,
1218
+ progress,
1219
+ lead: !ghost && !geom.openStart
1220
+ }),
1221
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GanttBarLabel, {
1222
+ title: barTitle,
1223
+ fill,
1224
+ state: barState,
1225
+ surface: canvasGround,
1226
+ dark
1136
1227
  }),
1137
- progress != null && progress > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1228
+ labelOutside && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1138
1229
  position: "absolute",
1139
1230
  top: 0,
1140
1231
  bottom: 0,
1141
- ...rtl ? { right: 0 } : { left: 0 },
1142
- width: `${progress}%`,
1143
- backgroundColor: "color-12",
1144
- opacity: .22,
1232
+ ...rtl ? { right: liveWidth } : { left: liveWidth },
1233
+ width: Math.max(0, chartWidth - geom.x - liveWidth),
1234
+ justifyContent: "center",
1145
1235
  pointerEvents: "none",
1146
- "data-gantt-progress": String(progress)
1236
+ "data-gantt-bar-outside-label": "true",
1237
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Text, {
1238
+ ...knobProps.label,
1239
+ color: "$color",
1240
+ numberOfLines: 1,
1241
+ paddingHorizontal: knobProps.control.paddingHorizontal,
1242
+ "aria-hidden": true,
1243
+ children: barTitle
1244
+ })
1147
1245
  }),
1148
- showLabel && (ghost ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.Text, {
1149
- ...knobProps.label,
1150
- color: "$color",
1151
- numberOfLines: 1,
1152
- pointerEvents: "none",
1153
- children: barTitle
1154
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GanttBarLabel, {
1155
- title: barTitle,
1156
- fill
1157
- })),
1158
1246
  previewSpan && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
1159
1247
  position: "absolute",
1160
1248
  top: -(axisHeight - 6),
@@ -1181,12 +1269,17 @@ function GanttView(param) {
1181
1269
  bottom: 0,
1182
1270
  width: handleWidth,
1183
1271
  cursor: "ew-resize",
1184
- backgroundColor: `${showHandles ? "color-12" : "transparent"}`,
1185
- opacity: showHandles ? .28 : 0,
1186
- "data-gantt-resize-handle": physicalLeftEdge,
1187
1272
  onPointerDown: function onPointerDown(e) {
1188
1273
  return handleResizePointerDown(task, ref, physicalLeftEdge, e);
1189
- }
1274
+ },
1275
+ "data-gantt-resize-handle": physicalLeftEdge,
1276
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GanttGripDot.GanttGripDot, {
1277
+ left: gripShift(physicalLeftEdge) - import_eventTint.EVENT_GRIP_DOT_PX / 2,
1278
+ top: (physicalLeftEdge === "start" ? height2 : 0) - import_eventTint.EVENT_GRIP_DOT_PX / 2,
1279
+ color: fill,
1280
+ shown: showHandles,
1281
+ edge: physicalLeftEdge
1282
+ })
1190
1283
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1191
1284
  position: "absolute",
1192
1285
  right: 0,
@@ -1194,12 +1287,17 @@ function GanttView(param) {
1194
1287
  bottom: 0,
1195
1288
  width: handleWidth,
1196
1289
  cursor: "ew-resize",
1197
- backgroundColor: `${showHandles ? "color-12" : "transparent"}`,
1198
- opacity: showHandles ? .28 : 0,
1199
- "data-gantt-resize-handle": physicalRightEdge,
1200
1290
  onPointerDown: function onPointerDown(e) {
1201
1291
  return handleResizePointerDown(task, ref, physicalRightEdge, e);
1202
- }
1292
+ },
1293
+ "data-gantt-resize-handle": physicalRightEdge,
1294
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GanttGripDot.GanttGripDot, {
1295
+ left: handleWidth + gripShift(physicalRightEdge) - import_eventTint.EVENT_GRIP_DOT_PX / 2,
1296
+ top: (physicalRightEdge === "start" ? height2 : 0) - import_eventTint.EVENT_GRIP_DOT_PX / 2,
1297
+ color: fill,
1298
+ shown: showHandles,
1299
+ edge: physicalRightEdge
1300
+ })
1203
1301
  })] }),
1204
1302
  nativeDragEnabled && bounded && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1205
1303
  position: "absolute",
@@ -1228,6 +1326,17 @@ function GanttView(param) {
1228
1326
  snapUnit,
1229
1327
  firstDayOfWeek,
1230
1328
  label: `${barTitle}: ${edge === "start" ? t("Start") : t("End")}`,
1329
+ barWidth: liveWidth,
1330
+ barTop: barInset + (barHeight - height2) / 2,
1331
+ barBottom: barInset + (barHeight + height2) / 2,
1332
+ color: fill,
1333
+ shown: showHandles || activeInterval,
1334
+ gripOf: barKey,
1335
+ onHoverChange: function onHoverChange(hovered) {
1336
+ return setHoveredId(function(id) {
1337
+ return hovered ? task.id : id === task.id ? null : id;
1338
+ });
1339
+ },
1231
1340
  valueText: span[edge] ? (0, import_theme.formatAbsoluteDate)(span[edge]) : edge === "start" ? t("No start") : t("No end"),
1232
1341
  onPreview: function onPreview(next) {
1233
1342
  return setIntervalPreview(function(previous) {
@@ -1528,6 +1637,20 @@ function GanttView(param) {
1528
1637
  position: "relative",
1529
1638
  "data-gantt-body": "true",
1530
1639
  children: [
1640
+ tasks.map(function(task, index) {
1641
+ return hoveredId === task.id || resolveSpans(task).some(function(ref) {
1642
+ return ref.key === focusedBarId;
1643
+ }) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1644
+ position: "absolute",
1645
+ left: 0,
1646
+ right: 0,
1647
+ top: index * rowHeight,
1648
+ height: rowHeight,
1649
+ backgroundColor: import_componentColors.componentColors.interactive.background,
1650
+ pointerEvents: "none",
1651
+ "data-gantt-row-band": task.id
1652
+ }, `row-band-${task.id}`) : null;
1653
+ }),
1531
1654
  weekends.map(function(col) {
1532
1655
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1533
1656
  position: "absolute",
@@ -1563,19 +1686,26 @@ function GanttView(param) {
1563
1686
  pointerEvents: "none"
1564
1687
  }, tick.date.toISOString());
1565
1688
  }),
1689
+ todayX !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1690
+ position: "absolute",
1691
+ ...canvasPos(todayX - 1),
1692
+ top: 0,
1693
+ bottom: 0,
1694
+ width: 2,
1695
+ backgroundColor: import_componentColors.componentColors.indicator.mark,
1696
+ opacity: .9,
1697
+ pointerEvents: "none",
1698
+ "data-gantt-today": "true"
1699
+ }),
1566
1700
  tasks.map(function(task, index) {
1567
1701
  var refs = resolveSpans(task);
1568
- var selected = refs.some(function(ref) {
1569
- return ref.key === focusedBarId;
1570
- });
1571
- var hovered = hoveredId === task.id;
1572
1702
  var last = index === tasks.length - 1;
1573
1703
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
1574
1704
  height: rowHeight,
1575
1705
  position: "relative",
1576
1706
  ...last ? null : import_theme.hairline.bottom,
1577
1707
  borderColor: minorGridColor,
1578
- backgroundColor: selected || hovered ? import_componentColors.componentColors.interactive.background : "transparent",
1708
+ backgroundColor: "transparent",
1579
1709
  ...{
1580
1710
  onHoverIn: function onHoverIn() {
1581
1711
  return setHoveredId(task.id);
@@ -1603,18 +1733,6 @@ function GanttView(param) {
1603
1733
  pointerEvents: "none",
1604
1734
  zIndex: 2,
1605
1735
  "data-gantt-marker": "true"
1606
- }),
1607
- todayX !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1608
- position: "absolute",
1609
- ...canvasPos(todayX - 1),
1610
- top: 0,
1611
- bottom: 0,
1612
- width: 2,
1613
- backgroundColor: import_componentColors.componentColors.indicator.mark,
1614
- opacity: .9,
1615
- pointerEvents: "none",
1616
- zIndex: 2,
1617
- "data-gantt-today": "true"
1618
1736
  })
1619
1737
  ]
1620
1738
  })