calendarkit-prov2 2.0.8 → 2.0.10
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/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +566 -449
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +485 -368
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React18 from 'react';
|
|
2
|
+
import React18__default, { useState, useEffect, useRef, useCallback, useId, useMemo, useLayoutEffect } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import { useDraggable, useSensors, useSensor, PointerSensor, DndContext, DragOverlay, useDroppable } from '@dnd-kit/core';
|
|
5
5
|
import { createSnapModifier, restrictToWindowEdges } from '@dnd-kit/modifiers';
|
|
@@ -44,10 +44,10 @@ var buttonVariants = cva(
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
var Button =
|
|
47
|
+
var Button = React18.forwardRef(
|
|
48
48
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
49
49
|
const Comp = "button";
|
|
50
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ React18.createElement(
|
|
51
51
|
Comp,
|
|
52
52
|
{
|
|
53
53
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -1617,7 +1617,7 @@ var CalendarHeader = ({
|
|
|
1617
1617
|
{ key: "agenda", icon: ListTodo }
|
|
1618
1618
|
];
|
|
1619
1619
|
const currentLang = LANGUAGE_META[language] ?? LANGUAGE_META["tr"];
|
|
1620
|
-
return /* @__PURE__ */
|
|
1620
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col md:flex-row items-center justify-between px-3 md:px-5 py-3 border-b-[0px] border-border/50 bg-gradient-to-r from-background via-background to-muted/20 gap-3 md:gap-0 min-h-[64px]" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2 w-full md:w-auto justify-between md:justify-start" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2 md:gap-3" }, /* @__PURE__ */ React18__default.createElement(
|
|
1621
1621
|
Button,
|
|
1622
1622
|
{
|
|
1623
1623
|
variant: "ghost",
|
|
@@ -1625,8 +1625,8 @@ var CalendarHeader = ({
|
|
|
1625
1625
|
className: "text-muted-foreground hover:text-foreground hover:bg-accent/80 rounded-xl h-10 w-10 transition-all duration-200",
|
|
1626
1626
|
onClick: onMenuClick
|
|
1627
1627
|
},
|
|
1628
|
-
/* @__PURE__ */
|
|
1629
|
-
), /* @__PURE__ */
|
|
1628
|
+
/* @__PURE__ */ React18__default.createElement(Menu, { className: "h-5 w-5" })
|
|
1629
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
1630
1630
|
Button,
|
|
1631
1631
|
{
|
|
1632
1632
|
variant: "outline",
|
|
@@ -1634,15 +1634,15 @@ var CalendarHeader = ({
|
|
|
1634
1634
|
className: "h-9 px-5 rounded-xl text-sm font-medium hidden sm:inline-flex border-[0.5px] border-border/60 hover:border-primary/40 hover:bg-primary/5 hover:text-primary transition-all duration-200"
|
|
1635
1635
|
},
|
|
1636
1636
|
translations.today
|
|
1637
|
-
), onCreateEvent && /* @__PURE__ */
|
|
1637
|
+
), onCreateEvent && /* @__PURE__ */ React18__default.createElement("div", { className: "relative group hidden sm:block" }, /* @__PURE__ */ React18__default.createElement(
|
|
1638
1638
|
Button,
|
|
1639
1639
|
{
|
|
1640
1640
|
onClick: onCreateEvent,
|
|
1641
1641
|
size: "icon",
|
|
1642
1642
|
className: "h-9 w-9 rounded-xl shadow-sm shadow-primary/20 transition-all duration-200"
|
|
1643
1643
|
},
|
|
1644
|
-
/* @__PURE__ */
|
|
1645
|
-
), /* @__PURE__ */
|
|
1644
|
+
/* @__PURE__ */ React18__default.createElement(Plus, { className: "h-4 w-4" })
|
|
1645
|
+
), /* @__PURE__ */ React18__default.createElement("div", { className: "pointer-events-none absolute left-1/2 -translate-x-1/2 top-full mt-2 z-50 opacity-0 group-hover:opacity-100 transition-opacity duration-150" }, /* @__PURE__ */ React18__default.createElement("div", { className: "bg-popover text-popover-foreground text-xs font-medium px-2.5 py-1.5 rounded-lg shadow-md border border-border/60 whitespace-nowrap" }, translations.createEvent ?? translations.create), /* @__PURE__ */ React18__default.createElement("div", { className: "absolute -top-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-popover border-l border-t border-border/60 rotate-45" }))), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center bg-muted/40 rounded-xl p-0.5" }, /* @__PURE__ */ React18__default.createElement(
|
|
1646
1646
|
Button,
|
|
1647
1647
|
{
|
|
1648
1648
|
variant: "ghost",
|
|
@@ -1650,8 +1650,8 @@ var CalendarHeader = ({
|
|
|
1650
1650
|
onClick: onPrev,
|
|
1651
1651
|
className: "rounded-lg h-8 w-8 hover:bg-background/80 transition-all duration-200"
|
|
1652
1652
|
},
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
), /* @__PURE__ */
|
|
1653
|
+
/* @__PURE__ */ React18__default.createElement(ChevronLeft, { className: "h-4 w-4 text-muted-foreground" })
|
|
1654
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
1655
1655
|
Button,
|
|
1656
1656
|
{
|
|
1657
1657
|
variant: "ghost",
|
|
@@ -1659,8 +1659,8 @@ var CalendarHeader = ({
|
|
|
1659
1659
|
onClick: onNext,
|
|
1660
1660
|
className: "rounded-lg h-8 w-8 hover:bg-background/80 transition-all duration-200"
|
|
1661
1661
|
},
|
|
1662
|
-
/* @__PURE__ */
|
|
1663
|
-
)), /* @__PURE__ */
|
|
1662
|
+
/* @__PURE__ */ React18__default.createElement(ChevronRight, { className: "h-4 w-4 text-muted-foreground" })
|
|
1663
|
+
)), /* @__PURE__ */ React18__default.createElement("div", { className: "ml-2 md:ml-4 hidden sm:block" }, /* @__PURE__ */ React18__default.createElement("h2", { className: "text-lg md:text-xl font-semibold text-foreground whitespace-nowrap capitalize tracking-tight" }, format(currentDate, "MMMM yyyy", { locale })))), /* @__PURE__ */ React18__default.createElement("div", { className: "sm:hidden" }, /* @__PURE__ */ React18__default.createElement("h2", { className: "text-lg font-semibold text-foreground whitespace-nowrap capitalize tracking-tight" }, format(currentDate, "MMMM yyyy", { locale })))), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2 md:gap-3 w-full md:w-auto justify-end" }, onLanguageChange && !hideLanguageSwitcher && /* @__PURE__ */ React18__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__default.createElement(
|
|
1664
1664
|
"button",
|
|
1665
1665
|
{
|
|
1666
1666
|
ref: langButtonRef,
|
|
@@ -1672,20 +1672,20 @@ var CalendarHeader = ({
|
|
|
1672
1672
|
),
|
|
1673
1673
|
title: currentLang.english
|
|
1674
1674
|
},
|
|
1675
|
-
/* @__PURE__ */
|
|
1676
|
-
/* @__PURE__ */
|
|
1677
|
-
/* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ React18__default.createElement(Globe, { className: "h-3.5 w-3.5" }),
|
|
1676
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "text-base leading-none" }, currentLang.flag),
|
|
1677
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "hidden sm:inline text-xs font-semibold uppercase tracking-wider" }, language),
|
|
1678
|
+
/* @__PURE__ */ React18__default.createElement(ChevronDown, { className: cn("h-3.5 w-3.5 transition-transform duration-200", isLangOpen && "rotate-180") })
|
|
1679
1679
|
), isLangOpen && langPos && createPortal(
|
|
1680
|
-
/* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
1681
1681
|
"div",
|
|
1682
1682
|
{
|
|
1683
1683
|
ref: langDropdownRef,
|
|
1684
1684
|
className: "fixed w-52 bg-background border border-border/60 rounded-2xl shadow-2xl z-[9999] overflow-hidden py-1.5",
|
|
1685
1685
|
style: { top: langPos.top, left: langPos.left, width: LANG_DROPDOWN_WIDTH }
|
|
1686
1686
|
},
|
|
1687
|
-
/* @__PURE__ */
|
|
1688
|
-
/* @__PURE__ */
|
|
1687
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "px-3 py-2 border-b border-border/40 mb-1" }, /* @__PURE__ */ React18__default.createElement("p", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, "Language / Dil")),
|
|
1688
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "max-h-72 overflow-y-auto" }, Object.entries(LANGUAGE_META).map(([code, meta]) => /* @__PURE__ */ React18__default.createElement(
|
|
1689
1689
|
"button",
|
|
1690
1690
|
{
|
|
1691
1691
|
key: code,
|
|
@@ -1699,13 +1699,13 @@ var CalendarHeader = ({
|
|
|
1699
1699
|
language === code ? "bg-primary/10 text-primary font-semibold" : "text-foreground"
|
|
1700
1700
|
)
|
|
1701
1701
|
},
|
|
1702
|
-
/* @__PURE__ */
|
|
1703
|
-
/* @__PURE__ */
|
|
1704
|
-
language === code && /* @__PURE__ */
|
|
1702
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "text-lg leading-none w-6 text-center" }, meta.flag),
|
|
1703
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 text-left" }, /* @__PURE__ */ React18__default.createElement("div", { className: cn("font-medium", meta.rtl && "text-right") }, meta.native), /* @__PURE__ */ React18__default.createElement("div", { className: "text-xs text-muted-foreground" }, meta.english)),
|
|
1704
|
+
language === code && /* @__PURE__ */ React18__default.createElement("div", { className: "w-2 h-2 rounded-full bg-primary shrink-0" })
|
|
1705
1705
|
)))
|
|
1706
1706
|
),
|
|
1707
1707
|
document.body
|
|
1708
|
-
)), onThemeToggle && /* @__PURE__ */
|
|
1708
|
+
)), onThemeToggle && /* @__PURE__ */ React18__default.createElement(
|
|
1709
1709
|
Button,
|
|
1710
1710
|
{
|
|
1711
1711
|
variant: "ghost",
|
|
@@ -1713,16 +1713,16 @@ var CalendarHeader = ({
|
|
|
1713
1713
|
className: "rounded-xl h-9 w-9 hover:bg-accent/80 transition-all duration-200",
|
|
1714
1714
|
onClick: onThemeToggle
|
|
1715
1715
|
},
|
|
1716
|
-
isDarkMode ? /* @__PURE__ */
|
|
1717
|
-
), typeof eventCount === "number" && !hideViewSwitcher && /* @__PURE__ */
|
|
1716
|
+
isDarkMode ? /* @__PURE__ */ React18__default.createElement(Sun, { className: "h-4 w-4 text-amber-500" }) : /* @__PURE__ */ React18__default.createElement(Moon, { className: "h-4 w-4 text-muted-foreground" })
|
|
1717
|
+
), typeof eventCount === "number" && !hideViewSwitcher && /* @__PURE__ */ React18__default.createElement(
|
|
1718
1718
|
"div",
|
|
1719
1719
|
{
|
|
1720
1720
|
className: "flex items-center gap-1.5 h-8 px-3 rounded-xl bg-primary/10 text-primary text-xs font-semibold tabular-nums select-none border border-primary/20 shadow-sm shadow-primary/10",
|
|
1721
1721
|
title: `${eventCount} event${eventCount !== 1 ? "s" : ""}`
|
|
1722
1722
|
},
|
|
1723
|
-
/* @__PURE__ */
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
), !hideViewSwitcher && /* @__PURE__ */
|
|
1723
|
+
/* @__PURE__ */ React18__default.createElement(CalendarCheck2, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
1724
|
+
/* @__PURE__ */ React18__default.createElement("span", null, eventCount)
|
|
1725
|
+
), !hideViewSwitcher && /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center bg-muted/50 backdrop-blur-sm rounded-xl p-1 gap-0.5" }, viewConfig.map(({ key, icon: Icon }) => /* @__PURE__ */ React18__default.createElement(
|
|
1726
1726
|
Button,
|
|
1727
1727
|
{
|
|
1728
1728
|
key,
|
|
@@ -1737,9 +1737,9 @@ var CalendarHeader = ({
|
|
|
1737
1737
|
view === key && !activeCustomViewId ? "bg-background shadow-sm text-foreground font-medium border-[0.5px] border-border/50" : "text-muted-foreground hover:text-foreground hover:bg-background/50"
|
|
1738
1738
|
)
|
|
1739
1739
|
},
|
|
1740
|
-
/* @__PURE__ */
|
|
1741
|
-
/* @__PURE__ */
|
|
1742
|
-
)), customViews && customViews.length > 0 && /* @__PURE__ */
|
|
1740
|
+
/* @__PURE__ */ React18__default.createElement(Icon, { className: "h-3.5 w-3.5" }),
|
|
1741
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "hidden sm:inline" }, translations[key])
|
|
1742
|
+
)), customViews && customViews.length > 0 && /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement("div", { className: "w-px h-5 bg-border/60 mx-0.5 shrink-0" }), /* @__PURE__ */ React18__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__default.createElement(
|
|
1743
1743
|
Button,
|
|
1744
1744
|
{
|
|
1745
1745
|
ref: customViewButtonRef,
|
|
@@ -1752,17 +1752,17 @@ var CalendarHeader = ({
|
|
|
1752
1752
|
),
|
|
1753
1753
|
title: "Daha fazla g\xF6r\xFCn\xFCm"
|
|
1754
1754
|
},
|
|
1755
|
-
activeCustomViewId ? customViews.find((cv) => cv.id === activeCustomViewId)?.label : /* @__PURE__ */
|
|
1756
|
-
/* @__PURE__ */
|
|
1755
|
+
activeCustomViewId ? customViews.find((cv) => cv.id === activeCustomViewId)?.label : /* @__PURE__ */ React18__default.createElement(MoreHorizontal, { className: "h-3.5 w-3.5" }),
|
|
1756
|
+
/* @__PURE__ */ React18__default.createElement(ChevronDown, { className: cn("h-3 w-3 transition-transform duration-150", isCustomViewOpen && "rotate-180") })
|
|
1757
1757
|
), isCustomViewOpen && customViewPos && createPortal(
|
|
1758
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
1759
1759
|
"div",
|
|
1760
1760
|
{
|
|
1761
1761
|
ref: customViewDropdownRef,
|
|
1762
1762
|
className: "fixed min-w-[160px] bg-background border border-border/60 rounded-2xl shadow-2xl z-[9999] overflow-hidden py-1.5",
|
|
1763
1763
|
style: { top: customViewPos.top, left: customViewPos.left, minWidth: CUSTOM_VIEW_DROPDOWN_WIDTH }
|
|
1764
1764
|
},
|
|
1765
|
-
customViews.map((cv) => /* @__PURE__ */
|
|
1765
|
+
customViews.map((cv) => /* @__PURE__ */ React18__default.createElement(
|
|
1766
1766
|
"button",
|
|
1767
1767
|
{
|
|
1768
1768
|
key: cv.id,
|
|
@@ -1776,9 +1776,9 @@ var CalendarHeader = ({
|
|
|
1776
1776
|
activeCustomViewId === cv.id ? "bg-primary/10 text-primary font-semibold" : "text-foreground"
|
|
1777
1777
|
)
|
|
1778
1778
|
},
|
|
1779
|
-
cv.icon && /* @__PURE__ */
|
|
1780
|
-
/* @__PURE__ */
|
|
1781
|
-
activeCustomViewId === cv.id && /* @__PURE__ */
|
|
1779
|
+
cv.icon && /* @__PURE__ */ React18__default.createElement("span", { className: "w-4 h-4 flex items-center justify-center shrink-0" }, cv.icon),
|
|
1780
|
+
/* @__PURE__ */ React18__default.createElement("span", null, cv.label),
|
|
1781
|
+
activeCustomViewId === cv.id && /* @__PURE__ */ React18__default.createElement("span", { className: "ml-auto w-1.5 h-1.5 rounded-full bg-primary shrink-0" })
|
|
1782
1782
|
))
|
|
1783
1783
|
),
|
|
1784
1784
|
document.body
|
|
@@ -1805,12 +1805,12 @@ var MiniCalendar = ({
|
|
|
1805
1805
|
className,
|
|
1806
1806
|
locale
|
|
1807
1807
|
}) => {
|
|
1808
|
-
const [viewDate, setViewDate] =
|
|
1809
|
-
|
|
1808
|
+
const [viewDate, setViewDate] = React18__default.useState(currentDate);
|
|
1809
|
+
React18__default.useEffect(() => {
|
|
1810
1810
|
setViewDate(currentDate);
|
|
1811
1811
|
}, [currentDate]);
|
|
1812
|
-
const days =
|
|
1813
|
-
const weekDays =
|
|
1812
|
+
const days = React18__default.useMemo(() => getMonthGrid(viewDate), [viewDate]);
|
|
1813
|
+
const weekDays = React18__default.useMemo(() => {
|
|
1814
1814
|
const base = new Date(2024, 0, 7);
|
|
1815
1815
|
return Array.from({ length: 7 }, (_, i) => {
|
|
1816
1816
|
const d = new Date(base);
|
|
@@ -1834,7 +1834,7 @@ var MiniCalendar = ({
|
|
|
1834
1834
|
onDateChange(day);
|
|
1835
1835
|
if (onViewChange) onViewChange("day");
|
|
1836
1836
|
};
|
|
1837
|
-
return /* @__PURE__ */
|
|
1837
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: cn("px-4 w-[260px]", className) }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-semibold text-foreground capitalize" }, format(viewDate, "MMMM yyyy", { locale })), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center bg-muted/40 rounded-lg p-0.5" }, /* @__PURE__ */ React18__default.createElement(
|
|
1838
1838
|
Button,
|
|
1839
1839
|
{
|
|
1840
1840
|
variant: "ghost",
|
|
@@ -1843,8 +1843,8 @@ var MiniCalendar = ({
|
|
|
1843
1843
|
onClick: handlePrev,
|
|
1844
1844
|
"aria-label": "Previous month"
|
|
1845
1845
|
},
|
|
1846
|
-
/* @__PURE__ */
|
|
1847
|
-
), /* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ React18__default.createElement(ChevronLeft, { className: "h-4 w-4" })
|
|
1847
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
1848
1848
|
Button,
|
|
1849
1849
|
{
|
|
1850
1850
|
variant: "ghost",
|
|
@@ -1853,12 +1853,12 @@ var MiniCalendar = ({
|
|
|
1853
1853
|
onClick: handleNext,
|
|
1854
1854
|
"aria-label": "Next month"
|
|
1855
1855
|
},
|
|
1856
|
-
/* @__PURE__ */
|
|
1857
|
-
))), /* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ React18__default.createElement(ChevronRight, { className: "h-4 w-4" })
|
|
1857
|
+
))), /* @__PURE__ */ React18__default.createElement("div", { className: "grid grid-cols-7 gap-y-2 text-center mb-2" }, weekDays.map((day, i) => /* @__PURE__ */ React18__default.createElement("div", { key: `${day}-${i}`, className: "text-[10px] text-muted-foreground/70 font-semibold uppercase" }, day))), /* @__PURE__ */ React18__default.createElement("div", { className: "grid grid-cols-7 gap-y-1 text-center" }, days.map((day) => {
|
|
1858
1858
|
const isSelected = isSameDay(day, currentDate);
|
|
1859
1859
|
const isCurrentMonth = isSameMonth(day, viewDate);
|
|
1860
1860
|
const isTodayDate = isToday(day);
|
|
1861
|
-
return /* @__PURE__ */
|
|
1861
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
1862
1862
|
"button",
|
|
1863
1863
|
{
|
|
1864
1864
|
key: day.toISOString(),
|
|
@@ -1940,7 +1940,7 @@ var Sidebar = ({
|
|
|
1940
1940
|
];
|
|
1941
1941
|
const formatTzLabel = (tz, showTime = true) => {
|
|
1942
1942
|
if (!hasMounted || !now || !showTime) {
|
|
1943
|
-
return /* @__PURE__ */
|
|
1943
|
+
return /* @__PURE__ */ React18__default.createElement("span", null, tz.label);
|
|
1944
1944
|
}
|
|
1945
1945
|
let time = "";
|
|
1946
1946
|
let acronym = tz.acronym;
|
|
@@ -1960,29 +1960,29 @@ var Sidebar = ({
|
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
1962
|
} catch (e) {
|
|
1963
|
-
return /* @__PURE__ */
|
|
1963
|
+
return /* @__PURE__ */ React18__default.createElement("span", null, tz.label);
|
|
1964
1964
|
}
|
|
1965
|
-
return /* @__PURE__ */
|
|
1965
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: "flex justify-between w-full" }, /* @__PURE__ */ React18__default.createElement("span", null, tz.label), /* @__PURE__ */ React18__default.createElement("span", { className: "text-muted-foreground ml-2 tabular-nums" }, time, " ", /* @__PURE__ */ React18__default.createElement("span", { className: "text-xs opacity-75" }, "(", acronym, ")")));
|
|
1966
1966
|
};
|
|
1967
1967
|
const selectedTzObj = timezones.find((t) => t.value === (timezone || ""));
|
|
1968
1968
|
const selectedTimezoneLabel = selectedTzObj ? formatTzLabel(selectedTzObj) : translations?.localTime ?? "Local Time";
|
|
1969
|
-
return /* @__PURE__ */
|
|
1969
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: cn("flex flex-col w-[260px] overflow-x-hidden h-full bg-gradient-to-b scrollbar-hide from-background via-background to-muted/10 pt-4 pb-4 overflow-y-auto", className) }, sidebarMenus && sidebarMenus.length > 0 && /* @__PURE__ */ React18__default.createElement("div", { className: "px-4 mb-4" }, !menusExpanded && /* @__PURE__ */ React18__default.createElement(
|
|
1970
1970
|
Button,
|
|
1971
1971
|
{
|
|
1972
1972
|
variant: "outline",
|
|
1973
1973
|
className: "w-full rounded-2xl h-11 gap-2.5 justify-start border-[0.5px] border-border/60 hover:border-primary/40 hover:bg-primary/5 hover:text-primary transition-all duration-200 font-medium text-sm",
|
|
1974
1974
|
onClick: () => setMenusExpanded(true)
|
|
1975
1975
|
},
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
), menusExpanded && /* @__PURE__ */
|
|
1976
|
+
/* @__PURE__ */ React18__default.createElement(LayoutGrid, { className: "w-4 h-4" }),
|
|
1977
|
+
/* @__PURE__ */ React18__default.createElement("span", null, translations?.operations ?? "\u0130\u015Flemler")
|
|
1978
|
+
), menusExpanded && /* @__PURE__ */ React18__default.createElement("div", { className: "animate-in fade-in slide-in-from-top-2 duration-200" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center justify-between mb-2 px-1" }, /* @__PURE__ */ React18__default.createElement("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, translations?.operations ?? "\u0130\u015Flemler"), /* @__PURE__ */ React18__default.createElement(
|
|
1979
1979
|
"button",
|
|
1980
1980
|
{
|
|
1981
1981
|
onClick: () => setMenusExpanded(false),
|
|
1982
1982
|
className: "w-6 h-6 rounded-lg flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/60 transition-all duration-150"
|
|
1983
1983
|
},
|
|
1984
|
-
/* @__PURE__ */
|
|
1985
|
-
)), /* @__PURE__ */
|
|
1984
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "w-3.5 h-3.5" })
|
|
1985
|
+
)), /* @__PURE__ */ React18__default.createElement("nav", { className: "space-y-0.5" }, /* @__PURE__ */ React18__default.createElement(
|
|
1986
1986
|
"button",
|
|
1987
1987
|
{
|
|
1988
1988
|
onClick: () => {
|
|
@@ -1994,10 +1994,10 @@ var Sidebar = ({
|
|
|
1994
1994
|
activeCustomMenu === null ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent/60 hover:text-foreground"
|
|
1995
1995
|
)
|
|
1996
1996
|
},
|
|
1997
|
-
/* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
activeCustomMenu === null && /* @__PURE__ */
|
|
2000
|
-
), sidebarMenus?.map((item) => /* @__PURE__ */
|
|
1997
|
+
/* @__PURE__ */ React18__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-4 h-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18__default.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ React18__default.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ React18__default.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ React18__default.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" })),
|
|
1998
|
+
/* @__PURE__ */ React18__default.createElement("span", null, translations?.calendar ?? "Takvim"),
|
|
1999
|
+
activeCustomMenu === null && /* @__PURE__ */ React18__default.createElement("span", { className: "ml-auto w-1.5 h-1.5 rounded-full bg-primary" })
|
|
2000
|
+
), sidebarMenus?.map((item) => /* @__PURE__ */ React18__default.createElement(
|
|
2001
2001
|
"button",
|
|
2002
2002
|
{
|
|
2003
2003
|
key: item.id,
|
|
@@ -2010,10 +2010,10 @@ var Sidebar = ({
|
|
|
2010
2010
|
activeCustomMenu === item.id ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent/60 hover:text-foreground"
|
|
2011
2011
|
)
|
|
2012
2012
|
},
|
|
2013
|
-
item.icon && /* @__PURE__ */
|
|
2014
|
-
/* @__PURE__ */
|
|
2015
|
-
activeCustomMenu === item.id && /* @__PURE__ */
|
|
2016
|
-
))))), onEventCreate && /* @__PURE__ */
|
|
2013
|
+
item.icon && /* @__PURE__ */ React18__default.createElement("span", { className: "w-4 h-4 shrink-0 flex items-center justify-center" }, item.icon),
|
|
2014
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "truncate" }, item.label),
|
|
2015
|
+
activeCustomMenu === item.id && /* @__PURE__ */ React18__default.createElement("span", { className: "ml-auto w-1.5 h-1.5 rounded-full bg-primary" })
|
|
2016
|
+
))))), onEventCreate && /* @__PURE__ */ React18__default.createElement("div", { className: "md:hidden px-4 mb-4" }, /* @__PURE__ */ React18__default.createElement(
|
|
2017
2017
|
Button,
|
|
2018
2018
|
{
|
|
2019
2019
|
onClick: () => {
|
|
@@ -2021,9 +2021,9 @@ var Sidebar = ({
|
|
|
2021
2021
|
},
|
|
2022
2022
|
className: "w-full rounded-2xl h-11 gap-2.5 justify-center shadow-sm shadow-primary/20 transition-all duration-200 font-medium text-sm"
|
|
2023
2023
|
},
|
|
2024
|
-
/* @__PURE__ */
|
|
2025
|
-
/* @__PURE__ */
|
|
2026
|
-
)), onReverseTimeChange && /* @__PURE__ */
|
|
2024
|
+
/* @__PURE__ */ React18__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-4 h-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18__default.createElement("path", { d: "M5 12h14" }), /* @__PURE__ */ React18__default.createElement("path", { d: "M12 5v14" })),
|
|
2025
|
+
/* @__PURE__ */ React18__default.createElement("span", null, translations?.createEvent ?? "Etkinlik Olu\u015Ftur")
|
|
2026
|
+
)), onReverseTimeChange && /* @__PURE__ */ React18__default.createElement("div", { className: "px-4 mb-4" }, /* @__PURE__ */ React18__default.createElement(
|
|
2027
2027
|
"button",
|
|
2028
2028
|
{
|
|
2029
2029
|
onClick: () => onReverseTimeChange(!reverseTime),
|
|
@@ -2032,33 +2032,33 @@ var Sidebar = ({
|
|
|
2032
2032
|
reverseTime ? "bg-primary/10 border-primary/30 text-primary" : "bg-muted/30 border-border/50 text-muted-foreground hover:border-primary/30 hover:text-foreground"
|
|
2033
2033
|
)
|
|
2034
2034
|
},
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
/* @__PURE__ */
|
|
2035
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2.5" }, /* @__PURE__ */ React18__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-4 h-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18__default.createElement("line", { x1: "12", y1: "19", x2: "12", y2: "5" }), /* @__PURE__ */ React18__default.createElement("polyline", { points: "5 12 12 5 19 12" }), /* @__PURE__ */ React18__default.createElement("line", { x1: "12", y1: "5", x2: "12", y2: "19", className: "opacity-40" }), /* @__PURE__ */ React18__default.createElement("polyline", { points: "5 12 12 19 19 12", className: "opacity-40" })), /* @__PURE__ */ React18__default.createElement("div", { className: "text-left" }, /* @__PURE__ */ React18__default.createElement("div", { className: "text-xs font-semibold leading-tight" }, translations?.reverseTimeLabel ?? "Saat Y\xF6n\xFC"), /* @__PURE__ */ React18__default.createElement("div", { className: "text-[10px] leading-tight opacity-70 mt-0.5" }, reverseTime ? "23:00 \u2192 00:00" : "00:00 \u2192 23:00"))),
|
|
2036
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: cn(
|
|
2037
2037
|
"relative w-9 h-5 rounded-full transition-colors duration-200 shrink-0",
|
|
2038
2038
|
reverseTime ? "bg-primary" : "bg-border"
|
|
2039
|
-
) }, /* @__PURE__ */
|
|
2039
|
+
) }, /* @__PURE__ */ React18__default.createElement("span", { className: cn(
|
|
2040
2040
|
"absolute top-0.5 w-4 h-4 bg-white rounded-full shadow-sm transition-all duration-200",
|
|
2041
2041
|
reverseTime ? "left-4" : "left-0.5"
|
|
2042
2042
|
) }))
|
|
2043
2043
|
)), renderMiniCalendar ? (
|
|
2044
2044
|
// Custom mini-calendar: receives the same props as the built-in one
|
|
2045
2045
|
renderMiniCalendar({ currentDate, onDateChange, onViewChange })
|
|
2046
|
-
) : /* @__PURE__ */
|
|
2046
|
+
) : /* @__PURE__ */ React18__default.createElement(MiniCalendar, { currentDate, onDateChange, onViewChange, locale }), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 px-4 space-y-5 mt-5" }, /* @__PURE__ */ React18__default.createElement("div", { className: "bg-muted/20 rounded-2xl p-3 border-[0px] border-border/30" }, /* @__PURE__ */ React18__default.createElement(
|
|
2047
2047
|
"div",
|
|
2048
2048
|
{
|
|
2049
2049
|
className: "flex items-center justify-between cursor-pointer hover:bg-accent/50 p-2 -m-1 rounded-xl mb-2 transition-all duration-200",
|
|
2050
2050
|
onClick: () => setCalendarsOpen(!calendarsOpen)
|
|
2051
2051
|
},
|
|
2052
|
-
/* @__PURE__ */
|
|
2053
|
-
/* @__PURE__ */
|
|
2054
|
-
), calendarsOpen && /* @__PURE__ */
|
|
2052
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-semibold text-foreground" }, translations?.calendars),
|
|
2053
|
+
/* @__PURE__ */ React18__default.createElement(ChevronDown, { className: cn("w-4 h-4 text-muted-foreground transition-transform duration-200", calendarsOpen && "rotate-180") })
|
|
2054
|
+
), calendarsOpen && /* @__PURE__ */ React18__default.createElement("div", { className: "space-y-1" }, displayCalendars.map((cal) => /* @__PURE__ */ React18__default.createElement(
|
|
2055
2055
|
"div",
|
|
2056
2056
|
{
|
|
2057
2057
|
key: cal.id,
|
|
2058
2058
|
className: "flex items-center gap-3 py-2 px-2 hover:bg-accent/60 rounded-xl cursor-pointer group transition-all duration-200",
|
|
2059
2059
|
onClick: () => onCalendarToggle?.(cal.id, !(cal.active ?? true))
|
|
2060
2060
|
},
|
|
2061
|
-
/* @__PURE__ */
|
|
2061
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "relative flex items-center justify-center" }, /* @__PURE__ */ React18__default.createElement(
|
|
2062
2062
|
"input",
|
|
2063
2063
|
{
|
|
2064
2064
|
type: "checkbox",
|
|
@@ -2071,7 +2071,7 @@ var Sidebar = ({
|
|
|
2071
2071
|
style: { "--primary-color": cal.color },
|
|
2072
2072
|
"data-cal-id": cal.id
|
|
2073
2073
|
}
|
|
2074
|
-
), /* @__PURE__ */
|
|
2074
|
+
), /* @__PURE__ */ React18__default.createElement("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity" }, /* @__PURE__ */ React18__default.createElement("svg", { className: "w-3.5 h-3.5 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3 }, /* @__PURE__ */ React18__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }))), /* @__PURE__ */ React18__default.createElement("style", null, `
|
|
2075
2075
|
input[type="checkbox"][data-cal-id="${cal.id}"]:checked {
|
|
2076
2076
|
background-color: ${cal.color} !important;
|
|
2077
2077
|
border-color: ${cal.color} !important;
|
|
@@ -2080,23 +2080,23 @@ var Sidebar = ({
|
|
|
2080
2080
|
--tw-ring-color: ${cal.color}40 !important;
|
|
2081
2081
|
}
|
|
2082
2082
|
`)),
|
|
2083
|
-
/* @__PURE__ */
|
|
2084
|
-
/* @__PURE__ */
|
|
2083
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2 flex-1 min-w-0" }, /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm text-foreground/90 truncate font-medium" }, cal.label)),
|
|
2084
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2085
2085
|
"div",
|
|
2086
2086
|
{
|
|
2087
2087
|
className: "w-2 h-2 rounded-full opacity-60 group-hover:opacity-100 transition-opacity",
|
|
2088
2088
|
style: { backgroundColor: cal.color }
|
|
2089
2089
|
}
|
|
2090
2090
|
)
|
|
2091
|
-
))))), /* @__PURE__ */
|
|
2091
|
+
))))), /* @__PURE__ */ React18__default.createElement("div", { className: "mt-auto px-4 pt-5" }, /* @__PURE__ */ React18__default.createElement("div", { className: "bg-muted/20 rounded-2xl p-3" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2 mb-3" }, /* @__PURE__ */ React18__default.createElement("div", { className: "p-1.5 bg-primary/10 rounded-lg" }, /* @__PURE__ */ React18__default.createElement(Globe, { className: "w-4 h-4 text-primary" })), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-semibold text-foreground" }, translations?.timezone)), /* @__PURE__ */ React18__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__default.createElement(
|
|
2092
2092
|
"button",
|
|
2093
2093
|
{
|
|
2094
2094
|
onClick: () => setTimezoneOpen(!timezoneOpen),
|
|
2095
2095
|
className: "w-full flex items-center justify-between bg-blue-200/40 hover:bg-blue-200/80 rounded-xl py-2.5 pl-4 pr-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/50 transition-all duration-200 text-left"
|
|
2096
2096
|
},
|
|
2097
|
-
/* @__PURE__ */
|
|
2098
|
-
/* @__PURE__ */
|
|
2099
|
-
), timezoneOpen && /* @__PURE__ */
|
|
2097
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 truncate mr-2 font-medium" }, selectedTimezoneLabel),
|
|
2098
|
+
/* @__PURE__ */ React18__default.createElement(ChevronDown, { className: cn("w-4 h-4 text-muted-foreground transition-transform duration-200", timezoneOpen && "rotate-180") })
|
|
2099
|
+
), timezoneOpen && /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setTimezoneOpen(false) }), /* @__PURE__ */ React18__default.createElement("div", { className: "absolute bottom-full left-0 w-full mb-2 bg-background rounded-xl shadow-2xl z-50 max-h-[260px] overflow-y-auto p-1.5 animate-in fade-in zoom-in-95 duration-200 backdrop-blur-none" }, timezones.map((tz) => /* @__PURE__ */ React18__default.createElement(
|
|
2100
2100
|
"div",
|
|
2101
2101
|
{
|
|
2102
2102
|
key: tz.value,
|
|
@@ -2129,7 +2129,7 @@ var DraggableEvent = ({ event, children, className, style: propStyle, ...props }
|
|
|
2129
2129
|
opacity: isDragging ? 0 : propStyle?.opacity
|
|
2130
2130
|
// Hiding original element completely
|
|
2131
2131
|
};
|
|
2132
|
-
return /* @__PURE__ */
|
|
2132
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2133
2133
|
"div",
|
|
2134
2134
|
{
|
|
2135
2135
|
ref: setNodeRef,
|
|
@@ -2150,7 +2150,7 @@ var DroppableCell = ({ id, date, resourceId, children, className, style, onClick
|
|
|
2150
2150
|
const minutes = date.getMinutes();
|
|
2151
2151
|
const quarterClass = minutes === 0 ? "hover:bg-blue-50/50 dark:hover:bg-blue-900/10" : minutes === 15 ? "hover:bg-blue-50/80 dark:hover:bg-blue-900/20" : minutes === 30 ? "hover:bg-blue-100/50 dark:hover:bg-blue-900/30" : "hover:bg-blue-100/80 dark:hover:bg-blue-900/40";
|
|
2152
2152
|
const activeQuarterClass = minutes === 0 ? "bg-blue-50/50 dark:bg-blue-900/10 ring-2 ring-primary ring-inset" : minutes === 15 ? "bg-blue-50/80 dark:bg-blue-900/20 ring-2 ring-primary ring-inset" : minutes === 30 ? "bg-blue-100/50 dark:bg-blue-900/30 ring-2 ring-primary ring-inset" : "bg-blue-100/80 dark:bg-blue-900/40 ring-2 ring-primary ring-inset";
|
|
2153
|
-
return /* @__PURE__ */
|
|
2153
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2154
2154
|
"div",
|
|
2155
2155
|
{
|
|
2156
2156
|
ref: setNodeRef,
|
|
@@ -2167,7 +2167,7 @@ var DroppableCell = ({ id, date, resourceId, children, className, style, onClick
|
|
|
2167
2167
|
};
|
|
2168
2168
|
|
|
2169
2169
|
// src/views/MonthView.tsx
|
|
2170
|
-
var EventItem =
|
|
2170
|
+
var EventItem = React18__default.memo(({ event, onEventClick }) => /* @__PURE__ */ React18__default.createElement(DraggableEvent, { event }, /* @__PURE__ */ React18__default.createElement(
|
|
2171
2171
|
"div",
|
|
2172
2172
|
{
|
|
2173
2173
|
className: cn(
|
|
@@ -2185,7 +2185,7 @@ var EventItem = React17__default.memo(({ event, onEventClick }) => /* @__PURE__
|
|
|
2185
2185
|
onEventClick?.(event);
|
|
2186
2186
|
}
|
|
2187
2187
|
},
|
|
2188
|
-
/* @__PURE__ */
|
|
2188
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "font-medium" }, event.title)
|
|
2189
2189
|
)));
|
|
2190
2190
|
EventItem.displayName = "EventItem";
|
|
2191
2191
|
var MonthView = ({
|
|
@@ -2217,19 +2217,19 @@ var MonthView = ({
|
|
|
2217
2217
|
});
|
|
2218
2218
|
return map;
|
|
2219
2219
|
}, [events, getZonedDate]);
|
|
2220
|
-
return /* @__PURE__ */
|
|
2220
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background border-[0.5px] scrollbar-hide border-border/50 rounded-2xl overflow-hidden min-w-[800px] md:min-w-0 shadow-sm" }, /* @__PURE__ */ React18__default.createElement("div", { className: "overflow-y-auto flex-1 min-h-0 relative" }, /* @__PURE__ */ React18__default.createElement("div", { className: "grid grid-cols-7 border-b-[0.5px] border-border/50 bg-gradient-to-r from-muted/30 via-muted/40 to-muted/30 sticky top-0 z-20 backdrop-blur-sm" }, weekDays.map((day) => /* @__PURE__ */ React18__default.createElement(
|
|
2221
2221
|
"div",
|
|
2222
2222
|
{
|
|
2223
2223
|
key: day.toISOString(),
|
|
2224
2224
|
className: "py-3 text-center text-xs font-semibold text-muted-foreground border-r-[0.5px] border-border/30 last:border-r-0 uppercase tracking-wider"
|
|
2225
2225
|
},
|
|
2226
2226
|
format(day, "EEE", { locale })
|
|
2227
|
-
))), /* @__PURE__ */
|
|
2227
|
+
))), /* @__PURE__ */ React18__default.createElement("div", { className: "grid grid-cols-7", style: { gridAutoRows: "130px" } }, days.map((day) => {
|
|
2228
2228
|
const dayKey = format(day, "yyyy-MM-dd");
|
|
2229
2229
|
const dayEvents = eventsByDay.get(dayKey) || [];
|
|
2230
2230
|
const isCurrentMonth = isSameMonth(day, currentDate);
|
|
2231
2231
|
const cellId = day.toISOString();
|
|
2232
|
-
return /* @__PURE__ */
|
|
2232
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2233
2233
|
DroppableCell,
|
|
2234
2234
|
{
|
|
2235
2235
|
key: cellId,
|
|
@@ -2242,11 +2242,11 @@ var MonthView = ({
|
|
|
2242
2242
|
),
|
|
2243
2243
|
onClick: () => onDateClick?.(day)
|
|
2244
2244
|
},
|
|
2245
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex justify-between items-start" }, /* @__PURE__ */ React18__default.createElement("div", { className: cn(
|
|
2246
2246
|
"text-sm font-semibold w-7 h-7 flex items-center justify-center rounded-full transition-all duration-200",
|
|
2247
2247
|
isToday(day) ? "bg-primary text-primary-foreground shadow-md shadow-primary/30" : "group-hover:bg-accent"
|
|
2248
|
-
) }, format(day, "d", { locale })), dayEvents.length > 0 && /* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2248
|
+
) }, format(day, "d", { locale })), dayEvents.length > 0 && /* @__PURE__ */ React18__default.createElement("div", { className: "text-[10px] font-medium text-muted-foreground/60 bg-muted/50 px-1.5 py-0.5 rounded-full" }, dayEvents.length)),
|
|
2249
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 flex flex-col gap-1 scrollbar-hide overflow-y-auto overflow-x-hidden" }, dayEvents.slice(0, 4).map((event) => /* @__PURE__ */ React18__default.createElement(EventItem, { key: `${event.id}-${dayKey}`, event, onEventClick })), dayEvents.length > 4 && /* @__PURE__ */ React18__default.createElement("div", { className: "text-[10px] text-primary font-semibold text-center py-1 px-2 rounded-md bg-primary/5 hover:bg-primary/10 cursor-pointer transition-colors" }, "+", dayEvents.length - 4, " more"))
|
|
2250
2250
|
);
|
|
2251
2251
|
}))));
|
|
2252
2252
|
};
|
|
@@ -2307,7 +2307,7 @@ var ResizableEvent = ({
|
|
|
2307
2307
|
document.addEventListener("touchmove", handleMove, { passive: false });
|
|
2308
2308
|
document.addEventListener("touchend", handleEnd);
|
|
2309
2309
|
}, [event, hourHeight, minDuration, onResize, resizeHeight]);
|
|
2310
|
-
return /* @__PURE__ */
|
|
2310
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2311
2311
|
"div",
|
|
2312
2312
|
{
|
|
2313
2313
|
ref: containerRef,
|
|
@@ -2318,7 +2318,7 @@ var ResizableEvent = ({
|
|
|
2318
2318
|
}
|
|
2319
2319
|
},
|
|
2320
2320
|
children,
|
|
2321
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2322
2322
|
"div",
|
|
2323
2323
|
{
|
|
2324
2324
|
className: cn(
|
|
@@ -2330,12 +2330,12 @@ var ResizableEvent = ({
|
|
|
2330
2330
|
onMouseDown: readonly ? void 0 : handleResizeStart,
|
|
2331
2331
|
onTouchStart: readonly ? void 0 : handleResizeStart
|
|
2332
2332
|
},
|
|
2333
|
-
/* @__PURE__ */
|
|
2333
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: cn(
|
|
2334
2334
|
"w-8 h-1 rounded-full transition-all",
|
|
2335
2335
|
isResizing ? "bg-primary" : "bg-muted-foreground/30 group-hover:bg-primary/50"
|
|
2336
2336
|
) })
|
|
2337
2337
|
),
|
|
2338
|
-
isResizing && /* @__PURE__ */
|
|
2338
|
+
isResizing && /* @__PURE__ */ React18__default.createElement("div", { className: "absolute inset-0 border-2 border-primary border-dashed rounded-md pointer-events-none bg-primary/5" })
|
|
2339
2339
|
);
|
|
2340
2340
|
};
|
|
2341
2341
|
var EventCardBadge = ({
|
|
@@ -2344,7 +2344,7 @@ var EventCardBadge = ({
|
|
|
2344
2344
|
className
|
|
2345
2345
|
}) => {
|
|
2346
2346
|
if (!badge?.icon || !badge?.name) return null;
|
|
2347
|
-
return /* @__PURE__ */
|
|
2347
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2348
2348
|
"div",
|
|
2349
2349
|
{
|
|
2350
2350
|
className: cn(
|
|
@@ -2357,26 +2357,121 @@ var EventCardBadge = ({
|
|
|
2357
2357
|
),
|
|
2358
2358
|
title: badge.name
|
|
2359
2359
|
},
|
|
2360
|
-
/* @__PURE__ */
|
|
2361
|
-
!compact && /* @__PURE__ */
|
|
2360
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "shrink-0 flex items-center justify-center [&>svg]:w-2.5 [&>svg]:h-2.5" }, badge.icon),
|
|
2361
|
+
!compact && /* @__PURE__ */ React18__default.createElement("span", { className: "truncate max-w-[72px]" }, badge.name)
|
|
2362
2362
|
);
|
|
2363
2363
|
};
|
|
2364
|
+
var EventHoverPopover = ({
|
|
2365
|
+
enabled,
|
|
2366
|
+
event,
|
|
2367
|
+
timeRange,
|
|
2368
|
+
children,
|
|
2369
|
+
className
|
|
2370
|
+
}) => {
|
|
2371
|
+
const triggerRef = useRef(null);
|
|
2372
|
+
const [open, setOpen] = useState(false);
|
|
2373
|
+
const [coords, setCoords] = useState({ top: 0, left: 0, placeAbove: true });
|
|
2374
|
+
const hideTimerRef = useRef(null);
|
|
2375
|
+
const updatePosition = useCallback(() => {
|
|
2376
|
+
const el = triggerRef.current;
|
|
2377
|
+
if (!el) return;
|
|
2378
|
+
const rect = el.getBoundingClientRect();
|
|
2379
|
+
const placeAbove = rect.top > 160;
|
|
2380
|
+
setCoords({
|
|
2381
|
+
top: placeAbove ? rect.top - 8 : rect.bottom + 8,
|
|
2382
|
+
left: Math.min(
|
|
2383
|
+
Math.max(rect.left + rect.width / 2, 120),
|
|
2384
|
+
window.innerWidth - 120
|
|
2385
|
+
),
|
|
2386
|
+
placeAbove
|
|
2387
|
+
});
|
|
2388
|
+
}, []);
|
|
2389
|
+
const show = useCallback(() => {
|
|
2390
|
+
if (!enabled) return;
|
|
2391
|
+
if (hideTimerRef.current) {
|
|
2392
|
+
clearTimeout(hideTimerRef.current);
|
|
2393
|
+
hideTimerRef.current = null;
|
|
2394
|
+
}
|
|
2395
|
+
updatePosition();
|
|
2396
|
+
setOpen(true);
|
|
2397
|
+
}, [enabled, updatePosition]);
|
|
2398
|
+
const scheduleHide = useCallback(() => {
|
|
2399
|
+
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
2400
|
+
hideTimerRef.current = setTimeout(() => setOpen(false), 80);
|
|
2401
|
+
}, []);
|
|
2402
|
+
useEffect(() => {
|
|
2403
|
+
if (!open) return;
|
|
2404
|
+
const onMove = () => updatePosition();
|
|
2405
|
+
window.addEventListener("scroll", onMove, true);
|
|
2406
|
+
window.addEventListener("resize", onMove);
|
|
2407
|
+
return () => {
|
|
2408
|
+
window.removeEventListener("scroll", onMove, true);
|
|
2409
|
+
window.removeEventListener("resize", onMove);
|
|
2410
|
+
};
|
|
2411
|
+
}, [open, updatePosition]);
|
|
2412
|
+
useEffect(() => () => {
|
|
2413
|
+
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
2414
|
+
}, []);
|
|
2415
|
+
if (!enabled) {
|
|
2416
|
+
return /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, children);
|
|
2417
|
+
}
|
|
2418
|
+
const accent = event.color || "hsl(var(--primary))";
|
|
2419
|
+
return /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement(
|
|
2420
|
+
"div",
|
|
2421
|
+
{
|
|
2422
|
+
ref: triggerRef,
|
|
2423
|
+
className: cn("h-full w-full", className),
|
|
2424
|
+
onMouseEnter: show,
|
|
2425
|
+
onMouseLeave: scheduleHide
|
|
2426
|
+
},
|
|
2427
|
+
children
|
|
2428
|
+
), open && typeof document !== "undefined" && createPortal(
|
|
2429
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2430
|
+
"div",
|
|
2431
|
+
{
|
|
2432
|
+
role: "tooltip",
|
|
2433
|
+
className: cn(
|
|
2434
|
+
"fixed z-[10000] w-64 max-w-[min(16rem,calc(100vw-1.5rem))]",
|
|
2435
|
+
"rounded-xl border border-border/60 bg-popover text-popover-foreground",
|
|
2436
|
+
"shadow-xl shadow-black/10 backdrop-blur-md",
|
|
2437
|
+
"pointer-events-none transition-opacity duration-150"
|
|
2438
|
+
),
|
|
2439
|
+
style: {
|
|
2440
|
+
top: coords.top,
|
|
2441
|
+
left: coords.left,
|
|
2442
|
+
transform: coords.placeAbove ? "translate(-50%, -100%)" : "translate(-50%, 0)"
|
|
2443
|
+
},
|
|
2444
|
+
onMouseEnter: show,
|
|
2445
|
+
onMouseLeave: scheduleHide
|
|
2446
|
+
},
|
|
2447
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2448
|
+
"div",
|
|
2449
|
+
{
|
|
2450
|
+
className: "h-1 rounded-t-xl",
|
|
2451
|
+
style: { backgroundColor: accent }
|
|
2452
|
+
}
|
|
2453
|
+
),
|
|
2454
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "p-3 space-y-2" }, /* @__PURE__ */ React18__default.createElement("div", { className: "text-sm font-semibold leading-snug text-foreground" }, event.title), /* @__PURE__ */ React18__default.createElement("div", { className: "text-xs font-medium text-muted-foreground tabular-nums" }, timeRange), event.description && /* @__PURE__ */ React18__default.createElement("p", { className: "text-xs text-muted-foreground/90 leading-relaxed line-clamp-4" }, event.description), event.guests?.length || event.attachments?.length || event.reminders?.length ? /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-wrap gap-1.5 pt-0.5" }, event.guests && event.guests.length > 0 && /* @__PURE__ */ React18__default.createElement("span", { className: "rounded-md bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground" }, event.guests.length, " guest", event.guests.length !== 1 ? "s" : ""), event.attachments && event.attachments.length > 0 && /* @__PURE__ */ React18__default.createElement("span", { className: "rounded-md bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground" }, event.attachments.length, " file", event.attachments.length !== 1 ? "s" : ""), event.reminders && event.reminders.length > 0 && /* @__PURE__ */ React18__default.createElement("span", { className: "rounded-md bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground" }, event.reminders.length, " reminder", event.reminders.length !== 1 ? "s" : "")) : null)
|
|
2455
|
+
),
|
|
2456
|
+
document.body
|
|
2457
|
+
));
|
|
2458
|
+
};
|
|
2364
2459
|
var ICON_CLASS = "w-2.5 h-2.5";
|
|
2365
2460
|
var EVENT_BADGE_ICONS = {
|
|
2366
|
-
privateLesson: /* @__PURE__ */
|
|
2367
|
-
groupLesson: /* @__PURE__ */
|
|
2368
|
-
packageLesson: /* @__PURE__ */
|
|
2369
|
-
online: /* @__PURE__ */
|
|
2370
|
-
inPerson: /* @__PURE__ */
|
|
2371
|
-
homeVisit: /* @__PURE__ */
|
|
2372
|
-
trial: /* @__PURE__ */
|
|
2373
|
-
makeup: /* @__PURE__ */
|
|
2374
|
-
exam: /* @__PURE__ */
|
|
2375
|
-
workshop: /* @__PURE__ */
|
|
2376
|
-
priority: /* @__PURE__ */
|
|
2377
|
-
holiday: /* @__PURE__ */
|
|
2378
|
-
cancelled: /* @__PURE__ */
|
|
2379
|
-
listening: /* @__PURE__ */
|
|
2461
|
+
privateLesson: /* @__PURE__ */ React18__default.createElement(User, { className: ICON_CLASS }),
|
|
2462
|
+
groupLesson: /* @__PURE__ */ React18__default.createElement(Users, { className: ICON_CLASS }),
|
|
2463
|
+
packageLesson: /* @__PURE__ */ React18__default.createElement(Package, { className: ICON_CLASS }),
|
|
2464
|
+
online: /* @__PURE__ */ React18__default.createElement(Video, { className: ICON_CLASS }),
|
|
2465
|
+
inPerson: /* @__PURE__ */ React18__default.createElement(MapPin, { className: ICON_CLASS }),
|
|
2466
|
+
homeVisit: /* @__PURE__ */ React18__default.createElement(Home, { className: ICON_CLASS }),
|
|
2467
|
+
trial: /* @__PURE__ */ React18__default.createElement(Sparkles, { className: ICON_CLASS }),
|
|
2468
|
+
makeup: /* @__PURE__ */ React18__default.createElement(RefreshCw, { className: ICON_CLASS }),
|
|
2469
|
+
exam: /* @__PURE__ */ React18__default.createElement(ClipboardCheck, { className: ICON_CLASS }),
|
|
2470
|
+
workshop: /* @__PURE__ */ React18__default.createElement(Presentation, { className: ICON_CLASS }),
|
|
2471
|
+
priority: /* @__PURE__ */ React18__default.createElement(Star, { className: ICON_CLASS }),
|
|
2472
|
+
holiday: /* @__PURE__ */ React18__default.createElement(PartyPopper, { className: ICON_CLASS }),
|
|
2473
|
+
cancelled: /* @__PURE__ */ React18__default.createElement(Ban, { className: ICON_CLASS }),
|
|
2474
|
+
listening: /* @__PURE__ */ React18__default.createElement(Headphones, { className: ICON_CLASS })
|
|
2380
2475
|
};
|
|
2381
2476
|
var EVENT_BADGE_LABELS = {
|
|
2382
2477
|
tr: {
|
|
@@ -2459,20 +2554,21 @@ var WeekView = ({
|
|
|
2459
2554
|
readonly,
|
|
2460
2555
|
language = "tr",
|
|
2461
2556
|
initialScrollHour = 8,
|
|
2462
|
-
reverseTime = false
|
|
2557
|
+
reverseTime = false,
|
|
2558
|
+
compactShortEvents = true
|
|
2463
2559
|
}) => {
|
|
2464
2560
|
const start = startOfWeek(currentDate, { weekStartsOn: 1 });
|
|
2465
2561
|
const end = endOfWeek(currentDate, { weekStartsOn: 1 });
|
|
2466
2562
|
const weekDays = eachDayOfInterval({ start, end });
|
|
2467
2563
|
const hours = reverseTime ? Array.from({ length: 24 }, (_, i) => 23 - i) : Array.from({ length: 24 }, (_, i) => i);
|
|
2468
2564
|
const hourHeight = 60;
|
|
2469
|
-
const scrollContainerRef =
|
|
2470
|
-
const [now, setNow] =
|
|
2471
|
-
|
|
2565
|
+
const scrollContainerRef = React18__default.useRef(null);
|
|
2566
|
+
const [now, setNow] = React18__default.useState(/* @__PURE__ */ new Date());
|
|
2567
|
+
React18__default.useEffect(() => {
|
|
2472
2568
|
const interval = setInterval(() => setNow(/* @__PURE__ */ new Date()), 6e4);
|
|
2473
2569
|
return () => clearInterval(interval);
|
|
2474
2570
|
}, []);
|
|
2475
|
-
|
|
2571
|
+
React18__default.useEffect(() => {
|
|
2476
2572
|
if (scrollContainerRef.current) {
|
|
2477
2573
|
scrollContainerRef.current.scrollTop = reverseTime ? (23 - initialScrollHour) * hourHeight : initialScrollHour * hourHeight;
|
|
2478
2574
|
}
|
|
@@ -2502,44 +2598,44 @@ var WeekView = ({
|
|
|
2502
2598
|
acronym = tz;
|
|
2503
2599
|
}
|
|
2504
2600
|
}
|
|
2505
|
-
return /* @__PURE__ */
|
|
2601
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col items-center justify-center leading-tight" }, /* @__PURE__ */ React18__default.createElement("span", null, displayTime), /* @__PURE__ */ React18__default.createElement("span", { className: "text-[10px] opacity-75" }, "(", acronym, ")"));
|
|
2506
2602
|
};
|
|
2507
2603
|
const timeFormat = getTimeFormat(language);
|
|
2508
2604
|
const eventTimeFormat = getTimeFormatFull(language);
|
|
2509
2605
|
const nowFormat = getTimeFormatFull(language);
|
|
2510
|
-
return /* @__PURE__ */
|
|
2606
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background border-[0.5px] border-border/50 rounded-2xl overflow-hidden min-w-[800px] md:min-w-0 shadow-sm" }, /* @__PURE__ */ React18__default.createElement(
|
|
2511
2607
|
"div",
|
|
2512
2608
|
{
|
|
2513
2609
|
ref: scrollContainerRef,
|
|
2514
2610
|
className: "flex-1 min-h-0 overflow-y-auto scrollbar-hide relative bg-background scroll-smooth",
|
|
2515
2611
|
style: { scrollbarGutter: "stable" }
|
|
2516
2612
|
},
|
|
2517
|
-
/* @__PURE__ */
|
|
2613
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex border-b-[0.5px] border-border/50 bg-gradient-to-r from-muted/20 via-background to-muted/20 z-20 sticky top-0 backdrop-blur-sm" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex-none p-3 text-center text-xs font-semibold text-muted-foreground w-16 flex items-center justify-center border-r-[0.5px] border-border/30 bg-muted/10" }, getTimezoneDisplay(timezone)), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 grid grid-cols-7" }, weekDays.map((day, index) => /* @__PURE__ */ React18__default.createElement("div", { key: day.toISOString(), className: cn("py-3 px-2 text-center", index > 0 && "border-l-[0.5px] border-border/30") }, /* @__PURE__ */ React18__default.createElement("div", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1.5" }, format(day, "EEE", { locale })), /* @__PURE__ */ React18__default.createElement("div", { className: cn(
|
|
2518
2614
|
"w-9 h-9 flex items-center justify-center rounded-xl mx-auto text-sm font-semibold transition-all duration-200",
|
|
2519
2615
|
isToday(day) ? "bg-primary text-primary-foreground shadow-lg shadow-primary/30 scale-110" : "text-foreground hover:bg-accent/80"
|
|
2520
2616
|
) }, format(day, "d", { locale })))))),
|
|
2521
|
-
/* @__PURE__ */
|
|
2617
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2522
2618
|
"div",
|
|
2523
2619
|
{
|
|
2524
2620
|
className: "flex min-w-full relative",
|
|
2525
2621
|
style: { height: hours.length * hourHeight }
|
|
2526
2622
|
},
|
|
2527
|
-
/* @__PURE__ */
|
|
2623
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-none w-16 border-r-[0.5px] border-border/30 relative bg-muted/5" }, hours.map((hour) => /* @__PURE__ */ React18__default.createElement(
|
|
2528
2624
|
"div",
|
|
2529
2625
|
{
|
|
2530
2626
|
key: hour,
|
|
2531
2627
|
className: "relative w-full text-[11px] text-muted-foreground/80 text-right pr-3 font-medium tabular-nums box-border",
|
|
2532
2628
|
style: { height: hourHeight }
|
|
2533
2629
|
},
|
|
2534
|
-
/* @__PURE__ */
|
|
2630
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "block -translate-y-1/2" }, hour !== 0 && format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale }))
|
|
2535
2631
|
))),
|
|
2536
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 grid grid-cols-7 relative" }, weekDays.map((day, dayIndex) => {
|
|
2537
2633
|
const dayEvents = events.filter((e) => {
|
|
2538
2634
|
const zonedStart = getZonedDate(e.start);
|
|
2539
2635
|
return isSameDay(zonedStart, day);
|
|
2540
2636
|
});
|
|
2541
|
-
return /* @__PURE__ */
|
|
2542
|
-
return /* @__PURE__ */
|
|
2637
|
+
return /* @__PURE__ */ React18__default.createElement("div", { key: day.toISOString(), className: cn("relative h-full", dayIndex > 0 && "border-l-[0.5px] border-border/30") }, hours.map((hour) => {
|
|
2638
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2543
2639
|
"div",
|
|
2544
2640
|
{
|
|
2545
2641
|
key: hour,
|
|
@@ -2550,7 +2646,7 @@ var WeekView = ({
|
|
|
2550
2646
|
const cellDate = new Date(day);
|
|
2551
2647
|
cellDate.setHours(hour, minute, 0, 0);
|
|
2552
2648
|
const cellId = cellDate.toISOString();
|
|
2553
|
-
return /* @__PURE__ */
|
|
2649
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2554
2650
|
DroppableCell,
|
|
2555
2651
|
{
|
|
2556
2652
|
key: minute,
|
|
@@ -2562,7 +2658,7 @@ var WeekView = ({
|
|
|
2562
2658
|
top: `${minute / 60 * 100}%`
|
|
2563
2659
|
}
|
|
2564
2660
|
},
|
|
2565
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2566
2662
|
"div",
|
|
2567
2663
|
{
|
|
2568
2664
|
className: "w-full h-full bg-transparent cursor-pointer",
|
|
@@ -2595,10 +2691,10 @@ var WeekView = ({
|
|
|
2595
2691
|
const durationMinutes = differenceInMinutes(zonedEventEnd, zonedEventStart);
|
|
2596
2692
|
const height = durationMinutes / 60 * hourHeight;
|
|
2597
2693
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2598
|
-
const isShortEvent = durationMinutes < 60;
|
|
2599
|
-
const resolvedBadge = resolveEventBadge(event, language);
|
|
2694
|
+
const isShortEvent = compactShortEvents && durationMinutes < 60;
|
|
2695
|
+
const resolvedBadge = !isShortEvent ? resolveEventBadge(event, language) : void 0;
|
|
2600
2696
|
const hasBadge = Boolean(resolvedBadge);
|
|
2601
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2602
2698
|
DraggableEvent,
|
|
2603
2699
|
{
|
|
2604
2700
|
key: `${event.id}-${day.toISOString()}`,
|
|
@@ -2613,7 +2709,7 @@ var WeekView = ({
|
|
|
2613
2709
|
paddingRight: count > 1 ? "2px" : "0"
|
|
2614
2710
|
}
|
|
2615
2711
|
},
|
|
2616
|
-
/* @__PURE__ */
|
|
2712
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2617
2713
|
ResizableEvent,
|
|
2618
2714
|
{
|
|
2619
2715
|
readonly,
|
|
@@ -2623,48 +2719,56 @@ var WeekView = ({
|
|
|
2623
2719
|
className: "h-full",
|
|
2624
2720
|
style: { height: "100%" }
|
|
2625
2721
|
},
|
|
2626
|
-
/* @__PURE__ */
|
|
2627
|
-
|
|
2722
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2723
|
+
EventHoverPopover,
|
|
2628
2724
|
{
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2633
|
-
!event.color && "border-primary/20 bg-primary/10",
|
|
2634
|
-
isShortEvent ? "px-1 flex items-center justify-center" : "p-2",
|
|
2635
|
-
// Reserve space under the badge so title/time do not overlap
|
|
2636
|
-
hasBadge && !isShortEvent && "pt-4",
|
|
2637
|
-
// Add active border for overlapped events to distinguish them
|
|
2638
|
-
count > 1 && "border-l-4 border-l-primary/50"
|
|
2639
|
-
),
|
|
2640
|
-
style: {
|
|
2641
|
-
height: "100%",
|
|
2642
|
-
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
2643
|
-
borderColor: event.color ? `${event.color}40` : void 0,
|
|
2644
|
-
borderLeftWidth: "3px",
|
|
2645
|
-
borderLeftColor: event.color || "var(--primary)"
|
|
2646
|
-
},
|
|
2647
|
-
onClick: (e) => {
|
|
2648
|
-
e.stopPropagation();
|
|
2649
|
-
onEventClick?.(event);
|
|
2650
|
-
},
|
|
2651
|
-
title: count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2725
|
+
enabled: isShortEvent,
|
|
2726
|
+
event,
|
|
2727
|
+
timeRange: `${format(zonedEventStart, eventTimeFormat, { locale })} - ${format(zonedEventEnd, eventTimeFormat, { locale })}`
|
|
2652
2728
|
},
|
|
2653
|
-
|
|
2654
|
-
|
|
2729
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2730
|
+
"div",
|
|
2655
2731
|
{
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2732
|
+
className: cn(
|
|
2733
|
+
"rounded-md border shadow-sm transition-all hover:shadow-md group overflow-hidden relative",
|
|
2734
|
+
"glass",
|
|
2735
|
+
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2736
|
+
!event.color && "border-primary/20 bg-primary/10",
|
|
2737
|
+
isShortEvent ? "px-1 flex items-center justify-center" : "p-2",
|
|
2738
|
+
// Reserve space under the badge so title/time do not overlap
|
|
2739
|
+
hasBadge && !isShortEvent && "pt-4",
|
|
2740
|
+
// Add active border for overlapped events to distinguish them
|
|
2741
|
+
count > 1 && "border-l-4 border-l-primary/50"
|
|
2742
|
+
),
|
|
2743
|
+
style: {
|
|
2744
|
+
height: "100%",
|
|
2745
|
+
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
2746
|
+
borderColor: event.color ? `${event.color}40` : void 0,
|
|
2747
|
+
borderLeftWidth: "3px",
|
|
2748
|
+
borderLeftColor: event.color || "var(--primary)"
|
|
2749
|
+
},
|
|
2750
|
+
onClick: (e) => {
|
|
2751
|
+
e.stopPropagation();
|
|
2752
|
+
onEventClick?.(event);
|
|
2753
|
+
},
|
|
2754
|
+
title: !isShortEvent && count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2755
|
+
},
|
|
2756
|
+
hasBadge && /* @__PURE__ */ React18__default.createElement(
|
|
2757
|
+
EventCardBadge,
|
|
2758
|
+
{
|
|
2759
|
+
badge: resolvedBadge,
|
|
2760
|
+
compact: false
|
|
2761
|
+
}
|
|
2762
|
+
),
|
|
2763
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col h-full overflow-hidden w-full" }, /* @__PURE__ */ React18__default.createElement("div", { className: cn(
|
|
2764
|
+
"font-semibold truncate text-foreground/90 leading-tight",
|
|
2765
|
+
isShortEvent ? "text-xs text-center" : "text-xs"
|
|
2766
|
+
) }, event.title), !isShortEvent && /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement("div", { className: "text-[10px] text-muted-foreground truncate mt-0.5 font-medium leading-tight" }, format(zonedEventStart, eventTimeFormat, { locale }), " - ", format(zonedEventEnd, eventTimeFormat, { locale })), event.description && height > 50 && /* @__PURE__ */ React18__default.createElement("div", { className: "text-[10px] text-muted-foreground/80 truncate mt-1 leading-tight opacity-80" }, event.description)), count > 1 && !isShortEvent && /* @__PURE__ */ React18__default.createElement("div", { className: "absolute top-1 right-1 bg-background/80 backdrop-blur-sm rounded-full w-4 h-4 flex items-center justify-center text-[9px] font-bold text-muted-foreground border border-border shadow-sm" }, count))
|
|
2767
|
+
)
|
|
2664
2768
|
)
|
|
2665
2769
|
)
|
|
2666
2770
|
);
|
|
2667
|
-
}), isToday(day) && /* @__PURE__ */
|
|
2771
|
+
}), isToday(day) && /* @__PURE__ */ React18__default.createElement(
|
|
2668
2772
|
"div",
|
|
2669
2773
|
{
|
|
2670
2774
|
className: "absolute left-0 right-0 z-20 pointer-events-none flex items-center",
|
|
@@ -2672,12 +2776,12 @@ var WeekView = ({
|
|
|
2672
2776
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2673
2777
|
}
|
|
2674
2778
|
},
|
|
2675
|
-
/* @__PURE__ */
|
|
2676
|
-
/* @__PURE__ */
|
|
2779
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "h-[2px] w-full bg-gradient-to-r from-primary via-primary to-primary/50" }),
|
|
2780
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "absolute -left-1.5 w-3 h-3 bg-primary rounded-full shadow-lg shadow-primary/40 ring-2 ring-background animate-pulse" })
|
|
2677
2781
|
));
|
|
2678
2782
|
}))
|
|
2679
2783
|
),
|
|
2680
|
-
/* @__PURE__ */
|
|
2784
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2681
2785
|
"div",
|
|
2682
2786
|
{
|
|
2683
2787
|
className: "absolute left-0 w-16 pointer-events-none z-30 flex justify-end pr-2",
|
|
@@ -2685,7 +2789,7 @@ var WeekView = ({
|
|
|
2685
2789
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight + 80}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight + 80}px`
|
|
2686
2790
|
}
|
|
2687
2791
|
},
|
|
2688
|
-
/* @__PURE__ */
|
|
2792
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "text-[10px] font-bold text-primary-foreground bg-primary px-1.5 py-0.5 rounded-md shadow-md -translate-y-1/2 backdrop-blur-none" }, format(zonedNow, nowFormat, { locale }))
|
|
2689
2793
|
)
|
|
2690
2794
|
));
|
|
2691
2795
|
};
|
|
@@ -2700,17 +2804,18 @@ var DayView = ({
|
|
|
2700
2804
|
readonly,
|
|
2701
2805
|
language = "tr",
|
|
2702
2806
|
initialScrollHour = 8,
|
|
2703
|
-
reverseTime = false
|
|
2807
|
+
reverseTime = false,
|
|
2808
|
+
compactShortEvents = true
|
|
2704
2809
|
}) => {
|
|
2705
2810
|
const hours = reverseTime ? Array.from({ length: 24 }, (_, i) => 23 - i) : Array.from({ length: 24 }, (_, i) => i);
|
|
2706
2811
|
const hourHeight = 80;
|
|
2707
|
-
const scrollContainerRef =
|
|
2708
|
-
const [now, setNow] =
|
|
2709
|
-
|
|
2812
|
+
const scrollContainerRef = React18__default.useRef(null);
|
|
2813
|
+
const [now, setNow] = React18__default.useState(/* @__PURE__ */ new Date());
|
|
2814
|
+
React18__default.useEffect(() => {
|
|
2710
2815
|
const interval = setInterval(() => setNow(/* @__PURE__ */ new Date()), 6e4);
|
|
2711
2816
|
return () => clearInterval(interval);
|
|
2712
2817
|
}, []);
|
|
2713
|
-
|
|
2818
|
+
React18__default.useEffect(() => {
|
|
2714
2819
|
if (scrollContainerRef.current) {
|
|
2715
2820
|
scrollContainerRef.current.scrollTop = reverseTime ? (23 - initialScrollHour) * hourHeight : initialScrollHour * hourHeight;
|
|
2716
2821
|
}
|
|
@@ -2726,15 +2831,15 @@ var DayView = ({
|
|
|
2726
2831
|
const timeFormat = getTimeFormat(language);
|
|
2727
2832
|
const eventTimeFormat = getTimeFormatFull(language);
|
|
2728
2833
|
const nowFormat = getTimeFormatFull(language);
|
|
2729
|
-
return /* @__PURE__ */
|
|
2834
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background border-[0.5px] border-border/50 rounded-2xl overflow-hidden shadow-sm" }, /* @__PURE__ */ React18__default.createElement("div", { className: "px-6 py-4 border-b-[0.5px] border-border/50 bg-gradient-to-r from-muted/20 via-background to-muted/20 text-center shrink-0" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center justify-center gap-3" }, /* @__PURE__ */ React18__default.createElement("h2", { className: "text-xl font-semibold capitalize text-foreground" }, format(currentDate, "EEEE, MMMM d, yyyy", { locale })), isToday(currentDate) && /* @__PURE__ */ React18__default.createElement("span", { className: "text-xs font-semibold bg-primary text-primary-foreground px-3 py-1 rounded-full shadow-md shadow-primary/20" }, "Today"))), /* @__PURE__ */ React18__default.createElement("div", { ref: scrollContainerRef, className: "flex-1 min-h-0 overflow-y-auto relative" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex relative", style: { height: hours.length * hourHeight } }, /* @__PURE__ */ React18__default.createElement("div", { className: "w-20 bg-muted/5 border-r-[0.5px] border-border/30 relative" }, hours.map((hour) => /* @__PURE__ */ React18__default.createElement(
|
|
2730
2835
|
"div",
|
|
2731
2836
|
{
|
|
2732
2837
|
key: hour,
|
|
2733
2838
|
className: "relative w-full",
|
|
2734
2839
|
style: { height: hourHeight }
|
|
2735
2840
|
},
|
|
2736
|
-
hour !== 0 && /* @__PURE__ */
|
|
2737
|
-
)), isToday(currentDate) && /* @__PURE__ */
|
|
2841
|
+
hour !== 0 && /* @__PURE__ */ React18__default.createElement("span", { className: "absolute w-full text-center -top-3 left-1/2 -translate-x-1/2 text-[11px] text-muted-foreground/80 font-medium tabular-nums bg-background px-1.5 py-0.5 rounded-md" }, format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale }))
|
|
2842
|
+
)), isToday(currentDate) && /* @__PURE__ */ React18__default.createElement(
|
|
2738
2843
|
"div",
|
|
2739
2844
|
{
|
|
2740
2845
|
className: "absolute left-0 w-full pointer-events-none z-30 flex justify-end pr-2",
|
|
@@ -2742,9 +2847,9 @@ var DayView = ({
|
|
|
2742
2847
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2743
2848
|
}
|
|
2744
2849
|
},
|
|
2745
|
-
/* @__PURE__ */
|
|
2746
|
-
)), /* @__PURE__ */
|
|
2747
|
-
return /* @__PURE__ */
|
|
2850
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "text-[10px] font-bold text-white bg-primary px-2 py-1 rounded-lg shadow-md shadow-primary/30 -translate-y-1/2" }, format(zonedNow, nowFormat, { locale }))
|
|
2851
|
+
)), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 relative" }, hours.map((hour) => {
|
|
2852
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2748
2853
|
"div",
|
|
2749
2854
|
{
|
|
2750
2855
|
key: hour,
|
|
@@ -2755,7 +2860,7 @@ var DayView = ({
|
|
|
2755
2860
|
const cellDate = new Date(currentDate);
|
|
2756
2861
|
cellDate.setHours(hour, minute, 0, 0);
|
|
2757
2862
|
const cellId = cellDate.toISOString();
|
|
2758
|
-
return /* @__PURE__ */
|
|
2863
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2759
2864
|
DroppableCell,
|
|
2760
2865
|
{
|
|
2761
2866
|
key: minute,
|
|
@@ -2767,7 +2872,7 @@ var DayView = ({
|
|
|
2767
2872
|
top: `${minute / 60 * 100}%`
|
|
2768
2873
|
}
|
|
2769
2874
|
},
|
|
2770
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2771
2876
|
"div",
|
|
2772
2877
|
{
|
|
2773
2878
|
className: "h-full w-full bg-transparent cursor-pointer",
|
|
@@ -2799,8 +2904,9 @@ var DayView = ({
|
|
|
2799
2904
|
const durationMinutes = differenceInMinutes(zonedEnd, zonedStart);
|
|
2800
2905
|
const height = durationMinutes / 60 * hourHeight;
|
|
2801
2906
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2802
|
-
const isShortEvent = durationMinutes < 45;
|
|
2803
|
-
|
|
2907
|
+
const isShortEvent = compactShortEvents && durationMinutes < 45;
|
|
2908
|
+
const timeRange = `${format(zonedStart, eventTimeFormat, { locale })} - ${format(zonedEnd, eventTimeFormat, { locale })}`;
|
|
2909
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2804
2910
|
DraggableEvent,
|
|
2805
2911
|
{
|
|
2806
2912
|
key: `${event.id}-${currentDate.toISOString()}`,
|
|
@@ -2814,7 +2920,7 @@ var DayView = ({
|
|
|
2814
2920
|
paddingRight: count > 1 ? "2px" : "0"
|
|
2815
2921
|
}
|
|
2816
2922
|
},
|
|
2817
|
-
/* @__PURE__ */
|
|
2923
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2818
2924
|
ResizableEvent,
|
|
2819
2925
|
{
|
|
2820
2926
|
readonly,
|
|
@@ -2824,38 +2930,46 @@ var DayView = ({
|
|
|
2824
2930
|
className: "h-full",
|
|
2825
2931
|
style: { height: "100%" }
|
|
2826
2932
|
},
|
|
2827
|
-
/* @__PURE__ */
|
|
2828
|
-
|
|
2933
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2934
|
+
EventHoverPopover,
|
|
2829
2935
|
{
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2834
|
-
!event.color && "bg-primary/10 border-primary/20",
|
|
2835
|
-
isShortEvent ? "px-2 flex items-center" : "px-3 py-2",
|
|
2836
|
-
count > 1 && "border-l-4"
|
|
2837
|
-
),
|
|
2838
|
-
style: {
|
|
2839
|
-
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
2840
|
-
borderColor: event.color ? `${event.color}30` : void 0,
|
|
2841
|
-
borderLeftColor: event.color || "var(--primary)",
|
|
2842
|
-
borderLeftWidth: count > 1 ? "4px" : "3px"
|
|
2843
|
-
},
|
|
2844
|
-
onClick: (e) => {
|
|
2845
|
-
e.stopPropagation();
|
|
2846
|
-
onEventClick?.(event);
|
|
2847
|
-
},
|
|
2848
|
-
title: count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2936
|
+
enabled: isShortEvent,
|
|
2937
|
+
event,
|
|
2938
|
+
timeRange
|
|
2849
2939
|
},
|
|
2850
|
-
/* @__PURE__ */
|
|
2851
|
-
"
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2940
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2941
|
+
"div",
|
|
2942
|
+
{
|
|
2943
|
+
className: cn(
|
|
2944
|
+
"h-full rounded-lg border-[0.5px] shadow-sm overflow-hidden transition-all hover:shadow-lg hover:z-20 group",
|
|
2945
|
+
"glass backdrop-blur-sm",
|
|
2946
|
+
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2947
|
+
!event.color && "bg-primary/10 border-primary/20",
|
|
2948
|
+
isShortEvent ? "px-2 flex items-center" : "px-3 py-2",
|
|
2949
|
+
count > 1 && "border-l-4"
|
|
2950
|
+
),
|
|
2951
|
+
style: {
|
|
2952
|
+
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
2953
|
+
borderColor: event.color ? `${event.color}30` : void 0,
|
|
2954
|
+
borderLeftColor: event.color || "var(--primary)",
|
|
2955
|
+
borderLeftWidth: count > 1 ? "4px" : "3px"
|
|
2956
|
+
},
|
|
2957
|
+
onClick: (e) => {
|
|
2958
|
+
e.stopPropagation();
|
|
2959
|
+
onEventClick?.(event);
|
|
2960
|
+
},
|
|
2961
|
+
title: !isShortEvent && count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2962
|
+
},
|
|
2963
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col h-full overflow-hidden w-full" }, /* @__PURE__ */ React18__default.createElement("div", { className: cn(
|
|
2964
|
+
"font-semibold truncate leading-tight",
|
|
2965
|
+
isShortEvent ? "text-xs" : "text-sm",
|
|
2966
|
+
event.color ? "text-foreground" : "text-foreground/90"
|
|
2967
|
+
) }, event.title), !isShortEvent && /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement("div", { className: "text-xs text-muted-foreground mt-0.5 font-medium" }, timeRange), event.description && height > 60 && /* @__PURE__ */ React18__default.createElement("div", { className: "text-xs text-muted-foreground/80 mt-1 line-clamp-2" }, event.description)), count > 1 && !isShortEvent && /* @__PURE__ */ React18__default.createElement("div", { className: "absolute top-1.5 right-1.5 bg-background/90 backdrop-blur-sm rounded-full w-5 h-5 flex items-center justify-center text-[10px] font-bold text-muted-foreground border border-border shadow-sm" }, count))
|
|
2968
|
+
)
|
|
2855
2969
|
)
|
|
2856
2970
|
)
|
|
2857
2971
|
);
|
|
2858
|
-
}), isToday(currentDate) && /* @__PURE__ */
|
|
2972
|
+
}), isToday(currentDate) && /* @__PURE__ */ React18__default.createElement(
|
|
2859
2973
|
"div",
|
|
2860
2974
|
{
|
|
2861
2975
|
className: "absolute left-0 right-0 z-20 pointer-events-none flex items-center",
|
|
@@ -2863,17 +2977,17 @@ var DayView = ({
|
|
|
2863
2977
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2864
2978
|
}
|
|
2865
2979
|
},
|
|
2866
|
-
/* @__PURE__ */
|
|
2867
|
-
/* @__PURE__ */
|
|
2980
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "h-[2px] w-full bg-gradient-to-r from-primary via-primary to-primary/50" }),
|
|
2981
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "absolute -left-1.5 w-3 h-3 bg-primary rounded-full shadow-lg shadow-primary/40 ring-2 ring-background animate-pulse" })
|
|
2868
2982
|
)))));
|
|
2869
2983
|
};
|
|
2870
|
-
var AgendaEmptyState = ({ onCreateEvent, translations }) => /* @__PURE__ */
|
|
2984
|
+
var AgendaEmptyState = ({ onCreateEvent, translations }) => /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col items-center justify-center h-full min-h-[400px] py-12" }, /* @__PURE__ */ React18__default.createElement("div", { className: "relative mb-8" }, /* @__PURE__ */ React18__default.createElement("div", { className: "p-8 bg-gradient-to-br from-green-50 to-blue-50 dark:from-green-900/10 dark:to-blue-900/10 rounded-3xl border border-border/30" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React18__default.createElement("div", { className: "w-12 h-12 rounded-2xl bg-green-100 dark:bg-green-900/30 flex items-center justify-center" }, /* @__PURE__ */ React18__default.createElement("svg", { className: "w-6 h-6 text-green-600 dark:text-green-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2 }, /* @__PURE__ */ React18__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }))), /* @__PURE__ */ React18__default.createElement("div", { className: "text-left" }, /* @__PURE__ */ React18__default.createElement("div", { className: "font-medium text-foreground" }, "All caught up!"), /* @__PURE__ */ React18__default.createElement("div", { className: "text-sm text-muted-foreground" }, "No events scheduled"))))), /* @__PURE__ */ React18__default.createElement("div", { className: "text-center max-w-sm" }, /* @__PURE__ */ React18__default.createElement("h3", { className: "text-lg font-semibold text-foreground mb-2" }, translations?.noUpcoming || "Your schedule is clear"), /* @__PURE__ */ React18__default.createElement("p", { className: "text-sm text-muted-foreground mb-6" }, "No upcoming events to show. Create a new event to start planning."), onCreateEvent && /* @__PURE__ */ React18__default.createElement(
|
|
2871
2985
|
"button",
|
|
2872
2986
|
{
|
|
2873
2987
|
onClick: onCreateEvent,
|
|
2874
2988
|
className: "inline-flex items-center gap-2 px-5 py-2.5 bg-primary text-primary-foreground rounded-xl font-medium text-sm shadow-lg shadow-primary/20 hover:shadow-xl hover:shadow-primary/30 hover:scale-105 active:scale-95 transition-all duration-200"
|
|
2875
2989
|
},
|
|
2876
|
-
/* @__PURE__ */
|
|
2990
|
+
/* @__PURE__ */ React18__default.createElement(Plus, { className: "w-4 h-4" }),
|
|
2877
2991
|
translations?.createEvent || "Create Event"
|
|
2878
2992
|
)));
|
|
2879
2993
|
var formatDuration = (start, end) => {
|
|
@@ -2925,7 +3039,7 @@ var AgendaView = ({
|
|
|
2925
3039
|
hidden: { opacity: 0, x: -20 },
|
|
2926
3040
|
show: { opacity: 1, x: 0 }
|
|
2927
3041
|
};
|
|
2928
|
-
return /* @__PURE__ */
|
|
3042
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background overflow-y-auto" }, groupedEvents.length === 0 ? renderEmptyState ? renderEmptyState({ view: "agenda", onCreateEvent }) : /* @__PURE__ */ React18__default.createElement(AgendaEmptyState, { onCreateEvent }) : /* @__PURE__ */ React18__default.createElement(
|
|
2929
3043
|
motion.div,
|
|
2930
3044
|
{
|
|
2931
3045
|
className: "max-w-3xl mx-auto w-full pb-10 px-4 md:px-6",
|
|
@@ -2933,21 +3047,21 @@ var AgendaView = ({
|
|
|
2933
3047
|
initial: "hidden",
|
|
2934
3048
|
animate: "show"
|
|
2935
3049
|
},
|
|
2936
|
-
groupedEvents.map((group, groupIndex) => /* @__PURE__ */
|
|
3050
|
+
groupedEvents.map((group, groupIndex) => /* @__PURE__ */ React18__default.createElement(
|
|
2937
3051
|
motion.div,
|
|
2938
3052
|
{
|
|
2939
3053
|
key: group.date.toISOString(),
|
|
2940
3054
|
className: "relative",
|
|
2941
3055
|
variants: item
|
|
2942
3056
|
},
|
|
2943
|
-
/* @__PURE__ */
|
|
3057
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "sticky top-0 bg-background/95 backdrop-blur-md py-4 z-10 border-b border-border/50" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React18__default.createElement("div", { className: cn(
|
|
2944
3058
|
"flex flex-col items-center justify-center w-16 h-16 rounded-2xl transition-all",
|
|
2945
3059
|
isToday(group.date) ? "bg-primary text-primary-foreground shadow-lg shadow-primary/30" : "bg-muted/50 text-foreground"
|
|
2946
|
-
) }, /* @__PURE__ */
|
|
3060
|
+
) }, /* @__PURE__ */ React18__default.createElement("span", { className: "text-2xl font-bold leading-none" }, format(group.date, "d")), /* @__PURE__ */ React18__default.createElement("span", { className: "text-xs font-medium uppercase tracking-wide opacity-80" }, format(group.date, "MMM"))), /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React18__default.createElement("span", { className: cn(
|
|
2947
3061
|
"text-lg font-semibold",
|
|
2948
3062
|
isToday(group.date) && "text-primary"
|
|
2949
|
-
) }, getDateLabel(group.date, translations?.today ?? "Today", translations?.tomorrow ?? "Tomorrow")), /* @__PURE__ */
|
|
2950
|
-
/* @__PURE__ */
|
|
3063
|
+
) }, getDateLabel(group.date, translations?.today ?? "Today", translations?.tomorrow ?? "Tomorrow")), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm text-muted-foreground" }, group.events.length, " ", group.events.length !== 1 ? translations?.eventsCount ?? "events" : translations?.eventCount ?? "event")))),
|
|
3064
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "py-4 space-y-3" }, group.events.map((event, eventIndex) => /* @__PURE__ */ React18__default.createElement(
|
|
2951
3065
|
motion.div,
|
|
2952
3066
|
{
|
|
2953
3067
|
key: event.id,
|
|
@@ -2961,22 +3075,22 @@ var AgendaView = ({
|
|
|
2961
3075
|
whileHover: { scale: 1.01, y: -2 },
|
|
2962
3076
|
transition: { duration: 0.2 }
|
|
2963
3077
|
},
|
|
2964
|
-
/* @__PURE__ */
|
|
3078
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2965
3079
|
"div",
|
|
2966
3080
|
{
|
|
2967
3081
|
className: "absolute left-0 top-3 bottom-3 w-1 rounded-full",
|
|
2968
3082
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
2969
3083
|
}
|
|
2970
3084
|
),
|
|
2971
|
-
/* @__PURE__ */
|
|
2972
|
-
/* @__PURE__ */
|
|
3085
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col items-center min-w-[70px] pl-2" }, event.allDay ? /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React18__default.createElement("span", { className: "text-xs font-semibold text-muted-foreground bg-muted/80 px-2.5 py-1 rounded-full" }, translations?.allDay ?? "All Day")) : /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React18__default.createElement("span", { className: "text-base font-semibold text-foreground" }, format(event.start, timeFmt)), /* @__PURE__ */ React18__default.createElement("div", { className: "w-px h-3 bg-border my-1" }), /* @__PURE__ */ React18__default.createElement("span", { className: "text-xs text-muted-foreground/70 font-medium" }, formatDuration(event.start, event.end)))),
|
|
3086
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 min-w-0 space-y-2" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-start justify-between gap-2" }, /* @__PURE__ */ React18__default.createElement("h4", { className: "text-base font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-1" }, event.title), /* @__PURE__ */ React18__default.createElement(
|
|
2973
3087
|
"div",
|
|
2974
3088
|
{
|
|
2975
3089
|
className: "w-3 h-3 rounded-full shrink-0 mt-1.5",
|
|
2976
3090
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
2977
3091
|
}
|
|
2978
|
-
)), event.description && /* @__PURE__ */
|
|
2979
|
-
/* @__PURE__ */
|
|
3092
|
+
)), event.description && /* @__PURE__ */ React18__default.createElement("p", { className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed" }, event.description), /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-wrap items-center gap-3 pt-1" }, !event.allDay && /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React18__default.createElement(Clock, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React18__default.createElement("span", null, format(event.start, timeFmt), " - ", format(event.end, timeFmt))), event.guests && event.guests.length > 0 && /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React18__default.createElement(Users, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React18__default.createElement("span", null, event.guests.length, " ", event.guests.length !== 1 ? translations?.guestsCount ?? "guests" : translations?.guestCount ?? "guest")), event.attachments && event.attachments.length > 0 && /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React18__default.createElement(Paperclip, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React18__default.createElement("span", null, event.attachments.length)), event.reminders && event.reminders.length > 0 && /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React18__default.createElement(Bell, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React18__default.createElement("span", null, event.reminders.length)))),
|
|
3093
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "absolute right-4 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity" }, /* @__PURE__ */ React18__default.createElement("svg", { className: "w-5 h-5 text-muted-foreground", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React18__default.createElement("path", { d: "M9 18l6-6-6-6" })))
|
|
2980
3094
|
)))
|
|
2981
3095
|
))
|
|
2982
3096
|
));
|
|
@@ -3008,7 +3122,7 @@ var ResourceView = ({
|
|
|
3008
3122
|
// Min width for visibility
|
|
3009
3123
|
};
|
|
3010
3124
|
};
|
|
3011
|
-
return /* @__PURE__ */
|
|
3125
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background overflow-hidden" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex border-b border-border bg-muted/20" }, /* @__PURE__ */ React18__default.createElement("div", { className: "w-48 shrink-0 border-r border-border p-4 font-semibold text-sm bg-background sticky left-0 z-20" }, "Resources"), /* @__PURE__ */ React18__default.createElement("div", { className: "flex overflow-hidden" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex relative", style: { width: hours.length * hourWidth } }, hours.map((hour) => /* @__PURE__ */ React18__default.createElement(
|
|
3012
3126
|
"div",
|
|
3013
3127
|
{
|
|
3014
3128
|
key: hour,
|
|
@@ -3016,11 +3130,11 @@ var ResourceView = ({
|
|
|
3016
3130
|
style: { width: hourWidth }
|
|
3017
3131
|
},
|
|
3018
3132
|
format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale })
|
|
3019
|
-
))))), /* @__PURE__ */
|
|
3133
|
+
))))), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 min-h-0 overflow-auto relative", ref: containerRef }, /* @__PURE__ */ React18__default.createElement("div", { className: "min-w-fit" }, resources.map((resource) => {
|
|
3020
3134
|
const resourceEvents = events.filter(
|
|
3021
3135
|
(e) => e.resourceId === resource.id && isSameDay(new Date(e.start), currentDate)
|
|
3022
3136
|
);
|
|
3023
|
-
return /* @__PURE__ */
|
|
3137
|
+
return /* @__PURE__ */ React18__default.createElement("div", { key: resource.id, className: "flex border-b border-border min-h-[100px]" }, /* @__PURE__ */ React18__default.createElement("div", { className: "w-48 shrink-0 border-r border-border p-4 bg-background sticky left-0 z-10 flex items-center gap-3" }, resource.avatar ? /* @__PURE__ */ React18__default.createElement("img", { src: resource.avatar, alt: resource.label, className: "w-8 h-8 rounded-full object-cover" }) : /* @__PURE__ */ React18__default.createElement("div", { className: "w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-xs font-bold text-primary" }, resource.label.substring(0, 2).toUpperCase()), /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-medium" }, resource.label), /* @__PURE__ */ React18__default.createElement("span", { className: "text-xs text-muted-foreground" }, "ID: ", resource.id))), /* @__PURE__ */ React18__default.createElement("div", { className: "relative flex", style: { width: hours.length * hourWidth } }, hours.map((hour) => /* @__PURE__ */ React18__default.createElement(
|
|
3024
3138
|
"div",
|
|
3025
3139
|
{
|
|
3026
3140
|
key: hour,
|
|
@@ -3031,7 +3145,7 @@ var ResourceView = ({
|
|
|
3031
3145
|
const slotDate = new Date(currentDate);
|
|
3032
3146
|
slotDate.setHours(hour, minute, 0, 0);
|
|
3033
3147
|
const slotId = `${resource.id}-${slotDate.toISOString()}`;
|
|
3034
|
-
return /* @__PURE__ */
|
|
3148
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
3035
3149
|
DroppableCell,
|
|
3036
3150
|
{
|
|
3037
3151
|
key: minute,
|
|
@@ -3045,7 +3159,7 @@ var ResourceView = ({
|
|
|
3045
3159
|
}
|
|
3046
3160
|
);
|
|
3047
3161
|
})
|
|
3048
|
-
)), resourceEvents.map((event) => /* @__PURE__ */
|
|
3162
|
+
)), resourceEvents.map((event) => /* @__PURE__ */ React18__default.createElement(
|
|
3049
3163
|
DraggableEvent,
|
|
3050
3164
|
{
|
|
3051
3165
|
key: event.id,
|
|
@@ -3062,7 +3176,7 @@ var ResourceView = ({
|
|
|
3062
3176
|
color: "#fff"
|
|
3063
3177
|
}
|
|
3064
3178
|
},
|
|
3065
|
-
/* @__PURE__ */
|
|
3179
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "truncate" }, event.title)
|
|
3066
3180
|
))));
|
|
3067
3181
|
}))));
|
|
3068
3182
|
};
|
|
@@ -3089,14 +3203,14 @@ var Modal = ({
|
|
|
3089
3203
|
};
|
|
3090
3204
|
}, [isOpen, onClose]);
|
|
3091
3205
|
if (!isOpen) return null;
|
|
3092
|
-
return /* @__PURE__ */
|
|
3206
|
+
return /* @__PURE__ */ React18__default.createElement("div", { className: "absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/40 backdrop-blur-md animate-in fade-in duration-300" }, /* @__PURE__ */ React18__default.createElement(
|
|
3093
3207
|
"div",
|
|
3094
3208
|
{
|
|
3095
3209
|
ref: overlayRef,
|
|
3096
3210
|
className: "absolute inset-0",
|
|
3097
3211
|
onClick: onClose
|
|
3098
3212
|
}
|
|
3099
|
-
), /* @__PURE__ */
|
|
3213
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3100
3214
|
"div",
|
|
3101
3215
|
{
|
|
3102
3216
|
className: cn(
|
|
@@ -3104,7 +3218,7 @@ var Modal = ({
|
|
|
3104
3218
|
className
|
|
3105
3219
|
)
|
|
3106
3220
|
},
|
|
3107
|
-
!hideHeader && /* @__PURE__ */
|
|
3221
|
+
!hideHeader && /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border/50 shrink-0 bg-gradient-to-r from-muted/20 to-background" }, /* @__PURE__ */ React18__default.createElement("h3", { className: "text-lg font-semibold text-foreground" }, title), /* @__PURE__ */ React18__default.createElement(
|
|
3108
3222
|
Button,
|
|
3109
3223
|
{
|
|
3110
3224
|
variant: "ghost",
|
|
@@ -3112,10 +3226,10 @@ var Modal = ({
|
|
|
3112
3226
|
onClick: onClose,
|
|
3113
3227
|
className: "h-9 w-9 p-0 rounded-xl hover:bg-accent/80 transition-all duration-200"
|
|
3114
3228
|
},
|
|
3115
|
-
/* @__PURE__ */
|
|
3116
|
-
/* @__PURE__ */
|
|
3229
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "h-4 w-4" }),
|
|
3230
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "sr-only" }, "Close")
|
|
3117
3231
|
)),
|
|
3118
|
-
/* @__PURE__ */
|
|
3232
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: cn("overflow-y-auto flex-1", !hideHeader && "p-6") }, children)
|
|
3119
3233
|
));
|
|
3120
3234
|
};
|
|
3121
3235
|
var COLOR_PALETTE = [
|
|
@@ -3316,7 +3430,7 @@ var EventModal = ({
|
|
|
3316
3430
|
if (remainingMins === 0) return `${hours} hr`;
|
|
3317
3431
|
return `${hours} hr ${remainingMins} min`;
|
|
3318
3432
|
};
|
|
3319
|
-
const renderViewMode = () => /* @__PURE__ */
|
|
3433
|
+
const renderViewMode = () => /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col bg-background overflow-hidden w-full max-h-[90vh]" }, /* @__PURE__ */ React18__default.createElement(
|
|
3320
3434
|
"div",
|
|
3321
3435
|
{
|
|
3322
3436
|
className: "relative px-6 pt-6 pb-8",
|
|
@@ -3324,50 +3438,50 @@ var EventModal = ({
|
|
|
3324
3438
|
background: `linear-gradient(135deg, ${event?.color || "#3b82f6"}15 0%, transparent 100%)`
|
|
3325
3439
|
}
|
|
3326
3440
|
},
|
|
3327
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center justify-between mb-6" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(
|
|
3328
3442
|
"div",
|
|
3329
3443
|
{
|
|
3330
3444
|
className: "w-3 h-3 rounded-full",
|
|
3331
3445
|
style: { backgroundColor: event?.color || "#3b82f6" }
|
|
3332
3446
|
}
|
|
3333
|
-
), /* @__PURE__ */
|
|
3447
|
+
), /* @__PURE__ */ React18__default.createElement("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider" }, calendars?.find((c) => c.id === event?.calendarId)?.label || "Event")), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React18__default.createElement(
|
|
3334
3448
|
"button",
|
|
3335
3449
|
{
|
|
3336
3450
|
onClick: () => setMode("edit"),
|
|
3337
3451
|
className: "p-2 hover:bg-background/80 rounded-lg transition-all text-muted-foreground hover:text-foreground",
|
|
3338
3452
|
title: "Edit"
|
|
3339
3453
|
},
|
|
3340
|
-
/* @__PURE__ */
|
|
3341
|
-
), /* @__PURE__ */
|
|
3454
|
+
/* @__PURE__ */ React18__default.createElement(Edit2, { className: "w-4 h-4" })
|
|
3455
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3342
3456
|
"button",
|
|
3343
3457
|
{
|
|
3344
3458
|
onClick: handleDelete,
|
|
3345
3459
|
className: "p-2 hover:bg-destructive/10 rounded-lg transition-all text-muted-foreground hover:text-destructive",
|
|
3346
3460
|
title: "Delete"
|
|
3347
3461
|
},
|
|
3348
|
-
/* @__PURE__ */
|
|
3349
|
-
), /* @__PURE__ */
|
|
3462
|
+
/* @__PURE__ */ React18__default.createElement(Trash2, { className: "w-4 h-4" })
|
|
3463
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3350
3464
|
"button",
|
|
3351
3465
|
{
|
|
3352
3466
|
onClick: onClose,
|
|
3353
3467
|
className: "p-2 hover:bg-background/80 rounded-lg transition-all text-muted-foreground hover:text-foreground",
|
|
3354
3468
|
title: "Close"
|
|
3355
3469
|
},
|
|
3356
|
-
/* @__PURE__ */
|
|
3470
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "w-4 h-4" })
|
|
3357
3471
|
))),
|
|
3358
|
-
/* @__PURE__ */
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
), /* @__PURE__ */
|
|
3472
|
+
/* @__PURE__ */ React18__default.createElement("h1", { className: "text-2xl font-bold text-foreground mb-3 leading-tight" }, event?.title || translations.noTitle),
|
|
3473
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-3 text-sm" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-background/60 backdrop-blur-sm rounded-lg border border-border/30" }, /* @__PURE__ */ React18__default.createElement(Calendar, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__default.createElement("span", { className: "font-medium" }, event?.start && format(new Date(event.start), "EEE, MMM d"))), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-background/60 backdrop-blur-sm rounded-lg border border-border/30" }, /* @__PURE__ */ React18__default.createElement(Clock, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__default.createElement("span", { className: "font-medium" }, event?.start && format(new Date(event.start), timeFmt), " \u2013 ", event?.end && format(new Date(event.end), timeFmt))))
|
|
3474
|
+
), /* @__PURE__ */ React18__default.createElement("div", { className: "px-6 pb-6 space-y-4 overflow-y-auto flex-1" }, event?.location && /* @__PURE__ */ React18__default.createElement(
|
|
3361
3475
|
motion.div,
|
|
3362
3476
|
{
|
|
3363
3477
|
initial: { opacity: 0, y: 10 },
|
|
3364
3478
|
animate: { opacity: 1, y: 0 },
|
|
3365
3479
|
className: "flex items-start gap-3 p-4 rounded-2xl bg-muted/30 border border-border/30 group hover:bg-muted/50 transition-all cursor-pointer"
|
|
3366
3480
|
},
|
|
3367
|
-
/* @__PURE__ */
|
|
3368
|
-
/* @__PURE__ */
|
|
3369
|
-
/* @__PURE__ */
|
|
3370
|
-
), event?.guests && event.guests.length > 0 && /* @__PURE__ */
|
|
3481
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "p-2 bg-primary/10 rounded-xl" }, /* @__PURE__ */ React18__default.createElement(MapPin, { className: "w-5 h-5 text-primary" })),
|
|
3482
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React18__default.createElement("p", { className: "text-sm font-medium text-foreground" }, event.location), /* @__PURE__ */ React18__default.createElement("p", { className: "text-xs text-muted-foreground mt-0.5" }, translations.clickToOpenInMaps)),
|
|
3483
|
+
/* @__PURE__ */ React18__default.createElement(ExternalLink, { className: "w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
3484
|
+
), event?.guests && event.guests.length > 0 && /* @__PURE__ */ React18__default.createElement(
|
|
3371
3485
|
motion.div,
|
|
3372
3486
|
{
|
|
3373
3487
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3375,14 +3489,14 @@ var EventModal = ({
|
|
|
3375
3489
|
transition: { delay: 0.05 },
|
|
3376
3490
|
className: "space-y-3"
|
|
3377
3491
|
},
|
|
3378
|
-
/* @__PURE__ */
|
|
3379
|
-
/* @__PURE__ */
|
|
3492
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(Users, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-medium text-foreground" }, event.guests.length, " ", event.guests.length > 1 ? translations.guestsCount : translations.guestCount))),
|
|
3493
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-wrap gap-2" }, event.guests.map((email, index) => /* @__PURE__ */ React18__default.createElement(
|
|
3380
3494
|
"div",
|
|
3381
3495
|
{
|
|
3382
3496
|
key: index,
|
|
3383
3497
|
className: "flex items-center gap-2 px-3 py-2 rounded-xl bg-muted/30 border border-border/30 hover:bg-muted/50 transition-all cursor-pointer group"
|
|
3384
3498
|
},
|
|
3385
|
-
/* @__PURE__ */
|
|
3499
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3386
3500
|
"div",
|
|
3387
3501
|
{
|
|
3388
3502
|
className: "w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold text-white",
|
|
@@ -3390,9 +3504,9 @@ var EventModal = ({
|
|
|
3390
3504
|
},
|
|
3391
3505
|
email[0].toUpperCase()
|
|
3392
3506
|
),
|
|
3393
|
-
/* @__PURE__ */
|
|
3507
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React18__default.createElement("p", { className: "text-sm font-medium text-foreground" }, email.split("@")[0]), /* @__PURE__ */ React18__default.createElement("p", { className: "text-xs text-muted-foreground truncate" }, email))
|
|
3394
3508
|
)))
|
|
3395
|
-
), event?.reminders && event.reminders.length > 0 && /* @__PURE__ */
|
|
3509
|
+
), event?.reminders && event.reminders.length > 0 && /* @__PURE__ */ React18__default.createElement(
|
|
3396
3510
|
motion.div,
|
|
3397
3511
|
{
|
|
3398
3512
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3400,8 +3514,8 @@ var EventModal = ({
|
|
|
3400
3514
|
transition: { delay: 0.1 },
|
|
3401
3515
|
className: "flex items-center gap-3"
|
|
3402
3516
|
},
|
|
3403
|
-
/* @__PURE__ */
|
|
3404
|
-
/* @__PURE__ */
|
|
3517
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "p-2 bg-amber-500/10 rounded-xl" }, /* @__PURE__ */ React18__default.createElement(Bell, { className: "w-4 h-4 text-amber-500" })),
|
|
3518
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-wrap gap-2" }, event.reminders.map((reminder) => /* @__PURE__ */ React18__default.createElement(
|
|
3405
3519
|
"span",
|
|
3406
3520
|
{
|
|
3407
3521
|
key: reminder.id,
|
|
@@ -3409,7 +3523,7 @@ var EventModal = ({
|
|
|
3409
3523
|
},
|
|
3410
3524
|
reminder.label || `${reminder.time} min before`
|
|
3411
3525
|
)))
|
|
3412
|
-
), event?.description && /* @__PURE__ */
|
|
3526
|
+
), event?.description && /* @__PURE__ */ React18__default.createElement(
|
|
3413
3527
|
motion.div,
|
|
3414
3528
|
{
|
|
3415
3529
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3417,9 +3531,9 @@ var EventModal = ({
|
|
|
3417
3531
|
transition: { delay: 0.15 },
|
|
3418
3532
|
className: "space-y-2"
|
|
3419
3533
|
},
|
|
3420
|
-
/* @__PURE__ */
|
|
3421
|
-
/* @__PURE__ */
|
|
3422
|
-
), event?.attachments && event.attachments.length > 0 && /* @__PURE__ */
|
|
3534
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(AlignLeft, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.notes)),
|
|
3535
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "text-sm text-foreground/80 whitespace-pre-wrap leading-relaxed pl-6 p-3 rounded-xl bg-muted/20 border border-border/30" }, event.description)
|
|
3536
|
+
), event?.attachments && event.attachments.length > 0 && /* @__PURE__ */ React18__default.createElement(
|
|
3423
3537
|
motion.div,
|
|
3424
3538
|
{
|
|
3425
3539
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3427,27 +3541,27 @@ var EventModal = ({
|
|
|
3427
3541
|
transition: { delay: 0.2 },
|
|
3428
3542
|
className: "space-y-2"
|
|
3429
3543
|
},
|
|
3430
|
-
/* @__PURE__ */
|
|
3431
|
-
/* @__PURE__ */
|
|
3544
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(Paperclip, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.attachments)),
|
|
3545
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "grid gap-2" }, event.attachments.map((att) => /* @__PURE__ */ React18__default.createElement(
|
|
3432
3546
|
"div",
|
|
3433
3547
|
{
|
|
3434
3548
|
key: att.id,
|
|
3435
3549
|
onClick: () => handleDownload(att),
|
|
3436
3550
|
className: "flex items-center gap-3 p-3 rounded-xl border border-border/30 bg-muted/20 hover:bg-muted/40 transition-all cursor-pointer group"
|
|
3437
3551
|
},
|
|
3438
|
-
/* @__PURE__ */
|
|
3439
|
-
/* @__PURE__ */
|
|
3440
|
-
/* @__PURE__ */
|
|
3552
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "p-2 bg-primary/10 rounded-lg" }, /* @__PURE__ */ React18__default.createElement(File, { className: "w-4 h-4 text-primary" })),
|
|
3553
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React18__default.createElement("p", { className: "text-sm font-medium text-foreground truncate" }, att.name), /* @__PURE__ */ React18__default.createElement("p", { className: "text-xs text-muted-foreground" }, att.size)),
|
|
3554
|
+
/* @__PURE__ */ React18__default.createElement(Download, { className: "w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
3441
3555
|
)))
|
|
3442
3556
|
)));
|
|
3443
|
-
const renderEditMode = () => /* @__PURE__ */
|
|
3557
|
+
const renderEditMode = () => /* @__PURE__ */ React18__default.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col bg-background overflow-hidden w-full max-h-[85vh]" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center justify-between px-5 py-4 border-b border-border/50 shrink-0" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React18__default.createElement(
|
|
3444
3558
|
"button",
|
|
3445
3559
|
{
|
|
3446
3560
|
type: "button",
|
|
3447
3561
|
onClick: () => setIsColorPickerOpen(!isColorPickerOpen),
|
|
3448
3562
|
className: "relative p-1"
|
|
3449
3563
|
},
|
|
3450
|
-
/* @__PURE__ */
|
|
3564
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3451
3565
|
"div",
|
|
3452
3566
|
{
|
|
3453
3567
|
className: "w-5 h-5 rounded-full cursor-pointer hover:scale-110 transition-transform",
|
|
@@ -3457,7 +3571,7 @@ var EventModal = ({
|
|
|
3457
3571
|
}
|
|
3458
3572
|
}
|
|
3459
3573
|
),
|
|
3460
|
-
isColorPickerOpen && /* @__PURE__ */
|
|
3574
|
+
isColorPickerOpen && /* @__PURE__ */ React18__default.createElement("div", { className: "absolute top-full left-0 mt-2 p-2 bg-background border border-border rounded-xl shadow-xl z-50 flex flex-wrap gap-1.5 w-[180px]" }, COLOR_PALETTE.map((color) => /* @__PURE__ */ React18__default.createElement(
|
|
3461
3575
|
"button",
|
|
3462
3576
|
{
|
|
3463
3577
|
key: color,
|
|
@@ -3473,15 +3587,15 @@ var EventModal = ({
|
|
|
3473
3587
|
style: { backgroundColor: color, color }
|
|
3474
3588
|
}
|
|
3475
3589
|
)))
|
|
3476
|
-
), /* @__PURE__ */
|
|
3590
|
+
), /* @__PURE__ */ React18__default.createElement("h2", { className: "text-lg font-semibold text-foreground" }, mode === "edit" ? translations.editEvent : translations.newEvent)), /* @__PURE__ */ React18__default.createElement(
|
|
3477
3591
|
"button",
|
|
3478
3592
|
{
|
|
3479
3593
|
type: "button",
|
|
3480
3594
|
onClick: onClose,
|
|
3481
3595
|
className: "p-2 hover:bg-accent rounded-xl transition-all text-muted-foreground hover:text-foreground"
|
|
3482
3596
|
},
|
|
3483
|
-
/* @__PURE__ */
|
|
3484
|
-
)), /* @__PURE__ */
|
|
3597
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "w-4 h-4" })
|
|
3598
|
+
)), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 overflow-y-auto" }, /* @__PURE__ */ React18__default.createElement("div", { className: "px-5 py-4 space-y-5" }, /* @__PURE__ */ React18__default.createElement("div", null, /* @__PURE__ */ React18__default.createElement(
|
|
3485
3599
|
"input",
|
|
3486
3600
|
{
|
|
3487
3601
|
type: "text",
|
|
@@ -3492,7 +3606,7 @@ var EventModal = ({
|
|
|
3492
3606
|
onChange: (e) => setFormData({ ...formData, title: e.target.value }),
|
|
3493
3607
|
placeholder: translations.addTitle
|
|
3494
3608
|
}
|
|
3495
|
-
)), /* @__PURE__ */
|
|
3609
|
+
)), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-3 p-4 rounded-2xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React18__default.createElement("div", { className: "p-2 bg-primary/10 rounded-xl shrink-0" }, /* @__PURE__ */ React18__default.createElement(Clock, { className: "w-5 h-5 text-primary" })), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 grid grid-cols-2 gap-3" }, /* @__PURE__ */ React18__default.createElement("div", null, /* @__PURE__ */ React18__default.createElement("label", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1 block" }, translations.start), /* @__PURE__ */ React18__default.createElement(
|
|
3496
3610
|
"input",
|
|
3497
3611
|
{
|
|
3498
3612
|
type: "datetime-local",
|
|
@@ -3500,7 +3614,7 @@ var EventModal = ({
|
|
|
3500
3614
|
value: formatDateForInput(formData.start),
|
|
3501
3615
|
onChange: (e) => handleDateChange("start", e.target.value)
|
|
3502
3616
|
}
|
|
3503
|
-
)), /* @__PURE__ */
|
|
3617
|
+
)), /* @__PURE__ */ React18__default.createElement("div", null, /* @__PURE__ */ React18__default.createElement("label", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1 block" }, translations.end), /* @__PURE__ */ React18__default.createElement(
|
|
3504
3618
|
"input",
|
|
3505
3619
|
{
|
|
3506
3620
|
type: "datetime-local",
|
|
@@ -3508,16 +3622,16 @@ var EventModal = ({
|
|
|
3508
3622
|
value: formatDateForInput(formData.end),
|
|
3509
3623
|
onChange: (e) => handleDateChange("end", e.target.value)
|
|
3510
3624
|
}
|
|
3511
|
-
)))), getDurationText() && /* @__PURE__ */
|
|
3625
|
+
)))), getDurationText() && /* @__PURE__ */ React18__default.createElement("div", { className: "flex justify-center" }, /* @__PURE__ */ React18__default.createElement("span", { className: "text-xs font-medium px-3 py-1 rounded-full bg-primary/10 text-primary" }, getDurationText())), /* @__PURE__ */ React18__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(Bell, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.reminders)), /* @__PURE__ */ React18__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__default.createElement(
|
|
3512
3626
|
"button",
|
|
3513
3627
|
{
|
|
3514
3628
|
type: "button",
|
|
3515
3629
|
onClick: () => setIsReminderDropdownOpen(!isReminderDropdownOpen),
|
|
3516
3630
|
className: "flex items-center gap-1 text-xs font-medium text-primary hover:text-primary/80 transition-colors"
|
|
3517
3631
|
},
|
|
3518
|
-
/* @__PURE__ */
|
|
3632
|
+
/* @__PURE__ */ React18__default.createElement(Plus, { className: "w-3.5 h-3.5" }),
|
|
3519
3633
|
translations.addReminder
|
|
3520
|
-
), isReminderDropdownOpen && /* @__PURE__ */
|
|
3634
|
+
), isReminderDropdownOpen && /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsReminderDropdownOpen(false) }), /* @__PURE__ */ React18__default.createElement("div", { className: "absolute right-0 top-full mt-1 w-48 bg-background border border-border rounded-xl shadow-xl z-50 py-1 max-h-60 overflow-y-auto" }, getReminderOptions(translations).map((option) => /* @__PURE__ */ React18__default.createElement(
|
|
3521
3635
|
"button",
|
|
3522
3636
|
{
|
|
3523
3637
|
key: option.value,
|
|
@@ -3526,58 +3640,58 @@ var EventModal = ({
|
|
|
3526
3640
|
className: "w-full px-3 py-2 text-left text-sm hover:bg-accent transition-colors"
|
|
3527
3641
|
},
|
|
3528
3642
|
option.label
|
|
3529
|
-
)))))), formData.reminders && formData.reminders.length > 0 && /* @__PURE__ */
|
|
3643
|
+
)))))), formData.reminders && formData.reminders.length > 0 && /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-wrap gap-2" }, formData.reminders.map((reminder) => /* @__PURE__ */ React18__default.createElement(
|
|
3530
3644
|
"div",
|
|
3531
3645
|
{
|
|
3532
3646
|
key: reminder.id,
|
|
3533
3647
|
className: "flex items-center gap-2 px-3 py-1.5 rounded-full bg-amber-500/10 border border-amber-500/20"
|
|
3534
3648
|
},
|
|
3535
|
-
/* @__PURE__ */
|
|
3536
|
-
/* @__PURE__ */
|
|
3537
|
-
/* @__PURE__ */
|
|
3649
|
+
/* @__PURE__ */ React18__default.createElement(BellRing, { className: "w-3.5 h-3.5 text-amber-500" }),
|
|
3650
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "text-xs font-medium text-amber-600 dark:text-amber-400" }, reminder.label),
|
|
3651
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3538
3652
|
"button",
|
|
3539
3653
|
{
|
|
3540
3654
|
type: "button",
|
|
3541
3655
|
onClick: () => removeReminder(reminder.id),
|
|
3542
3656
|
className: "p-0.5 hover:bg-amber-500/20 rounded-full transition-colors"
|
|
3543
3657
|
},
|
|
3544
|
-
/* @__PURE__ */
|
|
3658
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "w-3 h-3 text-amber-500" })
|
|
3545
3659
|
)
|
|
3546
|
-
)))), /* @__PURE__ */
|
|
3660
|
+
)))), /* @__PURE__ */ React18__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(Users, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.guests)), /* @__PURE__ */ React18__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__default.createElement(
|
|
3547
3661
|
"button",
|
|
3548
3662
|
{
|
|
3549
3663
|
type: "button",
|
|
3550
3664
|
onClick: () => setIsGuestsDropdownOpen(!isGuestsDropdownOpen),
|
|
3551
3665
|
className: "w-full flex items-center justify-between px-4 py-3 bg-muted/20 border border-border/30 rounded-xl text-sm text-left hover:bg-muted/30 transition-all"
|
|
3552
3666
|
},
|
|
3553
|
-
/* @__PURE__ */
|
|
3554
|
-
/* @__PURE__ */
|
|
3555
|
-
), isGuestsDropdownOpen && /* @__PURE__ */
|
|
3667
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: selectedGuests.length > 0 ? "text-foreground font-medium" : "text-muted-foreground" }, selectedGuests.length > 0 ? `${selectedGuests.length} ${selectedGuests.length > 1 ? translations.guestsAdded : translations.guestAdded}` : translations.addGuests),
|
|
3668
|
+
/* @__PURE__ */ React18__default.createElement(ChevronDown, { className: cn("w-4 h-4 text-muted-foreground transition-transform", isGuestsDropdownOpen && "rotate-180") })
|
|
3669
|
+
), isGuestsDropdownOpen && /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsGuestsDropdownOpen(false) }), /* @__PURE__ */ React18__default.createElement("div", { className: "absolute z-50 w-full mt-2 bg-background border border-border rounded-xl shadow-xl max-h-48 overflow-y-auto" }, fakeGuests.map((email) => /* @__PURE__ */ React18__default.createElement(
|
|
3556
3670
|
"div",
|
|
3557
3671
|
{
|
|
3558
3672
|
key: email,
|
|
3559
3673
|
className: "px-4 py-3 hover:bg-accent cursor-pointer flex items-center gap-3 transition-colors",
|
|
3560
3674
|
onClick: () => toggleGuest(email)
|
|
3561
3675
|
},
|
|
3562
|
-
/* @__PURE__ */
|
|
3676
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: cn(
|
|
3563
3677
|
"w-5 h-5 rounded-md border-2 flex items-center justify-center transition-all",
|
|
3564
3678
|
selectedGuests.includes(email) ? "bg-primary border-primary" : "border-border"
|
|
3565
|
-
) }, selectedGuests.includes(email) && /* @__PURE__ */
|
|
3566
|
-
/* @__PURE__ */
|
|
3679
|
+
) }, selectedGuests.includes(email) && /* @__PURE__ */ React18__default.createElement(Check, { className: "w-3 h-3 text-primary-foreground" })),
|
|
3680
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(
|
|
3567
3681
|
"div",
|
|
3568
3682
|
{
|
|
3569
3683
|
className: "w-7 h-7 rounded-full flex items-center justify-center text-xs font-semibold text-white",
|
|
3570
3684
|
style: { backgroundColor: `hsl(${fakeGuests.indexOf(email) * 60}, 70%, 50%)` }
|
|
3571
3685
|
},
|
|
3572
3686
|
email[0].toUpperCase()
|
|
3573
|
-
), /* @__PURE__ */
|
|
3574
|
-
))))), selectedGuests.length > 0 && /* @__PURE__ */
|
|
3687
|
+
), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm" }, email))
|
|
3688
|
+
))))), selectedGuests.length > 0 && /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-wrap gap-2 mt-2" }, selectedGuests.map((email) => /* @__PURE__ */ React18__default.createElement(
|
|
3575
3689
|
"div",
|
|
3576
3690
|
{
|
|
3577
3691
|
key: email,
|
|
3578
3692
|
className: "flex items-center gap-2 pl-1 pr-2 py-1 bg-muted/30 border border-border/30 rounded-full"
|
|
3579
3693
|
},
|
|
3580
|
-
/* @__PURE__ */
|
|
3694
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3581
3695
|
"div",
|
|
3582
3696
|
{
|
|
3583
3697
|
className: "w-6 h-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",
|
|
@@ -3585,17 +3699,17 @@ var EventModal = ({
|
|
|
3585
3699
|
},
|
|
3586
3700
|
email[0].toUpperCase()
|
|
3587
3701
|
),
|
|
3588
|
-
/* @__PURE__ */
|
|
3589
|
-
/* @__PURE__ */
|
|
3702
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "text-xs font-medium text-foreground" }, email.split("@")[0]),
|
|
3703
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3590
3704
|
"button",
|
|
3591
3705
|
{
|
|
3592
3706
|
type: "button",
|
|
3593
3707
|
onClick: () => toggleGuest(email),
|
|
3594
3708
|
className: "p-0.5 hover:bg-destructive/10 rounded-full transition-colors"
|
|
3595
3709
|
},
|
|
3596
|
-
/* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "w-3 h-3 text-muted-foreground" })
|
|
3597
3711
|
)
|
|
3598
|
-
)))), /* @__PURE__ */
|
|
3712
|
+
)))), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-3 p-3 rounded-xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React18__default.createElement(MapPin, { className: "w-5 h-5 text-muted-foreground shrink-0" }), /* @__PURE__ */ React18__default.createElement(
|
|
3599
3713
|
"input",
|
|
3600
3714
|
{
|
|
3601
3715
|
type: "text",
|
|
@@ -3604,7 +3718,7 @@ var EventModal = ({
|
|
|
3604
3718
|
value: formData.location || "",
|
|
3605
3719
|
onChange: (e) => setFormData({ ...formData, location: e.target.value })
|
|
3606
3720
|
}
|
|
3607
|
-
)), /* @__PURE__ */
|
|
3721
|
+
)), /* @__PURE__ */ React18__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(AlignLeft, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.notes)), /* @__PURE__ */ React18__default.createElement(
|
|
3608
3722
|
"textarea",
|
|
3609
3723
|
{
|
|
3610
3724
|
className: "w-full bg-muted/20 border border-border/30 rounded-xl px-4 py-3 text-sm min-h-[100px] resize-none text-foreground placeholder-muted-foreground focus:border-primary focus:ring-2 focus:ring-primary/20 transition-all",
|
|
@@ -3612,7 +3726,7 @@ var EventModal = ({
|
|
|
3612
3726
|
value: formData.description || "",
|
|
3613
3727
|
onChange: (e) => setFormData({ ...formData, description: e.target.value })
|
|
3614
3728
|
}
|
|
3615
|
-
)), /* @__PURE__ */
|
|
3729
|
+
)), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-3 p-3 rounded-xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React18__default.createElement(Repeat, { className: "w-5 h-5 text-muted-foreground shrink-0" }), /* @__PURE__ */ React18__default.createElement(
|
|
3616
3730
|
"select",
|
|
3617
3731
|
{
|
|
3618
3732
|
className: "flex-1 bg-transparent text-sm text-foreground focus:outline-none cursor-pointer",
|
|
@@ -3631,28 +3745,28 @@ var EventModal = ({
|
|
|
3631
3745
|
}
|
|
3632
3746
|
}
|
|
3633
3747
|
},
|
|
3634
|
-
/* @__PURE__ */
|
|
3635
|
-
/* @__PURE__ */
|
|
3636
|
-
/* @__PURE__ */
|
|
3637
|
-
/* @__PURE__ */
|
|
3638
|
-
/* @__PURE__ */
|
|
3639
|
-
)), /* @__PURE__ */
|
|
3748
|
+
/* @__PURE__ */ React18__default.createElement("option", { value: "" }, translations.doesNotRepeat),
|
|
3749
|
+
/* @__PURE__ */ React18__default.createElement("option", { value: "DAILY" }, translations.daily),
|
|
3750
|
+
/* @__PURE__ */ React18__default.createElement("option", { value: "WEEKLY" }, translations.weekly),
|
|
3751
|
+
/* @__PURE__ */ React18__default.createElement("option", { value: "MONTHLY" }, translations.monthly),
|
|
3752
|
+
/* @__PURE__ */ React18__default.createElement("option", { value: "YEARLY" }, translations.yearly)
|
|
3753
|
+
)), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center justify-between p-3 rounded-xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(Tag, { className: "w-5 h-5 text-muted-foreground" }), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm text-foreground" }, translations.calendar)), /* @__PURE__ */ React18__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__default.createElement(
|
|
3640
3754
|
"button",
|
|
3641
3755
|
{
|
|
3642
3756
|
type: "button",
|
|
3643
3757
|
onClick: () => setIsCalendarDropdownOpen(!isCalendarDropdownOpen),
|
|
3644
3758
|
className: "flex items-center gap-2 px-3 py-1.5 bg-background border border-border/50 rounded-lg text-sm hover:bg-accent/50 transition-all"
|
|
3645
3759
|
},
|
|
3646
|
-
/* @__PURE__ */
|
|
3760
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3647
3761
|
"div",
|
|
3648
3762
|
{
|
|
3649
3763
|
className: "w-3 h-3 rounded-full",
|
|
3650
3764
|
style: { backgroundColor: calendars?.find((c) => c.id === formData.calendarId)?.color || "#3b82f6" }
|
|
3651
3765
|
}
|
|
3652
3766
|
),
|
|
3653
|
-
/* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3655
|
-
), isCalendarDropdownOpen && /* @__PURE__ */
|
|
3767
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "font-medium" }, calendars?.find((c) => c.id === formData.calendarId)?.label || "Select"),
|
|
3768
|
+
/* @__PURE__ */ React18__default.createElement(ChevronDown, { className: "w-3.5 h-3.5 text-muted-foreground" })
|
|
3769
|
+
), isCalendarDropdownOpen && /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsCalendarDropdownOpen(false) }), /* @__PURE__ */ React18__default.createElement("div", { className: "absolute right-0 bottom-full mb-2 w-48 bg-background border border-border rounded-xl shadow-xl z-50 py-1" }, calendars?.map((cal) => /* @__PURE__ */ React18__default.createElement(
|
|
3656
3770
|
"button",
|
|
3657
3771
|
{
|
|
3658
3772
|
key: cal.id,
|
|
@@ -3667,19 +3781,19 @@ var EventModal = ({
|
|
|
3667
3781
|
setIsCalendarDropdownOpen(false);
|
|
3668
3782
|
}
|
|
3669
3783
|
},
|
|
3670
|
-
/* @__PURE__ */
|
|
3671
|
-
/* @__PURE__ */
|
|
3672
|
-
formData.calendarId === cal.id && /* @__PURE__ */
|
|
3673
|
-
)))))))), /* @__PURE__ */
|
|
3784
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "w-3 h-3 rounded-full", style: { backgroundColor: cal.color } }),
|
|
3785
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "flex-1 text-sm" }, cal.label),
|
|
3786
|
+
formData.calendarId === cal.id && /* @__PURE__ */ React18__default.createElement(Check, { className: "w-4 h-4 text-primary" })
|
|
3787
|
+
)))))))), /* @__PURE__ */ React18__default.createElement("div", { className: "px-5 py-4 border-t border-border/50 flex items-center justify-between bg-muted/10 shrink-0" }, mode === "edit" && /* @__PURE__ */ React18__default.createElement(
|
|
3674
3788
|
"button",
|
|
3675
3789
|
{
|
|
3676
3790
|
type: "button",
|
|
3677
3791
|
onClick: handleDelete,
|
|
3678
3792
|
className: "flex items-center gap-2 px-4 py-2 text-destructive hover:bg-destructive/10 rounded-xl transition-all text-sm font-medium"
|
|
3679
3793
|
},
|
|
3680
|
-
/* @__PURE__ */
|
|
3794
|
+
/* @__PURE__ */ React18__default.createElement(Trash2, { className: "w-4 h-4" }),
|
|
3681
3795
|
translations.delete
|
|
3682
|
-
), mode === "create" && /* @__PURE__ */
|
|
3796
|
+
), mode === "create" && /* @__PURE__ */ React18__default.createElement("div", null), /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(
|
|
3683
3797
|
"button",
|
|
3684
3798
|
{
|
|
3685
3799
|
type: "button",
|
|
@@ -3687,7 +3801,7 @@ var EventModal = ({
|
|
|
3687
3801
|
className: "px-4 py-2.5 text-muted-foreground hover:text-foreground font-medium text-sm rounded-xl transition-all hover:bg-accent"
|
|
3688
3802
|
},
|
|
3689
3803
|
translations.cancel
|
|
3690
|
-
), /* @__PURE__ */
|
|
3804
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3691
3805
|
"button",
|
|
3692
3806
|
{
|
|
3693
3807
|
type: "submit",
|
|
@@ -3695,7 +3809,7 @@ var EventModal = ({
|
|
|
3695
3809
|
},
|
|
3696
3810
|
mode === "edit" ? translations.saveChanges : translations.createEvent
|
|
3697
3811
|
))));
|
|
3698
|
-
return /* @__PURE__ */
|
|
3812
|
+
return /* @__PURE__ */ React18__default.createElement(Modal, { isOpen, onClose, hideHeader: true, className: "p-0 overflow-hidden max-w-lg rounded-2xl shadow-2xl" }, /* @__PURE__ */ React18__default.createElement(AnimatePresence, { mode: "wait" }, mode === "view" && event ? /* @__PURE__ */ React18__default.createElement(
|
|
3699
3813
|
motion.div,
|
|
3700
3814
|
{
|
|
3701
3815
|
key: "view",
|
|
@@ -3705,7 +3819,7 @@ var EventModal = ({
|
|
|
3705
3819
|
transition: { duration: 0.15 }
|
|
3706
3820
|
},
|
|
3707
3821
|
renderViewMode()
|
|
3708
|
-
) : /* @__PURE__ */
|
|
3822
|
+
) : /* @__PURE__ */ React18__default.createElement(
|
|
3709
3823
|
motion.div,
|
|
3710
3824
|
{
|
|
3711
3825
|
key: "edit",
|
|
@@ -3717,9 +3831,9 @@ var EventModal = ({
|
|
|
3717
3831
|
renderEditMode()
|
|
3718
3832
|
)));
|
|
3719
3833
|
};
|
|
3720
|
-
var Skeleton = ({ className, style }) => /* @__PURE__ */
|
|
3721
|
-
var MonthViewSkeleton = () => /* @__PURE__ */
|
|
3722
|
-
var WeekViewSkeleton = () => /* @__PURE__ */
|
|
3834
|
+
var Skeleton = ({ className, style }) => /* @__PURE__ */ React18__default.createElement("div", { className: cn("animate-pulse bg-muted/40 rounded", className), style });
|
|
3835
|
+
var MonthViewSkeleton = () => /* @__PURE__ */ React18__default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden" }, /* @__PURE__ */ React18__default.createElement("div", { className: "grid grid-cols-7 border-b border-border/50 bg-muted/10" }, Array.from({ length: 7 }).map((_, i) => /* @__PURE__ */ React18__default.createElement("div", { key: i, className: "py-3 px-2 text-center border-r border-border/30 last:border-r-0" }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-4 w-8 mx-auto" })))), /* @__PURE__ */ React18__default.createElement("div", { className: "grid grid-cols-7 flex-1" }, Array.from({ length: 35 }).map((_, i) => /* @__PURE__ */ React18__default.createElement("div", { key: i, className: "min-h-[120px] border-r border-b border-border/30 p-2" }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-4 w-6 mb-2" }), /* @__PURE__ */ React18__default.createElement("div", { className: "space-y-1" }, Math.random() > 0.5 && /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-5 w-full rounded-md" }), Math.random() > 0.7 && /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-5 w-3/4 rounded-md" }))))));
|
|
3836
|
+
var WeekViewSkeleton = () => /* @__PURE__ */ React18__default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex border-b border-border/50 bg-muted/10" }, /* @__PURE__ */ React18__default.createElement("div", { className: "w-16 p-3 border-r border-border/30" }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-8 w-10 mx-auto" })), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 grid grid-cols-7" }, Array.from({ length: 7 }).map((_, i) => /* @__PURE__ */ React18__default.createElement("div", { key: i, className: "py-3 px-2 text-center border-r border-border/30 last:border-r-0" }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-3 w-8 mx-auto mb-1" }), /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-8 w-8 mx-auto rounded-xl" }))))), /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-1", style: { height: "600px" } }, /* @__PURE__ */ React18__default.createElement("div", { className: "w-16 border-r border-border/30" }, Array.from({ length: 10 }).map((_, i) => /* @__PURE__ */ React18__default.createElement("div", { key: i, className: "h-[60px] relative" }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-4 w-10 absolute right-2 -translate-y-1/2" })))), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 grid grid-cols-7 relative" }, Array.from({ length: 7 }).map((_, colIdx) => /* @__PURE__ */ React18__default.createElement("div", { key: colIdx, className: "relative border-r border-border/30 last:border-r-0" }, Array.from({ length: 10 }).map((_2, rowIdx) => /* @__PURE__ */ React18__default.createElement("div", { key: rowIdx, className: "h-[60px] border-b border-dashed border-border/20" })), Math.random() > 0.3 && /* @__PURE__ */ React18__default.createElement(
|
|
3723
3837
|
Skeleton,
|
|
3724
3838
|
{
|
|
3725
3839
|
className: "absolute rounded-md",
|
|
@@ -3731,20 +3845,20 @@ var WeekViewSkeleton = () => /* @__PURE__ */ React17__default.createElement("div
|
|
|
3731
3845
|
}
|
|
3732
3846
|
}
|
|
3733
3847
|
))))));
|
|
3734
|
-
var DayViewSkeleton = () => /* @__PURE__ */
|
|
3848
|
+
var DayViewSkeleton = () => /* @__PURE__ */ React18__default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden" }, /* @__PURE__ */ React18__default.createElement("div", { className: "px-6 py-4 border-b border-border/50 bg-muted/10 text-center" }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-7 w-64 mx-auto" })), /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-1", style: { height: "600px" } }, /* @__PURE__ */ React18__default.createElement("div", { className: "w-20 border-r border-border/30 bg-muted/5" }, Array.from({ length: 10 }).map((_, i) => /* @__PURE__ */ React18__default.createElement("div", { key: i, className: "h-[80px] relative" }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-4 w-12 absolute left-1/2 -translate-x-1/2 -translate-y-1/2" })))), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 relative" }, Array.from({ length: 10 }).map((_, i) => /* @__PURE__ */ React18__default.createElement("div", { key: i, className: "h-[80px] border-b border-dashed border-border/20" })), /* @__PURE__ */ React18__default.createElement(
|
|
3735
3849
|
Skeleton,
|
|
3736
3850
|
{
|
|
3737
3851
|
className: "absolute rounded-lg left-4 right-4",
|
|
3738
3852
|
style: { top: "160px", height: "120px" }
|
|
3739
3853
|
}
|
|
3740
|
-
), /* @__PURE__ */
|
|
3854
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3741
3855
|
Skeleton,
|
|
3742
3856
|
{
|
|
3743
3857
|
className: "absolute rounded-lg left-4 right-4",
|
|
3744
3858
|
style: { top: "400px", height: "80px" }
|
|
3745
3859
|
}
|
|
3746
3860
|
))));
|
|
3747
|
-
var AgendaViewSkeleton = () => /* @__PURE__ */
|
|
3861
|
+
var AgendaViewSkeleton = () => /* @__PURE__ */ React18__default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden p-6" }, /* @__PURE__ */ React18__default.createElement("div", { className: "space-y-6" }, Array.from({ length: 4 }).map((_, dayIdx) => /* @__PURE__ */ React18__default.createElement("div", { key: dayIdx }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-5 w-40 mb-4" }), /* @__PURE__ */ React18__default.createElement("div", { className: "space-y-3" }, Array.from({ length: 2 + Math.floor(Math.random() * 3) }).map((_2, eventIdx) => /* @__PURE__ */ React18__default.createElement("div", { key: eventIdx, className: "flex items-center gap-4 p-3 rounded-xl bg-muted/10" }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-10 w-10 rounded-lg" }), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 space-y-2" }, /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-4 w-3/4" }), /* @__PURE__ */ React18__default.createElement(Skeleton, { className: "h-3 w-1/2" })))))))));
|
|
3748
3862
|
var EventContextMenu = ({
|
|
3749
3863
|
event,
|
|
3750
3864
|
position,
|
|
@@ -3785,7 +3899,7 @@ var EventContextMenu = ({
|
|
|
3785
3899
|
...onEdit ? [{
|
|
3786
3900
|
id: "edit",
|
|
3787
3901
|
label: translations?.edit || "Edit",
|
|
3788
|
-
icon: /* @__PURE__ */
|
|
3902
|
+
icon: /* @__PURE__ */ React18__default.createElement(Edit3, { className: "w-4 h-4" }),
|
|
3789
3903
|
onClick: () => {
|
|
3790
3904
|
onEdit(event);
|
|
3791
3905
|
onClose();
|
|
@@ -3794,7 +3908,7 @@ var EventContextMenu = ({
|
|
|
3794
3908
|
...onDuplicate ? [{
|
|
3795
3909
|
id: "duplicate",
|
|
3796
3910
|
label: translations?.duplicate || "Duplicate",
|
|
3797
|
-
icon: /* @__PURE__ */
|
|
3911
|
+
icon: /* @__PURE__ */ React18__default.createElement(Copy, { className: "w-4 h-4" }),
|
|
3798
3912
|
onClick: () => {
|
|
3799
3913
|
onDuplicate(event);
|
|
3800
3914
|
onClose();
|
|
@@ -3804,7 +3918,7 @@ var EventContextMenu = ({
|
|
|
3804
3918
|
...onDelete ? [{
|
|
3805
3919
|
id: "delete",
|
|
3806
3920
|
label: translations?.delete || "Delete",
|
|
3807
|
-
icon: /* @__PURE__ */
|
|
3921
|
+
icon: /* @__PURE__ */ React18__default.createElement(Trash2, { className: "w-4 h-4" }),
|
|
3808
3922
|
onClick: () => {
|
|
3809
3923
|
onDelete(event.id);
|
|
3810
3924
|
onClose();
|
|
@@ -3816,7 +3930,7 @@ var EventContextMenu = ({
|
|
|
3816
3930
|
x: Math.min(position.x, window.innerWidth - 200),
|
|
3817
3931
|
y: Math.min(position.y, window.innerHeight - (actions.length * 44 + 80))
|
|
3818
3932
|
};
|
|
3819
|
-
return /* @__PURE__ */
|
|
3933
|
+
return /* @__PURE__ */ React18__default.createElement(AnimatePresence, null, /* @__PURE__ */ React18__default.createElement(
|
|
3820
3934
|
motion.div,
|
|
3821
3935
|
{
|
|
3822
3936
|
ref: menuRef,
|
|
@@ -3830,14 +3944,14 @@ var EventContextMenu = ({
|
|
|
3830
3944
|
top: adjustedPosition.y
|
|
3831
3945
|
}
|
|
3832
3946
|
},
|
|
3833
|
-
/* @__PURE__ */
|
|
3947
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "px-3 py-2 border-b-[0.5px] border-border bg-muted/30" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__default.createElement(
|
|
3834
3948
|
"div",
|
|
3835
3949
|
{
|
|
3836
3950
|
className: "w-2.5 h-2.5 rounded-full shrink-0",
|
|
3837
3951
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
3838
3952
|
}
|
|
3839
|
-
), /* @__PURE__ */
|
|
3840
|
-
/* @__PURE__ */
|
|
3953
|
+
), /* @__PURE__ */ React18__default.createElement("span", { className: "text-sm font-medium truncate text-foreground" }, event.title))),
|
|
3954
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "py-1" }, actions.map((action, index) => /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, { key: action.id }, index > 0 && action.variant === "danger" && /* @__PURE__ */ React18__default.createElement("div", { className: "h-px bg-border my-1" }), /* @__PURE__ */ React18__default.createElement(
|
|
3841
3955
|
"button",
|
|
3842
3956
|
{
|
|
3843
3957
|
onClick: action.onClick,
|
|
@@ -3849,7 +3963,7 @@ var EventContextMenu = ({
|
|
|
3849
3963
|
)
|
|
3850
3964
|
},
|
|
3851
3965
|
action.icon,
|
|
3852
|
-
/* @__PURE__ */
|
|
3966
|
+
/* @__PURE__ */ React18__default.createElement("span", null, action.label)
|
|
3853
3967
|
))))
|
|
3854
3968
|
));
|
|
3855
3969
|
};
|
|
@@ -4305,6 +4419,7 @@ var Scheduler = ({
|
|
|
4305
4419
|
hideViewSwitcher,
|
|
4306
4420
|
hideLanguageSwitcher,
|
|
4307
4421
|
hideFab = false,
|
|
4422
|
+
compactShortEvents = true,
|
|
4308
4423
|
initialScrollHour = 8,
|
|
4309
4424
|
reverseTime: reverseTimeProp = false,
|
|
4310
4425
|
language = "tr",
|
|
@@ -4497,7 +4612,7 @@ var Scheduler = ({
|
|
|
4497
4612
|
(e) => e.start >= rangeStart && e.start <= rangeEnd
|
|
4498
4613
|
).length;
|
|
4499
4614
|
}, [filteredEvents, view, currentDate]);
|
|
4500
|
-
return /* @__PURE__ */
|
|
4615
|
+
return /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement(
|
|
4501
4616
|
DndContext,
|
|
4502
4617
|
{
|
|
4503
4618
|
id,
|
|
@@ -4506,7 +4621,7 @@ var Scheduler = ({
|
|
|
4506
4621
|
onDragEnd: onDragEndWrapper,
|
|
4507
4622
|
modifiers
|
|
4508
4623
|
},
|
|
4509
|
-
/* @__PURE__ */
|
|
4624
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4510
4625
|
"div",
|
|
4511
4626
|
{
|
|
4512
4627
|
ref: schedulerRef,
|
|
@@ -4528,7 +4643,7 @@ var Scheduler = ({
|
|
|
4528
4643
|
isDarkMode,
|
|
4529
4644
|
onThemeToggle
|
|
4530
4645
|
})
|
|
4531
|
-
) : /* @__PURE__ */
|
|
4646
|
+
) : /* @__PURE__ */ React18__default.createElement(
|
|
4532
4647
|
CalendarHeader,
|
|
4533
4648
|
{
|
|
4534
4649
|
currentDate,
|
|
@@ -4556,7 +4671,7 @@ var Scheduler = ({
|
|
|
4556
4671
|
hideLanguageSwitcher
|
|
4557
4672
|
}
|
|
4558
4673
|
),
|
|
4559
|
-
/* @__PURE__ */
|
|
4674
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-1 overflow-hidden" }, /* @__PURE__ */ React18__default.createElement(
|
|
4560
4675
|
motion.div,
|
|
4561
4676
|
{
|
|
4562
4677
|
className: "hidden md:block overflow-hidden shrink-0",
|
|
@@ -4570,7 +4685,7 @@ var Scheduler = ({
|
|
|
4570
4685
|
ease: [0.4, 0, 0.2, 1]
|
|
4571
4686
|
}
|
|
4572
4687
|
},
|
|
4573
|
-
/* @__PURE__ */
|
|
4688
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4574
4689
|
Sidebar,
|
|
4575
4690
|
{
|
|
4576
4691
|
currentDate,
|
|
@@ -4602,7 +4717,7 @@ var Scheduler = ({
|
|
|
4602
4717
|
}
|
|
4603
4718
|
}
|
|
4604
4719
|
)
|
|
4605
|
-
), /* @__PURE__ */
|
|
4720
|
+
), /* @__PURE__ */ React18__default.createElement(AnimatePresence, null, isSidebarOpen && /* @__PURE__ */ React18__default.createElement(
|
|
4606
4721
|
motion.div,
|
|
4607
4722
|
{
|
|
4608
4723
|
key: "mobile-sidebar-overlay",
|
|
@@ -4612,7 +4727,7 @@ var Scheduler = ({
|
|
|
4612
4727
|
exit: { opacity: 0 },
|
|
4613
4728
|
transition: { duration: 0.2 }
|
|
4614
4729
|
},
|
|
4615
|
-
/* @__PURE__ */
|
|
4730
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4616
4731
|
motion.div,
|
|
4617
4732
|
{
|
|
4618
4733
|
className: "w-[280px] h-full bg-background shadow-2xl overflow-hidden",
|
|
@@ -4621,7 +4736,7 @@ var Scheduler = ({
|
|
|
4621
4736
|
exit: { x: -280 },
|
|
4622
4737
|
transition: { duration: 0.25, ease: [0.4, 0, 0.2, 1] }
|
|
4623
4738
|
},
|
|
4624
|
-
/* @__PURE__ */
|
|
4739
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4625
4740
|
Sidebar,
|
|
4626
4741
|
{
|
|
4627
4742
|
currentDate,
|
|
@@ -4659,16 +4774,16 @@ var Scheduler = ({
|
|
|
4659
4774
|
}
|
|
4660
4775
|
)
|
|
4661
4776
|
),
|
|
4662
|
-
/* @__PURE__ */
|
|
4777
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4663
4778
|
motion.div,
|
|
4664
4779
|
{
|
|
4665
4780
|
className: "flex-1 bg-black/50 backdrop-blur-sm",
|
|
4666
4781
|
onClick: () => setIsSidebarOpen(false)
|
|
4667
4782
|
}
|
|
4668
4783
|
)
|
|
4669
|
-
)), /* @__PURE__ */
|
|
4784
|
+
)), /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 flex flex-col overflow-hidden relative min-h-0" }, activeCustomMenu !== null && sidebarMenus && /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 overflow-y-auto p-4 md:p-6" }, sidebarMenus.find((m) => m.id === activeCustomMenu)?.component), activeCustomViewId !== null && activeCustomMenu === null && customViews && /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 overflow-y-auto p-4 md:p-6" }, customViews.find((v) => v.id === activeCustomViewId)?.component), activeCustomMenu === null && activeCustomViewId === null && (isLoading ? /* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 overflow-auto p-0 md:p-4 min-h-0" }, /* @__PURE__ */ React18__default.createElement("div", { className: "h-full min-w-full" }, view === "month" && /* @__PURE__ */ React18__default.createElement(MonthViewSkeleton, null), view === "week" && /* @__PURE__ */ React18__default.createElement(WeekViewSkeleton, null), view === "day" && /* @__PURE__ */ React18__default.createElement(DayViewSkeleton, null), view === "agenda" && /* @__PURE__ */ React18__default.createElement(AgendaViewSkeleton, null), view === "resource" && /* @__PURE__ */ React18__default.createElement(WeekViewSkeleton, null))) : (
|
|
4670
4785
|
/* overflow-hidden here: each view owns its own scroll container */
|
|
4671
|
-
/* @__PURE__ */
|
|
4786
|
+
/* @__PURE__ */ React18__default.createElement("div", { ref: swipeRef, className: "flex-1 overflow-hidden p-0 md:p-4 touch-pan-y min-h-0" }, /* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-col h-full min-w-full min-h-0" }, /* @__PURE__ */ React18__default.createElement(AnimatePresence, { mode: "wait", initial: false }, /* @__PURE__ */ React18__default.createElement(
|
|
4672
4787
|
motion.div,
|
|
4673
4788
|
{
|
|
4674
4789
|
key: `${view}-${currentDate.toISOString()}-${timezone || "local"}`,
|
|
@@ -4692,7 +4807,7 @@ var Scheduler = ({
|
|
|
4692
4807
|
className: "flex-1 min-h-0 flex flex-col",
|
|
4693
4808
|
style: { height: "100%" }
|
|
4694
4809
|
},
|
|
4695
|
-
view === "month" && /* @__PURE__ */
|
|
4810
|
+
view === "month" && /* @__PURE__ */ React18__default.createElement(
|
|
4696
4811
|
MonthView,
|
|
4697
4812
|
{
|
|
4698
4813
|
currentDate,
|
|
@@ -4703,7 +4818,7 @@ var Scheduler = ({
|
|
|
4703
4818
|
locale
|
|
4704
4819
|
}
|
|
4705
4820
|
),
|
|
4706
|
-
view === "week" && /* @__PURE__ */
|
|
4821
|
+
view === "week" && /* @__PURE__ */ React18__default.createElement(
|
|
4707
4822
|
WeekView,
|
|
4708
4823
|
{
|
|
4709
4824
|
currentDate,
|
|
@@ -4716,10 +4831,11 @@ var Scheduler = ({
|
|
|
4716
4831
|
readonly: readOnly,
|
|
4717
4832
|
language,
|
|
4718
4833
|
initialScrollHour,
|
|
4719
|
-
reverseTime
|
|
4834
|
+
reverseTime,
|
|
4835
|
+
compactShortEvents
|
|
4720
4836
|
}
|
|
4721
4837
|
),
|
|
4722
|
-
view === "day" && /* @__PURE__ */
|
|
4838
|
+
view === "day" && /* @__PURE__ */ React18__default.createElement(
|
|
4723
4839
|
DayView,
|
|
4724
4840
|
{
|
|
4725
4841
|
currentDate,
|
|
@@ -4732,10 +4848,11 @@ var Scheduler = ({
|
|
|
4732
4848
|
readonly: readOnly,
|
|
4733
4849
|
language,
|
|
4734
4850
|
initialScrollHour,
|
|
4735
|
-
reverseTime
|
|
4851
|
+
reverseTime,
|
|
4852
|
+
compactShortEvents
|
|
4736
4853
|
}
|
|
4737
4854
|
),
|
|
4738
|
-
view === "agenda" && /* @__PURE__ */
|
|
4855
|
+
view === "agenda" && /* @__PURE__ */ React18__default.createElement(
|
|
4739
4856
|
AgendaView,
|
|
4740
4857
|
{
|
|
4741
4858
|
currentDate,
|
|
@@ -4747,7 +4864,7 @@ var Scheduler = ({
|
|
|
4747
4864
|
renderEmptyState
|
|
4748
4865
|
}
|
|
4749
4866
|
),
|
|
4750
|
-
view === "resource" && resources && /* @__PURE__ */
|
|
4867
|
+
view === "resource" && resources && /* @__PURE__ */ React18__default.createElement(
|
|
4751
4868
|
ResourceView,
|
|
4752
4869
|
{
|
|
4753
4870
|
currentDate,
|
|
@@ -4771,7 +4888,7 @@ var Scheduler = ({
|
|
|
4771
4888
|
initialDate: modalInitialDate,
|
|
4772
4889
|
onSave: handleModalSave,
|
|
4773
4890
|
onDelete: handleModalDelete
|
|
4774
|
-
}) : /* @__PURE__ */
|
|
4891
|
+
}) : /* @__PURE__ */ React18__default.createElement(
|
|
4775
4892
|
EventModal,
|
|
4776
4893
|
{
|
|
4777
4894
|
isOpen: isModalOpen,
|
|
@@ -4786,7 +4903,7 @@ var Scheduler = ({
|
|
|
4786
4903
|
language
|
|
4787
4904
|
}
|
|
4788
4905
|
),
|
|
4789
|
-
/* @__PURE__ */
|
|
4906
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4790
4907
|
EventContextMenu,
|
|
4791
4908
|
{
|
|
4792
4909
|
event: contextMenuEvent,
|
|
@@ -4819,7 +4936,7 @@ var Scheduler = ({
|
|
|
4819
4936
|
}
|
|
4820
4937
|
}
|
|
4821
4938
|
),
|
|
4822
|
-
/* @__PURE__ */
|
|
4939
|
+
/* @__PURE__ */ React18__default.createElement(DragOverlay, { dropAnimation: null }, activeDragEvent ? /* @__PURE__ */ React18__default.createElement(
|
|
4823
4940
|
"div",
|
|
4824
4941
|
{
|
|
4825
4942
|
className: cn(
|
|
@@ -4837,17 +4954,17 @@ var Scheduler = ({
|
|
|
4837
4954
|
transform: "rotate(-2deg) scale(1.02)"
|
|
4838
4955
|
}
|
|
4839
4956
|
},
|
|
4840
|
-
/* @__PURE__ */
|
|
4957
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "p-2.5 h-full flex flex-col" }, /* @__PURE__ */ React18__default.createElement(
|
|
4841
4958
|
"div",
|
|
4842
4959
|
{
|
|
4843
4960
|
className: "absolute left-0 top-0 bottom-0 w-1 rounded-l-lg",
|
|
4844
4961
|
style: { backgroundColor: activeDragEvent.color || "var(--primary)" }
|
|
4845
4962
|
}
|
|
4846
|
-
), /* @__PURE__ */
|
|
4963
|
+
), /* @__PURE__ */ React18__default.createElement("div", { className: "pl-2" }, /* @__PURE__ */ React18__default.createElement("div", { className: "font-semibold truncate text-sm" }, activeDragEvent.title), (view === "week" || view === "day") && getDragHeight() && getDragHeight() > 40 && /* @__PURE__ */ React18__default.createElement("div", { className: "text-xs opacity-80 mt-0.5 flex items-center gap-1" }, /* @__PURE__ */ React18__default.createElement("svg", { className: "w-3 h-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React18__default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React18__default.createElement("path", { d: "M12 6v6l4 2" })), format(activeDragEvent.start, getTimeFormatFull(language)), " - ", format(activeDragEvent.end, getTimeFormatFull(language)))), /* @__PURE__ */ React18__default.createElement("div", { className: "absolute bottom-1.5 right-1.5 opacity-60" }, /* @__PURE__ */ React18__default.createElement("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React18__default.createElement("circle", { cx: "9", cy: "5", r: "1.5" }), /* @__PURE__ */ React18__default.createElement("circle", { cx: "15", cy: "5", r: "1.5" }), /* @__PURE__ */ React18__default.createElement("circle", { cx: "9", cy: "12", r: "1.5" }), /* @__PURE__ */ React18__default.createElement("circle", { cx: "15", cy: "12", r: "1.5" }), /* @__PURE__ */ React18__default.createElement("circle", { cx: "9", cy: "19", r: "1.5" }), /* @__PURE__ */ React18__default.createElement("circle", { cx: "15", cy: "19", r: "1.5" }))))
|
|
4847
4964
|
) : null)
|
|
4848
4965
|
)
|
|
4849
4966
|
), isMounted && isMobile && !readOnly && !hideFab && createPortal(
|
|
4850
|
-
/* @__PURE__ */
|
|
4967
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4851
4968
|
"div",
|
|
4852
4969
|
{
|
|
4853
4970
|
style: {
|
|
@@ -4859,7 +4976,7 @@ var Scheduler = ({
|
|
|
4859
4976
|
...fabCssVars
|
|
4860
4977
|
}
|
|
4861
4978
|
},
|
|
4862
|
-
/* @__PURE__ */
|
|
4979
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4863
4980
|
"button",
|
|
4864
4981
|
{
|
|
4865
4982
|
type: "button",
|
|
@@ -4880,7 +4997,7 @@ var Scheduler = ({
|
|
|
4880
4997
|
boxShadow: "0 10px 25px -5px rgba(0, 0, 0, 0.25)"
|
|
4881
4998
|
}
|
|
4882
4999
|
},
|
|
4883
|
-
/* @__PURE__ */
|
|
5000
|
+
/* @__PURE__ */ React18__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18__default.createElement("path", { d: "M5 12h14" }), /* @__PURE__ */ React18__default.createElement("path", { d: "M12 5v14" }))
|
|
4884
5001
|
)
|
|
4885
5002
|
),
|
|
4886
5003
|
document.body
|