@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
@@ -45,6 +45,7 @@ var import_i18n = require("../shared/i18n.native.js");
45
45
  var import_forms = require("@multiplatform.one/forms");
46
46
  var import_tamagui = require("tamagui");
47
47
  var import_ScrollView = require("../ScrollView.native.js");
48
+ var import_eventTint = require("./eventTint.native.js");
48
49
  var import_useDirection = require("../hooks/useDirection.native.js");
49
50
  var import_Text = require("../Text.native.js");
50
51
  var hairlineEnd = import_tamagui.isWeb ? {
@@ -226,10 +227,7 @@ var TOUCH_LONG_PRESS_MS = 300;
226
227
  var TOUCH_SLOP_PX = 8;
227
228
  var MIN_BLOCK_PX = 18;
228
229
  var RESIZE_ZONE_PX = import_theme.MIN_PRESS_TARGET;
229
- var GRIP_DOT_PX = 10;
230
- var EVENT_TINT_OPACITY = .22;
231
- var EVENT_SELECTED_TINT_OPACITY = .38;
232
- var EVENT_BAR_PX = 3;
230
+ var GRIP_DOT_PX = import_eventTint.EVENT_GRIP_DOT_PX;
233
231
  var GRIP_DOT_INSET_PX = 6;
234
232
  var MONTH_CHIP_MIN_PX = 24;
235
233
  function DayNumberDisc(param) {
@@ -457,6 +455,8 @@ function Calendar(param) {
457
455
  var { knobProps: nestedKnobs } = (0, import_theme.useResolvedKnobs)();
458
456
  var { px: nestedPx, hitSlop: nestedHitSlop, ...nestedBox } = nestedKnobs.nestedControl;
459
457
  var identity = (0, import_theme.useChartPalette)().single;
458
+ var theme = (0, import_tamagui.useTheme)();
459
+ var dark = (0, import_eventTint.useEventDark)();
460
460
  var onIdentity = (0, import_theme.useReadableTextOn)(identity);
461
461
  var onMark = (0, import_theme.useReadableTextOn)(import_componentColors.componentColors.indicator.mark);
462
462
  var calendarId = (0, import_react.useId)();
@@ -1350,13 +1350,15 @@ function Calendar(param) {
1350
1350
  children: renderEvent(event)
1351
1351
  }, event.id);
1352
1352
  }
1353
+ var chipPaint = (0, import_eventTint.eventPaint)(theme, event.color || identity, "rest", { dark });
1353
1354
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
1354
1355
  ...knobProps.borderRadius,
1355
1356
  position: "relative",
1356
- backgroundColor: "background",
1357
+ backgroundColor: chipPaint !== null && chipPaint !== void 0 ? chipPaint : "background",
1357
1358
  overflow: "hidden",
1359
+ "data-calendar-event-tint": "rest",
1358
1360
  padding: `${compact ? "1" : "2"}`,
1359
- paddingInlineStart: EVENT_BAR_PX + 4,
1361
+ paddingInlineStart: import_eventTint.EVENT_BAR_PX + 4,
1360
1362
  minHeight: MONTH_CHIP_MIN_PX,
1361
1363
  justifyContent: "center",
1362
1364
  opacity: `${lifted ? .4 : 1} hover:${lifted ? .4 : .9} press:0.8`,
@@ -1370,36 +1372,22 @@ function Calendar(param) {
1370
1372
  if (suppressClickRef.current) return;
1371
1373
  onEventClick === null || onEventClick === void 0 ? void 0 : onEventClick(event);
1372
1374
  },
1373
- children: [
1374
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1375
- position: "absolute",
1376
- top: 0,
1377
- bottom: 0,
1378
- left: 0,
1379
- right: 0,
1380
- backgroundColor: event.color || identity,
1381
- opacity: EVENT_TINT_OPACITY,
1382
- pointerEvents: "none",
1383
- "data-calendar-event-tint": "true"
1384
- }),
1385
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1386
- position: "absolute",
1387
- top: 0,
1388
- bottom: 0,
1389
- ...isRTL ? { right: 0 } : { left: 0 },
1390
- width: EVENT_BAR_PX,
1391
- backgroundColor: event.color || identity,
1392
- pointerEvents: "none",
1393
- "data-calendar-event-bar": "true"
1394
- }),
1395
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Text, {
1396
- ...knobProps.body,
1397
- fontSize: `${compact ? "1" : "2"}`,
1398
- numberOfLines: compact ? 1 : 2,
1399
- color: "color-12",
1400
- children: event.title
1401
- })
1402
- ]
1375
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1376
+ position: "absolute",
1377
+ top: 0,
1378
+ bottom: 0,
1379
+ ...isRTL ? { right: 0 } : { left: 0 },
1380
+ width: import_eventTint.EVENT_BAR_PX,
1381
+ backgroundColor: event.color || identity,
1382
+ pointerEvents: "none",
1383
+ "data-calendar-event-bar": "true"
1384
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Text, {
1385
+ ...knobProps.body,
1386
+ fontSize: `${compact ? "1" : "2"}`,
1387
+ numberOfLines: compact ? 1 : 2,
1388
+ color: (0, import_eventTint.eventLabelInk)(theme, event.color || identity, [chipPaint], dark),
1389
+ children: event.title
1390
+ })]
1403
1391
  }, event.id);
1404
1392
  }, [
1405
1393
  renderEvent,
@@ -1412,7 +1400,9 @@ function Calendar(param) {
1412
1400
  eventA11yProps,
1413
1401
  draggingEventId,
1414
1402
  identity,
1415
- isRTL
1403
+ isRTL,
1404
+ theme,
1405
+ dark
1416
1406
  ]);
1417
1407
  var MONTH_VISIBLE_EVENTS = 3;
1418
1408
  var renderMonthView = function renderMonthView2() {
@@ -1599,8 +1589,9 @@ function Calendar(param) {
1599
1589
  var selected = selectedId === event.id;
1600
1590
  var gripsShown = selected || focusedEventId === event.id;
1601
1591
  var fill = event.color || identity;
1602
- var titleInk = "color-12";
1603
- var timeInk = "color-11";
1592
+ var paint = (0, import_eventTint.eventPaint)(theme, fill, selected ? "selected" : "rest", { dark });
1593
+ var titleInk = (0, import_eventTint.eventLabelInk)(theme, fill, [paint], dark);
1594
+ var timeInk = (0, import_eventTint.eventLabelInk)(theme, fill, [paint], dark, "secondary");
1604
1595
  var gripDot = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1605
1596
  width: GRIP_DOT_PX,
1606
1597
  height: GRIP_DOT_PX,
@@ -1632,9 +1623,9 @@ function Calendar(param) {
1632
1623
  flex: 1,
1633
1624
  ...knobProps.borderRadius,
1634
1625
  position: "relative",
1635
- backgroundColor: "background",
1626
+ backgroundColor: paint !== null && paint !== void 0 ? paint : "background",
1636
1627
  padding: "1",
1637
- paddingInlineStart: EVENT_BAR_PX + 4,
1628
+ paddingInlineStart: import_eventTint.EVENT_BAR_PX + 4,
1638
1629
  overflow: "hidden",
1639
1630
  opacity: lifted ? .4 : 1,
1640
1631
  borderWidth: selected ? 2 : 1,
@@ -1676,41 +1667,28 @@ function Calendar(param) {
1676
1667
  ...hold.holding && holdCueId === event.id ? { scale: .97 } : {},
1677
1668
  "data-hold": hold.holding && holdCueId === event.id ? "progress" : void 0,
1678
1669
  "data-calendar-selected": selected ? "true" : void 0,
1679
- children: [
1680
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1681
- position: "absolute",
1682
- top: 0,
1683
- bottom: 0,
1684
- left: 0,
1685
- right: 0,
1686
- backgroundColor: fill,
1687
- opacity: selected ? EVENT_SELECTED_TINT_OPACITY : EVENT_TINT_OPACITY,
1688
- pointerEvents: "none",
1689
- "data-calendar-event-tint": "true"
1690
- }),
1691
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1692
- position: "absolute",
1693
- top: 0,
1694
- bottom: 0,
1695
- ...isRTL ? { right: 0 } : { left: 0 },
1696
- width: EVENT_BAR_PX,
1697
- backgroundColor: fill,
1698
- pointerEvents: "none",
1699
- "data-calendar-event-bar": "true"
1700
- }),
1701
- renderEvent ? renderEvent(event) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.Text, {
1702
- fontSize: "$1",
1703
- fontWeight: "600",
1704
- numberOfLines: 1,
1705
- color: titleInk,
1706
- children: event.title
1707
- }), blockHeight >= 34 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.Text, {
1708
- fontSize: "$1",
1709
- numberOfLines: 1,
1710
- color: timeInk,
1711
- children: (0, import_calendarMath.formatTimeRangeLabel)(start, end)
1712
- })] })
1713
- ]
1670
+ "data-calendar-event-tint": selected ? "selected" : "rest",
1671
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1672
+ position: "absolute",
1673
+ top: 0,
1674
+ bottom: 0,
1675
+ ...isRTL ? { right: 0 } : { left: 0 },
1676
+ width: import_eventTint.EVENT_BAR_PX,
1677
+ backgroundColor: fill,
1678
+ pointerEvents: "none",
1679
+ "data-calendar-event-bar": "true"
1680
+ }), renderEvent ? renderEvent(event) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.Text, {
1681
+ fontSize: "$1",
1682
+ fontWeight: "600",
1683
+ numberOfLines: 1,
1684
+ color: titleInk,
1685
+ children: event.title
1686
+ }), blockHeight >= 34 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.Text, {
1687
+ fontSize: "$1",
1688
+ numberOfLines: 1,
1689
+ color: timeInk,
1690
+ children: (0, import_calendarMath.formatTimeRangeLabel)(start, end)
1691
+ })] })]
1714
1692
  }),
1715
1693
  webResizeEnabled && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1716
1694
  position: "absolute",
@@ -45,6 +45,7 @@ var import_i18n = require("../shared/i18n.native.js");
45
45
  var import_forms = require("@multiplatform.one/forms");
46
46
  var import_tamagui = require("tamagui");
47
47
  var import_ScrollView = require("../ScrollView.native.js");
48
+ var import_eventTint = require("./eventTint.native.js");
48
49
  var import_useDirection = require("../hooks/useDirection.native.js");
49
50
  var import_Text = require("../Text.native.js");
50
51
  var hairlineEnd = import_tamagui.isWeb ? {
@@ -226,10 +227,7 @@ var TOUCH_LONG_PRESS_MS = 300;
226
227
  var TOUCH_SLOP_PX = 8;
227
228
  var MIN_BLOCK_PX = 18;
228
229
  var RESIZE_ZONE_PX = import_theme.MIN_PRESS_TARGET;
229
- var GRIP_DOT_PX = 10;
230
- var EVENT_TINT_OPACITY = .22;
231
- var EVENT_SELECTED_TINT_OPACITY = .38;
232
- var EVENT_BAR_PX = 3;
230
+ var GRIP_DOT_PX = import_eventTint.EVENT_GRIP_DOT_PX;
233
231
  var GRIP_DOT_INSET_PX = 6;
234
232
  var MONTH_CHIP_MIN_PX = 24;
235
233
  function DayNumberDisc(param) {
@@ -457,6 +455,8 @@ function Calendar(param) {
457
455
  var { knobProps: nestedKnobs } = (0, import_theme.useResolvedKnobs)();
458
456
  var { px: nestedPx, hitSlop: nestedHitSlop, ...nestedBox } = nestedKnobs.nestedControl;
459
457
  var identity = (0, import_theme.useChartPalette)().single;
458
+ var theme = (0, import_tamagui.useTheme)();
459
+ var dark = (0, import_eventTint.useEventDark)();
460
460
  var onIdentity = (0, import_theme.useReadableTextOn)(identity);
461
461
  var onMark = (0, import_theme.useReadableTextOn)(import_componentColors.componentColors.indicator.mark);
462
462
  var calendarId = (0, import_react.useId)();
@@ -1350,13 +1350,15 @@ function Calendar(param) {
1350
1350
  children: renderEvent(event)
1351
1351
  }, event.id);
1352
1352
  }
1353
+ var chipPaint = (0, import_eventTint.eventPaint)(theme, event.color || identity, "rest", { dark });
1353
1354
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
1354
1355
  ...knobProps.borderRadius,
1355
1356
  position: "relative",
1356
- backgroundColor: "background",
1357
+ backgroundColor: chipPaint !== null && chipPaint !== void 0 ? chipPaint : "background",
1357
1358
  overflow: "hidden",
1359
+ "data-calendar-event-tint": "rest",
1358
1360
  padding: `${compact ? "1" : "2"}`,
1359
- paddingInlineStart: EVENT_BAR_PX + 4,
1361
+ paddingInlineStart: import_eventTint.EVENT_BAR_PX + 4,
1360
1362
  minHeight: MONTH_CHIP_MIN_PX,
1361
1363
  justifyContent: "center",
1362
1364
  opacity: `${lifted ? .4 : 1} hover:${lifted ? .4 : .9} press:0.8`,
@@ -1370,36 +1372,22 @@ function Calendar(param) {
1370
1372
  if (suppressClickRef.current) return;
1371
1373
  onEventClick === null || onEventClick === void 0 ? void 0 : onEventClick(event);
1372
1374
  },
1373
- children: [
1374
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1375
- position: "absolute",
1376
- top: 0,
1377
- bottom: 0,
1378
- left: 0,
1379
- right: 0,
1380
- backgroundColor: event.color || identity,
1381
- opacity: EVENT_TINT_OPACITY,
1382
- pointerEvents: "none",
1383
- "data-calendar-event-tint": "true"
1384
- }),
1385
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1386
- position: "absolute",
1387
- top: 0,
1388
- bottom: 0,
1389
- ...isRTL ? { right: 0 } : { left: 0 },
1390
- width: EVENT_BAR_PX,
1391
- backgroundColor: event.color || identity,
1392
- pointerEvents: "none",
1393
- "data-calendar-event-bar": "true"
1394
- }),
1395
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Text, {
1396
- ...knobProps.body,
1397
- fontSize: `${compact ? "1" : "2"}`,
1398
- numberOfLines: compact ? 1 : 2,
1399
- color: "color-12",
1400
- children: event.title
1401
- })
1402
- ]
1375
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1376
+ position: "absolute",
1377
+ top: 0,
1378
+ bottom: 0,
1379
+ ...isRTL ? { right: 0 } : { left: 0 },
1380
+ width: import_eventTint.EVENT_BAR_PX,
1381
+ backgroundColor: event.color || identity,
1382
+ pointerEvents: "none",
1383
+ "data-calendar-event-bar": "true"
1384
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Text, {
1385
+ ...knobProps.body,
1386
+ fontSize: `${compact ? "1" : "2"}`,
1387
+ numberOfLines: compact ? 1 : 2,
1388
+ color: (0, import_eventTint.eventLabelInk)(theme, event.color || identity, [chipPaint], dark),
1389
+ children: event.title
1390
+ })]
1403
1391
  }, event.id);
1404
1392
  }, [
1405
1393
  renderEvent,
@@ -1412,7 +1400,9 @@ function Calendar(param) {
1412
1400
  eventA11yProps,
1413
1401
  draggingEventId,
1414
1402
  identity,
1415
- isRTL
1403
+ isRTL,
1404
+ theme,
1405
+ dark
1416
1406
  ]);
1417
1407
  var MONTH_VISIBLE_EVENTS = 3;
1418
1408
  var renderMonthView = function renderMonthView2() {
@@ -1599,8 +1589,9 @@ function Calendar(param) {
1599
1589
  var selected = selectedId === event.id;
1600
1590
  var gripsShown = selected || focusedEventId === event.id;
1601
1591
  var fill = event.color || identity;
1602
- var titleInk = "color-12";
1603
- var timeInk = "color-11";
1592
+ var paint = (0, import_eventTint.eventPaint)(theme, fill, selected ? "selected" : "rest", { dark });
1593
+ var titleInk = (0, import_eventTint.eventLabelInk)(theme, fill, [paint], dark);
1594
+ var timeInk = (0, import_eventTint.eventLabelInk)(theme, fill, [paint], dark, "secondary");
1604
1595
  var gripDot = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1605
1596
  width: GRIP_DOT_PX,
1606
1597
  height: GRIP_DOT_PX,
@@ -1632,9 +1623,9 @@ function Calendar(param) {
1632
1623
  flex: 1,
1633
1624
  ...knobProps.borderRadius,
1634
1625
  position: "relative",
1635
- backgroundColor: "background",
1626
+ backgroundColor: paint !== null && paint !== void 0 ? paint : "background",
1636
1627
  padding: "1",
1637
- paddingInlineStart: EVENT_BAR_PX + 4,
1628
+ paddingInlineStart: import_eventTint.EVENT_BAR_PX + 4,
1638
1629
  overflow: "hidden",
1639
1630
  opacity: lifted ? .4 : 1,
1640
1631
  borderWidth: selected ? 2 : 1,
@@ -1676,41 +1667,28 @@ function Calendar(param) {
1676
1667
  ...hold.holding && holdCueId === event.id ? { scale: .97 } : {},
1677
1668
  "data-hold": hold.holding && holdCueId === event.id ? "progress" : void 0,
1678
1669
  "data-calendar-selected": selected ? "true" : void 0,
1679
- children: [
1680
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1681
- position: "absolute",
1682
- top: 0,
1683
- bottom: 0,
1684
- left: 0,
1685
- right: 0,
1686
- backgroundColor: fill,
1687
- opacity: selected ? EVENT_SELECTED_TINT_OPACITY : EVENT_TINT_OPACITY,
1688
- pointerEvents: "none",
1689
- "data-calendar-event-tint": "true"
1690
- }),
1691
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1692
- position: "absolute",
1693
- top: 0,
1694
- bottom: 0,
1695
- ...isRTL ? { right: 0 } : { left: 0 },
1696
- width: EVENT_BAR_PX,
1697
- backgroundColor: fill,
1698
- pointerEvents: "none",
1699
- "data-calendar-event-bar": "true"
1700
- }),
1701
- renderEvent ? renderEvent(event) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.Text, {
1702
- fontSize: "$1",
1703
- fontWeight: "600",
1704
- numberOfLines: 1,
1705
- color: titleInk,
1706
- children: event.title
1707
- }), blockHeight >= 34 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.Text, {
1708
- fontSize: "$1",
1709
- numberOfLines: 1,
1710
- color: timeInk,
1711
- children: (0, import_calendarMath.formatTimeRangeLabel)(start, end)
1712
- })] })
1713
- ]
1670
+ "data-calendar-event-tint": selected ? "selected" : "rest",
1671
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1672
+ position: "absolute",
1673
+ top: 0,
1674
+ bottom: 0,
1675
+ ...isRTL ? { right: 0 } : { left: 0 },
1676
+ width: import_eventTint.EVENT_BAR_PX,
1677
+ backgroundColor: fill,
1678
+ pointerEvents: "none",
1679
+ "data-calendar-event-bar": "true"
1680
+ }), renderEvent ? renderEvent(event) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.Text, {
1681
+ fontSize: "$1",
1682
+ fontWeight: "600",
1683
+ numberOfLines: 1,
1684
+ color: titleInk,
1685
+ children: event.title
1686
+ }), blockHeight >= 34 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.Text, {
1687
+ fontSize: "$1",
1688
+ numberOfLines: 1,
1689
+ color: timeInk,
1690
+ children: (0, import_calendarMath.formatTimeRangeLabel)(start, end)
1691
+ })] })]
1714
1692
  }),
1715
1693
  webResizeEnabled && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
1716
1694
  position: "absolute",