@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.
- package/dist/cjs/layouts/timeline.cjs +0 -1
- package/dist/cjs/layouts/timeline.native.cjs +0 -1
- package/dist/cjs/layouts/timeline.native.js +0 -1
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/views/Calendar.cjs +54 -76
- package/dist/cjs/views/Calendar.native.cjs +54 -76
- package/dist/cjs/views/Calendar.native.js +54 -76
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/Gantt.cjs +185 -69
- package/dist/cjs/views/Gantt.native.cjs +190 -72
- package/dist/cjs/views/Gantt.native.js +190 -72
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/GanttDateGrip.cjs +20 -14
- package/dist/cjs/views/GanttDateGrip.native.cjs +24 -14
- package/dist/cjs/views/GanttDateGrip.native.js +24 -14
- package/dist/cjs/views/GanttDateGrip.native.js.map +1 -1
- package/dist/cjs/views/GanttGripDot.cjs +43 -0
- package/dist/cjs/views/GanttGripDot.native.cjs +46 -0
- package/dist/cjs/views/GanttGripDot.native.js +48 -0
- package/dist/cjs/views/GanttGripDot.native.js.map +1 -0
- package/dist/cjs/views/eventTint.cjs +242 -0
- package/dist/cjs/views/eventTint.native.cjs +346 -0
- package/dist/cjs/views/eventTint.native.js +348 -0
- package/dist/cjs/views/eventTint.native.js.map +1 -0
- package/dist/esm/layouts/timeline.mjs +0 -1
- package/dist/esm/layouts/timeline.mjs.map +1 -1
- package/dist/esm/layouts/timeline.native.js +0 -1
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/views/Calendar.mjs +53 -75
- package/dist/esm/views/Calendar.mjs.map +1 -1
- package/dist/esm/views/Calendar.native.js +53 -75
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Gantt.mjs +186 -70
- package/dist/esm/views/Gantt.mjs.map +1 -1
- package/dist/esm/views/Gantt.native.js +191 -73
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/GanttDateGrip.mjs +21 -15
- package/dist/esm/views/GanttDateGrip.mjs.map +1 -1
- package/dist/esm/views/GanttDateGrip.native.js +25 -15
- package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
- package/dist/esm/views/GanttGripDot.mjs +24 -0
- package/dist/esm/views/GanttGripDot.mjs.map +1 -0
- package/dist/esm/views/GanttGripDot.native.js +25 -0
- package/dist/esm/views/GanttGripDot.native.js.map +1 -0
- package/dist/esm/views/eventTint.mjs +196 -0
- package/dist/esm/views/eventTint.mjs.map +1 -0
- package/dist/esm/views/eventTint.native.js +298 -0
- package/dist/esm/views/eventTint.native.js.map +1 -0
- package/dist/jsx/layouts/timeline.mjs +0 -1
- package/dist/jsx/layouts/timeline.mjs.map +1 -1
- package/dist/jsx/layouts/timeline.native.cjs +0 -1
- package/dist/jsx/layouts/timeline.native.js +0 -1
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/views/Calendar.mjs +53 -75
- package/dist/jsx/views/Calendar.mjs.map +1 -1
- package/dist/jsx/views/Calendar.native.cjs +54 -76
- package/dist/jsx/views/Calendar.native.js +54 -76
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Gantt.mjs +186 -70
- package/dist/jsx/views/Gantt.mjs.map +1 -1
- package/dist/jsx/views/Gantt.native.cjs +190 -72
- package/dist/jsx/views/Gantt.native.js +190 -72
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/GanttDateGrip.mjs +21 -15
- package/dist/jsx/views/GanttDateGrip.mjs.map +1 -1
- package/dist/jsx/views/GanttDateGrip.native.cjs +24 -14
- package/dist/jsx/views/GanttDateGrip.native.js +24 -14
- package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
- package/dist/jsx/views/GanttGripDot.mjs +24 -0
- package/dist/jsx/views/GanttGripDot.mjs.map +1 -0
- package/dist/jsx/views/GanttGripDot.native.cjs +46 -0
- package/dist/jsx/views/GanttGripDot.native.js +48 -0
- package/dist/jsx/views/GanttGripDot.native.js.map +1 -0
- package/dist/jsx/views/eventTint.mjs +196 -0
- package/dist/jsx/views/eventTint.mjs.map +1 -0
- package/dist/jsx/views/eventTint.native.cjs +346 -0
- package/dist/jsx/views/eventTint.native.js +348 -0
- package/dist/jsx/views/eventTint.native.js.map +1 -0
- package/package.json +7 -7
- package/src/hoverTouchPath.coarse.spec.tsx +28 -4
- package/src/layouts/timeline.replyInset.spec.tsx +72 -22
- package/src/layouts/timeline.tsx +0 -1
- package/src/views/Calendar.eventFill.spec.tsx +44 -9
- package/src/views/Calendar.tsx +23 -31
- package/src/views/Gantt.barInk.spec.tsx +257 -0
- package/src/views/Gantt.grips.spec.tsx +226 -0
- package/src/views/Gantt.tint.palette.spec.ts +288 -0
- package/src/views/Gantt.tsx +224 -65
- package/src/views/GanttDateGrip.native.spec.tsx +8 -0
- package/src/views/GanttDateGrip.tsx +28 -17
- package/src/views/GanttGripDot.tsx +36 -0
- package/src/views/dataIdentity.spec.tsx +29 -13
- package/src/views/eventTint.ts +305 -0
- package/types/layouts/timeline.d.ts.map +1 -1
- package/types/views/Calendar.d.ts.map +1 -1
- package/types/views/Gantt.d.ts.map +1 -1
- package/types/views/GanttDateGrip.d.ts +7 -0
- package/types/views/GanttDateGrip.d.ts.map +1 -1
- package/types/views/GanttGripDot.d.ts +9 -0
- package/types/views/GanttGripDot.d.ts.map +1 -0
- package/types/views/eventTint.d.ts +72 -0
- 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 =
|
|
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
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
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
|
|
1603
|
-
var
|
|
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
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
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 =
|
|
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
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
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
|
|
1603
|
-
var
|
|
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
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
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",
|