calendarkit-prov2 2.0.9 → 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 +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +555 -443
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +474 -362
- 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: {
|
|
@@ -2467,13 +2562,13 @@ var WeekView = ({
|
|
|
2467
2562
|
const weekDays = eachDayOfInterval({ start, end });
|
|
2468
2563
|
const hours = reverseTime ? Array.from({ length: 24 }, (_, i) => 23 - i) : Array.from({ length: 24 }, (_, i) => i);
|
|
2469
2564
|
const hourHeight = 60;
|
|
2470
|
-
const scrollContainerRef =
|
|
2471
|
-
const [now, setNow] =
|
|
2472
|
-
|
|
2565
|
+
const scrollContainerRef = React18__default.useRef(null);
|
|
2566
|
+
const [now, setNow] = React18__default.useState(/* @__PURE__ */ new Date());
|
|
2567
|
+
React18__default.useEffect(() => {
|
|
2473
2568
|
const interval = setInterval(() => setNow(/* @__PURE__ */ new Date()), 6e4);
|
|
2474
2569
|
return () => clearInterval(interval);
|
|
2475
2570
|
}, []);
|
|
2476
|
-
|
|
2571
|
+
React18__default.useEffect(() => {
|
|
2477
2572
|
if (scrollContainerRef.current) {
|
|
2478
2573
|
scrollContainerRef.current.scrollTop = reverseTime ? (23 - initialScrollHour) * hourHeight : initialScrollHour * hourHeight;
|
|
2479
2574
|
}
|
|
@@ -2503,44 +2598,44 @@ var WeekView = ({
|
|
|
2503
2598
|
acronym = tz;
|
|
2504
2599
|
}
|
|
2505
2600
|
}
|
|
2506
|
-
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, ")"));
|
|
2507
2602
|
};
|
|
2508
2603
|
const timeFormat = getTimeFormat(language);
|
|
2509
2604
|
const eventTimeFormat = getTimeFormatFull(language);
|
|
2510
2605
|
const nowFormat = getTimeFormatFull(language);
|
|
2511
|
-
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(
|
|
2512
2607
|
"div",
|
|
2513
2608
|
{
|
|
2514
2609
|
ref: scrollContainerRef,
|
|
2515
2610
|
className: "flex-1 min-h-0 overflow-y-auto scrollbar-hide relative bg-background scroll-smooth",
|
|
2516
2611
|
style: { scrollbarGutter: "stable" }
|
|
2517
2612
|
},
|
|
2518
|
-
/* @__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(
|
|
2519
2614
|
"w-9 h-9 flex items-center justify-center rounded-xl mx-auto text-sm font-semibold transition-all duration-200",
|
|
2520
2615
|
isToday(day) ? "bg-primary text-primary-foreground shadow-lg shadow-primary/30 scale-110" : "text-foreground hover:bg-accent/80"
|
|
2521
2616
|
) }, format(day, "d", { locale })))))),
|
|
2522
|
-
/* @__PURE__ */
|
|
2617
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2523
2618
|
"div",
|
|
2524
2619
|
{
|
|
2525
2620
|
className: "flex min-w-full relative",
|
|
2526
2621
|
style: { height: hours.length * hourHeight }
|
|
2527
2622
|
},
|
|
2528
|
-
/* @__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(
|
|
2529
2624
|
"div",
|
|
2530
2625
|
{
|
|
2531
2626
|
key: hour,
|
|
2532
2627
|
className: "relative w-full text-[11px] text-muted-foreground/80 text-right pr-3 font-medium tabular-nums box-border",
|
|
2533
2628
|
style: { height: hourHeight }
|
|
2534
2629
|
},
|
|
2535
|
-
/* @__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 }))
|
|
2536
2631
|
))),
|
|
2537
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex-1 grid grid-cols-7 relative" }, weekDays.map((day, dayIndex) => {
|
|
2538
2633
|
const dayEvents = events.filter((e) => {
|
|
2539
2634
|
const zonedStart = getZonedDate(e.start);
|
|
2540
2635
|
return isSameDay(zonedStart, day);
|
|
2541
2636
|
});
|
|
2542
|
-
return /* @__PURE__ */
|
|
2543
|
-
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(
|
|
2544
2639
|
"div",
|
|
2545
2640
|
{
|
|
2546
2641
|
key: hour,
|
|
@@ -2551,7 +2646,7 @@ var WeekView = ({
|
|
|
2551
2646
|
const cellDate = new Date(day);
|
|
2552
2647
|
cellDate.setHours(hour, minute, 0, 0);
|
|
2553
2648
|
const cellId = cellDate.toISOString();
|
|
2554
|
-
return /* @__PURE__ */
|
|
2649
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2555
2650
|
DroppableCell,
|
|
2556
2651
|
{
|
|
2557
2652
|
key: minute,
|
|
@@ -2563,7 +2658,7 @@ var WeekView = ({
|
|
|
2563
2658
|
top: `${minute / 60 * 100}%`
|
|
2564
2659
|
}
|
|
2565
2660
|
},
|
|
2566
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2567
2662
|
"div",
|
|
2568
2663
|
{
|
|
2569
2664
|
className: "w-full h-full bg-transparent cursor-pointer",
|
|
@@ -2597,9 +2692,9 @@ var WeekView = ({
|
|
|
2597
2692
|
const height = durationMinutes / 60 * hourHeight;
|
|
2598
2693
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2599
2694
|
const isShortEvent = compactShortEvents && durationMinutes < 60;
|
|
2600
|
-
const resolvedBadge = resolveEventBadge(event, language);
|
|
2695
|
+
const resolvedBadge = !isShortEvent ? resolveEventBadge(event, language) : void 0;
|
|
2601
2696
|
const hasBadge = Boolean(resolvedBadge);
|
|
2602
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2603
2698
|
DraggableEvent,
|
|
2604
2699
|
{
|
|
2605
2700
|
key: `${event.id}-${day.toISOString()}`,
|
|
@@ -2614,7 +2709,7 @@ var WeekView = ({
|
|
|
2614
2709
|
paddingRight: count > 1 ? "2px" : "0"
|
|
2615
2710
|
}
|
|
2616
2711
|
},
|
|
2617
|
-
/* @__PURE__ */
|
|
2712
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2618
2713
|
ResizableEvent,
|
|
2619
2714
|
{
|
|
2620
2715
|
readonly,
|
|
@@ -2624,48 +2719,56 @@ var WeekView = ({
|
|
|
2624
2719
|
className: "h-full",
|
|
2625
2720
|
style: { height: "100%" }
|
|
2626
2721
|
},
|
|
2627
|
-
/* @__PURE__ */
|
|
2628
|
-
|
|
2722
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2723
|
+
EventHoverPopover,
|
|
2629
2724
|
{
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2634
|
-
!event.color && "border-primary/20 bg-primary/10",
|
|
2635
|
-
isShortEvent ? "px-1 flex items-center justify-center" : "p-2",
|
|
2636
|
-
// Reserve space under the badge so title/time do not overlap
|
|
2637
|
-
hasBadge && !isShortEvent && "pt-4",
|
|
2638
|
-
// Add active border for overlapped events to distinguish them
|
|
2639
|
-
count > 1 && "border-l-4 border-l-primary/50"
|
|
2640
|
-
),
|
|
2641
|
-
style: {
|
|
2642
|
-
height: "100%",
|
|
2643
|
-
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
2644
|
-
borderColor: event.color ? `${event.color}40` : void 0,
|
|
2645
|
-
borderLeftWidth: "3px",
|
|
2646
|
-
borderLeftColor: event.color || "var(--primary)"
|
|
2647
|
-
},
|
|
2648
|
-
onClick: (e) => {
|
|
2649
|
-
e.stopPropagation();
|
|
2650
|
-
onEventClick?.(event);
|
|
2651
|
-
},
|
|
2652
|
-
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 })}`
|
|
2653
2728
|
},
|
|
2654
|
-
|
|
2655
|
-
|
|
2729
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2730
|
+
"div",
|
|
2656
2731
|
{
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
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
|
+
)
|
|
2665
2768
|
)
|
|
2666
2769
|
)
|
|
2667
2770
|
);
|
|
2668
|
-
}), isToday(day) && /* @__PURE__ */
|
|
2771
|
+
}), isToday(day) && /* @__PURE__ */ React18__default.createElement(
|
|
2669
2772
|
"div",
|
|
2670
2773
|
{
|
|
2671
2774
|
className: "absolute left-0 right-0 z-20 pointer-events-none flex items-center",
|
|
@@ -2673,12 +2776,12 @@ var WeekView = ({
|
|
|
2673
2776
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2674
2777
|
}
|
|
2675
2778
|
},
|
|
2676
|
-
/* @__PURE__ */
|
|
2677
|
-
/* @__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" })
|
|
2678
2781
|
));
|
|
2679
2782
|
}))
|
|
2680
2783
|
),
|
|
2681
|
-
/* @__PURE__ */
|
|
2784
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2682
2785
|
"div",
|
|
2683
2786
|
{
|
|
2684
2787
|
className: "absolute left-0 w-16 pointer-events-none z-30 flex justify-end pr-2",
|
|
@@ -2686,7 +2789,7 @@ var WeekView = ({
|
|
|
2686
2789
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight + 80}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight + 80}px`
|
|
2687
2790
|
}
|
|
2688
2791
|
},
|
|
2689
|
-
/* @__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 }))
|
|
2690
2793
|
)
|
|
2691
2794
|
));
|
|
2692
2795
|
};
|
|
@@ -2706,13 +2809,13 @@ var DayView = ({
|
|
|
2706
2809
|
}) => {
|
|
2707
2810
|
const hours = reverseTime ? Array.from({ length: 24 }, (_, i) => 23 - i) : Array.from({ length: 24 }, (_, i) => i);
|
|
2708
2811
|
const hourHeight = 80;
|
|
2709
|
-
const scrollContainerRef =
|
|
2710
|
-
const [now, setNow] =
|
|
2711
|
-
|
|
2812
|
+
const scrollContainerRef = React18__default.useRef(null);
|
|
2813
|
+
const [now, setNow] = React18__default.useState(/* @__PURE__ */ new Date());
|
|
2814
|
+
React18__default.useEffect(() => {
|
|
2712
2815
|
const interval = setInterval(() => setNow(/* @__PURE__ */ new Date()), 6e4);
|
|
2713
2816
|
return () => clearInterval(interval);
|
|
2714
2817
|
}, []);
|
|
2715
|
-
|
|
2818
|
+
React18__default.useEffect(() => {
|
|
2716
2819
|
if (scrollContainerRef.current) {
|
|
2717
2820
|
scrollContainerRef.current.scrollTop = reverseTime ? (23 - initialScrollHour) * hourHeight : initialScrollHour * hourHeight;
|
|
2718
2821
|
}
|
|
@@ -2728,15 +2831,15 @@ var DayView = ({
|
|
|
2728
2831
|
const timeFormat = getTimeFormat(language);
|
|
2729
2832
|
const eventTimeFormat = getTimeFormatFull(language);
|
|
2730
2833
|
const nowFormat = getTimeFormatFull(language);
|
|
2731
|
-
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(
|
|
2732
2835
|
"div",
|
|
2733
2836
|
{
|
|
2734
2837
|
key: hour,
|
|
2735
2838
|
className: "relative w-full",
|
|
2736
2839
|
style: { height: hourHeight }
|
|
2737
2840
|
},
|
|
2738
|
-
hour !== 0 && /* @__PURE__ */
|
|
2739
|
-
)), 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(
|
|
2740
2843
|
"div",
|
|
2741
2844
|
{
|
|
2742
2845
|
className: "absolute left-0 w-full pointer-events-none z-30 flex justify-end pr-2",
|
|
@@ -2744,9 +2847,9 @@ var DayView = ({
|
|
|
2744
2847
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2745
2848
|
}
|
|
2746
2849
|
},
|
|
2747
|
-
/* @__PURE__ */
|
|
2748
|
-
)), /* @__PURE__ */
|
|
2749
|
-
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(
|
|
2750
2853
|
"div",
|
|
2751
2854
|
{
|
|
2752
2855
|
key: hour,
|
|
@@ -2757,7 +2860,7 @@ var DayView = ({
|
|
|
2757
2860
|
const cellDate = new Date(currentDate);
|
|
2758
2861
|
cellDate.setHours(hour, minute, 0, 0);
|
|
2759
2862
|
const cellId = cellDate.toISOString();
|
|
2760
|
-
return /* @__PURE__ */
|
|
2863
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2761
2864
|
DroppableCell,
|
|
2762
2865
|
{
|
|
2763
2866
|
key: minute,
|
|
@@ -2769,7 +2872,7 @@ var DayView = ({
|
|
|
2769
2872
|
top: `${minute / 60 * 100}%`
|
|
2770
2873
|
}
|
|
2771
2874
|
},
|
|
2772
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2773
2876
|
"div",
|
|
2774
2877
|
{
|
|
2775
2878
|
className: "h-full w-full bg-transparent cursor-pointer",
|
|
@@ -2802,7 +2905,8 @@ var DayView = ({
|
|
|
2802
2905
|
const height = durationMinutes / 60 * hourHeight;
|
|
2803
2906
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2804
2907
|
const isShortEvent = compactShortEvents && durationMinutes < 45;
|
|
2805
|
-
|
|
2908
|
+
const timeRange = `${format(zonedStart, eventTimeFormat, { locale })} - ${format(zonedEnd, eventTimeFormat, { locale })}`;
|
|
2909
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
2806
2910
|
DraggableEvent,
|
|
2807
2911
|
{
|
|
2808
2912
|
key: `${event.id}-${currentDate.toISOString()}`,
|
|
@@ -2816,7 +2920,7 @@ var DayView = ({
|
|
|
2816
2920
|
paddingRight: count > 1 ? "2px" : "0"
|
|
2817
2921
|
}
|
|
2818
2922
|
},
|
|
2819
|
-
/* @__PURE__ */
|
|
2923
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2820
2924
|
ResizableEvent,
|
|
2821
2925
|
{
|
|
2822
2926
|
readonly,
|
|
@@ -2826,38 +2930,46 @@ var DayView = ({
|
|
|
2826
2930
|
className: "h-full",
|
|
2827
2931
|
style: { height: "100%" }
|
|
2828
2932
|
},
|
|
2829
|
-
/* @__PURE__ */
|
|
2830
|
-
|
|
2933
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2934
|
+
EventHoverPopover,
|
|
2831
2935
|
{
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2836
|
-
!event.color && "bg-primary/10 border-primary/20",
|
|
2837
|
-
isShortEvent ? "px-2 flex items-center" : "px-3 py-2",
|
|
2838
|
-
count > 1 && "border-l-4"
|
|
2839
|
-
),
|
|
2840
|
-
style: {
|
|
2841
|
-
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
2842
|
-
borderColor: event.color ? `${event.color}30` : void 0,
|
|
2843
|
-
borderLeftColor: event.color || "var(--primary)",
|
|
2844
|
-
borderLeftWidth: count > 1 ? "4px" : "3px"
|
|
2845
|
-
},
|
|
2846
|
-
onClick: (e) => {
|
|
2847
|
-
e.stopPropagation();
|
|
2848
|
-
onEventClick?.(event);
|
|
2849
|
-
},
|
|
2850
|
-
title: count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2936
|
+
enabled: isShortEvent,
|
|
2937
|
+
event,
|
|
2938
|
+
timeRange
|
|
2851
2939
|
},
|
|
2852
|
-
/* @__PURE__ */
|
|
2853
|
-
"
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
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
|
+
)
|
|
2857
2969
|
)
|
|
2858
2970
|
)
|
|
2859
2971
|
);
|
|
2860
|
-
}), isToday(currentDate) && /* @__PURE__ */
|
|
2972
|
+
}), isToday(currentDate) && /* @__PURE__ */ React18__default.createElement(
|
|
2861
2973
|
"div",
|
|
2862
2974
|
{
|
|
2863
2975
|
className: "absolute left-0 right-0 z-20 pointer-events-none flex items-center",
|
|
@@ -2865,17 +2977,17 @@ var DayView = ({
|
|
|
2865
2977
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2866
2978
|
}
|
|
2867
2979
|
},
|
|
2868
|
-
/* @__PURE__ */
|
|
2869
|
-
/* @__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" })
|
|
2870
2982
|
)))));
|
|
2871
2983
|
};
|
|
2872
|
-
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(
|
|
2873
2985
|
"button",
|
|
2874
2986
|
{
|
|
2875
2987
|
onClick: onCreateEvent,
|
|
2876
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"
|
|
2877
2989
|
},
|
|
2878
|
-
/* @__PURE__ */
|
|
2990
|
+
/* @__PURE__ */ React18__default.createElement(Plus, { className: "w-4 h-4" }),
|
|
2879
2991
|
translations?.createEvent || "Create Event"
|
|
2880
2992
|
)));
|
|
2881
2993
|
var formatDuration = (start, end) => {
|
|
@@ -2927,7 +3039,7 @@ var AgendaView = ({
|
|
|
2927
3039
|
hidden: { opacity: 0, x: -20 },
|
|
2928
3040
|
show: { opacity: 1, x: 0 }
|
|
2929
3041
|
};
|
|
2930
|
-
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(
|
|
2931
3043
|
motion.div,
|
|
2932
3044
|
{
|
|
2933
3045
|
className: "max-w-3xl mx-auto w-full pb-10 px-4 md:px-6",
|
|
@@ -2935,21 +3047,21 @@ var AgendaView = ({
|
|
|
2935
3047
|
initial: "hidden",
|
|
2936
3048
|
animate: "show"
|
|
2937
3049
|
},
|
|
2938
|
-
groupedEvents.map((group, groupIndex) => /* @__PURE__ */
|
|
3050
|
+
groupedEvents.map((group, groupIndex) => /* @__PURE__ */ React18__default.createElement(
|
|
2939
3051
|
motion.div,
|
|
2940
3052
|
{
|
|
2941
3053
|
key: group.date.toISOString(),
|
|
2942
3054
|
className: "relative",
|
|
2943
3055
|
variants: item
|
|
2944
3056
|
},
|
|
2945
|
-
/* @__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(
|
|
2946
3058
|
"flex flex-col items-center justify-center w-16 h-16 rounded-2xl transition-all",
|
|
2947
3059
|
isToday(group.date) ? "bg-primary text-primary-foreground shadow-lg shadow-primary/30" : "bg-muted/50 text-foreground"
|
|
2948
|
-
) }, /* @__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(
|
|
2949
3061
|
"text-lg font-semibold",
|
|
2950
3062
|
isToday(group.date) && "text-primary"
|
|
2951
|
-
) }, getDateLabel(group.date, translations?.today ?? "Today", translations?.tomorrow ?? "Tomorrow")), /* @__PURE__ */
|
|
2952
|
-
/* @__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(
|
|
2953
3065
|
motion.div,
|
|
2954
3066
|
{
|
|
2955
3067
|
key: event.id,
|
|
@@ -2963,22 +3075,22 @@ var AgendaView = ({
|
|
|
2963
3075
|
whileHover: { scale: 1.01, y: -2 },
|
|
2964
3076
|
transition: { duration: 0.2 }
|
|
2965
3077
|
},
|
|
2966
|
-
/* @__PURE__ */
|
|
3078
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
2967
3079
|
"div",
|
|
2968
3080
|
{
|
|
2969
3081
|
className: "absolute left-0 top-3 bottom-3 w-1 rounded-full",
|
|
2970
3082
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
2971
3083
|
}
|
|
2972
3084
|
),
|
|
2973
|
-
/* @__PURE__ */
|
|
2974
|
-
/* @__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(
|
|
2975
3087
|
"div",
|
|
2976
3088
|
{
|
|
2977
3089
|
className: "w-3 h-3 rounded-full shrink-0 mt-1.5",
|
|
2978
3090
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
2979
3091
|
}
|
|
2980
|
-
)), event.description && /* @__PURE__ */
|
|
2981
|
-
/* @__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" })))
|
|
2982
3094
|
)))
|
|
2983
3095
|
))
|
|
2984
3096
|
));
|
|
@@ -3010,7 +3122,7 @@ var ResourceView = ({
|
|
|
3010
3122
|
// Min width for visibility
|
|
3011
3123
|
};
|
|
3012
3124
|
};
|
|
3013
|
-
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(
|
|
3014
3126
|
"div",
|
|
3015
3127
|
{
|
|
3016
3128
|
key: hour,
|
|
@@ -3018,11 +3130,11 @@ var ResourceView = ({
|
|
|
3018
3130
|
style: { width: hourWidth }
|
|
3019
3131
|
},
|
|
3020
3132
|
format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale })
|
|
3021
|
-
))))), /* @__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) => {
|
|
3022
3134
|
const resourceEvents = events.filter(
|
|
3023
3135
|
(e) => e.resourceId === resource.id && isSameDay(new Date(e.start), currentDate)
|
|
3024
3136
|
);
|
|
3025
|
-
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(
|
|
3026
3138
|
"div",
|
|
3027
3139
|
{
|
|
3028
3140
|
key: hour,
|
|
@@ -3033,7 +3145,7 @@ var ResourceView = ({
|
|
|
3033
3145
|
const slotDate = new Date(currentDate);
|
|
3034
3146
|
slotDate.setHours(hour, minute, 0, 0);
|
|
3035
3147
|
const slotId = `${resource.id}-${slotDate.toISOString()}`;
|
|
3036
|
-
return /* @__PURE__ */
|
|
3148
|
+
return /* @__PURE__ */ React18__default.createElement(
|
|
3037
3149
|
DroppableCell,
|
|
3038
3150
|
{
|
|
3039
3151
|
key: minute,
|
|
@@ -3047,7 +3159,7 @@ var ResourceView = ({
|
|
|
3047
3159
|
}
|
|
3048
3160
|
);
|
|
3049
3161
|
})
|
|
3050
|
-
)), resourceEvents.map((event) => /* @__PURE__ */
|
|
3162
|
+
)), resourceEvents.map((event) => /* @__PURE__ */ React18__default.createElement(
|
|
3051
3163
|
DraggableEvent,
|
|
3052
3164
|
{
|
|
3053
3165
|
key: event.id,
|
|
@@ -3064,7 +3176,7 @@ var ResourceView = ({
|
|
|
3064
3176
|
color: "#fff"
|
|
3065
3177
|
}
|
|
3066
3178
|
},
|
|
3067
|
-
/* @__PURE__ */
|
|
3179
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "truncate" }, event.title)
|
|
3068
3180
|
))));
|
|
3069
3181
|
}))));
|
|
3070
3182
|
};
|
|
@@ -3091,14 +3203,14 @@ var Modal = ({
|
|
|
3091
3203
|
};
|
|
3092
3204
|
}, [isOpen, onClose]);
|
|
3093
3205
|
if (!isOpen) return null;
|
|
3094
|
-
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(
|
|
3095
3207
|
"div",
|
|
3096
3208
|
{
|
|
3097
3209
|
ref: overlayRef,
|
|
3098
3210
|
className: "absolute inset-0",
|
|
3099
3211
|
onClick: onClose
|
|
3100
3212
|
}
|
|
3101
|
-
), /* @__PURE__ */
|
|
3213
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3102
3214
|
"div",
|
|
3103
3215
|
{
|
|
3104
3216
|
className: cn(
|
|
@@ -3106,7 +3218,7 @@ var Modal = ({
|
|
|
3106
3218
|
className
|
|
3107
3219
|
)
|
|
3108
3220
|
},
|
|
3109
|
-
!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(
|
|
3110
3222
|
Button,
|
|
3111
3223
|
{
|
|
3112
3224
|
variant: "ghost",
|
|
@@ -3114,10 +3226,10 @@ var Modal = ({
|
|
|
3114
3226
|
onClick: onClose,
|
|
3115
3227
|
className: "h-9 w-9 p-0 rounded-xl hover:bg-accent/80 transition-all duration-200"
|
|
3116
3228
|
},
|
|
3117
|
-
/* @__PURE__ */
|
|
3118
|
-
/* @__PURE__ */
|
|
3229
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "h-4 w-4" }),
|
|
3230
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "sr-only" }, "Close")
|
|
3119
3231
|
)),
|
|
3120
|
-
/* @__PURE__ */
|
|
3232
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: cn("overflow-y-auto flex-1", !hideHeader && "p-6") }, children)
|
|
3121
3233
|
));
|
|
3122
3234
|
};
|
|
3123
3235
|
var COLOR_PALETTE = [
|
|
@@ -3318,7 +3430,7 @@ var EventModal = ({
|
|
|
3318
3430
|
if (remainingMins === 0) return `${hours} hr`;
|
|
3319
3431
|
return `${hours} hr ${remainingMins} min`;
|
|
3320
3432
|
};
|
|
3321
|
-
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(
|
|
3322
3434
|
"div",
|
|
3323
3435
|
{
|
|
3324
3436
|
className: "relative px-6 pt-6 pb-8",
|
|
@@ -3326,50 +3438,50 @@ var EventModal = ({
|
|
|
3326
3438
|
background: `linear-gradient(135deg, ${event?.color || "#3b82f6"}15 0%, transparent 100%)`
|
|
3327
3439
|
}
|
|
3328
3440
|
},
|
|
3329
|
-
/* @__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(
|
|
3330
3442
|
"div",
|
|
3331
3443
|
{
|
|
3332
3444
|
className: "w-3 h-3 rounded-full",
|
|
3333
3445
|
style: { backgroundColor: event?.color || "#3b82f6" }
|
|
3334
3446
|
}
|
|
3335
|
-
), /* @__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(
|
|
3336
3448
|
"button",
|
|
3337
3449
|
{
|
|
3338
3450
|
onClick: () => setMode("edit"),
|
|
3339
3451
|
className: "p-2 hover:bg-background/80 rounded-lg transition-all text-muted-foreground hover:text-foreground",
|
|
3340
3452
|
title: "Edit"
|
|
3341
3453
|
},
|
|
3342
|
-
/* @__PURE__ */
|
|
3343
|
-
), /* @__PURE__ */
|
|
3454
|
+
/* @__PURE__ */ React18__default.createElement(Edit2, { className: "w-4 h-4" })
|
|
3455
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3344
3456
|
"button",
|
|
3345
3457
|
{
|
|
3346
3458
|
onClick: handleDelete,
|
|
3347
3459
|
className: "p-2 hover:bg-destructive/10 rounded-lg transition-all text-muted-foreground hover:text-destructive",
|
|
3348
3460
|
title: "Delete"
|
|
3349
3461
|
},
|
|
3350
|
-
/* @__PURE__ */
|
|
3351
|
-
), /* @__PURE__ */
|
|
3462
|
+
/* @__PURE__ */ React18__default.createElement(Trash2, { className: "w-4 h-4" })
|
|
3463
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3352
3464
|
"button",
|
|
3353
3465
|
{
|
|
3354
3466
|
onClick: onClose,
|
|
3355
3467
|
className: "p-2 hover:bg-background/80 rounded-lg transition-all text-muted-foreground hover:text-foreground",
|
|
3356
3468
|
title: "Close"
|
|
3357
3469
|
},
|
|
3358
|
-
/* @__PURE__ */
|
|
3470
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "w-4 h-4" })
|
|
3359
3471
|
))),
|
|
3360
|
-
/* @__PURE__ */
|
|
3361
|
-
/* @__PURE__ */
|
|
3362
|
-
), /* @__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(
|
|
3363
3475
|
motion.div,
|
|
3364
3476
|
{
|
|
3365
3477
|
initial: { opacity: 0, y: 10 },
|
|
3366
3478
|
animate: { opacity: 1, y: 0 },
|
|
3367
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"
|
|
3368
3480
|
},
|
|
3369
|
-
/* @__PURE__ */
|
|
3370
|
-
/* @__PURE__ */
|
|
3371
|
-
/* @__PURE__ */
|
|
3372
|
-
), 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(
|
|
3373
3485
|
motion.div,
|
|
3374
3486
|
{
|
|
3375
3487
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3377,14 +3489,14 @@ var EventModal = ({
|
|
|
3377
3489
|
transition: { delay: 0.05 },
|
|
3378
3490
|
className: "space-y-3"
|
|
3379
3491
|
},
|
|
3380
|
-
/* @__PURE__ */
|
|
3381
|
-
/* @__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(
|
|
3382
3494
|
"div",
|
|
3383
3495
|
{
|
|
3384
3496
|
key: index,
|
|
3385
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"
|
|
3386
3498
|
},
|
|
3387
|
-
/* @__PURE__ */
|
|
3499
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3388
3500
|
"div",
|
|
3389
3501
|
{
|
|
3390
3502
|
className: "w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold text-white",
|
|
@@ -3392,9 +3504,9 @@ var EventModal = ({
|
|
|
3392
3504
|
},
|
|
3393
3505
|
email[0].toUpperCase()
|
|
3394
3506
|
),
|
|
3395
|
-
/* @__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))
|
|
3396
3508
|
)))
|
|
3397
|
-
), event?.reminders && event.reminders.length > 0 && /* @__PURE__ */
|
|
3509
|
+
), event?.reminders && event.reminders.length > 0 && /* @__PURE__ */ React18__default.createElement(
|
|
3398
3510
|
motion.div,
|
|
3399
3511
|
{
|
|
3400
3512
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3402,8 +3514,8 @@ var EventModal = ({
|
|
|
3402
3514
|
transition: { delay: 0.1 },
|
|
3403
3515
|
className: "flex items-center gap-3"
|
|
3404
3516
|
},
|
|
3405
|
-
/* @__PURE__ */
|
|
3406
|
-
/* @__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(
|
|
3407
3519
|
"span",
|
|
3408
3520
|
{
|
|
3409
3521
|
key: reminder.id,
|
|
@@ -3411,7 +3523,7 @@ var EventModal = ({
|
|
|
3411
3523
|
},
|
|
3412
3524
|
reminder.label || `${reminder.time} min before`
|
|
3413
3525
|
)))
|
|
3414
|
-
), event?.description && /* @__PURE__ */
|
|
3526
|
+
), event?.description && /* @__PURE__ */ React18__default.createElement(
|
|
3415
3527
|
motion.div,
|
|
3416
3528
|
{
|
|
3417
3529
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3419,9 +3531,9 @@ var EventModal = ({
|
|
|
3419
3531
|
transition: { delay: 0.15 },
|
|
3420
3532
|
className: "space-y-2"
|
|
3421
3533
|
},
|
|
3422
|
-
/* @__PURE__ */
|
|
3423
|
-
/* @__PURE__ */
|
|
3424
|
-
), 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(
|
|
3425
3537
|
motion.div,
|
|
3426
3538
|
{
|
|
3427
3539
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3429,27 +3541,27 @@ var EventModal = ({
|
|
|
3429
3541
|
transition: { delay: 0.2 },
|
|
3430
3542
|
className: "space-y-2"
|
|
3431
3543
|
},
|
|
3432
|
-
/* @__PURE__ */
|
|
3433
|
-
/* @__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(
|
|
3434
3546
|
"div",
|
|
3435
3547
|
{
|
|
3436
3548
|
key: att.id,
|
|
3437
3549
|
onClick: () => handleDownload(att),
|
|
3438
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"
|
|
3439
3551
|
},
|
|
3440
|
-
/* @__PURE__ */
|
|
3441
|
-
/* @__PURE__ */
|
|
3442
|
-
/* @__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" })
|
|
3443
3555
|
)))
|
|
3444
3556
|
)));
|
|
3445
|
-
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(
|
|
3446
3558
|
"button",
|
|
3447
3559
|
{
|
|
3448
3560
|
type: "button",
|
|
3449
3561
|
onClick: () => setIsColorPickerOpen(!isColorPickerOpen),
|
|
3450
3562
|
className: "relative p-1"
|
|
3451
3563
|
},
|
|
3452
|
-
/* @__PURE__ */
|
|
3564
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3453
3565
|
"div",
|
|
3454
3566
|
{
|
|
3455
3567
|
className: "w-5 h-5 rounded-full cursor-pointer hover:scale-110 transition-transform",
|
|
@@ -3459,7 +3571,7 @@ var EventModal = ({
|
|
|
3459
3571
|
}
|
|
3460
3572
|
}
|
|
3461
3573
|
),
|
|
3462
|
-
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(
|
|
3463
3575
|
"button",
|
|
3464
3576
|
{
|
|
3465
3577
|
key: color,
|
|
@@ -3475,15 +3587,15 @@ var EventModal = ({
|
|
|
3475
3587
|
style: { backgroundColor: color, color }
|
|
3476
3588
|
}
|
|
3477
3589
|
)))
|
|
3478
|
-
), /* @__PURE__ */
|
|
3590
|
+
), /* @__PURE__ */ React18__default.createElement("h2", { className: "text-lg font-semibold text-foreground" }, mode === "edit" ? translations.editEvent : translations.newEvent)), /* @__PURE__ */ React18__default.createElement(
|
|
3479
3591
|
"button",
|
|
3480
3592
|
{
|
|
3481
3593
|
type: "button",
|
|
3482
3594
|
onClick: onClose,
|
|
3483
3595
|
className: "p-2 hover:bg-accent rounded-xl transition-all text-muted-foreground hover:text-foreground"
|
|
3484
3596
|
},
|
|
3485
|
-
/* @__PURE__ */
|
|
3486
|
-
)), /* @__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(
|
|
3487
3599
|
"input",
|
|
3488
3600
|
{
|
|
3489
3601
|
type: "text",
|
|
@@ -3494,7 +3606,7 @@ var EventModal = ({
|
|
|
3494
3606
|
onChange: (e) => setFormData({ ...formData, title: e.target.value }),
|
|
3495
3607
|
placeholder: translations.addTitle
|
|
3496
3608
|
}
|
|
3497
|
-
)), /* @__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(
|
|
3498
3610
|
"input",
|
|
3499
3611
|
{
|
|
3500
3612
|
type: "datetime-local",
|
|
@@ -3502,7 +3614,7 @@ var EventModal = ({
|
|
|
3502
3614
|
value: formatDateForInput(formData.start),
|
|
3503
3615
|
onChange: (e) => handleDateChange("start", e.target.value)
|
|
3504
3616
|
}
|
|
3505
|
-
)), /* @__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(
|
|
3506
3618
|
"input",
|
|
3507
3619
|
{
|
|
3508
3620
|
type: "datetime-local",
|
|
@@ -3510,16 +3622,16 @@ var EventModal = ({
|
|
|
3510
3622
|
value: formatDateForInput(formData.end),
|
|
3511
3623
|
onChange: (e) => handleDateChange("end", e.target.value)
|
|
3512
3624
|
}
|
|
3513
|
-
)))), 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(
|
|
3514
3626
|
"button",
|
|
3515
3627
|
{
|
|
3516
3628
|
type: "button",
|
|
3517
3629
|
onClick: () => setIsReminderDropdownOpen(!isReminderDropdownOpen),
|
|
3518
3630
|
className: "flex items-center gap-1 text-xs font-medium text-primary hover:text-primary/80 transition-colors"
|
|
3519
3631
|
},
|
|
3520
|
-
/* @__PURE__ */
|
|
3632
|
+
/* @__PURE__ */ React18__default.createElement(Plus, { className: "w-3.5 h-3.5" }),
|
|
3521
3633
|
translations.addReminder
|
|
3522
|
-
), 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(
|
|
3523
3635
|
"button",
|
|
3524
3636
|
{
|
|
3525
3637
|
key: option.value,
|
|
@@ -3528,58 +3640,58 @@ var EventModal = ({
|
|
|
3528
3640
|
className: "w-full px-3 py-2 text-left text-sm hover:bg-accent transition-colors"
|
|
3529
3641
|
},
|
|
3530
3642
|
option.label
|
|
3531
|
-
)))))), 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(
|
|
3532
3644
|
"div",
|
|
3533
3645
|
{
|
|
3534
3646
|
key: reminder.id,
|
|
3535
3647
|
className: "flex items-center gap-2 px-3 py-1.5 rounded-full bg-amber-500/10 border border-amber-500/20"
|
|
3536
3648
|
},
|
|
3537
|
-
/* @__PURE__ */
|
|
3538
|
-
/* @__PURE__ */
|
|
3539
|
-
/* @__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(
|
|
3540
3652
|
"button",
|
|
3541
3653
|
{
|
|
3542
3654
|
type: "button",
|
|
3543
3655
|
onClick: () => removeReminder(reminder.id),
|
|
3544
3656
|
className: "p-0.5 hover:bg-amber-500/20 rounded-full transition-colors"
|
|
3545
3657
|
},
|
|
3546
|
-
/* @__PURE__ */
|
|
3658
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "w-3 h-3 text-amber-500" })
|
|
3547
3659
|
)
|
|
3548
|
-
)))), /* @__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(
|
|
3549
3661
|
"button",
|
|
3550
3662
|
{
|
|
3551
3663
|
type: "button",
|
|
3552
3664
|
onClick: () => setIsGuestsDropdownOpen(!isGuestsDropdownOpen),
|
|
3553
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"
|
|
3554
3666
|
},
|
|
3555
|
-
/* @__PURE__ */
|
|
3556
|
-
/* @__PURE__ */
|
|
3557
|
-
), 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(
|
|
3558
3670
|
"div",
|
|
3559
3671
|
{
|
|
3560
3672
|
key: email,
|
|
3561
3673
|
className: "px-4 py-3 hover:bg-accent cursor-pointer flex items-center gap-3 transition-colors",
|
|
3562
3674
|
onClick: () => toggleGuest(email)
|
|
3563
3675
|
},
|
|
3564
|
-
/* @__PURE__ */
|
|
3676
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: cn(
|
|
3565
3677
|
"w-5 h-5 rounded-md border-2 flex items-center justify-center transition-all",
|
|
3566
3678
|
selectedGuests.includes(email) ? "bg-primary border-primary" : "border-border"
|
|
3567
|
-
) }, selectedGuests.includes(email) && /* @__PURE__ */
|
|
3568
|
-
/* @__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(
|
|
3569
3681
|
"div",
|
|
3570
3682
|
{
|
|
3571
3683
|
className: "w-7 h-7 rounded-full flex items-center justify-center text-xs font-semibold text-white",
|
|
3572
3684
|
style: { backgroundColor: `hsl(${fakeGuests.indexOf(email) * 60}, 70%, 50%)` }
|
|
3573
3685
|
},
|
|
3574
3686
|
email[0].toUpperCase()
|
|
3575
|
-
), /* @__PURE__ */
|
|
3576
|
-
))))), 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(
|
|
3577
3689
|
"div",
|
|
3578
3690
|
{
|
|
3579
3691
|
key: email,
|
|
3580
3692
|
className: "flex items-center gap-2 pl-1 pr-2 py-1 bg-muted/30 border border-border/30 rounded-full"
|
|
3581
3693
|
},
|
|
3582
|
-
/* @__PURE__ */
|
|
3694
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3583
3695
|
"div",
|
|
3584
3696
|
{
|
|
3585
3697
|
className: "w-6 h-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",
|
|
@@ -3587,17 +3699,17 @@ var EventModal = ({
|
|
|
3587
3699
|
},
|
|
3588
3700
|
email[0].toUpperCase()
|
|
3589
3701
|
),
|
|
3590
|
-
/* @__PURE__ */
|
|
3591
|
-
/* @__PURE__ */
|
|
3702
|
+
/* @__PURE__ */ React18__default.createElement("span", { className: "text-xs font-medium text-foreground" }, email.split("@")[0]),
|
|
3703
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3592
3704
|
"button",
|
|
3593
3705
|
{
|
|
3594
3706
|
type: "button",
|
|
3595
3707
|
onClick: () => toggleGuest(email),
|
|
3596
3708
|
className: "p-0.5 hover:bg-destructive/10 rounded-full transition-colors"
|
|
3597
3709
|
},
|
|
3598
|
-
/* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ React18__default.createElement(X, { className: "w-3 h-3 text-muted-foreground" })
|
|
3599
3711
|
)
|
|
3600
|
-
)))), /* @__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(
|
|
3601
3713
|
"input",
|
|
3602
3714
|
{
|
|
3603
3715
|
type: "text",
|
|
@@ -3606,7 +3718,7 @@ var EventModal = ({
|
|
|
3606
3718
|
value: formData.location || "",
|
|
3607
3719
|
onChange: (e) => setFormData({ ...formData, location: e.target.value })
|
|
3608
3720
|
}
|
|
3609
|
-
)), /* @__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(
|
|
3610
3722
|
"textarea",
|
|
3611
3723
|
{
|
|
3612
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",
|
|
@@ -3614,7 +3726,7 @@ var EventModal = ({
|
|
|
3614
3726
|
value: formData.description || "",
|
|
3615
3727
|
onChange: (e) => setFormData({ ...formData, description: e.target.value })
|
|
3616
3728
|
}
|
|
3617
|
-
)), /* @__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(
|
|
3618
3730
|
"select",
|
|
3619
3731
|
{
|
|
3620
3732
|
className: "flex-1 bg-transparent text-sm text-foreground focus:outline-none cursor-pointer",
|
|
@@ -3633,28 +3745,28 @@ var EventModal = ({
|
|
|
3633
3745
|
}
|
|
3634
3746
|
}
|
|
3635
3747
|
},
|
|
3636
|
-
/* @__PURE__ */
|
|
3637
|
-
/* @__PURE__ */
|
|
3638
|
-
/* @__PURE__ */
|
|
3639
|
-
/* @__PURE__ */
|
|
3640
|
-
/* @__PURE__ */
|
|
3641
|
-
)), /* @__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(
|
|
3642
3754
|
"button",
|
|
3643
3755
|
{
|
|
3644
3756
|
type: "button",
|
|
3645
3757
|
onClick: () => setIsCalendarDropdownOpen(!isCalendarDropdownOpen),
|
|
3646
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"
|
|
3647
3759
|
},
|
|
3648
|
-
/* @__PURE__ */
|
|
3760
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
3649
3761
|
"div",
|
|
3650
3762
|
{
|
|
3651
3763
|
className: "w-3 h-3 rounded-full",
|
|
3652
3764
|
style: { backgroundColor: calendars?.find((c) => c.id === formData.calendarId)?.color || "#3b82f6" }
|
|
3653
3765
|
}
|
|
3654
3766
|
),
|
|
3655
|
-
/* @__PURE__ */
|
|
3656
|
-
/* @__PURE__ */
|
|
3657
|
-
), 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(
|
|
3658
3770
|
"button",
|
|
3659
3771
|
{
|
|
3660
3772
|
key: cal.id,
|
|
@@ -3669,19 +3781,19 @@ var EventModal = ({
|
|
|
3669
3781
|
setIsCalendarDropdownOpen(false);
|
|
3670
3782
|
}
|
|
3671
3783
|
},
|
|
3672
|
-
/* @__PURE__ */
|
|
3673
|
-
/* @__PURE__ */
|
|
3674
|
-
formData.calendarId === cal.id && /* @__PURE__ */
|
|
3675
|
-
)))))))), /* @__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(
|
|
3676
3788
|
"button",
|
|
3677
3789
|
{
|
|
3678
3790
|
type: "button",
|
|
3679
3791
|
onClick: handleDelete,
|
|
3680
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"
|
|
3681
3793
|
},
|
|
3682
|
-
/* @__PURE__ */
|
|
3794
|
+
/* @__PURE__ */ React18__default.createElement(Trash2, { className: "w-4 h-4" }),
|
|
3683
3795
|
translations.delete
|
|
3684
|
-
), 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(
|
|
3685
3797
|
"button",
|
|
3686
3798
|
{
|
|
3687
3799
|
type: "button",
|
|
@@ -3689,7 +3801,7 @@ var EventModal = ({
|
|
|
3689
3801
|
className: "px-4 py-2.5 text-muted-foreground hover:text-foreground font-medium text-sm rounded-xl transition-all hover:bg-accent"
|
|
3690
3802
|
},
|
|
3691
3803
|
translations.cancel
|
|
3692
|
-
), /* @__PURE__ */
|
|
3804
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3693
3805
|
"button",
|
|
3694
3806
|
{
|
|
3695
3807
|
type: "submit",
|
|
@@ -3697,7 +3809,7 @@ var EventModal = ({
|
|
|
3697
3809
|
},
|
|
3698
3810
|
mode === "edit" ? translations.saveChanges : translations.createEvent
|
|
3699
3811
|
))));
|
|
3700
|
-
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(
|
|
3701
3813
|
motion.div,
|
|
3702
3814
|
{
|
|
3703
3815
|
key: "view",
|
|
@@ -3707,7 +3819,7 @@ var EventModal = ({
|
|
|
3707
3819
|
transition: { duration: 0.15 }
|
|
3708
3820
|
},
|
|
3709
3821
|
renderViewMode()
|
|
3710
|
-
) : /* @__PURE__ */
|
|
3822
|
+
) : /* @__PURE__ */ React18__default.createElement(
|
|
3711
3823
|
motion.div,
|
|
3712
3824
|
{
|
|
3713
3825
|
key: "edit",
|
|
@@ -3719,9 +3831,9 @@ var EventModal = ({
|
|
|
3719
3831
|
renderEditMode()
|
|
3720
3832
|
)));
|
|
3721
3833
|
};
|
|
3722
|
-
var Skeleton = ({ className, style }) => /* @__PURE__ */
|
|
3723
|
-
var MonthViewSkeleton = () => /* @__PURE__ */
|
|
3724
|
-
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(
|
|
3725
3837
|
Skeleton,
|
|
3726
3838
|
{
|
|
3727
3839
|
className: "absolute rounded-md",
|
|
@@ -3733,20 +3845,20 @@ var WeekViewSkeleton = () => /* @__PURE__ */ React17__default.createElement("div
|
|
|
3733
3845
|
}
|
|
3734
3846
|
}
|
|
3735
3847
|
))))));
|
|
3736
|
-
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(
|
|
3737
3849
|
Skeleton,
|
|
3738
3850
|
{
|
|
3739
3851
|
className: "absolute rounded-lg left-4 right-4",
|
|
3740
3852
|
style: { top: "160px", height: "120px" }
|
|
3741
3853
|
}
|
|
3742
|
-
), /* @__PURE__ */
|
|
3854
|
+
), /* @__PURE__ */ React18__default.createElement(
|
|
3743
3855
|
Skeleton,
|
|
3744
3856
|
{
|
|
3745
3857
|
className: "absolute rounded-lg left-4 right-4",
|
|
3746
3858
|
style: { top: "400px", height: "80px" }
|
|
3747
3859
|
}
|
|
3748
3860
|
))));
|
|
3749
|
-
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" })))))))));
|
|
3750
3862
|
var EventContextMenu = ({
|
|
3751
3863
|
event,
|
|
3752
3864
|
position,
|
|
@@ -3787,7 +3899,7 @@ var EventContextMenu = ({
|
|
|
3787
3899
|
...onEdit ? [{
|
|
3788
3900
|
id: "edit",
|
|
3789
3901
|
label: translations?.edit || "Edit",
|
|
3790
|
-
icon: /* @__PURE__ */
|
|
3902
|
+
icon: /* @__PURE__ */ React18__default.createElement(Edit3, { className: "w-4 h-4" }),
|
|
3791
3903
|
onClick: () => {
|
|
3792
3904
|
onEdit(event);
|
|
3793
3905
|
onClose();
|
|
@@ -3796,7 +3908,7 @@ var EventContextMenu = ({
|
|
|
3796
3908
|
...onDuplicate ? [{
|
|
3797
3909
|
id: "duplicate",
|
|
3798
3910
|
label: translations?.duplicate || "Duplicate",
|
|
3799
|
-
icon: /* @__PURE__ */
|
|
3911
|
+
icon: /* @__PURE__ */ React18__default.createElement(Copy, { className: "w-4 h-4" }),
|
|
3800
3912
|
onClick: () => {
|
|
3801
3913
|
onDuplicate(event);
|
|
3802
3914
|
onClose();
|
|
@@ -3806,7 +3918,7 @@ var EventContextMenu = ({
|
|
|
3806
3918
|
...onDelete ? [{
|
|
3807
3919
|
id: "delete",
|
|
3808
3920
|
label: translations?.delete || "Delete",
|
|
3809
|
-
icon: /* @__PURE__ */
|
|
3921
|
+
icon: /* @__PURE__ */ React18__default.createElement(Trash2, { className: "w-4 h-4" }),
|
|
3810
3922
|
onClick: () => {
|
|
3811
3923
|
onDelete(event.id);
|
|
3812
3924
|
onClose();
|
|
@@ -3818,7 +3930,7 @@ var EventContextMenu = ({
|
|
|
3818
3930
|
x: Math.min(position.x, window.innerWidth - 200),
|
|
3819
3931
|
y: Math.min(position.y, window.innerHeight - (actions.length * 44 + 80))
|
|
3820
3932
|
};
|
|
3821
|
-
return /* @__PURE__ */
|
|
3933
|
+
return /* @__PURE__ */ React18__default.createElement(AnimatePresence, null, /* @__PURE__ */ React18__default.createElement(
|
|
3822
3934
|
motion.div,
|
|
3823
3935
|
{
|
|
3824
3936
|
ref: menuRef,
|
|
@@ -3832,14 +3944,14 @@ var EventContextMenu = ({
|
|
|
3832
3944
|
top: adjustedPosition.y
|
|
3833
3945
|
}
|
|
3834
3946
|
},
|
|
3835
|
-
/* @__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(
|
|
3836
3948
|
"div",
|
|
3837
3949
|
{
|
|
3838
3950
|
className: "w-2.5 h-2.5 rounded-full shrink-0",
|
|
3839
3951
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
3840
3952
|
}
|
|
3841
|
-
), /* @__PURE__ */
|
|
3842
|
-
/* @__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(
|
|
3843
3955
|
"button",
|
|
3844
3956
|
{
|
|
3845
3957
|
onClick: action.onClick,
|
|
@@ -3851,7 +3963,7 @@ var EventContextMenu = ({
|
|
|
3851
3963
|
)
|
|
3852
3964
|
},
|
|
3853
3965
|
action.icon,
|
|
3854
|
-
/* @__PURE__ */
|
|
3966
|
+
/* @__PURE__ */ React18__default.createElement("span", null, action.label)
|
|
3855
3967
|
))))
|
|
3856
3968
|
));
|
|
3857
3969
|
};
|
|
@@ -4500,7 +4612,7 @@ var Scheduler = ({
|
|
|
4500
4612
|
(e) => e.start >= rangeStart && e.start <= rangeEnd
|
|
4501
4613
|
).length;
|
|
4502
4614
|
}, [filteredEvents, view, currentDate]);
|
|
4503
|
-
return /* @__PURE__ */
|
|
4615
|
+
return /* @__PURE__ */ React18__default.createElement(React18__default.Fragment, null, /* @__PURE__ */ React18__default.createElement(
|
|
4504
4616
|
DndContext,
|
|
4505
4617
|
{
|
|
4506
4618
|
id,
|
|
@@ -4509,7 +4621,7 @@ var Scheduler = ({
|
|
|
4509
4621
|
onDragEnd: onDragEndWrapper,
|
|
4510
4622
|
modifiers
|
|
4511
4623
|
},
|
|
4512
|
-
/* @__PURE__ */
|
|
4624
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4513
4625
|
"div",
|
|
4514
4626
|
{
|
|
4515
4627
|
ref: schedulerRef,
|
|
@@ -4531,7 +4643,7 @@ var Scheduler = ({
|
|
|
4531
4643
|
isDarkMode,
|
|
4532
4644
|
onThemeToggle
|
|
4533
4645
|
})
|
|
4534
|
-
) : /* @__PURE__ */
|
|
4646
|
+
) : /* @__PURE__ */ React18__default.createElement(
|
|
4535
4647
|
CalendarHeader,
|
|
4536
4648
|
{
|
|
4537
4649
|
currentDate,
|
|
@@ -4559,7 +4671,7 @@ var Scheduler = ({
|
|
|
4559
4671
|
hideLanguageSwitcher
|
|
4560
4672
|
}
|
|
4561
4673
|
),
|
|
4562
|
-
/* @__PURE__ */
|
|
4674
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "flex flex-1 overflow-hidden" }, /* @__PURE__ */ React18__default.createElement(
|
|
4563
4675
|
motion.div,
|
|
4564
4676
|
{
|
|
4565
4677
|
className: "hidden md:block overflow-hidden shrink-0",
|
|
@@ -4573,7 +4685,7 @@ var Scheduler = ({
|
|
|
4573
4685
|
ease: [0.4, 0, 0.2, 1]
|
|
4574
4686
|
}
|
|
4575
4687
|
},
|
|
4576
|
-
/* @__PURE__ */
|
|
4688
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4577
4689
|
Sidebar,
|
|
4578
4690
|
{
|
|
4579
4691
|
currentDate,
|
|
@@ -4605,7 +4717,7 @@ var Scheduler = ({
|
|
|
4605
4717
|
}
|
|
4606
4718
|
}
|
|
4607
4719
|
)
|
|
4608
|
-
), /* @__PURE__ */
|
|
4720
|
+
), /* @__PURE__ */ React18__default.createElement(AnimatePresence, null, isSidebarOpen && /* @__PURE__ */ React18__default.createElement(
|
|
4609
4721
|
motion.div,
|
|
4610
4722
|
{
|
|
4611
4723
|
key: "mobile-sidebar-overlay",
|
|
@@ -4615,7 +4727,7 @@ var Scheduler = ({
|
|
|
4615
4727
|
exit: { opacity: 0 },
|
|
4616
4728
|
transition: { duration: 0.2 }
|
|
4617
4729
|
},
|
|
4618
|
-
/* @__PURE__ */
|
|
4730
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4619
4731
|
motion.div,
|
|
4620
4732
|
{
|
|
4621
4733
|
className: "w-[280px] h-full bg-background shadow-2xl overflow-hidden",
|
|
@@ -4624,7 +4736,7 @@ var Scheduler = ({
|
|
|
4624
4736
|
exit: { x: -280 },
|
|
4625
4737
|
transition: { duration: 0.25, ease: [0.4, 0, 0.2, 1] }
|
|
4626
4738
|
},
|
|
4627
|
-
/* @__PURE__ */
|
|
4739
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4628
4740
|
Sidebar,
|
|
4629
4741
|
{
|
|
4630
4742
|
currentDate,
|
|
@@ -4662,16 +4774,16 @@ var Scheduler = ({
|
|
|
4662
4774
|
}
|
|
4663
4775
|
)
|
|
4664
4776
|
),
|
|
4665
|
-
/* @__PURE__ */
|
|
4777
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4666
4778
|
motion.div,
|
|
4667
4779
|
{
|
|
4668
4780
|
className: "flex-1 bg-black/50 backdrop-blur-sm",
|
|
4669
4781
|
onClick: () => setIsSidebarOpen(false)
|
|
4670
4782
|
}
|
|
4671
4783
|
)
|
|
4672
|
-
)), /* @__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))) : (
|
|
4673
4785
|
/* overflow-hidden here: each view owns its own scroll container */
|
|
4674
|
-
/* @__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(
|
|
4675
4787
|
motion.div,
|
|
4676
4788
|
{
|
|
4677
4789
|
key: `${view}-${currentDate.toISOString()}-${timezone || "local"}`,
|
|
@@ -4695,7 +4807,7 @@ var Scheduler = ({
|
|
|
4695
4807
|
className: "flex-1 min-h-0 flex flex-col",
|
|
4696
4808
|
style: { height: "100%" }
|
|
4697
4809
|
},
|
|
4698
|
-
view === "month" && /* @__PURE__ */
|
|
4810
|
+
view === "month" && /* @__PURE__ */ React18__default.createElement(
|
|
4699
4811
|
MonthView,
|
|
4700
4812
|
{
|
|
4701
4813
|
currentDate,
|
|
@@ -4706,7 +4818,7 @@ var Scheduler = ({
|
|
|
4706
4818
|
locale
|
|
4707
4819
|
}
|
|
4708
4820
|
),
|
|
4709
|
-
view === "week" && /* @__PURE__ */
|
|
4821
|
+
view === "week" && /* @__PURE__ */ React18__default.createElement(
|
|
4710
4822
|
WeekView,
|
|
4711
4823
|
{
|
|
4712
4824
|
currentDate,
|
|
@@ -4723,7 +4835,7 @@ var Scheduler = ({
|
|
|
4723
4835
|
compactShortEvents
|
|
4724
4836
|
}
|
|
4725
4837
|
),
|
|
4726
|
-
view === "day" && /* @__PURE__ */
|
|
4838
|
+
view === "day" && /* @__PURE__ */ React18__default.createElement(
|
|
4727
4839
|
DayView,
|
|
4728
4840
|
{
|
|
4729
4841
|
currentDate,
|
|
@@ -4740,7 +4852,7 @@ var Scheduler = ({
|
|
|
4740
4852
|
compactShortEvents
|
|
4741
4853
|
}
|
|
4742
4854
|
),
|
|
4743
|
-
view === "agenda" && /* @__PURE__ */
|
|
4855
|
+
view === "agenda" && /* @__PURE__ */ React18__default.createElement(
|
|
4744
4856
|
AgendaView,
|
|
4745
4857
|
{
|
|
4746
4858
|
currentDate,
|
|
@@ -4752,7 +4864,7 @@ var Scheduler = ({
|
|
|
4752
4864
|
renderEmptyState
|
|
4753
4865
|
}
|
|
4754
4866
|
),
|
|
4755
|
-
view === "resource" && resources && /* @__PURE__ */
|
|
4867
|
+
view === "resource" && resources && /* @__PURE__ */ React18__default.createElement(
|
|
4756
4868
|
ResourceView,
|
|
4757
4869
|
{
|
|
4758
4870
|
currentDate,
|
|
@@ -4776,7 +4888,7 @@ var Scheduler = ({
|
|
|
4776
4888
|
initialDate: modalInitialDate,
|
|
4777
4889
|
onSave: handleModalSave,
|
|
4778
4890
|
onDelete: handleModalDelete
|
|
4779
|
-
}) : /* @__PURE__ */
|
|
4891
|
+
}) : /* @__PURE__ */ React18__default.createElement(
|
|
4780
4892
|
EventModal,
|
|
4781
4893
|
{
|
|
4782
4894
|
isOpen: isModalOpen,
|
|
@@ -4791,7 +4903,7 @@ var Scheduler = ({
|
|
|
4791
4903
|
language
|
|
4792
4904
|
}
|
|
4793
4905
|
),
|
|
4794
|
-
/* @__PURE__ */
|
|
4906
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4795
4907
|
EventContextMenu,
|
|
4796
4908
|
{
|
|
4797
4909
|
event: contextMenuEvent,
|
|
@@ -4824,7 +4936,7 @@ var Scheduler = ({
|
|
|
4824
4936
|
}
|
|
4825
4937
|
}
|
|
4826
4938
|
),
|
|
4827
|
-
/* @__PURE__ */
|
|
4939
|
+
/* @__PURE__ */ React18__default.createElement(DragOverlay, { dropAnimation: null }, activeDragEvent ? /* @__PURE__ */ React18__default.createElement(
|
|
4828
4940
|
"div",
|
|
4829
4941
|
{
|
|
4830
4942
|
className: cn(
|
|
@@ -4842,17 +4954,17 @@ var Scheduler = ({
|
|
|
4842
4954
|
transform: "rotate(-2deg) scale(1.02)"
|
|
4843
4955
|
}
|
|
4844
4956
|
},
|
|
4845
|
-
/* @__PURE__ */
|
|
4957
|
+
/* @__PURE__ */ React18__default.createElement("div", { className: "p-2.5 h-full flex flex-col" }, /* @__PURE__ */ React18__default.createElement(
|
|
4846
4958
|
"div",
|
|
4847
4959
|
{
|
|
4848
4960
|
className: "absolute left-0 top-0 bottom-0 w-1 rounded-l-lg",
|
|
4849
4961
|
style: { backgroundColor: activeDragEvent.color || "var(--primary)" }
|
|
4850
4962
|
}
|
|
4851
|
-
), /* @__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" }))))
|
|
4852
4964
|
) : null)
|
|
4853
4965
|
)
|
|
4854
4966
|
), isMounted && isMobile && !readOnly && !hideFab && createPortal(
|
|
4855
|
-
/* @__PURE__ */
|
|
4967
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4856
4968
|
"div",
|
|
4857
4969
|
{
|
|
4858
4970
|
style: {
|
|
@@ -4864,7 +4976,7 @@ var Scheduler = ({
|
|
|
4864
4976
|
...fabCssVars
|
|
4865
4977
|
}
|
|
4866
4978
|
},
|
|
4867
|
-
/* @__PURE__ */
|
|
4979
|
+
/* @__PURE__ */ React18__default.createElement(
|
|
4868
4980
|
"button",
|
|
4869
4981
|
{
|
|
4870
4982
|
type: "button",
|
|
@@ -4885,7 +4997,7 @@ var Scheduler = ({
|
|
|
4885
4997
|
boxShadow: "0 10px 25px -5px rgba(0, 0, 0, 0.25)"
|
|
4886
4998
|
}
|
|
4887
4999
|
},
|
|
4888
|
-
/* @__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" }))
|
|
4889
5001
|
)
|
|
4890
5002
|
),
|
|
4891
5003
|
document.body
|