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.
@@ -1,60 +1,58 @@
1
- import { jsxs as s, jsx as a, Fragment as N } from "react/jsx-runtime";
2
- import { useMediaQuery as Z } from "@uidotdev/usehooks";
3
- import { format as W } from "date-fns";
4
- import { useDragControls as ee, useMotionValue as Y, AnimatePresence as te, motion as ae } from "framer-motion";
5
- import { Clock as re, Repeat as ne, X as T, Trash2 as V, GripHorizontal as ie } from "lucide-react";
6
- import { useRef as se, useState as D, useEffect as q } from "react";
7
- import { Button as j } from "../button/index.mjs";
8
- import { DatePicker as B } from "../date-picker/date-picker.mjs";
9
- import { IconButton as m } from "../icon-button/index.mjs";
10
- import { Input as le } from "../input/index.mjs";
11
- import { Sheet as oe, SheetContent as ce, SheetHeader as de, SheetTitle as ue } from "../sheet/index.mjs";
12
- import { TimePicker as I } from "../time-picker/index.mjs";
13
- import { Switch as fe } from "../switch/index.mjs";
14
- import { Select as he } from "../select/index.mjs";
15
- import { useFullCalendar as me } from "./calendar-context.mjs";
16
- import { RecurrenceDialog as _ } from "./recurrence-dialog.mjs";
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: c,
18
+ closePopover: l,
21
19
  draftEvent: t,
22
- setDraftEvent: k,
23
- onEventCreate: C,
24
- onEventUpdate: O,
25
- onEventDelete: M,
26
- hidePopoverTitle: X,
27
- hidePopoverTime: G,
28
- hidePopoverRecurrence: L,
29
- renderPopoverHeader: E,
30
- renderPopoverFooter: F,
31
- renderPopoverCustomFields: R
32
- } = $, d = Z("(max-width: 768px)"), y = se(null), P = ee(), v = Y(0), g = Y(0), [S, x] = D(!1), [u, Q] = D(450);
33
- q(() => {
34
- if (!i.isOpen || d || typeof window > "u" || !window.ResizeObserver)
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
- Q(n.target.getBoundingClientRect().height);
36
+ I(n.target.getBoundingClientRect().height);
39
37
  });
40
- return y.current && e.observe(y.current), () => e.disconnect();
41
- }, [i.isOpen, d]), q(() => {
42
- if (i.isOpen && !d) {
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 f = i.anchorRect.right + 16, h = i.anchorRect.top;
46
- f + p > r && (f = i.anchorRect.left - p - 16), h + u > n && (h = n - u - 16), f = Math.max(
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(f, r - p - 16)
49
- ), h = Math.max(
46
+ Math.min(h, r - f - 16)
47
+ ), m = Math.max(
50
48
  16,
51
- Math.min(h, n - u - 16)
52
- ), v.set(f), g.set(h);
49
+ Math.min(m, n - d - 16)
50
+ ), p.set(h), v.set(m);
53
51
  } else
54
- v.set(r / 2 - p / 2), g.set(n / 2 - u / 2);
52
+ p.set(r / 2 - f / 2), v.set(n / 2 - d / 2);
55
53
  }
56
- }, [i.isOpen, i.anchorRect, d, u, v, g]);
57
- const [U, J] = D(1), z = async () => {
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" && C ? await C(n) : i.mode === "edit" && O && await O(n), c();
80
- }, H = async () => {
81
- t?.id && M && await M(t.id), c();
82
- }, l = (e) => {
83
- k((r) => r ? { ...r, ...e } : null);
84
- }, w = (e) => {
85
- k((r) => {
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 A = /* @__PURE__ */ s("div", { className: "flex flex-col gap-6 p-6 font-manrope text-on-surface min-w-[340px]", children: [
135
- E && /* @__PURE__ */ a("div", { className: "flex flex-col gap-4", children: E(t, w) }),
136
- !X && /* @__PURE__ */ a("div", { className: "pl-10 pr-2", children: /* @__PURE__ */ a(
137
- le,
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) => l({ title: e.target.value }),
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
- !G && /* @__PURE__ */ s("div", { className: "flex items-start gap-4", children: [
152
- /* @__PURE__ */ a(re, { className: "w-5 h-5 mt-2.5 text-on-surface-variant shrink-0" }),
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
- B,
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
- ), l({ start: r, end: n });
136
+ ), o({ start: r, end: n });
181
137
  }
182
138
  }
183
139
  ),
184
- t.isAllDay && /* @__PURE__ */ s(N, { children: [
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
- B,
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
- ), l({ end: r }), t.start > r) {
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
- ), l({ start: n });
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
- fe,
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
- l({ isAllDay: e });
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
- ), l({ isAllDay: e, end: r });
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
- I,
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) => l({ start: 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
- I,
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) => l({ end: e })
221
+ onChange: (e) => o({ end: e })
266
222
  }
267
223
  )
268
224
  ] })
269
225
  ] })
270
226
  ] }),
271
- !L && /* @__PURE__ */ s("div", { className: "flex items-center gap-4 mt-2", children: [
272
- /* @__PURE__ */ a(ne, { className: "w-5 h-5 text-on-surface-variant shrink-0" }),
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
- he,
230
+ oe,
275
231
  {
276
232
  variant: "filled",
277
233
  size: "sm",
278
234
  shape: "full",
279
- value: o,
280
- onValueChange: K,
281
- items: b
235
+ value: t.recurrence,
236
+ onChange: (e) => o({ recurrence: e }),
237
+ startDate: t.start
282
238
  }
283
239
  ) })
284
240
  ] }),
285
- R && /* @__PURE__ */ a("div", { className: "mt-2 border-t border-outline-variant/30 pt-4 flex flex-col gap-4", children: R(t, w) }),
286
- F && /* @__PURE__ */ a("div", { className: "mt-2 border-t border-outline-variant/30 pt-4 flex flex-col gap-4", children: F(t, w) })
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 ? d ? /* @__PURE__ */ s(N, { children: [
289
- /* @__PURE__ */ a(
290
- oe,
291
- {
292
- open: i.isOpen,
293
- onOpenChange: (e) => !e && c(),
294
- forceBottomSheet: !0,
295
- snapPoints: [0.6, 1],
296
- activeSnapPoint: U,
297
- setActiveSnapPoint: J,
298
- children: /* @__PURE__ */ s(ce, { className: "p-0 flex flex-col overflow-hidden h-full", children: [
299
- /* @__PURE__ */ s(de, { className: "px-4 py-2 border-b border-outline-variant/20 shrink-0 flex-row justify-between items-center !space-y-0", children: [
300
- /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
301
- /* @__PURE__ */ a(m, { variant: "ghost", onClick: c, children: /* @__PURE__ */ a(T, { className: "w-5 h-5" }) }),
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("div", { className: "flex-1 overflow-y-auto no-scrollbar", children: A }),
316
- /* @__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(
317
- j,
259
+ i.mode === "edit" && /* @__PURE__ */ a(
260
+ u,
318
261
  {
319
- variant: "primary",
320
- onClick: z,
321
- className: "px-8 rounded-full font-bold",
322
- children: "Save"
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
- /* @__PURE__ */ a(
329
- _,
330
- {
331
- isOpen: S,
332
- onClose: () => x(!1),
333
- value: t.recurrence,
334
- onChange: (e) => l({ recurrence: e }),
335
- startDate: t.start
336
- }
337
- )
338
- ] }) : /* @__PURE__ */ s(N, { children: [
339
- /* @__PURE__ */ a("div", { className: "fixed inset-0 pointer-events-none z-[50]", children: /* @__PURE__ */ a(te, { children: i.isOpen && /* @__PURE__ */ s(
340
- ae.div,
341
- {
342
- ref: y,
343
- drag: !0,
344
- dragMomentum: !1,
345
- dragControls: P,
346
- dragListener: !1,
347
- style: {
348
- x: v,
349
- y: g,
350
- width: "auto",
351
- minWidth: p,
352
- maxWidth: "calc(100vw - 32px)"
353
- },
354
- initial: { opacity: 0, scale: 0.95 },
355
- animate: { opacity: 1, scale: 1 },
356
- exit: { opacity: 0, scale: 0.95 },
357
- transition: { duration: 0.15 },
358
- 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]",
359
- children: [
360
- /* @__PURE__ */ s(
361
- "div",
362
- {
363
- onPointerDown: (e) => {
364
- e.stopPropagation(), P.start(e);
365
- },
366
- 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",
367
- children: [
368
- /* @__PURE__ */ a(
369
- m,
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
- className: "pointer-events-none opacity-50",
374
- children: /* @__PURE__ */ a(ie, { className: "w-4 h-4" })
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__ */ s("div", { className: "flex items-center gap-1", children: [
378
- i.mode === "edit" && t && /* @__PURE__ */ a(
379
- m,
380
- {
381
- variant: "ghost",
382
- size: "sm",
383
- onClick: H,
384
- className: "text-error hover:bg-error/10 hover:text-error cursor-pointer pointer-events-auto",
385
- children: /* @__PURE__ */ a(V, { className: "w-4 h-4" })
386
- }
387
- ),
388
- /* @__PURE__ */ a(
389
- m,
390
- {
391
- variant: "ghost",
392
- size: "sm",
393
- onClick: c,
394
- className: "pointer-events-auto hover:bg-surface-container-highest cursor-pointer",
395
- children: /* @__PURE__ */ a(T, { className: "w-4 h-4" })
396
- }
397
- )
398
- ] })
399
- ]
400
- }
401
- ),
402
- /* @__PURE__ */ a("div", { className: "flex-1 max-h-[80vh] overflow-y-auto scrollbar-thin overflow-x-hidden min-h-0", children: A }),
403
- /* @__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(
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
- Pe as EventPopover
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;