chesai-ui 0.16.11 → 0.16.12
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/components/full-calendar/event-popover.mjs +185 -253
- package/dist/components/full-calendar/index.d.ts +1 -0
- package/dist/components/full-calendar/recurrence-select.d.ts +11 -0
- package/dist/components/full-calendar/recurrence-select.mjs +126 -0
- package/dist/hooks/useRipple.d.ts +107 -0
- package/dist/index.mjs +301 -299
- package/package.json +1 -1
|
@@ -1,60 +1,58 @@
|
|
|
1
|
-
import { jsxs as s, jsx as a, Fragment as
|
|
2
|
-
import { useMediaQuery as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const p = 380, Pe = () => {
|
|
18
|
-
const $ = me(), {
|
|
1
|
+
import { jsxs as s, jsx as a, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import { useMediaQuery as Q } from "@uidotdev/usehooks";
|
|
3
|
+
import { useDragControls as U, useMotionValue as E, AnimatePresence as _, motion as q } from "framer-motion";
|
|
4
|
+
import { Clock as J, Repeat as K, X as z, Trash2 as H, GripHorizontal as Z } from "lucide-react";
|
|
5
|
+
import { useRef as $, useState as R, useEffect as Y } from "react";
|
|
6
|
+
import { Button as A } from "../button/index.mjs";
|
|
7
|
+
import { DatePicker as O } from "../date-picker/date-picker.mjs";
|
|
8
|
+
import { IconButton as u } from "../icon-button/index.mjs";
|
|
9
|
+
import { Input as ee } from "../input/index.mjs";
|
|
10
|
+
import { Sheet as te, SheetContent as ae, SheetHeader as re, SheetTitle as ne } from "../sheet/index.mjs";
|
|
11
|
+
import { TimePicker as j } from "../time-picker/index.mjs";
|
|
12
|
+
import { Switch as ie } from "../switch/index.mjs";
|
|
13
|
+
import { useFullCalendar as se } from "./calendar-context.mjs";
|
|
14
|
+
import { RecurrenceSelect as oe } from "./recurrence-select.mjs";
|
|
15
|
+
const f = 380, ye = () => {
|
|
16
|
+
const T = se(), {
|
|
19
17
|
popover: i,
|
|
20
|
-
closePopover:
|
|
18
|
+
closePopover: l,
|
|
21
19
|
draftEvent: t,
|
|
22
|
-
setDraftEvent:
|
|
23
|
-
onEventCreate:
|
|
24
|
-
onEventUpdate:
|
|
25
|
-
onEventDelete:
|
|
26
|
-
hidePopoverTitle:
|
|
27
|
-
hidePopoverTime:
|
|
28
|
-
hidePopoverRecurrence:
|
|
29
|
-
renderPopoverHeader:
|
|
30
|
-
renderPopoverFooter:
|
|
31
|
-
renderPopoverCustomFields:
|
|
32
|
-
} =
|
|
33
|
-
|
|
34
|
-
if (!i.isOpen ||
|
|
20
|
+
setDraftEvent: w,
|
|
21
|
+
onEventCreate: N,
|
|
22
|
+
onEventUpdate: b,
|
|
23
|
+
onEventDelete: y,
|
|
24
|
+
hidePopoverTitle: V,
|
|
25
|
+
hidePopoverTime: W,
|
|
26
|
+
hidePopoverRecurrence: B,
|
|
27
|
+
renderPopoverHeader: D,
|
|
28
|
+
renderPopoverFooter: C,
|
|
29
|
+
renderPopoverCustomFields: k
|
|
30
|
+
} = T, c = Q("(max-width: 768px)"), g = $(null), F = U(), p = E(0), v = E(0), [d, I] = R(450);
|
|
31
|
+
Y(() => {
|
|
32
|
+
if (!i.isOpen || c || typeof window > "u" || !window.ResizeObserver)
|
|
35
33
|
return;
|
|
36
34
|
const e = new ResizeObserver((r) => {
|
|
37
35
|
for (const n of r)
|
|
38
|
-
|
|
36
|
+
I(n.target.getBoundingClientRect().height);
|
|
39
37
|
});
|
|
40
|
-
return
|
|
41
|
-
}, [i.isOpen,
|
|
42
|
-
if (i.isOpen && !
|
|
38
|
+
return g.current && e.observe(g.current), () => e.disconnect();
|
|
39
|
+
}, [i.isOpen, c]), Y(() => {
|
|
40
|
+
if (i.isOpen && !c) {
|
|
43
41
|
const r = window.innerWidth, n = window.innerHeight;
|
|
44
42
|
if (i.anchorRect) {
|
|
45
|
-
let
|
|
46
|
-
|
|
43
|
+
let h = i.anchorRect.right + 16, m = i.anchorRect.top;
|
|
44
|
+
h + f > r && (h = i.anchorRect.left - f - 16), m + d > n && (m = n - d - 16), h = Math.max(
|
|
47
45
|
16,
|
|
48
|
-
Math.min(
|
|
49
|
-
),
|
|
46
|
+
Math.min(h, r - f - 16)
|
|
47
|
+
), m = Math.max(
|
|
50
48
|
16,
|
|
51
|
-
Math.min(
|
|
52
|
-
),
|
|
49
|
+
Math.min(m, n - d - 16)
|
|
50
|
+
), p.set(h), v.set(m);
|
|
53
51
|
} else
|
|
54
|
-
|
|
52
|
+
p.set(r / 2 - f / 2), v.set(n / 2 - d / 2);
|
|
55
53
|
}
|
|
56
|
-
}, [i.isOpen, i.anchorRect, d,
|
|
57
|
-
const [
|
|
54
|
+
}, [i.isOpen, i.anchorRect, c, d, p, v]);
|
|
55
|
+
const [X, G] = R(1), P = async () => {
|
|
58
56
|
if (!t) return;
|
|
59
57
|
const e = new Date(t.start);
|
|
60
58
|
t.isAllDay ? e.setHours(0, 0, 0, 0) : e.setHours(
|
|
@@ -76,70 +74,28 @@ const p = 380, Pe = () => {
|
|
|
76
74
|
end: r,
|
|
77
75
|
title: t.title || "(No title)"
|
|
78
76
|
};
|
|
79
|
-
delete n.isDraft, i.mode === "create" &&
|
|
80
|
-
},
|
|
81
|
-
t?.id &&
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
77
|
+
delete n.isDraft, i.mode === "create" && N ? await N(n) : i.mode === "edit" && b && await b(n), l();
|
|
78
|
+
}, M = async () => {
|
|
79
|
+
t?.id && y && await y(t.id), l();
|
|
80
|
+
}, o = (e) => {
|
|
81
|
+
w((r) => r ? { ...r, ...e } : null);
|
|
82
|
+
}, x = (e) => {
|
|
83
|
+
w((r) => {
|
|
86
84
|
if (!r) return null;
|
|
87
85
|
const n = e.data !== void 0 ? { ...r.data || {}, ...e.data } : r.data;
|
|
88
86
|
return { ...r, ...e, data: n };
|
|
89
87
|
});
|
|
90
|
-
}, b = t ? [
|
|
91
|
-
{ value: "none", label: "Does not repeat" },
|
|
92
|
-
{ value: "daily", label: "Daily" },
|
|
93
|
-
{
|
|
94
|
-
value: "weekly",
|
|
95
|
-
label: `Weekly on ${W(t.start, "EEEE")}`
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
value: "monthly",
|
|
99
|
-
label: `Monthly on the ${t.start.getDate()}`
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
value: "yearly",
|
|
103
|
-
label: `Annually on ${W(t.start, "MMM d")}`
|
|
104
|
-
},
|
|
105
|
-
{ value: "weekdays", label: "Every weekday (Monday to Friday)" }
|
|
106
|
-
] : [];
|
|
107
|
-
let o = "none";
|
|
108
|
-
if (t?.recurrence) {
|
|
109
|
-
const e = t.recurrence;
|
|
110
|
-
e.interval === 1 && e.endType === "never" && (e.frequency === "daily" ? o = "daily" : e.frequency === "weekly" && e.daysOfWeek?.length === 1 && e.daysOfWeek[0] === t.start.getDay() ? o = "weekly" : e.frequency === "weekly" && e.daysOfWeek?.length === 5 && [1, 2, 3, 4, 5].every((r) => e.daysOfWeek.includes(r)) ? o = "weekdays" : e.frequency === "monthly" ? o = "monthly" : e.frequency === "yearly" && (o = "yearly")), o === "none" && (o = "custom_active", b.push({
|
|
111
|
-
value: "custom_active",
|
|
112
|
-
label: "Custom Recurrence"
|
|
113
|
-
}));
|
|
114
|
-
}
|
|
115
|
-
b.push({ value: "custom", label: "Custom..." });
|
|
116
|
-
const K = (e) => {
|
|
117
|
-
e === "none" ? l({ recurrence: void 0 }) : e === "custom" ? x(!0) : e === "weekdays" ? l({
|
|
118
|
-
recurrence: {
|
|
119
|
-
frequency: "weekly",
|
|
120
|
-
interval: 1,
|
|
121
|
-
endType: "never",
|
|
122
|
-
daysOfWeek: [1, 2, 3, 4, 5]
|
|
123
|
-
}
|
|
124
|
-
}) : e !== "custom_active" && l({
|
|
125
|
-
recurrence: {
|
|
126
|
-
frequency: e,
|
|
127
|
-
interval: 1,
|
|
128
|
-
endType: "never",
|
|
129
|
-
daysOfWeek: e === "weekly" ? [t?.start?.getDay() || 0] : void 0
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
88
|
};
|
|
133
89
|
if (!t) return null;
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
!
|
|
137
|
-
|
|
90
|
+
const S = /* @__PURE__ */ s("div", { className: "flex flex-col gap-6 p-6 font-manrope text-on-surface min-w-[340px]", children: [
|
|
91
|
+
D && /* @__PURE__ */ a("div", { className: "flex flex-col gap-4", children: D(t, x) }),
|
|
92
|
+
!V && /* @__PURE__ */ a("div", { className: "pl-10 pr-2", children: /* @__PURE__ */ a(
|
|
93
|
+
ee,
|
|
138
94
|
{
|
|
139
95
|
variant: "underlined",
|
|
140
96
|
placeholder: "Add title",
|
|
141
97
|
value: t.title,
|
|
142
|
-
onChange: (e) =>
|
|
98
|
+
onChange: (e) => o({ title: e.target.value }),
|
|
143
99
|
autoFocus: !0,
|
|
144
100
|
className: "shadow-none px-0",
|
|
145
101
|
classNames: {
|
|
@@ -148,12 +104,12 @@ const p = 380, Pe = () => {
|
|
|
148
104
|
}
|
|
149
105
|
}
|
|
150
106
|
) }),
|
|
151
|
-
!
|
|
152
|
-
/* @__PURE__ */ a(
|
|
107
|
+
!W && /* @__PURE__ */ s("div", { className: "flex items-start gap-4", children: [
|
|
108
|
+
/* @__PURE__ */ a(J, { className: "w-5 h-5 mt-2.5 text-on-surface-variant shrink-0" }),
|
|
153
109
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-3 w-full min-w-0", children: [
|
|
154
110
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 w-full", children: [
|
|
155
111
|
/* @__PURE__ */ a(
|
|
156
|
-
|
|
112
|
+
O,
|
|
157
113
|
{
|
|
158
114
|
variant: "docked",
|
|
159
115
|
inputVariant: "filled",
|
|
@@ -177,14 +133,14 @@ const p = 380, Pe = () => {
|
|
|
177
133
|
e.getFullYear(),
|
|
178
134
|
e.getMonth(),
|
|
179
135
|
e.getDate()
|
|
180
|
-
),
|
|
136
|
+
), o({ start: r, end: n });
|
|
181
137
|
}
|
|
182
138
|
}
|
|
183
139
|
),
|
|
184
|
-
t.isAllDay && /* @__PURE__ */ s(
|
|
140
|
+
t.isAllDay && /* @__PURE__ */ s(L, { children: [
|
|
185
141
|
/* @__PURE__ */ a("span", { className: "text-on-surface-variant shrink-0", children: "-" }),
|
|
186
142
|
/* @__PURE__ */ a(
|
|
187
|
-
|
|
143
|
+
O,
|
|
188
144
|
{
|
|
189
145
|
variant: "docked",
|
|
190
146
|
inputVariant: "filled",
|
|
@@ -198,13 +154,13 @@ const p = 380, Pe = () => {
|
|
|
198
154
|
e.getFullYear(),
|
|
199
155
|
e.getMonth(),
|
|
200
156
|
e.getDate()
|
|
201
|
-
),
|
|
157
|
+
), o({ end: r }), t.start > r) {
|
|
202
158
|
const n = new Date(t.start);
|
|
203
159
|
n.setFullYear(
|
|
204
160
|
e.getFullYear(),
|
|
205
161
|
e.getMonth(),
|
|
206
162
|
e.getDate()
|
|
207
|
-
),
|
|
163
|
+
), o({ start: n });
|
|
208
164
|
}
|
|
209
165
|
}
|
|
210
166
|
}
|
|
@@ -213,21 +169,21 @@ const p = 380, Pe = () => {
|
|
|
213
169
|
] }),
|
|
214
170
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 mt-1 w-fit", children: [
|
|
215
171
|
/* @__PURE__ */ a(
|
|
216
|
-
|
|
172
|
+
ie,
|
|
217
173
|
{
|
|
218
174
|
id: "all-day-switch",
|
|
219
175
|
size: "sm",
|
|
220
176
|
checked: !!t.isAllDay,
|
|
221
177
|
onCheckedChange: (e) => {
|
|
222
178
|
if (e)
|
|
223
|
-
|
|
179
|
+
o({ isAllDay: e });
|
|
224
180
|
else {
|
|
225
181
|
const r = new Date(t.end);
|
|
226
182
|
r.setFullYear(
|
|
227
183
|
t.start.getFullYear(),
|
|
228
184
|
t.start.getMonth(),
|
|
229
185
|
t.start.getDate()
|
|
230
|
-
),
|
|
186
|
+
), o({ isAllDay: e, end: r });
|
|
231
187
|
}
|
|
232
188
|
}
|
|
233
189
|
}
|
|
@@ -243,187 +199,163 @@ const p = 380, Pe = () => {
|
|
|
243
199
|
] }),
|
|
244
200
|
!t.isAllDay && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 w-full mt-1", children: [
|
|
245
201
|
/* @__PURE__ */ a(
|
|
246
|
-
|
|
202
|
+
j,
|
|
247
203
|
{
|
|
248
204
|
variant: "docked",
|
|
249
205
|
inputVariant: "filled",
|
|
250
206
|
size: "sm",
|
|
251
207
|
shape: "full",
|
|
252
208
|
value: t.start,
|
|
253
|
-
onChange: (e) =>
|
|
209
|
+
onChange: (e) => o({ start: e })
|
|
254
210
|
}
|
|
255
211
|
),
|
|
256
212
|
/* @__PURE__ */ a("span", { className: "text-on-surface-variant shrink-0", children: "-" }),
|
|
257
213
|
/* @__PURE__ */ a(
|
|
258
|
-
|
|
214
|
+
j,
|
|
259
215
|
{
|
|
260
216
|
variant: "docked",
|
|
261
217
|
inputVariant: "filled",
|
|
262
218
|
size: "sm",
|
|
263
219
|
shape: "full",
|
|
264
220
|
value: t.end,
|
|
265
|
-
onChange: (e) =>
|
|
221
|
+
onChange: (e) => o({ end: e })
|
|
266
222
|
}
|
|
267
223
|
)
|
|
268
224
|
] })
|
|
269
225
|
] })
|
|
270
226
|
] }),
|
|
271
|
-
!
|
|
272
|
-
/* @__PURE__ */ a(
|
|
227
|
+
!B && /* @__PURE__ */ s("div", { className: "flex items-center gap-4 mt-2", children: [
|
|
228
|
+
/* @__PURE__ */ a(K, { className: "w-5 h-5 text-on-surface-variant shrink-0" }),
|
|
273
229
|
/* @__PURE__ */ a("div", { className: "w-full", children: /* @__PURE__ */ a(
|
|
274
|
-
|
|
230
|
+
oe,
|
|
275
231
|
{
|
|
276
232
|
variant: "filled",
|
|
277
233
|
size: "sm",
|
|
278
234
|
shape: "full",
|
|
279
|
-
value:
|
|
280
|
-
|
|
281
|
-
|
|
235
|
+
value: t.recurrence,
|
|
236
|
+
onChange: (e) => o({ recurrence: e }),
|
|
237
|
+
startDate: t.start
|
|
282
238
|
}
|
|
283
239
|
) })
|
|
284
240
|
] }),
|
|
285
|
-
|
|
286
|
-
|
|
241
|
+
k && /* @__PURE__ */ a("div", { className: "mt-2 border-t border-outline-variant/30 pt-4 flex flex-col gap-4", children: k(t, x) }),
|
|
242
|
+
C && /* @__PURE__ */ a("div", { className: "mt-2 border-t border-outline-variant/30 pt-4 flex flex-col gap-4", children: C(t, x) })
|
|
287
243
|
] });
|
|
288
|
-
return i.isOpen ?
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
/* @__PURE__ */ s(
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
|
|
302
|
-
/* @__PURE__ */ a(ue, { className: "text-base font-semibold m-0", children: i.mode === "create" ? "New Event" : "Edit Event" })
|
|
303
|
-
] }),
|
|
304
|
-
i.mode === "edit" && /* @__PURE__ */ a(
|
|
305
|
-
m,
|
|
306
|
-
{
|
|
307
|
-
variant: "ghost",
|
|
308
|
-
size: "sm",
|
|
309
|
-
onClick: H,
|
|
310
|
-
className: "text-error hover:bg-error/10 hover:text-error",
|
|
311
|
-
children: /* @__PURE__ */ a(V, { className: "w-5 h-5" })
|
|
312
|
-
}
|
|
313
|
-
)
|
|
244
|
+
return i.isOpen ? c ? /* @__PURE__ */ a(
|
|
245
|
+
te,
|
|
246
|
+
{
|
|
247
|
+
open: i.isOpen,
|
|
248
|
+
onOpenChange: (e) => !e && l(),
|
|
249
|
+
forceBottomSheet: !0,
|
|
250
|
+
snapPoints: [0.6, 1],
|
|
251
|
+
activeSnapPoint: X,
|
|
252
|
+
setActiveSnapPoint: G,
|
|
253
|
+
children: /* @__PURE__ */ s(ae, { className: "p-0 flex flex-col overflow-hidden h-full", children: [
|
|
254
|
+
/* @__PURE__ */ s(re, { className: "px-4 py-2 border-b border-outline-variant/20 shrink-0 flex-row justify-between items-center !space-y-0", children: [
|
|
255
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
256
|
+
/* @__PURE__ */ a(u, { variant: "ghost", onClick: l, children: /* @__PURE__ */ a(z, { className: "w-5 h-5" }) }),
|
|
257
|
+
/* @__PURE__ */ a(ne, { className: "text-base font-semibold m-0", children: i.mode === "create" ? "New Event" : "Edit Event" })
|
|
314
258
|
] }),
|
|
315
|
-
/* @__PURE__ */ a(
|
|
316
|
-
|
|
317
|
-
j,
|
|
259
|
+
i.mode === "edit" && /* @__PURE__ */ a(
|
|
260
|
+
u,
|
|
318
261
|
{
|
|
319
|
-
variant: "
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
262
|
+
variant: "ghost",
|
|
263
|
+
size: "sm",
|
|
264
|
+
onClick: M,
|
|
265
|
+
className: "text-error hover:bg-error/10 hover:text-error",
|
|
266
|
+
children: /* @__PURE__ */ a(H, { className: "w-5 h-5" })
|
|
323
267
|
}
|
|
324
|
-
)
|
|
325
|
-
] })
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
{
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
268
|
+
)
|
|
269
|
+
] }),
|
|
270
|
+
/* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto no-scrollbar", children: S }),
|
|
271
|
+
/* @__PURE__ */ a("div", { className: "p-3 border-t border-outline-variant/20 bg-surface-container shrink-0 flex justify-end items-center pb-safe", children: /* @__PURE__ */ a(
|
|
272
|
+
A,
|
|
273
|
+
{
|
|
274
|
+
variant: "primary",
|
|
275
|
+
onClick: P,
|
|
276
|
+
className: "px-8 rounded-full font-bold",
|
|
277
|
+
children: "Save"
|
|
278
|
+
}
|
|
279
|
+
) })
|
|
280
|
+
] })
|
|
281
|
+
}
|
|
282
|
+
) : /* @__PURE__ */ a("div", { className: "fixed inset-0 pointer-events-none z-[50]", children: /* @__PURE__ */ a(_, { children: i.isOpen && /* @__PURE__ */ s(
|
|
283
|
+
q.div,
|
|
284
|
+
{
|
|
285
|
+
ref: g,
|
|
286
|
+
drag: !0,
|
|
287
|
+
dragMomentum: !1,
|
|
288
|
+
dragControls: F,
|
|
289
|
+
dragListener: !1,
|
|
290
|
+
style: {
|
|
291
|
+
x: p,
|
|
292
|
+
y: v,
|
|
293
|
+
width: "auto",
|
|
294
|
+
minWidth: f,
|
|
295
|
+
maxWidth: "calc(100vw - 32px)"
|
|
296
|
+
},
|
|
297
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
298
|
+
animate: { opacity: 1, scale: 1 },
|
|
299
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
300
|
+
transition: { duration: 0.15 },
|
|
301
|
+
className: "absolute bg-surface-container-high border border-outline-variant/50 rounded-2xl shadow-2xl pointer-events-auto flex flex-col h-auto max-h-[90vh]",
|
|
302
|
+
children: [
|
|
303
|
+
/* @__PURE__ */ s(
|
|
304
|
+
"div",
|
|
305
|
+
{
|
|
306
|
+
onPointerDown: (e) => {
|
|
307
|
+
e.stopPropagation(), F.start(e);
|
|
308
|
+
},
|
|
309
|
+
className: "flex items-center justify-between px-2 py-1.5 bg-surface-container-high border-b border-outline-variant/20 drag-handle cursor-move rounded-t-2xl shrink-0",
|
|
310
|
+
children: [
|
|
311
|
+
/* @__PURE__ */ a(
|
|
312
|
+
u,
|
|
313
|
+
{
|
|
314
|
+
variant: "ghost",
|
|
315
|
+
size: "sm",
|
|
316
|
+
className: "pointer-events-none opacity-50",
|
|
317
|
+
children: /* @__PURE__ */ a(Z, { className: "w-4 h-4" })
|
|
318
|
+
}
|
|
319
|
+
),
|
|
320
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
321
|
+
i.mode === "edit" && t && /* @__PURE__ */ a(
|
|
322
|
+
u,
|
|
370
323
|
{
|
|
371
324
|
variant: "ghost",
|
|
372
325
|
size: "sm",
|
|
373
|
-
|
|
374
|
-
|
|
326
|
+
onClick: M,
|
|
327
|
+
className: "text-error hover:bg-error/10 hover:text-error cursor-pointer pointer-events-auto",
|
|
328
|
+
children: /* @__PURE__ */ a(H, { className: "w-4 h-4" })
|
|
375
329
|
}
|
|
376
330
|
),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
j,
|
|
405
|
-
{
|
|
406
|
-
variant: "primary",
|
|
407
|
-
onClick: z,
|
|
408
|
-
className: "px-6 rounded-full font-bold",
|
|
409
|
-
children: "Save"
|
|
410
|
-
}
|
|
411
|
-
) })
|
|
412
|
-
]
|
|
413
|
-
}
|
|
414
|
-
) }) }),
|
|
415
|
-
/* @__PURE__ */ a(
|
|
416
|
-
_,
|
|
417
|
-
{
|
|
418
|
-
isOpen: S,
|
|
419
|
-
onClose: () => x(!1),
|
|
420
|
-
value: t.recurrence,
|
|
421
|
-
onChange: (e) => l({ recurrence: e }),
|
|
422
|
-
startDate: t.start
|
|
423
|
-
}
|
|
424
|
-
)
|
|
425
|
-
] }) : null;
|
|
331
|
+
/* @__PURE__ */ a(
|
|
332
|
+
u,
|
|
333
|
+
{
|
|
334
|
+
variant: "ghost",
|
|
335
|
+
size: "sm",
|
|
336
|
+
onClick: l,
|
|
337
|
+
className: "pointer-events-auto hover:bg-surface-container-highest cursor-pointer",
|
|
338
|
+
children: /* @__PURE__ */ a(z, { className: "w-4 h-4" })
|
|
339
|
+
}
|
|
340
|
+
)
|
|
341
|
+
] })
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
),
|
|
345
|
+
/* @__PURE__ */ a("div", { className: "flex-1 max-h-[80vh] overflow-y-auto scrollbar-thin overflow-x-hidden min-h-0", children: S }),
|
|
346
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-end gap-2 p-4 border-t border-outline-variant/20 bg-surface-container-high shrink-0 rounded-b-2xl", children: /* @__PURE__ */ a(
|
|
347
|
+
A,
|
|
348
|
+
{
|
|
349
|
+
variant: "primary",
|
|
350
|
+
onClick: P,
|
|
351
|
+
className: "px-6 rounded-full font-bold",
|
|
352
|
+
children: "Save"
|
|
353
|
+
}
|
|
354
|
+
) })
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
) }) }) : null;
|
|
426
358
|
};
|
|
427
359
|
export {
|
|
428
|
-
|
|
360
|
+
ye as EventPopover
|
|
429
361
|
};
|
|
@@ -9,6 +9,7 @@ export declare const PrintPagesLayout: ({ isPreview, printWidth, printHeight, sc
|
|
|
9
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare const FullCalendarViewDispatcher: () => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export * from './recurrence-dialog';
|
|
12
|
+
export * from './recurrence-select';
|
|
12
13
|
export declare const FullCalendar: React.ForwardRefExoticComponent<FullCalendarProps<any> & React.RefAttributes<HTMLDivElement>> & {
|
|
13
14
|
Toolbar: ({ className }: {
|
|
14
15
|
className?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RecurrenceRule } from './types';
|
|
2
|
+
export interface RecurrenceSelectProps {
|
|
3
|
+
value?: RecurrenceRule;
|
|
4
|
+
onChange: (rule?: RecurrenceRule) => void;
|
|
5
|
+
startDate: Date;
|
|
6
|
+
variant?: "filled" | "outlined" | "underlined";
|
|
7
|
+
size?: "sm" | "md" | "lg";
|
|
8
|
+
shape?: "full" | "minimal" | "sharp";
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const RecurrenceSelect: ({ value, onChange, startDate, variant, size, shape, className, }: RecurrenceSelectProps) => import("react/jsx-runtime").JSX.Element;
|